@sveltia/cms 0.170.0 → 0.170.1

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.
@@ -41,7 +41,7 @@ var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.pr
41
41
  * SOFTWARE.
42
42
  */
43
43
  function lc(e){return!!(e&&e[bd])}function uc(e){return!!(e&&e[xd])}function dc(e){return uc(e)||lc(e)}function fc(e){return!!(e&&e[Sd])}function pc(e,t,n,r){var i=e===Dd?t:e===Od?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function mc(){return{value:void 0,done:!0}}function hc(e){return Array.isArray(e)?!0:!!vc(e)}function gc(e){return!!(e&&typeof e.next==`function`)}function _c(e){var t=vc(e);return t&&t.call(e)}function vc(e){var t=e&&(Ad&&e[Ad]||e[jd]);if(typeof t==`function`)return t}function yc(e){var t=vc(e);return t&&t===e.entries}function bc(e){var t=vc(e);return t&&t===e.keys}function xc(){return{value:!1}}function Sc(e){e&&(e.value=!0)}function Cc(){}function wc(e){return e.size===void 0&&(e.size=e.__iterate(Ec)),e.size}function Tc(e,t){if(typeof t!=`number`){var n=t>>>0;if(``+n!==t||n===4294967295)return NaN;t=n}return t<0?wc(e)+t:t}function Ec(){return!0}function Dc(e,t,n){return(e===0&&!jc(e)||n!==void 0&&e<=-n)&&(t===void 0||n!==void 0&&t>=n)}function Oc(e,t){return Ac(e,t,0)}function kc(e,t){return Ac(e,t,t)}function Ac(e,t,n){return e===void 0?n:jc(e)?t===1/0?t:Math.max(0,t+e)|0:t===void 0||t===e?e:Math.min(t,e)|0}function jc(e){return e<0||e===0&&1/e==-1/0}function Mc(e){return!!(e&&e[zd])}function Nc(e){return fc(e)||Mc(e)}function Pc(e){return!!(e&&e[Bd])}function Fc(e){return!!(e&&e[Vd])}function Ic(e){return Array.isArray(e)||typeof e==`string`?!0:e&&typeof e==`object`&&Number.isInteger(e.length)&&e.length>=0&&(e.length===0?Object.keys(e).length===1:e.hasOwnProperty(e.length-1))}function Lc(){return Xd||=new qd([])}function Rc(e){var t=Vc(e);if(t)return t.fromEntrySeq();if(typeof e==`object`)return new Jd(e);throw TypeError(`Expected Array or collection object of [k, v] entries, or keyed object: `+e)}function zc(e){var t=Vc(e);if(t)return t;throw TypeError(`Expected Array or collection object of values: `+e)}function Bc(e){var t=Vc(e);if(t)return yc(e)?t.fromEntrySeq():bc(e)?t.toSetSeq():t;if(typeof e==`object`)return new Jd(e);throw TypeError(`Expected Array or collection object of values, or keyed object: `+e)}function Vc(e){return Ic(e)?new qd(e):hc(e)?new Yd(e):void 0}function Hc(){return this.__ensureOwner()}function Uc(){return this.__ownerID?this:this.__ensureOwner(new Cc)}function Wc(e){return e>>>1&1073741824|e&3221225471}function Gc(e){if(e==null)return Kc(e);if(typeof e.hashCode==`function`)return Wc(e.hashCode(e));var t=$c(e);if(t==null)return Kc(t);switch(typeof t){case`boolean`:return t?1108378657:1108378656;case`number`:return qc(t);case`string`:return t.length>cf?Jc(t):Yc(t);case`object`:case`function`:return Qc(t);case`symbol`:return Zc(t);default:if(typeof t.toString==`function`)return Yc(t.toString());throw Error(`Value type `+typeof t+` cannot be hashed.`)}}function Kc(e){return e===null?1108378658:1108378659}function qc(e){if(e!==e||e===1/0)return 0;var t=e|0;for(t!==e&&(t^=e*4294967295);e>4294967295;)e/=4294967295,t^=e;return Wc(t)}function Jc(e){var t=df[e];return t===void 0&&(t=Yc(e),uf===lf&&(uf=0,df={}),uf++,df[e]=t),t}function Yc(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return Wc(t)}function Xc(e){if(typeof e!=`string`)return Gc(e);for(var t=0,n=0;n<e.length;n++)t=$d*t+e.charCodeAt(n)|0;return t}function Zc(e){var t=af[e];return t===void 0?(t=el(),af[e]=t,t):t}function Qc(e){var t;if(nf&&(t=rf.get(e),t!==void 0)||(t=e[sf],t!==void 0)||!tf&&(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[sf],t!==void 0||(t=lee(e),t!==void 0)))return t;if(t=el(),nf)rf.set(e,t);else if(ef!==void 0&&ef(e)===!1)throw Error(`Non-extensible objects are not allowed as keys.`);else if(tf)Object.defineProperty(e,sf,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(e.propertyIsEnumerable!==void 0&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[sf]=t;else if(e.nodeType!==void 0)e[sf]=t;else throw Error(`Unable to set a non-enumerable property on object.`);return t}function lee(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}function $c(e){return e.valueOf!==Qd&&typeof e.valueOf==`function`?e.valueOf(e):e}function el(){var e=++of;return of&1073741824&&(of=0),e}function tl(e){var t=Sl(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=Cl,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return t(n,e,r)!==!1},n)},t.__iteratorUncached=function(t,n){if(t===kd){var r=e.__iterator(t,n);return new Nd(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(t===Od?Dd:Od,n)},t}function nl(e,t,n){var r=Sl(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var a=e.get(r,Rd);return a===Rd?i:t.call(n,a,r,e)},r.__iterateUncached=function(r,i){var a=this;return e.__iterate(function(e,i,o){return r(t.call(n,e,i,o),i,a)!==!1},i)},r.__iteratorUncached=function(r,i){var a=e.__iterator(kd,i);return new Nd(function(){var i=a.next();if(i.done)return i;var o=i.value,s=o[0];return pc(r,s,t.call(n,o[1],s,e),i)})},r}function rl(e,t){var n=Sl(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=tl(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=Cl,n.__iterate=function(n,r){var i=this,a=0;return r&&wc(e),e.__iterate(function(e,o){return n(e,t?o:r?i.size-++a:a++,i)},!r)},n.__iterator=function(r,i){var a=0;i&&wc(e);var o=e.__iterator(kd,!i);return new Nd(function(){var e=o.next();if(e.done)return e;var s=e.value;return pc(r,t?s[0]:i?n.size-++a:a++,s[1],e)})},n}function il(e,t,n,r){var i=Sl(e);return r&&(i.has=function(r){var i=e.get(r,Rd);return i!==Rd&&!!t.call(n,i,r,e)},i.get=function(r,i){var a=e.get(r,Rd);return a!==Rd&&t.call(n,a,r,e)?a:i}),i.__iterateUncached=function(i,a){var o=this,s=0;return e.__iterate(function(e,a,c){if(t.call(n,e,a,c))return s++,i(e,r?a:s-1,o)},a),s},i.__iteratorUncached=function(i,a){var o=e.__iterator(kd,a),s=0;return new Nd(function(){for(;;){var a=o.next();if(a.done)return a;var c=a.value,l=c[0],u=c[1];if(t.call(n,u,l,e))return pc(i,r?l:s++,u,a)}})},i}function al(e,t,n){var r=yf().asMutable();return e.__iterate(function(i,a){r.update(t.call(n,i,a,e),0,function(e){return e+1})}),r.asImmutable()}function ol(e,t,n){var r=uc(e),i=(Pc(e)?Rf():yf()).asMutable();e.__iterate(function(a,o){i.update(t.call(n,a,o,e),function(e){return e||=[],e.push(r?[o,a]:a),e})});var a=xl(e);return i.map(function(t){return yl(e,a(t))}).asImmutable()}function sl(e,t,n){var r=uc(e),i=[[],[]];e.__iterate(function(a,o){i[+!!t.call(n,a,o,e)].push(r?[o,a]:a)});var a=xl(e);return i.map(function(t){return yl(e,a(t))})}function cl(e,t,n,r){var i=e.size;if(Dc(t,n,i))return e;if(i===void 0&&(t<0||n<0))return cl(e.toSeq().cacheResult(),t,n,r);var a=Oc(t,i),o=kc(n,i)-a,s;o===o&&(s=o<0?0:o);var c=Sl(e);return c.size=s===0?s:e.size&&s||void 0,!r&&Fc(e)&&s>=0&&(c.get=function(t,n){return t=Tc(this,t),t>=0&&t<s?e.get(t+a,n):n}),c.__iterateUncached=function(t,n){var i=this;if(s===0)return 0;if(n)return this.cacheResult().__iterate(t,n);var o=0,c=!0,l=0;return e.__iterate(function(e,n){if(!(c&&=o++<a))return l++,t(e,r?n:l-1,i)!==!1&&l!==s}),l},c.__iteratorUncached=function(t,n){if(s!==0&&n)return this.cacheResult().__iterator(t,n);if(s===0)return new Nd(mc);var i=e.__iterator(t,n),o=0,c=0;return new Nd(function(){for(;o++<a;)i.next();if(++c>s)return mc();var e=i.next();return r||t===Od||e.done?e:t===Dd?pc(t,c-1,void 0,e):pc(t,c-1,e.value[1],e)})},c}function ll(e,t,n){var r=Sl(e);return r.__iterateUncached=function(r,i){var a=this;if(i)return this.cacheResult().__iterate(r,i);var o=0;return e.__iterate(function(e,i,s){return t.call(n,e,i,s)&&++o&&r(e,i,a)}),o},r.__iteratorUncached=function(r,i){var a=this;if(i)return this.cacheResult().__iterator(r,i);var o=e.__iterator(kd,i),s=!0;return new Nd(function(){if(!s)return mc();var e=o.next();if(e.done)return e;var i=e.value,c=i[0],l=i[1];return t.call(n,l,c,a)?r===kd?e:pc(r,c,l,e):(s=!1,mc())})},r}function ul(e,t,n,r){var i=Sl(e);return i.__iterateUncached=function(i,a){var o=this;if(a)return this.cacheResult().__iterate(i,a);var s=!0,c=0;return e.__iterate(function(e,a,l){if(!(s&&=t.call(n,e,a,l)))return c++,i(e,r?a:c-1,o)}),c},i.__iteratorUncached=function(i,a){var o=this;if(a)return this.cacheResult().__iterator(i,a);var s=e.__iterator(kd,a),c=!0,l=0;return new Nd(function(){var e,a,u;do{if(e=s.next(),e.done)return r||i===Od?e:i===Dd?pc(i,l++,void 0,e):pc(i,l++,e.value[1],e);var d=e.value;a=d[0],u=d[1],c&&=t.call(n,u,a,o)}while(c);return i===kd?e:pc(i,a,u,e)})},i}function dl(e,t){var n=uc(e),r=[e].concat(t).map(function(e){return fc(e)?n&&(e=wd(e)):e=n?Rc(e):zc(Array.isArray(e)?e:[e]),e}).filter(function(e){return e.size!==0});if(r.length===0)return e;if(r.length===1){var i=r[0];if(i===e||n&&uc(i)||lc(e)&&lc(i))return i}return new gf(r)}function fl(e,t,n){var r=Sl(e);return r.__iterateUncached=function(i,a){if(a)return this.cacheResult().__iterate(i,a);var o=0,s=!1;function c(e,l){e.__iterate(function(e,a){return(!t||l<t)&&fc(e)?c(e,l+1):(o++,i(e,n?a:o-1,r)===!1&&(s=!0)),!s},a)}return c(e,0),o},r.__iteratorUncached=function(r,i){if(i)return this.cacheResult().__iterator(r,i);var a=e.__iterator(r,i),o=[],s=0;return new Nd(function(){for(;a;){var e=a.next();if(e.done!==!1){a=o.pop();continue}var c=e.value;if(r===kd&&(c=c[1]),(!t||o.length<t)&&fc(c))o.push(a),a=c.__iterator(r,i);else return n?e:pc(r,s++,c,e)}return mc()})},r}function pl(e,t,n){var r=xl(e);return e.toSeq().map(function(i,a){return r(t.call(n,i,a,e))}).flatten(!0)}function ml(e,t){var n=Sl(e);return n.size=e.size&&e.size*2-1,n.__iterateUncached=function(n,r){var i=this,a=0;return e.__iterate(function(e){return(!a||n(t,a++,i)!==!1)&&n(e,a++,i)!==!1},r),a},n.__iteratorUncached=function(n,r){var i=e.__iterator(Od,r),a=0,o;return new Nd(function(){return(!o||a%2)&&(o=i.next(),o.done)?o:a%2?pc(n,a++,t):pc(n,a++,o.value,o)})},n}function hl(e,t,n){t||=wl;var r=uc(e),i=0,a=e.toSeq().map(function(t,r){return[r,t,i++,n?n(t,r,e):t]}).valueSeq().toArray();return a.sort(function(e,n){return t(e[3],n[3])||e[2]-n[2]}).forEach(r?function(e,t){a[t].length=2}:function(e,t){a[t]=e[1]}),r?Wd(a):lc(e)?Gd(a):Kd(a)}function gl(e,t,n){if(t||=wl,n){var r=e.toSeq().map(function(t,r){return[t,n(t,r,e)]}).reduce(function(e,n){return _l(t,e[1],n[1])?n:e});return r&&r[0]}return e.reduce(function(e,n){return _l(t,e,n)?n:e})}function _l(e,t,n){var r=e(n,t);return r===0&&n!==t&&(n==null||n!==n)||r>0}function vl(e,t,n,r){var i=Sl(e),a=new qd(n).map(function(e){return e.size});return i.size=r?a.max():a.min(),i.__iterate=function(e,t){for(var n=this.__iterator(Od,t),r,i=0;!(r=n.next()).done&&e(r.value,i++,this)!==!1;);return i},i.__iteratorUncached=function(e,i){var a=n.map(function(e){return e=Cd(e),_c(i?e.reverse():e)}),o=0,s=!1;return new Nd(function(){var n;return s||=(n=a.map(function(e){return e.next()}),r?n.every(function(e){return e.done}):n.some(function(e){return e.done})),s?mc():pc(e,o++,t.apply(null,n.map(function(e){return e.value})))})},i}function yl(e,t){return e===t?e:Fc(e)?t:e.constructor(t)}function bl(e){if(e!==Object(e))throw TypeError(`Expected [K, V] tuple: `+e)}function xl(e){return uc(e)?wd:lc(e)?Td:Ed}function Sl(e){return Object.create((uc(e)?Wd:lc(e)?Gd:Kd).prototype)}function Cl(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Ud.prototype.cacheResult.call(this)}function wl(e,t){return e===void 0&&t===void 0?0:e===void 0?1:t===void 0?-1:e>t?1:e<t?-1:0}function Tl(e){return!!(e&&typeof e.equals==`function`&&typeof e.hashCode==`function`)}function El(e,t){if(e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1;if(typeof e.valueOf==`function`&&typeof t.valueOf==`function`){if(e=e.valueOf(),t=t.valueOf(),e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1}return!!(Tl(e)&&Tl(t)&&e.equals(t))}function Dl(e,t,n,r){return vu(e,[t],n,r)}function Ol(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Al(this,e)}function kl(e){for(var t=[],n=arguments.length-1;n-->0;)t[n]=arguments[n+1];if(typeof e!=`function`)throw TypeError(`Invalid merger function: `+e);return Al(this,t,e)}function Al(e,t,n){for(var r=[],i=0;i<t.length;i++){var a=wd(t[i]);a.size!==0&&r.push(a)}return r.length===0?e:e.toSeq().size===0&&!e.__ownerID&&r.length===1?Mc(e)?e:e.constructor(r[0]):e.withMutations(function(e){for(var t=n?function(t,r){Dl(e,r,Rd,function(e){return e===Rd?t:n(e,t,r)})}:function(t,n){e.set(n,t)},i=0;i<r.length;i++)r[i].forEach(t)})}function jl(e){if(!e||typeof e!=`object`||_f.call(e)!==`[object Object]`)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var n=t,r=Object.getPrototypeOf(t);r!==null;)n=r,r=Object.getPrototypeOf(n);return n===t}function Ml(e){return typeof e==`object`&&(Nc(e)||Array.isArray(e)||jl(e))}function Nl(e){return typeof e==`string`&&(e===`__proto__`||e===`constructor`)}function Pl(e,t){t||=0;for(var n=Math.max(0,e.length-t),r=Array(n),i=0;i<n;i++)r[i]=e[i+t];return r}function Fl(e){if(Array.isArray(e))return Pl(e);var t={};for(var n in e)Nl(n)||Hd.call(e,n)&&(t[n]=e[n]);return t}function Il(e,t,n){return Ll(e,t,Rl(n))}function Ll(e,t,n){if(!Ml(e))throw TypeError(`Cannot merge into non-data-structure value: `+e);if(Nc(e))return typeof n==`function`&&e.mergeWith?e.mergeWith.apply(e,[n].concat(t)):e.merge?e.merge.apply(e,t):e.concat.apply(e,t);for(var r=Array.isArray(e),i=e,a=r?Td:wd,o=r?function(t){i===e&&(i=Fl(i)),i.push(t)}:function(t,r){if(!Nl(r)){var a=Hd.call(i,r),o=a&&n?n(i[r],t,r):t;(!a||o!==i[r])&&(i===e&&(i=Fl(i)),i[r]=o)}},s=0;s<t.length;s++)a(t[s]).forEach(o);return i}function Rl(e){function t(n,r,i){return Ml(n)&&Ml(r)&&zl(n,r)?Ll(n,[r],t):e?e(n,r,i):r}return t}function zl(e,t){var n=Ud(e),r=Ud(t);return lc(n)===lc(r)&&uc(n)===uc(r)}function Bl(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Il(this,e)}function Vl(e){for(var t=[],n=arguments.length-1;n-->0;)t[n]=arguments[n+1];return Il(this,t,e)}function Hl(e){for(var t=[],n=arguments.length-1;n-->0;)t[n]=arguments[n+1];return vu(this,e,nu(),function(e){return Il(e,t)})}function Ul(e){for(var t=[],n=arguments.length-1;n-->0;)t[n]=arguments[n+1];return vu(this,e,nu(),function(e){return Ll(e,t)})}function Wl(e,t,n){return vu(e,t,Rd,function(){return n})}function Gl(e,t){return Wl(this,e,t)}function Kl(e,t,n){return arguments.length===1?e(this):Dl(this,e,t,n)}function ql(e,t,n){return vu(this,e,t,n)}function Jl(){return this.__altered}function Yl(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}function Xl(e){return!!(e&&e[vf])}function Zl(e,t){if(!e)throw Error(t)}function Ql(e){Zl(e!==1/0,`Cannot perform this action with an infinite size.`)}function $l(e,t){return pc(e,t[0],t[1])}function eu(e,t){return{node:e,index:0,__prev:t}}function tu(e,t,n,r){var i=Object.create(bf);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function nu(){return Df||=tu(0)}function ru(e,t,n){var r,i;if(e._root){var a=xc(),o=xc();if(r=iu(e._root,e.__ownerID,0,void 0,t,n,a,o),!o.value)return e;i=e.size+(a.value?n===Rd?-1:1:0)}else{if(n===Rd)return e;i=1,r=new xf(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?tu(i,r):nu()}function iu(e,t,n,r,i,a,o,s){return e?e.update(t,n,r,i,a,o,s):a===Rd?e:(Sc(s),Sc(o),new Tf(t,r,[i,a]))}function au(e){return e.constructor===Tf||e.constructor===wf}function ou(e,t,n,r,i){if(e.keyHash===r)return new wf(t,r,[e.entry,i]);var a=(n===0?e.keyHash:e.keyHash>>>n)&Ld,o=(n===0?r:r>>>n)&Ld,s,c=a===o?[ou(e,t,n+Fd,r,i)]:(s=new Tf(t,r,i),a<o?[e,s]:[s,e]);return new Sf(t,1<<a|1<<o,c)}function su(e,t,n,r){e||=new Cc;for(var i=new Tf(e,Gc(n),[n,r]),a=0;a<t.length;a++){var o=t[a];i=i.update(e,0,void 0,o[0],o[1])}return i}function uee(e,t,n,r){for(var i=0,a=0,o=Array(n),s=0,c=1,l=t.length;s<l;s++,c<<=1){var u=t[s];u!==void 0&&s!==r&&(i|=c,o[a++]=u)}return new Sf(e,i,o)}function cu(e,t,n,r,i){for(var a=0,o=Array(Id),s=0;n!==0;s++,n>>>=1)o[s]=n&1?t[a++]:void 0;return o[r]=i,new Cf(e,a+1,o)}function lu(e){return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),e=e+(e>>4)&252645135,e+=e>>8,e+=e>>16,e&127}function uu(e,t,n,r){var i=r?e:Pl(e);return i[t]=n,i}function du(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var a=Array(i),o=0,s=0;s<i;s++)s===t?(a[s]=n,o=-1):a[s]=e[s+o];return a}function fu(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var i=Array(r),a=0,o=0;o<r;o++)o===t&&(a=1),i[o]=e[o+a];return i}function pu(e){if(Ic(e)&&typeof e!=`string`)return e;if(Pc(e))return e.toArray();throw TypeError(`Invalid keyPath: expected Ordered Collection or Array: `+e)}function mu(e){try{return typeof e==`string`?JSON.stringify(e):String(e)}catch{return JSON.stringify(e)}}function hu(e,t){return Nc(e)?e.has(t):Ml(e)&&Hd.call(e,t)}function gu(e,t,n){return Nc(e)?e.get(t,n):hu(e,t)?typeof e.get==`function`?e.get(t):e[t]:n}function _u(e,t){if(!Ml(e))throw TypeError(`Cannot update non-data-structure value: `+e);if(Nc(e)){if(!e.remove)throw TypeError(`Cannot update immutable value without .remove() method: `+e);return e.remove(t)}if(!Hd.call(e,t))return e;var n=Fl(e);return Array.isArray(n)?n.splice(t,1):delete n[t],n}function dee(e,t,n){if(Nl(t))return e;if(!Ml(e))throw TypeError(`Cannot update non-data-structure value: `+e);if(Nc(e)){if(!e.set)throw TypeError(`Cannot update immutable value without .set() method: `+e);return e.set(t,n)}if(Hd.call(e,t)&&n===e[t])return e;var r=Fl(e);return r[t]=n,r}function vu(e,t,n,r){r||(r=n,n=void 0);var i=yu(Nc(e),e,pu(t),0,n,r);return i===Rd?n:i}function yu(e,t,n,r,i,a){var o=t===Rd;if(r===n.length){var s=o?i:t,c=a(s);return c===s?t:c}if(!o&&!Ml(t))throw TypeError(`Cannot update within non-data-structure value in path [`+Array.from(n).slice(0,r).map(mu)+`]: `+t);var l=n[r],u=o?Rd:gu(t,l,Rd),d=yu(u===Rd?e:Nc(u),u,n,r+1,i,a);return d===u?t:d===Rd?_u(t,l):dee(o?e?nu():{}:t,l,d)}function bu(e,t){return vu(e,t,function(){return Rd})}function xu(e){return bu(this,e)}function Su(e){return!!(e&&e[Mf])}function Cu(e,t){var n=e._origin,r=e._capacity,i=Mu(r),a=e._tail;return o(e._root,e._level,0);function o(e,t,n){return t===0?s(e,n):c(e,t,n)}function s(e,o){var s=o===i?a&&a.array:e&&e.array,c=o>n?0:n-o,l=r-o;return l>Id&&(l=Id),function(){if(c===l)return If;var e=t?--l:c++;return s&&s[e]}}function c(e,i,a){var s,c=e&&e.array,l=a>n?0:n-a>>i,u=(r-a>>i)+1;return u>Id&&(u=Id),function(){for(;;){if(s){var e=s();if(e!==If)return e;s=null}if(l===u)return If;var n=t?--u:l++;s=o(c&&c[n],i-Fd,a+(n<<i))}}}}function wu(e,t,n,r,i,a,o){var s=Object.create(Pf);return s.size=t-e,s._origin=e,s._capacity=t,s._level=n,s._root=r,s._tail=i,s.__ownerID=a,s.__hash=o,s.__altered=!1,s}function Tu(){return wu(0,0,Fd)}function Eu(e,t,n){if(t=Tc(e,t),t!==t)return e;if(t>=e.size||t<0)return e.withMutations(function(e){t<0?ju(e,t).set(0,n):ju(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,i=e._root,a=xc();return t>=Mu(e._capacity)?r=Du(r,e.__ownerID,0,t,n,a):i=Du(i,e.__ownerID,e._level,t,n,a),a.value?e.__ownerID?(e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e):wu(e._origin,e._capacity,e._level,i,r):e}function Du(e,t,n,r,i,a){var o=r>>>n&Ld,s=e&&o<e.array.length;if(!s&&i===void 0)return e;var c;if(n>0){var l=e&&e.array[o],u=Du(l,t,n-Fd,r,i,a);return u===l?e:(c=Ou(e,t),c.array[o]=u,c)}return s&&e.array[o]===i?e:(a&&Sc(a),c=Ou(e,t),i===void 0&&o===c.array.length-1?c.array.pop():c.array[o]=i,c)}function Ou(e,t){return t&&e&&t===e.ownerID?e:new Ff(e?e.array.slice():[],t)}function ku(e,t){if(t>=Mu(e._capacity))return e._tail;if(t<1<<e._level+Fd){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&Ld],r-=Fd;return n}}function Au(e,t,n){var r=e._origin+(t===void 0?0:t),i=n===void 0?e._capacity:n<0?e._capacity+n:e._origin+n;if(Number.isFinite(i)&&i>Lf||Number.isFinite(r)&&r<-Lf||Number.isFinite(i)&&Number.isFinite(r)&&i-r>Lf)throw RangeError(`Invalid List size: a List cannot hold more than `+Lf+` (2 ** 30) values.`)}function ju(e,t,n){Au(e,t,n),t!==void 0&&(t|=0),n!==void 0&&(n|=0);var r=e.__ownerID||new Cc,i=e._origin,a=e._capacity,o=i+t,s=n===void 0?a:n<0?a+n:i+n;if(o===i&&s===a)return e;if(o>=s)return e.clear();for(var c=e._level,l=e._root,u=0;o+u<0;)l=new Ff(l&&l.array.length?[void 0,l]:[],r),c+=Fd,u+=Nu(c);u&&(o+=u,i+=u,s+=u,a+=u);for(var d=Mu(a),f=Mu(s);f>=Nu(c+Fd);)l=new Ff(l&&l.array.length?[l]:[],r),c+=Fd;var p=e._tail,m=f<d?ku(e,s-1):f>d?new Ff([],r):p;if(p&&f>d&&o<a&&p.array.length){l=Ou(l,r);for(var h=l,g=c;g>Fd;g-=Fd){var _=d>>>g&Ld;h=h.array[_]=Ou(h.array[_],r)}h.array[d>>>Fd&Ld]=p}if(s<a&&(m&&=m.removeAfter(r,0,s)),o>=f)o-=f,s-=f,c=Fd,l=void 0,m&&=m.removeBefore(r,0,o);else if(o>i||f<d){for(u=0;l;){var v=o>>>c&Ld;if(v!==f>>>c&Ld)break;v&&(u+=(1<<c)*v),c-=Fd,l=l.array[v]}l&&o>i&&(l=l.removeBefore(r,c,o-u)),l&&f<d&&(l=l.removeAfter(r,c,f-u)),u&&(o-=u,s-=u)}return e.__ownerID?(e.size=s-o,e._origin=o,e._capacity=s,e._level=c,e._root=l,e._tail=m,e.__hash=void 0,e.__altered=!0,e):wu(o,s,c,l,m)}function Mu(e){return e<Id?0:e-1>>>Fd<<Fd}function Nu(e){return e<31?1<<e:2**e}function Pu(e){return Xl(e)&&Pc(e)}function Fu(e,t,n,r){var i=Object.create(Rf.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Iu(){return zf||=Fu(nu(),Tu())}function Lu(e,t,n){var r=e._map,i=e._list,a=r.get(t),o=a!==void 0,s,c;if(n===Rd){if(!o)return e;i.size>=Id&&i.size>=r.size*2?(c=i.filter(function(e,t){return e!==void 0&&a!==t}),s=c.toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(s.__ownerID=c.__ownerID=e.__ownerID)):(s=r.remove(t),c=a===i.size-1?i.pop():i.set(a,void 0))}else if(o){if(n===i.get(a)[1])return e;s=r,c=i.set(a,[t,n])}else s=r.set(t,i.size),c=i.set(i.size,[t,n]);return e.__ownerID?(e.size=s.size,e._map=s,e._list=c,e.__hash=void 0,e.__altered=!0,e):Fu(s,c)}function Ru(e){return!!(e&&e[Bf])}function zu(e,t,n,r){var i=Object.create(Hf);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Bu(){return Uf||=zu(0)}function Vu(e,t,n,r,i,a){return Ql(e.size),e.__iterate(function(e,a,o){i?(i=!1,n=e):n=t.call(r,n,e,a,o)},a),n}function Hu(e,t){return t}function Uu(e,t){return[t,e]}function Wu(e){return function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return!e.apply(this,t)}}function Gu(e){return function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return-e.apply(this,t)}}function Ku(e,t){return e<t?1:e>t?-1:0}function qu(e,t){if(e===t)return!0;if(!fc(t)||e.size!==void 0&&t.size!==void 0&&e.size!==t.size||e.__hash!==void 0&&t.__hash!==void 0&&e.__hash!==t.__hash||uc(e)!==uc(t)||lc(e)!==lc(t)||Pc(e)!==Pc(t))return!1;if(e.size===0&&t.size===0)return!0;var n=!dc(e);if(Pc(e)){var r=e.entries();return t.every(function(e,t){var i=r.next().value;return i&&El(i[1],e)&&(n||El(i[0],t))})&&r.next().done}var i=!1;if(e.size===void 0)if(t.size===void 0)typeof e.cacheResult==`function`&&e.cacheResult();else{i=!0;var a=e;e=t,t=a}var o=!0,s=t.__iterate(function(t,r){if(n?!e.has(t):i?!El(t,e.get(r,Rd)):!El(e.get(r,Rd),t))return o=!1,!1});return o&&e.size===s}function Ju(e){return!!(e&&e[Kf])}function Yu(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:t.size===0?e.__empty():e.__make(t)}function Xu(e,t){var n=Object.create(Jf);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Zu(){return Yf||=Xu(nu())}function Qu(e,t,n){for(var r=pu(t),i=0;i!==r.length;)if(e=gu(e,r[i++],Rd),e===Rd)return n;return e}function $u(e,t){return Qu(this,e,t)}function ed(e,t){return Qu(e,t,Rd)!==Rd}function td(e){return ed(this,e)}function nd(){Ql(this.size);var e={};return this.__iterate(function(t,n){Nl(n)||(e[n]=t)}),e}function rd(e){if(!e||typeof e!=`object`)return e;if(!fc(e)){if(!Ml(e))return e;e=Ud(e)}if(uc(e)){var t={};return e.__iterate(function(e,n){Nl(n)||(t[n]=rd(e))}),t}var n=[];return e.__iterate(function(e){n.push(rd(e))}),n}function id(e){if(e.size===1/0)return 0;var t=Pc(e),n=uc(e),r=+!!t;return e.__iterate(n?t?function(e,t){r=31*r+od(Gc(e),Gc(t))|0}:function(e,t){r=r+od(Gc(e),Gc(t))|0}:t?function(e){r=31*r+Gc(e)|0}:function(e){r=r+Gc(e)|0}),ad(e.size,r)}function ad(e,t){return t=Zd(t,3432918353),t=Zd(t<<15|t>>>-15,461845907),t=Zd(t<<13|t>>>-13,5),t=(t+3864292196|0)^e,t=Zd(t^t>>>16,2246822507),t=Zd(t^t>>>13,3266489909),t=Wc(t^t>>>16),t}function od(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}function sd(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}function cd(){return Pl(arguments)}function ld(e){return Ju(e)&&Pc(e)}function ud(e,t){var n=Object.create(tp);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function dd(){return np||=ud(Iu())}function fd(e){if(Mc(e))throw Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(Nc(e))throw Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(typeof e!=`object`||!e)throw Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}function pd(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._values=t,r.__ownerID=n,r}function md(e){return e.constructor.displayName||e.constructor.name||`Record`}function hd(e){return Rc(e._keys.map(function(t){return[t,e.get(t)]}))}function gd(e,t){try{Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){Zl(this.__ownerID,`Cannot set on an immutable record.`),this.set(t,e)}})}catch{}}function _d(e,t){return vd([],t||yd,e,``,t&&t.length>2?[]:void 0,{"":e})}function vd(e,t,n,r,i,a){if(typeof n!=`string`&&!Nc(n)&&(Ic(n)||hc(n)||jl(n))){if(~e.indexOf(n))throw TypeError(`Cannot convert circular structure to Immutable`);e.push(n),i&&r!==``&&i.push(r);var o=t.call(a,r,Ud(n).map(function(r,a){return vd(e,t,r,a,i,n)}),i&&i.slice());return e.pop(),i&&i.pop(),o}return n}function yd(e,t){return lc(t)?t.toList():uc(t)?t.toMap():t.toSet()}var bd,xd,Sd,Cd,wd,Td,Ed,Dd,Od,kd,Ad,jd,Md,Nd,Pd,Fd,Id,Ld,Rd,zd,Bd,Vd,Hd,Ud,Wd,Gd,Kd,qd,Jd,Yd,Xd,Zd,Qd,$d,ef,tf,nf,rf,af,of,sf,cf,lf,uf,df,ff,pf,mf,hf,gf,_f,vf,yf,bf,xf,Sf,Cf,wf,Tf,Ef,Df,Of,kf,Af,jf,Mf,Nf,Pf,Ff,If,Lf,Rf,zf,Bf,Vf,Hf,Uf,Wf,Gf,Kf,qf,Jf,Yf,Xf,Zf,Qf,$f,ep,tp,np,rp,ip,ap=o((()=>{bd=`@@__IMMUTABLE_INDEXED__@@`,xd=`@@__IMMUTABLE_KEYED__@@`,Sd=`@@__IMMUTABLE_ITERABLE__@@`,Cd=function(e){return fc(e)?e:Ud(e)},wd=function(e){function t(e){return uc(e)?e:Wd(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Cd),Td=function(e){function t(e){return lc(e)?e:Gd(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Cd),Ed=function(e){function t(e){return fc(e)&&!dc(e)?e:Kd(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Cd),Cd.Keyed=wd,Cd.Indexed=Td,Cd.Set=Ed,Dd=0,Od=1,kd=2,Ad=typeof Symbol==`function`&&Symbol.iterator,jd=`@@iterator`,Md=Ad||jd,Nd=function(e){this.next=e},Nd.prototype.toString=function(){return`[Iterator]`},Nd.KEYS=Dd,Nd.VALUES=Od,Nd.ENTRIES=kd,Nd.prototype.inspect=Nd.prototype.toSource=function(){return this.toString()},Nd.prototype[Md]=function(){return this},Pd=`delete`,Fd=5,Id=1<<Fd,Ld=Id-1,Rd={},zd=`@@__IMMUTABLE_RECORD__@@`,Bd=`@@__IMMUTABLE_ORDERED__@@`,Vd=`@@__IMMUTABLE_SEQ__@@`,Hd=Object.prototype.hasOwnProperty,Ud=function(e){function t(e){return e==null?Lc():Nc(e)?e.toSeq():Bc(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString(`Seq {`,`}`)},t.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},t.prototype.__iterate=function(e,t){var n=this._cache;if(n){for(var r=n.length,i=0;i!==r;){var a=n[t?r-++i:i++];if(e(a[1],a[0],this)===!1)break}return i}return this.__iterateUncached(e,t)},t.prototype.__iterator=function(e,t){var n=this._cache;if(n){var r=n.length,i=0;return new Nd(function(){if(i===r)return mc();var a=n[t?r-++i:i++];return pc(e,a[0],a[1])})}return this.__iteratorUncached(e,t)},t}(Cd),Wd=function(e){function t(e){return e==null?Lc().toKeyedSeq():fc(e)?uc(e)?e.toSeq():e.fromEntrySeq():Mc(e)?e.toSeq():Rc(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toKeyedSeq=function(){return this},t}(Ud),Gd=function(e){function t(e){return e==null?Lc():fc(e)?uc(e)?e.entrySeq():e.toIndexedSeq():Mc(e)?e.toSeq().entrySeq():zc(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toIndexedSeq=function(){return this},t.prototype.toString=function(){return this.__toString(`Seq [`,`]`)},t}(Ud),Kd=function(e){function t(e){return(fc(e)&&!dc(e)?e:Gd(e)).toSetSeq()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toSetSeq=function(){return this},t}(Ud),Ud.isSeq=Fc,Ud.Keyed=Wd,Ud.Set=Kd,Ud.Indexed=Gd,Ud.prototype[Vd]=!0,qd=function(e){function t(e){this._array=e,this.size=e.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this.has(e)?this._array[Tc(this,e)]:t},t.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length,i=0;i!==r;){var a=t?r-++i:i++;if(e(n[a],a,this)===!1)break}return i},t.prototype.__iterator=function(e,t){var n=this._array,r=n.length,i=0;return new Nd(function(){if(i===r)return mc();var a=t?r-++i:i++;return pc(e,a,n[a])})},t}(Gd),Jd=function(e){function t(e){var t=Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[]);this._object=e,this._keys=t,this.size=t.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return t!==void 0&&!this.has(e)?t:this._object[e]},t.prototype.has=function(e){return Hd.call(this._object,e)},t.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length,a=0;a!==i;){var o=r[t?i-++a:a++];if(e(n[o],o,this)===!1)break}return a},t.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length,a=0;return new Nd(function(){if(a===i)return mc();var o=r[t?i-++a:a++];return pc(e,o,n[o])})},t}(Wd),Jd.prototype[Bd]=!0,Yd=function(e){function t(e){this._collection=e,this.size=e.length||e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=this._collection,r=_c(n),i=0;if(gc(r))for(var a;!(a=r.next()).done&&e(a.value,i++,this)!==!1;);return i},t.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._collection,r=_c(n);if(!gc(r))return new Nd(mc);var i=0;return new Nd(function(){var t=r.next();return t.done?t:pc(e,i++,t.value)})},t}(Gd),Zd=typeof Math.imul==`function`?Math.imul:function(e,t){e|=0,t|=0;var n=e&65535,r=t&65535;return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0},Qd=Object.prototype.valueOf,$d=(Math.random()*1048576|1)%1048576||40503,ef=Object.isExtensible,tf=(function(){try{return Object.defineProperty({},"@",{}),!0}catch{return!1}})(),nf=typeof WeakMap==`function`,nf&&(rf=new WeakMap),af=Object.create(null),of=0,sf=`__immutablehash__`,typeof Symbol==`function`&&(sf=Symbol(sf)),cf=16,lf=255,uf=0,df={},ff=function(e){function t(e,t){this._iter=e,this._useKeys=t,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this._iter.get(e,t)},t.prototype.has=function(e){return this._iter.has(e)},t.prototype.valueSeq=function(){return this._iter.valueSeq()},t.prototype.reverse=function(){var e=this,t=rl(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},t.prototype.map=function(e,t){var n=this,r=nl(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t,r){return e(t,r,n)},t)},t.prototype.__iterator=function(e,t){return this._iter.__iterator(e,t)},t}(Wd),ff.prototype[Bd]=!0,pf=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.includes=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var n=this,r=0;return t&&wc(this),this._iter.__iterate(function(i){return e(i,t?n.size-++r:r++,n)},t)},t.prototype.__iterator=function(e,t){var n=this,r=this._iter.__iterator(Od,t),i=0;return t&&wc(this),new Nd(function(){var a=r.next();return a.done?a:pc(e,t?n.size-++i:i++,a.value,a)})},t}(Gd),mf=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.has=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},t.prototype.__iterator=function(e,t){var n=this._iter.__iterator(Od,t);return new Nd(function(){var t=n.next();return t.done?t:pc(e,t.value,t.value,t)})},t}(Kd),hf=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.entrySeq=function(){return this._iter.toSeq()},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){bl(t);var r=fc(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},t.prototype.__iterator=function(e,t){var n=this._iter.__iterator(Od,t);return new Nd(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){bl(r);var i=fc(r);return pc(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}})},t}(Wd),pf.prototype.cacheResult=ff.prototype.cacheResult=mf.prototype.cacheResult=hf.prototype.cacheResult=Cl,gf=function(e){function t(e){this._wrappedIterables=e.flatMap(function(e){return e._wrappedIterables?e._wrappedIterables:[e]}),this.size=this._wrappedIterables.reduce(function(e,t){if(e!==void 0){var n=t.size;if(n!==void 0)return e+n}},0),this[xd]=this._wrappedIterables[0][xd],this[bd]=this._wrappedIterables[0][bd],this[Bd]=this._wrappedIterables[0][Bd]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(this._wrappedIterables.length!==0){if(t)return this.cacheResult().__iterate(e,t);for(var n=0,r=uc(this),i=r?kd:Od,a=this._wrappedIterables[n].__iterator(i,t),o=!0,s=0;o;){for(var c=a.next();c.done;){if(n++,n===this._wrappedIterables.length)return s;a=this._wrappedIterables[n].__iterator(i,t),c=a.next()}o=(r?e(c.value[1],c.value[0],this):e(c.value,s,this))!==!1,s++}return s}},t.prototype.__iteratorUncached=function(e,t){var n=this;if(this._wrappedIterables.length===0)return new Nd(mc);if(t)return this.cacheResult().__iterator(e,t);var r=0,i=this._wrappedIterables[r].__iterator(e,t);return new Nd(function(){for(var a=i.next();a.done;){if(r++,r===n._wrappedIterables.length)return a;i=n._wrappedIterables[r].__iterator(e,t),a=i.next()}return a})},t}(Ud),_f=Object.prototype.toString,vf=`@@__IMMUTABLE_MAP__@@`,yf=function(e){function t(t){return t==null?nu():Xl(t)&&!Pc(t)?t:nu().withMutations(function(n){var r=e(t);Ql(r.size),r.forEach(function(e,t){return n.set(t,e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.__toString(`Map {`,`}`)},t.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},t.prototype.set=function(e,t){return ru(this,e,t)},t.prototype.remove=function(e){return ru(this,e,Rd)},t.prototype.deleteAll=function(e){var t=Cd(e);return t.size===0?this:this.withMutations(function(e){t.forEach(function(t){return e.remove(t)})})},t.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):nu()},t.prototype.sort=function(e){return Rf(hl(this,e))},t.prototype.sortBy=function(e,t){return Rf(hl(this,t,e))},t.prototype.map=function(e,t){var n=this;return this.withMutations(function(r){r.forEach(function(i,a){r.set(a,e.call(t,i,a,n))})})},t.prototype.__iterator=function(e,t){return new Ef(this,e,t)},t.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?tu(this.size,this._root,e,this.__hash):this.size===0?nu():(this.__ownerID=e,this.__altered=!1,this)},t}(wd),yf.isMap=Xl,bf=yf.prototype,bf[vf]=!0,bf[Pd]=bf.remove,bf.removeAll=bf.deleteAll,bf.setIn=Gl,bf.removeIn=bf.deleteIn=xu,bf.update=Kl,bf.updateIn=ql,bf.merge=bf.concat=Ol,bf.mergeWith=kl,bf.mergeDeep=Bl,bf.mergeDeepWith=Vl,bf.mergeIn=Ul,bf.mergeDeepIn=Hl,bf.withMutations=Yl,bf.wasAltered=Jl,bf.asImmutable=Hc,bf[`@@transducer/init`]=bf.asMutable=Uc,bf[`@@transducer/step`]=function(e,t){return e.set(t[0],t[1])},bf[`@@transducer/result`]=function(e){return e.asImmutable()},xf=function(e,t){this.ownerID=e,this.entries=t},xf.prototype.get=function(e,t,n,r){for(var i=this.entries,a=0,o=i.length;a<o;a++)if(El(n,i[a][0]))return i[a][1];return r},xf.prototype.update=function(e,t,n,r,i,a,o){for(var s=i===Rd,c=this.entries,l=0,u=c.length;l<u&&!El(r,c[l][0]);l++);var d=l<u;if(d?c[l][1]===i:s)return this;if(Sc(o),(s||!d)&&Sc(a),!(s&&c.length===1)){if(!d&&!s&&c.length>=Of)return su(e,c,r,i);var f=e&&e===this.ownerID,p=f?c:Pl(c);return d?s?l===u-1?p.pop():p[l]=p.pop():p[l]=[r,i]:p.push([r,i]),f?(this.entries=p,this):new xf(e,p)}},Sf=function(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n},Sf.prototype.get=function(e,t,n,r){t===void 0&&(t=Gc(n));var i=1<<((e===0?t:t>>>e)&Ld),a=this.bitmap;return(a&i)===0?r:this.nodes[lu(a&i-1)].get(e+Fd,t,n,r)},Sf.prototype.update=function(e,t,n,r,i,a,o){n===void 0&&(n=Gc(r));var s=(t===0?n:n>>>t)&Ld,c=1<<s,l=this.bitmap,u=(l&c)!==0;if(!u&&i===Rd)return this;var d=lu(l&c-1),f=this.nodes,p=u?f[d]:void 0,m=iu(p,e,t+Fd,n,r,i,a,o);if(m===p)return this;if(!u&&m&&f.length>=kf)return cu(e,f,l,s,m);if(u&&!m&&f.length===2&&au(f[d^1]))return f[d^1];if(u&&m&&f.length===1&&au(m))return m;var h=e&&e===this.ownerID,g=u?m?l:l^c:l|c,_=u?m?uu(f,d,m,h):fu(f,d,h):du(f,d,m,h);return h?(this.bitmap=g,this.nodes=_,this):new Sf(e,g,_)},Cf=function(e,t,n){this.ownerID=e,this.count=t,this.nodes=n},Cf.prototype.get=function(e,t,n,r){t===void 0&&(t=Gc(n));var i=(e===0?t:t>>>e)&Ld,a=this.nodes[i];return a?a.get(e+Fd,t,n,r):r},Cf.prototype.update=function(e,t,n,r,i,a,o){n===void 0&&(n=Gc(r));var s=(t===0?n:n>>>t)&Ld,c=i===Rd,l=this.nodes,u=l[s];if(c&&!u)return this;var d=iu(u,e,t+Fd,n,r,i,a,o);if(d===u)return this;var f=this.count;if(!u)f++;else if(!d&&(f--,f<Af))return uee(e,l,f,s);var p=e&&e===this.ownerID,m=uu(l,s,d,p);return p?(this.count=f,this.nodes=m,this):new Cf(e,f,m)},wf=function(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n,this._index=void 0},wf.prototype._positionOf=function(e,t){var n=this.entries,r=this._index;if(r===void 0&&t&&n.length>=jf&&(r=this._buildIndex()),r!==void 0){var i=r[Xc(e)];if(i!==void 0)for(var a=0;a<i.length;a++){var o=i[a];if(El(e,n[o][0]))return o}return-1}for(var s=0,c=n.length;s<c;s++)if(El(e,n[s][0]))return s;return-1},wf.prototype._buildIndex=function(){for(var e=Object.create(null),t=this.entries,n=0,r=t.length;n<r;n++){var i=Xc(t[n][0]),a=e[i];a===void 0?e[i]=[n]:a.push(n)}return this._index=e,e},wf.prototype.get=function(e,t,n,r){var i=this._positionOf(n,!0);return i===-1?r:this.entries[i][1]},wf.prototype.update=function(e,t,n,r,i,a,o){n===void 0&&(n=Gc(r));var s=i===Rd;if(n!==this.keyHash)return s?this:(Sc(o),Sc(a),ou(this,e,t,n,[r,i]));var c=this.entries,l=c.length,u=e&&e===this.ownerID,d=this._positionOf(r,u),f=d===-1?l:d,p=d!==-1;if(p?c[f][1]===i:s)return this;if(Sc(o),(s||!p)&&Sc(a),s&&l===2)return new Tf(e,this.keyHash,c[f^1]);var m=u?c:Pl(c);if(p)s?(f===l-1?m.pop():m[f]=m.pop(),u&&(this._index=void 0)):m[f]=[r,i];else if(m.push([r,i]),u&&this._index!==void 0){var h=Xc(r),g=this._index[h];g===void 0?this._index[h]=[l]:g.push(l)}return u?(this.entries=m,this):new wf(e,this.keyHash,m)},Tf=function(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n},Tf.prototype.get=function(e,t,n,r){return El(n,this.entry[0])?this.entry[1]:r},Tf.prototype.update=function(e,t,n,r,i,a,o){var s=i===Rd,c=El(r,this.entry[0]);if(c?i===this.entry[1]:s)return this;if(Sc(o),s){Sc(a);return}return c?e&&e===this.ownerID?(this.entry[1]=i,this):new Tf(e,this.keyHash,[r,i]):(Sc(a),ou(this,e,t,Gc(r),[r,i]))},xf.prototype.iterate=wf.prototype.iterate=function(e,t){for(var n=this.entries,r=0,i=n.length-1;r<=i;r++)if(e(n[t?i-r:r])===!1)return!1},Sf.prototype.iterate=Cf.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,i=n.length-1;r<=i;r++){var a=n[t?i-r:r];if(a&&a.iterate(e,t)===!1)return!1}},Tf.prototype.iterate=function(e,t){return e(this.entry)},Ef=function(e){function t(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&eu(e._root)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n=t.node,r=t.index++,i=void 0;if(n.entry){if(r===0)return $l(e,n.entry)}else if(n.entries){if(i=n.entries.length-1,r<=i)return $l(e,n.entries[this._reverse?i-r:r])}else if(i=n.nodes.length-1,r<=i){var a=n.nodes[this._reverse?i-r:r];if(a){if(a.entry)return $l(e,a.entry);t=this._stack=eu(a,t)}continue}t=this._stack=this._stack.__prev}return mc()},t}(Nd),Of=Id/4,kf=Id/2,Af=Id/4,jf=16,Mf=`@@__IMMUTABLE_LIST__@@`,Nf=function(e){function t(t){var n=Tu();if(t==null)return n;if(Su(t))return t;var r=e(t),i=r.size;return i===0?n:(Ql(i),i>0&&i<Id?wu(0,i,Fd,void 0,new Ff(r.toArray())):n.withMutations(function(e){e.setSize(i),r.forEach(function(t,n){return e.set(n,t)})}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString(`List [`,`]`)},t.prototype.get=function(e,t){if(e=Tc(this,e),e>=0&&e<this.size){e+=this._origin;var n=ku(this,e);return n&&n.array[e&Ld]}return t},t.prototype.set=function(e,t){return Eu(this,e,t)},t.prototype.remove=function(e){return this.has(e)?e===0?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},t.prototype.insert=function(e,t){return this.splice(e,0,t)},t.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=Fd,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):Tu()},t.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations(function(n){ju(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])})},t.prototype.pop=function(){return ju(this,0,-1)},t.prototype.unshift=function(){var e=arguments;return this.withMutations(function(t){ju(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])})},t.prototype.shift=function(){return ju(this,1)},t.prototype.shuffle=function(e){return e===void 0&&(e=Math.random),this.withMutations(function(t){for(var n=t.size,r,i;n;)r=Math.floor(e()*n--),i=t.get(r),t.set(r,t.get(n)),t.set(n,i)})},t.prototype.concat=function(){for(var t=arguments,n=[],r=0;r<arguments.length;r++){var i=t[r],a=e(typeof i!=`string`&&hc(i)?i:[i]);a.size!==0&&n.push(a)}return n.length===0?this:this.size===0&&!this.__ownerID&&n.length===1?this.constructor(n[0]):this.withMutations(function(e){n.forEach(function(t){return t.forEach(function(t){return e.push(t)})})})},t.prototype.setSize=function(e){return ju(this,0,e)},t.prototype.map=function(e,t){var n=this;return this.withMutations(function(r){for(var i=0;i<n.size;i++)r.set(i,e.call(t,r.get(i),i,n))})},t.prototype.slice=function(e,t){var n=this.size;return Dc(e,t,n)?this:ju(this,Oc(e,n),kc(t,n))},t.prototype.__iterator=function(e,t){var n=t?this.size:0,r=Cu(this,t);return new Nd(function(){var i=r();return i===If?mc():pc(e,t?--n:n++,i)})},t.prototype.__iterate=function(e,t){for(var n=t?this.size:0,r=Cu(this,t),i;(i=r())!==If&&e(i,t?--n:n++,this)!==!1;);return n},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?wu(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):this.size===0?Tu():(this.__ownerID=e,this.__altered=!1,this)},t}(Td),Nf.isList=Su,Pf=Nf.prototype,Pf[Mf]=!0,Pf[Pd]=Pf.remove,Pf.merge=Pf.concat,Pf.setIn=Gl,Pf.deleteIn=Pf.removeIn=xu,Pf.update=Kl,Pf.updateIn=ql,Pf.mergeIn=Ul,Pf.mergeDeepIn=Hl,Pf.withMutations=Yl,Pf.wasAltered=Jl,Pf.asImmutable=Hc,Pf[`@@transducer/init`]=Pf.asMutable=Uc,Pf[`@@transducer/step`]=function(e,t){return e.push(t)},Pf[`@@transducer/result`]=function(e){return e.asImmutable()},Ff=function(e,t){this.array=e,this.ownerID=t},Ff.prototype.removeBefore=function(e,t,n){if(!(n&(1<<t+Fd)-1)||this.array.length===0)return this;var r=n>>>t&Ld;if(r>=this.array.length)return new Ff([],e);var i=r===0,a;if(t>0){var o=this.array[r];if(a=o&&o.removeBefore(e,t-Fd,n),a===o&&i)return this}if(i&&!a)return this;var s=Ou(this,e);if(!i)for(var c=0;c<r;c++)s.array[c]=void 0;return a&&(s.array[r]=a),s},Ff.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t+Fd:Id)||this.array.length===0)return this;var r=n-1>>>t&Ld;if(r>=this.array.length)return this;var i;if(t>0){var a=this.array[r];if(i=a&&a.removeAfter(e,t-Fd,n),i===a&&r===this.array.length-1)return this}var o=Ou(this,e);return o.array.splice(r+1),i&&(o.array[r]=i),o},If={},Lf=2**30,Rf=function(e){function t(e){return e==null?Iu():Pu(e)?e:Iu().withMutations(function(t){var n=wd(e);Ql(n.size),n.forEach(function(e,n){return t.set(n,e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString(`OrderedMap {`,`}`)},t.prototype.get=function(e,t){var n=this._map.get(e);return n===void 0?t:this._list.get(n)[1]},t.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this.__altered=!0,this):Iu()},t.prototype.set=function(e,t){return Lu(this,e,t)},t.prototype.remove=function(e){return Lu(this,e,Rd)},t.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},t.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?Fu(t,n,e,this.__hash):this.size===0?Iu():(this.__ownerID=e,this.__altered=!1,this._map=t,this._list=n,this)},t}(yf),Rf.isOrderedMap=Pu,Rf.prototype[Bd]=!0,Rf.prototype[Pd]=Rf.prototype.remove,Bf=`@@__IMMUTABLE_STACK__@@`,Vf=function(e){function t(e){return e==null?Bu():Ru(e)?e:Bu().pushAll(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString(`Stack [`,`]`)},t.prototype.get=function(e,t){var n=this._head;for(e=Tc(this,e);n&&e--;)n=n.next;return n?n.value:t},t.prototype.peek=function(){return this._head&&this._head.value},t.prototype.push=function(){var e=arguments;if(arguments.length===0)return this;for(var t=this.size+arguments.length,n=this._head,r=arguments.length-1;r>=0;r--)n={value:e[r],next:n};return this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):zu(t,n)},t.prototype.pushAll=function(t){if(t=e(t),t.size===0)return this;if(this.size===0&&Ru(t))return t;Ql(t.size);var n=this.size,r=this._head;return t.__iterate(function(e){n++,r={value:e,next:r}},!0),this.__ownerID?(this.size=n,this._head=r,this.__hash=void 0,this.__altered=!0,this):zu(n,r)},t.prototype.pop=function(){return this.slice(1)},t.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Bu()},t.prototype.slice=function(t,n){if(Dc(t,n,this.size))return this;var r=Oc(t,this.size);if(kc(n,this.size)!==this.size)return e.prototype.slice.call(this,t,n);for(var i=this.size-r,a=this._head;r--;)a=a.next;return this.__ownerID?(this.size=i,this._head=a,this.__hash=void 0,this.__altered=!0,this):zu(i,a)},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?zu(this.size,this._head,e,this.__hash):this.size===0?Bu():(this.__ownerID=e,this.__altered=!1,this)},t.prototype.__iterate=function(e,t){var n=this;if(t)return new qd(this.toArray()).__iterate(function(t,r){return e(t,r,n)},t);for(var r=0,i=this._head;i&&e(i.value,r++,this)!==!1;)i=i.next;return r},t.prototype.__iterator=function(e,t){if(t)return new qd(this.toArray()).__iterator(e,t);var n=0,r=this._head;return new Nd(function(){if(r){var t=r.value;return r=r.next,pc(e,n++,t)}return mc()})},t}(Td),Vf.isStack=Ru,Hf=Vf.prototype,Hf[Bf]=!0,Hf.shift=Hf.pop,Hf.unshift=Hf.push,Hf.unshiftAll=Hf.pushAll,Hf.withMutations=Yl,Hf.wasAltered=Jl,Hf.asImmutable=Hc,Hf[`@@transducer/init`]=Hf.asMutable=Uc,Hf[`@@transducer/step`]=function(e,t){return e.unshift(t)},Hf[`@@transducer/result`]=function(e){return e.asImmutable()},Wf=function(e){function t(e,n,r){if(r===void 0&&(r=1),!(this instanceof t))return new t(e,n,r);if(Zl(r!==0,`Cannot step a Range by 0`),Zl(e!==void 0,`You must define a start value when using Range`),Zl(n!==void 0,`You must define an end value when using Range`),r=Math.abs(r),n<e&&(r=-r),this._start=e,this._end=n,this._step=r,this.size=Math.max(0,Math.ceil((n-e)/r-1)+1),this.size===0){if(Gf)return Gf;Gf=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.size===0?`Range []`:`Range [ `+this._start+`...`+this._end+(this._step===1?``:` by `+this._step)+` ]`},t.prototype.get=function(e,t){return this.has(e)?this._start+Tc(this,e)*this._step:t},t.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},t.prototype.slice=function(e,n){return Dc(e,n,this.size)?this:(e=Oc(e,this.size),n=kc(n,this.size),n<=e?new t(0,0):new t(this.get(e,this._end),this.get(n,this._end),this._step))},t.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step===0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},t.prototype.lastIndexOf=function(e){return this.indexOf(e)},t.prototype.__iterate=function(e,t){for(var n=this.size,r=this._step,i=t?this._start+(n-1)*r:this._start,a=0;a!==n&&e(i,t?n-++a:a++,this)!==!1;)i+=t?-r:r;return a},t.prototype.__iterator=function(e,t){var n=this.size,r=this._step,i=t?this._start+(n-1)*r:this._start,a=0;return new Nd(function(){if(a===n)return mc();var o=i;return i+=t?-r:r,pc(e,t?n-++a:a++,o)})},t.prototype.equals=function(e){return e instanceof t?this._start===e._start&&this._end===e._end&&this._step===e._step:qu(this,e)},t}(Gd),Kf=`@@__IMMUTABLE_SET__@@`,qf=function(e){function t(t){return t==null?Zu():Ju(t)&&!Pc(t)?t:Zu().withMutations(function(n){var r=e(t);Ql(r.size),r.forEach(function(e){return n.add(e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(wd(e).keySeq())},t.intersect=function(e){return e=Cd(e).toArray(),e.length?Jf.intersect.apply(t(e.pop()),e):Zu()},t.union=function(e){return e=Cd(e).toArray(),e.length?Jf.union.apply(t(e.pop()),e):Zu()},t.prototype.toString=function(){return this.__toString(`Set {`,`}`)},t.prototype.has=function(e){return this._map.has(e)},t.prototype.add=function(e){return Yu(this,this._map.set(e,e))},t.prototype.remove=function(e){return Yu(this,this._map.remove(e))},t.prototype.clear=function(){return Yu(this,this._map.clear())},t.prototype.map=function(e,t){var n=this,r=!1,i=Yu(this,this._map.mapEntries(function(i){var a=i[1],o=e.call(t,a,a,n);return o!==a&&(r=!0),[o,o]},t));return r?i:this},t.prototype.union=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return t=t.filter(function(e){return e.size!==0}),t.length===0?this:this.size===0&&!this.__ownerID&&t.length===1?this.constructor(t[0]):this.withMutations(function(n){for(var r=0;r<t.length;r++)typeof t[r]==`string`?n.add(t[r]):e(t[r]).forEach(function(e){return n.add(e)})})},t.prototype.intersect=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(t.length===0)return this;t=t.map(function(t){return e(t)});var r=[];return this.forEach(function(e){t.every(function(t){return t.includes(e)})||r.push(e)}),this.withMutations(function(e){r.forEach(function(t){e.remove(t)})})},t.prototype.subtract=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(t.length===0)return this;t=t.map(function(t){return e(t)});var r=[];return this.forEach(function(e){t.some(function(t){return t.includes(e)})&&r.push(e)}),this.withMutations(function(e){r.forEach(function(t){e.remove(t)})})},t.prototype.sort=function(e){return ep(hl(this,e))},t.prototype.sortBy=function(e,t){return ep(hl(this,t,e))},t.prototype.wasAltered=function(){return this._map.wasAltered()},t.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate(function(t){return e(t,t,n)},t)},t.prototype.__iterator=function(e,t){return this._map.__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):this.size===0?this.__empty():(this.__ownerID=e,this._map=t,this)},t}(Ed),qf.isSet=Ju,Jf=qf.prototype,Jf[Kf]=!0,Jf[Pd]=Jf.remove,Jf.merge=Jf.concat=Jf.union,Jf.withMutations=Yl,Jf.asImmutable=Hc,Jf[`@@transducer/init`]=Jf.asMutable=Uc,Jf[`@@transducer/step`]=function(e,t){return e.add(t)},Jf[`@@transducer/result`]=function(e){return e.asImmutable()},Jf.__empty=Zu,Jf.__make=Xu,Cd.Iterator=Nd,sd(Cd,{toArray:function(){Ql(this.size);var e=Array(this.size||0),t=uc(this),n=0;return this.__iterate(function(r,i){e[n++]=t?[i,r]:r}),e},toIndexedSeq:function(){return new pf(this)},toJS:function(){return rd(this)},toKeyedSeq:function(){return new ff(this,!0)},toMap:function(){return yf(this.toKeyedSeq())},toObject:nd,toOrderedMap:function(){return Rf(this.toKeyedSeq())},toOrderedSet:function(){return ep(uc(this)?this.valueSeq():this)},toSet:function(){return qf(uc(this)?this.valueSeq():this)},toSetSeq:function(){return new mf(this)},toSeq:function(){return lc(this)?this.toIndexedSeq():uc(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Vf(uc(this)?this.valueSeq():this)},toList:function(){return Nf(uc(this)?this.valueSeq():this)},toString:function(){return`[Collection]`},__toString:function(e,t){return this.size===0?e+t:e+` `+this.toSeq().map(this.__toStringMapper).join(`, `)+` `+t},concat:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return yl(this,dl(this,e))},includes:function(e){return this.some(function(t){return El(t,e)})},entries:function(){return this.__iterator(kd)},every:function(e,t){Ql(this.size);var n=!0;return this.__iterate(function(r,i,a){if(!e.call(t,r,i,a))return n=!1,!1}),n},filter:function(e,t){return yl(this,il(this,e,t,!0))},partition:function(e,t){return sl(this,e,t)},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return Ql(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Ql(this.size),e=e===void 0?`,`:``+e;var t=``,n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=r==null?``:r.toString()}),t},keys:function(){return this.__iterator(Dd)},map:function(e,t){return yl(this,nl(this,e,t))},reduce:function(e,t,n){return Vu(this,e,t,n,arguments.length<2,!1)},reduceRight:function(e,t,n){return Vu(this,e,t,n,arguments.length<2,!0)},reverse:function(){return yl(this,rl(this,!0))},slice:function(e,t){return yl(this,cl(this,e,t,!0))},some:function(e,t){Ql(this.size);var n=!1;return this.__iterate(function(r,i,a){if(e.call(t,r,i,a))return n=!0,!1}),n},sort:function(e){return yl(this,hl(this,e))},values:function(){return this.__iterator(Od)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return this.size===void 0?!this.some(function(){return!0}):this.size===0},count:function(e,t){return wc(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return al(this,e,t)},equals:function(e){return qu(this,e)},entrySeq:function(){var e=this;if(e._cache)return new qd(e._cache);var t=e.toSeq().map(Uu).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(Wu(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate(function(n,i,a){if(e.call(t,n,i,a))return r=[i,n],!1}),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(e){return this.find(Ec,null,e)},flatMap:function(e,t){return yl(this,pl(this,e,t))},flatten:function(e){return yl(this,fl(this,e,!0))},fromEntrySeq:function(){return new hf(this)},get:function(e,t){return this.find(function(t,n){return El(n,e)},void 0,t)},getIn:$u,groupBy:function(e,t){return ol(this,e,t)},has:function(e){return this.get(e,Rd)!==Rd},hasIn:td,isSubset:function(e){return e=typeof e.includes==`function`?e:Cd(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return e=typeof e.isSubset==`function`?e:Cd(e),e.isSubset(this)},keyOf:function(e){return this.findKey(function(t){return El(t,e)})},keySeq:function(){return this.toSeq().map(Hu).toIndexedSeq()},last:function(e){return this.toSeq().reverse().first(e)},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return gl(this,e)},maxBy:function(e,t){return gl(this,t,e)},min:function(e){return gl(this,e?Gu(e):Ku)},minBy:function(e,t){return gl(this,t?Gu(t):Ku,e)},rest:function(){return this.slice(1)},skip:function(e){return e===0?this:this.slice(Math.max(0,e))},skipLast:function(e){return e===0?this:this.slice(0,-Math.max(0,e))},skipWhile:function(e,t){return yl(this,ul(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(Wu(e),t)},sortBy:function(e,t){return yl(this,hl(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return this.slice(-Math.max(0,e))},takeWhile:function(e,t){return yl(this,ll(this,e,t))},takeUntil:function(e,t){return this.takeWhile(Wu(e),t)},update:function(e){return e(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||=id(this)}}),Xf=Cd.prototype,Xf[Sd]=!0,Xf[Md]=Xf.values,Xf.toJSON=Xf.toArray,Xf.__toStringMapper=mu,Xf.inspect=Xf.toSource=function(){return this.toString()},Xf.chain=Xf.flatMap,Xf.contains=Xf.includes,sd(wd,{flip:function(){return yl(this,tl(this))},mapEntries:function(e,t){var n=this,r=0;return yl(this,this.toSeq().map(function(i,a){return e.call(t,[a,i],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return yl(this,this.toSeq().flip().map(function(r,i){return e.call(t,r,i,n)}).flip())}}),Zf=wd.prototype,Zf[xd]=!0,Zf[Md]=Xf.entries,Zf.toJSON=nd,Zf.__toStringMapper=function(e,t){return mu(t)+`: `+mu(e)},sd(Td,{toKeyedSeq:function(){return new ff(this,!1)},filter:function(e,t){return yl(this,il(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return t===void 0?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return t===void 0?-1:t},reverse:function(){return yl(this,rl(this,!1))},slice:function(e,t){return yl(this,cl(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(t||0,0),n===0||n===2&&!t)return this;e=Oc(e,e<0?this.count():this.size);var r=this.slice(0,e);return yl(this,n===1?r:r.concat(Pl(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(e){return this.get(0,e)},flatten:function(e){return yl(this,fl(this,e,!1))},get:function(e,t){return e=Tc(this,e),e<0||this.size===1/0||this.size!==void 0&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return e=Tc(this,e),e>=0&&(this.size===void 0?this.find(function(t,n){return n===e},void 0,Rd)!==Rd:this.size===1/0||e<this.size)},interpose:function(e){return yl(this,ml(this,e))},interleave:function(){var e=[this].concat(Pl(arguments)),t=vl(this.toSeq(),Gd.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),yl(this,n)},keySeq:function(){return Wf(0,this.size)},last:function(e){return this.get(-1,e)},skipWhile:function(e,t){return yl(this,ul(this,e,t,!1))},zip:function(){var e=[this].concat(Pl(arguments));return yl(this,vl(this,cd,e))},zipAll:function(){var e=[this].concat(Pl(arguments));return yl(this,vl(this,cd,e,!0))},zipWith:function(e){var t=Pl(arguments);return t[0]=this,yl(this,vl(this,e,t))}}),Qf=Td.prototype,Qf[bd]=!0,Qf[Bd]=!0,sd(Ed,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),$f=Ed.prototype,$f.has=Xf.includes,$f.contains=$f.includes,$f.keys=$f.values,sd(Wd,Zf),sd(Gd,Qf),sd(Kd,$f),ep=function(e){function t(e){return e==null?dd():ld(e)?e:dd().withMutations(function(t){var n=Ed(e);Ql(n.size),n.forEach(function(e){return t.add(e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(wd(e).keySeq())},t.prototype.toString=function(){return this.__toString(`OrderedSet {`,`}`)},t}(qf),ep.isOrderedSet=ld,tp=ep.prototype,tp[Bd]=!0,tp.zip=Qf.zip,tp.zipWith=Qf.zipWith,tp.zipAll=Qf.zipAll,tp.__empty=dd,tp.__make=ud,rp=function(e,t){var n;fd(e);var r=function(a){var o=this;if(a instanceof r)return a;if(!(this instanceof r))return new r(a);if(!n){n=!0;var s=Object.keys(e),c=i._indices={};i._name=t,i._keys=s,i._defaultValues=e;for(var l=0;l<s.length;l++){var u=s[l];c[u]=l,i[u]?typeof console==`object`&&console.warn&&console.warn(`Cannot define `+md(this)+` with property "`+u+`" since that property name is part of the Record API.`):gd(i,u)}}return this.__ownerID=void 0,this._values=Nf().withMutations(function(e){e.setSize(o._keys.length),wd(a).forEach(function(t,n){e.set(o._indices[n],t===o._defaultValues[n]?void 0:t)})}),this},i=r.prototype=Object.create(ip);return i.constructor=r,t&&(r.displayName=t),r},rp.prototype.toString=function(){for(var e=md(this)+` { `,t=this._keys,n,r=0,i=t.length;r!==i;r++)n=t[r],e+=(r?`, `:``)+n+`: `+mu(this.get(n));return e+` }`},rp.prototype.equals=function(e){return this===e||Mc(e)&&hd(this).equals(hd(e))},rp.prototype.hashCode=function(){return hd(this).hashCode()},rp.prototype.has=function(e){return this._indices.hasOwnProperty(e)},rp.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._indices[e],r=this._values.get(n);return r===void 0?this._defaultValues[e]:r},rp.prototype.set=function(e,t){if(this.has(e)){var n=this._values.set(this._indices[e],t===this._defaultValues[e]?void 0:t);if(n!==this._values&&!this.__ownerID)return pd(this,n)}return this},rp.prototype.remove=function(e){return this.set(e)},rp.prototype.clear=function(){var e=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:pd(this,e)},rp.prototype.wasAltered=function(){return this._values.wasAltered()},rp.prototype.toSeq=function(){return hd(this)},rp.prototype.toJS=function(){return rd(this)},rp.prototype.entries=function(){return this.__iterator(kd)},rp.prototype.__iterator=function(e,t){return hd(this).__iterator(e,t)},rp.prototype.__iterate=function(e,t){return hd(this).__iterate(e,t)},rp.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._values.__ensureOwner(e);return e?pd(this,t,e):(this.__ownerID=e,this._values=t,this)},rp.isRecord=Mc,rp.getDescriptiveName=md,ip=rp.prototype,ip[zd]=!0,ip[Pd]=ip.remove,ip.deleteIn=ip.removeIn=xu,ip.getIn=$u,ip.hasIn=Xf.hasIn,ip.merge=Ol,ip.mergeWith=kl,ip.mergeIn=Ul,ip.mergeDeep=Bl,ip.mergeDeepWith=Vl,ip.mergeDeepIn=Hl,ip.setIn=Gl,ip.update=Kl,ip.updateIn=ql,ip.withMutations=Yl,ip.asMutable=Uc,ip.asImmutable=Hc,ip[Md]=ip.entries,ip.toJSON=ip.toObject=Xf.toObject,ip.inspect=ip.toSource=function(){return this.toString()}})),op,sp=o((()=>{cc(),ap(),op=({content:e,otherLocales:t,locales:n,slug:r,path:i,isNew:a,collectionName:o,associatedAssets:s})=>_d({data:sc(e),i18n:Object.fromEntries(t.map(e=>[e,{data:sc(n[e].content)}])),slug:r,path:i,newRecord:a,collection:o,mediaFiles:s.map(({sha:e,file:t,size:n,blobURL:r,...i})=>({id:e,name:i.name,path:i.path,file:t,size:n,url:r,displayURL:r})),meta:{path:i},isModification:null,label:null,partial:!1,author:``,raw:``,status:``,updatedOn:``})})),cp,lp,up,dp,fp,pp,mp=o((()=>{cp=new Map,lp=new Map,up=new Map,dp=new Set,fp=new Map,pp=new Set}));function hp(e){if(e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray)return new DataView(e.buffer,e.byteOffset,e.byteLength);if(e instanceof ArrayBuffer)return new DataView(e);throw TypeError("Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray")}var gp=o((()=>{}));function _p(e,t,n){n||={};let r,i;switch(t){case`RFC3548`:case`RFC4648`:r=vp,i=!0;break;case`RFC4648-HEX`:r=yp,i=!0;break;case`Crockford`:r=bp,i=!1;break;default:throw Error(`Unknown base32 variant: `+t)}let a=n.padding===void 0?i:n.padding,o=hp(e),s=0,c=0,l=``;for(let e=0;e<o.byteLength;e++)for(c=c<<8|o.getUint8(e),s+=8;s>=5;)l+=r[c>>>s-5&31],s-=5;if(s>0&&(l+=r[c<<5-s&31]),a)for(;l.length%8!=0;)l+=`=`;return l}var vp,yp,bp,xp=o((()=>{gp(),vp=`ABCDEFGHIJKLMNOPQRSTUVWXYZ234567`,yp=`0123456789ABCDEFGHIJKLMNOPQRSTUV`,bp=`0123456789ABCDEFGHJKMNPQRSTVWXYZ`})),Sp,Cp,wp,Tp,Ep=o((()=>{xp(),Sp=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/,Cp=e=>{let t=globalThis.crypto.randomUUID();return e===`short`?t.split(`-`).pop():e===`shorter`?t.split(`-`).shift():typeof e==`number`?t.split(`-`).join(``).slice(0,e):t},wp=()=>{let e=Cp().replaceAll(`-`,``),{buffer:t}=new Uint8Array(e.match(/../g).map(e=>parseInt(e,16)));return _p(t,`RFC4648`,{padding:!1}).toLowerCase()},Tp=async(e,{algorithm:t=`SHA-1`,format:n=`hex`}={})=>{let r;if(typeof e==`string`){let t=new TextEncoder().encode(e);r=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}else if(e instanceof ArrayBuffer)r=e;else if(ArrayBuffer.isView(e)){let t=e;r=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}else if(e&&typeof e.arrayBuffer==`function`)r=await e.arrayBuffer();else throw Error(`Unsupported input type for getHash`);let i=await globalThis.crypto.subtle.digest(t,r);return n===`binary`?Array.from(new Uint8Array(i),e=>String.fromCharCode(e)).join(``):Array.from(new Uint8Array(i),e=>e.toString(16).padStart(2,`0`)).join(``)}})),Dp,Op,kp,Ap,jp,Mp,Np=o((()=>{Dp=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),Op=(e,t,{ellipsis:n=`…`}={})=>{let r=[...e];return`${r.slice(0,t).join(``).trim()}${r.length>t?n:``}`},kp=e=>e.replace(/^\/+/,``).replace(/\/+$/,``),Ap=e=>new DOMParser().parseFromString(e,`text/html`).body.textContent,jp=e=>{if(typeof URL.canParse==`function`)return URL.canParse(e);try{return new URL(e),!0}catch{return!1}},Mp=new Intl.Collator(void 0,{numeric:!0,sensitivity:`base`}).compare})),Pp,Fp,Ip,Lp,Rp,zp,Bp,Vp,Hp,Up,Wp,fee,Gp=o((()=>{Ep(),Np(),Pp=(e=``)=>RegExp(`\\bblob:${Dp(globalThis.location.origin)}\\/${Sp.source}\\b`,e),Fp=/(?:(.+?)\/)?(([^/]+?)(?:\.((?:tar\.)?[a-zA-Z0-9]+))?)$/,Ip=[`application/atom+xml`,`application/javascript`,`application/json`,`application/ld+json`,`application/rss+xml`,`application/xhtml+xml`,`application/xml`,`application/yaml`,`image/svg+xml`],Lp=e=>e.startsWith(`text/`)||Ip.includes(e),Rp=e=>{let[,t,n,r,i]=e.match(Fp)??[];return{dirname:t,basename:n,filename:r,extension:i}},zp=(e,t)=>t.length?t.some(t=>{if(t=t.toLowerCase(),t.startsWith(`.`))return e.name.toLowerCase().endsWith(t);let[n,r]=t.split(`/`);return r===`*`?e.type.split(`/`)[0]===n:e.type===t}):!0,Bp=async({items:e},{accept:t}={})=>{let n=t?t.trim().split(/,\s*/):[],r=e=>new Promise(t=>{if(e.name.startsWith(`.`))t(null);else if(e.isFile)e.file(e=>{t(zp(e,n)?e:null)},()=>{t(null)});else{let n=e.createReader(),i=[],a=()=>{n.readEntries(e=>{e.length?(i.push(...e),a()):t(Promise.all(i.map(r)))})};a()}});return(await Promise.all([...e].map(e=>{let t=e.webkitGetAsEntry();return t?r(t):null}))).flat(1/0).filter(Boolean).sort((e,t)=>e.name.localeCompare(t.name))},Vp=async e=>(await e.text()).replace(/\r\n?/g,`
44
- `),Hp=async e=>{let t=typeof e==`string`?new Blob([e],{type:`text/plain`}):e,n=new FileReader;return new Promise((e,r)=>{n.onload=()=>{e(n.result)},n.onerror=()=>{r(n.error)},n.readAsDataURL(t)})},Up=async e=>(await Hp(e)).split(`,`)[1],Wp=async e=>{let t=Uint8Array.fromBase64(e);return new TextDecoder().decode(t)},fee=(e,t)=>{let n=document.createElement(`a`),r=URL.createObjectURL(e);n.download=t??e.name??`${Date.now()}.${e.type.split(`/`)[1]}`,n.href=r,n.click(),globalThis.setTimeout(()=>{URL.revokeObjectURL(r)},0)}}));function Kp(e,t){var n=Wi,r=Hi,i=e();let a=ln(i,t=>{var a=i!==e(),o,s=Hi,c=Wi;wi(r),Ti(n);try{o=ti(()=>{ii(()=>{let n=e();a&&t(n)})})}finally{wi(s),Ti(c)}return a=!0,o});return t?{set:t,update:n=>t(n(e())),subscribe:a.subscribe}:{subscribe:a.subscribe}}var qp=o((()=>{bi(),fn(),Tn(),Qi()})),Jp,Yp,Xp,pee,Zp,Qp=o((()=>{Jp=/{{.+?}}/,Yp=/{{(.+?)}}(?!'[),])/g,Xp=/\\\{\\\{.+?\\\}\\\}/g,pee=[`year`,`month`,`day`,`hour`,`minute`,`second`],Zp=/^{{(?<innerTag>.+?)}}$/})),$p,em,tm,nm,rm,im,am,om,sm,cm=o((()=>{Gp(),Np(),qp(),Qp(),$p=ln([]),em=un([$p],([e],t)=>{t(e.find(({collectionName:e,internalPath:t})=>e===void 0&&t!==void 0))}),tm=ln(),nm=un([tm,em],([e,t])=>e?.internalPath===void 0?t:e),rm=e=>A($p).find(t=>t.collectionName===e.collectionName&&t.fileName===e.fileName&&(`typedKeyPath`in e?t.typedKeyPath===e.typedKeyPath:!t.typedKeyPath)&&(`isIndexFile`in e?t.isIndexFile===e.isIndexFile:!t.isIndexFile)),im={source:void 0,items:[],entryRelative:[]},am=()=>{let e=A($p);if(e===im.source)return im;let t=[],n=[];return e.forEach(e=>{let{internalPath:r,entryRelative:i}=e;if(r!==void 0)if(i)n.push(e);else{let n=Dp(r).replace(Xp,`.+?`);t.push({folder:e,regexSub:RegExp(`^${n}${r?`(?=\\/|$)`:`$`}`),regexExact:RegExp(`^${n}$`)})}}),im.source=e,im.items=t,im.entryRelative=n,im},om=(e,{matchSubFolders:t=!0}={})=>{let{filename:n,dirname:r}=Rp(e);if(n.startsWith(`+`))return[];let{items:i,entryRelative:a}=am(),o=r??``;return[...a.filter(({internalPath:t})=>e.startsWith(`${t}/`)),...i.filter(({regexSub:e,regexExact:n})=>(t?e:n).test(o)).map(({folder:e})=>e)].sort((e,t)=>t.internalPath.localeCompare(e.internalPath))},sm=e=>!!e&&!e.entryRelative&&!e.hasTemplateTags}));function mee(e,t){let n=t,r=e.slice(n).match(lm);r&&(n+=r[0].length);let i=e.slice(n).match(um);if(!i)return null;let a=i[0];if(dm.test(a))return null;n+=a.length;let o=e.slice(n).match(lm);return o&&(n+=o[0].length),{value:a.normalize(),end:n}}var lm,um,dm,fm,pm=o((()=>{lm=/^[\u061c\u200e\u200f\u2066-\u2069]+/,um=/^[-.+0-9A-Z_a-z\u{a1}-\u{61b}\u{61d}-\u{167f}\u{1681}-\u{1fff}\u{200b}-\u{200d}\u{2010}-\u{2027}\u{2030}-\u{205e}\u{2060}-\u{2065}\u{206a}-\u{2fff}\u{3001}-\u{d7ff}\u{e000}-\u{fdcf}\u{fdf0}-\u{fffd}\u{10000}-\u{1fffd}\u{20000}-\u{2fffd}\u{30000}-\u{3fffd}\u{40000}-\u{4fffd}\u{50000}-\u{5fffd}\u{60000}-\u{6fffd}\u{70000}-\u{7fffd}\u{80000}-\u{8fffd}\u{90000}-\u{9fffd}\u{a0000}-\u{afffd}\u{b0000}-\u{bfffd}\u{c0000}-\u{cfffd}\u{d0000}-\u{dfffd}\u{e0000}-\u{efffd}\u{f0000}-\u{ffffd}\u{100000}-\u{10fffd}]+/u,dm=/^[-.0-9]/,fm=(e,t)=>e.slice(t).match(um)?.[0]??``})),mm,hee=o((()=>{mm=Symbol.for(`CST`)})),hm,gm,_m,vm,ym,bm=o((()=>{hee(),hm=class extends Error{type;constructor(e,t){super(t),this.type=e}},gm=class extends hm{start;end;constructor(e,t,n,r){let i=r?`Missing ${r}`:e;t>=0&&(i+=` at ${t}`),super(e,i),this.start=t,this.end=n??t+1}},_m=class extends gm{constructor(e,t){let{start:n,end:r}=t[mm]??{start:-1,end:-1};super(e,n,r)}},vm=class extends hm{source;cause;constructor(e,t,n,r){super(e,t),this.source=n,r!==void 0&&(this.cause=r)}},ym=class extends hm{source;cause;constructor(e,t){super(e,t),this.source=`�`}}}));function xm(e,t){if(jm.startsWith(e,Am))t&&(Am+=e.length);else throw Mm(Am,e)}function gee(e){Am=0,jm=e;let t=yee();if(jm.startsWith(`.match`,Am))return _ee(t);let n=t.length>0||jm.startsWith(`{{`,Am);!n&&Am>0&&(Am=0);let r=Sm(n);if(n&&(Dm(),Am<jm.length))throw Nm(`extra-content`,Am,jm.length);return{type:`message`,declarations:t,pattern:r}}function _ee(e){Am+=6,Dm(!0);let t=[];for(;jm[Am]===`$`;)t.push(Eee()),Dm(!0);if(t.length===0)throw Nm(`empty-token`,Am);let n=[];for(;Am<jm.length;)n.push(vee()),Dm();return{type:`select`,declarations:e,selectors:t,variants:n}}function vee(){let e=[];for(;Am<jm.length;){Dm(e.length?`{`:!1);let t=jm[Am];if(t===`{`)break;if(t===`*`)e.push({type:`*`}),Am+=1;else{let t=wm(!0);t.value=t.value.normalize(),e.push(t)}}return{keys:e,value:Sm(!0)}}function Sm(e){if(e)if(jm.startsWith(`{{`,Am))Am+=2;else throw Mm(Am,`{{`);let t=[];loop:for(;Am<jm.length;)switch(jm[Am]){case`{`:t.push(Cm(!0));break;case`}`:if(!e)throw Nm(`parse-error`,Am);break loop;default:t.push(wee())}if(e)if(jm.startsWith(`}}`,Am))Am+=2;else throw Mm(Am,`}}`);return t}function yee(){let e=[];Dm();loop:for(;jm[Am]===`.`;){switch(jm.substr(Am,6)){case`.input`:e.push(bee());break;case`.local`:e.push(xee());break;case`.match`:break loop;default:throw Nm(`parse-error`,Am)}Dm()}return e}function bee(){Am+=6,Dm(),xm(`{`,!1);let e=Am,t=Cm(!1);if(t.type===`expression`&&t.arg?.type===`variable`)return{type:`input`,name:t.arg.name,value:t};throw Nm(`bad-input-expression`,e,Am)}function xee(){Am+=6,Dm(!0),xm(`$`,!0);let e=Em();return Dm(),xm(`=`,!0),Dm(),xm(`{`,!1),{type:`local`,name:e,value:Cm(!1)}}function Cm(e){let t=Am;Am+=1,Dm();let n=Tee(!1);n&&Dm(`}`);let r=jm[Am],i,a;switch(r){case`@`:case`}`:break;case`:`:{Am+=1,i={type:`function`,name:Tm()};let e=See();e&&(i.options=e);break}case`#`:case`/`:{if(n||!e)throw Nm(`parse-error`,Am);Am+=1,a={type:`markup`,kind:r===`#`?`open`:`close`,name:Tm()};let t=See();t&&(a.options=t);break}default:throw Nm(`parse-error`,Am)}let o=Cee();if(a?.kind===`open`&&jm[Am]===`/`&&(a.kind=`standalone`,Am+=1),xm(`}`,!0),i){let e=n?{type:`expression`,arg:n,functionRef:i}:{type:`expression`,functionRef:i};return o&&(e.attributes=o),e}if(a)return o&&(a.attributes=o),a;if(!n)throw Nm(`empty-token`,t,Am);return o?{type:`expression`,arg:n,attributes:o}:{type:`expression`,arg:n}}function See(){Dm(`/}`);let e={},t=!0;for(;Am<jm.length;){let n=jm[Am];if(n===`@`||n===`/`||n===`}`)break;let r=Am,i=Tm();if(Object.hasOwn(e,i))throw Nm(`duplicate-option-name`,r,Am);Dm(),xm(`=`,!0),Dm(),e[i]=Tee(!0),t=!1,Dm(`/}`)}return t?null:e}function Cee(){let e={},t=!0;for(;jm[Am]===`@`;){let n=Am;Am+=1;let r=Tm();if(Object.hasOwn(e,r))throw Nm(`duplicate-attribute`,n,Am);Dm(`=/}`),jm[Am]===`=`?(Am+=1,Dm(),e[r]=wm(!0),Dm(`/}`)):e[r]=!0,t=!1}return t?null:e}function wee(){let e=``,t=Am;loop:for(;t<jm.length;++t)switch(jm[t]){case`\\`:{let n=jm[t+1];if(!`\\{|}`.includes(n))throw Nm(`bad-escape`,t,t+2);e+=jm.substring(Am,t)+n,t+=1,Am=t+1;break}case`{`:case`}`:break loop}return e+=jm.substring(Am,t),Am=t,e}function Tee(e){return jm[Am]===`$`?Eee():wm(e)}function Eee(){return Am+=1,{type:`variable`,name:Em()}}function wm(e){if(jm[Am]===`|`)return Dee();let t=fm(jm,Am);if(!t){if(e)throw Nm(`empty-token`,Am);return}return Am+=t.length,{type:`literal`,value:t}}function Dee(){Am+=1;let e=``;for(let t=Am;t<jm.length;++t)switch(jm[t]){case`\\`:{let n=jm[t+1];if(!`\\{|}`.includes(n))throw Nm(`bad-escape`,t,t+2);e+=jm.substring(Am,t)+n,t+=1,Am=t+1;break}case`|`:return e+=jm.substring(Am,t),Am=t+1,{type:`literal`,value:e}}throw Mm(jm.length,`|`)}function Tm(){let e=Em();return jm[Am]===`:`?(Am+=1,e+`:`+Em()):e}function Em(){let e=mee(jm,Am);if(!e)throw Nm(`empty-token`,Am);return Am=e.end,e.value}function Dm(e=!1){let t=jm[Am],n=!1;if(e){for(;Om.has(t);)t=jm[++Am];for(;km.has(t);)t=jm[++Am],n=!0}for(;Om.has(t)||km.has(t);)t=jm[++Am];if(e&&!n&&(e===!0||!e.includes(jm[Am])))throw Mm(Am,`' '`)}var Om,km,Am,jm,Mm,Nm,Oee=o((()=>{pm(),bm(),Om=new Set(`؜‎‏⁦⁧⁨⁩`),km=new Set(`
44
+ `),Hp=async e=>{let t=typeof e==`string`?new Blob([e],{type:`text/plain`}):e,n=new FileReader;return new Promise((e,r)=>{n.onload=()=>{e(n.result)},n.onerror=()=>{r(n.error)},n.readAsDataURL(t)})},Up=async e=>(await Hp(e)).split(`,`)[1],Wp=async e=>{let t=Uint8Array.fromBase64(e);return new TextDecoder().decode(t)},fee=(e,t)=>{let n=document.createElement(`a`),r=URL.createObjectURL(e);n.download=t??e.name??`${Date.now()}.${e.type.split(`/`)[1]}`,n.href=r,n.click(),globalThis.setTimeout(()=>{URL.revokeObjectURL(r)},0)}}));function Kp(e,t){var n=Wi,r=Hi,i=e();let a=ln(i,t=>{var a=i!==e(),o,s=Hi,c=Wi;wi(r),Ti(n);try{o=ti(()=>{ii(()=>{let n=e();a&&t(n)})})}finally{wi(s),Ti(c)}return a=!0,o});return t?{set:t,update:n=>t(n(e())),subscribe:a.subscribe}:{subscribe:a.subscribe}}var qp=o((()=>{bi(),fn(),Tn(),Qi()})),Jp,Yp,Xp,pee,Zp,Qp=o((()=>{Jp=/{{.+?}}/,Yp=/{{(.+?)}}(?!'[),])/g,Xp=/\\\{\\\{.+?\\\}\\\}/g,pee=[`year`,`month`,`day`,`hour`,`minute`,`second`],Zp=/^{{(?<innerTag>.+?)}}$/})),$p,em,tm,nm,rm,im,am,om,sm,cm=o((()=>{Gp(),Np(),qp(),Qp(),$p=ln([]),em=un([$p],([e],t)=>{t(e.find(({collectionName:e,internalPath:t})=>e===void 0&&t!==void 0))}),tm=ln(),nm=un([tm,em],([e,t])=>e?.internalPath===void 0?t:e),rm=e=>{let t=`typedKeyPath`in e?e.typedKeyPath?.match(/[^:]+$/)?.[0]:e.typedKeyPath;return A($p).find(n=>(`typedKeyPath`in e?n.typedKeyPath===t:!n.typedKeyPath)?`componentName`in e?n.componentName===e.componentName:n.collectionName===e.collectionName&&n.fileName===e.fileName&&(`isIndexFile`in e?n.isIndexFile===e.isIndexFile:!n.isIndexFile):!1)},im={source:void 0,items:[],entryRelative:[]},am=()=>{let e=A($p);if(e===im.source)return im;let t=[],n=[];return e.forEach(e=>{let{internalPath:r,entryRelative:i}=e;if(r!==void 0)if(i)n.push(e);else{let n=Dp(r).replace(Xp,`.+?`);t.push({folder:e,regexSub:RegExp(`^${n}${r?`(?=\\/|$)`:`$`}`),regexExact:RegExp(`^${n}$`)})}}),im.source=e,im.items=t,im.entryRelative=n,im},om=(e,{matchSubFolders:t=!0}={})=>{let{filename:n,dirname:r}=Rp(e);if(n.startsWith(`+`))return[];let{items:i,entryRelative:a}=am(),o=r??``;return[...a.filter(({internalPath:t})=>e.startsWith(`${t}/`)),...i.filter(({regexSub:e,regexExact:n})=>(t?e:n).test(o)).map(({folder:e})=>e)].sort((e,t)=>t.internalPath.localeCompare(e.internalPath))},sm=e=>!!e&&!e.entryRelative&&!e.hasTemplateTags}));function mee(e,t){let n=t,r=e.slice(n).match(lm);r&&(n+=r[0].length);let i=e.slice(n).match(um);if(!i)return null;let a=i[0];if(dm.test(a))return null;n+=a.length;let o=e.slice(n).match(lm);return o&&(n+=o[0].length),{value:a.normalize(),end:n}}var lm,um,dm,fm,pm=o((()=>{lm=/^[\u061c\u200e\u200f\u2066-\u2069]+/,um=/^[-.+0-9A-Z_a-z\u{a1}-\u{61b}\u{61d}-\u{167f}\u{1681}-\u{1fff}\u{200b}-\u{200d}\u{2010}-\u{2027}\u{2030}-\u{205e}\u{2060}-\u{2065}\u{206a}-\u{2fff}\u{3001}-\u{d7ff}\u{e000}-\u{fdcf}\u{fdf0}-\u{fffd}\u{10000}-\u{1fffd}\u{20000}-\u{2fffd}\u{30000}-\u{3fffd}\u{40000}-\u{4fffd}\u{50000}-\u{5fffd}\u{60000}-\u{6fffd}\u{70000}-\u{7fffd}\u{80000}-\u{8fffd}\u{90000}-\u{9fffd}\u{a0000}-\u{afffd}\u{b0000}-\u{bfffd}\u{c0000}-\u{cfffd}\u{d0000}-\u{dfffd}\u{e0000}-\u{efffd}\u{f0000}-\u{ffffd}\u{100000}-\u{10fffd}]+/u,dm=/^[-.0-9]/,fm=(e,t)=>e.slice(t).match(um)?.[0]??``})),mm,hee=o((()=>{mm=Symbol.for(`CST`)})),hm,gm,_m,vm,ym,bm=o((()=>{hee(),hm=class extends Error{type;constructor(e,t){super(t),this.type=e}},gm=class extends hm{start;end;constructor(e,t,n,r){let i=r?`Missing ${r}`:e;t>=0&&(i+=` at ${t}`),super(e,i),this.start=t,this.end=n??t+1}},_m=class extends gm{constructor(e,t){let{start:n,end:r}=t[mm]??{start:-1,end:-1};super(e,n,r)}},vm=class extends hm{source;cause;constructor(e,t,n,r){super(e,t),this.source=n,r!==void 0&&(this.cause=r)}},ym=class extends hm{source;cause;constructor(e,t){super(e,t),this.source=`�`}}}));function xm(e,t){if(jm.startsWith(e,Am))t&&(Am+=e.length);else throw Mm(Am,e)}function gee(e){Am=0,jm=e;let t=yee();if(jm.startsWith(`.match`,Am))return _ee(t);let n=t.length>0||jm.startsWith(`{{`,Am);!n&&Am>0&&(Am=0);let r=Sm(n);if(n&&(Dm(),Am<jm.length))throw Nm(`extra-content`,Am,jm.length);return{type:`message`,declarations:t,pattern:r}}function _ee(e){Am+=6,Dm(!0);let t=[];for(;jm[Am]===`$`;)t.push(Eee()),Dm(!0);if(t.length===0)throw Nm(`empty-token`,Am);let n=[];for(;Am<jm.length;)n.push(vee()),Dm();return{type:`select`,declarations:e,selectors:t,variants:n}}function vee(){let e=[];for(;Am<jm.length;){Dm(e.length?`{`:!1);let t=jm[Am];if(t===`{`)break;if(t===`*`)e.push({type:`*`}),Am+=1;else{let t=wm(!0);t.value=t.value.normalize(),e.push(t)}}return{keys:e,value:Sm(!0)}}function Sm(e){if(e)if(jm.startsWith(`{{`,Am))Am+=2;else throw Mm(Am,`{{`);let t=[];loop:for(;Am<jm.length;)switch(jm[Am]){case`{`:t.push(Cm(!0));break;case`}`:if(!e)throw Nm(`parse-error`,Am);break loop;default:t.push(wee())}if(e)if(jm.startsWith(`}}`,Am))Am+=2;else throw Mm(Am,`}}`);return t}function yee(){let e=[];Dm();loop:for(;jm[Am]===`.`;){switch(jm.substr(Am,6)){case`.input`:e.push(bee());break;case`.local`:e.push(xee());break;case`.match`:break loop;default:throw Nm(`parse-error`,Am)}Dm()}return e}function bee(){Am+=6,Dm(),xm(`{`,!1);let e=Am,t=Cm(!1);if(t.type===`expression`&&t.arg?.type===`variable`)return{type:`input`,name:t.arg.name,value:t};throw Nm(`bad-input-expression`,e,Am)}function xee(){Am+=6,Dm(!0),xm(`$`,!0);let e=Em();return Dm(),xm(`=`,!0),Dm(),xm(`{`,!1),{type:`local`,name:e,value:Cm(!1)}}function Cm(e){let t=Am;Am+=1,Dm();let n=Tee(!1);n&&Dm(`}`);let r=jm[Am],i,a;switch(r){case`@`:case`}`:break;case`:`:{Am+=1,i={type:`function`,name:Tm()};let e=See();e&&(i.options=e);break}case`#`:case`/`:{if(n||!e)throw Nm(`parse-error`,Am);Am+=1,a={type:`markup`,kind:r===`#`?`open`:`close`,name:Tm()};let t=See();t&&(a.options=t);break}default:throw Nm(`parse-error`,Am)}let o=Cee();if(a?.kind===`open`&&jm[Am]===`/`&&(a.kind=`standalone`,Am+=1),xm(`}`,!0),i){let e=n?{type:`expression`,arg:n,functionRef:i}:{type:`expression`,functionRef:i};return o&&(e.attributes=o),e}if(a)return o&&(a.attributes=o),a;if(!n)throw Nm(`empty-token`,t,Am);return o?{type:`expression`,arg:n,attributes:o}:{type:`expression`,arg:n}}function See(){Dm(`/}`);let e={},t=!0;for(;Am<jm.length;){let n=jm[Am];if(n===`@`||n===`/`||n===`}`)break;let r=Am,i=Tm();if(Object.hasOwn(e,i))throw Nm(`duplicate-option-name`,r,Am);Dm(),xm(`=`,!0),Dm(),e[i]=Tee(!0),t=!1,Dm(`/}`)}return t?null:e}function Cee(){let e={},t=!0;for(;jm[Am]===`@`;){let n=Am;Am+=1;let r=Tm();if(Object.hasOwn(e,r))throw Nm(`duplicate-attribute`,n,Am);Dm(`=/}`),jm[Am]===`=`?(Am+=1,Dm(),e[r]=wm(!0),Dm(`/}`)):e[r]=!0,t=!1}return t?null:e}function wee(){let e=``,t=Am;loop:for(;t<jm.length;++t)switch(jm[t]){case`\\`:{let n=jm[t+1];if(!`\\{|}`.includes(n))throw Nm(`bad-escape`,t,t+2);e+=jm.substring(Am,t)+n,t+=1,Am=t+1;break}case`{`:case`}`:break loop}return e+=jm.substring(Am,t),Am=t,e}function Tee(e){return jm[Am]===`$`?Eee():wm(e)}function Eee(){return Am+=1,{type:`variable`,name:Em()}}function wm(e){if(jm[Am]===`|`)return Dee();let t=fm(jm,Am);if(!t){if(e)throw Nm(`empty-token`,Am);return}return Am+=t.length,{type:`literal`,value:t}}function Dee(){Am+=1;let e=``;for(let t=Am;t<jm.length;++t)switch(jm[t]){case`\\`:{let n=jm[t+1];if(!`\\{|}`.includes(n))throw Nm(`bad-escape`,t,t+2);e+=jm.substring(Am,t)+n,t+=1,Am=t+1;break}case`|`:return e+=jm.substring(Am,t),Am=t+1,{type:`literal`,value:e}}throw Mm(jm.length,`|`)}function Tm(){let e=Em();return jm[Am]===`:`?(Am+=1,e+`:`+Em()):e}function Em(){let e=mee(jm,Am);if(!e)throw Nm(`empty-token`,Am);return Am=e.end,e.value}function Dm(e=!1){let t=jm[Am],n=!1;if(e){for(;Om.has(t);)t=jm[++Am];for(;km.has(t);)t=jm[++Am],n=!0}for(;Om.has(t)||km.has(t);)t=jm[++Am];if(e&&!n&&(e===!0||!e.includes(jm[Am])))throw Mm(Am,`' '`)}var Om,km,Am,jm,Mm,Nm,Oee=o((()=>{pm(),bm(),Om=new Set(`؜‎‏⁦⁧⁨⁩`),km=new Set(`
45
45
  \r  `),Mm=(e,t)=>new gm(`missing-syntax`,e,e+t.length,t),Nm=(...e)=>new gm(...e)}));function kee(e,t){let{node:n,pattern:r}=t,{functionRef:i=n,attributes:a=null,declaration:o=n,expression:s=n,key:c=n,markup:l=n,options:u=null,value:d=n,variant:f=n}=t,p=(e,t)=>{if(e){let n=u?.(e,t);if(d)for(let n of Object.values(e))d(n,t,`option`);n?.()}},m=(e,t)=>{if(e){let n=a?.(e,t);if(d)for(let n of Object.values(e))n!==!0&&d(n,t,`attribute`);n?.()}},h=(e,t)=>{if(typeof e==`object`){let n;switch(e.type){case`expression`:if(n=s?.(e,t),e.arg&&d?.(e.arg,t,`arg`),e.functionRef){let n=i?.(e.functionRef,t,e.arg);p(e.functionRef.options,t),n?.()}m(e.attributes,t);break;case`markup`:n=l?.(e,t),p(e.options,t),m(e.attributes,t);break}n?.()}},g=e=>{let t=r?.(e);for(let t of e)h(t,`placeholder`);t?.()};for(let t of e.declarations){let e=o?.(t);t.value&&h(t.value,`declaration`),e?.()}if(e.type===`message`)g(e.pattern);else{if(d)for(let t of e.selectors)d(t,`selector`,`arg`);for(let t of e.variants){let e=f?.(t);c&&t.keys.forEach(c),g(t.value),e?.()}}}var Aee=o((()=>{}));function jee(e,t=(e,t)=>{throw new _m(e,t)}){let n=0,r=null,i=new Set,a=new Set,o=new Set,s=new Set,c=new Set,l=new Set,u=!0;kee(e,{declaration(e){if(e.name)return(e.value.functionRef||e.type===`local`&&e.value.arg?.type===`variable`&&i.has(e.value.arg.name))&&i.add(e.name),e.type===`local`&&s.add(e.name),u=e.type===`local`,()=>{a.has(e.name)?t(`duplicate-declaration`,e):a.add(e.name)}},expression({functionRef:e}){e&&o.add(e.name)},value(e,o,s){if(e.type===`variable`)switch(c.add(e.name),o){case`declaration`:(s!==`arg`||u)&&a.add(e.name);break;case`selector`:n+=1,r=e,i.has(e.name)||t(`missing-selector-annotation`,e)}},variant(e){let{keys:i}=e;i.length!==n&&t(`key-mismatch`,e);let a=JSON.stringify(i.map(e=>e.type===`literal`?e.value:0));l.has(a)?t(`duplicate-variant`,e):l.add(a),r&&=i.every(e=>e.type===`*`)?null:e}}),r&&t(`missing-fallback`,r);for(let e of s)c.delete(e);return{functions:o,variables:c}}var Mee=o((()=>{bm(),Aee()}));function Pm(e){if(e)try{typeof e==`string`&&(e=new Intl.Locale(e));let t=e.getTextInfo?.()??e.textInfo;if(t?.direction)return t.direction;let n=e.maximize().script;if(n)return Nee.includes(n)?`rtl`:`ltr`}catch{}return`auto`}var Nee,Fm=o((()=>{Nee=`Adlm,Arab,Hebr,Mand,Nkoo,Rohg,Syrc,Thaa`}));function Pee(e){if(e&&typeof e==`object`&&(e=e.valueOf()),typeof e==`boolean`)return e;if(e&&typeof e==`object`&&(e=String(e)),e===`true`)return!0;if(e===`false`)return!1;throw RangeError(`Not a boolean`)}function Im(e){if(e&&typeof e==`object`&&(e=e.valueOf()),e&&typeof e==`object`&&(e=String(e)),typeof e==`string`&&/^(0|[1-9][0-9]*)$/.test(e)&&(e=Number(e)),typeof e==`number`&&e>=0&&Number.isInteger(e))return e;throw RangeError(`Not a positive integer`)}function Lm(e){if(e&&typeof e==`object`&&(e=e.valueOf()),typeof e==`string`)return e;if(e&&typeof e==`object`)return String(e);throw RangeError(`Not a string`)}var Rm=o((()=>{}));function zm(e){let t;if(typeof e==`object`){let n=e?.valueOf;typeof n==`function`&&(t=e.options,e=n.call(e))}if(typeof e==`string`)try{e=JSON.parse(e)}catch{}if(typeof e!=`bigint`&&typeof e!=`number`)throw new ym(`bad-operand`,`Input is not numeric`);return{value:e,options:t}}function Bm(e,t,n,r){let{dir:i,locales:a}=e;n.useGrouping===`never`&&(n.useGrouping=!1),r&&`select`in n&&!e.literalOptionKeys.has(`select`)&&(e.onError(`bad-option`,`The option select may only be set by a literal value`),r=!1);let o,s,c,l;return{type:`number`,get dir(){return i??=(o??=Intl.NumberFormat.supportedLocalesOf(a,n)[0],Pm(o)),i},get options(){return{...n}},selectKey:r?e=>{let r=t;n.style===`percent`&&(typeof r==`bigint`?r*=100n:r*=100);let i=String(r);if(e.has(i))return i;if(n.select===`exact`)return null;let o=n.select?{...n,select:void 0,type:n.select}:n;return c??=new Intl.PluralRules(a,o).select(Number(r)),e.has(c)?c:null}:void 0,toParts(){s??=new Intl.NumberFormat(a,n);let e=s.formatToParts(t);return o??=s.resolvedOptions().locale,i??=Pm(o),i===`ltr`||i===`rtl`?[{type:`number`,dir:i,locale:o,parts:e}]:[{type:`number`,locale:o,parts:e}]},toString(){return s??=new Intl.NumberFormat(a,n),l??=s.format(t),l},valueOf:()=>t}}function Vm(e,t,n){let r=zm(n),i=r.value,a=Object.assign({},r.options,{localeMatcher:e.localeMatcher,style:`decimal`});for(let[n,r]of Object.entries(t))if(r!==void 0)try{switch(n){case`minimumIntegerDigits`:case`minimumFractionDigits`:case`maximumFractionDigits`:case`minimumSignificantDigits`:case`maximumSignificantDigits`:case`roundingIncrement`:a[n]=Im(r);break;case`roundingMode`:case`roundingPriority`:case`select`:case`signDisplay`:case`trailingZeroDisplay`:case`useGrouping`:a[n]=Lm(r)}}catch{e.onError(`bad-option`,`Value ${r} is not valid for :number option ${n}`)}return Bm(e,i,a,!0)}function Fee(e,t,n){let r=zm(n),i=Number.isFinite(r.value)?Math.round(r.value):r.value,a=Object.assign({},r.options,{maximumFractionDigits:0,minimumFractionDigits:void 0,minimumSignificantDigits:void 0,style:`decimal`});for(let[n,r]of Object.entries(t))if(r!==void 0)try{switch(n){case`minimumIntegerDigits`:case`maximumSignificantDigits`:a[n]=Im(r);break;case`select`:case`signDisplay`:case`useGrouping`:a[n]=Lm(r)}}catch{e.onError(`bad-option`,`Value ${r} is not valid for :integer option ${n}`)}return Bm(e,i,a,!0)}var Hm=o((()=>{Fm(),bm(),Rm()}));function Iee(e,t,n){let r=zm(n),i=Object.assign({},r.options,{localeMatcher:e.localeMatcher,style:`currency`});for(let[n,r]of Object.entries(t))if(r!==void 0)try{switch(n){case`currency`:case`currencySign`:case`roundingMode`:case`roundingPriority`:case`trailingZeroDisplay`:case`useGrouping`:i[n]=Lm(r);break;case`minimumIntegerDigits`:case`minimumSignificantDigits`:case`maximumSignificantDigits`:case`roundingIncrement`:i[n]=Im(r);break;case`currencyDisplay`:{let t=Lm(r);t===`never`?e.onError(`unsupported-operation`,`Currency display "never" is not yet supported`):i[n]=t;break}case`fractionDigits`:{let e=Lm(r);if(e===`auto`)i.minimumFractionDigits=void 0,i.maximumFractionDigits=void 0;else{let t=Im(e);i.minimumFractionDigits=t,i.maximumFractionDigits=t}break}}}catch{e.onError(`bad-option`,`Value ${r} is not valid for :currency option ${n}`)}if(!i.currency)throw new ym(`bad-operand`,`A currency code is required for :currency`);return Bm(e,r.value,i,!1)}var Lee=o((()=>{bm(),Hm(),Rm()}));function Um(e,t,n,r){let i={localeMatcher:t.localeMatcher},a=r;if(typeof a==`object`&&a){let t=a.options;t&&(i.calendar=t.calendar,e!==`date`&&(i.hour12=t.hour12),i.timeZone=t.timeZone),typeof a.valueOf==`function`&&(a=a.valueOf())}switch(typeof a){case`number`:case`string`:a=new Date(a)}if(!(a instanceof Date)||isNaN(a.getTime()))throw new ym(`bad-operand`,`Input is not a valid date`);if(n.calendar!==void 0)try{i.calendar=Lm(n.calendar)}catch{t.onError(`bad-option`,`Invalid :${e} calendar option value`)}if(n.hour12!==void 0&&e!==`date`)try{i.hour12=Pee(n.hour12)}catch{t.onError(`bad-option`,`Invalid :${e} hour12 option value`)}if(n.timeZone!==void 0){let r;try{r=Lm(n.timeZone)}catch{t.onError(`bad-option`,`Invalid :${e} timeZone option value`)}if(r===`input`)i.timeZone===void 0&&t.onError(`bad-operand`,`Missing input timeZone value for :${e}`);else if(r!==void 0){if(i.timeZone!==void 0&&r!==i.timeZone)throw new ym(`bad-option`,`Time zone conversion is not supported`);i.timeZone=r}}if(e!==`time`){let r=e===`date`?`fields`:`dateFields`,a=e===`date`?`length`:`dateLength`,o=Wm(t,n,r,Gm)??`year-month-day`,s=Wm(t,n,a,Km),c=new Set(o.split(`-`));c.has(`year`)&&(i.year=`numeric`),c.has(`month`)&&(i.month=s===`long`?`long`:s===`short`?`numeric`:`short`),c.has(`day`)&&(i.day=`numeric`),c.has(`weekday`)&&(i.weekday=s===`long`?`long`:`short`)}if(e!==`date`){switch(Wm(t,n,e===`time`?`precision`:`timePrecision`,qm)){case`hour`:i.hour=`numeric`;break;case`second`:i.hour=`numeric`,i.minute=`numeric`,i.second=`numeric`;break;default:i.hour=`numeric`,i.minute=`numeric`}i.timeZoneName=Wm(t,n,`timeZoneStyle`,Jm)}let o=new Intl.DateTimeFormat(t.locales,i),s=t.dir,c,l;return{type:`datetime`,get dir(){return s??=(c??=o.resolvedOptions().locale,Pm(c)),s},get options(){return{...i}},toParts(){let e=o.formatToParts(a);return c??=o.resolvedOptions().locale,s??=Pm(c),s===`ltr`||s===`rtl`?[{type:`datetime`,dir:s,locale:c,parts:e}]:[{type:`datetime`,locale:c,parts:e}]},toString(){return l??=o.format(a),l},valueOf:()=>a}}function Wm(e,t,n,r){let i=t[n];if(i!==void 0)try{let e=Lm(i);if(r&&!r.has(e))throw Error();return e}catch{e.onError(`bad-option`,`Invalid value for ${n} option`)}}var Gm,Km,qm,Jm,Ym,Xm,Zm,Ree=o((()=>{Fm(),bm(),Rm(),Gm=new Set([`weekday`,`day-weekday`,`month-day`,`month-day-weekday`,`year-month-day`,`year-month-day-weekday`]),Km=new Set([`long`,`medium`,`short`]),qm=new Set([`hour`,`minute`,`second`]),Jm=new Set([`long`,`short`]),Ym=(e,t,n)=>Um(`datetime`,e,t,n),Xm=(e,t,n)=>Um(`date`,e,t,n),Zm=(e,t,n)=>Um(`time`,e,t,n)}));function zee(e,t,n){let{value:r,options:i}=zm(n),a;try{a=`add`in t?Im(t.add):-1}catch{throw new ym(`bad-option`,`Value ${t.add} is not valid for :offset option add`)}let o;try{o=`subtract`in t?Im(t.subtract):-1}catch{throw new ym(`bad-option`,`Value ${t.subtract} is not valid for :offset option subtract`)}if(a<0==o<0)throw new ym(`bad-option`,`Exactly one of "add" or "subtract" is required as an :offset option`);let s=a<0?-o:a;return typeof r==`number`?r+=s:r+=BigInt(s),Vm(e,{},{valueOf:()=>r,options:i})}var Bee=o((()=>{bm(),Hm(),Rm()}));function Vee(e,t,n){let r=zm(n),i=Object.assign({},r.options,{localeMatcher:e.localeMatcher,style:`percent`});for(let[n,r]of Object.entries(t))if(r!==void 0)try{switch(n){case`roundingMode`:case`roundingPriority`:case`signDisplay`:case`trailingZeroDisplay`:case`useGrouping`:i[n]=Lm(r);break;case`minimumFractionDigits`:case`maximumFractionDigits`:case`minimumSignificantDigits`:case`maximumSignificantDigits`:i[n]=Im(r);break}}catch{e.onError(`bad-option`,`Value ${r} is not valid for :percent option ${n}`)}return Bm(e,r.value,i,!0)}var Hee=o((()=>{Hm(),Rm()}));function Qm(e,t,n){let r=n===void 0?``:String(n),i=r.normalize();return{type:`string`,dir:e.dir??`auto`,selectKey:e=>e.has(i)?i:null,toParts(){let{dir:t}=e,n=e.locales[0];return t===`ltr`||t===`rtl`?[{type:`string`,dir:t,locale:n,value:r}]:[{type:`string`,locale:n,value:r}]},toString:()=>r,valueOf:()=>r}}var $m=o((()=>{}));function Uee(e,t,n){let r=zm(n),i=Object.assign({},r.options,{localeMatcher:e.localeMatcher,style:`unit`});for(let[n,r]of Object.entries(t))if(r!==void 0)try{switch(n){case`signDisplay`:case`roundingMode`:case`roundingPriority`:case`trailingZeroDisplay`:case`unit`:case`unitDisplay`:case`useGrouping`:i[n]=Lm(r);break;case`minimumIntegerDigits`:case`minimumFractionDigits`:case`maximumFractionDigits`:case`minimumSignificantDigits`:case`maximumSignificantDigits`:case`roundingIncrement`:i[n]=Im(r);break}}catch(t){t instanceof hm?e.onError(t):e.onError(`bad-option`,`Value ${r} is not valid for :currency option ${n}`)}if(!i.unit)throw new ym(`bad-operand`,`A unit identifier is required for :unit`);return Bm(e,r.value,i,!1)}var Wee=o((()=>{bm(),Hm(),Rm()})),eh,th,nh=o((()=>{Fm(),Lee(),Ree(),Hm(),Bee(),Hee(),$m(),Wee(),eh={integer:Fee,number:Vm,offset:zee,string:Qm},eh=Object.freeze(Object.assign(Object.create(null),eh)),th={currency:Iee,date:Xm,datetime:Ym,percent:Vee,time:Zm,unit:Uee},th=Object.freeze(Object.assign(Object.create(null),th))})),rh,ih=o((()=>{rh=Symbol(`bidi-isolate`)})),ah,oh=o((()=>{ah=(e=`�`)=>({type:`fallback`,source:e,toParts:()=>[{type:`fallback`,source:e}],toString:()=>`{${e}}`})})),sh,Gee=o((()=>{sh=(e,t)=>({type:`unknown`,source:e,dir:`auto`,toParts:()=>[{type:`unknown`,value:t}],toString:()=>String(t),valueOf:()=>t})})),ch,lh=o((()=>{bm(),bh(),ch=class{#e;#t;#n;dir;id;constructor(e,t,n){this.#e=e,this.#n=t,this.dir=void 0;let r=n&&Object.hasOwn(n,`u:dir`)?n[`u:dir`]:void 0;if(r){let t=String(vh(e,r));if(t===`ltr`||t===`rtl`||t===`auto`)this.dir=t;else if(t!==`inherit`){let t=new ym(`bad-option`,`Unsupported value for u:dir option`);t.source=yh(r),e.onError(t)}}let i=n&&Object.hasOwn(n,`u:id`)?n[`u:id`]:void 0;if(this.id=i?String(vh(e,i)):void 0,n){this.#t=new Set;for(let[e,t]of Object.entries(n))t.type===`literal`&&this.#t.add(e)}}get literalOptionKeys(){return new Set(this.#t)}get localeMatcher(){return this.#e.localeMatcher}get locales(){return this.#e.locales.map(String)}onError(e,t){let n;e instanceof ym?n=e:typeof e==`string`&&typeof t==`string`?n=new ym(e,t):(n=new ym(`function-error`,String(e)),n.cause=e),n.source=this.#n,this.#e.onError(n)}}}));function Kee(e,t,{name:n,options:r}){let i=`:${n}`,a=yh(t)??i;try{let o=t?[vh(e,t)]:[],s=e.functions[n];if(!s)throw new vm(`unknown-function`,`Unknown function ${i}`,a);let c=new ch(e,a,r),l=s(c,qee(e,r),...o);if(typeof l!=`object`||!l||typeof l.type!=`string`)throw new vm(`bad-function-result`,`Function ${i} did not return a MessageValue`,a);let u={source:a};return c.dir&&(u.dir=c.dir,u[rh]=!0),c.id&&typeof l.toParts==`function`&&(u.toParts=()=>{let e=l.toParts();for(let t of e)t.id=c.id;return e}),{...l,...u}}catch(t){return e.onError(t instanceof hm?t:new vm(`bad-function-result`,String(t),a,t)),ah(a)}}function qee(e,t){let n=Object.create(null);if(t)for(let[r,i]of Object.entries(t))r.startsWith(`u:`)||(n[r]=vh(e,i));return n}var Jee=o((()=>{bm(),oh(),ih(),lh(),bh()}));function uh(e,{arg:t,functionRef:n}){if(n)return Kee(e,t,n);switch(t?.type){case`literal`:{let n=`|${t.value}|`,r=Qm(new ch(e,n),{},t.value);return r.source=n,r}case`variable`:return mh(e,t);default:throw Error(`Unsupported expression: ${t?.type}`)}}var dh=o((()=>{$m(),lh(),Jee(),_h()}));function fh(e,t){if(gh(e)){if(t in e)return e[t];let n=t.split(`.`);for(let t=n.length-1;t>0;--t){let r=n.slice(0,t).join(`.`);if(r in e){let i=n.slice(t).join(`.`);return fh(e[r],i)}}for(let[n,r]of Object.entries(e))if(n.normalize()===t)return r}}function ph(e,{name:t}){let n=fh(e.scope,t);if(n===void 0){let n=`$`+t,r=`Variable not available: ${n}`;e.onError(new vm(`unresolved-variable`,r,n))}else if(n instanceof hh){let r=uh(n.scope?{...e,scope:n.scope}:e,n.expression);return e.scope[t]=r,e.localVars.add(r),r}return n}function mh(e,t){let n=`$`+t.name,r=ph(e,t);if(r===void 0)return ah(n);let i=typeof r;if(i===`object`){let t=r;if(t.type===`fallback`)return ah(n);if(e.localVars.has(t))return t.source=n,t;r instanceof Number?i=`number`:r instanceof String&&(i=`string`)}let a;switch(i){case`bigint`:case`number`:a=e.functions.number;break;case`string`:a=e.functions.string;break;default:return sh(n,r)}let o=new ch(e,n),s=a(o,{},r);return s.source=n,s}var hh,gh,_h=o((()=>{bm(),oh(),Gee(),lh(),dh(),hh=class{expression;scope;constructor(e,t){this.expression=e,this.scope=t}},gh=e=>e!==null&&(typeof e==`object`||typeof e==`function`)}));function vh(e,t){switch(t.type){case`literal`:return t.value;case`variable`:return ph(e,t);default:throw Error(`Unsupported value: ${t.type}`)}}function yh(e){switch(e?.type){case`literal`:return`|`+e.value.replaceAll(`\\`,`\\\\`).replaceAll(`|`,`\\|`)+`|`;case`variable`:return`$`+e.name;default:return}}var bh=o((()=>{_h()}));function xh(e,{kind:t,name:n,options:r}){let i={type:`markup`,kind:t,name:n},a=r?Object.entries(r):null;if(a?.length){i.options={};for(let[t,n]of a)if(t===`u:dir`){let r=new ym(`bad-option`,`The option ${t} is not valid for markup`);r.source=yh(n),e.onError(r)}else{let r=vh(e,n);typeof r==`object`&&typeof r?.valueOf==`function`&&(r=r.valueOf()),t===`u:id`?i.id=String(r):i.options[t]=r}}return i}var Yee=o((()=>{bm(),bh()}));function Sh(e,t){if(t.type===`message`)return t.pattern;let n=t.selectors.map(t=>{let n=mh(e,t),r;return typeof n.selectKey==`function`?r=n.selectKey.bind(n):(e.onError(new vm(`bad-selector`,`Selector does not support selection`,n.source)),r=()=>null),{selectKey:r,source:n.source,best:null,keys:null}}),r=t.variants;loop:for(let i=0;i<n.length;++i){let a=n[i];if(!a.keys){a.keys=new Set;for(let{keys:e}of r){let t=e[i];if(!t)break loop;t.type!==`*`&&a.keys.add(t.value)}}try{a.best=a.keys.size?a.selectKey(a.keys):null}catch(t){e.onError(new vm(`bad-selector`,`Selection failed`,a.source,t)),a.selectKey=()=>null,a.best=null}if(r=r.filter(e=>{let t=e.keys[i];return t.type===`*`?a.best==null:a.best===t.value}),r.length===0){if(i===0)break;let e=n[i-1];e.best==null?e.keys?.clear():e.keys?.delete(e.best);for(let e=i;e<n.length;++e)n[e].keys=null;r=t.variants,i=-1}}let i=r[0];return i?i.value:(e.onError(new vm(`no-match`,`No variant was selected!?`,`.match`)),[])}var Xee=o((()=>{bm(),_h()})),Ch,Zee=o((()=>{Oee(),Mee(),Fm(),bm(),nh(),ih(),Yee(),dh(),_h(),Xee(),Ch=class{#e;#t;#n;#r;#i;#a;constructor(e,t,n){this.#e=n?.bidiIsolation!==`none`,this.#n=n?.localeMatcher??`best fit`,this.#r=Array.isArray(e)?e.map(e=>new Intl.Locale(e)):e?[new Intl.Locale(e)]:[],this.#t=n?.dir??Pm(this.#r[0]),this.#i=typeof t==`string`?gee(t):t,jee(this.#i),this.#a=n?.functions?Object.assign(Object.create(null),eh,n.functions):eh}format(e,t){let n=this.#o(e,t),r=``;for(let e of Sh(n,this.#i))if(typeof e==`string`)r+=e;else if(e.type===`markup`)xh(n,e);else{let t;try{if(t=uh(n,e),typeof t.toString==`function`)if(this.#e&&(this.#t!==`ltr`||t.dir!==`ltr`||t[rh])){let e=t.dir===`ltr`?`⁦`:t.dir===`rtl`?`⁧`:`⁨`;r+=e+t.toString()+`⁩`}else r+=t.toString();else{let e=new ym(`not-formattable`,`Message part is not formattable`);throw e.source=t.source,e}}catch(e){n.onError(e);let i=`{${t?.source??`�`}}`;r+=this.#e?`⁨`+i+`⁩`:i}}return r}formatToParts(e,t){let n=this.#o(e,t),r=[];for(let e of Sh(n,this.#i))if(typeof e==`string`)r.push({type:`text`,value:e});else if(e.type===`markup`)r.push(xh(n,e));else{let t;try{if(t=uh(n,e),typeof t.toParts==`function`){let e=t.toParts();if(this.#e&&(this.#t!==`ltr`||t.dir!==`ltr`||t[rh])){let n=t.dir===`ltr`?`⁦`:t.dir===`rtl`?`⁧`:`⁨`;r.push({type:`bidiIsolation`,value:n},...e,{type:`bidiIsolation`,value:`⁩`})}else r.push(...e)}else{let e=new ym(`not-formattable`,`Message part is not formattable`);throw e.source=t.source,e}}catch(e){n.onError(e);let i={type:`fallback`,source:t?.source??`�`};this.#e?r.push({type:`bidiIsolation`,value:`⁨`},i,{type:`bidiIsolation`,value:`⁩`}):r.push(i)}}return r}#o(e,t=e=>{try{process.emitWarning(e)}catch{console.warn(e)}}){let n={...e};for(let t of this.#i.declarations)n[t.name]=new hh(t.value,t.type===`input`?e??{}:void 0);return{onError:t,localeMatcher:this.#n,locales:this.#r,localVars:new WeakSet,functions:this.#a,scope:n}}}})),Qee=o((()=>{Oee(),pm(),Mee(),bm(),Zee()})),$ee=o((()=>{J(),yr(),Pt(),Qi()})),ete=o((()=>{yr(),Pt(),Qi()})),wh,tte=o((()=>{b(),yr(),Pt(),Qi(),wh=class extends Map{#e=new Map;#t=N(0);#n=N(0);#r=Zi||-1;constructor(e){if(super(),e){for(var[t,n]of e)super.set(t,n);this.#n.v=super.size}}#i(e){return Zi===this.#r?N(e):ur(e)}has(e){var t=this.#e,n=t.get(e);if(n===void 0)if(super.has(e))n=this.#i(0),t.set(e,n);else return z(this.#t),!1;return z(n),!0}forEach(e,t){this.#a(),super.forEach(e,t)}get(e){var t=this.#e,n=t.get(e);if(n===void 0)if(super.has(e))n=this.#i(0),t.set(e,n);else{z(this.#t);return}return z(n),super.get(e)}set(e,t){var n=this.#e,r=n.get(e),i=super.get(e),a=super.set(e,t),o=this.#t;if(r===void 0)r=this.#i(0),n.set(e,r),P(this.#n,super.size),mr(o);else if(i!==t){mr(r);var s=o.reactions===null?null:new Set(o.reactions);(s===null||!r.reactions?.every(e=>s.has(e)))&&mr(o)}return a}delete(e){var t=this.#e,n=t.get(e),r=super.delete(e);return n!==void 0&&(t.delete(e),P(n,-1)),r&&(P(this.#n,super.size),mr(this.#t)),r}clear(){if(super.size!==0){super.clear();var e=this.#e;P(this.#n,0);for(var t of e.values())P(t,-1);mr(this.#t),e.clear()}}#a(){z(this.#t);var e=this.#e;if(this.#n.v!==e.size){for(var t of super.keys())if(!e.has(t)){var n=this.#i(0);e.set(t,n)}}for([,n]of this.#e)z(n)}keys(){return z(this.#t),super.keys()}values(){return this.#a(),super.values()}entries(){return this.#a(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return z(this.#n),super.size}}})),Th=o((()=>{yr(),Pt(),Qi(),Eh()})),Eh=o((()=>{yr(),Pt(),Qi(),Th()})),Dh=o((()=>{Ta()})),nte=o((()=>{Tn()})),rte=o((()=>{Dh(),nte()})),Oh=o((()=>{$ee(),ete(),tte(),Eh(),Th(),rte(),Tn()})),kh,Ah,jh,Mh,Nh,Ph,Fh,Ih,Lh,Rh,zh,ite,Bh,ate,Vh,ote,Hh,ste,Uh,Y,X=o((()=>{J(),Qee(),nh(),Oh(),Intl.MessageFormat??=Ch,kh=N(``),Ah=br([]),jh=br({}),Mh=``,Nh=``,Fh=new Set([`ar`,`arc`,`ckb`,`dv`,`fa`,`ha`,`he`,`khw`,`ks`,`ku`,`nqo`,`ps`,`sd`,`ug`,`ur`,`yi`]),Ih=e=>e.textInfo?.direction??(Fh.has(e.language)?`rtl`:`ltr`),Lh=(e=z(kh))=>{if(!e)return!1;try{return Ih(new Intl.Locale(e))===`rtl`}catch{return!1}},Rh=(e,t)=>{if(!e||!t.length||t.includes(e))return e;try{let n=new Intl.Locale(e).language;return t.find(e=>{try{return new Intl.Locale(e).language===n}catch{return!1}})??e}catch{return e}},zh=(e,t=``)=>Object.entries(e).reduce((e,[n,r])=>{let i=t?`${t}.${n}`:n;return typeof r==`object`&&r&&!Array.isArray(r)?Object.assign(e,zh(r,i)):e[i]=r,e},Object.create(null)),ite=e=>{Ah.includes(e)||(Ah.push(e),Nh=Rh(Mh,Ah))},Bh=(e,...t)=>{if(typeof e!=`string`||!e)throw TypeError(`addMessages: localeCode must be a non-empty string (got ${JSON.stringify(e)})`);t.forEach((e,t)=>{if(typeof e!=`object`||!e||Array.isArray(e))throw TypeError(`addMessages: maps[${t}] must be a plain object (got ${Array.isArray(e)?`array`:typeof e})`)}),ite(e),jh[e]??={},t.forEach(t=>{Object.entries(zh(t)).forEach(([t,n])=>{jh[e][t]=new Intl.MessageFormat(e,String(n),{functions:th})})}),z(kh)&&!Ah.includes(z(kh))&&Hh.set(z(kh))},ate=new wh,Vh=new wh,ote=(e=z(kh))=>{if(typeof e!=`string`)throw TypeError(`waitLocale: localeCode must be a string (got ${typeof e})`);if(!e)return Promise.resolve();if(!Vh.has(e)){let t=ate.get(e);if(t){let n=Promise.resolve(t()).then(t=>{Bh(e,t)},()=>{Vh.delete(e),z(kh)===e&&!jh[e]&&Nh&&P(kh,Nh,!0)});Vh.set(e,n)}else Vh.set(e,Promise.resolve())}return Vh.get(e)??Promise.resolve()},Hh={get current(){return z(kh)},set(e){if(typeof e!=`string`)throw TypeError(`locale.set: value must be a string (got ${typeof e})`);let t=Ah.length?Rh(e,Ah):e;if(e&&Ah.length&&!Ah.includes(t)&&Nh&&Ah.includes(Nh)&&(t=Nh),P(kh,t,!0),typeof document<`u`&&t){document.documentElement.lang=t;try{let e=new Intl.Locale(t);document.documentElement.dir=Ih(e)}catch{}}return ote(t)}},ste=()=>typeof navigator>`u`?void 0:navigator.languages?.[0]??navigator.language,Uh=e=>{if(!e||typeof e.fallbackLocale!=`string`)throw TypeError(`init: fallbackLocale must be a string (got ${JSON.stringify(e?.fallbackLocale)})`);if(e.initialLocale!==void 0&&typeof e.initialLocale!=`string`)throw TypeError(`init: initialLocale must be a string (got ${typeof e.initialLocale})`);if(e.handleMissingMessage!==void 0&&typeof e.handleMissingMessage!=`function`)throw TypeError(`init: handleMissingMessage must be a function (got ${typeof e.handleMissingMessage})`);Mh=e.fallbackLocale,Nh=Rh(Mh,Ah),Ph=e.handleMissingMessage,e.formats,e.initialLocale&&Hh.set(e.initialLocale)},Y=(e,{values:t={},locale:n,default:r}={})=>{if(e==null)throw TypeError(`format: key must be a string or message object (got ${JSON.stringify(e)})`);if(typeof e==`object`){let{id:t,values:n={},locale:r,default:i}=e;return Y(t,{values:n,locale:r,default:i})}let i=n??z(kh),a=Nh,o=jh[i]?.[e]?.format(t)??(i===a?void 0:jh[a]?.[e]?.format(t));if(o!==void 0)return o;if(Ph){let t=Ph(e,i,r);if(t!==void 0)return t}return r??e}})),cte=s(((e,t)=>{var n=function(e){return r(e)&&!i(e)};function r(e){return!!e&&typeof e==`object`}function i(e){var t=Object.prototype.toString.call(e);return t===`[object RegExp]`||t===`[object Date]`||o(e)}var a=typeof Symbol==`function`&&Symbol.for?Symbol.for(`react.element`):60103;function o(e){return e.$$typeof===a}function s(e){return Array.isArray(e)?[]:{}}function c(e,t){return t.clone!==!1&&t.isMergeableObject(e)?g(s(e),e,t):e}function l(e,t,n){return e.concat(t).map(function(e){return c(e,n)})}function u(e,t){if(!t.customMerge)return g;var n=t.customMerge(e);return typeof n==`function`?n:g}function d(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function f(e){return Object.keys(e).concat(d(e))}function p(e,t){try{return t in e}catch{return!1}}function m(e,t){return p(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function h(e,t,n){var r={};return n.isMergeableObject(e)&&f(e).forEach(function(t){r[t]=c(e[t],n)}),f(t).forEach(function(i){m(e,i)||(p(e,i)&&n.isMergeableObject(t[i])?r[i]=u(i,n)(e[i],t[i],n):r[i]=c(t[i],n))}),r}function g(e,t,r){r||={},r.arrayMerge=r.arrayMerge||l,r.isMergeableObject=r.isMergeableObject||n,r.cloneUnlessOtherwiseSpecified=c;var i=Array.isArray(t);return i===Array.isArray(e)?i?r.arrayMerge(e,t,r):h(e,t,r):c(t,r)}g.all=function(e,t){if(!Array.isArray(e))throw Error(`first argument should be an array`);return e.reduce(function(e,n){return g(e,n,t)},{})},t.exports=g}));function Wh(e){if(e&&typeof e==`object`)switch(e[Qh]){case Jh:case Zh:return!0}return!1}function Gh(e){if(e&&typeof e==`object`)switch(e[Qh]){case Kh:case Jh:case Xh:case Zh:return!0}return!1}var Kh,qh,Jh,Yh,Xh,Zh,Qh,$h,eg,tg,ng,rg,ig,ag,og=o((()=>{Kh=Symbol.for(`yaml.alias`),qh=Symbol.for(`yaml.document`),Jh=Symbol.for(`yaml.map`),Yh=Symbol.for(`yaml.pair`),Xh=Symbol.for(`yaml.scalar`),Zh=Symbol.for(`yaml.seq`),Qh=Symbol.for(`yaml.node.type`),$h=e=>!!e&&typeof e==`object`&&e[Qh]===Kh,eg=e=>!!e&&typeof e==`object`&&e[Qh]===qh,tg=e=>!!e&&typeof e==`object`&&e[Qh]===Jh,ng=e=>!!e&&typeof e==`object`&&e[Qh]===Yh,rg=e=>!!e&&typeof e==`object`&&e[Qh]===Xh,ig=e=>!!e&&typeof e==`object`&&e[Qh]===Zh,ag=e=>(rg(e)||Wh(e))&&!!e.anchor}));function sg(e,t){let n=dg(t);eg(e)?cg(null,e.contents,n,Object.freeze([e]))===gg&&(e.contents=null):cg(null,e,n,Object.freeze([]))}function cg(e,t,n,r){let i=fg(e,t,n,r);if(Gh(i)||ng(i))return pg(e,r,i),cg(e,i,n,r);if(typeof i!=`symbol`){if(Wh(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=cg(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===mg)return mg;else i===gg&&(t.items.splice(e,1),--e)}}else if(ng(t)){r=Object.freeze(r.concat(t));let e=cg(`key`,t.key,n,r);if(e===mg)return mg;e===gg&&(t.key=null);let i=cg(`value`,t.value,n,r);if(i===mg)return mg;i===gg&&(t.value=null)}}return i}async function lg(e,t){let n=dg(t);eg(e)?await ug(null,e.contents,n,Object.freeze([e]))===gg&&(e.contents=null):await ug(null,e,n,Object.freeze([]))}async function ug(e,t,n,r){let i=await fg(e,t,n,r);if(Gh(i)||ng(i))return pg(e,r,i),ug(e,i,n,r);if(typeof i!=`symbol`){if(Wh(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=await ug(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===mg)return mg;else i===gg&&(t.items.splice(e,1),--e)}}else if(ng(t)){r=Object.freeze(r.concat(t));let e=await ug(`key`,t.key,n,r);if(e===mg)return mg;e===gg&&(t.key=null);let i=await ug(`value`,t.value,n,r);if(i===mg)return mg;i===gg&&(t.value=null)}}return i}function dg(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function fg(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(tg(t))return n.Map?.(e,t,r);if(ig(t))return n.Seq?.(e,t,r);if(ng(t))return n.Pair?.(e,t,r);if(rg(t))return n.Scalar?.(e,t,r);if($h(t))return n.Alias?.(e,t,r)}function pg(e,t,n){let r=t[t.length-1];if(Wh(r))r.items[e]=n;else if(ng(r))e===`key`?r.key=n:r.value=n;else if(eg(r))r.contents=n;else{let e=$h(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var mg,hg,gg,_g=o((()=>{og(),mg=Symbol(`break visit`),hg=Symbol(`skip children`),gg=Symbol(`remove node`),sg.BREAK=mg,sg.SKIP=hg,sg.REMOVE=gg,lg.BREAK=mg,lg.SKIP=hg,lg.REMOVE=gg})),vg,yg,bg,xg=o((()=>{og(),_g(),vg={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},yg=e=>e.replace(/[!,[\]{}]/g,e=>vg[e]),bg=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags);break}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+yg(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&Gh(e.contents)){let t={};sg(e.contents,(e,n)=>{Gh(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)i===`!!`&&a===`tag:yaml.org,2002:`||(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
46
46
  `)}},bg.defaultYaml={explicit:!1,version:`1.2`},bg.defaultTags={"!!":`tag:yaml.org,2002:`}}));function Sg(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function Cg(e){let t=new Set;return sg(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function wg(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function lte(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=Cg(e);let a=wg(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(rg(t.node)||Wh(t.node)))t.node.anchor=t.anchor;else{let t=Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}var Tg=o((()=>{og(),_g()}));function Eg(e,t,n,r){if(r&&typeof r==`object`)if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=Eg(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=Eg(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=Eg(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=Eg(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}return e.call(t,n,r)}var Dg=o((()=>{}));function Og(e,t,n){if(Array.isArray(e))return e.map((e,t)=>Og(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!ag(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var kg=o((()=>{og()})),Ag,jg=o((()=>{Dg(),og(),kg(),Ag=class{constructor(e){Object.defineProperty(this,Qh,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!eg(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=Og(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?Eg(i,{"":o},``,o):o}}}));function Mg(e,t,n){if($h(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(Wh(t)){let r=0;for(let i of t.items){let t=Mg(e,i,n);t>r&&(r=t)}return r}else if(ng(t)){let r=Mg(e,t.key,n),i=Mg(e,t.value,n);return Math.max(r,i)}return 1}var Ng,Pg=o((()=>{Tg(),_g(),og(),jg(),kg(),Ng=class extends Ag{constructor(e){super(Kh),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError(`Alias resolution is disabled`);let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],sg(e,{Node:(e,t)=>{($h(t)||ag(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}let o=n.get(a);if(o||=(Og(a,null,t),n.get(a)),o?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=Mg(r,a,n)),o.count*o.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`);return o.res}toString(e,t,n){let r=`*${this.source}`;if(e){if(Sg(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}}})),Fg,Ig,Lg=o((()=>{og(),jg(),kg(),Fg=e=>!e||typeof e!=`function`&&typeof e!=`object`,Ig=class extends Ag{constructor(e){super(Xh),this.value=e}toJSON(e,t){return t?.keep?this.value:Og(this.value,e,t)}toString(){return String(this.value)}},Ig.BLOCK_FOLDED=`BLOCK_FOLDED`,Ig.BLOCK_LITERAL=`BLOCK_LITERAL`,Ig.PLAIN=`PLAIN`,Ig.QUOTE_DOUBLE=`QUOTE_DOUBLE`,Ig.QUOTE_SINGLE=`QUOTE_SINGLE`}));function ute(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function Rg(e,t,n){if(eg(e)&&(e=e.contents),Gh(e))return e;if(ng(e)){let t=n.schema[Jh].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??=i(e),new Ng(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=zg+t.slice(2));let l=ute(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new Ig(e);return c&&(c.node=t),t}l=e instanceof Map?o[Jh]:Symbol.iterator in Object(e)?o[Zh]:o[Jh]}a&&(a(l),delete n.onTagObj);let u=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from==`function`?l.nodeClass.from(n.schema,e,n):new Ig(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}var zg,Bg=o((()=>{Pg(),og(),Lg(),zg=`tag:yaml.org,2002:`}));function Vg(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return Rg(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}var Hg,Ug,Wg=o((()=>{Bg(),og(),jg(),Hg=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,Ug=class extends Ag{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>Gh(t)||ng(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Hg(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(Wh(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,Vg(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(Wh(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&rg(i)?i.value:i:Wh(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!ng(t))return!1;let n=t.value;return n==null||e&&rg(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return Wh(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(Wh(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,Vg(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}}}));function Gg(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var Kg,qg,Jg=o((()=>{Kg=e=>e.replace(/^(?!$)(?: $)?/gm,`#`),qg=(e,t,n)=>e.endsWith(`
47
47
  `)?Gg(n,t):n.includes(`
@@ -640,31 +640,31 @@ f(),Np(),JT(),Ny(),mp(),dw(),EC(),IC(),Lre(),Gy(),YT=e=>JSON.parse(e),XT=e=>d(si
640
640
  `,oA=async(e,t)=>{if(!e.length)return{};let{isSelfHosted:n=!1}=Gk,r=n?20:100,i=[...e],a=[];for(;;){let e=await GD(t,{paths:i.splice(0,r)});if(a.push(...e.project.repository.blobs.nodes),!i.length)break}return Object.fromEntries(e.map((e,t)=>[e,a[t]]))},sA=async({fetchingFiles:e,blobs:t,sizes:n={},commits:r={}})=>{let i=e.map(({path:e,sha:i})=>{let a=r[e],o={sha:i,size:Number(n[e]?.size??0),text:t[e]?.rawTextBlob??void 0,meta:{}};if(a){let{author:e,authorName:t,authorEmail:n,committedDate:r}=a,{id:i,username:s}=e??{},c=i?.match(/\d+/);o.meta={commitAuthor:{name:t,email:n,id:c?Number(c[0]):void 0,login:s},committedDate:new Date(r)}}return[e,o]});return Object.fromEntries(i)},cA=async e=>{fC.set(0);let t=window.setInterval(()=>{fC.update((e=0)=>e+1)},e.length/10),n=e.filter(({type:e})=>e!==`asset`).map(({path:e})=>e),r=await oA(n,aA);return window.clearInterval(t),fC.set(void 0),sA({fetchingFiles:e,blobs:r})},lA=async()=>{await qk(),await IO({repository:Gk,fetchDefaultBranchName:Yk,fetchLastCommit:Qk,fetchFileList:iA,fetchFileContents:cA})},uA=async e=>{let{owner:t,repo:n,branch:r=``}=Gk,{path:i}=e;return WD(`/projects/${encodeURIComponent(`${t}/${n}`)}/repository/files/${encodeURIComponent(i)}/raw?lfs=true&ref=${encodeURIComponent(r)}`,{responseType:`blob`})}})),dA,fA,pA,Iie=o((()=>{zD(),dA=`https://status.gitlab.com/`,fA=`https://status-api.hostedstatus.com/1.0/status/5b36dc6502d06804c08349f7`,pA=async()=>{try{let{result:{status_overall:{status_code:e}}}=await RD(fA);if(e===100)return`none`;if([200,300,400].includes(e))return`minor`;if([500,600].includes(e))return`major`}catch{}return`unknown`}})),mA,hA,gA,Lie=o((()=>{Np(),qp(),Pie(),nA(),Bk(),Fie(),Xk(),Iie(),KD(),pO(),AF(),JO(),mA=/(?<owner>.+)\/(?<repo>[^/]+)$/,hA=()=>{let{backend:e}=A(TF)??{};if(e?.name!==`gitlab`)return;let{repo:t,branch:n,base_url:r=Rk,auth_endpoint:i=zk,app_id:a=``,api_root:o=Lk,graphql_api_root:s=o.replace(/\/api\/.+$/,`/api/graphql`),include_credentials:c=!1}=e,{owner:l,repo:u}=t.match(mA)?.groups??{},d=`${l}/${u}`,f=`${kp(r)}/${kp(i)}`,p=fO(o,d);return Object.assign(Gk,{service:Fk,label:Ik,owner:l,repo:u,branch:n,repoURL:p,tokenPageURL:Hk(p),databaseName:`${Fk}:${d}`,isSelfHosted:o!==Lk},Kk(p,n)),Object.assign(VD,{clientId:a,authScope:`api`,authURL:f,tokenURL:f.replace(`/authorize`,`/token`),authScheme:`Bearer`,restBaseURL:kp(o),graphqlBaseURL:kp(s),includeCredentials:c}),Object.assign(HD,{fullPath:d,branch:n}),qO.devModeEnabled&&console.info(`repositoryInfo`,Gk),Gk},gA={isGit:!0,name:Fk,label:Ik,repository:Gk,statusDashboardURL:dA,checkStatus:pA,init:hA,signIn:Uk,signOut:Wk,fetchFiles:lA,fetchBlob:uA,commitChanges:$k,fetchFileCommits:tA}})),_A,vA,yA,bA,xA,SA,CA,wA=o((()=>{qp(),yie(),bie(),Tie(),Mie(),Lie(),_A={github:Pk,gitlab:gA,gitea:XO,local:_D,"test-repo":DD},vA={azure:{label:`Azure DevOps`},bitbucket:{label:`Bitbucket`},"git-gateway":{label:`Git Gateway`,deprecated:!0}},yA=Object.keys(_A).filter(e=>e!==`local`),bA=Object.fromEntries(Object.entries(_A).filter(([,e])=>e.isGit)),xA=ln(),SA=un([xA],([e],t,n)=>{n(t=>{let n=e?_A[e]:void 0;return n&&n!==t&&n.init(),n})}),CA=ln(!0)})),TA,EA,DA,OA,kA,AA,jA,MA,NA,PA=o((()=>{qp(),AF(),TA=`https://console.cloudinary.com/console/media_library`,EA=new URL(TA).origin,DA=[`cloud_name`,`api_key`,`username`,`timestamp`,`signature`,`integration`,`use_saml`,`saml_iframe_support`],OA=[`integration`,`inline_container`,`z_index`,`multiple`,`max_files`,`default_transformations`,`insert_caption`,`remove_header`,`folder`,`search`,`collection`,`asset`,`transformation`,`sandboxNotAllowedAttributes`,`theme`],kA=e=>{let t=A(TF);if(e??=t,e?.media_libraries&&`cloudinary`in e.media_libraries)return e.media_libraries.cloudinary;if(!e?.media_library)return;let n=e.media_library.name===`cloudinary`,r=!e.media_library.name&&t?.media_library?.name===`cloudinary`;if(n||r)return e.media_library},AA=new Map,jA=e=>{let t=e?JSON.stringify(e):`global`,n=AA.get(t);if(n)return n;let r=kA()||{config:{}},i=kA(e)||{config:{}},a={...r,...i,config:{...r.config,...i.config}};return AA.set(t,a),a},MA=e=>{let t=kA(e)??kA(),{cloud_name:n,api_key:r}=(t?t.config:void 0)??{};return!!(n&&r)},NA={serviceType:`cloud_storage`,serviceId:`cloudinary`,serviceLabel:`Cloudinary`,serviceURL:`https://cloudinary.com/`,showServiceLink:!0,hotlinking:!0,authType:`widget`,developerURL:`https://cloudinary.com/documentation/`,apiKeyURL:`https://console.cloudinary.com/settings/api-keys`,apiKeyPattern:/^[A-Za-z0-9_-]{15,}$/,isEnabled:MA}})),FA,IA,LA,RA,zA,BA,VA,HA,UA,WA,GA,KA=o((()=>{Kw(),qp(),yT(),AF(),FA=(e,t=A(TF))=>t?.media_libraries?.[e]??(t?.media_library?.name===e?t?.media_library:void 0),IA=async(e,t)=>{let n=new TextEncoder,r=await crypto.subtle.importKey(`raw`,typeof e==`string`?n.encode(e):e,{name:`HMAC`,hash:`SHA-256`},!1,[`sign`]),i=await crypto.subtle.sign(`HMAC`,r,n.encode(t));return new Uint8Array(i)},LA=async e=>{let t=typeof e==`string`?new TextEncoder().encode(e):e,n=await crypto.subtle.digest(`SHA-256`,t);return Array.from(new Uint8Array(n)).map(e=>e.toString(16).padStart(2,`0`)).join(``)},RA=async({method:e,url:t,headers:n,payloadHash:r,accessKeyId:i,secretAccessKey:a,region:o,service:s,date:c})=>{let l=new URL(t),u=c.toISOString().replace(/[:-]|\.\d{3}/g,``),d=u.slice(0,8),f=l.pathname,p=[...l.searchParams.entries()].sort(([e],[t])=>e<t?-1:+(e>t)).map(([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`).join(`&`),m=Object.entries(n).map(([e,t])=>`${e.toLowerCase()}:${t.trim()}`).sort().join(`
641
641
  `),h=Object.keys(n).map(e=>e.toLowerCase()).sort().join(`;`),g=[e,f,p,`${m}\n`,h,r].join(`
642
642
  `),_=`AWS4-HMAC-SHA256`,v=`${d}/${o}/${s}/aws4_request`,y=[_,u,v,await LA(g)].join(`
643
- `),b=await IA(`AWS4${a}`,d),x=await IA(b,o),S=await IA(x,s),C=await IA(S,`aws4_request`),w=await IA(C,y),T=Array.from(w).map(e=>e.toString(16).padStart(2,`0`)).join(``);return[`${_} Credential=${i}/${v},`,`SignedHeaders=${h}, Signature=${T}`].join(` `)},zA=async({method:e,url:t,config:n,secretAccessKey:r,body:i=``,extraHeaders:a={}})=>{let{access_key_id:o,region:s=`us-east-1`}=n,c=new Date,l=new URL(t),u=await LA(i),d={Host:l.host,"x-amz-date":c.toISOString().replace(/[:-]|\.\d{3}/g,``),"x-amz-content-sha256":u,...a},f=await RA({method:e,url:t,headers:d,payloadHash:u,accessKeyId:o,secretAccessKey:r,region:s,service:`s3`,date:c});return fetch(t,{method:e,headers:{...d,Authorization:f},...i&&{body:i}})},BA=e=>{let t=new DOMParser().parseFromString(e,`text/xml`),n=e=>{if(e.children.length===0)return e.textContent;let t={};return Array.from(e.children).forEach(e=>{let r=e.tagName,i=n(e);t[r]?Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]:t[r]=i}),t};return n(t.documentElement)},VA=({bucket:e,key:t,endpoint:n,region:r,forcePathStyle:i,publicUrl:a})=>a?`${a}/${t}`:n?`${n}/${e}/${t}`:i?`https://s3.${r}.amazonaws.com/${e}/${t}`:`https://${e}.s3.${r}.amazonaws.com/${t}`,HA=(e,t)=>{let{bucket:n,region:r,endpoint:i,force_path_style:a,prefix:o=``,public_url:s}=t;return e.map(e=>{let t=e.Key,c=t.split(`/`).pop()||t,l=o&&t.startsWith(o)?t.slice(o.length):t,u=VA({bucket:n,key:t,endpoint:i,region:r,forcePathStyle:a,publicUrl:s});return{id:t,description:l,previewURL:u,downloadURL:u,fileName:c,lastModified:new Date(e.LastModified),size:Number(e.Size),kind:vT(t)}})},UA=async(e,t,{maxPages:n=10}={})=>{let{bucket:r,region:i,endpoint:a,force_path_style:o,prefix:s=``}=e,{kind:c,apiKey:l}=t;if(!l)return Promise.reject(Error(`S3 secret access key is required`));let u=[],d;for(let t=0;t<n;t+=1){let t=new URLSearchParams({"list-type":`2`,"max-keys":`1000`,...s&&{prefix:s},...d&&{"continuation-token":d}}),n=a?`${a}/${r}?${t}`:o?`https://s3.${i}.amazonaws.com/${r}?${t}`:`https://${r}.s3.${i}.amazonaws.com/?${t}`,c=await zA({method:`GET`,url:n,config:e,secretAccessKey:l});if(!c.ok){let e=await c.text();return Promise.reject(Error(`Failed to list objects: ${e}`))}let f=await c.text(),p=BA(f),m=(p.Contents?Array.isArray(p.Contents)?p.Contents:[p.Contents]:[]).filter(e=>!e.Key.endsWith(`/`));if(u.push(...m),d=p.NextContinuationToken,p.IsTruncated!==`true`||!d)break;await Gw(50)}let f=c?u.filter(e=>vT(e.Key)===c):u;return HA(f,e)},WA=async(e,t,n)=>{let r=await UA(t,n,{maxPages:5}),i=e.toLowerCase();return r.filter(e=>e.fileName.toLowerCase().includes(i)||e.description.toLowerCase().includes(i))},GA=async(e,t,n)=>{if(e.length===0)return[];let{bucket:r,region:i,endpoint:a,force_path_style:o,prefix:s=``}=t,{apiKey:c}=n;if(!c)return Promise.reject(Error(`S3 secret access key is required`));let l=[];for(let n of e){let u=n.name.split(/[/\\]/).filter(Boolean).at(-1)??n.name,d=s?`${s}${u}`:u,f=a?`${a}/${r}/${d}`:o?`https://s3.${i}.amazonaws.com/${r}/${d}`:`https://${r}.s3.${i}.amazonaws.com/${d}`,p=await n.arrayBuffer(),m=await zA({method:`PUT`,url:f,config:t,secretAccessKey:c,body:p,extraHeaders:{"Content-Type":n.type||`application/octet-stream`,...t.acl!==!1&&{"x-amz-acl":t.acl??`public-read`}}});if(!m.ok){let e=await m.text();throw Error(`Failed to upload file ${n.name}: ${e}`)}l.push({Key:d,LastModified:new Date().toISOString(),ETag:``,Size:n.size,ContentType:n.type}),e.length>1&&await Gw(50)}return HA(l,t)}})),qA,JA,YA,XA,ZA,QA,$A,Rie=o((()=>{KA(),qA=e=>FA(`aws_s3`,e),JA=e=>{let t=qA(e)??qA();return!!(t&&t.access_key_id&&t.bucket&&t.region)},YA=({fieldConfig:e})=>{let t=qA(e)??qA();if(!t)throw Error(`Amazon S3 configuration is not available`);return t},XA=async e=>UA(YA(e),e),ZA=async(e,t)=>WA(e,YA(t),t),QA=async(e,t)=>GA(e,YA(t),t),$A={serviceType:`cloud_storage`,serviceId:`aws_s3`,serviceLabel:`Amazon S3`,serviceURL:`https://aws.amazon.com/s3/`,showServiceLink:!0,hotlinking:!0,authType:`api_key`,developerURL:`https://docs.aws.amazon.com/s3/`,apiKeyURL:`https://console.aws.amazon.com/iam/home#/security_credentials`,apiKeyPattern:/^[A-Za-z0-9/+=]{40}$/,isEnabled:JA,list:XA,search:ZA,upload:QA}})),ej,tj,nj,rj,ij,aj,oj,zie=o((()=>{KA(),ej=e=>FA(`backblaze_b2`,e),tj=e=>{let t=ej(e)??ej();return!!(t&&t.access_key_id&&t.bucket&&t.region)},nj=({fieldConfig:e})=>{let t=ej(e)??ej();if(!t)throw Error(`Backblaze B2 configuration is not available`);return{...t,endpoint:`https://s3.${t.region}.backblazeb2.com`,acl:!1,public_url:t.public_url??`https://${t.bucket}.s3.${t.region}.backblazeb2.com`}},rj=async e=>UA(nj(e),e),ij=async(e,t)=>WA(e,nj(t),t),aj=async(e,t)=>GA(e,nj(t),t),oj={serviceType:`cloud_storage`,serviceId:`backblaze_b2`,serviceLabel:`Backblaze B2`,serviceURL:`https://www.backblaze.com/cloud-storage`,showServiceLink:!0,hotlinking:!0,authType:`api_key`,developerURL:`https://www.backblaze.com/docs/cloud-storage-s3-compatible-api`,apiKeyURL:`https://secure.backblaze.com/app_keys.htm`,apiKeyPattern:/^[A-Za-z0-9/+=]{30,}$/,isEnabled:tj,list:rj,search:ij,upload:aj}})),sj,cj,lj,uj,dj,fj,pj,mj,hj,Bie=o((()=>{KA(),sj={default:``,eu:`eu.`,fedramp:`fedramp.`},cj=({account_id:e,jurisdiction:t=`default`})=>`https://${e}.${sj[t]??``}r2.cloudflarestorage.com`,lj=e=>FA(`cloudflare_r2`,e),uj=e=>{let t=lj(e)??lj();return!!(t&&t.access_key_id&&t.bucket&&t.account_id)},dj=({fieldConfig:e})=>{let t=lj(e)??lj();if(!t)throw Error(`Cloudflare R2 configuration is not available`);return{...t,region:`auto`,endpoint:cj(t)}},fj=async e=>UA(dj(e),e),pj=async(e,t)=>WA(e,dj(t),t),mj=async(e,t)=>GA(e,dj(t),t),hj={serviceType:`cloud_storage`,serviceId:`cloudflare_r2`,serviceLabel:`Cloudflare R2`,serviceURL:`https://www.cloudflare.com/developer-platform/r2/`,showServiceLink:!0,hotlinking:!0,authType:`api_key`,developerURL:`https://developers.cloudflare.com/r2/`,apiKeyURL:`https://dash.cloudflare.com/?to=/:account/r2/api-tokens`,apiKeyPattern:/^[A-Za-z0-9/+=]{40,}$/,isEnabled:uj,list:fj,search:pj,upload:mj}})),gj,_j,vj,yj,bj,xj,Sj,Vie=o((()=>{KA(),gj=e=>FA(`digitalocean_spaces`,e),_j=e=>{let t=gj(e)??gj();return!!(t&&t.access_key_id&&t.bucket&&t.region)},vj=({fieldConfig:e})=>{let t=gj(e)??gj();if(!t)throw Error(`DigitalOcean Spaces configuration is not available`);return{...t,endpoint:`https://${t.region}.digitaloceanspaces.com`,public_url:t.public_url??`https://${t.bucket}.${t.region}.digitaloceanspaces.com`}},yj=async e=>UA(vj(e),e),bj=async(e,t)=>WA(e,vj(t),t),xj=async(e,t)=>GA(e,vj(t),t),Sj={serviceType:`cloud_storage`,serviceId:`digitalocean_spaces`,serviceLabel:`DigitalOcean Spaces`,serviceURL:`https://www.digitalocean.com/products/spaces`,showServiceLink:!0,hotlinking:!0,authType:`api_key`,developerURL:`https://docs.digitalocean.com/products/spaces/`,apiKeyURL:`https://cloud.digitalocean.com/account/api/spaces`,apiKeyPattern:/^[A-Za-z0-9/+=]{43}$/,isEnabled:_j,list:yj,search:bj,upload:xj}})),Cj,wj,Tj,Ej,Dj,Oj,kj,Hie=o((()=>{KA(),Cj=e=>FA(`scaleway_object_storage`,e),wj=e=>{let t=Cj(e)??Cj();return!!(t&&t.access_key_id&&t.bucket&&t.region)},Tj=({fieldConfig:e})=>{let t=Cj(e)??Cj();if(!t)throw Error(`Scaleway Object Storage configuration is not available`);return{...t,endpoint:`https://s3.${t.region}.scw.cloud`,public_url:t.public_url??`https://${t.bucket}.s3.${t.region}.scw.cloud`}},Ej=async e=>UA(Tj(e),e),Dj=async(e,t)=>WA(e,Tj(t),t),Oj=async(e,t)=>GA(e,Tj(t),t),kj={serviceType:`cloud_storage`,serviceId:`scaleway_object_storage`,serviceLabel:`Scaleway Object Storage`,serviceURL:`https://www.scaleway.com/en/object-storage/`,showServiceLink:!0,hotlinking:!0,authType:`api_key`,developerURL:`https://www.scaleway.com/en/docs/object-storage/`,apiKeyURL:`https://console.scaleway.com/iam/api-keys`,apiKeyPattern:/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/,isEnabled:wj,list:Ej,search:Dj,upload:Oj}})),Aj,jj,Mj,Nj,Pj,Fj,Ij,Lj,Rj,Uie=o((()=>{KA(),Aj=({project_id:e})=>`https://${e}.storage.supabase.co/storage/v1/s3`,jj=({project_id:e,bucket:t})=>`https://${e}.supabase.co/storage/v1/object/public/${t}`,Mj=e=>FA(`supabase_storage`,e),Nj=e=>{let t=Mj(e)??Mj();return!!(t&&t.access_key_id&&t.bucket&&t.project_id)},Pj=({fieldConfig:e})=>{let t=Mj(e)??Mj();if(!t)throw Error(`Supabase Storage configuration is not available`);return{...t,endpoint:Aj(t),public_url:t.public_url??jj(t)}},Fj=async e=>UA(Pj(e),e),Ij=async(e,t)=>WA(e,Pj(t),t),Lj=async(e,t)=>GA(e,Pj(t),t),Rj={serviceType:`cloud_storage`,serviceId:`supabase_storage`,serviceLabel:`Supabase Storage`,serviceURL:`https://supabase.com/storage`,showServiceLink:!0,hotlinking:!0,authType:`api_key`,developerURL:`https://supabase.com/docs/guides/storage`,apiKeyURL:`https://supabase.com/dashboard/project/_/storage/settings`,apiKeyPattern:/^[A-Za-z0-9/+=]{40,}$/,isEnabled:Nj,list:Fj,search:Ij,upload:Lj}})),zj,Bj,Vj,Hj,Uj,Wj,Gj,Kj,qj,Jj,Wie=o((()=>{Kw(),qp(),AF(),FE(),zj=(e=A(TF))=>e?.media_libraries?.uploadcare??(e?.media_library?.name===`uploadcare`?e?.media_library:void 0),Bj=e=>{let t=zj(e)??zj();return t?t.config?.publicKey:void 0},Vj=e=>!!Bj(e),Hj=(e,{fieldConfig:t}={})=>{let{settings:{autoFilename:n=!1,defaultOperations:r=void 0}={},config:{cdnBase:i=void 0}={}}=(zj(t)??zj())||{};return e.map(e=>{let{uuid:t,original_filename:a,original_file_url:o,mime_type:s,datetime_uploaded:c,size:l}=e,u=`${new URL(i??o).origin}/${t}/`,d=s.startsWith(`image/`),f=s.startsWith(`video/`);return{id:t,description:a,previewURL:`${u}${d?`-/preview/400x400/`:``}`,downloadURL:`${u}${d&&r?`-${r}`:``}${n?a:``}`,fileName:a,lastModified:new Date(c),size:l,kind:d?`image`:f?`video`:`other`}})},Uj=async(e,{maxPages:t=10,filter:n}={})=>{let{kind:r,fieldConfig:i,apiKey:a}=e,o=Bj(i);if(!o)return Promise.reject(Error(`Uploadcare public key is not configured`));let s={Accept:`application/vnd.uploadcare-v0.7+json`,Authorization:`Uploadcare.Simple ${o}:${a}`},c=new URLSearchParams({limit:`100`,ordering:`-datetime_uploaded`,stored:`true`}),l=[],u=`https://api.uploadcare.com/files/?${c}`;for(let e=0;e<t&&u;e+=1){let e=await fetch(u,{headers:s});if(!e.ok)return Promise.reject(Error(`Failed to fetch files: ${e.statusText}`));let t=await e.json(),{results:i}=t;if(r===`image`&&(i=i.filter(e=>e.is_image)),n&&(i=i.filter(n)),l.push(...i),u=t.next,!u)break;await Gw(50)}return Hj(l,{fieldConfig:i})},Wj=async e=>Uj(e),Gj=async(e,t)=>{let n=e.toLowerCase();return Uj(t,{filter:e=>e.original_filename.toLowerCase().includes(n)})},Kj=async(e,t)=>{let n=new TextEncoder,r=n.encode(String(t)),i=n.encode(e),a=await crypto.subtle.importKey(`raw`,i,{name:`HMAC`,hash:`SHA-256`},!1,[`sign`]),o=await crypto.subtle.sign(`HMAC`,a,r);return Array.from(new Uint8Array(o)).map(e=>e.toString(16).padStart(2,`0`)).join(``)},qj=async(e,t)=>{if(e.length===0)return[];let{fieldConfig:n,apiKey:r}=t,i=Bj(n);if(!i)return Promise.reject(Error(`Uploadcare public key is not configured`));if(!r)return Promise.reject(Error(`Uploadcare secret key is not provided`));let a=Math.floor(Date.now()/1e3)+1800,o=await Kj(r,a),s=new FormData;s.append(`UPLOADCARE_PUB_KEY`,i),s.append(`UPLOADCARE_STORE`,`1`),s.append(`signature`,o),s.append(`expire`,String(a)),e.forEach(e=>{s.append(AE(e.name),e)});let c=await fetch(`https://upload.uploadcare.com/base/`,{method:`POST`,body:s});if(!c.ok)throw Error(`Failed to upload files: ${c.statusText}`);let l=await c.json(),u=Object.entries(l).filter(([e])=>!e.startsWith(`UPLOADCARE_`)).map(([t,n])=>{let r=e.find(e=>e.name===t),i=r?.type||`application/octet-stream`,a=i.startsWith(`image/`);return{uuid:n,original_filename:t,original_file_url:`https://ucarecdn.com/${n}/${t}`,size:r?.size||0,mime_type:i,is_image:a,is_ready:!0,content_info:null,datetime_uploaded:new Date().toISOString(),datetime_stored:new Date().toISOString(),datetime_removed:null}});return Hj(u,{fieldConfig:n})},Jj={serviceType:`cloud_storage`,serviceId:`uploadcare`,serviceLabel:`Uploadcare`,serviceURL:`https://uploadcare.com/`,showServiceLink:!0,hotlinking:!0,authType:`api_key`,developerURL:`https://uploadcare.com/docs/`,apiKeyURL:`https://app.uploadcare.com/projects/-/api-keys/`,apiKeyPattern:/^[a-f0-9]{20}$/,isEnabled:Vj,list:Wj,search:Gj,upload:qj}})),Yj,Xj,Zj=o((()=>{PA(),Rie(),zie(),Bie(),Vie(),Hie(),Uie(),Wie(),Yj={aws_s3:$A,backblaze_b2:oj,cloudflare_r2:hj,cloudinary:NA,digitalocean_spaces:Sj,scaleway_object_storage:kj,supabase_storage:Rj,uploadcare:Jj},Xj=Object.keys(Yj)})),Qj,$j,eM,tM,nM,rM,iM,aM,oM,sM,cM,lM,uM,dM,Gie=o((()=>{Qj=`@sveltia/cms`,$j=`0.170.0`,eM=`Sveltia CMS is a modern, lightweight, Git-based headless content management system.`,tM=[`svelte`,`cms`,`content-management-system`],nM=`https://sveltiacms.app/en/`,rM={type:`git`,url:`git+https://github.com/sveltia/sveltia-cms.git`},iM={type:`github`,url:`https://github.com/sponsors/kyoshino`},aM={name:`Kohei Yoshino`,url:`https://github.com/kyoshino`},oM=`module`,sM={build:`vite build`,"build:watch":`vite build --watch`,check:`pnpm run '/^check:.*/'`,"check:audit":`pnpm audit --ignore-registry-errors`,"check:cspell":`cspell --no-progress`,"check:eslint":`eslint .`,"check:imports":`node scripts/find-unused-imports.js`,"check:oxlint":`oxlint .`,"check:prettier":`prettier --check .`,"check:stylelint":`stylelint '**/*.{css,scss,svelte}'`,"check:svelte":`svelte-check`,dev:`vite`,format:`prettier --write .`,prepublishOnly:`vite build`,preview:`vite preview`,test:`NODE_OPTIONS=--no-experimental-webstorage vitest run`,"test:coverage":`NODE_OPTIONS=--no-experimental-webstorage vitest run --coverage`,"test:watch":`NODE_OPTIONS=--no-experimental-webstorage vitest`},cM={"@jsquash/webp":`^1.5.0`,"@lexical/markdown":`^0.46.0`,"@sindresorhus/transliterate":`^2.3.1`,"@sveltia/i18n":`^1.1.2`,"@sveltia/ui":`^0.41.0`,"@sveltia/utils":`^0.10.7`,"create-react-class":`^15.7.0`,dayjs:`^1.11.21`,deepmerge:`^4.3.1`,exifr:`^7.1.3`,"fast-deep-equal":`^3.1.3`,flat:`^6.0.1`,immutable:`^5.1.9`,"isomorphic-dompurify":`^3.18.0`,leaflet:`^1.9.4`,lexical:`^0.46.0`,marked:`^18.0.5`,"marked-bidi":`^1.0.15`,mime:`^4.1.0`,"parse-entities":`^4.0.2`,"pdfjs-dist":`^6.1.200`,qrcode:`^1.5.4`,react:`^19.2.7`,"react-dom":`^19.2.7`,"sanitize-filename":`^1.6.4`,"smol-toml":`^1.7.0`,svgo:`^4.0.1`,"terra-draw":`^1.31.2`,"terra-draw-leaflet-adapter":`1.0.3`,turndown:`^7.2.4`,yaml:`^2.9.0`},lM={"@stylistic/eslint-plugin":`^5.10.0`,"@sveltejs/vite-plugin-svelte":`^7.1.2`,"@types/leaflet":`^1.9.21`,"@types/node":`^26.1.0`,"@types/qrcode":`^1.5.6`,"@types/react":`^19.2.17`,"@types/react-dom":`^19.2.3`,"@vitest/coverage-v8":`^4.1.9`,cspell:`^10.0.1`,eslint:`^9.39.4`,"eslint-config-airbnb-extended":`^3.1.0`,"eslint-config-prettier":`^10.1.8`,"eslint-plugin-jsdoc":`^63.0.10`,"eslint-plugin-package-json":`^1.5.0`,"eslint-plugin-svelte":`^3.20.0`,"eslint-plugin-unused-imports":`^4.4.1`,globals:`^17.7.0`,oxlint:`^1.72.0`,"postcss-html":`^1.8.1`,prettier:`^3.9.4`,"prettier-plugin-svelte":`^4.1.1`,stylelint:`^17.14.0`,"stylelint-config-recommended":`^18.0.0`,svelte:`^5.56.4`,"svelte-check":`^4.7.1`,"ts-json-schema-generator":`^2.9.0`,typescript:`^6.0.3`,vite:`^8.1.2`,vitest:`^4.1.9`},uM={directory:`package`,access:`public`,provenance:!0},dM={name:Qj,version:$j,description:eM,keywords:tM,homepage:nM,repository:rM,funding:iM,license:`MIT`,author:aM,type:oM,scripts:sM,dependencies:cM,devDependencies:lM,publishConfig:uM}})),fM,pM,mM=o((()=>{Gie(),{dependencies:fM,version:pM}=dM})),hM,gM,_M,vM,yM=o((()=>{hM=`modulepreload`,gM=function(e){return`/`+e},_M={},vM=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,new URL(`../../../src/node/plugins/importAnalysisBuild.ts`,import.meta.url)).href}r=o(t.map(t=>{if(t=gM(t,n),t=s(t),t in _M)return;_M[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:hM,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})}})),bM,xM,SM=o((()=>{mM(),yM(),bM=e=>{let t=`https://unpkg.com/${e}`,n=fM[e]?.replace(/^\D/,``);return n?`${t}@${n}`:t},xM=async(e,t)=>vM(()=>import(`${bM(e)}/${t}`),[])})),CM,wM,TM,EM,DM,OM,kM,AM,jM=o((()=>{CM=[`avif`,`gif`,`jpeg`,`png`,`webp`],wM=CM.map(e=>`image/${e}`),TM=/\b(?:avif|gif|jpe?g|png|webp)$/i,EM=[`svg`],DM=[`image/svg+xml`],OM=/\b(?:svg)$/i,[...CM,...EM],kM=[...wM,...DM],AM=[`webp`]})),MM,NM,PM,FM=o((()=>{SM(),jM(),MM={},NM=async e=>{if(e in MM)return MM[e];let t=`image/${e}`,n=new OffscreenCanvas(1,1);n.getContext(`2d`);let r=(await n.convertToBlob({type:t})).type===t;return MM[e]=r,r},PM=async(e,{format:t=`webp`,quality:n=85}={})=>{let r=`image/${t}`;if(!await NM(t)&&AM.includes(t)){let i=e.getContext(`2d`).getImageData(0,0,e.width,e.height);try{let e=(await xM(`@jsquash/${t}`,`encode.js?module`)).default,a=await e(i,{quality:n});return new Blob([a],{type:r})}catch{}}return e.convertToBlob({type:r,quality:n/100})}})),IM,LM,RM=o((()=>{IM=({width:e,height:t},{width:n=e,height:r=t,fit:i=`scale-down`}={})=>{let a={scale:1,width:e,height:t};if(e===n&&t===r)return a;let o=e<=n&&t<=r,s=1,c=0,l=0;if(i===`scale-down`){if(o)return a;i=`contain`}return i===`contain`&&(s=Math.min(n/e,r/t),c=e*s,l=t*s),{scale:s,width:c,height:l}},LM=(e,t,n)=>{let{scale:r,width:i,height:a}=IM(t,n);return e.width=i,e.height=a,{scale:r,width:i,height:a}}})),zM,BM,VM,HM,UM,WM,GM=o((()=>{SM(),FM(),RM(),zM={format:`webp`,quality:85,width:512,height:512,fit:`contain`},BM=async({blob:e})=>{let t=URL.createObjectURL(e),n=new Image;return new Promise(e=>{n.addEventListener(`load`,()=>{e({source:n,naturalWidth:n.naturalWidth,naturalHeight:n.naturalHeight}),URL.revokeObjectURL(t)},{once:!0}),n.src=t})},VM=async({blob:e})=>{let t=URL.createObjectURL(e),n=document.createElement(`video`);return new Promise(e=>{n.addEventListener(`canplay`,()=>{n.pause(),e({source:n,naturalWidth:n.videoWidth,naturalHeight:n.videoHeight}),URL.revokeObjectURL(t)},{once:!0}),n.muted=!0,n.autoplay=!0,n.playsInline=!0,n.src=t,n.style.opacity=`0`,n.style.pointerEvents=`none`,document.body.appendChild(n)})},HM=async e=>e.type.startsWith(`video/`)?VM({blob:e}):BM({blob:e}),UM=async(e,{format:t=`png`,quality:n=85,width:r=void 0,height:i=void 0,fit:a=`scale-down`}={})=>{let o,s=0,c=0;try{o=await createImageBitmap(e),{width:s,height:c}=o}catch{({source:o,naturalWidth:s,naturalHeight:c}=await HM(e))}r??=s,i??=c;let l=new OffscreenCanvas(512,512),u=l.getContext(`2d`);return LM(l,{width:s,height:c},{fit:a,width:r,height:i}),u.drawImage(o,0,0,l.width,l.height),o instanceof HTMLVideoElement&&document.body.removeChild(o),PM(l,{format:t,quality:n})},WM=async e=>{let t=await e.text();try{let{optimize:n}=await xM(`svgo`,`dist/svgo.browser.js`),{data:r}=n(t);return new Blob([r],{type:e.type})}catch{}return e}})),KM,qM,JM,YM,XM,ZM,Kie=o((()=>{SM(),FM(),RM(),yM(),KM=bM(`pdfjs-dist`),qM=`${KM}/build/pdf.min.mjs`,JM=`${KM}/build/pdf.worker.min.mjs`,YM={isEvalSupported:!1,disableAutoFetch:!0,cMapUrl:`${KM}/cmaps/`,iccUrl:`${KM}/iccs/`,standardFontDataUrl:`${KM}/standard_fonts/`,wasmUrl:`${KM}/wasm/`},ZM=async(e,{format:t=`png`,quality:n=85,width:r=void 0,height:i=void 0,fit:a=`scale-down`}={})=>{if(!XM)try{XM=await vM(()=>import(qM),[]),XM.GlobalWorkerOptions.workerSrc=JM}catch{throw Error(`Failed to load PDF.js library`)}let o=URL.createObjectURL(e),s=new OffscreenCanvas(512,512),c=s.getContext(`2d`);try{let e=await(await XM.getDocument({...YM,url:o}).promise).getPage(1),t=e.getViewport({scale:1}),{scale:n}=LM(s,{width:t.width,height:t.height},{width:r,height:i,fit:a});await e.render({canvasContext:c,viewport:n===1?t:e.getViewport({scale:n})}).promise,URL.revokeObjectURL(o)}catch{throw Error(`Failed to render PDF`)}return PM(s,{format:t,quality:n})}})),QM,$M,eN,tN,nN,rN,iN,aN,oN,sN,cN,lN=o((()=>{Gp(),Kw(),Xw(),Np(),aT(),qp(),$F(),cm(),wA(),AF(),Zj(),PA(),FE(),GM(),Kie(),QM=/{{(?<tag>.+?)}}/,$M=/{{(.+?)}}/g,eN=/^(?:https?|data|blob):/,tN=new Set,nN=async(e,t=0)=>{let{file:n,handle:r,blobURL:i,name:a,path:o}=e;if(i)return fetch(i).then(e=>e.blob());let s;if(n)s=n;else if(r)try{s=await r.getFile()}catch{throw Error(`Failed to retrieve blob from file handle`)}else{if(tN.has(o)&&t<=25)return await Gw(200),nN(e,t+1);tN.add(o);let n=await A(SA)?.fetchBlob?.(e);if(!n)throw Error(`Failed to retrieve blob`);s=new Blob([n],{type:iT.getType(a)??n.type})}return e.blobURL=URL.createObjectURL(s),tN.delete(o),s},rN=async e=>(e.blobURL||await nN(e),e.blobURL),iN=void 0,aN=async(e,{cacheOnly:t=!1}={})=>{let n=e.name.endsWith(`.pdf`);if(!([`image`,`video`].includes(e.kind)||n))return;if(iN===void 0){let{databaseName:e}=A(SA)?.repository??{};iN=e?new qw(e,`asset-thumbnails`):null}let r=await iN?.get(e.sha);if(!r){if(t)return;let i=await nN(e);r=n?await ZM(i,zM):await UM(i,zM),await iN?.set(e.sha,r)}return URL.createObjectURL(r)},oN=(e,{pathOnly:t=!1,allowSpecial:n=!1,entry:r=void 0}={})=>{let{publicPath:i,entryRelative:a,hasTemplateTags:o}=e.folder.collectionName===void 0?e.folder:om(e.path).find(({collectionName:e})=>e!==void 0)??A(em);if(a){if(t){let t=Rp(e.path).dirname,n=r?Rp(Object.values(r.locales)[0].path).dirname:void 0;if(t!==void 0&&n!==void 0){if(t===n)return e.name;let r=`${n}/`;return e.path.startsWith(r)?e.path.slice(r.length):void 0}let{internalPath:i,internalSubPath:a}=e.folder;if(e.path===jE([i,a,e.name]))return e.path.slice(i.length+1)}return}let{_baseURL:s=``,output:{encode_file_path:c=!1}={}}=A(TF),l=o?e.path.replace(wE(e.folder.internalPath??``,e=>{let t=e.match(QM)?.groups?.tag;return t?`(?<${t}>[^/]+)`:Dp(e)}),i?.replaceAll($M,`$<$1>`)??``):e.path.replace(e.folder.internalPath??``,i===`/`?``:i??``);if(c&&(l=TE(l)),!(!l.startsWith(`/`)&&!n))return t?l:`${s}${l}`},sN=e=>{if(Yj.cloudinary?.isEnabled?.()){let t=jA(e);if(t.output_filename_only&&t.config?.cloud_name)return`https://res.cloudinary.com/${t.config.cloud_name}`}},cN=async({value:e,entry:t,collectionName:n,fileName:r,fieldConfig:i,typedKeyPath:a,thumbnail:o=!1})=>{if(!e)return;if(eN.test(e))return e;if(JF(e)){let t=sN(i);if(t)return`${t}/${e}`}let s=YF({value:e,entry:t,collectionName:n,fileName:r,typedKeyPath:a});if(s)return(o?await aN(s):await rN(s))??oN(s)}})),uN,dN,fN,pN,mN,hN,gN,_N,vN,yN=o((()=>{Fy(),uN=l($S(),1),dN=l(eC(),1),fN=l(tC(),1),pN=l(nC(),1),qp(),wA(),tF(),AF(),vC(),dw(),mw(),oC(),Ww(),uN.default.extend(dN.default),uN.default.extend(fN.default),uN.default.extend(pN.default),mN=/{{(?:year|month|day|hour|minute|second)}}/,hN=e=>_C(Object.values(e.locales)[0].path).map(({collectionName:e})=>cw(e)).filter(e=>!!e),gN=({dateFieldName:e,fields:t,content:n})=>{let r=e?t.find(({widget:t,name:n})=>t===`datetime`&&n===e):t.find(({widget:e})=>e===`datetime`),i=r?n[r.name]:void 0;if(!r||!i)return;let a=r,o=zw(i,a);if(!Fw(o))return;let{utc:s,outputUTC:c}=aC(a);return Py({date:o,timeZone:s||c?`UTC`:void 0})},_N=(e,t,n,r)=>{let{show_preview_links:i=!0,_baseURL:a}=A(TF)??{},{slug:o,path:s,content:c}=e.locales[t]??{},{preview_path:l,preview_path_date_field:u,fields:d=[],_i18n:{defaultLocale:f,omitDefaultLocaleFromPreviewPath:p}}=r??n;if(!i||!a||!s||!c||!l)return;let m=pw(n,e),h=(m?fw(n):void 0)?.fields??d,g;if(mN.test(l)&&(g=gN({dateFieldName:u,fields:h,content:c}),!g))return;let _=l;t===f&&p&&(_=_.replace(/{{locale}}[./]/,``));try{let e=eF(_,{type:`preview_path`,collection:n,content:c,locale:t,currentSlug:o,entryFilePath:s,dateTimeParts:g,isIndexFile:m});return`${a.replace(/\/$/,``)}/${e.replace(/^\//,``)}`}catch{return}},vN=(e,t)=>`${A(SA)?.repository?.blobBaseURL}/${e.locales[t]?.path}?plain=1`})),bN,xN,SN=o((()=>{bN=/^\/?(?<pattern>.+?)(?:\/(?<flags>[dgimsuy]*))?$/,xN=e=>{if(e instanceof RegExp)return e;if(typeof e==`string`){let{pattern:t,flags:n}=e.match(bN)?.groups??{};if(t)try{return new RegExp(t,n)}catch{}}}})),CN,wN,TN,EN,DN,ON,kN,AN=o((()=>{qp(),lN(),AF(),vC(),dw(),mw(),EC(),yN(),KP(),kC(),SN(),CN=/!\[.*?\]\((.+?)(?:\s+".*?")?\)/g,wN=ln([]),TN=un(wN,e=>new Set(e.map(e=>e.id))),EN=e=>{let t=cw(e);if(!t)return[];let{_type:n,_i18n:{defaultLocale:r}}=t,{filter:i}=n===`entry`?t:{},a=i?.field,o=xN(i?.pattern),s=i?.value===void 0?[]:Array.isArray(i.value)?i.value:[i.value],c;if(n===`entry`){let n=t._file?.fullPathRegEx;c=n?e=>n.test(Object.values(e.locales)[0]?.path??``):t=>hN(t).some(({name:t})=>t===e)}else{let t=new Set(A(pC).filter(({collectionName:t})=>t===e).flatMap(({filePathMap:e})=>e?Object.values(e):[]));c=e=>{let n=Object.values(e.locales)[0]?.path;return!!n&&t.has(n)}}return A(mC).filter(t=>{if(!c(t))return!1;if(!a)return!0;let n=GP({entry:t,locale:r,collectionName:e,key:a})??null;return o?o.test(n):s.includes(n)})},DN=async({assetURL:e,newURL:t,collectionName:n,entry:r,content:i,keyPath:a,value:o,isIndexFile:s,collectionFile:c})=>{let l=c?.name,u=BP({collectionName:n,fileName:l,valueMap:i,keyPath:a,isIndexFile:s});if(!u)return!1;let d=e.startsWith(`blob:`),f={entry:r,collectionName:n,fileName:l},{widget:p=`string`}=u;if(DC.includes(p)){let n=d?await cN({...f,value:o})===e:o===e;return n&&t&&(i[a]=t),n}if([`richtext`,`markdown`].includes(p)){let n=[...o.matchAll(CN)];if(n.length)return(await Promise.all(n.map(async([,n])=>{let r=(d?await cN({...f,value:n}):n)===e;return r&&t&&(i[a]=i[a].replace(n,t)),r}))).some(Boolean)}return!1},ON=async(e,{entries:t=A(mC),newURL:n=``}={})=>{let r=A(TF)?._baseURL,i=r&&!e.startsWith(`blob:`)?e.replace(r,``):e,a=i.startsWith(`blob:`),o=!!n,s=await Promise.all(t.map(async e=>{let{locales:t}=e,r=hN(e),s=!1;for(let{content:c}of Object.values(t)){for(let[t,l]of Object.entries(c))if(!(typeof l!=`string`||!l)&&!(!a&&!l.includes(i))){for(let a of r){let r={assetURL:i,newURL:n,collectionName:a.name,entry:e,content:c,keyPath:t,value:l,isIndexFile:pw(a,e)},u=CC(a,e),d;if(d=u.length?(await Promise.all(u.map(e=>DN({...r,collectionFile:e})))).includes(!0):await DN({...r}),d&&(s=!0,!o))break}if(s&&!o)break}if(s&&!o)break}return s}));return t.filter((e,t)=>s[t])},kN=e=>{let t=fw(e);return t?!EN(e.name).some(({slug:e})=>e===t.name):!1}})),jN,MN,NN,PN,FN,qie=o((()=>{jN=new WeakMap,MN=e=>{let t=jN.get(e);if(t)return t;let n=new Map;return e.forEach(({value:e,label:t})=>{n.has(e)||n.set(e,t)}),jN.set(e,n),n},NN=new WeakMap,PN=0,FN=e=>(NN.has(e)||(NN.set(e,PN),PN+=1),NN.get(e))})),IN,LN,RN=o((()=>{tF(),IN=e=>$P(e)?e:e===`slug`?`{{fields.slug}}`:`{{${e}}}`,LN=e=>{if(!e||e.widget!==`list`)return!1;let t=`fields`in e,n=`types`in e;return t||n}})),zN,BN,VN,HN,UN=o((()=>{cT(),Qp(),ZP(),RN(),zN=(e,t,n)=>{let{slug:r,locale:i,getDisplayValue:a}=t,{content:o,locales:s,defaultLocale:c,identifierField:l}=n;if(e===`slug`)return r;if(e===`locale`)return i;let u=e.replace(/^fields\./,``);return a(u)||a(u,c)||JP(o,{identifierField:l})||JP(s[c]?.content||{},{identifierField:l})||r},BN=(e,t,n,r)=>{let{label:i,value:a,searchValue:o}=e;return t.forEach(e=>{let t=zN(e,n,r);i=i.replaceAll(`{{${e}}}`,t),a=a.replaceAll(`{{${e}}}`,t),o=o?.replaceAll(`{{${e}}}`,t)??``}),{label:i,value:a,searchValue:o}},VN=e=>[...e.matchAll(Yp)].map(e=>e[1]),HN=(e,t)=>{let n=e.value_field,r=e.display_fields??[n??`{{${t}}}`],i=e.search_fields??r,a=IN(n??`{{slug}}`),o=r.map(IN).join(` `),s=i.map(IN).join(` `),c=sT([...VN(o),...VN(a),...VN(s)]);return{_valueField:a,_displayField:o,_searchField:s,allFieldNames:c,hasListFields:c.some(e=>e.includes(`*`))}}})),WN,GN,KN,qN,JN,YN,XN,ZN,QN,Jie=o((()=>{Np(),KP(),RN(),UN(),Gy(),WN=/\.(\d+)$/,GN=(e,t)=>{let n=new Map,r=new Map;return e.filter(e=>e.includes(`*`)).forEach(e=>{let r=e.replace(/\.\*.*$/,``),i=BP({...t,keyPath:r});n.set(e,{baseFieldName:r,fieldConfig:i,isComplexListField:LN(i)})}),[...n.entries()].forEach(([e,t])=>{let{baseFieldName:n}=t;r.has(n)||r.set(n,[]),r.get(n).push([e,t])}),r},KN=new Map,qN=({baseFieldName:e,groupEntries:t,content:n,templates:r,allFieldNames:i,context:a,fallbackContext:o})=>{let{_displayField:s,_valueField:c,_searchField:l}=r,u=Wy(KN,e,()=>RegExp(`^${Dp(e)}.\\d+$`));return Object.entries(n).filter(([e])=>u.test(e)).map(([e,t])=>{let n=e.match(WN);return{index:parseInt(n[1],10),value:t}}).sort((e,t)=>e.index-t.index).map(({value:e})=>{let n={label:s,value:c,searchValue:l};t.forEach(([t])=>{n.label=n.label.replaceAll(`{{${t}}}`,e),n.value=n.value.replaceAll(`{{${t}}}`,e),n.searchValue=n.searchValue.replaceAll(`{{${t}}}`,e)});let{label:r,value:u,searchValue:d}=BN(n,i.filter(e=>!e.includes(`*`)),a,o);return{label:r||``,value:u||a.slug,searchValue:d||r||``}})},JN=/^(.+)\.\*\.(.+)$/,YN=new Map,XN=e=>{let t=null;return e.some(([e])=>(t=e.match(JN),!!t)),t},ZN=({groupEntries:e,content:t,templates:n,allFieldNames:r,context:i,fallbackContext:a})=>{let[,o,s]=XN(e)??[];if(!o)return[];let c=`${o}:${s}`,l=Wy(YN,c,()=>{let e=Dp(o),t=Dp(s);return RegExp(`^${e}.([0-9]+).${t}$`)}),u=Object.entries(t).filter(([e])=>l.test(e)).map(([e,t])=>{let n=e.match(l);return{index:parseInt(n[1],10),value:t}}).sort((e,t)=>e.index-t.index),{_displayField:d,_valueField:f,_searchField:p}=n;return u.map(({index:n})=>{let o={label:d,value:f,searchValue:p};e.forEach(([e])=>{let r=e.match(JN);if(r){let[,i,a]=r,s=t[`${i}.${n}.${a}`]||``;o.label=o.label.replaceAll(`{{${e}}}`,s),o.value=o.value.replaceAll(`{{${e}}}`,s),o.searchValue=o.searchValue.replaceAll(`{{${e}}}`,s)}});let{label:s,value:c,searchValue:l}=BN(o,r.filter(e=>!e.includes(`*`)),i,a);return{label:s||``,value:c||i.slug,searchValue:l||s||``}})},QN=({baseFieldGroups:e,content:t,templates:n,allFieldNames:r,context:i,fallbackContext:a})=>{let o=[],s=!1;return e.forEach((e,c)=>{if(e.length===0)return;let[,l]=e[0],u={groupEntries:e,content:t,templates:n,allFieldNames:r,context:i,fallbackContext:a},d=l.isComplexListField?ZN({...u}):qN({...u,baseFieldName:c});o.push(...d),s=!0}),{results:o,hasProcessedListFields:s}}})),$N,Yie=o((()=>{ZP(),UN(),$N=({templates:e,allFieldNames:t,context:n,fallbackContext:r})=>{let{slug:i}=n,{_displayField:a,_valueField:o,_searchField:s}=e,{content:c,locales:l,defaultLocale:u,identifierField:d}=r,f=Object.fromEntries(t.map(e=>[e,zN(e,n,r)])),p=a,m=o,h=s;return Object.entries(f).forEach(([e,t])=>{p=p.replaceAll(`{{${e}}}`,t),m=m.replaceAll(`{{${e}}}`,t),h=h.replaceAll(`{{${e}}}`,t)}),(!p||p.trim()===``)&&(p=JP(c,{identifierField:d})||JP(l[u]?.content||{},{identifierField:d})||i),{label:p||``,value:m||i,searchValue:h||p||``}}})),eP,Xie=o((()=>{mw(),KP(),Jie(),Yie(),UN(),eP=({refEntry:e,content:t,collection:n,templates:r,allFieldNames:i,hasListFields:a,collectionName:o,fileName:s,locale:c,identifierField:l,defaultLocale:u})=>{let{slug:d,locales:f}=e,p={collectionName:o,fileName:s,isIndexFile:pw(n,e),keyPath:``},m={slug:d,locale:c,getDisplayValue:(e,n)=>UP({...p,keyPath:e,valueMap:n?f[n].content:t,locale:n??c})},h={content:t,locales:f,defaultLocale:u,identifierField:l};if(!a)return[$N({templates:r,allFieldNames:i,context:m,fallbackContext:h})];let{results:g,hasProcessedListFields:_}=QN({baseFieldGroups:GN(i,p),content:t,templates:r,allFieldNames:i,context:m,fallbackContext:h});if(_)return g;let{_displayField:v,_valueField:y,_searchField:b}=r,{label:x,value:S,searchValue:C}=BN({label:v,value:y,searchValue:b},i.filter(e=>!e.includes(`*`)),m,h);return[{label:x||``,value:S||d,searchValue:C||x||``}]}})),tP,nP,rP,Zie=o((()=>{tP=/^{{fields\.(.+?)}}$/,nP=(e,t,n=void 0)=>e.map(({field:e,values:r,exclude:i})=>({field:e,exclude:i,values:r.flatMap(e=>{if(typeof e!=`string`)return[e];if(e===`{{slug}}`)return n?[n]:[];let r=e.match(tP);if(!r)return[e];let i=t?.[r[1]];return i===void 0?[]:[i]})})),rP=({refEntries:e,locale:t,fileName:n=void 0,entryFilters:r=[],defaultLocale:i=void 0})=>e.filter(e=>!n||n===e.slug).map(e=>{let{content:n}=e.locales[t]??(i?e.locales[i]:void 0)??e.locales._default??{};return{refEntry:e,hasContent:!!n&&Object.keys(n).length>0,content:n??{}}}).filter(({hasContent:e,content:t,refEntry:n})=>e&&r.every(({field:e,values:r,exclude:i=!1})=>{if(r.length===0)return!0;let a=e===`slug`,o=e.replace(/^fields\./,``),s=a?n.slug:t[o];return i?!r.includes(s):r.includes(s)}))})),iP,aP,oP,sP=o((()=>{Np(),dw(),AN(),qie(),Xie(),Zie(),UN(),iP=new Map,aP=({locale:e,fieldConfig:t,refEntries:n,currentLocaleValues:r=void 0,currentSlug:i=void 0})=>{let{collection:a,file:o,filters:s}=t,c=nP(s??[],r,i),l=c.flatMap(({values:e})=>e).join(`\0`),u=`${e}|${`${FN(t)}|${FN(n)}`}|${l}`,d=iP.get(u);if(d)return d;let f=cw(a);if(!f)return iP.set(u,[]),[];let{_type:p,_i18n:{defaultLocale:m}}=f,{identifier_field:h=`title`}=p===`entry`?f:{},g=HN(t,h),{allFieldNames:_,hasListFields:v}=g,y=rP({refEntries:n,locale:e,fileName:o,entryFilters:c,defaultLocale:m}).flatMap(({refEntry:t,content:n})=>eP({refEntry:t,content:n,collection:f,templates:g,allFieldNames:_,hasListFields:v,collectionName:a,fileName:o,locale:e,identifierField:h,defaultLocale:m})).sort((e,t)=>Mp(e.label,t.label));return iP.set(u,y),y},oP=({fieldConfig:e,valueMap:t,keyPath:n,locale:r})=>{let{multiple:i,collection:a}=e,o=EN(a),s=MN(aP({locale:r,fieldConfig:e,refEntries:o})),c=e=>s.get(e)||e;return i?Object.entries(t).filter(([e])=>e.match(`^${Dp(n)}\\.\\d+$`)).map(([,e])=>e).map(c):c(t[n])}})),cP,lP,uP,dP=o((()=>{cc(),cP=({multiline:e,dotAll:t,source:n})=>e||t||n.includes(`[\\s\\S]`)||n.includes(`[\\S\\s]`),lP=e=>sc(Object.fromEntries(Object.entries(oc(e)).filter(([e])=>!e.split(`.`).pop()?.startsWith(`__sc_`)))),uP=e=>e.replace(/"/g,`'`)})),fP,pP,mP,hP,gP=o((()=>{fP=/!\[(?<alt>(?:[^\]\\]|\\.)*)\]\((?<src>(?:[^"()\\]|\\.|\([^)]*\)|"[^"]*")*?)(?:\s+"(?<title>(?:[^"\\]|\\.)*)")?\)/,pP=new RegExp(fP,`g`),mP=/\[!\[(?<alt2>(?:[^\]\\]|\\.)*)\]\((?<src2>(?:[^"()\\]|\\.|\([^)]*\)|"[^"]*")*?)(?:\s+"(?<title2>(?:[^"\\]|\\.)*)")?\)\](?:\((?<link>[^)]*\([^)]*\)[^)]*|[^)]*)\))/,hP=RegExp(`${fP.source}|${mP.source}`)})),_P,vP,yP,bP=o((()=>{dx(),_P=e=>e.replace(/&(?![a-zA-Z0-9#]+;)/g,`&amp;`).replaceAll(`"`,`&quot;`),vP={ALLOWED_TAGS:[`a`],ALLOWED_ATTR:[`href`,`target`,`rel`]},yP=(e,t)=>ux(e.replace(`<a>`,`<a href="${_P(t)}" target="_blank" rel="noopener noreferrer">`),vP)})),xP,SP,CP,wP=o((()=>{X(),mp(),dP(),gP(),bP(),xP={id:`image`,label:`Image`,fields:[{name:`src`,label:`Source`,widget:`image`},{name:`alt`,label:`Alt Text`,required:!1},{name:`title`,label:`Title`,required:!1}],pattern:fP,toBlock:e=>{let{src:t=``,alt:n=``,title:r=``}=e;return t?`![${n}](${t}${r?` "${uP(r)}"`:``})`:``},toPreview:e=>{let{src:t=``,alt:n=``,title:r=``}=e;return`<img src="${_P(t)}" alt="${_P(n)}" title="${_P(r)}">`}},SP={id:`linked-image`,label:`Image`,fields:[...xP.fields,{name:`link`,label:`Link`,required:!1}],pattern:hP,fromBlock:e=>{let{src:t,alt:n,title:r,src2:i,alt2:a,title2:o,link:s}=e.groups??{};return{src:(t||i||``).trim(),alt:(n||a||``).trim(),title:(r||o||``).trim(),link:(s||``).trim()}},toBlock:e=>{let{src:t=``,alt:n=``,title:r=``,link:i=``}=e,a=t?`![${n}](${t}${r?` "${uP(r)}"`:``})`:``;return a&&i?`[${a}](${i})`:a},toPreview:e=>{let{src:t=``,alt:n=``,title:r=``,link:i=``}=e,a=`<img src="${_P(t)}" alt="${_P(n)}" title="${_P(r)}">`;return i?`<a href="${_P(i)}">${a}</a>`:a}},CP=e=>{if(cp.has(e))return cp.get(e);let t={icon:`image`,label:Y(`editor_components.image`),fields:[{name:`src`,label:Y(`editor_components.src`),widget:`image`},{name:`alt`,label:Y(`editor_components.alt`),required:!1},{name:`title`,label:Y(`editor_components.title`),required:!1}]};return{image:{...xP,...t},"linked-image":{...SP,...t,fields:[...t.fields,{name:`link`,label:Y(`editor_components.link`),required:!1}]}}[e]}})),TP,EP,DP,OP=o((()=>{TP=/^\d+$/,EP=e=>TP.test(e),DP=(e,t)=>{if(typeof e!=`number`)return NaN;if(!Number.isFinite(e))return e;let n=10**t;return Math.round(e*n)/n}})),kP,AP,Qie,$ie,eae=o((()=>{cT(),OP(),kP=new Map,AP=new WeakMap,Qie=e=>{let t=AP.get(e);return t===void 0&&(t=JSON.stringify(e),AP.set(e,t)),t},$ie=({fieldConfig:e,valueMap:t,keyPath:n})=>{let{multiple:r,options:i}=e,a=oT(i),o;if(r){let e=`${n}.`;o=Object.entries(t).filter(([t])=>t.startsWith(e)&&EP(t.slice(e.length))).map(([,e])=>e)}let s=Qie(i),c=r?`${n}|${s}|${JSON.stringify(o)}`:`${n}|${s}|${String(t[n])}`,l=kP.get(c);if(l)return l;let u=e=>i.find(t=>t.value===e)?.label||e;if(r){let e=a?o.map(u):o;return kP.set(c,e),e}let d=t[n],f=a?u(d):d;return kP.set(c,f),f}})),jP,MP,NP,PP=o((()=>{qp(),AF(),jP=e=>{if(!e)return;let t=Object.values(e);if(t.some(e=>e.config?.multiple===!0))return!0;if(t.some(e=>e.config?.multiple===!1))return!1},MP=e=>{if(!e?.config)return;let{multiple:t}=e.config;if(typeof t==`boolean`)return t},NP=e=>{let t=A(TF);return e.multiple??jP(e.media_libraries)??MP(e.media_library)??jP(t?.media_libraries)??MP(t?.media_library)??!1}})),tae,nae,FP,IP,LP,RP,zP,rae,BP,VP,iae,HP,UP,WP,GP,KP=o((()=>{Np(),uC(),dw(),mw(),EC(),kC(),Ww(),sP(),wP(),eae(),WC(),PP(),Gy(),OP(),tae=/^(.*?)<([^>]+)>(.*)$/,nae=/(?:^|\.)(\d+)(?:\.|$)/,FP=/\.\d+$/,IP=new Map,LP=(e,t)=>{if(e.length!==1)return!1;let[n]=e;return n.widget===t&&`root`in n&&n.root===!0},RP=e=>{let t=e.widget??`string`;return DC.includes(t)?NP(e):OC.includes(t)?!!e.multiple:!1},zP=e=>{let t=e.match(tae);if(!t)return{cleanKey:e};let[,n,r,i]=t;return i?{cleanKey:e}:{cleanKey:n||``,typeName:r}},rae=({field:e,key:t,keyPathArray:n,segmentIndex:r,pendingExplicitType:i,valueMap:a})=>{let{cleanKey:o,typeName:s}=zP(t),{widget:c=`text`}=e,l=s??i,u=EP(o),d=o===`*`;if((u||d)&&OC.includes(c))return{field:RP(e)?e:void 0,explicitType:l};let{field:f}=e,{fields:p}=e,{types:m,typeKey:h=`type`}=e;if(f){let e=u||d?n[r+1]:void 0;return{field:!e||f.name===e||f.widget===`object`&&`fields`in f&&f.fields?.some(t=>t.name===e)?f:void 0,explicitType:l}}if(p&&(u||d))return{field:e,explicitType:l};if(p&&!u&&o!==``)return{field:p.find(({name:e})=>e===o),explicitType:l};if(m&&(u||d)){let e=l??a[[n.slice(0,r).join(`.`),o,h].join(`.`)];return{field:m.find(({name:t})=>t===e),explicitType:d?void 0:l}}if(m&&t!==h&&o!==h&&o!==``){let e=l??a[[n.slice(0,r).join(`.`),h].join(`.`)];return{field:m.find(({name:t})=>t===e)?.fields?.find(({name:e})=>e===o),explicitType:void 0}}return{field:void 0,explicitType:l}},BP=e=>{let{collectionName:t,fileName:n=void 0,componentName:r=void 0,valueMap:i={},keyPath:a,isIndexFile:o=!1}=e,s=nae.test(a)?JSON.stringify(e):`${t}|${n??``}|${r??``}|${a}|${o?`1`:`0`}`;if(IP.has(s))return IP.get(s);let c=cw(t),l=c&&n?xC(c,n):void 0;if(!c||n&&c?._type!==`entry`&&!l){IP.set(s,void 0);return}let{fields:u=[]}=l??c,d=o?fw(c):void 0,f=r?CP(r)?.fields??[]:d?.fields??u,p=a.split(`.`),m,h;if(p.forEach((e,t)=>{if(t===0){let{cleanKey:t,typeName:n}=zP(e);m=f.find(({name:e})=>e===t),!m&&d?.fields&&(m=u.find(({name:e})=>e===t)),n&&(h=n)}else if(m){let n=rae({field:m,key:e,keyPathArray:p,segmentIndex:t,pendingExplicitType:h,valueMap:i});m=n.field,h=n.explicitType}}),h&&m&&`types`in m){let{types:e}=m;m=e.find(({name:e})=>e===h)}return IP.set(s,m),m},VP=({fieldConfig:{required:e=!0},locale:t})=>Array.isArray(e)?e.includes(t):!!e,iae=new Map,HP=new Map,UP=({collectionName:e,fileName:t,valueMap:n={},keyPath:r,locale:i,transformations:a,isIndexFile:o=!1})=>{let s=BP({collectionName:e,fileName:t,valueMap:n,keyPath:r,isIndexFile:o}),c=n[r];if(c===void 0&&a?.length)return``;if(s?.widget===`datetime`&&(a?.some(({method:e})=>e===`date`)||(c=Uw({locale:i,fieldConfig:s,currentValue:c}))),s?.widget===`relation`&&(c=oP({fieldConfig:s,valueMap:n,keyPath:r,locale:i})),s?.widget===`select`&&(c=$ie({fieldConfig:s,valueMap:n,keyPath:r})),s?.widget===`list`){let{fields:e}=s,{types:t}=s;if(!(e||t)){let e=Wy(iae,r,()=>RegExp(`^${Dp(r)}${String.raw`\.\d+$`}`));c=HC(i).format(Object.entries(n).filter(([t,n])=>e.test(t)&&typeof n==`string`&&!!n).map(([,e])=>e))}}if(s?.widget===`number`){let{value_type:e=`int`}=s;if(e===`int`||e===`float`){let e=LC(i),t=HP.get(e);t||(t=Intl.NumberFormat(e),HP.set(e,t)),c=t.format(Number(c))}}return Array.isArray(c)&&(c=HC(i).format(c)),a?.length&&(c=lC({fieldConfig:s,value:c,transformations:a,locale:i})),String(c??``)},WP=({valueMap:e,locale:t,keyPath:n,keyPathRegex:r,getFieldArgs:i})=>{let a=[`${n}.title`,`${n}.name`,...Object.keys(e)].find(t=>{let n=e[t];if(!r.test(t)||!(typeof n==`string`&&n.trim()||typeof n==`number`&&!Number.isNaN(n)))return!1;let a=BP({...i,keyPath:t});return!!a&&a.widget!==`hidden`});return a?UP({...i,keyPath:a,locale:t}):``},GP=({entry:e,locale:t,collectionName:n,key:r,resolveRef:i=!0})=>{let{slug:a,locales:o,commitAuthor:{name:s,login:c,email:l}={},commitDate:u}=e;if(r===`slug`)return a;if(r===`commit_author`)return s||c||l;if(r===`commit_date`)return u;let{content:d}=o[t]??{};if(d===void 0)return;let f=cw(n);if(f){if(i){let i=pw(f,e),a=BP({collectionName:n,keyPath:r,isIndexFile:i});if(a?.widget===`relation`)return oP({fieldConfig:a,valueMap:d,keyPath:r,locale:t})}return d[r]}}})),aae,qP,JP,oae,YP,XP,ZP=o((()=>{Fy(),Np(),dx(),GS(),lre(),Qp(),QS(),uC(),mw(),KP(),aae=/^#+\s+(?<header>.+?)(?:\s+\{#.+?\})?\s*$/m,qP=(e,{allowMarkdown:t=!1}={})=>(e=US(e),t&&(e=ire(e)),e=ux(e,{ALLOWED_TAGS:t?[`strong`,`em`,`code`]:[]}),t||(e=ire(e)),e.trim()),JP=(e,{identifierField:t=`title`,useBody:n=!0}={})=>{let r=[t,`title`,`name`,`label`].find(t=>typeof e[t]==`string`&&!!e[t].trim());return r?e[r].trim():n&&typeof e.body==`string`?e.body.match(aae)?.groups?.header??``:``},oae=(e,t)=>{let{slug:n,entryPath:r,basePath:i,locales:a,commitDate:o,commitAuthor:s}=t;if(e===`slug`)return n;if(e===`locales`)return a.sort((e,t)=>e.localeCompare(t)).join(`, `);if(e===`dirname`){let e=r.replace(/[^/]+$/,``);if(i){let t=i.endsWith(`/`)?i:`${i}/`;e.startsWith(t)?e=e.slice(t.length):e.startsWith(i)&&(e=e.slice(i.length))}return kp(e)}if(e===`filename`)return r.split(`/`).pop().split(`.`).shift();if(e===`extension`)return r.split(`/`).pop().split(`.`).pop();if(e===`commit_date`)return o??``;if(e===`commit_author`)return s?.name||s?.login||s?.email},YP=(e,t)=>{let{content:n,collectionName:r,replaceSubContext:i,defaultLocale:a}=t,{value:o,transformations:s}=cC(e),c=o.replace(/^fields\./,``),l={collectionName:r,valueMap:n,keyPath:c},u=oae(o,i),d=ZS(s,e=>YP(e,t));if(u===void 0&&(u=d.some(({method:e})=>e===`date`||e===`ternary`)?n[c]:UP({...l,locale:a})),u===void 0)return``;if(u instanceof Date&&!d.length){let{year:e,month:t,day:n}=Py({date:u});return`${e}-${t}-${n}`}return d.length&&(u=lC({fieldConfig:BP({...l}),value:u,transformations:d,locale:a})),String(u)},XP=(e,t,{locale:n,useTemplate:r=!1,allowMarkdown:i=!1}={})=>{if(pw(e,t))return fw(e)?.label;let{_type:a,name:o,_i18n:{defaultLocale:s}}=e,{_file:{basePath:c}={},identifier_field:l=`title`,summary:u}=a===`entry`?e:{},{locales:d,slug:f,commitDate:p,commitAuthor:m}=t,{content:h={},path:g=``}=d[n??s]??Object.values(d)[0]??{};if(!r||!u)return qP(JP(h,{identifierField:l})||f.replaceAll(`-`,` `),{allowMarkdown:i});let _={content:h,collectionName:o,replaceSubContext:{slug:f,entryPath:g,basePath:c,locales:Object.keys(d),commitDate:p,commitAuthor:m},defaultLocale:s};return qP(u.replace(Yp,(e,t)=>YP(t,_)),{allowMarkdown:i})}})),sae,cae,lae,uae,dae,fae=o((()=>{Ep(),Qp(),ZP(),sae=(e,t)=>pee.includes(e)?t[e]:void 0,cae=e=>{switch(e){case`uuid`:return Cp();case`uuid_short`:return Cp(`short`);case`uuid_shorter`:return Cp(`shorter`);default:return}},lae=(e,t,n,r)=>{if(!(e!==`slug`||!t))return n===`preview_path`&&r?``:t},uae=(e,t,n)=>{if(!t)return``;switch(e){case`dirname`:{let e=t.replace(n??``,``),r=e.lastIndexOf(`/`);return r>0?e.substring(0,r):``}case`filename`:return t.split(`/`).pop().split(`.`).shift();case`extension`:return t.split(`/`).pop().split(`.`).pop();default:return}},dae=(e,t,n)=>e.startsWith(`fields.`)?t[e.replace(/^fields\./,``)]:e===`slug`?JP(t,{identifierField:n}):t[e]})),QP,pae,mae=o((()=>{Ep(),Yy(),fae(),QS(),uC(),KP(),QP=(e,t)=>{let{type:n,content:r,currentSlug:i,entryFilePath:a,locale:o,dateTimeParts:s,identifierField:c,basePath:l,isIndexFile:u=!1}=t,d=sae(e,s);if(d!==void 0)return d;let f=lae(e,i,n??``,u);if(f!==void 0)return f;let p=cae(e);if(p!==void 0)return p;if(n===`preview_path`&&e===`locale`)return o;if(n===`preview_path`||n===`media_folder`){let t=uae(e,a,l);if(t!==void 0)return t}return dae(e,r,c)},pae=(e,t)=>{let{replaceSubContext:n,getFieldArgs:r}=t,{value:i,transformations:a}=cC(e),o=QP(i,n),s=ZS(a,e=>String(QP(e,n)??``)),c=a.some(e=>e.args.defaultValue!==void 0);if(o===void 0&&!c)return Cp(`short`);let{type:l,locale:u}=n;return s.length&&(o=lC({fieldConfig:BP({...r,keyPath:i}),value:o,transformations:s,locale:u})),l?String(o):Jy(String(o),{locale:u,maxLength:1/0})}})),$P,hae,eF,tF=o((()=>{Fy(),Np(),qp(),Qp(),mae(),AF(),AN(),FE(),$P=e=>Jp.test(e),hae=(e,t)=>EN(e).map(e=>t?e.locales[t]?.slug:e.slug).filter(Boolean),eF=(e,t)=>{let{collection:n,content:r,currentSlug:i,locale:a,dateTimeParts:o,isIndexFile:s=!1}=t,{_type:c,name:l}=n,{identifier_field:u=`title`,slug_length:d=void 0,_file:{basePath:f}={}}=c===`entry`?n:{},p=A(TF)?.slug,m=d??p?.maxlength,h=p?.timezone===`local`?void 0:`UTC`,g={replaceSubContext:{...t,dateTimeParts:o??Py({timeZone:h}),identifierField:u,basePath:f},getFieldArgs:{collectionName:l,keyPath:``,valueMap:r,isIndexFile:s}},_=e.replace(Yp,(e,t)=>pae(t,g)).trim();return i?_:(typeof m==`number`&&(_=Op(_,m,{ellipsis:``}).replace(/-$/,``)),kE(_,hae(l,a)))}})),nF,rF,iF,gae,aF,oF,_ae,vae,yae,bae=o((()=>{Gp(),Np(),tF(),dw(),EC(),nF=[],rF=e=>e.includes(`{{media_folder}}`)||e.includes(`{{public_folder}}`),iF=(e,{globalMediaFolder:t,globalPublicFolder:n})=>e.trim().replace(`{{media_folder}}`,`/${t}`).replace(`{{public_folder}}`,`/${n}`).replace(`//`,`/`),gae=({collectionName:e,fileName:t,typedKeyPath:n,isIndexFile:r=!1,mediaFolder:i,publicFolder:a,baseFolder:o,globalFolders:s,label:c,icon:l,isAssetCollection:u=!1})=>{if(rF(i)){if(!s)return;i=iF(i,s)}if(a===void 0)a=i;else if(rF(a)){if(!s)return;a=iF(a,s)}i=i.replace(/^\.(?:\/|$)/,``);let d=!i.startsWith(`/`);return{collectionName:e,fileName:t,typedKeyPath:n,isIndexFile:r,internalPath:kp(d?o??``:i),internalSubPath:d?kp(i):void 0,publicPath:/^($|[.@])/.test(a)?a:`/${kp(a)}`,entryRelative:d,hasTemplateTags:$P(i),label:c,icon:l,isAssetCollection:u}},aF=e=>{if(e.mediaFolder===void 0)return;let t=gae(e);if(!t)return;let{globalMediaFolder:n,globalPublicFolder:r}=e.globalFolders??{};!t.entryRelative&&t.internalPath===n&&t.publicPath===r||nF.push(t)},oF=({collectionName:e,files:t,globalFolders:n})=>{bC(t).forEach(t=>{let{name:r,file:i,media_folder:a,public_folder:o}=t;aF({collectionName:e,fileName:r,mediaFolder:a,publicFolder:o,baseFolder:Rp(i).dirname,globalFolders:n})})},_ae=({fieldMediaFolders:e,validCollections:t,globalFolders:n})=>{e.forEach(({fieldConfig:e,context:r})=>{let i=r.collection;(i.name===`_singletons`||t.some(e=>e.name===i.name))&&aF({collectionName:i.name,fileName:r.collectionFile?.name,mediaFolder:e.media_folder,publicFolder:e.public_folder,baseFolder:`folder`in i?i.folder:void 0,typedKeyPath:r.typedKeyPath,isIndexFile:r.isIndexFile,globalFolders:n})})},vae=({assetCollections:e,globalFolders:t})=>{e.forEach(e=>{let{name:n,label:r=n,icon:i,media_folder:a,public_folder:o}=e;a!==void 0&&aF({collectionName:`assets:${n}`,mediaFolder:`/${kp(a)}`,publicFolder:o,globalFolders:t,label:r,icon:i,isAssetCollection:!0})})},yae=(e,t=[])=>{nF.length=0;let{media_folder:n,public_folder:r,collections:i,singletons:a,asset_collections:o}=e,s=n!==void 0,c=s?kp(n).replace(/^\.$/,``):``,l=s?r?`/${kp(r)}`.replace(/^\/@/,`@`):`/${c}`:``,u={collectionName:void 0,internalPath:void 0,internalSubPath:void 0,publicPath:void 0,entryRelative:!1,hasTemplateTags:!1,label:void 0,icon:void 0,isAssetCollection:!1},d=s?{...u,internalPath:c,publicPath:l}:void 0,f=s?{globalMediaFolder:c,globalPublicFolder:l}:void 0,p=aw({collections:i});p.forEach(e=>{let{name:t,files:n,folder:r,path:i,media_folder:a,public_folder:o}=e;aF({collectionName:t,mediaFolder:s&&a===void 0&&i!==void 0?``:a,publicFolder:o,baseFolder:r,entryPath:i,globalFolders:f}),n?.length&&oF({collectionName:t,files:n,globalFolders:f})}),a?.length&&oF({collectionName:`_singletons`,files:a,globalFolders:f}),_ae({fieldMediaFolders:t,validCollections:p,globalFolders:f}),nF.sort((e,t)=>Mp(e.internalPath,t.internalPath));let m=[];return d&&m.push(d),o?.length&&vae({assetCollections:o,globalFolders:f}),m.push(...nF),m.length&&m.unshift(u),m}})),xae,sF,cF,Sae,Cae,wae,Tae,Eae=o((()=>{Np(),dw(),EC(),WC(),$C(),xae=({collection:e,file:t})=>{let n=kp(t.file);if(!n.includes(`{{locale}}`))return{_default:n};let r=QC(e,t);return Object.fromEntries(r.allLocales.map(e=>[e,UC({_i18n:r,locale:e,path:n})]))},sF=(e,t)=>{if(yC(t))return{collectionName:e.name,fileName:t.name,filePathMap:xae({collection:e,file:t})}},cF=(e,t)=>Mp(Object.values(e.filePathMap??{})[0],Object.values(t.filePathMap??{})[0]),Sae=({collections:e})=>aw({collections:e,type:`entry`}).map(e=>{let{name:t,folder:n}=e,r=kp(n),{allLocales:i,defaultLocale:a,omitDefaultLocaleFromFilePath:o,structureMap:{i18nMultiRootFolder:s}}=QC(e);return{collectionName:t,folderPath:r,folderPathMap:Object.fromEntries(i.map(e=>[e,s?o&&e===a?r:`${e}/${r}`:r]))}}).sort((e,t)=>Mp(e.folderPath,t.folderPath)),Cae=({collections:e})=>aw({collections:e,type:`file`}).flatMap(e=>(e.files??[]).map(t=>sF(e,t))).filter(e=>!!e).sort(cF),wae=({singletons:e})=>{let t=Array.isArray(e)?bC(e):[];if(!t.length)return[];let n={name:`_singletons`,files:t};return t.map(e=>sF(n,e)).filter(e=>!!e).sort(cF)},Tae=e=>[...Sae(e),...Cae(e),...wae(e)]})),Dae,Oae=o((()=>{Dae=[`text/yaml`,`application/yaml`,`application/toml`,`application/json`]})),kae,Aae,jae,Mae,lF,Nae=o((()=>{X(),f(),kae=l(cte(),1),Oae(),nE(),SE(),zD(),Aae=async({href:e,type:t=`application/yaml`},{manualInit:n=!1,showSchemaTip:r}={})=>{let i;if(!Dae.includes(t))throw Error(Y(`config.error.parse_failed`),{cause:Error(Y(`config.error.parse_failed_unsupported_type`))});let a=n?`config.error.fetch_failed_with_manual_init`:`config.error.fetch_failed`;try{let t=new URL(e,window.location.href);t.searchParams.set(`_`,Date.now().toString()),i=await fetch(t)}catch(e){throw Error(Y(a),{cause:e})}let{ok:o,status:s}=i;if(!o)throw Error(Y(a),{cause:Error(Y(`config.error.fetch_failed_not_ok`,{values:{status:s}}))});let c=!1,l;try{if(t===`application/json`)l=await i.json(),u(l)&&l.$schema!==`https://unpkg.com/@sveltia/cms/schema/sveltia-cms.json`&&(c=!0);else{let e=await i.text();t===`application/toml`?(l=XT(e),e.includes(`#:schema https://unpkg.com/@sveltia/cms/schema/sveltia-cms.json`)||(c=!0)):(l=ZT(e,{merge:!0,maxAliasCount:-1}),e.includes(`# yaml-language-server: $schema=https://unpkg.com/@sveltia/cms/schema/sveltia-cms.json`)||(c=!0))}}catch(e){throw Error(Y(`config.error.parse_failed`),{cause:e})}if(!u(l))throw Error(Y(`config.error.parse_failed`),{cause:Error(Y(`config.error.parse_failed_invalid_object`))});return r&&c&&console.info(Y(`config.schema_tip`)),l},jae=e=>{if(e.endsWith(`/`))return`${e}config.yml`;let t=e.split(`/`);return t.pop()?.includes(`.`)?`${t.join(`/`)}/config.yml`:`${e}/config.yml`},Mae=e=>{let{origin:t}=window.location;return e.every(({href:e})=>LD(e,t))},lF=async({manualInit:e=!1}={})=>{let t=[...document.querySelectorAll(`link[rel="cms-config-url"]`)].map(({href:e,type:t})=>({href:e,type:t}));if(t.length||t.push({href:jae(window.location.pathname)}),!Mae(t))throw Error(Y(`config.error.insecure_urls`,{values:{count:t.length}}));let n=bE.isLocalHost&&!e&&t.length===1,r=await Promise.all(t.map(t=>Aae(t,{manualInit:e,showSchemaTip:n})));return r.length===1?r[0]:kae.default.all(r)}})),uF,dF,Pae,Fae,fF,pF=o((()=>{X(),WC(),uF=({type:e=`error`,strKey:t,values:n={},extraStrKey:r,context:i={},collectors:a})=>{let{collection:o,collectionFile:s,typedKeyPath:c}=i,{errors:l,warnings:u}=a,d=[];o&&d.push(Y(`config.error_locator.collection`,{values:{collection:o.label_singular??o.label??o.name}})),s&&d.push(Y(`config.error_locator.file`,{values:{file:s.label??s.name}})),c&&d.push(Y(`config.error_locator.field`,{values:{field:c}}));let f=e===`error`?l:u,p=Hh.current,m=d.length?`${HC(p).format(d)}: `:``,h=Y(`config.${e}.${t}`,{values:n});f.add(`${m}${h}${r?` ${Y(`config.${r}`)}`:``}`)},dF=({UNSUPPORTED_OPTIONS:e,config:t,context:n,collectors:r})=>{e.forEach(({type:e=`error`,prop:i,newProp:a,value:o,strKey:s=`unsupported_deprecated_option`})=>{i in t&&(o===void 0||t[i]===o)&&uF({type:e,strKey:s,values:{prop:i,newProp:a},extraStrKey:`compatibility_link`,context:n,collectors:r})})},Pae=/^[^\s.*:<>]+$/,Fae=e=>Pae.test(e),fF=({name:e,index:t,nameCounts:n,strKeyBase:r,context:i,collectors:a})=>{if(!e||typeof e!=`string`){let e=String(t+1);return uF({strKey:`missing_${r}`,context:i,values:{count:e},collectors:a}),!1}return Fae(e)?n[e]===1?(uF({strKey:`duplicate_${r}`,context:i,values:{name:e},collectors:a}),!1):(n[e]=(n[e]??0)+1,!0):(uF({strKey:`invalid_${r}`,context:i,values:{name:e},collectors:a}),!1)}})),Iae,Lae,Rae=o((()=>{X(),f(),wA(),MC(),pF(),Iae=[{type:`warning`,prop:`use_graphql`,strKey:`unsupported_ignored_option`},{type:`warning`,prop:`open_authoring`,strKey:`open_authoring_unsupported`}],Lae=(e,t)=>{let{backend:n}=e,{errors:r,warnings:i}=t;if(!u(n)){r.add(Y(`config.error.missing_backend`));return}let{name:a}=n;if(!a){r.add(Y(`config.error.missing_backend_name`));return}if(!yA.includes(a)){let e=vA[a],t=e?e.deprecated?`deprecated`:`known`:`custom`,n=e?.label,i=Y(`config.error.unsupported_${t}_backend`,{values:{name:n}});r.add(`${i} ${Y(`config.error.unsupported_backend_suggestion`)}`);return}if(a in bA){let{repo:o,automatic_deployments:s,auth_methods:c,auth_type:l,app_id:u}=n;Array.isArray(c)&&!c.length&&r.add(Y(`config.error.no_auth_methods`));let d=!c||c.includes(`token`);o===void 0&&r.add(Y(`config.error.missing_repository`)),(typeof o!=`string`||!/^[^/:]+(?:\/[^/:]+)+$/.test(o))&&r.add(Y(`config.error.invalid_repository`)),l===`implicit`&&r.add(Y(`config.error.oauth_implicit_flow`).replace(`BACKEND_NAME`,a)),a===`github`&&l===`pkce`&&r.add(Y(`config.error.github_pkce_unsupported`)),a===`gitlab`&&l===`pkce`&&!u&&r.add(Y(`config.error.oauth_no_app_id`)),a===`gitea`&&!u&&(d?i.add(Y(`config.warning.oauth_no_app_id`)):r.add(Y(`config.error.oauth_no_app_id`))),s!==void 0&&jC(`automatic_deployments`),dF({UNSUPPORTED_OPTIONS:Iae,config:n,context:{cmsConfig:e},collectors:t})}}})),zae,mF,hF,Bae=o((()=>{IC(),zae=[`code`,`markdown`,`richtext`,`text`],mF=[`yaml`,`toml`,`json`],hF=(e,t,n=[])=>{if(!e||!t||t===`raw`)return!1;let r=t.endsWith(`-frontmatter`)||t===`frontmatter`;if(r&&n.length===1){let[{name:e,widget:t=`string`}]=n;if(e===`body`&&zae.includes(t))return!1}let i=e===`yml`?`yaml`:e,a=t===`yml`?`yaml`:t;if(NC.includes(i))return!r;if(a.endsWith(`-frontmatter`)){let e=a.replace(`-frontmatter`,``);return PC.includes(i)?!1:i!==e}return a===`frontmatter`?!kre.includes(i):mF.includes(a)?mF.includes(i)&&i!==a:!1}})),Vae,Hae,Uae,Wae,Gae=o((()=>{pF(),oC(),Vae=[{prop:`dateFormat`,newProp:`date_format`},{prop:`timeFormat`,newProp:`time_format`},{prop:`pickerUtc`,newProp:`picker_utc`}],Hae=e=>{try{return Intl.DateTimeFormat(`en-US`,{timeZone:e}),!0}catch{return!1}},Uae=e=>{let{config:t,context:n,collectors:r}=e,{picker_utc:i,input_timezone:a,output_utc:o}=t;i!==void 0&&(a!==void 0||o!==void 0)&&uF({type:`warning`,strKey:`conflicting_timezone_options`,context:n,collectors:r}),iC(a)&&!Hae(a)&&uF({strKey:`invalid_timezone`,values:{timeZone:a},context:n,collectors:r})},Wae=e=>{dF({...e,UNSUPPORTED_OPTIONS:Vae}),Uae(e)}})),Kae,gF,qae=o((()=>{pF(),Kae=[{prop:`allow_multiple`,newProp:`multiple`,strKey:`allow_multiple`}],gF=e=>{let{config:t,context:n,collectors:r}=e,{media_folder:i}=t;i!==void 0&&r.mediaFields.add({fieldConfig:t,context:n}),dF({...e,UNSUPPORTED_OPTIONS:Kae})}})),Jae,Yae,Xae=o((()=>{bF(),pF(),Jae=(e,t,n)=>e===`object`?!0:(uF({strKey:`invalid_list_variable_type`,context:t,values:{widget:e},collectors:n}),!1),Yae=e=>{let{config:t,context:n,collectors:r}=e,{field:i}=t,{fields:a}=t,{types:o}=t,{typedKeyPath:s}=n,c={nameCounts:{},strKeyBase:`variable_type`,collectors:r};if(i&&a||i&&o||a&&o){uF({strKey:`invalid_list_field`,context:n,collectors:r});return}i&&vF({config:i,context:{...n,typedKeyPath:`${s}.*`},collectors:r}),a&&yF(a,{...n,typedKeyPath:`${s}.*`},r),o?.forEach(({name:e,widget:t=`object`,fields:i},a)=>{let o={...n,typedKeyPath:`${s}.*<${e}>`};fF({...c,name:e,index:a,context:o})&&Jae(t,o,r)&&i&&yF(i,o,r)})}})),Zae,Qae,$ae=o((()=>{pF(),Zae=[{prop:`valueType`,newProp:`value_type`}],Qae=e=>{dF({...e,UNSUPPORTED_OPTIONS:Zae})}})),eoe,toe=o((()=>{bF(),pF(),eoe=e=>{let{config:t,context:n,collectors:r}=e,{fields:i}=t,{types:a}=t,{typedKeyPath:o}=n,s={nameCounts:{},strKeyBase:`variable_type`,collectors:r};if(i&&a){uF({strKey:`invalid_object_field`,context:n,collectors:r});return}if(!i&&!a){uF({strKey:`object_field_missing_fields`,context:n,collectors:r});return}i&&yF(i,n,r),a?.forEach(({name:e,fields:t},i)=>{let a={...n,typedKeyPath:`${o}<${e}>`};fF({...s,name:e,index:i,context:a})&&t&&yF(t,a,r)})}})),noe,roe,ioe=o((()=>{pF(),noe=[{prop:`displayFields`,newProp:`display_fields`},{prop:`searchFields`,newProp:`search_fields`},{prop:`valueField`,newProp:`value_field`},{type:`warning`,prop:`options_length`,strKey:`unsupported_ignored_option`}],roe=e=>{let{config:t,context:n,collectors:r}=e,i=t,{collection:a,file:o,value_field:s}=i,{cmsConfig:c}=n,l=a===`_singletons`?{files:c?.singletons}:c?.collections?.find(e=>e.name===a),u;if(l){let e=`files`in l&&Array.isArray(l.files);o?(e&&(u=l.files.find(e=>`file`in e&&e.name===o)),u||uF({strKey:`relation_field_invalid_collection_file`,context:n,collectors:r,values:{file:o}})):e&&uF({strKey:`relation_field_missing_file_name`,context:n,collectors:r,values:{collection:a}})}else uF({strKey:`relation_field_invalid_collection`,context:n,collectors:r,values:{collection:a}});dF({...e,UNSUPPORTED_OPTIONS:noe}),r.relationFields.add({fieldConfig:i,context:n})}})),aoe,_F,ooe=o((()=>{pF(),aoe=[{prop:`editorComponents`,newProp:`editor_components`}],_F=e=>{dF({...e,UNSUPPORTED_OPTIONS:aoe})}})),soe,vF,yF,bF=o((()=>{Gae(),qae(),Xae(),$ae(),toe(),ioe(),ooe(),pF(),soe={datetime:Wae,file:gF,image:gF,list:Yae,markdown:_F,number:Qae,object:eoe,relation:roe,richtext:_F},vF=e=>{let{config:t,context:n}=e,{name:r,widget:i=`string`}=t,{typedKeyPath:a}=n,o={...e,context:{...n,typedKeyPath:a?`${a}.${r}`:r}};soe[i]?.(o),i===`date`&&uF({...o,strKey:`date_field_type`})},yF=(e,t,n)=>{let r={nameCounts:{},strKeyBase:`field_name`,context:t,collectors:n};e?.forEach((e,i)=>{let{name:a}=e;fF({...r,name:a,index:i})&&vF({config:e,context:t,collectors:n})})}})),coe,xF,loe=o((()=>{Gp(),Bae(),bF(),pF(),coe=(e,t)=>{let{collection:n,collectionFile:r}=e,{file:i,format:a=n.format,fields:o,i18n:s}=r,{extension:c}=Rp(i);hF(c,a,o)&&uF({strKey:`file_format_mismatch`,context:e,values:{extension:c,format:a},collectors:t}),o?.length||uF({strKey:`collection_file_no_fields`,context:e,collectors:t}),i.includes(`{{locale}}`)&&!s&&uF({strKey:`collection_file_i18n_required`,context:e,collectors:t}),yF(o,e,t)},xF=(e,t)=>{let{cmsConfig:n,collection:r}=e,{files:i}=r,a={nameCounts:{},strKeyBase:`collection_file_name`,collectors:t};i.forEach((e,i)=>{if(`divider`in e)return;let{name:o}=e,s={cmsConfig:n,collection:r,collectionFile:e};fF({...a,name:o,index:i,context:s})&&coe(s,t)})}})),uoe,doe,foe,poe,moe=o((()=>{X(),MC(),loe(),Bae(),bF(),pF(),uoe=[{type:`warning`,prop:`nested`,strKey:`nested_collections_unsupported`},{prop:`sortableFields`,newProp:`sortable_fields`}],doe=(e,t)=>{let{cmsConfig:n,collection:r}=e,{extension:i,format:a,fields:o,index_file:s,slug:c,slug_length:l}=r;hF(i,a)&&uF({strKey:`file_format_mismatch`,values:{extension:i,format:a},context:e,collectors:t}),l!==void 0&&jC(`slug_length`),dF({UNSUPPORTED_OPTIONS:uoe,config:r,context:e,collectors:t}),o?.length||uF({strKey:`collection_no_fields`,context:e,collectors:t}),yF(o,e,t),s&&yF(s===!0?o:s.fields??o,{cmsConfig:n,collection:r,isIndexFile:!0},t),c?.includes(`/`)&&uF({strKey:`invalid_slug_slash`,values:{slug:c},context:e,collectors:t})},foe=({cmsConfig:e,collection:t},n)=>{let r=`divider`in t,i=`files`in t,a=`folder`in t;if(!r&&!i&&!a){uF({strKey:`invalid_collection_no_options`,context:{cmsConfig:e,collection:t},collectors:n});return}if(r&&i||r&&a||i&&a){uF({strKey:`invalid_collection_multiple_options`,context:{cmsConfig:e,collection:t},collectors:n});return}i?xF({cmsConfig:e,collection:t},n):a&&doe({cmsConfig:e,collection:t},n)},poe=(e,t)=>{let{collections:n,singletons:r}=e,{errors:i}=t;if(!Array.isArray(n)&&!Array.isArray(r)){i.add(Y(`config.error.no_collection`));return}let a={nameCounts:{},strKeyBase:`collection_name`,collectors:t};n?.forEach((n,r)=>{if(`divider`in n)return;let{name:i}=n,o={cmsConfig:e,collection:n};fF({...a,name:i,index:r,context:o})&&foe(o,t)}),Array.isArray(r)&&xF({cmsConfig:e,collection:{name:`_singletons`,label:Y(`singletons`),label_singular:Y(`singleton`),files:r}},t)}})),hoe,goe=o((()=>{X(),pF(),Zj(),hoe=(e,t)=>{let{media_folder:n,public_folder:r,media_library:i,media_libraries:a,asset_collections:o}=e,{errors:s}=t;if(n===void 0?!Xj.includes(i?.name??``)&&!Object.keys(a||{}).some(e=>Xj.includes(e))&&s.add(Y(`config.error.missing_media_folder`)):typeof n!=`string`&&s.add(Y(`config.error.invalid_media_folder`)),r!==void 0&&(typeof r==`string`?(/^\.{1,2}\//.test(r)&&s.add(Y(`config.error.public_folder_relative_path`)),/^https?:/.test(r)&&s.add(Y(`config.error.public_folder_absolute_url`))):s.add(Y(`config.error.invalid_public_folder`))),o!==void 0)if(!Array.isArray(o))s.add(Y(`config.error.invalid_asset_collections`));else{let n={nameCounts:{},strKeyBase:`asset_collection_name`,collectors:t};o.forEach((t,r)=>{let{name:i,media_folder:a}=t,o={cmsConfig:e};fF({...n,name:i,index:r,context:o})&&typeof a!=`string`&&s.add(Y(`config.error.asset_collection_invalid_media_folder`,{values:{name:i}}))})}}})),_oe,voe,yoe=o((()=>{Rae(),moe(),goe(),pF(),_oe=[{type:`warning`,prop:`publish_mode`,value:`editorial_workflow`,strKey:`editorial_workflow_unsupported`},{type:`warning`,prop:`local_backend`,strKey:`unsupported_ignored_option`},{type:`warning`,prop:`locale`,strKey:`unsupported_ignored_option`},{type:`warning`,prop:`search`,strKey:`unsupported_ignored_option`}],voe=(e,t)=>{Lae(e,t),hoe(e,t),poe(e,t),dF({UNSUPPORTED_OPTIONS:_oe,config:e,context:{cmsConfig:e},collectors:t})}})),boe,SF,xoe,CF,wF,TF,EF,DF,OF,kF,Soe,AF=o((()=>{X(),Ep(),f(),Np(),boe=l(cte(),1),qp(),Ny(),cm(),bae(),Eae(),Nae(),yoe(),vC(),JO(),{DEV:SF,VITE_SITE_URL:xoe}={DEV:!1},CF=SF?xoe||`http://localhost:5174`:void 0,wF={},TF=ln(),EF=ln(),DF=ln([]),OF=un([TF,DF],([e,t])=>!!e||!!t.length),kF={errors:new Set,warnings:new Set,mediaFields:new Set,relationFields:new Set},Soe=async e=>{TF.set(void 0),DF.set([]),Object.assign(kF,{errors:new Set,warnings:new Set,mediaFields:new Set,relationFields:new Set});try{if(!window.isSecureContext)throw Error(Y(`config.error.no_secure_context`));let t;if(e){if(!u(e))throw Error(Y(`config.error.parse_failed`));t=e,t.load_config_file!==!1&&(t=(0,boe.default)(await lF({manualInit:!0}),t))}else t=await lF();if(Object.assign(wF,t),voe(t,kF),kF.errors.size)throw kF.errors.forEach(e=>{console.error(e)}),Error(`Errors found in configuration`);kF.warnings.size&&kF.warnings.forEach(e=>{console.warn(e)});let n=structuredClone(t);n._siteURL=n.site_url?.trim()||(SF?CF:window.location.origin),n._baseURL=jp(n._siteURL)?new URL(n._siteURL).origin:``,n.collections?.forEach(e=>{`folder`in e&&(e.folder===`.`||e.folder===`/`)&&(e.folder=``)}),TF.set(n),EF.set(await Tp(jy(n)))}catch(e){DF.set(kF.errors.size?[...kF.errors]:[e.name===`Error`?e.message:Y(`config.error.unexpected`)]),console.error(e,e.cause)}},TF.subscribe(e=>{if(qO.devModeEnabled&&(console.info(`cmsConfig`,e),console.info(`collectors`,kF)),!e)return;let t=Tae(e),n=yae(e,[...kF.mediaFields]);pC.set(t),$p.set(n),qO.devModeEnabled&&(console.info(`allEntryFolders`,t),console.info(`allAssetFolders`,n))})})),jF,MF=o((()=>{qp(),AF(),jF=({libraryName:e=`default`,fieldConfig:t}={})=>{let n=A(TF),r=e==="default"?{...n?.media_libraries?.all,...t?.media_libraries?.all}:void 0,i=e=>({...e,...r&&Object.keys(r).length>0&&{config:{...r,...e?.config}}});if(t?.media_libraries&&e in t.media_libraries){let n=t.media_libraries[e];return n===!1?!1:i(n)}if(t?.media_library){let r=n?.media_library?.name??`default`,a=t.media_library,o=a.name;if(r===e&&(o===e||o===void 0))return i(a)}if(n?.media_libraries&&e in n.media_libraries){let t=n.media_libraries[e];return t===!1?!1:i(t)}return n?.media_library?.name===e?i(n.media_library):i(null)}})),NF,Coe,PF=o((()=>{f(),MF(),jM(),GM(),NF=({fieldConfig:e}={})=>{let t=jF({fieldConfig:e}),{max_file_size:n,multiple:r,slugify_filename:i,transformations:a}=typeof t==`boolean`?{}:t?.config??{};return{enabled:t!==!1,config:{max_file_size:typeof n==`number`&&Number.isInteger(n)?n:1/0,multiple:typeof r==`boolean`?r:!1,slugify_filename:typeof i==`boolean`?i:!1,transformations:u(a)?a:void 0}}},Coe=async(e,t)=>{let[n,r]=e.type.split(`/`);if(n===`image`&&r!==`svg+xml`){let n;if(CM.includes(r)&&(r in t?n=t[r]:`raster_image`in t&&(n=t.raster_image)),n){let{format:t,quality:r,width:i,height:a}=n,o=t&&AM.includes(t)?t:`webp`,s=await UM(e,{format:o,quality:r&&Number.isSafeInteger(r)?r:85,width:i&&Number.isSafeInteger(i)?i:void 0,height:a&&Number.isSafeInteger(a)?a:void 0}),c=s.type===`image/${o}`?TM.test(e.name)?e.name.replace(TM,o):e.name.concat(o):e.name;return new File([s],c,{type:s.type})}}return n===`image`&&r===`svg+xml`&&t.svg?.optimize?new File([await WM(e)],e.name,{type:e.type}):e}})),FF,IF=o((()=>{PF(),FE(),FF=async(e,{slugify_filename:t=!1,transformations:n,max_file_size:r=1/0}={})=>{if(t){let{name:t,type:n,lastModified:r}=e,i=AE(t,{slugificationEnabled:!0});e=new File([e],i,{type:n,lastModified:r})}let i=e;return n&&(e=await Coe(e,n)),{file:e,originalFile:e===i?void 0:i,oversized:e.size>r}}})),woe,LF,RF,zF,BF,VF,Toe,HF,UF,WF,GF,KF,Eoe,qF,Doe,Ooe,JF,YF,XF,koe,ZF,QF,$F=o((()=>{Gp(),Np(),cc(),qp(),cm(),IF(),tF(),Qp(),dw(),mw(),EC(),yN(),PF(),FE(),woe=/^(?<entryFolder>.+?)(?:\/[^/]+)?$/,LF=ln([]),RF={source:void 0,map:new Map},zF=()=>{let e=A(LF);return e!==RF.source&&(RF.source=e,RF.map=new Map(e.map(e=>[e.path,e]))),RF.map},BF=e=>zF().get(e),VF=ln([]),Toe=un(VF,e=>new Set(e.map(e=>e.path))),HF=ln(),UF=ln(),WF=ln({folder:void 0,files:[]}),GF=ln(),KF=ln(),Eoe=un([WF],([e],t,n)=>{t({processing:!1,undersizedFiles:[],oversizedFiles:[],transformedFileMap:new WeakMap});let r=e.files,{config:i}=NF();(async()=>{r.length&&i.transformations&&n(e=>({...e,processing:!0}));let e=await Promise.all(r.map(e=>FF(e,i)));n(()=>({processing:!1,undersizedFiles:e.filter(({oversized:e})=>!e).map(({file:e})=>e),oversizedFiles:e.filter(({oversized:e})=>e).map(({file:e})=>e),transformedFileMap:new WeakMap(e.filter(({originalFile:e})=>e!==void 0).map(({file:e,originalFile:t})=>[e,t]))}))})()}),qF=({path:e,entry:t,collection:n,file:r,typedKeyPath:i})=>{let{locales:a}=t,{_i18n:{defaultLocale:o}}=r??n,s=i?rm({collectionName:n.name,fileName:r?.name,typedKeyPath:i}):void 0,c=s?.entryRelative?s.internalSubPath??``:(r??n).media_folder,{path:l,content:u}=a[o in a?o:Object.keys(a)[0]];if(!l||!u)return;let{entryFolder:d}=l.match(woe).groups,f=e.replace(/^\.\//,``),p=ME(jE([d,c,c&&f.startsWith(`${c}/`)?f.slice(c.length+1):f]));return zF().get(p)},Doe=({path:e,entry:t,collectionName:n,fileName:r,typedKeyPath:i})=>{if(!t){let t=[n&&i?rm({collectionName:n,fileName:r,typedKeyPath:i}):void 0,n?rm({collectionName:n,fileName:r}):void 0,n?rm({collectionName:n}):void 0,A(em)].filter(e=>!!e&&!e.hasTemplateTags),a;return t.find(t=>{let n=t.publicPath?.replace(/^\//,``)??``,r=n&&e.startsWith(`${n}/`)?e.slice(n.length+1):e,i=zF().get(jE([t.internalPath,t.internalSubPath??``,r]));return i&&(a=i),!!i}),a??zF().get(e)}return hN(t).flatMap(n=>{let r=CC(n,t),a={path:e,entry:t,collection:n,typedKeyPath:i};return r.length?r.map(e=>qF({...a,file:e})):qF({...a})}).filter(Boolean)[0]??zF().get(e)},Ooe=({path:e,entry:t,collectionName:n,fileName:r,typedKeyPath:i})=>{let a=zF().get(kp(e));if(a)return a;let{dirname:o=``,basename:s}=Rp(e),c;return[i?rm({collectionName:n,fileName:r,typedKeyPath:i}):void 0,rm({collectionName:n,fileName:r}),rm({collectionName:n}),A(em),A($p).findLast(e=>{let t=e.publicPath??``,n=Dp(t).replace(Xp,`.+?`);return o.match(`^${n}${t?`(?=\\/|$)`:`$`}`)})].filter(e=>!!e).find(e=>{let{publicPath:n,collectionName:r}=e,{internalPath:i}=e;if(i!==void 0&&Jp.test(i)){let e=r?cw(r):t?hN(t)?.[0]:void 0;if(!(t&&e))return!1;let{content:n,path:a}=t.locales[e._i18n.defaultLocale];i=eF(i,{type:`media_folder`,collection:e,content:oc(n),currentSlug:t.slug,entryFilePath:a,isIndexFile:pw(e,t)})}n&&i&&o&&(n===`/`?i=`${i}${o}`:o.startsWith(`${n}/`)&&(i=o.replace(n,i)));let a=jE([i,s]),l=zF().get(a);return l&&(c=l),!!l}),c},JF=e=>!/^[/@]/.test(e),YF=({value:e,entry:t,collectionName:n,fileName:r,typedKeyPath:i})=>{let a=EE(e.split(`#`)[0]);return JF(a)?Doe({path:a,entry:t,collectionName:n,fileName:r,typedKeyPath:i}):Ooe({path:a,entry:t,collectionName:n,fileName:r,typedKeyPath:i})},XF=({folder:e},t)=>e===t||e.collectionName===t.collectionName&&e.fileName===t.fileName&&e.typedKeyPath===t.typedKeyPath&&e.isIndexFile===t.isIndexFile&&e.internalPath===t.internalPath&&e.internalSubPath===t.internalSubPath&&e.publicPath===t.publicPath&&e.entryRelative===t.entryRelative&&e.hasTemplateTags===t.hasTemplateTags,koe=e=>A(LF).filter(t=>XF(t,e)),ZF=e=>A(LF).filter(t=>Rp(t.path).dirname===e),tm.subscribe(()=>{HF.set(void 0)}),QF=(e,t)=>{if(!t.length||!e.length)return[];let n=new Set(t.map(({name:e})=>e.normalize().toLowerCase()));return e.filter(e=>n.has(e.name.normalize().toLowerCase()))}})),eI,tI,nI=o((()=>{Gp(),Np(),qp(),$F(),cm(),lN(),dw(),mw(),KP(),eI=async(e,t)=>{let{name:n,_i18n:{defaultLocale:r},_thumbnailFieldNames:i}=e,{locales:a}=t,{content:o}=a[r]??Object.values(a)[0]??{};if(!o)return;let s=i.some(e=>e.includes(`*`))?Object.keys(o):void 0,c=i.flatMap(e=>{if(e.includes(`*`)){let t=RegExp(`^${Dp(e).replace(`\\*`,`.+`)}$`);return s.filter(e=>t.test(e))}return e});for(let e of c){let r=o[e]?await cN({value:o[e],entry:t,collectionName:n,typedKeyPath:e,thumbnail:!0}):void 0;if(r)return r}},tI=({entry:e,collectionName:t,fileName:n,relative:r=!1})=>{let{locales:i}=e,a=cw(t);if(!a)return[];let o=pw(a,e),s=new Set,c=Object.values(i).flatMap(({content:i})=>Object.entries(i??{}).map(([i,a])=>{if(typeof a==`string`&&(!r||JF(a))){let s=BP({collectionName:t,keyPath:i,isIndexFile:o})?.widget??`string`;if(s!==`image`&&s!==`file`)return;let c=YF({value:a,entry:e,collectionName:t,fileName:n});if(c&&om(c.path).some(e=>e.collectionName===t&&e.fileName===n&&(r?e.entryRelative:!0)))return c}})).filter(e=>!!e&&!s.has(e)&&(s.add(e),!0));if(r&&rm({collectionName:t,fileName:n})?.entryRelative){let t=Rp(Object.values(e.locales)[0].path).dirname;if(t!==void 0){let e=new Set(c.map(({path:e})=>e));A(LF).forEach(n=>{let r=Rp(n.path).dirname;r!==void 0&&(r===t||r.startsWith(`${t}/`))&&!e.has(n.path)&&(c.push(n),e.add(n.path))})}}return c}})),rI,Aoe,iI,aI=o((()=>{f(),cc(),ap(),sp(),mp(),nI(),ID(),rI=[`preSave`,`postSave`,`prePublish`,`postPublish`,`preUnpublish`,`postUnpublish`],Aoe=[`preSave`,`prePublish`],iI=async({type:e,draft:t,savingEntry:n})=>{let{login:r=``,name:i=``}=FD.account,{collection:a,collectionFile:o,isNew:s,collectionName:c,fileName:l}=t,{_i18n:{defaultLocale:d}}=o??a,{slug:f,locales:p}=n,m=Object.keys(p).filter(e=>e!==d),{content:h,path:g}=p[d],_=tI({entry:n,collectionName:c,fileName:l});for(let t of pp){if(t.name!==e)continue;let n=await t.handler({author:{login:r,name:i},entry:op({content:h,otherLocales:m,locales:p,slug:f,path:g,isNew:s,collectionName:c,associatedAssets:_})});if(Aoe.includes(e)&&Xl(n)){let e=n.toJS();u(e.data)&&u(e.i18n)?(p[d].content=oc(e.data),m.forEach(t=>{u(e.i18n[t]?.data)&&(p[t].content=oc(e.i18n[t].data))})):p[d].content=oc(e)}}}})),joe=o((()=>{})),Z=o((()=>{joe(),typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`)})),Moe,Noe=o((()=>{Moe=`{"ok":"OK","cancel":"Cancel","close":"Close","clear":"Clear","insert":"Insert","update":"Update","remove":"Remove","collapse":"Collapse","expand":"Expand","dismiss":"Dismiss","calendar":{"year":"Year","previous_decade":"Previous Decade","next_decade":"Next Decade","month":"Month","previous_month":"Previous Month","next_month":"Next Month","today":"Today"},"split_button":{"x_options":"{$name} Options","more_options":"More Options"},"combobox":{"select_an_option":"Select an option…","filter_options":"Filter Options","no_matching_options":"No matching options found"},"number_input":{"decrease":"Decrease","increase":"Increase"},"password_input":{"show_password":"Show Password","hide_password":"Hide Password"},"secret_input":{"show_secret":"Show Secret","hide_secret":"Hide Secret"},"select_tags":{"selected_options":"Selected options","remove_x":"Remove {$name}"},"text_editor":{"text_editor":"Text Editor","code_editor":"Code Editor","text_style_options":"Text Style Options","show_text_style_options":"Show Text Style Options","paragraph":"Paragraph","heading_1":"Heading 1","heading_2":"Heading 2","heading_3":"Heading 3","heading_4":"Heading 4","heading_5":"Heading 5","heading_6":"Heading 6","bulleted_list":"Bulleted List","numbered_list":"Numbered List","blockquote":"Block Quote","code_block":"Code Block","bold":"Bold","italic":"Italic","strikethrough":"Strikethrough","code":"Code","link":"Link","insert_link":"Insert Link","update_link":"Update Link","text":"Text","url":"URL","edit_in_markdown":"Edit in Markdown","converter_error":"There was an error while enabling rich text mode. Please use the plain text editor instead.","language":"Language","plain_text":"Plain Text"}}`})),Poe,Foe=o((()=>{Poe=`{"ok":"OK","cancel":"キャンセル","close":"閉じる","clear":"クリア","insert":"挿入","update":"更新","remove":"削除","collapse":"折り畳む","expand":"広げる","dismiss":"閉じる","calendar":{"year":"年","previous_decade":"前の 10 年","next_decade":"次の 10 年","month":"月","previous_month":"前月","next_month":"翌月","today":"今日"},"split_button":{"x_options":"{$name} オプション","more_options":"その他のオプション"},"combobox":{"select_an_option":"オプションを選択…","filter_options":"オプションを絞り込み","no_matching_options":"一致するオプションは見つかりませんでした"},"number_input":{"decrease":"減らす","increase":"増やす"},"password_input":{"show_password":"パスワードを表示","hide_password":"パスワードを隠す"},"secret_input":{"show_secret":"シークレットを表示","hide_secret":"シークレットを隠す"},"select_tags":{"selected_options":"選択済みのオプション","remove_x":"{$name} を削除"},"text_editor":{"text_editor":"テキストエディター","code_editor":"コードエディター","text_style_options":"テキストスタイルオプション","show_text_style_options":"テキストスタイルオプションを表示","paragraph":"段落","heading_1":"見出し 1","heading_2":"見出し 2","heading_3":"見出し 3","heading_4":"見出し 4","heading_5":"見出し 5","heading_6":"見出し 6","bulleted_list":"番号なしリスト","numbered_list":"番号付きリスト","blockquote":"ブロック引用","code_block":"コードブロック","bold":"太字","italic":"斜体","strikethrough":"取り消し線","code":"コード","link":"リンク","insert_link":"リンクを挿入","update_link":"リンクを更新","text":"テキスト","url":"URL","edit_in_markdown":"マークダウンで編集","converter_error":"リッチテキストモードを有効化中に問題が発生しました。代わりにプレーンテキストエディターを使用してください。","language":"言語","plain_text":"プレーンテキスト"}}`})),Ioe,Loe=o((()=>{Noe(),Foe(),X(),Ny(),Ioe=({fallbackLocale:e=`en`,initialLocale:t=`en`}={})=>{Object.entries(Object.assign({"../locales/en.yaml":Moe,"../locales/ja.yaml":Poe})).forEach(([e,t])=>{Bh(e.match(/.+\/(?<locale>.+?)\.yaml$/)?.groups?.locale,{_sui:Ay(t)})}),Uh({fallbackLocale:e,initialLocale:t})}}));function oI(e,t){G(e,Boe);let n=Gs(t,Roe);var r=zoe();_s(r,()=>({...n,class:`sui icon material-symbols-outlined ${t.class??``}`,"aria-hidden":!(`aria-label`in n)}),void 0,void 0,void 0,`svelte-d0zxa9`);var i=F(r,!0);D(r),R(()=>U(i,t.name)),H(e,r)}var Roe,zoe,Boe,sI=o((()=>{Z(),J(),Roe=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`name`]),zoe=B(`<span> </span>`),Boe={hash:`svelte-d0zxa9`,code:`.icon.small-arrow.svelte-d0zxa9 {overflow:hidden;width:12px;text-indent:-6px;}`}}));function cI(e,t){G(e,Uoe);let n=Gs(t,Voe);var r=Hoe();_s(r,()=>({...n,role:`alert`,class:`sui alert ${t.status??``}`}),void 0,void 0,void 0,`svelte-1868w1t`);var i=F(r),a=e=>{var n=V();Co(I(n),()=>t.icon),H(e,n)},o=e=>{{let n=M(()=>t.status===`success`?`check_circle`:t.status);oI(e,{get name(){return z(n)}})}};W(i,e=>{t.icon?e(a):e(o,-1)}),Co(L(i,2),()=>t.children??E),D(r),H(e,r)}var Voe,Hoe,Uoe,lI=o((()=>{Z(),J(),sI(),Voe=new Set([`$$slots`,`$$events`,`$$legacy`,`status`,`children`,`icon`]),Hoe=B(`<div><!> <!></div>`),Uoe={hash:`svelte-1868w1t`,code:`.alert.svelte-1868w1t {display:flex;align-items:center;gap:var(--gap, 8px);padding:var(--padding, 8px);border-width:var(--border-width, var(--sui-control-medium-border-width));border-style:var(--border-style, solid);border-radius:var(--border-radius, var(--sui-control-medium-border-radius));font-size:var(--font-size, var(--sui-font-size-default));}.alert.error.svelte-1868w1t {border-color:var(--sui-error-border-color);color:var(--sui-error-foreground-color);background-color:var(--sui-error-background-color);}.alert.warning.svelte-1868w1t {border-color:var(--sui-warning-border-color);color:var(--sui-warning-foreground-color);background-color:var(--sui-warning-background-color);}.alert.info.svelte-1868w1t {border-color:var(--sui-info-border-color);color:var(--sui-info-foreground-color);background-color:var(--sui-info-background-color);}.alert.success.svelte-1868w1t {border-color:var(--sui-success-border-color);color:var(--sui-success-foreground-color);background-color:var(--sui-success-background-color);}`}})),Woe,uI,Goe,Koe,qoe,dI,fI,pI=o((()=>{uI=()=>(Woe??=navigator.userAgentData?.platform===`macOS`||navigator.platform.startsWith(`Mac`),Woe),Goe=[`Ctrl`,`Meta`,`Alt`,`Shift`],Koe=new Set([`Space`,`Enter`,`Escape`,`Tab`,`Backspace`,`Delete`,`Insert`,`Home`,`End`,`PageUp`,`PageDown`,`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,...Array.from({length:24},(e,t)=>`F${t+1}`)]),qoe=(e,t)=>/^\d$/.test(e)?t.code===`Digit${e}`:Koe.has(e)?t.code===e:e.toLowerCase()===t.key.toLowerCase(),dI=(e,t)=>{let{ctrlKey:n,metaKey:r,altKey:i,shiftKey:a,key:o,code:s}=e;return!o&&!s?!1:t.replace(/\bAccel\b/g,uI()?`Meta`:`Ctrl`).split(/\s+/).some(t=>{let o=t.split(`+`);return o.includes(`Ctrl`)&&!n||o.includes(`Meta`)&&!r||o.includes(`Alt`)&&!i||o.includes(`Shift`)&&!a||!o.includes(`Ctrl`)&&n||!o.includes(`Meta`)&&r||!o.includes(`Alt`)&&i||!o.includes(`Shift`)&&a?!1:o.filter(e=>!Goe.includes(e)).every(t=>qoe(t,e))})},fI=(e=``)=>{let t=e?e.replace(/\bAccel\b/g,uI()?`Meta`:`Ctrl`):void 0;return t?e=>{let n=n=>{let{disabled:r}=e;if(!e.getClientRects().length||!dI(n,t))return;let{top:i,left:a}=e.getBoundingClientRect();r&&e.style.setProperty(`pointer-events`,`auto`);let o=document.elementsFromPoint(a+4,i+4).includes(e);r&&e.style.removeProperty(`pointer-events`),o&&(n.preventDefault(),r||(e.focus(),e.click()))};return globalThis.addEventListener(`keydown`,n,{capture:!0}),e.setAttribute(`aria-keyshortcuts`,t),()=>{globalThis.removeEventListener(`keydown`,n,{capture:!0}),e.removeAttribute(`aria-keyshortcuts`)}}:()=>()=>{}}}));function mI(e,t){G(e,Yoe);let n=q(t,`lines`,3,1),r=q(t,`children`,3,void 0);var i=Joe();Co(F(i),()=>r()??E),D(i),R(()=>cs(i,`-webkit-line-clamp: ${n()??``}; line-clamp: ${n()??``};`)),H(e,i)}var Joe,Yoe,hI=o((()=>{Z(),J(),Joe=B(`<span role="none" class="sui truncated-text svelte-9fj7oe"><!></span>`),Yoe={hash:`svelte-9fj7oe`,code:`.truncated-text.svelte-9fj7oe {display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;white-space:normal;overflow-wrap:anywhere;}`}})),gI,_I,vI,Xoe,Zoe,Qoe,yI,bI=o((()=>{Ep(),vI=(e=`e`,t=7)=>[e,Cp(t)].join(`-`),Xoe=()=>{if(`IntersectionObserver`in globalThis)return _I||(gI=new Map,_I=new IntersectionObserver(e=>{e.forEach(({isIntersecting:e,target:t})=>{if(!e||!(t instanceof HTMLElement))return;let n=gI?.get(t);n&&(gI?.delete(t),_I?.unobserve(t),n())})}),_I)},Zoe=e=>{let{top:t,left:n,bottom:r,right:i}=e.getBoundingClientRect(),{innerHeight:a,innerWidth:o}=globalThis;return r>0&&i>0&&t<a&&n<o},Qoe=e=>{if(`requestAnimationFrame`in globalThis){globalThis.requestAnimationFrame(e);return}globalThis.setTimeout(e,16)},yI=e=>{if(!e)return;let t=Xoe();if(t)return Zoe(e)?Promise.resolve(void 0):new Promise(n=>{gI?.set(e,n),Qoe(()=>{t.observe(e)})})}})),$oe,ese,tse=o((()=>{J(),bI(),Kw(),Dh(),$oe=class{#e=N(!1);get open(){return z(this.#e)}set open(e){P(this.#e,e,!0),e?this.checkPosition():this.anchorElement.getAttribute(`aria-expanded`)===`true`&&(this.anchorElement.focus(),this.anchorElement.removeAttribute(`aria-controls`)),this.anchorElement.setAttribute(`aria-expanded`,String(e))}#t=N(br({inset:void 0,zIndex:void 0,minWidth:void 0,maxWidth:void 0,height:void 0}));get style(){return z(this.#t)}set style(e){P(this.#t,e,!0)}observer=new IntersectionObserver(e=>{e.forEach(({intersectionRect:e,rootBounds:t})=>{if(!e||!t)return;let{scrollHeight:n,scrollWidth:r}=this.popupElement.querySelector(`.content`),i=e.top-8,a=t.height-e.bottom-8,{position:o}=this,s;document.dir===`rtl`&&(o.endsWith(`-left`)?o=o.replace(`-left`,`-right`):o.endsWith(`-right`)&&(o=o.replace(`-right`,`-left`)),o.startsWith(`left-`)?o=o.replace(`left-`,`right-`):o.startsWith(`right-`)&&(o=o.replace(`right-`,`left-`))),o.startsWith(`bottom-`)&&n>a&&(i>a?(o=o.replace(`bottom-`,`top-`),s=i):s=a),o.endsWith(`-left`)&&e.left+r>t.width-8&&(o=o.replace(`-left`,`-right`)),o.endsWith(`-right`)&&e.right-r<8&&(o=o.replace(`-right`,`-left`));let c={inset:[o.startsWith(`bottom-`)?`${Math.round(e.bottom)}px`:o.endsWith(`-top`)?`${Math.round(e.top)}px`:`auto`,o.startsWith(`left-`)?`${Math.round(t.width-e.left)}px`:o.endsWith(`-right`)?`${Math.round(t.width-e.right)}px`:`auto`,o.startsWith(`top-`)?`${Math.round(t.height-e.top)}px`:o.endsWith(`-bottom`)?`${Math.round(t.height-e.bottom)}px`:`auto`,o.startsWith(`right-`)?`${Math.round(e.right)}px`:o.endsWith(`-left`)?`${Math.round(e.left)}px`:`auto`].join(` `),zIndex:1e3,minWidth:`${Math.round(e.width)}px`,maxWidth:o.endsWith(`-left`)?`${Math.round(t.width-e.left-8)}px`:`${Math.round(e.right-8)}px`,height:s?`${Math.round(s)}px`:`auto`};(c.inset!==this.style.inset||c.zIndex!==this.style.zIndex||c.minWidth!==this.style.minWidth||c.maxWidth!==this.style.maxWidth||c.height!==this.style.height)&&(this.style=c)})});constructor(e,t,n,r){this.anchorElement=e,this.popupElement=t,this.position=n,this.positionBaseElement=r??e,this.id=vI(`popup`),this.anchorElement.setAttribute(`aria-controls`,this.id),this.popupElement.setAttribute(`id`,this.id),this.anchorElement.setAttribute(`aria-expanded`,`false`),ga(e,`click`,()=>{!this.isDisabled&&!this.isReadOnly&&(this.open=!this.open)}),ga(e,`keydown`,e=>{let{key:t,ctrlKey:n,metaKey:r,shiftKey:i,altKey:a}=e,o=i||a||n||r;!this.isDisabled&&!this.isReadOnly&&[`Enter`,` `].includes(t)&&!o&&(e.preventDefault(),e.stopPropagation(),this.open=!this.open)}),ga(e,`transitionstart`,()=>{this.anchorElement.closest(`.hiding, .hidden, [hidden]`)&&this.hideImmediately()}),this.intersectionObserver=new IntersectionObserver(([e])=>{!e.isIntersecting&&this.open&&this.hideImmediately()}),this.intersectionObserver.observe(this.anchorElement),ga(this.popupElement,`click`,e=>{e.stopPropagation();let t=e.target;this.open&&(t===this.popupElement||t.matches(`[role^="menuitem"], [role="option"]`))&&(this.open=!1)}),ga(this.popupElement,`keydown`,e=>{let{key:t,ctrlKey:n,metaKey:r,shiftKey:i,altKey:a}=e;t===`Escape`&&!(i||a||n||r)&&(e.preventDefault(),e.stopPropagation(),this.open=!1)}),this.resizeObserver=new ResizeObserver(()=>{cancelAnimationFrame(this._rafId),this._rafId=requestAnimationFrame(()=>this.checkPosition())}),this.resizeObserver.observe(this.positionBaseElement)}get isDisabled(){return this.anchorElement.matches(`[aria-disabled="true"]`)}get isReadOnly(){return this.anchorElement.matches(`[aria-readonly="true"]`)}checkPosition(){this.observer.unobserve(this.positionBaseElement),this.observer.observe(this.positionBaseElement)}async hideImmediately(){this.popupElement.hidden=!0,this.open=!1,await Gw(50),this.popupElement.hidden=!1}destroy(){this.intersectionObserver?.disconnect(),this.resizeObserver?.disconnect(),this.observer?.disconnect(),this._rafId&&cancelAnimationFrame(this._rafId)}},ese=(...e)=>new $oe(...e)}));function nse(e,t){var n=V();Co(I(n),()=>t.children??E),H(e,n)}var rse=o((()=>{Z(),J()}));function ise(e,t){O(t,!0),G(e,sse);let n=e=>{var n=ose(),d=({target:e})=>{i()&&s()&&e?.matches(`dialog`)&&(i(i().returnValue=`cancel`,!0),r(!1))},f=e=>{e.preventDefault(),i()&&c()&&(i(i().returnValue=`cancel`,!0),r(!1))};_s(n,()=>({...u,inert:!z(p),role:a(),class:`sui modal ${t.class??``}`,onclick:d,oncancel:f,[bs]:{backdrop:o(),open:z(p),active:z(m)}}),void 0,void 0,void 0,`svelte-n41tno`);var g=F(n);Co(g,()=>t.extraContent??E);var _=L(g,2),v=e=>{var n=V();Co(I(n),()=>t.children??E),H(e,n)};W(_,e=>{(z(h)||l())&&e(v)}),D(n),Rs(n,e=>i(e),()=>i()),H(e,n)},r=q(t,`open`,15,!1),i=q(t,`dialog`,15),a=q(t,`role`,3,`dialog`),o=q(t,`showBackdrop`,3,!1),s=q(t,`lightDismiss`,3,!1),c=q(t,`escapeDismiss`,3,!0),l=q(t,`keepContent`,3,!1),u=Gs(t,ase),d=()=>{i()?.focus()},f=e=>{i()&&(i(i().returnValue=e,!0),r(!1))},p=N(!1),m=N(!1),h=N(!1),g=0,_=async()=>new Promise(e=>{let t=n=>{n.target===i()&&(i().removeEventListener(`transitionend`,t),e())};i()?.addEventListener(`transitionend`,t)}),v=async()=>{if(!i()||i()?.open)return;g+=1;let e=g;t.onOpening?.(new CustomEvent(`Opening`)),P(h,!0),i().showModal(),t.onOpen?.(new CustomEvent(`Open`)),await Gw(0),e===g&&(P(p,!0),await _(),e===g&&P(m,!0))},y=async()=>{if(!i()||!i().open)return;g+=1;let e=g,n=z(p),{returnValue:r}=i();t.onClosing?.(new CustomEvent(`Closing`)),document.body.inert=!0,i().close(),document.body.inert=!1,P(m,!1),P(p,!1),n&&await _(),e===g&&(P(h,!1),r===`ok`&&t.onOk?.(new CustomEvent(`Ok`)),r===`cancel`&&t.onCancel?.(new CustomEvent(`Cancel`)),t.onClose?.(new CustomEvent(`Close`,{detail:{returnValue:r}})),i(i().returnValue=``,!0))};return Qr(()=>{r()?v():y()}),tc(()=>{let e=Fa(nse,{target:document.querySelector(`.sui.app-shell`)??document.body,props:{children:n}});return()=>{i()?.close(),La(e)}}),k({focus:d,close:f})}var ase,ose,sse,xI=o((()=>{Z(),J(),Kw(),rc(),rse(),ase=new Set([`$$slots`,`$$events`,`$$legacy`,`open`,`dialog`,`class`,`role`,`showBackdrop`,`lightDismiss`,`escapeDismiss`,`keepContent`,`children`,`extraContent`,`onOpening`,`onOpen`,`onClosing`,`onOk`,`onCancel`,`onClose`]),ose=B(`<dialog><!> <!></dialog>`),sse={hash:`svelte-n41tno`,code:`dialog.svelte-n41tno {position:fixed;inset:0;z-index:9999999;display:flex;justify-content:center;align-items:center;overflow:hidden;outline:0;margin:0;border:0;padding:0;width:100dvw;max-width:100dvw;height:100dvh;max-height:100dvh;color:var(--sui-primary-foreground-color);background:transparent;-webkit-user-select:none;user-select:none;touch-action:none;pointer-events:all;cursor:default;}dialog.svelte-n41tno::backdrop {background:transparent;}dialog.backdrop.svelte-n41tno {background-color:var(--sui-popup-backdrop-color);}dialog.open.svelte-n41tno {transition-duration:50ms;opacity:1;}dialog.svelte-n41tno:not(.open) {transition-duration:400ms;opacity:0;}dialog[hidden].svelte-n41tno {transition-duration:1ms !important;}dialog.svelte-n41tno:not(.active) {pointer-events:none !important;}dialog.svelte-n41tno:not(.active) * {transition-duration:0ms !important;pointer-events:none !important;}`}}));function SI(e,t){O(t,!0),G(e,use);let n=e=>{var n=lse();let o,s;Co(F(n),()=>t.children??E),D(n),Rs(n,e=>a(e),()=>a()),R(()=>{K(n,`hidden`,!r()),o=as(n,1,`content ${t.class??``} ${z(h)??``}`,`svelte-anj0d5`,o,{touch:z(y)}),s=cs(n,``,s,{inset:z(g)?.style.inset,"z-index":z(g)?.style.zIndex,"min-width":z(g)?.style.minWidth,"max-width":z(g)?.style.maxWidth,"max-height":z(g)?.style.height,visibility:z(g)?.style.inset?void 0:`hidden`})}),_a(`mouseenter`,n,()=>{i(!0),l()&&window.clearTimeout(_)}),_a(`mouseleave`,n,()=>{i(!1),l()&&(_=window.setTimeout(()=>{r(!1)},200))}),H(e,n)},r=q(t,`open`,15,!1),i=q(t,`hovered`,15,!1),a=q(t,`content`,15,void 0),o=q(t,`showBackdrop`,3,void 0),s=q(t,`position`,3,`bottom-left`),c=q(t,`positionBaseElement`,3,void 0),l=q(t,`parentDialogElement`,3,void 0),u=q(t,`touchOptimized`,3,!1),d=Gs(t,cse),f=N(!1),p=N(void 0),m=N(!1),h=N(void 0),g=N(void 0),_=0,v=()=>{P(g,ese(t.anchor,z(p),s(),c()),!0),P(h,t.anchor?.getAttribute(`aria-haspopup`)??void 0,!0),P(f,!0)};Qr(()=>{z(g)&&r(z(g).open)}),Qr(()=>{l()&&!z(p)&&a()&&(P(p,l()),z(p).append(a()))}),Qr(()=>{t.anchor&&z(p)&&!z(f)&&v()}),Qr(()=>{l()&&r()&&z(g)?.checkPosition()});let y=M(()=>u()&&z(m));tc(()=>(P(m,globalThis.matchMedia(`(pointer: coarse)`).matches,!0),()=>{z(g)?.destroy?.(),globalThis.clearTimeout(_)}));var b=V(),x=I(b),S=e=>{n(e)},C=e=>{{let i=M(()=>o()??z(y));ise(e,Ks(()=>d,{role:`none`,class:`popup`,get showBackdrop(){return z(i)},lightDismiss:!0,keepContent:!0,onOpen:async e=>{if(t.onOpen?.(e),await Gw(100),!a())return;let n=a().querySelector(`[tabindex]:not([aria-disabled="true"])`);n?n.focus():(a(a().tabIndex=-1,!0),a().focus())},get dialog(){return z(p)},set dialog(e){P(p,e,!0)},get open(){return r()},set open(e){r(e)},children:(e,t)=>{n(e)},$$slots:{default:!0}}))}};W(x,e=>{l()?e(S):e(C,-1)}),H(e,b),k()}var cse,lse,use,CI=o((()=>{Z(),J(),Kw(),rc(),tse(),xI(),cse=new Set([`$$slots`,`$$events`,`$$legacy`,`open`,`hovered`,`content`,`class`,`showBackdrop`,`anchor`,`position`,`positionBaseElement`,`parentDialogElement`,`touchOptimized`,`children`,`onOpen`]),lse=B(`<div role="none"><!></div>`),use={hash:`svelte-anj0d5`,code:`.content.svelte-anj0d5 {position:absolute;overflow-y:auto;outline-width:0 !important;width:auto;color:var(--sui-primary-foreground-color);background-color:var(--sui-secondary-background-color-translucent);box-shadow:0 8px 16px var(--sui-popup-shadow-color);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);transition-property:opacity, transform;}.content.menu.svelte-anj0d5 {border-width:var(--sui-menu-border-width, 1px);border-style:var(--sui-menu-border-style, solid);border-color:var(--sui-menu-border-width, var(--sui-secondary-border-color));border-radius:var(--sui-menu-border-radius, 4px);padding:var(--sui-menu-padding, 4px);}.content.menu.svelte-anj0d5 .sui.menu {border-width:0;border-radius:0;padding:0;background-color:transparent;}.content.listbox.svelte-anj0d5 {border-width:var(--sui-listbox-border-width, 1px);border-style:var(--sui-listbox-border-style, solid);border-color:var(--sui-listbox-border-width, var(--sui-secondary-border-color));border-radius:var(--sui-listbox-border-radius, 4px);padding:var(--sui-listbox-padding, 4px);}.content.listbox.svelte-anj0d5 .sui.listbox {border-width:0;border-radius:0;padding:0;background-color:transparent;}.content.touch.svelte-anj0d5 {position:static;border-width:0 !important;border-radius:4px !important;padding:8px;min-width:320px !important;max-width:calc(100dvw - 32px) !important;max-height:calc(100dvh - 32px) !important;}dialog.open .content.touch.svelte-anj0d5 {transform:scale(100%) !important;}dialog:not(.open) .content.touch.svelte-anj0d5 {transform:scale(90%);}.content.touch.combobox.svelte-anj0d5 .sui.listbox {gap:4px;padding:8px 4px !important;}dialog.open .content.svelte-anj0d5 {transition-duration:50ms;opacity:1;transform:translateY(2px);}dialog:not(.open) .content.svelte-anj0d5 {transition-duration:300ms;opacity:0;transform:translateY(-8px);}`}}));function wI(e,t){O(t,!0),G(e,mse);let n=q(t,`element`,15),r=q(t,`class`,3,``),i=q(t,`type`,3,`button`),a=q(t,`role`,3,`button`),o=q(t,`name`,3,void 0),s=q(t,`value`,3,void 0),c=q(t,`valueType`,19,()=>typeof s()),l=q(t,`hidden`,3,!1),u=q(t,`disabled`,3,!1),d=q(t,`readonly`,3,!1),f=q(t,`pressed`,3,void 0),p=q(t,`keyShortcuts`,3,void 0),m=q(t,`label`,3,``),h=q(t,`lines`,3,1),g=q(t,`variant`,3,void 0),_=q(t,`size`,3,`medium`),v=q(t,`iconic`,3,!1),y=q(t,`pill`,3,!1),b=q(t,`flex`,3,!1),x=q(t,`popupPosition`,3,`bottom-left`),S=q(t,`showPopupBackdrop`,3,!1),C=Gs(t,dse);var w=pse(),T=I(w);_s(T,()=>({...C,class:`sui button ${g()??``} ${_()??``} ${r()??``}`,type:i(),name:o(),value:s(),hidden:l(),disabled:u(),role:a(),"aria-hidden":l(),"aria-disabled":u(),"aria-readonly":d(),"aria-pressed":f(),"data-type":c(),"data-name":o(),"data-label":m(),"data-value":s(),[bs]:{iconic:v(),pill:y(),flex:b()}}),void 0,void 0,void 0,`svelte-r28j2j`);var ee=F(T);Co(ee,()=>t.startIcon??E);var te=L(ee,2),ne=e=>{var n=V(),r=I(n),i=e=>{var t=TI();mI(F(t),{get lines(){return h()},children:(e,t)=>{gt();var n=ja();R(()=>U(n,m())),H(e,n)},$$slots:{default:!0}}),D(t),H(e,t)},a=e=>{var n=TI();Co(F(n),()=>t.children??E),D(n),H(e,n)};W(r,e=>{m()?e(i):e(a,-1)}),H(e,n)},re=e=>{var n=fse(),r=I(n),i=e=>{var t=TI();mI(F(t),{get lines(){return h()},children:(e,t)=>{gt();var n=ja();R(()=>U(n,m())),H(e,n)},$$slots:{default:!0}}),D(t),H(e,t)};W(r,e=>{m()&&e(i)}),Co(L(r,2),()=>t.children??E),H(e,n)};W(te,e=>{g()===`link`?e(ne):e(re,-1)}),Co(L(te,2),()=>t.endIcon??E),D(T),Rs(T,e=>n(e),()=>n()),qo(T,()=>fI(p()));var ie=L(T,2),ae=e=>{SI(e,{get anchor(){return n()},get position(){return x()},get showBackdrop(){return S()},touchOptimized:!0,children:(e,n)=>{var r=V();Co(I(r),()=>t.popup),H(e,r)},$$slots:{default:!0}})};W(ie,e=>{t.popup&&e(ae)}),H(e,w),k()}var dse,TI,fse,pse,mse,EI=o((()=>{Z(),J(),pI(),hI(),CI(),dse=new Set(`$$slots.$$events.$$legacy.element.class.type.role.name.value.valueType.hidden.disabled.readonly.pressed.keyShortcuts.label.lines.variant.size.iconic.pill.flex.popupPosition.showPopupBackdrop.children.startIcon.endIcon.popup`.split(`.`)),TI=B(`<span role="none" class="label svelte-r28j2j"><!></span>`),fse=B(`<!> <!>`,1),pse=B(`<button><!> <!> <!></button> <!>`,1),mse={hash:`svelte-r28j2j`,code:`button.svelte-r28j2j {flex:none;display:inline-flex;align-items:center;gap:4px;margin:var(--sui-focus-ring-width);border-width:0;border-style:solid;border-color:transparent;padding:0;color:var(--sui-control-foreground-color, inherit);background-color:transparent;box-shadow:none;font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);font-weight:var(--sui-font-weight-normal, normal);text-align:start;cursor:pointer;transition:all 200ms;}button[hidden].svelte-r28j2j {display:none !important;}button.svelte-r28j2j:not(:disabled):focus-visible {z-index:1;}button.svelte-r28j2j:is(.primary:where(.svelte-r28j2j), .secondary:where(.svelte-r28j2j), .tertiary:where(.svelte-r28j2j), .ghost:where(.svelte-r28j2j)) {justify-content:center;border-width:1px;}button.svelte-r28j2j:is(.primary:where(.svelte-r28j2j), .secondary:where(.svelte-r28j2j), .tertiary:where(.svelte-r28j2j), .ghost:where(.svelte-r28j2j)) .label:where(.svelte-r28j2j):only-child {padding:0 4px;}button.primary.svelte-r28j2j {border-width:var(--sui-button-primary-border-width, 1px);border-style:var(--sui-button-primary-border-style, solid);border-color:var(--sui-button-primary-border-color, var(--sui-primary-accent-color));color:var(--sui-button-primary-foreground-color, var(--sui-primary-accent-color-inverted));background-color:var(--sui-button-primary-background-color, var(--sui-primary-accent-color));font-weight:var(--sui-button-primary-font-weight, var(--sui-font-weight-normal, normal));}button.primary.svelte-r28j2j:is(:where(.svelte-r28j2j):hover, :where(.svelte-r28j2j):focus-visible, [aria-expanded=true]:where(.svelte-r28j2j)) {color:var(--sui-button-primary-foreground-color-focus, var(--sui-button-primary-foreground-color, var(--sui-primary-accent-color-inverted)));background-color:var(--sui-button-primary-background-color-focus, var(--sui-primary-accent-color-light));}button.primary.svelte-r28j2j:active {color:var(--sui-button-primary-foreground-color-active, var(--sui-button-primary-foreground-color, var(--sui-primary-accent-color-inverted)));background-color:var(--sui-button-primary-background-color-active, var(--sui-primary-accent-color-dark));}button.secondary.svelte-r28j2j {border-width:var(--sui-button-secondary-border-width, 1px);border-style:var(--sui-button-secondary-border-style, solid);border-color:var(--sui-button-secondary-border-color, var(--sui-primary-accent-color));color:var(--sui-button-secondary-foreground-color, var(--sui-primary-accent-color-text));background-color:var(--sui-button-secondary-background-color, var(--sui-button-background-color));font-weight:var(--sui-button-secondary-font-weight, var(--sui-font-weight-normal, normal));}button.secondary.svelte-r28j2j:is(:where(.svelte-r28j2j):hover, :where(.svelte-r28j2j):focus-visible, [aria-expanded=true]:where(.svelte-r28j2j)) {color:var(--sui-button-secondary-foreground-color-focus, var(--sui-button-secondary-foreground-color, var(--sui-primary-accent-color-text)));background-color:var(--sui-button-secondary-background-color-focus, var(--sui-hover-background-color));}button.secondary.svelte-r28j2j:active {color:var(--sui-button-secondary-foreground-color-active, var(--sui-button-secondary-foreground-color, var(--sui-primary-accent-color-text)));background-color:var(--sui-button-secondary-background-color-active, var(--sui-active-background-color));}button.secondary[aria-pressed=true].svelte-r28j2j {color:var(--sui-button-secondary-foreground-color-pressed);background-color:var(--sui-button-secondary-background-color-pressed, var(--sui-primary-accent-color));}button.tertiary.svelte-r28j2j {border-width:var(--sui-button-tertiary-border-width, 1px);border-style:var(--sui-button-tertiary-border-style, solid);border-color:var(--sui-button-tertiary-border-color, var(--sui-button-border-color));color:var(--sui-button-tertiary-foreground-color, var(--sui-highlight-foreground-color));background-color:var(--sui-button-tertiary-background-color, var(--sui-button-background-color));font-weight:var(--sui-button-tertiary-font-weight, var(--sui-font-weight-normal, normal));}button.tertiary.svelte-r28j2j:is(:where(.svelte-r28j2j):hover, :where(.svelte-r28j2j):focus-visible, [aria-expanded=true]:where(.svelte-r28j2j)) {color:var(--sui-button-tertiary-foreground-color-focus, var(--sui-button-tertiary-foreground-color, var(--sui-highlight-foreground-color)));background-color:var(--sui-button-tertiary-background-color-focus, var(--sui-hover-background-color));}button.tertiary.svelte-r28j2j:active {color:var(--sui-button-tertiary-foreground-color-active, var(--sui-button-tertiary-foreground-color, var(--sui-highlight-foreground-color)));background-color:var(--sui-button-tertiary-background-color-active, var(--sui-active-background-color));}button.tertiary[aria-pressed=true].svelte-r28j2j {color:var(--sui-button-tertiary-foreground-color-pressed);background-color:var(--sui-button-tertiary-background-color-pressed, var(--sui-selected-background-color));}button.ghost.svelte-r28j2j {font-weight:var(--sui-button-ghost-font-weight, var(--sui-font-weight-normal, normal));}button.ghost.svelte-r28j2j:is(:where(.svelte-r28j2j):hover, :where(.svelte-r28j2j):focus-visible, [aria-expanded=true]:where(.svelte-r28j2j)) {color:var(--sui-button-ghost-foreground-color-focus);background-color:var(--sui-button-ghost-background-color-focus, var(--sui-hover-background-color));}button.ghost.svelte-r28j2j:active {color:var(--sui-button-ghost-foreground-color-active);background-color:var(--sui-button-ghost-background-color-active, var(--sui-active-background-color));}button.ghost[aria-pressed=true].svelte-r28j2j {color:var(--sui-button-ghost-foreground-color-pressed);background-color:var(--sui-button-ghost-background-color-pressed, var(--sui-selected-background-color));}button.link.svelte-r28j2j {outline:0;margin:0;border-radius:0 !important;padding:0 !important;height:auto !important;color:var(--sui-button-link-foreground-color, var(--sui-primary-accent-color-text));}button.link.svelte-r28j2j .label:where(.svelte-r28j2j) {padding:0;line-height:var(--sui-line-height-compact);text-decoration:var(--sui-button-link-text-decoration, none);text-underline-offset:2px;white-space:normal;}:is(:root, :host)[data-underline-links='true'] button.link.svelte-r28j2j .label:where(.svelte-r28j2j) {text-decoration:underline;}button.link.svelte-r28j2j:is(:where(.svelte-r28j2j):hover, :where(.svelte-r28j2j):focus, :where(.svelte-r28j2j):active) .label:where(.svelte-r28j2j) {text-decoration:var(--sui-button-link-text-decoration-focus, underline);}button.small.svelte-r28j2j {border-radius:var(--sui-button-small-border-radius);padding:var(--sui-button-small-padding);height:var(--sui-button-small-height);font-size:var(--sui-button-small-font-size, var(--sui-font-size-small));}button.small.svelte-r28j2j .icon {font-size:var(--sui-font-size-large);}button.medium.svelte-r28j2j {border-radius:var(--sui-button-medium-border-radius);padding:var(--sui-button-medium-padding);height:var(--sui-button-medium-height);font-size:var(--sui-button-medium-font-size, var(--sui-font-size-default));}button.large.svelte-r28j2j {border-radius:var(--sui-button-large-border-radius);padding:var(--sui-button-large-padding);height:var(--sui-button-large-height);font-size:var(--sui-button-large-font-size, var(--sui-font-size-large));}button.pill.svelte-r28j2j {border-radius:80px;padding:var(--sui-button-medium-pill-padding, 0 12px);}button.flex.svelte-r28j2j:not([hidden]) {display:inline-flex;flex:auto;width:-moz-available;width:-webkit-fill-available;width:stretch;}button.iconic.svelte-r28j2j {justify-content:center;padding:0;aspect-ratio:1/1;}button.danger.svelte-r28j2j {background-color:var(--sui-error-background-color);}button.svelte-r28j2j .label:where(.svelte-r28j2j) {padding:0 4px;}button.svelte-r28j2j > * {pointer-events:none;}button.svelte-r28j2j :has([slot=start-icon] + [slot=end-icon]) {gap:0;}`}}));function DI(e,t){O(t,!0),G(e,_se);let n=q(t,`show`,15,!0),r=q(t,`dismissible`,3,!0),i=q(t,`status`,3,`info`),a=q(t,`children`,3,void 0),o=q(t,`icon`,3,void 0);var s=V(),c=I(s),l=e=>{var t=gse(),s=F(t),c=F(s),l=e=>{var t=V();Co(I(t),o),H(e,t)},u=e=>{{let t=M(()=>i()===`success`?`check_circle`:i());oI(e,{get name(){return z(t)}})}};W(c,e=>{o()?e(l):e(u,-1)}),Co(L(c,2),()=>a()??E),D(s);var d=L(s,2),f=e=>{var t=hse(),r=F(t);{let e=M(()=>Y(`_sui.dismiss`));wI(r,{iconic:!0,size:`small`,variant:`ghost`,get"aria-label"(){return z(e)},onclick:()=>{n(!1)},children:(e,t)=>{oI(e,{name:`close`})},$$slots:{default:!0}})}D(t),H(e,t)};W(d,e=>{r()&&e(f)}),D(t),R(()=>as(t,1,`infobar ${i()??``}`,`svelte-l6jtji`)),H(e,t)};W(c,e=>{n()&&e(l)}),H(e,s),k()}var hse,gse,_se,vse=o((()=>{Z(),J(),X(),EI(),sI(),hse=B(`<div role="none"><!></div>`),gse=B(`<div role="none"><div role="alert" class="message svelte-l6jtji"><!> <!></div> <!></div>`),_se={hash:`svelte-l6jtji`,code:`.infobar.svelte-l6jtji {flex:none;display:flex;align-items:center;gap:var(--sui-infobar-gap, 8px);border-width:var(--sui-infobar-border-width, 0 0 1px);border-style:var(--sui-infobar-border-style, solid);padding:var(--sui-infobar-padding, 0);min-height:var(--sui-infobar-min-height, 32px);font-size:var(--sui-infobar-font-size, var(--sui-font-size-small));}.infobar.info.svelte-l6jtji {border-color:var(--sui-info-border-color);color:var(--sui-info-foreground-color);background-color:var(--sui-info-background-color);}.infobar.warning.svelte-l6jtji {border-color:var(--sui-warning-border-color);color:var(--sui-warning-foreground-color);background-color:var(--sui-warning-background-color);}.infobar.error.svelte-l6jtji {border-color:var(--sui-error-border-color);color:var(--sui-error-foreground-color);background-color:var(--sui-error-background-color);}.infobar.success.svelte-l6jtji {border-color:var(--sui-success-border-color);color:var(--sui-success-foreground-color);background-color:var(--sui-success-background-color);}.message.svelte-l6jtji {flex:auto;display:flex;align-items:center;justify-content:var(--sui-infobar-message-justify-content, start);gap:var(--sui-infobar-message-gap, 6px);padding:var(--sui-infobar-message-padding, 6px);}.message.svelte-l6jtji button {font-size:inherit !important;}.message.svelte-l6jtji .icon {font-size:16px; /* !hardcoded */}`}}));function yse(e,t){G(e,Sse);let n=Gs(t,bse);var r=xse();_s(r,()=>({role:`none`,class:`sui bottom-navigation ${t.class??``}`,...n}),void 0,void 0,void 0,`svelte-4ws9sl`),Co(F(r),()=>t.children??E),D(r),H(e,r)}var bse,xse,Sse,Cse=o((()=>{Z(),J(),bse=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`children`]),xse=B(`<div><!></div>`),Sse={hash:`svelte-4ws9sl`,code:`.bottom-navigation.svelte-4ws9sl {height:var(--sui-bottom-navigation-height, var(--sui-primary-toolbar-size));border-top-width:var(--sui-bottom-navigation-border-color, 1px);border-top-style:var(--sui-bottom-navigation-border-style, solid);border-top-color:var(--sui-bottom-navigation-border-color, var(--sui-secondary-border-color));}.bottom-navigation.svelte-4ws9sl:is([inert]:where(.svelte-4ws9sl), [hidden]:where(.svelte-4ws9sl)) {display:none;}.bottom-navigation.svelte-4ws9sl .buttons {flex:auto;display:flex;align-items:center;justify-content:space-evenly;}`}}));function wse(e,t){G(e,Dse);let n=Gs(t,Tse);var r=Ese();_s(r,()=>({...n,role:`group`,class:`sui button-group ${t.class??``}`}),void 0,void 0,void 0,`svelte-dxmcah`),Co(F(r),()=>t.children??E),D(r),H(e,r)}var Tse,Ese,Dse,Ose=o((()=>{Z(),J(),Tse=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`children`]),Ese=B(`<div><!></div>`),Dse={hash:`svelte-dxmcah`,code:`.button-group.svelte-dxmcah {flex:none;display:inline-flex;align-items:center;}`}}));function kse(e,t){G(e,jse);let n=q(t,`children`,3,void 0);var r=Ase();Co(F(r),()=>n()??E),D(r),H(e,r)}var Ase,jse,Mse=o((()=>{Z(),J(),Ase=B(`<div role="none" class="sui floating-action-button-wrapper svelte-rs5gyj"><!></div>`),jse={hash:`svelte-rs5gyj`,code:`.floating-action-button-wrapper.svelte-rs5gyj {display:contents;}
644
- @media (width < 768px) {.floating-action-button-wrapper.svelte-rs5gyj {display:block;position:fixed;inset-inline-end:16px;inset-block-end:72px;z-index:100;}.floating-action-button-wrapper.svelte-rs5gyj button {border-radius:50%;height:56px;box-shadow:0 4px 8px rgba(0, 0, 0, 0.4);}.floating-action-button-wrapper.svelte-rs5gyj button .icon {font-size:32px;}
645
- }`}})),OI,Nse=o((()=>{J(),OI=e=>{let{type:t=`string`,name:n,label:r}=e.dataset,{value:i}=e.dataset;return t===`number`?(i=Number(i),Number.isNaN(i)&&(i=null)):t===`boolean`?i=i===`true`:t===`string`&&(i=i?String(i):``),{target:e,type:t,name:n,label:r,value:i}}})),Pse,kI,Fse,Ise,AI,jI=o((()=>{J(),X(),bI(),Kw(),Nse(),Pse=/\p{Diacritic}/gu,kI=e=>(e=e.trim(),e?e.normalize(`NFD`).replace(Pse,``).toLocaleLowerCase():``),Fse={grid:{orientation:`vertical`,childRoles:[`row`],childSelectedAttr:`aria-selected`,focusChild:!0,selectFirst:!0},listbox:{orientation:`vertical`,childRoles:[`option`],childSelectedAttr:`aria-selected`,focusChild:!1,selectFirst:!1},menu:{orientation:`vertical`,childRoles:[`menuitem`,`menuitemcheckbox`,`menuitemradio`],childSelectedAttr:`aria-checked`,focusChild:!0,selectFirst:!1},menubar:{orientation:`horizontal`,childRoles:[`menuitem`,`menuitemcheckbox`,`menuitemradio`],childSelectedAttr:`aria-checked`,focusChild:!0,selectFirst:!1},radiogroup:{orientation:`horizontal`,childRoles:[`radio`],childSelectedAttr:`aria-checked`,focusChild:!0,selectFirst:!1},tablist:{orientation:`horizontal`,childRoles:[`tab`],childSelectedAttr:`aria-selected`,focusChild:!0,selectFirst:!0}},Ise=class{constructor(e,{clickToSelect:t=!0}={}){e.dispatchEvent(new CustomEvent(`Initializing`)),this.parent=e,this.role=e.getAttribute(`role`),this.multi=this.parent.getAttribute(`aria-multiselectable`)===`true`,this.id=vI(this.role),this.parentGroupSelector=`[role="group"], [role="${this.role}"]`,this.clickToSelect=t,this._onClick=e=>{this.onClick(e)},this._onKeyDown=e=>{this.onKeyDown(e)};let{orientation:n,childRoles:r,childSelectedAttr:i,focusChild:a,selectFirst:o}=Fse[this.role];this.orientation=this.grid?`horizontal`:this.parent.getAttribute(`aria-orientation`)??n,this.childRoles=r,this.childSelectedAttr=i,this.childSelectedProp=i.replace(`aria-`,``),this.focusChild=a,this.selectFirst=o,this.parent.tabIndex=a?-1:0,(async()=>{await Gw(100),this.activate()})()}activate(){let{parent:e,allMembers:t,selected:n}=this;t.forEach((e,t)=>{let r=e.getAttribute(this.childSelectedAttr)===`true`||(n?e===n:this.selectFirst&&t===0),i=document.querySelector(`#${e.getAttribute(`aria-controls`)}`);e.id||=`${this.id}-item-${t+1}`,e.tabIndex=r?0:-1,e.setAttribute(this.childSelectedAttr,String(r)),i&&(i.inert=!r,i.setAttribute(`aria-labelledby`,e.id),i.setAttribute(`aria-hidden`,String(!r)),r&&globalThis.setTimeout(()=>{try{i.scrollIntoView({block:`nearest`,inline:`nearest`,behavior:`auto`})}catch{i.scrollIntoView(!0)}},300))}),e.addEventListener(`click`,this._onClick),e.addEventListener(`keydown`,this._onKeyDown),e.dispatchEvent(new CustomEvent(`Initialized`))}get selector(){return this.childRoles.map(e=>`[role="${e}"]`).join(`,`)}get allMembers(){return[...this.parent.querySelectorAll(this.selector)]}get activeMembers(){return this.allMembers.filter(e=>!e.matches(`[aria-disabled="true"], [aria-hidden="true"]`))}get selected(){return this.activeMembers.find(e=>e.matches(`[${this.childSelectedAttr}="true"]`))}get isDisabled(){return this.parent.matches(`[aria-disabled="true"]`)}get isReadOnly(){return this.parent.matches(`[aria-readonly="true"]`)}get grid(){return this.role===`grid`||this.role===`listbox`&&this.parent.matches(`.grid`)}selectTarget(e,t){if(this.isDisabled||this.isReadOnly){e.preventDefault();return}let n=t.getAttribute(`role`),r=t.closest(this.parentGroupSelector),i=e.type===`click`,a=e.type===`keydown`&&e.key===` `;this.activeMembers.forEach(o=>{let s=o.matches(`[role="menuitemcheckbox"]`),c=o.matches(`[role="menuitemradio"]`);if((s||c)&&(o.getAttribute(`role`)!==n||o.closest(this.parentGroupSelector)!==r))return;let l=s||this.multi,u=c||!l,d=o===t,f=o.matches(`[${this.childSelectedAttr}="true"]`),p=o.getAttribute(`aria-controls`),m=p?document.getElementById(p):null;l&&d&&(i||a)&&(o.setAttribute(this.childSelectedAttr,String(!f)),o.dispatchEvent(new CustomEvent(`Change`,{detail:{[this.childSelectedProp]:!f}})),f||o.dispatchEvent(new CustomEvent(`Select`))),u&&f!==d&&(!c||a||i)&&(o.setAttribute(this.childSelectedAttr,String(d)),o.dispatchEvent(new CustomEvent(`Change`,{detail:{[this.childSelectedProp]:d}})),d&&(e.type===`keydown`&&o.matches(`[role="radio"]`)&&o.click(),o.dispatchEvent(new CustomEvent(`Select`)))),this.focusChild?globalThis.requestAnimationFrame(()=>{o.tabIndex=d?0:-1,d&&(o.focus(),o.dispatchEvent(new CustomEvent(`Focus`)))}):(o.classList.toggle(`focused`,d),d&&o.dispatchEvent(new CustomEvent(`Focus`))),m&&(m.inert=!d,m.setAttribute(`aria-hidden`,String(!d)),d&&globalThis.setTimeout(()=>{try{m.scrollIntoView({block:`nearest`,inline:`nearest`,behavior:`auto`})}catch{m.scrollIntoView(!0)}},300)),d&&(this.parent.setAttribute(`aria-activedescendant`,o.id),globalThis.setTimeout(()=>{try{o.scrollIntoView({block:`nearest`,inline:`nearest`,behavior:`auto`})}catch{o.scrollIntoView(!0)}},300))}),this.parent.dispatchEvent(new CustomEvent(`Change`,{detail:OI(t)}))}onClick(e){let t=e.target,n=t.matches(this.selector)?t:t.closest(this.selector);!n||e.button!==0||!this.clickToSelect||this.selectTarget(e,n)}onKeyDown(e){let{key:t,ctrlKey:n,metaKey:r,shiftKey:i,altKey:a}=e;if(i||a||n||r)return;let o=e.target,{allMembers:s,activeMembers:c}=this,l=(()=>{if(!this.focusChild)return c.find(e=>e.matches(`.focused`));if(o.matches(this.selector))return o})();if([`Enter`,` `,`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`].includes(t)&&e.preventDefault(),t===`Enter`){l?.click();return}if(t===` `){l&&this.selectTarget(e,l);return}let u,d;if(this.grid){let e=Math.floor(this.parent.clientWidth/c[0].clientWidth),n=Lh();u=l?s.indexOf(l):-1,t===`ArrowUp`&&u>0&&(d=s[u-e]),t===`ArrowDown`&&u<s.length-1&&(d=s[u+e]),t===`ArrowLeft`&&u>0&&(d=s[u+(n?1:-1)]),t===`ArrowRight`&&u<s.length-1&&(d=s[u+(n?-1:1)]),d?.matches(`[aria-disabled="true"], [aria-hidden="true"]`)&&(d=void 0)}else{u=l?c.indexOf(l):-1;let e=Lh(),n=this.orientation===`horizontal`?e?`ArrowRight`:`ArrowLeft`:`ArrowUp`,r=this.orientation===`horizontal`?e?`ArrowLeft`:`ArrowRight`:`ArrowDown`;t===n&&(u>0&&(d=c[u-1]),u<=0&&(d=c[c.length-1])),t===r&&(u<c.length-1&&(d=c[u+1]),u===c.length-1&&([d]=c))}d&&d!==l&&this.selectTarget(e,d)}destroy(){this.parent.removeEventListener(`click`,this._onClick),this.parent.removeEventListener(`keydown`,this._onKeyDown)}onUpdate({searchTerms:e}){let t=kI(e),n=t?t.split(/\s+/):[],{allMembers:r,parent:i}=this,a=r.map(e=>{let t=kI(e.dataset.searchValue??e.dataset.label??e.querySelector(`.label`)?.textContent??e.textContent),r=!n.every(e=>t.includes(e));return e.dispatchEvent(new CustomEvent(`Toggle`,{detail:{hidden:r}})),r}).filter(e=>!e).length;i.dispatchEvent(new CustomEvent(`Filter`,{detail:{matched:a,total:r.length}}))}},AI=e=>t=>{let n=typeof e==`function`,r=n?e():e,i=new Ise(t,r);return n&&Qr(()=>{i.onUpdate(e())}),()=>{i.destroy()}}}));function MI(e,t){O(t,!0),G(e,zse);let n=q(t,`hidden`,3,!1),r=q(t,`disabled`,3,!1),i=q(t,`readonly`,3,!1),a=q(t,`required`,3,!1),o=q(t,`invalid`,3,!1),s=Gs(t,Lse);var c=Rse();_s(c,()=>({...s,role:`radiogroup`,class:`sui select-button-group ${t.class??``}`,hidden:n(),tabindex:`-1`,"aria-hidden":n(),"aria-disabled":r(),"aria-readonly":i(),"aria-required":a(),"aria-invalid":o()}),void 0,void 0,void 0,`svelte-cwj568`);var l=F(c);Co(F(l),()=>t.children??E),D(l),D(c),qo(c,AI),R(()=>l.inert=r()),H(e,c),k()}var Lse,Rse,zse,Bse=o((()=>{Z(),J(),jI(),Lse=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`children`]),Rse=B(`<div><div role="none" class="inner svelte-cwj568"><!></div></div>`),zse={hash:`svelte-cwj568`,code:`.select-button-group.svelte-cwj568 {flex:none;display:inline-flex;align-items:center;margin:var(--sui-focus-ring-width);}.select-button-group.svelte-cwj568:focus-visible {outline-width:0 !important;}.select-button-group.svelte-cwj568 button {margin:0 !important;border-radius:0 !important;color:var(--sui-primary-foreground-color);}.select-button-group.svelte-cwj568 button:first-child {border-start-start-radius:4px !important;border-end-start-radius:4px !important;}.select-button-group.svelte-cwj568 button:not(:first-child) {border-inline-start-width:0;}.select-button-group.svelte-cwj568 button:last-child {border-start-end-radius:4px !important;border-end-end-radius:4px !important;}.select-button-group.svelte-cwj568 button[aria-checked=true] {color:var(--sui-highlight-foreground-color);background-color:var(--sui-selected-background-color);}.select-button-group.svelte-cwj568 [aria-invalid=true] button {border-color:var(--sui-error-border-color);}.select-button-group.svelte-cwj568 [aria-disabled=false] button[aria-disabled=true] {filter:grayscale(0) opacity(1);}.select-button-group.svelte-cwj568 [aria-disabled=false] button[aria-disabled=true] * {filter:grayscale(1) opacity(0.35);}.inner.svelte-cwj568 {display:contents;}`}}));function NI(e,t){O(t,!0);let n=q(t,`selected`,15,!1),r=Gs(t,Vse);wI(e,Ks(()=>r,{role:`radio`,get class(){return`sui select-button ${t.class??``}`},get"aria-checked"(){return n()},onChange:e=>{n(e.detail.selected),t.onChange?.(e)}})),k()}var Vse,Hse=o((()=>{Z(),J(),EI(),Vse=new Set([`$$slots`,`$$events`,`$$legacy`,`selected`,`class`,`onChange`])}));function PI(e,t){O(t,!0);let n=q(t,`hidden`,3,!1),r=q(t,`disabled`,3,!1),i=q(t,`popupPosition`,3,`bottom-left`),a=q(t,`popupPositionBaseElement`,3,void 0),o=q(t,`showPopupBackdrop`,3,!1),s=q(t,`label`,3,``),c=q(t,`variant`,3,void 0),l=q(t,`size`,3,`medium`),u=q(t,`iconic`,3,!1),d=Gs(t,Use),f=N(void 0);var p={focus:()=>{z(f)?.focus()}},m=Wse(),h=I(m);return wI(h,Ks(()=>d,{get class(){return`sui menu-button ${t.class??``}`},get hidden(){return n()},get disabled(){return r()},get label(){return s()},get variant(){return c()},get size(){return l()},get iconic(){return u()},"aria-haspopup":`menu`,get element(){return z(f)},set element(e){P(f,e,!0)},startIcon:e=>{var n=V();Co(I(n),()=>t.startIcon??E),H(e,n)},children:e=>{var n=V();Co(I(n),()=>t.children??E),H(e,n)},endIcon:e=>{var n=V(),r=I(n),i=e=>{var n=V();Co(I(n),()=>t.endIcon),H(e,n)},a=e=>{oI(e,{name:`more_vert`})},o=e=>{oI(e,{name:`arrow_drop_down`,class:`small-arrow`})};W(r,e=>{t.endIcon?e(i):u()?e(a,1):e(o,-1)}),H(e,n)},$$slots:{startIcon:!0,default:!0,endIcon:!0}})),SI(L(h,2),{get anchor(){return z(f)},get position(){return i()},get positionBaseElement(){return a()},get showBackdrop(){return o()},children:(e,n)=>{var r=V();Co(I(r),()=>t.popup??E),H(e,r)},$$slots:{default:!0}}),H(e,m),k(p)}var Use,Wse,FI=o((()=>{Z(),J(),EI(),sI(),CI(),Use=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`popupPosition`,`popupPositionBaseElement`,`showPopupBackdrop`,`label`,`variant`,`size`,`iconic`,`children`,`startIcon`,`endIcon`,`popup`]),Wse=B(`<!> <!>`,1)}));function Gse(e,t){O(t,!0),G(e,LI);let n=q(t,`hidden`,3,!1),r=q(t,`disabled`,3,!1),i=q(t,`label`,3,``),a=q(t,`variant`,3,void 0),o=q(t,`size`,3,`medium`),s=q(t,`popupPosition`,3,`bottom-left`),c=q(t,`showPopupBackdrop`,3,!1),l=Gs(t,Kse),u=N(void 0);var d=II(),f=F(d);wI(f,Ks(()=>l,{get hidden(){return n()},get disabled(){return r()},get label(){return i()},get variant(){return a()},get size(){return o()}}));var p=L(f,2);{let e=e=>{var n=V(),r=I(n),i=e=>{var n=V();Co(I(n),()=>t.chevronIcon),H(e,n)},a=e=>{oI(e,{name:`arrow_drop_down`,class:`small-arrow`})};W(r,e=>{t.chevronIcon?e(i):e(a,-1)}),H(e,n)},i=e=>{var n=V();Co(I(n),()=>t.popup??E),H(e,n)},l=M(()=>Y(`_sui.split_button.more_options`));PI(p,{iconic:!0,get hidden(){return n()},get disabled(){return r()},get variant(){return a()},get size(){return o()},get"aria-label"(){return z(l)},get popupPosition(){return s()},get popupPositionBaseElement(){return z(u)},get showPopupBackdrop(){return c()},endIcon:e,popup:i,$$slots:{endIcon:!0,popup:!0}})}D(d),Rs(d,e=>P(u,e),()=>z(u)),R(e=>{K(d,`hidden`,n()),K(d,`aria-hidden`,n()),K(d,`aria-disabled`,r()),K(d,`aria-label`,e)},[()=>Y(`_sui.split_button.x_options`,{values:{name:i()}})]),H(e,d),k()}var Kse,II,LI,qse=o((()=>{Z(),J(),X(),sI(),FI(),EI(),Kse=new Set([`$$slots`,`$$events`,`$$legacy`,`hidden`,`disabled`,`label`,`variant`,`size`,`popupPosition`,`showPopupBackdrop`,`chevronIcon`,`popup`]),II=B(`<div role="group" class="sui split-button svelte-vd3spg"><!> <!></div>`),LI={hash:`svelte-vd3spg`,code:`.split-button.svelte-vd3spg {flex:none;display:inline-flex;margin:var(--sui-focus-ring-width);}.split-button.svelte-vd3spg button {margin:0;}.split-button.svelte-vd3spg button.menu-button {border-inline-start-width:0;border-start-start-radius:0;border-end-start-radius:0;aspect-ratio:3/4;}.split-button.svelte-vd3spg button:not(.menu-button) {border-start-end-radius:0;border-end-end-radius:0;}`}}));function RI(e,t){G(e,VI);let n=q(t,`hidden`,3,!1),r=q(t,`orientation`,3,`horizontal`),i=Gs(t,zI);var a=BI();_s(a,()=>({...i,role:`separator`,class:`sui divider ${t.class??``}`,hidden:n(),"aria-hidden":n(),"aria-orientation":r()}),void 0,void 0,void 0,`svelte-jtn0nt`),H(e,a)}var zI,BI,VI,HI=o((()=>{Z(),J(),zI=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`orientation`]),BI=B(`<div></div>`),VI={hash:`svelte-jtn0nt`,code:`.divider.svelte-jtn0nt {flex:none;background-color:var(--sui-secondary-border-color);}.divider[aria-orientation=horizontal].svelte-jtn0nt {margin:8px 0;width:100%;height:1px;}.divider[aria-orientation=vertical].svelte-jtn0nt {margin:0 8px;width:1px;height:100%;}`}}));function UI(e,t){G(e,KI);let n=q(t,`flex`,3,!1),r=Gs(t,WI);var i=GI();_s(i,()=>({...r,role:`none`,class:`sui spacer ${t.class??``}`,[bs]:{flex:n()}}),void 0,void 0,void 0,`svelte-112etrw`),H(e,i)}var WI,GI,KI,qI=o((()=>{Z(),J(),WI=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`flex`]),GI=B(`<div></div>`),KI={hash:`svelte-112etrw`,code:`.spacer.flex.svelte-112etrw:not([hidden]) {display:block;flex:auto;}.spacer.svelte-112etrw:not(.flex) {width:8px;height:8px;}`}}));function Jse(e,t){G(e,XI);let n=q(t,`hidden`,3,!1),r=q(t,`disabled`,3,!1),i=q(t,`orientation`,3,`horizontal`),a=Gs(t,JI);var o=YI();_s(o,()=>({...a,role:`group`,class:`sui checkbox-group ${t.class??``} ${i()??``}`,hidden:n(),"aria-hidden":n(),"aria-disabled":r(),"aria-roledescription":`checkbox group`}),void 0,void 0,void 0,`svelte-uz3mpj`);var s=F(o);Co(F(s),()=>t.children??E),D(s),D(o),R(()=>s.inert=r()),H(e,o)}var JI,YI,XI,Yse=o((()=>{Z(),J(),JI=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`orientation`,`children`]),YI=B(`<div><div role="none" class="inner svelte-uz3mpj"><!></div></div>`),XI={hash:`svelte-uz3mpj`,code:`.checkbox-group.svelte-uz3mpj {display:inline-flex;}.checkbox-group.horizontal.svelte-uz3mpj {gap:8px;align-items:center;flex-wrap:wrap;}.checkbox-group.vertical.svelte-uz3mpj {gap:4px;flex-direction:column;}
646
- @media (pointer: coarse) {.checkbox-group.vertical.svelte-uz3mpj {gap:8px;}
647
- }.inner.svelte-uz3mpj {display:contents;}`}}));function ZI(e,t){let n=Ma();O(t,!0),G(e,tL);let r=q(t,`checked`,15),i=q(t,`name`,3,void 0),a=q(t,`value`,3,void 0),o=q(t,`hidden`,3,!1),s=q(t,`disabled`,3,!1),c=q(t,`readonly`,3,!1),l=q(t,`required`,3,!1),u=q(t,`invalid`,3,!1),d=q(t,`label`,3,void 0),f=q(t,`group`,15),p=Gs(t,QI),m=N(void 0),h=M(()=>r()===`mixed`);Qr(()=>{Array.isArray(f())&&(f().includes(a())?r()!==!0&&r(!0):r()!==!1&&r(!1))});var g=eL();let _;var v=F(g),y=F(v);{let e=e=>{var n=V(),i=I(n),a=e=>{var n=V();Co(I(n),()=>t.checkIcon),H(e,n)},o=e=>{oI(e,{name:`remove`})},s=e=>{oI(e,{name:`check`})};W(i,e=>{t.checkIcon?e(a):z(h)?e(o,1):r()&&e(s,2)}),H(e,n)},d=M(()=>t[`aria-label`]||void 0),g=M(()=>t[`aria-label`]?void 0:`${n}-label`);wI(y,Ks(()=>p,{role:`checkbox`,get id(){return n},get name(){return i()},get value(){return a()},get hidden(){return o()},get disabled(){return s()},get readonly(){return c()},get required(){return l()},get"aria-invalid"(){return u()},get"aria-checked"(){return r()},get"aria-label"(){return z(d)},get"aria-labelledby"(){return z(g)},onclick:e=>{e.preventDefault(),e.stopPropagation(),!(s()||c())&&(r(z(h)?!0:!r()),Array.isArray(f())&&(r()?f().includes(a())||f([...f(),a()]):f().includes(a())&&f(f().filter(e=>e!==a()))),t.onChange?.(new CustomEvent(`Change`,{detail:{checked:r()}})))},get element(){return z(m)},set element(e){P(m,e,!0)},startIcon:e,$$slots:{startIcon:!0}}))}var b=L(y,2),x=e=>{var r=$I(),i=F(r),a=e=>{var n=V();Co(I(n),()=>t.children),H(e,n)},o=e=>{var t=ja();R(()=>U(t,d())),H(e,t)};W(i,e=>{t.children?e(a):e(o,-1)}),D(r),R(()=>K(r,`id`,`${n}-label`)),H(e,r)};W(b,e=>{(t.children||d())&&e(x)}),D(v),D(g),R(()=>{_=as(g,1,`sui checkbox ${t.class??``}`,`svelte-1p6hie9`,_,{checked:r(),indeterminate:z(h),disabled:s(),readonly:c()}),K(g,`hidden`,o()),v.inert=s()}),va(`click`,g,e=>{e.preventDefault(),e.stopPropagation(),e.target.matches(`button`)||z(m)?.click()}),H(e,g),k()}var QI,$I,eL,tL,Xse=o((()=>{Z(),J(),EI(),sI(),QI=new Set([`$$slots`,`$$events`,`$$legacy`,`checked`,`class`,`name`,`value`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`label`,`aria-label`,`group`,`onChange`,`children`,`checkIcon`]),$I=B(`<label class="svelte-1p6hie9"><!></label>`),eL=B(`<div role="none"><div role="none" class="inner svelte-1p6hie9"><!> <!></div></div>`),tL={hash:`svelte-1p6hie9`,code:`.checkbox.svelte-1p6hie9 {display:inline-flex;align-items:center;gap:8px;margin:var(--sui-focus-ring-width);color:var(--sui-control-foreground-color);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);cursor:pointer;-webkit-user-select:none;user-select:none;}.checkbox.svelte-1p6hie9:hover button {background-color:var(--sui-hover-background-color);}.checkbox.svelte-1p6hie9:hover button[aria-checked=true] {background-color:var(--sui-primary-accent-color-light);}.checkbox.svelte-1p6hie9:active button {background-color:var(--sui-active-background-color);}.checkbox.svelte-1p6hie9:active button[aria-checked=true] {background-color:var(--sui-primary-accent-color-dark);}.checkbox.svelte-1p6hie9 button {flex:none;align-items:center;justify-content:center;overflow:hidden;margin:0 !important;border-width:var(--sui-checkbox-border-width, 1.5px);border-color:var(--sui-checkbox-border-color);border-radius:var(--sui-checkbox-border-radius);padding:0;width:var(--sui-checkbox-height);height:var(--sui-checkbox-height);color:var(--sui-primary-accent-text-color);background-color:var(--sui-checkbox-background-color);transition:all 200ms;}.checkbox.svelte-1p6hie9 button[aria-checked=true] {border-color:var(--sui-checkbox-border-color-checked, var(--sui-primary-accent-color));color:var(--sui-checkbox-foreground-color-checked, var(--sui-primary-accent-color-inverted));background-color:var(--sui-checkbox-background-color-checked, var(--sui-primary-accent-color));}.checkbox.svelte-1p6hie9 button[aria-invalid=true] {border-color:var(--sui-error-border-color);color:var(--sui-error-foreground-color);}.checkbox.svelte-1p6hie9 button[aria-checked=true][aria-invalid=true] {background-color:var(--sui-checkbox-background-color);}.checkbox.svelte-1p6hie9 button .icon {font-size:calc(var(--sui-checkbox-height) - 2px);}.checkbox.svelte-1p6hie9 label:where(.svelte-1p6hie9) {cursor:inherit;}.inner.svelte-1p6hie9 {display:contents;}`},ya([`click`])}));function nL(e,t){let n=Ma();O(t,!0),G(e,lL);let r=q(t,`open`,15,!1);q(t,`value`,11,``);let i=q(t,`role`,3,`dialog`),a=q(t,`size`,3,`medium`),o=q(t,`showClose`,3,!1),s=q(t,`showOk`,3,!0),c=q(t,`showCancel`,3,!0),l=q(t,`okLabel`,3,``),u=q(t,`okShortcuts`,3,void 0),d=q(t,`okDisabled`,3,!1),f=q(t,`cancelLabel`,3,``),p=q(t,`cancelShortcuts`,3,void 0),m=q(t,`cancelDisabled`,3,!1),h=q(t,`focusInput`,3,!0),g=Gs(t,rL),_=N(void 0),v=N(void 0);Qr(()=>{if(r()&&z(v)){let e=!1;return(async()=>{await Gw(50),!e&&(h()?((z(v)?.querySelector(`input, button.primary`))?.focus(),(z(v)?.querySelector(`input`))?.select()):z(_)?.focus())})(),()=>{e=!0}}});{let h=M(()=>t.header?void 0:t.title),y=M(()=>t.header?t.title:`${n}-title`);Rs(ise(e,Ks(()=>g,{get role(){return i()},get id(){return n},class:`dialog`,get"aria-label"(){return z(h)},get"aria-labelledby"(){return z(y)},get"aria-describedby"(){return`${n}-body`},showBackdrop:!0,get open(){return r()},set open(e){r(e)},children:(e,r)=>{var i=cL(),h=F(i),g=e=>{var r=aL(),i=F(r),a=e=>{var n=V();Co(I(n),()=>t.header),H(e,n)},s=e=>{var r=iL(),i=I(r),a=F(i,!0);D(i);var s=L(i,2);UI(s,{flex:!0});var c=L(s,2);Co(c,()=>t.headerExtra??E);var l=L(c,2),u=e=>{{let r=e=>{var n=V(),r=I(n),i=e=>{var n=V();Co(I(n),()=>t.closeIcon),H(e,n)},a=e=>{oI(e,{name:`close`})};W(r,e=>{t.closeIcon?e(i):e(a,-1)}),H(e,n)},i=M(()=>Y(`_sui.close`));wI(e,{variant:`ghost`,iconic:!0,get"aria-label"(){return z(i)},get"aria-controls"(){return n},onclick:()=>{z(_)?.close(`close`)},startIcon:r,$$slots:{startIcon:!0}})}};W(l,e=>{o()&&e(u)}),R(()=>{K(i,`id`,`${n}-title`),U(a,t.title)}),H(e,r)};W(i,e=>{t.header?e(a):e(s,-1)}),D(r),H(e,r)};W(h,e=>{(t.title||o()||t.header||t.headerExtra)&&e(g)});var y=L(h,2);Co(F(y),()=>t.children??E),D(y);var b=L(y,2),x=e=>{var n=sL(),r=F(n),i=e=>{var n=V();Co(I(n),()=>t.footer??E),H(e,n)},a=e=>{var n=oL(),r=I(n);Co(r,()=>t.footerExtra??E);var i=L(r,2);UI(i,{flex:!0});var a=L(i,2),o=e=>{{let t=M(()=>l()||Y(`_sui.ok`));wI(e,{variant:`primary`,get label(){return z(t)},get keyShortcuts(){return u()},get disabled(){return d()},onclick:()=>{z(_)?.close(`ok`)}})}};W(a,e=>{s()&&e(o)});var h=L(a,2),g=e=>{{let t=M(()=>f()||Y(`_sui.cancel`));wI(e,{variant:`secondary`,get label(){return z(t)},get keyShortcuts(){return p()},get disabled(){return m()},onclick:()=>{z(_)?.close(`cancel`)}})}};W(h,e=>{c()&&e(g)}),H(e,n)};W(r,e=>{t.footer?e(i):e(a,-1)}),D(n),H(e,n)};W(b,e=>{(s()||c()||t.footer||t.footerExtra)&&e(x)}),D(i),Rs(i,e=>P(v,e),()=>z(v)),R(()=>{as(i,1,`content ${t.class??``} ${a()??``}`,`svelte-1qqjv77`),K(y,`id`,`${n}-body`)}),H(e,i)},$$slots:{default:!0}})),e=>P(_,e,!0),()=>z(_))}k()}var rL,iL,aL,oL,sL,cL,lL,uL=o((()=>{Z(),J(),X(),Kw(),EI(),qI(),sI(),xI(),rL=new Set(`$$slots.$$events.$$legacy.open.value.title.role.size.class.showClose.showOk.showCancel.okLabel.okShortcuts.okDisabled.cancelLabel.cancelShortcuts.cancelDisabled.focusInput.children.header.headerExtra.footer.footerExtra.closeIcon.input`.split(`.`)),iL=B(`<div role="none" class="title svelte-1qqjv77"> </div> <!> <!> <!>`,1),aL=B(`<div role="none" class="header svelte-1qqjv77"><!></div>`),oL=B(`<!> <!> <!> <!>`,1),sL=B(`<div role="none" class="footer svelte-1qqjv77"><!></div>`),cL=B(`<div role="none"><!> <div role="none" class="body svelte-1qqjv77"><!></div> <!></div>`),lL={hash:`svelte-1qqjv77`,code:`.content.svelte-1qqjv77 {position:relative;display:flex;flex-direction:column;overflow:hidden;border-radius:var(--sui-dialog-content-border-radius, 4px);max-width:calc(100dvw - var(--sui-dialog-content-margin, 16px) * 2);background-color:var(--sui-dialog-content-background-color, var(--sui-secondary-background-color-translucent));box-shadow:var(--sui-dialog-content-box-shadow, 0 8px 16px var(--sui-popup-shadow-color));-webkit-backdrop-filter:var(--sui-dialog-content-backdrop-filter, blur(16px));backdrop-filter:var(--sui-dialog-content-backdrop-filter, blur(16px));transition-property:transform;}dialog.open .content.svelte-1qqjv77 {transition-duration:150ms;transform:scale(100%);}dialog:not(.open) .content.svelte-1qqjv77 {transition-duration:300ms;transform:scale(90%);}.content.small.svelte-1qqjv77 {width:var(--sui-dialog-small-content-width, var(--sui-dialog-content-width, 400px));max-height:var(--sui-dialog-small-content-max-height, var(--sui-dialog-content-max-height, 400px));}
648
- @media (max-height: 400px) {.content.small.svelte-1qqjv77 {max-height:calc(100dvh - 32px);}
649
- }.content.medium.svelte-1qqjv77 {width:var(--sui-dialog-medium-content-width, var(--sui-dialog-content-width, 600px));max-height:var(--sui-dialog-medium-content-max-height, var(--sui-dialog-content-max-height, 600px));}
650
- @media (max-height: 600px) {.content.medium.svelte-1qqjv77 {max-height:calc(100dvh - 32px);}
651
- }.content.large.svelte-1qqjv77 {width:var(--sui-dialog-large-content-width, var(--sui-dialog-content-width, 800px));max-height:var(--sui-dialog-large-content-max-height, var(--sui-dialog-content-max-height, 800px));}
652
- @media (max-height: 800px) {.content.large.svelte-1qqjv77 {max-height:calc(100dvh - 32px);}
653
- }.content.x-large.svelte-1qqjv77 {width:var(--sui-dialog-x-large-content-width, var(--sui-dialog-content-width, 1000px));max-height:var(--sui-dialog-x-large-content-max-height, var(--sui-dialog-content-max-height, 1000px));}
654
- @media (max-height: 1000px) {.content.x-large.svelte-1qqjv77 {max-height:calc(100dvh - 32px);}
655
- }:is(.header.svelte-1qqjv77, .footer.svelte-1qqjv77) {display:flex;align-items:center;gap:4px;}.header.svelte-1qqjv77 {box-sizing:content-box;margin:var(--sui-dialog-header-margin, 0 16px);border-width:var(--sui-dialog-header-border-width, 0 0 1px);border-color:var(--sui-dialog-header-border-color, var(--sui-secondary-border-color));padding:var(--sui-dialog-header-padding, 16px 8px);height:var(--sui-dialog-header-height, 32px);}.header.svelte-1qqjv77 .title:where(.svelte-1qqjv77) {font-size:var(--sui-font-size-large);font-weight:var(--sui-font-weight-bold);}.footer.svelte-1qqjv77 {margin:var(--sui-dialog-footer-margin, 0 24px 24px);}
656
- @media (width < 768px) {.footer.svelte-1qqjv77 {margin:var(--sui-dialog-footer-margin, 0 16px 16px);}
657
- }.body.svelte-1qqjv77 {overflow:auto;margin:var(--sui-dialog-body-margin, 24px 24px);white-space:normal;line-height:var(--sui-line-height-compact);}
658
- @media (width < 768px) {.body.svelte-1qqjv77 {margin:var(--sui-dialog-body-margin, 16px 16px);}
659
- }`}}));function dL(e,t){O(t,!0);let n=q(t,`open`,15,!1),r=Gs(t,fL);nL(e,Ks(()=>r,{role:`alertdialog`,showCancel:!1,get open(){return n()},set open(e){n(e)}})),k()}var fL,Zse=o((()=>{Z(),J(),uL(),fL=new Set([`$$slots`,`$$events`,`$$legacy`,`open`])}));function pL(e,t){O(t,!0);let n=q(t,`open`,15,!1),r=Gs(t,mL);nL(e,Ks(()=>r,{role:`alertdialog`,get open(){return n()},set open(e){n(e)}})),k()}var mL,Qse=o((()=>{Z(),J(),uL(),mL=new Set([`$$slots`,`$$events`,`$$legacy`,`open`])}));function hL(e,t){let n=Ma();O(t,!0),G(e,yL);let r=q(t,`value`,15),i=q(t,`element`,15),a=q(t,`role`,3,`textbox`),o=q(t,`keyShortcuts`,3,void 0),s=q(t,`dir`,3,void 0),c=q(t,`name`,3,void 0),l=q(t,`showInlineLabel`,3,!1),u=q(t,`inputmode`,3,`text`),d=q(t,`flex`,3,!1),f=q(t,`monospace`,3,!1),p=q(t,`debounce`,3,!1),m=q(t,`hidden`,3,!1),h=q(t,`disabled`,3,!1),g=q(t,`readonly`,3,!1),_=q(t,`required`,3,!1),v=q(t,`invalid`,3,!1),y=Gs(t,gL),b=M(()=>typeof p()==`number`?p():300),x=0;Qr(()=>()=>{clearTimeout(x)});let S=e=>{r(i()?.value),t.oninput?.(e)},C=e=>{let t=e;p()?(clearTimeout(x),x=setTimeout(()=>{S(t)},z(b))):S(t)};var w=vL();let T;var ee=F(w);_s(ee,()=>({...y,value:r(),type:`text`,role:a(),dir:s(),name:c(),tabindex:h()?-1:0,disabled:h()||void 0,readonly:g()||void 0,inputmode:u(),"aria-label":t[`aria-label`],"aria-hidden":m(),"aria-disabled":h(),"aria-readonly":g(),"aria-required":_(),"aria-invalid":v(),oninputcapture:C}),void 0,void 0,void 0,`svelte-1nthbxb`,!0),Rs(ee,e=>i(e),()=>i()),qo(ee,()=>fI(o()));var te=L(ee,2),ne=e=>{var i=_L();let a;mI(F(i),{children:(e,n)=>{gt();var r=ja();R(()=>U(r,t[`aria-label`])),H(e,r)},$$slots:{default:!0}}),D(i),R(()=>{K(i,`id`,`${n}-label`),a=as(i,1,`label svelte-1nthbxb`,null,a,{hidden:!!r()})}),H(e,i)};W(te,e=>{t[`aria-label`]&&l()&&e(ne)}),D(w),R(()=>{T=as(w,1,`sui text-input ${t.class??``}`,`svelte-1nthbxb`,T,{flex:d(),monospace:f(),disabled:h(),readonly:g()}),K(w,`hidden`,m()),ee.dir=ee.dir}),H(e,w),k()}var gL,_L,vL,yL,bL=o((()=>{Z(),J(),pI(),hI(),gL=new Set([`$$slots`,`$$events`,`$$legacy`,`value`,`element`,`role`,`keyShortcuts`,`dir`,`name`,`showInlineLabel`,`inputmode`,`flex`,`monospace`,`debounce`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`aria-label`,`children`,`oninput`]),_L=B(`<span aria-hidden="true"><!></span>`),vL=B(`<div role="none"><input/> <!></div>`),yL={hash:`svelte-1nthbxb`,code:`.text-input.svelte-1nthbxb {display:inline-flex;align-items:center;position:relative;margin:var(--sui-focus-ring-width);min-width:var(--sui-textbox-singleline-min-width);}.text-input.flex.svelte-1nthbxb:not([hidden]) {display:inline-flex;width:-moz-available;width:-webkit-fill-available;width:stretch;min-width:0;}.text-input.monospace.svelte-1nthbxb {--sui-textbox-font-family: var(--sui-font-family-monospace, monospace);}input.svelte-1nthbxb:is(:where(.svelte-1nthbxb):-webkit-autofill, :where(.svelte-1nthbxb):-webkit-autofill:focus) {transition:background-color 0s 600000s, color 0s 600000s;}input.svelte-1nthbxb {display:inline-block;flex:auto;border-width:var(--sui-textbox-border-width, 1px);border-color:var(--sui-textbox-border-color);border-radius:var(--sui-textbox-border-radius);padding:var(--sui-textbox-singleline-padding);min-width:0;height:var(--sui-textbox-height);color:var(--sui-textbox-foreground-color);background-color:var(--sui-textbox-background-color);font-family:var(--sui-textbox-font-family);font-size:var(--sui-textbox-font-size);line-height:var(--sui-textbox-singleline-line-height);font-weight:var(--sui-textbox-font-weight, var(--sui-font-weight-normal, normal));text-align:var(--sui-textbox-text-align, start);text-indent:var(--sui-textbox-text-indent, 0);text-transform:var(--sui-textbox-text-transform, none);letter-spacing:var(--sui-textbox-letter-spacing, normal);word-spacing:var(--sui-word-spacing-normal, normal);transition:all 200ms;}input.svelte-1nthbxb:focus {border-color:var(--sui-textbox-border-color-focus, var(--sui-primary-accent-color));color:var(--sui-textbox-foreground-color-focus, var(--sui-textbox-foreground-color));background-color:var(--sui-textbox-background-color-focus, var(--sui-textbox-background-color));}input.svelte-1nthbxb:read-only {color:var(--sui-tertiary-foreground-color);border-color:var(--sui-textbox-border-color) !important;}input.svelte-1nthbxb:is(:where(.svelte-1nthbxb):disabled, :where(.svelte-1nthbxb):read-only) {background-color:var(--sui-disabled-background-color);}input[aria-invalid=true].svelte-1nthbxb {border-color:var(--sui-error-border-color);}input.svelte-1nthbxb ~ button {flex:none;margin-inline-start:-1px;border-width:1px;border-color:var(--sui-textbox-border-color);height:var(--sui-textbox-height);aspect-ratio:1/1;}input.svelte-1nthbxb ~ button:last-child {border-start-start-radius:0;border-start-end-radius:4px;border-end-end-radius:4px;border-end-start-radius:0;}input.svelte-1nthbxb ~ button .icon {font-size:var(--sui-font-size-xx-large);}.label.svelte-1nthbxb {position:absolute;inset:var(--sui-textbox-singleline-padding);z-index:2;display:flex;align-items:center;justify-content:var(--sui-textbox-placeholder-text-align, var(--sui-textbox-text-align, start));pointer-events:none;}.label.hidden.svelte-1nthbxb {opacity:0;}input.svelte-1nthbxb:focus + .label:where(.svelte-1nthbxb) {opacity:0;}input.svelte-1nthbxb::placeholder,
660
- .label.svelte-1nthbxb {color:var(--sui-textbox-placeholder-foreground-color, var(--sui-textbox-foreground-color));opacity:var(--sui-textbox-placeholder-opacity, 0.5);font-family:var(--sui-textbox-placeholder-font-family, var(--sui-textbox-font-family));font-size:var(--sui-textbox-placeholder-font-size, var(--sui-textbox-font-size));line-height:var(--sui-textbox-placeholder-singleline-line-height, var(--sui-textbox-singleline-line-height));font-weight:var(--sui-textbox-placeholder-font-weight, var(--sui-textbox-font-weight, var(--sui-font-weight-normal, normal)));text-align:var(--sui-textbox-placeholder-text-align, var(--sui-textbox-text-align, start));text-indent:var(--sui-textbox-placeholder-text-indent, var(--sui-textbox-text-indent, 0));letter-spacing:var(--sui-textbox-placeholder-letter-spacing, var(--sui-textbox-letter-spacing, normal));}`}}));function xL(e,t){O(t,!0),G(e,wL);let n=q(t,`open`,15,!1),r=q(t,`value`,15,``),i=q(t,`textboxAttrs`,19,()=>({})),a=Gs(t,SL);nL(e,Ks(()=>a,{role:`alertdialog`,get open(){return n()},set open(e){n(e)},children:(e,n)=>{var a=CL(),o=I(a);Co(o,()=>t.children??E);var s=L(o,2),c=F(s),l=e=>{var n=V();Co(I(n),()=>t.input),H(e,n)},u=e=>{hL(e,Ks({dir:`auto`,flex:!0,autofocus:!0},i,{get onkeydown(){return t.onkeydown},get onkeyup(){return t.onkeyup},get onkeypress(){return t.onkeypress},get oninput(){return t.oninput},get value(){return r()},set value(e){r(e)}}))};W(c,e=>{t.input?e(l):e(u,-1)}),D(s),H(e,a)},$$slots:{default:!0}})),k()}var SL,CL,wL,$se=o((()=>{Z(),J(),bL(),uL(),SL=new Set([`$$slots`,`$$events`,`$$legacy`,`open`,`value`,`textboxAttrs`,`children`,`input`,`onkeydown`,`onkeyup`,`onkeypress`,`oninput`]),CL=B(`<!> <div class="input-outer svelte-10ti878"><!></div>`,1),wL={hash:`svelte-10ti878`,code:`.input-outer.svelte-10ti878 {margin:12px 0 0;}`}}));function TL(e,t){O(t,!0);let n=q(t,`accept`,3,void 0),r=q(t,`multiple`,3,!1),i=q(t,`onSelect`,3,void 0),a=q(t,`onCancel`,3,void 0),o=N(void 0);var s={open:()=>{z(o)?.click()}},c=EL();return Rs(c,e=>P(o,e),()=>z(o)),R(()=>{K(c,`accept`,n()),c.multiple=r()}),va(`change`,c,({target:e})=>{let t=[...e.files];i()?.({files:t,file:t[0]})}),_a(`cancel`,c,e=>{e.stopPropagation(),a()?.()}),H(e,c),k(s)}var EL,ece=o((()=>{Z(),J(),EL=B(`<input class="sui file-picker" type="file" hidden=""/>`),ya([`change`])}));function DL(e,t){let n=Ma();G(e,jL);let r=q(t,`label`,3,``),i=Gs(t,OL);var a=AL();_s(a,()=>({...i,role:`rowgroup`,class:`sui grid-body row-group ${t.class??``}`,"aria-labelledby":r()?`${n}-label`:void 0,"aria-roledescription":`grid body`}),void 0,void 0,void 0,`svelte-1av6d3y`);var o=F(a),s=e=>{var t=kL();Vo(F(t),()=>`th`,!1,(e,t)=>{_s(e,()=>({role:`columnheader`,id:`${n}-label`,colspan:`9999`,class:``}),void 0,void 0,void 0,`svelte-1av6d3y`);var i=ja();R(()=>U(i,r())),H(t,i)}),D(t),H(e,t)};W(o,e=>{r()&&e(s)}),Co(L(o,2),()=>t.children??E),D(a),H(e,a)}var OL,kL,AL,jL,tce=o((()=>{Z(),J(),OL=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`label`,`children`]),kL=B(`<div role="row" class="row-group-caption svelte-1av6d3y"><!></div>`),AL=B(`<div><!> <!></div>`),jL={hash:`svelte-1av6d3y`,code:`[role=rowgroup].svelte-1av6d3y {display:table-row-group;}[role=row].svelte-1av6d3y {display:table-row;}[role=columnheader].svelte-1av6d3y {display:table-cell;padding:8px;color:var(--sui-secondary-foreground-color);background-color:var(--sui-secondary-background-color);font-size:var(--sui-font-size-default);text-align:start;}`}}));function ML(e,t){G(e,FL);let n=Gs(t,NL);var r=PL();_s(r,()=>({...n,role:`gridcell`,class:`sui grid-cell ${t.class??``}`}),void 0,void 0,void 0,`svelte-8vvxya`),Co(F(r),()=>t.children??E),D(r),H(e,r)}var NL,PL,FL,nce=o((()=>{Z(),J(),NL=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`children`]),PL=B(`<div><!></div>`),FL={hash:`svelte-8vvxya`,code:`.grid-cell.svelte-8vvxya {display:table-cell;}`}}));function IL(e,t){G(e,zL);let n=q(t,`selected`,3,!1),r=Gs(t,LL);var i=RL();_s(i,()=>({...r,role:`row`,class:`sui grid-row ${t.class??``}`,tabindex:`0`,"aria-selected":n()}),void 0,void 0,void 0,`svelte-lv73ey`),Co(F(i),()=>t.children??E),D(i),H(e,i)}var LL,RL,zL,rce=o((()=>{Z(),J(),LL=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`selected`,`children`]),RL=B(`<div><!></div>`),zL={hash:`svelte-lv73ey`,code:`.grid-row.svelte-lv73ey {display:table-row;height:var(--sui-primary-row-height);}`}}));function ice(e,t){O(t,!0),G(e,HL);let n=q(t,`element`,15),r=q(t,`multiple`,3,!1),i=q(t,`clickToSelect`,3,!0),a=Gs(t,BL);var o=VL(),s=e=>{t.onChange?.(e)};_s(o,()=>({...a,role:`grid`,class:`sui grid ${t.class??``}`,"aria-multiselectable":r(),onChange:s}),void 0,void 0,void 0,`svelte-wvebtn`),Co(F(o),()=>t.children??E),D(o),Rs(o,e=>n(e),()=>n()),qo(o,()=>AI({clickToSelect:i()})),H(e,o),k()}var BL,VL,HL,ace=o((()=>{Z(),J(),jI(),BL=new Set([`$$slots`,`$$events`,`$$legacy`,`element`,`class`,`multiple`,`clickToSelect`,`children`,`onChange`]),VL=B(`<div><!></div>`),HL={hash:`svelte-wvebtn`,code:`.grid.svelte-wvebtn {display:table;margin:var(--sui-focus-ring-width);width:calc(100% - var(--sui-focus-ring-width) * 2);}.grid.data.svelte-wvebtn {border-collapse:collapse;}.grid.data.svelte-wvebtn :is(.grid-col-header, .grid-row-header, .grid-cell) {border:1px solid var(--sui-secondary-border-color);padding:8px 8px;}`}}));function UL(e,t){O(t,!0),G(e,KL);let n=q(t,`hidden`,3,!1),r=q(t,`disabled`,3,!1),i=q(t,`readonly`,3,!1),a=q(t,`required`,3,!1),o=q(t,`invalid`,3,!1),s=q(t,`multiple`,3,!1),c=q(t,`searchTerms`,3,``),l=Gs(t,WL),u=N(!1);var d=GL(),f=e=>{let{detail:{matched:n,total:r}}=e;P(u,n!==r),t.onFilter?.(e)};_s(d,()=>({...l,role:`listbox`,class:`sui listbox ${t.class??``}`,tabindex:r()?-1:0,hidden:n(),"aria-hidden":n(),"aria-disabled":r(),"aria-readonly":i(),"aria-required":a(),"aria-invalid":o(),"aria-multiselectable":s(),onFilter:f,[bs]:{filtered:z(u)}}),void 0,void 0,void 0,`svelte-3aeuad`);var p=F(d);Co(F(p),()=>t.children??E),D(p),D(d),qo(d,()=>AI(()=>({searchTerms:c()}))),R(()=>p.inert=r()),H(e,d),k()}var WL,GL,KL,qL=o((()=>{Z(),J(),jI(),WL=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`multiple`,`searchTerms`,`children`,`onFilter`]),GL=B(`<div><div role="none" class="inner svelte-3aeuad"><!></div></div>`),KL={hash:`svelte-3aeuad`,code:`[role=listbox].svelte-3aeuad {display:flex;flex-direction:column;margin:var(--sui-focus-ring-width);border-width:var(--sui-listbox-border-width, 1px);border-style:var(--sui-listbox-border-style, solid);border-color:var(--sui-listbox-border-width, var(--sui-secondary-border-color));border-radius:var(--sui-listbox-border-radius, 4px);padding:var(--sui-listbox-padding, 4px);min-width:var(--sui-listbox-min-width, calc(var(--sui-option-height) * 5));color:var(--sui-listbox-foreground-color);background-color:var(--sui-listbox-background-color);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);}
661
- @media (pointer: coarse) {[role=listbox].svelte-3aeuad {gap:8px 0;}
662
- }[role=listbox].svelte-3aeuad [role=separator] {margin:4px 0;background-color:var(--sui-control-border-color);}[role=listbox][aria-invalid=true].svelte-3aeuad {border-color:var(--sui-error-border-color);}[role=listbox].tabs.svelte-3aeuad {padding:0;border-block-start-width:0;border-block-end-width:0;border-inline-end-width:1px;border-inline-start-width:0;border-color:var(--sui-control-border-color);}[role=listbox].tabs.svelte-3aeuad .option button {justify-content:flex-start;border-width:0;border-inline-end-width:2px;border-color:transparent;padding:0 12px;border-start-end-radius:0;border-end-end-radius:0;height:var(--sui-tab-medium-height);}[role=listbox].tabs.svelte-3aeuad .option button[aria-selected=true] {border-color:var(--sui-primary-accent-color-light);}[role=listbox].tabs.svelte-3aeuad .option button .icon {display:none;}[role=listbox].in-combobox.svelte-3aeuad:focus-visible {outline-color:transparent;}[role=listbox].filtered.svelte-3aeuad [role=separator] {display:none;}.inner.svelte-3aeuad {display:contents;}`}}));function JL(e,t){let n=Ma();G(e,ZL);let r=q(t,`hidden`,3,!1),i=q(t,`disabled`,3,!1),a=q(t,`label`,3,``),o=Gs(t,YL);var s=XL();_s(s,()=>({...o,role:`group`,id:n,class:`sui option-group ${t.class??``}`,hidden:r(),"aria-hidden":r(),"aria-disabled":i(),"aria-labelledby":`${n}-label`,"aria-roledescription":`option group`}),void 0,void 0,void 0,`svelte-1n0spfh`);var c=F(s);mI(F(c),{children:(e,t)=>{gt();var n=ja();R(()=>U(n,a())),H(e,n)},$$slots:{default:!0}}),D(c);var l=L(c,2);Co(F(l),()=>t.children??E),D(l),D(s),R(()=>{K(c,`id`,`${n}-label`),l.inert=i()}),H(e,s)}var YL,XL,ZL,oce=o((()=>{Z(),J(),hI(),YL=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`label`,`children`]),XL=B(`<div><div role="none" class="label svelte-1n0spfh"><!></div> <div role="none" class="inner svelte-1n0spfh"><!></div></div>`),ZL={hash:`svelte-1n0spfh`,code:`.option-group.svelte-1n0spfh:not(:first-child) {margin:12px 0 0;}.label.svelte-1n0spfh {margin:8px;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}.inner.svelte-1n0spfh {display:contents;}`}}));function QL(e,t){O(t,!0),G(e,nR);let n=q(t,`selected`,15,!1),r=q(t,`hidden`,15,!1),i=q(t,`disabled`,3,!1),a=q(t,`value`,19,()=>t.label),o=q(t,`searchValue`,19,()=>t.label),s=q(t,`wrap`,3,!1),c=Gs(t,$L);var l=tR();let u;wI(F(l),Ks(()=>c,{role:`option`,tabindex:`-1`,get"aria-selected"(){return n()},get label(){return t.label},get value(){return a()},get hidden(){return r()},get disabled(){return i()},get"data-search-value"(){return o()},onChange:e=>{n(e.detail.selected),t.onChange?.(e)},onToggle:e=>{r(e.detail.hidden),r()&&n(!1),t.onToggle?.(e)},startIcon:e=>{var n=V();Co(I(n),()=>t.startIcon??E),H(e,n)},children:(e,r)=>{var i=eR(),a=I(i),o=e=>{var n=V(),r=I(n),i=e=>{var n=V();Co(I(n),()=>t.checkIcon),H(e,n)},a=e=>{oI(e,{class:`check`,name:`check`})};W(r,e=>{t.checkIcon?e(i):e(a,-1)}),H(e,n)};W(a,e=>{n()&&e(o)}),Co(L(a,2),()=>t.children??E),H(e,i)},$$slots:{startIcon:!0,default:!0}})),D(l),R(()=>{u=as(l,1,`sui option ${t.class??``}`,`svelte-d70g3`,u,{wrap:s()}),K(l,`hidden`,r())}),H(e,l),k()}var $L,eR,tR,nR,rR=o((()=>{Z(),J(),EI(),sI(),$L=new Set([`$$slots`,`$$events`,`$$legacy`,`selected`,`hidden`,`class`,`disabled`,`label`,`value`,`searchValue`,`wrap`,`children`,`checkIcon`,`startIcon`,`onChange`,`onToggle`]),eR=B(`<!> <!>`,1),tR=B(`<div role="none"><!></div>`),nR={hash:`svelte-d70g3`,code:`.option.svelte-d70g3 {display:contents;}.option.svelte-d70g3:focus-visible {outline-width:0 !important;}.option.svelte-d70g3 .wrap button {white-space:normal;}.option.svelte-d70g3 button {flex:none;display:flex;gap:4px;margin:0 !important;border-radius:var(--sui-option-border-radius);padding:var(--sui-option-padding);width:100%;height:auto;min-height:var(--sui-option-height);}.option.svelte-d70g3 button:active {background-color:var(--sui-active-background-color);}.option.svelte-d70g3 button[aria-selected=true] .icon.check {color:var(--sui-primary-accent-color-text);}.option.svelte-d70g3 button * {flex:none;}.option.svelte-d70g3 button .label {flex:auto;}.option.svelte-d70g3 :is(.focused, button:hover) {color:var(--sui-highlight-foreground-color);background-color:var(--sui-hover-background-color);}.option.svelte-d70g3 .icon.check {margin:-2px;}`}}));function iR(e,t){O(t,!0),G(e,sR);let n=q(t,`hidden`,3,!1),r=q(t,`disabled`,3,!1),i=Gs(t,aR);var a=oR(),o=e=>{t.onChange?.(e)};_s(a,()=>({...i,role:`menu`,class:`sui menu ${t.class??``}`,hidden:n(),"aria-hidden":n(),"aria-disabled":r(),onChange:o}),void 0,void 0,void 0,`svelte-1x3yc3t`),Co(F(a),()=>t.children??E),D(a),qo(a,AI),H(e,a),k()}var aR,oR,sR,cR=o((()=>{Z(),J(),jI(),aR=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`children`,`onChange`]),oR=B(`<div><!></div>`),sR={hash:`svelte-1x3yc3t`,code:`.menu.svelte-1x3yc3t {display:flex;flex-direction:column;margin:0;border-width:var(--sui-menu-border-width, 1px);border-style:var(--sui-menu-border-style, solid);border-color:var(--sui-menu-border-width, var(--sui-secondary-border-color));border-radius:var(--sui-menu-border-radius, 4px);padding:var(--sui-menu-padding, 4px);}
663
- @media (pointer: coarse) {.menu.svelte-1x3yc3t {gap:8px 0;}
664
- }.menu.svelte-1x3yc3t [role=separator] {margin:var(--sui-menu-divider-margin, 4px);background-color:var(--sui-menu-divider-color, var(--sui-control-border-color));}`}}));function lR(e,t){O(t,!0),G(e,mR);let n=q(t,`role`,3,`menuitem`),r=q(t,`hidden`,3,!1),i=q(t,`disabled`,3,!1),a=q(t,`label`,3,``),o=q(t,`popupPosition`,3,`right-top`),s=Gs(t,uR),c=N(!1),l=N(!1),u=N(void 0),d=N(void 0),f=M(()=>n()===`menuitem`&&!!t.items);tc(()=>{P(d,z(u)?.closest(`dialog`)??void 0,!0)});var p=pR(),m=F(p);{let e=e=>{var n=V();Co(I(n),()=>t.startIcon??E),H(e,n)},o=e=>{var n=fR(),r=I(n);let i;var o=F(r),s=e=>{var t=ja();R(()=>U(t,a())),H(e,t)},c=e=>{var n=V();Co(I(n),()=>t.children??E),H(e,n)};W(o,e=>{a()?e(s):e(c,-1)}),D(r);var l=L(r,2),u=e=>{var n=dR(),r=F(n),i=e=>{var n=V();Co(I(n),()=>t.chevronIcon),H(e,n)},a=e=>{{let t=M(()=>Lh()?`chevron_left`:`chevron_right`);oI(e,{get name(){return z(t)}})}};W(r,e=>{t.chevronIcon?e(i):e(a,-1)}),D(n),H(e,n)};W(l,e=>{z(f)&&e(u)}),R(()=>i=as(r,1,`content svelte-gd1swh`,null,i,{label:!!a()})),H(e,n)},d=e=>{var n=V();Co(I(n),()=>t.endIcon??E),H(e,n)},p=M(()=>z(f)?`menu`:void 0),h=M(()=>z(f)?z(c):void 0);wI(m,Ks(()=>s,{get role(){return n()},get hidden(){return r()},get disabled(){return i()},get"aria-haspopup"(){return z(p)},get"aria-expanded"(){return z(h)},onmouseenter:e=>{z(f)&&window.setTimeout(()=>{P(c,!0)},200),t.onmouseenter?.(e)},onmouseleave:e=>{z(f)&&window.setTimeout(()=>{z(l)||P(c,!1)},200),t.onmouseleave?.(e)},onclick:e=>{z(f)&&(e.preventDefault(),e.stopPropagation(),P(c,!z(c))),t.onclick?.(e)},get onChange(){return t.onChange},get onSelect(){return t.onSelect},get element(){return z(u)},set element(e){P(u,e,!0)},startIcon:e,children:o,endIcon:d,$$slots:{startIcon:!0,default:!0,endIcon:!0}}))}var h=L(m,2),g=e=>{SI(e,{get anchor(){return z(u)},get parentDialogElement(){return z(d)},get position(){return o()},get open(){return z(c)},set open(e){P(c,e,!0)},get hovered(){return z(l)},set hovered(e){P(l,e,!0)},children:(e,n)=>{iR(e,{children:(e,n)=>{var r=V();Co(I(r),()=>t.items??E),H(e,r)},$$slots:{default:!0}})},$$slots:{default:!0}})};W(h,e=>{z(f)&&z(u)&&z(d)&&e(g)}),D(p),R(()=>{as(p,1,`sui menuitem ${t.class??``}`,`svelte-gd1swh`),K(p,`hidden`,r())}),H(e,p),k()}var uR,dR,fR,pR,mR,hR=o((()=>{Z(),J(),X(),rc(),EI(),sI(),CI(),cR(),uR=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`role`,`hidden`,`disabled`,`label`,`popupPosition`,`children`,`startIcon`,`endIcon`,`chevronIcon`,`items`,`onmouseenter`,`onmouseleave`,`onclick`,`onChange`,`onSelect`]),dR=B(`<span role="none" class="icon-outer svelte-gd1swh"><!></span>`),fR=B(`<div role="none"><!></div> <!>`,1),pR=B(`<div role="none"><!> <!></div>`),mR={hash:`svelte-gd1swh`,code:`.menuitem.svelte-gd1swh {position:relative;}.menuitem.svelte-gd1swh button {display:flex;gap:var(--sui-menuitem-gap, 4px);align-items:var(--sui-menuitem-align-items, center);border-radius:var(--sui-menuitem-border-radius, var(--sui-option-border-radius, 4px));margin:0 !important;padding:var(--sui-menuitem-padding, 0 16px);width:100%;min-width:var(--sui-menuitem-min-width, 160px);height:var(--sui-menuitem-height, var(--sui-option-height));color:var(--sui-menuitem-foreground-color, var(--sui-control-foreground-color, inherit));background-color:var(--sui-menuitem-background-color, transparent);font-size:var(--sui-menuitem-font-size, var(--sui-option-font-size));font-weight:var(--sui-menuitem-font-weight, var(--sui-option-font-weight, var(--sui-font-weight-normal, normal)));}.menuitem.svelte-gd1swh button[aria-checked=true] .icon {color:var(--sui-primary-accent-color-text);}.menuitem.svelte-gd1swh button:hover {color:var(--sui-highlight-foreground-color);background-color:var(--sui-hover-background-color);}.menuitem.svelte-gd1swh button:active {background-color:var(--sui-active-background-color);}.menuitem.svelte-gd1swh :hover > [role=menu] {opacity:1;}.menuitem.svelte-gd1swh > [role=menu] {position:absolute;inset-block-start:2px;inset-block-end:auto;inset-inline-start:calc(100% + 4px);inset-inline-end:auto;}.menuitem.svelte-gd1swh > [role=menu]:hover {opacity:1;}.content.svelte-gd1swh {flex:auto;}.icon-outer.svelte-gd1swh {flex:none;width:24px;height:24px;}`}}));function gR(e,t){O(t,!0);let n=q(t,`checked`,15),r=q(t,`hidden`,3,!1),i=q(t,`disabled`,3,!1),a=q(t,`label`,3,``),o=Gs(t,_R);lR(e,Ks(()=>o,{role:`menuitemcheckbox`,get class(){return`sui menu-item-checkbox ${t.class??``}`},get label(){return a()},get hidden(){return r()},get disabled(){return i()},get"aria-checked"(){return n()},onChange:e=>{t.onChange?.(e),n(e.detail.checked)},startIcon:e=>{var n=V();Co(I(n),()=>t.startIcon??E),H(e,n)},children:e=>{var n=V();Co(I(n),()=>t.children??E),H(e,n)},endIcon:e=>{var t=V(),r=I(t),i=e=>{oI(e,{name:`check`})};W(r,e=>{n()&&e(i)}),H(e,t)},$$slots:{startIcon:!0,default:!0,endIcon:!0}})),k()}var _R,vR=o((()=>{Z(),J(),sI(),hR(),_R=new Set([`$$slots`,`$$events`,`$$legacy`,`checked`,`class`,`hidden`,`disabled`,`label`,`children`,`startIcon`,`onChange`])}));function yR(e,t){O(t,!0);let n=q(t,`checked`,15),r=q(t,`hidden`,3,!1),i=q(t,`disabled`,3,!1),a=q(t,`label`,3,``),o=Gs(t,bR);lR(e,Ks(()=>o,{role:`menuitemradio`,get class(){return`sui menu-item-radio ${t.class??``}`},get label(){return a()},get hidden(){return r()},get disabled(){return i()},get"aria-checked"(){return n()},onChange:e=>{t.onChange?.(e),n(e.detail.checked)},startIcon:e=>{var n=V();Co(I(n),()=>t.startIcon??E),H(e,n)},children:e=>{var n=V();Co(I(n),()=>t.children??E),H(e,n)},endIcon:e=>{var t=V(),r=I(t),i=e=>{oI(e,{name:`check`})};W(r,e=>{n()&&e(i)}),H(e,t)},$$slots:{startIcon:!0,default:!0,endIcon:!0}})),k()}var bR,sce=o((()=>{Z(),J(),sI(),hR(),bR=new Set([`$$slots`,`$$events`,`$$legacy`,`checked`,`class`,`hidden`,`disabled`,`label`,`children`,`startIcon`,`onChange`])}));function cce(e,t){G(e,CR);let n=q(t,`now`,3,0),r=q(t,`min`,3,0),i=q(t,`max`,3,100),a=Gs(t,xR);var o=SR();_s(o,()=>({...a,role:`progressbar`,class:`sui progressbar ${t.class??``}`,"aria-valuenow":n(),"aria-valuemin":r(),"aria-valuemax":i(),"aria-valuetext":t.text}),void 0,void 0,void 0,`svelte-o888wl`);var s=F(o);let c;D(o),R(()=>c=cs(s,``,c,{width:`${n()??``}%`})),H(e,o)}var xR,SR,CR,lce=o((()=>{Z(),J(),xR=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`now`,`min`,`max`,`text`]),SR=B(`<div><div role="none" class="svelte-o888wl"></div></div>`),CR={hash:`svelte-o888wl`,code:`.progressbar.svelte-o888wl {overflow:hidden;border-width:var(--sui-progressbar-border-width, 1px);border-style:var(--sui-progressbar-border-style, solid);border-color:var(--sui-progressbar-border-color, var(--sui-control-border-color));border-radius:var(--sui-progressbar-border-radius, 16px);width:var(--sui-progressbar-width, 240px);height:var(--sui-progressbar-height, 10px);background-color:var(--sui-progressbar-background-color, var(--sui-secondary-background-color));}.progressbar.svelte-o888wl div:where(.svelte-o888wl) {height:100%;background-color:var(--sui-progressbar-foreground-color, var(--sui-primary-accent-color-light));transition:width 250ms;}`}}));function wR(e,t){O(t,!0),G(e,DR);let n=q(t,`hidden`,3,!1),r=q(t,`disabled`,3,!1),i=q(t,`readonly`,3,!1),a=q(t,`required`,3,!1),o=q(t,`invalid`,3,!1),s=q(t,`orientation`,3,`horizontal`),c=Gs(t,TR);var l=ER(),u=e=>{t.onChange?.(e)};_s(l,()=>({...c,role:`radiogroup`,class:`sui radio-group ${t.class??``} ${s()??``}`,tabindex:`-1`,hidden:n(),"aria-hidden":n(),"aria-disabled":r(),"aria-readonly":i(),"aria-required":a(),"aria-invalid":o(),"aria-orientation":s(),onChange:u}),void 0,void 0,void 0,`svelte-9l1w8f`);var d=F(l);Co(F(d),()=>t.children??E),D(d),D(l),qo(l,AI),R(()=>d.inert=r()),H(e,l),k()}var TR,ER,DR,uce=o((()=>{Z(),J(),jI(),TR=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`orientation`,`children`,`onChange`]),ER=B(`<div><div role="none" class="inner svelte-9l1w8f"><!></div></div>`),DR={hash:`svelte-9l1w8f`,code:`.radio-group.svelte-9l1w8f {display:inline-flex;}.radio-group.svelte-9l1w8f:focus-visible {outline-width:0 !important;}.radio-group.horizontal.svelte-9l1w8f {gap:8px;align-items:center;flex-wrap:wrap;}.radio-group.vertical.svelte-9l1w8f {gap:4px;flex-direction:column;}
665
- @media (pointer: coarse) {.radio-group.vertical.svelte-9l1w8f {gap:8px;}
666
- }.radio-group.svelte-9l1w8f [aria-invalid=true] button {border-color:var(--sui-error-border-color);}.radio-group.svelte-9l1w8f [aria-invalid=true] button[aria-checked=true] {border-color:var(--sui-error-border-color);}.radio-group.svelte-9l1w8f [aria-invalid=true] button[aria-checked=true]::before {background-color:var(--sui-error-border-color);}.inner.svelte-9l1w8f {display:contents;}`}}));function OR(e,t){let n=Ma();O(t,!0),G(e,MR);let r=q(t,`checked`,7,!1),i=q(t,`hidden`,3,!1),a=q(t,`disabled`,3,!1),o=q(t,`name`,3,void 0),s=q(t,`value`,3,void 0),c=q(t,`valueType`,3,void 0),l=q(t,`label`,3,void 0),u=q(t,`group`,15),d=Gs(t,kR),f=N(void 0);Qr(()=>{typeof u()==`string`&&(u()===s()?r()||r(!0):r()&&r(!1))});var p=jR(),m=e=>{e.target.matches(`button`)||z(f)?.click()};_s(p,()=>({...d,role:`none`,class:`sui radio ${t.class??``}`,hidden:i(),onclick:m,[bs]:{disabled:a()}}),void 0,void 0,void 0,`svelte-1fprcch`);var h=F(p);wI(h,{role:`radio`,get id(){return n},get hidden(){return i()},get disabled(){return a()},get name(){return o()},get value(){return s()},get valueType(){return c()},get"aria-checked"(){return r()},get"aria-labelledby"(){return`${n}-label`},onclick:e=>{e.preventDefault(),!(a()||r())&&(r(!0),typeof u()==`string`&&u(s()))},get onChange(){return t.onChange},get onSelect(){return t.onSelect},get element(){return z(f)},set element(e){P(f,e,!0)}});var g=L(h,2),_=e=>{var r=AR(),i=F(r),a=e=>{var n=V();Co(I(n),()=>t.children??E),H(e,n)},o=e=>{var t=ja();R(()=>U(t,l())),H(e,t)};W(i,e=>{t.children?e(a):e(o,-1)}),D(r),R(()=>K(r,`id`,`${n}-label`)),H(e,r)};W(g,e=>{(t.children||l())&&e(_)}),D(p),H(e,p),k()}var kR,AR,jR,MR,dce=o((()=>{Z(),J(),EI(),kR=new Set([`$$slots`,`$$events`,`$$legacy`,`checked`,`class`,`hidden`,`disabled`,`name`,`value`,`valueType`,`label`,`group`,`children`,`onChange`,`onSelect`]),AR=B(`<label class="svelte-1fprcch"><!></label>`),jR=B(`<span><!> <!></span>`),MR={hash:`svelte-1fprcch`,code:`.radio.svelte-1fprcch {display:inline-flex;align-items:center;gap:8px;margin:var(--sui-focus-ring-width);color:var(--sui-control-foreground-color);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);cursor:pointer;-webkit-user-select:none;user-select:none;}.radio.svelte-1fprcch :hover button {background-color:var(--sui-hover-background-color);}.radio.svelte-1fprcch :hover button[aria-checked=true] {border-color:var(--sui-primary-accent-color-light);color:var(--sui-primary-accent-color-text);}.radio.svelte-1fprcch :hover button[aria-checked=true]::before {background-color:var(--sui-primary-accent-color-light);}.radio.svelte-1fprcch :active button {background-color:var(--sui-active-background-color);}.radio.svelte-1fprcch :active button[aria-checked=true] {border-color:var(--sui-primary-accent-color-dark);color:var(--sui-primary-accent-color-dark);}.radio.svelte-1fprcch button {flex:none;justify-content:center;overflow:hidden;margin:0 !important;border-width:1.5px;border-color:var(--sui-checkbox-border-color);border-radius:var(--sui-checkbox-height);padding:0;width:var(--sui-checkbox-height);height:var(--sui-checkbox-height);background-color:var(--sui-checkbox-background-color);transition:all 200ms;}.radio.svelte-1fprcch button::before {content:"";border-radius:var(--sui-checkbox-height);width:calc(var(--sui-checkbox-height) - 7px);height:calc(var(--sui-checkbox-height) - 7px);background-color:var(--sui-primary-accent-color);opacity:0;transition:all 200ms;will-change:opacity;}.radio.svelte-1fprcch button[aria-checked=true] {border-color:var(--sui-primary-accent-color);}.radio.svelte-1fprcch button[aria-checked=true]::before {opacity:1;}.radio.svelte-1fprcch label:where(.svelte-1fprcch) {cursor:inherit;}`}}));function NR(e,t){O(t,!0),G(e,LR);let n=q(t,`disabled`,3,!1),r=q(t,`showHandleBar`,3,!1),i=Gs(t,PR),a=Lt(`paneGroup`);if(!a)throw Error(`<ResizableHandle> must be used inside a <ResizablePaneGroup>`);let o=a.registerHandle(),s=M(()=>a.direction===`horizontal`),c=M(()=>a.sizes),l=M(()=>z(c)[o]??0),u=M(()=>a.getPaneConstraints(o)),d=M(()=>Math.max(z(u).minSize,100-a.paneDefs.reduce((e,t,n)=>e+(n===o?0:a.getPaneConstraints(n).maxSize),0))),f=M(()=>Math.min(z(u).maxSize,100-a.paneDefs.reduce((e,t,n)=>e+(n===o?0:a.getPaneConstraints(n).minSize),0))),p=N(void 0),m=N(!1),h=N(0),g=N(0),_=N(!1),v=()=>{let e=z(p)?.closest(`.resizable-pane-group`);return e?z(s)?e.clientWidth:e.clientHeight:0},y=e=>{let{screenX:t,screenY:r,pointerId:i}=e;if(n()||!z(m)||i!==z(g))return;e.preventDefault(),e.stopPropagation();let c=z(s)?t:r,l=c-z(h),u=v();if(!u)return;let d=l/u*100;z(s)&&Lh()&&(d=-d),P(h,c,!0),a.resize(o,d)},b=e=>{!z(m)||e.pointerId!==z(g)||(P(m,!1),P(h,0),P(g,0),document.removeEventListener(`pointermove`,y),document.removeEventListener(`pointerup`,b),document.removeEventListener(`pointercancel`,b),t.onResizeEnd?.())},x=e=>{n()||(e.preventDefault(),e.stopPropagation(),P(m,!0),P(h,z(s)?e.screenX:e.screenY,!0),P(g,e.pointerId,!0),t.onResizeStart?.(),document.addEventListener(`pointermove`,y),document.addEventListener(`pointerup`,b),document.addEventListener(`pointercancel`,b))},S=e=>{if(n())return;let{key:r,shiftKey:i}=e,c=i?10:1,l=0;if(r===`Enter`){e.preventDefault(),e.stopPropagation(),a.toggleCollapse(o);return}if(r===`Home`){e.preventDefault(),e.stopPropagation(),a.resize(o,-100);return}if(r===`End`){e.preventDefault(),e.stopPropagation(),a.resize(o,100);return}if(z(s)){let e=Lh();if(r===`ArrowLeft`)l=e?c:-c;else if(r===`ArrowRight`)l=e?-c:c;else return}else if(r===`ArrowUp`)l=-c;else if(r===`ArrowDown`)l=c;else return;e.preventDefault(),e.stopPropagation(),z(_)||(P(_,!0),t.onResizeStart?.()),a.resize(o,l)},C=()=>{z(_)&&(P(_,!1),t.onResizeEnd?.())};var w=IR();_s(w,e=>({...i,role:`separator`,tabindex:n()?-1:0,"aria-orientation":z(s)?`vertical`:`horizontal`,"aria-valuenow":e,"aria-valuemin":z(d),"aria-valuemax":z(f),"aria-controls":a.paneDefs[o]?.id,"aria-disabled":n()||void 0,class:`sui resizable-handle ${t.class??``??``}`,onpointerdown:x,onkeydown:S,onblur:C,[bs]:{horizontal:z(s),vertical:!z(s),disabled:n(),dragging:z(m)}}),[()=>Math.round(z(l))],void 0,void 0,`svelte-1brsyrn`);var T=F(w),ee=e=>{var n=V();Co(I(n),()=>t.children),H(e,n)},te=e=>{H(e,FR())};W(T,e=>{t.children?e(ee):r()&&e(te,1)}),D(w),Rs(w,e=>P(p,e),()=>z(p)),H(e,w),k()}var PR,FR,IR,LR,fce=o((()=>{Z(),J(),X(),rc(),PR=new Set([`$$slots`,`$$events`,`$$legacy`,`disabled`,`showHandleBar`,`class`,`children`,`onResizeStart`,`onResizeEnd`]),FR=B(`<div role="none" class="handle-bar svelte-1brsyrn"></div>`),IR=B(`<div><!></div>`),LR={hash:`svelte-1brsyrn`,code:`.resizable-handle.svelte-1brsyrn {position:relative;flex:0 0 auto;display:flex;align-items:center;justify-content:center;touch-action:none;outline-offset:0;background-color:transparent;transition:background-color 200ms;}.resizable-handle.svelte-1brsyrn:focus-visible, .resizable-handle.svelte-1brsyrn:hover, .resizable-handle.dragging.svelte-1brsyrn {outline:none;z-index:1;background-color:var(--sui-primary-accent-color-translucent);}.resizable-handle.svelte-1brsyrn:focus-visible .handle-bar:where(.svelte-1brsyrn), .resizable-handle.svelte-1brsyrn:hover .handle-bar:where(.svelte-1brsyrn), .resizable-handle.dragging.svelte-1brsyrn .handle-bar:where(.svelte-1brsyrn) {background-color:var(--sui-primary-accent-color);}.resizable-handle.disabled.svelte-1brsyrn {pointer-events:none;opacity:0.4;}.resizable-handle.horizontal.svelte-1brsyrn {width:var(--sui-resizable-handle-size, 4px);height:100%;cursor:col-resize;}.resizable-handle.horizontal.svelte-1brsyrn .handle-bar:where(.svelte-1brsyrn) {width:2px;height:40%;min-height:20px;}.resizable-handle.vertical.svelte-1brsyrn {width:100%;height:var(--sui-resizable-handle-size, 4px);cursor:row-resize;}.resizable-handle.vertical.svelte-1brsyrn .handle-bar:where(.svelte-1brsyrn) {height:2px;width:40%;min-width:20px;}.resizable-handle.svelte-1brsyrn .handle-bar:where(.svelte-1brsyrn) {border-radius:1px;background-color:hsl(var(--sui-border-color-1-hsl));transition:background-color 200ms;}`}}));function RR(e,t){O(t,!0),G(e,VR);let n=q(t,`direction`,3,`horizontal`),r=Gs(t,zR),i=br([]),a=N(void 0),o=br([]),s=br([]),c=0,l=()=>z(a)?n()===`horizontal`?z(a).clientWidth:z(a).clientHeight:0,u=(e,t)=>{if(typeof e==`number`)return e;if(!e||typeof e!=`string`)return t;let n=e.trim(),r=n.match(/^(-?\d+(?:\.\d+)?)%$/);if(r)return Number(r[1]);let i=l();if(!i)return t;let a=n.match(/^(-?\d+(?:\.\d+)?)px$/i);if(a)return Number(a[1])/i*100;let o=n.match(/^(-?\d+(?:\.\d+)?)(dvw|vw|dvh|vh)$/i);if(o){let e=Number(o[1]),t=o[2].toLowerCase().endsWith(`w`)?window.innerWidth:window.innerHeight;return e/100*t/i*100}return t},d=e=>{let t=i[e];if(!t)return{minSize:0,maxSize:100};let n=Math.max(0,u(t.minSize,0)),r=Math.min(100,u(t.maxSize,100));return{minSize:n,maxSize:Math.max(n,r)}},f=()=>{if(!i.length)return;let e=i.map(e=>e.defaultSize===void 0?NaN:u(e.defaultSize,NaN)),t=e.filter(e=>!Number.isNaN(e)).reduce((e,t)=>e+t,0),n=e.filter(e=>Number.isNaN(e)).length,r=Math.max(0,100-t),a=n>0?r/n:0,s=e.map(e=>Number.isNaN(e)?a:e);o.splice(0,o.length,...s)},p=(e,n)=>{let r=e,i=e+1;if(r<0||i>=o.length)return;let{minSize:a,maxSize:s}=d(r),{minSize:c,maxSize:l}=d(i),u=o[r],f=o[i],p=Math.min(s-u,f-c),m=Math.min(u-a,l-f),h=n>0?Math.min(n,p):-Math.min(-n,m);o[r]=u+h,o[i]=f-h,t.onResize?.({sizes:o.map(e=>Number(e.toFixed(1)))})};Rt(`paneGroup`,{get direction(){return n()},sizes:o,registerPane:({id:e,defaultSize:t,minSize:n,maxSize:r})=>{let a=i.length;return i.push({id:e,defaultSize:t,minSize:n,maxSize:r}),{index:a}},registerHandle:()=>{let e=c;return c+=1,e},resize:p,toggleCollapse:e=>{let{minSize:t}=d(e);if(s[e]!==void 0){let t=s[e]-o[e];s[e]=void 0,p(e,t)}else s[e]=o[e],p(e,-(o[e]-t))},getPaneConstraints:d,paneDefs:i}),Qr(()=>{i.length&&!o.length&&f()});var m=BR();_s(m,()=>({...r,role:`none`,class:`sui resizable-pane-group ${n()??``} ${t.class??``??``}`,"data-direction":n()}),void 0,void 0,void 0,`svelte-mcnbrd`),Co(F(m),()=>t.children??E),D(m),Rs(m,e=>P(a,e),()=>z(a)),H(e,m),k()}var zR,BR,VR,pce=o((()=>{Z(),J(),rc(),zR=new Set([`$$slots`,`$$events`,`$$legacy`,`direction`,`class`,`children`,`onResize`]),BR=B(`<div><!></div>`),VR={hash:`svelte-mcnbrd`,code:`.resizable-pane-group.svelte-mcnbrd {display:flex;overflow:hidden;}.resizable-pane-group.horizontal.svelte-mcnbrd {flex-direction:row;width:100%;height:100%;}.resizable-pane-group.vertical.svelte-mcnbrd {flex-direction:column;width:100%;height:100%;}`}}));function HR(e,t){let n=Ma();O(t,!0);let r=q(t,`defaultSize`,3,void 0),i=q(t,`minSize`,3,0),a=q(t,`maxSize`,3,100),o=Gs(t,UR),s=Lt(`paneGroup`);if(!s)throw Error(`<ResizablePane> must be used inside a <ResizablePaneGroup>`);let{index:c}=s.registerPane({id:n,defaultSize:r(),minSize:i(),maxSize:a()}),l=M(()=>s.direction),u=M(()=>s.sizes[c]),d=M(()=>z(u)===void 0?typeof r()==`number`?`${r()}%`:r()??`0%`:`${z(u)}%`);Qr(()=>{z(u)!==void 0&&zi(()=>t.onResize?.({size:Number(z(u).toFixed(1))}))});var f=WR();_s(f,()=>({...o,id:n,role:`none`,class:`sui resizable-pane ${t.class??``??``}`,[xs]:{"flex-basis":z(d),"flex-grow":`0`,"flex-shrink":`0`,"overflow-x":z(l)===`horizontal`?`auto`:void 0,"overflow-y":z(l)===`vertical`?`auto`:void 0}})),Co(F(f),()=>t.children??E),D(f),H(e,f),k()}var UR,WR,mce=o((()=>{Z(),J(),rc(),UR=new Set([`$$slots`,`$$events`,`$$legacy`,`defaultSize`,`minSize`,`maxSize`,`class`,`children`,`onResize`]),WR=B(`<div><!></div>`)}));function GR(e,t){O(t,!0),G(e,JR);let n=q(t,`itemChunkSize`,3,25),r=N(br(n())),i=N(void 0),a=M(()=>t.items.length>z(r)),o=new IntersectionObserver(([{isIntersecting:e}])=>{e&&(z(a)?P(r,z(r)+n()):o.disconnect())});Qr(()=>{z(i)&&o.observe(z(i))});var s=qR(),c=I(s);uo(c,19,()=>t.items.slice(0,z(r)),(e,n)=>e[t.itemKey]??n,(e,n,r)=>{var i=V();Co(I(i),()=>t.renderItem,()=>z(n),()=>z(r)),H(e,i)});var l=L(c,2),u=e=>{var t=KR();Rs(t,e=>P(i,e),()=>z(i)),H(e,t)};W(l,e=>{z(a)&&e(u)}),H(e,s),k()}var KR,qR,JR,hce=o((()=>{Z(),J(),KR=B(`<div role="none" class="spinner svelte-7svwka"></div>`),qR=B(`<!> <!>`,1),JR={hash:`svelte-7svwka`,code:`.spinner.svelte-7svwka {height:1px;}`}}));function YR(e,t){let n=Ma();O(t,!0),G(e,QR);let r=q(t,`value`,15),i=q(t,`flex`,3,!1),a=q(t,`hidden`,3,!1),o=q(t,`disabled`,3,!1),s=q(t,`readonly`,3,!1),c=q(t,`required`,3,!1),l=q(t,`invalid`,3,!1),u=Gs(t,XR),d=N(void 0);var f={focus:()=>{z(d)?.focus()}},p=ZR();let m;var h=F(p),g=F(h),_=e=>{var n=V();Co(I(n),()=>t.searchIcon),H(e,n)},v=e=>{oI(e,{name:`search`})};W(g,e=>{t.searchIcon?e(_):e(v,-1)}),D(h);var y=L(h,2);hL(y,Ks({dir:`auto`},()=>u,{role:`searchbox`,get id(){return n},get flex(){return i()},get hidden(){return a()},get disabled(){return o()},get readonly(){return s()},get required(){return c()},get invalid(){return l()},inputmode:`search`,get element(){return z(d)},set element(e){P(d,e,!0)},get value(){return r()},set value(e){r(e)}}));var b=L(y,2),x=e=>{{let i=e=>{var n=V(),r=I(n),i=e=>{var n=V();Co(I(n),()=>t.closeIcon),H(e,n)},a=e=>{oI(e,{name:`close`})};W(r,e=>{t.closeIcon?e(i):e(a,-1)}),H(e,n)},a=M(()=>Y(`_sui.clear`));wI(e,{iconic:!0,get"aria-label"(){return z(a)},get"aria-controls"(){return n},onclick:()=>{r(``),z(d)?.focus(),t.onClear?.()},startIcon:i,$$slots:{startIcon:!0}})}};return W(b,e=>{r()&&e(x)}),D(p),R(()=>{K(p,`role`,a()?void 0:`none`),m=as(p,1,`sui search-bar ${t.class??``}`,`svelte-pl0dk9`,m,{flex:i(),disabled:o(),readonly:s()}),K(p,`hidden`,a()),K(p,`aria-hidden`,a())}),H(e,p),k(f)}var XR,ZR,QR,$R=o((()=>{Z(),J(),X(),EI(),sI(),bL(),XR=new Set([`$$slots`,`$$events`,`$$legacy`,`value`,`flex`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`children`,`searchIcon`,`closeIcon`,`onClear`]),ZR=B(`<div><span role="none" class="svelte-pl0dk9"><!></span> <!> <!></div>`),QR={hash:`svelte-pl0dk9`,code:`.search-bar.svelte-pl0dk9 {display:inline-flex;align-items:center;position:relative;margin:var(--sui-focus-ring-width);min-width:var(--sui-textbox-singleline-min-width);}.search-bar.flex.svelte-pl0dk9:not([hidden]) {display:inline-flex;width:-moz-available;width:-webkit-fill-available;width:stretch;min-width:0;}.search-bar.svelte-pl0dk9 > span:where(.svelte-pl0dk9) {position:absolute;inset-block:0;inset-inline-start:0;inset-inline-end:auto;z-index:2;display:flex;align-items:center;justify-content:center;width:var(--sui-button-medium-height);height:var(--sui-button-medium-height);}.search-bar.svelte-pl0dk9 .icon {font-size:calc(var(--sui-textbox-height) * 0.6);opacity:0.5;}.search-bar.svelte-pl0dk9 > button {position:absolute;inset-block:0;inset-inline-start:auto;inset-inline-end:0;z-index:2;margin:0 !important;height:var(--sui-button-medium-height);}.search-bar.svelte-pl0dk9 .label {--sui-textbox-singleline-padding: 0 36px;}.search-bar.svelte-pl0dk9 .text-input {flex:auto;margin:0 !important;width:0;min-width:0 !important;}.search-bar.svelte-pl0dk9 input {z-index:1;padding:0 var(--sui-button-medium-height) !important;width:100%;}`}}));function gce(e,t){let n=Ma();O(t,!0),G(e,az);let r=`[role="option"][aria-selected="true"]`,i=q(t,`value`,15),a=q(t,`hidden`,3,!1),o=q(t,`disabled`,3,!1),s=q(t,`readonly`,3,!1),c=q(t,`required`,3,!1),l=q(t,`invalid`,3,!1),u=q(t,`editable`,3,!0),d=q(t,`position`,3,`bottom-left`),f=q(t,`filterThreshold`,3,5),p=Gs(t,ez),m=N(!1),h=N(void 0),g=N(void 0),_=N(void 0),v=N(``),y=N(!1),b=N(``),x=N(!0),S=M(()=>z(h)??z(g)),C=()=>{let e=z(_)?.querySelector(`[role="option"][data-value="${i()}"]`);e&&(P(v,e.dataset.label||e.dataset.value||e.textContent||``,!0),e.getAttribute(`aria-selected`)!==`true`&&(z(_)?.querySelector(r)?.setAttribute(`aria-selected`,`false`),e.setAttribute(`aria-selected`,`true`)))},w=e=>{let n=OI(e);i(n.value),C(),t.onChange?.(new CustomEvent(`Change`,{detail:n}))};Qr(()=>{z(_)&&globalThis.requestAnimationFrame(()=>{let e=z(_)?.querySelector(r);e&&w(e)})}),Qr(()=>{i(),C()});var T=iz(),ee=I(T);_s(ee,()=>({...p,role:`none`,class:`sui combobox ${t.class??``}`,hidden:a(),[bs]:{editable:u()}}),void 0,void 0,void 0,`svelte-1beomus`);var te=F(ee),ne=e=>{var t=tz();_s(t,()=>({...p,role:`combobox`,id:n,tabindex:o()?-1:0,"aria-controls":`${n}-popup`,"aria-expanded":z(m),"aria-hidden":a(),"aria-disabled":o(),"aria-readonly":s(),"aria-required":c(),"aria-invalid":l(),"aria-haspopup":`listbox`,[bs]:{selected:i()!==void 0}}),void 0,void 0,void 0,`svelte-1beomus`);var r=F(t);mI(F(r),{children:(e,t)=>{gt();var n=ja();R(e=>U(n,e),[()=>i()===void 0?Y(`_sui.combobox.select_an_option`):z(v)]),H(e,n)},$$slots:{default:!0}}),D(r),D(t),Rs(t,e=>P(h,e),()=>z(h)),H(e,t)},re=e=>{{let t=M(()=>i()===void 0?``:String(i()));hL(e,Ks(()=>p,{dir:`auto`,role:`combobox`,get id(){return n},get value(){return z(t)},get hidden(){return a()},get disabled(){return o()},get readonly(){return s()},get required(){return c()},get invalid(){return l()},get"aria-controls"(){return`${n}-popup`},get"aria-expanded"(){return z(m)},"aria-haspopup":`listbox`,get element(){return z(g)},set element(e){P(g,e,!0)}}))}};W(te,e=>{u()?e(re,-1):e(ne)});var ie=L(te,2);{let e=e=>{var n=V(),r=I(n),i=e=>{var n=V();Co(I(n),()=>t.chevronIcon),H(e,n)},a=e=>{oI(e,{name:`expand_more`})};W(r,e=>{t.chevronIcon?e(i):e(a,-1)}),H(e,n)},r=M(()=>!u()||s()||o()?-1:0),i=M(()=>z(m)?Y(`_sui.collapse`):Y(`_sui.expand`));wI(ie,{variant:`ghost`,iconic:!0,get hidden(){return a()},get disabled(){return o()},get tabindex(){return z(r)},get"aria-label"(){return z(i)},get"aria-controls"(){return`${n}-popup`},get"aria-expanded"(){return z(m)},onclick:e=>{e.preventDefault(),e.stopPropagation(),!o()&&!s()&&P(m,!z(m))},startIcon:e,$$slots:{startIcon:!0}})}D(ee),SI(L(ee,2),{get id(){return`${n}-popup`},class:`combobox`,get anchor(){return z(S)},get position(){return d()},touchOptimized:!0,onOpen:()=>{P(y,f()===-1?!1:(z(_)?.querySelectorAll(`[role="option"]`)?.length??0)>f(),!0),P(b,``)},get content(){return z(_)},set content(e){P(_,e,!0)},get open(){return z(m)},set open(e){P(m,e,!0)},children:(e,r)=>{var i=rz(),a=F(i),o=e=>{{let t=M(()=>Y(`_sui.combobox.filter_options`));YR(e,{flex:!0,get"aria-label"(){return z(t)},get"aria-controls"(){return`${n}-listbox`},onkeydown:e=>{[`ArrowUp`,`ArrowDown`,`Enter`].includes(e.key)&&(e.preventDefault(),z(_)?.querySelector(`.sui.listbox`)?.dispatchEvent(new KeyboardEvent(`keydown`,e)))},get value(){return z(b)},set value(e){P(b,e,!0)}})}};W(a,e=>{z(y)&&e(o)});var s=L(a,2);UL(s,{get id(){return`${n}-listbox`},class:`in-combobox`,get searchTerms(){return z(b)},onclick:e=>{e.target.matches(`[role="option"]`)&&w(e.target)},onFilter:e=>{P(x,!!e.detail.matched)},children:(e,n)=>{var r=V();Co(I(r),()=>t.children??E),H(e,r)},$$slots:{default:!0}});var c=L(s,2),l=e=>{var t=nz(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>Y(`_sui.combobox.no_matching_options`)]),H(e,t)};W(c,e=>{z(x)||e(l)}),D(i),H(e,i)},$$slots:{default:!0}}),H(e,T),k()}var ez,tz,nz,rz,iz,az,oz=o((()=>{Z(),J(),X(),Nse(),EI(),sI(),qL(),$R(),bL(),hI(),CI(),ez=new Set([`$$slots`,`$$events`,`$$legacy`,`value`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`editable`,`position`,`filterThreshold`,`children`,`chevronIcon`,`onChange`]),tz=B(`<div><div role="none" class="label svelte-1beomus"><!></div></div>`),nz=B(`<div role="alert" class="no-options svelte-1beomus"> </div>`),rz=B(`<div role="none" class="combobox-inner svelte-1beomus"><!> <!> <!></div>`),iz=B(`<div><!> <!></div> <!>`,1),az={hash:`svelte-1beomus`,code:`.combobox.svelte-1beomus {margin:var(--sui-focus-ring-width);display:flex;align-items:center;position:relative;min-width:var(--sui-combobox-min-width, calc(var(--sui-option-height) * 5));}.combobox.svelte-1beomus div[role=combobox]:where(.svelte-1beomus) {display:flex;align-items:center;border-width:1px;border-color:var(--sui-control-border-color);border-radius:var(--sui-textbox-border-radius);padding-block:0;padding-inline-start:calc(var(--sui-textbox-height) / 4);padding-inline-end:var(--sui-textbox-height);width:100%;height:var(--sui-textbox-height);color:var(--sui-control-foreground-color);background-color:var(--sui-disabled-background-color);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);-webkit-user-select:none;user-select:none;cursor:pointer;transition:all 200ms;}.combobox.svelte-1beomus div[role=combobox]:where(.svelte-1beomus):not(.selected) {font-style:italic;}.combobox.svelte-1beomus div[role=combobox]:where(.svelte-1beomus):is(:where(.svelte-1beomus):hover, :where(.svelte-1beomus):focus) {background-color:var(--sui-hover-background-color);}.combobox.svelte-1beomus div[role=combobox][aria-invalid=true]:where(.svelte-1beomus) {border-color:var(--sui-error-border-color);}.combobox.svelte-1beomus div[role=combobox]:where(.svelte-1beomus) .label:where(.svelte-1beomus) {width:100%;}.combobox.svelte-1beomus .icon {font-size:var(--sui-font-size-xx-large);opacity:0.5;}.combobox.svelte-1beomus > .icon {position:absolute;inset-block-start:8px;inset-inline-start:8px;z-index:1;}.combobox.svelte-1beomus > button {position:absolute;inset-block-start:0;inset-inline-end:0;z-index:1;margin:0 !important;border-start-start-radius:0;border-end-start-radius:0;background-color:transparent !important;}.combobox.svelte-1beomus > button[tabindex="-1"] {pointer-events:none;}.combobox.svelte-1beomus :not(.editable) > button {background-color:transparent !important;}.combobox.svelte-1beomus .text-input {margin:0 !important;width:100% !important;}.combobox.svelte-1beomus input {padding-block:0;padding-inline:8px 32px;width:0;}.combobox.svelte-1beomus + [role=listbox] {position:fixed;z-index:100;border-radius:var(--sui-control-medium-border-radius);box-shadow:0 8px 16px var(--sui-popup-shadow-color);overflow:auto;background-color:var(--sui-secondary-background-color);-webkit-backdrop-filter:blur(32px);backdrop-filter:blur(32px);
667
- /* Add .1s delay before the position can be determined */transition:opacity 100ms 100ms;}.combobox.svelte-1beomus + [role=listbox]:not(.open) {opacity:0;pointer-events:none;}.combobox-inner.svelte-1beomus {display:flex;flex-direction:column;overflow:hidden;}.combobox-inner.svelte-1beomus .sui.search-bar {flex:none;}.combobox-inner.svelte-1beomus .sui.listbox {flex:auto;overflow-y:auto;}.combobox-inner.svelte-1beomus .no-options:where(.svelte-1beomus) {flex:none;display:flex;align-items:center;padding:var(--sui-option-padding);height:var(--sui-option-height);color:var(--sui-tertiary-foreground-color);}`}}));function _ce(e){let t=e-1;return t*t*t+1}var vce=o((()=>{}));function yce(e,{from:t,to:n},r={}){var{delay:i=0,duration:a=e=>Math.sqrt(e)*120,easing:o=_ce}=r,s=getComputedStyle(e),c=s.transform===`none`?``:s.transform,[l,u]=s.transformOrigin.split(` `).map(parseFloat);l/=e.clientWidth,u/=e.clientHeight;var d=bce(e),f=e.clientWidth/n.width/d,p=e.clientHeight/n.height/d,m=t.left+t.width*l,h=t.top+t.height*u,g=n.left+n.width*l,_=n.top+n.height*u,v=(m-g)*f,y=(h-_)*p,b=t.width/n.width,x=t.height/n.height;return{delay:i,duration:typeof a==`function`?a(Math.sqrt(v*v+y*y)):a,easing:o,css:(e,t)=>`transform: ${c} translate(${t*v}px, ${t*y}px) scale(${e+t*b}, ${e+t*x});`}}function bce(e){if(`currentCSSZoom`in e)return e.currentCSSZoom;for(var t=e,n=1;t!==null;)n*=+getComputedStyle(t).zoom,t=t.parentElement;return n}var xce=o((()=>{vce()}));function sz(e,t){O(t,!0);let n=q(t,`value`,15),r=q(t,`hidden`,3,!1),i=q(t,`disabled`,3,!1),a=q(t,`readonly`,3,!1),o=q(t,`required`,3,!1),s=q(t,`invalid`,3,!1),c=Gs(t,cz);gce(e,Ks(()=>c,{get class(){return`sui select ${t.class??``}`},get hidden(){return r()},get disabled(){return i()},get readonly(){return a()},get required(){return o()},get invalid(){return s()},get onChange(){return t.onChange},editable:!1,get value(){return n()},set value(e){n(e)},children:(e,n)=>{var r=V();Co(I(r),()=>t.children??E),H(e,r)},$$slots:{default:!0}})),k()}var cz,lz=o((()=>{Z(),J(),oz(),cz=new Set([`$$slots`,`$$events`,`$$legacy`,`value`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`children`,`onChange`])}));function Sce(e,t){O(t,!0),G(e,pz);let n=q(t,`values`,31,()=>br([])),r=q(t,`max`,3,void 0),i=q(t,`hidden`,3,!1),a=q(t,`disabled`,3,!1),o=q(t,`readonly`,3,!1),s=q(t,`required`,3,!1),c=q(t,`invalid`,3,!1),l=Gs(t,uz),u=M(()=>new Map(t.options.map(e=>[e.value,e]))),d=M(()=>Lh()?`ArrowRight`:`ArrowLeft`),f=M(()=>Lh()?`ArrowLeft`:`ArrowRight`),p=N(void 0),m=N(void 0),h=N(void 0),g=N(void 0),_=(e,r)=>{if(e===r)return;let i=[...n()],[a]=i.splice(e,1);i.splice(r,0,a),n(i),t.onReorder?.(new CustomEvent(`Reorder`,{detail:{values:i}}))},v=async(e,t)=>{_(e,t),await Ii(),(z(p)?.querySelectorAll(`.label[tabindex]`)?.[t])?.focus()};var y=fz();let b;var x=F(y);uo(x,30,n,e=>e,(e,r,i)=>{let s=M(()=>z(u).get(r)),c=M(()=>z(s)?.label||z(s)?.value||r);var l=dz();let p;var m=F(l),_=F(m,!0);D(m);var y=L(m,2),b=e=>{{let i=e=>{oI(e,{name:`close`})},s=M(()=>a()||o()),l=M(()=>Y(`_sui.select_tags.remove_x`,{values:{name:z(c)}}));wI(e,{iconic:!0,size:`small`,get disabled(){return z(s)},get"aria-label"(){return z(l)},onclick:()=>{n(n().filter(e=>e!==r)),t.onRemoveValue?.(new CustomEvent(`RemoveValue`,{detail:{value:r}}))},startIcon:i,$$slots:{startIcon:!0}})}};W(y,e=>{z(s)&&e(b)}),D(l),R(()=>{K(l,`draggable`,!a()&&!o()),p=as(l,1,`svelte-13gi5dp`,null,p,{"drag-source":z(h)===z(i),"drop-before":z(g)===z(i)&&z(h)!==z(i)&&z(h)!==z(i)-1,"drop-after":z(g)===n().length&&z(i)===n().length-1&&z(h)!==n().length-1}),K(m,`tabindex`,a()||o()?void 0:0),U(_,z(c))}),_a(`dragstart`,l,e=>{P(h,z(i),!0),e.dataTransfer&&(e.dataTransfer.setData(`text/plain`,z(c)),e.dataTransfer.effectAllowed=`move`)}),_a(`dragover`,l,e=>{e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`move`);let t=e.currentTarget.getBoundingClientRect(),n=e.clientX<t.left+t.width/2;P(g,n===Lh()?z(i)+1:z(i),!0)}),_a(`drop`,l,async e=>{e.preventDefault();let t=z(h),n=z(g);P(h,void 0),P(g,void 0),t!==void 0&&n!==void 0&&n!==t&&n!==t+1&&await v(t,n>t?n-1:n)}),_a(`dragend`,l,()=>{P(h,void 0),P(g,void 0)}),va(`keydown`,m,async e=>{let{key:t}=e,r=t===z(d)&&z(i)>0?z(i)-1:t===z(f)&&z(i)<n().length-1?z(i)+1:t===`Home`&&z(i)>0?0:t===`End`&&z(i)<n().length-1?n().length-1:-1;r!==-1&&(e.preventDefault(),await v(z(i),r))}),Io(l,()=>yce,()=>({duration:200})),H(e,l)}),D(x);var S=L(x,2),C=e=>{{let r=M(()=>a()||o());sz(e,Ks(()=>l,{get disabled(){return z(r)},get readonly(){return o()},get required(){return s()},get invalid(){return c()},onChange:()=>{z(m)&&(n([...n(),z(m)]),t.onAddValue?.(new CustomEvent(`AddValue`,{detail:{value:z(m)}})),P(m,void 0))},get value(){return z(m)},set value(e){P(m,e,!0)},children:(e,r)=>{var i=V();uo(I(i),17,()=>t.options,({label:e,value:t,searchValue:n})=>t,(e,t)=>{let r=()=>z(t).label,i=()=>z(t).value,a=()=>z(t).searchValue;var o=V(),s=I(o),c=e=>{QL(e,{get label(){return r()},get value(){return i()},get searchValue(){return a()}})},l=M(()=>!n().includes(i()));W(s,e=>{z(l)&&e(c)}),H(e,o)}),H(e,i)},$$slots:{default:!0}}))}};W(S,e=>{(typeof r()!=`number`||n().length<r())&&n().length<t.options.length&&e(C)}),D(y),Rs(y,e=>P(p,e),()=>z(p)),R(e=>{b=as(y,1,`sui select-tags ${t.class??``}`,`svelte-13gi5dp`,b,{disabled:a()||o()}),K(y,`hidden`,i()),K(x,`aria-label`,e)},[()=>Y(`_sui.select_tags.selected_options`)]),H(e,y),k()}var uz,dz,fz,pz,Cce=o((()=>{Z(),J(),X(),rc(),xce(),EI(),sI(),rR(),lz(),uz=new Set([`$$slots`,`$$events`,`$$legacy`,`values`,`options`,`max`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`children`,`onAddValue`,`onRemoveValue`,`onReorder`]),dz=B(`<span role="none"><span class="label svelte-13gi5dp" role="option" aria-selected="true"> </span> <!></span>`),fz=B(`<div role="none"><span role="listbox" aria-multiselectable="true" class="svelte-13gi5dp"></span> <!></div>`),pz={hash:`svelte-13gi5dp`,code:`.select-tags.svelte-13gi5dp {display:flex;flex-wrap:wrap;align-items:center;}.select-tags.disabled.svelte-13gi5dp {pointer-events:none;}.select-tags.disabled.svelte-13gi5dp > :where(.svelte-13gi5dp) {opacity:0.5;}.select-tags.svelte-13gi5dp span[role=listbox]:where(.svelte-13gi5dp) {display:contents;}.select-tags.svelte-13gi5dp span[draggable]:where(.svelte-13gi5dp) {display:inline-flex;align-items:center;position:relative;margin:var(--sui-focus-ring-width);padding:0;padding-inline-start:8px;border-radius:var(--sui-control-medium-border-radius);background-color:var(--sui-secondary-background-color);cursor:grab;outline:none;}.select-tags.svelte-13gi5dp span[draggable]:where(.svelte-13gi5dp):focus-within {outline:var(--sui-focus-ring-width) solid var(--sui-primary-accent-color-translucent);outline-offset:1px;}.select-tags.svelte-13gi5dp span[draggable].drag-source:where(.svelte-13gi5dp) {opacity:0.4;cursor:grabbing;}.select-tags.svelte-13gi5dp span[draggable].drop-before:where(.svelte-13gi5dp)::before, .select-tags.svelte-13gi5dp span[draggable].drop-after:where(.svelte-13gi5dp)::after {content:"";position:absolute;top:0;bottom:0;margin-left:-1px;border-radius:1px;width:4px;background-color:var(--sui-primary-accent-color);pointer-events:none;}.select-tags.svelte-13gi5dp span[draggable].drop-before:where(.svelte-13gi5dp)::before {inset-inline-start:calc(-1 * var(--sui-focus-ring-width) - 1px);}.select-tags.svelte-13gi5dp span[draggable].drop-after:where(.svelte-13gi5dp)::after {inset-inline-end:calc(-1 * var(--sui-focus-ring-width) - 1px);}.select-tags.svelte-13gi5dp span[draggable]:where(.svelte-13gi5dp) .label:where(.svelte-13gi5dp) {outline:none;}.select-tags.svelte-13gi5dp span[draggable]:where(.svelte-13gi5dp) .icon {font-size:var(--sui-font-size-large);}`},ya([`keydown`])}));function wce(e,t){O(t,!0),G(e,vz);let n=q(t,`value`,15,0),r=q(t,`min`,3,0),i=q(t,`max`,3,100),a=q(t,`sliderLabel`,3,``),o=q(t,`values`,15,void 0),s=q(t,`sliderLabels`,3,void 0),c=q(t,`step`,3,1),l=q(t,`optionLabels`,19,()=>[]),u=q(t,`hidden`,3,!1),d=q(t,`disabled`,3,!1),f=q(t,`readonly`,3,!1),p=q(t,`invalid`,3,!1),m=Gs(t,mz),h=M(()=>Array.isArray(o())),g=N(void 0),_=N(0),v=N(br([])),y=N(br([])),b=N(0),x=N(0),S=br([0,0]),C=N(!1),w=N(0),T=N(0),ee=e=>{let t=Lh()?z(_)-e:e;if(t<0||t>z(_))return;let r=z(v).findLastIndex(e=>e<=t),i=z(v).findIndex(e=>t<=e),a=Math.abs(z(v)[r]-t)<Math.abs(z(v)[i]-t)?r:i;S[z(T)]===z(v)[a]||z(h)&&(z(T)===0&&S[1]<=z(v)[a]||z(T)===1&&S[0]>=z(v)[a])||(z(h)?(o(o()[z(T)]=z(y)[a],!0),o([...o()])):n(z(y)[a]))},te=(e,t=0)=>{let{key:a,ctrlKey:s,metaKey:c,shiftKey:l,altKey:u}=e,p=l||u||s||c;if(d()||f()||p)return;let m=z(h)?o()[t]:n(),g=-1,_=Lh(),b=_?[`ArrowDown`,`ArrowRight`]:[`ArrowDown`,`ArrowLeft`],x=_?[`ArrowUp`,`ArrowLeft`]:[`ArrowUp`,`ArrowRight`];if(b.includes(a)&&(m>r()&&(g=z(y).indexOf(m)-1),e.preventDefault(),e.stopPropagation()),x.includes(a)&&(m<i()&&(g=z(y).indexOf(m)+1),e.preventDefault(),e.stopPropagation()),g>-1){if(z(h)&&(t===0&&S[1]<=z(v)[g]||t===1&&S[0]>=z(v)[g]))return;z(h)?(o(o()[t]=z(y)[g],!0),o([...o()])):n(z(y)[g])}},ne=e=>{let{screenX:t,pointerId:n}=e;if(d()||f()||!z(C)||n!==z(w))return;e.stopPropagation();let r=t-z(x),i=z(b)+r;ee(i)},re=e=>{let{pointerId:t}=e;if(!(d()||f()||!z(C)||t!==z(w))){if(e.stopPropagation(),e.target.matches(`.base-bar, .slider-bar`)){let t=z(g).getBoundingClientRect(),n=e.clientX-t.left;ee(n)}P(C,!1),P(b,0),P(x,0),P(w,0),P(T,0),document.removeEventListener(`pointermove`,ne),document.removeEventListener(`pointerup`,re),document.removeEventListener(`pointercancel`,re)}},ie=(e,t=0)=>{let{clientX:n,screenX:r,pointerId:i}=e;if(d()||f())return;e.stopPropagation(),P(C,!0);let a=z(g).getBoundingClientRect();P(b,n-a.left),P(x,r,!0),P(w,i,!0),P(T,t,!0),document.addEventListener(`pointermove`,ne),document.addEventListener(`pointerup`,re),document.addEventListener(`pointercancel`,re)},ae=()=>{if(z(h)){let[e,n]=o();S[0]=z(v)[z(y).indexOf(e)],S[1]=z(v)[z(y).indexOf(n)],t.onChange?.({values:o()})}else S[0]=z(v)[z(y).indexOf(n())],t.onChange?.({value:n()})},oe=()=>{if(!z(g))return;P(_,z(g).clientWidth,!0);let e=(i()-r())/c()+1,t=z(_)/(e-1),n=Array.from({length:e});P(y,n.map((e,t)=>t*c()+r(),10),!0),P(v,n.map((e,n)=>n*t),!0),ae()};tc(()=>{let e=new ResizeObserver(()=>oe()),t=globalThis.matchMedia(`(pointer: coarse)`);return e.observe(z(g)),t.addEventListener(`change`,oe),oe(),()=>{e.disconnect(),t.removeEventListener(`change`,oe)}}),Qr(()=>{n(),o(),ae()});var se=_z();_a(`click`,Pr.body,()=>{P(C,!1)}),_s(se,()=>({...m,role:`none`,class:`sui slider ${t.class??``}`,hidden:u(),[bs]:{disabled:d(),readonly:f(),invalid:p()}}),void 0,void 0,void 0,`svelte-1hxhj75`);var ce=F(se),le=L(F(ce),2);let ue;var de=L(le,2);let E;var fe=L(de,2),pe=e=>{var t=hz();let n;R(()=>{K(t,`tabindex`,d()?-1:0),K(t,`aria-label`,s()?.[1]),K(t,`aria-hidden`,u()),K(t,`aria-disabled`,d()),K(t,`aria-readonly`,f()),K(t,`aria-invalid`,p()),K(t,`aria-valuemin`,r()),K(t,`aria-valuemax`,i()),K(t,`aria-valuenow`,o()?.[1]),n=cs(t,``,n,{"inset-inline-start":`${S[1]??``}px`})}),va(`pointerdown`,t,e=>ie(e,1)),va(`keydown`,t,e=>te(e,1)),H(e,t)};W(fe,e=>{z(h)&&e(pe)});var me=L(fe,2),he=e=>{var t=V();uo(I(t),19,l,(e,t)=>`${t}-${e}`,(e,t,n)=>{var r=gz();let i;var a=F(r,!0);D(r),R(()=>{i=cs(r,``,i,{"inset-inline-start":`${z(_)/(l().length-1)*z(n)}px`}),U(a,z(t))}),H(e,r)}),H(e,t)};W(me,e=>{l().length&&e(he)}),D(ce),Rs(ce,e=>P(g,e),()=>z(g)),D(se),R(()=>{ue=cs(le,``,ue,{"inset-inline-start":`${(z(h)?S[0]:0)??``}px`,width:`${(z(h)?S[1]-S[0]:S[0])??``}px`}),K(de,`tabindex`,d()?-1:0),K(de,`aria-label`,z(h)?s()?.[0]:a()),K(de,`aria-hidden`,u()),K(de,`aria-disabled`,d()),K(de,`aria-readonly`,f()),K(de,`aria-invalid`,p()),K(de,`aria-valuemin`,r()),K(de,`aria-valuemax`,i()),K(de,`aria-valuenow`,z(h)?o()?.[0]:n()),E=cs(de,``,E,{"inset-inline-start":`${S[0]??``}px`})}),va(`pointerdown`,ce,e=>ie(e)),va(`pointerdown`,de,e=>ie(e,0)),va(`keydown`,de,e=>te(e,0)),H(e,se),k()}var mz,hz,gz,_z,vz,Tce=o((()=>{Z(),J(),X(),rc(),mz=new Set([`$$slots`,`$$events`,`$$legacy`,`value`,`min`,`max`,`sliderLabel`,`values`,`sliderLabels`,`step`,`optionLabels`,`class`,`hidden`,`disabled`,`readonly`,`invalid`,`children`,`onChange`]),hz=B(`<div role="slider" class="svelte-1hxhj75"></div>`),gz=B(`<span role="none" class="label svelte-1hxhj75"> </span>`),_z=B(`<div><div role="none" class="base svelte-1hxhj75"><div role="none" class="base-bar svelte-1hxhj75"></div> <div class="slider-bar svelte-1hxhj75"></div> <div role="slider" class="svelte-1hxhj75"></div> <!> <!></div></div>`),vz={hash:`svelte-1hxhj75`,code:`.slider.svelte-1hxhj75 {position:relative;display:inline-block;margin:var(--sui-focus-ring-width);padding:4px 6px;touch-action:none;}.slider.svelte-1hxhj75:hover .base-bar:where(.svelte-1hxhj75) {background-color:var(--sui-hover-background-color);}.slider.svelte-1hxhj75:active .base-bar:where(.svelte-1hxhj75) {background-color:var(--sui-active-background-color);}.base.svelte-1hxhj75 {position:relative;width:var(--sui-slider-base-width, 240px);height:calc(var(--sui-checkbox-height) / 2);cursor:pointer;}.base-bar.svelte-1hxhj75 {border-width:1px;border-style:solid;border-color:var(--sui-control-border-color);border-radius:var(--sui-checkbox-height);background-color:var(--sui-slider-background-color, var(--sui-secondary-background-color));transition:all 200ms;width:100%;height:100%;}.slider-bar.svelte-1hxhj75 {position:absolute;top:0;height:calc(var(--sui-checkbox-height) / 2);border-radius:var(--sui-checkbox-height);background-color:var(--sui-primary-accent-color-light);}.invalid.svelte-1hxhj75 .slider-bar:where(.svelte-1hxhj75) {background-color:var(--sui-error-border-color);}[role=slider].svelte-1hxhj75 {position:absolute;top:0;border:3px solid var(--sui-primary-accent-color-light);border-radius:var(--sui-checkbox-height);width:calc(var(--sui-checkbox-height) - 2px);height:calc(var(--sui-checkbox-height) - 2px);background-color:var(--sui-primary-accent-color-inverted);cursor:pointer;}[role=slider].svelte-1hxhj75:dir(ltr) {transform:translate(calc((var(--sui-checkbox-height) / 2 - 1px) * -1), calc((var(--sui-checkbox-height) / 4 - 1px) * -1));}[role=slider].svelte-1hxhj75:dir(rtl) {transform:translate(calc(var(--sui-checkbox-height) / 2 - 1px), calc((var(--sui-checkbox-height) / 4 - 1px) * -1));}.invalid.svelte-1hxhj75 [role=slider]:where(.svelte-1hxhj75) {border-color:var(--sui-error-border-color);}.label.svelte-1hxhj75 {position:absolute;top:calc(var(--sui-checkbox-height) / 2 + 8px);font-size:var(--sui-font-size-x-small);}.label.svelte-1hxhj75:dir(ltr) {transform:translateX(-50%);}.label.svelte-1hxhj75:dir(rtl) {transform:translateX(50%);}`},ya([`pointerdown`,`keydown`])}));function yz(e,t){O(t,!0),G(e,Sz);let n=q(t,`checked`,15),r=q(t,`label`,3,void 0),i=q(t,`hidden`,3,!1),a=q(t,`disabled`,3,!1),o=q(t,`readonly`,3,!1),s=q(t,`required`,3,!1),c=q(t,`invalid`,3,!1),l=Gs(t,bz);var u=xz(),d=()=>{!a()&&!o()&&(n(!n()),t.onChange?.(new CustomEvent(`Change`,{detail:{checked:n()}})))};_s(u,()=>({...l,role:`switch`,class:`sui switch ${t.class??``}`,type:`button`,hidden:i(),disabled:a()||void 0,"aria-checked":n(),"aria-hidden":i(),"aria-disabled":a(),"aria-readonly":o(),"aria-required":s(),"aria-invalid":c(),onclick:d}),void 0,void 0,void 0,`svelte-tykb03`);var f=L(F(u),2),p=e=>{var t=ja();R(()=>U(t,r())),H(e,t)},m=e=>{var n=V();Co(I(n),()=>t.children??E),H(e,n)};W(f,e=>{r()?e(p):e(m,-1)}),D(u),H(e,u),k()}var bz,xz,Sz,Ece=o((()=>{Z(),J(),bz=new Set([`$$slots`,`$$events`,`$$legacy`,`checked`,`label`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`children`,`onChange`]),xz=B(`<button><span role="none" class="svelte-tykb03"></span> <!></button>`),Sz={hash:`svelte-tykb03`,code:`button.svelte-tykb03 {display:inline-flex;align-items:center;gap:8px;margin:var(--sui-focus-ring-width);border-width:0;border-style:solid;border-color:transparent;padding:0;color:var(--sui-control-foreground-color);background-color:transparent;box-shadow:none;font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);font-weight:var(--sui-font-weight-normal, normal);text-align:start;cursor:pointer;-webkit-user-select:none;user-select:none;}button[aria-invalid=true].svelte-tykb03 span:where(.svelte-tykb03) {background-color:var(--sui-error-border-color) !important;}button:hover[aria-checked=false].svelte-tykb03 span:where(.svelte-tykb03) {background-color:var(--sui-hover-background-color);}button:hover[aria-checked=true].svelte-tykb03 span:where(.svelte-tykb03) {background-color:var(--sui-primary-accent-color-light);}button:active[aria-checked=false].svelte-tykb03 span:where(.svelte-tykb03) {background-color:var(--sui-active-background-color);}button:active[aria-checked=true].svelte-tykb03 span:where(.svelte-tykb03) {background-color:var(--sui-primary-accent-color-dark);}button.svelte-tykb03:focus-visible {outline:0;}button.svelte-tykb03:focus-visible span:where(.svelte-tykb03) {outline-color:var(--sui-primary-accent-color-translucent);}button[aria-checked=true].svelte-tykb03 span:where(.svelte-tykb03) {background-color:var(--sui-primary-accent-color);border-color:transparent;}button[aria-checked=true].svelte-tykb03 span:where(.svelte-tykb03)::before {--translateX: var(--sui-checkbox-height) * 2 - var(--sui-checkbox-height);border-color:var(--sui-primary-accent-color);background-color:var(--sui-primary-accent-color-inverted);}button[aria-checked=true].svelte-tykb03 span:where(.svelte-tykb03):dir(ltr)::before {transform:translateX(calc(var(--translateX)));}button[aria-checked=true].svelte-tykb03 span:where(.svelte-tykb03):dir(rtl)::before {transform:translateX(calc((var(--translateX)) * -1));}span.svelte-tykb03 {position:relative;width:calc(var(--sui-checkbox-height) * 2);height:var(--sui-checkbox-height);padding:0 2px;display:inline-flex;align-items:center;border-width:1.5px;border-style:solid;border-color:var(--sui-checkbox-border-color);border-radius:var(--sui-checkbox-height);background-color:var(--sui-control-background-color);transition:all 200ms;}span.svelte-tykb03::before {display:inline-block;width:calc(var(--sui-checkbox-height) - 6px);height:calc(var(--sui-checkbox-height) - 6px);border-radius:var(--sui-checkbox-height);background-color:var(--sui-checkbox-border-color);transition:all 200ms;content:"";}`}}));function Cz(e,t){G(e,Ez);let n=Gs(t,wz);var r=Tz();_s(r,()=>({...n,role:`cell`,class:`sui table-cell ${t.class??``}`}),void 0,void 0,void 0,`svelte-arqo9o`),Co(F(r),()=>t.children??E),D(r),H(e,r)}var wz,Tz,Ez,Dce=o((()=>{Z(),J(),wz=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`children`]),Tz=B(`<div><!></div>`),Ez={hash:`svelte-arqo9o`,code:`.table-cell.svelte-arqo9o {display:table-cell;}`}}));function Oce(e,t){G(e,kz);let n=Gs(t,Dz);var r=Oz();_s(r,()=>({...n,role:`row`,class:`sui table-row ${t.class??``}`}),void 0,void 0,void 0,`svelte-19b5rac`),Co(F(r),()=>t.children??E),D(r),H(e,r)}var Dz,Oz,kz,kce=o((()=>{Z(),J(),Dz=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`children`]),Oz=B(`<div><!></div>`),kz={hash:`svelte-19b5rac`,code:`.table-row.svelte-19b5rac {display:table-row;height:var(--sui-primary-row-height);}`}}));function Ace(e,t){G(e,Mz);let n=Gs(t,Az);var r=jz();_s(r,()=>({...n,role:`table`,class:`sui table ${t.class??``}`}),void 0,void 0,void 0,`svelte-174a8nh`),Co(F(r),()=>t.children??E),D(r),H(e,r)}var Az,jz,Mz,jce=o((()=>{Z(),J(),Az=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`children`]),jz=B(`<div><!></div>`),Mz={hash:`svelte-174a8nh`,code:`.table.svelte-174a8nh {display:table;margin:var(--sui-focus-ring-width);width:calc(100% - var(--sui-focus-ring-width) * 2);}.table.data.svelte-174a8nh {border-collapse:collapse;}.table.data.svelte-174a8nh :is(.table-col-header, .table-row-header, .table-cell) {border:1px solid var(--sui-secondary-border-color);padding:8px 8px;}`}}));function Mce(e,t){O(t,!0),G(e,Fz);let n=q(t,`hidden`,3,!1),r=q(t,`disabled`,3,!1),i=q(t,`orientation`,3,`horizontal`),a=q(t,`name`,3,void 0),o=Gs(t,Nz),s=N(void 0),c=N(void 0),l=()=>{globalThis.requestAnimationFrame(()=>{let e=z(s)?.querySelector(`[role="tab"][aria-selected="true"]`);if(e){let{offsetTop:t,offsetLeft:n,offsetWidth:r,offsetHeight:i}=e;P(c,Object.entries({top:t,left:n,width:r,height:i}).map(([e,t])=>`${e}: ${t}px`).join(`; `),!0)}else P(c,void 0)})};tc(()=>{let e=new ResizeObserver(()=>{l()});return e.observe(z(s)),()=>{e.disconnect()}});var u=Pz(),d=()=>{l()},f=e=>{l(),t.onChange?.(e)};_s(u,()=>({...o,role:`tablist`,class:`sui tab-list ${t.class??``}`,hidden:n(),"aria-hidden":n(),"aria-disabled":r(),"aria-orientation":i(),"data-name":a()||void 0,onInitialized:d,onChange:f}),void 0,void 0,void 0,`svelte-1n2h8qx`);var p=F(u);Co(F(p),()=>t.children??E),D(p);var m=L(p,2);D(u),Rs(u,e=>P(s,e),()=>z(s)),qo(u,AI),R(()=>{p.inert=r(),cs(m,z(c))}),H(e,u),k()}var Nz,Pz,Fz,Nce=o((()=>{Z(),J(),rc(),jI(),Nz=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`orientation`,`name`,`children`,`onChange`]),Pz=B(`<div><div role="none" class="inner svelte-1n2h8qx"><!></div> <div role="none" class="indicator svelte-1n2h8qx"></div></div>`),Fz={hash:`svelte-1n2h8qx`,code:`.tab-list.svelte-1n2h8qx {flex:none;position:relative;display:flex;align-items:center;margin:var(--sui-tab-list-margin, var(--sui-focus-ring-width));border-color:var(--sui-tab-list-border-color, var(--sui-control-border-color));border-radius:var(--sui-tab-list-border-radius, 0);background-color:var(--sui-tab-list-background-color, transparent);}.tab-list[aria-orientation=horizontal].svelte-1n2h8qx {gap:var(--sui-horizontal-tab-list-gap, var(--sui-tab-list-gap, 8px));margin-block:var(--sui-horizontal-tab-list-margin-block, 0 32px);margin-inline:var(--sui-horizontal-tab-list-margin-inline, 0);border-block-width:var(--sui-horizontal-tab-list-border-block-width, 0 1px);border-inline-width:var(--sui-horizontal-tab-list-border-inline-width, 0 0);padding:var(--sui-horizontal-tab-list-padding, var(--sui-tab-list-padding, 0 16px));}.tab-list[aria-orientation=horizontal].svelte-1n2h8qx button {width:var(--sui-horizontal-tab-width, var(--sui-tab-width, auto));height:var(--sui-horizontal-tab-height, var(--sui-tab-height, 100%));justify-content:var(--sui-horizontal-tab-justify-content, center);}.tab-list[aria-orientation=horizontal].svelte-1n2h8qx .indicator:where(.svelte-1n2h8qx) {border-block-width:var(--sui-horizontal-tab-list-indicator-border-block-width, 0 2px);border-inline-width:var(--sui-horizontal-tab-list-indicator-border-inline-width, 0 0);}.tab-list[aria-orientation=vertical].svelte-1n2h8qx {gap:var(--sui-vertical-tab-list-gap, var(--sui-tab-list-gap, 8px));flex-direction:column;margin-block:var(--sui-vertical-tab-list-margin-block, 0);margin-inline:var(--sui-vertical-tab-list-margin-inline, 0 32px);border-block-width:var(--sui-vertical-tab-list-border-block-width, 0 0);border-inline-width:var(--sui-vertical-tab-list-border-inline-width, 0 1px);padding:var(--sui-vertical-tab-list-padding, var(--sui-tab-list-padding, 8px 0));width:var(--sui-vertical-tab-list-width, auto);}.tab-list[aria-orientation=vertical].svelte-1n2h8qx button {justify-content:var(--sui-vertical-tab-justify-content, flex-start);padding-inline-end:32px;width:var(--sui-vertical-tab-width, var(--sui-tab-width, 100%));height:var(--sui-vertical-tab-height, var(--sui-tab-height, auto));}.tab-list[aria-orientation=vertical].svelte-1n2h8qx .indicator:where(.svelte-1n2h8qx) {border-block-width:var(--sui-vertical-tab-list-indicator-border-block-width, 0 0);border-inline-width:var(--sui-vertical-tab-list-indicator-border-inline-width, 0 2px);}.tab-list.svelte-1n2h8qx button {position:relative;z-index:1;border-color:transparent;margin:0 !important;border-radius:var(--sui-tab-border-radius, 0);font-family:var(--sui-tab-font-family, var(--sui-control-font-family, inherit));font-size:var(--sui-tab-font-size, var(--sui-control-font-size, inherit));font-weight:var(--sui-tab-font-weight, var(--sui-control-font-weight, var(--sui-font-weight-normal, normal)));}.inner.svelte-1n2h8qx {display:contents;}.indicator.svelte-1n2h8qx {position:absolute;z-index:0;inset:auto;border-radius:var(--sui-tab-list-indicator-border-radius, 0);border-color:var(--sui-tab-list-indicator-border-color, var(--sui-primary-accent-color-light));background-color:var(--sui-tab-list-indicator-background-color, transparent);box-shadow:var(--sui-tab-list-indicator-box-shadow, none);pointer-events:none;transition:var(--sui-tab-list-indicator-transition, all 200ms);}`}}));function Pce(e,t){G(e,Rz);let n=Gs(t,Iz);var r=Lz();_s(r,()=>({...n,role:`tabpanel`,class:`sui tab-panel ${t.class??``}`}),void 0,void 0,void 0,`svelte-btqofn`),Co(F(r),()=>t.children??E),D(r),H(e,r)}var Iz,Lz,Rz,Fce=o((()=>{Z(),J(),Iz=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`children`]),Lz=B(`<div><!></div>`),Rz={hash:`svelte-btqofn`,code:`.tab-panel.svelte-btqofn {flex:auto;transition:all 200ms;}.tab-panel[aria-hidden=true].svelte-btqofn, .tab-panel.svelte-btqofn:not([aria-hidden]) {display:none;}`}}));function Ice(e,t){let n=q(t,`hidden`,3,!1),r=q(t,`disabled`,3,!1),i=q(t,`selected`,3,!1),a=Gs(t,zz);wI(e,Ks(()=>a,{role:`tab`,get class(){return`sui tab ${t.class??``}`},get hidden(){return n()},get disabled(){return r()},get"aria-selected"(){return i()},startIcon:e=>{var n=V();Co(I(n),()=>t.startIcon??E),H(e,n)},children:e=>{var n=V();Co(I(n),()=>t.children??E),H(e,n)},endIcon:e=>{var n=V();Co(I(n),()=>t.endIcon??E),H(e,n)},$$slots:{startIcon:!0,default:!0,endIcon:!0}}))}var zz,Lce=o((()=>{Z(),J(),EI(),zz=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`selected`,`children`,`startIcon`,`endIcon`])}));function Bz(e,t){O(t,!0),G(e,Uz);let n=q(t,`show`,15,!1),r=q(t,`id`,3,void 0),i=q(t,`duration`,3,5e3),a=q(t,`position`,7,`auto`),o=Gs(t,Vz),s=N(void 0),c=N(void 0),l=N(void 0),u=N(0);tc(()=>(P(c,document.querySelector(`.sui.toast-base.enabled`)??void 0,!0),z(c)?z(s)?.remove():(P(c,z(s),!0),z(c)&&(z(c).classList.add(`enabled`),(document.querySelector(`.sui.app-shell`)??document.body).appendChild(z(c)),z(c).showPopover&&(z(c).popover=`manual`,z(c).showPopover()))),()=>{z(l)?.remove()})),tc(()=>{if(a()!==`auto`)return;let e=globalThis.matchMedia(`(width < 1024px)`),t=()=>{a(e.matches?`bottom-center`:`bottom-${document.dir===`rtl`?`left`:`right`}`)};return t(),e.addEventListener(`change`,t),()=>{e.removeEventListener(`change`,t)}}),Qr(()=>{z(c)&&z(l)&&z(c).appendChild(z(l))}),Qr(()=>{r(),n(),i(),zi(()=>{globalThis.clearTimeout(z(u))}),n()&&i()&&P(u,globalThis.setTimeout(()=>{n(!1)},i()),!0)});var d=Hz(),f=I(d);Rs(f,e=>P(s,e),()=>z(s));var p=L(f,2);_s(p,()=>({...o,class:`sui toast ${a()??``}`,"aria-hidden":!n()}),void 0,void 0,void 0,`svelte-1fep4qh`),Co(F(p),()=>t.children??E),D(p),Rs(p,e=>P(l,e),()=>z(l)),H(e,d),k()}var Vz,Hz,Uz,Wz=o((()=>{Z(),J(),rc(),Vz=new Set([`$$slots`,`$$events`,`$$legacy`,`show`,`id`,`duration`,`position`,`children`]),Hz=B(`<div role="none" class="sui toast-base svelte-1fep4qh"></div> <div><!></div>`,1),Uz={hash:`svelte-1fep4qh`,code:`.toast-base.svelte-1fep4qh {position:fixed;inset:16px;z-index:99999;display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-end;gap:8px;margin:0;border:0;padding:0;width:auto;height:auto;background-color:transparent;font-family:var(--sui-font-family-default);font-size:var(--sui-font-size-default);font-weight:var(--sui-font-weight-normal, normal);text-align:center;pointer-events:none;-webkit-user-select:none;user-select:none;}body:has(.sui.bottom-navigation:not([inert]:not([hidden]))) .toast-base {bottom:calc(var(--sui-bottom-navigation-height) + 16px);}.toast.svelte-1fep4qh {position:absolute;width:max-content;max-width:80dvw;box-shadow:0 8px 16px var(--sui-popup-shadow-color);opacity:1;transition-duration:250ms;will-change:opacity;}.toast[aria-hidden=true].svelte-1fep4qh {display:block;opacity:0;}.toast.top-left.svelte-1fep4qh {inset-block-start:0;inset-block-end:auto;inset-inline-start:0;inset-inline-end:auto;}.toast.top-center.svelte-1fep4qh {inset-block-start:0;inset-block-end:auto;inset-inline-start:50%;inset-inline-end:auto;}.toast.top-center.svelte-1fep4qh:dir(ltr) {transform:translateX(-50%);}.toast.top-center.svelte-1fep4qh:dir(rtl) {transform:translateX(50%);}.toast.top-right.svelte-1fep4qh {inset-block-start:0;inset-block-end:auto;inset-inline-start:auto;inset-inline-end:0;}.toast.bottom-left.svelte-1fep4qh {inset-block-start:auto;inset-block-end:0;inset-inline-start:0;inset-inline-end:auto;}.toast.bottom-center.svelte-1fep4qh {inset-block-start:auto;inset-block-end:0;inset-inline-start:50%;inset-inline-end:auto;}.toast.bottom-center.svelte-1fep4qh:dir(ltr) {transform:translateX(-50%);}.toast.bottom-center.svelte-1fep4qh:dir(rtl) {transform:translateX(50%);}.toast.bottom-right.svelte-1fep4qh {inset-block-start:auto;inset-block-end:0;inset-inline-start:auto;inset-inline-end:0;}`}})),Gz=s(((e,t)=>{
643
+ `),b=await IA(`AWS4${a}`,d),x=await IA(b,o),S=await IA(x,s),C=await IA(S,`aws4_request`),w=await IA(C,y),T=Array.from(w).map(e=>e.toString(16).padStart(2,`0`)).join(``);return[`${_} Credential=${i}/${v},`,`SignedHeaders=${h}, Signature=${T}`].join(` `)},zA=async({method:e,url:t,config:n,secretAccessKey:r,body:i=``,extraHeaders:a={}})=>{let{access_key_id:o,region:s=`us-east-1`}=n,c=new Date,l=new URL(t),u=await LA(i),d={Host:l.host,"x-amz-date":c.toISOString().replace(/[:-]|\.\d{3}/g,``),"x-amz-content-sha256":u,...a},f=await RA({method:e,url:t,headers:d,payloadHash:u,accessKeyId:o,secretAccessKey:r,region:s,service:`s3`,date:c});return fetch(t,{method:e,headers:{...d,Authorization:f},...i&&{body:i}})},BA=e=>{let t=new DOMParser().parseFromString(e,`text/xml`),n=e=>{if(e.children.length===0)return e.textContent;let t={};return Array.from(e.children).forEach(e=>{let r=e.tagName,i=n(e);t[r]?Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]:t[r]=i}),t};return n(t.documentElement)},VA=({bucket:e,key:t,endpoint:n,region:r,forcePathStyle:i,publicUrl:a})=>a?`${a}/${t}`:n?`${n}/${e}/${t}`:i?`https://s3.${r}.amazonaws.com/${e}/${t}`:`https://${e}.s3.${r}.amazonaws.com/${t}`,HA=(e,t)=>{let{bucket:n,region:r,endpoint:i,force_path_style:a,prefix:o=``,public_url:s}=t;return e.map(e=>{let t=e.Key,c=t.split(`/`).pop()||t,l=o&&t.startsWith(o)?t.slice(o.length):t,u=VA({bucket:n,key:t,endpoint:i,region:r,forcePathStyle:a,publicUrl:s});return{id:t,description:l,previewURL:u,downloadURL:u,fileName:c,lastModified:new Date(e.LastModified),size:Number(e.Size),kind:vT(t)}})},UA=async(e,t,{maxPages:n=10}={})=>{let{bucket:r,region:i,endpoint:a,force_path_style:o,prefix:s=``}=e,{kind:c,apiKey:l}=t;if(!l)return Promise.reject(Error(`S3 secret access key is required`));let u=[],d;for(let t=0;t<n;t+=1){let t=new URLSearchParams({"list-type":`2`,"max-keys":`1000`,...s&&{prefix:s},...d&&{"continuation-token":d}}),n=a?`${a}/${r}?${t}`:o?`https://s3.${i}.amazonaws.com/${r}?${t}`:`https://${r}.s3.${i}.amazonaws.com/?${t}`,c=await zA({method:`GET`,url:n,config:e,secretAccessKey:l});if(!c.ok){let e=await c.text();return Promise.reject(Error(`Failed to list objects: ${e}`))}let f=await c.text(),p=BA(f),m=(p.Contents?Array.isArray(p.Contents)?p.Contents:[p.Contents]:[]).filter(e=>!e.Key.endsWith(`/`));if(u.push(...m),d=p.NextContinuationToken,p.IsTruncated!==`true`||!d)break;await Gw(50)}let f=c?u.filter(e=>vT(e.Key)===c):u;return HA(f,e)},WA=async(e,t,n)=>{let r=await UA(t,n,{maxPages:5}),i=e.toLowerCase();return r.filter(e=>e.fileName.toLowerCase().includes(i)||e.description.toLowerCase().includes(i))},GA=async(e,t,n)=>{if(e.length===0)return[];let{bucket:r,region:i,endpoint:a,force_path_style:o,prefix:s=``}=t,{apiKey:c}=n;if(!c)return Promise.reject(Error(`S3 secret access key is required`));let l=[];for(let n of e){let u=n.name.split(/[/\\]/).filter(Boolean).at(-1)??n.name,d=s?`${s}${u}`:u,f=a?`${a}/${r}/${d}`:o?`https://s3.${i}.amazonaws.com/${r}/${d}`:`https://${r}.s3.${i}.amazonaws.com/${d}`,p=await n.arrayBuffer(),m=await zA({method:`PUT`,url:f,config:t,secretAccessKey:c,body:p,extraHeaders:{"Content-Type":n.type||`application/octet-stream`,...t.acl!==!1&&{"x-amz-acl":t.acl??`public-read`}}});if(!m.ok){let e=await m.text();throw Error(`Failed to upload file ${n.name}: ${e}`)}l.push({Key:d,LastModified:new Date().toISOString(),ETag:``,Size:n.size,ContentType:n.type}),e.length>1&&await Gw(50)}return HA(l,t)}})),qA,JA,YA,XA,ZA,QA,$A,Rie=o((()=>{KA(),qA=e=>FA(`aws_s3`,e),JA=e=>{let t=qA(e)??qA();return!!(t&&t.access_key_id&&t.bucket&&t.region)},YA=({fieldConfig:e})=>{let t=qA(e)??qA();if(!t)throw Error(`Amazon S3 configuration is not available`);return t},XA=async e=>UA(YA(e),e),ZA=async(e,t)=>WA(e,YA(t),t),QA=async(e,t)=>GA(e,YA(t),t),$A={serviceType:`cloud_storage`,serviceId:`aws_s3`,serviceLabel:`Amazon S3`,serviceURL:`https://aws.amazon.com/s3/`,showServiceLink:!0,hotlinking:!0,authType:`api_key`,developerURL:`https://docs.aws.amazon.com/s3/`,apiKeyURL:`https://console.aws.amazon.com/iam/home#/security_credentials`,apiKeyPattern:/^[A-Za-z0-9/+=]{40}$/,isEnabled:JA,list:XA,search:ZA,upload:QA}})),ej,tj,nj,rj,ij,aj,oj,zie=o((()=>{KA(),ej=e=>FA(`backblaze_b2`,e),tj=e=>{let t=ej(e)??ej();return!!(t&&t.access_key_id&&t.bucket&&t.region)},nj=({fieldConfig:e})=>{let t=ej(e)??ej();if(!t)throw Error(`Backblaze B2 configuration is not available`);return{...t,endpoint:`https://s3.${t.region}.backblazeb2.com`,acl:!1,public_url:t.public_url??`https://${t.bucket}.s3.${t.region}.backblazeb2.com`}},rj=async e=>UA(nj(e),e),ij=async(e,t)=>WA(e,nj(t),t),aj=async(e,t)=>GA(e,nj(t),t),oj={serviceType:`cloud_storage`,serviceId:`backblaze_b2`,serviceLabel:`Backblaze B2`,serviceURL:`https://www.backblaze.com/cloud-storage`,showServiceLink:!0,hotlinking:!0,authType:`api_key`,developerURL:`https://www.backblaze.com/docs/cloud-storage-s3-compatible-api`,apiKeyURL:`https://secure.backblaze.com/app_keys.htm`,apiKeyPattern:/^[A-Za-z0-9/+=]{30,}$/,isEnabled:tj,list:rj,search:ij,upload:aj}})),sj,cj,lj,uj,dj,fj,pj,mj,hj,Bie=o((()=>{KA(),sj={default:``,eu:`eu.`,fedramp:`fedramp.`},cj=({account_id:e,jurisdiction:t=`default`})=>`https://${e}.${sj[t]??``}r2.cloudflarestorage.com`,lj=e=>FA(`cloudflare_r2`,e),uj=e=>{let t=lj(e)??lj();return!!(t&&t.access_key_id&&t.bucket&&t.account_id)},dj=({fieldConfig:e})=>{let t=lj(e)??lj();if(!t)throw Error(`Cloudflare R2 configuration is not available`);return{...t,region:`auto`,endpoint:cj(t)}},fj=async e=>UA(dj(e),e),pj=async(e,t)=>WA(e,dj(t),t),mj=async(e,t)=>GA(e,dj(t),t),hj={serviceType:`cloud_storage`,serviceId:`cloudflare_r2`,serviceLabel:`Cloudflare R2`,serviceURL:`https://www.cloudflare.com/developer-platform/r2/`,showServiceLink:!0,hotlinking:!0,authType:`api_key`,developerURL:`https://developers.cloudflare.com/r2/`,apiKeyURL:`https://dash.cloudflare.com/?to=/:account/r2/api-tokens`,apiKeyPattern:/^[A-Za-z0-9/+=]{40,}$/,isEnabled:uj,list:fj,search:pj,upload:mj}})),gj,_j,vj,yj,bj,xj,Sj,Vie=o((()=>{KA(),gj=e=>FA(`digitalocean_spaces`,e),_j=e=>{let t=gj(e)??gj();return!!(t&&t.access_key_id&&t.bucket&&t.region)},vj=({fieldConfig:e})=>{let t=gj(e)??gj();if(!t)throw Error(`DigitalOcean Spaces configuration is not available`);return{...t,endpoint:`https://${t.region}.digitaloceanspaces.com`,public_url:t.public_url??`https://${t.bucket}.${t.region}.digitaloceanspaces.com`}},yj=async e=>UA(vj(e),e),bj=async(e,t)=>WA(e,vj(t),t),xj=async(e,t)=>GA(e,vj(t),t),Sj={serviceType:`cloud_storage`,serviceId:`digitalocean_spaces`,serviceLabel:`DigitalOcean Spaces`,serviceURL:`https://www.digitalocean.com/products/spaces`,showServiceLink:!0,hotlinking:!0,authType:`api_key`,developerURL:`https://docs.digitalocean.com/products/spaces/`,apiKeyURL:`https://cloud.digitalocean.com/account/api/spaces`,apiKeyPattern:/^[A-Za-z0-9/+=]{43}$/,isEnabled:_j,list:yj,search:bj,upload:xj}})),Cj,wj,Tj,Ej,Dj,Oj,kj,Hie=o((()=>{KA(),Cj=e=>FA(`scaleway_object_storage`,e),wj=e=>{let t=Cj(e)??Cj();return!!(t&&t.access_key_id&&t.bucket&&t.region)},Tj=({fieldConfig:e})=>{let t=Cj(e)??Cj();if(!t)throw Error(`Scaleway Object Storage configuration is not available`);return{...t,endpoint:`https://s3.${t.region}.scw.cloud`,public_url:t.public_url??`https://${t.bucket}.s3.${t.region}.scw.cloud`}},Ej=async e=>UA(Tj(e),e),Dj=async(e,t)=>WA(e,Tj(t),t),Oj=async(e,t)=>GA(e,Tj(t),t),kj={serviceType:`cloud_storage`,serviceId:`scaleway_object_storage`,serviceLabel:`Scaleway Object Storage`,serviceURL:`https://www.scaleway.com/en/object-storage/`,showServiceLink:!0,hotlinking:!0,authType:`api_key`,developerURL:`https://www.scaleway.com/en/docs/object-storage/`,apiKeyURL:`https://console.scaleway.com/iam/api-keys`,apiKeyPattern:/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/,isEnabled:wj,list:Ej,search:Dj,upload:Oj}})),Aj,jj,Mj,Nj,Pj,Fj,Ij,Lj,Rj,Uie=o((()=>{KA(),Aj=({project_id:e})=>`https://${e}.storage.supabase.co/storage/v1/s3`,jj=({project_id:e,bucket:t})=>`https://${e}.supabase.co/storage/v1/object/public/${t}`,Mj=e=>FA(`supabase_storage`,e),Nj=e=>{let t=Mj(e)??Mj();return!!(t&&t.access_key_id&&t.bucket&&t.project_id)},Pj=({fieldConfig:e})=>{let t=Mj(e)??Mj();if(!t)throw Error(`Supabase Storage configuration is not available`);return{...t,endpoint:Aj(t),public_url:t.public_url??jj(t)}},Fj=async e=>UA(Pj(e),e),Ij=async(e,t)=>WA(e,Pj(t),t),Lj=async(e,t)=>GA(e,Pj(t),t),Rj={serviceType:`cloud_storage`,serviceId:`supabase_storage`,serviceLabel:`Supabase Storage`,serviceURL:`https://supabase.com/storage`,showServiceLink:!0,hotlinking:!0,authType:`api_key`,developerURL:`https://supabase.com/docs/guides/storage`,apiKeyURL:`https://supabase.com/dashboard/project/_/storage/settings`,apiKeyPattern:/^[A-Za-z0-9/+=]{40,}$/,isEnabled:Nj,list:Fj,search:Ij,upload:Lj}})),zj,Bj,Vj,Hj,Uj,Wj,Gj,Kj,qj,Jj,Wie=o((()=>{Kw(),qp(),AF(),FE(),zj=(e=A(TF))=>e?.media_libraries?.uploadcare??(e?.media_library?.name===`uploadcare`?e?.media_library:void 0),Bj=e=>{let t=zj(e)??zj();return t?t.config?.publicKey:void 0},Vj=e=>!!Bj(e),Hj=(e,{fieldConfig:t}={})=>{let{settings:{autoFilename:n=!1,defaultOperations:r=void 0}={},config:{cdnBase:i=void 0}={}}=(zj(t)??zj())||{};return e.map(e=>{let{uuid:t,original_filename:a,original_file_url:o,mime_type:s,datetime_uploaded:c,size:l}=e,u=`${new URL(i??o).origin}/${t}/`,d=s.startsWith(`image/`),f=s.startsWith(`video/`);return{id:t,description:a,previewURL:`${u}${d?`-/preview/400x400/`:``}`,downloadURL:`${u}${d&&r?`-${r}`:``}${n?a:``}`,fileName:a,lastModified:new Date(c),size:l,kind:d?`image`:f?`video`:`other`}})},Uj=async(e,{maxPages:t=10,filter:n}={})=>{let{kind:r,fieldConfig:i,apiKey:a}=e,o=Bj(i);if(!o)return Promise.reject(Error(`Uploadcare public key is not configured`));let s={Accept:`application/vnd.uploadcare-v0.7+json`,Authorization:`Uploadcare.Simple ${o}:${a}`},c=new URLSearchParams({limit:`100`,ordering:`-datetime_uploaded`,stored:`true`}),l=[],u=`https://api.uploadcare.com/files/?${c}`;for(let e=0;e<t&&u;e+=1){let e=await fetch(u,{headers:s});if(!e.ok)return Promise.reject(Error(`Failed to fetch files: ${e.statusText}`));let t=await e.json(),{results:i}=t;if(r===`image`&&(i=i.filter(e=>e.is_image)),n&&(i=i.filter(n)),l.push(...i),u=t.next,!u)break;await Gw(50)}return Hj(l,{fieldConfig:i})},Wj=async e=>Uj(e),Gj=async(e,t)=>{let n=e.toLowerCase();return Uj(t,{filter:e=>e.original_filename.toLowerCase().includes(n)})},Kj=async(e,t)=>{let n=new TextEncoder,r=n.encode(String(t)),i=n.encode(e),a=await crypto.subtle.importKey(`raw`,i,{name:`HMAC`,hash:`SHA-256`},!1,[`sign`]),o=await crypto.subtle.sign(`HMAC`,a,r);return Array.from(new Uint8Array(o)).map(e=>e.toString(16).padStart(2,`0`)).join(``)},qj=async(e,t)=>{if(e.length===0)return[];let{fieldConfig:n,apiKey:r}=t,i=Bj(n);if(!i)return Promise.reject(Error(`Uploadcare public key is not configured`));if(!r)return Promise.reject(Error(`Uploadcare secret key is not provided`));let a=Math.floor(Date.now()/1e3)+1800,o=await Kj(r,a),s=new FormData;s.append(`UPLOADCARE_PUB_KEY`,i),s.append(`UPLOADCARE_STORE`,`1`),s.append(`signature`,o),s.append(`expire`,String(a)),e.forEach(e=>{s.append(AE(e.name),e)});let c=await fetch(`https://upload.uploadcare.com/base/`,{method:`POST`,body:s});if(!c.ok)throw Error(`Failed to upload files: ${c.statusText}`);let l=await c.json(),u=Object.entries(l).filter(([e])=>!e.startsWith(`UPLOADCARE_`)).map(([t,n])=>{let r=e.find(e=>e.name===t),i=r?.type||`application/octet-stream`,a=i.startsWith(`image/`);return{uuid:n,original_filename:t,original_file_url:`https://ucarecdn.com/${n}/${t}`,size:r?.size||0,mime_type:i,is_image:a,is_ready:!0,content_info:null,datetime_uploaded:new Date().toISOString(),datetime_stored:new Date().toISOString(),datetime_removed:null}});return Hj(u,{fieldConfig:n})},Jj={serviceType:`cloud_storage`,serviceId:`uploadcare`,serviceLabel:`Uploadcare`,serviceURL:`https://uploadcare.com/`,showServiceLink:!0,hotlinking:!0,authType:`api_key`,developerURL:`https://uploadcare.com/docs/`,apiKeyURL:`https://app.uploadcare.com/projects/-/api-keys/`,apiKeyPattern:/^[a-f0-9]{20}$/,isEnabled:Vj,list:Wj,search:Gj,upload:qj}})),Yj,Xj,Zj=o((()=>{PA(),Rie(),zie(),Bie(),Vie(),Hie(),Uie(),Wie(),Yj={aws_s3:$A,backblaze_b2:oj,cloudflare_r2:hj,cloudinary:NA,digitalocean_spaces:Sj,scaleway_object_storage:kj,supabase_storage:Rj,uploadcare:Jj},Xj=Object.keys(Yj)})),Qj,$j,eM,tM,nM,rM,iM,aM,oM,sM,cM,lM,uM,dM,Gie=o((()=>{Qj=`@sveltia/cms`,$j=`0.170.1`,eM=`Sveltia CMS is a modern, lightweight, Git-based headless content management system.`,tM=[`svelte`,`cms`,`content-management-system`],nM=`https://sveltiacms.app/en/`,rM={type:`git`,url:`git+https://github.com/sveltia/sveltia-cms.git`},iM={type:`github`,url:`https://github.com/sponsors/kyoshino`},aM={name:`Kohei Yoshino`,url:`https://github.com/kyoshino`},oM=`module`,sM={build:`vite build`,"build:watch":`vite build --watch`,check:`pnpm run '/^check:.*/'`,"check:audit":`pnpm audit --ignore-registry-errors`,"check:cspell":`cspell --no-progress`,"check:eslint":`eslint .`,"check:imports":`node scripts/find-unused-imports.js`,"check:oxlint":`oxlint .`,"check:prettier":`prettier --check .`,"check:stylelint":`stylelint '**/*.{css,scss,svelte}'`,"check:svelte":`svelte-check`,dev:`vite`,format:`prettier --write .`,prepublishOnly:`vite build`,preview:`vite preview`,test:`NODE_OPTIONS=--no-experimental-webstorage vitest run`,"test:coverage":`NODE_OPTIONS=--no-experimental-webstorage vitest run --coverage`,"test:watch":`NODE_OPTIONS=--no-experimental-webstorage vitest`},cM={"@jsquash/webp":`^1.5.0`,"@lexical/markdown":`^0.46.0`,"@sindresorhus/transliterate":`^2.3.1`,"@sveltia/i18n":`^1.1.2`,"@sveltia/ui":`^0.41.1`,"@sveltia/utils":`^0.10.7`,"create-react-class":`^15.7.0`,dayjs:`^1.11.21`,deepmerge:`^4.3.1`,exifr:`^7.1.3`,"fast-deep-equal":`^3.1.3`,flat:`^6.0.1`,immutable:`^5.1.9`,"isomorphic-dompurify":`^3.18.0`,leaflet:`^1.9.4`,lexical:`^0.46.0`,marked:`^18.0.5`,"marked-bidi":`^1.0.15`,mime:`^4.1.0`,"parse-entities":`^4.0.2`,"pdfjs-dist":`^6.1.200`,qrcode:`^1.5.4`,react:`^19.2.7`,"react-dom":`^19.2.7`,"sanitize-filename":`^1.6.4`,"smol-toml":`^1.7.0`,svgo:`^4.0.1`,"terra-draw":`^1.31.2`,"terra-draw-leaflet-adapter":`1.0.3`,turndown:`^7.2.4`,yaml:`^2.9.0`},lM={"@stylistic/eslint-plugin":`^5.10.0`,"@sveltejs/vite-plugin-svelte":`^7.1.2`,"@types/leaflet":`^1.9.21`,"@types/node":`^26.1.0`,"@types/qrcode":`^1.5.6`,"@types/react":`^19.2.17`,"@types/react-dom":`^19.2.3`,"@vitest/coverage-v8":`^4.1.10`,cspell:`^10.0.1`,eslint:`^9.39.4`,"eslint-config-airbnb-extended":`^3.1.0`,"eslint-config-prettier":`^10.1.8`,"eslint-plugin-jsdoc":`^63.0.12`,"eslint-plugin-package-json":`^1.5.0`,"eslint-plugin-svelte":`^3.20.0`,"eslint-plugin-unused-imports":`^4.4.1`,globals:`^17.7.0`,oxlint:`^1.72.0`,"postcss-html":`^1.8.1`,prettier:`^3.9.4`,"prettier-plugin-svelte":`^4.1.1`,stylelint:`^17.14.0`,"stylelint-config-recommended":`^18.0.0`,svelte:`^5.56.4`,"svelte-check":`^4.7.1`,"ts-json-schema-generator":`^2.9.0`,typescript:`^6.0.3`,vite:`^8.1.3`,vitest:`^4.1.10`},uM={directory:`package`,access:`public`,provenance:!0},dM={name:Qj,version:$j,description:eM,keywords:tM,homepage:nM,repository:rM,funding:iM,license:`MIT`,author:aM,type:oM,scripts:sM,dependencies:cM,devDependencies:lM,publishConfig:uM}})),fM,pM,mM=o((()=>{Gie(),{dependencies:fM,version:pM}=dM})),hM,gM,_M,vM,yM=o((()=>{hM=`modulepreload`,gM=function(e){return`/`+e},_M={},vM=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,new URL(`../../../src/node/plugins/importAnalysisBuild.ts`,import.meta.url)).href}r=o(t.map(t=>{if(t=gM(t,n),t=s(t),t in _M)return;_M[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:hM,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})}})),bM,xM,SM=o((()=>{mM(),yM(),bM=e=>{let t=`https://unpkg.com/${e}`,n=fM[e]?.replace(/^\D/,``);return n?`${t}@${n}`:t},xM=async(e,t)=>vM(()=>import(`${bM(e)}/${t}`),[])})),CM,wM,TM,EM,DM,OM,kM,AM,jM=o((()=>{CM=[`avif`,`gif`,`jpeg`,`png`,`webp`],wM=CM.map(e=>`image/${e}`),TM=/\b(?:avif|gif|jpe?g|png|webp)$/i,EM=[`svg`],DM=[`image/svg+xml`],OM=/\b(?:svg)$/i,[...CM,...EM],kM=[...wM,...DM],AM=[`webp`]})),MM,NM,PM,FM=o((()=>{SM(),jM(),MM={},NM=async e=>{if(e in MM)return MM[e];let t=`image/${e}`,n=new OffscreenCanvas(1,1);n.getContext(`2d`);let r=(await n.convertToBlob({type:t})).type===t;return MM[e]=r,r},PM=async(e,{format:t=`webp`,quality:n=85}={})=>{let r=`image/${t}`;if(!await NM(t)&&AM.includes(t)){let i=e.getContext(`2d`).getImageData(0,0,e.width,e.height);try{let e=(await xM(`@jsquash/${t}`,`encode.js?module`)).default,a=await e(i,{quality:n});return new Blob([a],{type:r})}catch{}}return e.convertToBlob({type:r,quality:n/100})}})),IM,LM,RM=o((()=>{IM=({width:e,height:t},{width:n=e,height:r=t,fit:i=`scale-down`}={})=>{let a={scale:1,width:e,height:t};if(e===n&&t===r)return a;let o=e<=n&&t<=r,s=1,c=0,l=0;if(i===`scale-down`){if(o)return a;i=`contain`}return i===`contain`&&(s=Math.min(n/e,r/t),c=e*s,l=t*s),{scale:s,width:c,height:l}},LM=(e,t,n)=>{let{scale:r,width:i,height:a}=IM(t,n);return e.width=i,e.height=a,{scale:r,width:i,height:a}}})),zM,BM,VM,HM,UM,WM,GM=o((()=>{SM(),FM(),RM(),zM={format:`webp`,quality:85,width:512,height:512,fit:`contain`},BM=async({blob:e})=>{let t=URL.createObjectURL(e),n=new Image;return new Promise(e=>{n.addEventListener(`load`,()=>{e({source:n,naturalWidth:n.naturalWidth,naturalHeight:n.naturalHeight}),URL.revokeObjectURL(t)},{once:!0}),n.src=t})},VM=async({blob:e})=>{let t=URL.createObjectURL(e),n=document.createElement(`video`);return new Promise(e=>{n.addEventListener(`canplay`,()=>{n.pause(),e({source:n,naturalWidth:n.videoWidth,naturalHeight:n.videoHeight}),URL.revokeObjectURL(t)},{once:!0}),n.muted=!0,n.autoplay=!0,n.playsInline=!0,n.src=t,n.style.opacity=`0`,n.style.pointerEvents=`none`,document.body.appendChild(n)})},HM=async e=>e.type.startsWith(`video/`)?VM({blob:e}):BM({blob:e}),UM=async(e,{format:t=`png`,quality:n=85,width:r=void 0,height:i=void 0,fit:a=`scale-down`}={})=>{let o,s=0,c=0;try{o=await createImageBitmap(e),{width:s,height:c}=o}catch{({source:o,naturalWidth:s,naturalHeight:c}=await HM(e))}r??=s,i??=c;let l=new OffscreenCanvas(512,512),u=l.getContext(`2d`);return LM(l,{width:s,height:c},{fit:a,width:r,height:i}),u.drawImage(o,0,0,l.width,l.height),o instanceof HTMLVideoElement&&document.body.removeChild(o),PM(l,{format:t,quality:n})},WM=async e=>{let t=await e.text();try{let{optimize:n}=await xM(`svgo`,`dist/svgo.browser.js`),{data:r}=n(t);return new Blob([r],{type:e.type})}catch{}return e}})),KM,qM,JM,YM,XM,ZM,Kie=o((()=>{SM(),FM(),RM(),yM(),KM=bM(`pdfjs-dist`),qM=`${KM}/build/pdf.min.mjs`,JM=`${KM}/build/pdf.worker.min.mjs`,YM={isEvalSupported:!1,disableAutoFetch:!0,cMapUrl:`${KM}/cmaps/`,iccUrl:`${KM}/iccs/`,standardFontDataUrl:`${KM}/standard_fonts/`,wasmUrl:`${KM}/wasm/`},ZM=async(e,{format:t=`png`,quality:n=85,width:r=void 0,height:i=void 0,fit:a=`scale-down`}={})=>{if(!XM)try{XM=await vM(()=>import(qM),[]),XM.GlobalWorkerOptions.workerSrc=JM}catch{throw Error(`Failed to load PDF.js library`)}let o=URL.createObjectURL(e),s=new OffscreenCanvas(512,512),c=s.getContext(`2d`);try{let e=await(await XM.getDocument({...YM,url:o}).promise).getPage(1),t=e.getViewport({scale:1}),{scale:n}=LM(s,{width:t.width,height:t.height},{width:r,height:i,fit:a});await e.render({canvasContext:c,viewport:n===1?t:e.getViewport({scale:n})}).promise,URL.revokeObjectURL(o)}catch{throw Error(`Failed to render PDF`)}return PM(s,{format:t,quality:n})}})),QM,$M,eN,tN,nN,rN,iN,aN,oN,sN,cN,lN=o((()=>{Gp(),Kw(),Xw(),Np(),aT(),qp(),$F(),cm(),wA(),AF(),Zj(),PA(),FE(),GM(),Kie(),QM=/{{(?<tag>.+?)}}/,$M=/{{(.+?)}}/g,eN=/^(?:https?|data|blob):/,tN=new Set,nN=async(e,t=0)=>{let{file:n,handle:r,blobURL:i,name:a,path:o}=e;if(i)return fetch(i).then(e=>e.blob());let s;if(n)s=n;else if(r)try{s=await r.getFile()}catch{throw Error(`Failed to retrieve blob from file handle`)}else{if(tN.has(o)&&t<=25)return await Gw(200),nN(e,t+1);tN.add(o);let n=await A(SA)?.fetchBlob?.(e);if(!n)throw Error(`Failed to retrieve blob`);s=new Blob([n],{type:iT.getType(a)??n.type})}return e.blobURL=URL.createObjectURL(s),tN.delete(o),s},rN=async e=>(e.blobURL||await nN(e),e.blobURL),iN=void 0,aN=async(e,{cacheOnly:t=!1}={})=>{let n=e.name.endsWith(`.pdf`);if(!([`image`,`video`].includes(e.kind)||n))return;if(iN===void 0){let{databaseName:e}=A(SA)?.repository??{};iN=e?new qw(e,`asset-thumbnails`):null}let r=await iN?.get(e.sha);if(!r){if(t)return;let i=await nN(e);r=await(n?ZM:UM)(i,zM),await iN?.set(e.sha,r)}return URL.createObjectURL(r)},oN=(e,{pathOnly:t=!1,allowSpecial:n=!1,entry:r=void 0}={})=>{let{publicPath:i,entryRelative:a,hasTemplateTags:o}=e.folder.collectionName===void 0?e.folder:om(e.path).find(({collectionName:e})=>e!==void 0)??A(em);if(a){if(t){let t=Rp(e.path).dirname,n=r?Rp(Object.values(r.locales)[0].path).dirname:void 0;if(t!==void 0&&n!==void 0){if(t===n)return e.name;let r=`${n}/`;return e.path.startsWith(r)?e.path.slice(r.length):void 0}let{internalPath:i,internalSubPath:a}=e.folder;if(e.path===jE([i,a,e.name]))return e.path.slice(i.length+1)}return}let{_baseURL:s=``,output:{encode_file_path:c=!1}={}}=A(TF),l=o?e.path.replace(wE(e.folder.internalPath??``,e=>{let t=e.match(QM)?.groups?.tag;return t?`(?<${t}>[^/]+)`:Dp(e)}),i?.replaceAll($M,`$<$1>`)??``):e.path.replace(e.folder.internalPath??``,i===`/`?``:i??``);if(c&&(l=TE(l)),!(!l.startsWith(`/`)&&!n))return t?l:`${s}${l}`},sN=e=>{if(Yj.cloudinary?.isEnabled?.()){let t=jA(e);if(t.output_filename_only&&t.config?.cloud_name)return`https://res.cloudinary.com/${t.config.cloud_name}`}},cN=async({value:e,entry:t,collectionName:n,fileName:r,componentName:i,fieldConfig:a,typedKeyPath:o,thumbnail:s=!1})=>{if(!e)return;if(eN.test(e))return e;if(JF(e)){let t=sN(a);if(t)return`${t}/${e}`}let c=YF({value:e,entry:t,collectionName:n,fileName:r,componentName:i,typedKeyPath:o});if(c)return(s?await aN(c):await rN(c))??oN(c)}})),uN,dN,fN,pN,mN,hN,gN,_N,vN,yN=o((()=>{Fy(),uN=l($S(),1),dN=l(eC(),1),fN=l(tC(),1),pN=l(nC(),1),qp(),wA(),tF(),AF(),vC(),dw(),mw(),oC(),Ww(),uN.default.extend(dN.default),uN.default.extend(fN.default),uN.default.extend(pN.default),mN=/{{(?:year|month|day|hour|minute|second)}}/,hN=e=>_C(Object.values(e.locales)[0].path).map(({collectionName:e})=>cw(e)).filter(e=>!!e),gN=({dateFieldName:e,fields:t,content:n})=>{let r=e?t.find(({widget:t,name:n})=>t===`datetime`&&n===e):t.find(({widget:e})=>e===`datetime`),i=r?n[r.name]:void 0;if(!r||!i)return;let a=r,o=zw(i,a);if(!Fw(o))return;let{utc:s,outputUTC:c}=aC(a);return Py({date:o,timeZone:s||c?`UTC`:void 0})},_N=(e,t,n,r)=>{let{show_preview_links:i=!0,_baseURL:a}=A(TF)??{},{slug:o,path:s,content:c}=e.locales[t]??{},{preview_path:l,preview_path_date_field:u,fields:d=[],_i18n:{defaultLocale:f,omitDefaultLocaleFromPreviewPath:p}}=r??n;if(!i||!a||!s||!c||!l)return;let m=pw(n,e),h=(m?fw(n):void 0)?.fields??d,g;if(mN.test(l)&&(g=gN({dateFieldName:u,fields:h,content:c}),!g))return;let _=l;t===f&&p&&(_=_.replace(/{{locale}}[./]/,``));try{let e=eF(_,{type:`preview_path`,collection:n,content:c,locale:t,currentSlug:o,entryFilePath:s,dateTimeParts:g,isIndexFile:m});return`${a.replace(/\/$/,``)}/${e.replace(/^\//,``)}`}catch{return}},vN=(e,t)=>`${A(SA)?.repository?.blobBaseURL}/${e.locales[t]?.path}?plain=1`})),bN,xN,SN=o((()=>{bN=/^\/?(?<pattern>.+?)(?:\/(?<flags>[dgimsuy]*))?$/,xN=e=>{if(e instanceof RegExp)return e;if(typeof e==`string`){let{pattern:t,flags:n}=e.match(bN)?.groups??{};if(t)try{return new RegExp(t,n)}catch{}}}})),CN,wN,TN,EN,DN,ON,kN,AN=o((()=>{qp(),lN(),AF(),vC(),dw(),mw(),EC(),yN(),KP(),kC(),SN(),CN=/!\[.*?\]\((.+?)(?:\s+".*?")?\)/g,wN=ln([]),TN=un(wN,e=>new Set(e.map(e=>e.id))),EN=e=>{let t=cw(e);if(!t)return[];let{_type:n,_i18n:{defaultLocale:r}}=t,{filter:i}=n===`entry`?t:{},a=i?.field,o=xN(i?.pattern),s=i?.value===void 0?[]:Array.isArray(i.value)?i.value:[i.value],c;if(n===`entry`){let n=t._file?.fullPathRegEx;c=n?e=>n.test(Object.values(e.locales)[0]?.path??``):t=>hN(t).some(({name:t})=>t===e)}else{let t=new Set(A(pC).filter(({collectionName:t})=>t===e).flatMap(({filePathMap:e})=>e?Object.values(e):[]));c=e=>{let n=Object.values(e.locales)[0]?.path;return!!n&&t.has(n)}}return A(mC).filter(t=>{if(!c(t))return!1;if(!a)return!0;let n=GP({entry:t,locale:r,collectionName:e,key:a})??null;return o?o.test(n):s.includes(n)})},DN=async({assetURL:e,newURL:t,collectionName:n,entry:r,content:i,keyPath:a,value:o,isIndexFile:s,collectionFile:c})=>{let l=c?.name,u=BP({collectionName:n,fileName:l,valueMap:i,keyPath:a,isIndexFile:s});if(!u)return!1;let d=e.startsWith(`blob:`),f={entry:r,collectionName:n,fileName:l},{widget:p=`string`}=u;if(DC.includes(p)){let n=d?await cN({...f,value:o})===e:o===e;return n&&t&&(i[a]=t),n}if([`richtext`,`markdown`].includes(p)){let n=[...o.matchAll(CN)];if(n.length)return(await Promise.all(n.map(async([,n])=>{let r=(d?await cN({...f,value:n}):n)===e;return r&&t&&(i[a]=i[a].replace(n,t)),r}))).some(Boolean)}return!1},ON=async(e,{entries:t=A(mC),newURL:n=``}={})=>{let r=A(TF)?._baseURL,i=r&&!e.startsWith(`blob:`)?e.replace(r,``):e,a=i.startsWith(`blob:`),o=!!n,s=await Promise.all(t.map(async e=>{let{locales:t}=e,r=hN(e),s=!1;for(let{content:c}of Object.values(t)){for(let[t,l]of Object.entries(c))if(!(typeof l!=`string`||!l)&&!(!a&&!l.includes(i))){for(let a of r){let r={assetURL:i,newURL:n,collectionName:a.name,entry:e,content:c,keyPath:t,value:l,isIndexFile:pw(a,e)},u=CC(a,e),d;if(d=u.length?(await Promise.all(u.map(e=>DN({...r,collectionFile:e})))).includes(!0):await DN({...r}),d&&(s=!0,!o))break}if(s&&!o)break}if(s&&!o)break}return s}));return t.filter((e,t)=>s[t])},kN=e=>{let t=fw(e);return t?!EN(e.name).some(({slug:e})=>e===t.name):!1}})),jN,MN,NN,PN,FN,qie=o((()=>{jN=new WeakMap,MN=e=>{let t=jN.get(e);if(t)return t;let n=new Map;return e.forEach(({value:e,label:t})=>{n.has(e)||n.set(e,t)}),jN.set(e,n),n},NN=new WeakMap,PN=0,FN=e=>(NN.has(e)||(NN.set(e,PN),PN+=1),NN.get(e))})),IN,LN,RN=o((()=>{tF(),IN=e=>$P(e)?e:e===`slug`?`{{fields.slug}}`:`{{${e}}}`,LN=e=>{if(!e||e.widget!==`list`)return!1;let t=`fields`in e,n=`types`in e;return t||n}})),zN,BN,VN,HN,UN=o((()=>{cT(),Qp(),ZP(),RN(),zN=(e,t,n)=>{let{slug:r,locale:i,getDisplayValue:a}=t,{content:o,locales:s,defaultLocale:c,identifierField:l}=n;if(e===`slug`)return r;if(e===`locale`)return i;let u=e.replace(/^fields\./,``);return a(u)||a(u,c)||JP(o,{identifierField:l})||JP(s[c]?.content||{},{identifierField:l})||r},BN=(e,t,n,r)=>{let{label:i,value:a,searchValue:o}=e;return t.forEach(e=>{let t=zN(e,n,r);i=i.replaceAll(`{{${e}}}`,t),a=a.replaceAll(`{{${e}}}`,t),o=o?.replaceAll(`{{${e}}}`,t)??``}),{label:i,value:a,searchValue:o}},VN=e=>[...e.matchAll(Yp)].map(e=>e[1]),HN=(e,t)=>{let n=e.value_field,r=e.display_fields??[n??`{{${t}}}`],i=e.search_fields??r,a=IN(n??`{{slug}}`),o=r.map(IN).join(` `),s=i.map(IN).join(` `),c=sT([...VN(o),...VN(a),...VN(s)]);return{_valueField:a,_displayField:o,_searchField:s,allFieldNames:c,hasListFields:c.some(e=>e.includes(`*`))}}})),WN,GN,KN,qN,JN,YN,XN,ZN,QN,Jie=o((()=>{Np(),KP(),RN(),UN(),Gy(),WN=/\.(\d+)$/,GN=(e,t)=>{let n=new Map,r=new Map;return e.filter(e=>e.includes(`*`)).forEach(e=>{let r=e.replace(/\.\*.*$/,``),i=BP({...t,keyPath:r});n.set(e,{baseFieldName:r,fieldConfig:i,isComplexListField:LN(i)})}),[...n.entries()].forEach(([e,t])=>{let{baseFieldName:n}=t;r.has(n)||r.set(n,[]),r.get(n).push([e,t])}),r},KN=new Map,qN=({baseFieldName:e,groupEntries:t,content:n,templates:r,allFieldNames:i,context:a,fallbackContext:o})=>{let{_displayField:s,_valueField:c,_searchField:l}=r,u=Wy(KN,e,()=>RegExp(`^${Dp(e)}.\\d+$`));return Object.entries(n).filter(([e])=>u.test(e)).map(([e,t])=>{let n=e.match(WN);return{index:parseInt(n[1],10),value:t}}).sort((e,t)=>e.index-t.index).map(({value:e})=>{let n={label:s,value:c,searchValue:l};t.forEach(([t])=>{n.label=n.label.replaceAll(`{{${t}}}`,e),n.value=n.value.replaceAll(`{{${t}}}`,e),n.searchValue=n.searchValue.replaceAll(`{{${t}}}`,e)});let{label:r,value:u,searchValue:d}=BN(n,i.filter(e=>!e.includes(`*`)),a,o);return{label:r||``,value:u||a.slug,searchValue:d||r||``}})},JN=/^(.+)\.\*\.(.+)$/,YN=new Map,XN=e=>{let t=null;return e.some(([e])=>(t=e.match(JN),!!t)),t},ZN=({groupEntries:e,content:t,templates:n,allFieldNames:r,context:i,fallbackContext:a})=>{let[,o,s]=XN(e)??[];if(!o)return[];let c=`${o}:${s}`,l=Wy(YN,c,()=>{let e=Dp(o),t=Dp(s);return RegExp(`^${e}.([0-9]+).${t}$`)}),u=Object.entries(t).filter(([e])=>l.test(e)).map(([e,t])=>{let n=e.match(l);return{index:parseInt(n[1],10),value:t}}).sort((e,t)=>e.index-t.index),{_displayField:d,_valueField:f,_searchField:p}=n;return u.map(({index:n})=>{let o={label:d,value:f,searchValue:p};e.forEach(([e])=>{let r=e.match(JN);if(r){let[,i,a]=r,s=t[`${i}.${n}.${a}`]||``;o.label=o.label.replaceAll(`{{${e}}}`,s),o.value=o.value.replaceAll(`{{${e}}}`,s),o.searchValue=o.searchValue.replaceAll(`{{${e}}}`,s)}});let{label:s,value:c,searchValue:l}=BN(o,r.filter(e=>!e.includes(`*`)),i,a);return{label:s||``,value:c||i.slug,searchValue:l||s||``}})},QN=({baseFieldGroups:e,content:t,templates:n,allFieldNames:r,context:i,fallbackContext:a})=>{let o=[],s=!1;return e.forEach((e,c)=>{if(e.length===0)return;let[,l]=e[0],u={groupEntries:e,content:t,templates:n,allFieldNames:r,context:i,fallbackContext:a},d=l.isComplexListField?ZN({...u}):qN({...u,baseFieldName:c});o.push(...d),s=!0}),{results:o,hasProcessedListFields:s}}})),$N,Yie=o((()=>{ZP(),UN(),$N=({templates:e,allFieldNames:t,context:n,fallbackContext:r})=>{let{slug:i}=n,{_displayField:a,_valueField:o,_searchField:s}=e,{content:c,locales:l,defaultLocale:u,identifierField:d}=r,f=Object.fromEntries(t.map(e=>[e,zN(e,n,r)])),p=a,m=o,h=s;return Object.entries(f).forEach(([e,t])=>{p=p.replaceAll(`{{${e}}}`,t),m=m.replaceAll(`{{${e}}}`,t),h=h.replaceAll(`{{${e}}}`,t)}),(!p||p.trim()===``)&&(p=JP(c,{identifierField:d})||JP(l[u]?.content||{},{identifierField:d})||i),{label:p||``,value:m||i,searchValue:h||p||``}}})),eP,Xie=o((()=>{mw(),KP(),Jie(),Yie(),UN(),eP=({refEntry:e,content:t,collection:n,templates:r,allFieldNames:i,hasListFields:a,collectionName:o,fileName:s,locale:c,identifierField:l,defaultLocale:u})=>{let{slug:d,locales:f}=e,p={collectionName:o,fileName:s,isIndexFile:pw(n,e),keyPath:``},m={slug:d,locale:c,getDisplayValue:(e,n)=>UP({...p,keyPath:e,valueMap:n?f[n].content:t,locale:n??c})},h={content:t,locales:f,defaultLocale:u,identifierField:l};if(!a)return[$N({templates:r,allFieldNames:i,context:m,fallbackContext:h})];let{results:g,hasProcessedListFields:_}=QN({baseFieldGroups:GN(i,p),content:t,templates:r,allFieldNames:i,context:m,fallbackContext:h});if(_)return g;let{_displayField:v,_valueField:y,_searchField:b}=r,{label:x,value:S,searchValue:C}=BN({label:v,value:y,searchValue:b},i.filter(e=>!e.includes(`*`)),m,h);return[{label:x||``,value:S||d,searchValue:C||x||``}]}})),tP,nP,rP,Zie=o((()=>{tP=/^{{fields\.(.+?)}}$/,nP=(e,t,n=void 0)=>e.map(({field:e,values:r,exclude:i})=>({field:e,exclude:i,values:r.flatMap(e=>{if(typeof e!=`string`)return[e];if(e===`{{slug}}`)return n?[n]:[];let r=e.match(tP);if(!r)return[e];let i=t?.[r[1]];return i===void 0?[]:[i]})})),rP=({refEntries:e,locale:t,fileName:n=void 0,entryFilters:r=[],defaultLocale:i=void 0})=>e.filter(e=>!n||n===e.slug).map(e=>{let{content:n}=e.locales[t]??(i?e.locales[i]:void 0)??e.locales._default??{};return{refEntry:e,hasContent:!!n&&Object.keys(n).length>0,content:n??{}}}).filter(({hasContent:e,content:t,refEntry:n})=>e&&r.every(({field:e,values:r,exclude:i=!1})=>{if(r.length===0)return!0;let a=e===`slug`,o=e.replace(/^fields\./,``),s=a?n.slug:t[o];return i?!r.includes(s):r.includes(s)}))})),iP,aP,oP,sP=o((()=>{Np(),dw(),AN(),qie(),Xie(),Zie(),UN(),iP=new Map,aP=({locale:e,fieldConfig:t,refEntries:n,currentLocaleValues:r=void 0,currentSlug:i=void 0})=>{let{collection:a,file:o,filters:s}=t,c=nP(s??[],r,i),l=c.flatMap(({values:e})=>e).join(`\0`),u=`${e}|${`${FN(t)}|${FN(n)}`}|${l}`,d=iP.get(u);if(d)return d;let f=cw(a);if(!f)return iP.set(u,[]),[];let{_type:p,_i18n:{defaultLocale:m}}=f,{identifier_field:h=`title`}=p===`entry`?f:{},g=HN(t,h),{allFieldNames:_,hasListFields:v}=g,y=rP({refEntries:n,locale:e,fileName:o,entryFilters:c,defaultLocale:m}).flatMap(({refEntry:t,content:n})=>eP({refEntry:t,content:n,collection:f,templates:g,allFieldNames:_,hasListFields:v,collectionName:a,fileName:o,locale:e,identifierField:h,defaultLocale:m})).sort((e,t)=>Mp(e.label,t.label));return iP.set(u,y),y},oP=({fieldConfig:e,valueMap:t,keyPath:n,locale:r})=>{let{multiple:i,collection:a}=e,o=EN(a),s=MN(aP({locale:r,fieldConfig:e,refEntries:o})),c=e=>s.get(e)||e;return i?Object.entries(t).filter(([e])=>e.match(`^${Dp(n)}\\.\\d+$`)).map(([,e])=>e).map(c):c(t[n])}})),cP,lP,uP,dP=o((()=>{cc(),cP=({multiline:e,dotAll:t,source:n})=>e||t||n.includes(`[\\s\\S]`)||n.includes(`[\\S\\s]`),lP=e=>sc(Object.fromEntries(Object.entries(oc(e)).filter(([e])=>!e.split(`.`).pop()?.startsWith(`__sc_`)))),uP=e=>e.replace(/"/g,`'`)})),fP,pP,mP,hP,gP=o((()=>{fP=/!\[(?<alt>(?:[^\]\\]|\\.)*)\]\((?<src>(?:[^"()\\]|\\.|\([^)]*\)|"[^"]*")*?)(?:\s+"(?<title>(?:[^"\\]|\\.)*)")?\)/,pP=new RegExp(fP,`g`),mP=/\[!\[(?<alt2>(?:[^\]\\]|\\.)*)\]\((?<src2>(?:[^"()\\]|\\.|\([^)]*\)|"[^"]*")*?)(?:\s+"(?<title2>(?:[^"\\]|\\.)*)")?\)\](?:\((?<link>[^)]*\([^)]*\)[^)]*|[^)]*)\))/,hP=RegExp(`${fP.source}|${mP.source}`)})),_P,vP,yP,bP=o((()=>{dx(),_P=e=>e.replace(/&(?![a-zA-Z0-9#]+;)/g,`&amp;`).replaceAll(`"`,`&quot;`),vP={ALLOWED_TAGS:[`a`],ALLOWED_ATTR:[`href`,`target`,`rel`]},yP=(e,t)=>ux(e.replace(`<a>`,`<a href="${_P(t)}" target="_blank" rel="noopener noreferrer">`),vP)})),xP,SP,CP,wP=o((()=>{X(),mp(),dP(),gP(),bP(),xP={id:`image`,label:`Image`,fields:[{name:`src`,label:`Source`,widget:`image`},{name:`alt`,label:`Alt Text`,required:!1},{name:`title`,label:`Title`,required:!1}],pattern:fP,toBlock:e=>{let{src:t=``,alt:n=``,title:r=``}=e;return t?`![${n}](${t}${r?` "${uP(r)}"`:``})`:``},toPreview:e=>{let{src:t=``,alt:n=``,title:r=``}=e;return`<img src="${_P(t)}" alt="${_P(n)}" title="${_P(r)}">`}},SP={id:`linked-image`,label:`Image`,fields:[...xP.fields,{name:`link`,label:`Link`,required:!1}],pattern:hP,fromBlock:e=>{let{src:t,alt:n,title:r,src2:i,alt2:a,title2:o,link:s}=e.groups??{};return{src:(t||i||``).trim(),alt:(n||a||``).trim(),title:(r||o||``).trim(),link:(s||``).trim()}},toBlock:e=>{let{src:t=``,alt:n=``,title:r=``,link:i=``}=e,a=t?`![${n}](${t}${r?` "${uP(r)}"`:``})`:``;return a&&i?`[${a}](${i})`:a},toPreview:e=>{let{src:t=``,alt:n=``,title:r=``,link:i=``}=e,a=`<img src="${_P(t)}" alt="${_P(n)}" title="${_P(r)}">`;return i?`<a href="${_P(i)}">${a}</a>`:a}},CP=e=>{if(cp.has(e))return cp.get(e);let t={icon:`image`,label:Y(`editor_components.image`),fields:[{name:`src`,label:Y(`editor_components.src`),widget:`image`},{name:`alt`,label:Y(`editor_components.alt`),required:!1},{name:`title`,label:Y(`editor_components.title`),required:!1}]};return{image:{...xP,...t},"linked-image":{...SP,...t,fields:[...t.fields,{name:`link`,label:Y(`editor_components.link`),required:!1}]}}[e]}})),TP,EP,DP,OP=o((()=>{TP=/^\d+$/,EP=e=>TP.test(e),DP=(e,t)=>{if(typeof e!=`number`)return NaN;if(!Number.isFinite(e))return e;let n=10**t;return Math.round(e*n)/n}})),kP,AP,Qie,$ie,eae=o((()=>{cT(),OP(),kP=new Map,AP=new WeakMap,Qie=e=>{let t=AP.get(e);return t===void 0&&(t=JSON.stringify(e),AP.set(e,t)),t},$ie=({fieldConfig:e,valueMap:t,keyPath:n})=>{let{multiple:r,options:i}=e,a=oT(i),o;if(r){let e=`${n}.`;o=Object.entries(t).filter(([t])=>t.startsWith(e)&&EP(t.slice(e.length))).map(([,e])=>e)}let s=Qie(i),c=r?`${n}|${s}|${JSON.stringify(o)}`:`${n}|${s}|${String(t[n])}`,l=kP.get(c);if(l)return l;let u=e=>i.find(t=>t.value===e)?.label||e;if(r){let e=a?o.map(u):o;return kP.set(c,e),e}let d=t[n],f=a?u(d):d;return kP.set(c,f),f}})),jP,MP,NP,PP=o((()=>{qp(),AF(),jP=e=>{if(!e)return;let t=Object.values(e);if(t.some(e=>e.config?.multiple===!0))return!0;if(t.some(e=>e.config?.multiple===!1))return!1},MP=e=>{if(!e?.config)return;let{multiple:t}=e.config;if(typeof t==`boolean`)return t},NP=e=>{let t=A(TF);return e.multiple??jP(e.media_libraries)??MP(e.media_library)??jP(t?.media_libraries)??MP(t?.media_library)??!1}})),tae,nae,FP,IP,LP,RP,zP,rae,BP,VP,iae,HP,UP,WP,GP,KP=o((()=>{Np(),uC(),dw(),mw(),EC(),kC(),Ww(),sP(),wP(),eae(),WC(),PP(),Gy(),OP(),tae=/^(.*?)<([^>]+)>(.*)$/,nae=/(?:^|\.)(\d+)(?:\.|$)/,FP=/\.\d+$/,IP=new Map,LP=(e,t)=>{if(e.length!==1)return!1;let[n]=e;return n.widget===t&&`root`in n&&n.root===!0},RP=e=>{let t=e.widget??`string`;return DC.includes(t)?NP(e):OC.includes(t)?!!e.multiple:!1},zP=e=>{let t=e.match(tae);if(!t)return{cleanKey:e};let[,n,r,i]=t;return i?{cleanKey:e}:{cleanKey:n||``,typeName:r}},rae=({field:e,key:t,keyPathArray:n,segmentIndex:r,pendingExplicitType:i,valueMap:a})=>{let{cleanKey:o,typeName:s}=zP(t),{widget:c=`text`}=e,l=s??i,u=EP(o),d=o===`*`;if((u||d)&&OC.includes(c))return{field:RP(e)?e:void 0,explicitType:l};let{field:f}=e,{fields:p}=e,{types:m,typeKey:h=`type`}=e;if(f){let e=u||d?n[r+1]:void 0;return{field:!e||f.name===e||f.widget===`object`&&`fields`in f&&f.fields?.some(t=>t.name===e)?f:void 0,explicitType:l}}if(p&&(u||d))return{field:e,explicitType:l};if(p&&!u&&o!==``)return{field:p.find(({name:e})=>e===o),explicitType:l};if(m&&(u||d)){let e=l??a[[n.slice(0,r).join(`.`),o,h].join(`.`)];return{field:m.find(({name:t})=>t===e),explicitType:d?void 0:l}}if(m&&t!==h&&o!==h&&o!==``){let e=l??a[[n.slice(0,r).join(`.`),h].join(`.`)];return{field:m.find(({name:t})=>t===e)?.fields?.find(({name:e})=>e===o),explicitType:void 0}}return{field:void 0,explicitType:l}},BP=e=>{let{collectionName:t,fileName:n=void 0,componentName:r=void 0,valueMap:i={},keyPath:a,isIndexFile:o=!1}=e,s=nae.test(a)?JSON.stringify(e):`${t}|${n??``}|${r??``}|${a}|${o?`1`:`0`}`;if(IP.has(s))return IP.get(s);let c=cw(t),l=c&&n?xC(c,n):void 0;if(!c||n&&c?._type!==`entry`&&!l){IP.set(s,void 0);return}let{fields:u=[]}=l??c,d=o?fw(c):void 0,f=r?CP(r)?.fields??[]:d?.fields??u,p=a.split(`.`),m,h;if(p.forEach((e,t)=>{if(t===0){let{cleanKey:t,typeName:n}=zP(e);m=f.find(({name:e})=>e===t),!m&&d?.fields&&(m=u.find(({name:e})=>e===t)),n&&(h=n)}else if(m){let n=rae({field:m,key:e,keyPathArray:p,segmentIndex:t,pendingExplicitType:h,valueMap:i});m=n.field,h=n.explicitType}}),h&&m&&`types`in m){let{types:e}=m;m=e.find(({name:e})=>e===h)}return IP.set(s,m),m},VP=({fieldConfig:{required:e=!0},locale:t})=>Array.isArray(e)?e.includes(t):!!e,iae=new Map,HP=new Map,UP=({collectionName:e,fileName:t,valueMap:n={},keyPath:r,locale:i,transformations:a,isIndexFile:o=!1})=>{let s=BP({collectionName:e,fileName:t,valueMap:n,keyPath:r,isIndexFile:o}),c=n[r];if(c===void 0&&a?.length)return``;if(s?.widget===`datetime`&&(a?.some(({method:e})=>e===`date`)||(c=Uw({locale:i,fieldConfig:s,currentValue:c}))),s?.widget===`relation`&&(c=oP({fieldConfig:s,valueMap:n,keyPath:r,locale:i})),s?.widget===`select`&&(c=$ie({fieldConfig:s,valueMap:n,keyPath:r})),s?.widget===`list`){let{fields:e}=s,{types:t}=s;if(!(e||t)){let e=Wy(iae,r,()=>RegExp(`^${Dp(r)}${String.raw`\.\d+$`}`));c=HC(i).format(Object.entries(n).filter(([t,n])=>e.test(t)&&typeof n==`string`&&!!n).map(([,e])=>e))}}if(s?.widget===`number`){let{value_type:e=`int`}=s;if(e===`int`||e===`float`){let e=LC(i),t=HP.get(e);t||(t=Intl.NumberFormat(e),HP.set(e,t)),c=t.format(Number(c))}}return Array.isArray(c)&&(c=HC(i).format(c)),a?.length&&(c=lC({fieldConfig:s,value:c,transformations:a,locale:i})),String(c??``)},WP=({valueMap:e,locale:t,keyPath:n,keyPathRegex:r,getFieldArgs:i})=>{let a=[`${n}.title`,`${n}.name`,...Object.keys(e)].find(t=>{let n=e[t];if(!r.test(t)||!(typeof n==`string`&&n.trim()||typeof n==`number`&&!Number.isNaN(n)))return!1;let a=BP({...i,keyPath:t});return!!a&&a.widget!==`hidden`});return a?UP({...i,keyPath:a,locale:t}):``},GP=({entry:e,locale:t,collectionName:n,key:r,resolveRef:i=!0})=>{let{slug:a,locales:o,commitAuthor:{name:s,login:c,email:l}={},commitDate:u}=e;if(r===`slug`)return a;if(r===`commit_author`)return s||c||l;if(r===`commit_date`)return u;let{content:d}=o[t]??{};if(d===void 0)return;let f=cw(n);if(f){if(i){let i=pw(f,e),a=BP({collectionName:n,keyPath:r,isIndexFile:i});if(a?.widget===`relation`)return oP({fieldConfig:a,valueMap:d,keyPath:r,locale:t})}return d[r]}}})),aae,qP,JP,oae,YP,XP,ZP=o((()=>{Fy(),Np(),dx(),GS(),lre(),Qp(),QS(),uC(),mw(),KP(),aae=/^#+\s+(?<header>.+?)(?:\s+\{#.+?\})?\s*$/m,qP=(e,{allowMarkdown:t=!1}={})=>(e=US(e),t&&(e=ire(e)),e=ux(e,{ALLOWED_TAGS:t?[`strong`,`em`,`code`]:[]}),t||(e=ire(e)),e.trim()),JP=(e,{identifierField:t=`title`,useBody:n=!0}={})=>{let r=[t,`title`,`name`,`label`].find(t=>typeof e[t]==`string`&&!!e[t].trim());return r?e[r].trim():n&&typeof e.body==`string`?e.body.match(aae)?.groups?.header??``:``},oae=(e,t)=>{let{slug:n,entryPath:r,basePath:i,locales:a,commitDate:o,commitAuthor:s}=t;if(e===`slug`)return n;if(e===`locales`)return a.sort((e,t)=>e.localeCompare(t)).join(`, `);if(e===`dirname`){let e=r.replace(/[^/]+$/,``);if(i){let t=i.endsWith(`/`)?i:`${i}/`;e.startsWith(t)?e=e.slice(t.length):e.startsWith(i)&&(e=e.slice(i.length))}return kp(e)}if(e===`filename`)return r.split(`/`).pop().split(`.`).shift();if(e===`extension`)return r.split(`/`).pop().split(`.`).pop();if(e===`commit_date`)return o??``;if(e===`commit_author`)return s?.name||s?.login||s?.email},YP=(e,t)=>{let{content:n,collectionName:r,replaceSubContext:i,defaultLocale:a}=t,{value:o,transformations:s}=cC(e),c=o.replace(/^fields\./,``),l={collectionName:r,valueMap:n,keyPath:c},u=oae(o,i),d=ZS(s,e=>YP(e,t));if(u===void 0&&(u=d.some(({method:e})=>e===`date`||e===`ternary`)?n[c]:UP({...l,locale:a})),u===void 0)return``;if(u instanceof Date&&!d.length){let{year:e,month:t,day:n}=Py({date:u});return`${e}-${t}-${n}`}return d.length&&(u=lC({fieldConfig:BP({...l}),value:u,transformations:d,locale:a})),String(u)},XP=(e,t,{locale:n,useTemplate:r=!1,allowMarkdown:i=!1}={})=>{if(pw(e,t))return fw(e)?.label;let{_type:a,name:o,_i18n:{defaultLocale:s}}=e,{_file:{basePath:c}={},identifier_field:l=`title`,summary:u}=a===`entry`?e:{},{locales:d,slug:f,commitDate:p,commitAuthor:m}=t,{content:h={},path:g=``}=d[n??s]??Object.values(d)[0]??{};if(!r||!u)return qP(JP(h,{identifierField:l})||f.replaceAll(`-`,` `),{allowMarkdown:i});let _={content:h,collectionName:o,replaceSubContext:{slug:f,entryPath:g,basePath:c,locales:Object.keys(d),commitDate:p,commitAuthor:m},defaultLocale:s};return qP(u.replace(Yp,(e,t)=>YP(t,_)),{allowMarkdown:i})}})),sae,cae,lae,uae,dae,fae=o((()=>{Ep(),Qp(),ZP(),sae=(e,t)=>pee.includes(e)?t[e]:void 0,cae=e=>{switch(e){case`uuid`:return Cp();case`uuid_short`:return Cp(`short`);case`uuid_shorter`:return Cp(`shorter`);default:return}},lae=(e,t,n,r)=>{if(!(e!==`slug`||!t))return n===`preview_path`&&r?``:t},uae=(e,t,n)=>{if(!t)return``;switch(e){case`dirname`:{let e=t.replace(n??``,``),r=e.lastIndexOf(`/`);return r>0?e.substring(0,r):``}case`filename`:return t.split(`/`).pop().split(`.`).shift();case`extension`:return t.split(`/`).pop().split(`.`).pop();default:return}},dae=(e,t,n)=>e.startsWith(`fields.`)?t[e.replace(/^fields\./,``)]:e===`slug`?JP(t,{identifierField:n}):t[e]})),QP,pae,mae=o((()=>{Ep(),Yy(),fae(),QS(),uC(),KP(),QP=(e,t)=>{let{type:n,content:r,currentSlug:i,entryFilePath:a,locale:o,dateTimeParts:s,identifierField:c,basePath:l,isIndexFile:u=!1}=t,d=sae(e,s);if(d!==void 0)return d;let f=lae(e,i,n??``,u);if(f!==void 0)return f;let p=cae(e);if(p!==void 0)return p;if(n===`preview_path`&&e===`locale`)return o;if(n===`preview_path`||n===`media_folder`){let t=uae(e,a,l);if(t!==void 0)return t}return dae(e,r,c)},pae=(e,t)=>{let{replaceSubContext:n,getFieldArgs:r}=t,{value:i,transformations:a}=cC(e),o=QP(i,n),s=ZS(a,e=>String(QP(e,n)??``)),c=a.some(e=>e.args.defaultValue!==void 0);if(o===void 0&&!c)return Cp(`short`);let{type:l,locale:u}=n;return s.length&&(o=lC({fieldConfig:BP({...r,keyPath:i}),value:o,transformations:s,locale:u})),l?String(o):Jy(String(o),{locale:u,maxLength:1/0})}})),$P,hae,eF,tF=o((()=>{Fy(),Np(),qp(),Qp(),mae(),AF(),AN(),FE(),$P=e=>Jp.test(e),hae=(e,t)=>EN(e).map(e=>t?e.locales[t]?.slug:e.slug).filter(Boolean),eF=(e,t)=>{let{collection:n,content:r,currentSlug:i,locale:a,dateTimeParts:o,isIndexFile:s=!1}=t,{_type:c,name:l}=n,{identifier_field:u=`title`,slug_length:d=void 0,_file:{basePath:f}={}}=c===`entry`?n:{},p=A(TF)?.slug,m=d??p?.maxlength,h=p?.timezone===`local`?void 0:`UTC`,g={replaceSubContext:{...t,dateTimeParts:o??Py({timeZone:h}),identifierField:u,basePath:f},getFieldArgs:{collectionName:l,keyPath:``,valueMap:r,isIndexFile:s}},_=e.replace(Yp,(e,t)=>pae(t,g)).trim();return i?_:(typeof m==`number`&&(_=Op(_,m,{ellipsis:``}).replace(/-$/,``)),kE(_,hae(l,a)))}})),nF,rF,iF,gae,aF,oF,_ae,vae,yae,bae=o((()=>{Gp(),Np(),tF(),dw(),EC(),nF=[],rF=e=>e.includes(`{{media_folder}}`)||e.includes(`{{public_folder}}`),iF=(e,{globalMediaFolder:t,globalPublicFolder:n})=>e.trim().replace(`{{media_folder}}`,`/${t}`).replace(`{{public_folder}}`,`/${n}`).replace(`//`,`/`),gae=({collectionName:e,fileName:t,componentName:n,typedKeyPath:r,isIndexFile:i=!1,mediaFolder:a,publicFolder:o,baseFolder:s,globalFolders:c,label:l,icon:u,isAssetCollection:d=!1})=>{if(rF(a)){if(!c)return;a=iF(a,c)}if(o===void 0)o=a;else if(rF(o)){if(!c)return;o=iF(o,c)}a=a.replace(/^\.(?:\/|$)/,``);let f=!a.startsWith(`/`);return{collectionName:e,fileName:t,componentName:n,typedKeyPath:r,isIndexFile:i,internalPath:kp(f?s??``:a),internalSubPath:f?kp(a):void 0,publicPath:/^($|[.@])/.test(o)?o:`/${kp(o)}`,entryRelative:f,hasTemplateTags:$P(a),label:l,icon:u,isAssetCollection:d}},aF=e=>{if(e.mediaFolder===void 0)return;let t=gae(e);if(!t)return;let{globalMediaFolder:n,globalPublicFolder:r}=e.globalFolders??{};!t.entryRelative&&t.internalPath===n&&t.publicPath===r||nF.push(t)},oF=({collectionName:e,files:t,globalFolders:n})=>{bC(t).forEach(t=>{let{name:r,file:i,media_folder:a,public_folder:o}=t;aF({collectionName:e,fileName:r,mediaFolder:a,publicFolder:o,baseFolder:Rp(i).dirname,globalFolders:n})})},_ae=({fieldMediaFolders:e,validCollections:t,globalFolders:n})=>{e.forEach(({fieldConfig:e,context:r})=>{let{collection:i,collectionFile:a,componentName:o,typedKeyPath:s,isIndexFile:c}=r;!(i&&(i.name===`_singletons`||t.some(e=>e.name===i.name)))&&!o||aF({collectionName:i?.name,fileName:a?.name,componentName:o,typedKeyPath:s,isIndexFile:c,mediaFolder:e.media_folder,publicFolder:e.public_folder,baseFolder:i&&`folder`in i?i.folder:void 0,globalFolders:n})})},vae=({assetCollections:e,globalFolders:t})=>{e.forEach(e=>{let{name:n,label:r=n,icon:i,media_folder:a,public_folder:o}=e;a!==void 0&&aF({collectionName:`assets:${n}`,mediaFolder:`/${kp(a)}`,publicFolder:o,globalFolders:t,label:r,icon:i,isAssetCollection:!0})})},yae=(e,t=[])=>{nF.length=0;let{media_folder:n,public_folder:r,collections:i,singletons:a,asset_collections:o}=e,s=n!==void 0,c=s?kp(n).replace(/^\.$/,``):``,l=s?r?`/${kp(r)}`.replace(/^\/@/,`@`):`/${c}`:``,u={collectionName:void 0,internalPath:void 0,internalSubPath:void 0,publicPath:void 0,entryRelative:!1,hasTemplateTags:!1,label:void 0,icon:void 0,isAssetCollection:!1},d=s?{...u,internalPath:c,publicPath:l}:void 0,f=s?{globalMediaFolder:c,globalPublicFolder:l}:void 0,p=aw({collections:i});p.forEach(e=>{let{name:t,files:n,folder:r,path:i,media_folder:a,public_folder:o}=e;aF({collectionName:t,mediaFolder:s&&a===void 0&&i!==void 0?``:a,publicFolder:o,baseFolder:r,entryPath:i,globalFolders:f}),n?.length&&oF({collectionName:t,files:n,globalFolders:f})}),a?.length&&oF({collectionName:`_singletons`,files:a,globalFolders:f}),_ae({fieldMediaFolders:t,validCollections:p,globalFolders:f}),nF.sort((e,t)=>Mp(e.internalPath,t.internalPath));let m=[];return d&&m.push(d),o?.length&&vae({assetCollections:o,globalFolders:f}),m.push(...nF),m.length&&m.unshift(u),m}})),xae,sF,cF,Sae,Cae,wae,Tae,Eae=o((()=>{Np(),dw(),EC(),WC(),$C(),xae=({collection:e,file:t})=>{let n=kp(t.file);if(!n.includes(`{{locale}}`))return{_default:n};let r=QC(e,t);return Object.fromEntries(r.allLocales.map(e=>[e,UC({_i18n:r,locale:e,path:n})]))},sF=(e,t)=>{if(yC(t))return{collectionName:e.name,fileName:t.name,filePathMap:xae({collection:e,file:t})}},cF=(e,t)=>Mp(Object.values(e.filePathMap??{})[0],Object.values(t.filePathMap??{})[0]),Sae=({collections:e})=>aw({collections:e,type:`entry`}).map(e=>{let{name:t,folder:n}=e,r=kp(n),{allLocales:i,defaultLocale:a,omitDefaultLocaleFromFilePath:o,structureMap:{i18nMultiRootFolder:s}}=QC(e);return{collectionName:t,folderPath:r,folderPathMap:Object.fromEntries(i.map(e=>[e,s?o&&e===a?r:`${e}/${r}`:r]))}}).sort((e,t)=>Mp(e.folderPath,t.folderPath)),Cae=({collections:e})=>aw({collections:e,type:`file`}).flatMap(e=>(e.files??[]).map(t=>sF(e,t))).filter(e=>!!e).sort(cF),wae=({singletons:e})=>{let t=Array.isArray(e)?bC(e):[];if(!t.length)return[];let n={name:`_singletons`,files:t};return t.map(e=>sF(n,e)).filter(e=>!!e).sort(cF)},Tae=e=>[...Sae(e),...Cae(e),...wae(e)]})),Dae,Oae=o((()=>{Dae=[`text/yaml`,`application/yaml`,`application/toml`,`application/json`]})),kae,Aae,jae,Mae,lF,Nae=o((()=>{X(),f(),kae=l(cte(),1),Oae(),nE(),SE(),zD(),Aae=async({href:e,type:t=`application/yaml`},{manualInit:n=!1,showSchemaTip:r}={})=>{let i;if(!Dae.includes(t))throw Error(Y(`config.error.parse_failed`),{cause:Error(Y(`config.error.parse_failed_unsupported_type`))});let a=n?`config.error.fetch_failed_with_manual_init`:`config.error.fetch_failed`;try{let t=new URL(e,window.location.href);t.searchParams.set(`_`,Date.now().toString()),i=await fetch(t)}catch(e){throw Error(Y(a),{cause:e})}let{ok:o,status:s}=i;if(!o)throw Error(Y(a),{cause:Error(Y(`config.error.fetch_failed_not_ok`,{values:{status:s}}))});let c=!1,l;try{if(t===`application/json`)l=await i.json(),u(l)&&l.$schema!==`https://unpkg.com/@sveltia/cms/schema/sveltia-cms.json`&&(c=!0);else{let e=await i.text();t===`application/toml`?(l=XT(e),e.includes(`#:schema https://unpkg.com/@sveltia/cms/schema/sveltia-cms.json`)||(c=!0)):(l=ZT(e,{merge:!0,maxAliasCount:-1}),e.includes(`# yaml-language-server: $schema=https://unpkg.com/@sveltia/cms/schema/sveltia-cms.json`)||(c=!0))}}catch(e){throw Error(Y(`config.error.parse_failed`),{cause:e})}if(!u(l))throw Error(Y(`config.error.parse_failed`),{cause:Error(Y(`config.error.parse_failed_invalid_object`))});return r&&c&&console.info(Y(`config.schema_tip`)),l},jae=e=>{if(e.endsWith(`/`))return`${e}config.yml`;let t=e.split(`/`);return t.pop()?.includes(`.`)?`${t.join(`/`)}/config.yml`:`${e}/config.yml`},Mae=e=>{let{origin:t}=window.location;return e.every(({href:e})=>LD(e,t))},lF=async({manualInit:e=!1}={})=>{let t=[...document.querySelectorAll(`link[rel="cms-config-url"]`)].map(({href:e,type:t})=>({href:e,type:t}));if(t.length||t.push({href:jae(window.location.pathname)}),!Mae(t))throw Error(Y(`config.error.insecure_urls`,{values:{count:t.length}}));let n=bE.isLocalHost&&!e&&t.length===1,r=await Promise.all(t.map(t=>Aae(t,{manualInit:e,showSchemaTip:n})));return r.length===1?r[0]:kae.default.all(r)}})),uF,dF,Pae,Fae,fF,pF=o((()=>{X(),WC(),uF=({type:e=`error`,strKey:t,values:n={},extraStrKey:r,context:i={},collectors:a})=>{let{collection:o,collectionFile:s,typedKeyPath:c}=i,{errors:l,warnings:u}=a,d=[];o&&d.push(Y(`config.error_locator.collection`,{values:{collection:o.label_singular??o.label??o.name}})),s&&d.push(Y(`config.error_locator.file`,{values:{file:s.label??s.name}})),c&&d.push(Y(`config.error_locator.field`,{values:{field:c}}));let f=e===`error`?l:u,p=Hh.current,m=d.length?`${HC(p).format(d)}: `:``,h=Y(`config.${e}.${t}`,{values:n});f.add(`${m}${h}${r?` ${Y(`config.${r}`)}`:``}`)},dF=({UNSUPPORTED_OPTIONS:e,config:t,context:n,collectors:r})=>{e.forEach(({type:e=`error`,prop:i,newProp:a,value:o,strKey:s=`unsupported_deprecated_option`})=>{i in t&&(o===void 0||t[i]===o)&&uF({type:e,strKey:s,values:{prop:i,newProp:a},extraStrKey:`compatibility_link`,context:n,collectors:r})})},Pae=/^[^\s.*:<>]+$/,Fae=e=>Pae.test(e),fF=({name:e,index:t,nameCounts:n,strKeyBase:r,context:i,collectors:a})=>{if(!e||typeof e!=`string`){let e=String(t+1);return uF({strKey:`missing_${r}`,context:i,values:{count:e},collectors:a}),!1}return Fae(e)?n[e]===1?(uF({strKey:`duplicate_${r}`,context:i,values:{name:e},collectors:a}),!1):(n[e]=(n[e]??0)+1,!0):(uF({strKey:`invalid_${r}`,context:i,values:{name:e},collectors:a}),!1)}})),Iae,Lae,Rae=o((()=>{X(),f(),wA(),MC(),pF(),Iae=[{type:`warning`,prop:`use_graphql`,strKey:`unsupported_ignored_option`},{type:`warning`,prop:`open_authoring`,strKey:`open_authoring_unsupported`}],Lae=(e,t)=>{let{backend:n}=e,{errors:r,warnings:i}=t;if(!u(n)){r.add(Y(`config.error.missing_backend`));return}let{name:a}=n;if(!a){r.add(Y(`config.error.missing_backend_name`));return}if(!yA.includes(a)){let e=vA[a],t=e?e.deprecated?`deprecated`:`known`:`custom`,n=e?.label,i=Y(`config.error.unsupported_${t}_backend`,{values:{name:n}});r.add(`${i} ${Y(`config.error.unsupported_backend_suggestion`)}`);return}if(a in bA){let{repo:o,automatic_deployments:s,auth_methods:c,auth_type:l,app_id:u}=n;Array.isArray(c)&&!c.length&&r.add(Y(`config.error.no_auth_methods`));let d=!c||c.includes(`token`);o===void 0&&r.add(Y(`config.error.missing_repository`)),(typeof o!=`string`||!/^[^/:]+(?:\/[^/:]+)+$/.test(o))&&r.add(Y(`config.error.invalid_repository`)),l===`implicit`&&r.add(Y(`config.error.oauth_implicit_flow`).replace(`BACKEND_NAME`,a)),a===`github`&&l===`pkce`&&r.add(Y(`config.error.github_pkce_unsupported`)),a===`gitlab`&&l===`pkce`&&!u&&r.add(Y(`config.error.oauth_no_app_id`)),a===`gitea`&&!u&&(d?i.add(Y(`config.warning.oauth_no_app_id`)):r.add(Y(`config.error.oauth_no_app_id`))),s!==void 0&&jC(`automatic_deployments`),dF({UNSUPPORTED_OPTIONS:Iae,config:n,context:{cmsConfig:e},collectors:t})}}})),zae,mF,hF,Bae=o((()=>{IC(),zae=[`code`,`markdown`,`richtext`,`text`],mF=[`yaml`,`toml`,`json`],hF=(e,t,n=[])=>{if(!e||!t||t===`raw`)return!1;let r=t.endsWith(`-frontmatter`)||t===`frontmatter`;if(r&&n.length===1){let[{name:e,widget:t=`string`}]=n;if(e===`body`&&zae.includes(t))return!1}let i=e===`yml`?`yaml`:e,a=t===`yml`?`yaml`:t;if(NC.includes(i))return!r;if(a.endsWith(`-frontmatter`)){let e=a.replace(`-frontmatter`,``);return PC.includes(i)?!1:i!==e}return a===`frontmatter`?!kre.includes(i):mF.includes(a)?mF.includes(i)&&i!==a:!1}})),Vae,Hae,Uae,Wae,Gae=o((()=>{pF(),oC(),Vae=[{prop:`dateFormat`,newProp:`date_format`},{prop:`timeFormat`,newProp:`time_format`},{prop:`pickerUtc`,newProp:`picker_utc`}],Hae=e=>{try{return Intl.DateTimeFormat(`en-US`,{timeZone:e}),!0}catch{return!1}},Uae=e=>{let{config:t,context:n,collectors:r}=e,{picker_utc:i,input_timezone:a,output_utc:o}=t;i!==void 0&&(a!==void 0||o!==void 0)&&uF({type:`warning`,strKey:`conflicting_timezone_options`,context:n,collectors:r}),iC(a)&&!Hae(a)&&uF({strKey:`invalid_timezone`,values:{timeZone:a},context:n,collectors:r})},Wae=e=>{dF({...e,UNSUPPORTED_OPTIONS:Vae}),Uae(e)}})),Kae,gF,qae=o((()=>{pF(),Kae=[{prop:`allow_multiple`,newProp:`multiple`,strKey:`allow_multiple`}],gF=e=>{let{config:t,context:n,collectors:r}=e,{media_folder:i}=t;i!==void 0&&r.mediaFields.add({fieldConfig:t,context:n}),dF({...e,UNSUPPORTED_OPTIONS:Kae})}})),Jae,Yae,Xae=o((()=>{bF(),pF(),Jae=(e,t,n)=>e===`object`?!0:(uF({strKey:`invalid_list_variable_type`,context:t,values:{widget:e},collectors:n}),!1),Yae=e=>{let{config:t,context:n,collectors:r}=e,{field:i}=t,{fields:a}=t,{types:o}=t,{typedKeyPath:s}=n,c={nameCounts:{},strKeyBase:`variable_type`,collectors:r};if(i&&a||i&&o||a&&o){uF({strKey:`invalid_list_field`,context:n,collectors:r});return}i&&vF({config:i,context:{...n,typedKeyPath:`${s}.*`},collectors:r}),a&&yF(a,{...n,typedKeyPath:`${s}.*`},r),o?.forEach(({name:e,widget:t=`object`,fields:i},a)=>{let o={...n,typedKeyPath:`${s}.*<${e}>`};fF({...c,name:e,index:a,context:o})&&Jae(t,o,r)&&i&&yF(i,o,r)})}})),Zae,Qae,$ae=o((()=>{pF(),Zae=[{prop:`valueType`,newProp:`value_type`}],Qae=e=>{dF({...e,UNSUPPORTED_OPTIONS:Zae})}})),eoe,toe=o((()=>{bF(),pF(),eoe=e=>{let{config:t,context:n,collectors:r}=e,{fields:i}=t,{types:a}=t,{typedKeyPath:o}=n,s={nameCounts:{},strKeyBase:`variable_type`,collectors:r};if(i&&a){uF({strKey:`invalid_object_field`,context:n,collectors:r});return}if(!i&&!a){uF({strKey:`object_field_missing_fields`,context:n,collectors:r});return}i&&yF(i,n,r),a?.forEach(({name:e,fields:t},i)=>{let a={...n,typedKeyPath:`${o}<${e}>`};fF({...s,name:e,index:i,context:a})&&t&&yF(t,a,r)})}})),noe,roe,ioe=o((()=>{pF(),noe=[{prop:`displayFields`,newProp:`display_fields`},{prop:`searchFields`,newProp:`search_fields`},{prop:`valueField`,newProp:`value_field`},{type:`warning`,prop:`options_length`,strKey:`unsupported_ignored_option`}],roe=e=>{let{config:t,context:n,collectors:r}=e,i=t,{collection:a,file:o,value_field:s}=i,{cmsConfig:c}=n,l=a===`_singletons`?{files:c?.singletons}:c?.collections?.find(e=>e.name===a),u;if(l){let e=`files`in l&&Array.isArray(l.files);o?(e&&(u=l.files.find(e=>`file`in e&&e.name===o)),u||uF({strKey:`relation_field_invalid_collection_file`,context:n,collectors:r,values:{file:o}})):e&&uF({strKey:`relation_field_missing_file_name`,context:n,collectors:r,values:{collection:a}})}else uF({strKey:`relation_field_invalid_collection`,context:n,collectors:r,values:{collection:a}});dF({...e,UNSUPPORTED_OPTIONS:noe}),r.relationFields.add({fieldConfig:i,context:n})}})),aoe,_F,ooe=o((()=>{pF(),aoe=[{prop:`editorComponents`,newProp:`editor_components`}],_F=e=>{dF({...e,UNSUPPORTED_OPTIONS:aoe})}})),soe,vF,yF,bF=o((()=>{Gae(),qae(),Xae(),$ae(),toe(),ioe(),ooe(),pF(),soe={datetime:Wae,file:gF,image:gF,list:Yae,markdown:_F,number:Qae,object:eoe,relation:roe,richtext:_F},vF=e=>{let{config:t,context:n}=e,{name:r,widget:i=`string`}=t,{typedKeyPath:a}=n,o={...e,context:{...n,typedKeyPath:a?`${a}.${r}`:r}};soe[i]?.(o),i===`date`&&uF({...o,strKey:`date_field_type`})},yF=(e,t,n)=>{let r={nameCounts:{},strKeyBase:`field_name`,context:t,collectors:n};e?.forEach((e,i)=>{let{name:a}=e;fF({...r,name:a,index:i})&&vF({config:e,context:t,collectors:n})})}})),coe,xF,loe=o((()=>{Gp(),Bae(),bF(),pF(),coe=(e,t)=>{let{collection:n,collectionFile:r}=e,{file:i,format:a=n.format,fields:o,i18n:s}=r,{extension:c}=Rp(i);hF(c,a,o)&&uF({strKey:`file_format_mismatch`,context:e,values:{extension:c,format:a},collectors:t}),o?.length||uF({strKey:`collection_file_no_fields`,context:e,collectors:t}),i.includes(`{{locale}}`)&&!s&&uF({strKey:`collection_file_i18n_required`,context:e,collectors:t}),yF(o,e,t)},xF=(e,t)=>{let{cmsConfig:n,collection:r}=e,{files:i}=r,a={nameCounts:{},strKeyBase:`collection_file_name`,collectors:t};i.forEach((e,i)=>{if(`divider`in e)return;let{name:o}=e,s={cmsConfig:n,collection:r,collectionFile:e};fF({...a,name:o,index:i,context:s})&&coe(s,t)})}})),uoe,doe,foe,poe,moe=o((()=>{X(),MC(),loe(),Bae(),bF(),pF(),uoe=[{type:`warning`,prop:`nested`,strKey:`nested_collections_unsupported`},{prop:`sortableFields`,newProp:`sortable_fields`}],doe=(e,t)=>{let{cmsConfig:n,collection:r}=e,{extension:i,format:a,fields:o,index_file:s,slug:c,slug_length:l}=r;hF(i,a)&&uF({strKey:`file_format_mismatch`,values:{extension:i,format:a},context:e,collectors:t}),l!==void 0&&jC(`slug_length`),dF({UNSUPPORTED_OPTIONS:uoe,config:r,context:e,collectors:t}),o?.length||uF({strKey:`collection_no_fields`,context:e,collectors:t}),yF(o,e,t),s&&yF(s===!0?o:s.fields??o,{cmsConfig:n,collection:r,isIndexFile:!0},t),c?.includes(`/`)&&uF({strKey:`invalid_slug_slash`,values:{slug:c},context:e,collectors:t})},foe=({cmsConfig:e,collection:t},n)=>{let r=`divider`in t,i=`files`in t,a=`folder`in t;if(!r&&!i&&!a){uF({strKey:`invalid_collection_no_options`,context:{cmsConfig:e,collection:t},collectors:n});return}if(r&&i||r&&a||i&&a){uF({strKey:`invalid_collection_multiple_options`,context:{cmsConfig:e,collection:t},collectors:n});return}i?xF({cmsConfig:e,collection:t},n):a&&doe({cmsConfig:e,collection:t},n)},poe=(e,t)=>{let{collections:n,singletons:r}=e,{errors:i}=t;if(!Array.isArray(n)&&!Array.isArray(r)){i.add(Y(`config.error.no_collection`));return}let a={nameCounts:{},strKeyBase:`collection_name`,collectors:t};n?.forEach((n,r)=>{if(`divider`in n)return;let{name:i}=n,o={cmsConfig:e,collection:n};fF({...a,name:i,index:r,context:o})&&foe(o,t)}),Array.isArray(r)&&xF({cmsConfig:e,collection:{name:`_singletons`,label:Y(`singletons`),label_singular:Y(`singleton`),files:r}},t)}})),hoe,goe=o((()=>{X(),pF(),Zj(),hoe=(e,t)=>{let{media_folder:n,public_folder:r,media_library:i,media_libraries:a,asset_collections:o}=e,{errors:s}=t;if(n===void 0?!Xj.includes(i?.name??``)&&!Object.keys(a||{}).some(e=>Xj.includes(e))&&s.add(Y(`config.error.missing_media_folder`)):typeof n!=`string`&&s.add(Y(`config.error.invalid_media_folder`)),r!==void 0&&(typeof r==`string`?(/^\.{1,2}\//.test(r)&&s.add(Y(`config.error.public_folder_relative_path`)),/^https?:/.test(r)&&s.add(Y(`config.error.public_folder_absolute_url`))):s.add(Y(`config.error.invalid_public_folder`))),o!==void 0)if(!Array.isArray(o))s.add(Y(`config.error.invalid_asset_collections`));else{let n={nameCounts:{},strKeyBase:`asset_collection_name`,collectors:t};o.forEach((t,r)=>{let{name:i,media_folder:a}=t,o={cmsConfig:e};fF({...n,name:i,index:r,context:o})&&typeof a!=`string`&&s.add(Y(`config.error.asset_collection_invalid_media_folder`,{values:{name:i}}))})}}})),_oe,voe,yoe=o((()=>{Rae(),moe(),bF(),goe(),pF(),mp(),_oe=[{type:`warning`,prop:`publish_mode`,value:`editorial_workflow`,strKey:`editorial_workflow_unsupported`},{type:`warning`,prop:`local_backend`,strKey:`unsupported_ignored_option`},{type:`warning`,prop:`locale`,strKey:`unsupported_ignored_option`},{type:`warning`,prop:`search`,strKey:`unsupported_ignored_option`}],voe=(e,t)=>{Lae(e,t),hoe(e,t),poe(e,t),dF({UNSUPPORTED_OPTIONS:_oe,config:e,context:{cmsConfig:e},collectors:t}),cp.forEach(({fields:n},r)=>{yF(n,{cmsConfig:e,componentName:r},t)})}})),boe,SF,xoe,CF,wF,TF,EF,DF,OF,kF,Soe,AF=o((()=>{X(),Ep(),f(),Np(),boe=l(cte(),1),qp(),Ny(),cm(),bae(),Eae(),Nae(),yoe(),vC(),JO(),{DEV:SF,VITE_SITE_URL:xoe}={DEV:!1},CF=SF?xoe||`http://localhost:5174`:void 0,wF={},TF=ln(),EF=ln(),DF=ln([]),OF=un([TF,DF],([e,t])=>!!e||!!t.length),kF={errors:new Set,warnings:new Set,mediaFields:new Set,relationFields:new Set},Soe=async e=>{TF.set(void 0),DF.set([]),Object.assign(kF,{errors:new Set,warnings:new Set,mediaFields:new Set,relationFields:new Set});try{if(!window.isSecureContext)throw Error(Y(`config.error.no_secure_context`));let t;if(e){if(!u(e))throw Error(Y(`config.error.parse_failed`));t=e,t.load_config_file!==!1&&(t=(0,boe.default)(await lF({manualInit:!0}),t))}else t=await lF();if(Object.assign(wF,t),voe(t,kF),kF.errors.size)throw kF.errors.forEach(e=>{console.error(e)}),Error(`Errors found in configuration`);kF.warnings.size&&kF.warnings.forEach(e=>{console.warn(e)});let n=structuredClone(t);n._siteURL=n.site_url?.trim()||(SF?CF:window.location.origin),n._baseURL=jp(n._siteURL)?new URL(n._siteURL).origin:``,n.collections?.forEach(e=>{`folder`in e&&(e.folder===`.`||e.folder===`/`)&&(e.folder=``)}),TF.set(n),EF.set(await Tp(jy(n)))}catch(e){DF.set(kF.errors.size?[...kF.errors]:[e.name===`Error`?e.message:Y(`config.error.unexpected`)]),console.error(e,e.cause)}},TF.subscribe(e=>{if(qO.devModeEnabled&&(console.info(`cmsConfig`,e),console.info(`collectors`,kF)),!e)return;let t=Tae(e),n=yae(e,[...kF.mediaFields]);pC.set(t),$p.set(n),qO.devModeEnabled&&(console.info(`allEntryFolders`,t),console.info(`allAssetFolders`,n))})})),jF,MF=o((()=>{qp(),AF(),jF=({libraryName:e=`default`,fieldConfig:t}={})=>{let n=A(TF),r=e==="default"?{...n?.media_libraries?.all,...t?.media_libraries?.all}:void 0,i=e=>({...e,...r&&Object.keys(r).length>0&&{config:{...r,...e?.config}}});if(t?.media_libraries&&e in t.media_libraries){let n=t.media_libraries[e];return n===!1?!1:i(n)}if(t?.media_library){let r=n?.media_library?.name??`default`,a=t.media_library,o=a.name;if(r===e&&(o===e||o===void 0))return i(a)}if(n?.media_libraries&&e in n.media_libraries){let t=n.media_libraries[e];return t===!1?!1:i(t)}return n?.media_library?.name===e?i(n.media_library):i(null)}})),NF,Coe,PF=o((()=>{f(),MF(),jM(),GM(),NF=({fieldConfig:e}={})=>{let t=jF({fieldConfig:e}),{max_file_size:n,multiple:r,slugify_filename:i,transformations:a}=typeof t==`boolean`?{}:t?.config??{};return{enabled:t!==!1,config:{max_file_size:typeof n==`number`&&Number.isInteger(n)?n:1/0,multiple:typeof r==`boolean`?r:!1,slugify_filename:typeof i==`boolean`?i:!1,transformations:u(a)?a:void 0}}},Coe=async(e,t)=>{let[n,r]=e.type.split(`/`);if(n===`image`&&r!==`svg+xml`){let n;if(CM.includes(r)&&(r in t?n=t[r]:`raster_image`in t&&(n=t.raster_image)),n){let{format:t,quality:r,width:i,height:a}=n,o=t&&AM.includes(t)?t:`webp`,s=await UM(e,{format:o,quality:r&&Number.isSafeInteger(r)?r:85,width:i&&Number.isSafeInteger(i)?i:void 0,height:a&&Number.isSafeInteger(a)?a:void 0}),c=s.type===`image/${o}`?TM.test(e.name)?e.name.replace(TM,o):e.name.concat(o):e.name;return new File([s],c,{type:s.type})}}return n===`image`&&r===`svg+xml`&&t.svg?.optimize?new File([await WM(e)],e.name,{type:e.type}):e}})),FF,IF=o((()=>{PF(),FE(),FF=async(e,{slugify_filename:t=!1,transformations:n,max_file_size:r=1/0}={})=>{if(t){let{name:t,type:n,lastModified:r}=e,i=AE(t,{slugificationEnabled:!0});e=new File([e],i,{type:n,lastModified:r})}let i=e;return n&&(e=await Coe(e,n)),{file:e,originalFile:e===i?void 0:i,oversized:e.size>r}}})),woe,LF,RF,zF,BF,VF,Toe,HF,UF,WF,GF,KF,Eoe,qF,Doe,Ooe,JF,YF,XF,koe,ZF,QF,$F=o((()=>{Gp(),Np(),cc(),qp(),cm(),IF(),tF(),Qp(),dw(),mw(),EC(),yN(),PF(),FE(),woe=/^(?<entryFolder>.+?)(?:\/[^/]+)?$/,LF=ln([]),RF={source:void 0,map:new Map},zF=()=>{let e=A(LF);return e!==RF.source&&(RF.source=e,RF.map=new Map(e.map(e=>[e.path,e]))),RF.map},BF=e=>zF().get(e),VF=ln([]),Toe=un(VF,e=>new Set(e.map(e=>e.path))),HF=ln(),UF=ln(),WF=ln({folder:void 0,files:[]}),GF=ln(),KF=ln(),Eoe=un([WF],([e],t,n)=>{t({processing:!1,undersizedFiles:[],oversizedFiles:[],transformedFileMap:new WeakMap});let r=e.files,{config:i}=NF();(async()=>{r.length&&i.transformations&&n(e=>({...e,processing:!0}));let e=await Promise.all(r.map(e=>FF(e,i)));n(()=>({processing:!1,undersizedFiles:e.filter(({oversized:e})=>!e).map(({file:e})=>e),oversizedFiles:e.filter(({oversized:e})=>e).map(({file:e})=>e),transformedFileMap:new WeakMap(e.filter(({originalFile:e})=>e!==void 0).map(({file:e,originalFile:t})=>[e,t]))}))})()}),qF=({path:e,entry:t,collection:n,file:r,componentName:i,typedKeyPath:a})=>{let{locales:o}=t,{_i18n:{defaultLocale:s}}=r??n,c=a?rm({collectionName:n.name,fileName:r?.name,componentName:i,typedKeyPath:a}):void 0,l=c?.entryRelative?c.internalSubPath??``:(r??n).media_folder,{path:u,content:d}=o[s in o?s:Object.keys(o)[0]];if(!u||!d)return;let{entryFolder:f}=u.match(woe).groups,p=e.replace(/^\.\//,``),m=ME(jE([f,l,l&&p.startsWith(`${l}/`)?p.slice(l.length+1):p]));return zF().get(m)},Doe=({path:e,entry:t,collectionName:n,fileName:r,componentName:i,typedKeyPath:a})=>{if(!t){let t=[i?rm({componentName:i,typedKeyPath:a}):void 0,n&&a?rm({collectionName:n,fileName:r,typedKeyPath:a}):void 0,n?rm({collectionName:n,fileName:r}):void 0,n?rm({collectionName:n}):void 0,A(em)].filter(e=>!!e&&!e.hasTemplateTags),o;return t.find(t=>{let n=t.publicPath?.replace(/^\//,``)??``,r=n&&e.startsWith(`${n}/`)?e.slice(n.length+1):e,i=zF().get(jE([t.internalPath,t.internalSubPath??``,r]));return i&&(o=i),!!i}),o??zF().get(e)}return hN(t).flatMap(n=>{let r=CC(n,t),o={path:e,entry:t,collection:n,componentName:i,typedKeyPath:a};return r.length?r.map(e=>qF({...o,file:e})):qF({...o})}).filter(Boolean)[0]??zF().get(e)},Ooe=({path:e,entry:t,collectionName:n,fileName:r,componentName:i,typedKeyPath:a})=>{let o=zF().get(kp(e));if(o)return o;let{dirname:s=``,basename:c}=Rp(e),l;return[i?rm({componentName:i,typedKeyPath:a}):void 0,a?rm({collectionName:n,fileName:r,typedKeyPath:a}):void 0,rm({collectionName:n,fileName:r}),rm({collectionName:n}),A(em),A($p).findLast(e=>{let t=e.publicPath??``,n=Dp(t).replace(Xp,`.+?`);return s.match(`^${n}${t?`(?=\\/|$)`:`$`}`)})].filter(e=>!!e).find(e=>{let{publicPath:n,collectionName:r}=e,{internalPath:i}=e;if(i!==void 0&&Jp.test(i)){let e=r?cw(r):t?hN(t)?.[0]:void 0;if(!(t&&e))return!1;let{content:n,path:a}=t.locales[e._i18n.defaultLocale];i=eF(i,{type:`media_folder`,collection:e,content:oc(n),currentSlug:t.slug,entryFilePath:a,isIndexFile:pw(e,t)})}n&&i&&s&&(n===`/`?i=`${i}${s}`:s.startsWith(`${n}/`)&&(i=s.replace(n,i)));let a=jE([i,c]),o=zF().get(a);return o&&(l=o),!!o}),l},JF=e=>!/^[/@]/.test(e),YF=({value:e,...t})=>{let n=EE(e.split(`#`)[0]);return JF(n)?Doe({path:n,...t}):Ooe({path:n,...t})},XF=({folder:e},t)=>e===t||e.collectionName===t.collectionName&&e.fileName===t.fileName&&e.typedKeyPath===t.typedKeyPath&&e.isIndexFile===t.isIndexFile&&e.internalPath===t.internalPath&&e.internalSubPath===t.internalSubPath&&e.publicPath===t.publicPath&&e.entryRelative===t.entryRelative&&e.hasTemplateTags===t.hasTemplateTags,koe=e=>A(LF).filter(t=>XF(t,e)),ZF=e=>A(LF).filter(t=>Rp(t.path).dirname===e),tm.subscribe(()=>{HF.set(void 0)}),QF=(e,t)=>{if(!t.length||!e.length)return[];let n=new Set(t.map(({name:e})=>e.normalize().toLowerCase()));return e.filter(e=>n.has(e.name.normalize().toLowerCase()))}})),eI,tI,nI=o((()=>{Gp(),Np(),qp(),$F(),cm(),lN(),dw(),mw(),KP(),eI=async(e,t)=>{let{name:n,_i18n:{defaultLocale:r},_thumbnailFieldNames:i}=e,{locales:a}=t,{content:o}=a[r]??Object.values(a)[0]??{};if(!o)return;let s=i.some(e=>e.includes(`*`))?Object.keys(o):void 0,c=i.flatMap(e=>{if(e.includes(`*`)){let t=RegExp(`^${Dp(e).replace(`\\*`,`.+`)}$`);return s.filter(e=>t.test(e))}return e});for(let e of c){let r=o[e]?await cN({value:o[e],entry:t,collectionName:n,typedKeyPath:e,thumbnail:!0}):void 0;if(r)return r}},tI=({entry:e,collectionName:t,fileName:n,relative:r=!1})=>{let{locales:i}=e,a=cw(t);if(!a)return[];let o=pw(a,e),s=new Set,c=Object.values(i).flatMap(({content:i})=>Object.entries(i??{}).map(([i,a])=>{if(typeof a==`string`&&(!r||JF(a))){let s=BP({collectionName:t,keyPath:i,isIndexFile:o})?.widget??`string`;if(s!==`image`&&s!==`file`)return;let c=YF({value:a,entry:e,collectionName:t,fileName:n});if(c&&om(c.path).some(e=>e.collectionName===t&&e.fileName===n&&(r?e.entryRelative:!0)))return c}})).filter(e=>!!e&&!s.has(e)&&(s.add(e),!0));if(r&&rm({collectionName:t,fileName:n})?.entryRelative){let t=Rp(Object.values(e.locales)[0].path).dirname;if(t!==void 0){let e=new Set(c.map(({path:e})=>e));A(LF).forEach(n=>{let r=Rp(n.path).dirname;r!==void 0&&(r===t||r.startsWith(`${t}/`))&&!e.has(n.path)&&(c.push(n),e.add(n.path))})}}return c}})),rI,Aoe,iI,aI=o((()=>{f(),cc(),ap(),sp(),mp(),nI(),ID(),rI=[`preSave`,`postSave`,`prePublish`,`postPublish`,`preUnpublish`,`postUnpublish`],Aoe=[`preSave`,`prePublish`],iI=async({type:e,draft:t,savingEntry:n})=>{let{login:r=``,name:i=``}=FD.account,{collection:a,collectionFile:o,isNew:s,collectionName:c,fileName:l}=t,{_i18n:{defaultLocale:d}}=o??a,{slug:f,locales:p}=n,m=Object.keys(p).filter(e=>e!==d),{content:h,path:g}=p[d],_=tI({entry:n,collectionName:c,fileName:l});for(let t of pp){if(t.name!==e)continue;let n=await t.handler({author:{login:r,name:i},entry:op({content:h,otherLocales:m,locales:p,slug:f,path:g,isNew:s,collectionName:c,associatedAssets:_})});if(Aoe.includes(e)&&Xl(n)){let e=n.toJS();u(e.data)&&u(e.i18n)?(p[d].content=oc(e.data),m.forEach(t=>{u(e.i18n[t]?.data)&&(p[t].content=oc(e.i18n[t].data))})):p[d].content=oc(e)}}}})),joe=o((()=>{})),Z=o((()=>{joe(),typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`)})),Moe,Noe=o((()=>{Moe=`{"ok":"OK","cancel":"Cancel","close":"Close","clear":"Clear","insert":"Insert","update":"Update","remove":"Remove","collapse":"Collapse","expand":"Expand","dismiss":"Dismiss","calendar":{"year":"Year","previous_decade":"Previous Decade","next_decade":"Next Decade","month":"Month","previous_month":"Previous Month","next_month":"Next Month","today":"Today"},"split_button":{"x_options":"{$name} Options","more_options":"More Options"},"combobox":{"select_an_option":"Select an option…","filter_options":"Filter Options","no_matching_options":"No matching options found"},"number_input":{"decrease":"Decrease","increase":"Increase"},"password_input":{"show_password":"Show Password","hide_password":"Hide Password"},"secret_input":{"show_secret":"Show Secret","hide_secret":"Hide Secret"},"select_tags":{"selected_options":"Selected options","remove_x":"Remove {$name}"},"text_editor":{"text_editor":"Text Editor","code_editor":"Code Editor","text_style_options":"Text Style Options","show_text_style_options":"Show Text Style Options","paragraph":"Paragraph","heading_1":"Heading 1","heading_2":"Heading 2","heading_3":"Heading 3","heading_4":"Heading 4","heading_5":"Heading 5","heading_6":"Heading 6","bulleted_list":"Bulleted List","numbered_list":"Numbered List","blockquote":"Block Quote","code_block":"Code Block","bold":"Bold","italic":"Italic","strikethrough":"Strikethrough","code":"Code","link":"Link","insert_link":"Insert Link","update_link":"Update Link","text":"Text","url":"URL","edit_in_markdown":"Edit in Markdown","converter_error":"There was an error while enabling rich text mode. Please use the plain text editor instead.","language":"Language","plain_text":"Plain Text"}}`})),Poe,Foe=o((()=>{Poe=`{"ok":"OK","cancel":"キャンセル","close":"閉じる","clear":"クリア","insert":"挿入","update":"更新","remove":"削除","collapse":"折り畳む","expand":"広げる","dismiss":"閉じる","calendar":{"year":"年","previous_decade":"前の 10 年","next_decade":"次の 10 年","month":"月","previous_month":"前月","next_month":"翌月","today":"今日"},"split_button":{"x_options":"{$name} オプション","more_options":"その他のオプション"},"combobox":{"select_an_option":"オプションを選択…","filter_options":"オプションを絞り込み","no_matching_options":"一致するオプションは見つかりませんでした"},"number_input":{"decrease":"減らす","increase":"増やす"},"password_input":{"show_password":"パスワードを表示","hide_password":"パスワードを隠す"},"secret_input":{"show_secret":"シークレットを表示","hide_secret":"シークレットを隠す"},"select_tags":{"selected_options":"選択済みのオプション","remove_x":"{$name} を削除"},"text_editor":{"text_editor":"テキストエディター","code_editor":"コードエディター","text_style_options":"テキストスタイルオプション","show_text_style_options":"テキストスタイルオプションを表示","paragraph":"段落","heading_1":"見出し 1","heading_2":"見出し 2","heading_3":"見出し 3","heading_4":"見出し 4","heading_5":"見出し 5","heading_6":"見出し 6","bulleted_list":"番号なしリスト","numbered_list":"番号付きリスト","blockquote":"ブロック引用","code_block":"コードブロック","bold":"太字","italic":"斜体","strikethrough":"取り消し線","code":"コード","link":"リンク","insert_link":"リンクを挿入","update_link":"リンクを更新","text":"テキスト","url":"URL","edit_in_markdown":"マークダウンで編集","converter_error":"リッチテキストモードを有効化中に問題が発生しました。代わりにプレーンテキストエディターを使用してください。","language":"言語","plain_text":"プレーンテキスト"}}`})),Ioe,Loe=o((()=>{Noe(),Foe(),X(),Ny(),Ioe=({fallbackLocale:e=`en`,initialLocale:t=`en`}={})=>{Object.entries(Object.assign({"../locales/en.yaml":Moe,"../locales/ja.yaml":Poe})).forEach(([e,t])=>{Bh(e.match(/.+\/(?<locale>.+?)\.yaml$/)?.groups?.locale,{_sui:Ay(t)})}),Uh({fallbackLocale:e,initialLocale:t})}}));function oI(e,t){G(e,Boe);let n=Gs(t,Roe);var r=zoe();_s(r,()=>({...n,class:`sui icon material-symbols-outlined ${t.class??``}`,"aria-hidden":!(`aria-label`in n)}),void 0,void 0,void 0,`svelte-1opuj3o`);var i=F(r,!0);D(r),R(()=>U(i,t.name)),H(e,r)}var Roe,zoe,Boe,sI=o((()=>{Z(),J(),Roe=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`name`]),zoe=B(`<span> </span>`),Boe={hash:`svelte-1opuj3o`,code:`.icon.small-arrow.svelte-1opuj3o {overflow:hidden;width:12px;text-indent:-6px;}`}}));function cI(e,t){G(e,Uoe);let n=Gs(t,Voe);var r=Hoe();_s(r,()=>({...n,role:`alert`,class:`sui alert ${t.status??``}`}),void 0,void 0,void 0,`svelte-ktzfw4`);var i=F(r),a=e=>{var n=V();Co(I(n),()=>t.icon),H(e,n)},o=e=>{{let n=M(()=>t.status===`success`?`check_circle`:t.status);oI(e,{get name(){return z(n)}})}};W(i,e=>{t.icon?e(a):e(o,-1)}),Co(L(i,2),()=>t.children??E),D(r),H(e,r)}var Voe,Hoe,Uoe,lI=o((()=>{Z(),J(),sI(),Voe=new Set([`$$slots`,`$$events`,`$$legacy`,`status`,`children`,`icon`]),Hoe=B(`<div><!> <!></div>`),Uoe={hash:`svelte-ktzfw4`,code:`.alert.svelte-ktzfw4 {display:flex;align-items:center;gap:var(--gap, 8px);padding:var(--padding, 8px);border-width:var(--border-width, var(--sui-control-medium-border-width));border-style:var(--border-style, solid);border-radius:var(--border-radius, var(--sui-control-medium-border-radius));font-size:var(--font-size, var(--sui-font-size-default));}.alert.error.svelte-ktzfw4 {border-color:var(--sui-error-border-color);color:var(--sui-error-foreground-color);background-color:var(--sui-error-background-color);}.alert.warning.svelte-ktzfw4 {border-color:var(--sui-warning-border-color);color:var(--sui-warning-foreground-color);background-color:var(--sui-warning-background-color);}.alert.info.svelte-ktzfw4 {border-color:var(--sui-info-border-color);color:var(--sui-info-foreground-color);background-color:var(--sui-info-background-color);}.alert.success.svelte-ktzfw4 {border-color:var(--sui-success-border-color);color:var(--sui-success-foreground-color);background-color:var(--sui-success-background-color);}`}})),Woe,uI,Goe,Koe,qoe,dI,fI,pI=o((()=>{uI=()=>(Woe??=navigator.userAgentData?.platform===`macOS`||navigator.platform.startsWith(`Mac`),Woe),Goe=[`Ctrl`,`Meta`,`Alt`,`Shift`],Koe=new Set([`Space`,`Enter`,`Escape`,`Tab`,`Backspace`,`Delete`,`Insert`,`Home`,`End`,`PageUp`,`PageDown`,`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,...Array.from({length:24},(e,t)=>`F${t+1}`)]),qoe=(e,t)=>/^\d$/.test(e)?t.code===`Digit${e}`:Koe.has(e)?t.code===e:e.toLowerCase()===t.key.toLowerCase(),dI=(e,t)=>{let{ctrlKey:n,metaKey:r,altKey:i,shiftKey:a,key:o,code:s}=e;return!o&&!s?!1:t.replace(/\bAccel\b/g,uI()?`Meta`:`Ctrl`).split(/\s+/).some(t=>{let o=t.split(`+`);return o.includes(`Ctrl`)&&!n||o.includes(`Meta`)&&!r||o.includes(`Alt`)&&!i||o.includes(`Shift`)&&!a||!o.includes(`Ctrl`)&&n||!o.includes(`Meta`)&&r||!o.includes(`Alt`)&&i||!o.includes(`Shift`)&&a?!1:o.filter(e=>!Goe.includes(e)).every(t=>qoe(t,e))})},fI=(e=``)=>{let t=e?e.replace(/\bAccel\b/g,uI()?`Meta`:`Ctrl`):void 0;return t?e=>{let n=n=>{let{disabled:r}=e;if(!e.getClientRects().length||!dI(n,t))return;let{top:i,left:a}=e.getBoundingClientRect();r&&e.style.setProperty(`pointer-events`,`auto`);let o=document.elementsFromPoint(a+4,i+4).includes(e);r&&e.style.removeProperty(`pointer-events`),o&&(n.preventDefault(),r||(e.focus(),e.click()))};return globalThis.addEventListener(`keydown`,n,{capture:!0}),e.setAttribute(`aria-keyshortcuts`,t),()=>{globalThis.removeEventListener(`keydown`,n,{capture:!0}),e.removeAttribute(`aria-keyshortcuts`)}}:()=>()=>{}}}));function mI(e,t){G(e,Yoe);let n=q(t,`lines`,3,1),r=q(t,`children`,3,void 0);var i=Joe();Co(F(i),()=>r()??E),D(i),R(()=>cs(i,`-webkit-line-clamp: ${n()??``}; line-clamp: ${n()??``};`)),H(e,i)}var Joe,Yoe,hI=o((()=>{Z(),J(),Joe=B(`<span role="none" class="sui truncated-text svelte-1qybp7n"><!></span>`),Yoe={hash:`svelte-1qybp7n`,code:`.truncated-text.svelte-1qybp7n {display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;white-space:normal;overflow-wrap:anywhere;}`}})),gI,_I,vI,Xoe,Zoe,Qoe,yI,bI=o((()=>{Ep(),vI=(e=`e`,t=7)=>[e,Cp(t)].join(`-`),Xoe=()=>{if(`IntersectionObserver`in globalThis)return _I||(gI=new Map,_I=new IntersectionObserver(e=>{e.forEach(({isIntersecting:e,target:t})=>{if(!e||!(t instanceof HTMLElement))return;let n=gI?.get(t);n&&(gI?.delete(t),_I?.unobserve(t),n())})}),_I)},Zoe=e=>{let{top:t,left:n,bottom:r,right:i}=e.getBoundingClientRect(),{innerHeight:a,innerWidth:o}=globalThis;return r>0&&i>0&&t<a&&n<o},Qoe=e=>{if(`requestAnimationFrame`in globalThis){globalThis.requestAnimationFrame(e);return}globalThis.setTimeout(e,16)},yI=e=>{if(!e)return;let t=Xoe();if(t)return Zoe(e)?Promise.resolve(void 0):new Promise(n=>{gI?.set(e,n),Qoe(()=>{t.observe(e)})})}})),$oe,ese,tse=o((()=>{J(),bI(),Kw(),Dh(),$oe=class{#e=N(!1);get open(){return z(this.#e)}set open(e){P(this.#e,e,!0),e?this.checkPosition():this.anchorElement.getAttribute(`aria-expanded`)===`true`&&(this.anchorElement.focus(),this.anchorElement.removeAttribute(`aria-controls`)),this.anchorElement.setAttribute(`aria-expanded`,String(e))}#t=N(br({inset:void 0,zIndex:void 0,minWidth:void 0,maxWidth:void 0,height:void 0}));get style(){return z(this.#t)}set style(e){P(this.#t,e,!0)}observer=new IntersectionObserver(e=>{e.forEach(({intersectionRect:e,rootBounds:t})=>{if(!e||!t)return;let{scrollHeight:n,scrollWidth:r}=this.popupElement.querySelector(`.content`),i=e.top-8,a=t.height-e.bottom-8,{position:o}=this,s;document.dir===`rtl`&&(o.endsWith(`-left`)?o=o.replace(`-left`,`-right`):o.endsWith(`-right`)&&(o=o.replace(`-right`,`-left`)),o.startsWith(`left-`)?o=o.replace(`left-`,`right-`):o.startsWith(`right-`)&&(o=o.replace(`right-`,`left-`))),o.startsWith(`bottom-`)&&n>a&&(i>a?(o=o.replace(`bottom-`,`top-`),s=i):s=a),o.endsWith(`-left`)&&e.left+r>t.width-8&&(o=o.replace(`-left`,`-right`)),o.endsWith(`-right`)&&e.right-r<8&&(o=o.replace(`-right`,`-left`));let c={inset:[o.startsWith(`bottom-`)?`${Math.round(e.bottom)}px`:o.endsWith(`-top`)?`${Math.round(e.top)}px`:`auto`,o.startsWith(`left-`)?`${Math.round(t.width-e.left)}px`:o.endsWith(`-right`)?`${Math.round(t.width-e.right)}px`:`auto`,o.startsWith(`top-`)?`${Math.round(t.height-e.top)}px`:o.endsWith(`-bottom`)?`${Math.round(t.height-e.bottom)}px`:`auto`,o.startsWith(`right-`)?`${Math.round(e.right)}px`:o.endsWith(`-left`)?`${Math.round(e.left)}px`:`auto`].join(` `),zIndex:1e3,minWidth:`${Math.round(e.width)}px`,maxWidth:o.endsWith(`-left`)?`${Math.round(t.width-e.left-8)}px`:`${Math.round(e.right-8)}px`,height:s?`${Math.round(s)}px`:`auto`};(c.inset!==this.style.inset||c.zIndex!==this.style.zIndex||c.minWidth!==this.style.minWidth||c.maxWidth!==this.style.maxWidth||c.height!==this.style.height)&&(this.style=c)})});constructor(e,t,n,r){this.anchorElement=e,this.popupElement=t,this.position=n,this.positionBaseElement=r??e,this.id=vI(`popup`),this.anchorElement.setAttribute(`aria-controls`,this.id),this.popupElement.setAttribute(`id`,this.id),this.anchorElement.setAttribute(`aria-expanded`,`false`),ga(e,`click`,()=>{!this.isDisabled&&!this.isReadOnly&&(this.open=!this.open)}),ga(e,`keydown`,e=>{let{key:t,ctrlKey:n,metaKey:r,shiftKey:i,altKey:a}=e,o=i||a||n||r;!this.isDisabled&&!this.isReadOnly&&[`Enter`,` `].includes(t)&&!o&&(e.preventDefault(),e.stopPropagation(),this.open=!this.open)}),ga(e,`transitionstart`,()=>{this.anchorElement.closest(`.hiding, .hidden, [hidden]`)&&this.hideImmediately()}),this.intersectionObserver=new IntersectionObserver(([e])=>{!e.isIntersecting&&this.open&&this.hideImmediately()}),this.intersectionObserver.observe(this.anchorElement),ga(this.popupElement,`click`,e=>{e.stopPropagation();let t=e.target;this.open&&(t===this.popupElement||t.matches(`[role^="menuitem"], [role="option"]`))&&(this.open=!1)}),ga(this.popupElement,`keydown`,e=>{let{key:t,ctrlKey:n,metaKey:r,shiftKey:i,altKey:a}=e;t===`Escape`&&!(i||a||n||r)&&(e.preventDefault(),e.stopPropagation(),this.open=!1)}),this.resizeObserver=new ResizeObserver(()=>{cancelAnimationFrame(this._rafId),this._rafId=requestAnimationFrame(()=>this.checkPosition())}),this.resizeObserver.observe(this.positionBaseElement)}get isDisabled(){return this.anchorElement.matches(`[aria-disabled="true"]`)}get isReadOnly(){return this.anchorElement.matches(`[aria-readonly="true"]`)}checkPosition(){this.observer.unobserve(this.positionBaseElement),this.observer.observe(this.positionBaseElement)}async hideImmediately(){this.popupElement.hidden=!0,this.open=!1,await Gw(50),this.popupElement.hidden=!1}destroy(){this.intersectionObserver?.disconnect(),this.resizeObserver?.disconnect(),this.observer?.disconnect(),this._rafId&&cancelAnimationFrame(this._rafId)}},ese=(...e)=>new $oe(...e)}));function nse(e,t){var n=V();Co(I(n),()=>t.children??E),H(e,n)}var rse=o((()=>{Z(),J()}));function ise(e,t){O(t,!0),G(e,sse);let n=e=>{var n=ose(),d=({target:e})=>{i()&&s()&&e?.matches(`dialog`)&&(i(i().returnValue=`cancel`,!0),r(!1))},f=e=>{e.preventDefault(),i()&&c()&&(i(i().returnValue=`cancel`,!0),r(!1))};_s(n,()=>({...u,inert:!z(p),role:a(),class:`sui modal ${t.class??``}`,onclick:d,oncancel:f,[bs]:{backdrop:o(),open:z(p),active:z(m)}}),void 0,void 0,void 0,`svelte-f8sasx`);var g=F(n);Co(g,()=>t.extraContent??E);var _=L(g,2),v=e=>{var n=V();Co(I(n),()=>t.children??E),H(e,n)};W(_,e=>{(z(h)||l())&&e(v)}),D(n),Rs(n,e=>i(e),()=>i()),H(e,n)},r=q(t,`open`,15,!1),i=q(t,`dialog`,15),a=q(t,`role`,3,`dialog`),o=q(t,`showBackdrop`,3,!1),s=q(t,`lightDismiss`,3,!1),c=q(t,`escapeDismiss`,3,!0),l=q(t,`keepContent`,3,!1),u=Gs(t,ase),d=()=>{i()?.focus()},f=e=>{i()&&(i(i().returnValue=e,!0),r(!1))},p=N(!1),m=N(!1),h=N(!1),g=0,_=async()=>new Promise(e=>{let t=n=>{n.target===i()&&(i().removeEventListener(`transitionend`,t),e())};i()?.addEventListener(`transitionend`,t)}),v=async()=>{if(!i()||i()?.open)return;g+=1;let e=g;t.onOpening?.(new CustomEvent(`Opening`)),P(h,!0),i().showModal(),t.onOpen?.(new CustomEvent(`Open`)),await Gw(0),e===g&&(P(p,!0),await _(),e===g&&P(m,!0))},y=async()=>{if(!i()||!i().open)return;g+=1;let e=g,n=z(p),{returnValue:r}=i();t.onClosing?.(new CustomEvent(`Closing`)),document.body.inert=!0,i().close(),document.body.inert=!1,P(m,!1),P(p,!1),n&&await _(),e===g&&(P(h,!1),r===`ok`&&t.onOk?.(new CustomEvent(`Ok`)),r===`cancel`&&t.onCancel?.(new CustomEvent(`Cancel`)),t.onClose?.(new CustomEvent(`Close`,{detail:{returnValue:r}})),i(i().returnValue=``,!0))};return Qr(()=>{r()?v():y()}),tc(()=>{let e=Fa(nse,{target:document.querySelector(`.sui.app-shell`)??document.body,props:{children:n}});return()=>{i()?.close(),La(e)}}),k({focus:d,close:f})}var ase,ose,sse,xI=o((()=>{Z(),J(),Kw(),rc(),rse(),ase=new Set([`$$slots`,`$$events`,`$$legacy`,`open`,`dialog`,`class`,`role`,`showBackdrop`,`lightDismiss`,`escapeDismiss`,`keepContent`,`children`,`extraContent`,`onOpening`,`onOpen`,`onClosing`,`onOk`,`onCancel`,`onClose`]),ose=B(`<dialog><!> <!></dialog>`),sse={hash:`svelte-f8sasx`,code:`dialog.svelte-f8sasx {position:fixed;inset:0;z-index:9999999;display:flex;justify-content:center;align-items:center;overflow:hidden;outline:0;margin:0;border:0;padding:0;width:100dvw;max-width:100dvw;height:100dvh;max-height:100dvh;color:var(--sui-primary-foreground-color);background:transparent;-webkit-user-select:none;user-select:none;touch-action:none;pointer-events:all;cursor:default;}dialog.svelte-f8sasx::backdrop {background:transparent;}dialog.backdrop.svelte-f8sasx {background-color:var(--sui-popup-backdrop-color);}dialog.open.svelte-f8sasx {transition-duration:50ms;opacity:1;}dialog.svelte-f8sasx:not(.open) {transition-duration:400ms;opacity:0;}dialog[hidden].svelte-f8sasx {transition-duration:1ms !important;}dialog.svelte-f8sasx:not(.active) {pointer-events:none !important;}dialog.svelte-f8sasx:not(.active) * {transition-duration:0ms !important;pointer-events:none !important;}`}}));function SI(e,t){O(t,!0),G(e,use);let n=e=>{var n=lse();let o,s;Co(F(n),()=>t.children??E),D(n),Rs(n,e=>a(e),()=>a()),R(()=>{K(n,`hidden`,!r()),o=as(n,1,`content ${t.class??``} ${z(h)??``}`,`svelte-1419l0s`,o,{touch:z(y)}),s=cs(n,``,s,{inset:z(g)?.style.inset,"z-index":z(g)?.style.zIndex,"min-width":z(g)?.style.minWidth,"max-width":z(g)?.style.maxWidth,"max-height":z(g)?.style.height,visibility:z(g)?.style.inset?void 0:`hidden`})}),_a(`mouseenter`,n,()=>{i(!0),l()&&window.clearTimeout(_)}),_a(`mouseleave`,n,()=>{i(!1),l()&&(_=window.setTimeout(()=>{r(!1)},200))}),H(e,n)},r=q(t,`open`,15,!1),i=q(t,`hovered`,15,!1),a=q(t,`content`,15,void 0),o=q(t,`showBackdrop`,3,void 0),s=q(t,`position`,3,`bottom-left`),c=q(t,`positionBaseElement`,3,void 0),l=q(t,`parentDialogElement`,3,void 0),u=q(t,`touchOptimized`,3,!1),d=Gs(t,cse),f=N(!1),p=N(void 0),m=N(!1),h=N(void 0),g=N(void 0),_=0,v=()=>{P(g,ese(t.anchor,z(p),s(),c()),!0),P(h,t.anchor?.getAttribute(`aria-haspopup`)??void 0,!0),P(f,!0)};Qr(()=>{z(g)&&r(z(g).open)}),Qr(()=>{l()&&!z(p)&&a()&&(P(p,l()),z(p).append(a()))}),Qr(()=>{t.anchor&&z(p)&&!z(f)&&v()}),Qr(()=>{l()&&r()&&z(g)?.checkPosition()});let y=M(()=>u()&&z(m));tc(()=>(P(m,globalThis.matchMedia(`(pointer: coarse)`).matches,!0),()=>{z(g)?.destroy?.(),globalThis.clearTimeout(_)}));var b=V(),x=I(b),S=e=>{n(e)},C=e=>{{let i=M(()=>o()??z(y));ise(e,Ks(()=>d,{role:`none`,class:`popup`,get showBackdrop(){return z(i)},lightDismiss:!0,keepContent:!0,onOpen:async e=>{if(t.onOpen?.(e),await Gw(100),!a())return;let n=a().querySelector(`[tabindex]:not([aria-disabled="true"])`);n?n.focus():(a(a().tabIndex=-1,!0),a().focus())},get dialog(){return z(p)},set dialog(e){P(p,e,!0)},get open(){return r()},set open(e){r(e)},children:(e,t)=>{n(e)},$$slots:{default:!0}}))}};W(x,e=>{l()?e(S):e(C,-1)}),H(e,b),k()}var cse,lse,use,CI=o((()=>{Z(),J(),Kw(),rc(),tse(),xI(),cse=new Set([`$$slots`,`$$events`,`$$legacy`,`open`,`hovered`,`content`,`class`,`showBackdrop`,`anchor`,`position`,`positionBaseElement`,`parentDialogElement`,`touchOptimized`,`children`,`onOpen`]),lse=B(`<div role="none"><!></div>`),use={hash:`svelte-1419l0s`,code:`.content.svelte-1419l0s {position:absolute;overflow-y:auto;outline-width:0 !important;width:auto;color:var(--sui-primary-foreground-color);background-color:var(--sui-secondary-background-color-translucent);box-shadow:0 8px 16px var(--sui-popup-shadow-color);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);transition-property:opacity, transform;}.content.menu.svelte-1419l0s {border-width:var(--sui-menu-border-width, 1px);border-style:var(--sui-menu-border-style, solid);border-color:var(--sui-menu-border-width, var(--sui-secondary-border-color));border-radius:var(--sui-menu-border-radius, 4px);padding:var(--sui-menu-padding, 4px);}.content.menu.svelte-1419l0s .sui.menu {border-width:0;border-radius:0;padding:0;background-color:transparent;}.content.listbox.svelte-1419l0s {border-width:var(--sui-listbox-border-width, 1px);border-style:var(--sui-listbox-border-style, solid);border-color:var(--sui-listbox-border-width, var(--sui-secondary-border-color));border-radius:var(--sui-listbox-border-radius, 4px);padding:var(--sui-listbox-padding, 4px);}.content.listbox.svelte-1419l0s .sui.listbox {border-width:0;border-radius:0;padding:0;background-color:transparent;}.content.touch.svelte-1419l0s {position:static;border-width:0 !important;border-radius:4px !important;padding:8px;min-width:320px !important;max-width:calc(100dvw - 32px) !important;max-height:calc(100dvh - 32px) !important;}dialog.open .content.touch.svelte-1419l0s {transform:scale(100%) !important;}dialog:not(.open) .content.touch.svelte-1419l0s {transform:scale(90%);}.content.touch.combobox.svelte-1419l0s .sui.listbox {gap:4px;padding:8px 4px !important;}dialog.open .content.svelte-1419l0s {transition-duration:50ms;opacity:1;transform:translateY(2px);}dialog:not(.open) .content.svelte-1419l0s {transition-duration:300ms;opacity:0;transform:translateY(-8px);}`}}));function wI(e,t){O(t,!0),G(e,mse);let n=q(t,`element`,15),r=q(t,`class`,3,``),i=q(t,`type`,3,`button`),a=q(t,`role`,3,`button`),o=q(t,`name`,3,void 0),s=q(t,`value`,3,void 0),c=q(t,`valueType`,19,()=>typeof s()),l=q(t,`hidden`,3,!1),u=q(t,`disabled`,3,!1),d=q(t,`readonly`,3,!1),f=q(t,`pressed`,3,void 0),p=q(t,`keyShortcuts`,3,void 0),m=q(t,`label`,3,``),h=q(t,`lines`,3,1),g=q(t,`variant`,3,void 0),_=q(t,`size`,3,`medium`),v=q(t,`iconic`,3,!1),y=q(t,`pill`,3,!1),b=q(t,`flex`,3,!1),x=q(t,`popupPosition`,3,`bottom-left`),S=q(t,`showPopupBackdrop`,3,!1),C=Gs(t,dse);var w=pse(),T=I(w);_s(T,()=>({...C,class:`sui button ${g()??``} ${_()??``} ${r()??``}`,type:i(),name:o(),value:s(),hidden:l(),disabled:u(),role:a(),"aria-hidden":l(),"aria-disabled":u(),"aria-readonly":d(),"aria-pressed":f(),"data-type":c(),"data-name":o(),"data-label":m(),"data-value":s(),[bs]:{iconic:v(),pill:y(),flex:b()}}),void 0,void 0,void 0,`svelte-xgct3a`);var ee=F(T);Co(ee,()=>t.startIcon??E);var te=L(ee,2),ne=e=>{var n=V(),r=I(n),i=e=>{var t=TI();mI(F(t),{get lines(){return h()},children:(e,t)=>{gt();var n=ja();R(()=>U(n,m())),H(e,n)},$$slots:{default:!0}}),D(t),H(e,t)},a=e=>{var n=TI();Co(F(n),()=>t.children??E),D(n),H(e,n)};W(r,e=>{m()?e(i):e(a,-1)}),H(e,n)},re=e=>{var n=fse(),r=I(n),i=e=>{var t=TI();mI(F(t),{get lines(){return h()},children:(e,t)=>{gt();var n=ja();R(()=>U(n,m())),H(e,n)},$$slots:{default:!0}}),D(t),H(e,t)};W(r,e=>{m()&&e(i)}),Co(L(r,2),()=>t.children??E),H(e,n)};W(te,e=>{g()===`link`?e(ne):e(re,-1)}),Co(L(te,2),()=>t.endIcon??E),D(T),Rs(T,e=>n(e),()=>n()),qo(T,()=>fI(p()));var ie=L(T,2),ae=e=>{SI(e,{get anchor(){return n()},get position(){return x()},get showBackdrop(){return S()},touchOptimized:!0,children:(e,n)=>{var r=V();Co(I(r),()=>t.popup),H(e,r)},$$slots:{default:!0}})};W(ie,e=>{t.popup&&e(ae)}),H(e,w),k()}var dse,TI,fse,pse,mse,EI=o((()=>{Z(),J(),pI(),hI(),CI(),dse=new Set(`$$slots.$$events.$$legacy.element.class.type.role.name.value.valueType.hidden.disabled.readonly.pressed.keyShortcuts.label.lines.variant.size.iconic.pill.flex.popupPosition.showPopupBackdrop.children.startIcon.endIcon.popup`.split(`.`)),TI=B(`<span role="none" class="label svelte-xgct3a"><!></span>`),fse=B(`<!> <!>`,1),pse=B(`<button><!> <!> <!></button> <!>`,1),mse={hash:`svelte-xgct3a`,code:`button.svelte-xgct3a {flex:none;display:inline-flex;align-items:center;gap:4px;margin:var(--sui-focus-ring-width);border-width:0;border-style:solid;border-color:transparent;padding:0;color:var(--sui-control-foreground-color, inherit);background-color:transparent;box-shadow:none;font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);font-weight:var(--sui-font-weight-normal, normal);text-align:start;cursor:pointer;transition:all 200ms;}button[hidden].svelte-xgct3a {display:none !important;}button.svelte-xgct3a:not(:disabled):focus-visible {z-index:1;}button.svelte-xgct3a:is(.primary:where(.svelte-xgct3a), .secondary:where(.svelte-xgct3a), .tertiary:where(.svelte-xgct3a), .ghost:where(.svelte-xgct3a)) {justify-content:center;border-width:1px;}button.svelte-xgct3a:is(.primary:where(.svelte-xgct3a), .secondary:where(.svelte-xgct3a), .tertiary:where(.svelte-xgct3a), .ghost:where(.svelte-xgct3a)) .label:where(.svelte-xgct3a):only-child {padding:0 4px;}button.primary.svelte-xgct3a {border-width:var(--sui-button-primary-border-width, 1px);border-style:var(--sui-button-primary-border-style, solid);border-color:var(--sui-button-primary-border-color, var(--sui-primary-accent-color));color:var(--sui-button-primary-foreground-color, var(--sui-primary-accent-color-inverted));background-color:var(--sui-button-primary-background-color, var(--sui-primary-accent-color));font-weight:var(--sui-button-primary-font-weight, var(--sui-font-weight-normal, normal));}button.primary.svelte-xgct3a:is(:where(.svelte-xgct3a):hover, :where(.svelte-xgct3a):focus-visible, [aria-expanded=true]:where(.svelte-xgct3a)) {color:var(--sui-button-primary-foreground-color-focus, var(--sui-button-primary-foreground-color, var(--sui-primary-accent-color-inverted)));background-color:var(--sui-button-primary-background-color-focus, var(--sui-primary-accent-color-light));}button.primary.svelte-xgct3a:active {color:var(--sui-button-primary-foreground-color-active, var(--sui-button-primary-foreground-color, var(--sui-primary-accent-color-inverted)));background-color:var(--sui-button-primary-background-color-active, var(--sui-primary-accent-color-dark));}button.secondary.svelte-xgct3a {border-width:var(--sui-button-secondary-border-width, 1px);border-style:var(--sui-button-secondary-border-style, solid);border-color:var(--sui-button-secondary-border-color, var(--sui-primary-accent-color));color:var(--sui-button-secondary-foreground-color, var(--sui-primary-accent-color-text));background-color:var(--sui-button-secondary-background-color, var(--sui-button-background-color));font-weight:var(--sui-button-secondary-font-weight, var(--sui-font-weight-normal, normal));}button.secondary.svelte-xgct3a:is(:where(.svelte-xgct3a):hover, :where(.svelte-xgct3a):focus-visible, [aria-expanded=true]:where(.svelte-xgct3a)) {color:var(--sui-button-secondary-foreground-color-focus, var(--sui-button-secondary-foreground-color, var(--sui-primary-accent-color-text)));background-color:var(--sui-button-secondary-background-color-focus, var(--sui-hover-background-color));}button.secondary.svelte-xgct3a:active {color:var(--sui-button-secondary-foreground-color-active, var(--sui-button-secondary-foreground-color, var(--sui-primary-accent-color-text)));background-color:var(--sui-button-secondary-background-color-active, var(--sui-active-background-color));}button.secondary[aria-pressed=true].svelte-xgct3a {color:var(--sui-button-secondary-foreground-color-pressed);background-color:var(--sui-button-secondary-background-color-pressed, var(--sui-primary-accent-color));}button.tertiary.svelte-xgct3a {border-width:var(--sui-button-tertiary-border-width, 1px);border-style:var(--sui-button-tertiary-border-style, solid);border-color:var(--sui-button-tertiary-border-color, var(--sui-button-border-color));color:var(--sui-button-tertiary-foreground-color, var(--sui-highlight-foreground-color));background-color:var(--sui-button-tertiary-background-color, var(--sui-button-background-color));font-weight:var(--sui-button-tertiary-font-weight, var(--sui-font-weight-normal, normal));}button.tertiary.svelte-xgct3a:is(:where(.svelte-xgct3a):hover, :where(.svelte-xgct3a):focus-visible, [aria-expanded=true]:where(.svelte-xgct3a)) {color:var(--sui-button-tertiary-foreground-color-focus, var(--sui-button-tertiary-foreground-color, var(--sui-highlight-foreground-color)));background-color:var(--sui-button-tertiary-background-color-focus, var(--sui-hover-background-color));}button.tertiary.svelte-xgct3a:active {color:var(--sui-button-tertiary-foreground-color-active, var(--sui-button-tertiary-foreground-color, var(--sui-highlight-foreground-color)));background-color:var(--sui-button-tertiary-background-color-active, var(--sui-active-background-color));}button.tertiary[aria-pressed=true].svelte-xgct3a {color:var(--sui-button-tertiary-foreground-color-pressed);background-color:var(--sui-button-tertiary-background-color-pressed, var(--sui-selected-background-color));}button.ghost.svelte-xgct3a {font-weight:var(--sui-button-ghost-font-weight, var(--sui-font-weight-normal, normal));}button.ghost.svelte-xgct3a:is(:where(.svelte-xgct3a):hover, :where(.svelte-xgct3a):focus-visible, [aria-expanded=true]:where(.svelte-xgct3a)) {color:var(--sui-button-ghost-foreground-color-focus);background-color:var(--sui-button-ghost-background-color-focus, var(--sui-hover-background-color));}button.ghost.svelte-xgct3a:active {color:var(--sui-button-ghost-foreground-color-active);background-color:var(--sui-button-ghost-background-color-active, var(--sui-active-background-color));}button.ghost[aria-pressed=true].svelte-xgct3a {color:var(--sui-button-ghost-foreground-color-pressed);background-color:var(--sui-button-ghost-background-color-pressed, var(--sui-selected-background-color));}button.link.svelte-xgct3a {outline:0;margin:0;border-radius:0 !important;padding:0 !important;height:auto !important;color:var(--sui-button-link-foreground-color, var(--sui-primary-accent-color-text));}button.link.svelte-xgct3a .label:where(.svelte-xgct3a) {padding:0;line-height:var(--sui-line-height-compact);text-decoration:var(--sui-button-link-text-decoration, none);text-underline-offset:2px;white-space:normal;}:is(:root, :host)[data-underline-links='true'] button.link.svelte-xgct3a .label:where(.svelte-xgct3a) {text-decoration:underline;}button.link.svelte-xgct3a:is(:where(.svelte-xgct3a):hover, :where(.svelte-xgct3a):focus, :where(.svelte-xgct3a):active) .label:where(.svelte-xgct3a) {text-decoration:var(--sui-button-link-text-decoration-focus, underline);}button.small.svelte-xgct3a {border-radius:var(--sui-button-small-border-radius);padding:var(--sui-button-small-padding);height:var(--sui-button-small-height);font-size:var(--sui-button-small-font-size, var(--sui-font-size-small));}button.small.svelte-xgct3a .icon {font-size:var(--sui-font-size-large);}button.medium.svelte-xgct3a {border-radius:var(--sui-button-medium-border-radius);padding:var(--sui-button-medium-padding);height:var(--sui-button-medium-height);font-size:var(--sui-button-medium-font-size, var(--sui-font-size-default));}button.large.svelte-xgct3a {border-radius:var(--sui-button-large-border-radius);padding:var(--sui-button-large-padding);height:var(--sui-button-large-height);font-size:var(--sui-button-large-font-size, var(--sui-font-size-large));}button.pill.svelte-xgct3a {border-radius:80px;padding:var(--sui-button-medium-pill-padding, 0 12px);}button.flex.svelte-xgct3a:not([hidden]) {display:inline-flex;flex:auto;width:-moz-available;width:-webkit-fill-available;width:stretch;}button.iconic.svelte-xgct3a {justify-content:center;padding:0;aspect-ratio:1/1;}button.danger.svelte-xgct3a {background-color:var(--sui-error-background-color);}button.svelte-xgct3a .label:where(.svelte-xgct3a) {padding:0 4px;}button.svelte-xgct3a > * {pointer-events:none;}button.svelte-xgct3a :has([slot=start-icon] + [slot=end-icon]) {gap:0;}`}}));function DI(e,t){O(t,!0),G(e,_se);let n=q(t,`show`,15,!0),r=q(t,`dismissible`,3,!0),i=q(t,`status`,3,`info`),a=q(t,`children`,3,void 0),o=q(t,`icon`,3,void 0);var s=V(),c=I(s),l=e=>{var t=gse(),s=F(t),c=F(s),l=e=>{var t=V();Co(I(t),o),H(e,t)},u=e=>{{let t=M(()=>i()===`success`?`check_circle`:i());oI(e,{get name(){return z(t)}})}};W(c,e=>{o()?e(l):e(u,-1)}),Co(L(c,2),()=>a()??E),D(s);var d=L(s,2),f=e=>{var t=hse(),r=F(t);{let e=M(()=>Y(`_sui.dismiss`));wI(r,{iconic:!0,size:`small`,variant:`ghost`,get"aria-label"(){return z(e)},onclick:()=>{n(!1)},children:(e,t)=>{oI(e,{name:`close`})},$$slots:{default:!0}})}D(t),H(e,t)};W(d,e=>{r()&&e(f)}),D(t),R(()=>as(t,1,`infobar ${i()??``}`,`svelte-badg2b`)),H(e,t)};W(c,e=>{n()&&e(l)}),H(e,s),k()}var hse,gse,_se,vse=o((()=>{Z(),J(),X(),EI(),sI(),hse=B(`<div role="none"><!></div>`),gse=B(`<div role="none"><div role="alert" class="message svelte-badg2b"><!> <!></div> <!></div>`),_se={hash:`svelte-badg2b`,code:`.infobar.svelte-badg2b {flex:none;display:flex;align-items:center;gap:var(--sui-infobar-gap, 8px);border-width:var(--sui-infobar-border-width, 0 0 1px);border-style:var(--sui-infobar-border-style, solid);padding:var(--sui-infobar-padding, 0);min-height:var(--sui-infobar-min-height, 32px);font-size:var(--sui-infobar-font-size, var(--sui-font-size-small));}.infobar.info.svelte-badg2b {border-color:var(--sui-info-border-color);color:var(--sui-info-foreground-color);background-color:var(--sui-info-background-color);}.infobar.warning.svelte-badg2b {border-color:var(--sui-warning-border-color);color:var(--sui-warning-foreground-color);background-color:var(--sui-warning-background-color);}.infobar.error.svelte-badg2b {border-color:var(--sui-error-border-color);color:var(--sui-error-foreground-color);background-color:var(--sui-error-background-color);}.infobar.success.svelte-badg2b {border-color:var(--sui-success-border-color);color:var(--sui-success-foreground-color);background-color:var(--sui-success-background-color);}.message.svelte-badg2b {flex:auto;display:flex;align-items:center;justify-content:var(--sui-infobar-message-justify-content, start);gap:var(--sui-infobar-message-gap, 6px);padding:var(--sui-infobar-message-padding, 6px);}.message.svelte-badg2b button {font-size:inherit !important;}.message.svelte-badg2b .icon {font-size:16px; /* !hardcoded */}`}}));function yse(e,t){G(e,Sse);let n=Gs(t,bse);var r=xse();_s(r,()=>({role:`none`,class:`sui bottom-navigation ${t.class??``}`,...n}),void 0,void 0,void 0,`svelte-w726yw`),Co(F(r),()=>t.children??E),D(r),H(e,r)}var bse,xse,Sse,Cse=o((()=>{Z(),J(),bse=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`children`]),xse=B(`<div><!></div>`),Sse={hash:`svelte-w726yw`,code:`.bottom-navigation.svelte-w726yw {height:var(--sui-bottom-navigation-height, var(--sui-primary-toolbar-size));border-top-width:var(--sui-bottom-navigation-border-color, 1px);border-top-style:var(--sui-bottom-navigation-border-style, solid);border-top-color:var(--sui-bottom-navigation-border-color, var(--sui-secondary-border-color));}.bottom-navigation.svelte-w726yw:is([inert]:where(.svelte-w726yw), [hidden]:where(.svelte-w726yw)) {display:none;}.bottom-navigation.svelte-w726yw .buttons {flex:auto;display:flex;align-items:center;justify-content:space-evenly;}`}}));function wse(e,t){G(e,Dse);let n=Gs(t,Tse);var r=Ese();_s(r,()=>({...n,role:`group`,class:`sui button-group ${t.class??``}`}),void 0,void 0,void 0,`svelte-1lrptfw`),Co(F(r),()=>t.children??E),D(r),H(e,r)}var Tse,Ese,Dse,Ose=o((()=>{Z(),J(),Tse=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`children`]),Ese=B(`<div><!></div>`),Dse={hash:`svelte-1lrptfw`,code:`.button-group.svelte-1lrptfw {flex:none;display:inline-flex;align-items:center;}`}}));function kse(e,t){G(e,jse);let n=q(t,`children`,3,void 0);var r=Ase();Co(F(r),()=>n()??E),D(r),H(e,r)}var Ase,jse,Mse=o((()=>{Z(),J(),Ase=B(`<div role="none" class="sui floating-action-button-wrapper svelte-1akcifq"><!></div>`),jse={hash:`svelte-1akcifq`,code:`.floating-action-button-wrapper.svelte-1akcifq {display:contents;}
644
+ @media (width < 768px) {.floating-action-button-wrapper.svelte-1akcifq {display:block;position:fixed;inset-inline-end:16px;inset-block-end:72px;z-index:100;}.floating-action-button-wrapper.svelte-1akcifq button {border-radius:50%;height:56px;box-shadow:0 4px 8px rgba(0, 0, 0, 0.4);}.floating-action-button-wrapper.svelte-1akcifq button .icon {font-size:32px;}
645
+ }`}})),OI,Nse=o((()=>{J(),OI=e=>{let{type:t=`string`,name:n,label:r}=e.dataset,{value:i}=e.dataset;return t===`number`?(i=Number(i),Number.isNaN(i)&&(i=null)):t===`boolean`?i=i===`true`:t===`string`&&(i=i?String(i):``),{target:e,type:t,name:n,label:r,value:i}}})),Pse,kI,Fse,Ise,AI,jI=o((()=>{J(),X(),bI(),Kw(),Nse(),Pse=/\p{Diacritic}/gu,kI=e=>(e=e.trim(),e?e.normalize(`NFD`).replace(Pse,``).toLocaleLowerCase():``),Fse={grid:{orientation:`vertical`,childRoles:[`row`],childSelectedAttr:`aria-selected`,focusChild:!0,selectFirst:!0},listbox:{orientation:`vertical`,childRoles:[`option`],childSelectedAttr:`aria-selected`,focusChild:!1,selectFirst:!1},menu:{orientation:`vertical`,childRoles:[`menuitem`,`menuitemcheckbox`,`menuitemradio`],childSelectedAttr:`aria-checked`,focusChild:!0,selectFirst:!1},menubar:{orientation:`horizontal`,childRoles:[`menuitem`,`menuitemcheckbox`,`menuitemradio`],childSelectedAttr:`aria-checked`,focusChild:!0,selectFirst:!1},radiogroup:{orientation:`horizontal`,childRoles:[`radio`],childSelectedAttr:`aria-checked`,focusChild:!0,selectFirst:!1},tablist:{orientation:`horizontal`,childRoles:[`tab`],childSelectedAttr:`aria-selected`,focusChild:!0,selectFirst:!0}},Ise=class{constructor(e,{clickToSelect:t=!0}={}){e.dispatchEvent(new CustomEvent(`Initializing`)),this.parent=e,this.role=e.getAttribute(`role`),this.multi=this.parent.getAttribute(`aria-multiselectable`)===`true`,this.id=vI(this.role),this.parentGroupSelector=`[role="group"], [role="${this.role}"]`,this.clickToSelect=t,this._onClick=e=>{this.onClick(e)},this._onKeyDown=e=>{this.onKeyDown(e)};let{orientation:n,childRoles:r,childSelectedAttr:i,focusChild:a,selectFirst:o}=Fse[this.role];this.orientation=this.grid?`horizontal`:this.parent.getAttribute(`aria-orientation`)??n,this.childRoles=r,this.childSelectedAttr=i,this.childSelectedProp=i.replace(`aria-`,``),this.focusChild=a,this.selectFirst=o,this.parent.tabIndex=a?-1:0,(async()=>{await Gw(100),this.activate()})()}activate(){let{parent:e,allMembers:t,selected:n}=this;t.forEach((e,t)=>{let r=e.getAttribute(this.childSelectedAttr)===`true`||(n?e===n:this.selectFirst&&t===0),i=document.querySelector(`#${e.getAttribute(`aria-controls`)}`);e.id||=`${this.id}-item-${t+1}`,e.tabIndex=r?0:-1,e.setAttribute(this.childSelectedAttr,String(r)),i&&(i.inert=!r,i.setAttribute(`aria-labelledby`,e.id),i.setAttribute(`aria-hidden`,String(!r)),r&&globalThis.setTimeout(()=>{try{i.scrollIntoView({block:`nearest`,inline:`nearest`,behavior:`auto`})}catch{i.scrollIntoView(!0)}},300))}),e.addEventListener(`click`,this._onClick),e.addEventListener(`keydown`,this._onKeyDown),e.dispatchEvent(new CustomEvent(`Initialized`))}get selector(){return this.childRoles.map(e=>`[role="${e}"]`).join(`,`)}get allMembers(){return[...this.parent.querySelectorAll(this.selector)]}get activeMembers(){return this.allMembers.filter(e=>!e.matches(`[aria-disabled="true"], [aria-hidden="true"]`))}get selected(){return this.activeMembers.find(e=>e.matches(`[${this.childSelectedAttr}="true"]`))}get isDisabled(){return this.parent.matches(`[aria-disabled="true"]`)}get isReadOnly(){return this.parent.matches(`[aria-readonly="true"]`)}get grid(){return this.role===`grid`||this.role===`listbox`&&this.parent.matches(`.grid`)}selectTarget(e,t){if(this.isDisabled||this.isReadOnly){e.preventDefault();return}let n=t.getAttribute(`role`),r=t.closest(this.parentGroupSelector),i=e.type===`click`,a=e.type===`keydown`&&e.key===` `;this.activeMembers.forEach(o=>{let s=o.matches(`[role="menuitemcheckbox"]`),c=o.matches(`[role="menuitemradio"]`);if((s||c)&&(o.getAttribute(`role`)!==n||o.closest(this.parentGroupSelector)!==r))return;let l=s||this.multi,u=c||!l,d=o===t,f=o.matches(`[${this.childSelectedAttr}="true"]`),p=o.getAttribute(`aria-controls`),m=p?document.getElementById(p):null;l&&d&&(i||a)&&(o.setAttribute(this.childSelectedAttr,String(!f)),o.dispatchEvent(new CustomEvent(`Change`,{detail:{[this.childSelectedProp]:!f}})),f||o.dispatchEvent(new CustomEvent(`Select`))),u&&f!==d&&(!c||a||i)&&(o.setAttribute(this.childSelectedAttr,String(d)),o.dispatchEvent(new CustomEvent(`Change`,{detail:{[this.childSelectedProp]:d}})),d&&(e.type===`keydown`&&o.matches(`[role="radio"]`)&&o.click(),o.dispatchEvent(new CustomEvent(`Select`)))),this.focusChild?globalThis.requestAnimationFrame(()=>{o.tabIndex=d?0:-1,d&&(o.focus(),o.dispatchEvent(new CustomEvent(`Focus`)))}):(o.classList.toggle(`focused`,d),d&&o.dispatchEvent(new CustomEvent(`Focus`))),m&&(m.inert=!d,m.setAttribute(`aria-hidden`,String(!d)),d&&globalThis.setTimeout(()=>{try{m.scrollIntoView({block:`nearest`,inline:`nearest`,behavior:`auto`})}catch{m.scrollIntoView(!0)}},300)),d&&(this.parent.setAttribute(`aria-activedescendant`,o.id),globalThis.setTimeout(()=>{try{o.scrollIntoView({block:`nearest`,inline:`nearest`,behavior:`auto`})}catch{o.scrollIntoView(!0)}},300))}),this.parent.dispatchEvent(new CustomEvent(`Change`,{detail:OI(t)}))}onClick(e){let t=e.target,n=t.matches(this.selector)?t:t.closest(this.selector);!n||e.button!==0||!this.clickToSelect||this.selectTarget(e,n)}onKeyDown(e){let{key:t,ctrlKey:n,metaKey:r,shiftKey:i,altKey:a}=e;if(i||a||n||r)return;let o=e.target,{allMembers:s,activeMembers:c}=this,l=(()=>{if(!this.focusChild)return c.find(e=>e.matches(`.focused`));if(o.matches(this.selector))return o})();if([`Enter`,` `,`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`].includes(t)&&e.preventDefault(),t===`Enter`){l?.click();return}if(t===` `){l&&this.selectTarget(e,l);return}let u,d;if(this.grid){let e=Math.floor(this.parent.clientWidth/c[0].clientWidth),n=Lh();u=l?s.indexOf(l):-1,t===`ArrowUp`&&u>0&&(d=s[u-e]),t===`ArrowDown`&&u<s.length-1&&(d=s[u+e]),t===`ArrowLeft`&&u>0&&(d=s[u+(n?1:-1)]),t===`ArrowRight`&&u<s.length-1&&(d=s[u+(n?-1:1)]),d?.matches(`[aria-disabled="true"], [aria-hidden="true"]`)&&(d=void 0)}else{u=l?c.indexOf(l):-1;let e=Lh(),n=this.orientation===`horizontal`?e?`ArrowRight`:`ArrowLeft`:`ArrowUp`,r=this.orientation===`horizontal`?e?`ArrowLeft`:`ArrowRight`:`ArrowDown`;t===n&&(u>0&&(d=c[u-1]),u<=0&&(d=c[c.length-1])),t===r&&(u<c.length-1&&(d=c[u+1]),u===c.length-1&&([d]=c))}d&&d!==l&&this.selectTarget(e,d)}destroy(){this.parent.removeEventListener(`click`,this._onClick),this.parent.removeEventListener(`keydown`,this._onKeyDown)}onUpdate({searchTerms:e}){let t=kI(e),n=t?t.split(/\s+/):[],{allMembers:r,parent:i}=this,a=r.map(e=>{let t=kI(e.dataset.searchValue??e.dataset.label??e.querySelector(`.label`)?.textContent??e.textContent),r=!n.every(e=>t.includes(e));return e.dispatchEvent(new CustomEvent(`Toggle`,{detail:{hidden:r}})),r}).filter(e=>!e).length;i.dispatchEvent(new CustomEvent(`Filter`,{detail:{matched:a,total:r.length}}))}},AI=e=>t=>{let n=typeof e==`function`,r=n?e():e,i=new Ise(t,r);return n&&Qr(()=>{i.onUpdate(e())}),()=>{i.destroy()}}}));function MI(e,t){O(t,!0),G(e,zse);let n=q(t,`hidden`,3,!1),r=q(t,`disabled`,3,!1),i=q(t,`readonly`,3,!1),a=q(t,`required`,3,!1),o=q(t,`invalid`,3,!1),s=Gs(t,Lse);var c=Rse();_s(c,()=>({...s,role:`radiogroup`,class:`sui select-button-group ${t.class??``}`,hidden:n(),tabindex:`-1`,"aria-hidden":n(),"aria-disabled":r(),"aria-readonly":i(),"aria-required":a(),"aria-invalid":o()}),void 0,void 0,void 0,`svelte-n379bx`);var l=F(c);Co(F(l),()=>t.children??E),D(l),D(c),qo(c,AI),R(()=>l.inert=r()),H(e,c),k()}var Lse,Rse,zse,Bse=o((()=>{Z(),J(),jI(),Lse=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`children`]),Rse=B(`<div><div role="none" class="inner svelte-n379bx"><!></div></div>`),zse={hash:`svelte-n379bx`,code:`.select-button-group.svelte-n379bx {flex:none;display:inline-flex;align-items:center;margin:var(--sui-focus-ring-width);}.select-button-group.svelte-n379bx:focus-visible {outline-width:0 !important;}.select-button-group.svelte-n379bx button {margin:0 !important;border-radius:0 !important;color:var(--sui-primary-foreground-color);}.select-button-group.svelte-n379bx button:first-child {border-start-start-radius:4px !important;border-end-start-radius:4px !important;}.select-button-group.svelte-n379bx button:not(:first-child) {border-inline-start-width:0;}.select-button-group.svelte-n379bx button:last-child {border-start-end-radius:4px !important;border-end-end-radius:4px !important;}.select-button-group.svelte-n379bx button[aria-checked=true] {color:var(--sui-highlight-foreground-color);background-color:var(--sui-selected-background-color);}.select-button-group.svelte-n379bx [aria-invalid=true] button {border-color:var(--sui-error-border-color);}.select-button-group.svelte-n379bx [aria-disabled=false] button[aria-disabled=true] {filter:grayscale(0) opacity(1);}.select-button-group.svelte-n379bx [aria-disabled=false] button[aria-disabled=true] * {filter:grayscale(1) opacity(0.35);}.inner.svelte-n379bx {display:contents;}`}}));function NI(e,t){O(t,!0);let n=q(t,`selected`,15,!1),r=Gs(t,Vse);wI(e,Ks(()=>r,{role:`radio`,get class(){return`sui select-button ${t.class??``}`},get"aria-checked"(){return n()},onChange:e=>{n(e.detail.selected),t.onChange?.(e)}})),k()}var Vse,Hse=o((()=>{Z(),J(),EI(),Vse=new Set([`$$slots`,`$$events`,`$$legacy`,`selected`,`class`,`onChange`])}));function PI(e,t){O(t,!0);let n=q(t,`hidden`,3,!1),r=q(t,`disabled`,3,!1),i=q(t,`popupPosition`,3,`bottom-left`),a=q(t,`popupPositionBaseElement`,3,void 0),o=q(t,`showPopupBackdrop`,3,!1),s=q(t,`label`,3,``),c=q(t,`variant`,3,void 0),l=q(t,`size`,3,`medium`),u=q(t,`iconic`,3,!1),d=Gs(t,Use),f=N(void 0);var p={focus:()=>{z(f)?.focus()}},m=Wse(),h=I(m);return wI(h,Ks(()=>d,{get class(){return`sui menu-button ${t.class??``}`},get hidden(){return n()},get disabled(){return r()},get label(){return s()},get variant(){return c()},get size(){return l()},get iconic(){return u()},"aria-haspopup":`menu`,get element(){return z(f)},set element(e){P(f,e,!0)},startIcon:e=>{var n=V();Co(I(n),()=>t.startIcon??E),H(e,n)},children:e=>{var n=V();Co(I(n),()=>t.children??E),H(e,n)},endIcon:e=>{var n=V(),r=I(n),i=e=>{var n=V();Co(I(n),()=>t.endIcon),H(e,n)},a=e=>{oI(e,{name:`more_vert`})},o=e=>{oI(e,{name:`arrow_drop_down`,class:`small-arrow`})};W(r,e=>{t.endIcon?e(i):u()?e(a,1):e(o,-1)}),H(e,n)},$$slots:{startIcon:!0,default:!0,endIcon:!0}})),SI(L(h,2),{get anchor(){return z(f)},get position(){return i()},get positionBaseElement(){return a()},get showBackdrop(){return o()},children:(e,n)=>{var r=V();Co(I(r),()=>t.popup??E),H(e,r)},$$slots:{default:!0}}),H(e,m),k(p)}var Use,Wse,FI=o((()=>{Z(),J(),EI(),sI(),CI(),Use=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`popupPosition`,`popupPositionBaseElement`,`showPopupBackdrop`,`label`,`variant`,`size`,`iconic`,`children`,`startIcon`,`endIcon`,`popup`]),Wse=B(`<!> <!>`,1)}));function Gse(e,t){O(t,!0),G(e,LI);let n=q(t,`hidden`,3,!1),r=q(t,`disabled`,3,!1),i=q(t,`label`,3,``),a=q(t,`variant`,3,void 0),o=q(t,`size`,3,`medium`),s=q(t,`popupPosition`,3,`bottom-left`),c=q(t,`showPopupBackdrop`,3,!1),l=Gs(t,Kse),u=N(void 0);var d=II(),f=F(d);wI(f,Ks(()=>l,{get hidden(){return n()},get disabled(){return r()},get label(){return i()},get variant(){return a()},get size(){return o()}}));var p=L(f,2);{let e=e=>{var n=V(),r=I(n),i=e=>{var n=V();Co(I(n),()=>t.chevronIcon),H(e,n)},a=e=>{oI(e,{name:`arrow_drop_down`,class:`small-arrow`})};W(r,e=>{t.chevronIcon?e(i):e(a,-1)}),H(e,n)},i=e=>{var n=V();Co(I(n),()=>t.popup??E),H(e,n)},l=M(()=>Y(`_sui.split_button.more_options`));PI(p,{iconic:!0,get hidden(){return n()},get disabled(){return r()},get variant(){return a()},get size(){return o()},get"aria-label"(){return z(l)},get popupPosition(){return s()},get popupPositionBaseElement(){return z(u)},get showPopupBackdrop(){return c()},endIcon:e,popup:i,$$slots:{endIcon:!0,popup:!0}})}D(d),Rs(d,e=>P(u,e),()=>z(u)),R(e=>{K(d,`hidden`,n()),K(d,`aria-hidden`,n()),K(d,`aria-disabled`,r()),K(d,`aria-label`,e)},[()=>Y(`_sui.split_button.x_options`,{values:{name:i()}})]),H(e,d),k()}var Kse,II,LI,qse=o((()=>{Z(),J(),X(),sI(),FI(),EI(),Kse=new Set([`$$slots`,`$$events`,`$$legacy`,`hidden`,`disabled`,`label`,`variant`,`size`,`popupPosition`,`showPopupBackdrop`,`chevronIcon`,`popup`]),II=B(`<div role="group" class="sui split-button svelte-147hpcx"><!> <!></div>`),LI={hash:`svelte-147hpcx`,code:`.split-button.svelte-147hpcx {flex:none;display:inline-flex;margin:var(--sui-focus-ring-width);}.split-button.svelte-147hpcx button {margin:0;}.split-button.svelte-147hpcx button.menu-button {border-inline-start-width:0;border-start-start-radius:0;border-end-start-radius:0;aspect-ratio:3/4;}.split-button.svelte-147hpcx button:not(.menu-button) {border-start-end-radius:0;border-end-end-radius:0;}`}}));function RI(e,t){G(e,VI);let n=q(t,`hidden`,3,!1),r=q(t,`orientation`,3,`horizontal`),i=Gs(t,zI);var a=BI();_s(a,()=>({...i,role:`separator`,class:`sui divider ${t.class??``}`,hidden:n(),"aria-hidden":n(),"aria-orientation":r()}),void 0,void 0,void 0,`svelte-1d7dlbg`),H(e,a)}var zI,BI,VI,HI=o((()=>{Z(),J(),zI=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`orientation`]),BI=B(`<div></div>`),VI={hash:`svelte-1d7dlbg`,code:`.divider.svelte-1d7dlbg {flex:none;background-color:var(--sui-secondary-border-color);}.divider[aria-orientation=horizontal].svelte-1d7dlbg {margin:8px 0;width:100%;height:1px;}.divider[aria-orientation=vertical].svelte-1d7dlbg {margin:0 8px;width:1px;height:100%;}`}}));function UI(e,t){G(e,KI);let n=q(t,`flex`,3,!1),r=Gs(t,WI);var i=GI();_s(i,()=>({...r,role:`none`,class:`sui spacer ${t.class??``}`,[bs]:{flex:n()}}),void 0,void 0,void 0,`svelte-dvuobt`),H(e,i)}var WI,GI,KI,qI=o((()=>{Z(),J(),WI=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`flex`]),GI=B(`<div></div>`),KI={hash:`svelte-dvuobt`,code:`.spacer.flex.svelte-dvuobt:not([hidden]) {display:block;flex:auto;}.spacer.svelte-dvuobt:not(.flex) {width:8px;height:8px;}`}}));function Jse(e,t){G(e,XI);let n=q(t,`hidden`,3,!1),r=q(t,`disabled`,3,!1),i=q(t,`orientation`,3,`horizontal`),a=Gs(t,JI);var o=YI();_s(o,()=>({...a,role:`group`,class:`sui checkbox-group ${t.class??``} ${i()??``}`,hidden:n(),"aria-hidden":n(),"aria-disabled":r(),"aria-roledescription":`checkbox group`}),void 0,void 0,void 0,`svelte-1wj4q0y`);var s=F(o);Co(F(s),()=>t.children??E),D(s),D(o),R(()=>s.inert=r()),H(e,o)}var JI,YI,XI,Yse=o((()=>{Z(),J(),JI=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`orientation`,`children`]),YI=B(`<div><div role="none" class="inner svelte-1wj4q0y"><!></div></div>`),XI={hash:`svelte-1wj4q0y`,code:`.checkbox-group.svelte-1wj4q0y {display:inline-flex;}.checkbox-group.horizontal.svelte-1wj4q0y {gap:8px;align-items:center;flex-wrap:wrap;}.checkbox-group.vertical.svelte-1wj4q0y {gap:4px;flex-direction:column;}
646
+ @media (pointer: coarse) {.checkbox-group.vertical.svelte-1wj4q0y {gap:8px;}
647
+ }.inner.svelte-1wj4q0y {display:contents;}`}}));function ZI(e,t){let n=Ma();O(t,!0),G(e,tL);let r=q(t,`checked`,15),i=q(t,`name`,3,void 0),a=q(t,`value`,3,void 0),o=q(t,`hidden`,3,!1),s=q(t,`disabled`,3,!1),c=q(t,`readonly`,3,!1),l=q(t,`required`,3,!1),u=q(t,`invalid`,3,!1),d=q(t,`label`,3,void 0),f=q(t,`group`,15),p=Gs(t,QI),m=N(void 0),h=M(()=>r()===`mixed`);Qr(()=>{Array.isArray(f())&&(f().includes(a())?r()!==!0&&r(!0):r()!==!1&&r(!1))});var g=eL();let _;var v=F(g),y=F(v);{let e=e=>{var n=V(),i=I(n),a=e=>{var n=V();Co(I(n),()=>t.checkIcon),H(e,n)},o=e=>{oI(e,{name:`remove`})},s=e=>{oI(e,{name:`check`})};W(i,e=>{t.checkIcon?e(a):z(h)?e(o,1):r()&&e(s,2)}),H(e,n)},d=M(()=>t[`aria-label`]||void 0),g=M(()=>t[`aria-label`]?void 0:`${n}-label`);wI(y,Ks(()=>p,{role:`checkbox`,get id(){return n},get name(){return i()},get value(){return a()},get hidden(){return o()},get disabled(){return s()},get readonly(){return c()},get required(){return l()},get"aria-invalid"(){return u()},get"aria-checked"(){return r()},get"aria-label"(){return z(d)},get"aria-labelledby"(){return z(g)},onclick:e=>{e.preventDefault(),e.stopPropagation(),!(s()||c())&&(r(z(h)?!0:!r()),Array.isArray(f())&&(r()?f().includes(a())||f([...f(),a()]):f().includes(a())&&f(f().filter(e=>e!==a()))),t.onChange?.(new CustomEvent(`Change`,{detail:{checked:r()}})))},get element(){return z(m)},set element(e){P(m,e,!0)},startIcon:e,$$slots:{startIcon:!0}}))}var b=L(y,2),x=e=>{var r=$I(),i=F(r),a=e=>{var n=V();Co(I(n),()=>t.children),H(e,n)},o=e=>{var t=ja();R(()=>U(t,d())),H(e,t)};W(i,e=>{t.children?e(a):e(o,-1)}),D(r),R(()=>K(r,`id`,`${n}-label`)),H(e,r)};W(b,e=>{(t.children||d())&&e(x)}),D(v),D(g),R(()=>{_=as(g,1,`sui checkbox ${t.class??``}`,`svelte-1us37is`,_,{checked:r(),indeterminate:z(h),disabled:s(),readonly:c()}),K(g,`hidden`,o()),v.inert=s()}),va(`click`,g,e=>{e.preventDefault(),e.stopPropagation(),e.target.matches(`button`)||z(m)?.click()}),H(e,g),k()}var QI,$I,eL,tL,Xse=o((()=>{Z(),J(),EI(),sI(),QI=new Set([`$$slots`,`$$events`,`$$legacy`,`checked`,`class`,`name`,`value`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`label`,`aria-label`,`group`,`onChange`,`children`,`checkIcon`]),$I=B(`<label class="svelte-1us37is"><!></label>`),eL=B(`<div role="none"><div role="none" class="inner svelte-1us37is"><!> <!></div></div>`),tL={hash:`svelte-1us37is`,code:`.checkbox.svelte-1us37is {display:inline-flex;align-items:center;gap:8px;margin:var(--sui-focus-ring-width);color:var(--sui-control-foreground-color);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);cursor:pointer;-webkit-user-select:none;user-select:none;}.checkbox.svelte-1us37is:hover button {background-color:var(--sui-hover-background-color);}.checkbox.svelte-1us37is:hover button[aria-checked=true] {background-color:var(--sui-primary-accent-color-light);}.checkbox.svelte-1us37is:active button {background-color:var(--sui-active-background-color);}.checkbox.svelte-1us37is:active button[aria-checked=true] {background-color:var(--sui-primary-accent-color-dark);}.checkbox.svelte-1us37is button {flex:none;align-items:center;justify-content:center;overflow:hidden;margin:0 !important;border-width:var(--sui-checkbox-border-width, 1.5px);border-color:var(--sui-checkbox-border-color);border-radius:var(--sui-checkbox-border-radius);padding:0;width:var(--sui-checkbox-height);height:var(--sui-checkbox-height);color:var(--sui-primary-accent-text-color);background-color:var(--sui-checkbox-background-color);transition:all 200ms;}.checkbox.svelte-1us37is button[aria-checked=true] {border-color:var(--sui-checkbox-border-color-checked, var(--sui-primary-accent-color));color:var(--sui-checkbox-foreground-color-checked, var(--sui-primary-accent-color-inverted));background-color:var(--sui-checkbox-background-color-checked, var(--sui-primary-accent-color));}.checkbox.svelte-1us37is button[aria-invalid=true] {border-color:var(--sui-error-border-color);color:var(--sui-error-foreground-color);}.checkbox.svelte-1us37is button[aria-checked=true][aria-invalid=true] {background-color:var(--sui-checkbox-background-color);}.checkbox.svelte-1us37is button .icon {font-size:calc(var(--sui-checkbox-height) - 2px);}.checkbox.svelte-1us37is label:where(.svelte-1us37is) {cursor:inherit;}.inner.svelte-1us37is {display:contents;}`},ya([`click`])}));function nL(e,t){let n=Ma();O(t,!0),G(e,lL);let r=q(t,`open`,15,!1);q(t,`value`,11,``);let i=q(t,`role`,3,`dialog`),a=q(t,`size`,3,`medium`),o=q(t,`showClose`,3,!1),s=q(t,`showOk`,3,!0),c=q(t,`showCancel`,3,!0),l=q(t,`okLabel`,3,``),u=q(t,`okShortcuts`,3,void 0),d=q(t,`okDisabled`,3,!1),f=q(t,`cancelLabel`,3,``),p=q(t,`cancelShortcuts`,3,void 0),m=q(t,`cancelDisabled`,3,!1),h=q(t,`focusInput`,3,!0),g=Gs(t,rL),_=N(void 0),v=N(void 0);Qr(()=>{if(r()&&z(v)){let e=!1;return(async()=>{await Gw(50),!e&&(h()?((z(v)?.querySelector(`input, button.primary`))?.focus(),(z(v)?.querySelector(`input`))?.select()):z(_)?.focus())})(),()=>{e=!0}}});{let h=M(()=>t.header?void 0:t.title),y=M(()=>t.header?t.title:`${n}-title`);Rs(ise(e,Ks(()=>g,{get role(){return i()},get id(){return n},class:`dialog`,get"aria-label"(){return z(h)},get"aria-labelledby"(){return z(y)},get"aria-describedby"(){return`${n}-body`},showBackdrop:!0,get open(){return r()},set open(e){r(e)},children:(e,r)=>{var i=cL(),h=F(i),g=e=>{var r=aL(),i=F(r),a=e=>{var n=V();Co(I(n),()=>t.header),H(e,n)},s=e=>{var r=iL(),i=I(r),a=F(i,!0);D(i);var s=L(i,2);UI(s,{flex:!0});var c=L(s,2);Co(c,()=>t.headerExtra??E);var l=L(c,2),u=e=>{{let r=e=>{var n=V(),r=I(n),i=e=>{var n=V();Co(I(n),()=>t.closeIcon),H(e,n)},a=e=>{oI(e,{name:`close`})};W(r,e=>{t.closeIcon?e(i):e(a,-1)}),H(e,n)},i=M(()=>Y(`_sui.close`));wI(e,{variant:`ghost`,iconic:!0,get"aria-label"(){return z(i)},get"aria-controls"(){return n},onclick:()=>{z(_)?.close(`close`)},startIcon:r,$$slots:{startIcon:!0}})}};W(l,e=>{o()&&e(u)}),R(()=>{K(i,`id`,`${n}-title`),U(a,t.title)}),H(e,r)};W(i,e=>{t.header?e(a):e(s,-1)}),D(r),H(e,r)};W(h,e=>{(t.title||o()||t.header||t.headerExtra)&&e(g)});var y=L(h,2);Co(F(y),()=>t.children??E),D(y);var b=L(y,2),x=e=>{var n=sL(),r=F(n),i=e=>{var n=V();Co(I(n),()=>t.footer??E),H(e,n)},a=e=>{var n=oL(),r=I(n);Co(r,()=>t.footerExtra??E);var i=L(r,2);UI(i,{flex:!0});var a=L(i,2),o=e=>{{let t=M(()=>l()||Y(`_sui.ok`));wI(e,{variant:`primary`,get label(){return z(t)},get keyShortcuts(){return u()},get disabled(){return d()},onclick:()=>{z(_)?.close(`ok`)}})}};W(a,e=>{s()&&e(o)});var h=L(a,2),g=e=>{{let t=M(()=>f()||Y(`_sui.cancel`));wI(e,{variant:`secondary`,get label(){return z(t)},get keyShortcuts(){return p()},get disabled(){return m()},onclick:()=>{z(_)?.close(`cancel`)}})}};W(h,e=>{c()&&e(g)}),H(e,n)};W(r,e=>{t.footer?e(i):e(a,-1)}),D(n),H(e,n)};W(b,e=>{(s()||c()||t.footer||t.footerExtra)&&e(x)}),D(i),Rs(i,e=>P(v,e),()=>z(v)),R(()=>{as(i,1,`content ${t.class??``} ${a()??``}`,`svelte-1s9a5pq`),K(y,`id`,`${n}-body`)}),H(e,i)},$$slots:{default:!0}})),e=>P(_,e,!0),()=>z(_))}k()}var rL,iL,aL,oL,sL,cL,lL,uL=o((()=>{Z(),J(),X(),Kw(),EI(),qI(),sI(),xI(),rL=new Set(`$$slots.$$events.$$legacy.open.value.title.role.size.class.showClose.showOk.showCancel.okLabel.okShortcuts.okDisabled.cancelLabel.cancelShortcuts.cancelDisabled.focusInput.children.header.headerExtra.footer.footerExtra.closeIcon.input`.split(`.`)),iL=B(`<div role="none" class="title svelte-1s9a5pq"> </div> <!> <!> <!>`,1),aL=B(`<div role="none" class="header svelte-1s9a5pq"><!></div>`),oL=B(`<!> <!> <!> <!>`,1),sL=B(`<div role="none" class="footer svelte-1s9a5pq"><!></div>`),cL=B(`<div role="none"><!> <div role="none" class="body svelte-1s9a5pq"><!></div> <!></div>`),lL={hash:`svelte-1s9a5pq`,code:`.content.svelte-1s9a5pq {position:relative;display:flex;flex-direction:column;overflow:hidden;border-radius:var(--sui-dialog-content-border-radius, 4px);max-width:calc(100dvw - var(--sui-dialog-content-margin, 16px) * 2);background-color:var(--sui-dialog-content-background-color, var(--sui-secondary-background-color-translucent));box-shadow:var(--sui-dialog-content-box-shadow, 0 8px 16px var(--sui-popup-shadow-color));-webkit-backdrop-filter:var(--sui-dialog-content-backdrop-filter, blur(16px));backdrop-filter:var(--sui-dialog-content-backdrop-filter, blur(16px));transition-property:transform;}dialog.open .content.svelte-1s9a5pq {transition-duration:150ms;transform:scale(100%);}dialog:not(.open) .content.svelte-1s9a5pq {transition-duration:300ms;transform:scale(90%);}.content.small.svelte-1s9a5pq {width:var(--sui-dialog-small-content-width, var(--sui-dialog-content-width, 400px));max-height:var(--sui-dialog-small-content-max-height, var(--sui-dialog-content-max-height, 400px));}
648
+ @media (max-height: 400px) {.content.small.svelte-1s9a5pq {max-height:calc(100dvh - 32px);}
649
+ }.content.medium.svelte-1s9a5pq {width:var(--sui-dialog-medium-content-width, var(--sui-dialog-content-width, 600px));max-height:var(--sui-dialog-medium-content-max-height, var(--sui-dialog-content-max-height, 600px));}
650
+ @media (max-height: 600px) {.content.medium.svelte-1s9a5pq {max-height:calc(100dvh - 32px);}
651
+ }.content.large.svelte-1s9a5pq {width:var(--sui-dialog-large-content-width, var(--sui-dialog-content-width, 800px));max-height:var(--sui-dialog-large-content-max-height, var(--sui-dialog-content-max-height, 800px));}
652
+ @media (max-height: 800px) {.content.large.svelte-1s9a5pq {max-height:calc(100dvh - 32px);}
653
+ }.content.x-large.svelte-1s9a5pq {width:var(--sui-dialog-x-large-content-width, var(--sui-dialog-content-width, 1000px));max-height:var(--sui-dialog-x-large-content-max-height, var(--sui-dialog-content-max-height, 1000px));}
654
+ @media (max-height: 1000px) {.content.x-large.svelte-1s9a5pq {max-height:calc(100dvh - 32px);}
655
+ }:is(.header.svelte-1s9a5pq, .footer.svelte-1s9a5pq) {display:flex;align-items:center;gap:4px;}.header.svelte-1s9a5pq {box-sizing:content-box;margin:var(--sui-dialog-header-margin, 0 16px);border-width:var(--sui-dialog-header-border-width, 0 0 1px);border-color:var(--sui-dialog-header-border-color, var(--sui-secondary-border-color));padding:var(--sui-dialog-header-padding, 16px 8px);height:var(--sui-dialog-header-height, 32px);}.header.svelte-1s9a5pq .title:where(.svelte-1s9a5pq) {font-size:var(--sui-font-size-large);font-weight:var(--sui-font-weight-bold);}.footer.svelte-1s9a5pq {margin:var(--sui-dialog-footer-margin, 0 24px 24px);}
656
+ @media (width < 768px) {.footer.svelte-1s9a5pq {margin:var(--sui-dialog-footer-margin, 0 16px 16px);}
657
+ }.body.svelte-1s9a5pq {overflow:auto;margin:var(--sui-dialog-body-margin, 24px 24px);white-space:normal;line-height:var(--sui-line-height-compact);}
658
+ @media (width < 768px) {.body.svelte-1s9a5pq {margin:var(--sui-dialog-body-margin, 16px 16px);}
659
+ }`}}));function dL(e,t){O(t,!0);let n=q(t,`open`,15,!1),r=Gs(t,fL);nL(e,Ks(()=>r,{role:`alertdialog`,showCancel:!1,get open(){return n()},set open(e){n(e)}})),k()}var fL,Zse=o((()=>{Z(),J(),uL(),fL=new Set([`$$slots`,`$$events`,`$$legacy`,`open`])}));function pL(e,t){O(t,!0);let n=q(t,`open`,15,!1),r=Gs(t,mL);nL(e,Ks(()=>r,{role:`alertdialog`,get open(){return n()},set open(e){n(e)}})),k()}var mL,Qse=o((()=>{Z(),J(),uL(),mL=new Set([`$$slots`,`$$events`,`$$legacy`,`open`])}));function hL(e,t){let n=Ma();O(t,!0),G(e,yL);let r=q(t,`value`,15),i=q(t,`element`,15),a=q(t,`role`,3,`textbox`),o=q(t,`keyShortcuts`,3,void 0),s=q(t,`dir`,3,void 0),c=q(t,`name`,3,void 0),l=q(t,`showInlineLabel`,3,!1),u=q(t,`inputmode`,3,`text`),d=q(t,`flex`,3,!1),f=q(t,`monospace`,3,!1),p=q(t,`debounce`,3,!1),m=q(t,`hidden`,3,!1),h=q(t,`disabled`,3,!1),g=q(t,`readonly`,3,!1),_=q(t,`required`,3,!1),v=q(t,`invalid`,3,!1),y=Gs(t,gL),b=M(()=>typeof p()==`number`?p():300),x=0;Qr(()=>()=>{clearTimeout(x)});let S=e=>{r(i()?.value),t.oninput?.(e)},C=e=>{let t=e;p()?(clearTimeout(x),x=setTimeout(()=>{S(t)},z(b))):S(t)};var w=vL();let T;var ee=F(w);_s(ee,()=>({...y,value:r(),type:`text`,role:a(),dir:s(),name:c(),tabindex:h()?-1:0,disabled:h()||void 0,readonly:g()||void 0,inputmode:u(),"aria-label":t[`aria-label`],"aria-hidden":m(),"aria-disabled":h(),"aria-readonly":g(),"aria-required":_(),"aria-invalid":v(),oninputcapture:C}),void 0,void 0,void 0,`svelte-ibezxm`,!0),Rs(ee,e=>i(e),()=>i()),qo(ee,()=>fI(o()));var te=L(ee,2),ne=e=>{var i=_L();let a;mI(F(i),{children:(e,n)=>{gt();var r=ja();R(()=>U(r,t[`aria-label`])),H(e,r)},$$slots:{default:!0}}),D(i),R(()=>{K(i,`id`,`${n}-label`),a=as(i,1,`label svelte-ibezxm`,null,a,{hidden:!!r()})}),H(e,i)};W(te,e=>{t[`aria-label`]&&l()&&e(ne)}),D(w),R(()=>{T=as(w,1,`sui text-input ${t.class??``}`,`svelte-ibezxm`,T,{flex:d(),monospace:f(),disabled:h(),readonly:g()}),K(w,`hidden`,m()),ee.dir=ee.dir}),H(e,w),k()}var gL,_L,vL,yL,bL=o((()=>{Z(),J(),pI(),hI(),gL=new Set([`$$slots`,`$$events`,`$$legacy`,`value`,`element`,`role`,`keyShortcuts`,`dir`,`name`,`showInlineLabel`,`inputmode`,`flex`,`monospace`,`debounce`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`aria-label`,`children`,`oninput`]),_L=B(`<span aria-hidden="true"><!></span>`),vL=B(`<div role="none"><input/> <!></div>`),yL={hash:`svelte-ibezxm`,code:`.text-input.svelte-ibezxm {display:inline-flex;align-items:center;position:relative;margin:var(--sui-focus-ring-width);min-width:var(--sui-textbox-singleline-min-width);}.text-input.flex.svelte-ibezxm:not([hidden]) {display:inline-flex;width:-moz-available;width:-webkit-fill-available;width:stretch;min-width:0;}.text-input.monospace.svelte-ibezxm {--sui-textbox-font-family: var(--sui-font-family-monospace, monospace);}input.svelte-ibezxm:is(:where(.svelte-ibezxm):-webkit-autofill, :where(.svelte-ibezxm):-webkit-autofill:focus) {transition:background-color 0s 600000s, color 0s 600000s;}input.svelte-ibezxm {display:inline-block;flex:auto;border-width:var(--sui-textbox-border-width, 1px);border-color:var(--sui-textbox-border-color);border-radius:var(--sui-textbox-border-radius);padding:var(--sui-textbox-singleline-padding);min-width:0;height:var(--sui-textbox-height);color:var(--sui-textbox-foreground-color);background-color:var(--sui-textbox-background-color);font-family:var(--sui-textbox-font-family);font-size:var(--sui-textbox-font-size);line-height:var(--sui-textbox-singleline-line-height);font-weight:var(--sui-textbox-font-weight, var(--sui-font-weight-normal, normal));text-align:var(--sui-textbox-text-align, start);text-indent:var(--sui-textbox-text-indent, 0);text-transform:var(--sui-textbox-text-transform, none);letter-spacing:var(--sui-textbox-letter-spacing, normal);word-spacing:var(--sui-word-spacing-normal, normal);transition:all 200ms;}input.svelte-ibezxm:focus {border-color:var(--sui-textbox-border-color-focus, var(--sui-primary-accent-color));color:var(--sui-textbox-foreground-color-focus, var(--sui-textbox-foreground-color));background-color:var(--sui-textbox-background-color-focus, var(--sui-textbox-background-color));}input.svelte-ibezxm:read-only {color:var(--sui-tertiary-foreground-color);border-color:var(--sui-textbox-border-color) !important;}input.svelte-ibezxm:is(:where(.svelte-ibezxm):disabled, :where(.svelte-ibezxm):read-only) {background-color:var(--sui-disabled-background-color);}input[aria-invalid=true].svelte-ibezxm {border-color:var(--sui-error-border-color);}input.svelte-ibezxm ~ button {flex:none;margin-inline-start:-1px;border-width:1px;border-color:var(--sui-textbox-border-color);height:var(--sui-textbox-height);aspect-ratio:1/1;}input.svelte-ibezxm ~ button:last-child {border-start-start-radius:0;border-start-end-radius:4px;border-end-end-radius:4px;border-end-start-radius:0;}input.svelte-ibezxm ~ button .icon {font-size:var(--sui-font-size-xx-large);}.label.svelte-ibezxm {position:absolute;inset:var(--sui-textbox-singleline-padding);z-index:2;display:flex;align-items:center;justify-content:var(--sui-textbox-placeholder-text-align, var(--sui-textbox-text-align, start));pointer-events:none;}.label.hidden.svelte-ibezxm {opacity:0;}input.svelte-ibezxm:focus + .label:where(.svelte-ibezxm) {opacity:0;}input.svelte-ibezxm::placeholder,
660
+ .label.svelte-ibezxm {color:var(--sui-textbox-placeholder-foreground-color, var(--sui-textbox-foreground-color));opacity:var(--sui-textbox-placeholder-opacity, 0.5);font-family:var(--sui-textbox-placeholder-font-family, var(--sui-textbox-font-family));font-size:var(--sui-textbox-placeholder-font-size, var(--sui-textbox-font-size));line-height:var(--sui-textbox-placeholder-singleline-line-height, var(--sui-textbox-singleline-line-height));font-weight:var(--sui-textbox-placeholder-font-weight, var(--sui-textbox-font-weight, var(--sui-font-weight-normal, normal)));text-align:var(--sui-textbox-placeholder-text-align, var(--sui-textbox-text-align, start));text-indent:var(--sui-textbox-placeholder-text-indent, var(--sui-textbox-text-indent, 0));letter-spacing:var(--sui-textbox-placeholder-letter-spacing, var(--sui-textbox-letter-spacing, normal));}`}}));function xL(e,t){O(t,!0),G(e,wL);let n=q(t,`open`,15,!1),r=q(t,`value`,15,``),i=q(t,`textboxAttrs`,19,()=>({})),a=Gs(t,SL);nL(e,Ks(()=>a,{role:`alertdialog`,get open(){return n()},set open(e){n(e)},children:(e,n)=>{var a=CL(),o=I(a);Co(o,()=>t.children??E);var s=L(o,2),c=F(s),l=e=>{var n=V();Co(I(n),()=>t.input),H(e,n)},u=e=>{hL(e,Ks({dir:`auto`,flex:!0,autofocus:!0},i,{get onkeydown(){return t.onkeydown},get onkeyup(){return t.onkeyup},get onkeypress(){return t.onkeypress},get oninput(){return t.oninput},get value(){return r()},set value(e){r(e)}}))};W(c,e=>{t.input?e(l):e(u,-1)}),D(s),H(e,a)},$$slots:{default:!0}})),k()}var SL,CL,wL,$se=o((()=>{Z(),J(),bL(),uL(),SL=new Set([`$$slots`,`$$events`,`$$legacy`,`open`,`value`,`textboxAttrs`,`children`,`input`,`onkeydown`,`onkeyup`,`onkeypress`,`oninput`]),CL=B(`<!> <div class="input-outer svelte-128lmc1"><!></div>`,1),wL={hash:`svelte-128lmc1`,code:`.input-outer.svelte-128lmc1 {margin:12px 0 0;}`}}));function TL(e,t){O(t,!0);let n=q(t,`accept`,3,void 0),r=q(t,`multiple`,3,!1),i=q(t,`onSelect`,3,void 0),a=q(t,`onCancel`,3,void 0),o=N(void 0);var s={open:()=>{z(o)?.click()}},c=EL();return Rs(c,e=>P(o,e),()=>z(o)),R(()=>{K(c,`accept`,n()),c.multiple=r()}),va(`change`,c,({target:e})=>{let t=[...e.files];i()?.({files:t,file:t[0]})}),_a(`cancel`,c,e=>{e.stopPropagation(),a()?.()}),H(e,c),k(s)}var EL,ece=o((()=>{Z(),J(),EL=B(`<input class="sui file-picker" type="file" hidden=""/>`),ya([`change`])}));function DL(e,t){let n=Ma();G(e,jL);let r=q(t,`label`,3,``),i=Gs(t,OL);var a=AL();_s(a,()=>({...i,role:`rowgroup`,class:`sui grid-body row-group ${t.class??``}`,"aria-labelledby":r()?`${n}-label`:void 0,"aria-roledescription":`grid body`}),void 0,void 0,void 0,`svelte-14bxcir`);var o=F(a),s=e=>{var t=kL();Vo(F(t),()=>`th`,!1,(e,t)=>{_s(e,()=>({role:`columnheader`,id:`${n}-label`,colspan:`9999`,class:``}),void 0,void 0,void 0,`svelte-14bxcir`);var i=ja();R(()=>U(i,r())),H(t,i)}),D(t),H(e,t)};W(o,e=>{r()&&e(s)}),Co(L(o,2),()=>t.children??E),D(a),H(e,a)}var OL,kL,AL,jL,tce=o((()=>{Z(),J(),OL=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`label`,`children`]),kL=B(`<div role="row" class="row-group-caption svelte-14bxcir"><!></div>`),AL=B(`<div><!> <!></div>`),jL={hash:`svelte-14bxcir`,code:`[role=rowgroup].svelte-14bxcir {display:table-row-group;}[role=row].svelte-14bxcir {display:table-row;}[role=columnheader].svelte-14bxcir {display:table-cell;padding:8px;color:var(--sui-secondary-foreground-color);background-color:var(--sui-secondary-background-color);font-size:var(--sui-font-size-default);text-align:start;}`}}));function ML(e,t){G(e,FL);let n=Gs(t,NL);var r=PL();_s(r,()=>({...n,role:`gridcell`,class:`sui grid-cell ${t.class??``}`}),void 0,void 0,void 0,`svelte-tzhrfb`),Co(F(r),()=>t.children??E),D(r),H(e,r)}var NL,PL,FL,nce=o((()=>{Z(),J(),NL=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`children`]),PL=B(`<div><!></div>`),FL={hash:`svelte-tzhrfb`,code:`.grid-cell.svelte-tzhrfb {display:table-cell;}`}}));function IL(e,t){G(e,zL);let n=q(t,`selected`,3,!1),r=Gs(t,LL);var i=RL();_s(i,()=>({...r,role:`row`,class:`sui grid-row ${t.class??``}`,tabindex:`0`,"aria-selected":n()}),void 0,void 0,void 0,`svelte-otbetb`),Co(F(i),()=>t.children??E),D(i),H(e,i)}var LL,RL,zL,rce=o((()=>{Z(),J(),LL=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`selected`,`children`]),RL=B(`<div><!></div>`),zL={hash:`svelte-otbetb`,code:`.grid-row.svelte-otbetb {display:table-row;height:var(--sui-primary-row-height);}`}}));function ice(e,t){O(t,!0),G(e,HL);let n=q(t,`element`,15),r=q(t,`multiple`,3,!1),i=q(t,`clickToSelect`,3,!0),a=Gs(t,BL);var o=VL(),s=e=>{t.onChange?.(e)};_s(o,()=>({...a,role:`grid`,class:`sui grid ${t.class??``}`,"aria-multiselectable":r(),onChange:s}),void 0,void 0,void 0,`svelte-1bxji52`),Co(F(o),()=>t.children??E),D(o),Rs(o,e=>n(e),()=>n()),qo(o,()=>AI({clickToSelect:i()})),H(e,o),k()}var BL,VL,HL,ace=o((()=>{Z(),J(),jI(),BL=new Set([`$$slots`,`$$events`,`$$legacy`,`element`,`class`,`multiple`,`clickToSelect`,`children`,`onChange`]),VL=B(`<div><!></div>`),HL={hash:`svelte-1bxji52`,code:`.grid.svelte-1bxji52 {display:table;margin:var(--sui-focus-ring-width);width:calc(100% - var(--sui-focus-ring-width) * 2);}.grid.data.svelte-1bxji52 {border-collapse:collapse;}.grid.data.svelte-1bxji52 :is(.grid-col-header, .grid-row-header, .grid-cell) {border:1px solid var(--sui-secondary-border-color);padding:8px 8px;}`}}));function UL(e,t){O(t,!0),G(e,KL);let n=q(t,`hidden`,3,!1),r=q(t,`disabled`,3,!1),i=q(t,`readonly`,3,!1),a=q(t,`required`,3,!1),o=q(t,`invalid`,3,!1),s=q(t,`multiple`,3,!1),c=q(t,`searchTerms`,3,``),l=Gs(t,WL),u=N(!1);var d=GL(),f=e=>{let{detail:{matched:n,total:r}}=e;P(u,n!==r),t.onFilter?.(e)};_s(d,()=>({...l,role:`listbox`,class:`sui listbox ${t.class??``}`,tabindex:r()?-1:0,hidden:n(),"aria-hidden":n(),"aria-disabled":r(),"aria-readonly":i(),"aria-required":a(),"aria-invalid":o(),"aria-multiselectable":s(),onFilter:f,[bs]:{filtered:z(u)}}),void 0,void 0,void 0,`svelte-1775e6g`);var p=F(d);Co(F(p),()=>t.children??E),D(p),D(d),qo(d,()=>AI(()=>({searchTerms:c()}))),R(()=>p.inert=r()),H(e,d),k()}var WL,GL,KL,qL=o((()=>{Z(),J(),jI(),WL=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`multiple`,`searchTerms`,`children`,`onFilter`]),GL=B(`<div><div role="none" class="inner svelte-1775e6g"><!></div></div>`),KL={hash:`svelte-1775e6g`,code:`[role=listbox].svelte-1775e6g {display:flex;flex-direction:column;margin:var(--sui-focus-ring-width);border-width:var(--sui-listbox-border-width, 1px);border-style:var(--sui-listbox-border-style, solid);border-color:var(--sui-listbox-border-width, var(--sui-secondary-border-color));border-radius:var(--sui-listbox-border-radius, 4px);padding:var(--sui-listbox-padding, 4px);min-width:var(--sui-listbox-min-width, calc(var(--sui-option-height) * 5));color:var(--sui-listbox-foreground-color);background-color:var(--sui-listbox-background-color);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);}
661
+ @media (pointer: coarse) {[role=listbox].svelte-1775e6g {gap:8px 0;}
662
+ }[role=listbox].svelte-1775e6g [role=separator] {margin:4px 0;background-color:var(--sui-control-border-color);}[role=listbox][aria-invalid=true].svelte-1775e6g {border-color:var(--sui-error-border-color);}[role=listbox].tabs.svelte-1775e6g {padding:0;border-block-start-width:0;border-block-end-width:0;border-inline-end-width:1px;border-inline-start-width:0;border-color:var(--sui-control-border-color);}[role=listbox].tabs.svelte-1775e6g .option button {justify-content:flex-start;border-width:0;border-inline-end-width:2px;border-color:transparent;padding:0 12px;border-start-end-radius:0;border-end-end-radius:0;height:var(--sui-tab-medium-height);}[role=listbox].tabs.svelte-1775e6g .option button[aria-selected=true] {border-color:var(--sui-primary-accent-color-light);}[role=listbox].tabs.svelte-1775e6g .option button .icon {display:none;}[role=listbox].in-combobox.svelte-1775e6g:focus-visible {outline-color:transparent;}[role=listbox].filtered.svelte-1775e6g [role=separator] {display:none;}.inner.svelte-1775e6g {display:contents;}`}}));function JL(e,t){let n=Ma();G(e,ZL);let r=q(t,`hidden`,3,!1),i=q(t,`disabled`,3,!1),a=q(t,`label`,3,``),o=Gs(t,YL);var s=XL();_s(s,()=>({...o,role:`group`,id:n,class:`sui option-group ${t.class??``}`,hidden:r(),"aria-hidden":r(),"aria-disabled":i(),"aria-labelledby":`${n}-label`,"aria-roledescription":`option group`}),void 0,void 0,void 0,`svelte-hqpvw0`);var c=F(s);mI(F(c),{children:(e,t)=>{gt();var n=ja();R(()=>U(n,a())),H(e,n)},$$slots:{default:!0}}),D(c);var l=L(c,2);Co(F(l),()=>t.children??E),D(l),D(s),R(()=>{K(c,`id`,`${n}-label`),l.inert=i()}),H(e,s)}var YL,XL,ZL,oce=o((()=>{Z(),J(),hI(),YL=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`label`,`children`]),XL=B(`<div><div role="none" class="label svelte-hqpvw0"><!></div> <div role="none" class="inner svelte-hqpvw0"><!></div></div>`),ZL={hash:`svelte-hqpvw0`,code:`.option-group.svelte-hqpvw0:not(:first-child) {margin:12px 0 0;}.label.svelte-hqpvw0 {margin:8px;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}.inner.svelte-hqpvw0 {display:contents;}`}}));function QL(e,t){O(t,!0),G(e,nR);let n=q(t,`selected`,15,!1),r=q(t,`hidden`,15,!1),i=q(t,`disabled`,3,!1),a=q(t,`value`,19,()=>t.label),o=q(t,`searchValue`,19,()=>t.label),s=q(t,`wrap`,3,!1),c=Gs(t,$L);var l=tR();let u;wI(F(l),Ks(()=>c,{role:`option`,tabindex:`-1`,get"aria-selected"(){return n()},get label(){return t.label},get value(){return a()},get hidden(){return r()},get disabled(){return i()},get"data-search-value"(){return o()},onChange:e=>{n(e.detail.selected),t.onChange?.(e)},onToggle:e=>{r(e.detail.hidden),r()&&n(!1),t.onToggle?.(e)},startIcon:e=>{var n=V();Co(I(n),()=>t.startIcon??E),H(e,n)},children:(e,r)=>{var i=eR(),a=I(i),o=e=>{var n=V(),r=I(n),i=e=>{var n=V();Co(I(n),()=>t.checkIcon),H(e,n)},a=e=>{oI(e,{class:`check`,name:`check`})};W(r,e=>{t.checkIcon?e(i):e(a,-1)}),H(e,n)};W(a,e=>{n()&&e(o)}),Co(L(a,2),()=>t.children??E),H(e,i)},$$slots:{startIcon:!0,default:!0}})),D(l),R(()=>{u=as(l,1,`sui option ${t.class??``}`,`svelte-1swtfsu`,u,{wrap:s()}),K(l,`hidden`,r())}),H(e,l),k()}var $L,eR,tR,nR,rR=o((()=>{Z(),J(),EI(),sI(),$L=new Set([`$$slots`,`$$events`,`$$legacy`,`selected`,`hidden`,`class`,`disabled`,`label`,`value`,`searchValue`,`wrap`,`children`,`checkIcon`,`startIcon`,`onChange`,`onToggle`]),eR=B(`<!> <!>`,1),tR=B(`<div role="none"><!></div>`),nR={hash:`svelte-1swtfsu`,code:`.option.svelte-1swtfsu {display:contents;}.option.svelte-1swtfsu:focus-visible {outline-width:0 !important;}.option.svelte-1swtfsu .wrap button {white-space:normal;}.option.svelte-1swtfsu button {flex:none;display:flex;gap:4px;margin:0 !important;border-radius:var(--sui-option-border-radius);padding:var(--sui-option-padding);width:100%;height:auto;min-height:var(--sui-option-height);}.option.svelte-1swtfsu button:active {background-color:var(--sui-active-background-color);}.option.svelte-1swtfsu button[aria-selected=true] .icon.check {color:var(--sui-primary-accent-color-text);}.option.svelte-1swtfsu button * {flex:none;}.option.svelte-1swtfsu button .label {flex:auto;}.option.svelte-1swtfsu :is(.focused, button:hover) {color:var(--sui-highlight-foreground-color);background-color:var(--sui-hover-background-color);}.option.svelte-1swtfsu .icon.check {margin:-2px;}`}}));function iR(e,t){O(t,!0),G(e,sR);let n=q(t,`hidden`,3,!1),r=q(t,`disabled`,3,!1),i=Gs(t,aR);var a=oR(),o=e=>{t.onChange?.(e)};_s(a,()=>({...i,role:`menu`,class:`sui menu ${t.class??``}`,hidden:n(),"aria-hidden":n(),"aria-disabled":r(),onChange:o}),void 0,void 0,void 0,`svelte-18w53ks`),Co(F(a),()=>t.children??E),D(a),qo(a,AI),H(e,a),k()}var aR,oR,sR,cR=o((()=>{Z(),J(),jI(),aR=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`children`,`onChange`]),oR=B(`<div><!></div>`),sR={hash:`svelte-18w53ks`,code:`.menu.svelte-18w53ks {display:flex;flex-direction:column;margin:0;border-width:var(--sui-menu-border-width, 1px);border-style:var(--sui-menu-border-style, solid);border-color:var(--sui-menu-border-width, var(--sui-secondary-border-color));border-radius:var(--sui-menu-border-radius, 4px);padding:var(--sui-menu-padding, 4px);}
663
+ @media (pointer: coarse) {.menu.svelte-18w53ks {gap:8px 0;}
664
+ }.menu.svelte-18w53ks [role=separator] {margin:var(--sui-menu-divider-margin, 4px);background-color:var(--sui-menu-divider-color, var(--sui-control-border-color));}`}}));function lR(e,t){O(t,!0),G(e,mR);let n=q(t,`role`,3,`menuitem`),r=q(t,`hidden`,3,!1),i=q(t,`disabled`,3,!1),a=q(t,`label`,3,``),o=q(t,`popupPosition`,3,`right-top`),s=Gs(t,uR),c=N(!1),l=N(!1),u=N(void 0),d=N(void 0),f=M(()=>n()===`menuitem`&&!!t.items);tc(()=>{P(d,z(u)?.closest(`dialog`)??void 0,!0)});var p=pR(),m=F(p);{let e=e=>{var n=V();Co(I(n),()=>t.startIcon??E),H(e,n)},o=e=>{var n=fR(),r=I(n);let i;var o=F(r),s=e=>{var t=ja();R(()=>U(t,a())),H(e,t)},c=e=>{var n=V();Co(I(n),()=>t.children??E),H(e,n)};W(o,e=>{a()?e(s):e(c,-1)}),D(r);var l=L(r,2),u=e=>{var n=dR(),r=F(n),i=e=>{var n=V();Co(I(n),()=>t.chevronIcon),H(e,n)},a=e=>{{let t=M(()=>Lh()?`chevron_left`:`chevron_right`);oI(e,{get name(){return z(t)}})}};W(r,e=>{t.chevronIcon?e(i):e(a,-1)}),D(n),H(e,n)};W(l,e=>{z(f)&&e(u)}),R(()=>i=as(r,1,`content svelte-m024hw`,null,i,{label:!!a()})),H(e,n)},d=e=>{var n=V();Co(I(n),()=>t.endIcon??E),H(e,n)},p=M(()=>z(f)?`menu`:void 0),h=M(()=>z(f)?z(c):void 0);wI(m,Ks(()=>s,{get role(){return n()},get hidden(){return r()},get disabled(){return i()},get"aria-haspopup"(){return z(p)},get"aria-expanded"(){return z(h)},onmouseenter:e=>{z(f)&&window.setTimeout(()=>{P(c,!0)},200),t.onmouseenter?.(e)},onmouseleave:e=>{z(f)&&window.setTimeout(()=>{z(l)||P(c,!1)},200),t.onmouseleave?.(e)},onclick:e=>{z(f)&&(e.preventDefault(),e.stopPropagation(),P(c,!z(c))),t.onclick?.(e)},get onChange(){return t.onChange},get onSelect(){return t.onSelect},get element(){return z(u)},set element(e){P(u,e,!0)},startIcon:e,children:o,endIcon:d,$$slots:{startIcon:!0,default:!0,endIcon:!0}}))}var h=L(m,2),g=e=>{SI(e,{get anchor(){return z(u)},get parentDialogElement(){return z(d)},get position(){return o()},get open(){return z(c)},set open(e){P(c,e,!0)},get hovered(){return z(l)},set hovered(e){P(l,e,!0)},children:(e,n)=>{iR(e,{children:(e,n)=>{var r=V();Co(I(r),()=>t.items??E),H(e,r)},$$slots:{default:!0}})},$$slots:{default:!0}})};W(h,e=>{z(f)&&z(u)&&z(d)&&e(g)}),D(p),R(()=>{as(p,1,`sui menuitem ${t.class??``}`,`svelte-m024hw`),K(p,`hidden`,r())}),H(e,p),k()}var uR,dR,fR,pR,mR,hR=o((()=>{Z(),J(),X(),rc(),EI(),sI(),CI(),cR(),uR=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`role`,`hidden`,`disabled`,`label`,`popupPosition`,`children`,`startIcon`,`endIcon`,`chevronIcon`,`items`,`onmouseenter`,`onmouseleave`,`onclick`,`onChange`,`onSelect`]),dR=B(`<span role="none" class="icon-outer svelte-m024hw"><!></span>`),fR=B(`<div role="none"><!></div> <!>`,1),pR=B(`<div role="none"><!> <!></div>`),mR={hash:`svelte-m024hw`,code:`.menuitem.svelte-m024hw {position:relative;}.menuitem.svelte-m024hw button {display:flex;gap:var(--sui-menuitem-gap, 4px);align-items:var(--sui-menuitem-align-items, center);border-radius:var(--sui-menuitem-border-radius, var(--sui-option-border-radius, 4px));margin:0 !important;padding:var(--sui-menuitem-padding, 0 16px);width:100%;min-width:var(--sui-menuitem-min-width, 160px);height:var(--sui-menuitem-height, var(--sui-option-height));color:var(--sui-menuitem-foreground-color, var(--sui-control-foreground-color, inherit));background-color:var(--sui-menuitem-background-color, transparent);font-size:var(--sui-menuitem-font-size, var(--sui-option-font-size));font-weight:var(--sui-menuitem-font-weight, var(--sui-option-font-weight, var(--sui-font-weight-normal, normal)));}.menuitem.svelte-m024hw button[aria-checked=true] .icon {color:var(--sui-primary-accent-color-text);}.menuitem.svelte-m024hw button:hover {color:var(--sui-highlight-foreground-color);background-color:var(--sui-hover-background-color);}.menuitem.svelte-m024hw button:active {background-color:var(--sui-active-background-color);}.menuitem.svelte-m024hw :hover > [role=menu] {opacity:1;}.menuitem.svelte-m024hw > [role=menu] {position:absolute;inset-block-start:2px;inset-block-end:auto;inset-inline-start:calc(100% + 4px);inset-inline-end:auto;}.menuitem.svelte-m024hw > [role=menu]:hover {opacity:1;}.content.svelte-m024hw {flex:auto;}.icon-outer.svelte-m024hw {flex:none;width:24px;height:24px;}`}}));function gR(e,t){O(t,!0);let n=q(t,`checked`,15),r=q(t,`hidden`,3,!1),i=q(t,`disabled`,3,!1),a=q(t,`label`,3,``),o=Gs(t,_R);lR(e,Ks(()=>o,{role:`menuitemcheckbox`,get class(){return`sui menu-item-checkbox ${t.class??``}`},get label(){return a()},get hidden(){return r()},get disabled(){return i()},get"aria-checked"(){return n()},onChange:e=>{t.onChange?.(e),n(e.detail.checked)},startIcon:e=>{var n=V();Co(I(n),()=>t.startIcon??E),H(e,n)},children:e=>{var n=V();Co(I(n),()=>t.children??E),H(e,n)},endIcon:e=>{var t=V(),r=I(t),i=e=>{oI(e,{name:`check`})};W(r,e=>{n()&&e(i)}),H(e,t)},$$slots:{startIcon:!0,default:!0,endIcon:!0}})),k()}var _R,vR=o((()=>{Z(),J(),sI(),hR(),_R=new Set([`$$slots`,`$$events`,`$$legacy`,`checked`,`class`,`hidden`,`disabled`,`label`,`children`,`startIcon`,`onChange`])}));function yR(e,t){O(t,!0);let n=q(t,`checked`,15),r=q(t,`hidden`,3,!1),i=q(t,`disabled`,3,!1),a=q(t,`label`,3,``),o=Gs(t,bR);lR(e,Ks(()=>o,{role:`menuitemradio`,get class(){return`sui menu-item-radio ${t.class??``}`},get label(){return a()},get hidden(){return r()},get disabled(){return i()},get"aria-checked"(){return n()},onChange:e=>{t.onChange?.(e),n(e.detail.checked)},startIcon:e=>{var n=V();Co(I(n),()=>t.startIcon??E),H(e,n)},children:e=>{var n=V();Co(I(n),()=>t.children??E),H(e,n)},endIcon:e=>{var t=V(),r=I(t),i=e=>{oI(e,{name:`check`})};W(r,e=>{n()&&e(i)}),H(e,t)},$$slots:{startIcon:!0,default:!0,endIcon:!0}})),k()}var bR,sce=o((()=>{Z(),J(),sI(),hR(),bR=new Set([`$$slots`,`$$events`,`$$legacy`,`checked`,`class`,`hidden`,`disabled`,`label`,`children`,`startIcon`,`onChange`])}));function cce(e,t){G(e,CR);let n=q(t,`now`,3,0),r=q(t,`min`,3,0),i=q(t,`max`,3,100),a=Gs(t,xR);var o=SR();_s(o,()=>({...a,role:`progressbar`,class:`sui progressbar ${t.class??``}`,"aria-valuenow":n(),"aria-valuemin":r(),"aria-valuemax":i(),"aria-valuetext":t.text}),void 0,void 0,void 0,`svelte-1fii62w`);var s=F(o);let c;D(o),R(()=>c=cs(s,``,c,{width:`${n()??``}%`})),H(e,o)}var xR,SR,CR,lce=o((()=>{Z(),J(),xR=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`now`,`min`,`max`,`text`]),SR=B(`<div><div role="none" class="svelte-1fii62w"></div></div>`),CR={hash:`svelte-1fii62w`,code:`.progressbar.svelte-1fii62w {overflow:hidden;border-width:var(--sui-progressbar-border-width, 1px);border-style:var(--sui-progressbar-border-style, solid);border-color:var(--sui-progressbar-border-color, var(--sui-control-border-color));border-radius:var(--sui-progressbar-border-radius, 16px);width:var(--sui-progressbar-width, 240px);height:var(--sui-progressbar-height, 10px);background-color:var(--sui-progressbar-background-color, var(--sui-secondary-background-color));}.progressbar.svelte-1fii62w div:where(.svelte-1fii62w) {height:100%;background-color:var(--sui-progressbar-foreground-color, var(--sui-primary-accent-color-light));transition:width 250ms;}`}}));function wR(e,t){O(t,!0),G(e,DR);let n=q(t,`hidden`,3,!1),r=q(t,`disabled`,3,!1),i=q(t,`readonly`,3,!1),a=q(t,`required`,3,!1),o=q(t,`invalid`,3,!1),s=q(t,`orientation`,3,`horizontal`),c=Gs(t,TR);var l=ER(),u=e=>{t.onChange?.(e)};_s(l,()=>({...c,role:`radiogroup`,class:`sui radio-group ${t.class??``} ${s()??``}`,tabindex:`-1`,hidden:n(),"aria-hidden":n(),"aria-disabled":r(),"aria-readonly":i(),"aria-required":a(),"aria-invalid":o(),"aria-orientation":s(),onChange:u}),void 0,void 0,void 0,`svelte-1mnz8e2`);var d=F(l);Co(F(d),()=>t.children??E),D(d),D(l),qo(l,AI),R(()=>d.inert=r()),H(e,l),k()}var TR,ER,DR,uce=o((()=>{Z(),J(),jI(),TR=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`orientation`,`children`,`onChange`]),ER=B(`<div><div role="none" class="inner svelte-1mnz8e2"><!></div></div>`),DR={hash:`svelte-1mnz8e2`,code:`.radio-group.svelte-1mnz8e2 {display:inline-flex;}.radio-group.svelte-1mnz8e2:focus-visible {outline-width:0 !important;}.radio-group.horizontal.svelte-1mnz8e2 {gap:8px;align-items:center;flex-wrap:wrap;}.radio-group.vertical.svelte-1mnz8e2 {gap:4px;flex-direction:column;}
665
+ @media (pointer: coarse) {.radio-group.vertical.svelte-1mnz8e2 {gap:8px;}
666
+ }.radio-group.svelte-1mnz8e2 [aria-invalid=true] button {border-color:var(--sui-error-border-color);}.radio-group.svelte-1mnz8e2 [aria-invalid=true] button[aria-checked=true] {border-color:var(--sui-error-border-color);}.radio-group.svelte-1mnz8e2 [aria-invalid=true] button[aria-checked=true]::before {background-color:var(--sui-error-border-color);}.inner.svelte-1mnz8e2 {display:contents;}`}}));function OR(e,t){let n=Ma();O(t,!0),G(e,MR);let r=q(t,`checked`,7,!1),i=q(t,`hidden`,3,!1),a=q(t,`disabled`,3,!1),o=q(t,`name`,3,void 0),s=q(t,`value`,3,void 0),c=q(t,`valueType`,3,void 0),l=q(t,`label`,3,void 0),u=q(t,`group`,15),d=Gs(t,kR),f=N(void 0);Qr(()=>{typeof u()==`string`&&(u()===s()?r()||r(!0):r()&&r(!1))});var p=jR(),m=e=>{e.target.matches(`button`)||z(f)?.click()};_s(p,()=>({...d,role:`none`,class:`sui radio ${t.class??``}`,hidden:i(),onclick:m,[bs]:{disabled:a()}}),void 0,void 0,void 0,`svelte-sdhw6s`);var h=F(p);wI(h,{role:`radio`,get id(){return n},get hidden(){return i()},get disabled(){return a()},get name(){return o()},get value(){return s()},get valueType(){return c()},get"aria-checked"(){return r()},get"aria-labelledby"(){return`${n}-label`},onclick:e=>{e.preventDefault(),!(a()||r())&&(r(!0),typeof u()==`string`&&u(s()))},get onChange(){return t.onChange},get onSelect(){return t.onSelect},get element(){return z(f)},set element(e){P(f,e,!0)}});var g=L(h,2),_=e=>{var r=AR(),i=F(r),a=e=>{var n=V();Co(I(n),()=>t.children??E),H(e,n)},o=e=>{var t=ja();R(()=>U(t,l())),H(e,t)};W(i,e=>{t.children?e(a):e(o,-1)}),D(r),R(()=>K(r,`id`,`${n}-label`)),H(e,r)};W(g,e=>{(t.children||l())&&e(_)}),D(p),H(e,p),k()}var kR,AR,jR,MR,dce=o((()=>{Z(),J(),EI(),kR=new Set([`$$slots`,`$$events`,`$$legacy`,`checked`,`class`,`hidden`,`disabled`,`name`,`value`,`valueType`,`label`,`group`,`children`,`onChange`,`onSelect`]),AR=B(`<label class="svelte-sdhw6s"><!></label>`),jR=B(`<span><!> <!></span>`),MR={hash:`svelte-sdhw6s`,code:`.radio.svelte-sdhw6s {display:inline-flex;align-items:center;gap:8px;margin:var(--sui-focus-ring-width);color:var(--sui-control-foreground-color);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);cursor:pointer;-webkit-user-select:none;user-select:none;}.radio.svelte-sdhw6s :hover button {background-color:var(--sui-hover-background-color);}.radio.svelte-sdhw6s :hover button[aria-checked=true] {border-color:var(--sui-primary-accent-color-light);color:var(--sui-primary-accent-color-text);}.radio.svelte-sdhw6s :hover button[aria-checked=true]::before {background-color:var(--sui-primary-accent-color-light);}.radio.svelte-sdhw6s :active button {background-color:var(--sui-active-background-color);}.radio.svelte-sdhw6s :active button[aria-checked=true] {border-color:var(--sui-primary-accent-color-dark);color:var(--sui-primary-accent-color-dark);}.radio.svelte-sdhw6s button {flex:none;justify-content:center;overflow:hidden;margin:0 !important;border-width:1.5px;border-color:var(--sui-checkbox-border-color);border-radius:var(--sui-checkbox-height);padding:0;width:var(--sui-checkbox-height);height:var(--sui-checkbox-height);background-color:var(--sui-checkbox-background-color);transition:all 200ms;}.radio.svelte-sdhw6s button::before {content:"";border-radius:var(--sui-checkbox-height);width:calc(var(--sui-checkbox-height) - 7px);height:calc(var(--sui-checkbox-height) - 7px);background-color:var(--sui-primary-accent-color);opacity:0;transition:all 200ms;will-change:opacity;}.radio.svelte-sdhw6s button[aria-checked=true] {border-color:var(--sui-primary-accent-color);}.radio.svelte-sdhw6s button[aria-checked=true]::before {opacity:1;}.radio.svelte-sdhw6s label:where(.svelte-sdhw6s) {cursor:inherit;}`}}));function NR(e,t){O(t,!0),G(e,LR);let n=q(t,`disabled`,3,!1),r=q(t,`showHandleBar`,3,!1),i=Gs(t,PR),a=Lt(`paneGroup`);if(!a)throw Error(`<ResizableHandle> must be used inside a <ResizablePaneGroup>`);let o=a.registerHandle(),s=M(()=>a.direction===`horizontal`),c=M(()=>a.sizes),l=M(()=>z(c)[o]??0),u=M(()=>a.getPaneConstraints(o)),d=M(()=>Math.max(z(u).minSize,100-a.paneDefs.reduce((e,t,n)=>e+(n===o?0:a.getPaneConstraints(n).maxSize),0))),f=M(()=>Math.min(z(u).maxSize,100-a.paneDefs.reduce((e,t,n)=>e+(n===o?0:a.getPaneConstraints(n).minSize),0))),p=N(void 0),m=N(!1),h=N(0),g=N(0),_=N(!1),v=()=>{let e=z(p)?.closest(`.resizable-pane-group`);return e?z(s)?e.clientWidth:e.clientHeight:0},y=e=>{let{screenX:t,screenY:r,pointerId:i}=e;if(n()||!z(m)||i!==z(g))return;e.preventDefault(),e.stopPropagation();let c=z(s)?t:r,l=c-z(h),u=v();if(!u)return;let d=l/u*100;z(s)&&Lh()&&(d=-d),P(h,c,!0),a.resize(o,d)},b=e=>{!z(m)||e.pointerId!==z(g)||(P(m,!1),P(h,0),P(g,0),document.removeEventListener(`pointermove`,y),document.removeEventListener(`pointerup`,b),document.removeEventListener(`pointercancel`,b),t.onResizeEnd?.())},x=e=>{n()||(e.preventDefault(),e.stopPropagation(),P(m,!0),P(h,z(s)?e.screenX:e.screenY,!0),P(g,e.pointerId,!0),t.onResizeStart?.(),document.addEventListener(`pointermove`,y),document.addEventListener(`pointerup`,b),document.addEventListener(`pointercancel`,b))},S=e=>{if(n())return;let{key:r,shiftKey:i}=e,c=i?10:1,l=0;if(r===`Enter`){e.preventDefault(),e.stopPropagation(),a.toggleCollapse(o);return}if(r===`Home`){e.preventDefault(),e.stopPropagation(),a.resize(o,-100);return}if(r===`End`){e.preventDefault(),e.stopPropagation(),a.resize(o,100);return}if(z(s)){let e=Lh();if(r===`ArrowLeft`)l=e?c:-c;else if(r===`ArrowRight`)l=e?-c:c;else return}else if(r===`ArrowUp`)l=-c;else if(r===`ArrowDown`)l=c;else return;e.preventDefault(),e.stopPropagation(),z(_)||(P(_,!0),t.onResizeStart?.()),a.resize(o,l)},C=()=>{z(_)&&(P(_,!1),t.onResizeEnd?.())};var w=IR();_s(w,e=>({...i,role:`separator`,tabindex:n()?-1:0,"aria-orientation":z(s)?`vertical`:`horizontal`,"aria-valuenow":e,"aria-valuemin":z(d),"aria-valuemax":z(f),"aria-controls":a.paneDefs[o]?.id,"aria-disabled":n()||void 0,class:`sui resizable-handle ${t.class??``??``}`,onpointerdown:x,onkeydown:S,onblur:C,[bs]:{horizontal:z(s),vertical:!z(s),disabled:n(),dragging:z(m)}}),[()=>Math.round(z(l))],void 0,void 0,`svelte-15abc5a`);var T=F(w),ee=e=>{var n=V();Co(I(n),()=>t.children),H(e,n)},te=e=>{H(e,FR())};W(T,e=>{t.children?e(ee):r()&&e(te,1)}),D(w),Rs(w,e=>P(p,e),()=>z(p)),H(e,w),k()}var PR,FR,IR,LR,fce=o((()=>{Z(),J(),X(),rc(),PR=new Set([`$$slots`,`$$events`,`$$legacy`,`disabled`,`showHandleBar`,`class`,`children`,`onResizeStart`,`onResizeEnd`]),FR=B(`<div role="none" class="handle-bar svelte-15abc5a"></div>`),IR=B(`<div><!></div>`),LR={hash:`svelte-15abc5a`,code:`.resizable-handle.svelte-15abc5a {position:relative;flex:0 0 auto;display:flex;align-items:center;justify-content:center;touch-action:none;outline-offset:0;background-color:transparent;transition:background-color 200ms;}.resizable-handle.svelte-15abc5a:focus-visible, .resizable-handle.svelte-15abc5a:hover, .resizable-handle.dragging.svelte-15abc5a {outline:none;z-index:1;background-color:var(--sui-primary-accent-color-translucent);}.resizable-handle.svelte-15abc5a:focus-visible .handle-bar:where(.svelte-15abc5a), .resizable-handle.svelte-15abc5a:hover .handle-bar:where(.svelte-15abc5a), .resizable-handle.dragging.svelte-15abc5a .handle-bar:where(.svelte-15abc5a) {background-color:var(--sui-primary-accent-color);}.resizable-handle.disabled.svelte-15abc5a {pointer-events:none;opacity:0.4;}.resizable-handle.horizontal.svelte-15abc5a {width:var(--sui-resizable-handle-size, 4px);height:100%;cursor:col-resize;}.resizable-handle.horizontal.svelte-15abc5a .handle-bar:where(.svelte-15abc5a) {width:2px;height:40%;min-height:20px;}.resizable-handle.vertical.svelte-15abc5a {width:100%;height:var(--sui-resizable-handle-size, 4px);cursor:row-resize;}.resizable-handle.vertical.svelte-15abc5a .handle-bar:where(.svelte-15abc5a) {height:2px;width:40%;min-width:20px;}.resizable-handle.svelte-15abc5a .handle-bar:where(.svelte-15abc5a) {border-radius:1px;background-color:hsl(var(--sui-border-color-1-hsl));transition:background-color 200ms;}`}}));function RR(e,t){O(t,!0),G(e,VR);let n=q(t,`direction`,3,`horizontal`),r=Gs(t,zR),i=br([]),a=N(void 0),o=br([]),s=br([]),c=0,l=()=>z(a)?n()===`horizontal`?z(a).clientWidth:z(a).clientHeight:0,u=(e,t)=>{if(typeof e==`number`)return e;if(!e||typeof e!=`string`)return t;let n=e.trim(),r=n.match(/^(-?\d+(?:\.\d+)?)%$/);if(r)return Number(r[1]);let i=l();if(!i)return t;let a=n.match(/^(-?\d+(?:\.\d+)?)px$/i);if(a)return Number(a[1])/i*100;let o=n.match(/^(-?\d+(?:\.\d+)?)(dvw|vw|dvh|vh)$/i);if(o){let e=Number(o[1]),t=o[2].toLowerCase().endsWith(`w`)?window.innerWidth:window.innerHeight;return e/100*t/i*100}return t},d=e=>{let t=i[e];if(!t)return{minSize:0,maxSize:100};let n=Math.max(0,u(t.minSize,0)),r=Math.min(100,u(t.maxSize,100));return{minSize:n,maxSize:Math.max(n,r)}},f=()=>{if(!i.length)return;let e=i.map(e=>e.defaultSize===void 0?NaN:u(e.defaultSize,NaN)),t=e.filter(e=>!Number.isNaN(e)).reduce((e,t)=>e+t,0),n=e.filter(e=>Number.isNaN(e)).length,r=Math.max(0,100-t),a=n>0?r/n:0,s=e.map(e=>Number.isNaN(e)?a:e);o.splice(0,o.length,...s)},p=(e,n)=>{let r=e,i=e+1;if(r<0||i>=o.length)return;let{minSize:a,maxSize:s}=d(r),{minSize:c,maxSize:l}=d(i),u=o[r],f=o[i],p=Math.min(s-u,f-c),m=Math.min(u-a,l-f),h=n>0?Math.min(n,p):-Math.min(-n,m);o[r]=u+h,o[i]=f-h,t.onResize?.({sizes:o.map(e=>Number(e.toFixed(1)))})};Rt(`paneGroup`,{get direction(){return n()},sizes:o,registerPane:({id:e,defaultSize:t,minSize:n,maxSize:r})=>{let a=i.length;return i.push({id:e,defaultSize:t,minSize:n,maxSize:r}),{index:a}},registerHandle:()=>{let e=c;return c+=1,e},resize:p,toggleCollapse:e=>{let{minSize:t}=d(e);if(s[e]!==void 0){let t=s[e]-o[e];s[e]=void 0,p(e,t)}else s[e]=o[e],p(e,-(o[e]-t))},getPaneConstraints:d,paneDefs:i}),Qr(()=>{i.length&&!o.length&&f()});var m=BR();_s(m,()=>({...r,role:`none`,class:`sui resizable-pane-group ${n()??``} ${t.class??``??``}`,"data-direction":n()}),void 0,void 0,void 0,`svelte-1x5y57g`),Co(F(m),()=>t.children??E),D(m),Rs(m,e=>P(a,e),()=>z(a)),H(e,m),k()}var zR,BR,VR,pce=o((()=>{Z(),J(),rc(),zR=new Set([`$$slots`,`$$events`,`$$legacy`,`direction`,`class`,`children`,`onResize`]),BR=B(`<div><!></div>`),VR={hash:`svelte-1x5y57g`,code:`.resizable-pane-group.svelte-1x5y57g {display:flex;overflow:hidden;}.resizable-pane-group.horizontal.svelte-1x5y57g {flex-direction:row;width:100%;height:100%;}.resizable-pane-group.vertical.svelte-1x5y57g {flex-direction:column;width:100%;height:100%;}`}}));function HR(e,t){let n=Ma();O(t,!0);let r=q(t,`defaultSize`,3,void 0),i=q(t,`minSize`,3,0),a=q(t,`maxSize`,3,100),o=Gs(t,UR),s=Lt(`paneGroup`);if(!s)throw Error(`<ResizablePane> must be used inside a <ResizablePaneGroup>`);let{index:c}=s.registerPane({id:n,defaultSize:r(),minSize:i(),maxSize:a()}),l=M(()=>s.direction),u=M(()=>s.sizes[c]),d=M(()=>z(u)===void 0?typeof r()==`number`?`${r()}%`:r()??`0%`:`${z(u)}%`);Qr(()=>{z(u)!==void 0&&zi(()=>t.onResize?.({size:Number(z(u).toFixed(1))}))});var f=WR();_s(f,()=>({...o,id:n,role:`none`,class:`sui resizable-pane ${t.class??``??``}`,[xs]:{"flex-basis":z(d),"flex-grow":`0`,"flex-shrink":`0`,"overflow-x":z(l)===`horizontal`?`auto`:void 0,"overflow-y":z(l)===`vertical`?`auto`:void 0}})),Co(F(f),()=>t.children??E),D(f),H(e,f),k()}var UR,WR,mce=o((()=>{Z(),J(),rc(),UR=new Set([`$$slots`,`$$events`,`$$legacy`,`defaultSize`,`minSize`,`maxSize`,`class`,`children`,`onResize`]),WR=B(`<div><!></div>`)}));function GR(e,t){O(t,!0),G(e,JR);let n=q(t,`itemChunkSize`,3,25),r=N(br(n())),i=N(void 0),a=M(()=>t.items.length>z(r)),o=new IntersectionObserver(([{isIntersecting:e}])=>{e&&(z(a)?P(r,z(r)+n()):o.disconnect())});Qr(()=>{z(i)&&o.observe(z(i))});var s=qR(),c=I(s);uo(c,19,()=>t.items.slice(0,z(r)),(e,n)=>e[t.itemKey]??n,(e,n,r)=>{var i=V();Co(I(i),()=>t.renderItem,()=>z(n),()=>z(r)),H(e,i)});var l=L(c,2),u=e=>{var t=KR();Rs(t,e=>P(i,e),()=>z(i)),H(e,t)};W(l,e=>{z(a)&&e(u)}),H(e,s),k()}var KR,qR,JR,hce=o((()=>{Z(),J(),KR=B(`<div role="none" class="spinner svelte-zu7q33"></div>`),qR=B(`<!> <!>`,1),JR={hash:`svelte-zu7q33`,code:`.spinner.svelte-zu7q33 {height:1px;}`}}));function YR(e,t){let n=Ma();O(t,!0),G(e,QR);let r=q(t,`value`,15),i=q(t,`flex`,3,!1),a=q(t,`hidden`,3,!1),o=q(t,`disabled`,3,!1),s=q(t,`readonly`,3,!1),c=q(t,`required`,3,!1),l=q(t,`invalid`,3,!1),u=Gs(t,XR),d=N(void 0);var f={focus:()=>{z(d)?.focus()}},p=ZR();let m;var h=F(p),g=F(h),_=e=>{var n=V();Co(I(n),()=>t.searchIcon),H(e,n)},v=e=>{oI(e,{name:`search`})};W(g,e=>{t.searchIcon?e(_):e(v,-1)}),D(h);var y=L(h,2);hL(y,Ks({dir:`auto`},()=>u,{role:`searchbox`,get id(){return n},get flex(){return i()},get hidden(){return a()},get disabled(){return o()},get readonly(){return s()},get required(){return c()},get invalid(){return l()},inputmode:`search`,get element(){return z(d)},set element(e){P(d,e,!0)},get value(){return r()},set value(e){r(e)}}));var b=L(y,2),x=e=>{{let i=e=>{var n=V(),r=I(n),i=e=>{var n=V();Co(I(n),()=>t.closeIcon),H(e,n)},a=e=>{oI(e,{name:`close`})};W(r,e=>{t.closeIcon?e(i):e(a,-1)}),H(e,n)},a=M(()=>Y(`_sui.clear`));wI(e,{iconic:!0,get"aria-label"(){return z(a)},get"aria-controls"(){return n},onclick:()=>{r(``),z(d)?.focus(),t.onClear?.()},startIcon:i,$$slots:{startIcon:!0}})}};return W(b,e=>{r()&&e(x)}),D(p),R(()=>{K(p,`role`,a()?void 0:`none`),m=as(p,1,`sui search-bar ${t.class??``}`,`svelte-1crkj0c`,m,{flex:i(),disabled:o(),readonly:s()}),K(p,`hidden`,a()),K(p,`aria-hidden`,a())}),H(e,p),k(f)}var XR,ZR,QR,$R=o((()=>{Z(),J(),X(),EI(),sI(),bL(),XR=new Set([`$$slots`,`$$events`,`$$legacy`,`value`,`flex`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`children`,`searchIcon`,`closeIcon`,`onClear`]),ZR=B(`<div><span role="none" class="svelte-1crkj0c"><!></span> <!> <!></div>`),QR={hash:`svelte-1crkj0c`,code:`.search-bar.svelte-1crkj0c {display:inline-flex;align-items:center;position:relative;margin:var(--sui-focus-ring-width);min-width:var(--sui-textbox-singleline-min-width);}.search-bar.flex.svelte-1crkj0c:not([hidden]) {display:inline-flex;width:-moz-available;width:-webkit-fill-available;width:stretch;min-width:0;}.search-bar.svelte-1crkj0c > span:where(.svelte-1crkj0c) {position:absolute;inset-block:0;inset-inline-start:0;inset-inline-end:auto;z-index:2;display:flex;align-items:center;justify-content:center;width:var(--sui-button-medium-height);height:var(--sui-button-medium-height);}.search-bar.svelte-1crkj0c .icon {font-size:calc(var(--sui-textbox-height) * 0.6);opacity:0.5;}.search-bar.svelte-1crkj0c > button {position:absolute;inset-block:0;inset-inline-start:auto;inset-inline-end:0;z-index:2;margin:0 !important;height:var(--sui-button-medium-height);}.search-bar.svelte-1crkj0c .label {--sui-textbox-singleline-padding: 0 36px;}.search-bar.svelte-1crkj0c .text-input {flex:auto;margin:0 !important;width:0;min-width:0 !important;}.search-bar.svelte-1crkj0c input {z-index:1;padding:0 var(--sui-button-medium-height) !important;width:100%;}`}}));function gce(e,t){let n=Ma();O(t,!0),G(e,az);let r=`[role="option"][aria-selected="true"]`,i=q(t,`value`,15),a=q(t,`hidden`,3,!1),o=q(t,`disabled`,3,!1),s=q(t,`readonly`,3,!1),c=q(t,`required`,3,!1),l=q(t,`invalid`,3,!1),u=q(t,`editable`,3,!0),d=q(t,`position`,3,`bottom-left`),f=q(t,`filterThreshold`,3,5),p=Gs(t,ez),m=N(!1),h=N(void 0),g=N(void 0),_=N(void 0),v=N(``),y=N(!1),b=N(``),x=N(!0),S=M(()=>z(h)??z(g)),C=()=>{let e=z(_)?.querySelector(`[role="option"][data-value="${i()}"]`);e&&(P(v,e.dataset.label||e.dataset.value||e.textContent||``,!0),e.getAttribute(`aria-selected`)!==`true`&&(z(_)?.querySelector(r)?.setAttribute(`aria-selected`,`false`),e.setAttribute(`aria-selected`,`true`)))},w=e=>{let n=OI(e);i(n.value),C(),t.onChange?.(new CustomEvent(`Change`,{detail:n}))};Qr(()=>{z(_)&&globalThis.requestAnimationFrame(()=>{let e=z(_)?.querySelector(r);e&&w(e)})}),Qr(()=>{i(),C()});var T=iz(),ee=I(T);_s(ee,()=>({...p,role:`none`,class:`sui combobox ${t.class??``}`,hidden:a(),[bs]:{editable:u()}}),void 0,void 0,void 0,`svelte-1yqy30h`);var te=F(ee),ne=e=>{var t=tz();_s(t,()=>({...p,role:`combobox`,id:n,tabindex:o()?-1:0,"aria-controls":`${n}-popup`,"aria-expanded":z(m),"aria-hidden":a(),"aria-disabled":o(),"aria-readonly":s(),"aria-required":c(),"aria-invalid":l(),"aria-haspopup":`listbox`,[bs]:{selected:i()!==void 0}}),void 0,void 0,void 0,`svelte-1yqy30h`);var r=F(t);mI(F(r),{children:(e,t)=>{gt();var n=ja();R(e=>U(n,e),[()=>i()===void 0?Y(`_sui.combobox.select_an_option`):z(v)]),H(e,n)},$$slots:{default:!0}}),D(r),D(t),Rs(t,e=>P(h,e),()=>z(h)),H(e,t)},re=e=>{{let t=M(()=>i()===void 0?``:String(i()));hL(e,Ks(()=>p,{dir:`auto`,role:`combobox`,get id(){return n},get value(){return z(t)},get hidden(){return a()},get disabled(){return o()},get readonly(){return s()},get required(){return c()},get invalid(){return l()},get"aria-controls"(){return`${n}-popup`},get"aria-expanded"(){return z(m)},"aria-haspopup":`listbox`,get element(){return z(g)},set element(e){P(g,e,!0)}}))}};W(te,e=>{u()?e(re,-1):e(ne)});var ie=L(te,2);{let e=e=>{var n=V(),r=I(n),i=e=>{var n=V();Co(I(n),()=>t.chevronIcon),H(e,n)},a=e=>{oI(e,{name:`expand_more`})};W(r,e=>{t.chevronIcon?e(i):e(a,-1)}),H(e,n)},r=M(()=>!u()||s()||o()?-1:0),i=M(()=>z(m)?Y(`_sui.collapse`):Y(`_sui.expand`));wI(ie,{variant:`ghost`,iconic:!0,get hidden(){return a()},get disabled(){return o()},get tabindex(){return z(r)},get"aria-label"(){return z(i)},get"aria-controls"(){return`${n}-popup`},get"aria-expanded"(){return z(m)},onclick:e=>{e.preventDefault(),e.stopPropagation(),!o()&&!s()&&P(m,!z(m))},startIcon:e,$$slots:{startIcon:!0}})}D(ee),SI(L(ee,2),{get id(){return`${n}-popup`},class:`combobox`,get anchor(){return z(S)},get position(){return d()},touchOptimized:!0,onOpen:()=>{P(y,f()===-1?!1:(z(_)?.querySelectorAll(`[role="option"]`)?.length??0)>f(),!0),P(b,``)},get content(){return z(_)},set content(e){P(_,e,!0)},get open(){return z(m)},set open(e){P(m,e,!0)},children:(e,r)=>{var i=rz(),a=F(i),o=e=>{{let t=M(()=>Y(`_sui.combobox.filter_options`));YR(e,{flex:!0,get"aria-label"(){return z(t)},get"aria-controls"(){return`${n}-listbox`},onkeydown:e=>{[`ArrowUp`,`ArrowDown`,`Enter`].includes(e.key)&&(e.preventDefault(),z(_)?.querySelector(`.sui.listbox`)?.dispatchEvent(new KeyboardEvent(`keydown`,e)))},get value(){return z(b)},set value(e){P(b,e,!0)}})}};W(a,e=>{z(y)&&e(o)});var s=L(a,2);UL(s,{get id(){return`${n}-listbox`},class:`in-combobox`,get searchTerms(){return z(b)},onclick:e=>{e.target.matches(`[role="option"]`)&&w(e.target)},onFilter:e=>{P(x,!!e.detail.matched)},children:(e,n)=>{var r=V();Co(I(r),()=>t.children??E),H(e,r)},$$slots:{default:!0}});var c=L(s,2),l=e=>{var t=nz(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>Y(`_sui.combobox.no_matching_options`)]),H(e,t)};W(c,e=>{z(x)||e(l)}),D(i),H(e,i)},$$slots:{default:!0}}),H(e,T),k()}var ez,tz,nz,rz,iz,az,oz=o((()=>{Z(),J(),X(),Nse(),EI(),sI(),qL(),$R(),bL(),hI(),CI(),ez=new Set([`$$slots`,`$$events`,`$$legacy`,`value`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`editable`,`position`,`filterThreshold`,`children`,`chevronIcon`,`onChange`]),tz=B(`<div><div role="none" class="label svelte-1yqy30h"><!></div></div>`),nz=B(`<div role="alert" class="no-options svelte-1yqy30h"> </div>`),rz=B(`<div role="none" class="combobox-inner svelte-1yqy30h"><!> <!> <!></div>`),iz=B(`<div><!> <!></div> <!>`,1),az={hash:`svelte-1yqy30h`,code:`.combobox.svelte-1yqy30h {margin:var(--sui-focus-ring-width);display:flex;align-items:center;position:relative;min-width:var(--sui-combobox-min-width, calc(var(--sui-option-height) * 5));}.combobox.svelte-1yqy30h div[role=combobox]:where(.svelte-1yqy30h) {display:flex;align-items:center;border-width:1px;border-color:var(--sui-control-border-color);border-radius:var(--sui-textbox-border-radius);padding-block:0;padding-inline-start:calc(var(--sui-textbox-height) / 4);padding-inline-end:var(--sui-textbox-height);width:100%;height:var(--sui-textbox-height);color:var(--sui-control-foreground-color);background-color:var(--sui-disabled-background-color);font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);-webkit-user-select:none;user-select:none;cursor:pointer;transition:all 200ms;}.combobox.svelte-1yqy30h div[role=combobox]:where(.svelte-1yqy30h):not(.selected) {font-style:italic;}.combobox.svelte-1yqy30h div[role=combobox]:where(.svelte-1yqy30h):is(:where(.svelte-1yqy30h):hover, :where(.svelte-1yqy30h):focus) {background-color:var(--sui-hover-background-color);}.combobox.svelte-1yqy30h div[role=combobox][aria-invalid=true]:where(.svelte-1yqy30h) {border-color:var(--sui-error-border-color);}.combobox.svelte-1yqy30h div[role=combobox]:where(.svelte-1yqy30h) .label:where(.svelte-1yqy30h) {width:100%;}.combobox.svelte-1yqy30h .icon {font-size:var(--sui-font-size-xx-large);opacity:0.5;}.combobox.svelte-1yqy30h > .icon {position:absolute;inset-block-start:8px;inset-inline-start:8px;z-index:1;}.combobox.svelte-1yqy30h > button {position:absolute;inset-block-start:0;inset-inline-end:0;z-index:1;margin:0 !important;border-start-start-radius:0;border-end-start-radius:0;background-color:transparent !important;}.combobox.svelte-1yqy30h > button[tabindex="-1"] {pointer-events:none;}.combobox.svelte-1yqy30h :not(.editable) > button {background-color:transparent !important;}.combobox.svelte-1yqy30h .text-input {margin:0 !important;width:100% !important;}.combobox.svelte-1yqy30h input {padding-block:0;padding-inline:8px 32px;width:0;}.combobox.svelte-1yqy30h + [role=listbox] {position:fixed;z-index:100;border-radius:var(--sui-control-medium-border-radius);box-shadow:0 8px 16px var(--sui-popup-shadow-color);overflow:auto;background-color:var(--sui-secondary-background-color);-webkit-backdrop-filter:blur(32px);backdrop-filter:blur(32px);
667
+ /* Add .1s delay before the position can be determined */transition:opacity 100ms 100ms;}.combobox.svelte-1yqy30h + [role=listbox]:not(.open) {opacity:0;pointer-events:none;}.combobox-inner.svelte-1yqy30h {display:flex;flex-direction:column;overflow:hidden;}.combobox-inner.svelte-1yqy30h .sui.search-bar {flex:none;}.combobox-inner.svelte-1yqy30h .sui.listbox {flex:auto;overflow-y:auto;}.combobox-inner.svelte-1yqy30h .no-options:where(.svelte-1yqy30h) {flex:none;display:flex;align-items:center;padding:var(--sui-option-padding);height:var(--sui-option-height);color:var(--sui-tertiary-foreground-color);}`}}));function _ce(e){let t=e-1;return t*t*t+1}var vce=o((()=>{}));function yce(e,{from:t,to:n},r={}){var{delay:i=0,duration:a=e=>Math.sqrt(e)*120,easing:o=_ce}=r,s=getComputedStyle(e),c=s.transform===`none`?``:s.transform,[l,u]=s.transformOrigin.split(` `).map(parseFloat);l/=e.clientWidth,u/=e.clientHeight;var d=bce(e),f=e.clientWidth/n.width/d,p=e.clientHeight/n.height/d,m=t.left+t.width*l,h=t.top+t.height*u,g=n.left+n.width*l,_=n.top+n.height*u,v=(m-g)*f,y=(h-_)*p,b=t.width/n.width,x=t.height/n.height;return{delay:i,duration:typeof a==`function`?a(Math.sqrt(v*v+y*y)):a,easing:o,css:(e,t)=>`transform: ${c} translate(${t*v}px, ${t*y}px) scale(${e+t*b}, ${e+t*x});`}}function bce(e){if(`currentCSSZoom`in e)return e.currentCSSZoom;for(var t=e,n=1;t!==null;)n*=+getComputedStyle(t).zoom,t=t.parentElement;return n}var xce=o((()=>{vce()}));function sz(e,t){O(t,!0);let n=q(t,`value`,15),r=q(t,`hidden`,3,!1),i=q(t,`disabled`,3,!1),a=q(t,`readonly`,3,!1),o=q(t,`required`,3,!1),s=q(t,`invalid`,3,!1),c=Gs(t,cz);gce(e,Ks(()=>c,{get class(){return`sui select ${t.class??``}`},get hidden(){return r()},get disabled(){return i()},get readonly(){return a()},get required(){return o()},get invalid(){return s()},get onChange(){return t.onChange},editable:!1,get value(){return n()},set value(e){n(e)},children:(e,n)=>{var r=V();Co(I(r),()=>t.children??E),H(e,r)},$$slots:{default:!0}})),k()}var cz,lz=o((()=>{Z(),J(),oz(),cz=new Set([`$$slots`,`$$events`,`$$legacy`,`value`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`children`,`onChange`])}));function Sce(e,t){O(t,!0),G(e,pz);let n=q(t,`values`,31,()=>br([])),r=q(t,`max`,3,void 0),i=q(t,`hidden`,3,!1),a=q(t,`disabled`,3,!1),o=q(t,`readonly`,3,!1),s=q(t,`required`,3,!1),c=q(t,`invalid`,3,!1),l=Gs(t,uz),u=M(()=>new Map(t.options.map(e=>[e.value,e]))),d=M(()=>Lh()?`ArrowRight`:`ArrowLeft`),f=M(()=>Lh()?`ArrowLeft`:`ArrowRight`),p=N(void 0),m=N(void 0),h=N(void 0),g=N(void 0),_=(e,r)=>{if(e===r)return;let i=[...n()],[a]=i.splice(e,1);i.splice(r,0,a),n(i),t.onReorder?.(new CustomEvent(`Reorder`,{detail:{values:i}}))},v=async(e,t)=>{_(e,t),await Ii(),(z(p)?.querySelectorAll(`.label[tabindex]`)?.[t])?.focus()};var y=fz();let b;var x=F(y);uo(x,30,n,e=>e,(e,r,i)=>{let s=M(()=>z(u).get(r)),c=M(()=>z(s)?.label||z(s)?.value||r);var l=dz();let p;var m=F(l),_=F(m,!0);D(m);var y=L(m,2),b=e=>{{let i=e=>{oI(e,{name:`close`})},s=M(()=>a()||o()),l=M(()=>Y(`_sui.select_tags.remove_x`,{values:{name:z(c)}}));wI(e,{iconic:!0,size:`small`,get disabled(){return z(s)},get"aria-label"(){return z(l)},onclick:()=>{n(n().filter(e=>e!==r)),t.onRemoveValue?.(new CustomEvent(`RemoveValue`,{detail:{value:r}}))},startIcon:i,$$slots:{startIcon:!0}})}};W(y,e=>{z(s)&&e(b)}),D(l),R(()=>{K(l,`draggable`,!a()&&!o()),p=as(l,1,`svelte-1x7jdtc`,null,p,{"drag-source":z(h)===z(i),"drop-before":z(g)===z(i)&&z(h)!==z(i)&&z(h)!==z(i)-1,"drop-after":z(g)===n().length&&z(i)===n().length-1&&z(h)!==n().length-1}),K(m,`tabindex`,a()||o()?void 0:0),U(_,z(c))}),_a(`dragstart`,l,e=>{P(h,z(i),!0),e.dataTransfer&&(e.dataTransfer.setData(`text/plain`,z(c)),e.dataTransfer.effectAllowed=`move`)}),_a(`dragover`,l,e=>{e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`move`);let t=e.currentTarget.getBoundingClientRect(),n=e.clientX<t.left+t.width/2;P(g,n===Lh()?z(i)+1:z(i),!0)}),_a(`drop`,l,async e=>{e.preventDefault();let t=z(h),n=z(g);P(h,void 0),P(g,void 0),t!==void 0&&n!==void 0&&n!==t&&n!==t+1&&await v(t,n>t?n-1:n)}),_a(`dragend`,l,()=>{P(h,void 0),P(g,void 0)}),va(`keydown`,m,async e=>{let{key:t}=e,r=t===z(d)&&z(i)>0?z(i)-1:t===z(f)&&z(i)<n().length-1?z(i)+1:t===`Home`&&z(i)>0?0:t===`End`&&z(i)<n().length-1?n().length-1:-1;r!==-1&&(e.preventDefault(),await v(z(i),r))}),Io(l,()=>yce,()=>({duration:200})),H(e,l)}),D(x);var S=L(x,2),C=e=>{{let r=M(()=>a()||o());sz(e,Ks(()=>l,{get disabled(){return z(r)},get readonly(){return o()},get required(){return s()},get invalid(){return c()},onChange:()=>{z(m)&&(n([...n(),z(m)]),t.onAddValue?.(new CustomEvent(`AddValue`,{detail:{value:z(m)}})),P(m,void 0))},get value(){return z(m)},set value(e){P(m,e,!0)},children:(e,r)=>{var i=V();uo(I(i),17,()=>t.options,({label:e,value:t,searchValue:n})=>t,(e,t)=>{let r=()=>z(t).label,i=()=>z(t).value,a=()=>z(t).searchValue;var o=V(),s=I(o),c=e=>{QL(e,{get label(){return r()},get value(){return i()},get searchValue(){return a()}})},l=M(()=>!n().includes(i()));W(s,e=>{z(l)&&e(c)}),H(e,o)}),H(e,i)},$$slots:{default:!0}}))}};W(S,e=>{(typeof r()!=`number`||n().length<r())&&n().length<t.options.length&&e(C)}),D(y),Rs(y,e=>P(p,e),()=>z(p)),R(e=>{b=as(y,1,`sui select-tags ${t.class??``}`,`svelte-1x7jdtc`,b,{disabled:a()||o()}),K(y,`hidden`,i()),K(x,`aria-label`,e)},[()=>Y(`_sui.select_tags.selected_options`)]),H(e,y),k()}var uz,dz,fz,pz,Cce=o((()=>{Z(),J(),X(),rc(),xce(),EI(),sI(),rR(),lz(),uz=new Set([`$$slots`,`$$events`,`$$legacy`,`values`,`options`,`max`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`children`,`onAddValue`,`onRemoveValue`,`onReorder`]),dz=B(`<span role="none"><span class="label svelte-1x7jdtc" role="option" aria-selected="true"> </span> <!></span>`),fz=B(`<div role="none"><span role="listbox" aria-multiselectable="true" class="svelte-1x7jdtc"></span> <!></div>`),pz={hash:`svelte-1x7jdtc`,code:`.select-tags.svelte-1x7jdtc {display:flex;flex-wrap:wrap;align-items:center;}.select-tags.disabled.svelte-1x7jdtc {pointer-events:none;}.select-tags.disabled.svelte-1x7jdtc > :where(.svelte-1x7jdtc) {opacity:0.5;}.select-tags.svelte-1x7jdtc span[role=listbox]:where(.svelte-1x7jdtc) {display:contents;}.select-tags.svelte-1x7jdtc span[draggable]:where(.svelte-1x7jdtc) {display:inline-flex;align-items:center;position:relative;margin:var(--sui-focus-ring-width);padding:0;padding-inline-start:8px;border-radius:var(--sui-control-medium-border-radius);background-color:var(--sui-secondary-background-color);cursor:grab;outline:none;}.select-tags.svelte-1x7jdtc span[draggable]:where(.svelte-1x7jdtc):focus-within {outline:var(--sui-focus-ring-width) solid var(--sui-primary-accent-color-translucent);outline-offset:1px;}.select-tags.svelte-1x7jdtc span[draggable].drag-source:where(.svelte-1x7jdtc) {opacity:0.4;cursor:grabbing;}.select-tags.svelte-1x7jdtc span[draggable].drop-before:where(.svelte-1x7jdtc)::before, .select-tags.svelte-1x7jdtc span[draggable].drop-after:where(.svelte-1x7jdtc)::after {content:"";position:absolute;top:0;bottom:0;margin-left:-1px;border-radius:1px;width:4px;background-color:var(--sui-primary-accent-color);pointer-events:none;}.select-tags.svelte-1x7jdtc span[draggable].drop-before:where(.svelte-1x7jdtc)::before {inset-inline-start:calc(-1 * var(--sui-focus-ring-width) - 1px);}.select-tags.svelte-1x7jdtc span[draggable].drop-after:where(.svelte-1x7jdtc)::after {inset-inline-end:calc(-1 * var(--sui-focus-ring-width) - 1px);}.select-tags.svelte-1x7jdtc span[draggable]:where(.svelte-1x7jdtc) .label:where(.svelte-1x7jdtc) {outline:none;}.select-tags.svelte-1x7jdtc span[draggable]:where(.svelte-1x7jdtc) .icon {font-size:var(--sui-font-size-large);}`},ya([`keydown`])}));function wce(e,t){O(t,!0),G(e,vz);let n=q(t,`value`,15,0),r=q(t,`min`,3,0),i=q(t,`max`,3,100),a=q(t,`sliderLabel`,3,``),o=q(t,`values`,15,void 0),s=q(t,`sliderLabels`,3,void 0),c=q(t,`step`,3,1),l=q(t,`optionLabels`,19,()=>[]),u=q(t,`hidden`,3,!1),d=q(t,`disabled`,3,!1),f=q(t,`readonly`,3,!1),p=q(t,`invalid`,3,!1),m=Gs(t,mz),h=M(()=>Array.isArray(o())),g=N(void 0),_=N(0),v=N(br([])),y=N(br([])),b=N(0),x=N(0),S=br([0,0]),C=N(!1),w=N(0),T=N(0),ee=e=>{let t=Lh()?z(_)-e:e;if(t<0||t>z(_))return;let r=z(v).findLastIndex(e=>e<=t),i=z(v).findIndex(e=>t<=e),a=Math.abs(z(v)[r]-t)<Math.abs(z(v)[i]-t)?r:i;S[z(T)]===z(v)[a]||z(h)&&(z(T)===0&&S[1]<=z(v)[a]||z(T)===1&&S[0]>=z(v)[a])||(z(h)?(o(o()[z(T)]=z(y)[a],!0),o([...o()])):n(z(y)[a]))},te=(e,t=0)=>{let{key:a,ctrlKey:s,metaKey:c,shiftKey:l,altKey:u}=e,p=l||u||s||c;if(d()||f()||p)return;let m=z(h)?o()[t]:n(),g=-1,_=Lh(),b=_?[`ArrowDown`,`ArrowRight`]:[`ArrowDown`,`ArrowLeft`],x=_?[`ArrowUp`,`ArrowLeft`]:[`ArrowUp`,`ArrowRight`];if(b.includes(a)&&(m>r()&&(g=z(y).indexOf(m)-1),e.preventDefault(),e.stopPropagation()),x.includes(a)&&(m<i()&&(g=z(y).indexOf(m)+1),e.preventDefault(),e.stopPropagation()),g>-1){if(z(h)&&(t===0&&S[1]<=z(v)[g]||t===1&&S[0]>=z(v)[g]))return;z(h)?(o(o()[t]=z(y)[g],!0),o([...o()])):n(z(y)[g])}},ne=e=>{let{screenX:t,pointerId:n}=e;if(d()||f()||!z(C)||n!==z(w))return;e.stopPropagation();let r=t-z(x),i=z(b)+r;ee(i)},re=e=>{let{pointerId:t}=e;if(!(d()||f()||!z(C)||t!==z(w))){if(e.stopPropagation(),e.target.matches(`.base-bar, .slider-bar`)){let t=z(g).getBoundingClientRect(),n=e.clientX-t.left;ee(n)}P(C,!1),P(b,0),P(x,0),P(w,0),P(T,0),document.removeEventListener(`pointermove`,ne),document.removeEventListener(`pointerup`,re),document.removeEventListener(`pointercancel`,re)}},ie=(e,t=0)=>{let{clientX:n,screenX:r,pointerId:i}=e;if(d()||f())return;e.stopPropagation(),P(C,!0);let a=z(g).getBoundingClientRect();P(b,n-a.left),P(x,r,!0),P(w,i,!0),P(T,t,!0),document.addEventListener(`pointermove`,ne),document.addEventListener(`pointerup`,re),document.addEventListener(`pointercancel`,re)},ae=()=>{if(z(h)){let[e,n]=o();S[0]=z(v)[z(y).indexOf(e)],S[1]=z(v)[z(y).indexOf(n)],t.onChange?.({values:o()})}else S[0]=z(v)[z(y).indexOf(n())],t.onChange?.({value:n()})},oe=()=>{if(!z(g))return;P(_,z(g).clientWidth,!0);let e=(i()-r())/c()+1,t=z(_)/(e-1),n=Array.from({length:e});P(y,n.map((e,t)=>t*c()+r(),10),!0),P(v,n.map((e,n)=>n*t),!0),ae()};tc(()=>{let e=new ResizeObserver(()=>oe()),t=globalThis.matchMedia(`(pointer: coarse)`);return e.observe(z(g)),t.addEventListener(`change`,oe),oe(),()=>{e.disconnect(),t.removeEventListener(`change`,oe)}}),Qr(()=>{n(),o(),ae()});var se=_z();_a(`click`,Pr.body,()=>{P(C,!1)}),_s(se,()=>({...m,role:`none`,class:`sui slider ${t.class??``}`,hidden:u(),[bs]:{disabled:d(),readonly:f(),invalid:p()}}),void 0,void 0,void 0,`svelte-ii0tus`);var ce=F(se),le=L(F(ce),2);let ue;var de=L(le,2);let E;var fe=L(de,2),pe=e=>{var t=hz();let n;R(()=>{K(t,`tabindex`,d()?-1:0),K(t,`aria-label`,s()?.[1]),K(t,`aria-hidden`,u()),K(t,`aria-disabled`,d()),K(t,`aria-readonly`,f()),K(t,`aria-invalid`,p()),K(t,`aria-valuemin`,r()),K(t,`aria-valuemax`,i()),K(t,`aria-valuenow`,o()?.[1]),n=cs(t,``,n,{"inset-inline-start":`${S[1]??``}px`})}),va(`pointerdown`,t,e=>ie(e,1)),va(`keydown`,t,e=>te(e,1)),H(e,t)};W(fe,e=>{z(h)&&e(pe)});var me=L(fe,2),he=e=>{var t=V();uo(I(t),19,l,(e,t)=>`${t}-${e}`,(e,t,n)=>{var r=gz();let i;var a=F(r,!0);D(r),R(()=>{i=cs(r,``,i,{"inset-inline-start":`${z(_)/(l().length-1)*z(n)}px`}),U(a,z(t))}),H(e,r)}),H(e,t)};W(me,e=>{l().length&&e(he)}),D(ce),Rs(ce,e=>P(g,e),()=>z(g)),D(se),R(()=>{ue=cs(le,``,ue,{"inset-inline-start":`${(z(h)?S[0]:0)??``}px`,width:`${(z(h)?S[1]-S[0]:S[0])??``}px`}),K(de,`tabindex`,d()?-1:0),K(de,`aria-label`,z(h)?s()?.[0]:a()),K(de,`aria-hidden`,u()),K(de,`aria-disabled`,d()),K(de,`aria-readonly`,f()),K(de,`aria-invalid`,p()),K(de,`aria-valuemin`,r()),K(de,`aria-valuemax`,i()),K(de,`aria-valuenow`,z(h)?o()?.[0]:n()),E=cs(de,``,E,{"inset-inline-start":`${S[0]??``}px`})}),va(`pointerdown`,ce,e=>ie(e)),va(`pointerdown`,de,e=>ie(e,0)),va(`keydown`,de,e=>te(e,0)),H(e,se),k()}var mz,hz,gz,_z,vz,Tce=o((()=>{Z(),J(),X(),rc(),mz=new Set([`$$slots`,`$$events`,`$$legacy`,`value`,`min`,`max`,`sliderLabel`,`values`,`sliderLabels`,`step`,`optionLabels`,`class`,`hidden`,`disabled`,`readonly`,`invalid`,`children`,`onChange`]),hz=B(`<div role="slider" class="svelte-ii0tus"></div>`),gz=B(`<span role="none" class="label svelte-ii0tus"> </span>`),_z=B(`<div><div role="none" class="base svelte-ii0tus"><div role="none" class="base-bar svelte-ii0tus"></div> <div class="slider-bar svelte-ii0tus"></div> <div role="slider" class="svelte-ii0tus"></div> <!> <!></div></div>`),vz={hash:`svelte-ii0tus`,code:`.slider.svelte-ii0tus {position:relative;display:inline-block;margin:var(--sui-focus-ring-width);padding:4px 6px;touch-action:none;}.slider.svelte-ii0tus:hover .base-bar:where(.svelte-ii0tus) {background-color:var(--sui-hover-background-color);}.slider.svelte-ii0tus:active .base-bar:where(.svelte-ii0tus) {background-color:var(--sui-active-background-color);}.base.svelte-ii0tus {position:relative;width:var(--sui-slider-base-width, 240px);height:calc(var(--sui-checkbox-height) / 2);cursor:pointer;}.base-bar.svelte-ii0tus {border-width:1px;border-style:solid;border-color:var(--sui-control-border-color);border-radius:var(--sui-checkbox-height);background-color:var(--sui-slider-background-color, var(--sui-secondary-background-color));transition:all 200ms;width:100%;height:100%;}.slider-bar.svelte-ii0tus {position:absolute;top:0;height:calc(var(--sui-checkbox-height) / 2);border-radius:var(--sui-checkbox-height);background-color:var(--sui-primary-accent-color-light);}.invalid.svelte-ii0tus .slider-bar:where(.svelte-ii0tus) {background-color:var(--sui-error-border-color);}[role=slider].svelte-ii0tus {position:absolute;top:0;border:3px solid var(--sui-primary-accent-color-light);border-radius:var(--sui-checkbox-height);width:calc(var(--sui-checkbox-height) - 2px);height:calc(var(--sui-checkbox-height) - 2px);background-color:var(--sui-primary-accent-color-inverted);cursor:pointer;}[role=slider].svelte-ii0tus:dir(ltr) {transform:translate(calc((var(--sui-checkbox-height) / 2 - 1px) * -1), calc((var(--sui-checkbox-height) / 4 - 1px) * -1));}[role=slider].svelte-ii0tus:dir(rtl) {transform:translate(calc(var(--sui-checkbox-height) / 2 - 1px), calc((var(--sui-checkbox-height) / 4 - 1px) * -1));}.invalid.svelte-ii0tus [role=slider]:where(.svelte-ii0tus) {border-color:var(--sui-error-border-color);}.label.svelte-ii0tus {position:absolute;top:calc(var(--sui-checkbox-height) / 2 + 8px);font-size:var(--sui-font-size-x-small);}.label.svelte-ii0tus:dir(ltr) {transform:translateX(-50%);}.label.svelte-ii0tus:dir(rtl) {transform:translateX(50%);}`},ya([`pointerdown`,`keydown`])}));function yz(e,t){O(t,!0),G(e,Sz);let n=q(t,`checked`,15),r=q(t,`label`,3,void 0),i=q(t,`hidden`,3,!1),a=q(t,`disabled`,3,!1),o=q(t,`readonly`,3,!1),s=q(t,`required`,3,!1),c=q(t,`invalid`,3,!1),l=Gs(t,bz);var u=xz(),d=()=>{!a()&&!o()&&(n(!n()),t.onChange?.(new CustomEvent(`Change`,{detail:{checked:n()}})))};_s(u,()=>({...l,role:`switch`,class:`sui switch ${t.class??``}`,type:`button`,hidden:i(),disabled:a()||void 0,"aria-checked":n(),"aria-hidden":i(),"aria-disabled":a(),"aria-readonly":o(),"aria-required":s(),"aria-invalid":c(),onclick:d}),void 0,void 0,void 0,`svelte-vhalim`);var f=L(F(u),2),p=e=>{var t=ja();R(()=>U(t,r())),H(e,t)},m=e=>{var n=V();Co(I(n),()=>t.children??E),H(e,n)};W(f,e=>{r()?e(p):e(m,-1)}),D(u),H(e,u),k()}var bz,xz,Sz,Ece=o((()=>{Z(),J(),bz=new Set([`$$slots`,`$$events`,`$$legacy`,`checked`,`label`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`children`,`onChange`]),xz=B(`<button><span role="none" class="svelte-vhalim"></span> <!></button>`),Sz={hash:`svelte-vhalim`,code:`button.svelte-vhalim {display:inline-flex;align-items:center;gap:8px;margin:var(--sui-focus-ring-width);border-width:0;border-style:solid;border-color:transparent;padding:0;color:var(--sui-control-foreground-color);background-color:transparent;box-shadow:none;font-family:var(--sui-control-font-family);font-size:var(--sui-control-font-size);line-height:var(--sui-control-line-height);font-weight:var(--sui-font-weight-normal, normal);text-align:start;cursor:pointer;-webkit-user-select:none;user-select:none;}button[aria-invalid=true].svelte-vhalim span:where(.svelte-vhalim) {background-color:var(--sui-error-border-color) !important;}button:hover[aria-checked=false].svelte-vhalim span:where(.svelte-vhalim) {background-color:var(--sui-hover-background-color);}button:hover[aria-checked=true].svelte-vhalim span:where(.svelte-vhalim) {background-color:var(--sui-primary-accent-color-light);}button:active[aria-checked=false].svelte-vhalim span:where(.svelte-vhalim) {background-color:var(--sui-active-background-color);}button:active[aria-checked=true].svelte-vhalim span:where(.svelte-vhalim) {background-color:var(--sui-primary-accent-color-dark);}button.svelte-vhalim:focus-visible {outline:0;}button.svelte-vhalim:focus-visible span:where(.svelte-vhalim) {outline-color:var(--sui-primary-accent-color-translucent);}button[aria-checked=true].svelte-vhalim span:where(.svelte-vhalim) {background-color:var(--sui-primary-accent-color);border-color:transparent;}button[aria-checked=true].svelte-vhalim span:where(.svelte-vhalim)::before {--translateX: var(--sui-checkbox-height) * 2 - var(--sui-checkbox-height);border-color:var(--sui-primary-accent-color);background-color:var(--sui-primary-accent-color-inverted);}button[aria-checked=true].svelte-vhalim span:where(.svelte-vhalim):dir(ltr)::before {transform:translateX(calc(var(--translateX)));}button[aria-checked=true].svelte-vhalim span:where(.svelte-vhalim):dir(rtl)::before {transform:translateX(calc((var(--translateX)) * -1));}span.svelte-vhalim {position:relative;width:calc(var(--sui-checkbox-height) * 2);height:var(--sui-checkbox-height);padding:0 2px;display:inline-flex;align-items:center;border-width:1.5px;border-style:solid;border-color:var(--sui-checkbox-border-color);border-radius:var(--sui-checkbox-height);background-color:var(--sui-control-background-color);transition:all 200ms;}span.svelte-vhalim::before {display:inline-block;width:calc(var(--sui-checkbox-height) - 6px);height:calc(var(--sui-checkbox-height) - 6px);border-radius:var(--sui-checkbox-height);background-color:var(--sui-checkbox-border-color);transition:all 200ms;content:"";}`}}));function Cz(e,t){G(e,Ez);let n=Gs(t,wz);var r=Tz();_s(r,()=>({...n,role:`cell`,class:`sui table-cell ${t.class??``}`}),void 0,void 0,void 0,`svelte-yzjwsp`),Co(F(r),()=>t.children??E),D(r),H(e,r)}var wz,Tz,Ez,Dce=o((()=>{Z(),J(),wz=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`children`]),Tz=B(`<div><!></div>`),Ez={hash:`svelte-yzjwsp`,code:`.table-cell.svelte-yzjwsp {display:table-cell;}`}}));function Oce(e,t){G(e,kz);let n=Gs(t,Dz);var r=Oz();_s(r,()=>({...n,role:`row`,class:`sui table-row ${t.class??``}`}),void 0,void 0,void 0,`svelte-11fw8fl`),Co(F(r),()=>t.children??E),D(r),H(e,r)}var Dz,Oz,kz,kce=o((()=>{Z(),J(),Dz=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`children`]),Oz=B(`<div><!></div>`),kz={hash:`svelte-11fw8fl`,code:`.table-row.svelte-11fw8fl {display:table-row;height:var(--sui-primary-row-height);}`}}));function Ace(e,t){G(e,Mz);let n=Gs(t,Az);var r=jz();_s(r,()=>({...n,role:`table`,class:`sui table ${t.class??``}`}),void 0,void 0,void 0,`svelte-10k1dkw`),Co(F(r),()=>t.children??E),D(r),H(e,r)}var Az,jz,Mz,jce=o((()=>{Z(),J(),Az=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`children`]),jz=B(`<div><!></div>`),Mz={hash:`svelte-10k1dkw`,code:`.table.svelte-10k1dkw {display:table;margin:var(--sui-focus-ring-width);width:calc(100% - var(--sui-focus-ring-width) * 2);}.table.data.svelte-10k1dkw {border-collapse:collapse;}.table.data.svelte-10k1dkw :is(.table-col-header, .table-row-header, .table-cell) {border:1px solid var(--sui-secondary-border-color);padding:8px 8px;}`}}));function Mce(e,t){O(t,!0),G(e,Fz);let n=q(t,`hidden`,3,!1),r=q(t,`disabled`,3,!1),i=q(t,`orientation`,3,`horizontal`),a=q(t,`name`,3,void 0),o=Gs(t,Nz),s=N(void 0),c=N(void 0),l=()=>{globalThis.requestAnimationFrame(()=>{let e=z(s)?.querySelector(`[role="tab"][aria-selected="true"]`);if(e){let{offsetTop:t,offsetLeft:n,offsetWidth:r,offsetHeight:i}=e;P(c,Object.entries({top:t,left:n,width:r,height:i}).map(([e,t])=>`${e}: ${t}px`).join(`; `),!0)}else P(c,void 0)})};tc(()=>{let e=new ResizeObserver(()=>{l()});return e.observe(z(s)),()=>{e.disconnect()}});var u=Pz(),d=()=>{l()},f=e=>{l(),t.onChange?.(e)};_s(u,()=>({...o,role:`tablist`,class:`sui tab-list ${t.class??``}`,hidden:n(),"aria-hidden":n(),"aria-disabled":r(),"aria-orientation":i(),"data-name":a()||void 0,onInitialized:d,onChange:f}),void 0,void 0,void 0,`svelte-18afmsc`);var p=F(u);Co(F(p),()=>t.children??E),D(p);var m=L(p,2);D(u),Rs(u,e=>P(s,e),()=>z(s)),qo(u,AI),R(()=>{p.inert=r(),cs(m,z(c))}),H(e,u),k()}var Nz,Pz,Fz,Nce=o((()=>{Z(),J(),rc(),jI(),Nz=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`orientation`,`name`,`children`,`onChange`]),Pz=B(`<div><div role="none" class="inner svelte-18afmsc"><!></div> <div role="none" class="indicator svelte-18afmsc"></div></div>`),Fz={hash:`svelte-18afmsc`,code:`.tab-list.svelte-18afmsc {flex:none;position:relative;display:flex;align-items:center;margin:var(--sui-tab-list-margin, var(--sui-focus-ring-width));border-color:var(--sui-tab-list-border-color, var(--sui-control-border-color));border-radius:var(--sui-tab-list-border-radius, 0);background-color:var(--sui-tab-list-background-color, transparent);}.tab-list[aria-orientation=horizontal].svelte-18afmsc {gap:var(--sui-horizontal-tab-list-gap, var(--sui-tab-list-gap, 8px));margin-block:var(--sui-horizontal-tab-list-margin-block, 0 32px);margin-inline:var(--sui-horizontal-tab-list-margin-inline, 0);border-block-width:var(--sui-horizontal-tab-list-border-block-width, 0 1px);border-inline-width:var(--sui-horizontal-tab-list-border-inline-width, 0 0);padding:var(--sui-horizontal-tab-list-padding, var(--sui-tab-list-padding, 0 16px));}.tab-list[aria-orientation=horizontal].svelte-18afmsc button {width:var(--sui-horizontal-tab-width, var(--sui-tab-width, auto));height:var(--sui-horizontal-tab-height, var(--sui-tab-height, 100%));justify-content:var(--sui-horizontal-tab-justify-content, center);}.tab-list[aria-orientation=horizontal].svelte-18afmsc .indicator:where(.svelte-18afmsc) {border-block-width:var(--sui-horizontal-tab-list-indicator-border-block-width, 0 2px);border-inline-width:var(--sui-horizontal-tab-list-indicator-border-inline-width, 0 0);}.tab-list[aria-orientation=vertical].svelte-18afmsc {gap:var(--sui-vertical-tab-list-gap, var(--sui-tab-list-gap, 8px));flex-direction:column;margin-block:var(--sui-vertical-tab-list-margin-block, 0);margin-inline:var(--sui-vertical-tab-list-margin-inline, 0 32px);border-block-width:var(--sui-vertical-tab-list-border-block-width, 0 0);border-inline-width:var(--sui-vertical-tab-list-border-inline-width, 0 1px);padding:var(--sui-vertical-tab-list-padding, var(--sui-tab-list-padding, 8px 0));width:var(--sui-vertical-tab-list-width, auto);}.tab-list[aria-orientation=vertical].svelte-18afmsc button {justify-content:var(--sui-vertical-tab-justify-content, flex-start);padding-inline-end:32px;width:var(--sui-vertical-tab-width, var(--sui-tab-width, 100%));height:var(--sui-vertical-tab-height, var(--sui-tab-height, auto));}.tab-list[aria-orientation=vertical].svelte-18afmsc .indicator:where(.svelte-18afmsc) {border-block-width:var(--sui-vertical-tab-list-indicator-border-block-width, 0 0);border-inline-width:var(--sui-vertical-tab-list-indicator-border-inline-width, 0 2px);}.tab-list.svelte-18afmsc button {position:relative;z-index:1;border-color:transparent;margin:0 !important;border-radius:var(--sui-tab-border-radius, 0);font-family:var(--sui-tab-font-family, var(--sui-control-font-family, inherit));font-size:var(--sui-tab-font-size, var(--sui-control-font-size, inherit));font-weight:var(--sui-tab-font-weight, var(--sui-control-font-weight, var(--sui-font-weight-normal, normal)));}.inner.svelte-18afmsc {display:contents;}.indicator.svelte-18afmsc {position:absolute;z-index:0;inset:auto;border-radius:var(--sui-tab-list-indicator-border-radius, 0);border-color:var(--sui-tab-list-indicator-border-color, var(--sui-primary-accent-color-light));background-color:var(--sui-tab-list-indicator-background-color, transparent);box-shadow:var(--sui-tab-list-indicator-box-shadow, none);pointer-events:none;transition:var(--sui-tab-list-indicator-transition, all 200ms);}`}}));function Pce(e,t){G(e,Rz);let n=Gs(t,Iz);var r=Lz();_s(r,()=>({...n,role:`tabpanel`,class:`sui tab-panel ${t.class??``}`}),void 0,void 0,void 0,`svelte-dcgyy6`),Co(F(r),()=>t.children??E),D(r),H(e,r)}var Iz,Lz,Rz,Fce=o((()=>{Z(),J(),Iz=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`children`]),Lz=B(`<div><!></div>`),Rz={hash:`svelte-dcgyy6`,code:`.tab-panel.svelte-dcgyy6 {flex:auto;transition:all 200ms;}.tab-panel[aria-hidden=true].svelte-dcgyy6, .tab-panel.svelte-dcgyy6:not([aria-hidden]) {display:none;}`}}));function Ice(e,t){let n=q(t,`hidden`,3,!1),r=q(t,`disabled`,3,!1),i=q(t,`selected`,3,!1),a=Gs(t,zz);wI(e,Ks(()=>a,{role:`tab`,get class(){return`sui tab ${t.class??``}`},get hidden(){return n()},get disabled(){return r()},get"aria-selected"(){return i()},startIcon:e=>{var n=V();Co(I(n),()=>t.startIcon??E),H(e,n)},children:e=>{var n=V();Co(I(n),()=>t.children??E),H(e,n)},endIcon:e=>{var n=V();Co(I(n),()=>t.endIcon??E),H(e,n)},$$slots:{startIcon:!0,default:!0,endIcon:!0}}))}var zz,Lce=o((()=>{Z(),J(),EI(),zz=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`selected`,`children`,`startIcon`,`endIcon`])}));function Bz(e,t){O(t,!0),G(e,Uz);let n=q(t,`show`,15,!1),r=q(t,`id`,3,void 0),i=q(t,`duration`,3,5e3),a=q(t,`position`,7,`auto`),o=Gs(t,Vz),s=N(void 0),c=N(void 0),l=N(void 0),u=N(0);tc(()=>(P(c,document.querySelector(`.sui.toast-base.enabled`)??void 0,!0),z(c)?z(s)?.remove():(P(c,z(s),!0),z(c)&&(z(c).classList.add(`enabled`),(document.querySelector(`.sui.app-shell`)??document.body).appendChild(z(c)),z(c).showPopover&&(z(c).popover=`manual`,z(c).showPopover()))),()=>{z(l)?.remove()})),tc(()=>{if(a()!==`auto`)return;let e=globalThis.matchMedia(`(width < 1024px)`),t=()=>{a(e.matches?`bottom-center`:`bottom-${document.dir===`rtl`?`left`:`right`}`)};return t(),e.addEventListener(`change`,t),()=>{e.removeEventListener(`change`,t)}}),Qr(()=>{z(c)&&z(l)&&z(c).appendChild(z(l))}),Qr(()=>{r(),n(),i(),zi(()=>{globalThis.clearTimeout(z(u))}),n()&&i()&&P(u,globalThis.setTimeout(()=>{n(!1)},i()),!0)});var d=Hz(),f=I(d);Rs(f,e=>P(s,e),()=>z(s));var p=L(f,2);_s(p,()=>({...o,class:`sui toast ${a()??``}`,"aria-hidden":!n()}),void 0,void 0,void 0,`svelte-o7ojws`),Co(F(p),()=>t.children??E),D(p),Rs(p,e=>P(l,e),()=>z(l)),H(e,d),k()}var Vz,Hz,Uz,Wz=o((()=>{Z(),J(),rc(),Vz=new Set([`$$slots`,`$$events`,`$$legacy`,`show`,`id`,`duration`,`position`,`children`]),Hz=B(`<div role="none" class="sui toast-base svelte-o7ojws"></div> <div><!></div>`,1),Uz={hash:`svelte-o7ojws`,code:`.toast-base.svelte-o7ojws {position:fixed;inset:16px;z-index:99999;display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-end;gap:8px;margin:0;border:0;padding:0;width:auto;height:auto;background-color:transparent;font-family:var(--sui-font-family-default);font-size:var(--sui-font-size-default);font-weight:var(--sui-font-weight-normal, normal);text-align:center;pointer-events:none;-webkit-user-select:none;user-select:none;}body:has(.sui.bottom-navigation:not([inert]:not([hidden]))) .toast-base {bottom:calc(var(--sui-bottom-navigation-height) + 16px);}.toast.svelte-o7ojws {position:absolute;width:max-content;max-width:80dvw;box-shadow:0 8px 16px var(--sui-popup-shadow-color);opacity:1;transition-duration:250ms;will-change:opacity;}.toast[aria-hidden=true].svelte-o7ojws {display:block;opacity:0;}.toast.top-left.svelte-o7ojws {inset-block-start:0;inset-block-end:auto;inset-inline-start:0;inset-inline-end:auto;}.toast.top-center.svelte-o7ojws {inset-block-start:0;inset-block-end:auto;inset-inline-start:50%;inset-inline-end:auto;}.toast.top-center.svelte-o7ojws:dir(ltr) {transform:translateX(-50%);}.toast.top-center.svelte-o7ojws:dir(rtl) {transform:translateX(50%);}.toast.top-right.svelte-o7ojws {inset-block-start:0;inset-block-end:auto;inset-inline-start:auto;inset-inline-end:0;}.toast.bottom-left.svelte-o7ojws {inset-block-start:auto;inset-block-end:0;inset-inline-start:0;inset-inline-end:auto;}.toast.bottom-center.svelte-o7ojws {inset-block-start:auto;inset-block-end:0;inset-inline-start:50%;inset-inline-end:auto;}.toast.bottom-center.svelte-o7ojws:dir(ltr) {transform:translateX(-50%);}.toast.bottom-center.svelte-o7ojws:dir(rtl) {transform:translateX(50%);}.toast.bottom-right.svelte-o7ojws {inset-block-start:auto;inset-block-end:0;inset-inline-start:auto;inset-inline-end:0;}`}})),Gz=s(((e,t)=>{
668
668
  /**
669
669
  * Prism: Lightweight, robust, elegant syntax highlighting
670
670
  *
@@ -707,12 +707,12 @@ _$3_$4`).replace(/(\s+)\*\*([^*\n]+?)\n([^*\n]+?)\*\*(\s+)/gm,`$1**$2**
707
707
  **$3**$4`).replace(/(\s+)~~([^~\n]+?)\n([^~\n]+?)~~(\s+)/gm,`$1~~$2~~
708
708
  ~~$3~~$4`).replace(/(\s+)`([^`\n]+?)\n([^`\n]+?)`(\s+)/gm,"$1`$2`\n`$3`$4"),f0=e=>e.match(/^\s{2}(?:-|\+|\*|\d+\.)\s/m)?e.replace(/^(\s+)(-|\+|\*|\d+\.)/gm,(e,t,n)=>`${` `.repeat(t.length*2)}${n}`):e})),p0,lfe=o((()=>{wX(),p0={dependencies:[CX],export:e=>sue(e)?`***`:null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(e,t,n,r)=>{let i=XY();r||e.getNextSibling()!==null?e.replace(i):e.insertBefore(i),i.selectNext()},type:`element`}})),m0,h0,g0,_0,v0,y0,ufe=o((()=>{v1(),r0(),cY(),m0=/^(?:\|)(.+)(?:\|)\s?$/,h0=/^(\| ?:?-*:? ?)+\|\s?$/,g0=e=>{let t=e.getFirstChild();return T1(t)?t.getChildrenSize():0},_0=e=>{e=e.replace(/\\n/g,`
709
709
  `);let t=x1(X1.NO_STATUS);return O$(e,_1,t),t},v0=e=>{let[,t]=e.match(m0)??[];return t?t.split(`|`).map(e=>_0(e)):null},y0={dependencies:[n0,Q1,Z1],export:e=>{if(!J1(e))return null;let t=[];return e.getChildren().forEach(e=>{let n=[];if(!T1(e))return;let r=!1;e.getChildren().forEach(e=>{S1(e)&&(n.push(k$(_1,e).replace(/\n/g,`\\n`).trim()),e.__headerState===X1.ROW&&(r=!0))}),t.push(`| ${n.join(` | `)} |`),r&&t.push(`| ${n.map(()=>`---`).join(` | `)} |`)}),t.join(`
710
- `)},regExp:m0,replace:(e,t,[n])=>{if(h0.test(n)){let t=e.getPreviousSibling();if(!t||!J1(t))return;let n=t.getChildren(),r=n[n.length-1];if(!r||!T1(r))return;r.getChildren().forEach(e=>{S1(e)&&e.setHeaderStyles(X1.ROW,X1.ROW)}),e.remove();return}let r=v0(n);if(!r)return;let i=[r],a=e.getPreviousSibling(),o=r.length;for(;a&&!(!IH(a)||a.getChildrenSize()!==1);){let e=a.getFirstChild();if(!xV(e))break;let t=v0(e.getTextContent());if(!t)break;o=Math.max(o,t.length),i.unshift(t);let n=a.getPreviousSibling();a.remove(),a=n}let s=q1();i.forEach(e=>{let t=w1();s.append(t);for(let n=0;n<o;n+=1)t.append(n<e.length?e[n]:_0(``))});let c=e.getPreviousSibling();J1(c)&&g0(c)===o?(c.append(...s.getChildren()),e.remove()):e.replace(s),s.selectEnd()},type:`element`}})),b0,x0,S0,C0,w0,T0,E0,D0,O0,k0,A0=o((()=>{Gz(),HZ(),VZ(),KZ(),wX(),_de(),aQ(),TQ(),v1(),c$(),r0(),kY(),Kw(),cY(),b0=l(i0(),1),u0(),cfe(),lfe(),ufe(),yM(),x0=[..._1,p0,y0],S0=`https://unpkg.com/prismjs@1.30.0`,C0={namespace:`editor`,nodes:[o$,a$,tQ,xQ,bQ,jZ,MZ,CX,n0,Z1,Q1],theme:{text:{italic:`italic`,strikethrough:`strikethrough`},list:{nested:{listitem:`nested`}},code:`code-block`,codeHighlight:{atrule:`token atrule`,attr:`token attr`,boolean:`token boolean`,builtin:`token builtin`,cdata:`token cdata`,char:`token char`,class:`token class`,"class-name":`token class-name`,comment:`token comment`,constant:`token constant`,deleted:`token deleted`,doctype:`token doctype`,entity:`token entity`,function:`token function`,important:`token important`,inserted:`token inserted`,keyword:`token keyword`,namespace:`token namespace`,number:`token number`,operator:`token operator`,prolog:`token prolog`,property:`token property`,punctuation:`token punctuation`,regex:`token regex`,selector:`token selector`,string:`token string`,symbol:`token symbol`,tag:`token tag`,url:`token url`,variable:`token variable`}}},w0=()=>{let e=KV();if(!OV(e))return{blockNodeKey:null,blockType:`paragraph`,inlineTypes:[]};let t=e.anchor.getNode(),n=null,r=o0.filter(t=>e.hasFormat(t));t.getType()!==`root`&&(n=t instanceof TJ?t:xY(t,TJ),YZ(n)&&(r.push(`link`),n=xY(n,TJ)),hQ(n)&&(n=xY(n,xQ)));let i=(()=>{if(!n)return`paragraph`;if(e$(n))return`heading-${n.getTag().match(/\d/)?.[0]}`;if(yQ(n))return n.getListType()===`bullet`?`bulleted-list`:`numbered-list`;if(XQ(n))return`blockquote`;if(pZ(n)||bZ(n))return`code-block`;let e=n.getType();return c0.includes(e)?e:`paragraph`})();return{blockNodeKey:n?.getKey()??null,blockType:i,inlineTypes:r}},T0=e=>{e.getRootElement()?.dispatchEvent(new CustomEvent(`Update`,{detail:{value:k$(x0.filter(({tag:e})=>e!==`*`)).replace(/\\([_\\])/g,`$1`).replace(/&#32;/g,` `),selection:w0()}}))},E0=({components:e=[],useMarkdownShortcuts:t,isCodeEditor:n=!1,defaultLanguage:r=`plain`})=>{e.forEach(({node:e,transformer:t})=>{C0.nodes.unshift(e),x0.unshift(t)});let i=RH(C0),a=[],o=e=>{typeof e==`function`&&a.push(e)};return o(Rde(i)),o(dde(i)),o(hde(i,gde(),1e3)),t&&o(Xde(i,x0)),o(cde(i,{defaultLanguage:r,tokenize:(e,t=`plain`)=>window.Prism.tokenize(e,window.Prism.languages[t]??window.Prism.languages.plain),$tokenize:BZ.$tokenize})),o(i.registerCommand(rQ,e=>(yde(typeof e==`string`?e:null),!0),2)),o(i.registerCommand(CQ,()=>(cQ(`bullet`),!0),2)),o(i.registerCommand(wQ,()=>(cQ(`number`),!0),2)),o(i.registerCommand(YK,()=>Ede(),2)),o(i.registerUpdateListener(()=>{i?.isComposing()||(async()=>{await Gw(100),i.update(()=>{if(n){let e=dU(),t=e.getChildren();if(t.length===1&&!pZ(t[0])&&t[0].remove(),t.length===0){let t=fZ();t.setLanguage(r),e.append(t)}}T0(i)})})()})),o(i.registerRootListener(e=>{if(!e)return;let t=e=>{i.update(()=>{if(e.key===`Tab`){let t=KV();if(!OV(t))return;let n=t.anchor.getNode(),r=n instanceof TJ?n:xY(n,TJ);hQ(r)&&r.canIndent()&&(e.shiftKey?r.getIndent()>0&&(e.preventDefault(),i.dispatchCommand(yq,void 0)):(e.preventDefault(),i.dispatchCommand(vq,void 0)))}})};return e.addEventListener(`keydown`,t),()=>{e.removeEventListener(`keydown`,t)}})),{editor:i,dispose:()=>{a.forEach(e=>e())}}},D0=async e=>{if(e in window.Prism.languages)return;let t=Object.entries(b0.default.languages).find(([t,{alias:n}])=>t===e||(Array.isArray(n)?n.includes(e):n===e))?.[0];if(t)try{await vM(()=>import(`${S0}/components/prism-${t}.min.js`),[])}catch{}},O0=async(e,t)=>(await Promise.all([...t.matchAll(/^```(?<lang>.+?)\n/gm)].map(async({groups:{lang:e=`plain`}={}})=>D0(e))),t=d0(t),t=f0(t),new Promise((n,r)=>{e.update(()=>{try{O$(t,x0),n(void 0)}catch(e){r(Error(`Failed to convert Markdown`,{cause:e}))}})})),k0=async e=>new Promise(t=>{e.focus(()=>{t(void 0)})})}));function j0(e,t){O(t,!0),G(e,P0);let n=q(t,`hidden`,3,!1),r=q(t,`disabled`,3,!1),i=q(t,`readonly`,3,!1),a=q(t,`required`,3,!1),o=q(t,`invalid`,3,!1),s=Gs(t,M0),c=Lt(`editorStore`),l=N(void 0),u=M(()=>!(r()||i()));Qr(()=>{c.editor?.setEditable(z(u))});let d=e=>{let{hasConverterError:t,useRichText:n,inputValue:r}=c;if(t||!n)return;let{value:i,selection:a}=e.detail;r!==i&&(c.useRichText=!1,c.inputValue=i,c.useRichText=!0),c.selection=a},f=e=>{e.target?.matches(`a`)&&e.preventDefault()};tc(()=>{let{editor:e,dispose:t}=E0(c.config);return c.editor=e,z(l)?.addEventListener(`Update`,d),z(l)?.addEventListener(`click`,f),()=>{z(l)?.removeEventListener(`Update`,d),z(l)?.removeEventListener(`click`,f),t(),e.setRootElement(null),c.initialized=!1,c.editor=void 0}}),Qr(()=>{c.editor&&z(l)&&(c.editor.setRootElement(z(l)),c.initialized=!0)});var p=N0();_s(p,()=>({...s,role:`textbox`,"aria-multiline":`true`,"aria-hidden":n(),"aria-disabled":r(),"aria-readonly":i(),"aria-required":a(),"aria-invalid":o(),class:`lexical-root`,id:`${c.editorId??``}-lexical-root`,contenteditable:z(u),hidden:n(),[bs]:{code:c.config.isCodeEditor}}),void 0,void 0,void 0,`svelte-13m0kg3`),Rs(p,e=>P(l,e),()=>z(l)),H(e,p),k()}var M0,N0,P0,F0=o((()=>{Z(),J(),rc(),A0(),M0=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`children`]),N0=B(`<div></div>`),P0={hash:`svelte-13m0kg3`,code:`.lexical-root.svelte-13m0kg3 {overflow:hidden;border:1px solid var(--sui-textbox-border-color);border-radius:var(--sui-textbox-border-radius) !important;padding:var(--sui-textbox-multiline-padding);min-height:8em;color:var(--sui-textbox-foreground-color);background-color:var(--sui-textbox-background-color);font-family:var(--sui-textbox-font-family);font-size:var(--sui-textbox-font-size);line-height:var(--sui-textbox-multiline-line-height);}.lexical-root.svelte-13m0kg3:not(:first-child) {border-start-start-radius:0 !important;border-start-end-radius:0 !important;}.lexical-root.code.svelte-13m0kg3 {padding:0;}.lexical-root.code.svelte-13m0kg3 .code-block {border-radius:0 !important;min-height:120px;}.lexical-root.svelte-13m0kg3:focus-visible {outline:0;}.lexical-root[aria-invalid=true].svelte-13m0kg3 {border-color:var(--sui-error-border-color);}.lexical-root.svelte-13m0kg3 :first-child {margin-top:0;}.lexical-root.svelte-13m0kg3 :last-child {margin-bottom:0;}.lexical-root.svelte-13m0kg3 strong.italic {font-style:italic;}.lexical-root.svelte-13m0kg3 .strikethrough {text-decoration:line-through;}.lexical-root.svelte-13m0kg3 li.nested {list-style-type:none;}.lexical-root.svelte-13m0kg3 .code-block {position:relative;display:block;padding-block:8px;padding-inline-start:56px;padding-inline-end:8px;background-color:var(--sui-code-background-color);overflow-x:auto;white-space:pre;}.lexical-root.svelte-13m0kg3 .code-block:not(:first-child) {margin-top:1em;}.lexical-root.svelte-13m0kg3 .code-block:not(:last-child) {margin-bottom:1em;}.lexical-root.svelte-13m0kg3 .code-block::before {position:absolute;inset-block:0;inset-inline-start:0;inset-inline-end:auto;content:attr(data-gutter);padding:8px;min-width:40px;color:var(--sui-tertiary-foreground-color);background-color:var(--sui-tertiary-background-color);text-align:end;}.lexical-root.svelte-13m0kg3 [data-lexical-text=true] {cursor:text;}.lexical-root.svelte-13m0kg3 :is(th, td) > p {margin:0;white-space:normal;word-break:normal;}.lexical-root.svelte-13m0kg3 hr {margin:var(--sui-paragraph-margin) 0;border:none;padding:0;}.lexical-root.svelte-13m0kg3 hr::after {display:block;height:2px;background-color:var(--sui-control-border-color);line-height:2px;content:"";}:root[data-theme=light] .lexical-root.svelte-13m0kg3 .token:is(.comment, .prolog, .doctype, .cdata) {color:slategray;}:root[data-theme=light] .lexical-root.svelte-13m0kg3 .token.punctuation {color:#999;}:root[data-theme=light] .lexical-root.svelte-13m0kg3 .token.namespace {opacity:0.7;}:root[data-theme=light] .lexical-root.svelte-13m0kg3 .token:is(.property, .tag, .boolean, .number, .constant, .symbol, .deleted) {color:#905;}:root[data-theme=light] .lexical-root.svelte-13m0kg3 .token:is(.selector, .attr-name, .string, .char, .builtin, .inserted) {color:#690;}:root[data-theme=light] .lexical-root.svelte-13m0kg3 .token:is(.operator, .entity, .url), :root[data-theme=light] .lexical-root.svelte-13m0kg3 .language-css .token.string, :root[data-theme=light] .lexical-root.svelte-13m0kg3 .style .token.string {color:#9a6e3a;}:root[data-theme=light] .lexical-root.svelte-13m0kg3 .token:is(.atrule, .attr-value, .keyword) {color:#07a;}:root[data-theme=light] .lexical-root.svelte-13m0kg3 .token:is(.function, .class-name) {color:#dd4a68;}:root[data-theme=light] .lexical-root.svelte-13m0kg3 .token:is(.regex, .important, .variable) {color:#e90;}:root[data-theme=dark] .lexical-root.svelte-13m0kg3 .token:is(.comment, .block-comment, .prolog, .doctype, .cdata) {color:#999;}:root[data-theme=dark] .lexical-root.svelte-13m0kg3 .token.punctuation {color:#ccc;}:root[data-theme=dark] .lexical-root.svelte-13m0kg3 .token:is(.tag, .attr-name, .namespace, .deleted) {color:#e2777a;}:root[data-theme=dark] .lexical-root.svelte-13m0kg3 .token.function-name {color:#6196cc;}:root[data-theme=dark] .lexical-root.svelte-13m0kg3 .token:is(.boolean, .number, .function) {color:#f08d49;}:root[data-theme=dark] .lexical-root.svelte-13m0kg3 .token:is(.property, .class-name, .constant, .symbol) {color:#f8c555;}:root[data-theme=dark] .lexical-root.svelte-13m0kg3 .token:is(.selector, .important, .atrule, .keyword, .builtin) {color:#cc99cd;}:root[data-theme=dark] .lexical-root.svelte-13m0kg3 .token:is(.string, .char, .attr-value, .regex, .variable) {color:#7ec699;}:root[data-theme=dark] .lexical-root.svelte-13m0kg3 .token:is(.operator, .entity, .url) {color:#67cdcc;}:root[data-theme=dark] .lexical-root.svelte-13m0kg3 .token:is(.important, .bold) {font-weight:bold;}:root[data-theme=dark] .lexical-root.svelte-13m0kg3 .token.italic {font-style:italic;}:root[data-theme=dark] .lexical-root.svelte-13m0kg3 .token.entity {cursor:help;}:root[data-theme=dark] .lexical-root.svelte-13m0kg3 .token.inserted {color:green;}`}})),I0,L0=o((()=>{J(),bI(),A0(),I0=()=>{let e=vI(`editor`),t=N(!1),n=N(void 0),r=N(br({modes:[],enabledButtons:[],components:[],useMarkdownShortcuts:!0,isCodeEditor:!1})),i=N(``),a=N(br({blockNodeKey:null,blockType:`paragraph`,inlineTypes:[]})),o=N(!0),s=N(!1),c=N(!1),l=async()=>{if(!z(n)||!z(t))return;let e=z(i);try{await O0(z(n),z(i)||``)}catch(t){P(s,!0),P(i,e,!0),console.error(t)}};return{get editor(){return z(n)},set editor(e){P(n,e,!0)},get initialized(){return z(t)},set initialized(e){P(t,e,!0)},get config(){return z(r)},set config(e){P(r,e,!0),P(o,e.modes[0]===`rich-text`||e.isCodeEditor,!0)},get inputValue(){return z(i)},set inputValue(e){let t=z(i)!==e;t&&P(i,e,!0),z(o)&&(t||z(n)?.getEditorState().isEmpty())&&l()},get selection(){return z(a)},set selection(e){P(a,e,!0)},get useRichText(){return z(o)},set useRichText(e){P(o,e,!0)},get hasConverterError(){return z(s)},set hasConverterError(e){P(s,e,!0),z(s)&&(P(o,!1),P(c,!0))},get showConverterError(){return z(c)},set showConverterError(e){P(c,e,!0)},editorId:e,convertMarkdown:l}}}));function R0(e,t){O(t,!0);let n=q(t,`disabled`,3,!1),r=Object.entries(z0.default.languages).filter(([,e])=>`title`in e).map(([e,t])=>{let{title:n,aliasTitles:r,alias:i}=t,a=[];return i&&!r&&(a=Array.isArray(i)?i:[i]),[{key:e,label:n,aliases:a},...Object.entries(r??{}).map(([e,t])=>({key:e,label:t,aliases:[]}))]}).flat(1).sort((e,t)=>e.label.localeCompare(t.label)),i=Lt(`editorStore`),a=N(`plain`);Qr(()=>{i.selection.blockNodeKey,i.editor?.read(()=>{let e=i.config.isCodeEditor?dU().getChildren()[0]:iU(i.selection.blockNodeKey);pZ(e)&&P(a,e.getLanguage()??i.config.defaultLanguage??`plain`,!0)})});{let t=M(()=>Y(`_sui.text_editor.language`));sz(e,{get disabled(){return n()},get"aria-label"(){return z(t)},get value(){return z(a)},onChange:async({detail:{value:e}})=>{!i.editor||z(a)===e||(await k0(i.editor),i.selection?.blockNodeKey&&(await D0(e),i.editor.update(()=>{let t=iU(i.selection.blockNodeKey);pZ(t)&&(t.setLanguage(e),P(a,e,!0))})))},children:(e,t)=>{var n=B0(),i=I(n);{let e=M(()=>Y(`_sui.text_editor.plain_text`));QL(i,{get label(){return z(e)},value:`plain`,dir:`ltr`})}uo(L(i,2),17,()=>r,({key:e,label:t,aliases:n})=>e,(e,t)=>{let n=()=>z(t).key,r=()=>z(t).label,i=()=>z(t).aliases;{let t=M(()=>n()===z(a)||i().includes(z(a)));QL(e,{get label(){return r()},get value(){return n()},get selected(){return z(t)},dir:`ltr`})}}),H(e,n)},$$slots:{default:!0}})}k()}var z0,B0,V0=o((()=>{Z(),J(),Gz(),HZ(),X(),cY(),z0=l(i0()),rc(),rR(),lz(),A0(),B0=B(`<!> <!>`,1)}));function H0(e,t){G(e,G0);let n=q(t,`hidden`,3,!1),r=q(t,`disabled`,3,!1),i=q(t,`orientation`,3,`horizontal`),a=q(t,`variant`,3,void 0),o=Gs(t,U0);var s=W0();_s(s,()=>({...o,role:`toolbar`,class:`sui toolbar ${i()??``} ${a()??``} ${t.class??``}`,hidden:n(),"aria-hidden":n(),"aria-disabled":r(),"aria-orientation":i()}),void 0,void 0,void 0,`svelte-10n0nlt`);var c=F(s);Co(F(c),()=>t.children??E),D(c),D(s),R(()=>c.inert=r()),H(e,s)}var U0,W0,G0,K0=o((()=>{Z(),J(),U0=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`orientation`,`variant`,`children`]),W0=B(`<div><div role="none" class="inner svelte-10n0nlt"><!></div></div>`),G0={hash:`svelte-10n0nlt`,code:`[role=toolbar].svelte-10n0nlt {--toolbar-size: var(--sui-secondary-toolbar-size);flex:none !important;display:flex;align-items:center;padding-inline:8px;background-color:var(--toolbar-background-color, transparent);}[role=toolbar].primary.svelte-10n0nlt {--toolbar-size: var(--sui-primary-toolbar-size);}
711
- @media (width < 768px) {[role=toolbar].secondary.svelte-10n0nlt {padding-inline:0;}
712
- }[role=toolbar][aria-orientation=horizontal].svelte-10n0nlt {height:var(--toolbar-size);}[role=toolbar][aria-orientation=vertical].svelte-10n0nlt {flex-direction:column;width:var(--toolbar-size);}[role=toolbar].svelte-10n0nlt button[role=button]:is([aria-pressed=true], [aria-checked=true]) {background-color:var(--sui-selected-background-color);}[role=toolbar].svelte-10n0nlt h2 {flex:auto;display:flex;align-items:center;gap:8px;margin:0;padding-inline-end:12px;min-width:0;font-size:var(--sui-font-size-x-large);}[role=toolbar].svelte-10n0nlt h2:first-child {padding-inline-start:12px;}[role=toolbar].svelte-10n0nlt h2 span:not(.sui.truncated-text) {font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-normal, normal);opacity:0.8;}[role=toolbar].svelte-10n0nlt .divider[aria-orientation=horizontal] {margin:0 4px;width:calc(100% - 8px);}[role=toolbar].svelte-10n0nlt .divider[aria-orientation=vertical] {margin:4px 0;height:calc(100% - 8px);}.inner.svelte-10n0nlt {display:contents;}`}}));function q0(e,t){O(t,!0),G(e,X0),q(t,`code`,11,``),q(t,`lang`,11,`plain`);let n=q(t,`disabled`,3,!1),r=Gs(t,J0);var i=Y0();H0(F(i),Ks(()=>r,{get disabled(){return n()},children:(e,n)=>{var r=V();Co(I(r),()=>t.children??E),H(e,r)},$$slots:{default:!0}})),D(i),H(e,i),k()}var J0,Y0,X0,Z0=o((()=>{Z(),J(),K0(),J0=new Set([`$$slots`,`$$events`,`$$legacy`,`code`,`lang`,`disabled`,`children`]),Y0=B(`<div role="none" class="wrapper svelte-1i2xfsj"><!></div>`),X0={hash:`svelte-1i2xfsj`,code:`.wrapper.svelte-1i2xfsj {display:contents;}.wrapper.svelte-1i2xfsj [role=toolbar] {position:sticky;top:0;z-index:100;display:flex;flex-wrap:wrap;gap:4px;border-width:1px 1px 0;border-style:solid;border-color:var(--sui-textbox-border-color);border-start-start-radius:var(--sui-textbox-border-radius);border-start-end-radius:var(--sui-textbox-border-radius);border-end-start-radius:0;border-end-end-radius:0;padding:0 4px;height:auto;min-height:40px;background-color:var(--sui-tertiary-background-color);}
713
- @media (width < 768px) {.wrapper.svelte-1i2xfsj [role=toolbar] {flex-wrap:wrap;height:auto;}
714
- }.wrapper.svelte-1i2xfsj .sui.menu-button {padding:0 4px;}.wrapper.svelte-1i2xfsj .sui.button {flex:none;margin:0 !important;}.wrapper.svelte-1i2xfsj .sui.button-group {gap:4px;}`}}));function dfe(e,t){O(t,!0);let n=q(t,`disabled`,3,!1),r=q(t,`readonly`,3,!1);{let t=M(()=>n()||r()),i=M(()=>Y(`_sui.text_editor.code_editor`));q0(e,{get disabled(){return z(t)},get"aria-label"(){return z(i)},children:(e,t)=>{{let t=M(()=>n()||r());R0(e,{get disabled(){return z(t)}})}},$$slots:{default:!0}})}k()}var ffe=o((()=>{Z(),J(),X(),V0(),Z0()}));function pfe(e,t){O(t,!0),G(e,e2);let n=q(t,`code`,15,``),r=q(t,`lang`,15,`plain`),i=q(t,`showLanguageSwitcher`,3,!1),a=q(t,`flex`,3,!1),o=q(t,`hidden`,3,!1),s=q(t,`disabled`,3,!1),c=q(t,`readonly`,3,!1),l=q(t,`required`,3,!1),u=q(t,`invalid`,3,!1),d=Gs(t,Q0),f=I0();f.config={...f.config,useMarkdownShortcuts:!1,isCodeEditor:!0,defaultLanguage:r()},Rt(`editorStore`,f),Qr(()=>{f.initialized&&(n(),r(),zi(()=>{let e=n()?`\`\`\`${r()}\n${n()}\n\`\`\``:`\`\`\`${r()}\n\`\`\``;f.inputValue=e}))}),Qr(()=>{f.initialized&&(f.inputValue,zi(()=>{let{lang:e=`plain`,code:t=``}=f.inputValue.match(/^```(?<lang>\w+?)?\n(?:(?<code>.*)\n)?```/s)?.groups??{};r()!==e&&r(e),n()!==t&&n(t)}))});var p=$0(),m=I(p);_s(m,()=>({...d,role:`none`,class:`sui code-editor`,hidden:o(),[bs]:{flex:a()}}),void 0,void 0,void 0,`svelte-2b8hmz`);var h=F(m),g=e=>{dfe(e,{get disabled(){return s()},get readonly(){return c()}})};W(h,e=>{i()&&e(g)}),j0(L(h,2),{get hidden(){return o()},get disabled(){return s()},get readonly(){return c()},get required(){return l()},get invalid(){return u()}}),D(m);var _=L(m,2),v=e=>{Bz(e,{get show(){return f.showConverterError},set show(e){f.showConverterError=e},children:(e,t)=>{cI(e,{status:`error`,children:(e,t)=>{gt();var n=ja();R(e=>U(n,e),[()=>Y(`_sui.text_editor.converter_error`)]),H(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}})};W(_,e=>{f.showConverterError&&e(v)}),H(e,p),k()}var Q0,$0,e2,mfe=o((()=>{Z(),J(),X(),rc(),lI(),Wz(),F0(),L0(),ffe(),Q0=new Set([`$$slots`,`$$events`,`$$legacy`,`code`,`lang`,`showLanguageSwitcher`,`flex`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`children`]),$0=B(`<div><!> <!></div> <!>`,1),e2={hash:`svelte-2b8hmz`,code:`.code-editor.svelte-2b8hmz {margin:var(--sui-focus-ring-width);width:calc(100% - var(--sui-focus-ring-width) * 2);}.code-editor.flex.svelte-2b8hmz:not([hidden]) {display:block;}`}}));function t2(e,t){O(t,!0),G(e,a2);let n=q(t,`value`,15,``),r=q(t,`flex`,3,!1),i=q(t,`dir`,3,void 0),a=q(t,`name`,3,void 0),o=q(t,`autoResize`,3,!1),s=q(t,`hidden`,3,!1),c=q(t,`disabled`,3,!1),l=q(t,`readonly`,3,!1),u=q(t,`required`,3,!1),d=q(t,`invalid`,3,!1),f=Gs(t,n2);var p=i2();let m;var h=F(p);Br(h),_s(h,()=>({...f,dir:i(),name:a(),disabled:c()||void 0,readonly:l()||void 0,"aria-hidden":s(),"aria-disabled":c(),"aria-readonly":l(),"aria-required":u(),"aria-invalid":d(),[bs]:{"auto-resize":o()}}),void 0,void 0,void 0,`svelte-m8caf8`);var g=L(h,2),_=e=>{var t=r2(),r=F(t,!0);D(t),R(()=>{K(t,`dir`,i()),U(r,n()),t.dir=t.dir}),H(e,t)};W(g,e=>{o()&&e(_)}),D(p),R(()=>{m=as(p,1,`sui text-area ${t.class??``}`,`svelte-m8caf8`,m,{flex:r(),disabled:c(),readonly:l()}),K(p,`hidden`,s()),h.dir=h.dir}),Ms(h,n),H(e,p),k()}var n2,r2,i2,a2,o2=o((()=>{Z(),J(),n2=new Set([`$$slots`,`$$events`,`$$legacy`,`value`,`flex`,`dir`,`name`,`autoResize`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`children`]),r2=B(`<div class="clone svelte-m8caf8" aria-hidden="true"> </div>`),i2=B(`<div role="none"><textarea></textarea> <!></div>`),a2={hash:`svelte-m8caf8`,code:`.text-area.svelte-m8caf8 {display:inline-grid;margin:var(--sui-focus-ring-width);min-width:var(--sui-textbox-multiline-min-width);}.text-area[hidden].svelte-m8caf8 {display:none;}.text-area.flex.svelte-m8caf8:not([hidden]) {display:inline-grid;width:-moz-available;width:-webkit-fill-available;width:stretch;min-width:0;}:is(textarea.svelte-m8caf8, .clone.svelte-m8caf8) {grid-area:1/1/2/2;display:block;margin:0;border-width:var(--sui-textbox-border-width, 1px);border-color:var(--sui-textbox-border-color);border-radius:var(--sui-textbox-border-radius);padding:var(--sui-textbox-multiline-padding);width:100%;min-height:8em;color:var(--sui-textbox-foreground-color);background-color:var(--sui-textbox-background-color);font-family:var(--sui-textbox-font-family);font-size:var(--sui-textbox-font-size);line-height:var(--sui-textbox-multiline-line-height);font-weight:var(--sui-textbox-font-weight, var(--sui-font-weight-normal, normal));text-align:var(--sui-textbox-text-align, start);text-indent:var(--sui-textbox-text-indent, 0);text-transform:var(--sui-textbox-text-transform, none);letter-spacing:var(--sui-textbox-letter-spacing, normal);word-spacing:var(--sui-word-spacing-normal, normal);transition:all 200ms;}:is(textarea:where(.svelte-m8caf8), .clone:where(.svelte-m8caf8)).resizing.svelte-m8caf8 {transition-duration:0ms;}.svelte-m8caf8:is(textarea:where(.svelte-m8caf8), .clone:where(.svelte-m8caf8)):focus {border-color:var(--sui-textbox-border-color-focus, var(--sui-primary-accent-color));color:var(--sui-textbox-foreground-color-focus, var(--sui-textbox-foreground-color));background-color:var(--sui-textbox-background-color-focus, var(--sui-textbox-background-color));}.svelte-m8caf8:is(textarea:where(.svelte-m8caf8), .clone:where(.svelte-m8caf8)):is(:where(.svelte-m8caf8):disabled, :where(.svelte-m8caf8):read-only) {background-color:var(--sui-disabled-background-color);}textarea.svelte-m8caf8 {resize:vertical;}textarea.auto-resize.svelte-m8caf8 {overflow:hidden;resize:none;}textarea[aria-invalid=true].svelte-m8caf8 {border-color:var(--sui-error-border-color);}.clone.svelte-m8caf8 {overflow:hidden;visibility:hidden;}textarea.svelte-m8caf8,
715
- .clone.svelte-m8caf8 {white-space:pre-wrap;word-break:break-all;}`}}));function hfe(e,t){O(t,!0);let n=Lt(`editorStore`),r=M(()=>n.selection.inlineTypes.includes(t.type));{let i=e=>{oI(e,{get name(){return a0[t.type].icon}})},a=M(()=>Y(`_sui.text_editor.${a0[t.type].labelKey}`)),o=M(()=>!n.useRichText);wI(e,{iconic:!0,get"aria-label"(){return z(a)},get"aria-controls"(){return`${n.editorId??``}-lexical-root`},get disabled(){return z(o)},get pressed(){return z(r)},onclick:async()=>{n.editor&&(await k0(n.editor),n.editor.dispatchCommand(tq,t.type))},startIcon:i,$$slots:{startIcon:!0}})}k()}var gfe=o((()=>{Z(),J(),X(),cY(),rc(),EI(),sI(),u0(),A0()}));function _fe(e,t){O(t,!0);let n=Lt(`editorStore`);{let r=e=>{oI(e,{get name(){return t.component.icon}})},i=M(()=>!n.useRichText);wI(e,{iconic:!0,get"aria-label"(){return t.component.label},get"aria-controls"(){return`${n.editorId??``}-lexical-root`},get disabled(){return z(i)},onclick:()=>{n.editor?.update(()=>{eH([t.component.createNode(),FH()])})},startIcon:r,$$slots:{startIcon:!0}})}k()}var vfe=o((()=>{Z(),J(),cY(),rc(),EI(),sI()}));function yfe(e,t){let n=Ma();O(t,!0);let r=`link`,i=Lt(`editorStore`),a=M(()=>i.selection.inlineTypes.includes(r)),o=N(!1),s=N(`create`),c=N(!1),l=N(``),u=N(``),d=()=>{i.editor?.getEditorState().read(()=>{let e=ale().trim();P(l,e,!0),P(c,!!e),P(s,`create`),P(o,!0)})},f=()=>{i.editor?.dispatchCommand(rQ,null)},p=()=>{i.editor?.getEditorState().read(()=>{let e=KV();if(OV(e)){let t=e.anchor.getNode(),n=(t instanceof tQ?t:xY(t,tQ))?.getURL();if(n){P(c,!0),P(l,n,!0),P(s,`update`),P(o,!0);return}}f()})},m=()=>{z(a)?p():d()},h=e=>{dI(e,`Enter`)&&z(l)&&P(o,!1)},g=async e=>{if(e.detail.returnValue!==`cancel`&&z(s)!==`remove`){if(!i.editor)return;await new Promise(e=>{i.editor?.update(async()=>{let t=KV()??qV()?.clone();if(OV(t)||(t=UV()),!z(c)){P(u,z(u).trim(),!0),P(u,z(u)||z(l),!0);let{anchor:e,focus:n}=t,r=bV(z(u)),i=r.getKey();eH([r]),e.set(i,z(u).length,`text`),n.set(i,0,`text`)}fU(t),e(void 0)})}),await k0(i.editor),i.editor.dispatchCommand(rQ,z(l))}P(l,``),P(u,``)},_=()=>{i.editor?.registerCommand(iq,e=>(dI(e,uI()?`Meta+K`:`Ctrl+K`)&&(e.preventDefault(),m()),!1),2)};Qr(()=>{i.editor&&_()});var v=l2(),y=I(v);{let e=e=>{oI(e,{get name(){return a0[r].icon}})},t=M(()=>Y(`_sui.text_editor.${a0[r].labelKey}`)),n=M(()=>!i.useRichText);wI(y,{iconic:!0,get"aria-label"(){return z(t)},get"aria-controls"(){return`${i.editorId??``}-lexical-root`},get disabled(){return z(n)},get pressed(){return z(a)},onclick:()=>{m()},startIcon:e,$$slots:{startIcon:!0}})}var b=L(y,2);{let e=e=>{var t=V(),n=I(t),r=e=>{{let t=M(()=>Y(`_sui.remove`));wI(e,{variant:`secondary`,get label(){return z(t)},onclick:()=>{f(),P(s,`remove`),P(o,!1)}})}};W(n,e=>{z(s)!==`create`&&e(r)}),H(e,t)},t=M(()=>z(s)===`create`?Y(`_sui.text_editor.insert_link`):Y(`_sui.text_editor.update_link`)),r=M(()=>!z(l)),i=M(()=>z(s)===`create`?Y(`_sui.insert`):Y(`_sui.update`));nL(b,{get title(){return z(t)},get okDisabled(){return z(r)},get okLabel(){return z(i)},onClose:e=>{g(e)},get open(){return z(o)},set open(e){P(o,e,!0)},get value(){return z(l)},set value(e){P(l,e,!0)},footerExtra:e,children:(e,t)=>{var r=c2(),i=I(r),a=F(i),o=F(a,!0);D(a),hL(L(a,2),{dir:`ltr`,get id(){return`${n}-url`},flex:!0,"aria-label":`URL`,onkeydown:e=>{h(e)},get value(){return z(l)},set value(e){P(l,e,!0)}}),D(i);var s=L(i,2),d=e=>{var t=s2(),r=F(t),i=F(r,!0);D(r),hL(L(r,2),{dir:`auto`,get id(){return`${n}-text`},flex:!0,onkeydown:e=>{h(e)},get value(){return z(u)},set value(e){P(u,e,!0)}}),D(t),R(e=>{K(r,`for`,`${n}-text`),U(i,e)},[()=>Y(`_sui.text_editor.text`)]),H(e,t)};W(s,e=>{z(c)||e(d)}),R(e=>{K(a,`for`,`${n}-url`),U(o,e)},[()=>Y(`_sui.text_editor.url`)]),H(e,r)},$$slots:{footerExtra:!0,default:!0}})}H(e,v),k()}var s2,c2,l2,bfe=o((()=>{Z(),J(),aQ(),kY(),X(),pI(),cY(),rc(),EI(),uL(),sI(),bL(),u0(),A0(),s2=B(`<div role="none"><label> </label> <!></div>`),c2=B(`<div role="none"><label> </label> <!></div> <!>`,1),l2=B(`<!> <!>`,1)}));function xfe(e,t){O(t,!0);let n=Lt(`editorStore`);{let r=e=>{oI(e,{name:`arrow_drop_down`,class:`small-arrow`})},i=e=>{iR(e,{children:(e,r)=>{var i=V();uo(I(i),17,()=>t.components,({id:e,label:t,icon:n,createNode:r})=>e,(e,t)=>{let r=()=>z(t).label,i=()=>z(t).icon,a=()=>z(t).createNode;lR(e,{get label(){return r()},onclick:()=>{n.editor?.update(()=>{eH([a()()])})},startIcon:e=>{var t=V(),n=I(t),r=e=>{oI(e,{get name(){return i()}})};W(n,e=>{i()&&e(r)}),H(e,t)},$$slots:{startIcon:!0}})}),H(e,i)},$$slots:{default:!0}})},a=M(()=>!n.useRichText),o=M(()=>Y(`_sui.insert`));PI(e,{get disabled(){return z(a)},get label(){return z(o)},endIcon:r,popup:i,$$slots:{endIcon:!0,popup:!0}})}k()}var Sfe=o((()=>{Z(),J(),X(),cY(),rc(),sI(),FI(),hR(),cR()}));function Cfe(e,t){O(t,!0);let n=Lt(`editorStore`),r=M(()=>n.selection.blockType===t.type),i=async()=>{if(!n.editor)return;await k0(n.editor);let[,e]=t.type.match(/^heading-(\d)$/)??[];e&&n.editor.update(()=>{pY(KV(),()=>$Q(`h${e}`))}),t.type===`paragraph`&&n.editor.update(()=>{pY(KV(),()=>FH())}),t.type===`bulleted-list`&&n.editor.dispatchCommand(CQ,void 0),t.type===`numbered-list`&&n.editor.dispatchCommand(wQ,void 0),t.type===`blockquote`&&n.editor.update(()=>{pY(KV(),()=>YQ())}),t.type===`code-block`&&n.editor.update(()=>{pY(KV(),()=>fZ())})};var a=V();no(I(a),()=>z(r),e=>{{let n=e=>{oI(e,{get name(){return a0[t.type].icon}})},a=M(()=>Y(`_sui.text_editor.${a0[t.type].labelKey}`));gR(e,{get label(){return z(a)},get checked(){return z(r)},onclick:()=>{z(r)||i()},startIcon:n,$$slots:{startIcon:!0}})}}),H(e,a),k()}var wfe=o((()=>{Z(),J(),Gz(),HZ(),TQ(),c$(),yY(),X(),cY(),rc(),sI(),vR(),u0(),A0()}));function Tfe(e,t){O(t,!0);let n=q(t,`disabled`,3,!1),r=q(t,`readonly`,3,!1),i=Lt(`editorStore`),a=M(()=>i.config.components.find(({id:e})=>l0.includes(e))),o=M(()=>i.config.components.filter(({id:e})=>!l0.includes(e))),s=M(()=>sT([`paragraph`,...i.config.enabledButtons.filter(e=>c0.includes(e))])),c=M(()=>sT(i.config.enabledButtons.filter(e=>s0.includes(e))));{let t=M(()=>n()||r()),l=M(()=>Y(`_sui.text_editor.text_editor`));q0(e,{get disabled(){return z(t)},get"aria-label"(){return z(l)},children:(e,t)=>{var n=f2(),r=I(n);{let e=e=>{{let t=M(()=>a0[i.selection.blockType??``]?.icon??`format_paragraph`);oI(e,{get name(){return z(t)}})}},t=e=>{{let t=M(()=>Y(`_sui.text_editor.text_style_options`));iR(e,{get"aria-label"(){return z(t)},children:(e,t)=>{var n=V();uo(I(n),16,()=>z(s),e=>e,(e,t)=>{Cfe(e,{get type(){return t}})}),H(e,n)},$$slots:{default:!0}})}},n=M(()=>!i.useRichText),a=M(()=>Y(`_sui.text_editor.show_text_style_options`));PI(r,{get disabled(){return z(n)},get"aria-label"(){return z(a)},get"aria-controls"(){return`${i.editorId??``}-lexical-root`},startIcon:e,popup:t,$$slots:{startIcon:!0,popup:!0}})}var l=L(r,2),u=e=>{var t=u2(),n=I(t);RI(n,{orientation:`vertical`});var r=L(n,2);{let e=M(()=>!i.useRichText);R0(r,{get disabled(){return z(e)}})}H(e,t)},d=e=>{var t=u2(),n=I(t),r=e=>{var t=u2(),n=I(t);RI(n,{orientation:`vertical`}),wse(L(n,2),{children:(e,t)=>{var n=V();uo(I(n),16,()=>z(c),e=>e,(e,t)=>{var n=V(),r=I(n),i=e=>{yfe(e,{})},a=e=>{hfe(e,{get type(){return t}})};W(r,e=>{t===`link`?e(i):e(a,-1)}),H(e,n)}),H(e,n)},$$slots:{default:!0}}),H(e,t)};W(n,e=>{z(c).length&&e(r)});var s=L(n,2),l=e=>{var t=d2(),n=I(t);RI(n,{orientation:`vertical`});var r=L(n,2),i=e=>{_fe(e,{get component(){return z(a)}})};W(r,e=>{z(a)&&e(i)});var s=L(r,2),c=e=>{xfe(e,{get components(){return z(o)}})};W(s,e=>{z(o).length&&e(c)}),H(e,t)};W(s,e=>{i.config.components.length&&e(l)}),H(e,t)};W(l,e=>{i.selection.blockType===`code-block`?e(u):e(d,-1)});var f=L(l,2);UI(f,{flex:!0});var p=L(f,2),m=e=>{{let t=e=>{oI(e,{name:`markdown`})},n=M(()=>!i.useRichText),r=M(()=>Y(`_sui.text_editor.edit_in_markdown`));wI(e,{iconic:!0,get disabled(){return i.hasConverterError},get pressed(){return z(n)},get"aria-label"(){return z(r)},onclick:()=>{i.useRichText=!i.useRichText,i.useRichText&&i.convertMarkdown()},startIcon:t,$$slots:{startIcon:!0}})}};W(p,e=>{i.config.modes.length>1&&e(m)}),H(e,n)},$$slots:{default:!0}})}k()}var u2,d2,f2,Efe=o((()=>{Z(),J(),X(),cT(),rc(),Ose(),EI(),HI(),qI(),sI(),FI(),cR(),u0(),V0(),gfe(),vfe(),bfe(),Sfe(),wfe(),Z0(),u2=B(`<!> <!>`,1),d2=B(`<!> <!> <!>`,1),f2=B(`<!> <!> <!> <!>`,1)}));function Dfe(e,t){O(t,!0),G(e,h2);let n=q(t,`value`,15,``),r=q(t,`flex`,3,!1),i=q(t,`dir`,3,void 0),a=q(t,`modes`,19,()=>[`rich-text`,`plain-text`]),o=q(t,`buttons`,19,()=>[...s0,...c0]),s=q(t,`components`,19,()=>[]),c=q(t,`useMarkdownShortcuts`,3,!0),l=q(t,`hidden`,3,!1),u=q(t,`disabled`,3,!1),d=q(t,`readonly`,3,!1),f=q(t,`required`,3,!1),p=q(t,`invalid`,3,!1),m=Gs(t,p2),h=I0();h.config={...h.config,modes:a(),enabledButtons:o(),components:s(),useMarkdownShortcuts:c()},Rt(`editorStore`,h),Qr(()=>{if(!h.initialized)return;let e=n();zi(()=>{h.inputValue=e})}),Qr(()=>{if(!h.initialized)return;let e=h.inputValue;zi(()=>{n()!==e&&n(e)})});var g=m2(),_=I(g);_s(_,()=>({...m,role:`none`,class:`sui text-editor`,hidden:l(),[bs]:{flex:r()}}),void 0,void 0,void 0,`svelte-1mjqkn5`);var v=F(_);Tfe(v,{get disabled(){return u()},get readonly(){return d()}});var y=L(v,2);{let e=M(()=>!h.useRichText||l());j0(y,{get hidden(){return z(e)},get disabled(){return u()},get readonly(){return d()},get required(){return f()},get invalid(){return p()}})}var b=L(y,2);{let e=M(()=>h.useRichText||l());t2(b,{autoResize:!0,get flex(){return r()},get dir(){return i()},get hidden(){return z(e)},get disabled(){return u()},get readonly(){return d()},get required(){return f()},get invalid(){return p()},get value(){return h.inputValue},set value(e){h.inputValue=e}})}D(_);var x=L(_,2),S=e=>{Bz(e,{get show(){return h.showConverterError},set show(e){h.showConverterError=e},children:(e,t)=>{cI(e,{status:`error`,children:(e,t)=>{gt();var n=ja();R(e=>U(n,e),[()=>Y(`_sui.text_editor.converter_error`)]),H(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}})};W(x,e=>{h.showConverterError&&e(S)}),H(e,g),k()}var p2,m2,h2,Ofe=o((()=>{Z(),J(),X(),rc(),lI(),o2(),Wz(),u0(),F0(),L0(),Efe(),p2=new Set([`$$slots`,`$$events`,`$$legacy`,`value`,`flex`,`dir`,`modes`,`buttons`,`components`,`useMarkdownShortcuts`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`children`]),m2=B(`<div><!> <!> <!></div> <!>`,1),h2={hash:`svelte-1mjqkn5`,code:`.text-editor.svelte-1mjqkn5 {margin:var(--sui-focus-ring-width);width:calc(100% - var(--sui-focus-ring-width) * 2);}.text-editor.flex.svelte-1mjqkn5:not([hidden]) {display:block;}.text-editor.svelte-1mjqkn5 .sui.text-area {margin:0 !important;width:100% !important;min-width:auto;}.text-editor.svelte-1mjqkn5 .sui.text-area textarea {border-start-start-radius:0 !important;border-start-end-radius:0 !important;border-end-start-radius:var(--sui-textbox-border-radius) !important;border-end-end-radius:var(--sui-textbox-border-radius) !important;}`}}));function kfe(e,t){let n=Ma();O(t,!0),G(e,v2);let r=q(t,`value`,15),i=q(t,`invalid`,15,!1),a=q(t,`flex`,3,!1),o=q(t,`min`,3,void 0),s=q(t,`max`,3,void 0),c=q(t,`step`,3,1),l=q(t,`hidden`,3,!1),u=q(t,`disabled`,3,!1),d=q(t,`readonly`,3,!1),f=q(t,`required`,3,!1),p=Gs(t,g2),m=N(!1),h=N(``),g=M(()=>String(c()).split(`.`)[1]?.length||0),_=M(()=>typeof o()==`number`&&Number(z(h)||0)<=o()),v=M(()=>typeof s()==`number`&&Number(z(h)||0)>=s());Qr(()=>{let e=String(r()??``);zi(()=>{z(h)!==e&&P(h,e,!0)})}),Qr(()=>{let e=z(h).trim()?Number(z(h)):NaN;r(Number.isNaN(e)?void 0:e)}),Qr(()=>{z(m)&&i(f()&&(r()===void 0||z(h)===``)||z(h)!==void 0&&z(h)!==``&&(Number.isNaN(Number(z(h)))||typeof o()==`number`&&Number(z(h)||0)<o()||typeof s()==`number`&&Number(z(h)||0)>s()))});let y=()=>{z(_)||Number.isNaN(Number(z(h)))||P(h,Number(Number(z(h)||0)-c()).toFixed(z(g)),!0)},b=()=>{z(v)||Number.isNaN(Number(z(h)))||P(h,Number(Number(z(h)||0)+c()).toFixed(z(g)),!0)};var x=_2();let S;var C=F(x),w=F(C);{let e=e=>{var n=V(),r=I(n),i=e=>{var n=V();Co(I(n),()=>t.increaseIcon),H(e,n)},a=e=>{oI(e,{name:`expand_less`})};W(r,e=>{t.increaseIcon?e(i):e(a,-1)}),H(e,n)},i=M(()=>u()||d()||Number.isNaN(Number(r()))||z(v)),a=M(()=>Y(`_sui.number_input.increase`));wI(w,{iconic:!0,get disabled(){return z(i)},get"aria-label"(){return z(a)},get"aria-controls"(){return n},onclick:()=>{b()},startIcon:e,$$slots:{startIcon:!0}})}var T=L(w,2);{let e=e=>{var n=V(),r=I(n),i=e=>{var n=V();Co(I(n),()=>t.decreaseIcon),H(e,n)},a=e=>{oI(e,{name:`expand_more`})};W(r,e=>{t.decreaseIcon?e(i):e(a,-1)}),H(e,n)},i=M(()=>u()||d()||Number.isNaN(Number(r()))||z(_)),a=M(()=>Y(`_sui.number_input.decrease`));wI(T,{iconic:!0,get disabled(){return z(i)},get"aria-label"(){return z(a)},get"aria-controls"(){return n},onclick:()=>{y()},startIcon:e,$$slots:{startIcon:!0}})}D(C);var ee=L(C,2);{let e=M(()=>Number(r()||0)),c=M(()=>z(g)>0?`decimal`:`numeric`);hL(ee,Ks({dir:`ltr`},()=>p,{role:`spinbutton`,get id(){return n},spellcheck:`false`,get flex(){return a()},get hidden(){return l()},get disabled(){return u()},get readonly(){return d()},get required(){return f()},get invalid(){return i()},get"aria-valuenow"(){return z(e)},get"aria-valuemin"(){return o()},get"aria-valuemax"(){return s()},get inputmode(){return z(c)},onkeydown:e=>{let{key:t,ctrlKey:n,metaKey:r,altKey:i,shiftKey:a}=e,o=a||i||n||r;t===`ArrowDown`&&!o&&(e.preventDefault(),y()),t===`ArrowUp`&&!o&&(e.preventDefault(),b()),z(m)||P(m,!0)},oninput:()=>{z(m)||P(m,!0)},get onChange(){return t.onChange},get value(){return z(h)},set value(e){P(h,e,!0)}}))}D(x),R(()=>{S=as(x,1,`sui number-input ${t.class??``}`,`svelte-hvos7l`,S,{flex:a(),disabled:u(),readonly:d()}),K(x,`hidden`,l())}),H(e,x),k()}var g2,_2,v2,Afe=o((()=>{Z(),J(),X(),rc(),EI(),sI(),bL(),g2=new Set([`$$slots`,`$$events`,`$$legacy`,`value`,`invalid`,`flex`,`min`,`max`,`step`,`class`,`hidden`,`disabled`,`readonly`,`required`,`children`,`increaseIcon`,`decreaseIcon`,`onChange`]),_2=B(`<div role="none"><div role="none" class="buttons svelte-hvos7l"><!> <!></div> <!></div>`),v2={hash:`svelte-hvos7l`,code:`.number-input.svelte-hvos7l {display:inline-flex;align-items:center;margin:var(--sui-focus-ring-width);min-width:var(--sui-textbox-singleline-min-width);}.number-input.flex.svelte-hvos7l:not([hidden]) {display:inline-flex;width:-moz-available;width:-webkit-fill-available;width:stretch;min-width:0;}.number-input.svelte-hvos7l :not(:first-child) input {border-start-start-radius:0;border-end-start-radius:0;}.number-input.svelte-hvos7l :not(:last-child) input {border-start-end-radius:0;border-end-end-radius:0;}.number-input.svelte-hvos7l :not(.disabled) button[aria-disabled=true] {filter:grayscale(0) opacity(1);}.number-input.svelte-hvos7l :not(.disabled) button[aria-disabled=true] * {filter:grayscale(1) opacity(0.35);}.number-input.svelte-hvos7l .text-input {flex:auto;margin:0 !important;width:0;min-width:0 !important;}.buttons.svelte-hvos7l {display:flex;flex-direction:column;width:24px;height:var(--sui-textbox-height);}.buttons.svelte-hvos7l button {flex:none;margin:0 !important;border-width:1px;border-color:var(--sui-textbox-border-color);width:100%;height:50%;}.buttons.svelte-hvos7l button:first-of-type {border-block-start-width:1px;border-block-end-width:0;border-inline-end-width:0;border-inline-start-width:1px;border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0;}.buttons.svelte-hvos7l button:last-of-type {border-block-start-width:0;border-block-end-width:1px;border-inline-end-width:0;border-inline-start-width:1px;border-start-start-radius:0;border-start-end-radius:0;border-end-end-radius:0;}.buttons.svelte-hvos7l button .icon {font-size:20px;}`}}));function y2(e,t){let n=Ma();O(t,!0),G(e,S2);let r=q(t,`value`,15),i=q(t,`flex`,3,!1),a=q(t,`monospace`,3,!0),o=q(t,`hidden`,3,!1),s=q(t,`disabled`,3,!1),c=q(t,`readonly`,3,!1),l=q(t,`required`,3,!1),u=q(t,`invalid`,3,!1),d=Gs(t,b2),f=N(void 0),p=N(!1);var m=x2();let h;var g=F(m);hL(g,Ks({dir:`ltr`},()=>d,{get id(){return n},spellcheck:`false`,get flex(){return i()},get monospace(){return a()},get hidden(){return o()},get disabled(){return s()},get readonly(){return c()},get required(){return l()},get invalid(){return u()},get element(){return z(f)},set element(e){P(f,e,!0)},get value(){return r()},set value(e){r(e)}}));var _=L(g,2);{let e=e=>{var n=V(),r=I(n),i=e=>{var n=V();Co(I(n),()=>t.visibilityIcon),H(e,n)},a=e=>{{let t=M(()=>z(p)?`visibility_off`:`visibility`);oI(e,{get name(){return z(t)}})}};W(r,e=>{t.visibilityIcon?e(i):e(a,-1)}),H(e,n)},r=M(()=>s()||c()),i=M(()=>Y(z(p)?`_sui.secret_input.hide_secret`:`_sui.secret_input.show_secret`));wI(_,{iconic:!0,get disabled(){return z(r)},get pressed(){return z(p)},get"aria-label"(){return z(i)},get"aria-controls"(){return n},onclick:()=>{P(p,!z(p))},startIcon:e,$$slots:{startIcon:!0}})}D(m),R(()=>{h=as(m,1,`sui secret-input ${t.class??``}`,`svelte-58ucsw`,h,{flex:i(),disabled:s(),readonly:c(),show:z(p)}),K(m,`hidden`,o())}),H(e,m),k()}var b2,x2,S2,jfe=o((()=>{Z(),J(),X(),EI(),sI(),bL(),b2=new Set([`$$slots`,`$$events`,`$$legacy`,`value`,`flex`,`monospace`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`children`,`visibilityIcon`]),x2=B(`<div role="none"><!> <!></div>`),S2={hash:`svelte-58ucsw`,code:`.secret-input.svelte-58ucsw {display:inline-flex;align-items:center;margin:var(--sui-focus-ring-width);min-width:var(--sui-textbox-singleline-min-width);}.secret-input.flex.svelte-58ucsw:not([hidden]) {display:inline-flex;width:-moz-available;width:-webkit-fill-available;width:stretch;min-width:0;}.secret-input.show.svelte-58ucsw input {-webkit-text-security:none;}.secret-input.svelte-58ucsw .text-input {flex:auto;margin:0 !important;width:0;min-width:0 !important;}.secret-input.svelte-58ucsw input {border-start-end-radius:0;border-end-end-radius:0;-webkit-text-security:disc;}.secret-input.svelte-58ucsw button {flex:none;margin-block:0;margin-inline-start:-1px;margin-inline-end:0;border-width:1px;border-color:var(--sui-textbox-border-color);width:var(--sui-textbox-height);aspect-ratio:1/1;}.secret-input.svelte-58ucsw button:last-child {border-start-start-radius:0;border-start-end-radius:4px;border-end-end-radius:4px;border-end-start-radius:0;}.secret-input.svelte-58ucsw button .icon {font-size:var(--sui-font-size-xx-large);}`}}));function Mfe(e,t){O(t,!0),G(e,O2);let n=q(t,`orientation`,3,`horizontal`),r=Gs(t,C2),i=[`https://fonts.googleapis.com/css2?family=Merriweather+Sans:ital,wght@0,300..800;1,300..800&family=Noto+Sans+Mono:wght@100..900&display=swap`,`https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=block`],a=N(!1);tc(()=>{let e=globalThis.matchMedia(`(prefers-color-scheme: dark)`),{dataset:t}=document.documentElement,n=()=>{t.autoTheming!==`false`&&(t.theme=e.matches?`dark`:`light`)};n(),e.addEventListener(`change`,n);let r=globalThis.setTimeout(()=>{P(a,!0)},1e3);return()=>{e.removeEventListener(`change`,n),globalThis.clearTimeout(r)}});var o=D2();Uo(`j94h5n`,e=>{var t=T2(),n=I(t);uo(L(n,8),16,()=>i,e=>e,(e,t)=>{var n=w2(),r=I(n),i=L(r,2);R(()=>{K(r,`href`,t),K(i,`href`,t)}),H(e,n)}),R(e=>K(n,`content`,e),[()=>[`width=device-width`,`initial-scale=1`,`maximum-scale=1`,`interactive-widget=resizes-content`].join(`, `)]),H(e,t)});var s=I(o),c=e=>{var t=E2();cs(t,``,{},{opacity:`0`}),H(e,t)};W(s,e=>{z(a)||e(c)});var l=L(s,2),u=e=>e.preventDefault(),d=e=>e.preventDefault(),f=e=>{if(document.documentElement.matches(`[data-env="dev"]`))return;let t=e.target;document.documentElement.matches(`[data-env="dev"]`)||t?.matches(`input, textarea`)&&`maxLength`in t||t?.closest(`[role="textbox"]`)?.contentEditable===`true`||e.preventDefault()};_s(l,()=>({...r,role:`none`,class:`sui app-shell ${n()??``}`,ondragover:u,ondrop:d,oncontextmenu:f}),void 0,void 0,void 0,`svelte-j94h5n`),Co(F(l),()=>t.children??E),D(l),H(e,o),k()}var C2,w2,T2,E2,D2,O2,Nfe=o((()=>{Z(),J(),rc(),C2=new Set([`$$slots`,`$$events`,`$$legacy`,`orientation`,`children`]),w2=B(`<link rel="preload" as="style"/> <link rel="stylesheet"/>`,1),T2=B(`<meta name="viewport"/> <meta name="google" content="notranslate"/> <link rel="preconnect" href="https://fonts.googleapis.com"/> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous"/> <!>`,1),E2=B(`<div class="font-loader svelte-j94h5n" aria-hidden="true">Loading <strong>Sveltia</strong> <em>UI</em> <span role="none" class="material-symbols-outlined">favorite</span></div>`),D2=B(`<!> <div><!></div>`,1),O2={hash:`svelte-j94h5n`,code:`:root,
710
+ `)},regExp:m0,replace:(e,t,[n])=>{if(h0.test(n)){let t=e.getPreviousSibling();if(!t||!J1(t))return;let n=t.getChildren(),r=n[n.length-1];if(!r||!T1(r))return;r.getChildren().forEach(e=>{S1(e)&&e.setHeaderStyles(X1.ROW,X1.ROW)}),e.remove();return}let r=v0(n);if(!r)return;let i=[r],a=e.getPreviousSibling(),o=r.length;for(;a&&!(!IH(a)||a.getChildrenSize()!==1);){let e=a.getFirstChild();if(!xV(e))break;let t=v0(e.getTextContent());if(!t)break;o=Math.max(o,t.length),i.unshift(t);let n=a.getPreviousSibling();a.remove(),a=n}let s=q1();i.forEach(e=>{let t=w1();s.append(t);for(let n=0;n<o;n+=1)t.append(n<e.length?e[n]:_0(``))});let c=e.getPreviousSibling();J1(c)&&g0(c)===o?(c.append(...s.getChildren()),e.remove()):e.replace(s),s.selectEnd()},type:`element`}})),b0,x0,S0,C0,w0,T0,E0,D0,O0,k0,A0=o((()=>{Gz(),HZ(),VZ(),KZ(),wX(),_de(),aQ(),TQ(),v1(),c$(),r0(),kY(),Kw(),cY(),b0=l(i0(),1),u0(),cfe(),lfe(),ufe(),yM(),x0=[..._1,p0,y0],S0=`https://unpkg.com/prismjs@1.30.0`,C0={namespace:`editor`,nodes:[o$,a$,tQ,xQ,bQ,jZ,MZ,CX,n0,Z1,Q1],theme:{text:{italic:`italic`,strikethrough:`strikethrough`},list:{nested:{listitem:`nested`}},code:`code-block`,codeHighlight:{atrule:`token atrule`,attr:`token attr`,boolean:`token boolean`,builtin:`token builtin`,cdata:`token cdata`,char:`token char`,class:`token class`,"class-name":`token class-name`,comment:`token comment`,constant:`token constant`,deleted:`token deleted`,doctype:`token doctype`,entity:`token entity`,function:`token function`,important:`token important`,inserted:`token inserted`,keyword:`token keyword`,namespace:`token namespace`,number:`token number`,operator:`token operator`,prolog:`token prolog`,property:`token property`,punctuation:`token punctuation`,regex:`token regex`,selector:`token selector`,string:`token string`,symbol:`token symbol`,tag:`token tag`,url:`token url`,variable:`token variable`}}},w0=()=>{let e=KV();if(!OV(e))return{blockNodeKey:null,blockType:`paragraph`,inlineTypes:[]};let t=e.anchor.getNode(),n=null,r=o0.filter(t=>e.hasFormat(t));t.getType()!==`root`&&(n=t instanceof TJ?t:xY(t,TJ),YZ(n)&&(r.push(`link`),n=xY(n,TJ)),hQ(n)&&(n=xY(n,xQ)));let i=(()=>{if(!n)return`paragraph`;if(e$(n))return`heading-${n.getTag().match(/\d/)?.[0]}`;if(yQ(n))return n.getListType()===`bullet`?`bulleted-list`:`numbered-list`;if(XQ(n))return`blockquote`;if(pZ(n)||bZ(n))return`code-block`;let e=n.getType();return c0.includes(e)?e:`paragraph`})();return{blockNodeKey:n?.getKey()??null,blockType:i,inlineTypes:r}},T0=e=>{e.getRootElement()?.dispatchEvent(new CustomEvent(`Update`,{detail:{value:k$(x0.filter(({tag:e})=>e!==`*`)).replace(/\\([_\\])/g,`$1`).replace(/&#32;/g,` `),selection:w0()}}))},E0=({components:e=[],useMarkdownShortcuts:t,isCodeEditor:n=!1,defaultLanguage:r=`plain`})=>{e.forEach(({node:e,transformer:t})=>{C0.nodes.unshift(e),x0.unshift(t)});let i=RH(C0),a=[],o=e=>{typeof e==`function`&&a.push(e)};return o(Rde(i)),o(dde(i)),o(hde(i,gde(),1e3)),t&&o(Xde(i,x0)),o(cde(i,{defaultLanguage:r,tokenize:(e,t=`plain`)=>window.Prism.tokenize(e,window.Prism.languages[t]??window.Prism.languages.plain),$tokenize:BZ.$tokenize})),o(i.registerCommand(rQ,e=>(yde(typeof e==`string`?e:null),!0),2)),o(i.registerCommand(CQ,()=>(cQ(`bullet`),!0),2)),o(i.registerCommand(wQ,()=>(cQ(`number`),!0),2)),o(i.registerCommand(YK,()=>Ede(),2)),o(i.registerUpdateListener(()=>{i?.isComposing()||(async()=>{await Gw(100),i.update(()=>{if(n){let e=dU(),t=e.getChildren();if(t.length===1&&!pZ(t[0])&&t[0].remove(),t.length===0){let t=fZ();t.setLanguage(r),e.append(t)}}T0(i)})})()})),o(i.registerRootListener(e=>{if(!e)return;let t=e=>{i.update(()=>{if(e.key===`Tab`){let t=KV();if(!OV(t))return;let n=t.anchor.getNode(),r=n instanceof TJ?n:xY(n,TJ);hQ(r)&&r.canIndent()&&(e.shiftKey?r.getIndent()>0&&(e.preventDefault(),i.dispatchCommand(yq,void 0)):(e.preventDefault(),i.dispatchCommand(vq,void 0)))}})};return e.addEventListener(`keydown`,t),()=>{e.removeEventListener(`keydown`,t)}})),{editor:i,dispose:()=>{a.forEach(e=>e())}}},D0=async e=>{if(e in window.Prism.languages)return;let t=Object.entries(b0.default.languages).find(([t,{alias:n}])=>t===e||(Array.isArray(n)?n.includes(e):n===e))?.[0];if(t)try{await vM(()=>import(`${S0}/components/prism-${t}.min.js`),[])}catch{}},O0=async(e,t)=>(await Promise.all([...t.matchAll(/^```(?<lang>.+?)\n/gm)].map(async({groups:{lang:e=`plain`}={}})=>D0(e))),t=d0(t),t=f0(t),new Promise((n,r)=>{e.update(()=>{try{O$(t,x0),n(void 0)}catch(e){r(Error(`Failed to convert Markdown`,{cause:e}))}})})),k0=async e=>new Promise(t=>{e.focus(()=>{t(void 0)})})}));function j0(e,t){O(t,!0),G(e,P0);let n=q(t,`hidden`,3,!1),r=q(t,`disabled`,3,!1),i=q(t,`readonly`,3,!1),a=q(t,`required`,3,!1),o=q(t,`invalid`,3,!1),s=Gs(t,M0),c=Lt(`editorStore`),l=N(void 0),u=M(()=>!(r()||i()));Qr(()=>{c.editor?.setEditable(z(u))});let d=e=>{let{hasConverterError:t,useRichText:n,inputValue:r}=c;if(t||!n)return;let{value:i,selection:a}=e.detail;r!==i&&(c.useRichText=!1,c.inputValue=i,c.useRichText=!0),c.selection=a},f=e=>{e.target?.matches(`a`)&&e.preventDefault()};tc(()=>{let{editor:e,dispose:t}=E0(c.config);return c.editor=e,z(l)?.addEventListener(`Update`,d),z(l)?.addEventListener(`click`,f),()=>{z(l)?.removeEventListener(`Update`,d),z(l)?.removeEventListener(`click`,f),t(),e.setRootElement(null),c.initialized=!1,c.editor=void 0}}),Qr(()=>{c.editor&&z(l)&&(c.editor.setRootElement(z(l)),c.initialized=!0)});var p=N0();_s(p,()=>({...s,role:`textbox`,"aria-multiline":`true`,"aria-hidden":n(),"aria-disabled":r(),"aria-readonly":i(),"aria-required":a(),"aria-invalid":o(),class:`lexical-root`,id:`${c.editorId??``}-lexical-root`,contenteditable:z(u),hidden:n(),[bs]:{code:c.config.isCodeEditor}}),void 0,void 0,void 0,`svelte-x4ixtq`),Rs(p,e=>P(l,e),()=>z(l)),H(e,p),k()}var M0,N0,P0,F0=o((()=>{Z(),J(),rc(),A0(),M0=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`children`]),N0=B(`<div></div>`),P0={hash:`svelte-x4ixtq`,code:`.lexical-root.svelte-x4ixtq {overflow:hidden;border:1px solid var(--sui-textbox-border-color);border-radius:var(--sui-textbox-border-radius) !important;padding:var(--sui-textbox-multiline-padding);min-height:8em;color:var(--sui-textbox-foreground-color);background-color:var(--sui-textbox-background-color);font-family:var(--sui-textbox-font-family);font-size:var(--sui-textbox-font-size);line-height:var(--sui-textbox-multiline-line-height);}.lexical-root.svelte-x4ixtq:not(:first-child) {border-start-start-radius:0 !important;border-start-end-radius:0 !important;}.lexical-root.code.svelte-x4ixtq {padding:0;}.lexical-root.code.svelte-x4ixtq .code-block {border-radius:0 !important;min-height:120px;}.lexical-root.svelte-x4ixtq:focus-visible {outline:0;}.lexical-root[aria-invalid=true].svelte-x4ixtq {border-color:var(--sui-error-border-color);}.lexical-root.svelte-x4ixtq [dir]:first-child {margin-top:0;}.lexical-root.svelte-x4ixtq [dir]:last-child {margin-bottom:0;}.lexical-root.svelte-x4ixtq strong.italic {font-style:italic;}.lexical-root.svelte-x4ixtq .strikethrough {text-decoration:line-through;}.lexical-root.svelte-x4ixtq li.nested {list-style-type:none;}.lexical-root.svelte-x4ixtq .code-block {position:relative;display:block;padding-block:8px;padding-inline-start:56px;padding-inline-end:8px;background-color:var(--sui-code-background-color);overflow-x:auto;white-space:pre;}.lexical-root.svelte-x4ixtq .code-block:not(:first-child) {margin-top:1em;}.lexical-root.svelte-x4ixtq .code-block:not(:last-child) {margin-bottom:1em;}.lexical-root.svelte-x4ixtq .code-block::before {position:absolute;inset-block:0;inset-inline-start:0;inset-inline-end:auto;content:attr(data-gutter);padding:8px;min-width:40px;color:var(--sui-tertiary-foreground-color);background-color:var(--sui-tertiary-background-color);text-align:end;}.lexical-root.svelte-x4ixtq [data-lexical-text=true] {cursor:text;}.lexical-root.svelte-x4ixtq :is(th, td) > p {margin:0;white-space:normal;word-break:normal;}.lexical-root.svelte-x4ixtq hr {margin:var(--sui-paragraph-margin) 0;border:none;padding:0;}.lexical-root.svelte-x4ixtq hr::after {display:block;height:2px;background-color:var(--sui-control-border-color);line-height:2px;content:"";}:root[data-theme=light] .lexical-root.svelte-x4ixtq .token:is(.comment, .prolog, .doctype, .cdata) {color:slategray;}:root[data-theme=light] .lexical-root.svelte-x4ixtq .token.punctuation {color:#999;}:root[data-theme=light] .lexical-root.svelte-x4ixtq .token.namespace {opacity:0.7;}:root[data-theme=light] .lexical-root.svelte-x4ixtq .token:is(.property, .tag, .boolean, .number, .constant, .symbol, .deleted) {color:#905;}:root[data-theme=light] .lexical-root.svelte-x4ixtq .token:is(.selector, .attr-name, .string, .char, .builtin, .inserted) {color:#690;}:root[data-theme=light] .lexical-root.svelte-x4ixtq .token:is(.operator, .entity, .url), :root[data-theme=light] .lexical-root.svelte-x4ixtq .language-css .token.string, :root[data-theme=light] .lexical-root.svelte-x4ixtq .style .token.string {color:#9a6e3a;}:root[data-theme=light] .lexical-root.svelte-x4ixtq .token:is(.atrule, .attr-value, .keyword) {color:#07a;}:root[data-theme=light] .lexical-root.svelte-x4ixtq .token:is(.function, .class-name) {color:#dd4a68;}:root[data-theme=light] .lexical-root.svelte-x4ixtq .token:is(.regex, .important, .variable) {color:#e90;}:root[data-theme=dark] .lexical-root.svelte-x4ixtq .token:is(.comment, .block-comment, .prolog, .doctype, .cdata) {color:#999;}:root[data-theme=dark] .lexical-root.svelte-x4ixtq .token.punctuation {color:#ccc;}:root[data-theme=dark] .lexical-root.svelte-x4ixtq .token:is(.tag, .attr-name, .namespace, .deleted) {color:#e2777a;}:root[data-theme=dark] .lexical-root.svelte-x4ixtq .token.function-name {color:#6196cc;}:root[data-theme=dark] .lexical-root.svelte-x4ixtq .token:is(.boolean, .number, .function) {color:#f08d49;}:root[data-theme=dark] .lexical-root.svelte-x4ixtq .token:is(.property, .class-name, .constant, .symbol) {color:#f8c555;}:root[data-theme=dark] .lexical-root.svelte-x4ixtq .token:is(.selector, .important, .atrule, .keyword, .builtin) {color:#cc99cd;}:root[data-theme=dark] .lexical-root.svelte-x4ixtq .token:is(.string, .char, .attr-value, .regex, .variable) {color:#7ec699;}:root[data-theme=dark] .lexical-root.svelte-x4ixtq .token:is(.operator, .entity, .url) {color:#67cdcc;}:root[data-theme=dark] .lexical-root.svelte-x4ixtq .token:is(.important, .bold) {font-weight:bold;}:root[data-theme=dark] .lexical-root.svelte-x4ixtq .token.italic {font-style:italic;}:root[data-theme=dark] .lexical-root.svelte-x4ixtq .token.entity {cursor:help;}:root[data-theme=dark] .lexical-root.svelte-x4ixtq .token.inserted {color:green;}`}})),I0,L0=o((()=>{J(),bI(),A0(),I0=()=>{let e=vI(`editor`),t=N(!1),n=N(void 0),r=N(br({modes:[],enabledButtons:[],components:[],useMarkdownShortcuts:!0,isCodeEditor:!1})),i=N(``),a=N(br({blockNodeKey:null,blockType:`paragraph`,inlineTypes:[]})),o=N(!0),s=N(!1),c=N(!1),l=async()=>{if(!z(n)||!z(t))return;let e=z(i);try{await O0(z(n),z(i)||``)}catch(t){P(s,!0),P(i,e,!0),console.error(t)}};return{get editor(){return z(n)},set editor(e){P(n,e,!0)},get initialized(){return z(t)},set initialized(e){P(t,e,!0)},get config(){return z(r)},set config(e){P(r,e,!0),P(o,e.modes[0]===`rich-text`||e.isCodeEditor,!0)},get inputValue(){return z(i)},set inputValue(e){let t=z(i)!==e;t&&P(i,e,!0),z(o)&&(t||z(n)?.getEditorState().isEmpty())&&l()},get selection(){return z(a)},set selection(e){P(a,e,!0)},get useRichText(){return z(o)},set useRichText(e){P(o,e,!0)},get hasConverterError(){return z(s)},set hasConverterError(e){P(s,e,!0),z(s)&&(P(o,!1),P(c,!0))},get showConverterError(){return z(c)},set showConverterError(e){P(c,e,!0)},editorId:e,convertMarkdown:l}}}));function R0(e,t){O(t,!0);let n=q(t,`disabled`,3,!1),r=Object.entries(z0.default.languages).filter(([,e])=>`title`in e).map(([e,t])=>{let{title:n,aliasTitles:r,alias:i}=t,a=[];return i&&!r&&(a=Array.isArray(i)?i:[i]),[{key:e,label:n,aliases:a},...Object.entries(r??{}).map(([e,t])=>({key:e,label:t,aliases:[]}))]}).flat(1).sort((e,t)=>e.label.localeCompare(t.label)),i=Lt(`editorStore`),a=N(`plain`);Qr(()=>{i.selection.blockNodeKey,i.editor?.read(()=>{let e=i.config.isCodeEditor?dU().getChildren()[0]:iU(i.selection.blockNodeKey);pZ(e)&&P(a,e.getLanguage()??i.config.defaultLanguage??`plain`,!0)})});{let t=M(()=>Y(`_sui.text_editor.language`));sz(e,{get disabled(){return n()},get"aria-label"(){return z(t)},get value(){return z(a)},onChange:async({detail:{value:e}})=>{!i.editor||z(a)===e||(await k0(i.editor),i.selection?.blockNodeKey&&(await D0(e),i.editor.update(()=>{let t=iU(i.selection.blockNodeKey);pZ(t)&&(t.setLanguage(e),P(a,e,!0))})))},children:(e,t)=>{var n=B0(),i=I(n);{let e=M(()=>Y(`_sui.text_editor.plain_text`));QL(i,{get label(){return z(e)},value:`plain`,dir:`ltr`})}uo(L(i,2),17,()=>r,({key:e,label:t,aliases:n})=>e,(e,t)=>{let n=()=>z(t).key,r=()=>z(t).label,i=()=>z(t).aliases;{let t=M(()=>n()===z(a)||i().includes(z(a)));QL(e,{get label(){return r()},get value(){return n()},get selected(){return z(t)},dir:`ltr`})}}),H(e,n)},$$slots:{default:!0}})}k()}var z0,B0,V0=o((()=>{Z(),J(),Gz(),HZ(),X(),cY(),z0=l(i0()),rc(),rR(),lz(),A0(),B0=B(`<!> <!>`,1)}));function H0(e,t){G(e,G0);let n=q(t,`hidden`,3,!1),r=q(t,`disabled`,3,!1),i=q(t,`orientation`,3,`horizontal`),a=q(t,`variant`,3,void 0),o=Gs(t,U0);var s=W0();_s(s,()=>({...o,role:`toolbar`,class:`sui toolbar ${i()??``} ${a()??``} ${t.class??``}`,hidden:n(),"aria-hidden":n(),"aria-disabled":r(),"aria-orientation":i()}),void 0,void 0,void 0,`svelte-oa6e0k`);var c=F(s);Co(F(c),()=>t.children??E),D(c),D(s),R(()=>c.inert=r()),H(e,s)}var U0,W0,G0,K0=o((()=>{Z(),J(),U0=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`orientation`,`variant`,`children`]),W0=B(`<div><div role="none" class="inner svelte-oa6e0k"><!></div></div>`),G0={hash:`svelte-oa6e0k`,code:`[role=toolbar].svelte-oa6e0k {--toolbar-size: var(--sui-secondary-toolbar-size);flex:none !important;display:flex;align-items:center;padding-inline:8px;background-color:var(--toolbar-background-color, transparent);}[role=toolbar].primary.svelte-oa6e0k {--toolbar-size: var(--sui-primary-toolbar-size);}
711
+ @media (width < 768px) {[role=toolbar].secondary.svelte-oa6e0k {padding-inline:0;}
712
+ }[role=toolbar][aria-orientation=horizontal].svelte-oa6e0k {height:var(--toolbar-size);}[role=toolbar][aria-orientation=vertical].svelte-oa6e0k {flex-direction:column;width:var(--toolbar-size);}[role=toolbar].svelte-oa6e0k button[role=button]:is([aria-pressed=true], [aria-checked=true]) {background-color:var(--sui-selected-background-color);}[role=toolbar].svelte-oa6e0k h2 {flex:auto;display:flex;align-items:center;gap:8px;margin:0;padding-inline-end:12px;min-width:0;font-size:var(--sui-font-size-x-large);}[role=toolbar].svelte-oa6e0k h2:first-child {padding-inline-start:12px;}[role=toolbar].svelte-oa6e0k h2 span:not(.sui.truncated-text) {font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-normal, normal);opacity:0.8;}[role=toolbar].svelte-oa6e0k .divider[aria-orientation=horizontal] {margin:0 4px;width:calc(100% - 8px);}[role=toolbar].svelte-oa6e0k .divider[aria-orientation=vertical] {margin:4px 0;height:calc(100% - 8px);}.inner.svelte-oa6e0k {display:contents;}`}}));function q0(e,t){O(t,!0),G(e,X0),q(t,`code`,11,``),q(t,`lang`,11,`plain`);let n=q(t,`disabled`,3,!1),r=Gs(t,J0);var i=Y0();H0(F(i),Ks(()=>r,{get disabled(){return n()},children:(e,n)=>{var r=V();Co(I(r),()=>t.children??E),H(e,r)},$$slots:{default:!0}})),D(i),H(e,i),k()}var J0,Y0,X0,Z0=o((()=>{Z(),J(),K0(),J0=new Set([`$$slots`,`$$events`,`$$legacy`,`code`,`lang`,`disabled`,`children`]),Y0=B(`<div role="none" class="wrapper svelte-1jlnqb2"><!></div>`),X0={hash:`svelte-1jlnqb2`,code:`.wrapper.svelte-1jlnqb2 {display:contents;}.wrapper.svelte-1jlnqb2 [role=toolbar] {position:sticky;top:0;z-index:100;display:flex;flex-wrap:wrap;gap:4px;border-width:1px 1px 0;border-style:solid;border-color:var(--sui-textbox-border-color);border-start-start-radius:var(--sui-textbox-border-radius);border-start-end-radius:var(--sui-textbox-border-radius);border-end-start-radius:0;border-end-end-radius:0;padding:0 4px;height:auto;min-height:40px;background-color:var(--sui-tertiary-background-color);}
713
+ @media (width < 768px) {.wrapper.svelte-1jlnqb2 [role=toolbar] {flex-wrap:wrap;height:auto;}
714
+ }.wrapper.svelte-1jlnqb2 .sui.menu-button {padding:0 4px;}.wrapper.svelte-1jlnqb2 .sui.button {flex:none;margin:0 !important;}.wrapper.svelte-1jlnqb2 .sui.button-group {gap:4px;}`}}));function dfe(e,t){O(t,!0);let n=q(t,`disabled`,3,!1),r=q(t,`readonly`,3,!1);{let t=M(()=>n()||r()),i=M(()=>Y(`_sui.text_editor.code_editor`));q0(e,{get disabled(){return z(t)},get"aria-label"(){return z(i)},children:(e,t)=>{{let t=M(()=>n()||r());R0(e,{get disabled(){return z(t)}})}},$$slots:{default:!0}})}k()}var ffe=o((()=>{Z(),J(),X(),V0(),Z0()}));function pfe(e,t){O(t,!0),G(e,e2);let n=q(t,`code`,15,``),r=q(t,`lang`,15,`plain`),i=q(t,`showLanguageSwitcher`,3,!1),a=q(t,`flex`,3,!1),o=q(t,`hidden`,3,!1),s=q(t,`disabled`,3,!1),c=q(t,`readonly`,3,!1),l=q(t,`required`,3,!1),u=q(t,`invalid`,3,!1),d=Gs(t,Q0),f=I0();f.config={...f.config,useMarkdownShortcuts:!1,isCodeEditor:!0,defaultLanguage:r()},Rt(`editorStore`,f),Qr(()=>{f.initialized&&(n(),r(),zi(()=>{let e=n()?`\`\`\`${r()}\n${n()}\n\`\`\``:`\`\`\`${r()}\n\`\`\``;f.inputValue=e}))}),Qr(()=>{f.initialized&&(f.inputValue,zi(()=>{let{lang:e=`plain`,code:t=``}=f.inputValue.match(/^```(?<lang>\w+?)?\n(?:(?<code>.*)\n)?```/s)?.groups??{};r()!==e&&r(e),n()!==t&&n(t)}))});var p=$0(),m=I(p);_s(m,()=>({...d,role:`none`,class:`sui code-editor`,hidden:o(),[bs]:{flex:a()}}),void 0,void 0,void 0,`svelte-1r9d2iu`);var h=F(m),g=e=>{dfe(e,{get disabled(){return s()},get readonly(){return c()}})};W(h,e=>{i()&&e(g)}),j0(L(h,2),{get hidden(){return o()},get disabled(){return s()},get readonly(){return c()},get required(){return l()},get invalid(){return u()}}),D(m);var _=L(m,2),v=e=>{Bz(e,{get show(){return f.showConverterError},set show(e){f.showConverterError=e},children:(e,t)=>{cI(e,{status:`error`,children:(e,t)=>{gt();var n=ja();R(e=>U(n,e),[()=>Y(`_sui.text_editor.converter_error`)]),H(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}})};W(_,e=>{f.showConverterError&&e(v)}),H(e,p),k()}var Q0,$0,e2,mfe=o((()=>{Z(),J(),X(),rc(),lI(),Wz(),F0(),L0(),ffe(),Q0=new Set([`$$slots`,`$$events`,`$$legacy`,`code`,`lang`,`showLanguageSwitcher`,`flex`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`children`]),$0=B(`<div><!> <!></div> <!>`,1),e2={hash:`svelte-1r9d2iu`,code:`.code-editor.svelte-1r9d2iu {margin:var(--sui-focus-ring-width);width:calc(100% - var(--sui-focus-ring-width) * 2);}.code-editor.flex.svelte-1r9d2iu:not([hidden]) {display:block;}`}}));function t2(e,t){O(t,!0),G(e,a2);let n=q(t,`value`,15,``),r=q(t,`flex`,3,!1),i=q(t,`dir`,3,void 0),a=q(t,`name`,3,void 0),o=q(t,`autoResize`,3,!1),s=q(t,`hidden`,3,!1),c=q(t,`disabled`,3,!1),l=q(t,`readonly`,3,!1),u=q(t,`required`,3,!1),d=q(t,`invalid`,3,!1),f=Gs(t,n2);var p=i2();let m;var h=F(p);Br(h),_s(h,()=>({...f,dir:i(),name:a(),disabled:c()||void 0,readonly:l()||void 0,"aria-hidden":s(),"aria-disabled":c(),"aria-readonly":l(),"aria-required":u(),"aria-invalid":d(),[bs]:{"auto-resize":o()}}),void 0,void 0,void 0,`svelte-glbytt`);var g=L(h,2),_=e=>{var t=r2(),r=F(t,!0);D(t),R(()=>{K(t,`dir`,i()),U(r,n()),t.dir=t.dir}),H(e,t)};W(g,e=>{o()&&e(_)}),D(p),R(()=>{m=as(p,1,`sui text-area ${t.class??``}`,`svelte-glbytt`,m,{flex:r(),disabled:c(),readonly:l()}),K(p,`hidden`,s()),h.dir=h.dir}),Ms(h,n),H(e,p),k()}var n2,r2,i2,a2,o2=o((()=>{Z(),J(),n2=new Set([`$$slots`,`$$events`,`$$legacy`,`value`,`flex`,`dir`,`name`,`autoResize`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`children`]),r2=B(`<div class="clone svelte-glbytt" aria-hidden="true"> </div>`),i2=B(`<div role="none"><textarea></textarea> <!></div>`),a2={hash:`svelte-glbytt`,code:`.text-area.svelte-glbytt {display:inline-grid;margin:var(--sui-focus-ring-width);min-width:var(--sui-textbox-multiline-min-width);}.text-area[hidden].svelte-glbytt {display:none;}.text-area.flex.svelte-glbytt:not([hidden]) {display:inline-grid;width:-moz-available;width:-webkit-fill-available;width:stretch;min-width:0;}:is(textarea.svelte-glbytt, .clone.svelte-glbytt) {grid-area:1/1/2/2;display:block;margin:0;border-width:var(--sui-textbox-border-width, 1px);border-color:var(--sui-textbox-border-color);border-radius:var(--sui-textbox-border-radius);padding:var(--sui-textbox-multiline-padding);width:100%;min-height:8em;color:var(--sui-textbox-foreground-color);background-color:var(--sui-textbox-background-color);font-family:var(--sui-textbox-font-family);font-size:var(--sui-textbox-font-size);line-height:var(--sui-textbox-multiline-line-height);font-weight:var(--sui-textbox-font-weight, var(--sui-font-weight-normal, normal));text-align:var(--sui-textbox-text-align, start);text-indent:var(--sui-textbox-text-indent, 0);text-transform:var(--sui-textbox-text-transform, none);letter-spacing:var(--sui-textbox-letter-spacing, normal);word-spacing:var(--sui-word-spacing-normal, normal);transition:all 200ms;}:is(textarea:where(.svelte-glbytt), .clone:where(.svelte-glbytt)).resizing.svelte-glbytt {transition-duration:0ms;}.svelte-glbytt:is(textarea:where(.svelte-glbytt), .clone:where(.svelte-glbytt)):focus {border-color:var(--sui-textbox-border-color-focus, var(--sui-primary-accent-color));color:var(--sui-textbox-foreground-color-focus, var(--sui-textbox-foreground-color));background-color:var(--sui-textbox-background-color-focus, var(--sui-textbox-background-color));}.svelte-glbytt:is(textarea:where(.svelte-glbytt), .clone:where(.svelte-glbytt)):is(:where(.svelte-glbytt):disabled, :where(.svelte-glbytt):read-only) {background-color:var(--sui-disabled-background-color);}textarea.svelte-glbytt {resize:vertical;}textarea.auto-resize.svelte-glbytt {overflow:hidden;resize:none;}textarea[aria-invalid=true].svelte-glbytt {border-color:var(--sui-error-border-color);}.clone.svelte-glbytt {overflow:hidden;visibility:hidden;}textarea.svelte-glbytt,
715
+ .clone.svelte-glbytt {white-space:pre-wrap;word-break:break-all;}`}}));function hfe(e,t){O(t,!0);let n=Lt(`editorStore`),r=M(()=>n.selection.inlineTypes.includes(t.type));{let i=e=>{oI(e,{get name(){return a0[t.type].icon}})},a=M(()=>Y(`_sui.text_editor.${a0[t.type].labelKey}`)),o=M(()=>!n.useRichText);wI(e,{iconic:!0,get"aria-label"(){return z(a)},get"aria-controls"(){return`${n.editorId??``}-lexical-root`},get disabled(){return z(o)},get pressed(){return z(r)},onclick:async()=>{n.editor&&(await k0(n.editor),n.editor.dispatchCommand(tq,t.type))},startIcon:i,$$slots:{startIcon:!0}})}k()}var gfe=o((()=>{Z(),J(),X(),cY(),rc(),EI(),sI(),u0(),A0()}));function _fe(e,t){O(t,!0);let n=Lt(`editorStore`);{let r=e=>{oI(e,{get name(){return t.component.icon}})},i=M(()=>!n.useRichText);wI(e,{iconic:!0,get"aria-label"(){return t.component.label},get"aria-controls"(){return`${n.editorId??``}-lexical-root`},get disabled(){return z(i)},onclick:()=>{n.editor?.update(()=>{eH([t.component.createNode(),FH()])})},startIcon:r,$$slots:{startIcon:!0}})}k()}var vfe=o((()=>{Z(),J(),cY(),rc(),EI(),sI()}));function yfe(e,t){let n=Ma();O(t,!0);let r=`link`,i=Lt(`editorStore`),a=M(()=>i.selection.inlineTypes.includes(r)),o=N(!1),s=N(`create`),c=N(!1),l=N(``),u=N(``),d=()=>{i.editor?.getEditorState().read(()=>{let e=ale().trim();P(l,e,!0),P(c,!!e),P(s,`create`),P(o,!0)})},f=()=>{i.editor?.dispatchCommand(rQ,null)},p=()=>{i.editor?.getEditorState().read(()=>{let e=KV();if(OV(e)){let t=e.anchor.getNode(),n=(t instanceof tQ?t:xY(t,tQ))?.getURL();if(n){P(c,!0),P(l,n,!0),P(s,`update`),P(o,!0);return}}f()})},m=()=>{z(a)?p():d()},h=e=>{dI(e,`Enter`)&&z(l)&&P(o,!1)},g=async e=>{if(e.detail.returnValue!==`cancel`&&z(s)!==`remove`){if(!i.editor)return;await new Promise(e=>{i.editor?.update(async()=>{let t=KV()??qV()?.clone();if(OV(t)||(t=UV()),!z(c)){P(u,z(u).trim(),!0),P(u,z(u)||z(l),!0);let{anchor:e,focus:n}=t,r=bV(z(u)),i=r.getKey();eH([r]),e.set(i,z(u).length,`text`),n.set(i,0,`text`)}fU(t),e(void 0)})}),await k0(i.editor),i.editor.dispatchCommand(rQ,z(l))}P(l,``),P(u,``)},_=()=>{i.editor?.registerCommand(iq,e=>(dI(e,uI()?`Meta+K`:`Ctrl+K`)&&(e.preventDefault(),m()),!1),2)};Qr(()=>{i.editor&&_()});var v=l2(),y=I(v);{let e=e=>{oI(e,{get name(){return a0[r].icon}})},t=M(()=>Y(`_sui.text_editor.${a0[r].labelKey}`)),n=M(()=>!i.useRichText);wI(y,{iconic:!0,get"aria-label"(){return z(t)},get"aria-controls"(){return`${i.editorId??``}-lexical-root`},get disabled(){return z(n)},get pressed(){return z(a)},onclick:()=>{m()},startIcon:e,$$slots:{startIcon:!0}})}var b=L(y,2);{let e=e=>{var t=V(),n=I(t),r=e=>{{let t=M(()=>Y(`_sui.remove`));wI(e,{variant:`secondary`,get label(){return z(t)},onclick:()=>{f(),P(s,`remove`),P(o,!1)}})}};W(n,e=>{z(s)!==`create`&&e(r)}),H(e,t)},t=M(()=>z(s)===`create`?Y(`_sui.text_editor.insert_link`):Y(`_sui.text_editor.update_link`)),r=M(()=>!z(l)),i=M(()=>z(s)===`create`?Y(`_sui.insert`):Y(`_sui.update`));nL(b,{get title(){return z(t)},get okDisabled(){return z(r)},get okLabel(){return z(i)},onClose:e=>{g(e)},get open(){return z(o)},set open(e){P(o,e,!0)},get value(){return z(l)},set value(e){P(l,e,!0)},footerExtra:e,children:(e,t)=>{var r=c2(),i=I(r),a=F(i),o=F(a,!0);D(a),hL(L(a,2),{dir:`ltr`,get id(){return`${n}-url`},flex:!0,"aria-label":`URL`,onkeydown:e=>{h(e)},get value(){return z(l)},set value(e){P(l,e,!0)}}),D(i);var s=L(i,2),d=e=>{var t=s2(),r=F(t),i=F(r,!0);D(r),hL(L(r,2),{dir:`auto`,get id(){return`${n}-text`},flex:!0,onkeydown:e=>{h(e)},get value(){return z(u)},set value(e){P(u,e,!0)}}),D(t),R(e=>{K(r,`for`,`${n}-text`),U(i,e)},[()=>Y(`_sui.text_editor.text`)]),H(e,t)};W(s,e=>{z(c)||e(d)}),R(e=>{K(a,`for`,`${n}-url`),U(o,e)},[()=>Y(`_sui.text_editor.url`)]),H(e,r)},$$slots:{footerExtra:!0,default:!0}})}H(e,v),k()}var s2,c2,l2,bfe=o((()=>{Z(),J(),aQ(),kY(),X(),pI(),cY(),rc(),EI(),uL(),sI(),bL(),u0(),A0(),s2=B(`<div role="none"><label> </label> <!></div>`),c2=B(`<div role="none"><label> </label> <!></div> <!>`,1),l2=B(`<!> <!>`,1)}));function xfe(e,t){O(t,!0);let n=Lt(`editorStore`);{let r=e=>{oI(e,{name:`arrow_drop_down`,class:`small-arrow`})},i=e=>{iR(e,{children:(e,r)=>{var i=V();uo(I(i),17,()=>t.components,({id:e,label:t,icon:n,createNode:r})=>e,(e,t)=>{let r=()=>z(t).label,i=()=>z(t).icon,a=()=>z(t).createNode;lR(e,{get label(){return r()},onclick:()=>{n.editor?.update(()=>{eH([a()()])})},startIcon:e=>{var t=V(),n=I(t),r=e=>{oI(e,{get name(){return i()}})};W(n,e=>{i()&&e(r)}),H(e,t)},$$slots:{startIcon:!0}})}),H(e,i)},$$slots:{default:!0}})},a=M(()=>!n.useRichText),o=M(()=>Y(`_sui.insert`));PI(e,{get disabled(){return z(a)},get label(){return z(o)},endIcon:r,popup:i,$$slots:{endIcon:!0,popup:!0}})}k()}var Sfe=o((()=>{Z(),J(),X(),cY(),rc(),sI(),FI(),hR(),cR()}));function Cfe(e,t){O(t,!0);let n=Lt(`editorStore`),r=M(()=>n.selection.blockType===t.type),i=async()=>{if(!n.editor)return;await k0(n.editor);let[,e]=t.type.match(/^heading-(\d)$/)??[];e&&n.editor.update(()=>{pY(KV(),()=>$Q(`h${e}`))}),t.type===`paragraph`&&n.editor.update(()=>{pY(KV(),()=>FH())}),t.type===`bulleted-list`&&n.editor.dispatchCommand(CQ,void 0),t.type===`numbered-list`&&n.editor.dispatchCommand(wQ,void 0),t.type===`blockquote`&&n.editor.update(()=>{pY(KV(),()=>YQ())}),t.type===`code-block`&&n.editor.update(()=>{pY(KV(),()=>fZ())})};var a=V();no(I(a),()=>z(r),e=>{{let n=e=>{oI(e,{get name(){return a0[t.type].icon}})},a=M(()=>Y(`_sui.text_editor.${a0[t.type].labelKey}`));gR(e,{get label(){return z(a)},get checked(){return z(r)},onclick:()=>{z(r)||i()},startIcon:n,$$slots:{startIcon:!0}})}}),H(e,a),k()}var wfe=o((()=>{Z(),J(),Gz(),HZ(),TQ(),c$(),yY(),X(),cY(),rc(),sI(),vR(),u0(),A0()}));function Tfe(e,t){O(t,!0);let n=q(t,`disabled`,3,!1),r=q(t,`readonly`,3,!1),i=Lt(`editorStore`),a=M(()=>i.config.components.find(({id:e})=>l0.includes(e))),o=M(()=>i.config.components.filter(({id:e})=>!l0.includes(e))),s=M(()=>sT([`paragraph`,...i.config.enabledButtons.filter(e=>c0.includes(e))])),c=M(()=>sT(i.config.enabledButtons.filter(e=>s0.includes(e))));{let t=M(()=>n()||r()),l=M(()=>Y(`_sui.text_editor.text_editor`));q0(e,{get disabled(){return z(t)},get"aria-label"(){return z(l)},children:(e,t)=>{var n=f2(),r=I(n);{let e=e=>{{let t=M(()=>a0[i.selection.blockType??``]?.icon??`format_paragraph`);oI(e,{get name(){return z(t)}})}},t=e=>{{let t=M(()=>Y(`_sui.text_editor.text_style_options`));iR(e,{get"aria-label"(){return z(t)},children:(e,t)=>{var n=V();uo(I(n),16,()=>z(s),e=>e,(e,t)=>{Cfe(e,{get type(){return t}})}),H(e,n)},$$slots:{default:!0}})}},n=M(()=>!i.useRichText),a=M(()=>Y(`_sui.text_editor.show_text_style_options`));PI(r,{get disabled(){return z(n)},get"aria-label"(){return z(a)},get"aria-controls"(){return`${i.editorId??``}-lexical-root`},startIcon:e,popup:t,$$slots:{startIcon:!0,popup:!0}})}var l=L(r,2),u=e=>{var t=u2(),n=I(t);RI(n,{orientation:`vertical`});var r=L(n,2);{let e=M(()=>!i.useRichText);R0(r,{get disabled(){return z(e)}})}H(e,t)},d=e=>{var t=u2(),n=I(t),r=e=>{var t=u2(),n=I(t);RI(n,{orientation:`vertical`}),wse(L(n,2),{children:(e,t)=>{var n=V();uo(I(n),16,()=>z(c),e=>e,(e,t)=>{var n=V(),r=I(n),i=e=>{yfe(e,{})},a=e=>{hfe(e,{get type(){return t}})};W(r,e=>{t===`link`?e(i):e(a,-1)}),H(e,n)}),H(e,n)},$$slots:{default:!0}}),H(e,t)};W(n,e=>{z(c).length&&e(r)});var s=L(n,2),l=e=>{var t=d2(),n=I(t);RI(n,{orientation:`vertical`});var r=L(n,2),i=e=>{_fe(e,{get component(){return z(a)}})};W(r,e=>{z(a)&&e(i)});var s=L(r,2),c=e=>{xfe(e,{get components(){return z(o)}})};W(s,e=>{z(o).length&&e(c)}),H(e,t)};W(s,e=>{i.config.components.length&&e(l)}),H(e,t)};W(l,e=>{i.selection.blockType===`code-block`?e(u):e(d,-1)});var f=L(l,2);UI(f,{flex:!0});var p=L(f,2),m=e=>{{let t=e=>{oI(e,{name:`markdown`})},n=M(()=>!i.useRichText),r=M(()=>Y(`_sui.text_editor.edit_in_markdown`));wI(e,{iconic:!0,get disabled(){return i.hasConverterError},get pressed(){return z(n)},get"aria-label"(){return z(r)},onclick:()=>{i.useRichText=!i.useRichText,i.useRichText&&i.convertMarkdown()},startIcon:t,$$slots:{startIcon:!0}})}};W(p,e=>{i.config.modes.length>1&&e(m)}),H(e,n)},$$slots:{default:!0}})}k()}var u2,d2,f2,Efe=o((()=>{Z(),J(),X(),cT(),rc(),Ose(),EI(),HI(),qI(),sI(),FI(),cR(),u0(),V0(),gfe(),vfe(),bfe(),Sfe(),wfe(),Z0(),u2=B(`<!> <!>`,1),d2=B(`<!> <!> <!>`,1),f2=B(`<!> <!> <!> <!>`,1)}));function Dfe(e,t){O(t,!0),G(e,h2);let n=q(t,`value`,15,``),r=q(t,`flex`,3,!1),i=q(t,`dir`,3,void 0),a=q(t,`modes`,19,()=>[`rich-text`,`plain-text`]),o=q(t,`buttons`,19,()=>[...s0,...c0]),s=q(t,`components`,19,()=>[]),c=q(t,`useMarkdownShortcuts`,3,!0),l=q(t,`hidden`,3,!1),u=q(t,`disabled`,3,!1),d=q(t,`readonly`,3,!1),f=q(t,`required`,3,!1),p=q(t,`invalid`,3,!1),m=Gs(t,p2),h=I0();h.config={...h.config,modes:a(),enabledButtons:o(),components:s(),useMarkdownShortcuts:c()},Rt(`editorStore`,h),Qr(()=>{if(!h.initialized)return;let e=n();zi(()=>{h.inputValue=e})}),Qr(()=>{if(!h.initialized)return;let e=h.inputValue;zi(()=>{n()!==e&&n(e)})});var g=m2(),_=I(g);_s(_,()=>({...m,role:`none`,class:`sui text-editor`,hidden:l(),[bs]:{flex:r()}}),void 0,void 0,void 0,`svelte-1a6wb1w`);var v=F(_);Tfe(v,{get disabled(){return u()},get readonly(){return d()}});var y=L(v,2);{let e=M(()=>!h.useRichText||l());j0(y,{get hidden(){return z(e)},get disabled(){return u()},get readonly(){return d()},get required(){return f()},get invalid(){return p()}})}var b=L(y,2);{let e=M(()=>h.useRichText||l());t2(b,{autoResize:!0,get flex(){return r()},get dir(){return i()},get hidden(){return z(e)},get disabled(){return u()},get readonly(){return d()},get required(){return f()},get invalid(){return p()},get value(){return h.inputValue},set value(e){h.inputValue=e}})}D(_);var x=L(_,2),S=e=>{Bz(e,{get show(){return h.showConverterError},set show(e){h.showConverterError=e},children:(e,t)=>{cI(e,{status:`error`,children:(e,t)=>{gt();var n=ja();R(e=>U(n,e),[()=>Y(`_sui.text_editor.converter_error`)]),H(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}})};W(x,e=>{h.showConverterError&&e(S)}),H(e,g),k()}var p2,m2,h2,Ofe=o((()=>{Z(),J(),X(),rc(),lI(),o2(),Wz(),u0(),F0(),L0(),Efe(),p2=new Set([`$$slots`,`$$events`,`$$legacy`,`value`,`flex`,`dir`,`modes`,`buttons`,`components`,`useMarkdownShortcuts`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`children`]),m2=B(`<div><!> <!> <!></div> <!>`,1),h2={hash:`svelte-1a6wb1w`,code:`.text-editor.svelte-1a6wb1w {margin:var(--sui-focus-ring-width);width:calc(100% - var(--sui-focus-ring-width) * 2);}.text-editor.flex.svelte-1a6wb1w:not([hidden]) {display:block;}.text-editor.svelte-1a6wb1w .sui.text-area {margin:0 !important;width:100% !important;min-width:auto;}.text-editor.svelte-1a6wb1w .sui.text-area textarea {border-start-start-radius:0 !important;border-start-end-radius:0 !important;border-end-start-radius:var(--sui-textbox-border-radius) !important;border-end-end-radius:var(--sui-textbox-border-radius) !important;}`}}));function kfe(e,t){let n=Ma();O(t,!0),G(e,v2);let r=q(t,`value`,15),i=q(t,`invalid`,15,!1),a=q(t,`flex`,3,!1),o=q(t,`min`,3,void 0),s=q(t,`max`,3,void 0),c=q(t,`step`,3,1),l=q(t,`hidden`,3,!1),u=q(t,`disabled`,3,!1),d=q(t,`readonly`,3,!1),f=q(t,`required`,3,!1),p=Gs(t,g2),m=N(!1),h=N(``),g=M(()=>String(c()).split(`.`)[1]?.length||0),_=M(()=>typeof o()==`number`&&Number(z(h)||0)<=o()),v=M(()=>typeof s()==`number`&&Number(z(h)||0)>=s());Qr(()=>{let e=String(r()??``);zi(()=>{z(h)!==e&&P(h,e,!0)})}),Qr(()=>{let e=z(h).trim()?Number(z(h)):NaN;r(Number.isNaN(e)?void 0:e)}),Qr(()=>{z(m)&&i(f()&&(r()===void 0||z(h)===``)||z(h)!==void 0&&z(h)!==``&&(Number.isNaN(Number(z(h)))||typeof o()==`number`&&Number(z(h)||0)<o()||typeof s()==`number`&&Number(z(h)||0)>s()))});let y=()=>{z(_)||Number.isNaN(Number(z(h)))||P(h,Number(Number(z(h)||0)-c()).toFixed(z(g)),!0)},b=()=>{z(v)||Number.isNaN(Number(z(h)))||P(h,Number(Number(z(h)||0)+c()).toFixed(z(g)),!0)};var x=_2();let S;var C=F(x),w=F(C);{let e=e=>{var n=V(),r=I(n),i=e=>{var n=V();Co(I(n),()=>t.increaseIcon),H(e,n)},a=e=>{oI(e,{name:`expand_less`})};W(r,e=>{t.increaseIcon?e(i):e(a,-1)}),H(e,n)},i=M(()=>u()||d()||Number.isNaN(Number(r()))||z(v)),a=M(()=>Y(`_sui.number_input.increase`));wI(w,{iconic:!0,get disabled(){return z(i)},get"aria-label"(){return z(a)},get"aria-controls"(){return n},onclick:()=>{b()},startIcon:e,$$slots:{startIcon:!0}})}var T=L(w,2);{let e=e=>{var n=V(),r=I(n),i=e=>{var n=V();Co(I(n),()=>t.decreaseIcon),H(e,n)},a=e=>{oI(e,{name:`expand_more`})};W(r,e=>{t.decreaseIcon?e(i):e(a,-1)}),H(e,n)},i=M(()=>u()||d()||Number.isNaN(Number(r()))||z(_)),a=M(()=>Y(`_sui.number_input.decrease`));wI(T,{iconic:!0,get disabled(){return z(i)},get"aria-label"(){return z(a)},get"aria-controls"(){return n},onclick:()=>{y()},startIcon:e,$$slots:{startIcon:!0}})}D(C);var ee=L(C,2);{let e=M(()=>Number(r()||0)),c=M(()=>z(g)>0?`decimal`:`numeric`);hL(ee,Ks({dir:`ltr`},()=>p,{role:`spinbutton`,get id(){return n},spellcheck:`false`,get flex(){return a()},get hidden(){return l()},get disabled(){return u()},get readonly(){return d()},get required(){return f()},get invalid(){return i()},get"aria-valuenow"(){return z(e)},get"aria-valuemin"(){return o()},get"aria-valuemax"(){return s()},get inputmode(){return z(c)},onkeydown:e=>{let{key:t,ctrlKey:n,metaKey:r,altKey:i,shiftKey:a}=e,o=a||i||n||r;t===`ArrowDown`&&!o&&(e.preventDefault(),y()),t===`ArrowUp`&&!o&&(e.preventDefault(),b()),z(m)||P(m,!0)},oninput:()=>{z(m)||P(m,!0)},get onChange(){return t.onChange},get value(){return z(h)},set value(e){P(h,e,!0)}}))}D(x),R(()=>{S=as(x,1,`sui number-input ${t.class??``}`,`svelte-ggle2s`,S,{flex:a(),disabled:u(),readonly:d()}),K(x,`hidden`,l())}),H(e,x),k()}var g2,_2,v2,Afe=o((()=>{Z(),J(),X(),rc(),EI(),sI(),bL(),g2=new Set([`$$slots`,`$$events`,`$$legacy`,`value`,`invalid`,`flex`,`min`,`max`,`step`,`class`,`hidden`,`disabled`,`readonly`,`required`,`children`,`increaseIcon`,`decreaseIcon`,`onChange`]),_2=B(`<div role="none"><div role="none" class="buttons svelte-ggle2s"><!> <!></div> <!></div>`),v2={hash:`svelte-ggle2s`,code:`.number-input.svelte-ggle2s {display:inline-flex;align-items:center;margin:var(--sui-focus-ring-width);min-width:var(--sui-textbox-singleline-min-width);}.number-input.flex.svelte-ggle2s:not([hidden]) {display:inline-flex;width:-moz-available;width:-webkit-fill-available;width:stretch;min-width:0;}.number-input.svelte-ggle2s :not(:first-child) input {border-start-start-radius:0;border-end-start-radius:0;}.number-input.svelte-ggle2s :not(:last-child) input {border-start-end-radius:0;border-end-end-radius:0;}.number-input.svelte-ggle2s :not(.disabled) button[aria-disabled=true] {filter:grayscale(0) opacity(1);}.number-input.svelte-ggle2s :not(.disabled) button[aria-disabled=true] * {filter:grayscale(1) opacity(0.35);}.number-input.svelte-ggle2s .text-input {flex:auto;margin:0 !important;width:0;min-width:0 !important;}.buttons.svelte-ggle2s {display:flex;flex-direction:column;width:24px;height:var(--sui-textbox-height);}.buttons.svelte-ggle2s button {flex:none;margin:0 !important;border-width:1px;border-color:var(--sui-textbox-border-color);width:100%;height:50%;}.buttons.svelte-ggle2s button:first-of-type {border-block-start-width:1px;border-block-end-width:0;border-inline-end-width:0;border-inline-start-width:1px;border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0;}.buttons.svelte-ggle2s button:last-of-type {border-block-start-width:0;border-block-end-width:1px;border-inline-end-width:0;border-inline-start-width:1px;border-start-start-radius:0;border-start-end-radius:0;border-end-end-radius:0;}.buttons.svelte-ggle2s button .icon {font-size:20px;}`}}));function y2(e,t){let n=Ma();O(t,!0),G(e,S2);let r=q(t,`value`,15),i=q(t,`flex`,3,!1),a=q(t,`monospace`,3,!0),o=q(t,`hidden`,3,!1),s=q(t,`disabled`,3,!1),c=q(t,`readonly`,3,!1),l=q(t,`required`,3,!1),u=q(t,`invalid`,3,!1),d=Gs(t,b2),f=N(void 0),p=N(!1);var m=x2();let h;var g=F(m);hL(g,Ks({dir:`ltr`},()=>d,{get id(){return n},spellcheck:`false`,get flex(){return i()},get monospace(){return a()},get hidden(){return o()},get disabled(){return s()},get readonly(){return c()},get required(){return l()},get invalid(){return u()},get element(){return z(f)},set element(e){P(f,e,!0)},get value(){return r()},set value(e){r(e)}}));var _=L(g,2);{let e=e=>{var n=V(),r=I(n),i=e=>{var n=V();Co(I(n),()=>t.visibilityIcon),H(e,n)},a=e=>{{let t=M(()=>z(p)?`visibility_off`:`visibility`);oI(e,{get name(){return z(t)}})}};W(r,e=>{t.visibilityIcon?e(i):e(a,-1)}),H(e,n)},r=M(()=>s()||c()),i=M(()=>Y(z(p)?`_sui.secret_input.hide_secret`:`_sui.secret_input.show_secret`));wI(_,{iconic:!0,get disabled(){return z(r)},get pressed(){return z(p)},get"aria-label"(){return z(i)},get"aria-controls"(){return n},onclick:()=>{P(p,!z(p))},startIcon:e,$$slots:{startIcon:!0}})}D(m),R(()=>{h=as(m,1,`sui secret-input ${t.class??``}`,`svelte-1k1e5st`,h,{flex:i(),disabled:s(),readonly:c(),show:z(p)}),K(m,`hidden`,o())}),H(e,m),k()}var b2,x2,S2,jfe=o((()=>{Z(),J(),X(),EI(),sI(),bL(),b2=new Set([`$$slots`,`$$events`,`$$legacy`,`value`,`flex`,`monospace`,`class`,`hidden`,`disabled`,`readonly`,`required`,`invalid`,`children`,`visibilityIcon`]),x2=B(`<div role="none"><!> <!></div>`),S2={hash:`svelte-1k1e5st`,code:`.secret-input.svelte-1k1e5st {display:inline-flex;align-items:center;margin:var(--sui-focus-ring-width);min-width:var(--sui-textbox-singleline-min-width);}.secret-input.flex.svelte-1k1e5st:not([hidden]) {display:inline-flex;width:-moz-available;width:-webkit-fill-available;width:stretch;min-width:0;}.secret-input.show.svelte-1k1e5st input {-webkit-text-security:none;}.secret-input.svelte-1k1e5st .text-input {flex:auto;margin:0 !important;width:0;min-width:0 !important;}.secret-input.svelte-1k1e5st input {border-start-end-radius:0;border-end-end-radius:0;-webkit-text-security:disc;}.secret-input.svelte-1k1e5st button {flex:none;margin-block:0;margin-inline-start:-1px;margin-inline-end:0;border-width:1px;border-color:var(--sui-textbox-border-color);width:var(--sui-textbox-height);aspect-ratio:1/1;}.secret-input.svelte-1k1e5st button:last-child {border-start-start-radius:0;border-start-end-radius:4px;border-end-end-radius:4px;border-end-start-radius:0;}.secret-input.svelte-1k1e5st button .icon {font-size:var(--sui-font-size-xx-large);}`}}));function Mfe(e,t){O(t,!0),G(e,O2);let n=q(t,`orientation`,3,`horizontal`),r=Gs(t,C2),i=[`https://fonts.googleapis.com/css2?family=Merriweather+Sans:ital,wght@0,300..800;1,300..800&family=Noto+Sans+Mono:wght@100..900&display=swap`,`https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=block`],a=N(!1);tc(()=>{let e=globalThis.matchMedia(`(prefers-color-scheme: dark)`),{dataset:t}=document.documentElement,n=()=>{t.autoTheming!==`false`&&(t.theme=e.matches?`dark`:`light`)};n(),e.addEventListener(`change`,n);let r=globalThis.setTimeout(()=>{P(a,!0)},1e3);return()=>{e.removeEventListener(`change`,n),globalThis.clearTimeout(r)}});var o=D2();Uo(`yb9nh2`,e=>{var t=T2(),n=I(t);uo(L(n,8),16,()=>i,e=>e,(e,t)=>{var n=w2(),r=I(n),i=L(r,2);R(()=>{K(r,`href`,t),K(i,`href`,t)}),H(e,n)}),R(e=>K(n,`content`,e),[()=>[`width=device-width`,`initial-scale=1`,`maximum-scale=1`,`interactive-widget=resizes-content`].join(`, `)]),H(e,t)});var s=I(o),c=e=>{var t=E2();cs(t,``,{},{opacity:`0`}),H(e,t)};W(s,e=>{z(a)||e(c)});var l=L(s,2),u=e=>e.preventDefault(),d=e=>e.preventDefault(),f=e=>{if(document.documentElement.matches(`[data-env="dev"]`))return;let t=e.target;document.documentElement.matches(`[data-env="dev"]`)||t?.matches(`input, textarea`)&&`maxLength`in t||t?.closest(`[role="textbox"]`)?.contentEditable===`true`||e.preventDefault()};_s(l,()=>({...r,role:`none`,class:`sui app-shell ${n()??``}`,ondragover:u,ondrop:d,oncontextmenu:f}),void 0,void 0,void 0,`svelte-yb9nh2`),Co(F(l),()=>t.children??E),D(l),H(e,o),k()}var C2,w2,T2,E2,D2,O2,Nfe=o((()=>{Z(),J(),rc(),C2=new Set([`$$slots`,`$$events`,`$$legacy`,`orientation`,`children`]),w2=B(`<link rel="preload" as="style"/> <link rel="stylesheet"/>`,1),T2=B(`<meta name="viewport"/> <meta name="google" content="notranslate"/> <link rel="preconnect" href="https://fonts.googleapis.com"/> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous"/> <!>`,1),E2=B(`<div class="font-loader svelte-yb9nh2" aria-hidden="true">Loading <strong>Sveltia</strong> <em>UI</em> <span role="none" class="material-symbols-outlined">favorite</span></div>`),D2=B(`<!> <div><!></div>`,1),O2={hash:`svelte-yb9nh2`,code:`:root,
716
716
  :host {--sui-base-hue: 210;--sui-highlight-foreground-color: hsl(var(--sui-foreground-color-1-hsl));--sui-primary-foreground-color: hsl(var(--sui-foreground-color-2-hsl));--sui-secondary-foreground-color: hsl(var(--sui-foreground-color-3-hsl));--sui-tertiary-foreground-color: hsl(var(--sui-foreground-color-4-hsl));--sui-disabled-foreground-color: hsl(var(--sui-foreground-color-5-hsl));--sui-error-foreground-color: hsl(
717
717
  var(--sui-error-color-hue) var(--sui-alert-foreground-color-saturation)
718
718
  var(--sui-alert-foreground-color-lightness)
@@ -770,7 +770,7 @@ _$3_$4`).replace(/(\s+)\*\*([^*\n]+?)\n([^*\n]+?)\*\*(\s+)/gm,`$1**$2**
770
770
  @media (prefers-reduced-motion) {*,
771
771
  ::before,
772
772
  ::after {scroll-behavior:auto;transition-duration:1ms !important;}
773
- }::selection {background-color:var(--sui-primary-accent-color-translucent);}* {-webkit-tap-highlight-color:transparent;}:focus {z-index:1;outline-width:0;}:focus-visible {outline-color:var(--sui-primary-accent-color-translucent);z-index:2;}h1 {margin:var(--sui-h1-margin, var(--sui-heading-margin));font-size:var(--sui-h1-font-size, 32px);font-family:var(--sui-h1-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h1-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h1-line-height, var(--sui-heading-line-height));}h2 {margin:var(--sui-h2-margin, var(--sui-heading-margin));font-size:var(--sui-h2-font-size, 28px);font-family:var(--sui-h2-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h2-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h2-line-height, var(--sui-heading-line-height));}h3 {margin:var(--sui-h3-margin, var(--sui-heading-margin));font-size:var(--sui-h3-font-size, 24px);font-family:var(--sui-h3-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h3-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h3-line-height, var(--sui-heading-line-height));}h4 {margin:var(--sui-h4-margin, var(--sui-heading-margin));font-size:var(--sui-h4-font-size, 20px);font-family:var(--sui-h4-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h4-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h4-line-height, var(--sui-heading-line-height));}h5 {margin:var(--sui-h5-margin, var(--sui-heading-margin));font-size:var(--sui-h5-font-size, 16px);font-family:var(--sui-h5-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h5-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h5-line-height, var(--sui-heading-line-height));}h6 {margin:var(--sui-h6-margin, var(--sui-heading-margin));font-size:var(--sui-h6-font-size, 12px);font-family:var(--sui-h6-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h6-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h6-line-height, var(--sui-heading-line-height));}strong {font-weight:var(--sui-font-weight-bold, bold);}a {color:var(--sui-primary-accent-color-text);text-decoration:none;text-underline-offset:2px;}a:is(:hover, :focus, :active) {text-decoration:underline;}:is(:root, :host)[data-underline-links=true].svelte-j94h5n a {text-decoration:underline;}:is(p, ul, ol, dl) {margin:var(--sui-paragraph-margin) 0;line-height:var(--sui-line-height-comfortable);}:is(ul, ol) {padding-inline:2em;}:is(code, pre) {border-radius:4px;background-color:var(--sui-code-background-color);font-family:var(--sui-font-family-monospace);font-size:var(--sui-font-size-monospace);vertical-align:-0.05em;}pre {padding:8px;line-height:var(--sui-line-height-compact);-webkit-user-select:text;user-select:text;}code {padding:2px 4px;}table {border-collapse:collapse;}:is(th, td) {border:1px solid var(--sui-textbox-border-color);padding:8px;}blockquote {margin-inline:16px 0;border-inline-start:4px solid var(--sui-textbox-border-color);padding-inline-start:12px;}:is(.disabled, .readonly, [aria-disabled=true], [aria-readonly=true], [inert]):not(body) {cursor:default;pointer-events:none;-webkit-user-select:none;user-select:none;filter:grayscale(1) opacity(0.35);}:is(.disabled, .readonly, [aria-disabled=true], [aria-readonly=true], [inert]):not(body) * {filter:grayscale(0) opacity(1);}:is(.disabled, .readonly, [aria-disabled=true], [aria-readonly=true], [inert]) * {cursor:default;pointer-events:none;-webkit-user-select:none;user-select:none;}.font-loader.svelte-j94h5n {position:absolute;inset-inline-start:-99999px;font-family:var(--sui-font-family-default);}.app-shell.svelte-j94h5n {position:fixed;inset:0;overflow:hidden;width:100%;height:100%;color:var(--sui-primary-foreground-color);background-color:var(--sui-primary-background-color);font-family:var(--sui-font-family-default);font-size:var(--sui-font-size-default);font-weight:var(--sui-font-weight-normal, normal);word-spacing:var(--sui-word-spacing-normal);-webkit-user-select:none;user-select:none;touch-action:none;cursor:default;}.app-shell.horizontal.svelte-j94h5n {display:flex;flex-direction:row;overflow:hidden;}.app-shell.vertical.svelte-j94h5n {display:flex;flex-direction:column;overflow:hidden;}`}}));function k2(e,t){G(e,j2);let n=q(t,`children`,3,void 0);var r=A2();Co(F(r),()=>n()??E),D(r),H(e,r)}var A2,j2,Pfe=o((()=>{Z(),J(),A2=B(`<div role="none" class="sui empty-state svelte-1v7oyxc"><!></div>`),j2={hash:`svelte-1v7oyxc`,code:`.empty-state.svelte-1v7oyxc {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:16px;width:100%;height:100%;text-align:center;}`}}));function M2(e,t){G(e,F2);let n=q(t,`hidden`,3,!1),r=q(t,`disabled`,3,!1),i=Gs(t,N2);var a=P2();_s(a,()=>({...i,role:`group`,class:`sui group ${t.class??``}`,hidden:n(),"aria-hidden":n(),"aria-disabled":r()}),void 0,void 0,void 0,`svelte-no0prm`);var o=F(a);Co(F(o),()=>t.children??E),D(o),D(a),R(()=>o.inert=r()),H(e,a)}var N2,P2,F2,Ffe=o((()=>{Z(),J(),N2=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`children`]),P2=B(`<div><div role="none" class="inner svelte-no0prm"><!></div></div>`),F2={hash:`svelte-no0prm`,code:`.inner.svelte-no0prm {display:contents;}`}})),Ife=o((()=>{})),$=o((()=>{Loe(),lI(),vse(),Cse(),Ose(),EI(),Mse(),Bse(),Hse(),qse(),Z(),J(),X(),Oh(),HI(),qI(),sI(),Yse(),Xse(),Zse(),Qse(),uL(),$se(),xI(),ece(),tce(),nce(),rce(),ace(),qL(),oce(),rR(),FI(),vR(),sce(),hR(),cR(),lce(),uce(),dce(),fce(),pce(),mce(),hce(),oz(),Cce(),lz(),Tce(),Ece(),Dce(),kce(),jce(),Nce(),Fce(),Lce(),mfe(),Ofe(),Afe(),bL(),$R(),jfe(),o2(),Wz(),K0(),hI(),Nfe(),Pfe(),Ffe(),Ife(),Ioe()})),I2,L2,R2,z2,B2,V2=o((()=>{Xw(),Np(),I2=l(UO(),1),SN(),L2=(e,t,n,r)=>{let i=xN(t),a={};return e.forEach(e=>{let t=n(e),o=t==null?r:i?String(t).match(i)?.[0]??r:String(t);o in a||(a[o]=[]),a[o].push(e)}),Object.entries(a).sort(([e],[t])=>Mp(e,t))},R2=(e,t,n)=>n?n.test(String(e??``)):e===t,z2=(e,t,n,r)=>{let i=e.map(e=>({item:e,key:t(e)}));return i.sort(({key:e},{key:t})=>n?Mp(e,t):e-t),r===`descending`&&i.reverse(),e.splice(0,e.length,...i.map(({item:e})=>e)),e},B2=async(e,t,n)=>{let{databaseName:r}=e??{},i=r?new qw(r,`ui-settings`):null,a=await i?.get(t)??{};n.set(a);let o=a;n.subscribe(e=>{(0,I2.default)(e,o)||(o=e,(async()=>{try{await i?.set(t,e)}catch{}})())})}})),H2,Lfe=o((()=>{yT(),V2(),SN(),H2=(e,{field:t,pattern:n}={field:``,pattern:``})=>{if(!t)return e;if(t===`fileType`)return e.filter(({path:e})=>vT(e)===n);let r=xN(n);return e.filter(e=>{let i=e[t];return R2(i,n,r)})}})),U2,Rfe=o((()=>{X(),V2(),U2=(e,{field:t,pattern:n}={field:``,pattern:void 0})=>{if(!t)return e.length?{"*":e}:{};let r=Y(`other`);return Object.fromEntries(L2(e,n,e=>e[t],r))}})),W2,G2,K2,zfe=o((()=>{W2=l(UO(),1),qp(),cm(),i4(),V2(),G2=ln(),K2=async({repository:e})=>{await B2(e,`assets-view`,G2),tm.subscribe(e=>{let t=A(G2)?.[e?.internalPath??`*`]??structuredClone(e4);(0,W2.default)(t,A(t4))||t4.set(t)}),t4.subscribe(e=>{let t=A(tm)?.internalPath??`*`;(0,W2.default)(e,A(G2)?.[t]??{})||G2.update(n=>({...n,[t]:e}))})}})),q2,J2,Bfe=o((()=>{V2(),q2=(e,t)=>{let{commitAuthor:{name:n,login:r,email:i}={},commitDate:a}=e;return t===`commit_author`?n||r||i:t===`commit_date`?a:t===`name`?e.name.split(`.`)[0]:e[t]??``},J2=(e,{key:t,order:n}={})=>{if(!t||!n)return e;let r=[...e],i={commit_author:String,commit_date:Date}[t]||r[0]?.[t]?.constructor||String;return z2(r,e=>{let n=q2(e,t);return i===String?n??``:Number(n??0)},i===String,n),r}})),Y2,X2,Z2,Q2,$2,e4,t4,n4,r4,i4=o((()=>{X(),Y2=l(UO(),1),qp(),$F(),cm(),Lfe(),Rfe(),zfe(),Bfe(),wA(),dw(),EC(),JO(),X2=ln(!1),Z2=ln(!1),Q2=un([WF],([e],t)=>{t(!!e.files.length)}),$2=({label:e,collectionName:t,fileName:n,internalPath:r})=>{if(e)return e;if(t===void 0)return Y(r===void 0?`all_assets`:`global_assets`);let i=cw(t),a=i?lw(i):t;if(!n)return a;let o=i?xC(i,n):void 0;return`${a} › ${o?SC(o):n}`},e4={type:`grid`,showInfo:!0,sort:{key:`name`,order:`ascending`}},t4=ln({type:`grid`,showInfo:!0}),n4=un([LF,tm],([e,t],n)=>{e&&t&&t.internalPath!==void 0?n(e.filter(({folder:e})=>(0,Y2.default)(e,t))):n(e?[...e]:[])}),r4=un([n4,t4],([e,t],n)=>{let r=[...e];r=J2(r,t.sort),r=H2(r,t.filter);let i=U2(r,t.group);(0,Y2.default)(A(r4),i)||n(i)}),SA.subscribe(e=>{e&&!A(G2)&&K2(e)}),n4.subscribe(e=>{VF.set([]),qO.devModeEnabled&&console.info(`listedAssets`,e)})})),a4,o4,s4,c4,l4,u4,d4,f4=o((()=>{qp(),a4=ln(!1),o4=ln(!1),s4=ln({show:!1,multiple:!1}),c4=ln({id:void 0,show:!1,status:`success`,message:void 0,count:1,sourceLanguage:void 0}),l4=ln(null),u4=ln(null),d4=ln()})),p4,m4=o((()=>{p4=(e,{noopener:t=!0}={})=>{if(!e)return null;let n=t?`noopener,noreferrer`:``;return window.open(e,`_blank`,n)}})),h4,g4,_4,v4,y4,b4,x4,S4,C4,w4,T4=o((()=>{Kw(),rc(),qp(),i4(),AF(),f4(),m4(),h4=un([a4,X2],([e,t])=>e||t),g4=ln(``),_4=ln(``),v4=(e=window.location.href)=>{let{origin:t,hash:n}=new URL(e),{pathname:r,searchParams:i}=new URL(`${t}${n.substring(1)}`);return{path:decodeURIComponent(r),params:Object.fromEntries([...new Set(i.keys())].map(e=>[e,i.getAll(e).join(`,`)]))}},y4=null,b4=(e,t)=>{if(!document.startViewTransition||y4){t();return}let n={types:[e],update:async()=>{t(),await Gw(50),await new Promise(e=>{Hn(()=>{e(void 0)})})}};try{y4=document.startViewTransition(n),y4.finished.finally(()=>{y4=null})}catch{t()}},x4=(e,t,n)=>{let{isTrusted:r,oldURL:i,newURL:a}=e;if(!r){t();return}let o=v4(i).path,s=v4(a).path,c=n.test(o)&&n.test(s),l=o.split(`/`).length,u=s.split(`/`).length;b4(c&&l>u?`backwards`:c&&l<u?`forwards`:`unknown`,()=>t())},S4=async(e,{state:t={},replaceState:n=!1,notifyChange:r=!0,transitionType:i=`unknown`}={})=>{let{path:a}=v4();if(a===e&&!Object.keys(t).length&&!n)return;let{origin:o,pathname:s,hash:c}=window.location,l=`${o}${s}${c}`,u=`${o}${s}#${e}`,d=[{...t,from:l},``,u];n?window.history.replaceState(...d):window.history.pushState(...d),r&&b4(i,()=>{window.dispatchEvent(new HashChangeEvent(`hashchange`,{oldURL:l,newURL:u}))})},C4=(e,t={})=>{let n=`backwards`;window.history.state?.from?b4(n,()=>{window.history.back()}):S4(e,{...t,transitionType:n})},w4=()=>{let{display_url:e,_siteURL:t}=A(TF);p4(e||t||`/`)}})),E4,D4,O4,k4,A4,j4,M4,N4,P4,F4,I4,L4,R4=o((()=>{J(),X(),f(),Xw(),qp(),T4(),wA(),AF(),vC(),ID(),JO(),E4=/^\/signin\/(?<encodedData>.+)/,D4=br({signInError:{message:``,context:`authentication`},unauthenticated:!0,signingIn:!1}),O4=async()=>{await Yw.set(`sveltia-cms.user`,{}),FD.account=void 0,D4.unauthenticated=!0},k4=async e=>{(typeof e?.cause?.status==`number`||e?.message===`Not a collaborator of the repository`)&&await O4()},A4=()=>{D4.signInError={message:``,context:`authentication`}},j4=(e,t=`authentication`)=>{let n=e.cause?.message||Y(`unexpected_error`);e.name===`NotFoundError`&&(n=Y(`sign_in_error.not_project_root`)),e.name===`AbortError`&&(n=Y(A(xA)===`local`?`sign_in_error.picker_dismissed`:`sign_in_error.authentication_aborted`)),D4.signInError={message:n,context:t},console.error(e.name,e.message,e.cause)},M4=()=>{let{path:e}=v4(),{encodedData:t}=e.match(E4)?.groups??{};if(!t)return{_user:void 0,copiedPrefs:void 0};S4(``,{replaceState:!0});let n,r;try{let e=JSON.parse(atob(t));u(e)&&typeof e.token==`string`&&(n={token:e.token},u(e.prefs)&&(r=e.prefs))}catch{}return{_user:n,copiedPrefs:r}},N4=async()=>{let e=await Yw.get(`sveltia-cms.user`)||await Yw.get(`decap-cms-user`)||await Yw.get(`netlify-cms-user`);return u(e)&&typeof e.backendName==`string`?e:void 0},P4=e=>{let t=e?.backendName===`local`||e?.backendName===`proxy`?`local`:A(TF).backend.name;return xA.set(t),A(SA)},F4=async()=>{A4();let e,t;if({_user:e,copiedPrefs:t}=M4(),e??=await N4(),!e)return;let n=P4(e);if(e&&n){FD.account=e;let{token:t,refreshToken:r}=e;D4.signingIn=!0;try{e=await n.signIn({token:t,refreshToken:r,auto:!0})}catch{e=void 0,FD.account=void 0}}if(D4.signingIn=!1,D4.unauthenticated=!e,!(!e||!n)){FD.account=e,t&&Object.assign(qO,t);try{await n.fetchFiles()}catch(e){[401,403,404].includes(e.cause?.status)?D4.unauthenticated=!0:j4(e,`dataFetch`),await k4(e)}}},I4=async(e,t)=>{A4(),xA.set(e);let n=A(SA);if(!n)return;let r;D4.signingIn=!0;try{r=await n.signIn({token:t,auto:!1})}catch(e){D4.signingIn=!1,D4.unauthenticated=!0,t&&e.cause?.status===401?j4(Error(`Invalid token`,{cause:{message:Y(`sign_in_error.invalid_token`)}})):j4(e);return}if(D4.signingIn=!1,D4.unauthenticated=!r,r){FD.account=r;try{await n.fetchFiles()}catch(e){j4(e,`dataFetch`),await k4(e)}}},L4=async()=>{await A(SA)?.signOut(),await O4(),xA.set(void 0),dC.set(!1);let e=A(TF)?.logout_redirect_url;e&&(window.location.href=e)}}));function z4(e,t){O(t,!0),G(e,q4);let n=()=>j(TF,`$cmsConfig`,r),[r,i]=mn(),a=N(!1),o=N(``),s=M(()=>n()?.backend),c=M(()=>z(s).name),l=M(()=>z(c)?_A[z(c)]:null),u=M(()=>z(c)===`test-repo`),d=M(()=>z(u)?void 0:z(s)?.repo?.split(`/`).pop()),f=M(()=>bE.isLocalHost&&!z(u)),p=M(()=>!z(u)&&z(s).auth_methods?.includes(`token`)===!1),m=M(()=>z(c)===`gitea`&&z(s).base_url===`https://codeberg.org`?`Codeberg`:z(l)?.label),h=M(()=>!z(u)&&z(s).auth_methods?.includes(`oauth`)===!1||z(c)===`gitea`&&!z(s).app_id);tc(()=>{D4.signInError.message||F4()});var g=K4(),_=I(g),v=F(_),y=e=>{var t=B4(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>Y(`signing_in`)]),H(e,t)},b=e=>{var t=U4(),n=I(t),r=e=>{var t=U4(),n=I(t);{let e=M(()=>Y(`work_with_local_repo`)),t=M(()=>!bE.isLocalBackendSupported);wI(n,{variant:`primary`,get label(){return z(e)},get disabled(){return z(t)},onclick:async()=>{await I4(`local`)}})}var r=L(n,2),i=e=>{var t=V4(),n=F(t),r=e=>{var t=V();yo(I(t),()=>yP(Y(`local_workflow.disabled`),`https://sveltiacms.app/en/docs/workflows/local#enabling-file-system-access-api-in-brave`)),H(e,t)},i=e=>{var t=ja();R(e=>U(t,e),[()=>Y(`local_workflow.unsupported_browser`)]),H(e,t)};W(n,e=>{bE.isBrave?e(r):e(i,-1)}),D(t),H(e,t)},a=e=>{var t=H4(),n=F(t),r=e=>{var t=ja();R(e=>U(t,e),[()=>Y(`work_with_local_repo_description`,{values:{repo:z(d)}})]),H(e,t)},i=e=>{var t=ja();R(e=>U(t,e),[()=>Y(`work_with_local_repo_description_no_repo`)]),H(e,t)};W(n,e=>{z(d)?e(r):e(i,-1)}),D(t),H(e,t)};W(r,e=>{bE.isLocalBackendSupported?D4.signInError.message||e(a,1):e(i)}),UI(L(r,2),{}),H(e,t)};W(n,e=>{z(f)&&e(r)});var i=L(n,2);{let e=M(()=>z(f)?`secondary`:`primary`),t=M(()=>z(u)?Y(`work_with_test_repo`):Y(`sign_in_with_x`,{values:{service:z(m)}}));wI(i,{get variant(){return z(e)},get label(){return z(t)},get disabled(){return z(h)},onclick:async()=>{await I4(z(c))}})}var o=L(i,2),s=e=>{{let t=M(()=>Y(`sign_in_using_access_token`,{values:{service:z(m)}}));wI(e,{variant:`secondary`,get label(){return z(t)},get disabled(){return z(p)},onclick:()=>{P(a,!0)}})}};W(o,e=>{z(u)||e(s)}),H(e,t)};W(v,e=>{D4.signingIn?e(y):z(l)&&e(b,1)});var x=L(v,2),S=e=>{var t=W4(),n=F(t);oI(n,{name:`error`});var r=L(n);D(t),R(()=>U(r,` ${D4.signInError.message??``}`)),H(e,t)};W(x,e=>{D4.signInError.message&&D4.signInError.context===`authentication`&&e(S)}),D(_);var C=L(_,2);{let e=M(()=>Y(`sign_in_using_access_token`)),t=M(()=>({spellcheck:!1,"aria-label":Y(`personal_access_token`)})),n=M(()=>Y(`sign_in`)),r=M(()=>!z(o).trim());xL(C,{get title(){return z(e)},get textboxAttrs(){return z(t)},get okLabel(){return z(n)},get okDisabled(){return z(r)},onOk:async()=>{await I4(z(c),z(o).trim())},get open(){return z(a)},set open(e){P(a,e,!0)},get value(){return z(o)},set value(e){P(o,e,!0)},children:(e,t)=>{gt();var n=G4(),r=I(n),i=L(r),a=e=>{var t=V();yo(I(t),()=>yP(Y(`sign_in_using_access_token_link`,{values:{service:z(m)}}),z(l).repository.tokenPageURL)),H(e,t)};W(i,e=>{z(l)?.repository?.tokenPageURL&&e(a)}),R(e=>U(r,`${e??``} `),[()=>Y(`sign_in_using_access_token_description`)]),H(e,n)},$$slots:{default:!0}})}H(e,g),k(),i()}var B4,V4,H4,U4,W4,G4,K4,q4,Vfe=o((()=>{Z(),J(),X(),$(),rc(),wA(),AF(),R4(),SE(),bP(),B4=B(`<div role="alert" class="message svelte-1ff54ya"> </div>`),V4=B(`<div role="alert" class="svelte-1ff54ya"><!></div>`),H4=B(`<div role="none"><!></div>`),U4=B(`<!> <!> <!>`,1),W4=B(`<div role="alert" class="error iconic svelte-1ff54ya"><!> </div>`),G4=B(` <!>`,1),K4=B(`<div role="none" class="buttons svelte-1ff54ya"><!> <!></div> <!>`,1),q4={hash:`svelte-1ff54ya`,code:`.buttons.svelte-1ff54ya {display:flex;flex-direction:column;align-items:center;gap:12px;.button {width:320px;}}[role='alert'].svelte-1ff54ya {&.iconic {display:flex;align-items:center;gap:8px;}&.error {color:var(--sui-error-foreground-color);}}`}})),J4,Hfe=o((()=>{J4=`<svg viewBox="0 0 800 800" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="400" x2="400" y1="0" y2="800"><stop offset="0" stop-color="#f0980b"/><stop offset="1" stop-color="#ff1d00"/></linearGradient><clipPath id="b"><rect height="800" rx="80" width="800"/></clipPath><rect fill="url(#a)" height="800" rx="80" width="800"/><g style="clip-path:url(#b);fill:none;stroke:#fff;stroke-linecap:round;stroke-linejoin:round;stroke-width:180"><path d="m320-80-200 320 200 320-200 320"/><path d="m400 240 200 320 200-320"/></g></svg>`})),Y4,X4,Z4,Q4,$4,e3,t3,n3,r3,i3=o((()=>{Gp(),aT(),qp(),Hfe(),AF(),GM(),Y4=/^data:(image\/[a-zA-Z0-9.+-]+);base64,/,X4=`Sveltia CMS`,Z4=`data:image/svg+xml;base64,${btoa(J4)}`,Q4=un([TF],([e])=>e?.app_title||`Sveltia CMS`),$4=un([TF],([e])=>e?.logo?.src||e?.logo_url||Z4),e3=un($4,e=>{let t=e.match(Y4);return t?t[1]:iT.getType(e)??void 0}),t3=async(e,t)=>`data:image/webp;base64,${await Up(await UM(e,t))}`,n3=un([$4],([e],t)=>{(async()=>{try{let n=await fetch(e);if(!n.ok)throw Error(`Failed to fetch logo`);let r=await n.blob(),[i,a]=await Promise.all([t3(r,{...zM,width:192,height:192}),t3(r,zM)]);t({small:i,large:a})}catch{t(void 0)}})()}),r3=un([Q4,n3],([e,t])=>{if(!t)return;let{origin:n,pathname:r}=window.location,i={name:e,short_name:e,start_url:`${n}${r}`,display:`standalone`,icons:[{src:t.small,sizes:`192x192`,type:`image/webp`},{src:t.large,sizes:`512x512`,type:`image/webp`}]},a=new Blob([JSON.stringify(i)],{type:`application/manifest+json`});return URL.createObjectURL(a)})}));function Ufe(e,t){O(t,!0),G(e,m3);let n=()=>j(OF,`$cmsConfigLoaded`,u),r=()=>j(Q4,`$appTitle`,u),i=()=>j($4,`$appLogoURL`,u),a=()=>j(DF,`$cmsConfigErrors`,u),o=()=>j(TF,`$cmsConfig`,u),s=()=>j(XD,`$inAuthPopup`,u),c=()=>j(dC,`$dataLoaded`,u),l=()=>j(fC,`$dataLoadedProgress`,u),[u,d]=mn();Qr(()=>{n()&&pn(_4,Y(`welcome_message`,{values:{name:r()}}))});var f=p3(),p=I(f),m=F(p),h=F(m),g=e=>{var t=o3(),n=I(t),a=L(n,2),o=F(a,!0);D(a),R(()=>{K(n,`src`,i()),U(o,r())}),H(e,t)};W(h,e=>{n()&&e(g)});var _=L(h,2),v=e=>{var t=c3(),n=F(t),r=F(n,!0);D(n);var i=L(n,2);uo(i,5,a,e=>e,(e,t)=>{var n=s3(),r=F(n);a3(r,()=>z(t)),D(n),H(e,n)}),D(i),D(t),R(e=>U(r,e),[()=>Y(`config.errors`,{values:{count:a().length}})]),H(e,t)},y=e=>{var t=l3(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>Y(`prefs.error.${KO.current.type}`)]),H(e,t)},b=e=>{var t=l3(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>Y(`loading_cms_config`)]),H(e,t)},x=M(()=>!o()||!Object.keys(qO).length),S=e=>{var t=u3(),n=I(t),r=F(n),i=F(r,!0);D(r);var a=L(r,2),o=F(a);a3(o,()=>D4.signInError.message),D(a),D(n),z4(L(n,2),{}),R(e=>U(i,e),[()=>Y(`loading_site_data_error`)]),H(e,t)},C=e=>{var t=l3(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>Y(`authorizing`)]),H(e,t)},w=e=>{z4(e,{})},T=e=>{var t=d3(),n=I(t),r=F(n,!0);D(n);var i=L(n,2),a=e=>{cce(e,{get now(){return l()}})};W(i,e=>{l()!==void 0&&e(a)}),R(e=>U(r,e),[()=>Y(`loading_site_data`)]),H(e,t)};W(_,e=>{a().length?e(v):KO.current?e(y,1):z(x)?e(b,2):D4.signInError.message&&D4.signInError.context===`dataFetch`?e(S,3):s()?e(C,4):!FD.account||D4.unauthenticated?e(w,5):c()||e(T,6)}),D(m),D(p);var ee=L(p,2),te=e=>{var t=f3(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>Y(`powered_by`,{values:{name:X4}})]),H(e,t)};W(ee,e=>{n()&&r()!==`Sveltia CMS`&&e(te)}),H(e,f),k(),d()}var a3,o3,s3,c3,l3,u3,d3,f3,p3,m3,Wfe=o((()=>{Z(),J(),X(),$(),dx(),GS(),Vfe(),i3(),T4(),sO(),AF(),vC(),ID(),R4(),JO(),a3=(e,t=E)=>{var n=V();yo(I(n),()=>ux(Sx.parseInline(t()),{ALLOWED_TAGS:[`a`,`code`],ALLOWED_ATTR:[`href`]})),H(e,n)},o3=B(`<img alt="" class="logo svelte-7ua6x9"/> <h1 class="svelte-7ua6x9"> </h1>`,1),s3=B(`<li><!></li>`),c3=B(`<div role="alert" class="message"><div role="none"> </div> <ul class="error svelte-7ua6x9"></ul></div>`),l3=B(`<div role="alert" class="message"> </div>`),u3=B(`<div role="alert"><div role="none" class="message"> </div> <div role="none" class="error svelte-7ua6x9"><!></div></div> <!>`,1),d3=B(`<div role="alert" class="message"> </div> <!>`,1),f3=B(`<div role="none" class="powered-by svelte-7ua6x9"> </div>`),p3=B(`<div role="none" class="container svelte-7ua6x9"><div role="none" class="inner svelte-7ua6x9"><!> <!></div></div> <!>`,1),m3={hash:`svelte-7ua6x9`,code:`.container.svelte-7ua6x9 {position:absolute;inset:0;z-index:101;flex:auto;display:flex;justify-content:center;align-items:center;gap:16px;padding:32px;.inner:where(.svelte-7ua6x9) {display:flex;flex-direction:column;align-items:center;gap:32px;min-width:240px;max-width:800px;min-height:240px;}.logo:where(.svelte-7ua6x9) {width:auto;height:160px;
773
+ }::selection {background-color:var(--sui-primary-accent-color-translucent);}* {-webkit-tap-highlight-color:transparent;}:focus {z-index:1;outline-width:0;}:focus-visible {outline-color:var(--sui-primary-accent-color-translucent);z-index:2;}h1 {margin:var(--sui-h1-margin, var(--sui-heading-margin));font-size:var(--sui-h1-font-size, 32px);font-family:var(--sui-h1-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h1-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h1-line-height, var(--sui-heading-line-height));}h2 {margin:var(--sui-h2-margin, var(--sui-heading-margin));font-size:var(--sui-h2-font-size, 28px);font-family:var(--sui-h2-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h2-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h2-line-height, var(--sui-heading-line-height));}h3 {margin:var(--sui-h3-margin, var(--sui-heading-margin));font-size:var(--sui-h3-font-size, 24px);font-family:var(--sui-h3-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h3-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h3-line-height, var(--sui-heading-line-height));}h4 {margin:var(--sui-h4-margin, var(--sui-heading-margin));font-size:var(--sui-h4-font-size, 20px);font-family:var(--sui-h4-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h4-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h4-line-height, var(--sui-heading-line-height));}h5 {margin:var(--sui-h5-margin, var(--sui-heading-margin));font-size:var(--sui-h5-font-size, 16px);font-family:var(--sui-h5-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h5-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h5-line-height, var(--sui-heading-line-height));}h6 {margin:var(--sui-h6-margin, var(--sui-heading-margin));font-size:var(--sui-h6-font-size, 12px);font-family:var(--sui-h6-font-family, var(--sui-heading-font-family));font-weight:var(--sui-h6-font-weight, var(--sui-heading-font-weight));line-height:var(--sui-h6-line-height, var(--sui-heading-line-height));}strong {font-weight:var(--sui-font-weight-bold, bold);}a {color:var(--sui-primary-accent-color-text);text-decoration:none;text-underline-offset:2px;}a:is(:hover, :focus, :active) {text-decoration:underline;}:is(:root, :host)[data-underline-links=true].svelte-yb9nh2 a {text-decoration:underline;}:is(p, ul, ol, dl) {margin:var(--sui-paragraph-margin) 0;line-height:var(--sui-line-height-comfortable);}:is(ul, ol) {padding-inline:2em;}:is(code, pre) {border-radius:4px;background-color:var(--sui-code-background-color);font-family:var(--sui-font-family-monospace);font-size:var(--sui-font-size-monospace);vertical-align:-0.05em;}pre {padding:8px;line-height:var(--sui-line-height-compact);-webkit-user-select:text;user-select:text;}code {padding:2px 4px;}table {border-collapse:collapse;}:is(th, td) {border:1px solid var(--sui-textbox-border-color);padding:8px;}blockquote {margin-inline:16px 0;border-inline-start:4px solid var(--sui-textbox-border-color);padding-inline-start:12px;}:is(.disabled, .readonly, [aria-disabled=true], [aria-readonly=true], [inert]):not(body) {cursor:default;pointer-events:none;-webkit-user-select:none;user-select:none;filter:grayscale(1) opacity(0.35);}:is(.disabled, .readonly, [aria-disabled=true], [aria-readonly=true], [inert]):not(body) * {filter:grayscale(0) opacity(1);}:is(.disabled, .readonly, [aria-disabled=true], [aria-readonly=true], [inert]) * {cursor:default;pointer-events:none;-webkit-user-select:none;user-select:none;}.font-loader.svelte-yb9nh2 {position:absolute;inset-inline-start:-99999px;font-family:var(--sui-font-family-default);}.app-shell.svelte-yb9nh2 {position:fixed;inset:0;overflow:hidden;width:100%;height:100%;color:var(--sui-primary-foreground-color);background-color:var(--sui-primary-background-color);font-family:var(--sui-font-family-default);font-size:var(--sui-font-size-default);font-weight:var(--sui-font-weight-normal, normal);word-spacing:var(--sui-word-spacing-normal);-webkit-user-select:none;user-select:none;touch-action:none;cursor:default;}.app-shell.horizontal.svelte-yb9nh2 {display:flex;flex-direction:row;overflow:hidden;}.app-shell.vertical.svelte-yb9nh2 {display:flex;flex-direction:column;overflow:hidden;}`}}));function k2(e,t){G(e,j2);let n=q(t,`children`,3,void 0);var r=A2();Co(F(r),()=>n()??E),D(r),H(e,r)}var A2,j2,Pfe=o((()=>{Z(),J(),A2=B(`<div role="none" class="sui empty-state svelte-1az4py5"><!></div>`),j2={hash:`svelte-1az4py5`,code:`.empty-state.svelte-1az4py5 {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:16px;width:100%;height:100%;text-align:center;}`}}));function M2(e,t){G(e,F2);let n=q(t,`hidden`,3,!1),r=q(t,`disabled`,3,!1),i=Gs(t,N2);var a=P2();_s(a,()=>({...i,role:`group`,class:`sui group ${t.class??``}`,hidden:n(),"aria-hidden":n(),"aria-disabled":r()}),void 0,void 0,void 0,`svelte-jh52uf`);var o=F(a);Co(F(o),()=>t.children??E),D(o),D(a),R(()=>o.inert=r()),H(e,a)}var N2,P2,F2,Ffe=o((()=>{Z(),J(),N2=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`hidden`,`disabled`,`children`]),P2=B(`<div><div role="none" class="inner svelte-jh52uf"><!></div></div>`),F2={hash:`svelte-jh52uf`,code:`.inner.svelte-jh52uf {display:contents;}`}})),Ife=o((()=>{})),$=o((()=>{Loe(),lI(),vse(),Cse(),Ose(),EI(),Mse(),Bse(),Hse(),qse(),Z(),J(),X(),Oh(),HI(),qI(),sI(),Yse(),Xse(),Zse(),Qse(),uL(),$se(),xI(),ece(),tce(),nce(),rce(),ace(),qL(),oce(),rR(),FI(),vR(),sce(),hR(),cR(),lce(),uce(),dce(),fce(),pce(),mce(),hce(),oz(),Cce(),lz(),Tce(),Ece(),Dce(),kce(),jce(),Nce(),Fce(),Lce(),mfe(),Ofe(),Afe(),bL(),$R(),jfe(),o2(),Wz(),K0(),hI(),Nfe(),Pfe(),Ffe(),Ife(),Ioe()})),I2,L2,R2,z2,B2,V2=o((()=>{Xw(),Np(),I2=l(UO(),1),SN(),L2=(e,t,n,r)=>{let i=xN(t),a={};return e.forEach(e=>{let t=n(e),o=t==null?r:i?String(t).match(i)?.[0]??r:String(t);o in a||(a[o]=[]),a[o].push(e)}),Object.entries(a).sort(([e],[t])=>Mp(e,t))},R2=(e,t,n)=>n?n.test(String(e??``)):e===t,z2=(e,t,n,r)=>{let i=e.map(e=>({item:e,key:t(e)}));return i.sort(({key:e},{key:t})=>n?Mp(e,t):e-t),r===`descending`&&i.reverse(),e.splice(0,e.length,...i.map(({item:e})=>e)),e},B2=async(e,t,n)=>{let{databaseName:r}=e??{},i=r?new qw(r,`ui-settings`):null,a=await i?.get(t)??{};n.set(a);let o=a;n.subscribe(e=>{(0,I2.default)(e,o)||(o=e,(async()=>{try{await i?.set(t,e)}catch{}})())})}})),H2,Lfe=o((()=>{yT(),V2(),SN(),H2=(e,{field:t,pattern:n}={field:``,pattern:``})=>{if(!t)return e;if(t===`fileType`)return e.filter(({path:e})=>vT(e)===n);let r=xN(n);return e.filter(e=>{let i=e[t];return R2(i,n,r)})}})),U2,Rfe=o((()=>{X(),V2(),U2=(e,{field:t,pattern:n}={field:``,pattern:void 0})=>{if(!t)return e.length?{"*":e}:{};let r=Y(`other`);return Object.fromEntries(L2(e,n,e=>e[t],r))}})),W2,G2,K2,zfe=o((()=>{W2=l(UO(),1),qp(),cm(),i4(),V2(),G2=ln(),K2=async({repository:e})=>{await B2(e,`assets-view`,G2),tm.subscribe(e=>{let t=A(G2)?.[e?.internalPath??`*`]??structuredClone(e4);(0,W2.default)(t,A(t4))||t4.set(t)}),t4.subscribe(e=>{let t=A(tm)?.internalPath??`*`;(0,W2.default)(e,A(G2)?.[t]??{})||G2.update(n=>({...n,[t]:e}))})}})),q2,J2,Bfe=o((()=>{V2(),q2=(e,t)=>{let{commitAuthor:{name:n,login:r,email:i}={},commitDate:a}=e;return t===`commit_author`?n||r||i:t===`commit_date`?a:t===`name`?e.name.split(`.`)[0]:e[t]??``},J2=(e,{key:t,order:n}={})=>{if(!t||!n)return e;let r=[...e],i={commit_author:String,commit_date:Date}[t]||r[0]?.[t]?.constructor||String;return z2(r,e=>{let n=q2(e,t);return i===String?n??``:Number(n??0)},i===String,n),r}})),Y2,X2,Z2,Q2,$2,e4,t4,n4,r4,i4=o((()=>{X(),Y2=l(UO(),1),qp(),$F(),cm(),Lfe(),Rfe(),zfe(),Bfe(),wA(),dw(),EC(),JO(),X2=ln(!1),Z2=ln(!1),Q2=un([WF],([e],t)=>{t(!!e.files.length)}),$2=({label:e,collectionName:t,fileName:n,internalPath:r})=>{if(e)return e;if(t===void 0)return Y(r===void 0?`all_assets`:`global_assets`);let i=cw(t),a=i?lw(i):t;if(!n)return a;let o=i?xC(i,n):void 0;return`${a} › ${o?SC(o):n}`},e4={type:`grid`,showInfo:!0,sort:{key:`name`,order:`ascending`}},t4=ln({type:`grid`,showInfo:!0}),n4=un([LF,tm],([e,t],n)=>{e&&t&&t.internalPath!==void 0?n(e.filter(({folder:e})=>(0,Y2.default)(e,t))):n(e?[...e]:[])}),r4=un([n4,t4],([e,t],n)=>{let r=[...e];r=J2(r,t.sort),r=H2(r,t.filter);let i=U2(r,t.group);(0,Y2.default)(A(r4),i)||n(i)}),SA.subscribe(e=>{e&&!A(G2)&&K2(e)}),n4.subscribe(e=>{VF.set([]),qO.devModeEnabled&&console.info(`listedAssets`,e)})})),a4,o4,s4,c4,l4,u4,d4,f4=o((()=>{qp(),a4=ln(!1),o4=ln(!1),s4=ln({show:!1,multiple:!1}),c4=ln({id:void 0,show:!1,status:`success`,message:void 0,count:1,sourceLanguage:void 0}),l4=ln(null),u4=ln(null),d4=ln()})),p4,m4=o((()=>{p4=(e,{noopener:t=!0}={})=>{if(!e)return null;let n=t?`noopener,noreferrer`:``;return window.open(e,`_blank`,n)}})),h4,g4,_4,v4,y4,b4,x4,S4,C4,w4,T4=o((()=>{Kw(),rc(),qp(),i4(),AF(),f4(),m4(),h4=un([a4,X2],([e,t])=>e||t),g4=ln(``),_4=ln(``),v4=(e=window.location.href)=>{let{origin:t,hash:n}=new URL(e),{pathname:r,searchParams:i}=new URL(`${t}${n.substring(1)}`);return{path:decodeURIComponent(r),params:Object.fromEntries([...new Set(i.keys())].map(e=>[e,i.getAll(e).join(`,`)]))}},y4=null,b4=(e,t)=>{if(!document.startViewTransition||y4){t();return}let n={types:[e],update:async()=>{t(),await Gw(50),await new Promise(e=>{Hn(()=>{e(void 0)})})}};try{y4=document.startViewTransition(n),y4.finished.finally(()=>{y4=null})}catch{t()}},x4=(e,t,n)=>{let{isTrusted:r,oldURL:i,newURL:a}=e;if(!r){t();return}let o=v4(i).path,s=v4(a).path,c=n.test(o)&&n.test(s),l=o.split(`/`).length,u=s.split(`/`).length;b4(c&&l>u?`backwards`:c&&l<u?`forwards`:`unknown`,()=>t())},S4=async(e,{state:t={},replaceState:n=!1,notifyChange:r=!0,transitionType:i=`unknown`}={})=>{let{path:a}=v4();if(a===e&&!Object.keys(t).length&&!n)return;let{origin:o,pathname:s,hash:c}=window.location,l=`${o}${s}${c}`,u=`${o}${s}#${e}`,d=[{...t,from:l},``,u];n?window.history.replaceState(...d):window.history.pushState(...d),r&&b4(i,()=>{window.dispatchEvent(new HashChangeEvent(`hashchange`,{oldURL:l,newURL:u}))})},C4=(e,t={})=>{let n=`backwards`;window.history.state?.from?b4(n,()=>{window.history.back()}):S4(e,{...t,transitionType:n})},w4=()=>{let{display_url:e,_siteURL:t}=A(TF);p4(e||t||`/`)}})),E4,D4,O4,k4,A4,j4,M4,N4,P4,F4,I4,L4,R4=o((()=>{J(),X(),f(),Xw(),qp(),T4(),wA(),AF(),vC(),ID(),JO(),E4=/^\/signin\/(?<encodedData>.+)/,D4=br({signInError:{message:``,context:`authentication`},unauthenticated:!0,signingIn:!1}),O4=async()=>{await Yw.set(`sveltia-cms.user`,{}),FD.account=void 0,D4.unauthenticated=!0},k4=async e=>{(typeof e?.cause?.status==`number`||e?.message===`Not a collaborator of the repository`)&&await O4()},A4=()=>{D4.signInError={message:``,context:`authentication`}},j4=(e,t=`authentication`)=>{let n=e.cause?.message||Y(`unexpected_error`);e.name===`NotFoundError`&&(n=Y(`sign_in_error.not_project_root`)),e.name===`AbortError`&&(n=Y(A(xA)===`local`?`sign_in_error.picker_dismissed`:`sign_in_error.authentication_aborted`)),D4.signInError={message:n,context:t},console.error(e.name,e.message,e.cause)},M4=()=>{let{path:e}=v4(),{encodedData:t}=e.match(E4)?.groups??{};if(!t)return{_user:void 0,copiedPrefs:void 0};S4(``,{replaceState:!0});let n,r;try{let e=JSON.parse(atob(t));u(e)&&typeof e.token==`string`&&(n={token:e.token},u(e.prefs)&&(r=e.prefs))}catch{}return{_user:n,copiedPrefs:r}},N4=async()=>{let e=await Yw.get(`sveltia-cms.user`)||await Yw.get(`decap-cms-user`)||await Yw.get(`netlify-cms-user`);return u(e)&&typeof e.backendName==`string`?e:void 0},P4=e=>{let t=e?.backendName===`local`||e?.backendName===`proxy`?`local`:A(TF).backend.name;return xA.set(t),A(SA)},F4=async()=>{A4();let e,t;if({_user:e,copiedPrefs:t}=M4(),e??=await N4(),!e)return;let n=P4(e);if(e&&n){FD.account=e;let{token:t,refreshToken:r}=e;D4.signingIn=!0;try{e=await n.signIn({token:t,refreshToken:r,auto:!0})}catch{e=void 0,FD.account=void 0}}if(D4.signingIn=!1,D4.unauthenticated=!e,!(!e||!n)){FD.account=e,t&&Object.assign(qO,t);try{await n.fetchFiles()}catch(e){[401,403,404].includes(e.cause?.status)?D4.unauthenticated=!0:j4(e,`dataFetch`),await k4(e)}}},I4=async(e,t)=>{A4(),xA.set(e);let n=A(SA);if(!n)return;let r;D4.signingIn=!0;try{r=await n.signIn({token:t,auto:!1})}catch(e){D4.signingIn=!1,D4.unauthenticated=!0,t&&e.cause?.status===401?j4(Error(`Invalid token`,{cause:{message:Y(`sign_in_error.invalid_token`)}})):j4(e);return}if(D4.signingIn=!1,D4.unauthenticated=!r,r){FD.account=r;try{await n.fetchFiles()}catch(e){j4(e,`dataFetch`),await k4(e)}}},L4=async()=>{await A(SA)?.signOut(),await O4(),xA.set(void 0),dC.set(!1);let e=A(TF)?.logout_redirect_url;e&&(window.location.href=e)}}));function z4(e,t){O(t,!0),G(e,q4);let n=()=>j(TF,`$cmsConfig`,r),[r,i]=mn(),a=N(!1),o=N(``),s=M(()=>n()?.backend),c=M(()=>z(s).name),l=M(()=>z(c)?_A[z(c)]:null),u=M(()=>z(c)===`test-repo`),d=M(()=>z(u)?void 0:z(s)?.repo?.split(`/`).pop()),f=M(()=>bE.isLocalHost&&!z(u)),p=M(()=>!z(u)&&z(s).auth_methods?.includes(`token`)===!1),m=M(()=>z(c)===`gitea`&&z(s).base_url===`https://codeberg.org`?`Codeberg`:z(l)?.label),h=M(()=>!z(u)&&z(s).auth_methods?.includes(`oauth`)===!1||z(c)===`gitea`&&!z(s).app_id);tc(()=>{D4.signInError.message||F4()});var g=K4(),_=I(g),v=F(_),y=e=>{var t=B4(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>Y(`signing_in`)]),H(e,t)},b=e=>{var t=U4(),n=I(t),r=e=>{var t=U4(),n=I(t);{let e=M(()=>Y(`work_with_local_repo`)),t=M(()=>!bE.isLocalBackendSupported);wI(n,{variant:`primary`,get label(){return z(e)},get disabled(){return z(t)},onclick:async()=>{await I4(`local`)}})}var r=L(n,2),i=e=>{var t=V4(),n=F(t),r=e=>{var t=V();yo(I(t),()=>yP(Y(`local_workflow.disabled`),`https://sveltiacms.app/en/docs/workflows/local#enabling-file-system-access-api-in-brave`)),H(e,t)},i=e=>{var t=ja();R(e=>U(t,e),[()=>Y(`local_workflow.unsupported_browser`)]),H(e,t)};W(n,e=>{bE.isBrave?e(r):e(i,-1)}),D(t),H(e,t)},a=e=>{var t=H4(),n=F(t),r=e=>{var t=ja();R(e=>U(t,e),[()=>Y(`work_with_local_repo_description`,{values:{repo:z(d)}})]),H(e,t)},i=e=>{var t=ja();R(e=>U(t,e),[()=>Y(`work_with_local_repo_description_no_repo`)]),H(e,t)};W(n,e=>{z(d)?e(r):e(i,-1)}),D(t),H(e,t)};W(r,e=>{bE.isLocalBackendSupported?D4.signInError.message||e(a,1):e(i)}),UI(L(r,2),{}),H(e,t)};W(n,e=>{z(f)&&e(r)});var i=L(n,2);{let e=M(()=>z(f)?`secondary`:`primary`),t=M(()=>z(u)?Y(`work_with_test_repo`):Y(`sign_in_with_x`,{values:{service:z(m)}}));wI(i,{get variant(){return z(e)},get label(){return z(t)},get disabled(){return z(h)},onclick:async()=>{await I4(z(c))}})}var o=L(i,2),s=e=>{{let t=M(()=>Y(`sign_in_using_access_token`,{values:{service:z(m)}}));wI(e,{variant:`secondary`,get label(){return z(t)},get disabled(){return z(p)},onclick:()=>{P(a,!0)}})}};W(o,e=>{z(u)||e(s)}),H(e,t)};W(v,e=>{D4.signingIn?e(y):z(l)&&e(b,1)});var x=L(v,2),S=e=>{var t=W4(),n=F(t);oI(n,{name:`error`});var r=L(n);D(t),R(()=>U(r,` ${D4.signInError.message??``}`)),H(e,t)};W(x,e=>{D4.signInError.message&&D4.signInError.context===`authentication`&&e(S)}),D(_);var C=L(_,2);{let e=M(()=>Y(`sign_in_using_access_token`)),t=M(()=>({spellcheck:!1,"aria-label":Y(`personal_access_token`)})),n=M(()=>Y(`sign_in`)),r=M(()=>!z(o).trim());xL(C,{get title(){return z(e)},get textboxAttrs(){return z(t)},get okLabel(){return z(n)},get okDisabled(){return z(r)},onOk:async()=>{await I4(z(c),z(o).trim())},get open(){return z(a)},set open(e){P(a,e,!0)},get value(){return z(o)},set value(e){P(o,e,!0)},children:(e,t)=>{gt();var n=G4(),r=I(n),i=L(r),a=e=>{var t=V();yo(I(t),()=>yP(Y(`sign_in_using_access_token_link`,{values:{service:z(m)}}),z(l).repository.tokenPageURL)),H(e,t)};W(i,e=>{z(l)?.repository?.tokenPageURL&&e(a)}),R(e=>U(r,`${e??``} `),[()=>Y(`sign_in_using_access_token_description`)]),H(e,n)},$$slots:{default:!0}})}H(e,g),k(),i()}var B4,V4,H4,U4,W4,G4,K4,q4,Vfe=o((()=>{Z(),J(),X(),$(),rc(),wA(),AF(),R4(),SE(),bP(),B4=B(`<div role="alert" class="message svelte-1ff54ya"> </div>`),V4=B(`<div role="alert" class="svelte-1ff54ya"><!></div>`),H4=B(`<div role="none"><!></div>`),U4=B(`<!> <!> <!>`,1),W4=B(`<div role="alert" class="error iconic svelte-1ff54ya"><!> </div>`),G4=B(` <!>`,1),K4=B(`<div role="none" class="buttons svelte-1ff54ya"><!> <!></div> <!>`,1),q4={hash:`svelte-1ff54ya`,code:`.buttons.svelte-1ff54ya {display:flex;flex-direction:column;align-items:center;gap:12px;.button {width:320px;}}[role='alert'].svelte-1ff54ya {&.iconic {display:flex;align-items:center;gap:8px;}&.error {color:var(--sui-error-foreground-color);}}`}})),J4,Hfe=o((()=>{J4=`<svg viewBox="0 0 800 800" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="400" x2="400" y1="0" y2="800"><stop offset="0" stop-color="#f0980b"/><stop offset="1" stop-color="#ff1d00"/></linearGradient><clipPath id="b"><rect height="800" rx="80" width="800"/></clipPath><rect fill="url(#a)" height="800" rx="80" width="800"/><g style="clip-path:url(#b);fill:none;stroke:#fff;stroke-linecap:round;stroke-linejoin:round;stroke-width:180"><path d="m320-80-200 320 200 320-200 320"/><path d="m400 240 200 320 200-320"/></g></svg>`})),Y4,X4,Z4,Q4,$4,e3,t3,n3,r3,i3=o((()=>{Gp(),aT(),qp(),Hfe(),AF(),GM(),Y4=/^data:(image\/[a-zA-Z0-9.+-]+);base64,/,X4=`Sveltia CMS`,Z4=`data:image/svg+xml;base64,${btoa(J4)}`,Q4=un([TF],([e])=>e?.app_title||`Sveltia CMS`),$4=un([TF],([e])=>e?.logo?.src||e?.logo_url||Z4),e3=un($4,e=>{let t=e.match(Y4);return t?t[1]:iT.getType(e)??void 0}),t3=async(e,t)=>`data:image/webp;base64,${await Up(await UM(e,t))}`,n3=un([$4],([e],t)=>{(async()=>{try{let n=await fetch(e);if(!n.ok)throw Error(`Failed to fetch logo`);let r=await n.blob(),[i,a]=await Promise.all([t3(r,{...zM,width:192,height:192}),t3(r,zM)]);t({small:i,large:a})}catch{t(void 0)}})()}),r3=un([Q4,n3],([e,t])=>{if(!t)return;let{origin:n,pathname:r}=window.location,i={name:e,short_name:e,start_url:`${n}${r}`,display:`standalone`,icons:[{src:t.small,sizes:`192x192`,type:`image/webp`},{src:t.large,sizes:`512x512`,type:`image/webp`}]},a=new Blob([JSON.stringify(i)],{type:`application/manifest+json`});return URL.createObjectURL(a)})}));function Ufe(e,t){O(t,!0),G(e,m3);let n=()=>j(OF,`$cmsConfigLoaded`,u),r=()=>j(Q4,`$appTitle`,u),i=()=>j($4,`$appLogoURL`,u),a=()=>j(DF,`$cmsConfigErrors`,u),o=()=>j(TF,`$cmsConfig`,u),s=()=>j(XD,`$inAuthPopup`,u),c=()=>j(dC,`$dataLoaded`,u),l=()=>j(fC,`$dataLoadedProgress`,u),[u,d]=mn();Qr(()=>{n()&&pn(_4,Y(`welcome_message`,{values:{name:r()}}))});var f=p3(),p=I(f),m=F(p),h=F(m),g=e=>{var t=o3(),n=I(t),a=L(n,2),o=F(a,!0);D(a),R(()=>{K(n,`src`,i()),U(o,r())}),H(e,t)};W(h,e=>{n()&&e(g)});var _=L(h,2),v=e=>{var t=c3(),n=F(t),r=F(n,!0);D(n);var i=L(n,2);uo(i,5,a,e=>e,(e,t)=>{var n=s3(),r=F(n);a3(r,()=>z(t)),D(n),H(e,n)}),D(i),D(t),R(e=>U(r,e),[()=>Y(`config.errors`,{values:{count:a().length}})]),H(e,t)},y=e=>{var t=l3(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>Y(`prefs.error.${KO.current.type}`)]),H(e,t)},b=e=>{var t=l3(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>Y(`loading_cms_config`)]),H(e,t)},x=M(()=>!o()||!Object.keys(qO).length),S=e=>{var t=u3(),n=I(t),r=F(n),i=F(r,!0);D(r);var a=L(r,2),o=F(a);a3(o,()=>D4.signInError.message),D(a),D(n),z4(L(n,2),{}),R(e=>U(i,e),[()=>Y(`loading_site_data_error`)]),H(e,t)},C=e=>{var t=l3(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>Y(`authorizing`)]),H(e,t)},w=e=>{z4(e,{})},T=e=>{var t=d3(),n=I(t),r=F(n,!0);D(n);var i=L(n,2),a=e=>{cce(e,{get now(){return l()}})};W(i,e=>{l()!==void 0&&e(a)}),R(e=>U(r,e),[()=>Y(`loading_site_data`)]),H(e,t)};W(_,e=>{a().length?e(v):KO.current?e(y,1):z(x)?e(b,2):D4.signInError.message&&D4.signInError.context===`dataFetch`?e(S,3):s()?e(C,4):!FD.account||D4.unauthenticated?e(w,5):c()||e(T,6)}),D(m),D(p);var ee=L(p,2),te=e=>{var t=f3(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>Y(`powered_by`,{values:{name:X4}})]),H(e,t)};W(ee,e=>{n()&&r()!==`Sveltia CMS`&&e(te)}),H(e,f),k(),d()}var a3,o3,s3,c3,l3,u3,d3,f3,p3,m3,Wfe=o((()=>{Z(),J(),X(),$(),dx(),GS(),Vfe(),i3(),T4(),sO(),AF(),vC(),ID(),R4(),JO(),a3=(e,t=E)=>{var n=V();yo(I(n),()=>ux(Sx.parseInline(t()),{ALLOWED_TAGS:[`a`,`code`],ALLOWED_ATTR:[`href`]})),H(e,n)},o3=B(`<img alt="" class="logo svelte-7ua6x9"/> <h1 class="svelte-7ua6x9"> </h1>`,1),s3=B(`<li><!></li>`),c3=B(`<div role="alert" class="message"><div role="none"> </div> <ul class="error svelte-7ua6x9"></ul></div>`),l3=B(`<div role="alert" class="message"> </div>`),u3=B(`<div role="alert"><div role="none" class="message"> </div> <div role="none" class="error svelte-7ua6x9"><!></div></div> <!>`,1),d3=B(`<div role="alert" class="message"> </div> <!>`,1),f3=B(`<div role="none" class="powered-by svelte-7ua6x9"> </div>`),p3=B(`<div role="none" class="container svelte-7ua6x9"><div role="none" class="inner svelte-7ua6x9"><!> <!></div></div> <!>`,1),m3={hash:`svelte-7ua6x9`,code:`.container.svelte-7ua6x9 {position:absolute;inset:0;z-index:101;flex:auto;display:flex;justify-content:center;align-items:center;gap:16px;padding:32px;.inner:where(.svelte-7ua6x9) {display:flex;flex-direction:column;align-items:center;gap:32px;min-width:240px;max-width:800px;min-height:240px;}.logo:where(.svelte-7ua6x9) {width:auto;height:160px;
774
774
 
775
775
  @media (width < 768px) {height:120px;
776
776
  }}h1:where(.svelte-7ua6x9) {font-size:48px;}.logo:where(.svelte-7ua6x9) ~ h1:where(.svelte-7ua6x9) {font-size:var(--sui-font-size-xxx-large);}.error:where(.svelte-7ua6x9) {border-radius:var(--sui-control-medium-border-radius);padding:12px;background-color:var(--sui-tertiary-background-color);font-size:var(--sui-font-size-default);text-align:center;-webkit-user-select:text;user-select:text;cursor:text;}
@@ -957,13 +957,13 @@ IMPORTANT INSTRUCTIONS:\n${[...n,...r,...i].join(`
957
957
 
958
958
  Required JSON structure:
959
959
  ["translation 1", "translation 2", ...]`},Rve=e=>`Translate these texts and return ONLY valid JSON (no markdown, no code blocks):
960
- ${JSON.stringify(e)}\n\nRespond with JSON only:`,zve=(e,t,n)=>{let r;try{r=JSON.parse(e)}catch{throw Error(`Failed to parse JSON response from ${n}.`)}if(!Array.isArray(r))throw Error(`Invalid JSON structure in ${n} response.`);if(r.length!==t)throw Error(`Translation count mismatch: expected ${t}, got ${r.length}`);return r},u5=async({sourceLanguage:e,targetLanguage:t})=>!!l5(e)&&!!l5(t),Bve=(e,t)=>{let n=l5(e),r=l5(t);if(!n)throw Error(`Source locale is not supported.`);if(!r)throw Error(`Target locale is not supported.`);return[n,r]},d5=(e,t,n,r={})=>async(i,{sourceLanguage:a,targetLanguage:o,apiKey:s})=>{let[c,l]=Bve(a,o);try{let a=await e({apiKey:s,model:t,systemPrompt:Lve(c,l),userMessage:Rve(i),...r});return zve(a,i.length,n)}catch(e){throw e instanceof Error?e:Error(`Failed to translate text with ${n}.`)}}})),Vve,Hve,Uve,Wve,Gve=o((()=>{Ive(),f5(),Vve=`anthropic`,Hve=`Anthropic Claude`,Uve=`claude-haiku-4-5`,Wve={serviceId:Vve,serviceLabel:Hve,apiLabel:c5,developerURL:Mve,apiKeyURL:Nve,apiKeyPattern:Pve,markdownSupported:!0,availability:u5,translate:d5(Fve,Uve,c5)}})),Kve,p5,qve,Jve,Yve,Xve,Zve=o((()=>{Kve=`https://api.deepseek.com/chat/completions`,p5=`DeepSeek API`,qve=`https://api-docs.deepseek.com/`,Jve=`https://platform.deepseek.com/api_keys`,Yve=/sk-[a-zA-Z0-9]{32,}/,Xve=async({apiKey:e,model:t,systemPrompt:n,userMessage:r,temperature:i=.3,maxTokens:a=4e3,reasoning:o=!0})=>{let s=await fetch(Kve,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${e}`},body:JSON.stringify({model:t,messages:[{role:`system`,content:n},{role:`user`,content:r}],temperature:i,max_tokens:a,thinking:{type:o?`enabled`:`disabled`},stream:!1})});if(!s.ok){let e=await s.json().catch(()=>({}));throw Error(`DeepSeek API error: ${s.status} ${s.statusText}${e.error?.message?` - ${e.error.message}`:``}`)}let c=await s.json();if(!c.choices||!Array.isArray(c.choices)||!c.choices[0]?.message?.content)throw Error(`Invalid response format from DeepSeek API.`);return c.choices[0].message.content.trim()}})),Qve,$ve,eye,tye,nye=o((()=>{Zve(),f5(),Qve=`deepseek`,$ve=`DeepSeek`,eye=`deepseek-v4-flash`,tye={serviceId:Qve,serviceLabel:$ve,apiLabel:p5,developerURL:qve,apiKeyURL:Jve,apiKeyPattern:Yve,markdownSupported:!0,availability:u5,translate:d5(Xve,eye,p5,{reasoning:!1})}})),rye,iye,aye,oye,sye,cye,m5,h5,lye,uye,g5,dye=o((()=>{rye=`google`,iye=`Google Cloud Translation`,aye=`Cloud Translation API`,oye=`https://console.cloud.google.com/apis/library/translate.googleapis.com`,sye=`https://console.cloud.google.com/apis/api/translate.googleapis.com/credentials`,cye=/AIza[0-9A-Za-z-_]{35}/,m5=[`ab,ace,ach,af,ak,alz,am,ar,as,awa,ay,az`,`ba,ban,bbc,be,bem,bew,bg,bho,bik,bm,bn,br,bs,bts,btx,bua`,`ca,ceb,cgg,chm,ckb,cnh,co,crh,crs,cs,cv,cy`,`da,de,din,doi,dov,dv,dz`,`ee,el,en,eo,es,et,eu`,`fa,ff,fi,fil,fj,fr,fr-CA,fr-FR,fy`,`ga,gaa,gd,gl,gn,gom,gu`,`ha,haw,he,hi,hil,hmn,hr,hrx,ht,hu,hy`,`id,ig,ilo,is,it,iw`,`ja,jv,jw`,`ka,kk,km,kn,ko,kri,ktu,ku,ky`,`la,lb,lg,li,lij,lmo,ln,lo,lt,ltg,luo,lus,lv`,`mai,mak,mg,mi,min,mk,ml,mn,mni-Mtei,mr,ms,ms-Arab,mt,my`,`ne,new,nl,no,nr,nso,nus,ny`,`oc,om,or`,`pa,pa-Arab,pag,pam,pap,pl,ps,pt,pt-BR,pt-PT`,`qu`,`rn,ro,rom,ru,rw`,`sa,scn,sd,sg,shn,si,sk,sl,sm,sn,so,sq,sr,ss,st,su,sv,sw,szl`,`ta,te,tet,tg,th,ti,tk,tl,tn,tr,ts,tt`,`ug,uk,ur,uz`,`vi`,`xh`,`yi,yo,yua,yue`,`zh,zh-CN,zh-TW,zu`].join(`,`).split(`,`),h5=e=>{let t=e.replace(/^([a-z]{2,3})[-_]([a-z]{2,4})$/i,(e,t,n)=>`${t.toLowerCase()}-${n.toUpperCase()}`);if(m5.includes(t))return t;if([`zh-HK`,`zh-MO`].includes(t))return`zh-TW`;let[n]=t.split(`-`);if(m5.includes(n))return n},lye=async({sourceLanguage:e,targetLanguage:t})=>!!h5(e)&&!!h5(t),uye=async(e,{sourceLanguage:t,targetLanguage:n,apiKey:r})=>{if(t=h5(t)??``,n=h5(n)??``,!t)throw Error(`Source locale is not supported.`);if(!n)throw Error(`Target locale is not supported.`);let i={q:e,source:t,target:n,format:`html`};try{let e=await fetch(`https://translation.googleapis.com/language/translate/v2`,{method:`POST`,headers:{"Content-Type":`application/json`,"X-goog-api-key":r},body:JSON.stringify(i)});if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(`Google Translate API error: ${e.status} ${e.statusText}${t.error?.message?` - ${t.error.message}`:``}`)}let{data:t}=await e.json();return t.translations.map(e=>e.translatedText.replace(/&#39;/g,`'`))}catch(e){throw e instanceof Error?e:Error(`Failed to translate text with Google Translate API.`)}},g5={serviceId:rye,serviceLabel:iye,apiLabel:aye,developerURL:oye,apiKeyURL:sye,apiKeyPattern:cye,markdownSupported:!1,availability:lye,translate:uye}})),_5,fye,pye,mye,hye,gye=o((()=>{_5=`Gemini API`,fye=`https://ai.google.dev/gemini-api/docs`,pye=`https://aistudio.google.com/api-keys`,mye=/AIza[a-zA-Z0-9_-]{35}/,hye=async({apiKey:e,model:t,systemPrompt:n,userMessage:r,temperature:i=.3,maxTokens:a=4e3,responseFormat:o})=>{let s=`https://generativelanguage.googleapis.com/v1beta/models/${t}:generateContent?key=${e}`,c=await fetch(s,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({system_instruction:{parts:[{text:n}]},contents:[{parts:[{text:r}]}],generationConfig:{temperature:i,maxOutputTokens:a,...o?{responseMimeType:o}:{}}})});if(!c.ok){let e=await c.json().catch(()=>({}));throw Error(`Gemini API error: ${c.status} ${c.statusText}${e.error?.message?` - ${e.error.message}`:``}`)}let l=await c.json();if(!Array.isArray(l.candidates)||!l.candidates[0]?.content?.parts?.[0])throw Error(`Invalid response format from Gemini API.`);return l.candidates[0].content.parts[0].text.trim()}})),_ye,vye,yye,bye,xye=o((()=>{gye(),f5(),_ye=`google-ai`,vye=`Google Gemini`,yye=`gemini-3.1-flash-lite`,bye={serviceId:_ye,serviceLabel:vye,apiLabel:_5,developerURL:fye,apiKeyURL:pye,apiKeyPattern:mye,markdownSupported:!0,availability:u5,translate:d5(hye,yye,_5,{responseFormat:`application/json`})}})),Sye,v5,Cye,wye,Tye,Eye,Dye=o((()=>{Sye=`https://api.mistral.ai/v1/chat/completions`,v5=`Mistral AI API`,Cye=`https://docs.mistral.ai/`,wye=`https://console.mistral.ai/home?profile_dialog=api-keys`,Tye=/[a-zA-Z0-9]{32,}/,Eye=async({apiKey:e,model:t,systemPrompt:n,userMessage:r,temperature:i=.3,maxTokens:a=4e3,reasoning:o=!0})=>{let s=await fetch(Sye,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${e}`},body:JSON.stringify({model:t,messages:[{role:`system`,content:n},{role:`user`,content:r}],temperature:i,max_tokens:a,reasoning_effort:o?`high`:`none`,stream:!1})});if(!s.ok){let e=await s.json().catch(()=>({}));throw Error(`Mistral AI API error: ${s.status} ${s.statusText}${e.message?` - ${e.message}`:``}`)}let c=await s.json();if(!c.choices||!Array.isArray(c.choices)||!c.choices[0]?.message?.content)throw Error(`Invalid response format from Mistral AI API.`);return c.choices[0].message.content.trim()}})),Oye,kye,Aye,jye,Mye=o((()=>{Dye(),f5(),Oye=`mistral`,kye=`Mistral`,Aye=`mistral-small-latest`,jye={serviceId:Oye,serviceLabel:kye,apiLabel:v5,developerURL:Cye,apiKeyURL:wye,apiKeyPattern:Tye,markdownSupported:!0,availability:u5,translate:d5(Eye,Aye,v5,{reasoning:!1})}})),Nye,y5,Pye,Fye,Iye,Lye,Rye,zye,Bye=o((()=>{Nye=`https://api.openai.com/v1/responses`,y5=`OpenAI API`,Pye=`https://platform.openai.com/docs/overview`,Fye=`https://platform.openai.com/api-keys`,Iye=/sk-[a-zA-Z0-9-_]{40,}/,Lye=e=>typeof e==`object`&&!!e&&`type`in e&&e.type===`message`&&`content`in e&&Array.isArray(e.content),Rye=e=>typeof e==`object`&&!!e&&`type`in e&&e.type===`output_text`&&`text`in e&&typeof e.text==`string`,zye=async({apiKey:e,model:t,systemPrompt:n,userMessage:r,temperature:i=.3,maxTokens:a=4e3})=>{let o=await fetch(Nye,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${e}`},body:JSON.stringify({model:t,instructions:n,input:r,store:!1,temperature:i,max_output_tokens:a})});if(!o.ok){let e=await o.json().catch(()=>({}));throw Error(`OpenAI API error: ${o.status} ${o.statusText}${e.error?.message?` - ${e.error.message}`:``}`)}let s=await o.json();if(typeof s.output_text==`string`)return s.output_text.trim();let c=(Array.isArray(s.output)?s.output:[]).find(Lye),l=(Array.isArray(c?.content)?c.content:[]).find(Rye);if(typeof l?.text==`string`)return l.text.trim();throw Error(`Invalid response format from OpenAI API.`)}})),Vye,Hye,Uye,Wye,Gye=o((()=>{Bye(),f5(),Vye=`openai`,Hye=`OpenAI GPT`,Uye=`gpt-5.4-nano`,Wye={serviceId:Vye,serviceLabel:Hye,apiLabel:y5,developerURL:Pye,apiKeyURL:Fye,apiKeyPattern:Iye,markdownSupported:!0,availability:u5,translate:d5(zye,Uye,y5)}})),b5,x5,S5=o((()=>{qp(),JO(),Gve(),nye(),dye(),xye(),Mye(),Gye(),b5={anthropic:Wve,deepseek:tye,google:g5,"google-ai":bye,mistral:jye,openai:Wye},x5=Kp(()=>{let{defaultTranslationService:e=`google`}=qO;return b5[e]??g5})})),C5,Kye,w5,qye,Jye,T5,Yye=o((()=>{GS(),qp(),Ove(),N6(),f4(),KP(),s5(),S5(),JO(),C5=new t5({headingStyle:`atx`,bulletListMarker:`-`,codeBlockStyle:`fenced`}),C5.keep([`span`,`div`]),Kye=({draft:e,options:t})=>{let{collectionName:n,fileName:r,currentValues:i,isIndexFile:a}=e,{sourceLanguage:o,targetLanguage:s,keyPath:c=``,translate:l=!1}=t,u=i[o],d={collectionName:n,fileName:r,valueMap:u,isIndexFile:a};return Object.fromEntries(Object.entries(u).map(([e,t])=>{let n=i[s][e],r=BP({...d,keyPath:e}),a=r?.widget??`string`;return c&&!e.startsWith(c)||typeof t!=`string`||!t||![`richtext`,`markdown`,`text`,`string`,`list`].includes(a)||a===`list`&&o5(r).hasSubFields||!l&&t===n||!c&&l&&n?null:[e,{value:t,isMarkdown:a===`richtext`||a===`markdown`}]}).filter(e=>!!e))},w5=(e,t,{count:n,sourceLanguage:r})=>{c4.set({id:Date.now(),show:!0,status:e,message:t,count:n,sourceLanguage:r})},qye=async({currentValues:e,options:t,copingFieldMap:n})=>{let{serviceId:r,markdownSupported:i,translate:a}=A(x5),{sourceLanguage:o,targetLanguage:s}=t,c=Object.keys(n).length,l=qO.apiKeys?.[r]||await new Promise(e=>{s4.set({show:!0,multiple:c>1,resolve:e})});if(l){w5(`info`,`translation.started`,{count:c,sourceLanguage:o});try{let t=await a(Object.entries(n).map(([,{value:e,isMarkdown:t}])=>t&&!i?WS(e):e),{apiKey:l,sourceLanguage:o,targetLanguage:s});Object.entries(n).forEach(([n,{isMarkdown:r}],a)=>{let o=t[a];e[s][n]=r&&!i?C5.turndown(o):o}),w5(`success`,`translation.complete`,{count:c,sourceLanguage:o})}catch(e){w5(`error`,`translation.error`,{count:c,sourceLanguage:o}),console.error(e)}}},Jye=({currentValues:e,options:t,copingFieldMap:n})=>{let{sourceLanguage:r,targetLanguage:i}=t,a=Object.keys(n).length;Object.entries(n).forEach(([t,{value:n}])=>{e[i][t]=n}),w5(`success`,`copy.complete`,{count:a,sourceLanguage:r})},T5=async e=>{let{sourceLanguage:t,translate:n=!1}=e,r=A(O6),{currentValues:i}=r,a=Kye({draft:r,options:e}),o=Object.keys(a).length;if(!o){w5(`info`,`${n?`translation`:`copy`}.none`,{count:o,sourceLanguage:t});return}n?await qye({currentValues:i,options:e,copingFieldMap:a}):Jye({currentValues:i,options:e,copingFieldMap:a}),O6.update(e=>({...e,currentValues:i}))}}));function E5(e,t){O(t,!0);let n=()=>j(O6,`$entryDraft`,i),r=()=>j(x5,`$translator`,i),[i,a]=mn(),o=q(t,`keyPath`,3,``),s=q(t,`translate`,3,!1),c=async({sourceLanguage:e,targetLanguage:t})=>!n()?.currentLocales[t]||!n().currentLocales[e]||!!o()&&!At(n().currentValues[e])[o()]||!s()&&!!o()&&At(n().currentValues[e])[o()]===At(n().currentValues[t])[o()]||s()&&!await r()?.availability({sourceLanguage:e,targetLanguage:t});var l=V();uo(I(l),16,()=>t.otherLocales,e=>e,(e,n)=>{let r=M(()=>({sourceLanguage:n,targetLanguage:t.locale}));var i=V();Xa(I(i),()=>c(z(r)),null,(e,t)=>{{let i=M(()=>Y(s()?`translate_from_x`:`copy_from_x`,{values:{locale:BC(n)}}));lR(e,{get label(){return z(i)},get disabled(){return z(t)},onclick:()=>{T5({...z(r),keyPath:o(),translate:s()})}})}}),H(e,i)}),H(e,l),k(),a()}var D5=o((()=>{Z(),J(),X(),$(),N6(),Yye(),WC(),S5()}));function Xye(e,t){O(t,!0),G(e,$ye);let n=q(t,`children`,3,void 0),r=Gs(t,Zye),i=N(void 0);tc(()=>()=>{z(i)?.dispatchEvent(new CustomEvent(`Unmount`))});var a=Qye();_s(a,()=>({role:`group`,class:`field`,...r}),void 0,void 0,void 0,`svelte-wzztxu`),Co(F(a),()=>n()??E),D(a),Rs(a,e=>P(i,e),()=>z(i)),H(e,a),k()}var Zye,Qye,$ye,ebe=o((()=>{Z(),J(),rc(),Zye=new Set([`$$slots`,`$$events`,`$$legacy`,`children`]),Qye=B(`<section><!></section>`),$ye={hash:`svelte-wzztxu`,code:`section.svelte-wzztxu {padding:var(--field-editor-padding);&:not(:last-child) {border-width:0 0 1px;border-color:var(--sui-secondary-border-color);}& > * {margin-inline:auto !important;max-width:768px;}& > header {display:flex;align-items:center;margin:0 -8px 8px;height:var(--sui-button-small-height);h4 {margin-inline:var(--sui-focus-ring-width) 0;font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}.required {margin-block:2px 0;margin-inline:2px 0;color:var(--sui-error-foreground-color);font-size:var(--sui-font-size-large);}}}`}}));function tbe(e,t){O(t,!0);let n=()=>j(O6,`$entryDraft`,i),r=()=>j(x5,`$translator`,i),[i,a]=mn(),o=q(t,`size`,3,`medium`),s=q(t,`keyPath`,3,``),c=M(()=>!n()?.currentLocales[t.locale]),l=async({sourceLanguage:e,targetLanguage:t})=>z(c)||!n()?.currentLocales[e]||!await r()?.availability({sourceLanguage:e,targetLanguage:t});var u=V(),d=I(u),f=e=>{let n=M(()=>{let[e]=t.otherLocales;return{otherLocale:e}}),r=M(()=>Y(`translate_from_x`,{values:{locale:BC(z(n).otherLocale)??z(n).otherLocale}})),i=M(()=>({sourceLanguage:z(n).otherLocale,targetLanguage:t.locale}));var a=V();Xa(I(a),()=>l(z(i)),null,(e,t)=>{wI(e,{variant:`ghost`,get size(){return o()},iconic:!0,popupPosition:`bottom-right`,get"aria-label"(){return z(r)},get title(){return z(r)},get disabled(){return z(t)},onclick:()=>{T5({...z(i),keyPath:s(),translate:!0})},startIcon:e=>{oI(e,{name:`translate`})},$$slots:{startIcon:!0}})}),H(e,a)},p=e=>{{let n=e=>{oI(e,{name:`translate`})},r=e=>{{let n=M(()=>Y(`translation_options`));iR(e,{get"aria-label"(){return z(n)},children:(e,n)=>{E5(e,{get locale(){return t.locale},get otherLocales(){return t.otherLocales},get keyPath(){return s()},translate:!0})},$$slots:{default:!0}})}},i=M(()=>Y(`translate`));PI(e,{variant:`ghost`,get size(){return o()},iconic:!0,popupPosition:`bottom-right`,get"aria-label"(){return z(i)},get disabled(){return z(c)},endIcon:n,popup:r,$$slots:{endIcon:!0,popup:!0}})}};W(d,e=>{t.otherLocales.length===1?e(f):e(p,-1)}),H(e,u),k(),a()}var nbe=o((()=>{Z(),J(),X(),$(),D5(),N6(),Yye(),WC(),S5()}));function O5(e,t){G(e,ibe);let n=q(t,`id`,3,void 0),r=q(t,`live`,3,`polite`);var i=rbe(),a=F(i),o=F(a);oI(o,{name:`error`}),Co(L(o,2),()=>t.children),D(a),D(i),R(()=>{K(i,`id`,n()),K(i,`aria-live`,r())}),H(e,i)}var rbe,ibe,k5=o((()=>{Z(),J(),$(),rbe=B(`<div role="alert" class="validation svelte-6wra4i"><div role="none" class="svelte-6wra4i"><!> <!></div></div>`),ibe={hash:`svelte-6wra4i`,code:`.validation.svelte-6wra4i {color:var(--sui-error-foreground-color) !important;font-size:var(--sui-font-size-small);div:where(.svelte-6wra4i) {display:flex;align-items:center;gap:4px;margin:4px 0 0;.icon {flex:none;font-size:16px; /* !hardcoded */}}}`}}));function abe(e,t){O(t,!0);let n=q(t,`currentValue`,15),r=q(t,`required`,3,!0),i=q(t,`readonly`,3,!1),a=q(t,`invalid`,3,!1);yz(e,{get readonly(){return i()},get required(){return r()},get invalid(){return a()},get"aria-labelledby"(){return`${t.fieldId??``}-label`},get"aria-errormessage"(){return`${t.fieldId??``}-error`},get checked(){return n()},set checked(e){n(e)}}),k()}var obe=o((()=>{Z(),J(),$()}));function sbe(e,t){O(t,!0);let n=q(t,`currentValue`,3,!1);var r=V(),i=I(r),a=e=>{var t=cbe(),r=F(t,!0);D(t),R(e=>U(r,e),[()=>Y(`boolean.${n()}`)]),H(e,t)};W(i,e=>{typeof n()==`boolean`&&e(a)}),H(e,r),k()}var cbe,lbe=o((()=>{Z(),J(),X(),cbe=B(`<p> </p>`)}));function ube(e,t){O(t,!0);let n=()=>j(O6,`$entryDraft`,r),[r,i]=mn(),{valueStoreKey:a=`currentValues`}=Lt(`field-editor`)??{},o=q(t,`currentValue`,15),s=q(t,`required`,3,!0),c=q(t,`readonly`,3,!1),l=q(t,`invalid`,3,!1),u=N(``),d=N(``),f=M(()=>T(t.fieldConfig.default_language,`plain`)),p=M(()=>T(t.fieldConfig.allow_language_selection,!0)),m=M(()=>T(t.fieldConfig.output_code_only,!1)),h=M(()=>T(t.fieldConfig.keys,()=>({code:`code`,lang:`lang`}),!0)),g=M(()=>At(n()?.[a][t.locale])??{}),_=M(()=>`${t.keyPath}.${z(h).code}`),v=M(()=>`${t.keyPath}.${z(h).lang}`),y=()=>{if(z(m))typeof o()==`string`?z(u)!==o()&&P(u,o(),!0):P(u,``),P(d,z(f),!0);else{let e=z(g)[z(_)],t=z(g)[z(v)]||z(f);typeof e==`string`?z(u)!==e&&P(u,e,!0):P(u,``),typeof t==`string`?z(d)!==t&&P(d,t,!0):P(d,``)}},b=()=>{z(m)?o()!==z(u)&&o(z(u)):n()&&(o({}),z(g)[z(_)]!==z(u)&&gn(O6,zi(n)[a][t.locale][z(_)]=z(u),zi(n)),z(g)[z(v)]!==z(d)&&gn(O6,zi(n)[a][t.locale][z(v)]=z(d),zi(n)))};Qr(()=>{z(g),zi(()=>{y()})}),Qr(()=>{z(u),z(d),zi(()=>{b()})});var x=V();Xa(I(x),Gw,null,e=>{var n=V();no(I(n),()=>JSON.stringify(t.fieldConfig),e=>{pfe(e,{get showLanguageSwitcher(){return z(p)},flex:!0,get readonly(){return c()},get required(){return s()},get invalid(){return l()},get"aria-labelledby"(){return`${t.fieldId??``}-label`},get"aria-errormessage"(){return`${t.fieldId??``}-error`},get code(){return z(u)},set code(e){P(u,e,!0)},get lang(){return z(d)},set lang(e){P(d,e,!0)}})}),H(e,n)}),H(e,x),k(),i()}var dbe=o((()=>{Z(),J(),$(),Kw(),rc(),N6()}));function fbe(e,t){O(t,!0);let n=()=>j(O6,`$entryDraft`,r),[r,i]=mn(),a=M(()=>T(t.fieldConfig.default_language,``)),o=M(()=>T(t.fieldConfig.output_code_only,!1)),s=M(()=>T(t.fieldConfig.keys,()=>({code:`code`,lang:`lang`}),!0)),c=M(()=>At(n()?.currentValues[t.locale])??{}),l=M(()=>`${t.keyPath}.${z(s).code}`),u=M(()=>`${t.keyPath}.${z(s).lang}`),d=M(()=>z(o)?t.currentValue:z(c)[z(l)]),f=M(()=>z(o)?z(a):z(c)[z(u)]);var p=V(),m=I(p),h=e=>{var t=pbe(),n=F(t,!0);D(t),R(()=>{as(t,1,Qo(z(f)?`language-${z(f)}`:void 0)),U(n,z(d))}),H(e,t)};W(m,e=>{z(d)&&e(h)}),H(e,p),k(),i()}var pbe,mbe=o((()=>{Z(),J(),N6(),pbe=B(`<pre> </pre>`)}));function hbe(e,t){let n=Ma();O(t,!0),G(e,ybe);let r=q(t,`currentValue`,15),i=q(t,`required`,3,!0),a=q(t,`readonly`,3,!1),o=q(t,`invalid`,3,!1),s=N(``),c=N(255),l=M(()=>T(t.fieldConfig.allowInput,!1)),u=M(()=>T(t.fieldConfig.enableAlpha,!1)),d=/^#[0-9a-f]{6}$/i,f=/^(?<rgb>#[0-9a-f]{6})(?<a>[0-9a-f]{2})?$/i,p=()=>{if(typeof r()!=`string`)return;let{rgb:e,a:t=`ff`}=r().match(f)?.groups??{};if(e&&z(s)!==e&&P(s,e,!0),e&&z(u)){let e=Number.parseInt(`0x${t}`,16);z(c)!==e&&P(c,e,!0)}},m=()=>{let e=d.test(z(s))?z(s):``;e&&z(u)&&(e+=z(c).toString(16).padStart(2,`0`)),r()!==e&&r(e)};Qr(()=>{r(),zi(()=>{p()})}),Qr(()=>{z(s),z(c),zi(()=>{m()})});var h=vbe(),g=F(h);ms(g);var _=L(g,2),v=e=>{var r=_be(),d=F(r),f=e=>{hL(e,{dir:`ltr`,get id(){return`${n}-input`},get invalid(){return o()},get readonly(){return a()},get required(){return i()},get"aria-labelledby"(){return`${t.fieldId??``}-label`},get"aria-errormessage"(){return`${t.fieldId??``}-error`},get value(){return z(s)},set value(e){P(s,e,!0)}})};W(d,e=>{z(l)&&e(f)});var p=L(d,2),m=e=>{var t=gbe(),n=I(t),r=L(n);{let e=M(()=>!z(s)),t=M(()=>Y(`opacity`));wce(r,{min:0,max:255,get disabled(){return z(e)},get"aria-label"(){return z(t)},get value(){return z(c)},set value(e){P(c,e,!0)}})}R(e=>U(n,`${e??``} `),[()=>Y(`opacity`)]),H(e,t)};W(p,e=>{z(u)&&e(m)}),D(r),H(e,r)};W(_,e=>{(z(l)||z(u))&&e(v)});var y=L(_,2),b=e=>{{let t=M(()=>Y(`clear`)),r=M(()=>!z(s)),i=M(()=>`${n}-picker ${z(l)?`${n}-input`:``}`);wI(e,{variant:`tertiary`,get label(){return z(t)},get disabled(){return z(r)},get"aria-controls"(){return z(i)},onclick:()=>{P(s,``),P(c,255)}})}};W(y,e=>{!a()&&!i()&&e(b)}),D(h),R(()=>{K(g,`id`,`${n}-picker`),g.readOnly=a(),K(g,`aria-invalid`,o()),K(g,`aria-readonly`,a()),K(g,`aria-required`,i()),K(g,`aria-labelledby`,`${t.fieldId??``}-label`),K(g,`aria-errormessage`,`${t.fieldId??``}-error`)}),Ms(g,()=>z(s),e=>P(s,e)),H(e,h),k()}var gbe,_be,vbe,ybe,bbe=o((()=>{Z(),J(),X(),$(),rc(),gbe=B(` <!>`,1),_be=B(`<span role="none" class="value svelte-udhsyb"><!> <!></span>`),vbe=B(`<div role="none" class="svelte-udhsyb"><input type="color" class="svelte-udhsyb"/> <!> <!></div>`),ybe={hash:`svelte-udhsyb`,code:`div.svelte-udhsyb {display:flex;align-items:center;gap:8px;.value:where(.svelte-udhsyb) {display:flex;align-items:center;gap:8px;.sui.text-input {width:88px;min-width:0;}.sui.slider {padding:8px;--sui-slider-base-width: 80px;}}}input.svelte-udhsyb {font-family:var(--sui-textbox-font-family);}`}}));function xbe(e,t){O(t,!0),G(e,Cbe);let n=M(()=>T(t.fieldConfig.enableAlpha,!1)),r=e=>Number.parseInt(`0x${e}`,16),i=/^#(?<r>[0-9a-f]{2})(?<g>[0-9a-f]{2})(?<b>[0-9a-f]{2})(?<a>[0-9a-f]{2})?$/i,a=M(()=>{let{r:e,g:a,b:o,a:s}=t.currentValue?.match(i)?.groups??{};return e?`rgb(${r(e)} ${r(a)} ${r(o)}${z(n)&&s?` / ${Math.round(r(s)/255*100)}%`:``})`:``});var o=V(),s=I(o),c=e=>{var n=Sbe(),r=F(n),i=F(r);let o;var s=L(i,2),c=F(s,!0);D(s);var l=L(s,2),u=F(l,!0);D(l),D(r),D(n),R(()=>{o=cs(i,``,o,{"background-color":t.currentValue}),U(c,t.currentValue),U(u,z(a))}),H(e,n)},l=M(()=>typeof t.currentValue==`string`&&t.currentValue.trim());W(s,e=>{z(l)&&e(c)}),H(e,o),k()}var Sbe,Cbe,wbe=o((()=>{Z(),J(),Sbe=B(`<p><span role="none" class="preview svelte-1m6xsa0"><span role="none" class="color svelte-1m6xsa0"></span> <span role="none" class="value"> </span> <span role="none" class="value"> </span></span></p>`),Cbe={hash:`svelte-1m6xsa0`,code:`.preview.svelte-1m6xsa0 {display:inline-flex;align-items:center;gap:8px;.color:where(.svelte-1m6xsa0) {display:block;width:24px;height:24px;border-radius:24px;}}`}}));function Tbe(e,t){O(t,!0);let n=()=>j(O6,`$entryDraft`,r),[r,i]=mn(),{valueStoreKey:a=`currentValues`}=Lt(`field-editor`)??{},o=q(t,`currentValue`,15),s=q(t,`required`,3,!0),c=q(t,`readonly`,3,!1),l=q(t,`invalid`,3,!1),u=M(()=>T(t.fieldConfig.value,``)),d=M(()=>n()?.isIndexFile??!1),f=M(()=>n()?.collectionName??``),p=M(()=>n()?.fileName),m=M(()=>At(n()?.[a][t.locale])??{}),h=M(()=>HC(t.locale)),g=()=>{let[e]=t.keyPath.split(`.`).splice(-2,1);return e&&EP(e)?Number(e):void 0},_=()=>{if(!(t.keyPath in z(m)))return;let e=z(u)===`{{index}}`?g()??``:z(u).replaceAll(Yp,(e,n)=>{let{value:r,transformations:i}=cC(n);if(r===`index`)return String(g()??``);if(!r.startsWith(`fields.`))return``;let a=UP({collectionName:z(f),fileName:z(p),valueMap:z(m),keyPath:r.replace(/^fields\./,``),locale:t.locale,isIndexFile:z(d)});return a=Array.isArray(a)?z(h).format(a):String(a),i.length?lC({value:a,transformations:i,locale:t.locale}):a});o()!==e&&o(e)};Qr(()=>{z(m),zi(()=>{_()})});{let n=M(()=>String(o()));hL(e,{dir:`auto`,get value(){return z(n)},flex:!0,get readonly(){return c()},get required(){return s()},get invalid(){return l()},get"aria-labelledby"(){return`${t.fieldId??``}-label`},get"aria-errormessage"(){return`${t.fieldId??``}-error`}})}k(),i()}var Ebe=o((()=>{Z(),J(),$(),rc(),Qp(),uC(),N6(),KP(),WC(),OP()}));function Dbe(e,t){O(t,!0);var n=Obe(),r=F(n,!0);D(n),R((e,i)=>{K(n,`lang`,e),K(n,`dir`,i),U(r,t.currentValue),n.dir=n.dir},[()=>LC(t.locale),()=>RC(t.locale)]),H(e,n),k()}var Obe,kbe=o((()=>{Z(),J(),WC(),Obe=B(`<p> </p>`)}));function Abe(e,t){O(t,!0),G(e,Pbe);let n=q(t,`currentValue`,15),r=q(t,`required`,3,!0),i=q(t,`readonly`,3,!1),a=q(t,`invalid`,3,!1),o=N(``),s=N(!1),c=M(()=>aC(t.fieldConfig)),l=M(()=>z(c).type),u=M(()=>z(c).min),d=M(()=>z(c).max),f=M(()=>z(c).step),p=M(()=>z(c).dateOnly),m=M(()=>z(c).utc),h=M(()=>z(c).singleCustomTimeZone),g=M(()=>Tw(n(),t.fieldConfig)),_=()=>{if(z(s))return;let e=Hw({currentValue:n(),fieldConfig:t.fieldConfig,timeZone:z(g)});e!==void 0&&e!==z(o)&&P(o,e,!0)},v=()=>{let e=Vw({inputValue:z(o),currentValue:n(),fieldConfig:t.fieldConfig,timeZone:z(g)});e!==void 0&&e!==n()&&Number(zw(e,t.fieldConfig))!==Number(zw(n(),t.fieldConfig))&&n(e)};Qr(()=>{n(),zi(()=>{_()})}),Qr(()=>{z(o),zi(()=>{v()})});let y=()=>{P(s,!0)},b=()=>{P(s,!1),_()};var x=Nbe(),S=I(x),C=F(S);_s(C,()=>({type:z(l),min:z(u),max:z(d),step:z(f),readonly:i(),"aria-readonly":i(),"aria-required":r(),"aria-invalid":a(),"aria-labelledby":`${t.fieldId??``}-label`,"aria-errormessage":`${t.fieldId??``}-error`,onfocus:y,onblur:b}),void 0,void 0,void 0,`svelte-1dnhck7`,!0);var w=L(C,2),T=e=>{{let n=M(()=>Y(z(p)?`today`:`now`));wI(e,{variant:`tertiary`,get label(){return z(n)},onclick:()=>{P(o,Bw(t.fieldConfig,z(g)),!0)}})}};W(w,e=>{i()||e(T)});var ee=L(w,2),te=e=>{{let t=M(()=>Y(`clear`)),r=M(()=>!n());wI(e,{variant:`tertiary`,get label(){return z(t)},get disabled(){return z(r)},onclick:()=>{n(``)}})}};W(ee,e=>{!i()&&!r()&&e(te)}),D(S);var ne=L(S,2),re=e=>{var r=jbe(),i=F(r,!0);D(r),R(e=>U(i,e),[()=>Ew(z(h),zw(n(),t.fieldConfig))]),H(e,r)},ie=e=>{H(e,Mbe())};W(ne,e=>{z(h)?e(re):z(m)&&e(ie,1)}),Ms(C,()=>z(o),e=>P(o,e)),H(e,x),k()}var jbe,Mbe,Nbe,Pbe,Fbe=o((()=>{Z(),J(),X(),$(),rc(),oC(),Ww(),Dw(),jbe=B(`<div role="none" class="timezone svelte-1dnhck7"> </div>`),Mbe=B(`<div role="none" class="timezone svelte-1dnhck7">UTC</div>`),Nbe=B(`<div role="none" class="svelte-1dnhck7"><input/> <!> <!></div> <!>`,1),Pbe={hash:`svelte-1dnhck7`,code:`div.svelte-1dnhck7 {display:flex;align-items:center;}.timezone.svelte-1dnhck7 {margin:4px 8px 0;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);white-space:nowrap;}`}}));function Ibe(e,t){O(t,!0);let n=M(()=>aC(t.fieldConfig)),r=M(()=>z(n).utc),i=M(()=>z(n).singleCustomTimeZone),a=M(()=>Uw({locale:t.locale,fieldConfig:t.fieldConfig,currentValue:t.currentValue}));var o=V(),s=I(o),c=e=>{var n=Lbe(),o=F(n),s=L(o),c=e=>{var n=ja();R(e=>U(n,`— ${e??``}`),[()=>Ew(z(i),zw(t.currentValue,t.fieldConfig))]),H(e,n)},l=e=>{H(e,ja(`— UTC`))};W(s,e=>{z(i)?e(c):z(r)&&e(l,1)}),D(n),R((e,t)=>{K(n,`lang`,e),K(n,`dir`,t),U(o,`${z(a)??``} `),n.dir=n.dir},[()=>LC(t.locale),()=>RC(t.locale)]),H(e,n)};W(s,e=>{z(a)&&e(c)}),H(e,o),k()}var Lbe,Rbe=o((()=>{Z(),J(),oC(),Ww(),Dw(),WC(),Lbe=B(`<p> <!></p>`)}));function zbe(e,t){O(t,!0),G(e,Hbe);let n=q(t,`multiple`,3,!1),r=q(t,`hidden`,3,!1),i=M(()=>jA(t.fieldConfig)??{}),a=``,o=N(!1),s=N(!1),c=N(void 0),l=()=>{if(!z(c))return;a=window.crypto.randomUUID();let e=new URLSearchParams({...Object.fromEntries(Object.entries(z(i).config??{}).filter(([e])=>DA.includes(e))),ml_id:a,pmHost:window.location.origin,new_cms:`true`,remove_header:`true`});z(c).src=`${TA}/cms?${e}`},d=()=>{let e={...Object.fromEntries(Object.entries(z(i).config??{}).filter(([e])=>OA.includes(e))),multiple:n(),max_files:t.fieldConfig?.max??z(i).config?.max_files??20,folder:{path:z(i).config?.folder?.path??``,resource_type:t.kind??`raw`}},r={type:`ML_WIDGET_SHOW`,data:{mlId:a,config:e}};console.debug(`Cloudinary Panel sending message:`,r),z(c)?.contentWindow?.postMessage(JSON.stringify(r),EA)},f=({assets:e})=>{let{output_filename_only:n=!1,use_transformations:r=!0}=z(i),a=e.map(e=>{let t=e.secure_url;return n?{url:t.split(`/`).pop()}:r?{url:e.derived?.[0]?.secure_url??t}:{url:t}});t.onSelect(a)},p=({origin:e,data:t})=>{if(e===EA){if(typeof t==`string`)try{t=JSON.parse(t)}catch{return}u(t)&&(console.debug(`Cloudinary Panel received message:`,t),t.type===`login`&&t.consoleDomain&&P(o,!0),t.type===`consoleLoaded`&&P(s,!0),t.type===`ML_WIDGET_INSERT_DATA`&&f(t.data))}};tc(()=>(l(),window.addEventListener(`message`,p),()=>{window.removeEventListener(`message`,p)})),Qr(()=>{z(i)&&z(s)&&d()});var m=Vbe(),h=I(m);Rs(h,e=>P(c,e),()=>z(c));var g=L(h,2),_=e=>{k2(e,{children:(e,t)=>{var n=Bbe(),r=I(n);{let e=M(()=>Y(`cloud_storage.cloudinary.activate.button_label`));wI(r,{variant:`primary`,get label(){return z(e)},onclick:async()=>{p4(`${TA}/cms_login?cms=true`,{noopener:!1})}})}var i=L(r,2),a=F(i,!0);D(i),R(e=>U(a,e),[()=>Y(`cloud_storage.cloudinary.activate.description`)]),H(e,n)},$$slots:{default:!0}})};W(g,e=>{!r()&&!z(o)&&e(_)}),R(e=>{K(h,`title`,e),K(h,`hidden`,r()||!z(o))},[()=>Y(`cloud_storage.cloudinary.iframe_title`)]),H(e,m),k()}var Bbe,Vbe,Hbe,Ube=o((()=>{Z(),J(),X(),$(),f(),rc(),PA(),m4(),Bbe=B(`<!> <div role="none"> </div>`,1),Vbe=B(`<iframe allow="camera; storage-access" sandbox="allow-same-origin allow-scripts allow-popups allow-forms" class="svelte-p06t0o"></iframe> <!>`,1),Hbe={hash:`svelte-p06t0o`,code:`iframe.svelte-p06t0o {display:block;width:100%;height:100%;border:none;&[hidden] {display:none;}}`}}));function Wbe(e,t){O(t,!0),G(e,Jbe);let n=q(t,`children`,3,void 0),r=M(()=>t.path?kp(t.path).split(`/`):t.caption?[t.caption]:[]),i={ALLOWED_TAGS:[`wbr`]},a=e=>ux(e.replace(/([-_.])/g,`$1<wbr>`),i);var o=V(),s=I(o),c=e=>{var t=qbe(),i=F(t);mI(i,{lines:2,children:(e,t)=>{var n=V();uo(I(n),19,()=>z(r),(e,t)=>`${e}-${t}`,(e,t,n)=>{var i=V(),o=I(i),s=e=>{var n=Gbe();yo(n,()=>a(z(t)),!0),D(n),H(e,n)},c=e=>{var n=Kbe();yo(I(n),()=>a(z(t))),gt(),H(e,n)};W(o,e=>{z(n)===z(r).length-1?e(s):e(c,-1)}),H(e,i)}),H(e,n)},$$slots:{default:!0}}),Co(L(i,2),()=>n()??E),D(t),H(e,t)};W(s,e=>{z(r).length&&e(c)}),H(e,o),k()}var Gbe,Kbe,qbe,Jbe,Ybe=o((()=>{Z(),J(),$(),Np(),dx(),Gbe=B(`<strong></strong>`),Kbe=B(`<!>/`,1),qbe=B(`<span class="name svelte-1ngvthn" aria-hidden="true"><!> <!></span>`),Jbe={hash:`svelte-1ngvthn`,code:`.name.svelte-1ngvthn {color:var(--sui-tertiary-foreground-color);strong {color:var(--sui-primary-foreground-color);font-weight:var(--sui-font-weight-normal);}}`}}));function Xbe(e,t){G(e,$be);let n=q(t,`viewType`,3,`grid`);var r=Qbe();QL(F(r),{label:``,get value(){return t.value},get selected(){return t.selected},get onChange(){return t.onChange},startIcon:e=>{var n=V(),r=I(n),i=e=>{var t=Zbe();oI(F(t),{name:`check`,class:`icon check`}),D(t),H(e,t)};W(r,e=>{t.multiple&&e(i)}),H(e,n)},children:(e,n)=>{var r=V();Co(I(r),()=>t.children??E),H(e,r)},$$slots:{startIcon:!0,default:!0}}),D(r),R(()=>as(r,1,`wrapper ${n()??``}`,`svelte-1fitgoo`)),H(e,r)}var Zbe,Qbe,$be,exe=o((()=>{Z(),J(),$(),Zbe=B(`<span role="none" class="icon check-background"><!></span>`),Qbe=B(`<div role="none"><!></div>`),$be={hash:`svelte-1fitgoo`,code:`.wrapper.svelte-1fitgoo {display:contents;[role='option'] {position:relative;& > .icon.check {display:none;}&[aria-selected='false'] {.check-background {border-color:var(--sui-checkbox-border-color);background-color:var(--sui-checkbox-background-color);.icon {display:none;}}}&[aria-selected='true'] {.check-background {border-color:var(--sui-primary-accent-color);color:var(--sui-primary-accent-color-inverted);background-color:var(--sui-primary-accent-color);}}.check-background {display:flex;justify-content:center;align-items:center;border-width:1px;border-radius:var(--sui-checkbox-border-radius);width:20px;height:20px;pointer-events:none;.icon {color:inherit !important;font-size:20px;}}}&.grid {.check-background {position:absolute;inset-block-start:8px;inset-inline-start:8px;z-index:1;}}&.list {.check-background {margin-inline-start:16px;}}}`}}));function txe(e,t){O(t,!0),G(e,rxe);let n=q(t,`viewType`,3,`grid`),r=q(t,`gridId`,3,void 0),i=q(t,`multiple`,3,!1),a=q(t,`onChange`,3,void 0),o=q(t,`children`,3,void 0);var s=nxe(),c=F(s);{let e=M(()=>Y(`assets_dialog.available_images`));UL(c,{get id(){return r()},get class(){return n()},get multiple(){return i()},get"aria-label"(){return z(e)},onChange:e=>{a()?.(e.detail)},children:(e,t)=>{var n=V();Co(I(n),()=>o()??E),H(e,n)},$$slots:{default:!0}})}D(s),H(e,s),k()}var nxe,rxe,ixe=o((()=>{Z(),J(),X(),$(),nxe=B(`<div role="none" class="wrapper svelte-umbokg"><!></div>`),rxe={hash:`svelte-umbokg`,code:`.wrapper.svelte-umbokg {display:contents;.listbox {gap:4px;border-width:0;max-height:calc(100% - var(--sui-focus-ring-width) * 2);.option {button {border-radius:var(--sui-control-medium-border-radius);padding:4px;width:100%;height:auto;transition:none;&:focus-visible {outline-color:transparent;}.preview {flex:none;border-radius:var(--sui-control-medium-border-radius);aspect-ratio:1 / 1;object-fit:contain;}}}.name {min-height:calc(var(--sui-font-size-default) * 2);white-space:normal;line-height:var(--sui-line-height-compact);}}.listbox.grid {display:grid;grid-template-columns:repeat(auto-fill, minmax(160px, 1fr));height:auto;max-height:none;.option {button {flex-direction:column;justify-content:flex-start;.preview {width:100%;height:auto;}.name {flex:none;margin:4px 0 12px;padding:0 8px;width:100%;min-height:calc(var(--sui-font-size-default) * 3);&:empty {display:none;}}}}button[aria-selected='true'] {outline-offset:-2px;outline-width:2px !important;outline-style:solid;outline-color:var(--sui-primary-accent-color-light);}}.listbox.list {.option {button {gap:16px;.preview {width:64px;}.name {flex:auto;padding-inline:0 8px;}}button[aria-selected='true'] {outline-offset:-2px;outline-width:2px !important;outline-style:solid;outline-color:var(--sui-primary-accent-color-light);}}}}`}}));function axe(e,t){O(t,!0);let n=q(t,`open`,15,!1);{let r=M(()=>Y(`assets_dialog.large_file.title`));dL(e,{get title(){return z(r)},get open(){return n()},set open(e){n(e)},children:(e,n)=>{var r=oxe(),i=I(r),a=F(i,!0);D(i);var o=L(i,2),s=F(o,!0);D(o),R((e,t)=>{U(a,e),U(s,t)},[()=>Y(`warning_oversized_files`,{values:{count:t.oversizedFileNames.length,size:OE(t.maxSize)}}),()=>HC(Hh.current).format(t.oversizedFileNames)]),H(e,r)},$$slots:{default:!0}})}k()}var oxe,sxe=o((()=>{Z(),J(),X(),$(),WC(),FE(),oxe=B(`<div> </div> <div> </div>`,1)}));function cxe(e,t){O(t,!0),G(e,mxe);let n=()=>j(d4,`$selectAssetsView`,i),r=()=>j(TF,`$cmsConfig`,i),[i,a]=mn(),o=e=>{var t=V(),n=I(t),r=e=>{k2(e,{children:(e,t)=>{var n=A5(),r=F(n,!0);D(n),R(e=>U(r,e),[()=>Y(l()?`searching`:`loading`)]),H(e,n)},$$slots:{default:!0}})},i=e=>{k2(e,{children:(e,t)=>{var n=A5(),r=F(n,!0);D(n),R(e=>U(r,e),[()=>Y(`no_files_found`)]),H(e,n)},$$slots:{default:!0}})},a=e=>{var t=lxe();txe(F(t),{get viewType(){return z(te)},get gridId(){return u()},get multiple(){return c()},children:(e,t)=>{{let t=(e,t=E)=>{var n=V();Xa(I(n),Gw,null,e=>{let n=M(()=>{let{id:e,previewURL:n,description:r,kind:i}=t();return{id:e,previewURL:n,description:r,_kind:i}});{let r=M(()=>xe(t()));Xbe(e,{get value(){return z(n).id},get viewType(){return z(te)},get multiple(){return c()},get selected(){return z(r)},onChange:({detail:{selected:e}})=>{Se(t(),e)},children:(e,t)=>{var r=j5(),i=I(r);t6(i,{get kind(){return z(n)._kind},get src(){return z(n).previewURL},get alt(){return z(n).description},variant:`tile`,crossorigin:`anonymous`});var a=L(i,2),o=e=>{{let t=M(()=>z(ne)?void 0:z(n).description),r=M(()=>z(ne)?z(n).description:void 0);Wbe(e,{get path(){return z(t)},get caption(){return z(r)}})}};W(a,e=>{(z(te)===`list`||!bE.isSmallScreen&&!z(ne))&&e(o)}),H(e,r)},$$slots:{default:!0}})}}),H(e,n)},n=M(()=>z(fe)??[]);GR(e,{get items(){return z(n)},itemKey:`id`,renderItem:t,$$slots:{renderItem:!0}})}},$$slots:{default:!0}}),D(t),H(e,t)};W(n,e=>{z(fe)?z(fe).length?e(a,-1):e(i,1):e(r)}),H(e,t)},s=q(t,`fieldConfig`,3,void 0),c=q(t,`multiple`,3,!1),l=q(t,`searchTerms`,3,``),u=q(t,`gridId`,3,void 0),d=q(t,`selectedResources`,31,()=>br([])),f=M(()=>T(t.serviceProps.serviceType,`stock_assets`)),p=M(()=>T(t.serviceProps.serviceId,``)),m=M(()=>T(t.serviceProps.serviceLabel,``)),h=M(()=>T(t.serviceProps.hotlinking,!1)),g=M(()=>T(t.serviceProps.authType,`api_key`)),_=M(()=>T(t.serviceProps.developerURL,``)),v=M(()=>T(t.serviceProps.apiKeyURL,``)),y=M(()=>t.serviceProps.apiKeyPattern),b=M(()=>t.serviceProps.init),x=M(()=>t.serviceProps.signIn),S=M(()=>t.serviceProps.list),C=M(()=>t.serviceProps.search),w=M(()=>t.serviceProps.upload),te=M(()=>z(p)===`picsum`?`grid`:n()?.type),ne=M(()=>z(f)===`stock_assets`),re=M(()=>s()?.media_libraries?.all??r()?.media_libraries?.all??{}),ie=M(()=>z(re).max_file_size??1/0),ae=br({userName:``,password:``}),oe=N(!0),se=N(!1),ce=N(``),le=N(``),ue=N(``),de=N(`initial`),fe=N(null),pe=N(void 0),me=N(br({show:!1,status:`info`,length:0})),he=N(br([])),ge=N(!1),_e=M(()=>({kind:t.kind,fieldConfig:s(),apiKey:z(ce),userName:z(le),password:z(ue)})),ve=async(e=``)=>{P(fe,null),e=e.trim();try{P(fe,await(e?z(C)?.(e,z(_e)):z(S)?.(z(_e)))??[],!0)}catch(e){P(pe,`search_fetch_failed`),console.error(e)}},ye=async e=>{let{downloadURL:t,fileName:n,credit:r}=e;if(z(h))return{url:t,credit:r};try{let e=await fetch(t),{ok:i,status:a}=e;if(!i)throw Error(`The response returned with HTTP status ${a}.`);let o=await e.blob();return{url:t,credit:r,file:new File([o],n,{type:o.type})}}catch(e){P(pe,`image_fetch_failed`),console.error(e)}},be=async e=>{if(!z(w))return;let t=await Promise.all(e.map(e=>FF(e,z(re))));if(e=t.filter(({oversized:e})=>!e).map(({file:e})=>e),P(he,t.filter(({oversized:e})=>e).map(({file:e})=>e.name),!0),z(he).length&&P(ge,!0),e.length){P(me,{show:!0,status:`info`,length:e.length},!0);try{let t=await z(w)(e,z(_e)),n=await Promise.all(t.map(e=>ye(e)));d(n.filter(e=>!!e).slice(0,c()?void 0:1)),P(fe,[...t,...z(fe)??[]],!0)}catch{P(me,{show:!0,status:`error`,length:e.length},!0)}}},xe=e=>d().some(t=>t.url===e.downloadURL),Se=async(e,t)=>{let n=d().filter(t=>t.url!==e.downloadURL);if(t){let t=await ye(e);t&&d([...n,t])}else d(n)};tc(()=>{(async()=>{typeof z(b)==`function`&&(P(oe,!1),P(oe,await z(b)(),!0)),z(oe)&&(P(ce,qO.apiKeys?.[z(p)]??``,!0),(e=>{var t=ee(e,2);P(le,t[0],!0),P(ue,t[1],!0)})((qO.logins?.[z(p)]??``).split(` `)),P(se,z(g)===`none`||!!z(ce)||!!z(ue),!0),P(fe,null))})()}),Qr(()=>{l(),z(se),zi(()=>{z(se)&&ve(l())})});var Ce={uploadFiles:be},we=pxe(),Te=I(we),Ee=e=>{var t=V(),n=I(t),r=e=>{k2(e,{children:(e,t)=>{var n=A5(),r=F(n,!0);D(n),R(e=>U(r,e),[()=>Y(`assets_dialog.error.${z(pe)}`)]),H(e,n)},$$slots:{default:!0}})},i=e=>{{let t=M(()=>s()?.accept);G6(e,{get accept(){return z(t)},multiple:!0,onDrop:({files:e})=>be(e),children:(e,t)=>{o(e)},$$slots:{default:!0}})}},a=e=>{o(e)};W(n,e=>{z(pe)?e(r):z(w)?e(i,1):e(a,-1)}),H(e,t)},De=e=>{k2(e,{children:(e,t)=>{var n=fxe(),r=I(n),i=F(r),a=e=>{var t=V();yo(I(t),()=>ux(Y(`prefs.media.stock_photos.description`,{values:{service:z(m),homeHref:`href="${z(_)}"`,apiKeyHref:`href="${z(v)}"`}}).replace(/[\u2068\u2069]/g,``),{ALLOWED_TAGS:[`a`],ALLOWED_ATTR:[`href`,`target`,`rel`]})),H(e,t)};W(i,e=>{z(ne)&&e(a)});var o=L(i,2),s=e=>{var t=V();yo(I(t),()=>ux(Y(`cloud_storage.${z(p)}.auth.${z(de)}`,{default:Y(`cloud_storage.auth.${z(g)}.${z(de)}`,{values:{service:z(m),key:Y(`cloud_storage.${z(p)}.auth_key_label`,{default:Y(`cloud_storage.auth.${z(g)}.key_label`)})}})}),{ALLOWED_TAGS:[`a`],ALLOWED_ATTR:[`href`,`target`,`rel`]})),H(e,t)};W(o,e=>{z(f)===`cloud_storage`&&e(s)}),D(r);var c=L(r,2),l=e=>{var t=uxe(),n=F(t);{let e=M(()=>Y(`prefs.media.stock_photos.field_label`,{values:{service:z(m)}}));hL(n,{dir:`ltr`,flex:!0,monospace:!0,spellcheck:`false`,get"aria-label"(){return z(e)},oninput:e=>{let t=e.target.value.trim();z(y)?.test(t)&&(P(ce,t,!0),P(se,!0),qO.apiKeys??={},qO.apiKeys[z(p)]=z(ce),ve())}})}D(t),H(e,t)};W(c,e=>{z(g)===`api_key`&&e(l)});var u=L(c,2),d=e=>{var t=dxe(),n=I(t),r=F(n);{let e=M(()=>Y(`user_name`)),t=M(()=>z(de)===`requested`);hL(r,{dir:`ltr`,flex:!0,spellcheck:`false`,get"aria-label"(){return z(e)},get disabled(){return z(t)},get value(){return ae.userName},set value(e){ae.userName=e}})}D(n);var i=L(n,2),a=F(i);{let e=M(()=>Y(`password`)),t=M(()=>z(de)===`requested`);y2(a,{get"aria-label"(){return z(e)},get disabled(){return z(t)},get value(){return ae.password},set value(e){ae.password=e}})}D(i);var o=L(i,2),s=F(o);{let e=M(()=>Y(`sign_in`)),t=M(()=>!ae.userName||!ae.password||z(de)===`requested`);wI(s,{variant:`secondary`,get label(){return z(e)},get disabled(){return z(t)},onclick:async()=>{P(de,`requested`),ae.userName=ae.userName.trim(),ae.password=ae.password.trim(),await z(x)?.(ae.userName,ae.password)?(P(de,`success`),P(le,ae.userName,!0),P(ue,ae.password,!0),P(se,!0),qO.logins??={},qO.logins[z(p)]=[z(le),z(ue)].join(` `),ve()):P(de,`error`)}})}D(o),H(e,t)};W(u,e=>{z(g)===`password`&&e(d)}),H(e,n)},$$slots:{default:!0}})},Oe=e=>{k2(e,{children:(e,t)=>{var n=A5(),r=F(n,!0);D(n),R(e=>U(r,e),[()=>Y(`cloud_storage.invalid`)]),H(e,n)},$$slots:{default:!0}})};W(Te,e=>{z(se)?e(Ee):z(oe)?e(De,1):e(Oe,-1)});var ke=L(Te,2);Bz(ke,{get show(){return z(me).show},set show(e){z(me).show=e},children:(e,t)=>{cI(e,{get status(){return z(me).status},children:(e,t)=>{var n=j5(),r=I(n),i=e=>{var t=ja();R(e=>U(t,e),[()=>Y(`uploading_files_progress`,{values:{count:z(me).length}})]),H(e,t)};W(r,e=>{z(me).status===`info`&&e(i)});var a=L(r,2),o=e=>{var t=ja();R(e=>U(t,e),[()=>Y(`uploading_files_failed`,{values:{count:z(me).length}})]),H(e,t)};W(a,e=>{z(me).status===`error`&&e(o)}),H(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}}),axe(L(ke,2),{get oversizedFileNames(){return z(he)},get maxSize(){return z(ie)},get open(){return z(ge)},set open(e){P(ge,e,!0)}}),H(e,we);var Ae=k(Ce);return a(),Ae}var A5,j5,lxe,uxe,dxe,fxe,pxe,mxe,hxe=o((()=>{Z(),J(),X(),$(),Kw(),dx(),rc(),Ybe(),exe(),ixe(),n6(),K6(),sxe(),IF(),AF(),f4(),SE(),JO(),A5=B(`<span role="alert"> </span>`),j5=B(`<!> <!>`,1),lxe=B(`<div role="none" class="grid-wrapper svelte-mqll9n"><!></div>`),uxe=B(`<div role="none" class="input-outer svelte-mqll9n"><!></div>`),dxe=B(`<div role="none" class="input-outer svelte-mqll9n"><!></div> <div role="none" class="input-outer svelte-mqll9n"><!></div> <div role="none" class="input-outer svelte-mqll9n"><!></div>`,1),fxe=B(`<p role="alert" class="svelte-mqll9n"><!> <!></p> <!> <!>`,1),pxe=B(`<!> <!> <!>`,1),mxe={hash:`svelte-mqll9n`,code:`.grid-wrapper.svelte-mqll9n {overflow-y:auto;height:100%;}p.svelte-mqll9n {margin:0 0 8px;}.input-outer.svelte-mqll9n {width:400px;max-width:100%;text-align:center;}`}}));function gxe(e,t){O(t,!0),G(e,bxe);let n=q(t,`multiple`,3,!1),r=q(t,`assets`,19,()=>[]),i=q(t,`viewType`,3,`grid`),a=q(t,`searchTerms`,3,``),o=q(t,`basePath`,3,void 0),s=q(t,`gridId`,3,void 0),c=q(t,`checkerboard`,3,!1),l=q(t,`selectedResources`,31,()=>br([])),u=q(t,`onSelect`,3,void 0),d=M(()=>a()?a().split(/\s+/).filter(Boolean):[]),f=M(()=>{let e=r().map(e=>{let{folder:t,name:n,path:r}=e,i=o()&&!t.entryRelative?kp(r.replace(o(),``)):n;return{...e,relPath:i}});return z(d).length&&(e=e.filter(({relPath:e})=>z(d).every(t=>k8(e).includes(t)))),e.filter((e,t,n)=>n.findIndex(t=>t.path===e.path)===t)}),p=e=>l().some(t=>t.asset?.path===e.path),m=(e,t)=>{let n=l().filter(t=>t.asset?.path!==e.path);t?(l([...n,{asset:e}]),u()?.({asset:e})):l(n)};var h=V(),g=I(h),_=e=>{var t=vxe();txe(F(t),{get multiple(){return n()},get gridId(){return s()},get viewType(){return i()},children:(e,t)=>{GR(e,{get items(){return z(f)},itemKey:`path`,renderItem:(e,t=E)=>{var r=V();Xa(I(r),Gw,null,e=>{let r=M(()=>{let{kind:e,unsaved:n,path:r,relPath:i}=t();return{kind:e,unsaved:n,path:r,relPath:i}});{let a=M(()=>p(t()));Xbe(e,{get value(){return z(r).path},get viewType(){return i()},get multiple(){return n()},get selected(){return z(a)},onChange:({detail:{selected:e}})=>{m(t(),e)},children:(e,n)=>{var a=_xe(),o=I(a),s=e=>{var t=M5(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>Y(`assets_dialog.unsaved`)]),H(e,t)};W(o,e=>{i()===`grid`&&z(r).unsaved&&e(s)});var l=L(o,2);t6(l,{get kind(){return z(r).kind},get asset(){return t()},get alt(){return z(r).relPath},variant:`tile`,get checkerboard(){return c()}});var u=L(l,2),d=e=>{Wbe(e,{get path(){return z(r).relPath},children:(e,t)=>{var n=V(),a=I(n),o=e=>{var t=M5(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>Y(`assets_dialog.unsaved`)]),H(e,t)};W(a,e=>{i()===`list`&&z(r).unsaved&&e(o)}),H(e,n)},$$slots:{default:!0}})};W(u,e=>{(!bE.isSmallScreen||i()===`list`)&&e(d)}),H(e,a)},$$slots:{default:!0}})}}),H(e,r)},$$slots:{renderItem:!0}})},$$slots:{default:!0}}),D(t),H(e,t)},v=e=>{k2(e,{children:(e,t)=>{var n=yxe(),r=F(n,!0);D(n),R(e=>U(r,e),[()=>Y(`no_files_found`)]),H(e,n)},$$slots:{default:!0}})};W(g,e=>{z(f).length?e(_):e(v,-1)}),H(e,h),k()}var M5,_xe,vxe,yxe,bxe,xxe=o((()=>{Z(),J(),X(),$(),Kw(),Np(),Ybe(),exe(),ixe(),n6(),j8(),SE(),M5=B(`<div role="none" class="unsaved svelte-1ong0f1"> </div>`),_xe=B(`<!> <!> <!>`,1),vxe=B(`<div role="none" class="grid-wrapper svelte-1ong0f1"><!></div>`),yxe=B(`<span role="none"> </span>`),bxe={hash:`svelte-1ong0f1`,code:`.grid-wrapper.svelte-1ong0f1 {overflow-y:auto;height:100%;[role='listbox'] {background-color:transparent;&.grid {.unsaved {position:absolute;inset-block-start:8px;inset-inline-end:8px;z-index:1;}}&.list {.name {display:flex;gap:8px;align-items:center;justify-content:space-between;}}}}.unsaved.svelte-1ong0f1 {display:flex;justify-content:center;align-items:center;border-color:var(--sui-info-border-color);border-radius:4px;padding:2px 6px;color:var(--sui-info-foreground-color);background-color:var(--sui-info-background-color);font-size:var(--sui-font-size-small);}`}}));function Sxe(e,t){O(t,!0);let n=()=>j(d4,`$selectAssetsView`,r),[r,i]=mn(),a=q(t,`multiple`,3,!1),o=q(t,`accept`,3,void 0),s=q(t,`assets`,19,()=>[]),c=q(t,`searchTerms`,3,``),l=q(t,`basePath`,3,void 0),u=q(t,`selectedResources`,31,()=>br([])),d=N(void 0);Qr(()=>{u().length||zi(()=>{z(d)?.reset()})}),Rs(G6(e,{get multiple(){return a()},get accept(){return o()},get onDrop(){return t.onDrop},children:(e,t)=>{{let t=M(()=>n()?.type);gxe(e,{get multiple(){return a()},get assets(){return s()},get viewType(){return z(t)},get searchTerms(){return c()},get basePath(){return l()},gridId:`select-assets-grid`,checkerboard:!0,get selectedResources(){return u()},set selectedResources(e){u(e)}})}},$$slots:{default:!0}}),e=>P(d,e,!0),()=>z(d)),k(),i()}var Cxe=o((()=>{Z(),J(),rc(),xxe(),K6(),f4()})),N5,P5,F5,I5=o((()=>{J(),$F(),N5={count:0,name:``,showDialog:!1,resolve:()=>{}},P5=br({...N5}),F5=async({files:e,listedAssets:t})=>{let n=QF(e,t),r=n.length;if(!r)return!1;let{promise:i,resolve:a}=Promise.withResolvers();Object.assign(P5,{count:r,name:n[0].name,showDialog:!0,resolve:a});let o=await i;return Object.assign(P5,{...N5}),o}})),wxe,L5,R5,z5,Txe,B5,Exe,V5=o((()=>{Ep(),Gp(),wxe=l(UO(),1),qp(),$F(),cm(),L5=({collectionName:e,fileName:t,typedKeyPath:n,isIndexFile:r})=>{let i=rm({collectionName:e,fileName:t,typedKeyPath:n,isIndexFile:r}),a=t?rm({collectionName:e,fileName:t}):void 0,o=rm({collectionName:e}),s=a??o,c=A(em),l={field:{folder:i,enabled:i!==void 0},entry:{folder:s,enabled:!!s&&(s.entryRelative||s.hasTemplateTags)},file:{folder:a,enabled:!!a&&!a.entryRelative&&!a.hasTemplateTags},collection:{folder:o,enabled:!!o&&!o.entryRelative&&!o.hasTemplateTags},global:{folder:c,enabled:c!==void 0}};return A($p).forEach(e=>{e.isAssetCollection&&e.collectionName&&(l[e.collectionName]={folder:e,enabled:!0})}),l},R5=({entry:e,folder:t})=>{let{entryRelative:n,internalPath:r,internalSubPath:i}=t??{};if(!n)return r?.replace(`{{slug}}`,e?.slug??`-`);let a=i||void 0;if(e){let t=Rp(Object.values(e.locales)[0].path).dirname;return a?`${t}/${a}`:t}return a?`${r}/${a}/-`:`${r}/-`},z5=({path:e,folderPath:t})=>t!==void 0&&(e===t||`${e}/-`===t||e.startsWith(`${t}/`)),Txe=({asset:e,folder:t,folderPath:n})=>{if(t===void 0||e.folder?.internalPath!==t.internalPath||e.folder?.entryRelative!==t.entryRelative)return!1;if(!t.entryRelative)return z5({path:e.path,folderPath:n});let{dirname:r}=Rp(e.path);return r===void 0?!1:z5({path:r,folderPath:n})},B5=({kind:e,folder:t,folderPath:n,unsavedAssets:r})=>[...A(LF),...r].filter(t=>!e||e===t.kind).sort((e,t)=>e.name.localeCompare(t.name)).sort((e,t)=>Number(!!t.unsaved)-Number(!!e.unsaved)).filter(e=>Txe({asset:e,folder:t,folderPath:n})),Exe=async({hash:e,folder:t,unsavedAssets:n})=>(await Promise.all(n.map(async n=>!!n.file&&(0,wxe.default)(n.folder,t)&&await Tp(n.file)===e))).includes(!0)})),H5,Dxe,U5,W5,G5,Oxe,K5,q5=o((()=>{Ep(),H5=l(UO(),1),dx(),qp(),$F(),lN(),yT(),IF(),FE(),Dxe=/(?<path>.+?)(?:\/[^/]+)?$/,U5=async({draft:e,file:t,folder:n})=>{let r=await Tp(t),i;return await Promise.all(Object.entries(e.files??{}).map(async([e,t])=>{!i&&await Tp(t.file)===r&&(!n?.entryRelative||(0,H5.default)(t.folder,n))&&(i=e)})),i},W5=async({file:e,blobURL:t,folder:n,targetFolderPath:r})=>{let{name:i,size:a}=e;return{unsaved:!0,file:e,blobURL:t??URL.createObjectURL(e),name:i,path:r?`${r}/${i}`:i,sha:await PE(e),size:a,kind:vT(i),folder:n}},G5=async({draft:e,targetFolderPath:t})=>Promise.all(Object.entries(e.files).map(async([e,{file:n,folder:r}])=>W5({file:n,blobURL:e,folder:r,targetFolderPath:t}))),Oxe=(e,t)=>{let n=A(LF);if(!t?.entryRelative)return n;let{originalEntry:r,defaultLocale:i,collection:a}=e,o=r?.locales[i]?.path;if(!o)return[];let s=a._type===`entry`?a._file.subPath:void 0,c=s?.includes(`/`)?s.split(`/`).at(-1):void 0,l=o.substring(0,o.lastIndexOf(`.`));c&&!c.includes(`{{`)&&(l=l.match(Dxe)?.groups?.path??l);let u=[l,t.internalSubPath].filter(Boolean).join(`/`);return n.filter(e=>e.path.startsWith(`${u}/`))},K5=async({draft:e,resource:t,libraryConfig:n})=>{let{url:r,credit:i,replace:a=!1}=t,{asset:o,file:s}=t,c=``,l;if(s){let{folder:r}=t,i=await U5({draft:e,file:s,folder:r});if(i)c=i;else{let{file:t,oversized:i}=await FF(s,n??{});s=t;let u=await PE(s),d=[...Oxe(e,r),...await G5({draft:e})].find(e=>e.sha===u&&(0,H5.default)(e.folder,r));d?(o=d,s=void 0):i?(l=s.name,s=void 0):(c=URL.createObjectURL(s),e.files[c]={file:s,folder:r,replace:a})}}return o&&(o.unsaved?o.file&&(c=await U5({draft:e,file:o.file,folder:o.folder})):c=oN(o,{pathOnly:!0,allowSpecial:!0,entry:e.originalEntry})),r&&!s&&!o&&(c=r),{value:c,credit:i?ux(i,{ALLOWED_TAGS:[`a`],ALLOWED_ATTR:[`href`]}):``,oversizedFileName:l}}})),J5,Y5,X5,kxe,Axe,Z5,jxe,Mxe,Nxe,Pxe=o((()=>{X(),Kw(),J5=[`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(`,`),Y5=`https://api.pexels.com/v1`,X5={per_page:80},kxe=/\/photo\/(?<alt>.+?)-\d+\/$/,Axe=()=>{let e=Hh.current.toLowerCase(),[t]=e.split(`-`);return J5.find(t=>t.toLowerCase()===e)??J5.find(e=>e.split(`-`)[0]===t)??`en-US`},Z5=e=>e.map(({id:e,url:t,alt:n,src:{large2x:r,medium:i},photographer:a})=>({id:String(e),description:t.match(kxe)?.groups?.alt.replace(/-/g,` `)??n,previewURL:i,downloadURL:r,fileName:`pexels-${a.split(/\s+/).join(`-`).toLowerCase()}-${e}.jpg`,kind:`image`,credit:`<a href="${t}">Photo by ${a} on Pexels</a>`})),jxe=async({apiKey:e})=>{let t={Authorization:e},n=new URLSearchParams(X5),r=await fetch(`${Y5}/curated?${n}`,{headers:t});if(!r.ok)return Promise.reject();let i=(await r.json()).photos;return Z5(i)},Mxe=async(e,{apiKey:t})=>{let n={Authorization:t},r=new URLSearchParams({...X5,query:e,locale:Axe()}),i=[];for(let e=1;e<=2;e+=1){r.set(`page`,String(e));let t=await fetch(`${Y5}/search?${r}`,{headers:n});if(!t.ok)return Promise.reject();let{photos:a,next_page:o}=await t.json();if(i.push(...a),!o)break;await Gw(50)}return Z5(i)},Nxe={serviceType:`stock_assets`,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}$/,list:jxe,search:Mxe}})),Fxe,Ixe,Lxe,Rxe,zxe,Bxe,Vxe,Hxe=o((()=>{Fxe=`https://picsum.photos/v2/list`,Ixe=100,Lxe=10,Rxe=3,zxe=e=>e.map(({id:e,width:t,height:n})=>{let r=t>=n,[i,a]=r?[1920,1280]:[1280,1920],[o,s]=r?[480,320]:[320,480];return{id:e,description:``,previewURL:`https://picsum.photos/id/${e}/${o}/${s}.webp`,downloadURL:`https://picsum.photos/id/${e}/${i}/${a}.webp`,fileName:`picsum-${e}.webp`,kind:`image`}}),Bxe=async()=>{let e=Array.from({length:Lxe},(e,t)=>t+1).sort(()=>Math.random()-.5).slice(0,Rxe),t=await Promise.all(e.map(e=>fetch(`${Fxe}?page=${e}&limit=${Ixe}`)));if(t.some(e=>!e.ok))return Promise.reject();let n=await Promise.all(t.map(e=>e.json()));return zxe(n.flat().sort(()=>Math.random()-.5))},Vxe={serviceType:`stock_assets`,serviceId:`picsum`,serviceLabel:`Lorem Picsum`,serviceURL:`https://picsum.photos/`,showServiceLink:!0,hotlinking:!0,authType:`none`,list:Bxe}})),Uxe,Q5,$5,e7,t7,Wxe,Gxe,Kxe,qxe=o((()=>{X(),Uxe=`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(`,`),Q5=`https://pixabay.com/api`,$5={image_type:`photo`,min_width:1280,safesearch:!0,per_page:150},e7=e=>e.map(({id:e,webformatURL:t,previewURL:n,largeImageURL:r,imageWidth:i,imageHeight:a,pageURL:o,tags:s,user:c})=>({id:String(e),description:s,previewURL:t.replace(`_640.`,i>a?`_180.`:`_340.`),downloadURL:r,fileName:n.split(`/`).pop().replace(`_150.`,`_1280.`),kind:`image`,credit:`<a href="${o}">Photo by ${c} on Pixabay`})),t7=()=>{let[e]=Hh.current.toLowerCase().split(`-`);return Uxe.includes(e)?e:`en`},Wxe=async({apiKey:e})=>{let t=new URLSearchParams({...$5,key:e,lang:t7(),editors_choice:`true`}),n=await fetch(`${Q5}/?${t}`);if(!n.ok)return Promise.reject();let r=(await n.json()).hits;return e7(r)},Gxe=async(e,{apiKey:t})=>{let n=new URLSearchParams({...$5,key:t,lang:t7(),q:e}),r=await fetch(`${Q5}/?${n}`);if(!r.ok)return Promise.reject();let i=(await r.json()).hits;return e7(i)},Kxe={serviceType:`stock_assets`,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}$/,list:Wxe,search:Gxe}})),n7,r7,i7,a7,Jxe,o7,Yxe,Xxe,Zxe,Qxe=o((()=>{X(),Kw(),n7=[`af,sq,am,ar,hy,as,az,bn,ba,eu,bs,bg,yue,ca,lzh,zh-Hans,zh-Hant,hr,cs,da,prs,dv,nl,en,et,fo,fj`,`fil,fi,fr,fr-ca,gl,ka,de,el,gu,ht,he,hi,mww,hu,is,id,ikt,iu,iu-Latn,ga,it,ja,kn,kk,km,ko,ku,kmr`,`ky,lo,lv,lt,mk,mg,ms,ml,mt,mi,mr,mn-Cyrl,mn-Mong,my,ne,nb,or,ps,fa,pl,pt,pt-pt,pa,otq,ro,ru,sm`,`sr-Cyrl,sr-Latn,sk,sl,so,es,sw,sv,ty,ta,tt,te,th,bo,ti,to,tr,tk,uk,hsb,ur,ug,uz,vi,cy,yua,zu`].join(`,`).split(`,`),r7=`https://api.unsplash.com`,i7=`utm_source=sveltia-cms&utm_medium=referral`,a7={per_page:30},Jxe=()=>{let e=Hh.current.toLowerCase(),[t]=e.split(`-`);return n7.find(t=>t.toLowerCase()===e)??n7.find(e=>e.split(`-`)[0]===t)??`en`},o7=e=>e.map(({id:e,description:t,alt_description:n,urls:{regular:r,thumb:i},user:{username:a,name:o}})=>({id:String(e),description:[t,n].filter(Boolean).join(` — `),previewURL:i,downloadURL:r,fileName:`${o.split(/\s+/).join(`-`).toLowerCase()}-${e}-unsplash.jpg`,kind:`image`,credit:`Photo by <a href="https://unsplash.com/@${a}?${i7}">${o}</a> on <a href="https://unsplash.com/?${i7}">Unsplash</a>`})),Yxe=async({apiKey:e})=>{let t={Authorization:`Client-ID ${e}`},n=new URLSearchParams(a7),r=await fetch(`${r7}/photos?${n}`,{headers:t});if(!r.ok)return Promise.reject();let i=await r.json();return o7(i)},Xxe=async(e,{apiKey:t})=>{let n={Authorization:`Client-ID ${t}`},r=new URLSearchParams({...a7,query:e,lang:Jxe()}),i=[];for(let e=1;e<=5;e+=1){r.set(`page`,String(e));let t=await fetch(`${r7}/search/photos?${r}`,{headers:n});if(!t.ok)return Promise.reject();let{results:a,total_pages:o}=await t.json();if(i.push(...a),o===e)break;await Gw(50)}return o7(i)},Zxe={serviceType:`stock_assets`,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,}$/,list:Yxe,search:Xxe}})),s7,c7,$xe=o((()=>{MF(),Pxe(),Hxe(),qxe(),Qxe(),s7={pexels:Nxe,picsum:Vxe,pixabay:Kxe,unsplash:Zxe},c7=({fieldConfig:e}={})=>{let t=jF({libraryName:`stock_assets`,fieldConfig:e});if(t===!1)return{providers:[]};let n=Object.keys(s7),{providers:r}=t;return{providers:Array.isArray(r)?r:n}}}));function eSe(e,t){let n=Ma();O(t,!0),G(e,oSe);let r=()=>j(t.entryDraft,`$entryDraft`,o),i=()=>j(a4,`$showContentOverlay`,o),a=()=>j(d4,`$selectAssetsView`,o),[o,s]=mn(),c=e=>{var n=l7(),r=I(n),i=e=>{var n=l7(),r=I(n),i=e=>{{let t=M(()=>d4);C8(e,{get currentView(){return z(t)},"aria-controls":`select-assets-grid`})}};W(r,e=>{a()&&e(i)});var o=L(r,2);{let e=M(()=>!z(ne)),n=M(()=>z(x).some(e=>e.file)),r=M(()=>Y(`assets_dialog.search_for_${t.kind??`file`}`));YR(o,{dir:`auto`,get flex(){return bE.isSmallScreen},get debounce(){return z(e)},get disabled(){return z(n)},get"aria-label"(){return z(r)},get value(){return z(g)},set value(e){P(g,e,!0)}})}H(e,n)};W(r,e=>{(z(ne)||z(le)&&z(_)!==`cloudinary`||z(ue)&&z(_)!==`picsum`)&&e(i)});var o=L(r,2),s=e=>{{let t=e=>{oI(e,{name:`cloud_upload`})},n=M(()=>Y(`upload`));wI(e,{variant:`primary`,get label(){return z(n)},onclick:()=>{z(b)?.open()},startIcon:t,$$slots:{startIcon:!0}})}};W(o,e=>{(z(ne)||z(le)&&z(_)!==`cloudinary`)&&e(s)}),H(e,n)},l=q(t,`open`,15,!1),u=q(t,`multiple`,3,!1),d=q(t,`accept`,19,()=>t.kind===`image`?kM.join(`,`):void 0),f=q(t,`canEnterURL`,3,!0),p=q(t,`onSelect`,3,void 0),m=q(t,`pendingFiles`,31,()=>br([])),h=N(``),g=N(``),_=N(`default-global`),v=N(br([])),y=N(br([])),b=N(void 0),x=N(br([])),S=N(void 0),C=(e,t)=>{let n=e[1].serviceLabel.toLowerCase(),r=t[1].serviceLabel.toLowerCase();return n.localeCompare(r)},w=M(()=>t.kind===`image`?Y(`assets_dialog.title.image`):Y(`assets_dialog.title.file`)),T=M(()=>k8(z(g))),te=M(()=>jF({fieldConfig:t.fieldConfig})!==!1&&Object.values(t.assetLibraryFolderMap).some(({enabled:e})=>e)),ne=M(()=>z(_).startsWith(`default-`)),re=M(()=>{if(!z(ne))return;let e=z(_).replace(`default-`,``),{folder:n}=t.assetLibraryFolderMap[e];return n}),ie=M(()=>R5({entry:r()?.originalEntry,folder:z(re)})),ae=M(()=>B5({kind:t.kind,folder:z(re),folderPath:z(ie),unsavedAssets:z(y)})),oe=M(()=>{let{providers:e=[]}=c7({fieldConfig:t.fieldConfig});return Object.entries(s7).filter(([t,{hotlinking:n}])=>e.includes(t)&&(n||z(te))).sort(C)}),se=M(()=>z(oe).some(([e,{authType:t}])=>e===z(_)&&(t===`none`||!!qO.apiKeys?.[z(_)]))),ce=M(()=>[...t.enabledCloudServiceEntries,...z(oe)].sort(C)),le=M(()=>t.enabledCloudServiceEntries.map(([e])=>e).includes(z(_))),ue=M(()=>z(oe).map(([e])=>e).includes(z(_))),de=M(()=>bE.isSmallScreen?sz:UL),E=async e=>{let t=await Tp(e),n=z(re);if(await Exe({hash:t,folder:n,unsavedAssets:z(y)}))return;let r=await W5({file:e,folder:n,targetFolderPath:z(ie)});return z(v).push(r),r},fe=async e=>{let t=await F5({files:e,listedAssets:z(ae)});t!==void 0&&P(x,(await Promise.all(e.map(e=>E(e)))).filter(e=>!!e).map(e=>({asset:e,replace:t})),!0)},pe=()=>{P(h,``),P(g,``),P(v,[],!0),P(y,[],!0),P(x,[],!0)},me=()=>{if(!z(x).length)return;let e=At(z(x)).map(e=>{let{asset:{unsaved:t,file:n,folder:r}={},replace:i}=e;return t?{file:n,folder:r,replace:i}:e});p()?.(e)};ei(()=>{let e=z(te)?Object.entries(t.assetLibraryFolderMap).find(([,{enabled:e}])=>e)?.[0]:void 0;e?P(_,`default-${e}`):P(_,z(ce)[0]?.[0],!0)}),Qr(()=>{r()?.files,At(z(v)),(async()=>{P(y,[...r()?.files?await G5({draft:r(),targetFolderPath:z(ie)}):[],...Object.values(z(v))],!0)})()}),Qr(()=>{i()||l(!1)}),Qr(()=>{z(S)&&m().length&&(z(S).uploadFiles(m()),m([]))});var he=l7(),ge=I(he);{let e=e=>{var t=V(),n=I(t),r=e=>{c(e)};W(n,e=>{bE.isSmallScreen||e(r)}),H(e,t)},r=e=>{var t=V(),n=I(t),r=e=>{let t=M(()=>{let{showServiceLink:e,serviceLabel:t,serviceURL:n}=s7[z(_)]??{};return{showServiceLink:e,serviceLabel:t,serviceURL:n}});var n=V(),r=I(n),i=e=>{var n=tSe(),r=F(n,!0);D(n),R(e=>{K(n,`href`,z(t).serviceURL),U(r,e)},[()=>Y(`prefs.media.stock_photos.credit`,{values:{service:z(t).serviceLabel}})]),H(e,n)};W(r,e=>{z(t).showServiceLink&&e(i)}),H(e,n)};W(n,e=>{z(se)&&e(r)}),H(e,t)},i=M(()=>Y(`insert`)),a=M(()=>!z(x).length);nL(ge,{get title(){return z(w)},size:`x-large`,get okLabel(){return z(i)},get okDisabled(){return z(a)},keepContent:!0,focusInput:!1,onOk:me,onClose:()=>{pe()},get open(){return l()},set open(e){l(e)},headerExtra:e,footerExtra:r,children:(e,r)=>{var i=aSe(),a=F(i),o=F(a);{let e=M(()=>Y(`assets_dialog.locations`));To(o,()=>z(de),(r,i)=>{i(r,{class:`tabs`,get"aria-label"(){return z(e)},get"aria-controls"(){return`${n}-content-pane`},filterThreshold:-1,onChange:e=>{P(_,e.detail.name,!0),P(x,[],!0)},children:(e,n)=>{var r=nSe(),i=I(r),a=e=>{{let n=M(()=>Y(`asset_location.repository`));JL(e,{get label(){return z(n)},children:(e,n)=>{var r=V();uo(I(r),17,()=>Object.entries(t.assetLibraryFolderMap),([e,{folder:t,enabled:n}])=>e,(e,t)=>{var n=M(()=>ee(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1].folder,a=()=>z(n)[1].enabled;var o=V(),s=I(o),c=e=>{let t=M(()=>`default-${r()}`);{let n=M(()=>i()?.label??Y(`assets_dialog.folder.${r()}`)),a=M(()=>z(_)===z(t));QL(e,{get name(){return z(t)},get label(){return z(n)},get selected(){return z(a)}})}};W(s,e=>{a()&&e(c)}),H(e,o)}),H(e,r)},$$slots:{default:!0}})}};W(i,e=>{z(te)&&e(a)});var o=L(i,2),s=e=>{{let n=M(()=>Y(`asset_location.external`));JL(e,{get label(){return z(n)},children:(e,n)=>{var r=l7(),i=I(r);uo(i,17,()=>t.enabledCloudServiceEntries,([,{serviceId:e,serviceLabel:t}])=>e,(e,t)=>{var n=M(()=>ee(z(t),2));let r=()=>z(n)[1].serviceId,i=()=>z(n)[1].serviceLabel;{let t=M(()=>z(_)===r());QL(e,{get name(){return r()},get label(){return i()},get selected(){return z(t)}})}});var a=L(i,2),o=e=>{{let t=M(()=>Y(`assets_dialog.enter_url`)),n=M(()=>z(_)===`enter-url`);QL(e,{name:`enter-url`,get label(){return z(t)},get selected(){return z(n)}})}};W(a,e=>{f()&&e(o)}),H(e,r)},$$slots:{default:!0}})}},c=M(()=>f()||!!Object.keys(t.enabledCloudServiceEntries).length);W(o,e=>{z(c)&&e(s)});var l=L(o,2),u=e=>{{let t=M(()=>Y(`asset_location.stock_photos`));JL(e,{get label(){return z(t)},children:(e,t)=>{var n=V();uo(I(n),17,()=>z(oe),([e,{serviceLabel:t}])=>e,(e,t)=>{var n=M(()=>ee(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1].serviceLabel;{let t=M(()=>z(_)===r());QL(e,{get name(){return r()},get label(){return i()},get selected(){return z(t)}})}}),H(e,n)},$$slots:{default:!0}})}};W(l,e=>{z(oe).length&&e(u)}),H(e,r)},$$slots:{default:!0}})})}var s=L(o,2),p=e=>{var t=rSe(),n=F(t);c(n),D(t),H(e,t)};W(s,e=>{bE.isSmallScreen&&e(p)}),D(a);var m=L(a,2),g=F(m),v=e=>{Sxe(e,{get accept(){return d()},get multiple(){return u()},get assets(){return z(ae)},get searchTerms(){return z(T)},get basePath(){return z(re).internalPath},onDrop:({files:e})=>{fe(e)},get selectedResources(){return z(x)},set selectedResources(e){P(x,e,!0)}})};W(g,e=>{z(ne)&&z(re)&&e(v)});var y=L(g,2),b=e=>{k2(e,{children:(e,n)=>{var r=iSe(),i=I(r),a=F(i,!0);D(i),hL(L(i,2),{dir:`ltr`,flex:!0,oninput:()=>{let e=z(h).trim();P(x,e?[{url:e}]:[],!0)},get value(){return z(h)},set value(e){P(h,e,!0)}}),R(e=>U(a,e),[()=>t.kind===`image`?Y(`assets_dialog.enter_image_url`):Y(`assets_dialog.enter_file_url`)]),H(e,r)},$$slots:{default:!0}})};W(y,e=>{f()&&z(_)===`enter-url`&&e(b)}),uo(L(y,2),17,()=>z(ce),([e,t])=>e,(e,n)=>{var r=M(()=>ee(z(n),2));let i=()=>z(r)[0],a=()=>z(r)[1];var o=V(),s=I(o),c=e=>{{let n=M(()=>z(_)!==`cloudinary`);zbe(e,{get kind(){return t.kind},get fieldConfig(){return t.fieldConfig},get multiple(){return u()},get hidden(){return z(n)},onSelect:e=>{l()&&(P(x,e,!0),me(),l(!1))}})}},d=e=>{Rs(cxe(e,{get kind(){return t.kind},get fieldConfig(){return t.fieldConfig},get multiple(){return u()},get searchTerms(){return z(T)},get serviceProps(){return a()},gridId:`select-assets-grid`,get selectedResources(){return z(x)},set selectedResources(e){P(x,e,!0)}}),e=>P(S,e,!0),()=>z(S))};W(s,e=>{i()===`cloudinary`?e(c):z(_)===i()&&e(d,1)}),H(e,o)}),D(m),D(i),R(()=>K(m,`id`,`${n}-content-pane`)),H(e,i)},$$slots:{headerExtra:!0,footerExtra:!0,default:!0}})}Rs(TL(L(ge,2),{get accept(){return d()},get multiple(){return u()},onSelect:({files:e})=>{z(le)?z(S)?.uploadFiles(e):fe(e)}}),e=>P(b,e,!0),()=>z(b)),H(e,he),k(),s()}var l7,tSe,nSe,rSe,iSe,aSe,oSe,sSe=o((()=>{Z(),J(),X(),$(),Ep(),Ube(),hxe(),Cxe(),w8(),f4(),I5(),V5(),q5(),MF(),$xe(),j8(),SE(),JO(),jM(),l7=B(`<!> <!>`,1),tSe=B(`<a class="service-link svelte-5b1zbe"> </a>`),nSe=B(`<!> <!> <!>`,1),rSe=B(`<div role="none" class="filter-tools svelte-5b1zbe"><!></div>`),iSe=B(`<div role="none"> </div> <!>`,1),aSe=B(`<div role="none" class="wrapper svelte-5b1zbe"><div role="none" class="nav svelte-5b1zbe"><!> <!></div> <div role="none" class="content-pane svelte-5b1zbe"><!> <!> <!></div></div>`),oSe={hash:`svelte-5b1zbe`,code:`.wrapper.svelte-5b1zbe {display:flex;gap:16px;height:60dvh;max-height:800px;--tile-padding: 4px;
960
+ ${JSON.stringify(e)}\n\nRespond with JSON only:`,zve=(e,t,n)=>{let r;try{r=JSON.parse(e)}catch{throw Error(`Failed to parse JSON response from ${n}.`)}if(!Array.isArray(r))throw Error(`Invalid JSON structure in ${n} response.`);if(r.length!==t)throw Error(`Translation count mismatch: expected ${t}, got ${r.length}`);return r},u5=async({sourceLanguage:e,targetLanguage:t})=>!!l5(e)&&!!l5(t),Bve=(e,t)=>{let n=l5(e),r=l5(t);if(!n)throw Error(`Source locale is not supported.`);if(!r)throw Error(`Target locale is not supported.`);return[n,r]},d5=(e,t,n,r={})=>async(i,{sourceLanguage:a,targetLanguage:o,apiKey:s})=>{let[c,l]=Bve(a,o);try{let a=await e({apiKey:s,model:t,systemPrompt:Lve(c,l),userMessage:Rve(i),...r});return zve(a,i.length,n)}catch(e){throw e instanceof Error?e:Error(`Failed to translate text with ${n}.`)}}})),Vve,Hve,Uve,Wve,Gve=o((()=>{Ive(),f5(),Vve=`anthropic`,Hve=`Anthropic Claude`,Uve=`claude-haiku-4-5`,Wve={serviceId:Vve,serviceLabel:Hve,apiLabel:c5,developerURL:Mve,apiKeyURL:Nve,apiKeyPattern:Pve,markdownSupported:!0,availability:u5,translate:d5(Fve,Uve,c5)}})),Kve,p5,qve,Jve,Yve,Xve,Zve=o((()=>{Kve=`https://api.deepseek.com/chat/completions`,p5=`DeepSeek API`,qve=`https://api-docs.deepseek.com/`,Jve=`https://platform.deepseek.com/api_keys`,Yve=/sk-[a-zA-Z0-9]{32,}/,Xve=async({apiKey:e,model:t,systemPrompt:n,userMessage:r,temperature:i=.3,maxTokens:a=4e3,reasoning:o=!0})=>{let s=await fetch(Kve,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${e}`},body:JSON.stringify({model:t,messages:[{role:`system`,content:n},{role:`user`,content:r}],temperature:i,max_tokens:a,thinking:{type:o?`enabled`:`disabled`},stream:!1})});if(!s.ok){let e=await s.json().catch(()=>({}));throw Error(`DeepSeek API error: ${s.status} ${s.statusText}${e.error?.message?` - ${e.error.message}`:``}`)}let c=await s.json();if(!c.choices||!Array.isArray(c.choices)||!c.choices[0]?.message?.content)throw Error(`Invalid response format from DeepSeek API.`);return c.choices[0].message.content.trim()}})),Qve,$ve,eye,tye,nye=o((()=>{Zve(),f5(),Qve=`deepseek`,$ve=`DeepSeek`,eye=`deepseek-v4-flash`,tye={serviceId:Qve,serviceLabel:$ve,apiLabel:p5,developerURL:qve,apiKeyURL:Jve,apiKeyPattern:Yve,markdownSupported:!0,availability:u5,translate:d5(Xve,eye,p5,{reasoning:!1})}})),rye,iye,aye,oye,sye,cye,m5,h5,lye,uye,g5,dye=o((()=>{rye=`google`,iye=`Google Cloud Translation`,aye=`Cloud Translation API`,oye=`https://console.cloud.google.com/apis/library/translate.googleapis.com`,sye=`https://console.cloud.google.com/apis/api/translate.googleapis.com/credentials`,cye=/AIza[0-9A-Za-z-_]{35}/,m5=[`ab,ace,ach,af,ak,alz,am,ar,as,awa,ay,az`,`ba,ban,bbc,be,bem,bew,bg,bho,bik,bm,bn,br,bs,bts,btx,bua`,`ca,ceb,cgg,chm,ckb,cnh,co,crh,crs,cs,cv,cy`,`da,de,din,doi,dov,dv,dz`,`ee,el,en,eo,es,et,eu`,`fa,ff,fi,fil,fj,fr,fr-CA,fr-FR,fy`,`ga,gaa,gd,gl,gn,gom,gu`,`ha,haw,he,hi,hil,hmn,hr,hrx,ht,hu,hy`,`id,ig,ilo,is,it,iw`,`ja,jv,jw`,`ka,kk,km,kn,ko,kri,ktu,ku,ky`,`la,lb,lg,li,lij,lmo,ln,lo,lt,ltg,luo,lus,lv`,`mai,mak,mg,mi,min,mk,ml,mn,mni-Mtei,mr,ms,ms-Arab,mt,my`,`ne,new,nl,no,nr,nso,nus,ny`,`oc,om,or`,`pa,pa-Arab,pag,pam,pap,pl,ps,pt,pt-BR,pt-PT`,`qu`,`rn,ro,rom,ru,rw`,`sa,scn,sd,sg,shn,si,sk,sl,sm,sn,so,sq,sr,ss,st,su,sv,sw,szl`,`ta,te,tet,tg,th,ti,tk,tl,tn,tr,ts,tt`,`ug,uk,ur,uz`,`vi`,`xh`,`yi,yo,yua,yue`,`zh,zh-CN,zh-TW,zu`].join(`,`).split(`,`),h5=e=>{let t=e.replace(/^([a-z]{2,3})[-_]([a-z]{2,4})$/i,(e,t,n)=>`${t.toLowerCase()}-${n.toUpperCase()}`);if(m5.includes(t))return t;if([`zh-HK`,`zh-MO`].includes(t))return`zh-TW`;let[n]=t.split(`-`);if(m5.includes(n))return n},lye=async({sourceLanguage:e,targetLanguage:t})=>!!h5(e)&&!!h5(t),uye=async(e,{sourceLanguage:t,targetLanguage:n,apiKey:r})=>{if(t=h5(t)??``,n=h5(n)??``,!t)throw Error(`Source locale is not supported.`);if(!n)throw Error(`Target locale is not supported.`);let i={q:e,source:t,target:n,format:`html`};try{let e=await fetch(`https://translation.googleapis.com/language/translate/v2`,{method:`POST`,headers:{"Content-Type":`application/json`,"X-goog-api-key":r},body:JSON.stringify(i)});if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(`Google Translate API error: ${e.status} ${e.statusText}${t.error?.message?` - ${t.error.message}`:``}`)}let{data:t}=await e.json();return t.translations.map(e=>e.translatedText.replace(/&#39;/g,`'`))}catch(e){throw e instanceof Error?e:Error(`Failed to translate text with Google Translate API.`)}},g5={serviceId:rye,serviceLabel:iye,apiLabel:aye,developerURL:oye,apiKeyURL:sye,apiKeyPattern:cye,markdownSupported:!1,availability:lye,translate:uye}})),_5,fye,pye,mye,hye,gye=o((()=>{_5=`Gemini API`,fye=`https://ai.google.dev/gemini-api/docs`,pye=`https://aistudio.google.com/api-keys`,mye=/AIza[a-zA-Z0-9_-]{35}/,hye=async({apiKey:e,model:t,systemPrompt:n,userMessage:r,temperature:i=.3,maxTokens:a=4e3,responseFormat:o})=>{let s=`https://generativelanguage.googleapis.com/v1beta/models/${t}:generateContent?key=${e}`,c=await fetch(s,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({system_instruction:{parts:[{text:n}]},contents:[{parts:[{text:r}]}],generationConfig:{temperature:i,maxOutputTokens:a,...o?{responseMimeType:o}:{}}})});if(!c.ok){let e=await c.json().catch(()=>({}));throw Error(`Gemini API error: ${c.status} ${c.statusText}${e.error?.message?` - ${e.error.message}`:``}`)}let l=await c.json();if(!Array.isArray(l.candidates)||!l.candidates[0]?.content?.parts?.[0])throw Error(`Invalid response format from Gemini API.`);return l.candidates[0].content.parts[0].text.trim()}})),_ye,vye,yye,bye,xye=o((()=>{gye(),f5(),_ye=`google-ai`,vye=`Google Gemini`,yye=`gemini-3.1-flash-lite`,bye={serviceId:_ye,serviceLabel:vye,apiLabel:_5,developerURL:fye,apiKeyURL:pye,apiKeyPattern:mye,markdownSupported:!0,availability:u5,translate:d5(hye,yye,_5,{responseFormat:`application/json`})}})),Sye,v5,Cye,wye,Tye,Eye,Dye=o((()=>{Sye=`https://api.mistral.ai/v1/chat/completions`,v5=`Mistral AI API`,Cye=`https://docs.mistral.ai/`,wye=`https://console.mistral.ai/home?profile_dialog=api-keys`,Tye=/[a-zA-Z0-9]{32,}/,Eye=async({apiKey:e,model:t,systemPrompt:n,userMessage:r,temperature:i=.3,maxTokens:a=4e3,reasoning:o=!0})=>{let s=await fetch(Sye,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${e}`},body:JSON.stringify({model:t,messages:[{role:`system`,content:n},{role:`user`,content:r}],temperature:i,max_tokens:a,reasoning_effort:o?`high`:`none`,stream:!1})});if(!s.ok){let e=await s.json().catch(()=>({}));throw Error(`Mistral AI API error: ${s.status} ${s.statusText}${e.message?` - ${e.message}`:``}`)}let c=await s.json();if(!c.choices||!Array.isArray(c.choices)||!c.choices[0]?.message?.content)throw Error(`Invalid response format from Mistral AI API.`);return c.choices[0].message.content.trim()}})),Oye,kye,Aye,jye,Mye=o((()=>{Dye(),f5(),Oye=`mistral`,kye=`Mistral`,Aye=`mistral-small-latest`,jye={serviceId:Oye,serviceLabel:kye,apiLabel:v5,developerURL:Cye,apiKeyURL:wye,apiKeyPattern:Tye,markdownSupported:!0,availability:u5,translate:d5(Eye,Aye,v5,{reasoning:!1})}})),Nye,y5,Pye,Fye,Iye,Lye,Rye,zye,Bye=o((()=>{Nye=`https://api.openai.com/v1/responses`,y5=`OpenAI API`,Pye=`https://platform.openai.com/docs/overview`,Fye=`https://platform.openai.com/api-keys`,Iye=/sk-[a-zA-Z0-9-_]{40,}/,Lye=e=>typeof e==`object`&&!!e&&`type`in e&&e.type===`message`&&`content`in e&&Array.isArray(e.content),Rye=e=>typeof e==`object`&&!!e&&`type`in e&&e.type===`output_text`&&`text`in e&&typeof e.text==`string`,zye=async({apiKey:e,model:t,systemPrompt:n,userMessage:r,temperature:i=.3,maxTokens:a=4e3})=>{let o=await fetch(Nye,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${e}`},body:JSON.stringify({model:t,instructions:n,input:r,store:!1,temperature:i,max_output_tokens:a})});if(!o.ok){let e=await o.json().catch(()=>({}));throw Error(`OpenAI API error: ${o.status} ${o.statusText}${e.error?.message?` - ${e.error.message}`:``}`)}let s=await o.json();if(typeof s.output_text==`string`)return s.output_text.trim();let c=(Array.isArray(s.output)?s.output:[]).find(Lye),l=(Array.isArray(c?.content)?c.content:[]).find(Rye);if(typeof l?.text==`string`)return l.text.trim();throw Error(`Invalid response format from OpenAI API.`)}})),Vye,Hye,Uye,Wye,Gye=o((()=>{Bye(),f5(),Vye=`openai`,Hye=`OpenAI GPT`,Uye=`gpt-5.4-nano`,Wye={serviceId:Vye,serviceLabel:Hye,apiLabel:y5,developerURL:Pye,apiKeyURL:Fye,apiKeyPattern:Iye,markdownSupported:!0,availability:u5,translate:d5(zye,Uye,y5)}})),b5,x5,S5=o((()=>{qp(),JO(),Gve(),nye(),dye(),xye(),Mye(),Gye(),b5={anthropic:Wve,deepseek:tye,google:g5,"google-ai":bye,mistral:jye,openai:Wye},x5=Kp(()=>{let{defaultTranslationService:e=`google`}=qO;return b5[e]??g5})})),C5,Kye,w5,qye,Jye,T5,Yye=o((()=>{GS(),qp(),Ove(),N6(),f4(),KP(),s5(),S5(),JO(),C5=new t5({headingStyle:`atx`,bulletListMarker:`-`,codeBlockStyle:`fenced`}),C5.keep([`span`,`div`]),Kye=({draft:e,options:t})=>{let{collectionName:n,fileName:r,currentValues:i,isIndexFile:a}=e,{sourceLanguage:o,targetLanguage:s,keyPath:c=``,translate:l=!1}=t,u=i[o],d={collectionName:n,fileName:r,valueMap:u,isIndexFile:a};return Object.fromEntries(Object.entries(u).map(([e,t])=>{let n=i[s][e],r=BP({...d,keyPath:e}),a=r?.widget??`string`;return c&&!e.startsWith(c)||typeof t!=`string`||!t||![`richtext`,`markdown`,`text`,`string`,`list`].includes(a)||a===`list`&&o5(r).hasSubFields||!l&&t===n||!c&&l&&n?null:[e,{value:t,isMarkdown:a===`richtext`||a===`markdown`}]}).filter(e=>!!e))},w5=(e,t,{count:n,sourceLanguage:r})=>{c4.set({id:Date.now(),show:!0,status:e,message:t,count:n,sourceLanguage:r})},qye=async({currentValues:e,options:t,copingFieldMap:n})=>{let{serviceId:r,markdownSupported:i,translate:a}=A(x5),{sourceLanguage:o,targetLanguage:s}=t,c=Object.keys(n).length,l=qO.apiKeys?.[r]||await new Promise(e=>{s4.set({show:!0,multiple:c>1,resolve:e})});if(l){w5(`info`,`translation.started`,{count:c,sourceLanguage:o});try{let t=await a(Object.entries(n).map(([,{value:e,isMarkdown:t}])=>t&&!i?WS(e):e),{apiKey:l,sourceLanguage:o,targetLanguage:s});Object.entries(n).forEach(([n,{isMarkdown:r}],a)=>{let o=t[a];e[s][n]=r&&!i?C5.turndown(o):o}),w5(`success`,`translation.complete`,{count:c,sourceLanguage:o})}catch(e){w5(`error`,`translation.error`,{count:c,sourceLanguage:o}),console.error(e)}}},Jye=({currentValues:e,options:t,copingFieldMap:n})=>{let{sourceLanguage:r,targetLanguage:i}=t,a=Object.keys(n).length;Object.entries(n).forEach(([t,{value:n}])=>{e[i][t]=n}),w5(`success`,`copy.complete`,{count:a,sourceLanguage:r})},T5=async e=>{let{sourceLanguage:t,translate:n=!1}=e,r=A(O6),{currentValues:i}=r,a=Kye({draft:r,options:e}),o=Object.keys(a).length;if(!o){w5(`info`,`${n?`translation`:`copy`}.none`,{count:o,sourceLanguage:t});return}n?await qye({currentValues:i,options:e,copingFieldMap:a}):Jye({currentValues:i,options:e,copingFieldMap:a}),O6.update(e=>({...e,currentValues:i}))}}));function E5(e,t){O(t,!0);let n=()=>j(O6,`$entryDraft`,i),r=()=>j(x5,`$translator`,i),[i,a]=mn(),o=q(t,`keyPath`,3,``),s=q(t,`translate`,3,!1),c=async({sourceLanguage:e,targetLanguage:t})=>!n()?.currentLocales[t]||!n().currentLocales[e]||!!o()&&!At(n().currentValues[e])[o()]||!s()&&!!o()&&At(n().currentValues[e])[o()]===At(n().currentValues[t])[o()]||s()&&!await r()?.availability({sourceLanguage:e,targetLanguage:t});var l=V();uo(I(l),16,()=>t.otherLocales,e=>e,(e,n)=>{let r=M(()=>({sourceLanguage:n,targetLanguage:t.locale}));var i=V();Xa(I(i),()=>c(z(r)),null,(e,t)=>{{let i=M(()=>Y(s()?`translate_from_x`:`copy_from_x`,{values:{locale:BC(n)}}));lR(e,{get label(){return z(i)},get disabled(){return z(t)},onclick:()=>{T5({...z(r),keyPath:o(),translate:s()})}})}}),H(e,i)}),H(e,l),k(),a()}var D5=o((()=>{Z(),J(),X(),$(),N6(),Yye(),WC(),S5()}));function Xye(e,t){O(t,!0),G(e,$ye);let n=q(t,`children`,3,void 0),r=Gs(t,Zye),i=N(void 0);tc(()=>()=>{z(i)?.dispatchEvent(new CustomEvent(`Unmount`))});var a=Qye();_s(a,()=>({role:`group`,class:`field`,...r}),void 0,void 0,void 0,`svelte-wzztxu`),Co(F(a),()=>n()??E),D(a),Rs(a,e=>P(i,e),()=>z(i)),H(e,a),k()}var Zye,Qye,$ye,ebe=o((()=>{Z(),J(),rc(),Zye=new Set([`$$slots`,`$$events`,`$$legacy`,`children`]),Qye=B(`<section><!></section>`),$ye={hash:`svelte-wzztxu`,code:`section.svelte-wzztxu {padding:var(--field-editor-padding);&:not(:last-child) {border-width:0 0 1px;border-color:var(--sui-secondary-border-color);}& > * {margin-inline:auto !important;max-width:768px;}& > header {display:flex;align-items:center;margin:0 -8px 8px;height:var(--sui-button-small-height);h4 {margin-inline:var(--sui-focus-ring-width) 0;font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}.required {margin-block:2px 0;margin-inline:2px 0;color:var(--sui-error-foreground-color);font-size:var(--sui-font-size-large);}}}`}}));function tbe(e,t){O(t,!0);let n=()=>j(O6,`$entryDraft`,i),r=()=>j(x5,`$translator`,i),[i,a]=mn(),o=q(t,`size`,3,`medium`),s=q(t,`keyPath`,3,``),c=M(()=>!n()?.currentLocales[t.locale]),l=async({sourceLanguage:e,targetLanguage:t})=>z(c)||!n()?.currentLocales[e]||!await r()?.availability({sourceLanguage:e,targetLanguage:t});var u=V(),d=I(u),f=e=>{let n=M(()=>{let[e]=t.otherLocales;return{otherLocale:e}}),r=M(()=>Y(`translate_from_x`,{values:{locale:BC(z(n).otherLocale)??z(n).otherLocale}})),i=M(()=>({sourceLanguage:z(n).otherLocale,targetLanguage:t.locale}));var a=V();Xa(I(a),()=>l(z(i)),null,(e,t)=>{wI(e,{variant:`ghost`,get size(){return o()},iconic:!0,popupPosition:`bottom-right`,get"aria-label"(){return z(r)},get title(){return z(r)},get disabled(){return z(t)},onclick:()=>{T5({...z(i),keyPath:s(),translate:!0})},startIcon:e=>{oI(e,{name:`translate`})},$$slots:{startIcon:!0}})}),H(e,a)},p=e=>{{let n=e=>{oI(e,{name:`translate`})},r=e=>{{let n=M(()=>Y(`translation_options`));iR(e,{get"aria-label"(){return z(n)},children:(e,n)=>{E5(e,{get locale(){return t.locale},get otherLocales(){return t.otherLocales},get keyPath(){return s()},translate:!0})},$$slots:{default:!0}})}},i=M(()=>Y(`translate`));PI(e,{variant:`ghost`,get size(){return o()},iconic:!0,popupPosition:`bottom-right`,get"aria-label"(){return z(i)},get disabled(){return z(c)},endIcon:n,popup:r,$$slots:{endIcon:!0,popup:!0}})}};W(d,e=>{t.otherLocales.length===1?e(f):e(p,-1)}),H(e,u),k(),a()}var nbe=o((()=>{Z(),J(),X(),$(),D5(),N6(),Yye(),WC(),S5()}));function O5(e,t){G(e,ibe);let n=q(t,`id`,3,void 0),r=q(t,`live`,3,`polite`);var i=rbe(),a=F(i),o=F(a);oI(o,{name:`error`}),Co(L(o,2),()=>t.children),D(a),D(i),R(()=>{K(i,`id`,n()),K(i,`aria-live`,r())}),H(e,i)}var rbe,ibe,k5=o((()=>{Z(),J(),$(),rbe=B(`<div role="alert" class="validation svelte-6wra4i"><div role="none" class="svelte-6wra4i"><!> <!></div></div>`),ibe={hash:`svelte-6wra4i`,code:`.validation.svelte-6wra4i {color:var(--sui-error-foreground-color) !important;font-size:var(--sui-font-size-small);div:where(.svelte-6wra4i) {display:flex;align-items:center;gap:4px;margin:4px 0 0;.icon {flex:none;font-size:16px; /* !hardcoded */}}}`}}));function abe(e,t){O(t,!0);let n=q(t,`currentValue`,15),r=q(t,`required`,3,!0),i=q(t,`readonly`,3,!1),a=q(t,`invalid`,3,!1);yz(e,{get readonly(){return i()},get required(){return r()},get invalid(){return a()},get"aria-labelledby"(){return`${t.fieldId??``}-label`},get"aria-errormessage"(){return`${t.fieldId??``}-error`},get checked(){return n()},set checked(e){n(e)}}),k()}var obe=o((()=>{Z(),J(),$()}));function sbe(e,t){O(t,!0);let n=q(t,`currentValue`,3,!1);var r=V(),i=I(r),a=e=>{var t=cbe(),r=F(t,!0);D(t),R(e=>U(r,e),[()=>Y(`boolean.${n()}`)]),H(e,t)};W(i,e=>{typeof n()==`boolean`&&e(a)}),H(e,r),k()}var cbe,lbe=o((()=>{Z(),J(),X(),cbe=B(`<p> </p>`)}));function ube(e,t){O(t,!0);let n=()=>j(O6,`$entryDraft`,r),[r,i]=mn(),{valueStoreKey:a=`currentValues`}=Lt(`field-editor`)??{},o=q(t,`currentValue`,15),s=q(t,`required`,3,!0),c=q(t,`readonly`,3,!1),l=q(t,`invalid`,3,!1),u=N(``),d=N(``),f=M(()=>T(t.fieldConfig.default_language,`plain`)),p=M(()=>T(t.fieldConfig.allow_language_selection,!0)),m=M(()=>T(t.fieldConfig.output_code_only,!1)),h=M(()=>T(t.fieldConfig.keys,()=>({code:`code`,lang:`lang`}),!0)),g=M(()=>At(n()?.[a][t.locale])??{}),_=M(()=>`${t.keyPath}.${z(h).code}`),v=M(()=>`${t.keyPath}.${z(h).lang}`),y=()=>{if(z(m))typeof o()==`string`?z(u)!==o()&&P(u,o(),!0):P(u,``),P(d,z(f),!0);else{let e=z(g)[z(_)],t=z(g)[z(v)]||z(f);typeof e==`string`?z(u)!==e&&P(u,e,!0):P(u,``),typeof t==`string`?z(d)!==t&&P(d,t,!0):P(d,``)}},b=()=>{z(m)?o()!==z(u)&&o(z(u)):n()&&(o({}),z(g)[z(_)]!==z(u)&&gn(O6,zi(n)[a][t.locale][z(_)]=z(u),zi(n)),z(g)[z(v)]!==z(d)&&gn(O6,zi(n)[a][t.locale][z(v)]=z(d),zi(n)))};Qr(()=>{z(g),zi(()=>{y()})}),Qr(()=>{z(u),z(d),zi(()=>{b()})});var x=V();Xa(I(x),Gw,null,e=>{var n=V();no(I(n),()=>JSON.stringify(t.fieldConfig),e=>{pfe(e,{get showLanguageSwitcher(){return z(p)},flex:!0,get readonly(){return c()},get required(){return s()},get invalid(){return l()},get"aria-labelledby"(){return`${t.fieldId??``}-label`},get"aria-errormessage"(){return`${t.fieldId??``}-error`},get code(){return z(u)},set code(e){P(u,e,!0)},get lang(){return z(d)},set lang(e){P(d,e,!0)}})}),H(e,n)}),H(e,x),k(),i()}var dbe=o((()=>{Z(),J(),$(),Kw(),rc(),N6()}));function fbe(e,t){O(t,!0);let n=()=>j(O6,`$entryDraft`,r),[r,i]=mn(),a=M(()=>T(t.fieldConfig.default_language,``)),o=M(()=>T(t.fieldConfig.output_code_only,!1)),s=M(()=>T(t.fieldConfig.keys,()=>({code:`code`,lang:`lang`}),!0)),c=M(()=>At(n()?.currentValues[t.locale])??{}),l=M(()=>`${t.keyPath}.${z(s).code}`),u=M(()=>`${t.keyPath}.${z(s).lang}`),d=M(()=>z(o)?t.currentValue:z(c)[z(l)]),f=M(()=>z(o)?z(a):z(c)[z(u)]);var p=V(),m=I(p),h=e=>{var t=pbe(),n=F(t,!0);D(t),R(()=>{as(t,1,Qo(z(f)?`language-${z(f)}`:void 0)),U(n,z(d))}),H(e,t)};W(m,e=>{z(d)&&e(h)}),H(e,p),k(),i()}var pbe,mbe=o((()=>{Z(),J(),N6(),pbe=B(`<pre> </pre>`)}));function hbe(e,t){let n=Ma();O(t,!0),G(e,ybe);let r=q(t,`currentValue`,15),i=q(t,`required`,3,!0),a=q(t,`readonly`,3,!1),o=q(t,`invalid`,3,!1),s=N(``),c=N(255),l=M(()=>T(t.fieldConfig.allowInput,!1)),u=M(()=>T(t.fieldConfig.enableAlpha,!1)),d=/^#[0-9a-f]{6}$/i,f=/^(?<rgb>#[0-9a-f]{6})(?<a>[0-9a-f]{2})?$/i,p=()=>{if(typeof r()!=`string`)return;let{rgb:e,a:t=`ff`}=r().match(f)?.groups??{};if(e&&z(s)!==e&&P(s,e,!0),e&&z(u)){let e=Number.parseInt(`0x${t}`,16);z(c)!==e&&P(c,e,!0)}},m=()=>{let e=d.test(z(s))?z(s):``;e&&z(u)&&(e+=z(c).toString(16).padStart(2,`0`)),r()!==e&&r(e)};Qr(()=>{r(),zi(()=>{p()})}),Qr(()=>{z(s),z(c),zi(()=>{m()})});var h=vbe(),g=F(h);ms(g);var _=L(g,2),v=e=>{var r=_be(),d=F(r),f=e=>{hL(e,{dir:`ltr`,get id(){return`${n}-input`},get invalid(){return o()},get readonly(){return a()},get required(){return i()},get"aria-labelledby"(){return`${t.fieldId??``}-label`},get"aria-errormessage"(){return`${t.fieldId??``}-error`},get value(){return z(s)},set value(e){P(s,e,!0)}})};W(d,e=>{z(l)&&e(f)});var p=L(d,2),m=e=>{var t=gbe(),n=I(t),r=L(n);{let e=M(()=>!z(s)),t=M(()=>Y(`opacity`));wce(r,{min:0,max:255,get disabled(){return z(e)},get"aria-label"(){return z(t)},get value(){return z(c)},set value(e){P(c,e,!0)}})}R(e=>U(n,`${e??``} `),[()=>Y(`opacity`)]),H(e,t)};W(p,e=>{z(u)&&e(m)}),D(r),H(e,r)};W(_,e=>{(z(l)||z(u))&&e(v)});var y=L(_,2),b=e=>{{let t=M(()=>Y(`clear`)),r=M(()=>!z(s)),i=M(()=>`${n}-picker ${z(l)?`${n}-input`:``}`);wI(e,{variant:`tertiary`,get label(){return z(t)},get disabled(){return z(r)},get"aria-controls"(){return z(i)},onclick:()=>{P(s,``),P(c,255)}})}};W(y,e=>{!a()&&!i()&&e(b)}),D(h),R(()=>{K(g,`id`,`${n}-picker`),g.readOnly=a(),K(g,`aria-invalid`,o()),K(g,`aria-readonly`,a()),K(g,`aria-required`,i()),K(g,`aria-labelledby`,`${t.fieldId??``}-label`),K(g,`aria-errormessage`,`${t.fieldId??``}-error`)}),Ms(g,()=>z(s),e=>P(s,e)),H(e,h),k()}var gbe,_be,vbe,ybe,bbe=o((()=>{Z(),J(),X(),$(),rc(),gbe=B(` <!>`,1),_be=B(`<span role="none" class="value svelte-udhsyb"><!> <!></span>`),vbe=B(`<div role="none" class="svelte-udhsyb"><input type="color" class="svelte-udhsyb"/> <!> <!></div>`),ybe={hash:`svelte-udhsyb`,code:`div.svelte-udhsyb {display:flex;align-items:center;gap:8px;.value:where(.svelte-udhsyb) {display:flex;align-items:center;gap:8px;.sui.text-input {width:88px;min-width:0;}.sui.slider {padding:8px;--sui-slider-base-width: 80px;}}}input.svelte-udhsyb {font-family:var(--sui-textbox-font-family);}`}}));function xbe(e,t){O(t,!0),G(e,Cbe);let n=M(()=>T(t.fieldConfig.enableAlpha,!1)),r=e=>Number.parseInt(`0x${e}`,16),i=/^#(?<r>[0-9a-f]{2})(?<g>[0-9a-f]{2})(?<b>[0-9a-f]{2})(?<a>[0-9a-f]{2})?$/i,a=M(()=>{let{r:e,g:a,b:o,a:s}=t.currentValue?.match(i)?.groups??{};return e?`rgb(${r(e)} ${r(a)} ${r(o)}${z(n)&&s?` / ${Math.round(r(s)/255*100)}%`:``})`:``});var o=V(),s=I(o),c=e=>{var n=Sbe(),r=F(n),i=F(r);let o;var s=L(i,2),c=F(s,!0);D(s);var l=L(s,2),u=F(l,!0);D(l),D(r),D(n),R(()=>{o=cs(i,``,o,{"background-color":t.currentValue}),U(c,t.currentValue),U(u,z(a))}),H(e,n)},l=M(()=>typeof t.currentValue==`string`&&t.currentValue.trim());W(s,e=>{z(l)&&e(c)}),H(e,o),k()}var Sbe,Cbe,wbe=o((()=>{Z(),J(),Sbe=B(`<p><span role="none" class="preview svelte-1m6xsa0"><span role="none" class="color svelte-1m6xsa0"></span> <span role="none" class="value"> </span> <span role="none" class="value"> </span></span></p>`),Cbe={hash:`svelte-1m6xsa0`,code:`.preview.svelte-1m6xsa0 {display:inline-flex;align-items:center;gap:8px;.color:where(.svelte-1m6xsa0) {display:block;width:24px;height:24px;border-radius:24px;}}`}}));function Tbe(e,t){O(t,!0);let n=()=>j(O6,`$entryDraft`,r),[r,i]=mn(),{valueStoreKey:a=`currentValues`}=Lt(`field-editor`)??{},o=q(t,`currentValue`,15),s=q(t,`required`,3,!0),c=q(t,`readonly`,3,!1),l=q(t,`invalid`,3,!1),u=M(()=>T(t.fieldConfig.value,``)),d=M(()=>n()?.isIndexFile??!1),f=M(()=>n()?.collectionName??``),p=M(()=>n()?.fileName),m=M(()=>At(n()?.[a][t.locale])??{}),h=M(()=>HC(t.locale)),g=()=>{let[e]=t.keyPath.split(`.`).splice(-2,1);return e&&EP(e)?Number(e):void 0},_=()=>{if(!(t.keyPath in z(m)))return;let e=z(u)===`{{index}}`?g()??``:z(u).replaceAll(Yp,(e,n)=>{let{value:r,transformations:i}=cC(n);if(r===`index`)return String(g()??``);if(!r.startsWith(`fields.`))return``;let a=UP({collectionName:z(f),fileName:z(p),valueMap:z(m),keyPath:r.replace(/^fields\./,``),locale:t.locale,isIndexFile:z(d)});return a=Array.isArray(a)?z(h).format(a):String(a),i.length?lC({value:a,transformations:i,locale:t.locale}):a});o()!==e&&o(e)};Qr(()=>{z(m),zi(()=>{_()})});{let n=M(()=>String(o()));hL(e,{dir:`auto`,get value(){return z(n)},flex:!0,get readonly(){return c()},get required(){return s()},get invalid(){return l()},get"aria-labelledby"(){return`${t.fieldId??``}-label`},get"aria-errormessage"(){return`${t.fieldId??``}-error`}})}k(),i()}var Ebe=o((()=>{Z(),J(),$(),rc(),Qp(),uC(),N6(),KP(),WC(),OP()}));function Dbe(e,t){O(t,!0);var n=Obe(),r=F(n,!0);D(n),R((e,i)=>{K(n,`lang`,e),K(n,`dir`,i),U(r,t.currentValue),n.dir=n.dir},[()=>LC(t.locale),()=>RC(t.locale)]),H(e,n),k()}var Obe,kbe=o((()=>{Z(),J(),WC(),Obe=B(`<p> </p>`)}));function Abe(e,t){O(t,!0),G(e,Pbe);let n=q(t,`currentValue`,15),r=q(t,`required`,3,!0),i=q(t,`readonly`,3,!1),a=q(t,`invalid`,3,!1),o=N(``),s=N(!1),c=M(()=>aC(t.fieldConfig)),l=M(()=>z(c).type),u=M(()=>z(c).min),d=M(()=>z(c).max),f=M(()=>z(c).step),p=M(()=>z(c).dateOnly),m=M(()=>z(c).utc),h=M(()=>z(c).singleCustomTimeZone),g=M(()=>Tw(n(),t.fieldConfig)),_=()=>{if(z(s))return;let e=Hw({currentValue:n(),fieldConfig:t.fieldConfig,timeZone:z(g)});e!==void 0&&e!==z(o)&&P(o,e,!0)},v=()=>{let e=Vw({inputValue:z(o),currentValue:n(),fieldConfig:t.fieldConfig,timeZone:z(g)});e!==void 0&&e!==n()&&Number(zw(e,t.fieldConfig))!==Number(zw(n(),t.fieldConfig))&&n(e)};Qr(()=>{n(),zi(()=>{_()})}),Qr(()=>{z(o),zi(()=>{v()})});let y=()=>{P(s,!0)},b=()=>{P(s,!1),_()};var x=Nbe(),S=I(x),C=F(S);_s(C,()=>({type:z(l),min:z(u),max:z(d),step:z(f),readonly:i(),"aria-readonly":i(),"aria-required":r(),"aria-invalid":a(),"aria-labelledby":`${t.fieldId??``}-label`,"aria-errormessage":`${t.fieldId??``}-error`,onfocus:y,onblur:b}),void 0,void 0,void 0,`svelte-1dnhck7`,!0);var w=L(C,2),T=e=>{{let n=M(()=>Y(z(p)?`today`:`now`));wI(e,{variant:`tertiary`,get label(){return z(n)},onclick:()=>{P(o,Bw(t.fieldConfig,z(g)),!0)}})}};W(w,e=>{i()||e(T)});var ee=L(w,2),te=e=>{{let t=M(()=>Y(`clear`)),r=M(()=>!n());wI(e,{variant:`tertiary`,get label(){return z(t)},get disabled(){return z(r)},onclick:()=>{n(``)}})}};W(ee,e=>{!i()&&!r()&&e(te)}),D(S);var ne=L(S,2),re=e=>{var r=jbe(),i=F(r,!0);D(r),R(e=>U(i,e),[()=>Ew(z(h),zw(n(),t.fieldConfig))]),H(e,r)},ie=e=>{H(e,Mbe())};W(ne,e=>{z(h)?e(re):z(m)&&e(ie,1)}),Ms(C,()=>z(o),e=>P(o,e)),H(e,x),k()}var jbe,Mbe,Nbe,Pbe,Fbe=o((()=>{Z(),J(),X(),$(),rc(),oC(),Ww(),Dw(),jbe=B(`<div role="none" class="timezone svelte-1dnhck7"> </div>`),Mbe=B(`<div role="none" class="timezone svelte-1dnhck7">UTC</div>`),Nbe=B(`<div role="none" class="svelte-1dnhck7"><input/> <!> <!></div> <!>`,1),Pbe={hash:`svelte-1dnhck7`,code:`div.svelte-1dnhck7 {display:flex;align-items:center;}.timezone.svelte-1dnhck7 {margin:4px 8px 0;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);white-space:nowrap;}`}}));function Ibe(e,t){O(t,!0);let n=M(()=>aC(t.fieldConfig)),r=M(()=>z(n).utc),i=M(()=>z(n).singleCustomTimeZone),a=M(()=>Uw({locale:t.locale,fieldConfig:t.fieldConfig,currentValue:t.currentValue}));var o=V(),s=I(o),c=e=>{var n=Lbe(),o=F(n),s=L(o),c=e=>{var n=ja();R(e=>U(n,`— ${e??``}`),[()=>Ew(z(i),zw(t.currentValue,t.fieldConfig))]),H(e,n)},l=e=>{H(e,ja(`— UTC`))};W(s,e=>{z(i)?e(c):z(r)&&e(l,1)}),D(n),R((e,t)=>{K(n,`lang`,e),K(n,`dir`,t),U(o,`${z(a)??``} `),n.dir=n.dir},[()=>LC(t.locale),()=>RC(t.locale)]),H(e,n)};W(s,e=>{z(a)&&e(c)}),H(e,o),k()}var Lbe,Rbe=o((()=>{Z(),J(),oC(),Ww(),Dw(),WC(),Lbe=B(`<p> <!></p>`)}));function zbe(e,t){O(t,!0),G(e,Hbe);let n=q(t,`multiple`,3,!1),r=q(t,`hidden`,3,!1),i=M(()=>jA(t.fieldConfig)??{}),a=``,o=N(!1),s=N(!1),c=N(void 0),l=()=>{if(!z(c))return;a=window.crypto.randomUUID();let e=new URLSearchParams({...Object.fromEntries(Object.entries(z(i).config??{}).filter(([e])=>DA.includes(e))),ml_id:a,pmHost:window.location.origin,new_cms:`true`,remove_header:`true`});z(c).src=`${TA}/cms?${e}`},d=()=>{let e={...Object.fromEntries(Object.entries(z(i).config??{}).filter(([e])=>OA.includes(e))),multiple:n(),max_files:t.fieldConfig?.max??z(i).config?.max_files??20,folder:{path:z(i).config?.folder?.path??``,resource_type:t.kind??`raw`}},r={type:`ML_WIDGET_SHOW`,data:{mlId:a,config:e}};console.debug(`Cloudinary Panel sending message:`,r),z(c)?.contentWindow?.postMessage(JSON.stringify(r),EA)},f=({assets:e})=>{let{output_filename_only:n=!1,use_transformations:r=!0}=z(i),a=e.map(e=>{let t=e.secure_url;return n?{url:t.split(`/`).pop()}:r?{url:e.derived?.[0]?.secure_url??t}:{url:t}});t.onSelect(a)},p=({origin:e,data:t})=>{if(e===EA){if(typeof t==`string`)try{t=JSON.parse(t)}catch{return}u(t)&&(console.debug(`Cloudinary Panel received message:`,t),t.type===`login`&&t.consoleDomain&&P(o,!0),t.type===`consoleLoaded`&&P(s,!0),t.type===`ML_WIDGET_INSERT_DATA`&&f(t.data))}};tc(()=>(l(),window.addEventListener(`message`,p),()=>{window.removeEventListener(`message`,p)})),Qr(()=>{z(i)&&z(s)&&d()});var m=Vbe(),h=I(m);Rs(h,e=>P(c,e),()=>z(c));var g=L(h,2),_=e=>{k2(e,{children:(e,t)=>{var n=Bbe(),r=I(n);{let e=M(()=>Y(`cloud_storage.cloudinary.activate.button_label`));wI(r,{variant:`primary`,get label(){return z(e)},onclick:async()=>{p4(`${TA}/cms_login?cms=true`,{noopener:!1})}})}var i=L(r,2),a=F(i,!0);D(i),R(e=>U(a,e),[()=>Y(`cloud_storage.cloudinary.activate.description`)]),H(e,n)},$$slots:{default:!0}})};W(g,e=>{!r()&&!z(o)&&e(_)}),R(e=>{K(h,`title`,e),K(h,`hidden`,r()||!z(o))},[()=>Y(`cloud_storage.cloudinary.iframe_title`)]),H(e,m),k()}var Bbe,Vbe,Hbe,Ube=o((()=>{Z(),J(),X(),$(),f(),rc(),PA(),m4(),Bbe=B(`<!> <div role="none"> </div>`,1),Vbe=B(`<iframe allow="camera; storage-access" sandbox="allow-same-origin allow-scripts allow-popups allow-forms" class="svelte-p06t0o"></iframe> <!>`,1),Hbe={hash:`svelte-p06t0o`,code:`iframe.svelte-p06t0o {display:block;width:100%;height:100%;border:none;&[hidden] {display:none;}}`}}));function Wbe(e,t){O(t,!0),G(e,Jbe);let n=q(t,`children`,3,void 0),r=M(()=>t.path?kp(t.path).split(`/`):t.caption?[t.caption]:[]),i={ALLOWED_TAGS:[`wbr`]},a=e=>ux(e.replace(/([-_.])/g,`$1<wbr>`),i);var o=V(),s=I(o),c=e=>{var t=qbe(),i=F(t);mI(i,{lines:2,children:(e,t)=>{var n=V();uo(I(n),19,()=>z(r),(e,t)=>`${e}-${t}`,(e,t,n)=>{var i=V(),o=I(i),s=e=>{var n=Gbe();yo(n,()=>a(z(t)),!0),D(n),H(e,n)},c=e=>{var n=Kbe();yo(I(n),()=>a(z(t))),gt(),H(e,n)};W(o,e=>{z(n)===z(r).length-1?e(s):e(c,-1)}),H(e,i)}),H(e,n)},$$slots:{default:!0}}),Co(L(i,2),()=>n()??E),D(t),H(e,t)};W(s,e=>{z(r).length&&e(c)}),H(e,o),k()}var Gbe,Kbe,qbe,Jbe,Ybe=o((()=>{Z(),J(),$(),Np(),dx(),Gbe=B(`<strong></strong>`),Kbe=B(`<!>/`,1),qbe=B(`<span class="name svelte-1ngvthn" aria-hidden="true"><!> <!></span>`),Jbe={hash:`svelte-1ngvthn`,code:`.name.svelte-1ngvthn {color:var(--sui-tertiary-foreground-color);strong {color:var(--sui-primary-foreground-color);font-weight:var(--sui-font-weight-normal);}}`}}));function Xbe(e,t){G(e,$be);let n=q(t,`viewType`,3,`grid`);var r=Qbe();QL(F(r),{label:``,get value(){return t.value},get selected(){return t.selected},get onChange(){return t.onChange},startIcon:e=>{var n=V(),r=I(n),i=e=>{var t=Zbe();oI(F(t),{name:`check`,class:`icon check`}),D(t),H(e,t)};W(r,e=>{t.multiple&&e(i)}),H(e,n)},children:(e,n)=>{var r=V();Co(I(r),()=>t.children??E),H(e,r)},$$slots:{startIcon:!0,default:!0}}),D(r),R(()=>as(r,1,`wrapper ${n()??``}`,`svelte-1fitgoo`)),H(e,r)}var Zbe,Qbe,$be,exe=o((()=>{Z(),J(),$(),Zbe=B(`<span role="none" class="icon check-background"><!></span>`),Qbe=B(`<div role="none"><!></div>`),$be={hash:`svelte-1fitgoo`,code:`.wrapper.svelte-1fitgoo {display:contents;[role='option'] {position:relative;& > .icon.check {display:none;}&[aria-selected='false'] {.check-background {border-color:var(--sui-checkbox-border-color);background-color:var(--sui-checkbox-background-color);.icon {display:none;}}}&[aria-selected='true'] {.check-background {border-color:var(--sui-primary-accent-color);color:var(--sui-primary-accent-color-inverted);background-color:var(--sui-primary-accent-color);}}.check-background {display:flex;justify-content:center;align-items:center;border-width:1px;border-radius:var(--sui-checkbox-border-radius);width:20px;height:20px;pointer-events:none;.icon {color:inherit !important;font-size:20px;}}}&.grid {.check-background {position:absolute;inset-block-start:8px;inset-inline-start:8px;z-index:1;}}&.list {.check-background {margin-inline-start:16px;}}}`}}));function txe(e,t){O(t,!0),G(e,rxe);let n=q(t,`viewType`,3,`grid`),r=q(t,`gridId`,3,void 0),i=q(t,`multiple`,3,!1),a=q(t,`onChange`,3,void 0),o=q(t,`children`,3,void 0);var s=nxe(),c=F(s);{let e=M(()=>Y(`assets_dialog.available_images`));UL(c,{get id(){return r()},get class(){return n()},get multiple(){return i()},get"aria-label"(){return z(e)},onChange:e=>{a()?.(e.detail)},children:(e,t)=>{var n=V();Co(I(n),()=>o()??E),H(e,n)},$$slots:{default:!0}})}D(s),H(e,s),k()}var nxe,rxe,ixe=o((()=>{Z(),J(),X(),$(),nxe=B(`<div role="none" class="wrapper svelte-umbokg"><!></div>`),rxe={hash:`svelte-umbokg`,code:`.wrapper.svelte-umbokg {display:contents;.listbox {gap:4px;border-width:0;max-height:calc(100% - var(--sui-focus-ring-width) * 2);.option {button {border-radius:var(--sui-control-medium-border-radius);padding:4px;width:100%;height:auto;transition:none;&:focus-visible {outline-color:transparent;}.preview {flex:none;border-radius:var(--sui-control-medium-border-radius);aspect-ratio:1 / 1;object-fit:contain;}}}.name {min-height:calc(var(--sui-font-size-default) * 2);white-space:normal;line-height:var(--sui-line-height-compact);}}.listbox.grid {display:grid;grid-template-columns:repeat(auto-fill, minmax(160px, 1fr));height:auto;max-height:none;.option {button {flex-direction:column;justify-content:flex-start;.preview {width:100%;height:auto;}.name {flex:none;margin:4px 0 12px;padding:0 8px;width:100%;min-height:calc(var(--sui-font-size-default) * 3);&:empty {display:none;}}}}button[aria-selected='true'] {outline-offset:-2px;outline-width:2px !important;outline-style:solid;outline-color:var(--sui-primary-accent-color-light);}}.listbox.list {.option {button {gap:16px;.preview {width:64px;}.name {flex:auto;padding-inline:0 8px;}}button[aria-selected='true'] {outline-offset:-2px;outline-width:2px !important;outline-style:solid;outline-color:var(--sui-primary-accent-color-light);}}}}`}}));function axe(e,t){O(t,!0);let n=q(t,`open`,15,!1);{let r=M(()=>Y(`assets_dialog.large_file.title`));dL(e,{get title(){return z(r)},get open(){return n()},set open(e){n(e)},children:(e,n)=>{var r=oxe(),i=I(r),a=F(i,!0);D(i);var o=L(i,2),s=F(o,!0);D(o),R((e,t)=>{U(a,e),U(s,t)},[()=>Y(`warning_oversized_files`,{values:{count:t.oversizedFileNames.length,size:OE(t.maxSize)}}),()=>HC(Hh.current).format(t.oversizedFileNames)]),H(e,r)},$$slots:{default:!0}})}k()}var oxe,sxe=o((()=>{Z(),J(),X(),$(),WC(),FE(),oxe=B(`<div> </div> <div> </div>`,1)}));function cxe(e,t){O(t,!0),G(e,mxe);let n=()=>j(d4,`$selectAssetsView`,i),r=()=>j(TF,`$cmsConfig`,i),[i,a]=mn(),o=e=>{var t=V(),n=I(t),r=e=>{k2(e,{children:(e,t)=>{var n=A5(),r=F(n,!0);D(n),R(e=>U(r,e),[()=>Y(l()?`searching`:`loading`)]),H(e,n)},$$slots:{default:!0}})},i=e=>{k2(e,{children:(e,t)=>{var n=A5(),r=F(n,!0);D(n),R(e=>U(r,e),[()=>Y(`no_files_found`)]),H(e,n)},$$slots:{default:!0}})},a=e=>{var t=lxe();txe(F(t),{get viewType(){return z(te)},get gridId(){return u()},get multiple(){return c()},children:(e,t)=>{{let t=(e,t=E)=>{var n=V();Xa(I(n),Gw,null,e=>{let n=M(()=>{let{id:e,previewURL:n,description:r,kind:i}=t();return{id:e,previewURL:n,description:r,_kind:i}});{let r=M(()=>xe(t()));Xbe(e,{get value(){return z(n).id},get viewType(){return z(te)},get multiple(){return c()},get selected(){return z(r)},onChange:({detail:{selected:e}})=>{Se(t(),e)},children:(e,t)=>{var r=j5(),i=I(r);t6(i,{get kind(){return z(n)._kind},get src(){return z(n).previewURL},get alt(){return z(n).description},variant:`tile`,crossorigin:`anonymous`});var a=L(i,2),o=e=>{{let t=M(()=>z(ne)?void 0:z(n).description),r=M(()=>z(ne)?z(n).description:void 0);Wbe(e,{get path(){return z(t)},get caption(){return z(r)}})}};W(a,e=>{(z(te)===`list`||!bE.isSmallScreen&&!z(ne))&&e(o)}),H(e,r)},$$slots:{default:!0}})}}),H(e,n)},n=M(()=>z(fe)??[]);GR(e,{get items(){return z(n)},itemKey:`id`,renderItem:t,$$slots:{renderItem:!0}})}},$$slots:{default:!0}}),D(t),H(e,t)};W(n,e=>{z(fe)?z(fe).length?e(a,-1):e(i,1):e(r)}),H(e,t)},s=q(t,`fieldConfig`,3,void 0),c=q(t,`multiple`,3,!1),l=q(t,`searchTerms`,3,``),u=q(t,`gridId`,3,void 0),d=q(t,`selectedResources`,31,()=>br([])),f=M(()=>T(t.serviceProps.serviceType,`stock_assets`)),p=M(()=>T(t.serviceProps.serviceId,``)),m=M(()=>T(t.serviceProps.serviceLabel,``)),h=M(()=>T(t.serviceProps.hotlinking,!1)),g=M(()=>T(t.serviceProps.authType,`api_key`)),_=M(()=>T(t.serviceProps.developerURL,``)),v=M(()=>T(t.serviceProps.apiKeyURL,``)),y=M(()=>t.serviceProps.apiKeyPattern),b=M(()=>t.serviceProps.init),x=M(()=>t.serviceProps.signIn),S=M(()=>t.serviceProps.list),C=M(()=>t.serviceProps.search),w=M(()=>t.serviceProps.upload),te=M(()=>z(p)===`picsum`?`grid`:n()?.type),ne=M(()=>z(f)===`stock_assets`),re=M(()=>s()?.media_libraries?.all??r()?.media_libraries?.all??{}),ie=M(()=>z(re).max_file_size??1/0),ae=br({userName:``,password:``}),oe=N(!0),se=N(!1),ce=N(``),le=N(``),ue=N(``),de=N(`initial`),fe=N(null),pe=N(void 0),me=N(br({show:!1,status:`info`,length:0})),he=N(br([])),ge=N(!1),_e=M(()=>({kind:t.kind,fieldConfig:s(),apiKey:z(ce),userName:z(le),password:z(ue)})),ve=async(e=``)=>{P(fe,null),e=e.trim();try{P(fe,await(e?z(C)?.(e,z(_e)):z(S)?.(z(_e)))??[],!0)}catch(e){P(pe,`search_fetch_failed`),console.error(e)}},ye=async e=>{let{downloadURL:t,fileName:n,credit:r}=e;if(z(h))return{url:t,credit:r};try{let e=await fetch(t),{ok:i,status:a}=e;if(!i)throw Error(`The response returned with HTTP status ${a}.`);let o=await e.blob();return{url:t,credit:r,file:new File([o],n,{type:o.type})}}catch(e){P(pe,`image_fetch_failed`),console.error(e)}},be=async e=>{if(!z(w))return;let t=await Promise.all(e.map(e=>FF(e,z(re))));if(e=t.filter(({oversized:e})=>!e).map(({file:e})=>e),P(he,t.filter(({oversized:e})=>e).map(({file:e})=>e.name),!0),z(he).length&&P(ge,!0),e.length){P(me,{show:!0,status:`info`,length:e.length},!0);try{let t=await z(w)(e,z(_e)),n=await Promise.all(t.map(e=>ye(e)));d(n.filter(e=>!!e).slice(0,c()?void 0:1)),P(fe,[...t,...z(fe)??[]],!0)}catch{P(me,{show:!0,status:`error`,length:e.length},!0)}}},xe=e=>d().some(t=>t.url===e.downloadURL),Se=async(e,t)=>{let n=d().filter(t=>t.url!==e.downloadURL);if(t){let t=await ye(e);t&&d([...n,t])}else d(n)};tc(()=>{(async()=>{typeof z(b)==`function`&&(P(oe,!1),P(oe,await z(b)(),!0)),z(oe)&&(P(ce,qO.apiKeys?.[z(p)]??``,!0),(e=>{var t=ee(e,2);P(le,t[0],!0),P(ue,t[1],!0)})((qO.logins?.[z(p)]??``).split(` `)),P(se,z(g)===`none`||!!z(ce)||!!z(ue),!0),P(fe,null))})()}),Qr(()=>{l(),z(se),zi(()=>{z(se)&&ve(l())})});var Ce={uploadFiles:be},we=pxe(),Te=I(we),Ee=e=>{var t=V(),n=I(t),r=e=>{k2(e,{children:(e,t)=>{var n=A5(),r=F(n,!0);D(n),R(e=>U(r,e),[()=>Y(`assets_dialog.error.${z(pe)}`)]),H(e,n)},$$slots:{default:!0}})},i=e=>{{let t=M(()=>s()?.accept);G6(e,{get accept(){return z(t)},multiple:!0,onDrop:({files:e})=>be(e),children:(e,t)=>{o(e)},$$slots:{default:!0}})}},a=e=>{o(e)};W(n,e=>{z(pe)?e(r):z(w)?e(i,1):e(a,-1)}),H(e,t)},De=e=>{k2(e,{children:(e,t)=>{var n=fxe(),r=I(n),i=F(r),a=e=>{var t=V();yo(I(t),()=>ux(Y(`prefs.media.stock_photos.description`,{values:{service:z(m),homeHref:`href="${z(_)}"`,apiKeyHref:`href="${z(v)}"`}}).replace(/[\u2068\u2069]/g,``),{ALLOWED_TAGS:[`a`],ALLOWED_ATTR:[`href`,`target`,`rel`]})),H(e,t)};W(i,e=>{z(ne)&&e(a)});var o=L(i,2),s=e=>{var t=V();yo(I(t),()=>ux(Y(`cloud_storage.${z(p)}.auth.${z(de)}`,{default:Y(`cloud_storage.auth.${z(g)}.${z(de)}`,{values:{service:z(m),key:Y(`cloud_storage.${z(p)}.auth_key_label`,{default:Y(`cloud_storage.auth.${z(g)}.key_label`)})}})}),{ALLOWED_TAGS:[`a`],ALLOWED_ATTR:[`href`,`target`,`rel`]})),H(e,t)};W(o,e=>{z(f)===`cloud_storage`&&e(s)}),D(r);var c=L(r,2),l=e=>{var t=uxe(),n=F(t);{let e=M(()=>Y(`prefs.media.stock_photos.field_label`,{values:{service:z(m)}}));hL(n,{dir:`ltr`,flex:!0,monospace:!0,spellcheck:`false`,get"aria-label"(){return z(e)},oninput:e=>{let t=e.target.value.trim();z(y)?.test(t)&&(P(ce,t,!0),P(se,!0),qO.apiKeys??={},qO.apiKeys[z(p)]=z(ce),ve())}})}D(t),H(e,t)};W(c,e=>{z(g)===`api_key`&&e(l)});var u=L(c,2),d=e=>{var t=dxe(),n=I(t),r=F(n);{let e=M(()=>Y(`user_name`)),t=M(()=>z(de)===`requested`);hL(r,{dir:`ltr`,flex:!0,spellcheck:`false`,get"aria-label"(){return z(e)},get disabled(){return z(t)},get value(){return ae.userName},set value(e){ae.userName=e}})}D(n);var i=L(n,2),a=F(i);{let e=M(()=>Y(`password`)),t=M(()=>z(de)===`requested`);y2(a,{get"aria-label"(){return z(e)},get disabled(){return z(t)},get value(){return ae.password},set value(e){ae.password=e}})}D(i);var o=L(i,2),s=F(o);{let e=M(()=>Y(`sign_in`)),t=M(()=>!ae.userName||!ae.password||z(de)===`requested`);wI(s,{variant:`secondary`,get label(){return z(e)},get disabled(){return z(t)},onclick:async()=>{P(de,`requested`),ae.userName=ae.userName.trim(),ae.password=ae.password.trim(),await z(x)?.(ae.userName,ae.password)?(P(de,`success`),P(le,ae.userName,!0),P(ue,ae.password,!0),P(se,!0),qO.logins??={},qO.logins[z(p)]=[z(le),z(ue)].join(` `),ve()):P(de,`error`)}})}D(o),H(e,t)};W(u,e=>{z(g)===`password`&&e(d)}),H(e,n)},$$slots:{default:!0}})},Oe=e=>{k2(e,{children:(e,t)=>{var n=A5(),r=F(n,!0);D(n),R(e=>U(r,e),[()=>Y(`cloud_storage.invalid`)]),H(e,n)},$$slots:{default:!0}})};W(Te,e=>{z(se)?e(Ee):z(oe)?e(De,1):e(Oe,-1)});var ke=L(Te,2);Bz(ke,{get show(){return z(me).show},set show(e){z(me).show=e},children:(e,t)=>{cI(e,{get status(){return z(me).status},children:(e,t)=>{var n=j5(),r=I(n),i=e=>{var t=ja();R(e=>U(t,e),[()=>Y(`uploading_files_progress`,{values:{count:z(me).length}})]),H(e,t)};W(r,e=>{z(me).status===`info`&&e(i)});var a=L(r,2),o=e=>{var t=ja();R(e=>U(t,e),[()=>Y(`uploading_files_failed`,{values:{count:z(me).length}})]),H(e,t)};W(a,e=>{z(me).status===`error`&&e(o)}),H(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}}),axe(L(ke,2),{get oversizedFileNames(){return z(he)},get maxSize(){return z(ie)},get open(){return z(ge)},set open(e){P(ge,e,!0)}}),H(e,we);var Ae=k(Ce);return a(),Ae}var A5,j5,lxe,uxe,dxe,fxe,pxe,mxe,hxe=o((()=>{Z(),J(),X(),$(),Kw(),dx(),rc(),Ybe(),exe(),ixe(),n6(),K6(),sxe(),IF(),AF(),f4(),SE(),JO(),A5=B(`<span role="alert"> </span>`),j5=B(`<!> <!>`,1),lxe=B(`<div role="none" class="grid-wrapper svelte-mqll9n"><!></div>`),uxe=B(`<div role="none" class="input-outer svelte-mqll9n"><!></div>`),dxe=B(`<div role="none" class="input-outer svelte-mqll9n"><!></div> <div role="none" class="input-outer svelte-mqll9n"><!></div> <div role="none" class="input-outer svelte-mqll9n"><!></div>`,1),fxe=B(`<p role="alert" class="svelte-mqll9n"><!> <!></p> <!> <!>`,1),pxe=B(`<!> <!> <!>`,1),mxe={hash:`svelte-mqll9n`,code:`.grid-wrapper.svelte-mqll9n {overflow-y:auto;height:100%;}p.svelte-mqll9n {margin:0 0 8px;}.input-outer.svelte-mqll9n {width:400px;max-width:100%;text-align:center;}`}}));function gxe(e,t){O(t,!0),G(e,bxe);let n=q(t,`multiple`,3,!1),r=q(t,`assets`,19,()=>[]),i=q(t,`viewType`,3,`grid`),a=q(t,`searchTerms`,3,``),o=q(t,`basePath`,3,void 0),s=q(t,`gridId`,3,void 0),c=q(t,`checkerboard`,3,!1),l=q(t,`selectedResources`,31,()=>br([])),u=q(t,`onSelect`,3,void 0),d=M(()=>a()?a().split(/\s+/).filter(Boolean):[]),f=M(()=>{let e=r().map(e=>{let{folder:t,name:n,path:r}=e,i=o()&&!t.entryRelative?kp(r.replace(o(),``)):n;return{...e,relPath:i}});return z(d).length&&(e=e.filter(({relPath:e})=>z(d).every(t=>k8(e).includes(t)))),e.filter((e,t,n)=>n.findIndex(t=>t.path===e.path)===t)}),p=e=>l().some(t=>t.asset?.path===e.path),m=(e,t)=>{let n=l().filter(t=>t.asset?.path!==e.path);t?(l([...n,{asset:e}]),u()?.({asset:e})):l(n)};var h=V(),g=I(h),_=e=>{var t=vxe();txe(F(t),{get multiple(){return n()},get gridId(){return s()},get viewType(){return i()},children:(e,t)=>{GR(e,{get items(){return z(f)},itemKey:`path`,renderItem:(e,t=E)=>{var r=V();Xa(I(r),Gw,null,e=>{let r=M(()=>{let{kind:e,unsaved:n,path:r,relPath:i}=t();return{kind:e,unsaved:n,path:r,relPath:i}});{let a=M(()=>p(t()));Xbe(e,{get value(){return z(r).path},get viewType(){return i()},get multiple(){return n()},get selected(){return z(a)},onChange:({detail:{selected:e}})=>{m(t(),e)},children:(e,n)=>{var a=_xe(),o=I(a),s=e=>{var t=M5(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>Y(`assets_dialog.unsaved`)]),H(e,t)};W(o,e=>{i()===`grid`&&z(r).unsaved&&e(s)});var l=L(o,2);t6(l,{get kind(){return z(r).kind},get asset(){return t()},get alt(){return z(r).relPath},variant:`tile`,get checkerboard(){return c()}});var u=L(l,2),d=e=>{Wbe(e,{get path(){return z(r).relPath},children:(e,t)=>{var n=V(),a=I(n),o=e=>{var t=M5(),n=F(t,!0);D(t),R(e=>U(n,e),[()=>Y(`assets_dialog.unsaved`)]),H(e,t)};W(a,e=>{i()===`list`&&z(r).unsaved&&e(o)}),H(e,n)},$$slots:{default:!0}})};W(u,e=>{(!bE.isSmallScreen||i()===`list`)&&e(d)}),H(e,a)},$$slots:{default:!0}})}}),H(e,r)},$$slots:{renderItem:!0}})},$$slots:{default:!0}}),D(t),H(e,t)},v=e=>{k2(e,{children:(e,t)=>{var n=yxe(),r=F(n,!0);D(n),R(e=>U(r,e),[()=>Y(`no_files_found`)]),H(e,n)},$$slots:{default:!0}})};W(g,e=>{z(f).length?e(_):e(v,-1)}),H(e,h),k()}var M5,_xe,vxe,yxe,bxe,xxe=o((()=>{Z(),J(),X(),$(),Kw(),Np(),Ybe(),exe(),ixe(),n6(),j8(),SE(),M5=B(`<div role="none" class="unsaved svelte-1ong0f1"> </div>`),_xe=B(`<!> <!> <!>`,1),vxe=B(`<div role="none" class="grid-wrapper svelte-1ong0f1"><!></div>`),yxe=B(`<span role="none"> </span>`),bxe={hash:`svelte-1ong0f1`,code:`.grid-wrapper.svelte-1ong0f1 {overflow-y:auto;height:100%;[role='listbox'] {background-color:transparent;&.grid {.unsaved {position:absolute;inset-block-start:8px;inset-inline-end:8px;z-index:1;}}&.list {.name {display:flex;gap:8px;align-items:center;justify-content:space-between;}}}}.unsaved.svelte-1ong0f1 {display:flex;justify-content:center;align-items:center;border-color:var(--sui-info-border-color);border-radius:4px;padding:2px 6px;color:var(--sui-info-foreground-color);background-color:var(--sui-info-background-color);font-size:var(--sui-font-size-small);}`}}));function Sxe(e,t){O(t,!0);let n=()=>j(d4,`$selectAssetsView`,r),[r,i]=mn(),a=q(t,`multiple`,3,!1),o=q(t,`accept`,3,void 0),s=q(t,`assets`,19,()=>[]),c=q(t,`searchTerms`,3,``),l=q(t,`basePath`,3,void 0),u=q(t,`selectedResources`,31,()=>br([])),d=N(void 0);Qr(()=>{u().length||zi(()=>{z(d)?.reset()})}),Rs(G6(e,{get multiple(){return a()},get accept(){return o()},get onDrop(){return t.onDrop},children:(e,t)=>{{let t=M(()=>n()?.type);gxe(e,{get multiple(){return a()},get assets(){return s()},get viewType(){return z(t)},get searchTerms(){return c()},get basePath(){return l()},gridId:`select-assets-grid`,checkerboard:!0,get selectedResources(){return u()},set selectedResources(e){u(e)}})}},$$slots:{default:!0}}),e=>P(d,e,!0),()=>z(d)),k(),i()}var Cxe=o((()=>{Z(),J(),rc(),xxe(),K6(),f4()})),N5,P5,F5,I5=o((()=>{J(),$F(),N5={count:0,name:``,showDialog:!1,resolve:()=>{}},P5=br({...N5}),F5=async({files:e,listedAssets:t})=>{let n=QF(e,t),r=n.length;if(!r)return!1;let{promise:i,resolve:a}=Promise.withResolvers();Object.assign(P5,{count:r,name:n[0].name,showDialog:!0,resolve:a});let o=await i;return Object.assign(P5,{...N5}),o}})),wxe,L5,R5,z5,Txe,B5,Exe,V5=o((()=>{Ep(),Gp(),wxe=l(UO(),1),qp(),$F(),cm(),L5=({collectionName:e,fileName:t,componentName:n,typedKeyPath:r,isIndexFile:i})=>{let a=rm({collectionName:e,fileName:t,componentName:n,typedKeyPath:r,isIndexFile:i}),o=t?rm({collectionName:e,fileName:t}):void 0,s=rm({collectionName:e}),c=o??s,l=A(em),u={field:{folder:a,enabled:a!==void 0},entry:{folder:c,enabled:!!c&&(c.entryRelative||c.hasTemplateTags)},file:{folder:o,enabled:!!o&&!o.entryRelative&&!o.hasTemplateTags},collection:{folder:s,enabled:!!s&&!s.entryRelative&&!s.hasTemplateTags},global:{folder:l,enabled:l!==void 0}};return A($p).forEach(e=>{e.isAssetCollection&&e.collectionName&&(u[e.collectionName]={folder:e,enabled:!0})}),u},R5=({entry:e,folder:t})=>{let{entryRelative:n,internalPath:r,internalSubPath:i}=t??{};if(!n)return r?.replace(`{{slug}}`,e?.slug??`-`);let a=i||void 0;if(e){let t=Rp(Object.values(e.locales)[0].path).dirname;return a?`${t}/${a}`:t}return a?`${r}/${a}/-`:`${r}/-`},z5=({path:e,folderPath:t})=>t!==void 0&&(e===t||`${e}/-`===t||e.startsWith(`${t}/`)),Txe=({asset:e,folder:t,folderPath:n})=>{if(t===void 0||e.folder?.internalPath!==t.internalPath||e.folder?.entryRelative!==t.entryRelative)return!1;if(!t.entryRelative)return z5({path:e.path,folderPath:n});let{dirname:r}=Rp(e.path);return r===void 0?!1:z5({path:r,folderPath:n})},B5=({kind:e,folder:t,folderPath:n,unsavedAssets:r})=>[...A(LF),...r].filter(t=>!e||e===t.kind).sort((e,t)=>e.name.localeCompare(t.name)).sort((e,t)=>Number(!!t.unsaved)-Number(!!e.unsaved)).filter(e=>Txe({asset:e,folder:t,folderPath:n})),Exe=async({hash:e,folder:t,unsavedAssets:n})=>(await Promise.all(n.map(async n=>!!n.file&&(0,wxe.default)(n.folder,t)&&await Tp(n.file)===e))).includes(!0)})),H5,Dxe,U5,W5,G5,Oxe,K5,q5=o((()=>{Ep(),H5=l(UO(),1),dx(),qp(),$F(),lN(),yT(),IF(),FE(),Dxe=/(?<path>.+?)(?:\/[^/]+)?$/,U5=async({draft:e,file:t,folder:n})=>{let r=await Tp(t),i;return await Promise.all(Object.entries(e.files??{}).map(async([e,t])=>{!i&&await Tp(t.file)===r&&(!n?.entryRelative||(0,H5.default)(t.folder,n))&&(i=e)})),i},W5=async({file:e,blobURL:t,folder:n,targetFolderPath:r})=>{let{name:i,size:a}=e;return{unsaved:!0,file:e,blobURL:t??URL.createObjectURL(e),name:i,path:r?`${r}/${i}`:i,sha:await PE(e),size:a,kind:vT(i),folder:n}},G5=async({draft:e,targetFolderPath:t})=>Promise.all(Object.entries(e.files).map(async([e,{file:n,folder:r}])=>W5({file:n,blobURL:e,folder:r,targetFolderPath:t}))),Oxe=(e,t)=>{let n=A(LF);if(!t?.entryRelative)return n;let{originalEntry:r,defaultLocale:i,collection:a}=e,o=r?.locales[i]?.path;if(!o)return[];let s=a._type===`entry`?a._file.subPath:void 0,c=s?.includes(`/`)?s.split(`/`).at(-1):void 0,l=o.substring(0,o.lastIndexOf(`.`));c&&!c.includes(`{{`)&&(l=l.match(Dxe)?.groups?.path??l);let u=[l,t.internalSubPath].filter(Boolean).join(`/`);return n.filter(e=>e.path.startsWith(`${u}/`))},K5=async({draft:e,resource:t,libraryConfig:n})=>{let{url:r,credit:i,replace:a=!1}=t,{asset:o,file:s}=t,c=``,l;if(s){let{folder:r}=t,i=await U5({draft:e,file:s,folder:r});if(i)c=i;else{let{file:t,oversized:i}=await FF(s,n??{});s=t;let u=await PE(s),d=[...Oxe(e,r),...await G5({draft:e})].find(e=>e.sha===u&&(0,H5.default)(e.folder,r));d?(o=d,s=void 0):i?(l=s.name,s=void 0):(c=URL.createObjectURL(s),e.files[c]={file:s,folder:r,replace:a})}}return o&&(o.unsaved?o.file&&(c=await U5({draft:e,file:o.file,folder:o.folder})):c=oN(o,{pathOnly:!0,allowSpecial:!0,entry:e.originalEntry})),r&&!s&&!o&&(c=r),{value:c,credit:i?ux(i,{ALLOWED_TAGS:[`a`],ALLOWED_ATTR:[`href`]}):``,oversizedFileName:l}}})),J5,Y5,X5,kxe,Axe,Z5,jxe,Mxe,Nxe,Pxe=o((()=>{X(),Kw(),J5=[`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(`,`),Y5=`https://api.pexels.com/v1`,X5={per_page:80},kxe=/\/photo\/(?<alt>.+?)-\d+\/$/,Axe=()=>{let e=Hh.current.toLowerCase(),[t]=e.split(`-`);return J5.find(t=>t.toLowerCase()===e)??J5.find(e=>e.split(`-`)[0]===t)??`en-US`},Z5=e=>e.map(({id:e,url:t,alt:n,src:{large2x:r,medium:i},photographer:a})=>({id:String(e),description:t.match(kxe)?.groups?.alt.replace(/-/g,` `)??n,previewURL:i,downloadURL:r,fileName:`pexels-${a.split(/\s+/).join(`-`).toLowerCase()}-${e}.jpg`,kind:`image`,credit:`<a href="${t}">Photo by ${a} on Pexels</a>`})),jxe=async({apiKey:e})=>{let t={Authorization:e},n=new URLSearchParams(X5),r=await fetch(`${Y5}/curated?${n}`,{headers:t});if(!r.ok)return Promise.reject();let i=(await r.json()).photos;return Z5(i)},Mxe=async(e,{apiKey:t})=>{let n={Authorization:t},r=new URLSearchParams({...X5,query:e,locale:Axe()}),i=[];for(let e=1;e<=2;e+=1){r.set(`page`,String(e));let t=await fetch(`${Y5}/search?${r}`,{headers:n});if(!t.ok)return Promise.reject();let{photos:a,next_page:o}=await t.json();if(i.push(...a),!o)break;await Gw(50)}return Z5(i)},Nxe={serviceType:`stock_assets`,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}$/,list:jxe,search:Mxe}})),Fxe,Ixe,Lxe,Rxe,zxe,Bxe,Vxe,Hxe=o((()=>{Fxe=`https://picsum.photos/v2/list`,Ixe=100,Lxe=10,Rxe=3,zxe=e=>e.map(({id:e,width:t,height:n})=>{let r=t>=n,[i,a]=r?[1920,1280]:[1280,1920],[o,s]=r?[480,320]:[320,480];return{id:e,description:``,previewURL:`https://picsum.photos/id/${e}/${o}/${s}.webp`,downloadURL:`https://picsum.photos/id/${e}/${i}/${a}.webp`,fileName:`picsum-${e}.webp`,kind:`image`}}),Bxe=async()=>{let e=Array.from({length:Lxe},(e,t)=>t+1).sort(()=>Math.random()-.5).slice(0,Rxe),t=await Promise.all(e.map(e=>fetch(`${Fxe}?page=${e}&limit=${Ixe}`)));if(t.some(e=>!e.ok))return Promise.reject();let n=await Promise.all(t.map(e=>e.json()));return zxe(n.flat().sort(()=>Math.random()-.5))},Vxe={serviceType:`stock_assets`,serviceId:`picsum`,serviceLabel:`Lorem Picsum`,serviceURL:`https://picsum.photos/`,showServiceLink:!0,hotlinking:!0,authType:`none`,list:Bxe}})),Uxe,Q5,$5,e7,t7,Wxe,Gxe,Kxe,qxe=o((()=>{X(),Uxe=`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(`,`),Q5=`https://pixabay.com/api`,$5={image_type:`photo`,min_width:1280,safesearch:!0,per_page:150},e7=e=>e.map(({id:e,webformatURL:t,previewURL:n,largeImageURL:r,imageWidth:i,imageHeight:a,pageURL:o,tags:s,user:c})=>({id:String(e),description:s,previewURL:t.replace(`_640.`,i>a?`_180.`:`_340.`),downloadURL:r,fileName:n.split(`/`).pop().replace(`_150.`,`_1280.`),kind:`image`,credit:`<a href="${o}">Photo by ${c} on Pixabay`})),t7=()=>{let[e]=Hh.current.toLowerCase().split(`-`);return Uxe.includes(e)?e:`en`},Wxe=async({apiKey:e})=>{let t=new URLSearchParams({...$5,key:e,lang:t7(),editors_choice:`true`}),n=await fetch(`${Q5}/?${t}`);if(!n.ok)return Promise.reject();let r=(await n.json()).hits;return e7(r)},Gxe=async(e,{apiKey:t})=>{let n=new URLSearchParams({...$5,key:t,lang:t7(),q:e}),r=await fetch(`${Q5}/?${n}`);if(!r.ok)return Promise.reject();let i=(await r.json()).hits;return e7(i)},Kxe={serviceType:`stock_assets`,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}$/,list:Wxe,search:Gxe}})),n7,r7,i7,a7,Jxe,o7,Yxe,Xxe,Zxe,Qxe=o((()=>{X(),Kw(),n7=[`af,sq,am,ar,hy,as,az,bn,ba,eu,bs,bg,yue,ca,lzh,zh-Hans,zh-Hant,hr,cs,da,prs,dv,nl,en,et,fo,fj`,`fil,fi,fr,fr-ca,gl,ka,de,el,gu,ht,he,hi,mww,hu,is,id,ikt,iu,iu-Latn,ga,it,ja,kn,kk,km,ko,ku,kmr`,`ky,lo,lv,lt,mk,mg,ms,ml,mt,mi,mr,mn-Cyrl,mn-Mong,my,ne,nb,or,ps,fa,pl,pt,pt-pt,pa,otq,ro,ru,sm`,`sr-Cyrl,sr-Latn,sk,sl,so,es,sw,sv,ty,ta,tt,te,th,bo,ti,to,tr,tk,uk,hsb,ur,ug,uz,vi,cy,yua,zu`].join(`,`).split(`,`),r7=`https://api.unsplash.com`,i7=`utm_source=sveltia-cms&utm_medium=referral`,a7={per_page:30},Jxe=()=>{let e=Hh.current.toLowerCase(),[t]=e.split(`-`);return n7.find(t=>t.toLowerCase()===e)??n7.find(e=>e.split(`-`)[0]===t)??`en`},o7=e=>e.map(({id:e,description:t,alt_description:n,urls:{regular:r,thumb:i},user:{username:a,name:o}})=>({id:String(e),description:[t,n].filter(Boolean).join(` — `),previewURL:i,downloadURL:r,fileName:`${o.split(/\s+/).join(`-`).toLowerCase()}-${e}-unsplash.jpg`,kind:`image`,credit:`Photo by <a href="https://unsplash.com/@${a}?${i7}">${o}</a> on <a href="https://unsplash.com/?${i7}">Unsplash</a>`})),Yxe=async({apiKey:e})=>{let t={Authorization:`Client-ID ${e}`},n=new URLSearchParams(a7),r=await fetch(`${r7}/photos?${n}`,{headers:t});if(!r.ok)return Promise.reject();let i=await r.json();return o7(i)},Xxe=async(e,{apiKey:t})=>{let n={Authorization:`Client-ID ${t}`},r=new URLSearchParams({...a7,query:e,lang:Jxe()}),i=[];for(let e=1;e<=5;e+=1){r.set(`page`,String(e));let t=await fetch(`${r7}/search/photos?${r}`,{headers:n});if(!t.ok)return Promise.reject();let{results:a,total_pages:o}=await t.json();if(i.push(...a),o===e)break;await Gw(50)}return o7(i)},Zxe={serviceType:`stock_assets`,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,}$/,list:Yxe,search:Xxe}})),s7,c7,$xe=o((()=>{MF(),Pxe(),Hxe(),qxe(),Qxe(),s7={pexels:Nxe,picsum:Vxe,pixabay:Kxe,unsplash:Zxe},c7=({fieldConfig:e}={})=>{let t=jF({libraryName:`stock_assets`,fieldConfig:e});if(t===!1)return{providers:[]};let n=Object.keys(s7),{providers:r}=t;return{providers:Array.isArray(r)?r:n}}}));function eSe(e,t){let n=Ma();O(t,!0),G(e,oSe);let r=()=>j(t.entryDraft,`$entryDraft`,o),i=()=>j(a4,`$showContentOverlay`,o),a=()=>j(d4,`$selectAssetsView`,o),[o,s]=mn(),c=e=>{var n=l7(),r=I(n),i=e=>{var n=l7(),r=I(n),i=e=>{{let t=M(()=>d4);C8(e,{get currentView(){return z(t)},"aria-controls":`select-assets-grid`})}};W(r,e=>{a()&&e(i)});var o=L(r,2);{let e=M(()=>!z(ne)),n=M(()=>z(x).some(e=>e.file)),r=M(()=>Y(`assets_dialog.search_for_${t.kind??`file`}`));YR(o,{dir:`auto`,get flex(){return bE.isSmallScreen},get debounce(){return z(e)},get disabled(){return z(n)},get"aria-label"(){return z(r)},get value(){return z(g)},set value(e){P(g,e,!0)}})}H(e,n)};W(r,e=>{(z(ne)||z(le)&&z(_)!==`cloudinary`||z(ue)&&z(_)!==`picsum`)&&e(i)});var o=L(r,2),s=e=>{{let t=e=>{oI(e,{name:`cloud_upload`})},n=M(()=>Y(`upload`));wI(e,{variant:`primary`,get label(){return z(n)},onclick:()=>{z(b)?.open()},startIcon:t,$$slots:{startIcon:!0}})}};W(o,e=>{(z(ne)||z(le)&&z(_)!==`cloudinary`)&&e(s)}),H(e,n)},l=q(t,`open`,15,!1),u=q(t,`multiple`,3,!1),d=q(t,`accept`,19,()=>t.kind===`image`?kM.join(`,`):void 0),f=q(t,`canEnterURL`,3,!0),p=q(t,`onSelect`,3,void 0),m=q(t,`pendingFiles`,31,()=>br([])),h=N(``),g=N(``),_=N(`default-global`),v=N(br([])),y=N(br([])),b=N(void 0),x=N(br([])),S=N(void 0),C=(e,t)=>{let n=e[1].serviceLabel.toLowerCase(),r=t[1].serviceLabel.toLowerCase();return n.localeCompare(r)},w=M(()=>t.kind===`image`?Y(`assets_dialog.title.image`):Y(`assets_dialog.title.file`)),T=M(()=>k8(z(g))),te=M(()=>jF({fieldConfig:t.fieldConfig})!==!1&&Object.values(t.assetLibraryFolderMap).some(({enabled:e})=>e)),ne=M(()=>z(_).startsWith(`default-`)),re=M(()=>{if(!z(ne))return;let e=z(_).replace(`default-`,``),{folder:n}=t.assetLibraryFolderMap[e];return n}),ie=M(()=>R5({entry:r()?.originalEntry,folder:z(re)})),ae=M(()=>B5({kind:t.kind,folder:z(re),folderPath:z(ie),unsavedAssets:z(y)})),oe=M(()=>{let{providers:e=[]}=c7({fieldConfig:t.fieldConfig});return Object.entries(s7).filter(([t,{hotlinking:n}])=>e.includes(t)&&(n||z(te))).sort(C)}),se=M(()=>z(oe).some(([e,{authType:t}])=>e===z(_)&&(t===`none`||!!qO.apiKeys?.[z(_)]))),ce=M(()=>[...t.enabledCloudServiceEntries,...z(oe)].sort(C)),le=M(()=>t.enabledCloudServiceEntries.map(([e])=>e).includes(z(_))),ue=M(()=>z(oe).map(([e])=>e).includes(z(_))),de=M(()=>bE.isSmallScreen?sz:UL),E=async e=>{let t=await Tp(e),n=z(re);if(await Exe({hash:t,folder:n,unsavedAssets:z(y)}))return;let r=await W5({file:e,folder:n,targetFolderPath:z(ie)});return z(v).push(r),r},fe=async e=>{let t=await F5({files:e,listedAssets:z(ae)});t!==void 0&&P(x,(await Promise.all(e.map(e=>E(e)))).filter(e=>!!e).map(e=>({asset:e,replace:t})),!0)},pe=()=>{P(h,``),P(g,``),P(v,[],!0),P(y,[],!0),P(x,[],!0)},me=()=>{if(!z(x).length)return;let e=At(z(x)).map(e=>{let{asset:{unsaved:t,file:n,folder:r}={},replace:i}=e;return t?{file:n,folder:r,replace:i}:e});p()?.(e)};ei(()=>{let e=z(te)?Object.entries(t.assetLibraryFolderMap).find(([,{enabled:e}])=>e)?.[0]:void 0;e?P(_,`default-${e}`):P(_,z(ce)[0]?.[0],!0)}),Qr(()=>{r()?.files,At(z(v)),(async()=>{P(y,[...r()?.files?await G5({draft:r(),targetFolderPath:z(ie)}):[],...Object.values(z(v))],!0)})()}),Qr(()=>{i()||l(!1)}),Qr(()=>{z(S)&&m().length&&(z(S).uploadFiles(m()),m([]))});var he=l7(),ge=I(he);{let e=e=>{var t=V(),n=I(t),r=e=>{c(e)};W(n,e=>{bE.isSmallScreen||e(r)}),H(e,t)},r=e=>{var t=V(),n=I(t),r=e=>{let t=M(()=>{let{showServiceLink:e,serviceLabel:t,serviceURL:n}=s7[z(_)]??{};return{showServiceLink:e,serviceLabel:t,serviceURL:n}});var n=V(),r=I(n),i=e=>{var n=tSe(),r=F(n,!0);D(n),R(e=>{K(n,`href`,z(t).serviceURL),U(r,e)},[()=>Y(`prefs.media.stock_photos.credit`,{values:{service:z(t).serviceLabel}})]),H(e,n)};W(r,e=>{z(t).showServiceLink&&e(i)}),H(e,n)};W(n,e=>{z(se)&&e(r)}),H(e,t)},i=M(()=>Y(`insert`)),a=M(()=>!z(x).length);nL(ge,{get title(){return z(w)},size:`x-large`,get okLabel(){return z(i)},get okDisabled(){return z(a)},keepContent:!0,focusInput:!1,onOk:me,onClose:()=>{pe()},get open(){return l()},set open(e){l(e)},headerExtra:e,footerExtra:r,children:(e,r)=>{var i=aSe(),a=F(i),o=F(a);{let e=M(()=>Y(`assets_dialog.locations`));To(o,()=>z(de),(r,i)=>{i(r,{class:`tabs`,get"aria-label"(){return z(e)},get"aria-controls"(){return`${n}-content-pane`},filterThreshold:-1,onChange:e=>{P(_,e.detail.name,!0),P(x,[],!0)},children:(e,n)=>{var r=nSe(),i=I(r),a=e=>{{let n=M(()=>Y(`asset_location.repository`));JL(e,{get label(){return z(n)},children:(e,n)=>{var r=V();uo(I(r),17,()=>Object.entries(t.assetLibraryFolderMap),([e,{folder:t,enabled:n}])=>e,(e,t)=>{var n=M(()=>ee(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1].folder,a=()=>z(n)[1].enabled;var o=V(),s=I(o),c=e=>{let t=M(()=>`default-${r()}`);{let n=M(()=>i()?.label??Y(`assets_dialog.folder.${r()}`)),a=M(()=>z(_)===z(t));QL(e,{get name(){return z(t)},get label(){return z(n)},get selected(){return z(a)}})}};W(s,e=>{a()&&e(c)}),H(e,o)}),H(e,r)},$$slots:{default:!0}})}};W(i,e=>{z(te)&&e(a)});var o=L(i,2),s=e=>{{let n=M(()=>Y(`asset_location.external`));JL(e,{get label(){return z(n)},children:(e,n)=>{var r=l7(),i=I(r);uo(i,17,()=>t.enabledCloudServiceEntries,([,{serviceId:e,serviceLabel:t}])=>e,(e,t)=>{var n=M(()=>ee(z(t),2));let r=()=>z(n)[1].serviceId,i=()=>z(n)[1].serviceLabel;{let t=M(()=>z(_)===r());QL(e,{get name(){return r()},get label(){return i()},get selected(){return z(t)}})}});var a=L(i,2),o=e=>{{let t=M(()=>Y(`assets_dialog.enter_url`)),n=M(()=>z(_)===`enter-url`);QL(e,{name:`enter-url`,get label(){return z(t)},get selected(){return z(n)}})}};W(a,e=>{f()&&e(o)}),H(e,r)},$$slots:{default:!0}})}},c=M(()=>f()||!!Object.keys(t.enabledCloudServiceEntries).length);W(o,e=>{z(c)&&e(s)});var l=L(o,2),u=e=>{{let t=M(()=>Y(`asset_location.stock_photos`));JL(e,{get label(){return z(t)},children:(e,t)=>{var n=V();uo(I(n),17,()=>z(oe),([e,{serviceLabel:t}])=>e,(e,t)=>{var n=M(()=>ee(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1].serviceLabel;{let t=M(()=>z(_)===r());QL(e,{get name(){return r()},get label(){return i()},get selected(){return z(t)}})}}),H(e,n)},$$slots:{default:!0}})}};W(l,e=>{z(oe).length&&e(u)}),H(e,r)},$$slots:{default:!0}})})}var s=L(o,2),p=e=>{var t=rSe(),n=F(t);c(n),D(t),H(e,t)};W(s,e=>{bE.isSmallScreen&&e(p)}),D(a);var m=L(a,2),g=F(m),v=e=>{Sxe(e,{get accept(){return d()},get multiple(){return u()},get assets(){return z(ae)},get searchTerms(){return z(T)},get basePath(){return z(re).internalPath},onDrop:({files:e})=>{fe(e)},get selectedResources(){return z(x)},set selectedResources(e){P(x,e,!0)}})};W(g,e=>{z(ne)&&z(re)&&e(v)});var y=L(g,2),b=e=>{k2(e,{children:(e,n)=>{var r=iSe(),i=I(r),a=F(i,!0);D(i),hL(L(i,2),{dir:`ltr`,flex:!0,oninput:()=>{let e=z(h).trim();P(x,e?[{url:e}]:[],!0)},get value(){return z(h)},set value(e){P(h,e,!0)}}),R(e=>U(a,e),[()=>t.kind===`image`?Y(`assets_dialog.enter_image_url`):Y(`assets_dialog.enter_file_url`)]),H(e,r)},$$slots:{default:!0}})};W(y,e=>{f()&&z(_)===`enter-url`&&e(b)}),uo(L(y,2),17,()=>z(ce),([e,t])=>e,(e,n)=>{var r=M(()=>ee(z(n),2));let i=()=>z(r)[0],a=()=>z(r)[1];var o=V(),s=I(o),c=e=>{{let n=M(()=>z(_)!==`cloudinary`);zbe(e,{get kind(){return t.kind},get fieldConfig(){return t.fieldConfig},get multiple(){return u()},get hidden(){return z(n)},onSelect:e=>{l()&&(P(x,e,!0),me(),l(!1))}})}},d=e=>{Rs(cxe(e,{get kind(){return t.kind},get fieldConfig(){return t.fieldConfig},get multiple(){return u()},get searchTerms(){return z(T)},get serviceProps(){return a()},gridId:`select-assets-grid`,get selectedResources(){return z(x)},set selectedResources(e){P(x,e,!0)}}),e=>P(S,e,!0),()=>z(S))};W(s,e=>{i()===`cloudinary`?e(c):z(_)===i()&&e(d,1)}),H(e,o)}),D(m),D(i),R(()=>K(m,`id`,`${n}-content-pane`)),H(e,i)},$$slots:{headerExtra:!0,footerExtra:!0,default:!0}})}Rs(TL(L(ge,2),{get accept(){return d()},get multiple(){return u()},onSelect:({files:e})=>{z(le)?z(S)?.uploadFiles(e):fe(e)}}),e=>P(b,e,!0),()=>z(b)),H(e,he),k(),s()}var l7,tSe,nSe,rSe,iSe,aSe,oSe,sSe=o((()=>{Z(),J(),X(),$(),Ep(),Ube(),hxe(),Cxe(),w8(),f4(),I5(),V5(),q5(),MF(),$xe(),j8(),SE(),JO(),jM(),l7=B(`<!> <!>`,1),tSe=B(`<a class="service-link svelte-5b1zbe"> </a>`),nSe=B(`<!> <!> <!>`,1),rSe=B(`<div role="none" class="filter-tools svelte-5b1zbe"><!></div>`),iSe=B(`<div role="none"> </div> <!>`,1),aSe=B(`<div role="none" class="wrapper svelte-5b1zbe"><div role="none" class="nav svelte-5b1zbe"><!> <!></div> <div role="none" class="content-pane svelte-5b1zbe"><!> <!> <!></div></div>`),oSe={hash:`svelte-5b1zbe`,code:`.wrapper.svelte-5b1zbe {display:flex;gap:16px;height:60dvh;max-height:800px;--tile-padding: 4px;
961
961
 
962
962
  @media (width < 768px) {flex-direction:column;overflow:hidden;height:72dvh;
963
963
  }.nav:where(.svelte-5b1zbe) {flex:none;display:flex;gap:4px;
964
964
 
965
965
  @media (width < 768px) {flex-direction:column;
966
- }}.listbox {flex:none;background-color:transparent;}.content-pane:where(.svelte-5b1zbe) {overflow:auto;flex:auto;}}.service-link.svelte-5b1zbe {font-size:var(--sui-font-size-small);}.filter-tools.svelte-5b1zbe {display:flex;gap:8px;}`}}));function cSe(e,t){O(t,!0);{let t=e=>{var t=lSe(),n=I(t);UI(n,{flex:!0});var r=L(n,2);wI(r,{variant:`primary`,onclick:()=>P5.resolve(!0),children:(e,t)=>{gt();var n=ja();R(e=>U(n,e),[()=>Y(`replace`)]),H(e,n)},$$slots:{default:!0}});var i=L(r,2);wI(i,{variant:`primary`,onclick:()=>P5.resolve(!1),children:(e,t)=>{gt();var n=ja();R(e=>U(n,e),[()=>Y(`keep_both`)]),H(e,n)},$$slots:{default:!0}}),wI(L(i,2),{variant:`secondary`,onclick:()=>P5.resolve(void 0),children:(e,t)=>{gt();var n=ja();R(e=>U(n,e),[()=>Y(`cancel`)]),H(e,n)},$$slots:{default:!0}}),H(e,t)},n=M(()=>Y(`file_name_conflict_resolution`));pL(e,{get title(){return z(n)},onCancel:()=>P5.resolve(void 0),get open(){return P5.showDialog},set open(e){P5.showDialog=e},footer:t,children:(e,t)=>{gt();var n=ja();R(e=>U(n,e),[()=>Y(`file_name_conflict_confirmation_with_name`,{values:{count:P5.count,name:P5.name}})]),H(e,n)},$$slots:{footer:!0,default:!0}})}k()}var lSe,uSe=o((()=>{Z(),J(),X(),$(),I5(),lSe=B(`<!> <!> <!> <!>`,1)}));function dSe(e,t){O(t,!0),G(e,gSe);let n=()=>j(O6,`$entryDraft`,r),[r,i]=mn(),a=q(t,`readonly`,3,!1),o=q(t,`invalid`,3,!1),s=q(t,`required`,3,!1),c=q(t,`collectionName`,3,``),l=q(t,`fileName`,3,void 0),u=q(t,`typedKeyPath`,3,void 0),d=q(t,`entry`,3,void 0),f=N(void 0),p=N(void 0),m=N(void 0),h=N(void 0),g=M(()=>t.fieldConfig.widget),_=M(()=>z(g)===`image`),v=M(()=>{if(!t.value)return``;if(z(p)){let{publicPath:e,entryRelative:r,hasTemplateTags:i}=n()?.files[t.value]?.folder??{};return jE([r||i?``:e||``,decodeURI(z(p).name.normalize())])}if(!t.value.startsWith(`blob:`)){let e=decodeURI(t.value);if(jp(e)){let t=new URL(e);if(t.search)return t.search=``,`${t}…`}return e}return``}),y=async()=>{if(t.value?.startsWith(`blob:`)&&n()&&P(p,n().files[t.value]?.file,!0),t.value){let e={value:t.value,entry:d(),collectionName:c(),fileName:l(),fieldConfig:t.fieldConfig,typedKeyPath:u()};z(_)&&/^https?:/.test(t.value)?(P(f,void 0),P(m,`image`),P(h,t.value,!0)):t.value.startsWith(`blob:`)||(P(f,YF({...e}),!0),P(m,void 0),P(h,void 0)),!z(f)&&!z(h)&&(P(m,await gT(t.value),!0),P(h,z(m)?await cN({...e,thumbnail:!0}):void 0,!0))}else P(f,void 0),P(p,void 0),P(m,void 0),P(h,void 0)};Qr(()=>{t.value,zi(()=>{y()})});var b=hSe(),x=F(b),S=e=>{var n=fSe(),r=F(n);{let e=e=>{oI(e,{name:`arrow_upward`})},n=M(()=>!t.onMoveUp),i=M(()=>Y(`move_up`));wI(r,{size:`small`,iconic:!0,get disabled(){return z(n)},get"aria-label"(){return z(i)},onclick:()=>{t.onMoveUp?.()},startIcon:e,$$slots:{startIcon:!0}})}var i=L(r,2);{let e=e=>{oI(e,{name:`arrow_downward`})},n=M(()=>!t.onMoveDown),r=M(()=>Y(`move_down`));wI(i,{size:`small`,iconic:!0,get disabled(){return z(n)},get"aria-label"(){return z(r)},onclick:()=>{t.onMoveDown?.()},startIcon:e,$$slots:{startIcon:!0}})}D(n),H(e,n)};W(x,e=>{(t.onMoveUp||t.onMoveDown)&&!a()&&e(S)});var C=L(x,2),w=e=>{t6(e,{get kind(){return z(m)},get src(){return z(h)},variant:`tile`,checkerboard:!0})},T=e=>{t6(e,{get kind(){return z(f).kind},get asset(){return z(f)},variant:`tile`,checkerboard:!0})},ee=e=>{var t=pSe();oI(F(t),{name:`draft`}),D(t),H(e,t)};W(C,e=>{z(m)&&z(h)?e(w):z(f)?e(T,1):e(ee,-1)});var te=L(C,2),ne=F(te),re=e=>{var n=mSe(),r=F(n,!0);D(n),R(()=>{K(n,`id`,`${t.fieldId??``}-value`),K(n,`aria-readonly`,a()),K(n,`aria-invalid`,o()),K(n,`aria-required`,s()),K(n,`aria-labelledby`,`${t.fieldId??``}-label`),K(n,`aria-errormessage`,`${t.fieldId??``}-error`),U(r,z(v))}),H(e,n)};W(ne,e=>{typeof t.value==`string`&&e(re)});var ie=L(ne,2),ae=F(ie),oe=e=>{{let n=M(()=>Y(`replace`)),r=M(()=>Y(`replace_${z(g)}`));wI(e,{get disabled(){return a()},variant:`tertiary`,size:`small`,get label(){return z(n)},get"aria-label"(){return z(r)},get"aria-controls"(){return`${t.fieldId??``}-value`},onclick:()=>{t.onReplace()}})}};W(ae,e=>{t.onReplace&&e(oe)});var se=L(ae,2),ce=e=>{{let n=M(()=>Y(`remove`)),r=M(()=>Y(`remove_${z(g)}`));wI(e,{get disabled(){return a()},variant:`tertiary`,size:`small`,get label(){return z(n)},get"aria-label"(){return z(r)},get"aria-controls"(){return`${t.fieldId??``}-value`},onclick:()=>{t.onRemove()}})}};W(se,e=>{t.onRemove&&e(ce)}),D(ie),D(te),D(b),H(e,b),k(),i()}var fSe,pSe,mSe,hSe,gSe,_Se=o((()=>{Z(),J(),X(),$(),Np(),rc(),n6(),$F(),lN(),yT(),N6(),FE(),fSe=B(`<div role="toolbar" class="reorder-controls svelte-1yfgkx5"><!> <!></div>`),pSe=B(`<span role="none" class="preview no-thumbnail"><!></span>`),mSe=B(`<div role="textbox" tabindex="0" class="filename svelte-1yfgkx5"> </div>`),hSe=B(`<div role="none" class="filled svelte-1yfgkx5"><!> <!> <div role="none" class="svelte-1yfgkx5"><!> <div role="none"><!> <!></div></div></div>`),gSe={hash:`svelte-1yfgkx5`,code:`.filled.svelte-1yfgkx5 {display:flex !important;align-items:center;gap:12px;margin:var(--sui-focus-ring-width);.preview {flex:none;width:120px !important;height:120px !important;border-color:var(--sui-control-border-color) !important;border-radius:var(--sui-control-medium-border-radius);padding:8px !important;&.no-thumbnail {display:flex;align-items:center;justify-content:center;background-color:var(--sui-secondary-background-color);.icon {font-size:64px;}}}.sui.button.tertiary.small {margin:var(--sui-focus-ring-width);}& > div:where(.svelte-1yfgkx5) {flex:auto;overflow:hidden;.filename:where(.svelte-1yfgkx5) {margin:var(--sui-focus-ring-width);padding:4px;word-break:break-all;&:empty {margin:0;padding:0;}}}}.reorder-controls.svelte-1yfgkx5 {flex:none !important;display:flex;flex-direction:column;justify-content:space-evenly;align-items:center;gap:4px;border:1px solid var(--sui-control-border-color);border-radius:var(--sui-control-medium-border-radius);height:-moz-available;height:-webkit-fill-available;height:stretch;background-color:var(--sui-secondary-border-color);button {padding:0;height:16px;}}`}}));function vSe(e,t){O(t,!0),G(e,CSe);let n=e=>{var n=ySe(),o=F(n);{let e=M(()=>Y(`browse`));wI(o,{get label(){return z(e)},variant:`tertiary`,size:`small`,get disabled(){return z(s)},onclick:e=>{e.stopPropagation(),i(!1),r(!0)}})}var l=L(o,2),u=e=>{{let n=M(()=>Y(t.isImageField?`paste`:`paste_image`));wI(e,{get label(){return z(n)},variant:`tertiary`,size:`small`,get disabled(){return z(s)},onclick:e=>{e.stopPropagation(),c()}})}};W(l,e=>{a()&&e(u)}),D(n),H(e,n)},r=q(t,`showSelectAssetsDialog`,15,!1),i=q(t,`replaceMode`,15,!1),a=q(t,`onFilePaste`,3,void 0),o=br({show:!1,message:``}),s=M(()=>t.readonly||t.processing),c=async()=>{if(!(z(s)||!a()))try{let e=await navigator.clipboard.read(),t,n=e.find(e=>e.types.some(e=>{let n=e.startsWith(`image/`);return n&&(t=e),n}));if(n&&t){let e=await n.getType(t),r=t.split(`/`)[1].replace(`+xml`,``),i=new File([e],`pasted-image-${Date.now()}.${r}`,{type:t});a()(i);return}Object.assign(o,{message:Y(`no_image_in_clipboard`),show:!0})}catch{Object.assign(o,{message:Y(`clipboard_access_denied`),show:!0})}};var l=SSe(),u=I(l);let d;var f=F(u);oI(f,{name:`cloud_upload`});var p=L(f,2),m=F(p),h=e=>{var n=bSe(),r=F(n,!0);D(n),R(e=>U(r,e),[()=>Y(`processing_files`,{values:{count:t.multiple?2:1}})]),H(e,n)},g=e=>{var r=xSe(),i=I(r),a=e=>{var t=ja();R(e=>U(t,e),[()=>Y(`click_to_browse`)]),H(e,t)},o=e=>{var n=ja();R(e=>U(n,e),[()=>Y(`drop_image_files_or`,{values:{count:t.multiple?2:1}})]),H(e,n)},s=e=>{var n=ja();R(e=>U(n,e),[()=>Y(`drop_files_or`,{values:{count:t.multiple?2:1}})]),H(e,n)};W(i,e=>{t.allowDrop?t.isImageField?e(o,1):e(s,-1):e(a)});var c=L(i,2);n(c),H(e,r)},_=e=>{n(e)};W(m,e=>{t.processing?e(h):bE.hasMouse?e(g,1):e(_,-1)}),D(p),D(u),Bz(L(u,2),{get show(){return o.show},set show(e){o.show=e},children:(e,t)=>{cI(e,{status:`error`,children:(e,t)=>{gt();var n=ja();R(()=>U(n,o.message)),H(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}}),R(()=>{d=as(u,1,`empty svelte-1jvz1op`,null,d,{invalid:t.invalid,processing:t.processing}),K(u,`aria-disabled`,z(s)||void 0),K(u,`tabindex`,z(s)?-1:0)}),va(`click`,u,()=>{bE.hasMouse&&!z(s)&&(i(!1),r(!0))}),va(`keydown`,u,e=>{!z(s)&&dI(e,`Accel+V`)&&(e.preventDefault(),c())}),H(e,l),k()}var ySe,bSe,xSe,SSe,CSe,wSe=o((()=>{Z(),J(),X(),$(),pI(),SE(),ySe=B(`<div role="none" class="buttons"><!> <!></div>`),bSe=B(`<div role="status"> </div>`),xSe=B(`<!> <!>`,1),SSe=B(`<div role="button"><!> <div role="none" class="label svelte-1jvz1op"><!></div></div> <!>`,1),CSe={hash:`svelte-1jvz1op`,code:`.empty.svelte-1jvz1op {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;height:120px;margin:var(--sui-focus-ring-width);border-width:1px;border-style:solid;border-color:var(--sui-button-tertiary-border-color, var(--sui-button-border-color));border-radius:var(--sui-button-medium-border-radius);color:var(--sui-button-tertiary-foreground-color, var(--sui-highlight-foreground-color));background-color:var(
966
+ }}.listbox {flex:none;background-color:transparent;}.content-pane:where(.svelte-5b1zbe) {overflow:auto;flex:auto;}}.service-link.svelte-5b1zbe {font-size:var(--sui-font-size-small);}.filter-tools.svelte-5b1zbe {display:flex;gap:8px;}`}}));function cSe(e,t){O(t,!0);{let t=e=>{var t=lSe(),n=I(t);UI(n,{flex:!0});var r=L(n,2);wI(r,{variant:`primary`,onclick:()=>P5.resolve(!0),children:(e,t)=>{gt();var n=ja();R(e=>U(n,e),[()=>Y(`replace`)]),H(e,n)},$$slots:{default:!0}});var i=L(r,2);wI(i,{variant:`primary`,onclick:()=>P5.resolve(!1),children:(e,t)=>{gt();var n=ja();R(e=>U(n,e),[()=>Y(`keep_both`)]),H(e,n)},$$slots:{default:!0}}),wI(L(i,2),{variant:`secondary`,onclick:()=>P5.resolve(void 0),children:(e,t)=>{gt();var n=ja();R(e=>U(n,e),[()=>Y(`cancel`)]),H(e,n)},$$slots:{default:!0}}),H(e,t)},n=M(()=>Y(`file_name_conflict_resolution`));pL(e,{get title(){return z(n)},onCancel:()=>P5.resolve(void 0),get open(){return P5.showDialog},set open(e){P5.showDialog=e},footer:t,children:(e,t)=>{gt();var n=ja();R(e=>U(n,e),[()=>Y(`file_name_conflict_confirmation_with_name`,{values:{count:P5.count,name:P5.name}})]),H(e,n)},$$slots:{footer:!0,default:!0}})}k()}var lSe,uSe=o((()=>{Z(),J(),X(),$(),I5(),lSe=B(`<!> <!> <!> <!>`,1)}));function dSe(e,t){O(t,!0),G(e,gSe);let n=()=>j(O6,`$entryDraft`,r),[r,i]=mn(),a=q(t,`readonly`,3,!1),o=q(t,`invalid`,3,!1),s=q(t,`required`,3,!1),c=q(t,`collectionName`,3,``),l=q(t,`fileName`,3,void 0),u=q(t,`typedKeyPath`,3,void 0),d=q(t,`componentName`,3,void 0),f=q(t,`entry`,3,void 0),p=N(void 0),m=N(void 0),h=N(void 0),g=N(void 0),_=M(()=>t.fieldConfig.widget),v=M(()=>z(_)===`image`),y=M(()=>({value:t.value,entry:f(),collectionName:c(),fileName:l(),componentName:d(),typedKeyPath:u(),fieldConfig:t.fieldConfig})),b=M(()=>{if(!t.value)return``;if(z(m)){let{publicPath:e,entryRelative:r,hasTemplateTags:i}=n()?.files[t.value]?.folder??{};return jE([r||i?``:e||``,decodeURI(z(m).name.normalize())])}if(!t.value.startsWith(`blob:`)){let e=decodeURI(t.value);if(jp(e)){let t=new URL(e);if(t.search)return t.search=``,`${t}…`}return e}return``}),x=async()=>{t.value?.startsWith(`blob:`)&&n()&&P(m,n().files[t.value]?.file,!0),t.value?(z(v)&&/^https?:/.test(t.value)?(P(p,void 0),P(h,`image`),P(g,t.value,!0)):t.value.startsWith(`blob:`)||(P(p,YF({...z(y)}),!0),P(h,void 0),P(g,void 0)),!z(p)&&!z(g)&&(P(h,await gT(t.value),!0),P(g,z(h)?await cN({...z(y),thumbnail:!0}):void 0,!0))):(P(p,void 0),P(m,void 0),P(h,void 0),P(g,void 0))};Qr(()=>{t.value,zi(()=>{x()})});var S=hSe(),C=F(S),w=e=>{var n=fSe(),r=F(n);{let e=e=>{oI(e,{name:`arrow_upward`})},n=M(()=>!t.onMoveUp),i=M(()=>Y(`move_up`));wI(r,{size:`small`,iconic:!0,get disabled(){return z(n)},get"aria-label"(){return z(i)},onclick:()=>{t.onMoveUp?.()},startIcon:e,$$slots:{startIcon:!0}})}var i=L(r,2);{let e=e=>{oI(e,{name:`arrow_downward`})},n=M(()=>!t.onMoveDown),r=M(()=>Y(`move_down`));wI(i,{size:`small`,iconic:!0,get disabled(){return z(n)},get"aria-label"(){return z(r)},onclick:()=>{t.onMoveDown?.()},startIcon:e,$$slots:{startIcon:!0}})}D(n),H(e,n)};W(C,e=>{(t.onMoveUp||t.onMoveDown)&&!a()&&e(w)});var T=L(C,2),ee=e=>{t6(e,{get kind(){return z(h)},get src(){return z(g)},variant:`tile`,checkerboard:!0})},te=e=>{t6(e,{get kind(){return z(p).kind},get asset(){return z(p)},variant:`tile`,checkerboard:!0})},ne=e=>{var t=pSe();oI(F(t),{name:`draft`}),D(t),H(e,t)};W(T,e=>{z(h)&&z(g)?e(ee):z(p)?e(te,1):e(ne,-1)});var re=L(T,2),ie=F(re),ae=e=>{var n=mSe(),r=F(n,!0);D(n),R(()=>{K(n,`id`,`${t.fieldId??``}-value`),K(n,`aria-readonly`,a()),K(n,`aria-invalid`,o()),K(n,`aria-required`,s()),K(n,`aria-labelledby`,`${t.fieldId??``}-label`),K(n,`aria-errormessage`,`${t.fieldId??``}-error`),U(r,z(b))}),H(e,n)};W(ie,e=>{typeof t.value==`string`&&e(ae)});var oe=L(ie,2),se=F(oe),ce=e=>{{let n=M(()=>Y(`replace`)),r=M(()=>Y(`replace_${z(_)}`));wI(e,{get disabled(){return a()},variant:`tertiary`,size:`small`,get label(){return z(n)},get"aria-label"(){return z(r)},get"aria-controls"(){return`${t.fieldId??``}-value`},onclick:()=>{t.onReplace()}})}};W(se,e=>{t.onReplace&&e(ce)});var le=L(se,2),ue=e=>{{let n=M(()=>Y(`remove`)),r=M(()=>Y(`remove_${z(_)}`));wI(e,{get disabled(){return a()},variant:`tertiary`,size:`small`,get label(){return z(n)},get"aria-label"(){return z(r)},get"aria-controls"(){return`${t.fieldId??``}-value`},onclick:()=>{t.onRemove()}})}};W(le,e=>{t.onRemove&&e(ue)}),D(oe),D(re),D(S),H(e,S),k(),i()}var fSe,pSe,mSe,hSe,gSe,_Se=o((()=>{Z(),J(),X(),$(),Np(),rc(),n6(),$F(),lN(),yT(),N6(),FE(),fSe=B(`<div role="toolbar" class="reorder-controls svelte-1yfgkx5"><!> <!></div>`),pSe=B(`<span role="none" class="preview no-thumbnail"><!></span>`),mSe=B(`<div role="textbox" tabindex="0" class="filename svelte-1yfgkx5"> </div>`),hSe=B(`<div role="none" class="filled svelte-1yfgkx5"><!> <!> <div role="none" class="svelte-1yfgkx5"><!> <div role="none"><!> <!></div></div></div>`),gSe={hash:`svelte-1yfgkx5`,code:`.filled.svelte-1yfgkx5 {display:flex !important;align-items:center;gap:12px;margin:var(--sui-focus-ring-width);.preview {flex:none;width:120px !important;height:120px !important;border-color:var(--sui-control-border-color) !important;border-radius:var(--sui-control-medium-border-radius);padding:8px !important;&.no-thumbnail {display:flex;align-items:center;justify-content:center;background-color:var(--sui-secondary-background-color);.icon {font-size:64px;}}}.sui.button.tertiary.small {margin:var(--sui-focus-ring-width);}& > div:where(.svelte-1yfgkx5) {flex:auto;overflow:hidden;.filename:where(.svelte-1yfgkx5) {margin:var(--sui-focus-ring-width);padding:4px;word-break:break-all;&:empty {margin:0;padding:0;}}}}.reorder-controls.svelte-1yfgkx5 {flex:none !important;display:flex;flex-direction:column;justify-content:space-evenly;align-items:center;gap:4px;border:1px solid var(--sui-control-border-color);border-radius:var(--sui-control-medium-border-radius);height:-moz-available;height:-webkit-fill-available;height:stretch;background-color:var(--sui-secondary-border-color);button {padding:0;height:16px;}}`}}));function vSe(e,t){O(t,!0),G(e,CSe);let n=e=>{var n=ySe(),o=F(n);{let e=M(()=>Y(`browse`));wI(o,{get label(){return z(e)},variant:`tertiary`,size:`small`,get disabled(){return z(s)},onclick:e=>{e.stopPropagation(),i(!1),r(!0)}})}var l=L(o,2),u=e=>{{let n=M(()=>Y(t.isImageField?`paste`:`paste_image`));wI(e,{get label(){return z(n)},variant:`tertiary`,size:`small`,get disabled(){return z(s)},onclick:e=>{e.stopPropagation(),c()}})}};W(l,e=>{a()&&e(u)}),D(n),H(e,n)},r=q(t,`showSelectAssetsDialog`,15,!1),i=q(t,`replaceMode`,15,!1),a=q(t,`onFilePaste`,3,void 0),o=br({show:!1,message:``}),s=M(()=>t.readonly||t.processing),c=async()=>{if(!(z(s)||!a()))try{let e=await navigator.clipboard.read(),t,n=e.find(e=>e.types.some(e=>{let n=e.startsWith(`image/`);return n&&(t=e),n}));if(n&&t){let e=await n.getType(t),r=t.split(`/`)[1].replace(`+xml`,``),i=new File([e],`pasted-image-${Date.now()}.${r}`,{type:t});a()(i);return}Object.assign(o,{message:Y(`no_image_in_clipboard`),show:!0})}catch{Object.assign(o,{message:Y(`clipboard_access_denied`),show:!0})}};var l=SSe(),u=I(l);let d;var f=F(u);oI(f,{name:`cloud_upload`});var p=L(f,2),m=F(p),h=e=>{var n=bSe(),r=F(n,!0);D(n),R(e=>U(r,e),[()=>Y(`processing_files`,{values:{count:t.multiple?2:1}})]),H(e,n)},g=e=>{var r=xSe(),i=I(r),a=e=>{var t=ja();R(e=>U(t,e),[()=>Y(`click_to_browse`)]),H(e,t)},o=e=>{var n=ja();R(e=>U(n,e),[()=>Y(`drop_image_files_or`,{values:{count:t.multiple?2:1}})]),H(e,n)},s=e=>{var n=ja();R(e=>U(n,e),[()=>Y(`drop_files_or`,{values:{count:t.multiple?2:1}})]),H(e,n)};W(i,e=>{t.allowDrop?t.isImageField?e(o,1):e(s,-1):e(a)});var c=L(i,2);n(c),H(e,r)},_=e=>{n(e)};W(m,e=>{t.processing?e(h):bE.hasMouse?e(g,1):e(_,-1)}),D(p),D(u),Bz(L(u,2),{get show(){return o.show},set show(e){o.show=e},children:(e,t)=>{cI(e,{status:`error`,children:(e,t)=>{gt();var n=ja();R(()=>U(n,o.message)),H(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}}),R(()=>{d=as(u,1,`empty svelte-1jvz1op`,null,d,{invalid:t.invalid,processing:t.processing}),K(u,`aria-disabled`,z(s)||void 0),K(u,`tabindex`,z(s)?-1:0)}),va(`click`,u,()=>{bE.hasMouse&&!z(s)&&(i(!1),r(!0))}),va(`keydown`,u,e=>{!z(s)&&dI(e,`Accel+V`)&&(e.preventDefault(),c())}),H(e,l),k()}var ySe,bSe,xSe,SSe,CSe,wSe=o((()=>{Z(),J(),X(),$(),pI(),SE(),ySe=B(`<div role="none" class="buttons"><!> <!></div>`),bSe=B(`<div role="status"> </div>`),xSe=B(`<!> <!>`,1),SSe=B(`<div role="button"><!> <div role="none" class="label svelte-1jvz1op"><!></div></div> <!>`,1),CSe={hash:`svelte-1jvz1op`,code:`.empty.svelte-1jvz1op {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;height:120px;margin:var(--sui-focus-ring-width);border-width:1px;border-style:solid;border-color:var(--sui-button-tertiary-border-color, var(--sui-button-border-color));border-radius:var(--sui-button-medium-border-radius);color:var(--sui-button-tertiary-foreground-color, var(--sui-highlight-foreground-color));background-color:var(
967
967
  --sui-button-tertiary-background-color,
968
968
  var(--sui-button-background-color)
969
969
  );font-family:var(--sui-control-font-family);font-size:var(--sui-font-size-small);cursor:pointer;transition:all 200ms;&:focus-visible {z-index:1;outline:var(--sui-focus-ring-width) solid var(--sui-focus-ring-color);outline-offset:var(--sui-focus-ring-offset);}&:not([aria-disabled='true']):is(:where(.svelte-1jvz1op):hover, :where(.svelte-1jvz1op):focus-visible) {background-color:var(
@@ -977,14 +977,14 @@ ${JSON.stringify(e)}\n\nRespond with JSON only:`,zve=(e,t,n)=>{let r;try{r=JSON.
977
977
  @media (pointer: coarse) {cursor:default;&:active,
978
978
  &:focus {
979
979
  /* Reset the style because the element is non-interactive on touch devices */background-color:var(--sui-button-background-color) !important;}
980
- }&.invalid {border-color:var(--sui-error-border-color);}}.label.svelte-1jvz1op {display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:0 4px;white-space:nowrap;.button {margin-block:0;}}`},ya([`click`,`keydown`])}));function TSe(e,t){O(t,!0),G(e,kSe);let n=()=>j(O6,`$entryDraft`,r),[r,i]=mn(),a=e=>{vSe(e,{get allowDrop(){return z(Se)},get invalid(){return f()},get readonly(){return d()},get processing(){return z(b)},get isImageField(){return z(ce)},get multiple(){return z(he)},onFilePaste:e=>{we([{file:e,folder:z(fe)}])},get showSelectAssetsDialog(){return z(p)},set showSelectAssetsDialog(e){P(p,e,!0)},get replaceMode(){return z(m)},set replaceMode(e){P(m,e,!0)}})},o=e=>{var n=V(),r=I(n),i=e=>{var n=V(),r=I(n),i=e=>{var n=V(),r=I(n),i=e=>{var n=ESe(),r=I(n);uo(r,23,l,(e,t)=>`${e}|${t}`,(e,n,r)=>{{let i=M(()=>z(r)>0?()=>De(z(r)-1):void 0),a=M(()=>z(r)<l().length-1?()=>De(z(r)):void 0);dSe(e,Ks(()=>z(ve),{get value(){return z(n)},get fieldId(){return`${t.fieldId??``}-${z(r)??``}`},onReplace:()=>{P(m,!0),P(h,z(r),!0),P(p,!0)},onRemove:()=>Ee(z(r)),get onMoveUp(){return z(i)},get onMoveDown(){return z(a)}}))}}),D(r);var i=L(r,2),o=e=>{a(e)};W(i,e=>{l().length<z(te)&&e(o)}),H(e,n)},o=M(()=>Array.isArray(l()));W(r,e=>{z(o)&&e(i)}),H(e,n)},o=e=>{dSe(e,Ks(()=>z(ve),{get value(){return l()},get fieldId(){return t.fieldId},onReplace:()=>{P(m,!0),P(p,!0)},onRemove:Ce}))};W(r,e=>{z(he)?e(i):typeof l()==`string`&&l()&&e(o,1)}),H(e,n)},o=e=>{a(e)};W(r,e=>{l()?.length&&!z(b)?e(i):e(o,-1)}),H(e,n)},{fieldContext:s=void 0}=Lt(`field-editor`)??{},c=s===`rich-text-editor-component`,l=q(t,`currentValue`,15),u=q(t,`required`,3,!0),d=q(t,`readonly`,3,!1),f=q(t,`invalid`,3,!1),p=N(!1),m=N(!1),h=N(-1),g=N(!1),_=N(!1),v=N(``),y=N(void 0),b=N(!1),x=N(br([])),S=N(br([])),C=N(br([])),w=M(()=>t.fieldConfig.widget),te=M(()=>T(t.fieldConfig.max,1/0)),ne=M(()=>t.fieldConfig.accept),re=M(()=>T(t.fieldConfig.choose_url,!0)),ie=M(()=>n()?.originalEntry),ae=M(()=>n()?.collectionName??``),oe=M(()=>n()?.fileName),se=M(()=>n()?.isIndexFile??!1),ce=M(()=>z(w)===`image`),le=M(()=>z(ce)?`image`:void 0),ue=M(()=>NF({fieldConfig:t.fieldConfig})),de=M(()=>z(ue).config),E=M(()=>L5({collectionName:z(ae),fileName:z(oe),typedKeyPath:t.typedKeyPath,isIndexFile:z(se)})),fe=M(()=>Object.values(z(E)).find(({enabled:e})=>e)?.folder),pe=M(()=>R5({entry:n()?.originalEntry,folder:z(fe)})),me=M(()=>B5({kind:z(le),folder:z(fe),folderPath:z(pe),unsavedAssets:z(C)})),he=M(()=>NP(t.fieldConfig)&&!c),ge=M(()=>z(de).max_file_size),_e=M(()=>!u()&&(!s||![`rich-text-editor-component`,`single-subfield-list-field`].includes(s))),ve=M(()=>({fieldConfig:t.fieldConfig,readonly:d(),invalid:f(),required:u(),showRemoveButton:z(_e),collectionName:z(ae),fileName:z(oe),typedKeyPath:t.typedKeyPath,entry:z(ie)})),ye=M(()=>Object.entries(Yj).filter(([,{isEnabled:e}])=>e?.(t.fieldConfig)??!0)),be=M(()=>z(ue).enabled&&!!z(fe)),xe=M(()=>+!!z(be)+z(ye).length),Se=M(()=>z(xe)===1),Ce=()=>{z(y)?.reset(),z(he)||(l(``),Hn())},we=async e=>{if(!n())return;let r=z(he)?void 0:l();Ce(),P(b,!0),P(x,[],!0);let i=await Promise.all(e.map(e=>K5({draft:n(),resource:e,libraryConfig:z(de)}))),a=[],o=!1,s=z(he)?Object.keys(n().currentValues[t.locale]).filter(e=>e.startsWith(`${t.keyPath}.`)).map(e=>Number(e.replace(`${t.keyPath}.`,``))).pop()??-1:-1;i.forEach(({value:e,credit:r,oversizedFileName:i},u)=>{if(e)if(o=!0,z(he)){let r=z(m)?z(h):s+1+u;gn(O6,zi(n).currentValues[t.locale][`${t.keyPath}.${r}`]=e,zi(n))}else l(c?e.replaceAll(` `,`%20`):e);r&&a.push(r),i&&z(x).push(i)}),!o&&!z(he)&&r!==void 0&&l(r),a.length?(P(v,a.join(`
981
- `),!0),P(_,!0)):P(v,``),z(x).length&&P(g,!0),P(b,!1)},Te=async({files:e})=>{if(e.length)if(z(be)){let t=await F5({files:e,listedAssets:z(me)});if(t===void 0)return;we(e.map(e=>({file:e,folder:z(fe),replace:t})))}else P(S,e,!0),P(p,!0)},Ee=e=>{if(!n())return;let r=At(n().currentValues[t.locale]),i=[];for(let a=0;;a+=1){let o=`${t.keyPath}.${a}`,s=`${t.keyPath}.${a+1}`;if(a<e)i.push(r[o]);else if(s in r)i.push(r[s]),gn(O6,zi(n).currentValues[t.locale][o]=r[s],zi(n));else{gn(O6,zi(n).currentValues[t.locale][o]=null,zi(n)),delete n().currentValues[t.locale][o];break}}l(Object.values(i))},De=e=>{n()&&(r=>{var i=ee(r,2);gn(O6,zi(n).currentValues[t.locale][`${t.keyPath}.${e}`]=i[0],zi(n)),gn(O6,zi(n).currentValues[t.locale][`${t.keyPath}.${e+1}`]=i[1],zi(n))})([n().currentValues[t.locale][`${t.keyPath}.${e+1}`],n().currentValues[t.locale][`${t.keyPath}.${e}`]])};Qr(()=>{(async()=>{n()?.files?P(C,await G5({draft:n(),targetFolderPath:z(pe)}),!0):P(C,[],!0)})()});var Oe=OSe(),ke=I(Oe),Ae=e=>{{let t=M(()=>z(ne)??(z(ce)?kM.join(`,`):void 0));Rs(G6(e,{get multiple(){return z(he)},get disabled(){return d()},get accept(){return z(t)},onDrop:Te,children:(e,t)=>{o(e)},$$slots:{default:!0}}),e=>P(y,e,!0),()=>z(y))}},je=e=>{o(e)};W(ke,e=>{z(Se)?e(Ae):e(je,-1)});var Me=L(ke,2);{let e=M(()=>z(m)?!1:z(he));eSe(Me,{get kind(){return z(le)},get multiple(){return z(e)},get accept(){return z(ne)},get canEnterURL(){return z(re)},get entryDraft(){return O6},get fieldConfig(){return t.fieldConfig},get assetLibraryFolderMap(){return z(E)},get enabledCloudServiceEntries(){return z(ye)},onSelect:we,get open(){return z(p)},set open(e){P(p,e,!0)},get pendingFiles(){return z(S)},set pendingFiles(e){P(S,e,!0)}})}var Ne=L(Me,2);cSe(Ne,{});var Pe=L(Ne,2);axe(Pe,{get oversizedFileNames(){return z(x)},get maxSize(){return z(ge)},get open(){return z(g)},set open(e){P(g,e,!0)}});var Fe=L(Pe,2);{let e=M(()=>Y(`assets_dialog.photo_credit.title`)),t=M(()=>Y(`copy`));pL(Fe,{get title(){return z(e)},get okLabel(){return z(t)},onOk:()=>{navigator.clipboard.writeText(z(v))},get open(){return z(_)},set open(e){P(_,e,!0)},children:(e,t)=>{var n=DSe(),r=I(n),i=F(r,!0);D(r);var a=L(r,2);t2(F(a),{dir:`auto`,flex:!0,readonly:!0,get value(){return z(v)},onclick:e=>{e.target.focus(),e.target.select()}}),D(a),R(e=>U(i,e),[()=>Y(`assets_dialog.photo_credit.description`)]),H(e,n)},$$slots:{default:!0}})}H(e,Oe),k(),i()}var ESe,DSe,OSe,kSe,ASe=o((()=>{Z(),J(),X(),$(),rc(),sSe(),uSe(),K6(),sxe(),_Se(),wSe(),N6(),I5(),V5(),q5(),Zj(),PF(),PP(),jM(),ESe=B(`<div role="none" class="item-list svelte-17jic1t"></div> <!>`,1),DSe=B(`<div role="none"> </div> <div role="none"><!></div>`,1),OSe=B(`<!> <!> <!> <!> <!>`,1),kSe={hash:`svelte-17jic1t`,code:`.item-list.svelte-17jic1t {display:flex;flex-direction:column;gap:4px;}`}}));function jSe(e,t){O(t,!0),G(e,PSe);let n=()=>j(O6,`$entryDraft`,r),[r,i]=mn(),a=q(t,`typedKeyPath`,3,void 0),o=N(void 0),s=N(void 0),c=M(()=>t.fieldConfig.widget),l=M(()=>z(c)===`image`),u=M(()=>n()?.originalEntry),d=M(()=>n()?.collectionName??``),f=M(()=>n()?.fileName);Qr(()=>{t.value,zi(async()=>{P(o,t.value?z(l)?`image`:await gT(t.value):void 0,!0),P(s,z(o)?await cN({value:t.value,entry:z(u),collectionName:z(d),fileName:z(f),fieldConfig:t.fieldConfig,typedKeyPath:a()}):void 0,!0)})});var p=V(),m=I(p),h=e=>{var t=MSe(),n=F(t);{let e=M(()=>[`audio`,`video`].includes(z(o)));t6(n,{get kind(){return z(o)},get src(){return z(s)},get controls(){return z(e)}})}D(t),H(e,t)},g=e=>{var n=NSe(),r=F(n,!0);D(n),R(()=>U(r,t.value)),H(e,n)},_=M(()=>t.value.trim()&&!t.value.startsWith(`blob:`));W(m,e=>{z(o)&&z(s)?e(h):z(_)&&e(g,1)}),H(e,p),k(),i()}var MSe,NSe,PSe,FSe=o((()=>{Z(),J(),rc(),n6(),lN(),yT(),N6(),MSe=B(`<p class="svelte-28vcoi"><!></p>`),NSe=B(`<p class="svelte-28vcoi"> </p>`),PSe={hash:`svelte-28vcoi`,code:`
980
+ }&.invalid {border-color:var(--sui-error-border-color);}}.label.svelte-1jvz1op {display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:0 4px;white-space:nowrap;.button {margin-block:0;}}`},ya([`click`,`keydown`])}));function TSe(e,t){O(t,!0),G(e,kSe);let n=()=>j(O6,`$entryDraft`,r),[r,i]=mn(),a=e=>{vSe(e,{get allowDrop(){return z(we)},get invalid(){return m()},get readonly(){return p()},get processing(){return z(S)},get isImageField(){return z(ue)},get multiple(){return z(_e)},onFilePaste:e=>{Ee([{file:e,folder:z(me)}])},get showSelectAssetsDialog(){return z(h)},set showSelectAssetsDialog(e){P(h,e,!0)},get replaceMode(){return z(g)},set replaceMode(e){P(g,e,!0)}})},o=e=>{var n=V(),r=I(n),i=e=>{var n=V(),r=I(n),i=e=>{var n=V(),r=I(n),i=e=>{var n=ESe(),r=I(n);uo(r,23,d,(e,t)=>`${e}|${t}`,(e,n,r)=>{{let i=M(()=>z(r)>0?()=>ke(z(r)-1):void 0),a=M(()=>z(r)<d().length-1?()=>ke(z(r)):void 0);dSe(e,Ks(()=>z(be),{get value(){return z(n)},get fieldId(){return`${t.fieldId??``}-${z(r)??``}`},onReplace:()=>{P(g,!0),P(_,z(r),!0),P(h,!0)},onRemove:()=>Oe(z(r)),get onMoveUp(){return z(i)},get onMoveDown(){return z(a)}}))}}),D(r);var i=L(r,2),o=e=>{a(e)};W(i,e=>{d().length<z(re)&&e(o)}),H(e,n)},o=M(()=>Array.isArray(d()));W(r,e=>{z(o)&&e(i)}),H(e,n)},o=e=>{dSe(e,Ks(()=>z(be),{get value(){return d()},get fieldId(){return t.fieldId},onReplace:()=>{P(g,!0),P(h,!0)},onRemove:Te}))};W(r,e=>{z(_e)?e(i):typeof d()==`string`&&d()&&e(o,1)}),H(e,n)},o=e=>{a(e)};W(r,e=>{d()?.length&&!z(S)?e(i):e(o,-1)}),H(e,n)},{fieldContext:s=void 0,parentComponentNames:c=[]}=Lt(`field-editor`)??{},l=s===`rich-text-editor-component`,u=c.at(-1),d=q(t,`currentValue`,15),f=q(t,`required`,3,!0),p=q(t,`readonly`,3,!1),m=q(t,`invalid`,3,!1),h=N(!1),g=N(!1),_=N(-1),v=N(!1),y=N(!1),b=N(``),x=N(void 0),S=N(!1),C=N(br([])),w=N(br([])),te=N(br([])),ne=M(()=>t.fieldConfig.widget),re=M(()=>T(t.fieldConfig.max,1/0)),ie=M(()=>t.fieldConfig.accept),ae=M(()=>T(t.fieldConfig.choose_url,!0)),oe=M(()=>n()?.originalEntry),se=M(()=>n()?.collectionName??``),ce=M(()=>n()?.fileName),le=M(()=>n()?.isIndexFile??!1),ue=M(()=>z(ne)===`image`),de=M(()=>z(ue)?`image`:void 0),E=M(()=>NF({fieldConfig:t.fieldConfig})),fe=M(()=>z(E).config),pe=M(()=>L5({collectionName:z(se),fileName:z(ce),componentName:u,typedKeyPath:t.typedKeyPath,isIndexFile:z(le)})),me=M(()=>Object.values(z(pe)).find(({enabled:e})=>e)?.folder),he=M(()=>R5({entry:n()?.originalEntry,folder:z(me)})),ge=M(()=>B5({kind:z(de),folder:z(me),folderPath:z(he),unsavedAssets:z(te)})),_e=M(()=>NP(t.fieldConfig)&&!l),ve=M(()=>z(fe).max_file_size),ye=M(()=>!f()&&(!s||![`rich-text-editor-component`,`single-subfield-list-field`].includes(s))),be=M(()=>({fieldConfig:t.fieldConfig,readonly:p(),invalid:m(),required:f(),showRemoveButton:z(ye),collectionName:z(se),fileName:z(ce),componentName:u,typedKeyPath:t.typedKeyPath,entry:z(oe)})),xe=M(()=>Object.entries(Yj).filter(([,{isEnabled:e}])=>e?.(t.fieldConfig)??!0)),Se=M(()=>z(E).enabled&&!!z(me)),Ce=M(()=>+!!z(Se)+z(xe).length),we=M(()=>z(Ce)===1),Te=()=>{z(x)?.reset(),z(_e)||(d(``),Hn())},Ee=async e=>{if(!n())return;let r=z(_e)?void 0:d();Te(),P(S,!0),P(C,[],!0);let i=await Promise.all(e.map(e=>K5({draft:n(),resource:e,libraryConfig:z(fe)}))),a=[],o=!1,s=z(_e)?Object.keys(n().currentValues[t.locale]).filter(e=>e.startsWith(`${t.keyPath}.`)).map(e=>Number(e.replace(`${t.keyPath}.`,``))).pop()??-1:-1;i.forEach(({value:e,credit:r,oversizedFileName:i},c)=>{if(e)if(o=!0,z(_e)){let r=z(g)?z(_):s+1+c;gn(O6,zi(n).currentValues[t.locale][`${t.keyPath}.${r}`]=e,zi(n))}else d(l?e.replaceAll(` `,`%20`):e);r&&a.push(r),i&&z(C).push(i)}),!o&&!z(_e)&&r!==void 0&&d(r),a.length?(P(b,a.join(`
981
+ `),!0),P(y,!0)):P(b,``),z(C).length&&P(v,!0),P(S,!1)},De=async({files:e})=>{if(e.length)if(z(Se)){let t=await F5({files:e,listedAssets:z(ge)});if(t===void 0)return;Ee(e.map(e=>({file:e,folder:z(me),replace:t})))}else P(w,e,!0),P(h,!0)},Oe=e=>{if(!n())return;let r=At(n().currentValues[t.locale]),i=[];for(let a=0;;a+=1){let o=`${t.keyPath}.${a}`,s=`${t.keyPath}.${a+1}`;if(a<e)i.push(r[o]);else if(s in r)i.push(r[s]),gn(O6,zi(n).currentValues[t.locale][o]=r[s],zi(n));else{gn(O6,zi(n).currentValues[t.locale][o]=null,zi(n)),delete n().currentValues[t.locale][o];break}}d(Object.values(i))},ke=e=>{n()&&(r=>{var i=ee(r,2);gn(O6,zi(n).currentValues[t.locale][`${t.keyPath}.${e}`]=i[0],zi(n)),gn(O6,zi(n).currentValues[t.locale][`${t.keyPath}.${e+1}`]=i[1],zi(n))})([n().currentValues[t.locale][`${t.keyPath}.${e+1}`],n().currentValues[t.locale][`${t.keyPath}.${e}`]])};Qr(()=>{(async()=>{n()?.files?P(te,await G5({draft:n(),targetFolderPath:z(he)}),!0):P(te,[],!0)})()});var Ae=OSe(),je=I(Ae),Me=e=>{{let t=M(()=>z(ie)??(z(ue)?kM.join(`,`):void 0));Rs(G6(e,{get multiple(){return z(_e)},get disabled(){return p()},get accept(){return z(t)},onDrop:De,children:(e,t)=>{o(e)},$$slots:{default:!0}}),e=>P(x,e,!0),()=>z(x))}},Ne=e=>{o(e)};W(je,e=>{z(we)?e(Me):e(Ne,-1)});var Pe=L(je,2);{let e=M(()=>z(g)?!1:z(_e));eSe(Pe,{get kind(){return z(de)},get multiple(){return z(e)},get accept(){return z(ie)},get canEnterURL(){return z(ae)},get entryDraft(){return O6},get fieldConfig(){return t.fieldConfig},get assetLibraryFolderMap(){return z(pe)},get enabledCloudServiceEntries(){return z(xe)},onSelect:Ee,get open(){return z(h)},set open(e){P(h,e,!0)},get pendingFiles(){return z(w)},set pendingFiles(e){P(w,e,!0)}})}var Fe=L(Pe,2);cSe(Fe,{});var Ie=L(Fe,2);axe(Ie,{get oversizedFileNames(){return z(C)},get maxSize(){return z(ve)},get open(){return z(v)},set open(e){P(v,e,!0)}});var Le=L(Ie,2);{let e=M(()=>Y(`assets_dialog.photo_credit.title`)),t=M(()=>Y(`copy`));pL(Le,{get title(){return z(e)},get okLabel(){return z(t)},onOk:()=>{navigator.clipboard.writeText(z(b))},get open(){return z(y)},set open(e){P(y,e,!0)},children:(e,t)=>{var n=DSe(),r=I(n),i=F(r,!0);D(r);var a=L(r,2);t2(F(a),{dir:`auto`,flex:!0,readonly:!0,get value(){return z(b)},onclick:e=>{e.target.focus(),e.target.select()}}),D(a),R(e=>U(i,e),[()=>Y(`assets_dialog.photo_credit.description`)]),H(e,n)},$$slots:{default:!0}})}H(e,Ae),k(),i()}var ESe,DSe,OSe,kSe,ASe=o((()=>{Z(),J(),X(),$(),rc(),sSe(),uSe(),K6(),sxe(),_Se(),wSe(),N6(),I5(),V5(),q5(),Zj(),PF(),PP(),jM(),ESe=B(`<div role="none" class="item-list svelte-17jic1t"></div> <!>`,1),DSe=B(`<div role="none"> </div> <div role="none"><!></div>`,1),OSe=B(`<!> <!> <!> <!> <!>`,1),kSe={hash:`svelte-17jic1t`,code:`.item-list.svelte-17jic1t {display:flex;flex-direction:column;gap:4px;}`}}));function jSe(e,t){O(t,!0),G(e,PSe);let n=()=>j(O6,`$entryDraft`,r),[r,i]=mn(),a=q(t,`typedKeyPath`,3,void 0),o=N(void 0),s=N(void 0),c=M(()=>t.fieldConfig.widget),l=M(()=>z(c)===`image`),u=M(()=>n()?.originalEntry),d=M(()=>n()?.collectionName??``),f=M(()=>n()?.fileName);Qr(()=>{t.value,zi(async()=>{P(o,t.value?z(l)?`image`:await gT(t.value):void 0,!0),P(s,z(o)?await cN({value:t.value,entry:z(u),collectionName:z(d),fileName:z(f),fieldConfig:t.fieldConfig,typedKeyPath:a()}):void 0,!0)})});var p=V(),m=I(p),h=e=>{var t=MSe(),n=F(t);{let e=M(()=>[`audio`,`video`].includes(z(o)));t6(n,{get kind(){return z(o)},get src(){return z(s)},get controls(){return z(e)}})}D(t),H(e,t)},g=e=>{var n=NSe(),r=F(n,!0);D(n),R(()=>U(r,t.value)),H(e,n)},_=M(()=>t.value.trim()&&!t.value.startsWith(`blob:`));W(m,e=>{z(o)&&z(s)?e(h):z(_)&&e(g,1)}),H(e,p),k(),i()}var MSe,NSe,PSe,FSe=o((()=>{Z(),J(),rc(),n6(),lN(),yT(),N6(),MSe=B(`<p class="svelte-28vcoi"><!></p>`),NSe=B(`<p class="svelte-28vcoi"> </p>`),PSe={hash:`svelte-28vcoi`,code:`
982
982
  /* Remove the padding to make the image full-width on small screens */
983
983
  @media (width < 768px) {[role='document'] section > p.svelte-28vcoi:has(img) {margin-inline:calc(var(--entry-preview-padding-inline) * -1);}
984
984
  }`}}));function ISe(e,t){O(t,!0);var n=V(),r=I(n),i=e=>{var n=V(),r=I(n),i=e=>{var n=V();uo(I(n),19,()=>t.currentValue,(e,t)=>`${e}-${t}`,(e,n)=>{jSe(e,{get value(){return z(n)},get fieldConfig(){return t.fieldConfig},get typedKeyPath(){return t.typedKeyPath}})}),H(e,n)},a=M(()=>Array.isArray(t.currentValue));W(r,e=>{z(a)&&e(i)}),H(e,n)},a=M(()=>NP(t.fieldConfig)),o=e=>{jSe(e,{get value(){return t.currentValue},get fieldConfig(){return t.fieldConfig},get typedKeyPath(){return t.typedKeyPath}})};W(r,e=>{z(a)?e(i):typeof t.currentValue==`string`&&t.currentValue&&e(o,1)}),H(e,n),k()}var LSe=o((()=>{Z(),J(),FSe(),PP()})),u7,RSe,zSe,d7=o((()=>{qp(),N6(),u7=({entryDraft:e,valueStoreKey:t=`currentValues`,keyPath:n,locale:r})=>Object.entries(A(e)[t][r]??{}).filter(([e])=>e.startsWith(`${n}.`)).map(([e,t])=>[e.replace(`${n}.`,``),t]),RSe=({pairs:e,edited:t})=>e.map(([e],n,r)=>{if(!e.trim()&&t[n])return`empty`;if(e.trim()&&r.findIndex(t=>t[0]===e)!==n)return`duplicate`}),zSe=({entryDraft:e,keyPath:t,locale:n,fieldConfig:r,pairs:i})=>{let{i18n:a}=r;k6.set(!1),e.update(e=>(e&&Object.entries(e.currentValues).forEach(([e,r])=>{(e===n||a===`duplicate`)&&(Object.entries(r).forEach(([e])=>{e.startsWith(`${t}.`)&&delete r[e]}),i.forEach(([e,n])=>{r[`${t}.${e}`]=n}))}),e)),k6.set(!0)}}));function BSe(e,t){O(t,!0),G(e,JSe);let n=()=>j(O6,`$entryDraft`,r),[r,i]=mn(),{valueStoreKey:a=`currentValues`}=Lt(`field-editor`)??{},o=q(t,`readonly`,3,!1),s=M(()=>T(t.fieldConfig.i18n,!1)),c=M(()=>t.fieldConfig.key_label),l=M(()=>t.fieldConfig.value_label),u=M(()=>T(t.fieldConfig.max,1/0)),d=M(()=>z(c)||Y(`key_value.key`)),f=M(()=>z(l)||Y(`key_value.value`)),p=N(br([])),m=N(br([])),h=0,g=br([]),_=N(br([])),v=N(br([])),y=()=>{if(!n())return;let e=u7({entryDraft:O6,valueStoreKey:a,keyPath:t.keyPath,locale:t.locale});(0,VSe.default)(z(p),e)||(P(p,[...e],!0),P(m,e.map((e,t)=>t<z(m).length?z(m)[t]:(h+=1,h-1)),!0),P(_,e.map(()=>!1),!0)),!z(p).length&&n()[a][t.locale][t.keyPath]!==null&&gn(O6,zi(n)[a][t.locale][t.keyPath]=null,zi(n))},b=()=>{n()&&(Object.entries(n()[a]).forEach(([e,n])=>{(e===t.locale||z(s)===`duplicate`)&&delete n[t.keyPath]}),z(p).push([``,``]),z(m).push(h),h+=1,z(_).push(!1),window.requestAnimationFrame(()=>{g[z(p).length-1].querySelector(`input`).focus()}))},x=e=>{z(p).splice(e,1),z(m).splice(e,1),z(_).splice(e,1)},S=()=>{P(v,RSe({pairs:z(p),edited:z(_)}),!0),!(!n()||z(v).some(Boolean)||z(p).some(([e])=>!e.trim()))&&zSe({entryDraft:O6,fieldConfig:t.fieldConfig,keyPath:t.keyPath,locale:t.locale,pairs:z(p)})};Qr(()=>{At(n()?.[a][t.locale]),zi(()=>{y()})}),Qr(()=>{At(z(p)),zi(()=>{S()})});var C=qSe(),w=I(C),ee=e=>{var n=GSe(),r=F(n),i=F(r),a=F(i),s=F(a,!0);D(a);var c=L(a),l=F(c,!0);D(c);var h=L(c),y=e=>{var t=HSe();R(e=>K(t,`aria-label`,e),[()=>Y(`key_value.action`)]),H(e,t)};W(h,e=>{o()||e(y)}),D(i),D(r);var S=L(r);uo(S,23,()=>z(p),(e,t)=>z(m)[t],(e,n,r)=>{var i=WSe(),a=F(i),s=F(a);{let e=M(()=>!!z(v)[z(r)]),i=M(()=>z(v)[z(r)]?`${t.fieldId}-kv-error`:void 0);hL(s,{dir:`ltr`,get readonly(){return o()},flex:!0,get invalid(){return z(e)},get"aria-label"(){return z(d)},get"aria-errormessage"(){return z(i)},oninput:()=>{z(_)[z(r)]=!0},onkeydown:e=>{e.key===`Enter`&&!e.isComposing&&g[z(r)].querySelector(`td.value input`).focus()},get value(){return z(n)[0]},set value(e){z(n)[0]=e}})}D(a);var c=L(a),l=F(c);{let e=M(()=>RC(t.locale));hL(l,{get dir(){return z(e)},get readonly(){return o()},flex:!0,get"aria-label"(){return z(f)},onkeydown:e=>{e.key===`Enter`&&!e.isComposing&&(z(r)<z(p).length-1?g[z(r)+1].querySelector(`input`).focus():z(p).length<z(u)&&b())},get value(){return z(n)[1]},set value(e){z(n)[1]=e}})}D(c);var m=L(c),h=e=>{var t=USe(),n=F(t);{let e=e=>{oI(e,{name:`close`})},t=M(()=>Y(`remove`));wI(n,{variant:`ghost`,size:`small`,iconic:!0,get"aria-label"(){return z(t)},onclick:()=>{x(z(r))},startIcon:e,$$slots:{startIcon:!0}})}D(t),H(e,t)};W(m,e=>{o()||e(h)}),D(i),Rs(i,(e,t)=>g[t]=e,e=>g?.[e],()=>[z(r)]),H(e,i)}),D(S),D(n),R(()=>{U(s,z(d)),U(l,z(f))}),H(e,n)};W(w,e=>{z(p).length&&e(ee)});var te=L(w,2),ne=e=>{O5(e,{get id(){return`${t.fieldId??``}-kv-error`},children:(e,t)=>{var n=KSe(),r=I(n),i=e=>{var t=ja();R(e=>U(t,e),[()=>Y(`key_value.empty_key`)]),H(e,t)},a=M(()=>z(v).includes(`empty`));W(r,e=>{z(a)&&e(i)});var o=L(r,2),s=e=>{var t=ja();R(e=>U(t,e),[()=>Y(`key_value.duplicate_key`)]),H(e,t)},c=M(()=>z(v).includes(`duplicate`));W(o,e=>{z(c)&&e(s)}),H(e,n)},$$slots:{default:!0}})},re=M(()=>z(v).some(Boolean));W(te,e=>{z(re)&&e(ne)});var ie=L(te,2),ae=F(ie);{let e=M(()=>Y(`add`)),t=M(()=>o()||z(p).length>=z(u));wI(ae,{get label(){return z(e)},variant:`tertiary`,get disabled(){return z(t)},onclick:()=>{b()}})}D(ie),H(e,C),k(),i()}var VSe,HSe,USe,WSe,GSe,KSe,qSe,JSe,YSe=o((()=>{Z(),J(),X(),$(),VSe=l(UO()),rc(),k5(),N6(),d7(),WC(),HSe=B(`<th scope="col" class="action svelte-u0prcz"></th>`),USe=B(`<td class="action svelte-u0prcz"><!></td>`),WSe=B(`<tr><td class="key svelte-u0prcz"><!></td><td class="value svelte-u0prcz"><!></td><!></tr>`),GSe=B(`<table class="svelte-u0prcz"><thead><tr><th scope="col" class="key svelte-u0prcz"> </th><th scope="col" class="value svelte-u0prcz"> </th><!></tr></thead><tbody></tbody></table>`),KSe=B(`<!> <!>`,1),qSe=B(`<!> <!> <div role="none"><!></div>`,1),JSe={hash:`svelte-u0prcz`,code:`table.svelte-u0prcz {width:-moz-available;width:-webkit-fill-available;width:stretch;}th.svelte-u0prcz,
985
985
  td.svelte-u0prcz {border-width:0;}th.svelte-u0prcz {padding-block:4px;color:var(--sui-tertiary-foreground-color);font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-normal);text-align:start;&.key,
986
- &.value {width:50%;}}td.svelte-u0prcz {padding:0;vertical-align:middle;}`}}));function XSe(e,t){O(t,!0),G(e,eCe);let n=()=>j(O6,`$entryDraft`,r),[r,i]=mn(),a=M(()=>t.fieldConfig.key_label),o=M(()=>t.fieldConfig.value_label),s=M(()=>z(a)||Y(`key_value.key`)),c=M(()=>z(o)||Y(`key_value.value`)),l=N(br([])),u=()=>{let e=u7({entryDraft:O6,keyPath:t.keyPath,locale:t.locale});(0,ZSe.default)(z(l),e)||P(l,e,!0)};Qr(()=>{n()&&(At(n().currentValues[t.locale]),zi(()=>{u()}))});var d=V(),f=I(d),p=e=>{var t=$Se(),n=F(t),r=F(n),i=F(r),a=F(i,!0);D(i);var o=L(i),u=F(o,!0);D(o),D(r),D(n);var d=L(n);uo(d,23,()=>z(l),([e,t],n)=>`${e}-${n}`,(e,t)=>{var n=M(()=>ee(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];var a=QSe(),o=F(a),s=F(o,!0);D(o);var c=L(o),l=F(c,!0);D(c),D(a),R(()=>{U(s,r()),U(l,i())}),H(e,a)}),D(d),D(t),R(()=>{U(a,z(s)),U(u,z(c))}),H(e,t)};W(f,e=>{z(l).length&&e(p)}),H(e,d),k(),i()}var ZSe,QSe,$Se,eCe,tCe=o((()=>{Z(),J(),X(),ZSe=l(UO()),rc(),N6(),d7(),QSe=B(`<tr><td class="svelte-11sa460"> </td><td class="svelte-11sa460"> </td></tr>`),$Se=B(`<table class="svelte-11sa460"><thead><tr><th scope="col" class="svelte-11sa460"> </th><th scope="col" class="svelte-11sa460"> </th></tr></thead><tbody></tbody></table>`),eCe={hash:`svelte-11sa460`,code:`table.svelte-11sa460 {width:-moz-available;width:-webkit-fill-available;width:stretch;}th.svelte-11sa460 {padding-block:4px;width:50%;color:var(--sui-tertiary-foreground-color);background-color:var(--sui-tertiary-background-color);font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-normal);text-align:start;}td.svelte-11sa460 {&:empty::after {content:'\\00a0'; /* nbsp */}}`}}));function nCe(e,t){O(t,!0);let n=q(t,`expanded`,3,!1);{let t=M(()=>n()?`expand_more`:Lh()?`chevron_left`:`chevron_right`);oI(e,{get name(){return z(t)}})}k()}var rCe=o((()=>{Z(),J(),X(),$()}));function f7(e,t){O(t,!0);let n=q(t,`disabled`,3,!1),r=q(t,`items`,19,()=>[]),i=q(t,`addItem`,3,()=>void 0),a=M(()=>t.fieldConfig.name),o=M(()=>t.fieldConfig.label),s=M(()=>t.fieldConfig.types),c=M(()=>t.fieldConfig.widget===`list`?t.fieldConfig:void 0),l=M(()=>z(c)?.label_singular??``),u=M(()=>z(c)?.max??void 0),d=M(()=>Y(`add_x`,{values:{name:z(l)||z(o)||z(a)}})),f=M(()=>n()||typeof z(u)==`number`&&r().length===z(u));var p=V(),m=I(p),h=e=>{PI(e,{variant:`tertiary`,get label(){return z(d)},get disabled(){return z(f)},startIcon:e=>{oI(e,{name:`add`})},endIcon:e=>{},popup:e=>{{let t=M(()=>Y(`select_list_type`));iR(e,{get"aria-label"(){return z(t)},children:(e,t)=>{var n=V();uo(I(n),17,()=>z(s),({name:e,label:t})=>e,(e,t)=>{let n=()=>z(t).name,r=()=>z(t).label;{let t=M(()=>r()||n());lR(e,{get label(){return z(t)},onclick:()=>i()({type:n()})})}}),H(e,n)},$$slots:{default:!0}})}},$$slots:{startIcon:!0,endIcon:!0,popup:!0}})},g=M(()=>Array.isArray(z(s))),_=e=>{wI(e,{variant:`tertiary`,get label(){return z(d)},get disabled(){return z(f)},onclick:()=>i()(),startIcon:e=>{oI(e,{name:`add`})},$$slots:{startIcon:!0}})};W(m,e=>{z(g)?e(h):e(_,-1)}),H(e,p),k()}var iCe=o((()=>{Z(),J(),X(),$()}));function p7(e,t){O(t,!0),G(e,sCe);let n=q(t,`label`,3,``),r=q(t,`expanded`,15),i=q(t,`centerContent`,3,void 0),a=q(t,`endContent`,3,void 0);var o=oCe(),s=F(o),c=F(s);{let e=e=>{nCe(e,{get expanded(){return r()}})},i=M(()=>r()?Y(`collapse`):Y(`expand`));wI(c,{size:`small`,get"aria-label"(){return z(i)},get"aria-expanded"(){return r()},get"aria-controls"(){return t.controlId},onclick:()=>{r(!r()),t.toggleExpanded?.()},startIcon:e,children:(e,t)=>{var r=V(),i=I(r),a=e=>{var t=aCe(),r=F(t,!0);D(t),R(()=>U(r,n())),H(e,t)};W(i,e=>{n()&&e(a)}),H(e,r)},$$slots:{startIcon:!0,default:!0}})}D(s);var l=L(s,2);Co(F(l),()=>i()??E),D(l);var u=L(l,2);Co(F(u),()=>a()??E),D(u),D(o),H(e,o),k()}var aCe,oCe,sCe,m7=o((()=>{Z(),J(),X(),$(),rCe(),aCe=B(`<span role="none" class="type svelte-57h597"> </span>`),oCe=B(`<div role="none" class="header svelte-57h597"><div role="none" class="svelte-57h597"><!></div> <div role="none" class="svelte-57h597"><!></div> <div role="none" class="svelte-57h597"><!></div></div>`),sCe={hash:`svelte-57h597`,code:`.header.svelte-57h597 {display:flex;align-items:center;gap:8px;height:24px;background-color:var(--sui-secondary-border-color);& > div:where(.svelte-57h597) {display:flex;align-items:center;&:first-child {justify-content:flex-start;width:40%;}&:nth-child(2) {width:20%;justify-content:center;}&:last-child {width:40%;justify-content:flex-end;}}button {padding:0;height:16px;}.type:where(.svelte-57h597) {font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}}`}})),cCe,lCe,uCe=o((()=>{cCe=({fieldConfig:e,dynamicValue:t})=>{if(t!==void 0)return t===`true`;let{default:n}=e;return typeof n==`boolean`?n:!1},lCe=e=>({[e.keyPath]:cCe(e)})})),dCe,fCe=o((()=>{f(),dCe=({fieldConfig:e,keyPath:t,dynamicValue:n})=>{let{default:r,output_code_only:i=!1,keys:a={code:`code`,lang:`lang`}}=e,o=n===void 0?r:n;if(i)return{[t]:typeof o==`string`?o:``};let s=u(o)?o:void 0,c=s?.[a.code]??o,l=s?.[a.lang]??``;return{[t]:{},[`${t}.${a.code}`]:typeof c==`string`?c:``,[`${t}.${a.lang}`]:typeof l==`string`?l:``}}})),pCe,mCe,hCe=o((()=>{oC(),Ww(),pCe=({fieldConfig:e,dynamicValue:t})=>{let n=e,r=n.default,i=t??r;if(typeof i!=`string`)return``;if(i===`{{now}}`){let{singleCustomTimeZone:e,outputUTC:t}=aC(n);return Vw({inputValue:Bw(n,e),currentValue:``,fieldConfig:n,timeZone:e,outputUTC:t})}return i},mCe=e=>({[e.keyPath]:pCe(e)})})),h7,gCe=o((()=>{PP(),h7=({fieldConfig:e,keyPath:t,dynamicValue:n})=>{let r=e,i=r.default,a=NP(r),o=``;o=n===void 0?a?Array.isArray(i)?i:[]:typeof i==`string`?i:``:a?n.split(/,\s*/):n;let s={};return a&&Array.isArray(o)&&(o=o.map(e=>e.trim()).filter(e=>e!==``),o.length&&(s[t]=[],o.forEach((e,n)=>{s[`${t}.${n}`]=e}))),!a&&typeof o==`string`&&(s[t]=o.trim()),s}})),_Ce,vCe,g7,yCe=o((()=>{Ep(),Qp(),uC(),ID(),_Ce=(e,{locale:t,account:{email:n=``,login:r=``,name:i=``}})=>e===`locale`?t:e===`datetime`?new Date().toJSON().replace(/\d+\.\d+Z$/,`00.000Z`):e===`uuid`?Cp():e===`uuid_short`?Cp(`short`):e===`uuid_shorter`?Cp(`shorter`):e===`author-email`?n:e===`author-login`?r:e===`author-name`?i:``,vCe=({fieldConfig:e,locale:t,dynamicValue:n})=>{let{default:r}=e,i=n??r;if(typeof i!=`string`)return i;let a={locale:t,account:FD.account};return i.replaceAll(Yp,(e,n)=>{let{value:r,transformations:i}=cC(n),o=_Ce(r,a);return i.length?lC({value:o,transformations:i,locale:t}):o})},g7=e=>({[e.keyPath]:vCe(e)})})),bCe,xCe,SCe=o((()=>{f(),KP(),bCe=({fieldConfig:e,locale:t})=>{let{default:n}=e,r=VP({fieldConfig:e,locale:t});return u(n)?n:r?{"":``}:{}},xCe=e=>{let{keyPath:t,dynamicValue:n}=e,r;if(n!==void 0)try{let e=JSON.parse(n);u(e)&&(r=e)}catch{}return r??=bCe(e),Object.fromEntries(Object.entries(r).filter(([,e])=>typeof e==`string`).map(([e,n])=>[`${t}.${e}`,n]))}})),CCe,wCe=o((()=>{f(),cc(),CCe=({fieldConfig:e,keyPath:t,dynamicValue:n})=>{let{default:r}=e,{fields:i}=e,{types:a}=e,o;if(o=n===void 0?Array.isArray(r)?r:[]:n.split(/,\s*/).map(e=>e.trim()).filter(e=>e!==``),!(Array.isArray(o)&&o.length))return{[t]:[]};let s={[t]:o};return i||a?o.forEach((e,n)=>{u(e)?Object.entries(oc(e)).forEach(([e,r])=>{s[`${t}.${n}.${e}`]=r}):s[`${t}.${n}`]=e}):o.forEach((e,n)=>{u(e)||(s[`${t}.${n}`]=e)}),s}})),TCe,ECe=o((()=>{TCe=({fieldConfig:e,keyPath:t,dynamicValue:n})=>{let{default:r,value_type:i=`int`}=e,a=n??r,o=typeof a==`string`;if(a===void 0)return i===`int`||i===`float`?{[t]:null}:{[t]:``};if([`int`,`int/string`].includes(i)){let e=o?Number.parseInt(a,10):a;return Number.isInteger(e)?{[t]:e}:{}}if([`float`,`float/string`].includes(i)){let e=o?Number.parseFloat(a):a;return Number.isFinite(e)?{[t]:e}:{}}return{}}})),DCe,OCe=o((()=>{f(),cc(),KP(),DCe=({fieldConfig:e,keyPath:t,locale:n,defaultLocale:r,populateDefault:i})=>{let{default:a}=e,{fields:o}=e,{types:s}=e,c=VP({fieldConfig:e,locale:n}),l={};return u(a)?(Object.entries(oc(a)).forEach(([e,n])=>{l[`${t}.${e}`]=n}),l):!c||Array.isArray(s)?(l[t]=null,l):(o&&o.length>0&&o.forEach(e=>{i?.({content:l,keyPath:[t,e.name].join(`.`),fieldConfig:e,locale:n,defaultLocale:r,dynamicValues:{}})}),l)}})),_7,kCe=o((()=>{Np(),qp(),AF(),_7=({fieldConfig:e,keyPath:t,dynamicValue:n})=>{let{default:r=A(TF)?.field_defaults?.richtext?.default}=e,i=``;if(n!==void 0)try{i=Ap(n)}catch{i=n.replace(/<[^>]*>/g,``)}else i=r||``;return{[t]:i}}})),v7,ACe=o((()=>{v7=({fieldConfig:e,keyPath:t,dynamicValue:n})=>{let{default:r,multiple:i=!1}=e,a=n===void 0?r:n.split(/,\s*/).map(e=>e.trim()),o=Array.isArray(a)&&!!a.length;if(!i){if(n!==void 0){let e=n.split(/,\s*/).map(e=>e.trim());return{[t]:e[0]||``}}return{[t]:a===void 0?``:a}}return o?Object.fromEntries(a.map((e,n)=>[`${t}.${n}`,e])):{[t]:[]}}})),jCe,MCe=o((()=>{uCe(),fCe(),hCe(),gCe(),yCe(),SCe(),wCe(),ECe(),OCe(),kCe(),ACe(),jCe={boolean:lCe,code:dCe,datetime:mCe,file:h7,hidden:g7,image:h7,keyvalue:xCe,list:CCe,markdown:_7,number:TCe,object:DCe,relation:v7,richtext:_7,select:v7}})),y7,b7,x7=o((()=>{MCe(),y7=({content:e,keyPath:t,fieldConfig:n,locale:r,defaultLocale:i,dynamicValues:a})=>{let{widget:o=`string`,default:s,i18n:c=!1}=n;if(r!==i&&[!1,`none`].includes(c))return;if(o===`compute`){e[t]=``;return}let l=t in a&&!/\.\d+(?:\.|$)/.test(t)&&a[t].trim()||void 0,u=jCe[o];if(u){Object.assign(e,u({fieldConfig:n,keyPath:t,locale:r,defaultLocale:i,dynamicValue:l,populateDefault:y7}));return}e[t]=l||s||``},b7=({fields:e,locale:t,defaultLocale:n,dynamicValues:r={}})=>{let i={};return e.forEach(e=>{y7({content:i,keyPath:e.name,fieldConfig:e,locale:t,defaultLocale:n,dynamicValues:r})}),i}})),S7,NCe,C7,w7,PCe=o((()=>{Np(),cc(),qp(),N6(),Gy(),S7=(e,t)=>{Object.entries(t).forEach(([t,n])=>{e[t]!==n&&(e[t]=n)}),Object.keys(e).forEach(n=>{n in t||delete e[n]})},NCe=new Map,C7=(e,t)=>{let n=Wy(NCe,t,()=>RegExp(`^${Dp(t)}\\b(?!#)`)),r=Object.entries(e).filter(([e])=>n.test(e)).map(([e,t])=>[e.replace(n,`_`),t]).sort();return[sc(Object.fromEntries(r))._??[],Object.fromEntries(Object.entries(e).filter(([e])=>!n.test(e)))]},w7=({locale:e,valueStoreKey:t=`currentValues`,keyPath:n,manipulate:r})=>{let i=A(O6),{collection:a,collectionFile:o}=i,{defaultLocale:s}=(o??a)._i18n,[c,l]=C7(i[t][e],n),[u,d]=e===s?C7(i.expanderStates._,n):[[],[]];r({valueList:c,expanderStateList:u}),k6.set(!1),O6.update(r=>(S7(r[t][e],{...oc({[n]:c}),...l}),e===s&&S7(r.expanderStates._,{...oc({[n]:u}),...d}),r)),k6.set(!0)}})),FCe,T7,E7,D7,ICe,O7=o((()=>{Np(),qp(),N6(),KP(),Gy(),FCe=new Map,T7=({key:e,locale:t,collapsed:n=!1})=>{let r=A(O6),i=r?.expanderStates?._[e];if(i!==void 0)return i;if(n===`auto`){let n=r?.currentValues?.[t]??{},i=e.replace(/#$/,``),a=Wy(FCe,i,()=>RegExp(`^${Dp(i)}\\.[^\\.]+$`));return!Object.entries(n).some(([e,t])=>a.test(e)&&!!t)}return!n},E7=e=>{O6.update(t=>(t&&Object.entries(e).forEach(([e,n])=>{t.expanderStates._[e]!==n&&(t.expanderStates._[e]=n)}),t))},D7=({collectionName:e,fileName:t,valueMap:n,keyPath:r,isIndexFile:i=!1})=>{let a=new Set,o={collectionName:e,fileName:t,valueMap:n,isIndexFile:i};return r.split(`.`).forEach((e,t,n)=>{let r=n.slice(0,t+1).join(`.`),i=BP({...o,keyPath:r}),s=FP.test(r);if(i?.widget===`object`)s&&a.add(r),a.add(`${r}#`);else if(i?.widget===`list`)a.add(s?r:`${r}#`);else if(t>0){let e=n.slice(0,t).join(`.`),i=BP({...o,keyPath:e});i?.widget===`object`&&`fields`in i&&a.add(`${e}.${i.name}#`),i?.widget===`list`&&`field`in i&&a.add(r)}}),[...a]},ICe=({collectionName:e,fileName:t,currentValues:n})=>{let{validities:r,isIndexFile:i}=A(O6),a={};Object.entries(r??{}).forEach(([r,o])=>{Object.entries(o).forEach(([o,{valid:s}])=>{s||D7({collectionName:e,fileName:t,valueMap:n[r],keyPath:o,isIndexFile:i}).forEach(e=>{a[e]=!0})})}),E7(a)}}));function LCe(e,t){let n=Ma();O(t,!0),G(e,UCe);let r=()=>j(O6,`$entryDraft`,i),[i,a]=mn(),o=(e,t=E,n=E)=>{var r=V(),i=I(r),a=e=>{{let r=e=>{var n=V();uo(I(n),17,()=>z(ee)??[],({name:e,label:t})=>e,(e,n)=>{let r=()=>z(n).name,i=()=>z(n).label;{let n=M(()=>i()||r());lR(e,{get label(){return z(n)},onclick:()=>Te({index:t(),type:r()})})}}),H(e,n)},i=M(()=>Y(`add_item_${n()}`));lR(e,{get label(){return z(i)},get disabled(){return z(ye)},items:r,$$slots:{items:!0}})}},o=e=>{{let r=M(()=>Y(`add_item_${n()}`));lR(e,{get label(){return z(r)},get disabled(){return z(ye)},onclick:()=>Te({index:t()})})}};W(i,e=>{z(ie)?e(a):e(o,-1)}),H(e,r)},{valueStoreKey:s=`currentValues`}=Lt(`field-editor`)??{},c=M(()=>t.fieldConfig.name),l=M(()=>t.fieldConfig.label),d=M(()=>t.fieldConfig.i18n),f=M(()=>T(t.fieldConfig.allow_add,!0)),p=M(()=>T(t.fieldConfig.allow_remove,!0)),m=M(()=>T(t.fieldConfig.allow_duplicate,!0)),h=M(()=>T(t.fieldConfig.allow_reorder,!0)),g=M(()=>t.fieldConfig.collapsed),_=M(()=>t.fieldConfig.summary),v=M(()=>t.fieldConfig.thumbnail),y=M(()=>T(t.fieldConfig.minimize_collapsed,!1)),b=M(()=>t.fieldConfig.label_singular),x=M(()=>T(t.fieldConfig.max,1/0)),S=M(()=>T(t.fieldConfig.add_to_top,!1)),C=M(()=>t.fieldConfig.field),w=M(()=>t.fieldConfig.fields),ee=M(()=>t.fieldConfig.types),te=M(()=>T(t.fieldConfig.typeKey,`type`)),ne=M(()=>o5(t.fieldConfig)),re=M(()=>z(ne).hasSingleSubField),ie=M(()=>z(ne).hasVariableTypes),ae=M(()=>RegExp(`^${Dp(t.keyPath)}\\.(\\d+)(.*)?`)),oe=M(()=>r()?.isIndexFile??!1),se=M(()=>r()?.collection),ce=M(()=>r()?.collectionName??``),le=M(()=>r()?.collectionFile),ue=M(()=>r()?.fileName),de=M(()=>(z(le)??z(se))?._i18n??ZC),fe=M(()=>z(de).defaultLocale),pe=M(()=>t.locale!==z(fe)&&z(d)===`duplicate`),me=M(()=>At(r()?.[s][t.locale])??{}),he=M(()=>`${t.keyPath}#`),ge=M(()=>r()?.expanderStates?._[z(he)]??!0),_e=M(()=>sc(Object.fromEntries(Object.entries(z(me)).filter(([e])=>z(ae).test(e)).map(([e,n])=>[`${z(c)}${e.slice(t.keyPath.length)}`,n])))[z(c)]??[]),ve=M(()=>z(_e).map((e,n)=>{let i=`${t.keyPath}.${n}`;return[i,r()?.expanderStates?._[i]??!0]})),ye=M(()=>z(_e).length>=z(x)),be=M(()=>t.locale===z(fe)||(z(ie)?z(ee)?.flatMap(({fields:e=[]})=>e)??[]:z(w)??(z(C)?[z(C)]:[])).some(({i18n:e=!1})=>e===!0||e===`translate`)),xe=M(()=>z(pe)||!z(be)),Se=br([]),Ce=()=>{E7({[z(he)]:z(y)===`auto`?!z(_e).length:!z(y),...Object.fromEntries(z(_e).map((e,n)=>{let r=`${t.keyPath}.${n}`;return[r,T7({key:r,locale:t.locale,collapsed:z(g)})]}))})},we=e=>{Object.keys(r()?.[s]??{}).forEach(n=>{z(d)!==`duplicate`&&n!==t.locale||w7({locale:n,valueStoreKey:s,keyPath:t.keyPath,manipulate:e})})},Te=({index:e=z(S)?0:z(_e).length,dupIndex:n,type:r}={})=>{we(({valueList:i,expanderStateList:a})=>{let o=r?z(ee)?.find(({name:e})=>e===r)?.fields??[]:z(w)??(z(C)?[z(C)]:[]),s=(()=>{if(typeof n==`number`)return structuredClone(i[n]);let e=sc(b7({fields:o,locale:t.locale,defaultLocale:z(fe)}));return z(re)&&z(C)?e[z(C).name]:e})();r&&(s[z(te)]=r),z(re)||(s.__sc_item_id=crypto.randomUUID(),i.forEach((e,n)=>{u(e)&&(e.__sc_item_original_key_path??=`${t.keyPath}.${n}`)})),i.splice(e,0,s),a.splice(e,0,!0)}),E7({[z(he)]:!0})},Ee=e=>{we(({valueList:n,expanderStateList:r})=>{z(re)||n.forEach((e,n)=>{u(e)&&(e.__sc_item_original_key_path??=`${t.keyPath}.${n}`)}),n.splice(e,1),r.splice(e,1)})},De=e=>{we(({valueList:n,expanderStateList:r})=>{z(re)||(n[e].__sc_item_id??=crypto.randomUUID(),n[e+1].__sc_item_id??=crypto.randomUUID(),n[e].__sc_item_original_key_path??=`${t.keyPath}.${e}`,n[e+1].__sc_item_original_key_path??=`${t.keyPath}.${e+1}`),[n[e],n[e+1]]=[n[e+1],n[e]],[r[e],r[e+1]]=[r[e+1],r[e]]})},Oe=(e,n)=>Ave({collectionName:z(ce),fileName:z(ue),keyPath:t.keyPath,valueMap:z(me),locale:t.locale,summaryTemplate:n,hasSingleSubField:z(re),index:e,isIndexFile:z(oe)}),ke=async e=>{if(!z(v))return;let n=z(v).replace(/^fields\./,``),i=`${t.keyPath}.${e}`,a=z(re)?i:`${i}.${n}`,o=z(me)[a];if(!o)return;let s=BP({collectionName:z(ce),fileName:z(ue),valueMap:z(me),keyPath:a,isIndexFile:z(oe)});if(!(s?.widget!==`image`||z(re)&&s.name!==n))return cN({value:o,entry:r()?.originalEntry,collectionName:z(ce),fileName:z(ue),typedKeyPath:z(re)?`${t.typedKeyPath}.*`:`${t.typedKeyPath}.*.${n}`})},Ae=async()=>{z(v)&&(Se.length=z(_e).length,z(_e).forEach(async(e,t)=>{let n=await ke(t);Se[t]!==n&&(Se[t]=n)}))};Qr(()=>{z(_e),zi(()=>{Ae()})}),tc(()=>{Ce()});var je=HCe(),Me=I(je),Ne=F(Me);{let e=e=>{nCe(e,{get expanded(){return z(ge)}})},t=M(()=>!z(_e).length),r=M(()=>z(ge)?Y(`collapse`):Y(`expand`));wI(Ne,{iconic:!0,get disabled(){return z(t)},get"aria-label"(){return z(r)},get"aria-expanded"(){return z(ge)},get"aria-controls"(){return`list-${n}-item-list`},onclick:()=>{E7({[z(he)]:!z(ge)})},startIcon:e,$$slots:{startIcon:!0}})}var Pe=L(Ne,2),Fe=F(Pe);D(Pe);var Ie=L(Pe,2);UI(Ie,{flex:!0});var Le=L(Ie,2),Re=e=>{var t=k7(),n=I(t);{let e=M(()=>Y(`expand_all`)),t=M(()=>z(ve).every(([,e])=>e));wI(n,{variant:`tertiary`,size:`small`,get label(){return z(e)},get disabled(){return z(t)},onclick:()=>{E7(Object.fromEntries(z(ve).map(([e])=>[e,!0])))}})}var r=L(n,2);{let e=M(()=>Y(`collapse_all`)),t=M(()=>z(ve).every(([,e])=>!e));wI(r,{variant:`tertiary`,size:`small`,get label(){return z(e)},get disabled(){return z(t)},onclick:()=>{E7(Object.fromEntries(z(ve).map(([e])=>[e,!1])))}})}H(e,t)};W(Le,e=>{z(ge)&&z(_e).length>1&&e(Re)}),D(Me);var ze=L(Me,2),Be=e=>{var n=RCe();f7(F(n),{get disabled(){return z(xe)},get fieldConfig(){return t.fieldConfig},get items(){return z(_e)},addItem:Te}),D(n),H(e,n)};W(ze,e=>{z(f)&&(z(S)||!z(_e).length)&&e(Be)});var Ve=L(ze,2);let He;uo(Ve,23,()=>z(_e),(e,t)=>u(e)?e.__sc_item_id??t:t,(e,i,a)=>{G8(e,{children:(e,s)=>{let c=M(()=>`${t.keyPath}.${z(a)}`),l=M(()=>r()?.expanderStates?._[z(c)]??!0),u=M(()=>z(ie)?z(ee)?.find(({name:e})=>e===z(i)[z(te)]):void 0),d=M(()=>z(ie)?z(u)?.fields??[]:z(w)??(z(C)?[z(C)]:[])),g=M(()=>z(ie)&&z(u)?.summary||z(_));var v=BCe(),y=F(v);{let e=e=>{var t=V(),n=I(t),r=e=>{var t=A7(),n=I(t);{let e=e=>{oI(e,{name:`arrow_upward`})},t=M(()=>z(pe)||z(a)===0),r=M(()=>Y(`move_up`));wI(n,{size:`small`,iconic:!0,get disabled(){return z(t)},get"aria-label"(){return z(r)},onclick:()=>De(z(a)-1),startIcon:e,$$slots:{startIcon:!0}})}var r=L(n,2);UI(r,{});var i=L(r,2);{let e=e=>{oI(e,{name:`arrow_downward`})},t=M(()=>z(pe)||z(a)===z(_e).length-1),n=M(()=>Y(`move_down`));wI(i,{iconic:!0,size:`small`,get disabled(){return z(t)},get"aria-label"(){return z(n)},onclick:()=>De(z(a)),startIcon:e,$$slots:{startIcon:!0}})}H(e,t)};W(n,e=>{z(h)&&e(r)}),H(e,t)},t=e=>{var t=k7(),n=I(t),r=e=>{{let t=e=>{{let t=M(()=>Y(`list_item_options`));iR(e,{get"aria-label"(){return z(t)},children:(e,t)=>{var n=A7(),r=I(n),i=e=>{{let t=M(()=>Y(`duplicate`));lR(e,{get label(){return z(t)},get disabled(){return z(ye)},onclick:()=>Te({index:z(a)+1,dupIndex:z(a)})})}};W(r,e=>{z(m)&&e(i)});var s=L(r,2);o(s,()=>z(a),()=>`above`);var c=L(s,2);o(c,()=>z(a)+1,()=>`below`),H(e,n)},$$slots:{default:!0}})}},n=M(()=>Y(`list_item_options`));PI(e,{variant:`ghost`,size:`small`,iconic:!0,popupPosition:`bottom-right`,get"aria-label"(){return z(n)},get disabled(){return z(xe)},popup:t,$$slots:{popup:!0}})}};W(n,e=>{z(f)&&e(r)});var i=L(n,2),s=e=>{{let t=e=>{oI(e,{name:`close`})},n=M(()=>Y(`remove`));wI(e,{variant:`ghost`,size:`small`,iconic:!0,get"aria-label"(){return z(n)},onclick:()=>Ee(z(a)),startIcon:t,$$slots:{startIcon:!0}})}};W(i,e=>{z(p)&&e(s)}),H(e,t)},r=M(()=>z(ie)?z(u)?.label||z(u)?.name:``),i=M(()=>z(d).length?()=>E7({[z(c)]:!z(l)}):void 0);p7(y,{get label(){return z(r)},get controlId(){return`list-${n}-item-${z(a)??``}-body`},get expanded(){return z(l)},get toggleExpanded(){return z(i)},centerContent:e,endContent:t,$$slots:{centerContent:!0,endContent:!0}})}var b=L(y,2),x=F(b),S=e=>{var n=V();uo(I(n),17,()=>z(d),e=>e.name,(e,n)=>{G8(e,{children:(e,r)=>{{let r=M(()=>z(re)?z(c):`${z(c)}.${z(n).name}`),a=M(()=>z(ie)?`${t.typedKeyPath}.*<${z(i)[z(te)]}>.${z(n).name}`:`${t.typedKeyPath}.*.${z(n).name}`),o=M(()=>z(re)?`single-subfield-list-field`:void 0);a9(e,{get keyPath(){return z(r)},get typedKeyPath(){return z(a)},get locale(){return t.locale},get fieldConfig(){return z(n)},get context(){return z(o)}})}},$$slots:{default:!0}})}),H(e,n)},T=e=>{var t=zCe(),n=F(t),r=e=>{H6(e,{get src(){return Se[z(a)]},variant:`icon`,cover:!0})};W(n,e=>{Se[z(a)]&&e(r)});var i=L(n,2);{let e=M(()=>bE.isSmallScreen?2:1);mI(i,{get lines(){return z(e)},children:(e,t)=>{gt();var n=ja();R(e=>U(n,e),[()=>Oe(z(a),z(g))]),H(e,n)},$$slots:{default:!0}})}D(t),H(e,t)};W(x,e=>{z(l)?e(S):e(T,-1)}),D(b),D(v),R(()=>K(b,`id`,`list-${n}-item-${z(a)??``}-body`)),H(e,v)},$$slots:{default:!0}})}),D(Ve);var Ue=L(Ve,2),We=e=>{var n=VCe(),r=F(n);f7(r,{get disabled(){return z(xe)},get fieldConfig(){return t.fieldConfig},get items(){return z(_e)},addItem:Te}),UI(L(r,2),{flex:!0}),D(n),H(e,n)};W(Ue,e=>{z(f)&&!z(S)&&z(_e).length&&e(We)}),R(()=>{K(Pe,`id`,`object-${n}-summary`),U(Fe,`${z(_e).length??``}
987
- ${((z(_e).length===1?z(b):void 0)||z(l)||z(c))??``}`),K(Ve,`id`,`list-${n}-item-list`),He=as(Ve,1,`item-list svelte-n5zzp2`,null,He,{collapsed:!z(ge)})}),H(e,je),k(),a()}var k7,RCe,A7,zCe,BCe,VCe,HCe,UCe,WCe=o((()=>{Z(),J(),X(),$(),f(),Np(),cc(),rc(),U6(),rCe(),K8(),s9(),iCe(),m7(),lN(),N6(),x7(),PCe(),O7(),KP(),s5(),$C(),SE(),k7=B(`<!> <!>`,1),RCe=B(`<div role="none" class="toolbar top add svelte-n5zzp2"><!></div>`),A7=B(`<!> <!> <!>`,1),zCe=B(`<div role="none" class="summary svelte-n5zzp2"><!> <!></div>`),BCe=B(`<div role="none" class="item svelte-n5zzp2"><!> <div role="none" class="item-body"><!></div></div>`),VCe=B(`<div role="none" class="toolbar bottom add svelte-n5zzp2"><!> <!></div>`),HCe=B(`<div role="none" class="toolbar top svelte-n5zzp2"><!> <div role="none" class="summary"> </div> <!> <!></div> <!> <div role="none"></div> <!>`,1),UCe={hash:`svelte-n5zzp2`,code:`.toolbar.svelte-n5zzp2 {display:flex;align-items:center;&.top.add {margin-block:8px 16px !important;}&.bottom.add {margin-block:16px 0 !important;}}.item-list.svelte-n5zzp2 {&.collapsed {display:none;}}.item.svelte-n5zzp2 {margin:16px 0;border-width:2px;border-color:var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);.summary:where(.svelte-n5zzp2) {display:flex;align-items:center;gap:8px;padding:8px;&:empty {display:none;}}}`}}));function GCe(e,t){O(t,!0);let n=()=>j(O6,`$entryDraft`,r),[r,i]=mn(),{valueStoreKey:a=`currentValues`}=Lt(`field-editor`)??{},o=q(t,`currentValue`,7),s=q(t,`required`,3,!0),c=q(t,`readonly`,3,!1),l=q(t,`invalid`,3,!1),u=N(!1),d=N(``),f=M(()=>t.fieldConfig.i18n),p=()=>{P(d,o()?.join(`
986
+ &.value {width:50%;}}td.svelte-u0prcz {padding:0;vertical-align:middle;}`}}));function XSe(e,t){O(t,!0),G(e,eCe);let n=()=>j(O6,`$entryDraft`,r),[r,i]=mn(),a=M(()=>t.fieldConfig.key_label),o=M(()=>t.fieldConfig.value_label),s=M(()=>z(a)||Y(`key_value.key`)),c=M(()=>z(o)||Y(`key_value.value`)),l=N(br([])),u=()=>{let e=u7({entryDraft:O6,keyPath:t.keyPath,locale:t.locale});(0,ZSe.default)(z(l),e)||P(l,e,!0)};Qr(()=>{n()&&(At(n().currentValues[t.locale]),zi(()=>{u()}))});var d=V(),f=I(d),p=e=>{var t=$Se(),n=F(t),r=F(n),i=F(r),a=F(i,!0);D(i);var o=L(i),u=F(o,!0);D(o),D(r),D(n);var d=L(n);uo(d,23,()=>z(l),([e,t],n)=>`${e}-${n}`,(e,t)=>{var n=M(()=>ee(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1];var a=QSe(),o=F(a),s=F(o,!0);D(o);var c=L(o),l=F(c,!0);D(c),D(a),R(()=>{U(s,r()),U(l,i())}),H(e,a)}),D(d),D(t),R(()=>{U(a,z(s)),U(u,z(c))}),H(e,t)};W(f,e=>{z(l).length&&e(p)}),H(e,d),k(),i()}var ZSe,QSe,$Se,eCe,tCe=o((()=>{Z(),J(),X(),ZSe=l(UO()),rc(),N6(),d7(),QSe=B(`<tr><td class="svelte-11sa460"> </td><td class="svelte-11sa460"> </td></tr>`),$Se=B(`<table class="svelte-11sa460"><thead><tr><th scope="col" class="svelte-11sa460"> </th><th scope="col" class="svelte-11sa460"> </th></tr></thead><tbody></tbody></table>`),eCe={hash:`svelte-11sa460`,code:`table.svelte-11sa460 {width:-moz-available;width:-webkit-fill-available;width:stretch;}th.svelte-11sa460 {padding-block:4px;width:50%;color:var(--sui-tertiary-foreground-color);background-color:var(--sui-tertiary-background-color);font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-normal);text-align:start;}td.svelte-11sa460 {&:empty::after {content:'\\00a0'; /* nbsp */}}`}}));function nCe(e,t){O(t,!0);let n=q(t,`expanded`,3,!1);{let t=M(()=>n()?`expand_more`:Lh()?`chevron_left`:`chevron_right`);oI(e,{get name(){return z(t)}})}k()}var rCe=o((()=>{Z(),J(),X(),$()}));function f7(e,t){O(t,!0);let n=q(t,`disabled`,3,!1),r=q(t,`items`,19,()=>[]),i=q(t,`addItem`,3,()=>void 0),a=M(()=>t.fieldConfig.name),o=M(()=>t.fieldConfig.label),s=M(()=>t.fieldConfig.types),c=M(()=>t.fieldConfig.widget===`list`?t.fieldConfig:void 0),l=M(()=>z(c)?.label_singular??``),u=M(()=>z(c)?.max??void 0),d=M(()=>Y(`add_x`,{values:{name:z(l)||z(o)||z(a)}})),f=M(()=>n()||typeof z(u)==`number`&&r().length===z(u));var p=V(),m=I(p),h=e=>{PI(e,{variant:`tertiary`,get label(){return z(d)},get disabled(){return z(f)},startIcon:e=>{oI(e,{name:`add`})},endIcon:e=>{},popup:e=>{{let t=M(()=>Y(`select_list_type`));iR(e,{get"aria-label"(){return z(t)},children:(e,t)=>{var n=V();uo(I(n),17,()=>z(s),({name:e,label:t})=>e,(e,t)=>{let n=()=>z(t).name,r=()=>z(t).label;{let t=M(()=>r()||n());lR(e,{get label(){return z(t)},onclick:()=>i()({type:n()})})}}),H(e,n)},$$slots:{default:!0}})}},$$slots:{startIcon:!0,endIcon:!0,popup:!0}})},g=M(()=>Array.isArray(z(s))),_=e=>{wI(e,{variant:`tertiary`,get label(){return z(d)},get disabled(){return z(f)},onclick:()=>i()(),startIcon:e=>{oI(e,{name:`add`})},$$slots:{startIcon:!0}})};W(m,e=>{z(g)?e(h):e(_,-1)}),H(e,p),k()}var iCe=o((()=>{Z(),J(),X(),$()}));function p7(e,t){O(t,!0),G(e,sCe);let n=q(t,`label`,3,``),r=q(t,`expanded`,15),i=q(t,`centerContent`,3,void 0),a=q(t,`endContent`,3,void 0);var o=oCe(),s=F(o),c=F(s);{let e=e=>{nCe(e,{get expanded(){return r()}})},i=M(()=>r()?Y(`collapse`):Y(`expand`));wI(c,{size:`small`,get"aria-label"(){return z(i)},get"aria-expanded"(){return r()},get"aria-controls"(){return t.controlId},onclick:()=>{r(!r()),t.toggleExpanded?.()},startIcon:e,children:(e,t)=>{var r=V(),i=I(r),a=e=>{var t=aCe(),r=F(t,!0);D(t),R(()=>U(r,n())),H(e,t)};W(i,e=>{n()&&e(a)}),H(e,r)},$$slots:{startIcon:!0,default:!0}})}D(s);var l=L(s,2);Co(F(l),()=>i()??E),D(l);var u=L(l,2);Co(F(u),()=>a()??E),D(u),D(o),H(e,o),k()}var aCe,oCe,sCe,m7=o((()=>{Z(),J(),X(),$(),rCe(),aCe=B(`<span role="none" class="type svelte-57h597"> </span>`),oCe=B(`<div role="none" class="header svelte-57h597"><div role="none" class="svelte-57h597"><!></div> <div role="none" class="svelte-57h597"><!></div> <div role="none" class="svelte-57h597"><!></div></div>`),sCe={hash:`svelte-57h597`,code:`.header.svelte-57h597 {display:flex;align-items:center;gap:8px;height:24px;background-color:var(--sui-secondary-border-color);& > div:where(.svelte-57h597) {display:flex;align-items:center;&:first-child {justify-content:flex-start;width:40%;}&:nth-child(2) {width:20%;justify-content:center;}&:last-child {width:40%;justify-content:flex-end;}}button {padding:0;height:16px;}.type:where(.svelte-57h597) {font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);color:var(--sui-secondary-foreground-color);}}`}})),cCe,lCe,uCe=o((()=>{cCe=({fieldConfig:e,dynamicValue:t})=>{if(t!==void 0)return t===`true`;let{default:n}=e;return typeof n==`boolean`?n:!1},lCe=e=>({[e.keyPath]:cCe(e)})})),dCe,fCe=o((()=>{f(),dCe=({fieldConfig:e,keyPath:t,dynamicValue:n})=>{let{default:r,output_code_only:i=!1,keys:a={code:`code`,lang:`lang`}}=e,o=n===void 0?r:n;if(i)return{[t]:typeof o==`string`?o:``};let s=u(o)?o:void 0,c=s?.[a.code]??o,l=s?.[a.lang]??``;return{[t]:{},[`${t}.${a.code}`]:typeof c==`string`?c:``,[`${t}.${a.lang}`]:typeof l==`string`?l:``}}})),pCe,mCe,hCe=o((()=>{oC(),Ww(),pCe=({fieldConfig:e,dynamicValue:t})=>{let n=e,r=n.default,i=t??r;if(typeof i!=`string`)return``;if(i===`{{now}}`){let{singleCustomTimeZone:e,outputUTC:t}=aC(n);return Vw({inputValue:Bw(n,e),currentValue:``,fieldConfig:n,timeZone:e,outputUTC:t})}return i},mCe=e=>({[e.keyPath]:pCe(e)})})),h7,gCe=o((()=>{PP(),h7=({fieldConfig:e,keyPath:t,dynamicValue:n})=>{let r=e,i=r.default,a=NP(r),o=``;o=n===void 0?a?Array.isArray(i)?i:[]:typeof i==`string`?i:``:a?n.split(/,\s*/):n;let s={};return a&&Array.isArray(o)&&(o=o.map(e=>e.trim()).filter(e=>e!==``),o.length&&(s[t]=[],o.forEach((e,n)=>{s[`${t}.${n}`]=e}))),!a&&typeof o==`string`&&(s[t]=o.trim()),s}})),_Ce,vCe,g7,yCe=o((()=>{Ep(),Qp(),uC(),ID(),_Ce=(e,{locale:t,account:{email:n=``,login:r=``,name:i=``}})=>e===`locale`?t:e===`datetime`?new Date().toJSON().replace(/\d+\.\d+Z$/,`00.000Z`):e===`uuid`?Cp():e===`uuid_short`?Cp(`short`):e===`uuid_shorter`?Cp(`shorter`):e===`author-email`?n:e===`author-login`?r:e===`author-name`?i:``,vCe=({fieldConfig:e,locale:t,dynamicValue:n})=>{let{default:r}=e,i=n??r;if(typeof i!=`string`)return i;let a={locale:t,account:FD.account};return i.replaceAll(Yp,(e,n)=>{let{value:r,transformations:i}=cC(n),o=_Ce(r,a);return i.length?lC({value:o,transformations:i,locale:t}):o})},g7=e=>({[e.keyPath]:vCe(e)})})),bCe,xCe,SCe=o((()=>{f(),KP(),bCe=({fieldConfig:e,locale:t})=>{let{default:n}=e,r=VP({fieldConfig:e,locale:t});return u(n)?n:r?{"":``}:{}},xCe=e=>{let{keyPath:t,dynamicValue:n}=e,r;if(n!==void 0)try{let e=JSON.parse(n);u(e)&&(r=e)}catch{}return r??=bCe(e),Object.fromEntries(Object.entries(r).filter(([,e])=>typeof e==`string`).map(([e,n])=>[`${t}.${e}`,n]))}})),CCe,wCe=o((()=>{f(),cc(),CCe=({fieldConfig:e,keyPath:t,dynamicValue:n})=>{let{default:r}=e,{fields:i}=e,{types:a}=e,o;if(o=n===void 0?Array.isArray(r)?r:[]:n.split(/,\s*/).map(e=>e.trim()).filter(e=>e!==``),!(Array.isArray(o)&&o.length))return{[t]:[]};let s={[t]:o};return i||a?o.forEach((e,n)=>{u(e)?Object.entries(oc(e)).forEach(([e,r])=>{s[`${t}.${n}.${e}`]=r}):s[`${t}.${n}`]=e}):o.forEach((e,n)=>{u(e)||(s[`${t}.${n}`]=e)}),s}})),TCe,ECe=o((()=>{TCe=({fieldConfig:e,keyPath:t,dynamicValue:n})=>{let{default:r,value_type:i=`int`}=e,a=n??r,o=typeof a==`string`;if(a===void 0)return i===`int`||i===`float`?{[t]:null}:{[t]:``};if([`int`,`int/string`].includes(i)){let e=o?Number.parseInt(a,10):a;return Number.isInteger(e)?{[t]:e}:{}}if([`float`,`float/string`].includes(i)){let e=o?Number.parseFloat(a):a;return Number.isFinite(e)?{[t]:e}:{}}return{}}})),DCe,OCe=o((()=>{f(),cc(),KP(),DCe=({fieldConfig:e,keyPath:t,locale:n,defaultLocale:r,populateDefault:i})=>{let{default:a}=e,{fields:o}=e,{types:s}=e,c=VP({fieldConfig:e,locale:n}),l={};return u(a)?(Object.entries(oc(a)).forEach(([e,n])=>{l[`${t}.${e}`]=n}),l):!c||Array.isArray(s)?(l[t]=null,l):(o&&o.length>0&&o.forEach(e=>{i?.({content:l,keyPath:[t,e.name].join(`.`),fieldConfig:e,locale:n,defaultLocale:r,dynamicValues:{}})}),l)}})),_7,kCe=o((()=>{Np(),qp(),AF(),_7=({fieldConfig:e,keyPath:t,dynamicValue:n})=>{let{default:r=A(TF)?.field_defaults?.richtext?.default}=e,i=``;if(n!==void 0)try{i=Ap(n)}catch{i=n.replace(/<[^>]*>/g,``)}else i=r||``;return{[t]:i}}})),v7,ACe=o((()=>{v7=({fieldConfig:e,keyPath:t,dynamicValue:n})=>{let{default:r,multiple:i=!1}=e,a=n===void 0?r:n.split(/,\s*/).map(e=>e.trim()),o=Array.isArray(a)&&!!a.length;if(!i){if(n!==void 0){let e=n.split(/,\s*/).map(e=>e.trim());return{[t]:e[0]||``}}return{[t]:a===void 0?``:a}}return o?Object.fromEntries(a.map((e,n)=>[`${t}.${n}`,e])):{[t]:[]}}})),jCe,MCe=o((()=>{uCe(),fCe(),hCe(),gCe(),yCe(),SCe(),wCe(),ECe(),OCe(),kCe(),ACe(),jCe={boolean:lCe,code:dCe,datetime:mCe,file:h7,hidden:g7,image:h7,keyvalue:xCe,list:CCe,markdown:_7,number:TCe,object:DCe,relation:v7,richtext:_7,select:v7}})),y7,b7,x7=o((()=>{MCe(),y7=({content:e,keyPath:t,fieldConfig:n,locale:r,defaultLocale:i,dynamicValues:a})=>{let{widget:o=`string`,default:s,i18n:c=!1}=n;if(r!==i&&[!1,`none`].includes(c))return;if(o===`compute`){e[t]=``;return}let l=t in a&&!/\.\d+(?:\.|$)/.test(t)&&a[t].trim()||void 0,u=jCe[o];if(u){Object.assign(e,u({fieldConfig:n,keyPath:t,locale:r,defaultLocale:i,dynamicValue:l,populateDefault:y7}));return}e[t]=l||s||``},b7=({fields:e,locale:t,defaultLocale:n,dynamicValues:r={}})=>{let i={};return e.forEach(e=>{y7({content:i,keyPath:e.name,fieldConfig:e,locale:t,defaultLocale:n,dynamicValues:r})}),i}})),S7,NCe,C7,w7,PCe=o((()=>{Np(),cc(),qp(),N6(),Gy(),S7=(e,t)=>{Object.entries(t).forEach(([t,n])=>{e[t]!==n&&(e[t]=n)}),Object.keys(e).forEach(n=>{n in t||delete e[n]})},NCe=new Map,C7=(e,t)=>{let n=Wy(NCe,t,()=>RegExp(`^${Dp(t)}\\b(?!#)`)),r=Object.entries(e).filter(([e])=>n.test(e)).map(([e,t])=>[e.replace(n,`_`),t]).sort();return[sc(Object.fromEntries(r))._??[],Object.fromEntries(Object.entries(e).filter(([e])=>!n.test(e)))]},w7=({locale:e,valueStoreKey:t=`currentValues`,keyPath:n,manipulate:r})=>{let i=A(O6),{collection:a,collectionFile:o}=i,{defaultLocale:s}=(o??a)._i18n,[c,l]=C7(i[t][e],n),[u,d]=e===s?C7(i.expanderStates._,n):[[],[]];r({valueList:c,expanderStateList:u}),k6.set(!1),O6.update(r=>(S7(r[t][e],{...oc({[n]:c}),...l}),e===s&&S7(r.expanderStates._,{...oc({[n]:u}),...d}),r)),k6.set(!0)}})),FCe,T7,E7,D7,ICe,O7=o((()=>{Np(),qp(),N6(),KP(),Gy(),FCe=new Map,T7=({key:e,locale:t,collapsed:n=!1})=>{let r=A(O6),i=r?.expanderStates?._[e];if(i!==void 0)return i;if(n===`auto`){let n=r?.currentValues?.[t]??{},i=e.replace(/#$/,``),a=Wy(FCe,i,()=>RegExp(`^${Dp(i)}\\.[^\\.]+$`));return!Object.entries(n).some(([e,t])=>a.test(e)&&!!t)}return!n},E7=e=>{O6.update(t=>(t&&Object.entries(e).forEach(([e,n])=>{t.expanderStates._[e]!==n&&(t.expanderStates._[e]=n)}),t))},D7=({collectionName:e,fileName:t,valueMap:n,keyPath:r,isIndexFile:i=!1})=>{let a=new Set,o={collectionName:e,fileName:t,valueMap:n,isIndexFile:i};return r.split(`.`).forEach((e,t,n)=>{let r=n.slice(0,t+1).join(`.`),i=BP({...o,keyPath:r}),s=FP.test(r);if(i?.widget===`object`)s&&a.add(r),a.add(`${r}#`);else if(i?.widget===`list`)a.add(s?r:`${r}#`);else if(t>0){let e=n.slice(0,t).join(`.`),i=BP({...o,keyPath:e});i?.widget===`object`&&`fields`in i&&a.add(`${e}.${i.name}#`),i?.widget===`list`&&`field`in i&&a.add(r)}}),[...a]},ICe=({collectionName:e,fileName:t,currentValues:n})=>{let{validities:r,isIndexFile:i}=A(O6),a={};Object.entries(r??{}).forEach(([r,o])=>{Object.entries(o).forEach(([o,{valid:s}])=>{s||D7({collectionName:e,fileName:t,valueMap:n[r],keyPath:o,isIndexFile:i}).forEach(e=>{a[e]=!0})})}),E7(a)}}));function LCe(e,t){let n=Ma();O(t,!0),G(e,UCe);let r=()=>j(O6,`$entryDraft`,i),[i,a]=mn(),o=(e,t=E,n=E)=>{var r=V(),i=I(r),a=e=>{{let r=e=>{var n=V();uo(I(n),17,()=>z(ne)??[],({name:e,label:t})=>e,(e,n)=>{let r=()=>z(n).name,i=()=>z(n).label;{let n=M(()=>i()||r());lR(e,{get label(){return z(n)},onclick:()=>De({index:t(),type:r()})})}}),H(e,n)},i=M(()=>Y(`add_item_${n()}`));lR(e,{get label(){return z(i)},get disabled(){return z(xe)},items:r,$$slots:{items:!0}})}},o=e=>{{let r=M(()=>Y(`add_item_${n()}`));lR(e,{get label(){return z(r)},get disabled(){return z(xe)},onclick:()=>De({index:t()})})}};W(i,e=>{z(oe)?e(a):e(o,-1)}),H(e,r)},{valueStoreKey:s=`currentValues`,parentComponentNames:c=[]}=Lt(`field-editor`)??{},l=c.at(-1),d=M(()=>t.fieldConfig.name),f=M(()=>t.fieldConfig.label),p=M(()=>t.fieldConfig.i18n),m=M(()=>T(t.fieldConfig.allow_add,!0)),h=M(()=>T(t.fieldConfig.allow_remove,!0)),g=M(()=>T(t.fieldConfig.allow_duplicate,!0)),_=M(()=>T(t.fieldConfig.allow_reorder,!0)),v=M(()=>t.fieldConfig.collapsed),y=M(()=>t.fieldConfig.summary),b=M(()=>t.fieldConfig.thumbnail),x=M(()=>T(t.fieldConfig.minimize_collapsed,!1)),S=M(()=>t.fieldConfig.label_singular),C=M(()=>T(t.fieldConfig.max,1/0)),w=M(()=>T(t.fieldConfig.add_to_top,!1)),ee=M(()=>t.fieldConfig.field),te=M(()=>t.fieldConfig.fields),ne=M(()=>t.fieldConfig.types),re=M(()=>T(t.fieldConfig.typeKey,`type`)),ie=M(()=>o5(t.fieldConfig)),ae=M(()=>z(ie).hasSingleSubField),oe=M(()=>z(ie).hasVariableTypes),se=M(()=>RegExp(`^${Dp(t.keyPath)}\\.(\\d+)(.*)?`)),ce=M(()=>r()?.isIndexFile??!1),le=M(()=>r()?.collection),ue=M(()=>r()?.collectionName??``),de=M(()=>r()?.collectionFile),fe=M(()=>r()?.fileName),pe=M(()=>(z(de)??z(le))?._i18n??ZC),me=M(()=>z(pe).defaultLocale),he=M(()=>t.locale!==z(me)&&z(p)===`duplicate`),ge=M(()=>At(r()?.[s][t.locale])??{}),_e=M(()=>`${t.keyPath}#`),ve=M(()=>r()?.expanderStates?._[z(_e)]??!0),ye=M(()=>sc(Object.fromEntries(Object.entries(z(ge)).filter(([e])=>z(se).test(e)).map(([e,n])=>[`${z(d)}${e.slice(t.keyPath.length)}`,n])))[z(d)]??[]),be=M(()=>z(ye).map((e,n)=>{let i=`${t.keyPath}.${n}`;return[i,r()?.expanderStates?._[i]??!0]})),xe=M(()=>z(ye).length>=z(C)),Se=M(()=>t.locale===z(me)||(z(oe)?z(ne)?.flatMap(({fields:e=[]})=>e)??[]:z(te)??(z(ee)?[z(ee)]:[])).some(({i18n:e=!1})=>e===!0||e===`translate`)),Ce=M(()=>z(he)||!z(Se)),we=br([]),Te=()=>{E7({[z(_e)]:z(x)===`auto`?!z(ye).length:!z(x),...Object.fromEntries(z(ye).map((e,n)=>{let r=`${t.keyPath}.${n}`;return[r,T7({key:r,locale:t.locale,collapsed:z(v)})]}))})},Ee=e=>{Object.keys(r()?.[s]??{}).forEach(n=>{z(p)!==`duplicate`&&n!==t.locale||w7({locale:n,valueStoreKey:s,keyPath:t.keyPath,manipulate:e})})},De=({index:e=z(w)?0:z(ye).length,dupIndex:n,type:r}={})=>{Ee(({valueList:i,expanderStateList:a})=>{let o=r?z(ne)?.find(({name:e})=>e===r)?.fields??[]:z(te)??(z(ee)?[z(ee)]:[]),s=(()=>{if(typeof n==`number`)return structuredClone(i[n]);let e=sc(b7({fields:o,locale:t.locale,defaultLocale:z(me)}));return z(ae)&&z(ee)?e[z(ee).name]:e})();r&&(s[z(re)]=r),z(ae)||(s.__sc_item_id=crypto.randomUUID(),i.forEach((e,n)=>{u(e)&&(e.__sc_item_original_key_path??=`${t.keyPath}.${n}`)})),i.splice(e,0,s),a.splice(e,0,!0)}),E7({[z(_e)]:!0})},Oe=e=>{Ee(({valueList:n,expanderStateList:r})=>{z(ae)||n.forEach((e,n)=>{u(e)&&(e.__sc_item_original_key_path??=`${t.keyPath}.${n}`)}),n.splice(e,1),r.splice(e,1)})},ke=e=>{Ee(({valueList:n,expanderStateList:r})=>{z(ae)||(n[e].__sc_item_id??=crypto.randomUUID(),n[e+1].__sc_item_id??=crypto.randomUUID(),n[e].__sc_item_original_key_path??=`${t.keyPath}.${e}`,n[e+1].__sc_item_original_key_path??=`${t.keyPath}.${e+1}`),[n[e],n[e+1]]=[n[e+1],n[e]],[r[e],r[e+1]]=[r[e+1],r[e]]})},Ae=(e,n)=>Ave({collectionName:z(ue),fileName:z(fe),keyPath:t.keyPath,valueMap:z(ge),locale:t.locale,summaryTemplate:n,hasSingleSubField:z(ae),index:e,isIndexFile:z(ce)}),je=async e=>{if(!z(b))return;let n=z(b).replace(/^fields\./,``),i=`${t.keyPath}.${e}`,a=z(ae)?i:`${i}.${n}`,o=z(ge)[a];if(!o)return;let s=BP({collectionName:z(ue),fileName:z(fe),valueMap:z(ge),keyPath:a,isIndexFile:z(ce)});if(!(s?.widget!==`image`||z(ae)&&s.name!==n))return cN({value:o,entry:r()?.originalEntry,collectionName:z(ue),fileName:z(fe),componentName:l,typedKeyPath:z(ae)?`${t.typedKeyPath}.*`:`${t.typedKeyPath}.*.${n}`})},Me=async()=>{z(b)&&(we.length=z(ye).length,z(ye).forEach(async(e,t)=>{let n=await je(t);we[t]!==n&&(we[t]=n)}))};Qr(()=>{z(ye),zi(()=>{Me()})}),tc(()=>{Te()});var Ne=HCe(),Pe=I(Ne),Fe=F(Pe);{let e=e=>{nCe(e,{get expanded(){return z(ve)}})},t=M(()=>!z(ye).length),r=M(()=>z(ve)?Y(`collapse`):Y(`expand`));wI(Fe,{iconic:!0,get disabled(){return z(t)},get"aria-label"(){return z(r)},get"aria-expanded"(){return z(ve)},get"aria-controls"(){return`list-${n}-item-list`},onclick:()=>{E7({[z(_e)]:!z(ve)})},startIcon:e,$$slots:{startIcon:!0}})}var Ie=L(Fe,2),Le=F(Ie);D(Ie);var Re=L(Ie,2);UI(Re,{flex:!0});var ze=L(Re,2),Be=e=>{var t=k7(),n=I(t);{let e=M(()=>Y(`expand_all`)),t=M(()=>z(be).every(([,e])=>e));wI(n,{variant:`tertiary`,size:`small`,get label(){return z(e)},get disabled(){return z(t)},onclick:()=>{E7(Object.fromEntries(z(be).map(([e])=>[e,!0])))}})}var r=L(n,2);{let e=M(()=>Y(`collapse_all`)),t=M(()=>z(be).every(([,e])=>!e));wI(r,{variant:`tertiary`,size:`small`,get label(){return z(e)},get disabled(){return z(t)},onclick:()=>{E7(Object.fromEntries(z(be).map(([e])=>[e,!1])))}})}H(e,t)};W(ze,e=>{z(ve)&&z(ye).length>1&&e(Be)}),D(Pe);var Ve=L(Pe,2),He=e=>{var n=RCe();f7(F(n),{get disabled(){return z(Ce)},get fieldConfig(){return t.fieldConfig},get items(){return z(ye)},addItem:De}),D(n),H(e,n)};W(Ve,e=>{z(m)&&(z(w)||!z(ye).length)&&e(He)});var Ue=L(Ve,2);let We;uo(Ue,23,()=>z(ye),(e,t)=>u(e)?e.__sc_item_id??t:t,(e,i,a)=>{G8(e,{children:(e,s)=>{let c=M(()=>`${t.keyPath}.${z(a)}`),l=M(()=>r()?.expanderStates?._[z(c)]??!0),u=M(()=>z(oe)?z(ne)?.find(({name:e})=>e===z(i)[z(re)]):void 0),d=M(()=>z(oe)?z(u)?.fields??[]:z(te)??(z(ee)?[z(ee)]:[])),f=M(()=>z(oe)&&z(u)?.summary||z(y));var p=BCe(),v=F(p);{let e=e=>{var t=V(),n=I(t),r=e=>{var t=A7(),n=I(t);{let e=e=>{oI(e,{name:`arrow_upward`})},t=M(()=>z(he)||z(a)===0),r=M(()=>Y(`move_up`));wI(n,{size:`small`,iconic:!0,get disabled(){return z(t)},get"aria-label"(){return z(r)},onclick:()=>ke(z(a)-1),startIcon:e,$$slots:{startIcon:!0}})}var r=L(n,2);UI(r,{});var i=L(r,2);{let e=e=>{oI(e,{name:`arrow_downward`})},t=M(()=>z(he)||z(a)===z(ye).length-1),n=M(()=>Y(`move_down`));wI(i,{iconic:!0,size:`small`,get disabled(){return z(t)},get"aria-label"(){return z(n)},onclick:()=>ke(z(a)),startIcon:e,$$slots:{startIcon:!0}})}H(e,t)};W(n,e=>{z(_)&&e(r)}),H(e,t)},t=e=>{var t=k7(),n=I(t),r=e=>{{let t=e=>{{let t=M(()=>Y(`list_item_options`));iR(e,{get"aria-label"(){return z(t)},children:(e,t)=>{var n=A7(),r=I(n),i=e=>{{let t=M(()=>Y(`duplicate`));lR(e,{get label(){return z(t)},get disabled(){return z(xe)},onclick:()=>De({index:z(a)+1,dupIndex:z(a)})})}};W(r,e=>{z(g)&&e(i)});var s=L(r,2);o(s,()=>z(a),()=>`above`);var c=L(s,2);o(c,()=>z(a)+1,()=>`below`),H(e,n)},$$slots:{default:!0}})}},n=M(()=>Y(`list_item_options`));PI(e,{variant:`ghost`,size:`small`,iconic:!0,popupPosition:`bottom-right`,get"aria-label"(){return z(n)},get disabled(){return z(Ce)},popup:t,$$slots:{popup:!0}})}};W(n,e=>{z(m)&&e(r)});var i=L(n,2),s=e=>{{let t=e=>{oI(e,{name:`close`})},n=M(()=>Y(`remove`));wI(e,{variant:`ghost`,size:`small`,iconic:!0,get"aria-label"(){return z(n)},onclick:()=>Oe(z(a)),startIcon:t,$$slots:{startIcon:!0}})}};W(i,e=>{z(h)&&e(s)}),H(e,t)},r=M(()=>z(oe)?z(u)?.label||z(u)?.name:``),i=M(()=>z(d).length?()=>E7({[z(c)]:!z(l)}):void 0);p7(v,{get label(){return z(r)},get controlId(){return`list-${n}-item-${z(a)??``}-body`},get expanded(){return z(l)},get toggleExpanded(){return z(i)},centerContent:e,endContent:t,$$slots:{centerContent:!0,endContent:!0}})}var b=L(v,2),x=F(b),S=e=>{var n=V();uo(I(n),17,()=>z(d),e=>e.name,(e,n)=>{G8(e,{children:(e,r)=>{{let r=M(()=>z(ae)?z(c):`${z(c)}.${z(n).name}`),a=M(()=>z(oe)?`${t.typedKeyPath}.*<${z(i)[z(re)]}>.${z(n).name}`:`${t.typedKeyPath}.*.${z(n).name}`),o=M(()=>z(ae)?`single-subfield-list-field`:void 0);a9(e,{get keyPath(){return z(r)},get typedKeyPath(){return z(a)},get locale(){return t.locale},get fieldConfig(){return z(n)},get context(){return z(o)}})}},$$slots:{default:!0}})}),H(e,n)},C=e=>{var t=zCe(),n=F(t),r=e=>{H6(e,{get src(){return we[z(a)]},variant:`icon`,cover:!0})};W(n,e=>{we[z(a)]&&e(r)});var i=L(n,2);{let e=M(()=>bE.isSmallScreen?2:1);mI(i,{get lines(){return z(e)},children:(e,t)=>{gt();var n=ja();R(e=>U(n,e),[()=>Ae(z(a),z(f))]),H(e,n)},$$slots:{default:!0}})}D(t),H(e,t)};W(x,e=>{z(l)?e(S):e(C,-1)}),D(b),D(p),R(()=>K(b,`id`,`list-${n}-item-${z(a)??``}-body`)),H(e,p)},$$slots:{default:!0}})}),D(Ue);var Ge=L(Ue,2),Ke=e=>{var n=VCe(),r=F(n);f7(r,{get disabled(){return z(Ce)},get fieldConfig(){return t.fieldConfig},get items(){return z(ye)},addItem:De}),UI(L(r,2),{flex:!0}),D(n),H(e,n)};W(Ge,e=>{z(m)&&!z(w)&&z(ye).length&&e(Ke)}),R(()=>{K(Ie,`id`,`object-${n}-summary`),U(Le,`${z(ye).length??``}
987
+ ${((z(ye).length===1?z(S):void 0)||z(f)||z(d))??``}`),K(Ue,`id`,`list-${n}-item-list`),We=as(Ue,1,`item-list svelte-n5zzp2`,null,We,{collapsed:!z(ve)})}),H(e,Ne),k(),a()}var k7,RCe,A7,zCe,BCe,VCe,HCe,UCe,WCe=o((()=>{Z(),J(),X(),$(),f(),Np(),cc(),rc(),U6(),rCe(),K8(),s9(),iCe(),m7(),lN(),N6(),x7(),PCe(),O7(),KP(),s5(),$C(),SE(),k7=B(`<!> <!>`,1),RCe=B(`<div role="none" class="toolbar top add svelte-n5zzp2"><!></div>`),A7=B(`<!> <!> <!>`,1),zCe=B(`<div role="none" class="summary svelte-n5zzp2"><!> <!></div>`),BCe=B(`<div role="none" class="item svelte-n5zzp2"><!> <div role="none" class="item-body"><!></div></div>`),VCe=B(`<div role="none" class="toolbar bottom add svelte-n5zzp2"><!> <!></div>`),HCe=B(`<div role="none" class="toolbar top svelte-n5zzp2"><!> <div role="none" class="summary"> </div> <!> <!></div> <!> <div role="none"></div> <!>`,1),UCe={hash:`svelte-n5zzp2`,code:`.toolbar.svelte-n5zzp2 {display:flex;align-items:center;&.top.add {margin-block:8px 16px !important;}&.bottom.add {margin-block:16px 0 !important;}}.item-list.svelte-n5zzp2 {&.collapsed {display:none;}}.item.svelte-n5zzp2 {margin:16px 0;border-width:2px;border-color:var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);.summary:where(.svelte-n5zzp2) {display:flex;align-items:center;gap:8px;padding:8px;&:empty {display:none;}}}`}}));function GCe(e,t){O(t,!0);let n=()=>j(O6,`$entryDraft`,r),[r,i]=mn(),{valueStoreKey:a=`currentValues`}=Lt(`field-editor`)??{},o=q(t,`currentValue`,7),s=q(t,`required`,3,!0),c=q(t,`readonly`,3,!1),l=q(t,`invalid`,3,!1),u=N(!1),d=N(``),f=M(()=>t.fieldConfig.i18n),p=()=>{P(d,o()?.join(`
988
988
  `)??``,!0)},m=(e=z(d).split(/\n/g))=>{Object.keys(n()?.[a]??{}).forEach(r=>{z(f)!==`duplicate`&&r!==t.locale||(Object.keys(n()?.[a][r]??{}).forEach(e=>{e.match(`^${Dp(t.keyPath)}\\.\\d+$`)&&delete n()?.[a][r][e]}),e.forEach((e,i)=>{gn(O6,zi(n)[a][r][`${t.keyPath}.${i}`]=e,zi(n))}))})},h=()=>{o(z(d).split(/\n/g).map(e=>e.trim()).filter(e=>!!e)),m(o())};tc(()=>{P(u,!0)}),Qr(()=>{z(u)&&(o(),zi(()=>{p()}))});{let n=M(()=>RC(t.locale));t2(e,{get dir(){return z(n)},autoResize:!0,flex:!0,get readonly(){return c()},get required(){return s()},get invalid(){return l()},get"aria-errormessage"(){return`${t.fieldId??``}-error`},oninput:()=>{m()},onblur:()=>{h()},get value(){return z(d)},set value(e){P(d,e,!0)}})}k(),i()}var KCe=o((()=>{Z(),J(),$(),Np(),rc(),N6(),WC()}));function qCe(e,t){let n=Ma();O(t,!0);let r=Gs(t,JCe);M2(e,{get"aria-labelledby"(){return`list-${n}-summary`},children:(e,n)=>{var i=V(),a=I(i),o=e=>{{let n=M(()=>({...r,fieldConfig:t.fieldConfig}));LCe(e,Ks(()=>z(n)))}},s=M(()=>o5(t.fieldConfig).hasSubFields),c=e=>{{let n=M(()=>({...r,fieldConfig:t.fieldConfig}));GCe(e,Ks(()=>z(n)))}};W(a,e=>{z(s)?e(o):e(c,-1)}),H(e,i)},$$slots:{default:!0}}),k()}var JCe,YCe=o((()=>{Z(),J(),$(),WCe(),KCe(),s5(),JCe=new Set([`$$slots`,`$$events`,`$$legacy`,`fieldConfig`])}));function XCe(e,t){let n=Ma();G(e,$Ce);let r=`${n}-header`;var i=QCe(),a=F(i),o=e=>{var n=ZCe(),i=F(n,!0);D(n),R(()=>{K(n,`id`,r),U(i,t.label)}),H(e,n)};W(a,e=>{t.label&&e(o)});var s=L(a,2);Co(F(s),()=>t.children??E),D(s),D(i),R(()=>K(i,`aria-labelledby`,t.label?r:void 0)),H(e,i)}var ZCe,QCe,$Ce,ewe=o((()=>{Z(),J(),ZCe=B(`<div role="none" class="header svelte-ygwzbn"> </div>`),QCe=B(`<div role="group" class="subsection svelte-ygwzbn"><!> <div role="none" class="items svelte-ygwzbn"><!></div></div>`),$Ce={hash:`svelte-ygwzbn`,code:`.subsection.svelte-ygwzbn {margin:16px auto;border:2px solid var(--sui-secondary-border-color);border-radius:var(--sui-control-medium-border-radius);.title {font-size:inherit;font-weight:var(--sui-font-weight-normal);}}.header.svelte-ygwzbn {display:flex;align-items:center;height:24px;padding-inline:8px;color:var(--sui-secondary-foreground-color);background-color:var(--sui-secondary-border-color);font-size:var(--sui-font-size-small);font-weight:var(--sui-font-weight-bold);}.items.svelte-ygwzbn {padding:8px 16px;&:empty {display:none;}}`}}));function j7(e,t){O(t,!0),G(e,rwe);let n=()=>j(O6,`$entryDraft`,r),[r,i]=mn(),a=q(t,`showLabel`,3,!0),o=M(()=>t.fieldConfig.name),s=M(()=>T(t.fieldConfig.widget,`string`)),c=M(()=>T(t.fieldConfig.i18n,!1)),l=M(()=>T(t.fieldConfig.label,``)),u=M(()=>T(t.fieldConfig.preview,!0)),d=M(()=>RP(t.fieldConfig)),f=M(()=>z(s)===`list`||z(d)),p=M(()=>n()?.collection),m=M(()=>n()?.collectionFile),h=M(()=>At(n()?.currentValues[t.locale]??{})),g=M(()=>(z(m)??z(p))?._i18n??ZC),_=M(()=>z(g).i18nEnabled),v=M(()=>z(g).defaultLocale),y=M(()=>z(_)&&(z(c)===!0||z(c)===`translate`)),b=M(()=>z(_)&&z(c)===`duplicate`),x=M(()=>RegExp(`^${Dp(t.keyPath)}\\.\\d+$`)),S=M(()=>z(f)?Object.entries(z(h)).filter(([e])=>z(x).test(e)).map(([,e])=>e).filter(e=>e!==void 0):z(h)[t.keyPath]),C=()=>{window.postMessage({type:`highlight-editor-field`,payload:{locale:t.locale,keyPath:t.keyPath}},window.location.origin)};var w=V(),ee=I(w),te=e=>{var n=nwe(),r=F(n),i=e=>{var t=twe(),n=F(t,!0);D(t),R(()=>U(n,z(l)||z(o))),H(e,t)};W(r,e=>{a()&&e(i)});var c=L(r,2),u=e=>{let n=M(()=>e9[z(s)]);var r=V();To(I(r),()=>z(n),(e,n)=>{n(e,{get keyPath(){return t.keyPath},get typedKeyPath(){return t.typedKeyPath},get locale(){return t.locale},get fieldConfig(){return t.fieldConfig},get currentValue(){return z(S)}})}),H(e,r)};W(c,e=>{z(s)in e9&&e(u)}),D(n),R(()=>{K(n,`data-field-type`,z(s)),K(n,`data-key-path`,t.keyPath),K(n,`data-typed-key-path`,t.typedKeyPath)}),va(`keydown`,n,e=>{e.key===`Enter`&&(e.stopPropagation(),C())}),va(`click`,n,e=>{e.stopPropagation(),C()}),H(e,n)};W(ee,e=>{z(s)!==`hidden`&&z(u)&&(t.locale===z(v)||z(y)||z(b))&&e(te)}),H(e,w),k(),i()}var twe,nwe,rwe,M7=o((()=>{Z(),J(),Np(),$Ee(),N6(),KP(),$C(),twe=B(`<h4 class="svelte-s650n2"> </h4>`),nwe=B(`<section role="group" tabindex="0" class="svelte-s650n2"><!> <!></section>`),rwe={hash:`svelte-s650n2`,code:`[role='document'] section.svelte-s650n2 {overflow:hidden;margin:8px 0;padding:8px 0;h4:where(.svelte-s650n2) {color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);&:not(:last-child) {margin-bottom:8px;}}& > * {margin-inline:auto;max-width:768px;}p {margin:8px auto 0;-webkit-user-select:text;user-select:text;}img {max-height:800px !important;}}
989
989
 
990
990
  @media (width < 768px) {[role='document'] {& > section.svelte-s650n2:is([data-field-type='file']:where(.svelte-s650n2), [data-field-type='image']:where(.svelte-s650n2)):has(img),
@@ -1078,7 +1078,7 @@ Error generating stack: `+e.message+`
1078
1078
  &:focus-visible {opacity:1;}}}}`},ya([`pointerdown`,`keydown`])}));function jke(e,t){O(t,!0),G(e,Fke);let n=()=>j(TN,`$selectedEntryIdSet`,r),[r,i]=mn(),a=q(t,`showCheckbox`,3,!1),o=q(t,`onSelect`,3,void 0);var s=Pke(),c=I(s),l=e=>{ML(e,{class:`checkbox`,children:(e,r)=>{{let r=M(()=>n().has(t.entry.id));ZI(e,{role:`none`,tabindex:`-1`,get checked(){return z(r)},onChange:({detail:{checked:e}})=>{o()?.(e)}})}},$$slots:{default:!0}})};W(c,e=>{a()&&!(bE.isSmallScreen||bE.isMediumScreen)&&e(l)});var u=L(c,2),d=e=>{ML(e,{class:`image`,children:(e,n)=>{var r=V();Xa(I(r),()=>eI(t.collection,t.entry),null,(e,n)=>{var r=V(),i=I(r),a=e=>{{let r=M(()=>t.viewType===`list`?`icon`:`tile`);H6(e,{get src(){return z(n)},get variant(){return z(r)},cover:!0})}};W(i,e=>{z(n)&&e(a)}),H(e,r)}),H(e,r)},$$slots:{default:!0}})};W(u,e=>{t.collection._thumbnailFieldNames.length&&e(d)}),ML(L(u,2),{class:`title`,children:(e,n)=>{var r=Nke();mI(F(r),{lines:2,children:(e,n)=>{var r=Mke(),i=I(r);no(i,()=>Hh.current,e=>{var n=V();yo(I(n),()=>XP(t.collection,t.entry,{useTemplate:!0,allowMarkdown:!0})),H(e,n)});var a=L(i,2),o=e=>{{let n=M(()=>fw(t.collection)?.icon);oI(e,{get name(){return z(n)},class:`home`})}},s=M(()=>pw(t.collection,t.entry));W(a,e=>{z(s)&&e(o)}),H(e,r)},$$slots:{default:!0}}),D(r),H(e,r)},$$slots:{default:!0}}),H(e,s),k(),i()}var Mke,Nke,Pke,Fke,Ike=o((()=>{Z(),J(),X(),$(),U6(),AN(),mw(),nI(),ZP(),SE(),Mke=B(`<!> <!>`,1),Nke=B(`<div role="none" class="label svelte-b1f01"><!></div>`),Pke=B(`<!> <!> <!>`,1),Fke={hash:`svelte-b1f01`,code:`.label.svelte-b1f01 {.icon.home {opacity:0.5;font-size:20px;vertical-align:-4px;}}`}}));function Lke(e,t){O(t,!0);let n=()=>j(f8,`$listedEntries`,r),[r,i]=mn(),a=e=>{wN.update(n=>{let r=n.indexOf(t.entry);return e&&r===-1&&n.push(t.entry),!e&&r>-1&&n.splice(r,1),n})};{let r=M(()=>n().indexOf(t.entry));IL(e,{get"aria-rowindex"(){return z(r)},onChange:e=>{a(e.detail.selected)},onclick:()=>{S4(`/collections/${t.collection.name}/entries/${t.entry.subPath}`,{transitionType:`forwards`})},children:(e,n)=>{jke(e,{get collection(){return t.collection},get entry(){return t.entry},get viewType(){return t.viewType},showCheckbox:!0,onSelect:a})},$$slots:{default:!0}})}k(),i()}var Rke=o((()=>{Z(),J(),$(),Ike(),T4(),AN(),_8()}));function zke(e,t){O(t,!0);let n=()=>j(f8,`$listedEntries`,r),[r,i]=mn(),a=q(t,`dragging`,3,!1),o=q(t,`dropBefore`,3,!1),s=q(t,`dropAfter`,3,!1),c=q(t,`canMoveUp`,3,!1),l=q(t,`canMoveDown`,3,!1),u=q(t,`onDragStart`,3,void 0),d=q(t,`onDragOver`,3,void 0),f=q(t,`onDrop`,3,void 0),p=q(t,`onDragEnd`,3,void 0),m=q(t,`onMoveUp`,3,void 0),h=q(t,`onMoveDown`,3,void 0);{let r=M(()=>n().indexOf(t.entry)),i=M(()=>[a()&&`drag-source`,o()&&`drop-before`,s()&&`drop-after`].filter(Boolean).join(` `));IL(e,{get"aria-rowindex"(){return z(r)},get class(){return z(i)},draggable:!0,ondragstart:e=>{u()?.(),e.dataTransfer&&(e.dataTransfer.effectAllowed=`move`)},ondragover:e=>{e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`move`),d()?.(e.clientY,e.currentTarget.getBoundingClientRect())},ondrop:e=>{e.preventDefault(),f()?.()},ondragend:()=>{p()?.()},children:(e,n)=>{var r=k9(),i=I(r);jke(i,{get collection(){return t.collection},get entry(){return t.entry},get viewType(){return t.viewType}}),ML(L(i,2),{class:`reorder-actions`,children:(e,t)=>{var n=k9(),r=I(n);{let e=e=>{oI(e,{name:`arrow_upward`})},t=M(()=>!c()),n=M(()=>Y(`move_up`));wI(r,{variant:`ghost`,iconic:!0,get disabled(){return z(t)},get"aria-label"(){return z(n)},onclick:e=>{e.stopPropagation(),m()?.()},startIcon:e,$$slots:{startIcon:!0}})}var i=L(r,2);{let e=e=>{oI(e,{name:`arrow_downward`})},t=M(()=>!l()),n=M(()=>Y(`move_down`));wI(i,{variant:`ghost`,iconic:!0,get disabled(){return z(t)},get"aria-label"(){return z(n)},onclick:e=>{e.stopPropagation(),h()?.()},startIcon:e,$$slots:{startIcon:!0}})}H(e,n)},$$slots:{default:!0}}),H(e,r)},$$slots:{default:!0}})}k(),i()}var k9,Bke=o((()=>{Z(),J(),X(),$(),Ike(),_8(),k9=B(`<!> <!>`,1)}));function Vke(e,t){O(t,!0),G(e,Uke);let n=()=>j(g8,`$entryGroups`,r),[r,i]=mn(),a=N(br({})),o=N(``),s=N(void 0),c=N(void 0),l=(e=z(a))=>{l8.set(n().flatMap(({name:t,entries:n})=>e[t]??n))},u=(e,t,n)=>{if(t===n)return;let r=[...z(a)[e]??[]],[i]=r.splice(t,1);r.splice(n,0,i),z(a)[e]=r,u8.set(!0),l()};tc(()=>{let e=fw(t.collection)?.name,r=Object.fromEntries(n().map(({name:n,entries:r})=>[n,C6(e?r.filter(t=>t.slug!==e):r,t.collection)]));P(a,r,!0),l(r)});var d=Hke();uo(d,5,n,({name:e,entries:t})=>e,(e,n)=>{let r=()=>z(n).name,i=()=>z(n).entries;var l=V();Xa(I(l),Gw,null,e=>{{let n=M(()=>r()===`*`?void 0:r());DL(e,{get label(){return z(n)},children:(e,n)=>{let l=M(()=>z(a)[r()]??i());var d=V();uo(I(d),19,()=>z(l),e=>e.id,(e,n,i)=>{{let a=M(()=>z(s)===z(i)&&z(o)===r()),d=M(()=>z(c)===z(i)&&z(o)===r()&&z(s)!==z(i)&&z(s)!==z(i)-1),f=M(()=>z(c)===z(l).length&&z(i)===z(l).length-1&&z(o)===r()&&z(s)!==z(l).length-1),p=M(()=>z(i)>0),m=M(()=>z(i)<z(l).length-1);zke(e,{get collection(){return t.collection},get entry(){return z(n)},get viewType(){return t.viewType},get dragging(){return z(a)},get dropBefore(){return z(d)},get dropAfter(){return z(f)},get canMoveUp(){return z(p)},get canMoveDown(){return z(m)},onDragStart:()=>{P(o,r(),!0),P(s,z(i),!0)},onDragOver:(e,t)=>{P(o,r(),!0),P(c,e<t.top+t.height/2?z(i):z(i)+1,!0)},onDrop:()=>{z(s)!==void 0&&z(c)!==void 0&&z(c)!==z(s)&&z(c)!==z(s)+1&&u(r(),z(s),z(c)>z(s)?z(c)-1:z(c)),P(s,void 0),P(c,void 0)},onDragEnd:()=>{P(s,void 0),P(c,void 0)},onMoveUp:()=>{z(i)>0&&u(r(),z(i),z(i)-1)},onMoveDown:()=>{z(i)<z(l).length-1&&u(r(),z(i),z(i)+1)}})}}),H(e,d)},$$slots:{default:!0}})}}),H(e,l)}),D(d),H(e,d),k(),i()}var Hke,Uke,Wke=o((()=>{Z(),J(),$(),Kw(),rc(),Bke(),mw(),T6(),_8(),Hke=B(`<div role="none" class="wrapper svelte-1txp9gj"></div>`),Uke={hash:`svelte-1txp9gj`,code:`.wrapper.svelte-1txp9gj {.grid-row.drag-source {opacity:0.4;cursor:grabbing;}.grid-row[draggable='true']:not(.drag-source) {cursor:grab;}.grid-row.drop-before .grid-cell {border-top:3px solid var(--sui-primary-accent-color) !important;}.grid-row.drop-after .grid-cell {border-bottom:3px solid var(--sui-primary-accent-color) !important;}}`}}));function Gke(e,t){O(t,!0);let n=()=>j(mC,`$allEntries`,a),r=()=>j(ew,`$selectedCollection`,a),i=()=>j(p8,`$collectionState`,a),[a,o]=mn(),s=q(t,`label`,3,void 0),c=q(t,`keyShortcuts`,3,void 0),l=M(()=>n()&&r()?kN(r()):!1),u=M(()=>Hh.current&&r()?fw(r())?.label:``),d=M(()=>z(l)?Gse:wI),f=(e=!1)=>{S4(`/collections/${t.collectionName}/new`,{state:{index:e},transitionType:`forwards`})};var p=V(),m=I(p);{let e=e=>{oI(e,{name:`edit`})},t=e=>{var t=V(),n=I(t),r=e=>{iR(e,{children:(e,t)=>{var n=Kke(),r=I(n);{let e=M(()=>Y(`entry`));lR(r,{get label(){return z(e)},onclick:()=>f()})}lR(L(r,2),{get label(){return z(u)},onclick:()=>f(!0)}),H(e,n)},$$slots:{default:!0}})};W(n,e=>{z(l)&&e(r)}),H(e,t)},n=M(()=>!s()),r=M(()=>Y(`create_new_entry`));To(m,()=>z(d),(a,o)=>{o(a,{variant:`primary`,get iconic(){return z(n)},get disabled(){return i().creationDisabled},get label(){return s()},get"aria-label"(){return z(r)},get keyShortcuts(){return c()},onclick:()=>f(),startIcon:e,popup:t,$$slots:{startIcon:!0,popup:!0}})})}H(e,p),k(),o()}var Kke,qke=o((()=>{Z(),J(),X(),$(),T4(),vC(),dw(),AN(),mw(),_8(),Kke=B(`<!> <!>`,1)}));function Jke(e,t){O(t,!0);let n=()=>j(ew,`$selectedCollection`,s),r=()=>j(c8,`$reordering`,s),i=()=>j(s8,`$currentView`,s),a=()=>j(g8,`$entryGroups`,s),o=()=>j(f8,`$listedEntries`,s),[s,c]=mn(),l=M(n),u=M(()=>r()?`list`:i().type),d=M(()=>a().flatMap(({entries:e})=>e));{let t=M(()=>Y(`entry_list`));q6(e,{get"aria-label"(){return z(t)},children:(e,t)=>{var n=V(),i=I(n),s=e=>{var t=V(),n=I(t),i=e=>{let t=M(()=>{let{defaultLocale:e}=z(l)._i18n;return{defaultLocale:e}});{let n=M(()=>Y(`entries`));Y6(e,{get viewType(){return z(u)},id:`entry-list`,get"aria-label"(){return z(n)},get"aria-rowcount"(){return o().length},children:(e,n)=>{var i=V(),o=I(i),s=e=>{Vke(e,{get collection(){return z(l)},get viewType(){return z(u)}})},c=e=>{var n=V();uo(I(n),1,a,({name:e,entries:t})=>e,(e,n)=>{let r=()=>z(n).name,i=()=>z(n).entries;var a=V();Xa(I(a),Gw,null,e=>{{let n=M(()=>r()===`*`?void 0:r());DL(e,{get label(){return z(n)},children:(e,n)=>{{let n=(e,t=E)=>{var n=V();Xa(I(n),Gw,null,e=>{Lke(e,{get collection(){return z(l)},get entry(){return t()},get viewType(){return z(u)}})}),H(e,n)},r=M(()=>i().filter(({locales:e})=>!!(e[z(t).defaultLocale]??Object.values(e)[0])?.content));GR(e,{get items(){return z(r)},itemKey:`id`,renderItem:n,$$slots:{renderItem:!0}})}},$$slots:{default:!0}})}}),H(e,a)}),H(e,n)};W(o,e=>{r()?e(s):e(c,-1)}),H(e,i)},$$slots:{default:!0}})}},s=e=>{k2(e,{children:(e,t)=>{var n=A9(),r=F(n,!0);D(n),R(e=>U(r,e),[()=>Y(`no_entries_found`)]),H(e,n)},$$slots:{default:!0}})},c=e=>{k2(e,{children:(e,t)=>{var n=Yke(),r=I(n),i=F(r,!0);D(r);var a=L(r,2);{let e=M(()=>Y(`create_new_entry`));Gke(a,{get collectionName(){return z(l).name},get label(){return z(e)}})}R(e=>U(i,e),[()=>Y(`no_entries_created`)]),H(e,n)},$$slots:{default:!0}})};W(n,e=>{z(d).length?e(i):o().length?e(s,1):e(c,-1)}),H(e,t)},c=e=>{k2(e,{children:(e,t)=>{var n=A9(),r=F(n,!0);D(n),R(e=>U(r,e),[()=>Y(`collection_not_found`)]),H(e,n)},$$slots:{default:!0}})};W(i,e=>{z(l)?e(s):e(c,-1)}),H(e,n)},$$slots:{default:!0}})}k(),c()}var A9,Yke,Xke=o((()=>{Z(),J(),X(),$(),Kw(),J6(),X6(),Rke(),Wke(),qke(),dw(),_8(),A9=B(`<span role="none"> </span>`),Yke=B(`<span role="none"> </span> <!>`,1)}));function Zke(e,t){O(t,!0),G(e,eAe);let n=()=>j(ew,`$selectedCollection`,r),[r,i]=mn(),a=M(()=>n()?.files.filter(yC)??[]);{let t=M(()=>Y(`file_list`));q6(e,{get"aria-label"(){return z(t)},children:(e,t)=>{var r=V(),i=I(r),o=e=>{{let t=M(()=>Y(`files`));Y6(e,{viewType:`list`,get"aria-label"(){return z(t)},get"aria-rowcount"(){return z(a).length},children:(e,t)=>{GR(e,{get items(){return z(a)},itemKey:`name`,renderItem:(e,t)=>{let r=()=>(t?.()).name,i=()=>(t?.()).label,a=()=>(t?.()).icon;var o=V();Xa(I(o),Gw,null,e=>{IL(e,{onclick:()=>{S4(`/collections/${n()?.name}/entries/${r()}`,{transitionType:`forwards`})},children:(e,t)=>{ML(e,{class:`title`,children:(e,t)=>{var n=Qke(),o=F(n),s=e=>{oI(e,{get name(){return a()}})};W(o,e=>{a()&&e(s)}),mI(L(o,2),{lines:2,children:(e,t)=>{gt();var n=ja();R(()=>U(n,i()||r())),H(e,n)},$$slots:{default:!0}}),D(n),H(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}})}),H(e,o)},$$slots:{renderItem:!0}})},$$slots:{default:!0}})}},s=e=>{k2(e,{children:(e,t)=>{var n=$ke(),r=F(n,!0);D(n),R(e=>U(r,e),[()=>Y(`no_files_in_collection`)]),H(e,n)},$$slots:{default:!0}})};W(i,e=>{z(a)?.length?e(o):e(s,-1)}),H(e,r)},$$slots:{default:!0}})}k(),i()}var Qke,$ke,eAe,tAe=o((()=>{Z(),J(),X(),$(),Kw(),J6(),X6(),T4(),dw(),EC(),Qke=B(`<div role="none" class="label svelte-1nfjp1"><!> <!></div>`),$ke=B(`<span role="none"> </span>`),eAe={hash:`svelte-1nfjp1`,code:`.label.svelte-1nfjp1 {display:flex;align-items:center;gap:16px;.icon {display:flex;align-items:center;justify-content:center;border-radius:var(--sui-control-medium-border-radius);width:var(--icon-size);height:var(--icon-size);background-color:var(--sui-secondary-background-color);}}`}}));function nAe(e,t){O(t,!0),G(e,iAe);let[n,r]=mn(),i=M(()=>t.file.name),a=M(()=>t.file.label),o=M(()=>t.file.icon),s=N(!1),c=N(void 0);var l=rAe(),u=F(l);{let e=e=>{{let t=M(()=>z(o)||`edit_document`);oI(e,{get name(){return z(t)}})}},t=M(()=>z(a)||z(i));QL(u,{get label(){return z(t)},onSelect:()=>{pn(_4,Y(`singleton_selected_announcement`,{values:{file:z(a)||z(i)}}))},onclick:()=>{S4(`/collections/_singletons/entries/${z(i)}`,{transitionType:`forwards`}),P(s,!1),z(c)?.querySelector(`[role="option"]`)?.classList.remove(`focused`)},get selected(){return z(s)},set selected(e){P(s,e,!0)},startIcon:e,$$slots:{startIcon:!0}})}D(l),Rs(l,e=>P(c,e),()=>z(c)),H(e,l),k(),r()}var rAe,iAe,aAe=o((()=>{Z(),J(),X(),$(),T4(),rAe=B(`<div class="wrapper svelte-w0jevb"><!></div>`),iAe={hash:`svelte-w0jevb`,code:`.wrapper.svelte-w0jevb {display:contents;}`}}));function oAe(e,t){O(t,!0);let n=()=>j(SA,`$backend`,a),r=()=>j(CA,`$isLastCommitPublished`,a),i=()=>j(s6,`$skipCIConfigured`,a),[a,o]=mn(),s=M(()=>qO.deployHookURL),c=M(()=>qO.deployHookAuthHeader),l=M(()=>n()?.triggerDeployment),u=M(()=>(!!z(s)||typeof z(l)==`function`)&&!r()),d=N(`info`),f=N(!1),p=async()=>{P(d,`info`),P(f,!0);try{if(z(s)&&!LD(z(s)))throw Error(`Deploy hook URL must use HTTPS or localhost`);let{ok:e,status:t}=z(s)?await fetch(z(s),{method:`POST`,mode:z(c)?`cors`:`no-cors`,headers:z(c)?{Authorization:z(c)}:{}}):await z(l)?.()??{};if(!e&&(z(c)||t!==0))throw Error(`Webhook returned ${t} error`);pn(CA,!0)}catch(e){P(d,`error`),P(f,!0),console.error(e)}};var m=V(),h=I(m),g=e=>{var t=sAe(),n=I(t);{let e=M(()=>bE.isSmallScreen?`small`:`medium`),t=M(()=>Y(`publish_changes`)),r=M(()=>!z(u));wI(n,{variant:`secondary`,get size(){return z(e)},get label(){return z(t)},get disabled(){return z(r)},onclick:()=>p()})}Bz(L(n,2),{get show(){return z(f)},set show(e){P(f,e,!0)},children:(e,t)=>{cI(e,{get status(){return z(d)},children:(e,t)=>{gt();var n=ja();R(e=>U(n,e),[()=>Y(z(d)===`error`?`publishing_changes_failed`:`publishing_changes`)]),H(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}}),H(e,t)};W(h,e=>{i()&&e(g)}),H(e,m),k(),o()}var sAe,cAe=o((()=>{Z(),J(),X(),$(),wA(),l6(),SE(),JO(),zD(),sAe=B(`<!> <!>`,1)}));function lAe(e,t){O(t,!0);let n=()=>j(TF,`$cmsConfig`,a),r=()=>j(ew,`$selectedCollection`,a),i=()=>j(mC,`$allEntries`,a),[a,o]=mn(),s=q(t,`isSearchPage`,3,!1),c=M(()=>Intl.NumberFormat(Hh.current)),l=M(()=>n()?.collections?.filter(({hide:e})=>!e)??[]),u=M(()=>n()?.singletons??[]);var d=fAe(),f=F(d),p=e=>{var t=uAe(),n=I(t),r=F(n),i=F(r,!0);D(r),oAe(L(r,2),{}),D(n),e8(L(n,2),{onclick:e=>{e.preventDefault(),S4(`/search`)}}),R(e=>U(i,e),[()=>Y(`contents`)]),H(e,t)};W(f,e=>{bE.isSmallScreen&&e(p)});var m=L(f,2);{let e=M(()=>Y(`collection_list`));UL(m,{get"aria-label"(){return z(e)},"aria-controls":`collection-container`,children:(e,t)=>{var n=dAe(),a=I(n),o=e=>{{let t=M(()=>Y(`collections`));JL(e,{get label(){return z(t)},children:(e,t)=>{var n=V();uo(I(n),19,()=>z(l),(e,t)=>e.name??t,(e,t)=>{var n=V();Xa(I(n),Gw,null,e=>{var n=V(),a=I(n),o=e=>{let n=M(()=>{let{name:e,label:n,icon:r}=z(t);return{name:e,label:n,icon:r}});{let a=e=>{{let t=M(()=>z(n).icon||`bookmark_manager`);oI(e,{get name(){return z(t)}})}},o=e=>{var r=V();no(I(r),i,e=>{let r=M(()=>(`files`in z(t)?z(t).files:EN(z(n).name)).length);var i=j9(),a=F(i,!0);D(i),R((e,t)=>{K(i,`aria-label`,`(${e??``})`),U(a,t)},[()=>Y(`x_entries`,{values:{count:z(r)}}),()=>z(c).format(z(r))]),H(e,i)}),H(e,r)},l=M(()=>z(n).label||z(n).name),u=M(()=>bE.isSmallScreen||s()?!1:r()?.name===z(n).name);QL(e,{get label(){return z(l)},get selected(){return z(u)},onSelect:()=>{S4(`/collections/${z(n).name}`,{transitionType:`forwards`})},startIcon:a,endIcon:o,$$slots:{startIcon:!0,endIcon:!0}})}},l=e=>{RI(e,{})};W(a,e=>{`divider`in z(t)?z(t).divider&&e(l,1):e(o)}),H(e,n)}),H(e,n)}),H(e,n)},$$slots:{default:!0}})}};W(a,e=>{z(l).length&&e(o)});var d=L(a,2),f=e=>{var t=V(),n=I(t),i=e=>{{let t=M(()=>Y(`files`));JL(e,{get label(){return z(t)},children:(e,t)=>{var n=V();uo(I(n),19,()=>z(u),(e,t)=>e.name??t,(e,t)=>{var n=V();Xa(I(n),Gw,null,e=>{var n=V(),r=I(n),i=e=>{nAe(e,{get file(){return z(t)}})},a=e=>{RI(e,{})};W(r,e=>{`divider`in z(t)?z(t).divider&&e(a,1):e(i)}),H(e,n)}),H(e,n)}),H(e,n)},$$slots:{default:!0}})}},a=e=>{let t=M(()=>z(u).length);{let n=M(()=>Y(`collections`));JL(e,{get label(){return z(n)},children:(e,n)=>{{let n=e=>{oI(e,{name:`bookmark_manager`})},i=e=>{var n=j9(),r=F(n,!0);D(n),R((e,t)=>{K(n,`aria-label`,`(${e??``})`),U(r,t)},[()=>Y(`x_entries`,{values:{count:z(t)}}),()=>z(c).format(z(t))]),H(e,n)},a=M(()=>Y(`files`)),o=M(()=>r()?.name===`_singletons`);QL(e,{get label(){return z(a)},get selected(){return z(o)},onSelect:()=>{S4(`/collections/_singletons`,{transitionType:`forwards`})},startIcon:n,endIcon:i,$$slots:{startIcon:!0,endIcon:!0}})}},$$slots:{default:!0}})}};W(n,e=>{bE.isSmallScreen||z(l).length?e(i):e(a,-1)}),H(e,t)};W(d,e=>{z(u).length&&e(f)}),H(e,n)},$$slots:{default:!0}})}D(d),H(e,d),k(),o()}var uAe,j9,dAe,fAe,pAe=o((()=>{Z(),J(),X(),$(),Kw(),aAe(),cAe(),t8(),T4(),AF(),vC(),dw(),AN(),SE(),uAe=B(`<header><h2> </h2> <!></header> <!>`,1),j9=B(`<span class="count"> </span>`),dAe=B(`<!> <!>`,1),fAe=B(`<div role="none" class="primary-sidebar"><!> <!></div>`)}));function mAe(e,t){O(t,!0);let n=()=>j(u8,`$reorderDirty`,a),r=()=>j(ew,`$selectedCollection`,a),i=()=>j(l8,`$reorderedEntries`,a),[a,o]=mn(),s=N(!1),c=N(!1);var l=hAe(),u=I(l);{let e=M(()=>Y(`done`)),t=M(()=>Y(`done_reordering_entries`)),a=M(()=>z(s)||!n());wI(u,{variant:`primary`,get label(){return z(e)},get"aria-label"(){return z(t)},get disabled(){return z(a)},onclick:async()=>{let e=r();P(s,!0);try{await dme(e,i()),pn(c8,!1)}catch(e){console.error(e),P(c,!0)}P(s,!1)}})}var d=L(u,2);{let e=M(()=>Y(`cancel`)),t=M(()=>Y(`cancel_reordering_entries`));wI(d,{variant:`secondary`,get label(){return z(e)},get"aria-label"(){return z(t)},get disabled(){return z(s)},onclick:()=>{pn(c8,!1)}})}Bz(L(d,2),{get show(){return z(c)},set show(e){P(c,e,!0)},children:(e,t)=>{cI(e,{status:`error`,children:(e,t)=>{gt();var n=ja();R(e=>U(n,e),[()=>Y(`saving_reorder_failed`)]),H(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}}),H(e,l),k(),o()}var hAe,gAe=o((()=>{Z(),J(),X(),$(),dw(),T6(),_8(),hAe=B(`<!> <!> <!>`,1)}));function _Ae(e,t){O(t,!0);let n=()=>j(ew,`$selectedCollection`,a),r=()=>j(wN,`$selectedEntries`,a),i=()=>j(f8,`$listedEntries`,a),[a,o]=mn(),s=q(t,`open`,15,!1),c=M(()=>{let e=n()?.name;return r().length&&e&&rm({collectionName:e})?.entryRelative?r().flatMap(t=>tI({entry:t,collectionName:e,relative:!0})):[]});{let t=M(()=>Y(`delete_entries`,{values:{count:r().length}})),n=M(()=>Y(`delete`));pL(e,{get title(){return z(t)},get okLabel(){return z(n)},onOk:()=>{C9(r(),z(c))},get open(){return s()},set open(e){s(e)},children:(e,t)=>{let n=M(()=>r().length>1&&r().length===i().length);gt();var a=ja();R(e=>U(a,e),[()=>Y(z(c).length?z(n)?`confirm_deleting_all_entries_with_assets`:`confirm_deleting_selected_entries_with_assets`:z(n)?`confirm_deleting_all_entries`:`confirm_deleting_selected_entries`,{values:{count:r().length}})]),H(e,a)},$$slots:{default:!0}})}k(),o()}var vAe=o((()=>{Z(),J(),X(),$(),cm(),dw(),tke(),AN(),_8(),nI()}));function yAe(e,t){O(t,!0),G(e,wAe);let n=()=>j(ew,`$selectedCollection`,s),r=()=>j(p8,`$collectionState`,s),i=()=>j(c8,`$reordering`,s),a=()=>j(wN,`$selectedEntries`,s),o=()=>j(f8,`$listedEntries`,s),[s,c]=mn(),l=N(!1),u=e=>ux(Sx.parseInline(e),{ALLOWED_TAGS:[`strong`,`em`,`del`,`code`,`a`],ALLOWED_ATTR:[`href`]}),d=M(()=>n()?.name??``),f=M(()=>n()?.description),p=M(()=>Hh.current&&n()?lw(n()):z(d)),m=M(()=>r().isEntryCollection),h=M(()=>r().canCreate),g=M(()=>r().canDelete),_=M(()=>r().canReorder),v=M(()=>r().quota),y=M(()=>r().remaining),b=M(()=>r().nearingQuota),x=M(()=>r().creationDisabled);var S=M9(),C=I(S),w=e=>{var t=M9(),n=I(t);{let e=M(()=>Y(`collection`));H0(n,{variant:`primary`,get"aria-label"(){return z(e)},children:(e,t)=>{var n=SAe(),r=I(n),s=e=>{{let t=M(()=>Y(`back_to_collection_list`));$3(e,{get"aria-label"(){return z(t)},onclick:()=>{C4(`/collections`)}})}};W(r,e=>{bE.isSmallScreen&&e(s)});var c=L(r,2),h=F(c,!0);D(c);var v=L(c,2),y=e=>{UI(e,{flex:!0})},b=e=>{var t=bAe();mI(F(t),{children:(e,t)=>{var n=V();yo(I(n),()=>u(z(f)||``)),H(e,n)},$$slots:{default:!0}}),D(t),H(e,t)};W(v,e=>{bE.isSmallScreen?e(y):e(b,-1)});var S=L(v,2),C=e=>{mAe(e,{})},w=e=>{var t=xAe(),n=I(t),r=e=>{{let t=M(()=>Y(`delete`)),n=M(()=>Y(`delete_selected_entries`,{values:{count:a().length}})),r=M(()=>!a().length||!z(g));wI(e,{variant:`ghost`,get label(){return z(t)},get"aria-label"(){return z(n)},get disabled(){return z(r)},onclick:()=>{P(l,!0)}})}};W(n,e=>{bE.isSmallScreen||e(r)});var i=L(n,2),s=e=>{{let t=M(()=>Y(`reorder`)),n=M(()=>Y(`reorder_entries`)),r=M(()=>!o().length);wI(e,{variant:`ghost`,get label(){return z(t)},get"aria-label"(){return z(n)},get disabled(){return z(r)},onclick:()=>{pn(c8,!0)}})}};W(i,e=>{z(_)&&e(s)}),kse(L(i,2),{children:(e,t)=>{var n=V(),r=I(n),i=e=>{{let t=M(()=>bE.isSmallScreen?void 0:Y(`create`));Gke(e,{get collectionName(){return z(d)},get label(){return z(t)},keyShortcuts:`Accel+E`})}};W(r,e=>{(!bE.isSmallScreen||o().length&&!z(x))&&e(i)}),H(e,n)},$$slots:{default:!0}}),H(e,t)};W(S,e=>{z(m)&&i()?e(C):z(m)&&e(w,1)}),R(()=>U(h,z(p))),H(e,n)},$$slots:{default:!0}})}var r=L(n,2),s=e=>{var t=CAe(),n=I(t);ao(n,()=>({"--sui-infobar-border-width":`1px 0`,"--sui-infobar-message-justify-content":`center`})),DI(n.lastChild,{dismissible:!1,children:(e,t)=>{var n=V(),r=I(n),i=e=>{var t=ja();R(e=>U(t,e),[()=>Y(`creating_entries_disabled_by_admin`)]),H(e,t)},a=e=>{var t=ja();R(e=>U(t,e),[()=>Y(`creating_entries_disabled_by_quota`,{values:{quota:z(v)}})]),H(e,t)},o=e=>{var t=ja();R(e=>U(t,e),[()=>Y(`creating_entries_nearing_quota`,{values:{quota:z(v),remaining:z(y)}})]),H(e,t)};W(r,e=>{z(h)?z(x)?e(a,1):z(b)&&e(o,2):e(i)}),H(e,n)},$$slots:{default:!0}}),D(n),H(e,t)};W(r,e=>{z(m)&&(z(x)||z(b))&&e(s)}),H(e,t)};W(C,e=>{n()&&e(w)}),_Ae(L(C,2),{get open(){return z(l)},set open(e){P(l,e,!0)}}),H(e,S),k(),c()}var bAe,xAe,SAe,CAe,M9,wAe,TAe=o((()=>{Z(),J(),X(),$(),dx(),GS(),e6(),gAe(),vAe(),qke(),T4(),dw(),AN(),_8(),SE(),bAe=B(`<div role="none" class="description svelte-83jnuc"><!></div>`),xAe=B(`<!> <!> <!>`,1),SAe=B(`<!> <h2 role="none" class="svelte-83jnuc"> </h2> <!> <!>`,1),CAe=B(`<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>`,1),M9=B(`<!> <!>`,1),wAe={hash:`svelte-83jnuc`,code:`h2.svelte-83jnuc {flex:none !important;}.description.svelte-83jnuc {flex:auto;font-size:var(--sui-font-size-small);opacity:0.8;}`}}));function EAe(e,t){O(t,!0);let n=()=>j(ew,`$selectedCollection`,a),r=()=>j(LF,`$allAssets`,a),i=()=>j(s8,`$currentView`,a),[a,o]=mn(),s=M(()=>rm({collectionName:n()?.name})),c=M(()=>z(s)?r().filter(e=>XF(e,z(s))):[]),l=M(()=>z(s)??{internalPath:void 0,entryRelative:!1,hasTemplateTags:!1}),u=M(()=>z(l).internalPath),d=M(()=>z(l).entryRelative),f=M(()=>z(l).hasTemplateTags),p=M(()=>z(d)||z(f));var m=V(),h=I(m),g=e=>{{let t=M(()=>Y(`collection_assets`));M2(e,{id:`collection-assets`,class:`secondary-sidebar`,get"aria-label"(){return z(t)},children:(e,t)=>{G6(e,{get disabled(){return z(p)},multiple:!0,onDrop:({files:e})=>{pn(WF,{folder:z(s),files:e})},children:(e,t)=>{gxe(e,{get assets(){return z(c)},onSelect:({asset:e})=>{S4(`/assets/${e.path}`,{transitionType:`forwards`})}})},$$slots:{default:!0}})},$$slots:{default:!0}})}};W(h,e=>{z(u)!==void 0&&bE.isLargeScreen&&i().showMedia&&e(g)}),H(e,m),k(),o()}var DAe=o((()=>{Z(),J(),X(),$(),xxe(),K6(),T4(),$F(),cm(),dw(),_8(),SE()}));function OAe(e,t){O(t,!0);let n=()=>j(t.currentView,`$currentView`,r),[r,i]=mn(),a=q(t,`label`,3,``),o=q(t,`disabled`,3,!1),s=q(t,`noneLabel`,3,``),c=q(t,`groups`,19,()=>[]);{let r=e=>{{let r=M(()=>Y(`grouping_options`));iR(e,{get"aria-label"(){return z(r)},get"aria-controls"(){return t[`aria-controls`]},children:(e,r)=>{var i=kAe(),a=I(i);{let e=M(()=>s()||Y(`sort_keys.none`)),r=M(()=>!n().group);yR(a,{get label(){return z(e)},get checked(){return z(r)},onSelect:()=>{t.currentView.update(e=>({...e,group:null}))}})}uo(L(a,2),17,c,e=>`${e.field}|${String(e.pattern)}`,(e,r)=>{let i=M(()=>{let{label:e,field:t,pattern:n}=z(r);return{_label:e,field:t,pattern:n}});{let r=M(()=>n().group?.field===z(i).field&&String(n().group.pattern)===String(z(i).pattern));yR(e,{get label(){return z(i)._label},get checked(){return z(r)},onSelect:()=>{t.currentView.update(e=>({...e,group:{field:z(i).field,pattern:z(i).pattern}}))}})}}),H(e,i)},$$slots:{default:!0}})}},i=M(()=>a()||Y(`group`));PI(e,{variant:`ghost`,get label(){return z(i)},get disabled(){return o()},popupPosition:`bottom-right`,popup:r,$$slots:{popup:!0}})}k(),i()}var kAe,AAe=o((()=>{Z(),J(),X(),$(),kAe=B(`<!> <!>`,1)}));function jAe(e,t){O(t,!0);let n=()=>j(ew,`$selectedCollection`,u),r=()=>j(f8,`$listedEntries`,u),i=()=>j(c8,`$reordering`,u),a=()=>j(g8,`$entryGroups`,u),o=()=>j(mge,`$sortKeys`,u),s=()=>j(Uhe,`$viewFilters`,u),c=()=>j(Jhe,`$viewGroups`,u),l=()=>j(s8,`$currentView`,u),[u,d]=mn(),f=M(()=>n()?._type===`entry`?n():void 0),p=M(()=>z(f)?.name),m=M(()=>z(f)?._thumbnailFieldNames??[]),h=M(()=>!!r().length),g=M(()=>r().length>1);var _=V(),v=I(_),y=e=>{{let t=M(()=>Y(`entry_list`));H0(e,{variant:`secondary`,get"aria-label"(){return z(t)},children:(e,t)=>{var n=NAe(),r=I(n),i=e=>{{let t=M(()=>a().flatMap(({entries:e})=>e));Ahe(e,{get allItems(){return z(t)},get selectedItems(){return wN}})}};W(r,e=>{bE.isSmallScreen||bE.isMediumScreen||e(i)});var u=L(r,2);UI(u,{flex:!0});var d=L(u,2);{let e=M(()=>!z(g)||!o().length);hge(d,{get disabled(){return z(e)},get currentView(){return s8},get sortKeys(){return o()},get collectionName(){return z(p)},"aria-controls":`entry-list`})}var f=L(d,2),_=e=>{{let t=M(()=>!z(g));Dhe(e,{get disabled(){return z(t)},get currentView(){return s8},get filters(){return s()},multiple:!0,"aria-controls":`entry-list`})}};W(f,e=>{s()?.length&&e(_)});var v=L(f,2),y=e=>{{let t=M(()=>!z(g));OAe(e,{get disabled(){return z(t)},get currentView(){return s8},get groups(){return c()},"aria-controls":`entry-list`})}};W(v,e=>{c()?.length&&e(y)});var b=L(v,2),x=e=>{{let t=M(()=>!z(h));C8(e,{get disabled(){return z(t)},get currentView(){return s8},"aria-controls":`entry-list`})}};W(b,e=>{z(m).length&&e(x)});var S=L(b,2),C=e=>{var t=MAe(),n=I(t);RI(n,{orientation:`vertical`});var r=L(n,2);{let e=e=>{oI(e,{name:`photo_library`})},t=M(()=>!z(h)||!rm({collectionName:z(p)})),n=M(()=>!!l().showMedia),i=M(()=>Y(l().showMedia?`hide_assets`:`show_assets`));wI(r,{variant:`ghost`,iconic:!0,get disabled(){return z(t)},get pressed(){return z(n)},"aria-controls":`collection-assets`,get"aria-expanded"(){return l().showMedia},get"aria-label"(){return z(i)},onclick:()=>{s8.update(e=>({...e,showMedia:!l().showMedia}))},startIcon:e,$$slots:{startIcon:!0}})}H(e,t)};W(S,e=>{bE.isSmallScreen||bE.isMediumScreen||e(C)}),H(e,n)},$$slots:{default:!0}})}};W(v,e=>{z(f)&&!i()&&e(y)}),H(e,_),k(),d()}var MAe,NAe,PAe=o((()=>{Z(),J(),X(),$(),khe(),AAe(),Phe(),_ge(),w8(),cm(),dw(),AN(),_8(),Whe(),Yhe(),S8(),SE(),MAe=B(`<!> <!>`,1),NAe=B(`<!> <!> <!> <!> <!> <!> <!>`,1)}));function FAe(e,t){O(t,!0);let n=()=>j(ew,`$selectedCollection`,o),r=()=>j(a4,`$showContentOverlay`,o),i=()=>j(f8,`$listedEntries`,o),a=()=>j(N3,`$contentUpdatesToast`,o),[o,s]=mn(),c=/^\/collections(?:\/(?<_collectionName>[^/]+)(?:\/(?<routeType>new|entries))?(?:\/(?<subPath>.+?))?)?$/,l=N(!1),u=N(!1),d=N(void 0),f=M(()=>`files`in(n()??{})?Zke:Jke),p=()=>{let{path:e,params:t}=v4(),r=e.match(c);if(P(l,!1),P(u,!1),P(d,t._locale,!0),delete t._locale,n()?.name===`_singletons`&&aw().length&&pn(ew,void 0),!r?.groups){pn(a4,!1),P(u,P8(e),!0);return}let{_collectionName:a,routeType:o,subPath:s}=r.groups;if(!a){bE.isSmallScreen?(pn(ew,void 0),pn(a4,!1),pn(_4,Y(`viewing_collection_list`)),P(l,!0)):S4(`/collections/${(n()||Gre()||sw())?.name}`,{replaceState:!0});return}let f=cw(a);if(!f||f.hide?pn(ew,void 0):n()?.name!==f.name&&pn(ew,f),!f||!n()){pn(a4,!1),pn(_4,Y(`collection_not_found`));return}let{name:p}=n(),m=lw(n()),h=`_fileMap`in n()?n()._fileMap:void 0;if(!o){pn(a4,!1),pn(_4,Y(`viewing_x_collection`,{values:{collection:m,count:i().length}}));return}if(pn(a4,!0),h){if(o===`entries`&&s){let e=wC(p,s),t=h[s];T9(e?{collection:f,collectionFile:t,originalEntry:e}:{collection:f,collectionFile:t,originalEntry:{slug:t.name,locales:Object.fromEntries(t._i18n.initialLocales.map(e=>[e,{}]))}}),pn(_4,Y(`edit_${f._type}_announcement`,{values:{collection:m,file:SC(t)}}))}}else if(o===`new`&&!s&&(T9({collection:f,dynamicValues:t,isIndexFile:!!window.history.state?.index}),pn(_4,Y(`create_entry_announcement`,{values:{collection:m}}))),o===`entries`&&s){let e=i().find(e=>e.subPath===s);e&&Hh.current&&(T9({collection:f,originalEntry:e}),pn(_4,Y(`edit_entry_announcement`,{values:{collection:m,entry:XP(n(),e)}})))}};tc(()=>(p(),()=>{pn(a4,!1)}));var m=IAe();_a(`hashchange`,Nr,e=>{x4(e,p,c)});var h=I(m);{let e=e=>{var t=V(),n=I(t),r=e=>{lAe(e,{get isSearchPage(){return z(u)}})};W(n,e=>{(!bE.isSmallScreen||z(l))&&e(r)}),H(e,t)},t=e=>{var t=V(),r=I(t),a=e=>{M8(e,{})},o=e=>{{let t=e=>{yAe(e,{})},r=e=>{var t=V(),r=I(t),a=e=>{jAe(e,{})};W(r,e=>{n()?._type===`entry`&&i().length&&e(a)}),H(e,t)},a=e=>{var t=V();To(I(t),()=>z(f),(e,t)=>{t(e,{})}),H(e,t)},o=e=>{EAe(e,{})},s=M(()=>Y(`x_collection`,{values:{collection:Hh.current&&n()?lw(n()):``}})),c=M(()=>n()?.description);T8(e,{get"aria-label"(){return z(s)},get"aria-description"(){return z(c)},primaryToolbar:t,secondaryToolbar:r,mainContent:a,secondarySidebar:o,$$slots:{primaryToolbar:!0,secondaryToolbar:!0,mainContent:!0,secondarySidebar:!0}})}};W(r,e=>{z(u)?e(a):(!bE.isSmallScreen||!z(l))&&e(o,1)}),H(e,t)},r=M(()=>Y(`content_library`));D8(h,{uiSettingsKey:`contents-page`,get"aria-label"(){return z(r)},primarySidebar:e,main:t,$$slots:{primarySidebar:!0,main:!0}})}var g=L(h,2),_=e=>{Cke(e,{get editorLocale(){return z(d)}})};W(g,e=>{r()&&e(_)});var v=L(g,2);Bz(v,{get show(){return a().saved},set show(e){gn(N3,zi(a).saved=e,zi(a))},children:(e,t)=>{cI(e,{status:`success`,children:(e,t)=>{gt();var n=ja();R(e=>U(n,e),[()=>Y(a().published?`entry_saved_and_published`:`entry_saved`,{values:{count:a().count}})]),H(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}}),Bz(L(v,2),{get show(){return a().deleted},set show(e){gn(N3,zi(a).deleted=e,zi(a))},children:(e,t)=>{cI(e,{status:`success`,children:(e,t)=>{gt();var n=ja();R(e=>U(n,e),[()=>Y(`entries_deleted`,{values:{count:a().count}})]),H(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}}),H(e,m),k(),s()}var IAe,LAe=o((()=>{Z(),J(),X(),$(),rc(),E8(),O8(),Ake(),Xke(),tAe(),pAe(),TAe(),DAe(),PAe(),N8(),T4(),dw(),P3(),EC(),_8(),E9(),f4(),ZP(),m_e(),SE(),IAe=B(`<!> <!> <!> <!>`,1)}));function RAe(e,t){O(t,!0);{let t=M(()=>Y(`prefs.i18n.translators.default.select_service`));sz(e,{get"aria-label"(){return z(t)},get value(){return qO.defaultTranslationService},onChange:e=>{qO.defaultTranslationService=e.detail.value},children:(e,t)=>{var n=V();uo(I(n),17,()=>Object.entries(b5),([e,{serviceLabel:t}])=>e,(e,t)=>{var n=M(()=>ee(z(t),2));let r=()=>z(n)[0],i=()=>z(n)[1].serviceLabel;{let t=M(()=>r()===qO.defaultTranslationService);QL(e,{get label(){return i()},get value(){return r()},get selected(){return z(t)}})}}),H(e,n)},$$slots:{default:!0}})}k()}var zAe=o((()=>{Z(),J(),X(),$(),S5(),JO()}));function BAe(e,t){O(t,!0);let n=()=>j(x5,`$translator`,a),r=()=>j(a4,`$showContentOverlay`,a),i=()=>j(s4,`$translatorApiKeyDialogState`,a),[a,o]=mn(),s=M(()=>n().serviceId),c=M(()=>n().apiLabel),l=M(()=>n().developerURL),u=M(()=>n().apiKeyURL),d=M(()=>n().apiKeyPattern);Qr(()=>{!r()&&i().show&&(gn(s4,zi(i).show=!1,zi(i)),i().resolve?.())});{let t=M(()=>Y(`translate_fields`,{values:{count:i().multiple?2:1}})),n=M(()=>({spellcheck:!1,monospace:!0,"aria-label":Y(`api_key`)}));xL(e,{get title(){return z(t)},showOk:!1,get textboxAttrs(){return z(n)},oninput:e=>{let t=e.target.value.trim();z(d)?.test(t)&&(qO.apiKeys??={},qO.apiKeys[z(s)]=t,gn(s4,zi(i).show=!1,zi(i)),i().resolve?.(t))},onCancel:()=>{i().resolve?.()},get open(){return i().show},set open(e){gn(s4,zi(i).show=e,zi(i))},children:(e,t)=>{var n=VAe(),r=I(n);RAe(r,{});var i=L(r,2);UI(i,{}),yo(L(i,2),()=>ux(Y(`prefs.i18n.translators.description`,{values:{service:z(c),homeHref:`href="${z(l)}"`,apiKeyHref:`href="${z(u)}"`}}).replace(/[\u2068\u2069]/g,``),{ALLOWED_TAGS:[`a`],ALLOWED_ATTR:[`href`,`target`,`rel`]})),H(e,n)},$$slots:{default:!0}})}k(),o()}var VAe,HAe=o((()=>{Z(),J(),X(),$(),dx(),zAe(),f4(),S5(),JO(),VAe=B(`<!> <!> <!>`,1)}));function UAe(e,t){O(t,!0);let n=()=>j(hC,`$entryParseErrors`,r),[r,i]=mn(),a=N(!!n().length);Bz(e,{get show(){return z(a)},set show(e){P(a,e,!0)},children:(e,t)=>{cI(e,{status:`error`,children:(e,t)=>{gt();var r=ja();R(e=>U(r,e),[()=>Y(`entry_parse_errors`,{values:{count:n().length}})]),H(e,r)},$$slots:{default:!0}})},$$slots:{default:!0}}),k(),i()}var WAe=o((()=>{Z(),J(),X(),$(),vC()})),N9,P9,F9=o((()=>{qp(),wA(),ID(),SE(),N9=un([Kp(()=>bE.isLargeScreen),Kp(()=>bE.hasMouse),Kp(()=>bE.isLocalHost),SA,Kp(()=>FD.account)],([e,t,n,r,i])=>e&&t&&!n&&!!r?.isGit&&!!i?.token),P9=ln(!1)}));function GAe(e,t){O(t,!0);let n=()=>j(SA,`$backend`,r),[r,i]=mn(),a,o=N(!1);Qr(()=>{let{databaseName:e}=n()?.repository??{};e&&(a=new qw(e,`ui-settings`),(async()=>{let e=await a.get(`onboarding`)??{};e.mobileCta||P(o,!0),await a.set(`onboarding`,{...e,mobileCta:!0})})())});var s=qAe(),c=I(s);ao(c,()=>({"--sui-infobar-message-justify-content":`center`})),DI(c.lastChild,{get show(){return z(o)},dismissible:!1,children:(e,t)=>{gt();var n=KAe(),r=I(n),i=L(r);{let e=M(()=>Y(`mobile_promo_button`));wI(i,{variant:`link`,get label(){return z(e)},onclick:()=>{P(o,!1),pn(P9,!0)}})}var a=L(i,2);{let e=M(()=>Y(`later`));wI(a,{variant:`link`,get label(){return z(e)},onclick:()=>{P(o,!1)}})}R(e=>U(r,`${e??``} `),[()=>Y(`mobile_promo_title`)]),H(e,n)},$$slots:{default:!0}}),D(c),H(e,s),k(),i()}var KAe,qAe,JAe=o((()=>{Z(),J(),X(),$(),Xw(),F9(),wA(),KAe=B(` <!> <!>`,1),qAe=B(`<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>`,1)}));function YAe(e,t){O(t,!0),G(e,ZAe);let n=()=>j($p,`$allAssetFolders`,c),r=()=>j(tm,`$selectedAssetFolder`,c),i=()=>j(TF,`$cmsConfig`,c),a=()=>j(xA,`$backendName`,c),o=()=>j(g4,`$selectedPageName`,c),s=()=>j(Z6,`$searchMode`,c),[c,l]=mn(),u=M(()=>{let e=[{key:`collections`,label:Y(`contents`),icon:`article`,link:`/collections`,searchMode:`contents`}];return n().length&&e.push({key:`assets`,label:Y(`assets`),icon:`photo`,link:bE.isSmallScreen?`/assets`:`/assets/${r()?.internalPath??`-/all`}`,searchMode:`assets`}),i()?.publish_mode,a(),bE.isSmallScreen&&e.push({key:`menu`,label:Y(`menu`),icon:`menu`,link:`/menu`,searchMode:void 0}),e});var d=XAe(),f=F(d);{let e=M(()=>Y(`switch_page`));MI(f,{get"aria-label"(){return z(e)},"aria-controls":`page-container`,children:(e,t)=>{var n=V();uo(I(n),19,()=>z(u),({key:e,label:t,icon:n,link:r,searchMode:i})=>e,(e,t,n)=>{let r=()=>z(t).key,i=()=>z(t).label,a=()=>z(t).icon,c=()=>z(t).link,l=()=>z(t).searchMode;{let t=e=>{oI(e,{get name(){return a()}})},u=M(()=>o()===r()||s()===l()),d=M(()=>z(n)+1);NI(e,{variant:`ghost`,iconic:!0,get selected(){return z(u)},get"aria-label"(){return i()},get keyShortcuts(){return`Alt+${z(d)??``}`},onclick:()=>{S4(c())},startIcon:t,$$slots:{startIcon:!0}})}}),H(e,n)},$$slots:{default:!0}})}D(d),H(e,d),k(),l()}var XAe,ZAe,QAe=o((()=>{Z(),J(),X(),$(),T4(),cm(),wA(),AF(),$6(),SE(),XAe=B(`<div role="none" class="wrapper svelte-t2r4ty"><!></div>`),ZAe={hash:`svelte-t2r4ty`,code:`.wrapper.svelte-t2r4ty {display:contents;.sui.select-button-group {gap:4px;
1079
1079
 
1080
1080
  @media (width < 768px) {justify-content:space-evenly;width:100%;
1081
- }}.sui.button {border-radius:var(--sui-button-medium-border-radius) !important;}}`}}));function $Ae(e,t){O(t,!0);let n=()=>j(h4,`$hasOverlay`,r),[r,i]=mn();yse(e,{get inert(){return n()},children:(e,t)=>{{let t=M(()=>Y(`global`));H0(e,{variant:`primary`,get"aria-label"(){return z(t)},children:(e,t)=>{var n=eje();YAe(F(n),{}),D(n),H(e,n)},$$slots:{default:!0}})}},$$slots:{default:!0}}),k(),i()}var eje,tje=o((()=>{Z(),J(),X(),$(),QAe(),T4(),eje=B(`<div role="none" class="buttons"><!></div>`)}));function nje(e,t){O(t,!0);let n=N(!1),r;tc(()=>{let e=e=>{e.preventDefault(),r=e,P(n,!0)},t=()=>{r=null,P(n,!1)};return window.addEventListener(`beforeinstallprompt`,e),window.addEventListener(`appinstalled`,t),()=>{window.removeEventListener(`beforeinstallprompt`,e),window.removeEventListener(`appinstalled`,t)}});var i=V(),a=I(i),o=e=>{{let t=M(()=>Y(`install_as_app`));lR(e,{get label(){return z(t)},onclick:async()=>{await r?.prompt()}})}};W(a,e=>{z(n)&&e(o)}),H(e,i),k()}var rje=o((()=>{Z(),J(),X(),$(),rc()}));function ije(e,t){O(t,!0),G(e,cje);let n=q(t,`open`,15,!1),r=q(t,`onClose`,3,void 0),i=[{feature:`view_content_library`,keys:`Alt+1`},{feature:`view_asset_library`,keys:`Alt+2`},{feature:`search`,keys:`Accel+F`},{feature:`create_entry`,keys:`Accel+E`},{feature:`save_entry`,keys:`Accel+S`},{feature:`cancel_editing`,keys:`Escape`}];{let t=M(()=>Y(`keyboard_shortcuts`));nL(e,{get title(){return z(t)},size:`small`,showOk:!1,showCancel:!1,showClose:!0,style:`--sui-dialog-small-content-max-height:auto`,onClose:()=>{r()?.()},get open(){return n()},set open(e){n(e)},children:(e,t)=>{var n=sje(),r=F(n);{let e=M(()=>Y(`keyboard_shortcuts`));Ace(r,{get"aria-label"(){return z(e)},children:(e,t)=>{var n=V();uo(I(n),17,()=>i,({feature:e,keys:t})=>t,(e,t)=>{let n=()=>z(t).feature,r=()=>z(t).keys;Oce(e,{children:(e,t)=>{var i=oje(),a=I(i);Cz(a,{class:`feature`,children:(e,t)=>{gt();var r=ja();R(e=>U(r,e),[()=>Y(`keyboard_shortcuts_.${n()}`)]),H(e,r)},$$slots:{default:!0}}),Cz(L(a,2),{class:`keys`,children:(e,t)=>{var n=V();uo(I(n),16,()=>r().split(`+`),e=>e,(e,t)=>{var n=aje(),r=F(n,!0);D(n),R(e=>U(r,e),[()=>t.replace(`Accel`,bE.isMacOS?`⌘`:`Ctrl`)]),H(e,n)}),H(e,n)},$$slots:{default:!0}}),H(e,i)},$$slots:{default:!0}})}),H(e,n)},$$slots:{default:!0}})}D(n),H(e,n)},$$slots:{default:!0}})}k()}var aje,oje,sje,cje,lje=o((()=>{Z(),J(),X(),$(),SE(),aje=B(`<kbd class="svelte-13q15u"> </kbd>`),oje=B(`<!> <!>`,1),sje=B(`<div role="none" class="wrapper svelte-13q15u"><!></div>`),cje={hash:`svelte-13q15u`,code:`.wrapper.svelte-13q15u {display:contents;.table-row {display:flex;align-items:center;gap:16px;padding:8px 0;border-top:1px solid var(--sui-secondary-border-color);&:last-child {border-bottom:1px solid var(--sui-secondary-border-color);}.feature {flex:auto;}.keys {display:flex;gap:8px;}}}kbd.svelte-13q15u {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 uje(e,t){O(t,!0);let n=N(!1);var r=dje(),i=I(r),a=e=>{{let t=M(()=>Y(`keyboard_shortcuts`));lR(e,{get label(){return z(t)},onclick:()=>{P(n,!0)}})}};W(i,e=>{bE.hasMouse&&e(a)}),ije(L(i,2),{onClose:()=>{t.menuButton?.focus()},get open(){return z(n)},set open(e){P(n,e,!0)}}),H(e,r),k()}var dje,fje=o((()=>{Z(),J(),X(),$(),lje(),SE(),dje=B(`<!> <!>`,1)}));function I9(e,t){O(t,!0);let n=q(t,`defaultValue`,3,!0),r=N(!0);Qr(()=>{P(r,!!(qO[t.key]??n()),!0)}),Qr(()=>{qO[t.key]!==z(r)&&(qO[t.key]=z(r))}),yz(e,{get label(){return t.label},get checked(){return z(r)},set checked(e){P(r,e,!0)}}),k()}var L9=o((()=>{Z(),J(),$(),JO()}));function pje(e,t){O(t,!0),q(t,`onChange`,3,void 0);var n=mje(),r=F(n),i=F(r,!0);D(r);var a=L(r,2),o=F(a,!0);D(a);var s=L(a,2),c=F(s);{let e=M(()=>Y(`prefs.accessibility.underline_links.switch_label`));I9(c,{key:`underlineLinks`,get label(){return z(e)}})}D(s),D(n),R((e,t)=>{U(i,e),U(o,t)},[()=>Y(`prefs.accessibility.underline_links.title`),()=>Y(`prefs.accessibility.underline_links.description`)]),H(e,n),k()}var mje,hje=o((()=>{Z(),J(),X(),L9(),mje=B(`<section><h3> </h3> <p> </p> <div role="none"><!></div></section>`)}));function gje(e,t){O(t,!0);let n=()=>j(s6,`$skipCIConfigured`,r),[r,i]=mn(),a=q(t,`onChange`,3,void 0);var o=vje(),s=I(o),c=F(s),l=F(c,!0);D(c);var u=L(c,2),d=F(u,!0);D(u);var f=L(u,2),p=F(f);{let e=M(()=>Y(`prefs.advanced.beta.switch_label`));I9(p,{key:`beta`,get label(){return z(e)},defaultValue:!1})}D(f),D(s);var m=L(s,2),h=F(m),g=F(h,!0);D(h);var _=L(h,2),v=F(_,!0);D(_);var y=L(_,2),b=F(y);{let e=M(()=>Y(`prefs.advanced.developer_mode.switch_label`));I9(b,{key:`devModeEnabled`,get label(){return z(e)},defaultValue:!1})}D(y),D(m);var x=L(m,2),S=e=>{var t=_je(),n=F(t),r=F(n,!0);D(n);var i=L(n,2),o=F(i,!0);D(i);var s=L(i,2),c=F(s);{let e=M(()=>Y(`prefs.advanced.deploy_hook.url.field_label`));hL(c,{dir:`ltr`,flex:!0,get"aria-label"(){return z(e)},showInlineLabel:!0,onchange:()=>{a()?.({message:Y(qO.deployHookURL?`prefs.advanced.deploy_hook.url.saved`:`prefs.advanced.deploy_hook.url.removed`)})},get value(){return qO.deployHookURL},set value(e){qO.deployHookURL=e}})}D(s);var l=L(s,2),u=F(l);{let e=M(()=>Y(`prefs.advanced.deploy_hook.auth.field_label`));hL(u,{dir:`ltr`,flex:!0,get"aria-label"(){return z(e)},showInlineLabel:!0,onchange:()=>{a()?.({message:Y(qO.deployHookAuthHeader?`prefs.advanced.deploy_hook.auth.saved`:`prefs.advanced.deploy_hook.auth.removed`)})},get value(){return qO.deployHookAuthHeader},set value(e){qO.deployHookAuthHeader=e}})}D(l),D(t),R((e,t)=>{U(r,e),U(o,t)},[()=>Y(`prefs.advanced.deploy_hook.title`),()=>Y(`prefs.advanced.deploy_hook.description`)]),H(e,t)};W(x,e=>{n()&&e(S)}),R((e,t,n,r)=>{U(l,e),U(d,t),U(g,n),U(v,r)},[()=>Y(`prefs.advanced.beta.title`),()=>Y(`prefs.advanced.beta.description`),()=>Y(`prefs.advanced.developer_mode.title`),()=>Y(`prefs.advanced.developer_mode.description`)]),H(e,o),k(),i()}var _je,vje,yje=o((()=>{Z(),J(),X(),$(),L9(),l6(),JO(),_je=B(`<section><h3> </h3> <p> </p> <div role="none"><!></div> <div role="none"><!></div></section>`),vje=B(`<section><h3> </h3> <p> </p> <div role="none"><!></div></section> <section><h3> </h3> <p> </p> <div role="none"><!></div></section> <!>`,1)}));function bje(e,t){O(t,!0),q(t,`onChange`,3,void 0);var n=xje(),r=F(n),i=F(r,!0);D(r);var a=L(r,2),o=F(a);{let e=M(()=>Y(`prefs.appearance.select_theme`));MI(o,{get"aria-label"(){return z(e)},onChange:e=>{qO.theme=e.detail.value},children:(e,t)=>{var n=V();uo(I(n),16,()=>[`auto`,`dark`,`light`],e=>e,(e,t)=>{{let n=M(()=>Y(`prefs.theme.${t}`)),r=M(()=>!qO.theme&&t===`auto`||qO.theme===t);NI(e,{variant:`tertiary`,get label(){return z(n)},get value(){return t},get selected(){return z(r)}})}}),H(e,n)},$$slots:{default:!0}})}D(a),D(n),R(e=>U(i,e),[()=>Y(`prefs.appearance.theme`)]),H(e,n),k()}var xje,Sje=o((()=>{Z(),J(),X(),$(),JO(),xje=B(`<section><h3> </h3> <div role="none"><!></div></section>`)}));function Cje(e,t){O(t,!0),q(t,`onChange`,3,void 0);var n=wje(),r=F(n),i=F(r,!0);D(r);var a=L(r,2),o=F(a);{let e=M(()=>Y(`prefs.contents.editor.use_draft_backup.switch_label`));I9(o,{key:`useDraftBackup`,get label(){return z(e)}})}D(a);var s=L(a,2),c=F(s);{let e=M(()=>Y(`prefs.contents.editor.close_on_save.switch_label`));I9(c,{key:`closeOnSave`,get label(){return z(e)}})}D(s);var l=L(s,2),u=F(l);{let e=M(()=>Y(`prefs.contents.editor.close_with_escape.switch_label`));I9(u,{key:`closeWithEscape`,get label(){return z(e)}})}D(l),D(n),R(e=>U(i,e),[()=>Y(`prefs.contents.editor.title`)]),H(e,n),k()}var wje,Tje=o((()=>{Z(),J(),X(),L9(),wje=B(`<section><h3> </h3> <div role="none"><!></div> <div role="none"><!></div> <div role="none"><!></div></section>`)}));function R9(e,t){O(t,!0);let n=q(t,`onChange`,3,void 0),r=M(()=>t.service.apiKeyPattern),i=N(``);tc(()=>{P(i,qO.apiKeys?.[t.serviceId]??``,!0)}),y2(e,{flex:!0,autocomplete:`off`,spellcheck:`false`,get"aria-label"(){return t.ariaLabel},onchange:()=>{let e=z(i).trim(),a=!!e&&!!z(r)&&!z(r).test(e);qO.apiKeys??={},qO.apiKeys[t.serviceId]=a?``:e,n()?.({message:Y(a?`prefs.changes.api_key_invalid`:e?`prefs.changes.api_key_saved`:`prefs.changes.api_key_removed`),status:a?`error`:`success`})},get value(){return z(i)},set value(e){P(i,e,!0)}}),k()}var Eje=o((()=>{Z(),J(),X(),$(),rc(),JO()}));function Dje(e,t){O(t,!0);let n=q(t,`onChange`,3,void 0);var r=kje(),i=I(r),a=F(i),o=F(a,!0);D(a);var s=L(a,2);RAe(F(s),{}),D(s),D(i);var c=L(i,2),l=F(c),u=F(l,!0);D(l);var d=L(l,2);yo(d,()=>yP(Y(`prefs.i18n.translators.api_keys.description`),`https://sveltiacms.app/en/docs/integrations/translations`),!0),D(d),uo(L(d,2),17,()=>Object.entries(b5),([e,t])=>e,(e,t)=>{var r=M(()=>ee(z(t),2));let i=()=>z(r)[0],a=()=>z(r)[1],o=M(()=>a().serviceLabel);var s=Oje(),c=F(s),l=F(c,!0);D(c);var u=L(c,2),d=F(u);{let e=M(()=>Y(`prefs.i18n.translators.field_label`,{values:{service:z(o)}}));R9(d,{get serviceId(){return i()},get service(){return a()},get ariaLabel(){return z(e)},get onChange(){return n()}})}D(u),D(s),R(()=>U(l,z(o))),H(e,s)}),D(c),R((e,t)=>{U(o,e),U(u,t)},[()=>Y(`prefs.i18n.translators.default.title`),()=>Y(`prefs.i18n.translators.api_keys.title`)]),H(e,r),k()}var Oje,kje,Aje=o((()=>{Z(),J(),X(),Eje(),zAe(),S5(),bP(),Oje=B(`<section><h4> </h4> <div role="none"><!></div></section>`),kje=B(`<section><h3> </h3> <div role="none"><!></div></section> <section><h3> </h3> <p></p> <!></section>`,1)}));function jje(e,t){O(t,!0),q(t,`onChange`,3,void 0);var n=Mje(),r=F(n),i=F(r,!0);D(r);var a=L(r,2);no(F(a),()=>Hh.current,e=>{{let t=M(()=>Y(`prefs.language.ui_language.select_language`));sz(e,{get"aria-label"(){return z(t)},get value(){return Hh.current},onChange:e=>{qO.locale=e.detail.value},children:(e,t)=>{var n=V();uo(I(n),16,()=>Ah,e=>e,(e,t)=>{{let n=M(()=>BC(t,{displayLocale:t})??t),r=M(()=>t===Hh.current);QL(e,{get label(){return z(n)},get value(){return t},get selected(){return z(r)},dir:`auto`})}}),H(e,n)},$$slots:{default:!0}})}}),D(a),D(n),R(e=>U(i,e),[()=>Y(`prefs.language.ui_language.title`)]),H(e,n),k()}var Mje,Nje=o((()=>{Z(),J(),X(),$(),WC(),JO(),Mje=B(`<section><h3> </h3> <div role="none"><!></div></section>`)}));function Pje(e,t){O(t,!0);let n=q(t,`onChange`,3,void 0),r=M(()=>{let{providers:e=[]}=c7();return Object.entries(s7).filter(([t,{authType:n}])=>e.includes(t)&&n!==`none`)}),i=M(()=>Object.entries(Yj).filter(([,{isEnabled:e,authType:t}])=>(e?.()??!0)&&t!==`widget`));var a=Fje(),o=I(a),s=F(o),c=F(s,!0);D(s);var l=L(s,2);yo(l,()=>yP(z(i).length?Y(`prefs.media.cloud_storage.api_keys.description`):Y(`prefs.media.cloud_storage.no_services`),`https://sveltiacms.app/en/docs/media`),!0),D(l),uo(L(l,2),17,()=>z(i),([e,t])=>e,(e,t)=>{var r=M(()=>ee(z(t),2));let i=()=>z(r)[0],a=()=>z(r)[1],o=M(()=>a().serviceLabel);var s=z9(),c=F(s),l=F(c,!0);D(c);var u=L(c,2),d=F(u);{let e=M(()=>Y(`prefs.media.cloud_storage.field_label`,{values:{service:z(o)}}));R9(d,{get serviceId(){return i()},get service(){return a()},get ariaLabel(){return z(e)},get onChange(){return n()}})}D(u),D(s),R(()=>U(l,z(o))),H(e,s)}),D(o);var u=L(o,2),d=F(u),f=F(d,!0);D(d);var p=L(d,2);yo(p,()=>yP(z(r).length?Y(`prefs.media.stock_photos.api_keys.description`):Y(`prefs.media.stock_photos.no_services`),`https://sveltiacms.app/en/docs/integrations/stock-photos`),!0),D(p),uo(L(p,2),17,()=>z(r),([e,t])=>e,(e,t)=>{var r=M(()=>ee(z(t),2));let i=()=>z(r)[0],a=()=>z(r)[1],o=M(()=>a().serviceLabel);var s=z9(),c=F(s),l=F(c,!0);D(c);var u=L(c,2),d=F(u);{let e=M(()=>Y(`prefs.media.stock_photos.field_label`,{values:{service:z(o)}}));R9(d,{get serviceId(){return i()},get service(){return a()},get ariaLabel(){return z(e)},get onChange(){return n()}})}D(u),D(s),R(()=>U(l,z(o))),H(e,s)}),D(u),R((e,t)=>{U(c,e),U(f,t)},[()=>Y(`prefs.media.cloud_storage.api_keys.title`),()=>Y(`prefs.media.stock_photos.api_keys.title`)]),H(e,a),k()}var z9,Fje,Ije=o((()=>{Z(),J(),X(),Eje(),Zj(),$xe(),bP(),z9=B(`<section><h4> </h4> <div role="none"><!></div></section>`),Fje=B(`<section><h3> </h3> <p></p> <!></section> <section><h3> </h3> <p></p> <!></section>`,1)})),B9,Lje=o((()=>{qp(),hje(),yje(),Sje(),Tje(),Aje(),Nje(),Ije(),AF(),B9=un([TF],([e])=>[{key:`appearance`,icon:`palette`,component:bje},{key:`language`,icon:`language`,component:jje},{key:`contents`,icon:`library_books`,component:Cje},{key:`i18n`,icon:`translate`,component:Dje,enabled:(e?.i18n?.locales?.length??0)>1},{key:`media`,icon:`photo_library`,component:Pje},{key:`accessibility`,icon:`accessibility_new`,component:pje},{key:`advanced`,icon:`build`,component:gje}])}));function Rje(e,t){G(e,Bje);let n=N(``),r=N(`success`),i=N(!1);var a=zje(),o=I(a);To(F(o),()=>t.Panel,(e,t)=>{t(e,{onChange:({message:e,status:t})=>{P(n,e,!0),P(r,t??`success`,!0),P(i,!0)}})}),D(o),Bz(L(o,2),{get show(){return z(i)},set show(e){P(i,e,!0)},children:(e,t)=>{cI(e,{get status(){return z(r)},children:(e,t)=>{gt();var r=ja();R(()=>U(r,z(n))),H(e,r)},$$slots:{default:!0}})},$$slots:{default:!0}}),H(e,a)}var zje,Bje,Vje=o((()=>{Z(),J(),$(),zje=B(`<div class="container svelte-1attlke" role="none"><!></div> <!>`,1),Bje={hash:`svelte-1attlke`,code:`.container.svelte-1attlke {display:contents;section:not(:first-child) {margin:16px 0 0;}p {margin-top:0;}h3 {font-size:inherit;& ~ div {margin:8px 0 0;}& ~ p {margin:8px 0 0;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}}h4 {margin-bottom:4px;font-size:var(--sui-font-size-small);}}`}}));function Hje(e,t){O(t,!0),G(e,Wje);let n=q(t,`open`,15,!1),r=q(t,`onClose`,3,void 0),i=N(`appearance`);{let t=M(()=>Y(`settings`));nL(e,{get title(){return z(t)},size:`large`,showOk:!1,showCancel:!1,showClose:!0,onClose:()=>{r()?.()},get open(){return n()},set open(e){n(e)},children:(e,t)=>{var n=Uje(),r=F(n);{let e=M(()=>Y(`categories`));Mce(r,{orientation:`vertical`,get"aria-label"(){return z(e)},children:(e,t)=>{var n=V();uo(I(n),17,()=>A(B9),({key:e,icon:t,enabled:n=!0})=>e,(e,t)=>{let n=()=>z(t).key,r=()=>z(t).icon,a=In(()=>T(z(t).enabled,!0));var o=V(),s=I(o),c=e=>{{let t=e=>{oI(e,{get name(){return r()}})},a=M(()=>Y(`prefs.${n()}.title`)),o=M(()=>n()===z(i));Ice(e,{get label(){return z(a)},get selected(){return z(o)},get"aria-controls"(){return`prefs-tab-${n()??``}`},onSelect:()=>{P(i,n(),!0)},startIcon:t,$$slots:{startIcon:!0}})}};W(s,e=>{z(a)&&e(c)}),H(e,o)}),H(e,n)},$$slots:{default:!0}})}uo(L(r,2),17,()=>A(B9),({key:e,component:t})=>e,(e,t)=>{let n=()=>z(t).key,r=()=>z(t).component;Pce(e,{get id(){return`prefs-tab-${n()??``}`},children:(e,t)=>{Rje(e,{get Panel(){return r()}})},$$slots:{default:!0}})}),D(n),H(e,n)},$$slots:{default:!0}})}k()}var Uje,Wje,Gje=o((()=>{Z(),J(),X(),$(),qp(),Lje(),Vje(),Uje=B(`<div role="none" class="wrapper svelte-pwxwga"><!> <!></div>`),Wje={hash:`svelte-pwxwga`,code:`.wrapper.svelte-pwxwga {display:flex;.sui.tab-list {flex:none;}.sui.tab-panel {flex:auto;border-width:0;}}`}}));function Kje(e,t){O(t,!0);let n=()=>j(xA,`$backendName`,a),r=()=>j(SA,`$backend`,a),i=()=>j(N9,`$canShowMobileSignInDialog`,a),[a,o]=mn(),s=N(!1),c=M(()=>n()===`local`),l=M(()=>n()===`test-repo`);var u=V9(),d=I(u);{let e=M(()=>Y(`account`));iR(d,{get"aria-label"(){return z(e)},children:(e,n)=>{var a=qje(),o=I(a);{let e=M(()=>z(c)?Y(`working_with_local_repo`):z(l)?Y(`working_with_test_repo`):Y(`signed_in_as_x`,{values:{name:FD.account?.login}})),t=M(()=>z(c)||z(l));lR(o,{get label(){return z(e)},get disabled(){return z(t)},onclick:()=>{p4(FD.account?.profileURL)}})}var u=L(o,2);RI(u,{});var d=L(u,2);{let e=M(()=>Y(`live_site`));lR(d,{get label(){return z(e)},onclick:()=>{w4()}})}var f=L(d,2),p=e=>{var t=V9(),n=I(t);{let e=M(()=>Y(`git_repository`)),t=M(()=>!r()?.repository?.treeBaseURL);lR(n,{get label(){return z(e)},get disabled(){return z(t)},onclick:()=>{p4(r()?.repository?.treeBaseURL)}})}var i=L(n,2);{let e=M(()=>Y(`cms_config`));lR(i,{get label(){return z(e)},onclick:()=>{S4(`/config`,{transitionType:`forwards`})}})}H(e,t)};W(f,e=>{qO.devModeEnabled&&e(p)});var m=L(f,2);RI(m,{});var h=L(m,2);{let e=M(()=>Y(`settings`));lR(h,{get label(){return z(e)},onclick:()=>{bE.isSmallScreen?S4(`/settings`,{transitionType:`forwards`}):P(s,!0)}})}var g=L(h,2),_=e=>{uje(e,{get menuButton(){return t.menuButton}})};W(g,e=>{qO.devModeEnabled||e(_)});var v=L(g,2),y=e=>{{let t=M(()=>Y(`sign_in_with_mobile`));lR(e,{get label(){return z(t)},onclick:()=>{pn(P9,!0)}})}};W(v,e=>{i()&&e(y)});var b=L(v,2);nje(b,{});var x=L(b,2);RI(x,{});var S=L(x,2);{let e=M(()=>Y(`sign_out`));lR(S,{get label(){return z(e)},onclick:async()=>{window.requestAnimationFrame(()=>{L4()})}})}H(e,a)},$$slots:{default:!0}})}Hje(L(d,2),{onClose:()=>{t.menuButton?.focus()},get open(){return z(s)},set open(e){P(s,e,!0)}}),H(e,u),k(),o()}var V9,qje,Jje=o((()=>{Z(),J(),X(),$(),rje(),fje(),Gje(),T4(),F9(),wA(),ID(),R4(),SE(),JO(),m4(),V9=B(`<!> <!>`,1),qje=B(`<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>`,1)}));function Yje(e,t){O(t,!0),G(e,Qje);let n=()=>j(xA,`$backendName`,r),[r,i]=mn(),a=N(void 0),o=M(()=>n()===`local`),s=M(()=>!!FD.account?.avatarURL);var c=Zje(),l=F(c);{let e=e=>{var t=V(),n=I(t),r=e=>{oI(e,{name:`arrow_drop_down`,class:`small-arrow`})},i=e=>{var t=Xje();R(()=>K(t,`src`,FD.account?.avatarURL)),H(e,t)},a=e=>{oI(e,{name:`account_circle`})};W(n,e=>{z(o)?e(r):z(s)?e(i,1):e(a,-1)}),H(e,t)},t=e=>{Kje(e,{get menuButton(){return z(a)}})},n=M(()=>!z(o)),r=M(()=>z(o)?Y(`local_workflow.indicator`):void 0),i=M(()=>z(s)?`avatar`:``),c=M(()=>Y(`show_account_menu`));Rs(PI(l,{variant:`ghost`,get iconic(){return z(n)},get label(){return z(r)},get class(){return z(i)},popupPosition:`bottom-right`,get"aria-label"(){return z(c)},endIcon:e,popup:t,$$slots:{endIcon:!0,popup:!0}}),e=>P(a,e,!0),()=>z(a))}D(c),H(e,c),k(),i()}var Xje,Zje,Qje,$je=o((()=>{Z(),J(),X(),$(),Jje(),wA(),ID(),Xje=B(`<img class="avatar svelte-q0ng4j" loading="lazy" alt=""/>`),Zje=B(`<div role="none" class="wrapper svelte-q0ng4j"><!></div>`),Qje={hash:`svelte-q0ng4j`,code:`.wrapper.svelte-q0ng4j {display:contents;button.avatar {border-width:0;background-color:transparent;}}.avatar.svelte-q0ng4j {width:32px;height:32px;border-radius:32px;object-fit:cover;}`}}));function eMe(e,t){O(t,!0);let[n,r]=mn(),i=M(()=>aw({visible:!0,type:`entry`}));{let t=e=>{oI(e,{name:`add`})},n=e=>{{let t=M(()=>Y(`create_entry_or_assets`));iR(e,{get"aria-label"(){return z(t)},children:(e,t)=>{var n=H9(),r=I(n),a=e=>{var t=H9(),n=I(t);uo(n,17,()=>z(i),e=>e.name,(e,t)=>{let n=M(()=>{let{name:e,label:n,label_singular:r,create:i=!0,limit:a=1/0}=z(t);return{name:e,label:n,labelSingular:r,create:i,limit:a}});{let t=M(()=>z(n).labelSingular||z(n).label||z(n).name),r=M(()=>!z(n).create||EN(z(n).name).length>=z(n).limit);lR(e,{get label(){return z(t)},get disabled(){return z(r)},onclick:()=>{S4(`/collections/${z(n).name}/new`,{transitionType:`forwards`})}})}}),RI(L(n,2),{}),H(e,t)};W(r,e=>{z(i).length&&e(a)});var o=L(r,2);{let e=M(()=>Y(`assets`));lR(o,{get label(){return z(e)},onclick:async()=>{S4(`/assets`,{transitionType:`forwards`}),await Gw(100),pn(Z2,!0)}})}H(e,n)},$$slots:{default:!0}})}},r=M(()=>Y(`create_entry_or_assets`));PI(e,{variant:`ghost`,iconic:!0,popupPosition:`bottom-right`,get"aria-label"(){return z(r)},endIcon:t,popup:n,$$slots:{endIcon:!0,popup:!0}})}k(),r()}var H9,tMe=o((()=>{Z(),J(),X(),$(),Kw(),T4(),i4(),dw(),AN(),H9=B(`<!> <!>`,1)}));function nMe(e,t){O(t,!0),G(e,iMe);{let t=e=>{var t=V(),n=I(t),r=e=>{var t=rMe(),n=F(t);D(t),R(e=>{K(t,`aria-label`,`(${e??``})`),U(n,`v${pM??``}`)},[()=>Y(`version_x`,{values:{version:pM}})]),H(e,t)};W(n,e=>{qO.devModeEnabled&&e(r)}),H(e,t)},n=M(()=>Y(`release_notes`));lR(e,{get label(){return z(n)},onclick:()=>{p4(`https://github.com/sveltia/sveltia-cms/releases`)},endIcon:t,$$slots:{endIcon:!0}})}k()}var rMe,iMe,aMe=o((()=>{Z(),J(),X(),$(),mM(),JO(),m4(),rMe=B(`<span class="version svelte-wmw2gz"> </span>`),iMe={hash:`svelte-wmw2gz`,code:`.version.svelte-wmw2gz {border-radius:4px;padding:0 6px;color:var(--sui-secondary-foreground-color);background-color:var(--sui-selected-background-color);font-size:var(--sui-font-size-small);}`}}));function oMe(e,t){O(t,!0);{let n=M(()=>Y(`help`));iR(e,{get"aria-label"(){return z(n)},children:(e,n)=>{var r=cMe(),i=I(r);uje(i,{get menuButton(){return t.menuButton}});var a=L(i,2),o=e=>{var t=sMe(),n=I(t);U9(n,()=>`documentation`,()=>`https://sveltiacms.app/en/docs`);var r=L(n,2);nMe(r,{});var i=L(r,2);U9(i,()=>`announcements`,()=>`https://github.com/sveltia/sveltia-cms/discussions/categories/announcements`);var a=L(i,2);RI(a,{});var o=L(a,2);U9(o,()=>`report_issue`,()=>`https://github.com/sveltia/sveltia-cms/issues`);var s=L(o,2);U9(s,()=>`share_feedback`,()=>`https://github.com/sveltia/sveltia-cms/discussions/categories/ideas`);var c=L(s,2);U9(c,()=>`get_help`,()=>`https://github.com/sveltia/sveltia-cms/discussions/categories/q-a`);var l=L(c,2);U9(l,()=>`donate`,()=>`https://github.com/sponsors/kyoshino`);var u=L(l,2);RI(u,{});var d=L(u,2);U9(d,()=>`bluesky`,()=>`https://bsky.app/profile/sveltiacms.app`);var f=L(d,2);U9(f,()=>`join_discord`,()=>`https://discord.com/invite/5hwCGqup5b`),H(e,t)};W(a,e=>{qO.devModeEnabled&&e(o)}),H(e,r)},$$slots:{default:!0}})}k()}var U9,sMe,cMe,lMe=o((()=>{Z(),J(),X(),$(),aMe(),fje(),JO(),m4(),U9=(e,t=E,n=E)=>{{let r=M(()=>Y(t()));lR(e,{get label(){return z(r)},onclick:()=>{p4(n())}})}},sMe=B(`<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>`,1),cMe=B(`<!> <!>`,1)}));function uMe(e,t){O(t,!0),G(e,fMe);let n=N(void 0),r=N(!1);var i=dMe(),a=I(i),o=F(a);{let e=e=>{oI(e,{name:`help`})},t=e=>{oMe(e,{get menuButton(){return z(n)}})},r=M(()=>Y(`show_help_menu`));Rs(PI(o,{variant:`ghost`,iconic:!0,popupPosition:`bottom-right`,get"aria-label"(){return z(r)},endIcon:e,popup:t,$$slots:{endIcon:!0,popup:!0}}),e=>P(n,e,!0),()=>z(n))}D(a),ije(L(a,2),{onClose:()=>{z(n)?.focus()},get open(){return z(r)},set open(e){P(r,e,!0)}}),H(e,i),k()}var dMe,fMe,pMe=o((()=>{Z(),J(),X(),$(),lMe(),lje(),dMe=B(`<div role="none" class="wrapper svelte-bzzge3"><!></div> <!>`,1),fMe={hash:`svelte-bzzge3`,code:`.wrapper.svelte-bzzge3 {display:contents;}`}}));function mMe(e,t){O(t,!0);{let t=e=>{oI(e,{name:`notifications`})},n=M(()=>Y(`show_notifications`));wI(e,{variant:`ghost`,iconic:!0,hidden:!0,get"aria-label"(){return z(n)},onclick:()=>{},startIcon:t,$$slots:{startIcon:!0}})}k()}var hMe=o((()=>{Z(),J(),X(),$()}));function gMe(e,t){O(t,!0),G(e,vMe);let n=()=>j($4,`$appLogoURL`,i),r=()=>j(TF,`$cmsConfig`,i),[i,a]=mn();var o=V(),s=I(o),c=e=>{{let t=M(()=>Y(`visit_live_site`));wI(e,{variant:`ghost`,iconic:!0,get"aria-label"(){return z(t)},onclick:()=>{w4()},children:(e,t)=>{var r=_Me();R(()=>K(r,`src`,n())),H(e,r)},$$slots:{default:!0}})}};W(s,e=>{n()!==Z4&&(r()?.logo?.show_in_header??!0)&&e(c)}),H(e,o),k(),a()}var _Me,vMe,yMe=o((()=>{Z(),J(),X(),$(),i3(),T4(),AF(),_Me=B(`<img alt="" class="logo svelte-15c9hhi"/>`),vMe={hash:`svelte-15c9hhi`,code:`img.svelte-15c9hhi {width:24px;height:24px;object-fit:contain;}`}}));function bMe(e,t){O(t,!0),G(e,CMe);let n=()=>j(h4,`$hasOverlay`,r),[r,i]=mn();var a=SMe(),o=F(a);{let e=M(()=>Y(`global`));H0(o,{variant:`primary`,get"aria-label"(){return z(e)},children:(e,t)=>{var n=xMe(),r=I(n),i=F(r);gMe(i,{}),YAe(L(i,2),{}),D(r);var a=L(r,2);e8(a,{});var o=L(a,2),s=F(o);oAe(s,{});var c=L(s,2);eMe(c,{});var l=L(c,2);mMe(l,{});var u=L(l,2),d=e=>{uMe(e,{})};W(u,e=>{qO.devModeEnabled&&e(d)}),Yje(L(u,2),{}),D(o),H(e,n)},$$slots:{default:!0}})}D(a),R(()=>a.inert=n()),H(e,a),k(),i()}var xMe,SMe,CMe,wMe=o((()=>{Z(),J(),X(),$(),$je(),tMe(),pMe(),hMe(),QAe(),cAe(),t8(),yMe(),T4(),JO(),xMe=B(`<div role="none" class="buttons"><!> <!></div> <!> <div role="none" class="buttons"><!> <!> <!> <!> <!></div>`,1),SMe=B(`<div role="none" class="toolbar-wrapper svelte-1kz79fh"><!></div>`),CMe={hash:`svelte-1kz79fh`,code:`.toolbar-wrapper.svelte-1kz79fh {display:contents;&[inert] {.sui.search-bar {
1081
+ }}.sui.button {border-radius:var(--sui-button-medium-border-radius) !important;}}`}}));function $Ae(e,t){O(t,!0);let n=()=>j(h4,`$hasOverlay`,r),[r,i]=mn();yse(e,{get inert(){return n()},children:(e,t)=>{{let t=M(()=>Y(`global`));H0(e,{variant:`primary`,get"aria-label"(){return z(t)},children:(e,t)=>{var n=eje();YAe(F(n),{}),D(n),H(e,n)},$$slots:{default:!0}})}},$$slots:{default:!0}}),k(),i()}var eje,tje=o((()=>{Z(),J(),X(),$(),QAe(),T4(),eje=B(`<div role="none" class="buttons"><!></div>`)}));function nje(e,t){O(t,!0);let n=N(!1),r,i=e=>{e.preventDefault(),r=e,P(n,!0)},a=()=>{r=null,P(n,!1)};tc(()=>(window.addEventListener(`beforeinstallprompt`,i),window.addEventListener(`appinstalled`,a),()=>{window.removeEventListener(`beforeinstallprompt`,i),window.removeEventListener(`appinstalled`,a)}));var o=V(),s=I(o),c=e=>{{let t=M(()=>Y(`install_as_app`));lR(e,{get label(){return z(t)},onclick:async()=>{await r?.prompt()}})}};W(s,e=>{z(n)&&e(c)}),H(e,o),k()}var rje=o((()=>{Z(),J(),X(),$(),rc()}));function ije(e,t){O(t,!0),G(e,cje);let n=q(t,`open`,15,!1),r=q(t,`onClose`,3,void 0),i=[{feature:`view_content_library`,keys:`Alt+1`},{feature:`view_asset_library`,keys:`Alt+2`},{feature:`search`,keys:`Accel+F`},{feature:`create_entry`,keys:`Accel+E`},{feature:`save_entry`,keys:`Accel+S`},{feature:`cancel_editing`,keys:`Escape`}];{let t=M(()=>Y(`keyboard_shortcuts`));nL(e,{get title(){return z(t)},size:`small`,showOk:!1,showCancel:!1,showClose:!0,style:`--sui-dialog-small-content-max-height:auto`,onClose:()=>{r()?.()},get open(){return n()},set open(e){n(e)},children:(e,t)=>{var n=sje(),r=F(n);{let e=M(()=>Y(`keyboard_shortcuts`));Ace(r,{get"aria-label"(){return z(e)},children:(e,t)=>{var n=V();uo(I(n),17,()=>i,({feature:e,keys:t})=>t,(e,t)=>{let n=()=>z(t).feature,r=()=>z(t).keys;Oce(e,{children:(e,t)=>{var i=oje(),a=I(i);Cz(a,{class:`feature`,children:(e,t)=>{gt();var r=ja();R(e=>U(r,e),[()=>Y(`keyboard_shortcuts_.${n()}`)]),H(e,r)},$$slots:{default:!0}}),Cz(L(a,2),{class:`keys`,children:(e,t)=>{var n=V();uo(I(n),16,()=>r().split(`+`),e=>e,(e,t)=>{var n=aje(),r=F(n,!0);D(n),R(e=>U(r,e),[()=>t.replace(`Accel`,bE.isMacOS?`⌘`:`Ctrl`)]),H(e,n)}),H(e,n)},$$slots:{default:!0}}),H(e,i)},$$slots:{default:!0}})}),H(e,n)},$$slots:{default:!0}})}D(n),H(e,n)},$$slots:{default:!0}})}k()}var aje,oje,sje,cje,lje=o((()=>{Z(),J(),X(),$(),SE(),aje=B(`<kbd class="svelte-13q15u"> </kbd>`),oje=B(`<!> <!>`,1),sje=B(`<div role="none" class="wrapper svelte-13q15u"><!></div>`),cje={hash:`svelte-13q15u`,code:`.wrapper.svelte-13q15u {display:contents;.table-row {display:flex;align-items:center;gap:16px;padding:8px 0;border-top:1px solid var(--sui-secondary-border-color);&:last-child {border-bottom:1px solid var(--sui-secondary-border-color);}.feature {flex:auto;}.keys {display:flex;gap:8px;}}}kbd.svelte-13q15u {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 uje(e,t){O(t,!0);let n=N(!1);var r=dje(),i=I(r),a=e=>{{let t=M(()=>Y(`keyboard_shortcuts`));lR(e,{get label(){return z(t)},onclick:()=>{P(n,!0)}})}};W(i,e=>{bE.hasMouse&&e(a)}),ije(L(i,2),{onClose:()=>{t.menuButton?.focus()},get open(){return z(n)},set open(e){P(n,e,!0)}}),H(e,r),k()}var dje,fje=o((()=>{Z(),J(),X(),$(),lje(),SE(),dje=B(`<!> <!>`,1)}));function I9(e,t){O(t,!0);let n=q(t,`defaultValue`,3,!0),r=N(!0);Qr(()=>{P(r,!!(qO[t.key]??n()),!0)}),Qr(()=>{qO[t.key]!==z(r)&&(qO[t.key]=z(r))}),yz(e,{get label(){return t.label},get checked(){return z(r)},set checked(e){P(r,e,!0)}}),k()}var L9=o((()=>{Z(),J(),$(),JO()}));function pje(e,t){O(t,!0),q(t,`onChange`,3,void 0);var n=mje(),r=F(n),i=F(r,!0);D(r);var a=L(r,2),o=F(a,!0);D(a);var s=L(a,2),c=F(s);{let e=M(()=>Y(`prefs.accessibility.underline_links.switch_label`));I9(c,{key:`underlineLinks`,get label(){return z(e)}})}D(s),D(n),R((e,t)=>{U(i,e),U(o,t)},[()=>Y(`prefs.accessibility.underline_links.title`),()=>Y(`prefs.accessibility.underline_links.description`)]),H(e,n),k()}var mje,hje=o((()=>{Z(),J(),X(),L9(),mje=B(`<section><h3> </h3> <p> </p> <div role="none"><!></div></section>`)}));function gje(e,t){O(t,!0);let n=()=>j(s6,`$skipCIConfigured`,r),[r,i]=mn(),a=q(t,`onChange`,3,void 0);var o=vje(),s=I(o),c=F(s),l=F(c,!0);D(c);var u=L(c,2),d=F(u,!0);D(u);var f=L(u,2),p=F(f);{let e=M(()=>Y(`prefs.advanced.beta.switch_label`));I9(p,{key:`beta`,get label(){return z(e)},defaultValue:!1})}D(f),D(s);var m=L(s,2),h=F(m),g=F(h,!0);D(h);var _=L(h,2),v=F(_,!0);D(_);var y=L(_,2),b=F(y);{let e=M(()=>Y(`prefs.advanced.developer_mode.switch_label`));I9(b,{key:`devModeEnabled`,get label(){return z(e)},defaultValue:!1})}D(y),D(m);var x=L(m,2),S=e=>{var t=_je(),n=F(t),r=F(n,!0);D(n);var i=L(n,2),o=F(i,!0);D(i);var s=L(i,2),c=F(s);{let e=M(()=>Y(`prefs.advanced.deploy_hook.url.field_label`));hL(c,{dir:`ltr`,flex:!0,get"aria-label"(){return z(e)},showInlineLabel:!0,onchange:()=>{a()?.({message:Y(qO.deployHookURL?`prefs.advanced.deploy_hook.url.saved`:`prefs.advanced.deploy_hook.url.removed`)})},get value(){return qO.deployHookURL},set value(e){qO.deployHookURL=e}})}D(s);var l=L(s,2),u=F(l);{let e=M(()=>Y(`prefs.advanced.deploy_hook.auth.field_label`));hL(u,{dir:`ltr`,flex:!0,get"aria-label"(){return z(e)},showInlineLabel:!0,onchange:()=>{a()?.({message:Y(qO.deployHookAuthHeader?`prefs.advanced.deploy_hook.auth.saved`:`prefs.advanced.deploy_hook.auth.removed`)})},get value(){return qO.deployHookAuthHeader},set value(e){qO.deployHookAuthHeader=e}})}D(l),D(t),R((e,t)=>{U(r,e),U(o,t)},[()=>Y(`prefs.advanced.deploy_hook.title`),()=>Y(`prefs.advanced.deploy_hook.description`)]),H(e,t)};W(x,e=>{n()&&e(S)}),R((e,t,n,r)=>{U(l,e),U(d,t),U(g,n),U(v,r)},[()=>Y(`prefs.advanced.beta.title`),()=>Y(`prefs.advanced.beta.description`),()=>Y(`prefs.advanced.developer_mode.title`),()=>Y(`prefs.advanced.developer_mode.description`)]),H(e,o),k(),i()}var _je,vje,yje=o((()=>{Z(),J(),X(),$(),L9(),l6(),JO(),_je=B(`<section><h3> </h3> <p> </p> <div role="none"><!></div> <div role="none"><!></div></section>`),vje=B(`<section><h3> </h3> <p> </p> <div role="none"><!></div></section> <section><h3> </h3> <p> </p> <div role="none"><!></div></section> <!>`,1)}));function bje(e,t){O(t,!0),q(t,`onChange`,3,void 0);var n=xje(),r=F(n),i=F(r,!0);D(r);var a=L(r,2),o=F(a);{let e=M(()=>Y(`prefs.appearance.select_theme`));MI(o,{get"aria-label"(){return z(e)},onChange:e=>{qO.theme=e.detail.value},children:(e,t)=>{var n=V();uo(I(n),16,()=>[`auto`,`dark`,`light`],e=>e,(e,t)=>{{let n=M(()=>Y(`prefs.theme.${t}`)),r=M(()=>!qO.theme&&t===`auto`||qO.theme===t);NI(e,{variant:`tertiary`,get label(){return z(n)},get value(){return t},get selected(){return z(r)}})}}),H(e,n)},$$slots:{default:!0}})}D(a),D(n),R(e=>U(i,e),[()=>Y(`prefs.appearance.theme`)]),H(e,n),k()}var xje,Sje=o((()=>{Z(),J(),X(),$(),JO(),xje=B(`<section><h3> </h3> <div role="none"><!></div></section>`)}));function Cje(e,t){O(t,!0),q(t,`onChange`,3,void 0);var n=wje(),r=F(n),i=F(r,!0);D(r);var a=L(r,2),o=F(a);{let e=M(()=>Y(`prefs.contents.editor.use_draft_backup.switch_label`));I9(o,{key:`useDraftBackup`,get label(){return z(e)}})}D(a);var s=L(a,2),c=F(s);{let e=M(()=>Y(`prefs.contents.editor.close_on_save.switch_label`));I9(c,{key:`closeOnSave`,get label(){return z(e)}})}D(s);var l=L(s,2),u=F(l);{let e=M(()=>Y(`prefs.contents.editor.close_with_escape.switch_label`));I9(u,{key:`closeWithEscape`,get label(){return z(e)}})}D(l),D(n),R(e=>U(i,e),[()=>Y(`prefs.contents.editor.title`)]),H(e,n),k()}var wje,Tje=o((()=>{Z(),J(),X(),L9(),wje=B(`<section><h3> </h3> <div role="none"><!></div> <div role="none"><!></div> <div role="none"><!></div></section>`)}));function R9(e,t){O(t,!0);let n=q(t,`onChange`,3,void 0),r=M(()=>t.service.apiKeyPattern),i=N(``);tc(()=>{P(i,qO.apiKeys?.[t.serviceId]??``,!0)}),y2(e,{flex:!0,autocomplete:`off`,spellcheck:`false`,get"aria-label"(){return t.ariaLabel},onchange:()=>{let e=z(i).trim(),a=!!e&&!!z(r)&&!z(r).test(e);qO.apiKeys??={},qO.apiKeys[t.serviceId]=a?``:e,n()?.({message:Y(a?`prefs.changes.api_key_invalid`:e?`prefs.changes.api_key_saved`:`prefs.changes.api_key_removed`),status:a?`error`:`success`})},get value(){return z(i)},set value(e){P(i,e,!0)}}),k()}var Eje=o((()=>{Z(),J(),X(),$(),rc(),JO()}));function Dje(e,t){O(t,!0);let n=q(t,`onChange`,3,void 0);var r=kje(),i=I(r),a=F(i),o=F(a,!0);D(a);var s=L(a,2);RAe(F(s),{}),D(s),D(i);var c=L(i,2),l=F(c),u=F(l,!0);D(l);var d=L(l,2);yo(d,()=>yP(Y(`prefs.i18n.translators.api_keys.description`),`https://sveltiacms.app/en/docs/integrations/translations`),!0),D(d),uo(L(d,2),17,()=>Object.entries(b5),([e,t])=>e,(e,t)=>{var r=M(()=>ee(z(t),2));let i=()=>z(r)[0],a=()=>z(r)[1],o=M(()=>a().serviceLabel);var s=Oje(),c=F(s),l=F(c,!0);D(c);var u=L(c,2),d=F(u);{let e=M(()=>Y(`prefs.i18n.translators.field_label`,{values:{service:z(o)}}));R9(d,{get serviceId(){return i()},get service(){return a()},get ariaLabel(){return z(e)},get onChange(){return n()}})}D(u),D(s),R(()=>U(l,z(o))),H(e,s)}),D(c),R((e,t)=>{U(o,e),U(u,t)},[()=>Y(`prefs.i18n.translators.default.title`),()=>Y(`prefs.i18n.translators.api_keys.title`)]),H(e,r),k()}var Oje,kje,Aje=o((()=>{Z(),J(),X(),Eje(),zAe(),S5(),bP(),Oje=B(`<section><h4> </h4> <div role="none"><!></div></section>`),kje=B(`<section><h3> </h3> <div role="none"><!></div></section> <section><h3> </h3> <p></p> <!></section>`,1)}));function jje(e,t){O(t,!0),q(t,`onChange`,3,void 0);var n=Mje(),r=F(n),i=F(r,!0);D(r);var a=L(r,2);no(F(a),()=>Hh.current,e=>{{let t=M(()=>Y(`prefs.language.ui_language.select_language`));sz(e,{get"aria-label"(){return z(t)},get value(){return Hh.current},onChange:e=>{qO.locale=e.detail.value},children:(e,t)=>{var n=V();uo(I(n),16,()=>Ah,e=>e,(e,t)=>{{let n=M(()=>BC(t,{displayLocale:t})??t),r=M(()=>t===Hh.current);QL(e,{get label(){return z(n)},get value(){return t},get selected(){return z(r)},dir:`auto`})}}),H(e,n)},$$slots:{default:!0}})}}),D(a),D(n),R(e=>U(i,e),[()=>Y(`prefs.language.ui_language.title`)]),H(e,n),k()}var Mje,Nje=o((()=>{Z(),J(),X(),$(),WC(),JO(),Mje=B(`<section><h3> </h3> <div role="none"><!></div></section>`)}));function Pje(e,t){O(t,!0);let n=q(t,`onChange`,3,void 0),r=M(()=>{let{providers:e=[]}=c7();return Object.entries(s7).filter(([t,{authType:n}])=>e.includes(t)&&n!==`none`)}),i=M(()=>Object.entries(Yj).filter(([,{isEnabled:e,authType:t}])=>(e?.()??!0)&&t!==`widget`));var a=Fje(),o=I(a),s=F(o),c=F(s,!0);D(s);var l=L(s,2);yo(l,()=>yP(z(i).length?Y(`prefs.media.cloud_storage.api_keys.description`):Y(`prefs.media.cloud_storage.no_services`),`https://sveltiacms.app/en/docs/media`),!0),D(l),uo(L(l,2),17,()=>z(i),([e,t])=>e,(e,t)=>{var r=M(()=>ee(z(t),2));let i=()=>z(r)[0],a=()=>z(r)[1],o=M(()=>a().serviceLabel);var s=z9(),c=F(s),l=F(c,!0);D(c);var u=L(c,2),d=F(u);{let e=M(()=>Y(`prefs.media.cloud_storage.field_label`,{values:{service:z(o)}}));R9(d,{get serviceId(){return i()},get service(){return a()},get ariaLabel(){return z(e)},get onChange(){return n()}})}D(u),D(s),R(()=>U(l,z(o))),H(e,s)}),D(o);var u=L(o,2),d=F(u),f=F(d,!0);D(d);var p=L(d,2);yo(p,()=>yP(z(r).length?Y(`prefs.media.stock_photos.api_keys.description`):Y(`prefs.media.stock_photos.no_services`),`https://sveltiacms.app/en/docs/integrations/stock-photos`),!0),D(p),uo(L(p,2),17,()=>z(r),([e,t])=>e,(e,t)=>{var r=M(()=>ee(z(t),2));let i=()=>z(r)[0],a=()=>z(r)[1],o=M(()=>a().serviceLabel);var s=z9(),c=F(s),l=F(c,!0);D(c);var u=L(c,2),d=F(u);{let e=M(()=>Y(`prefs.media.stock_photos.field_label`,{values:{service:z(o)}}));R9(d,{get serviceId(){return i()},get service(){return a()},get ariaLabel(){return z(e)},get onChange(){return n()}})}D(u),D(s),R(()=>U(l,z(o))),H(e,s)}),D(u),R((e,t)=>{U(c,e),U(f,t)},[()=>Y(`prefs.media.cloud_storage.api_keys.title`),()=>Y(`prefs.media.stock_photos.api_keys.title`)]),H(e,a),k()}var z9,Fje,Ije=o((()=>{Z(),J(),X(),Eje(),Zj(),$xe(),bP(),z9=B(`<section><h4> </h4> <div role="none"><!></div></section>`),Fje=B(`<section><h3> </h3> <p></p> <!></section> <section><h3> </h3> <p></p> <!></section>`,1)})),B9,Lje=o((()=>{qp(),hje(),yje(),Sje(),Tje(),Aje(),Nje(),Ije(),AF(),B9=un([TF],([e])=>[{key:`appearance`,icon:`palette`,component:bje},{key:`language`,icon:`language`,component:jje},{key:`contents`,icon:`library_books`,component:Cje},{key:`i18n`,icon:`translate`,component:Dje,enabled:(e?.i18n?.locales?.length??0)>1},{key:`media`,icon:`photo_library`,component:Pje},{key:`accessibility`,icon:`accessibility_new`,component:pje},{key:`advanced`,icon:`build`,component:gje}])}));function Rje(e,t){G(e,Bje);let n=N(``),r=N(`success`),i=N(!1);var a=zje(),o=I(a);To(F(o),()=>t.Panel,(e,t)=>{t(e,{onChange:({message:e,status:t})=>{P(n,e,!0),P(r,t??`success`,!0),P(i,!0)}})}),D(o),Bz(L(o,2),{get show(){return z(i)},set show(e){P(i,e,!0)},children:(e,t)=>{cI(e,{get status(){return z(r)},children:(e,t)=>{gt();var r=ja();R(()=>U(r,z(n))),H(e,r)},$$slots:{default:!0}})},$$slots:{default:!0}}),H(e,a)}var zje,Bje,Vje=o((()=>{Z(),J(),$(),zje=B(`<div class="container svelte-1attlke" role="none"><!></div> <!>`,1),Bje={hash:`svelte-1attlke`,code:`.container.svelte-1attlke {display:contents;section:not(:first-child) {margin:16px 0 0;}p {margin-top:0;}h3 {font-size:inherit;& ~ div {margin:8px 0 0;}& ~ p {margin:8px 0 0;color:var(--sui-secondary-foreground-color);font-size:var(--sui-font-size-small);}}h4 {margin-bottom:4px;font-size:var(--sui-font-size-small);}}`}}));function Hje(e,t){O(t,!0),G(e,Wje);let n=q(t,`open`,15,!1),r=q(t,`onClose`,3,void 0),i=N(`appearance`);{let t=M(()=>Y(`settings`));nL(e,{get title(){return z(t)},size:`large`,showOk:!1,showCancel:!1,showClose:!0,onClose:()=>{r()?.()},get open(){return n()},set open(e){n(e)},children:(e,t)=>{var n=Uje(),r=F(n);{let e=M(()=>Y(`categories`));Mce(r,{orientation:`vertical`,get"aria-label"(){return z(e)},children:(e,t)=>{var n=V();uo(I(n),17,()=>A(B9),({key:e,icon:t,enabled:n=!0})=>e,(e,t)=>{let n=()=>z(t).key,r=()=>z(t).icon,a=In(()=>T(z(t).enabled,!0));var o=V(),s=I(o),c=e=>{{let t=e=>{oI(e,{get name(){return r()}})},a=M(()=>Y(`prefs.${n()}.title`)),o=M(()=>n()===z(i));Ice(e,{get label(){return z(a)},get selected(){return z(o)},get"aria-controls"(){return`prefs-tab-${n()??``}`},onSelect:()=>{P(i,n(),!0)},startIcon:t,$$slots:{startIcon:!0}})}};W(s,e=>{z(a)&&e(c)}),H(e,o)}),H(e,n)},$$slots:{default:!0}})}uo(L(r,2),17,()=>A(B9),({key:e,component:t})=>e,(e,t)=>{let n=()=>z(t).key,r=()=>z(t).component;Pce(e,{get id(){return`prefs-tab-${n()??``}`},children:(e,t)=>{Rje(e,{get Panel(){return r()}})},$$slots:{default:!0}})}),D(n),H(e,n)},$$slots:{default:!0}})}k()}var Uje,Wje,Gje=o((()=>{Z(),J(),X(),$(),qp(),Lje(),Vje(),Uje=B(`<div role="none" class="wrapper svelte-pwxwga"><!> <!></div>`),Wje={hash:`svelte-pwxwga`,code:`.wrapper.svelte-pwxwga {display:flex;.sui.tab-list {flex:none;}.sui.tab-panel {flex:auto;border-width:0;}}`}}));function Kje(e,t){O(t,!0);let n=()=>j(xA,`$backendName`,a),r=()=>j(SA,`$backend`,a),i=()=>j(N9,`$canShowMobileSignInDialog`,a),[a,o]=mn(),s=N(!1),c=M(()=>n()===`local`),l=M(()=>n()===`test-repo`);var u=V9(),d=I(u);{let e=M(()=>Y(`account`));iR(d,{get"aria-label"(){return z(e)},children:(e,n)=>{var a=qje(),o=I(a);{let e=M(()=>z(c)?Y(`working_with_local_repo`):z(l)?Y(`working_with_test_repo`):Y(`signed_in_as_x`,{values:{name:FD.account?.login}})),t=M(()=>z(c)||z(l));lR(o,{get label(){return z(e)},get disabled(){return z(t)},onclick:()=>{p4(FD.account?.profileURL)}})}var u=L(o,2);RI(u,{});var d=L(u,2);{let e=M(()=>Y(`live_site`));lR(d,{get label(){return z(e)},onclick:()=>{w4()}})}var f=L(d,2),p=e=>{var t=V9(),n=I(t);{let e=M(()=>Y(`git_repository`)),t=M(()=>!r()?.repository?.treeBaseURL);lR(n,{get label(){return z(e)},get disabled(){return z(t)},onclick:()=>{p4(r()?.repository?.treeBaseURL)}})}var i=L(n,2);{let e=M(()=>Y(`cms_config`));lR(i,{get label(){return z(e)},onclick:()=>{S4(`/config`,{transitionType:`forwards`})}})}H(e,t)};W(f,e=>{qO.devModeEnabled&&e(p)});var m=L(f,2);RI(m,{});var h=L(m,2);{let e=M(()=>Y(`settings`));lR(h,{get label(){return z(e)},onclick:()=>{bE.isSmallScreen?S4(`/settings`,{transitionType:`forwards`}):P(s,!0)}})}var g=L(h,2),_=e=>{uje(e,{get menuButton(){return t.menuButton}})};W(g,e=>{qO.devModeEnabled||e(_)});var v=L(g,2),y=e=>{{let t=M(()=>Y(`sign_in_with_mobile`));lR(e,{get label(){return z(t)},onclick:()=>{pn(P9,!0)}})}};W(v,e=>{i()&&e(y)});var b=L(v,2);nje(b,{});var x=L(b,2);RI(x,{});var S=L(x,2);{let e=M(()=>Y(`sign_out`));lR(S,{get label(){return z(e)},onclick:async()=>{window.requestAnimationFrame(()=>{L4()})}})}H(e,a)},$$slots:{default:!0}})}Hje(L(d,2),{onClose:()=>{t.menuButton?.focus()},get open(){return z(s)},set open(e){P(s,e,!0)}}),H(e,u),k(),o()}var V9,qje,Jje=o((()=>{Z(),J(),X(),$(),rje(),fje(),Gje(),T4(),F9(),wA(),ID(),R4(),SE(),JO(),m4(),V9=B(`<!> <!>`,1),qje=B(`<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>`,1)}));function Yje(e,t){O(t,!0),G(e,Qje);let n=()=>j(xA,`$backendName`,r),[r,i]=mn(),a=N(void 0),o=M(()=>n()===`local`),s=M(()=>!!FD.account?.avatarURL);var c=Zje(),l=F(c);{let e=e=>{var t=V(),n=I(t),r=e=>{oI(e,{name:`arrow_drop_down`,class:`small-arrow`})},i=e=>{var t=Xje();R(()=>K(t,`src`,FD.account?.avatarURL)),H(e,t)},a=e=>{oI(e,{name:`account_circle`})};W(n,e=>{z(o)?e(r):z(s)?e(i,1):e(a,-1)}),H(e,t)},t=e=>{Kje(e,{get menuButton(){return z(a)}})},n=M(()=>!z(o)),r=M(()=>z(o)?Y(`local_workflow.indicator`):void 0),i=M(()=>z(s)?`avatar`:``),c=M(()=>Y(`show_account_menu`));Rs(PI(l,{variant:`ghost`,get iconic(){return z(n)},get label(){return z(r)},get class(){return z(i)},popupPosition:`bottom-right`,get"aria-label"(){return z(c)},endIcon:e,popup:t,$$slots:{endIcon:!0,popup:!0}}),e=>P(a,e,!0),()=>z(a))}D(c),H(e,c),k(),i()}var Xje,Zje,Qje,$je=o((()=>{Z(),J(),X(),$(),Jje(),wA(),ID(),Xje=B(`<img class="avatar svelte-q0ng4j" loading="lazy" alt=""/>`),Zje=B(`<div role="none" class="wrapper svelte-q0ng4j"><!></div>`),Qje={hash:`svelte-q0ng4j`,code:`.wrapper.svelte-q0ng4j {display:contents;button.avatar {border-width:0;background-color:transparent;}}.avatar.svelte-q0ng4j {width:32px;height:32px;border-radius:32px;object-fit:cover;}`}}));function eMe(e,t){O(t,!0);let[n,r]=mn(),i=M(()=>aw({visible:!0,type:`entry`}));{let t=e=>{oI(e,{name:`add`})},n=e=>{{let t=M(()=>Y(`create_entry_or_assets`));iR(e,{get"aria-label"(){return z(t)},children:(e,t)=>{var n=H9(),r=I(n),a=e=>{var t=H9(),n=I(t);uo(n,17,()=>z(i),e=>e.name,(e,t)=>{let n=M(()=>{let{name:e,label:n,label_singular:r,create:i=!0,limit:a=1/0}=z(t);return{name:e,label:n,labelSingular:r,create:i,limit:a}});{let t=M(()=>z(n).labelSingular||z(n).label||z(n).name),r=M(()=>!z(n).create||EN(z(n).name).length>=z(n).limit);lR(e,{get label(){return z(t)},get disabled(){return z(r)},onclick:()=>{S4(`/collections/${z(n).name}/new`,{transitionType:`forwards`})}})}}),RI(L(n,2),{}),H(e,t)};W(r,e=>{z(i).length&&e(a)});var o=L(r,2);{let e=M(()=>Y(`assets`));lR(o,{get label(){return z(e)},onclick:async()=>{S4(`/assets`,{transitionType:`forwards`}),await Gw(100),pn(Z2,!0)}})}H(e,n)},$$slots:{default:!0}})}},r=M(()=>Y(`create_entry_or_assets`));PI(e,{variant:`ghost`,iconic:!0,popupPosition:`bottom-right`,get"aria-label"(){return z(r)},endIcon:t,popup:n,$$slots:{endIcon:!0,popup:!0}})}k(),r()}var H9,tMe=o((()=>{Z(),J(),X(),$(),Kw(),T4(),i4(),dw(),AN(),H9=B(`<!> <!>`,1)}));function nMe(e,t){O(t,!0),G(e,iMe);{let t=e=>{var t=V(),n=I(t),r=e=>{var t=rMe(),n=F(t);D(t),R(e=>{K(t,`aria-label`,`(${e??``})`),U(n,`v${pM??``}`)},[()=>Y(`version_x`,{values:{version:pM}})]),H(e,t)};W(n,e=>{qO.devModeEnabled&&e(r)}),H(e,t)},n=M(()=>Y(`release_notes`));lR(e,{get label(){return z(n)},onclick:()=>{p4(`https://github.com/sveltia/sveltia-cms/releases`)},endIcon:t,$$slots:{endIcon:!0}})}k()}var rMe,iMe,aMe=o((()=>{Z(),J(),X(),$(),mM(),JO(),m4(),rMe=B(`<span class="version svelte-wmw2gz"> </span>`),iMe={hash:`svelte-wmw2gz`,code:`.version.svelte-wmw2gz {border-radius:4px;padding:0 6px;color:var(--sui-secondary-foreground-color);background-color:var(--sui-selected-background-color);font-size:var(--sui-font-size-small);}`}}));function oMe(e,t){O(t,!0);{let n=M(()=>Y(`help`));iR(e,{get"aria-label"(){return z(n)},children:(e,n)=>{var r=cMe(),i=I(r);uje(i,{get menuButton(){return t.menuButton}});var a=L(i,2),o=e=>{var t=sMe(),n=I(t);U9(n,()=>`documentation`,()=>`https://sveltiacms.app/en/docs`);var r=L(n,2);nMe(r,{});var i=L(r,2);U9(i,()=>`announcements`,()=>`https://github.com/sveltia/sveltia-cms/discussions/categories/announcements`);var a=L(i,2);RI(a,{});var o=L(a,2);U9(o,()=>`report_issue`,()=>`https://github.com/sveltia/sveltia-cms/issues`);var s=L(o,2);U9(s,()=>`share_feedback`,()=>`https://github.com/sveltia/sveltia-cms/discussions/categories/ideas`);var c=L(s,2);U9(c,()=>`get_help`,()=>`https://github.com/sveltia/sveltia-cms/discussions/categories/q-a`);var l=L(c,2);U9(l,()=>`donate`,()=>`https://github.com/sponsors/kyoshino`);var u=L(l,2);RI(u,{});var d=L(u,2);U9(d,()=>`bluesky`,()=>`https://bsky.app/profile/sveltiacms.app`);var f=L(d,2);U9(f,()=>`join_discord`,()=>`https://discord.com/invite/5hwCGqup5b`),H(e,t)};W(a,e=>{qO.devModeEnabled&&e(o)}),H(e,r)},$$slots:{default:!0}})}k()}var U9,sMe,cMe,lMe=o((()=>{Z(),J(),X(),$(),aMe(),fje(),JO(),m4(),U9=(e,t=E,n=E)=>{{let r=M(()=>Y(t()));lR(e,{get label(){return z(r)},onclick:()=>{p4(n())}})}},sMe=B(`<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>`,1),cMe=B(`<!> <!>`,1)}));function uMe(e,t){O(t,!0),G(e,fMe);let n=N(void 0),r=N(!1);var i=dMe(),a=I(i),o=F(a);{let e=e=>{oI(e,{name:`help`})},t=e=>{oMe(e,{get menuButton(){return z(n)}})},r=M(()=>Y(`show_help_menu`));Rs(PI(o,{variant:`ghost`,iconic:!0,popupPosition:`bottom-right`,get"aria-label"(){return z(r)},endIcon:e,popup:t,$$slots:{endIcon:!0,popup:!0}}),e=>P(n,e,!0),()=>z(n))}D(a),ije(L(a,2),{onClose:()=>{z(n)?.focus()},get open(){return z(r)},set open(e){P(r,e,!0)}}),H(e,i),k()}var dMe,fMe,pMe=o((()=>{Z(),J(),X(),$(),lMe(),lje(),dMe=B(`<div role="none" class="wrapper svelte-bzzge3"><!></div> <!>`,1),fMe={hash:`svelte-bzzge3`,code:`.wrapper.svelte-bzzge3 {display:contents;}`}}));function mMe(e,t){O(t,!0);{let t=e=>{oI(e,{name:`notifications`})},n=M(()=>Y(`show_notifications`));wI(e,{variant:`ghost`,iconic:!0,hidden:!0,get"aria-label"(){return z(n)},onclick:()=>{},startIcon:t,$$slots:{startIcon:!0}})}k()}var hMe=o((()=>{Z(),J(),X(),$()}));function gMe(e,t){O(t,!0),G(e,vMe);let n=()=>j($4,`$appLogoURL`,i),r=()=>j(TF,`$cmsConfig`,i),[i,a]=mn();var o=V(),s=I(o),c=e=>{{let t=M(()=>Y(`visit_live_site`));wI(e,{variant:`ghost`,iconic:!0,get"aria-label"(){return z(t)},onclick:()=>{w4()},children:(e,t)=>{var r=_Me();R(()=>K(r,`src`,n())),H(e,r)},$$slots:{default:!0}})}};W(s,e=>{n()!==Z4&&(r()?.logo?.show_in_header??!0)&&e(c)}),H(e,o),k(),a()}var _Me,vMe,yMe=o((()=>{Z(),J(),X(),$(),i3(),T4(),AF(),_Me=B(`<img alt="" class="logo svelte-15c9hhi"/>`),vMe={hash:`svelte-15c9hhi`,code:`img.svelte-15c9hhi {width:24px;height:24px;object-fit:contain;}`}}));function bMe(e,t){O(t,!0),G(e,CMe);let n=()=>j(h4,`$hasOverlay`,r),[r,i]=mn();var a=SMe(),o=F(a);{let e=M(()=>Y(`global`));H0(o,{variant:`primary`,get"aria-label"(){return z(e)},children:(e,t)=>{var n=xMe(),r=I(n),i=F(r);gMe(i,{}),YAe(L(i,2),{}),D(r);var a=L(r,2);e8(a,{});var o=L(a,2),s=F(o);oAe(s,{});var c=L(s,2);eMe(c,{});var l=L(c,2);mMe(l,{});var u=L(l,2),d=e=>{uMe(e,{})};W(u,e=>{qO.devModeEnabled&&e(d)}),Yje(L(u,2),{}),D(o),H(e,n)},$$slots:{default:!0}})}D(a),R(()=>a.inert=n()),H(e,a),k(),i()}var xMe,SMe,CMe,wMe=o((()=>{Z(),J(),X(),$(),$je(),tMe(),pMe(),hMe(),QAe(),cAe(),t8(),yMe(),T4(),JO(),xMe=B(`<div role="none" class="buttons"><!> <!></div> <!> <div role="none" class="buttons"><!> <!> <!> <!> <!></div>`,1),SMe=B(`<div role="none" class="toolbar-wrapper svelte-1kz79fh"><!></div>`),CMe={hash:`svelte-1kz79fh`,code:`.toolbar-wrapper.svelte-1kz79fh {display:contents;&[inert] {.sui.search-bar {
1082
1082
  /* Disable the keyboard shortcut for the search bar */display:none !important;}}& > .sui.toolbar {
1083
1083
  @media (width < 768px) {padding:0 4px;
1084
1084
  }.buttons {flex:auto;display:flex;align-items:center;width:50%;&:last-child {justify-content:flex-end;}}.sui.search-bar {flex:none;width:640px;max-width:50%;