quentin.dufour.io/admin/static-cms-app.js

1012 lines
6.4 MiB
JavaScript
Raw Normal View History

2023-02-27 17:51:18 +00:00
/*! For license information please see static-cms-app.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.StaticCmsApp=t():e.StaticCmsApp=t()}(globalThis,(()=>(()=>{var __webpack_modules__={936:(e,t,n)=>{"use strict";var r=n(204),i=n(489);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,s={};function l(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(s[e]=t,e=0;e<t.length;e++)a.add(t[e])}var u=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},h={};function m(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){g[e]=new m(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];g[t]=new m(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){g[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){g[e]=new m(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){g[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){g[e]=new m(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){g[e]=new m(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){g[e]=new m(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){g[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)}));var O=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function v(e,t,n,r){var i=g.hasOwnProperty(t)?g[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!d.call(h,e)||!d.call(p,e)&&(f.test(e)?h[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font
^${ht}+`.valueOf(),{exec:gt}=ne.s`
^
(
(?:\d\d\d\d-\d\d-\d\d \d)?
[\w\-+.:]+
)
${ht}*
(.*)
$`.valueOf(),{exec:Ot}=ne.s`
^
'([^']*)'
${ht}*
(.*)`.valueOf(),{exec:yt}=ne.s`
^
(.*?)
'''('{0,2})
${ht}*
(.*)`.valueOf(),{exec:vt}=ne.s`
^
(.*?)
'''()
${ht}*
(.*)`.valueOf();let bt=vt;const _t=ne.s`
^
.
${ht}*`.valueOf(),wt=/[^\x00-\x1F"#'()<>[\\\]`{}\x7F]+/,{exec:kt}=ne.s`
^
${ht}*
=
${ht}*
(?:
<(${wt})>
${ht}*
)?
(.*)
$`.valueOf(),{exec:xt}=ne.s`
^
<(${wt})>
${ht}*
(.*)
$`.valueOf(),{exec:St}=ne.s`
^
<(${wt})>
${ht}*
(.*)
$`.valueOf(),Pt=q(/[^\\"]+|\\.?|"(?!"")"?/sy),Tt=e=>{let t=0;for(;Pt.test(e);)t=Pt.lastIndex;return t},$t=/[^\\\x00-\x08\x0B-\x1F\x7F]+|\\(?:[btnfr"\\]|[\t ]*\n[\t\n ]*|u[\dA-Fa-f]{4}|U[\dA-Fa-f]{8})/g,Ct=/[^\\\x00-\x09\x0B-\x1F\x7F]+|\\(?:[btnfr"\\]|[\t ]*\n[\t\n ]*|u[\dA-Fa-f]{4}|U[\dA-Fa-f]{8})/g,Et=/[^\\\x00-\x09\x0B-\x1F]+|\\(?:[btnfr"\\]|[\t ]*\n[\t\n ]*|u[\dA-Fa-f]{4}|U[\dA-Fa-f]{8})/g,Qt=/[^\\\x00-\x09\x0B-\x1F]+|\\(?:[btnfr"\\/]|[\t ]*\n[\t\n ]*|u[\dA-Fa-f]{4}|U[\dA-Fa-f]{8})/g;let At=$t;const Dt=e=>!e.replace(At,""),Rt=q(/[^\\"\x00-\x08\x0B-\x1F\x7F]+|\\(?:[btnfr"\\]|u[\dA-Fa-f]{4}|U[\dA-Fa-f]{8})/y),Lt=q(/[^\\"\x00-\x08\x0B-\x1F\x7F]+|\\(?:[btnfr"\\]|u[\dA-Fa-f]{4}|U[\dA-Fa-f]{8})/y),Mt=q(/[^\\"\x00-\x08\x0B-\x1F]+|\\(?:[btnfr"\\]|u[\dA-Fa-f]{4}|U[\dA-Fa-f]{8})/y),jt=q(/[^\\"\x00-\x08\x0B-\x1F]+|\\(?:[btnfr"\\/]|u[\dA-Fa-f]{4}|U[\dA-Fa-f]{8})/y);let It=jt;const zt=e=>{let t=It.lastIndex=1;for(;It.test(e);)t=It.lastIndex;return t!==e.length&&'"'===e[t]||ut(l("Bad basic string"+pt(" at "))),t},{test:Ft}=q(/^[ \t]*\./),Wt=/^[ \t]*\.[ \t]*/,{exec:Ut}=q(/^[\w-]+/),{exec:Nt}=q(/^[^ \t#=[\]'".]+(?:[ \t]+[^ \t#=[\]'".]+)*/);let Bt=Nt;const{exec:Yt}=q(/^'[^'\x00-\x08\x0B-\x1F\x7F]*'/),{exec:Xt}=q(/^'[^'\x00-\x08\x0B-\x1F]*'/);let qt=Xt,Zt=!0;const Vt=(e,t)=>{const n="["===e[1];n?(Zt||ut(l("Array of Tables is not allowed before TOML v0.2"+pt(", which at "))),e=e.slice(2)):e=e.slice(1),e=e.replace(mt,"");const{leadingKeys:r,finalKey:i}=({lineRest:e}=t(e));let o;return(e=e.replace(mt,""))&&"]"===e[0]||ut(l("Table header is not closed"+pt(", which is found at "))),(e.length>1?"]"===e[1]===n:!n)||ut(l("Square brackets of Table definition statement not match"+pt(" at "))),(e=e.slice(n?2:1).replace(mt,""))&&"<"===e[0]?({1:o,2:e}=St(e)||ut(l("Bad tag"+pt(" at ")))):o="",{leadingKeys:r,finalKey:i,asArrayItem:n,tag:o,lineRest:e}},{test:Ht}=q(/[\x00-\x08\x0B-\x1F\x7F]/),{test:Gt}=q(/[\x00-\x08\x0B-\x1F]/);let Kt=Ht;const Jt=ne`
(?:
0
(?:
b[01][_01]*
|
o[0-7][_0-7]*
|
x[\dA-Fa-f][_\dA-Fa-f]*
|
(?:\.\d[_\d]*)?(?:[Ee]-?\d[_\d]*)?
)
|
[1-9][_\d]*
(?:\.\d[_\d]*)?(?:[Ee]-?\d[_\d]*)?
|
inf
|
nan
)
`.valueOf(),{test:en}=ne`
^(?:
-?${Jt}
(?:-${Jt})*
|
true
|
false
)$
`.valueOf(),{test:tn}=ne`_(?![\dA-Fa-f])`.valueOf(),nn=e=>en(e)&&!tn(e);let rn=!0,on="",an=null,sn=!0,ln=0,cn=0;const un={test:()=>!0},dn=class extends h{constructor(e){super(`^${se(e)}$`);let t=-1;for(let n=e.length;n;){const{length:r}=e[--n];r>t&&(t=r)}return this.lastIndex=t+1,this}test(e){return e.length<this.lastIndex&&super.test(e)}},fn=w.bind(_(dn.prototype));let pn,hn,mn,gn,On,yn,vn,bn,_n,wn,kn,xn,Sn,Pn=un;const Tn=new m,$n=g.bind(Tn),Cn=O.bind(Tn),En=()=>{const e=t=>{const n=$n(t);return n?n===e||ut(u("Types in Array must be same"+pt(". Check "))):Cn(t,e),t};return e},Qn={asNulls:En(),asStrings:En(),asTables:En(),asArrays:En(),asBooleans:En(),asFloats:En(),asIntegers:En(),asOffsetDateTimes:En(),asLocalDateTimes:En(),asLocalDates:En(),asLocalTimes:En()},An=e=>e;let Dn,Rn,Ln,Mn,jn,In,zn,Fn,Wn,Un,Nn,Bn=null,Yn=null;const Xn=(e,t,n,r)=>{const i=y(k);i._linked=Yn,i.tag=e,n&&(i.table=n,i.key=r),t&&(i.array=t,i.index=t.length),Yn=i},qn=()=>{throw ut(l("xOptions.tag is not enabled, but found tag syntax"+pt(" at ")))};let Zn=qn;const Vn=(e,n,r,i,o,a)=>{let s;switch(on=a,e){case 1:rn=s=gn=vn=mn=!0,hn=On=!1;break;case.5:rn=gn=vn=mn=!0,s=hn=On=!1;break;case.4:rn=On=mn=!0,s=hn=gn=vn=!1;break;case.3:rn=On=!0,s=hn=gn=vn=mn=!1;break;case.2:case.1:hn=On=!0,rn=s=gn=vn=mn=!1;break;default:throw c("TOML.parse(,specificationVersion)")}if((e=>{switch(e){case 1:bt=yt,qt=Yt,Kt=Ht,At=$t,It=Rt,Bt=Ut,Zt=!0;break;case.5:bt=vt,qt=Yt,Kt=Ht,At=Ct,It=Lt,Bt=Ut,Zt=!0;break;case.4:bt=vt,qt=Xt,Kt=Gt,At=Et,It=Mt,Bt=Ut,Zt=!0;break;default:bt=vt,qt=Xt,Kt=Gt,At=Qt,It=jt,Bt=Nt,Zt=!1}})(e),"string"==typeof n)an=n;else{if(n!==f)throw u(`TOML.parse(${on?`${on}multilineStringJoiner`:",{ joiner }"})`);an=null}if(r===f||!0===r)sn=!0;else if(!1===r)sn=!1;else{if("number"!=typeof r)throw u(`TOML.parse(${on?`${on},useBigInt`:",{ bigint }"})`);if(!v(r))throw c(`TOML.parse(${on?`${on},useBigInt`:",{ bigint }"})`);sn=null,r>=0?ln=-(cn=r):cn=-(ln=r)-1}if(!p&&!1!==sn)throw d(`Can't work without TOML.parse(${on?`${on},useBigInt`:",{ bigint }"}) being set to false, because the host doesn't have BigInt support`);if(null==i)Pn=un;else{if(!fn(i))throw u("TOML.parse(,{ keys })");Pn=i}if(null==o)bn=rt,yn=_n=wn=kn=!1,Zn=qn;else{if("object"!=typeof o)throw u(`TOML.parse(${on?`${on},,xOptions`:",{ x }"})`);{const{order:e,longer:n,exact:r,null:i,multi:a,comment:l,string:c,literal:d,tag:f}=o,p=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(o,t),h=b(p);if(h.length)throw u(`TOML.parse(${on?`${on},,{ ${h.join(", ")} }`:`,{ x: { ${h.join(", ")} } }`})`);if(bn=e?it:rt,_n=!n,yn=!!r,wn=!!i,kn=!!a,xn=!!l,Sn=!!c,pn=!!d,f){if("function"!=typeof f)throw u(`TOML.parse(${on?`${on},,{ tag }`:",{ x: { tag } }"})`);if(!s)throw u(`TOML.parse(${on?`${on},,xOptions`:",{ x }"}) xOptions.tag needs at least TOML 1.0 to support mixed type array`);Bn=f,Zn=Xn}else Zn=qn}}s?Dn=Rn=Ln=Mn=jn=In=zn=Fn=Wn=Un=Nn=An:({asNulls:Dn,asStrings:Rn,asTables:Ln,asArrays:Mn,asBooleans:jn,asFloats:In,asIntegers:zn,asOffsetDateTimes:Fn,asLocalDateTimes:Wn,asLocalDates:Un,asLocalTimes:Nn}=Qn)},Hn=ArrayBuffer.isView,Gn=function(){if("function"==typeof ArrayBuffer){var e=F.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get);return function(t){try{e(t)}catch(e){return!1}return!0}}return function(){return!1}}(),Kn=TextDecoder,Jn=Symbol,er=Jn("previous"),tr=e=>{let t=e,n=t.next();if(!n.done)for(n.value[er]=t,n=(t=n.value).next();;)if(n.done){if(t===e)break;t=t[er],n=t.next(n.value)}else n.value[er]=t,n=(t=n.value).next();return n.value},nr=Jn("_literal"),rr=(e,t)=>{const n=A(t);return n[nr]=e,n},ir=new de,or=pe.bind(ir),ar=fe.bind(ir),sr=new de,lr=pe.bind(sr),cr=fe.bind(sr),ur=e=>{const t=[];return or(t),e&&lr(t),t},dr=Date,fr=Date.parse,pr=Object.preventExtensions,hr=Object.getOwnP
\d\d\d\d-
(?:
0
(?:
[13578]-${Or}
|
[469]-${gr}
|
2-${/(?:0[1-9]|1\d|2\d)/}
)
|
1
(?:
[02]-${Or}
|
1-${gr}
)
)
`.valueOf(),_r=ne`
${yr}:${vr}:${vr}
`.valueOf(),{exec:wr}=q(/(([+-])\d\d):(\d\d)$/),{exec:kr}=ne`
^
${br}
[Tt ]
${_r}
(?:\.\d{1,3}(\d*?)0*)?
(?:[Zz]|[+-]${yr}:${vr})
$`.valueOf(),{exec:xr}=ne`
^
${br}
[Tt ]
${_r}
()
[Zz]
$`.valueOf(),{test:Sr}=ne`
^
${br}
[Tt ]
${_r}
(?:\.\d+)?
$`.valueOf(),{test:Pr}=ne`
^
${br}
$`.valueOf(),{test:Tr}=ne`
^
${_r}
(?:\.\d+)?
$`.valueOf(),$r=/[ t]/,Cr=/[-T:.]/g,Er=/\.?0+$/,Qr=/\.(\d*?)0+$/,Ar=(e,t)=>t,Dr=(()=>{const e=function(){return this},t=Oe(null);{const e=Oe(null);for(const n of xe(dr.prototype))"constructor"===n||"toJSON"===n||(t[n]=e)}return e.prototype=pr(y(dr.prototype,t)),_(e)})(),Rr=e=>e.replace(Qr,Ar).replace(Cr,""),Lr=/./gs,Mr=e=>" "[e],jr=e=>{if(e.startsWith("02-29",5)){const t=+e.slice(0,4);return!(3&t||!(t%100)&&(t%400||!(t%3200)))}return!0},{test:Ir}=ne.s`^.....(?:06.30|12.31).23:59:59`.valueOf(),zr=function(e,t){for(var n=y(k),r=me(t),i=r.length,o=0;o<i;++o){var a=r[o];n[a]=B(t[a])}if(ge){var s=ge(t);for(i=s.length,o=0;o<i;++o){var l=s[o];W(t,l)&&(n[l]=B(t[l]))}}return ve(e,n)}(new dr(0),hr(dr.prototype)),Fr=Jn("OffsetDateTime_ISOString"),Wr=Jn("OffsetDateTime_value"),Ur=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return zr.setTime(+e[Wr]+t),zr},Nr=mr((e=Jn.toStringTag,class extends Dr{get[e](){return"OffsetDateTime"}valueOf(){return this[Wr]}toISOString(){return this[Fr]}constructor(e){jr(e)||ut(l(`Invalid Offset Date-Time ${e}`+pt(" at ")));const t=e.startsWith("60",17);let n=t?e.slice(0,17)+"59"+e.slice(19):e;const{1:r=""}=(hn?xr(n):kr(n))||ut(l(`Invalid Offset Date-Time ${e}`+pt(" at "))),o=fr(n=n.replace($r,"T").replace("z","Z"));return t&&(zr.setTime(o),Ir(zr.toISOString())||ut(l(`Invalid Offset Date-Time ${e}`+pt(" at ")))),super(),i(this,Fr,void 0),i(this,Wr,void 0),this[Fr]=n,this[Wr]=((e,t)=>e<0?(""+(e+6216730554e4)).replace(Lr,Mr).padStart(14," ")+t.replace(Lr,Mr)+e:t?(e+".").padStart(16,"0")+t:(""+e).padStart(15,"0"))(o,r),this}getUTCFullYear(){return Ur(this).getUTCFullYear()}getUTCMonth(){return Ur(this).getUTCMonth()}getUTCDate(){return Ur(this).getUTCDate()}getUTCHours(){return Ur(this).getUTCHours()}getUTCMinutes(){return Ur(this).getUTCMinutes()}getUTCSeconds(){return Ur(this).getUTCSeconds()}getUTCMilliseconds(){return Ur(this).getUTCMilliseconds()}getUTCDay(){return Ur(this).getUTCDay()}getTimezoneOffset(){const e=wr(this[Fr]);return e?60*+e[1]+ +(e[2]+e[3]):0}getTime(){return D(+this[Wr])}})),Br=Jn("LocalDateTime_ISOString"),Yr=Jn("LocalDateTime_value"),Xr=(e,t,n)=>+e[Br].slice(t,n),qr=(e,t,n,r)=>{const i=""+r,o=n-t;if(i.length>o)throw c();e[Yr]=Rr(e[Br]=e[Br].slice(0,t)+i.padStart(o,"0")+e[Br].slice(n))},Zr=mr((n=Jn.toStringTag,class extends Dr{get[n](){return"LocalDateTime"}valueOf(){return this[Yr]}toISOString(){return this[Br]}constructor(e){return Sr(e)&&jr(e)||ut(l(`Invalid Local Date-Time ${e}`+pt(" at "))),super(),i(this,Br,void 0),i(this,Yr,void 0),this[Yr]=Rr(this[Br]=e.replace($r,"T")),this}getFullYear(){return Xr(this,0,4)}setFullYear(e){qr(this,0,4,e)}getMonth(){return Xr(this,5,7)-1}setMonth(e){qr(this,5,7,e+1)}getDate(){return Xr(this,8,10)}setDate(e){qr(this,8,10,e)}getHours(){return Xr(this,11,13)}setHours(e){qr(this,11,13,e)}getMinutes(){return Xr(this,14,16)}setMinutes(e){qr(this,14,16,e)}getSeconds(){return Xr(this,17,19)}setSeconds(e){qr(this,17,19,e)}getMilliseconds(){return+this[Yr].slice(14,17).padEnd(3,"0")}setMilliseconds(e){this[Yr]=Rr(this[Br]=this[Br].slice(0,19)+(e?("."+(""+e).padStart(3,"0")).replace(Er,""):""))}})),Vr=Jn("LocalDate_ISOString"),Hr=Jn("LocalDate_value"),Gr=(e,t,n)=>+e[Vr].slice(t,n),Kr=(e,t,n,r)=>{const i=""+r,o=n-t;if(i.length>o)throw c();e[Hr]=Rr(e[Vr]=e[Vr].slice(0,t)+i.padStart(o,"0")+e[Vr].slice(n))},Jr=mr((o=Jn.toStringTag,class extends Dr{get[o](){return"LocalDate"}valueOf(){return this[Hr]}toISOString(){return this[Vr]}constructor(e){return Pr(e)&&jr(e)||ut(l(`Invalid Local Date ${e}`+pt(" at "))),super(),i(this,Vr,void 0),i(this,Hr,void 0),this[Hr]=Rr(this[Vr]=e),this}getFullYear(){return Gr(this,0,4)}setFullYear(e){Kr(this,0,4,e)}getMonth(){return Gr(this,5,7)-1}setMonth(e){Kr(this,5,7,e+1)}getDate(){return Gr(this,8,10)}setDate(e){Kr(this,8,10,e)}})),ei=Jn("LocalTime_ISOString"),ti=Jn("LocalTime_value"),ni=(e,t,n)=>+e[ei].slice(t,n),ri=(e,t,n,r)=>{const i=""+r,o=n-t;if(i.length>o)throw c();e[ti]=Rr(e[ei]=e[ei].slice(0,t)+i.padStart(2,"0")+e[ei].slice(n))},ii=mr((a=Jn.toStringTag,cla
^
${di}
(?:
\.\d[_\d]*
(?:[eE][-+]?\d[_\d]*)?
|
[eE][-+]?\d[_\d]*
)
$`.valueOf(),Si=/_/g,{test:Pi}=q(/^[-+]?0(?:\.0+)?(?:[eE][-+]?0+)?$/),{exec:Ti}=q(/^[-0]?(\d*)(?:\.(\d+))?(?:e\+?(-?\d+))?$/),{exec:$i}=q(/^[-+]?0?(\d*)(?:\.(\d*?)0*)?(?:[eE]\+?(-?\d+))?$/),Ci=e=>{if(!xi(e)||fi(e)){if(vn){if("inf"===e||"+inf"===e)return L;if("-inf"===e)return ki;if("nan"===e||"+nan"===e)return NaN;if("-nan"===e)return NaN}else if(!yn){if("inf"===e||"+inf"===e)return L;if("-inf"===e)return ki}throw ut(l(`Invalid Float ${e}`+pt(" at ")))}const t=e.replace(Si,""),n=+t;if(yn){wi(n)||ut(c(`Float ${e} has been as big as inf`+pt(" at "))),n||Pi(t)||ut(c(`Float ${e} has been as little as ${"-"===e[0]?"-":""}0`+pt(" at ")));const{1:r,2:i="",3:o=""}=Ti(n),{1:a,2:s="",3:l=""}=$i(t);a+s===r+i&&l-s.length==o-i.length||ut(c(`Float ${e} has lost its exact and been ${n}`+pt(" at ")))}return n},Ei=(e,t)=>{const{length:n}=t;let r=0;for(;r<n;){const i=t[r++];if(!(i in e)){for(e=e[i]=new bn(Je);r<n;)e=e[t[r++]]=new bn(Je);return e}if(e=e[i],Ze(e))Fe(e)&&ut(d("Trying to define Table under Inline Table"+pt(" at ")));else{if(!ar(e))throw ut(d("Trying to define Table under non-Table value"+pt(" at ")));cr(e)&&ut(d("Trying to append value to Static Array"+pt(" at "))),e=e[e.length-1]}}return e},Qi=(e,t,n,r)=>{let i;if(n){let n;t in e?ar(n=e[t])&&!cr(n)||ut(d("Trying to push Table to non-ArrayOfTables value"+pt(" at "))):n=e[t]=ur(!1),r&&Zn(r,n,e,t),n[n.length]=i=new bn(Ke)}else t in e?(i=e[t],nt(i)&&ut(d("A table defined implicitly via key/value pair can not be accessed to via []"+pt(", which at "))),(e=>!!Ge(e)&&(Ye(e),!0))(i)||ut(d("Duplicate Table definition"+pt(" at ")))):e[t]=i=new bn(Ke),r&&Zn(r,null,e,t);return i},Ai=(e,t)=>{const{length:n}=t;let r=0;for(;r<n;){const i=t[r++];if(!(i in e)){for(e=e[i]=new bn(Je,!0);r<n;)e=e[t[r++]]=new bn(Je,!0);return e}e=e[i],Ze(e)||ut(d("Trying to assign property through non-Table value"+pt(" at "))),Fe(e)&&ut(d("Trying to assign property through static Inline Table"+pt(" at "))),nt(e)||ut(d("A table defined implicitly via [] can not be accessed to via key/value pair"+pt(", which at ")))}return e},Di=e=>(Kt(e)&&ut(l("Control characters other than Tab are not permitted in a Literal String"+pt(", which was found at "))),e),Ri=(e,t,n)=>{if(!n.startsWith("'''")){const r=Ot(n)||ut(l("Bad literal string"+pt(" at "))),i=Di(r[1]);return e[t]=pn?rr(n.slice(0,i.length+2),i):i,r[2]}const r=bt(n.slice(3));if(r){const i=Di(r[1])+r[2];return e[t]=pn?rr(n.slice(0,i.length+6),i):i,r[3]}const i=new ft("Multi-line Literal String",n.length),o=!(n=n.slice(3));if(o){n=i.must();const r=bt(n);if(r){const i=Di(r[1])+r[2];return e[t]=pn?rr(["'''",n.slice(0,i.length+3)],i):i,r[3]}}null===an&&i.nowrap(on);for(const r=[Di(n)];;){const a=i.must(),s=bt(a);if(s){r[r.length]=Di(s[1])+s[2];const i=r.join(an);return pn?(r[r.length-1]+="'''",o?r.unshift("'''"):r[0]=`'''${n}`,e[t]=rr(r,i)):e[t]=i,s[3]}r[r.length]=Di(a)}},Li=(e,t,n)=>{if(!n.startsWith('"""')){const r=zt(n),i=ci(n.slice(1,r));return e[t]=pn?rr(n.slice(0,r+1),i):i,n.slice(r+1).replace(mt,"")}let r=3+Tt(n.slice(3));if(n.length!==r){const i=n.slice(3,r);Dt(i)||ut(l("Bad multi-line basic string"+pt(" at ")));const o=ci(i)+(n.startsWith('"',r+=3)?n.startsWith('"',++r)?(++r,'""'):'"':"");return e[t]=pn?rr(n.slice(0,r),o):o,n.slice(r).replace(mt,"")}const i=new ft("Multi-line Basic String",r),o=(n=n.slice(3))?0:1;if(o){n=i.must();let r=Tt(n);if(n.length!==r){const i=n.slice(0,r);Dt(i)||ut(l("Bad multi-line basic string"+pt(" at ")));const a=ui(i,an,o)+(n.startsWith('"',r+=3)?n.startsWith('"',++r)?(++r,'""'):'"':"");return e[t]=pn?rr(['"""',n.slice(0,r)],a):a,n.slice(r).replace(mt,"")}}null===an&&i.nowrap(on),Dt(n+"\n")||ut(l("Bad multi-line basic string"+pt(" at ")));for(const r=[n];;){const a=i.must();let s=Tt(a);if(a.length!==s){const i=a.slice(0,s);Dt(i)||ut(l("Bad multi-line basic string"+pt(" at ")));const c=ui(r.join("\n")+"\n"+i,an,o)+(a.startsWith('"',s+=3)?a.startsWith('"',++s)?(++s,'""'):'"':"");return pn?(o?r.unshift('"""'):r[0]=`"""${n}`,r[r.length]=`${i}"""`,e[t]=rr(r,c)):e[t]=c,a.slice(s).replace(mt,"")}Dt(a+"\n")||ut(l("Bad multi-line basic strin
|| (${s} == "string" && ${i} && ${i} == +${i})`).assign(l,a._`+${i}`);case"integer":return void r.elseIf(a._`${s} === "boolean" || ${i} === null
|| (${s} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(l,a._`+${i}`);case"boolean":return void r.elseIf(a._`${i} === "false" || ${i} === 0 || ${i} === null`).assign(l,!1).elseIf(a._`${i} === "true" || ${i} === 1`).assign(l,!0);case"null":return r.elseIf(a._`${i} === "" || ${i} === 0 || ${i} === false`),void r.assign(l,null);case"array":r.elseIf(a._`${s} === "string" || ${s} === "number"
|| ${s} === "boolean" || ${i} === null`).assign(l,a._`[${i}]`)}}r.else(),h(e),r.endIf(),r.if(a._`${l} !== undefined`,(()=>{r.assign(i,l),function({gen:e,parentData:t,parentDataProperty:n},r){e.if(a._`${t} !== undefined`,(()=>e.assign(a._`${t}[${n}]`,r)))}(e,l)}))}(e,t,s):h(e)}))}return c};const u=new Set(["string","number","integer","boolean","null"]);function d(e,t,n,r=l.Correct){const i=r===l.Correct?a.operators.EQ:a.operators.NEQ;let o;switch(e){case"null":return a._`${t} ${i} null`;case"array":o=a._`Array.isArray(${t})`;break;case"object":o=a._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=s(a._`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=s();break;default:return a._`typeof ${t} ${i} ${e}`}return r===l.Correct?o:(0,a.not)(o);function s(e=a.nil){return(0,a.and)(a._`typeof ${t} == "number"`,e,n?a._`isFinite(${t})`:a.nil)}}function f(e,t,n,r){if(1===e.length)return d(e[0],t,n,r);let i;const o=(0,s.toHash)(e);if(o.array&&o.object){const e=a._`typeof ${t} != "object"`;i=o.null?e:a._`!${t} || ${e}`,delete o.null,delete o.array,delete o.object}else i=a.nil;o.number&&delete o.integer;for(const e in o)i=(0,a.and)(i,d(e,t,n,r));return i}t.checkDataType=d,t.checkDataTypes=f;const p={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?a._`{type: ${e}}`:a._`{type: ${t}}`};function h(e){const t=function(e){const{gen:t,data:n,schema:r}=e,i=(0,s.schemaRefOrVal)(e,r,"type");return{gen:t,keyword:"type",data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:e}}(e);(0,o.reportError)(t,p)}t.reportTypeError=h},15944:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const r=n(56110),i=n(20530);function o(e,t,n){const{gen:o,compositeRule:a,data:s,opts:l}=e;if(void 0===n)return;const c=r._`${s}${(0,r.getProperty)(t)}`;if(a)return void(0,i.checkStrictMode)(e,`default is ignored for: ${c}`);let u=r._`${c} === undefined`;"empty"===l.useDefaults&&(u=r._`${u} || ${c} === null || ${c} === ""`),o.if(u,r._`${c} = ${(0,r.stringify)(n)}`)}t.assignDefaults=function(e,t){const{properties:n,items:r}=e.schema;if("object"===t&&n)for(const t in n)o(e,t,n[t].default);else"array"===t&&Array.isArray(r)&&r.forEach(((t,n)=>o(e,n,t.default)))}},43750:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const r=n(42971),i=n(97349),o=n(87177),a=n(97349),s=n(15944),l=n(42e3),c=n(35678),u=n(56110),d=n(17748),f=n(66184),p=n(20530),h=n(16257);function m({gen:e,validateName:t,schema:n,schemaEnv:r,opts:i},o){i.code.es5?e.func(t,u._`${d.default.data}, ${d.default.valCxt}`,r.$async,(()=>{e.code(u._`"use strict"; ${g(n,i)}`),function(e,t){e.if(d.default.valCxt,(()=>{e.var(d.default.instancePath,u._`${d.default.valCxt}.${d.default.instancePath}`),e.var(d.default.parentData,u._`${d.default.valCxt}.${d.default.parentData}`),e.var(d.default.parentDataProperty,u._`${d.default.valCxt}.${d.default.parentDataProperty}`),e.var(d.default.rootData,u._`${d.default.valCxt}.${d.default.rootData}`),t.dynamicRef&&e.var(d.default.dynamicAnchors,u._`${d.default.valCxt}.${d.default.dynamicAnchors}`)}),(()=>{e.var(d.default.instancePath,u._`""`),e.var(d.default.parentData,u._`undefined`),e.var(d.default.parentDataProperty,u._`undefined`),e.var(d.default.rootData,d.default.data),t.dynamicRef&&e.var(d.default.dynamicAnchors,u._`{}`)}))}(e,i),e.code(o)})):e.func(t,u._`${d.default.data}, ${function(e){return u._`{${d.default.instancePath}="", ${d.default.parentData}, ${d.default.parentDataProperty}, ${d.default.rootData}=${d.default.data}${e.dynamicRef?u._`, ${d.default.dynamicAnchors}={}`:u.nil}}={}`}(i)}`,r.$async,(()=>e.code(g(n,i)).code(o)))}function g(e,t){const n="object"==typeof e&&e[t.schemaId];return n&&(t.code.source||t.code.process)?u._`/*# sourceURL=${n} */`:u.nil}function O({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const n in e)if(t.RULES.all[n])return!0;return!1}function y(e){return"boolean"!=typeof e.schema}function v(e){(0,p.checkUnknownRul
missingProperty: ${i},
depsCount: ${t},
deps: ${n}}`};const a={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,n]=function({schema:e}){const t={},n={};for(const r in e)"__proto__"!==r&&((Array.isArray(e[r])?t:n)[r]=e[r]);return[t,n]}(e);s(e,t),l(e,n)}};function s(e,t=e.schema){const{gen:n,data:i,it:a}=e;if(0===Object.keys(t).length)return;const s=n.let("missing");for(const l in t){const c=t[l];if(0===c.length)continue;const u=(0,o.propertyInData)(n,i,l,a.opts.ownProperties);e.setParams({property:l,depsCount:c.length,deps:c.join(", ")}),a.allErrors?n.if(u,(()=>{for(const t of c)(0,o.checkReportMissingProp)(e,t)})):(n.if(r._`${u} && (${(0,o.checkMissingProp)(e,c,s)})`),(0,o.reportMissingProp)(e,s),n.else())}}function l(e,t=e.schema){const{gen:n,data:r,keyword:a,it:s}=e,l=n.name("valid");for(const c in t)(0,i.alwaysValidSchema)(s,t[c])||(n.if((0,o.propertyInData)(n,r,c,s.opts.ownProperties),(()=>{const t=e.subschema({keyword:a,schemaProp:c},l);e.mergeValidEvaluated(t,l)}),(()=>n.var(l,!0))),e.ok(l))}t.validatePropertyDeps=s,t.validateSchemaDeps=l,t.default=a},17498:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(56110),i=n(20530),o={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>r.str`must match "${e.ifClause}" schema`,params:({params:e})=>r._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:n,it:o}=e;void 0===n.then&&void 0===n.else&&(0,i.checkStrictMode)(o,'"if" without "then" and "else" is ignored');const s=a(o,"then"),l=a(o,"else");if(!s&&!l)return;const c=t.let("valid",!0),u=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}(),e.reset(),s&&l){const n=t.let("ifClause");e.setParams({ifClause:n}),t.if(u,d("then",n),d("else",n))}else s?t.if(u,d("then")):t.if((0,r.not)(u),d("else"));function d(n,i){return()=>{const o=e.subschema({keyword:n},u);t.assign(c,u),e.mergeValidEvaluated(o,c),i?t.assign(i,r._`${n}`):e.setParams({ifClause:n})}}e.pass(c,(()=>e.error(!0)))}};function a(e,t){const n=e.schema[t];return void 0!==n&&!(0,i.alwaysValidSchema)(e,n)}t.default=o},3698:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(81600),i=n(53609),o=n(38223),a=n(62490),s=n(97458),l=n(32790),c=n(13796),u=n(88183),d=n(11935),f=n(98289),p=n(62514),h=n(50120),m=n(87323),g=n(68302),O=n(17498),y=n(96105);t.default=function(e=!1){const t=[p.default,h.default,m.default,g.default,O.default,y.default,c.default,u.default,l.default,d.default,f.default];return e?t.push(i.default,a.default):t.push(r.default,o.default),t.push(s.default),t}},38223:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const r=n(56110),i=n(20530),o=n(57111),a={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:n}=e;if(Array.isArray(t))return s(e,"additionalItems",t);n.items=!0,(0,i.alwaysValidSchema)(n,t)||e.ok((0,o.validateArray)(e))}};function s(e,t,n=e.schema){const{gen:o,parentSchema:a,data:s,keyword:l,it:c}=e;!function(e){const{opts:r,errSchemaPath:o}=c,a=n.length,s=a===e.minItems&&(a===e.maxItems||!1===e[t]);if(r.strictTuples&&!s){const e=`"${l}" is ${a}-tuple, but minItems or maxItems/${t} are not specified or different at path "${o}"`;(0,i.checkStrictMode)(c,e,r.strictTuples)}}(a),c.opts.unevaluated&&n.length&&!0!==c.items&&(c.items=i.mergeEvaluated.items(o,n.length,c.items));const u=o.name("valid"),d=o.const("len",r._`${s}.length`);n.forEach(((t,n)=>{(0,i.alwaysValidSchema)(c,t)||(o.if(r._`${d} > ${n}`,(()=>e.subschema({keyword:l,schemaProp:n,dataProp:n},u))),e.ok(u))}))}t.validateTuple=s,t.default=a},62490:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(56110),i=n(20530),o=n(57111),a=n(81600),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>r.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>r._`{limit: ${e}}`},code(e){const{schem
Multiple widgets registered with name "${t}". Only the last widget registered with
this name will be used.
`),!n)throw Error(`Widget "${t}" registered without \`controlComponent\`.`);Du.widgets[t]={control:n,preview:r,validator:i,getValidValue:o,getDefaultValue:a,schema:s}}else console.error("`registerWidget` failed, called with incorrect arguments.")}function zu(e){return Du.widgets[e]}function Fu(){return Object.entries(Du.widgets).map((e=>{let[t,n]=e;return Eu({name:t},n)}))}function Wu(e){return zu(e||"string")||zu("unknown")}function Uu(e){return Du.widgetValueSerializers[e]}function Nu(e,t){e&&t?Du.backends[e]?console.error(`Backend [${e}] already registered. Please choose a different name.`):Du.backends[e]={init:(e,n)=>new t(e,n)}:console.error("Backend parameters invalid. example: CMS.registerBackend('myBackend', BackendClass)")}function Bu(e){return Du.backends[e]}function Yu(e){return Du.mediaLibraries.find((t=>t.name===e))}function Xu(e){if(!Au.includes(e))throw new Error(`Invalid event name '${e}'`)}async function qu(e){let{name:t,data:n}=e;Xu(t);const r=Du.eventHandlers[t];let i=Eu({},n);for(const{handler:e,options:t}of r){const r=await e(i,t);if(void 0!==r){const e=Eu(Eu({},i.entry),{},{data:r});i=Eu(Eu({},n),{},{entry:e})}}return i.entry.data}function Zu(e,t){e&&t?Du.locales[e]=t:console.error("Locale parameters invalid. example: CMS.registerLocale('locale', phrases)")}function Vu(e){return Du.locales[e]}function Hu(e){var t;return null!==(t=Du.icons[e])&&void 0!==t?t:null}function Gu(){return Du.additionalLinks}function Ku(e){return Du.shortcodes[e]}function Ju(){return Du.shortcodes}var ed=__nested_webpack_require_2836554__(1869),td=__nested_webpack_require_2836554__.n(ed);function nd(e){let t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return{collection:e,slug:arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",path:arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",partial:t.partial||!1,raw:t.raw||"",data:t.data||{},label:t.label||null,isModification:td()(t.isModification)?t.isModification:null,mediaFiles:t.mediaFiles||[],author:t.author||"",updatedOn:t.updatedOn||"",status:t.status||"",i18n:t.i18n||{}}}const rd=["field"];function id(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function od(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?id(Object(n),!0).forEach((function(t){ad(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):id(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ad(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class sd{constructor(){ad(this,"storageKey","static-cms-user")}retrieve(){const e=window.localStorage.getItem(this.storageKey);return e&&JSON.parse(e)}store(e){window.localStorage.setItem(this.storageKey,JSON.stringify(e))}logout(){window.localStorage.removeItem(this.storageKey)}}function ld(e,t){const n="backup";return e?`${n}.${e}${t?`.${t}`:""}`:n}function cd(e,t){const n=St()(t.data,e);if(n)return String(n);{const n=e.split(".")[0];return t[n]?String(t[n]):""}}function ud(e){return t=>e.reduce(((e,n)=>{const r=cd(n,t);return r?`${e} ${r}`:e}),"")}function dd(e,t){const n=e.reduce(((e,n)=>{const r=t.reduce(((e,t)=>{const r=Na({data:n.data,path:t});return e.push(...r),e}),[]);for(let t=0;t<r.length;t++)e.push(od(od({},n),{},{field:r[t]}));return e}),[]);return n}function fd(e){const t=e.map((e=>e.field)),n={},r=e.reduce(((e,t)=>{if(!e[t.slug]){const{field:r}=t,i=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);fo
0% {
transform: scale(0);
opacity: 0.1;
}
100% {
transform: scale(1);
opacity: 0.3;
}
`)),dg=ba(ag||(ag=cg`
0% {
opacity: 1;
}
100% {
opacity: 0;
}
`)),fg=ba(sg||(sg=cg`
0% {
transform: scale(1);
}
50% {
transform: scale(0.92);
}
100% {
transform: scale(1);
}
`)),pg=(0,zm.ZP)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),hg=(0,zm.ZP)((function(e){const{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:o,rippleSize:a,in:s,onExited:l,timeout:c}=e,[d,f]=u.useState(!1),p=(0,jm.Z)(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),h={width:a,height:a,top:-a/2+o,left:-a/2+i},m=(0,jm.Z)(n.child,d&&n.childLeaving,r&&n.childPulsate);return s||d||f(!0),u.useEffect((()=>{if(!s&&null!=l){const e=setTimeout(l,c);return()=>{clearTimeout(e)}}}),[l,s,c]),(0,eg.jsx)("span",{className:p,style:h,children:(0,eg.jsx)("span",{className:m})})}),{name:"MuiTouchRipple",slot:"Ripple"})(lg||(lg=cg`
opacity: 0;
position: absolute;
&.${0} {
opacity: 0.3;
transform: scale(1);
animation-name: ${0};
animation-duration: ${0}ms;
animation-timing-function: ${0};
}
&.${0} {
animation-duration: ${0}ms;
}
& .${0} {
opacity: 1;
display: block;
width: 100%;
height: 100%;
border-radius: 50%;
background-color: currentColor;
}
& .${0} {
opacity: 0;
animation-name: ${0};
animation-duration: ${0}ms;
animation-timing-function: ${0};
}
& .${0} {
position: absolute;
/* @noflip */
left: 0px;
top: 0;
animation-name: ${0};
animation-duration: 2500ms;
animation-timing-function: ${0};
animation-iteration-count: infinite;
animation-delay: 200ms;
}
`),rg.rippleVisible,ug,550,(({theme:e})=>e.transitions.easing.easeInOut),rg.ripplePulsate,(({theme:e})=>e.transitions.duration.shorter),rg.child,rg.childLeaving,dg,550,(({theme:e})=>e.transitions.easing.easeInOut),rg.childPulsate,fg,(({theme:e})=>e.transitions.easing.easeInOut)),mg=u.forwardRef((function(e,t){const n=(0,Fm.Z)({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:i={},className:o}=n,a=(0,T.Z)(n,ig),[s,l]=u.useState([]),c=u.useRef(0),d=u.useRef(null);u.useEffect((()=>{d.current&&(d.current(),d.current=null)}),[s]);const f=u.useRef(!1),p=u.useRef(null),h=u.useRef(null),m=u.useRef(null);u.useEffect((()=>()=>{clearTimeout(p.current)}),[]);const g=u.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:a}=e;l((e=>[...e,(0,eg.jsx)(hg,{classes:{ripple:(0,jm.Z)(i.ripple,rg.ripple),rippleVisible:(0,jm.Z)(i.rippleVisible,rg.rippleVisible),ripplePulsate:(0,jm.Z)(i.ripplePulsate,rg.ripplePulsate),child:(0,jm.Z)(i.child,rg.child),childLeaving:(0,jm.Z)(i.childLeaving,rg.childLeaving),childPulsate:(0,jm.Z)(i.childPulsate,rg.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},c.current)])),c.current+=1,d.current=a}),[i]),O=u.useCallback(((e={},t={},n=(()=>{}))=>{const{pulsate:i=!1,center:o=r||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&f.current)return void(f.current=!1);"touchstart"===(null==e?void 0:e.type)&&(f.current=!0);const s=a?null:m.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(o)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2==0&&(d+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===h.current&&(h.current=()=>{g({pulsate:i,rippleX:c,rippleY:u,rippleSize:d,cb:n})},p.current=setTimeout((()=>{h.current&&(h.current(),h.current=null)}),80)):g({pulsate:i,rippleX:c,rippleY:u,rippleSize:d,cb:n})}),[r,g]),y=u.useCallback((()=>{O({},{pulsate:!0})}),[O]),v=u.useCallback(((e,t)=>{if(clearTimeout(p.current),"touchend"===(null==e?void 0:e.type)&&h.current)return h.current(),h.current=null,void(p.current=setTimeout((()=>{v(e,t)})));h.current=null,l((e=>e.length>0?e.slice(1):e)),d.current=t}),[]);return u.useImperativeHandle(t,(()=>({pulsate:y,start:O,stop:v})),[y,O,v]),(0,eg.jsx)(pg,(0,P.Z)({className:(0,jm.Z)(rg.root,i.root,o),ref:m},a,{children:(0,eg.jsx)(Jm,{component:null,exit:!0,children:s})}))})),gg=mg;var Og=__nested_webpack_require_2836554__(95201);function yg(e){return(0,Og.Z)("MuiButtonBase",e)}const vg=(0,ng.Z)("MuiButtonBase",["root","disabled","focusVisible"]),bg=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],_g=(0,zm.ZP)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${vg.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),wg=u.forwardRef((function(e,t){const n=(0,Fm.Z)({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:i=!1,children:o,className:a,component:s="button",disabled:l=!1,disableRipple:c=!1,disableTouchRipple:d=!1,focusRipple:f=!1,
background-color: ${Lb.foreground};
`,gS=(0,zm.ZP)(Qw)`
gap: 12px;
`,OS=(0,zm.ZP)(AO)`
${Yb};
background: none;
color: #7b8290;
font-family: inherit;
font-size: 16px;
font-weight: 500;
text-transform: none;
gap: 2px;
&:hover,
&:active,
&:focus {
color: ${Lb.active};
}
`,yS=(0,zm.ZP)("div")`
flex-grow: 1;
`,vS=(0,zm.ZP)("div")`
display: inline-flex;
align-items: center;
gap: 8px;
`,bS={checkBackendStatus:function(){return async(e,t)=>{try{const n=t(),r=n.config.config;if(n.status.isFetching||!r)return;e({type:Ff});const i=Od(r),o=await i.status(),a="ui.toast.onBackendDown",s=n.snackbar.messages.filter((e=>"string"!=typeof e.message&&e.message.key===a));if(!1===o.api.status)return 0===s.length&&e(Uh({type:"error",message:{key:"ui.toast.onBackendDown",options:{details:o.api.statusPage}}})),e(Aw(o));if(!0===o.api.status&&s.length>0&&s.forEach((t=>{e(Nh(t.id))})),!1===o.auth.status){const t="ui.toast.onLoggedOut",r=n.snackbar.messages.find((e=>"string"!=typeof e.message&&e.message.key===t));r||e(Uh({type:"error",message:{key:"ui.toast.onLoggedOut"}}))}e(Aw(o))}catch(t){console.error(t),t instanceof Error&&e(function(e){return{type:Uf,payload:{error:e}}}(t))}}},openMediaLibrary:Nv,logoutUser:Vh},_S=q((function(e){var t,n;const{auth:r,config:i,collections:o,mediaLibrary:a}=e,s=r.user,l=a.showMediaButton;return{user:s,collections:o,displayUrl:null===(t=i.config)||void 0===t?void 0:t.display_url,isTestRepo:"test-repo"===(null===(n=i.config)||void 0===n?void 0:n.backend.name),showMediaButton:l}}),bS)((0,p.Iu)()((e=>{let{user:t,collections:n,logoutUser:r,openMediaLibrary:i,displayUrl:o,isTestRepo:a,t:s,showMediaButton:l,checkBackendStatus:c}=e;const[d,f]=(0,u.useState)(null),p=Boolean(d),h=(0,u.useCallback)((e=>{f(e.currentTarget)}),[]),m=(0,u.useCallback)((()=>{f(null)}),[]),g=(0,u.useCallback)((e=>{!function(e){lO.push(ia(e))}(e)}),[]),O=(0,u.useMemo)((()=>Object.values(n).filter((e=>{var t;return"folder"in e&&null!==(t=e.create)&&void 0!==t&&t}))),[n]);(0,u.useEffect)((()=>{const e=setInterval((()=>{c()}),3e5);return()=>{clearInterval(e)}}),[c]);const y=(0,u.useCallback)((()=>{i()}),[i]);return Oa(mS,{position:"sticky"},Oa(gS,null,Oa(x_,{to:"/collections",component:ak,activeClassName:"header-link-active"},Oa(a_.Z,null),s("app.header.content")),l?Oa(OS,{onClick:y},Oa(s_.Z,null),s("app.header.media")):null,Oa(yS,null),Oa(vS,null,O.length>0&&Oa("div",{key:"quick-create"},Oa(AO,{id:"quick-create-button","aria-controls":p?"quick-create-menu":void 0,"aria-haspopup":"true","aria-expanded":p?"true":void 0,onClick:h,variant:"contained",endIcon:Oa(l_.Z,null)},s("app.header.quickAdd")),Oa(mw,{id:"quick-create-menu",anchorEl:d,open:p,onClose:m,MenuListProps:{"aria-labelledby":"quick-create-button"}},O.map((e=>Oa(Pw,{key:e.name,onClick:()=>g(e.name)},e.label_singular||e.label))))),a&&Oa(AO,{href:"https://staticcms.org/docs/test-backend",target:"_blank",rel:"noopener noreferrer",sx:{textTransform:"none"},endIcon:Oa(c_.Z,null)},"Test Backend"),o?Oa(AO,{href:o,target:"_blank",rel:"noopener noreferrer",sx:{textTransform:"none"},endIcon:Oa(c_.Z,null)},function(e){const t=e.indexOf("//");return t>-1?e.slice(t+2):e}(o)):null,Oa(hS,{displayUrl:o,isTestRepo:a,imageUrl:null==t?void 0:t.avatar_url,onLogoutClick:r}))))})));Dg().config({barColors:{0:Lb.active,"1.0":Lb.active},shadowBlur:0,barThickness:2});const wS=(0,zm.ZP)("div")`
position: relative;
padding: 24px;
gap: 24px;
`,kS=(0,zm.ZP)("div")`
min-width: 1152px;
max-width: 1392px;
margin: 0 auto;
display: flex;
gap: 24px;
position: relative;
`,xS=e=>{let{children:t}=e;return Oa(d().Fragment,null,Oa(_S,null),Oa(wS,null,Oa(kS,null,t)))},SS=u.createContext(void 0);function PS(){return u.useContext(SS)}function TS(e){return(0,Og.Z)("PrivateSwitchBase",e)}(0,ng.Z)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const $S=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],CS=(0,zm.ZP)(kg)((({ownerState:e})=>(0,P.Z)({padding:9,borderRadius:"50%"},"start"===e.edge&&{marginLeft:"small"===e.size?-3:-12},"end"===e.edge&&{marginRight:"small"===e.size?-3:-12}))),ES=(0,zm.ZP)("input")({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),QS=u.forwardRef((function(e,t){const{autoFocus:n,checked:r,checkedIcon:i,className:o,defaultChecked:a,disabled:s,disableFocusRipple:l=!1,edge:c=!1,icon:u,id:d,inputProps:f,inputRef:p,name:h,onBlur:m,onChange:g,onFocus:O,readOnly:y,required:v=!1,tabIndex:b,type:_,value:w}=e,k=(0,T.Z)(e,$S),[x,S]=(0,eS.Z)({controlled:r,default:Boolean(a),name:"SwitchBase",state:"checked"}),$=PS();let C=s;$&&void 0===C&&(C=$.disabled);const E="checkbox"===_||"radio"===_,Q=(0,P.Z)({},e,{checked:x,disabled:C,disableFocusRipple:l,edge:c}),A=(e=>{const{classes:t,checked:n,disabled:r,edge:i}=e,o={root:["root",n&&"checked",r&&"disabled",i&&`edge${(0,xg.Z)(i)}`],input:["input"]};return(0,Im.Z)(o,TS,t)})(Q);return(0,eg.jsxs)(CS,(0,P.Z)({component:"span",className:(0,jm.Z)(A.root,o),centerRipple:!0,focusRipple:!l,disabled:C,tabIndex:null,role:void 0,onFocus:e=>{O&&O(e),$&&$.onFocus&&$.onFocus(e)},onBlur:e=>{m&&m(e),$&&$.onBlur&&$.onBlur(e)},ownerState:Q,ref:t},k,{children:[(0,eg.jsx)(ES,(0,P.Z)({autoFocus:n,checked:r,defaultChecked:a,className:A.input,disabled:C,id:E&&d,name:h,onChange:e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;S(t),g&&g(e,t)},readOnly:y,ref:p,required:v,ownerState:Q,tabIndex:b,type:_},"checkbox"===_&&void 0===w?{}:{value:w},f)),x?i:u]}))})),AS=QS,DS=(0,lk.Z)((0,eg.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),RS=(0,lk.Z)((0,eg.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),LS=(0,lk.Z)((0,eg.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function MS(e){return(0,Og.Z)("MuiCheckbox",e)}const jS=(0,ng.Z)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary"]),IS=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],zS=(0,zm.ZP)(AS,{shouldForwardProp:e=>(0,zm.FO)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,"default"!==n.color&&t[`color${(0,xg.Z)(n.color)}`]]}})((({theme:e,ownerState:t})=>(0,P.Z)({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${"default"===t.color?e.vars.palette.action.activeChannel:e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,wO.Fq)("default"===t.color?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&{[`&.${jS.checked}, &.${jS.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${jS.disabled}`]:{color:(e.vars||e).palette.action.disabled}}))),FS=(0,eg.jsx)(RS,{}),WS=(0,eg.jsx)(DS,{}),US=(0,eg.jsx)(LS,{}),NS=u.forwardRef((function(e,t){var n,r;const i=(0,Fm.Z)({props:e,name:"MuiCheckbox"}),{checkedIcon:o=FS,color:a="primary",icon:s=WS,indeterminate:l=!1,indeterminateIcon:c=US,inputProps:d,size:f="medium",className:p}=i,h=(0,T.Z)(i,IS),m=l?c:s,g=l?c:o,O=(0,P.Z)({},i,{color
width: 32px;
height: 24px;
display: flex;
align-items: center;
justify-content: flex-end;
`,nP=(0,p.Iu)()((e=>{let{viewGroups:t,group:n,t:r,onGroupClick:i}=e;const[o,a]=(0,u.useState)(null),s=Boolean(o),l=(0,u.useCallback)((e=>{a(e.currentTarget)}),[]),c=(0,u.useCallback)((()=>{a(null)}),[]),d=(0,u.useMemo)((()=>Object.values(n).find((e=>!0===e.active))),[n]);return Oa("div",null,Oa(AO,{id:"basic-button","aria-controls":s?"basic-menu":void 0,"aria-haspopup":"true","aria-expanded":s?"true":void 0,onClick:l,variant:d?"contained":"outlined",endIcon:Oa(l_.Z,null)},r("collection.collectionTop.groupBy")),Oa(mw,{id:"basic-menu",anchorEl:o,open:s,onClose:c,MenuListProps:{"aria-labelledby":"basic-button"}},t.map((e=>Oa(Pw,{key:e.id,onClick:()=>i(e)},Oa(KS,null,e.label),Oa(tP,null,e.id===(null==d?void 0:d.id)?Oa(eP.Z,{fontSize:"small"}):null))))))})),rP=(0,zm.ZP)("div")`
width: 32px;
height: 24px;
display: flex;
align-items: center;
justify-content: flex-end;
`,iP=(0,p.Iu)()((e=>{let{t,fields:n,onSortClick:r,sort:i}=e;const[o,a]=(0,u.useState)(null),s=Boolean(o),l=(0,u.useCallback)((e=>{a(e.currentTarget)}),[]),c=(0,u.useCallback)((()=>{a(null)}),[]),d=(0,u.useMemo)((()=>{if(!i)return{key:void 0,direction:void 0};const e=Object.values(i);return Object.values(e).length<1||e[0].direction===bd?{key:void 0,direction:void 0}:e[0]}),[i]);return Oa("div",null,Oa(AO,{id:"sort-button","aria-controls":s?"sort-menu":void 0,"aria-haspopup":"true","aria-expanded":s?"true":void 0,onClick:l,variant:d.key?"contained":"outlined",endIcon:Oa(l_.Z,null)},t("collection.collectionTop.sortBy")),Oa(mw,{id:"sort-menu",anchorEl:o,open:s,onClose:c,MenuListProps:{"aria-labelledby":"sort-button"}},n.map((e=>{var t,n,o;const a=function(e){switch(e){case yd:return vd;case vd:return bd;default:return yd}}(null!==(t=null==i||null===(n=i[e.name])||void 0===n?void 0:n.direction)&&void 0!==t?t:bd);return Oa(Pw,{key:e.name,onClick:()=>r(e.name,a),selected:e.name===d.key},Oa(KS,null,null!==(o=e.label)&&void 0!==o?o:e.name),Oa(rP,null,e.name===d.key?d.direction===yd?Oa(Mm.Z,{fontSize:"small"}):Oa(l_.Z,{fontSize:"small"}):null))}))))}));var oP=__nested_webpack_require_2836554__(36422),aP=__nested_webpack_require_2836554__(36208);const sP="VIEW_STYLE_LIST",lP="VIEW_STYLE_GRID",cP=(0,zm.ZP)("div")`
margin-left: 24px;
display: flex;
align-items: center;
justify-content: flex-end;
`,uP=e=>{let{viewStyle:t,onChangeViewStyle:n}=e;return Oa(cP,null,Oa(wk,{color:t===sP?"primary":"default","aria-label":"list view",onClick:()=>n(sP)},Oa(aP.Z,null)),Oa(wk,{color:t===lP?"primary":"default","aria-label":"grid view",onClick:()=>n(lP)},Oa(oP.Z,null)))},dP=(0,zm.ZP)("div")`
display: flex;
align-items: center;
flex-direction: row-reverse;
margin-top: 22px;
max-width: 100%;
& > div {
margin-left: 6px;
}
`,fP=e=>{let{viewStyle:t,onChangeViewStyle:n,sortableFields:r,onSortClick:i,sort:o,viewFilters:a,viewGroups:s,onFilterClick:l,onGroupClick:c,t:u,filter:d,group:f}=e;return Oa(dP,null,Oa(uP,{viewStyle:t,onChangeViewStyle:n}),s&&c&&f?s.length>0&&Oa(nP,{viewGroups:s,onGroupClick:c,t:u,group:f}):null,a&&l&&d?a.length>0&&Oa(JS,{viewFilters:a,onFilterClick:l,t:u,filter:d}):null,r&&i&&o?r.length>0&&Oa(iP,{fields:r,sort:o,onSortClick:i}):null)};function pP(e){return(0,Og.Z)("MuiCard",e)}(0,ng.Z)("MuiCard",["root"]);const hP=["className","raised"],mP=(0,zm.ZP)(Wy,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})((()=>({overflow:"hidden"}))),gP=u.forwardRef((function(e,t){const n=(0,Fm.Z)({props:e,name:"MuiCard"}),{className:r,raised:i=!1}=n,o=(0,T.Z)(n,hP),a=(0,P.Z)({},n,{raised:i}),s=(e=>{const{classes:t}=e;return(0,Im.Z)({root:["root"]},pP,t)})(a);return(0,eg.jsx)(mP,(0,P.Z)({className:(0,jm.Z)(s.root,r),elevation:i?8:void 0,ref:t,ownerState:a},o))})),OP=gP;function yP(e){return(0,Og.Z)("MuiCardContent",e)}(0,ng.Z)("MuiCardContent",["root"]);const vP=["className","component"],bP=(0,zm.ZP)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})((()=>({padding:16,"&:last-child":{paddingBottom:24}}))),_P=u.forwardRef((function(e,t){const n=(0,Fm.Z)({props:e,name:"MuiCardContent"}),{className:r,component:i="div"}=n,o=(0,T.Z)(n,vP),a=(0,P.Z)({},n,{component:i}),s=(e=>{const{classes:t}=e;return(0,Im.Z)({root:["root"]},yP,t)})(a);return(0,eg.jsx)(bP,(0,P.Z)({as:i,className:(0,jm.Z)(s.root,r),ownerState:a,ref:t},o))})),wP=_P,kP=(0,zm.ZP)("div")`
display: flex;
align-items: center;
justify-content: space-between;
`,xP=(0,zm.ZP)("h1")`
${n_};
`,SP=(0,zm.ZP)("p")`
${r_};
margin-bottom: 0;
`,PP=(0,p.Iu)()((e=>{let{collection:t,newEntryUrl:n,t:r}=e;const i=qe(),{collectionLabel:o,collectionLabelSingular:a,collectionDescription:s}=function(e){return{collectionLabel:e.label,collectionLabelSingular:e.label_singular,collectionDescription:e.description}}(t),l=(0,u.useCallback)((()=>{n&&i(n)}),[i,n]);return Oa(OP,null,Oa(wP,null,Oa(kP,null,Oa(xP,null,o),n?Oa(AO,{onClick:l,variant:"contained"},r("collection.collectionTop.newButton",{collectionLabel:a||o})):null),s?Oa(SP,null,s):null))}));function TP(e){return(0,Og.Z)("MuiCircularProgress",e)}(0,ng.Z)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const $P=["className","color","disableShrink","size","style","thickness","value","variant"];let CP,EP,QP,AP,DP=e=>e;const RP=ba(CP||(CP=DP`
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
`)),LP=ba(EP||(EP=DP`
0% {
stroke-dasharray: 1px, 200px;
stroke-dashoffset: 0;
}
50% {
stroke-dasharray: 100px, 200px;
stroke-dashoffset: -15px;
}
100% {
stroke-dasharray: 100px, 200px;
stroke-dashoffset: -125px;
}
`)),MP=(0,zm.ZP)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${(0,xg.Z)(n.color)}`]]}})((({ownerState:e,theme:t})=>(0,P.Z)({display:"inline-block"},"determinate"===e.variant&&{transition:t.transitions.create("transform")},"inherit"!==e.color&&{color:(t.vars||t).palette[e.color].main})),(({ownerState:e})=>"indeterminate"===e.variant&&va(QP||(QP=DP`
animation: ${0} 1.4s linear infinite;
`),RP))),jP=(0,zm.ZP)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),IP=(0,zm.ZP)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${(0,xg.Z)(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})((({ownerState:e,theme:t})=>(0,P.Z)({stroke:"currentColor"},"determinate"===e.variant&&{transition:t.transitions.create("stroke-dashoffset")},"indeterminate"===e.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})),(({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink&&va(AP||(AP=DP`
animation: ${0} 1.4s ease-in-out infinite;
`),LP))),zP=u.forwardRef((function(e,t){const n=(0,Fm.Z)({props:e,name:"MuiCircularProgress"}),{className:r,color:i="primary",disableShrink:o=!1,size:a=40,style:s,thickness:l=3.6,value:c=0,variant:u="indeterminate"}=n,d=(0,T.Z)(n,$P),f=(0,P.Z)({},n,{color:i,disableShrink:o,size:a,thickness:l,value:c,variant:u}),p=(e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e,o={root:["root",n,`color${(0,xg.Z)(r)}`],svg:["svg"],circle:["circle",`circle${(0,xg.Z)(n)}`,i&&"circleDisableShrink"]};return(0,Im.Z)(o,TP,t)})(f),h={},m={},g={};if("determinate"===u){const e=2*Math.PI*((44-l)/2);h.strokeDasharray=e.toFixed(3),g["aria-valuenow"]=Math.round(c),h.strokeDashoffset=`${((100-c)/100*e).toFixed(3)}px`,m.transform="rotate(-90deg)"}return(0,eg.jsx)(MP,(0,P.Z)({className:(0,jm.Z)(p.root,r),style:(0,P.Z)({width:a,height:a},m,s),ownerState:f,ref:t,role:"progressbar"},g,d,{children:(0,eg.jsx)(jP,{className:p.svg,ownerState:f,viewBox:"22 22 44 44",children:(0,eg.jsx)(IP,{className:p.circle,style:h,ownerState:f,cx:44,cy:44,r:(44-l)/2,fill:"none",strokeWidth:l})})}))})),FP=zP,WP=(0,zm.ZP)("div")`
position: fixed;
display: flex;
width: 100vw;
height: 100vh;
top: 0;
left: 0;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 16px;
`,UP=e=>{let{children:t}=e;const[n,r]=(0,u.useState)(0),i=(0,u.useMemo)((()=>{if(t)return"string"==typeof t?t:Array.isArray(t)&&n<t.length?t[n]:void 0}),[t,n]);return(0,u.useEffect)((()=>{if(!Array.isArray(t))return;const e=setInterval((()=>{const e=n===(null==t?void 0:t.length)-1?0:n+1;r(e)}),5e3);return()=>{clearInterval(e)}}),[t,n]),Oa(WP,null,Oa(FP,null),Oa(_v,null,i))};var NP=!("undefined"==typeof window||!window.document||!window.document.createElement),BP=void 0;function YP(e){e.handlers===e.nextHandlers&&(e.nextHandlers=e.handlers.slice())}function XP(e){this.target=e,this.events={}}XP.prototype.getEventHandlers=function(e,t){var n,r=String(e)+" "+String((n=t)?!0===n?100:(n.capture<<0)+(n.passive<<1)+(n.once<<2):0);return this.events[r]||(this.events[r]={handlers:[],handleEvent:void 0},this.events[r].nextHandlers=this.events[r].handlers),this.events[r]},XP.prototype.handleEvent=function(e,t,n){var r=this.getEventHandlers(e,t);r.handlers=r.nextHandlers,r.handlers.forEach((function(e){e&&e(n)}))},XP.prototype.add=function(e,t,n){var r=this,i=this.getEventHandlers(e,n);YP(i),0===i.nextHandlers.length&&(i.handleEvent=this.handleEvent.bind(this,e,n),this.target.addEventListener(e,i.handleEvent,n)),i.nextHandlers.push(t);var o=!0;return function(){if(o){o=!1,YP(i);var a=i.nextHandlers.indexOf(t);i.nextHandlers.splice(a,1),0===i.nextHandlers.length&&(r.target&&r.target.removeEventListener(e,i.handleEvent,n),i.handleEvent=void 0)}}};var qP="__consolidated_events_handlers__";function ZP(e,t,n,r){e[qP]||(e[qP]=new XP(e));var i=function(e){if(e)return void 0===BP&&(BP=function(){if(!NP)return!1;if(!window.addEventListener||!window.removeEventListener||!Object.defineProperty)return!1;var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}}),n=function(){};window.addEventListener("testPassiveEventSupport",n,t),window.removeEventListener("testPassiveEventSupport",n,t)}catch(e){}return e}()),BP?e:!!e.capture}(r);return e[qP].add(t,n,i)}function VP(e,t){var n,r=(n=e,!isNaN(parseFloat(n))&&isFinite(n)?parseFloat(n):"px"===n.slice(-2)?parseFloat(n.slice(0,-2)):void 0);if("number"==typeof r)return r;var i=function(e){if("%"===e.slice(-1))return parseFloat(e.slice(0,-1))/100}(e);return"number"==typeof i?i*t:void 0}var HP="above",GP="inside",KP="below",JP="invisible";function eT(e){return"string"==typeof e.type}var tT,nT=[];function rT(e){nT.push(e),tT||(tT=setTimeout((function(){var e;for(tT=null;e=nT.shift();)e()}),0));var t=!0;return function(){if(t){t=!1;var n=nT.indexOf(e);-1!==n&&(nT.splice(n,1),!nT.length&&tT&&(clearTimeout(tT),tT=null))}}}var iT="undefined"!=typeof window,oT=function(e){function t(t){var n;return(n=e.call(this,t)||this).refElement=function(e){n._ref=e},n}Xm(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=this;iT&&(this.cancelOnNextTick=rT((function(){e.cancelOnNextTick=null;var t=e.props,n=t.children;t.debug,function(e,t){if(e&&!eT(e)&&!t)throw new Error("<Waypoint> needs a DOM element to compute boundaries. The child you passed is neither a DOM element (e.g. <div>) nor does it use the innerRef prop.\n\nSee https://goo.gl/LrBNgw for more info.")}(n,e._ref),e._handleScroll=e._handleScroll.bind(e),e.scrollableAncestor=e._findScrollableAncestor(),e.scrollEventListenerUnsubscribe=ZP(e.scrollableAncestor,"scroll",e._handleScroll,{passive:!0}),e.resizeEventListenerUnsubscribe=ZP(window,"resize",e._handleScroll,{passive:!0}),e._handleScroll(null)})))},n.componentDidUpdate=function(){var e=this;iT&&this.scrollableAncestor&&(this.cancelOnNextTick||(this.cancelOnNextTick=rT((function(){e.cancelOnNextTick=null,e._handleScroll(null)}))))},n.componentWillUnmount=function(){iT&&(this.scrollEventListenerUnsubscribe&&this.scrollEventListenerUnsubscribe(),this.resizeEventListenerUnsubscribe&&this.resizeEventListenerUnsubscribe(),this.cancelOnNextTick&&this.cancelOnNextTick())},n._findScrollableAncestor=function(){var e=this.props,t=e.horizontal,n=e.scrollableAncestor;if(n)return function(e){return"window"===e?__nested_webpack_require_2836554__.g.window:e}(n);for(var r=this._ref;r.parent
padding: 16px;
text-align: center;
`,e$=(0,zm.ZP)(JT)`
margin-top: 16px;
`,t$=(0,p.Iu)()((e=>{var t;let{entries:n,isFetching:r,viewStyle:i,cursor:o,handleCursorActions:a,t:s,page:l}=e,c=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,KT);const u=[s("collection.entries.loadingEntries"),s("collection.entries.cachingEntries"),s("collection.entries.longerLoading")];return r&&void 0===l?Oa(UP,null,u):n&&n.length>0||(null==o||null===(t=o.actions)||void 0===t?void 0:t.has("append_next"))?Oa(d().Fragment,null,Oa(GT,"collection"in c?{collection:c.collection,entries:n,viewStyle:i,cursor:o,handleCursorActions:a,page:l}:{collections:c.collections,entries:n,viewStyle:i,cursor:o,handleCursorActions:a,page:l}),r&&void 0!==l&&n.length>0?Oa(JT,null,s("collection.entries.loadingEntries")):null):Oa(e$,null,s("collection.entries.noEntries"))}));function n$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r$(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?n$(Object(n),!0).forEach((function(t){i$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):n$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i$(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const o$=(0,zm.ZP)("h2")`
font-size: 23px;
font-weight: 600;
color: ${Lb.textLead};
`,a$=(0,zm.ZP)("div")``;function s$(e,t){return e.filter((e=>t.has(e.path)))}const l$={loadEntries:yb,traverseCollectionCursor:function(e,t){return async(n,r)=>{var i,o,a,s;const l=r(),c=e.name;if(null!==(i=l.entries.pages)&&void 0!==i&&null!==(o=i[c])&&void 0!==o&&o.isFetching)return;const u=l.config;if(!u.config)throw new Error("Config not loaded");const d=Od(u.config),{action:f,append:p}=t in gb?gb[t]:{action:t,append:!1},h=Fg(l,e.name);if(null!==(a=null===(s=h.meta)||void 0===s?void 0:s.usingOldPaginationAPI)&&void 0!==a&&a){var m;const t=null!==(m=h.data.nextPage)&&void 0!==m?m:-1;if(t<0)return;return n(yb(e,t))}try{var g;n(sb(e));const{entries:t,cursor:r}=await function(e,t,n){if(!t.actions.has(n))throw new Error(`The current cursor does not support the pagination action "${n}".`);return e.traverseCursor(t,n)}(d,h,f),i=null===(g=r.meta)||void 0===g?void 0:g.page;return n(lb(e,t,i,Ob(r),p))}catch(t){return console.error(t),t instanceof Error?(n(Uh({type:"error",message:{key:"ui.toast.onFailToLoadEntries",options:{details:t.message}}})),Promise.reject(n(cb(e,t)))):Promise.reject()}}}},c$=q((function(e,t){var n;const{collection:r,viewStyle:i,filterTerm:o}=t,a=null===(n=e.entries.pages[r.name])||void 0===n?void 0:n.page;let s=eO(e,r);const l=function(e,t){const n=t.name,r=Jg(e,n),i=function(e,t){const n=Vg(e,t),r=Object.values(null!=n?n:{}).find((e=>!0===(null==e?void 0:e.active)));return r}(e,n);if(void 0===i)return[];let o={};const a=Zc()(r,(e=>{const t=function(e,t){const n=t.label,r=t.field,i=St()(e.data,r);if(void 0===i)return{id:"missing_value",label:n,value:i};const o=String(i);if(t.pattern){const e=t.pattern;let i="";try{const t=new RegExp(e),n=o.match(t);n&&(i=n[0])}catch(t){console.warn(`Invalid view group pattern '${e}' for field '${r}'`,t)}return{id:`${n}${i}`,label:n,value:i}}return{id:`${n}${i}`,label:n,value:"boolean"==typeof i?i:o}}(e,i);return o=Yg(Yg({},o),{},{[t.id]:t}),t.id})),s=Object.entries(a).map((e=>{let[t,n]=e;return Yg(Yg({},o[t]),{},{paths:new Set(n.map((e=>e.path)))})}));return s}(e,r);var c;"nested"in r&&(s=function(e,t,n){return n.filter((n=>{const r=n.path.slice(t.length+1);return!!r.startsWith(e)&&(e?2===r.slice(e.length+1).split("/").length:r.split("/").length<=2)}))}(o||"",null!==(c=r.folder)&&void 0!==c?c:"",s));const u=function(e,t){return!!e.entries.pages[t]}(e,r.name),d=tO(e,r.name),f=Fg(e,r.name),p=Vs.create(f).clearData();return r$(r$({},t),{},{page:a,entries:s,groups:l,entriesLoaded:u,isFetching:d,viewStyle:i,cursor:p})}),l$),u$=c$((0,p.Iu)()((e=>{let{collection:t,entries:n,groups:r,isFetching:i,viewStyle:o,cursor:a,page:s,traverseCollectionCursor:l,t:c,entriesLoaded:f,readyToLoad:p,loadEntries:h}=e;const[m,g]=(0,u.useState)(!1),[O,y]=(0,u.useState)(t);(0,u.useEffect)((()=>{!t||f||!p||m&&O===t||h(t),g(p),y(t)}),[t,f,h,O,m,p]);const v=(0,u.useCallback)((e=>{l(t,e)}),[t,l]),b=(0,u.useCallback)((e=>{let{entries:n}=e;return Oa(t$,{collection:t,entries:n,isFetching:i,collectionName:t.label,viewStyle:o,cursor:a,handleCursorActions:v,page:s})}),[t,a,v,i,s,o]);return r&&r.length>0?Oa(d().Fragment,null,function(e,t,n,r){return e.map((e=>{const i=function(e,t){const{label:n,value:r}=e;return void 0===r?t("collection.groups.other"):"boolean"==typeof r?r?n:t("collection.groups.negateLabel",{label:n}):`${n} ${r}`.trim()}(e,r);return Oa(a$,{key:e.id,id:e.id},Oa(o$,null,i),Oa(n,{entries:s$(t,e.paths)}))}))}(r,n,b,c)):Oa(b,{entries:n})})));function d$(e){return{type:If,payload:{error:e}}}const f$={searchEntries:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return async(r,i)=>{const o=i(),{search:a}=o,s=o.config;if(!s.config)return;const l=Od(s.config),c=t||Object.keys(o.collections);if(!a.isFetching||a.term!==e||!Lg()(c,a.collections)){r(function(e,t,n){return{type:Df,payload:{searchTerm:e,searchCollections:t,page:n}}}(e,c,n));try{const t=await l.search(Object.entries(o.collections).filter((e=>{let[t,n]=e;return-1!==c.indexOf(t)})).map((e=>{let[t,n]=e;return n})),e);return r(function(e,t){return{type:Rf,payload:{entries:e,page:t}}}(t.entries,n))}catch(e){if(cons
position: relative;
`,BE=(0,zm.ZP)("ul")`
padding: 10px 0;
margin: 0;
list-style: none;
border-radius: ${Mb};
width: 240px;
`,YE=(0,zm.ZP)("li")`
padding: 0 6px 6px 32px;
font-size: 12px;
color: ${Lb.text};
`,XE=(0,zm.ZP)("li",Jl)((e=>{let{$isActive:t}=e;return`\n color: ${t?Lb.active:Sb};\n background-color: ${t?Lb.activeBackground:"inherit"};\n padding: 6px 6px 6px 32px;\n cursor: pointer;\n position: relative;\n\n &:hover {\n color: ${Lb.active};\n background-color: ${Lb.activeBackground};\n }\n `})),qE=(0,zm.ZP)("div")`
width: 100%;
`,ZE=(0,zm.ZP)(ow)`
margin-left: -44px;
`,VE=(0,p.Iu)()((e=>{let{collections:t,collection:n,searchTerm:r,onSubmit:i,t:o}=e;const a=(0,u.useRef)(),[s,l]=(0,u.useState)(r),[c,d]=(0,u.useState)(null),f=Boolean(c),p=(0,u.useMemo)((()=>Object.values(t)),[t]),h=(0,u.useCallback)((()=>{var e;d(null),null===(e=a.current)||void 0===e||e.blur()}),[]),m=(0,u.useCallback)((e=>{d(e.currentTarget)}),[]),g=(0,u.useCallback)((()=>{d(null)}),[]),O=(0,u.useCallback)((()=>n?p.findIndex((e=>e.name===n.name)):-1),[n,p]),[y,v]=(0,u.useState)(O()),[b,_]=(0,u.useState)(n);(0,u.useEffect)((()=>{b!==n&&v(O()),_(n)}),[n,O,b]);const w=(0,u.useCallback)((()=>{v(Math.min(y+1,p.length-1))}),[p,y]),k=(0,u.useCallback)((()=>{v(Math.max(y-1,-1))}),[y]),x=(0,u.useCallback)((()=>{v(-1)}),[]),S=(0,u.useCallback)((e=>{var t;-1!==e?i(s,null===(t=p[e])||void 0===t?void 0:t.name):i(s),h()}),[p,h,i,s]),P=(0,u.useCallback)((e=>{"Enter"===e.key&&S(y),f&&("Escape"===e.key&&h(),"ArrowDown"===e.key?(w(),e.preventDefault()):"ArrowUp"===e.key&&(k(),e.preventDefault()))}),[h,f,w,k,y,S]),T=(0,u.useCallback)((e=>{const t=e.target.value;l(t),""===t?(x(),h()):d(e.currentTarget)}),[h,x]),$=(0,u.useCallback)(((e,t)=>{e.preventDefault(),v(t),S(t)}),[S]);return Oa(NE,null,Oa(UE,{onKeyDown:P,placeholder:o("collection.sidebar.searchAll"),onBlur:g,onFocus:m,value:s,onChange:T,variant:"outlined",size:"small",fullWidth:!0,InputProps:{inputRef:a,startAdornment:Oa(U$,{position:"start"},Oa(L$.Z,null))}}),Oa(ZE,{id:"search-popover",open:f,anchorEl:c,onClose:h,disableAutoFocus:!0,disableEnforceFocus:!0,disableScrollLock:!0,hideBackdrop:!0,anchorOrigin:{vertical:"bottom",horizontal:"left"}},Oa(BE,null,Oa(YE,null,o("collection.sidebar.searchIn")),Oa(XE,{$isActive:-1===y,onClick:e=>$(e,-1),onMouseDown:e=>e.preventDefault()},o("collection.sidebar.allCollections")),Oa(qE,null),p.map(((e,t)=>Oa(XE,{key:t,$isActive:t===y,onClick:e=>$(e,t),onMouseDown:e=>e.preventDefault()},e.label))))))}));function HE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function GE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?HE(Object(n),!0).forEach((function(t){KE(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function KE(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const{addFileTemplateFields:JE}=n,eQ=(0,zm.ZP)("div")`
display: flex;
justify-content: center;
align-items: center;
`,tQ=(0,zm.ZP)("div")`
margin-right: 4px;
`,nQ=(0,zm.ZP)("div")`
position: relative;
top: 2px;
`,rQ=(0,zm.ZP)(nQ)`
${Gb};
color: currentColor;
`,iQ=(0,zm.ZP)(nQ)`
${Kb};
color: currentColor;
left: 2px;
`,oQ=(0,zm.ZP)(mt,Jl)((e=>{let{$activeClassName:t,$depth:n}=e;return`\n display: flex;\n font-size: 14px;\n font-weight: 500;\n align-items: center;\n padding: 8px;\n padding-left: ${20*n+12}px;\n border-left: 2px solid #fff;\n\n &:hover,\n &:active,\n &.${t} {\n color: ${Lb.active};\n background-color: ${Lb.activeBackground};\n border-left-color: #4863c6;\n\n .MuiListItemIcon-root {\n color: ${Lb.active};\n }\n }\n `}));function aQ(e){var t;return e.isRoot?e.title:(null===(t=e.children.find((e=>!e.isDir&&e.title)))||void 0===t?void 0:t.title)||e.title}const sQ=e=>{let{collection:t,treeData:n,depth:r=0,onToggle:i}=e;const o=t.name,a=_l()(n,aQ);return Oa(d().Fragment,null,a.map((e=>{var n;if(e.children.length<=1&&(null===(n=e.children[0])||void 0===n||!n.isDir)&&r>0)return null;let a=`/collections/${o}`;r>0&&(a=`${a}/filter${e.path}`);const s=aQ(e),l=0===r||e.children.some((e=>e.children.some((e=>e.isDir))));return Oa(u.Fragment,{key:e.path},Oa(oQ,{to:a,$activeClassName:"sidebar-active",onClick:()=>i({node:e,expanded:!e.expanded}),$depth:r,"data-testid":e.path},Oa(h$.Z,null),Oa(eQ,null,Oa(tQ,null,s),l&&(e.expanded?Oa(rQ,null):Oa(iQ,null)))),e.expanded&&Oa(sQ,{collection:t,depth:r+1,treeData:e.children,onToggle:i}))})))};function lQ(e,t){return function e(n){for(const r of n)t(r),e(r.children)}(e)}function cQ(e,t){var n;const r="folder"in e?e.folder:"",i=t.map((e=>GE(GE({},e),{},{path:e.path.slice(r.length)}))),o=i.reduce(((e,t)=>{let n=(0,Ea.dirname)(t.path);for(;n&&!e[n]&&"/"!==n;){const t=n.split(Ea.sep);e[n]=t.pop(),n=t.length?t.join(Ea.sep):void 0}return e}),{});"nested"in e&&null!==(n=e.nested)&&void 0!==n&&n.summary?e=GE(GE({},e),{},{summary:e.nested.summary}):delete(e=GE({},e)).summary;const a=[{title:e.label,path:"/",isDir:!0,isRoot:!0},...Object.entries(o).map((e=>{let[t,n]=e;return{title:n,path:t,isDir:!0,isRoot:!1}})),...i.map(((n,r)=>{let i=t[r];i=GE(GE({},i),{},{data:JE(i.path,i.data)});const o=kc(e,i);return GE(GE({},n),{},{title:o,isDir:!1,isRoot:!1})}))],s=a.reduce(((e,t)=>{const n="/"===t.path?"":(0,Ea.dirname)(t.path);return e[n]?e[n].push(t):e[n]=[t],e}),{}),l=s[""].reduce((function e(t,n){const r=n;let i=[];return s[r.path]&&(i=s[r.path].reduce(e,[])),t.push(GE(GE({},r),{},{children:i})),t}),[]);return l}const uQ=q((function(e,t){var n;const{collection:r}=t,i=null!==(n=eO(e,r))&&void 0!==n?n:[];return GE(GE({},t),{},{entries:i})}),{})((e=>{let{collection:t,entries:n,filterTerm:r}=e;const[i,o]=(0,u.useState)(cQ(t,n)),[a,s]=(0,u.useState)(null),[l,c]=(0,u.useState)(!0),[d,f]=(0,u.useState)(t),[p,h]=(0,u.useState)(n),[m,g]=(0,u.useState)(r);(0,u.useEffect)((()=>{if(t!==d||n!==p||r!==m){const e={};lQ(i,(t=>{t.expanded&&(e[t.path]=!0)}));const a=cQ(t,n),s=`/${r}`;lQ(a,(t=>{(e[t.path]||l&&s.startsWith(t.path))&&(t.expanded=!0)})),o(a)}f(t),h(n),g(r)}),[t,n,r,d,p,m,i,l]);const O=(0,u.useCallback)((e=>{let{node:t,expanded:n}=e;!a||a.path===t.path||n?(o(function(e,t,n){let r=!1;return function e(i){if(r)return i;for(let e=0;e<i.length;e++)if(i[e].path===t.path)return i[e]=n(t),r=!0,i;return i.forEach((t=>e(t.children))),i}([...e])}(i,t,(e=>GE(GE({},e),{},{expanded:n})))),s(t),c(!1)):(s(t),c(!1))}),[a,i]);return Oa(sQ,{collection:t,treeData:i,onToggle:O})})),dQ=(0,zm.ZP)("div")`
position: sticky;
top: 88px;
align-self: flex-start;
`,fQ=(0,zm.ZP)(ZS)`
min-width: 0;
margin-right: 12px;
`,pQ=(0,p.Iu)()((e=>{let{collections:t,collection:n,isSearchEnabled:r,searchTerm:i,t:o,filterTerm:a}=e;const s=(0,u.useMemo)((()=>Object.values(t).filter((e=>!0!==e.hide)).map((e=>{const t=e.name,n=e.icon;let r=Oa(h$.Z,null);if(n){const e=Hu(n);e&&(r=Oa(e,null))}return"nested"in e?Oa("li",{key:`nested-${t}`},Oa(uQ,{collection:e,filterTerm:a,"data-testid":t})):Oa(E$,{key:t,to:`/collections/${t}`,component:ak,disablePadding:!0,activeClassName:"sidebar-active"},Oa(R$,null,Oa(fQ,null,r),Oa(KS,{primary:e.label})))}))),[t,a]),l=(0,u.useMemo)((()=>Gu()),[]),c=(0,u.useMemo)((()=>Object.values(l).map((e=>{let{id:t,title:n,data:r,options:{icon:i}={}}=e,o=Oa(h$.Z,null);if(i){const e=Hu(i);e&&(o=Oa(e,null))}const a=Oa(d().Fragment,null,Oa(fQ,null,o),Oa(KS,{primary:n}));return Oa(E$,"string"==typeof r?{key:n,href:r,component:"a",disablePadding:!0,target:"_blank",rel:"noopener",sx:{color:Lb.inactive,"&:hover":{color:Lb.active,".MuiListItemIcon-root":{color:Lb.active}}}}:{key:n,to:`/page/${t}`,component:ak,disablePadding:!0,activeClassName:"sidebar-active"},Oa(R$,null,a))}))),[l]);return Oa(dQ,null,Oa(OP,{sx:{minWidth:275}},Oa(wP,{sx:{paddingBottom:0}},Oa(_v,{gutterBottom:!0,variant:"h5",component:"div"},o("collection.sidebar.collections")),r&&Oa(VE,{searchTerm:i,collections:t,collection:n,onSubmit:(e,t)=>function(e,t){t?lO.push(`/collections/${t}/search/${e}`):lO.push(`/search/${e}`)}(e,t)})),Oa(Q_,null,s,c)))})),hQ=(0,zm.ZP)("main")`
width: 100%;
`,mQ=(0,zm.ZP)("div")`
${t_};
margin-bottom: 22px;
`,gQ=(0,zm.ZP)("h1")`
${n_};
`,OQ={sortByField:db,filterByField:function(e,t){return async(n,r)=>{const i=r(),o=tO(i,e.name);if(n(function(e,t){return{type:zd,payload:{collection:e.name,filter:t}}}(e,t)),!o)try{const r=await ub(i,e);n(function(e,t,n){return{type:Fd,payload:{collection:e.name,filter:t,entries:n}}}(e,t,r))}catch(r){n(function(e,t,n){return{type:Wd,payload:{collection:e.name,filter:t,error:n}}}(e,t,r))}}},changeViewStyle:function(e){return{type:sf,payload:{style:e}}},groupByField:function(e,t){return async(n,r)=>{const i=r(),o=tO(i,e.name);if(n({type:Ud,payload:{collection:e.name,group:t}}),!o)try{const r=await ub(i,e);n(function(e,t,n){return{type:Nd,payload:{collection:e.name,group:t,entries:n}}}(e,t,r))}catch(r){n({type:Bd,payload:{collection:e.name,group:t,error:r}})}}}},yQ=q((function(e,t){const{collections:n}=e,r=e.config.config&&0!=e.config.config.search,{isSearchResults:i,isSingleSearchResult:o,name:a,searchTerm:s="",filterTerm:l="",t:c}=t,u=a?n[a]:n[0],d=qg(e,u.name),f=function(e,t){var n,r;return(null!==(n=null===(r=e.sortable_fields)||void 0===r?void 0:r.fields)&&void 0!==n?n:[]).map((n=>{if(n===Ho)return{key:n,field:{name:n,label:t("collection.defaultFields.updatedOn.label")}};const r=qa(e,n);return n!==Vo||r?{key:n,field:r}:{key:n,field:{name:n,label:t("collection.defaultFields.author.label")}}})).filter((e=>!!e.field)).map((e=>pc(pc({},e.field),{},{key:e.key})))}(u,c),p=function(e){return e.view_filters}(u),h=function(e){return e.view_groups}(u);return{isSearchResults:i,isSingleSearchResult:o,name:a,searchTerm:s,filterTerm:l,collection:u,collections:n,collectionName:a,isSearchEnabled:r,sort:d,sortableFields:f,viewFilters:p,viewGroups:h,filter:Zg(e,u.name),group:Vg(e,u.name),viewStyle:e.entries.viewStyle}}),OQ),vQ=(0,p.Iu)()(yQ((e=>{let{collection:t,collections:n,collectionName:r,isSearchEnabled:i,isSearchResults:o,isSingleSearchResult:a,searchTerm:s,sortableFields:l,sortByField:c,sort:f,viewFilters:p,viewGroups:h,filterTerm:m,t:g,filterByField:O,groupByField:y,filter:v,group:b,changeViewStyle:_,viewStyle:w}=e;const[k,x]=(0,u.useState)(!1),[S,P]=(0,u.useState)();(0,u.useEffect)((()=>{P(t)}),[t]);const T=(0,u.useMemo)((()=>{let e="fields"in t&&t.create?ia(r):"";return e&&m&&(e=ia(r),m&&(e=`${T}?path=${m}`)),e}),[t,r,m]),$=(0,u.useMemo)((()=>"collection.collectionTop.searchResults"+(a?"InCollection":"")),[a]),C=(0,u.useMemo)((()=>{if(o){let e=n;if(a){const r=Object.values(n).filter((e=>e===t));1===r.length&&(e={[r[0].name]:r[0]})}return Oa(p$,{key:"search",collections:e,searchTerm:s,viewStyle:w})}return Oa(u$,{collection:t,viewStyle:w,filterTerm:m,readyToLoad:k&&t===S})}),[t,n,m,o,a,S,k,s,w]),E=(0,u.useCallback)((async(e,n)=>{await c(t,e,n)}),[t,c]),Q=(0,u.useCallback)((async e=>{await O(t,e)}),[t,O]),A=(0,u.useCallback)((async e=>{await y(t,e)}),[t,y]);return(0,u.useEffect)((()=>{var e,n;if(S===t)return void(k||x(!0));if(null!=f&&null!==(e=f[0])&&void 0!==e&&e.key)return void(k||x(!0));const r=null===(n=t.sortable_fields)||void 0===n?void 0:n.default;if(!r||!r.field)return void(k||x(!0));x(!1);let i=!0;return setTimeout((async()=>{var e;await E(r.field,null!==(e=r.direction)&&void 0!==e?e:yd),i&&x(!0)})),()=>{i=!1}}),[t,E,S,k,f]),Oa(d().Fragment,null,Oa(pQ,{collections:n,collection:(!o||a)&&t,isSearchEnabled:i,searchTerm:s,filterTerm:m}),Oa(hQ,null,Oa(d().Fragment,null,o?Oa(d().Fragment,null,Oa(mQ,null,Oa(gQ,null,g($,{searchTerm:s,collection:t.label}))),Oa(fP,{viewStyle:w,onChangeViewStyle:_,t:g})):Oa(d().Fragment,null,Oa(PP,{collection:t,newEntryUrl:T}),Oa(fP,{viewStyle:w,onChangeViewStyle:_,sortableFields:l,onSortClick:E,sort:f,viewFilters:null!=p?p:[],viewGroups:null!=h?h:[],t:g,onFilterClick:Q,onGroupClick:A,filter:v,group:b})),C)))}))),bQ=e=>{var t;let{isSearchResults:n,isSingleSearchResult:r,collections:i}=e;const{name:o,searchTerm:a,filterTerm:s}=Ze(),l=(0,u.useMemo)((()=>!!o&&i[o]),[i,o]),c=(0,u.useMemo)((()=>Ac(i)),[i]);return o&&l?"files"in l&&1===(null===(t=l.files)||void 0===t?void 0:t.length)?Oa(nt,{to:`/collections/${l.name}/entries/${l.files[0].name}`}):Oa(xS,null,Oa(vQ,{name:o,searchTerm:a,filterTerm:s,isSe
list-style-type: none;
font-size: 12px;
color: ${Lb.errorText};
position: relative;
font-weight: 600;
display: flex;
flex-direction: column;
margin: 0;
padding: 4px 8px;
`,jQ=(0,zm.ZP)("p",Jl)((e=>{let{$error:t}=e;return`\n margin: 0;\n margin-left: 8px;\n padding: 0;\n font-size: 12px;\n color: ${t?Lb.errorText:Lb.controlLabel};\n transition: color ${Ib};\n `})),IQ={changeDraftField:pb,openMediaLibrary:Nv,clearMediaControl:function(e){return(t,n)=>{const r=n().mediaLibrary.externalLibrary;var i;r&&(null===(i=r.onClearControl)||void 0===i||i.call(r,{id:e}))}},removeMediaControl:function(e){return(t,n)=>{const r=n().mediaLibrary.externalLibrary;var i;r&&(null===(i=r.onRemoveControl)||void 0===i||i.call(r,{id:e}))}},removeInsertedMedia:Yv,query:function(e,t,n,r,i,o){return async(a,s)=>{a(function(e){return{type:Mf,payload:{searchTerm:e}}}(r));const l=s(),c=l.config;if(!c.config)return a(d$(new Error("Config not found")));const u=Od(c.config),d=Object.values(l.collections).find((e=>e.name===t));if(!d)return a(d$(new Error("Collection not found")));try{const t=await u.query(d,n,r,i,o);return a(function(e,t){return{type:jf,payload:{namespace:e,hits:t}}}(e,t.hits))}catch(e){if(console.error(e),e instanceof Error)return a(d$(e))}}},getAsset:rb},zQ=q((function(e,t){const{collections:n,entryDraft:r}=e,i=r.entry,o=r.entry?n[r.entry.collection]:null,a=_T(e);return DQ(DQ({},t),{},{mediaPaths:e.mediaLibrary.controlMedia,config:e.config,entry:i,collection:o,isLoadingAsset:a})}),IQ),FQ=zQ((0,p.Iu)()((e=>{let{clearMediaControl:t,collection:n,config:r,entry:i,field:o,fieldsErrors:a,submitted:s,getAsset:l,isDisabled:c,isFieldDuplicate:f,isFieldHidden:p,isHidden:h=!1,locale:m,mediaPaths:g,openMediaLibrary:O,parentPath:y,query:v,removeInsertedMedia:b,removeMediaControl:_,t:w,value:k,forList:x=!1,changeDraftField:S,i18n:P,fieldName:T}=e;const $=Gw(),C=$Q(),E=Wu(o.widget),Q=o.hint,A=(0,u.useMemo)((()=>y.length>0?`${y}.${null!=T?T:o.name}`:null!=T?T:o.name),[o.name,T,y]),[D,R]=(0,u.useState)(!TQ()(k)),L=(0,u.useMemo)((()=>((e,t)=>n=>{var r;const i=`${hO(t).join(".")}.${e}`;return null!==(r=n.entryDraft.fieldsErrors[i])&&void 0!==r?r:[]})(A,P)),[P,A]),M=Kw(L),j=(s||D)&&Boolean(M.length),I=(0,u.useMemo)((()=>(e,t)=>l(n,i,e,t)),[n]);(0,u.useEffect)((()=>{!D&&!s||h||(async()=>{const e=await async function(e,t,n,r){const i=n.getValidValue(t),o=[],a=[EQ,QQ,n.validator];for(const t of a){const n=await t({field:e,value:i,t:r});n&&o.push(n)}return o}(o,k,E,w);$(function(e,t,n){return{type:Vd,payload:{path:e,errors:t,i18n:n}}}(A,e,P))})()}),[D,$,o,P,h,A,s,w,k,E]);const z=(0,u.useCallback)((e=>{R(!0),S({path:A,field:o,value:e,i18n:P})}),[S,o,P,A]),F=(0,u.useMemo)((()=>r.config),[r.config]),W=function(e,t){const n=(0,u.useRef)(e),r=n.current,i=t(r,e);return(0,u.useEffect)((()=>{i||(n.current=e)})),i?r:e}(k,Lg()),[U,N]=(0,u.useState)(0);return(0,u.useEffect)((()=>{if(!Oo(W))return"default"in o&&Oo(!o.default)?(E.getDefaultValue?z(E.getDefaultValue(o.default,o)):z(o.default),void N((e=>e+1))):void(E.getDefaultValue&&(z(E.getDefaultValue(null,o)),N((e=>e+1))))}),[o,W,z,E]),(0,u.useMemo)((()=>n&&i&&F&&"hidden"!==o.widget?Oa(LQ,{$isHidden:h},Oa(d().Fragment,null,(0,u.createElement)(E.control,{key:`${C}-${U}`,collection:n,config:F,entry:i,field:o,fieldsErrors:a,submitted:s,getAsset:I,isDisabled:null!=c&&c,isFieldDuplicate:f,isFieldHidden:p,label:Za(o,w),locale:m,mediaPaths:g,onChange:z,clearMediaControl:t,openMediaLibrary:O,removeInsertedMedia:b,removeMediaControl:_,path:A,query:v,t:w,value:W,forList:x,i18n:P,hasErrors:j}),Q?Oa(jQ,{key:"hint",$error:j},Q):null,j?Oa(MQ,{key:"errors"},M.map((e=>e.message&&"string"==typeof e.message&&Oa("li",{key:e.message.trim().replace(/[^a-z0-9]+/gi,"-")},e.message)))):null)):null),[n,F,A,M,h,E.control,o,s,I,c,w,m,g,z,t,O,b,_,v,W,x,P,j,Q])})));function WQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function UQ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeEr
max-width: 1000px;
width: 100%;
font-size: 16px;
display: flex;
flex-direction: column;
gap: 16px;
`,BQ=(0,zm.ZP)("div")`
display: flex;
gap: 8px;
`,YQ=(0,zm.ZP)("div")`
display: flex;
align-items: center;
height: 36.5px;
`,XQ=e=>{let{locales:t,defaultLocale:n,dropdownText:r,color:i,canChangeLocale:o,onLocaleChange:a}=e;const[s,l]=(0,u.useState)(null),c=Boolean(s),d=(0,u.useCallback)((e=>{l(e.currentTarget)}),[]),f=(0,u.useCallback)((()=>{l(null)}),[]),p=(0,u.useCallback)((e=>{null==a||a(e),f()}),[f,a]);return o?Oa("div",null,Oa(AO,{id:"basic-button","aria-controls":c?"basic-menu":void 0,"aria-haspopup":"true","aria-expanded":c?"true":void 0,onClick:d,variant:"contained",endIcon:Oa(l_.Z,null),color:i},r),Oa(mw,{id:"basic-menu",anchorEl:s,open:c,onClose:f,MenuListProps:{"aria-labelledby":"basic-button"}},t.filter((e=>e!==n)).map((e=>Oa(Pw,{key:e,onClick:()=>p(e),sx:{minWidth:"80px"}},e))))):Oa(YQ,null,r)};function qQ(e,t,n,r){var i;if(n&&r){const n=ou(r);return St()(t,[...n,e.name])}return null===(i=t.data)||void 0===i?void 0:i[e.name]}const ZQ=q((function(e,t){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?WQ(Object(n),!0).forEach((function(t){UQ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WQ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t)}),{changeDraftField:pb})((e=>{let{collection:t,entry:n,fields:r,fieldsErrors:i,submitted:o,locale:a,canChangeLocale:s=!1,onLocaleChange:l,t:c}=e;const d=(0,u.useMemo)((()=>{if(tu(t)){const{locales:e,defaultLocale:n}=nu(t);return{currentLocale:null!=a?a:e[0],locales:e,defaultLocale:n}}}),[t,a]);return t&&r&&n&&!0!==n.partial?Oa(NQ,null,null!=d&&d.locales&&a?Oa(BQ,null,Oa(XQ,{locales:d.locales,defaultLocale:d.defaultLocale,dropdownText:c("editor.editorControlPane.i18n.writingInLocale",{locale:null==a?void 0:a.toUpperCase()}),color:"primary",canChangeLocale:s,onLocaleChange:l})):null,r.map((e=>{const t=function(e,t,n){return t!==n&&e.i18n===eu.TRANSLATE}(e,a,null==d?void 0:d.defaultLocale),r=ru(e,a,null==d?void 0:d.defaultLocale),s=iu(e,a,null==d?void 0:d.defaultLocale),l=d?`field-${a}_${e.name}`:`field-${e.name}`;return Oa(FQ,{key:l,field:e,value:qQ(e,n,t,a),fieldsErrors:i,submitted:o,isDisabled:r,isHidden:s,isFieldDuplicate:e=>ru(e,a,null==d?void 0:d.defaultLocale),isFieldHidden:e=>iu(e,a,null==d?void 0:d.defaultLocale),locale:a,parentPath:"",i18n:d})}))):null}));var VQ=__nested_webpack_require_2836554__(15836);const HQ=()=>"",GQ=/\s+at.*[(\s](.*)\)?/,KQ=/^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/;function JQ(e,{pretty:t=!1,basePath:n}={}){const r=n&&new RegExp(`(file://)?${function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(n.replace(/\\/g,"/"))}/?`,"g"),i=t?HQ():"";if("string"==typeof e)return e.replace(/\\/g,"/").split("\n").filter((e=>{const t=e.match(GQ);if(null===t||!t[1])return!0;const n=t[1];return!(n.includes(".app/Contents/Resources/electron.asar")||n.includes(".app/Contents/Resources/default_app.asar")||n.includes("node_modules/electron/dist/resources/electron.asar")||n.includes("node_modules/electron/dist/resources/default_app.asar")||KQ.test(n))})).filter((e=>""!==e.trim())).map((e=>(r&&(e=e.replace(r,"")),t&&(e=e.replace(GQ,((e,t)=>e.replace(t,t.replace(i,"~"))))),e))).join("\n")}function eA(e,{target:t=document.body}={}){const n=document.createElement("textarea"),r=document.activeElement;n.value=e,n.setAttribute("readonly",""),n.style.contain="strict",n.style.position="absolute",n.style.left="-9999px",n.style.fontSize="12pt";const i=document.getSelection();let o=!1;i.rangeCount>0&&(o=i.getRangeAt(0)),t.append(n),n.select(),n.selectionStart=0,n.selectionEnd=e.length;let a=!1;try{a=document.execCommand("copy")}catch{}return n.remove(),o&&(i.removeAllRanges(),i.addRange(o)),r&&r.focus(),a}const tA="https://github.com/StaticJsCMS/static-cms/issues/new?";function nA(e,t){try{const n=function(e){var t;let n="";"string"==typeof STATIC_CMS_CORE_VERSION&&(n=`static-cms@${STATIC_CMS_CORE_VERSION}`);const r=function(e,t,n,r){return`\n
padding: 40px;
h1 {
font-size: 28px;
color: ${Lb.text};
}
h2 {
font-size: 20px;
}
strong {
color: ${Lb.textLead};
font-weight: 500;
}
hr {
width: 200px;
margin: 30px 0;
border: 0;
height: 1px;
background-color: ${Lb.text};
}
a {
color: ${Lb.active};
}
`,iA=(0,zm.ZP)("span")`
color: ${Lb.text};
`,oA=(0,zm.ZP)("button")`
${Yb};
${Xb};
${qb};
display: block;
margin: 12px 0;
`,aA=e=>{let{entry:t,t:n}=e;return console.info(t),Oa(d().Fragment,null,Oa("hr",null),Oa("h2",null,n("ui.errorBoundary.recoveredEntry.heading")),Oa("strong",null,n("ui.errorBoundary.recoveredEntry.warning")),Oa(oA,{onClick:()=>eA(t)},n("ui.errorBoundary.recoveredEntry.copyButtonLabel")),Oa("pre",null,Oa("code",null,t)))};class sA extends u.Component{constructor(){super(...arguments),function(e,t,n){(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"state",{hasError:!1,errorMessage:"",errorTitle:"",backup:""})}static getDerivedStateFromError(e){return console.error(e),{hasError:!0,errorMessage:JQ(e.stack,{basePath:window.location.origin||""}),errorTitle:e.toString()}}shouldComponentUpdate(e,t){return!this.props.showBackup||this.state.errorMessage!==t.errorMessage||this.state.backup!==t.backup}async componentDidUpdate(){if(this.props.showBackup){const e=await Zl.getItem("backup");e&&(console.info(e),this.setState({backup:e}))}}render(){const{hasError:e,errorMessage:t,backup:n,errorTitle:r}=this.state,{showBackup:i,t:o}=this.props;return e?Oa(rA,{key:"error-boundary-container"},Oa("h1",null,o("ui.errorBoundary.title")),Oa("p",null,Oa("span",null,o("ui.errorBoundary.details")),Oa("a",{href:nA(r,this.props.config),target:"_blank",rel:"noopener noreferrer","data-testid":"issue-url"},o("ui.errorBoundary.reportIt"))),Oa("p",null,o("ui.errorBoundary.privacyWarning").split("\n").map(((e,t)=>[Oa(iA,{key:`private-warning-${t}`},e),Oa("br",{key:`break-${t}`})]))),Oa("hr",null),Oa("h2",null,o("ui.errorBoundary.detailsHeading")),Oa("p",null,t),n&&i&&Oa(aA,{key:"backup",entry:n,t:o})):this.props.children}}const lA=(0,p.Iu)()(sA),cA=(0,zm.ZP)("div")`
overflow-y: auto;
height: 100%;
padding: 24px;
font-family: Roboto, 'Helvetica Neue', HelveticaNeue, Helvetica, Arial, sans-serif;
`,uA=e=>{let{collection:t,fields:n,widgetFor:r}=e;return t&&n?Oa(cA,null,n.map((e=>Oa("div",{key:e.name},r(e.name))))):null},dA=(0,u.memo)((e=>{let{previewComponent:t,previewProps:n}=e;return t?(0,u.createElement)(t,n):null}));dA.displayName="EditorPreviewContent";const fA=dA;function pA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pA(Object(n),!0).forEach((function(t){mA(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pA(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function mA(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const gA=e=>{let{previewComponent:t,previewProps:n}=e;const r=(0,u.useRef)();return Oa(VQ.Kr,null,(e=>{var i;return r.current||(r.current=null===(i=e.document)||void 0===i?void 0:i.scrollingElement),Oa(Qg.ScrollSyncPane,{key:"preview-frame-scroll-sync",attachTo:r},Oa(fA,{key:"preview-frame-content",previewComponent:t,previewProps:hA(hA({},n),{},{document:e.document,window:e.window})}))}))};function OA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?OA(Object(n),!0).forEach((function(t){vA(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OA(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function vA(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const bA=(0,zm.ZP)(VQ.ZP)`
width: 100%;
height: 100%;
border: none;
background: #fff;
border-radius: ${Mb};
overflow: auto;
`,_A=(0,zm.ZP)("div")`
width: 100%;
height: 100%;
border: none;
background: #fff;
border-radius: ${Mb};
overflow: auto;
padding: 16px;
`,wA=(0,zm.ZP)("div")`
width: calc(100% - min(864px, 50%));
top: 64px;
right: 0;
position: absolute;
height: calc(100vh - 64px);
overflow: hidden;
`,kA=q((function(e,t){const n=_T(e);return yA(yA({},t),{},{isLoadingAsset:n,config:e.config})}),{getAsset:rb})((0,p.Iu)()((e=>{const{entry:t,collection:n,config:r,fields:i,previewInFrame:o,getAsset:a,t:s}=e,{widgetFor:l,widgetsFor:c}=NT(r.config,n,i,t),f=(0,u.useCallback)(((e,r)=>a(n,t,e,r)),[n]),p=(0,u.useMemo)((()=>[...Lu().map(((e,t)=>e.raw?Oa("style",{key:t},e.value):Oa("link",{key:t,href:e.value,type:"text/css",rel:"stylesheet"}))),Oa("style",{key:"global"},"\n body {\n margin: 0;\n }\n\n img {\n max-width: 100%;\n }\n\n .frame-content {\n padding: 16px;\n }\n")]),[]),h=(0,u.useMemo)((()=>{var e;return null!==(e=Mu(wc(n,t.slug)))&&void 0!==e?e:uA}),[n,t.slug]),m=(0,u.useMemo)((()=>'\n <!DOCTYPE html>\n <html>\n <head>\n <base target="_blank"/>\n </head>\n <body><div></div></body>\n </html>\n '),[]),g=(0,u.useMemo)((()=>document.getElementById("cms-root")),[]),y=(0,u.useMemo)((()=>yA(yA({},e),{},{getAsset:f,widgetFor:l,widgetsFor:c})),[f,e,l,c]);return(0,u.useMemo)((()=>g?O().createPortal(Oa(wA,{className:"preview-content"},t&&t.data?Oa(lA,{config:r},o?Oa(bA,{key:"preview-frame",id:"preview-pane",head:p,initialContent:m},n?Oa(gA,{key:"preview-frame-content",previewComponent:h,previewProps:yA({},y)}):s("collection.notFound")):Oa(Qg.ScrollSyncPane,{key:"preview-wrapper-scroll-sync"},Oa(_A,{key:"preview-wrapper",id:"preview-pane"},n?Oa(d().Fragment,null,p,Oa(fA,{key:"preview-wrapper-content",previewComponent:h,previewProps:yA(yA({},y),{},{document,window})})):s("collection.notFound")))):null),g,"preview-content"):null),[n,r,g,t,m,h,o,y,p,s])})));var xA=__nested_webpack_require_2836554__(66778),SA=__nested_webpack_require_2836554__(76296);const PA=(0,zm.ZP)(m_)`
background-color: ${Lb.foreground};
z-index: ${100};
`,TA=(0,zm.ZP)(Qw)`
gap: 12px;
`,$A=(0,zm.ZP)("div")`
display: flex;
margin: -32px -24px;
height: 64px;
a {
display: flex;
height: 100%;
padding: 16px;
align-items: center;
}
`,CA=(0,zm.ZP)("div")`
flex-grow: 1;
display: flex;
gap: 8px;
padding: 0 16px;
margin-left: 24px;
`,EA=(0,zm.ZP)("div")`
color: ${Lb.textLead};
font-size: 14px;
`,QA=(0,zm.ZP)("div")`
margin-top: 6px;
`,AA=(0,zm.ZP)(QA)`
${Jb};
`,DA=(0,zm.ZP)(QA)`
${e_};
`,RA=(0,zm.ZP)("div")`
position: relative;
`,LA=(0,p.Iu)()((e=>{let{user:t,hasChanged:n,displayUrl:r,collection:i,onLogoutClick:o,onDuplicate:a,isPersisting:s,onPersist:l,onPersistAndDuplicate:c,onPersistAndNew:d,isNewEntry:f,showDelete:p,onDelete:h,t:m,editorBackLink:g}=e;const O=(0,u.useMemo)((()=>{var e;return null!==(e="folder"in i&&i.create)&&void 0!==e&&e}),[i]),y=(0,u.useMemo)((()=>_c(i)),[i]),v=(0,u.useMemo)((()=>!f&&!n),[n,f]),[b,_]=(0,u.useState)(null),w=Boolean(b),k=(0,u.useCallback)((e=>{_(e.currentTarget)}),[]),x=(0,u.useCallback)((()=>{_(null)}),[]),S=(0,u.useCallback)((e=>()=>{x(),e()}),[x]),P=(0,u.useMemo)((()=>S(d)),[S,d]),T=(0,u.useMemo)((()=>S(c)),[S,c]),$=(0,u.useMemo)((()=>S(a)),[S,a]),C=(0,u.useMemo)((()=>S((()=>l()))),[S,l]),E=(0,u.useMemo)((()=>S(h)),[S,h]),Q=(0,u.useMemo)((()=>{const e=[];return v||(e.push(Oa(Pw,{key:"publishNow",onClick:C},m("editor.editorToolbar.publishNow"))),O&&e.push(Oa(Pw,{key:"publishAndCreateNew",onClick:P},m("editor.editorToolbar.publishAndCreateNew")),Oa(Pw,{key:"publishAndDuplicate",onClick:T},m("editor.editorToolbar.publishAndDuplicate")))),O&&e.push(Oa(Pw,{key:"duplicate",onClick:$},m("editor.editorToolbar.duplicate"))),e}),[O,$,C,T,P,v,m]),A=(0,u.useMemo)((()=>Oa(CA,null,Oa("div",null,Oa(RA,null,Oa(AO,{id:"existing-published-button","aria-controls":w?"existing-published-menu":void 0,"aria-haspopup":"true","aria-expanded":w?"true":void 0,onClick:k,variant:"contained",color:v?"success":"primary",endIcon:Oa(l_.Z,null),disabled:0===Q.length||s},m(v?"editor.editorToolbar.published":s?"editor.editorToolbar.publishing":"editor.editorToolbar.publish")),s?Oa(FP,{size:24,sx:{color:SA.Z[500],position:"absolute",top:"50%",left:"50%",marginTop:"-12px",marginLeft:"-12px"}}):null),Oa(mw,{id:"existing-published-menu",anchorEl:b,open:w,onClose:x,MenuListProps:{"aria-labelledby":"existing-published-button"}},Q)),p&&y?Oa(AO,{variant:"outlined",color:"error",key:"delete-button",onClick:E},m("editor.editorToolbar.deleteEntry")):null)),[b,y,k,x,E,s,v,Q,w,p,m]);return Oa(PA,{position:"relative"},Oa(TA,null,Oa($A,null,Oa(AO,{component:ak,to:g},Oa(xA.Z,null),Oa("div",null,Oa(EA,null,m("editor.editorToolbar.backCollection",{collectionLabel:i.label})),n?Oa(DA,{key:"back-changed"},m("editor.editorToolbar.unsavedChanges")):Oa(AA,{key:"back-unchanged"},m("editor.editorToolbar.changesSaved"))))),A,Oa(hS,{displayUrl:r,imageUrl:null==t?void 0:t.avatar_url,onLogoutClick:o})))})),MA="cms.preview-visible",jA="cms.i18n-visible",IA=(0,zm.ZP)("div")`
display: grid;
grid-template-columns: min(864px, 50%) auto;
height: calc(100vh - 64px);
`,zA=(0,zm.ZP)("div")`
${Hb};
border-radius: 0;
height: 100%;
`,FA=(0,zm.ZP)("div")`
width: 100%;
min-width: 1200px;
height: 100vh;
overflow: hidden;
`,WA=(0,zm.ZP)("div")`
height: calc(100vh - 64px);
position: relative;
background-color: ${wb};
overflow-y: auto;
`,UA=(0,zm.ZP)("div",Jl)((e=>{let{$blockEntry:t}=e;return`\n height: 100%;\n pointer-events: ${t?"none":"auto"};\n overflow-y: auto;\n `})),NA=(0,zm.ZP)(UA,Jl)((e=>{let{$hidden:t=!1}=e;return`\n padding: 24px 16px 16px;\n position: relative;\n overflow-x: hidden;\n display: ${t?"none":"flex"};\n align-items: flex-start;\n justify-content: center;\n `})),BA=(0,zm.ZP)("div")`
position: fixed;
bottom: 4px;
right: 8px;
z-index: ${299};
display: flex;
flex-direction: column;
gap: 4px;
`,YA=e=>{let{i18nVisible:t,previewVisible:n,editor:r,editorSideBySideLocale:i,editorWithPreview:o}=e;return t?i:n?o:Oa(zA,null,r)},XA=e=>{var t,n;let{collection:r,entry:i,fields:o=[],fieldsErrors:a,showDelete:s,onDelete:l,onDuplicate:c,onPersist:f,user:p,hasChanged:h,displayUrl:m,isNewEntry:g,isModification:O,onLogoutClick:y,draftKey:v,editorBackLink:b,scrollSyncEnabled:_,t:w,loadScroll:k,toggleScroll:x,submitted:S}=e;const[P,T]=(0,u.useState)("false"!==localStorage.getItem(MA)),[$,C]=(0,u.useState)("false"!==localStorage.getItem(jA));(0,u.useEffect)((()=>{k()}),[k]);const{locales:E,defaultLocale:Q}=null!==(t=(0,u.useMemo)((()=>nu(r)),[r]))&&void 0!==t?t:{},[A,D]=(0,u.useState)(null!==(n=null==E?void 0:E[1])&&void 0!==n?n:"en"),R=(0,u.useCallback)((async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createNew:t=!1,duplicate:n=!1}=e;f({createNew:t,duplicate:n})}),[f]),L=(0,u.useCallback)((()=>{const e=!P;T(e),localStorage.setItem(MA,`${e}`)}),[P]),M=(0,u.useCallback)((()=>{x()}),[x]),j=(0,u.useCallback)((()=>{const e=!$;C(e),localStorage.setItem(jA,`${e}`)}),[$]),I=(0,u.useCallback)((e=>{D(e)}),[]),[z,F]=(0,u.useMemo)((()=>{var e,t,n,o;let a=null===(e=null===(t=r.editor)||void 0===t?void 0:t.preview)||void 0===e||e,s=null===(n=null===(o=r.editor)||void 0===o?void 0:o.frame)||void 0===n||n;if("files"in r){var l,c;const e=Pc(r,i.slug);void 0!==(null==e||null===(l=e.editor)||void 0===l?void 0:l.preview)&&(a=e.editor.preview),void 0!==(null==e||null===(c=e.editor)||void 0===c?void 0:c.frame)&&(s=e.editor.frame)}return[a,s]}),[r,i.slug]),W=tu(r),U=Oa(NA,{key:Q,id:"control-pane"},Oa(ZQ,{collection:r,entry:i,fields:o,fieldsErrors:a,locale:Q,submitted:S,t:w})),N=(0,u.useMemo)((()=>(null!=E?E:[]).filter((e=>e!==Q)).map((e=>Oa(NA,{key:e,$hidden:e!==A},Oa(ZQ,{collection:r,entry:i,fields:o,fieldsErrors:a,locale:e,onLocaleChange:I,submitted:S,canChangeLocale:!0,t:w}))))),[r,Q,i,o,a,I,E,A,S,w]),B=W?function(e,t,n){var r,i;return t&&t!==n?Hc(Hc({},e),{},{data:null===(r=e.i18n)||void 0===r||null===(i=r[t])||void 0===i?void 0:i.data}):e}(i,A[0],Q):i,Y=Oa(d().Fragment,null,Oa(IA,null,Oa(Qg.ScrollSyncPane,null,U),Oa(UA,null,Oa(kA,{collection:r,previewInFrame:F,entry:B,fields:o})))),X=Oa(Qg.ScrollSync,{enabled:_},Oa("div",null,Oa(IA,null,Oa(Qg.ScrollSyncPane,null,U),Oa(Qg.ScrollSyncPane,null,Oa(d().Fragment,null,N))))),q=W&&$,Z=z&&P,V=q||Z;return Oa(FA,null,Oa(LA,{isPersisting:i.isPersisting,isDeleting:i.isDeleting,onPersist:R,onPersistAndNew:()=>R({createNew:!0}),onPersistAndDuplicate:()=>R({createNew:!0,duplicate:!0}),onDelete:l,showDelete:s,onDuplicate:c,user:p,hasChanged:h,displayUrl:m,collection:r,isNewEntry:g,isModification:O,onLogoutClick:y,editorBackLink:b}),Oa(WA,{key:v},Oa(BA,null,W&&Oa(Eg,{size:"small",color:q?"primary":"default","aria-label":"add",onClick:j,title:w("editor.editorInterface.toggleI18n")},Oa(xQ.Z,null)),z&&Oa(Eg,{size:"small",color:Z?"primary":"default","aria-label":"add",onClick:L,title:w("editor.editorInterface.togglePreview")},Oa(SQ.Z,null)),V&&Oa(Eg,{size:"small",color:_?"primary":"default","aria-label":"add",onClick:M,title:w("editor.editorInterface.toggleScrollSync")},Oa(kQ.Z,null))),Oa(YA,{i18nVisible:q,previewVisible:Z,editor:U,editorSideBySideLocale:X,editorWithPreview:Y})))};function qA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ZA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qA(Object(n),!0).forEach((function(t){VA(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qA(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function VA(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimit
height: 100%;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
`,sD=e=>{let{content:t}=e;return Oa(aD,null,Oa("h1",null,t))};var lD=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},cD=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),uD=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dD=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},fD=void 0;fD="undefined"!=typeof window?window:"undefined"!=typeof self?self:__nested_webpack_require_2836554__.g;var pD=null,hD=null,mD=fD.clearTimeout,gD=fD.setTimeout,OD=fD.cancelAnimationFrame||fD.mozCancelAnimationFrame||fD.webkitCancelAnimationFrame,yD=fD.requestAnimationFrame||fD.mozRequestAnimationFrame||fD.webkitRequestAnimationFrame;null==OD||null==yD?(pD=mD,hD=function(e){return gD(e,20)}):(pD=function(e){var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),2!==n.length);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(e),n=t[0],r=t[1];OD(n),mD(r)},hD=function(e){var t=yD((function(){mD(n),e()})),n=gD((function(){OD(t),e()}),20);return[t,n]});var vD=function(e){function t(){var e,n,r;lD(this,t);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=dD(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o))),r.state={height:r.props.defaultHeight||0,width:r.props.defaultWidth||0},r._onResize=function(){var e=r.props,t=e.disableHeight,n=e.disableWidth,i=e.onResize;if(r._parentNode){var o=r._parentNode.offsetHeight||0,a=r._parentNode.offsetWidth||0,s=window.getComputedStyle(r._parentNode)||{},l=parseInt(s.paddingLeft,10)||0,c=parseInt(s.paddingRight,10)||0,u=parseInt(s.paddingTop,10)||0,d=parseInt(s.paddingBottom,10)||0,f=o-u-d,p=a-l-c;(!t&&r.state.height!==f||!n&&r.state.width!==p)&&(r.setState({height:o-u-d,width:a-l-c}),i({height:o,width:a}))}},r._setRef=function(e){r._autoSizer=e},dD(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),cD(t,[{key:"componentDidMount",value:function(){var e=this.props.nonce;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._detectElementResize=function(e){var t=void 0,n=void 0,r=void 0,i=void 0,o=void 0,a=void 0,s=void 0,l="undefined"!=typeof document&&document.attachEvent;if(!l){a=function(e){var t=e.__resizeTriggers__,n=t.firstElementChild,r=t.lastElementChild,i=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,i.style.width=n.offsetWidth+1+"px",i.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight},o=function(e){return e.offsetWidth!==e.__resizeLast__.width||e.offsetHeight!==e.__resizeLast__.height},s=function(e){if(!(e.target.className&&"function"==typeof e.target.className.indexOf&&e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)){var t=this;a(this),this.__resizeRAF__&&pD(this.__resizeRAF__),this.__resizeRAF__=hD((function(){o(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.
height: ${162}px;
${Ub};
${Fb};
border-bottom: solid ${"2px"} ${Lb.textFieldBorder};
position: relative;
`,RD=(0,zm.ZP)("img")`
width: 100%;
height: ${160}px;
object-fit: contain;
border-radius: 2px 2px 0 0;
`,LD=(0,zm.ZP)("div")`
width: 100%;
height: 160px;
object-fit: cover;
border-radius: 2px 2px 0 0;
padding: 1em;
font-size: 3em;
`,MD=(0,zm.ZP)("p")`
color: ${Lb.text};
padding: 8px;
margin-top: 20px;
overflow-wrap: break-word;
line-height: 1.3;
`,jD=(0,zm.ZP)("p")`
color: ${Lb.mediaDraftText};
background-color: ${Lb.mediaDraftBackground};
position: absolute;
padding: 8px;
border-radius: ${Mb} 0 ${Mb} 0;
`,ID=e=>{let{isSelected:t=!1,displayURL:n,text:r,onClick:i,draftText:o,width:a,height:s,margin:l,type:c,isViewableImage:d,isDraft:f,loadDisplayURL:p}=e;const h=ek(n.url);return(0,u.useEffect)((()=>{n.url||p()}),[n.url,p]),Oa(AD,{$isSelected:t,$width:a,$height:s,$margin:l,onClick:i,tabIndex:-1},Oa(DD,null,f?Oa(jD,{"data-testid":"draft-text"},o):null,h&&d?Oa(RD,{src:h}):Oa(LD,{"data-testid":"card-file-icon"},c)),Oa(MD,null,r))};function zD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function FD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zD(Object(n),!0).forEach((function(t){WD(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function WD(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const UD=e=>{var t,n,r;let{rowIndex:i,columnIndex:o,style:a,data:{mediaItems:s,isSelectedFile:l,onAssetClick:c,cardDraftText:u,cardWidth:d,cardHeight:f,displayURLs:p,loadDisplayURL:h,columnCount:m,gutter:g}}=e;const O=i*m+o;if(O>=s.length)return null;const y=s[O];return Oa("div",{style:FD(FD({},a),{},{left:"number"==typeof a.left?null!==(t=a.left)&&void 0!==t?t:g*o:a.left,top:a.top,width:"number"==typeof a.width?a.width-g:a.width,height:"number"==typeof a.height?a.height-g:a.height})},Oa(ID,{key:y.key,isSelected:l(y),text:y.name,onClick:()=>c(y),isDraft:y.draft,draftText:u,width:d,height:f,margin:"0px",displayURL:null!==(n=p[y.id])&&void 0!==n?n:y.url?{url:y.url}:{},loadDisplayURL:()=>h(y),type:y.type,isViewableImage:null!==(r=y.isViewableImage)&&void 0!==r&&r}))},ND=(0,zm.ZP)("div")((e=>{let{$width:t,$height:n}=e;return`\n overflow-y: auto;\n overflow-x: hidden;\n width: ${t?`${t}px`:"100%"};\n height: ${n?`${n}px`:"100%"};ƒ\n `})),BD=(0,zm.ZP)("div")`
display: flex;
flex-wrap: wrap;
margin-left: -10px;
margin-right: -10px;
`,YD=e=>{const{cardWidth:t,cardHeight:n,cardMargin:r,mediaItems:i,setScrollContainerRef:o}=e;return Oa(bD,null,(a=>{let{height:s,width:l}=a;const c=parseInt(t,10),u=parseInt(n,10),d=parseInt(r,10),f=c+d,p=u+d,h=Math.floor(l/f),m=Math.ceil(i.length/h);return Oa(ND,{$width:l,$height:s,ref:o},Oa(QD,{columnCount:h,columnWidth:f,rowCount:m,rowHeight:p,width:l,height:s,itemData:FD(FD({},e),{},{gutter:d,columnCount:h}),style:{overflow:"hidden",overflowY:"scroll"}},UD))}))},XD=e=>{let{setScrollContainerRef:t,mediaItems:n,isSelectedFile:r,onAssetClick:i,cardDraftText:o,cardWidth:a,cardHeight:s,cardMargin:l,displayURLs:c,loadDisplayURL:u,canLoadMore:d,onLoadMore:f,isPaginating:p,paginatingMessage:h}=e;return Oa(ND,{ref:t},Oa(BD,null,n.map((e=>{var t,n;return Oa(ID,{key:e.key,isSelected:r(e),text:e.name,onClick:()=>i(e),isDraft:e.draft,draftText:o,width:a,height:s,margin:l,displayURL:null!==(t=c[e.id])&&void 0!==t?t:e.url?{url:e.url}:{},loadDisplayURL:()=>u(e),type:e.type,isViewableImage:null!==(n=e.isViewableImage)&&void 0!==n&&n})})),d?Oa(oT,{onEnter:f}):null),p?Oa("h1",null,h):null)},qD=function(e){const{canLoadMore:t,isPaginating:n}=e;return Oa(t||n?XD:YD,e)},ZD=e=>{let{disabled:t,draft:n,path:r,name:i,t:o}=e;const[a,s]=(0,u.useState)(!1);(0,u.useEffect)((()=>{let e=!0;const t=setTimeout((()=>{e&&s(!1)}),1500);return()=>{e=!1,clearTimeout(t)}}),[]);const l=(0,u.useCallback)((()=>{r&&i&&(eA(Pl(r)||!n?r:i),s(!0))}),[n,i,r]),c=(0,u.useCallback)((()=>a?o("mediaLibrary.mediaLibraryCard.copied"):r?Pl(r)?o("mediaLibrary.mediaLibraryCard.copyUrl"):o(n?"mediaLibrary.mediaLibraryCard.copyName":"mediaLibrary.mediaLibraryCard.copyPath"):o("mediaLibrary.mediaLibraryCard.copy")),[a,n,r,o]);return Oa(AO,{color:"inherit",variant:"contained",onClick:l,disabled:t},c())},VD=e=>{let{value:t="",onChange:n,onKeyDown:r,placeholder:i,disabled:o}=e;return Oa(UE,{onKeyDown:r,placeholder:i,value:t,onChange:n,variant:"outlined",size:"small",disabled:o,InputProps:{startAdornment:Oa(U$,{position:"start"},Oa(L$.Z,null))}})},HD=(0,zm.ZP)("div")`
position: relative;
display: flex;
flex-direction: column;
`,GD=(0,zm.ZP)("div")`
flex-shrink: 0;
display: flex;
gap: 8px;
`,KD=(0,zm.ZP)(Ev)`
display: flex;
justify-content: space-between;
align-items: center;
`,JD=(0,zm.ZP)((e=>{let{label:t,imagesOnly:n,onChange:r,disabled:i}=e;return Oa(AO,{variant:"contained",component:"label"},t,Oa("input",{hidden:!0,multiple:!0,type:"file",accept:n?"image/*":"*/*",onChange:r,disabled:i}))}))`
${Yb};
${Xb};
display: inline-block;
margin-left: 15px;
margin-right: 2px;
&[disabled] {
${Zb};
cursor: default;
}
${qb};
${zb};
margin-bottom: 0;
span {
font-size: 14px;
font-weight: 500;
display: flex;
justify-content: center;
align-items: center;
}
input {
height: 0.1px;
width: 0.1px;
margin: 0;
padding: 0;
opacity: 0;
overflow: hidden;
position: absolute;
z-index: ${i_};
outline: none;
}
`,eR=e=>{let{t,forImage:n,onDownload:r,onUpload:i,query:o,onSearchChange:a,onSearchKeyDown:s,searchDisabled:l,onDelete:c,canInsert:u,onInsert:d,hasSelection:f,isPersisting:p,isDeleting:h,selectedFile:m}=e;const g=p||h,O=!g,y=!g&&f,v=t(p?"mediaLibrary.mediaLibraryModal.uploading":"mediaLibrary.mediaLibraryModal.upload"),b=t(h?"mediaLibrary.mediaLibraryModal.deleting":"mediaLibrary.mediaLibraryModal.deleteSelected"),_=t("mediaLibrary.mediaLibraryModal.download"),w=t("mediaLibrary.mediaLibraryModal.chooseSelected");return Oa(HD,null,Oa(KD,null,t(n?"mediaLibrary.mediaLibraryModal.images":"mediaLibrary.mediaLibraryModal.mediaAssets"),Oa(GD,null,Oa(ZD,{disabled:!f,path:null==m?void 0:m.path,name:null==m?void 0:m.name,draft:null==m?void 0:m.draft,t}),Oa(AO,{color:"inherit",variant:"contained",onClick:r,disabled:!f},_),Oa(JD,{label:v,imagesOnly:n,onChange:i,disabled:!O}))),Oa(KD,null,Oa(VD,{value:o,onChange:a,onKeyDown:s,placeholder:t("mediaLibrary.mediaLibraryModal.search"),disabled:l}),Oa(GD,null,Oa(AO,{color:"error",variant:"outlined",onClick:c,disabled:!y},b),u?Oa(AO,{color:"success",variant:"contained",onClick:d,disabled:!f},w):null)))},tR=(0,zm.ZP)(Eg)`
position: absolute;
top: -20px;
left: -20px;
`,nR="300px",rR=(0,zm.ZP)(Gy)`
.MuiDialog-paper {
display: flex;
flex-direction: column;
overflow: visible;
height: 80%;
width: calc(${nR} + 20px);
max-width: calc(${nR} + 20px);
@media (min-width: 800px) {
width: calc(${nR} * 2 + 20px);
max-width: calc(${nR} * 2 + 20px);
}
@media (min-width: 1120px) {
width: calc(${nR} * 3 + 20px);
max-width: calc(${nR} * 3 + 20px);
}
@media (min-width: 1440px) {
width: calc(${nR} * 4 + 20px);
max-width: calc(${nR} * 4 + 20px);
}
@media (min-width: 1760px) {
width: calc(${nR} * 5 + 20px);
max-width: calc(${nR} * 5 + 20px);
}
@media (min-width: 2080px) {
width: calc(${nR} * 6 + 20px);
max-width: calc(${nR} * 6 + 20px);
}
}
`,iR=(0,p.Iu)()((e=>{let{isVisible:t=!1,canInsert:n,files:r,dynamicSearch:i,dynamicSearchActive:o,forImage:a,isLoading:s,isPersisting:l,isDeleting:c,hasNextPage:u,isPaginating:d,query:f,selectedFile:p,handleFilter:h,handleQuery:m,toTableData:g,handleClose:O,handleSearchChange:y,handleSearchKeyDown:v,handlePersist:b,handleDelete:_,handleInsert:w,handleDownload:k,setScrollContainerRef:x,handleAssetClick:S,handleLoadMore:P,loadDisplayURL:T,displayURLs:$,t:C}=e;const E=a?h(r):r,Q=!i&&f?m(f,E):E,A=g(Q),D=r&&!!r.length,R=E&&!!E.length,L=Q&&!!Q.length,M=L,j=!M,I=s&&!M&&C("mediaLibrary.mediaLibraryModal.loading")||o&&C("mediaLibrary.mediaLibraryModal.noResults")||!D&&C("mediaLibrary.mediaLibraryModal.noAssetsFound")||!R&&C("mediaLibrary.mediaLibraryModal.noImagesFound")||!L&&C("mediaLibrary.mediaLibraryModal.noResults")||"",z=M&&!TQ()(p);return Oa(rR,{open:t,onClose:O},Oa(tR,{color:"default","aria-label":"add",onClick:O,size:"small"},Oa(oD.Z,null)),Oa(eR,{t:C,onClose:O,forImage:a,onDownload:k,onUpload:b,query:f,onSearchChange:y,onSearchKeyDown:v,searchDisabled:!o&&!R,onDelete:_,canInsert:n,onInsert:w,hasSelection:z,isPersisting:l,isDeleting:c,selectedFile:p}),Oa(cv,null,j?Oa(sD,{content:I}):null,Oa(qD,{setScrollContainerRef:x,mediaItems:A,isSelectedFile:e=>(null==p?void 0:p.key)===e.key,onAssetClick:S,canLoadMore:u,onLoadMore:P,isPaginating:d,paginatingMessage:C("mediaLibrary.mediaLibraryModal.loading"),cardDraftText:C("mediaLibrary.mediaLibraryCard.draft"),cardWidth:"278px",cardHeight:"240px",cardMargin:"10px",loadDisplayURL:T,displayURLs:$})))}));function oR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function aR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oR(Object(n),!0).forEach((function(t){sR(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function sR(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const lR=["jpg","jpeg","webp","gif","png","bmp","tiff","svg","avif"],cR=[...lR],uR={loadMedia:Xv,persistMedia:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{field:n}=t;return async(t,r)=>{const i=r(),o=i.config.config;if(!o)return;const a=Od(o),s=yO(i,n),l=fa(e.name.toLowerCase(),o.slug),c=s.find((e=>e.name.toLowerCase()===l)),u=mO(i);if(c){if(!await jv({title:"mediaLibrary.mediaLibrary.alreadyExistsTitle",body:{key:"mediaLibrary.mediaLibrary.alreadyExistsBody",options:{filename:c.name}},color:"error"}))return;await t(qv(c))}u||t({type:wf});try{const r=i.entryDraft.entry,s=dc(o,null!=r&&r.collection?i.collections[r.collection]:null,r,l,n),c=pO({file:e,path:s,field:n});let d;return t(Jv(c)),u?(d=function(e){let{id:t,file:n,assetProxy:r,draft:i}=e;return{id:t,name:Tl(r.path),displayURL:r.url,draft:i,file:n,size:n.size,url:r.url,path:r.path,field:r.field}}({id:await Ks(e),file:e,assetProxy:c,draft:Boolean(u)}),t(function(e){return{type:of,payload:e}}(d))):(d=await a.persistMedia(o,c),t(function(e){return{type:kf,payload:{file:e}}}(d)))}catch(e){return console.error(e),t(Uh({type:"error",message:{key:"ui.toast.onFailToPersistMedia",options:{details:e}}})),t({type:xf})}}},deleteMedia:qv,insertMedia:Bv,loadMediaDisplayURL:Zv,closeMediaLibrary:function(){return(e,t)=>{const n=t().mediaLibrary.externalLibrary;var r;n&&(null===(r=n.hide)||void 0===r||r.call(n)),e({type:mf})}}},dR=q((function(e){const{mediaLibrary:t}=e,n=t.field;return aR({},{isVisible:t.isVisible,canInsert:t
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
`,pR=q((function(e){const{collections:t}=e;return{collections:t,isSearchEnabled:e.config.config&&0!=e.config.config.search,searchTerm:"",filterTerm:""}}),{})((0,p.Iu)()((e=>{let{collections:t,isSearchEnabled:n,searchTerm:r,filterTerm:i}=e;const{id:o}=Ze(),a=(0,u.useMemo)((()=>{if(!o)return"";const e=function(e){return Du.additionalLinks[e]}(o);return e?e.data:""}),[o]),s=(0,u.useMemo)((()=>Oa(fR,null,a?Oa(a,null):"Page not found")),[a]);return Oa(xS,null,Oa(pQ,{collections:t,collection:!1,isSearchEnabled:n,searchTerm:r,filterTerm:i}),s)})));function hR(e){return(0,Og.Z)("MuiAlert",e)}const mR=(0,ng.Z)("MuiAlert",["root","action","icon","message","filled","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),gR=(0,lk.Z)((0,eg.jsx)("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),OR=(0,lk.Z)((0,eg.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),yR=(0,lk.Z)((0,eg.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),vR=(0,lk.Z)((0,eg.jsx)("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),bR=(0,lk.Z)((0,eg.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),_R=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],wR=(0,zm.ZP)(Wy,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${(0,xg.Z)(n.color||n.severity)}`]]}})((({theme:e,ownerState:t})=>{const n="light"===e.palette.mode?wO._j:wO.$n,r="light"===e.palette.mode?wO.$n:wO._j,i=t.color||t.severity;return(0,P.Z)({},e.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px"},i&&"standard"===t.variant&&{color:e.vars?e.vars.palette.Alert[`${i}Color`]:n(e.palette[i].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${i}StandardBg`]:r(e.palette[i].light,.9),[`& .${mR.icon}`]:e.vars?{color:e.vars.palette.Alert[`${i}IconColor`]}:{color:e.palette[i].main}},i&&"outlined"===t.variant&&{color:e.vars?e.vars.palette.Alert[`${i}Color`]:n(e.palette[i].light,.6),border:`1px solid ${(e.vars||e).palette[i].light}`,[`& .${mR.icon}`]:e.vars?{color:e.vars.palette.Alert[`${i}IconColor`]}:{color:e.palette[i].main}},i&&"filled"===t.variant&&(0,P.Z)({fontWeight:e.typography.fontWeightMedium},e.vars?{color:e.vars.palette.Alert[`${i}FilledColor`],backgroundColor:e.vars.palette.Alert[`${i}FilledBg`]}:{backgroundColor:"dark"===e.palette.mode?e.palette[i].dark:e.palette[i].main,color:e.palette.getContrastText(e.palette[i].main)}))})),kR=(0,zm.ZP)("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),xR=(0,zm.ZP)("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),SR=(0,zm.ZP)("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),PR={success:(0,eg.jsx)(gR,{fontSize:"inherit"}),warning:(0,eg.jsx)(OR,{fontSize:"inherit"}),error:(0,eg.jsx)(yR,{fontSize:"inherit"}),info:(0,eg.jsx)(vR,{fontSize:"inherit"})},TR=u.forwardRef((function(e,t){var n,r,i,o,a,s;const l=(0,Fm.Z)({props:e,name:"Mu
position: fixed;
bottom: 16px;
right: 16px;
`,GR=e=>{let{children:t}=e;const n=function(e={}){const{getTrigger:t=ZR,target:n=VR}=e,r=(0,T.Z)(e,qR),i=u.useRef(),[o,a]=u.useState((()=>t(i,r)));return u.useEffect((()=>{const e=()=>{a(t(i,(0,P.Z)({target:n},r)))};return e(),n.addEventListener("scroll",e,{passive:!0}),()=>{n.removeEventListener("scroll",e,{passive:!0})}}),[n,t,JSON.stringify(r)]),o}({disableHysteresis:!0,threshold:100}),r=(0,u.useCallback)((e=>{const t=(e.target.ownerDocument||document).querySelector("#back-to-top-anchor");t&&t.scrollIntoView({block:"center"})}),[]);return Oa(Sy,{in:n},Oa(HR,{onClick:r,role:"presentation"},t))},KR=(0,zm.ZP)("div")`
margin: ${"24px"};
`,JR=(0,p.Iu)()((e=>{let{t}=e;return Oa(KR,null,Oa("h2",null,t("app.notFoundPage.header")))}));Dg().config({barColors:{0:Lb.active,"1.0":Lb.active},shadowBlur:0,barThickness:2});const eL=(0,zm.ZP)("div")`
width: 100%;
min-width: 1200px;
height: 100vh;
position: relative;
`,tL=(0,zm.ZP)("div")`
width: 100%;
min-width: 1200px;
min-height: 100vh;
`,nL=(0,zm.ZP)("div")`
margin: 20px;
`,rL=(0,zm.ZP)("pre")`
margin-left: 20px;
font-size: 15px;
line-height: 1.5;
`;function iL(){const{name:e}=Ze();return Oa(nt,{to:`/collections/${e}`})}function oL(){const{name:e,entryName:t}=Ze();return Oa(nt,{to:`/collections/${e}/entries/${t}`})}const aL={loginUser:function(e){return(t,n)=>{const r=n();if(!r.config.config)return;const i=Od(r.config.config);return t(Xh()),i.authenticate(e).then((e=>{t(qh(e))})).catch((e=>{console.error(e),e instanceof Error&&(t(Uh({type:"warning",message:{key:"ui.toast.onFailToAuth",options:{details:e.message}}})),t(Zh(e)))}))}},discardDraft:fb},sL=q((function(e){const{auth:t,config:n,collections:r,globalUI:i,mediaLibrary:o,scroll:a}=e;return{auth:t,config:n,collections:r,user:t.user,isFetching:i.isFetching,useMediaLibrary:!o.externalLibrary,scrollSyncEnabled:a.isScrolling}}),aL)((0,p.Iu)()((e=>{let{auth:t,user:n,config:r,collections:i,loginUser:o,isFetching:a,useMediaLibrary:s,t:l,scrollSyncEnabled:c,discardDraft:f}=e;const p=(0,u.useCallback)((e=>Oa(nL,null,Oa("h1",null,l("app.app.errorHeader")),Oa("div",null,Oa("strong",null,l("app.app.configErrors"),":"),Oa(rL,null,null!=e?e:r.error),Oa("span",null,l("app.app.checkConfigYml"))))),[r.error,l]),h=(0,u.useCallback)((e=>{o(e)}),[o]),m=(0,u.useMemo)((()=>{if(!r.config)return null;const e=Od(r.config);return null==e?void 0:e.authComponent()}),[r.config]),g=(0,u.useMemo)((()=>r.config?null==m?Oa("div",null,Oa("h1",null,l("app.app.waitingBackend"))):Oa("div",{key:"auth-page-wrapper"},Oa(m,{key:"auth-page",onLogin:h,error:t.error,inProgress:t.isFetching,siteId:r.config.backend.site_domain,base_url:r.config.backend.base_url,authEndpoint:r.config.backend.auth_endpoint,config:r.config,clearHash:()=>lO.replace("/"),t:l})):null),[m,t.error,t.isFetching,r.config,h,l]),O=(0,u.useMemo)((()=>Ac(i)),[i]),{pathname:y}=Xe();(0,u.useEffect)((()=>{/\/collections\/[a-zA-Z0-9_-]+\/entries\/[a-zA-Z0-9_-]+/g.test(y)||f()}),[y]);const v=(0,u.useMemo)((()=>n?Oa(d().Fragment,null,a&&Oa(Dg(),null),Oa(ot,null,Oa(rt,{path:"/",element:Oa(nt,{to:O})}),Oa(rt,{path:"/search",element:Oa(nt,{to:O})}),Oa(rt,{path:"/collections/:name/search/",element:Oa(iL,null)}),Oa(rt,{path:"/error=access_denied&error_description=Signups+not+allowed+for+this+instance",element:Oa(nt,{to:O})}),Oa(rt,{path:"/collections",element:Oa(bQ,{collections:i})}),Oa(rt,{path:"/collections/:name",element:Oa(bQ,{collections:i})}),Oa(rt,{path:"/collections/:name/new",element:Oa(JA,{collections:i,newRecord:!0})}),Oa(rt,{path:"/collections/:name/entries/:slug",element:Oa(JA,{collections:i})}),Oa(rt,{path:"/collections/:name/search/:searchTerm",element:Oa(bQ,{collections:i,isSearchResults:!0,isSingleSearchResult:!0})}),Oa(rt,{path:"/collections/:name/filter/:filterTerm",element:Oa(bQ,{collections:i})}),Oa(rt,{path:"/search/:searchTerm",element:Oa(bQ,{collections:i,isSearchResults:!0})}),Oa(rt,{path:"/edit/:name/:entryName",element:Oa(oL,null)}),Oa(rt,{path:"/page/:id",element:Oa(pR,null)}),Oa(rt,{element:Oa(JR,null)})),s?Oa(dR,null):null):g),[g,i,O,a,s,n]);return r.config?r.error?p():r.isFetching?Oa(UP,null,l("app.app.loadingConfig")):Oa(d().Fragment,null,Oa(o_,{key:"global-styles"}),Oa(Qg.ScrollSync,{key:"scroll-sync",enabled:c},Oa(d().Fragment,null,Oa("div",{key:"back-to-top-anchor",id:"back-to-top-anchor"}),Oa(eL,{key:"cms-root",id:"cms-root"},Oa(tL,{key:"cms-wrapper",className:"cms-wrapper"},Oa(XR,{key:"snackbars"}),v,Oa(iD,{key:"alert"}),Oa(Mv,{key:"confirm"}))),Oa(GR,{key:"scroll-to-top"},Oa(Eg,{size:"small","aria-label":"scroll back to top"},Oa(Mm.Z,null)))))):p(l("app.app.configNotFound"))}))),lL=(0,p.Iu)()((e=>{let{field:t,t:n}=e;return Oa("div",null,n("editor.editorWidgets.unknownControl.noControl",{widget:t.widget}))})),cL=(0,p.Iu)()((e=>{let{field:t,t:n}=e;return Oa("div",{className:"nc-widgetPreview"},n("editor.editorWidgets.unknownPreview.noPreview",{widget:t.widget}))}));Iu("unknown",lL,cL);var uL=__nested_webpack_require_2836554__(68883);function dL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
`,LL=(0,zm.ZP)("span")`
width: 300px;
height: 150px;
margin-top: -150px;
`,ML=(0,zm.ZP)(DL)`
color: #c4c6d2;
`,jL=(0,zm.ZP)(DL)`
color: #c4c6d2;
`,IL=e=>{let{url:t}=e;return Oa(LL,null,Oa("img",{src:t,alt:"Logo"}))},zL=e=>{let{onLogin:t,loginDisabled:n,loginErrorMessage:r,icon:i,buttonContent:o,pageContent:a,logoUrl:s,siteUrl:l,t:c}=e;return Oa(RL,null,(e=>e?Oa(IL,{url:e}):Oa(ML,{width:300,height:150,type:"static-cms"}))(s),r?Oa("p",null,r):null,null!=a?a:null,o?Oa(AO,{variant:"contained",disabled:n,onClick:t,startIcon:i},o):null,l?Oa(gL,{href:l,t:c}):null,s?Oa(jL,{width:100,height:100,type:"static-cms"}):null)},FL=(0,zm.ZP)(DL)`
margin-right: 18px;
`,WL=e=>{let{inProgress:t=!1,config:n,base_url:r,siteId:i,authEndpoint:o,clearHash:a,onLogin:s,t:l}=e;const[c,d]=(0,u.useState)(null),[f,p]=(0,u.useMemo)((()=>{const{auth_type:e=""}=n.backend;if("implicit"===e){const{base_url:e="https://bitbucket.org",auth_endpoint:t="site/oauth2/authorize",app_id:r=""}=n.backend,i=new Nw({base_url:e,auth_endpoint:t,app_id:r,clearHash:a});return i.completeAuth(((e,t)=>{e?d(e.toString()):t&&s(t)})),[i,{scope:"repository:write"}]}return[new Mw({base_url:r,site_id:"localhost"===document.location.host.split(":")[0]?"cms.netlify.com":i,auth_endpoint:o}),{provider:"bitbucket",scope:"repo"}]}),[o,r,a,n.backend,s,i]),h=(0,u.useCallback)((e=>{e.preventDefault(),f.authenticate(p,((e,t)=>{e?d(e.toString()):t&&s(t)}))}),[f,p,s]);return Oa(zL,{onLogin:h,loginDisabled:t,loginErrorMessage:c,logoUrl:n.logo_url,siteUrl:n.site_url,icon:Oa(FL,{type:"bitbucket"}),buttonContent:l(t?"auth.loggingIn":"auth.loginWithBitbucket"),t:l})};var UL=__nested_webpack_require_2836554__(78038),NL=__nested_webpack_require_2836554__(48494);const BL=(e,t,n={})=>(nM(t),!(!n.nocomment&&"#"===t.charAt(0))&&new oM(t,n).match(e)),YL="win32"===("object"==typeof NL&&NL?"object"==typeof NL.env&&NL.env&&NL.env.__MINIMATCH_TESTING_PLATFORM__||NL.platform:"posix"),XL=YL?{sep:"\\"}:{sep:"/"};BL.sep=XL.sep;const qL=Symbol("globstar **");BL.GLOBSTAR=qL;const ZL={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},VL="[^/]",HL=VL+"*?",GL=e=>e.split("").reduce(((e,t)=>(e[t]=!0,e)),{}),KL=GL("().*{}+?[]^$\\!"),JL=GL("[.(");BL.filter=(e,t={})=>n=>BL(n,e,t);const eM=(e,t={})=>Object.assign({},e,t);BL.defaults=e=>{if(!e||"object"!=typeof e||!Object.keys(e).length)return BL;const t=BL;return Object.assign(((n,r,i={})=>t(n,r,eM(e,i))),{Minimatch:class extends t.Minimatch{constructor(t,n={}){super(t,eM(e,n))}static defaults(n){return t.defaults(eM(e,n)).Minimatch}},filter:(n,r={})=>t.filter(n,eM(e,r)),defaults:n=>t.defaults(eM(e,n)),makeRe:(n,r={})=>t.makeRe(n,eM(e,r)),braceExpand:(n,r={})=>t.braceExpand(n,eM(e,r)),match:(n,r,i={})=>t.match(n,r,eM(e,i)),sep:t.sep,GLOBSTAR:qL})};const tM=(e,t={})=>(nM(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:UL(e));BL.braceExpand=tM;const nM=e=>{if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},rM=Symbol("subparse");BL.makeRe=(e,t={})=>new oM(e,t).makeRe(),BL.match=(e,t,n={})=>{const r=new oM(t,n);return e=e.filter((e=>r.match(e))),r.options.nonull&&!e.length&&e.push(t),e};const iM=e=>e.replace(/[[\]\\]/g,"\\$&");class oM{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;regexp;constructor(e,t={}){nM(e),t=t||{},this.options=t,this.pattern=e,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||!1===t.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.globSet=[],this.globParts=[],this.set=[],this.make()}debug(...e){}make(){const e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate(),this.globSet=this.braceExpand(),t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,this.globSet);const n=this.globSet.map((e=>this.slashSplit(e)));this.globParts=this.options.noglobstar?n:n.map((e=>e.reduce(((e,t)=>("**"===t&&"**"===e[e.length-1]||e.push(t),e)),[]))),this.debug(this.pattern,this.globParts);let r=this.globParts.map(((e,t,n)=>e.map((e=>this.parse(e)))));if(this.debug(this.pattern,r),this.set=r.filter((e=>-1===e.indexOf(!1))),YL)for(let e=0;e<this.set.length;e++){const t=this.set[e];""===t[0]&&""===t[1]&&"?"===this.globParts[e][2]&&"string"==typeof t[3]&&/^[a-z]:$/i.test(t[3])&&(t[2]="?")}this.debug(this.pattern,this.set)}parseNegate(){if(this.nonegate)r
Repo "${this.repo}" not found.
Please ensure the repo information is spelled correctly.
If the repo is private, make sure you're logged into a Bitbucket account with access.
`,e})))throw new Error("Your BitBucket user account does not have access to this repo.");const t=await this.api.user();return fM(fM({},t),{},{name:t.display_name,login:t.username,token:e.token,avatar_url:t.links.avatar.href,refresh_token:e.refresh_token})}getRefreshedAccessToken(){var e;if("implicit"===this.authType)throw new Ga("Can't refresh access token when using implicit auth");if(this.refreshedTokenPromise)return this.refreshedTokenPromise;if(!this.authenticator){const e={base_url:this.baseUrl,site_id:this.siteId};this.authenticator=new Mw(e)}return this.refreshedTokenPromise=null===(e=this.authenticator.refresh({provider:"bitbucket",refresh_token:this.refreshToken}))||void 0===e?void 0:e.then((e=>{let{token:t,refresh_token:n}=e;return this.token=t,this.refreshToken=n,this.refreshedTokenPromise=void 0,this.updateUserCredentials({token:t,refresh_token:n}),t})),this.refreshedTokenPromise}logout(){this.token=null}getToken(){return this.refreshedTokenPromise?this.refreshedTokenPromise:Promise.resolve(this.token)}async entriesByFolder(e,t,n){let r;const i=await this.api.defaultBranchCommitSha(),o=await Ll((()=>this.api.listFiles(e,n,20,this.branch).then((e=>{let{entries:n,cursor:i}=e;return r=i.mergeMeta({extension:t}),n.filter((e=>Ms(e,t)))}))),((e,t)=>this.api.readFile(e,t,{head:i})),this.api.readFileMetadata.bind(this.api),pL);return o[Hs]=r,o}async listAllFiles(e,t,n){return(await this.api.listAllFiles(e,n,this.branch)).filter((e=>Ms(e,t)))}async allEntriesByFolder(e,t,n){const r=await this.api.defaultBranchCommitSha(),i=await Bl({listAllFiles:()=>this.listAllFiles(e,t,n),readFile:(e,t)=>this.api.readFile(e,t,{head:r}),readFileMetadata:this.api.readFileMetadata.bind(this.api),apiName:pL,branch:this.branch,localForage:Zl,folder:e,extension:t,depth:n,getDefaultBranch:()=>Promise.resolve({name:this.branch,sha:r}),isShaExistsInBranch:this.api.isShaExistsInBranch.bind(this.api),getDifferences:(e,t)=>this.api.getDifferences(e,t),getFileId:e=>Promise.resolve(this.api.getFileId(r,e)),filterFile:e=>Ms(e,t)});return i}async entriesByFiles(e){const t=await this.api.defaultBranchCommitSha();return Ml(e,((e,n)=>this.api.readFile(e,n,{head:t})),this.api.readFileMetadata.bind(this.api),pL)}getEntry(e){return this.api.readFile(e).then((t=>({file:{path:e,id:null},data:t})))}async getMedia(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.mediaFolder;return e?this.api.listAllFiles(e,1,this.branch).then((e=>e.map((e=>{let{id:t,name:n,path:r}=e;return{id:t,name:n,path:r,displayURL:{id:t,path:r}}})))):[]}getLargeMediaClient(){return this._largeMediaClientPromise||(this._largeMediaClientPromise=(async()=>{const e=await this.api.readFile(".gitattributes").then((e=>gl(e))).catch((e=>(404===e.status?console.info("This 404 was expected and handled appropriately."):console.error(e),[])));return new uM(!!(this.largeMediaURL&&e.length>0),this.largeMediaURL,e,this.requestFunction)})()),this._largeMediaClientPromise}getMediaDisplayURL(e){return this._mediaDisplayURLSem=this._mediaDisplayURLSem||Ja()(10),zl(e,this.api.readFile.bind(this.api),this._mediaDisplayURLSem)}async getMediaFile(e){const t=Tl(e),n=jl(t,await Il(e,null,this.api.readFile.bind(this.api))),r=URL.createObjectURL(n);return{id:await Ks(n),displayURL:r,path:e,name:t,size:n.size,file:n,url:r}}async persistEntry(e,t){const n=await this.getLargeMediaClient();return Fl(this.lock,(async()=>this.api.persistFiles(e.dataFiles,n.enabled?await vl(n,e.assets):e.assets,t)),"Failed to acquire persist entry lock")}async persistMedia(e,t){const{fileObj:n,path:r}=e,i=URL.createObjectURL(n),o=await this.getLargeMediaClient(),a=r.startsWith("/")?r.slice(1):r;if(!o.enabled||!o.matchPath(a))return this._persistMedia(e,t);const s=await yl(o,n,r);return fM(fM({},await this._persistMedia(s,t)),{},{displayURL:i})}async _persistMedia(e,t){const n=e.fileObj,[r]=await Promise.all([Ks(n),this.api.persistFiles([],[e],t)]),i=URL.createObjectURL(n);return{displayURL:i,path:Jh()(e.path,"/k"),name:n.name,size:n.size,id:r,file:n,url:i}}deleteFiles(e,t){return this.api.deleteFiles(e,t)}trave
margin-right: 18px;
`,Pj=e=>{let{inProgress:t=!1,config:n,base_url:r,siteId:i,authEndpoint:o,onLogin:a,t:s}=e;const[l,c]=(0,u.useState)(null),d=(0,u.useCallback)((e=>{e.preventDefault();const t={base_url:r,site_id:"localhost"===document.location.host.split(":")[0]?"cms.netlify.com":i,auth_endpoint:o},s=new Mw(t),{auth_scope:l=""}=n.backend,u=l||"repo";s.authenticate({provider:"github",scope:u},((e,t)=>{e?c(e.toString()):t&&a(t)}))}),[o,r,n.backend,a,i]);return Oa(zL,{onLogin:d,loginDisabled:t,loginErrorMessage:l,logoUrl:n.logo_url,siteUrl:n.site_url,icon:Oa(Sj,{type:"github"}),buttonContent:s("auth.loginWithGitHub"),t:s})};function Tj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tj(Object(n),!0).forEach((function(t){Cj(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tj(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Cj(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const{fetchWithTimeout:Ej}=bs,Qj="https://www.githubstatus.com",Aj=`${Qj}/api/v2/components.json`,Dj=["API Requests","Issues, Pull Requests, Projects"];class Rj{constructor(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Cj(this,"lock",void 0),Cj(this,"api",void 0),Cj(this,"options",void 0),Cj(this,"originRepo",void 0),Cj(this,"repo",void 0),Cj(this,"branch",void 0),Cj(this,"apiRoot",void 0),Cj(this,"mediaFolder",void 0),Cj(this,"token",void 0),Cj(this,"_currentUserPromise",void 0),Cj(this,"_userIsOriginMaintainerPromises",void 0),Cj(this,"_mediaDisplayURLSem",void 0),Cj(this,"getCursorAndFiles",((e,t)=>{const n=e.length,r=Math.ceil(e.length/20),i=[];return t>1&&(i.push("prev"),i.push("first")),t<r&&(i.push("next"),i.push("last")),{cursor:Vs.create({actions:i,meta:{page:t,count:n,pageSize:20,pageCount:r},data:{files:e}}),files:e.slice(20*(t-1),20*t)}})),this.options=$j({proxied:!1,API:null},n),!this.options.proxied&&(null===e.backend.repo||void 0===e.backend.repo))throw new Error('The GitHub backend needs a "repo" in the backend configuration.');this.api=this.options.API||null,this.repo=this.originRepo=e.backend.repo||"",this.branch=(null===(t=e.backend.branch)||void 0===t?void 0:t.trim())||"main",this.apiRoot=e.backend.api_root||"https://api.github.com",this.token="",this.mediaFolder=e.media_folder,this.lock=es()}isGitBackend(){return!0}async status(){const e=await Ej(Aj).then((e=>e.json())).then((e=>e.components.filter((e=>Dj.includes(e.name))).every((e=>"operational"===e.status)))).catch((e=>(console.warn("Failed getting GitHub status",e),!0)));let t=!1;var n;return e&&(t=await(null===(n=this.api)||void 0===n?void 0:n.getUser().then((e=>!!e)).catch((e=>(console.warn("Failed getting GitHub user",e),!1))))||!1),{auth:{status:t},api:{status:e,statusPage:Qj}}}authComponent(){return Pj}restoreUser(e){return this.authenticate(e)}async currentUser(e){let{token:t}=e;return this._currentUserPromise||(this._currentUserPromise=Ej(`${this.apiRoot}/user`,{headers:{Authorization:`token ${t}`}}).then((e=>e.json()))),this._currentUserPromise}async userIsOriginMaintainer(e){let{username:t,token:n}=e;const r=t||(await this.currentUser({token:n})).login;return this._userIsOriginMaintainerPromises=this._userIsOriginMaintainerPromises||{},this._userIsOriginMaintainerPromises[r]||(this._userIsOriginMaintainerPromises[r]=Ej(`${this.apiRoot}/repos/${this.originRepo}/collaborators/${r}/permission`,{headers:{Authorization:`token ${n
Repo "${this.repo}" not found.
Please ensure the repo information is spelled correctly.
If the repo is private, make sure you're logged into a GitHub account with access.
If your repo is under an organization, ensure the organization has granted access to Netlify
CMS.
`,e})))throw new Error("Your GitHub user account does not have access to this repo.");return $j($j({},n),{},{token:e.token})}logout(){if(this.token=null,this.api&&this.api.reset&&"function"==typeof this.api.reset)return this.api.reset()}getToken(){return Promise.resolve(this.token)}async entriesByFolder(e,t,n){const r=this.api.originRepoURL;let i;const o=await Ll((()=>this.api.listFiles(e,{repoURL:r,depth:n}).then((e=>{const n=e.filter((e=>Ms(e,t))),r=this.getCursorAndFiles(n,1);return i=r.cursor,r.files}))),((e,t)=>this.api.readFile(e,t,{repoURL:r})),this.api.readFileMetadata.bind(this.api),kj);return o[Hs]=i,o}async allEntriesByFolder(e,t,n){const r=this.api.originRepoURL,i=await Ll((()=>this.api.listFiles(e,{repoURL:r,depth:n}).then((e=>e.filter((e=>Ms(e,t)))))),((e,t)=>this.api.readFile(e,t,{repoURL:r})),this.api.readFileMetadata.bind(this.api),kj);return i}entriesByFiles(e){const t=this.api.repoURL;return Ml(e,((e,n)=>this.api.readFile(e,n,{repoURL:t}).catch((()=>""))),this.api.readFileMetadata.bind(this.api),kj)}getEntry(e){const t=this.api.originRepoURL;return this.api.readFile(e,null,{repoURL:t}).then((t=>({file:{path:e,id:null},data:t}))).catch((()=>({file:{path:e,id:null},data:""})))}async getMedia(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.mediaFolder;return e?this.api.listFiles(e).then((e=>e.map((e=>{let{id:t,name:n,size:r,path:i}=e;return{id:t,name:n,size:r,displayURL:{id:t,path:i},path:i}})))):[]}async getMediaFile(e){const t=await Il(e,null,this.api.readFile.bind(this.api)),n=Tl(e),r=jl(n,t),i=URL.createObjectURL(r);return{id:await Ks(t),displayURL:i,path:e,name:n,size:r.size,file:r,url:i}}getMediaDisplayURL(e){return this._mediaDisplayURLSem=this._mediaDisplayURLSem||Ja()(10),zl(e,this.api.readFile.bind(this.api),this._mediaDisplayURLSem)}persistEntry(e,t){return Fl(this.lock,(()=>this.api.persistFiles(e.dataFiles,e.assets,t)),"Failed to acquire persist entry lock")}async persistMedia(e,t){try{await this.api.persistFiles([],[e],t);const{sha:n,path:r,fileObj:i}=e,o=URL.createObjectURL(i);return{id:n,name:i.name,size:i.size,displayURL:o,path:Jh()(r,"/")}}catch(e){throw console.error(e),e}}deleteFiles(e,t){return this.api.deleteFiles(e,t)}async traverseCursor(e,t){var n,r;const i=e.meta,o=null!==(n=null===(r=e.data)||void 0===r?void 0:r.files)&&void 0!==n?n:[];let a;switch(t){case"first":default:a=this.getCursorAndFiles(o,1);break;case"last":var s;a=this.getCursorAndFiles(o,null!==(s=null==i?void 0:i.pageCount)&&void 0!==s?s:1);break;case"next":var l;a=this.getCursorAndFiles(o,null!==(l=(null==i?void 0:i.page)+1)&&void 0!==l?l:1);break;case"prev":var c;a=this.getCursorAndFiles(o,null!==(c=(null==i?void 0:i.page)-1)&&void 0!==c?c:1)}const u=await Ml(a.files,((e,t)=>this.api.readFile(e,t,{repoURL:this.api.originRepoURL}).catch((()=>""))),this.api.readFileMetadata.bind(this.api),kj);return{entries:u,cursor:a.cursor}}}function Lj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lj(Object(n),!0).forEach((function(t){jj(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lj(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function jj(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ij="GitLab";var zj;!function(e){e.CREATE="create",e.DELETE="delete",e.MOVE="move",e.UPDATE="update"}(zj||(zj={}));class Fj{constructor(e){var t=this;jj(this,"apiRoot",void 0),j
margin-right: 18px;
`,Uj={pkce:e=>new qw(e)},Nj=e=>{let{inProgress:t=!1,config:n,siteId:r,authEndpoint:i,clearHash:o,onLogin:a,t:s}=e;const[l,c]=(0,u.useState)(null),d=(0,u.useMemo)((()=>{const{auth_type:e="",base_url:t="https://gitlab.com",auth_endpoint:s="oauth/authorize",app_id:l=""}=n.backend;if(xo(e)&&e in Uj){const n=Uj[e]({base_url:t,auth_endpoint:s,app_id:l,auth_token_endpoint:"oauth/token",clearHash:o});return n.completeAuth(((e,t)=>{e?c(e.toString()):t&&a(t)})),n}return new Mw({base_url:t,site_id:"localhost"===document.location.host.split(":")[0]?"cms.netlify.com":r,auth_endpoint:i})}),[i,o,n.backend,a,r]),f=(0,u.useCallback)((e=>{e.preventDefault(),d.authenticate({provider:"gitlab",scope:"api"},(e=>{e&&c(e.toString())}))}),[d]);return Oa(zL,{onLogin:f,loginDisabled:t,loginErrorMessage:l,logoUrl:n.logo_url,siteUrl:n.site_url,icon:Oa(Wj,{type:"gitlab"}),buttonContent:s(t?"auth.loggingIn":"auth.loginWithGitLab"),t:s})};function Bj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Yj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bj(Object(n),!0).forEach((function(t){Xj(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bj(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Xj(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class qj{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Xj(this,"lock",void 0),Xj(this,"api",void 0),Xj(this,"options",void 0),Xj(this,"repo",void 0),Xj(this,"branch",void 0),Xj(this,"apiRoot",void 0),Xj(this,"token",void 0),Xj(this,"mediaFolder",void 0),Xj(this,"_mediaDisplayURLSem",void 0),this.options=Yj({proxied:!1,API:null},t),!this.options.proxied&&(null===e.backend.repo||void 0===e.backend.repo))throw new Error('The GitLab backend needs a "repo" in the backend configuration.');this.api=this.options.API||null,this.repo=e.backend.repo||"",this.branch=e.backend.branch||"main",this.apiRoot=e.backend.api_root||"https://gitlab.com/api/v4",this.token="",this.mediaFolder=e.media_folder,this.lock=es()}isGitBackend(){return!0}async status(){var e;return{auth:{status:await(null===(e=this.api)||void 0===e?void 0:e.user().then((e=>!!e)).catch((e=>(console.warn("Failed getting GitLab user",e),!1))))||!1},api:{status:!0,statusPage:""}}}authComponent(){return Nj}restoreUser(e){return this.authenticate(e)}async authenticate(e){this.token=e.token,this.api=new Fj({token:this.token,branch:this.branch,repo:this.repo,apiRoot:this.apiRoot});const t=await this.api.user();if(!await this.api.hasWriteAccess().catch((e=>{throw e.message=$u`
Repo "${this.repo}" not found.
Please ensure the repo information is spelled correctly.
If the repo is private, make sure you're logged into a GitLab account with access.
`,e})))throw new Error("Your GitLab user account does not have access to this repo.");return Yj(Yj({},t),{},{login:t.username,token:e.token})}async logout(){this.token=null}getToken(){return Promise.resolve(this.token)}filterFile(e,t,n,r){const i=Ha()(t.path.split(e)[1]||"/","/");return Ms(t,n)&&i.split("/").length<=r}async entriesByFolder(e,t,n){let r;const i=await Ll((()=>this.api.listFiles(e,n>1).then((i=>{let{files:o,cursor:a}=i;return r=a.mergeMeta({folder:e,extension:t,depth:n}),o.filter((r=>this.filterFile(e,r,t,n)))}))),this.api.readFile.bind(this.api),this.api.readFileMetadata.bind(this.api),Ij);return i[Hs]=r,i}async listAllFiles(e,t,n){return(await this.api.listAllFiles(e,n>1)).filter((r=>this.filterFile(e,r,t,n)))}async allEntriesByFolder(e,t,n){return await Bl({listAllFiles:()=>this.listAllFiles(e,t,n),readFile:this.api.readFile.bind(this.api),readFileMetadata:this.api.readFileMetadata.bind(this.api),apiName:Ij,branch:this.branch,localForage:Zl,folder:e,extension:t,depth:n,getDefaultBranch:()=>this.api.getDefaultBranch().then((e=>({name:e.name,sha:e.commit.id}))),isShaExistsInBranch:this.api.isShaExistsInBranch.bind(this.api),getDifferences:(e,t)=>this.api.getDifferences(e,t),getFileId:e=>this.api.getFileId(e,this.branch),filterFile:r=>this.filterFile(e,r,t,n),customFetch:void 0})}entriesByFiles(e){return Ml(e,this.api.readFile.bind(this.api),this.api.readFileMetadata.bind(this.api),Ij)}getEntry(e){return this.api.readFile(e).then((t=>({file:{path:e,id:null},data:t})))}async getMedia(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.mediaFolder;return e?this.api.listAllFiles(e).then((e=>e.map((e=>{let{id:t,name:n,path:r}=e;return{id:t,name:n,path:r,displayURL:{id:t,name:n,path:r}}})))):[]}getMediaDisplayURL(e){return this._mediaDisplayURLSem=this._mediaDisplayURLSem||Ja()(10),zl(e,this.api.readFile.bind(this.api),this._mediaDisplayURLSem)}async getMediaFile(e){const t=Tl(e),n=await Il(e,null,this.api.readFile.bind(this.api)),r=jl(t,n),i=URL.createObjectURL(r);return{id:await Ks(n),displayURL:i,path:e,name:t,size:r.size,file:r,url:i}}async persistEntry(e,t){return Fl(this.lock,(()=>this.api.persistFiles(e.dataFiles,e.assets,t)),"Failed to acquire persist entry lock")}async persistMedia(e,t){const n=e.fileObj,[r]=await Promise.all([Ks(n),this.api.persistFiles([],[e],t)]),{path:i}=e,o=URL.createObjectURL(n);return{displayURL:o,path:Jh()(i,"/"),name:n.name,size:n.size,file:n,url:o,id:r}}deleteFiles(e,t){return this.api.deleteFiles(e,t)}traverseCursor(e,t){return this.api.traverseCursor(e,t).then((async t=>{var n,r,i;let{entries:o,cursor:a}=t;const[s,l,c]=[null===(n=e.meta)||void 0===n?void 0:n.folder,null===(r=e.meta)||void 0===r?void 0:r.depth,null===(i=e.meta)||void 0===i?void 0:i.extension];return s&&l&&c&&(o=o.filter((e=>this.filterFile(s,e,c,l))),a=a.mergeMeta({folder:s,extension:c,depth:l})),{entries:await Ml(o,this.api.readFile.bind(this.api),this.api.readFileMetadata.bind(this.api),Ij),cursor:a}}))}}function Zj(e,t){(0,u.useEffect)((()=>{var n;null===(n=window.netlifyIdentity)||void 0===n||n.on(e,t)}),[t,e])}const Vj=e=>{let{config:t,onLogin:n,t:r}=e;const[i,o]=(0,u.useState)(!1),[a,s]=(0,u.useState)(!1),[l,c]=(0,u.useState)({});(0,u.useEffect)((()=>{!a&&window.netlifyIdentity&&window.netlifyIdentity.currentUser()&&(o(!0),setTimeout((()=>{window.netlifyIdentity?(n(window.netlifyIdentity.currentUser()),s(!0),window.netlifyIdentity.close()):o(!1)})))}),[]),Zj("login",(0,u.useCallback)((e=>{o(!0),setTimeout((()=>{var t;n(e),s(!0),null===(t=window.netlifyIdentity)||void 0===t||t.close()}))}),[n])),Zj("logout",(0,u.useCallback)((()=>{var e;null===(e=window.netlifyIdentity)||void 0===e||e.open()}),[])),Zj("error",(0,u.useCallback)((e=>{var t,n;null!=e&&null!==(t=e.message)&&void 0!==t&&t.match(/^Failed to load settings from.+\.netlify\/identity$/)&&(null===(n=window.netlifyIdentity)||void 0===n||n.close(),c({identity:r("auth.errors.identitySettings")}))}),[r]));const d=(0,u.useCallback)((()=>{var e;const t=null===(e=window.netlifyIdentity)||void 0===e?void 0:e.currentUser();var r;t?(o(
margin-right: 18px;
`,QI=e=>{let{inProgress:t=!1,config:n,base_url:r,siteId:i,authEndpoint:o,onLogin:a,t:s}=e;const[l,c]=(0,u.useState)(null),d=(0,u.useCallback)((e=>{e.preventDefault();const t={base_url:r,site_id:"localhost"===document.location.host.split(":")[0]?"cms.netlify.com":i,auth_endpoint:o},s=new Mw(t),{auth_scope:l=""}=n.backend,u=l||"repo";s.authenticate({provider:"gitea",scope:u},((e,t)=>{e?c(e.toString()):t&&a(t)}))}),[o,r,n.backend,a,i]);return Oa(zL,{onLogin:d,loginDisabled:t,loginErrorMessage:l,logoUrl:n.logo_url,siteUrl:n.site_url,icon:Oa(EI,{type:"gitea"}),buttonContent:s("auth.loginWithGitea"),t:s})};function AI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function DI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?AI(Object(n),!0).forEach((function(t){RI(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AI(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function RI(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const{fetchWithTimeout:LI}=bs;class MI{constructor(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(RI(this,"lock",void 0),RI(this,"api",void 0),RI(this,"options",void 0),RI(this,"originRepo",void 0),RI(this,"repo",void 0),RI(this,"branch",void 0),RI(this,"apiRoot",void 0),RI(this,"mediaFolder",void 0),RI(this,"token",void 0),RI(this,"_currentUserPromise",void 0),RI(this,"_userIsOriginMaintainerPromises",void 0),RI(this,"_mediaDisplayURLSem",void 0),RI(this,"getCursorAndFiles",((e,t)=>{const n=e.length,r=Math.ceil(e.length/20),i=[];return t>1&&(i.push("prev"),i.push("first")),t<r&&(i.push("next"),i.push("last")),{cursor:Vs.create({actions:i,meta:{page:t,count:n,pageSize:20,pageCount:r},data:{files:e}}),files:e.slice(20*(t-1),20*t)}})),this.options=DI({proxied:!1,API:null},n),!this.options.proxied&&(null===e.backend.repo||void 0===e.backend.repo))throw new Error('The Gitea backend needs a "repo" in the backend configuration.');this.api=this.options.API||null,this.repo=this.originRepo=e.backend.repo||"",this.branch=(null===(t=e.backend.branch)||void 0===t?void 0:t.trim())||"main",this.apiRoot=e.backend.api_root||"https://gitea.com/api/v1",this.token="",this.mediaFolder=e.media_folder,this.lock=es()}isGitBackend(){return!0}async status(){var e;return{auth:{status:await(null===(e=this.api)||void 0===e?void 0:e.user().then((e=>!!e)).catch((e=>(console.warn("Failed getting Gitea user",e),!1))))||!1},api:{status:!0,statusPage:""}}}authComponent(){return QI}restoreUser(e){return this.authenticate(e)}async currentUser(e){let{token:t}=e;return this._currentUserPromise||(this._currentUserPromise=LI(`${this.apiRoot}/user`,{headers:{Authorization:`token ${t}`}}).then((e=>e.json()))),this._currentUserPromise}async userIsOriginMaintainer(e){let{username:t,token:n}=e;const r=t||(await this.currentUser({token:n})).login;return this._userIsOriginMaintainerPromises=this._userIsOriginMaintainerPromises||{},this._userIsOriginMaintainerPromises[r]||(this._userIsOriginMaintainerPromises[r]=LI(`${this.apiRoot}/repos/${this.originRepo}/collaborators/${r}/permission`,{headers:{Authorization:`token ${n}`}}).then((e=>e.json())).then((e=>{let{permission:t}=e;return"admin"===t||"write"===t}))),this._userIsOriginMaintainerPromises[r]}async authenticate(e){this.token=e.token;const t=CI;this.api=new t({token:this.token,branch:this.branch,repo:this.repo,originRepo:this.originRepo,apiRoot:this.apiRoot});const n=await this.api.user();if(!await this.
Repo "${this.repo}" not found.
Please ensure the repo information is spelled correctly.
If the repo is private, make sure you're logged into a Gitea account with access.
If your repo is under an organization, ensure the organization has granted access to Static
CMS.
`,e})))throw new Error("Your Gitea user account does not have access to this repo.");return DI(DI({},n),{},{token:e.token})}logout(){if(this.token=null,this.api&&this.api.reset&&"function"==typeof this.api.reset)return this.api.reset()}getToken(){return Promise.resolve(this.token)}async entriesByFolder(e,t,n){const r=this.api.originRepoURL;let i;const o=await Ll((()=>this.api.listFiles(e,{repoURL:r,depth:n}).then((e=>{const n=e.filter((e=>Ms(e,t))),r=this.getCursorAndFiles(n,1);return i=r.cursor,r.files}))),((e,t)=>this.api.readFile(e,t,{repoURL:r})),this.api.readFileMetadata.bind(this.api),$I);return o[Hs]=i,o}async allEntriesByFolder(e,t,n){const r=this.api.originRepoURL,i=await Ll((()=>this.api.listFiles(e,{repoURL:r,depth:n}).then((e=>e.filter((e=>Ms(e,t)))))),((e,t)=>this.api.readFile(e,t,{repoURL:r})),this.api.readFileMetadata.bind(this.api),$I);return i}entriesByFiles(e){const t=this.api.repoURL;return Ml(e,((e,n)=>this.api.readFile(e,n,{repoURL:t}).catch((()=>""))),this.api.readFileMetadata.bind(this.api),$I)}getEntry(e){const t=this.api.originRepoURL;return this.api.readFile(e,null,{repoURL:t}).then((t=>({file:{path:e,id:null},data:t}))).catch((()=>({file:{path:e,id:null},data:""})))}async getMedia(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.mediaFolder;return e?this.api.listFiles(e).then((e=>e.map((e=>{let{id:t,name:n,size:r,path:i}=e;return{id:t,name:n,size:r,displayURL:{id:t,path:i},path:i}})))):[]}async getMediaFile(e){const t=await Il(e,null,this.api.readFile.bind(this.api)),n=Tl(e),r=jl(n,t),i=URL.createObjectURL(r);return{id:await Ks(t),displayURL:i,path:e,name:n,size:r.size,file:r,url:i}}getMediaDisplayURL(e){return this._mediaDisplayURLSem=this._mediaDisplayURLSem||Ja()(10),zl(e,this.api.readFile.bind(this.api),this._mediaDisplayURLSem)}persistEntry(e,t){return Fl(this.lock,(()=>this.api.persistFiles(e.dataFiles,e.assets,t)),"Failed to acquire persist entry lock")}async persistMedia(e,t){try{await this.api.persistFiles([],[e],t);const{sha:n,path:r,fileObj:i}=e,o=URL.createObjectURL(i);return{id:n,name:i.name,size:i.size,displayURL:o,path:Jh()(r,"/")}}catch(e){throw console.error(e),e}}deleteFiles(e,t){return this.api.deleteFiles(e,t)}async traverseCursor(e,t){var n,r;const i=e.meta,o=null!==(n=null===(r=e.data)||void 0===r?void 0:r.files)&&void 0!==n?n:[];let a;switch(t){case"first":default:a=this.getCursorAndFiles(o,1);break;case"last":var s;a=this.getCursorAndFiles(o,null!==(s=null==i?void 0:i.pageCount)&&void 0!==s?s:1);break;case"next":var l;a=this.getCursorAndFiles(o,null!==(l=(null==i?void 0:i.page)+1)&&void 0!==l?l:1);break;case"prev":var c;a=this.getCursorAndFiles(o,null!==(c=(null==i?void 0:i.page)-1)&&void 0!==c?c:1)}const u=await Ml(a.files,((e,t)=>this.api.readFile(e,t,{repoURL:this.api.originRepoURL}).catch((()=>""))),this.api.readFileMetadata.bind(this.api),$I);return{entries:u,cursor:a.cursor}}}const jI=(0,zm.ZP)("section")`
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
`,II=(0,zm.ZP)(DL)`
color: #c4c6d2;
`,zI=e=>{let{inProgress:t=!1,config:n,onLogin:r,t:i}=e;const o=(0,u.useCallback)((e=>{e.preventDefault(),r({token:"fake_token"})}),[r]);return Oa(jI,null,Oa(II,{width:300,height:150,type:"static-cms"}),Oa(AO,{variant:"contained",disabled:t,onClick:o},i(t?"auth.loggingIn":"auth.login")),n.site_url&&Oa(gL,{href:n.site_url,t:i}))};function FI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function WI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?FI(Object(n),!0).forEach((function(t){UI(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FI(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function UI(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}async function NI(e){const t=await e.toBase64();return{path:e.path,content:t,encoding:"base64"}}function BI(e){let{id:t,content:n,encoding:r,path:i,name:o}=e,a=new Uint8Array(0);if("base64"!==r)console.error(`Unsupported encoding '${r}' for file '${i}'`);else{const e=atob(n);a=new Uint8Array(e.length);for(let t=0;t<e.length;t++)a[t]=e.charCodeAt(t)}const s=jl(o,new Blob([a])),l=URL.createObjectURL(s);return{id:t,name:o,path:i,file:s,size:s.size,url:l,displayURL:l}}class YI{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(UI(this,"proxyUrl",void 0),UI(this,"mediaFolder",void 0),UI(this,"publicFolder",void 0),UI(this,"options",void 0),UI(this,"branch",void 0),!e.backend.proxy_url)throw new Error('The Proxy backend needs a "proxy_url" in the backend configuration.');this.branch=e.backend.branch||"main",this.proxyUrl=e.backend.proxy_url,this.mediaFolder=e.media_folder,this.publicFolder=e.public_folder,this.options=t}isGitBackend(){return!1}status(){return Promise.resolve({auth:{status:!0},api:{status:!0,statusPage:""}})}authComponent(){return zI}restoreUser(){return this.authenticate()}authenticate(){return Promise.resolve()}logout(){return null}getToken(){return Promise.resolve("")}async request(e){const t=await bs.fetchWithTimeout(this.proxyUrl,{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(WI({branch:this.branch},e))}),n=await t.json();if(t.ok)return n;throw new ws(n.error,t.status,"Proxy")}entriesByFolder(e,t,n){return this.request({action:"entriesByFolder",params:{branch:this.branch,folder:e,extension:t,depth:n}})}entriesByFiles(e){return this.request({action:"entriesByFiles",params:{branch:this.branch,files:e}})}getEntry(e){return this.request({action:"getEntry",params:{branch:this.branch,path:e}})}async persistEntry(e,t){const n=await Promise.all(e.assets.map(NI));return this.request({action:"persistEntry",params:{branch:this.branch,dataFiles:e.dataFiles,assets:n,options:WI({},t)}})}async getMedia(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.mediaFolder,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.publicFolder;return(await this.request({action:"getMedia",params:{branch:this.branch,mediaFolder:e,publicFolder:t}})).map((e=>{let{url:t,path:n}=e;const r=t;return{id:r,name:Tl(n),displayURL:{id:r,path:t},path:n}}))}async getMediaFile(e){return BI(await this.request({action:"getMediaFile",params:{branch:this.branch,path:e}}))}getMediaDisplayURL(e){return"string"==typeof e?Promise.resolve(e):Promise.resolve(e.path)}async persistMedia(e,t){const n=await NI(e);return BI(await this.request({action:"persistMedia",params:{branch:this.branch,asset:n,options:{commitMessage:t.commitMessage}}}))}deleteFiles(e
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
`,GI=(0,zm.ZP)(DL)`
color: #c4c6d2;
`,KI=e=>{let{inProgress:t=!1,config:n,onLogin:r,t:i}=e;(0,u.useEffect)((()=>{!1===n.backend.login&&r({token:"fake_token"})}),[n.backend.login,r]);const o=(0,u.useCallback)((e=>{e.preventDefault(),r({token:"fake_token"})}),[r]);return Oa(HI,null,Oa(GI,{width:300,height:150,type:"static-cms"}),Oa(AO,{disabled:t,onClick:o,variant:"contained",sx:{marginBottom:"32px"}},i(t?"auth.loggingIn":"auth.login")),n.site_url&&Oa(gL,{href:n.site_url,t:i}))};function JI(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ez(e,t){const n=e.split("/");let r=t;for(;r&&n.length;)r=r[n.shift()];return r||{}}function tz(e,t,n){const r=e.split("/");let i=n;for(;r.length>1;){const e=r.shift();i[e]=i[e]||{},i=i[e]}i[r.shift()]={content:t,path:e}}window.repoFiles=window.repoFiles||{};const nz=10;function rz(e,t,n,r,i){const o=n.length,a=Math.floor(o/nz);return Vs.create({actions:[...r<a?["next","last"]:[],...r>0?["prev","first"]:[]],meta:{index:r,count:o,pageSize:nz,pageCount:a},data:{folder:e,extension:t,index:r,pageCount:a,depth:i}})}function iz(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:t;return r<=0||Object.keys(e[t]||{}).forEach((a=>{if(!(0,Ea.extname)(a))return iz(e[t],a,n,r-1,i,`${o}/${a}`);{const r=e[t][a];n&&!a.endsWith(`.${n}`)||i.unshift({content:r.content,path:`${o}/${a}`})}})),i}class oz{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};JI(this,"mediaFolder",void 0),JI(this,"options",void 0),this.options=t,this.mediaFolder=e.media_folder}isGitBackend(){return!1}status(){return Promise.resolve({auth:{status:!0},api:{status:!0,statusPage:""}})}authComponent(){return KI}restoreUser(){return this.authenticate()}authenticate(){return Promise.resolve()}logout(){return null}getToken(){return Promise.resolve("")}traverseCursor(e,t){const{folder:n,extension:r,index:i,pageCount:o,depth:a}=e.data,s="next"===t?i+1:"prev"===t?i-1:"first"===t?0:"last"===t?o:0,l=iz(window.repoFiles,n,r,a).map((e=>({data:e.content,file:{path:e.path,id:e.path}}))),c=l.slice(s*nz,s*nz+nz),u=rz(n,r,l,s,a);return Promise.resolve({entries:c,cursor:u})}entriesByFolder(e,t,n){const r=(e?iz(window.repoFiles,e,t,n):[]).map((e=>({data:e.content,file:{path:e.path,id:e.path}}))),i=rz(e,t,r,0,n),o=qI()(r,nz);return o[Hs]=i,Promise.resolve(o)}entriesByFiles(e){return Promise.all(e.map((e=>({file:e,data:ez(e.path,window.repoFiles).content}))))}getEntry(e){return Promise.resolve({file:{path:e,id:null},data:ez(e,window.repoFiles).content})}async persistEntry(e){return e.dataFiles.forEach((e=>{const{path:t,raw:n}=e;tz(t,n,window.repoFiles)})),e.assets.forEach((e=>{tz(e.path,e,window.repoFiles)})),Promise.resolve()}async getMedia(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.mediaFolder;return e?iz(window.repoFiles,e.split("/")[0],"",100).filter((t=>t.path.startsWith(e))).map((e=>this.normalizeAsset(e.content))):[]}async getMediaFile(e){var t;const n=ez(e,window.repoFiles).content,r=null!==(t=null==n?void 0:n.toString())&&void 0!==t?t:"",i=Tl(e),o=await fetch(r).then((e=>e.blob())),a=new File([o],i);return{id:r,displayURL:r,path:e,name:i,size:a.size,file:a,url:r}}normalizeAsset(e){const t=e.fileObj,{name:n,size:r}=t,i=_t()(window.URL.createObjectURL,t),o=Tt()(i)?"":i;return{id:Ih(),name:n,size:r,path:e.path,url:o,displayURL:o,fileObj:t}}persistMedia(e){const t=this.normalizeAsset(e);return tz(e.path,e,window.repoFiles),Promise.resolve(t)}deleteFiles(e){return e.forEach((e=>{!function(e,t){VI()(t,e.split("/"))}(e,window.repoFiles)})),Promise.resolve()}async allEntriesByFolder(e,t,n){const r=(e?iz(window.repoFiles,e,t,n):[]).map((e=>({data:e.content,file:{path:e.path,id:e.path}})));return P
position: relative;
align-items: center;
background-color: ${Lb.textFieldBorder};
display: flex;
justify-content: space-between;
padding: 2px 8px;
`,uX=(0,zm.ZP)("div",Jl)((e=>{let{$hasError:t}=e;return`\n display: flex;\n align-items: center;\n color: rgba(0, 0, 0, 0.6);\n font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;\n font-weight: 400;\n font-size: 1rem;\n line-height: 1.4375em;\n letter-spacing: 0.00938em;\n ${t?`color: ${Ab}`:""}\n `})),dX=e=>{let{allowAdd:t,types:n,onAdd:r,onAddType:i,onCollapseToggle:o,collapsed:a,heading:s,label:l,hasError:c=!1,t:d,testId:f}=e;const[p,h]=(0,u.useState)(null),m=Boolean(p),g=(0,u.useCallback)((e=>{h(e.currentTarget)}),[]),O=(0,u.useCallback)((()=>{h(null)}),[]),y=(0,u.useCallback)((e=>()=>{O(),null==i||i(e.name)}),[O,i]),v=(0,u.useCallback)((e=>Oa("div",null,Oa(AO,{id:"types-button","aria-controls":m?"types-menu":void 0,"aria-haspopup":"true","aria-expanded":m?"true":void 0,onClick:g,variant:"outlined",size:"small",endIcon:Oa(sX.Z,{fontSize:"small"})},d("editor.editorWidgets.list.addType",{item:l})),Oa(mw,{id:"types-menu",anchorEl:p,open:m,onClose:O,MenuListProps:{"aria-labelledby":"types-button"}},e.map(((e,t)=>{var n;return e?Oa(Pw,{key:t,onClick:y(e)},null!==(n=e.label)&&void 0!==n?n:e.name):null}))))),[m,g,d,l,p,O,y]),b=(0,u.useCallback)((()=>Oa(AO,{onClick:r,endIcon:Oa(sX.Z,{fontSize:"small"}),size:"small",variant:"outlined","data-testid":"add-button"},d("editor.editorWidgets.list.add",{item:l}))),[d,l,r]),_=(0,u.useCallback)((()=>t?n&&n.length>0?v(n):b():null),[t,n,v,b]);return Oa(cX,{"data-testid":f},Oa(uX,{$hasError:c},Oa(wk,{onClick:o,"data-testid":"expand-button"},Oa(lX.Z,{sx:{transform:`rotateZ(${a?"-90deg":"0deg"})`,transition:`transform ${Ib};`,color:c?Ab:void 0}})),s),_())},fX=(0,zm.ZP)("div",Jl)((e=>{let{$active:t,$hasError:n,$hasLabel:r}=e;return`\n position: absolute;\n bottom: 0;\n right: 0;\n top: ${r?22:0}px;\n left: 0;\n margin: 0;\n padding: 0 8px;\n pointer-events: none;\n border-radius: 4px;\n border-style: solid;\n border-width: 1px;\n overflow: hidden;\n min-width: 0%;\n border-color: rgba(0, 0, 0, 0.23);\n ${t?"\n border-color: #1976d2;\n border-width: 2px;\n ":""}\n ${n?"\n border-color: #d32f2f;\n border-width: 2px;\n ":""}\n `})),pX=e=>{let{active:t=!1,hasError:n=!1,hasLabel:r=!1}=e;return Oa(fX,{$active:t,$hasError:n,$hasLabel:r})},hX=[{label:"AGS Script",identifiers:["ags","asc","ash"],codemirror_mode:"c",codemirror_mime_type:"text/x-c++src"},{label:"APL",identifiers:["apl","dyalog"],codemirror_mode:"apl",codemirror_mime_type:"text/apl"},{label:"ASP",identifiers:["asp","aspx","asax","ascx","ashx","asmx","axd"],codemirror_mode:"html",codemirror_mime_type:"application/x-aspx"},{label:"Alpine Abuild",identifiers:["abuild","apkbuild"],codemirror_mode:"shell",codemirror_mime_type:"text/x-sh"},{label:"AngelScript",identifiers:["angelscript","as"],codemirror_mode:"c",codemirror_mime_type:"text/x-c++src"},{label:"Ant Build System",identifiers:[],codemirror_mode:"xml",codemirror_mime_type:"application/xml"},{label:"Apex",identifiers:["apex","cls"],codemirror_mode:"c",codemirror_mime_type:"text/x-java"},{label:"Asymptote",identifiers:["asymptote","asy"],codemirror_mode:"c",codemirror_mime_type:"text/x-kotlin"},{label:"BibTeX",identifiers:["bibtex","bib"],codemirror_mode:"stex",codemirror_mime_type:"text/x-stex"},{label:"Brainfuck",identifiers:["brainfuck","b","bf"],codemirror_mode:"brainfuck",codemirror_mime_type:"text/x-brainfuck"},{label:"C",identifiers:["c","cats","h","idc"],codemirror_mode:"c",codemirror_mime_type:"text/x-csrc"},{label:"C#",identifiers:["csharp","cs","cake","csx"],codemirror_mode:"csharp",codemirror_mime_type:"text/x-csharp"},{label:"C++",identifiers:["cpp","cc","cp","cxx","h","hh","hpp","hxx","inc","inl","ino","ipp","re","tcc","tpp"],codemirror_mode:"cpp",codemirror_mime_type:"text/x-c++src"},{label:"C2hs Haskell",identifiers:["chs"],codemirror_mode:"haskell",codemirror_mime_type:"text/x-haskell"},{label:"CMake",identifiers:["cmake"],codemirror_mode:"cmake",codemirror_mime_type:"text/x-cmake"},{label:"COBOL",identifiers:["cobol","cob","cbl","ccp"
position: absolute;
z-index: ${100};
right: 8px;
top: 8px;
opacity: 0.8;
padding: 2px 4px;
line-height: 1;
height: auto;
color: #000;
`,OX=e=>{let{showClose:t=!1,onClick:n}=e;return Oa(gX,{onClick:n},Oa(t?oD.Z:mX.Z,null))};var yX=__nested_webpack_require_2836554__(84111);const vX=(0,zm.ZP)("div")`
position: absolute;
top: 1px;
bottom: 1px;
right: 1px;
width: 200px;
z-index: ${10};
background-color: #fff;
overflow: hidden;
padding: 12px;
border-radius: 0 3px 3px 0;
${"\n && {\n box-shadow: 0 2px 4px 0 rgba(19, 39, 48, 0.12);\n }\n "};
display: flex;
flex-direction: column;
gap: 16px;
`,bX=(0,zm.ZP)("h3")`
font-size: 14px;
margin-top: 14px;
margin-bottom: 0;
&:first-of-type {
margin-top: 4px;
}
`,_X=e=>{let{value:t,label:n,options:r,onChange:i,uniqueId:o,type:a}=e;return Oa(JC,{fullWidth:!0,size:"small"},Oa(ZC,{id:`${o}-select-${a}-label`},n),Oa(ME,{labelId:`${o}-select-${a}-label`,id:`${o}-select-${a}`,value:t.value,label:n,onChange:e=>{i(e.target.value)}},r.map((e=>{let{label:t,value:n}=e;return n?Oa(Pw,{key:`${o}-select-${a}-option-${n}`,value:n},t):null}))))},wX=e=>{let{hideSettings:t,uniqueId:n,languages:r,language:i,onChangeLanguage:o}=e;return Oa(vX,{onKeyDown:e=>(0,yX.ZP)("esc",e)&&t()},Oa(OX,{onClick:t,showClose:!0}),Oa(d().Fragment,null,Oa(bX,null,"Field Settings"),Oa(_X,{type:"language",label:"Language",uniqueId:n,value:i,options:r,onChange:o})))};function kX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kX(Object(n),!0).forEach((function(t){SX(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kX(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function SX(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const PX=(0,zm.ZP)("div")`
display: flex;
flex-direction: column;
position: relative;
width: 100%;
`,TX=(0,zm.ZP)("div",Jl)((e=>{let{$collapsed:t}=e;return`\n display: block;\n width: 100%;\n ${t?"\n display: none;\n ":""}\n `}));function $X(e){return"string"==typeof e?{value:e,label:e}:{value:e.name,label:e.label||e.name}}const CX=e=>{var t,n;let{field:r,onChange:i,hasErrors:o,value:a,t:s}=e;const l=(0,u.useMemo)((()=>{var e;const t=null!==(e=r.keys)&&void 0!==e?e:{};return xX(xX({},{code:"code",lang:"lang"}),t)}),[r]),c=(0,u.useMemo)((()=>Boolean(!r.output_code_only)),[r.output_code_only]),[d,f]=(0,u.useState)(null!=a?a:""),[p,h]=(0,u.useState)(null),[m,g]=(0,u.useState)(!1),[O,y]=(0,u.useState)(!1),v=(0,u.useCallback)((()=>{y(!0)}),[]),b=(0,u.useCallback)((()=>{y(!1)}),[]),_=(0,u.useCallback)((()=>{g(!m)}),[m]),w=(0,u.useCallback)((e=>{f(null!=e?e:""),i(null!=e?e:"")}),[i]),k=(0,u.useCallback)((e=>{var t;c&&w({lang:null!==(t=null==p?void 0:p.label)&&void 0!==t?t:"",code:e}),w(e)}),[w,null==p?void 0:p.label,c]),x=(0,u.useMemo)((()=>p?IU(p.codemirror_mode):null),[p]),S=(0,u.useMemo)((()=>x?[x]:[]),[x]),P=(0,u.useMemo)((()=>"string"==typeof d?d:d[l.code]),[d,l.code]),[T,$]=(0,u.useState)(!1),C=(0,u.useCallback)((()=>{$(!0)}),[]),E=(0,u.useCallback)((()=>{$(!1)}),[]),Q=$Q(),A=(0,u.useMemo)((()=>Boolean(r.allow_language_selection)),[r.allow_language_selection]),D=hX.map((e=>$X(e.label))),R=(0,u.useCallback)((e=>{const t=hX.find((t=>t.identifiers.includes(e)));t&&h(t)}),[]);return(0,u.useEffect)((()=>{let e;e="string"!=typeof d?d[l.lang]:d,ko(e)||R(e)}),[r.default_language,R,d,l.lang,c]),Oa(PX,null,A?T?Oa(wX,{hideSettings:E,uniqueId:Q,languages:D,language:$X(null!==(t=null==p?void 0:p.label)&&void 0!==t?t:""),allowLanguageSelection:A,onChangeLanguage:R}):Oa(OX,{onClick:C}):null,Oa(dX,{key:"file-control-top-bar",collapsed:m,onCollapseToggle:_,heading:null!==(n=r.label)&&void 0!==n?n:r.name,hasError:o,t:s}),Oa(TX,{$collapsed:m},Oa(aX,{value:P,height:"auto",minHeight:"120px",width:"100%",editable:!0,onFocus:v,onBlur:b,onChange:k,extensions:S})),Oa(pX,{active:O,hasError:o}))},EX=e=>{let{children:t}=e;return Oa("div",null,t)},QX=e=>{let{value:t,field:n}=e;return Oa(EX,null,Oa("pre",null,Oa("code",null,function(e,t){return ta()(e)?e:e&&null!==(n=e[null!==(r=null===(i=t.keys)||void 0===i?void 0:i.code)&&void 0!==r?r:"code"])&&void 0!==n?n:"";var n,r,i}(t,n))))},AX={properties:{default_language:{type:"string"},allow_language_selection:{type:"boolean"},output_code_only:{type:"boolean"},keys:{type:"object",properties:{code:{type:"string"},lang:{type:"string"}}},default:{oneOf:[{type:"string"},{type:"object"}]}}},DX=()=>({name:"code",controlComponent:CX,previewComponent:QX,options:{schema:AX,getDefaultValue:(e,t)=>{var n,r,i,o,a,s,l;if(t.output_code_only)return String(e);const c=null!==(n=null===(r=t.keys)||void 0===r?void 0:r.lang)&&void 0!==n?n:"lang",u=null!==(i=null===(o=t.keys)||void 0===o?void 0:o.code)&&void 0!==i?i:"code";var d;return"string"==typeof e?{[c]:null!==(d=t.default_language)&&void 0!==d?d:"",[u]:e}:{[c]:null!==(a=null!==(s=t.default_language)&&void 0!==s?s:null==e?void 0:e[c])&&void 0!==a?a:"",[u]:null!==(l=null==e?void 0:e[u])&&void 0!==l?l:""}}}});var RX=__nested_webpack_require_2836554__(37980),LX=function(e,t,n,r,i){var o,a,s=i.clientWidth,l=i.clientHeight,c="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,u="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,d=c-(i.getBoundingClientRect().left+window.pageXOffset),f=u-(i.getBoundingClientRect().top+window.pageYOffset);if("vertical"===n){if(o=f<0?0:f>l?1:Math.round(100*f/l)/100,t.a!==o)return{h:t.h,s:t.s,l:t.l,a:o,source:"rgb"}}else if(r!==(a=d<0?0:d>s?1:Math.round(100*d/s)/100))return{h:t.h,s:t.s,l:t.l,a,source:"rgb"};return null},MX={},jX=function(e,t,n,r){var i=e+"-"+t+"-"+n+(r?"-server":"");if(MX[i])return MX[i];var o=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var i=r?new r:document.createElement("canvas");i.width=2*n,i.height=2*n;var o=i.getContext("2d");return o?(o.fillStyle=e,o.fillRect(0,0,i.width,i.height),o.fillStyle=t,o.fillRect(0,0,n,n),o.translate(n,n),o.fillRect(0,0,n,n),i.toDataURL()):null}(e
display: flex;
flex-direction: column;
position: relative;
width: 100%;
`,YK=(0,zm.ZP)("div",Jl)((e=>{let{$collapsed:t}=e;return`\n display: flex;\n ${t?"\n display: none;\n ":"\n padding: 16px;\n "}\n `})),XK=(0,zm.ZP)("div")`
position: absolute;
z-index: ${1};
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==');
height: 38px;
width: 48px;
margin-top: 10px;
margin-left: 10px;
border-radius: 5px;
`,qK=(0,zm.ZP)("div",Jl)((e=>{let{$background:t,$color:n}=e;return`\n position: absolute;\n z-index: 2;\n background: ${t};\n cursor: pointer;\n height: 38px;\n width: 48px;\n margin-top: 10px;\n margin-left: 10px;\n border-radius: 5px;\n border: 2px solid rgb(223, 223, 227);\n text-align: center;\n font-size: 27px;\n line-height: 1;\n padding-top: 4px;\n user-select: none;\n color: ${n};\n `})),ZK=(0,zm.ZP)("div")`
position: absolute;
z-index: ${1e3};
margin-top: 48px;
margin-left: 12px;
`,VK=(0,zm.ZP)("div")`
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
`,HK=e=>{var t,n,r;let{field:i,onChange:o,value:a,hasErrors:s,t:l}=e;const[c,d]=(0,u.useState)(!1),f=(0,u.useCallback)((()=>{d(!c)}),[c]),[p,h]=(0,u.useState)(!1),[m,g]=(0,u.useState)(null!=a?a:""),O=(0,u.useCallback)((()=>{h(!p)}),[p]),y=(0,u.useCallback)((e=>{e.stopPropagation(),g(""),o("")}),[o]),v=(0,u.useCallback)((()=>{h(!1)}),[]),b=(0,u.useCallback)((e=>{var t,n;const r=(null!==(t=null===(n=e.rgb)||void 0===n?void 0:n.a)&&void 0!==t?t:1)<1?`rgba(${e.rgb.r}, ${e.rgb.g}, ${e.rgb.b}, ${e.rgb.a})`:e.hex;g(r),o(r)}),[o]),_=(0,u.useCallback)((e=>{g(e.target.value),o(e.target.value)}),[o]),w=null!==(t=i.allow_input)&&void 0!==t&&t,k=!w&&m;return Oa(BK,null,Oa(dX,{key:"file-control-top-bar",collapsed:c,onCollapseToggle:f,heading:null!==(n=i.label)&&void 0!==n?n:i.name,hasError:s,t:l}),Oa(YK,{$collapsed:c},Oa(XK,null),Oa(qK,{key:"color-swatch",$background:NK()(m)?m:"#fff",$color:NK()(m)?"rgba(255, 255, 255, 0)":"rgb(223, 223, 227)",onClick:O},"?"),p&&Oa(ZK,{key:"color-swatch-wrapper"},Oa(VK,{key:"click-outside",onClick:v}),Oa(sK,{key:"color-picker",color:m,onChange:b,disableAlpha:!(null!==(r=i.enable_alpha)&&void 0!==r&&r)})),Oa(UE,{key:"color-picker-input",value:m,onChange:_,sx:{color:w?void 0:"#bbb",".MuiInputBase-input":{paddingLeft:"75px"}},onClick:w?void 0:O,disabled:!w,fullWidth:!0,InputProps:{endAdornment:k?Oa(U$,{position:"start"},Oa(wk,{onClick:y,"aria-label":"clear"},Oa(oD.Z,null))):void 0}})),Oa(pX,{hasError:s}))},GK=e=>{let{value:t}=e;return Oa(EX,null,t)},KK={properties:{default:{type:"string"}}},JK=()=>({name:"color",controlComponent:HK,previewComponent:GK,options:{schema:KK}});function eJ(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function tJ(e){return tJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tJ(e)}function nJ(e){return nJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nJ(e)}function rJ(e){eJ(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===nJ(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function iJ(e){if(eJ(1,arguments),!function(e){return eJ(1,arguments),e instanceof Date||"object"===tJ(e)&&"[object Date]"===Object.prototype.toString.call(e)}(e)&&"number"!=typeof e)return!1;var t=rJ(e);return!isNaN(Number(t))}function oJ(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function aJ(e,t){eJ(2,arguments);var n=rJ(e).getTime(),r=oJ(t);return new Date(n+r)}function sJ(e,t){return eJ(2,arguments),aJ(e,-oJ(t))}var lJ=864e5;function cJ(e){eJ(1,arguments);var t=rJ(e),n=t.getUTCDay(),r=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-r),t.setUTCHours(0,0,0,0),t}function uJ(e){eJ(1,arguments);var t=rJ(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=cJ(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var a=cJ(o);return t.getTime()>=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}var dJ=6048e5;function fJ(e){eJ(1,arguments);var t=rJ(e),n=cJ(t).getTime()-function(e){eJ(1,arguments);var t=uJ(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),cJ(n)}(t).getTime();return Math.round(n/dJ)+1}var pJ={};function hJ(){return pJ}function mJ(e,t){var n,r,i,o,a,s,l,c;eJ(1,arguments);var u=hJ(),d=oJ(null!==(n=null!==(r=null!==(i=null!==(o=null==t?void 0:t.weekStartsOn)&&void 0!==o?o
width: fit-content;
`,Iee=e=>{let{t,handleChange:n,disabled:r}=e;const i=(0,u.useCallback)((e=>{e.stopPropagation(),n(new Date)}),[n]);return Oa(jee,{key:"now-button-wrapper"},Oa(AO,{key:"now-button",onClick:i,disabled:r,startIcon:Oa(KJ.Z,{key:"today-icon"}),variant:"outlined"},t("editor.editorWidgets.datetime.now")))},zee=e=>{let{field:t,label:n,value:r,t:i,isDisabled:o,onChange:a,hasErrors:s}=e;const{format:l,dateFormat:c,timeFormat:d}=(0,u.useMemo)((()=>{var e,n;return{format:t.format,dateFormat:null===(e=t.date_format)||void 0===e||e,timeFormat:null===(n=t.time_format)||void 0===n||n}}),[t.date_format,t.format,t.time_format]),f=(0,u.useMemo)((()=>6e4*(new Date).getTimezoneOffset()),[]),p=(0,u.useMemo)((()=>{if("string"==typeof c||"string"==typeof d){const e=[];if("string"==typeof c&&xo(c)&&e.push(c),"string"==typeof d&&xo(d)&&e.push(d),e.length>0)return e.join(" ")}return!1===d?"yyyy-MM-dd":!1===c?"HH:mm:ss.SSSXXX":"yyyy-MM-dd'T'HH:mm:ss.SSSXXX"}),[c,d]),h=(0,u.useMemo)((()=>{const e=t.picker_utc?Mee(new Date,f):new Date;return void 0===t.default?GJ(e,l||p):t.default}),[t.default,t.picker_utc,l,p,f]),[m,g]=(0,u.useState)(r),O=(0,u.useMemo)((()=>{let e=m;return e||(e=h),l?F5(e,l,new Date):B5(e)}),[h,l,m]),y=(0,u.useMemo)((()=>{var e;const t=new Date(O);return null!==(e=new Date(t.getTime()+f))&&void 0!==e?e:h}),[O,h,f]),v=(0,u.useCallback)((e=>{if(null===e)return g(h),void a(h);const n=t.picker_utc?Mee(e,f):e;let r;r=l?GJ(n,l):J5(n),g(r),a(r)}),[h,t.picker_utc,l,a,f]),b=(0,u.useMemo)((()=>{const e=t.picker_utc?y:O;return c&&!d?Oa(H9,{key:"mobile-date-picker",inputFormat:p,label:n,value:e,onChange:v,disabled:o,renderInput:e=>Oa(UE,Lee({key:"mobile-date-input"},e,{error:s,fullWidth:!0,InputProps:{endAdornment:Oa(Iee,{key:"mobile-date-now",t:i,handleChange:e=>v(e),disabled:o})}}))}):!c&&d?Oa(Ree,{key:"time-picker",label:n,inputFormat:p,value:e,onChange:v,disabled:o,renderInput:e=>Oa(UE,Lee({key:"time-input"},e,{error:s,fullWidth:!0,InputProps:{endAdornment:Oa(Iee,{key:"time-now",t:i,handleChange:e=>v(e),disabled:o})}}))}):Oa(aee,{key:"mobile-date-time-picker",inputFormat:p,label:n,value:e,onChange:v,disabled:o,renderInput:e=>Oa(UE,Lee({key:"mobile-date-time-input"},e,{error:s,fullWidth:!0,InputProps:{endAdornment:Oa(Iee,{key:"mobile-date-time-now",t:i,handleChange:e=>v(e),disabled:o})}}))})}),[c,O,t.picker_utc,v,s,p,o,n,i,d,y]);return Oa(u4,{key:"localization-provider",dateAdapter:o4},b)},Fee=e=>{let{value:t}=e;return Oa(EX,null,t?t.toString():null)},Wee={properties:{format:{type:"string"},date_format:{oneOf:[{type:"string"},{type:"boolean"}]},time_format:{oneOf:[{type:"string"},{type:"boolean"}]},picker_utc:{type:"boolean"},default:{type:"string"}}},Uee=()=>({name:"datetime",controlComponent:zee,previewComponent:Fee,options:{schema:Wee,getDefaultValue:(e,t)=>{var n,r;if(Oo(e))return e;const i=6e4*(new Date).getTimezoneOffset(),o=t.format,a=null===(n=t.date_format)||void 0===n||n,s=null===(r=t.time_format)||void 0===r||r;let l="yyyy-MM-dd'T'HH:mm:ss.SSSXXX";if("string"==typeof a||"string"==typeof s){const e=[];"string"==typeof a&&xo(a)&&e.push(a),"string"==typeof s&&xo(s)&&e.push(s),e.length>0&&(l=e.join(" "))}return GJ(t.picker_utc?Mee(new Date,i):new Date,o||l)}}}),Nee=e=>{let{value:t,collection:n,field:r,entry:i}=e;const o=ek(t,n,r,i);return Oa("a",{href:o,rel:"noopener noreferrer",target:"_blank"},t)},Bee=e=>{let{value:t,collection:n,field:r,entry:i}=e;return t?Array.isArray(t)?Oa("div",null,t.map((e=>Oa(Nee,{key:e,value:e,collection:n,field:r,entry:i})))):Oa(Nee,{key:t,value:t,collection:n,field:r,entry:i}):null},Yee=e=>Oa(EX,null,e.value?Oa(Bee,e):null),Xee={properties:{allow_multiple:{type:"boolean"},default:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]}}};var qee=__nested_webpack_require_2836554__(74856);const Zee=50,Vee=(0,zm.ZP)("div")`
display: flex;
flex-direction: column;
position: relative;
width: 100%;
`,Hee=(0,zm.ZP)("div",Jl)((e=>{let{$collapsed:t}=e;return`\n display: flex;\n flex-direction: column;\n gap: 16px;\n ${t?"\n display: none;\n ":"\n padding: 16px;\n "}\n `})),Gee=(0,zm.ZP)("div")`
display: flex;
flex-direction: column;
`,Kee=(0,zm.ZP)("div")`
display: flex;
gap: 16px;
`,Jee=(0,zm.ZP)("div",Jl)((e=>{let{$sortable:t}=e;return`\n flex-basis: 155px;\n width: 155px;\n height: 100px;\n margin-right: 20px;\n margin-bottom: 20px;\n border: ${jb};\n border-radius: ${Mb};\n overflow: hidden;\n ${Ub};\n ${Fb};\n cursor: ${t?"pointer":"auto"};\n `})),ete=(0,zm.ZP)("div")`
display: flex;
justify-content: center;
column-gap: 10px;
margin-right: 20px;
margin-top: -10px;
margin-bottom: 10px;
`,tte=(0,zm.ZP)("img")`
width: 100%;
height: 100%;
object-fit: contain;
`,nte=e=>{let{value:t,collection:n,field:r,entry:i}=e;const o=ek(t,n,r,i);return Oa(tte,{key:"image",role:"presentation",src:o})},rte=e=>{let{onRemove:t,onReplace:n}=e;return Oa(ete,{key:"image-buttons-wrapper"},Oa(wk,{key:"image-replace",onClick:n},Oa(qee.Z,{key:"image-replace-icon"})),Oa(wk,{key:"image-remove",onClick:t},Oa(oD.Z,{key:"image-remove-icon"})))},ite=e=>{let{itemValue:t,collection:n,field:r,entry:i,onRemove:o,onReplace:a}=e;return Oa("div",null,Oa(Jee,{key:"image-wrapper",$sortable:!0},Oa(nte,{key:"image",value:t,collection:n,field:r,entry:i})),Oa(rte,{key:"image-buttons",onRemove:o,onReplace:a}))},ote=(0,zm.ZP)("div")`
display: flex;
flex-wrap: wrap;
`,ate=(0,zm.ZP)("a")`
margin-bottom: 20px;
font-weight: normal;
color: inherit;
&:hover,
&:active,
&:focus {
text-decoration: underline;
}
`,ste=(0,zm.ZP)("div")`
margin-bottom: 12px;
`,lte=(0,zm.ZP)("ul")`
list-style-type: none;
`;function cte(e){return Array.isArray(e)}function ute(e){return e?cte(e)?e.map((e=>Tl(e))):Tl(e):e}const dte=function(){let{forImage:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,u.memo)((t=>{let{value:n,collection:r,field:i,entry:o,onChange:a,openMediaLibrary:s,clearMediaControl:l,removeMediaControl:c,hasErrors:d,t:f}=t;const p=$Q(),[h,m]=(0,u.useState)(!1),[g,O]=(0,u.useState)(null!=n?n:""),y=(0,u.useCallback)((e=>{e!==g&&(O(e),setTimeout((()=>{a(e)})))}),[g,a]),v=tk(g,{field:i,controlID:p},y),b=(0,u.useCallback)((()=>{m(!h)}),[h]);(0,u.useEffect)((()=>()=>{c(p)}),[]);const _=(0,u.useMemo)((()=>{var e;return null!==(e=i.media_library)&&void 0!==e?e:{}}),[i.media_library]),w=(0,u.useMemo)((()=>"config"in _?_.config:void 0),[_]),k=(0,u.useMemo)((()=>{var e;return null!==(e=null==w?void 0:w.multiple)&&void 0!==e&&e}),[null==w?void 0:w.multiple]),x=(0,u.useMemo)((()=>{var e;return"choose_url"in _&&(null===(e=_.choose_url)||void 0===e||e)}),[_]),S=(0,u.useCallback)((e=>t=>{t.preventDefault();const n=window.prompt(f(`editor.editorWidgets.${e}.promptUrl`));y(null!=n?n:"")}),[y,f]),P=(0,u.useCallback)((e=>{e.preventDefault(),l(p),y("")}),[l,p,y]),T=(0,u.useCallback)((e=>()=>{if(Array.isArray(g)){const t=[...g];t.splice(e,1),y(t)}}),[y,g]),$=(0,u.useCallback)((t=>()=>s({controlID:p,forImage:e,value:g,replaceIndex:t,allowMultiple:!1,config:w,field:i})),[w,p,i,s,g]),C=(0,u.useCallback)((e=>{const t=Zee;if(!e||e.length<=t)return e;const n=`${e.slice(0,t/2)}${e.slice(-t/2+1)}`;return Oa(ate,{key:`file-link-${n}`,href:e,rel:"noopener",target:"_blank"},n)}),[]),E=(0,u.useMemo)((()=>e?g?cte(g)?Oa(ote,{key:"multi-image-wrapper"},g.map(((e,t)=>Oa(ite,{key:`item-${e}`,itemValue:e,collection:r,field:i,entry:o,onRemove:T(t),onReplace:$(t)})))):Oa(Jee,{key:"single-image-wrapper"},Oa(nte,{key:"single-image",value:g,collection:r,field:i,entry:o})):null:cte(g)?Oa(ste,{key:"multiple-file-links"},Oa(lte,{key:"file-links-list"},g.map((e=>Oa("li",{key:e},C(e)))))):Oa(ste,{key:"single-file-links"},C(g))),[r,o,i,g,T,$,C]),Q=(0,u.useMemo)((()=>{const t=e?"image":"file";return(Array.isArray(g)?0===g.length:ko(g))?Oa(Kee,null,Oa(AO,{color:"primary",variant:"outlined",key:"upload",onClick:v},f(`editor.editorWidgets.${t}.choose${k?"Multiple":""}`)),x?Oa(AO,{color:"primary",variant:"outlined",key:"choose-url",onClick:S(t)},f(`editor.editorWidgets.${t}.chooseUrl`)):null):Oa(Gee,{key:"selection"},E,Oa(Kee,{key:"controls"},Oa(AO,{color:"primary",variant:"outlined",key:"add-replace",onClick:v},f(`editor.editorWidgets.${t}.${k?"addMore":"chooseDifferent"}`)),x&&!k?Oa(AO,{color:"primary",variant:"outlined",key:"replace-url",onClick:S(t)},f(`editor.editorWidgets.${t}.replaceUrl`)):null,Oa(AO,{color:"error",variant:"outlined",key:"remove",onClick:P},f(`editor.editorWidgets.${t}.remove${k?"All":""}`))))}),[g,E,v,f,k,x,S,P]);return(0,u.useMemo)((()=>{var e;return Oa(Vee,{key:"file-control-wrapper"},Oa(dX,{key:"file-control-top-bar",collapsed:h,onCollapseToggle:b,heading:null!==(e=i.label)&&void 0!==e?e:i.name,hasError:d,t:f}),Oa(Hee,{$collapsed:h},Q),Oa(pX,{hasError:d}))}),[h,Q,i.label,i.name,b,d,f])}));return t.displayName="FileControl",t},fte=dte(),pte=()=>({name:"file",controlComponent:fte,previewComponent:Yee,options:{schema:Xee,getValidValue:ute}}),hte=(0,zm.ZP)((e=>{let{src:t}=e;return Oa("img",{src:t||"",role:"presentation"})}))`
display: block;
max-width: 100%;
height: auto;
`,mte=e=>{let{value:t,collection:n,field:r,entry:i}=e;const o=ek(t,n,r,i);return Oa(hte,{src:o})},gte=e=>{let{value:t,collection:n,field:r,entry:i}=e;return t?Array.isArray(t)?Oa(d().Fragment,null,t.map((e=>Oa(mte,{key:e,value:e,collection:n,field:r,entry:i})))):Oa(mte,{value:t,collection:n,field:r,entry:i}):null},Ote=e=>Oa(EX,null,e.value?Oa(gte,e):null),yte={properties:{allow_multiple:{type:"boolean"},default:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]}}},vte=dte({forImage:!0}),bte=function(){return{name:"image",controlComponent:vte,previewComponent:Ote,options:{schema:yte,getValidValue:ute}}},_te="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function wte(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function kte(e){return"nodeType"in e}function xte(e){var t,n;return e?wte(e)?e:kte(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function Ste(e){const{Document:t}=xte(e);return e instanceof t}function Pte(e){return!wte(e)&&e instanceof xte(e).HTMLElement}function Tte(e){return e?wte(e)?e.document:kte(e)?Ste(e)?e:Pte(e)?e.ownerDocument:document:document:document}const $te=_te?u.useLayoutEffect:u.useEffect;function Cte(e){const t=(0,u.useRef)(e);return $te((()=>{t.current=e})),(0,u.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function Ete(e,t){void 0===t&&(t=[e]);const n=(0,u.useRef)(e);return $te((()=>{n.current!==e&&(n.current=e)}),t),n}function Qte(e,t){const n=(0,u.useRef)();return(0,u.useMemo)((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function Ate(e){const t=Cte(e),n=(0,u.useRef)(null),r=(0,u.useCallback)((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,r]}function Dte(e){const t=(0,u.useRef)();return(0,u.useEffect)((()=>{t.current=e}),[e]),t.current}let Rte={};function Lte(e,t){return(0,u.useMemo)((()=>{if(t)return t;const n=null==Rte[e]?0:Rte[e]+1;return Rte[e]=n,e+"-"+n}),[e,t])}function Mte(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce(((t,n)=>{const r=Object.entries(n);for(const[n,i]of r){const r=t[n];null!=r&&(t[n]=r+e*i)}return t}),{...t})}}const jte=Mte(1),Ite=Mte(-1);function zte(e){if(!e)return!1;const{KeyboardEvent:t}=xte(e.target);return t&&e instanceof t}function Fte(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=xte(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const Wte=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Wte.Translate.toString(e),Wte.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Ute="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Nte(e){return e.matches(Ute)?e:e.querySelector(Ute)}const Bte={display:"none"};function Yte(e){let{id:t,value:n}=e;return d().createElement("div",{id:t,style:Bte},n)}const Xte={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};function qte(e){let{id:t,announcement:n}=e;return d().createElement("div",{id:t,style:Xte,role:"status","aria-live":"assertive","aria-atomic":!0},n)}const Zte=(0,u.createContext)(null),Vte={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n
${Yb};
color: ${Lb.controlLabel};
background: transparent;
font-size: 16px;
line-height: 1;
padding: 0;
width: 32px;
text-align: center;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
position: relative;
`,Ure=(0,zm.ZP)("div")`
position: absolute;
top: 0;
left: 48px;
line-height: 40px;
white-space: nowrap;
cursor: pointer;
z-index: 1;
width: 220px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
display: block;
}
`,Nre=Wre.withComponent("span",{target:"ehkudph0",label:"TopBarButtonSpan"}),Bre=(0,zm.ZP)(Nre)`
width: 100%;
cursor: move;
`,Yre=e=>{let{listeners:t}=e;return Oa(Bre,t,Oa(zre.Z,null))};function Xre(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qre(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xre(Object(n),!0).forEach((function(t){Zre(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xre(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Zre(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Vre=(0,zm.ZP)("div")`
position: relative;
`,Hre=(0,zm.ZP)((e=>{let{className:t,title:n,collapsed:r=!1,onCollapseToggle:i,onRemove:o,isVariableTypesList:a=!1,listeners:s}=e;return Oa(Fre,{className:t,$collapsed:r,$isVariableTypesList:a},i?Oa(wk,{onClick:i,"data-testid":"expand-button"},Oa(lX.Z,{sx:{transform:`rotateZ(${r?"-90deg":"0deg"})`,transition:`transform ${Ib};`}})):null,Oa(Ure,{key:"title",onClick:i,"data-testid":"list-item-title"},n),s?Oa(Yre,{listeners:s}):null,o?Oa(Wre,{"data-testid":"remove-button",onClick:o},Oa(oD.Z,null)):null)}))`
background-color: ${Lb.textFieldBorder};
`,Gre=(0,zm.ZP)("div",Jl)((e=>{let{$collapsed:t}=e;return`\n display: flex;\n flex-direction: column;\n gap: 16px;\n ${t?"\n display: none;\n ":""}\n `}));function Kre(e,t,n,r){if("object"==typeof r&&!Array.isArray(r)){const i=qre(qre({},r),{},{fields:{label:n}});return Ba(e,null,"",Xa(t.path,i))}return r}function Jre(e,t){return!(!e.fields||1!==e.fields.length)||"object"==typeof t||(console.warn(`'${e.name}' field item value value should be an object but is a '${typeof t}'`),!1)}const eie=e=>{let{id:t,index:n,entry:r,field:i,fieldsErrors:o,submitted:a,isFieldDuplicate:s,isFieldHidden:l,locale:c,path:f,valueType:p,handleRemove:h,value:m,i18n:g,listeners:O}=e;const[y,v]=(0,u.useMemo)((()=>{var e;const t={name:`${n}`,label:i.label,summary:i.summary,widget:"object",fields:[]},o=null!==(e=i.label)&&void 0!==e?e:i.name;if(null===p)return[o,t];const a=null!=m?m:{};switch(p){case oie.MIXED:{var s,l;if(!Jre(i,a))return[o,t];const e=a,c=$T(i,e,n);if(!c)return[o,t];const u=null!==(s=c.label)&&void 0!==s?s:c.name,d=null!==(l="summary"in c&&c.summary)&&void 0!==l?l:i.summary;return[d?`${u} - ${Kre(d,r,u,e)}`:u,c]}case oie.MULTIPLE:{var c;if(t.fields=null!==(c=i.fields)&&void 0!==c?c:[],!Jre(i,a))return[o,t];const e=i.fields,n=e&&e[0];if(!n)return[o,t];const s="object"!=typeof a||Array.isArray(a)?a:a[n.name],l=i.summary;return[((l?Kre(l,r,String(s),a):s)||`No ${n.name}`).toString(),t]}}}),[r,i,n,m,p]),[b,_]=(0,u.useState)(!1),w=(0,u.useCallback)((e=>{e.stopPropagation(),_(!b)}),[b]),k=s&&s(i),x=l&&l(i),S=(0,u.useMemo)((()=>i.fields&&1===i.fields.length?{[i.fields[0].name]:m}:m),[i.fields,m]);return Oa(Vre,{key:"sortable-list-item"},Oa(d().Fragment,null,Oa(Hre,{key:"list-item-top-bar",collapsed:b,onCollapseToggle:w,onRemove:Oj()(h,n),"data-testid":`list-item-top-bar-${t}`,title:y,isVariableTypesList:p===oie.MIXED,listeners:O}),Oa(Gre,{$collapsed:b},Oa(FQ,{key:`control-${t}`,field:v,value:S,fieldsErrors:o,submitted:a,parentPath:f,isDisabled:k,isHidden:x,isFieldDuplicate:s,isFieldHidden:l,locale:c,i18n:g,forList:!0})),Oa(pX,{key:"outline"})))};function tie(){return tie=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tie.apply(this,arguments)}const nie=(0,zm.ZP)("div")`
position: relative;
width: 100%;
`,rie=(0,zm.ZP)("div",Jl)((e=>{let{$collapsed:t}=e;return`\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n ${t?"\n display: none;\n ":"\n padding: 16px;\n "}\n `})),iie=e=>{let{id:t,item:n,index:r,valueType:i,handleRemove:o,entry:a,field:s,fieldsErrors:l,submitted:c,isFieldDuplicate:u,isFieldHidden:d,locale:f,path:p,i18n:h}=e;const{attributes:m,listeners:g,setNodeRef:O,transform:y,transition:v}=Rre({id:t}),b={transform:Wte.Transform.toString(y),transition:v};return null===i?Oa("div",{key:t}):Oa("div",tie({ref:O,"data-testid":`object-control-${r}`,style:b},m),Oa(eie,{index:r,id:t,key:`sortable-item-${t}`,valueType:i,handleRemove:o,"data-testid":`object-control-${r}`,entry:a,field:s,fieldsErrors:l,submitted:c,isFieldDuplicate:u,isFieldHidden:d,locale:f,path:p,value:n,i18n:h,listeners:g}))};let oie;function aie(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(1===e.length){if("default"in e[0]&&e[0].default)return e[0].default;switch(e[0].widget){case"string":case"text":return"";case"boolean":return!1;case"number":return 0}return null}return e.reduce(((e,t)=>{const n="fields"in t&&t.fields,r=t.name,i="default"in t&&t.default?t.default:null;if(Array.isArray(n)){const t=aie(n);return TQ()(t)||(e[r]=t),e}if("object"==typeof n){const t=aie([n]);return!TQ()(t)&&(e[r]=t),e}return null!==i&&(e[r]=i),e}),t)}!function(e){e[e.MULTIPLE=0]="MULTIPLE",e[e.MIXED=1]="MIXED"}(oie||(oie={}));const sie=e=>{var t,n,r,i,o;let{entry:a,field:s,fieldsErrors:l,submitted:c,isFieldDuplicate:d,isFieldHidden:f,locale:p,onChange:h,path:m,t:g,value:O,i18n:y,hasErrors:v}=e;const b=(0,u.useMemo)((()=>null!=O?O:[]),[O]),[_,w]=(0,u.useState)(null===(t=s.collapsed)||void 0===t||t),[k,x]=(0,u.useState)(Array.from({length:b.length},(()=>Ih()))),S=(0,u.useMemo)((()=>"fields"in s?oie.MULTIPLE:"types"in s?oie.MIXED:null),[s]),P=(0,u.useCallback)((e=>aie(e)),[]),T=(0,u.useCallback)(((e,t)=>{var n,r;const i="types"in s&&(null===(n=s.types)||void 0===n?void 0:n.find((e=>e.name===t)));return i?aie(null!==(r=i.fields)&&void 0!==r?r:[],{[e]:t}):{}}),[s]),$=(0,u.useCallback)((e=>{var t;const n=null!==(t=s.add_to_top)&&void 0!==t&&t,r=[...k],i=[...b];n?(r.unshift(Ih()),i.unshift(e)):(r.push(Ih()),i.push(e)),x(r),h(i),w(!1)}),[s.add_to_top,h,b,k]),C=(0,u.useCallback)((e=>{var t;e.preventDefault();const n=P(null!==(t=s.fields)&&void 0!==t?t:[]);$(n)}),[$,s,P]),E=(0,u.useCallback)(((e,t)=>{const n=T(t,e);$(n)}),[$,T]),Q=(0,u.useCallback)(((e,t)=>{t.preventDefault();const n=[...k],r=[...b];n.splice(e,1),r.splice(e,1),x(n),h(r)}),[h,b,k]),A=(0,u.useCallback)((e=>{e.preventDefault(),w(!_)}),[_]),D=(0,u.useCallback)((e=>{let{active:t,over:n}=e;if(!n||t.id===n.id)return;const r=k.indexOf(t.id),i=k.indexOf(n.id);x(Lre(k,r,i)),h(Lre(b,r,i))}),[h,b,k]);if(null===S)return null;const R=null!==(n=s.label)&&void 0!==n?n:s.name,L=s.label_singular?s.label_singular:null!==(r=s.label)&&void 0!==r?r:s.name,M=1===b.length?L:R;return Oa(nie,{key:"list-widget"},Oa(Ire,{key:"label"},R),Oa(dX,{key:"header",allowAdd:null===(i=s.allow_add)||void 0===i||i,onAdd:C,types:null!==(o=s[ST])&&void 0!==o?o:[],onAddType:e=>E(e,ET(s)),heading:`${b.length} ${M}`,label:L,onCollapseToggle:A,collapsed:_,hasError:v,t:g,testId:"list-header"}),b.length>0?Oa(mre,{key:"dnd-context",onDragEnd:D},Oa(Tre,{items:k},Oa(rie,{$collapsed:_},b.map(((e,t)=>{const n=k[t];return n?Oa(iie,{index:t,key:n,id:n,item:e,valueType:S,handleRemove:Q,entry:a,field:s,fieldsErrors:l,submitted:c,isFieldDuplicate:d,isFieldHidden:f,locale:p,path:m,value:e,i18n:y}):null}))))):null,Oa(pX,{key:"outline",hasLabel:!0,hasError:v}))},lie=e=>{var t;let{field:n,value:r}=e;return n.fields&&1===n.fields.length?Oa(EX,null,Oa("label",null,Oa("strong",null,n.name,":")),Oa("ul",{style:{marginTop:0}},null==r?void 0:r.map((e=>Oa("li",{key:String(e)},String(e)))))):Oa(EX,null,null!==(t=n.renderedFields)&&void 0!==t?t:null)},cie={properties:{allow_add:{type:"boolean"},collapsed:{type:"boolean"},summary:{type:"string"},label_singular:{type:"string"},i18n:{type:"boolean"
display: flex;
flex-direction: column;
position: relative;
width: 100%;
`,dpe=(0,zm.ZP)("div",Jl)((e=>{let{$collapsed:t,$height:n}=e;return`\n display: flex;\n position: relative;\n height: ${n}\n ${t?"\n display: none;\n ":""}\n `})),fpe=(0,zm.ZP)("div")`
width: 100%;
position: relative;
${va`
${Bfe}
`}
`,ppe={dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"},hpe=function(){let{getFormat:e,getMap:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=n=>{let{path:r,value:i,field:o,onChange:a,hasErrors:s,label:l,t:c}=n;const[d,f]=(0,u.useState)(!1),p=(0,u.useCallback)((()=>{f(!d)}),[d]),{height:h="400px"}=o,m=(0,u.useRef)(null);return(0,u.useLayoutEffect)((()=>{var n,r;const s=e?e(o):new Hse(ppe),l=i?[s.readFeature(i)]:[],c=new Yue({features:l,wrapX:!1}),u=new Eue({source:c}),d=m.current;if(!d)return;const f=t?t(d,u):function(e,t){return new Cfe({target:e,layers:[new Qde({source:new cpe}),t],view:new ufe({center:[0,0],zoom:2})})}(d,u);l.length>0&&f.getView().fit(c.getExtent(),{maxZoom:16,padding:[80,80,80,80]});const p=new mde({source:c,type:null!==(n=o.type)&&void 0!==n?n:"Point"});f.addInteraction(p);const h={decimals:null!==(r=o.decimals)&&void 0!==r?r:7};p.on("drawend",(e=>{let{feature:t}=e;c.clear();const n=t.getGeometry();n&&a(s.writeGeometry(n,h))}))}),[o,m,a,r,i]),Oa(upe,null,Oa(dX,{key:"file-control-top-bar",collapsed:d,onCollapseToggle:p,heading:l,hasError:s,t:c}),Oa(dpe,{$collapsed:d,$height:h},Oa(fpe,{ref:m})),Oa(pX,{hasError:s}))};return n.displayName="MapControl",n},mpe=hpe(),gpe=()=>({name:"map",controlComponent:mpe,previewComponent:die,options:{schema:fie}});function Ope(e,t){const[n,r]=(0,u.useState)(e);return(0,u.useEffect)((()=>{if(0===t)return void r(e);const n=setTimeout((()=>{r(e)}),t);return()=>{clearTimeout(n)}}),[e,t]),0===t?e:n}let ype=0;const vpe=Symbol(),bpe=e=>!!e[vpe],_pe=e=>!e[vpe].c,wpe=e=>{var t;const{b:n,c:r}=e[vpe];r&&(r(),null==(t=Spe.get(n))||t())},kpe=(e,t)=>{const n=e[vpe].o,r=t[vpe].o;return n===r||e===r||bpe(n)&&kpe(n,t)},xpe=(e,t)=>{const n={b:e,o:t,c:null},r=new Promise((e=>{n.c=()=>{n.c=null,e()},t.finally(n.c)}));return r[vpe]=n,r},Spe=new WeakMap,Ppe=e=>"init"in e,Tpe="r",$pe="w",Cpe="c",Epe="s",Qpe=e=>{const t=new WeakMap,n=new WeakMap,r=new Map;let i,o;if(i=new Set,o=new Set,e)for(const[n,r]of e){const e={v:r,r:0,y:!0,d:new Map};Object.freeze(e),Ppe(n)||console.warn("Found initial value for derived atom which can cause unexpected behavior",n),t.set(n,e)}const a=new WeakMap,s=new WeakMap,l=e=>{let t=s.get(e);return t||(t=new Map,s.set(e,t)),t},c=(e,n)=>{if(e){const t=l(e);let r=t.get(n);return r||(r=c(e.p,n),r&&"p"in r&&_pe(r.p)&&(r=void 0),r&&t.set(n,r)),r}return t.get(n)},u=(e,n,i)=>{if(Object.freeze(i),e)l(e).set(n,i);else{const e=t.get(n);t.set(n,i),r.has(n)||r.set(n,e)}},d=(e,t=new Map,n)=>{if(!n)return t;const r=new Map;let i=!1;return n.forEach((n=>{var o;const a=(null==(o=c(e,n))?void 0:o.r)||0;r.set(n,a),t.get(n)!==a&&(i=!0)})),t.size!==r.size||i?r:t},f=(e,t,n,r,i)=>{const o=c(e,t);if(o){if(i&&(!("p"in o)||!kpe(o.p,i)))return o;"p"in o&&wpe(o.p)}const a={v:n,r:(null==o?void 0:o.r)||0,y:!0,d:d(e,null==o?void 0:o.d,r)};let s=!(null==o?void 0:o.y);return o&&"v"in o&&Object.is(o.v,n)?a.d===o.d||a.d.size===o.d.size&&Array.from(a.d.keys()).every((e=>o.d.has(e)))||(s=!0,Promise.resolve().then((()=>{x(e)}))):(s=!0,++a.r,a.d.has(t)&&(a.d=new Map(a.d).set(t,a.r))),o&&!s?o:(u(e,t,a),a)},p=(e,t,n,r,i)=>{const o=c(e,t);if(o){if(i&&(!("p"in o)||!kpe(o.p,i)))return o;"p"in o&&wpe(o.p)}const a={e:n,r:((null==o?void 0:o.r)||0)+1,y:!0,d:d(e,null==o?void 0:o.d,r)};return u(e,t,a),a},h=(e,t,n,r)=>{const i=c(e,t);if(i&&"p"in i){if(kpe(i.p,n)&&!_pe(i.p))return i.y?i:{...i,y:!0};wpe(i.p)}((e,t,n)=>{let r=a.get(t);r||(r=new Map,a.set(t,r)),n.then((()=>{r.get(e)===n&&(r.delete(e),r.size||a.delete(t))})),r.set(e,n)})(e,t,n);const o={p:n,r:((null==i?void 0:i.r)||0)+1,y:!0,d:d(e,null==i?void 0:i.d,r)};return u(e,t,o),o},m=(e,t,n,r)=>{if(n instanceof Promise){const i=xpe(n,n.then((n=>{f(e,t,n,r,i)})).catch((n=>{if(n instanceof Promise)return bpe(n)?n.then((()=>{g(e,t,!0)})):n;p(e,t,n,r,i)})));return h(e,t,i,r)}return f(e,t,n,r)},g=(e,t,r)=>{if(!r){const r=c(e,t);if(r){if(r.y&&"p"in r&&!_pe(r.p))return r;if(r.d.forEach(((r,i)=>{if(i!==t)if(n.has(i)){const t=c(e,i);t&&!t.y&&g(e,i)}else g(e,i)})),Array.from(r.d).every((([t,n])=>{const r=c(e,t);return r&&!("p"in r)&&r.r===n})
padding: 0;
& .MuiSelect-select {
padding: 4px 7px;
}
`,Mtt=[{type:PCe,label:"Heading 1"},{type:TCe,label:"Heading 2"},{type:$Ce,label:"Heading 3"},{type:CCe,label:"Heading 4"},{type:ECe,label:"Heading 5"},{type:QCe,label:"Heading 6"},{type:RCe,label:"Paragraph"}],jtt=e=>{var t;let{disabled:n=!1}=e;const r=O7e(),[i,o]=(0,u.useState)(0),a=Ope(null==r?void 0:r.selection,100),s=(0,u.useMemo)((()=>a&&Mtt.find((e=>ZSe(r,{match:{type:e.type},at:null==a?void 0:a.anchor})))),[r,a,i]),l=(0,u.useCallback)((e=>{e.preventDefault(),(null==s?void 0:s.type)!==e.target.value&&(sPe(r,{activeType:e.target.value}),o((e=>e+1)),setTimeout((()=>{pxe(r)})))}),[r,null==s?void 0:s.type]);return Oa(JC,{sx:{width:120}},Oa(Ltt,{labelId:"font-type-select-label",id:"font-type-select","data-testid":"font-type-select",value:null!==(t=null==s?void 0:s.type)&&void 0!==t?t:RCe,onChange:l,size:"small",disabled:n},Mtt.map((e=>Oa(Pw,{key:e.type,value:e.type},e.label)))))},Itt=e=>{let{hideFontTypeSelect:t=!1,disableFontTypeSelect:n=!1,hideCodeBlock:r=!1}=e;return Oa(d().Fragment,null,t?null:Oa(jtt,{disabled:n}),Oa(Rtt,{tooltip:"Blockquote",type:uCe,icon:Oa(Ett.Z,null)}),r?null:Oa(Rtt,{tooltip:"Code Block",type:pCe,icon:Oa(Ctt.Z,null),onClick:e=>xCe(e,{insertNodesOptions:{select:!0}})}))};var ztt=__nested_webpack_require_2836554__(41096),Ftt=__nested_webpack_require_2836554__(73689),Wtt=__nested_webpack_require_2836554__(25914),Utt=__nested_webpack_require_2836554__(97015),Ntt=__nested_webpack_require_2836554__(73965),Btt=__nested_webpack_require_2836554__(85977);const Ytt=["type","clear"];function Xtt(){return Xtt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xtt.apply(this,arguments)}const qtt=e=>{let{type:t,clear:n}=e,r=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,Ytt);const i=O7e(),o=(0,u.useCallback)((e=>{oPe(e,{key:t,clear:n})}),[n,t]);return Oa(Qtt,Xtt({active:!(null==i||!i.selection)&&FSe(i,t),onClick:o},r))},Ztt=e=>{let{extended:t=!1,useMdx:n}=e;return Oa(d().Fragment,null,Oa(qtt,{tooltip:"Bold",type:MCe,icon:Oa(ztt.Z,null)}),Oa(qtt,{tooltip:"Italic",type:FCe,icon:Oa(Ftt.Z,null)}),n?Oa(qtt,{key:"underline-button",tooltip:"Underline",type:ZCe,icon:Oa(Utt.Z,null)}):null,Oa(qtt,{tooltip:"Strikethrough",type:UCe,icon:Oa(Wtt.Z,null)}),Oa(qtt,{tooltip:"Code",type:ICe,icon:Oa(Ctt.Z,null)}),n&&t?Oa(d().Fragment,null,Oa(qtt,{key:"superscript-button",tooltip:"Superscript",type:XCe,clear:BCe,icon:Oa(Btt.Z,null)}),Oa(qtt,{key:"subscript-button",tooltip:"Subscript",type:BCe,clear:XCe,icon:Oa(Ntt.Z,null)})):null)};var Vtt=__nested_webpack_require_2836554__(16106),Htt=__nested_webpack_require_2836554__(42537);const Gtt=(0,zm.ZP)("div")((e=>{let{theme:t}=e;return`\n display: flex;\n gap: 4px;\n background: ${t.palette.background.paper};\n box-shadow: ${t.shadows[8]};\n margin: 10px 0;\n padding: 6px;\n border-radius: 4px;\n align-items: center;\n position: relative;\n `})),Ktt=(0,zm.ZP)(Gtt)`
display: flex;
align-items: center;
padding: 4px 8px;
gap: 2px;
`,Jtt=(0,zm.ZP)(Gtt)`
display: flex;
flex-direction: column;
align-items: center;
padding: 16px;
gap: 16px;
width: 300px;
`,ent=(0,zm.ZP)("div")`
width: 1px;
height: 20px;
background-color: rgba(229, 231, 235, 1);
margin: 0 4px;
`,tnt=e=>{let{containerRef:t,anchorEl:n,url:r,text:i,textLabel:o="Text",inserting:a=!1,forImage:s=!1,collection:l,field:c,entry:d,onUrlChange:f,onTextChange:p,onClose:h,mediaOpen:m,onMediaToggle:g,onMediaChange:O,onRemove:y,onFocus:v,onBlur:b}=e;const _=vy(),w=(0,u.useRef)(null),k=(0,u.useRef)(null),x=(0,u.useRef)(null),[S,P]=(0,u.useState)(a),T=zOe(),[$,C]=(0,u.useState)(!1),E=Ope($,150),Q=(0,u.useCallback)((e=>{h(e),a||P(!1)}),[a,h]),A=Jw(r,l,c,d),D=(0,u.useMemo)((()=>{var e;return null!==(e=c.media_library)&&void 0!==e?e:{}}),[c.media_library]),R=(0,u.useMemo)((()=>{var e;return"choose_url"in D&&(null===(e=D.choose_url)||void 0===e||e)}),[D]),L=(0,u.useMemo)((()=>!R&&A&&s),[R,s,A]);(0,u.useEffect)((()=>{if(n){if(!S)return;return L?void setTimeout((()=>{var e;null===(e=x.current)||void 0===e||e.focus()})):void setTimeout((()=>{var e;null===(e=k.current)||void 0===e||e.focus()}))}a||P(!1)}),[n,S,a,L]);const[{prevAnchorEl:M,prevHasEditorFocus:j,prevHasFocus:I,prevDebouncedHasFocus:z},F]=(0,u.useState)({prevAnchorEl:n,prevHasEditorFocus:T,prevHasFocus:$,prevDebouncedHasFocus:E});(0,u.useEffect)((()=>{m||(n&&!j&&T&&Q(!1),!n||!I&&!z||$||E||Q(!1),F({prevAnchorEl:n,prevHasEditorFocus:T,prevHasFocus:$,prevDebouncedHasFocus:E}))}),[n,E,Q,T,$,m,M,z,j,I]);const W=(0,u.useCallback)((()=>{C(!0),null==v||v()}),[v]),U=(0,u.useCallback)((()=>{C(!1),null==b||b()}),[b]),N=(0,u.useCallback)((e=>{O(e),null==g||g(!1)}),[O,g]),B=tk(r,{field:c,forImage:s},N),Y=(0,u.useCallback)((()=>{null==g||g(!0),B()}),[B,g]),X=(0,u.useCallback)((e=>{f(e.target.value)}),[f]),q=(0,u.useCallback)((e=>{null==p||p(e.target.value)}),[p]),Z=(0,u.useCallback)((()=>{P(!0)}),[]),V=(0,u.useCallback)((e=>{"Enter"===e.key&&(e.stopPropagation(),e.preventDefault(),Q(!0),a||setTimeout((()=>{P(!1)})))}),[a,Q]),H=Boolean(n);return Oa(Kx,{id:H?"edit-popover":void 0,open:H,anchorEl:n,placeholder:"bottom",container:t,sx:{zIndex:100},onFocus:W,onBlur:U,tabIndex:0},S?Oa(Jtt,{key:"editing-content",contentEditable:!1},Oa(UE,{key:"url-input",inputRef:k,id:"url",label:"Source",variant:"outlined",value:r,onKeyDown:V,onChange:X,fullWidth:!0,size:"small",disabled:L}),a&&s?null:Oa(UE,{key:"text-input",inputRef:x,id:"text",label:o,variant:"outlined",value:i,onKeyDown:V,onChange:q,fullWidth:!0,size:"small"}),Oa(AO,{fullWidth:!0,onClick:Y},"Open Media Library")):Oa(Ktt,{key:"edit-content",contentEditable:!1},Oa(AO,{ref:w,size:"small",color:"inherit",sx:{padding:"4px 8px",textTransform:"none",color:_.palette.text.secondary},onClick:Z},s?"Edit Image":"Edit Link"),Oa(ent,null),s?null:Oa(AO,{size:"small",color:"inherit",sx:{padding:"4px",minWidth:"unset",color:_.palette.text.secondary},href:r,target:"_blank"},Oa(c_.Z,null)),Oa(AO,{size:"small",color:"inherit",sx:{padding:"4px",minWidth:"unset",color:_.palette.text.secondary},onClick:y},Oa(Htt.Z,null))))},nnt=["containerRef","collection","field","entry","inserting","forImage","textLabel","mediaOpen","onMediaToggle","onChange","onFocus","onBlur"];function rnt(){return rnt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rnt.apply(this,arguments)}const int=e=>{let{containerRef:t,collection:n,field:r,entry:i,inserting:o,forImage:a,textLabel:s,mediaOpen:l,onMediaToggle:c,onChange:f,onFocus:p,onBlur:h}=e,m=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,nnt);const g=O7e(),[O,y]=(0,u.useState)(null),[v,b]=(0,u.useState)(""),[_,w]=(0,u.useState)(""),k=(0,u.useCallback)(((e,t)=>{var n;y(null),b(""),w(""),t&&pxe(g,null!==(n=g.selection)&&void 0!==n?n:g.prevSelection);const r=null!=e?e:v;r&&f(r,_)}),[g,f,v,_]),x=(0,u.useCallback)(((e,t)=>{O?k(void 0,!0):y(t.currentTarget)}),[O,k]),S=(0,u.useCallback)((e
display: grid;
grid-template-columns: repeat(10, 1fr);
gap: 0.25rem;
`,Wnt=e=>{let{color:t,colors:n,updateColor:r}=e;return Oa(Fnt,null,n.map((e=>{let{name:n,value:i,isBrightColor:o}=e;return Oa(znt,{key:null!=n?n:i,name:n,value:i,isBrightColor:o,isSelected:t===i,updateColor:r})})))},Unt=(0,zm.ZP)("input")`
visibility: hidden;
position: absolute;
`,Nnt=e=>{let{value:t="#000000",onChange:n}=e;const r=(0,u.useRef)(null);return Oa("div",null,Oa(AO,{onClick:function(){var e;null===(e=r.current)||void 0===e||e.click()},fullWidth:!0},"CUSTOM"),Oa(Unt,{ref:r,type:"color",onChange:function(e){null==n||n(e)},value:t}))},Bnt=(0,zm.ZP)("div")`
display: flex;
flex-direction: column;
gap: 8px;
`,Ynt=e=>{let{color:t,colors:n,customColors:r,updateColor:i,updateCustomColor:o}=e;const[a,s]=(0,u.useState)(),l=(0,u.useCallback)(wQ()(o,100),[o]),[c,d]=(0,u.useState)(t||"#000000");(0,u.useEffect)((()=>{!t||r.some((e=>e.value===t))||n.some((e=>e.value===t))||s(t)}),[t,n,r]);const f=(0,u.useMemo)((()=>a?[...r,{name:"",value:a,isBrightColor:!1}]:r),[a,r]),p=(0,u.useCallback)((e=>{d(e.target.value),l(e.target.value)}),[l]);return Oa(Bnt,null,Oa(Nnt,{value:c,onChange:p}),Oa(Wnt,{color:t,colors:f,updateColor:i}))},Xnt=(0,zm.ZP)("div")`
display: flex;
flex-direction: column;
gap: 16px;
`,qnt=(0,zm.ZP)("div")((e=>{let{theme:t}=e;return`\n height: 1px;\n width: 100%;\n background: ${t.palette.text.secondary};\n opacity: 0.1;\n `})),Znt=(0,u.memo)((e=>{let{color:t,colors:n,customColors:r,updateColor:i,updateCustomColor:o,clearColor:a}=e;return Oa(Xnt,null,Oa(Ynt,{color:t,colors:n,customColors:r,updateColor:i,updateCustomColor:o}),Oa(qnt,null),Oa(Wnt,{color:t,colors:n,updateColor:i}),Oa(AO,{onClick:a,disabled:!t},"Clear"))}),((e,t)=>e.color===t.color&&e.colors===t.colors&&e.customColors===t.customColors&&e.open===t.open)),Vnt=["children","onClose"];function Hnt(){return Hnt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hnt.apply(this,arguments)}const Gnt=(0,zm.ZP)("div")`
display: flex;
gap: 4px;
padding: 16px;
border-radius: 4px;
align-items: center;
`,Knt=e=>{let{children:t,onClose:n}=e,r=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,Vnt);const[i,o]=(0,u.useState)(null),[a,s]=(0,u.useState)(!1),l=(0,u.useCallback)((()=>{null==n||n(),s(!1)}),[n]),c=(0,u.useCallback)((()=>{a?l():s(!a)}),[l,a]);return Oa(d().Fragment,null,Oa("div",{ref:o},Oa(Qtt,Hnt({},r,{onClick:c}))),Oa(ow,{open:a,anchorEl:i,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:l,disablePortal:!0},Oa(Gnt,null,t)))},Jnt=["pluginKey","colors","customColors","closeOnSelect"];function ert(){return ert=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ert.apply(this,arguments)}const trt=e=>{let{pluginKey:t,colors:n=cJe,customColors:r=uJe,closeOnSelect:i=!0}=e,o=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,Jnt);const[a,s]=(0,u.useState)(!1),l=O7e(),c=f$e(),d=XSe(c,t),f=c&&_ke(c,d),[p,h]=(0,u.useState)(),m=(0,u.useCallback)((()=>{s(!a)}),[a,s]),g=(0,u.useCallback)((e=>{c&&l&&l.selection&&(h(e),Lme.select(c,l.selection),Mge.focus(c),((e,t,n=[])=>{e.selection&&$ke(e,(()=>{const r=ike(n);nPe(e,{key:r}),nPe(e,{key:Object.keys(t)}),Object.keys(t).forEach((n=>{e.addMark(n,t[n])}))}))})(l,{[d]:e}))}),[l,c,d]),O=(0,u.useCallback)((e=>{g(e),i&&m()}),[i,m,g]),y=(0,u.useCallback)((()=>{c&&l&&l.selection&&(Lme.select(c,l.selection),Mge.focus(c),p&&nPe(l,{key:d}),i&&m())}),[i,l,c,m,p,d]);return(0,u.useEffect)((()=>{null!=l&&l.selection&&h(f)}),[f,null==l?void 0:l.selection]),Oa(Knt,ert({active:Boolean(f),activeColor:f},o),Oa(Znt,{color:p||f,colors:n,customColors:r,updateColor:O,updateCustomColor:g,clearColor:y,open:a}))},nrt=()=>Oa(d().Fragment,null,Oa(trt,{key:"color-picker-button",pluginKey:kAe,icon:Oa(Int.Z,null),tooltip:"Color"}),Oa(trt,{key:"background-color-picker-button",pluginKey:_Ae,icon:Oa(jnt.Z,null),tooltip:"Background Color"})),rrt=["type"];function irt(){return irt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},irt.apply(this,arguments)}const ort=e=>{let{type:t}=e,n=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,rrt);const r=O7e(),i=(0,u.useCallback)((e=>{NRe(e,{type:t})}),[t]),o=!(null==r||!r.selection)&&DRe(r);return Oa(Qtt,irt({active:!!o&&o.list[0].type===t,onClick:i},n))};var art=__nested_webpack_require_2836554__(20183),srt=__nested_webpack_require_2836554__(75767),lrt=__nested_webpack_require_2836554__(45946),crt=__nested_webpack_require_2836554__(1965);const urt=()=>{const e=g7e(),t=(0,u.useCallback)((e=>{AAe(e)}),[]),n=(0,u.useCallback)((e=>{QAe(e)}),[]);return Oa(d().Fragment,null,Oa(ort,{tooltip:"List",type:GRe,icon:Oa(lrt.Z,null)}),Oa(ort,{tooltip:"Numbered List",type:XSe(e,KRe),icon:Oa(crt.Z,null)}),Oa(Qtt,{tooltip:"Outdent",onClick:t,icon:Oa(art.Z,null)}),Oa(Qtt,{tooltip:"Indent",onClick:n,icon:Oa(srt.Z,null)}))},drt=Ptt(),frt=e=>{let{children:t}=e;return Oa(drt,{component:"blockquote",sx:{borderLeft:"2px solid r
position: relative;
margin: 12px 0;
overflow: hidden;
display: flex;
flex-direction: column;
`,Ort=(0,zm.ZP)("input")`
flex-grow: 1;
outline: none;
padding: 8px;
border: 1px solid rgba(0, 0, 0, 0.35);
border-radius: 4px 4px 0 0;
width: 100%;
height: 34px;
`,yrt=(0,zm.ZP)("div")`
position: relative;
display: flex;
& div {
outline: none;
}
`,vrt=(0,zm.ZP)("div")`
height: 0;
position: absolute;
`,brt=e=>{var t;const[n,r]=(0,u.useState)(!1),[i,o]=(0,u.useState)(!1),{attributes:a,nodeProps:s,element:l,editor:c,children:f}=e,p=$Q(),h="lang"in l?l.lang:"",m="code"in l&&null!==(t=l.code)&&void 0!==t?t:"",g=(0,u.useCallback)((e=>{const t=txe(c,l);t&&sxe(c,{code:e},{at:t})}),[c,l]);Av("message",(0,u.useCallback)((e=>{switch(e.data.message){case`code_block_${p}_onChange`:g(e.data.value);break;case`code_block_${p}_onFocus`:o(!0);break;case`code_block_${p}_onBlur`:o(!1)}}),[g,p]));const O=(0,u.useMemo)((()=>'\n <!DOCTYPE html>\n <html>\n <head>\n <base target="_blank"/>\n <style>\n body {\n margin: 0;\n overflow: hidden;\n position: fixed;\n top: 0;\n width: 100%;\n }\n </style>\n </head>\n <body><div></div></body>\n </html>\n '),[]),[y,v]=(0,u.useState)(24),b=(0,u.useRef)(),_=(0,u.useCallback)((e=>{var t,n,r,i;const o=null!==(t=null===(n=e.current)||void 0===n||null===(r=n.contentDocument)||void 0===r||null===(i=r.body)||void 0===i?void 0:i.scrollHeight)&&void 0!==t?t:0;0!==o&&v(o)}),[]);return(0,u.useEffect)((()=>_(b)),[_,b,m]),(0,u.useEffect)((()=>{setTimeout((()=>_(b)),500)}),[]),Oa(d().Fragment,null,Oa(grt,mrt({},a,s,{contentEditable:!1}),Oa(Ort,{id:p,value:h,onFocus:()=>r(!0),onBlur:()=>r(!1),onChange:e=>{const t=e.target.value,n=txe(c,l);n&&sxe(c,{lang:t},{at:n})}}),Oa(yrt,null,Oa(VQ.ZP,{key:`code-frame-${p}`,id:p,ref:b,style:{border:"none",width:"100%",height:y,overflow:"hidden"},initialContent:O},Oa(hrt,{id:p,code:m,lang:h}))),Oa(pX,{active:n||i}),Oa(vrt,null,f)))};function _rt(){return _rt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_rt.apply(this,arguments)}const wrt=e=>{let{attributes:t,children:n,nodeProps:r}=e;return Oa("h1",_rt({},t,r),n)};function krt(){return krt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},krt.apply(this,arguments)}const xrt=e=>{let{attributes:t,children:n,nodeProps:r}=e;return Oa("h2",krt({},t,r),n)};function Srt(){return Srt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Srt.apply(this,arguments)}const Prt=e=>{let{attributes:t,children:n,nodeProps:r}=e;return Oa("h3",Srt({},t,r),n)};function Trt(){return Trt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Trt.apply(this,arguments)}const $rt=e=>{let{attributes:t,children:n,nodeProps:r}=e;return Oa("h4",Trt({},t,r),n)};function Crt(){return Crt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Crt.apply(this,arguments)}const Ert=e=>{let{attributes:t,children:n,nodeProps:r}=e;return Oa("h5",Crt({},t,r),n)};function Qrt(){return Qrt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qrt.apply(this,arguments)}const Art=e=>{let{attributes:t,children:n,nodeProps:r}=e;return Oa("h6",Qrt({},t,r),n)};function Drt(){return Drt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Drt.apply(this,arguments)}const Rrt=e=>{const{attributes:t,children:n,nodeProps:r}=e;return Oa("div",Drt({},t,r),Oa("hr",Drt({contentEditable:!1},r)),n)},Lrt=e=>{let{containerRef:t,collection:n,entry:r,field:i}=e;return e=>{let{element:o,editor:a,children:s}=e;const{url:l,alt:c}=o,[d,f]=(0,u.useState)(
position: relative;
padding: 1.25rem;
padding-bottom: 0;
margin-bottom: 1.25rem;
`,Hit={container:{position:"relative"}},Git=e=>{let{initialValue:t,collection:n,entry:r,field:i,useMdx:o,controlProps:a,onChange:s,onFocus:l,onBlur:c}=e;const d=(0,u.useRef)(null),f=(0,u.useRef)(null),p=(0,u.useRef)(null),h=(0,u.useMemo)((()=>qit(qit({},{[PCe]:wrt,[TCe]:xrt,[$Ce]:Prt,[CCe]:$rt,[ECe]:Ert,[QCe]:Art,[RCe]:Urt,[mWe]:Hrt,[OWe]:Krt,[gWe]:Zrt,[yWe]:Xrt,[uCe]:frt,[pCe]:brt,[yRe]:jrt({containerRef:p.current,collection:n,entry:r,field:i}),[VLe]:Lrt({containerRef:p.current,collection:n,entry:r,field:i}),[KRe]:Frt,[GRe]:Wrt,[JRe]:zrt,[eLe]:Irt,[f7e]:Brt({controlProps:a}),[MCe]:Q$e(pVe,{as:"strong"}),[FCe]:Q$e(pVe,{as:"em"}),[UCe]:Q$e(pVe,{as:"s"})}),{},o?{[BCe]:Q$e(pVe,{as:"sub"}),[XCe]:Q$e(pVe,{as:"sup"}),[ZCe]:Q$e(pVe,{as:"u"})}:{[f7e]:Brt({controlProps:a})})),[n,a,r,i,o]),m=(0,u.useMemo)((()=>{const e=[LCe(),dCe(),nLe(),DCe(),HLe(),vRe(),Lit(),Bit(),hit(),jCe(),zCe(),WCe(),NCe(),cCe(fit),xRe(Fit),JCe(Uit),KCe(xit),jqe(Yit)];return x7e(o?[...e,xAe(),wAe(),YCe(),qCe(),VCe(),J$e(rit)]:[...e,Wit()],{components:h})}),[h,o]),g=$Q();return(0,u.useMemo)((()=>Oa(Vit,null,Oa(ett,{backend:wtt},Oa(V$e,{id:g,key:"plate-provider",initialValue:t,plugins:m,onChange:s},Oa("div",{key:"editor-outer_wrapper",ref:d,style:Hit.container},Oa(tit,{key:"toolbar",useMdx:o,containerRef:d.current,collection:n,field:i,entry:r}),Oa("div",{key:"editor-wrapper",ref:f,style:Hit.container},Oa(G$e,{key:"editor",id:g,editableProps:qit(qit({},nit),{},{onFocus:l,onBlur:c})},Oa("div",{key:"editor-inner-wrapper",ref:p,style:Hit.container},Oa(Cnt,{key:"balloon-toolbar",useMdx:o,containerRef:p.current,collection:n,field:i,entry:r}),Oa(_it,{containerRef:f}))))))))),[n,i,c,l,t,s,m])};function Kit(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jit(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kit(Object(n),!0).forEach((function(t){eot(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kit(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function eot(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const tot=e=>"string"==typeof e.text,not=["thematic_break","image","code_block","shortcode","tableCell","tableHeaderCell"],rot="<br />",iot=[C7e.code_block];function oot(e,t){var n,r;const{ignoreParagraphNewline:i=!1,listDepth:o=0,isInTable:a=!1,isInCode:s=!1,blockquoteDepth:l=0,useMdx:c,shortcodeConfigs:u}=t,d=e.text||"";let f=e.type||"";const p="type"in e&&"blockquote"===e.type;let h=d;if(!tot(e)){let t="";f===C7e.tableRow&&(t="|"),h=e.children.map(((t,n)=>{const r=f===C7e.table,d=!tot(t)&&E7e.includes(t.type||""),h=E7e.includes(e.type||""),m=iot.includes(e.type||"");let g=!1;return!tot(e)&&Array.isArray(e.children)&&(g=e.children.some((e=>!tot(e)&&e.type===C7e.link))),oot(Jit(Jit({},t),{},{parentType:f}),{ignoreParagraphNewline:(i||d||h||g||a)&&!t.break,listDepth:h?o+1:o,isInTable:r||a,isInCode:m||s,blockquoteDepth:p?l+1:l,useMdx:c,index:n,shortcodeConfigs:u})})).join(t)}if(i||""!==d&&"\n"!==d||e.parentType!==C7e.paragraph||f===C7e.image||f===C7e.shortcode||f===C7e.tableCell||f===C7e.tableHeaderCell||(f=C7e.paragraph,h="\n"),""!==h||not.find((e=>C7e[e]===f))){if("\n"!==h&&tot(e))if(e.strikethrough&&e.bold&&e.italic)h=sot(h,"~~***");else if(e.bold&&e.italic)h=sot(h,"***");else if(e.bold&&(h=sot(h,"**")),e.italic&&(h=sot(h,"_")),e.strikethrough&&(h=sot(h,"~~")),e.code&&(h=sot(h,"`")),e.subscript&&(h=sot(h,"<sub>","</sub>")),e.superscript&&(h=sot(h,"<sup>","</sup>")),e.underline&&(h=sot(
position: relative;
width: 100%;
.toastui-editor-main .toastui-editor-md-vertical-style .toastui-editor {
width: 100%;
}
.toastui-editor-main .toastui-editor-md-splitter {
display: none;
}
.toastui-editor-md-preview {
display: none;
}
.toastui-editor-defaultUI {
border: none;
}
`,uot=e=>{let{useMdx:t}=e;return e=>{const{label:n,value:r,onChange:i,hasErrors:o,collection:a,entry:s,field:l}=e,[c,d]=(0,u.useState)(null!=r?r:""),[f,p]=(0,u.useState)(!1),h=Ope(f,150),m=(0,u.useCallback)((()=>{p(!0)}),[]),g=(0,u.useCallback)((()=>{p(!1)}),[]),O=(0,u.useCallback)((e=>{const n=lot(e,{useMdx:t});n!==c&&(d(n),i(n))}),[c,i]),y=(0,u.useCallback)((()=>{}),[]),[v,b]=Y7e(c,{useMdx:t});return(0,u.useMemo)((()=>Oa(cot,{key:"markdown-control-wrapper"},Oa(Ire,{key:"markdown-control-label",isActive:f,hasErrors:o,onClick:y},n),b?Oa(Git,{initialValue:v,collection:a,entry:s,field:l,useMdx:t,controlProps:e,onChange:O,onFocus:m,onBlur:g}):null,Oa(pX,{key:"markdown-control-outline",hasLabel:!0,hasError:o,active:f||h}))),[a,e,h,l,y,g,O,m,o,f,n,b,v])}},dot=u.createContext({});function fot(e){return function(t){const n=pot(t.components);return u.createElement(e,{...t,allComponents:n})}}function pot(e){const t=u.useContext(dot);return u.useMemo((()=>"function"==typeof e?e(t):{...t,...e}),[t,e])}const hot={};function mot({components:e,children:t,disableParentContext:n}){let r=pot(e);return n&&(r=e||hot),u.createElement(dot.Provider,{value:r},t)}function got(){return got=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},got.apply(this,arguments)}const Oot=e=>{let{previewProps:t}=e;return e=>{let{shortcode:n,args:r}=e;const i=(0,u.useMemo)((()=>Ku(n)),[n]),[o,a]=(0,u.useMemo)((()=>{if(!i)return[null,{}];const e=i.toProps?i.toProps(r):{};return[i.preview,e]}),[i,r]);return o?Oa(o,got({previewProps:t},a)):null}};function yot(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(37===o&&j2e(e.charCodeAt(n+1))&&j2e(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(a=String.fromCharCode(o,t),i=1):a="<22>"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}const vot=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null),M3e(e,t,(function(e,t){const r=t[t.length-1];return n(e,r?r.children.indexOf(e):null,r)}),r)},bot=kot("start"),_ot=kot("end");function wot(e){return{start:bot(e),end:_ot(e)}}function kot(e){return function(t){const n=t&&t.position&&t.position[e]||{};return{line:n.line||null,column:n.column||null,offset:n.offset>-1?n.offset:null}}}const xot={}.hasOwnProperty;function Sot(e){return String(e||"").toUpperCase()}function Pot(e,t){const n=String(t.identifier).toUpperCase(),r=yot(n.toLowerCase()),i=e.footnoteOrder.indexOf(n);let o;-1===i?(e.footnoteOrder.push(n),e.footnoteCounts[n]=1,o=e.footnoteOrder.length):(e.footnoteCounts[n]++,o=i+1);const a=e.footnoteCounts[n],s={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+r,id:e.clobberPrefix+"fnref-"+r+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,s);const l={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,l),e.applyData(t,l)}function Tot(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return{type:"text",value:"!["+t.alt+r};const i=e.all(t),o=i[0];o&&"text"===o.type?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&"text"===a.type?a.value+=r:i.push({type:"text",value:r}),i}function $ot(e){const t=e.spread;return null==t?e.children.length>1:t}const Cot=9,Eot=32;function Qot(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(Aot(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Aot(t.slice(i),i>0,!1)),o.join("")}function Aot(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Cot||t===Eot;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Co
position: relative;
background: white;
width: 100%;
`,Wlt=(0,zm.ZP)("div",Jl)((e=>{let{$collapsed:t}=e;return`\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n ${t?"\n display: none;\n ":"\n padding: 16px;\n "}\n `})),Ult=(0,zm.ZP)("div")`
display: flex;
padding: 16px;
width: 100%;
`,Nlt=e=>{var t;let{field:n,fieldsErrors:r,submitted:i,forList:o,isFieldDuplicate:a,isFieldHidden:s,locale:l,path:c,t:d,i18n:f,hasErrors:p,value:h={}}=e;const[m,g]=(0,u.useState)(null!==(t=n.collapsed)&&void 0!==t&&t),O=(0,u.useCallback)((()=>{g(!m)}),[m]),y=(0,u.useMemo)((()=>{var e;const t=null!==(e=n.label)&&void 0!==e?e:n.name,r=n.summary;return r?`${t} - ${Ba(r,null,"",h)}`:t}),[n.label,n.name,n.summary,h]),v=(0,u.useMemo)((()=>n.fields),[n.fields]),b=(0,u.useMemo)((()=>{const e=`${hO(f)}.${c}`;return Boolean(Object.keys(r).find((t=>t.startsWith(e))))}),[r,f,c]),_=(0,u.useMemo)((()=>{var e;return null!==(e=null==v?void 0:v.map(((e,t)=>{let n=e.name,u=c;const d=h&&h[n];if(o&&1===v.length){var p;const t=c.split(".");n=null!==(p=t.pop())&&void 0!==p?p:e.name,u=t.join(".")}const m=a&&a(e),g=s&&s(e);return Oa(FQ,{key:t,field:e,fieldName:n,value:d,fieldsErrors:r,submitted:i,parentPath:u,isDisabled:m,isHidden:g,isFieldDuplicate:a,isFieldHidden:s,locale:l,i18n:f})})))&&void 0!==e?e:null}),[r,o,f,a,s,l,v,c,i,h]);return v?Oa(Flt,{key:"object-control-wrapper"},o?null:Oa(dX,{key:"object-control-top-bar",collapsed:m,onCollapseToggle:O,heading:y,hasError:p||b,t:d,testId:"object-title"}),Oa(Wlt,{$collapsed:m,key:"object-control-fields"},_),o?null:Oa(pX,{key:"object-control-outline",hasError:p||b})):Oa(Ult,{key:"no-fields-found"},"No field(s) defined for this widget")},Blt=e=>{var t;let{field:n}=e;return Oa(EX,null,null!==(t=n.renderedFields)&&void 0!==t?t:null)},Ylt={properties:{collapsed:{type:"boolean"},i18n:{type:"boolean"}}},Xlt=()=>({name:"object",controlComponent:Nlt,previewComponent:Blt,options:{schema:Ylt}});function qlt(e){return void 0!==e.normalize?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function Zlt(e,t){for(let n=0;n<e.length;n+=1)if(t(e[n]))return n;return-1}const Vlt=function(e={}){const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:i="any",stringify:o,trim:a=!1}=e;return(e,{inputValue:s,getOptionLabel:l})=>{let c=a?s.trim():s;n&&(c=c.toLowerCase()),t&&(c=qlt(c));const u=c?e.filter((e=>{let r=(o||l)(e);return n&&(r=r.toLowerCase()),t&&(r=qlt(r)),"start"===i?0===r.indexOf(c):r.indexOf(c)>-1})):e;return"number"==typeof r?u.slice(0,r):u}}(),Hlt=e=>{var t;return null!==e.current&&(null==(t=e.current.parentElement)?void 0:t.contains(document.activeElement))};function Glt(e){return(0,Og.Z)("MuiListSubheader",e)}(0,ng.Z)("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const Klt=["className","color","component","disableGutters","disableSticky","inset"],Jlt=(0,zm.ZP)("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t[`color${(0,xg.Z)(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})((({theme:e,ownerState:t})=>(0,P.Z)({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14)},"primary"===t.color&&{color:(e.vars||e).palette.primary.main},"inherit"===t.color&&{color:"inherit"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.inset&&{paddingLeft:72},!t.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}))),ect=u.forwardRef((function(e,t){const n=(0,Fm.Z)({props:e,name:"MuiListSubheader"}),{className:r,color:i="default",component:o="li",disableGutters:a=!1,disableSticky:s=!1,inset:l=!1}=n,c=(0,T.Z)(n,Klt),u=(0,P.Z)({},n,{color:i,component:o,disableGutters:a,disableSticky:s,inset:l}),d=(e=>{const{classes:t,color:n,disableGutters:r,inset:i,disableSticky:o}=e,a={root:["root","default"!==n&&`color${(0,xg.Z)(n)}`,!r&&"gutters",i&&"inset",!o&&"sticky"]};return(0,Im.Z)(a,Glt,t)})(u);return(0,eg.jsx)(Jlt,(0,P.Z)({as:o,className:(0,jm.Z)(d.root,r),ref:t,ownerState:u},c))})),tct=ect,nct=(0,lk.Z)((0,eg.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17