@payloadcms/ui 3.4.1-canary.2a8fa30 → 3.4.1-canary.b6681a9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/elements/CodeEditor/CodeEditor.js +32 -39
- package/dist/elements/CodeEditor/CodeEditor.js.map +1 -1
- package/dist/elements/CodeEditor/types.d.ts +0 -4
- package/dist/elements/CodeEditor/types.d.ts.map +1 -1
- package/dist/elements/CodeEditor/types.js.map +1 -1
- package/dist/exports/client/{CodeEditor-QIIK6FKF.js → CodeEditor-RZ32B2QF.js} +2 -2
- package/dist/exports/client/{chunk-MFQ5YTBK.js → chunk-CKHKQPOO.js} +6 -6
- package/dist/exports/client/chunk-CKHKQPOO.js.map +8 -0
- package/dist/exports/client/index.js +2 -2
- package/package.json +5 -5
- package/dist/exports/client/chunk-MFQ5YTBK.js.map +0 -8
- /package/dist/exports/client/{CodeEditor-QIIK6FKF.js.map → CodeEditor-RZ32B2QF.js.map} +0 -0
|
@@ -10,7 +10,7 @@ function require(m) {
|
|
|
10
10
|
}
|
|
11
11
|
// Workaround end
|
|
12
12
|
|
|
13
|
-
import{a as mf,b as Y,c as ff,d as so,e as QA,f as qA,g as pf,h as KA,i as e4}from"./chunk-MFQ5YTBK.js";import{a as xt,b as xa,c as df,d as L,e as ei,f as eb,g as tb,h as qn,i as Uc,j as JA,k as ob,l as t4,m as o4,n as r4}from"./chunk-KZPVHMBR.js";import{c as cr,d as K1,e as Ks}from"./chunk-5LKBKI4T.js";var mb=cr(ht=>{"use strict";function vf(t,e){var o=t.length;t.push(e);e:for(;0<o;){var n=o-1>>>1,r=t[n];if(0<Zc(r,e))t[n]=e,t[o]=r,o=n;else break e}}function ur(t){return t.length===0?null:t[0]}function Qc(t){if(t.length===0)return null;var e=t[0],o=t.pop();if(o!==e){t[0]=o;e:for(var n=0,r=t.length,s=r>>>1;n<s;){var i=2*(n+1)-1,l=t[i],a=i+1,c=t[a];if(0>Zc(l,o))a<r&&0>Zc(c,l)?(t[n]=c,t[a]=o,n=a):(t[n]=l,t[i]=o,n=i);else if(a<r&&0>Zc(c,o))t[n]=c,t[a]=o,n=a;else break e}}return e}function Zc(t,e){var o=t.sortIndex-e.sortIndex;return o!==0?o:t.id-e.id}ht.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(rb=performance,ht.unstable_now=function(){return rb.now()}):(hf=Date,nb=hf.now(),ht.unstable_now=function(){return hf.now()-nb});var rb,hf,nb,_r=[],gn=[],n4=1,Yo=null,io=3,qc=!1,Kn=!1,ya=!1,ab=typeof setTimeout=="function"?setTimeout:null,lb=typeof clearTimeout=="function"?clearTimeout:null,sb=typeof setImmediate<"u"?setImmediate:null;function Jc(t){for(var e=ur(gn);e!==null;){if(e.callback===null)Qc(gn);else if(e.startTime<=t)Qc(gn),e.sortIndex=e.expirationTime,vf(_r,e);else break;e=ur(gn)}}function xf(t){if(ya=!1,Jc(t),!Kn)if(ur(_r)!==null)Kn=!0,Cf();else{var e=ur(gn);e!==null&&yf(xf,e.startTime-t)}}var Kc=!1,wa=-1,cb=5,ub=-1;function db(){return!(ht.unstable_now()-ub<cb)}function gf(){if(Kc){var t=ht.unstable_now();ub=t;var e=!0;try{e:{Kn=!1,ya&&(ya=!1,lb(wa),wa=-1),qc=!0;var o=io;try{t:{for(Jc(t),Yo=ur(_r);Yo!==null&&!(Yo.expirationTime>t&&db());){var n=Yo.callback;if(typeof n=="function"){Yo.callback=null,io=Yo.priorityLevel;var r=n(Yo.expirationTime<=t);if(t=ht.unstable_now(),typeof r=="function"){Yo.callback=r,Jc(t),e=!0;break t}Yo===ur(_r)&&Qc(_r),Jc(t)}else Qc(_r);Yo=ur(_r)}if(Yo!==null)e=!0;else{var s=ur(gn);s!==null&&yf(xf,s.startTime-t),e=!1}}break e}finally{Yo=null,io=o,qc=!1}e=void 0}}finally{e?Ca():Kc=!1}}}var Ca;typeof sb=="function"?Ca=function(){sb(gf)}:typeof MessageChannel<"u"?(bf=new MessageChannel,ib=bf.port2,bf.port1.onmessage=gf,Ca=function(){ib.postMessage(null)}):Ca=function(){ab(gf,0)};var bf,ib;function Cf(){Kc||(Kc=!0,Ca())}function yf(t,e){wa=ab(function(){t(ht.unstable_now())},e)}ht.unstable_IdlePriority=5;ht.unstable_ImmediatePriority=1;ht.unstable_LowPriority=4;ht.unstable_NormalPriority=3;ht.unstable_Profiling=null;ht.unstable_UserBlockingPriority=2;ht.unstable_cancelCallback=function(t){t.callback=null};ht.unstable_continueExecution=function(){Kn||qc||(Kn=!0,Cf())};ht.unstable_forceFrameRate=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):cb=0<t?Math.floor(1e3/t):5};ht.unstable_getCurrentPriorityLevel=function(){return io};ht.unstable_getFirstCallbackNode=function(){return ur(_r)};ht.unstable_next=function(t){switch(io){case 1:case 2:case 3:var e=3;break;default:e=io}var o=io;io=e;try{return t()}finally{io=o}};ht.unstable_pauseExecution=function(){};ht.unstable_requestPaint=function(){};ht.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var o=io;io=t;try{return e()}finally{io=o}};ht.unstable_scheduleCallback=function(t,e,o){var n=ht.unstable_now();switch(typeof o=="object"&&o!==null?(o=o.delay,o=typeof o=="number"&&0<o?n+o:n):o=n,t){case 1:var r=-1;break;case 2:r=250;break;case 5:r=1073741823;break;case 4:r=1e4;break;default:r=5e3}return r=o+r,t={id:n4++,callback:e,priorityLevel:t,startTime:o,expirationTime:r,sortIndex:-1},o>n?(t.sortIndex=o,vf(gn,t),ur(_r)===null&&t===ur(gn)&&(ya?(lb(wa),wa=-1):ya=!0,yf(xf,o-n))):(t.sortIndex=r,vf(_r,t),Kn||qc||(Kn=!0,Cf())),t};ht.unstable_shouldYield=db;ht.unstable_wrapCallback=function(t){var e=io;return function(){var o=io;io=e;try{return t.apply(this,arguments)}finally{io=o}}}});var pb=cr((R7,fb)=>{"use strict";fb.exports=mb()});var cy=cr(ut=>{"use strict";var qt=typeof Symbol=="function"&&Symbol.for,dh=qt?Symbol.for("react.element"):60103,mh=qt?Symbol.for("react.portal"):60106,_d=qt?Symbol.for("react.fragment"):60107,Rd=qt?Symbol.for("react.strict_mode"):60108,Dd=qt?Symbol.for("react.profiler"):60114,Fd=qt?Symbol.for("react.provider"):60109,Pd=qt?Symbol.for("react.context"):60110,fh=qt?Symbol.for("react.async_mode"):60111,Td=qt?Symbol.for("react.concurrent_mode"):60111,Nd=qt?Symbol.for("react.forward_ref"):60112,kd=qt?Symbol.for("react.suspense"):60113,$6=qt?Symbol.for("react.suspense_list"):60120,Ld=qt?Symbol.for("react.memo"):60115,Od=qt?Symbol.for("react.lazy"):60116,M6=qt?Symbol.for("react.block"):60121,V6=qt?Symbol.for("react.fundamental"):60117,G6=qt?Symbol.for("react.responder"):60118,W6=qt?Symbol.for("react.scope"):60119;function $o(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case dh:switch(t=t.type,t){case fh:case Td:case _d:case Dd:case Rd:case kd:return t;default:switch(t=t&&t.$$typeof,t){case Pd:case Nd:case Od:case Ld:case Fd:return t;default:return e}}case mh:return e}}}function ly(t){return $o(t)===Td}ut.AsyncMode=fh;ut.ConcurrentMode=Td;ut.ContextConsumer=Pd;ut.ContextProvider=Fd;ut.Element=dh;ut.ForwardRef=Nd;ut.Fragment=_d;ut.Lazy=Od;ut.Memo=Ld;ut.Portal=mh;ut.Profiler=Dd;ut.StrictMode=Rd;ut.Suspense=kd;ut.isAsyncMode=function(t){return ly(t)||$o(t)===fh};ut.isConcurrentMode=ly;ut.isContextConsumer=function(t){return $o(t)===Pd};ut.isContextProvider=function(t){return $o(t)===Fd};ut.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===dh};ut.isForwardRef=function(t){return $o(t)===Nd};ut.isFragment=function(t){return $o(t)===_d};ut.isLazy=function(t){return $o(t)===Od};ut.isMemo=function(t){return $o(t)===Ld};ut.isPortal=function(t){return $o(t)===mh};ut.isProfiler=function(t){return $o(t)===Dd};ut.isStrictMode=function(t){return $o(t)===Rd};ut.isSuspense=function(t){return $o(t)===kd};ut.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===_d||t===Td||t===Dd||t===Rd||t===kd||t===$6||typeof t=="object"&&t!==null&&(t.$$typeof===Od||t.$$typeof===Ld||t.$$typeof===Fd||t.$$typeof===Pd||t.$$typeof===Nd||t.$$typeof===V6||t.$$typeof===G6||t.$$typeof===W6||t.$$typeof===M6)};ut.typeOf=$o});var dy=cr((gae,uy)=>{"use strict";uy.exports=cy()});var vy=cr((bae,by)=>{"use strict";var ph=dy(),H6={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},z6={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},X6={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},hy={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},hh={};hh[ph.ForwardRef]=X6;hh[ph.Memo]=hy;function my(t){return ph.isMemo(t)?hy:hh[t.$$typeof]||H6}var Y6=Object.defineProperty,U6=Object.getOwnPropertyNames,fy=Object.getOwnPropertySymbols,Z6=Object.getOwnPropertyDescriptor,J6=Object.getPrototypeOf,py=Object.prototype;function gy(t,e,o){if(typeof e!="string"){if(py){var n=J6(e);n&&n!==py&&gy(t,n,o)}var r=U6(e);fy&&(r=r.concat(fy(e)));for(var s=my(t),i=my(e),l=0;l<r.length;++l){var a=r[l];if(!z6[a]&&!(o&&o[a])&&!(i&&i[a])&&!(s&&s[a])){var c=Z6(e,a);try{Y6(t,a,c)}catch{}}}}return t}by.exports=gy});var Qw=cr((dhe,Jw)=>{var cg=Math.floor(Math.random()*16777215),zw=mt.index=parseInt(Math.random()*16777215,10),Xw=(typeof process>"u"||typeof process.pid!="number"?Math.floor(Math.random()*1e5):process.pid)%65535,Yw=(()=>{try{return _Buffer}catch{try{return Buffer}catch{return null}}})(),sm=function(t){return!!(t!=null&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t))},Zw=[];for(_o=0;_o<256;_o++)Zw[_o]=(_o<=15?"0":"")+_o.toString(16);var _o,Uw=new RegExp("^[0-9a-fA-F]{24}$"),Zl=[];_o=0;for(;_o<10;)Zl[48+_o]=_o++;for(;_o<16;)Zl[55+_o]=Zl[87+_o]=_o++;function mt(t){if(!(this instanceof mt))return new mt(t);if(t&&(t instanceof mt||t._bsontype==="ObjectID"))return t;if(this._bsontype="ObjectID",t==null||typeof t=="number"){this.id=this.generate(t);return}var e=mt.isValid(t);if(!e&&t!=null)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");if(e&&typeof t=="string"&&t.length===24)return mt.createFromHexString(t);if(t!=null&&t.length===12)this.id=t;else{if(t!=null&&typeof t.toHexString=="function")return t;throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters")}}Jw.exports=mt;mt.default=mt;mt.createFromTime=function(t){return t=parseInt(t,10)%4294967295,new mt($N(8,t)+"0000000000000000")};mt.createFromHexString=function(t){if(typeof t>"u"||t!=null&&t.length!==24)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");for(var e="",o=0;o<24;)e+=String.fromCharCode(Zl[t.charCodeAt(o++)]<<4|Zl[t.charCodeAt(o++)]);return new mt(e)};mt.isValid=function(t){return t==null?!1:typeof t=="number"?!0:typeof t=="string"?t.length===12||t.length===24&&Uw.test(t):t instanceof mt?!0:sm(t)?mt.isValid(t.toString("hex")):typeof t.toHexString=="function"&&Yw&&(t.id instanceof Yw||typeof t.id=="string")?t.id.length===12||t.id.length===24&&Uw.test(t.id):!1};mt.prototype={constructor:mt,toHexString:function(){if(!this.id||!this.id.length)throw new Error("invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is ["+JSON.stringify(this.id)+"]");if(this.id.length===24)return this.id;if(sm(this.id))return this.id.toString("hex");for(var t="",e=0;e<this.id.length;e++)t+=Zw[this.id.charCodeAt(e)];return t},equals:function(t){return t instanceof mt?this.toString()===t.toString():typeof t=="string"&&mt.isValid(t)&&t.length===12&&sm(this.id)?t===this.id.toString("binary"):typeof t=="string"&&mt.isValid(t)&&t.length===24?t.toLowerCase()===this.toHexString():typeof t=="string"&&mt.isValid(t)&&t.length===12?t===this.id:t!=null&&(t instanceof mt||t.toHexString)?t.toHexString()===this.toHexString():!1},getTimestamp:function(){var t=new Date,e;return sm(this.id)?e=this.id[3]|this.id[2]<<8|this.id[1]<<16|this.id[0]<<24:e=this.id.charCodeAt(3)|this.id.charCodeAt(2)<<8|this.id.charCodeAt(1)<<16|this.id.charCodeAt(0)<<24,t.setTime(Math.floor(e)*1e3),t},generate:function(t){typeof t!="number"&&(t=~~(Date.now()/1e3)),t=parseInt(t,10)%4294967295;var e=BN();return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,t&255,cg>>16&255,cg>>8&255,cg&255,Xw>>8&255,Xw&255,e>>16&255,e>>8&255,e&255)}};function BN(){return zw=(zw+1)%16777215}function $N(t,e){return e=e.toString(16),e.length===t?e:"00000000".substring(e.length,t)+e}var MN=Symbol&&Symbol.for&&Symbol.for("nodejs.util.inspect.custom")||"inspect";mt.prototype[MN]=function(){return"ObjectID("+this+")"};mt.prototype.toJSON=mt.prototype.toHexString;mt.prototype.toString=mt.prototype.toHexString});var fg=cr((vhe,t3)=>{function mg(t){return t===void 0}function HN(t){return t===null}function zN(t){return typeof t=="boolean"}function im(t){return t===Object(t)}function Kw(t){return Array.isArray(t)}function XN(t){return t instanceof Date}function e3(t,e){return e?im(t)&&!mg(t.uri):im(t)&&typeof t.size=="number"&&typeof t.type=="string"&&typeof t.slice=="function"}function YN(t,e){return e3(t,e)&&typeof t.name=="string"&&(im(t.lastModifiedDate)||typeof t.lastModified=="number")}function Bs(t){return mg(t)?!1:t}function dg(t,e,o,n){e=e||{},o=o||new FormData,e.indices=Bs(e.indices),e.nullsAsUndefineds=Bs(e.nullsAsUndefineds),e.booleansAsIntegers=Bs(e.booleansAsIntegers),e.allowEmptyArrays=Bs(e.allowEmptyArrays),e.noAttributesWithArrayNotation=Bs(e.noAttributesWithArrayNotation),e.noFilesWithArrayNotation=Bs(e.noFilesWithArrayNotation),e.dotsForObjectNotation=Bs(e.dotsForObjectNotation);let r=typeof o.getParts=="function";return mg(t)||(HN(t)?e.nullsAsUndefineds||o.append(n,""):zN(t)?e.booleansAsIntegers?o.append(n,t?1:0):o.append(n,t):Kw(t)?t.length?t.forEach((s,i)=>{let l=n+"["+(e.indices?i:"")+"]";(e.noAttributesWithArrayNotation||e.noFilesWithArrayNotation&&YN(s,r))&&(l=n),dg(s,e,o,l)}):e.allowEmptyArrays&&o.append(e.noAttributesWithArrayNotation?n:n+"[]",""):XN(t)?o.append(n,t.toISOString()):im(t)&&!e3(t,r)?Object.keys(t).forEach(s=>{let i=t[s];if(Kw(i))for(;s.length>2&&s.lastIndexOf("[]")===s.length-2;)s=s.substring(0,s.length-2);let l=n?e.dotsForObjectNotation?n+"."+s:n+"["+s+"]":s;dg(i,e,o,l)}):o.append(n,t)),o}t3.exports={serialize:dg}});var CI=cr((Iwe,xI)=>{(function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e={rotl:function(o,n){return o<<n|o>>>32-n},rotr:function(o,n){return o<<32-n|o>>>n},endian:function(o){if(o.constructor==Number)return e.rotl(o,8)&16711935|e.rotl(o,24)&4278255360;for(var n=0;n<o.length;n++)o[n]=e.endian(o[n]);return o},randomBytes:function(o){for(var n=[];o>0;o--)n.push(Math.floor(Math.random()*256));return n},bytesToWords:function(o){for(var n=[],r=0,s=0;r<o.length;r++,s+=8)n[s>>>5]|=o[r]<<24-s%32;return n},wordsToBytes:function(o){for(var n=[],r=0;r<o.length*32;r+=8)n.push(o[r>>>5]>>>24-r%32&255);return n},bytesToHex:function(o){for(var n=[],r=0;r<o.length;r++)n.push((o[r]>>>4).toString(16)),n.push((o[r]&15).toString(16));return n.join("")},hexToBytes:function(o){for(var n=[],r=0;r<o.length;r+=2)n.push(parseInt(o.substr(r,2),16));return n},bytesToBase64:function(o){for(var n=[],r=0;r<o.length;r+=3)for(var s=o[r]<<16|o[r+1]<<8|o[r+2],i=0;i<4;i++)r*8+i*6<=o.length*8?n.push(t.charAt(s>>>6*(3-i)&63)):n.push("=");return n.join("")},base64ToBytes:function(o){o=o.replace(/[^A-Z0-9+\/]/ig,"");for(var n=[],r=0,s=0;r<o.length;s=++r%4)s!=0&&n.push((t.indexOf(o.charAt(r-1))&Math.pow(2,-2*s+8)-1)<<s*2|t.indexOf(o.charAt(r))>>>6-s*2);return n}};xI.exports=e})()});var zg=cr((Swe,yI)=>{var Hg={utf8:{stringToBytes:function(t){return Hg.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(Hg.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],o=0;o<t.length;o++)e.push(t.charCodeAt(o)&255);return e},bytesToString:function(t){for(var e=[],o=0;o<t.length;o++)e.push(String.fromCharCode(t[o]));return e.join("")}}};yI.exports=Hg});var SI=cr((Awe,II)=>{II.exports=function(t){return t!=null&&(wI(t)||kO(t)||!!t._isBuffer)};function wI(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function kO(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&wI(t.slice(0,0))}});var EI=cr((Ewe,AI)=>{(function(){var t=CI(),e=zg().utf8,o=SI(),n=zg().bin,r=function(s,i){s.constructor==String?i&&i.encoding==="binary"?s=n.stringToBytes(s):s=e.stringToBytes(s):o(s)?s=Array.prototype.slice.call(s,0):!Array.isArray(s)&&s.constructor!==Uint8Array&&(s=s.toString());for(var l=t.bytesToWords(s),a=s.length*8,c=1732584193,u=-271733879,m=-1732584194,f=271733878,d=0;d<l.length;d++)l[d]=(l[d]<<8|l[d]>>>24)&16711935|(l[d]<<24|l[d]>>>8)&4278255360;l[a>>>5]|=128<<a%32,l[(a+64>>>9<<4)+14]=a;for(var h=r._ff,p=r._gg,g=r._hh,b=r._ii,d=0;d<l.length;d+=16){var v=c,C=u,x=m,y=f;c=h(c,u,m,f,l[d+0],7,-680876936),f=h(f,c,u,m,l[d+1],12,-389564586),m=h(m,f,c,u,l[d+2],17,606105819),u=h(u,m,f,c,l[d+3],22,-1044525330),c=h(c,u,m,f,l[d+4],7,-176418897),f=h(f,c,u,m,l[d+5],12,1200080426),m=h(m,f,c,u,l[d+6],17,-1473231341),u=h(u,m,f,c,l[d+7],22,-45705983),c=h(c,u,m,f,l[d+8],7,1770035416),f=h(f,c,u,m,l[d+9],12,-1958414417),m=h(m,f,c,u,l[d+10],17,-42063),u=h(u,m,f,c,l[d+11],22,-1990404162),c=h(c,u,m,f,l[d+12],7,1804603682),f=h(f,c,u,m,l[d+13],12,-40341101),m=h(m,f,c,u,l[d+14],17,-1502002290),u=h(u,m,f,c,l[d+15],22,1236535329),c=p(c,u,m,f,l[d+1],5,-165796510),f=p(f,c,u,m,l[d+6],9,-1069501632),m=p(m,f,c,u,l[d+11],14,643717713),u=p(u,m,f,c,l[d+0],20,-373897302),c=p(c,u,m,f,l[d+5],5,-701558691),f=p(f,c,u,m,l[d+10],9,38016083),m=p(m,f,c,u,l[d+15],14,-660478335),u=p(u,m,f,c,l[d+4],20,-405537848),c=p(c,u,m,f,l[d+9],5,568446438),f=p(f,c,u,m,l[d+14],9,-1019803690),m=p(m,f,c,u,l[d+3],14,-187363961),u=p(u,m,f,c,l[d+8],20,1163531501),c=p(c,u,m,f,l[d+13],5,-1444681467),f=p(f,c,u,m,l[d+2],9,-51403784),m=p(m,f,c,u,l[d+7],14,1735328473),u=p(u,m,f,c,l[d+12],20,-1926607734),c=g(c,u,m,f,l[d+5],4,-378558),f=g(f,c,u,m,l[d+8],11,-2022574463),m=g(m,f,c,u,l[d+11],16,1839030562),u=g(u,m,f,c,l[d+14],23,-35309556),c=g(c,u,m,f,l[d+1],4,-1530992060),f=g(f,c,u,m,l[d+4],11,1272893353),m=g(m,f,c,u,l[d+7],16,-155497632),u=g(u,m,f,c,l[d+10],23,-1094730640),c=g(c,u,m,f,l[d+13],4,681279174),f=g(f,c,u,m,l[d+0],11,-358537222),m=g(m,f,c,u,l[d+3],16,-722521979),u=g(u,m,f,c,l[d+6],23,76029189),c=g(c,u,m,f,l[d+9],4,-640364487),f=g(f,c,u,m,l[d+12],11,-421815835),m=g(m,f,c,u,l[d+15],16,530742520),u=g(u,m,f,c,l[d+2],23,-995338651),c=b(c,u,m,f,l[d+0],6,-198630844),f=b(f,c,u,m,l[d+7],10,1126891415),m=b(m,f,c,u,l[d+14],15,-1416354905),u=b(u,m,f,c,l[d+5],21,-57434055),c=b(c,u,m,f,l[d+12],6,1700485571),f=b(f,c,u,m,l[d+3],10,-1894986606),m=b(m,f,c,u,l[d+10],15,-1051523),u=b(u,m,f,c,l[d+1],21,-2054922799),c=b(c,u,m,f,l[d+8],6,1873313359),f=b(f,c,u,m,l[d+15],10,-30611744),m=b(m,f,c,u,l[d+6],15,-1560198380),u=b(u,m,f,c,l[d+13],21,1309151649),c=b(c,u,m,f,l[d+4],6,-145523070),f=b(f,c,u,m,l[d+11],10,-1120210379),m=b(m,f,c,u,l[d+2],15,718787259),u=b(u,m,f,c,l[d+9],21,-343485551),c=c+v>>>0,u=u+C>>>0,m=m+x>>>0,f=f+y>>>0}return t.endian([c,u,m,f])};r._ff=function(s,i,l,a,c,u,m){var f=s+(i&l|~i&a)+(c>>>0)+m;return(f<<u|f>>>32-u)+i},r._gg=function(s,i,l,a,c,u,m){var f=s+(i&a|l&~a)+(c>>>0)+m;return(f<<u|f>>>32-u)+i},r._hh=function(s,i,l,a,c,u,m){var f=s+(i^l^a)+(c>>>0)+m;return(f<<u|f>>>32-u)+i},r._ii=function(s,i,l,a,c,u,m){var f=s+(l^(i|~a))+(c>>>0)+m;return(f<<u|f>>>32-u)+i},r._blocksize=16,r._digestsize=16,AI.exports=function(s,i){if(s==null)throw new Error("Illegal argument "+s);var l=t.wordsToBytes(r(s,i));return i&&i.asBytes?l:i&&i.asString?n.bytesToString(l):t.bytesToHex(l)}})()});import{jsx as Ef}from"react/jsx-runtime";import"react";function q({CustomComponent:t,Fallback:e}){return t!==void 0?t:e}import{jsx as b4}from"react/jsx-runtime";import vb from"react";import{createContext as ti,useContext as oi}from"react";var Ia=Ks(pb(),1);import{createElement as s4,createContext as i4,useContext as a4,useEffect as l4,useLayoutEffect as c4,useReducer as u4,useRef as wf,useState as d4}from"react";var eu=Symbol(),m4=Symbol(),f4=typeof window>"u"||/ServerSideRendering/.test(window.navigator&&window.navigator.userAgent),hb=f4?l4:c4,p4=Ia.unstable_runWithPriority?t=>{try{(0,Ia.unstable_runWithPriority)(Ia.unstable_NormalPriority,t)}catch(e){if(e.message==="Not implemented.")t();else throw e}}:t=>t(),h4=t=>({value:o,children:n})=>{let r=wf(o),s=wf(0),[i,l]=d4(null);i&&(i(o),l(null));let a=wf();if(!a.current){let c=new Set,u=(m,f)=>{s.current+=1;let d={n:s.current};f?.suspense&&(d.n*=-1,d.p=new Promise(h=>{l(()=>p=>{d.v=p,delete d.p,h(p)})})),c.forEach(h=>h(d)),m()};a.current={[eu]:{v:r,n:s,l:c,u}}}return hb(()=>{r.current=o,s.current+=1,p4(()=>{a.current[eu].l.forEach(c=>{c({n:s.current,v:o})})})},[o]),s4(t,{value:a.current},n)},g4=t=>t;function gb(t){let e=i4({[eu]:{v:{current:t},n:{current:-1},l:new Set,u:o=>o()}});return e[m4]=e.Provider,e.Provider=h4(e.Provider),delete e.Consumer,e}function If(t,e){let o=a4(t)[eu],{v:{current:n},n:{current:r},l:s}=o,i=e(n),[l,a]=u4((c,u)=>{if(!u)return[n,i];if("p"in u)throw u.p;if(u.n===r)return Object.is(c[1],i)?c:[n,i];try{if("v"in u){if(Object.is(c[0],u.v))return c;let m=e(u.v);return Object.is(c[1],m)?c:[u.v,m]}}catch{}return[...c]},[n,i]);return Object.is(l[1],i)||a(),hb(()=>(s.add(a),()=>{s.delete(a)}),[s]),l[1]}function bb(t){return If(t,g4)}var tu=ti({}),ou=ti({}),ru=ti(!1),nu=ti(!1),su=ti(!1),Sf=ti(!1),Sa=gb([{},()=>null]),He=()=>oi(tu),iu=()=>oi(ou),Lt=()=>oi(ru),Uo=()=>oi(nu),Ot=()=>oi(su),es=()=>oi(Sf),Yt=t=>If(Sa,t),ri=()=>bb(Sa);var xb=vb.createContext({data:{},path:"",rowNumber:void 0}),Af=({children:t,path:e,rowNumber:o})=>{"use no memo";let{getDataByPath:n,getSiblingData:r}=iu(),s=r(e),l=n(e)||s;return b4(xb.Provider,{value:{data:l,path:e,rowNumber:o},children:t})},v4=()=>vb.useContext(xb);var x4="row-label",ts=t=>{let{className:e,CustomComponent:o,label:n,path:r,rowNumber:s}=t;return Ef(Af,{path:r,rowNumber:s,children:Ef(q,{CustomComponent:o,Fallback:Ef("span",{className:[x4,e].filter(Boolean).join(" "),style:{pointerEvents:"none"},children:n})})})};import{c as ML}from"react/compiler-runtime";import{jsx as eo,jsxs as Xs}from"react/jsx-runtime";import{getTranslation as Tg}from"@payloadcms/translations";import VL from"react";import{jsx as _f,jsxs as C4}from"react/jsx-runtime";import Cb from"next/link.js";import yb from"react";var y4=Cb.default||Cb,os="banner",Vr=({type:t="default",alignIcon:e="right",children:o,className:n,icon:r,onClick:s,to:i})=>{let l=[os,`${os}--type-${t}`,n&&n,i&&`${os}--has-link`,(i||s)&&`${os}--has-action`,r&&`${os}--has-icon`,r&&`${os}--align-icon-${e}`].filter(Boolean).join(" "),a="div";return s&&!i&&(a="button"),i&&(a=y4),C4(a,{className:l,href:i||null,onClick:s,children:[r&&e==="left"&&_f(yb.Fragment,{children:r}),_f("span",{className:`${os}__content`,children:o}),r&&e==="right"&&_f(yb.Fragment,{children:r})]})};import{jsx as dr,jsxs as du}from"react/jsx-runtime";import G4,{forwardRef as W4,Fragment as H4,isValidElement as z4}from"react";import{jsx as wb}from"react/jsx-runtime";import"react";var Qe=({className:t,direction:e,size:o})=>wb("svg",{className:["icon icon--chevron",t,o&&`icon--size-${o}`].filter(Boolean).join(" "),height:"100%",style:{transform:e==="left"?"rotate(90deg)":e==="right"?"rotate(-90deg)":e==="up"?"rotate(180deg)":void 0},viewBox:"0 0 22 12",width:"100%",xmlns:"http://www.w3.org/2000/svg",children:wb("path",{className:"stroke",d:"M1 1.12109L11 11.1211L21 1.12109",strokeLinecap:"square"})});import{jsx as Ib}from"react/jsx-runtime";import"react";var ko=({className:t})=>Ib("svg",{className:[t,"icon icon--edit"].filter(Boolean).join(" "),viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:Ib("path",{className:"stroke",d:"M9.68531 4.62938H5.2634C4.92833 4.62938 4.60698 4.76248 4.37004 4.99942C4.13311 5.23635 4 5.5577 4 5.89278V14.7366C4 15.0717 4.13311 15.393 4.37004 15.63C4.60698 15.8669 4.92833 16 5.2634 16H14.1072C14.4423 16 14.7636 15.8669 15.0006 15.63C15.2375 15.393 15.3706 15.0717 15.3706 14.7366V10.3147M13.7124 4.39249C13.9637 4.14118 14.3046 4 14.66 4C15.0154 4 15.3562 4.14118 15.6075 4.39249C15.8588 4.6438 16 4.98464 16 5.34004C16 5.69544 15.8588 6.03629 15.6075 6.28759L9.91399 11.9817C9.76399 12.1316 9.57868 12.2413 9.37515 12.3008L7.56027 12.8314C7.50591 12.8472 7.44829 12.8482 7.39344 12.8341C7.33859 12.8201 7.28853 12.7915 7.24849 12.7515C7.20845 12.7115 7.17991 12.6614 7.16586 12.6066C7.15181 12.5517 7.15276 12.4941 7.16861 12.4397L7.69924 10.6249C7.75896 10.4215 7.86888 10.2364 8.01888 10.0866L13.7124 4.39249Z",strokeLinecap:"square"})});import{jsx as Sb}from"react/jsx-runtime";import"react";var Rf=()=>Sb("svg",{"aria-hidden":"true",className:"graphic link icon icon--link",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:Sb("path",{className:"stroke",d:"M7.99999 13.3333H6.66666C5.78261 13.3333 4.93476 12.9821 4.30964 12.357C3.68452 11.7319 3.33333 10.884 3.33333 9.99999C3.33333 9.11593 3.68452 8.26809 4.30964 7.64297C4.93476 7.01785 5.78261 6.66666 6.66666 6.66666H7.99999M12 6.66666H13.3333C14.2174 6.66666 15.0652 7.01785 15.6904 7.64297C16.3155 8.26809 16.6667 9.11593 16.6667 9.99999C16.6667 10.884 16.3155 11.7319 15.6904 12.357C15.0652 12.9821 14.2174 13.3333 13.3333 13.3333H12M7.33333 9.99999H12.6667",strokeLinecap:"square"})});import{jsx as Ab}from"react/jsx-runtime";import"react";var Zo=()=>Ab("svg",{className:"icon icon--plus",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:Ab("path",{className:"stroke",d:"M5.33333 9.99998H14.6667M9.99999 5.33331V14.6666",strokeLinecap:"square"})});import{jsx as Eb}from"react/jsx-runtime";import"react";var Df=()=>Eb("svg",{className:"icon icon--swap",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:Eb("path",{className:"stroke",d:"M7.33334 4L4.66667 6.66667M4.66667 6.66667L7.33334 9.33333M4.66667 6.66667H15.3333M12.6667 16L15.3333 13.3333M15.3333 13.3333L12.6667 10.6667M15.3333 13.3333H4.66667",strokeLinecap:"square"})});import{jsx as rs,jsxs as Nf}from"react/jsx-runtime";var at={};K1(at,{Button:()=>Pf,ButtonGroup:()=>Ff});import{jsx as au}from"react/jsx-runtime";import _b from"next/link.js";import"react";var w4=_b.default||_b,Aa="popup-button-list",Ff=({buttonSize:t="default",children:e,className:o,textAlign:n="left"})=>{let r=[Aa,o,`${Aa}__text-align--${n}`,`${Aa}__button-size--${t}`].filter(Boolean).join(" ");return au("div",{className:r,children:e})},Pf=({id:t,active:e,children:o,className:n,href:r,onClick:s})=>{let i=[`${Aa}__button`,e&&`${Aa}__button--selected`,n].filter(Boolean).join(" ");return r?au(w4,{className:i,href:r,id:t,onClick:l=>{s&&s(l)},prefetch:!1,children:o}):s?au("button",{className:i,id:t,onClick:l=>{s&&s(l)},type:"button",children:o}):au("div",{className:i,id:t,children:o})};var bn={};K1(bn,{WindowInfo:()=>Fb,WindowInfoContext:()=>ni,WindowInfoProvider:()=>Nb,useWindowInfo:()=>ao,withWindowInfo:()=>kb});import{useContext as A4}from"react";import{createContext as I4}from"react";var S4=I4({}),ni=S4;var E4=()=>A4(ni),ao=E4;import Rb,{Fragment as Db}from"react";var _4=t=>{let{children:e}=t,o=ao();return e?typeof e=="function"?Rb.createElement(Db,null,e(o)):Rb.createElement(Db,null,e):null},Fb=_4;import R4,{useCallback as Pb,useEffect as Tb,useReducer as D4,useRef as F4}from"react";var P4=(t,e)=>{let{payload:{breakpoints:o,animationRef:n}}=e;n.current=null;let{eventsFired:r}=t,{documentElement:{style:s,clientWidth:i,clientHeight:l}}=document,{innerWidth:a,innerHeight:c}=window,u=`${i/100}px`,m=`${l/100}px`,f=o?Object.keys(o).reduce((h,p)=>Object.assign(Object.assign({},h),{[p]:window.matchMedia(o[p]).matches}),{}):{},d={width:a,height:c,"--vw":u,"--vh":m,breakpoints:f,eventsFired:r+1};return s.setProperty("--vw",u),s.setProperty("--vh",m),d},T4=t=>{let{breakpoints:e,children:o}=t,n=F4(null),[r,s]=D4(P4,{width:void 0,height:void 0,"--vw":"","--vh":"",breakpoints:{},eventsFired:0}),i=Pb(()=>{n.current&&cancelAnimationFrame(n.current),n.current=requestAnimationFrame(()=>s({type:"UPDATE",payload:{breakpoints:e,animationRef:n}}))},[e]),l=Pb(()=>{setTimeout(()=>{i()},500)},[i]);return Tb(()=>(window.addEventListener("resize",i),window.addEventListener("orientationchange",l),()=>{window.removeEventListener("resize",i),window.removeEventListener("orientationchange",l)}),[i,l]),Tb(()=>{r.eventsFired===0&&s({type:"UPDATE",payload:{breakpoints:e,animationRef:n}})},[e,r]),R4.createElement(ni.Provider,{value:Object.assign({},r)},o&&o)},Nb=T4;import N4 from"react";var k4=t=>o=>{let n=ao();return N4.createElement(t,Object.assign({},o,{windowInfo:n}))},kb=k4;import{useCallback as jb,useEffect as cu,useRef as B4,useState as kf}from"react";import{c as L4}from"react/compiler-runtime";import{useEffect as O4,useRef as j4,useState as Lb}from"react";var Gr=(t,e)=>{let o=L4(14),n;o[0]!==t?(n=t===void 0?{}:t,o[0]=t,o[1]=n):n=o[1];let{root:r,rootMargin:s,threshold:i}=n,l=r===void 0?null:r,a=s===void 0?"0px":s,c=i===void 0?0:i,[u,m]=Lb(),[f,d]=Lb(null),h;o[2]!==e||o[3]!==l||o[4]!==a||o[5]!==c?(h=typeof window<"u"&&"IntersectionObserver"in window&&!e?new window.IntersectionObserver(C=>{let[x]=C;return m(x)},{root:l,rootMargin:a,threshold:c}):null,o[2]=e,o[3]=l,o[4]=a,o[5]=c,o[6]=h):h=o[6];let p=j4(h),g,b;o[7]!==e||o[8]!==f?(g=()=>{if(e)return;let{current:C}=p;return C.disconnect(),f&&C.observe(f),()=>C.disconnect()},b=[f,e],o[7]=e,o[8]=f,o[9]=g,o[10]=b):(g=o[9],b=o[10]),O4(g,b);let v;return o[11]!==u||o[12]!==f?(v=[d,u,f],o[11]=u,o[12]=f,o[13]=v):v=o[13],v};import{jsx as Ob}from"react/jsx-runtime";import"react";var lu="popup-button",Tf=t=>{let{active:e,button:o,buttonType:n,className:r,disabled:s,noBackground:i,setActive:l,size:a}=t,c=[lu,r,`${lu}--${n}`,!i&&`${lu}--background`,a&&`${lu}--size-${a}`].filter(Boolean).join(" "),u=()=>{l(!e)};return n==="none"?null:n==="custom"?Ob("div",{className:c,onClick:u,onKeyDown:m=>{m.key==="Enter"&&u()},role:"button",tabIndex:0,children:o}):Ob("button",{className:c,disabled:s,onClick:u,onKeyDown:m=>{m.key==="Enter"&&u()},tabIndex:0,type:"button",children:o})};var wo="popup",Lo=t=>{let{boundingRef:e,button:o,buttonClassName:n,buttonSize:r,buttonType:s="default",caret:i=!0,children:l,className:a,disabled:c,forceOpen:u,horizontalAlign:m="left",initActive:f=!1,noBackground:d,onToggleOpen:h,render:p,showOnHover:g=!1,showScrollbar:b=!1,size:v="medium",verticalAlign:C="top"}=t,{height:x,width:y}=ao(),[A,S]=Gr({root:e?.current||null,rootMargin:"-100px 0px 0px 0px",threshold:1}),_=B4(null),[E,R]=kf(f),[D,w]=kf(C),[I,F]=kf(m),P=jb(({horizontal:j=!1,vertical:T=!1})=>{if(_.current){let O=_.current.getBoundingClientRect(),{bottom:M,left:B,right:$,top:W}=O,H=100,X=document.documentElement.clientWidth,G=document.documentElement.clientHeight,z=0;e?.current&&({bottom:G,left:z,right:X,top:H}=e.current.getBoundingClientRect()),j&&($>X&&B>z?F("right"):B<z&&$<X&&F("left")),T&&(W<H&&M<G?w("bottom"):M>G&&W>H&&w("top"))}},[e]),k=jb(j=>{_.current.contains(j.target)||R(!1)},[_]);cu(()=>{P({horizontal:!0})},[S,P,y]),cu(()=>{P({vertical:!0})},[S,P,x]),cu(()=>(typeof h=="function"&&h(E),E?document.addEventListener("mousedown",k):document.removeEventListener("mousedown",k),()=>{document.removeEventListener("mousedown",k)}),[E,k,h]),cu(()=>{R(u)},[u]);let N=[wo,a,`${wo}--size-${v}`,r&&`${wo}--button-size-${r}`,`${wo}--v-align-${D}`,`${wo}--h-align-${I}`,E&&`${wo}--active`,b&&`${wo}--show-scrollbar`].filter(Boolean).join(" ");return Nf("div",{className:N,children:[rs("div",{className:`${wo}__trigger-wrap`,children:g?rs("div",{className:`${wo}__on-hover-watch`,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),children:rs(Tf,{active:E,button:o,buttonType:s,className:n,disabled:c,noBackground:d,setActive:R,size:r})}):rs(Tf,{active:E,button:o,buttonType:s,className:n,disabled:c,noBackground:d,setActive:R,size:r})}),Nf("div",{className:`${wo}__content`,ref:_,children:[rs("div",{className:`${wo}__hide-scrollbar`,ref:A,children:rs("div",{className:`${wo}__scroll-container`,children:Nf("div",{className:`${wo}__scroll-content`,children:[p&&p({close:()=>R(!1)}),l&&l]})})}),i&&rs("div",{className:`${wo}__caret`})]})]})};import{c as $4}from"react/compiler-runtime";import{jsx as uu,jsxs as M4}from"react/jsx-runtime";import Lf,{useEffect as Bb}from"react";var Wt=t=>{let e=$4(26),{alignCaret:o,boundingRef:n,children:r,className:s,delay:i,position:l,show:a,staticPositioning:c}=t,u=o===void 0?"center":o,m=i===void 0?350:i,f=a===void 0?!0:a,d=c===void 0?!1:c,[h,p]=Lf.useState(f),[g,b]=Lf.useState("top"),v=V4,C=n?.current||null,x;e[0]!==C?(x={root:C,rootMargin:"-145px 0px 0px 100px",threshold:0},e[0]=C,e[1]=x):x=e[1];let[y,A]=Gr(x,d),S,_;e[2]!==m||e[3]!==f?(S=()=>{let w;return m&&f?w=setTimeout(()=>{p(f)},m):p(f),()=>{w&&clearTimeout(w)}},_=[f,m],e[2]=m,e[3]=f,e[4]=S,e[5]=_):(S=e[4],_=e[5]),Bb(S,_);let E;e[6]!==A?.isIntersecting||e[7]!==d?(E=()=>{d||b(A?.isIntersecting?"top":"bottom")},e[6]=A?.isIntersecting,e[7]=d,e[8]=E):E=e[8];let R;e[9]!==A||e[10]!==d?(R=[A,d],e[9]=A,e[10]=d,e[11]=R):R=e[11],Bb(E,R);let D;if(e[12]!==u||e[13]!==r||e[14]!==s||e[15]!==g||e[16]!==l||e[17]!==y||e[18]!==h||e[19]!==d){let w=h&&"tooltip--show",I=`tooltip--caret-${u}`,F=`tooltip--position-${l||g}`,P;e[21]!==s||e[22]!==w||e[23]!==I||e[24]!==F?(P=["tooltip",s,w,I,F].filter(Boolean),e[21]=s,e[22]=w,e[23]=I,e[24]=F,e[25]=P):P=e[25],D=M4(Lf.Fragment,{children:[!d&&uu("aside",{"aria-hidden":"true",className:["tooltip",s,`tooltip--caret-${u}`,"tooltip--position-top"].filter(Boolean).join(" "),ref:y,style:{opacity:"0"},children:uu("div",{className:"tooltip-content",children:r})}),uu("aside",{className:P.join(" "),title:v(r),children:uu("div",{className:"tooltip-content",children:r})})]}),e[12]=u,e[13]=r,e[14]=s,e[15]=g,e[16]=l,e[17]=y,e[18]=h,e[19]=d,e[20]=D}else D=e[20];return D};function V4(t){return typeof t=="string"?t:""}var X4={chevron:Qe,edit:ko,link:Rf,plus:Zo,swap:Df,x:xt},Ut="btn",Of=({children:t,icon:e,showTooltip:o,tooltip:n})=>{let r=X4[e];return du(H4,{children:[n&&dr(Wt,{className:`${Ut}__tooltip`,show:o,children:n}),du("span",{className:`${Ut}__content`,children:[t&&dr("span",{className:`${Ut}__label`,children:t}),e&&du("span",{className:`${Ut}__icon`,children:[z4(e)&&e,r&&dr(r,{})]})]})]})},U=W4((t,e)=>{let{id:o,type:n="button","aria-label":r,buttonStyle:s="primary",children:i,className:l,disabled:a,el:c="button",icon:u,iconPosition:m="right",iconStyle:f="without-border",Link:d,newTab:h,onClick:p,onMouseDown:g,round:b,size:v="medium",SubMenuPopupContent:C,to:x,tooltip:y,url:A}=t,[S,_]=G4.useState(!1),E=[Ut,l&&l,u&&`${Ut}--icon`,f&&`${Ut}--icon-style-${f}`,u&&!i&&`${Ut}--icon-only`,v&&`${Ut}--size-${v}`,u&&m&&`${Ut}--icon-position-${m}`,y&&`${Ut}--has-tooltip`,!C&&`${Ut}--withoutPopup`].filter(Boolean).join(" ");function R(P){_(!1),n!=="submit"&&p&&P.preventDefault(),p&&p(P)}let D=[s&&`${Ut}--style-${s}`,a&&`${Ut}--disabled`,b&&`${Ut}--round`,C?`${Ut}--withPopup`:`${Ut}--withoutPopup`].filter(Boolean).join(" "),w={id:o,type:n,"aria-disabled":a,"aria-label":r,className:C?E:[E,D].join(" "),disabled:a,onClick:a?void 0:R,onMouseDown:a?void 0:g,onPointerEnter:y?()=>_(!0):void 0,onPointerLeave:y?()=>_(!1):void 0,rel:h?"noopener noreferrer":void 0,target:h?"_blank":void 0},I,F;switch(c){case"anchor":I=dr("a",{...w,href:a?void 0:A,ref:e,children:dr(Of,{icon:u,showTooltip:S,tooltip:y,children:i})});break;case"link":if(!d)return console.error('Link is required when using el="link"',i),null;let P=d;a?P="div":F=!1,I=dr(P,{...w,href:x||A,prefetch:F,to:x||A,children:dr(Of,{icon:u,showTooltip:S,tooltip:y,children:i})});break;default:I=dr(c,{ref:e,type:"submit",...w,children:dr(Of,{icon:u,showTooltip:S,tooltip:y,children:i})});break}return C?du("div",{className:D,children:[I,dr(Lo,{button:dr(Qe,{}),buttonSize:v,className:a?`${Ut}--popup-disabled`:"",horizontalAlign:"right",noBackground:!0,render:({close:P})=>C({close:()=>P()}),size:"large",verticalAlign:"bottom"})]}):I});import{c as wE}from"react/compiler-runtime";import{jsx as IE}from"react/jsx-runtime";import{Fragment as SE}from"react";import{c as yE}from"react/compiler-runtime";import Hb,{useMemo as fu,useRef as $f,useEffect as pu,useState as eE,useContext as tE}from"react";import{useDndContext as oE,getClientRect as rE,useDroppable as nE,useDraggable as sE,closestCorners as iE,getFirstCollision as aE,getScrollableAncestors as lE,KeyboardCode as vn}from"@dnd-kit/core";import{useMemo as $b,useLayoutEffect as Y4,useEffect as U4,useRef as fV,useCallback as pV}from"react";function Mb(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return $b(()=>n=>{e.forEach(r=>r(n))},e)}var Z4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function J4(t){let e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function Q4(t){return"nodeType"in t}function q4(t){var e,o;return t?J4(t)?t:Q4(t)&&(e=(o=t.ownerDocument)==null?void 0:o.defaultView)!=null?e:window:window}var Bf=Z4?Y4:U4;var jf={};function Vb(t,e){return $b(()=>{if(e)return e;let o=jf[t]==null?0:jf[t]+1;return jf[t]=o,t+"-"+o},[t,e])}function K4(t){return function(e){for(var o=arguments.length,n=new Array(o>1?o-1:0),r=1;r<o;r++)n[r-1]=arguments[r];return n.reduce((s,i)=>{let l=Object.entries(i);for(let[a,c]of l){let u=s[a];u!=null&&(s[a]=u+t*c)}return s},{...e})}}var Gb=K4(-1);function Wb(t){if(!t)return!1;let{KeyboardEvent:e}=q4(t.target);return e&&t instanceof e}var Ea=Object.freeze({Translate:{toString(t){if(!t)return;let{x:e,y:o}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(o?Math.round(o):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;let{scaleX:e,scaleY:o}=t;return"scaleX("+e+") scaleY("+o+")"}},Transform:{toString(t){if(t)return[Ea.Translate.toString(t),Ea.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:o,easing:n}=t;return e+" "+o+"ms "+n}}});function gu(t,e,o){let n=t.slice();return n.splice(o<0?n.length+o:o,0,n.splice(e,1)[0]),n}function cE(t,e){return t.reduce((o,n,r)=>{let s=e.get(n);return s&&(o[r]=s),o},Array(t.length))}function mu(t){return t!==null&&t>=0}function uE(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(t[o]!==e[o])return!1;return!0}function dE(t){return typeof t=="boolean"?{draggable:t,droppable:t}:t}var zb=t=>{let{rects:e,activeIndex:o,overIndex:n,index:r}=t,s=gu(e,n,o),i=e[r],l=s[r];return!l||!i?null:{x:l.left-i.left,y:l.top-i.top,scaleX:l.width/i.width,scaleY:l.height/i.height}};var Xb="Sortable",Yb=Hb.createContext({activeIndex:-1,containerId:Xb,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:zb,disabled:{draggable:!1,droppable:!1}});function Ub(t){let{children:e,id:o,items:n,strategy:r=zb,disabled:s=!1}=t,{active:i,dragOverlay:l,droppableRects:a,over:c,measureDroppableContainers:u}=oE(),m=Vb(Xb,o),f=l.rect!==null,d=fu(()=>n.map(A=>typeof A=="object"&&"id"in A?A.id:A),[n]),h=i!=null,p=i?d.indexOf(i.id):-1,g=c?d.indexOf(c.id):-1,b=$f(d),v=!uE(d,b.current),C=g!==-1&&p===-1||v,x=dE(s);Bf(()=>{v&&h&&u(d)},[v,d,h,u]),pu(()=>{b.current=d},[d]);let y=fu(()=>({activeIndex:p,containerId:m,disabled:x,disableTransforms:C,items:d,overIndex:g,useDragOverlay:f,sortedRects:cE(d,a),strategy:r}),[p,m,x.draggable,x.droppable,C,d,g,a,f,r]);return Hb.createElement(Yb.Provider,{value:y},e)}var mE=t=>{let{id:e,items:o,activeIndex:n,overIndex:r}=t;return gu(o,n,r).indexOf(e)},fE=t=>{let{containerId:e,isSorting:o,wasDragging:n,index:r,items:s,newIndex:i,previousItems:l,previousContainerId:a,transition:c}=t;return!c||!n||l!==s&&r===i?!1:o?!0:i!==r&&e===a},pE={duration:200,easing:"ease"},Zb="transform",hE=Ea.Transition.toString({property:Zb,duration:0,easing:"linear"}),gE={roleDescription:"sortable"};function bE(t){let{disabled:e,index:o,node:n,rect:r}=t,[s,i]=eE(null),l=$f(o);return Bf(()=>{if(!e&&o!==l.current&&n.current){let a=r.current;if(a){let c=rE(n.current,{ignoreTransform:!0}),u={x:a.left-c.left,y:a.top-c.top,scaleX:a.width/c.width,scaleY:a.height/c.height};(u.x||u.y)&&i(u)}}o!==l.current&&(l.current=o)},[e,o,n,r]),pu(()=>{s&&i(null)},[s]),s}function Jb(t){let{animateLayoutChanges:e=fE,attributes:o,disabled:n,data:r,getNewIndex:s=mE,id:i,strategy:l,resizeObserverConfig:a,transition:c=pE}=t,{items:u,containerId:m,activeIndex:f,disabled:d,disableTransforms:h,sortedRects:p,overIndex:g,useDragOverlay:b,strategy:v}=tE(Yb),C=vE(n,d),x=u.indexOf(i),y=fu(()=>({sortable:{containerId:m,index:x,items:u},...r}),[m,r,x,u]),A=fu(()=>u.slice(u.indexOf(i)),[u,i]),{rect:S,node:_,isOver:E,setNodeRef:R}=nE({id:i,data:y,disabled:C.droppable,resizeObserverConfig:{updateMeasurementsFor:A,...a}}),{active:D,activatorEvent:w,activeNodeRect:I,attributes:F,setNodeRef:P,listeners:k,isDragging:N,over:j,setActivatorNodeRef:T,transform:O}=sE({id:i,data:y,attributes:{...gE,...o},disabled:C.draggable}),M=Mb(R,P),B=!!D,$=B&&!h&&mu(f)&&mu(g),W=!b&&N,H=W&&$?O:null,G=$?H??(l??v)({rects:p,activeNodeRect:I,activeIndex:f,overIndex:g,index:x}):null,z=mu(f)&&mu(g)?s({id:i,items:u,activeIndex:f,overIndex:g}):x,Z=D?.id,V=$f({activeId:Z,items:u,newIndex:z,containerId:m}),re=u!==V.current.items,ee=e({active:D,containerId:m,isDragging:N,isSorting:B,id:i,index:x,items:u,newIndex:V.current.newIndex,previousItems:V.current.items,previousContainerId:V.current.containerId,transition:c,wasDragging:V.current.activeId!=null}),te=bE({disabled:!ee,index:x,node:_,rect:S});return pu(()=>{B&&V.current.newIndex!==z&&(V.current.newIndex=z),m!==V.current.containerId&&(V.current.containerId=m),u!==V.current.items&&(V.current.items=u)},[B,z,m,u]),pu(()=>{if(Z===V.current.activeId)return;if(Z&&!V.current.activeId){V.current.activeId=Z;return}let xe=setTimeout(()=>{V.current.activeId=Z},50);return()=>clearTimeout(xe)},[Z]),{active:D,activeIndex:f,attributes:F,data:y,rect:S,index:x,newIndex:z,items:u,isOver:E,isSorting:B,isDragging:N,listeners:k,node:_,overIndex:g,over:j,setNodeRef:M,setActivatorNodeRef:T,setDroppableNodeRef:R,setDraggableNodeRef:P,transform:te??G,transition:Q()};function Q(){if(te||re&&V.current.newIndex===x)return hE;if(!(W&&!Wb(w)||!c)&&(B||ee))return Ea.Transition.toString({...c,property:Zb})}}function vE(t,e){var o,n;return typeof t=="boolean"?{draggable:t,droppable:!1}:{draggable:(o=t?.draggable)!=null?o:e.draggable,droppable:(n=t?.droppable)!=null?n:e.droppable}}function hu(t){if(!t)return!1;let e=t.data.current;return!!(e&&"sortable"in e&&typeof e.sortable=="object"&&"containerId"in e.sortable&&"items"in e.sortable&&"index"in e.sortable)}var xE=[vn.Down,vn.Right,vn.Up,vn.Left],Qb=(t,e)=>{let{context:{active:o,collisionRect:n,droppableRects:r,droppableContainers:s,over:i,scrollableAncestors:l}}=e;if(xE.includes(t.code)){if(t.preventDefault(),!o||!n)return;let a=[];s.getEnabled().forEach(m=>{if(!m||m!=null&&m.disabled)return;let f=r.get(m.id);if(f)switch(t.code){case vn.Down:n.top<f.top&&a.push(m);break;case vn.Up:n.top>f.top&&a.push(m);break;case vn.Left:n.left>f.left&&a.push(m);break;case vn.Right:n.left<f.left&&a.push(m);break}});let c=iE({active:o,collisionRect:n,droppableRects:r,droppableContainers:a,pointerCoordinates:null}),u=aE(c,"id");if(u===i?.id&&c.length>1&&(u=c[1].id),u!=null){let m=s.get(o.id),f=s.get(u),d=f?r.get(f.id):null,h=f?.node.current;if(h&&d&&m&&f){let g=lE(h).some((A,S)=>l[S]!==A),b=qb(m,f),v=CE(m,f),C=g||!b?{x:0,y:0}:{x:v?n.width-d.width:0,y:v?n.height-d.height:0},x={x:d.left,y:d.top};return C.x&&C.y?x:Gb(x,C)}}}};function qb(t,e){return!hu(t)||!hu(e)?!1:t.data.current.sortable.containerId===e.data.current.sortable.containerId}function CE(t,e){return!hu(t)||!hu(e)||!qb(t,e)?!1:t.data.current.sortable.index<e.data.current.sortable.index}var si=t=>{let e=yE(17),{id:o,disabled:n}=t,r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={duration:250,easing:"cubic-bezier(0, 0.2, 0.2, 1)"},e[0]=r):r=e[0];let s;e[1]!==n||e[2]!==o?(s={id:o,disabled:n,transition:r},e[1]=n,e[2]=o,e[3]=s):s=e[3];let{attributes:i,isDragging:l,listeners:a,setNodeRef:c,transform:u,transition:m}=Jb(s),f=l?"grabbing":"grab",d;e[4]!==f||e[5]!==m?(d={cursor:f,transition:m},e[4]=f,e[5]=m,e[6]=d):d=e[6];let h;e[7]!==i||e[8]!==d?(h={...i,style:d},e[7]=i,e[8]=d,e[9]=h):h=e[9];let p=u&&`translate3d(${u.x}px, ${u.y}px, 0)`,g;return e[10]!==l||e[11]!==a||e[12]!==c||e[13]!==h||e[14]!==p||e[15]!==m?(g={attributes:h,isDragging:l,listeners:a,setNodeRef:c,transform:p,transition:m},e[10]=l,e[11]=a,e[12]=c,e[13]=h,e[14]=p,e[15]=m,e[16]=g):g=e[16],g};var xn=t=>{let e=wE(12),{id:o,children:n,disabled:r}=t,s;e[0]!==r||e[1]!==o?(s={id:o,disabled:r},e[0]=r,e[1]=o,e[2]=s):s=e[2];let{attributes:i,isDragging:l,listeners:a,setNodeRef:c,transform:u,transition:m}=si(s),f=l?"grabbing":"grab",d;return e[3]!==i||e[4]!==n||e[5]!==l||e[6]!==a||e[7]!==c||e[8]!==f||e[9]!==u||e[10]!==m?(d=IE(SE,{children:n({attributes:{...i,style:{cursor:f}},isDragging:l,listeners:a,setNodeRef:c,transform:u,transition:m})}),e[3]=i,e[4]=n,e[5]=l,e[6]=a,e[7]=c,e[8]=f,e[9]=u,e[10]=m,e[11]=d):d=e[11],d};import{c as AE}from"react/compiler-runtime";import{jsx as Mf}from"react/jsx-runtime";import{closestCenter as EE,DndContext as _E,KeyboardSensor as RE,PointerSensor as DE,useDroppable as FE,useSensor as Kb,useSensors as PE}from"@dnd-kit/core";import{useId as TE}from"react";var Rr=t=>{let e=AE(15),{children:o,className:n,ids:r,onDragEnd:s}=t,i=TE(),l;e[0]!==i?(l={id:i},e[0]=i,e[1]=l):l=e[1];let{setNodeRef:a}=FE(l),c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c={activationConstraint:{distance:5}},e[2]=c):c=e[2];let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u={coordinateGetter:Qb},e[3]=u):u=e[3];let m=PE(Kb(DE,c),Kb(RE,u)),f;e[4]!==r||e[5]!==s?(f=p=>{let{active:g,over:b}=p;p.activatorEvent.stopPropagation(),!(!g||!b)&&typeof s=="function"&&s({event:p,moveFromIndex:r.findIndex(v=>v===g.id),moveToIndex:r.findIndex(v=>v===b.id)})},e[4]=r,e[5]=s,e[6]=f):f=e[6];let d=f,h;return e[7]!==o||e[8]!==n||e[9]!==d||e[10]!==i||e[11]!==r||e[12]!==m||e[13]!==a?(h=Mf(_E,{collisionDetection:EE,id:i,onDragEnd:d,sensors:m,children:Mf(Ub,{items:r,children:Mf("div",{className:n,ref:a,children:o})})}),e[7]=o,e[8]=n,e[9]=d,e[10]=i,e[11]=r,e[12]=m,e[13]=a,e[14]=h):h=e[14],h};import{jsx as ev,jsxs as NE}from"react/jsx-runtime";import"react";var bu="error-pill",Zt=t=>{let{className:e,count:o,i18n:n,withMessage:r}=t,s=!r&&o<99,i=[bu,s&&`${bu}--fixed-width`,e&&e].filter(Boolean).join(" ");return o===0?null:ev("div",{className:i,children:NE("div",{className:`${bu}__content`,children:[ev("span",{className:`${bu}__count`,children:o}),r&&` ${o>1?n.t("general:errors"):n.t("general:error")}`]})})};import{c as kE}from"react/compiler-runtime";import{jsx as LE}from"react/jsx-runtime";import{getTranslation as OE}from"@payloadcms/translations";import"react";var tv="field-description",Me=t=>{let e=kE(8),{className:o,description:n,marginPlacement:r,path:s}=t,{i18n:i}=L();if(n){let l=`field-description-${s?.replace(/\./g,"__")}`,a=r&&`${tv}--margin-${r}`,c;e[0]!==o||e[1]!==l||e[2]!==a?(c=[tv,o,l,a].filter(Boolean),e[0]=o,e[1]=l,e[2]=a,e[3]=c):c=e[3];let u=c.join(" "),m;return e[4]!==n||e[5]!==i||e[6]!==u?(m=LE("div",{className:u,children:OE(n,i)}),e[4]=n,e[5]=i,e[6]=u,e[7]=m):m=e[7],m}return null};import{c as jE}from"react/compiler-runtime";import{jsx as BE}from"react/jsx-runtime";import"react";var $E="field-error",Xe=t=>{let e=jE(7),{alignCaret:o,message:n,path:r,showError:s}=t,i=o===void 0?"right":o,l=Lt(),a;e[0]!==r?(a=p=>{let[g]=p;return g&&g?.[r]||null},e[0]=r,e[1]=a):a=e[1];let c=Yt(a),u;e[2]!==c?(u=c||{},e[2]=c,e[3]=u):u=e[3];let{errorMessage:m,valid:f}=u,d=n||m;if((s||l&&f===!1)&&d?.length){let p;return e[4]!==i||e[5]!==d?(p=BE(Wt,{alignCaret:i,className:$E,delay:0,staticPositioning:!0,children:d}),e[4]=i,e[5]=d,e[6]=p):p=e[6],p}return null};import{c as cR}from"react/compiler-runtime";import{jsx as uR,jsxs as Vv}from"react/jsx-runtime";import{getTranslation as dR}from"@payloadcms/translations";import"react";import{c as ME}from"react/compiler-runtime";import{jsx as VE}from"react/jsx-runtime";import{createContext as GE,useContext as WE}from"react";var ov=GE(0),_a=t=>{let e=ME(3),{children:o}=t,r=Ze()+1,s;return e[0]!==o||e[1]!==r?(s=VE(ov.Provider,{value:r,children:o}),e[0]=o,e[1]=r,e[2]=s):s=e[2],s},Ze=()=>WE(ov);import{jsx as oR}from"react/jsx-runtime";import{useSearchParams as rR}from"next/navigation.js";import nR,{createContext as sR,useContext as iR,useEffect as aR,useState as lR}from"react";var vu=(t,e)=>!t?.locales||t.locales.length===0?null:t.locales.find(o=>o?.code===e);import{jsx as Y_}from"react/jsx-runtime";import{jsx as Zf}from"react/jsx-runtime";import{useRef as fv,useEffect as is,useState as Jf}from"react";import r_ from"react-dom";function Ce(){return Ce=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var n in o)({}).hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t},Ce.apply(null,arguments)}function ii(t,e){if(t==null)return{};var o={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;o[n]=t[n]}return o}function ai(t,e){return ai=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,n){return o.__proto__=n,o},ai(t,e)}function xu(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,ai(t,e)}function Vf(t,e){return t.classList?!!e&&t.classList.contains(e):(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")!==-1}function Gf(t,e){t.classList?t.classList.add(e):Vf(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}function rv(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Wf(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=rv(t.className,e):t.setAttribute("class",rv(t.className&&t.className.baseVal||"",e))}import sv from"react";import yu from"react";import wu from"react-dom";var Hf={disabled:!1};import HE from"react";var zf=HE.createContext(null);var Cu=function(e){return e.scrollTop};var Ra="unmounted",ns="exited",ss="entering",ci="entered",Xf="exiting",Wr=function(t){xu(e,t);function e(n,r){var s;s=t.call(this,n,r)||this;var i=r,l=i&&!i.isMounting?n.enter:n.appear,a;return s.appearStatus=null,n.in?l?(a=ns,s.appearStatus=ss):a=ci:n.unmountOnExit||n.mountOnEnter?a=Ra:a=ns,s.state={status:a},s.nextCallback=null,s}e.getDerivedStateFromProps=function(r,s){var i=r.in;return i&&s.status===Ra?{status:ns}:null};var o=e.prototype;return o.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},o.componentDidUpdate=function(r){var s=null;if(r!==this.props){var i=this.state.status;this.props.in?i!==ss&&i!==ci&&(s=ss):(i===ss||i===ci)&&(s=Xf)}this.updateStatus(!1,s)},o.componentWillUnmount=function(){this.cancelNextCallback()},o.getTimeouts=function(){var r=this.props.timeout,s,i,l;return s=i=l=r,r!=null&&typeof r!="number"&&(s=r.exit,i=r.enter,l=r.appear!==void 0?r.appear:i),{exit:s,enter:i,appear:l}},o.updateStatus=function(r,s){if(r===void 0&&(r=!1),s!==null)if(this.cancelNextCallback(),s===ss){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:wu.findDOMNode(this);i&&Cu(i)}this.performEnter(r)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ns&&this.setState({status:Ra})},o.performEnter=function(r){var s=this,i=this.props.enter,l=this.context?this.context.isMounting:r,a=this.props.nodeRef?[l]:[wu.findDOMNode(this),l],c=a[0],u=a[1],m=this.getTimeouts(),f=l?m.appear:m.enter;if(!r&&!i||Hf.disabled){this.safeSetState({status:ci},function(){s.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:ss},function(){s.props.onEntering(c,u),s.onTransitionEnd(f,function(){s.safeSetState({status:ci},function(){s.props.onEntered(c,u)})})})},o.performExit=function(){var r=this,s=this.props.exit,i=this.getTimeouts(),l=this.props.nodeRef?void 0:wu.findDOMNode(this);if(!s||Hf.disabled){this.safeSetState({status:ns},function(){r.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:Xf},function(){r.props.onExiting(l),r.onTransitionEnd(i.exit,function(){r.safeSetState({status:ns},function(){r.props.onExited(l)})})})},o.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},o.safeSetState=function(r,s){s=this.setNextCallback(s),this.setState(r,s)},o.setNextCallback=function(r){var s=this,i=!0;return this.nextCallback=function(l){i&&(i=!1,s.nextCallback=null,r(l))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},o.onTransitionEnd=function(r,s){this.setNextCallback(s);var i=this.props.nodeRef?this.props.nodeRef.current:wu.findDOMNode(this),l=r==null&&!this.props.addEndListener;if(!i||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],c=a[0],u=a[1];this.props.addEndListener(c,u)}r!=null&&setTimeout(this.nextCallback,r)},o.render=function(){var r=this.state.status;if(r===Ra)return null;var s=this.props,i=s.children,l=s.in,a=s.mountOnEnter,c=s.unmountOnExit,u=s.appear,m=s.enter,f=s.exit,d=s.timeout,h=s.addEndListener,p=s.onEnter,g=s.onEntering,b=s.onEntered,v=s.onExit,C=s.onExiting,x=s.onExited,y=s.nodeRef,A=ii(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return yu.createElement(zf.Provider,{value:null},typeof i=="function"?i(r,A):yu.cloneElement(yu.Children.only(i),A))},e}(yu.Component);Wr.contextType=zf;Wr.propTypes={};function li(){}Wr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:li,onEntering:li,onEntered:li,onExit:li,onExiting:li,onExited:li};Wr.UNMOUNTED=Ra;Wr.EXITED=ns;Wr.ENTERING=ss;Wr.ENTERED=ci;Wr.EXITING=Xf;var nv=Wr;var zE=function(e,o){return e&&o&&o.split(" ").forEach(function(n){return Gf(e,n)})},Yf=function(e,o){return e&&o&&o.split(" ").forEach(function(n){return Wf(e,n)})},Uf=function(t){xu(e,t);function e(){for(var n,r=arguments.length,s=new Array(r),i=0;i<r;i++)s[i]=arguments[i];return n=t.call.apply(t,[this].concat(s))||this,n.appliedClasses={appear:{},enter:{},exit:{}},n.onEnter=function(l,a){var c=n.resolveArguments(l,a),u=c[0],m=c[1];n.removeClasses(u,"exit"),n.addClass(u,m?"appear":"enter","base"),n.props.onEnter&&n.props.onEnter(l,a)},n.onEntering=function(l,a){var c=n.resolveArguments(l,a),u=c[0],m=c[1],f=m?"appear":"enter";n.addClass(u,f,"active"),n.props.onEntering&&n.props.onEntering(l,a)},n.onEntered=function(l,a){var c=n.resolveArguments(l,a),u=c[0],m=c[1],f=m?"appear":"enter";n.removeClasses(u,f),n.addClass(u,f,"done"),n.props.onEntered&&n.props.onEntered(l,a)},n.onExit=function(l){var a=n.resolveArguments(l),c=a[0];n.removeClasses(c,"appear"),n.removeClasses(c,"enter"),n.addClass(c,"exit","base"),n.props.onExit&&n.props.onExit(l)},n.onExiting=function(l){var a=n.resolveArguments(l),c=a[0];n.addClass(c,"exit","active"),n.props.onExiting&&n.props.onExiting(l)},n.onExited=function(l){var a=n.resolveArguments(l),c=a[0];n.removeClasses(c,"exit"),n.addClass(c,"exit","done"),n.props.onExited&&n.props.onExited(l)},n.resolveArguments=function(l,a){return n.props.nodeRef?[n.props.nodeRef.current,l]:[l,a]},n.getClassNames=function(l){var a=n.props.classNames,c=typeof a=="string",u=c&&a?a+"-":"",m=c?""+u+l:a[l],f=c?m+"-active":a[l+"Active"],d=c?m+"-done":a[l+"Done"];return{baseClassName:m,activeClassName:f,doneClassName:d}},n}var o=e.prototype;return o.addClass=function(r,s,i){var l=this.getClassNames(s)[i+"ClassName"],a=this.getClassNames("enter"),c=a.doneClassName;s==="appear"&&i==="done"&&c&&(l+=" "+c),i==="active"&&r&&Cu(r),l&&(this.appliedClasses[s][i]=l,zE(r,l))},o.removeClasses=function(r,s){var i=this.appliedClasses[s],l=i.base,a=i.active,c=i.done;this.appliedClasses[s]={},l&&Yf(r,l),a&&Yf(r,a),c&&Yf(r,c)},o.render=function(){var r=this.props,s=r.classNames,i=ii(r,["classNames"]);return sv.createElement(nv,Ce({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(sv.Component);Uf.defaultProps={classNames:""};Uf.propTypes={};var Da=Uf;function iv(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}import{useContext as YE}from"react";import{createContext as XE}from"react";var Iu=XE({});var ae=()=>YE(Iu);var Su=t=>t?{appear:`${t}--appear`,appearActive:`${t}--appearActive`,appearDone:`${t}--appearDone`,enter:`${t}--enter`,enterActive:`${t}--enterActive`,enterDone:`${t}--enterDone`,exit:`${t}--exit`,exitActive:`${t}--exitActive`,exitDone:`${t}--exitDone`}:{};JA();function av(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),o.push.apply(o,n)}return o}function lv(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?av(Object(o),!0).forEach(function(n){UE(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):av(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function UE(t,e,o){return e=JE(e),e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function ZE(t,e){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function JE(t){var e=ZE(t,"string");return typeof e=="symbol"?e:String(e)}var cv={activateTrap:function(e,o){if(e.length>0){var n=e[e.length-1];n!==o&&n.pause()}var r=e.indexOf(o);r===-1||e.splice(r,1),e.push(o)},deactivateTrap:function(e,o){var n=e.indexOf(o);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},QE=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},qE=function(e){return e?.key==="Escape"||e?.key==="Esc"||e?.keyCode===27},Pa=function(e){return e?.key==="Tab"||e?.keyCode===9},KE=function(e){return Pa(e)&&!e.shiftKey},e_=function(e){return Pa(e)&&e.shiftKey},uv=function(e){return setTimeout(e,0)},dv=function(e,o){var n=-1;return e.every(function(r,s){return o(r)?(n=s,!1):!0}),n},Fa=function(e){for(var o=arguments.length,n=new Array(o>1?o-1:0),r=1;r<o;r++)n[r-1]=arguments[r];return typeof e=="function"?e.apply(void 0,n):e},Au=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},t_=[],mv=function(e,o){var n=o?.document||document,r=o?.trapStack||t_,s=lv({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:KE,isKeyBackward:e_},o),i={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},l,a=function(w,I,F){return w&&w[I]!==void 0?w[I]:s[F||I]},c=function(w,I){var F=typeof I?.composedPath=="function"?I.composedPath():void 0;return i.containerGroups.findIndex(function(P){var k=P.container,N=P.tabbableNodes;return k.contains(w)||F?.includes(k)||N.find(function(j){return j===w})})},u=function(w){var I=s[w];if(typeof I=="function"){for(var F=arguments.length,P=new Array(F>1?F-1:0),k=1;k<F;k++)P[k-1]=arguments[k];I=I.apply(void 0,P)}if(I===!0&&(I=void 0),!I){if(I===void 0||I===!1)return I;throw new Error("`".concat(w,"` was specified but was not a node, or did not return a node"))}var N=I;if(typeof I=="string"&&(N=n.querySelector(I),!N))throw new Error("`".concat(w,"` as selector refers to no known node"));return N},m=function(){var w=u("initialFocus");if(w===!1)return!1;if(w===void 0||!Uc(w,s.tabbableOptions))if(c(n.activeElement)>=0)w=n.activeElement;else{var I=i.tabbableGroups[0],F=I&&I.firstTabbableNode;w=F||u("fallbackFocus")}if(!w)throw new Error("Your focus-trap needs to have at least one focusable element");return w},f=function(){if(i.containerGroups=i.containers.map(function(w){var I=eb(w,s.tabbableOptions),F=tb(w,s.tabbableOptions),P=I.length>0?I[0]:void 0,k=I.length>0?I[I.length-1]:void 0,N=F.find(function(O){return qn(O)}),j=F.slice().reverse().find(function(O){return qn(O)}),T=!!I.find(function(O){return ei(O)>0});return{container:w,tabbableNodes:I,focusableNodes:F,posTabIndexesFound:T,firstTabbableNode:P,lastTabbableNode:k,firstDomTabbableNode:N,lastDomTabbableNode:j,nextTabbableNode:function(M){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,$=I.indexOf(M);return $<0?B?F.slice(F.indexOf(M)+1).find(function(W){return qn(W)}):F.slice(0,F.indexOf(M)).reverse().find(function(W){return qn(W)}):I[$+(B?1:-1)]}}}),i.tabbableGroups=i.containerGroups.filter(function(w){return w.tabbableNodes.length>0}),i.tabbableGroups.length<=0&&!u("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(i.containerGroups.find(function(w){return w.posTabIndexesFound})&&i.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},d=function D(w){var I=w.activeElement;if(I)return I.shadowRoot&&I.shadowRoot.activeElement!==null?D(I.shadowRoot):I},h=function D(w){if(w!==!1&&w!==d(document)){if(!w||!w.focus){D(m());return}w.focus({preventScroll:!!s.preventScroll}),i.mostRecentlyFocusedNode=w,QE(w)&&w.select()}},p=function(w){var I=u("setReturnFocus",w);return I||(I===!1?!1:w)},g=function(w){var I=w.target,F=w.event,P=w.isBackward,k=P===void 0?!1:P;I=I||Au(F),f();var N=null;if(i.tabbableGroups.length>0){var j=c(I,F),T=j>=0?i.containerGroups[j]:void 0;if(j<0)k?N=i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:N=i.tabbableGroups[0].firstTabbableNode;else if(k){var O=dv(i.tabbableGroups,function(X){var G=X.firstTabbableNode;return I===G});if(O<0&&(T.container===I||Uc(I,s.tabbableOptions)&&!qn(I,s.tabbableOptions)&&!T.nextTabbableNode(I,!1))&&(O=j),O>=0){var M=O===0?i.tabbableGroups.length-1:O-1,B=i.tabbableGroups[M];N=ei(I)>=0?B.lastTabbableNode:B.lastDomTabbableNode}else Pa(F)||(N=T.nextTabbableNode(I,!1))}else{var $=dv(i.tabbableGroups,function(X){var G=X.lastTabbableNode;return I===G});if($<0&&(T.container===I||Uc(I,s.tabbableOptions)&&!qn(I,s.tabbableOptions)&&!T.nextTabbableNode(I))&&($=j),$>=0){var W=$===i.tabbableGroups.length-1?0:$+1,H=i.tabbableGroups[W];N=ei(I)>=0?H.firstTabbableNode:H.firstDomTabbableNode}else Pa(F)||(N=T.nextTabbableNode(I))}}else N=u("fallbackFocus");return N},b=function(w){var I=Au(w);if(!(c(I,w)>=0)){if(Fa(s.clickOutsideDeactivates,w)){l.deactivate({returnFocus:s.returnFocusOnDeactivate});return}Fa(s.allowOutsideClick,w)||w.preventDefault()}},v=function(w){var I=Au(w),F=c(I,w)>=0;if(F||I instanceof Document)F&&(i.mostRecentlyFocusedNode=I);else{w.stopImmediatePropagation();var P,k=!0;if(i.mostRecentlyFocusedNode)if(ei(i.mostRecentlyFocusedNode)>0){var N=c(i.mostRecentlyFocusedNode),j=i.containerGroups[N].tabbableNodes;if(j.length>0){var T=j.findIndex(function(O){return O===i.mostRecentlyFocusedNode});T>=0&&(s.isKeyForward(i.recentNavEvent)?T+1<j.length&&(P=j[T+1],k=!1):T-1>=0&&(P=j[T-1],k=!1))}}else i.containerGroups.some(function(O){return O.tabbableNodes.some(function(M){return ei(M)>0})})||(k=!1);else k=!1;k&&(P=g({target:i.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(i.recentNavEvent)})),h(P||i.mostRecentlyFocusedNode||m())}i.recentNavEvent=void 0},C=function(w){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;i.recentNavEvent=w;var F=g({event:w,isBackward:I});F&&(Pa(w)&&w.preventDefault(),h(F))},x=function(w){if(qE(w)&&Fa(s.escapeDeactivates,w)!==!1){w.preventDefault(),l.deactivate();return}(s.isKeyForward(w)||s.isKeyBackward(w))&&C(w,s.isKeyBackward(w))},y=function(w){var I=Au(w);c(I,w)>=0||Fa(s.clickOutsideDeactivates,w)||Fa(s.allowOutsideClick,w)||(w.preventDefault(),w.stopImmediatePropagation())},A=function(){if(i.active)return cv.activateTrap(r,l),i.delayInitialFocusTimer=s.delayInitialFocus?uv(function(){h(m())}):h(m()),n.addEventListener("focusin",v,!0),n.addEventListener("mousedown",b,{capture:!0,passive:!1}),n.addEventListener("touchstart",b,{capture:!0,passive:!1}),n.addEventListener("click",y,{capture:!0,passive:!1}),n.addEventListener("keydown",x,{capture:!0,passive:!1}),l},S=function(){if(i.active)return n.removeEventListener("focusin",v,!0),n.removeEventListener("mousedown",b,!0),n.removeEventListener("touchstart",b,!0),n.removeEventListener("click",y,!0),n.removeEventListener("keydown",x,!0),l},_=function(w){var I=w.some(function(F){var P=Array.from(F.removedNodes);return P.some(function(k){return k===i.mostRecentlyFocusedNode})});I&&h(m())},E=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(_):void 0,R=function(){E&&(E.disconnect(),i.active&&!i.paused&&i.containers.map(function(w){E.observe(w,{subtree:!0,childList:!0})}))};return l={get active(){return i.active},get paused(){return i.paused},activate:function(w){if(i.active)return this;var I=a(w,"onActivate"),F=a(w,"onPostActivate"),P=a(w,"checkCanFocusTrap");P||f(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=n.activeElement,I?.();var k=function(){P&&f(),A(),R(),F?.()};return P?(P(i.containers.concat()).then(k,k),this):(k(),this)},deactivate:function(w){if(!i.active)return this;var I=lv({onDeactivate:s.onDeactivate,onPostDeactivate:s.onPostDeactivate,checkCanReturnFocus:s.checkCanReturnFocus},w);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,S(),i.active=!1,i.paused=!1,R(),cv.deactivateTrap(r,l);var F=a(I,"onDeactivate"),P=a(I,"onPostDeactivate"),k=a(I,"checkCanReturnFocus"),N=a(I,"returnFocus","returnFocusOnDeactivate");F?.();var j=function(){uv(function(){N&&h(p(i.nodeFocusedBeforeActivation)),P?.()})};return N&&k?(k(p(i.nodeFocusedBeforeActivation)).then(j,j),this):(j(),this)},pause:function(w){if(i.paused||!i.active)return this;var I=a(w,"onPause"),F=a(w,"onPostPause");return i.paused=!0,I?.(),S(),R(),F?.(),this},unpause:function(w){if(!i.paused||!i.active)return this;var I=a(w,"onUnpause"),F=a(w,"onPostUnpause");return i.paused=!1,I?.(),f(),A(),R(),F?.(),this},updateContainerElements:function(w){var I=[].concat(w).filter(Boolean);return i.containers=I.map(function(F){return typeof F=="string"?n.querySelector(F):F}),i.active&&f(),R(),this}},l.updateContainerElements(e),l};var o_=function(t,e){var o={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(o[n[r]]=t[n[r]]);return o},Hr="modal-item",pv=(t,e)=>n=>{let r=ae(),s=fv(null),[i,l]=Jf(!1),a=fv(!1),[c,u]=Jf(null),{modalState:m,classPrefix:f,containerRef:d,transTime:h,setCloseOnBlur:p,setBodyScrollLock:g,openModal:b}=r,{className:v,htmlElement:C="dialog",slug:x="",closeOnBlur:y=!0,lockBodyScroll:A=!0,classPrefix:S,onEnter:_,onEntering:E,onEntered:R,onExit:D,onExiting:w,onExited:I,openOnInit:F,trapFocus:P=!0,focusTrapOptions:k={}}=n,N=o_(n,["className","htmlElement","slug","closeOnBlur","lockBodyScroll","classPrefix","onEnter","onEntering","onEntered","onExit","onExiting","onExited","openOnInit","trapFocus","focusTrapOptions"]),j=S||f,T=e||x,O=m[T]&&m[T].isOpen;is(()=>{if(P){let $=s.current;if(a.current===!1&&$){let W=mv($,Object.assign(Object.assign({},k),{fallbackFocus:k?.fallbackFocus||$,allowOutsideClick:typeof k.allowOutsideClick<"u"?k.allowOutsideClick:!0}));u(W),a.current=!0}}},[P,i,k]),is(()=>{l(!0)},[]),is(()=>(c&&(O?c.activate():c.deactivate()),()=>{c&&c.deactivate()}),[O,c]),is(()=>{O&&p(y)},[O,y,p]),is(()=>{let $=s.current;return $&&g(!!(O&&A),$),()=>{$&&g(!1,$)}},[O,A,g]);let[M,B]=Jf(O);if(is(()=>{O?B(O):setTimeout(()=>B(!1),h)},[O,h]),is(()=>{F&&b(T)},[T,F,b]),d.current){let $=j?`${j}__${Hr}`:Hr,W=[$,`${$}--slug-${T}`,v].filter(Boolean).join(" "),H=Object.assign({role:C!=="dialog"?"dialog":void 0,open:C==="dialog"?M||O:void 0,"aria-modal":!0,"aria-label":N["aria-labelledby"]?void 0:T},N);return r_.createPortal(Zf(Da,{nodeRef:s,timeout:h,in:O,classNames:Su($),appear:!0,onEnter:_,onEntering:E,onEntered:R,onExit:D,onExiting:w,onExited:I,children:Zf(C,Object.assign({ref:s,id:N?.id||T,className:W},H,{children:Zf(t,Object.assign({},n,{isOpen:O,modal:r}))}))}),d.current)}return null};import{jsx as hv}from"react/jsx-runtime";import{Fragment as gv}from"react";var n_=t=>{let{children:e}=t;return e?typeof e=="function"?hv(gv,{children:e(t)}):hv(gv,{children:e}):null},lt=pv(n_);import{jsx as bv}from"react/jsx-runtime";var s_=function(t,e){var o={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(o[n[r]]=t[n[r]]);return o},zr="modal-container",Qf=t=>{let{oneModalIsOpen:e,classPrefix:o,transTime:n,setContainerRef:r,containerRef:s,closeAllModals:i,closeOnBlur:l}=ae(),{className:a,htmlElement:c="div",children:u,onClick:m}=t,f=s_(t,["className","htmlElement","children","onClick"]),d=o?`${o}__${zr}`:zr,h=[d,a].filter(Boolean).join(" "),p=Object.assign(Object.assign({},f),{onClick:g=>{l&&i(),typeof m=="function"&&m(g)}});return bv(Da,{nodeRef:s,in:e,timeout:n,classNames:Su(d),appear:!0,children:bv(c,Object.assign({className:h,ref:r},p,{children:u&&u}))})};import{jsx as Sv,jsxs as d_}from"react/jsx-runtime";import{Fragment as m_,useState as Du,useRef as Av,useEffect as Fu,useCallback as Cn,useReducer as f_}from"react";function i_(t){if(Array.isArray(t)){for(var e=0,o=Array(t.length);e<t.length;e++)o[e]=t[e];return o}else return Array.from(t)}var Eu=!1;typeof window<"u"&&(qf={get passive(){Eu=!0}},window.addEventListener("testPassive",null,qf),window.removeEventListener("testPassive",null,qf));var qf,ui=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),Xr=[],di=!1,Kf=-1,Ta=void 0,as=void 0,Na=void 0,vv=function(e){return Xr.some(function(o){return!!(o.options.allowTouchMove&&o.options.allowTouchMove(e))})},ka=function(e){var o=e||window.event;return vv(o.target)||o.touches.length>1?!0:(o.preventDefault&&o.preventDefault(),!1)},a_=function(e){if(Na===void 0){var o=!!e&&e.reserveScrollBarGap===!0,n=window.innerWidth-document.documentElement.clientWidth;if(o&&n>0){var r=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"),10);Na=document.body.style.paddingRight,document.body.style.paddingRight=r+n+"px"}}Ta===void 0&&(Ta=document.body.style.overflow,document.body.style.overflow="hidden")},xv=function(){Na!==void 0&&(document.body.style.paddingRight=Na,Na=void 0),Ta!==void 0&&(document.body.style.overflow=Ta,Ta=void 0)},l_=function(){return window.requestAnimationFrame(function(){if(as===void 0){as={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left};var e=window,o=e.scrollY,n=e.scrollX,r=e.innerHeight;document.body.style.position="fixed",document.body.style.top=-o,document.body.style.left=-n,setTimeout(function(){return window.requestAnimationFrame(function(){var s=r-window.innerHeight;s&&o>=r&&(document.body.style.top=-(o+s))})},300)}})},Cv=function(){if(as!==void 0){var e=-parseInt(document.body.style.top,10),o=-parseInt(document.body.style.left,10);document.body.style.position=as.position,document.body.style.top=as.top,document.body.style.left=as.left,window.scrollTo(o,e),as=void 0}},c_=function(e){return e?e.scrollHeight-e.scrollTop<=e.clientHeight:!1},u_=function(e,o){var n=e.targetTouches[0].clientY-Kf;return vv(e.target)?!1:o&&o.scrollTop===0&&n>0||c_(o)&&n<0?ka(e):(e.stopPropagation(),!0)},_u=function(e,o){if(!e){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!Xr.some(function(r){return r.targetElement===e})){var n={targetElement:e,options:o||{}};Xr=[].concat(i_(Xr),[n]),ui?l_():a_(o),ui&&(e.ontouchstart=function(r){r.targetTouches.length===1&&(Kf=r.targetTouches[0].clientY)},e.ontouchmove=function(r){r.targetTouches.length===1&&u_(r,e)},di||(document.addEventListener("touchmove",ka,Eu?{passive:!1}:void 0),di=!0))}},yv=function(){ui&&(Xr.forEach(function(e){e.targetElement.ontouchstart=null,e.targetElement.ontouchmove=null}),di&&(document.removeEventListener("touchmove",ka,Eu?{passive:!1}:void 0),di=!1),Kf=-1),ui?Cv():xv(),Xr=[]},Ru=function(e){if(!e){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}Xr=Xr.filter(function(o){return o.targetElement!==e}),ui&&(e.ontouchstart=null,e.ontouchmove=null,di&&Xr.length===0&&(document.removeEventListener("touchmove",ka,Eu?{passive:!1}:void 0),di=!1)),ui?Cv():xv()};var wv=({classPrefix:t,zIndex:e})=>{let o=t?`${t}__`:"";return`
|
|
13
|
+
import{a as mf,b as Y,c as ff,d as so,e as QA,f as qA,g as pf,h as KA,i as e4}from"./chunk-CKHKQPOO.js";import{a as xt,b as xa,c as df,d as L,e as ei,f as eb,g as tb,h as qn,i as Uc,j as JA,k as ob,l as t4,m as o4,n as r4}from"./chunk-KZPVHMBR.js";import{c as cr,d as K1,e as Ks}from"./chunk-5LKBKI4T.js";var mb=cr(ht=>{"use strict";function vf(t,e){var o=t.length;t.push(e);e:for(;0<o;){var n=o-1>>>1,r=t[n];if(0<Zc(r,e))t[n]=e,t[o]=r,o=n;else break e}}function ur(t){return t.length===0?null:t[0]}function Qc(t){if(t.length===0)return null;var e=t[0],o=t.pop();if(o!==e){t[0]=o;e:for(var n=0,r=t.length,s=r>>>1;n<s;){var i=2*(n+1)-1,l=t[i],a=i+1,c=t[a];if(0>Zc(l,o))a<r&&0>Zc(c,l)?(t[n]=c,t[a]=o,n=a):(t[n]=l,t[i]=o,n=i);else if(a<r&&0>Zc(c,o))t[n]=c,t[a]=o,n=a;else break e}}return e}function Zc(t,e){var o=t.sortIndex-e.sortIndex;return o!==0?o:t.id-e.id}ht.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(rb=performance,ht.unstable_now=function(){return rb.now()}):(hf=Date,nb=hf.now(),ht.unstable_now=function(){return hf.now()-nb});var rb,hf,nb,_r=[],gn=[],n4=1,Yo=null,io=3,qc=!1,Kn=!1,ya=!1,ab=typeof setTimeout=="function"?setTimeout:null,lb=typeof clearTimeout=="function"?clearTimeout:null,sb=typeof setImmediate<"u"?setImmediate:null;function Jc(t){for(var e=ur(gn);e!==null;){if(e.callback===null)Qc(gn);else if(e.startTime<=t)Qc(gn),e.sortIndex=e.expirationTime,vf(_r,e);else break;e=ur(gn)}}function xf(t){if(ya=!1,Jc(t),!Kn)if(ur(_r)!==null)Kn=!0,Cf();else{var e=ur(gn);e!==null&&yf(xf,e.startTime-t)}}var Kc=!1,wa=-1,cb=5,ub=-1;function db(){return!(ht.unstable_now()-ub<cb)}function gf(){if(Kc){var t=ht.unstable_now();ub=t;var e=!0;try{e:{Kn=!1,ya&&(ya=!1,lb(wa),wa=-1),qc=!0;var o=io;try{t:{for(Jc(t),Yo=ur(_r);Yo!==null&&!(Yo.expirationTime>t&&db());){var n=Yo.callback;if(typeof n=="function"){Yo.callback=null,io=Yo.priorityLevel;var r=n(Yo.expirationTime<=t);if(t=ht.unstable_now(),typeof r=="function"){Yo.callback=r,Jc(t),e=!0;break t}Yo===ur(_r)&&Qc(_r),Jc(t)}else Qc(_r);Yo=ur(_r)}if(Yo!==null)e=!0;else{var s=ur(gn);s!==null&&yf(xf,s.startTime-t),e=!1}}break e}finally{Yo=null,io=o,qc=!1}e=void 0}}finally{e?Ca():Kc=!1}}}var Ca;typeof sb=="function"?Ca=function(){sb(gf)}:typeof MessageChannel<"u"?(bf=new MessageChannel,ib=bf.port2,bf.port1.onmessage=gf,Ca=function(){ib.postMessage(null)}):Ca=function(){ab(gf,0)};var bf,ib;function Cf(){Kc||(Kc=!0,Ca())}function yf(t,e){wa=ab(function(){t(ht.unstable_now())},e)}ht.unstable_IdlePriority=5;ht.unstable_ImmediatePriority=1;ht.unstable_LowPriority=4;ht.unstable_NormalPriority=3;ht.unstable_Profiling=null;ht.unstable_UserBlockingPriority=2;ht.unstable_cancelCallback=function(t){t.callback=null};ht.unstable_continueExecution=function(){Kn||qc||(Kn=!0,Cf())};ht.unstable_forceFrameRate=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):cb=0<t?Math.floor(1e3/t):5};ht.unstable_getCurrentPriorityLevel=function(){return io};ht.unstable_getFirstCallbackNode=function(){return ur(_r)};ht.unstable_next=function(t){switch(io){case 1:case 2:case 3:var e=3;break;default:e=io}var o=io;io=e;try{return t()}finally{io=o}};ht.unstable_pauseExecution=function(){};ht.unstable_requestPaint=function(){};ht.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var o=io;io=t;try{return e()}finally{io=o}};ht.unstable_scheduleCallback=function(t,e,o){var n=ht.unstable_now();switch(typeof o=="object"&&o!==null?(o=o.delay,o=typeof o=="number"&&0<o?n+o:n):o=n,t){case 1:var r=-1;break;case 2:r=250;break;case 5:r=1073741823;break;case 4:r=1e4;break;default:r=5e3}return r=o+r,t={id:n4++,callback:e,priorityLevel:t,startTime:o,expirationTime:r,sortIndex:-1},o>n?(t.sortIndex=o,vf(gn,t),ur(_r)===null&&t===ur(gn)&&(ya?(lb(wa),wa=-1):ya=!0,yf(xf,o-n))):(t.sortIndex=r,vf(_r,t),Kn||qc||(Kn=!0,Cf())),t};ht.unstable_shouldYield=db;ht.unstable_wrapCallback=function(t){var e=io;return function(){var o=io;io=e;try{return t.apply(this,arguments)}finally{io=o}}}});var pb=cr((R7,fb)=>{"use strict";fb.exports=mb()});var cy=cr(ut=>{"use strict";var qt=typeof Symbol=="function"&&Symbol.for,dh=qt?Symbol.for("react.element"):60103,mh=qt?Symbol.for("react.portal"):60106,_d=qt?Symbol.for("react.fragment"):60107,Rd=qt?Symbol.for("react.strict_mode"):60108,Dd=qt?Symbol.for("react.profiler"):60114,Fd=qt?Symbol.for("react.provider"):60109,Pd=qt?Symbol.for("react.context"):60110,fh=qt?Symbol.for("react.async_mode"):60111,Td=qt?Symbol.for("react.concurrent_mode"):60111,Nd=qt?Symbol.for("react.forward_ref"):60112,kd=qt?Symbol.for("react.suspense"):60113,$6=qt?Symbol.for("react.suspense_list"):60120,Ld=qt?Symbol.for("react.memo"):60115,Od=qt?Symbol.for("react.lazy"):60116,M6=qt?Symbol.for("react.block"):60121,V6=qt?Symbol.for("react.fundamental"):60117,G6=qt?Symbol.for("react.responder"):60118,W6=qt?Symbol.for("react.scope"):60119;function $o(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case dh:switch(t=t.type,t){case fh:case Td:case _d:case Dd:case Rd:case kd:return t;default:switch(t=t&&t.$$typeof,t){case Pd:case Nd:case Od:case Ld:case Fd:return t;default:return e}}case mh:return e}}}function ly(t){return $o(t)===Td}ut.AsyncMode=fh;ut.ConcurrentMode=Td;ut.ContextConsumer=Pd;ut.ContextProvider=Fd;ut.Element=dh;ut.ForwardRef=Nd;ut.Fragment=_d;ut.Lazy=Od;ut.Memo=Ld;ut.Portal=mh;ut.Profiler=Dd;ut.StrictMode=Rd;ut.Suspense=kd;ut.isAsyncMode=function(t){return ly(t)||$o(t)===fh};ut.isConcurrentMode=ly;ut.isContextConsumer=function(t){return $o(t)===Pd};ut.isContextProvider=function(t){return $o(t)===Fd};ut.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===dh};ut.isForwardRef=function(t){return $o(t)===Nd};ut.isFragment=function(t){return $o(t)===_d};ut.isLazy=function(t){return $o(t)===Od};ut.isMemo=function(t){return $o(t)===Ld};ut.isPortal=function(t){return $o(t)===mh};ut.isProfiler=function(t){return $o(t)===Dd};ut.isStrictMode=function(t){return $o(t)===Rd};ut.isSuspense=function(t){return $o(t)===kd};ut.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===_d||t===Td||t===Dd||t===Rd||t===kd||t===$6||typeof t=="object"&&t!==null&&(t.$$typeof===Od||t.$$typeof===Ld||t.$$typeof===Fd||t.$$typeof===Pd||t.$$typeof===Nd||t.$$typeof===V6||t.$$typeof===G6||t.$$typeof===W6||t.$$typeof===M6)};ut.typeOf=$o});var dy=cr((gae,uy)=>{"use strict";uy.exports=cy()});var vy=cr((bae,by)=>{"use strict";var ph=dy(),H6={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},z6={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},X6={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},hy={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},hh={};hh[ph.ForwardRef]=X6;hh[ph.Memo]=hy;function my(t){return ph.isMemo(t)?hy:hh[t.$$typeof]||H6}var Y6=Object.defineProperty,U6=Object.getOwnPropertyNames,fy=Object.getOwnPropertySymbols,Z6=Object.getOwnPropertyDescriptor,J6=Object.getPrototypeOf,py=Object.prototype;function gy(t,e,o){if(typeof e!="string"){if(py){var n=J6(e);n&&n!==py&&gy(t,n,o)}var r=U6(e);fy&&(r=r.concat(fy(e)));for(var s=my(t),i=my(e),l=0;l<r.length;++l){var a=r[l];if(!z6[a]&&!(o&&o[a])&&!(i&&i[a])&&!(s&&s[a])){var c=Z6(e,a);try{Y6(t,a,c)}catch{}}}}return t}by.exports=gy});var Qw=cr((dhe,Jw)=>{var cg=Math.floor(Math.random()*16777215),zw=mt.index=parseInt(Math.random()*16777215,10),Xw=(typeof process>"u"||typeof process.pid!="number"?Math.floor(Math.random()*1e5):process.pid)%65535,Yw=(()=>{try{return _Buffer}catch{try{return Buffer}catch{return null}}})(),sm=function(t){return!!(t!=null&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t))},Zw=[];for(_o=0;_o<256;_o++)Zw[_o]=(_o<=15?"0":"")+_o.toString(16);var _o,Uw=new RegExp("^[0-9a-fA-F]{24}$"),Zl=[];_o=0;for(;_o<10;)Zl[48+_o]=_o++;for(;_o<16;)Zl[55+_o]=Zl[87+_o]=_o++;function mt(t){if(!(this instanceof mt))return new mt(t);if(t&&(t instanceof mt||t._bsontype==="ObjectID"))return t;if(this._bsontype="ObjectID",t==null||typeof t=="number"){this.id=this.generate(t);return}var e=mt.isValid(t);if(!e&&t!=null)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");if(e&&typeof t=="string"&&t.length===24)return mt.createFromHexString(t);if(t!=null&&t.length===12)this.id=t;else{if(t!=null&&typeof t.toHexString=="function")return t;throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters")}}Jw.exports=mt;mt.default=mt;mt.createFromTime=function(t){return t=parseInt(t,10)%4294967295,new mt($N(8,t)+"0000000000000000")};mt.createFromHexString=function(t){if(typeof t>"u"||t!=null&&t.length!==24)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");for(var e="",o=0;o<24;)e+=String.fromCharCode(Zl[t.charCodeAt(o++)]<<4|Zl[t.charCodeAt(o++)]);return new mt(e)};mt.isValid=function(t){return t==null?!1:typeof t=="number"?!0:typeof t=="string"?t.length===12||t.length===24&&Uw.test(t):t instanceof mt?!0:sm(t)?mt.isValid(t.toString("hex")):typeof t.toHexString=="function"&&Yw&&(t.id instanceof Yw||typeof t.id=="string")?t.id.length===12||t.id.length===24&&Uw.test(t.id):!1};mt.prototype={constructor:mt,toHexString:function(){if(!this.id||!this.id.length)throw new Error("invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is ["+JSON.stringify(this.id)+"]");if(this.id.length===24)return this.id;if(sm(this.id))return this.id.toString("hex");for(var t="",e=0;e<this.id.length;e++)t+=Zw[this.id.charCodeAt(e)];return t},equals:function(t){return t instanceof mt?this.toString()===t.toString():typeof t=="string"&&mt.isValid(t)&&t.length===12&&sm(this.id)?t===this.id.toString("binary"):typeof t=="string"&&mt.isValid(t)&&t.length===24?t.toLowerCase()===this.toHexString():typeof t=="string"&&mt.isValid(t)&&t.length===12?t===this.id:t!=null&&(t instanceof mt||t.toHexString)?t.toHexString()===this.toHexString():!1},getTimestamp:function(){var t=new Date,e;return sm(this.id)?e=this.id[3]|this.id[2]<<8|this.id[1]<<16|this.id[0]<<24:e=this.id.charCodeAt(3)|this.id.charCodeAt(2)<<8|this.id.charCodeAt(1)<<16|this.id.charCodeAt(0)<<24,t.setTime(Math.floor(e)*1e3),t},generate:function(t){typeof t!="number"&&(t=~~(Date.now()/1e3)),t=parseInt(t,10)%4294967295;var e=BN();return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,t&255,cg>>16&255,cg>>8&255,cg&255,Xw>>8&255,Xw&255,e>>16&255,e>>8&255,e&255)}};function BN(){return zw=(zw+1)%16777215}function $N(t,e){return e=e.toString(16),e.length===t?e:"00000000".substring(e.length,t)+e}var MN=Symbol&&Symbol.for&&Symbol.for("nodejs.util.inspect.custom")||"inspect";mt.prototype[MN]=function(){return"ObjectID("+this+")"};mt.prototype.toJSON=mt.prototype.toHexString;mt.prototype.toString=mt.prototype.toHexString});var fg=cr((vhe,t3)=>{function mg(t){return t===void 0}function HN(t){return t===null}function zN(t){return typeof t=="boolean"}function im(t){return t===Object(t)}function Kw(t){return Array.isArray(t)}function XN(t){return t instanceof Date}function e3(t,e){return e?im(t)&&!mg(t.uri):im(t)&&typeof t.size=="number"&&typeof t.type=="string"&&typeof t.slice=="function"}function YN(t,e){return e3(t,e)&&typeof t.name=="string"&&(im(t.lastModifiedDate)||typeof t.lastModified=="number")}function Bs(t){return mg(t)?!1:t}function dg(t,e,o,n){e=e||{},o=o||new FormData,e.indices=Bs(e.indices),e.nullsAsUndefineds=Bs(e.nullsAsUndefineds),e.booleansAsIntegers=Bs(e.booleansAsIntegers),e.allowEmptyArrays=Bs(e.allowEmptyArrays),e.noAttributesWithArrayNotation=Bs(e.noAttributesWithArrayNotation),e.noFilesWithArrayNotation=Bs(e.noFilesWithArrayNotation),e.dotsForObjectNotation=Bs(e.dotsForObjectNotation);let r=typeof o.getParts=="function";return mg(t)||(HN(t)?e.nullsAsUndefineds||o.append(n,""):zN(t)?e.booleansAsIntegers?o.append(n,t?1:0):o.append(n,t):Kw(t)?t.length?t.forEach((s,i)=>{let l=n+"["+(e.indices?i:"")+"]";(e.noAttributesWithArrayNotation||e.noFilesWithArrayNotation&&YN(s,r))&&(l=n),dg(s,e,o,l)}):e.allowEmptyArrays&&o.append(e.noAttributesWithArrayNotation?n:n+"[]",""):XN(t)?o.append(n,t.toISOString()):im(t)&&!e3(t,r)?Object.keys(t).forEach(s=>{let i=t[s];if(Kw(i))for(;s.length>2&&s.lastIndexOf("[]")===s.length-2;)s=s.substring(0,s.length-2);let l=n?e.dotsForObjectNotation?n+"."+s:n+"["+s+"]":s;dg(i,e,o,l)}):o.append(n,t)),o}t3.exports={serialize:dg}});var CI=cr((Iwe,xI)=>{(function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e={rotl:function(o,n){return o<<n|o>>>32-n},rotr:function(o,n){return o<<32-n|o>>>n},endian:function(o){if(o.constructor==Number)return e.rotl(o,8)&16711935|e.rotl(o,24)&4278255360;for(var n=0;n<o.length;n++)o[n]=e.endian(o[n]);return o},randomBytes:function(o){for(var n=[];o>0;o--)n.push(Math.floor(Math.random()*256));return n},bytesToWords:function(o){for(var n=[],r=0,s=0;r<o.length;r++,s+=8)n[s>>>5]|=o[r]<<24-s%32;return n},wordsToBytes:function(o){for(var n=[],r=0;r<o.length*32;r+=8)n.push(o[r>>>5]>>>24-r%32&255);return n},bytesToHex:function(o){for(var n=[],r=0;r<o.length;r++)n.push((o[r]>>>4).toString(16)),n.push((o[r]&15).toString(16));return n.join("")},hexToBytes:function(o){for(var n=[],r=0;r<o.length;r+=2)n.push(parseInt(o.substr(r,2),16));return n},bytesToBase64:function(o){for(var n=[],r=0;r<o.length;r+=3)for(var s=o[r]<<16|o[r+1]<<8|o[r+2],i=0;i<4;i++)r*8+i*6<=o.length*8?n.push(t.charAt(s>>>6*(3-i)&63)):n.push("=");return n.join("")},base64ToBytes:function(o){o=o.replace(/[^A-Z0-9+\/]/ig,"");for(var n=[],r=0,s=0;r<o.length;s=++r%4)s!=0&&n.push((t.indexOf(o.charAt(r-1))&Math.pow(2,-2*s+8)-1)<<s*2|t.indexOf(o.charAt(r))>>>6-s*2);return n}};xI.exports=e})()});var zg=cr((Swe,yI)=>{var Hg={utf8:{stringToBytes:function(t){return Hg.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(Hg.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],o=0;o<t.length;o++)e.push(t.charCodeAt(o)&255);return e},bytesToString:function(t){for(var e=[],o=0;o<t.length;o++)e.push(String.fromCharCode(t[o]));return e.join("")}}};yI.exports=Hg});var SI=cr((Awe,II)=>{II.exports=function(t){return t!=null&&(wI(t)||kO(t)||!!t._isBuffer)};function wI(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function kO(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&wI(t.slice(0,0))}});var EI=cr((Ewe,AI)=>{(function(){var t=CI(),e=zg().utf8,o=SI(),n=zg().bin,r=function(s,i){s.constructor==String?i&&i.encoding==="binary"?s=n.stringToBytes(s):s=e.stringToBytes(s):o(s)?s=Array.prototype.slice.call(s,0):!Array.isArray(s)&&s.constructor!==Uint8Array&&(s=s.toString());for(var l=t.bytesToWords(s),a=s.length*8,c=1732584193,u=-271733879,m=-1732584194,f=271733878,d=0;d<l.length;d++)l[d]=(l[d]<<8|l[d]>>>24)&16711935|(l[d]<<24|l[d]>>>8)&4278255360;l[a>>>5]|=128<<a%32,l[(a+64>>>9<<4)+14]=a;for(var h=r._ff,p=r._gg,g=r._hh,b=r._ii,d=0;d<l.length;d+=16){var v=c,C=u,x=m,y=f;c=h(c,u,m,f,l[d+0],7,-680876936),f=h(f,c,u,m,l[d+1],12,-389564586),m=h(m,f,c,u,l[d+2],17,606105819),u=h(u,m,f,c,l[d+3],22,-1044525330),c=h(c,u,m,f,l[d+4],7,-176418897),f=h(f,c,u,m,l[d+5],12,1200080426),m=h(m,f,c,u,l[d+6],17,-1473231341),u=h(u,m,f,c,l[d+7],22,-45705983),c=h(c,u,m,f,l[d+8],7,1770035416),f=h(f,c,u,m,l[d+9],12,-1958414417),m=h(m,f,c,u,l[d+10],17,-42063),u=h(u,m,f,c,l[d+11],22,-1990404162),c=h(c,u,m,f,l[d+12],7,1804603682),f=h(f,c,u,m,l[d+13],12,-40341101),m=h(m,f,c,u,l[d+14],17,-1502002290),u=h(u,m,f,c,l[d+15],22,1236535329),c=p(c,u,m,f,l[d+1],5,-165796510),f=p(f,c,u,m,l[d+6],9,-1069501632),m=p(m,f,c,u,l[d+11],14,643717713),u=p(u,m,f,c,l[d+0],20,-373897302),c=p(c,u,m,f,l[d+5],5,-701558691),f=p(f,c,u,m,l[d+10],9,38016083),m=p(m,f,c,u,l[d+15],14,-660478335),u=p(u,m,f,c,l[d+4],20,-405537848),c=p(c,u,m,f,l[d+9],5,568446438),f=p(f,c,u,m,l[d+14],9,-1019803690),m=p(m,f,c,u,l[d+3],14,-187363961),u=p(u,m,f,c,l[d+8],20,1163531501),c=p(c,u,m,f,l[d+13],5,-1444681467),f=p(f,c,u,m,l[d+2],9,-51403784),m=p(m,f,c,u,l[d+7],14,1735328473),u=p(u,m,f,c,l[d+12],20,-1926607734),c=g(c,u,m,f,l[d+5],4,-378558),f=g(f,c,u,m,l[d+8],11,-2022574463),m=g(m,f,c,u,l[d+11],16,1839030562),u=g(u,m,f,c,l[d+14],23,-35309556),c=g(c,u,m,f,l[d+1],4,-1530992060),f=g(f,c,u,m,l[d+4],11,1272893353),m=g(m,f,c,u,l[d+7],16,-155497632),u=g(u,m,f,c,l[d+10],23,-1094730640),c=g(c,u,m,f,l[d+13],4,681279174),f=g(f,c,u,m,l[d+0],11,-358537222),m=g(m,f,c,u,l[d+3],16,-722521979),u=g(u,m,f,c,l[d+6],23,76029189),c=g(c,u,m,f,l[d+9],4,-640364487),f=g(f,c,u,m,l[d+12],11,-421815835),m=g(m,f,c,u,l[d+15],16,530742520),u=g(u,m,f,c,l[d+2],23,-995338651),c=b(c,u,m,f,l[d+0],6,-198630844),f=b(f,c,u,m,l[d+7],10,1126891415),m=b(m,f,c,u,l[d+14],15,-1416354905),u=b(u,m,f,c,l[d+5],21,-57434055),c=b(c,u,m,f,l[d+12],6,1700485571),f=b(f,c,u,m,l[d+3],10,-1894986606),m=b(m,f,c,u,l[d+10],15,-1051523),u=b(u,m,f,c,l[d+1],21,-2054922799),c=b(c,u,m,f,l[d+8],6,1873313359),f=b(f,c,u,m,l[d+15],10,-30611744),m=b(m,f,c,u,l[d+6],15,-1560198380),u=b(u,m,f,c,l[d+13],21,1309151649),c=b(c,u,m,f,l[d+4],6,-145523070),f=b(f,c,u,m,l[d+11],10,-1120210379),m=b(m,f,c,u,l[d+2],15,718787259),u=b(u,m,f,c,l[d+9],21,-343485551),c=c+v>>>0,u=u+C>>>0,m=m+x>>>0,f=f+y>>>0}return t.endian([c,u,m,f])};r._ff=function(s,i,l,a,c,u,m){var f=s+(i&l|~i&a)+(c>>>0)+m;return(f<<u|f>>>32-u)+i},r._gg=function(s,i,l,a,c,u,m){var f=s+(i&a|l&~a)+(c>>>0)+m;return(f<<u|f>>>32-u)+i},r._hh=function(s,i,l,a,c,u,m){var f=s+(i^l^a)+(c>>>0)+m;return(f<<u|f>>>32-u)+i},r._ii=function(s,i,l,a,c,u,m){var f=s+(l^(i|~a))+(c>>>0)+m;return(f<<u|f>>>32-u)+i},r._blocksize=16,r._digestsize=16,AI.exports=function(s,i){if(s==null)throw new Error("Illegal argument "+s);var l=t.wordsToBytes(r(s,i));return i&&i.asBytes?l:i&&i.asString?n.bytesToString(l):t.bytesToHex(l)}})()});import{jsx as Ef}from"react/jsx-runtime";import"react";function q({CustomComponent:t,Fallback:e}){return t!==void 0?t:e}import{jsx as b4}from"react/jsx-runtime";import vb from"react";import{createContext as ti,useContext as oi}from"react";var Ia=Ks(pb(),1);import{createElement as s4,createContext as i4,useContext as a4,useEffect as l4,useLayoutEffect as c4,useReducer as u4,useRef as wf,useState as d4}from"react";var eu=Symbol(),m4=Symbol(),f4=typeof window>"u"||/ServerSideRendering/.test(window.navigator&&window.navigator.userAgent),hb=f4?l4:c4,p4=Ia.unstable_runWithPriority?t=>{try{(0,Ia.unstable_runWithPriority)(Ia.unstable_NormalPriority,t)}catch(e){if(e.message==="Not implemented.")t();else throw e}}:t=>t(),h4=t=>({value:o,children:n})=>{let r=wf(o),s=wf(0),[i,l]=d4(null);i&&(i(o),l(null));let a=wf();if(!a.current){let c=new Set,u=(m,f)=>{s.current+=1;let d={n:s.current};f?.suspense&&(d.n*=-1,d.p=new Promise(h=>{l(()=>p=>{d.v=p,delete d.p,h(p)})})),c.forEach(h=>h(d)),m()};a.current={[eu]:{v:r,n:s,l:c,u}}}return hb(()=>{r.current=o,s.current+=1,p4(()=>{a.current[eu].l.forEach(c=>{c({n:s.current,v:o})})})},[o]),s4(t,{value:a.current},n)},g4=t=>t;function gb(t){let e=i4({[eu]:{v:{current:t},n:{current:-1},l:new Set,u:o=>o()}});return e[m4]=e.Provider,e.Provider=h4(e.Provider),delete e.Consumer,e}function If(t,e){let o=a4(t)[eu],{v:{current:n},n:{current:r},l:s}=o,i=e(n),[l,a]=u4((c,u)=>{if(!u)return[n,i];if("p"in u)throw u.p;if(u.n===r)return Object.is(c[1],i)?c:[n,i];try{if("v"in u){if(Object.is(c[0],u.v))return c;let m=e(u.v);return Object.is(c[1],m)?c:[u.v,m]}}catch{}return[...c]},[n,i]);return Object.is(l[1],i)||a(),hb(()=>(s.add(a),()=>{s.delete(a)}),[s]),l[1]}function bb(t){return If(t,g4)}var tu=ti({}),ou=ti({}),ru=ti(!1),nu=ti(!1),su=ti(!1),Sf=ti(!1),Sa=gb([{},()=>null]),He=()=>oi(tu),iu=()=>oi(ou),Lt=()=>oi(ru),Uo=()=>oi(nu),Ot=()=>oi(su),es=()=>oi(Sf),Yt=t=>If(Sa,t),ri=()=>bb(Sa);var xb=vb.createContext({data:{},path:"",rowNumber:void 0}),Af=({children:t,path:e,rowNumber:o})=>{"use no memo";let{getDataByPath:n,getSiblingData:r}=iu(),s=r(e),l=n(e)||s;return b4(xb.Provider,{value:{data:l,path:e,rowNumber:o},children:t})},v4=()=>vb.useContext(xb);var x4="row-label",ts=t=>{let{className:e,CustomComponent:o,label:n,path:r,rowNumber:s}=t;return Ef(Af,{path:r,rowNumber:s,children:Ef(q,{CustomComponent:o,Fallback:Ef("span",{className:[x4,e].filter(Boolean).join(" "),style:{pointerEvents:"none"},children:n})})})};import{c as ML}from"react/compiler-runtime";import{jsx as eo,jsxs as Xs}from"react/jsx-runtime";import{getTranslation as Tg}from"@payloadcms/translations";import VL from"react";import{jsx as _f,jsxs as C4}from"react/jsx-runtime";import Cb from"next/link.js";import yb from"react";var y4=Cb.default||Cb,os="banner",Vr=({type:t="default",alignIcon:e="right",children:o,className:n,icon:r,onClick:s,to:i})=>{let l=[os,`${os}--type-${t}`,n&&n,i&&`${os}--has-link`,(i||s)&&`${os}--has-action`,r&&`${os}--has-icon`,r&&`${os}--align-icon-${e}`].filter(Boolean).join(" "),a="div";return s&&!i&&(a="button"),i&&(a=y4),C4(a,{className:l,href:i||null,onClick:s,children:[r&&e==="left"&&_f(yb.Fragment,{children:r}),_f("span",{className:`${os}__content`,children:o}),r&&e==="right"&&_f(yb.Fragment,{children:r})]})};import{jsx as dr,jsxs as du}from"react/jsx-runtime";import G4,{forwardRef as W4,Fragment as H4,isValidElement as z4}from"react";import{jsx as wb}from"react/jsx-runtime";import"react";var Qe=({className:t,direction:e,size:o})=>wb("svg",{className:["icon icon--chevron",t,o&&`icon--size-${o}`].filter(Boolean).join(" "),height:"100%",style:{transform:e==="left"?"rotate(90deg)":e==="right"?"rotate(-90deg)":e==="up"?"rotate(180deg)":void 0},viewBox:"0 0 22 12",width:"100%",xmlns:"http://www.w3.org/2000/svg",children:wb("path",{className:"stroke",d:"M1 1.12109L11 11.1211L21 1.12109",strokeLinecap:"square"})});import{jsx as Ib}from"react/jsx-runtime";import"react";var ko=({className:t})=>Ib("svg",{className:[t,"icon icon--edit"].filter(Boolean).join(" "),viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:Ib("path",{className:"stroke",d:"M9.68531 4.62938H5.2634C4.92833 4.62938 4.60698 4.76248 4.37004 4.99942C4.13311 5.23635 4 5.5577 4 5.89278V14.7366C4 15.0717 4.13311 15.393 4.37004 15.63C4.60698 15.8669 4.92833 16 5.2634 16H14.1072C14.4423 16 14.7636 15.8669 15.0006 15.63C15.2375 15.393 15.3706 15.0717 15.3706 14.7366V10.3147M13.7124 4.39249C13.9637 4.14118 14.3046 4 14.66 4C15.0154 4 15.3562 4.14118 15.6075 4.39249C15.8588 4.6438 16 4.98464 16 5.34004C16 5.69544 15.8588 6.03629 15.6075 6.28759L9.91399 11.9817C9.76399 12.1316 9.57868 12.2413 9.37515 12.3008L7.56027 12.8314C7.50591 12.8472 7.44829 12.8482 7.39344 12.8341C7.33859 12.8201 7.28853 12.7915 7.24849 12.7515C7.20845 12.7115 7.17991 12.6614 7.16586 12.6066C7.15181 12.5517 7.15276 12.4941 7.16861 12.4397L7.69924 10.6249C7.75896 10.4215 7.86888 10.2364 8.01888 10.0866L13.7124 4.39249Z",strokeLinecap:"square"})});import{jsx as Sb}from"react/jsx-runtime";import"react";var Rf=()=>Sb("svg",{"aria-hidden":"true",className:"graphic link icon icon--link",fill:"none",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:Sb("path",{className:"stroke",d:"M7.99999 13.3333H6.66666C5.78261 13.3333 4.93476 12.9821 4.30964 12.357C3.68452 11.7319 3.33333 10.884 3.33333 9.99999C3.33333 9.11593 3.68452 8.26809 4.30964 7.64297C4.93476 7.01785 5.78261 6.66666 6.66666 6.66666H7.99999M12 6.66666H13.3333C14.2174 6.66666 15.0652 7.01785 15.6904 7.64297C16.3155 8.26809 16.6667 9.11593 16.6667 9.99999C16.6667 10.884 16.3155 11.7319 15.6904 12.357C15.0652 12.9821 14.2174 13.3333 13.3333 13.3333H12M7.33333 9.99999H12.6667",strokeLinecap:"square"})});import{jsx as Ab}from"react/jsx-runtime";import"react";var Zo=()=>Ab("svg",{className:"icon icon--plus",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:Ab("path",{className:"stroke",d:"M5.33333 9.99998H14.6667M9.99999 5.33331V14.6666",strokeLinecap:"square"})});import{jsx as Eb}from"react/jsx-runtime";import"react";var Df=()=>Eb("svg",{className:"icon icon--swap",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:Eb("path",{className:"stroke",d:"M7.33334 4L4.66667 6.66667M4.66667 6.66667L7.33334 9.33333M4.66667 6.66667H15.3333M12.6667 16L15.3333 13.3333M15.3333 13.3333L12.6667 10.6667M15.3333 13.3333H4.66667",strokeLinecap:"square"})});import{jsx as rs,jsxs as Nf}from"react/jsx-runtime";var at={};K1(at,{Button:()=>Pf,ButtonGroup:()=>Ff});import{jsx as au}from"react/jsx-runtime";import _b from"next/link.js";import"react";var w4=_b.default||_b,Aa="popup-button-list",Ff=({buttonSize:t="default",children:e,className:o,textAlign:n="left"})=>{let r=[Aa,o,`${Aa}__text-align--${n}`,`${Aa}__button-size--${t}`].filter(Boolean).join(" ");return au("div",{className:r,children:e})},Pf=({id:t,active:e,children:o,className:n,href:r,onClick:s})=>{let i=[`${Aa}__button`,e&&`${Aa}__button--selected`,n].filter(Boolean).join(" ");return r?au(w4,{className:i,href:r,id:t,onClick:l=>{s&&s(l)},prefetch:!1,children:o}):s?au("button",{className:i,id:t,onClick:l=>{s&&s(l)},type:"button",children:o}):au("div",{className:i,id:t,children:o})};var bn={};K1(bn,{WindowInfo:()=>Fb,WindowInfoContext:()=>ni,WindowInfoProvider:()=>Nb,useWindowInfo:()=>ao,withWindowInfo:()=>kb});import{useContext as A4}from"react";import{createContext as I4}from"react";var S4=I4({}),ni=S4;var E4=()=>A4(ni),ao=E4;import Rb,{Fragment as Db}from"react";var _4=t=>{let{children:e}=t,o=ao();return e?typeof e=="function"?Rb.createElement(Db,null,e(o)):Rb.createElement(Db,null,e):null},Fb=_4;import R4,{useCallback as Pb,useEffect as Tb,useReducer as D4,useRef as F4}from"react";var P4=(t,e)=>{let{payload:{breakpoints:o,animationRef:n}}=e;n.current=null;let{eventsFired:r}=t,{documentElement:{style:s,clientWidth:i,clientHeight:l}}=document,{innerWidth:a,innerHeight:c}=window,u=`${i/100}px`,m=`${l/100}px`,f=o?Object.keys(o).reduce((h,p)=>Object.assign(Object.assign({},h),{[p]:window.matchMedia(o[p]).matches}),{}):{},d={width:a,height:c,"--vw":u,"--vh":m,breakpoints:f,eventsFired:r+1};return s.setProperty("--vw",u),s.setProperty("--vh",m),d},T4=t=>{let{breakpoints:e,children:o}=t,n=F4(null),[r,s]=D4(P4,{width:void 0,height:void 0,"--vw":"","--vh":"",breakpoints:{},eventsFired:0}),i=Pb(()=>{n.current&&cancelAnimationFrame(n.current),n.current=requestAnimationFrame(()=>s({type:"UPDATE",payload:{breakpoints:e,animationRef:n}}))},[e]),l=Pb(()=>{setTimeout(()=>{i()},500)},[i]);return Tb(()=>(window.addEventListener("resize",i),window.addEventListener("orientationchange",l),()=>{window.removeEventListener("resize",i),window.removeEventListener("orientationchange",l)}),[i,l]),Tb(()=>{r.eventsFired===0&&s({type:"UPDATE",payload:{breakpoints:e,animationRef:n}})},[e,r]),R4.createElement(ni.Provider,{value:Object.assign({},r)},o&&o)},Nb=T4;import N4 from"react";var k4=t=>o=>{let n=ao();return N4.createElement(t,Object.assign({},o,{windowInfo:n}))},kb=k4;import{useCallback as jb,useEffect as cu,useRef as B4,useState as kf}from"react";import{c as L4}from"react/compiler-runtime";import{useEffect as O4,useRef as j4,useState as Lb}from"react";var Gr=(t,e)=>{let o=L4(14),n;o[0]!==t?(n=t===void 0?{}:t,o[0]=t,o[1]=n):n=o[1];let{root:r,rootMargin:s,threshold:i}=n,l=r===void 0?null:r,a=s===void 0?"0px":s,c=i===void 0?0:i,[u,m]=Lb(),[f,d]=Lb(null),h;o[2]!==e||o[3]!==l||o[4]!==a||o[5]!==c?(h=typeof window<"u"&&"IntersectionObserver"in window&&!e?new window.IntersectionObserver(C=>{let[x]=C;return m(x)},{root:l,rootMargin:a,threshold:c}):null,o[2]=e,o[3]=l,o[4]=a,o[5]=c,o[6]=h):h=o[6];let p=j4(h),g,b;o[7]!==e||o[8]!==f?(g=()=>{if(e)return;let{current:C}=p;return C.disconnect(),f&&C.observe(f),()=>C.disconnect()},b=[f,e],o[7]=e,o[8]=f,o[9]=g,o[10]=b):(g=o[9],b=o[10]),O4(g,b);let v;return o[11]!==u||o[12]!==f?(v=[d,u,f],o[11]=u,o[12]=f,o[13]=v):v=o[13],v};import{jsx as Ob}from"react/jsx-runtime";import"react";var lu="popup-button",Tf=t=>{let{active:e,button:o,buttonType:n,className:r,disabled:s,noBackground:i,setActive:l,size:a}=t,c=[lu,r,`${lu}--${n}`,!i&&`${lu}--background`,a&&`${lu}--size-${a}`].filter(Boolean).join(" "),u=()=>{l(!e)};return n==="none"?null:n==="custom"?Ob("div",{className:c,onClick:u,onKeyDown:m=>{m.key==="Enter"&&u()},role:"button",tabIndex:0,children:o}):Ob("button",{className:c,disabled:s,onClick:u,onKeyDown:m=>{m.key==="Enter"&&u()},tabIndex:0,type:"button",children:o})};var wo="popup",Lo=t=>{let{boundingRef:e,button:o,buttonClassName:n,buttonSize:r,buttonType:s="default",caret:i=!0,children:l,className:a,disabled:c,forceOpen:u,horizontalAlign:m="left",initActive:f=!1,noBackground:d,onToggleOpen:h,render:p,showOnHover:g=!1,showScrollbar:b=!1,size:v="medium",verticalAlign:C="top"}=t,{height:x,width:y}=ao(),[A,S]=Gr({root:e?.current||null,rootMargin:"-100px 0px 0px 0px",threshold:1}),_=B4(null),[E,R]=kf(f),[D,w]=kf(C),[I,F]=kf(m),P=jb(({horizontal:j=!1,vertical:T=!1})=>{if(_.current){let O=_.current.getBoundingClientRect(),{bottom:M,left:B,right:$,top:W}=O,H=100,X=document.documentElement.clientWidth,G=document.documentElement.clientHeight,z=0;e?.current&&({bottom:G,left:z,right:X,top:H}=e.current.getBoundingClientRect()),j&&($>X&&B>z?F("right"):B<z&&$<X&&F("left")),T&&(W<H&&M<G?w("bottom"):M>G&&W>H&&w("top"))}},[e]),k=jb(j=>{_.current.contains(j.target)||R(!1)},[_]);cu(()=>{P({horizontal:!0})},[S,P,y]),cu(()=>{P({vertical:!0})},[S,P,x]),cu(()=>(typeof h=="function"&&h(E),E?document.addEventListener("mousedown",k):document.removeEventListener("mousedown",k),()=>{document.removeEventListener("mousedown",k)}),[E,k,h]),cu(()=>{R(u)},[u]);let N=[wo,a,`${wo}--size-${v}`,r&&`${wo}--button-size-${r}`,`${wo}--v-align-${D}`,`${wo}--h-align-${I}`,E&&`${wo}--active`,b&&`${wo}--show-scrollbar`].filter(Boolean).join(" ");return Nf("div",{className:N,children:[rs("div",{className:`${wo}__trigger-wrap`,children:g?rs("div",{className:`${wo}__on-hover-watch`,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),children:rs(Tf,{active:E,button:o,buttonType:s,className:n,disabled:c,noBackground:d,setActive:R,size:r})}):rs(Tf,{active:E,button:o,buttonType:s,className:n,disabled:c,noBackground:d,setActive:R,size:r})}),Nf("div",{className:`${wo}__content`,ref:_,children:[rs("div",{className:`${wo}__hide-scrollbar`,ref:A,children:rs("div",{className:`${wo}__scroll-container`,children:Nf("div",{className:`${wo}__scroll-content`,children:[p&&p({close:()=>R(!1)}),l&&l]})})}),i&&rs("div",{className:`${wo}__caret`})]})]})};import{c as $4}from"react/compiler-runtime";import{jsx as uu,jsxs as M4}from"react/jsx-runtime";import Lf,{useEffect as Bb}from"react";var Wt=t=>{let e=$4(26),{alignCaret:o,boundingRef:n,children:r,className:s,delay:i,position:l,show:a,staticPositioning:c}=t,u=o===void 0?"center":o,m=i===void 0?350:i,f=a===void 0?!0:a,d=c===void 0?!1:c,[h,p]=Lf.useState(f),[g,b]=Lf.useState("top"),v=V4,C=n?.current||null,x;e[0]!==C?(x={root:C,rootMargin:"-145px 0px 0px 100px",threshold:0},e[0]=C,e[1]=x):x=e[1];let[y,A]=Gr(x,d),S,_;e[2]!==m||e[3]!==f?(S=()=>{let w;return m&&f?w=setTimeout(()=>{p(f)},m):p(f),()=>{w&&clearTimeout(w)}},_=[f,m],e[2]=m,e[3]=f,e[4]=S,e[5]=_):(S=e[4],_=e[5]),Bb(S,_);let E;e[6]!==A?.isIntersecting||e[7]!==d?(E=()=>{d||b(A?.isIntersecting?"top":"bottom")},e[6]=A?.isIntersecting,e[7]=d,e[8]=E):E=e[8];let R;e[9]!==A||e[10]!==d?(R=[A,d],e[9]=A,e[10]=d,e[11]=R):R=e[11],Bb(E,R);let D;if(e[12]!==u||e[13]!==r||e[14]!==s||e[15]!==g||e[16]!==l||e[17]!==y||e[18]!==h||e[19]!==d){let w=h&&"tooltip--show",I=`tooltip--caret-${u}`,F=`tooltip--position-${l||g}`,P;e[21]!==s||e[22]!==w||e[23]!==I||e[24]!==F?(P=["tooltip",s,w,I,F].filter(Boolean),e[21]=s,e[22]=w,e[23]=I,e[24]=F,e[25]=P):P=e[25],D=M4(Lf.Fragment,{children:[!d&&uu("aside",{"aria-hidden":"true",className:["tooltip",s,`tooltip--caret-${u}`,"tooltip--position-top"].filter(Boolean).join(" "),ref:y,style:{opacity:"0"},children:uu("div",{className:"tooltip-content",children:r})}),uu("aside",{className:P.join(" "),title:v(r),children:uu("div",{className:"tooltip-content",children:r})})]}),e[12]=u,e[13]=r,e[14]=s,e[15]=g,e[16]=l,e[17]=y,e[18]=h,e[19]=d,e[20]=D}else D=e[20];return D};function V4(t){return typeof t=="string"?t:""}var X4={chevron:Qe,edit:ko,link:Rf,plus:Zo,swap:Df,x:xt},Ut="btn",Of=({children:t,icon:e,showTooltip:o,tooltip:n})=>{let r=X4[e];return du(H4,{children:[n&&dr(Wt,{className:`${Ut}__tooltip`,show:o,children:n}),du("span",{className:`${Ut}__content`,children:[t&&dr("span",{className:`${Ut}__label`,children:t}),e&&du("span",{className:`${Ut}__icon`,children:[z4(e)&&e,r&&dr(r,{})]})]})]})},U=W4((t,e)=>{let{id:o,type:n="button","aria-label":r,buttonStyle:s="primary",children:i,className:l,disabled:a,el:c="button",icon:u,iconPosition:m="right",iconStyle:f="without-border",Link:d,newTab:h,onClick:p,onMouseDown:g,round:b,size:v="medium",SubMenuPopupContent:C,to:x,tooltip:y,url:A}=t,[S,_]=G4.useState(!1),E=[Ut,l&&l,u&&`${Ut}--icon`,f&&`${Ut}--icon-style-${f}`,u&&!i&&`${Ut}--icon-only`,v&&`${Ut}--size-${v}`,u&&m&&`${Ut}--icon-position-${m}`,y&&`${Ut}--has-tooltip`,!C&&`${Ut}--withoutPopup`].filter(Boolean).join(" ");function R(P){_(!1),n!=="submit"&&p&&P.preventDefault(),p&&p(P)}let D=[s&&`${Ut}--style-${s}`,a&&`${Ut}--disabled`,b&&`${Ut}--round`,C?`${Ut}--withPopup`:`${Ut}--withoutPopup`].filter(Boolean).join(" "),w={id:o,type:n,"aria-disabled":a,"aria-label":r,className:C?E:[E,D].join(" "),disabled:a,onClick:a?void 0:R,onMouseDown:a?void 0:g,onPointerEnter:y?()=>_(!0):void 0,onPointerLeave:y?()=>_(!1):void 0,rel:h?"noopener noreferrer":void 0,target:h?"_blank":void 0},I,F;switch(c){case"anchor":I=dr("a",{...w,href:a?void 0:A,ref:e,children:dr(Of,{icon:u,showTooltip:S,tooltip:y,children:i})});break;case"link":if(!d)return console.error('Link is required when using el="link"',i),null;let P=d;a?P="div":F=!1,I=dr(P,{...w,href:x||A,prefetch:F,to:x||A,children:dr(Of,{icon:u,showTooltip:S,tooltip:y,children:i})});break;default:I=dr(c,{ref:e,type:"submit",...w,children:dr(Of,{icon:u,showTooltip:S,tooltip:y,children:i})});break}return C?du("div",{className:D,children:[I,dr(Lo,{button:dr(Qe,{}),buttonSize:v,className:a?`${Ut}--popup-disabled`:"",horizontalAlign:"right",noBackground:!0,render:({close:P})=>C({close:()=>P()}),size:"large",verticalAlign:"bottom"})]}):I});import{c as wE}from"react/compiler-runtime";import{jsx as IE}from"react/jsx-runtime";import{Fragment as SE}from"react";import{c as yE}from"react/compiler-runtime";import Hb,{useMemo as fu,useRef as $f,useEffect as pu,useState as eE,useContext as tE}from"react";import{useDndContext as oE,getClientRect as rE,useDroppable as nE,useDraggable as sE,closestCorners as iE,getFirstCollision as aE,getScrollableAncestors as lE,KeyboardCode as vn}from"@dnd-kit/core";import{useMemo as $b,useLayoutEffect as Y4,useEffect as U4,useRef as fV,useCallback as pV}from"react";function Mb(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return $b(()=>n=>{e.forEach(r=>r(n))},e)}var Z4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function J4(t){let e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function Q4(t){return"nodeType"in t}function q4(t){var e,o;return t?J4(t)?t:Q4(t)&&(e=(o=t.ownerDocument)==null?void 0:o.defaultView)!=null?e:window:window}var Bf=Z4?Y4:U4;var jf={};function Vb(t,e){return $b(()=>{if(e)return e;let o=jf[t]==null?0:jf[t]+1;return jf[t]=o,t+"-"+o},[t,e])}function K4(t){return function(e){for(var o=arguments.length,n=new Array(o>1?o-1:0),r=1;r<o;r++)n[r-1]=arguments[r];return n.reduce((s,i)=>{let l=Object.entries(i);for(let[a,c]of l){let u=s[a];u!=null&&(s[a]=u+t*c)}return s},{...e})}}var Gb=K4(-1);function Wb(t){if(!t)return!1;let{KeyboardEvent:e}=q4(t.target);return e&&t instanceof e}var Ea=Object.freeze({Translate:{toString(t){if(!t)return;let{x:e,y:o}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(o?Math.round(o):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;let{scaleX:e,scaleY:o}=t;return"scaleX("+e+") scaleY("+o+")"}},Transform:{toString(t){if(t)return[Ea.Translate.toString(t),Ea.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:o,easing:n}=t;return e+" "+o+"ms "+n}}});function gu(t,e,o){let n=t.slice();return n.splice(o<0?n.length+o:o,0,n.splice(e,1)[0]),n}function cE(t,e){return t.reduce((o,n,r)=>{let s=e.get(n);return s&&(o[r]=s),o},Array(t.length))}function mu(t){return t!==null&&t>=0}function uE(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(t[o]!==e[o])return!1;return!0}function dE(t){return typeof t=="boolean"?{draggable:t,droppable:t}:t}var zb=t=>{let{rects:e,activeIndex:o,overIndex:n,index:r}=t,s=gu(e,n,o),i=e[r],l=s[r];return!l||!i?null:{x:l.left-i.left,y:l.top-i.top,scaleX:l.width/i.width,scaleY:l.height/i.height}};var Xb="Sortable",Yb=Hb.createContext({activeIndex:-1,containerId:Xb,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:zb,disabled:{draggable:!1,droppable:!1}});function Ub(t){let{children:e,id:o,items:n,strategy:r=zb,disabled:s=!1}=t,{active:i,dragOverlay:l,droppableRects:a,over:c,measureDroppableContainers:u}=oE(),m=Vb(Xb,o),f=l.rect!==null,d=fu(()=>n.map(A=>typeof A=="object"&&"id"in A?A.id:A),[n]),h=i!=null,p=i?d.indexOf(i.id):-1,g=c?d.indexOf(c.id):-1,b=$f(d),v=!uE(d,b.current),C=g!==-1&&p===-1||v,x=dE(s);Bf(()=>{v&&h&&u(d)},[v,d,h,u]),pu(()=>{b.current=d},[d]);let y=fu(()=>({activeIndex:p,containerId:m,disabled:x,disableTransforms:C,items:d,overIndex:g,useDragOverlay:f,sortedRects:cE(d,a),strategy:r}),[p,m,x.draggable,x.droppable,C,d,g,a,f,r]);return Hb.createElement(Yb.Provider,{value:y},e)}var mE=t=>{let{id:e,items:o,activeIndex:n,overIndex:r}=t;return gu(o,n,r).indexOf(e)},fE=t=>{let{containerId:e,isSorting:o,wasDragging:n,index:r,items:s,newIndex:i,previousItems:l,previousContainerId:a,transition:c}=t;return!c||!n||l!==s&&r===i?!1:o?!0:i!==r&&e===a},pE={duration:200,easing:"ease"},Zb="transform",hE=Ea.Transition.toString({property:Zb,duration:0,easing:"linear"}),gE={roleDescription:"sortable"};function bE(t){let{disabled:e,index:o,node:n,rect:r}=t,[s,i]=eE(null),l=$f(o);return Bf(()=>{if(!e&&o!==l.current&&n.current){let a=r.current;if(a){let c=rE(n.current,{ignoreTransform:!0}),u={x:a.left-c.left,y:a.top-c.top,scaleX:a.width/c.width,scaleY:a.height/c.height};(u.x||u.y)&&i(u)}}o!==l.current&&(l.current=o)},[e,o,n,r]),pu(()=>{s&&i(null)},[s]),s}function Jb(t){let{animateLayoutChanges:e=fE,attributes:o,disabled:n,data:r,getNewIndex:s=mE,id:i,strategy:l,resizeObserverConfig:a,transition:c=pE}=t,{items:u,containerId:m,activeIndex:f,disabled:d,disableTransforms:h,sortedRects:p,overIndex:g,useDragOverlay:b,strategy:v}=tE(Yb),C=vE(n,d),x=u.indexOf(i),y=fu(()=>({sortable:{containerId:m,index:x,items:u},...r}),[m,r,x,u]),A=fu(()=>u.slice(u.indexOf(i)),[u,i]),{rect:S,node:_,isOver:E,setNodeRef:R}=nE({id:i,data:y,disabled:C.droppable,resizeObserverConfig:{updateMeasurementsFor:A,...a}}),{active:D,activatorEvent:w,activeNodeRect:I,attributes:F,setNodeRef:P,listeners:k,isDragging:N,over:j,setActivatorNodeRef:T,transform:O}=sE({id:i,data:y,attributes:{...gE,...o},disabled:C.draggable}),M=Mb(R,P),B=!!D,$=B&&!h&&mu(f)&&mu(g),W=!b&&N,H=W&&$?O:null,G=$?H??(l??v)({rects:p,activeNodeRect:I,activeIndex:f,overIndex:g,index:x}):null,z=mu(f)&&mu(g)?s({id:i,items:u,activeIndex:f,overIndex:g}):x,Z=D?.id,V=$f({activeId:Z,items:u,newIndex:z,containerId:m}),re=u!==V.current.items,ee=e({active:D,containerId:m,isDragging:N,isSorting:B,id:i,index:x,items:u,newIndex:V.current.newIndex,previousItems:V.current.items,previousContainerId:V.current.containerId,transition:c,wasDragging:V.current.activeId!=null}),te=bE({disabled:!ee,index:x,node:_,rect:S});return pu(()=>{B&&V.current.newIndex!==z&&(V.current.newIndex=z),m!==V.current.containerId&&(V.current.containerId=m),u!==V.current.items&&(V.current.items=u)},[B,z,m,u]),pu(()=>{if(Z===V.current.activeId)return;if(Z&&!V.current.activeId){V.current.activeId=Z;return}let xe=setTimeout(()=>{V.current.activeId=Z},50);return()=>clearTimeout(xe)},[Z]),{active:D,activeIndex:f,attributes:F,data:y,rect:S,index:x,newIndex:z,items:u,isOver:E,isSorting:B,isDragging:N,listeners:k,node:_,overIndex:g,over:j,setNodeRef:M,setActivatorNodeRef:T,setDroppableNodeRef:R,setDraggableNodeRef:P,transform:te??G,transition:Q()};function Q(){if(te||re&&V.current.newIndex===x)return hE;if(!(W&&!Wb(w)||!c)&&(B||ee))return Ea.Transition.toString({...c,property:Zb})}}function vE(t,e){var o,n;return typeof t=="boolean"?{draggable:t,droppable:!1}:{draggable:(o=t?.draggable)!=null?o:e.draggable,droppable:(n=t?.droppable)!=null?n:e.droppable}}function hu(t){if(!t)return!1;let e=t.data.current;return!!(e&&"sortable"in e&&typeof e.sortable=="object"&&"containerId"in e.sortable&&"items"in e.sortable&&"index"in e.sortable)}var xE=[vn.Down,vn.Right,vn.Up,vn.Left],Qb=(t,e)=>{let{context:{active:o,collisionRect:n,droppableRects:r,droppableContainers:s,over:i,scrollableAncestors:l}}=e;if(xE.includes(t.code)){if(t.preventDefault(),!o||!n)return;let a=[];s.getEnabled().forEach(m=>{if(!m||m!=null&&m.disabled)return;let f=r.get(m.id);if(f)switch(t.code){case vn.Down:n.top<f.top&&a.push(m);break;case vn.Up:n.top>f.top&&a.push(m);break;case vn.Left:n.left>f.left&&a.push(m);break;case vn.Right:n.left<f.left&&a.push(m);break}});let c=iE({active:o,collisionRect:n,droppableRects:r,droppableContainers:a,pointerCoordinates:null}),u=aE(c,"id");if(u===i?.id&&c.length>1&&(u=c[1].id),u!=null){let m=s.get(o.id),f=s.get(u),d=f?r.get(f.id):null,h=f?.node.current;if(h&&d&&m&&f){let g=lE(h).some((A,S)=>l[S]!==A),b=qb(m,f),v=CE(m,f),C=g||!b?{x:0,y:0}:{x:v?n.width-d.width:0,y:v?n.height-d.height:0},x={x:d.left,y:d.top};return C.x&&C.y?x:Gb(x,C)}}}};function qb(t,e){return!hu(t)||!hu(e)?!1:t.data.current.sortable.containerId===e.data.current.sortable.containerId}function CE(t,e){return!hu(t)||!hu(e)||!qb(t,e)?!1:t.data.current.sortable.index<e.data.current.sortable.index}var si=t=>{let e=yE(17),{id:o,disabled:n}=t,r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={duration:250,easing:"cubic-bezier(0, 0.2, 0.2, 1)"},e[0]=r):r=e[0];let s;e[1]!==n||e[2]!==o?(s={id:o,disabled:n,transition:r},e[1]=n,e[2]=o,e[3]=s):s=e[3];let{attributes:i,isDragging:l,listeners:a,setNodeRef:c,transform:u,transition:m}=Jb(s),f=l?"grabbing":"grab",d;e[4]!==f||e[5]!==m?(d={cursor:f,transition:m},e[4]=f,e[5]=m,e[6]=d):d=e[6];let h;e[7]!==i||e[8]!==d?(h={...i,style:d},e[7]=i,e[8]=d,e[9]=h):h=e[9];let p=u&&`translate3d(${u.x}px, ${u.y}px, 0)`,g;return e[10]!==l||e[11]!==a||e[12]!==c||e[13]!==h||e[14]!==p||e[15]!==m?(g={attributes:h,isDragging:l,listeners:a,setNodeRef:c,transform:p,transition:m},e[10]=l,e[11]=a,e[12]=c,e[13]=h,e[14]=p,e[15]=m,e[16]=g):g=e[16],g};var xn=t=>{let e=wE(12),{id:o,children:n,disabled:r}=t,s;e[0]!==r||e[1]!==o?(s={id:o,disabled:r},e[0]=r,e[1]=o,e[2]=s):s=e[2];let{attributes:i,isDragging:l,listeners:a,setNodeRef:c,transform:u,transition:m}=si(s),f=l?"grabbing":"grab",d;return e[3]!==i||e[4]!==n||e[5]!==l||e[6]!==a||e[7]!==c||e[8]!==f||e[9]!==u||e[10]!==m?(d=IE(SE,{children:n({attributes:{...i,style:{cursor:f}},isDragging:l,listeners:a,setNodeRef:c,transform:u,transition:m})}),e[3]=i,e[4]=n,e[5]=l,e[6]=a,e[7]=c,e[8]=f,e[9]=u,e[10]=m,e[11]=d):d=e[11],d};import{c as AE}from"react/compiler-runtime";import{jsx as Mf}from"react/jsx-runtime";import{closestCenter as EE,DndContext as _E,KeyboardSensor as RE,PointerSensor as DE,useDroppable as FE,useSensor as Kb,useSensors as PE}from"@dnd-kit/core";import{useId as TE}from"react";var Rr=t=>{let e=AE(15),{children:o,className:n,ids:r,onDragEnd:s}=t,i=TE(),l;e[0]!==i?(l={id:i},e[0]=i,e[1]=l):l=e[1];let{setNodeRef:a}=FE(l),c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c={activationConstraint:{distance:5}},e[2]=c):c=e[2];let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u={coordinateGetter:Qb},e[3]=u):u=e[3];let m=PE(Kb(DE,c),Kb(RE,u)),f;e[4]!==r||e[5]!==s?(f=p=>{let{active:g,over:b}=p;p.activatorEvent.stopPropagation(),!(!g||!b)&&typeof s=="function"&&s({event:p,moveFromIndex:r.findIndex(v=>v===g.id),moveToIndex:r.findIndex(v=>v===b.id)})},e[4]=r,e[5]=s,e[6]=f):f=e[6];let d=f,h;return e[7]!==o||e[8]!==n||e[9]!==d||e[10]!==i||e[11]!==r||e[12]!==m||e[13]!==a?(h=Mf(_E,{collisionDetection:EE,id:i,onDragEnd:d,sensors:m,children:Mf(Ub,{items:r,children:Mf("div",{className:n,ref:a,children:o})})}),e[7]=o,e[8]=n,e[9]=d,e[10]=i,e[11]=r,e[12]=m,e[13]=a,e[14]=h):h=e[14],h};import{jsx as ev,jsxs as NE}from"react/jsx-runtime";import"react";var bu="error-pill",Zt=t=>{let{className:e,count:o,i18n:n,withMessage:r}=t,s=!r&&o<99,i=[bu,s&&`${bu}--fixed-width`,e&&e].filter(Boolean).join(" ");return o===0?null:ev("div",{className:i,children:NE("div",{className:`${bu}__content`,children:[ev("span",{className:`${bu}__count`,children:o}),r&&` ${o>1?n.t("general:errors"):n.t("general:error")}`]})})};import{c as kE}from"react/compiler-runtime";import{jsx as LE}from"react/jsx-runtime";import{getTranslation as OE}from"@payloadcms/translations";import"react";var tv="field-description",Me=t=>{let e=kE(8),{className:o,description:n,marginPlacement:r,path:s}=t,{i18n:i}=L();if(n){let l=`field-description-${s?.replace(/\./g,"__")}`,a=r&&`${tv}--margin-${r}`,c;e[0]!==o||e[1]!==l||e[2]!==a?(c=[tv,o,l,a].filter(Boolean),e[0]=o,e[1]=l,e[2]=a,e[3]=c):c=e[3];let u=c.join(" "),m;return e[4]!==n||e[5]!==i||e[6]!==u?(m=LE("div",{className:u,children:OE(n,i)}),e[4]=n,e[5]=i,e[6]=u,e[7]=m):m=e[7],m}return null};import{c as jE}from"react/compiler-runtime";import{jsx as BE}from"react/jsx-runtime";import"react";var $E="field-error",Xe=t=>{let e=jE(7),{alignCaret:o,message:n,path:r,showError:s}=t,i=o===void 0?"right":o,l=Lt(),a;e[0]!==r?(a=p=>{let[g]=p;return g&&g?.[r]||null},e[0]=r,e[1]=a):a=e[1];let c=Yt(a),u;e[2]!==c?(u=c||{},e[2]=c,e[3]=u):u=e[3];let{errorMessage:m,valid:f}=u,d=n||m;if((s||l&&f===!1)&&d?.length){let p;return e[4]!==i||e[5]!==d?(p=BE(Wt,{alignCaret:i,className:$E,delay:0,staticPositioning:!0,children:d}),e[4]=i,e[5]=d,e[6]=p):p=e[6],p}return null};import{c as cR}from"react/compiler-runtime";import{jsx as uR,jsxs as Vv}from"react/jsx-runtime";import{getTranslation as dR}from"@payloadcms/translations";import"react";import{c as ME}from"react/compiler-runtime";import{jsx as VE}from"react/jsx-runtime";import{createContext as GE,useContext as WE}from"react";var ov=GE(0),_a=t=>{let e=ME(3),{children:o}=t,r=Ze()+1,s;return e[0]!==o||e[1]!==r?(s=VE(ov.Provider,{value:r,children:o}),e[0]=o,e[1]=r,e[2]=s):s=e[2],s},Ze=()=>WE(ov);import{jsx as oR}from"react/jsx-runtime";import{useSearchParams as rR}from"next/navigation.js";import nR,{createContext as sR,useContext as iR,useEffect as aR,useState as lR}from"react";var vu=(t,e)=>!t?.locales||t.locales.length===0?null:t.locales.find(o=>o?.code===e);import{jsx as Y_}from"react/jsx-runtime";import{jsx as Zf}from"react/jsx-runtime";import{useRef as fv,useEffect as is,useState as Jf}from"react";import r_ from"react-dom";function Ce(){return Ce=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var n in o)({}).hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t},Ce.apply(null,arguments)}function ii(t,e){if(t==null)return{};var o={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;o[n]=t[n]}return o}function ai(t,e){return ai=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,n){return o.__proto__=n,o},ai(t,e)}function xu(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,ai(t,e)}function Vf(t,e){return t.classList?!!e&&t.classList.contains(e):(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")!==-1}function Gf(t,e){t.classList?t.classList.add(e):Vf(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}function rv(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Wf(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=rv(t.className,e):t.setAttribute("class",rv(t.className&&t.className.baseVal||"",e))}import sv from"react";import yu from"react";import wu from"react-dom";var Hf={disabled:!1};import HE from"react";var zf=HE.createContext(null);var Cu=function(e){return e.scrollTop};var Ra="unmounted",ns="exited",ss="entering",ci="entered",Xf="exiting",Wr=function(t){xu(e,t);function e(n,r){var s;s=t.call(this,n,r)||this;var i=r,l=i&&!i.isMounting?n.enter:n.appear,a;return s.appearStatus=null,n.in?l?(a=ns,s.appearStatus=ss):a=ci:n.unmountOnExit||n.mountOnEnter?a=Ra:a=ns,s.state={status:a},s.nextCallback=null,s}e.getDerivedStateFromProps=function(r,s){var i=r.in;return i&&s.status===Ra?{status:ns}:null};var o=e.prototype;return o.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},o.componentDidUpdate=function(r){var s=null;if(r!==this.props){var i=this.state.status;this.props.in?i!==ss&&i!==ci&&(s=ss):(i===ss||i===ci)&&(s=Xf)}this.updateStatus(!1,s)},o.componentWillUnmount=function(){this.cancelNextCallback()},o.getTimeouts=function(){var r=this.props.timeout,s,i,l;return s=i=l=r,r!=null&&typeof r!="number"&&(s=r.exit,i=r.enter,l=r.appear!==void 0?r.appear:i),{exit:s,enter:i,appear:l}},o.updateStatus=function(r,s){if(r===void 0&&(r=!1),s!==null)if(this.cancelNextCallback(),s===ss){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:wu.findDOMNode(this);i&&Cu(i)}this.performEnter(r)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ns&&this.setState({status:Ra})},o.performEnter=function(r){var s=this,i=this.props.enter,l=this.context?this.context.isMounting:r,a=this.props.nodeRef?[l]:[wu.findDOMNode(this),l],c=a[0],u=a[1],m=this.getTimeouts(),f=l?m.appear:m.enter;if(!r&&!i||Hf.disabled){this.safeSetState({status:ci},function(){s.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:ss},function(){s.props.onEntering(c,u),s.onTransitionEnd(f,function(){s.safeSetState({status:ci},function(){s.props.onEntered(c,u)})})})},o.performExit=function(){var r=this,s=this.props.exit,i=this.getTimeouts(),l=this.props.nodeRef?void 0:wu.findDOMNode(this);if(!s||Hf.disabled){this.safeSetState({status:ns},function(){r.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:Xf},function(){r.props.onExiting(l),r.onTransitionEnd(i.exit,function(){r.safeSetState({status:ns},function(){r.props.onExited(l)})})})},o.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},o.safeSetState=function(r,s){s=this.setNextCallback(s),this.setState(r,s)},o.setNextCallback=function(r){var s=this,i=!0;return this.nextCallback=function(l){i&&(i=!1,s.nextCallback=null,r(l))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},o.onTransitionEnd=function(r,s){this.setNextCallback(s);var i=this.props.nodeRef?this.props.nodeRef.current:wu.findDOMNode(this),l=r==null&&!this.props.addEndListener;if(!i||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],c=a[0],u=a[1];this.props.addEndListener(c,u)}r!=null&&setTimeout(this.nextCallback,r)},o.render=function(){var r=this.state.status;if(r===Ra)return null;var s=this.props,i=s.children,l=s.in,a=s.mountOnEnter,c=s.unmountOnExit,u=s.appear,m=s.enter,f=s.exit,d=s.timeout,h=s.addEndListener,p=s.onEnter,g=s.onEntering,b=s.onEntered,v=s.onExit,C=s.onExiting,x=s.onExited,y=s.nodeRef,A=ii(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return yu.createElement(zf.Provider,{value:null},typeof i=="function"?i(r,A):yu.cloneElement(yu.Children.only(i),A))},e}(yu.Component);Wr.contextType=zf;Wr.propTypes={};function li(){}Wr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:li,onEntering:li,onEntered:li,onExit:li,onExiting:li,onExited:li};Wr.UNMOUNTED=Ra;Wr.EXITED=ns;Wr.ENTERING=ss;Wr.ENTERED=ci;Wr.EXITING=Xf;var nv=Wr;var zE=function(e,o){return e&&o&&o.split(" ").forEach(function(n){return Gf(e,n)})},Yf=function(e,o){return e&&o&&o.split(" ").forEach(function(n){return Wf(e,n)})},Uf=function(t){xu(e,t);function e(){for(var n,r=arguments.length,s=new Array(r),i=0;i<r;i++)s[i]=arguments[i];return n=t.call.apply(t,[this].concat(s))||this,n.appliedClasses={appear:{},enter:{},exit:{}},n.onEnter=function(l,a){var c=n.resolveArguments(l,a),u=c[0],m=c[1];n.removeClasses(u,"exit"),n.addClass(u,m?"appear":"enter","base"),n.props.onEnter&&n.props.onEnter(l,a)},n.onEntering=function(l,a){var c=n.resolveArguments(l,a),u=c[0],m=c[1],f=m?"appear":"enter";n.addClass(u,f,"active"),n.props.onEntering&&n.props.onEntering(l,a)},n.onEntered=function(l,a){var c=n.resolveArguments(l,a),u=c[0],m=c[1],f=m?"appear":"enter";n.removeClasses(u,f),n.addClass(u,f,"done"),n.props.onEntered&&n.props.onEntered(l,a)},n.onExit=function(l){var a=n.resolveArguments(l),c=a[0];n.removeClasses(c,"appear"),n.removeClasses(c,"enter"),n.addClass(c,"exit","base"),n.props.onExit&&n.props.onExit(l)},n.onExiting=function(l){var a=n.resolveArguments(l),c=a[0];n.addClass(c,"exit","active"),n.props.onExiting&&n.props.onExiting(l)},n.onExited=function(l){var a=n.resolveArguments(l),c=a[0];n.removeClasses(c,"exit"),n.addClass(c,"exit","done"),n.props.onExited&&n.props.onExited(l)},n.resolveArguments=function(l,a){return n.props.nodeRef?[n.props.nodeRef.current,l]:[l,a]},n.getClassNames=function(l){var a=n.props.classNames,c=typeof a=="string",u=c&&a?a+"-":"",m=c?""+u+l:a[l],f=c?m+"-active":a[l+"Active"],d=c?m+"-done":a[l+"Done"];return{baseClassName:m,activeClassName:f,doneClassName:d}},n}var o=e.prototype;return o.addClass=function(r,s,i){var l=this.getClassNames(s)[i+"ClassName"],a=this.getClassNames("enter"),c=a.doneClassName;s==="appear"&&i==="done"&&c&&(l+=" "+c),i==="active"&&r&&Cu(r),l&&(this.appliedClasses[s][i]=l,zE(r,l))},o.removeClasses=function(r,s){var i=this.appliedClasses[s],l=i.base,a=i.active,c=i.done;this.appliedClasses[s]={},l&&Yf(r,l),a&&Yf(r,a),c&&Yf(r,c)},o.render=function(){var r=this.props,s=r.classNames,i=ii(r,["classNames"]);return sv.createElement(nv,Ce({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(sv.Component);Uf.defaultProps={classNames:""};Uf.propTypes={};var Da=Uf;function iv(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}import{useContext as YE}from"react";import{createContext as XE}from"react";var Iu=XE({});var ae=()=>YE(Iu);var Su=t=>t?{appear:`${t}--appear`,appearActive:`${t}--appearActive`,appearDone:`${t}--appearDone`,enter:`${t}--enter`,enterActive:`${t}--enterActive`,enterDone:`${t}--enterDone`,exit:`${t}--exit`,exitActive:`${t}--exitActive`,exitDone:`${t}--exitDone`}:{};JA();function av(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),o.push.apply(o,n)}return o}function lv(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?av(Object(o),!0).forEach(function(n){UE(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):av(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function UE(t,e,o){return e=JE(e),e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function ZE(t,e){if(typeof t!="object"||t===null)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function JE(t){var e=ZE(t,"string");return typeof e=="symbol"?e:String(e)}var cv={activateTrap:function(e,o){if(e.length>0){var n=e[e.length-1];n!==o&&n.pause()}var r=e.indexOf(o);r===-1||e.splice(r,1),e.push(o)},deactivateTrap:function(e,o){var n=e.indexOf(o);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},QE=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},qE=function(e){return e?.key==="Escape"||e?.key==="Esc"||e?.keyCode===27},Pa=function(e){return e?.key==="Tab"||e?.keyCode===9},KE=function(e){return Pa(e)&&!e.shiftKey},e_=function(e){return Pa(e)&&e.shiftKey},uv=function(e){return setTimeout(e,0)},dv=function(e,o){var n=-1;return e.every(function(r,s){return o(r)?(n=s,!1):!0}),n},Fa=function(e){for(var o=arguments.length,n=new Array(o>1?o-1:0),r=1;r<o;r++)n[r-1]=arguments[r];return typeof e=="function"?e.apply(void 0,n):e},Au=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},t_=[],mv=function(e,o){var n=o?.document||document,r=o?.trapStack||t_,s=lv({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:KE,isKeyBackward:e_},o),i={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},l,a=function(w,I,F){return w&&w[I]!==void 0?w[I]:s[F||I]},c=function(w,I){var F=typeof I?.composedPath=="function"?I.composedPath():void 0;return i.containerGroups.findIndex(function(P){var k=P.container,N=P.tabbableNodes;return k.contains(w)||F?.includes(k)||N.find(function(j){return j===w})})},u=function(w){var I=s[w];if(typeof I=="function"){for(var F=arguments.length,P=new Array(F>1?F-1:0),k=1;k<F;k++)P[k-1]=arguments[k];I=I.apply(void 0,P)}if(I===!0&&(I=void 0),!I){if(I===void 0||I===!1)return I;throw new Error("`".concat(w,"` was specified but was not a node, or did not return a node"))}var N=I;if(typeof I=="string"&&(N=n.querySelector(I),!N))throw new Error("`".concat(w,"` as selector refers to no known node"));return N},m=function(){var w=u("initialFocus");if(w===!1)return!1;if(w===void 0||!Uc(w,s.tabbableOptions))if(c(n.activeElement)>=0)w=n.activeElement;else{var I=i.tabbableGroups[0],F=I&&I.firstTabbableNode;w=F||u("fallbackFocus")}if(!w)throw new Error("Your focus-trap needs to have at least one focusable element");return w},f=function(){if(i.containerGroups=i.containers.map(function(w){var I=eb(w,s.tabbableOptions),F=tb(w,s.tabbableOptions),P=I.length>0?I[0]:void 0,k=I.length>0?I[I.length-1]:void 0,N=F.find(function(O){return qn(O)}),j=F.slice().reverse().find(function(O){return qn(O)}),T=!!I.find(function(O){return ei(O)>0});return{container:w,tabbableNodes:I,focusableNodes:F,posTabIndexesFound:T,firstTabbableNode:P,lastTabbableNode:k,firstDomTabbableNode:N,lastDomTabbableNode:j,nextTabbableNode:function(M){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,$=I.indexOf(M);return $<0?B?F.slice(F.indexOf(M)+1).find(function(W){return qn(W)}):F.slice(0,F.indexOf(M)).reverse().find(function(W){return qn(W)}):I[$+(B?1:-1)]}}}),i.tabbableGroups=i.containerGroups.filter(function(w){return w.tabbableNodes.length>0}),i.tabbableGroups.length<=0&&!u("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(i.containerGroups.find(function(w){return w.posTabIndexesFound})&&i.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},d=function D(w){var I=w.activeElement;if(I)return I.shadowRoot&&I.shadowRoot.activeElement!==null?D(I.shadowRoot):I},h=function D(w){if(w!==!1&&w!==d(document)){if(!w||!w.focus){D(m());return}w.focus({preventScroll:!!s.preventScroll}),i.mostRecentlyFocusedNode=w,QE(w)&&w.select()}},p=function(w){var I=u("setReturnFocus",w);return I||(I===!1?!1:w)},g=function(w){var I=w.target,F=w.event,P=w.isBackward,k=P===void 0?!1:P;I=I||Au(F),f();var N=null;if(i.tabbableGroups.length>0){var j=c(I,F),T=j>=0?i.containerGroups[j]:void 0;if(j<0)k?N=i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:N=i.tabbableGroups[0].firstTabbableNode;else if(k){var O=dv(i.tabbableGroups,function(X){var G=X.firstTabbableNode;return I===G});if(O<0&&(T.container===I||Uc(I,s.tabbableOptions)&&!qn(I,s.tabbableOptions)&&!T.nextTabbableNode(I,!1))&&(O=j),O>=0){var M=O===0?i.tabbableGroups.length-1:O-1,B=i.tabbableGroups[M];N=ei(I)>=0?B.lastTabbableNode:B.lastDomTabbableNode}else Pa(F)||(N=T.nextTabbableNode(I,!1))}else{var $=dv(i.tabbableGroups,function(X){var G=X.lastTabbableNode;return I===G});if($<0&&(T.container===I||Uc(I,s.tabbableOptions)&&!qn(I,s.tabbableOptions)&&!T.nextTabbableNode(I))&&($=j),$>=0){var W=$===i.tabbableGroups.length-1?0:$+1,H=i.tabbableGroups[W];N=ei(I)>=0?H.firstTabbableNode:H.firstDomTabbableNode}else Pa(F)||(N=T.nextTabbableNode(I))}}else N=u("fallbackFocus");return N},b=function(w){var I=Au(w);if(!(c(I,w)>=0)){if(Fa(s.clickOutsideDeactivates,w)){l.deactivate({returnFocus:s.returnFocusOnDeactivate});return}Fa(s.allowOutsideClick,w)||w.preventDefault()}},v=function(w){var I=Au(w),F=c(I,w)>=0;if(F||I instanceof Document)F&&(i.mostRecentlyFocusedNode=I);else{w.stopImmediatePropagation();var P,k=!0;if(i.mostRecentlyFocusedNode)if(ei(i.mostRecentlyFocusedNode)>0){var N=c(i.mostRecentlyFocusedNode),j=i.containerGroups[N].tabbableNodes;if(j.length>0){var T=j.findIndex(function(O){return O===i.mostRecentlyFocusedNode});T>=0&&(s.isKeyForward(i.recentNavEvent)?T+1<j.length&&(P=j[T+1],k=!1):T-1>=0&&(P=j[T-1],k=!1))}}else i.containerGroups.some(function(O){return O.tabbableNodes.some(function(M){return ei(M)>0})})||(k=!1);else k=!1;k&&(P=g({target:i.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(i.recentNavEvent)})),h(P||i.mostRecentlyFocusedNode||m())}i.recentNavEvent=void 0},C=function(w){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;i.recentNavEvent=w;var F=g({event:w,isBackward:I});F&&(Pa(w)&&w.preventDefault(),h(F))},x=function(w){if(qE(w)&&Fa(s.escapeDeactivates,w)!==!1){w.preventDefault(),l.deactivate();return}(s.isKeyForward(w)||s.isKeyBackward(w))&&C(w,s.isKeyBackward(w))},y=function(w){var I=Au(w);c(I,w)>=0||Fa(s.clickOutsideDeactivates,w)||Fa(s.allowOutsideClick,w)||(w.preventDefault(),w.stopImmediatePropagation())},A=function(){if(i.active)return cv.activateTrap(r,l),i.delayInitialFocusTimer=s.delayInitialFocus?uv(function(){h(m())}):h(m()),n.addEventListener("focusin",v,!0),n.addEventListener("mousedown",b,{capture:!0,passive:!1}),n.addEventListener("touchstart",b,{capture:!0,passive:!1}),n.addEventListener("click",y,{capture:!0,passive:!1}),n.addEventListener("keydown",x,{capture:!0,passive:!1}),l},S=function(){if(i.active)return n.removeEventListener("focusin",v,!0),n.removeEventListener("mousedown",b,!0),n.removeEventListener("touchstart",b,!0),n.removeEventListener("click",y,!0),n.removeEventListener("keydown",x,!0),l},_=function(w){var I=w.some(function(F){var P=Array.from(F.removedNodes);return P.some(function(k){return k===i.mostRecentlyFocusedNode})});I&&h(m())},E=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(_):void 0,R=function(){E&&(E.disconnect(),i.active&&!i.paused&&i.containers.map(function(w){E.observe(w,{subtree:!0,childList:!0})}))};return l={get active(){return i.active},get paused(){return i.paused},activate:function(w){if(i.active)return this;var I=a(w,"onActivate"),F=a(w,"onPostActivate"),P=a(w,"checkCanFocusTrap");P||f(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=n.activeElement,I?.();var k=function(){P&&f(),A(),R(),F?.()};return P?(P(i.containers.concat()).then(k,k),this):(k(),this)},deactivate:function(w){if(!i.active)return this;var I=lv({onDeactivate:s.onDeactivate,onPostDeactivate:s.onPostDeactivate,checkCanReturnFocus:s.checkCanReturnFocus},w);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,S(),i.active=!1,i.paused=!1,R(),cv.deactivateTrap(r,l);var F=a(I,"onDeactivate"),P=a(I,"onPostDeactivate"),k=a(I,"checkCanReturnFocus"),N=a(I,"returnFocus","returnFocusOnDeactivate");F?.();var j=function(){uv(function(){N&&h(p(i.nodeFocusedBeforeActivation)),P?.()})};return N&&k?(k(p(i.nodeFocusedBeforeActivation)).then(j,j),this):(j(),this)},pause:function(w){if(i.paused||!i.active)return this;var I=a(w,"onPause"),F=a(w,"onPostPause");return i.paused=!0,I?.(),S(),R(),F?.(),this},unpause:function(w){if(!i.paused||!i.active)return this;var I=a(w,"onUnpause"),F=a(w,"onPostUnpause");return i.paused=!1,I?.(),f(),A(),R(),F?.(),this},updateContainerElements:function(w){var I=[].concat(w).filter(Boolean);return i.containers=I.map(function(F){return typeof F=="string"?n.querySelector(F):F}),i.active&&f(),R(),this}},l.updateContainerElements(e),l};var o_=function(t,e){var o={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(o[n[r]]=t[n[r]]);return o},Hr="modal-item",pv=(t,e)=>n=>{let r=ae(),s=fv(null),[i,l]=Jf(!1),a=fv(!1),[c,u]=Jf(null),{modalState:m,classPrefix:f,containerRef:d,transTime:h,setCloseOnBlur:p,setBodyScrollLock:g,openModal:b}=r,{className:v,htmlElement:C="dialog",slug:x="",closeOnBlur:y=!0,lockBodyScroll:A=!0,classPrefix:S,onEnter:_,onEntering:E,onEntered:R,onExit:D,onExiting:w,onExited:I,openOnInit:F,trapFocus:P=!0,focusTrapOptions:k={}}=n,N=o_(n,["className","htmlElement","slug","closeOnBlur","lockBodyScroll","classPrefix","onEnter","onEntering","onEntered","onExit","onExiting","onExited","openOnInit","trapFocus","focusTrapOptions"]),j=S||f,T=e||x,O=m[T]&&m[T].isOpen;is(()=>{if(P){let $=s.current;if(a.current===!1&&$){let W=mv($,Object.assign(Object.assign({},k),{fallbackFocus:k?.fallbackFocus||$,allowOutsideClick:typeof k.allowOutsideClick<"u"?k.allowOutsideClick:!0}));u(W),a.current=!0}}},[P,i,k]),is(()=>{l(!0)},[]),is(()=>(c&&(O?c.activate():c.deactivate()),()=>{c&&c.deactivate()}),[O,c]),is(()=>{O&&p(y)},[O,y,p]),is(()=>{let $=s.current;return $&&g(!!(O&&A),$),()=>{$&&g(!1,$)}},[O,A,g]);let[M,B]=Jf(O);if(is(()=>{O?B(O):setTimeout(()=>B(!1),h)},[O,h]),is(()=>{F&&b(T)},[T,F,b]),d.current){let $=j?`${j}__${Hr}`:Hr,W=[$,`${$}--slug-${T}`,v].filter(Boolean).join(" "),H=Object.assign({role:C!=="dialog"?"dialog":void 0,open:C==="dialog"?M||O:void 0,"aria-modal":!0,"aria-label":N["aria-labelledby"]?void 0:T},N);return r_.createPortal(Zf(Da,{nodeRef:s,timeout:h,in:O,classNames:Su($),appear:!0,onEnter:_,onEntering:E,onEntered:R,onExit:D,onExiting:w,onExited:I,children:Zf(C,Object.assign({ref:s,id:N?.id||T,className:W},H,{children:Zf(t,Object.assign({},n,{isOpen:O,modal:r}))}))}),d.current)}return null};import{jsx as hv}from"react/jsx-runtime";import{Fragment as gv}from"react";var n_=t=>{let{children:e}=t;return e?typeof e=="function"?hv(gv,{children:e(t)}):hv(gv,{children:e}):null},lt=pv(n_);import{jsx as bv}from"react/jsx-runtime";var s_=function(t,e){var o={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(o[n[r]]=t[n[r]]);return o},zr="modal-container",Qf=t=>{let{oneModalIsOpen:e,classPrefix:o,transTime:n,setContainerRef:r,containerRef:s,closeAllModals:i,closeOnBlur:l}=ae(),{className:a,htmlElement:c="div",children:u,onClick:m}=t,f=s_(t,["className","htmlElement","children","onClick"]),d=o?`${o}__${zr}`:zr,h=[d,a].filter(Boolean).join(" "),p=Object.assign(Object.assign({},f),{onClick:g=>{l&&i(),typeof m=="function"&&m(g)}});return bv(Da,{nodeRef:s,in:e,timeout:n,classNames:Su(d),appear:!0,children:bv(c,Object.assign({className:h,ref:r},p,{children:u&&u}))})};import{jsx as Sv,jsxs as d_}from"react/jsx-runtime";import{Fragment as m_,useState as Du,useRef as Av,useEffect as Fu,useCallback as Cn,useReducer as f_}from"react";function i_(t){if(Array.isArray(t)){for(var e=0,o=Array(t.length);e<t.length;e++)o[e]=t[e];return o}else return Array.from(t)}var Eu=!1;typeof window<"u"&&(qf={get passive(){Eu=!0}},window.addEventListener("testPassive",null,qf),window.removeEventListener("testPassive",null,qf));var qf,ui=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),Xr=[],di=!1,Kf=-1,Ta=void 0,as=void 0,Na=void 0,vv=function(e){return Xr.some(function(o){return!!(o.options.allowTouchMove&&o.options.allowTouchMove(e))})},ka=function(e){var o=e||window.event;return vv(o.target)||o.touches.length>1?!0:(o.preventDefault&&o.preventDefault(),!1)},a_=function(e){if(Na===void 0){var o=!!e&&e.reserveScrollBarGap===!0,n=window.innerWidth-document.documentElement.clientWidth;if(o&&n>0){var r=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"),10);Na=document.body.style.paddingRight,document.body.style.paddingRight=r+n+"px"}}Ta===void 0&&(Ta=document.body.style.overflow,document.body.style.overflow="hidden")},xv=function(){Na!==void 0&&(document.body.style.paddingRight=Na,Na=void 0),Ta!==void 0&&(document.body.style.overflow=Ta,Ta=void 0)},l_=function(){return window.requestAnimationFrame(function(){if(as===void 0){as={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left};var e=window,o=e.scrollY,n=e.scrollX,r=e.innerHeight;document.body.style.position="fixed",document.body.style.top=-o,document.body.style.left=-n,setTimeout(function(){return window.requestAnimationFrame(function(){var s=r-window.innerHeight;s&&o>=r&&(document.body.style.top=-(o+s))})},300)}})},Cv=function(){if(as!==void 0){var e=-parseInt(document.body.style.top,10),o=-parseInt(document.body.style.left,10);document.body.style.position=as.position,document.body.style.top=as.top,document.body.style.left=as.left,window.scrollTo(o,e),as=void 0}},c_=function(e){return e?e.scrollHeight-e.scrollTop<=e.clientHeight:!1},u_=function(e,o){var n=e.targetTouches[0].clientY-Kf;return vv(e.target)?!1:o&&o.scrollTop===0&&n>0||c_(o)&&n<0?ka(e):(e.stopPropagation(),!0)},_u=function(e,o){if(!e){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!Xr.some(function(r){return r.targetElement===e})){var n={targetElement:e,options:o||{}};Xr=[].concat(i_(Xr),[n]),ui?l_():a_(o),ui&&(e.ontouchstart=function(r){r.targetTouches.length===1&&(Kf=r.targetTouches[0].clientY)},e.ontouchmove=function(r){r.targetTouches.length===1&&u_(r,e)},di||(document.addEventListener("touchmove",ka,Eu?{passive:!1}:void 0),di=!0))}},yv=function(){ui&&(Xr.forEach(function(e){e.targetElement.ontouchstart=null,e.targetElement.ontouchmove=null}),di&&(document.removeEventListener("touchmove",ka,Eu?{passive:!1}:void 0),di=!1),Kf=-1),ui?Cv():xv(),Xr=[]},Ru=function(e){if(!e){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}Xr=Xr.filter(function(o){return o.targetElement!==e}),ui&&(e.ontouchstart=null,e.ontouchmove=null,di&&Xr.length===0&&(document.removeEventListener("touchmove",ka,Eu?{passive:!1}:void 0),di=!1)),ui?Cv():xv()};var wv=({classPrefix:t,zIndex:e})=>{let o=t?`${t}__`:"";return`
|
|
14
14
|
.${o}${zr} {
|
|
15
15
|
top: 0;
|
|
16
16
|
right: 0;
|
|
@@ -45,7 +45,7 @@ import{a as mf,b as Y,c as ff,d as so,e as QA,f as qA,g as pf,h as KA,i as e4}fr
|
|
|
45
45
|
visibility: visible;
|
|
46
46
|
}
|
|
47
47
|
`};var Iv=(t,e)=>{let o=Object.assign({},t),{type:n,payload:r}=e;switch(n){case"UPDATE_MODAL":{let{slug:s}=r;s&&(o[s]=Object.assign(Object.assign({},o[s]),r));break}case"OPEN_MODAL":{let{slug:s}=r;s&&(s in o&&o[s].isOpen||(o[s]=Object.assign(Object.assign({},o[s]),{slug:s,openedOn:Date.now(),isOpen:!0})));break}case"TOGGLE_MODAL":{let{slug:s}=r;if(s){let i=s in o&&o[s].isOpen;o[s]=Object.assign(Object.assign({},o[s]),{slug:s,openedOn:i?void 0:Date.now(),isOpen:!i})}break}case"CLOSE_MODAL":{let{slug:s}=r;s&&(o[s]=Object.assign(Object.assign({},o[s]),{slug:s,openedOn:void 0,isOpen:!1}));break}case"REMOVE_MODAL":{let{slug:s}=r;s&&s in o&&delete o[s];break}case"CLOSE_LATEST_MODAL":{let s=Object.keys(o).reduce((i,l)=>{let a=o[l];return a.isOpen&&typeof a.openedOn=="number"&&(!i||typeof i.openedOn=="number"&&a.openedOn>i.openedOn)?a:i},void 0);s&&(o[s.slug]=Object.assign(Object.assign({},o[s.slug]),{isOpen:!1,openedOn:void 0}));break}case"CLOSE_ALL_MODALS":{o=Object.entries(o).reduce((s,[i,l])=>(s[i]=Object.assign(Object.assign({},l),{isOpen:!1,openedOn:void 0}),s),{});break}default:break}return o};var p_=()=>{if(typeof window<"u")return new URLSearchParams(window.location.search)},h_=()=>{let t=p_(),e=[];if(t){let o=t.get("modal");o&&(o.includes(",")?e=o.split(","):e=[o])}return e},ep=t=>{let{classPrefix:e,minifyCSS:o=!0,generateCSS:n=!0,zIndex:r=9999,handleParamChange:s,children:i,transTime:l=250}=t,a=Av(null),[c,u]=f_(Iv,{},()=>h_().reduce((P,k)=>(P[k]={slug:k,isOpen:!0,openedOn:Date.now()},P),{})),[m,f]=Du(!1),[d,h]=Du(!1),[p,g]=Du(!1),[b,v]=Du(""),C=Av(!1),x=Cn(I=>{I.keyCode===27&&u({type:"CLOSE_LATEST_MODAL"})},[]);Fu(()=>(C.current||(document.addEventListener("keydown",I=>x(I),!1),C.current=!0),()=>{C.current&&document.removeEventListener("keydown",I=>x(I),!1)}),[x]),Fu(()=>{if(n){let I="";I=wv({classPrefix:e,zIndex:r}),o&&(I=I.replace(/\n/g,"").replace(/\s\s+/g," ")),v(I)}},[n,o,r,e]),Fu(()=>{if(typeof s=="function"&&s(c),typeof s=="boolean"&&s){let I=Object.keys(c).filter(N=>c[N].isOpen),F=new URLSearchParams;for(let N of I)F.append("modal",N);let P=F.toString()?`?${F}`:"",k=`${window.location.pathname}${P}`;window.history.pushState({},"",k)}},[c,s]),Fu(()=>{let I=Object.keys(c).some(F=>c[F].isOpen);f(I)},[c]);let y=Cn((I,F)=>{F&&(I?(_u(F),g(!0)):(Ru(F),g(!1)))},[]),A=Cn(I=>{a.current=I},[]),S=Cn(I=>{u({type:"OPEN_MODAL",payload:{slug:I}})},[]),_=Cn(I=>{u({type:"CLOSE_MODAL",payload:{slug:I}})},[]),E=Cn(()=>{u({type:"CLOSE_ALL_MODALS"})},[]),R=Cn(I=>{u({type:"TOGGLE_MODAL",payload:{slug:I}})},[]),D=Cn(I=>c[I]&&c[I].isOpen,[c]),w=Object.assign({},t);return delete w.children,d_(m_,{children:[n&&Sv("style",{dangerouslySetInnerHTML:{__html:b}}),Sv(Iu.Provider,{value:Object.assign(Object.assign({},w),{transTime:l,containerRef:a,modalState:c,oneModalIsOpen:m,isModalOpen:D,closeOnBlur:d,bodyScrollIsLocked:p,classPrefix:e,closeAllModals:E,setCloseOnBlur:h,openModal:S,closeModal:_,toggleModal:R,setBodyScrollLock:y,setContainerRef:A}),children:i})]})};import{usePathname as U_,useRouter as Z_}from"next/navigation.js";import*as kv from"qs-esm";import Tv,{createContext as J_,useCallback as ls,useContext as Q_,useEffect as Nu,useState as ja}from"react";import ge,{forwardRef as g_}from"react";import b_ from"react-dom";import Io from"react";import Ev from"react";import __ from"react";var v_=t=>{switch(t){case"success":return y_;case"info":return I_;case"warning":return w_;case"error":return S_;default:return null}},x_=Array(12).fill(0),C_=({visible:t,className:e})=>Io.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},Io.createElement("div",{className:"sonner-spinner"},x_.map((o,n)=>Io.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),y_=Io.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Io.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),w_=Io.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},Io.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),I_=Io.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Io.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),S_=Io.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Io.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),A_=Io.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},Io.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Io.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),E_=()=>{let[t,e]=Ev.useState(document.hidden);return Ev.useEffect(()=>{let o=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",o),()=>window.removeEventListener("visibilitychange",o)},[]),t},tp=1,R_=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:o,...n}=t,r=typeof t?.id=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:tp++,s=this.toasts.find(l=>l.id===r),i=t.dismissible===void 0?!0:t.dismissible;return s?this.toasts=this.toasts.map(l=>l.id===r?(this.publish({...l,...t,id:r,title:o}),{...l,...t,id:r,dismissible:i,title:o}):l):this.addToast({title:o,...n,dismissible:i,id:r}),r},this.dismiss=t=>(t||this.toasts.forEach(e=>{this.subscribers.forEach(o=>o({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let o;e.loading!==void 0&&(o=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let n=t instanceof Promise?t:t(),r=o!==void 0,s,i=n.then(async a=>{if(s=["resolve",a],__.isValidElement(a))r=!1,this.create({id:o,type:"default",message:a});else if(F_(a)&&!a.ok){r=!1;let c=typeof e.error=="function"?await e.error(`HTTP error! status: ${a.status}`):e.error,u=typeof e.description=="function"?await e.description(`HTTP error! status: ${a.status}`):e.description;this.create({id:o,type:"error",message:c,description:u})}else if(e.success!==void 0){r=!1;let c=typeof e.success=="function"?await e.success(a):e.success,u=typeof e.description=="function"?await e.description(a):e.description;this.create({id:o,type:"success",message:c,description:u})}}).catch(async a=>{if(s=["reject",a],e.error!==void 0){r=!1;let c=typeof e.error=="function"?await e.error(a):e.error,u=typeof e.description=="function"?await e.description(a):e.description;this.create({id:o,type:"error",message:c,description:u})}}).finally(()=>{var a;r&&(this.dismiss(o),o=void 0),(a=e.finally)==null||a.call(e)}),l=()=>new Promise((a,c)=>i.then(()=>s[0]==="reject"?c(s[1]):a(s[1])).catch(c));return typeof o!="string"&&typeof o!="number"?{unwrap:l}:Object.assign(o,{unwrap:l})},this.custom=(t,e)=>{let o=e?.id||tp++;return this.create({jsx:t(o),id:o,...e}),o},this.subscribers=[],this.toasts=[]}},Oo=new R_,D_=(t,e)=>{let o=e?.id||tp++;return Oo.addToast({title:t,...e,id:o}),o},F_=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",P_=D_,T_=()=>Oo.toasts,be=Object.assign(P_,{success:Oo.success,info:Oo.info,warning:Oo.warning,error:Oo.error,custom:Oo.custom,message:Oo.message,promise:Oo.promise,dismiss:Oo.dismiss,loading:Oo.loading},{getHistory:T_});function N_(t,{insertAt:e}={}){if(!t||typeof document>"u")return;let o=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e==="top"&&o.firstChild?o.insertBefore(n,o.firstChild):o.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}N_(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
48
|
-
`);function Pu(t){return t.label!==void 0}var k_=3,L_="32px",_v=4e3,O_=356,j_=14,B_=20,$_=200;function M_(...t){return t.filter(Boolean).join(" ")}var V_=t=>{var e,o,n,r,s,i,l,a,c,u,m;let{invert:f,toast:d,unstyled:h,interacting:p,setHeights:g,visibleToasts:b,heights:v,index:C,toasts:x,expanded:y,removeToast:A,defaultRichColors:S,closeButton:_,style:E,cancelButtonStyle:R,actionButtonStyle:D,className:w="",descriptionClassName:I="",duration:F,position:P,gap:k,loadingIcon:N,expandByDefault:j,classNames:T,icons:O,closeButtonAriaLabel:M="Close toast",pauseWhenPageIsHidden:B,cn:$}=t,[W,H]=ge.useState(!1),[X,G]=ge.useState(!1),[z,Z]=ge.useState(!1),[V,re]=ge.useState(!1),[ee,te]=ge.useState(!1),[Q,xe]=ge.useState(0),[he,Ge]=ge.useState(0),de=ge.useRef(d.duration||F||_v),we=ge.useRef(null),Ye=ge.useRef(null),ie=C===0,Pe=C+1<=b,le=d.type,Be=d.dismissible!==!1,We=d.className||"",qe=d.descriptionClassName||"",ke=ge.useMemo(()=>v.findIndex(ne=>ne.toastId===d.id)||0,[v,d.id]),Ue=ge.useMemo(()=>{var ne;return(ne=d.closeButton)!=null?ne:_},[d.closeButton,_]),fe=ge.useMemo(()=>d.duration||F||_v,[d.duration,F]),me=ge.useRef(0),je=ge.useRef(0),$e=ge.useRef(0),Te=ge.useRef(null),[J,oe]=P.split("-"),ce=ge.useMemo(()=>v.reduce((ne,K,se)=>se>=ke?ne:ne+K.height,0),[v,ke]),Le=E_(),Ae=d.invert||f,Ee=le==="loading";je.current=ge.useMemo(()=>ke*k+ce,[ke,ce]),ge.useEffect(()=>{H(!0)},[]),ge.useEffect(()=>{let ne=Ye.current;if(ne){let K=ne.getBoundingClientRect().height;return Ge(K),g(se=>[{toastId:d.id,height:K,position:d.position},...se]),()=>g(se=>se.filter(Ve=>Ve.toastId!==d.id))}},[g,d.id]),ge.useLayoutEffect(()=>{if(!W)return;let ne=Ye.current,K=ne.style.height;ne.style.height="auto";let se=ne.getBoundingClientRect().height;ne.style.height=K,Ge(se),g(Ve=>Ve.find(Je=>Je.toastId===d.id)?Ve.map(Je=>Je.toastId===d.id?{...Je,height:se}:Je):[{toastId:d.id,height:se,position:d.position},...Ve])},[W,d.title,d.description,g,d.id]);let pe=ge.useCallback(()=>{G(!0),xe(je.current),g(ne=>ne.filter(K=>K.toastId!==d.id)),setTimeout(()=>{A(d)},$_)},[d,A,g,je]);ge.useEffect(()=>{if(d.promise&&le==="loading"||d.duration===1/0||d.type==="loading")return;let ne;return y||p||B&&Le?(()=>{if($e.current<me.current){let K=new Date().getTime()-me.current;de.current=de.current-K}$e.current=new Date().getTime()})():de.current!==1/0&&(me.current=new Date().getTime(),ne=setTimeout(()=>{var K;(K=d.onAutoClose)==null||K.call(d,d),pe()},de.current)),()=>clearTimeout(ne)},[y,p,d,le,B,Le,pe]),ge.useEffect(()=>{d.delete&&pe()},[pe,d.delete]);function ue(){var ne,K,se;return O!=null&&O.loading?ge.createElement("div",{className:$(T?.loader,(ne=d?.classNames)==null?void 0:ne.loader,"sonner-loader"),"data-visible":le==="loading"},O.loading):N?ge.createElement("div",{className:$(T?.loader,(K=d?.classNames)==null?void 0:K.loader,"sonner-loader"),"data-visible":le==="loading"},N):ge.createElement(C_,{className:$(T?.loader,(se=d?.classNames)==null?void 0:se.loader),visible:le==="loading"})}return ge.createElement("li",{tabIndex:0,ref:Ye,className:$(w,We,T?.toast,(e=d?.classNames)==null?void 0:e.toast,T?.default,T?.[le],(o=d?.classNames)==null?void 0:o[le]),"data-sonner-toast":"","data-rich-colors":(n=d.richColors)!=null?n:S,"data-styled":!(d.jsx||d.unstyled||h),"data-mounted":W,"data-promise":!!d.promise,"data-swiped":ee,"data-removed":X,"data-visible":Pe,"data-y-position":J,"data-x-position":oe,"data-index":C,"data-front":ie,"data-swiping":z,"data-dismissible":Be,"data-type":le,"data-invert":Ae,"data-swipe-out":V,"data-expanded":!!(y||j&&W),style:{"--index":C,"--toasts-before":C,"--z-index":x.length-C,"--offset":`${X?Q:je.current}px`,"--initial-height":j?"auto":`${he}px`,...E,...d.style},onPointerDown:ne=>{Ee||!Be||(we.current=new Date,xe(je.current),ne.target.setPointerCapture(ne.pointerId),ne.target.tagName!=="BUTTON"&&(Z(!0),Te.current={x:ne.clientX,y:ne.clientY}))},onPointerUp:()=>{var ne,K,se,Ve;if(V||!Be)return;Te.current=null;let Je=Number(((ne=Ye.current)==null?void 0:ne.style.getPropertyValue("--swipe-amount").replace("px",""))||0),ft=new Date().getTime()-((K=we.current)==null?void 0:K.getTime()),kt=Math.abs(Je)/ft;if(Math.abs(Je)>=B_||kt>.11){xe(je.current),(se=d.onDismiss)==null||se.call(d,d),pe(),re(!0),te(!1);return}(Ve=Ye.current)==null||Ve.style.setProperty("--swipe-amount","0px"),Z(!1)},onPointerMove:ne=>{var K,se,Ve;if(!Te.current||!Be)return;let Je=ne.clientY-Te.current.y,ft=((K=window.getSelection())==null?void 0:K.toString().length)>0;Number(((se=Ye.current)==null?void 0:se.style.getPropertyValue("--swipe-amount").replace("px",""))||0)>0&&te(!0),!ft&&((Ve=Ye.current)==null||Ve.style.setProperty("--swipe-amount",`${Math.max(0,Je)}px`))}},Ue&&!d.jsx?ge.createElement("button",{"aria-label":M,"data-disabled":Ee,"data-close-button":!0,onClick:Ee||!Be?()=>{}:()=>{var ne;pe(),(ne=d.onDismiss)==null||ne.call(d,d)},className:$(T?.closeButton,(r=d?.classNames)==null?void 0:r.closeButton)},(s=O?.close)!=null?s:A_):null,d.jsx||ge.isValidElement(d.title)?d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title:ge.createElement(ge.Fragment,null,le||d.icon||d.promise?ge.createElement("div",{"data-icon":"",className:$(T?.icon,(i=d?.classNames)==null?void 0:i.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||ue():null,d.type!=="loading"?d.icon||O?.[le]||v_(le):null):null,ge.createElement("div",{"data-content":"",className:$(T?.content,(l=d?.classNames)==null?void 0:l.content)},ge.createElement("div",{"data-title":"",className:$(T?.title,(a=d?.classNames)==null?void 0:a.title)},typeof d.title=="function"?d.title():d.title),d.description?ge.createElement("div",{"data-description":"",className:$(I,qe,T?.description,(c=d?.classNames)==null?void 0:c.description)},typeof d.description=="function"?d.description():d.description):null),ge.isValidElement(d.cancel)?d.cancel:d.cancel&&Pu(d.cancel)?ge.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||R,onClick:ne=>{var K,se;Pu(d.cancel)&&Be&&((se=(K=d.cancel).onClick)==null||se.call(K,ne),pe())},className:$(T?.cancelButton,(u=d?.classNames)==null?void 0:u.cancelButton)},d.cancel.label):null,ge.isValidElement(d.action)?d.action:d.action&&Pu(d.action)?ge.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||D,onClick:ne=>{var K,se;Pu(d.action)&&((se=(K=d.action).onClick)==null||se.call(K,ne),!ne.defaultPrevented&&pe())},className:$(T?.actionButton,(m=d?.classNames)==null?void 0:m.actionButton)},d.action.label):null))};function Rv(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}var Dv=g_(function(t,e){let{invert:o,position:n="bottom-right",hotkey:r=["altKey","KeyT"],expand:s,closeButton:i,className:l,offset:a,theme:c="light",richColors:u,duration:m,style:f,visibleToasts:d=k_,toastOptions:h,dir:p=Rv(),gap:g=j_,loadingIcon:b,icons:v,containerAriaLabel:C="Notifications",pauseWhenPageIsHidden:x,cn:y=M_}=t,[A,S]=ge.useState([]),_=ge.useMemo(()=>Array.from(new Set([n].concat(A.filter(B=>B.position).map(B=>B.position)))),[A,n]),[E,R]=ge.useState([]),[D,w]=ge.useState(!1),[I,F]=ge.useState(!1),[P,k]=ge.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),N=ge.useRef(null),j=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=ge.useRef(null),O=ge.useRef(!1),M=ge.useCallback(B=>{S($=>{var W;return(W=$.find(H=>H.id===B.id))!=null&&W.delete||Oo.dismiss(B.id),$.filter(({id:H})=>H!==B.id)})},[]);return ge.useEffect(()=>Oo.subscribe(B=>{if(B.dismiss){S($=>$.map(W=>W.id===B.id?{...W,delete:!0}:W));return}setTimeout(()=>{b_.flushSync(()=>{S($=>{let W=$.findIndex(H=>H.id===B.id);return W!==-1?[...$.slice(0,W),{...$[W],...B},...$.slice(W+1)]:[B,...$]})})})}),[]),ge.useEffect(()=>{if(c!=="system"){k(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?k("dark"):k("light")),typeof window>"u")return;let B=window.matchMedia("(prefers-color-scheme: dark)");try{B.addEventListener("change",({matches:$})=>{k($?"dark":"light")})}catch{B.addListener(({matches:W})=>{try{k(W?"dark":"light")}catch(H){console.error(H)}})}},[c]),ge.useEffect(()=>{A.length<=1&&w(!1)},[A]),ge.useEffect(()=>{let B=$=>{var W,H;r.every(X=>$[X]||$.code===X)&&(w(!0),(W=N.current)==null||W.focus()),$.code==="Escape"&&(document.activeElement===N.current||(H=N.current)!=null&&H.contains(document.activeElement))&&w(!1)};return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[r]),ge.useEffect(()=>{if(N.current)return()=>{T.current&&(T.current.focus({preventScroll:!0}),T.current=null,O.current=!1)}},[N.current]),ge.createElement("section",{"aria-label":`${C} ${j}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},_.map((B,$)=>{var W;let[H,X]=B.split("-");return A.length?ge.createElement("ol",{key:B,dir:p==="auto"?Rv():p,tabIndex:-1,ref:N,className:l,"data-sonner-toaster":!0,"data-theme":P,"data-y-position":H,"data-lifted":D&&A.length>1&&!s,"data-x-position":X,style:{"--front-toast-height":`${((W=E[0])==null?void 0:W.height)||0}px`,"--offset":typeof a=="number"?`${a}px`:a||L_,"--width":`${O_}px`,"--gap":`${g}px`,...f},onBlur:G=>{O.current&&!G.currentTarget.contains(G.relatedTarget)&&(O.current=!1,T.current&&(T.current.focus({preventScroll:!0}),T.current=null))},onFocus:G=>{G.target instanceof HTMLElement&&G.target.dataset.dismissible==="false"||O.current||(O.current=!0,T.current=G.relatedTarget)},onMouseEnter:()=>w(!0),onMouseMove:()=>w(!0),onMouseLeave:()=>{I||w(!1)},onPointerDown:G=>{G.target instanceof HTMLElement&&G.target.dataset.dismissible==="false"||F(!0)},onPointerUp:()=>F(!1)},A.filter(G=>!G.position&&$===0||G.position===B).map((G,z)=>{var Z,V;return ge.createElement(V_,{key:G.id,icons:v,index:z,toast:G,defaultRichColors:u,duration:(Z=h?.duration)!=null?Z:m,className:h?.className,descriptionClassName:h?.descriptionClassName,invert:o,visibleToasts:d,closeButton:(V=h?.closeButton)!=null?V:i,interacting:I,position:B,style:h?.style,unstyled:h?.unstyled,classNames:h?.classNames,cancelButtonStyle:h?.cancelButtonStyle,actionButtonStyle:h?.actionButtonStyle,removeToast:M,toasts:A.filter(re=>re.position==G.position),heights:E.filter(re=>re.position==G.position),setHeights:R,expandByDefault:s,gap:g,loadingIcon:b,expanded:D,pauseWhenPageIsHidden:x,cn:y})})):null}))});import{c as G_}from"react/compiler-runtime";import{jsx as La,jsxs as op}from"react/jsx-runtime";import{useRouter as W_}from"next/navigation.js";import"react";var nt=t=>{let{adminRoute:e,basePath:o="",path:n,serverURL:r}=t;if(e)if(e==="/"){if(!n)return`${r||""}${o}${e}`}else return`${r||""}${o}${e}${n}`;return`${r||""}${o}${n}`};var Tu="stay-logged-in",Oa="stay-logged-in",Fv=()=>{let t=G_(15),{refreshCookie:e}=_e(),o=W_(),{config:n}=Y(),{admin:r,routes:s}=n,{routes:i}=r,{logout:l}=i,{admin:a}=s,{toggleModal:c}=ae(),{t:u}=L(),m;if(t[0]!==a||t[1]!==l||t[2]!==e||t[3]!==o||t[4]!==u||t[5]!==c){let f;t[7]!==a||t[8]!==l||t[9]!==o||t[10]!==c?(f=()=>{c(Oa),o.push(nt({adminRoute:a,path:l}))},t[7]=a,t[8]=l,t[9]=o,t[10]=c,t[11]=f):f=t[11];let d;t[12]!==e||t[13]!==c?(d=()=>{e(),c(Oa)},t[12]=e,t[13]=c,t[14]=d):d=t[14],m=La(lt,{className:Tu,slug:Oa,children:op("div",{className:`${Tu}__wrapper`,children:[op("div",{className:`${Tu}__content`,children:[La("h1",{children:u("authentication:stayLoggedIn")}),La("p",{children:u("authentication:youAreInactive")})]}),op("div",{className:`${Tu}__controls`,children:[La(U,{buttonStyle:"secondary",onClick:f,size:"large",children:u("authentication:logOut")}),La(U,{onClick:d,size:"large",children:u("authentication:stayLoggedIn")})]})]})}),t[0]=a,t[1]=l,t[2]=e,t[3]=o,t[4]=u,t[5]=c,t[6]=m}else m=t[6];return m};import{c as H_}from"react/compiler-runtime";import{useEffect as z_,useState as X_}from"react";function So(t,e){let o=H_(4),[n,r]=X_(t),s,i;return o[0]!==e||o[1]!==t?(s=()=>{let l=setTimeout(()=>{r(t)},e);return()=>{clearTimeout(l)}},i=[t,e],o[0]=e,o[1]=t,o[2]=s,o[3]=i):(s=o[2],i=o[3]),z_(s,i),n}import*as Pv from"qs-esm";var tt={delete:(t,e={headers:{}})=>{let o=e&&e.headers?{...e.headers}:{},n={...e,credentials:"include",headers:{...o},method:"delete"};return fetch(t,n)},get:(t,e={headers:{}})=>{let o="";return e.params&&(o=Pv.stringify(e.params,{addQueryPrefix:!0})),fetch(`${t}${o}`,{credentials:"include",...e})},patch:(t,e={headers:{}})=>{let o=e&&e.headers?{...e.headers}:{},n={...e,credentials:"include",headers:{...o},method:"PATCH"};return fetch(t,n)},post:(t,e={headers:{}})=>{let o=e&&e.headers?{...e.headers}:{},n={...e,credentials:"include",headers:{...o},method:"post"};return fetch(`${t}`,n)},put:(t,e={headers:{}})=>{let o=e&&e.headers?{...e.headers}:{},n={...e,credentials:"include",headers:{...o},method:"put"};return fetch(t,n)}};var Lv=J_({}),Nv=2147483647;function rp({children:t,permissions:e,user:o}){let[n,r]=ja(o),[s,i]=ja(),[l,a]=ja(),c=U_(),u=Z_(),{config:m}=Y(),{admin:{routes:{inactivity:f},user:d},routes:{admin:h,api:p},serverURL:g}=m,[b,v]=ja(e),{i18n:C}=L(),{closeAllModals:x,openModal:y}=ae(),[A,S]=ja(0),_=So(A,1e4),E=Tv.useRef(null),R=n?.id,D=ls(()=>{if(window.location.pathname.startsWith(h)){let T=`?redirect=${encodeURIComponent(window.location.pathname)}`;u.replace(nt({adminRoute:h,path:`${f}${T}`}))}else u.replace(nt({adminRoute:h,path:f}));x()},[u,h,f,x]),w=ls(()=>{i(void 0),a(void 0),clearTimeout(E.current)},[]),I=ls(T=>{T?.user?(r(T.user),i(T.token),a(T.exp)):(r(null),w())},[w]),F=ls(T=>{let O=Math.round(new Date().getTime()/1e3),M=(typeof l=="number"?l:0)-O;return(T||l&&M<120)&&(E.current=setTimeout(()=>{async function B(){try{let $=await tt.post(`${g}${p}/${d}/refresh-token?refresh`,{headers:{"Accept-Language":C.language}});if($.status===200){let W=await $.json();I(W)}else I(null),D()}catch($){be.error($.message)}}B()},1e3)),()=>{clearTimeout(E.current)}},[p,C.language,D,g,I,l,d]),P=ls(async T=>{try{let O=await tt.post(`${g}${p}/${d}/refresh-token`,{headers:{"Accept-Language":C.language}});if(O.status===200){let M=await O.json();return T||I(M),M.user}return I(null),D(),null}catch(O){return be.error(`Refreshing token failed: ${O.message}`),null}},[p,C.language,D,g,I,d]),k=ls(async()=>{try{return await tt.post(`${g}${p}/${d}/logout`),I(null),w(),!0}catch(T){return be.error(`Logging out failed: ${T.message}`),!1}},[p,w,g,I,d]),N=ls(async({locale:T}={})=>{let O=kv.stringify({locale:T},{addQueryPrefix:!0});try{let M=await tt.get(`${g}${p}/access${O}`,{headers:{"Accept-Language":C.language}});if(M.status===200){let B=await M.json();v(B)}else throw new Error(`Fetching permissions failed with status code ${M.status}`)}catch(M){be.error(`Refreshing permissions failed: ${M.message}`)}},[g,p,C]),j=Tv.useCallback(async()=>{try{let T=await tt.get(`${g}${p}/${d}/me`,{credentials:"include",headers:{"Accept-Language":C.language}});if(T.status===200){let O=await T.json(),M=null;return I(O),M}}catch(T){be.error(`Fetching user failed: ${T.message}`)}return null},[g,p,d,C.language,I]);return Nu(()=>{j()},[j]),Nu(()=>{R&&F()},[_,F,R]),Nu(()=>{S(Date.now())},[c]),Nu(()=>{let T,O,M=Math.round(new Date().getTime()/1e3),B=typeof l=="number"?l-M:0,$=Math.max(Math.min((B-60)*1e3,Nv),0),W=Math.max(Math.min(B*1e3,Nv),0);if(!n){clearTimeout(T),clearTimeout(O);return}return B>0&&(T=setTimeout(()=>{y(Oa)},$),O=setTimeout(()=>{I(null),D()},W)),()=>{T&&clearTimeout(T),O&&clearTimeout(O)}},[l,y,C,I,n]),Y_(Lv.Provider,{value:{fetchFullUser:j,logOut:k,permissions:b,refreshCookie:F,refreshCookieAsync:P,refreshPermissions:N,setPermissions:v,setUser:I,token:s,user:n},children:t})}var _e=()=>Q_(Lv);import{jsx as q_}from"react/jsx-runtime";import{dequal as Ov}from"dequal/lite";import{createContext as K_,useCallback as jv,useContext as eR,useEffect as tR,useRef as sp}from"react";function np(t,e){let o={...t};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(typeof e[n]=="object"&&!Array.isArray(e[n])&&t[n]?o[n]=np(t[n],e[n]):o[n]=e[n]);return o}var $v=K_({}),Bv=(t,e)=>({body:JSON.stringify({value:t}),headers:{"Accept-Language":e,"Content-Type":"application/json"}}),ip=({children:t})=>{let e=sp({}),o=sp({}),n=sp({}),{config:r}=Y(),{user:s}=_e(),{i18n:i}=L(),{routes:{api:l},serverURL:a}=r;tR(()=>{s||(o.current={})},[s]);let c=jv(async m=>{let f=o.current;if(typeof f[m]<"u")return f[m];let d=new Promise(h=>{(async()=>{let p=await tt.get(`${a}${l}/payload-preferences/${m}`,{headers:{"Accept-Language":i.language}}),g=null;p.status===200&&(g=(await p.json()).value),o.current[m]=g,h(g)})()});return f[m]=d,d},[i.language,l,o,a]),u=jv(async(m,f,d=!1)=>{if(d===!1){o.current[m]=f,await tt.post(`${a}${l}/payload-preferences/${m}`,Bv(f,i.language));return}let h=f,p=await c(m);if(typeof f=="object"&&typeof p=="object"&&typeof h=="object"){if(p&&(h=np(p,h)),Ov(h,p))return;n.current[m]={...n.current[m],...h}}else{if(h===p)return;n.current[m]=h}let g=async()=>{Ov(n.current[m],o.current[m])||(o.current[m]=n.current[m],await tt.post(`${a}${l}/payload-preferences/${m}`,Bv(o.current[m],i.language)),delete n.current[m])};setTimeout(()=>{g()})},[l,c,i.language,n,a]);return e.current.getPreference=c,e.current.setPreference=u,q_($v.Provider,{value:e.current,children:t})},Ht=()=>eR($v);var Mv=sR({}),ap=({children:t})=>{let{config:{localization:e=!1}}=Y(),{user:o}=_e(),n=e&&e.defaultLocale?e.defaultLocale:"en",{getPreference:r,setPreference:s}=Ht(),l=rR().get("locale"),[a,c]=lR(n),u=nR.useMemo(()=>e?vu(e,l||a)||vu(e,n):{},[a,l,e,n]);return aR(()=>{async function m(){if(e&&o)if(typeof l!="string")try{let f=await r("locale");c(f)}catch{c(n)}else s("locale",vu(e,l)?.code||n)}m()},[n,r,e,l,s,o]),oR(Mv.Provider,{value:u,children:t})},Ne=()=>iR(Mv);var ku=(t,e,o)=>`field-${t?.replace(/\./g,"__")}${e>1?`-${e}`:""}${o?`-${o}`:""}`;var Re=t=>{let e=cR(25),{as:o,hideLocale:n,htmlFor:r,label:s,localized:i,path:l,required:a,unstyled:c}=t,u=o===void 0?"label":o,m=n===void 0?!1:n,f=i===void 0?!1:i,d=a===void 0?!1:a,h=c===void 0?!1:c,{uuid:p}=He(),g=Ze(),b;e[0]!==g||e[1]!==r||e[2]!==l||e[3]!==p?(b=r||ku(l,g,p),e[0]=g,e[1]=r,e[2]=l,e[3]=p,e[4]=b):b=e[4];let v=b,{i18n:C}=L(),{code:x,label:y}=Ne();if(s){let A=`field-label ${h?"unstyled":""}`,S;if(e[5]!==u||e[6]!==x||e[7]!==m||e[8]!==v||e[9]!==C||e[10]!==s||e[11]!==y||e[12]!==f||e[13]!==d||e[14]!==A||e[15]!==h){let _;e[17]!==d||e[18]!==h?(_=d&&!h&&uR("span",{className:"required",children:"*"}),e[17]=d,e[18]=h,e[19]=_):_=e[19];let E;e[20]!==x||e[21]!==m||e[22]!==y||e[23]!==f?(E=f&&!m&&Vv("span",{className:"localized",children:["\u2014 ",typeof y=="string"?y:x]}),e[20]=x,e[21]=m,e[22]=y,e[23]=f,e[24]=E):E=e[24],S=Vv(u,{className:A,htmlFor:v,children:[dR(s,C),_,E]}),e[5]=u,e[6]=x,e[7]=m,e[8]=v,e[9]=C,e[10]=s,e[11]=y,e[12]=f,e[13]=d,e[14]=A,e[15]=h,e[16]=S}else S=e[16];return S}return null};var Lu=({collapsed:t,rowID:e,rows:o})=>o.reduce((n,r)=>(e===r.id&&(r.collapsed=t),r.collapsed&&n.collapsedIDs.push(r.id),n.updatedRows.push(r),n),{collapsedIDs:[],updatedRows:[]}),Ou=({collapsed:t,rows:e})=>e.reduce((o,n)=>(n.collapsed=t,t&&o.collapsedIDs.push(n.id),o.updatedRows.push(n),o),{collapsedIDs:[],updatedRows:[]});import{c as ZR}from"react/compiler-runtime";import{jsx as N0}from"react/jsx-runtime";import*as k0 from"react";import{jsx as za,jsxs as XR}from"react/jsx-runtime";import{useCallback as T0,useMemo as YR}from"react";import{c as GR}from"react/compiler-runtime";import{useRef as _0}from"react";import{c as mR}from"react/compiler-runtime";import{useEffect as fR,useRef as pR}from"react";var cs=(t,e,o)=>{let n=mR(9),r;n[0]!==o?(r=o===void 0?[]:o,n[0]=o,n[1]=r):r=n[1];let s=r,i;n[2]===Symbol.for("react.memo_cache_sentinel")?(i=Date.now(),n[2]=i):i=n[2];let l=pR(i),a;n[3]!==t||n[4]!==e?(a=()=>{let u=setTimeout(()=>{Date.now()-l.current>=e&&(t(),l.current=Date.now())},e-(Date.now()-l.current));return()=>{clearTimeout(u)}},n[3]=t,n[4]=e,n[5]=a):a=n[5];let c;n[6]!==e||n[7]!==s?(c=[e,...s],n[6]=e,n[7]=s,n[8]=c):c=n[8],fR(a,c)};import{jsx as hp}from"react/jsx-runtime";import*as A0 from"qs-esm";import I0,{createContext as LR,useCallback as Ma,useContext as OR,useEffect as S0,useRef as jR,useState as Qo}from"react";import{getTranslation as PR}from"@payloadcms/translations";var hR=Math.pow(10,8)*24*60*60*1e3,zH=-hR,ju=6048e5,Gv=864e5;var Ba=43200,lp=1440;var gR=3600;var Wv=gR*24,XH=Wv*7,bR=Wv*365.2425,vR=bR/12,YH=vR*3,cp=Symbol.for("constructDateFrom");function lo(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&cp in t?t[cp](e):t instanceof Date?new t.constructor(e):new Date(e)}function Ke(t,e){return lo(e||t,t)}var xR={};function Dr(){return xR}function Yr(t,e){let o=Dr(),n=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,r=Ke(t,e?.in),s=r.getDay(),i=(s<n?7:0)+s-n;return r.setDate(r.getDate()-i),r.setHours(0,0,0,0),r}function us(t,e){return Yr(t,{...e,weekStartsOn:1})}function Bu(t,e){let o=Ke(t,e?.in),n=o.getFullYear(),r=lo(o,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);let s=us(r),i=lo(o,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);let l=us(i);return o.getTime()>=s.getTime()?n+1:o.getTime()>=l.getTime()?n:n-1}function mi(t){let e=Ke(t),o=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return o.setUTCFullYear(e.getFullYear()),+t-+o}function yn(t,...e){let o=lo.bind(null,t||e.find(n=>typeof n=="object"));return e.map(o)}function up(t,e){let o=Ke(t,e?.in);return o.setHours(0,0,0,0),o}function Hv(t,e,o){let[n,r]=yn(o?.in,t,e),s=up(n),i=up(r),l=+s-mi(s),a=+i-mi(i);return Math.round((l-a)/Gv)}function zv(t,e){let o=Bu(t,e),n=lo(e?.in||t,0);return n.setFullYear(o,0,4),n.setHours(0,0,0,0),us(n)}function fi(t,e){let o=+Ke(t)-+Ke(e);return o<0?-1:o>0?1:o}function Xv(t){return lo(t,Date.now())}function Yv(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Uv(t){return!(!Yv(t)&&typeof t!="number"||isNaN(+Ke(t)))}function Zv(t,e,o){let[n,r]=yn(o?.in,t,e),s=n.getFullYear()-r.getFullYear(),i=n.getMonth()-r.getMonth();return s*12+i}function Jv(t){return e=>{let n=(t?Math[t]:Math.trunc)(e);return n===0?0:n}}function Qv(t,e){return+Ke(t)-+Ke(e)}function qv(t,e){let o=Ke(t,e?.in);return o.setHours(23,59,59,999),o}function Kv(t,e){let o=Ke(t,e?.in),n=o.getMonth();return o.setFullYear(o.getFullYear(),n+1,0),o.setHours(23,59,59,999),o}function e0(t,e){let o=Ke(t,e?.in);return+qv(o,e)==+Kv(o,e)}function t0(t,e,o){let[n,r,s]=yn(o?.in,t,t,e),i=fi(r,s),l=Math.abs(Zv(r,s));if(l<1)return 0;r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-i*l);let a=fi(r,s)===-i;e0(n)&&l===1&&fi(n,s)===1&&(a=!1);let c=i*(l-+a);return c===0?0:c}function o0(t,e,o){let n=Qv(t,e)/1e3;return Jv(o?.roundingMethod)(n)}function r0(t,e){let o=Ke(t,e?.in);return o.setFullYear(o.getFullYear(),0,1),o.setHours(0,0,0,0),o}function n0(t,e){let o=Ke(t,e?.in);return Hv(o,r0(o))+1}function s0(t,e){let o=Ke(t,e?.in),n=+us(o)-+zv(o);return Math.round(n/ju)+1}function $u(t,e){let o=Ke(t,e?.in),n=o.getFullYear(),r=Dr(),s=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=lo(e?.in||t,0);i.setFullYear(n+1,0,s),i.setHours(0,0,0,0);let l=Yr(i,e),a=lo(e?.in||t,0);a.setFullYear(n,0,s),a.setHours(0,0,0,0);let c=Yr(a,e);return+o>=+l?n+1:+o>=+c?n:n-1}function i0(t,e){let o=Dr(),n=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,r=$u(t,e),s=lo(e?.in||t,0);return s.setFullYear(r,0,n),s.setHours(0,0,0,0),Yr(s,e)}function a0(t,e){let o=Ke(t,e?.in),n=+Yr(o,e)-+i0(o,e);return Math.round(n/ju)+1}function st(t,e){let o=t<0?"-":"",n=Math.abs(t).toString().padStart(e,"0");return o+n}var Ur={y(t,e){let o=t.getFullYear(),n=o>0?o:1-o;return st(e==="yy"?n%100:n,e.length)},M(t,e){let o=t.getMonth();return e==="M"?String(o+1):st(o+1,2)},d(t,e){return st(t.getDate(),e.length)},a(t,e){let o=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return o.toUpperCase();case"aaa":return o;case"aaaaa":return o[0];case"aaaa":default:return o==="am"?"a.m.":"p.m."}},h(t,e){return st(t.getHours()%12||12,e.length)},H(t,e){return st(t.getHours(),e.length)},m(t,e){return st(t.getMinutes(),e.length)},s(t,e){return st(t.getSeconds(),e.length)},S(t,e){let o=e.length,n=t.getMilliseconds(),r=Math.trunc(n*Math.pow(10,o-3));return st(r,e.length)}};var pi={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},dp={G:function(t,e,o){let n=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return o.era(n,{width:"abbreviated"});case"GGGGG":return o.era(n,{width:"narrow"});case"GGGG":default:return o.era(n,{width:"wide"})}},y:function(t,e,o){if(e==="yo"){let n=t.getFullYear(),r=n>0?n:1-n;return o.ordinalNumber(r,{unit:"year"})}return Ur.y(t,e)},Y:function(t,e,o,n){let r=$u(t,n),s=r>0?r:1-r;if(e==="YY"){let i=s%100;return st(i,2)}return e==="Yo"?o.ordinalNumber(s,{unit:"year"}):st(s,e.length)},R:function(t,e){let o=Bu(t);return st(o,e.length)},u:function(t,e){let o=t.getFullYear();return st(o,e.length)},Q:function(t,e,o){let n=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return st(n,2);case"Qo":return o.ordinalNumber(n,{unit:"quarter"});case"QQQ":return o.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(n,{width:"wide",context:"formatting"})}},q:function(t,e,o){let n=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return st(n,2);case"qo":return o.ordinalNumber(n,{unit:"quarter"});case"qqq":return o.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return o.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(n,{width:"wide",context:"standalone"})}},M:function(t,e,o){let n=t.getMonth();switch(e){case"M":case"MM":return Ur.M(t,e);case"Mo":return o.ordinalNumber(n+1,{unit:"month"});case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})}},L:function(t,e,o){let n=t.getMonth();switch(e){case"L":return String(n+1);case"LL":return st(n+1,2);case"Lo":return o.ordinalNumber(n+1,{unit:"month"});case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})}},w:function(t,e,o,n){let r=a0(t,n);return e==="wo"?o.ordinalNumber(r,{unit:"week"}):st(r,e.length)},I:function(t,e,o){let n=s0(t);return e==="Io"?o.ordinalNumber(n,{unit:"week"}):st(n,e.length)},d:function(t,e,o){return e==="do"?o.ordinalNumber(t.getDate(),{unit:"date"}):Ur.d(t,e)},D:function(t,e,o){let n=n0(t);return e==="Do"?o.ordinalNumber(n,{unit:"dayOfYear"}):st(n,e.length)},E:function(t,e,o){let n=t.getDay();switch(e){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})}},e:function(t,e,o,n){let r=t.getDay(),s=(r-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return st(s,2);case"eo":return o.ordinalNumber(s,{unit:"day"});case"eee":return o.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return o.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(r,{width:"short",context:"formatting"});case"eeee":default:return o.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,o,n){let r=t.getDay(),s=(r-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return st(s,e.length);case"co":return o.ordinalNumber(s,{unit:"day"});case"ccc":return o.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return o.day(r,{width:"narrow",context:"standalone"});case"cccccc":return o.day(r,{width:"short",context:"standalone"});case"cccc":default:return o.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,o){let n=t.getDay(),r=n===0?7:n;switch(e){case"i":return String(r);case"ii":return st(r,e.length);case"io":return o.ordinalNumber(r,{unit:"day"});case"iii":return o.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return o.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return o.day(n,{width:"short",context:"formatting"});case"iiii":default:return o.day(n,{width:"wide",context:"formatting"})}},a:function(t,e,o){let r=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return o.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,o){let n=t.getHours(),r;switch(n===12?r=pi.noon:n===0?r=pi.midnight:r=n/12>=1?"pm":"am",e){case"b":case"bb":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return o.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,o){let n=t.getHours(),r;switch(n>=17?r=pi.evening:n>=12?r=pi.afternoon:n>=4?r=pi.morning:r=pi.night,e){case"B":case"BB":case"BBB":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return o.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,o){if(e==="ho"){let n=t.getHours()%12;return n===0&&(n=12),o.ordinalNumber(n,{unit:"hour"})}return Ur.h(t,e)},H:function(t,e,o){return e==="Ho"?o.ordinalNumber(t.getHours(),{unit:"hour"}):Ur.H(t,e)},K:function(t,e,o){let n=t.getHours()%12;return e==="Ko"?o.ordinalNumber(n,{unit:"hour"}):st(n,e.length)},k:function(t,e,o){let n=t.getHours();return n===0&&(n=24),e==="ko"?o.ordinalNumber(n,{unit:"hour"}):st(n,e.length)},m:function(t,e,o){return e==="mo"?o.ordinalNumber(t.getMinutes(),{unit:"minute"}):Ur.m(t,e)},s:function(t,e,o){return e==="so"?o.ordinalNumber(t.getSeconds(),{unit:"second"}):Ur.s(t,e)},S:function(t,e){return Ur.S(t,e)},X:function(t,e,o){let n=t.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return c0(n);case"XXXX":case"XX":return ds(n);case"XXXXX":case"XXX":default:return ds(n,":")}},x:function(t,e,o){let n=t.getTimezoneOffset();switch(e){case"x":return c0(n);case"xxxx":case"xx":return ds(n);case"xxxxx":case"xxx":default:return ds(n,":")}},O:function(t,e,o){let n=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+l0(n,":");case"OOOO":default:return"GMT"+ds(n,":")}},z:function(t,e,o){let n=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+l0(n,":");case"zzzz":default:return"GMT"+ds(n,":")}},t:function(t,e,o){let n=Math.trunc(+t/1e3);return st(n,e.length)},T:function(t,e,o){return st(+t,e.length)}};function l0(t,e=""){let o=t>0?"-":"+",n=Math.abs(t),r=Math.trunc(n/60),s=n%60;return s===0?o+String(r):o+String(r)+e+st(s,2)}function c0(t,e){return t%60===0?(t>0?"-":"+")+st(Math.abs(t)/60,2):ds(t,e)}function ds(t,e=""){let o=t>0?"-":"+",n=Math.abs(t),r=st(Math.trunc(n/60),2),s=st(n%60,2);return o+r+e+s}var u0=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},d0=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},CR=(t,e)=>{let o=t.match(/(P+)(p+)?/)||[],n=o[1],r=o[2];if(!r)return u0(t,e);let s;switch(n){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",u0(n,e)).replace("{{time}}",d0(r,e))},m0={p:d0,P:CR};var yR=/^D+$/,wR=/^Y+$/,IR=["D","DD","YY","YYYY"];function f0(t){return yR.test(t)}function p0(t){return wR.test(t)}function h0(t,e,o){let n=SR(t,e,o);if(console.warn(n),IR.includes(t))throw new RangeError(n)}function SR(t,e,o){let n=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${n} to the input \`${o}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var AR=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ER=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,_R=/^'([^]*?)'?$/,RR=/''/g,DR=/[a-zA-Z]/;function g0(t,e,o){let n=Dr(),r=o?.locale??n.locale??xa,s=o?.firstWeekContainsDate??o?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=o?.weekStartsOn??o?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,l=Ke(t,o?.in);if(!Uv(l))throw new RangeError("Invalid time value");let a=e.match(ER).map(u=>{let m=u[0];if(m==="p"||m==="P"){let f=m0[m];return f(u,r.formatLong)}return u}).join("").match(AR).map(u=>{if(u==="''")return{isToken:!1,value:"'"};let m=u[0];if(m==="'")return{isToken:!1,value:FR(u)};if(dp[m])return{isToken:!0,value:u};if(m.match(DR))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:u}});r.localize.preprocessor&&(a=r.localize.preprocessor(l,a));let c={firstWeekContainsDate:s,weekStartsOn:i,locale:r};return a.map(u=>{if(!u.isToken)return u.value;let m=u.value;(!o?.useAdditionalWeekYearTokens&&p0(m)||!o?.useAdditionalDayOfYearTokens&&f0(m))&&h0(m,e,String(t));let f=dp[m[0]];return f(l,m,r.localize,c)}).join("")}function FR(t){let e=t.match(_R);return e?e[1].replace(RR,"'"):t}function b0(t,e,o){let n=Dr(),r=o?.locale??n.locale??xa,s=2520,i=fi(t,e);if(isNaN(i))throw new RangeError("Invalid time value");let l=Object.assign({},o,{addSuffix:o?.addSuffix,comparison:i}),[a,c]=yn(o?.in,...i>0?[e,t]:[t,e]),u=o0(c,a),m=(mi(c)-mi(a))/1e3,f=Math.round((u-m)/60),d;if(f<2)return o?.includeSeconds?u<5?r.formatDistance("lessThanXSeconds",5,l):u<10?r.formatDistance("lessThanXSeconds",10,l):u<20?r.formatDistance("lessThanXSeconds",20,l):u<40?r.formatDistance("halfAMinute",0,l):u<60?r.formatDistance("lessThanXMinutes",1,l):r.formatDistance("xMinutes",1,l):f===0?r.formatDistance("lessThanXMinutes",1,l):r.formatDistance("xMinutes",f,l);if(f<45)return r.formatDistance("xMinutes",f,l);if(f<90)return r.formatDistance("aboutXHours",1,l);if(f<lp){let h=Math.round(f/60);return r.formatDistance("aboutXHours",h,l)}else{if(f<s)return r.formatDistance("xDays",1,l);if(f<Ba){let h=Math.round(f/lp);return r.formatDistance("xDays",h,l)}else if(f<Ba*2)return d=Math.round(f/Ba),r.formatDistance("aboutXMonths",d,l)}if(d=t0(c,a),d<12){let h=Math.round(f/Ba);return r.formatDistance("xMonths",h,l)}else{let h=d%12,p=Math.trunc(d/12);return h<3?r.formatDistance("aboutXYears",p,l):h<9?r.formatDistance("overXYears",p,l):r.formatDistance("almostXYears",p+1,l)}}function v0(t,e){return b0(t,Xv(t),e)}var ms=({date:t,i18n:e,pattern:o})=>{let n=new Date(t);return g0(n,o,{locale:e.dateFNS})},x0=({date:t,i18n:e})=>{let o=new Date(t);return v0(o,{locale:e.dateFNS})};var Jo=({collectionConfig:t,data:e,dateFormat:o,fallback:n,globalConfig:r,i18n:s})=>{let i;if(t){let l=t?.admin?.useAsTitle;if(l&&(i=e?.[l]||i,i)){let a=t.fields.find(u=>"name"in u&&u.name===l);if(a?.type==="date"){let u="date"in a.admin&&a?.admin?.date?.displayFormat||o;i=ms({date:i,i18n:s,pattern:u})||i}}}return r&&(i=PR(r?.label,s)||r?.slug),i||(i=n||`[${s.t("general:untitled")}]`),i};import{c as TR}from"react/compiler-runtime";import{jsx as NR}from"react/jsx-runtime";import mp from"react";var C0=mp.createContext({resetUploadEdits:void 0,updateUploadEdits:void 0,uploadEdits:void 0}),fp=t=>{let e=TR(5),{children:o}=t,[n,r]=mp.useState(void 0),s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=()=>{r({})},e[0]=s):s=e[0];let i=s,l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=u=>{r(m=>({...m||{},...u||{}}))},e[1]=l):l=e[1];let a=l,c;return e[2]!==o||e[3]!==n?(c=NR(C0.Provider,{value:{resetUploadEdits:i,updateUploadEdits:a,uploadEdits:n},children:o}),e[2]=o,e[3]=n,e[4]=c):c=e[4],c},Zr=()=>mp.useContext(C0);import*as pp from"qs-esm";import kR from"react";var $a=t=>{let{collectionSlug:e,docPermissions:o,globalSlug:n,isEditing:r}=t;return e?!!(r&&o?.update||!r&&o?.create):n?!!o?.update:!1};var y0=({id:t,collectionSlug:e,globalSlug:o})=>!!(o||e&&t);var w0=({id:t,api:e,collectionSlug:o,globalSlug:n,i18n:r,locale:s,permissions:i,serverURL:l,setDocPermissions:a,setHasPublishPermission:c,setHasSavePermission:u})=>kR.useCallback(async m=>{let f={locale:s||void 0},d=m?.id||t,h=y0({id:d,collectionSlug:o,globalSlug:n});if(h){let p=o?`/${o}/access/${d}`:n?`/globals/${n}/access`:null;if(p){let b=await(await fetch(`${l}${e}${p}?${pp.stringify(f)}`,{body:JSON.stringify({...m||{},_status:"draft"}),credentials:"include",headers:{"Accept-Language":r.language,"Content-Type":"application/json"},method:"post"})).json(),v=await fetch(`${l}${e}${p}?${pp.stringify(f)}`,{body:JSON.stringify({...m||{},_status:"published"}),credentials:"include",headers:{"Accept-Language":r.language,"Content-Type":"application/json"},method:"POST"}).then(C=>C.json());a(b),u($a({collectionSlug:o,docPermissions:b,globalSlug:n,isEditing:h})),c(v?.update)}}else{let p=o?i?.collections?.[o]:i?.globals?.[n];a(p),u($a({collectionSlug:o,docPermissions:p,globalSlug:n,isEditing:h}))}},[l,e,t,i,r.language,s,o,n]);var E0=LR({}),Fe=()=>OR(E0),BR=({children:t,...e})=>{let{id:o,collectionSlug:n,currentEditor:r,docPermissions:s,globalSlug:i,hasPublishedDoc:l,hasPublishPermission:a,hasSavePermission:c,initialData:u,initialState:m,isLocked:f,lastUpdateTime:d,mostRecentVersionIsAutosaved:h,unpublishedVersionCount:p,versionCount:g}=e,[b,v]=Qo(s),[C,x]=Qo(c),[y,A]=Qo(a),{permissions:S}=_e(),{config:{admin:{dateFormat:_},routes:{api:E},serverURL:R},getEntityConfig:D}=Y(),w=D({collectionSlug:n}),I=D({globalSlug:i}),F=jR(new AbortController),P=w||I,{i18n:k}=L(),{uploadEdits:N}=Zr(),[j,T]=Qo(()=>Jo({collectionConfig:w,data:{...u||{},id:o},dateFormat:_,fallback:o?.toString(),globalConfig:I,i18n:k})),[O,M]=Qo(h),[B,$]=Qo(g),[W,H]=Qo(l),[X,G]=Qo(p),[z,Z]=Qo(f),[V,re]=Qo(r),[ee,te]=Qo(d),[Q,xe]=Qo(u),he=m===void 0||u===void 0,{getPreference:Ge,setPreference:de}=Ht(),{code:we}=Ne(),Ye=`${R}${E}`,ie,Pe,le;i&&(ie=i,Pe="globals",le=`global-${ie}`),n&&(ie=n,Pe="collections",o&&(le=`collection-${ie}-${o}`));let Be=Ma(async(Te,J)=>{try{let ce=J===i?`where[globalSlug][equals]=${J}`:`where[document.value][equals]=${Te}&where[document.relationTo][equals]=${J}`,Le=await tt.get(`${R}${E}/payload-locked-documents?${ce}`),{docs:Ae}=await Le.json();if(Ae.length>0){let Ee=Ae[0].id;await tt.delete(`${R}${E}/payload-locked-documents/${Ee}`,{headers:{"Content-Type":"application/json"}}),Z(!1)}}catch(oe){console.error("Failed to unlock the document",oe)}},[R,E,i]),We=Ma(async(Te,J,oe)=>{try{let Le=J===i?`where[globalSlug][equals]=${J}`:`where[document.value][equals]=${Te}&where[document.relationTo][equals]=${J}`,Ae=await tt.get(`${R}${E}/payload-locked-documents?${Le}`),{docs:Ee}=await Ae.json();if(Ee.length>0){let pe=Ee[0].id,ue=typeof oe=="object"?{relationTo:oe.collection,value:oe.id}:{relationTo:"users",value:oe};await tt.patch(`${R}${E}/payload-locked-documents/${pe}`,{body:JSON.stringify({user:ue}),headers:{"Content-Type":"application/json"}})}}catch(ce){console.error("Failed to update the document editor",ce)}},[R,E,i]),qe=w0({id:o,api:E,collectionSlug:n,globalSlug:i,i18n:k,locale:we,permissions:S,serverURL:R,setDocPermissions:v,setHasPublishPermission:A,setHasSavePermission:x}),ke=Ma(()=>Ge(le),[Ge,le]),Ue=Ma(async(Te,J)=>{let oe=await ke();if(le)try{await de(le,{...oe,fields:{...oe?.fields||{},[Te]:{...oe?.fields?.[Te],...J}}})}catch(ce){console.error(ce)}},[de,le,ke]),fe=Ma(()=>{w&&w.versions?$(Math.min(B+1,w.versions.maxPerDoc)):I&&I.versions&&$(Math.min(B+1,I.versions.max))},[w,I,B]),me=I0.useCallback(Te=>{xe(Te)},[]);S0(()=>{T(Jo({collectionConfig:w,data:{...Q,id:o},dateFormat:_,fallback:o?.toString(),globalConfig:I,i18n:k}))},[w,I,Q,_,k,o]),S0(()=>{let Te=F.current;return()=>{if(Te)try{Te.abort()}catch{}}},[]);let je=I0.useMemo(()=>`${`${Ye}${Pe==="globals"?"/globals":""}/${ie}${o?`/${o}`:""}`}${A0.stringify({depth:0,"fallback-locale":"null",locale:we,uploadEdits:N||void 0},{addQueryPrefix:!0})}`,[Ye,we,Pe,o,ie,N]),$e={...e,action:je,currentEditor:V,docConfig:P,docPermissions:b,documentIsLocked:z,getDocPermissions:qe,getDocPreferences:ke,hasPublishedDoc:W,hasPublishPermission:y,hasSavePermission:C,incrementVersionCount:fe,initialData:u,initialState:m,isInitializing:he,lastUpdateTime:ee,mostRecentVersionIsAutosaved:O,preferencesKey:le,savedDocumentData:Q,setCurrentEditor:re,setDocFieldPreferences:Ue,setDocumentIsLocked:Z,setDocumentTitle:T,setHasPublishedDoc:H,setLastUpdateTime:te,setMostRecentVersionIsAutosaved:M,setUnpublishedVersionCount:G,title:j,unlockDocument:Be,unpublishedVersionCount:X,updateDocumentEditor:We,updateSavedDocumentData:me,versionCount:B};return hp(E0.Provider,{value:$e,children:t})},Va=t=>hp(fp,{children:hp(BR,{...t})});import{jsx as $R}from"react/jsx-runtime";import{createContext as MR,useContext as VR}from"react";var Mu=MR(""),Ga=({children:t,operation:e})=>$R(Mu.Provider,{value:e,children:t}),jo=()=>VR(Mu);var De=t=>{let e=GR(57),{disableFormData:o,hasRows:n,path:r,validate:s}=t,i=o===void 0?!1:o,l=Lt(),a=Uo(),c=es(),{user:u}=_e(),{id:m,collectionSlug:f}=Fe(),d=jo(),h;e[0]!==r?(h=z=>{let[Z,V]=z;return{dispatchField:V,field:Z&&Z?.[r]||null}},e[0]=r,e[1]=h):h=e[1];let{dispatchField:p,field:g}=Yt(h),{t:b}=L(),{config:v}=Y(),{getData:C,getDataByPath:x,getSiblingData:y,setModified:A}=He(),S=Ot(),_=g?.filterOptions,E=g?.value,R=g?.initialValue,D=typeof g?.valid=="boolean"?g.valid:!0,w=D===!1&&l,I=_0(D),F=_0(g?.errorMessage),P;e[2]!==i||e[3]!==p||e[4]!==n||e[5]!==S||e[6]!==r||e[7]!==A?(P=(z,Z)=>{let V=Z===void 0?!1:Z,re=z&&z.target?z.target.value:z;p({type:"UPDATE",disableFormData:i||n&&re>0,path:r,value:re}),V||typeof A=="function"&&S===!1&&setTimeout(()=>{A(!0)},10)},e[2]=i,e[3]=p,e[4]=n,e[5]=S,e[6]=r,e[7]=A,e[8]=P):P=e[8];let k=P;g?.errorMessage,g?.rows,g?.valid,g?.errorPaths,g?.customComponents;let N,j=g?.customComponents,T=g?.errorMessage,O;e[9]!==g?.errorPaths?(O=g?.errorPaths||[],e[9]=g?.errorPaths,e[10]=O):O=e[10];let M=g?.rows,B=g?.valid,$;e[11]!==_||e[12]!==R||e[13]!==c||e[14]!==r||e[15]!==a||e[16]!==k||e[17]!==w||e[18]!==l||e[19]!==j||e[20]!==T||e[21]!==O||e[22]!==M||e[23]!==B||e[24]!==E?($={customComponents:j,errorMessage:T,errorPaths:O,filterOptions:_,formInitializing:c,formProcessing:a,formSubmitted:l,initialValue:R,path:r,rows:M,setValue:k,showError:w,valid:B,value:E},e[11]=_,e[12]=R,e[13]=c,e[14]=r,e[15]=a,e[16]=k,e[17]=w,e[18]=l,e[19]=j,e[20]=T,e[21]=O,e[22]=M,e[23]=B,e[24]=E,e[25]=$):$=e[25],N=$;let W=N,H;e[26]!==f||e[27]!==v||e[28]!==i||e[29]!==p||e[30]!==g||e[31]!==C||e[32]!==x||e[33]!==y||e[34]!==n||e[35]!==m||e[36]!==d||e[37]!==r||e[38]!==b||e[39]!==u||e[40]!==s||e[41]!==E?(H=()=>{(async()=>{let Z=E;g?.rows&&Array.isArray(g.rows)&&(Z=x(r));let V=F.current,re=I.current,ee=typeof s=="function"?await s(Z,{id:m,collectionSlug:f,data:C(),operation:d,preferences:{},req:{payload:{config:v},t:b,user:u},siblingData:y(r)}):typeof F.current=="string"?F.current:I.current;if(typeof ee=="string"?(re=!1,V=ee):typeof ee=="boolean"&&(re=ee,V=void 0),re!==I.current||V!==F.current){I.current=re,F.current=V;let te={type:"UPDATE",errorMessage:V,path:r,rows:g?.rows,valid:re,validate:s,value:E};(i||n&&typeof E=="number"&&E>0)&&(te.disableFormData=!0),typeof p=="function"&&p(te)}})()},e[26]=f,e[27]=v,e[28]=i,e[29]=p,e[30]=g,e[31]=C,e[32]=x,e[33]=y,e[34]=n,e[35]=m,e[36]=d,e[37]=r,e[38]=b,e[39]=u,e[40]=s,e[41]=E,e[42]=H):H=e[42];let X=g?.rows,G;return e[43]!==f||e[44]!==i||e[45]!==p||e[46]!==C||e[47]!==x||e[48]!==y||e[49]!==m||e[50]!==d||e[51]!==r||e[52]!==X||e[53]!==u||e[54]!==s||e[55]!==E?(G=[E,i,p,C,y,x,m,d,r,u,s,X,f],e[43]=f,e[44]=i,e[45]=p,e[46]=C,e[47]=x,e[48]=y,e[49]=m,e[50]=d,e[51]=r,e[52]=X,e[53]=u,e[54]=s,e[55]=E,e[56]=G):G=e[56],cs(H,150,G),W};import{jsx as D0}from"react/jsx-runtime";import"react";import{c as WR}from"react/compiler-runtime";import{jsx as HR}from"react/jsx-runtime";import{Fragment as zR}from"react";var R0=t=>{let e=WR(4),{children:o,path:n}=t,r;e[0]!==n?(r=a=>{let[c]=a;return c&&c?.[n]||null},e[0]=n,e[1]=r):r=e[1];let s=Yt(r),{passesCondition:i}=s||{};if(i===!1)return null;let l;return e[2]!==o?(l=HR(zR,{children:o}),e[2]=o,e[3]=l):l=e[3],l};var Oe=t=>o=>{let{indexPath:n,path:r}=o;return D0(R0,{indexPath:n,path:r,children:D0(t,{...o})})};var ot=t=>({...t?.admin?.style||{},...t?.admin?.width?{"--field-width":t.admin.width}:{flex:"1 1 auto"},...t?.admin?.style?.flex?{flex:t.admin.style.flex}:{}});var ve="field-type";function hi({fieldLocalized:t,fieldRTL:e,locale:o,localizationConfig:n}){let r=o&&n&&n.locales&&n.locales.length>1,s=o?.code===n?.defaultLocale;return e!==!1&&o?.rtl===!0&&(t||!t&&!r||!t&&s)||e===!0}import{jsx as Wa,jsxs as vp}from"react/jsx-runtime";import"react";import{jsx as F0}from"react/jsx-runtime";import"react";var gp=()=>F0("svg",{className:"icon icon--check",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:F0("path",{className:"stroke",d:"M15.3333 6.00001L8.00001 13.3333L4.66667 10",strokeLinecap:"square"})});import{jsx as P0}from"react/jsx-runtime";import"react";var bp=()=>P0("svg",{className:"icon icon--line",fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:P0("path",{className:"stroke",d:"M5.33333 10H14.6667",strokeLinecap:"square"})});var Ha="checkbox-input",fs=({id:t,name:e,AfterInput:o,BeforeInput:n,checked:r,className:s,inputRef:i,Label:l,label:a,localized:c,onToggle:u,partialChecked:m,readOnly:f,required:d})=>vp("div",{className:[s,Ha,r&&`${Ha}--checked`,f&&`${Ha}--read-only`].filter(Boolean).join(" "),children:[vp("div",{className:`${Ha}__input`,children:[n,Wa("input",{"aria-label":"",defaultChecked:!!r,disabled:f,id:t,name:e,onInput:u,ref:i,required:d,type:"checkbox"}),vp("span",{className:[`${Ha}__icon`,!r&&m?"partial":"check"].filter(Boolean).join(" "),children:[r&&Wa(gp,{}),!r&&m&&Wa(bp,{})]}),o]}),Wa(q,{CustomComponent:l,Fallback:Wa(Re,{htmlFor:t,label:a,localized:c,required:d})})]});var xp="checkbox";var UR=t=>{let{id:e,checked:o,disableFormData:n,field:r,field:{admin:{className:s,description:i}={},label:l,required:a}={},onChange:c,partialChecked:u,path:m,readOnly:f,validate:d}=t,{uuid:h}=He(),p=Ze(),g=T0((I,F)=>{if(typeof d=="function")return d(I,{...F,required:a})},[d,a]),{customComponents:{AfterInput:b,BeforeInput:v,Description:C,Error:x,Label:y}={},setValue:A,showError:S,value:_}=De({disableFormData:n,path:m,validate:g}),E=T0(()=>{f||(A(!_),typeof c=="function"&&c(!_))},[c,f,A,_]),R=o||!!_,D=e||ku(m,p,h),w=YR(()=>ot(r),[r]);return XR("div",{className:[ve,xp,S&&"error",s,_&&`${xp}--checked`,f&&`${xp}--read-only`].filter(Boolean).join(" "),style:w,children:[za(q,{CustomComponent:x,Fallback:za(Xe,{path:m,showError:S})}),za(fs,{AfterInput:b,BeforeInput:v,checked:R,id:D,inputRef:null,Label:y,label:l,name:m,onToggle:E,partialChecked:u,readOnly:f,required:a}),za(q,{CustomComponent:C,Fallback:za(Me,{description:i,path:m})})]})},qo=Oe(UR);var Xa=t=>{let e=ZR(4),{fieldValue:o,localized:n,path:r}=t,{code:s}=Ne(),{config:i}=Y(),{localization:l}=i,[a,c]=k0.useState(typeof o!="number"),u=l&&l.defaultLocale?l.defaultLocale:"en",{t:m}=L();if(!n||s===u||l&&!l.fallback)return null;if(o){let d=!1;if(typeof o=="number"&&o>0&&(d=!0),Array.isArray(o)&&o.length>0&&(d=!0),d)return a&&c(!1),null}let f;return e[0]!==a||e[1]!==r||e[2]!==m?(f=N0(Vr,{children:N0(qo,{checked:a,field:{name:"",label:m("general:fallbackToDefaultLocale")},id:`field-${r.replace(/\./g,"__")}`,path:r,schemaPath:""})}),e[0]=a,e[1]=r,e[2]=m,e[3]=f):f=e[3],f};var gi=t=>{let e=document.getElementById(t);if(e){let o=e.getBoundingClientRect();window.scrollBy({behavior:"smooth",top:o.top-100})}};import{c as jL}from"react/compiler-runtime";import{jsx as Ki,jsxs as BL}from"react/jsx-runtime";import{getTranslation as $L}from"@payloadcms/translations";import"react";import{c as QR}from"react/compiler-runtime";import{jsx as Jr,jsxs as ps}from"react/jsx-runtime";import qR from"react";import{jsx as L0}from"react/jsx-runtime";import"react";var Ya=()=>L0("svg",{className:"icon icon--copy",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:L0("path",{className:"stroke",d:"M4.66666 12.6667C3.93333 12.6667 3.33333 12.0667 3.33333 11.3333V4.66668C3.33333 3.93334 3.93333 3.33334 4.66666 3.33334H11.3333C12.0667 3.33334 12.6667 3.93334 12.6667 4.66668M8.66666 7.33334H15.3333C16.0697 7.33334 16.6667 7.9303 16.6667 8.66668V15.3333C16.6667 16.0697 16.0697 16.6667 15.3333 16.6667H8.66666C7.93028 16.6667 7.33333 16.0697 7.33333 15.3333V8.66668C7.33333 7.9303 7.93028 7.33334 8.66666 7.33334Z",strokeLinecap:"square"})});import{jsx as Cp,jsxs as JR}from"react/jsx-runtime";import"react";var yp=({className:t})=>JR("svg",{className:["icon icon--more",t].filter(Boolean).join(" "),viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[Cp("path",{className:"fill",d:"M10 10.6666C10.3682 10.6666 10.6667 10.3682 10.6667 9.99998C10.6667 9.63179 10.3682 9.33331 10 9.33331C9.63182 9.33331 9.33334 9.63179 9.33334 9.99998C9.33334 10.3682 9.63182 10.6666 10 10.6666Z",strokeLinecap:"square"}),Cp("path",{className:"fill",d:"M14.6667 10.6666C15.0349 10.6666 15.3333 10.3682 15.3333 9.99998C15.3333 9.63179 15.0349 9.33331 14.6667 9.33331C14.2985 9.33331 14 9.63179 14 9.99998C14 10.3682 14.2985 10.6666 14.6667 10.6666Z",strokeLinecap:"square"}),Cp("path",{className:"fill",d:"M5.33334 10.6666C5.70153 10.6666 6.00001 10.3682 6.00001 9.99998C6.00001 9.63179 5.70153 9.33331 5.33334 9.33331C4.96515 9.33331 4.66667 9.63179 4.66667 9.99998C4.66667 10.3682 4.96515 10.6666 5.33334 10.6666Z",strokeLinecap:"square"})]});var Bo="array-actions",Vu=t=>{let e=QR(10),{addRow:o,duplicateRow:n,hasMaxRows:r,index:s,isSortable:i,moveRow:l,removeRow:a,rowCount:c}=t,{t:u}=L(),m;return e[0]!==o||e[1]!==n||e[2]!==r||e[3]!==s||e[4]!==i||e[5]!==l||e[6]!==a||e[7]!==c||e[8]!==u?(m=Jr(Lo,{button:Jr(yp,{}),buttonClassName:`${Bo}__button`,className:Bo,horizontalAlign:"center",render:f=>{let{close:d}=f;return ps(at.ButtonGroup,{buttonSize:"small",children:[i&&s!==0&&ps(at.Button,{className:`${Bo}__action ${Bo}__move-up`,onClick:()=>{l(s,s-1),d()},children:[Jr("div",{className:`${Bo}__action-chevron`,children:Jr(Qe,{direction:"up"})}),u("general:moveUp")]}),i&&s<c-1&&ps(at.Button,{className:`${Bo}__action`,onClick:()=>{l(s,s+1),d()},children:[Jr("div",{className:`${Bo}__action-chevron`,children:Jr(Qe,{})}),u("general:moveDown")]}),!r&&ps(qR.Fragment,{children:[ps(at.Button,{className:`${Bo}__action ${Bo}__add`,onClick:()=>{o(s+1),d()},children:[Jr(Zo,{}),u("general:addBelow")]}),ps(at.Button,{className:`${Bo}__action ${Bo}__duplicate`,onClick:()=>{n(s),d()},children:[Jr(Ya,{}),u("general:duplicate")]})]}),ps(at.Button,{className:`${Bo}__action ${Bo}__remove`,onClick:()=>{a(s),d()},children:[Jr(xt,{}),u("general:remove")]})]})},size:"medium"}),e[0]=o,e[1]=n,e[2]=r,e[3]=s,e[4]=i,e[5]=l,e[6]=a,e[7]=c,e[8]=u,e[9]=m):m=e[9],m};import{c as l5}from"react/compiler-runtime";import{jsx as mr,jsxs as Sp}from"react/jsx-runtime";import{useState as M0}from"react";import{jsx as bi,jsxs as KR}from"react/jsx-runtime";import"react";var hs=({className:t})=>KR("svg",{className:["icon icon--drag-handle",t].filter(Boolean).join(" "),viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[bi("path",{className:"fill",d:"M7.99999 10.6667C8.36818 10.6667 8.66666 10.3682 8.66666 9.99999C8.66666 9.6318 8.36818 9.33332 7.99999 9.33332C7.63181 9.33332 7.33333 9.6318 7.33333 9.99999C7.33333 10.3682 7.63181 10.6667 7.99999 10.6667Z",strokeLinecap:"square"}),bi("path",{className:"fill",d:"M7.99999 5.99999C8.36818 5.99999 8.66666 5.70151 8.66666 5.33332C8.66666 4.96513 8.36818 4.66666 7.99999 4.66666C7.63181 4.66666 7.33333 4.96513 7.33333 5.33332C7.33333 5.70151 7.63181 5.99999 7.99999 5.99999Z",strokeLinecap:"square"}),bi("path",{className:"fill",d:"M7.99999 15.3333C8.36818 15.3333 8.66666 15.0348 8.66666 14.6667C8.66666 14.2985 8.36818 14 7.99999 14C7.63181 14 7.33333 14.2985 7.33333 14.6667C7.33333 15.0348 7.63181 15.3333 7.99999 15.3333Z",strokeLinecap:"square"}),bi("path",{className:"fill",d:"M12 10.6667C12.3682 10.6667 12.6667 10.3682 12.6667 9.99999C12.6667 9.6318 12.3682 9.33332 12 9.33332C11.6318 9.33332 11.3333 9.6318 11.3333 9.99999C11.3333 10.3682 11.6318 10.6667 12 10.6667Z",strokeLinecap:"square"}),bi("path",{className:"fill",d:"M12 5.99999C12.3682 5.99999 12.6667 5.70151 12.6667 5.33332C12.6667 4.96513 12.3682 4.66666 12 4.66666C11.6318 4.66666 11.3333 4.96513 11.3333 5.33332C11.3333 5.70151 11.6318 5.99999 12 5.99999Z",strokeLinecap:"square"}),bi("path",{className:"fill",d:"M12 15.3333C12.3682 15.3333 12.6667 15.0348 12.6667 14.6667C12.6667 14.2985 12.3682 14 12 14C11.6318 14 11.3333 14.2985 11.3333 14.6667C11.3333 15.0348 11.6318 15.3333 12 15.3333Z",strokeLinecap:"square"})]});import{jsx as j0}from"react/jsx-runtime";import Gu,{useEffect as r5,useRef as Ip}from"react";import{useEffect as e5,useMemo as t5,useRef as wp,useState as o5}from"react";var O0=({containerRef:t,contentRef:e,duration:o,open:n})=>{let r=t5(()=>typeof CSS<"u"&&CSS&&CSS.supports?CSS.supports("interpolate-size","allow-keywords"):!1,[]),s=wp(!1),i=wp(n),[l,a]=o5(!1),c=wp(null);return e5(()=>{let u=t.current,m=e.current;if(!u||!m||r)return;let f=p=>{u.style.height=p},d=()=>{u&&(u.style.transition="",u.style.height=n?"auto":"0px",a(!1))};return(()=>{if(!s.current&&n){f("auto"),a(!1);return}s.current=!0,i.current!==n&&f(n?"0px":`${m.scrollHeight}px`),u.offsetHeight,a(!0),u.style.transition=`height ${o}ms ease`,f(n?`${m.scrollHeight}px`:"0px");let p=()=>{d(),u.removeEventListener("transitionend",p)};u.addEventListener("transitionend",p)})(),i.current=n,c.current=new ResizeObserver(()=>{l&&(u.style.height=n?`${m.scrollHeight}px`:"0px")}),c.current.observe(m),()=>{u&&(u.style.transition="",u.style.height=""),c.current?.disconnect()}},[n,o,t,e,r]),{browserSupportsKeywordAnimation:r}};var Ko=({id:t,children:e,className:o,duration:n=300,height:r})=>{let[s,i]=Gu.useState(()=>!!r),l=Ip(s),[a,c]=Gu.useState(()=>s?"":"none"),[u,m]=Gu.useState(()=>s?"":"hidden"),[f,d]=Gu.useState(!1),h=Ip(null),p=Ip(null);return r5(()=>{let g,b,v=!!r,C=l.current!==v;return l.current=v,C&&(d(!0),m("hidden"),v?c(""):g=window.setTimeout(()=>{c("none")},n),i(v),b=window.setTimeout(()=>{m(""),d(!1)},n)),()=>{g&&clearTimeout(g),b&&clearTimeout(b)}},[r,n]),O0({containerRef:h,contentRef:p,duration:n,open:s}),j0("div",{"aria-hidden":!s,className:[o,"rah-static",s&&r==="auto"&&"rah-static--height-auto",f&&`rah-animating--${s?"down":"up"}`,f&&r==="auto"&&"rah-animating--to-height-auto"].filter(Boolean).join(" "),id:t,ref:h,style:{overflow:u,transition:`height ${n}ms ease`},children:j0("div",{ref:p,...a?{style:{display:a}}:{},children:e})})};import{jsx as n5}from"react/jsx-runtime";import s5,{createContext as i5,useContext as a5}from"react";var B0=i5({isCollapsed:void 0,isVisible:void 0,isWithinCollapsible:void 0,toggle:()=>{}}),$0=({children:t,isCollapsed:e,isWithinCollapsible:o=!0,toggle:n})=>{let{isCollapsed:r,isVisible:s}=wn(),i=s5.useMemo(()=>({isCollapsed:e,isVisible:s&&!r,isWithinCollapsible:o,toggle:n}),[e,o,n,r,s]);return n5(B0.Provider,{value:i,children:t})},wn=()=>a5(B0);var co="collapsible";var gs=t=>{let e=l5(26),{actions:o,children:n,className:r,collapsibleStyle:s,dragHandleProps:i,header:l,initCollapsed:a,isCollapsed:c,onToggle:u}=t,m=s===void 0?"default":s,[f,d]=M0(!!a),[h,p]=M0(!1),{isWithinCollapsible:g}=wn(),{t:b}=L(),v=typeof c=="boolean"?c:f,C;e[0]!==v||e[1]!==u?(C=()=>{typeof u=="function"&&u(!v),d(!v)},e[0]=v,e[1]=u,e[2]=C):C=e[2];let x=C,y=i&&`${co}--has-drag-handle`,A=v&&`${co}--collapsed`,S=g&&`${co}--nested`,_=h&&`${co}--hovered`,E=`${co}--style-${m}`,R;e[3]!==r||e[4]!==y||e[5]!==A||e[6]!==S||e[7]!==_||e[8]!==E?(R=[co,r,y,A,S,_,E].filter(Boolean),e[3]=r,e[4]=y,e[5]=A,e[6]=S,e[7]=_,e[8]=E,e[9]=R):R=e[9];let D=R.join(" "),w,I;e[10]===Symbol.for("react.memo_cache_sentinel")?(w=()=>p(!0),I=()=>p(!1),e[10]=w,e[11]=I):(w=e[10],I=e[11]);let F=`${co}__toggle--${v?"collapsed":"open"}`,P;e[12]!==F?(P=[`${co}__toggle`,F].filter(Boolean),e[12]=F,e[13]=P):P=e[13];let k=P.join(" "),N;if(e[14]!==o||e[15]!==n||e[16]!==i||e[17]!==l||e[18]!==v||e[19]!==b||e[20]!==k||e[21]!==D||e[22]!==x){let j;e[24]!==i?(j=i&&mr("div",{className:`${co}__drag`,...i.attributes,...i.listeners,children:mr(hs,{})}),e[24]=i,e[25]=j):j=e[25],N=mr("div",{className:D,children:Sp($0,{isCollapsed:v,toggle:x,children:[Sp("div",{className:`${co}__toggle-wrap`,onMouseEnter:w,onMouseLeave:I,children:[mr("button",{className:k,onClick:x,type:"button",children:mr("span",{children:b("fields:toggleBlock")})}),j,l?mr("div",{className:[`${co}__header-wrap`,i&&`${co}__header-wrap--has-drag-handle`].filter(Boolean).join(" "),children:l}):null,Sp("div",{className:`${co}__actions-wrap`,children:[o?mr("div",{className:`${co}__actions`,children:o}):null,mr("div",{className:`${co}__indicator`,children:mr(Qe,{direction:v?void 0:"up"})})]})]}),mr(Ko,{height:v?0:"auto",children:mr("div",{className:`${co}__content`,children:n})})]})}),e[14]=o,e[15]=n,e[16]=i,e[17]=l,e[18]=v,e[19]=b,e[20]=k,e[21]=D,e[22]=x,e[23]=N}else N=e[23];return N};import{c as kL}from"react/compiler-runtime";import{jsx as sI}from"react/jsx-runtime";import{fieldIsHiddenOrDisabled as LL,getFieldPaths as OL}from"payload/shared";import"react";import{c as c5}from"react/compiler-runtime";import{jsx as u5}from"react/jsx-runtime";import V0 from"react";var G0=t=>{let e=c5(9),{children:o,className:n,forceRender:r}=t,[s,i]=V0.useState(!!r),l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={rootMargin:"1000px"},e[0]=l):l=e[0];let[a,c]=Gr(l,!!r),u=!!c?.isIntersecting,m=c?.boundingClientRect?.top<0,f=r||u||m,d,h;e[1]!==s||e[2]!==f?(d=()=>{f&&!s&&i(!0)},h=[f,s],e[1]=s,e[2]=f,e[3]=d,e[4]=h):(d=e[3],h=e[4]),V0.useEffect(d,h);let p=s?o:null,g;return e[5]!==n||e[6]!==a||e[7]!==p?(g=u5("div",{className:n,ref:a,children:p}),e[5]=n,e[6]=a,e[7]=p,e[8]=g):g=e[8],g};import{c as NL}from"react/compiler-runtime";import{jsx as St}from"react/jsx-runtime";import"react";import{c as $5}from"react/compiler-runtime";import{jsx as jt,jsxs as En}from"react/jsx-runtime";import{getTranslation as Tp}from"@payloadcms/translations";import M5,{Fragment as V5}from"react";import{c as Ep}from"react/compiler-runtime";import{jsx as Qr,jsxs as Hu}from"react/jsx-runtime";import{createContext as h5,useContext as g5,useEffect as W0,useState as H0}from"react";import{jsx as d5}from"react/jsx-runtime";import{forwardRef as m5}from"react";var Wu="gutter",er=m5((t,e)=>{let{children:o,className:n,left:r=!0,negativeLeft:s=!1,negativeRight:i=!1,right:l=!0}=t,a=r&&!s,c=l&&!i;return d5("div",{className:[a&&`${Wu}--left`,c&&`${Wu}--right`,s&&`${Wu}--negative-left`,i&&`${Wu}--negative-right`,n].filter(Boolean).join(" "),ref:e,children:o})});er.displayName="Gutter";import{c as f5}from"react/compiler-runtime";import{useId as p5}from"react";var Ua=t=>{let e=f5(3),o=p5(),n=Ze(),r=`${t}-${o}`,s;return e[0]!==n||e[1]!==r?(s=Ap({slug:r,depth:n}),e[0]=n,e[1]=r,e[2]=s):s=e[2],s};var fr="drawer",Za=100,Ap=({slug:t,depth:e})=>`drawer_${e}_${t}`,tr=t=>{let e=Ep(17),o,n,r,s,i,l;e[0]!==t?({slug:l,children:o,className:n,disabled:r,onClick:s,...i}=t,e[0]=t,e[1]=o,e[2]=n,e[3]=r,e[4]=s,e[5]=i,e[6]=l):(o=e[1],n=e[2],r=e[3],s=e[4],i=e[5],l=e[6]);let{openModal:a}=ae(),c;e[7]!==s||e[8]!==a||e[9]!==l?(c=f=>{a(l),typeof s=="function"&&s(f)},e[7]=s,e[8]=a,e[9]=l,e[10]=c):c=e[10];let u=c,m;return e[11]!==o||e[12]!==n||e[13]!==r||e[14]!==u||e[15]!==i?(m=Qr("button",{className:n,disabled:r,onClick:u,type:"button",...i,children:o}),e[11]=o,e[12]=n,e[13]=r,e[14]=u,e[15]=i,e[16]=m):m=e[16],m},Jt=t=>{let e=Ep(26),{slug:o,children:n,className:r,gutter:s,Header:i,hoverTitle:l,title:a}=t,c=s===void 0?!0:s,{t:u}=L(),{closeModal:m,modalState:f}=ae(),d=zu(),[h,p]=H0(!1),[g,b]=H0(!1),v,C;e[0]!==f||e[1]!==o?(v=()=>{p(f[o]?.isOpen)},C=[o,f],e[0]=f,e[1]=o,e[2]=v,e[3]=C):(v=e[2],C=e[3]),W0(v,C);let x,y;if(e[4]!==h?(x=()=>{b(h)},y=[h],e[4]=h,e[5]=x,e[6]=y):(x=e[5],y=e[6]),W0(x,y),h){let A=g&&`${fr}--is-open`,S=d>1&&`${fr}--nested`,_;e[7]!==r||e[8]!==A||e[9]!==S?(_=[r,fr,A,S].filter(Boolean),e[7]=r,e[8]=A,e[9]=S,e[10]=_):_=e[10];let E=_.join(" "),R=Za+d,D;if(e[11]!==i||e[12]!==n||e[13]!==m||e[14]!==d||e[15]!==c||e[16]!==l||e[17]!==o||e[18]!==u||e[19]!==R||e[20]!==E||e[21]!==a){let w;e[23]!==m||e[24]!==o?(w=()=>m(o),e[23]=m,e[24]=o,e[25]=w):w=e[25],D=Qr(b5,{children:Hu(lt,{className:E,slug:o,style:{zIndex:R},children:[(!d||d===1)&&Qr("div",{className:`${fr}__blur-bg`}),Qr("button",{"aria-label":u("general:close"),className:`${fr}__close`,id:`close-drawer__${o}`,onClick:w,type:"button"}),Hu("div",{className:`${fr}__content`,style:{width:`calc(100% - (${d} * var(--gutter-h))`},children:[Qr("div",{className:`${fr}__blur-bg-content`}),Hu(er,{className:`${fr}__content-children`,left:c,right:c,children:[i,i===void 0&&Hu("div",{className:`${fr}__header`,children:[Qr("h2",{className:`${fr}__header__title`,title:l?a:null,children:a}),Qr("button",{"aria-label":u("general:close"),className:`${fr}__header__close`,id:`close-drawer__${o}`,onClick:()=>m(o),type:"button",children:Qr(xt,{})})]}),n]})]})]})}),e[11]=i,e[12]=n,e[13]=m,e[14]=d,e[15]=c,e[16]=l,e[17]=o,e[18]=u,e[19]=R,e[20]=E,e[21]=a,e[22]=D}else D=e[22];return D}return null},z0=h5(1),b5=t=>{let e=Ep(3),{children:o}=t,r=zu()+1,s;return e[0]!==o||e[1]!==r?(s=Qr(z0.Provider,{value:r,children:o}),e[0]=o,e[1]=r,e[2]=s):s=e[2],s},zu=()=>g5(z0);import{c as O5}from"react/compiler-runtime";import{jsx as Sn,jsxs as j5}from"react/jsx-runtime";import{getTranslation as B5}from"@payloadcms/translations";import"react";import{c as v5}from"react/compiler-runtime";import{jsx as Ja,jsxs as x5}from"react/jsx-runtime";import C5 from"next/link.js";import"react";var y5=C5.default,pr="pill",w5=t=>{let e=v5(12),{id:o,className:n}=t,r;e[0]!==o?(r={id:o},e[0]=o,e[1]=r):r=e[1];let{attributes:s,isDragging:i,listeners:l,setNodeRef:a,transform:c}=si(r),u=i&&`${pr}--is-dragging`,m;e[2]!==n||e[3]!==u?(m=[u,n].filter(Boolean),e[2]=n,e[3]=u,e[4]=m):m=e[4];let f=m.join(" "),d;return e[5]!==s||e[6]!==l||e[7]!==t||e[8]!==a||e[9]!==f||e[10]!==c?(d=Ja(X0,{...t,className:f,elementProps:{...l,...s,ref:a,style:{transform:c}}}),e[5]=s,e[6]=l,e[7]=t,e[8]=a,e[9]=f,e[10]=c,e[11]=d):d=e[11],d},X0=t=>{let{alignIcon:e="right","aria-checked":o,"aria-controls":n,"aria-expanded":r,"aria-label":s,children:i,className:l,draggable:a,elementProps:c,icon:u,onClick:m,pillStyle:f="light",rounded:d,to:h}=t,p=[pr,`${pr}--style-${f}`,l&&l,h&&`${pr}--has-link`,(h||m)&&`${pr}--has-action`,u&&`${pr}--has-icon`,u&&`${pr}--align-icon-${e}`,a&&`${pr}--draggable`,d&&`${pr}--rounded`].filter(Boolean).join(" "),g="div";return m&&!h&&(g="button"),h&&(g=y5),x5(g,{...c,"aria-checked":o,"aria-controls":n,"aria-expanded":r,"aria-label":s,className:p,href:h||null,onClick:m,type:g==="button"?"button":void 0,children:[Ja("span",{className:`${pr}__label`,children:i}),u&&Ja("span",{className:`${pr}__icon`,children:u})]})},It=t=>{let{draggable:e}=t;return e?Ja(w5,{...t}):Ja(X0,{...t})};import{c as N5}from"react/compiler-runtime";import{jsx as nx,jsxs as k5}from"react/jsx-runtime";import sx from"react";import{c as F5}from"react/compiler-runtime";import{jsx as In,jsxs as P5}from"react/jsx-runtime";import{getTranslation as Fp}from"@payloadcms/translations";import{useEffect as ox,useState as rx}from"react";import{c as I5}from"react/compiler-runtime";import{jsx as Y0,jsxs as S5}from"react/jsx-runtime";import"react";var Qa="thumbnail-card",U0=t=>{let e=I5(15),{alignLabel:o,className:n,collection:r,doc:s,label:i,onClick:l,thumbnail:a}=t,{config:c}=Y(),{i18n:u}=L(),m=typeof l=="function"&&`${Qa}--has-on-click`,f=o&&`${Qa}--align-label-${o}`,d;e[0]!==n||e[1]!==m||e[2]!==f?(d=[Qa,n,m,f].filter(Boolean),e[0]=n,e[1]=m,e[2]=f,e[3]=d):d=e[3];let h=d.join(" "),p=i;if(!p){let b=s?.filename,v;e[4]!==r||e[5]!==c.admin.dateFormat||e[6]!==s||e[7]!==u||e[8]!==b?(v=Jo({collectionConfig:r,data:s,dateFormat:c.admin.dateFormat,fallback:b,i18n:u}),e[4]=r,e[5]=c.admin.dateFormat,e[6]=s,e[7]=u,e[8]=b,e[9]=v):v=e[9],p=v}let g;return e[10]!==h||e[11]!==l||e[12]!==a||e[13]!==p?(g=S5("button",{className:h,onClick:l,title:p,type:"button",children:[Y0("div",{className:`${Qa}__thumbnail`,children:a}),Y0("div",{className:`${Qa}__label`,children:p})]}),e[10]=h,e[11]=l,e[12]=a,e[13]=p,e[14]=g):g=e[14],g};import{jsx as Uu,jsxs as J0}from"react/jsx-runtime";import{useState as Q0}from"react";var to=[];for(Xu=0;Xu<256;++Xu)to.push((Xu+256).toString(16).slice(1));var Xu;function Z0(t,e=0){return(to[t[e+0]]+to[t[e+1]]+to[t[e+2]]+to[t[e+3]]+"-"+to[t[e+4]]+to[t[e+5]]+"-"+to[t[e+6]]+to[t[e+7]]+"-"+to[t[e+8]]+to[t[e+9]]+"-"+to[t[e+10]]+to[t[e+11]]+to[t[e+12]]+to[t[e+13]]+to[t[e+14]]+to[t[e+15]]).toLowerCase()}var Yu,A5=new Uint8Array(16);function _p(){if(!Yu&&(Yu=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Yu))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Yu(A5)}var E5=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Rp={randomUUID:E5};function _5(t,e,o){if(Rp.randomUUID&&!e&&!t)return Rp.randomUUID();t=t||{};var n=t.random||(t.rng||_p)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){o=o||0;for(var r=0;r<16;++r)e[o+r]=n[r];return e}return Z0(n)}var bs=_5;var Dp=()=>{let[t]=Q0(`pattern${bs()}`),[e]=Q0(`image${bs()}`);return J0("svg",{fill:"none",height:"53",viewBox:"0 0 82 53",width:"82",children:[Uu("rect",{fill:`url(#${t})`,height:"52.7791",width:"80.574",x:"0.713013"}),J0("defs",{children:[Uu("pattern",{height:"1",id:`${t}`,patternContentUnits:"objectBoundingBox",width:"1",children:Uu("use",{transform:"scale(0.00387597 0.00591716)",xlinkHref:`#${e}`})}),Uu("image",{height:"169",id:e,width:"258",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQIAAACpCAYAAADA4zPJAAALpklEQVR4Ae2dSY/UOhSF+///DCSGHQuEgAVI7BBITAI2zCCGZuhmpqEBP53W8yOvK1UdO3Zyr/NFilJdXalyTo4/X984zlZgQQEUWLwCW4tXAAFQAAUCIMAEKIACgAAPoAAKBECACVAABQABHkABFAiAABOgAAoAAjyAAiggBbhqgA9QAAUAAR5AARQgIsADKIACdA3wAAqggBQgR4APUAAFAAEeQAEUICLAAyiAAnQN8AAKoIAUIEeAD1AABQABHkABFCAiwAMogAJ0DfAACqCAFCBHgA9QAAUAAR5AARQgIsADKIACdA3wAAqggBQgR4APUAAFAAEeQAEUICLAAyiAAnQN8AAKoIAUIEeAD1AABQABHkABFCAiwAMogAJ0DfAACqCAFCBHgA9QAAUAAR5AARQgIsADKIACdA3wAAqggBQgR4APUAAFAAEeQAEUICLAAyiAAnQN8AAKoIAUIEeAD1AABQABHkABFCAiwAMLVmB/fz98+/YtfPr0KXz48CHs7u6GnZ2dg+3Hjx/D169fw48fP8KfP3+aV4muQfOnmAPsKqDKr4r/9u3bsL29PXgVKPb29pqFAiDouoTXzSrw8+fPg5Y+pfL3ffbdu3fh+/fvzekECJo7pRxQVwGF9YoA+ir1mPfUhVB00coCCFo5kxzHigKqqGrBx1T4Tfu+efOmmegAEKzYhzdaUEBdAVXUTRW51P+UVPS+AALvZ5DyryigSGAqCESYeIcBIFixEW94VuDXr1/JVwRiZR671VUFrwsg8HrmKPeKAkoMKok3tkLn7q8oRCDyuAACj2eNMvcqoMFBuZW41H4alORxAQQezxplXlHg9+/fk+cF1sHDYxcBEKxYijc8KvDly5fZo4EIhvfv37uTEBC4O2UU+LACyg2kDhmOlbbWVpcvPS2AwNPZoqy9CigUr1Whc79Xoxk9LYDA09mirL0K1BhCnAuAuJ8iFE8LIPB0tihrrwI1hxHHip2z9XQpERD0Wos3vSig/EBOJZ1iH09XDwCBF8dTzl4FNJx4ikqd8xu6kuFlAQRezhTl7FVAMwjlVNIp9vn8+XNvmS2+aR4E6md56mtZPMktl8niFYMIGU9XDkyDQCdZ47e1eupvtVzxrB0bEUGZM2ISBEoAafLISNa4FWH1PxYUiApo4E70h7UtOYJ4ljK2OrGbLgfpfy1NEZUhEbt0FNA9BtYAEMvjaW5DMxGBWnpN7hBFPGrrfSKIjpd5OVIBa8OLo3c9DTM2AQJRXbdvRgGHbrWP9mVZtgKaanyoZ6b6nPJanrqxs4MgJgRzTxCJxGVDQEevEDzXP7X2E5w8LbOBQLQsOUZ8TCLx9evX4fHjx+HRo0esTjW4efNmKL3eu3cvyBs5sPB2lWsWENSaZlr3gacmEi9fvhyOHTvGiga9Hjh79mwyDJSz8NQtUOQyOQhSEoI5JNY+mrJqyPLy5cvekw8YAGPXA7du3UqKCob6b4hHp/rMZCDITQjmwmBIIvH+/fuAgEjgSA9cuXJlMAh0edtbNCDYTAICjf6a4xKPflO/vW4BBLT83ZZ/3esUEHi6ZNitF1VBIDLqxovcVr3UfipDH6UBASBYV/m77w8FgaeRhF0I6HU1EChpp+Rdqco89nv6EomAABB0K/y610NAoCHxfY3N4Qpn9e8qILAwv3wfODTmoJvIef78+ZH9w3Xm4P3lQOTGjRsbGzSNGfAMgeIRgRKCFkd5HYaCyqiyaj1//jwwIGG41gOnT58Ourp02EPx7zHjVyxFB8UigrkSgvGEpG5jIlEw0ECiO3fusDaowe3bt8PVq1eDwvvU9fr162sh0NqI1tEgsJIQTAVB/Py6RKIlWlOWcQrIo+oSlrpypShADUhLyygQaOYgSwnBWLlTtzoGZkFqydb9xxKBkONZQUSNRqs+yQaBbvRQeJRa6ax+Xsfi6f7xfqvz7lAFVKEVJSjbLzCookc/a6uBQcol6ZKgxgZ4TwYepUsyCBQSeUgI5gJHxmgt7DvKBPwfBZJAIDKW6mflVtQp9tMxeh0hhqVRIEeBQSBQWKQQaYpKaOk3dMyth4Q5pmGf9hQ4EgTqS+3s7CwOAhFIOvZWE0Tt2ZkjylVgIwhaSwjGyp26JZGYay/286JALwiULOubTjy1ArX2ee/jyb2YknJOr8AKCJQk06WT1ipxqeORNiQSpzcqv1hXgf9AsNSEYC4gSCTWNSbfPq0CByBYekIwFwYkEqc1K79WT4GtsdOJ51aiVvZTItHbjLX17MQ3e1Vgq5UKOfdxtHI7ajSy7iYlFxLVaH8LCLa3iyVGlUhMnU7dmsWUK+pOL6dZpxlUZe0slS8PICgIghiV6F4M3ct+6dIlV+vFixcPJmo5d+5c6K4XLlwI+p/l47l27RpdtBF8AAQVQHDmzJm1M94wxVm9Kc6kOzeM5dEAEBQGgR6dRmWvV9mP0lbdM5Z0BQBBYRA8ePAAEMw4B6KeVciSrgAgAARNgQsQpENAewACQAAI8upOU3sBgsIgePjwYVMV66g+ubX/ExHk8QkQFAaB5sA/ceIEMJghT3D8+HHmnczjAF2DeO2/5Pbu3bvh1KlTwGBCGJw8eTI8efIksxqwGxFB4YggAuXVq1fh2bNn4enTp0euL168OJj/QaP4Sq26O1JzLw75/Rqf0czApY5lyPcwfmAczABBJRBEIAzd6ual7nMZx5xWK3eTxkfLjTkW9p1GAUBgBAQRGGMrj7W7SRWV6AYmFtsKAAJjIBAQciqPbgyyPL0cj5YDBMXu7out5lK2QyuPl+nleLScXRgQERiMCLqg2zQLkqIAJdK6n7f+mhmhbcIAEBgHgSp2X+VRlnx3d9cVBLqQGpsLsVmd/JYKEDgAQaxA8bmM1hKCsXypWx4tZwccgMARCFTRFB2kVjjrn2dG6PmBAAicgcB6pc4t36ZcyPzVpP0SAAJAYCbC6MuFtF8FbRwhIAAEZkAQowkeLTc9HAABIDAHAgGBR8tNCwNAAAhMgiBGByQSpwECIAAEpkEgIJBIrA8DQAAIzINAMFAikUfL1QMCIAAELkAQuwqtPVquXtVO+2ZAAAhcgUBAaOHRcmnVtP6nAQEgcAeCGB3ohiuWMgoAAkDgFgQCgm68Ypqy8TAABIDANQgEAxKJgMC9iWOYy3b84+lJJOYDgYiAiKApmGoWpP39/fwasdA9AQEgaAoEMbIqNSP0UrgACABBkyAQEEgkDscYIAAEzYJAMMiZEXp49Wnnk4AAEDQNgthVGDojdDtVO+1IAAEgWAQIBAQSievhAAgAwWJAIBhozAGJxFUgAAJAsCgQxK4C06n/HwaAABAsEgQCAonEvzAABIBgsSCI0QGJxBAAASBYPAgEhKU/lxEQAAJA8K8HljydOiAABIDgkAfio+X+9qDbfwUIDpkg9hvZjr8b0LOGS3suIyAABEQEGzywlOnUAcEGE3hu0Sh7uYhmCdOpAwJAQEQwwAOtJxIBwQAT0LqWa129a9nqcxkBASAgIkj0QIvPZQQEiSbw3qJR/nLRTUuJREAACIgIRniglUQiIBhhAlrXcq2rZy1bmE4dEAACIoJCHvA8nTogKGQCzy0aZS8X2Xh9LiMgAAREBBU84O25jICgggloYcu1sJ619DSdOiAABEQEFT3gJZEICCqawHNrRtnLRjXWE4mAABAQEUzkAcvTqQOCiUxAC1u2hfWsp8Xp1AEBICAimMED1hKJgGAGE3huzSh7ucjG0nTqgAAQEBHM7AEL06kDgplNQAtbroX1rOXciURAAAiICIx4QGMO5kokAgIjJvDcmlH2slHNHM9lBASAgIjAoAemTiQCAoMmoIUt28J61nOqRCIgAAREBMY9MMUsSIDAuAk8t2aUvVxkU3s6dUAACIgIHHmg1nMZAYEjE9DClmthPWtZYzp1QAAIiAiceqDkdOqAwKkJPLdolL1cZFMqkbilkUysaIAH/Hpgb28vjF3+AbSb48mcXO9tAAAAAElFTkSuQmCC"})]})]})};import{c as R5}from"react/compiler-runtime";import{jsx as K0,jsxs as D5}from"react/jsx-runtime";import"react";import{jsx as q0}from"react/jsx-runtime";import"react";var qa=()=>q0("svg",{className:"icon icon--search",fill:"none",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:q0("path",{className:"stroke",d:"M16 16L13.1333 13.1333M14.6667 9.33333C14.6667 12.2789 12.2789 14.6667 9.33333 14.6667C6.38781 14.6667 4 12.2789 4 9.33333C4 6.38781 6.38781 4 9.33333 4C12.2789 4 14.6667 6.38781 14.6667 9.33333Z",strokeLinecap:"square"})});var ex="block-search",tx=t=>{let e=R5(5),{setSearchTerm:o}=t,{t:n}=L(),r;e[0]!==o?(r=l=>{o(l.target.value)},e[0]=o,e[1]=r):r=e[1];let s=r,i;return e[2]!==s||e[3]!==n?(i=D5("div",{className:ex,children:[K0("input",{className:`${ex}__input`,onChange:s,placeholder:n("fields:searchForBlock")}),K0(qa,{})]}),e[2]=s,e[3]=n,e[4]=i):i=e[4],i};var Zu="blocks-drawer",T5=(t,e)=>typeof t.labels.singular=="string"?t.labels.singular.toLowerCase():typeof t.labels.singular=="object"?Fp(t.labels.singular,e).toLowerCase():"",Ka=t=>{let e=F5(17),{addRow:o,addRowIndex:n,blocks:r,drawerSlug:s,labels:i}=t,[l,a]=rx(""),[c,u]=rx(r),{closeModal:m,isModalOpen:f}=ae(),{i18n:d,t:h}=L(),p,g;e[0]!==f?(p=()=>{f||a("")},g=[f],e[0]=f,e[1]=p,e[2]=g):(p=e[1],g=e[2]),ox(p,g);let b,v;e[3]!==r||e[4]!==d||e[5]!==l?(b=()=>{let x=l.toLowerCase(),y=r?.reduce((A,S)=>(T5(S,d).includes(x)&&A.push(S),A),[]);u(y)},v=[l,r,d],e[3]=r,e[4]=d,e[5]=l,e[6]=b,e[7]=v):(b=e[6],v=e[7]),ox(b,v);let C;return e[8]!==o||e[9]!==n||e[10]!==m||e[11]!==s||e[12]!==c||e[13]!==d||e[14]!==i.singular||e[15]!==h?(C=P5(Jt,{slug:s,title:h("fields:addLabel",{label:Fp(i.singular,d)}),children:[In(tx,{setSearchTerm:a}),In("div",{className:`${Zu}__blocks-wrapper`,children:In("ul",{className:`${Zu}__blocks`,children:c?.map((x,y)=>{let{slug:A,imageAltText:S,imageURL:_,labels:E}=x;return In("li",{className:`${Zu}__block`,children:In(U0,{alignLabel:"center",label:Fp(E?.singular,d),onClick:()=>{o(n,A),m(s)},thumbnail:_?In("img",{alt:S,src:_}):In("div",{className:`${Zu}__default-image`,children:In(Dp,{})})})},y)})})})]}),e[8]=o,e[9]=n,e[10]=m,e[11]=s,e[12]=c,e[13]=d,e[14]=i.singular,e[15]=h,e[16]=C):C=e[16],C};var ix=t=>{let e=N5(26),{addRow:o,blocks:n,blockType:r,duplicateRow:s,hasMaxRows:i,isSortable:l,labels:a,moveRow:c,removeRow:u,rowCount:m,rowIndex:f}=t,{closeModal:d,openModal:h}=ae(),p=Ua("blocks-drawer"),[g,b]=sx.useState(null),v;e[0]!==o||e[1]!==d||e[2]!==p||e[3]!==g?(v=(x,y)=>{typeof o=="function"&&o(g,y),d(p)},e[0]=o,e[1]=d,e[2]=p,e[3]=g,e[4]=v):v=e[4];let C;if(e[5]!==r||e[6]!==n||e[7]!==p||e[8]!==s||e[9]!==i||e[10]!==l||e[11]!==a||e[12]!==c||e[13]!==h||e[14]!==u||e[15]!==m||e[16]!==f||e[17]!==v){let x;e[19]!==p||e[20]!==h?(x=A=>{b(A),h(p)},e[19]=p,e[20]=h,e[21]=x):x=e[21];let y;e[22]!==r||e[23]!==s||e[24]!==f?(y=()=>s(f,r),e[22]=r,e[23]=s,e[24]=f,e[25]=y):y=e[25],C=k5(sx.Fragment,{children:[nx(Ka,{addRow:v,addRowIndex:f,blocks:n,drawerSlug:p,labels:a}),nx(Vu,{addRow:x,duplicateRow:y,hasMaxRows:i,index:f,isSortable:l,moveRow:c,removeRow:u,rowCount:m})]}),e[5]=r,e[6]=n,e[7]=p,e[8]=s,e[9]=i,e[10]=l,e[11]=a,e[12]=c,e[13]=h,e[14]=u,e[15]=m,e[16]=f,e[17]=v,e[18]=C}else C=e[18];return C};import{c as L5}from"react/compiler-runtime";import{jsx as ax}from"react/jsx-runtime";import"react";var lx="section-title",Pp=t=>{let e=L5(14),{customOnChange:o,customValue:n,path:r,readOnly:s}=t,i;e[0]!==r?(i={path:r},e[0]=r,e[1]=i):i=e[1];let{setValue:l,value:a}=De(i),{t:c}=L(),u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=[lx].filter(Boolean),e[2]=u):u=e[2];let m=u.join(" "),f;e[3]!==o||e[4]!==l?(f=o||(g=>{g.stopPropagation(),g.preventDefault(),l(g.target.value)}),e[3]=o,e[4]=l,e[5]=f):f=e[5];let d=f,h=n||a,p;return e[6]!==n||e[7]!==d||e[8]!==r||e[9]!==s||e[10]!==c||e[11]!==h||e[12]!==a?(p=ax("div",{className:m,"data-value":h,children:ax("input",{className:`${lx}__input`,id:r,name:r,onChange:d,placeholder:c("general:untitled"),readOnly:s,type:"text",value:n||a||""})}),e[6]=n,e[7]=d,e[8]=r,e[9]=s,e[10]=c,e[11]=h,e[12]=a,e[13]=p):p=e[13],p};var An="blocks-field",cx=t=>{let e=O5(47),{addRow:o,attributes:n,block:r,blocks:s,duplicateRow:i,errorCount:l,fields:a,hasMaxRows:c,isSortable:u,Label:m,labels:f,listeners:d,moveRow:h,parentPath:p,path:g,permissions:b,readOnly:v,removeRow:C,row:x,rowCount:y,rowIndex:A,schemaPath:S,setCollapse:_,setNodeRef:E,transform:R}=t,{i18n:D}=L(),I=Lt()&&l>0,F=I?`${An}__row--has-errors`:`${An}__row--no-errors`,P;e[0]!==F?(P=[`${An}__row`,F].filter(Boolean),e[0]=F,e[1]=P):P=e[1];let k=P.join(" "),N;if(b===!0)N=!0;else{let O=b?.blocks?.[r.slug];O===!0?N=!0:N=O?.fields}let j=`${p?.split(".").join("-")}-row-${A}`,T;if(e[2]!==m||e[3]!==o||e[4]!==n||e[5]!==r||e[6]!==N||e[7]!==s||e[8]!==k||e[9]!==i||e[10]!==l||e[11]!==I||e[12]!==a||e[13]!==c||e[14]!==D||e[15]!==u||e[16]!==f||e[17]!==d||e[18]!==h||e[19]!==p||e[20]!==g||e[21]!==v||e[22]!==C||e[23]!==x.blockType||e[24]!==x.collapsed||e[25]!==x.id||e[26]!==y||e[27]!==A||e[28]!==S||e[29]!==_||e[30]!==E||e[31]!==j||e[32]!==R){let O;e[34]!==m||e[35]!==r||e[36]!==l||e[37]!==I||e[38]!==D||e[39]!==g||e[40]!==v||e[41]!==x.blockType||e[42]!==A?(O=m||j5("div",{className:`${An}__block-header`,children:[Sn("span",{className:`${An}__block-number`,children:String(A+1).padStart(2,"0")}),Sn(It,{className:`${An}__block-pill ${An}__block-pill-${x.blockType}`,pillStyle:"white",children:B5(r.labels.singular,D)}),Sn(Pp,{path:`${g}.blockName`,readOnly:v}),I&&Sn(Zt,{count:l,i18n:D,withMessage:!0})]}),e[34]=m,e[35]=r,e[36]=l,e[37]=I,e[38]=D,e[39]=g,e[40]=v,e[41]=x.blockType,e[42]=A,e[43]=O):O=e[43];let M;e[44]!==x.id||e[45]!==_?(M=B=>_(x.id,B),e[44]=x.id,e[45]=_,e[46]=M):M=e[46],T=Sn("div",{id:j,ref:E,style:{transform:R},children:Sn(gs,{actions:v?void 0:Sn(ix,{addRow:o,blocks:s,blockType:x.blockType,duplicateRow:i,fields:r.fields,hasMaxRows:c,isSortable:u,labels:f,moveRow:h,removeRow:C,rowCount:y,rowIndex:A}),className:k,collapsibleStyle:I?"error":"default",dragHandleProps:u?{id:x.id,attributes:n,listeners:d}:void 0,header:O,isCollapsed:x.collapsed,onToggle:M,children:Sn(Qt,{className:`${An}__fields`,fields:a,margins:"small",parentIndexPath:"",parentPath:g,parentSchemaPath:S,permissions:N,readOnly:v})},x.id)},`${p}-row-${A}`),e[2]=m,e[3]=o,e[4]=n,e[5]=r,e[6]=N,e[7]=s,e[8]=k,e[9]=i,e[10]=l,e[11]=I,e[12]=a,e[13]=c,e[14]=D,e[15]=u,e[16]=f,e[17]=d,e[18]=h,e[19]=p,e[20]=g,e[21]=v,e[22]=C,e[23]=x.blockType,e[24]=x.collapsed,e[25]=x.id,e[26]=y,e[27]=A,e[28]=S,e[29]=_,e[30]=E,e[31]=j,e[32]=R,e[33]=T}else T=e[33];return T};var hr="blocks-field",G5=t=>{let e=$5(52),{i18n:o,t:n}=L(),{field:r,path:s,permissions:i,readOnly:l,schemaPath:a,validate:c}=t,{name:u,admin:m,blocks:f,label:d,labels:h,localized:p,maxRows:g,minRows:b,required:v}=r,C;e[0]!==m?(C=m===void 0?{}:m,e[0]=m,e[1]=C):C=e[1];let{className:x,description:y,isSortable:A}=C,S=A===void 0?!0:A,_=a??u,E=b??v?1:0,{setDocFieldPreferences:R}=Fe(),{addFieldRow:D,dispatchFields:w,setModified:I}=He(),{code:F}=Ne(),{config:P}=Y(),{localization:k}=P,N=Ua("blocks-drawer"),j=Lt(),T={plural:n("fields:blocks"),singular:n("fields:block"),...h},O;e:{if(k&&k.fallback){let pe=k.defaultLocale||"en";O=F===pe;break e}O=!0}let M=O,B;e[2]!==M||e[3]!==g||e[4]!==E||e[5]!==v||e[6]!==c?(B=(pe,ue)=>{if(!M&&pe===null)return!0;if(typeof c=="function")return c(pe,{...ue,maxRows:g,minRows:E,required:v})},e[2]=M,e[3]=g,e[4]=E,e[5]=v,e[6]=c,e[7]=B):B=e[7];let $=B,W;e[8]!==$||e[9]!==s?(W={hasRows:!0,path:s,validate:$},e[8]=$,e[9]=s,e[10]=W):W=e[10];let{customComponents:H,errorPaths:X,rows:G,showError:z,valid:Z,value:V}=De(W),re;e[11]!==H?(re=H===void 0?{}:H,e[11]=H,e[12]=re):re=e[12];let{AfterInput:ee,BeforeInput:te,Description:Q,Error:xe,Label:he}=re,Ge;e[13]!==G?(Ge=G===void 0?[]:G,e[13]=G,e[14]=Ge):Ge=e[14];let de=Ge,we;e[15]!==D||e[16]!==s||e[17]!==_?(we=(pe,ue)=>{D({blockType:ue,path:s,rowIndex:pe,schemaPath:_}),setTimeout(()=>{gi(`${s}-row-${pe+1}`)},0)},e[15]=D,e[16]=s,e[17]=_,e[18]=we):we=e[18];let Ye=we,ie;e[19]!==w||e[20]!==s||e[21]!==I?(ie=pe=>{w({type:"DUPLICATE_ROW",path:s,rowIndex:pe}),I(!0),setTimeout(()=>{gi(`${s}-row-${pe+1}`)},0)},e[19]=w,e[20]=s,e[21]=I,e[22]=ie):ie=e[22];let Pe=ie,le;e[23]!==w||e[24]!==s||e[25]!==I?(le=pe=>{w({type:"REMOVE_ROW",path:s,rowIndex:pe}),I(!0)},e[23]=w,e[24]=s,e[25]=I,e[26]=le):le=e[26];let Be=le,We;e[27]!==w||e[28]!==s||e[29]!==I?(We=(pe,ue)=>{w({type:"MOVE_ROW",moveFromIndex:pe,moveToIndex:ue,path:s}),I(!0)},e[27]=w,e[28]=s,e[29]=I,e[30]=We):We=e[30];let qe=We,ke;e[31]!==w||e[32]!==s||e[33]!==de||e[34]!==R?(ke=pe=>{let{collapsedIDs:ue,updatedRows:ne}=Ou({collapsed:pe,rows:de});w({type:"SET_ALL_ROWS_COLLAPSED",path:s,updatedRows:ne}),R(s,{collapsed:ue})},e[31]=w,e[32]=s,e[33]=de,e[34]=R,e[35]=ke):ke=e[35];let Ue=ke,fe;e[36]!==w||e[37]!==s||e[38]!==de||e[39]!==R?(fe=(pe,ue)=>{let{collapsedIDs:ne,updatedRows:K}=Lu({collapsed:ue,rowID:pe,rows:de});w({type:"SET_ROW_COLLAPSED",path:s,updatedRows:K}),R(s,{collapsed:ne})},e[36]=w,e[37]=s,e[38]=de,e[39]=R,e[40]=fe):fe=e[40];let me=fe,je=g&&de.length>=g,$e=X.length,Te=j&&$e+(Z?0:1)>0,J=de.length<E||v&&de.length===0,oe=l&&de.length===0,ce=Te?`${hr}--has-error`:`${hr}--has-no-error`,Le;e[41]!==x||e[42]!==ce?(Le=[ve,hr,x,ce].filter(Boolean),e[41]=x,e[42]=ce,e[43]=Le):Le=e[43];let Ae;e[44]!==xe||e[45]!==s||e[46]!==z?(Ae=z&&jt(q,{CustomComponent:xe,Fallback:jt(Xe,{path:s,showError:z})}),e[44]=xe,e[45]=s,e[46]=z,e[47]=Ae):Ae=e[47];let Ee;return e[48]!==$e||e[49]!==Te||e[50]!==o?(Ee=Te&&$e>0&&jt(Zt,{count:$e,i18n:o,withMessage:!0}),e[48]=$e,e[49]=Te,e[50]=o,e[51]=Ee):Ee=e[51],En("div",{className:Le.join(" "),id:`field-${s?.replace(/\./g,"__")}`,children:[Ae,En("header",{className:`${hr}__header`,children:[En("div",{className:`${hr}__header-wrap`,children:[En("div",{className:`${hr}__heading-with-error`,children:[jt("h3",{children:jt(q,{CustomComponent:he,Fallback:jt(Re,{label:d,localized:p,path:s,required:v})})}),Ee]}),de.length>0&&En("ul",{className:`${hr}__header-actions`,children:[jt("li",{children:jt("button",{className:`${hr}__header-action`,onClick:()=>Ue(!0),type:"button",children:n("fields:collapseAll")})}),jt("li",{children:jt("button",{className:`${hr}__header-action`,onClick:()=>Ue(!1),type:"button",children:n("fields:showAll")})})]})]}),jt(q,{CustomComponent:Q,Fallback:jt(Me,{description:y,path:s})})]}),te,jt(Xa,{fieldValue:V,localized:p,path:s}),(de.length>0||!Z&&(oe||J))&&En(Rr,{className:`${hr}__rows`,ids:de.map(W5),onDragEnd:pe=>{let{moveFromIndex:ue,moveToIndex:ne}=pe;return qe(ue,ne)},children:[de.map((pe,ue)=>{let{blockType:ne}=pe,K=f.find(se=>se.slug===ne);if(K){let se=`${s}.${ue}`,Ve=X.filter(Je=>Je.startsWith(se+".")).length;return jt(xn,{disabled:l||!S,id:pe.id,children:Je=>jt(cx,{...Je,addRow:Ye,block:K,blocks:f,duplicateRow:Pe,errorCount:Ve,fields:K.fields,hasMaxRows:je,isSortable:S,Label:he,labels:T,moveRow:qe,parentPath:s,path:se,permissions:i,readOnly:l,removeRow:Be,row:pe,rowCount:de.length,rowIndex:ue,schemaPath:_+K.slug,setCollapse:me})},pe.id)}return null}),!M&&En(M5.Fragment,{children:[J&&jt(Vr,{type:"error",children:n("validation:requiresAtLeast",{count:E,label:Tp(E>1?T.plural:T.singular,o)||n(E>1?"general:row":"general:rows")})}),oe&&jt(Vr,{children:n("validation:fieldHasNo",{label:Tp(T.plural,o)})})]})]}),!je&&En(V5,{children:[jt(tr,{className:`${hr}__drawer-toggler`,disabled:l,slug:N,children:jt(U,{buttonStyle:"icon-label",disabled:l,el:"span",icon:"plus",iconPosition:"left",iconStyle:"with-border",children:n("fields:addLabel",{label:Tp(T.singular,o)})})}),jt(Ka,{addRow:Ye,addRowIndex:de?.length||0,blocks:f,drawerSlug:N,labels:T})]}),ee]})},el=Oe(G5);function W5(t){return t.id}import{jsx as vs,jsxs as ux}from"react/jsx-runtime";import{useCallback as Y5,useMemo as U5}from"react";import{jsx as Np}from"react/jsx-runtime";import{lazy as H5,Suspense as z5}from"react";var X5=H5(()=>import("./CodeEditor-QIIK6FKF.js")),tl=t=>Np(z5,{fallback:Np(so,{}),children:Np(X5,{...t})});var Z5={js:"javascript",ts:"typescript"},J5="code-field",Q5=t=>{let{field:e,field:{admin:{className:o,description:n,editorOptions:r={},language:s="javascript"}={},label:i,localized:l,required:a},path:c,readOnly:u,validate:m}=t,f=Y5((A,S)=>{if(typeof m=="function")return m(A,{...S,required:a})},[m,a]),{customComponents:{AfterInput:d,BeforeInput:h,Description:p,Error:g,Label:b}={},setValue:v,showError:C,value:x}=De({path:c,validate:f}),y=U5(()=>ot(e),[e]);return ux("div",{className:[ve,J5,o,C&&"error",u&&"read-only"].filter(Boolean).join(" "),style:y,children:[vs(q,{CustomComponent:b,Fallback:vs(Re,{label:i,localized:l,path:c,required:a})}),ux("div",{className:`${ve}__wrap`,children:[vs(q,{CustomComponent:g,Fallback:vs(Xe,{path:c,showError:C})}),h,vs(tl,{defaultLanguage:Z5[s]||s,onChange:u?()=>null:A=>v(A),options:r,readOnly:u,value:x||""}),d]}),vs(q,{CustomComponent:p,Fallback:vs(Me,{description:n,path:c})})]})},ol=Oe(Q5);import{jsx as Cs,jsxs as kp}from"react/jsx-runtime";import{getTranslation as K5}from"@payloadcms/translations";import{Fragment as eD,useCallback as tD,useEffect as oD,useMemo as rD,useState as fx}from"react";import{c as q5}from"react/compiler-runtime";import{fieldAffectsData as dx}from"payload/shared";var Ju=(t,e)=>e.reduce((n,r)=>{let s="fields"in r?r.fields:void 0;if(s)if(dx(r)){let i="name"in r?r.name:"unnamed";n.push(...t,i)}else n.push(...Ju(t,s));else if(r.type==="tabs")"tabs"in r&&r.tabs?.forEach(i=>{let l=t;"name"in i&&(l=[...t,i.name]),n.push(...Ju(l,i.fields))});else if(dx(r)){let i="name"in r?r.name:"unnamed";n.push(...t,i)}return n},[]);var mx=({formState:t,pathSegments:e})=>{let o={},n=0;return Object.entries(t).forEach(([r])=>{if(e?.some(i=>i.endsWith(".")?r.startsWith(i):r===i)){let i=t[r];o[r]=i,"valid"in i&&!i.valid&&(n+=1)}}),{errorCount:n,fieldState:o}};var xs=t=>{let e=q5(12),{fields:o,path:n,setErrorCount:r}=t,[s]=ri(),i=Lt(),l;e[0]!==o||e[1]!==n?(l=Ju(n,o),e[0]=o,e[1]=n,e[2]=l):l=e[2];let a=l,c;e[3]!==s||e[4]!==i||e[5]!==a||e[6]!==r?(c=()=>{if(i){let{errorCount:m}=mx({formState:s,pathSegments:a});r(m)}},e[3]=s,e[4]=i,e[5]=a,e[6]=r,e[7]=c):c=e[7];let u;return e[8]!==o||e[9]!==s||e[10]!==i?(u=[s,i,o],e[8]=o,e[9]=s,e[10]=i,e[11]=u):u=e[11],cs(c,250,u),null};var rl="collapsible-field",nD=t=>{let{field:e,field:{admin:{className:o,description:n,initCollapsed:r=!1}={},fields:s,label:i}={},indexPath:l,parentPath:a,parentSchemaPath:c,path:u,permissions:m,readOnly:f}=t,{i18n:d}=L(),{getPreference:h,setPreference:p}=Ht(),{preferencesKey:g}=Fe(),[b,v]=fx(),C=`collapsible-${u?.replace(/\./g,"__")}`,[x,y]=fx(0),A=x>0,{customComponents:{AfterInput:S,BeforeInput:_,Description:E,Label:R}={}}=De({path:u}),D=tD(async I=>{let F=await h(g);g&&p(g,{...F,...u?{fields:{...F?.fields||{},[u]:{...F?.fields?.[u],collapsed:I}}}:{fields:{...F?.fields||{},[C]:{...F?.fields?.[C],collapsed:I}}}})},[g,C,h,p,u]);oD(()=>{(async()=>{if(g){let F=await h(g),P=u?F?.fields?.[u]?.collapsed:F?.fields?.[C]?.collapsed;v(P!==void 0?!!P:typeof r=="boolean"?r:!1)}else v(typeof r=="boolean"?r:!1)})()},[h,g,C,r,u]);let w=rD(()=>ot(e),[e]);return typeof b!="boolean"?null:kp(eD,{children:[Cs(xs,{fields:s,path:u.split("."),setErrorCount:y}),kp("div",{className:[ve,rl,o,A?`${rl}--has-error`:`${rl}--has-no-error`].filter(Boolean).join(" "),id:`field-${C}`,style:w,children:[_,Cs(gs,{className:`${rl}__collapsible`,collapsibleStyle:A?"error":"default",header:kp("div",{className:`${rl}__row-label-wrap`,children:[Cs(ts,{CustomComponent:R,label:K5(i,d),path:u}),A&&Cs(Zt,{count:x,i18n:d,withMessage:!0})]}),initCollapsed:b,onToggle:D,children:Cs(Qt,{fields:s,margins:"small",parentIndexPath:l,parentPath:a,parentSchemaPath:c,permissions:m,readOnly:f})}),S,Cs(q,{CustomComponent:E,Fallback:Cs(Me,{description:n,path:u})})]})]})},nl=Oe(nD);import{jsx as ys,jsxs as px}from"react/jsx-runtime";import{getTranslation as lD}from"@payloadcms/translations";import{useCallback as cD,useMemo as uD}from"react";import{jsx as Lp}from"react/jsx-runtime";import{lazy as sD,Suspense as iD}from"react";var aD=sD(()=>import("./DatePicker-QW5V4BQV.js")),Qu=t=>Lp(iD,{fallback:Lp(so,{height:50}),children:Lp(aD,{...t})});var hx="date-time-field",dD=t=>{let{field:e,field:{admin:{className:o,date:n,description:r,placeholder:s}={},label:i,localized:l,required:a},path:c,readOnly:u,validate:m}=t,{i18n:f}=L(),d=cD((S,_)=>{if(typeof m=="function")return m(S,{..._,required:a})},[m,a]),{customComponents:{AfterInput:h,BeforeInput:p,Description:g,Error:b,Label:v}={},setValue:C,showError:x,value:y}=De({path:c,validate:d}),A=uD(()=>ot(e),[e]);return px("div",{className:[ve,hx,o,x&&`${hx}--has-error`,u&&"read-only"].filter(Boolean).join(" "),style:A,children:[ys(q,{CustomComponent:v,Fallback:ys(Re,{label:i,localized:l,required:a})}),px("div",{className:`${ve}__wrap`,id:`field-${c.replace(/\./g,"__")}`,children:[ys(q,{CustomComponent:b,Fallback:ys(Xe,{path:c,showError:x})}),p,ys(Qu,{...n,onChange:S=>{u||C(S?.toISOString()||null)},placeholder:lD(s,f),readOnly:u,value:y}),h]}),ys(q,{CustomComponent:g,Fallback:ys(Me,{description:r,path:c})})]})},sl=Oe(dD);import{jsx as ws,jsxs as gx}from"react/jsx-runtime";import{getTranslation as mD}from"@payloadcms/translations";import{useCallback as fD,useMemo as pD}from"react";var hD=t=>{let{field:e,field:{admin:{autoComplete:o,className:n,description:r,placeholder:s}={},label:i,localized:l,required:a}={},path:c,readOnly:u,validate:m}=t,{i18n:f}=L(),d=fD((S,_)=>{if(typeof m=="function")return m(S,{..._,required:a})},[m,a]),{customComponents:{AfterInput:h,BeforeInput:p,Description:g,Error:b,Label:v}={},setValue:C,showError:x,value:y}=De({path:c,validate:d}),A=pD(()=>ot(e),[e]);return gx("div",{className:[ve,"email",n,x&&"error",u&&"read-only"].filter(Boolean).join(" "),style:A,children:[ws(q,{CustomComponent:v,Fallback:ws(Re,{label:i,localized:l,path:c,required:a})}),gx("div",{className:`${ve}__wrap`,children:[ws(q,{CustomComponent:b,Fallback:ws(Xe,{path:c,showError:x})}),p,ws("input",{autoComplete:o,disabled:u,id:`field-${c.replace(/\./g,"__")}`,name:c,onChange:C,placeholder:mD(s,f),required:a,type:"email",value:y||""}),h]}),ws(q,{CustomComponent:g,Fallback:ws(Me,{description:r,path:c})})]})},Is=Oe(hD);import{jsx as _n,jsxs as qu}from"react/jsx-runtime";import{getTranslation as AD}from"@payloadcms/translations";import{useMemo as ED}from"react";import{jsx as gD}from"react/jsx-runtime";import{createContext as bD,useContext as vD}from"react";var bx=bD(!1),vx=({children:t,withinRow:e=!0})=>gD(bx.Provider,{value:e,children:t}),xx=()=>vD(bx);import{jsx as xD}from"react/jsx-runtime";import{createContext as CD,useContext as yD}from"react";var Cx=CD(!1),Op=({children:t,withinTab:e=!0})=>xD(Cx.Provider,{value:e,children:t}),yx=()=>yD(Cx);import{jsx as wD}from"react/jsx-runtime";import{createContext as ID,useContext as SD}from"react";var wx=ID(!1),Ix=({children:t,withinGroup:e=!0})=>wD(wx.Provider,{value:e,children:t}),Sx=()=>SD(wx);var gr="group-field",_D=t=>{let{field:e,field:{name:o,admin:{className:n,description:r,hideGutter:s}={},fields:i,label:l},path:a,permissions:c,readOnly:u,schemaPath:m}=t,f=m??o,{i18n:d}=L(),{isWithinCollapsible:h}=wn(),p=Sx(),g=xx(),b=yx(),{customComponents:{AfterInput:v,BeforeInput:C,Description:x,Label:y}={},errorPaths:A}=De({path:a}),S=Lt(),_=A.length,E=S&&_>0,R=!(h||p||g),D=ED(()=>ot(e),[e]);return qu("div",{className:[ve,gr,R&&`${gr}--top-level`,h&&`${gr}--within-collapsible`,p&&`${gr}--within-group`,g&&`${gr}--within-row`,b&&`${gr}--within-tab`,!s&&p&&`${gr}--gutter`,E&&`${gr}--has-error`,n].filter(Boolean).join(" "),id:`field-${a?.replace(/\./g,"__")}`,style:D,children:[_n(Ix,{children:qu("div",{className:`${gr}__wrap`,children:[!!(y||x||l||E)&&qu("div",{className:`${gr}__header`,children:[!!(y||x||l)&&qu("header",{children:[_n(q,{CustomComponent:y,Fallback:_n("h3",{className:`${gr}__title`,children:_n(Re,{as:"span",label:AD(l,d),localized:!1,path:a,required:!1})})}),_n(q,{CustomComponent:x,Fallback:_n(Me,{description:r,path:a})})]}),E&&_n(Zt,{count:_,i18n:d,withMessage:!0})]}),C,_n(Qt,{fields:i,margins:"small",parentIndexPath:"",parentPath:a,parentSchemaPath:f,permissions:c===!0?c:c?.fields,readOnly:u})]})}),v]})};var il=Oe(_D);import{c as RD}from"react/compiler-runtime";import{jsx as DD}from"react/jsx-runtime";import{useEffect as FD}from"react";var PD=t=>{let e=RD(12),{disableModifyingForm:o,path:n,value:r}=t,s=o===void 0?!0:o,i;e[0]!==n?(i={path:n},e[0]=n,e[1]=i):i=e[1];let{setValue:l,value:a}=De(i),c,u;e[2]!==s||e[3]!==l||e[4]!==r?(c=()=>{r!==void 0&&l(r,s)},u=[r,l,s],e[2]=s,e[3]=l,e[4]=r,e[5]=c,e[6]=u):(c=e[5],u=e[6]),FD(c,u);let m=`field-${n?.replace(/\./g,"__")}`,f=a||"",d;return e[7]!==n||e[8]!==l||e[9]!==m||e[10]!==f?(d=DD("input",{id:m,name:n,onChange:l,type:"hidden",value:f}),e[7]=n,e[8]=l,e[9]=m,e[10]=f,e[11]=d):d=e[11],d},al=Oe(PD);import{jsx as xl,jsxs as C6}from"react/jsx-runtime";import{useMemo as y6}from"react";import{c as b6}from"react/compiler-runtime";import{jsx as Ao,jsxs as xi}from"react/jsx-runtime";import{getTranslation as IC}from"@payloadcms/translations";import{Fragment as v6,useState as Dn}from"react";import{dequal as Ex}from"dequal/lite";import{useEffect as kD,useRef as Ku}from"react";import{c as TD}from"react/compiler-runtime";import{useEffect as Ax,useState as ND}from"react";function jp(t,e,o){let n=TD(11),r;n[0]!==t?(r=()=>t,n[0]=t,n[1]=r):r=n[1];let[s,i]=ND(r),l;n[2]!==o||n[3]!==t?(l=()=>{let m=setTimeout(()=>{i(()=>t)},o);return()=>{clearTimeout(m)}},n[2]=o,n[3]=t,n[4]=l):l=n[4];let a;n[5]!==o||n[6]!==e?(a=[...e,o],n[5]=o,n[6]=e,n[7]=a):a=n[7],Ax(l,a);let c,u;n[8]!==s?(c=()=>{s()},u=[s],n[8]=s,n[9]=c,n[10]=u):(c=n[9],u=n[10]),Ax(c,u)}function Ss(t,e,o,n){let r=Ku(typeof n?.runOnFirstRender<"u"?!n?.runOnFirstRender:!1),s=Ku(e);kD(()=>{(e.some((l,a)=>!o.includes(l)&&!Ex(l,s.current[a]))||!r.current)&&t(),s.current=e,r.current=!0},e)}function _x(t,e,o,n){let r=Ku(typeof n?.runOnFirstRender<"u"?!n?.runOnFirstRender:!1),s=Ku(e);jp(()=>{(e.some((l,a)=>!o.includes(l)&&!Ex(l,s.current[a]))||!r.current)&&t(),s.current=e,r.current=!0},e,n?.delay||0)}import{jsx as BD}from"react/jsx-runtime";import{useRouter as $D,useSearchParams as MD}from"next/navigation.js";import{isNumber as VD}from"payload/shared";import*as $p from"qs-esm";import GD,{createContext as WD,useCallback as ll,useContext as HD,useEffect as Fx,useMemo as zD,useState as XD}from"react";import{jsx as LD}from"react/jsx-runtime";import{createContext as OD,useContext as jD}from"react";var Rx=OD({}),Bp=({children:t,...e})=>LD(Rx.Provider,{value:{isInDrawer:!!e.drawerSlug,...e},children:t}),Fr=()=>{let t=jD(Rx);if(!t)throw new Error("useListDrawerContext must be used within a ListDrawerContextProvider");return t};import*as Dx from"qs-esm";function or(t){let e=t.toString();return Dx.parse(e,{depth:10,ignoreQueryPrefix:!0})}var Px=WD({}),br=()=>HD(Px),Mp=({children:t,collectionSlug:e,data:o,defaultLimit:n,defaultSort:r,modifySearchParams:s,onQueryChange:i,preferenceKey:l})=>{"use no memo";let a=$D(),{setPreference:c}=Ht(),u=MD(),m=zD(()=>or(u),[u]),{onQueryChange:f}=Fr(),[d,h]=XD(()=>s?m:{});Fx(()=>{s&&h(m)},[m,s]);let p=ll(async y=>{let A="page"in y?y.page:d?.page;("where"in y||"search"in y)&&(A="1");let S={},_=!1;"limit"in y&&(S.limit=Number(y.limit),_=!0),"sort"in y&&(S.sort=y.sort,_=!0),_&&l&&await c(l,S,!0);let E={limit:"limit"in y?y.limit:d?.limit,page:A,search:"search"in y?y.search:d?.search,sort:"sort"in y?y.sort:d?.sort,where:"where"in y?y.where:d?.where};s?a.replace(`${$p.stringify(E,{addQueryPrefix:!0})}`):(typeof f=="function"||typeof i=="function")&&(f||i)(E)},[s,d?.page,d?.limit,d?.sort,d?.where,d?.search,l,a,c,f,i]),g=ll(async y=>{await p({page:String(y)})},[p]),b=GD.useCallback(async y=>{await p({limit:String(y),page:"1"})},[p]),v=ll(async y=>{await p({search:y===""?void 0:y})},[p]),C=ll(async y=>{await p({sort:y})},[p]),x=ll(async y=>{await p({where:y})},[p]);return Fx(()=>{if(s){let y=!1;VD(n)&&!("limit"in d)&&(d.limit=String(n),y=!0),r&&!("sort"in d)&&(d.sort=r,y=!0),h(d),y&&a.replace(`?${$p.stringify(d)}`)}},[r,n,a,s,d]),BD(Px.Provider,{value:{data:o,handlePageChange:g,handlePerPageChange:b,handleSearchChange:v,handleSortChange:C,handleWhereChange:x,query:d,refineListData:p},children:t})};import{jsx as YD}from"react/jsx-runtime";import UD,{createContext as ZD,useCallback as cl}from"react";var Tx=ZD(void 0),Ft=()=>{let t=UD.useContext(Tx);if(t===void 0)throw new Error("useServerFunctions must be used within a ServerFunctionsProvider");return t},Vp=({children:t,serverFunction:e})=>{if(!e)throw new Error("ServerFunctionsProvider requires a serverFunction prop");let o=cl(async l=>await e({name:"render-document-slots",args:l}),[e]),n=cl(async l=>{let{signal:a,...c}=l||{};try{if(!a?.aborted){let u=await e({name:"form-state",args:{fallbackLocale:!1,...c}});if(!a?.aborted)return u}}catch(u){console.error(u)}return{state:null}},[e]),r=cl(async l=>{let{signal:a,...c}=l||{};try{if(!a?.aborted){let u=await e({name:"table-state",args:{fallbackLocale:!1,...c}});if(!a?.aborted)return u}}catch(u){console.error(u)}},[e]),s=cl(async l=>{let{signal:a,...c}=l||{};try{return await e({name:"render-document",args:{fallbackLocale:!1,...c}})}catch(u){console.error(u)}},[e]),i=cl(async l=>{let{signal:a,...c}=l||{};try{let u=await e({name:"copy-data-from-locale",args:c});if(!a?.aborted)return u}catch(u){console.error(u)}},[e]);return YD(Tx.Provider,{value:{copyDataFromLocale:i,getDocumentSlots:o,getFormState:n,getTableState:r,renderDocument:s,serverFunction:e},children:t})};var Gp=t=>Object.keys(t).length===0,ul=(t,e)=>Gp(e)?t:Gp(t)?e:("and"in t?t.and.push(e):"or"in t?t={and:[t,e]}:t={and:[t,e]},t),ed=({collectionConfig:t,search:e,where:o={}})=>{if(e){let n={...o||{}},r=(t.admin.listSearchableFields||[t.admin?.useAsTitle||"id"]).map(s=>({[s]:{like:e}}));r.length>0&&(n=ul(n,{or:r})),Gp(n)||(o=n)}return o};import{c as eF}from"react/compiler-runtime";import{jsx as ml}from"react/jsx-runtime";import{useId as tF}from"react";import{jsx as JD}from"react/jsx-runtime";import As,{createContext as QD,useCallback as Nx,useContext as qD}from"react";function Et(t){if(t)try{t.abort()}catch{}}var kx=QD({}),dl=()=>qD(kx),KD=t=>t.map(({accessor:e,active:o})=>({accessor:e,active:o})),td=({children:t,collectionSlug:e,columnState:o,docs:n,enableRowSelections:r,LinkedCellOverride:s,listPreferences:i,preferenceKey:l,renderRowTypes:a,setTable:c,sortColumnProps:u,tableAppearance:m})=>{let{getEntityConfig:f}=Y(),{getTableState:d}=Ft(),{admin:{defaultColumns:h,useAsTitle:p}={},fields:g}=f({collectionSlug:e}),b=As.useRef(e),{getPreference:v,setPreference:C}=Ht(),[x,y]=As.useState(o),A=As.useRef(null),S=Nx(async D=>{Et(A.current);let{fromIndex:w,toIndex:I}=D,F=[...x],[P]=F.splice(w,1);F.splice(I,0,P),y(F);let k=new AbortController;A.current=k;let N=await d({collectionSlug:e,columns:KD(F),docs:n,enableRowSelections:r,renderRowTypes:a,signal:k.signal,tableAppearance:m});N&&(y(N.state),c(N.Table))},[x,e,n,d,c,r,a,m]),_=Nx(async D=>{Et(A.current);let{newColumnState:w,toggledColumns:I}=x.reduce((k,N)=>(N.accessor===D?(k.newColumnState.push({...N,accessor:N.accessor,active:!N.active}),k.toggledColumns.push({accessor:N.accessor,active:!N.active})):(k.newColumnState.push(N),k.toggledColumns.push({accessor:N.accessor,active:N.active})),k),{newColumnState:[],toggledColumns:[]});y(w);let F=new AbortController;A.current=F;let P=await d({collectionSlug:e,columns:I,docs:n,enableRowSelections:r,renderRowTypes:a,signal:F.signal,tableAppearance:m});P&&(y(P.state),c(P.Table))},[x,d,c,e,n,r,a,m]),E=As.useCallback(async D=>{let w=x.map(P=>({accessor:P.accessor,active:D.includes(P.accessor)})).sort((P,k)=>{let N=D.indexOf(P.accessor),j=D.indexOf(k.accessor);return N===-1||j===-1?0:N>j?1:-1}),{state:I,Table:F}=await d({collectionSlug:e,columns:w,docs:n,enableRowSelections:r,renderRowTypes:a,tableAppearance:m});y(I),c(F)},[x,d,c,e,n,r,a,m]),R=As.useCallback(async()=>{await E(h)},[h,E]);return As.useEffect(()=>{(async()=>{if(b.current!==e||!i){let I=await v(l);b.current=e,I?.columns}})()},[l,v,e,g,h,p,i,r,u]),As.useEffect(()=>()=>{Et(A.current)},[]),JD(kx.Provider,{value:{columns:x,LinkedCellOverride:s,moveColumn:S,resetColumnsState:R,setActiveColumns:E,toggleColumn:_},children:t})};var Wp="column-selector",oF=t=>t.filter(e=>!e?.field?.admin?.disableListColumn),od=t=>{let e=eF(14),{collectionSlug:o}=t,{columns:n,moveColumn:r,toggleColumn:s}=dl(),i=tF(),l=Ze();if(!n)return null;let a;if(e[0]!==o||e[1]!==n||e[2]!==l||e[3]!==r||e[4]!==s||e[5]!==i){let c=oF(n),u;e[7]!==r?(u=f=>{let{moveFromIndex:d,moveToIndex:h}=f;r({fromIndex:d,toIndex:h})},e[7]=r,e[8]=u):u=e[8];let m;e[9]!==o||e[10]!==l||e[11]!==s||e[12]!==i?(m=(f,d)=>{if(!f)return null;let{accessor:h,active:p,field:g}=f;return f.accessor==="_select"||!g||f.CustomLabel===null||f.CustomLabel===void 0&&!("label"in g)?null:ml(It,{alignIcon:"left","aria-checked":p,className:[`${Wp}__column`,p&&`${Wp}__column--active`].filter(Boolean).join(" "),draggable:!0,icon:p?ml(xt,{}):ml(Zo,{}),id:h,onClick:()=>{s(h)},children:f.CustomLabel??ml(Re,{label:"label"in g&&g.label,unstyled:!0})},`${o}-${g&&"name"in g?g?.name:d}${l?`-${l}-`:""}${i}`)},e[9]=o,e[10]=l,e[11]=s,e[12]=i,e[13]=m):m=e[13],a=ml(Rr,{className:Wp,ids:c.map(rF),onDragEnd:u,children:c.map(m)}),e[0]=o,e[1]=n,e[2]=l,e[3]=r,e[4]=s,e[5]=i,e[6]=a}else a=e[6];return a};function rF(t){return t?.accessor}import{c as Yx}from"react/compiler-runtime";import{jsx as sd}from"react/jsx-runtime";import{createElement as xF}from"react";import{useEffect as CF,useId as yF,useState as wF}from"react";import{c as nF}from"react/compiler-runtime";import{useState as sF}from"react";var rd=t=>{let e=nF(3),{config:o}=Y(),n;e[0]!==o||e[1]!==t?(n=()=>t?(typeof t=="string"?[t]:t).map(i=>o.collections.find(l=>l.slug===i)):[],e[0]=o,e[1]=t,e[2]=n):n=e[2];let[r]=sF(n);return r};import{jsx as Hx}from"react/jsx-runtime";import bF,{useCallback as pl,useEffect as zx,useRef as vF,useState as Yp}from"react";import{c as Xp}from"react/compiler-runtime";import{jsx as Es,jsxs as Mx}from"react/jsx-runtime";import{getTranslation as dF}from"@payloadcms/translations";import mF from"react";import{c as aF}from"react/compiler-runtime";import{jsx as lF,jsxs as cF}from"react/jsx-runtime";import jx,{createContext as uF}from"react";import{c as iF}from"react/compiler-runtime";import*as Rn from"react";var Hp=t=>{let e=iF(13),{delayBeforeShow:o,inTimeout:n,minShowTime:r,outTimeout:s,show:i}=t,l=n+r+s,[a,c]=ff(o),[u,m]=Rn.useState(!1),[f,d]=Rn.useState(!1),h=Rn.useRef(0),p=Rn.useRef(void 0),g;e[0]!==s?(g=()=>{d(!0),p.current=setTimeout(()=>{m(!1),d(!1)},s)},e[0]=s,e[1]=g):g=e[1];let b=g,v,C;e[2]!==a||e[3]!==u||e[4]!==i||e[5]!==l||e[6]!==b?(v=()=>{let y=a&&!u&&i,A=u&&!i;if(y)h.current=Date.now(),m(!0);else if(A){let S=Date.now()-h.current,_=l-S;clearTimeout(p.current),p.current=setTimeout(b,Math.max(0,_))}},C=[u,i,b,l,a],e[2]=a,e[3]=u,e[4]=i,e[5]=l,e[6]=b,e[7]=v,e[8]=C):(v=e[7],C=e[8]),Rn.useEffect(v,C);let x;return e[9]!==u||e[10]!==f||e[11]!==c?(x={isMounted:u,isUnmounting:f,triggerDelayedRender:c},e[9]=u,e[10]=f,e[11]=c,e[12]=x):x=e[12],x};var Lx={isLoading:!1,loaders:[],loadingText:"",overlayType:null},Ox=(t,e)=>{let o=[...t.loaders],{type:n="fullscreen",key:r="user",loadingText:s}=e.payload;if(e.type==="add")o.push({type:n,key:r,loadingText:s});else if(e.type==="remove"){let l=o.findIndex(a=>a.key===r&&a.type===n);o.splice(l,1)}let i=o?.length>0?o[o.length-1]:null;return{isLoading:!!i,loaders:o,loadingText:i?.loadingText||t?.loadingText,overlayType:i?.type||t?.overlayType}};var zp=250,Bx=uF({isOnScreen:!1,toggleLoadingOverlay:void 0}),$x=t=>{let e=aF(21),{children:o}=t,{t:n}=L(),r;e[0]!==n?(r=n("general:loading"),e[0]=n,e[1]=r):r=e[1];let s=r,[i,l]=jx.useReducer(Ox,Lx),a;e[2]!==i.isLoading?(a={delayBeforeShow:1e3,inTimeout:zp,minShowTime:500,outTimeout:zp,show:i.isLoading},e[2]=i.isLoading,e[3]=a):a=e[3];let{isMounted:c,isUnmounting:u,triggerDelayedRender:m}=Hp(a),f;e[4]!==s||e[5]!==m?(f=p=>{let{type:g,isLoading:b,key:v,loadingText:C}=p,x=C===void 0?s:C;b?(m(),l({type:"add",payload:{type:g,key:v,loadingText:x}})):l({type:"remove",payload:{type:g,key:v}})},e[4]=s,e[5]=m,e[6]=f):f=e[6];let d=f,h;if(e[7]!==o||e[8]!==s||e[9]!==c||e[10]!==u||e[11]!==i.loadingText||e[12]!==i.overlayType||e[13]!==d){let p;e[15]!==s||e[16]!==c||e[17]!==u||e[18]!==i.loadingText||e[19]!==i.overlayType?(p=c&&lF(qr,{animationDuration:`${zp}ms`,loadingText:i.loadingText||s,overlayType:i.overlayType,show:!u}),e[15]=s,e[16]=c,e[17]=u,e[18]=i.loadingText,e[19]=i.overlayType,e[20]=p):p=e[20],h=cF(Bx.Provider,{value:{isOnScreen:c,toggleLoadingOverlay:d},children:[p,o]}),e[7]=o,e[8]=s,e[9]=c,e[10]=u,e[11]=i.loadingText,e[12]=i.overlayType,e[13]=d,e[14]=h}else h=e[14];return h},nd=()=>{let t=jx.useContext(Bx);if(t===void 0)throw new Error("useLoadingOverlay must be used within a LoadingOverlayProvider");return t};var vr="loading-overlay",qr=t=>{let e=Xp(11),{animationDuration:o,loadingText:n,overlayType:r,show:s}=t,i=s===void 0?!0:s,{t:l}=L(),a=i?`${vr}--entering`:`${vr}--exiting`,c=r?`${vr}--${r}`:"",u;e[0]!==a||e[1]!==c?(u=[vr,a,c].filter(Boolean),e[0]=a,e[1]=c,e[2]=u):u=e[2];let m=u.join(" "),f=o||"500ms",d;if(e[3]!==n||e[4]!==l||e[5]!==m||e[6]!==f){let h;e[8]!==n||e[9]!==l?(h=n||l("general:loading"),e[8]=n,e[9]=l,e[10]=h):h=e[10],d=Mx("div",{className:m,style:{animationDuration:f},children:[Mx("div",{className:`${vr}__bars`,children:[Es("div",{className:`${vr}__bar`}),Es("div",{className:`${vr}__bar`}),Es("div",{className:`${vr}__bar`}),Es("div",{className:`${vr}__bar`}),Es("div",{className:`${vr}__bar`})]}),Es("span",{className:`${vr}__text`,children:h})]}),e[3]=n,e[4]=l,e[5]=m,e[6]=f,e[7]=d}else d=e[7];return d},Vx=t=>{let e=Xp(7),{name:o,type:n,loadingText:r,show:s}=t,i=n===void 0?"fullscreen":n,{toggleLoadingOverlay:l}=nd(),a,c;return e[0]!==o||e[1]!==r||e[2]!==s||e[3]!==l||e[4]!==i?(a=()=>(l({type:i,isLoading:s,key:o,loadingText:r||void 0}),()=>{l({type:i,isLoading:!1,key:o})}),c=[s,l,o,i,r],e[0]=o,e[1]=r,e[2]=s,e[3]=l,e[4]=i,e[5]=a,e[6]=c):(a=e[5],c=e[6]),mF.useEffect(a,c),null},fF=t=>{let e=Xp(6),{name:o,type:n,action:r,formIsLoading:s,loadingSuffix:i}=t,l=n===void 0?"fullscreen":n,a=s===void 0?!1:s,c=Uo(),{i18n:u,t:m}=L(),d=`${{create:m("general:creating"),loading:m("general:loading"),update:m("general:updating")}[r]} ${i?dF(i,u):""}`,h;return e[0]!==a||e[1]!==c||e[2]!==o||e[3]!==d||e[4]!==l?(h=Es(Vx,{loadingText:d.trim(),name:o,show:a||c,type:l}),e[0]=a,e[1]=c,e[2]=o,e[3]=d,e[4]=l,e[5]=h):h=e[5],h};import{jsx as pF}from"react/jsx-runtime";import{createContext as hF,useContext as gF}from"react";var Gx=hF({}),Wx=({children:t,...e})=>pF(Gx.Provider,{value:e,children:t}),fl=()=>{let t=gF(Gx);if(!t)throw new Error("useDocumentDrawerContext must be used within a DocumentDrawerProvider");return t};var Xx=({id:t,AfterFields:e,collectionSlug:o,disableActions:n,drawerSlug:r,Header:s,initialData:i,initialState:l,onDelete:a,onDuplicate:c,onSave:u,overrideEntityVisibility:m=!0,redirectAfterDelete:f,redirectAfterDuplicate:d})=>{let{config:{collections:h}}=Y(),[p]=Yp(()=>h.find(F=>F.slug===o)),g=bF.useRef(null),{closeModal:b}=ae(),{t:v}=L(),{renderDocument:C}=Ft(),[x,y]=Yp(void 0),[A,S]=Yp(!0),_=vF(!1),E=pl(F=>{Et(g.current);let P=new AbortController;g.current=P,(async()=>{S(!0);try{let N=await C({collectionSlug:o,disableActions:n,docID:F,drawerSlug:r,initialData:i,overrideEntityVisibility:m,redirectAfterDelete:f!==void 0?f:!1,redirectAfterDuplicate:d!==void 0?d:!1,signal:P.signal});N?.Document&&(y(N.Document),S(!1))}catch(N){be.error(N?.message||v("error:unspecific")),b(r)}})()},[o,n,r,i,f,d,C,b,m,v]),R=pl(F=>{E(F.doc.id),typeof u=="function"&&u({...F,collectionConfig:p})},[u,p,E]),D=pl(F=>{E(F.doc.id),typeof c=="function"&&c({...F,collectionConfig:p})},[c,p,E]),w=pl(F=>{typeof a=="function"&&a({...F,collectionConfig:p}),b(r)},[a,b,r,p]),I=pl(()=>{E()},[E]);return zx(()=>{!x&&!_.current&&(E(t),_.current=!0)},[x,E,t]),zx(()=>()=>{Et(g.current)},[]),A?Hx(qr,{}):Hx(Wx,{clearDoc:I,drawerSlug:r,onDelete:w,onDuplicate:D,onSave:R,children:x})};var _s="doc-drawer",IF=({id:t,collectionSlug:e,depth:o,uuid:n})=>`doc-drawer_${e}_${o}${t?`_${t}`:""}_${n}`,SF=t=>{let e=Yx(21),o,n,r,s,i,l,a,c;e[0]!==t?({id:l,children:o,className:n,collectionSlug:r,disabled:s,drawerSlug:i,onClick:a,...c}=t,e[0]=t,e[1]=o,e[2]=n,e[3]=r,e[4]=s,e[5]=i,e[6]=l,e[7]=a,e[8]=c):(o=e[1],n=e[2],r=e[3],s=e[4],i=e[5],l=e[6],a=e[7],c=e[8]);let{t:u}=L(),[m]=rd(r),f=l?"general:editLabel":"fields:addNewLabel",d=m?.labels.singular,h;if(e[9]!==o||e[10]!==n||e[11]!==s||e[12]!==i||e[13]!==a||e[14]!==c||e[15]!==u||e[16]!==f||e[17]!==d){let p=u(f,{label:d}),g;e[19]!==n?(g=[n,`${_s}__toggler`].filter(Boolean),e[19]=n,e[20]=g):g=e[20],h=sd(tr,{"aria-label":p,className:g.join(" "),disabled:s,onClick:a,slug:i,...c,children:o}),e[9]=o,e[10]=n,e[11]=s,e[12]=i,e[13]=a,e[14]=c,e[15]=u,e[16]=f,e[17]=d,e[18]=h}else h=e[18];return h},AF=t=>{let{drawerSlug:e}=t;return sd(Jt,{className:_s,gutter:!1,Header:null,slug:e,children:sd(Xx,{...t})})},zt=t=>{let e=Yx(38),{id:o,collectionSlug:n,overrideEntityVisibility:r}=t,s=Ze(),i=yF(),{closeModal:l,modalState:a,openModal:c,toggleModal:u}=ae(),[m,f]=wF(!1),d;e[0]!==n||e[1]!==s||e[2]!==o||e[3]!==i?(d=IF({id:o,collectionSlug:n,depth:s,uuid:i}),e[0]=n,e[1]=s,e[2]=o,e[3]=i,e[4]=d):d=e[4];let h=d,p,g;e[5]!==h||e[6]!==a?(p=()=>{f(!!a[h]?.isOpen)},g=[a,h],e[5]=h,e[6]=a,e[7]=p,e[8]=g):(p=e[7],g=e[8]),CF(p,g);let b;e[9]!==h||e[10]!==u?(b=()=>{u(h)},e[9]=h,e[10]=u,e[11]=b):b=e[11];let v=b,C;e[12]!==l||e[13]!==h?(C=()=>{l(h)},e[12]=l,e[13]=h,e[14]=C):C=e[14];let x=C,y;e[15]!==h||e[16]!==c?(y=()=>{c(h)},e[15]=h,e[16]=c,e[17]=y):y=e[17];let A=y,S,_;e[18]!==n||e[19]!==h||e[20]!==o||e[21]!==r?(_=N=>xF(AF,{...N,collectionSlug:n,drawerSlug:h,id:o,key:h,overrideEntityVisibility:r}),e[18]=n,e[19]=h,e[20]=o,e[21]=r,e[22]=_):_=e[22],S=_;let E=S,R,D;e[23]!==n||e[24]!==h||e[25]!==o?(D=N=>sd(SF,{...N,collectionSlug:n,drawerSlug:h,id:o}),e[23]=n,e[24]=h,e[25]=o,e[26]=D):D=e[26],R=D;let w=R,I,F;e[27]!==x||e[28]!==h||e[29]!==s||e[30]!==m||e[31]!==A||e[32]!==v?(F={closeDrawer:x,drawerDepth:s,drawerSlug:h,isDrawerOpen:m,openDrawer:A,toggleDrawer:v},e[27]=x,e[28]=h,e[29]=s,e[30]=m,e[31]=A,e[32]=v,e[33]=F):F=e[33],I=F;let P=I,k;return e[34]!==E||e[35]!==P||e[36]!==w?(k=[E,w,P],e[34]=E,e[35]=P,e[36]=w,e[37]=k):k=e[37],k};import{c as EF}from"react/compiler-runtime";import{jsx as _F}from"react/jsx-runtime";import{createContext as RF,useContext as DF,useEffect as FF,useReducer as PF,useRef as TF}from"react";function Ux(t,e){switch(e.type){case"ADD_LOADED":{let o={...t};typeof o[e.relationTo]!="object"&&(o[e.relationTo]={});let n=[...e.idsToLoad];return Array.isArray(e.docs)&&e.docs.forEach(r=>{n.splice(n.indexOf(r.id),1),o[e.relationTo][r.id]=r}),n.forEach(r=>{o[e.relationTo][r]=!1}),o}case"REQUEST":{let o={...t};return e.docs.forEach(({relationTo:n,value:r})=>{typeof o[n]!="object"&&(o[n]={}),o[n][r]=null}),o}default:return t}}var Zx=RF({}),hl=t=>{let e=EF(15),{children:o}=t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={},e[0]=n):n=e[0];let[r,s]=PF(Ux,n),i=So(r,100),{config:l}=Y(),{routes:a,serverURL:c}=l,{api:u}=a,{i18n:m}=L(),{code:f}=Ne(),d=TF(f),h;e[1]!==u||e[2]!==i||e[3]!==m||e[4]!==f||e[5]!==c?(h=y=>{let A=y===void 0?!1:y;Object.entries(i).forEach(async S=>{let[_,E]=S,R=[];if(Object.entries(E).forEach(D=>{let[w,I]=D;(I===null||A)&&R.push(w)}),R.length>0){let D=`${c}${u}/${_}`,w=new URLSearchParams;if(w.append("depth","0"),w.append("limit","250"),f&&w.append("locale",f),R&&R.length>0){let P=R.map(NF);w.append("where[id][in]",P.join(","))}let I=`?${w.toString()}`,F=await fetch(`${D}${I}`,{credentials:"include",headers:{"Accept-Language":m.language}});if(F.ok){let P=await F.json();P.docs&&s({type:"ADD_LOADED",docs:P.docs,idsToLoad:R,relationTo:_})}else s({type:"ADD_LOADED",docs:[],idsToLoad:R,relationTo:_})}})},e[1]=u,e[2]=i,e[3]=m,e[4]=f,e[5]=c,e[6]=h):h=e[6];let p=h,g,b;e[7]!==p||e[8]!==f?(g=()=>{p(f&&d.current!==f),d.current=f},b=[f,p],e[7]=p,e[8]=f,e[9]=g,e[10]=b):(g=e[9],b=e[10]),FF(g,b);let v;e[11]===Symbol.for("react.memo_cache_sentinel")?(v=y=>{s({type:"REQUEST",docs:y})},e[11]=v):v=e[11];let C=v,x;return e[12]!==o||e[13]!==r?(x=_F(Zx.Provider,{value:{documents:r,getRelationships:C},children:o}),e[12]=o,e[13]=r,e[14]=x):x=e[14],x},Up=()=>DF(Zx);function NF(t){return String(t)}import{c as c6}from"react/compiler-runtime";import{jsx as pd,jsxs as u6}from"react/jsx-runtime";import"react";import{c as e6}from"react/compiler-runtime";import{jsx as gl,jsxs as t6}from"react/jsx-runtime";import{getTranslation as o6}from"@payloadcms/translations";import pC from"next/link.js";import{fieldAffectsData as r6,fieldIsID as n6}from"payload/shared";import"react";import{jsx as Jx}from"react/jsx-runtime";import"react";var id=({cellData:t,nowrap:e})=>{let o=t?.length>100?`${t.substring(0,100)}\u2026`:t;return Jx("code",{className:"code-cell",style:e?{whiteSpace:"nowrap"}:{},children:Jx("span",{children:o})})};import{c as kF}from"react/compiler-runtime";import{jsx as LF}from"react/jsx-runtime";import{getTranslation as Qx}from"@payloadcms/translations";import"react";var qx=t=>{let e=kF(2),{cellData:o,field:n}=t,{labels:r}=n,{i18n:s}=L(),i=o??[],l=i.length===1?`${i.length} ${Qx(r?.singular||s.t("general:rows"),s)}`:`${i.length} ${Qx(r?.plural||s.t("general:rows"),s)}`,a;return e[0]!==l?(a=LF("span",{children:l}),e[0]=l,e[1]=a):a=e[1],a};import{c as OF}from"react/compiler-runtime";import{jsx as jF}from"react/jsx-runtime";import{getTranslation as ad}from"@payloadcms/translations";import"react";var Kx=t=>{let e=OF(2),{cellData:o,field:n}=t,{blocks:r,labels:s}=n,{i18n:i}=L(),l=Array.isArray(o)?o.map(BF):[],a=r?.map(f=>({slug:f.slug,label:ad(f.labels.singular,i)})),c=`0 ${ad(s?.plural,i)}`,u=f=>f.map(d=>a.filter(p=>p.slug===d)?.[0]?.label).join(", ");if(l.length>5){let f=l.length-5;c=`${l.length} ${ad(s?.plural,i)} - ${i.t("fields:itemsAndMore",{count:f,items:u(l.slice(0,5))})}`}else l.length>0&&(c=`${l.length} ${ad(l.length===1?s?.singular:s?.plural,i)} - ${u(l)}`);let m;return e[0]!==c?(m=jF("span",{children:c}),e[0]=c,e[1]=m):m=e[1],m};function BF(t){let{blockType:e}=t;return e}import{c as $F}from"react/compiler-runtime";import{jsx as eC}from"react/jsx-runtime";import"react";var tC=t=>{let e=$F(3),{cellData:o}=t,{t:n}=L(),r=`general:${o}`,s;return e[0]!==n||e[1]!==r?(s=eC("code",{className:"bool-cell",children:eC("span",{children:n(r).toLowerCase()})}),e[0]=n,e[1]=r,e[2]=s):s=e[2],s};import{c as MF}from"react/compiler-runtime";import{jsx as VF}from"react/jsx-runtime";import"react";var oC=t=>{let e=MF(8),{cellData:o,field:n}=t,{admin:r}=n,s;e[0]!==r?(s=r===void 0?{}:r,e[0]=r,e[1]=s):s=e[1];let{date:i}=s,{config:l}=Y(),{admin:a}=l,{dateFormat:c}=a,u=i?.displayFormat||c,{i18n:m}=L(),f;e[2]!==o||e[3]!==u||e[4]!==m?(f=o&&ms({date:o,i18n:m,pattern:u}),e[2]=o,e[3]=u,e[4]=m,e[5]=f):f=e[5];let d;return e[6]!==f?(d=VF("span",{children:f}),e[6]=f,e[7]=d):d=e[7],d};import{jsx as iC,jsxs as WF}from"react/jsx-runtime";import"react";import{c as rC}from"react/compiler-runtime";import{jsx as vi,jsxs as nC}from"react/jsx-runtime";import cd from"react";import{jsx as Zp,jsxs as GF}from"react/jsx-runtime";import"react";var ld=()=>GF("svg",{height:"150",viewBox:"0 0 150 150",width:"150",xmlns:"http://www.w3.org/2000/svg",children:[Zp("rect",{fill:"#333333",height:"150",transform:"translate(0 0.5)",width:"150"}),Zp("path",{d:"M82.8876 50.5H55.5555V100.5H94.4444V61.9818H82.8876V50.5Z",fill:"white"}),Zp("path",{d:"M82.8876 61.9818H94.4444L82.8876 50.5V61.9818Z",fill:"#9A9A9A"})]});var ud="thumbnail",xr=t=>{let e=rC(19),{className:o,doc:n,fileSrc:r,imageCacheTag:s,size:i}=t,l=o===void 0?"":o,a;e[0]!==n?(a=n===void 0?{}:n,e[0]=n,e[1]=a):a=e[1];let{filename:c}=a,[u,m]=cd.useState(void 0),f=`${ud}--size-${i||"medium"}`,d;e[2]!==l||e[3]!==f?(d=[ud,f,l],e[2]=l,e[3]=f,e[4]=d):d=e[4];let h=d.join(" "),p,g;e[5]!==r?(p=()=>{if(!r){m(!1);return}let v=new Image;v.src=r,v.onload=()=>{m(!0)},v.onerror=()=>{m(!1)}},g=[r],e[5]=r,e[6]=p,e[7]=g):(p=e[6],g=e[7]),cd.useEffect(p,g);let b;if(e[8]!==h||e[9]!==u||e[10]!==r||e[11]!==c||e[12]!==s){let v;e[14]!==u||e[15]!==r||e[16]!==c||e[17]!==s?(v=u&&vi("img",{alt:c,src:`${r}${s?`?${s}`:""}`}),e[14]=u,e[15]=r,e[16]=c,e[17]=s,e[18]=v):v=e[18],b=nC("div",{className:h,children:[u===void 0&&vi(so,{height:"100%"}),v,u===!1&&vi(ld,{})]}),e[8]=h,e[9]=u,e[10]=r,e[11]=c,e[12]=s,e[13]=b}else b=e[13];return b};function sC(t){let e=rC(19),{alt:o,className:n,filename:r,fileSrc:s,imageCacheTag:i,size:l}=t,a=n===void 0?"":n,[c,u]=cd.useState(void 0),m=`${ud}--size-${l||"medium"}`,f;e[0]!==a||e[1]!==m?(f=[ud,m,a],e[0]=a,e[1]=m,e[2]=f):f=e[2];let d=f.join(" "),h,p;e[3]!==s?(h=()=>{if(!s){u(!1);return}let b=new Image;b.src=s,b.onload=()=>{u(!0)},b.onerror=()=>{u(!1)}},p=[s],e[3]=s,e[4]=h,e[5]=p):(h=e[4],p=e[5]),cd.useEffect(h,p);let g;if(e[6]!==o||e[7]!==d||e[8]!==c||e[9]!==s||e[10]!==r||e[11]!==i){let b;e[13]!==o||e[14]!==c||e[15]!==s||e[16]!==r||e[17]!==i?(b=c&&vi("img",{alt:o||r,src:`${s}${i?`?${i}`:""}`}),e[13]=o,e[14]=c,e[15]=s,e[16]=r,e[17]=i,e[18]=b):b=e[18],g=nC("div",{className:d,children:[c===void 0&&vi(so,{height:"100%"}),b,c===!1&&vi(ld,{})]}),e[6]=o,e[7]=d,e[8]=c,e[9]=s,e[10]=r,e[11]=i,e[12]=g}else g=e[12];return g}var Jp="file",dd=({cellData:t,collectionConfig:e,rowData:o})=>WF("div",{className:Jp,children:[iC(xr,{className:`${Jp}__thumbnail`,collectionSlug:e?.slug,doc:{...o,filename:t},fileSrc:o?.thumbnailURL||o?.url,size:"small",uploadConfig:e?.upload}),iC("span",{className:`${Jp}__filename`,children:String(t)})]});import{jsx as aC}from"react/jsx-runtime";import"react";var lC=({cellData:t})=>{let e=t?.length>100?`${t.substring(0,100)}\u2026`:t;return aC("code",{className:"json-cell",children:aC("span",{children:JSON.stringify(e)})})};import{c as HF}from"react/compiler-runtime";import{jsx as zF,jsxs as uC}from"react/jsx-runtime";import{getTranslation as XF}from"@payloadcms/translations";import YF,{useEffect as dC,useState as mC}from"react";var cC=!!(typeof window<"u"&&window.document&&window.document.createElement);var UF="relationship-cell",md=3,fd=t=>{let e=HF(40),{cellData:o,customCellProps:n,field:r,field:s}=t,{label:i}=s,l="relationTo"in r&&r.relationTo||"collection"in r&&r.collection,a;a="collection"in r?o?.docs:o;let c=a,{config:u,getEntityConfig:m}=Y(),{collections:f,routes:d}=u,[h,p]=Gr(),g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=[],e[0]=g):g=e[0];let[b,v]=mC(g),{documents:C,getRelationships:x}=Up(),[y,A]=mC(!1),{i18n:S,t:_}=L(),E=cC?p?.boundingClientRect?.top<window.innerHeight:!1,R;e[1]!==c||e[2]!==x||e[3]!==y||e[4]!==E||e[5]!==l?(R=()=>{if((c||typeof c=="number")&&E&&!y){let P=[],k=Array.isArray(c)?c:[c];k.slice(0,k.length<md?k.length:md).forEach(N=>{typeof N=="object"&&"relationTo"in N&&"value"in N&&P.push(N),(typeof N=="number"||typeof N=="string")&&typeof l=="string"&&P.push({relationTo:l,value:N})}),x(P),A(!0),v(P)}},e[1]=c,e[2]=x,e[3]=y,e[4]=E,e[5]=l,e[6]=R):R=e[6];let D;e[7]!==c||e[8]!==f||e[9]!==x||e[10]!==y||e[11]!==E||e[12]!==l||e[13]!==d.api?(D=[c,l,f,E,d.api,y,x],e[7]=c,e[8]=f,e[9]=x,e[10]=y,e[11]=E,e[12]=l,e[13]=d.api,e[14]=D):D=e[14],dC(R,D);let w;e[15]!==y?(w=()=>{y&&A(!1)},e[15]=y,e[16]=w):w=e[16];let I;e[17]!==c?(I=[c],e[17]=c,e[18]=I):I=e[18],dC(w,I);let F;if(e[19]!==c||e[20]!==u.admin.dateFormat||e[21]!==n||e[22]!==C||e[23]!==r||e[24]!==m||e[25]!==S||e[26]!==h||e[27]!==i||e[28]!==_||e[29]!==b){let P;e[31]!==u.admin.dateFormat||e[32]!==n||e[33]!==C||e[34]!==r||e[35]!==m||e[36]!==S||e[37]!==_||e[38]!==b.length?(P=(k,N)=>{let{relationTo:j,value:T}=k,O=C[j][T],M=m({collectionSlug:j}),B=Jo({collectionConfig:M,data:O||null,dateFormat:u.admin.dateFormat,fallback:`${_("general:untitled")} - ID: ${T}`,i18n:S}),$=null;if(r.type==="upload"){let W=!!M.upload.displayPreview;(r.displayPreview||W&&r.displayPreview!==!1)&&O&&($=zF(dd,{cellData:B,collectionConfig:M,customCellProps:n,field:r,rowData:O}))}return uC(YF.Fragment,{children:[O===!1&&`${_("general:untitled")} - ID: ${T}`,O===null&&`${_("general:loading")}...`,O?$||B:null,b.length>N+1&&", "]},N)},e[31]=u.admin.dateFormat,e[32]=n,e[33]=C,e[34]=r,e[35]=m,e[36]=S,e[37]=_,e[38]=b.length,e[39]=P):P=e[39],F=uC("div",{className:UF,ref:h,children:[b.map(P),Array.isArray(c)&&c.length>md&&_("fields:itemsAndMore",{count:c.length-md,items:""}),b.length===0&&_("general:noLabel",{label:XF(i||"",S)})]}),e[19]=c,e[20]=u.admin.dateFormat,e[21]=n,e[22]=C,e[23]=r,e[24]=m,e[25]=S,e[26]=h,e[27]=i,e[28]=_,e[29]=b,e[30]=F}else F=e[30];return F};import{c as ZF}from"react/compiler-runtime";import{jsx as JF}from"react/jsx-runtime";import{getTranslation as QF}from"@payloadcms/translations";import{optionsAreObjects as qF}from"payload/shared";import"react";var Qp=t=>{let e=ZF(10),{cellData:o,field:n}=t,{options:r}=n,{i18n:s}=L(),i;e[0]!==s||e[1]!==r?(i=u=>u.map(m=>{let f=r.filter(d=>d.value===m)?.[0]?.label;return QF(f,s)}).join(", "),e[0]=s,e[1]=r,e[2]=i):i=e[2];let l=i,a;if(qF(r)){let u;e[3]!==o||e[4]!==l?(u=Array.isArray(o)?l(o):l([o]),e[3]=o,e[4]=l,e[5]=u):u=e[5],a=u}else{let u;e[6]!==o?(u=Array.isArray(o)?o.join(", "):o,e[6]=o,e[7]=u):u=e[7],a=u}let c;return e[8]!==a?(c=JF("span",{children:a}),e[8]=a,e[9]=c):c=e[9],c};import{jsx as KF}from"react/jsx-runtime";import"react";var fC=({cellData:t})=>{let e=t?.length>100?`${t.substring(0,100)}\u2026`:t;return KF("span",{children:e})};var qp={array:qx,blocks:Kx,checkbox:tC,code:id,date:oC,File:dd,join:fd,json:lC,radio:Qp,relationship:fd,select:Qp,textarea:fC,upload:fd};var s6=pC.default||pC,bl=t=>{let e=e6(19),{cellData:o,className:n,collectionConfig:r,field:s,field:i,link:l,onClick:a,rowData:c}=t,{admin:u}=i,{i18n:m}=L(),{config:f}=Y(),{routes:d}=f,{admin:h}=d,p=u&&"className"in u?u.className:void 0,g=n||(s.admin&&"className"in s.admin?s.admin.className:null)||p,b=a,v="span",C,x;if(e[0]!==v||e[1]!==h||e[2]!==o||e[3]!==g||e[4]!==r||e[5]!==s||e[6]!==m||e[7]!==l||e[8]!==b||e[9]!==t||e[10]!==c){x=Symbol.for("react.early_return_sentinel");e:{let y={className:g};if(l&&(y.prefetch=!1,v=s6,y.href=r?.slug?nt({adminRoute:h,path:`/collections/${r?.slug}/${encodeURIComponent(c.id)}`}):""),typeof b=="function"){v="button",y.type="button";let _;e[14]!==o||e[15]!==r?.slug||e[16]!==b||e[17]!==c?(_=()=>{b({cellData:o,collectionSlug:r?.slug,rowData:c})},e[14]=o,e[15]=r?.slug,e[16]=b,e[17]=c,e[18]=_):_=e[18],y.onClick=_}if(n6(s)){x=gl(v,{...y,children:gl(id,{cellData:`ID: ${o}`,collectionConfig:r,field:{...s,type:"code"},nowrap:!0,rowData:c})});break e}let A=typeof o<"u"&&qp[s.type],S=null;if(A)S=gl(A,{cellData:o,rowData:c,...t});else if(!A)if(r?.upload&&r6(s)&&s.name==="filename"&&s.type==="text"){let _=qp.File;S=gl(_,{cellData:o,rowData:c,...t,collectionConfig:r,field:s})}else{x=t6(v,{...y,children:[(o===""||typeof o>"u"||o===null)&&m.t("general:noLabel",{label:o6(("label"in s?s.label:null)||"data",m)}),typeof o=="string"&&o,typeof o=="number"&&o,typeof o=="object"&&o!==null&&JSON.stringify(o)]});break e}C=gl(v,{...y,children:S})}e[0]=v,e[1]=h,e[2]=o,e[3]=g,e[4]=r,e[5]=s,e[6]=m,e[7]=l,e[8]=b,e[9]=t,e[10]=c,e[11]=C,e[12]=x,e[13]=v}else C=e[11],x=e[12],v=e[13];return x!==Symbol.for("react.early_return_sentinel")?x:C};import{c as i6}from"react/compiler-runtime";import{jsx as hC}from"react/jsx-runtime";import gC from"react";var a6="default-cell",bC=gC.createContext(null),Kp=()=>gC.useContext(bC),l6=t=>{let e=i6(9),{clientProps:o,columnIndex:n,isLinkedColumn:r}=t,{drawerSlug:s,onSelect:i}=Fr(),{LinkedCellOverride:l}=dl(),a;if(e[0]!==l||e[1]!==o||e[2]!==n||e[3]!==s||e[4]!==r||e[5]!==i){let c={...o,columnIndex:n};if(r&&s){c.className=`${a6}__first-cell`,c.link=!1;let u;e[7]!==i?(u=m=>{let{collectionSlug:f,rowData:d}=m;typeof i=="function"&&i({collectionSlug:f,docID:d.id})},e[7]=i,e[8]=u):u=e[8],c.onClick=u}a=hC(bC.Provider,{value:c,children:r&&l?l:hC(bl,{...c})}),e[0]=l,e[1]=o,e[2]=n,e[3]=s,e[4]=r,e[5]=i,e[6]=a}else a=e[6];return a};var vC=t=>{let e=c6(11),{onDrawerSave:o}=t,n=Kp(),r=n?.rowData.id,s=n?.collectionConfig.slug,i;e[0]!==r||e[1]!==s?(i={id:r,collectionSlug:s},e[0]=r,e[1]=s,e[2]=i):i=e[2];let[l,a,c]=zt(i),{closeDrawer:u}=c,m;e[3]!==u||e[4]!==o?(m=h=>{u(),typeof o=="function"&&o(h)},e[3]=u,e[4]=o,e[5]=m):m=e[5];let f=m,d;return e[6]!==l||e[7]!==a||e[8]!==n||e[9]!==f?(d=u6("div",{className:"drawer-link",children:[pd(bl,{...n,className:"drawer-link__cell",link:!1,onClick:null}),pd(a,{children:pd(ko,{})}),pd(l,{onSave:f})]}),e[6]=l,e[7]=a,e[8]=n,e[9]=f,e[10]=d):d=e[10],d};import{c as h6}from"react/compiler-runtime";import{jsx as g6}from"react/jsx-runtime";import"react";import{jsx as oh}from"react/jsx-runtime";import"react";import{jsx as xC}from"react/jsx-runtime";import"react";var eh="clickable-arrow",CC=t=>{let{direction:e="right",isDisabled:o=!1,updatePage:n}=t,r=[eh,o&&`${eh}--is-disabled`,e&&`${eh}--${e}`].filter(Boolean).join(" ");return xC("button",{className:r,disabled:o,onClick:o?void 0:n,type:"button",children:xC(Qe,{})})};import{jsx as d6}from"react/jsx-runtime";import"react";var hd="paginator__page",th=({isCurrent:t,isFirstPage:e=!1,isLastPage:o=!1,page:n=1,updatePage:r})=>{let s=[hd,t&&`${hd}--is-current`,e&&`${hd}--is-first-page`,o&&`${hd}--is-last-page`].filter(Boolean).join(" ");return d6("button",{className:s,onClick:()=>r(n),type:"button",children:n})};import{jsx as m6}from"react/jsx-runtime";import"react";var yC=()=>m6("span",{className:"paginator__separator",children:"\u2014"});var f6={ClickableArrow:CC,Page:th,Separator:yC},p6="paginator",vl=t=>{let{hasNextPage:e=!1,hasPrevPage:o=!1,nextPage:n=null,numberOfNeighbors:r=1,onChange:s,page:i,prevPage:l=null,totalPages:a=null}=t;if(!e&&!o)return null;let c=h=>{typeof s=="function"&&s(h)},u=Array.from({length:a},(h,p)=>p+1),m=i-1-r;m<=0&&(m=0);let f=i-1+r+1,d=u.slice(m,f);return i-r-1>=2&&d.unshift({type:"Separator"}),i>r+1&&d.unshift({type:"Page",props:{isFirstPage:!0,page:1,updatePage:c}}),i+r+1<a&&d.push({type:"Separator"}),f<a&&d.push({type:"Page",props:{isLastPage:!0,page:a,updatePage:c}}),d.unshift({type:"ClickableArrow",props:{direction:"right",isDisabled:!e,updatePage:()=>c(n)}}),d.unshift({type:"ClickableArrow",props:{direction:"left",isDisabled:!o,updatePage:()=>c(l)}}),oh("div",{className:p6,children:d.map((h,p)=>{if(typeof h=="number")return oh(th,{isCurrent:i===h,page:h,updatePage:c},p);let g=f6[h.type];return oh(g,{...h.props},p)})})};var wC=()=>{let t=h6(11),{data:e,handlePageChange:o}=br(),n=e.nextPage||2,r;t[0]!==o?(r=a=>{o(a)},t[0]=o,t[1]=r):r=t[1];let s=e.page||1,i=e.prevPage||void 0,l;return t[2]!==e.hasNextPage||t[3]!==e.hasPrevPage||t[4]!==e.limit||t[5]!==e.totalPages||t[6]!==n||t[7]!==r||t[8]!==s||t[9]!==i?(l=g6(vl,{hasNextPage:e.hasNextPage,hasPrevPage:e.hasPrevPage,limit:e.limit,nextPage:n,numberOfNeighbors:1,onChange:r,page:s,prevPage:i,totalPages:e.totalPages}),t[2]=e.hasNextPage,t[3]=e.hasPrevPage,t[4]=e.limit,t[5]=e.totalPages,t[6]=n,t[7]=r,t[8]=s,t[9]=i,t[10]=l):l=t[10],l};var Cr="relationship-table",SC=t=>{let e=b6(58),{AfterInput:o,allowCreate:n,BeforeInput:r,disableTable:s,filterOptions:i,initialData:l,initialDrawerData:a,Label:c,relationTo:u}=t,m=n===void 0?!0:n,f=s===void 0?!1:s,[d,h]=Dn(null),{getEntityConfig:p}=Y(),{permissions:g}=_e(),b;e[0]!==l?(b=()=>{if(l)return{...l,docs:Array.isArray(l.docs)?l.docs.reduce(x6,[]):[]}},e[0]=l,e[1]=b):b=e[1];let[v]=Dn(b),{i18n:C,t:x}=L(),[y,A]=Dn(),[S,_]=Dn(!1),E;e[2]!==p||e[3]!==u?(E=()=>p({collectionSlug:u}),e[2]=p,e[3]=u,e[4]=E):E=e[4];let[R]=Dn(E),[D,w]=Dn(!f),[I,F]=Dn(v),[P,k]=Dn(),{getTableState:N}=Ft(),j;e[5]!==i||e[6]!==N||e[7]!==y||e[8]!==u?(j=async we=>{let Ye={...y||{},where:{...y?.where||{}}};i&&(Ye.where=ul(Ye.where,i));let{data:ie,state:Pe,Table:le}=await N({collectionSlug:u,docs:we,enableRowSelections:!1,query:Ye,renderRowTypes:!0,tableAppearance:"condensed"});F(ie),h(le),k(Pe),w(!1)},e[5]=i,e[6]=N,e[7]=y,e[8]=u,e[9]=j):j=e[9];let T=j,O;e[10]!==d||e[11]!==f||e[12]!==y||e[13]!==T?(O=()=>{!f&&(!d||y)&&T()},e[10]=d,e[11]=f,e[12]=y,e[13]=T,e[14]=O):O=e[14];let M;e[15]!==f||e[16]!==y?(M=[y,f],e[15]=f,e[16]=y,e[17]=M):M=e[17];let B;e[18]!==d||e[19]!==T?(B=[d,T],e[18]=d,e[19]=T,e[20]=B):B=e[20],Ss(O,M,B);let $;e[21]!==u?($={collectionSlug:u},e[21]=u,e[22]=$):$=e[22];let[W,H,X]=zt($),{closeDrawer:G,openDrawer:z}=X,Z;e[23]!==I.docs||e[24]!==T?(Z=we=>{let Ye=I?.docs?.findIndex(Pe=>Pe.id===we.doc.id),ie;if(Ye!==-1){let Pe=[...I.docs];Pe[Ye]=we.doc,ie=Pe}else ie=[we.doc,...I.docs];T(ie)},e[23]=I.docs,e[24]=T,e[25]=Z):Z=e[25];let V=Z,re;e[26]!==G||e[27]!==V?(re=we=>{G(),V(we)},e[26]=G,e[27]=V,e[28]=re):re=e[28];let ee=re,te=`${u}-list`,Q=m!==!1&&g?.collections?.[u]?.create,xe;e[29]!==H||e[30]!==Q||e[31]!==C?(xe=Q&&Ao(H,{className:`${Cr}__add-new`,children:C.t("fields:addNew")}),e[29]=H,e[30]=Q,e[31]=C,e[32]=xe):xe=e[32];let he=`${Cr}__toggle-columns ${S?`${Cr}__buttons-active`:""}`,Ge=S?"up":"down",de;if(e[33]!==o||e[34]!==r||e[35]!==W||e[36]!==c||e[37]!==d||e[38]!==Q||e[39]!==R||e[40]!==P||e[41]!==I||e[42]!==C||e[43]!==a||e[44]!==D||e[45]!==ee||e[46]!==V||e[47]!==S||e[48]!==z||e[49]!==te||e[50]!==u||e[51]!==x||e[52]!==xe||e[53]!==he||e[54]!==Ge){let we;e[56]!==S?(we=()=>_(!S),e[56]=S,e[57]=we):we=e[57],de=xi("div",{className:Cr,children:[xi("div",{className:`${Cr}__header`,children:[c,xi("div",{className:`${Cr}__actions`,children:[xe,Ao(It,{"aria-controls":`${Cr}-columns`,"aria-expanded":S,className:he,icon:Ao(Qe,{direction:Ge}),onClick:we,pillStyle:"light",children:x("general:columns")})]})]}),r,D?Ao("p",{children:x("general:loading")}):xi(v6,{children:[I.docs&&I.docs.length===0&&xi("div",{className:`${Cr}__no-results`,children:[Ao("p",{children:C.t("general:noResults",{label:IC(R?.labels?.plural,C)})}),Q&&Ao(U,{onClick:z,children:C.t("general:createNewLabel",{label:IC(R?.labels?.singular,C)})})]}),I.docs&&I.docs.length>0&&Ao(hl,{children:Ao(Mp,{collectionSlug:u,data:I,defaultLimit:R?.admin?.pagination?.defaultLimit,modifySearchParams:!1,onQueryChange:A,preferenceKey:te,children:xi(td,{collectionSlug:u,columnState:P,docs:I.docs,LinkedCellOverride:Ao(vC,{onDrawerSave:V}),preferenceKey:te,renderRowTypes:!0,setTable:h,sortColumnProps:{appearance:"condensed"},tableAppearance:"condensed",children:[Ao(Ko,{className:`${Cr}__columns`,height:S?"auto":0,id:`${Cr}-columns`,children:Ao("div",{className:`${Cr}__columns-inner`,children:Ao(od,{collectionSlug:R.slug})})}),d,Ao(wC,{})]})})})]}),o,Ao(W,{initialData:a,onSave:ee})]}),e[33]=o,e[34]=r,e[35]=W,e[36]=c,e[37]=d,e[38]=Q,e[39]=R,e[40]=P,e[41]=I,e[42]=C,e[43]=a,e[44]=D,e[45]=ee,e[46]=V,e[47]=S,e[48]=z,e[49]=te,e[50]=u,e[51]=x,e[52]=xe,e[53]=he,e[54]=Ge,e[55]=de}else de=e[55];return de};function x6(t,e){return typeof e=="string"?[...t,{id:e}]:[...t,e]}var w6=t=>{let{field:e,field:{admin:{allowCreate:o,description:n},collection:r,label:s,localized:i,on:l,required:a},path:c}=t,{id:u}=Fe(),{customComponents:{AfterInput:m,BeforeInput:f,Description:d,Label:h}={},value:p}=De({path:c}),g=y6(()=>{if(!u)return null;let b={[l]:{equals:u}};return e.where?{and:[b,e.where]}:b},[u,l,e.where]);return C6("div",{className:[ve,"join"].filter(Boolean).join(" "),id:`field-${c?.replace(/\./g,"__")}`,children:[xl(SC,{AfterInput:m,allowCreate:typeof u<"u"&&o,BeforeInput:f,disableTable:g===null,field:e,filterOptions:g,initialData:u&&p?p:{docs:[]},initialDrawerData:{[l]:u},Label:xl("h4",{style:{margin:0},children:h||xl(Re,{label:s,localized:i,path:c,required:a})}),relationTo:r}),xl(q,{CustomComponent:d,Fallback:xl(Me,{description:n,path:c})})]})},Cl=Oe(w6);import{jsx as Rs,jsxs as AC}from"react/jsx-runtime";import{useCallback as rh,useEffect as I6,useMemo as S6,useState as nh}from"react";var A6="json-field",E6=t=>{let{field:e,field:{admin:{className:o,description:n,editorOptions:r,maxHeight:s}={},jsonSchema:i,label:l,localized:a,required:c},path:u,readOnly:m,validate:f}=t,[d,h]=nh(),[p,g]=nh(),[b,v]=nh(!1),C=rh((k,N)=>{if(typeof f=="function")return f(k,{...N,jsonError:p,required:c})},[f,c,p]),{customComponents:{AfterInput:x,BeforeInput:y,Description:A,Error:S,Label:_}={},initialValue:E,setValue:R,showError:D,value:w}=De({path:u,validate:C}),I=rh((k,N)=>{if(!i)return;let j=N.languages.json.jsonDefaults.diagnosticsOptions.schemas||[],T=N.Uri.parse(i.uri),O=N.editor.createModel(JSON.stringify(w,null,2),"json",T);N.languages.json.jsonDefaults.setDiagnosticsOptions({enableSchemaRequest:!0,schemas:[...j,i],validate:!0}),k.setModel(O)},[i,w]),F=rh(k=>{if(!m){h(k);try{R(k?JSON.parse(k):null),g(void 0)}catch(N){R(k||null),g(N)}}},[m,R,h]);I6(()=>{b||w===void 0||(h(w||E?JSON.stringify(w||E,null,2):""),v(!0))},[E,w,b]);let P=S6(()=>ot(e),[e]);return AC("div",{className:[ve,A6,o,D&&"error",m&&"read-only"].filter(Boolean).join(" "),style:P,children:[Rs(q,{CustomComponent:_,Fallback:Rs(Re,{label:l,localized:a,path:u,required:c})}),AC("div",{className:`${ve}__wrap`,children:[Rs(q,{CustomComponent:S,Fallback:Rs(Xe,{message:p,path:u,showError:D})}),y,Rs(tl,{defaultLanguage:"json",maxHeight:s,onChange:F,onMount:I,options:r,readOnly:m,value:d}),x]}),Rs(q,{CustomComponent:A,Fallback:Rs(Me,{description:n,path:u})})]})},yl=Oe(E6);import{jsx as Kr,jsxs as pw}from"react/jsx-runtime";import{getTranslation as CT}from"@payloadcms/translations";import{isNumber as yT}from"payload/shared";import{useCallback as Xh,useEffect as wT,useMemo as IT,useState as ST}from"react";import{jsx as Ns}from"react/jsx-runtime";import{getTranslation as dw}from"@payloadcms/translations";import mw,{useEffect as gT,useId as bT}from"react";function yr(t){"@babel/helpers - typeof";return yr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yr(t)}function EC(t,e){if(yr(t)!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(yr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function gd(t){var e=EC(t,"string");return yr(e)=="symbol"?e:e+""}function Ds(t,e,o){return(e=gd(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function _C(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),o.push.apply(o,n)}return o}function ye(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?_C(Object(o),!0).forEach(function(n){Ds(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):_C(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function RC(t){if(Array.isArray(t))return t}function DC(t,e){var o=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(o!=null){var n,r,s,i,l=[],a=!0,c=!1;try{if(s=(o=o.call(t)).next,e===0){if(Object(o)!==o)return;a=!1}else for(;!(a=(n=s.call(o)).done)&&(l.push(n.value),l.length!==e);a=!0);}catch(u){c=!0,r=u}finally{try{if(!a&&o.return!=null&&(i=o.return(),Object(i)!==i))return}finally{if(c)throw r}}return l}}function wl(t,e){(e==null||e>t.length)&&(e=t.length);for(var o=0,n=Array(e);o<e;o++)n[o]=t[o];return n}function bd(t,e){if(t){if(typeof t=="string")return wl(t,e);var o={}.toString.call(t).slice(8,-1);return o==="Object"&&t.constructor&&(o=t.constructor.name),o==="Map"||o==="Set"?Array.from(t):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?wl(t,e):void 0}}function FC(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
48
|
+
`);function Pu(t){return t.label!==void 0}var k_=3,L_="32px",_v=4e3,O_=356,j_=14,B_=20,$_=200;function M_(...t){return t.filter(Boolean).join(" ")}var V_=t=>{var e,o,n,r,s,i,l,a,c,u,m;let{invert:f,toast:d,unstyled:h,interacting:p,setHeights:g,visibleToasts:b,heights:v,index:C,toasts:x,expanded:y,removeToast:A,defaultRichColors:S,closeButton:_,style:E,cancelButtonStyle:R,actionButtonStyle:D,className:w="",descriptionClassName:I="",duration:F,position:P,gap:k,loadingIcon:N,expandByDefault:j,classNames:T,icons:O,closeButtonAriaLabel:M="Close toast",pauseWhenPageIsHidden:B,cn:$}=t,[W,H]=ge.useState(!1),[X,G]=ge.useState(!1),[z,Z]=ge.useState(!1),[V,re]=ge.useState(!1),[ee,te]=ge.useState(!1),[Q,xe]=ge.useState(0),[he,Ge]=ge.useState(0),de=ge.useRef(d.duration||F||_v),we=ge.useRef(null),Ye=ge.useRef(null),ie=C===0,Pe=C+1<=b,le=d.type,Be=d.dismissible!==!1,We=d.className||"",qe=d.descriptionClassName||"",ke=ge.useMemo(()=>v.findIndex(ne=>ne.toastId===d.id)||0,[v,d.id]),Ue=ge.useMemo(()=>{var ne;return(ne=d.closeButton)!=null?ne:_},[d.closeButton,_]),fe=ge.useMemo(()=>d.duration||F||_v,[d.duration,F]),me=ge.useRef(0),je=ge.useRef(0),$e=ge.useRef(0),Te=ge.useRef(null),[J,oe]=P.split("-"),ce=ge.useMemo(()=>v.reduce((ne,K,se)=>se>=ke?ne:ne+K.height,0),[v,ke]),Le=E_(),Ae=d.invert||f,Ee=le==="loading";je.current=ge.useMemo(()=>ke*k+ce,[ke,ce]),ge.useEffect(()=>{H(!0)},[]),ge.useEffect(()=>{let ne=Ye.current;if(ne){let K=ne.getBoundingClientRect().height;return Ge(K),g(se=>[{toastId:d.id,height:K,position:d.position},...se]),()=>g(se=>se.filter(Ve=>Ve.toastId!==d.id))}},[g,d.id]),ge.useLayoutEffect(()=>{if(!W)return;let ne=Ye.current,K=ne.style.height;ne.style.height="auto";let se=ne.getBoundingClientRect().height;ne.style.height=K,Ge(se),g(Ve=>Ve.find(Je=>Je.toastId===d.id)?Ve.map(Je=>Je.toastId===d.id?{...Je,height:se}:Je):[{toastId:d.id,height:se,position:d.position},...Ve])},[W,d.title,d.description,g,d.id]);let pe=ge.useCallback(()=>{G(!0),xe(je.current),g(ne=>ne.filter(K=>K.toastId!==d.id)),setTimeout(()=>{A(d)},$_)},[d,A,g,je]);ge.useEffect(()=>{if(d.promise&&le==="loading"||d.duration===1/0||d.type==="loading")return;let ne;return y||p||B&&Le?(()=>{if($e.current<me.current){let K=new Date().getTime()-me.current;de.current=de.current-K}$e.current=new Date().getTime()})():de.current!==1/0&&(me.current=new Date().getTime(),ne=setTimeout(()=>{var K;(K=d.onAutoClose)==null||K.call(d,d),pe()},de.current)),()=>clearTimeout(ne)},[y,p,d,le,B,Le,pe]),ge.useEffect(()=>{d.delete&&pe()},[pe,d.delete]);function ue(){var ne,K,se;return O!=null&&O.loading?ge.createElement("div",{className:$(T?.loader,(ne=d?.classNames)==null?void 0:ne.loader,"sonner-loader"),"data-visible":le==="loading"},O.loading):N?ge.createElement("div",{className:$(T?.loader,(K=d?.classNames)==null?void 0:K.loader,"sonner-loader"),"data-visible":le==="loading"},N):ge.createElement(C_,{className:$(T?.loader,(se=d?.classNames)==null?void 0:se.loader),visible:le==="loading"})}return ge.createElement("li",{tabIndex:0,ref:Ye,className:$(w,We,T?.toast,(e=d?.classNames)==null?void 0:e.toast,T?.default,T?.[le],(o=d?.classNames)==null?void 0:o[le]),"data-sonner-toast":"","data-rich-colors":(n=d.richColors)!=null?n:S,"data-styled":!(d.jsx||d.unstyled||h),"data-mounted":W,"data-promise":!!d.promise,"data-swiped":ee,"data-removed":X,"data-visible":Pe,"data-y-position":J,"data-x-position":oe,"data-index":C,"data-front":ie,"data-swiping":z,"data-dismissible":Be,"data-type":le,"data-invert":Ae,"data-swipe-out":V,"data-expanded":!!(y||j&&W),style:{"--index":C,"--toasts-before":C,"--z-index":x.length-C,"--offset":`${X?Q:je.current}px`,"--initial-height":j?"auto":`${he}px`,...E,...d.style},onPointerDown:ne=>{Ee||!Be||(we.current=new Date,xe(je.current),ne.target.setPointerCapture(ne.pointerId),ne.target.tagName!=="BUTTON"&&(Z(!0),Te.current={x:ne.clientX,y:ne.clientY}))},onPointerUp:()=>{var ne,K,se,Ve;if(V||!Be)return;Te.current=null;let Je=Number(((ne=Ye.current)==null?void 0:ne.style.getPropertyValue("--swipe-amount").replace("px",""))||0),ft=new Date().getTime()-((K=we.current)==null?void 0:K.getTime()),kt=Math.abs(Je)/ft;if(Math.abs(Je)>=B_||kt>.11){xe(je.current),(se=d.onDismiss)==null||se.call(d,d),pe(),re(!0),te(!1);return}(Ve=Ye.current)==null||Ve.style.setProperty("--swipe-amount","0px"),Z(!1)},onPointerMove:ne=>{var K,se,Ve;if(!Te.current||!Be)return;let Je=ne.clientY-Te.current.y,ft=((K=window.getSelection())==null?void 0:K.toString().length)>0;Number(((se=Ye.current)==null?void 0:se.style.getPropertyValue("--swipe-amount").replace("px",""))||0)>0&&te(!0),!ft&&((Ve=Ye.current)==null||Ve.style.setProperty("--swipe-amount",`${Math.max(0,Je)}px`))}},Ue&&!d.jsx?ge.createElement("button",{"aria-label":M,"data-disabled":Ee,"data-close-button":!0,onClick:Ee||!Be?()=>{}:()=>{var ne;pe(),(ne=d.onDismiss)==null||ne.call(d,d)},className:$(T?.closeButton,(r=d?.classNames)==null?void 0:r.closeButton)},(s=O?.close)!=null?s:A_):null,d.jsx||ge.isValidElement(d.title)?d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title:ge.createElement(ge.Fragment,null,le||d.icon||d.promise?ge.createElement("div",{"data-icon":"",className:$(T?.icon,(i=d?.classNames)==null?void 0:i.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||ue():null,d.type!=="loading"?d.icon||O?.[le]||v_(le):null):null,ge.createElement("div",{"data-content":"",className:$(T?.content,(l=d?.classNames)==null?void 0:l.content)},ge.createElement("div",{"data-title":"",className:$(T?.title,(a=d?.classNames)==null?void 0:a.title)},typeof d.title=="function"?d.title():d.title),d.description?ge.createElement("div",{"data-description":"",className:$(I,qe,T?.description,(c=d?.classNames)==null?void 0:c.description)},typeof d.description=="function"?d.description():d.description):null),ge.isValidElement(d.cancel)?d.cancel:d.cancel&&Pu(d.cancel)?ge.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||R,onClick:ne=>{var K,se;Pu(d.cancel)&&Be&&((se=(K=d.cancel).onClick)==null||se.call(K,ne),pe())},className:$(T?.cancelButton,(u=d?.classNames)==null?void 0:u.cancelButton)},d.cancel.label):null,ge.isValidElement(d.action)?d.action:d.action&&Pu(d.action)?ge.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||D,onClick:ne=>{var K,se;Pu(d.action)&&((se=(K=d.action).onClick)==null||se.call(K,ne),!ne.defaultPrevented&&pe())},className:$(T?.actionButton,(m=d?.classNames)==null?void 0:m.actionButton)},d.action.label):null))};function Rv(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}var Dv=g_(function(t,e){let{invert:o,position:n="bottom-right",hotkey:r=["altKey","KeyT"],expand:s,closeButton:i,className:l,offset:a,theme:c="light",richColors:u,duration:m,style:f,visibleToasts:d=k_,toastOptions:h,dir:p=Rv(),gap:g=j_,loadingIcon:b,icons:v,containerAriaLabel:C="Notifications",pauseWhenPageIsHidden:x,cn:y=M_}=t,[A,S]=ge.useState([]),_=ge.useMemo(()=>Array.from(new Set([n].concat(A.filter(B=>B.position).map(B=>B.position)))),[A,n]),[E,R]=ge.useState([]),[D,w]=ge.useState(!1),[I,F]=ge.useState(!1),[P,k]=ge.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),N=ge.useRef(null),j=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=ge.useRef(null),O=ge.useRef(!1),M=ge.useCallback(B=>{S($=>{var W;return(W=$.find(H=>H.id===B.id))!=null&&W.delete||Oo.dismiss(B.id),$.filter(({id:H})=>H!==B.id)})},[]);return ge.useEffect(()=>Oo.subscribe(B=>{if(B.dismiss){S($=>$.map(W=>W.id===B.id?{...W,delete:!0}:W));return}setTimeout(()=>{b_.flushSync(()=>{S($=>{let W=$.findIndex(H=>H.id===B.id);return W!==-1?[...$.slice(0,W),{...$[W],...B},...$.slice(W+1)]:[B,...$]})})})}),[]),ge.useEffect(()=>{if(c!=="system"){k(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?k("dark"):k("light")),typeof window>"u")return;let B=window.matchMedia("(prefers-color-scheme: dark)");try{B.addEventListener("change",({matches:$})=>{k($?"dark":"light")})}catch{B.addListener(({matches:W})=>{try{k(W?"dark":"light")}catch(H){console.error(H)}})}},[c]),ge.useEffect(()=>{A.length<=1&&w(!1)},[A]),ge.useEffect(()=>{let B=$=>{var W,H;r.every(X=>$[X]||$.code===X)&&(w(!0),(W=N.current)==null||W.focus()),$.code==="Escape"&&(document.activeElement===N.current||(H=N.current)!=null&&H.contains(document.activeElement))&&w(!1)};return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[r]),ge.useEffect(()=>{if(N.current)return()=>{T.current&&(T.current.focus({preventScroll:!0}),T.current=null,O.current=!1)}},[N.current]),ge.createElement("section",{"aria-label":`${C} ${j}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},_.map((B,$)=>{var W;let[H,X]=B.split("-");return A.length?ge.createElement("ol",{key:B,dir:p==="auto"?Rv():p,tabIndex:-1,ref:N,className:l,"data-sonner-toaster":!0,"data-theme":P,"data-y-position":H,"data-lifted":D&&A.length>1&&!s,"data-x-position":X,style:{"--front-toast-height":`${((W=E[0])==null?void 0:W.height)||0}px`,"--offset":typeof a=="number"?`${a}px`:a||L_,"--width":`${O_}px`,"--gap":`${g}px`,...f},onBlur:G=>{O.current&&!G.currentTarget.contains(G.relatedTarget)&&(O.current=!1,T.current&&(T.current.focus({preventScroll:!0}),T.current=null))},onFocus:G=>{G.target instanceof HTMLElement&&G.target.dataset.dismissible==="false"||O.current||(O.current=!0,T.current=G.relatedTarget)},onMouseEnter:()=>w(!0),onMouseMove:()=>w(!0),onMouseLeave:()=>{I||w(!1)},onPointerDown:G=>{G.target instanceof HTMLElement&&G.target.dataset.dismissible==="false"||F(!0)},onPointerUp:()=>F(!1)},A.filter(G=>!G.position&&$===0||G.position===B).map((G,z)=>{var Z,V;return ge.createElement(V_,{key:G.id,icons:v,index:z,toast:G,defaultRichColors:u,duration:(Z=h?.duration)!=null?Z:m,className:h?.className,descriptionClassName:h?.descriptionClassName,invert:o,visibleToasts:d,closeButton:(V=h?.closeButton)!=null?V:i,interacting:I,position:B,style:h?.style,unstyled:h?.unstyled,classNames:h?.classNames,cancelButtonStyle:h?.cancelButtonStyle,actionButtonStyle:h?.actionButtonStyle,removeToast:M,toasts:A.filter(re=>re.position==G.position),heights:E.filter(re=>re.position==G.position),setHeights:R,expandByDefault:s,gap:g,loadingIcon:b,expanded:D,pauseWhenPageIsHidden:x,cn:y})})):null}))});import{c as G_}from"react/compiler-runtime";import{jsx as La,jsxs as op}from"react/jsx-runtime";import{useRouter as W_}from"next/navigation.js";import"react";var nt=t=>{let{adminRoute:e,basePath:o="",path:n,serverURL:r}=t;if(e)if(e==="/"){if(!n)return`${r||""}${o}${e}`}else return`${r||""}${o}${e}${n}`;return`${r||""}${o}${n}`};var Tu="stay-logged-in",Oa="stay-logged-in",Fv=()=>{let t=G_(15),{refreshCookie:e}=_e(),o=W_(),{config:n}=Y(),{admin:r,routes:s}=n,{routes:i}=r,{logout:l}=i,{admin:a}=s,{toggleModal:c}=ae(),{t:u}=L(),m;if(t[0]!==a||t[1]!==l||t[2]!==e||t[3]!==o||t[4]!==u||t[5]!==c){let f;t[7]!==a||t[8]!==l||t[9]!==o||t[10]!==c?(f=()=>{c(Oa),o.push(nt({adminRoute:a,path:l}))},t[7]=a,t[8]=l,t[9]=o,t[10]=c,t[11]=f):f=t[11];let d;t[12]!==e||t[13]!==c?(d=()=>{e(),c(Oa)},t[12]=e,t[13]=c,t[14]=d):d=t[14],m=La(lt,{className:Tu,slug:Oa,children:op("div",{className:`${Tu}__wrapper`,children:[op("div",{className:`${Tu}__content`,children:[La("h1",{children:u("authentication:stayLoggedIn")}),La("p",{children:u("authentication:youAreInactive")})]}),op("div",{className:`${Tu}__controls`,children:[La(U,{buttonStyle:"secondary",onClick:f,size:"large",children:u("authentication:logOut")}),La(U,{onClick:d,size:"large",children:u("authentication:stayLoggedIn")})]})]})}),t[0]=a,t[1]=l,t[2]=e,t[3]=o,t[4]=u,t[5]=c,t[6]=m}else m=t[6];return m};import{c as H_}from"react/compiler-runtime";import{useEffect as z_,useState as X_}from"react";function So(t,e){let o=H_(4),[n,r]=X_(t),s,i;return o[0]!==e||o[1]!==t?(s=()=>{let l=setTimeout(()=>{r(t)},e);return()=>{clearTimeout(l)}},i=[t,e],o[0]=e,o[1]=t,o[2]=s,o[3]=i):(s=o[2],i=o[3]),z_(s,i),n}import*as Pv from"qs-esm";var tt={delete:(t,e={headers:{}})=>{let o=e&&e.headers?{...e.headers}:{},n={...e,credentials:"include",headers:{...o},method:"delete"};return fetch(t,n)},get:(t,e={headers:{}})=>{let o="";return e.params&&(o=Pv.stringify(e.params,{addQueryPrefix:!0})),fetch(`${t}${o}`,{credentials:"include",...e})},patch:(t,e={headers:{}})=>{let o=e&&e.headers?{...e.headers}:{},n={...e,credentials:"include",headers:{...o},method:"PATCH"};return fetch(t,n)},post:(t,e={headers:{}})=>{let o=e&&e.headers?{...e.headers}:{},n={...e,credentials:"include",headers:{...o},method:"post"};return fetch(`${t}`,n)},put:(t,e={headers:{}})=>{let o=e&&e.headers?{...e.headers}:{},n={...e,credentials:"include",headers:{...o},method:"put"};return fetch(t,n)}};var Lv=J_({}),Nv=2147483647;function rp({children:t,permissions:e,user:o}){let[n,r]=ja(o),[s,i]=ja(),[l,a]=ja(),c=U_(),u=Z_(),{config:m}=Y(),{admin:{routes:{inactivity:f},user:d},routes:{admin:h,api:p},serverURL:g}=m,[b,v]=ja(e),{i18n:C}=L(),{closeAllModals:x,openModal:y}=ae(),[A,S]=ja(0),_=So(A,1e4),E=Tv.useRef(null),R=n?.id,D=ls(()=>{if(window.location.pathname.startsWith(h)){let T=`?redirect=${encodeURIComponent(window.location.pathname)}`;u.replace(nt({adminRoute:h,path:`${f}${T}`}))}else u.replace(nt({adminRoute:h,path:f}));x()},[u,h,f,x]),w=ls(()=>{i(void 0),a(void 0),clearTimeout(E.current)},[]),I=ls(T=>{T?.user?(r(T.user),i(T.token),a(T.exp)):(r(null),w())},[w]),F=ls(T=>{let O=Math.round(new Date().getTime()/1e3),M=(typeof l=="number"?l:0)-O;return(T||l&&M<120)&&(E.current=setTimeout(()=>{async function B(){try{let $=await tt.post(`${g}${p}/${d}/refresh-token?refresh`,{headers:{"Accept-Language":C.language}});if($.status===200){let W=await $.json();I(W)}else I(null),D()}catch($){be.error($.message)}}B()},1e3)),()=>{clearTimeout(E.current)}},[p,C.language,D,g,I,l,d]),P=ls(async T=>{try{let O=await tt.post(`${g}${p}/${d}/refresh-token`,{headers:{"Accept-Language":C.language}});if(O.status===200){let M=await O.json();return T||I(M),M.user}return I(null),D(),null}catch(O){return be.error(`Refreshing token failed: ${O.message}`),null}},[p,C.language,D,g,I,d]),k=ls(async()=>{try{return await tt.post(`${g}${p}/${d}/logout`),I(null),w(),!0}catch(T){return be.error(`Logging out failed: ${T.message}`),!1}},[p,w,g,I,d]),N=ls(async({locale:T}={})=>{let O=kv.stringify({locale:T},{addQueryPrefix:!0});try{let M=await tt.get(`${g}${p}/access${O}`,{headers:{"Accept-Language":C.language}});if(M.status===200){let B=await M.json();v(B)}else throw new Error(`Fetching permissions failed with status code ${M.status}`)}catch(M){be.error(`Refreshing permissions failed: ${M.message}`)}},[g,p,C]),j=Tv.useCallback(async()=>{try{let T=await tt.get(`${g}${p}/${d}/me`,{credentials:"include",headers:{"Accept-Language":C.language}});if(T.status===200){let O=await T.json(),M=null;return I(O),M}}catch(T){be.error(`Fetching user failed: ${T.message}`)}return null},[g,p,d,C.language,I]);return Nu(()=>{j()},[j]),Nu(()=>{R&&F()},[_,F,R]),Nu(()=>{S(Date.now())},[c]),Nu(()=>{let T,O,M=Math.round(new Date().getTime()/1e3),B=typeof l=="number"?l-M:0,$=Math.max(Math.min((B-60)*1e3,Nv),0),W=Math.max(Math.min(B*1e3,Nv),0);if(!n){clearTimeout(T),clearTimeout(O);return}return B>0&&(T=setTimeout(()=>{y(Oa)},$),O=setTimeout(()=>{I(null),D()},W)),()=>{T&&clearTimeout(T),O&&clearTimeout(O)}},[l,y,C,I,n]),Y_(Lv.Provider,{value:{fetchFullUser:j,logOut:k,permissions:b,refreshCookie:F,refreshCookieAsync:P,refreshPermissions:N,setPermissions:v,setUser:I,token:s,user:n},children:t})}var _e=()=>Q_(Lv);import{jsx as q_}from"react/jsx-runtime";import{dequal as Ov}from"dequal/lite";import{createContext as K_,useCallback as jv,useContext as eR,useEffect as tR,useRef as sp}from"react";function np(t,e){let o={...t};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(typeof e[n]=="object"&&!Array.isArray(e[n])&&t[n]?o[n]=np(t[n],e[n]):o[n]=e[n]);return o}var $v=K_({}),Bv=(t,e)=>({body:JSON.stringify({value:t}),headers:{"Accept-Language":e,"Content-Type":"application/json"}}),ip=({children:t})=>{let e=sp({}),o=sp({}),n=sp({}),{config:r}=Y(),{user:s}=_e(),{i18n:i}=L(),{routes:{api:l},serverURL:a}=r;tR(()=>{s||(o.current={})},[s]);let c=jv(async m=>{let f=o.current;if(typeof f[m]<"u")return f[m];let d=new Promise(h=>{(async()=>{let p=await tt.get(`${a}${l}/payload-preferences/${m}`,{headers:{"Accept-Language":i.language}}),g=null;p.status===200&&(g=(await p.json()).value),o.current[m]=g,h(g)})()});return f[m]=d,d},[i.language,l,o,a]),u=jv(async(m,f,d=!1)=>{if(d===!1){o.current[m]=f,await tt.post(`${a}${l}/payload-preferences/${m}`,Bv(f,i.language));return}let h=f,p=await c(m);if(typeof f=="object"&&typeof p=="object"&&typeof h=="object"){if(p&&(h=np(p,h)),Ov(h,p))return;n.current[m]={...n.current[m],...h}}else{if(h===p)return;n.current[m]=h}let g=async()=>{Ov(n.current[m],o.current[m])||(o.current[m]=n.current[m],await tt.post(`${a}${l}/payload-preferences/${m}`,Bv(o.current[m],i.language)),delete n.current[m])};setTimeout(()=>{g()})},[l,c,i.language,n,a]);return e.current.getPreference=c,e.current.setPreference=u,q_($v.Provider,{value:e.current,children:t})},Ht=()=>eR($v);var Mv=sR({}),ap=({children:t})=>{let{config:{localization:e=!1}}=Y(),{user:o}=_e(),n=e&&e.defaultLocale?e.defaultLocale:"en",{getPreference:r,setPreference:s}=Ht(),l=rR().get("locale"),[a,c]=lR(n),u=nR.useMemo(()=>e?vu(e,l||a)||vu(e,n):{},[a,l,e,n]);return aR(()=>{async function m(){if(e&&o)if(typeof l!="string")try{let f=await r("locale");c(f)}catch{c(n)}else s("locale",vu(e,l)?.code||n)}m()},[n,r,e,l,s,o]),oR(Mv.Provider,{value:u,children:t})},Ne=()=>iR(Mv);var ku=(t,e,o)=>`field-${t?.replace(/\./g,"__")}${e>1?`-${e}`:""}${o?`-${o}`:""}`;var Re=t=>{let e=cR(25),{as:o,hideLocale:n,htmlFor:r,label:s,localized:i,path:l,required:a,unstyled:c}=t,u=o===void 0?"label":o,m=n===void 0?!1:n,f=i===void 0?!1:i,d=a===void 0?!1:a,h=c===void 0?!1:c,{uuid:p}=He(),g=Ze(),b;e[0]!==g||e[1]!==r||e[2]!==l||e[3]!==p?(b=r||ku(l,g,p),e[0]=g,e[1]=r,e[2]=l,e[3]=p,e[4]=b):b=e[4];let v=b,{i18n:C}=L(),{code:x,label:y}=Ne();if(s){let A=`field-label ${h?"unstyled":""}`,S;if(e[5]!==u||e[6]!==x||e[7]!==m||e[8]!==v||e[9]!==C||e[10]!==s||e[11]!==y||e[12]!==f||e[13]!==d||e[14]!==A||e[15]!==h){let _;e[17]!==d||e[18]!==h?(_=d&&!h&&uR("span",{className:"required",children:"*"}),e[17]=d,e[18]=h,e[19]=_):_=e[19];let E;e[20]!==x||e[21]!==m||e[22]!==y||e[23]!==f?(E=f&&!m&&Vv("span",{className:"localized",children:["\u2014 ",typeof y=="string"?y:x]}),e[20]=x,e[21]=m,e[22]=y,e[23]=f,e[24]=E):E=e[24],S=Vv(u,{className:A,htmlFor:v,children:[dR(s,C),_,E]}),e[5]=u,e[6]=x,e[7]=m,e[8]=v,e[9]=C,e[10]=s,e[11]=y,e[12]=f,e[13]=d,e[14]=A,e[15]=h,e[16]=S}else S=e[16];return S}return null};var Lu=({collapsed:t,rowID:e,rows:o})=>o.reduce((n,r)=>(e===r.id&&(r.collapsed=t),r.collapsed&&n.collapsedIDs.push(r.id),n.updatedRows.push(r),n),{collapsedIDs:[],updatedRows:[]}),Ou=({collapsed:t,rows:e})=>e.reduce((o,n)=>(n.collapsed=t,t&&o.collapsedIDs.push(n.id),o.updatedRows.push(n),o),{collapsedIDs:[],updatedRows:[]});import{c as ZR}from"react/compiler-runtime";import{jsx as N0}from"react/jsx-runtime";import*as k0 from"react";import{jsx as za,jsxs as XR}from"react/jsx-runtime";import{useCallback as T0,useMemo as YR}from"react";import{c as GR}from"react/compiler-runtime";import{useRef as _0}from"react";import{c as mR}from"react/compiler-runtime";import{useEffect as fR,useRef as pR}from"react";var cs=(t,e,o)=>{let n=mR(9),r;n[0]!==o?(r=o===void 0?[]:o,n[0]=o,n[1]=r):r=n[1];let s=r,i;n[2]===Symbol.for("react.memo_cache_sentinel")?(i=Date.now(),n[2]=i):i=n[2];let l=pR(i),a;n[3]!==t||n[4]!==e?(a=()=>{let u=setTimeout(()=>{Date.now()-l.current>=e&&(t(),l.current=Date.now())},e-(Date.now()-l.current));return()=>{clearTimeout(u)}},n[3]=t,n[4]=e,n[5]=a):a=n[5];let c;n[6]!==e||n[7]!==s?(c=[e,...s],n[6]=e,n[7]=s,n[8]=c):c=n[8],fR(a,c)};import{jsx as hp}from"react/jsx-runtime";import*as A0 from"qs-esm";import I0,{createContext as LR,useCallback as Ma,useContext as OR,useEffect as S0,useRef as jR,useState as Qo}from"react";import{getTranslation as PR}from"@payloadcms/translations";var hR=Math.pow(10,8)*24*60*60*1e3,zH=-hR,ju=6048e5,Gv=864e5;var Ba=43200,lp=1440;var gR=3600;var Wv=gR*24,XH=Wv*7,bR=Wv*365.2425,vR=bR/12,YH=vR*3,cp=Symbol.for("constructDateFrom");function lo(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&cp in t?t[cp](e):t instanceof Date?new t.constructor(e):new Date(e)}function Ke(t,e){return lo(e||t,t)}var xR={};function Dr(){return xR}function Yr(t,e){let o=Dr(),n=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,r=Ke(t,e?.in),s=r.getDay(),i=(s<n?7:0)+s-n;return r.setDate(r.getDate()-i),r.setHours(0,0,0,0),r}function us(t,e){return Yr(t,{...e,weekStartsOn:1})}function Bu(t,e){let o=Ke(t,e?.in),n=o.getFullYear(),r=lo(o,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);let s=us(r),i=lo(o,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);let l=us(i);return o.getTime()>=s.getTime()?n+1:o.getTime()>=l.getTime()?n:n-1}function mi(t){let e=Ke(t),o=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return o.setUTCFullYear(e.getFullYear()),+t-+o}function yn(t,...e){let o=lo.bind(null,t||e.find(n=>typeof n=="object"));return e.map(o)}function up(t,e){let o=Ke(t,e?.in);return o.setHours(0,0,0,0),o}function Hv(t,e,o){let[n,r]=yn(o?.in,t,e),s=up(n),i=up(r),l=+s-mi(s),a=+i-mi(i);return Math.round((l-a)/Gv)}function zv(t,e){let o=Bu(t,e),n=lo(e?.in||t,0);return n.setFullYear(o,0,4),n.setHours(0,0,0,0),us(n)}function fi(t,e){let o=+Ke(t)-+Ke(e);return o<0?-1:o>0?1:o}function Xv(t){return lo(t,Date.now())}function Yv(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Uv(t){return!(!Yv(t)&&typeof t!="number"||isNaN(+Ke(t)))}function Zv(t,e,o){let[n,r]=yn(o?.in,t,e),s=n.getFullYear()-r.getFullYear(),i=n.getMonth()-r.getMonth();return s*12+i}function Jv(t){return e=>{let n=(t?Math[t]:Math.trunc)(e);return n===0?0:n}}function Qv(t,e){return+Ke(t)-+Ke(e)}function qv(t,e){let o=Ke(t,e?.in);return o.setHours(23,59,59,999),o}function Kv(t,e){let o=Ke(t,e?.in),n=o.getMonth();return o.setFullYear(o.getFullYear(),n+1,0),o.setHours(23,59,59,999),o}function e0(t,e){let o=Ke(t,e?.in);return+qv(o,e)==+Kv(o,e)}function t0(t,e,o){let[n,r,s]=yn(o?.in,t,t,e),i=fi(r,s),l=Math.abs(Zv(r,s));if(l<1)return 0;r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-i*l);let a=fi(r,s)===-i;e0(n)&&l===1&&fi(n,s)===1&&(a=!1);let c=i*(l-+a);return c===0?0:c}function o0(t,e,o){let n=Qv(t,e)/1e3;return Jv(o?.roundingMethod)(n)}function r0(t,e){let o=Ke(t,e?.in);return o.setFullYear(o.getFullYear(),0,1),o.setHours(0,0,0,0),o}function n0(t,e){let o=Ke(t,e?.in);return Hv(o,r0(o))+1}function s0(t,e){let o=Ke(t,e?.in),n=+us(o)-+zv(o);return Math.round(n/ju)+1}function $u(t,e){let o=Ke(t,e?.in),n=o.getFullYear(),r=Dr(),s=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=lo(e?.in||t,0);i.setFullYear(n+1,0,s),i.setHours(0,0,0,0);let l=Yr(i,e),a=lo(e?.in||t,0);a.setFullYear(n,0,s),a.setHours(0,0,0,0);let c=Yr(a,e);return+o>=+l?n+1:+o>=+c?n:n-1}function i0(t,e){let o=Dr(),n=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,r=$u(t,e),s=lo(e?.in||t,0);return s.setFullYear(r,0,n),s.setHours(0,0,0,0),Yr(s,e)}function a0(t,e){let o=Ke(t,e?.in),n=+Yr(o,e)-+i0(o,e);return Math.round(n/ju)+1}function st(t,e){let o=t<0?"-":"",n=Math.abs(t).toString().padStart(e,"0");return o+n}var Ur={y(t,e){let o=t.getFullYear(),n=o>0?o:1-o;return st(e==="yy"?n%100:n,e.length)},M(t,e){let o=t.getMonth();return e==="M"?String(o+1):st(o+1,2)},d(t,e){return st(t.getDate(),e.length)},a(t,e){let o=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return o.toUpperCase();case"aaa":return o;case"aaaaa":return o[0];case"aaaa":default:return o==="am"?"a.m.":"p.m."}},h(t,e){return st(t.getHours()%12||12,e.length)},H(t,e){return st(t.getHours(),e.length)},m(t,e){return st(t.getMinutes(),e.length)},s(t,e){return st(t.getSeconds(),e.length)},S(t,e){let o=e.length,n=t.getMilliseconds(),r=Math.trunc(n*Math.pow(10,o-3));return st(r,e.length)}};var pi={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},dp={G:function(t,e,o){let n=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return o.era(n,{width:"abbreviated"});case"GGGGG":return o.era(n,{width:"narrow"});case"GGGG":default:return o.era(n,{width:"wide"})}},y:function(t,e,o){if(e==="yo"){let n=t.getFullYear(),r=n>0?n:1-n;return o.ordinalNumber(r,{unit:"year"})}return Ur.y(t,e)},Y:function(t,e,o,n){let r=$u(t,n),s=r>0?r:1-r;if(e==="YY"){let i=s%100;return st(i,2)}return e==="Yo"?o.ordinalNumber(s,{unit:"year"}):st(s,e.length)},R:function(t,e){let o=Bu(t);return st(o,e.length)},u:function(t,e){let o=t.getFullYear();return st(o,e.length)},Q:function(t,e,o){let n=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return st(n,2);case"Qo":return o.ordinalNumber(n,{unit:"quarter"});case"QQQ":return o.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return o.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(n,{width:"wide",context:"formatting"})}},q:function(t,e,o){let n=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return st(n,2);case"qo":return o.ordinalNumber(n,{unit:"quarter"});case"qqq":return o.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return o.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(n,{width:"wide",context:"standalone"})}},M:function(t,e,o){let n=t.getMonth();switch(e){case"M":case"MM":return Ur.M(t,e);case"Mo":return o.ordinalNumber(n+1,{unit:"month"});case"MMM":return o.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return o.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(n,{width:"wide",context:"formatting"})}},L:function(t,e,o){let n=t.getMonth();switch(e){case"L":return String(n+1);case"LL":return st(n+1,2);case"Lo":return o.ordinalNumber(n+1,{unit:"month"});case"LLL":return o.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return o.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(n,{width:"wide",context:"standalone"})}},w:function(t,e,o,n){let r=a0(t,n);return e==="wo"?o.ordinalNumber(r,{unit:"week"}):st(r,e.length)},I:function(t,e,o){let n=s0(t);return e==="Io"?o.ordinalNumber(n,{unit:"week"}):st(n,e.length)},d:function(t,e,o){return e==="do"?o.ordinalNumber(t.getDate(),{unit:"date"}):Ur.d(t,e)},D:function(t,e,o){let n=n0(t);return e==="Do"?o.ordinalNumber(n,{unit:"dayOfYear"}):st(n,e.length)},E:function(t,e,o){let n=t.getDay();switch(e){case"E":case"EE":case"EEE":return o.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return o.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(n,{width:"short",context:"formatting"});case"EEEE":default:return o.day(n,{width:"wide",context:"formatting"})}},e:function(t,e,o,n){let r=t.getDay(),s=(r-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return st(s,2);case"eo":return o.ordinalNumber(s,{unit:"day"});case"eee":return o.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return o.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(r,{width:"short",context:"formatting"});case"eeee":default:return o.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,o,n){let r=t.getDay(),s=(r-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return st(s,e.length);case"co":return o.ordinalNumber(s,{unit:"day"});case"ccc":return o.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return o.day(r,{width:"narrow",context:"standalone"});case"cccccc":return o.day(r,{width:"short",context:"standalone"});case"cccc":default:return o.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,o){let n=t.getDay(),r=n===0?7:n;switch(e){case"i":return String(r);case"ii":return st(r,e.length);case"io":return o.ordinalNumber(r,{unit:"day"});case"iii":return o.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return o.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return o.day(n,{width:"short",context:"formatting"});case"iiii":default:return o.day(n,{width:"wide",context:"formatting"})}},a:function(t,e,o){let r=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return o.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,o){let n=t.getHours(),r;switch(n===12?r=pi.noon:n===0?r=pi.midnight:r=n/12>=1?"pm":"am",e){case"b":case"bb":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return o.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,o){let n=t.getHours(),r;switch(n>=17?r=pi.evening:n>=12?r=pi.afternoon:n>=4?r=pi.morning:r=pi.night,e){case"B":case"BB":case"BBB":return o.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return o.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,o){if(e==="ho"){let n=t.getHours()%12;return n===0&&(n=12),o.ordinalNumber(n,{unit:"hour"})}return Ur.h(t,e)},H:function(t,e,o){return e==="Ho"?o.ordinalNumber(t.getHours(),{unit:"hour"}):Ur.H(t,e)},K:function(t,e,o){let n=t.getHours()%12;return e==="Ko"?o.ordinalNumber(n,{unit:"hour"}):st(n,e.length)},k:function(t,e,o){let n=t.getHours();return n===0&&(n=24),e==="ko"?o.ordinalNumber(n,{unit:"hour"}):st(n,e.length)},m:function(t,e,o){return e==="mo"?o.ordinalNumber(t.getMinutes(),{unit:"minute"}):Ur.m(t,e)},s:function(t,e,o){return e==="so"?o.ordinalNumber(t.getSeconds(),{unit:"second"}):Ur.s(t,e)},S:function(t,e){return Ur.S(t,e)},X:function(t,e,o){let n=t.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return c0(n);case"XXXX":case"XX":return ds(n);case"XXXXX":case"XXX":default:return ds(n,":")}},x:function(t,e,o){let n=t.getTimezoneOffset();switch(e){case"x":return c0(n);case"xxxx":case"xx":return ds(n);case"xxxxx":case"xxx":default:return ds(n,":")}},O:function(t,e,o){let n=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+l0(n,":");case"OOOO":default:return"GMT"+ds(n,":")}},z:function(t,e,o){let n=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+l0(n,":");case"zzzz":default:return"GMT"+ds(n,":")}},t:function(t,e,o){let n=Math.trunc(+t/1e3);return st(n,e.length)},T:function(t,e,o){return st(+t,e.length)}};function l0(t,e=""){let o=t>0?"-":"+",n=Math.abs(t),r=Math.trunc(n/60),s=n%60;return s===0?o+String(r):o+String(r)+e+st(s,2)}function c0(t,e){return t%60===0?(t>0?"-":"+")+st(Math.abs(t)/60,2):ds(t,e)}function ds(t,e=""){let o=t>0?"-":"+",n=Math.abs(t),r=st(Math.trunc(n/60),2),s=st(n%60,2);return o+r+e+s}var u0=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},d0=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},CR=(t,e)=>{let o=t.match(/(P+)(p+)?/)||[],n=o[1],r=o[2];if(!r)return u0(t,e);let s;switch(n){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",u0(n,e)).replace("{{time}}",d0(r,e))},m0={p:d0,P:CR};var yR=/^D+$/,wR=/^Y+$/,IR=["D","DD","YY","YYYY"];function f0(t){return yR.test(t)}function p0(t){return wR.test(t)}function h0(t,e,o){let n=SR(t,e,o);if(console.warn(n),IR.includes(t))throw new RangeError(n)}function SR(t,e,o){let n=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${n} to the input \`${o}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var AR=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ER=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,_R=/^'([^]*?)'?$/,RR=/''/g,DR=/[a-zA-Z]/;function g0(t,e,o){let n=Dr(),r=o?.locale??n.locale??xa,s=o?.firstWeekContainsDate??o?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=o?.weekStartsOn??o?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,l=Ke(t,o?.in);if(!Uv(l))throw new RangeError("Invalid time value");let a=e.match(ER).map(u=>{let m=u[0];if(m==="p"||m==="P"){let f=m0[m];return f(u,r.formatLong)}return u}).join("").match(AR).map(u=>{if(u==="''")return{isToken:!1,value:"'"};let m=u[0];if(m==="'")return{isToken:!1,value:FR(u)};if(dp[m])return{isToken:!0,value:u};if(m.match(DR))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:u}});r.localize.preprocessor&&(a=r.localize.preprocessor(l,a));let c={firstWeekContainsDate:s,weekStartsOn:i,locale:r};return a.map(u=>{if(!u.isToken)return u.value;let m=u.value;(!o?.useAdditionalWeekYearTokens&&p0(m)||!o?.useAdditionalDayOfYearTokens&&f0(m))&&h0(m,e,String(t));let f=dp[m[0]];return f(l,m,r.localize,c)}).join("")}function FR(t){let e=t.match(_R);return e?e[1].replace(RR,"'"):t}function b0(t,e,o){let n=Dr(),r=o?.locale??n.locale??xa,s=2520,i=fi(t,e);if(isNaN(i))throw new RangeError("Invalid time value");let l=Object.assign({},o,{addSuffix:o?.addSuffix,comparison:i}),[a,c]=yn(o?.in,...i>0?[e,t]:[t,e]),u=o0(c,a),m=(mi(c)-mi(a))/1e3,f=Math.round((u-m)/60),d;if(f<2)return o?.includeSeconds?u<5?r.formatDistance("lessThanXSeconds",5,l):u<10?r.formatDistance("lessThanXSeconds",10,l):u<20?r.formatDistance("lessThanXSeconds",20,l):u<40?r.formatDistance("halfAMinute",0,l):u<60?r.formatDistance("lessThanXMinutes",1,l):r.formatDistance("xMinutes",1,l):f===0?r.formatDistance("lessThanXMinutes",1,l):r.formatDistance("xMinutes",f,l);if(f<45)return r.formatDistance("xMinutes",f,l);if(f<90)return r.formatDistance("aboutXHours",1,l);if(f<lp){let h=Math.round(f/60);return r.formatDistance("aboutXHours",h,l)}else{if(f<s)return r.formatDistance("xDays",1,l);if(f<Ba){let h=Math.round(f/lp);return r.formatDistance("xDays",h,l)}else if(f<Ba*2)return d=Math.round(f/Ba),r.formatDistance("aboutXMonths",d,l)}if(d=t0(c,a),d<12){let h=Math.round(f/Ba);return r.formatDistance("xMonths",h,l)}else{let h=d%12,p=Math.trunc(d/12);return h<3?r.formatDistance("aboutXYears",p,l):h<9?r.formatDistance("overXYears",p,l):r.formatDistance("almostXYears",p+1,l)}}function v0(t,e){return b0(t,Xv(t),e)}var ms=({date:t,i18n:e,pattern:o})=>{let n=new Date(t);return g0(n,o,{locale:e.dateFNS})},x0=({date:t,i18n:e})=>{let o=new Date(t);return v0(o,{locale:e.dateFNS})};var Jo=({collectionConfig:t,data:e,dateFormat:o,fallback:n,globalConfig:r,i18n:s})=>{let i;if(t){let l=t?.admin?.useAsTitle;if(l&&(i=e?.[l]||i,i)){let a=t.fields.find(u=>"name"in u&&u.name===l);if(a?.type==="date"){let u="date"in a.admin&&a?.admin?.date?.displayFormat||o;i=ms({date:i,i18n:s,pattern:u})||i}}}return r&&(i=PR(r?.label,s)||r?.slug),i||(i=n||`[${s.t("general:untitled")}]`),i};import{c as TR}from"react/compiler-runtime";import{jsx as NR}from"react/jsx-runtime";import mp from"react";var C0=mp.createContext({resetUploadEdits:void 0,updateUploadEdits:void 0,uploadEdits:void 0}),fp=t=>{let e=TR(5),{children:o}=t,[n,r]=mp.useState(void 0),s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=()=>{r({})},e[0]=s):s=e[0];let i=s,l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=u=>{r(m=>({...m||{},...u||{}}))},e[1]=l):l=e[1];let a=l,c;return e[2]!==o||e[3]!==n?(c=NR(C0.Provider,{value:{resetUploadEdits:i,updateUploadEdits:a,uploadEdits:n},children:o}),e[2]=o,e[3]=n,e[4]=c):c=e[4],c},Zr=()=>mp.useContext(C0);import*as pp from"qs-esm";import kR from"react";var $a=t=>{let{collectionSlug:e,docPermissions:o,globalSlug:n,isEditing:r}=t;return e?!!(r&&o?.update||!r&&o?.create):n?!!o?.update:!1};var y0=({id:t,collectionSlug:e,globalSlug:o})=>!!(o||e&&t);var w0=({id:t,api:e,collectionSlug:o,globalSlug:n,i18n:r,locale:s,permissions:i,serverURL:l,setDocPermissions:a,setHasPublishPermission:c,setHasSavePermission:u})=>kR.useCallback(async m=>{let f={locale:s||void 0},d=m?.id||t,h=y0({id:d,collectionSlug:o,globalSlug:n});if(h){let p=o?`/${o}/access/${d}`:n?`/globals/${n}/access`:null;if(p){let b=await(await fetch(`${l}${e}${p}?${pp.stringify(f)}`,{body:JSON.stringify({...m||{},_status:"draft"}),credentials:"include",headers:{"Accept-Language":r.language,"Content-Type":"application/json"},method:"post"})).json(),v=await fetch(`${l}${e}${p}?${pp.stringify(f)}`,{body:JSON.stringify({...m||{},_status:"published"}),credentials:"include",headers:{"Accept-Language":r.language,"Content-Type":"application/json"},method:"POST"}).then(C=>C.json());a(b),u($a({collectionSlug:o,docPermissions:b,globalSlug:n,isEditing:h})),c(v?.update)}}else{let p=o?i?.collections?.[o]:i?.globals?.[n];a(p),u($a({collectionSlug:o,docPermissions:p,globalSlug:n,isEditing:h}))}},[l,e,t,i,r.language,s,o,n]);var E0=LR({}),Fe=()=>OR(E0),BR=({children:t,...e})=>{let{id:o,collectionSlug:n,currentEditor:r,docPermissions:s,globalSlug:i,hasPublishedDoc:l,hasPublishPermission:a,hasSavePermission:c,initialData:u,initialState:m,isLocked:f,lastUpdateTime:d,mostRecentVersionIsAutosaved:h,unpublishedVersionCount:p,versionCount:g}=e,[b,v]=Qo(s),[C,x]=Qo(c),[y,A]=Qo(a),{permissions:S}=_e(),{config:{admin:{dateFormat:_},routes:{api:E},serverURL:R},getEntityConfig:D}=Y(),w=D({collectionSlug:n}),I=D({globalSlug:i}),F=jR(new AbortController),P=w||I,{i18n:k}=L(),{uploadEdits:N}=Zr(),[j,T]=Qo(()=>Jo({collectionConfig:w,data:{...u||{},id:o},dateFormat:_,fallback:o?.toString(),globalConfig:I,i18n:k})),[O,M]=Qo(h),[B,$]=Qo(g),[W,H]=Qo(l),[X,G]=Qo(p),[z,Z]=Qo(f),[V,re]=Qo(r),[ee,te]=Qo(d),[Q,xe]=Qo(u),he=m===void 0||u===void 0,{getPreference:Ge,setPreference:de}=Ht(),{code:we}=Ne(),Ye=`${R}${E}`,ie,Pe,le;i&&(ie=i,Pe="globals",le=`global-${ie}`),n&&(ie=n,Pe="collections",o&&(le=`collection-${ie}-${o}`));let Be=Ma(async(Te,J)=>{try{let ce=J===i?`where[globalSlug][equals]=${J}`:`where[document.value][equals]=${Te}&where[document.relationTo][equals]=${J}`,Le=await tt.get(`${R}${E}/payload-locked-documents?${ce}`),{docs:Ae}=await Le.json();if(Ae.length>0){let Ee=Ae[0].id;await tt.delete(`${R}${E}/payload-locked-documents/${Ee}`,{headers:{"Content-Type":"application/json"}}),Z(!1)}}catch(oe){console.error("Failed to unlock the document",oe)}},[R,E,i]),We=Ma(async(Te,J,oe)=>{try{let Le=J===i?`where[globalSlug][equals]=${J}`:`where[document.value][equals]=${Te}&where[document.relationTo][equals]=${J}`,Ae=await tt.get(`${R}${E}/payload-locked-documents?${Le}`),{docs:Ee}=await Ae.json();if(Ee.length>0){let pe=Ee[0].id,ue=typeof oe=="object"?{relationTo:oe.collection,value:oe.id}:{relationTo:"users",value:oe};await tt.patch(`${R}${E}/payload-locked-documents/${pe}`,{body:JSON.stringify({user:ue}),headers:{"Content-Type":"application/json"}})}}catch(ce){console.error("Failed to update the document editor",ce)}},[R,E,i]),qe=w0({id:o,api:E,collectionSlug:n,globalSlug:i,i18n:k,locale:we,permissions:S,serverURL:R,setDocPermissions:v,setHasPublishPermission:A,setHasSavePermission:x}),ke=Ma(()=>Ge(le),[Ge,le]),Ue=Ma(async(Te,J)=>{let oe=await ke();if(le)try{await de(le,{...oe,fields:{...oe?.fields||{},[Te]:{...oe?.fields?.[Te],...J}}})}catch(ce){console.error(ce)}},[de,le,ke]),fe=Ma(()=>{w&&w.versions?$(Math.min(B+1,w.versions.maxPerDoc)):I&&I.versions&&$(Math.min(B+1,I.versions.max))},[w,I,B]),me=I0.useCallback(Te=>{xe(Te)},[]);S0(()=>{T(Jo({collectionConfig:w,data:{...Q,id:o},dateFormat:_,fallback:o?.toString(),globalConfig:I,i18n:k}))},[w,I,Q,_,k,o]),S0(()=>{let Te=F.current;return()=>{if(Te)try{Te.abort()}catch{}}},[]);let je=I0.useMemo(()=>`${`${Ye}${Pe==="globals"?"/globals":""}/${ie}${o?`/${o}`:""}`}${A0.stringify({depth:0,"fallback-locale":"null",locale:we,uploadEdits:N||void 0},{addQueryPrefix:!0})}`,[Ye,we,Pe,o,ie,N]),$e={...e,action:je,currentEditor:V,docConfig:P,docPermissions:b,documentIsLocked:z,getDocPermissions:qe,getDocPreferences:ke,hasPublishedDoc:W,hasPublishPermission:y,hasSavePermission:C,incrementVersionCount:fe,initialData:u,initialState:m,isInitializing:he,lastUpdateTime:ee,mostRecentVersionIsAutosaved:O,preferencesKey:le,savedDocumentData:Q,setCurrentEditor:re,setDocFieldPreferences:Ue,setDocumentIsLocked:Z,setDocumentTitle:T,setHasPublishedDoc:H,setLastUpdateTime:te,setMostRecentVersionIsAutosaved:M,setUnpublishedVersionCount:G,title:j,unlockDocument:Be,unpublishedVersionCount:X,updateDocumentEditor:We,updateSavedDocumentData:me,versionCount:B};return hp(E0.Provider,{value:$e,children:t})},Va=t=>hp(fp,{children:hp(BR,{...t})});import{jsx as $R}from"react/jsx-runtime";import{createContext as MR,useContext as VR}from"react";var Mu=MR(""),Ga=({children:t,operation:e})=>$R(Mu.Provider,{value:e,children:t}),jo=()=>VR(Mu);var De=t=>{let e=GR(57),{disableFormData:o,hasRows:n,path:r,validate:s}=t,i=o===void 0?!1:o,l=Lt(),a=Uo(),c=es(),{user:u}=_e(),{id:m,collectionSlug:f}=Fe(),d=jo(),h;e[0]!==r?(h=z=>{let[Z,V]=z;return{dispatchField:V,field:Z&&Z?.[r]||null}},e[0]=r,e[1]=h):h=e[1];let{dispatchField:p,field:g}=Yt(h),{t:b}=L(),{config:v}=Y(),{getData:C,getDataByPath:x,getSiblingData:y,setModified:A}=He(),S=Ot(),_=g?.filterOptions,E=g?.value,R=g?.initialValue,D=typeof g?.valid=="boolean"?g.valid:!0,w=D===!1&&l,I=_0(D),F=_0(g?.errorMessage),P;e[2]!==i||e[3]!==p||e[4]!==n||e[5]!==S||e[6]!==r||e[7]!==A?(P=(z,Z)=>{let V=Z===void 0?!1:Z,re=z&&z.target?z.target.value:z;p({type:"UPDATE",disableFormData:i||n&&re>0,path:r,value:re}),V||typeof A=="function"&&S===!1&&setTimeout(()=>{A(!0)},10)},e[2]=i,e[3]=p,e[4]=n,e[5]=S,e[6]=r,e[7]=A,e[8]=P):P=e[8];let k=P;g?.errorMessage,g?.rows,g?.valid,g?.errorPaths,g?.customComponents;let N,j=g?.customComponents,T=g?.errorMessage,O;e[9]!==g?.errorPaths?(O=g?.errorPaths||[],e[9]=g?.errorPaths,e[10]=O):O=e[10];let M=g?.rows,B=g?.valid,$;e[11]!==_||e[12]!==R||e[13]!==c||e[14]!==r||e[15]!==a||e[16]!==k||e[17]!==w||e[18]!==l||e[19]!==j||e[20]!==T||e[21]!==O||e[22]!==M||e[23]!==B||e[24]!==E?($={customComponents:j,errorMessage:T,errorPaths:O,filterOptions:_,formInitializing:c,formProcessing:a,formSubmitted:l,initialValue:R,path:r,rows:M,setValue:k,showError:w,valid:B,value:E},e[11]=_,e[12]=R,e[13]=c,e[14]=r,e[15]=a,e[16]=k,e[17]=w,e[18]=l,e[19]=j,e[20]=T,e[21]=O,e[22]=M,e[23]=B,e[24]=E,e[25]=$):$=e[25],N=$;let W=N,H;e[26]!==f||e[27]!==v||e[28]!==i||e[29]!==p||e[30]!==g||e[31]!==C||e[32]!==x||e[33]!==y||e[34]!==n||e[35]!==m||e[36]!==d||e[37]!==r||e[38]!==b||e[39]!==u||e[40]!==s||e[41]!==E?(H=()=>{(async()=>{let Z=E;g?.rows&&Array.isArray(g.rows)&&(Z=x(r));let V=F.current,re=I.current,ee=typeof s=="function"?await s(Z,{id:m,collectionSlug:f,data:C(),operation:d,preferences:{},req:{payload:{config:v},t:b,user:u},siblingData:y(r)}):typeof F.current=="string"?F.current:I.current;if(typeof ee=="string"?(re=!1,V=ee):typeof ee=="boolean"&&(re=ee,V=void 0),re!==I.current||V!==F.current){I.current=re,F.current=V;let te={type:"UPDATE",errorMessage:V,path:r,rows:g?.rows,valid:re,validate:s,value:E};(i||n&&typeof E=="number"&&E>0)&&(te.disableFormData=!0),typeof p=="function"&&p(te)}})()},e[26]=f,e[27]=v,e[28]=i,e[29]=p,e[30]=g,e[31]=C,e[32]=x,e[33]=y,e[34]=n,e[35]=m,e[36]=d,e[37]=r,e[38]=b,e[39]=u,e[40]=s,e[41]=E,e[42]=H):H=e[42];let X=g?.rows,G;return e[43]!==f||e[44]!==i||e[45]!==p||e[46]!==C||e[47]!==x||e[48]!==y||e[49]!==m||e[50]!==d||e[51]!==r||e[52]!==X||e[53]!==u||e[54]!==s||e[55]!==E?(G=[E,i,p,C,y,x,m,d,r,u,s,X,f],e[43]=f,e[44]=i,e[45]=p,e[46]=C,e[47]=x,e[48]=y,e[49]=m,e[50]=d,e[51]=r,e[52]=X,e[53]=u,e[54]=s,e[55]=E,e[56]=G):G=e[56],cs(H,150,G),W};import{jsx as D0}from"react/jsx-runtime";import"react";import{c as WR}from"react/compiler-runtime";import{jsx as HR}from"react/jsx-runtime";import{Fragment as zR}from"react";var R0=t=>{let e=WR(4),{children:o,path:n}=t,r;e[0]!==n?(r=a=>{let[c]=a;return c&&c?.[n]||null},e[0]=n,e[1]=r):r=e[1];let s=Yt(r),{passesCondition:i}=s||{};if(i===!1)return null;let l;return e[2]!==o?(l=HR(zR,{children:o}),e[2]=o,e[3]=l):l=e[3],l};var Oe=t=>o=>{let{indexPath:n,path:r}=o;return D0(R0,{indexPath:n,path:r,children:D0(t,{...o})})};var ot=t=>({...t?.admin?.style||{},...t?.admin?.width?{"--field-width":t.admin.width}:{flex:"1 1 auto"},...t?.admin?.style?.flex?{flex:t.admin.style.flex}:{}});var ve="field-type";function hi({fieldLocalized:t,fieldRTL:e,locale:o,localizationConfig:n}){let r=o&&n&&n.locales&&n.locales.length>1,s=o?.code===n?.defaultLocale;return e!==!1&&o?.rtl===!0&&(t||!t&&!r||!t&&s)||e===!0}import{jsx as Wa,jsxs as vp}from"react/jsx-runtime";import"react";import{jsx as F0}from"react/jsx-runtime";import"react";var gp=()=>F0("svg",{className:"icon icon--check",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:F0("path",{className:"stroke",d:"M15.3333 6.00001L8.00001 13.3333L4.66667 10",strokeLinecap:"square"})});import{jsx as P0}from"react/jsx-runtime";import"react";var bp=()=>P0("svg",{className:"icon icon--line",fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg",children:P0("path",{className:"stroke",d:"M5.33333 10H14.6667",strokeLinecap:"square"})});var Ha="checkbox-input",fs=({id:t,name:e,AfterInput:o,BeforeInput:n,checked:r,className:s,inputRef:i,Label:l,label:a,localized:c,onToggle:u,partialChecked:m,readOnly:f,required:d})=>vp("div",{className:[s,Ha,r&&`${Ha}--checked`,f&&`${Ha}--read-only`].filter(Boolean).join(" "),children:[vp("div",{className:`${Ha}__input`,children:[n,Wa("input",{"aria-label":"",defaultChecked:!!r,disabled:f,id:t,name:e,onInput:u,ref:i,required:d,type:"checkbox"}),vp("span",{className:[`${Ha}__icon`,!r&&m?"partial":"check"].filter(Boolean).join(" "),children:[r&&Wa(gp,{}),!r&&m&&Wa(bp,{})]}),o]}),Wa(q,{CustomComponent:l,Fallback:Wa(Re,{htmlFor:t,label:a,localized:c,required:d})})]});var xp="checkbox";var UR=t=>{let{id:e,checked:o,disableFormData:n,field:r,field:{admin:{className:s,description:i}={},label:l,required:a}={},onChange:c,partialChecked:u,path:m,readOnly:f,validate:d}=t,{uuid:h}=He(),p=Ze(),g=T0((I,F)=>{if(typeof d=="function")return d(I,{...F,required:a})},[d,a]),{customComponents:{AfterInput:b,BeforeInput:v,Description:C,Error:x,Label:y}={},setValue:A,showError:S,value:_}=De({disableFormData:n,path:m,validate:g}),E=T0(()=>{f||(A(!_),typeof c=="function"&&c(!_))},[c,f,A,_]),R=o||!!_,D=e||ku(m,p,h),w=YR(()=>ot(r),[r]);return XR("div",{className:[ve,xp,S&&"error",s,_&&`${xp}--checked`,f&&`${xp}--read-only`].filter(Boolean).join(" "),style:w,children:[za(q,{CustomComponent:x,Fallback:za(Xe,{path:m,showError:S})}),za(fs,{AfterInput:b,BeforeInput:v,checked:R,id:D,inputRef:null,Label:y,label:l,name:m,onToggle:E,partialChecked:u,readOnly:f,required:a}),za(q,{CustomComponent:C,Fallback:za(Me,{description:i,path:m})})]})},qo=Oe(UR);var Xa=t=>{let e=ZR(4),{fieldValue:o,localized:n,path:r}=t,{code:s}=Ne(),{config:i}=Y(),{localization:l}=i,[a,c]=k0.useState(typeof o!="number"),u=l&&l.defaultLocale?l.defaultLocale:"en",{t:m}=L();if(!n||s===u||l&&!l.fallback)return null;if(o){let d=!1;if(typeof o=="number"&&o>0&&(d=!0),Array.isArray(o)&&o.length>0&&(d=!0),d)return a&&c(!1),null}let f;return e[0]!==a||e[1]!==r||e[2]!==m?(f=N0(Vr,{children:N0(qo,{checked:a,field:{name:"",label:m("general:fallbackToDefaultLocale")},id:`field-${r.replace(/\./g,"__")}`,path:r,schemaPath:""})}),e[0]=a,e[1]=r,e[2]=m,e[3]=f):f=e[3],f};var gi=t=>{let e=document.getElementById(t);if(e){let o=e.getBoundingClientRect();window.scrollBy({behavior:"smooth",top:o.top-100})}};import{c as jL}from"react/compiler-runtime";import{jsx as Ki,jsxs as BL}from"react/jsx-runtime";import{getTranslation as $L}from"@payloadcms/translations";import"react";import{c as QR}from"react/compiler-runtime";import{jsx as Jr,jsxs as ps}from"react/jsx-runtime";import qR from"react";import{jsx as L0}from"react/jsx-runtime";import"react";var Ya=()=>L0("svg",{className:"icon icon--copy",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:L0("path",{className:"stroke",d:"M4.66666 12.6667C3.93333 12.6667 3.33333 12.0667 3.33333 11.3333V4.66668C3.33333 3.93334 3.93333 3.33334 4.66666 3.33334H11.3333C12.0667 3.33334 12.6667 3.93334 12.6667 4.66668M8.66666 7.33334H15.3333C16.0697 7.33334 16.6667 7.9303 16.6667 8.66668V15.3333C16.6667 16.0697 16.0697 16.6667 15.3333 16.6667H8.66666C7.93028 16.6667 7.33333 16.0697 7.33333 15.3333V8.66668C7.33333 7.9303 7.93028 7.33334 8.66666 7.33334Z",strokeLinecap:"square"})});import{jsx as Cp,jsxs as JR}from"react/jsx-runtime";import"react";var yp=({className:t})=>JR("svg",{className:["icon icon--more",t].filter(Boolean).join(" "),viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[Cp("path",{className:"fill",d:"M10 10.6666C10.3682 10.6666 10.6667 10.3682 10.6667 9.99998C10.6667 9.63179 10.3682 9.33331 10 9.33331C9.63182 9.33331 9.33334 9.63179 9.33334 9.99998C9.33334 10.3682 9.63182 10.6666 10 10.6666Z",strokeLinecap:"square"}),Cp("path",{className:"fill",d:"M14.6667 10.6666C15.0349 10.6666 15.3333 10.3682 15.3333 9.99998C15.3333 9.63179 15.0349 9.33331 14.6667 9.33331C14.2985 9.33331 14 9.63179 14 9.99998C14 10.3682 14.2985 10.6666 14.6667 10.6666Z",strokeLinecap:"square"}),Cp("path",{className:"fill",d:"M5.33334 10.6666C5.70153 10.6666 6.00001 10.3682 6.00001 9.99998C6.00001 9.63179 5.70153 9.33331 5.33334 9.33331C4.96515 9.33331 4.66667 9.63179 4.66667 9.99998C4.66667 10.3682 4.96515 10.6666 5.33334 10.6666Z",strokeLinecap:"square"})]});var Bo="array-actions",Vu=t=>{let e=QR(10),{addRow:o,duplicateRow:n,hasMaxRows:r,index:s,isSortable:i,moveRow:l,removeRow:a,rowCount:c}=t,{t:u}=L(),m;return e[0]!==o||e[1]!==n||e[2]!==r||e[3]!==s||e[4]!==i||e[5]!==l||e[6]!==a||e[7]!==c||e[8]!==u?(m=Jr(Lo,{button:Jr(yp,{}),buttonClassName:`${Bo}__button`,className:Bo,horizontalAlign:"center",render:f=>{let{close:d}=f;return ps(at.ButtonGroup,{buttonSize:"small",children:[i&&s!==0&&ps(at.Button,{className:`${Bo}__action ${Bo}__move-up`,onClick:()=>{l(s,s-1),d()},children:[Jr("div",{className:`${Bo}__action-chevron`,children:Jr(Qe,{direction:"up"})}),u("general:moveUp")]}),i&&s<c-1&&ps(at.Button,{className:`${Bo}__action`,onClick:()=>{l(s,s+1),d()},children:[Jr("div",{className:`${Bo}__action-chevron`,children:Jr(Qe,{})}),u("general:moveDown")]}),!r&&ps(qR.Fragment,{children:[ps(at.Button,{className:`${Bo}__action ${Bo}__add`,onClick:()=>{o(s+1),d()},children:[Jr(Zo,{}),u("general:addBelow")]}),ps(at.Button,{className:`${Bo}__action ${Bo}__duplicate`,onClick:()=>{n(s),d()},children:[Jr(Ya,{}),u("general:duplicate")]})]}),ps(at.Button,{className:`${Bo}__action ${Bo}__remove`,onClick:()=>{a(s),d()},children:[Jr(xt,{}),u("general:remove")]})]})},size:"medium"}),e[0]=o,e[1]=n,e[2]=r,e[3]=s,e[4]=i,e[5]=l,e[6]=a,e[7]=c,e[8]=u,e[9]=m):m=e[9],m};import{c as l5}from"react/compiler-runtime";import{jsx as mr,jsxs as Sp}from"react/jsx-runtime";import{useState as M0}from"react";import{jsx as bi,jsxs as KR}from"react/jsx-runtime";import"react";var hs=({className:t})=>KR("svg",{className:["icon icon--drag-handle",t].filter(Boolean).join(" "),viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[bi("path",{className:"fill",d:"M7.99999 10.6667C8.36818 10.6667 8.66666 10.3682 8.66666 9.99999C8.66666 9.6318 8.36818 9.33332 7.99999 9.33332C7.63181 9.33332 7.33333 9.6318 7.33333 9.99999C7.33333 10.3682 7.63181 10.6667 7.99999 10.6667Z",strokeLinecap:"square"}),bi("path",{className:"fill",d:"M7.99999 5.99999C8.36818 5.99999 8.66666 5.70151 8.66666 5.33332C8.66666 4.96513 8.36818 4.66666 7.99999 4.66666C7.63181 4.66666 7.33333 4.96513 7.33333 5.33332C7.33333 5.70151 7.63181 5.99999 7.99999 5.99999Z",strokeLinecap:"square"}),bi("path",{className:"fill",d:"M7.99999 15.3333C8.36818 15.3333 8.66666 15.0348 8.66666 14.6667C8.66666 14.2985 8.36818 14 7.99999 14C7.63181 14 7.33333 14.2985 7.33333 14.6667C7.33333 15.0348 7.63181 15.3333 7.99999 15.3333Z",strokeLinecap:"square"}),bi("path",{className:"fill",d:"M12 10.6667C12.3682 10.6667 12.6667 10.3682 12.6667 9.99999C12.6667 9.6318 12.3682 9.33332 12 9.33332C11.6318 9.33332 11.3333 9.6318 11.3333 9.99999C11.3333 10.3682 11.6318 10.6667 12 10.6667Z",strokeLinecap:"square"}),bi("path",{className:"fill",d:"M12 5.99999C12.3682 5.99999 12.6667 5.70151 12.6667 5.33332C12.6667 4.96513 12.3682 4.66666 12 4.66666C11.6318 4.66666 11.3333 4.96513 11.3333 5.33332C11.3333 5.70151 11.6318 5.99999 12 5.99999Z",strokeLinecap:"square"}),bi("path",{className:"fill",d:"M12 15.3333C12.3682 15.3333 12.6667 15.0348 12.6667 14.6667C12.6667 14.2985 12.3682 14 12 14C11.6318 14 11.3333 14.2985 11.3333 14.6667C11.3333 15.0348 11.6318 15.3333 12 15.3333Z",strokeLinecap:"square"})]});import{jsx as j0}from"react/jsx-runtime";import Gu,{useEffect as r5,useRef as Ip}from"react";import{useEffect as e5,useMemo as t5,useRef as wp,useState as o5}from"react";var O0=({containerRef:t,contentRef:e,duration:o,open:n})=>{let r=t5(()=>typeof CSS<"u"&&CSS&&CSS.supports?CSS.supports("interpolate-size","allow-keywords"):!1,[]),s=wp(!1),i=wp(n),[l,a]=o5(!1),c=wp(null);return e5(()=>{let u=t.current,m=e.current;if(!u||!m||r)return;let f=p=>{u.style.height=p},d=()=>{u&&(u.style.transition="",u.style.height=n?"auto":"0px",a(!1))};return(()=>{if(!s.current&&n){f("auto"),a(!1);return}s.current=!0,i.current!==n&&f(n?"0px":`${m.scrollHeight}px`),u.offsetHeight,a(!0),u.style.transition=`height ${o}ms ease`,f(n?`${m.scrollHeight}px`:"0px");let p=()=>{d(),u.removeEventListener("transitionend",p)};u.addEventListener("transitionend",p)})(),i.current=n,c.current=new ResizeObserver(()=>{l&&(u.style.height=n?`${m.scrollHeight}px`:"0px")}),c.current.observe(m),()=>{u&&(u.style.transition="",u.style.height=""),c.current?.disconnect()}},[n,o,t,e,r]),{browserSupportsKeywordAnimation:r}};var Ko=({id:t,children:e,className:o,duration:n=300,height:r})=>{let[s,i]=Gu.useState(()=>!!r),l=Ip(s),[a,c]=Gu.useState(()=>s?"":"none"),[u,m]=Gu.useState(()=>s?"":"hidden"),[f,d]=Gu.useState(!1),h=Ip(null),p=Ip(null);return r5(()=>{let g,b,v=!!r,C=l.current!==v;return l.current=v,C&&(d(!0),m("hidden"),v?c(""):g=window.setTimeout(()=>{c("none")},n),i(v),b=window.setTimeout(()=>{m(""),d(!1)},n)),()=>{g&&clearTimeout(g),b&&clearTimeout(b)}},[r,n]),O0({containerRef:h,contentRef:p,duration:n,open:s}),j0("div",{"aria-hidden":!s,className:[o,"rah-static",s&&r==="auto"&&"rah-static--height-auto",f&&`rah-animating--${s?"down":"up"}`,f&&r==="auto"&&"rah-animating--to-height-auto"].filter(Boolean).join(" "),id:t,ref:h,style:{overflow:u,transition:`height ${n}ms ease`},children:j0("div",{ref:p,...a?{style:{display:a}}:{},children:e})})};import{jsx as n5}from"react/jsx-runtime";import s5,{createContext as i5,useContext as a5}from"react";var B0=i5({isCollapsed:void 0,isVisible:void 0,isWithinCollapsible:void 0,toggle:()=>{}}),$0=({children:t,isCollapsed:e,isWithinCollapsible:o=!0,toggle:n})=>{let{isCollapsed:r,isVisible:s}=wn(),i=s5.useMemo(()=>({isCollapsed:e,isVisible:s&&!r,isWithinCollapsible:o,toggle:n}),[e,o,n,r,s]);return n5(B0.Provider,{value:i,children:t})},wn=()=>a5(B0);var co="collapsible";var gs=t=>{let e=l5(26),{actions:o,children:n,className:r,collapsibleStyle:s,dragHandleProps:i,header:l,initCollapsed:a,isCollapsed:c,onToggle:u}=t,m=s===void 0?"default":s,[f,d]=M0(!!a),[h,p]=M0(!1),{isWithinCollapsible:g}=wn(),{t:b}=L(),v=typeof c=="boolean"?c:f,C;e[0]!==v||e[1]!==u?(C=()=>{typeof u=="function"&&u(!v),d(!v)},e[0]=v,e[1]=u,e[2]=C):C=e[2];let x=C,y=i&&`${co}--has-drag-handle`,A=v&&`${co}--collapsed`,S=g&&`${co}--nested`,_=h&&`${co}--hovered`,E=`${co}--style-${m}`,R;e[3]!==r||e[4]!==y||e[5]!==A||e[6]!==S||e[7]!==_||e[8]!==E?(R=[co,r,y,A,S,_,E].filter(Boolean),e[3]=r,e[4]=y,e[5]=A,e[6]=S,e[7]=_,e[8]=E,e[9]=R):R=e[9];let D=R.join(" "),w,I;e[10]===Symbol.for("react.memo_cache_sentinel")?(w=()=>p(!0),I=()=>p(!1),e[10]=w,e[11]=I):(w=e[10],I=e[11]);let F=`${co}__toggle--${v?"collapsed":"open"}`,P;e[12]!==F?(P=[`${co}__toggle`,F].filter(Boolean),e[12]=F,e[13]=P):P=e[13];let k=P.join(" "),N;if(e[14]!==o||e[15]!==n||e[16]!==i||e[17]!==l||e[18]!==v||e[19]!==b||e[20]!==k||e[21]!==D||e[22]!==x){let j;e[24]!==i?(j=i&&mr("div",{className:`${co}__drag`,...i.attributes,...i.listeners,children:mr(hs,{})}),e[24]=i,e[25]=j):j=e[25],N=mr("div",{className:D,children:Sp($0,{isCollapsed:v,toggle:x,children:[Sp("div",{className:`${co}__toggle-wrap`,onMouseEnter:w,onMouseLeave:I,children:[mr("button",{className:k,onClick:x,type:"button",children:mr("span",{children:b("fields:toggleBlock")})}),j,l?mr("div",{className:[`${co}__header-wrap`,i&&`${co}__header-wrap--has-drag-handle`].filter(Boolean).join(" "),children:l}):null,Sp("div",{className:`${co}__actions-wrap`,children:[o?mr("div",{className:`${co}__actions`,children:o}):null,mr("div",{className:`${co}__indicator`,children:mr(Qe,{direction:v?void 0:"up"})})]})]}),mr(Ko,{height:v?0:"auto",children:mr("div",{className:`${co}__content`,children:n})})]})}),e[14]=o,e[15]=n,e[16]=i,e[17]=l,e[18]=v,e[19]=b,e[20]=k,e[21]=D,e[22]=x,e[23]=N}else N=e[23];return N};import{c as kL}from"react/compiler-runtime";import{jsx as sI}from"react/jsx-runtime";import{fieldIsHiddenOrDisabled as LL,getFieldPaths as OL}from"payload/shared";import"react";import{c as c5}from"react/compiler-runtime";import{jsx as u5}from"react/jsx-runtime";import V0 from"react";var G0=t=>{let e=c5(9),{children:o,className:n,forceRender:r}=t,[s,i]=V0.useState(!!r),l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={rootMargin:"1000px"},e[0]=l):l=e[0];let[a,c]=Gr(l,!!r),u=!!c?.isIntersecting,m=c?.boundingClientRect?.top<0,f=r||u||m,d,h;e[1]!==s||e[2]!==f?(d=()=>{f&&!s&&i(!0)},h=[f,s],e[1]=s,e[2]=f,e[3]=d,e[4]=h):(d=e[3],h=e[4]),V0.useEffect(d,h);let p=s?o:null,g;return e[5]!==n||e[6]!==a||e[7]!==p?(g=u5("div",{className:n,ref:a,children:p}),e[5]=n,e[6]=a,e[7]=p,e[8]=g):g=e[8],g};import{c as NL}from"react/compiler-runtime";import{jsx as St}from"react/jsx-runtime";import"react";import{c as $5}from"react/compiler-runtime";import{jsx as jt,jsxs as En}from"react/jsx-runtime";import{getTranslation as Tp}from"@payloadcms/translations";import M5,{Fragment as V5}from"react";import{c as Ep}from"react/compiler-runtime";import{jsx as Qr,jsxs as Hu}from"react/jsx-runtime";import{createContext as h5,useContext as g5,useEffect as W0,useState as H0}from"react";import{jsx as d5}from"react/jsx-runtime";import{forwardRef as m5}from"react";var Wu="gutter",er=m5((t,e)=>{let{children:o,className:n,left:r=!0,negativeLeft:s=!1,negativeRight:i=!1,right:l=!0}=t,a=r&&!s,c=l&&!i;return d5("div",{className:[a&&`${Wu}--left`,c&&`${Wu}--right`,s&&`${Wu}--negative-left`,i&&`${Wu}--negative-right`,n].filter(Boolean).join(" "),ref:e,children:o})});er.displayName="Gutter";import{c as f5}from"react/compiler-runtime";import{useId as p5}from"react";var Ua=t=>{let e=f5(3),o=p5(),n=Ze(),r=`${t}-${o}`,s;return e[0]!==n||e[1]!==r?(s=Ap({slug:r,depth:n}),e[0]=n,e[1]=r,e[2]=s):s=e[2],s};var fr="drawer",Za=100,Ap=({slug:t,depth:e})=>`drawer_${e}_${t}`,tr=t=>{let e=Ep(17),o,n,r,s,i,l;e[0]!==t?({slug:l,children:o,className:n,disabled:r,onClick:s,...i}=t,e[0]=t,e[1]=o,e[2]=n,e[3]=r,e[4]=s,e[5]=i,e[6]=l):(o=e[1],n=e[2],r=e[3],s=e[4],i=e[5],l=e[6]);let{openModal:a}=ae(),c;e[7]!==s||e[8]!==a||e[9]!==l?(c=f=>{a(l),typeof s=="function"&&s(f)},e[7]=s,e[8]=a,e[9]=l,e[10]=c):c=e[10];let u=c,m;return e[11]!==o||e[12]!==n||e[13]!==r||e[14]!==u||e[15]!==i?(m=Qr("button",{className:n,disabled:r,onClick:u,type:"button",...i,children:o}),e[11]=o,e[12]=n,e[13]=r,e[14]=u,e[15]=i,e[16]=m):m=e[16],m},Jt=t=>{let e=Ep(26),{slug:o,children:n,className:r,gutter:s,Header:i,hoverTitle:l,title:a}=t,c=s===void 0?!0:s,{t:u}=L(),{closeModal:m,modalState:f}=ae(),d=zu(),[h,p]=H0(!1),[g,b]=H0(!1),v,C;e[0]!==f||e[1]!==o?(v=()=>{p(f[o]?.isOpen)},C=[o,f],e[0]=f,e[1]=o,e[2]=v,e[3]=C):(v=e[2],C=e[3]),W0(v,C);let x,y;if(e[4]!==h?(x=()=>{b(h)},y=[h],e[4]=h,e[5]=x,e[6]=y):(x=e[5],y=e[6]),W0(x,y),h){let A=g&&`${fr}--is-open`,S=d>1&&`${fr}--nested`,_;e[7]!==r||e[8]!==A||e[9]!==S?(_=[r,fr,A,S].filter(Boolean),e[7]=r,e[8]=A,e[9]=S,e[10]=_):_=e[10];let E=_.join(" "),R=Za+d,D;if(e[11]!==i||e[12]!==n||e[13]!==m||e[14]!==d||e[15]!==c||e[16]!==l||e[17]!==o||e[18]!==u||e[19]!==R||e[20]!==E||e[21]!==a){let w;e[23]!==m||e[24]!==o?(w=()=>m(o),e[23]=m,e[24]=o,e[25]=w):w=e[25],D=Qr(b5,{children:Hu(lt,{className:E,slug:o,style:{zIndex:R},children:[(!d||d===1)&&Qr("div",{className:`${fr}__blur-bg`}),Qr("button",{"aria-label":u("general:close"),className:`${fr}__close`,id:`close-drawer__${o}`,onClick:w,type:"button"}),Hu("div",{className:`${fr}__content`,style:{width:`calc(100% - (${d} * var(--gutter-h))`},children:[Qr("div",{className:`${fr}__blur-bg-content`}),Hu(er,{className:`${fr}__content-children`,left:c,right:c,children:[i,i===void 0&&Hu("div",{className:`${fr}__header`,children:[Qr("h2",{className:`${fr}__header__title`,title:l?a:null,children:a}),Qr("button",{"aria-label":u("general:close"),className:`${fr}__header__close`,id:`close-drawer__${o}`,onClick:()=>m(o),type:"button",children:Qr(xt,{})})]}),n]})]})]})}),e[11]=i,e[12]=n,e[13]=m,e[14]=d,e[15]=c,e[16]=l,e[17]=o,e[18]=u,e[19]=R,e[20]=E,e[21]=a,e[22]=D}else D=e[22];return D}return null},z0=h5(1),b5=t=>{let e=Ep(3),{children:o}=t,r=zu()+1,s;return e[0]!==o||e[1]!==r?(s=Qr(z0.Provider,{value:r,children:o}),e[0]=o,e[1]=r,e[2]=s):s=e[2],s},zu=()=>g5(z0);import{c as O5}from"react/compiler-runtime";import{jsx as Sn,jsxs as j5}from"react/jsx-runtime";import{getTranslation as B5}from"@payloadcms/translations";import"react";import{c as v5}from"react/compiler-runtime";import{jsx as Ja,jsxs as x5}from"react/jsx-runtime";import C5 from"next/link.js";import"react";var y5=C5.default,pr="pill",w5=t=>{let e=v5(12),{id:o,className:n}=t,r;e[0]!==o?(r={id:o},e[0]=o,e[1]=r):r=e[1];let{attributes:s,isDragging:i,listeners:l,setNodeRef:a,transform:c}=si(r),u=i&&`${pr}--is-dragging`,m;e[2]!==n||e[3]!==u?(m=[u,n].filter(Boolean),e[2]=n,e[3]=u,e[4]=m):m=e[4];let f=m.join(" "),d;return e[5]!==s||e[6]!==l||e[7]!==t||e[8]!==a||e[9]!==f||e[10]!==c?(d=Ja(X0,{...t,className:f,elementProps:{...l,...s,ref:a,style:{transform:c}}}),e[5]=s,e[6]=l,e[7]=t,e[8]=a,e[9]=f,e[10]=c,e[11]=d):d=e[11],d},X0=t=>{let{alignIcon:e="right","aria-checked":o,"aria-controls":n,"aria-expanded":r,"aria-label":s,children:i,className:l,draggable:a,elementProps:c,icon:u,onClick:m,pillStyle:f="light",rounded:d,to:h}=t,p=[pr,`${pr}--style-${f}`,l&&l,h&&`${pr}--has-link`,(h||m)&&`${pr}--has-action`,u&&`${pr}--has-icon`,u&&`${pr}--align-icon-${e}`,a&&`${pr}--draggable`,d&&`${pr}--rounded`].filter(Boolean).join(" "),g="div";return m&&!h&&(g="button"),h&&(g=y5),x5(g,{...c,"aria-checked":o,"aria-controls":n,"aria-expanded":r,"aria-label":s,className:p,href:h||null,onClick:m,type:g==="button"?"button":void 0,children:[Ja("span",{className:`${pr}__label`,children:i}),u&&Ja("span",{className:`${pr}__icon`,children:u})]})},It=t=>{let{draggable:e}=t;return e?Ja(w5,{...t}):Ja(X0,{...t})};import{c as N5}from"react/compiler-runtime";import{jsx as nx,jsxs as k5}from"react/jsx-runtime";import sx from"react";import{c as F5}from"react/compiler-runtime";import{jsx as In,jsxs as P5}from"react/jsx-runtime";import{getTranslation as Fp}from"@payloadcms/translations";import{useEffect as ox,useState as rx}from"react";import{c as I5}from"react/compiler-runtime";import{jsx as Y0,jsxs as S5}from"react/jsx-runtime";import"react";var Qa="thumbnail-card",U0=t=>{let e=I5(15),{alignLabel:o,className:n,collection:r,doc:s,label:i,onClick:l,thumbnail:a}=t,{config:c}=Y(),{i18n:u}=L(),m=typeof l=="function"&&`${Qa}--has-on-click`,f=o&&`${Qa}--align-label-${o}`,d;e[0]!==n||e[1]!==m||e[2]!==f?(d=[Qa,n,m,f].filter(Boolean),e[0]=n,e[1]=m,e[2]=f,e[3]=d):d=e[3];let h=d.join(" "),p=i;if(!p){let b=s?.filename,v;e[4]!==r||e[5]!==c.admin.dateFormat||e[6]!==s||e[7]!==u||e[8]!==b?(v=Jo({collectionConfig:r,data:s,dateFormat:c.admin.dateFormat,fallback:b,i18n:u}),e[4]=r,e[5]=c.admin.dateFormat,e[6]=s,e[7]=u,e[8]=b,e[9]=v):v=e[9],p=v}let g;return e[10]!==h||e[11]!==l||e[12]!==a||e[13]!==p?(g=S5("button",{className:h,onClick:l,title:p,type:"button",children:[Y0("div",{className:`${Qa}__thumbnail`,children:a}),Y0("div",{className:`${Qa}__label`,children:p})]}),e[10]=h,e[11]=l,e[12]=a,e[13]=p,e[14]=g):g=e[14],g};import{jsx as Uu,jsxs as J0}from"react/jsx-runtime";import{useState as Q0}from"react";var to=[];for(Xu=0;Xu<256;++Xu)to.push((Xu+256).toString(16).slice(1));var Xu;function Z0(t,e=0){return(to[t[e+0]]+to[t[e+1]]+to[t[e+2]]+to[t[e+3]]+"-"+to[t[e+4]]+to[t[e+5]]+"-"+to[t[e+6]]+to[t[e+7]]+"-"+to[t[e+8]]+to[t[e+9]]+"-"+to[t[e+10]]+to[t[e+11]]+to[t[e+12]]+to[t[e+13]]+to[t[e+14]]+to[t[e+15]]).toLowerCase()}var Yu,A5=new Uint8Array(16);function _p(){if(!Yu&&(Yu=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Yu))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Yu(A5)}var E5=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Rp={randomUUID:E5};function _5(t,e,o){if(Rp.randomUUID&&!e&&!t)return Rp.randomUUID();t=t||{};var n=t.random||(t.rng||_p)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){o=o||0;for(var r=0;r<16;++r)e[o+r]=n[r];return e}return Z0(n)}var bs=_5;var Dp=()=>{let[t]=Q0(`pattern${bs()}`),[e]=Q0(`image${bs()}`);return J0("svg",{fill:"none",height:"53",viewBox:"0 0 82 53",width:"82",children:[Uu("rect",{fill:`url(#${t})`,height:"52.7791",width:"80.574",x:"0.713013"}),J0("defs",{children:[Uu("pattern",{height:"1",id:`${t}`,patternContentUnits:"objectBoundingBox",width:"1",children:Uu("use",{transform:"scale(0.00387597 0.00591716)",xlinkHref:`#${e}`})}),Uu("image",{height:"169",id:e,width:"258",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQIAAACpCAYAAADA4zPJAAALpklEQVR4Ae2dSY/UOhSF+///DCSGHQuEgAVI7BBITAI2zCCGZuhmpqEBP53W8yOvK1UdO3Zyr/NFilJdXalyTo4/X984zlZgQQEUWLwCW4tXAAFQAAUCIMAEKIACgAAPoAAKBECACVAABQABHkABFAiAABOgAAoAAjyAAiggBbhqgA9QAAUAAR5AARQgIsADKIACdA3wAAqggBQgR4APUAAFAAEeQAEUICLAAyiAAnQN8AAKoIAUIEeAD1AABQABHkABFCAiwAMogAJ0DfAACqCAFCBHgA9QAAUAAR5AARQgIsADKIACdA3wAAqggBQgR4APUAAFAAEeQAEUICLAAyiAAnQN8AAKoIAUIEeAD1AABQABHkABFCAiwAMogAJ0DfAACqCAFCBHgA9QAAUAAR5AARQgIsADKIACdA3wAAqggBQgR4APUAAFAAEeQAEUICLAAyiAAnQN8AAKoIAUIEeAD1AABQABHkABFCAiwAMLVmB/fz98+/YtfPr0KXz48CHs7u6GnZ2dg+3Hjx/D169fw48fP8KfP3+aV4muQfOnmAPsKqDKr4r/9u3bsL29PXgVKPb29pqFAiDouoTXzSrw8+fPg5Y+pfL3ffbdu3fh+/fvzekECJo7pRxQVwGF9YoA+ir1mPfUhVB00coCCFo5kxzHigKqqGrBx1T4Tfu+efOmmegAEKzYhzdaUEBdAVXUTRW51P+UVPS+AALvZ5DyryigSGAqCESYeIcBIFixEW94VuDXr1/JVwRiZR671VUFrwsg8HrmKPeKAkoMKok3tkLn7q8oRCDyuAACj2eNMvcqoMFBuZW41H4alORxAQQezxplXlHg9+/fk+cF1sHDYxcBEKxYijc8KvDly5fZo4EIhvfv37uTEBC4O2UU+LACyg2kDhmOlbbWVpcvPS2AwNPZoqy9CigUr1Whc79Xoxk9LYDA09mirL0K1BhCnAuAuJ8iFE8LIPB0tihrrwI1hxHHip2z9XQpERD0Wos3vSig/EBOJZ1iH09XDwCBF8dTzl4FNJx4ikqd8xu6kuFlAQRezhTl7FVAMwjlVNIp9vn8+XNvmS2+aR4E6md56mtZPMktl8niFYMIGU9XDkyDQCdZ47e1eupvtVzxrB0bEUGZM2ISBEoAafLISNa4FWH1PxYUiApo4E70h7UtOYJ4ljK2OrGbLgfpfy1NEZUhEbt0FNA9BtYAEMvjaW5DMxGBWnpN7hBFPGrrfSKIjpd5OVIBa8OLo3c9DTM2AQJRXbdvRgGHbrWP9mVZtgKaanyoZ6b6nPJanrqxs4MgJgRzTxCJxGVDQEevEDzXP7X2E5w8LbOBQLQsOUZ8TCLx9evX4fHjx+HRo0esTjW4efNmKL3eu3cvyBs5sPB2lWsWENSaZlr3gacmEi9fvhyOHTvGiga9Hjh79mwyDJSz8NQtUOQyOQhSEoI5JNY+mrJqyPLy5cvekw8YAGPXA7du3UqKCob6b4hHp/rMZCDITQjmwmBIIvH+/fuAgEjgSA9cuXJlMAh0edtbNCDYTAICjf6a4xKPflO/vW4BBLT83ZZ/3esUEHi6ZNitF1VBIDLqxovcVr3UfipDH6UBASBYV/m77w8FgaeRhF0I6HU1EChpp+Rdqco89nv6EomAABB0K/y610NAoCHxfY3N4Qpn9e8qILAwv3wfODTmoJvIef78+ZH9w3Xm4P3lQOTGjRsbGzSNGfAMgeIRgRKCFkd5HYaCyqiyaj1//jwwIGG41gOnT58Ourp02EPx7zHjVyxFB8UigrkSgvGEpG5jIlEw0ECiO3fusDaowe3bt8PVq1eDwvvU9fr162sh0NqI1tEgsJIQTAVB/Py6RKIlWlOWcQrIo+oSlrpypShADUhLyygQaOYgSwnBWLlTtzoGZkFqydb9xxKBkONZQUSNRqs+yQaBbvRQeJRa6ax+Xsfi6f7xfqvz7lAFVKEVJSjbLzCookc/a6uBQcol6ZKgxgZ4TwYepUsyCBQSeUgI5gJHxmgt7DvKBPwfBZJAIDKW6mflVtQp9tMxeh0hhqVRIEeBQSBQWKQQaYpKaOk3dMyth4Q5pmGf9hQ4EgTqS+3s7CwOAhFIOvZWE0Tt2ZkjylVgIwhaSwjGyp26JZGYay/286JALwiULOubTjy1ArX2ee/jyb2YknJOr8AKCJQk06WT1ipxqeORNiQSpzcqv1hXgf9AsNSEYC4gSCTWNSbfPq0CByBYekIwFwYkEqc1K79WT4GtsdOJ51aiVvZTItHbjLX17MQ3e1Vgq5UKOfdxtHI7ajSy7iYlFxLVaH8LCLa3iyVGlUhMnU7dmsWUK+pOL6dZpxlUZe0slS8PICgIghiV6F4M3ct+6dIlV+vFixcPJmo5d+5c6K4XLlwI+p/l47l27RpdtBF8AAQVQHDmzJm1M94wxVm9Kc6kOzeM5dEAEBQGgR6dRmWvV9mP0lbdM5Z0BQBBYRA8ePAAEMw4B6KeVciSrgAgAARNgQsQpENAewACQAAI8upOU3sBgsIgePjwYVMV66g+ubX/ExHk8QkQFAaB5sA/ceIEMJghT3D8+HHmnczjAF2DeO2/5Pbu3bvh1KlTwGBCGJw8eTI8efIksxqwGxFB4YggAuXVq1fh2bNn4enTp0euL168OJj/QaP4Sq26O1JzLw75/Rqf0czApY5lyPcwfmAczABBJRBEIAzd6ual7nMZx5xWK3eTxkfLjTkW9p1GAUBgBAQRGGMrj7W7SRWV6AYmFtsKAAJjIBAQciqPbgyyPL0cj5YDBMXu7out5lK2QyuPl+nleLScXRgQERiMCLqg2zQLkqIAJdK6n7f+mhmhbcIAEBgHgSp2X+VRlnx3d9cVBLqQGpsLsVmd/JYKEDgAQaxA8bmM1hKCsXypWx4tZwccgMARCFTRFB2kVjjrn2dG6PmBAAicgcB6pc4t36ZcyPzVpP0SAAJAYCbC6MuFtF8FbRwhIAAEZkAQowkeLTc9HAABIDAHAgGBR8tNCwNAAAhMgiBGByQSpwECIAAEpkEgIJBIrA8DQAAIzINAMFAikUfL1QMCIAAELkAQuwqtPVquXtVO+2ZAAAhcgUBAaOHRcmnVtP6nAQEgcAeCGB3ohiuWMgoAAkDgFgQCgm68Ypqy8TAABIDANQgEAxKJgMC9iWOYy3b84+lJJOYDgYiAiKApmGoWpP39/fwasdA9AQEgaAoEMbIqNSP0UrgACABBkyAQEEgkDscYIAAEzYJAMMiZEXp49Wnnk4AAEDQNgthVGDojdDtVO+1IAAEgWAQIBAQSievhAAgAwWJAIBhozAGJxFUgAAJAsCgQxK4C06n/HwaAABAsEgQCAonEvzAABIBgsSCI0QGJxBAAASBYPAgEhKU/lxEQAAJA8K8HljydOiAABIDgkAfio+X+9qDbfwUIDpkg9hvZjr8b0LOGS3suIyAABEQEGzywlOnUAcEGE3hu0Sh7uYhmCdOpAwJAQEQwwAOtJxIBwQAT0LqWa129a9nqcxkBASAgIkj0QIvPZQQEiSbw3qJR/nLRTUuJREAACIgIRniglUQiIBhhAlrXcq2rZy1bmE4dEAACIoJCHvA8nTogKGQCzy0aZS8X2Xh9LiMgAAREBBU84O25jICgggloYcu1sJ619DSdOiAABEQEFT3gJZEICCqawHNrRtnLRjXWE4mAABAQEUzkAcvTqQOCiUxAC1u2hfWsp8Xp1AEBICAimMED1hKJgGAGE3huzSh7ucjG0nTqgAAQEBHM7AEL06kDgplNQAtbroX1rOXciURAAAiICIx4QGMO5kokAgIjJvDcmlH2slHNHM9lBASAgIjAoAemTiQCAoMmoIUt28J61nOqRCIgAAREBMY9MMUsSIDAuAk8t2aUvVxkU3s6dUAACIgIHHmg1nMZAYEjE9DClmthPWtZYzp1QAAIiAiceqDkdOqAwKkJPLdolL1cZFMqkbilkUysaIAH/Hpgb28vjF3+AbSb48mcXO9tAAAAAElFTkSuQmCC"})]})]})};import{c as R5}from"react/compiler-runtime";import{jsx as K0,jsxs as D5}from"react/jsx-runtime";import"react";import{jsx as q0}from"react/jsx-runtime";import"react";var qa=()=>q0("svg",{className:"icon icon--search",fill:"none",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:q0("path",{className:"stroke",d:"M16 16L13.1333 13.1333M14.6667 9.33333C14.6667 12.2789 12.2789 14.6667 9.33333 14.6667C6.38781 14.6667 4 12.2789 4 9.33333C4 6.38781 6.38781 4 9.33333 4C12.2789 4 14.6667 6.38781 14.6667 9.33333Z",strokeLinecap:"square"})});var ex="block-search",tx=t=>{let e=R5(5),{setSearchTerm:o}=t,{t:n}=L(),r;e[0]!==o?(r=l=>{o(l.target.value)},e[0]=o,e[1]=r):r=e[1];let s=r,i;return e[2]!==s||e[3]!==n?(i=D5("div",{className:ex,children:[K0("input",{className:`${ex}__input`,onChange:s,placeholder:n("fields:searchForBlock")}),K0(qa,{})]}),e[2]=s,e[3]=n,e[4]=i):i=e[4],i};var Zu="blocks-drawer",T5=(t,e)=>typeof t.labels.singular=="string"?t.labels.singular.toLowerCase():typeof t.labels.singular=="object"?Fp(t.labels.singular,e).toLowerCase():"",Ka=t=>{let e=F5(17),{addRow:o,addRowIndex:n,blocks:r,drawerSlug:s,labels:i}=t,[l,a]=rx(""),[c,u]=rx(r),{closeModal:m,isModalOpen:f}=ae(),{i18n:d,t:h}=L(),p,g;e[0]!==f?(p=()=>{f||a("")},g=[f],e[0]=f,e[1]=p,e[2]=g):(p=e[1],g=e[2]),ox(p,g);let b,v;e[3]!==r||e[4]!==d||e[5]!==l?(b=()=>{let x=l.toLowerCase(),y=r?.reduce((A,S)=>(T5(S,d).includes(x)&&A.push(S),A),[]);u(y)},v=[l,r,d],e[3]=r,e[4]=d,e[5]=l,e[6]=b,e[7]=v):(b=e[6],v=e[7]),ox(b,v);let C;return e[8]!==o||e[9]!==n||e[10]!==m||e[11]!==s||e[12]!==c||e[13]!==d||e[14]!==i.singular||e[15]!==h?(C=P5(Jt,{slug:s,title:h("fields:addLabel",{label:Fp(i.singular,d)}),children:[In(tx,{setSearchTerm:a}),In("div",{className:`${Zu}__blocks-wrapper`,children:In("ul",{className:`${Zu}__blocks`,children:c?.map((x,y)=>{let{slug:A,imageAltText:S,imageURL:_,labels:E}=x;return In("li",{className:`${Zu}__block`,children:In(U0,{alignLabel:"center",label:Fp(E?.singular,d),onClick:()=>{o(n,A),m(s)},thumbnail:_?In("img",{alt:S,src:_}):In("div",{className:`${Zu}__default-image`,children:In(Dp,{})})})},y)})})})]}),e[8]=o,e[9]=n,e[10]=m,e[11]=s,e[12]=c,e[13]=d,e[14]=i.singular,e[15]=h,e[16]=C):C=e[16],C};var ix=t=>{let e=N5(26),{addRow:o,blocks:n,blockType:r,duplicateRow:s,hasMaxRows:i,isSortable:l,labels:a,moveRow:c,removeRow:u,rowCount:m,rowIndex:f}=t,{closeModal:d,openModal:h}=ae(),p=Ua("blocks-drawer"),[g,b]=sx.useState(null),v;e[0]!==o||e[1]!==d||e[2]!==p||e[3]!==g?(v=(x,y)=>{typeof o=="function"&&o(g,y),d(p)},e[0]=o,e[1]=d,e[2]=p,e[3]=g,e[4]=v):v=e[4];let C;if(e[5]!==r||e[6]!==n||e[7]!==p||e[8]!==s||e[9]!==i||e[10]!==l||e[11]!==a||e[12]!==c||e[13]!==h||e[14]!==u||e[15]!==m||e[16]!==f||e[17]!==v){let x;e[19]!==p||e[20]!==h?(x=A=>{b(A),h(p)},e[19]=p,e[20]=h,e[21]=x):x=e[21];let y;e[22]!==r||e[23]!==s||e[24]!==f?(y=()=>s(f,r),e[22]=r,e[23]=s,e[24]=f,e[25]=y):y=e[25],C=k5(sx.Fragment,{children:[nx(Ka,{addRow:v,addRowIndex:f,blocks:n,drawerSlug:p,labels:a}),nx(Vu,{addRow:x,duplicateRow:y,hasMaxRows:i,index:f,isSortable:l,moveRow:c,removeRow:u,rowCount:m})]}),e[5]=r,e[6]=n,e[7]=p,e[8]=s,e[9]=i,e[10]=l,e[11]=a,e[12]=c,e[13]=h,e[14]=u,e[15]=m,e[16]=f,e[17]=v,e[18]=C}else C=e[18];return C};import{c as L5}from"react/compiler-runtime";import{jsx as ax}from"react/jsx-runtime";import"react";var lx="section-title",Pp=t=>{let e=L5(14),{customOnChange:o,customValue:n,path:r,readOnly:s}=t,i;e[0]!==r?(i={path:r},e[0]=r,e[1]=i):i=e[1];let{setValue:l,value:a}=De(i),{t:c}=L(),u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=[lx].filter(Boolean),e[2]=u):u=e[2];let m=u.join(" "),f;e[3]!==o||e[4]!==l?(f=o||(g=>{g.stopPropagation(),g.preventDefault(),l(g.target.value)}),e[3]=o,e[4]=l,e[5]=f):f=e[5];let d=f,h=n||a,p;return e[6]!==n||e[7]!==d||e[8]!==r||e[9]!==s||e[10]!==c||e[11]!==h||e[12]!==a?(p=ax("div",{className:m,"data-value":h,children:ax("input",{className:`${lx}__input`,id:r,name:r,onChange:d,placeholder:c("general:untitled"),readOnly:s,type:"text",value:n||a||""})}),e[6]=n,e[7]=d,e[8]=r,e[9]=s,e[10]=c,e[11]=h,e[12]=a,e[13]=p):p=e[13],p};var An="blocks-field",cx=t=>{let e=O5(47),{addRow:o,attributes:n,block:r,blocks:s,duplicateRow:i,errorCount:l,fields:a,hasMaxRows:c,isSortable:u,Label:m,labels:f,listeners:d,moveRow:h,parentPath:p,path:g,permissions:b,readOnly:v,removeRow:C,row:x,rowCount:y,rowIndex:A,schemaPath:S,setCollapse:_,setNodeRef:E,transform:R}=t,{i18n:D}=L(),I=Lt()&&l>0,F=I?`${An}__row--has-errors`:`${An}__row--no-errors`,P;e[0]!==F?(P=[`${An}__row`,F].filter(Boolean),e[0]=F,e[1]=P):P=e[1];let k=P.join(" "),N;if(b===!0)N=!0;else{let O=b?.blocks?.[r.slug];O===!0?N=!0:N=O?.fields}let j=`${p?.split(".").join("-")}-row-${A}`,T;if(e[2]!==m||e[3]!==o||e[4]!==n||e[5]!==r||e[6]!==N||e[7]!==s||e[8]!==k||e[9]!==i||e[10]!==l||e[11]!==I||e[12]!==a||e[13]!==c||e[14]!==D||e[15]!==u||e[16]!==f||e[17]!==d||e[18]!==h||e[19]!==p||e[20]!==g||e[21]!==v||e[22]!==C||e[23]!==x.blockType||e[24]!==x.collapsed||e[25]!==x.id||e[26]!==y||e[27]!==A||e[28]!==S||e[29]!==_||e[30]!==E||e[31]!==j||e[32]!==R){let O;e[34]!==m||e[35]!==r||e[36]!==l||e[37]!==I||e[38]!==D||e[39]!==g||e[40]!==v||e[41]!==x.blockType||e[42]!==A?(O=m||j5("div",{className:`${An}__block-header`,children:[Sn("span",{className:`${An}__block-number`,children:String(A+1).padStart(2,"0")}),Sn(It,{className:`${An}__block-pill ${An}__block-pill-${x.blockType}`,pillStyle:"white",children:B5(r.labels.singular,D)}),Sn(Pp,{path:`${g}.blockName`,readOnly:v}),I&&Sn(Zt,{count:l,i18n:D,withMessage:!0})]}),e[34]=m,e[35]=r,e[36]=l,e[37]=I,e[38]=D,e[39]=g,e[40]=v,e[41]=x.blockType,e[42]=A,e[43]=O):O=e[43];let M;e[44]!==x.id||e[45]!==_?(M=B=>_(x.id,B),e[44]=x.id,e[45]=_,e[46]=M):M=e[46],T=Sn("div",{id:j,ref:E,style:{transform:R},children:Sn(gs,{actions:v?void 0:Sn(ix,{addRow:o,blocks:s,blockType:x.blockType,duplicateRow:i,fields:r.fields,hasMaxRows:c,isSortable:u,labels:f,moveRow:h,removeRow:C,rowCount:y,rowIndex:A}),className:k,collapsibleStyle:I?"error":"default",dragHandleProps:u?{id:x.id,attributes:n,listeners:d}:void 0,header:O,isCollapsed:x.collapsed,onToggle:M,children:Sn(Qt,{className:`${An}__fields`,fields:a,margins:"small",parentIndexPath:"",parentPath:g,parentSchemaPath:S,permissions:N,readOnly:v})},x.id)},`${p}-row-${A}`),e[2]=m,e[3]=o,e[4]=n,e[5]=r,e[6]=N,e[7]=s,e[8]=k,e[9]=i,e[10]=l,e[11]=I,e[12]=a,e[13]=c,e[14]=D,e[15]=u,e[16]=f,e[17]=d,e[18]=h,e[19]=p,e[20]=g,e[21]=v,e[22]=C,e[23]=x.blockType,e[24]=x.collapsed,e[25]=x.id,e[26]=y,e[27]=A,e[28]=S,e[29]=_,e[30]=E,e[31]=j,e[32]=R,e[33]=T}else T=e[33];return T};var hr="blocks-field",G5=t=>{let e=$5(52),{i18n:o,t:n}=L(),{field:r,path:s,permissions:i,readOnly:l,schemaPath:a,validate:c}=t,{name:u,admin:m,blocks:f,label:d,labels:h,localized:p,maxRows:g,minRows:b,required:v}=r,C;e[0]!==m?(C=m===void 0?{}:m,e[0]=m,e[1]=C):C=e[1];let{className:x,description:y,isSortable:A}=C,S=A===void 0?!0:A,_=a??u,E=b??v?1:0,{setDocFieldPreferences:R}=Fe(),{addFieldRow:D,dispatchFields:w,setModified:I}=He(),{code:F}=Ne(),{config:P}=Y(),{localization:k}=P,N=Ua("blocks-drawer"),j=Lt(),T={plural:n("fields:blocks"),singular:n("fields:block"),...h},O;e:{if(k&&k.fallback){let pe=k.defaultLocale||"en";O=F===pe;break e}O=!0}let M=O,B;e[2]!==M||e[3]!==g||e[4]!==E||e[5]!==v||e[6]!==c?(B=(pe,ue)=>{if(!M&&pe===null)return!0;if(typeof c=="function")return c(pe,{...ue,maxRows:g,minRows:E,required:v})},e[2]=M,e[3]=g,e[4]=E,e[5]=v,e[6]=c,e[7]=B):B=e[7];let $=B,W;e[8]!==$||e[9]!==s?(W={hasRows:!0,path:s,validate:$},e[8]=$,e[9]=s,e[10]=W):W=e[10];let{customComponents:H,errorPaths:X,rows:G,showError:z,valid:Z,value:V}=De(W),re;e[11]!==H?(re=H===void 0?{}:H,e[11]=H,e[12]=re):re=e[12];let{AfterInput:ee,BeforeInput:te,Description:Q,Error:xe,Label:he}=re,Ge;e[13]!==G?(Ge=G===void 0?[]:G,e[13]=G,e[14]=Ge):Ge=e[14];let de=Ge,we;e[15]!==D||e[16]!==s||e[17]!==_?(we=(pe,ue)=>{D({blockType:ue,path:s,rowIndex:pe,schemaPath:_}),setTimeout(()=>{gi(`${s}-row-${pe+1}`)},0)},e[15]=D,e[16]=s,e[17]=_,e[18]=we):we=e[18];let Ye=we,ie;e[19]!==w||e[20]!==s||e[21]!==I?(ie=pe=>{w({type:"DUPLICATE_ROW",path:s,rowIndex:pe}),I(!0),setTimeout(()=>{gi(`${s}-row-${pe+1}`)},0)},e[19]=w,e[20]=s,e[21]=I,e[22]=ie):ie=e[22];let Pe=ie,le;e[23]!==w||e[24]!==s||e[25]!==I?(le=pe=>{w({type:"REMOVE_ROW",path:s,rowIndex:pe}),I(!0)},e[23]=w,e[24]=s,e[25]=I,e[26]=le):le=e[26];let Be=le,We;e[27]!==w||e[28]!==s||e[29]!==I?(We=(pe,ue)=>{w({type:"MOVE_ROW",moveFromIndex:pe,moveToIndex:ue,path:s}),I(!0)},e[27]=w,e[28]=s,e[29]=I,e[30]=We):We=e[30];let qe=We,ke;e[31]!==w||e[32]!==s||e[33]!==de||e[34]!==R?(ke=pe=>{let{collapsedIDs:ue,updatedRows:ne}=Ou({collapsed:pe,rows:de});w({type:"SET_ALL_ROWS_COLLAPSED",path:s,updatedRows:ne}),R(s,{collapsed:ue})},e[31]=w,e[32]=s,e[33]=de,e[34]=R,e[35]=ke):ke=e[35];let Ue=ke,fe;e[36]!==w||e[37]!==s||e[38]!==de||e[39]!==R?(fe=(pe,ue)=>{let{collapsedIDs:ne,updatedRows:K}=Lu({collapsed:ue,rowID:pe,rows:de});w({type:"SET_ROW_COLLAPSED",path:s,updatedRows:K}),R(s,{collapsed:ne})},e[36]=w,e[37]=s,e[38]=de,e[39]=R,e[40]=fe):fe=e[40];let me=fe,je=g&&de.length>=g,$e=X.length,Te=j&&$e+(Z?0:1)>0,J=de.length<E||v&&de.length===0,oe=l&&de.length===0,ce=Te?`${hr}--has-error`:`${hr}--has-no-error`,Le;e[41]!==x||e[42]!==ce?(Le=[ve,hr,x,ce].filter(Boolean),e[41]=x,e[42]=ce,e[43]=Le):Le=e[43];let Ae;e[44]!==xe||e[45]!==s||e[46]!==z?(Ae=z&&jt(q,{CustomComponent:xe,Fallback:jt(Xe,{path:s,showError:z})}),e[44]=xe,e[45]=s,e[46]=z,e[47]=Ae):Ae=e[47];let Ee;return e[48]!==$e||e[49]!==Te||e[50]!==o?(Ee=Te&&$e>0&&jt(Zt,{count:$e,i18n:o,withMessage:!0}),e[48]=$e,e[49]=Te,e[50]=o,e[51]=Ee):Ee=e[51],En("div",{className:Le.join(" "),id:`field-${s?.replace(/\./g,"__")}`,children:[Ae,En("header",{className:`${hr}__header`,children:[En("div",{className:`${hr}__header-wrap`,children:[En("div",{className:`${hr}__heading-with-error`,children:[jt("h3",{children:jt(q,{CustomComponent:he,Fallback:jt(Re,{label:d,localized:p,path:s,required:v})})}),Ee]}),de.length>0&&En("ul",{className:`${hr}__header-actions`,children:[jt("li",{children:jt("button",{className:`${hr}__header-action`,onClick:()=>Ue(!0),type:"button",children:n("fields:collapseAll")})}),jt("li",{children:jt("button",{className:`${hr}__header-action`,onClick:()=>Ue(!1),type:"button",children:n("fields:showAll")})})]})]}),jt(q,{CustomComponent:Q,Fallback:jt(Me,{description:y,path:s})})]}),te,jt(Xa,{fieldValue:V,localized:p,path:s}),(de.length>0||!Z&&(oe||J))&&En(Rr,{className:`${hr}__rows`,ids:de.map(W5),onDragEnd:pe=>{let{moveFromIndex:ue,moveToIndex:ne}=pe;return qe(ue,ne)},children:[de.map((pe,ue)=>{let{blockType:ne}=pe,K=f.find(se=>se.slug===ne);if(K){let se=`${s}.${ue}`,Ve=X.filter(Je=>Je.startsWith(se+".")).length;return jt(xn,{disabled:l||!S,id:pe.id,children:Je=>jt(cx,{...Je,addRow:Ye,block:K,blocks:f,duplicateRow:Pe,errorCount:Ve,fields:K.fields,hasMaxRows:je,isSortable:S,Label:he,labels:T,moveRow:qe,parentPath:s,path:se,permissions:i,readOnly:l,removeRow:Be,row:pe,rowCount:de.length,rowIndex:ue,schemaPath:_+K.slug,setCollapse:me})},pe.id)}return null}),!M&&En(M5.Fragment,{children:[J&&jt(Vr,{type:"error",children:n("validation:requiresAtLeast",{count:E,label:Tp(E>1?T.plural:T.singular,o)||n(E>1?"general:row":"general:rows")})}),oe&&jt(Vr,{children:n("validation:fieldHasNo",{label:Tp(T.plural,o)})})]})]}),!je&&En(V5,{children:[jt(tr,{className:`${hr}__drawer-toggler`,disabled:l,slug:N,children:jt(U,{buttonStyle:"icon-label",disabled:l,el:"span",icon:"plus",iconPosition:"left",iconStyle:"with-border",children:n("fields:addLabel",{label:Tp(T.singular,o)})})}),jt(Ka,{addRow:Ye,addRowIndex:de?.length||0,blocks:f,drawerSlug:N,labels:T})]}),ee]})},el=Oe(G5);function W5(t){return t.id}import{jsx as vs,jsxs as ux}from"react/jsx-runtime";import{useCallback as Y5,useMemo as U5}from"react";import{jsx as Np}from"react/jsx-runtime";import{lazy as H5,Suspense as z5}from"react";var X5=H5(()=>import("./CodeEditor-RZ32B2QF.js")),tl=t=>Np(z5,{fallback:Np(so,{}),children:Np(X5,{...t})});var Z5={js:"javascript",ts:"typescript"},J5="code-field",Q5=t=>{let{field:e,field:{admin:{className:o,description:n,editorOptions:r={},language:s="javascript"}={},label:i,localized:l,required:a},path:c,readOnly:u,validate:m}=t,f=Y5((A,S)=>{if(typeof m=="function")return m(A,{...S,required:a})},[m,a]),{customComponents:{AfterInput:d,BeforeInput:h,Description:p,Error:g,Label:b}={},setValue:v,showError:C,value:x}=De({path:c,validate:f}),y=U5(()=>ot(e),[e]);return ux("div",{className:[ve,J5,o,C&&"error",u&&"read-only"].filter(Boolean).join(" "),style:y,children:[vs(q,{CustomComponent:b,Fallback:vs(Re,{label:i,localized:l,path:c,required:a})}),ux("div",{className:`${ve}__wrap`,children:[vs(q,{CustomComponent:g,Fallback:vs(Xe,{path:c,showError:C})}),h,vs(tl,{defaultLanguage:Z5[s]||s,onChange:u?()=>null:A=>v(A),options:r,readOnly:u,value:x||""}),d]}),vs(q,{CustomComponent:p,Fallback:vs(Me,{description:n,path:c})})]})},ol=Oe(Q5);import{jsx as Cs,jsxs as kp}from"react/jsx-runtime";import{getTranslation as K5}from"@payloadcms/translations";import{Fragment as eD,useCallback as tD,useEffect as oD,useMemo as rD,useState as fx}from"react";import{c as q5}from"react/compiler-runtime";import{fieldAffectsData as dx}from"payload/shared";var Ju=(t,e)=>e.reduce((n,r)=>{let s="fields"in r?r.fields:void 0;if(s)if(dx(r)){let i="name"in r?r.name:"unnamed";n.push(...t,i)}else n.push(...Ju(t,s));else if(r.type==="tabs")"tabs"in r&&r.tabs?.forEach(i=>{let l=t;"name"in i&&(l=[...t,i.name]),n.push(...Ju(l,i.fields))});else if(dx(r)){let i="name"in r?r.name:"unnamed";n.push(...t,i)}return n},[]);var mx=({formState:t,pathSegments:e})=>{let o={},n=0;return Object.entries(t).forEach(([r])=>{if(e?.some(i=>i.endsWith(".")?r.startsWith(i):r===i)){let i=t[r];o[r]=i,"valid"in i&&!i.valid&&(n+=1)}}),{errorCount:n,fieldState:o}};var xs=t=>{let e=q5(12),{fields:o,path:n,setErrorCount:r}=t,[s]=ri(),i=Lt(),l;e[0]!==o||e[1]!==n?(l=Ju(n,o),e[0]=o,e[1]=n,e[2]=l):l=e[2];let a=l,c;e[3]!==s||e[4]!==i||e[5]!==a||e[6]!==r?(c=()=>{if(i){let{errorCount:m}=mx({formState:s,pathSegments:a});r(m)}},e[3]=s,e[4]=i,e[5]=a,e[6]=r,e[7]=c):c=e[7];let u;return e[8]!==o||e[9]!==s||e[10]!==i?(u=[s,i,o],e[8]=o,e[9]=s,e[10]=i,e[11]=u):u=e[11],cs(c,250,u),null};var rl="collapsible-field",nD=t=>{let{field:e,field:{admin:{className:o,description:n,initCollapsed:r=!1}={},fields:s,label:i}={},indexPath:l,parentPath:a,parentSchemaPath:c,path:u,permissions:m,readOnly:f}=t,{i18n:d}=L(),{getPreference:h,setPreference:p}=Ht(),{preferencesKey:g}=Fe(),[b,v]=fx(),C=`collapsible-${u?.replace(/\./g,"__")}`,[x,y]=fx(0),A=x>0,{customComponents:{AfterInput:S,BeforeInput:_,Description:E,Label:R}={}}=De({path:u}),D=tD(async I=>{let F=await h(g);g&&p(g,{...F,...u?{fields:{...F?.fields||{},[u]:{...F?.fields?.[u],collapsed:I}}}:{fields:{...F?.fields||{},[C]:{...F?.fields?.[C],collapsed:I}}}})},[g,C,h,p,u]);oD(()=>{(async()=>{if(g){let F=await h(g),P=u?F?.fields?.[u]?.collapsed:F?.fields?.[C]?.collapsed;v(P!==void 0?!!P:typeof r=="boolean"?r:!1)}else v(typeof r=="boolean"?r:!1)})()},[h,g,C,r,u]);let w=rD(()=>ot(e),[e]);return typeof b!="boolean"?null:kp(eD,{children:[Cs(xs,{fields:s,path:u.split("."),setErrorCount:y}),kp("div",{className:[ve,rl,o,A?`${rl}--has-error`:`${rl}--has-no-error`].filter(Boolean).join(" "),id:`field-${C}`,style:w,children:[_,Cs(gs,{className:`${rl}__collapsible`,collapsibleStyle:A?"error":"default",header:kp("div",{className:`${rl}__row-label-wrap`,children:[Cs(ts,{CustomComponent:R,label:K5(i,d),path:u}),A&&Cs(Zt,{count:x,i18n:d,withMessage:!0})]}),initCollapsed:b,onToggle:D,children:Cs(Qt,{fields:s,margins:"small",parentIndexPath:l,parentPath:a,parentSchemaPath:c,permissions:m,readOnly:f})}),S,Cs(q,{CustomComponent:E,Fallback:Cs(Me,{description:n,path:u})})]})]})},nl=Oe(nD);import{jsx as ys,jsxs as px}from"react/jsx-runtime";import{getTranslation as lD}from"@payloadcms/translations";import{useCallback as cD,useMemo as uD}from"react";import{jsx as Lp}from"react/jsx-runtime";import{lazy as sD,Suspense as iD}from"react";var aD=sD(()=>import("./DatePicker-QW5V4BQV.js")),Qu=t=>Lp(iD,{fallback:Lp(so,{height:50}),children:Lp(aD,{...t})});var hx="date-time-field",dD=t=>{let{field:e,field:{admin:{className:o,date:n,description:r,placeholder:s}={},label:i,localized:l,required:a},path:c,readOnly:u,validate:m}=t,{i18n:f}=L(),d=cD((S,_)=>{if(typeof m=="function")return m(S,{..._,required:a})},[m,a]),{customComponents:{AfterInput:h,BeforeInput:p,Description:g,Error:b,Label:v}={},setValue:C,showError:x,value:y}=De({path:c,validate:d}),A=uD(()=>ot(e),[e]);return px("div",{className:[ve,hx,o,x&&`${hx}--has-error`,u&&"read-only"].filter(Boolean).join(" "),style:A,children:[ys(q,{CustomComponent:v,Fallback:ys(Re,{label:i,localized:l,required:a})}),px("div",{className:`${ve}__wrap`,id:`field-${c.replace(/\./g,"__")}`,children:[ys(q,{CustomComponent:b,Fallback:ys(Xe,{path:c,showError:x})}),p,ys(Qu,{...n,onChange:S=>{u||C(S?.toISOString()||null)},placeholder:lD(s,f),readOnly:u,value:y}),h]}),ys(q,{CustomComponent:g,Fallback:ys(Me,{description:r,path:c})})]})},sl=Oe(dD);import{jsx as ws,jsxs as gx}from"react/jsx-runtime";import{getTranslation as mD}from"@payloadcms/translations";import{useCallback as fD,useMemo as pD}from"react";var hD=t=>{let{field:e,field:{admin:{autoComplete:o,className:n,description:r,placeholder:s}={},label:i,localized:l,required:a}={},path:c,readOnly:u,validate:m}=t,{i18n:f}=L(),d=fD((S,_)=>{if(typeof m=="function")return m(S,{..._,required:a})},[m,a]),{customComponents:{AfterInput:h,BeforeInput:p,Description:g,Error:b,Label:v}={},setValue:C,showError:x,value:y}=De({path:c,validate:d}),A=pD(()=>ot(e),[e]);return gx("div",{className:[ve,"email",n,x&&"error",u&&"read-only"].filter(Boolean).join(" "),style:A,children:[ws(q,{CustomComponent:v,Fallback:ws(Re,{label:i,localized:l,path:c,required:a})}),gx("div",{className:`${ve}__wrap`,children:[ws(q,{CustomComponent:b,Fallback:ws(Xe,{path:c,showError:x})}),p,ws("input",{autoComplete:o,disabled:u,id:`field-${c.replace(/\./g,"__")}`,name:c,onChange:C,placeholder:mD(s,f),required:a,type:"email",value:y||""}),h]}),ws(q,{CustomComponent:g,Fallback:ws(Me,{description:r,path:c})})]})},Is=Oe(hD);import{jsx as _n,jsxs as qu}from"react/jsx-runtime";import{getTranslation as AD}from"@payloadcms/translations";import{useMemo as ED}from"react";import{jsx as gD}from"react/jsx-runtime";import{createContext as bD,useContext as vD}from"react";var bx=bD(!1),vx=({children:t,withinRow:e=!0})=>gD(bx.Provider,{value:e,children:t}),xx=()=>vD(bx);import{jsx as xD}from"react/jsx-runtime";import{createContext as CD,useContext as yD}from"react";var Cx=CD(!1),Op=({children:t,withinTab:e=!0})=>xD(Cx.Provider,{value:e,children:t}),yx=()=>yD(Cx);import{jsx as wD}from"react/jsx-runtime";import{createContext as ID,useContext as SD}from"react";var wx=ID(!1),Ix=({children:t,withinGroup:e=!0})=>wD(wx.Provider,{value:e,children:t}),Sx=()=>SD(wx);var gr="group-field",_D=t=>{let{field:e,field:{name:o,admin:{className:n,description:r,hideGutter:s}={},fields:i,label:l},path:a,permissions:c,readOnly:u,schemaPath:m}=t,f=m??o,{i18n:d}=L(),{isWithinCollapsible:h}=wn(),p=Sx(),g=xx(),b=yx(),{customComponents:{AfterInput:v,BeforeInput:C,Description:x,Label:y}={},errorPaths:A}=De({path:a}),S=Lt(),_=A.length,E=S&&_>0,R=!(h||p||g),D=ED(()=>ot(e),[e]);return qu("div",{className:[ve,gr,R&&`${gr}--top-level`,h&&`${gr}--within-collapsible`,p&&`${gr}--within-group`,g&&`${gr}--within-row`,b&&`${gr}--within-tab`,!s&&p&&`${gr}--gutter`,E&&`${gr}--has-error`,n].filter(Boolean).join(" "),id:`field-${a?.replace(/\./g,"__")}`,style:D,children:[_n(Ix,{children:qu("div",{className:`${gr}__wrap`,children:[!!(y||x||l||E)&&qu("div",{className:`${gr}__header`,children:[!!(y||x||l)&&qu("header",{children:[_n(q,{CustomComponent:y,Fallback:_n("h3",{className:`${gr}__title`,children:_n(Re,{as:"span",label:AD(l,d),localized:!1,path:a,required:!1})})}),_n(q,{CustomComponent:x,Fallback:_n(Me,{description:r,path:a})})]}),E&&_n(Zt,{count:_,i18n:d,withMessage:!0})]}),C,_n(Qt,{fields:i,margins:"small",parentIndexPath:"",parentPath:a,parentSchemaPath:f,permissions:c===!0?c:c?.fields,readOnly:u})]})}),v]})};var il=Oe(_D);import{c as RD}from"react/compiler-runtime";import{jsx as DD}from"react/jsx-runtime";import{useEffect as FD}from"react";var PD=t=>{let e=RD(12),{disableModifyingForm:o,path:n,value:r}=t,s=o===void 0?!0:o,i;e[0]!==n?(i={path:n},e[0]=n,e[1]=i):i=e[1];let{setValue:l,value:a}=De(i),c,u;e[2]!==s||e[3]!==l||e[4]!==r?(c=()=>{r!==void 0&&l(r,s)},u=[r,l,s],e[2]=s,e[3]=l,e[4]=r,e[5]=c,e[6]=u):(c=e[5],u=e[6]),FD(c,u);let m=`field-${n?.replace(/\./g,"__")}`,f=a||"",d;return e[7]!==n||e[8]!==l||e[9]!==m||e[10]!==f?(d=DD("input",{id:m,name:n,onChange:l,type:"hidden",value:f}),e[7]=n,e[8]=l,e[9]=m,e[10]=f,e[11]=d):d=e[11],d},al=Oe(PD);import{jsx as xl,jsxs as C6}from"react/jsx-runtime";import{useMemo as y6}from"react";import{c as b6}from"react/compiler-runtime";import{jsx as Ao,jsxs as xi}from"react/jsx-runtime";import{getTranslation as IC}from"@payloadcms/translations";import{Fragment as v6,useState as Dn}from"react";import{dequal as Ex}from"dequal/lite";import{useEffect as kD,useRef as Ku}from"react";import{c as TD}from"react/compiler-runtime";import{useEffect as Ax,useState as ND}from"react";function jp(t,e,o){let n=TD(11),r;n[0]!==t?(r=()=>t,n[0]=t,n[1]=r):r=n[1];let[s,i]=ND(r),l;n[2]!==o||n[3]!==t?(l=()=>{let m=setTimeout(()=>{i(()=>t)},o);return()=>{clearTimeout(m)}},n[2]=o,n[3]=t,n[4]=l):l=n[4];let a;n[5]!==o||n[6]!==e?(a=[...e,o],n[5]=o,n[6]=e,n[7]=a):a=n[7],Ax(l,a);let c,u;n[8]!==s?(c=()=>{s()},u=[s],n[8]=s,n[9]=c,n[10]=u):(c=n[9],u=n[10]),Ax(c,u)}function Ss(t,e,o,n){let r=Ku(typeof n?.runOnFirstRender<"u"?!n?.runOnFirstRender:!1),s=Ku(e);kD(()=>{(e.some((l,a)=>!o.includes(l)&&!Ex(l,s.current[a]))||!r.current)&&t(),s.current=e,r.current=!0},e)}function _x(t,e,o,n){let r=Ku(typeof n?.runOnFirstRender<"u"?!n?.runOnFirstRender:!1),s=Ku(e);jp(()=>{(e.some((l,a)=>!o.includes(l)&&!Ex(l,s.current[a]))||!r.current)&&t(),s.current=e,r.current=!0},e,n?.delay||0)}import{jsx as BD}from"react/jsx-runtime";import{useRouter as $D,useSearchParams as MD}from"next/navigation.js";import{isNumber as VD}from"payload/shared";import*as $p from"qs-esm";import GD,{createContext as WD,useCallback as ll,useContext as HD,useEffect as Fx,useMemo as zD,useState as XD}from"react";import{jsx as LD}from"react/jsx-runtime";import{createContext as OD,useContext as jD}from"react";var Rx=OD({}),Bp=({children:t,...e})=>LD(Rx.Provider,{value:{isInDrawer:!!e.drawerSlug,...e},children:t}),Fr=()=>{let t=jD(Rx);if(!t)throw new Error("useListDrawerContext must be used within a ListDrawerContextProvider");return t};import*as Dx from"qs-esm";function or(t){let e=t.toString();return Dx.parse(e,{depth:10,ignoreQueryPrefix:!0})}var Px=WD({}),br=()=>HD(Px),Mp=({children:t,collectionSlug:e,data:o,defaultLimit:n,defaultSort:r,modifySearchParams:s,onQueryChange:i,preferenceKey:l})=>{"use no memo";let a=$D(),{setPreference:c}=Ht(),u=MD(),m=zD(()=>or(u),[u]),{onQueryChange:f}=Fr(),[d,h]=XD(()=>s?m:{});Fx(()=>{s&&h(m)},[m,s]);let p=ll(async y=>{let A="page"in y?y.page:d?.page;("where"in y||"search"in y)&&(A="1");let S={},_=!1;"limit"in y&&(S.limit=Number(y.limit),_=!0),"sort"in y&&(S.sort=y.sort,_=!0),_&&l&&await c(l,S,!0);let E={limit:"limit"in y?y.limit:d?.limit,page:A,search:"search"in y?y.search:d?.search,sort:"sort"in y?y.sort:d?.sort,where:"where"in y?y.where:d?.where};s?a.replace(`${$p.stringify(E,{addQueryPrefix:!0})}`):(typeof f=="function"||typeof i=="function")&&(f||i)(E)},[s,d?.page,d?.limit,d?.sort,d?.where,d?.search,l,a,c,f,i]),g=ll(async y=>{await p({page:String(y)})},[p]),b=GD.useCallback(async y=>{await p({limit:String(y),page:"1"})},[p]),v=ll(async y=>{await p({search:y===""?void 0:y})},[p]),C=ll(async y=>{await p({sort:y})},[p]),x=ll(async y=>{await p({where:y})},[p]);return Fx(()=>{if(s){let y=!1;VD(n)&&!("limit"in d)&&(d.limit=String(n),y=!0),r&&!("sort"in d)&&(d.sort=r,y=!0),h(d),y&&a.replace(`?${$p.stringify(d)}`)}},[r,n,a,s,d]),BD(Px.Provider,{value:{data:o,handlePageChange:g,handlePerPageChange:b,handleSearchChange:v,handleSortChange:C,handleWhereChange:x,query:d,refineListData:p},children:t})};import{jsx as YD}from"react/jsx-runtime";import UD,{createContext as ZD,useCallback as cl}from"react";var Tx=ZD(void 0),Ft=()=>{let t=UD.useContext(Tx);if(t===void 0)throw new Error("useServerFunctions must be used within a ServerFunctionsProvider");return t},Vp=({children:t,serverFunction:e})=>{if(!e)throw new Error("ServerFunctionsProvider requires a serverFunction prop");let o=cl(async l=>await e({name:"render-document-slots",args:l}),[e]),n=cl(async l=>{let{signal:a,...c}=l||{};try{if(!a?.aborted){let u=await e({name:"form-state",args:{fallbackLocale:!1,...c}});if(!a?.aborted)return u}}catch(u){console.error(u)}return{state:null}},[e]),r=cl(async l=>{let{signal:a,...c}=l||{};try{if(!a?.aborted){let u=await e({name:"table-state",args:{fallbackLocale:!1,...c}});if(!a?.aborted)return u}}catch(u){console.error(u)}},[e]),s=cl(async l=>{let{signal:a,...c}=l||{};try{return await e({name:"render-document",args:{fallbackLocale:!1,...c}})}catch(u){console.error(u)}},[e]),i=cl(async l=>{let{signal:a,...c}=l||{};try{let u=await e({name:"copy-data-from-locale",args:c});if(!a?.aborted)return u}catch(u){console.error(u)}},[e]);return YD(Tx.Provider,{value:{copyDataFromLocale:i,getDocumentSlots:o,getFormState:n,getTableState:r,renderDocument:s,serverFunction:e},children:t})};var Gp=t=>Object.keys(t).length===0,ul=(t,e)=>Gp(e)?t:Gp(t)?e:("and"in t?t.and.push(e):"or"in t?t={and:[t,e]}:t={and:[t,e]},t),ed=({collectionConfig:t,search:e,where:o={}})=>{if(e){let n={...o||{}},r=(t.admin.listSearchableFields||[t.admin?.useAsTitle||"id"]).map(s=>({[s]:{like:e}}));r.length>0&&(n=ul(n,{or:r})),Gp(n)||(o=n)}return o};import{c as eF}from"react/compiler-runtime";import{jsx as ml}from"react/jsx-runtime";import{useId as tF}from"react";import{jsx as JD}from"react/jsx-runtime";import As,{createContext as QD,useCallback as Nx,useContext as qD}from"react";function Et(t){if(t)try{t.abort()}catch{}}var kx=QD({}),dl=()=>qD(kx),KD=t=>t.map(({accessor:e,active:o})=>({accessor:e,active:o})),td=({children:t,collectionSlug:e,columnState:o,docs:n,enableRowSelections:r,LinkedCellOverride:s,listPreferences:i,preferenceKey:l,renderRowTypes:a,setTable:c,sortColumnProps:u,tableAppearance:m})=>{let{getEntityConfig:f}=Y(),{getTableState:d}=Ft(),{admin:{defaultColumns:h,useAsTitle:p}={},fields:g}=f({collectionSlug:e}),b=As.useRef(e),{getPreference:v,setPreference:C}=Ht(),[x,y]=As.useState(o),A=As.useRef(null),S=Nx(async D=>{Et(A.current);let{fromIndex:w,toIndex:I}=D,F=[...x],[P]=F.splice(w,1);F.splice(I,0,P),y(F);let k=new AbortController;A.current=k;let N=await d({collectionSlug:e,columns:KD(F),docs:n,enableRowSelections:r,renderRowTypes:a,signal:k.signal,tableAppearance:m});N&&(y(N.state),c(N.Table))},[x,e,n,d,c,r,a,m]),_=Nx(async D=>{Et(A.current);let{newColumnState:w,toggledColumns:I}=x.reduce((k,N)=>(N.accessor===D?(k.newColumnState.push({...N,accessor:N.accessor,active:!N.active}),k.toggledColumns.push({accessor:N.accessor,active:!N.active})):(k.newColumnState.push(N),k.toggledColumns.push({accessor:N.accessor,active:N.active})),k),{newColumnState:[],toggledColumns:[]});y(w);let F=new AbortController;A.current=F;let P=await d({collectionSlug:e,columns:I,docs:n,enableRowSelections:r,renderRowTypes:a,signal:F.signal,tableAppearance:m});P&&(y(P.state),c(P.Table))},[x,d,c,e,n,r,a,m]),E=As.useCallback(async D=>{let w=x.map(P=>({accessor:P.accessor,active:D.includes(P.accessor)})).sort((P,k)=>{let N=D.indexOf(P.accessor),j=D.indexOf(k.accessor);return N===-1||j===-1?0:N>j?1:-1}),{state:I,Table:F}=await d({collectionSlug:e,columns:w,docs:n,enableRowSelections:r,renderRowTypes:a,tableAppearance:m});y(I),c(F)},[x,d,c,e,n,r,a,m]),R=As.useCallback(async()=>{await E(h)},[h,E]);return As.useEffect(()=>{(async()=>{if(b.current!==e||!i){let I=await v(l);b.current=e,I?.columns}})()},[l,v,e,g,h,p,i,r,u]),As.useEffect(()=>()=>{Et(A.current)},[]),JD(kx.Provider,{value:{columns:x,LinkedCellOverride:s,moveColumn:S,resetColumnsState:R,setActiveColumns:E,toggleColumn:_},children:t})};var Wp="column-selector",oF=t=>t.filter(e=>!e?.field?.admin?.disableListColumn),od=t=>{let e=eF(14),{collectionSlug:o}=t,{columns:n,moveColumn:r,toggleColumn:s}=dl(),i=tF(),l=Ze();if(!n)return null;let a;if(e[0]!==o||e[1]!==n||e[2]!==l||e[3]!==r||e[4]!==s||e[5]!==i){let c=oF(n),u;e[7]!==r?(u=f=>{let{moveFromIndex:d,moveToIndex:h}=f;r({fromIndex:d,toIndex:h})},e[7]=r,e[8]=u):u=e[8];let m;e[9]!==o||e[10]!==l||e[11]!==s||e[12]!==i?(m=(f,d)=>{if(!f)return null;let{accessor:h,active:p,field:g}=f;return f.accessor==="_select"||!g||f.CustomLabel===null||f.CustomLabel===void 0&&!("label"in g)?null:ml(It,{alignIcon:"left","aria-checked":p,className:[`${Wp}__column`,p&&`${Wp}__column--active`].filter(Boolean).join(" "),draggable:!0,icon:p?ml(xt,{}):ml(Zo,{}),id:h,onClick:()=>{s(h)},children:f.CustomLabel??ml(Re,{label:"label"in g&&g.label,unstyled:!0})},`${o}-${g&&"name"in g?g?.name:d}${l?`-${l}-`:""}${i}`)},e[9]=o,e[10]=l,e[11]=s,e[12]=i,e[13]=m):m=e[13],a=ml(Rr,{className:Wp,ids:c.map(rF),onDragEnd:u,children:c.map(m)}),e[0]=o,e[1]=n,e[2]=l,e[3]=r,e[4]=s,e[5]=i,e[6]=a}else a=e[6];return a};function rF(t){return t?.accessor}import{c as Yx}from"react/compiler-runtime";import{jsx as sd}from"react/jsx-runtime";import{createElement as xF}from"react";import{useEffect as CF,useId as yF,useState as wF}from"react";import{c as nF}from"react/compiler-runtime";import{useState as sF}from"react";var rd=t=>{let e=nF(3),{config:o}=Y(),n;e[0]!==o||e[1]!==t?(n=()=>t?(typeof t=="string"?[t]:t).map(i=>o.collections.find(l=>l.slug===i)):[],e[0]=o,e[1]=t,e[2]=n):n=e[2];let[r]=sF(n);return r};import{jsx as Hx}from"react/jsx-runtime";import bF,{useCallback as pl,useEffect as zx,useRef as vF,useState as Yp}from"react";import{c as Xp}from"react/compiler-runtime";import{jsx as Es,jsxs as Mx}from"react/jsx-runtime";import{getTranslation as dF}from"@payloadcms/translations";import mF from"react";import{c as aF}from"react/compiler-runtime";import{jsx as lF,jsxs as cF}from"react/jsx-runtime";import jx,{createContext as uF}from"react";import{c as iF}from"react/compiler-runtime";import*as Rn from"react";var Hp=t=>{let e=iF(13),{delayBeforeShow:o,inTimeout:n,minShowTime:r,outTimeout:s,show:i}=t,l=n+r+s,[a,c]=ff(o),[u,m]=Rn.useState(!1),[f,d]=Rn.useState(!1),h=Rn.useRef(0),p=Rn.useRef(void 0),g;e[0]!==s?(g=()=>{d(!0),p.current=setTimeout(()=>{m(!1),d(!1)},s)},e[0]=s,e[1]=g):g=e[1];let b=g,v,C;e[2]!==a||e[3]!==u||e[4]!==i||e[5]!==l||e[6]!==b?(v=()=>{let y=a&&!u&&i,A=u&&!i;if(y)h.current=Date.now(),m(!0);else if(A){let S=Date.now()-h.current,_=l-S;clearTimeout(p.current),p.current=setTimeout(b,Math.max(0,_))}},C=[u,i,b,l,a],e[2]=a,e[3]=u,e[4]=i,e[5]=l,e[6]=b,e[7]=v,e[8]=C):(v=e[7],C=e[8]),Rn.useEffect(v,C);let x;return e[9]!==u||e[10]!==f||e[11]!==c?(x={isMounted:u,isUnmounting:f,triggerDelayedRender:c},e[9]=u,e[10]=f,e[11]=c,e[12]=x):x=e[12],x};var Lx={isLoading:!1,loaders:[],loadingText:"",overlayType:null},Ox=(t,e)=>{let o=[...t.loaders],{type:n="fullscreen",key:r="user",loadingText:s}=e.payload;if(e.type==="add")o.push({type:n,key:r,loadingText:s});else if(e.type==="remove"){let l=o.findIndex(a=>a.key===r&&a.type===n);o.splice(l,1)}let i=o?.length>0?o[o.length-1]:null;return{isLoading:!!i,loaders:o,loadingText:i?.loadingText||t?.loadingText,overlayType:i?.type||t?.overlayType}};var zp=250,Bx=uF({isOnScreen:!1,toggleLoadingOverlay:void 0}),$x=t=>{let e=aF(21),{children:o}=t,{t:n}=L(),r;e[0]!==n?(r=n("general:loading"),e[0]=n,e[1]=r):r=e[1];let s=r,[i,l]=jx.useReducer(Ox,Lx),a;e[2]!==i.isLoading?(a={delayBeforeShow:1e3,inTimeout:zp,minShowTime:500,outTimeout:zp,show:i.isLoading},e[2]=i.isLoading,e[3]=a):a=e[3];let{isMounted:c,isUnmounting:u,triggerDelayedRender:m}=Hp(a),f;e[4]!==s||e[5]!==m?(f=p=>{let{type:g,isLoading:b,key:v,loadingText:C}=p,x=C===void 0?s:C;b?(m(),l({type:"add",payload:{type:g,key:v,loadingText:x}})):l({type:"remove",payload:{type:g,key:v}})},e[4]=s,e[5]=m,e[6]=f):f=e[6];let d=f,h;if(e[7]!==o||e[8]!==s||e[9]!==c||e[10]!==u||e[11]!==i.loadingText||e[12]!==i.overlayType||e[13]!==d){let p;e[15]!==s||e[16]!==c||e[17]!==u||e[18]!==i.loadingText||e[19]!==i.overlayType?(p=c&&lF(qr,{animationDuration:`${zp}ms`,loadingText:i.loadingText||s,overlayType:i.overlayType,show:!u}),e[15]=s,e[16]=c,e[17]=u,e[18]=i.loadingText,e[19]=i.overlayType,e[20]=p):p=e[20],h=cF(Bx.Provider,{value:{isOnScreen:c,toggleLoadingOverlay:d},children:[p,o]}),e[7]=o,e[8]=s,e[9]=c,e[10]=u,e[11]=i.loadingText,e[12]=i.overlayType,e[13]=d,e[14]=h}else h=e[14];return h},nd=()=>{let t=jx.useContext(Bx);if(t===void 0)throw new Error("useLoadingOverlay must be used within a LoadingOverlayProvider");return t};var vr="loading-overlay",qr=t=>{let e=Xp(11),{animationDuration:o,loadingText:n,overlayType:r,show:s}=t,i=s===void 0?!0:s,{t:l}=L(),a=i?`${vr}--entering`:`${vr}--exiting`,c=r?`${vr}--${r}`:"",u;e[0]!==a||e[1]!==c?(u=[vr,a,c].filter(Boolean),e[0]=a,e[1]=c,e[2]=u):u=e[2];let m=u.join(" "),f=o||"500ms",d;if(e[3]!==n||e[4]!==l||e[5]!==m||e[6]!==f){let h;e[8]!==n||e[9]!==l?(h=n||l("general:loading"),e[8]=n,e[9]=l,e[10]=h):h=e[10],d=Mx("div",{className:m,style:{animationDuration:f},children:[Mx("div",{className:`${vr}__bars`,children:[Es("div",{className:`${vr}__bar`}),Es("div",{className:`${vr}__bar`}),Es("div",{className:`${vr}__bar`}),Es("div",{className:`${vr}__bar`}),Es("div",{className:`${vr}__bar`})]}),Es("span",{className:`${vr}__text`,children:h})]}),e[3]=n,e[4]=l,e[5]=m,e[6]=f,e[7]=d}else d=e[7];return d},Vx=t=>{let e=Xp(7),{name:o,type:n,loadingText:r,show:s}=t,i=n===void 0?"fullscreen":n,{toggleLoadingOverlay:l}=nd(),a,c;return e[0]!==o||e[1]!==r||e[2]!==s||e[3]!==l||e[4]!==i?(a=()=>(l({type:i,isLoading:s,key:o,loadingText:r||void 0}),()=>{l({type:i,isLoading:!1,key:o})}),c=[s,l,o,i,r],e[0]=o,e[1]=r,e[2]=s,e[3]=l,e[4]=i,e[5]=a,e[6]=c):(a=e[5],c=e[6]),mF.useEffect(a,c),null},fF=t=>{let e=Xp(6),{name:o,type:n,action:r,formIsLoading:s,loadingSuffix:i}=t,l=n===void 0?"fullscreen":n,a=s===void 0?!1:s,c=Uo(),{i18n:u,t:m}=L(),d=`${{create:m("general:creating"),loading:m("general:loading"),update:m("general:updating")}[r]} ${i?dF(i,u):""}`,h;return e[0]!==a||e[1]!==c||e[2]!==o||e[3]!==d||e[4]!==l?(h=Es(Vx,{loadingText:d.trim(),name:o,show:a||c,type:l}),e[0]=a,e[1]=c,e[2]=o,e[3]=d,e[4]=l,e[5]=h):h=e[5],h};import{jsx as pF}from"react/jsx-runtime";import{createContext as hF,useContext as gF}from"react";var Gx=hF({}),Wx=({children:t,...e})=>pF(Gx.Provider,{value:e,children:t}),fl=()=>{let t=gF(Gx);if(!t)throw new Error("useDocumentDrawerContext must be used within a DocumentDrawerProvider");return t};var Xx=({id:t,AfterFields:e,collectionSlug:o,disableActions:n,drawerSlug:r,Header:s,initialData:i,initialState:l,onDelete:a,onDuplicate:c,onSave:u,overrideEntityVisibility:m=!0,redirectAfterDelete:f,redirectAfterDuplicate:d})=>{let{config:{collections:h}}=Y(),[p]=Yp(()=>h.find(F=>F.slug===o)),g=bF.useRef(null),{closeModal:b}=ae(),{t:v}=L(),{renderDocument:C}=Ft(),[x,y]=Yp(void 0),[A,S]=Yp(!0),_=vF(!1),E=pl(F=>{Et(g.current);let P=new AbortController;g.current=P,(async()=>{S(!0);try{let N=await C({collectionSlug:o,disableActions:n,docID:F,drawerSlug:r,initialData:i,overrideEntityVisibility:m,redirectAfterDelete:f!==void 0?f:!1,redirectAfterDuplicate:d!==void 0?d:!1,signal:P.signal});N?.Document&&(y(N.Document),S(!1))}catch(N){be.error(N?.message||v("error:unspecific")),b(r)}})()},[o,n,r,i,f,d,C,b,m,v]),R=pl(F=>{E(F.doc.id),typeof u=="function"&&u({...F,collectionConfig:p})},[u,p,E]),D=pl(F=>{E(F.doc.id),typeof c=="function"&&c({...F,collectionConfig:p})},[c,p,E]),w=pl(F=>{typeof a=="function"&&a({...F,collectionConfig:p}),b(r)},[a,b,r,p]),I=pl(()=>{E()},[E]);return zx(()=>{!x&&!_.current&&(E(t),_.current=!0)},[x,E,t]),zx(()=>()=>{Et(g.current)},[]),A?Hx(qr,{}):Hx(Wx,{clearDoc:I,drawerSlug:r,onDelete:w,onDuplicate:D,onSave:R,children:x})};var _s="doc-drawer",IF=({id:t,collectionSlug:e,depth:o,uuid:n})=>`doc-drawer_${e}_${o}${t?`_${t}`:""}_${n}`,SF=t=>{let e=Yx(21),o,n,r,s,i,l,a,c;e[0]!==t?({id:l,children:o,className:n,collectionSlug:r,disabled:s,drawerSlug:i,onClick:a,...c}=t,e[0]=t,e[1]=o,e[2]=n,e[3]=r,e[4]=s,e[5]=i,e[6]=l,e[7]=a,e[8]=c):(o=e[1],n=e[2],r=e[3],s=e[4],i=e[5],l=e[6],a=e[7],c=e[8]);let{t:u}=L(),[m]=rd(r),f=l?"general:editLabel":"fields:addNewLabel",d=m?.labels.singular,h;if(e[9]!==o||e[10]!==n||e[11]!==s||e[12]!==i||e[13]!==a||e[14]!==c||e[15]!==u||e[16]!==f||e[17]!==d){let p=u(f,{label:d}),g;e[19]!==n?(g=[n,`${_s}__toggler`].filter(Boolean),e[19]=n,e[20]=g):g=e[20],h=sd(tr,{"aria-label":p,className:g.join(" "),disabled:s,onClick:a,slug:i,...c,children:o}),e[9]=o,e[10]=n,e[11]=s,e[12]=i,e[13]=a,e[14]=c,e[15]=u,e[16]=f,e[17]=d,e[18]=h}else h=e[18];return h},AF=t=>{let{drawerSlug:e}=t;return sd(Jt,{className:_s,gutter:!1,Header:null,slug:e,children:sd(Xx,{...t})})},zt=t=>{let e=Yx(38),{id:o,collectionSlug:n,overrideEntityVisibility:r}=t,s=Ze(),i=yF(),{closeModal:l,modalState:a,openModal:c,toggleModal:u}=ae(),[m,f]=wF(!1),d;e[0]!==n||e[1]!==s||e[2]!==o||e[3]!==i?(d=IF({id:o,collectionSlug:n,depth:s,uuid:i}),e[0]=n,e[1]=s,e[2]=o,e[3]=i,e[4]=d):d=e[4];let h=d,p,g;e[5]!==h||e[6]!==a?(p=()=>{f(!!a[h]?.isOpen)},g=[a,h],e[5]=h,e[6]=a,e[7]=p,e[8]=g):(p=e[7],g=e[8]),CF(p,g);let b;e[9]!==h||e[10]!==u?(b=()=>{u(h)},e[9]=h,e[10]=u,e[11]=b):b=e[11];let v=b,C;e[12]!==l||e[13]!==h?(C=()=>{l(h)},e[12]=l,e[13]=h,e[14]=C):C=e[14];let x=C,y;e[15]!==h||e[16]!==c?(y=()=>{c(h)},e[15]=h,e[16]=c,e[17]=y):y=e[17];let A=y,S,_;e[18]!==n||e[19]!==h||e[20]!==o||e[21]!==r?(_=N=>xF(AF,{...N,collectionSlug:n,drawerSlug:h,id:o,key:h,overrideEntityVisibility:r}),e[18]=n,e[19]=h,e[20]=o,e[21]=r,e[22]=_):_=e[22],S=_;let E=S,R,D;e[23]!==n||e[24]!==h||e[25]!==o?(D=N=>sd(SF,{...N,collectionSlug:n,drawerSlug:h,id:o}),e[23]=n,e[24]=h,e[25]=o,e[26]=D):D=e[26],R=D;let w=R,I,F;e[27]!==x||e[28]!==h||e[29]!==s||e[30]!==m||e[31]!==A||e[32]!==v?(F={closeDrawer:x,drawerDepth:s,drawerSlug:h,isDrawerOpen:m,openDrawer:A,toggleDrawer:v},e[27]=x,e[28]=h,e[29]=s,e[30]=m,e[31]=A,e[32]=v,e[33]=F):F=e[33],I=F;let P=I,k;return e[34]!==E||e[35]!==P||e[36]!==w?(k=[E,w,P],e[34]=E,e[35]=P,e[36]=w,e[37]=k):k=e[37],k};import{c as EF}from"react/compiler-runtime";import{jsx as _F}from"react/jsx-runtime";import{createContext as RF,useContext as DF,useEffect as FF,useReducer as PF,useRef as TF}from"react";function Ux(t,e){switch(e.type){case"ADD_LOADED":{let o={...t};typeof o[e.relationTo]!="object"&&(o[e.relationTo]={});let n=[...e.idsToLoad];return Array.isArray(e.docs)&&e.docs.forEach(r=>{n.splice(n.indexOf(r.id),1),o[e.relationTo][r.id]=r}),n.forEach(r=>{o[e.relationTo][r]=!1}),o}case"REQUEST":{let o={...t};return e.docs.forEach(({relationTo:n,value:r})=>{typeof o[n]!="object"&&(o[n]={}),o[n][r]=null}),o}default:return t}}var Zx=RF({}),hl=t=>{let e=EF(15),{children:o}=t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={},e[0]=n):n=e[0];let[r,s]=PF(Ux,n),i=So(r,100),{config:l}=Y(),{routes:a,serverURL:c}=l,{api:u}=a,{i18n:m}=L(),{code:f}=Ne(),d=TF(f),h;e[1]!==u||e[2]!==i||e[3]!==m||e[4]!==f||e[5]!==c?(h=y=>{let A=y===void 0?!1:y;Object.entries(i).forEach(async S=>{let[_,E]=S,R=[];if(Object.entries(E).forEach(D=>{let[w,I]=D;(I===null||A)&&R.push(w)}),R.length>0){let D=`${c}${u}/${_}`,w=new URLSearchParams;if(w.append("depth","0"),w.append("limit","250"),f&&w.append("locale",f),R&&R.length>0){let P=R.map(NF);w.append("where[id][in]",P.join(","))}let I=`?${w.toString()}`,F=await fetch(`${D}${I}`,{credentials:"include",headers:{"Accept-Language":m.language}});if(F.ok){let P=await F.json();P.docs&&s({type:"ADD_LOADED",docs:P.docs,idsToLoad:R,relationTo:_})}else s({type:"ADD_LOADED",docs:[],idsToLoad:R,relationTo:_})}})},e[1]=u,e[2]=i,e[3]=m,e[4]=f,e[5]=c,e[6]=h):h=e[6];let p=h,g,b;e[7]!==p||e[8]!==f?(g=()=>{p(f&&d.current!==f),d.current=f},b=[f,p],e[7]=p,e[8]=f,e[9]=g,e[10]=b):(g=e[9],b=e[10]),FF(g,b);let v;e[11]===Symbol.for("react.memo_cache_sentinel")?(v=y=>{s({type:"REQUEST",docs:y})},e[11]=v):v=e[11];let C=v,x;return e[12]!==o||e[13]!==r?(x=_F(Zx.Provider,{value:{documents:r,getRelationships:C},children:o}),e[12]=o,e[13]=r,e[14]=x):x=e[14],x},Up=()=>DF(Zx);function NF(t){return String(t)}import{c as c6}from"react/compiler-runtime";import{jsx as pd,jsxs as u6}from"react/jsx-runtime";import"react";import{c as e6}from"react/compiler-runtime";import{jsx as gl,jsxs as t6}from"react/jsx-runtime";import{getTranslation as o6}from"@payloadcms/translations";import pC from"next/link.js";import{fieldAffectsData as r6,fieldIsID as n6}from"payload/shared";import"react";import{jsx as Jx}from"react/jsx-runtime";import"react";var id=({cellData:t,nowrap:e})=>{let o=t?.length>100?`${t.substring(0,100)}\u2026`:t;return Jx("code",{className:"code-cell",style:e?{whiteSpace:"nowrap"}:{},children:Jx("span",{children:o})})};import{c as kF}from"react/compiler-runtime";import{jsx as LF}from"react/jsx-runtime";import{getTranslation as Qx}from"@payloadcms/translations";import"react";var qx=t=>{let e=kF(2),{cellData:o,field:n}=t,{labels:r}=n,{i18n:s}=L(),i=o??[],l=i.length===1?`${i.length} ${Qx(r?.singular||s.t("general:rows"),s)}`:`${i.length} ${Qx(r?.plural||s.t("general:rows"),s)}`,a;return e[0]!==l?(a=LF("span",{children:l}),e[0]=l,e[1]=a):a=e[1],a};import{c as OF}from"react/compiler-runtime";import{jsx as jF}from"react/jsx-runtime";import{getTranslation as ad}from"@payloadcms/translations";import"react";var Kx=t=>{let e=OF(2),{cellData:o,field:n}=t,{blocks:r,labels:s}=n,{i18n:i}=L(),l=Array.isArray(o)?o.map(BF):[],a=r?.map(f=>({slug:f.slug,label:ad(f.labels.singular,i)})),c=`0 ${ad(s?.plural,i)}`,u=f=>f.map(d=>a.filter(p=>p.slug===d)?.[0]?.label).join(", ");if(l.length>5){let f=l.length-5;c=`${l.length} ${ad(s?.plural,i)} - ${i.t("fields:itemsAndMore",{count:f,items:u(l.slice(0,5))})}`}else l.length>0&&(c=`${l.length} ${ad(l.length===1?s?.singular:s?.plural,i)} - ${u(l)}`);let m;return e[0]!==c?(m=jF("span",{children:c}),e[0]=c,e[1]=m):m=e[1],m};function BF(t){let{blockType:e}=t;return e}import{c as $F}from"react/compiler-runtime";import{jsx as eC}from"react/jsx-runtime";import"react";var tC=t=>{let e=$F(3),{cellData:o}=t,{t:n}=L(),r=`general:${o}`,s;return e[0]!==n||e[1]!==r?(s=eC("code",{className:"bool-cell",children:eC("span",{children:n(r).toLowerCase()})}),e[0]=n,e[1]=r,e[2]=s):s=e[2],s};import{c as MF}from"react/compiler-runtime";import{jsx as VF}from"react/jsx-runtime";import"react";var oC=t=>{let e=MF(8),{cellData:o,field:n}=t,{admin:r}=n,s;e[0]!==r?(s=r===void 0?{}:r,e[0]=r,e[1]=s):s=e[1];let{date:i}=s,{config:l}=Y(),{admin:a}=l,{dateFormat:c}=a,u=i?.displayFormat||c,{i18n:m}=L(),f;e[2]!==o||e[3]!==u||e[4]!==m?(f=o&&ms({date:o,i18n:m,pattern:u}),e[2]=o,e[3]=u,e[4]=m,e[5]=f):f=e[5];let d;return e[6]!==f?(d=VF("span",{children:f}),e[6]=f,e[7]=d):d=e[7],d};import{jsx as iC,jsxs as WF}from"react/jsx-runtime";import"react";import{c as rC}from"react/compiler-runtime";import{jsx as vi,jsxs as nC}from"react/jsx-runtime";import cd from"react";import{jsx as Zp,jsxs as GF}from"react/jsx-runtime";import"react";var ld=()=>GF("svg",{height:"150",viewBox:"0 0 150 150",width:"150",xmlns:"http://www.w3.org/2000/svg",children:[Zp("rect",{fill:"#333333",height:"150",transform:"translate(0 0.5)",width:"150"}),Zp("path",{d:"M82.8876 50.5H55.5555V100.5H94.4444V61.9818H82.8876V50.5Z",fill:"white"}),Zp("path",{d:"M82.8876 61.9818H94.4444L82.8876 50.5V61.9818Z",fill:"#9A9A9A"})]});var ud="thumbnail",xr=t=>{let e=rC(19),{className:o,doc:n,fileSrc:r,imageCacheTag:s,size:i}=t,l=o===void 0?"":o,a;e[0]!==n?(a=n===void 0?{}:n,e[0]=n,e[1]=a):a=e[1];let{filename:c}=a,[u,m]=cd.useState(void 0),f=`${ud}--size-${i||"medium"}`,d;e[2]!==l||e[3]!==f?(d=[ud,f,l],e[2]=l,e[3]=f,e[4]=d):d=e[4];let h=d.join(" "),p,g;e[5]!==r?(p=()=>{if(!r){m(!1);return}let v=new Image;v.src=r,v.onload=()=>{m(!0)},v.onerror=()=>{m(!1)}},g=[r],e[5]=r,e[6]=p,e[7]=g):(p=e[6],g=e[7]),cd.useEffect(p,g);let b;if(e[8]!==h||e[9]!==u||e[10]!==r||e[11]!==c||e[12]!==s){let v;e[14]!==u||e[15]!==r||e[16]!==c||e[17]!==s?(v=u&&vi("img",{alt:c,src:`${r}${s?`?${s}`:""}`}),e[14]=u,e[15]=r,e[16]=c,e[17]=s,e[18]=v):v=e[18],b=nC("div",{className:h,children:[u===void 0&&vi(so,{height:"100%"}),v,u===!1&&vi(ld,{})]}),e[8]=h,e[9]=u,e[10]=r,e[11]=c,e[12]=s,e[13]=b}else b=e[13];return b};function sC(t){let e=rC(19),{alt:o,className:n,filename:r,fileSrc:s,imageCacheTag:i,size:l}=t,a=n===void 0?"":n,[c,u]=cd.useState(void 0),m=`${ud}--size-${l||"medium"}`,f;e[0]!==a||e[1]!==m?(f=[ud,m,a],e[0]=a,e[1]=m,e[2]=f):f=e[2];let d=f.join(" "),h,p;e[3]!==s?(h=()=>{if(!s){u(!1);return}let b=new Image;b.src=s,b.onload=()=>{u(!0)},b.onerror=()=>{u(!1)}},p=[s],e[3]=s,e[4]=h,e[5]=p):(h=e[4],p=e[5]),cd.useEffect(h,p);let g;if(e[6]!==o||e[7]!==d||e[8]!==c||e[9]!==s||e[10]!==r||e[11]!==i){let b;e[13]!==o||e[14]!==c||e[15]!==s||e[16]!==r||e[17]!==i?(b=c&&vi("img",{alt:o||r,src:`${s}${i?`?${i}`:""}`}),e[13]=o,e[14]=c,e[15]=s,e[16]=r,e[17]=i,e[18]=b):b=e[18],g=nC("div",{className:d,children:[c===void 0&&vi(so,{height:"100%"}),b,c===!1&&vi(ld,{})]}),e[6]=o,e[7]=d,e[8]=c,e[9]=s,e[10]=r,e[11]=i,e[12]=g}else g=e[12];return g}var Jp="file",dd=({cellData:t,collectionConfig:e,rowData:o})=>WF("div",{className:Jp,children:[iC(xr,{className:`${Jp}__thumbnail`,collectionSlug:e?.slug,doc:{...o,filename:t},fileSrc:o?.thumbnailURL||o?.url,size:"small",uploadConfig:e?.upload}),iC("span",{className:`${Jp}__filename`,children:String(t)})]});import{jsx as aC}from"react/jsx-runtime";import"react";var lC=({cellData:t})=>{let e=t?.length>100?`${t.substring(0,100)}\u2026`:t;return aC("code",{className:"json-cell",children:aC("span",{children:JSON.stringify(e)})})};import{c as HF}from"react/compiler-runtime";import{jsx as zF,jsxs as uC}from"react/jsx-runtime";import{getTranslation as XF}from"@payloadcms/translations";import YF,{useEffect as dC,useState as mC}from"react";var cC=!!(typeof window<"u"&&window.document&&window.document.createElement);var UF="relationship-cell",md=3,fd=t=>{let e=HF(40),{cellData:o,customCellProps:n,field:r,field:s}=t,{label:i}=s,l="relationTo"in r&&r.relationTo||"collection"in r&&r.collection,a;a="collection"in r?o?.docs:o;let c=a,{config:u,getEntityConfig:m}=Y(),{collections:f,routes:d}=u,[h,p]=Gr(),g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=[],e[0]=g):g=e[0];let[b,v]=mC(g),{documents:C,getRelationships:x}=Up(),[y,A]=mC(!1),{i18n:S,t:_}=L(),E=cC?p?.boundingClientRect?.top<window.innerHeight:!1,R;e[1]!==c||e[2]!==x||e[3]!==y||e[4]!==E||e[5]!==l?(R=()=>{if((c||typeof c=="number")&&E&&!y){let P=[],k=Array.isArray(c)?c:[c];k.slice(0,k.length<md?k.length:md).forEach(N=>{typeof N=="object"&&"relationTo"in N&&"value"in N&&P.push(N),(typeof N=="number"||typeof N=="string")&&typeof l=="string"&&P.push({relationTo:l,value:N})}),x(P),A(!0),v(P)}},e[1]=c,e[2]=x,e[3]=y,e[4]=E,e[5]=l,e[6]=R):R=e[6];let D;e[7]!==c||e[8]!==f||e[9]!==x||e[10]!==y||e[11]!==E||e[12]!==l||e[13]!==d.api?(D=[c,l,f,E,d.api,y,x],e[7]=c,e[8]=f,e[9]=x,e[10]=y,e[11]=E,e[12]=l,e[13]=d.api,e[14]=D):D=e[14],dC(R,D);let w;e[15]!==y?(w=()=>{y&&A(!1)},e[15]=y,e[16]=w):w=e[16];let I;e[17]!==c?(I=[c],e[17]=c,e[18]=I):I=e[18],dC(w,I);let F;if(e[19]!==c||e[20]!==u.admin.dateFormat||e[21]!==n||e[22]!==C||e[23]!==r||e[24]!==m||e[25]!==S||e[26]!==h||e[27]!==i||e[28]!==_||e[29]!==b){let P;e[31]!==u.admin.dateFormat||e[32]!==n||e[33]!==C||e[34]!==r||e[35]!==m||e[36]!==S||e[37]!==_||e[38]!==b.length?(P=(k,N)=>{let{relationTo:j,value:T}=k,O=C[j][T],M=m({collectionSlug:j}),B=Jo({collectionConfig:M,data:O||null,dateFormat:u.admin.dateFormat,fallback:`${_("general:untitled")} - ID: ${T}`,i18n:S}),$=null;if(r.type==="upload"){let W=!!M.upload.displayPreview;(r.displayPreview||W&&r.displayPreview!==!1)&&O&&($=zF(dd,{cellData:B,collectionConfig:M,customCellProps:n,field:r,rowData:O}))}return uC(YF.Fragment,{children:[O===!1&&`${_("general:untitled")} - ID: ${T}`,O===null&&`${_("general:loading")}...`,O?$||B:null,b.length>N+1&&", "]},N)},e[31]=u.admin.dateFormat,e[32]=n,e[33]=C,e[34]=r,e[35]=m,e[36]=S,e[37]=_,e[38]=b.length,e[39]=P):P=e[39],F=uC("div",{className:UF,ref:h,children:[b.map(P),Array.isArray(c)&&c.length>md&&_("fields:itemsAndMore",{count:c.length-md,items:""}),b.length===0&&_("general:noLabel",{label:XF(i||"",S)})]}),e[19]=c,e[20]=u.admin.dateFormat,e[21]=n,e[22]=C,e[23]=r,e[24]=m,e[25]=S,e[26]=h,e[27]=i,e[28]=_,e[29]=b,e[30]=F}else F=e[30];return F};import{c as ZF}from"react/compiler-runtime";import{jsx as JF}from"react/jsx-runtime";import{getTranslation as QF}from"@payloadcms/translations";import{optionsAreObjects as qF}from"payload/shared";import"react";var Qp=t=>{let e=ZF(10),{cellData:o,field:n}=t,{options:r}=n,{i18n:s}=L(),i;e[0]!==s||e[1]!==r?(i=u=>u.map(m=>{let f=r.filter(d=>d.value===m)?.[0]?.label;return QF(f,s)}).join(", "),e[0]=s,e[1]=r,e[2]=i):i=e[2];let l=i,a;if(qF(r)){let u;e[3]!==o||e[4]!==l?(u=Array.isArray(o)?l(o):l([o]),e[3]=o,e[4]=l,e[5]=u):u=e[5],a=u}else{let u;e[6]!==o?(u=Array.isArray(o)?o.join(", "):o,e[6]=o,e[7]=u):u=e[7],a=u}let c;return e[8]!==a?(c=JF("span",{children:a}),e[8]=a,e[9]=c):c=e[9],c};import{jsx as KF}from"react/jsx-runtime";import"react";var fC=({cellData:t})=>{let e=t?.length>100?`${t.substring(0,100)}\u2026`:t;return KF("span",{children:e})};var qp={array:qx,blocks:Kx,checkbox:tC,code:id,date:oC,File:dd,join:fd,json:lC,radio:Qp,relationship:fd,select:Qp,textarea:fC,upload:fd};var s6=pC.default||pC,bl=t=>{let e=e6(19),{cellData:o,className:n,collectionConfig:r,field:s,field:i,link:l,onClick:a,rowData:c}=t,{admin:u}=i,{i18n:m}=L(),{config:f}=Y(),{routes:d}=f,{admin:h}=d,p=u&&"className"in u?u.className:void 0,g=n||(s.admin&&"className"in s.admin?s.admin.className:null)||p,b=a,v="span",C,x;if(e[0]!==v||e[1]!==h||e[2]!==o||e[3]!==g||e[4]!==r||e[5]!==s||e[6]!==m||e[7]!==l||e[8]!==b||e[9]!==t||e[10]!==c){x=Symbol.for("react.early_return_sentinel");e:{let y={className:g};if(l&&(y.prefetch=!1,v=s6,y.href=r?.slug?nt({adminRoute:h,path:`/collections/${r?.slug}/${encodeURIComponent(c.id)}`}):""),typeof b=="function"){v="button",y.type="button";let _;e[14]!==o||e[15]!==r?.slug||e[16]!==b||e[17]!==c?(_=()=>{b({cellData:o,collectionSlug:r?.slug,rowData:c})},e[14]=o,e[15]=r?.slug,e[16]=b,e[17]=c,e[18]=_):_=e[18],y.onClick=_}if(n6(s)){x=gl(v,{...y,children:gl(id,{cellData:`ID: ${o}`,collectionConfig:r,field:{...s,type:"code"},nowrap:!0,rowData:c})});break e}let A=typeof o<"u"&&qp[s.type],S=null;if(A)S=gl(A,{cellData:o,rowData:c,...t});else if(!A)if(r?.upload&&r6(s)&&s.name==="filename"&&s.type==="text"){let _=qp.File;S=gl(_,{cellData:o,rowData:c,...t,collectionConfig:r,field:s})}else{x=t6(v,{...y,children:[(o===""||typeof o>"u"||o===null)&&m.t("general:noLabel",{label:o6(("label"in s?s.label:null)||"data",m)}),typeof o=="string"&&o,typeof o=="number"&&o,typeof o=="object"&&o!==null&&JSON.stringify(o)]});break e}C=gl(v,{...y,children:S})}e[0]=v,e[1]=h,e[2]=o,e[3]=g,e[4]=r,e[5]=s,e[6]=m,e[7]=l,e[8]=b,e[9]=t,e[10]=c,e[11]=C,e[12]=x,e[13]=v}else C=e[11],x=e[12],v=e[13];return x!==Symbol.for("react.early_return_sentinel")?x:C};import{c as i6}from"react/compiler-runtime";import{jsx as hC}from"react/jsx-runtime";import gC from"react";var a6="default-cell",bC=gC.createContext(null),Kp=()=>gC.useContext(bC),l6=t=>{let e=i6(9),{clientProps:o,columnIndex:n,isLinkedColumn:r}=t,{drawerSlug:s,onSelect:i}=Fr(),{LinkedCellOverride:l}=dl(),a;if(e[0]!==l||e[1]!==o||e[2]!==n||e[3]!==s||e[4]!==r||e[5]!==i){let c={...o,columnIndex:n};if(r&&s){c.className=`${a6}__first-cell`,c.link=!1;let u;e[7]!==i?(u=m=>{let{collectionSlug:f,rowData:d}=m;typeof i=="function"&&i({collectionSlug:f,docID:d.id})},e[7]=i,e[8]=u):u=e[8],c.onClick=u}a=hC(bC.Provider,{value:c,children:r&&l?l:hC(bl,{...c})}),e[0]=l,e[1]=o,e[2]=n,e[3]=s,e[4]=r,e[5]=i,e[6]=a}else a=e[6];return a};var vC=t=>{let e=c6(11),{onDrawerSave:o}=t,n=Kp(),r=n?.rowData.id,s=n?.collectionConfig.slug,i;e[0]!==r||e[1]!==s?(i={id:r,collectionSlug:s},e[0]=r,e[1]=s,e[2]=i):i=e[2];let[l,a,c]=zt(i),{closeDrawer:u}=c,m;e[3]!==u||e[4]!==o?(m=h=>{u(),typeof o=="function"&&o(h)},e[3]=u,e[4]=o,e[5]=m):m=e[5];let f=m,d;return e[6]!==l||e[7]!==a||e[8]!==n||e[9]!==f?(d=u6("div",{className:"drawer-link",children:[pd(bl,{...n,className:"drawer-link__cell",link:!1,onClick:null}),pd(a,{children:pd(ko,{})}),pd(l,{onSave:f})]}),e[6]=l,e[7]=a,e[8]=n,e[9]=f,e[10]=d):d=e[10],d};import{c as h6}from"react/compiler-runtime";import{jsx as g6}from"react/jsx-runtime";import"react";import{jsx as oh}from"react/jsx-runtime";import"react";import{jsx as xC}from"react/jsx-runtime";import"react";var eh="clickable-arrow",CC=t=>{let{direction:e="right",isDisabled:o=!1,updatePage:n}=t,r=[eh,o&&`${eh}--is-disabled`,e&&`${eh}--${e}`].filter(Boolean).join(" ");return xC("button",{className:r,disabled:o,onClick:o?void 0:n,type:"button",children:xC(Qe,{})})};import{jsx as d6}from"react/jsx-runtime";import"react";var hd="paginator__page",th=({isCurrent:t,isFirstPage:e=!1,isLastPage:o=!1,page:n=1,updatePage:r})=>{let s=[hd,t&&`${hd}--is-current`,e&&`${hd}--is-first-page`,o&&`${hd}--is-last-page`].filter(Boolean).join(" ");return d6("button",{className:s,onClick:()=>r(n),type:"button",children:n})};import{jsx as m6}from"react/jsx-runtime";import"react";var yC=()=>m6("span",{className:"paginator__separator",children:"\u2014"});var f6={ClickableArrow:CC,Page:th,Separator:yC},p6="paginator",vl=t=>{let{hasNextPage:e=!1,hasPrevPage:o=!1,nextPage:n=null,numberOfNeighbors:r=1,onChange:s,page:i,prevPage:l=null,totalPages:a=null}=t;if(!e&&!o)return null;let c=h=>{typeof s=="function"&&s(h)},u=Array.from({length:a},(h,p)=>p+1),m=i-1-r;m<=0&&(m=0);let f=i-1+r+1,d=u.slice(m,f);return i-r-1>=2&&d.unshift({type:"Separator"}),i>r+1&&d.unshift({type:"Page",props:{isFirstPage:!0,page:1,updatePage:c}}),i+r+1<a&&d.push({type:"Separator"}),f<a&&d.push({type:"Page",props:{isLastPage:!0,page:a,updatePage:c}}),d.unshift({type:"ClickableArrow",props:{direction:"right",isDisabled:!e,updatePage:()=>c(n)}}),d.unshift({type:"ClickableArrow",props:{direction:"left",isDisabled:!o,updatePage:()=>c(l)}}),oh("div",{className:p6,children:d.map((h,p)=>{if(typeof h=="number")return oh(th,{isCurrent:i===h,page:h,updatePage:c},p);let g=f6[h.type];return oh(g,{...h.props},p)})})};var wC=()=>{let t=h6(11),{data:e,handlePageChange:o}=br(),n=e.nextPage||2,r;t[0]!==o?(r=a=>{o(a)},t[0]=o,t[1]=r):r=t[1];let s=e.page||1,i=e.prevPage||void 0,l;return t[2]!==e.hasNextPage||t[3]!==e.hasPrevPage||t[4]!==e.limit||t[5]!==e.totalPages||t[6]!==n||t[7]!==r||t[8]!==s||t[9]!==i?(l=g6(vl,{hasNextPage:e.hasNextPage,hasPrevPage:e.hasPrevPage,limit:e.limit,nextPage:n,numberOfNeighbors:1,onChange:r,page:s,prevPage:i,totalPages:e.totalPages}),t[2]=e.hasNextPage,t[3]=e.hasPrevPage,t[4]=e.limit,t[5]=e.totalPages,t[6]=n,t[7]=r,t[8]=s,t[9]=i,t[10]=l):l=t[10],l};var Cr="relationship-table",SC=t=>{let e=b6(58),{AfterInput:o,allowCreate:n,BeforeInput:r,disableTable:s,filterOptions:i,initialData:l,initialDrawerData:a,Label:c,relationTo:u}=t,m=n===void 0?!0:n,f=s===void 0?!1:s,[d,h]=Dn(null),{getEntityConfig:p}=Y(),{permissions:g}=_e(),b;e[0]!==l?(b=()=>{if(l)return{...l,docs:Array.isArray(l.docs)?l.docs.reduce(x6,[]):[]}},e[0]=l,e[1]=b):b=e[1];let[v]=Dn(b),{i18n:C,t:x}=L(),[y,A]=Dn(),[S,_]=Dn(!1),E;e[2]!==p||e[3]!==u?(E=()=>p({collectionSlug:u}),e[2]=p,e[3]=u,e[4]=E):E=e[4];let[R]=Dn(E),[D,w]=Dn(!f),[I,F]=Dn(v),[P,k]=Dn(),{getTableState:N}=Ft(),j;e[5]!==i||e[6]!==N||e[7]!==y||e[8]!==u?(j=async we=>{let Ye={...y||{},where:{...y?.where||{}}};i&&(Ye.where=ul(Ye.where,i));let{data:ie,state:Pe,Table:le}=await N({collectionSlug:u,docs:we,enableRowSelections:!1,query:Ye,renderRowTypes:!0,tableAppearance:"condensed"});F(ie),h(le),k(Pe),w(!1)},e[5]=i,e[6]=N,e[7]=y,e[8]=u,e[9]=j):j=e[9];let T=j,O;e[10]!==d||e[11]!==f||e[12]!==y||e[13]!==T?(O=()=>{!f&&(!d||y)&&T()},e[10]=d,e[11]=f,e[12]=y,e[13]=T,e[14]=O):O=e[14];let M;e[15]!==f||e[16]!==y?(M=[y,f],e[15]=f,e[16]=y,e[17]=M):M=e[17];let B;e[18]!==d||e[19]!==T?(B=[d,T],e[18]=d,e[19]=T,e[20]=B):B=e[20],Ss(O,M,B);let $;e[21]!==u?($={collectionSlug:u},e[21]=u,e[22]=$):$=e[22];let[W,H,X]=zt($),{closeDrawer:G,openDrawer:z}=X,Z;e[23]!==I.docs||e[24]!==T?(Z=we=>{let Ye=I?.docs?.findIndex(Pe=>Pe.id===we.doc.id),ie;if(Ye!==-1){let Pe=[...I.docs];Pe[Ye]=we.doc,ie=Pe}else ie=[we.doc,...I.docs];T(ie)},e[23]=I.docs,e[24]=T,e[25]=Z):Z=e[25];let V=Z,re;e[26]!==G||e[27]!==V?(re=we=>{G(),V(we)},e[26]=G,e[27]=V,e[28]=re):re=e[28];let ee=re,te=`${u}-list`,Q=m!==!1&&g?.collections?.[u]?.create,xe;e[29]!==H||e[30]!==Q||e[31]!==C?(xe=Q&&Ao(H,{className:`${Cr}__add-new`,children:C.t("fields:addNew")}),e[29]=H,e[30]=Q,e[31]=C,e[32]=xe):xe=e[32];let he=`${Cr}__toggle-columns ${S?`${Cr}__buttons-active`:""}`,Ge=S?"up":"down",de;if(e[33]!==o||e[34]!==r||e[35]!==W||e[36]!==c||e[37]!==d||e[38]!==Q||e[39]!==R||e[40]!==P||e[41]!==I||e[42]!==C||e[43]!==a||e[44]!==D||e[45]!==ee||e[46]!==V||e[47]!==S||e[48]!==z||e[49]!==te||e[50]!==u||e[51]!==x||e[52]!==xe||e[53]!==he||e[54]!==Ge){let we;e[56]!==S?(we=()=>_(!S),e[56]=S,e[57]=we):we=e[57],de=xi("div",{className:Cr,children:[xi("div",{className:`${Cr}__header`,children:[c,xi("div",{className:`${Cr}__actions`,children:[xe,Ao(It,{"aria-controls":`${Cr}-columns`,"aria-expanded":S,className:he,icon:Ao(Qe,{direction:Ge}),onClick:we,pillStyle:"light",children:x("general:columns")})]})]}),r,D?Ao("p",{children:x("general:loading")}):xi(v6,{children:[I.docs&&I.docs.length===0&&xi("div",{className:`${Cr}__no-results`,children:[Ao("p",{children:C.t("general:noResults",{label:IC(R?.labels?.plural,C)})}),Q&&Ao(U,{onClick:z,children:C.t("general:createNewLabel",{label:IC(R?.labels?.singular,C)})})]}),I.docs&&I.docs.length>0&&Ao(hl,{children:Ao(Mp,{collectionSlug:u,data:I,defaultLimit:R?.admin?.pagination?.defaultLimit,modifySearchParams:!1,onQueryChange:A,preferenceKey:te,children:xi(td,{collectionSlug:u,columnState:P,docs:I.docs,LinkedCellOverride:Ao(vC,{onDrawerSave:V}),preferenceKey:te,renderRowTypes:!0,setTable:h,sortColumnProps:{appearance:"condensed"},tableAppearance:"condensed",children:[Ao(Ko,{className:`${Cr}__columns`,height:S?"auto":0,id:`${Cr}-columns`,children:Ao("div",{className:`${Cr}__columns-inner`,children:Ao(od,{collectionSlug:R.slug})})}),d,Ao(wC,{})]})})})]}),o,Ao(W,{initialData:a,onSave:ee})]}),e[33]=o,e[34]=r,e[35]=W,e[36]=c,e[37]=d,e[38]=Q,e[39]=R,e[40]=P,e[41]=I,e[42]=C,e[43]=a,e[44]=D,e[45]=ee,e[46]=V,e[47]=S,e[48]=z,e[49]=te,e[50]=u,e[51]=x,e[52]=xe,e[53]=he,e[54]=Ge,e[55]=de}else de=e[55];return de};function x6(t,e){return typeof e=="string"?[...t,{id:e}]:[...t,e]}var w6=t=>{let{field:e,field:{admin:{allowCreate:o,description:n},collection:r,label:s,localized:i,on:l,required:a},path:c}=t,{id:u}=Fe(),{customComponents:{AfterInput:m,BeforeInput:f,Description:d,Label:h}={},value:p}=De({path:c}),g=y6(()=>{if(!u)return null;let b={[l]:{equals:u}};return e.where?{and:[b,e.where]}:b},[u,l,e.where]);return C6("div",{className:[ve,"join"].filter(Boolean).join(" "),id:`field-${c?.replace(/\./g,"__")}`,children:[xl(SC,{AfterInput:m,allowCreate:typeof u<"u"&&o,BeforeInput:f,disableTable:g===null,field:e,filterOptions:g,initialData:u&&p?p:{docs:[]},initialDrawerData:{[l]:u},Label:xl("h4",{style:{margin:0},children:h||xl(Re,{label:s,localized:i,path:c,required:a})}),relationTo:r}),xl(q,{CustomComponent:d,Fallback:xl(Me,{description:n,path:c})})]})},Cl=Oe(w6);import{jsx as Rs,jsxs as AC}from"react/jsx-runtime";import{useCallback as rh,useEffect as I6,useMemo as S6,useState as nh}from"react";var A6="json-field",E6=t=>{let{field:e,field:{admin:{className:o,description:n,editorOptions:r,maxHeight:s}={},jsonSchema:i,label:l,localized:a,required:c},path:u,readOnly:m,validate:f}=t,[d,h]=nh(),[p,g]=nh(),[b,v]=nh(!1),C=rh((k,N)=>{if(typeof f=="function")return f(k,{...N,jsonError:p,required:c})},[f,c,p]),{customComponents:{AfterInput:x,BeforeInput:y,Description:A,Error:S,Label:_}={},initialValue:E,setValue:R,showError:D,value:w}=De({path:u,validate:C}),I=rh((k,N)=>{if(!i)return;let j=N.languages.json.jsonDefaults.diagnosticsOptions.schemas||[],T=N.Uri.parse(i.uri),O=N.editor.createModel(JSON.stringify(w,null,2),"json",T);N.languages.json.jsonDefaults.setDiagnosticsOptions({enableSchemaRequest:!0,schemas:[...j,i],validate:!0}),k.setModel(O)},[i,w]),F=rh(k=>{if(!m){h(k);try{R(k?JSON.parse(k):null),g(void 0)}catch(N){R(k||null),g(N)}}},[m,R,h]);I6(()=>{b||w===void 0||(h(w||E?JSON.stringify(w||E,null,2):""),v(!0))},[E,w,b]);let P=S6(()=>ot(e),[e]);return AC("div",{className:[ve,A6,o,D&&"error",m&&"read-only"].filter(Boolean).join(" "),style:P,children:[Rs(q,{CustomComponent:_,Fallback:Rs(Re,{label:l,localized:a,path:u,required:c})}),AC("div",{className:`${ve}__wrap`,children:[Rs(q,{CustomComponent:S,Fallback:Rs(Xe,{message:p,path:u,showError:D})}),y,Rs(tl,{defaultLanguage:"json",maxHeight:s,onChange:F,onMount:I,options:r,readOnly:m,value:d}),x]}),Rs(q,{CustomComponent:A,Fallback:Rs(Me,{description:n,path:u})})]})},yl=Oe(E6);import{jsx as Kr,jsxs as pw}from"react/jsx-runtime";import{getTranslation as CT}from"@payloadcms/translations";import{isNumber as yT}from"payload/shared";import{useCallback as Xh,useEffect as wT,useMemo as IT,useState as ST}from"react";import{jsx as Ns}from"react/jsx-runtime";import{getTranslation as dw}from"@payloadcms/translations";import mw,{useEffect as gT,useId as bT}from"react";function yr(t){"@babel/helpers - typeof";return yr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yr(t)}function EC(t,e){if(yr(t)!="object"||!t)return t;var o=t[Symbol.toPrimitive];if(o!==void 0){var n=o.call(t,e||"default");if(yr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function gd(t){var e=EC(t,"string");return yr(e)=="symbol"?e:e+""}function Ds(t,e,o){return(e=gd(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function _C(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),o.push.apply(o,n)}return o}function ye(t){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?_C(Object(o),!0).forEach(function(n){Ds(t,n,o[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):_C(Object(o)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))})}return t}function RC(t){if(Array.isArray(t))return t}function DC(t,e){var o=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(o!=null){var n,r,s,i,l=[],a=!0,c=!1;try{if(s=(o=o.call(t)).next,e===0){if(Object(o)!==o)return;a=!1}else for(;!(a=(n=s.call(o)).done)&&(l.push(n.value),l.length!==e);a=!0);}catch(u){c=!0,r=u}finally{try{if(!a&&o.return!=null&&(i=o.return(),Object(i)!==i))return}finally{if(c)throw r}}return l}}function wl(t,e){(e==null||e>t.length)&&(e=t.length);for(var o=0,n=Array(e);o<e;o++)n[o]=t[o];return n}function bd(t,e){if(t){if(typeof t=="string")return wl(t,e);var o={}.toString.call(t).slice(8,-1);return o==="Object"&&t.constructor&&(o=t.constructor.name),o==="Map"||o==="Set"?Array.from(t):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?wl(t,e):void 0}}function FC(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
49
49
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wr(t,e){return RC(t)||DC(t,e)||bd(t,e)||FC()}function Eo(t,e){if(t==null)return{};var o,n,r=ii(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)o=s[n],e.includes(o)||{}.propertyIsEnumerable.call(t,o)&&(r[o]=t[o])}return r}import{useState as sh,useCallback as vd}from"react";var _6=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function xd(t){var e=t.defaultInputValue,o=e===void 0?"":e,n=t.defaultMenuIsOpen,r=n===void 0?!1:n,s=t.defaultValue,i=s===void 0?null:s,l=t.inputValue,a=t.menuIsOpen,c=t.onChange,u=t.onInputChange,m=t.onMenuClose,f=t.onMenuOpen,d=t.value,h=Eo(t,_6),p=sh(l!==void 0?l:o),g=wr(p,2),b=g[0],v=g[1],C=sh(a!==void 0?a:r),x=wr(C,2),y=x[0],A=x[1],S=sh(d!==void 0?d:i),_=wr(S,2),E=_[0],R=_[1],D=vd(function(j,T){typeof c=="function"&&c(j,T),R(j)},[c]),w=vd(function(j,T){var O;typeof u=="function"&&(O=u(j,T)),v(O!==void 0?O:j)},[u]),I=vd(function(){typeof f=="function"&&f(),A(!0)},[f]),F=vd(function(){typeof m=="function"&&m(),A(!1)},[m]),P=l!==void 0?l:b,k=a!==void 0?a:y,N=d!==void 0?d:E;return ye(ye({},h),{},{inputValue:P,menuIsOpen:k,onChange:D,onInputChange:w,onMenuClose:F,onMenuOpen:I,value:N})}import*as z2 from"react";import{forwardRef as q9,useMemo as _le}from"react";function PC(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function TC(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,gd(n.key),n)}}function NC(t,e,o){return e&&TC(t.prototype,e),o&&TC(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}function kC(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ai(t,e)}function Il(t){return Il=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Il(t)}function ih(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ih=function(){return!!t})()}function LC(t,e){if(e&&(yr(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return iv(t)}function OC(t){var e=ih();return function(){var o,n=Il(t);if(e){var r=Il(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return LC(this,o)}}function jC(t){if(Array.isArray(t))return wl(t)}function BC(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function $C(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
50
50
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fn(t){return jC(t)||BC(t)||bd(t)||$C()}import*as ct from"react";import{useMemo as Tl,Fragment as Dh,useRef as Ni,useCallback as Tn,useEffect as k2,Component as p9}from"react";import*as nr from"react";import{useContext as sP,forwardRef as iP}from"react";var R6=!1;function D6(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function F6(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var MC=function(){function t(o){var n=this;this._insertTag=function(r){var s;n.tags.length===0?n.insertionPoint?s=n.insertionPoint.nextSibling:n.prepend?s=n.container.firstChild:s=n.before:s=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(r,s),n.tags.push(r)},this.isSpeedy=o.speedy===void 0?!R6:o.speedy,this.tags=[],this.ctr=0,this.nonce=o.nonce,this.key=o.key,this.container=o.container,this.prepend=o.prepend,this.insertionPoint=o.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(n){n.forEach(this._insertTag)},e.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(F6(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var s=D6(r);try{s.insertRule(n,s.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(n));this.ctr++},e.flush=function(){this.tags.forEach(function(n){var r;return(r=n.parentNode)==null?void 0:r.removeChild(n)}),this.tags=[],this.ctr=0},t}();var oo="-ms-",Sl="-moz-",rt="-webkit-",Cd="comm",Ci="rule",yi="decl";var VC="@import";var yd="@keyframes";var GC="@layer";var WC=Math.abs,Fs=String.fromCharCode,HC=Object.assign;function zC(t,e){return Pt(t,0)^45?(((e<<2^Pt(t,0))<<2^Pt(t,1))<<2^Pt(t,2))<<2^Pt(t,3):0}function wd(t){return t.trim()}function ah(t,e){return(t=e.exec(t))?t[0]:t}function et(t,e,o){return t.replace(e,o)}function Al(t,e){return t.indexOf(e)}function Pt(t,e){return t.charCodeAt(e)|0}function Pn(t,e,o){return t.slice(e,o)}function go(t){return t.length}function wi(t){return t.length}function Ii(t,e){return e.push(t),t}function lh(t,e){return t.map(e).join("")}var Id=1,Si=1,XC=0,bo=0,Bt=0,Ei="";function El(t,e,o,n,r,s,i){return{value:t,root:e,parent:o,type:n,props:r,children:s,line:Id,column:Si,length:i,return:""}}function _i(t,e){return HC(El("",null,null,"",null,null,0),t,{length:-t.length},e)}function YC(){return Bt}function UC(){return Bt=bo>0?Pt(Ei,--bo):0,Si--,Bt===10&&(Si=1,Id--),Bt}function vo(){return Bt=bo<XC?Pt(Ei,bo++):0,Si++,Bt===10&&(Si=1,Id++),Bt}function rr(){return Pt(Ei,bo)}function _l(){return bo}function Ri(t,e){return Pn(Ei,t,e)}function Ai(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Sd(t){return Id=Si=1,XC=go(Ei=t),bo=0,[]}function Ad(t){return Ei="",t}function Di(t){return wd(Ri(bo-1,ch(t===91?t+2:t===40?t+1:t)))}function ZC(t){for(;(Bt=rr())&&Bt<33;)vo();return Ai(t)>2||Ai(Bt)>3?"":" "}function JC(t,e){for(;--e&&vo()&&!(Bt<48||Bt>102||Bt>57&&Bt<65||Bt>70&&Bt<97););return Ri(t,_l()+(e<6&&rr()==32&&vo()==32))}function ch(t){for(;vo();)switch(Bt){case t:return bo;case 34:case 39:t!==34&&t!==39&&ch(Bt);break;case 40:t===41&&ch(t);break;case 92:vo();break}return bo}function QC(t,e){for(;vo()&&t+Bt!==57;)if(t+Bt===84&&rr()===47)break;return"/*"+Ri(e,bo-1)+"*"+Fs(t===47?t:vo())}function qC(t){for(;!Ai(rr());)vo();return Ri(t,bo)}function ty(t){return Ad(Ed("",null,null,null,[""],t=Sd(t),0,[0],t))}function Ed(t,e,o,n,r,s,i,l,a){for(var c=0,u=0,m=i,f=0,d=0,h=0,p=1,g=1,b=1,v=0,C="",x=r,y=s,A=n,S=C;g;)switch(h=v,v=vo()){case 40:if(h!=108&&Pt(S,m-1)==58){Al(S+=et(Di(v),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:S+=Di(v);break;case 9:case 10:case 13:case 32:S+=ZC(h);break;case 92:S+=JC(_l()-1,7);continue;case 47:switch(rr()){case 42:case 47:Ii(P6(QC(vo(),_l()),e,o),a);break;default:S+="/"}break;case 123*p:l[c++]=go(S)*b;case 125*p:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:b==-1&&(S=et(S,/\f/g,"")),d>0&&go(S)-m&&Ii(d>32?ey(S+";",n,o,m-1):ey(et(S," ","")+";",n,o,m-2),a);break;case 59:S+=";";default:if(Ii(A=KC(S,e,o,c,u,r,l,C,x=[],y=[],m),s),v===123)if(u===0)Ed(S,e,A,A,x,s,m,l,y);else switch(f===99&&Pt(S,3)===110?100:f){case 100:case 108:case 109:case 115:Ed(t,A,A,n&&Ii(KC(t,A,A,0,0,r,l,C,r,x=[],m),y),r,y,m,l,n?x:y);break;default:Ed(S,A,A,A,[""],y,0,l,y)}}c=u=d=0,p=b=1,C=S="",m=i;break;case 58:m=1+go(S),d=h;default:if(p<1){if(v==123)--p;else if(v==125&&p++==0&&UC()==125)continue}switch(S+=Fs(v),v*p){case 38:b=u>0?1:(S+="\f",-1);break;case 44:l[c++]=(go(S)-1)*b,b=1;break;case 64:rr()===45&&(S+=Di(vo())),f=rr(),u=m=go(C=S+=qC(_l())),v++;break;case 45:h===45&&go(S)==2&&(p=0)}}return s}function KC(t,e,o,n,r,s,i,l,a,c,u){for(var m=r-1,f=r===0?s:[""],d=wi(f),h=0,p=0,g=0;h<n;++h)for(var b=0,v=Pn(t,m+1,m=WC(p=i[h])),C=t;b<d;++b)(C=wd(p>0?f[b]+" "+v:et(v,/&\f/g,f[b])))&&(a[g++]=C);return El(t,e,o,r===0?Ci:l,a,c,u)}function P6(t,e,o){return El(t,e,o,Cd,Fs(YC()),Pn(t,2,-2),0)}function ey(t,e,o,n){return El(t,e,o,yi,Pn(t,0,n),Pn(t,n+1,-1),n)}function Ps(t,e){for(var o="",n=wi(t),r=0;r<n;r++)o+=e(t[r],r,t,e)||"";return o}function oy(t,e,o,n){switch(t.type){case GC:if(t.children.length)break;case VC:case yi:return t.return=t.return||t.value;case Cd:return"";case yd:return t.return=t.value+"{"+Ps(t.children,n)+"}";case Ci:t.value=t.props.join(",")}return go(o=Ps(t.children,n))?t.return=t.value+"{"+o+"}":""}function ry(t){var e=wi(t);return function(o,n,r,s){for(var i="",l=0;l<e;l++)i+=t[l](o,n,r,s)||"";return i}}function ny(t){return function(e){e.root||(e=e.return)&&t(e)}}function sy(t){var e=Object.create(null);return function(o){return e[o]===void 0&&(e[o]=t(o)),e[o]}}var T6=function(e,o,n){for(var r=0,s=0;r=s,s=rr(),r===38&&s===12&&(o[n]=1),!Ai(s);)vo();return Ri(e,bo)},N6=function(e,o){var n=-1,r=44;do switch(Ai(r)){case 0:r===38&&rr()===12&&(o[n]=1),e[n]+=T6(bo-1,o,n);break;case 2:e[n]+=Di(r);break;case 4:if(r===44){e[++n]=rr()===58?"&\f":"",o[n]=e[n].length;break}default:e[n]+=Fs(r)}while(r=vo());return e},k6=function(e,o){return Ad(N6(Sd(e),o))},iy=new WeakMap,L6=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var o=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(e.props.length===1&&o.charCodeAt(0)!==58&&!iy.get(n))&&!r){iy.set(e,!0);for(var s=[],i=k6(o,s),l=n.props,a=0,c=0;a<i.length;a++)for(var u=0;u<l.length;u++,c++)e.props[c]=s[a]?i[a].replace(/&\f/g,l[u]):l[u]+" "+i[a]}}},O6=function(e){if(e.type==="decl"){var o=e.value;o.charCodeAt(0)===108&&o.charCodeAt(2)===98&&(e.return="",e.value="")}};function ay(t,e){switch(zC(t,e)){case 5103:return rt+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return rt+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return rt+t+Sl+t+oo+t+t;case 6828:case 4268:return rt+t+oo+t+t;case 6165:return rt+t+oo+"flex-"+t+t;case 5187:return rt+t+et(t,/(\w+).+(:[^]+)/,rt+"box-$1$2"+oo+"flex-$1$2")+t;case 5443:return rt+t+oo+"flex-item-"+et(t,/flex-|-self/,"")+t;case 4675:return rt+t+oo+"flex-line-pack"+et(t,/align-content|flex-|-self/,"")+t;case 5548:return rt+t+oo+et(t,"shrink","negative")+t;case 5292:return rt+t+oo+et(t,"basis","preferred-size")+t;case 6060:return rt+"box-"+et(t,"-grow","")+rt+t+oo+et(t,"grow","positive")+t;case 4554:return rt+et(t,/([^-])(transform)/g,"$1"+rt+"$2")+t;case 6187:return et(et(et(t,/(zoom-|grab)/,rt+"$1"),/(image-set)/,rt+"$1"),t,"")+t;case 5495:case 3959:return et(t,/(image-set\([^]*)/,rt+"$1$`$1");case 4968:return et(et(t,/(.+:)(flex-)?(.*)/,rt+"box-pack:$3"+oo+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+rt+t+t;case 4095:case 3583:case 4068:case 2532:return et(t,/(.+)-inline(.+)/,rt+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(go(t)-1-e>6)switch(Pt(t,e+1)){case 109:if(Pt(t,e+4)!==45)break;case 102:return et(t,/(.+:)(.+)-([^]+)/,"$1"+rt+"$2-$3$1"+Sl+(Pt(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Al(t,"stretch")?ay(et(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Pt(t,e+1)!==115)break;case 6444:switch(Pt(t,go(t)-3-(~Al(t,"!important")&&10))){case 107:return et(t,":",":"+rt)+t;case 101:return et(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+rt+(Pt(t,14)===45?"inline-":"")+"box$3$1"+rt+"$2$3$1"+oo+"$2box$3")+t}break;case 5936:switch(Pt(t,e+11)){case 114:return rt+t+oo+et(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return rt+t+oo+et(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return rt+t+oo+et(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return rt+t+oo+t+t}return t}var j6=function(e,o,n,r){if(e.length>-1&&!e.return)switch(e.type){case yi:e.return=ay(e.value,e.length);break;case yd:return Ps([_i(e,{value:et(e.value,"@","@"+rt)})],r);case Ci:if(e.length)return lh(e.props,function(s){switch(ah(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ps([_i(e,{props:[et(s,/:(read-\w+)/,":"+Sl+"$1")]})],r);case"::placeholder":return Ps([_i(e,{props:[et(s,/:(plac\w+)/,":"+rt+"input-$1")]}),_i(e,{props:[et(s,/:(plac\w+)/,":"+Sl+"$1")]}),_i(e,{props:[et(s,/:(plac\w+)/,oo+"input-$1")]})],r)}return""})}},B6=[j6],uh=function(e){var o=e.key;if(o==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(p){var g=p.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(p),p.setAttribute("data-s",""))})}var r=e.stylisPlugins||B6,s={},i,l=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+o+' "]'),function(p){for(var g=p.getAttribute("data-emotion").split(" "),b=1;b<g.length;b++)s[g[b]]=!0;l.push(p)});var a,c=[L6,O6];{var u,m=[oy,ny(function(p){u.insert(p)})],f=ry(c.concat(r,m)),d=function(g){return Ps(ty(g),f)};a=function(g,b,v,C){u=v,d(g?g+"{"+b.styles+"}":b.styles),C&&(h.inserted[b.name]=!0)}}var h={key:o,sheet:new MC({key:o,container:i,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:a};return h.sheet.hydrate(l),h};var Q6=!0;function gh(t,e,o){var n="";return o.split(" ").forEach(function(r){t[r]!==void 0?e.push(t[r]+";"):r&&(n+=r+" ")}),n}var jd=function(e,o,n){var r=e.key+"-"+o.name;(n===!1||Q6===!1)&&e.registered[r]===void 0&&(e.registered[r]=o.styles)},bh=function(e,o,n){jd(e,o,n);var r=e.key+"-"+o.name;if(e.inserted[o.name]===void 0){var s=o;do e.insert(o===s?"."+r:"",s,e.sheet,!0),s=s.next;while(s!==void 0)}};function xy(t){for(var e=0,o,n=0,r=t.length;r>=4;++n,r-=4)o=t.charCodeAt(n)&255|(t.charCodeAt(++n)&255)<<8|(t.charCodeAt(++n)&255)<<16|(t.charCodeAt(++n)&255)<<24,o=(o&65535)*1540483477+((o>>>16)*59797<<16),o^=o>>>24,e=(o&65535)*1540483477+((o>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(r){case 3:e^=(t.charCodeAt(n+2)&255)<<16;case 2:e^=(t.charCodeAt(n+1)&255)<<8;case 1:e^=t.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var Cy={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var q6=!1,K6=/[A-Z]|^ms/g,eP=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Sy=function(e){return e.charCodeAt(1)===45},yy=function(e){return e!=null&&typeof e!="boolean"},vh=sy(function(t){return Sy(t)?t:t.replace(K6,"-$&").toLowerCase()}),wy=function(e,o){switch(e){case"animation":case"animationName":if(typeof o=="string")return o.replace(eP,function(n,r,s){return Pr={name:r,styles:s,next:Pr},r})}return Cy[e]!==1&&!Sy(e)&&typeof o=="number"&&o!==0?o+"px":o},tP="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Rl(t,e,o){if(o==null)return"";var n=o;if(n.__emotion_styles!==void 0)return n;switch(typeof o){case"boolean":return"";case"object":{var r=o;if(r.anim===1)return Pr={name:r.name,styles:r.styles,next:Pr},r.name;var s=o;if(s.styles!==void 0){var i=s.next;if(i!==void 0)for(;i!==void 0;)Pr={name:i.name,styles:i.styles,next:Pr},i=i.next;var l=s.styles+";";return l}return oP(t,e,o)}case"function":{if(t!==void 0){var a=Pr,c=o(t);return Pr=a,Rl(t,e,c)}break}}var u=o;if(e==null)return u;var m=e[u];return m!==void 0?m:u}function oP(t,e,o){var n="";if(Array.isArray(o))for(var r=0;r<o.length;r++)n+=Rl(t,e,o[r])+";";else for(var s in o){var i=o[s];if(typeof i!="object"){var l=i;e!=null&&e[l]!==void 0?n+=s+"{"+e[l]+"}":yy(l)&&(n+=vh(s)+":"+wy(s,l)+";")}else{if(s==="NO_COMPONENT_SELECTOR"&&q6)throw new Error(tP);if(Array.isArray(i)&&typeof i[0]=="string"&&(e==null||e[i[0]]===void 0))for(var a=0;a<i.length;a++)yy(i[a])&&(n+=vh(s)+":"+wy(s,i[a])+";");else{var c=Rl(t,e,i);switch(s){case"animation":case"animationName":{n+=vh(s)+":"+c+";";break}default:n+=s+"{"+c+"}"}}}}return n}var Iy=/label:\s*([^\s;{]+)\s*(;|$)/g,Pr;function Bd(t,e,o){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var n=!0,r="";Pr=void 0;var s=t[0];if(s==null||s.raw===void 0)n=!1,r+=Rl(o,e,s);else{var i=s;r+=i[0]}for(var l=1;l<t.length;l++)if(r+=Rl(o,e,t[l]),n){var a=s;r+=a[l]}Iy.lastIndex=0;for(var c="",u;(u=Iy.exec(r))!==null;)c+="-"+u[1];var m=xy(r)+c;return{name:m,styles:r,next:Pr}}import*as $d from"react";var rP=function(e){return e()},nP=$d.useInsertionEffect?$d.useInsertionEffect:!1,xh=nP||rP;var Ay=!1,Ey=nr.createContext(typeof HTMLElement<"u"?uh({key:"css"}):null),kae=Ey.Provider;var _y=function(e){return iP(function(o,n){var r=sP(Ey);return e(o,r,n)})},Ry=nr.createContext({});var Md={}.hasOwnProperty,Ch="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Dy=function(e,o){var n={};for(var r in o)Md.call(o,r)&&(n[r]=o[r]);return n[Ch]=e,n},aP=function(e){var o=e.cache,n=e.serialized,r=e.isStringTag;return jd(o,n,r),xh(function(){return bh(o,n,r)}),null},lP=_y(function(t,e,o){var n=t.css;typeof n=="string"&&e.registered[n]!==void 0&&(n=e.registered[n]);var r=t[Ch],s=[n],i="";typeof t.className=="string"?i=gh(e.registered,s,t.className):t.className!=null&&(i=t.className+" ");var l=Bd(s,void 0,nr.useContext(Ry));i+=e.key+"-"+l.name;var a={};for(var c in t)Md.call(t,c)&&c!=="css"&&c!==Ch&&!Ay&&(a[c]=t[c]);return a.className=i,o&&(a.ref=o),nr.createElement(nr.Fragment,null,nr.createElement(aP,{cache:e,serialized:l,isStringTag:typeof r=="string"}),nr.createElement(r,a))}),Fy=lP;import*as Fi from"react";var Hae=Ks(vy()),Ie=function(e,o){var n=arguments;if(o==null||!Md.call(o,"css"))return Fi.createElement.apply(void 0,n);var r=n.length,s=new Array(r);s[0]=Fy,s[1]=Dy(e,o);for(var i=2;i<r;i++)s[i]=n[i];return Fi.createElement.apply(null,s)};function Dl(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return Bd(e)}var Py=function(){var e=Dl.apply(void 0,arguments),o="animation-"+e.name;return{name:o,styles:"@keyframes "+o+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};function Ty(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}t4();import{useContext as dP,useRef as Ih,useState as Hd,useMemo as mP,useCallback as yh,createContext as fP}from"react";import{createPortal as pP}from"react-dom";import{useLayoutEffect as cP}from"react";var uP=cP,Vd=uP;var hP=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Fl=function(){};function gP(t,e){return e?e[0]==="-"?t+e:t+"__"+e:t}function ky(t,e){for(var o=arguments.length,n=new Array(o>2?o-2:0),r=2;r<o;r++)n[r-2]=arguments[r];var s=[].concat(n);if(e&&t)for(var i in e)e.hasOwnProperty(i)&&e[i]&&s.push("".concat(gP(t,i)));return s.filter(function(l){return l}).map(function(l){return String(l).trim()}).join(" ")}var Pi=function(e){return wP(e)?e.filter(Boolean):yr(e)==="object"&&e!==null?[e]:[]},Ly=function(e){e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme;var o=Eo(e,hP);return ye({},o)},_t=function(e,o,n){var r=e.cx,s=e.getStyles,i=e.getClassNames,l=e.className;return{css:s(o,e),className:r(n??{},i(o,e),l)}};function Pl(t){return[document.documentElement,document.body,window].indexOf(t)>-1}function bP(t){return Pl(t)?window.innerHeight:t.clientHeight}function Oy(t){return Pl(t)?window.pageYOffset:t.scrollTop}function zd(t,e){if(Pl(t)){window.scrollTo(0,e);return}t.scrollTop=e}function vP(t){var e=getComputedStyle(t),o=e.position==="absolute",n=/(auto|scroll)/;if(e.position==="fixed")return document.documentElement;for(var r=t;r=r.parentElement;)if(e=getComputedStyle(r),!(o&&e.position==="static")&&n.test(e.overflow+e.overflowY+e.overflowX))return r;return document.documentElement}function xP(t,e,o,n){return o*((t=t/n-1)*t*t+1)+e}function Gd(t,e){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Fl,r=Oy(t),s=e-r,i=10,l=0;function a(){l+=i;var c=xP(l,r,s,o);zd(t,c),l<o?window.requestAnimationFrame(a):n(t)}a()}function Sh(t,e){var o=t.getBoundingClientRect(),n=e.getBoundingClientRect(),r=e.offsetHeight/3;n.bottom+r>o.bottom?zd(t,Math.min(e.offsetTop+e.clientHeight-t.offsetHeight+r,t.scrollHeight)):n.top-r<o.top&&zd(t,Math.max(e.offsetTop-r,0))}function CP(t){var e=t.getBoundingClientRect();return{bottom:e.bottom,height:e.height,left:e.left,right:e.right,top:e.top,width:e.width}}function Ah(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function jy(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var By=!1,yP={get passive(){return By=!0}},Wd=typeof window<"u"?window:{};Wd.addEventListener&&Wd.removeEventListener&&(Wd.addEventListener("p",Fl,yP),Wd.removeEventListener("p",Fl,!1));var $y=By;function My(t){return t!=null}function wP(t){return Array.isArray(t)}function Ts(t,e,o){return t?e:o}var Vy=function(e){for(var o=arguments.length,n=new Array(o>1?o-1:0),r=1;r<o;r++)n[r-1]=arguments[r];var s=Object.entries(e).filter(function(i){var l=wr(i,1),a=l[0];return!n.includes(a)});return s.reduce(function(i,l){var a=wr(l,2),c=a[0],u=a[1];return i[c]=u,i},{})},IP=["children","innerProps"],SP=["children","innerProps"];function AP(t){var e=t.maxHeight,o=t.menuEl,n=t.minHeight,r=t.placement,s=t.shouldScroll,i=t.isFixedPosition,l=t.controlHeight,a=vP(o),c={placement:"bottom",maxHeight:e};if(!o||!o.offsetParent)return c;var u=a.getBoundingClientRect(),m=u.height,f=o.getBoundingClientRect(),d=f.bottom,h=f.height,p=f.top,g=o.offsetParent.getBoundingClientRect(),b=g.top,v=i?window.innerHeight:bP(a),C=Oy(a),x=parseInt(getComputedStyle(o).marginBottom,10),y=parseInt(getComputedStyle(o).marginTop,10),A=b-y,S=v-p,_=A+C,E=m-C-p,R=d-v+C+x,D=C+p-y,w=160;switch(r){case"auto":case"bottom":if(S>=h)return{placement:"bottom",maxHeight:e};if(E>=h&&!i)return s&&Gd(a,R,w),{placement:"bottom",maxHeight:e};if(!i&&E>=n||i&&S>=n){s&&Gd(a,R,w);var I=i?S-x:E-x;return{placement:"bottom",maxHeight:I}}if(r==="auto"||i){var F=e,P=i?A:_;return P>=n&&(F=Math.min(P-x-l,e)),{placement:"top",maxHeight:F}}if(r==="bottom")return s&&zd(a,R),{placement:"bottom",maxHeight:e};break;case"top":if(A>=h)return{placement:"top",maxHeight:e};if(_>=h&&!i)return s&&Gd(a,D,w),{placement:"top",maxHeight:e};if(!i&&_>=n||i&&A>=n){var k=e;return(!i&&_>=n||i&&A>=n)&&(k=i?A-y:_-y),s&&Gd(a,D,w),{placement:"top",maxHeight:k}}return{placement:"bottom",maxHeight:e};default:throw new Error('Invalid placement provided "'.concat(r,'".'))}return c}function EP(t){var e={bottom:"top",top:"bottom"};return t?e[t]:"bottom"}var Gy=function(e){return e==="auto"?"bottom":e},Wy=function(e,o){var n,r=e.placement,s=e.theme,i=s.borderRadius,l=s.spacing,a=s.colors;return ye((n={label:"menu"},Ds(n,EP(r),"100%"),Ds(n,"position","absolute"),Ds(n,"width","100%"),Ds(n,"zIndex",1),n),o?{}:{backgroundColor:a.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:l.menuGutter,marginTop:l.menuGutter})},Hy=fP(null),zy=function(e){var o=e.children,n=e.minMenuHeight,r=e.maxMenuHeight,s=e.menuPlacement,i=e.menuPosition,l=e.menuShouldScrollIntoView,a=e.theme,c=dP(Hy)||{},u=c.setPortalPlacement,m=Ih(null),f=Hd(r),d=wr(f,2),h=d[0],p=d[1],g=Hd(null),b=wr(g,2),v=b[0],C=b[1],x=a.spacing.controlHeight;return Vd(function(){var y=m.current;if(y){var A=i==="fixed",S=l&&!A,_=AP({maxHeight:r,menuEl:y,minHeight:n,placement:s,shouldScroll:S,isFixedPosition:A,controlHeight:x});p(_.maxHeight),C(_.placement),u?.(_.placement)}},[r,s,i,l,n,u,x]),o({ref:m,placerProps:ye(ye({},e),{},{placement:v||Gy(s),maxHeight:h})})},_P=function(e){var o=e.children,n=e.innerRef,r=e.innerProps;return Ie("div",Ce({},_t(e,"menu",{menu:!0}),{ref:n},r),o)},RP=_P,Xy=function(e,o){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return ye({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},o?{}:{paddingBottom:r,paddingTop:r})},DP=function(e){var o=e.children,n=e.innerProps,r=e.innerRef,s=e.isMulti;return Ie("div",Ce({},_t(e,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:r},n),o)},Yy=function(e,o){var n=e.theme,r=n.spacing.baseUnit,s=n.colors;return ye({textAlign:"center"},o?{}:{color:s.neutral40,padding:"".concat(r*2,"px ").concat(r*3,"px")})},Uy=Yy,Zy=Yy,FP=function(e){var o=e.children,n=o===void 0?"No options":o,r=e.innerProps,s=Eo(e,IP);return Ie("div",Ce({},_t(ye(ye({},s),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},PP=function(e){var o=e.children,n=o===void 0?"Loading...":o,r=e.innerProps,s=Eo(e,SP);return Ie("div",Ce({},_t(ye(ye({},s),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},Jy=function(e){var o=e.rect,n=e.offset,r=e.position;return{left:o.left,position:r,top:n,width:o.width,zIndex:1}},TP=function(e){var o=e.appendTo,n=e.children,r=e.controlElement,s=e.innerProps,i=e.menuPlacement,l=e.menuPosition,a=Ih(null),c=Ih(null),u=Hd(Gy(i)),m=wr(u,2),f=m[0],d=m[1],h=mP(function(){return{setPortalPlacement:d}},[]),p=Hd(null),g=wr(p,2),b=g[0],v=g[1],C=yh(function(){if(r){var S=CP(r),_=l==="fixed"?0:window.pageYOffset,E=S[f]+_;(E!==b?.offset||S.left!==b?.rect.left||S.width!==b?.rect.width)&&v({offset:E,rect:S})}},[r,l,f,b?.offset,b?.rect.left,b?.rect.width]);Vd(function(){C()},[C]);var x=yh(function(){typeof c.current=="function"&&(c.current(),c.current=null),r&&a.current&&(c.current=ob(r,a.current,C,{elementResize:"ResizeObserver"in window}))},[r,C]);Vd(function(){x()},[x]);var y=yh(function(S){a.current=S,x()},[x]);if(!o&&l!=="fixed"||!b)return null;var A=Ie("div",Ce({ref:y},_t(ye(ye({},e),{},{offset:b.offset,position:l,rect:b.rect}),"menuPortal",{"menu-portal":!0}),s),n);return Ie(Hy.Provider,{value:h},o?pP(A,o):A)},Qy=function(e){var o=e.isDisabled,n=e.isRtl;return{label:"container",direction:n?"rtl":void 0,pointerEvents:o?"none":void 0,position:"relative"}},NP=function(e){var o=e.children,n=e.innerProps,r=e.isDisabled,s=e.isRtl;return Ie("div",Ce({},_t(e,"container",{"--is-disabled":r,"--is-rtl":s}),n),o)},qy=function(e,o){var n=e.theme.spacing,r=e.isMulti,s=e.hasValue,i=e.selectProps.controlShouldRenderValue;return ye({alignItems:"center",display:r&&s&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},o?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(n.baseUnit*2,"px")})},kP=function(e){var o=e.children,n=e.innerProps,r=e.isMulti,s=e.hasValue;return Ie("div",Ce({},_t(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":s}),n),o)},Ky=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},LP=function(e){var o=e.children,n=e.innerProps;return Ie("div",Ce({},_t(e,"indicatorsContainer",{indicators:!0}),n),o)},Ny,OP=["size"],jP=["innerProps","isRtl","size"];var BP={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},e2=function(e){var o=e.size,n=Eo(e,OP);return Ie("svg",Ce({height:o,width:o,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:BP},n))},Eh=function(e){return Ie(e2,Ce({size:20},e),Ie("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},t2=function(e){return Ie(e2,Ce({size:20},e),Ie("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},o2=function(e,o){var n=e.isFocused,r=e.theme,s=r.spacing.baseUnit,i=r.colors;return ye({label:"indicatorContainer",display:"flex",transition:"color 150ms"},o?{}:{color:n?i.neutral60:i.neutral20,padding:s*2,":hover":{color:n?i.neutral80:i.neutral40}})},r2=o2,$P=function(e){var o=e.children,n=e.innerProps;return Ie("div",Ce({},_t(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),o||Ie(t2,null))},n2=o2,MP=function(e){var o=e.children,n=e.innerProps;return Ie("div",Ce({},_t(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),o||Ie(Eh,null))},s2=function(e,o){var n=e.isDisabled,r=e.theme,s=r.spacing.baseUnit,i=r.colors;return ye({label:"indicatorSeparator",alignSelf:"stretch",width:1},o?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:s*2,marginTop:s*2})},VP=function(e){var o=e.innerProps;return Ie("span",Ce({},o,_t(e,"indicatorSeparator",{"indicator-separator":!0})))},GP=Py(Ny||(Ny=Ty([`
|
|
51
51
|
0%, 80%, 100% { opacity: 0; }
|