1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6491],{566:(e,t,r)=>{"use strict";r.d(t,{VersionsPill:()=>l});var n=r(19749),i=r(95155),o=r(92825);r(12115);let l=()=>{let e,t=(0,n.c)(2),{versionCount:r}=(0,o.useDocumentInfo)();return r?(t[0]!==r?(e=(0,i.jsx)("span",{className:"pill-version-count",children:r}),t[0]=r,t[1]=e):e=t[1],e):null}},844:(e,t,r)=>{"use strict";r.d(t,{f:()=>n});let n=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\s+/g,"-").toLowerCase()},1150:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(79772),i=r(73274),o=r(99155);t.default={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>(0,n._)`{allowedValue: ${e}}`},code(e){let{gen:t,data:r,$data:l,schemaCode:a,schema:u}=e;l||u&&"object"==typeof u?e.fail$data((0,n._)`!${(0,i.useFunc)(t,o.default)}(${r}, ${a})`):e.fail((0,n._)`${u} !== ${r}`)}}},1585:(e,t,r)=>{for(var n=r(49509),i=r(44134).hp,o=Math.floor(0xffffff*Math.random()),l=m.index=parseInt(0xffffff*Math.random(),10),a=(void 0===n||"number"!=typeof n.pid?Math.floor(1e5*Math.random()):n.pid)%65535,u=(()=>{try{return _Buffer}catch(e){try{return i}catch(e){return null}}})(),c=function(e){return!!(null!=e&&e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e))},d=[],f=0;f<256;f++)d[f]=(f<=15?"0":"")+f.toString(16);var p=RegExp("^[0-9a-fA-F]{24}$"),g=[];for(f=0;f<10;)g[48+f]=f++;for(;f<16;)g[55+f]=g[87+f]=f++;function m(e){if(!(this instanceof m))return new m(e);if(e&&(e instanceof m||"ObjectID"===e._bsontype))return e;if(this._bsontype="ObjectID",null==e||"number"==typeof e){this.id=this.generate(e);return}var t=m.isValid(e);if(t||null==e)if(t&&"string"==typeof e&&24===e.length)return m.createFromHexString(e);else if(null!=e&&12===e.length)this.id=e;else if(null!=e&&"function"==typeof e.toHexString)return e;else throw Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");else throw Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters")}e.exports=m,m.default=m,m.createFromTime=function(e){var t,r;return new m((t=8,(8===(r=(r=e=parseInt(e,10)%0xffffffff).toString(16)).length?r:"00000000".substring(r.length,t)+r)+"0000000000000000"))},m.createFromHexString=function(e){if(void 0===e||null!=e&&24!==e.length)throw Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");for(var t="",r=0;r<24;)t+=String.fromCharCode(g[e.charCodeAt(r++)]<<4|g[e.charCodeAt(r++)]);return new m(t)},m.isValid=function(e){return null!=e&&("number"==typeof e||("string"==typeof e?12===e.length||24===e.length&&p.test(e):e instanceof m||(c(e)?m.isValid(e.toString("hex")):"function"==typeof e.toHexString&&!!u&&(e.id instanceof u||"string"==typeof e.id)&&(12===e.id.length||24===e.id.length&&p.test(e.id)))))},m.prototype={constructor:m,toHexString:function(){if(!this.id||!this.id.length)throw Error("invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is ["+JSON.stringify(this.id)+"]");if(24===this.id.length)return this.id;if(c(this.id))return this.id.toString("hex");for(var e="",t=0;t<this.id.length;t++)e+=d[this.id.charCodeAt(t)];return e},equals:function(e){if(e instanceof m)return this.toString()===e.toString();if("string"==typeof e&&m.isValid(e)&&12===e.length&&c(this.id))return e===this.id.toString("binary");if("string"==typeof e&&m.isValid(e)&&24===e.length)return e.toLowerCase()===this.toHexString();if("string"==typeof e&&m.isValid(e)&&12===e.length)return e===this.id;if(null!=e&&(e instanceof m||e.toHexString))return e.toHexString()===this.toHexString();else return!1},getTimestamp:function(){var e,t=new Date;return e=c(this.id)?this.id[3]|this.id[2]<<8|this.id[1]<<16|this.id[0]<<24:this.id.charCodeAt(3)|this.id.charCodeAt(2)<<8|this.id.charCodeAt(1)<<16|this.id.charCodeAt(0)<<24,t.setTime(1e3*Math.floor(e)),t},generate:function(e){"number"!=typeof e&&(e=~~(Date.now()/1e3)),e=parseInt(e,10)%0xffffffff;var t=l=(l+1)%0xffffff;return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e,o>>16&255,o>>8&255,255&o,a>>8&255,255&a,t>>16&255,t>>8&255,255&t)}};var y=Symbol&&Symbol.for&&Symbol.for("nodejs.util.inspect.custom")||"inspect";m.prototype[y]=function(){return"ObjectID("+this+")"},m.prototype.toJSON=m.prototype.toHexString,m.prototype.toString=m.prototype.toHexString},1611:(e,t,r)=>{"use strict";r.d(t,{Iterable:()=>m});var n=r(19749),i=r(95155),o=r(84365),l=r(87677),a=r(58028),u=r(23999);r(12115);var c=r(20385),d=r(49947),f=r(79615),p=r(6722);let g="iterable-diff",m=e=>
1{let t,r,m=(0,n.c)(15),{baseVersionField:y,comparisonValue:v,field:b,locale:_,parentIsLocalized:w,versionValue:x}=e,{i18n:S}=(0,l.d)(),{selectedLocales:C}=(0,c.I)(),{config:k}=(0,a.b)(),T=Math.max(Array.isArray(x)?x.length:0,Array.isArray(v)?v.length:0);if(!(0,u.eE)(b)&&!(0,u.MT)(b))throw Error("Expected field to be an array or blocks type but got: ".concat(b.type));if(m[0]!==b||m[1]!==S||m[2]!==_?(t="label"in b&&b.label&&"function"!=typeof b.label&&(0,i.jsxs)("span",{children:[_&&(0,i.jsx)("span",{className:"".concat(g,"__locale-label"),children:_}),(0,o.s)(b.label,S)]}),m[0]=b,m[1]=S,m[2]=_,m[3]=t):t=m[3],m[4]!==y||m[5]!==k||m[6]!==b||m[7]!==S||m[8]!==T||m[9]!==w||m[10]!==C||m[11]!==t||m[12]!==v||m[13]!==x){var E;r=(0,i.jsx)("div",{className:g,children:(0,i.jsxs)(d.$,{field:b,isIterable:!0,Label:t,locales:C,parentIsLocalized:w,valueFrom:v,valueTo:x,children:[T>0&&(0,i.jsx)("div",{className:"".concat(g,"__rows"),children:Array.from(Array(T).keys()).map((e,t)=>{let r=(null==x?void 0:x[t])||{},n=(null==v?void 0:v[t])||{},{fields:o,versionFields:l}=(0,p.G)({baseVersionField:y,comparisonRow:n,config:k,field:b,row:t,versionRow:r}),a=String(t+1).padStart(2,"0"),c=(0,u.eE)(b)?"Item ".concat(a):"Block ".concat(a);return(0,i.jsx)("div",{className:"".concat(g,"__row"),children:(0,i.jsx)(d.$,{fields:o,hideGutter:!0,Label:(0,i.jsxs)("div",{className:"".concat(g,"-label-container"),children:[(0,i.jsx)("div",{className:"".concat(g,"-label-prefix")}),(0,i.jsx)("span",{className:"".concat(g,"__label"),children:c})]}),locales:C,parentIsLocalized:w||b.localized,valueFrom:n,valueTo:r,children:(0,i.jsx)(f.RenderVersionFieldsToDiff,{versionFields:l})})},t)})}),0===T&&(0,i.jsx)("div",{className:"".concat(g,"__no-rows"),children:S.t("version:noRowsFound",{label:"labels"in b&&(null==(E=b.labels)?void 0:E.plural)?(0,o.s)(b.labels.plural,S):S.t("general:rows")})})]})}),m[4]=y,m[5]=k,m[6]=b,m[7]=S,m[8]=T,m[9]=w,m[10]=C,m[11]=t,m[12]=v,m[13]=x,m[14]=r}else r=m[14];return r}},1777:(e,t,r)=>{"use strict";r.d(t,{NavHamburger:()=>l});var n=r(19749),i=r(95155),o=r(92825);r(12115);let l=e=>{let t,r,l=(0,n.c)(6),{baseClass:a}=e,{navOpen:u,setNavOpen:c}=(0,o.useNav)(),d="".concat(a,"__mobile-close");l[0]!==c?(t=()=>{c(!1)},l[0]=c,l[1]=t):t=l[1];let f=u?void 0:-1;return l[2]!==d||l[3]!==t||l[4]!==f?(r=(0,i.jsx)("button",{className:d,onClick:t,tabIndex:f,type:"button",children:(0,i.jsx)(o.Hamburger,{isActive:!0})}),l[2]=d,l[3]=t,l[4]=f,l[5]=r):r=l[5],r}},2133:(e,t,r)=>{"use strict";function n({field:e,index:t,parentIndexPath:r,parentPath:n,parentSchemaPath:i}){if("name"in e)return{indexPath:`${r?r+"-":""}${t}`,path:`${n?n+".":""}${e.name}`,schemaPath:`${i?i+".":""}${e.name}`};let o=`_index-${r?r+"-":""}${t}`;return{indexPath:`${r?r+"-":""}${t}`,path:`${n?n+".":""}${o}`,schemaPath:`${i?i+".":""}${o}`}}r.d(t,{Z:()=>n})},2267:e=>{"use strict";var t=e.exports=function(e,r,n){"function"==typeof r&&(n=r,r={});var i="function"==typeof(n=r.cb||n)?n:n.pre||function(){};!function e(r,n,i,o,l,a,u,c,d,f){if(o&&"object"==typeof o&&!Array.isArray(o)){for(var p in n(o,l,a,u,c,d,f),o){var g=o[p];if(Array.isArray(g)){if(p in t.arrayKeywords)for(var m=0;m<g.length;m++)e(r,n,i,g[m],l+"/"+p+"/"+m,a,l,p,o,m)}else if(p in t.propsKeywords){if(g&&"object"==typeof g)for(var y in g)e(r,n,i,g[y],l+"/"+p+"/"+y.replace(/~/g,"~0").replace(/\//g,"~1"),a,l,p,o,y)}else(p in t.keywords||r.allKeys&&!(p in t.skipKeywords))&&e(r,n,i,g,l+"/"+p,a,l,p,o)}i(o,l,a,u,c,d,f)}}(r,i,n.post||function(){},e,"",e)};t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},2426:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true}
vendor: 5,338 bytes, line 1
1,"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},2921:(e,t,r)=>{"use strict";r.d(t,{Tabs:()=>f});var n=r(19749),i=r(95155),o=r(84365),l=r(87677);r(12115);var a=r(20385),u=r(49947),c=r(79615);let d="tabs-diff",f=e=>{let t,r=(0,n.c)(13),{baseVersionField:o,comparisonValue:l,field:u,versionValue:c}=e,{selectedLocales:f}=(0,a.I)();if(r[0]!==o.tabs||r[1]!==u||r[2]!==e||r[3]!==f||r[4]!==l||r[5]!==c){let n;r[7]!==u||r[8]!==e||r[9]!==f||r[10]!==l||r[11]!==c?(n=(t,r)=>{var n,o;if(!(null==t||null==(n=t.fields)?void 0:n.length))return null;let a=null==(o=u.tabs)?void 0:o[r];return(0,i.jsx)("div",{className:"".concat(d,"__tab"),children:(()=>{if("name"in a&&f&&a.localized)return f.map((r,n)=>{var o,u;let f={...e,comparisonValue:null==l||null==(o=l[t.name])?void 0:o[r],fieldTab:a,locale:r,tab:t,versionValue:null==c||null==(u=c[t.name])?void 0:u[r]};return(0,i.jsx)("div",{className:"".concat(d,"__tab-locale"),children:(0,i.jsx)("div",{className:"".concat(d,"__tab-locale-value"),children:(0,i.jsx)(p,{...f},r)})},[r,n].join("-"))});if(!("name"in t)||!t.name)return(0,i.jsx)(p,{fieldTab:a,...e,tab:t},r);{let n={...e,comparisonValue:null==l?void 0:l[t.name],fieldTab:a,tab:t,versionValue:null==c?void 0:c[t.name]};return(0,i.jsx)(p,{...n},r)}})()},r)},r[7]=u,r[8]=e,r[9]=f,r[10]=l,r[11]=c,r[12]=n):n=r[12],t=(0,i.jsx)("div",{className:d,children:o.tabs.map(n)}),r[0]=o.tabs,r[1]=u,r[2]=e,r[3]=f,r[4]=l,r[5]=c,r[6]=t}else t=r[6];return t},p=e=>{var t;let r,f,p=(0,n.c)(12),{comparisonValue:g,fieldTab:m,locale:y,parentIsLocalized:v,tab:b,versionValue:_}=e,{i18n:w}=(0,l.d)(),{selectedLocales:x}=(0,a.I)();if(!(null==(t=b.fields)?void 0:t.length))return null;p[0]!==w||p[1]!==y||p[2]!==b?(r="label"in b&&b.label&&"function"!=typeof b.label&&(0,i.jsxs)("span",{children:[y&&(0,i.jsx)("span",{className:"".concat(d,"__locale-label"),children:y}),(0,o.s)(b.label,w)]}),p[0]=w,p[1]=y,p[2]=b,p[3]=r):r=p[3];let S=v||m.localized;return p[4]!==m.fields||p[5]!==x||p[6]!==r||p[7]!==S||p[8]!==b.fields||p[9]!==g||p[10]!==_?(f=(0,i.jsx)(u.$,{fields:m.fields,Label:r,locales:x,parentIsLocalized:S,valueFrom:g,valueTo:_,children:(0,i.jsx)(c.RenderVersionFieldsToDiff,{versionFields:b.fields})}),p[4]=m.fields,p[5]=x,p[6]=r,p[7]=S,p[8]=b.fields,p[9]=g,p[10]=_,p[11]=f):f=p[11],f}},3965:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(81708),i=r(79772),o=r(61974),l=r(73274);t.default={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>(0,i._)`{additionalProperty: ${e.additionalProperty}}`},code(e){let{gen:t,schema:r,parentSchema:a,data:u,errsCount:c,it:d}=e;if(!c)throw Error("ajv implementation error");let{allErrors:f,opts:p}=d;if(d.props=!0,"all"!==p.removeAdditional&&(0,l.alwaysValidSchema)(d,r))return;let g=(0,n.allSchemaProperties)(a.properties),m=(0,n.allSchemaProperties)(a.patternProperties);function y(e){t.code((0,i._)`delete ${u}[${e}]`)}function v(n){if("all"===p.removeAdditional||p.removeAdditional&&!1===r)return void y(n);if(!1===r){e.setParams({additionalProperty:n}),e.error(),f||t.break();return}if("object"==typeof r&&!(0,l.alwaysValidSchema)(d,r)){let r=t.name("valid");"failing"===p.removeAdditional?(b(n,r,!1),t.if((0,i.not)(r),()=>{e.reset(),y(n)})):(b(n,r),f||t.if((0,i.not)(r),()=>t.break()))}}function b(t,r,n){let i={keyword:"additionalProperties",dataProp:t,dataPropType:l.Type.Str};!1===n&&Object.assign(i,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(i,r)}t.forIn("key",u,r=>{g.length||m.length?t.if(function(r){let o;if(g.length>8){let e=(0,l.schemaRefOrVal)(d,a.properties,"properties");o=(0,n.isOwnProperty)(t,e,r)}else o=g.length?(0,i.or)(...g.map(e=>(0,i._)`${r} === ${e}`)):i.nil;return m.length&&(o=(0,i.or)(o,...m.map(t=>(0,i._)`${(0,n.usePattern)(e,t)}.test(${r})`))),(0,i.not)(o)}(r),()=>v(r)):v(r)}),e.ok((0,i._)`${c} === ${o.default.errors}`)}}},4186:(e,t,r)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;let n=r(73274),i=r(51616),o=r(2267),l=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!function e(t){for(let r in t){if(a.has(r))return!0;let n=t[r];if(Array.isArray(n)&&n.some(e)||"object"==typeof n&&e(n))return!0}return!1}(e):!!t&&function e(t){let r=0;for(let i in t)if("$ref"===i||(r++,!l.has(i)&&("object"==typeof t[i]&&(0,n.eachItem)(t[i],t=>r+=e(t)),r===1/0)))return 1/0;return r}(e)<=t)};let a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function u(e,t="",r){!1!==r&&(t=f(t));let n=e.parse(t);return c(e,n)}function c(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=u,t._getFullPath=c;let d=/#\/?$/;function f(e){return e?e.replace(d,""):""}t.normalizeId=f,t.resolveUrl=function(e,t,r){return r=f(r),e.resolve(t,r)};let p=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};let{schemaId:r,uriResolver:n}=this.opts,l=f(e[r]||t),a={"":l},c=u(n,l,!1),d={},g=new Set;return o(e,{allKeys:!0},(e,t,n,i)=>{if(void 0===i)return;let o=c+t,l=a[i];function u(t){let r=this.opts.uriResolver.resolve;if(t=f(l?r(l,t):t),g.has(t))throw y(t);g.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?m(e,n.schema,t):t!==f(o)&&("#"===t[0]?(m(e,d[t],t),d[t]=e):this.refs[t]=o),t}function v(e){if("string"==typeof e){if(!p.test(e))throw Error(`invalid anchor "${e}"`);u.call(this,`#${e}`)}}"string"==typeof e[r]&&(l=u.call(this,e[r])),v.call(this,e.$anchor),v.call(this,e.$dynamicAnchor),a[t]=l}),d;function m(e,t,r){if(void 0!==t&&!i(e,t))throw y(r)}function y(e){return Error(`reference "${e}" resolves to more than one schema`)}}},4873:(e,t,r)=>{"use strict";var n=r(12115).__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;t.c=function(e){return n.H.useMemoCache(e)}},5034:()=>{},5394:(e,t,r)=>{"use strict";r.d(t,{j:()=>function e(t,r){var i,o;if(t===r)return!0;if(t&&r&&(i=t.constructor)===r.constructor){if(i===Date)return t.getTime()===r.getTime();if(i===RegExp)return t.toString()===r.toString();if(i===Array){if((o=t.length)===r.length)for(;o--&&e(t[o],r[o]););return -1===o}if(!i||"object"==typeof t){for(i in o=0,t)if(n.call(t,i)&&++o&&!n.call(r,i)||!(i in r)||!e(t[i],r[i]))return!1;return Object.keys(r).length===o}}return t!=t&&r!=r}});var n=Object.prototype.hasOwnProperty},5718:()=>{},6001:(e,t,r)=>{"use strict";r.d(t,{Q:()=>n});let n=e=>{let{adminRoute:t,basePath:r="",path:n,serverURL:i}=e,o=n||"";if(t){if("/"!==t)return`${i||""}${r}${t}${o}`;else if(!o)return`${i||""}${r}${t}`}return`${i||""}${r}${o}`}},6005:(e,t,r)=>{"use strict";r.d(t,{NavWrapper:()=>l});var n=r(19749),i=r(95155),o=r(92825);r(12115);let l=e=>{let t,r,l=(0,n.c)(11),{baseClass:a,children:u}=e,{hydrated:c,navOpen:d,navRef:f,shouldAnimate:p}=(0,o.useNav)(),g=d&&"".concat(a,"--nav-open"),m=p&&"".concat(a,"--nav-animate"),y=c&&"".concat(a,"--nav-hydrated");l[0]!==a||l[1]!==g||l[2]!==m||l[3]!==y?(t=[a,g,m,y].filter(Boolean),l[0]=a,l[1]=g,l[2]=m,l[3]=y,l[4]=t):t=l[4];let v=t.join(" "),b=!d||void 0,_="".concat(a,"__scroll");return l[5]!==u||l[6]!==f||l[7]!==v||l[8]!==b||l[9]!==_?(r=(0,i.jsx)("aside",{className:v,inert:b,children:(0,i.jsx)("div",{className:_,ref:f,children:u})}),l[5]=u,l[6]=f,l[7]=v,l[8]=b,l[9]=_,l[10]=r):r=l[10],r}},6434:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});let n={src:"/_next/static/media/payload-favicon-light.b8a65007.png",height:32,width:32,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAANlBMVEVMaXH///////////////////////////////////////////////////////////////////+kpd7DAAAAEnRSTlMAdo/15mvEgxwpDQSgS8ZCPbJ5RcrnAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAOklEQVR4nC3LQQKAIAhFwaeAH9Sy7n/ZNs1+gBqjgMxL8j4Ja4v0hu7XD1toE0EXzQvqSWY3yQL+vj4zmwFq4cBxIQAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8}},6652:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>u,_J:()=>l,j1:()=>a});let n=String.prototype.replace,i=/%20/g,o={RFC1738:"RFC1738",RFC3986:"RFC3986"},l={RFC1738:function(e){return n.call(e,i,"+")},RFC3986:function(e){return String(e)}},a=o.RFC1738;o.RFC3986;let u=o.RFC3986},6722:(e,t,r)=>{"use strict";function n({baseVersionField:e,comparisonRow:t,config:r,field:n,row:i,versionRow:o}){let l=[],a=[];if("array"===n.type&&"fields"in n)l=n.fields,a=e.rows?.length?e.rows[i]:e.fields;else if("blocks"===n.type)if(o?.blockType===t?.blockType)l=(r?.blocksMap?.[o?.blockType]??(("blocks"in n||"blockReferences"in n)&&(n.blockReferences??n.blocks)?.find(e=>"string"!=typeof e&&e.slug===o?.blockType)||{fields:[]})).fields,a=e.rows?.length?e.rows[i]:e.fields;else{let u=r?.blocksMap?.[o?.blockType]??(("blocks"in n||"blockReferences"in n)&&(n.blockReferences??n.blocks)?.find(e=>"string"!=typeof e&&e.slug===o?.blockType)||{fields:[]}),c=r?.blocksMap?.[t?.blockType]??(("blocks"in n||"blockReferences"in n)&&(n.blockReferences??n.blocks)?.find(e=>"string"!=typeof e&&e.slug===t?.blockType)||{fields:[]});l=[...new Map([...u.fields,...c.fields].map(e=>[e.name,e])).values()],a=e.rows?.length?e.rows[i]:e.fields}return{fields:l,versionFields:a}}r.d(t,{G:()=>n})},7239:(e,t,r)=>{"use strict";r.d(t,{w:()=>i});var n=r(25703);function i(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&n._P in e?e[n._P](t):e instanceof Date?new e.constructor(t):new Date(t)}},7525:(e,t,r)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;let n=r(79772),i=r(73274),o=r(61974);function l(e,t){let r=e.const("err",t);e.if((0,n._)`${o.default.vErrors} === null`,()=>e.assign(o.default.vErrors,(0,n._)`[${r}]`),(0,n._)`${o.default.vErrors}.push(${r})`),e.code((0,n._)`${o.default.errors}++`)}function a(e,t){let{gen:r,validateName:i,schemaEnv:o}=e;o.$async?r.throw((0,n._)`new ${e.ValidationError}(${t})`):(r.assign((0,n._)`${i}.errors`,t),r.return(!1))}t.keywordError={message:({keyword:e})=>(0,n.str)`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,n.str)`"${e}" keyword must be ${t} ($data)`:(0,n.str)`"${e}" keyword is invalid ($data)`},t.reportError=function(e,r=t.keywordError,i,o){let{it:u}=e,{gen:d,compositeRule:f,allErrors:p}=u,g=c(e,r,i);(null!=o?o:f||p)?l(d,g):a(u,(0,n._)`[${g}]`)},t.reportExtraError=function(e,r=t.keywordError,n){let{it:i}=e,{gen:u,compositeRule:d,allErrors:f}=i;l(u,c(e,r,n)),d||f||a(i,o.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(o.default.errors,t),e.if((0,n._)`${o.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,n._)`${o.default.vErrors}.length`,t),()=>e.assign(o.default.vErrors,null)))},t.extendErrors=function({gen:e,keyword:t,schemaValue:r,data:i,errsCount:l,it:a}){if(void 0===l)throw Error("ajv implementation error");let u=e.name("err");e.forRange("i",l,o.default.errors,l=>{e.const(u,(0,n._)`${o.default.vErrors}[${l}]`),e.if((0,n._)`${u}.instancePath === undefined`,()=>e.assign((0,n._)`${u}.instancePath`,(0,n.strConcat)(o.default.instancePath,a.errorPath))),e.assign((0,n._)`${u}.schemaPath`,(0,n.str)`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign((0,n._)`${u}.schema`,r),e.assign((0,n._)`${u}.data`,i))})};let u={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function c(e,t,r){let{createErrors:l}=e.it;return!1===l?(0,n._)`{}`:function(e,t,r={}){let{gen:l,it:a}=e,c=[function({errorPath:e},{instancePath:t}){let r=t?(0,n.str)`${e}${(0,i.getErrorPath)(t,i.Type.Str)}`:e;return[o.default.instancePath,(0,n.strConcat)(o.default.instancePath,r)]}(a,r),function({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:o}){let l=o?t:(0,n.str)`${t}/${e}`;return r&&(l=(0,n.str)`${l}${(0,i.getErrorPath)(r,i.Type.Str)}`),[u.schemaPath,l]}(e,r)];return function(e,{params:t,message:r},i){let{keyword:l,data:a,schemaValue:c,it:d}=e,{opts:f,propertyName:p,topSchemaRef:g,schemaPath:m}=d;i.push([u.keyword,l],[u.params,"function"==typeof t?t(e):t||(0,n._)`{}`]),f.messages&&i.push([u.message,"function"==typeof r?r(e):r]),f.verbose&&i.push([u.schema,c],[u.parentSchema,(0,n._)`${g}${m}`],[o.default.data,a]),p&&i.push([u.propertyName,p])}(e,t,c),l.object(...c)}(e,t,r)}},7610:(e,t)=>{t.read=function(e,t,r,n,i){var o,l,a=8*i-n-1,u=(1<<a)-1,c=u>>1,d=-7,f=r?i-1:0,p=r?-1:1,g=e[t+f];for(f+=p,o=g&(1<<-d)-1,g>>=-d,d+=a;d>0;o=256*o+e[t+f],f+=p,d-=8);for(l=o&(1<<-d)-1,o>>=-d,d+=n;d>0;l=256*l+e[t+f],f+=p,d-=8);if(0===o)o=1-c;else{if(o===u)return l?NaN:1/0*(g?-1:1);l+=Math.pow(2,n),o-=c}return(g?-1:1)*l*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var l,a,u,c=8*o-i-1,d=(1<<c)-1,f=d>>1,p=5960464477539062e-23*(23===i),g=n?0:o-1,m=n?1:-1,y=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(a=+!!isNaN(t),l=d):(l=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-l))<1&&(l--,u*=2),l+f>=1?t+=p/u:t+=p*Math.pow(2,1-f),t*u>=2&&(l++,u/=2),l+f>=d?(a=0,l=d):l+f>=1?(a=(t*u-1)*Math.pow(2,i),l+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),l=0));i>=8;e[r+g]=255&a,g+=m,a/=256,i-=8);for(l=l<<i|a,c+=i;c>0;e[r+g]=255&l,g+=m,l/=256,c-=8);e[r+g-m]|=128*y}},8301:(e,t,r)=>{"use strict";r.d(t,{NT:()=>i});let n=({req:{user:e}})=>!!e,i={access:{create:n,delete:n,read:n,unlock:n,update:n},admin:{components:{},custom:{},enableRichTextLink:!0,enableRichTextRelationship:!0,pagination:{defaultLimit:10,limits:[5,10,25,50,100]},useAsTitle:"id"},auth:!1,custom:{},endpoints:[],fields:[],hooks:{afterChange:[],afterDelete:[],afterForgotPassword:[],afterLogin:[],afterLogout:[],afterMe:[],afterOperation:[],afterRead:[],afterRefresh:[],beforeChange:[],beforeDelete:[],beforeLogin:[],beforeOperation:[],beforeRead:[],beforeValidate:[],me:[],refresh:[]},indexes:[],timestamps:!0,upload:!1,versions:!1}},8667:(e,t,r)=>{"use strict";let n;r.d(t,{a:()=>y,b:()=>v,c:()=>b,d:()=>_,e:()=>x,f:()=>S});var i,o,l=r(12115),a=r(47650);
1function u(e){if("react"===e)return i||(i=r.t(l,2));if("react-dom"===e)return o||(o=r.t(a,2));throw Error("Unknown module ".concat(e))}var c=Object.create,d=Object.defineProperty,f=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,g=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty,y=u,v=(e,t)=>()=>(e&&(t=e(e=0)),t),b=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),_=(e,t)=>{for(var r in t)d(e,r,{get:t[r],enumerable:!0})},w=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of p(t))m.call(e,i)||i===r||d(e,i,{get:()=>t[i],enumerable:!(n=f(t,i))||n.enumerable});return e},x=(e,t,r)=>(r=null!=e?c(g(e)):{},w(!t&&e&&e.__esModule?r:d(r,"default",{value:e,enumerable:!0}),e)),S=e=>w(d({},"__esModule",{value:!0}),e)},11930:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;let n=r(79772),i=r(74455),o=r(61974),l=r(4186),a=r(73274),u=r(85331);class c{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!=(t=e.baseId)?t:(0,l.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function d(e){let t,r,a=p.call(this,e);if(a)return a;let c=(0,l.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:d,lines:f}=this.opts.code,{ownProperties:g}=this.opts,m=new n.CodeGen(this.scope,{es5:d,lines:f,ownProperties:g});e.$async&&(t=m.scopeValue("Error",{ref:i.default,code:(0,n._)`require("ajv/dist/runtime/validation_error").default`}));let y=m.scopeName("validate");e.validateName=y;let v={gen:m,allErrors:this.opts.allErrors,data:o.default.data,parentData:o.default.parentData,parentDataProperty:o.default.parentDataProperty,dataNames:[o.default.data],dataPathArr:[n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:m.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,n.stringify)(e.schema)}:{ref:e.schema}),validateName:y,ValidationError:t,schema:e.schema,schemaEnv:e,rootId:c,baseId:e.baseId||c,schemaPath:n.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,n._)`""`,opts:this.opts,self:this};try{this._compilations.add(e),(0,u.validateFunctionCode)(v),m.optimize(this.opts.code.optimize);let t=m.toString();r=`${m.scopeRefs(o.default.scope)}return ${t}`,this.opts.code.process&&(r=this.opts.code.process(r,e));let i=Function(`${o.default.self}`,`${o.default.scope}`,r)(this,this.scope.get());if(this.scope.value(y,{ref:i}),i.errors=null,i.schema=e.schema,i.schemaEnv=e,e.$async&&(i.$async=!0),!0===this.opts.code.source&&(i.source={validateName:y,validateCode:t,scopeValues:m._values}),this.opts.unevaluated){let{props:e,items:t}=v;i.evaluated={props:e instanceof n.Name?void 0:e,items:t instanceof n.Name?void 0:t,dynamicProps:e instanceof n.Name,dynamicItems:t instanceof n.Name},i.source&&(i.source.evaluated=(0,n.stringify)(i.evaluated))}return e.validate=i,e}catch(t){throw delete e.validate,delete e.validateName,r&&this.logger.error("Error compiling schema, function code:",r),t}finally{this._compilations.delete(e)}}function f(e){return(0,l.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:d.call(this,e)}function p(e){for(let n of this._compilations){var t,r;if(t=n,r=e,t.schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return n}}function g(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||m.call(this,e,t)}function m(e,t){let r=this.opts.uriResolver.parse(t),n=(0,l._getFullPath)(this.opts.uriResolver,r),i=(0,l.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return v.call(this,r,e);let o=(0,l.normalizeId)(n),a=this.refs[o]||this.schemas[o];if("string"==typeof a){let t=m.call(this,e,a);if("object"!=typeof(null==t?void 0:t.schema))return;return v.call(this,r,t)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||d.call(this,a),o===(0,l.normalizeId)(t)){let{schema:t}=a,{schemaId:r}=this.opts,n=t[r];return n&&(i=(0,l.resolveUrl)(this.opts.uriResolver,i,n)),new c({schema:t,schemaId:r,root:e,baseId:i})}return v.call(this,r,a)}}t.SchemaEnv=c,t.compileSchema=d,t.resolveRef=function(e,t,r){var n;r=(0,l.resolveUrl)(this.opts.uriResolver,t,r);let i=e.refs[r];if(i)return i;let o=g.call(this,e,r);if(void 0===o){let i=null==(n=e.localRefs)?void 0:n[r],{schemaId:l}=this.opts;i&&(o=new c({schema:i,schemaId:l,root:e,baseId:t}))}if(void 0!==o)return e.refs[r]=f.call(this,o)},t.getCompilingSchema=p,t.resolveSchema=m;let y=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function v(e,{baseId:t,schema:r,root:n}){var i;let o;if((null==(i=e.fragment)?void 0:i[0])!=="/")return;for(let n of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;let e=r[(0,a.unescapeFragment)(n)];if(void 0===e)return;let i="object"==typeof(r=e)&&r[this.opts.schemaId];!y.has(n)&&i&&(t=(0,l.resolveUrl)(this.opts.uriResolver,t,i))}if("boolean"!=typeof r&&r.$ref&&!(0,a.schemaHasRulesButRef)(r,this.RULES)){let e=(0,l.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=m.call(this,n,e)}let{schemaId:u}=this.opts;if((o=o||new c({schema:r,schemaId:u,root:n,baseId:t})).schema!==o.root.schema)return o}},12015:(e,t,r)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0});let n=r(81708),i=r(79772);t.default={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,i.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,i._)`{pattern: ${e}}`},code(e){let{data:t,$data:r,schema:o,schemaCode:l,it:a}=e,u=a.opts.unicodeRegExp?"u":"",c=r?(0,i._)`(new RegExp(${l}, ${u}))`:(0,n.usePattern)(e,o);e.fail$data((0,i._)`!${c}.test(${t})`)}}},12618:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(79772);t.default={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,n.str)`must NOT have ${"maxItems"===e?"more":"fewer"} than ${t} items`,params:({schemaCode:e})=>(0,n._)`{limit: ${e}}`},code(e){let{keyword:t,data:r,schemaCode:i}=e,o="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data((0,n._)`${r}.length ${o} ${i}`)}}},13163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(79772),i=n.operators,o={maximum:{okStr:"<=",ok:i.LTE,fail:i.GT},minimum:{okStr:">=",ok:i.GTE,fail:i.LT},exclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},exclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}};t.default={keyword:Object.keys(o),type:"number",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,n.str)`must be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,n._)`{comparison: ${o[e].okStr}, limit: ${t}}`},code(e){let{keyword:t,data:r,schemaCode:i}=e;e.fail$data((0,n._)`${r} ${o[t].fail} ${i} || isNaN(${r})`)}}},13293:(e,t,r)=>{"use strict";r.d(t,{G:()=>k});var n=r(69717),i=r(30889),o=r(32532),l=r(92749);let a=[];class u extends o.fGB{static getType(){return"mark"}static clone(e){return new u(e.__ids,e.__key)}static importDOM(){return null}static importJSON(e){return c().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setIDs(e.ids)}exportJSON(){return{...super.exportJSON(),ids:this.getIDs()}}constructor(e=a,t){super(t),this.__ids=e}createDOM(e){let t=document.createElement("mark");return(0,l.ZB)(t,e.theme.mark),this.__ids.length>
11&&(0,l.ZB)(t,e.theme.markOverlap),t}updateDOM(e,t,r){let n=e.__ids,i=this.__ids,o=n.length,a=i.length,u=r.theme.markOverlap;return o!==a&&(1===o?2===a&&(0,l.ZB)(t,u):1===a&&(0,l.HE)(t,u)),!1}hasID(e){return this.getIDs().includes(e)}getIDs(){return Array.from(this.getLatest().__ids)}setIDs(e){let t=this.getWritable();return t.__ids=e,t}addID(e){let t=this.getWritable();return t.__ids.includes(e)?t:t.setIDs([...t.__ids,e])}deleteID(e){let t=this.getWritable(),r=t.__ids.indexOf(e);if(-1===r)return t;let n=Array.from(t.__ids);return n.splice(r,1),t.setIDs(n)}insertNewAfter(e,t=!0){let r=c(this.__ids);return this.insertAfter(r,t),r}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,t,r){if(!(0,o.I2P)(t)||"html"===r)return!1;let n=t.anchor,i=t.focus,l=n.getNode(),a=i.getNode(),u=t.isBackward()?n.offset-i.offset:i.offset-n.offset;return this.isParentOf(l)&&this.isParentOf(a)&&this.getTextContent().length===u}excludeFromCopy(e){return"clone"!==e}}function c(e=a){return(0,o.pTq)(new u(e))}var d=r(41747),f=r(12115),p=r(95155);let g=Object.freeze({" ":"\\t","\n":"\\n"}),m=RegExp(Object.keys(g).join("|"),"g"),y=Object.freeze({ancestorHasNextSibling:"|",ancestorIsLastChild:" ",hasNextSibling:"â",isLastChild:"â",selectedChar:"^",selectedLine:">"}),v=[e=>e.hasFormat("bold")&&"Bold",e=>e.hasFormat("code")&&"Code",e=>e.hasFormat("italic")&&"Italic",e=>e.hasFormat("strikethrough")&&"Strikethrough",e=>e.hasFormat("subscript")&&"Subscript",e=>e.hasFormat("superscript")&&"Superscript",e=>e.hasFormat("underline")&&"Underline",e=>e.hasFormat("highlight")&&"Highlight"],b=[e=>e.hasTextFormat("bold")&&"Bold",e=>e.hasTextFormat("code")&&"Code",e=>e.hasTextFormat("italic")&&"Italic",e=>e.hasTextFormat("strikethrough")&&"Strikethrough",e=>e.hasTextFormat("subscript")&&"Subscript",e=>e.hasTextFormat("superscript")&&"Superscript",e=>e.hasTextFormat("underline")&&"Underline",e=>e.hasTextFormat("highlight")&&"Highlight"],_=[e=>e.isDirectionless()&&"Directionless",e=>e.isUnmergeable()&&"Unmergeable"],w=[e=>e.isToken()&&"Token",e=>e.isSegmented()&&"Segmented"];function x(e,t=!1){let r=Object.entries(g).reduce((e,[t,r])=>e.replace(RegExp(t,"g"),String(r)),e);return t?r.replace(/[^\s]/g,"*"):r}function S(e){let t=v.map(t=>t(e)).filter(Boolean).join(", ").toLocaleLowerCase();return""!==t&&(t="format: "+t),t}let C=(0,f.forwardRef)(function({treeTypeButtonClassName:e,timeTravelButtonClassName:t,timeTravelPanelSliderClassName:r,timeTravelPanelButtonClassName:n,viewClassName:i,timeTravelPanelClassName:o,editorState:l,setEditorState:a,setEditorReadOnly:u,generateContent:c},d){let[g,m]=(0,f.useState)([]),[y,v]=(0,f.useState)(""),[b,_]=(0,f.useState)(!1),[w,x]=(0,f.useState)(!1),S=(0,f.useRef)(0),C=(0,f.useRef)(null),[k,T]=(0,f.useState)(!1),[E,N]=(0,f.useState)(!1),[P,$]=(0,f.useState)(!1),A=(0,f.useRef)(),O=(0,f.useRef)(0),j=(0,f.useCallback)(e=>{let t=++O.current;c(e).then(e=>{t===O.current&&v(e)}).catch(e=>{t===O.current&&v(`Error rendering tree: ${e.message} 2 3Stack: 4${e.stack}`)})},[c]);(0,f.useEffect)(()=>{!P&&l._nodeMap.size>1e3&&(N(!0),!P)||A.current!==l&&(A.current=l,j(w),b||m(e=>[...e,[Date.now(),l]]))},[l,j,w,P,b]);let M=g.length;return(0,f.useEffect)(()=>{if(k){let e,t=()=>{let r=S.current;if(r===M-1)return void T(!1);let n=g[r][0];e=setTimeout(()=>{S.current++;let e=S.current,r=C.current;null!==r&&(r.value=String(e)),a(g[e][1]),t()},g[r+1][0]-n)};return t(),()=>{clearTimeout(e)}}},[g,k,M,a]),(0,p.jsxs)("div",{className:i,children:[!P&&E?(0,p.jsxs)("div",{style:{padding:20},children:[(0,p.jsx)("span",{style:{marginRight:20},children:"Detected large EditorState, this can impact debugging performance."}),(0,p.jsx)("button",{onClick:()=>{$(!0)},style:{background:"transparent",border:"1px solid white",color:"white",cursor:"pointer",padding:5},children:"Show full tree"})]}):null,P?null:(0,p.jsx)("button",{onClick:()=>(j(!w),void x(!w)),className:e,type:"button",children:w?"Tree":"Export DOM"}),!b&&(P||!E)&&M>2&&(0,p.jsx)("button",{onClick:()=>{u(!0),S.current=M-1,_(!0)},className:t,type:"button",children:"Time Travel"}),(P||!E)&&(0,p.jsx)("pre",{ref:d,children:y}),b&&(P||!E)&&(0,p.jsxs)("div",{className:o,children:[(0,p.jsx)("button",{className:n,onClick:()=>{S.current===M-1&&(S.current=1),T(!k)},type:"button",children:k?"Pause":"Play"}),(0,p.jsx)("input",{className:r,ref:C,onChange:e=>{let t=Number(e.target.value),r=g[t];r&&(S.current=t,a(r[1]))},type:"range",min:"1",max:M-1}),(0,p.jsx)("button",{className:n,onClick:()=>{u(!1);let e=g.length-1;a(g[e][1]);let t=C.current;null!==t&&(t.value=String(e)),_(!1),T(!1)},type:"button",children:"Exit"})]})]})});function k({treeTypeButtonClassName:e,timeTravelButtonClassName:t,t
4imeTravelPanelSliderClassName:r,timeTravelPanelButtonClassName:a,timeTravelPanelClassName:c,viewClassName:g,editor:v,customPrintNode:k}){let T=f.createRef(),[E,N]=(0,f.useState)(v.getEditorState()),P=function(e){let[t,r]=(0,f.useState)([]);return(0,f.useEffect)(()=>(function(e,t){let r=new Set,n=0;for(let[i]of e._commands)r.add(e.registerCommand(i,e=>(t(t=>{let r=[...t];return r.push({index:n+=1,payload:e,type:i.type?i.type:"UNKNOWN"}),r.length>10&&r.shift(),r}),!1),o.da8));return()=>r.forEach(e=>e())})(e,r),[e]),(0,f.useMemo)(()=>t,[t])}(v);return(0,f.useEffect)(()=>(0,l.Sd)(v.registerUpdateListener(({editorState:e})=>{N(e)}),v.registerEditableListener(()=>{N(v.getEditorState())})),[v]),(0,f.useEffect)(()=>{let e=T.current;if(null!==e)return e.__lexicalEditor=v,()=>{e.__lexicalEditor=null}},[v,T]),(0,p.jsx)(C,{treeTypeButtonClassName:e,timeTravelButtonClassName:t,timeTravelPanelSliderClassName:r,timeTravelPanelButtonClassName:a,viewClassName:g,timeTravelPanelClassName:c,setEditorReadOnly:e=>{let t=v.getRootElement();null!=t&&(t.contentEditable=e?"false":"true")},editorState:E,setEditorState:e=>v.setEditorState(e),generateContent:async function(e){return function(e,t,r,l,a=!1){let c=e.getEditorState(),f=e._config,p=e._compositionKey,g=e._editable;if(r){let t="";return c.read(()=>{t=function(e){let t=document.createElement("div");return t.innerHTML=e.trim(),function e(t,r){let n,i=Array(1+r++).join(" "),o=Array(r-1).join(" ");for(let l=0;l<t.children.length;l++)n=document.createTextNode("\n"+i),t.insertBefore(n,t.children[l]),e(t.children[l],r),t.lastElementChild===t.children[l]&&(n=document.createTextNode("\n"+o),t.appendChild(n));return t}(t,0).innerHTML}((0,n.g)(e))}),t}let v=" root\n",C=c.read(()=>{let e=(0,o.vJq)();return function e(t,r,n=[]){let i=t.getChildren(),l=i.length;i.forEach((t,i)=>{r(t,n.concat(i===l-1?y.isLastChild:y.hasNextSibling)),(0,o.ff4)(t)&&e(t,r,n.concat(i===l-1?y.ancestorIsLastChild:y.ancestorHasNextSibling))})}((0,o.NiT)(),(t,r)=>{let n=`(${t.getKey()})`,c=t.getType()||"",d=t.isSelected();v+=`${d?y.selectedLine:" "} ${r.join(" ")} ${n} ${c} ${function(e,t,r=!1){let n=t?t(e,r):void 0;if(void 0!==n&&n.length>0)return n;if((0,o.kFe)(e)){var l,a;let t,n,i=e.getTextContent(),o=0===i.length?"(empty)":`"${x(i,r)}"`,u=[S(e),(l=e,""!==(t=_.map(e=>e(l)).filter(Boolean).join(", ").toLocaleLowerCase())&&(t="detail: "+t),t),(a=e,""!==(n=w.map(e=>e(a)).filter(Boolean).join(", ").toLocaleLowerCase())&&(n="mode: "+n),n)].filter(Boolean).join(", ");return[o,0!==u.length?`{ ${u} }`:null].filter(Boolean).join(" ").trim()}if((0,i.FJ)(e)){let t,n,i,o=e.getURL(),l=0===o.length?"(empty)":`"${x(o,r)}"`,a=[(null!=(t=e.getTarget())&&(t="target: "+t),t),(null!=(n=e.getRel())&&(n="rel: "+n),n),(null!=(i=e.getTitle())&&(i="title: "+i),i)].filter(Boolean).join(", ");return[l,0!==a.length?`{ ${a} }`:null].filter(Boolean).join(" ").trim()}if(e instanceof u)return`ids: [ ${e.getIDs().join(", ")} ]`;if((0,o.bSg)(e)){let t,r=(""!==(t=b.map(t=>t(e)).filter(Boolean).join(", ").toLocaleLowerCase())&&(t="format: "+t),t);return(""!==r?`{ ${r} }`:"")+(e.__style?`(${e.__style})`:"")}return""}(t,l,a)} 5`,v+=function({indent:e,isSelected:t,node:r,nodeKeyDisplay:n,selection:i,typeDisplay:l}){if(!(0,o.kFe)(r)||!(0,o.I2P)(i)||!t||(0,o.ff4)(r))return"";let a=i.anchor,u=i.focus;if(""===r.getTextContent()||a.getNode()===i.focus.getNode()&&a.offset===u.offset)return"";let[c,d]=function(e,t){let r=t.getStartEndPoints();if((0,o.RTZ)(t)||null===r)return[-1,-1];let[n,i]=r,l=e.getTextContent(),a=l.length,u=-1,c=-1;if("text"===n.type&&"text"===i.type){let t=n.getNode(),r=i.getNode();t===r&&e===t&&n.offset!==i.offset?[u,c]=n.offset<i.offset?[n.offset,i.offset]:[i.offset,n.offset]:[u,c]=e===t?t.isBefore(r)?[n.offset,a]:[0,n.offset]:e===r?r.isBefore(t)?[i.offset,a]:[0,i.offset]:[0,a]}let d=(l.slice(0,u).match(m)||[]).length,f=(l.slice(u,c).match(m)||[]).length;return[u+d,c+d+f]}(r,i);if(c===d)return"";let f=e[e.length-1]===y.hasNextSibling?y.ancestorHasNextSibling:y.ancestorIsLastChild,p=[...e.slice(0,e.length-1),f],g=Array(c+1).fill(" "),v=Array(d-c).fill(y.selectedChar),b=l.length+2,_=Array(n.length+b).fill(" ");return[y.selectedLine,p.join(" "),[..._,...g,...v].join("")].join(" ")+"\n"}({indent:r,isSelected:d,node:t,nodeKeyDisplay:n,selection:e,typeDisplay:c})}),null===e?": null":(0,o.I2P)(e)?function(e){let t="",r=S(e);t+=`: range ${""!==r?`{ ${r} }`:""} ${""!==e.style?`{ style: ${e.style} } `:""}`;let n=e.anchor,i=e.focus,o=n.offset,l=i.offset;return t+` 6 â anchor { key: ${n.key}, offset: ${null===o?"null":o}, type: ${n.type} } 7 â focus { key: ${i.key}, offset: ${null===l?"null":l}, type: ${i.type} }`}(e):(0,d.Ln)(e)?`: table 8 â { table: ${e.tableKey}, anchorCell: ${e.anchor.key}, focusCell: ${e.focus.key} }`:(0,o.RTZ)(e)?`: node 9 â [${Array.from(e._nodes).join(", ")}]`:""});if(v+="\n selection"+C,v+="\n\n commands:",t.length)for(let{index:e,type:r,payload:n}of t)v+=` 10 â ${e}. { type: ${r}, payload: ${n instanceof Event?n.constructor.name:n} }`;else v+="\n â None dispatched.";let{version:k}=e.constructor;return v+=` 11 12 editor${k?` (v${k})`:""}:`,v+=` 13 â namespace ${f.namespace}`,null!==p&&(v+=` 14 â compositionKey ${p}`),v+=` 15 â editable ${String(g)}`}(v,P,e,k)},ref:T})}},14912:(e,t,r)=>{"use strict";r.d(t,{Q:()=>i});let n=new Set(["equals","contains","not_equals","in","all","not_in","exists","greater_than","greater_than_equal","less_than","less_than_equal","like","not_like","within","intersects","near"]),i=e=>!!(e?.or&&e?.or?.length>0&&e?.or?.[0]?.and&&e?.or?.[0]?.and?.length>0)&&e.or.every(e=>!!(e.and&&Array.isArray(e.and))&&e.and.every(e=>{if("object"!=typeof e)return!1;let t=Object.keys(e);if(0===t.length)return!1;for(let r of t){let t=Object.keys(e[r])[0];if(!t||!n.has(t))return!1}return!0}))}
15,14994:(e,t,r)=>{"use strict";r.d(t,{r:()=>i});var n=r(43961);let i=(e,t,r)=>{let i={};return e&&(Object.keys(e).forEach(t=>{!0!==r&&e[t]?.disableFormData||(i[t]=e[t]?.value)}),t&&(i=(0,n.s)(i))),i}},15526:(e,t,r)=>{"use strict";r.d(t,{KS:()=>function e(t){if("object"!=typeof t||null===t||!("$$typeof"in t)||"symbol"!=typeof t.$$typeof){if("object"!=typeof t||null===t)return t;if(Array.isArray(t))return t.map(t=>"object"!=typeof t||null===t?t:e(t));if(t instanceof Date)return new Date(t);let r={};for(let n in t){let i=t[n];r[n]="object"!=typeof i||null===i?i:e(i)}return r}}});var n=r(44134).hp;function i(e){return e instanceof n?n.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}let o=new Map;o.set(Date,e=>new Date(e)),o.set(Map,(e,t)=>new Map(a(Array.from(e),t))),o.set(Set,(e,t)=>new Set(a(Array.from(e),t))),o.set(RegExp,e=>new RegExp(e.source,e.flags));let l=null;function a(e,t){let r=Object.keys(e),n=Array(r.length);for(let a=0;a<r.length;a++){let u=r[a],c=e[u];"object"!=typeof c||null===c?n[u]=c:c instanceof RegExp?n[u]=new RegExp(c.source,c.flags):c.constructor!==Object&&(l=o.get(c.constructor))?n[u]=l(c,t):ArrayBuffer.isView(c)?n[u]=i(c):n[u]=t(c)}return n}let u=e=>{if("object"!=typeof e||null===e)return e;if(Array.isArray(e))return a(e,u);if(e instanceof RegExp)return new RegExp(e.source,e.flags);if(e.constructor!==Object&&(l=o.get(e.constructor)))return l(e,u);let t={};for(let r in e){if(!1===Object.hasOwnProperty.call(e,r))continue;let n=e[r];"object"!=typeof n||null===n?t[r]=n:n instanceof RegExp?t[r]=new RegExp(n.source,n.flags):n.constructor!==Object&&(l=o.get(n.constructor))?t[r]=l(n,u):ArrayBuffer.isView(n)?t[r]=i(n):t[r]=u(n)}return t}},16490:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(79772),i=r(73274);t.default={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>(0,n._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:t,schema:r,parentSchema:o,it:l}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(l.opts.discriminator&&o.discriminator)return;let a=t.let("valid",!1),u=t.let("passing",null),c=t.name("_valid");e.setParams({passing:u}),t.block(function(){r.forEach((r,o)=>{let d;(0,i.alwaysValidSchema)(l,r)?t.var(c,!0):d=e.subschema({keyword:"oneOf",schemaProp:o,compositeRule:!0},c),o>0&&t.if((0,n._)`${c} && ${a}`).assign(a,!1).assign(u,(0,n._)`[${u}, ${o}]`).else(),t.if(c,()=>{t.assign(a,!0),t.assign(u,o),d&&e.mergeEvaluated(d,n.Name)})})}),e.result(a,()=>e.reset(),()=>e.error(!0))}}},16565:(e,t,r)=>{"use strict";r.d(t,{p:()=>n});let n=async e=>{let t;switch(e){case"ar":t=(await r.e(8085).then(r.bind(r,18085))).ar;break;case"az":t=(await r.e(933).then(r.bind(r,10933))).az;break;case"bg":t=(await r.e(8109).then(r.bind(r,78109))).bg;break;case"bn-BD":case"bn-IN":t=(await r.e(6797).then(r.bind(r,16797))).bn;break;case"ca":t=(await r.e(286).then(r.bind(r,50286))).ca;break;case"cs":t=(await r.e(2116).then(r.bind(r,82116))).cs;break;case"da":t=(await r.e(2382).then(r.bind(r,22382))).da;break;case"de":t=(await r.e(2713).then(r.bind(r,62713))).de;break;case"en-US":t=(await Promise.resolve().then(r.bind(r,83039))).enUS;break;case"es":t=(await r.e(3439).then(r.bind(r,13439))).es;break;case"et":t=(await r.e(5302).then(r.bind(r,5302))).et;break;case"fa-IR":t=(await r.e(5344).then(r.bind(r,95344))).faIR;break;case"fr":t=(await r.e(7981).then(r.bind(r,37981))).fr;break;case"he":t=(await r.e(7709).then(r.bind(r,67709))).he;break;case"hr":t=(await r.e(7039).then(r.bind(r,57039))).hr;break;case"hu":t=(await r.e(3033).then(r.bind(r,33033))).hu;break;case"it":t=(await r.e(9769).then(r.bind(r,69769))).it;break;case"ja":t=(await r.e(8885).then(r.bind(r,58885))).ja;break;case"ko":t=(await r.e(480).then(r.bind(r,20480))).ko;break;case"lt":t=(await r.e(5895).then(r.bind(r,75895))).lt;break;case"lv":t=(await r.e(7789).then(r.bind(r,17789))).lv;break;case"nb":t=(await r.e(3007).then(r.bind(r,93007))).nb;break;case"nl":t=(await r.e(6685).then(r.bind(r,96685))).nl;break;case"pl":t=(await r.e(9927).then(r.bind(r,39927))).pl;break;case"pt":t=(await r.e(5330).then(r.bind(r,95330))).pt;break;case"ro":t=(await r.e(8431).then(r.bind(r,48431))).ro;break;case"rs":t=(await r.e(3151).then(r.bind(r,23151))).sr;break;case"rs-Latin":t=(await r.e(4057).then(r.bind(r,14057))).srLatn;break;case"ru":t=(await r.e(1563).then(r.bind(r,31563))).ru;break;case"sk":t=(await r.e(6043).then(r.bind(r,96043))).sk;break;case"sl-SI":t=(await r.e(3577).then(r.bind(r,73577))).sl;break;case"sv":t=(await r.e(851).then(r.bind(r,20851))).sv;break;case"th":t=(await r.e(8066).then(r.bind(r,18066))).th;break;case"tr":t=(await r.e(8046).then(r.bind(r,38046))).tr;break;case"uk":t=(await r.e(501).then(r.bind(r,20501))).uk;break;case"vi":t=(await r.e(2967).then(r.bind(r,32967))).vi;break;case"zh-CN":t=(await r.e(8274).then(r.bind(r,98274))).zhCN;break;case"zh-TW":t=(await r.e(2704).then(r.bind(r,52704))).zhTW}return t?.default?t.default:t}},16924:(e,t,r)=>{"use strict";
15Object.defineProperty(t,"__esModule",{value:!0});let n=r(79772),i=r(54797),o=r(11930),l=r(24950),a=r(73274);t.default={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===i.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,n._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){let{gen:t,data:r,schema:u,parentSchema:c,it:d}=e,{oneOf:f}=c;if(!d.opts.discriminator)throw Error("discriminator: requires discriminator option");let p=u.propertyName;if("string"!=typeof p)throw Error("discriminator: requires propertyName");if(u.mapping)throw Error("discriminator: mapping is not supported");if(!f)throw Error("discriminator: requires oneOf keyword");let g=t.let("valid",!1),m=t.const("tag",(0,n._)`${r}${(0,n.getProperty)(p)}`);t.if((0,n._)`typeof ${m} == "string"`,()=>(function(){let r=function(){var e;let t={},r=i(c),n=!0;for(let t=0;t<f.length;t++){let c=f[t];if((null==c?void 0:c.$ref)&&!(0,a.schemaHasRulesButRef)(c,d.self.RULES)){let e=c.$ref;if((c=o.resolveRef.call(d.self,d.schemaEnv.root,d.baseId,e))instanceof o.SchemaEnv&&(c=c.schema),void 0===c)throw new l.default(d.opts.uriResolver,d.baseId,e)}let g=null==(e=null==c?void 0:c.properties)?void 0:e[p];if("object"!=typeof g)throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${p}"`);n=n&&(r||i(c)),function(e,t){if(e.const)u(e.const,t);else if(e.enum)for(let r of e.enum)u(r,t);else throw Error(`discriminator: "properties/${p}" must have "const" or "enum"`)}(g,t)}if(!n)throw Error(`discriminator: "${p}" must be required`);return t;function i({required:e}){return Array.isArray(e)&&e.includes(p)}function u(e,r){if("string"!=typeof e||e in t)throw Error(`discriminator: "${p}" values must be unique strings`);t[e]=r}}();for(let i in t.if(!1),r)t.elseIf((0,n._)`${m} === ${i}`),t.assign(g,function(r){let i=t.name("valid"),o=e.subschema({keyword:"oneOf",schemaProp:r},i);return e.mergeEvaluated(o,n.Name),i}(r[i]));t.else(),e.error(!1,{discrError:i.DiscrError.Mapping,tag:m,tagName:p}),t.endIf()})(),()=>e.error(!1,{discrError:i.DiscrError.Tag,tag:m,tagName:p})),e.ok(g)}}},17311:(e,t,r)=>{"use strict";r.d(t,{a:()=>n});let n=e=>e?e.or&&!e.and?{or:e.or.map(e=>e.and?e:{and:[e]})}:e.and&&!e.or?{or:[{and:e.and}]}:e.or||e.and?e:{or:[{and:[e]}]}:{}},17324:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(85331),i=r(81708),o=r(73274),l=r(3965);t.default={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:a,data:u,it:c}=e;"all"===c.opts.removeAdditional&&void 0===a.additionalProperties&&l.default.code(new n.KeywordCxt(c,l.default,"additionalProperties"));let d=(0,i.allSchemaProperties)(r);for(let e of d)c.definedProperties.add(e);c.opts.unevaluated&&d.length&&!0!==c.props&&(c.props=o.mergeEvaluated.props(t,(0,o.toHash)(d),c.props));let f=d.filter(e=>!(0,o.alwaysValidSchema)(c,r[e]));if(0===f.length)return;let p=t.name("valid");for(let n of f){var g;(g=n,c.opts.useDefaults&&!c.compositeRule&&void 0!==r[g].default)?m(n):(t.if((0,i.propertyInData)(t,u,n,c.opts.ownProperties)),m(n),c.allErrors||t.else().var(p,!0),t.endIf()),e.it.definedProperties.add(n),e.ok(p)}function m(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},p)}}}},17819:(e,t,r)=>{"use strict";r.d(t,{q:()=>p});var n=r(88849);let i=Object.prototype.hasOwnProperty,o=Array.isArray,l={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.D4,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},a=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},u=function(e,t){let r,u={__proto__:null},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,d=t.parameterLimit===1/0?void 0:t.parameterLimit,f=c.split(t.delimiter,d),p=-1,g=t.charset;if(t.charsetSentinel)for(r=0;r<f.length;++r)0===f[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===f[r]?g="utf-8":"utf8=%26%2310003%3B"===f[r]&&(g="iso-8859-1"),p=r,r=f.length);for(r=0;r<f.length;++r){let e,c;if(r===p)continue;let d=f[r],m=d.indexOf("]="),y=-1===m?d.indexOf("="):m+1;-1===y?(e=t.decoder(d,l.decoder,g,"key"),c=t.strictNullHandling?null:""):(e=t.decoder(d.slice(0,y),l.decoder,g,"key"),c=n.F7(a(d.slice(y+1),t),function(e){return t.decoder(e,l.decoder,g,"value")})),c&&t.interpretNumericEntities&&"iso-8859-1"===g&&(c=c.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})),d.indexOf("[]=")>-1&&(c=o(c)?[c]:c);let v=i.call(u,e);
15v&&"combine"===t.duplicates?u[e]=n.kg(u[e],c):v&&"last"!==t.duplicates||(u[e]=c)}return u},c=function(e,t,r,n){let i=n?t:a(t,r);for(let t=e.length-1;t>=0;--t){let n,o=e[t];if("[]"===o&&r.parseArrays)n=r.allowEmptyArrays&&""===i?[]:[].concat(i);else{n=r.plainObjects?Object.create(null):{};let e="["===o.charAt(0)&&"]"===o.charAt(o.length-1)?o.slice(1,-1):o,t=r.decodeDotInKeys?e.replace(/%2E/g,"."):e,l=parseInt(t,10);r.parseArrays||""!==t?!isNaN(l)&&o!==t&&String(l)===t&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(n=[])[l]=i:"__proto__"!==t&&(n[t]=i):n={0:i}}i=n}return i},d=function(e,t,r,n){if(!e)return;let o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,l=/(\[[^[\]]*])/g,a=r.depth>0&&/(\[[^[\]]*])/.exec(o),u=a?o.slice(0,a.index):o,d=[];if(u){if(!r.plainObjects&&i.call(Object.prototype,u)&&!r.allowPrototypes)return;d.push(u)}let f=0;for(;r.depth>0&&null!==(a=l.exec(o))&&f<r.depth;){if(f+=1,!r.plainObjects&&i.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;d.push(a[1])}return a&&d.push("["+o.slice(a.index)+"]"),c(d,t,r,n)},f=function(e){if(!e)return l;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");let t=void 0===e.charset?l.charset:e.charset,r=void 0===e.duplicates?l.duplicates:e.duplicates;if("combine"!==r&&"first"!==r&&"last"!==r)throw TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||l.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:l.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:l.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:l.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:l.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:l.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:l.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:l.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:l.decoder,delimiter:"string"==typeof e.delimiter||n.gd(e.delimiter)?e.delimiter:l.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:l.depth,duplicates:r,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:l.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:l.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:l.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:l.strictNullHandling}};function p(e,t){let r=f(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};let i="string"==typeof e?u(e,r):e,o=r.plainObjects?Object.create(null):{},l=Object.keys(i);for(let t=0;t<l.length;++t){let a=l[t],u=d(a,i[a],r,"string"==typeof e);o=n.h1(o,u,r)}return!0===r.allowSparse?o:n.oE(o)}},18744:e=>{"use strict";e.exports={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}},18940:(e,t,r)=>{"use strict";r.d(t,{VersionPillLabel:()=>p});var n=r(19749),i=r(95155),o=r(92825),l=r(58028),a=r(87677),u=r(78234),c=r(12115);let d="version-pill-label",f=(e,t)=>(0,i.jsx)(o.Pill,{pillStyle:t,size:"small",children:e}),p=e=>{let t,r=(0,n.c)(13),{currentlyPublishedVersion:p,disableDate:g,doc:m,labelFirst:y,labelOverride:v,labelStyle:b,labelSuffix:_,latestDraftVersion:w}=e,x=void 0!==g&&g,S=void 0!==y&&y,C=void 0===b?"pill":b,{config:k}=(0,l.b)(),{admin:T,localization:E}=k,{dateFormat:N}=T,{i18n:P,t:$}=(0,a.d)();if(r[0]!==p||r[1]!==N||r[2]!==x||r[3]!==m||r[4]!==P||r[5]!==S||r[6]!==v||r[7]!==C||r[8]!==_||r[9]!==w||r[10]!==E||r[11]!==$){var A;let{label:e,pillStyle:n}=function({currentlyPublishedVersion:e,latestDraftVersion:t,t:r,version:n}){let i=e?.updatedAt>t?.updatedAt;if("draft"===n.version._status)if(i)return{name:"draft",label:r("version:draft"),pillStyle:"light"};
15else return{name:n.id===t?.id?"currentDraft":"draft",label:r(n.id===t?.id?"version:currentDraft":"version:draft"),pillStyle:"light"};{let t=n.id===e?.id;return{name:t?"currentlyPublished":"previouslyPublished",label:r(t?"version:currentlyPublished":"version:previouslyPublished"),pillStyle:t?"success":"light"}}}({currentlyPublishedVersion:p,latestDraftVersion:w,t:$,version:m}),l=(0,i.jsxs)("span",{children:[v||e,_]}),a=!x&&m.updatedAt,g=a?(0,u.Yq)({date:m.updatedAt,i18n:P,pattern:N}):null,y=Array.isArray(m.publishedLocale)?m.publishedLocale[0]:m.publishedLocale,b=E&&(null==E?void 0:E.locales)?E.locales.find(e=>e.code===y):null,k=b?(null==b||null==(A=b.label)?void 0:A[null==P?void 0:P.language])||(null==b?void 0:b.label):null;t=(0,i.jsxs)("div",{className:d,children:[S?(0,i.jsxs)(c.Fragment,{children:["pill"===C?f(l,n):(0,i.jsx)("span",{className:"".concat(d,"-text"),children:l}),a&&(0,i.jsx)("span",{className:"".concat(d,"-date"),children:g})]}):(0,i.jsxs)(c.Fragment,{children:[a&&(0,i.jsx)("span",{className:"".concat(d,"-date"),children:g}),"pill"===C?f(l,n):(0,i.jsx)("span",{className:"".concat(d,"-text"),children:l})]}),k&&(0,i.jsx)(o.Pill,{children:k})]}),r[0]=p,r[1]=N,r[2]=x,r[3]=m,r[4]=P,r[5]=S,r[6]=v,r[7]=C,r[8]=_,r[9]=w,r[10]=E,r[11]=$,r[12]=t}else t=r[12];return t}},19749:(e,t,r)=>{"use strict";e.exports=r(4873)},19958:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});let n={src:"/_next/static/media/payload-favicon.7c819288.svg",height:1024,width:1024,blurWidth:0,blurHeight:0}},20385:(e,t,r)=>{"use strict";r.d(t,{I:()=>o,a:()=>i});var n=r(12115);let i=(0,n.createContext)({selectedLocales:[]}),o=()=>(0,n.use)(i)},20419:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(97208),i=r(88515),o=r(66183),l=r(79975),a=r(21116),u=r(90600),c=r(58208),d=r(3965),f=r(17324),p=r(92532),g=r(90234),m=r(56336),y=r(16490),v=r(27445),b=r(79558),_=r(76931);t.default=function(e=!1){let t=[g.default,m.default,y.default,v.default,b.default,_.default,c.default,d.default,u.default,f.default,p.default];return e?t.push(i.default,l.default):t.push(n.default,o.default),t.push(a.default),t}},21116:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(79772),i=r(73274);t.default={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?(0,n.str)`must contain at least ${e} valid item(s)`:(0,n.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?(0,n._)`{minContains: ${e}}`:(0,n._)`{minContains: ${e}, maxContains: ${t}}`},code(e){let t,r,{gen:o,schema:l,parentSchema:a,data:u,it:c}=e,{minContains:d,maxContains:f}=a;c.opts.next?(t=void 0===d?1:d,r=f):t=1;let p=o.const("len",(0,n._)`${u}.length`);if(e.setParams({min:t,max:r}),void 0===r&&0===t)return void(0,i.checkStrictMode)(c,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==r&&t>r){(0,i.checkStrictMode)(c,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,i.alwaysValidSchema)(c,l)){let i=(0,n._)`${p} >= ${t}`;void 0!==r&&(i=(0,n._)`${i} && ${p} <= ${r}`),e.pass(i);return}c.items=!0;let g=o.name("valid");function m(){let e=o.name("_valid"),i=o.let("count",0);y(e,()=>o.if(e,()=>{var e;return e=i,void(o.code((0,n._)`${e}++`),void 0===r?o.if((0,n._)`${e} >= ${t}`,()=>o.assign(g,!0).break()):(o.if((0,n._)`${e} > ${r}`,()=>o.assign(g,!1).break()),1===t?o.assign(g,!0):o.if((0,n._)`${e} >= ${t}`,()=>o.assign(g,!0))))}))}function y(t,r){o.forRange("i",0,p,n=>{e.subschema({keyword:"contains",dataProp:n,dataPropType:i.Type.Num,compositeRule:!0},t),r()})}void 0===r&&1===t?y(g,()=>o.if(g,()=>o.break())):0===t?(o.let(g,!0),void 0!==r&&o.if((0,n._)`${u}.length > 0`,m)):(o.let(g,!1),m()),e.result(g,()=>e.reset())}}},21526:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;let n=r(79772),i=r(73274);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:o,schemaPath:l,errSchemaPath:a,topSchemaRef:u}){if(void 0!==t&&void 0!==o)throw Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){let o=e.schema[t];return void 0===r?{schema:o,schemaPath:(0,n._)`${e.schemaPath}${(0,n.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:o[r],schemaPath:(0,n._)`${e.schemaPath}${(0,n.getProperty)(t)}${(0,n.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,i.escapeFragment)(r)}`}}
15if(void 0!==o){if(void 0===l||void 0===a||void 0===u)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:l,topSchemaRef:u,errSchemaPath:a}}throw Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:o,data:l,dataTypes:a,propertyName:u}){if(void 0!==l&&void 0!==r)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:c}=t;if(void 0!==r){let{errorPath:l,dataPathArr:a,opts:u}=t;d(c.let("data",(0,n._)`${t.data}${(0,n.getProperty)(r)}`,!0)),e.errorPath=(0,n.str)`${l}${(0,i.getErrorPath)(r,o,u.jsPropertySyntax)}`,e.parentDataProperty=(0,n._)`${r}`,e.dataPathArr=[...a,e.parentDataProperty]}function d(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}void 0!==l&&(d(l instanceof n.Name?l:c.let("data",l,!0)),void 0!==u&&(e.propertyName=u)),a&&(e.dataTypes=a)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){void 0!==n&&(e.compositeRule=n),void 0!==i&&(e.createErrors=i),void 0!==o&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r}},23851:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;let n=r(91955),i=r(97825),o=r(16924),l=r(2426),a=["/properties"],u="http://json-schema.org/draft-07/schema";class c extends n.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(l,a):l;this.addMetaSchema(e,u,!1),this.refs["http://json-schema.org/schema"]=u}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(u)?u:void 0)}}t.Ajv=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var d=r(85331);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var f=r(79772);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}});var p=r(74455);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var g=r(24950);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return g.default}})},23999:(e,t,r)=>{"use strict";r.d(t,{Cd:()=>v,I2:()=>p,MT:()=>l,Vh:()=>u,Z7:()=>g,aO:()=>c,eE:()=>o,jY:()=>y,pz:()=>m,sd:()=>i,uT:()=>f,vs:()=>a,zj:()=>d});var n=r(49509);function i(e){return"group"===e.type||"array"===e.type||"row"===e.type||"collapsible"===e.type}function o(e){return"array"===e.type}function l(e){return"blocks"===e.type}function a(e){return"object"==typeof e}function u(e){return Array.isArray(e)&&"object"==typeof e?.[0]}function c(e){return"ui"===e.type}function d(e){return"admin"in e&&"position"in e.admin&&"sidebar"===e.admin.position}function f(e){return"name"in e&&"id"===e.name}function p(e){return"hidden"in e&&e.hidden||"admin"in e&&"disabled"in e.admin&&e.admin.disabled}function g(e){return"name"in e&&!c(e)}function m(e){return"name"in e}function y(e){return"name"in e}function v({field:e,parentIsLocalized:t}){return"localized"in e&&e.localized&&(!t||"true"===n.env.NEXT_PUBLIC_PAYLOAD_COMPATIBILITY_allowLocalizedWithinLocalized)}},24627:(e,t,r)=>{"use strict";r.d(t,{m:()=>n});let n=e=>{let t=e.split(" ");return RegExp(t.reduce((e,r,n)=>{let i=r.replace(/[\\^$*+?.()|[\]{}]/g,"\\$&");return`${e}(?=.*(?:(?:[^\\p{L}\\p{N}])|^).*${i}.*(?=[^\\p{L}\\p{N}]|$))${n+1===t.length?".+":""}`},""),"i")}},24950:(e,t,r)=>{"use strict";
15Object.defineProperty(t,"__esModule",{value:!0});let n=r(4186);class i extends Error{constructor(e,t,r,i){super(i||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,n.resolveUrl)(e,t,r),this.missingSchema=(0,n.normalizeId)((0,n.getFullPath)(e,this.missingRef))}}t.default=i},25472:(e,t,r)=>{"use strict";let n;r.d(t,{Mp:()=>ti,Hd:()=>tb,vL:()=>a,uN:()=>eM,AN:()=>eL,fp:()=>eo,y$:()=>el,Sj:()=>eh,Vy:()=>en,sl:()=>eg,TT:()=>es,Qo:()=>ea,fF:()=>ts,E5:()=>q,PM:()=>ta,zM:()=>tc,MS:()=>Y,FR:()=>Z});var i,o,l,a,u,c,d,f,p,g,m=r(12115),y=r(47650);let v="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function b(e){let t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function _(e){return"nodeType"in e}function w(e){var t,r;return e?b(e)?e:_(e)&&null!=(t=null==(r=e.ownerDocument)?void 0:r.defaultView)?t:window:window}function x(e){let{Document:t}=w(e);return e instanceof t}function S(e){return!b(e)&&e instanceof w(e).HTMLElement}function C(e){return e instanceof w(e).SVGElement}function k(e){return e?b(e)?e.document:_(e)?x(e)?e:S(e)||C(e)?e.ownerDocument:document:document:document}let T=v?m.useLayoutEffect:m.useEffect;function E(e){let t=(0,m.useRef)(e);return T(()=>{t.current=e}),(0,m.useCallback)(function(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return null==t.current?void 0:t.current(...r)},[])}function N(e,t){void 0===t&&(t=[e]);let r=(0,m.useRef)(e);return T(()=>{r.current!==e&&(r.current=e)},t),r}function P(e,t){let r=(0,m.useRef)();return(0,m.useMemo)(()=>{let t=e(r.current);return r.current=t,t},[...t])}function $(e){let t=E(e),r=(0,m.useRef)(null),n=(0,m.useCallback)(e=>{e!==r.current&&(null==t||t(e,r.current)),r.current=e},[]);return[r,n]}function A(e){let t=(0,m.useRef)();return(0,m.useEffect)(()=>{t.current=e},[e]),t.current}let O={};function j(e,t){return(0,m.useMemo)(()=>{if(t)return t;let r=null==O[e]?0:O[e]+1;return O[e]=r,e+"-"+r},[e,t])}function M(e){return function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return n.reduce((t,r)=>{for(let[n,i]of Object.entries(r)){let r=t[n];null!=r&&(t[n]=r+e*i)}return t},{...t})}}let D=M(1),R=M(-1);function I(e){if(!e)return!1;let{KeyboardEvent:t}=w(e.target);return t&&e instanceof t}function F(e){if(function(e){if(!e)return!1;let{TouchEvent:t}=w(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return"clientX"in e&&"clientY"in e?{x:e.clientX,y:e.clientY}:null}let L=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[L.Translate.toString(e),L.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}}),B="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]",z={display:"none"};function U(e){let{id:t,value:r}=e;return m.createElement("div",{id:t,style:z},r)}function K(e){let{id:t,announcement:r,ariaLiveType:n="assertive"}=e;return m.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":n,"aria-atomic":!0},r)}let W=(0,m.createContext)(null);function q(e){let t=(0,m.useContext)(W);(0,m.useEffect)(()=>{if(!t)throw Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}let V={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},J={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function H(e){let{announcements:t=J,container:r,hiddenTextDescribedById:n,screenReaderInstructions:i=V}=e,{announce:o,announcement:l}=function(){let[e,t]=(0,m.useState)("");return{announce:(0,m.useCallback)(e=>{null!=e&&t(e)},[]),announcement:e}}(),a=j("DndLiveRegion"),[u,c]=(0,m.useState)(!1);if((0,m.useEffect)(()=>{c(!0)},[]),q((0,m.useMemo)(()=>({onDragStart(e){let{active:r}=e;o(t.onDragStart({active:r}))},onDragMove(e){let{active:r,over:n}=e;t.onDragMove&&o(t.onDragMove({active:r,over:n}))},onDragOver(e){let{active:r,over:n}=e;o(t.onDragOver({active:r,over:n}))},onDragEnd(e){let{active:r,over:n}=e;o(t.onDragEnd({active:r,over:n}))},onDragCancel(e){let{active:r,over:n}=e;
15o(t.onDragCancel({active:r,over:n}))}}),[o,t])),!u)return null;let d=m.createElement(m.Fragment,null,m.createElement(U,{id:n,value:i.draggable}),m.createElement(K,{id:a,announcement:l}));return r?(0,y.createPortal)(d,r):d}function G(){}function Y(e,t){return(0,m.useMemo)(()=>({sensor:e,options:null!=t?t:{}}),[e,t])}function Z(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,m.useMemo)(()=>[...t].filter(e=>null!=e),[...t])}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(i||(i={}));let X=Object.freeze({x:0,y:0});function Q(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function ee(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function et(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function er(e){let{left:t,top:r,height:n,width:i}=e;return[{x:t,y:r},{x:t+i,y:r},{x:t,y:r+n},{x:t+i,y:r+n}]}function en(e,t){if(!e||0===e.length)return null;let[r]=e;return t?r[t]:r}function ei(e,t,r){return void 0===t&&(t=e.left),void 0===r&&(r=e.top),{x:t+.5*e.width,y:r+.5*e.height}}let eo=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e,i=ei(t,t.left,t.top),o=[];for(let e of n){let{id:t}=e,n=r.get(t);if(n){let r=Q(ei(n),i);o.push({id:t,data:{droppableContainer:e,value:r}})}}return o.sort(ee)},el=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e,i=er(t),o=[];for(let e of n){let{id:t}=e,n=r.get(t);if(n){let r=er(n),l=Number((i.reduce((e,t,n)=>e+Q(r[n],t),0)/4).toFixed(4));o.push({id:t,data:{droppableContainer:e,value:l}})}}return o.sort(ee)},ea=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e,i=[];for(let e of n){let{id:n}=e,o=r.get(n);if(o){let r=function(e,t){let r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height);if(n<i&&r<o){let l=t.width*t.height,a=e.width*e.height,u=(i-n)*(o-r);return Number((u/(l+a-u)).toFixed(4))}return 0}(o,t);r>0&&i.push({id:n,data:{droppableContainer:e,value:r}})}}return i.sort(et)},es=e=>{let{droppableContainers:t,droppableRects:r,pointerCoordinates:n}=e;if(!n)return[];let i=[];for(let e of t){let{id:t}=e,o=r.get(t);if(o&&function(e,t){let{top:r,left:n,bottom:i,right:o}=t;return r<=e.y&&e.y<=i&&n<=e.x&&e.x<=o}(n,o)){let r=Number((er(o).reduce((e,t)=>e+Q(n,t),0)/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:r}})}}return i.sort(ee)};function eu(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:X}let ec=function(e){return function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return n.reduce((t,r)=>({...t,top:t.top+e*r.y,bottom:t.bottom+e*r.y,left:t.left+e*r.x,right:t.right+e*r.x}),{...t})}}(1);function ed(e){if(e.startsWith("matrix3d(")){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}let ef={ignoreTransform:!1};function eh(e,t){void 0===t&&(t=ef);let r=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:n}=w(e).getComputedStyle(e);t&&(r=function(e,t,r){let n=ed(t);if(!n)return e;let{scaleX:i,scaleY:o,x:l,y:a}=n,u=e.left-l-(1-i)*parseFloat(r),c=e.top-a-(1-o)*parseFloat(r.slice(r.indexOf(" ")+1)),d=i?e.width/i:e.width,f=o?e.height/o:e.height;return{width:d,height:f,top:c,right:u+d,bottom:c+f,left:u}}(r,t,n))}let{top:n,left:i,width:o,height:l,bottom:a,right:u}=r;return{top:n,left:i,width:o,height:l,bottom:a,right:u}}function ep(e){return eh(e,{ignoreTransform:!0})}function eg(e,t){let r=[];return e?function n(i){var o;if(null!=t&&r.length>=t||!i)return r;if(x(i)&&null!=i.scrollingElement&&!r.includes(i.scrollingElement))return r.push(i.scrollingElement),r;if(!S(i)||C(i)||r.includes(i))return r;let l=w(e).getComputedStyle(i);return(i!==e&&function(e,t){void 0===t&&(t=w(e).getComputedStyle(e));let r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{let n=t[e];return"string"==typeof n&&r.test(n)})}(i,l)&&r.push(i),void 0===(o=l)&&(o=w(i).getComputedStyle(i)),"fixed"===o.position)?r:n(i.parentNode)}(e):r}function em(e){let[t]=eg(e,1);return null!=t?t:null}function ey(e){return v&&e?b(e)?e:_(e)?x(e)||e===k(e).scrollingElement?window:S(e)?e:null:null:null}function ev(e){return b(e)?e.scrollX:e.scrollLeft}function eb(e){return b(e)?e.scrollY:e.scrollTop}function e_(e){return{x:ev(e),y:eb(e)}}function ew(e){return!!v&&!!e&&e===document.scrollingElement}function ex(e){let t={x:0,y:0},r=ew(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},n={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},i=e.scrollTop<=t.y,o=e.scrollLeft<=t.x;return{isTop:i,isLeft:o,isBottom:e.scrollTop>=n.y,isRight:e.scrollLeft>=n.x,maxScroll:n,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(o||(o={}));let eS={x:.2,y:.2};function eC(e){return e.reduce((e,t)=>
15D(e,e_(t)),X)}function ek(e,t){if(void 0===t&&(t=eh),!e)return;let{top:r,left:n,bottom:i,right:o}=t(e);em(e)&&(i<=0||o<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}let eT=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+ev(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+eb(t),0)}]];class eE{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let r=eg(t),n=eC(r);for(let[t,i,o]of(this.rect={...e},this.width=e.width,this.height=e.height,eT))for(let e of i)Object.defineProperty(this,e,{get:()=>{let i=o(r),l=n[t]-i;return this.rect[e]+l},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class eN{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,r){var n;null==(n=this.target)||n.addEventListener(e,t,r),this.listeners.push([e,t,r])}}function eP(e,t){let r=Math.abs(e.x),n=Math.abs(e.y);return"number"==typeof t?Math.sqrt(r**2+n**2)>t:"x"in t&&"y"in t?r>t.x&&n>t.y:"x"in t?r>t.x:"y"in t&&n>t.y}function e$(e){e.preventDefault()}function eA(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(l||(l={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"}(a||(a={}));let eO={start:[a.Space,a.Enter],cancel:[a.Esc],end:[a.Space,a.Enter]},ej=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case a.Right:return{...r,x:r.x+25};case a.Left:return{...r,x:r.x-25};case a.Down:return{...r,y:r.y+25};case a.Up:return{...r,y:r.y-25}}};class eM{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new eN(k(t)),this.windowListeners=new eN(w(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(l.Resize,this.handleCancel),this.windowListeners.add(l.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(l.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,r=e.node.current;r&&ek(r),t(X)}handleKeyDown(e){if(I(e)){let{active:t,context:r,options:n}=this.props,{keyboardCodes:i=eO,coordinateGetter:o=ej,scrollBehavior:l="smooth"}=n,{code:u}=e;if(i.end.includes(u))return void this.handleEnd(e);if(i.cancel.includes(u))return void this.handleCancel(e);let{collisionRect:c}=r.current,d=c?{x:c.left,y:c.top}:X;this.referenceCoordinates||(this.referenceCoordinates=d);let f=o(e,{active:t,context:r.current,currentCoordinates:d});if(f){let t=R(f,d),n={x:0,y:0},{scrollableAncestors:i}=r.current;for(let r of i){let i=e.code,{isTop:o,isRight:u,isLeft:c,isBottom:
15d,maxScroll:p,minScroll:g}=ex(r),m=function(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:r,right:n,bottom:i}=e.getBoundingClientRect();return{top:t,left:r,right:n,bottom:i,width:e.clientWidth,height:e.clientHeight}}(r),y={x:Math.min(i===a.Right?m.right-m.width/2:m.right,Math.max(i===a.Right?m.left:m.left+m.width/2,f.x)),y:Math.min(i===a.Down?m.bottom-m.height/2:m.bottom,Math.max(i===a.Down?m.top:m.top+m.height/2,f.y))},v=i===a.Right&&!u||i===a.Left&&!c,b=i===a.Down&&!d||i===a.Up&&!o;if(v&&y.x!==f.x){let e=r.scrollLeft+t.x,o=i===a.Right&&e<=p.x||i===a.Left&&e>=g.x;if(o&&!t.y)return void r.scrollTo({left:e,behavior:l});o?n.x=r.scrollLeft-e:n.x=i===a.Right?r.scrollLeft-p.x:r.scrollLeft-g.x,n.x&&r.scrollBy({left:-n.x,behavior:l});break}if(b&&y.y!==f.y){let e=r.scrollTop+t.y,o=i===a.Down&&e<=p.y||i===a.Up&&e>=g.y;if(o&&!t.x)return void r.scrollTo({top:e,behavior:l});o?n.y=r.scrollTop-e:n.y=i===a.Down?r.scrollTop-p.y:r.scrollTop-g.y,n.y&&r.scrollBy({top:-n.y,behavior:l});break}}this.handleMove(e,D(R(f,this.referenceCoordinates),n))}}}handleMove(e,t){let{onMove:r}=this.props;e.preventDefault(),r(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function eD(e){return!!(e&&"distance"in e)}function eR(e){return!!(e&&"delay"in e)}eM.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=eO,onActivation:i}=t,{active:o}=r,{code:l}=e.nativeEvent;if(n.start.includes(l)){let t=o.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==i||i({event:e.nativeEvent}),!0)}return!1}}];class eI{constructor(e,t,r){var n;void 0===r&&(r=function(e){let{EventTarget:t}=w(e);return e instanceof t?e:k(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:i}=e,{target:o}=i;this.props=e,this.events=t,this.document=k(o),this.documentListeners=new eN(this.document),this.listeners=new eN(r),this.windowListeners=new eN(w(o)),this.initialCoordinates=null!=(n=F(i))?n:X,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(l.Resize,this.handleCancel),this.windowListeners.add(l.DragStart,e$),this.windowListeners.add(l.VisibilityChange,this.handleCancel),this.windowListeners.add(l.ContextMenu,e$),this.documentListeners.add(l.Keydown,this.handleKeydown),t){if(eD(t))return;if(eR(t)){this.timeoutId=setTimeout(this.handleStart,t.delay);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(l.Click,eA,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(l.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;let{activated:r,initialCoordinates:n,props:i}=this,{onMove:o,options:{activationConstraint:l}}=i;if(!n)return;let a=null!=(t=F(e))?t:X,u=R(n,a);if(!r&&l){if(eR(l))return eP(u,l.tolerance)?this.handleCancel():void 0;if(eD(l))return null!=l.tolerance&&eP(u,l.tolerance)?this.handleCancel():eP(u,l.distance)?this.handleStart():void 0}e.cancelable&&e.preventDefault(),o(a)}handleEnd(){let{onEnd:e}=this.props;this.detach(),e()}handleCancel(){let{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===a.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}let eF={move:{name:"pointermove"},end:{name:"pointerup"}};class eL extends eI{constructor(e){let{event:t}=e;super(e,eF,k(t.target))}}eL.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return!!r.isPrimary&&0===r.button&&(null==n||n({event:r}),!0)}}];let eB={move:{name:"mousemove"},end:{name:"mouseup"}};!function(e){e[e.RightClick=2]="RightClick"}(u||(u={}));class ez extends eI{constructor(e){super(e,eB,k(e.event.target))}}ez.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button!==u.RightClick&&(null==n||n({event:r}),!0)}}];let eU={move:{name:"touchmove"},end:{name:"touchend"}};class eK extends eI{constructor(e){super(e,eU)}static setup(){return window.addEventListener(eU.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(eU.move.name,e)};function e(){}}}eK.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t,{touches:i}=r;return!(i.length>1)&&(null==n||n({event:r}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(c||(c={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="Rever
15sedTreeOrder"}(d||(d={}));let eW={x:{[o.Backward]:!1,[o.Forward]:!1},y:{[o.Backward]:!1,[o.Forward]:!1}};!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(f||(f={})),(p||(p={})).Optimized="optimized";let eq=new Map;function eV(e,t){return P(r=>e?r||("function"==typeof t?t(e):e):null,[t,e])}function eJ(e){let{callback:t,disabled:r}=e,n=E(t),i=(0,m.useMemo)(()=>{if(r||"undefined"==typeof window||void 0===window.ResizeObserver)return;let{ResizeObserver:e}=window;return new e(n)},[r]);return(0,m.useEffect)(()=>()=>null==i?void 0:i.disconnect(),[i]),i}function eH(e){return new eE(eh(e),e)}function eG(e,t,r){void 0===t&&(t=eH);let[n,i]=(0,m.useReducer)(function(n){if(!e)return null;if(!1===e.isConnected){var i;return null!=(i=null!=n?n:r)?i:null}let o=t(e);return JSON.stringify(n)===JSON.stringify(o)?n:o},null),o=function(e){let{callback:t,disabled:r}=e,n=E(t),i=(0,m.useMemo)(()=>{if(r||"undefined"==typeof window||void 0===window.MutationObserver)return;let{MutationObserver:e}=window;return new e(n)},[n,r]);return(0,m.useEffect)(()=>()=>null==i?void 0:i.disconnect(),[i]),i}({callback(t){if(e)for(let r of t){let{type:t,target:n}=r;if("childList"===t&&n instanceof HTMLElement&&n.contains(e)){i();break}}}}),l=eJ({callback:i});return T(()=>{i(),e?(null==l||l.observe(e),null==o||o.observe(document.body,{childList:!0,subtree:!0})):(null==l||l.disconnect(),null==o||o.disconnect())},[e]),n}let eY=[];function eZ(e,t){void 0===t&&(t=[]);let r=(0,m.useRef)(null);return(0,m.useEffect)(()=>{r.current=null},t),(0,m.useEffect)(()=>{let t=e!==X;t&&!r.current&&(r.current=e),!t&&r.current&&(r.current=null)},[e]),r.current?R(e,r.current):X}function eX(e){return(0,m.useMemo)(()=>e?function(e){let t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}(e):null,[e])}let eQ=[];function e0(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return S(t)?t:e}let e1=[{sensor:eL,options:{}},{sensor:eM,options:{}}],e2={current:{}},e5={draggable:{measure:ep},droppable:{measure:ep,strategy:f.WhileDragging,frequency:p.Optimized},dragOverlay:{measure:eh}};class e7 extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,r;return null!=(t=null==(r=this.get(e))?void 0:r.node.current)?t:void 0}}let e4={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new e7,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:G},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:e5,measureDroppableContainers:G,windowRect:null,measuringScheduled:!1},e3={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:G,draggableNodes:new Map,over:null,measureDroppableContainers:G},e8=(0,m.createContext)(e3),e9=(0,m.createContext)(e4);function e6(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new e7}}}function te(e,t){switch(t.type){case i.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case i.DragMove:if(!e.draggable.active)return e;return{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case i.DragEnd:case i.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case i.RegisterDroppable:{let{element:r}=t,{id:n}=r,i=new e7(e.droppable.containers);return i.set(n,r),{...e,droppable:{...e.droppable,containers:i}}}case i.SetDroppableDisabled:{let{id:r,key:n,disabled:i}=t,o=e.droppable.containers.get(r);if(!o||n!==o.key)return e;let l=new e7(e.droppable.containers);return l.set(r,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:l}}}case i.UnregisterDroppable:{let{id:r,key:n}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;
15let o=new e7(e.droppable.containers);return o.delete(r),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function tt(e){let{disabled:t}=e,{active:r,activatorEvent:n,draggableNodes:i}=(0,m.useContext)(e8),o=A(n),l=A(null==r?void 0:r.id);return(0,m.useEffect)(()=>{if(!t&&!n&&o&&null!=l){if(!I(o)||document.activeElement===o.target)return;let e=i.get(l);if(!e)return;let{activatorNode:t,node:r}=e;(t.current||r.current)&&requestAnimationFrame(()=>{for(let e of[t.current,r.current]){if(!e)continue;let t=e.matches(B)?e:e.querySelector(B);if(t){t.focus();break}}})}},[n,t,i,l,o]),null}function tr(e,t){let{transform:r,...n}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...n}),r):r}let tn=(0,m.createContext)({...X,scaleX:1,scaleY:1});!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(g||(g={}));let ti=(0,m.memo)(function(e){var t,r,n,l,a,u;let{id:p,accessibility:b,autoScroll:_=!0,children:x,sensors:C=e1,collisionDetection:k=ea,measuring:E,modifiers:O,...M}=e,[R,I]=(0,m.useReducer)(te,void 0,e6),[L,B]=function(){let[e]=(0,m.useState)(()=>new Set),t=(0,m.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,m.useCallback)(t=>{let{type:r,event:n}=t;e.forEach(e=>{var t;return null==(t=e[r])?void 0:t.call(e,n)})},[e]),t]}(),[z,U]=(0,m.useState)(g.Uninitialized),K=z===g.Initialized,{draggable:{active:q,nodes:V,translate:J},droppable:{containers:G}}=R,Y=q?V.get(q):null,Z=(0,m.useRef)({initial:null,translated:null}),Q=(0,m.useMemo)(()=>{var e;return null!=q?{id:q,data:null!=(e=null==Y?void 0:Y.data)?e:e2,rect:Z}:null},[q,Y]),ee=(0,m.useRef)(null),[et,er]=(0,m.useState)(null),[ei,eo]=(0,m.useState)(null),el=N(M,Ob
15ject.values(M)),es=j("DndDescribedBy",p),ed=(0,m.useMemo)(()=>G.getEnabled(),[G]),ef=(0,m.useMemo)(()=>({draggable:{...e5.draggable,...null==E?void 0:E.draggable},droppable:{...e5.droppable,...null==E?void 0:E.droppable},dragOverlay:{...e5.dragOverlay,...null==E?void 0:E.dragOverlay}}),[null==E?void 0:E.draggable,null==E?void 0:E.droppable,null==E?void 0:E.dragOverlay]),{droppableRects:ep,measureDroppableContainers:ev,measuringScheduled:eb}=function(e,t){let{dragging:r,dependencies:n,config:i}=t,[o,l]=(0,m.useState)(null),{frequency:a,measure:u,strategy:c}=i,d=(0,m.useRef)(e),p=function(){switch(c){case f.Always:return!1;case f.BeforeDragging:return r;default:return!r}}(),g=N(p),y=(0,m.useCallback)(function(e){void 0===e&&(e=[]),g.current||l(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[g]),v=(0,m.useRef)(null),b=P(t=>{if(p&&!r)return eq;if(!t||t===eq||d.current!==e||null!=o){let t=new Map;for(let r of e){if(!r)continue;if(o&&o.length>0&&!o.includes(r.id)&&r.rect.current){t.set(r.id,r.rect.current);continue}let e=r.node.current,n=e?new eE(u(e),e):null;r.rect.current=n,n&&t.set(r.id,n)}return t}return t},[e,o,r,p,u]);return(0,m.useEffect)(()=>{d.current=e},[e]),(0,m.useEffect)(()=>{p||y()},[r,p]),(0,m.useEffect)(()=>{o&&o.length>0&&l(null)},[JSON.stringify(o)]),(0,m.useEffect)(()=>{p||"number"!=typeof a||null!==v.current||(v.current=setTimeout(()=>{y(),v.current=null},a))},[a,p,y,...n]),{droppableRects:b,measureDroppableContainers:y,measuringScheduled:null!=o}}(ed,{dragging:K,dependencies:[J.x,J.y],config:ef.droppable}),ek=function(e,t){let r=null!==t?e.get(t):void 0,n=r?r.node.current:null;return P(e=>{var r;return null===t?null:null!=(r=null!=n?n:e)?r:null},[n,t])}(V,q),eT=(0,m.useMemo)(()=>ei?F(ei):null,[ei]),eN=function(){let e=(null==et?void 0:et.autoScrollEnabled)===!1,t="object"==typeof _?!1===_.enabled:!1===_,r=K&&!e&&!t;return"object"==typeof _?{..._,enabled:r}:{enabled:r}}(),eP=eV(ek,ef.draggable.measure);!function(e){let{activeNode:t,measure:r,initialRect:n,config:i=!0}=e,o=(0,m.useRef)(!1),{x:l,y:a}="boolean"==typeof i?{x:i,y:i}:i;T(()=>{if(!l&&!a||!t){o.current=!1;return}if(o.current||!n)return;let e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;let i=eu(r(e),n);if(l||(i.x=0),a||(i.y=0),o.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){let t=em(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,l,a,n,r])}({activeNode:q?V.get(q):null,config:eN.layoutShiftCompensation,initialRect:eP,measure:ef.draggable.measure});let e$=eG(ek,ef.draggable.measure,eP),eA=eG(ek?ek.parentElement:null),eO=(0,m.useRef)({activatorEvent:null,active:null,activeNode:ek,collisionRect:null,collisions:null,droppableRects:ep,draggableNodes:V,draggingNode:null,draggingNodeRect:null,droppableContainers:G,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ej=G.getNodeFor(null==(t=eO.current.over)?void 0:t.id),eM=function(e){let{measure:t}=e,[r,n]=(0,m.useState)(null),i=eJ({callback:(0,m.useCallback)(e=>{for(let{target:r}of e)if(S(r)){n(e=>{let n=t(r);return e?{...e,width:n.width,height:n.height}:n});break}},[t])}),[o,l]=$((0,m.useCallback)(e=>{let r=e0(e);null==i||i.disconnect(),r&&(null==i||i.observe(r)),n(r?t(r):null)},[t,i]));return(0,m.useMemo)(()=>({nodeRef:o,rect:r,setRef:l}),[r,o,l])}({measure:ef.dragOverlay.measure}),eD=null!=(r=eM.nodeRef.current)?r:ek,eR=K?null!=(n=eM.rect)?n:e$:null,eI=!!(eM.nodeRef.current&&eM.rect),eF=function(e){let t=eV(e);return eu(e,t)}(eI?null:e$),eL=eX(eD?w(eD):null),eB=function(e){let t=(0,m.useRef)(e),r=P(r=>e?r&&r!==eY&&e&&t.current&&e.parentNode===t.current.parentNode?r:eg(e):eY,[e]);return(0,m.useEffect)(()=>{t.current=e},[e]),r}(K?null!=ej?ej:ek:null),ez=function(e,t){void 0===t&&(t=eh);let[r]=e,n=eX(r?w(r):null),[i,o]=(0,m.useReducer)(function(){return e.length?e.map(e=>ew(e)?n:new eE(t(e),e)):eQ},eQ),l=eJ({callback:o});return e.length>0&&i===eQ&&o(),T(()=>{e.length?e.forEach(e=>null==l?void 0:l.observe(e)):(null==l||l.disconnect(),o())},[e]),i}(eB),eU=tr(O,{transform:{x:J.x-eF.x,y:J.y-eF.y,scaleX:1,scaleY:1},activatorEvent:ei,active:Q,activeNodeRect:e$,containerNodeRect:eA,draggingNodeRect:eR,over:eO.current.over,overlayNodeRect:eM.rect,scrollableAncestors:eB,scrollableAncestorRects:ez,windowRect:eL}),eK=eT?D(eT,J):null,eH=function(e){let[t,r]=(0,m.useState)(null),n=(0,m.useRef)(e),i=(0,m.useCallback)(e=>{let t=ey(e.target);t&&r(e=>e?(e.set(t,e_(t)),new Map(e)):null)},[]);return(0,m.useEffect)(()=>{let t=n.current;if(e!==t){o(t);let l=e.map(e=>{let t=ey(e);return t?(t.addEventListener("scroll",i,{passive:!0}),[t,e_(t)]):null}).filter(e=>null!=e);r(l.length?new Map(l):null),n.current=e}return()=>{o(e),o(t)};
15function o(e){e.forEach(e=>{let t=ey(e);null==t||t.removeEventListener("scroll",i)})}},[i,e]),(0,m.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>D(e,t),X):eC(e):X,[e,t])}(eB),e7=eZ(eH),e4=eZ(eH,[e$]),e3=D(eU,e7),ti=eR?ec(eR,eU):null,to=Q&&ti?k({active:Q,collisionRect:ti,droppableRects:ep,droppableContainers:ed,pointerCoordinates:eK}):null,tl=en(to,"id"),[ta,ts]=(0,m.useState)(null),tu=(a=eI?eU:D(eU,e4),u=null!=(l=null==ta?void 0:ta.rect)?l:null,{...a,scaleX:u&&e$?u.width/e$.width:1,scaleY:u&&e$?u.height/e$.height:1}),tc=(0,m.useCallback)((e,t)=>{let{sensor:r,options:n}=t;if(null==ee.current)return;let o=V.get(ee.current);if(!o)return;let l=e.nativeEvent,a=new r({active:ee.current,activeNode:o,event:l,options:n,context:eO,onStart(e){let t=ee.current;if(null==t)return;let r=V.get(t);if(!r)return;let{onDragStart:n}=el.current,o={active:{id:t,data:r.data,rect:Z}};(0,y.unstable_batchedUpdates)(()=>{null==n||n(o),U(g.Initializing),I({type:i.DragStart,initialCoordinates:e,active:t}),L({type:"onDragStart",event:o})})},onMove(e){I({type:i.DragMove,coordinates:e})},onEnd:u(i.DragEnd),onCancel:u(i.DragCancel)});function u(e){return async function(){let{active:t,collisions:r,over:n,scrollAdjustedTranslate:o}=eO.current,a=null;if(t&&o){let{cancelDrop:u}=el.current;a={activatorEvent:l,active:t,collisions:r,delta:o,over:n},e===i.DragEnd&&"function"==typeof u&&await Promise.resolve(u(a))&&(e=i.DragCancel)}ee.current=null,(0,y.unstable_batchedUpdates)(()=>{I({type:e}),U(g.Uninitialized),ts(null),er(null),eo(null);let t=e===i.DragEnd?"onDragEnd":"onDragCancel";if(a){let e=el.current[t];null==e||e(a),L({type:t,event:a})}})}}(0,y.unstable_batchedUpdates)(()=>{er(a),eo(e.nativeEvent)})},[V]),td=(0,m.useCallback)((e,t)=>(r,n)=>{let i=r.nativeEvent,o=V.get(n);null!==ee.current||!o||i.dndKit||i.defaultPrevented||!0===e(r,t.options,{active:o})&&(i.dndKit={capturedBy:t.sensor},ee.current=n,tc(r,t))},[V,tc]),tf=(0,m.useMemo)(()=>C.reduce((e,t)=>{let{sensor:r}=t;return[...e,...r.activators.map(e=>({eventName:e.eventName,handler:td(e.handler,t)}))]},[]),[C,td]);(0,m.useEffect)(()=>{if(!v)return;let e=C.map(e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()});return()=>{for(let t of e)null==t||t()}},C.map(e=>{let{sensor:t}=e;return t})),T(()=>{e$&&z===g.Initializing&&U(g.Initialized)},[e$,z]),(0,m.useEffect)(()=>{let{onDragMove:e}=el.current,{active:t,activatorEvent:r,collisions:n,over:i}=eO.current;if(!t||!r)return;let o={active:t,activatorEvent:r,collisions:n,delta:{x:e3.x,y:e3.y},over:i};(0,y.unstable_batchedUpdates)(()=>{null==e||e(o),L({type:"onDragMove",event:o})})},[e3.x,e3.y]),(0,m.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:r,droppableContainers:n,scrollAdjustedTranslate:i}=eO.current;if(!e||null==ee.current||!t||!i)return;let{onDragOver:o}=el.current,l=n.get(tl),a=l&&l.rect.current?{id:l.id,rect:l.rect.current,data:l.data,disabled:l.disabled}:null,u={active:e,activatorEvent:t,collisions:r,delta:{x:i.x,y:i.y},over:a};(0,y.unstable_batchedUpdates)(()=>{ts(a),null==o||o(u),L({type:"onDragOver",event:u})})},[tl]),T(()=>{eO.current={activatorEvent:ei,active:Q,activeNode:ek,collisionRect:ti,collisions:to,droppableRects:ep,draggableNodes:V,draggingNode:eD,draggingNodeRect:eR,droppableContainers:G,over:ta,scrollableAncestors:eB,scrollAdjustedTranslate:e3},Z.current={initial:eR,translated:ti}},[Q,ek,to,ti,V,eD,eR,ep,G,ta,eB,e3]),function(e){let{acceleration:t,activator:r=c.Pointer,canScroll:n,draggingRect:i,enabled:l,interval:a=5,order:u=d.TreeOrder,pointerCoordinates:f,scrollableAncestors:p,scrollableAncestorRects:g,delta:y,threshold:v}=e,b=function(e){let{delta:t,disabled:r}=e,n=A(t);return P(e=>{if(r||!n||!e)return eW;let i={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[o.Backward]:e.x[o.Backward]||-1===i.x,[o.Forward]:e.x[o.Forward]||1===i.x},y:{[o.Backward]:e.y[o.Backward]||-1===i.y,[o.Forward]:e.y[o.Forward]||1===i.y}}},[r,t,n])}({delta:y,disabled:!l}),[_,w]=function(){let e=(0,m.useRef)(null);return[(0,m.useCallback)((t,r)=>{e.current=setInterval(t,r)},[]),(0,m.useCallback)(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}(),x=(0,m.useRef)({x:0,y:0}),S=(0,m.useRef)({x:0,y:0}),C=(0,m.useMemo)(()=>{switch(r){case c.Pointer:return f?{top:f.y,bottom:f.y,left:f.x,right:f.x}:null;case c.DraggableRect:return i}},[r,i,f]),k=(0,m.useRef)(null),T=(0,m.useCallback)(()=>{let e=k.current;if(!e)return;let t=x.current.x*S.current.x,r=x.current.y*S.current.y;e.scrollBy(t,r)},[]),E=(0,m.useMemo)(()=>u===d.TreeOrder?[...p].reverse():p,[u,p]);(0,m.useEffect)(()=>
15{if(!l||!p.length||!C)return void w();for(let e of E){if((null==n?void 0:n(e))===!1)continue;let r=g[p.indexOf(e)];if(!r)continue;let{direction:i,speed:l}=function(e,t,r,n,i){let{top:l,left:a,right:u,bottom:c}=r;void 0===n&&(n=10),void 0===i&&(i=eS);let{isTop:d,isBottom:f,isLeft:p,isRight:g}=ex(e),m={x:0,y:0},y={x:0,y:0},v={height:t.height*i.y,width:t.width*i.x};return!d&&l<=t.top+v.height?(m.y=o.Backward,y.y=n*Math.abs((t.top+v.height-l)/v.height)):!f&&c>=t.bottom-v.height&&(m.y=o.Forward,y.y=n*Math.abs((t.bottom-v.height-c)/v.height)),!g&&u>=t.right-v.width?(m.x=o.Forward,y.x=n*Math.abs((t.right-v.width-u)/v.width)):!p&&a<=t.left+v.width&&(m.x=o.Backward,y.x=n*Math.abs((t.left+v.width-a)/v.width)),{direction:m,speed:y}}(e,r,C,t,v);for(let e of["x","y"])b[e][i[e]]||(l[e]=0,i[e]=0);if(l.x>0||l.y>0){w(),k.current=e,_(T,a),x.current=l,S.current=i;return}}x.current={x:0,y:0},S.current={x:0,y:0},w()},[t,T,n,w,l,a,JSON.stringify(C),JSON.stringify(b),_,p,E,g,JSON.stringify(v)])}({...eN,delta:J,draggingRect:ti,pointerCoordinates:eK,scrollableAncestors:eB,scrollableAncestorRects:ez});let th=(0,m.useMemo)(()=>({active:Q,activeNode:ek,activeNodeRect:e$,activatorEvent:ei,collisions:to,containerNodeRect:eA,dragOverlay:eM,draggableNodes:V,droppableContainers:G,droppableRects:ep,over:ta,measureDroppableContainers:ev,scrollableAncestors:eB,scrollableAncestorRects:ez,measuringConfiguration:ef,measuringScheduled:eb,windowRect:eL}),[Q,ek,e$,ei,to,eA,eM,V,G,ep,ta,ev,eB,ez,ef,eb,eL]),tp=(0,m.useMemo)(()=>({activatorEvent:ei,activators:tf,active:Q,activeNodeRect:e$,ariaDescribedById:{draggable:es},dispatch:I,draggableNodes:V,over:ta,measureDroppableContainers:ev}),[ei,tf,Q,e$,I,es,V,ta,ev]);return m.createElement(W.Provider,{value:B},m.createElement(e8.Provider,{value:tp},m.createElement(e9.Provider,{value:th},m.createElement(tn.Provider,{value:tu},x)),m.createElement(tt,{disabled:(null==b?void 0:b.restoreFocus)===!1})),m.createElement(H,{...b,hiddenTextDescribedById:es}))}),to=(0,m.createContext)(null),tl="button";function ta(e){let{id:t,data:r,disabled:n=!1,attributes:i}=e,o=j("Droppable"),{activators:l,activatorEvent:a,active:u,activeNodeRect:c,ariaDescribedById:d,draggableNodes:f,over:p}=(0,m.useContext)(e8),{role:g=tl,roleDescription:y="draggable",tabIndex:v=0}=null!=i?i:{},b=(null==u?void 0:u.id)===t,_=(0,m.useContext)(b?tn:to),[w,x]=$(),[S,C]=$(),k=(0,m.useMemo)(()=>l.reduce((e,r)=>{let{eventName:n,handler:i}=r;return e[n]=e=>{i(e,t)},e},{}),[l,t]),E=N(r);return T(()=>(f.set(t,{id:t,key:o,node:w,activatorNode:S,data:E}),()=>{let e=f.get(t);e&&e.key===o&&f.delete(t)}),[f,t]),{active:u,activatorEvent:a,activeNodeRect:c,attributes:(0,m.useMemo)(()=>({role:g,tabIndex:v,"aria-disabled":n,"aria-pressed":!!b&&g===tl||void 0,"aria-roledescription":y,"aria-describedby":d.draggable}),[n,g,v,b,y,d.draggable]),isDragging:b,listeners:n?void 0:k,node:w,over:p,setNodeRef:x,setActivatorNodeRef:C,transform:_}}function ts(){return(0,m.useContext)(e9)}let tu={timeout:25};function tc(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:o}=e,l=j("Droppable"),{active:a,dispatch:u,over:c,measureDroppableContainers:d}=(0,m.useContext)(e8),f=(0,m.useRef)({disabled:r}),p=(0,m.useRef)(!1),g=(0,m.useRef)(null),y=(0,m.useRef)(null),{disabled:v,updateMeasurementsFor:b,timeout:_}={...tu,...o},w=N(null!=b?b:n),x=eJ({callback:(0,m.useCallback)(()=>{if(!p.current){p.current=!0;return}null!=y.current&&clearTimeout(y.current),y.current=setTimeout(()=>{d(Array.isArray(w.current)?w.current:[w.current]),y.current=null},_)},[_]),disabled:v||!a}),[S,C]=$((0,m.useCallback)((e,t)=>{x&&(t&&(x.unobserve(t),p.current=!1),e&&x.observe(e))},[x])),k=N(t);return(0,m.useEffect)(()=>{x&&S.current&&(x.disconnect(),p.current=!1,x.observe(S.current))},[S,x]),T(()=>(u({type:i.RegisterDroppable,element:{id:n,key:l,disabled:r,node:S,rect:g,data:k}}),()=>u({type:i.UnregisterDroppable,key:l,id:n})),[n]),(0,m.useEffect)(()=>{r!==f.current.disabled&&(u({type:i.SetDroppableDisabled,id:n,key:l,disabled:r}),f.current.disabled=r)},[n,l,r,u]),{active:a,rect:g,isOver:(null==c?void 0:c.id)===n,node:S,over:c,setNodeRef:C}}function td(e){let{animation:t,children:r}=e,[n,i]=(0,m.useState)(null),[o,l]=(0,m.useState)(null),a=A(r);
15return r||n||!a||i(a),T(()=>{if(!o)return;let e=null==n?void 0:n.key,r=null==n?void 0:n.props.id;if(null==e||null==r)return void i(null);Promise.resolve(t(r,o)).then(()=>{i(null)})},[t,n,o]),m.createElement(m.Fragment,null,r,n?(0,m.cloneElement)(n,{ref:l}):null)}let tf={x:0,y:0,scaleX:1,scaleY:1};function th(e){let{children:t}=e;return m.createElement(e8.Provider,{value:e3},m.createElement(tn.Provider,{value:tf},t))}let tp={position:"fixed",touchAction:"none"},tg=e=>I(e)?"transform 250ms ease":void 0,tm=(0,m.forwardRef)((e,t)=>{let{as:r,activatorEvent:n,adjustScale:i,children:o,className:l,rect:a,style:u,transform:c,transition:d=tg}=e;if(!a)return null;let f=i?c:{...c,scaleX:1,scaleY:1},p={...tp,width:a.width,height:a.height,top:a.top,left:a.left,transform:L.Transform.toString(f),transformOrigin:i&&n?function(e,t){let r=F(e);if(!r)return"0 0";let n={x:(r.x-t.left)/t.width*100,y:(r.y-t.top)/t.height*100};return n.x+"% "+n.y+"%"}(n,a):void 0,transition:"function"==typeof d?d(n):d,...u};return m.createElement(r,{className:l,style:p,ref:t},o)}),ty={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:r}}=e;return[{transform:L.Transform.toString(t)},{transform:L.Transform.toString(r)}]},sideEffects:(n={styles:{active:{opacity:"0"}}},e=>{let{active:t,dragOverlay:r}=e,i={},{styles:o,className:l}=n;if(null!=o&&o.active)for(let[e,r]of Object.entries(o.active))void 0!==r&&(i[e]=t.node.style.getPropertyValue(e),t.node.style.setProperty(e,r));if(null!=o&&o.dragOverlay)for(let[e,t]of Object.entries(o.dragOverlay))void 0!==t&&r.node.style.setProperty(e,t);return null!=l&&l.active&&t.node.classList.add(l.active),null!=l&&l.dragOverlay&&r.node.classList.add(l.dragOverlay),function(){for(let[e,r]of Object.entries(i))t.node.style.setProperty(e,r);null!=l&&l.active&&t.node.classList.remove(l.active)}})},tv=0,tb=m.memo(e=>
15{let{adjustScale:t=!1,children:r,dropAnimation:n,style:i,transition:o,modifiers:l,wrapperElement:a="div",className:u,zIndex:c=999}=e,{activatorEvent:d,active:f,activeNodeRect:p,containerNodeRect:g,draggableNodes:y,droppableContainers:v,dragOverlay:b,over:_,measuringConfiguration:x,scrollableAncestors:S,scrollableAncestorRects:C,windowRect:k}=ts(),T=(0,m.useContext)(tn),N=function(e){return(0,m.useMemo)(()=>{if(null!=e)return++tv},[e])}(null==f?void 0:f.id),P=tr(l,{activatorEvent:d,active:f,activeNodeRect:p,containerNodeRect:g,draggingNodeRect:b.rect,over:_,overlayNodeRect:b.rect,scrollableAncestors:S,scrollableAncestorRects:C,transform:T,windowRect:k}),$=eV(p),A=function(e){let{config:t,draggableNodes:r,droppableContainers:n,measuringConfiguration:i}=e;return E((e,o)=>{if(null===t)return;let l=r.get(e);if(!l)return;let a=l.node.current;if(!a)return;let u=e0(o);if(!u)return;let{transform:c}=w(o).getComputedStyle(o),d=ed(c);if(!d)return;let f="function"==typeof t?t:function(e){let{duration:t,easing:r,sideEffects:n,keyframes:i}={...ty,...e};return e=>{let{active:o,dragOverlay:l,transform:a,...u}=e;if(!t)return;let c={x:l.rect.left-o.rect.left,y:l.rect.top-o.rect.top},d={scaleX:1!==a.scaleX?o.rect.width*a.scaleX/l.rect.width:1,scaleY:1!==a.scaleY?o.rect.height*a.scaleY/l.rect.height:1},f={x:a.x-c.x,y:a.y-c.y,...d},p=i({...u,active:o,dragOverlay:l,transform:{initial:a,final:f}}),[g]=p,m=p[p.length-1];if(JSON.stringify(g)===JSON.stringify(m))return;let y=null==n?void 0:n({active:o,dragOverlay:l,...u}),v=l.node.animate(p,{duration:t,easing:r,fill:"forwards"});return new Promise(e=>{v.onfinish=()=>{null==y||y(),e()}})}}(t);return ek(a,i.draggable.measure),f({active:{id:e,data:l.data,node:a,rect:i.draggable.measure(a)},draggableNodes:r,dragOverlay:{node:o,rect:i.dragOverlay.measure(u)},droppableContainers:n,measuringConfiguration:i,transform:d})})}({config:n,draggableNodes:y,droppableContainers:v,measuringConfiguration:x}),O=$?b.setRef:void 0;return m.createElement(th,null,m.createElement(td,{animation:A},f&&N?m.createElement(tm,{key:N,id:f.id,ref:O,as:a,activatorEvent:d,adjustScale:t,className:u,transition:o,rect:$,style:{zIndex:c,...i},transform:P},r):null))})},25703:(e,t,r)=>{"use strict";r.d(t,{_P:()=>o,my:()=>n,w4:()=>i});let n=6048e5,i=864e5,o=Symbol.for("constructDateFrom")},27181:(e,t,r)=>{"use strict";r.d(t,{Select:()=>d});var n=r(19749),i=r(95155),o=r(84365),l=r(87677),a=r(92825);r(12115);let u=(e,t,r)=>r&&Array.isArray(e)?e.map(e=>t.find(t=>("string"==typeof t?t:t.value)===e)||String(e)):t.find(t=>("string"==typeof t?t:t.value)===e)||String(e),c=(e,t)=>{if(Array.isArray(e))return e.map(e=>{if("string"==typeof e)return e;let r=(0,o.s)(e.label,t);return"string"==typeof r?r:e.value}).join(", ");if("string"==typeof e)return e;let r=(0,o.s)(e.label,t);return"string"==typeof r?r:e.value},d=e=>{let t,r=(0,n.c)(7),{comparisonValue:o,field:d,locale:f,nestingLevel:p,versionValue:g}=e,{i18n:m}=(0,l.d)(),y="options"in d&&d.options,v=void 0!==o?c(u("string"==typeof o?o:JSON.stringify(o),y,d.hasMany),m):"",b=void 0!==g?c(u("string"==typeof g?g:JSON.stringify(g),y,d.hasMany),m):"",_="<p>"+v+"</p>",w="<p>"+b+"</p>";if(r[0]!==d.label||r[1]!==m||r[2]!==f||r[3]!==p||r[4]!==_||r[5]!==w){let{From:e,To:n}=(0,a.getHTMLDiffComponents)({fromHTML:_,toHTML:w,tokenizeByCharacter:!0});t=(0,i.jsx)(a.FieldDiffContainer,{className:"select-diff",From:e,i18n:m,label:{label:d.label,locale:f},nestingLevel:p,To:n}),r[0]=d.label,r[1]=m,r[2]=f,r[3]=p,r[4]=_,r[5]=w,r[6]=t}else t=r[6];return t}},27270:(e,t,r)=>{"use strict";r.r(t),r.d(t,{EditView:()=>o});var n=r(95155),i=r(92825);r(12115);let o=e=>(0,n.jsx)(i.DefaultEditView,{...e})},27445:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(73274);t.default={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:i}=e;if(!Array.isArray(r))throw Error("ajv implementation error");let o=t.name("valid");r.forEach((t,r)=>{if((0,n.alwaysValidSchema)(i,t))return;let l=e.subschema({keyword:"allOf",schemaProp:r},o);e.ok(o),e.mergeEvaluated(l)})}}},28565:(e,t,r)=>{"use strict";
15Object.defineProperty(t,"__esModule",{value:!0});let n=r(13163),i=r(36702),o=r(93810),l=r(12015),a=r(60007),u=r(29586),c=r(12618),d=r(54344),f=r(1150),p=r(84930);t.default=[n.default,i.default,o.default,l.default,a.default,u.default,c.default,d.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f.default,p.default]},28713:(e,t,r)=>{var n=r(84896);e.exports=function(e,t){return new Promise(function(r,i){var o,l=t||{};function a(e){i(e||Error("Aborted"))}function u(e,t){if(e.bail)return void a(e);o.retry(e)?l.onRetry&&l.onRetry(e,t):i(o.mainError())}"randomize"in l||(l.randomize=!0),(o=n.operation(l)).attempt(function(t){var n;try{n=e(a,t)}catch(e){u(e,t);return}Promise.resolve(n).then(r).catch(function(e){u(e,t)})})})}},28951:(e,t,r)=>{"use strict";r.d(t,{a:()=>c});var n=r(19749),i=r(95155),o=r(94271),l=r(92825),a=r(32532),u=r(12115),c=e=>{let t,r,c=(0,n.c)(21),[d]=(0,o.DF)(),[f,p]=(0,u.useState)(null),[g,m]=(0,u.useState)(!1),[y,v,b]=(0,l.useDocumentDrawer)(e),{closeDrawer:_,drawerSlug:w}=b,{modalState:x}=(0,l.useModal)(),S;c[0]!==d?(S=()=>{d.read(()=>{p((0,a.vJq)()??(0,a.S1w)())}),m(!0)},c[0]=d,c[1]=S):S=c[1];let C=S,k;c[2]!==d||c[3]!==f?(k=()=>{f&&d.update(()=>{(0,a.n1P)(f.clone())},{discrete:!0,skipTransforms:!0})},c[2]=d,c[3]=f,c[4]=k):k=c[4];let T=k,E;c[5]!==_?(E=()=>{_()},c[5]=_,c[6]=E):E=c[6];let N=E,P,$;return c[7]!==w||c[8]!==x||c[9]!==T||c[10]!==g?(P=()=>{if(!g)return;let e=x[w];e&&!e?.isOpen&&(m(!1),setTimeout(()=>{T()},1))},$=[x,w,T,g],c[7]=w,c[8]=x,c[9]=T,c[10]=g,c[11]=P,c[12]=$):(P=c[11],$=c[12]),(0,u.useEffect)(P,$),c[13]!==v||c[14]!==C?(t=e=>(0,i.jsx)(v,{...e,onClick:C}),c[13]=v,c[14]=C,c[15]=t):t=c[15],c[16]!==y||c[17]!==N||c[18]!==w||c[19]!==t?(r={closeDocumentDrawer:N,DocumentDrawer:y,documentDrawerSlug:w,DocumentDrawerToggler:t},c[16]=y,c[17]=N,c[18]=w,c[19]=t,c[20]=r):r=c[20],r}},29200:e=>{function t(e,t){"boolean"==typeof t&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}e.exports=t,t.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},t.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},t.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=new Date().getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var r=this._timeouts.shift();if(void 0===r)if(!this._cachedTimeouts)return!1;else this._errors.splice(0,this._errors.length-1),r=this._cachedTimeouts.slice(-1);var n=this;return this._timer=setTimeout(function(){n._attempts++,n._operationTimeoutCb&&(n._timeout=setTimeout(function(){n._operationTimeoutCb(n._attempts)},n._operationTimeout),n._options.unref&&n._timeout.unref()),n._fn(n._attempts)},r),this._options.unref&&this._timer.unref(),!0},t.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var r=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){r._operationTimeoutCb()},r._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},t.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)},t.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)},t.prototype.start=t.prototype.try,t.prototype.errors=function(){return this._errors},t.prototype.attempts=function(){return this._attempts},t.prototype.mainError=function(){if(0===this._errors.length)return null;for(var e={},t=null,r=0,n=0;n<this._errors.length;n++){var i=this._errors[n],o=i.message,l=(e[o]||0)+1;e[o]=l,l>=r&&(t=i,r=l)}return t}},29586:(e,t,r)=>{"use strict";
15Object.defineProperty(t,"__esModule",{value:!0});let n=r(81708),i=r(79772),o=r(73274);t.default={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>(0,i.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,i._)`{missingProperty: ${e}}`},code(e){let{gen:t,schema:r,schemaCode:l,data:a,$data:u,it:c}=e,{opts:d}=c;if(!u&&0===r.length)return;let f=r.length>=d.loopRequired;if(c.allErrors?function(){if(f||u)e.block$data(i.nil,p);else for(let t of r)(0,n.checkReportMissingProp)(e,t)}():function(){let o=t.let("missing");if(f||u){let r=t.let("valid",!0);e.block$data(r,()=>{var u,c;return u=o,c=r,void(e.setParams({missingProperty:u}),t.forOf(u,l,()=>{t.assign(c,(0,n.propertyInData)(t,a,u,d.ownProperties)),t.if((0,i.not)(c),()=>{e.error(),t.break()})},i.nil))}),e.ok(r)}else t.if((0,n.checkMissingProp)(e,r,o)),(0,n.reportMissingProp)(e,o),t.else()}(),d.strictRequired){let t=e.parentSchema.properties,{definedProperties:n}=e.it;for(let e of r)if((null==t?void 0:t[e])===void 0&&!n.has(e)){let t=c.schemaEnv.baseId+c.errSchemaPath,r=`required property "${e}" is not defined at "${t}" (strictRequired)`;(0,o.checkStrictMode)(c,r,c.opts.strictRequired)}}function p(){t.forOf("prop",l,r=>{e.setParams({missingProperty:r}),t.if((0,n.noPropertyInData)(t,a,r,d.ownProperties),()=>e.error())})}}}},29710:(e,t,r)=>{"use strict";r.d(t,{L:()=>function e(t,r){let{i18n:o,keepPresentationalFields:l,labelPrefix:a,moveSubFieldsToTop:u=!1,pathPrefix:c}="boolean"==typeof r?{keepPresentationalFields:r}:r??{};return t.reduce((t,d)=>{if("group"===d.type&&"fields"in d)if(u){let r="name"in d&&"string"==typeof d.name&&!!d.name,i="name"in d?d.name:void 0,f="label"in d&&d.label&&o?(0,n.s)(d.label,o):void 0,p=a?`${a} > ${f??i}`:f??i,g="name"in d&&d.name?c?`${c}.${d.name}`:d.name:c;t.push(d,...e(d.fields,{i18n:o,keepPresentationalFields:l,labelPrefix:r?p:a,moveSubFieldsToTop:u,pathPrefix:r?g:c}))}else(0,i.Z7)(d)?t.push(d):t.push(...e(d.fields,r));else if("tabs"===d.type&&"tabs"in d)return[...t,...d.tabs.reduce((t,d)=>{if(!(0,i.pz)(d))return[...t,...e(d.fields,r)];if(!u)return[...t,{...d,type:"tab"}];{let r="label"in d&&d.label&&o?(0,n.s)(d.label,o):void 0,i=a?`${a} > ${r??d.name}`:r??d.name,f=d.name?c?`${c}.${d.name}`:d.name:c;return[...t,...e(d.fields,{i18n:o,keepPresentationalFields:l,labelPrefix:i,moveSubFieldsToTop:u,pathPrefix:f})]}},[])];else if((0,i.sd)(d)&&["collapsible","row"].includes(d.type))t.push(...e(d.fields,r));else if((0,i.Z7)(d)||l&&(0,i.aO)(d)){if("id"===d.name&&void 0!==a)return t;let e="label"in d&&d.label&&o?(0,n.s)(d.label,o):void 0,r="name"in d?d.name:void 0,i=void 0!==c||void 0!==a;t.push({...d,...u&&i&&{accessor:c&&r?`${c}.${r}`:r??"",labelWithPrefix:a?`${a} > ${e??r}`:e??r}})}return t},[])}});var n=r(84365),i=r(23999)},30195:(e,t,r)=>{"use strict";function n(e){return null!=e&&("string"!=typeof e||""!==e.trim())&&!Number.isNaN(Number(e))}r.d(t,{E:()=>n})},30889:(e,t,r)=>{"use strict";r.d(t,{FJ:()=>c});var n=r(92749),i=r(32532);let o=new Set(["http:","https:","mailto:","sms:","tel:"]);class l extends i.fGB{static getType(){return"link"}static clone(e){return new l(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}constructor(e="",t={},r){super(r);let{target:n=null,rel:i=null,title:o=null}=t;this.__url=e,this.__target=n,this.__rel=i,this.__title=o}createDOM(e){let t=document.createElement("a");return t.href=this.sanitizeUrl(this.__url),null!==this.__target&&(t.target=this.__target),null!==this.__rel&&(t.rel=this.__rel),null!==this.__title&&(t.title=this.__title),(0,n.ZB)(t,e.theme.link),t}updateDOM(e,t,r){if((0,i.nYP)(t)){let r=this.__url,n=this.__target,i=this.__rel,o=this.__title;r!==e.__url&&(t.href=r),n!==e.__target&&(n?t.target=n:t.removeAttribute("target")),i!==e.__rel&&(i?t.rel=i:t.removeAttribute("rel")),o!==e.__title&&(o?t.title=o:t.removeAttribute("title"))}return!1}static importDOM(){return{a:e=>({conversion:a,priority:1})}}static importJSON(e){return u().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setURL(e.url).setRel(e.rel||null).setTarget(e.target||null).setTitle(e.title||null)}sanitizeUrl(e){try{let t=new URL(e);if(!o.has(t.protocol))return"about:blank"}catch(e){}return e}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(e){let t=this.getWritable();return t.__url=e,t}getTarget(){return this.getLatest().__target}setTarget(e){let t=this.getWritable();return t.__target=e,t}getRel(){return this.getLatest().__rel}setRel(e){let t=this.getWritable();return t.__rel=e,t}getTitle(){return this.getLatest().__title}setTitle(e){let t=this.getWritable();return t.__title=e,t}insertNewAfter(e,t=!0){let r=u(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(r,t),r}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,t,r){if(!(0,i.I2P)(t))return!1;let n=t.anchor.getNode(),o=t.focus.getNode();return this.isParentOf(n)&&this.isParentOf(o)&&t.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}}function a(e){let t=null;if((0,i.nYP)(e)){let r=e.textContent;(null!==r&&""!==r||e.children.length>0)&&(t=u(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function u(e="",t){return(0,i.pTq)(new l(e,t))}function c(e){return e instanceof l}class d extends l{constructor(e="",t={},r){super(e,t,r),this.__isUnlinked=void 0!==t.isUnlinked&&null!==t.isUnlinked&&t.isUnlinked}static getType(){return"autolink"}static clone(e){return new d(e.__url,{isUnlinked:e.__isUnlinked,rel:e.__rel,target:e.__target,title:e.__title},e.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(e){let t=this.getWritable();return t.__isUnlinked=e,t}createDOM(e){return this.__isUnlinked?document.createElement("span"):super.createDOM(e)}updateDOM(e,t,r){return super.updateDOM(e,t,r)||e.__isUnlinked!==this.__isUnlinked}static importJSON(e){return f().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setIsUnlinked(e.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(e,t=!0){let r=this.getParentOrThrow().insertNewAfter(e,t);if((0,i.ff4)(r)){let e=f(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return r.append(e),e}return null}}function f(e="",t){return(0,i.pTq)(new d(e,t))}(0,i.guI)("TOGGLE_LINK_COMMAND")},31233:(e,t,r)=>{"use strict";r.d(t,{_:()=>n});let n=(e,t)=>e.size===t.size&&[...e].every(e=>t.has(e))},32532:(e,t,r)=>{"use strict";function n(e,...t){let r=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;for(let r of(i.append("code",e),t))i.append("v",r);throw r.search=i.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}r.d(t,{$7r:()=>ta,$ey:()=>eI,$iu:()=>i9,A7V:()=>nn,AX0:()=>eV,AcJ:()=>nu,Ave:()=>i7,B$P:()=>n7,BEs:()=>iE,Bts:()=>iQ,CaD:()=>H,Chh:()=>z,Cku:()=>rs,Csq:()=>oi,Cyw:()=>r8,Ey8:()=>tY,FEN:()=>ej,GMe:()=>rJ,GcU:()=>rF,Gew:()=>il,H2A:()=>rP,HYn:()=>tr,Huu:()=>eZ,I2H:()=>ts,I2P:()=>ri,I8X:()=>B,IlV:()=>iK,IqF:()=>ia,JAT:()=>it,JM3:()=>eW,K8K:()=>iv,KfJ:()=>tl,Kp7:()=>r3,LYZ:()=>nv,LZn:()=>C,MZu:()=>t8,MvL:()=>eP,NiT:()=>nF,OBE:()=>r_,OXk:()=>e1,OpE:()=>iF,PiT:()=>e5,Q$N:()=>eQ,RTZ:()=>rl,RTo:()=>eY,Rb_:()=>nx,S1w:()=>rS,SKc:()=>tn,Sr4:()=>e4,TgX:()=>e8,UDz:()=>eH,V30:()=>eU,VSO:()=>tt,WKo:()=>tz,WWb:()=>to,WgU:()=>nc,WuB:()=>eO,XKQ:()=>eM,YW5:()=>e2,Z$U:()=>ny,ZKf:()=>ez,_On:()=>ib,a9V:()=>i_,bM3:()=>eD,bSg:()=>na,bbF:()=>eG,cmH:()=>iL,d8p:()=>eA,da8:()=>nd,dxY:()=>iN,e1k:()=>n0,erb:()=>iJ,ev7:()=>t9,fGB:()=>r5,fUS:()=>e3,ff4:()=>r7,gCZ:()=>eX,guI:()=>eN,hVZ:()=>r6,haT:()=>r9,hi0:()=>eF,i0_:()=>iS,ieJ:()=>nh,jG6:()=>nT,jZM:()=>ns,k1Q:()=>os,kFe:()=>t4,lJ7:()=>nl,lSZ:()=>or,mB:()=>eB,mWO:()=>iY,n1P:()=>nB,nYP:()=>ig,nsf:()=>nO,oqR:()=>e$,pGK:()=>on,pTq:()=>iu,pd8:()=>iP,peL:()=>ip,rN:()=>iI,rUs:()=>rb,riq:()=>e9,sTu:()=>t7,sWS:()=>iZ,sby:()=>im,scG:()=>n_,sik:()=>e7,t5V:()=>ti,u5G:()=>te,uTE:()=>rv,urt:()=>L,uwZ:()=>iV,vAA:()=>iy,vJq:()=>rx,viC:()=>eL,w$Z:()=>e0,w3H:()=>iw,wH$:()=>tU,waI:()=>eR,wp6:()=>i4,xL4:()=>nD,xQ8:()=>i3,y68:()=>rm,z8s:()=>re});let i="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,o=i&&"documentMode"in document?document.documentMode:null,l=i&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),a=i&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),u=!(!i||!("InputEvent"in window)||o)&&"getTargetRanges"in new window.InputEvent("input"),c=i&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),d=i&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,f=i&&/Android/.test(navigator.userAgent),p=i&&/^(?=.*Chrome).*/i.test(navigator.userAgent),g=i&&f&&p,m=i&&/AppleWeb
15Kit\/[\d.]+/.test(navigator.userAgent)&&!p;function y(...e){let t=[];for(let r of e)if(r&&"string"==typeof r)for(let[e]of r.matchAll(/\S+/g))t.push(e);return t}let v=c||d||m?"\xa0":"â",b=a?"\xa0":v,_="Ö-ß¿ï¬-﷽ﹰ-ﻼ",w="A-Za-z\xc0-\xd6\xd8-\xf6\xf8-ʸÌ-Öà -á¿¿ââ°-ï¬ï¸-﹯﻽-ï¿¿",x=RegExp("^[^"+w+"]*["+_+"]"),S=RegExp("^[^"+_+"]*["+w+"]"),C={bold:1,capitalize:1024,code:16,highlight:128,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},k={directionless:1,unmergeable:2},T={center:2,end:6,justify:4,left:1,right:3,start:5},E={2:"center",6:"end",4:"justify",1:"left",3:"right",5:"start"},N={normal:0,segmented:2,token:1},P={0:"normal",2:"segmented",1:"token"},$=!1,A=0;function O(e){A=e.timeStamp}function j(e,t,r){let n="BR"===e.nodeName,i=t.__lexicalLineBreak;return i&&(e===i||n&&e.previousSibling===i)||n&&void 0!==nM(e,r)}function M(e,t,r){$=!0;let n=performance.now()-A>100;try{r0(e,()=>{let i=rx()||e.getEditorState().read(()=>{let e=rx();return null!==e?e.clone():null}),o=new Map,l=e.getRootElement(),u=e._editorState,c=e._blockCursorElement,d=!1,f="";for(let r=0;r<t.length;r++){let p=t[r],g=p.type,m=p.target,y=function(e,t,r,n){var i;for(let o=e;o&&(i=o,!0!==i.__lexicalUnmanaged);o=n6(o)){let e=nM(o,t);if(void 0!==e){let t=nO(e,r);if(t)return r8(t)||!im(o)?void 0:[o,t]}else if(o===n)return[n,nL(r)]}}(m,e,u,l);if(!y)continue;let[v,b]=y;if("characterData"===g)n&&t4(b)&&nS(m)&&function(e,t,r){if(ri(e)){let t=e.anchor.getNode();if(t.is(r)&&e.format!==t.getFormat())return!1}return nS(t)&&r.isAttached()}(i,m,b)&&function(e,t,r){let n=ip(io(r)),i=null,o=null;null!==n&&n.anchorNode===e&&(i=n.anchorOffset,o=n.focusOffset);let l=e.nodeValue;null!==l&&nH(t,l,i,o,!1)}(m,b,e);else if("childList"===g){d=!0;let t=p.addedNodes;for(let r=0;r<t.length;r++){let n=t[r],i=nj(n),o=n.parentNode;if(null!=o&&n!==c&&null===i&&!j(n,o,e)){if(a){let e=(im(n)?n.innerText:null)||n.nodeValue;e&&(f+=e)}o.removeChild(n)}}let r=p.removedNodes,n=r.length;if(n>0){let t=0;for(let i=0;i<n;i++){let n=r[i];(j(n,m,e)||c===n)&&(m.appendChild(n),t++)}n!==t&&o.set(v,b)}}}if(o.size>0)for(let[t,r]of o)r.reconcileObservedMutation(t,e);let p=r.takeRecords();if(p.length>0){for(let t=0;t<p.length;t++){let r=p[t],n=r.addedNodes,i=r.target;for(let t=0;t<n.length;t++){let r=n[t],o=r.parentNode;null==o||"BR"!==r.nodeName||j(r,i,e)||o.removeChild(r)}}r.takeRecords()}null!==i&&(d&&nB(i),a&&n4(e)&&i.insertRawText(f))})}finally{$=!1}}function D(e){let t=e._observer;null!==t&&M(e,t.takeRecords(),t)}function R(e){0===A&&io(e).addEventListener("textInput",O,!0),e._observer=new MutationObserver((t,r)=>{M(e,t,r)})}function I(e){return e}class F{constructor(e,t){this.key=e,this.parse=t.parse.bind(t),this.unparse=(t.unparse||I).bind(t),this.isEqual=(t.isEqual||Object.is).bind(t),this.defaultValue=this.parse(void 0)}}function L(e,t){return new F(e,t)}function B(e,t,r="latest"){let n=("latest"===r?e.getLatest():e).__state;return n?n.getValue(t):t.defaultValue}function z(e,t,r){let n;if(rL(),"function"==typeof r){let i=e.getLatest(),o=B(i,t);if(n=r(o),t.isEqual(o,n))return i}else n=r;let i=e.getWritable();return W(i).updateFromKnown(t,n),i}class U{constructor(e,t=new Map,r,n=new Map,i){this.node=e,this.sharedConfigMap=t,this.unknownState=r,this.knownState=n;let o=void 0!==i?i:function(e,t,r){let n=r.size;if(t)for(let i in t){let t=e.get(i);t&&r.has(t)||n++}return n}(t,r,n);this.size=o}getValue(e){let t=this.knownState.get(e);if(void 0!==t)return t;this.sharedConfigMap.set(e.key,e);let r=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){let t=this.unknownState[e.key];void 0!==t&&(r=e.parse(t)),this.updateFromKnown(e,r)}return r}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){let e={...this.unknownState};for(let[t,r]of this.knownState)t.isEqual(r,t.defaultValue)?delete e[t.key]:e[t.key]=t.unparse(r);return K(e)?{$:e}:{}}getWritable(e){var t;if(this.node===e)return this;let r=new Map(this.knownState),n=K(t=this.unknownState)&&{...t};if(n)for(let e of r.keys())delete n[e.key];return new U(e,this.sharedConfigMap,K(n),r,this.size)}updateFromKnown(e,t){let r=e.key;this.sharedConfigMap.set(r,e);let{knownState:n,unknownState:i}=this;n.has(e)||i&&r in i||this.size++,n.set(e,t)}updateFromUnknown(e,t){let r=this.sharedConfigMap.get(e);r?this.updateFromKnown(r,r.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){let{knownState:t}=this;for(let e of t.keys())t.set(e,e.defaultValue);if(this.size=t.size,this.unknownState={},e)for(let[t,r]of Object.entries(e))this.updateFromUnknown(t,r);this.unknownState=K(this.unknownState)}}function K(e){if(e)for(let t in e)return e}function W(e){let t=e.getWritable(),r=t.__state?t.__state.getWritable(t):new U(t);return t.__state=r,r}function q(e,t){let r=e.__mode,n=e.__format,i=e.__style,o=t.__mode,l=t.__format,a=t.__style,u=e.__state,c=t.__state;return(null===r||r===o)&&(null===n||n===l)&&(null===i||i===a)&&(null===e.__state||u===c||function(e,t){if(e===t)return!0;
15if(e&&t&&e.size!==t.size)return!1;let r=new Set,n=(e,t)=>{for(let[n,i]of e.knownState){if(r.has(n.key))continue;r.add(n.key);let e=t?t.getValue(n):n.defaultValue;if(e!==i&&!n.isEqual(e,i))return!0}return!1},i=(e,t)=>{let{unknownState:n}=e,i=t?t.unknownState:void 0;if(n){for(let[e,t]of Object.entries(n))if(!r.has(e)&&(r.add(e),t!==(i?i[e]:void 0)))return!0}return!1};return!(e&&n(e,t)||t&&n(t,e)||e&&i(e,t)||t&&i(t,e))}(u,c))}function V(e,t){let r=e.mergeWithSibling(t),n=rU()._normalizedNodes;return n.add(e.__key),n.add(t.__key),r}function J(e){let t,r,n=e;if(""!==n.__text||!n.isSimpleText()||n.isUnmergeable()){for(;null!==(t=n.getPreviousSibling())&&t4(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(""!==t.__text){q(t,n)&&(n=V(t,n));break}t.remove()}for(;null!==(r=n.getNextSibling())&&t4(r)&&r.isSimpleText()&&!r.isUnmergeable();){if(""!==r.__text){q(n,r)&&(n=V(n,r));break}r.remove()}}else n.remove()}function H(e){return G(e.anchor),G(e.focus),e}function G(e){for(;"element"===e.type;){let t,r,n=e.getNode(),i=e.offset;if(i===n.getChildrenSize()?(t=n.getChildAtIndex(i-1),r=!0):(t=n.getChildAtIndex(i),r=!1),t4(t)){e.set(t.__key,r?t.getTextContentSize():0,"text",!0);break}if(!r7(t))break;e.set(t.__key,r?t.getChildrenSize():0,"element",!0)}}let Y,Z,X,Q,ee,et,er,en,ei,eo,el="",ea="",es=null,eu="",ec="",ed=!1,ef=!1,eh=null;function ep(e,t){let r=er.get(e);if(null!==t){let r=eE(e);r.parentNode===t&&t.removeChild(r)}if(en.has(e)||Z._keyToDOMMap.delete(e),r7(r)){let e=eC(r,er);eg(e,0,e.length-1,null)}void 0!==r&&n2(eo,X,Q,r,"destroyed")}function eg(e,t,r,n){let i=t;for(;i<=r;++i){let t=e[i];void 0!==t&&ep(t,n)}}function em(e,t){e.setProperty("text-align",t)}function ey(e,t){let r=Y.theme.indent;if("string"==typeof r){let n=e.classList.contains(r);t>0&&!n?e.classList.add(r):t<1&&n&&e.classList.remove(r)}let n=getComputedStyle(e).getPropertyValue("--lexical-indent-base-value")||"40px";e.style.setProperty("padding-inline-start",0===t?"":`calc(${t} * ${n})`)}function ev(e,t){let r=e.style;0===t?em(r,""):1===t?em(r,"left"):2===t?em(r,"center"):3===t?em(r,"right"):4===t?em(r,"justify"):5===t?em(r,"start"):6===t&&em(r,"end")}function eb(e,t){let r=en.get(e);void 0===r&&n(60);let i=r.createDOM(Y,Z);if(function(e,t,r){let n=r._keyToDOMMap;t[`__lexicalKey_${r._key}`]=e,n.set(e,t)}(e,i,Z),t4(r)?i.setAttribute("data-lexical-text","true"):r8(r)&&i.setAttribute("data-lexical-decorator","true"),r7(r)){let e=r.__indent,t=r.__size;0!==e&&ey(i,e),0!==t&&function(e,t,r,n){let i=ea;ea="",e_(e,r,0,t,r.getDOMSlot(n)),eS(r,n),ea=i}(eC(r,en),t-1,r,i);let n=r.__format;0!==n&&ev(i,n),r.isInline()||ex(null,r,i),n8(r)&&(el+="\n\n",ec+="\n\n")}else{let t=r.getTextContent();if(r8(r)){let t=r.decorate(Z,Y);null!==t&&ek(e,t),i.contentEditable="false"}else t4(r)&&(r.isDirectionless()||(ea+=t));el+=t,ec+=t}return null!==t&&t.insertChild(i),n2(eo,X,Q,r,"created"),i}function e_(e,t,r,n,i){let o=el;el="";let l=r;for(;l<=n;++l){eb(e[l],i);let t=en.get(e[l]);null!==t&&t4(t)&&(null===es&&(es=t.getFormat()),""===eu&&(eu=t.getStyle()))}n8(t)&&(el+="\n\n"),i.element.__lexicalTextContent=el,el=o+el}function ew(e,t){if(e){let r=e.__last;if(r){let e=t.get(r);if(e)return tU(e)?"line-break":r8(e)&&e.isInline()?"decorator":null}return"empty"}return null}function ex(e,t,r){let n=ew(e,er),i=ew(t,en);n!==i&&t.getDOMSlot(r).setManagedLineBreak(i)}function eS(e,t){let r=t.__lexicalDirTextContent||"",n=t.__lexicalDir||"";if(r!==ea||n!==eh){var i;let r=""===ea,o=r?eh:(i=ea,x.test(i)?"rtl":S.test(i)?"ltr":null);if(o!==n){let i=t.classList,l=Y.theme,a=null!==n?l[n]:void 0,u=null!==o?l[o]:void 0;if(void 0!==a){if("string"==typeof a){let e=y(a);a=l[n]=e}i.remove(...a)}if(null===o||r&&"ltr"===o)t.removeAttribute("dir");else{if(void 0!==u){if("string"==typeof u){let e=y(u);u=l[o]=e}void 0!==u&&i.add(...u)}t.dir=o}ef||(e.getWritable().__dir=o)}eh=o,t.__lexicalDirTextContent=ea,t.__lexicalDir=o}}function eC(e,t){let r=[],i=e.__first;for(;null!==i;){let e=t.get(i);void 0===e&&n(101),r.push(i),i=e.__next}return r}function ek(e,t){let r=Z._pendingDecorators,n=Z._decorators;if(null===r){if(n[e]===t)return;r=nR(Z)}r[e]=t}function eT(e){let t=e.nextSibling;return null!==t&&t===Z._blockCursorElement&&(t=t.nextSibling),t}function eE(e){let t=ei.get(e);return void 0===t&&n(75,e),t}function eN(e){return{}}let eP={},e$={},eA={},eO={},ej={},eM={},eD={},eR={},eI={},eF={},eL={},eB={},ez={},eU={},eK={},eW={},eq={},eV={},eJ={},eH={},eG={},eY={},eZ={},eX={},eQ={},e0={},e1={},e2={},e5={},e7={},e4={},e3={},e8={},e9={},e6={},te={},tt={},tr={},tn={},ti={},to={},tl={},ta={},ts={},tu={},tc=Object.freeze({}),td=[["keydown",function(e,t){if(tf=e.timeStamp,th=e.key,t.isComposing())return;let{key:r,shiftKey:n,ctrlKey:i,metaKey:o,altKey:u}=e;if(!n3(t,eK,e)&&null!=r){if(tw&&nZ(th))return r0(t,()=>{tA(t,tx)}),tw=!1,void(tx="");if(!nY(r)||i||o||u)if(nY(r)&&!u&&!n&&(i||o))n3(t,eq,e);else if(!nG(r)||i||o||u)if(nG(r)&&!u&&!n&&(i||o))n3(t,eJ,e);else if("ArrowUp"!==r||i||o)if("ArrowDown"!==r||i||o)if("Enter"===r&&n)tb=!0,n3(t,eY,e);else if(" "===r)n3(t,eZ,e);else if(l&&i&&"o"===r.toLowerCase())e.preventDefault(),tb=!0,n3(t,ej,!0);else if("Enter"!==r||n)if(l?!u&&!o&&(nZ(r)||"h"===r.toLowerCase()&&i):!i&&!u&&!o&&nZ(r))nZ(r)?n3(t,eX,e):(e.preventDefault(),n3(t,eO,!0));else if("Escape"===r)n3(t,eQ,e);else if(l?!(n||u||o)&&(nX(r)||"d"===r.toLowerCase()&&i):!i&&!u&&!o&&nX(r))nX(r)?n3(t,e0,e):(e.preventDefault(),n3(t,eO,!1));else if(nZ(r)&&(l?u:i))e.preventDefault(),n3(t,eF,!0);else if(nX(r)&&(l?u:i))e.preventDefault(),n3(t,eF,!1);else if(l&&o&&nZ(r))e.preventDefault(),n3(t,eL,!0);else if(l&&o&&nX(r))e.preventDefault(),n3(t,eL,!1);else{var c,d,f,p,g,m,y,v;if("b"===r.toLowerCase()&&!u&&(c=o,d=i,l?c:d))e.preventDefault(),n3(t,eB,"bold");else{if("u"===r.toLowerCase()&&!u&&(f=o,p=i,l?f:p))e.preventDefault(),n3(t,eB,"underline");else{if("i"===r.toLowerCase()&&!u&&(g=o,m=i,l?g:m))e.preventDefault(),n3(t,eB,"italic");else if("Tab"!==r||u||i||o){if("z"===r.toLowerCase()&&!n&&(y=o,v=i,l?y:v))e.preventDefault(),n3(t,ez,void 0);else if(l?"z"===r.toLowerCase()&&o&&n:"y"===r.toLowerCase()&&i||"z"===r.toLowerCase()&&i&&n)e.preventDefault(),n3(t,eU,void 0);else{let u=t._editorState._selection;null===u||ri(u)?!a&&nQ(r,o,i)&&(e.preventDefault(),n3(t,tr,e)):!n&&"c"===r.toLowerCase()&&(l?o:i)?(e.preventDefault(),n3(t,te,e)):!n&&"x"===r.toLowerCase()&&(l?o:i)?(e.preventDefault(),n3(t,tt,e)):nQ(r,o,i)&&(e.preventDefault(),n3(t,tr,e))}}else n3(t,e1,e)}}}else tb=!1,n3(t,eY,e);else n3(t,eG,e);else n3(t,eH,e);else n3(t,eV,e);else n3(t,eW,e);(i||n||u||o)&&n3(t,tu,e)}}],["pointerdown",function(e,t){let r=e.target,n=e.pointerType;iy(r)&&"touch"!==n&&0===e.button&&r0(t,()=>{r8(nD(r))||(tv=!0)})}],["compositionstart",function(e,t){r0(t,()=>{let r=rx();if(ri(r)&&!t.isComposing()){let n=r.anchor,i=r.anchor.getNode();n$(n.key),(e.timeStamp<tf+30||"element"===n.type||!r.isCollapsed()||i.getFormat()!==r.format||t4(i)&&i.getStyle()!==r.
15style)&&n3(t,eD,b)}})}],["compositionend",function(e,t){a?t_=!0:!d&&(c||m)?(tw=!0,tx=e.data):r0(t,()=>{tA(t,e.data)})}],["input",function(e,t){e.stopPropagation(),r0(t,()=>{let r=rx(),n=e.data,i=t$(e);if(null!=n&&ri(r)&&tk(r,i,n,e.timeStamp,!1)){t_&&(tA(t,n),t_=!1);let i=r.anchor.getNode(),o=ip(io(t));if(null===o)return;let l=r.isBackward(),f=l?r.anchor.offset:r.focus.offset,p=l?r.focus.offset:r.anchor.offset;u&&!r.isCollapsed()&&t4(i)&&null!==o.anchorNode&&i.getTextContent().slice(0,f)+n+i.getTextContent().slice(f+p)===nV(o.anchorNode)||n3(t,eD,n);let g=n.length;a&&g>1&&"insertCompositionText"===e.inputType&&!t.isComposing()&&(r.anchor.offset-=g),c||d||m||!t.isComposing()||(tf=0,n$(null))}else nJ(!1,t,null!==n?n:void 0),t_&&(tA(t,n||void 0),t_=!1);rL(),D(rU())},{event:e}),tg=null}],["click",function(e,t){r0(t,()=>{let r=rx(),n=ip(io(t)),i=rS();if(n){if(ri(r)){let t=r.anchor,o=t.getNode();if("element"===t.type&&0===t.offset&&r.isCollapsed()&&!r6(o)&&1===nF().getChildrenSize()&&o.getTopLevelElementOrThrow().isEmpty()&&null!==i&&r.is(i))n.removeAllRanges(),r.dirty=!0;else if(3===e.detail&&!r.isCollapsed()&&o!==r.focus.getNode()){let e=function(e,t){let r=e;for(;r!==nF()&&null!=r;){if(t(r))return r;r=r.getParent()}return null}(o,e=>r7(e)&&!e.isInline());r7(e)&&e.select(0)}}else if("touch"===e.pointerType){let r=n.anchorNode;(im(r)||nS(r))&&nB(rw(i,n,t,e))}}n3(t,eA,e)})}],["cut",tc],["copy",tc],["dragstart",tc],["dragover",tc],["dragend",tc],["paste",tc],["focus",tc],["blur",tc],["drop",tc]];u&&td.push(["beforeinput",(e,t)=>(function(e,t){let r=e.inputType,i=t$(e);"deleteCompositionText"===r||a&&n4(t)||"insertCompositionText"!==r&&r0(t,()=>{var o;let l=rx();if("deleteContentBackward"===r){if(null===l){let e=rS();if(!ri(e))return;nB(e.clone())}if(ri(l)){let r=l.anchor.key===l.focus.key;if(o=e.timeStamp,"MediaLast"===th&&o<tf+30&&t.isComposing()&&r){if(n$(null),tf=0,setTimeout(()=>{r0(t,()=>{n$(null)})},30),ri(l)){let e=l.anchor.getNode();e.markDirty(),t4(e)||n(142),tP(l,e)}}else{n$(null),e.preventDefault();let n=l.anchor.getNode(),i=n.getTextContent(),o=n.canInsertTextAfter(),a=0===l.anchor.offset&&l.focus.offset===i.length,u=g&&r&&!a&&o;if(u&&l.isCollapsed()&&(u=!r8(n7(l.anchor,!0))),!u){n3(t,eO,!0);let e=rx();g&&ri(e)&&e.isCollapsed()&&(tS=e,setTimeout(()=>tS=null))}}return}}if(!ri(l))return;let a=e.data;null!==tg&&nJ(!1,t,tg),l.dirty&&null===tg||!l.isCollapsed()||r6(l.anchor.getNode())||null===i||l.applyDOMRange(i),tg=null;let u=l.anchor,c=l.focus,f=u.getNode(),p=c.getNode();if("insertText"!==r&&"insertTranspose"!==r)switch(e.preventDefault(),r){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":n3(t,eD,e);break;case"insertFromComposition":n$(null),n3(t,eD,e);break;case"insertLineBreak":n$(null),n3(t,ej,!1);break;case"insertParagraph":n$(null),tb&&!d?(tb=!1,n3(t,ej,!1)):n3(t,eM,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":n3(t,eR,e);break;case"deleteByComposition":(f!==p||r7(f)||r7(p)||!f.isToken()||!p.isToken())&&n3(t,eI,e);break;case"deleteByDrag":case"deleteByCut":n3(t,eI,e);break;case"deleteContent":n3(t,eO,!1);break;case"deleteWordBackward":n3(t,eF,!0);break;
15case"deleteWordForward":n3(t,eF,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":n3(t,eL,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":n3(t,eL,!1);break;case"formatStrikeThrough":n3(t,eB,"strikethrough");break;case"formatBold":n3(t,eB,"bold");break;case"formatItalic":n3(t,eB,"italic");break;case"formatUnderline":n3(t,eB,"underline");break;case"historyUndo":n3(t,ez,void 0);break;case"historyRedo":n3(t,eU,void 0)}else{if("\n"===a)e.preventDefault(),n3(t,ej,!1);else if("\n\n"===a)e.preventDefault(),n3(t,eM,void 0);else if(null==a&&e.dataTransfer){let t=e.dataTransfer.getData("text/plain");e.preventDefault(),l.insertRawText(t)}else null!=a&&tk(l,i,a,e.timeStamp,!0)?(e.preventDefault(),n3(t,eD,a)):tg=a;tp=e.timeStamp}})})(e,t)]);let tf=0,th=null,tp=0,tg=null,tm=new WeakMap,ty=!1,tv=!1,tb=!1,t_=!1,tw=!1,tx="",tS=null,tC=[0,"",0,"root",0];function tk(e,t,r,n,i){let o=e.anchor,l=e.focus,a=o.getNode(),c=rU(),d=ip(io(c)),f=null!==d?d.anchorNode:null,p=o.key,g=c.getElementByKey(p),m=r.length;return p!==l.key||!t4(a)||(!i&&(!u||tp<n+50)||a.isDirty()&&m<2||nK(r))&&o.offset!==l.offset&&!a.isComposing()||nx(a)||a.isDirty()&&m>1||(i||!u)&&null!==g&&!a.isComposing()&&f!==nC(g)||null!==d&&null!==t&&(!t.collapsed||t.startContainer!==d.anchorNode||t.startOffset!==d.anchorOffset)||a.getFormat()!==e.format||a.getStyle()!==e.style||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;let r=e.anchor.offset,n=t.getParentOrThrow(),i=t.isToken();return 0===r?!t.canInsertTextBefore()||!n.canInsertTextBefore()&&!t.isComposing()||i||function(e){let t=e.getPreviousSibling();return(t4(t)||r7(t)&&t.isInline())&&!t.canInsertTextAfter()}(t):r===t.getTextContentSize()&&(!t.canInsertTextAfter()||!n.canInsertTextAfter()&&!t.isComposing()||i)}(e,a)}function tT(e,t){return nS(e)&&null!==e.nodeValue&&0!==t&&t!==e.nodeValue.length}function tE(e,t,r){let{anchorNode:i,anchorOffset:o,focusNode:l,focusOffset:a}=e;ty&&(ty=!1,tT(i,o)&&tT(l,a)&&!tS)||r0(t,()=>{if(!r)return void nB(null);if(!nv(t,i,l))return;let u=rx();if(tS&&ri(u)&&u.isCollapsed()){let e=u.anchor,t=tS.anchor;(e.key===t.key&&e.offset===t.offset+1||1===e.offset&&t.getNode().is(e.getNode().getPreviousSibling()))&&nB(u=tS.clone())}if(tS=null,ri(u)){let r=u.anchor,i=r.getNode();if(u.isCollapsed()){"Range"===e.type&&e.anchorNode===e.focusNode&&(u.dirty=!0);let o=io(t).event,l=o?o.timeStamp:performance.now(),[a,d,f,p,g]=tC,m=nF(),y=!1===t.isComposing()&&""===m.getTextContent();if(l<g+200&&r.offset===f&&r.key===p)tN(u,a,d);else if("text"===r.type)t4(i)||n(141),tP(u,i);else if("element"===r.type&&!y){var c;r7(i)||n(259);let e=r.getNode();e.isEmpty()?tN(u,(c=e).getTextFormat(),c.getTextStyle()):tN(u,0,"")}}else{let e=r.key,t=u.focus.key,n=u.getNodes(),i=n.length,l=u.isBackward(),c=l?a:o,d=l?o:a,f=l?t:e,p=l?e:t,g=2047,m=!1;for(let e=0;e<i;e++){let t=n[e],r=t.getTextContentSize();if(t4(t)&&0!==r&&(0!==e||t.__key!==f||c!==r)&&(e!==i-1||t.__key!==p||0!==d)&&(m=!0,0==(g&=t.getFormat())))break}u.format=m?g:0}}n3(t,eP,void 0)})}function tN(e,t,r){e.format===t&&e.style===r||(e.format=t,e.style=r,e.dirty=!0)}function tP(e,t){tN(e,t.getFormat(),t.getStyle())}function t$(e){if(!e.getTargetRanges)return null;let t=e.getTargetRanges();return 0===t.length?null:t[0]}function tA(e,t){let r=e._compositionKey;if(n$(null),null!==r&&null!=t){if(""===t){let t=nO(r),n=nC(e.getElementByKey(r));return void(null!==n&&null!==n.nodeValue&&t4(t)&&nH(t,n.nodeValue,null,null,!0))}if("\n"===t[t.length-1]){let t=rx();if(ri(t)){let r=t.focus;return t.anchor.set(r.key,r.offset,r.type),void n3(e,eY,null)}}}nJ(!0,e,t)}function tO(e){let t=e.__lexicalEventHandles;return void 0===t&&(e.__lexicalEventHandles=t=[]),t}let tj=new Map;function tM(e){let t=function(e){let t=ii(e);return t?t.getSelection():null}(e.target);if(null===t)return;let r=n_(t.anchorNode);if(null===r)return;tv&&(tv=!1,r0(r,()=>{let n=rS(),i=t.anchorNode;(im(i)||nS(i))&&nB(rw(n,t,r,e))}));let n=nW(r),i=n[n.length-1],o=i._key,l=tj.get(o),a=l||i;a!==r&&tE(t,a,!1),tE(t,r,!0),r!==i?tj.set(o,r):l&&tj.delete(o)}function tD(e){e._lexicalHandled=!0}function tR(e){return!0===e._lexicalHandled}function tI(e,t,r){rL();let n=e.__key,i=e.getParent();if(null===i)return;let o=function(e){let t=rx();if(!ri(t)||!r7(e))return t;let{anchor:r,focus:n}=t,i=r.getNode(),o=n.getNode();return ir(i,e)&&r.set(e.__key,0,"element"),ir(o,e)&&n.set(e.__key,0,"element"),t}(e),l=!1;if(ri(o)&&t){let t=o.anchor,r=o.focus;t.key===n&&(rT(t,e,i,e.getPreviousSibling(),e.getNextSibling()),l=!0),r.key===n&&(rT(r,e,i,e.getPreviousSibling(),e.getNextSibling()),l=!0)}else rl(o)&&t&&e.isSelected()&&e.selectPrevious();if(ri(o)&&t&&!l){let t=e.getIndexWithinParent();nN(e),rC(o,i,t,-1)}else nN(e);r||ia(i)||i.canBeEmpty()||!i.isEmpty()||tI(i,t),t&&r6(i)&&i.isEmpty()&&i.selectEnd()}class tF{static getType(){n(64,this.name)}static clone(e){n(65,this.name)}afterCloneFrom(e){this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev,this.__state=e.__state}constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",{configurable:!0,enumerable:!1,value:void 0,writable:!0}),nE(this,e)}getType(){return this.__type}isInline(){n(137,this.constructor.name)}isAttached(){let e=this.__key;for(;null!==e;){if("root"===e)return!0;let t=nO(e);
15if(null===t)break;e=t.__parent}return!1}isSelected(e){let t=e||rx();if(null==t)return!1;let r=t.getNodes().some(e=>e.__key===this.__key);if(t4(this))return r;if(ri(t)&&"element"===t.anchor.type&&"element"===t.focus.type){if(t.isCollapsed())return!1;let e=this.getParent();if(r8(this)&&this.isInline()&&e){let r=t.isBackward()?t.focus:t.anchor;if(e.is(r.getNode())&&r.offset===e.getChildrenSize()&&this.is(e.getLastChild()))return!1}}return r}getKey(){return this.__key}getIndexWithinParent(){let e=this.getParent();if(null===e)return -1;let t=e.getFirstChild(),r=0;for(;null!==t;){if(this.is(t))return r;r++,t=t.getNextSibling()}return -1}getParent(){let e=this.getLatest().__parent;return null===e?null:nO(e)}getParentOrThrow(){let e=this.getParent();return null===e&&n(66,this.__key),e}getTopLevelElement(){let e=this;for(;null!==e;){let t=e.getParent();if(ia(t))return r7(e)||e===this&&r8(e)||n(194),e;e=t}return null}getTopLevelElementOrThrow(){let e=this.getTopLevelElement();return null===e&&n(67,this.__key),e}getParents(){let e=[],t=this.getParent();for(;null!==t;)e.push(t),t=t.getParent();return e}getParentKeys(){let e=[],t=this.getParent();for(;null!==t;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){let e=this.getLatest().__prev;return null===e?null:nO(e)}getPreviousSiblings(){let e=[],t=this.getParent();if(null===t)return e;let r=t.getFirstChild();for(;null!==r&&!r.is(this);)e.push(r),r=r.getNextSibling();return e}getNextSibling(){let e=this.getLatest().__next;return null===e?null:nO(e)}getNextSiblings(){let e=[],t=this.getNextSibling();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){let t=r7(this)?this:this.getParent(),r=r7(e)?e:e.getParent(),n=t&&r?i5(t,r):null;return n?n.commonAncestor:null}is(e){return null!=e&&this.__key===e.__key}isBefore(e){let t=i5(this,e);return null!==t&&("descendant"===t.type||("branch"===t.type?-1===i1(t):("same"!==t.type&&"ancestor"!==t.type&&n(279),!1)))}isParentOf(e){let t=i5(this,e);return null!==t&&"ancestor"===t.type}getNodesBetween(e){let t=this.isBefore(e),r=[],i=new Set,o=this;for(;null!==o;){let l=o.__key;if(i.has(l)||(i.add(l),r.push(o)),o===e)break;let a=r7(o)?t?o.getFirstChild():o.getLastChild():null;if(null!==a){o=a;continue}let u=t?o.getNextSibling():o.getPreviousSibling();if(null!==u){o=u;continue}let c=o.getParentOrThrow();if(i.has(c.__key)||r.push(c),c===e)break;let d=null,f=c;do{if(null===f&&n(68),d=t?f.getNextSibling():f.getPreviousSibling(),null===(f=f.getParent()))break;null!==d||i.has(f.__key)||r.push(f)}while(null===d);o=d}return t||r.reverse(),r}isDirty(){let e=rU()._dirtyLeaves;return null!==e&&e.has(this.__key)}getLatest(){let e=nO(this.__key);return null===e&&n(113),e}getWritable(){rL();let e=rz(),t=rU(),r=e._nodeMap,n=this.__key,i=this.getLatest(),o=t._cloneNotNeeded,l=rx();if(null!==l&&l.setCachedNodes(null),o.has(n))return nP(i),i;let a=iE(i);return o.add(n),nP(a),r.set(n,a),a}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){n(70)}updateDOM(e,t,r){n(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){let e=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...e}}static importJSON(e){n(18,this.name)}updateFromJSON(e){return function(e,t){let r=e.getWritable();return(t||r.__state)&&W(e).updateFromJSON(t),r}(this,e.$)}static transform(){return null}remove(e){tI(this,!0,e)}replace(e,t){rL();let r=rx();null!==r&&(r=r.clone()),ic(this,e);let i=this.getLatest(),o=this.__key,l=e.__key,a=e.getWritable(),u=this.getParentOrThrow().getWritable(),c=u.__size;nN(a);let d=i.getPreviousSibling(),f=i.getNextSibling(),p=i.__prev,g=i.__next,m=i.__parent;if((tI(i,!1,!0),null===d)?u.__first=l:d.getWritable().__next=l,(a.__prev=p,null===f)?u.__last=l:f.getWritable().__prev=l,a.__next=g,a.__parent=m,u.__size=c,t&&(r7(this)&&r7(a)||n(139),this.getChildren().forEac
15h(e=>{a.append(e)})),ri(r)){nB(r);let e=r.anchor,t=r.focus;e.key===o&&rr(e,a),t.key===o&&rr(t,a)}return nA()===o&&n$(l),a}insertAfter(e,t=!0){rL(),ic(this,e);let r=this.getWritable(),n=e.getWritable(),i=n.getParent(),o=rx(),l=!1,a=!1;if(null!==i){let t=e.getIndexWithinParent();if(nN(n),ri(o)){let e=i.__key,r=o.anchor,n=o.focus;l="element"===r.type&&r.key===e&&r.offset===t+1,a="element"===n.type&&n.key===e&&n.offset===t+1}}let u=this.getNextSibling(),c=this.getParentOrThrow().getWritable(),d=n.__key,f=r.__next;if(null===u?c.__last=d:u.getWritable().__prev=d,c.__size++,r.__next=d,n.__next=f,n.__prev=r.__key,n.__parent=r.__parent,t&&ri(o)){let e=this.getIndexWithinParent();rC(o,c,e+1);let t=c.__key;l&&o.anchor.set(t,e+2,"element"),a&&o.focus.set(t,e+2,"element")}return e}insertBefore(e,t=!0){rL(),ic(this,e);let r=this.getWritable(),n=e.getWritable(),i=n.__key;nN(n);let o=this.getPreviousSibling(),l=this.getParentOrThrow().getWritable(),a=r.__prev,u=this.getIndexWithinParent();null===o?l.__first=i:o.getWritable().__next=i,l.__size++,r.__prev=i,n.__prev=a,n.__next=r.__key,n.__parent=r.__parent;let c=rx();return t&&ri(c)&&rC(c,this.getParentOrThrow(),u),e}isParentRequired(){return!1}createParentElementNode(){return nl()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){rL();let r=this.getPreviousSibling(),n=this.getParentOrThrow();if(null===r)return n.select(0,0);if(r7(r))return r.select();if(!t4(r)){let e=r.getIndexWithinParent()+1;return n.select(e,e)}return r.select(e,t)}selectNext(e,t){rL();let r=this.getNextSibling(),n=this.getParentOrThrow();if(null===r)return n.select();if(r7(r))return r.select(0,0);if(!t4(r)){let e=r.getIndexWithinParent();return n.select(e,e)}return r.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}}class tL extends tF{static getType(){return"linebreak"}static clone(e){return new tL(e.__key)}constructor(e){super(e)}getTextContent(){return"\n"}createDOM(){return document.createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:e=>(function(e){let t=e.parentElement;if(null!==t&&i_(t)){let r=t.firstChild;if(r===e||r.nextSibling===e&&tK(r)){let r=t.lastChild;if(r===e||r.previousSibling===e&&tK(r))return!0}}return!1})(e)||function(e){let t=e.parentElement;if(null!==t&&i_(t)){let r=t.firstChild;if(r===e||r.nextSibling===e&&tK(r))return!1;let n=t.lastChild;if(n===e||n.previousSibling===e&&tK(n))return!0}return!1}(e)?null:{conversion:tB,priority:0}}}static importJSON(e){return tz().updateFromJSON(e)}}function tB(e){return{node:tz()}}function tz(){return iu(new tL)}function tU(e){return e instanceof tL}function tK(e){return nS(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}function tW(e,t){return 16&t?"code":128&t?"mark":32&t?"sub":64&t?"sup":null}function tq(e,t){return 1&t?"strong":2&t?"em":"span"}function tV(e,t,r,n,i){let o=n.classList,l=n1(i,"base");void 0!==l&&o.add(...l);let a=!1,u=8&t&&4&t;for(let e in void 0!==(l=n1(i,"underlineStrikethrough"))&&(8&r&&4&r?(a=!0,u||o.add(...l)):u&&o.remove(...l)),C){let n=C[e];if(void 0!==(l=n1(i,e)))if(r&n){if(a&&("underline"===e||"strikethrough"===e)){t&n&&o.remove(...l);continue}t&n&&(!u||"underline"!==e)&&"strikethrough"!==e||o.add(...l)}else t&n&&o.remove(...l)}}function tJ(e,t,r){let n=t.firstChild,i=r.isComposing(),o=e+(i?v:"");if(null==n)t.textContent=o;else{let e=n.nodeValue;if(e!==o)if(i||a){let[t,r,i]=function(e,t){let r=e.length,n=t.length,i=0,o=0;for(;i<r&&i<n&&e[i]===t[i];)i++;for(;o+i<r&&o+i<n&&e[r-o-1]===t[n-o-1];)o++;return[i,r-i-o,t.slice(i,n-o)]}(e,o);0!==r&&n.deleteData(t,r),n.insertData(t,i)}else n.nodeValue=o}}function tH(e,t,r,n,i,o){tJ(i,e,t);let l=o.theme.text;void 0!==l&&tV(0,0,n,e,l)}function tG(e,t){let r=document.createElement(t);return r.appendChild(e),r}class tY extends tF{static getType(){return"text"}static clone(e){return new tY(e.__text,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text,this.__format=e.__format,this.__style=e.__style,this.__mode=e.__mode,this.__detail=e.__detail}constructor(e="",t){super(t),this.__text=e,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){return P[this.getLatest().__mode]}getStyle(){return this.getLatest().__style}isToken(){return 1===this.getLatest().__mode}isComposing(){return this.__key===nA()}isSegmented(){return 2===this.getLatest().__mode}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){let t=C[e];return!!(this.getFormat()&t)}isSimpleText(){return"text"===this.__type&&0===this.__mode}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return nk(this.getLatest().__format,e,t)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,t){let r=this.__format,n=tW(0,r),i=tq(0,r),o=null===n?i:n,l=document.createElement(o),a=l;
15this.hasFormat("code")&&l.setAttribute("spellcheck","false"),null!==n&&(a=document.createElement(i),l.appendChild(a)),tH(a,this,0,r,this.__text,e);let u=this.__style;return""!==u&&(l.style.cssText=u),l}updateDOM(e,t,r){let i=this.__text,o=e.__format,l=this.__format,a=tW(0,o),u=tW(0,l),c=tq(0,o),d=tq(0,l);if((null===a?c:a)!==(null===u?d:u))return!0;if(a===u&&c!==d){let e=t.firstChild;null==e&&n(48);let o=document.createElement(d);return tH(o,this,0,l,i,r),t.replaceChild(o,e),!1}let f=t;null!==u&&null!==a&&null==(f=t.firstChild)&&n(49),tJ(i,f,this);let p=r.theme.text;void 0!==p&&o!==l&&tV(0,o,l,f,p);let g=e.__style,m=this.__style;return g!==m&&(t.style.cssText=m),!1}static importDOM(){return{"#text":()=>({conversion:t0,priority:0}),b:()=>({conversion:tX,priority:0}),code:()=>({conversion:t5,priority:0}),em:()=>({conversion:t5,priority:0}),i:()=>({conversion:t5,priority:0}),mark:()=>({conversion:t5,priority:0}),s:()=>({conversion:t5,priority:0}),span:()=>({conversion:tZ,priority:0}),strong:()=>({conversion:t5,priority:0}),sub:()=>({conversion:t5,priority:0}),sup:()=>({conversion:t5,priority:0}),u:()=>({conversion:t5,priority:0})}}static importJSON(e){return t7().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTextContent(e.text).setFormat(e.format).setDetail(e.detail).setMode(e.mode).setStyle(e.style)}
15exportDOM(e){let{element:t}=super.exportDOM(e);return im(t)||n(132),t.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(t=tG(t,"b")),this.hasFormat("italic")&&(t=tG(t,"i")),this.hasFormat("strikethrough")&&(t=tG(t,"s")),this.hasFormat("underline")&&(t=tG(t,"u")),{element:t}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(e,t){}setFormat(e){let t=this.getWritable();return t.__format="string"==typeof e?C[e]:e,t}setDetail(e){let t=this.getWritable();return t.__detail="string"==typeof e?k[e]:e,t}setStyle(e){let t=this.getWritable();return t.__style=e,t}toggleFormat(e){let t=nk(this.getFormat(),e,null);return this.setFormat(t)}toggleDirectionless(){let e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){let e=this.getWritable();return e.__detail^=2,e}setMode(e){let t=N[e];if(this.__mode===t)return this;let r=this.getWritable();return r.__mode=t,r}setTextContent(e){if(this.__text===e)return this;let t=this.getWritable();return t.__text=e,t}select(e,t){rL();let r=e,n=t,i=rx(),o=this.getTextContent(),l=this.__key;if("string"==typeof o){let e=o.length;void 0===r&&(r=e),void 0===n&&(n=e)}else r=0,n=0;if(!ri(i))return ry(l,r,l,n,"text","text");{let e=nA();e!==i.anchor.key&&e!==i.focus.key||n$(l),i.setTextNodeRange(this,r,this,n)}return i}selectStart(){return this.select(0,0)}selectEnd(){let e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,r,n){let i=this.getWritable(),o=i.__text,l=r.length,a=e;a<0&&(a=l+a)<0&&(a=0);let u=rx();if(n&&ri(u)){let t=e+l;u.setTextNodeRange(i,t,i,t)}return i.__text=o.slice(0,a)+r+o.slice(a+t),i}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){let t;rL();let r=this.getLatest(),n=r.getTextContent();if(""===n)return[];let i=r.__key,o=nA(),l=n.length;e.sort((e,t)=>e-t),e.push(l);let a=[],u=e.length;for(let t=0,r=0;t<l&&r<=u;r++){let i=e[r];i>t&&(a.push(n.slice(t,i)),t=i)}let c=a.length;if(1===c)return[r];let d=a[0],f=r.getParent(),p=r.getFormat(),g=r.getStyle(),m=r.__detail,y=!1,v=null,b=null,_=rx();if(ri(_)){let[e,t]=_.isBackward()?[_.focus,_.anchor]:[_.anchor,_.focus];"text"===e.type&&e.key===i&&(v=e),"text"===t.type&&t.key===i&&(b=t)}r.isSegmented()?((t=t7(d)).__format=p,t.__style=g,t.__detail=m,y=!0):(t=r.getWritable()).__text=d;let w=[t];for(let e=1;e<c;e++){let t=t7(a[e]);t.__format=p,t.__style=g,t.__detail=m;let r=t.__key;o===i&&n$(r),w.push(t)}let x=v?v.offset:null,S=b?b.offset:null,C=0;for(let e of w){if(!v&&!b)break;let t=C+e.getTextContentSize();if(null!==v&&null!==x&&x<=t&&x>=C&&(v.set(e.getKey(),x-C,"text"),x<t&&(v=null)),null!==b&&null!==S&&S<=t&&S>=C){b.set(e.getKey(),S-C,"text");break}C=t}if(null!==f){let e=this.getPreviousSibling(),t=this.getNextSibling();null!==e&&nP(e),null!==t&&nP(t);let r=f.getWritable(),n=this.getIndexWithinParent();y?(r.splice(n,0,w),this.remove()):r.splice(n,1,w),ri(_)&&rC(_,f,n,c-1)}return w}mergeWithSibling(e){let t=e===this.getPreviousSibling();t||e===this.getNextSibling()||n(50);let r=this.__key,i=e.__key,o=this.__text,l=o.length;nA()===i&&n$(r);let a=rx();if(ri(a)){let n=a.anchor,o=a.focus;null!==n&&n.key===i&&rE(n,t,r,e,l),null!==o&&o.key===i&&rE(o,t,r,e,l)}let u=e.__text,c=t?u+o:o+u;this.setTextContent(c);let d=this.getWritable();return e.remove(),d}isTextEntity(){return!1}}function tZ(e){return{forChild:t3(e.style),node:null}}function tX(e){let t="normal"===e.style.fontWeight;return{forChild:t3(e.style,t?void 0:"bold"),node:null}}let tQ=new WeakMap;function t0(e){null===e.parentElement&&n(129);let t=e.textContent||"";if(null!==function(e){let t,r=e.parentNode,n=[e];for(;null!==r&&void 0===(t=tQ.get(r))&&!function(e){if(!im(e))return!1;if("PRE"===e.nodeName)return!0;let t=e.style.whiteSpace;return"string"==typeof t&&t.startsWith("pre")}(r);)n.push(r),r=r.parentNode;let i=void 0===t?r:t;for(let e=0;e<n.length;e++)tQ.set(n[e],i);return i}(e)){let e=t.split(/(\r?\n|\t)/),r=[],n=e.length;for(let t=0;t<n;t++){let n=e[t];"\n"===n||"\r\n"===n?r.push(tz()):" "===n?r.push(t9()):""!==n&&r.push(t7(n))}return{node:r}}if(""===(t=t.replace(/\r/g,"").replace(/[ \t\n]+/g," ")))return{node:null};if(" "===t[0]){let r=e,n=!0;for(;null!==r&&null!==(r=t1(r,!1));){let e=r.textContent||"";if(e.length>
150){/[ \t\n]$/.test(e)&&(t=t.slice(1)),n=!1;break}}n&&(t=t.slice(1))}if(" "===t[t.length-1]){let r=e,n=!0;for(;null!==r&&null!==(r=t1(r,!0));)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){n=!1;break}n&&(t=t.slice(0,t.length-1))}return""===t?{node:null}:{node:t7(t)}}function t1(e,t){let r=e;for(;;){let e;for(;null===(e=t?r.nextSibling:r.previousSibling);){let e=r.parentElement;if(null===e)return null;r=e}if(im(r=e)){let e=r.style.display;if(""===e&&!ib(r)||""!==e&&!e.startsWith("inline"))return null}let n=r;for(;null!==(n=t?r.firstChild:r.lastChild);)r=n;if(nS(r))return r;if("BR"===r.nodeName)return null}}let t2={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function t5(e){let t=t2[e.nodeName.toLowerCase()];return void 0===t?{node:null}:{forChild:t3(e.style,t),node:null}}function t7(e=""){return iu(new tY(e))}function t4(e){return e instanceof tY}function t3(e,t){let r=e.fontWeight,n=e.textDecoration.split(" "),i="700"===r||"bold"===r,o=n.includes("line-through"),l="italic"===e.fontStyle,a=n.includes("underline"),u=e.verticalAlign;return e=>(t4(e)&&(i&&!e.hasFormat("bold")&&e.toggleFormat("bold"),o&&!e.hasFormat("strikethrough")&&e.toggleFormat("strikethrough"),l&&!e.hasFormat("italic")&&e.toggleFormat("italic"),a&&!e.hasFormat("underline")&&e.toggleFormat("underline"),"sub"!==u||e.hasFormat("subscript")||e.toggleFormat("subscript"),"super"!==u||e.hasFormat("superscript")||e.toggleFormat("superscript"),t&&!e.hasFormat(t)&&e.toggleFormat(t)),e)}class t8 extends tY{static getType(){return"tab"}static clone(e){return new t8(e.__key)}constructor(e){super(" ",e),this.__detail=2}static importDOM(){return null}createDOM(e){let t=super.createDOM(e),r=n1(e.theme,"tab");return void 0!==r&&t.classList.add(...r),t}static importJSON(e){return t9().updateFromJSON(e)}setTextContent(e){return" "!==e&&""!==e&&n(126),super.setTextContent(e)}setDetail(e){return 2!==e&&n(127),this}setMode(e){return"normal"!==e&&n(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function t9(){return iu(new t8)}class t6{constructor(e,t,r){this._selection=null,this.key=e,this.offset=t,this.type=r}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){return this.key===e.key?this.offset<e.offset:0>i0(or(i7(this,"next")),or(i7(e,"next")))}getNode(){let e=nO(this.key);return null===e&&n(20),e}set(e,t,r,n){let i=this._selection,o=this.key;n&&this.key===e&&this.offset===t&&this.type===r||(this.key=e,this.offset=t,this.type=r,rF()||(nA()===o&&n$(e),null!==i&&(i.setCachedNodes(null),i.dirty=!0)))}}function re(e,t,r){return new t6(e,t,r)}function rt(e,t){let r=t.__key,n=e.offset,i="element";if(t4(t)){i="text";let e=t.getTextContentSize();n>e&&(n=e)}else if(!r7(t)){let e=t.getNextSibling();if(t4(e))r=e.__key,n=0,i="text";else{let e=t.getParent();e&&(r=e.__key,n=t.getIndexWithinParent()+1)}}e.set(r,n,i)}function rr(e,t){if(r7(t)){let r=t.getLastDescendant();r7(r)||t4(r)?rt(e,r):rt(e,t)}else rt(e,t)}class rn{constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!rl(e))return!1;let t=this._nodes,r=e._nodes;return t.size===r.size&&Array.from(t).every(e=>r.has(e))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new rn(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){let t,r=this.getNodes(),n=r.length,i=r[n-1];if(t4(i))t=i.select();else{let e=i.getIndexWithinParent()+1;t=i.getParentOrThrow().select(e,e)}t.insertNodes(e);for(let e=0;e<n;e++)r[e].remove()}getNodes(){let e=this._cachedNodes;if(null!==e)return e;let t=this._nodes,r=[];for(let e of t){let t=nO(e);null!==t&&r.push(t)}return rF()||(this._cachedNodes=r),r}getTextContent(){let e=this.getNodes(),t="";for(let r=0;r<e.length;r++)t+=e[r].getTextContent();return t}deleteNodes(){let e=this.getNodes();if((rx()||rS())===this&&e[0]){let t=iK(e[0],"next");i3(iX(t,t))}for(let t of e)t.remove()}}function ri(e){return e instanceof ro}class ro{constructor(e,t,r,n){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this.format=r,this.style=n,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!ri(e)&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){let e=this._cachedNodes;if(null!==e)return e;let t=function(e){let t=[],[r,n]=e.getTextSlices();r&&t.push(r.caret.origin);let i=new Set,o=new Set;for(let r of e)if(iL(r)){let{origin:e}=r;
150===t.length?i.add(e):(o.add(e),t.push(e))}else{let{origin:e}=r;r7(e)&&o.has(e)||t.push(e)}if(n&&t.push(n.caret.origin),iF(e.focus)&&r7(e.focus.origin)&&null===e.focus.getNodeAtCaret())for(let r=iV(e.focus.origin,"previous");iL(r)&&i.has(r.origin)&&!r.origin.isEmpty()&&r.origin.is(t[t.length-1]);r=iJ(r))i.delete(r.origin),t.pop();for(;t.length>1;){let e=t[t.length-1];if(!r7(e)||o.has(e)||e.isEmpty()||i.has(e))break;t.pop()}if(0===t.length&&e.isCollapsed()){let r=or(e.anchor),n=or(e.anchor.getFlipped()),i=e=>iI(e)?e.origin:e.getNodeAtCaret(),o=i(r)||i(n)||(e.anchor.getNodeAtCaret()?r.origin:n.origin);t.push(o)}return t}(oo(i9(this),"next"));return rF()||(this._cachedNodes=t),t}setTextNodeRange(e,t,r,n){this.anchor.set(e.__key,t,"text"),this.focus.set(r.__key,n,"text")}getTextContent(){let e=this.getNodes();if(0===e.length)return"";let t=e[0],r=e[e.length-1],n=this.anchor,i=this.focus,o=n.isBefore(i),[l,a]=rs(this),u="",c=!0;for(let d=0;d<e.length;d++){let f=e[d];if(r7(f)&&!f.isInline())c||(u+="\n"),c=!f.isEmpty();else if(c=!1,t4(f)){let e=f.getTextContent();f===t?f===r?"element"===n.type&&"element"===i.type&&i.offset!==n.offset||(e=l<a?e.slice(l,a):e.slice(a,l)):e=o?e.slice(l):e.slice(a):f===r&&(e=o?e.slice(0,a):e.slice(0,l)),u+=e}else!r8(f)&&!tU(f)||f===r&&this.isCollapsed()||(u+=f.getTextContent())}return u}applyDOMRange(e){let t=rU(),r=t.getEditorState()._selection,n=rg(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,r);if(null===n)return;let[i,o]=n;this.anchor.set(i.key,i.offset,i.type,!0),this.focus.set(o.key,o.offset,o.type,!0),H(this)}clone(){let e=this.anchor,t=this.focus;return new ro(re(e.key,e.offset,e.type),re(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=nk(this.format,e,null),this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){let t=C[e];return!!(this.format&t)}insertRawText(e){let t=e.split(/(\r?\n|\t)/),r=[],n=t.length;for(let e=0;e<n;e++){let n=t[e];"\n"===n||"\r\n"===n?r.push(tz()):" "===n?r.push(t9()):r.push(t7(n))}this.insertNodes(r)}insertText(e){let t=this.anchor,r=this.focus,i=this.format,o=this.style,l=t,a=r;!this.isCollapsed()&&r.isBefore(t)&&(l=r,a=t),"element"===l.type&&function(e,t,r,n){let i=e.getNode(),o=i.getChildAtIndex(e.offset),l=t7(),a=r6(i)?nl().append(l):l;l.setFormat(r),l.setStyle(n),null===o?i.append(a):o.insertBefore(a),e.is(t)&&t.set(l.__key,0,"text"),e.set(l.__key,0,"text")}(l,a,i,o),"element"===a.type&&i4(a,or(i7(a,"next")));let u=l.offset,c=a.offset,d=this.getNodes(),f=d.length,p=d[0];t4(p)||n(26);let g=p.getTextContent().length,m=p.getParentOrThrow(),y=d[f-1];if(1===f&&"element"===a.type&&(c=g,a.set(l.key,c,"text")),this.isCollapsed()&&u===g&&(p.isSegmented()||p.isToken()||!p.canInsertTextAfter()||!m.canInsertTextAfter()&&null===p.getNextSibling())){let t=p.getNextSibling();if(t4(t)&&t.canInsertTextBefore()&&!nx(t)||((t=t7()).setFormat(i),t.setStyle(o),m.canInsertTextAfter()?p.insertAfter(t):m.insertAfter(t)),t.select(0,0),p=t,""!==e)return void this.insertText(e)}else if(this.isCollapsed()&&0===u&&(p.isSegmented()||p.isToken()||!p.canInsertTextBefore()||!m.canInsertTextBefore()&&null===p.getPreviousSibling())){let t=p.getPreviousSibling();if(t4(t)&&!nx(t)||((t=t7()).setFormat(i),m.canInsertTextBefore()?p.insertBefore(t):m.insertBefore(t)),t.select(),p=t,""!==e)return void this.insertText(e)}else if(p.isSegmented()&&u!==g){let e=t7(p.getTextContent());e.setFormat(i),p.replace(e),p=e}else if(!this.isCollapsed()&&""!==e){let t=y.getParent();if(!m.canInsertTextBefore()||!m.canInsertTextAfter()||r7(t)&&(!t.canInsertTextBefore()||!t.canInsertTextAfter()))return this.insertText(""),rp(this.anchor,this.focus,null),void this.insertText(e)}if(1===f){if(p.isToken()){let t=t7(e);return t.select(),void p.replace(t)}let t=p.getFormat(),r=p.getStyle();if(u!==c||t===i&&r===o){if(p instanceof t8){let t=t7(e);return t.setFormat(i),t.setStyle(o),t.select(),void p.replace(t)}}else{if(""!==p.getTextContent()){let t=t7(e);if(t.setFormat(i),t.setStyle(o),t.select(),0===u)p.insertBefore(t,!1);else{let[e]=p.splitText(u);e.insertAfter(t,!1)}return void(t.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length))}p.setFormat(i),p.setStyle(o)}let n=c-u;""===(p=p.spliceText(u,n,e,!0)).getTextContent()?p.remove():"text"===this.anchor.type&&(p.isComposing()?this.anchor.offset-=e.length:(this.format=t,this.style=r))}else{let t=new Set([...p.getParentKeys(),...y.getParentKeys()]),r=r7(p)?p:p.getParentOrThrow(),n=r7(y)?y:y.getParentOrThrow(),i=y;if(!r.is(n)&&n.isInline())do i=n,n=n.getParentOrThrow();while(n.isInline());if("text"===a.type&&(0!==c||""===y.getTextContent())||"element"===a.type&&y.getIndexWithinParent()<c)if(t4(y)&&!y.isToken()&&c!==y.getTextContentSize()){if(y.isSegmented()){let e=t7(y.getTextContent());y.replace(e),y=e}r6(a.getNode())||"text"!==a.type||(y=y.spliceText(0,c,"")),t.add(y.__key)}else{let e=y.getParentOrThrow();e.canBeEmpty()||1!==e.getChildrenSize()?y.remove():e.remove()}else t.add(y.__key);let o=n.getChildren(),l=new Set(d),m=r.is(n),v=r.isInline()&&null===p.getNextSibling()?r:p;for(let e=o.length-1;e>=0;
15e--){let t=o[e];if(t.is(p)||r7(t)&&t.isParentOf(p))break;t.isAttached()&&(!l.has(t)||t.is(i)?m||v.insertAfter(t,!1):t.remove())}if(!m){let e=n,r=null;for(;null!==e;){let n=e.getChildren(),i=n.length;(0===i||n[i-1].is(r))&&(t.delete(e.__key),r=e),e=e.getParent()}}if(p.isToken())if(u===g)p.select();else{let t=t7(e);t.select(),p.replace(t)}else""===(p=p.spliceText(u,g-u,e,!0)).getTextContent()?p.remove():p.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length);for(let e=1;e<f;e++){let r=d[e],n=r.__key;t.has(n)||r.remove()}}}removeText(){let e=rx()===this;i8(this,function(e,t="removeEmptySlices"){let r,i;if(e.isCollapsed())return e;let o="root",l="next",a=t,u=oo(e,l),c=oe(u.anchor,o),d=oe(u.focus.getFlipped(),o),f=new Set,p=[];for(let e of u.iterNodeCarets(o))if(iL(e))f.add(e.origin.getKey());else if(iF(e)){let{origin:t}=e;r7(t)&&!f.has(t.getKey())||p.push(t)}for(let e of p)e.remove();for(let e of u.getTextSlices()){if(!e)continue;let{origin:t}=e.caret,r=t.getTextContentSize(),n=i6(iK(t,l)),i=t.getMode();if(Math.abs(e.distance)===r&&"removeEmptySlices"===a||"token"===i&&0!==e.distance)n.remove();else if(0!==e.distance){a="removeEmptySlices";let t=e.removeTextSlice(),r=e.caret.origin;if("segmented"===i){let e=t.origin,r=t7(e.getTextContent()).setStyle(e.getStyle()).setFormat(e.getFormat());n.replaceOrInsert(r),t=iW(r,l,t.offset)}r.is(c[0].origin)&&(c[0]=t),r.is(d[0].origin)&&(d[0]=t.getFlipped())}}for(let e of c)if(ot(e)){r=or(e);break}for(let e of d)if(ot(e)){i=or(e);break}let g=function(e,t,r){let n;if(!e||!t)return null;let i=e.getParentAtCaret(),o=t.getParentAtCaret();if(!i||!o)return null;let l=i.getParents().reverse();l.push(i);let a=o.getParents().reverse();a.push(o);let u=Math.min(l.length,a.length);for(n=0;n<u&&l[n]===a[n];n++);let c=(e,t)=>{let r;for(let i=n;i<e.length;i++){let n=e[i];if(ia(n))return;!r&&t(n)&&(r=n)}return r},d=c(l,iw),f=d&&c(a,e=>r.has(e.getKey())&&iw(e));return d&&f?[d,f]:null}(r,i,f);if(g){let[e,t]=g;iV(e,"previous").splice(0,t.getChildren()),t.remove()}let m=[r,i,...c,...d].find(ot);if(m)return iZ(oi(or(m),e.direction));n(269,JSON.stringify(c.map(e=>e.origin.__key)))}(i9(this))),e&&rx()!==this&&nB(this)}formatText(e,t=null){if(this.isCollapsed())return this.toggleFormat(e),void n$(null);let r=this.getNodes(),n=[];for(let e of r)t4(e)&&n.push(e);let i=t=>{r.forEach(r=>{if(r7(r)){let n=r.getFormatFlags(e,t);r.setTextFormat(n)}})},o=n.length;if(0===o)return this.toggleFormat(e),n$(null),void i(t);let l=this.anchor,a=this.focus,u=this.isBackward(),c=u?a:l,d=u?l:a,f=0,p=n[0],g="element"===c.type?0:c.offset;if("text"===c.type&&g===p.getTextContentSize()&&(f=1,p=n[1],g=0),null==p)return;let m=p.getFormatFlags(e,t);i(m);let y=o-1,v=n[y],b="text"===d.type?d.offset:v.getTextContentSize();if(p.is(v)){if(g===b)return;if(nx(p)||0===g&&b===p.getTextContentSize())p.setFormat(m);else{let e=p.splitText(g,b),t=0===g?e[0]:e[1];t.setFormat(m),"text"===c.type&&c.set(t.__key,0,"text"),"text"===d.type&&d.set(t.__key,b-g,"text")}return void(this.format=m)}0===g||nx(p)||([,p]=p.splitText(g),g=0),p.setFormat(m);let _=v.getFormatFlags(e,m);b>0&&(b===v.getTextContentSize()||nx(v)||([v]=v.splitText(b)),v.setFormat(_));for(let t=f+1;t<y;t++){let r=n[t],i=r.getFormatFlags(e,_);r.setFormat(i)}"text"===c.type&&c.set(p.__key,g,"text"),"text"===d.type&&d.set(v.__key,b,"text"),this.format=m|_}insertNodes(e){var t;if(0===e.length)return;if(this.isCollapsed()||this.removeText(),"root"===this.anchor.key){this.insertParagraph();let t=rx();return ri(t)||n(134),t.insertNodes(e)}let r=(this.isBackward()?this.focus:this.anchor).getNode(),i=ix(r,iw),o=e[e.length-1];if(r7(i)&&"__language"in i){if("__language"in e[0])this.insertText(e[0].getTextContent());else{let t=r$(this);i.splice(t,0,e),o.selectEnd()}return}if(!e.some(e=>(r7(e)||r8(e))&&!e.isInline())){r7(i)||n(211,r.constructor.name,r.getType());let t=r$(this);return i.splice(t,0,e),void o.selectEnd()}let l=function(e){let t=nl(),r=null;for(let n=0;n<e.length;n++){let i=e[n],o=tU(i);if(o||r8(i)&&i.isInline()||r7(i)&&i.isInline()||t4(i)||i.isParentRequired()){if(null===r&&(r=i.createParentElementNode(),t.append(r),o))continue;null!==r&&r.append(i)}else t.append(i),r=null}return t}(e),a=l.getLastDescendant(),u=l.getChildren(),c=r7(i)&&i.isEmpty()?null:this.insertParagraph(),d=u[u.length-1],f=u[0];r7(t=f)&&iw(t)&&!t.isEmpty()&&r7(i)&&(!i.isEmpty()||i.canMergeWhenEmpty())&&(r7(i)||n(211,r.constructor.name,r.getType()),i.append(...f.getChildren()),f=u[1]),f&&(null===i&&n(212,r.constructor.name,r.getType()),function(e,t,r){let i=t.getParentOrThrow().getLastChild(),o=t,l=[t];for(;o!==i;)o.getNextSibling()||n(140),l.push(o=o.getNextSibling());let a=e;for(let e of l)a=a.insertAfter(e)}(i,f));let p=ix(a,iw);c&&r7(p)&&(c.canMergeWhenEmpty()||iw(d))&&(p.append(...c.getChildren()),c.remove()),r7(i)&&i.isEmpty()&&i.remove(),a.selectEnd();let g=r7(i)?i.getLastChild():null;tU(g)&&p!==i&&g.remove()}insertParagraph(){if("root"===this.anchor.key){let e=nl();return nF().splice(this.anchor.offset,0,[e]),e.select(),e}let e=r$(this),t=ix(this.anchor.getNode(),iw);r7(t)||n(213);let r=t.getChildAtIndex(e),i=r?[r,...r.getNextSiblings()]:[],o=t.insertNewAfter(this,!1);return o?(o.append(...i),o.selectStart(),o):null}insertLineBreak(e){let t=tz();if(this.insertNodes([t]),e){let e=t.getParentOrThrow(),r=t.getIndexWithinParent();e.select(r,r)}}extract(){let e=this.getNodes(),t=e.length,r=t-1,n=this.anchor,i=this.focus,o=e[0],l=e[r],[a,u]=rs(this);if(0===t)return[];if(1===t){if(t4(o)&&!this.isCollapsed()){let e=a>u?u:a,t=o.splitText(e,a>u?a:u),r=0===e?t[0]:t[1];return null!=r?[r]:[]}return[o]}let c=n.isBefore(i);if(t4(o)){let t=c?a:u;t===o.getTextContentSize()?e.shift():0!==t&&([,o]=o.splitText(t),e[0]=o)}if(t4(l)){let t=l.getTextContent().length,n=c?u:a;0===n?e.pop():n!==t&&([l]=l.splitText(n),e[r]=l)}return e}modify(e,t,r){var n;if(rA(this,e,t,r))return;let i="move"===e,o=rU(),l=ip(io(o));if(!l)return;let a=o._blockCursorElement,u=o._rootElement,c=this.focus.getNode();if(null===u||null===a||!r7(c)||c.isInline()||c.canBeEmpty()||ih(a,o,u),this.dirty){let e=n9(o,this.anchor.key),t=n9(o,this.focus.key);"text"===this.anchor.type&&(e=nC(e)),"text"===this.focus.type&&(t=nC(t)),e&&t&&rN(l,e,this.anchor.offset,t,this.focus.offset)}if(n=t?"backward":"forward",l.modify(e,n,r),l.rangeCount>0){let e=l.getRangeAt(0),r=this.anchor.getNode(),n=r6(r)?r:function(e){let t=e.getParentOrThrow();for(;null!==t&&!ia(t);)t=t.getParentOrThrow();return t}(r);if(this.applyDOMRange(e),this.dirty=!0,!i){let r=this.getNodes(),i=[],o=!1;for(let e=0;e<r.length;e++){let t=r[e];ir(t,n)?i.push(t):o=!0}if(o&&i.length>0)if(t){let e=i[0];r7(e)?e.selectStart():e.getParentOrThrow().selectStart()}else{let e=i[i.length-1];r7(e)?e.selectEnd():e.getParentOrThrow().selectEnd()}l.anchorNode===e.startContainer&&l.anchorOffset===e.startOffset||function(e){let t=e.focus,r=e.anchor,n=r.key,i=r.offset,o=r.type;r.set(t.key,t.offset,t.type,!0),t.set(n,i,o,!0)}(this)}}"lineboundary"===r&&rA(this,e,t,r,"decorators")}forwardDeletion(e,t,r){if(!r&&("element"===e.type&&r7(t)&&e.offset===t.getChildrenSize()||"text"===e.type&&e.offset===t.getTextContentSize())){let e=t.getParent(),r=t.getNextSibling()||(null===e?null:e.getNextSibling());if(r7(r)&&r.isShadowRoot())return!0}return!1}deleteCharacter(e){let t=this.isCollapsed();if(this.isCollapsed()){let t=this.anchor,r=t.getNode();if(this.forwardDeletion(t,r,e))return;let n=iY(i7(t,e?"previous":"next"));if(n.getTextSlices().every(e=>null===e||0===e.distance)){let e={type:"initial"};for(let t of n.iterNodeCarets("shadowRoot"))if(iL(t))if(t.origin.isInline());else{if(t.origin.isShadowRoot()){if("merge-block"===e.type)break;if(r7(n.anchor.origin)&&n.anchor.origin.isEmpty()){let e=or(t);i8(this,iX(e,e)),n.anchor.origin.remove()}return}"merge-next-block"!==e.type&&"merge-block"!==e.type||(e={block:e.block,caret:t,type:"merge-block"})}else{if("merge-block"===e.type)break;if(iF(t)){if(r7(t.origin)){if(t.origin.isInline()){if(!t.origin.isParentOf(n.anch
15or.origin))break}else e={block:t.origin,type:"merge-next-block"};continue}if(r8(t.origin)){if(t.origin.isIsolated());else if("merge-next-block"===e.type&&(t.origin.isKeyboardSelectable()||!t.origin.isInline())&&r7(n.anchor.origin)&&n.anchor.origin.isEmpty()){n.anchor.origin.remove();let e=rb();e.add(t.origin.getKey()),nB(e)}else t.origin.remove();return}break}}if("merge-block"===e.type){let{caret:t,block:r}=e;return i8(this,iX(!t.origin.isEmpty()&&r.isEmpty()?i6(iK(r,t.direction)):n.anchor,t)),this.removeText()}}let i=this.focus;if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&0===t.offset&&ru(this,t.getNode()))return}else{let n="text"===i.type?i.getNode():null;if(r="text"===t.type?t.getNode():null,null!==n&&n.isSegmented()){let t=i.offset,o=n.getTextContentSize();if(n.is(r)||e&&t!==o||!e&&0!==t)return void rd(n,e,t)}else if(null!==r&&r.isSegmented()){let i=t.offset,o=r.getTextContentSize();if(r.is(n)||e&&0!==i||!e&&i!==o)return void rd(r,e,i)}!function(e,t){let r=e.anchor,n=e.focus,i=r.getNode();if(i===n.getNode()&&"text"===r.type&&"text"===n.type){var o;let e=r.offset,l=n.offset,a=e<l,u=a?e:l,c=a?l:e,d=c-1;u===d||nK(o=i.getTextContent().slice(u,c))||rc(o)||(t?n.set(n.key,d,n.type):r.set(r.key,d,r.type))}}(this,e)}}if(this.removeText(),e&&!t&&this.isCollapsed()&&"element"===this.anchor.type&&0===this.anchor.offset){let e=this.anchor.getNode();e.isEmpty()&&r6(e.getParent())&&null===e.getPreviousSibling()&&ru(this,e)}}deleteLine(e){this.isCollapsed()&&this.modify("extend",e,"lineboundary"),this.isCollapsed()?this.deleteCharacter(e):this.removeText()}deleteWord(e){if(this.isCollapsed()){let t=this.anchor,r=t.getNode();if(this.forwardDeletion(t,r,e))return;this.modify("extend",e,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function rl(e){return e instanceof rn}function ra(e){let t=e.offset;if("text"===e.type)return t;let r=e.getNode();return t===r.getChildrenSize()?r.getTextContent().length:0}function rs(e){let t=e.getStartEndPoints();if(null===t)return[0,0];let[r,n]=t;return"element"===r.type&&"element"===n.type&&r.key===n.key&&r.offset===n.offset?[0,0]:[ra(r),ra(n)]}function ru(e,t){for(let r=t;r;r=r.getParent()){if(r7(r)){if(r.collapseAtStart(e))return!0;if(ia(r))break}if(r.getPreviousSibling())break}return!1}let rc=(()=>{try{let e=RegExp("\\p{Emoji}","u"),t=e.test.bind(e);if(t("â¤ï¸")&&t("#ï¸â£")&&t("\uD83D\uDC4D"))return t}catch(e){}return()=>!1})();function rd(e,t,r){let n=e.getTextContent().split(/(?=\s)/g),i=n.length,o=0,l=0;for(let e=0;e<i;e++){let a=e===i-1;if(l=o,o+=n[e].length,t&&o===r||o>r||a){n.splice(e,1),a&&(l=void 0);break}}let a=n.join("").trim();""===a?e.remove():(e.setTextContent(a),e.select(l,l))}function rf(e,t,r,i){let o,l=t;if(im(e)){let a=!1,u=e.childNodes,c=u.length,d=i._blockCursorElement;l===c&&(a=!0,l=c-1);let f=u[l],p=!1;if(f===d)f=u[l+1],p=!0;else if(null!==d){let r=d.parentNode;e===r&&t>Array.prototype.indexOf.call(r.children,d)&&l--}if(t4(o=nz(f)))l=nU(o,a);else{let u=nz(e);if(null===u)return null;if(r7(u)){let c=i.getElementByKey(u.getKey());null===c&&n(214);let d=u.getDOMSlot(c);[u,l]=d.resolveChildIndex(u,c,e,t),r7(u)||n(215),a&&l>=u.getChildrenSize()&&(l=Math.max(0,u.getChildrenSize()-1));let f=u.getChildAtIndex(l);if(r7(f)&&function(e,t,r){let n=e.getParent();return null===r||null===n||!n.canBeEmpty()||n!==r.getNode()}(f,0,r)){let e=a?f.getLastDescendant():f.getFirstDescendant();u=null===e||r7(f=e)?f:f.getParentOrThrow(),l=0}t4(f)?(o=f,u=null,l=nU(f,a)):f!==u&&a&&!p&&(r7(u)||n(216),l=Math.min(u.getChildrenSize(),l+1))}else{let r=u.getIndexWithinParent();l=0===t&&r8(u)&&nz(e)===u?r:r+1,u=u.getParentOrThrow()}if(r7(u))return re(u.__key,l,"element")}}else o=nz(e);return t4(o)?re(o.__key,l,"text"):null}function rh(e,t,r){let n=e.offset,i=e.getNode();if(0===n){let n=i.getPreviousSibling(),o=i.getParent();if(t){if((r||!t)&&null===n&&r7(o)&&o.isInline()){let t=o.getPreviousSibling();t4(t)&&e.set(t.__key,t.getTextContent().length,"text")}}else r7(n)&&!r&&n.isInline()?e.set(n.__key,n.getChildrenSize(),"element"):t4(n)&&e.set(n.__key,n.getTextContent().length,"text")}else if(n===i.getTextContent().length){let n=i.getNextSibling(),o=i.getParent();if(t&&r7(n)&&n.isInline())e.set(n.__key,0,"element");else if((r||t)&&null===n&&r7(o)&&o.isInline()&&!o.canInsertTextAfter()){let t=
15o.getNextSibling();t4(t)&&e.set(t.__key,0,"text")}}}function rp(e,t,r){if("text"===e.type&&"text"===t.type){let n=e.isBefore(t),i=e.is(t);rh(e,n,i),rh(t,!n,i),i&&t.set(e.key,e.offset,e.type);let o=rU();if(o.isComposing()&&o._compositionKey!==e.key&&ri(r)){let n=r.anchor,i=r.focus;e.set(n.key,n.offset,n.type,!0),t.set(i.key,i.offset,i.type,!0)}}}function rg(e,t,r,n,i,o){if(null===e||null===r||!nv(i,e,r))return null;let l=rf(e,t,ri(o)?o.anchor:null,i);if(null===l)return null;let a=rf(r,n,ri(o)?o.focus:null,i);if(null===a)return null;if("element"===l.type&&"element"===a.type){let t=nz(e),n=nz(r);if(r8(t)&&r8(n))return null}return rp(l,a,o),[l,a]}function rm(e){return r7(e)&&!e.isInline()}function ry(e,t,r,n,i,o){let l=rz(),a=new ro(re(e,t,i),re(r,n,o),0,"");return a.dirty=!0,l._selection=a,a}function rv(){return new ro(re("root",0,"element"),re("root",0,"element"),0,"")}function rb(){return new rn(new Set)}function r_(e,t){return rw(null,e,t,null)}function rw(e,t,r,n){let i,o,l,a,u=r._window;if(null===u)return null;let c=n||u.event,d=c?c.type:void 0,f="selectionchange"===d,p=!$&&(f||"beforeinput"===d||"compositionstart"===d||"compositionend"===d||"click"===d&&c&&3===c.detail||"drop"===d||void 0===d);if(ri(e)&&!p)return e.clone();if(null===t)return null;if(i=t.anchorNode,o=t.focusNode,l=t.anchorOffset,a=t.focusOffset,f&&ri(e)&&!nv(r,i,o))return e.clone();let g=rg(i,l,o,a,r,e);if(null===g)return null;let[m,y]=g;return new ro(m,y,ri(e)?e.format:0,ri(e)?e.style:"")}function rx(){return rz()._selection}function rS(){return rU()._editorState._selection}function rC(e,t,r,n=1){let i=e.anchor,o=e.focus,l=i.getNode(),a=o.getNode();if(!t.is(l)&&!t.is(a))return;let u=t.__key;if(e.isCollapsed()){let t=i.offset;if(r<=t&&n>0||r<t&&n<0){let r=Math.max(0,t+n);i.set(u,r,"element"),o.set(u,r,"element"),rk(e)}}else{let l=e.isBackward(),a=l?o:i,c=a.getNode(),d=l?i:o,f=d.getNode();if(t.is(c)){let e=a.offset;(r<=e&&n>0||r<e&&n<0)&&a.set(u,Math.max(0,e+n),"element")}if(t.is(f)){let e=d.offset;(r<=e&&n>0||r<e&&n<0)&&d.set(u,Math.max(0,e+n),"element")}}rk(e)}function rk(e){let t=e.anchor,r=t.offset,n=e.focus,i=n.offset,o=t.getNode(),l=n.getNode();if(e.isCollapsed()){if(!r7(o))return;let e=o.getChildrenSize(),i=r>=e,l=i?o.getChildAtIndex(e-1):o.getChildAtIndex(r);if(t4(l)){let e=0;i&&(e=l.getTextContentSize()),t.set(l.__key,e,"text"),n.set(l.__key,e,"text")}}else{if(r7(o)){let e=o.getChildrenSize(),n=r>=e,i=n?o.getChildAtIndex(e-1):o.getChildAtIndex(r);if(t4(i)){let e=0;n&&(e=i.getTextContentSize()),t.set(i.__key,e,"text")}}if(r7(l)){let e=l.getChildrenSize(),t=i>=e,r=t?l.getChildAtIndex(e-1):l.getChildAtIndex(i);if(t4(r)){let e=0;t&&(e=r.getTextContentSize()),n.set(r.__key,e,"text")}}}}function rT(e,t,r,n,i){let o=null,l=0,a=null;null!==n?(o=n.__key,t4(n)?(l=n.getTextContentSize(),a="text"):r7(n)&&(l=n.getChildrenSize(),a="element")):null!==i&&(o=i.__key,t4(i)?a="text":r7(i)&&(a="element")),null!==o&&null!==a?e.set(o,l,a):(-1===(l=t.getIndexWithinParent())&&(l=r.getChildrenSize()),e.set(r.__key,l,"element"))}function rE(e,t,r,n,i){"text"===e.type?e.set(r,e.offset+(t?0:i),"text"):e.offset>n.getIndexWithinParent()&&e.set(e.key,e.offset-1,"element")}function rN(e,t,r,n,i){try{e.setBaseAndExtent(t,r,n,i)}catch(e){}}function rP(e){let t=rx()||rS();null===t&&(t=nF().selectEnd()),t.insertNodes(e)}function r$(e){let t=e;e.isCollapsed()||t.removeText();let r=rx();ri(r)&&(t=r),ri(t)||n(161);let i=t.anchor,o=i.getNode(),l=i.offset;for(;!iw(o);){let e=o;if([o,l]=function(e,t){let r=e.getParent();if(!r){let e=nl();return nF().append(e),e.select(),[nF(),0]}if(t4(e)){let n=e.splitText(t);if(0===n.length)return[r,e.getIndexWithinParent()];let i=+(0!==t);return[r,n[0].getIndexWithinParent()+i]}if(!r7(e)||0===t)return[r,e.getIndexWithinParent()];let n=e.getChildAtIndex(t);if(n){let r=new ro(re(e.__key,t,"element"),re(e.__key,t,"element"),0,""),i=e.insertNewAfter(r);i&&i.append(n,...n.getNextSiblings())}return[r,e.getIndexWithinParent()+1]}(o,l),e.is(o))break}return l}function rA(e,t,r,n,i="decorators-and-blocks"){if("move"===t&&"character"===n&&!e.isCollapsed()){let[t,n]=r===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return n.set(t.key,t.offset,t.type),!0}let o=i7(e.focus,r?"previous":"next"),l="lineboundary"===n,a="move"===t,u=o,c="decorators-and-blocks"===i;if(!on(u)){for(let e of u){c=!1;let{origin:t}=e;if(!r8(t)||t.isIsolated()||(u=e,!l||!t.isInline()))break}if(c)for(let e of iY(o).iterNodeCarets("extend"===t?"shadowRoot":"root")){if(iL(e))e.origin.isInline()||(u=e);else{if(r7(e.origin))continue;r8(e.origin)&&!e.origin.isInline()&&(u=e)}break}}if(u===o)return!1;if(a&&!l&&r8(u.origin)&&u.origin.isKeyboardSelectable()){let e=rb();return e.add(u.origin.getKey()),nB(e),!0}return u=or(u),a&&i4(e.anchor,u),i4(e.focus,u),c||!l}let rO=null,rj=null,rM=!1,rD=!1,rR=0,rI={characterData:!0,childList:!0,subtree:!0};function rF(){return rM||null!==rO&&rO._readOnly}function rL(){rM&&n(13)}function rB(){rR>99&&n(14)}function rz(){return null===rO&&n(195,rK()),rO}function rU(){return null===rj&&n(196,rK()),rj}function rK(){let e=0,t=new Set,r=np.version;if("undefined"!=typeof window)for(let n of document.querySelectorAll("[contenteditable]")){let i=nw(n);if(nb(i))e++;else if(i){let e=String(i.constructor.version||"<0.17.1");e===r&&(e+=" (separately built, likely a bundler configuration issue)"),t.add(e)}}let n=` Detected on the page: ${e} compatible editor(s) with version ${r}`;return t.size&&(n+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),n}function rW(e,t,r){let i=t.__type,o=function(e,t){let r=e._nodes.get(t);return void 0===r&&n(30,t),r}(e,i),l=r.get(i);void 0===l&&(l=Array.from(o.transforms),r.set(i,l));let a=l.length;for(let e=0;e<a&&(l[e](t),t.isAttached());e++);}function rq(e,t){return void 0!==e&&e.__key!==t&&e.isAttached()}function rV(e,t){if(!t)return;let r=e._updateTags,n=t;for(let e of(Array.isArray(t)||(n=[t]),n))r.add(e)}function rJ(e){return rH(e,rU()._nodes)}function rH(e,t){let r=e.type,i=t.get(r);void 0===i&&n(17,r);let o=i.klass;e.type!==o.getType()&&n(18,o.name);let l=o.importJSON(e),a=e.children;if(r7(l)&&Array.isArray(a))for(let e=0;e<a.length;e++){let r=rH(a[e],t);l.append(r)}return l}function rG(e,t,r){let n=rO,i=rM,o=rj;rO=t,rM=!0,rj=e;try{return r()}finally{rO=n,rM=i,rj=o}}function rY(e,t){let r=e._pendingEditorState,i=e._rootElement,o=e._headless||null===i;if(null===r)return;let l=e._editorState,a=l._selection,u=r._selection,c=0!==e._dirtyType,d=rO,f=rM,p=rj,g=e._updating,m=e._observer,v=null;if(e._pendingEditorState=null,e._editorState=r,!o&&c&&null!==m){rj=e,rO=r,rM=!1,e._updating=!0;try{let t=e._dirtyType,i=e._dirtyElements,o=e._dirtyLeaves;m.disconnect(),v=function(e,t,r,i,o,l){el="",ec="",ea="",ed=2===i,eh=null,Z=r,Y=r._config,X=r._nodes,Q=Z._listeners.mutation,ee=o,et=l,er=e._nodeMap,en=t._nodeMap,ef=t._readOnly,ei=new Map(r._keyToDOMMap);let a=new Map;return eo=a,function e(t,r){let i=er.get(t),o=en.get(t);void 0!==i&&void 0!==o||n(61);let l=ed||et.has(t)||ee.has(t),a=n9(Z,t);
15if(i===o&&!l){if(r7(i)){let e=a.__lexicalTextContent;void 0!==e&&(el+=e,ec+=e);let t=a.__lexicalDirTextContent;void 0!==t&&(ea+=t)}else{let e=i.getTextContent();t4(i)&&!i.isDirectionless()&&(ea+=e),ec+=e,el+=e}return a}if(i!==o&&l&&n2(eo,X,Q,o,"updated"),o.updateDOM(i,a,Y)){let e=eb(t,null);return null===r&&n(62),r.replaceChild(e,a),ep(t,null),e}if(r7(i)&&r7(o)){let t=o.__indent;t!==i.__indent&&ey(a,t);let r=o.__format;r!==i.__format&&ev(a,r),l&&(function(t,r,i){let o=ea;ea="",es=null,eu="",function(t,r,i){let o=el,l=t.__size,a=r.__size;el="";let u=i.element;if(1===l&&1===a){let n=t.__first,i=r.__first;if(n===i)e(n,u);else{let e=eE(n),t=eb(i,null);try{u.replaceChild(t,e)}catch(r){if("object"==typeof r&&null!=r)throw Error(`${r.toString()} Parent: ${u.tagName}, new child: {tag: ${t.tagName} key: ${i}}, old child: {tag: ${e.tagName}, key: ${n}}.`);throw r}ep(n,null)}let o=en.get(i);t4(o)&&(null===es&&(es=o.getFormat()),""===eu&&(eu=o.getStyle()))}else{let o=eC(t,er),c=eC(r,en);if(o.length!==l&&n(227),c.length!==a&&n(228),0===l)0!==a&&e_(c,r,0,a-1,i);else if(0===a){if(0!==l){let e=null==i.after&&null==i.before&&null==i.element.__lexicalLineBreak;eg(o,0,l-1,e?null:u),e&&(u.textContent="")}}else!function(t,r,n,i,o,l){let a=i-1,u=o-1,c,d,f=l.getFirstChild(),p=0,g=0;for(;p<=a&&g<=u;){let t=r[p],i=n[g];if(t===i)f=eT(e(i,l.element)),p++,g++;else{void 0===c&&(c=new Set(r)),void 0===d&&(d=new Set(n));let o=d.has(t),a=c.has(i);if(o)if(a){let t=n9(Z,i);t===f?f=eT(e(i,l.element)):(l.withBefore(f).insertChild(t),e(i,l.element)),p++,g++}else eb(i,l.withBefore(f)),g++;else f=eT(eE(t)),ep(t,l.element),p++}let o=en.get(i);null!==o&&t4(o)&&(null===es&&(es=o.getFormat()),""===eu&&(eu=o.getStyle()))}let m=p>a,y=g>u;if(m&&!y){let e=n[u+1],r=void 0===e?null:Z.getElementByKey(e);e_(n,t,g,u,l.withBefore(r))}else y&&!m&&eg(r,p,a,l.element)}(r,o,c,l,a,i)}n8(r)&&(el+="\n\n"),u.__lexicalTextContent=el,el=o+el}(t,r,r.getDOMSlot(i)),eS(r,i),null==es||es===r.__textFormat||ef||r.setTextFormat(es),""===eu||eu===r.__textStyle||ef||r.setTextStyle(eu),ea=o}(i,o,a),r6(o)||o.isInline()||ex(i,o,a)),n8(o)&&(el+="\n\n",ec+="\n\n")}else{let e=o.getTextContent();if(r8(o)){let e=o.decorate(Z,Y);null!==e&&ek(t,e)}else t4(o)&&!o.isDirectionless()&&(ea+=e);el+=e,ec+=e}if(!ef&&r6(o)&&o.__cachedText!==ec){let e=o.getWritable();e.__cachedText=ec,o=e}return a}("root",null),Z=void 0,X=void 0,ee=void 0,et=void 0,er=void 0,en=void 0,Y=void 0,ei=void 0,eo=void 0,a}(l,r,e,t,i,o)}catch(t){if(t instanceof Error&&e._onError(t),rD)throw t;return nf(e,null,i,r),R(e),e._dirtyType=2,rD=!0,rY(e,l),void(rD=!1)}finally{m.observe(i,rI),e._updating=g,rO=d,rM=f,rj=p}}r._readOnly||(r._readOnly=!0);let b=e._dirtyLeaves,_=e._dirtyElements,w=e._normalizedNodes,x=e._updateTags,S=e._deferred;c&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set),function(e,t){let r,n=e._decorators,i=e._pendingDecorators||n,o=t._nodeMap;for(r in i)o.has(r)||(i===n&&(i=nR(e)),delete i[r])}(e,r);let C=o?null:ip(io(e));if(e._editable&&null!==C&&(c||null===u||u.dirty)&&null!==i&&!x.has("skip-dom-selection")){rj=e,rO=r;try{if(null!==m&&m.disconnect(),c||null===u||u.dirty){let t=e._blockCursorElement;null!==t&&ih(t,e,i),function(e,t,r,n,i,o,l){let a=n.anchorNode,u=n.focusNode,c=n.anchorOffset,d=n.focusOffset,f=document.activeElement;if(i.has("collaboration")&&f!==o||null!==f&&ny(f))return;if(!ri(t))return null!==e&&nv(r,a,u)&&n.removeAllRanges();let p=t.anchor,g=t.focus,m=p.key,y=g.key,v=n9(r,m),b=n9(r,y),_=p.offset,w=g.offset,x=t.format,S=t.style,C=t.isCollapsed(),k=v,T=b,E=!1;if("text"===p.type){k=nC(v);let e=p.getNode();E=e.getFormat()!==x||e.getStyle()!==S}else ri(e)&&"text"===e.anchor.type&&(E=!0);if("text"===g.type&&(T=nC(b)),null!==k&&null!==T&&(C&&(null===e||E||ri(e)&&(e.format!==x||e.style!==S))&&(tC=[x,S,_,m,performance.now()]),c!==_||d!==w||a!==k||u!==T||"Range"===n.type&&C||(null!==f&&o.contains(f)||o.focus({preventScroll:!0}),"element"===p.type))){if(rN(n,k,_,T,w),!i.has("skip-scroll-into-view")&&t.isCollapsed()&&null!==o&&o===document.activeElement){let e=ri(t)&&"element"===t.anchor.type?k.childNodes[_]||null:n.rangeCount>0?n.getRangeAt(0):null;if(null!==e){let t;if(e instanceof Text){let r=document.createRange();r.selectNode(e),t=r.getBoundingClientRect()}else t=e.getBoundingClientRect();!function(e,t,r){let n=ie(r),i=ii(n);if(null===n||null===i)return;let{top:o,bottom:l}=t,a=0,u=0,c=r;for(;null!==c;){let t=c===n.body;if(t)a=0,u=io(e).innerHeight;else{let e=c.getBoundingClientRect();a=e.top,u=e.bottom}let r=0;if(o<a?r=-(a-o):l>u&&(r=l-u),0!==r)if(t)i.scrollBy(0,r);else{let e=c.scrollTop;c.scrollTop+=r;let t=c.scrollTop-e;o-=t,l-=t}if(t)break;c=n6(c)}}(r,t,o)}}ty=!0}}(a,u,e,C,x,i)}!function(e,t,r){let n=e._blockCursorElement;if(ri(r)&&r.isCollapsed()&&"element"===r.anchor.type&&t.contains(document.activeElement)){let i=r.anchor,o=i.getNode(),l=i.offset,a=!1,u=null;if(l===o.getChildrenSize())id(o.getChildAtIndex(l-1))&&(a=!0);else{let t=o.getChildAtIndex(l);if(null!==t&&id(t)){let r=t.getPreviousSibling();(null===r||id(r))&&(a=!0,u=e.getElementByKey(t.__key))}}if(a){let r=e.getElementByKey(o.__key);return null===n&&(e._blockCursorElement=n=function(e){let t=e.theme,r=document.createElement("div");r.contentEditable="false",r.setAttribute("data-lexical-cursor","true");let n=t.blockCursor;return void 0!==n&&("string"==typeof n&&(n=t.blockCursor=y(n)),void 0!==n&&r.classList.add(...n)),r}(e._config)),t.style.caretColor="transparent",null===u?r.appendChild(n):r.insertBefore(n,u)}}null!==n&&ih(n,e,t)}(e,i,u)}finally{null!==m&&m.observe(i,rI),rj=p,rO=d}}null!==v&&function(e,t,r,n,i){let o=Array.from(e._listeners.mutation),l=o.length;for(let e=0;e<l;e++){let[l,a]=o[e],u=t.get(a);void 0!==u&&l(u,{dirtyLeaves:n,prevEditorState:i,updateTags:r})}}(e,v,x,b,l),ri(u)||null===u||null!==a&&a.is(u)||e.dispatchCommand(eP,void 0);let k=e._pendingDecorators;null!==k&&(e._decorators=k,e._pendingDecorators=null,rZ("decorator",e,!0,k
15)),function(e,t,r){let n=nI(t),i=nI(r);n!==i&&rZ("textcontent",e,!0,i)}(e,t||l,r),rZ("update",e,!0,{dirtyElements:_,dirtyLeaves:b,editorState:r,mutatedNodes:v,normalizedNodes:w,prevEditorState:t||l,tags:x}),function(e,t){if(e._deferred=[],0!==t.length){let r=e._updating;e._updating=!0;try{for(let e=0;e<t.length;e++)t[e]()}finally{e._updating=r}}}(e,S),function(e){let t=e._updates;if(0!==t.length){let r=t.shift();if(r){let[t,n]=r;rQ(e,t,n)}}}(e)}function rZ(e,t,r,...n){let i=t._updating;t._updating=r;try{let r=Array.from(t._listeners[e]);for(let e=0;e<r.length;e++)r[e].apply(null,n)}finally{t._updating=i}}function rX(e,t){let r=e._updates,i=t||!1;for(;0!==r.length;){let t=r.shift();if(t){let r,[o,l]=t;if(void 0!==l){if(r=l.onUpdate,l.skipTransforms&&(i=!0),l.discrete){let t=e._pendingEditorState;null===t&&n(191),t._flushSync=!0}r&&e._deferred.push(r),rV(e,l.tag)}o()}}return i}function rQ(e,t,r){let i=e._updateTags,o,l=!1,a=!1;void 0!==r&&(o=r.onUpdate,rV(e,r.tag),l=r.skipTransforms||!1,a=r.discrete||!1),o&&e._deferred.push(o);let u=e._editorState,c=e._pendingEditorState,d=!1;(null===c||c._readOnly)&&(c=e._pendingEditorState=ne(c||u),d=!0),c._flushSync=a;let f=rO,p=rM,g=rj,m=e._updating;rO=c,rM=!1,e._updating=!0,rj=e;let y=e._headless||null===e.getRootElement();try{d&&(y?null!==u._selection&&(c._selection=u._selection.clone()):c._selection=function(e,t){let r=e.getEditorState()._selection,n=ip(io(e));return ri(r)||null==r?rw(r,n,e,t):r.clone()}(e,r&&r.event||null));let i=e._compositionKey;t(),l=rX(e,l),function(e,t){let r=t.getEditorState()._selection,n=e._selection;if(ri(n)){let e,t=n.anchor,i=n.focus;if("text"===t.type&&(e=t.getNode()).selectionTransform(r,n),"text"===i.type){let t=i.getNode();e!==t&&t.selectionTransform(r,n)}}}(c,e),0!==e._dirtyType&&(l?function(e,t){let r=t._dirtyLeaves,n=e._nodeMap;for(let e of r){let t=n.get(e);t4(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&J(t)}}(c,e):function(e,t){let r=t._dirtyLeaves,n=t._dirtyElements,i=e._nodeMap,o=nA(),l=new Map,a=r,u=a.size,c=n,d=c.size;for(;u>0||d>0;){if(u>0){for(let e of(t._dirtyLeaves=new Set,a)){let n=i.get(e);t4(n)&&n.isAttached()&&n.isSimpleText()&&!n.isUnmergeable()&&J(n),void 0!==n&&rq(n,o)&&rW(t,n,l),r.add(e)}if((u=(a=t._dirtyLeaves).size)>0){rR++;continue}}for(let e of(t._dirtyLeaves=new Set,t._dirtyElements=new Map,c.delete("root")&&c.set("root",!0),c)){let r=e[0],a=e[1];if(n.set(r,a),!a)continue;let u=i.get(r);void 0!==u&&rq(u,o)&&rW(t,u,l)}u=(a=t._dirtyLeaves).size,d=(c=t._dirtyElements).size,rR++}t._dirtyLeaves=r,t._dirtyElements=n}(c,e),rX(e),function(e,t,r,n){let i=e._nodeMap,o=t._nodeMap,l=[];for(let[e]of n){let t=o.get(e);void 0!==t&&(t.isAttached()||(r7(t)&&function e(t,r,n,i,o,l){let a=t.getFirstChild();for(;null!==a;){let t=a.__key;a.__parent===r&&(r7(a)&&e(a,t,n,i,o,l),n.has(t)||l.delete(t),o.push(t)),a=a.getNextSibling()}}(t,e,i,o,l,n),i.has(e)||n.delete(e),l.push(e)))}for(let e of l)o.delete(e);for(let e of r){let t=o.get(e);void 0===t||t.isAttached()||(i.has(e)||r.delete(e),o.delete(e))}}(u,c,e._dirtyLeaves,e._dirtyElements)),i!==e._compositionKey&&(c._flushSync=!0);let o=c._selection;if(ri(o)){let e=c._nodeMap,t=o.anchor.key,r=o.focus.key;void 0!==e.get(t)&&void 0!==e.get(r)||n(19)}else rl(o)&&0===o._nodes.size&&(c._selection=null)}catch(t){return t instanceof Error&&e._onError(t),e._pendingEditorState=u,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void rY(e)}finally{rO=f,rM=p,rj=g,e._updating=m,rR=0}0!==e._dirtyType||e._deferred.length>0||function(e,t){let r=t.getEditorState()._selection,n=e._selection;if(null!==n){if(n.dirty||!n.is(r))return!0}else if(null!==r)return!0;return!1}(c,e)?c._flushSync?(c._flushSync=!1,rY(e)):d&&nm(()=>{rY(e)}):(c._flushSync=!1,d&&(i.clear(),e._deferred=[],e._pendingEditorState=null))}function r0(e,t,r){e._updating?rj===e?t():e._updates.push([t,r]):rQ(e,t,r)}class r1{constructor(e,t,r){this.element=e,this.before=t||null,this.after=r||null}withBefore(e){return new r1(this.element,e,this.after)}withAfter(e){return new r1(this.element,this.before,e)}withElement(e){return this.element===e?this:new r1(e,this.before,this.after)}insertChild(e){let t=this.before||this.getManagedLineBreak();return null!==t&&t.parentElement!==this.element&&n(222),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&n(223),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&n(224),this.element.replaceChild(e,t),this}getFirstChild(){let e=this.after?this.after.nextSibling:this.element.firstChild;return e===this.before||e===this.getManagedLineBreak()?null:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){null===e?this.removeManagedLineBreak():this.insertManagedLineBreak("decorator"===e&&(d||c))}removeManagedLineBreak(){let e=this.getManagedLineBreak();if(e){let t=this.element,r="IMG"===e.nodeName?e.nextSibling:null;r&&t.removeChild(r),t.removeChild(e),t.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){let t=this.getManagedLineBreak();if(t){if(e===("IMG"===t.nodeName))return;this.removeManagedLineBreak()}let r=this.element,n=this.before,i=document.createElement("br");if(r.insertBefore(i,n),e){let e=document.createElement("img");e.setAttribute("data-lexical-linebreak","true"),e.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",e.alt="",r.insertBefore(e,i),r.__lexicalLineBreak=e}else r.__lexicalLineBreak=i}getFirstChildOffset(){let e=0;for(let t=this.after;null!==t;t=t.previousSibling)e++;return e}resolveChildIndex(e,t,r,n){if(r===this.element){let t=this.getFirstChildOffset();return[e,Math.min(t+e.getChildrenSize(),Math.max(t,n))]}let i=r2(t,r);i.push(n);let o=r2(t,this.element),l=e.getIndexWithinParent();for(let e=0;e<o.length;e++){let t=i[e],r=o[e];if(void 0===t||t<r)break;
15if(t>r){l+=1;break}}return[e.getParentOrThrow(),l]}}function r2(e,t){let r=[],i=t;for(;i!==e&&null!==i;i=t.parentNode){let e=0;for(let t=i.previousSibling;null!==t;t=t.previousSibling)e++;r.push(e)}return i!==e&&n(225),r.reverse()}class r5 extends tF{constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=""}afterCloneFrom(e){super.afterCloneFrom(e),this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){return E[this.getFormat()]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){let e=[],t=this.getFirstChild();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){let e=[],t=this.getFirstChild();for(;null!==t;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return 0===this.getChildrenSize()}isDirty(){let e=rU()._dirtyElements;return null!==e&&e.has(this.__key)}isLastChild(){let e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return null!==t&&t.is(e)}getAllTextNodes(){let e=[],t=this.getFirstChild();for(;null!==t;){if(t4(t)&&e.push(t),r7(t)){let r=t.getAllTextNodes();e.push(...r)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;r7(e);){let t=e.getFirstChild();if(null===t)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;r7(e);){let t=e.getLastChild();if(null===t)break;e=t}return e}getDescendantByIndex(e){let t=this.getChildren(),r=t.length;if(e>=r){let e=t[r-1];return r7(e)&&e.getLastDescendant()||e||null}let n=t[e];return r7(n)&&n.getFirstDescendant()||n||null}getFirstChild(){let e=this.getLatest().__first;return null===e?null:nO(e)}getFirstChildOrThrow(){let e=this.getFirstChild();return null===e&&n(45,this.__key),e}getLastChild(){let e=this.getLatest().__last;return null===e?null:nO(e)}getLastChildOrThrow(){let e=this.getLastChild();return null===e&&n(96,this.__key),e}getChildAtIndex(e){let t,r,n=this.getChildrenSize();if(e<n/2){for(t=this.getFirstChild(),r=0;null!==t&&r<=e;){if(r===e)return t;t=t.getNextSibling(),r++}return null}for(t=this.getLastChild(),r=n-1;null!==t&&r>=e;){if(r===e)return t;t=t.getPreviousSibling(),r--}return null}getTextContent(){let e="",t=this.getChildren(),r=t.length;for(let n=0;n<r;n++){let i=t[n];e+=i.getTextContent(),r7(i)&&n!==r-1&&!i.isInline()&&(e+="\n\n")}return e}getTextContentSize(){let e=0,t=this.getChildren(),r=t.length;for(let n=0;n<r;n++){let i=t[n];e+=i.getTextContentSize(),r7(i)&&n!==r-1&&!i.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(""!==e){let t=T[e];return!!(this.getFormat()&t)}return!1}hasTextFormat(e){let t=C[e];return!!(this.getTextFormat()&t)}getFormatFlags(e,t){return nk(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){rL();let r=rx(),n=e,i=t,o=this.getChildrenSize();if(!this.canBeEmpty()){if(0===e&&0===t){let e=this.getFirstChild();if(t4(e)||r7(e))return e.select(0,0)}else if((void 0===e||e===o)&&(void 0===t||t===o)){let e=this.getLastChild();if(t4(e)||r7(e))return e.select()}}void 0===n&&(n=o),void 0===i&&(i=o);let l=this.__key;return ri(r)?(r.anchor.set(l,n,"element"),r.focus.set(l,i,"element"),r.dirty=!0,r):ry(l,n,l,i,"element","element")}selectStart(){let e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){let e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){let e=this.getWritable();
15return this.getChildren().forEach(e=>e.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){let t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=""!==e?T[e]:0,this}setStyle(e){return this.getWritable().__style=e||"",this}setTextFormat(e){let t=this.getWritable();return t.__textFormat=e,t}setTextStyle(e){let t=this.getWritable();return t.__textStyle=e,t}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,r){let i=r.length,o=this.getChildrenSize(),l=this.getWritable();e+t<=o||n(226,String(e),String(t),String(o));let a=l.__key,u=[],c=[],d=this.getChildAtIndex(e+t),f=null,p=o-t+i;if(0!==e)if(e===o)f=this.getLastChild();else{let t=this.getChildAtIndex(e);null!==t&&(f=t.getPreviousSibling())}if(t>0){let e=null===f?this.getFirstChild():f.getNextSibling();for(let r=0;r<t;r++){null===e&&n(100);let t=e.getNextSibling(),r=e.__key;nN(e.getWritable()),c.push(r),e=t}}let g=f;for(let e=0;e<i;e++){let t=r[e];null!==g&&t.is(g)&&(f=g=g.getPreviousSibling());let i=t.getWritable();i.__parent===a&&p--,nN(i);let o=t.__key;if(null===g)l.__first=o,i.__prev=null;else{let e=g.getWritable();e.__next=o,i.__prev=e.__key}t.__key===a&&n(76),i.__parent=a,u.push(o),g=t}if(e+t===o)null!==g&&(g.getWritable().__next=null,l.__last=g.__key);else if(null!==d){let e=d.getWritable();if(null!==g){let t=g.getWritable();e.__prev=g.__key,t.__next=d.__key}else e.__prev=null}if(l.__size=p,c.length){let e=rx();if(ri(e)){let t=new Set(c),r=new Set(u),{anchor:n,focus:i}=e;r4(n,t,r)&&rT(n,n.getNode(),this,f,d),r4(i,t,r)&&rT(i,i.getNode(),this,f,d),0!==p||this.canBeEmpty()||ia(this)||this.remove()}}return l}getDOMSlot(e){return new r1(e)}exportDOM(e){let{element:t}=super.exportDOM(e);if(im(t)){let e=this.getIndent();e>0&&(t.style.paddingInlineStart=40*e+"px");let r=this.getDirection();r&&(t.dir=r)}return{element:t}}exportJSON(){let e={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},t=this.getTextFormat(),r=this.getTextStyle();return 0!==t&&(e.textFormat=t),""!==r&&(e.textStyle=r),e}updateFromJSON(e){return super.updateFromJSON(e).setFormat(e.format).setIndent(e.indent).setDirection(e.direction).setTextFormat(e.textFormat||0).setTextStyle(e.textStyle||"")}insertNewAfter(e,t){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,t,r){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,t){let r=this.getDOMSlot(e),n=r.getFirstChild();for(let e=this.getFirstChild();e;e=e.getNextSibling()){let i=t.getElementByKey(e.getKey());null!==i&&(null==n?(r.insertChild(i),n=i):n!==i&&r.replaceChild(i,n),n=n.nextSibling)}}}function r7(e){return e instanceof r5}function r4(e,t,r){let n=e.getNode();for(;n;){let e=n.__key;if(t.has(e)&&!r.has(e))return!0;n=n.getParent()}return!1}class r3 extends tF{decorate(e,t){n(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function r8(e){return e instanceof r3}class r9 extends r5{static getType(){return"root"}static clone(){return new r9}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){n(51)}getTextContent(){let e=this.__cachedText;return(rF()||0===rU()._dirtyType)&&null!==e?e:super.getTextContent()}remove(){n(52)}replace(e){n(53)}insertBefore(e){n(54)}insertAfter(e){n(55)}updateDOM(e,t){return!1}splice(e,t,r){for(let e of r)r7(e)||r8(e)||n(282);return super.splice(e,t,r)}static importJSON(e){return nF().updateFromJSON(e)}collapseAtStart(){return!0}}function r6(e){return e instanceof r9}function ne(e){return new nr(new Map(e._nodeMap))}function nt(){return new nr(new Map([["root",new r9]]))}class nr{constructor(e,t){this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(e,t){return rG(t&&t.editor||null,this,e)}clone(e){let t=new nr(this._nodeMap,void 0===e?this._selection:e);return t._readOnly=!0,t}toJSON(){return rG(null,this,()=>({root:function e(t){let r=t.exportJSON(),i=t.constructor;if(r.type!==i.getType()&&n(130,i.name),r7(t)){let o=r.children;Array.isArray(o)||n(59,i.name);let l=t.getChildren();for(let t=0;t<l.length;t++){let r=e(l[t]);o.push(r)}}return r}(nF())}))}}class nn extends r5{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class ni extends r5{static getType(){return"paragraph"}static clone(e){return new ni(e.__key)}createDOM(e){let t=document.createElement("p"),r=n1(e.theme,"paragraph");return void 0!==r&&t.classList.add(...r),t}updateDOM(e,t,r){return!1}static importDOM(){return{p:e=>({conversion:no,priority:0})}}exportDOM(e){let{element:t}=super.exportDOM(e);if(im(t)){this.isEmpty()&&t.append(document.createElement("br"));let e=this.getFormatType();t.style.textAlign=e}return{element:t}}static importJSON(e){return nl().updateFromJSON(e)}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle()}}insertNewAfter(e,t){let r=nl();r.setTextFormat(e.format),r.setTextStyle(e.style);let n=this.getDirection();return r.setDirection(n),r.setFormat(this.getFormatType()),r.setStyle(this.getStyle()),this.insertAfter(r,t),r}collapseAtStart(){let e=this.getChildren();if(0===e.length||t4(e[0])&&""===e[0].getTextContent().trim()){if(null!==this.getNextSibling())return this.selectNext(),this.remove(),!0;if(null!==this.getPreviousSibling())return this.selectPrevious(),this.remove(),!0}return!1}}function no(e){let t=nl();return e.style&&(t.setFormat(e.style.textAlign),iN(e,t)),{node:t}}function nl(){return iu(new ni)}function na(e){return e instanceof ni}let ns=0,nu=1,nc=3,nd=4;function nf(e,t,r,n){let i=e._keyToDOMMap;i.clear(),e._editorState=nt(),e._pendingEditorState=n,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null;let o=e._observer;null!==o&&(o.disconnect(),e._observer=null),null!==t&&(t.textContent=""),null!==r&&(r.textContent="",i.set("root",r))}function nh(e){let t,r=e||{},n=rj,i=r.theme||{},o=void 0===e?n:r.parentEditor||null,l=r.disableEvents||!1,a=nt(),u=r.namespace||(null!==o?o._config.namespace:nq()),c=r.editorState,d=[r9,tY,tL,t8,ni,nn,...r.nodes||[]],{onError:f,html:p}=r,g=void 0===r.editable||r.editable;if(void 0===e&&null!==n)t=n._nodes;else{t=new Map;for(let e=0;e<d.length;e++){let r=d[e],n=null,i=null;if("function"!=typeof r){let e=r;r=e.replace,n=e.with,i=e.withKlass||null}let o=r.getType(),l=r.transform(),a=new Set;null!==l&&a.add(l),t.set(o,{exportDOM:p&&p.export?p.export.get(r):void 0,klass:r,replace:n,replaceWithKlass:i,transforms:a})}}let m=new np(a,o,t,{disableEvents:l,namespace:u,theme:i},f||console.error,function(e,t){let r=new Map,n=new Set,i=e=>{Object.keys(e).forEach(t=>{let n=r.get(t);void 0===n&&(n=[],r.set(t,n)),n.push(e[t])})};
15return e.forEach(e=>{let t=e.klass.importDOM;if(null==t||n.has(t))return;n.add(t);let r=t.call(e.klass);null!==r&&i(r)}),t&&i(t),r}(t,p?p.import:void 0),g);return void 0!==c&&(m._pendingEditorState=c,m._dirtyType=2),m}class np{constructor(e,t,r,n,i,o,l){this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=n,this._nodes=r,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=nq(),this._onError=i,this._htmlConversions=o,this._editable=l,this._headless=null!==t&&t._headless,this._window=null,this._blockCursorElement=null}isComposing(){return null!=this._compositionKey}registerUpdateListener(e){let t=this._listeners.update;return t.add(e),()=>{t.delete(e)}}registerEditableListener(e){let t=this._listeners.editable;return t.add(e),()=>{t.delete(e)}}registerDecoratorListener(e){let t=this._listeners.decorator;return t.add(e),()=>{t.delete(e)}}registerTextContentListener(e){let t=this._listeners.textcontent;return t.add(e),()=>{t.delete(e)}}registerRootListener(e){let t=this._listeners.root;return e(this._rootElement,null),t.add(e),()=>{e(null,this._rootElement),t.delete(e)}}registerCommand(e,t,r){void 0===r&&n(35);let i=this._commands;i.has(e)||i.set(e,[new Set,new Set,new Set,new Set,new Set]);let o=i.get(e);void 0===o&&n(36,String(e));let l=o[r];return l.add(t),()=>{l.delete(t),o.every(e=>0===e.size)&&i.delete(e)}}registerMutationListener(e,t,r){let n=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,i=this._listeners.mutation;i.set(t,n);let o=r&&r.skipInitialization;return void 0!==o&&o||this.initializeMutationListener(t,n),()=>{i.delete(t)}}getRegisteredNode(e){let t=this._nodes.get(e.getType());return void 0===t&&n(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){let r=this._editorState,n=iT(r).get(t.getType());if(!n)return;let i=new Map;for(let e of n.keys())i.set(e,"created");i.size>0&&e(i,{dirtyLeaves:new Set,prevEditorState:r,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,t){let r=this.getRegisteredNode(e);return r.transforms.add(t),r}registerNodeTransform(e,t){let r=this.registerNodeTransformToKlass(e,t),n=[r],i=r.replaceWithKlass;if(null!=i){let e=this.registerNodeTransformToKlass(i,t);n.push(e)}return function(e,t){let r=iT(e.getEditorState()),n=[];for(let e of t){let t=r.get(e);t&&n.push(t)}0!==n.length&&e.update(()=>{for(let e of n)for(let t of e.keys()){let e=nO(t);e&&e.markDirty()}},null===e._pendingEditorState?{tag:"history-merge"}:void 0)}(this,n.map(e=>e.klass.getType())),()=>{n.forEach(e=>e.transforms.delete(t))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return n3(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){let t=this._rootElement;if(e!==t){let r=n1(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=e,nf(this,t,e,i),null!==t&&(this._config.disableEvents||function(e){let t=e.ownerDocument,r=tm.get(t);void 0===r&&n(162);let i=r-1;i>=0||n(164),tm.set(t,i),0===i&&t.removeEventListener("selectionchange",tM);let o=nw(e);nb(o)?(!function(e){if(null!==e._parentEditor){let t=nW(e),r=t[t.length-1]._key;tj.get(r)===e&&tj.delete(r)}else tj.delete(e._key)}(o),e.__lexicalEditor=null):o&&n(198);let l=tO(e);for(let e=0;e<l.length;e++)l[e]();e.__lexicalEventHandles=[]}(t),null!=r&&t.classList.remove(...r)),null!==e){let t=ii(e),n=e.style;n.userSelect="text",n.whiteSpace="pre-wrap",n.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=t,this._dirtyType=2,R(this),this._updateTags.add("history-merge"),rY(this),this._config.disableEvents||function(e,t){let r=e.ownerDocument,n=tm.get(r);(void 0===n||n<1)&&r.addEventListener("selectionchange",tM),tm.set(r,(n||0)+1),e.__lexicalEditor=t;let i=tO(e);for(let r=0;r<td.length;r++){let[n,o]=td[r],l="function"==typeof o?e=>{tR(e)||(tD(e),(t.isEditable()||"click"===n)&&o(e,t))}:e=>{if(tR(e))return;tD(e);let r=t.isEditable();switch(n){case"cut":return r&&n3(t,tt,e);case"copy":return n3(t,te,e);case"paste":return r&&n3(t,eR,e);case"dragstart":return r&&n3(t,e8,e);case"dragover":return r&&n3(t,e9,e);case"dragend":return r&&n3(t,e6,e);case"focus":return r&&n3(t,ta,e);case"blur":return r&&n3(t,ts,e);case"drop":return r&&n3(t,e4,e)}};e.addEventListener(n,l),i.push(()=>{e.removeEventListener(n,l)})}}(e,this),null!=r&&e.classList.add(...r)}else this._window=null,this._updateTags.add("history-merge"),rY(this);rZ("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&n(38);let r=e;r._readOnly&&((r=ne(e))._selection=e._selection?e._selection.clone():null),D(this);
15let i=this._pendingEditorState,o=this._updateTags,l=void 0!==t?t.tag:null;null===i||i.isEmpty()||(null!=l&&o.add(l),rY(this)),this._pendingEditorState=r,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,null!=l&&o.add(l),this._updating||rY(this)}parseEditorState(e,t){return function(e,t,r){let n=nt(),i=rO,o=rM,l=rj,a=t._dirtyElements,u=t._dirtyLeaves,c=t._cloneNotNeeded,d=t._dirtyType;t._dirtyElements=new Map,t._dirtyLeaves=new Set,t._cloneNotNeeded=new Set,t._dirtyType=0,rO=n,rM=!1,rj=t;try{let i=t._nodes;rH(e.root,i),r&&r(),n._readOnly=!0}catch(e){e instanceof Error&&t._onError(e)}finally{t._dirtyElements=a,t._dirtyLeaves=u,t._cloneNotNeeded=c,t._dirtyType=d,rO=i,rM=o,rj=l}return n}("string"==typeof e?JSON.parse(e):e,this,t)}read(e){return rY(this),this.getEditorState().read(e,{editor:this})}update(e,t){this._updating?this._updates.push([e,t]):rQ(this,e,t)}focus(e,t={}){let r=this._rootElement;null!==r&&(r.setAttribute("autocapitalize","off"),r0(this,()=>{var n;let i=rx(),o=nF();null!==i?i.dirty=!0:0!==o.getChildrenSize()&&("rootStart"===t.defaultSelection?o.selectStart():o.selectEnd()),it("focus"),n=()=>{r.removeAttribute("autocapitalize"),e&&e()},rL(),rU()._deferred.push(n)}),null===this._pendingEditorState&&r.removeAttribute("autocapitalize"))}blur(){let e=this._rootElement;null!==e&&e.blur();let t=ip(this._window);null!==t&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,rZ("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}np.version="0.28.0+prod.esm";let ng=1,nm="function"==typeof queueMicrotask?queueMicrotask:e=>{Promise.resolve().then(e)};function ny(e){let t=document.activeElement;if(!im(t))return!1;let r=t.nodeName;return r8(nD(e))&&("INPUT"===r||"TEXTAREA"===r||"true"===t.contentEditable&&null==nw(t))}function nv(e,t,r){let n=e.getRootElement();try{return null!==n&&n.contains(t)&&n.contains(r)&&null!==t&&!ny(t)&&n_(t)===e}catch(e){return!1}}function nb(e){return e instanceof np}function n_(e){let t=e;for(;null!=t;){let e=nw(t);if(nb(e))return e;t=n6(t)}return null}function nw(e){return e?e.__lexicalEditor:null}function nx(e){return e.isToken()||e.isSegmented()}function nS(e){return iy(e)&&3===e.nodeType}function nC(e){let t=e;for(;null!=t;){if(nS(t))return t;t=t.firstChild}return null}function nk(e,t,r){let n=C[t];if(null!==r&&(e&n)==(r&n))return e;let i=e^n;return"subscript"===t?i&=~C.superscript:"superscript"===t?i&=~C.subscript:"lowercase"===t?(i&=~C.uppercase,i&=~C.capitalize):"uppercase"===t?(i&=~C.lowercase,i&=~C.capitalize):"capitalize"===t&&(i&=~C.lowercase,i&=~C.uppercase),i}function nT(e){return t4(e)||tU(e)||r8(e)}function nE(e,t){if(null!=t)return void(e.__key=t);rL(),rB();let r=rU(),n=rz(),i=""+ng++;n._nodeMap.set(i,e),r7(e)?r._dirtyElements.set(i,!0):r._dirtyLeaves.add(i),r._cloneNotNeeded.add(i),r._dirtyType=1,e.__key=i}function nN(e){let t=e.getParent();if(null!==t){let r=e.getWritable(),n=t.getWritable(),i=e.getPreviousSibling(),o=e.getNextSibling();if(null===i)if(null!==o){let e=o.getWritable();n.__first=o.__key,e.__prev=null}else n.__first=null;else{let e=i.getWritable();if(null!==o){let t=o.getWritable();t.__prev=e.__key,e.__next=t.__key}else e.__next=null;r.__prev=null}if(null===o)if(null!==i){let e=i.getWritable();n.__last=i.__key,e.__next=null}else n.__last=null;else{let e=o.getWritable();if(null!==i){let t=i.getWritable();t.__next=e.__key,e.__prev=t.__key}else e.__prev=null;r.__next=null}n.__size--,r.__parent=null}}function nP(e){rB();let t=e.getLatest(),r=t.__parent,n=rz(),i=rU(),o=n._nodeMap,l=i._dirtyElements;null!==r&&function(e,t,r){let n=e;for(;null!==n;){if(r.has(n))return;let e=t.get(n);if(void 0===e)break;r.set(n,!1),n=e.__parent}}(r,o,l);let a=t.__key;i._dirtyType=1,r7(e)?l.set(a,!0):i._dirtyLeaves.add(a)}function n$(e){rL();let t=rU(),r=t._compositionKey;if(e!==r){if(t._compositionKey=e,null!==r){let e=nO(r);null!==e&&e.getWritable()}if(null!==e){let t=nO(e);null!==t&&t.getWritable()}}}function nA(){return rF()?null:rU()._compositionKey}function nO(e,t){let r=(t||rz())._nodeMap.get(e);return void 0===r?null:r}function nj(e,t){let r=nM(e,rU());return void 0!==r?nO(r,t):null}function nM(e,t){return e[`__lexicalKey_${t._key}`]}function nD(e,t){let r=e;for(;null!=r;){let e=nj(r,t);if(null!==e)return e;r=n6(r)}
15return null}function nR(e){let t=Object.assign({},e._decorators);return e._pendingDecorators=t,t}function nI(e){return e.read(()=>nF().getTextContent())}function nF(){return nL(rz())}function nL(e){return e._nodeMap.get("root")}function nB(e){rL();let t=rz();null!==e&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function nz(e){let t=rU(),r=function(e,t){let r=e;for(;null!=r;){let e=nM(r,t);if(void 0!==e)return e;r=n6(r)}return null}(e,t);return null===r?e===t.getRootElement()?nO("root"):null:nO(r)}function nU(e,t){return t?e.getTextContentSize():0}function nK(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function nW(e){let t=[],r=e;for(;null!==r;)t.push(r),r=r._parentEditor;return t}function nq(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function nV(e){return nS(e)?e.nodeValue:null}function nJ(e,t,r){let n=ip(io(t));if(null===n)return;let i=n.anchorNode,{anchorOffset:o,focusOffset:l}=n;if(null!==i){let t=nV(i),n=nD(i);if(null!==t&&t4(n)){if(t===v&&r){let e=r.length;t=r,o=e,l=e}null!==t&&nH(n,t,o,l,e)}}}function nH(e,t,r,n,i){let o=e;if(o.isAttached()&&(i||!o.isDirty())){let l=o.isComposing(),a=t;(l||i)&&t[t.length-1]===v&&(a=t.slice(0,-1));let u=o.getTextContent();if(i||a!==u){if(""===a){if(n$(null),c||d||m)o.remove();else{let e=rU();setTimeout(()=>{e.update(()=>{o.isAttached()&&o.remove()})},20)}return}let t=o.getParent(),i=rS(),u=o.getTextContentSize(),f=nA(),p=o.getKey();if(o.isToken()||null!==f&&p===f&&!l||ri(i)&&(null!==t&&!t.canInsertTextBefore()&&0===i.anchor.offset||i.anchor.key===e.__key&&0===i.anchor.offset&&!o.canInsertTextBefore()&&!l||i.focus.key===e.__key&&i.focus.offset===u&&!o.canInsertTextAfter()&&!l))return void o.markDirty();let g=rx();if(!ri(g)||null===r||null===n)return void o.setTextContent(a);if(g.setTextNodeRange(o,r,o,n),o.isSegmented()){let e=t7(o.getTextContent());o.replace(e),o=e}o.setTextContent(a)}}}function nG(e){return"ArrowLeft"===e}function nY(e){return"ArrowRight"===e}function nZ(e){return"Backspace"===e}function nX(e){return"Delete"===e}function nQ(e,t,r){return"a"===e.toLowerCase()&&(l?t:r)}function n0(e){let t=nF();if(ri(e)){let t=e.anchor,r=e.focus,n=t.getNode().getTopLevelElementOrThrow().getParentOrThrow();return t.set(n.getKey(),0,"element"),r.set(n.getKey(),n.getChildrenSize(),"element"),H(e),e}{let e=t.select(0,t.getChildrenSize());return nB(H(e)),e}}function n1(e,t){void 0===e.__lexicalClassNameCache&&(e.__lexicalClassNameCache={});let r=e.__lexicalClassNameCache,n=r[t];if(void 0!==n)return n;let i=e[t];if("string"==typeof i){let e=y(i);return r[t]=e,e}return i}function n2(e,t,r,i,o){if(0===r.size)return;let l=i.__type,a=i.__key,u=t.get(l);void 0===u&&n(33,l);let c=u.klass,d=e.get(c);void 0===d&&(d=new Map,e.set(c,d));let f=d.get(a),p="destroyed"===f&&"created"===o;(void 0===f||p)&&d.set(a,p?"updated":o)}function n5(e,t,r){let n=e.getParent(),i=r,o=e;return null!==n&&(t&&0===r?(i=o.getIndexWithinParent(),o=n):t||r!==o.getChildrenSize()||(i=o.getIndexWithinParent()+1,o=n)),o.getChildAtIndex(t?i-1:i)}function n7(e,t){let r=e.offset;if("element"===e.type)return n5(e.getNode(),t,r);{let n=e.getNode();if(t&&0===r||!t&&r===n.getTextContentSize()){let e=t?n.getPreviousSibling():n.getNextSibling();return null===e?n5(n.getParentOrThrow(),t,n.getIndexWithinParent()+ +!t):e}}return null}function n4(e){let t=io(e).event,r=t&&t.inputType;return"insertFromPaste"===r||"insertFromPasteAsQuotation"===r}function n3(e,t,r){return function e(t,r,n){if(!1===t._updating||rj!==t){let i=!1;return t.update(()=>{i=e(t,r,n)}),i}let i=nW(t);for(let e=4;e>=0;e--)for(let o=0;o<i.length;o++){let l=i[o]._commands.get(r);if(void 0!==l){let r=l[e];if(void 0!==r){let e=Array.from(r),i=e.length;for(let r=0;r<i;r++)if(!0===e[r](n,t))return!0}}}return!1}(e,t,r)}function n8(e){return!r6(e)&&!e.isLastChild()&&!e.isInline()}function n9(e,t){let r=e._keyToDOMMap.get(t);return void 0===r&&n(75,t),r}function n6(e){let t=e.assignedSlot||e.parentElement;return iv(t)?t.host:t}function ie(e){return iy(e)&&9===e.nodeType?e:im(e)?e.ownerDocument:null}function it(e){rL(),rU()._updateTags.add(e)}function ir(e,t){let r=e.getParent();for(;null!==r;){if(r.is(t))return!0;r=r.getParent()}return!1}function ii(e){let t=ie(e);return t?t.defaultView:null}function io(e){let t=e._window;return null===t&&n(78),t}function il(e){return r7(e)&&e.isInline()||r8(e)&&e.isInline()}function ia(e){return r6(e)||r7(e)&&e.isShadowRoot()}function is(e){let t=e.constructor.clone(e);return nE(t,null),t}function iu(e){let t=rU(),r=e.constructor.getType(),i=t._nodes.get(r);void 0===i&&n(200,e.constructor.name,r);let{replace:o,replaceWithKlass:l}=i;
15if(null!==o){let t=o(e),i=t.constructor;return null!==l?t instanceof l||n(201,l.name,l.getType(),i.name,i.getType(),e.constructor.name,r):t instanceof e.constructor&&i!==e.constructor||n(202,i.name,i.getType(),e.constructor.name,r),t.__key===e.__key&&n(203,e.constructor.name,r,i.name,i.getType()),t}return e}function ic(e,t){!r6(e.getParent())||r7(t)||r8(t)||n(99)}function id(e){return(r8(e)||r7(e)&&!e.canBeEmpty())&&!e.isInline()}function ih(e,t,r){r.style.removeProperty("caret-color"),t._blockCursorElement=null;let n=e.parentElement;null!==n&&n.removeChild(e)}function ip(e){return i?(e||window).getSelection():null}function ig(e){return im(e)&&"A"===e.tagName}function im(e){return iy(e)&&1===e.nodeType}function iy(e){return"object"==typeof e&&null!==e&&"nodeType"in e&&"number"==typeof e.nodeType}function iv(e){return iy(e)&&11===e.nodeType}function ib(e){let t=RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return null!==e.nodeName.match(t)}function i_(e){let t=RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return null!==e.nodeName.match(t)}function iw(e){if(r8(e)&&!e.isInline())return!0;if(!r7(e)||ia(e))return!1;let t=e.getFirstChild(),r=null===t||tU(t)||t4(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&r}function ix(e,t){let r=e;for(;null!==r&&null!==r.getParent()&&!t(r);)r=r.getParentOrThrow();return t(r)?r:null}function iS(){return rU()}let iC=new WeakMap,ik=new Map;function iT(e){if(!e._readOnly&&e.isEmpty())return ik;e._readOnly||n(192);let t=iC.get(e);return t||(t=function(e){let t=new Map;for(let[r,n]of e._nodeMap){let e=n.__type,i=t.get(e);i||(i=new Map,t.set(e,i)),i.set(r,n)}return t}(e),iC.set(e,t)),t}function iE(e){let t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function iN(e,t){let r=(parseInt(e.style.paddingInlineStart,10)||0)/40;t.setIndent(r)}function iP(e){e.__lexicalUnmanaged=!0}let i$={next:"previous",previous:"next"};class iA{constructor(e){this.origin=e}[Symbol.iterator](){return iQ({hasNext:iF,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return iK(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return iK(this.origin,this.direction)}remove(){let e=this.getNodeAtCaret();return e&&e.remove(),this}replaceOrInsert(e,t){let r=this.getNodeAtCaret();return e.is(this.origin)||e.is(r)||(null===r?this.insert(e):r.replace(e,t)),this}splice(e,t,r="next"){let i=r===this.direction?t:Array.from(t).reverse(),o=this,l=this.getParentAtCaret(),a=new Map;for(let t=o.getAdjacentCaret();null!==t&&a.size<e;t=t.getAdjacentCaret()){let e=t.origin.getWritable();a.set(e.getKey(),e)}for(let e of i){if(a.size>0){let t=o.getNodeAtCaret();if(t)if(a.delete(t.getKey()),a.delete(e.getKey()),t.is(e)||o.origin.is(e));else{let r=e.getParent();r&&r.is(l)&&e.remove(),t.replace(e)}else null===t&&n(263,Array.from(a).join(" "))}else o.insert(e);o=iK(e,this.direction)}for(let e of a.values())e.remove();return this}}class iO extends iA{type="child";getLatest(){let e=this.origin.getLatest();return e===this.origin?this:iV(e,this.direction)}getParentCaret(e="root"){return iK(iM(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=i$[this.direction];return iK(this.getNodeAtCaret(),e)||iV(this.origin,e)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(e){return e instanceof iO&&this.direction===e.direction&&this.origin.is(e.origin)}isSamePointCaret(e){return this.isSameNodeCaret(e)}}let ij={root:r6,shadowRoot:ia};function iM(e,t="root"){return ij[t](e)?null:e}class iD extends iA{type="sibling";getLatest(){let e=this.origin.getLatest();return e===this.origin?this:iK(e,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return r7(this.origin)?iV(this.origin,this.direction):null}getParentCaret(e="root"){return iK(iM(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=i$[this.direction];return iK(this.getNodeAtCaret(),e)||iV(this.origin.getParentOrThrow(),e)}isSamePointCaret(e){return e instanceof iD&&this.direction===e.direction&&this.origin.is(e.origin)}isSameNodeCaret(e){return(e instanceof iD||e instanceof iR)&&this.direction===e.direction&&this.origin.is(e.origin)}}class iR extends iA{type="text";constructor(e,t){super(e),this.offset=t}getLatest(){let e=this.origin.getLatest();return e===this.origin?this:iW(e,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(e="root"){return iK(iM(this.getParentAtCaret(),e),this.direction)}getFlipped(){return iW(this.origin,i$[this.direction],this.offset)}isSamePointCaret(e){return e instanceof iR&&this.direction===e.direction&&this.origin.is(e.origin)&&this.offset===e.offset}isSameNodeCaret(e){return(e instanceof iD||e instanceof iR)&&this.direction===e.direction&&this.origin.is(e.origin)}getSiblingCaret(){return iK(this.origin,this.direction)}}function iI(e){return e instanceof iR}function iF(e){return e instanceof iD}function iL(e){return e instanceof iO}let iB={next:class extends iR{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends iR{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},iz={next:class extends iD{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends iD{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},iU={next:class extends iO{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}},previous:class extends iO{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}}};function iK(e,t){return e?new iz[t](e):null}function iW(e,t,r){return e?new iB[t](e,iq(e,r)):null}function iq(e,t){let r=e.getTextContentSize(),i="next"===t?r:"previous"===t?0:t;return i>
15=0&&i<=r||n(274,String(t),String(r)),i}function iV(e,t){return r7(e)?new iU[t](e):null}function iJ(e){var t;return e&&((t=e.getAdjacentCaret())&&t.getChildCaret()||t)}class iH{type="node-caret-range";constructor(e,t,r){this.anchor=e,this.focus=t,this.direction=r}getLatest(){let e=this.anchor.getLatest(),t=this.focus.getLatest();return e===this.anchor&&t===this.focus?this:new iH(e,t,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){let e=e=>{let t=this[e].getLatest();return iI(t)?function(e,t){let{direction:r,origin:n}=e;return new iG(e,iq(n,"focus"===t?i$[r]:r)-e.offset)}(t,e):null},t=e("anchor"),r=e("focus");if(t&&r){let{caret:e}=t,{caret:n}=r;if(e.isSameNodeCaret(n))return[new iG(e,n.offset-e.offset),null]}return[t,r]}iterNodeCarets(e="root"){let t=iI(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),r=this.focus.getLatest(),n=iI(r),i=t=>t.isSameNodeCaret(r)?null:iJ(t)||t.getParentCaret(e);return iQ({hasNext:e=>null!==e&&!(n&&r.isSameNodeCaret(e)),initial:t.isSameNodeCaret(r)?null:i(t),map:e=>e,step:i})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class iG{type="slice";constructor(e,t){this.caret=e,this.distance=t}getSliceIndices(){let{distance:e,caret:{offset:t}}=this,r=t+e;return r<t?[r,t]:[t,r]}getTextContent(){let[e,t]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(e,t)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){let{caret:{origin:e,direction:t}}=this,[r,n]=this.getSliceIndices(),i=e.getTextContent();return iW(e.setTextContent(i.slice(0,r)+i.slice(n)),t,r)}}function iY(e){return iX(e,iK(nF(),e.direction))}function iZ(e){return iX(e,e)}function iX(e,t){return e.direction!==t.direction&&n(265),new iH(e,t,e.direction)}function iQ(e){let{initial:t,hasNext:r,step:n,map:i}=e,o=t;return{[Symbol.iterator](){return this},next(){if(!r(o))return{done:!0,value:void 0};let e={done:!1,value:i(o)};return o=n(o),e}}}function i0(e,t){let r=i5(e.origin,t.origin);switch(null===r&&n(275,e.origin.getKey(),t.origin.getKey()),r.type){case"same":{let r="text"===e.type,n="text"===t.type;return r&&n?Math.sign(e.offset-t.offset):e.type===t.type?0:r?-1:n?1:"child"===e.type?-1:1}case"ancestor":return"child"===e.type?-1:1;case"descendant":return"child"===t.type?1:-1;case"branch":return i1(r)}}function i1(e){let{a:t,b:r}=e,n=t.__key,i=r.__key,o=t,l=r;for(;o&&l;o=o.getNextSibling(),l=l.getNextSibling()){if(o.__key===i)return -1;if(l.__key===n)return 1}return null===o?1:-1}function i2(e){return r7(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function i5(e,t){if(e.is(t))return{commonAncestor:e,type:"same"};let r=new Map;for(let[t,n]=i2(e);t;n=t,t=t.getParent())r.set(t,n);for(let[i,o]=i2(t);i;o=i,i=i.getParent()){let l=r.get(i);if(void 0!==l)return null===l?(i.is(e)||n(276),{commonAncestor:i,type:"ancestor"}):null===o?(i.is(t)||n(277),{commonAncestor:i,type:"descendant"}):((r7(l)||l.is(e))&&(r7(o)||o.is(t))&&i.is(l.getParent())&&i.is(o.getParent())||n(278),{a:l,b:o,commonAncestor:i,type:"branch"})}return null}function i7(e,t){let{type:r,key:i,offset:o}=e,l=function(e){let t=nO(e);return null===t&&n(63,e),t}(e.key);return"text"===r?(t4(l)||n(266,l.getType(),i),iW(l,t,o)):(r7(l)||n(267,l.getType(),i),function(e,t,r){let n=iV(e,"next");for(let e=0;e<t;e++){let e=n.getAdjacentCaret();if(null===e)break;n=e}return oi(n,r)}(l,e.offset,t))}function i4(e,t){let{origin:r,direction:i}=t,o="next"===i;iI(t)?e.set(r.getKey(),t.offset,"text"):iF(t)?t4(r)?e.set(r.getKey(),iq(r,i),"text"):e.set(r.getParentOrThrow().getKey(),r.getIndexWithinParent()+ +!!o,"element"):(iL(t)&&r7(r)||n(268),e.set(r.getKey(),o?0:r.getChildrenSize(),"element"))}function i3(e){let t=rx(),r=ri(t)?t:rv();return i8(r,e),nB(r),r}function i8(e,t){i4(e.anchor,t.anchor),i4(e.focus,t.focus)}function i9(e){let{anchor:t,focus:r}=e,n=i7(t,"next"),i=i7(r,"next"),o=0>=i0(n,i)?"next":"previous";return iX(oi(n,o),oi(i,o))}function i6(e){let{direction:t,origin:r}=e,n=iK(r,i$[t]).getNodeAtCaret();return n?iK(n,t):iV(r.getParentOrThrow(),t)}function oe(e,t="root"){let r=[e];for(let n=iL(e)?e.getParentCaret(t):e.getSiblingCaret();null!==n;n=n.getParentCaret(t))r.push(i6(n));return r}function ot(e){return!!e&&e.origin.isAttached()}function or(e){let t=function(e){let t=e;for(;iL(t);){let e=iJ(t);if(!iL(e))break;t=e}return t}(e.getLatest()),{direction:r}=t;if(t4(t.origin))return iI(t)?t:iW(t.origin,r,r);let n=t.getAdjacentCaret();return iF(n)&&t4(n.origin)?iW(n.origin,r,i$[r]):t}function on(e){return iI(e)&&e.offset!==iq(e.origin,e.direction)}function oi(e,t){return e.direction===t?e:e.getFlipped()}function oo(e,t){return e.direction===t?e:iX(oi(e.focus,t),oi(e.anchor,t))}function ol(e){let{origin:t,offset:r,direction:i}=e;if(r===iq(t,i))return e.getSiblingCaret();if(r===iq(t,i$[i]))return i6(e.getSiblingCaret());let[o]=t.splitText(r);return t4(o)||n(281),oi(iK(o,"next"),i)}function oa(e,t){return!0}function os(e,{$copyElementNode:t=is,$splitTextPointCaretNext:r=ol,rootMode:n="shadowRoot",$shouldSplit:i=oa}={}){if(iI(e))return r(e);let o=e.getParentCaret(n);if(o){let{origin:r}=o;if(iL(e)&&(!r.canBeEmpty()||!i(r,"first")))return i6(o);let n=function(e){let t=[];for(let r=e.getAdjacentCaret();r;r=r.getAdjacentCaret())t.push(r.origin);return t}(e);(n.length>0||r.canBeEmpty()&&i(r,"last"))&&o.insert(t(r).splice(0,0,n))}return o}},33081:e=>{"use strict";var t=function(e){var t,n,i;return!!(t=e)&&"object"==typeof t&&(n=e,"[object RegExp]"!==(i=Object.prototype.toString.call(n))&&"[object Date]"!==i&&n.$$typeof!==r)},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?a(Array.isArray(e)?[]:{},e,t):e}function i(e,t,r){return e.concat(t).map(function(e){return n(e,r)})}function o(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function l(e,t){try{return t in e}catch(e){return!1}}function a(e,r,u){(u=u||{}).arrayMerge=u.arrayMerge||i,u.isMergeableObject=u.isMergeableObject||t,u.cloneUnlessOtherwiseSpecified=n;var c,d,f=Array.isArray(r);return f!==Array.isArray(e)?n(r,u):f?u.arrayMerge(e,r,u):(d={},(c=u).isMergeableObject(e)&&o(e).forEach(function(t){d[t]=n(e[t],c)}),o(r).forEach(function(t){l(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))||(l(e,t)&&c.isMergeableObject(r[t])?d[t]=(function(e,t){if(!t.customMerge)return a;var r=t.customMerge(e);return"function"==typeof r?r:a})(t,c)(e[t],r[t],c):d[t]=n(r[t],c))}),d)}a.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,r){return a(e,r,t)},{})},e.exports=a},33811:(e,t,r)=>{"use strict";r.d(t,{m:()=>a});var n=r(94271),i=r(92749),o=r(32532),l=r(12115);function a({maxIndent:e}){let[t]=(0,n.DF)();return(0,l.useEffect)(()=>(0,i.Sd)(t.registerCommand(o.OXk,e=>{let r=(0,o.vJq)();if(!(0,o.I2P)(r))return!1;e.preventDefault();let n=!function(e){let t=e.getNodes();if((0,i.zD)(t,e=>(0,o.y68)(e)&&e.canIndent()?e:null).length>0)return!0;let r=e.anchor,n=e.focus,l=n.isBefore(r)?n:r,a=l.getNode(),u=(0,i.mB)(a);if(u.canIndent()){let e=u.getKey(),t=(0,o.uTE)();
15if(t.anchor.set(e,0,"element"),t.focus.set(e,0,"element"),(t=(0,o.CaD)(t)).anchor.is(l))return!0}return!1}(r)?o.YW5:e.shiftKey?o.sik:o.PiT;return t.dispatchCommand(n,void 0)},o.jZM),t.registerCommand(o.PiT,()=>{if(null==e)return!1;let t=(0,o.vJq)();return!!(0,o.I2P)(t)&&Math.max(...t.getNodes().map(e=>(0,i.mB)(e).getIndent()))+1>=e},o.da8)),[t,e]),null}},34564:(e,t,r)=>{"use strict";r.d(t,{y:()=>a});var n=r(95155),i=r(87677),o=r(12115),l=r(45280);let a=e=>{let{maxLength:t=0,minLength:r=0,text:a}=e,[u,c]=(0,o.useState)({backgroundColor:"",color:""}),[d,f]=(0,o.useState)(""),[p,g]=(0,o.useState)(0),{t:m}=(0,i.d)();(0,o.useEffect)(()=>{let e=(null==a?void 0:a.length)||0;if(0===e)f(m("plugin-seo:missing")),c({backgroundColor:"red",color:"white"}),g(0);else{let n=(e-r)/(t-r);if(n<0){let t=e/r;t>.9?(f(m("plugin-seo:almostThere")),c({backgroundColor:"orange",color:"white"})):(f(m("plugin-seo:tooShort")),c({backgroundColor:"orangered",color:"white"})),g(t)}n>=0&&n<=1&&(f(m("plugin-seo:good")),c({backgroundColor:"green",color:"white"}),g(n)),n>1&&(f(m("plugin-seo:tooLong")),c({backgroundColor:"red",color:"white"}),g(1))}},[r,t,a,m]);let y=(null==a?void 0:a.length)||0,v=t-y,b=r-y;return(0,n.jsxs)("div",{style:{alignItems:"center",display:"flex",width:"100%"},children:[(0,n.jsx)(l.a,{backgroundColor:u.backgroundColor,color:u.color,label:d}),(0,n.jsx)("div",{style:{flexShrink:0,lineHeight:1,marginRight:"10px",whiteSpace:"nowrap"},children:(0,n.jsxs)("small",{children:[m("plugin-seo:characterCount",{current:(null==a?void 0:a.length)||0,maxLength:t,minLength:r}),(0===y||b>0)&&(0,n.jsx)(o.Fragment,{children:m("plugin-seo:charactersToGo",{characters:b})}),b<=0&&v>=0&&(0,n.jsx)(o.Fragment,{children:m("plugin-seo:charactersLeftOver",{characters:v})}),v<0&&(0,n.jsx)(o.Fragment,{children:m("plugin-seo:charactersTooMany",{characters:-1*v})})]})}),(0,n.jsx)("div",{style:{backgroundColor:"#F3F3F3",height:"2px",position:"relative",width:"100%"},children:(0,n.jsx)("div",{style:{backgroundColor:u.backgroundColor,height:"100%",left:0,position:"absolute",top:0,width:"".concat(100*p,"%")}})})]})}},35695:(e,t,r)=>{"use strict";var n=r(18999);r.o(n,"useParams")&&r.d(t,{useParams:function(){return n.useParams}}),r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}}),r.o(n,"useSelectedLayoutSegments")&&r.d(t,{useSelectedLayoutSegments:function(){return n.useSelectedLayoutSegments}})},36148:(e,t)=>
15{"use strict";function r(e){let t,r=e.length,n=0,i=0;for(;i<r;)n++,(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<r&&(64512&(t=e.charCodeAt(i)))==56320&&i++;return n}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,r.code='require("ajv/dist/runtime/ucs2length").default'},36277:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r(70893),i=r(94271),o=r(92749),l=r(32532),a=r(12115);function u(){let[e]=(0,i.DF)();return(0,a.useEffect)(()=>(0,o.Sd)(e.registerCommand(n.mJ,()=>((0,n.us)(e,"check"),!0),l.AcJ),e.registerCommand(l.bbF,t=>g(t,e,!1),l.AcJ),e.registerCommand(l.UDz,t=>g(t,e,!0),l.AcJ),e.registerCommand(l.Q$N,t=>{if(null!=p()){let t=e.getRootElement();return null!=t&&t.focus(),!0}return!1},l.AcJ),e.registerCommand(l.Huu,t=>{let r=p();return!(null==r||!e.isEditable())&&(e.update(()=>{let e=(0,l.xL4)(r);(0,n.Mz)(e)&&(t.preventDefault(),e.toggleChecked())}),!0)},l.AcJ),e.registerCommand(l.AX0,t=>e.getEditorState().read(()=>{let r=(0,l.vJq)();if((0,l.I2P)(r)&&r.isCollapsed()){let{anchor:i}=r,a="element"===i.type;if(a||0===i.offset){let r=i.getNode(),u=(0,o.Bt)(r,e=>(0,l.ff4)(e)&&!e.isInline());if((0,n.Mz)(u)){let i=u.getParent();if((0,n.HY)(i)&&"check"===i.getListType()&&(a||u.getFirstDescendant()===r)){let r=e.getElementByKey(u.__key);if(null!=r&&document.activeElement!==r)return r.focus(),t.preventDefault(),!0}}}}return!1}),l.AcJ),e.registerRootListener((e,t)=>{null!==e&&(e.addEventListener("click",d),e.addEventListener("pointerdown",f)),null!==t&&(t.removeEventListener("click",d),t.removeEventListener("pointerdown",f))}))),null}function c(e,t){let r=e.target;if(!(0,l.sby)(r))return;let n=r.firstChild;if((0,l.sby)(n)&&("UL"===n.tagName||"OL"===n.tagName))return;let i=r.parentNode;if(!i||"check"!==i.__lexicalListType)return;let a=r.getBoundingClientRect(),u=e.pageX/(0,o.OV)(r);("rtl"===r.dir?u<a.right&&u>a.right-20:u>a.left&&u<a.left+20)&&t()}function d(e){c(e,()=>{if((0,l.sby)(e.target)){let t=e.target,r=(0,l.scG)(t);null!=r&&r.isEditable()&&r.update(()=>{let e=(0,l.xL4)(t);(0,n.Mz)(e)&&(t.focus(),e.toggleChecked())})}})}function f(e){c(e,()=>{e.preventDefault()})}function p(){let e=document.activeElement;return(0,l.sby)(e)&&"LI"===e.tagName&&null!=e.parentNode&&"check"===e.parentNode.__lexicalListType?e:null}function g(e,t,r){let i=p();return null!=i&&t.update(()=>{let o=(0,l.xL4)(i);if(!(0,n.Mz)(o))return;let a=function(e,t){let r=t?e.getPreviousSibling():e.getNextSibling(),i=e;for(;null==r&&(0,n.Mz)(i);)null!=(i=i.getParentOrThrow().getParent())&&(r=t?i.getPreviousSibling():i.getNextSibling());for(;(0,n.Mz)(r);){let e=t?r.getLastChild():r.getFirstChild();if(!(0,n.HY)(e))return r;r=t?e.getLastChild():e.getFirstChild()}return null}(o,r);if(null!=a){a.selectStart();let r=t.getElementByKey(a.__key);null!=r&&(e.preventDefault(),setTimeout(()=>{r.focus()},0))}}),!1}},36702:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(79772);t.default={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>(0,n.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,n._)`{multipleOf: ${e}}`},code(e){let{gen:t,data:r,schemaCode:i,it:o}=e,l=o.opts.multipleOfPrecision,a=t.let("res"),u=l?(0,n._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${l}`:(0,n._)`${a} !== parseInt(${a})`;e.fail$data((0,n._)`(${i} === 0 || (${a} = ${r}/${i}, ${u}))`)}}},36793:(e,t,r)=>{"use strict";let{normalizeIPv6:n,normalizeIPv4:i,removeDotSegments:o,recomposeAuthority:l,normalizeComponentEncoding:a}=r(40652),u=r(96189);function c(e,t,r,n){let i={};return n||(e=g(d(e,r),r),t=g(d(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(i.scheme=t.scheme,i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=o(t.path||""),i.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=o(t.path||""),i.query=t.query):(t.path?("/"===t.path.charAt(0)?i.path=o(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?i.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:i.path=t.path:i.path="/"+t.path,i.path=o(i.path)),i.query=t.query):(i.path=e.path,void 0!==t.query?i.query=t.query:i.query=e.query),i.userinfo=e.userinfo,i.host=e.host,i.port=e.port),i.scheme=e.scheme),i.fragment=t.fragment,i}function d(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),i=[],a=u[(n.scheme||r.scheme||"").toLowerCase()];
15a&&a.serialize&&a.serialize(r,n),void 0!==r.path&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),void 0!==r.scheme&&(r.path=r.path.split("%3A").join(":")))),"suffix"!==n.reference&&r.scheme&&i.push(r.scheme,":");let c=l(r);if(void 0!==c&&("suffix"!==n.reference&&i.push("//"),i.push(c),r.path&&"/"!==r.path.charAt(0)&&i.push("/")),void 0!==r.path){let e=r.path;n.absolutePath||a&&a.absolutePath||(e=o(e)),void 0===c&&(e=e.replace(/^\/\//u,"/%2F")),i.push(e)}return void 0!==r.query&&i.push("?",r.query),void 0!==r.fragment&&i.push("#",r.fragment),i.join("")}let f=Array.from({length:127},(e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t))),p=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function g(e,t){let r=Object.assign({},t),o={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},l=-1!==e.indexOf("%"),a=!1;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);let c=e.match(p);if(c){if(o.scheme=c[1],o.userinfo=c[3],o.host=c[4],o.port=parseInt(c[5],10),o.path=c[6]||"",o.query=c[7],o.fragment=c[8],isNaN(o.port)&&(o.port=c[5]),o.host){let e=i(o.host);if(!1===e.isIPV4){let t=n(e.host);o.host=t.host.toLowerCase(),a=t.isIPV6}else o.host=e.host,a=!0}void 0!==o.scheme||void 0!==o.userinfo||void 0!==o.host||void 0!==o.port||void 0!==o.query||o.path?void 0===o.scheme?o.reference="relative":void 0===o.fragment?o.reference="absolute":o.reference="uri":o.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==o.reference&&(o.error=o.error||"URI is not a "+r.reference+" reference.");let e=u[(r.scheme||o.scheme||"").toLowerCase()];if(!r.unicodeSupport&&(!e||!e.unicodeSupport)&&o.host&&(r.domainHost||e&&e.domainHost)&&!1===a&&function(e){let t=0;for(let r=0,n=e.length;r<n;++r)if((t=e.charCodeAt(r))>126||f[t])return!0;return!1}(o.host))try{o.host=URL.domainToASCII(o.host.toLowerCase())}catch(e){o.error=o.error||"Host's domain name can not be converted to ASCII: "+e}(!e||e&&!e.skipNormalize)&&(l&&void 0!==o.scheme&&(o.scheme=unescape(o.scheme)),l&&void 0!==o.host&&(o.host=unescape(o.host)),o.path&&(o.path=escape(unescape(o.path))),o.fragment&&(o.fragment=encodeURI(decodeURIComponent(o.fragment)))),e&&e.parse&&e.parse(o,r)}else o.error=o.error||"URI can not be parsed.";return o}let m={SCHEMES:u,normalize:function(e,t){return"string"==typeof e?e=d(g(e,t),t):"object"==typeof e&&(e=g(d(e,t),t)),e},resolve:function(e,t,r){let n=Object.assign({scheme:"null"},r);return d(c(g(e,n),g(t,n),n,!0),{...n,skipEscape:!0})},resolveComponents:c,equal:function(e,t,r){return"string"==typeof e?e=d(a(g(e=unescape(e),r),!0),{...r,skipEscape:!0}):"object"==typeof e&&(e=d(a(e,!0),{...r,skipEscape:!0})),"string"==typeof t?t=d(a(g(t=unescape(t),r),!0),{...r,skipEscape:!0}):"object"==typeof t&&(t=d(a(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()},serialize:d,parse:g};e.exports=m,e.exports.default=m,e.exports.fastUri=m},37305:(e,t,r)=>{"use strict";r.d(t,{Banner:()=>m});var n=r(95155),i=r(12115);r(5718);var o=r(6874),l=r(35695);r(19749);let a=i.createContext({isTransitioning:!1,startRouteTransition:()=>void 0,transitionProgress:0}),u=()=>i.use(a),c=/https?|ftp|gopher|file/;function d(e){return"string"!=typeof e&&("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}let f=o.default||o,p=e=>{let{children:t,href:r,onClick:i,preventDefault:o=!0,ref:a,replace:p,scroll:g,...m}=e,y=(0,l.useRouter)(),{startRouteTransition:v}=u();return(0,n.jsx)(f,{href:r,onClick:e=>{!function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)&&(i&&i(e),o&&e.preventDefault(),v(()=>{let e="string"==typeof r?r:function(e){let{auth:t}=e,{hostname:r}=e,n=e.protocol||"",i=e.pathname||"",o=e.hash||"",l=e.query||"",a=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?a=t+e.host:r&&(a=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(a+=":"+e.port)),l&&"object"==typeof l&&(l=String(function(e){let t=new URLSearchParams;return Object.entries(e).forEach(([e,r])=>{Array.isArray(r)?r.forEach(r=>t.append(e,d(r))):t.set(e,d(r))}),t}(l)));let u=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||c.test(n))&&!1!==a?(a="//"+(a||""),i&&"/"!==i[0]&&(i="/"+i)):a||(a=""),o&&"#"!==o[0]&&(o="#"+o),u&&"?"!==u[0]&&(u="?"+u),i=i.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${n}${a}${i}${u}${o}`}(r);p?y.replace(e,{scroll:g}):y.push(e,{scroll:g})}))},ref:a,...m,children:t})},g="banner",m=e=>{let{type:t="default",alignIcon:r="right",children:o,className:l,icon:a,onClick:u,to:c}=e,d=[g,"".concat(g,"--type-").concat(t),l&&l,c&&"".concat(g,"--has-link"),(c||u)&&"".concat(g,"--has-action"),a&&"".concat(g,"--has-icon"),a&&"".concat(g,"--align-icon-").concat(r)].filter(
15Boolean).join(" "),f="div";return u&&!c&&(f="button"),c&&(f=p),(0,n.jsxs)(f,{className:d,href:c||null,onClick:u,children:[a&&"left"===r&&(0,n.jsx)(i.Fragment,{children:a}),(0,n.jsx)("span",{className:"".concat(g,"__content"),children:o}),a&&"right"===r&&(0,n.jsx)(i.Fragment,{children:a})]})}},38265:(e,t,r)=>{"use strict";function n(e){return(t,r)=>{let n;if("formatting"===((null==r?void 0:r.context)?String(r.context):"standalone")&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,i=(null==r?void 0:r.width)?String(r.width):t;n=e.formattingValues[i]||e.formattingValues[t]}else{let t=e.defaultWidth,i=(null==r?void 0:r.width)?String(r.width):e.defaultWidth;n=e.values[i]||e.values[t]}return n[e.argumentCallback?e.argumentCallback(t):t]}}r.d(t,{o:()=>n})},39997:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;let r=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&r.has(e)},t.getRules=function(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},40402:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});let n={src:"/_next/static/media/payload-favicon-dark.c322d81c.png",height:32,width:32,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAJ1BMVEVMaXEyMjIzMzM1NTU2NjYzMzMzMzMzMzMyMjIzMzM1NTUyMjIzMzMrTeFiAAAADXRSTlMAg8EpEmvzdo/kIEOg8UAOkgAAAAlwSFlzAAAuIwAALiMBeKU/dgAAADZJREFUeJw1y7kBwDAIBME9PglQ//U68uQDuJkDESvVDbIOTB9k1ssTemRyxekB3yFuSZXw9w8kbAD/5SnsMwAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8}},40652:(e,t,r)=>{"use strict";let{HEX:n}=r(18744),i=/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;function o(e){if(3>u(e,"."))return{host:e,isIPV4:!1};let[t]=e.match(i)||[];return t?{host:function(e,t){let r="",n=!0,i=e.length;for(let o=0;o<i;o++){let l=e[o];"0"===l&&n?(o+1<=i&&"."===e[o+1]||o+1===i)&&(r+=l,n=!1):(n=l===t,r+=l)}return r}(t,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function l(e,t=!1){let r="",i=!0;for(let t of e){if(void 0===n[t])return;"0"!==t&&!0===i&&(i=!1),i||(r+=t)}return t&&0===r.length&&(r="0"),r}function a(e){if(2>u(e,":"))return{host:e,isIPV6:!1};let t=function(e){let t=0,r={error:!1,address:"",zone:""},n=[],i=[],o=!1,a=!1,u=!1;function c(){if(i.length){if(!1===o){let e=l(i);if(void 0===e)return r.error=!0,!1;n.push(e)}i.length=0}return!0}for(let l=0;l<e.length;l++){let d=e[l];if("["!==d&&"]"!==d)if(":"===d){if(!0===a&&(u=!0),!c())break;if(t++,n.push(":"),t>7){r.error=!0;break}l-1>=0&&":"===e[l-1]&&(a=!0);continue}else if("%"===d){if(!c())break;o=!0}else{i.push(d);continue}}return i.length&&(o?r.zone=i.join(""):u?n.push(i.join("")):n.push(l(i))),r.address=n.join(""),r}(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,r=t.address;return t.zone&&(e+="%"+t.zone,r+="%25"+t.zone),{host:e,escapedHost:r,isIPV6:!0}}}function u(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}let c=/^\.\.?\//u,d=/^\/\.(?:\/|$)/u,f=/^\/\.\.(?:\/|$)/u,p=/^\/?(?:.|\n)*?(?=\/|$)/u;e.exports={recomposeAuthority:function(e){let t=[];if(void 0!==e.userinfo&&(t.push(e.userinfo),t.push("@")),void 0!==e.host){let r=unescape(e.host),n=o(r);if(n.isIPV4)r=n.host;else{let t=a(n.host);r=!0===t.isIPV6?`[${t.escapedHost}]`:e.host}t.push(r)}return("number"==typeof e.port||"string"==typeof e.port)&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0},normalizeComponentEncoding:function(e,t){let r=!0!==t?escape:unescape;return void 0!==e.scheme&&(e.scheme=r(e.scheme)),void 0!==e.userinfo&&(e.userinfo=r(e.userinfo)),void 0!==e.host&&(e.host=r(e.host)),void 0!==e.path&&(e.path=r(e.path)),void 0!==e.query&&(e.query=r(e.query)),void 0!==e.fragment&&(e.fragment=r(e.fragment)),e},removeDotSegments:function(e){let t=[];for(;e.length;)if(e.match(c))e=e.replace(c,"");else if(e.match(d))e=e.replace(d,"/");else if(e.match(f))e=e.replace(f,"/"),t.pop();else if("."===e||".."===e)e="";else{let r=e.match(p);if(r){let n=r[0];e=e.slice(n.length),t.push(n)}else throw Error("Unexpected dot segment condition")}return t.join("")}
15,normalizeIPv4:o,normalizeIPv6:a,stringArrayToHexStripped:l}},40811:(e,t,r)=>{"use strict";r.d(t,{p:()=>o});var n=r(89349),i=r(67491);function o({folderFieldName:e,isUpload:t,relationTo:r,useAsTitle:o,value:l}){let a={id:l?.id,_folderOrDocumentTitle:String(o&&l?.[o]||l.id),createdAt:l?.createdAt,folderID:l?.[e],updatedAt:l?.updatedAt};return t&&(a.filename=l.filename,a.mimeType=l.mimeType,a.url=(0,n.w)(l.mimeType)?(0,i.k)({sizes:l.sizes,targetSizeMax:520,targetSizeMin:300,url:l.url,width:l.width}):void 0),{itemKey:`${r}-${l.id}`,relationTo:r,value:a}}},40983:(e,t,r)=>{"use strict";r.d(t,{Bi:()=>u,lW:()=>f,xg:()=>m});var n=r(69717),i=r(61731),o=r(92749),l=r(32532);function a(e,...t){let r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;for(let r of(n.append("code",e),t))n.append("v",r);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function u(e,t,r){let o=e.getData("application/x-lexical-editor");if(o)try{let e=JSON.parse(o);if(e.namespace===r._config.namespace&&Array.isArray(e.nodes))return c(r,function(e){let t=[];for(let r=0;r<e.length;r++){let n=e[r],o=(0,l.GMe)(n);(0,l.kFe)(o)&&(0,i.Xg)(o),t.push(o)}return t}(e.nodes),t)}catch(e){}let a=e.getData("text/html"),u=e.getData("text/plain");if(a&&u!==a)try{let e=(new DOMParser).parseFromString(window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:e=>e}).createHTML(a):a,"text/html");return c(r,(0,n.d)(r,e),t)}catch(e){}let d=u||e.getData("text/uri-list");if(null!=d)if((0,l.I2P)(t)){let e=d.split(/(\r?\n|\t)/);""===e[e.length-1]&&e.pop();for(let t=0;t<e.length;t++){let r=(0,l.vJq)();if((0,l.I2P)(r)){let n=e[t];"\n"===n||"\r\n"===n?r.insertParagraph():" "===n?r.insertNodes([(0,l.ev7)()]):r.insertText(n)}}}else t.insertRawText(d)}function c(e,t,r){e.dispatchCommand(l.oqR,{nodes:t,selection:r})||r.insertNodes(t)}let d=null;async function f(e,t,r){if(null!==d)return!1;if(null!==t)return new Promise((n,i)=>{e.update(()=>{n(p(e,t,r))})});let n=e.getRootElement(),i=e._window||window,a=window.document,u=(0,l.peL)(i);if(null===n||null===u)return!1;let c=a.createElement("span");c.style.cssText="position: fixed; top: -1000px;",c.append(a.createTextNode("#")),n.append(c);let f=new Range;return f.setStart(c,0),f.setEnd(c,1),u.removeAllRanges(),u.addRange(f),new Promise((t,n)=>{let i=e.registerCommand(l.u5G,n=>((0,o.xj)(n,ClipboardEvent)&&(i(),null!==d&&(window.clearTimeout(d),d=null),t(p(e,n,r))),!0),l.da8);d=window.setTimeout(()=>{i(),d=null,t(!1)},50),a.execCommand("copy"),c.remove()})}function p(e,t,r){if(void 0===r){let t=(0,l.peL)(e._window);if(!t)return!1;let n=t.anchorNode,i=t.focusNode;if(null!==n&&null!==i&&!(0,l.LYZ)(e,n,i))return!1;let o=(0,l.vJq)();if(null===o)return!1;r=m(o)}t.preventDefault();let n=t.clipboardData;return null!==n&&(function(e,t){for(let r in t){let n=t[r];void 0!==n&&e.setData(r,n)}}(n,r),!0)}let g=[["text/html",function(e,t=(0,l.vJq)()){return null==t&&a(166),(0,l.I2P)(t)&&t.isCollapsed()||0===t.getNodes().length?"":(0,n.g)(e,t)}],["application/x-lexical-editor",function(e,t=(0,l.vJq)()){return null==t&&a(166),(0,l.I2P)(t)&&t.isCollapsed()||0===t.getNodes().length?null:JSON.stringify(function(e,t){let r=[],n=(0,l.NiT)().getChildren();for(let o=0;o<n.length;o++)!function e(t,r,n,o=[]){let u=null===r||n.isSelected(r),c=(0,l.ff4)(n)&&n.excludeFromCopy("html"),d=n;if(null!==r){let e=(0,l.BEs)(n);d=e=(0,l.kFe)(e)&&null!==r?(0,i.SD)(r,e):e}let f=(0,l.ff4)(d)?d.getChildren():[],p=function(e){let t=e.exportJSON(),r=e.constructor;return t.type!==r.getType()&&a(58,r.name),(0,l.ff4)(e)&&(Array.isArray(t.children)||a(59,r.name)),t}(d);if((0,l.kFe)(d)){let e=d.__text;e.length>0?p.text=e:u=!1}for(let i=0;i<f.length;i++){let o=f[i],a=e(t,r,o,p.children);!u&&(0,l.ff4)(n)&&a&&n.extractWithChild(o,r,"clone")&&(u=!0)}if(u&&!c)o.push(p);else if(Array.isArray(p.children))for(let e=0;e<p.children.length;e++){let t=p.children[e];o.push(t)}return u}(e,t,n[o],r);return{namespace:e._config.namespace,nodes:r}}(e,t))}]];function m(e=(0,l.vJq)()){let t={"text/plain":e?e.getTextContent():""};if(e){let r=(0,l.i0_)();for(let[n,i]of g){let o=i(r,e);null!==o&&(t[n]=o)}}return t}},41747:(e,t,r)=>{"use strict";r.d(t,{B9:()=>u,Ej:()=>eL,GA:()=>R,HA:()=>eP,Ln:()=>W,Ng:()=>g,O8:()=>A,RN:()=>_,TX:()=>eO,Xx:()=>p,Ze:()=>N,be:()=>L,cl:()=>V,cn:()=>ei,ex:()=>j,hi:()=>eN,hx:()=>b,kC:()=>$,kN:()=>O,np:()=>f,nq:()=>eF,o5:()=>a,pA:()=>E,pK:()=>eA,py:()=>y,sJ:()=>T,tV:()=>F,xT:()=>eB,xp:()=>en,zC:()=>Z,zp:()=>C});var n=r(92749),i=r(32532),o=r(40983);let l=/^(\d+(?:\.\d+)?)px$/,a={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1};class u extends i.fGB{static getType(){return"tablecell"}static clone(e){return new u(e.__headerState,e.__colSpan,e.__width,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__rowSpan=e.__rowSpan,this.__backgroundColor=e.__backgroundColor,this.__verticalAlign=e.__verticalAlign}static importDOM(){return{td:e=>({conversion:d,priority:0}),th:e=>({conversion:d,priority:0})}}static importJSON(e){return f().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setHeaderStyles(e.headerState).setColSpan(e.colSpan||1).setRowSpan(e.rowSpan||1).setWidth(e.width||void 0).setBackgroun
15dColor(e.backgroundColor||null).setVerticalAlign(e.verticalAlign||void 0)}constructor(e=a.NO_STATUS,t=1,r,n){super(n),this.__colSpan=t,this.__rowSpan=1,this.__headerState=e,this.__width=r,this.__backgroundColor=null,this.__verticalAlign=void 0}createDOM(e){let t=document.createElement(this.getTag());return this.__width&&(t.style.width=`${this.__width}px`),this.__colSpan>1&&(t.colSpan=this.__colSpan),this.__rowSpan>1&&(t.rowSpan=this.__rowSpan),null!==this.__backgroundColor&&(t.style.backgroundColor=this.__backgroundColor),c(this.__verticalAlign)&&(t.style.verticalAlign=this.__verticalAlign),(0,n.ZB)(t,e.theme.tableCell,this.hasHeader()&&e.theme.tableCellHeader),t}exportDOM(e){let t=super.exportDOM(e);if((0,i.sby)(t.element)){let e=t.element;e.setAttribute("data-temporary-table-cell-lexical-key",this.getKey()),e.style.border="1px solid black",this.__colSpan>1&&(e.colSpan=this.__colSpan),this.__rowSpan>1&&(e.rowSpan=this.__rowSpan),e.style.width=`${this.getWidth()||75}px`,e.style.verticalAlign=this.getVerticalAlign()||"top",e.style.textAlign="start",null===this.__backgroundColor&&this.hasHeader()&&(e.style.backgroundColor="#f2f3f5")}return t}exportJSON(){return{...super.exportJSON(),...c(this.__verticalAlign)&&{verticalAlign:this.__verticalAlign},backgroundColor:this.getBackgroundColor(),colSpan:this.__colSpan,headerState:this.__headerState,rowSpan:this.__rowSpan,width:this.getWidth()}}getColSpan(){return this.getLatest().__colSpan}setColSpan(e){let t=this.getWritable();return t.__colSpan=e,t}getRowSpan(){return this.getLatest().__rowSpan}setRowSpan(e){let t=this.getWritable();return t.__rowSpan=e,t}getTag(){return this.hasHeader()?"th":"td"}setHeaderStyles(e,t=a.BOTH){let r=this.getWritable();return r.__headerState=e&t|r.__headerState&~t,r}getHeaderStyles(){return this.getLatest().__headerState}setWidth(e){let t=this.getWritable();return t.__width=e,t}getWidth(){return this.getLatest().__width}getBackgroundColor(){return this.getLatest().__backgroundColor}setBackgroundColor(e){let t=this.getWritable();return t.__backgroundColor=e,t}getVerticalAlign(){return this.getLatest().__verticalAlign}setVerticalAlign(e){let t=this.getWritable();return t.__verticalAlign=e||void 0,t}toggleHeaderStyle(e){let t=this.getWritable();return(t.__headerState&e)===e?t.__headerState-=e:t.__headerState+=e,t}hasHeaderState(e){return(this.getHeaderStyles()&e)===e}hasHeader(){return this.getLatest().__headerState!==a.NO_STATUS}updateDOM(e){return e.__headerState!==this.__headerState||e.__width!==this.__width||e.__colSpan!==this.__colSpan||e.__rowSpan!==this.__rowSpan||e.__backgroundColor!==this.__backgroundColor||e.__verticalAlign!==this.__verticalAlign}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}}function c(e){return"middle"===e||"bottom"===e}function d(e){let t,r=e.nodeName.toLowerCase();l.test(e.style.width)&&(t=parseFloat(e.style.width));let n=f("th"===r?a.ROW:a.NO_STATUS,e.colSpan,t);n.__rowSpan=e.rowSpan;let o=e.style.backgroundColor;""!==o&&(n.__backgroundColor=o);let u=e.style.verticalAlign;c(u)&&(n.__verticalAlign=u);let d=e.style,p=(d&&d.textDecoration||"").split(" "),g="700"===d.fontWeight||"bold"===d.fontWeight,m=p.includes("line-through"),y="italic"===d.fontStyle,v=p.includes("underline");return{after:e=>{let t=[],r=null,n=()=>{if(r){let e=r.getFirstChild();(0,i.wH$)(e)&&1===r.getChildrenSize()&&e.remove()}};for(let o of e)(0,i.Gew)(o)||(0,i.kFe)(o)||(0,i.wH$)(o)?((0,i.kFe)(o)&&(g&&o.toggleFormat("bold"),m&&o.toggleFormat("strikethrough"),y&&o.toggleFormat("italic"),v&&o.toggleFormat("underline")),r?r.append(o):(r=(0,i.lJ7)().append(o),t.push(r))):(t.push(o),n(),r=null);return n(),0===t.length&&t.push((0,i.lJ7)()),t},node:n}}function f(e=a.NO_STATUS,t=1,r){return(0,i.pTq)(new u(e,t,r))}function p(e){return e instanceof u}let g=(0,i.guI)("INSERT_TABLE_COMMAND");function m(e,...t){let r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;for(let r of(n.append("code",e),t))n.append("v",r);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}class y extends i.fGB{static getType(){return"tablerow"}static clone(e){return new y(e.__height,e.__key)}static importDOM(){return{tr:e=>({conversion:v,priority:0})}}static importJSON(e){return b().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setHeight(e.height)}constructor(e,t){super(t),this.__height=e}exportJSON(){let e=this.getHeight();return{...super.exportJSON(),...void 0===e?void 0:{height:e}}}createDOM(e){let t=document.createElement("tr");return this.__height&&(t.style.height=`${this.__height}px`),(0,n.ZB)(t,e.theme.tableRow),t}extractWithChild(e,t,r){return"html"===r}isShadowRoot(){return!0}setHeight(e){let t=this.getWritable();return t.__height=e,t}getHeight(){return this.getLatest().__height}updateDOM(e){return e.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}}function v(e){let t;return l.test(e.style.height)&&(t=parseFloat(e.style.height)),{after:e=>(0,n.cE)(e,p),node:b(t)}}function b(e){return(0,i.pTq)(new y(e))}function _(e){return e instanceof y}let w="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,x=w&&"documentMode"in document?document.documentMode:null,S=w&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);function C(e){let t=(0,n.Bt)(e,e=>p(e));return p(t)?t:null}function k(e){let t=(0,n.Bt)(e,e=>_(e));if(_(t))return t;throw Error("Expected table cell to be inside of table row.")}function T(e){let t=(0,n.Bt)(e,e=>eO(e));if(eO(t))return t;throw Error("Expected table cell to be inside of table.")}function E(e){let t=k(e);return T(t).getChildren().findIndex(e=>e.is(t))}function N(e){return k(e).getChildren().findIndex(t=>t.is(e))}w&&"InputEvent"in window&&!x&&new window.InputEvent("input");let P=(e,t)=>e===a.BOTH||e===t?t:a.NO_STATUS;function $(e=!0){let t=(0,i.vJq)();(0,i.I2P)(t)||W(t)||m(188);let r=t.anchor.getNode(),n=t.focus.getNode(),[o]=L(r),[l,,u]=L(n),[c,d,p]=I(u,l,o),g=c[0].length,{startRow:y}=p,{startRow:v}=d,w=null;if(e){let e=Math.max(v+l.__rowSpan,y+o.__rowSpan)-1,t=c[e],r=b();for(let n=0;n<g;n++){let{cell:o,startRow:l}=t[n];if(l+o.__rowSpan-1<=e){let e=P(t[n].cell.__headerState,a.COLUMN);r.append(f(e).append((0,i.lJ7)()))}else o.setRowSpan(o.__rowSpan+1)}let n=u.getChildAtIndex(e);_(n)||m(256),n.insertAfter(r),w=r}else{let e=Math.min(v,y),t=c[e],r=b();for(let n=0;n<g;n++){let{cell:o,startRow:l}=t[n];if(l===e){let e=P(t[n].cell.__headerState,a.COLUMN);r.append(f(e).append((0,i.lJ7)()))}else o.setRowSpan(o.__rowSpan+1)}let n=u.getChildAtIndex(e);_(n)||m(257),n.insertBefore(r),w=r}return w}function A(e=!0){let t=(0,i.vJq)();(0,i.I2P)(t)||W(t)||m(188);let r=t.anchor.getNode(),n=t.focus.getNode(),[o]=L(r),[l,,u]=L(n),[c,d,p]=I(u,l,o),g=c.length,y=e?Math.max(d.startColumn,p.startColumn):Math.min(d.startColumn,p.startColumn),v=e?y+l.__colSpan-1:y-1,b=u.getFirstChild();_(b)||m(120);let w=null;function x(e=a.NO_STATUS){let t=f(e).append((0,i.lJ7)());return null===w&&(w=t),t}let S=b;e:for(let e=0;e<g;e++){if(0!==e){let e=S.getNextSibling();_(e)||m(121),S=e}let t=c[e],r=P(t[v<0?0:v].cell.__headerState,a.ROW);if(v<0){D(S,x(r));continue}let{cell:n,startColumn:i,startRow:o}=t[v];if(i+n.__colSpan-1<=v){let i=n,l=o,a=v;for(;l!==e&&i.__rowSpan>1;){if(!((a-=n.__colSpan)>=0)){S.append(x(r));continue e}{let{cell:e,startRow:r}=t[a];i=e,l=r}}i.insertAfter(x(r))}else n.setColSpan(n.__colSpan+1)}null!==w&&M(w);let C=u.getColWidths();if(C){let e=[...C],t=v<0?0:v,r=e[t];e.splice(t,0,r),u.setColWidths(e)}return w}function O(){let e=(0,i.vJq)();(0,i.I2P)(e)||W(e)||m(188);let[t,r]=e.isBackward()?[e.focus.getNode(),e.anchor.getNode()]:[e.anchor.getNode(),e.focus.getNode()],[n,,o]=L(t),[l]=L(r),[a,u,c]=I(o,n,l),{startRow:d}=u,{startRow:f}=c,p=f+l.__rowSpan-1;if(a.length===p-d+1)return void o.remove();let g=a[0].length,y=n.__rowSpan,v=a[p+1],b=o.getChildAtIndex(p+1);for(let e=p;e>=d;e--){for(let t=g-1;t>=0;t--){let{cell:r,startRow:n,startColumn:i}=a[e][t];if(i===t){if(e===d&&n<d){let e=d-n;r.setRowSpan(r.__rowSpan-Math.min(y,r.__rowSpan-e))}if(n>=d&&n+r.__rowSpan-1>p){r.setRowSpan(r.__rowSpan-(p-n+1)),null===b&&m(122);let i=null;for(let r=0;r<t;r++){let t=v[r],n=t.cell;t.startRow===e+1&&(i=n),n.__colSpan>1&&(r+=n.__colSpan-1)}null===i?D(b,r):i.insertAfter(r)}}}let t=o.getChildAtIndex(e);_(t)||m(206,String(e)),t.remove()}if(void 0!==v){let{cell:e}=v[0];M(e)}else{let{cell:e}=a[d-1][0];M(e)}}function j(){let e=(0,i.vJq)();(0,i.I2P)(e)||W(e)||m(188);let t=e.anchor.getNode(),r=e.focus.getNode(),[n,,o]=L(t),[l]=L(r),[a,u,c]=I(o,n,l),{startColumn:d}=u,{startRow:f,startColumn:p}=c,g=Math.min(d,p),y=Math.max(d+n.__colSpan-1,p+l.__colSpan-1),v=y-g+1;if(a[0].length===y-g+1)return o.selectPrevious(),void o.remove();let b=a.length;for(let e=0;e<b;e++)for(let t=g;t<=y;t++){let{cell:r,startColumn:n}=a[e][t];if(n<g){if(t===g){let e=g-n;r.setColSpan(r.__colSpan-Math.min(v,r.__colSpan-e))}}else if(n+r.__colSpan-1>y){if(t===y){let e=y-n+1;r.setColSpan(r.__colSpan-e)}}else r.remove()}let _=a[f],w=d>p?_[d+n.__colSpan]:_[p+l.__colSpan];if(void 0!==w){let{cell:e}=w;M(e)}else{let{cell:e}=p<d?_[p-1]:_[d-1];M(e)}let x=o.getColWidths();if(x){let e=[...x];e.splice(g,v),o.setColWidths(e)}}function M(e){let t=e.getFirstDescendant();null==t?e.selectStart():t.getParentOrThrow().selectStart()}function D(e,t){let r=e.getFirstChild();null!==r?r.insertBefore(t):e.append(t)}function R(){let e=(0,i.vJq)();(0,i.I2P)(e)||W(e)||m(188);let[t,r,n]=L(e.anchor.getNode()),o=t.__colSpan,l=t.__rowSpan;if(1===o&&1===l)return;let[u,c]=I(n,t,t),{startColumn:d,startRow:p}=c,g=t.__headerState&a.COLUMN,y=Array.from({length:o},(e,t)=>{let r=g;for(let e=0;0!==r&&e<u.length;e++)r&=u[e][t+d].cell.__headerState;return r}),v=t.__headerState&a.ROW,b=Array.from({length:l},(e,t)=>{let r=v;for(let e=0;0!==r&&e<u[0].length;e++)r&=u[t+p][e].cell.__headerState;return r});if(o>1){for(let e=1;e<o;e++)t.insertAfter(f(y[e]|b[0]).append((0,i.lJ7)()));t.setColSpan(1)}if(l>1){let e;for(let t=1;t<l;t++){let n=p+t,l=u[n];_(e=(e||r).getNextSibling())||m(125);let a=null;for(let e=0;e<d;e++){let t=l[e],r=t.cell;t.startRow===n&&(a=r),r.__colSpan>1&&(e+=r.__colSpan-1)}if(null===a)for(let r=o-1;r>=0;r--)D(e,f(y[r]|b[t]).append((0,i.lJ7)()));else for(let e=o-1;e>=0;e--)a.insertAfter(f(y[e]|b[t]).append((0,i.lJ7)()))}t.setRowSpan(1)}}function I(e,t,r){let[n,i,o]=F(e,t,r);return null===i&&m(207),null===o&&m(208),[n,i,o]}function F(e,t,r){let n=[],i=null,o=null;function l(e){let t=n[e];return void 0===t&&(n[e]=t=[]),t}let a=e.getChildren();for(let e=0;e<a.length;e++){let n=a[e];_(n)||m(209);let u=l(e);for(let c=n.getFirstChild(),d=0;null!=c;c=c.getNextSibling()){for(p(c)||m(147);void 0!==u[d];)d++;let n={cell:c,startColumn:d,startRow:e},{__rowSpan:f,__colSpan:g}=c;for(let t=0;t<f&&!(e+t>=a.length);t++){let r=l(e+t);for(let e=0;e<g;e++)r[d+e]=n}null!==t&&null===i&&t.is(c)&&(i=n),null!==r&&null===o&&r.is(c)&&(o=n)}}return[n,i,o]}function L(e){let t;if(e instanceof u)t=e;else if("__type"in e){let r=(0,n.Bt)(e,p);p(r)||m(148),t=r}else{let r=(0,n.Bt)(e.getNode(),p);p(r)||m(148),t=r}let r=t.getParent();_(r)||m(149);let i=r.getParent();return eO(i)||m(210),[t,r,i]}function B(e,t,r){let n,i=Math.min(t.startColumn,r.startColumn),o=Math.min(t.startRow,r.startRow),l=Math.max(t.startColumn+t.cell.__colSpan-1,r.startColumn+r.cell.__colSpan-1),a=Math.max(t.startRow+t.cell.__rowSpan-1,r.startRow+r.cell.__rowSpan-1);do{n=!1;for(let t=0;t<e.length;t++)for(let r=0;r<e[0].length;r++){let u=e[t][r];if(!u)continue;let c=u.startColumn+u.cell.__colSpan-1,d=u.startRow+u.cell.__rowSpan-1,f=u.startColumn<=l&&c>=i,p=u.startRow<=a&&d>=o;
15if(f&&p){let e=Math.min(i,u.startColumn),t=Math.max(l,c),r=Math.min(o,u.startRow),f=Math.max(a,d);e===i&&t===l&&r===o&&f===a||(i=e,l=t,o=r,a=f,n=!0)}}}while(n);return{maxColumn:l,maxRow:a,minColumn:i,minRow:o}}function z(e){let[t,,r]=L(e),n=r.getChildren(),i=n.length,o=n[0].getChildren().length,l=Array(i);for(let e=0;e<i;e++)l[e]=Array(o);for(let e=0;e<i;e++){let r=n[e].getChildren(),i=0;for(let n=0;n<r.length;n++){for(;l[e][i];)i++;let o=r[n],a=o.__rowSpan||1,u=o.__colSpan||1;for(let t=0;t<a;t++)for(let r=0;r<u;r++)l[e+t][i+r]=o;if(t===o)return{colSpan:u,columnIndex:i,rowIndex:e,rowSpan:a};i+=u}}return null}function U(e){let[[t,r,i,o],[l,a,u,c]]=["anchor","focus"].map(t=>{let r=e[t].getNode(),i=(0,n.Bt)(r,p);p(i)||m(238,t,r.getKey(),r.getType());let o=i.getParent();_(o)||m(239,t);let l=o.getParent();return eO(l)||m(240,t),[r,i,o,l]});return o.is(c)||m(241),{anchorCell:r,anchorNode:t,anchorRow:i,anchorTable:o,focusCell:a,focusNode:l,focusRow:u,focusTable:c}}class K{constructor(e,t,r){this.anchor=t,this.focus=r,t._selection=this,r._selection=this,this._cachedNodes=null,this.dirty=!1,this.tableKey=e}getStartEndPoints(){return[this.anchor,this.focus]}isValid(){return"root"!==this.tableKey&&"root"!==this.anchor.key&&"element"===this.anchor.type&&"root"!==this.focus.key&&"element"===this.focus.type}isBackward(){return this.focus.isBefore(this.anchor)}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return W(e)&&this.tableKey===e.tableKey&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)}set(e,t,r){this.dirty=this.dirty||e!==this.tableKey||t!==this.anchor.key||r!==this.focus.key,this.tableKey=e,this.anchor.key=t,this.focus.key=r,this._cachedNodes=null}clone(){return new K(this.tableKey,(0,i.z8s)(this.anchor.key,this.anchor.offset,this.anchor.type),(0,i.z8s)(this.focus.key,this.focus.offset,this.focus.type))}isCollapsed(){return!1}extract(){return this.getNodes()}insertRawText(e){}insertText(){}hasFormat(e){let t=0;this.getNodes().filter(p).forEach(e=>{let r=e.getFirstChild();(0,i.bSg)(r)&&(t|=r.getTextFormat())});let r=i.LZn[e];return!!(t&r)}insertNodes(e){let t=this.focus.getNode();(0,i.ff4)(t)||m(151),(0,i.CaD)(t.select(0,t.getChildrenSize())).insertNodes(e)}getShape(){let{anchorCell:e,focusCell:t}=U(this),r=z(e);null===r&&m(153);let n=z(t);null===n&&m(155);let i=Math.min(r.columnIndex,n.columnIndex),o=Math.max(r.columnIndex+r.colSpan-1,n.columnIndex+n.colSpan-1),l=Math.min(r.rowIndex,n.rowIndex),a=Math.max(r.rowIndex+r.rowSpan-1,n.rowIndex+n.rowSpan-1);return{fromX:Math.min(i,o),fromY:Math.min(l,a),toX:Math.max(i,o),toY:Math.max(l,a)}}getNodes(){if(!this.isValid())return[];let e=this._cachedNodes;if(null!==e)return e;let{anchorTable:t,anchorCell:r,focusCell:n}=U(this),o=n.getParents()[1];if(o!==t){if(t.isParentOf(n)){let e=o.getParent();null==e&&m(159),this.set(this.tableKey,n.getKey(),e.getKey())}else{let e=t.getParent();null==e&&m(158),this.set(this.tableKey,e.getKey(),n.getKey())}return this.getNodes()}let[l,a,u]=I(t,r,n),{minColumn:c,maxColumn:d,minRow:f,maxRow:p}=B(l,a,u),g=new Map([[t.getKey(),t]]),y=null;for(let e=f;e<=p;e++)for(let t=c;t<=d;t++){let{cell:r}=l[e][t],n=r.getParent();_(n)||m(160),n!==y&&(g.set(n.getKey(),n),y=n),g.has(r.getKey())||function(e,t){let r=[[e]];for(let e=r.at(-1);void 0!==e&&r.length>0;e=r.at(-1)){let n=e.pop();void 0===n?r.pop():!1!==t(n)&&(0,i.ff4)(n)&&r.push(n.getChildren())}}(r,e=>{g.set(e.getKey(),e)})}let v=Array.from(g.values());return(0,i.GcU)()||(this._cachedNodes=v),v}getTextContent(){let e=this.getNodes().filter(e=>p(e)),t="";for(let r=0;r<e.length;r++){let n=e[r],i=n.__parent,o=(e[r+1]||{}).__parent;t+=n.getTextContent()+(o!==i?"\n":" ")}return t}}function W(e){return e instanceof K}function q(){return new K("root",(0,i.z8s)("root",0,"element"),(0,i.z8s)("root",0,"element"))}function V(e,t=(0,i.i0_)()){let r=(0,i.nsf)(e);eO(r)||m(231,e);let n=Z(r,t.getElementByKey(e));return null===n&&m(232,e),{tableElement:n,tableNode:r}}class J{constructor(e,t){this.isHighlightingCells=!1,this.anchorX=-1,this.anchorY=-1,this.focusX=-1,this.focusY=-1,this.listenersToRemove=new Set,this.tableNodeKey=t,this.editor=e,this.table={columns:0,domRows:[],rows:0},this.tableSelection=null,this.anchorCellNodeKey=null,this.focusCellNodeKey=null,this.anchorCell=null,this.focusCell=null,this.hasHijackedSelectionStyles=!1,this.isSelecting=!1,this.pointerType=null,this.shouldCheckSelection=!1,this.abortController=new AbortController,this.listenerOptions={signal:this.abortController.signal},this.nextFocus=null,this.trackTable()}getTable(){return this.table}removeListeners(){this.abortController.abort("removeListeners"),Array.from(this.listenersToRemove).forEach(e
15=>e()),this.listenersToRemove.clear()}$lookup(){return V(this.tableNodeKey,this.editor)}trackTable(){let e=new MutationObserver(e=>{this.editor.getEditorState().read(()=>{let t=!1;for(let r=0;r<e.length;r++){let n=e[r].target.nodeName;if("TABLE"===n||"TBODY"===n||"THEAD"===n||"TR"===n){t=!0;break}}if(!t)return;let{tableNode:r,tableElement:n}=this.$lookup();this.table=el(r,n)},{editor:this.editor})});this.editor.getEditorState().read(()=>{let{tableNode:t,tableElement:r}=this.$lookup();this.table=el(t,r),e.observe(r,{attributes:!0,childList:!0,subtree:!0})},{editor:this.editor})}$clearHighlight(){let e=this.editor;this.isHighlightingCells=!1,this.anchorX=-1,this.anchorY=-1,this.focusX=-1,this.focusY=-1,this.tableSelection=null,this.anchorCellNodeKey=null,this.focusCellNodeKey=null,this.anchorCell=null,this.focusCell=null,this.hasHijackedSelectionStyles=!1,this.$enableHighlightStyle();let{tableNode:t,tableElement:r}=this.$lookup();ea(e,el(t,r),null),null!==(0,i.vJq)()&&((0,i.n1P)(null),e.dispatchCommand(i.MvL,void 0))}$enableHighlightStyle(){let e=this.editor,{tableElement:t}=this.$lookup();(0,n.HE)(t,e._config.theme.tableSelection),t.classList.remove("disable-selection"),this.hasHijackedSelectionStyles=!1}$disableHighlightStyle(){let{tableElement:e}=this.$lookup();(0,n.ZB)(e,this.editor._config.theme.tableSelection),this.hasHijackedSelectionStyles=!0}$updateTableTableSelection(e){if(null!==e){e.tableKey!==this.tableNodeKey&&m(233,e.tableKey,this.tableNodeKey);let t=this.editor;this.tableSelection=e,this.isHighlightingCells=!0,this.$disableHighlightStyle(),this.updateDOMSelection(),ea(t,this.table,this.tableSelection)}else this.$clearHighlight()}setShouldCheckSelection(){this.shouldCheckSelection=!0}getAndClearShouldCheckSelection(){return!!this.shouldCheckSelection&&(this.shouldCheckSelection=!1,!0)}setNextFocus(e){this.nextFocus=e}getAndClearNextFocus(){let{nextFocus:e}=this;return null!==e&&(this.nextFocus=null),e}updateDOMSelection(){if(null!==this.anchorCell&&null!==this.focusCell){let e=(0,i.peL)(this.editor._window);e&&e.rangeCount>0&&e.removeAllRanges()}}$setFocusCellForSelection(e,t=!1){let r=this.editor,{tableNode:n}=this.$lookup(),o=e.x,l=e.y;if(this.focusCell=e,this.isHighlightingCells||this.anchorX===o&&this.anchorY===l&&!t){if(o===this.focusX&&l===this.focusY)return!1}else this.isHighlightingCells=!0,this.$disableHighlightStyle();if(this.focusX=o,this.focusY=l,this.isHighlightingCells){let t=eC(n,e.elem);if(null!=this.tableSelection&&null!=this.anchorCellNodeKey&&null!==t)return this.focusCellNodeKey=t.getKey(),this.tableSelection=function(e,t,r){e.getKey(),t.getKey(),r.getKey();let n=(0,i.vJq)(),o=W(n)?n.clone():q();return o.set(e.getKey(),t.getKey(),r.getKey()),o}(n,this.$getAnchorTableCellOrThrow(),t),(0,i.n1P)(this.tableSelection),r.dispatchCommand(i.MvL,void 0),ea(r,this.table,this.tableSelection),!0}return!1}$getAnchorTableCell(){return this.anchorCellNodeKey?(0,i.nsf)(this.anchorCellNodeKey):null}$getAnchorTableCellOrThrow(){let e=this.$getAnchorTableCell();return null===e&&m(234),e}$getFocusTableCell(){return this.focusCellNodeKey?(0,i.nsf)(this.focusCellNodeKey):null}$getFocusTableCellOrThrow(){let e=this.$getFocusTableCell();return null===e&&m(235),e}$setAnchorCellForSelection(e){this.isHighlightingCells=!1,this.anchorCell=e,this.anchorX=e.x,this.anchorY=e.y;let{tableNode:t}=this.$lookup(),r=eC(t,e.elem);if(null!==r){let e=r.getKey();this.tableSelection=null!=this.tableSelection?this.tableSelection.clone():q(),this.anchorCellNodeKey=e}}$formatCells(e){let t=(0,i.vJq)();W(t)||m(236);let r=(0,i.uTE)(),n=r.anchor,o=r.focus,l=t.getNodes().filter(p);l.length>0||m(237);let a=l[0].getFirstChild(),u=(0,i.bSg)(a)?a.getFormatFlags(e,null):null;l.forEach(t=>{n.set(t.getKey(),0,"element"),o.set(t.getKey(),t.getChildrenSize(),"element"),r.formatText(e,u)}),(0,i.n1P)(t),this.editor.dispatchCommand(i.MvL,void 0)}$clearText(){let{editor:e}=this,t=(0,i.nsf)(this.tableNodeKey);if(!eO(t))throw Error("Expected TableNode.");let r=(0,i.vJq)();W(r)||m(253);let n=r.getNodes().filter(p);if(n.length===this.table.columns*this.table.rows){t.selectPrevious();let r=t.getParent();return t.remove(),void((0,i.hVZ)(r)&&r.isEmpty()&&e.dispatchCommand(i.XKQ,void 0))}
15n.forEach(e=>{if((0,i.ff4)(e)){let t=(0,i.lJ7)(),r=(0,i.sTu)();t.append(r),e.append(t),e.getChildren().forEach(e=>{e!==t&&e.remove()})}}),ea(e,this.table,null),(0,i.n1P)(null),e.dispatchCommand(i.MvL,void 0)}}let H="__lexicalTableSelection",G=e=>!(1&~e.buttons);function Y(e){return(0,i.sby)(e)&&"TABLE"===e.nodeName}function Z(e,t){if(!t)return t;let r=Y(t)?t:e.getDOMSlot(t).element;return"TABLE"!==r.nodeName&&m(245,t.nodeName),r}function X(e){return e._window}function Q(e,t){for(let r=t,n=null;null!==r;r=r.getParent()){if(e.is(r))return n;p(r)&&(n=r)}return null}let ee=[[i.bbF,"down"],[i.UDz,"up"],[i.AX0,"backward"],[i.JM3,"forward"]],et=[i.hi0,i.viC,i.WuB],er=[i.gCZ,i.w$Z];function en(e){return e[H]||null}function ei(e){let t=e;for(;null!=t;){let e=t.nodeName;if("TD"===e||"TH"===e){let e=t._cell;return void 0===e?null:e}t=t.parentNode}return null}function eo(e,t){if(!e.contains(t))return null;let r=null;for(let n=t;null!=n;n=n.parentNode){if(n===e)return r;let t=n.nodeName;"TD"!==t&&"TH"!==t||(r=n._cell||null)}return null}function el(e,t){let r=[],n={columns:0,domRows:r,rows:0},i=Z(e,t).querySelector("tr"),o=0,l=0;for(r.length=0;null!=i;){let e=i.nodeName;if("TD"===e||"TH"===e){let e={elem:i,hasBackgroundColor:""!==i.style.backgroundColor,highlighted:!1,x:o,y:l};i._cell=e;let t=r[l];void 0===t&&(t=r[l]=[]),t[o]=e}else{let e=i.firstChild;if(null!=e){i=e;continue}}let t=i.nextSibling;if(null!=t){o++,i=t;continue}let n=i.parentNode;if(null!=n){let e=n.nextSibling;if(null==e)break;l++,o=0,i=e}}return n.columns=o+1,n.rows=l+1,n}function ea(e,t,r){let n=new Set(r?r.getNodes():[]);es(t,(t,r)=>{let i=t.elem;n.has(r)?(t.highlighted=!0,em(e,t)):(t.highlighted=!1,ey(e,t),i.getAttribute("style")||i.removeAttribute("style"))})}function es(e,t){let{domRows:r}=e;for(let e=0;e<r.length;e++){let n=r[e];if(n)for(let r=0;r<n.length;r++){let o=n[r];if(!o)continue;let l=(0,i.xL4)(o.elem);null!==l&&t(o,l,{x:r,y:e})}}}function eu(e,t){t.$disableHighlightStyle(),es(t.table,t=>{t.highlighted=!0,em(e,t)})}let ec=(e,t,r,n,i)=>{let o="forward"===i;switch(i){case"backward":case"forward":return r!==(o?e.table.columns-1:0)?eg(t.getCellNodeFromCordsOrThrow(r+(o?1:-1),n,e.table),o):n!==(o?e.table.rows-1:0)?eg(t.getCellNodeFromCordsOrThrow(o?0:e.table.columns-1,n+(o?1:-1),e.table),o):o?t.selectNext():t.selectPrevious(),!0;case"up":return 0!==n?eg(t.getCellNodeFromCordsOrThrow(r,n-1,e.table),!1):t.selectPrevious(),!0;case"down":return n!==e.table.rows-1?eg(t.getCellNodeFromCordsOrThrow(r,n+1,e.table),!0):t.selectNext(),!0;default:return!1}};function ed(e,t){let r,n;if(t.startColumn===e.minColumn)r="minColumn";else{if(t.startColumn+t.cell.__colSpan-1!==e.maxColumn)return null;r="maxColumn"}if(t.startRow===e.minRow)n="minRow";else{if(t.startRow+t.cell.__rowSpan-1!==e.maxRow)return null;n="maxRow"}return[r,n]}function ef([e,t]){return["minColumn"===e?"maxColumn":"minColumn","minRow"===t?"maxRow":"minRow"]}function eh(e,t,[r,n]){let i=t[n],o=e[i];void 0===o&&m(250,n,String(i));let l=t[r],a=o[l];return void 0===a&&m(250,r,String(l)),a}function ep(e,t){if((0,i.I2P)(e)||W(e)){let r=t.isParentOf(e.anchor.getNode()),n=t.isParentOf(e.focus.getNode());return r&&n}return!1}function eg(e,t){t?e.selectStart():e.selectEnd()}function em(e,t){let r=t.elem,o=e._config.theme;p((0,i.xL4)(r))||m(131),(0,n.ZB)(r,o.tableCellSelected)}function ey(e,t){let r=t.elem;p((0,i.xL4)(r))||m(131);let o=e._config.theme;(0,n.HE)(r,o.tableCellSelected)}function ev(e){let t=(0,n.Bt)(e,p);return p(t)?t:null}function eb(e){let t=(0,n.Bt)(e,eO);return eO(t)?t:null}function e_(e){e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation()}function ew(e,t,r){let n=(0,i.lJ7)();"first"===e?t.insertBefore(n):t.insertAfter(n),n.append(...r||[]),n.selectEnd()}function ex(e,t,r){let o=r.getParent();if(!o)return;let l=(0,i.peL)(X(e));if(!l)return;let a=l.anchorNode,u=e.getElementByKey(o.getKey()),c=Z(r,e.getElementByKey(r.getKey()));if(!a||!u||!c||!u.contains(a)||c.contains(a))return;let d=(0,n.Bt)(t.anchor.getNode(),e=>p(e));if(!d)return;let f=(0,n.Bt)(d,e=>eO(e));if(!eO(f)||!f.is(r))return;let[g,m]=I(r,d,d),y=g[0][0],v=g[g.length-1][g[0].length-1],{startRow:b,startColumn:_}=m,w=b===y.startRow&&_===y.startColumn,x=b===v.startRow&&_===v.startColumn;return w?"first":x?"last":void 0}function eS(e,t){let{tableNode:r}=e.$lookup(),n=r.getCordsFromCellNode(t,e.table);return r.getDOMCellFromCordsOrThrow(n.x,n.y,e.table)}function eC(e,t,r){return Q(e,(0,i.xL4)(t,r))}function ek(e,t,r){if(!t.theme.tableAlignment)return;let i=[],o=[];for(let e of["center","right"]){let n=t.theme.tableAlignment[e];n&&(e===r?o:i).push(n)}(0,n.HE)(e,...i),(0,n.ZB)(e,...o)}let eT=new WeakSet;function eE(e=(0,i.i0_)()){return eT.has(e)}function eN(e,t){t?eT.add(e):eT.delete(e)}class eP extends i.fGB{static getType(){return"table"}getColWidths(){return this.getLatest().__colWidths}setColWidths(e){let t=this.getWritable();return t.__colWidths=e,t}static clone(e){return new eP(e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__colWidths=e.__colWidths,this.__rowStriping=e.__rowStriping,this.__frozenColumnCount=e.__frozenColumnCount,this.__frozenRowCount=e.__frozenRowCount}static importDOM(){return{table:e=>({conversion:e$,priority:1})}}static importJSON(e){return eA().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setRowStriping(e.rowStriping||!1).setFrozenColumns(e.frozenColumnCount||0).setFrozenRows(e.frozenRowCount||0).setColWidths(e.colWidths)}constructor(e){super(e),this.__rowStriping=!1,this.__frozenColumnCount=0,this.__frozenRowCount=0}exportJSON(){return{...super.exportJSON(),colWidths:this.getColWidths(),frozenColumnCount:this.__frozenColumnCount?this.__frozenColumnCount:void 0,frozenRowCount:this.__frozenRowCount?this.__frozenRowCount:void 0,rowStriping:this.__rowStriping?this.__rowStriping:void 0}}extractWithChild(e,t,r){return"html"===r}getDOMSlot(e){let t=Y(e)?e:e.querySelector("table");return Y(t)||m(229),super.getDOMSlot(e).withElement(t).withAfter(t.querySelector("colgroup"))}createDOM(e,t){let r=document.createElement("table");this.__style&&(r.style.cssText=this.__style);let o=document.createElement("colgroup");if(r.appendChild(o),(0,i.pd8)(o),(0,n.ZB)(r,e.theme.table),this.updateTableElement(null,r,e),eE(t)){let t=document.createElement("div"),i=e.theme.tableScrollableWrapper;return i?(0,n.ZB)(t,i):t.style.cssText="overflow-x: auto;",t.appendChild(r),t}return r}updateTableElement(e,t,r){this.__style!==(e?e.__style:"")&&(t.style.cssText=this.__style),this.__rowStriping!==(!!e&&e.__rowStriping)&&(this.__rowStriping?((0,n.ZB)(t,r.theme.tableRowStriping),t.setAttribute("data-lexical-row-striping","true")):((0,n.HE)(t,r.theme.tableRowStriping),t.removeAttribute("data-lexical-row-striping"))),this.__frozenColumnCount!==(e?e.__frozenColumnCount:0)&&(this.__frozenColumnCount>0?((0,n.ZB)(t,r.theme.tableFrozenColumn),t.setAttribute("data-lexical-frozen-column","true")):((0,n.HE)(t,r.theme.tableFrozenColumn),t.removeAttribute("data-lexical-frozen-column"))),this.__frozenRowCount!==(e?e.__frozenRowCount:0)&&(this.__frozenRowCount>0?((0,n.ZB)(t,r.theme.tableFrozenRow),t.setAttribute("data-lexical-frozen-row","true")):((0,n.HE)(t,r.theme.tableFrozenRow),t.removeAttribute("data-lexical-frozen-row"))),function(e,t,r,n){let i=e.querySelector("colgroup");if(!i)return;let o=[];for(let e=0;e<r;e++){let t=document.createElement("col"),r=n&&n[e];r&&(t.style.width=`${r}px`),o.push(t)}i.replaceChildren(...o)}
15(t,0,this.getColumnCount(),this.getColWidths()),ek(t,r,this.getFormatType())}updateDOM(e,t,r){return this.updateTableElement(e,this.getDOMSlot(t).element,r),!1}exportDOM(e){let t=super.exportDOM(e),{element:r}=t;return{after:r=>{if(t.after&&(r=t.after(r)),!Y(r)&&(0,i.sby)(r)&&(r=r.querySelector("table")),!Y(r))return null;ek(r,e._config,this.getFormatType());let[n]=F(this,null,null),o=new Map;for(let e of n)for(let t of e){let e=t.cell.getKey();o.has(e)||o.set(e,{colSpan:t.cell.getColSpan(),startColumn:t.startColumn})}let l=new Set;for(let e of r.querySelectorAll(":scope > tr > [data-temporary-table-cell-lexical-key]")){let t=e.getAttribute("data-temporary-table-cell-lexical-key");if(t){let r=o.get(t);if(e.removeAttribute("data-temporary-table-cell-lexical-key"),r){o.delete(t);for(let e=0;e<r.colSpan;e++)l.add(e+r.startColumn)}}}let a=r.querySelector(":scope > colgroup");if(a){let e=Array.from(r.querySelectorAll(":scope > colgroup > col")).filter((e,t)=>l.has(t));a.replaceChildren(...e)}let u=r.querySelectorAll(":scope > tr");if(u.length>0){let e=document.createElement("tbody");for(let t of u)e.appendChild(t);r.append(e)}return r},element:!Y(r)&&(0,i.sby)(r)?r.querySelector("table"):r}}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(e,t){let{rows:r,domRows:n}=t;for(let t=0;t<r;t++){let r=n[t];if(null!=r)for(let n=0;n<r.length;n++){let i=r[n];if(null==i)continue;let{elem:o}=i,l=eC(this,o);if(null!==l&&e.is(l))return{x:n,y:t}}}throw Error("Cell not found in table.")}getDOMCellFromCords(e,t,r){let{domRows:n}=r,i=n[t];if(null==i)return null;let o=i[e<i.length?e:i.length-1];return null==o?null:o}getDOMCellFromCordsOrThrow(e,t,r){let n=this.getDOMCellFromCords(e,t,r);if(!n)throw Error("Cell not found at cords.");return n}getCellNodeFromCords(e,t,r){let n=this.getDOMCellFromCords(e,t,r);if(null==n)return null;let o=(0,i.xL4)(n.elem);return p(o)?o:null}getCellNodeFromCordsOrThrow(e,t,r){let n=this.getCellNodeFromCords(e,t,r);if(!n)throw Error("Node at cords not TableCellNode.");return n}getRowStriping(){return!!this.getLatest().__rowStriping}setRowStriping(e){let t=this.getWritable();return t.__rowStriping=e,t}setFrozenColumns(e){let t=this.getWritable();return t.__frozenColumnCount=e,t}getFrozenColumns(){return this.getLatest().__frozenColumnCount}setFrozenRows(e){let t=this.getWritable();return t.__frozenRowCount=e,t}getFrozenRows(){return this.getLatest().__frozenRowCount}canSelectBefore(){return!0}canIndent(){return!1}getColumnCount(){let e=this.getFirstChild();if(!e)return 0;let t=0;
15return e.getChildren().forEach(e=>{p(e)&&(t+=e.getColSpan())}),t}}function e$(e){let t=eA();e.hasAttribute("data-lexical-row-striping")&&t.setRowStriping(!0);let r=e.querySelector(":scope > colgroup");if(r){let e=[];for(let t of r.querySelectorAll(":scope > col")){let r=t.style.width||"";if(!l.test(r)&&(r=t.getAttribute("width")||"",!/^\d+$/.test(r))){e=void 0;break}e.push(parseFloat(r))}e&&t.setColWidths(e)}return{after:e=>(0,n.cE)(e,_),node:t}}function eA(){return(0,i.pTq)(new eP)}function eO(e){return e instanceof eP}function ej({rows:e,columns:t,includeHeaders:r}){let o=(0,i.vJq)();if(!o||!(0,i.I2P)(o)||eb(o.anchor.getNode()))return!1;let l=function(e,t,r=!0){let n=eA();for(let o=0;o<e;o++){let e=b();for(let n=0;n<t;n++){let t=a.NO_STATUS;"object"==typeof r?(0===o&&r.rows&&(t|=a.ROW),0===n&&r.columns&&(t|=a.COLUMN)):r&&(0===o&&(t|=a.ROW),0===n&&(t|=a.COLUMN));let l=f(t),u=(0,i.lJ7)();u.append((0,i.sTu)()),l.append(u),e.append(l)}n.append(e)}return n}(Number(e),Number(t),r);(0,n.Pe)(l);let u=l.getFirstDescendant();return(0,i.kFe)(u)&&u.select(),!0}function eM(e){_(e.getParent())?e.isEmpty()&&e.append((0,i.lJ7)()):e.remove()}function eD(e){eO(e.getParent())?(0,n.vF)(e,p):e.remove()}function eR(e){(0,n.vF)(e,_);let[t]=F(e,null,null),r=t.reduce((e,t)=>Math.max(e,t.length),0),o=e.getChildren();for(let e=0;e<t.length;++e){let n=o[e];if(!n)continue;_(n)||m(254,n.constructor.name,n.getType());let l=t[e].reduce((e,t)=>t?1+e:e,0);if(l!==r)for(let e=l;e<r;++e){let e=f();e.append((0,i.lJ7)()),n.append(e)}}}function eI(e){if(e.detail<3||!(0,i.vAA)(e.target))return!1;let t=(0,i.xL4)(e.target);if(null===t)return!1;let r=(0,n.Bt)(t,e=>(0,i.ff4)(e)&&!e.isInline());return null!==r&&!!p(r.getParent())&&(r.select(0),!0)}function eF(e){return e.registerNodeTransform(u,e=>{if(e.getColSpan()>1||e.getRowSpan()>1){let[,,t]=L(e),[r]=I(t,e,e),i=r.length,o=r[0].length,l=t.getFirstChild();_(l)||m(175);let a=[];for(let e=0;e<i;e++){0!==e&&(_(l=l.getNextSibling())||m(175));let t=null;for(let i=0;i<o;i++){let o=r[e][i],u=o.cell;if(o.startRow===e&&o.startColumn===i)t=u,a.push(u);else if(u.getColSpan()>1||u.getRowSpan()>1){p(u)||m(176);let e=f(u.__headerState);null!==t?t.insertAfter(e):(0,n.K2)(l,e)}}}for(let e of a)e.setColSpan(1),e.setRowSpan(1)}})}function eL(e,t=!0){let r=new Map,l=(l,a,u)=>{let c=Z(l,u),d=function(e,t,r,l){let a=r.getRootElement(),u=X(r);null!==a&&null!==u||m(246);let c=new J(r,e.getKey()),d=Z(e,t);null!==en(d)&&m(205),d[H]=c,c.listenersToRemove.add(()=>{en(d)===c&&delete d[H]});let f=t=>{if(c.pointerType=t.pointerType,0!==t.button||!(0,i.vAA)(t.target)||!u)return;let n=ei(t.target);null!==n&&r.update(()=>{let r=(0,i.S1w)();if(S&&t.shiftKey&&ep(r,e)&&((0,i.I2P)(r)||W(r))){let i=r.anchor.getNode(),o=Q(e,r.anchor.getNode());o?(c.$setAnchorCellForSelection(eS(c,o)),c.$setFocusCellForSelection(n),e_(t)):(e.isBefore(i)?e.selectStart():e.selectEnd()).anchor.set(r.anchor.key,r.anchor.offset,r.anchor.type)}else c.$setAnchorCellForSelection(n)}),(()=>{if(c.isSelecting)return;let e=()=>{c.isSelecting=!1,u.removeEventListener("pointerup",e),u.removeEventListener("pointermove",t)},t=n=>{if(!G(n)&&c.isSelecting)return c.isSelecting=!1,u.removeEventListener("pointerup",e),void u.removeEventListener("pointermove",t);if(!(0,i.vAA)(n.target))return;let o=null,l=!(S||d.contains(n.target));if(l)o=eo(d,n.target);else for(let e of document.elementsFromPoint(n.clientX,n.clientY))if(o=eo(d,e))break;o&&(null===c.focusCell||o.elem!==c.focusCell.elem)&&(c.setNextFocus({focusCell:o,override:l}),r.dispatchCommand(i.MvL,void 0))};c.isSelecting=!0,u.addEventListener("pointerup",e,c.listenerOptions),u.addEventListener("pointermove",t,c.listenerOptions)})()};d.addEventListener("pointerdown",f,c.listenerOptions),c.listenersToRemove.add(()=>{d.removeEventListener("pointerdown",f)});let g=e=>{e.detail>=3&&(0,i.vAA)(e.target)&&null!==ei(e.target)&&e.preventDefault()};d.addEventListener("mousedown",g,c.listenerOptions),c.listenersToRemove.add(()=>{d.removeEventListener("mousedown",g)});let y=e=>{let t=e.target;0===e.button&&(0,i.vAA)(t)&&r.update(()=>{let e=(0,i.vJq)();W(e)&&e.tableKey===c.tableNodeKey&&a.contains(t)&&c.$clearHighlight()})};for(let[t,o]of(u.addEventListener("pointerdown",y,c.listenerOptions),c.listenersToRemove.add(()=>{u.removeEventListener("pointerdown",y)}),ee))c.listenersToRemove.add(r.registerCommand(t,t=>(function e(t,r,o,l,a){if(("up"===o||"down"===o)&&function(e){let t=e.getRootElement();return!!t&&t.hasAttribute("aria-controls")&&"typeahead-menu"===t.getAttribute("aria-controls")}(t))return!1;let u=(0,i.vJq)();
15if(!ep(u,l)){if((0,i.I2P)(u)){if("backward"===o){if(u.focus.offset>0)return!1;let e=function(e){for(let t=e,r=e;null!==r;t=r,r=r.getParent())if((0,i.ff4)(r)){if(r!==t&&r.getFirstChild()!==t)return null;if(!r.isInline())return r}return null}(u.focus.getNode());if(!e)return!1;let t=e.getPreviousSibling();return!!eO(t)&&(e_(r),r.shiftKey?u.focus.set(t.getParentOrThrow().getKey(),t.getIndexWithinParent(),"element"):t.selectEnd(),!0)}if(r.shiftKey&&("up"===o||"down"===o)){let e=u.focus.getNode();if(!u.isCollapsed()&&("up"===o&&!u.isBackward()||"down"===o&&u.isBackward())){let t=(0,n.Bt)(e,e=>eO(e));if(p(t)&&(t=(0,n.Bt)(t,eO)),t!==l||!t)return!1;let a="down"===o?t.getNextSibling():t.getPreviousSibling();if(!a)return!1;let c=0;"up"===o&&(0,i.ff4)(a)&&(c=a.getChildrenSize());let d=a;"up"===o&&(0,i.ff4)(a)&&(d=a.getLastChild()||a,c=(0,i.kFe)(d)?d.getTextContentSize():0);let f=u.clone();return f.focus.set(d.getKey(),c,(0,i.kFe)(d)?"text":"element"),(0,i.n1P)(f),e_(r),!0}if((0,i.IqF)(e)){let e="up"===o?u.getNodes()[u.getNodes().length-1]:u.getNodes()[0];if(e&&null!==Q(l,e)){let e=l.getFirstDescendant(),t=l.getLastDescendant();if(!e||!t)return!1;let[r]=L(e),[n]=L(t),i=l.getCordsFromCellNode(r,a.table),o=l.getCordsFromCellNode(n,a.table),u=l.getDOMCellFromCordsOrThrow(i.x,i.y,a.table),c=l.getDOMCellFromCordsOrThrow(o.x,o.y,a.table);return a.$setAnchorCellForSelection(u),a.$setFocusCellForSelection(c,!0),!0}return!1}{let t=(0,n.Bt)(e,e=>(0,i.ff4)(e)&&!e.isInline());if(p(t)&&(t=(0,n.Bt)(t,eO)),!t)return!1;let l="down"===o?t.getNextSibling():t.getPreviousSibling();if(eO(l)&&a.tableNodeKey===l.getKey()){let e=l.getFirstDescendant(),t=l.getLastDescendant();if(!e||!t)return!1;let[n]=L(e),[a]=L(t),c=u.clone();return c.focus.set(("up"===o?n:a).getKey(),"up"===o?0:a.getChildrenSize(),"element"),e_(r),(0,i.n1P)(c),!0}}}}return"down"===o&&eE(t)&&a.setShouldCheckSelection(),!1}if((0,i.I2P)(u)){if("backward"===o||"forward"===o)return function(e,t,r,o,l,a,u){let c=(0,i.Ave)(r.focus,l?"previous":"next");if((0,i.pGK)(c))return!1;let d=c;for(let e of(0,i.mWO)(c).iterNodeCarets("shadowRoot")){if(!(0,i.OpE)(e)||!(0,i.ff4)(e.origin))return!1;d=e}let f=d.getParentAtCaret();if(!p(f))return!1;let g=function(e){for(let t of(0,i.mWO)(e).iterNodeCarets("root")){let{origin:r}=t;if(p(r)){if((0,i.cmH)(t))return(0,i.uwZ)(r,e.direction)}else if(!_(r))break}return null}((0,i.IlV)(f,d.direction)),y=(0,n.Bt)(f,eO);if(!y||!y.is(a))return!1;let v=e.getElementByKey(f.getKey()),b=ei(v);if(!v||!b)return!1;if(u.table=function(e,t){let r=e.getElementByKey(t.getKey());return null===r&&m(230),el(t,r)}(e,y),g)if("extend"===o){let t=ei(e.getElementByKey(g.origin.getKey()));if(!t)return!1;u.$setAnchorCellForSelection(b),u.$setFocusCellForSelection(t,!0)}else{let e=(0,i.lSZ)(g);(0,i.wp6)(r.anchor,e),(0,i.wp6)(r.focus,e)}
15else if("extend"===o)u.$setAnchorCellForSelection(b),u.$setFocusCellForSelection(b,!0);else{let e=function(e){let t=(0,i.erb)(e);return(0,i.cmH)(t)?(0,i.lSZ)(t):e}((0,i.IlV)(y,c.direction));(0,i.wp6)(r.anchor,e),(0,i.wp6)(r.focus,e)}return e_(t),!0}(t,r,u,r.shiftKey?"extend":"move","backward"===o,l,a);if(u.isCollapsed()){let c,{anchor:d,focus:f}=u,g=(0,n.Bt)(d.getNode(),p),m=(0,n.Bt)(f.getNode(),p);if(!p(g)||!g.is(m))return!1;let y=eb(g);if(y!==l&&null!=y){let n=Z(y,t.getElementByKey(y.getKey()));if(null!=n)return a.table=el(y,n),e(t,r,o,y,a)}let v=t.getElementByKey(g.__key),b=t.getElementByKey(d.key);if(null==b||null==v)return!1;if("element"===d.type)c=b.getBoundingClientRect();else{let e=(0,i.peL)(X(t));if(null===e||0===e.rangeCount)return!1;c=e.getRangeAt(0).getBoundingClientRect()}let _="up"===o?g.getFirstChild():g.getLastChild();if(null==_)return!1;let w=t.getElementByKey(_.__key);if(null==w)return!1;let x=w.getBoundingClientRect();if("up"===o?x.top>c.top-c.height:c.bottom+c.height>x.bottom){e_(r);let e=l.getCordsFromCellNode(g,a.table);if(!r.shiftKey)return ec(a,l,e.x,e.y,o);{let t=l.getDOMCellFromCordsOrThrow(e.x,e.y,a.table);a.$setAnchorCellForSelection(t),a.$setFocusCellForSelection(t,!0)}return!0}}}else if(W(u)){let{anchor:e,focus:i}=u,c=(0,n.Bt)(e.getNode(),p),d=(0,n.Bt)(i.getNode(),p),[f]=u.getNodes();eO(f)||m(251);let g=Z(f,t.getElementByKey(f.getKey()));if(!p(c)||!p(d)||!eO(f)||null==g)return!1;a.$updateTableTableSelection(u);let y=el(f,g),v=l.getCordsFromCellNode(c,y),b=l.getDOMCellFromCordsOrThrow(v.x,v.y,y);if(a.$setAnchorCellForSelection(b),e_(r),r.shiftKey){let[e,t,r]=I(l,c,d);return function(e,t,r,n,i){let o=B(t,r,n),{topSpan:l,leftSpan:a,bottomSpan:u,rightSpan:c}=function(e,t){let{minColumn:r,maxColumn:n,minRow:i,maxRow:o}=t,l=1,a=1,u=1,c=1,d=e[i],f=e[o];for(let e=r;e<=n;e++)l=Math.max(l,d[e].cell.__rowSpan),c=Math.max(c,f[e].cell.__rowSpan);for(let t=i;t<=o;t++)a=Math.max(a,e[t][r].cell.__colSpan),u=Math.max(u,e[t][n].cell.__colSpan);return{bottomSpan:c,leftSpan:a,rightSpan:u,topSpan:l}}(t,o),[d,f]=ef(function(e,t){let r=ed(e,t);return null===r&&m(249,t.cell.getKey()),r}(o,r)),p=o[d],g=o[f];"forward"===i?p+="maxColumn"===d?1:a:"backward"===i?p-="minColumn"===d?1:c:"down"===i?g+="maxRow"===f?1:l:"up"===i&&(g-="minRow"===f?1:u);let y=t[g];if(void 0===y)return!1;let v=y[p];if(void 0===v)return!1;let[b,_]=function(e,t,r){let n=B(e,t,r),i=ed(n,t);if(i)return[eh(e,n,i),eh(e,n,ef(i))];let o=ed(n,r);if(o)return[eh(e,n,ef(o)),eh(e,n,o)];let l=["minColumn","minRow"];return[eh(e,n,l),eh(e,n,ef(l))]}(t,r,v),w=eS(e,b.cell),x=eS(e,_.cell);return e.$setAnchorCellForSelection(w),e.$setFocusCellForSelection(x,!0),!0}(a,e,t,r,o)}return d.selectEnd(),!0}return!1}
15)(r,t,o,e,c),i.WgU));c.listenersToRemove.add(r.registerCommand(i.Q$N,t=>{let r=(0,i.vJq)();if(W(r)){let n=Q(e,r.focus.getNode());if(null!==n)return e_(t),n.selectEnd(),!0}return!1},i.WgU));let v=t=>()=>{let r=(0,i.vJq)();if(!ep(r,e))return!1;if(W(r))return c.$clearText(),!0;if((0,i.I2P)(r)){if(!p(Q(e,r.anchor.getNode())))return!1;let o=r.anchor.getNode(),l=r.focus.getNode(),a=e.isParentOf(o),u=e.isParentOf(l);if(a&&!u||u&&!a)return c.$clearText(),!0;let d=(0,n.Bt)(r.anchor.getNode(),e=>(0,i.ff4)(e)),f=d&&(0,n.Bt)(d,e=>(0,i.ff4)(e)&&p(e.getParent()));if(!(0,i.ff4)(f)||!(0,i.ff4)(d))return!1;if(t===i.viC&&null===f.getPreviousSibling())return!0}return!1};for(let e of et)c.listenersToRemove.add(r.registerCommand(e,v(e),i.da8));let b=t=>{let r=(0,i.vJq)();if(!W(r)&&!(0,i.I2P)(r))return!1;let n=e.isParentOf(r.anchor.getNode());if(n!==e.isParentOf(r.focus.getNode())){let t=n?"focus":"anchor",{key:i,offset:o,type:l}=r[t];return e[r[n?"anchor":"focus"].isBefore(r[t])?"selectPrevious":"selectNext"]()[t].set(i,o,l),!1}return!!ep(r,e)&&!!W(r)&&(t&&(t.preventDefault(),t.stopPropagation()),c.$clearText(),!0)};for(let e of er)c.listenersToRemove.add(r.registerCommand(e,b,i.da8));return c.listenersToRemove.add(r.registerCommand(i.VSO,e=>{let t=(0,i.vJq)();if(t){if(!W(t)&&!(0,i.I2P)(t))return!1;(0,o.lW)(r,(0,n.xj)(e,ClipboardEvent)?e:null,(0,o.xg)(t));let l=b(e);return(0,i.I2P)(t)?(t.removeText(),!0):l}return!1},i.da8)),c.listenersToRemove.add(r.registerCommand(i.mB,t=>{let r=(0,i.vJq)();if(!ep(r,e))return!1;if(W(r))return c.$formatCells(t),!0;if((0,i.I2P)(r)){let e=(0,n.Bt)(r.anchor.getNode(),e=>p(e));p(e)}return!1},i.da8)),c.listenersToRemove.add(r.registerCommand(i.fUS,t=>{let r=(0,i.vJq)();if(!W(r)||!ep(r,e))return!1;let n=r.anchor.getNode(),o=r.focus.getNode();if(!p(n)||!p(o))return!1;if(function(e,t){if(W(e)){let r=e.anchor.getNode(),n=e.focus.getNode();if(t&&r&&n){let[e]=I(t,r,n);return r.getKey()===e[0][0].cell.getKey()&&n.getKey()===e[e.length-1].at(-1).cell.getKey()}}return!1}(r,e))return e.setFormat(t),!0;let[l,a,u]=I(e,n,o),c=Math.max(a.startRow+a.cell.__rowSpan-1,u.startRow+u.cell.__rowSpan-1),d=Math.max(a.startColumn+a.cell.__colSpan-1,u.startColumn+u.cell.__colSpan-1),f=Math.min(a.startRow,u.startRow),g=Math.min(a.startColumn,u.startColumn),m=new Set;for(let e=f;e<=c;e++)for(let r=g;r<=d;r++){let n=l[e][r].cell;if(m.has(n))continue;m.add(n),n.setFormat(t);let o=n.getChildren();for(let e=0;e<o.length;e++){let r=o[e];(0,i.ff4)(r)&&!r.isInline()&&r.setFormat(t)}}return!0},i.da8)),c.listenersToRemove.add(r.registerCommand(i.bM3,t=>{let o=(0,i.vJq)();if(!ep(o,e))return!1;if(W(o))return c.$clearHighlight(),!1;if((0,i.I2P)(o)){let l=(0,n.Bt)(o.anchor.getNode(),e=>p(e));if(!p(l))return!1;if("string"==typeof t){let n=ex(r,o,e);if(n)return ew(n,e,[(0,i.sTu)(t)]),!0}}return!1},i.da8)),l&&c.listenersToRemove.add(r.registerCommand(i.OXk,t=>{let r=(0,i.vJq)();if(!(0,i.I2P)(r)||!r.isCollapsed()||!ep(r,e))return!1;let o=ev(r.anchor.getNode());return!(null===o||!e.is(eb(o)))&&(e_(t),function(e,t){let r="next"===t?"getNextSibling":"getPreviousSibling",o="next"===t?"getFirstChild":"getLastChild",l=e[r]();if((0,i.ff4)(l))return l.selectEnd();let a=(0,n.Bt)(e,_);null===a&&m(247);for(let e=a[r]();_(e);e=e[r]()){let t=e[o]();if((0,i.ff4)(t))return t.selectEnd()}let u=(0,n.Bt)(a,eO);null===u&&m(248),"next"===t?u.selectNext():u.selectPrevious()}(o,t.shiftKey?"previous":"next"),!0)},i.da8)),c.listenersToRemove.add(r.registerCommand(i.$7r,t=>e.isSelected(),i.WgU)),c.listenersToRemove.add(r.registerCommand(i.oqR,e=>{let{nodes:t,selection:r}=e,o=r.getStartEndPoints(),l=W(r),a=(0,i.I2P)(r)&&null!==(0,n.Bt)(r.anchor.getNode(),e=>p(e))&&null!==(0,n.Bt)(r.focus.getNode(),e=>p(e))||l;if(1!==t.length||!eO(t[0])||!a||null===o)return!1;let[u]=o,c=t[0],d=c.getChildren(),f=c.getFirstChildOrThrow().getChildrenSize(),g=c.getChildrenSize(),m=(0,n.Bt)(u.getNode(),e=>p(e)),y=m&&(0,n.Bt)(m,e=>_(e)),v=y&&(0,n.Bt)(y,e=>eO(e));if(!p(m)||!_(y)||!eO(v))return!1;let b=y.getIndexWithinParent(),w=Math.min(v.getChildrenSize()-1,b+g-1),x=m.getIndexWithinParent(),S=Math.min(y.getChildrenSize()-1,x+f-1),C=Math.min(x,S),k=Math.min(b,w),T=Math.max(x,S),E=Math.max(b,w),N=v.getChildren(),P=0;for(let e=k;e<=E;e++){let t=N[e];if(!_(t))return!1;let r=d[P];if(!_(r))return!1;let n=t.getChildren(),o=r.getChildren(),l=0;for(let e=C;e<=T;e++){let t=n[e];if(!p(t))return!1;let r=o[l];if(!p(r))return!1;let a=t.getChildren();
15r.getChildren().forEach(e=>{(0,i.kFe)(e)&&(0,i.lJ7)().append(e),t.append(e)}),a.forEach(e=>e.remove()),l++}P++}return!0},i.da8)),c.listenersToRemove.add(r.registerCommand(i.MvL,()=>{let t=(0,i.vJq)(),o=(0,i.S1w)(),l=c.getAndClearNextFocus();if(null!==l){let{focusCell:r}=l;if(W(t)&&t.tableKey===c.tableNodeKey)return(r.x!==c.focusX||r.y!==c.focusY)&&(c.$setFocusCellForSelection(r),!0);if(r!==c.anchorCell&&ep(t,e))return c.$setFocusCellForSelection(r),!0}if(c.getAndClearShouldCheckSelection()&&(0,i.I2P)(o)&&(0,i.I2P)(t)&&t.isCollapsed()){let r=t.anchor.getNode(),i=e.getFirstChild(),o=ev(r);if(null!==o&&_(i)){let t=i.getFirstChild();if(p(t)&&e.is((0,n.Bt)(o,r=>r.is(e)||r.is(t))))return t.selectStart(),!0}}if((0,i.I2P)(t)){let{anchor:n,focus:l}=t,a=n.getNode(),u=l.getNode(),d=ev(a),f=ev(u),p=!(!d||!e.is(eb(d))),g=!(!f||!e.is(eb(f))),m=t.isBackward();if(p!==g){let n=t.clone();if(g){let[t]=I(e,f,f),r=t[0][0].cell,i=t[t.length-1].at(-1).cell;n.focus.set(m?r.getKey():i.getKey(),m?r.getChildrenSize():i.getChildrenSize(),"element")}else if(p){let[t]=I(e,d,d),r=t[0][0].cell,i=t[t.length-1].at(-1).cell;n.anchor.set(m?i.getKey():r.getKey(),m?i.getChildrenSize():0,"element")}(0,i.n1P)(n),eu(r,c)}else if(p&&g&&(d.is(f)||(c.$setAnchorCellForSelection(eS(c,d)),c.$setFocusCellForSelection(eS(c,f),!0)),"touch"===c.pointerType&&t.isCollapsed()&&(0,i.I2P)(o)&&o.isCollapsed())){let e=ev(o.anchor.getNode());e&&!e.is(f)&&(c.$setAnchorCellForSelection(eS(c,e)),c.$setFocusCellForSelection(eS(c,f),!0),c.pointerType=null)}}else if(t&&W(t)&&t.is(o)&&t.tableKey===e.getKey()){let n=(0,i.peL)(u);if(n&&n.anchorNode&&n.focusNode){let o=(0,i.xL4)(n.focusNode),l=o&&!e.isParentOf(o),a=(0,i.xL4)(n.anchorNode),u=a&&e.isParentOf(a);if(l&&u&&n.rangeCount>0){let o=(0,i.OBE)(n,r);o&&(o.anchor.set(e.getKey(),t.isBackward()?e.getChildrenSize():0,"element"),n.removeAllRanges(),(0,i.n1P)(o))}}}return t&&!t.is(o)&&(W(t)||W(o))&&c.tableSelection&&!c.tableSelection.is(o)?W(t)&&t.tableKey===c.tableNodeKey?c.$updateTableTableSelection(t):!W(t)&&W(o)&&o.tableKey===c.tableNodeKey&&c.$updateTableTableSelection(null):c.hasHijackedSelectionStyles&&!e.isSelected()?(c.$enableHighlightStyle(),es(c.table,e=>{let t=e.elem;e.highlighted=!1,ey(r,e),t.getAttribute("style")||t.removeAttribute("style")})):!c.hasHijackedSelectionStyles&&e.isSelected()&&eu(r,c),!1},i.da8)),c.listenersToRemove.add(r.registerCommand(i.XKQ,()=>{let t=(0,i.vJq)();if(!(0,i.I2P)(t)||!t.isCollapsed()||!ep(t,e))return!1;let n=ex(r,t,e);return!!n&&(ew(n,e),!0)},i.da8)),c}(l,c,e,t);r.set(a,[d,c])},a=e.registerMutationListener(eP,t=>{e.getEditorState().read(()=>{for(let[e,n]of t){let t=r.get(e);if("created"===n||"updated"===n){let{tableNode:n,tableElement:i}=V(e);void 0===t?l(n,e,i):i!==t[1]&&(t[0].removeListeners(),r.delete(e),l(n,e,i))}else"destroyed"===n&&void 0!==t&&(t[0].removeListeners(),r.delete(e))}},{editor:e})},{skipInitialization:!1});return()=>{for(let[,[e]]of(a(),r))e.removeListeners()}}function eB(e){return e.hasNodes([eP])||m(255),(0,n.Sd)(e.registerCommand(g,ej,i.jZM),e.registerCommand(i.oqR,({nodes:e,selection:t})=>!!(0,i.I2P)(t)&&null!==eb(t.anchor.getNode())&&e.some(eO),i.jZM),e.registerCommand(i.d8p,eI,i.jZM),e.registerNodeTransform(eP,eR),e.registerNodeTransform(y,eD),e.registerNodeTransform(u,eM))}},42202:(e,t,r)=>{"use strict";r.d(t,{NotFoundClient:()=>d});var n=r(19749),i=r(95155),o=r(92825),l=r(87677),a=r(58028),u=r(12115);let c="not-found",d=e=>{let t,r,d,f,p=(0,n.c)(10),{marginTop:g}=e,m=void 0===g?"large":g,{setStepNav:y}=(0,o.useStepNav)(),{t:v}=(0,l.d)(),{config:b}=(0,a.b)(),{routes:_}=b,{admin:w}=_;p[0]!==y||p[1]!==v?(t=()=>{y([{label:v("general:notFound")}])},r=[y,v],p[0]=y,p[1]=v,p[2]=t,p[3]=r):(t=p[2],r=p[3]),(0,u.useEffect)(t,r);let x=m&&"".concat(c,"--margin-top-").concat(m);p[4]!==x?(d=[c,x].filter(Boolean),p[4]=x,p[5]=d):d=p[5];let S=d.join(" ");return p[6]!==w||p[7]!==v||p[8]!==S?(f=(0,i.jsx)("div",{className:S,children:(0,i.jsxs)(o.Gutter,{className:"".concat(c,"__wrap"),children:[(0,i.jsxs)("div",{className:"".concat(c,"__content"),children:[(0,i.jsx)("h1",{children:v("general:nothingFound")}),(0,i.jsx)("p",{children:v("general:sorryNotFound")})]}),(0,i.jsx)(o.Button,{className:"".concat(c,"__button"),el:"link",size:"large",to:w,children:v("general:backToDashboard")})]})}),p[6]=w,p[7]=v,p[8]=S,p[9]=f):f=p[9],f}},42309:(e,t,r)=>{"use strict";r.d(t,{t:()=>u});var n=r(16565);let i=["authentication:account","authentication:accountOfCurrentUser","authentication:accountVerified","authentication:alreadyActivated","authentication:alreadyLoggedIn","authentication:apiKey","authentication:authenticated","authentication:backToLogin","authentication:beginCreateFirstUser","authentication:changePassword","authentication:checkYourEmailForPasswordReset","authentication:confirmGeneration","authentication:confirmPassword","authentication:createFirstUser","authentication:emailNotValid","authentication:usernameNotValid","authentication:emailOrUsername","authentication:emailSent","authentication:emailVerified","authentication:enableAPIKey","authentication:failedToUnlock","authentication:forceUnlock","authentication:forgotPassword","authentication:forgotPasswordEmailInstru
15ctions","authentication:forgotPasswordUsernameInstructions","authentication:forgotPasswordQuestion","authentication:generate","authentication:generateNewAPIKey","authentication:generatingNewAPIKeyWillInvalidate","authentication:logBackIn","authentication:loggedOutInactivity","authentication:loggedOutSuccessfully","authentication:loggingOut","authentication:login","authentication:logOut","authentication:loggedIn","authentication:loggedInChangePassword","authentication:logout","authentication:logoutUser","authentication:logoutSuccessful","authentication:newAPIKeyGenerated","authentication:newPassword","authentication:passed","authentication:passwordResetSuccessfully","authentication:resetPassword","authentication:stayLoggedIn","authentication:successfullyRegisteredFirstUser","authentication:successfullyUnlocked","authentication:username","authentication:unableToVerify","authentication:tokenRefreshSuccessful","authentication:verified","authentication:verifiedSuccessfully","authentication:verify","authentication:verifyUser","authentication:youAreInactive","error:autosaving","error:correctInvalidFields","error:deletingTitle","error:emailOrPasswordIncorrect","error:usernameOrPasswordIncorrect","error:loadingDocument","error:invalidRequestArgs","error:invalidFileType","error:logoutFailed","error:noMatchedField","error:notAllowedToAccessPage","error:previewing","error:unableToDeleteCount","error:unableToReindexCollection","error:unableToUpdateCount","error:unauthorized","error:unauthorizedAdmin","error:unknown","error:unspecific","error:unverifiedEmail","error:userEmailAlreadyRegistered","error:usernameAlreadyRegistered","error:tokenNotProvided","error:unPublishingDocument","error:problemUploadingFile","fields:addLabel","fields:addLink","fields:addNew","fields:addNewLabel","fields:addRelationship","fields:addUpload","fields:block","fields:blocks","fields:blockType","fields:chooseBetweenCustomTextOrDocument","fields:customURL","fields:chooseDocumentToLink","fields:openInNewTab","fields:enterURL","fields:internalLink","fields:chooseFromExisting","fields:linkType","fields:textToDisplay","fields:collapseAll","fields:editLink","fields:editRelationship","fields:itemsAndMore","fields:labelRelationship","fields:latitude","fields:linkedTo","fields:longitude","fields:passwordsDoNotMatch","fields:removeRelationship","fields:removeUpload","fields:saveChanges","fields:searchForBlock","fields:selectFieldsToEdit","fields:showAll","fields:swapRelationship","fields:swapUpload","fields:toggleBlock","fields:uploadNewLabel","folder:byFolder","folder:browseByFolder","folder:deleteFolder","folder:folders","folder:folderName","folder:itemsMovedToFolder","folder:itemsMovedToRoot","folder:itemHasBeenMoved","folder:itemHasBeenMovedToRoot","folder:moveFolder","folder:movingFromFolder","folder:moveItemsToFolderConfirmation","folder:moveItemsToRootConfirmation","folder:moveItemToFolderConfirmation","folder:moveItemToRootConfirmation","folder:noFolder","folder:newFolder","folder:renameFolder","folder:searchByNameInFolder","folder:selectFolderForItem","general:all","general:aboutToDeleteCount","general:aboutToDelete","general:addBelow","general:addFilter","general:adminTheme","general:allCollections","general:and","general:anotherUser","general:anotherUserTakenOver","general:applyChanges","general:ascending","general:automatic","general:backToDashboard","general:cancel","general:changesNotSaved","general:close","general:collapse","general:collections","general:confirmMove","general:yes","general:no","general:columns","general:columnToSort","general:confirm","general:confirmCopy","general:confirmDeletion","general:confirmDuplication","general:confirmReindex","general:confirmReindexAll","general:confirmReindexDescription","general:confirmReindexDescriptionAll","general:copied","general:clearAll","general:copy","general:copyWarning","general:copying","general:create","general:created","general:createdAt","general:createNew","general:createNewLabel","general:creating","general:creatingNewLabel","general:currentlyEditing","general:custom","general:dark","general:dashboard","general:delete","general:deletedSuccessfully","general:deletedCountSuccessfully","general:deleting","general:descending","general:depth","general:deselectAllRows","general:document","general:documentLocked","general:documents","general:duplicate","general:duplicateWithoutSaving","general:edit","general:editAll","general:editing","general:editingLabel","general:editingTakenOver","general:editLabel","general:editedSince","general:email","general:emailAddress","general:enterAValue","general:error","general:errors","general:fallbackToDefaultLocale","general:false","general:filters","general:filterWhere","general:globals","general:goBack","general:isEditing","general:item","general:items","general:language","general:lastModified","general:leaveAnyway","general:leaveWithoutSaving","general:light","general:livePreview","general:loading","general:locale","general:locales","general:menu","general:moreOptions","general:move","general:moveConfirm","general:moveCount","general:moveDown","general:moveUp","general:moving","general:movingCount","general:name","general:next","general:noDateSelected","general:noFiltersSet","general:noLabel","general:none","general:noOptions","general:noResults","general:notFound","general:nothingFound","general:noUpcomingEventsScheduled","general:noValue","general:of","general:open","general:only","general:or","general:order","general:overwriteExistingData","general:pageNotFound","general:password","general:payloadSettings","general:perPage","general:previous","general:reindex","general:reindexingAll","general:remove","general:rename","general:reset","general:resetPreferences","general:resetPreferencesDescription","general:resettingPreferences","general:row","general:rows","general:save","general:schedulePublishFor","general:saving","general:searchBy","general:select","general:selectAll","general:selectAllRows","general:selectedCount","general:selectLabel","general:selectValue","general:showAllLabel","general:sorryNotFound","general:sort","general:sortByLabelDirection","general:stayOnThisPage","general:submissionSuccessful","general:submit","general:submitting","general:success","general:successfullyCreated","general:successfullyDuplicated","general:successfullyReindexed","general:takeOver","general:thisLanguage","general:time","general:timezone","general:titleDeleted","general:import","general:export","general:allLocales","general:true","general:upcomingEvents","general:users","general:user","general:username","general:unauthorized","general:unsavedChanges","general:unsavedChangesDuplicate","general:untitled","general:updatedAt","general:updatedLabelSuccessfully","general:updatedCountSuccessfully","general:updateForEveryone","general:updatedSuccessfully","general:updating","general:value","general:viewReadOnly","general:uploading","general:uploadingBulk","general:welcome","localization:localeToPublish","localization:copyToLocale","localization:copyFromTo","localization:selectLocaleToCopy","localization:cannotCopySameLocale","localization:copyFrom","localization:copyTo","operators:equals","operators:exists","operators:isNotIn","operators:isIn","operators:contains","operators:isLike","operators:isNotLike","operators:isNotEqualTo","operators:near","operators:isGreaterThan","operators:isLessThan","operators:isGreaterThanOrEqualTo","operators:isLessThanOrEqualTo","operators:within","operators:intersects","upload:addFile","upload:addFiles","upload:bulkUpload","upload:crop","upload:cropToolDescription","upload:dragAndDrop","upload:editImage","upload:fileToUpload","upload:filesToUpload","upload:focalPoint","upload:focalPointDescription","upload:height","upload:pasteURL","upload:previewSizes","upload:selectCollectionToBrowse","upload:selectFile","upload:setCropArea","upload:setFocalPoint","upload:sizesFor","upload:sizes","upload:width","upload:fileName","upload:fileSize","upload:noFile","upload:download","validation:emailAddress","validation:enterNumber","validation:fieldHasNo","validation:greaterThanMax","validation:invalidInput","validation:invalidSelection","validation:invalidSelections","validation:lessThanMin","validation:limitReached","validation:longerThanMin","validation:notValidDate","validation:required","validation:requiresAtLeast","validation:requiresNoMoreThan","validation:requiresTwoNumbers","validation:shorterThanMax","validation:trueOrFalse","validation:timezoneRequired","validation:username","validation:validUploadID","version:aboutToPublishSelection","version:aboutToRestore","ver
15sion:aboutToRestoreGlobal","version:aboutToRevertToPublished","version:aboutToUnpublish","version:aboutToUnpublishSelection","version:autosave","version:autosavedSuccessfully","version:autosavedVersion","version:versionAgo","version:moreVersions","version:changed","version:changedFieldsCount","version:confirmRevertToSaved","version:compareVersions","version:comparingAgainst","version:currentlyViewing","version:confirmPublish","version:confirmUnpublish","version:confirmVersionRestoration","version:currentDraft","version:currentPublishedVersion","version:currentlyPublished","version:draft","version:draftSavedSuccessfully","version:lastSavedAgo","version:modifiedOnly","version:noFurtherVersionsFound","version:noRowsFound","version:noRowsSelected","version:preview","version:previouslyPublished","version:previousVersion","version:problemRestoringVersion","version:publish","version:publishAllLocales","version:publishChanges","version:published","version:publishIn","version:publishing","version:restoreAsDraft","version:restoredSuccessfully","version:restoreThisVersion","version:restoring","version:reverting","version:revertToPublished","version:saveDraft","version:scheduledSuccessfully","version:schedulePublish","version:selectLocales","version:selectVersionToCompare","version:showLocales","version:specificVersion","version:status","version:type","version:unpublish","version:unpublishing","version:versionCreatedOn","version:versionID","version:version","version:versions","version:viewingVersion","version:viewingVersionGlobal","version:viewingVersions","version:viewingVersionsGlobal"],o=(e,t)=>"client"===t?function e(t){let r={};return Object.keys(t).sort().forEach(n=>{"object"==typeof t[n]?r[n]=e(t[n]):r[n]=t[n]}),r}(function e(t,r="",n){let i={};for(let[o,l]of Object.entries(t)){if("$schema"===o){i[o]=l;continue}if("object"==typeof l){let t=e(l,o,n);Object.keys(t).length>0&&(i[o]=t)}else for(let e of n){let[t,n]=e.split(":");r===t&&(o===n?i[n]=l:["zero","one","two","few","many","other"].forEach(e=>{o===`${n}_${e}`&&(i[`${n}_${e}`]=l)}))}}return i}(e.translations,"",i)):e.translations,l=({count:e,key:t,translations:r})=>{let n=t.split(":"),i="",o=n.reduce((t,r,o)=>{if("string"==typeof t)return t;"number"==typeof e&&(0===e&&`${r}_zero`in t?i="_zero":1===e&&`${r}_one`in t?i="_one":2===e&&`${r}_two`in t?i="_two":e>5&&`${r}_many`in t?i="_many":e>2&&e<=5&&`${r}_few`in t?i="_few":`${r}_other`in t&&(i="_other"));let l=r;if(o===n.length-1&&i&&(l=`${r}${i}`),t&&l in t)return t[l]},r);return o||console.log("key not found:",t),o||t},a=({translationString:e,vars:t})=>e.split(/(\{\{.*?\}\})/).map(e=>{if(!(e.startsWith("{{")&&e.endsWith("}}")))return e;{let r=t[e.substring(2,e.length-2).trim()];return null!=r?r:e}}).join("");function u({key:e,translations:t,vars:r}){let n=l({count:"number"==typeof r?.count?r.count:void 0,key:e,translations:t});return r&&(n=a({translationString:n,vars:r})),n||(n=e),n}let c=e=>{let{config:t,language:r,translations:n}=e,i=r&&t?.translations?.[r]?function e(t,r){let n={...t};for(let i in r)Object.prototype.hasOwnProperty.call(r,i)&&("object"==typeof r[i]&&!Array.isArray(r[i])&&t[i]?n[i]=e(t[i],r[i]):n[i]=r[i]);return n}(n,t.translations[r]):n;return{t:(e,t)=>u({key:e,translations:i,vars:t}),translations:i}};!function(e,t){let r=new Map}(async({config:e,context:t,language:r=e.fallbackLanguage})=>{if(!r||!e.supportedLanguages?.[r])throw Error(`Language ${r} not supported`);let i=o(e.supportedLanguages?.[r],t),{t:l,translations:a}=c({config:e,language:r||e.fallbackLanguage,translations:i}),u=e.supportedLanguages[r]?.dateFNSKey||"en-US";return{dateFNS:await (0,n.p)(u),dateFNSKey:u,fallbackLanguage:e.fallbackLanguage,language:r||e.fallbackLanguage,t:l,translations:a}},["language","context"])},42625:(e,t,r)=>{"use strict";r.d(t,{DocumentTabLink:()=>u});var n=r(19749),i=r(95155),o=r(92825),l=r(35695),a=r(6001);r(12115);let u=e=>{let t,r,u,c,d=(0,n.c)(19),{adminRoute:f,ariaLabel:p,baseClass:g,children:m,href:y,isActive:v,newTab:b}=e,_=(0,l.usePathname)(),w=(0,l.useParams)(),x=(0,l.useSearchParams)().get("locale"),[S,C,k]=w.segments||[],T="collections"===S,E="/".concat(T?"collections":"globals","/").concat(C);d[0]!==f||d[1]!==E?(t=(0,a.Q)({adminRoute:f,path:E}),d[0]=f,d[1]=E,d[2]=t):t=d[2];let N=t;T&&k&&(N+="/".concat(k));let P="".concat(N).concat(y),$="".concat(P).concat(x?"?locale=".concat(x):"");d[3]!==N||d[4]!==P||d[5]!==v||d[6]!==_?(r=P===N&&_===N||P!==N&&_.startsWith(P)||v,d[3]=N,d[4]=P,d[5]=v,d[6]=_,d[7]=r):r=d[7];let A=r,O=A&&"".concat(g,"--active");
15d[8]!==g||d[9]!==O?(u=[g,O].filter(Boolean),d[8]=g,d[9]=O,d[10]=u):u=d[10];let j=u.join(" "),M=A&&P===_?"div":"link",D=A&&P===_?void 0:$;return d[11]!==p||d[12]!==m||d[13]!==A||d[14]!==b||d[15]!==j||d[16]!==M||d[17]!==D?(c=(0,i.jsx)(o.Button,{"aria-label":p,buttonStyle:"tab",className:j,disabled:A,el:M,margin:!1,newTab:b,size:"medium",to:D,children:m}),d[11]=p,d[12]=m,d[13]=A,d[14]=b,d[15]=j,d[16]=M,d[17]=D,d[18]=c):c=d[18],c}},43030:(e,t,r)=>{"use strict";r.d(t,{x4:()=>l});let{isPlural:n,singular:i}=r(45646),o=e=>e.charAt(0).toUpperCase()+e.slice(1),l=(e,t=!1)=>{let r=(e||"").trim().split(/[\s-]/),n=[];return r.forEach(e=>{if(""!==e){let t=e.split(/(?=[A-Z])/).join(" ");n.push(o(t))}}),t?n.join("").replace(/\s/g,""):n.join(" ")}},43961:(e,t,r)=>{"use strict";r.d(t,{s:()=>n});let n=(e,t)=>{let r=(t=t||{}).delimiter||".",i=t.overwrite||!1,o=t.recursive||!1,l={};if(function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}(e)||"[object Object]"!==Object.prototype.toString.call(e))return e;let a=e=>{let r=Number(e);return isNaN(r)||-1!==e.indexOf(".")||t.object?e:r};return Object.keys(e).sort((e,t)=>e.length-t.length).forEach(u=>{let c=u.split(r),d=a(c.shift()),f=a(c[0]),p=l;for(;void 0!==f;){if("__proto__"===d)return;let e=Object.prototype.toString.call(p[d]),r="[object Object]"===e||"[object Array]"===e;if(!i&&!r&&void 0!==p[d])return;(!i||r)&&(i||null!=p[d])||(p[d]="number"!=typeof f||t.object?{}:[]),p=p[d],c.length>0&&(d=a(c.shift()),f=a(c[0]))}p[d]=o?n(e[u],t):e[u]}),l}},44134:(e,t,r)=>{"use strict";var n=r(57719),i=r(7610),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function l(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return d(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e){var n=e,i=t;if(("string"!=typeof i||""===i)&&(i="utf8"),!a.isEncoding(i))throw TypeError("Unknown encoding: "+i);var o=0|g(n,i),u=l(o),c=u.write(n,i);return c!==o&&(u=u.slice(0,c)),u}if(ArrayBuffer.isView(e))return f(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(A(e,ArrayBuffer)||e&&A(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(A(e,SharedArrayBuffer)||e&&A(e.buffer,SharedArrayBuffer)))return function(e,t,r){var n;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),a.prototype),n}(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var d=e.valueOf&&e.valueOf();if(null!=d&&d!==e)return a.from(d,t,r);var m=function(e){if(a.isBuffer(e)){var t=0|p(e.length),r=l(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||function(e){return e!=e}(e.length)?l(0):f(e):"Buffer"===e.type&&Array.isArray(e.data)?f(e.data):void 0}(e);if(m)return m;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return c(e),l(e<0?0:0|p(e))}function f(e){for(var t=e.length<0?0:0|p(e.length),r=l(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}t.hp=a,t.IS=50,a.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,r){return u(e,t,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,r){return(c(e),e<=0)?l(e):void 0!==t?"string"==typeof r?l(e).fill(t,r):l(e).fill(t):l(e)},a.allocUnsafe=function(e){return d(e)},a.allocUnsafeSlow=function(e){return d(e)};function p(e){if(e>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function g(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||A(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return E(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return P(e).length;default:if(i)return n?-1:E(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,r){var i,o,l,a=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=O[e[o]];return i}(this,t,r);case"utf8":case"utf-8":return _(this,t,r);case"ascii":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}(this,t,r);case"latin1":case"binary":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}(this,t,r);case"base64":return i=this,o=t,l=r,0===o&&l===i.length?n.fromByteArray(i):n.fromByteArray(i.slice(o,l));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}(this,t,r);default:if(a)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function v(e,t,r,n,i){var o;if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(o=r*=1)!=o&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length)if(i)return -1;else r=e.length-1;else if(r<0)if(!i)return -1;else r=0;if("string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"==typeof t){if(t&=255,"function"==typeof Uint8Array.prototype.indexOf)if(i)return Uint8Array.prototype.indexOf.call(e,t,r);else return Uint8Array.prototype.lastIndexOf.call(e,t,r);return b(e,[t],r,n,i)}throw TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){var o,l=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;l=2,a/=2,u/=2,r/=2}function c(e,t){return 1===l?e[t]:e.readUInt16BE(t*l)}if(i){var d=-1;for(o=r;o<a;o++)if(c(e,o)===c(t,-1===d?0:o-d)){if(-1===d&&(d=o),o-d+1===u)return d*l}else -1!==d&&(o-=o-d),d=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var f=!0,p=0;p<u;
vendor: 12,233 bytes, line 15
15p++)if(c(e,o+p)!==c(t,p)){f=!1;break}if(f)return o}return -1}a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(A(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),A(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:+(n<r)},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);if(void 0===t)for(r=0,t=0;r<e.length;++r)t+=e[r].length;var r,n=a.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(A(o,Uint8Array)&&(o=a.from(o)),!a.isBuffer(o))throw TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},a.byteLength=g,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},a.prototype.toString=function(){var e=this.length;return 0===e?"":0==arguments.length?_(this,0,e):m.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var e="",r=t.IS;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(a.prototype[o]=a.prototype.inspect),a.prototype.compare=function(e,t,r,n,i){if(A(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var o=i-n,l=r-t,u=Math.min(o,l),c=this.slice(n,i),d=e.slice(t,r),f=0;f<u;++f)if(c[f]!==d[f]){o=c[f],l=d[f];break}return o<l?-1:+(l<o)},a.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},a.prototype.indexOf=function(e,t,r){return v(this,e,t,r,!0)},a.prototype.lastIndexOf=function(e,t,r){return v(this,e,t,r,!1)};function _(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,l,a,u,c=e[i],d=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(d=c);break;case 2:(192&(o=e[i+1]))==128&&(u=(31&c)<<6|63&o)>127&&(d=u);break;case 3:o=e[i+1],l=e[i+2],(192&o)==128&&(192&l)==128&&(u=(15&c)<<12|(63&o)<<6|63&l)>2047&&(u<55296||u>57343)&&(d=u);break;case 4:o=e[i+1],l=e[i+2],a=e[i+3],(192&o)==128&&(192&l)==128&&(192&a)==128&&(u=(15&c)<<18|(63&o)<<12|(63&l)<<6|63&a)>65535&&u<1114112&&(d=u)}null===d?(d=65533,f=1):d>65535&&(d-=65536,n.push(d>>>10&1023|55296),d=56320|1023&d),n.push(d),i+=f}var p=n,g=p.length;if(g<=4096)return String.fromCharCode.apply(String,p);for(var m="",y=0;y<g;)m+=String.fromCharCode.apply(String,p.slice(y,y+=4096));return m}function w(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function x(e,t,r,n,i,o){if(!a.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw RangeError('"value" argument is out of bounds');if(r+n>e.length)throw RangeError("Index out of range")}function S(e,t,r,n,i,o){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function C(e,t,r,n,o){return t*=1,r>>>=0,o||S(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function k(e,t,r,n,o){return t*=1,r>>>=0,o||S(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}a.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,o,l,a,u,c,d,f,p=this.length-t;if((void 0===r||r>p)&&(r=p),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var g=!1;;)switch(n){case"hex":return function(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var l=0;l<n;++l){var a,u=parseInt(t.substr(2*l,2),16);if((a=u)!=a)break;e[r+l]=u}return l}(this,e,t,r);case"utf8":case"utf-8":return i=t,o=r,$(E(e,this.length-i),this,i,o);case"ascii":return l=t,a=r,$(N(e),this,l,a);case"latin1":case"binary":return function(e,t,r,n){return $(N(t),e,r,n)}(this,e,t,r);case"base64":return u=t,c=r,$(P(e),this,u,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return d=t,f=r,$(function(e,t){for(var r,n,i=[],o=0;o<e.length&&!((t-=2)<0);++o)n=(r=e.charCodeAt(o))>>8,i.push(r%256),i.push(n);return i}(e,this.length-d),this,d,f);default:if(g)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),g=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},a.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,a.prototype),n},a.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},a.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},a.prototype.readUInt8=function(e,t){return e>>>=0,t||w(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||w(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||w(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},a.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},a.prototype.readInt8=function(e,t){return(e>>>=0,t||w(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||w(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},a.prototype.readInt16BE=function(e,t){e>>>=0,t||w(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||w(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||w(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return e>>>=0,t||w(e,4,this.length),i.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||w(e,4,this.length),i.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||w(e,8,this.length),i.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||w(e,8,this.length),i.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;x(this,e,t,r,i,0)}var o=1,l=0;for(this[t]=255&e;++l<r&&(o*=256);)this[t+l]=e/o&255;return t+r},a.prototype.writeUIntBE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;x(this,e,t,r,i,0)}var o=r-1,l=1;for(this[t+o]=255&e;--o>=0&&(l*=256);)this[t+o]=e/l&255;return t+r},a.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUInt32BE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeIntLE=function(e,t,r,n){if(e*=1,t>>>=0,!n){var i=Math.pow(2,8*r-1);x(this,e,t,r,i-1,-i)}var o=0,l=1,a=0;for(this[t]=255&e;++o<r&&(l*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/l|0)-a&255;return t+r},a.prototype.writeIntBE=function(e,t,r,n){if(e*=1,t>>>=0,!n){var i=Math.pow(2,8*r-1);x(this,e,t,r,i-1,-i)}var o=r-1,l=1,a=0;for(this[t+o]=255&e;--o>=0&&(l*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/l|0)-a&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeFloatLE=function(e,t,r){return C(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return C(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return k(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return k(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,n){if(!a.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,n);else if(this===e&&r<t&&t<n)for(var o=i-1;o>=0;--o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return i},a.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){var i,o=e.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(e=o)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw RangeError("Out of range index");if(r<=t)return this;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var l=a.isBuffer(e)?e:a.from(e,n),u=l.length;
15if(0===u)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=l[i%u]}return this};var T=/[^+/0-9A-Za-z-_]/g;function E(e,t){t=t||1/0;for(var r,n=e.length,i=null,o=[],l=0;l<n;++l){if((r=e.charCodeAt(l))>55295&&r<57344){if(!i){if(r>56319||l+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function N(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function P(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(T,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function $(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function A(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var O=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},45024:(e,t,r)=>{"use strict";r.d(t,{MetaDescriptionComponent:()=>g});var n=r(95155),i=r(58028),o=r(87677),l=r(92825),a=r(78234),u=r(12115),c=r(56962),d=r(34564);let{maxLength:f,minLength:p}=c.N.description,g=e=>{let{field:{label:t,localized:r,maxLength:c,minLength:g,required:m},hasGenerateDescriptionFn:y,readOnly:v}=e,{config:{routes:{api:b},serverURL:_}}=(0,i.b)(),{t:w}=(0,o.d)(),x=(0,l.useLocale)(),{getData:S}=(0,l.useForm)(),C=(0,l.useDocumentInfo)(),{title:k}=(0,l.useDocumentTitle)(),T=c||f,E=g||p,{customComponents:{AfterInput:N,BeforeInput:P,Label:$}={},errorMessage:A,path:O,setValue:j,showError:M,value:D}=(0,l.useField)(),R=(0,u.useCallback)(async()=>{var e;if(!y)return;let t="".concat(_).concat(b,"/plugin-seo/generate-description"),r=await fetch(t,{body:JSON.stringify({id:C.id,collectionSlug:C.collectionSlug,doc:S(),docPermissions:C.docPermissions,globalSlug:C.globalSlug,hasPublishPermission:C.hasPublishPermission,hasSavePermission:C.hasSavePermission,initialData:C.initialData,initialState:(0,a.qg)(null!=(e=C.initialState)?e:{}),locale:"object"==typeof x?null==x?void 0:x.code:x,title:k}),credentials:"include",headers:{"Content-Type":"application/json"},method:"POST"}),{result:n}=await r.json();j(n||"")},[y,_,b,C.id,C.collectionSlug,C.docPermissions,C.globalSlug,C.hasPublishPermission,C.hasSavePermission,C.initialData,C.initialState,S,x,j,k]);return(0,n.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,n.jsxs)("div",{style:{marginBottom:"5px",position:"relative"},children:[(0,n.jsxs)("div",{className:"plugin-seo__field",children:[null!=$?$:(0,n.jsx)(l.FieldLabel,{label:t,localized:r,path:O,required:m}),y&&(0,n.jsxs)(u.Fragment,{children:["\xa0 â \xa0",(0,n.jsx)("button",{disabled:v,onClick:()=>{R()},style:{background:"none",backgroundColor:"transparent",border:"none",color:"currentcolor",cursor:"pointer",padding:0,textDecoration:"underline"},type:"button",children:w("plugin-seo:autoGenerate")})]})]}),(0,n.jsxs)("div",{style:{color:"#9A9A9A"},children:[w("plugin-seo:lengthTipDescription",{maxLength:T,minLength:E}),(0,n.jsx)("a",{href:"https://developers.google.com/search/docs/advanced/appearance/snippet#meta-descriptions",rel:"noopener noreferrer",target:"_blank",children:w("plugin-seo:bestPractices")})]})]}),(0,n.jsx)("div",{style:{marginBottom:"10px",position:"relative"},children:(0,n.jsx)(l.TextareaInput,{AfterInput:N,BeforeInput:P,Error:A,onChange:j,path:O,readOnly:v,required:m,showError:M,style:{marginBottom:0},value:D})}),(0,n.jsx)("div",{style:{alignItems:"center",display:"flex",width:"100%"},children:(0,n.jsx)(d.y,{maxLength:T,minLength:E,text:D})})]})}},45064:(e,t,r)=>{"use strict";r.d(t,{d:()=>o});var n=r(14994),i=r(43961);let o=(e,t)=>{let r;if(!e)return null;if(-1===t.indexOf("."))return(0,n.r)(e,!0);let o={},l=t.split(".");return r=Number.isNaN(Number(l[l.length-1]))?t.substring(0,t.lastIndexOf(".")+1):`${t}.`,Object.keys(e).forEach(t=>{e[t]?.disableFormData||0!==t.indexOf(r)||(o[t.replace(r,"")]=e[t]?.value)}),(0,i.s)(o)}},45280:(e,t,r)=>{"use strict";r.d(t,{a:()=>i});var n=r(95155);r(12115);let i=e=>{let{backgroundColor:t,color:r,label:i}=e;return(0,n.jsx)("div",{style:{backgroundColor:t,borderRadius:"2px",color:r,flexShrink:0,lineHeight:1,marginRight:"10px",padding:"4px 6px",whiteSpace:"nowrap"},children:(0,n.jsx)("small",{children:i})})}}
15,45646:function(e){e.exports=function(){var e=[],t=[],r={},n={},i={};function o(e){return"string"==typeof e?RegExp("^"+e+"$","i"):e}function l(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function a(e,t,n){if(!e.length||r.hasOwnProperty(e))return t;for(var i=n.length;i--;){var o=n[i];if(o[0].test(t))return function(e,t){return e.replace(t[0],function(r,n){var i,o,a=(i=t[1],o=arguments,i.replace(/\$(\d{1,2})/g,function(e,t){return o[t]||""}));return""===r?l(e[n-1],a):l(r,a)})}(t,o)}return t}function u(e,t,r){return function(n){var i=n.toLowerCase();return t.hasOwnProperty(i)?l(n,i):e.hasOwnProperty(i)?l(n,e[i]):a(i,n,r)}}function c(e,t,r,n){return function(n){var i=n.toLowerCase();return!!t.hasOwnProperty(i)||!e.hasOwnProperty(i)&&a(i,i,r)===i}}function d(e,t,r){var n=1===t?d.singular(e):d.plural(e);return(r?t+" ":"")+n}return d.plural=u(i,n,e),d.isPlural=c(i,n,e),d.singular=u(n,i,t),d.isSingular=c(n,i,t),d.addPluralRule=function(t,r){e.push([o(t),r])},d.addSingularRule=function(e,r){t.push([o(e),r])},d.addUncountableRule=function(e){if("string"==typeof e){r[e.toLowerCase()]=!0;return}d.addPluralRule(e,"$0"),d.addSingularRule(e,"$0")},d.addIrregularRule=function(e,t){t=t.toLowerCase(),i[e=e.toLowerCase()]=t,n[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(e){return d.addIrregularRule(e[0],e[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(e){return d.addPluralRule(e[0],e[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEac
15h(function(e){return d.addSingularRule(e[0],e[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(d.addUncountableRule),d}()},46037:(e,t,r)=>{"use strict";r.d(t,{g:()=>u});var n=r(30889),i=r(94271),o=r(92749),l=r(32532),a=r(12115);function u({newTab:e=!0,disabled:t=!1}){let[r]=(0,i.DF)();return(0,a.useEffect)(()=>{let i=i=>{let a=i.target;if(!(0,l.vAA)(a))return;let u=(0,l.scG)(a);if(null===u)return;let c=null,d=null;if(u.update(()=>{let e=(0,l.xL4)(a);if(null!==e){let r=(0,o.Bt)(e,l.ff4);if(!t)if((0,n.FJ)(r))c=r.sanitizeUrl(r.getURL()),d=r.getTarget();else{let e=function(e,t){let r=e;for(;null!=r;){if(t(r))return r;r=r.parentNode}return null}(a,l.nYP);null!==e&&(c=e.href,d=e.target)}}}),null===c||""===c)return;let f=r.getEditorState().read(l.vJq);if((0,l.I2P)(f)&&!f.isCollapsed())return void i.preventDefault();let p="auxclick"===i.type&&1===i.button;window.open(c,e||p||i.metaKey||i.ctrlKey||"_blank"===d?"_blank":"_self"),i.preventDefault()},a=e=>{1===e.button&&i(e)};return r.registerRootListener((e,t)=>{null!==t&&(t.removeEventListener("click",i),t.removeEventListener("mouseup",a)),null!==e&&(e.addEventListener("click",i),e.addEventListener("mouseup",a))})},[r,e,t]),null}},46205:(e,t,r)=>{"use strict";r.d(t,{A:()=>v});var n=r(88849),i=r(6652);let o=Object.prototype.hasOwnProperty,l={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},a=Array.isArray,u=Array.prototype.push,c=function(e,t){u.apply(e,a(t)?t:[t])},d=Date.prototype.toISOString,f=i.Ay,p={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:n.lF,encodeValuesOnly:!1,format:f,formatter:i._J[f],indices:!1,serializeDate:function(e){return d.call(e)},skipNulls:!1,strictNullHandling:!1},g={},m=function(e,t,r,i,o,l,u,d,f,y,v,b,_,w,x,S,C,k){var T;let E,N=e,P=k,$=0,A=!1;for(;void 0!==(P=P.get(g))&&!A;){let t=P.get(e);if($+=1,void 0!==t)if(t===$)throw RangeError("Cyclic object value");else A=!0;void 0===P.get(g)&&($=0)}if("function"==typeof y?N=y(t,N):N instanceof Date?N=_(N):"comma"===r&&a(N)&&(N=n.F7(N,function(e){return e instanceof Date?_(e):e})),null===N){if(l)return f&&!S?f(t,p.encoder,C,"key",w):t;N=""}if("string"==typeof(T=N)||"number"==typeof T||"boolean"==typeof T||"symbol"==typeof T||"bigint"==typeof T||n.Pe(N))return f?[x(S?t:f(t,p.encoder,C,"key",w))+"="+x(f(N,p.encoder,C,"value",w))]:[x(t)+"="+x(String(N))];let O=[];if(void 0===N)return O;if("comma"===r&&a(N))S&&f&&(N=n.F7(N,f)),E=[{value:N.length>0?N.join(",")||null:void 0}];else if(a(y))E=y;else{let e=Object.keys(N);E=v?e.sort(v):e}let j=d?t.replace(/\./g,"%2E"):t,M=i&&a(N)&&1===N.length?j+"[]":j;if(o&&a(N)&&0===N.length)return M+"[]";for(let t=0;t<E.length;++t){let n=E[t],p="object"==typeof n&&void 0!==n.value?n.value:N[n];if(u&&null===p)continue;let T=b&&d?n.replace(/\./g,"%2E"):n,P=a(N)?"function"==typeof r?r(M,T):M:M+(b?"."+T:"["+T+"]");k.set(e,$);let A=new WeakMap;A.set(g,k),c(O,m(p,P,r,i,o,l,u,d,"comma"===r&&S&&a(N)?null:f,y,v,b,_,w,x,S,C,A))}return O},y=function(e){let t;if(!e)return p;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
15if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw TypeError("Encoder has to be a function.");let r=e.charset||p.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");let n=i.Ay;if(void 0!==e.format){if(!o.call(i._J,e.format))throw TypeError("Unknown format option provided.");n=e.format}let u=i._J[n],c=p.filter;if(("function"==typeof e.filter||a(e.filter))&&(c=e.filter),t=e.arrayFormat in l?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":p.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw TypeError("`commaRoundTrip` must be a boolean, or absent");let d=void 0===e.allowDots?!0===e.encodeDotInKeys||p.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:p.addQueryPrefix,allowDots:d,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:p.allowEmptyArrays,arrayFormat:t,charset:r,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:p.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:void 0===e.delimiter?p.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:p.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:p.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:p.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:p.encodeValuesOnly,filter:c,format:n,formatter:u,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:p.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:p.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:p.strictNullHandling}};function v(e,t){let r,n,i=e,o=y(t);"function"==typeof o.filter?i=(0,o.filter)("",i):a(o.filter)&&(r=o.filter);let u=[];if("object"!=typeof i||null===i)return"";let d=l[o.arrayFormat],f="comma"===d&&o.commaRoundTrip;r||(r=Object.keys(i)),o.sort&&r.sort(o.sort);let p=new WeakMap;for(let e=0;e<r.length;++e){let t=r[e];o.skipNulls&&null===i[t]||c(u,m(i[t],t,d,f,o.allowEmptyArrays,o.strictNullHandling,o.skipNulls,o.encodeDotInKeys,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,p))}let g=u.join(o.delimiter),v=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?v+="utf8=%26%2310003%3B&":v+="utf8=%E2%9C%93&"),g.length>0?v+g:""}},46383:(e,t,r)=>{"use strict";r.d(t,{a:()=>n});var n=(0,r(32532).guI)("INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND")},46502:(e,t,r)=>{"use strict";function n(e,t="and"){return 0===e.length?{}:{[t]:e.filter(e=>!!e&&"object"==typeof e&&!!(Object.keys(e).length>0))}}r.d(t,{h:()=>n})},47075:(e,t,r)=>{"use strict";r.d(t,{NavHamburger:()=>l});var n=r(19749),i=r(95155),o=r(92825);r(12115);let l=()=>{let e,t=(0,n.c)(2),{navOpen:r}=(0,o.useNav)();return t[0]!==r?(e=(0,i.jsx)(o.Hamburger,{closeIcon:"collapse",isActive:r}),t[0]=r,t[1]=e):e=t[1],e}},47134:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}}},47469:(e,t,r)=>{"use strict";let n;r.d(t,{a:()=>p,b:()=>g,c:()=>U,d:()=>eo,e:()=>el,f:()=>m,g:()=>y,h:()=>x,i:()=>T,j:()=>E,k:()=>N,l:()=>P});var i=r(19749),o=r(12115),l=r(95155),a=r(94271),u=r(92749),c=r(32532),d=r(70893),f=r(62002),p="u">typeof window&&"u">typeof window.document&&"u">typeof window.document.createElement;function g(e){let t=(0,i.c)(2),r=void 0===e?500:e,n=(0,o.useRef)(void 0),l;return t[0]!==r?(l=e=>new Promise(t=>{let i=()=>{e(),t()};"requestIdleCallback"in window?("cancelIdleCallback"in window&&void 0!==n.current&&cancelIdleCallback(n.current),n.current=requestIdleCallback(i,{timeout:r})):new Promise(e=>{setTimeout(e,100),requestAnimationFrame(()=>{setTimeout(e,0)})}).then(i)}),t[0]=r,t[1]=l):l=t[1],l}var m=class{_x;_y;constructor(e,t){this._x=e,this._y=t}calcDeltaXTo({x:e}){return this.x-e}calcDeltaYTo({y:e}){return this.y-e}calcDistanceTo(e){return Math.sqrt(Math.pow(this.calcDeltaXTo(e),2)+Math.pow(this.calcDeltaYTo(e),2))}calcHorizontalDistanceTo(e){return Math.abs(this.calcDeltaXTo(e))}calcVerticalDistance(e){return Math.abs(this.calcDeltaYTo(e))}equals({x:e,y:t}){return this.x===e&&this.y===t}get x(){return this._x}get y(){return this._y}};function y(e){return e instanceof m}var v=e=>{let t=document.getElementById("slash-menu");if(!t)return;let r=t.getBoundingClientRect();r.top+r.height>window.innerHeight&&t.scrollIntoView({block:"center"}),r.top<0&&t.scrollIntoView({block:"center"}),e.scrollIntoView({block:"nearest"})};function b(e,t){let r=e.getBoundingClientRect(),n=t.getBoundingClientRect();return r.top>n.top&&r.top<n.bottom}var _=(0,c.guI)("SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND");function w({anchorElementRef:e,close:t,editor:r,groups:n,menuRenderFn:i,resolution:l,shouldSplitNodeWithQuery:a=!1}){let[d,f]=(0,o.useState)(null),p=l.match&&l.match.matchingString||"",g=(0,o.useCallback)(e=>{let t=r.getRootElement();null!==t&&(t.setAttribute("aria-activedescendant",`slash-menu-popup__item-${e.key}`),f(e.key))},[r]),m=(0,o.useCallback)(()=>
15{if(null!==n&&null!=p){let e=n.flatMap(e=>e.items);e.length&&g(e[0])}},[n,g,p]);(0,o.useEffect)(()=>{m()},[p,m]);let y=(0,o.useCallback)(e=>{t(),r.update(()=>{let e=null!=l.match&&a?function(e){let t,r=(0,c.vJq)();if(!(0,c.I2P)(r)||!r.isCollapsed())return;let n=r.anchor;if("text"!==n.type)return;let i=n.getNode();if(!i.isSimpleText())return;let o=n.offset,l=i.getTextContent().slice(0,o),a=e.replaceableString.length,u=o-function(e,t,r){let n=r;for(let r=n;r<=t.length;r++)e.substring(e.length-r)===t.substring(0,r)&&(n=r);return n}(l,e.matchingString,a);if(!(u<0))return 0===u?[t]=i.splitText(o):[,t]=i.splitText(u,o),t}(l.match):null;e&&e.remove()}),setTimeout(()=>{let t;r.read(()=>{t=(0,c.vJq)()?.clone()}),r.update(()=>{t&&(0,c.n1P)(t)}),e.onSelect({editor:r,queryString:l.match?l.match.matchingString:""})},0)},[r,a,l.match,t]);return(0,o.useEffect)(()=>()=>{let e=r.getRootElement();null!==e&&e.removeAttribute("aria-activedescendant")},[r]),(0,o.useLayoutEffect)(()=>{null===n?f(null):null===d&&m()},[n,d,g,m]),(0,o.useEffect)(()=>(0,u.Sd)(r.registerCommand(_,({item:e})=>!!e.ref&&null!=e.ref.current&&(v(e.ref.current),!0),c.AcJ)),[r,g]),(0,o.useEffect)(()=>(0,u.Sd)(r.registerCommand(c.bbF,e=>{if(null!==n&&n.length&&null!==d){let t=n.flatMap(e=>e.items),i=t.findIndex(e=>e.key===d),o=i!==t.length-1?i+1:0,l=t[o];if(!l)return!1;g(l),null!=l.ref&&l.ref.current&&r.dispatchCommand(_,{index:o,item:l}),e.preventDefault(),e.stopImmediatePropagation()}return!0},c.AcJ),r.registerCommand(c.UDz,e=>{if(null!==n&&n.length&&null!==d){let t=n.flatMap(e=>e.items),r=t.findIndex(e=>e.key===d),i=0!==r?r-1:t.length-1,o=t[i];if(!o)return!1;g(o),null!=o.ref&&o.ref.current&&v(o.ref.current),e.preventDefault(),e.stopImmediatePropagation()}return!0},c.AcJ),r.registerCommand(c.Q$N,e=>(e.preventDefault(),e.stopImmediatePropagation(),t(),!0),c.AcJ),r.registerCommand(c.OXk,e=>{if(null===n||null===d)return!1;let t=n.flatMap(e=>e.items).find(e=>e.key===d);return!!t&&(e.preventDefault(),e.stopImmediatePropagation(),y(t),!0)},c.AcJ),r.registerCommand(c.RTo,e=>{if(null===n||null===d)return!1;let t=n.flatMap(e=>e.items).find(e=>e.key===d);return!!t&&(null!==e&&(e.preventDefault(),e.stopImmediatePropagation()),y(t),!0)},c.AcJ)),[y,t,r,n,d,g]),i(e,(0,o.useMemo)(()=>({groups:n,selectedItemKey:d,selectItemAndCleanUp:y,setSelectedItemKey:f}),[y,d,n]),l.match?l.match.matchingString:"")}var x="\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'\"~=<>_:;";function S(e,t,r){let n=(0,c.peL)(r);if(null===n||!n.isCollapsed)return!1;let i=n.anchorNode,o=n.anchorOffset;if(null==i||null==o)return!1;try{t.setStart(i,e),t.setEnd(i,o>1?o:1)}catch{return!1}return!0}function C(e,t){return 0===t&&e.getEditorState().read(()=>{let e=(0,c.vJq)();if((0,c.I2P)(e)){let t=e.anchor.getNode().getPreviousSibling();return(0,c.kFe)(t)&&t.isTextEntity()}return!1})}function k(e){o.startTransition?o.startTransition(e):e()}var T=(0,c.guI)("ENABLE_SLASH_MENU_COMMAND");function E(e){let t,r,n,d=(0,i.c)(30),{anchorClassName:f,anchorElem:g,groups:m,menuRenderFn:y,onClose:v,onOpen:_,onQueryChange:x,triggerFn:E}=e,[N]=(0,a.DF)(),[P,$]=(0,o.useState)(null),A=function(e,t,r,n){let l,u=(0,i.c)(14),[c]=(0,a.DF)(),d;u[0]===Symbol.for("react.memo_cache_sentinel")?(d=p?document.createElement("div"):null,u[0]=d):d=u[0];let f=(0,o.useRef)(d),g;u[1]!==e||u[2]!==n||u[3]!==c||u[4]!==t?(g=()=>{if(null===f.current||void 0===parent)return;let r=c.getRootElement(),i=f.current,o=i.firstChild;if(null!==r&&null!==t){let{height:l,width:a}=t.getRect(),{left:u,top:c}=t.getRect(),d=c;if(c-=e.getBoundingClientRect().top+window.scrollY,u-=e.getBoundingClientRect().left+window.scrollX,i.style.left=`${u+window.scrollX}px`,i.style.height=`${l}px`,i.style.width=`${a}px`,null!==o){let e=o.getBoundingClientRect(),t=e.height,n=e.width,a=r.getBoundingClientRect();u+n>a.right&&(i.style.left=`${a.right-n+window.scrollX}px`),d+t+32>window.innerHeight&&!(d<0)?i.style.top=`${c+32-t+window.scrollY-(l+24)}px`:i.style.top=`${c+window.scrollY+32}px`}i.isConnected||(null!=n&&(i.className=n),i.setAttribute("aria-label","Slash menu"),i.setAttribute("role","listbox"),i.style.display="block",i.style.position="absolute",e.append(i)),i.setAttribute("id","slash-menu"),f.current=i,r.setAttribute("aria-controls","slash-menu")}},u[1]=e,u[2]=n,u[3]=c,u[4]=t,u[5]=g):g=u[5];let m=g,y,v;return u[6]!==c||u[7]!==m||u[8]!==t?(y=()=>{let e=c.getRootElement();if(null!==t)return m(),()=>{null!==e&&e.removeAttribute("aria-controls");let t=f.current;null!==t&&t.isConnected&&(t.remove(),t.removeAttribute("id"))}},v=[c,m,t],u[6]=c,u[7]=m,u[8]=t,u[9]=y,u[10]=v):(y=u[9],v=u[10]),(0,o.useEffect)(y,v),u[11]!==t||u[12]!==r?(l=e=>{null!==t&&(e||r(null))},u[11]=t,u[12]=r,u[13]=l):l=u[13],function(e,t,r,n){let l,u=(0,i.c)(12),[c]=(0,a.DF)(),d;u[0]!==c||u[1]!==r||u[2]!==n||u[3]!==e||u[4]!==t.current?(d=()=>{let i=t.current;if(null!=i&&null!=e){let e=c.getRootElement(),t=null!=e?function(e,t){let r=getComputedStyle(e),n="absolute"===r.position,i=t?/(auto|scroll|hidden)/:/(auto|scroll)/;if("fixed"===r.position)return document.body;for(let t=e;t=t.parentElement;)if(r=getComputedStyle(t),!(n&&"static"===r.position)&&i.test(r.overflow+r.overflowY+r.overflowX))return t;return document.body}(e,!1):document.body,o=!1,l=b(i,t),a=function(){o||(window.requestAnimationFrame(function(){r(),o=!1}),o=!0);let e=b(i,t);e!==l&&(l=e,n?.(e))},u=new ResizeObserver(r);return window.addEventListener("resize",r),document.addEventListener("scroll",a,{capture:!0,passive:!0}),u.observe(i),()=>{u.disconnect(),window.removeEventListener("resize",r),document.removeEventListener("scroll",a,!0)}}},u[0]=c,u[1]=r,u[2]=n,u[3]=e,u[4]=t.current,u[5]=d):d=u[5],u[6]!==c||u[7]!==r||u[8]!==n||u[9]!==e||u[10]!==t?(l=[c,n,r,e,t],u[6]=c,u[7]=r,u[8]=n,u[9]=e,u[10]=t,u[11]=l):l=u[11],(0,o.useEffect)(d,l)}(t,f,m,l),f}(g,P,$,f),O;d[0]!==v||d[1]!==P?(O=()=>{$(null),null!=v&&null!==P&&v()},d[0]=v,d[1]=P,d[2]=O):O=d[2];let j=O,M;d[3]!==_||d[4]!==P?(M=e=>{$(e),null!=_&&null===P&&_(e)},d[3]=_,d[4]=P,d[5]=M):M=d[5];let D=M,R,I;return d[6]!==N||d[7]!==D?(R=()=>(0,u.Sd)(N.registerCommand(T,e=>{let{node:t}=e;return N.getEditorState().read(()=>{let e={leadOffset:0,matchingString:"",replaceableString:""};if(!C(N,e.leadOffset)&&null!==t){let t=N._window??window,r=t.document.createRange();null!==S(e.leadOffset,r,t)&&k(()=>D({getRect:()=>r.getBoundingClientRect(),match:e}));return}}),!0},c.AcJ)),I=[N,D],d[6]=N,d[7]=D,d[8]=R,d[9]=I):(R=d[8],I=d[9]),(0,o.useEffect)(R,I),d[10]!==j||d[11]!==N||d[12]!==x||d[13]!==D||d[14]!==E?(t=()=>{let e=N.registerUpdateListener(()=>{N.getEditorState().read(()=>{let e,t=N._window??window,r=t.document.createRange(),n=(0,c.vJq)(),i=(N.getEditorState().read(()=>{let t=(0,c.vJq)();(0,c.I2P)(t)&&(e=function(e){let t=e.anchor;if("text"!==t.type)return null;let r=t.getNode();if(!r.isSimpleText())return null;let n=t.offset;return r.getTextContent().slice(0,n)}(t))}),e);
15if(!(0,c.I2P)(n)||!n.isCollapsed()||void 0===i||null===r)return void j();let o=E({editor:N,query:i});if(x(o?o.matchingString:null),null!==o&&!C(N,o.leadOffset)&&null!==S(o.leadOffset,r,t))return void k(()=>D({getRect:()=>r.getBoundingClientRect(),match:o}));j()})});return()=>{e()}},d[10]=j,d[11]=N,d[12]=x,d[13]=D,d[14]=E,d[15]=t):t=d[15],d[16]!==j||d[17]!==N||d[18]!==x||d[19]!==D||d[20]!==P||d[21]!==E?(r=[N,E,x,P,j,D],d[16]=j,d[17]=N,d[18]=x,d[19]=D,d[20]=P,d[21]=E,d[22]=r):r=d[22],(0,o.useEffect)(t,r),d[23]!==A||d[24]!==j||d[25]!==N||d[26]!==m||d[27]!==y||d[28]!==P?(n=null===A.current||null===P||null===N?null:(0,l.jsx)(w,{anchorElementRef:A,close:j,editor:N,groups:m,menuRenderFn:y,resolution:P,shouldSplitNodeWithQuery:!0}),d[23]=A,d[24]=j,d[25]=N,d[26]=m,d[27]=y,d[28]=P,d[29]=n):n=d[29],n}var N=class e{_bottom;_left;_right;_top;constructor(e,t,r,n){let[i,o]=t<=n?[t,n]:[n,t],[l,a]=e<=r?[e,r]:[r,e];this._top=i,this._right=a,this._left=l,this._bottom=o}static fromDOM(t){let{height:r,left:n,top:i,width:o}=t.getBoundingClientRect();return e.fromLWTH(n,o,i,r)}static fromDOMRect(t){let{height:r,left:n,top:i,width:o}=t;return e.fromLWTH(n,o,i,r)}static fromLTRB(t,r,n,i){return new e(t,r,n,i)}static fromLWTH(t,r,n,i){return new e(t,n,t+r,n+i)}static fromPoints(t,r){let{x:n,y:i}=t,{x:o,y:l}=r;return e.fromLTRB(n,i,o,l)}contains(e){if(y(e)){let{x:t,y:r}=e,n=r<this._top,i=r>this._bottom,o=t<this._left,l=t>this._right;return{reason:{isOnBottomSide:i,isOnLeftSide:o,isOnRightSide:l,isOnTopSide:n},result:!n&&!i&&!o&&!l}}let{bottom:t,left:r,right:n,top:i}=e;return i>=this._top&&i<=this._bottom&&t>=this._top&&t<=this._bottom&&r>=this._left&&r<=this._right&&n>=this._left&&n<=this._right}distanceFromPoint(e){let t=this.contains(e);if(t.result)return{distance:0,isOnBottomSide:t.reason.isOnBottomSide,isOnLeftSide:t.reason.isOnLeftSide,isOnRightSide:t.reason.isOnRightSide,isOnTopSide:t.reason.isOnTopSide};let r=0,n=0;return e.x<this._left?r=this._left-e.x:e.x>this._right&&(r=e.x-this._right),e.y<this._top?n=this._top-e.y:e.y>this._bottom&&(n=e.y-this._bottom),{distance:Math.sqrt(r*r+n*n),isOnBottomSide:e.y>this._bottom,isOnLeftSide:e.x<this._left,isOnRightSide:e.x>this._right,isOnTopSide:e.y<this._top}}equals({bottom:e,left:t,right:r,top:n}){return n===this._top&&e===this._bottom&&t===this._left&&r===this._right}generateNewRect({bottom:t=this.bottom,left:r=this.left,right:n=this.right,top:i=this.top}){return new e(r,i,n,t)}intersectsWith(e){let{height:t,left:r,top:n,width:i}=e,{height:o,left:l,top:a,width:u}=this;return(r+i>=l+u?r+i:l+u)-(r<=l?r:l)<=i+u&&(n+t>=a+o?n+t:a+o)-(n<=a?n:a)<=t+o}get bottom(){return this._bottom}get height(){return Math.abs(this._bottom-this._top)}get left(){return this._left}get right(){return this._right}get top(){return this._top}get width(){return Math.abs(this._left-this._right)}};function P({editorConfig:e}){return function({nodes:e}){return e.map(e=>"node"in e?e.node:e)}({nodes:e.features.nodes})}function $(e){return(t,r)=>(0,f.Pi)(t)&&t.getTag()==="h"+e?"#".repeat(e)+" "+r(t):null}function A(e,t){let r={};for(let n of e){let e=t(n);e&&(r[e]?r[e].push(n):r[e]=[n])}return r}function O(e){let t=A(e,e=>e.type);return{element:t.element||[],multilineElement:t["multiline-element"]||[],textFormat:t["text-format"]||[],textMatch:t["text-match"]||[]}}$(1),$(2),$(3),$(4),$(5),$(6);var j=/[!-/:-@[-`{-~\s]/,M=/^\s{0,3}$/;function D(e){if(!(0,c.bSg)(e))return!1;let t=e.getFirstChild();return null==t||1===e.getChildrenSize()&&(0,c.kFe)(t)&&M.test(t.getTextContent())}function R(e,t,r,n,i){let o=[],l=e.getChildren();n||(n=[]),i||(i=[]);t:for(let e of l){for(let l of r){if(!l.export)continue;let a=l.export(e,e=>R(e,t,r,n,[...i,...n]),(e,r)=>I(e,r,t,n,i));if(null!=a){o.push(a);continue t}}(0,c.wH$)(e)?o.push(` 16`):(0,c.kFe)(e)?o.push(I(e,e.getTextContent(),t,n,i)):(0,c.ff4)(e)?o.push(R(e,t,r,n,i)):(0,c.Cyw)(e)&&o.push(e.getTextContent())}return o.join("")}function I(e,t,r,n,i){let o=t.trim(),l=o;e.hasFormat("code")||(l=l.replace(/([*_`~\\])/g,"\\$1"));let a="",u="",c="",d=F(e,!0),f=F(e,!1),p=new Set;for(let t of r){let r=t.format[0],i=t.tag;L(e,r)&&!p.has(r)&&(p.add(r),L(d,r)&&n.find(e=>e.tag===i)||(n.push({format:r,tag:i}),a+=i))}for(let t=0;t<n.length;t++){let r=n[t],o=L(e,r.format),l=L(f,r.format);if(o&&l)continue;let a=[...n];for(;a.length>t;){let e=a.pop();i&&e&&i.find(t=>t.tag===e.tag)||(e&&"string"==typeof e.tag&&(o?l||(c+=e.tag):u+=e.tag),n.pop())}break}return l=a+l+c,u+t.replace(o,()=>l)}function F(e,t){let r=t?e.getPreviousSibling():e.getNextSibling();if(!r){let n=e.getParentOrThrow();n.isInline()&&(r=t?n.getPreviousSibling():n.getNextSibling())}for(;r;){if((0,c.ff4)(r)){if(!r.isInline())break;let e=t?r.getLastDescendant():r.getFirstDescendant();if((0,c.kFe)(e))return e;r=t?r.getPreviousSibling():r.getNextSibling()}if((0,c.kFe)(r))return r;if(!(0,c.ff4)(r))break}return null}function L(e,t){return(0,c.kFe)(e)&&e.hasFormat(t)}function B(e,t,r){let n=r.length;for(let i=t;i>=n;i--){let t=i-n;
16if(z(e,t,r,0,n)&&" "!==e[t+n])return t}return -1}function z(e,t,r,n,i){for(let o=0;o<i;o++)if(e[t+o]!==r[n+o])return!1;return!0}function U(e,t=ei){let r=O(t),n=A(r.textFormat,({tag:e})=>e[e.length-1]),i=A(r.textMatch,({trigger:e})=>e);for(let r of t){let t=r.type;if("element"===t||"text-match"===t||"multiline-element"===t){for(let t of r.dependencies)if(!e.hasNode(t))throw Error("MarkdownShortcuts: missing dependency %s for transformer. Ensure node dependency is included in editor initial config."+t.getType())}}let o=(e,t,o)=>{(function(e,t,r,n){let i=e.getParent();if(!(0,c.IqF)(i)||e.getFirstChild()!==t)return!1;let o=t.getTextContent();if(" "!==o[r-1])return!1;for(let{regExp:i,replace:l}of n){let n=o.match(i);if(n&&n[0].length===(n[0].endsWith(" ")?r:r-1)){let i=t.getNextSiblings(),[o,a]=t.splitText(r);if(o?.remove(),!1!==l(e,a?[a,...i]:i,n,!1))return!0}}return!1})(e,t,o,r.element)||function(e,t,r,n){let i=e.getParent();if(!(0,c.IqF)(i)||e.getFirstChild()!==t)return!1;let o=t.getTextContent();if(" "!==o[r-1])return!1;for(let{regExpEnd:i,regExpStart:l,replace:a}of n){if(i&&!("optional"in i)||i&&"optional"in i&&!i.optional)continue;let n=o.match(l);if(n&&n[0].length===(n[0].endsWith(" ")?r:r-1)){let i=t.getNextSiblings(),[o,l]=t.splitText(r);if(o?.remove(),!1!==a(e,l?[l,...i]:i,n,null,null,!1))return!0}}return!1}(e,t,o,r.multilineElement)||function(e,t,r){let n=e.getTextContent(),i=r[n[t-1]];if(null==i)return!1;for(let r of(t<n.length&&(n=n.slice(0,t)),i)){if(!r.replace||!r.regExp)continue;let t=n.match(r.regExp);if(null===t)continue;let i=t.index||0,o=i+t[0].length,l;return 0===i?[l]=e.splitText(o):[,l]=e.splitText(i,o),l&&(l.selectNext(0,0),r.replace(l,t)),!0}return!1}(t,o,i)||function(e,t,r){let n=e.getTextContent(),i=t-1,o=n[i],l=r[o];if(l)for(let t of l){let{tag:r}=t,l=r.length,a=i-l+1;if(l>1&&!z(n,a,r,0,l)||" "===n[a-1])continue;let u=n[i+1];if(!1===t.intraword&&u&&!j.test(u))continue;let d=e,f=B(n,a,r),p=d;for(;f<0&&(p=p.getPreviousSibling())&&!(0,c.wH$)(p);)if((0,c.kFe)(p)){let e=p.getTextContent();d=p,f=B(e,e.length,r)}if(f<0||d===e&&f+l===a)continue;let g=d.getTextContent();if(f>0&&g[f-1]===o)continue;let m=g[f-1];if(!1===t.intraword&&m&&!j.test(m))continue;let y=e.getTextContent(),v=y.slice(0,a)+y.slice(i+1);e.setTextContent(v);let b=d===e?v:g;d.setTextContent(b.slice(0,f)+b.slice(f+l));let _=(0,c.vJq)(),w=(0,c.uTE)();(0,c.n1P)(w);let x=i-l*(d===e?2:1)+1;for(let r of(w.anchor.set(d.__key,f,"text"),w.focus.set(e.__key,x,"text"),t.format))w.hasFormat(r)||w.formatText(r);for(let e of(w.anchor.set(w.focus.key,w.focus.offset,w.focus.type),t.format))w.hasFormat(e)&&w.toggleFormat(e);return(0,c.I2P)(_)&&(w.format=_.format),!0}}(t,o,n)};return e.registerUpdateListener(({dirtyLeaves:t,editorState:r,prevEditorState:n,tags:i})=>{if(i.has("collaboration")||i.has("historic")||e.isComposing())return;let l=r.read(c.vJq),a=n.read(c.vJq);if(!(0,c.I2P)(a)||!(0,c.I2P)(l)||!l.isCollapsed()||l.is(a))return;let u=l.anchor.key,d=l.anchor.offset,f=r._nodeMap.get(u);(0,c.kFe)(f)&&t.has(u)&&(1===d||!(d>a.anchor.offset+1))&&e.update(()=>{if(f.hasFormat("code"))return;let e=f.getParent();null!==e&&o(e,f,l.anchor.offset)})})}var K=/^[\t ]*$/,W=/^(\s*)(\d+)\.\s/,q=/^(\s*)[-*+]\s/,V=/^(\s*)(?:-\s)?\s?(\[(\s|x)?\])\s/i,J=/^(#{1,6})\s/,H=/^>\s/,G=/^[ \t]*(\\`\\`\\`|```)(\w+)?/,Y=/[ \t]*(\\`\\`\\`|```)$/,Z=/^[ \t]*```[^`]+(?:(?:`{1,2}|`{4,})[^`]+)*```(?:[^`]|$)/,X=/^\|(.+)\|\s?$/,Q=/^(\| ?:?-*:? ?)+\|\s?$/,ee=/^[ \t]*<[a-z_][\w-]*(?:\s[^<>]*)?\/?>/i,et=/^[ \t]*<\/[a-z_][\w-]*\s*>/i,er=e=>(t,r,n)=>{let i=t.getPreviousSibling(),o=t.getNextSibling(),l=(0,d.i)("check"===e?"x"===n[3]:void 0);if((0,d.HY)(o)&&o.getListType()===e){let e=o.getFirstChild();null!==e?e.insertBefore(l):o.append(l),t.remove()}else if((0,d.HY)(i)&&i.getListType()===e)i.append(l),t.remove();else{let r=(0,d.DE)(e,"number"===e?Number(n[2]):void 0);r.append(l),t.replace(r)}l.append(...r),l.select(0,0);let a=function(e){let t=e.match(/\t/g),r=e.match(/ /g),n=0;return t&&(n+=t.length),r&&(n+=Math.floor(r.length/4)),n}(n[1]);a&&l.setIndent(a)},en=(e,t,r)=>{let n=[],i=e.getChildren(),o=0;for(let l of i)if((0,d.Mz)(l)){if(1===l.getChildrenSize()){let e=l.getFirstChild();if((0,d.HY)(e)){n.push(en(e,t,r+1));continue}}let i=" ".repeat(4*r),a=e.getListType(),u="number"===a?`${e.getStart()+o}. `:"check"===a?`- [${l.getChecked()?"x":" "}] `:"- ";n.push(i+u+t(l)),o++}return n.join(` 17`)},ei=[{type:"element",dependencies:[f.jL],export:(e,t)=>{if(!(0,f.Pi)(e))return null;let r=Number(e.getTag().slice(1));return"#".repeat(r)+" "+t(e)},regExp:J,replace:(n=e=>{let t="h"+e[1].length;return(0,f.fi)(t)},(e,t,r)=>{let i=n(r);i.append(...t),e.replace(i),i.select(0,0)})},{type:"element",dependencies:[f.dJ],export:(e,t)=>{if(!(0,f.jd)(e))return null;let r=t(e).split(` 18`),n=[];for(let e of r)n.push("> "+e);return n.join(` 19`)},regExp:H,replace:(e,t,r,n)=>{if(n){let r=e.getPreviousSibling();if((0,f.jd)(r)){r.splice(r.getChildrenSize(),0,[(0,c.WKo)(),...t]),r.select(0,0),e.remove();return}}let i=(0,f.xi)();i.append(...t),e.replace(i),i.select(0,0)}},{type:"element",dependencies:[d.v5,d.YW],export:(e,t)=>(0,d.HY)(e)?en(e,t,0):null,regExp:q,replace:er("bullet")},(d.v5,d.YW,er("check"),{type:"element",dependencies:[d.v5,d.YW],export:(e,t)=>(0,d.HY)(e)?en(e,t,0):null,regExp:W,replace:er("number")}),{type:"text-format",format:["code"],tag:"`"},{type:"text-format",format:["bold","italic"],tag:"***"},{type:"text-format",format:["bold","italic"],intraword:!1,tag:"___"},{type:"text-format",format:["bold"],tag:"**"},{type:"text-format",format:["bold"],intraword:!1,tag:"__"},{type:"text-format",format:["highlight"],tag:"=="},{type:"text-format",format:["italic"],tag:"*"},{type:"text-format",format:["italic"],intraword:!1,tag:"_"},{type:"text-format",format:["strikethrough"],tag:"~~"}];function eo(e,t=ei,r,n=!1,i=!0){let o=n?e:function(e,t){let r=e.split(` 20`),n=!1,i=[],o=0;for(let e=0;e<r.length;e++){let l=r[e],a=i[i.length-1];if(Z.test(l)){i.push(l);continue}if(Y.test(l)){0===o&&(n=!0),1===o&&(n=!1),o>0&&o--,i.push(l);continue}if(G.test(l)){n=!0,o++,i.push(l);continue}if(n){i.push(l);continue}K.test(l)||K.test(a)||!a||J.test(a)||J.test(l)||H.test(l)||W.test(l)||q.test(l)||V.test(l)||X.test(l)||Q.test(l)||!t||ee.test(l)||et.test(l)||ee.test(a)||et.test(a)||Y.test(a)?i.push(l):i[i.length-1]=a+" "+l.trim()}return i.join(` 21`)}(e,i);return(function(e,t=!1){let r=O(e),n=function(e){let t={},r={},n=[];for(let i of e){let{tag:e}=i;t[e]=i;let o=e.replace(/([*^+])/g,"\\$1");n.push(o),1===e.length?r[e]=RegExp(`(?<![\\\\${o}])(${o})((\\\\${o})?.*?[^${o}\\s](\\\\${o})?)((?<!\\\\)|(?<=\\\\\\\\))(${o})(?![\\\\${o}])`):r[e]=RegExp(`(?<!\\\\)(${o})((\\\\${o})?.*?[^\\s](\\\\${o})?)((?<!\\\\)|(?<=\\\\\\\\))(${o})(?!\\\\)`)}return{fullMatchRegExpByTag:r,openTagsRegExp:RegExp(`(?<![\\\\])(${n.join("|")})`,"g"),transformersByTag:t}}(r.textFormat);return(e,i)=>{let o=e.split(` 22`),l=o.length,a=i||(0,c.NiT)();a.clear();for(let e=0;e<l;
22e++){let t=o[e],[i,l]=function(e,t,r,n){for(let i of r){let{handleImportAfterStartMatch:r,regExpEnd:o,regExpStart:l,replace:a}=i,u=e[t]?.match(l);if(!u)continue;if(r){let o=r({lines:e,rootNode:n,startLineIndex:t,startMatch:u,transformer:i});if(null===o)continue;if(o)return o}let c="object"==typeof o&&"regExp"in o?o.regExp:o,d=o&&"object"==typeof o&&"optional"in o?o.optional:!o,f=t,p=e.length;for(;f<p;){let r=c?e[f]?.match(c):null;if(!r&&(!d||d&&f<p-1)||r&&t===f&&r.index===u.index){f++;continue}let i=[];if(r&&t===f)i.push(e[t].slice(u[0].length,-r[0].length));else for(let n=t;n<=f;n++){let o=e[n];if(n===t){let e=o.slice(u[0].length);i.push(e)}else if(n===f&&r){let e=o.slice(0,-r[0].length);i.push(e)}else i.push(o)}if(!1!==a(n,null,u,r,i,!0))return[!0,f];break}}return[!1,t]}(o,e,r.multilineElement,a);if(i){e=l;continue}!function(e,t,r,n,i){let o=(0,c.sTu)(e),l=(0,c.lJ7)();for(let{regExp:n,replace:i}of(l.append(o),t.append(l),r)){let t=e.match(n);if(t&&(o.setTextContent(e.slice(t[0].length)),!1!==i(l,[o],t,!0)))break}if(function e(t,r,n){let i=function(e,t){let r=function(e,t){let r=e.match(t.openTagsRegExp);if(null==r)return null;for(let n of r){let r=n.replace(/^\s/,""),i=t.fullMatchRegExpByTag[r];if(null==i)continue;let o=e.match(i),l=t.transformersByTag[r];if(null!=o&&null!=l){if(!1!==l.intraword)return o;let{index:t=0}=o,r=e[t-1],n=e[t+o[0].length];if((!r||j.test(r))&&(!n||j.test(n)))return o}}return null}(e.getTextContent(),t);if(!r)return null;let n=r.index||0,i=n+r[0].length,o=t.transformersByTag[r[1]];return{endIndex:i,match:r,startIndex:n,transformer:o}}(t,r),o=function(e,t){let r,n,i,o;for(let l of t){if(!l.replace||!l.importRegExp)continue;let t=e.getTextContent().match(l.importRegExp);if(!t)continue;let a=t.index||0,u=l.getEndIndex?l.getEndIndex(e,t):a+t[0].length;!1!==u&&(void 0===r||void 0===n||a<r&&u>n)&&(r=a,n=u,i=l,o=t)}return void 0===r||void 0===n||void 0===i||void 0===o?null:{endIndex:n,match:o,startIndex:r,transformer:i}}(t,n);if(i&&o&&(i.startIndex<=o.startIndex&&i.endIndex>=o.endIndex?o=null:i=null),i){let o=function(e,t,r,n,i){let o=e.getTextContent(),l,a,u;if(i[0]===o?u=e:0===t?[u,l]=e.splitText(r):[a,u,l]=e.splitText(t,r),u.setTextContent(i[2]),n)for(let e of n.format)u.hasFormat(e)||u.toggleFormat(e);
22return{nodeAfter:l,nodeBefore:a,transformedNode:u}}(t,i.startIndex,i.endIndex,i.transformer,i.match);o.nodeAfter&&(0,c.kFe)(o.nodeAfter)&&!o.nodeAfter.hasFormat("code")&&e(o.nodeAfter,r,n),o.nodeBefore&&(0,c.kFe)(o.nodeBefore)&&!o.nodeBefore.hasFormat("code")&&e(o.nodeBefore,r,n),o.transformedNode&&(0,c.kFe)(o.transformedNode)&&!o.transformedNode.hasFormat("code")&&e(o.transformedNode,r,n)}else if(o){var l,a,u,d;let i,f,p,g=(l=o.startIndex,a=o.endIndex,u=o.transformer,d=o.match,(0===l?[p,i]=t.splitText(a):[f,p,i]=t.splitText(l,a),u.replace)?{nodeAfter:i,nodeBefore:f,transformedNode:(p?u.replace(p,d):void 0)||void 0}:null);if(!g)return;g.nodeAfter&&(0,c.kFe)(g.nodeAfter)&&!g.nodeAfter.hasFormat("code")&&e(g.nodeAfter,r,n),g.nodeBefore&&(0,c.kFe)(g.nodeBefore)&&!g.nodeBefore.hasFormat("code")&&e(g.nodeBefore,r,n),g.transformedNode&&(0,c.kFe)(g.transformedNode)&&!g.transformedNode.hasFormat("code")&&e(g.transformedNode,r,n)}let f=t.getTextContent().replace(/\\([*_`~])/g,"$1");t.setTextContent(f)}(o,n,i),l.isAttached()&&e.length>0){let e=l.getPreviousSibling();if((0,c.bSg)(e)||(0,f.jd)(e)||(0,d.HY)(e)){let t=e;if((0,d.HY)(e)){let r=e.getLastDescendant();t=null==r?null:(0,u.Bt)(r,d.Mz)}null!=t&&t.getTextContentSize()>0&&(t.splice(t.getChildrenSize(),0,[(0,c.WKo)(),...l.getChildren()]),l.remove())}}}(t,a,r.element,n,r.textMatch)}for(let e of a.getChildren())!t&&D(e)&&a.getChildrenSize()>1&&e.remove();null!==(0,c.vJq)()&&a.selectStart()}})(t,n)(o,r)}function el(e=ei,t,r=!1){return(function(e,t=!1){let r=O(e),n=[...r.multilineElement,...r.element],i=!t,o=r.textFormat.filter(e=>1===e.format.length).sort((e,t)=>e.format.includes("code")&&!t.format.includes("code")?1:!e.format.includes("code")&&t.format.includes("code")?-1:0);return e=>{let t=[],l=(e||(0,c.NiT)()).getChildren();return l.forEach((e,a)=>{let u=function(e,t,r,n){for(let i of t){if(!i.export)continue;let t=i.export(e,e=>R(e,r,n));if(null!=t)return t}return(0,c.ff4)(e)?R(e,r,n):(0,c.Cyw)(e)?e.getTextContent():null}(e,n,o,r.textMatch);null!=u&&t.push(i&&a>0&&!D(e)&&!D(l[a-1])?` 23`.concat(u):u)}),t.join(` 24`)}})(e,r)(t)}},48493:(e,t,r)=>{"use strict";r.d(t,{C5:()=>l,Rp:()=>a,wJ:()=>o,Qq:()=>i,Xh:()=>u}),r(23851);var n=r(1585);r(30195),n.default,n.default;let i=(e,{hasMany:t,maxLength:r,maxRows:n,minLength:i,minRows:o,req:{payload:{config:l},t:a},required:u})=>{let d;if(!u&&!e)return!0;if(!0===t){let t=c(e,{maxRows:n,minRows:o,required:u,t:a});if("string"==typeof t)return t}for(let t of("number"==typeof l?.defaultMaxTextLength&&(d=l.defaultMaxTextLength),"number"==typeof r&&(d=r),Array.isArray(e)?e:[e])){let e=t?.length||0;if("number"==typeof d&&e>d)return a("validation:shorterThanMax",{label:a("general:value"),maxLength:d,stringValue:t});if("number"==typeof i&&e<i)return a("validation:longerThanMin",{label:a("general:value"),minLength:i,stringValue:t})}return!u||!!("string"==typeof e||Array.isArray(e))&&e?.length!==0||a("validation:required")},o=(e,{maxLength:t,minLength:r=3,req:{payload:{config:n},t:i},required:o})=>{let l;return("number"==typeof n?.defaultMaxTextLength&&(l=n.defaultMaxTextLength),"number"==typeof t&&(l=t),e&&l&&e.length>l)?i("validation:shorterThanMax",{maxLength:l}):e&&r&&e.length<r?i("validation:longerThanMin",{minLength:r}):!o||!!e||i("validation:required")},l=(e,{req:{t},required:r,siblingData:n})=>r&&!e?t("validation:required"):!e||e===n.password||t("fields:passwordsDoNotMatch"),a=(e,{collectionSlug:t,req:{payload:{collections:r,config:n},t:i},required:o,siblingData:l})=>{if(t){let o=r?.[t]?.config??n.collections.find(({slug:e})=>e===t);if(o.auth.loginWithUsername&&!o.auth.loginWithUsername?.requireUsername&&!o.auth.loginWithUsername?.requireEmail&&!e&&!l?.username)return i("validation:required")}return(!e||!!/^(?!.*\.\.)[\w!#$%&'*+/=?^`{|}~-](?:[\w!#$%&'*+/=?^`{|}~.-]*[\w!#$%&'*+/=?^`{|}~-])?@[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)*\.[a-z]{2,}$/i.test(e))&&(!!e||!o)||i("validation:emailAddress")},u=(e,{collectionSlug:t,req:{payload:{collections:r,config:n},t:i},required:o,siblingData:l})=>{let a;if(t){let o=r?.[t]?.config??n.collections.find(({slug:e})=>e===t);
24if(o.auth.loginWithUsername&&!o.auth.loginWithUsername?.requireUsername&&!o.auth.loginWithUsername?.requireEmail&&!e&&!l?.email)return i("validation:required")}return("number"==typeof n?.defaultMaxTextLength&&(a=n.defaultMaxTextLength),e&&a&&e.length>a)?i("validation:shorterThanMax",{maxLength:a}):!!e||!o||i("validation:required")},c=(e,t)=>{let{maxRows:r,minRows:n,required:i,t:o}=t,l=Array.isArray(e)?e.length:e||0;return!i&&0===l||(n&&l<n?o("validation:requiresAtLeast",{count:n,label:o("general:rows")}):r&&l>r?o("validation:requiresNoMoreThan",{count:r,label:o("general:rows")}):!i||!!l||o("validation:requiresAtLeast",{count:1,label:o("general:row")}))}},48643:(e,t,r)=>{"use strict";r.d(t,{a:()=>u,b:()=>c});var n=r(95155),i=r(94271),o=r(92825),l=r(12115),a=(0,l.createContext)({editorConfig:null,fieldProps:null,uuid:null}),u=({children:e,editorConfig:t,editorContainerRef:r,fieldProps:u,parentContext:c})=>{let[d]=(0,i.DF)(),[f]=(0,l.useState)(()=>Math.random().toString(36).substring(2,12)+Math.random().toString(36).substring(2,12)),p=(0,l.useRef)(new Map),[g,m]=(0,l.useState)(null),y=(0,l.useRef)(new Set),[v,b]=(0,l.useState)(),_=(0,o.useEditDepth)(),w=(0,l.useMemo)(()=>({blurEditor:e=>{y.current.clear()},childrenEditors:p,createdInlineBlock:v,editDepth:_,editor:d,editorConfig:t,editorContainerRef:r,fieldProps:u,focusedEditor:g,focusEditor:e=>{let t=e.uuid;y.current.has(t)||(y.current.add(t),m(e),c?.uuid&&c.focusEditor(e),p.current.forEach(t=>{t.focusEditor(e)}),y.current.clear())},parentEditor:c,registerChild:(e,t)=>{if(!p.current.has(e)){let r=new Map(p.current);r.set(e,t),p.current=r}},setCreatedInlineBlock:b,unregisterChild:e=>{if(p.current.has(e)){let t=new Map(p.current);t.delete(e),p.current=t}},uuid:f}),[v,b,d,p,t,r,_,u,g,c,f]);return(0,n.jsx)(a,{value:w,children:e})},c=()=>{let e=(0,l.use)(a);if(void 0===e)throw Error("useEditorConfigContext must be used within an EditorConfigProvider");return e}},48824:(e,t,r)=>{"use strict";r.d(t,{PreviewComponent:()=>c});var n=r(95155),i=r(87677),o=r(58028),l=r(92825),a=r(78234),u=r(12115);let c=e=>{let{descriptionPath:t,hasGenerateURLFn:r,titlePath:c}=e,{t:d}=(0,i.d)(),{config:{routes:{api:f},serverURL:p}}=(0,o.b)(),g=(0,l.useLocale)(),[m]=(0,l.useAllFormFields)(),{getData:y}=(0,l.useForm)(),v=(0,l.useDocumentInfo)(),{title:b}=(0,l.useDocumentTitle)(),{[t||"meta.description"]:{value:_}={},[c||"meta.title"]:{value:w}={}}=m,[x,S]=(0,u.useState)();return(0,u.useEffect)(()=>{let e="".concat(p).concat(f,"/plugin-seo/generate-url"),t=async()=>{var t;let r=await fetch(e,{body:JSON.stringify({id:v.id,collectionSlug:v.collectionSlug,doc:y(),docPermissions:v.docPermissions,globalSlug:v.globalSlug,hasPublishPermission:v.hasPublishPermission,hasSavePermission:v.hasSavePermission,initialData:v.initialData,initialState:(0,a.qg)(null!=(t=v.initialState)?t:{}),locale:"object"==typeof g?null==g?void 0:g.code:g,title:b}),credentials:"include",headers:{"Content-Type":"application/json"},method:"POST"}),{result:n}=await r.json();S(n)};r&&!x&&t()},[m,x,g,v,r,y,p,f,b]),(0,n.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,n.jsx)("div",{children:d("plugin-seo:preview")}),(0,n.jsx)("div",{style:{color:"#9A9A9A",marginBottom:"5px"},children:d("plugin-seo:previewDescription")}),(0,n.jsxs)("div",{style:{background:"var(--theme-elevation-50)",borderRadius:"5px",boxShadow:"0px 0px 10px rgba(0, 0, 0, 0.1)",maxWidth:"600px",padding:"20px",pointerEvents:"none",width:"100%"},children:[(0,n.jsx)("div",{children:(0,n.jsx)("a",{href:x,style:{textDecoration:"none"},children:x||"https://..."})}),(0,n.jsx)("h4",{style:{margin:0},children:(0,n.jsx)("a",{href:"/",style:{textDecoration:"none"},children:w})}),(0,n.jsx)("p",{style:{margin:0},children:_})]})]})}},49947:(e,t,r)=>{"use strict";r.d(t,{$:()=>y});var n=r(19749),i=r(95155),o=r(87677),l=r(58028),a=r(92825),u=r(23999),c=r(12115);function d(e,t){return JSON.stringify(e)!==JSON.stringify(t)}var f=r(6722);function p({comparison:e,config:t,fields:r,locales:n,parentIsLocalized:i,version:o}){let l=0;return r.forEach(r=>{if("name"in r&&"id"===r.name)return;let a=r.type;switch(a){case"array":case"blocks":if(n&&(0,u.Cd)({field:r,parentIsLocalized:i}))n.forEach(a=>{let u=e?.[r.name]?.[a]??[],c=o?.[r.name]?.[a]??[];l+=g({comparisonRows:u,config:t,field:r,locales:n,parentIsLocalized:i||r.localized,versionRows:c})});else{let a=e?.[r.name]??[],u=o?.[r.name]??[];l+=g({comparisonRows:a,config:t,field:r,locales:n,parentIsLocalized:i||r.localized,versionRows:u})}break;case"checkbox":case"code":case"date":case"email":case"join":case"json":case"number":case"point":case"radio":case"relationship":case"richText":case"select":case"text":case"textarea":case"upload":n&&(0,u.Cd)({field:r,parentIsLocalized:i}
24)?n.forEach(t=>{d(o?.[r.name]?.[t],e?.[r.name]?.[t])&&l++}):d(o?.[r.name],e?.[r.name])&&l++;break;case"collapsible":case"row":l+=p({comparison:e,config:t,fields:r.fields,locales:n,parentIsLocalized:i||r.localized,version:o});break;case"group":(0,u.jY)(r)?n&&(0,u.Cd)({field:r,parentIsLocalized:i})?n.forEach(a=>{l+=p({comparison:e?.[r.name]?.[a],config:t,fields:r.fields,locales:n,parentIsLocalized:i||r.localized,version:o?.[r.name]?.[a]})}):l+=p({comparison:e?.[r.name],config:t,fields:r.fields,locales:n,parentIsLocalized:i||r.localized,version:o?.[r.name]}):l+=p({comparison:e,config:t,fields:r.fields,locales:n,parentIsLocalized:i||r.localized,version:o});break;case"tabs":r.tabs.forEach(r=>{"name"in r&&n&&r.localized?n.forEach(a=>{l+=p({comparison:e?.[r.name]?.[a],config:t,fields:r.fields,locales:n,parentIsLocalized:i||r.localized,version:o?.[r.name]?.[a]})}):"name"in r?l+=p({comparison:e?.[r.name],config:t,fields:r.fields,locales:n,parentIsLocalized:i||r.localized,version:o?.[r.name]}):l+=p({comparison:e,config:t,fields:r.fields,locales:n,parentIsLocalized:i||r.localized,version:o})});break;case"ui":break;default:throw Error(`Unexpected field.type in countChangedFields : ${String(a)}`)}}),l}function g({comparisonRows:e=[],config:t,field:r,locales:n,parentIsLocalized:i,versionRows:o=[]}){let l=0,a=0;for(;e[a]||o[a];){let u=e?.[a]||{},c=o?.[a]||{},{fields:d}=(0,f.G)({baseVersionField:{type:"text",fields:[],path:"",schemaPath:""},comparisonRow:u,config:t,field:r,row:a,versionRow:c});l+=p({comparison:u,config:t,fields:d,locales:n,parentIsLocalized:i||r.localized,version:c}),a++}return l}let m="diff-collapser",y=e=>{let t,r=(0,n.c)(23),{children:d,field:f,fields:y,hideGutter:v,initCollapsed:b,isIterable:_,Label:w,locales:x,parentIsLocalized:S,valueFrom:C,valueTo:k}=e,T=void 0!==v&&v,E=void 0!==_&&_,{t:N}=(0,o.d)(),[P,$]=(0,c.useState)(void 0!==b&&b),{config:A}=(0,l.b)();if(r[0]!==w||r[1]!==d||r[2]!==A||r[3]!==f||r[4]!==y||r[5]!==T||r[6]!==P||r[7]!==E||r[8]!==x||r[9]!==S||r[10]!==N||r[11]!==C||r[12]!==k){let e,n,o;if(E){let t,n;if(!(0,u.eE)(f)&&!(0,u.MT)(f))throw Error("DiffCollapser: field must be an array or blocks field when isIterable is true");r[14]!==C?(t=null!=C?C:[],r[14]=C,r[15]=t):t=r[15];let i=t;r[16]!==k?(n=null!=k?k:[],r[16]=k,r[17]=n):n=r[17];let o=n;if(!Array.isArray(i)||!Array.isArray(o))throw Error("DiffCollapser: comparison and version must be arrays when isIterable is true");e=g({comparisonRows:i,config:A,field:f,locales:x,parentIsLocalized:S,versionRows:o})}else e=p({comparison:C,config:A,fields:y,locales:x,parentIsLocalized:S,version:k});let l=P&&"".concat(m,"__content--is-collapsed"),c=T&&"".concat(m,"__content--hide-gutter");r[18]!==l||r[19]!==c?(n=["".concat(m,"__content"),l,c].filter(Boolean),r[18]=l,r[19]=c,r[20]=n):n=r[20];let v=n.join(" ");r[21]!==P?(o=()=>$(!P),r[21]=P,r[22]=o):o=r[22],t=(0,i.jsxs)("div",{className:m,children:[(0,i.jsxs)(a.FieldDiffLabel,{children:[(0,i.jsxs)("button",{"aria-label":P?"Expand":"Collapse",className:"".concat(m,"__toggle-button"),onClick:o,type:"button",children:[(0,i.jsx)("div",{className:"".concat(m,"__label"),children:w}),(0,i.jsx)(a.ChevronIcon,{direction:P?"right":"down",size:"small"})]}),e>0&&P&&(0,i.jsx)("span",{className:"".concat(m,"__field-change-count"),children:N("version:changedFieldsCount",{count:e})})]}),(0,i.jsx)("div",{className:v,children:d})]}),r[0]=w,r[1]=d,r[2]=A,r[3]=f,r[4]=y,r[5]=T,r[6]=P,r[7]=E,r[8]=x,r[9]=S,r[10]=N,r[11]=C,r[12]=k,r[13]=t}else t=r[13];return t}},50288:(e,t,r)=>{"use strict";r.d(t,{LinkToDocClient:()=>u});var n=r(95155),i=r(58028),o=r(92825),l=r(6001);r(12115);var a=r(49509);let u=()=>{let{config:e}=(0,i.b)(),{routes:{admin:t},serverURL:r}=e,{value:u}=(0,o.useField)({path:"doc"});if(!(null==u?void 0:u.relationTo)||!(null==u?void 0:u.value))return null;let c="".concat(r).concat((0,l.Q)({adminRoute:t,path:"/collections/".concat(u.relationTo||"","/").concat(u.value||"")})),d="".concat(a.env.NEXT_BASE_PATH||"").concat(c);return(0,n.jsxs)("div",{style:{marginBottom:"var(--spacing-field, 1rem)"},children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("span",{className:"label",style:{color:"#9A9A9A"},children:"Doc URL"}),(0,n.jsx)(o.CopyToClipboard,{value:d})]}),(0,n.jsx)("div",{style:{fontWeight:"600",overflow:"hidden",textOverflow:"ellipsis"},children:(0,n.jsx)(o.Link,{href:c,passHref:!0,rel:"noopener noreferrer",target:"_blank",children:d})})]})}},50301:(e,t,r)=>{"use strict";
24Object.defineProperty(t,"__esModule",{value:!0}),t.default=[r(73264).default]},51270:(e,t)=>{"use strict";function r(e,t){return t.rules.some(t=>n(e,t))}function n(e,t){var r;return void 0!==e[t.keyword]||(null==(r=t.definition.implements)?void 0:r.some(t=>void 0!==e[t]))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},n){let i=t.RULES.types[n];return i&&!0!==i&&r(e,i)},t.shouldUseGroup=r,t.shouldUseRule=n},51593:(e,t,r)=>{"use strict";r.d(t,{DateDiffComponent:()=>d});var n=r(19749),i=r(95155),o=r(87677),l=r(58028),a=r(92825),u=r(78234);r(12115);let c="date-diff",d=e=>{let t,r=(0,n.c)(7),{comparisonValue:d,field:f,locale:p,nestingLevel:g,versionValue:m}=e,{i18n:y}=(0,o.d)(),{config:v}=(0,l.b)(),{admin:b}=v,{dateFormat:_}=b,w=d?(0,u.Yq)({date:"string"==typeof d?new Date(d):d,i18n:y,pattern:_}):"",x=m?(0,u.Yq)({date:"string"==typeof m?new Date(m):m,i18n:y,pattern:_}):"",S='<div class="'.concat(c,'" data-enable-match="true" data-date="').concat(w,'"><p>')+w+"</p></div>",C='<div class="'.concat(c,'" data-enable-match="true" data-date="').concat(x,'"><p>')+x+"</p></div>";if(r[0]!==f.label||r[1]!==y||r[2]!==p||r[3]!==g||r[4]!==S||r[5]!==C){let{From:e,To:n}=(0,a.getHTMLDiffComponents)({fromHTML:S,toHTML:C,tokenizeByCharacter:!1});t=(0,i.jsx)(a.FieldDiffContainer,{className:c,From:e,i18n:y,label:{label:f.label,locale:p},nestingLevel:g,To:n}),r[0]=f.label,r[1]=y,r[2]=p,r[3]=g,r[4]=S,r[5]=C,r[6]=t}else t=r[6];return t}},51616:e=>{"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;0!=i--;){var n,i,o,l=o[i];if(!e(t[l],r[l]))return!1}return!0}return t!=t&&r!=r}},52143:(e,t,r)=>{"use strict";function n(e){return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}r.d(t,{k:()=>n})},53034:(e,t,r)=>{"use strict";r.d(t,{Y:()=>i,d:()=>o});let n=e=>0===Object.keys(e).length,i=(e,t)=>n(t)?e:n(e)?t:("and"in e&&e.and?e.and.push(t):("or"in e,e={and:[e,t]}),e),o=({collectionConfig:e,search:t,where:r={}})=>{if(t){let o={...r||{}},l=(e.admin.listSearchableFields||[e.admin?.useAsTitle||"id"]).map(e=>({[e]:{like:t}}));l.length>0&&(o=i(o,{or:l})),n(o)||(r=o)}return r}},53745:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(47134),i=r(65972);t.default=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,i.default]},53921:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class r{}t._CodeOrName=r,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends r{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=n;class i extends r{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return""===e||'""'===e}get str(){var e;return null!=(e=this._str)?e:this._str=this._items.reduce((e,t)=>`${e}${t}`,"")}get names(){var e;return null!=(e=this._names)?e:this._names=this._items.reduce((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e),{})}}function o(e,...t){let r=[e[0]],n=0;for(;n<t.length;)u(r,t[n]),r.push(e[++n]);return new i(r)}t._Code=i,t.nil=new i(""),t._=o;let l=new i("+");function a(e,...t){let r=[c(e[0])],o=0;for(;o<t.length;)r.push(l),u(r,t[o]),r.push(l,c(e[++o]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===l){var r,i;let o=(r=e[t-1],'""'===(i=e[t+1])?r:'""'===r?i:"string"==typeof r?i instanceof n||'"'!==r[r.length-1]?void 0:"string"!=typeof i?`${r.slice(0,-1)}${i}"`:'"'===i[0]?r.slice(0,-1)+i.slice(1):void 0:"string"!=typeof i||'"'!==i[0]||r instanceof n?void 0:`"${r}${i.slice(1)}`);if(void 0!==o){e.splice(t-1,3,o);continue}e[t++]="+"}t++}}(r),new i(r)}function u(e,t){var r;t instanceof i?e.push(...t._items):t instanceof n?e.push(t):e.push("number"==typeof(r=t)||"boolean"==typeof r||null===r?r:c(Array.isArray(r)?r.join(","):r))}function c(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.str=a,t.addCodeArg=u,t.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:a`${e}${t}`},t.stringify=function(e){return new i(c(e))},t.safeStringify=c,t.getProperty=function(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new i(`.${e}`):o`[${e}]`},t.getEsmExportName=function(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new i(`${e}`);
24throw Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},t.regexpCode=function(e){return new i(e.toString())}},54344:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(62889),i=r(79772),o=r(73274),l=r(99155);t.default={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>(0,i.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,i._)`{i: ${e}, j: ${t}}`},code(e){let{gen:t,data:r,$data:a,schema:u,parentSchema:c,schemaCode:d,it:f}=e;if(!a&&!u)return;let p=t.let("valid"),g=c.items?(0,n.getSchemaTypes)(c.items):[];e.block$data(p,function(){let a=t.let("i",(0,i._)`${r}.length`),u=t.let("j");e.setParams({i:a,j:u}),t.assign(p,!0),t.if((0,i._)`${a} > 1`,()=>(g.length>0&&!g.some(e=>"object"===e||"array"===e)?function(o,l){let a=t.name("item"),u=(0,n.checkDataTypes)(g,a,f.opts.strictNumbers,n.DataType.Wrong),c=t.const("indices",(0,i._)`{}`);t.for((0,i._)`;${o}--;`,()=>{t.let(a,(0,i._)`${r}[${o}]`),t.if(u,(0,i._)`continue`),g.length>1&&t.if((0,i._)`typeof ${a} == "string"`,(0,i._)`${a} += "_"`),t.if((0,i._)`typeof ${c}[${a}] == "number"`,()=>{t.assign(l,(0,i._)`${c}[${a}]`),e.error(),t.assign(p,!1).break()}).code((0,i._)`${c}[${a}] = ${o}`)})}:function(n,a){let u=(0,o.useFunc)(t,l.default),c=t.name("outer");t.label(c).for((0,i._)`;${n}--;`,()=>t.for((0,i._)`${a} = ${n}; ${a}--;`,()=>t.if((0,i._)`${u}(${r}[${n}], ${r}[${a}])`,()=>{e.error(),t.assign(p,!1).break(c)})))})(a,u))},(0,i._)`${d} === false`),e.ok(p)}}},54394:(e,t,r)=>{"use strict";r.d(t,{r:()=>n});let n=e=>"string"==typeof e||"number"==typeof e?e:e.id},54534:()=>{},54576:(e,t,r)=>{"use strict";r.d(t,{d:()=>i});var n=r(32532);class i extends n.Kp7{constructor(e,t){super(t),this.__format=e||""}exportJSON(){return{...super.exportJSON(),format:this.__format||""}}updateFromJSON(e){return super.updateFromJSON(e).setFormat(e.format||"")}canIndent(){return!1}createDOM(){return document.createElement("div")}updateDOM(){return!1}setFormat(e){let t=this.getWritable();return t.__format=e,t}isInline(){return!1}}},54797:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(r||(t.DiscrError=r={}))},55559:(e,t,r)=>{"use strict";r.d(t,{CreatedAtCell:()=>d});var n=r(19749),i=r(95155),o=r(58028),l=r(87677),a=r(92825),u=r(78234),c=r(6001);r(12115);let d=e=>{let t,r,d=(0,n.c)(11),{collectionSlug:f,docID:p,globalSlug:g,rowData:m}=e;d[0]!==m?(t=void 0===m?{}:m,d[0]=m,d[1]=t):t=d[1];let{id:y,updatedAt:v}=t,{config:b}=(0,o.b)(),{admin:_,routes:w}=b,{dateFormat:x}=_,{admin:S}=w,{i18n:C}=(0,l.d)();if(d[2]!==S||d[3]!==f||d[4]!==x||d[5]!==p||d[6]!==g||d[7]!==C||d[8]!==y||d[9]!==v){let e;f&&(e=(0,c.Q)({adminRoute:S,path:"/collections/".concat(f,"/").concat(p,"/versions/").concat(y)})),g&&(e=(0,c.Q)({adminRoute:S,path:"/globals/".concat(g,"/versions/").concat(y)})),r=(0,i.jsx)(a.Link,{href:e,prefetch:!1,children:(0,u.Yq)({date:v,i18n:C,pattern:x})}),d[2]=S,d[3]=f,d[4]=x,d[5]=p,d[6]=g,d[7]=C,d[8]=y,d[9]=v,d[10]=r}else r=d[10];return r}},56336:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(81708).validateUnion,error:{message:"must match a schema in anyOf"}}},56717:(e,t,r)=>{"use strict";r.d(t,{Collapsible:()=>d});var n=r(19749),i=r(95155),o=r(84365),l=r(87677);r(12115);var a=r(20385),u=r(49947),c=r(79615);let d=e=>{var t;let r,d,f=(0,n.c)(11),{baseVersionField:p,comparisonValue:g,field:m,parentIsLocalized:y,versionValue:v}=e,{i18n:b}=(0,l.d)(),{selectedLocales:_}=(0,a.I)();if(!(null==(t=p.fields)?void 0:t.length))return null;f[0]!==m||f[1]!==b?(r="label"in m&&m.label&&"function"!=typeof m.label&&(0,i.jsx)("span",{children:(0,o.s)(m.label,b)}),f[0]=m,f[1]=b,f[2]=r):r=f[2];let w=y||m.localized;return f[3]!==p.fields||f[4]!==m.fields||f[5]!==_||f[6]!==r||f[7]!==w||f[8]!==g||f[9]!==v?(d=(0,i.jsx)("div",{className:"collapsible-diff",children:(0,i.jsx)(u.$,{fields:m.fields,Label:r,locales:_,parentIsLocalized:w,valueFrom:g,valueTo:v,children:(0,i.jsx)(c.RenderVersionFieldsToDiff,{versionFields:p.fields})})}),f[3]=p.fields,f[4]=m.fields,f[5]=_,f[6]=r,f[7]=w,f[8]=g,f[9]=v,f[10]=d):d=f[10],d}},56962:(e,t,r)=>{"use strict";r.d(t,{N:()=>n});let n={description:{maxLength:150,minLength:100},title:{maxLength:60,minLength:50}}},57719:(e,t)=>{"use strict";t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return(r+n)*3/4-n},t.toByteArray=function(e){var t,r,o=u(e),l=o[0],a=o[1],c=new i((l+a)*3/4-a),d=0,f=a>0?l-4:l;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[d++]=t>>16&255,c[d++]=t>>8&255,c[d++]=255&t;return 2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[d++]=255&t),1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[d++]=t>>8&255,c[d++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],l=0,a=n-i;l<a;l+=16383)o.push(function(e,t,n){for(var i,o=[],l=t;l<n;l+=3)i=(e[l]<<16&0xff0000)+(e[l+1]<<8&65280)+(255&e[l+2]),o.push(r[i>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}(e,l,l+16383>a?a:l+16383));return 1===i?o.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&o.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
24+/",l=0,a=o.length;l<a;++l)r[l]=o[l],n[o.charCodeAt(l)]=l;function u(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n[45]=62,n[95]=63},58028:(e,t,r)=>{"use strict";r.d(t,{a:()=>H,b:()=>G,c:()=>er,d:()=>en,e:()=>ei,f:()=>Q,g:()=>ee,h:()=>et,i:()=>el});var n=r(12115);r(47650);var i=r(19749),o=r(95155);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function d(e){return function t(){for(var r=this,n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var e=arguments.length,n=Array(e),o=0;o<e;o++)n[o]=arguments[o];return t.apply(r,[].concat(i,n))}}}function f(e){return({}).toString.call(e).includes("Object")}function p(e){return"function"==typeof e}var g=d(function(e,t){throw Error(e[t]||e.default)})({initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"}),m={changes:function(e,t){return f(t)||g("changeType"),Object.keys(t).some(function(t){return!Object.prototype.hasOwnProperty.call(e,t)})&&g("changeField"),t},selector:function(e){p(e)||g("selectorType")},handler:function(e){p(e)||f(e)||g("handlerType"),f(e)&&Object.values(e).some(function(e){return!p(e)})&&g("handlersType")},initial:function(e){e||g("initialIsRequired"),f(e)||g("initialType"),Object.keys(e).length||g("initialContent")}};function y(e,t){return p(t)?t(e.current):t}function v(e,t){return e.current=c(c({},e.current),t),t}function b(e,t,r){return p(t)?t(e.current):Object.keys(r).forEach(function(r){var n;return null==(n=t[r])?void 0:n.call(t,e.current[r])}),r}var _={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:"Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\n "},w=(function(e){return function t(){for(var r=this,n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var e=arguments.length,n=Array(e),o=0;o<e;o++)n[o]=arguments[o];return t.apply(r,[].concat(i,n))}}})(function(e,t){throw Error(e[t]||e.default)})(_),x=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}},S={type:"cancelation",msg:"operation is manually canceled"},C=function(e){var t=!1,r=new Promise(function(r,n){e.then(function(e){return t?n(S):r(e)}),e.catch(n)});return r.cancel=function(){return t=!0},r},k=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,o=void 0;try{for(var l,a=e[Symbol.iterator]();!(n=(l=a.next()).done)&&(r.push(l.value),r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}}(e,2)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}}
24(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(({create:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};m.initial(e),m.handler(t);var r={current:e},n=d(b)(r,t),i=d(v)(r),o=d(m.changes)(e),l=d(y)(r);return[function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e};return m.selector(e),e(r.current)},function(e){(function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}})(n,i,o,l)(e)}]}}).create({config:{paths:{vs:"https://cdn.jsdelivr.net/npm/[email protected]/min/vs"}},isInitialized:!1,resolve:null,reject:null,monaco:null}),2),T=k[0],E=k[1];function N(e){return document.body.appendChild(e)}function P(e){var t,r,n=T(function(e){return{config:e.config,reject:e.reject}}),i=(t="".concat(n.config.paths.vs,"/loader.js"),r=document.createElement("script"),t&&(r.src=t),r);return i.onload=function(){return e()},i.onerror=n.reject,i}function $(){var e=T(function(e){return{config:e.config,resolve:e.resolve,reject:e.reject}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(t){A(t),e.resolve(t)},function(t){e.reject(t)})}function A(e){T().monaco||E({monaco:e})}var O=new Promise(function(e,t){return E({resolve:e,reject:t})}),j={init:function(){var e=T(function(e){return{monaco:e.monaco,isInitialized:e.isInitialized,resolve:e.resolve}});if(!e.isInitialized){if(E({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),C(O);if(window.monaco&&window.monaco.editor)return A(window.monaco),e.resolve(window.monaco),C(O);x(N,P)($)}return C(O)}},M={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},D={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},R=function(e){let{children:t}=e;return n.createElement("div",{style:D.container},t)},I=(0,n.memo)(function(e){let{width:t,height:r,isEditorReady:i,loading:o,_ref:l,className:a,wrapperProps:u}=e;return n.createElement("section",{style:{...M.wrapper,width:t,height:r},...u},!i&&n.createElement(R,null,o),n.createElement("div",{ref:l,style:{...M.fullWidth,...!i&&M.hide},className:a}))}),F=function(e){(0,n.useEffect)(e,[])},L=function(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],i=(0,n.useRef)(!0);(0,n.useEffect)(i.current||!r?()=>{i.current=!1}:e,t)};function B(){}function z(e,t,r,n){var i,o,l,a,u,c;return i=e,o=n,i.editor.getModel(U(i,o))||(l=e,a=t,u=r,c=n,l.editor.createModel(a,u,c?U(l,c):void 0))}function U(e,t){return e.Uri.parse(t)}var K=function(e){let t=(0,n.useRef)();return(0,n.useEffect)(()=>{t.current=e},[e]),t.current},W=new Map,q=(0,n.memo)(function(e){let{defaultValue:t,defaultLanguage:r,defaultPath:i,value:o,language:l,path:a,theme:u="light",line:c,loading:d="Loading...",options:f={},overrideServices:p={},saveViewState:g=!0,keepCurrentModel:m=!1,width:y="100%",height:v="100%",className:b,wrapperProps:_={},beforeMount:w=B,onMount:x=B,onChange:S,onValidate:C=B}
24=e,[k,T]=(0,n.useState)(!1),[E,N]=(0,n.useState)(!0),P=(0,n.useRef)(null),$=(0,n.useRef)(null),A=(0,n.useRef)(null),O=(0,n.useRef)(x),M=(0,n.useRef)(w),D=(0,n.useRef)(),R=(0,n.useRef)(o),U=K(a),q=(0,n.useRef)(!1),V=(0,n.useRef)(!1);F(()=>{let e=j.init();return e.then(e=>(P.current=e)&&N(!1)).catch(e=>(null==e?void 0:e.type)!=="cancelation"&&console.error("Monaco initialization: error:",e)),()=>{var t,r;return $.current?void(null==(t=D.current)||t.dispose(),m?g&&W.set(a,$.current.saveViewState()):null==(r=$.current.getModel())||r.dispose(),$.current.dispose()):e.cancel()}}),L(()=>{var e,n,u,c;let d=z(P.current,t||o||"",r||l||"",a||i||"");d!==(null==(e=$.current)?void 0:e.getModel())&&(g&&W.set(U,null==(n=$.current)?void 0:n.saveViewState()),null==(u=$.current)||u.setModel(d),g&&(null==(c=$.current)||c.restoreViewState(W.get(a))))},[a],k),L(()=>{var e;null==(e=$.current)||e.updateOptions(f)},[f],k),L(()=>{$.current&&void 0!==o&&($.current.getOption(P.current.editor.EditorOption.readOnly)?$.current.setValue(o):o!==$.current.getValue()&&(V.current=!0,$.current.executeEdits("",[{range:$.current.getModel().getFullModelRange(),text:o,forceMoveMarkers:!0}]),$.current.pushUndoStop(),V.current=!1))},[o],k),L(()=>{var e,t;let r=null==(e=$.current)?void 0:e.getModel();r&&l&&(null==(t=P.current)||t.editor.setModelLanguage(r,l))},[l],k),L(()=>{var e;void 0!==c&&(null==(e=$.current)||e.revealLine(c))},[c],k),L(()=>{var e;null==(e=P.current)||e.editor.setTheme(u)},[u],k);let J=(0,n.useCallback)(()=>{if(!(!A.current||!P.current)&&!q.current){var e;M.current(P.current);let n=a||i,d=z(P.current,o||t||"",r||l||"",n||"");$.current=null==(e=P.current)?void 0:e.editor.create(A.current,{model:d,automaticLayout:!0,...f},p),g&&$.current.restoreViewState(W.get(n)),P.current.editor.setTheme(u),void 0!==c&&$.current.revealLine(c),T(!0),q.current=!0}},[t,r,i,o,l,a,f,p,g,u,c]);return(0,n.useEffect)(()=>{k&&O.current($.current,P.current)},[k]),(0,n.useEffect)(()=>{E||k||J()},[E,k,J]),R.current=o,(0,n.useEffect)(()=>{var e,t;k&&S&&(null==(e=D.current)||e.dispose(),D.current=null==(t=$.current)?void 0:t.onDidChangeModelContent(e=>{V.current||S($.current.getValue(),e)}))},[k,S]),(0,n.useEffect)(()=>{if(k){let e=P.current.editor.onDidChangeMarkers(e=>{var t;let r=null==(t=$.current.getModel())?void 0:t.uri;if(r&&e.find(e=>e.path===r.path)){let e=P.current.editor.getModelMarkers({resource:r});null==C||C(e)}});return()=>{null==e||e.dispose()}}return()=>{}},[k,C]),n.createElement(I,{width:y,height:v,isEditorReady:k,loading:d,_ref:A,className:b,wrapperProps:_})}),V=(0,n.createContext)(void 0);function J(e){var t;if(!(null==e||null==(t=e.blocks)?void 0:t.length)||e.blocksMap)return e.blocksMap={},e;let r={...e};for(let t of(r.blocksMap={},e.blocks))r.blocksMap[t.slug]=t;return r}var H=e=>{let{children:t,config:r}
24=e,[i,l]=(0,n.useState)(()=>J(r)),a=(0,n.useRef)(!0);(0,n.useEffect)(()=>{if(a.current){a.current=!1;return}l(J(r))},[r]);let{collectionsBySlug:u,globalsBySlug:c}=(0,n.useMemo)(()=>{let e={},t={};for(let t of i.collections)e[t.slug]=t;for(let e of i.globals)t[e.slug]=e;return{collectionsBySlug:e,globalsBySlug:t}},[i]),d=(0,n.useCallback)(e=>{var t,r;return"collectionSlug"in e?null!=(t=u[e.collectionSlug])?t:null:"globalSlug"in e&&null!=(r=c[e.globalSlug])?r:null},[u,c]),f=(0,n.useMemo)(()=>({config:i,getEntityConfig:d,setConfig:l}),[i,d]);return(0,o.jsx)(V,{value:f,children:t})},G=()=>(0,n.use)(V),Y=(0,n.createContext)({autoMode:!0,setTheme:()=>null,theme:"light"});function Z(e,t,r){let n=new Date;n.setTime(n.getTime()+24*r*36e5);let i="expires="+n.toUTCString();document.cookie=e+"="+t+";"+i+";path=/"}var X=e=>{var t;let r,n=null==(t=window.document.cookie.split("; ").find(t=>t.startsWith("".concat(e,"="))))?void 0:t.split("=")[1];return r="light"===n||"dark"===n?n:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",document.documentElement.setAttribute("data-theme",r),{theme:r,themeFromCookies:n}},Q="light",ee=e=>{let t,r=(0,i.c)(11),{children:l,theme:a}=e,{config:u}=G(),c=u.admin.theme,d="".concat(u.cookiePrefix||"payload","-theme"),[f,p]=(0,n.useState)(a||Q),[g,m]=(0,n.useState)(),y,v;r[0]!==d||r[1]!==c?(y=()=>{if("all"!==c)return;let{theme:e,themeFromCookies:t}=X(d);p(e),m(!t)},v=[c,d],r[0]=d,r[1]=c,r[2]=y,r[3]=v):(y=r[2],v=r[3]),(0,n.useEffect)(y,v),r[4]!==d?(t=e=>{if("light"===e||"dark"===e)p(e),m(!1),Z(d,e,365),document.documentElement.setAttribute("data-theme",e);else if("auto"===e){Z(d,e,-1);let t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";document.documentElement.setAttribute("data-theme",t),m(!0),p(t)}},r[4]=d,r[5]=t):t=r[5];let b=t,_;return r[6]!==g||r[7]!==l||r[8]!==b||r[9]!==f?(_=(0,o.jsx)(Y,{value:{autoMode:g,setTheme:b,theme:f},children:l}),r[6]=g,r[7]=l,r[8]=b,r[9]=f,r[10]=_):_=r[10],_},et=()=>(0,n.use)(Y),er=(e,t)=>{let r,o=(0,i.c)(9),l=void 0!==t&&t,[a,u]=n.useState(!1),c=n.useRef(void 0),d;o[0]!==e?(d=()=>(u(!1),clearTimeout(c.current),c.current=setTimeout(()=>{u(!0)},e),()=>{clearTimeout(c.current)}),o[0]=e,o[1]=d):d=o[1];let f=d,p,g;return o[2]!==f||o[3]!==l?(p=()=>{l&&f()},g=[f,l],o[2]=f,o[3]=l,o[4]=p,o[5]=g):(p=o[4],g=o[5]),n.useEffect(p,g),o[6]!==a||o[7]!==f?(r=[a,f],o[6]=a,o[7]=f,o[8]=r):r=o[8],r},en=e=>{let{animationDelay:t="0ms",className:r,disableInlineStyles:n=!1,height:i="60px",width:l="100%"}=e;return(0,o.jsx)("div",{className:["shimmer-effect",r].filter(Boolean).join(" "),style:{height:!n&&("number"==typeof i?"".concat(i,"px"):i),width:!n&&("number"==typeof l?"".concat(l,"px"):l)},children:(0,o.jsx)("div",{className:"shimmer-effect__shine",style:{animationDelay:t}})})},ei=e=>{let t,r=(0,i.c)(7),{className:n,count:l,height:a,renderDelay:u,shimmerDelay:c,shimmerItemClassName:d,width:f}=e,p=void 0===c?25:c,g="number"==typeof p?"".concat(p,"ms"):p,[m]=er(void 0===u?500:u,!0);return m?(r[0]!==n||r[1]!==l||r[2]!==a||r[3]!==g||r[4]!==d||r[5]!==f?(t=(0,o.jsx)("div",{className:n,children:[...Array(l)].map((e,t)=>(0,o.jsx)("div",{className:d,children:(0,o.jsx)(en,{animationDelay:"calc(".concat(t," * ").concat(g,")"),height:a,width:f})},t))}),r[0]=n,r[1]=l,r[2]=a,r[3]=g,r[4]=d,r[5]=f,r[6]=t):t=r[6],t):null},eo=q.default||q,el=e=>{var t;let r=(0,i.c)(26),l,a,u,c,d,f;r[0]!==e?({className:l,maxHeight:a,minHeight:u,options:c,readOnly:d,...f}=e,r[0]=e,r[1]=l,r[2]=a,r[3]=u,r[4]=c,r[5]=d,r[6]=f):(l=r[1],a=r[2],u=r[3],c=r[4],d=r[5],f=r[6]);let p=null!=u?u:56,g=(null==c?void 0:c.padding)?(c.padding.top||0)+((null==(t=c.padding)?void 0:t.bottom)||0):0,[m,y]=(0,n.useState)(p),{theme:v}=et(),b=(null==f?void 0:f.defaultLanguage)?"language--".concat(f.defaultLanguage):"",_=d&&"read-only",w;r[7]!==l||r[8]!==b||r[9]!==_?(w=["code-editor",l,b,_].filter(Boolean),r[7]=l,r[8]=b,r[9]=_,r[10]=w):w=r[10];let x=w.join(" "),S;if(r[11]!==p||r[12]!==x||r[13]!==m||r[14]!==a||r[15]!==c||r[16]!==g||r[17]!==d||r[18]!==f||r[19]!==v){let e,t;r[21]!==p||r[22]!==g||r[23]!==f?(e=(e,t)=>{var r;null==(r=f.onChange)||r.call(f,e,t),y(Math.max(p,18*e.split("\n").length+2+g))},t=(e,t)=>{var r;null==(r=f.onMount)||r.call(f,e,t),y(Math.max(p,18*e.getValue().split("\n").length+2+g))},r[21]=p,r[22]=g,r[23]=f,r[24]=e,r[25]=t):(e=r[24],t=r[25]),S=(0,o.jsx)(eo,{className:x,loading:(0,o.jsx)(en,{height:m}),options:{detectIndentation:!0,hideCursorInOverviewRuler:!0,minimap:{enabled:!1},overviewRulerBorder:!1,readOnly:!!d,scrollbar:{alwaysConsumeMouseWheel:!1},scrollBeyondLastLine:!1,tabSize:2,wordWrap:"on",...c},theme:"dark"===v?"vs-dark":"vs",...f,height:a?Math.min(m,a):m,onChange:e,onMount:t}),r[11]=p,r[12]=x,r[13]=m,r[14]=a,r[15]=c,r[16]=g,r[17]=d,r[18]=f,r[19]=v,r[20]=S}else S=r[20];return S}},58208:(e,t,r)=>{"use strict";
24Object.defineProperty(t,"__esModule",{value:!0});let n=r(79772),i=r(73274);t.default={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>(0,n._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:t,schema:r,data:o,it:l}=e;if((0,i.alwaysValidSchema)(l,r))return;let a=t.name("valid");t.forIn("key",o,r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},a),t.if((0,n.not)(a),()=>{e.error(!0),l.allErrors||t.break()})}),e.ok(a)}}},58405:(e,t,r)=>{"use strict";r.d(t,{ShouldRenderTabs:()=>i});var n=r(92825);let i=e=>{let{children:t}=e,{id:r,collectionSlug:i,globalSlug:o}=(0,n.useDocumentInfo)();return i&&("create"!==r?r:null)||o?t:null}},58647:(e,t,r)=>{"use strict";r.d(t,{a:()=>a});var n=r(94271),i=r(12115);let o="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?i.useLayoutEffect:i.useEffect;function l(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}function a(){let[e]=(0,n.DF)(),t=(0,i.useMemo)(()=>l(e),[e,l]),[r,a]=(0,i.useState)(()=>t.initialValueFn()),u=(0,i.useRef)(r);return o(()=>{let{initialValueFn:e,subscribe:r}=t,n=e();return u.current!==n&&(u.current=n,a(n)),r(e=>{u.current=e,a(e)})},[t,l]),r}},59020:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(43961);let i=(e,t)=>{let r=t.substring(0,t.lastIndexOf(".")+1),i=t.split(".").pop(),o={};Object.keys(e).forEach(n=>{!e[n]?.disableFormData&&(0===n.indexOf(`${t}.`)||n===t)&&(o[n.replace(r,"")]=e[n]?.value,e[n]?.rows&&0===e[n].rows.length&&(o[n.replace(r,"")]=[]))});let l=(0,n.s)(o);return l?.[i]}},60007:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(79772);t.default={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,n.str)`must NOT have ${"maxProperties"===e?"more":"fewer"} than ${t} properties`,params:({schemaCode:e})=>(0,n._)`{limit: ${e}}`},code(e){let{keyword:t,data:r,schemaCode:i}=e,o="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data((0,n._)`Object.keys(${r}).length ${o} ${i}`)}}},61183:(e,t,r)=>{"use strict";r.d(t,{x:()=>i});var n=r(7239);function i(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];let o=n.w.bind(null,e||r.find(e=>"object"==typeof e));return r.map(o)}},61731:(e,t,r)=>{"use strict";r.d(t,{Cb:()=>y,Nx:()=>c,Rk:()=>v,SD:()=>u,Vs:()=>f,Wh:()=>a,Xg:()=>d,zI:()=>g});var n=r(32532);function i(e,...t){let r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;for(let r of(n.append("code",e),t))n.append("v",r);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let o=new Map;function l(e){let t={};if(!e)return t;for(let r of e.split(";"))if(""!==r){let[e,n]=r.split(/:([^]+)/);e&&n&&(t[e.trim()]=n.trim())}return t}function a(e){let t=o.get(e);return void 0===t&&(t=l(e),o.set(e,t)),t}function u(e,t){let r=e.getStartEndPoints();if(t.isSelected(e)&&!t.isSegmented()&&!t.isToken()&&null!==r){let[i,o]=r,l=e.isBackward(),a=i.getNode(),u=o.getNode(),c=t.is(a),d=t.is(u);if(c||d){let[r,i]=(0,n.Cku)(e),o=a.is(u),c=t.is(l?u:a),d=t.is(l?a:u),f,p=0;return o?(p=r>i?i:r,f=r>i?r:i):c?(p=l?i:r,f=void 0):d&&(p=0,f=l?r:i),t.__text=t.__text.slice(p,f),t}}return t}function c(e){if("text"===e.type)return e.offset===e.getNode().getTextContentSize();let t=e.getNode();return(0,n.ff4)(t)||i(177),e.offset===t.getChildrenSize()}function d(e){let t=e.getStyle(),r=l(t);o.set(t,r)}function f(e){let t=(0,n.vJq)();if(!t)return;let r=new Map;if((0,n.I2P)(t))for(let e of(0,n.$iu)(t).getTextSlices())e&&r.set(e.caret.origin.getKey(),e.getSliceIndices());for(let i of t.getNodes()){if(!(0,n.kFe)(i)||!i.canHaveFormat())continue;let[t,o]=r.get(i.getKey())||[0,i.getTextContentSize()];o!==t&&e((0,n.Rb_)(i)||0===t&&o===i.getTextContentSize()?i:i.splitText(t,o)[+(0!==t)])}(0,n.I2P)(t)&&"text"===t.anchor.type&&"text"===t.focus.type&&t.anchor.key===t.focus.key&&function(e){if(e.isBackward()){let{anchor:t,focus:r}=e,{key:n,offset:i,type:o}=t;t.set(r.key,r.offset,r.type),r.set(n,i,o)}}(t)}function p(e,t){let r=e.getFormatType(),n=e.getIndent();r!==t.getFormatType()&&t.setFormat(r),n!==t.getIndent()&&t.setIndent(n)}
24function g(e,t,r=p){if(null===e)return;let i=e.getStartEndPoints(),o=new Map,l=null;if(i){let[e,t]=i;(l=(0,n.uTE)()).anchor.set(e.key,e.offset,e.type),l.focus.set(t.key,t.offset,t.type);let r=b(e.getNode(),n.w3H),a=b(t.getNode(),n.w3H);(0,n.ff4)(r)&&o.set(r.getKey(),r),(0,n.ff4)(a)&&o.set(a.getKey(),a)}for(let t of e.getNodes())(0,n.ff4)(t)&&(0,n.w3H)(t)&&o.set(t.getKey(),t);for(let[e,n]of o){let i=t();r(n,i),n.replace(i,!0),l&&(e===l.anchor.key&&l.anchor.set(i.getKey(),l.anchor.offset,l.anchor.type),e===l.focus.key&&l.focus.set(i.getKey(),l.focus.offset,l.focus.type))}l&&e.is((0,n.vJq)())&&(0,n.n1P)(l)}function m(e){return e.getNode().isAttached()}function y(e,t){let r=(0,n.Ave)(e.focus,t?"previous":"next");if((0,n.pGK)(r))return!1;for(let e of(0,n.mWO)(r)){if((0,n.cmH)(e))return!e.origin.isInline();if(!(0,n.ff4)(e.origin)){if((0,n.Cyw)(e.origin))return!0;break}}return!1}function v(e,t,r){let i=function(e){let t=e.anchor.getNode();return"rtl"===((0,n.hVZ)(t)?t:t.getParentOrThrow()).getDirection()}(e);e.modify(t?"extend":"move",r?!i:i,"character")}function b(e,t){let r=e;for(;null!==r&&null!==r.getParent()&&!t(r);)r=r.getParentOrThrow();return t(r)?r:null}},61974:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(79772);t.default={data:new n.Name("data"),valCxt:new n.Name("valCxt"),instancePath:new n.Name("instancePath"),parentData:new n.Name("parentData"),parentDataProperty:new n.Name("parentDataProperty"),rootData:new n.Name("rootData"),dynamicAnchors:new n.Name("dynamicAnchors"),vErrors:new n.Name("vErrors"),errors:new n.Name("errors"),this:new n.Name("this"),self:new n.Name("self"),scope:new n.Name("scope"),json:new n.Name("json"),jsonPos:new n.Name("jsonPos"),jsonLen:new n.Name("jsonLen"),jsonPart:new n.Name("jsonPart")}},62002:(e,t,r)=>{"use strict";r.d(t,{Pi:()=>T,ZI:()=>A,dJ:()=>v,fi:()=>k,gA:()=>E,jL:()=>w,jd:()=>_,xi:()=>b});var n=r(40983),i=r(61731),o=r(92749),l=r(32532);function a(e,t){if(void 0!==document.caretRangeFromPoint){let r=document.caretRangeFromPoint(e,t);return null===r?null:{node:r.startContainer,offset:r.startOffset}}if("undefined"!==document.caretPositionFromPoint){let r=document.caretPositionFromPoint(e,t);return null===r?null:{node:r.offsetNode,offset:r.offset}}return null}let u="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,c=u&&"documentMode"in document?document.documentMode:null,d=!(!u||!("InputEvent"in window)||c)&&"getTargetRanges"in new window.InputEvent("input"),f=u&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),p=u&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,g=u&&/^(?=.*Chrome).*/i.test(navigator.userAgent),m=u&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!g,y=(0,l.guI)("DRAG_DROP_PASTE_FILE");class v extends l.fGB{static getType(){return"quote"}static clone(e){return new v(e.__key)}createDOM(e){let t=document.createElement("blockquote");return(0,o.ZB)(t,e.theme.quote),t}updateDOM(e,t){return!1}static importDOM(){return{blockquote:e=>({conversion:C,priority:0})}}exportDOM(e){let{element:t}=super.exportDOM(e);if((0,l.sby)(t)){this.isEmpty()&&t.append(document.createElement("br"));let e=this.getFormatType();t.style.textAlign=e;let r=this.getDirection();r&&(t.dir=r)}return{element:t}}static importJSON(e){return b().updateFromJSON(e)}insertNewAfter(e,t){let r=(0,l.lJ7)(),n=this.getDirection();return r.setDirection(n),this.insertAfter(r,t),r}collapseAtStart(){let e=(0,l.lJ7)();
24return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}canMergeWhenEmpty(){return!0}}function b(){return(0,l.pTq)(new v)}function _(e){return e instanceof v}class w extends l.fGB{static getType(){return"heading"}static clone(e){return new w(e.__tag,e.__key)}constructor(e,t){super(t),this.__tag=e}getTag(){return this.__tag}setTag(e){let t=this.getWritable();return this.__tag=e,t}createDOM(e){let t=this.__tag,r=document.createElement(t),n=e.theme.heading;if(void 0!==n){let e=n[t];(0,o.ZB)(r,e)}return r}updateDOM(e,t,r){return e.__tag!==this.__tag}static importDOM(){return{h1:e=>({conversion:S,priority:0}),h2:e=>({conversion:S,priority:0}),h3:e=>({conversion:S,priority:0}),h4:e=>({conversion:S,priority:0}),h5:e=>({conversion:S,priority:0}),h6:e=>({conversion:S,priority:0}),p:e=>{let t=e.firstChild;return null!==t&&x(t)?{conversion:()=>({node:null}),priority:3}:null},span:e=>x(e)?{conversion:e=>({node:k("h1")}),priority:3}:null}}exportDOM(e){let{element:t}=super.exportDOM(e);if((0,l.sby)(t)){this.isEmpty()&&t.append(document.createElement("br"));let e=this.getFormatType();t.style.textAlign=e;let r=this.getDirection();r&&(t.dir=r)}return{element:t}}static importJSON(e){return k(e.tag).updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTag(e.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(e,t=!0){let r=e?e.anchor.offset:0,n=this.getLastDescendant(),i=n&&(!e||e.anchor.key!==n.getKey()||r!==n.getTextContentSize())&&e?k(this.getTag()):(0,l.lJ7)(),o=this.getDirection();if(i.setDirection(o),this.insertAfter(i,t),0===r&&!this.isEmpty()&&e){let e=(0,l.lJ7)();e.select(),this.replace(e,!0)}return i}collapseAtStart(){let e=this.isEmpty()?(0,l.lJ7)():k(this.getTag());
24return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}extractWithChild(){return!0}}function x(e){return"span"===e.nodeName.toLowerCase()&&"26pt"===e.style.fontSize}function S(e){let t=e.nodeName.toLowerCase(),r=null;return"h1"!==t&&"h2"!==t&&"h3"!==t&&"h4"!==t&&"h5"!==t&&"h6"!==t||(r=k(t),null!==e.style&&((0,l.dxY)(e,r),r.setFormat(e.style.textAlign))),{node:r}}function C(e){let t=b();return null!==e.style&&(t.setFormat(e.style.textAlign),(0,l.dxY)(e,t)),{node:t}}function k(e="h1"){return(0,l.pTq)(new w(e))}function T(e){return e instanceof w}function E(e){let t=null;if((0,o.xj)(e,DragEvent)?t=e.dataTransfer:(0,o.xj)(e,ClipboardEvent)&&(t=e.clipboardData),null===t)return[!1,[],!1];let r=t.types,n=r.includes("Files"),i=r.includes("text/html")||r.includes("text/plain");return[n,Array.from(t.files),i]}function N(e){let t=(0,l.vJq)();if(!(0,l.I2P)(t))return!1;let r=new Set,n=t.getNodes();for(let t=0;t<n.length;t++){let i=n[t],a=i.getKey();if(r.has(a))continue;let u=(0,o.Bt)(i,e=>(0,l.ff4)(e)&&!e.isInline());if(null===u)continue;let c=u.getKey();u.canIndent()&&!r.has(c)&&(r.add(c),e(u))}return r.size>0}function P(e){let t=(0,l.xL4)(e);return(0,l.Cyw)(t)}function $(e){for(let t of["lowercase","uppercase","capitalize"])e.hasFormat(t)&&e.toggleFormat(t)}function A(e){return(0,o.Sd)(e.registerCommand(l.d8p,e=>{let t=(0,l.vJq)();return!!(0,l.RTZ)(t)&&(t.clear(),!0)},0),e.registerCommand(l.WuB,e=>{let t=(0,l.vJq)();return(0,l.I2P)(t)?(t.deleteCharacter(e),!0):!!(0,l.RTZ)(t)&&(t.deleteNodes(),!0)},l.jZM),e.registerCommand(l.hi0,e=>{let t=(0,l.vJq)();return!!(0,l.I2P)(t)&&(t.deleteWord(e),!0)},l.jZM),e.registerCommand(l.viC,e=>{let t=(0,l.vJq)();return!!(0,l.I2P)(t)&&(t.deleteLine(e),!0)},l.jZM),e.registerCommand(l.bM3,t=>{let r=(0,l.vJq)();if("string"==typeof t)null!==r&&r.insertText(t);else{if(null===r)return!1;let i=t.dataTransfer;if(null!=i)(0,n.Bi)(i,r,e);else if((0,l.I2P)(r)){let e=t.data;return e&&r.insertText(e),!0}}return!0},l.jZM),e.registerCommand(l.$ey,()=>{let e=(0,l.vJq)();return!!(0,l.I2P)(e)&&(e.removeText(),!0)},l.jZM),e.registerCommand(l.mB,e=>{let t=(0,l.vJq)();return!!(0,l.I2P)(t)&&(t.formatText(e),!0)},l.jZM),e.registerCommand(l.fUS,e=>{let t=(0,l.vJq)();if(!(0,l.I2P)(t)&&!(0,l.RTZ)(t))return!1;for(let r of t.getNodes()){let t=(0,o.Bt)(r,e=>(0,l.ff4)(e)&&!e.isInline());null!==t&&t.setFormat(e)}return!0},l.jZM),e.registerCommand(l.FEN,e=>{let t=(0,l.vJq)();return!!(0,l.I2P)(t)&&(t.insertLineBreak(e),!0)},l.jZM),e.registerCommand(l.XKQ,()=>{let e=(0,l.vJq)();return!!(0,l.I2P)(e)&&(e.insertParagraph(),!0)},l.jZM),e.registerCommand(l.YW5,()=>((0,l.H2A)([(0,l.ev7)()]),!0),l.jZM),e.registerCommand(l.PiT,()=>N(e=>{let t=e.getIndent();e.setIndent(t+1)}),l.jZM),e.registerCommand(l.sik,()=>N(e=>{let t=e.getIndent();t>0&&e.setIndent(t-1)}),l.jZM),e.registerCommand(l.UDz,e=>{let t=(0,l.vJq)();if((0,l.RTZ)(t)&&!P(e.target)){let e=t.getNodes();if(e.length>0)return e[0].selectPrevious(),!0}else if((0,l.I2P)(t)){let r=(0,l.B$P)(t.focus,!0);if(!e.shiftKey&&(0,l.Cyw)(r)&&!r.isIsolated()&&!r.isInline())return r.selectPrevious(),e.preventDefault(),!0}return!1},l.jZM),e.registerCommand(l.bbF,e=>{let t=(0,l.vJq)();if((0,l.RTZ)(t)){let e=t.getNodes();if(e.length>0)return e[0].selectNext(0,0),!0}else if((0,l.I2P)(t)){if(function(e){let t=e.focus;return"root"===t.key&&t.offset===(0,l.NiT)().getChildrenSize()}(t))return e.preventDefault(),!0;let r=(0,l.B$P)(t.focus,!1);if(!e.shiftKey&&(0,l.Cyw)(r)&&!r.isIsolated()&&!r.isInline())return r.selectNext(),e.preventDefault(),!0}return!1},l.jZM),e.registerCommand(l.AX0,e=>{let t=(0,l.vJq)();if((0,l.RTZ)(t)){let r=t.getNodes();if(r.length>0)return e.preventDefault(),r[0].selectPrevious(),!0}if(!(0,l.I2P)(t))return!1;if((0,i.Cb)(t,!0)){let r=e.shiftKey;return e.preventDefault(),(0,i.Rk)(t,r,!0),!0}return!1},l.jZM),e.registerCommand(l.JM3,e=>{let t=(0,l.vJq)();if((0,l.RTZ)(t)&&!P(e.target)){let r=t.getNodes();if(r.length>0)return e.preventDefault(),r[0].selectNext(0,0),!0}if(!(0,l.I2P)(t))return!1;let r=e.shiftKey;return!!(0,i.Cb)(t,!1)&&(e.preventDefault(),(0,i.Rk)(t,r,!1),!0)},l.jZM),e.registerCommand(l.gCZ,t=>{if(P(t.target))return!1;let r=(0,l.vJq)();if((0,l.I2P)(r)){let{anchor:n}=r,i=n.getNode();if(r.isCollapsed()&&0===n.offset&&!(0,l.hVZ)(i)&&(0,o.mB)(i).getIndent()>0)return t.preventDefault(),e.dispatchCommand(l.sik,void 0);if(p&&"ko-KR"===navigator.language)return!1}else if(!(0,l.RTZ)(r))return!1;return t.preventDefault(),e.dispatchCommand(l.WuB,!0)},l.jZM),e.registerCommand(l.w$Z,t=>{if(P(t.target))return!1;let r=(0,l.vJq)();return!(!(0,l.I2P)(r)&&!(0,l.RTZ)(r))&&(t.preventDefault(),e.dispatchCommand(l.WuB,!1))},l.jZM),e.registerCommand(l.RTo,t=>{let r=(0,l.vJq)();if(!(0,l.I2P)(r))return!1;if($(r),null!==t){if((p||f||m)&&d)return!1;if(t.preventDefault(),t.shiftKey)return e.dispatchCommand(l.FEN,!1)}return e.dispatchCommand(l.XKQ,void 0)},l.jZM),e.registerCommand(l.Q$N,()=>{let t=(0,l.vJq)();return!!(0,l.I2P)(t)&&(e.blur(),!0)},l.jZM),e.registerCommand(l.Sr4,t=>{let[,r]=E(t);if(r.length>0){let n=a(t.clientX,t.clientY);if(null!==n){let{offset:t,node:i}=n,o=(0,l.xL4)(i);if(null!==o){let e=(0,l.uTE)();if((0,l.kFe)(o))e.anchor.set(o.getKey(),t,"text"),e.focus.set(o.getKey(),t,"text");else{let t=o.getParentOrThrow().getKey(),r=o.getIndexWithinParent()+1;e.anchor.set(t,r,"element"),e.focus.set(t,r,"element")}let r=(0,l.CaD)(e);(0,l.n1P)(r)}e.dispatchCommand(y,r)}return t.preventDefault(),!0}let n=(0,l.vJq)();return!!(0,l.I2P)(n)},l.jZM),e.registerCommand(l.TgX,e=>{let[t]=E(e),r=(0,l.vJq)();return!(t&&!(0,l.I2P)(r))},l.jZM),e.registerCommand(l.riq,e=>{let[t]=E(e),r=(0,l.vJq)();if(t&&!(0,l.I2P)(r))return!1;let n=a(e.clientX,e.clientY);if(null!==n){let t=(0,l.xL4)(n.node);(0,l.Cyw)(t)&&e.preventDefault()}return!0},l.jZM),e.registerCommand(l.HYn,()=>((0,l.e1k)(),!0),l.jZM),e.registerCommand(l.u5G,t=>((0,n.lW)(e,(0,o.xj)(t,ClipboardEvent)?t:null),!0),l.jZM),e.registerCommand(l.VSO,t=>((async function(e,t){await (0,n.lW)(t,(0,o.xj)(e,ClipboardEvent)?e:null),t.update(()=>{let e=(0,l.vJq)();
24(0,l.I2P)(e)?e.removeText():(0,l.RTZ)(e)&&e.getNodes().forEach(e=>e.remove())})})(t,e),!0),l.jZM),e.registerCommand(l.waI,t=>{let[,r,i]=E(t);return r.length>0&&!i?(e.dispatchCommand(y,r),!0):!((0,l.vAA)(t.target)&&(0,l.Z$U)(t.target))&&null!==(0,l.vJq)()&&(t.preventDefault(),e.update(()=>{let r=(0,l.vJq)(),i=(0,o.xj)(t,InputEvent)||(0,o.xj)(t,KeyboardEvent)?null:t.clipboardData;null!=i&&null!==r&&(0,n.Bi)(i,r,e)},{tag:"paste"}),!0)},l.jZM),e.registerCommand(l.Huu,e=>{let t=(0,l.vJq)();return(0,l.I2P)(t)&&$(t),!1},l.jZM),e.registerCommand(l.OXk,e=>{let t=(0,l.vJq)();return(0,l.I2P)(t)&&$(t),!1},l.jZM))}},62889:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;let i=r(39997),o=r(51270),l=r(7525),a=r(79772),u=r(73274);function c(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(i.isJSONType))return t;throw Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(n||(t.DataType=n={})),t.getSchemaTypes=function(e){let t=c(e.type);if(t.includes("null")){if(!1===e.nullable)throw Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=c,t.coerceAndCheckDataType=function(e,t){var r,i;let{gen:l,data:u,opts:c}=e,f=(r=t,(i=c.coerceTypes)?r.filter(e=>d.has(e)||"array"===i&&"array"===e):[]),g=t.length>0&&!(0===f.length&&1===t.length&&(0,o.schemaHasRulesForType)(e,t[0]));if(g){let r=p(t,u,c.strictNumbers,n.Wrong);l.if(r,()=>{f.length?function(e,t,r){let{gen:n,data:i,opts:o}=e,l=n.let("dataType",(0,a._)`typeof ${i}`),u=n.let("coerced",(0,a._)`undefined`);for(let e of("array"===o.coerceTypes&&n.if((0,a._)`${l} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,a._)`${i}[0]`).assign(l,(0,a._)`typeof ${i}`).if(p(t,i,o.strictNumbers),()=>n.assign(u,i))),n.if((0,a._)`${u} !== undefined`),r))(d.has(e)||"array"===e&&"array"===o.coerceTypes)&&function(e){switch(e){case"string":n.elseIf((0,a._)`${l} == "number" || ${l} == "boolean"`).assign(u,(0,a._)`"" + ${i}`).elseIf((0,a._)`${i} === null`).assign(u,(0,a._)`""`);return;case"number":n.elseIf((0,a._)`${l} == "boolean" || ${i} === null 25 || (${l} == "string" && ${i} && ${i} == +${i})`).assign(u,(0,a._)`+${i}`);return;case"integer":n.elseIf((0,a._)`${l} === "boolean" || ${i} === null 26 || (${l} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(u,(0,a._)`+${i}`);return;case"boolean":n.elseIf((0,a._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(u,!1).elseIf((0,a._)`${i} === "true" || ${i} === 1`).assign(u,!0);return;case"null":n.elseIf((0,a._)`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(u,null);return;case"array":n.elseIf((0,a._)`${l} === "string" || ${l} === "number" 27 || ${l} === "boolean" || ${i} === null`).assign(u,(0,a._)`[${i}]`)}}(e);n.else(),m(e),n.endIf(),n.if((0,a._)`${u} !== undefined`,()=>{n.assign(i,u),function({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,a._)`${t} !== undefined`,()=>e.assign((0,a._)`${t}[${r}]`,n))}(e,u)})}(e,t,f):m(e)})}return g};let d=new Set(["string","number","integer","boolean","null"]);function f(e,t,r,i=n.Correct){let o,l=i===n.Correct?a.operators.EQ:a.operators.NEQ;switch(e){case"null":return(0,a._)`${t} ${l} null`;case"array":o=(0,a._)`Array.isArray(${t})`;break;case"object":o=(0,a._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=u((0,a._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=u();break;default:return(0,a._)`typeof ${t} ${l} ${e}`}return i===n.Correct?o:(0,a.not)(o);function u(e=a.nil){return(0,a.and)((0,a._)`typeof ${t} == "number"`,e,r?(0,a._)`isFinite(${t})`:a.nil)}}function p(e,t,r,n){let i;if(1===e.length)return f(e[0],t,r,n);let o=(0,u.toHash)(e);if(o.array&&o.object){let e=(0,a._)`typeof ${t} != "object"`;i=o.null?e:(0,a._)`!${t} || ${e}`,delete o.null,delete o.array,delete o.object}else i=a.nil;for(let e in o.number&&delete o.integer,o)i=(0,a.and)(i,f(e,t,r,n));return i}t.checkDataType=f,t.checkDataTypes=p;let g={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?(0,a._)`{type: ${e}}`:(0,a._)`{type: ${t}}`};function m(e){let t=function(e){let{gen:t,data:r,schema:n}=e,i=(0,u.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}(e);(0,l.reportError)(t,g)}t.reportTypeError=m},64101:e=>{"use strict";e.exports=function(e,t){return"string"==typeof e?l(e):"number"==typeof e?o(e,t):null},e.exports.format=o,e.exports.parse=l;var t=/\B(?=(\d{3})+(?!\d))/g,r=/(?:\.0*|(\.[^0]+)0+)$/,n={b:1,kb:1024,mb:1048576,gb:0x40000000,tb:0x10000000000,pb:0x4000000000000},i=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;function o(e,i){if(!Number.isFinite(e))return null;var o=Math.abs(e),l=i&&i.thousandsSeparator||"",a=i&&i.unitSeparator||"",u=i&&void 0!==i.decimalPlaces?i.decimalPlaces:2,c=!!(i&&i.fixedDecimals),d=i&&i.unit||"";d&&n[d.toLowerCase()]||(d=o>=n.pb?"PB":o>=n.tb?"TB":o>=n.gb?"GB":o>=n.mb?"MB":o>=n.kb?"KB":"B");var f=(e/n[d.toLowerCase()]).toFixed(u);return c||(f=f.replace(r,"$1")),l&&(f=f.split(".").map(function(e,r){return 0===r?e.replace(t,l):e}).join(".")),f+a+d}function l(e){if("number"==typeof e&&!isNaN(e))return e;if("string"!=typeof e)return null;var t,r=i.exec(e),o="b";return(r?(t=parseFloat(r[1]),o=r[4].toLowerCase()):(t=parseInt(e,10),o="b"),isNaN(t))?null:Math.floor(n[o]*t)}},64337:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(94271),i=r(41747),o=r(12115);
27function l({hasCellMerge:e=!0,hasCellBackgroundColor:t=!0,hasTabHandler:r=!0,hasHorizontalScroll:l=!1}){let[a]=(0,n.DF)();return(0,o.useEffect)(()=>{(0,i.hi)(a,l)},[a,l]),(0,o.useEffect)(()=>(0,i.xT)(a),[a]),(0,o.useEffect)(()=>(0,i.Ej)(a,r),[a,r]),(0,o.useEffect)(()=>{if(!e)return(0,i.nq)(a)},[a,e]),(0,o.useEffect)(()=>{if(!t)return a.registerNodeTransform(i.B9,e=>{null!==e.getBackgroundColor()&&e.setBackgroundColor(null)})},[a,t,e]),null}},64508:(e,t,r)=>{"use strict";r.d(t,{MetaTitleComponent:()=>g});var n=r(95155),i=r(87677),o=r(58028),l=r(92825),a=r(78234),u=r(12115),c=r(56962),d=r(34564);r(5034);let{maxLength:f,minLength:p}=c.N.title,g=e=>{let{field:{label:t,maxLength:r,minLength:c,required:g},hasGenerateTitleFn:m,readOnly:y}=e,{t:v}=(0,i.d)(),{config:{routes:{api:b},serverURL:_}}=(0,o.b)(),{customComponents:{AfterInput:w,BeforeInput:x,Label:S}={},errorMessage:C,path:k,setValue:T,showError:E,value:N}=(0,l.useField)(),P=(0,l.useLocale)(),{getData:$}=(0,l.useForm)(),A=(0,l.useDocumentInfo)(),{title:O}=(0,l.useDocumentTitle)(),j=c||p,M=r||f,D=(0,u.useCallback)(async()=>{var e;if(!m)return;let t="".concat(_).concat(b,"/plugin-seo/generate-title"),r=await fetch(t,{body:JSON.stringify({id:A.id,collectionSlug:A.collectionSlug,doc:$(),docPermissions:A.docPermissions,globalSlug:A.globalSlug,hasPublishPermission:A.hasPublishPermission,hasSavePermission:A.hasSavePermission,initialData:A.initialData,initialState:(0,a.qg)(null!=(e=A.initialState)?e:{}),locale:"object"==typeof P?null==P?void 0:P.code:P,title:O}),credentials:"include",headers:{"Content-Type":"application/json"},method:"POST"}),{result:n}=await r.json();T(n||"")},[m,_,b,A.id,A.collectionSlug,A.docPermissions,A.globalSlug,A.hasPublishPermission,A.hasSavePermission,A.initialData,A.initialState,$,P,T,O]);return(0,n.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,n.jsxs)("div",{style:{marginBottom:"5px",position:"relative"},children:[(0,n.jsxs)("div",{className:"plugin-seo__field",children:[null!=S?S:(0,n.jsx)(l.FieldLabel,{label:t,path:k,required:g}),m&&(0,n.jsxs)(u.Fragment,{children:["\xa0 â \xa0",(0,n.jsx)("button",{disabled:y,onClick:()=>{D()},style:{background:"none",backgroundColor:"transparent",border:"none",color:"currentcolor",cursor:"pointer",padding:0,textDecoration:"underline"},type:"button",children:v("plugin-seo:autoGenerate")})]})]}),(0,n.jsxs)("div",{style:{color:"#9A9A9A"},children:[v("plugin-seo:lengthTipTitle",{maxLength:M,minLength:j}),(0,n.jsx)("a",{href:"https://developers.google.com/search/docs/advanced/appearance/title-link#page-titles",rel:"noopener noreferrer",target:"_blank",children:v("plugin-seo:bestPractices")}),"."]})]}),(0,n.jsx)("div",{style:{marginBottom:"10px",position:"relative"},children:(0,n.jsx)(l.TextInput,{AfterInput:w,BeforeInput:x,Error:C,onChange:T,path:k,readOnly:y,required:g,showError:E,style:{marginBottom:0},value:N})}),(0,n.jsx)("div",{style:{alignItems:"center",display:"flex",width:"100%"},children:(0,n.jsx)(d.y,{maxLength:M,minLength:j,text:N})})]})}},64914:(e,t,r)=>{"use strict";r.d(t,{P:()=>n});let n=({field:e,operation:t,parentName:r,permissions:n})=>({operation:!0===n||n?.[t]===!0||n?.[r]===!0||"name"in e&&"object"==typeof n&&n?.[e.name]&&(!0===n[e.name]||t in n[e.name]&&n[e.name][t]),permissions:null==n||!0===n||("name"in e?n[e.name]:n),read:!0===n||n?.read===!0||n?.[r]===!0||"name"in e&&"object"==typeof n&&n?.[e.name]&&(!0===n[e.name]||"read"in n[e.name]&&n[e.name].read)})},65972:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;let n=r(24950),i=r(81708),o=r(79772),l=r(61974),a=r(11930),u=r(73274);function c(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,o._)`${r.scopeValue("wrapper",{ref:t})}.validate`}function d(e,t,r,n){let{gen:a,it:c}=e,{allErrors:d,schemaEnv:f,opts:p}=c,g=p.passContext?l.default.this:o.nil;function m(e){let t=(0,o._)`${e}.errors`;a.assign(l.default.vErrors,(0,o._)`${l.default.vErrors} === null ? ${t} : ${l.default.vErrors}.concat(${t})`),a.assign(l.default.errors,(0,o._)`${l.default.vErrors}.length`)}function y(e){var t;if(!c.opts.unevaluated)return;let n=null==(t=null==r?void 0:r.validate)?void 0:t.evaluated;if(!0!==c.props)if(n&&!n.dynamicProps)void 0!==n.props&&(c.props=u.mergeEvaluated.props(a,n.props,c.props));else{let t=a.var("props",(0,o._)`${e}.evaluated.props`);c.props=u.mergeEvaluated.props(a,t,c.props,o.Name)}if(!0!==c.items)if(n&&!n.dynamicItems)void 0!==n.items&&(c.items=u.mergeEvaluated.items(a,n.items,c.items));else{let t=a.var("items",(0,o._)`${e}.evaluated.items`);c.items=u.mergeEvaluated.items(a,t,c.items,o.Name)}}n?function(){if(!f.$async)throw Error("async schema referenced by sync schema");let r=a.let("valid");a.try(()=>{a.code((0,o._)`await ${(0,i.callValidateCode)(e,t,g)}`),y(t),d||a.assign(r,!0)},e=>{a.if((0,o._)`!(${e} instanceof ${c.ValidationError})`,()=>a.throw(e)),m(e),d||a.assign(r,!1)}),e.ok(r)}
27():e.result((0,i.callValidateCode)(e,t,g),()=>y(t),()=>m(t))}t.getValidate=c,t.callRef=d,t.default={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:i}=e,{baseId:l,schemaEnv:u,validateName:f,opts:p,self:g}=i,{root:m}=u;if(("#"===r||"#/"===r)&&l===m.baseId){if(u===m)return d(e,f,u,u.$async);let r=t.scopeValue("root",{ref:m});return d(e,(0,o._)`${r}.validate`,m,m.$async)}let y=a.resolveRef.call(g,m,l,r);if(void 0===y)throw new n.default(i.opts.uriResolver,l,r);return y instanceof a.SchemaEnv?function(t){let r=c(e,t);d(e,r,t,t.$async)}(y):function(n){let i=t.scopeValue("schema",!0===p.code.source?{ref:n,code:(0,o.stringify)(n)}:{ref:n}),l=t.name("valid"),a=e.subschema({schema:n,dataTypes:[],schemaPath:o.nil,topSchemaRef:i,errSchemaPath:r},l);e.mergeEvaluated(a),e.ok(l)}(y)}}},66183:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;let n=r(79772),i=r(73274),o=r(81708);function l(e,t,r=e.schema){let{gen:o,parentSchema:a,data:u,keyword:c,it:d}=e;(function(e){let{opts:n,errSchemaPath:o}=d,l=r.length,a=l===e.minItems&&(l===e.maxItems||!1===e[t]);if(n.strictTuples&&!a){let e=`"${c}" is ${l}-tuple, but minItems or maxItems/${t} are not specified or different at path "${o}"`;(0,i.checkStrictMode)(d,e,n.strictTuples)}})(a),d.opts.unevaluated&&r.length&&!0!==d.items&&(d.items=i.mergeEvaluated.items(o,r.length,d.items));let f=o.name("valid"),p=o.const("len",(0,n._)`${u}.length`);r.forEach((t,r)=>{(0,i.alwaysValidSchema)(d,t)||(o.if((0,n._)`${p} > ${r}`,()=>e.subschema({keyword:c,schemaProp:r,dataProp:r},f)),e.ok(f))})}t.validateTuple=l,t.default={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return l(e,"additionalItems",t);r.items=!0,(0,i.alwaysValidSchema)(r,t)||e.ok((0,o.validateArray)(e))}}},66534:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;let n=r(7525),i=r(79772),o=r(61974),l={message:"boolean schema is false"};function a(e,t){let{gen:r,data:i}=e;(0,n.reportError)({gen:r,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e},l,void 0,t)}t.topBoolOrEmptySchema=function(e){let{gen:t,schema:r,validateName:n}=e;!1===r?a(e,!1):"object"==typeof r&&!0===r.$async?t.return(o.default.data):(t.assign((0,i._)`${n}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){let{gen:r,schema:n}=e;!1===n?(r.var(t,!1),a(e)):r.var(t,!0)}},66858:(e,t,r)=>{"use strict";r.d(t,{Group:()=>f});var n=r(19749),i=r(95155),o=r(84365),l=r(87677);r(12115);var a=r(20385),u=r(49947),c=r(79615);let d="group-diff",f=e=>{let t,r,f=(0,n.c)(12),{baseVersionField:p,comparisonValue:g,field:m,locale:y,parentIsLocalized:v,versionValue:b}=e,{i18n:_}=(0,l.d)(),{selectedLocales:w}=(0,a.I)();f[0]!==m||f[1]!==_||f[2]!==y?(t="label"in m&&m.label&&"function"!=typeof m.label&&(0,i.jsxs)("span",{children:[y&&(0,i.jsx)("span",{className:"".concat(d,"__locale-label"),children:y}),(0,o.s)(m.label,_)]}),f[0]=m,f[1]=_,f[2]=y,f[3]=t):t=f[3];let x=v||m.localized;return f[4]!==p.fields||f[5]!==m.fields||f[6]!==w||f[7]!==t||f[8]!==x||f[9]!==g||f[10]!==b?(r=(0,i.jsx)("div",{className:d,children:(0,i.jsx)(u.$,{fields:m.fields,Label:t,locales:w,parentIsLocalized:x,valueFrom:g,valueTo:b,children:(0,i.jsx)(c.RenderVersionFieldsToDiff,{versionFields:p.fields})})}),f[4]=p.fields,f[5]=m.fields,f[6]=w,f[7]=t,f[8]=x,f[9]=g,f[10]=b,f[11]=r):r=f[11],r}},66943:(e,t,r)=>{"use strict";function n(e){return function(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;let i=n[0],o=t.match(e.parsePattern);if(!o)return null;let l=e.valueCallback?e.valueCallback(o[0]):o[0];return{value:l=r.valueCallback?r.valueCallback(l):l,rest:t.slice(i.length)}}}r.d(t,{K:()=>n})},67144:(e,t,r)=>{"use strict";r.d(t,{d:()=>n});let n=(e,t)=>t.map(e=>e.replace("*","")).some(t=>e.startsWith(t))},67491:(e,t,r)=>{"use strict";r.d(t,{k:()=>n});let n=({sizes:e,targetSizeMax:t=180,targetSizeMin:r=40,thumbnailURL:n,url:i,width:o})=>n||e&&Object.values(e).reduce((e,n)=>!n.width||n.width<r?e:n.width>=r&&n.width<=t?!e.width||n.width<e.width||e.width<r||e.width>t?n:e:!e.width||!e.original&&e.width<r&&n.width>e.width||e.width>t&&n.width<e.width?n:e,{original:!0,url:i,width:o}).url||i},68539:(e,t,r)=>{"use strict";r.d(t,{DefaultVersionView:()=>$});
27var n=r(95155),i=r(58028),o=r(92825),l=r(87677),a=r(35695),u=r(12115),c=r(84365),d=r(78234),f=r(6001);let p="restore-version",g="restore-version",m=e=>{var t;let{className:r,collectionConfig:m,globalConfig:y,label:v,originalDocID:b,status:_,versionDateFormatted:w,versionID:x}=e,{config:{routes:{admin:S,api:C},serverURL:k}}=(0,i.b)(),{toggleModal:T}=(0,o.useModal)(),E=(0,a.useRouter)(),{i18n:N,t:P}=(0,l.d)(),[$,A]=(0,u.useState)(!1),{startRouteTransition:O}=(0,o.useRouteTransition)(),j=P("version:aboutToRestoreGlobal",{label:(0,c.s)(v,N),versionDate:w}),M="draft"!==_&&(null==m||null==(t=m.versions)?void 0:t.drafts),D=(0,u.useCallback)(async()=>{let e,t="".concat(k).concat(C);m&&(t="".concat(t,"/").concat(m.slug,"/versions/").concat(x,"?draft=").concat($),e=(0,f.Q)({adminRoute:S,path:"/collections/".concat(m.slug,"/").concat(b)})),y&&(t="".concat(t,"/globals/").concat(y.slug,"/versions/").concat(x,"?draft=").concat($),e=(0,f.Q)({adminRoute:S,path:"/globals/".concat(y.slug)}));let r=await d.zG.post(t,{headers:{"Accept-Language":N.language}});if(200===r.status){let t=await r.json();return o.toast.success(t.message),O(()=>E.push(e))}o.toast.error(P("version:problemRestoringVersion"))},[k,C,m,y,N.language,x,$,S,b,O,E,P]);return(0,n.jsxs)(u.Fragment,{children:[(0,n.jsx)("div",{className:[p,r].filter(Boolean).join(" "),children:(0,n.jsx)(o.Button,{buttonStyle:"primary",className:[M&&"".concat(p,"__restore-as-draft-button")].filter(Boolean).join(" "),onClick:()=>T(g),size:"xsmall",SubMenuPopupContent:M?()=>(0,n.jsx)(o.PopupList.ButtonGroup,{children:(0,n.jsx)(o.PopupList.Button,{onClick:()=>[A(!0),T(g)],children:P("version:restoreAsDraft")})}):null,children:P("version:restoreThisVersion")})}),(0,n.jsx)(o.ConfirmationModal,{body:j,confirmingLabel:P("version:restoring"),heading:P("version:confirmVersionRestoration"),modalSlug:g,onConfirm:D})]})};var y=r(19749);let v=e=>{let{depth:t,uuid:r}=e;return"version-drawer_".concat(t,"_").concat(r)},b=e=>{let{collectionSlug:t,docID:r,drawerSlug:i,globalSlug:c}=e,{closeModal:d}=(0,o.useModal)(),f=(0,a.useSearchParams)(),p=(0,u.useRef)(f),{renderDocument:g}=(0,o.useServerFunctions)(),[m,y]=(0,u.useState)(void 0),[v,b]=(0,u.useState)(!0),_=(0,u.useRef)(!1),{t:w}=(0,l.d)(),x=(0,u.useCallback)(e=>{(async()=>{b(!0);try{let r=!!c,n=null!=t?t:c,o=await g({collectionSlug:n,docID:e,drawerSlug:i,paramsOverride:{segments:[r?"globals":"collections",n,r?void 0:String(e),"versions"].filter(Boolean)},redirectAfterDelete:!1,redirectAfterDuplicate:!1,searchParams:Object.fromEntries(f.entries()),versions:{disableGutter:!0,useVersionDrawerCreatedAtCell:!0}});(null==o?void 0:o.Document)&&(y(o.Document),b(!1))}catch(e){o.toast.error((null==e?void 0:e.message)||w("error:unspecific")),d(i)}})()},[d,t,c,i,g,f,w]);return((0,u.useEffect)(()=>{_.current&&p.current===f||(p.current=f,x(r),_.current=!0)},[r,x,f]),v)?(0,n.jsx)(o.LoadingOverlay,{}):m},_=e=>{let t,r=(0,y.c)(6),{collectionSlug:i,docID:a,drawerSlug:u,globalSlug:c}=e,{t:d}=(0,l.d)();return r[0]!==i||r[1]!==a||r[2]!==u||r[3]!==c||r[4]!==d?(t=(0,n.jsx)(o.Drawer,{className:"version-drawer",gutter:!0,slug:u,title:d("version:selectVersionToCompare"),children:(0,n.jsx)(b,{collectionSlug:i,docID:a,drawerSlug:u,globalSlug:c})}),r[0]=i,r[1]=a,r[2]=u,r[3]=c,r[4]=d,r[5]=t):t=r[5],t},w=e=>{let t,r,i,l,a,c,d,f,p,g=(0,y.c)(29),{collectionSlug:m,docID:b,globalSlug:w}=e,x=(0,o.useEditDepth)(),S=(0,u.useId)(),{closeModal:C,modalState:k,openModal:T,toggleModal:E}=(0,o.useModal)(),[N,P]=(0,u.useState)(!1);g[0]!==x||g[1]!==S?(t=v({depth:x,uuid:S}),g[0]=x,g[1]=S,g[2]=t):t=g[2];let $=t;g[3]!==$||g[4]!==k?(r=()=>{var e;P(!!(null==(e=k[$])?void 0:e.isOpen))},i=[k,$],g[3]=$,g[4]=k,g[5]=r,g[6]=i):(r=g[5],i=g[6]),(0,u.useEffect)(r,i),g[7]!==$||g[8]!==E?(l=()=>{E($)},g[7]=$,g[8]=E,g[9]=l):l=g[9];let A=l;g[10]!==C||g[11]!==$?(a=()=>{C($)},g[10]=C,g[11]=$,g[12]=a):a=g[12];let O=a;g[13]!==$||g[14]!==T?(c=()=>{T($)},g[13]=$,g[14]=T,g[15]=c):c=g[15];let j=c;return g[16]!==m||g[17]!==b||g[18]!==$||g[19]!==w?(f=()=>(0,n.jsx)(_,{collectionSlug:m,docID:b,drawerSlug:$,globalSlug:w}),g[16]=m,g[17]=b,g[18]=$,g[19]=w,g[20]=f):f=g[20],d=f,g[21]!==d||g[22]!==O||g[23]!==x||g[24]!==$||g[25]!==N||g[26]!==j||g[27]!==A?(p={closeDrawer:O,Drawer:d,drawerDepth:x,drawerSlug:$,isDrawerOpen:N,openDrawer:j,toggleDrawer:A},g[21]=d,g[22]=O,g[23]=x,g[24]=$,g[25]=N,g[26]=j,g[27]=A,g[28]=p):p=g[28],p},x="compare-version",S=(0,u.memo)(e=>{let{collectionSlug:t,docID:r,globalSlug:i,onChange:a,versionFromID:c,versionFromOptions:d}=e,{t:f}=(0,l.d)(),{Drawer:p,openDrawer:g}=w({collectionSlug:t,docID:r,globalSlug:i}),m=(0,u.useMemo)(()=>[...d,{label:(0,n.jsx)("span",{className:"".concat(x,"-moreVersions"),children:f("version:moreVersions")}),value:"more"}],[f,d]),y=(0,u.useMemo)(()=>d.find(e=>e.value===c),[d,c]),v=(0,u.useCallback)(e=>{if("more"===e.value)return void g();a(e)},[a,g]);
27return(0,n.jsxs)("div",{className:[o.fieldBaseClass,x].filter(Boolean).join(" "),children:[(0,n.jsx)(o.ReactSelect,{isClearable:!1,isSearchable:!1,onChange:v,options:m,placeholder:f("version:selectVersionToCompare"),value:y}),(0,n.jsx)(p,{})]})}),C="select-version-locales",k=e=>{let{locales:t,localeSelectorOpen:r,onChange:i}=e;return(0,n.jsx)(o.AnimateHeight,{className:C,height:r?"auto":0,id:"".concat(C,"-locales"),children:(0,n.jsx)(o.PillSelector,{onClick:e=>{let{pill:r}=e;i({locales:t.map(e=>e.name===r.name?{...e,selected:!r.selected}:e)})},pills:t})})};var T=r(20385),E=r(23999);let N=e=>{let t,r,n=(0,y.c)(13),{id:a,collectionConfig:d,globalConfig:p,versionToCreatedAtFormatted:g,versionToID:m,versionToUseAsTitle:v}=e,{config:b}=(0,i.b)(),{setStepNav:_}=(0,o.useStepNav)(),{i18n:w,t:x}=(0,l.d)(),S=(0,o.useLocale)();return n[0]!==d||n[1]!==b||n[2]!==p||n[3]!==w||n[4]!==a||n[5]!==S||n[6]!==_||n[7]!==x||n[8]!==g||n[9]!==m||n[10]!==v?(t=()=>{let{routes:e}=b,{admin:t}=e;if(d){var r,n;let e=d.slug,i=(null==(r=d.admin)?void 0:r.useAsTitle)||"id",o=null==(n=d.labels)?void 0:n.plural,l="[".concat(x("general:untitled"),"]"),u=d.fields.find(e=>(0,E.Z7)(e)&&"name"in e&&e.name===i);u&&v?l="localized"in u&&u.localized?(null==v?void 0:v[S.code])||l:v:"id"===i&&(l=m),_([{label:(0,c.s)(o,w),url:(0,f.Q)({adminRoute:t,path:"/collections/".concat(e)})},{label:l,url:(0,f.Q)({adminRoute:t,path:"/collections/".concat(e,"/").concat(a)})},{label:"Versions",url:(0,f.Q)({adminRoute:t,path:"/collections/".concat(e,"/").concat(a,"/versions")})},{label:g}]);return}if(p){let e=p.slug;_([{label:p.label,url:(0,f.Q)({adminRoute:t,path:"/globals/".concat(e)})},{label:"Versions",url:(0,f.Q)({adminRoute:t,path:"/globals/".concat(e,"/versions")})},{label:g}])}},r=[b,_,a,S,x,w,d,p,v,g,m],n[0]=d,n[1]=b,n[2]=p,n[3]=w,n[4]=a,n[5]=S,n[6]=_,n[7]=x,n[8]=g,n[9]=m,n[10]=v,n[11]=t,n[12]=r):(t=n[11],r=n[12]),(0,u.useEffect)(t,r),null},P="view-version",$=e=>{let{canUpdate:t,modifiedOnly:r,RenderedDiff:c,selectedLocales:d,versionFromCreatedAt:f,versionFromID:p,versionFromOptions:g,versionToCreatedAt:y,versionToCreatedAtFormatted:v,VersionToCreatedAtLabel:b,versionToID:_,versionToStatus:w,versionToUseAsTitle:x}=e,{config:C,getEntityConfig:E}=(0,i.b)(),{code:$}=(0,o.useLocale)(),{i18n:A,t:O}=(0,l.d)(),[j,M]=(0,u.useState)([]),[D,R]=u.useState(!1);(0,u.useEffect)(()=>{C.localization&&M(C.localization.locales.map(e=>{let t=e.label;return"string"!=typeof e.label&&e.label[$]&&(t=e.label[$]),{name:e.code,Label:t,selected:d.includes(e.code)}}))},[$,C.localization,d]);let{id:I,collectionSlug:F,globalSlug:L}=(0,o.useDocumentInfo)(),{startRouteTransition:B}=(0,o.useRouteTransition)(),{collectionConfig:z,globalConfig:U}=(0,u.useMemo)(()=>({collectionConfig:E({collectionSlug:F}),globalConfig:E({globalSlug:L})}),[F,L,E]),K=(0,a.useRouter)(),W=(0,a.usePathname)(),q=(0,a.useSearchParams)(),[V,J]=(0,u.useState)(r),H=(0,u.useCallback)(e=>{let t=new URLSearchParams(Array.from(q.entries()));if((null==e?void 0:e.versionFromID)&&t.set("versionFrom",null==e?void 0:e.versionFromID),null==e?void 0:e.selectedLocales)if(e.selectedLocales.length){let r=[];for(let t of e.selectedLocales)t.selected&&r.push(t.name);t.set("localeCodes",JSON.stringify(r))}else t.delete("localeCodes");(null==e?void 0:e.modifiedOnly)===!1?t.set("modifiedOnly","false"):(null==e?void 0:e.modifiedOnly)===!0&&t.delete("modifiedOnly");let r=t.toString(),n=r?"?".concat(r):"";B(()=>K.push("".concat(W).concat(n)))},[W,K,q,B]),G=(0,u.useCallback)(e=>{let t=e.target.checked;J(t),H({modifiedOnly:t})},[H]),Y=(0,u.useCallback)(e=>{let{locales:t}=e;M(t),H({selectedLocales:t})},[H]),Z=(0,u.useCallback)(e=>{H({versionFromID:e.value})},[H]),{localization:X}=C,Q=(0,u.useMemo)(()=>O("version:versionAgo",{distance:(0,o.formatTimeToNow)({date:y,i18n:A})}),[y,A,O]),ee=(0,u.useMemo)(()=>f?O("version:versionAgo",{distance:(0,o.formatTimeToNow)({date:f,i18n:A})}):void 0,[f,A,O]);return(0,n.jsxs)("main",{className:P,children:[(0,n.jsxs)(o.Gutter,{className:"".concat(P,"-control
27s-top"),children:[(0,n.jsxs)("div",{className:"".concat(P,"-controls-top__wrapper"),children:[(0,n.jsx)("h2",{children:A.t("version:compareVersions")}),(0,n.jsxs)("div",{className:"".concat(P,"-controls-top__wrapper-actions"),children:[(0,n.jsx)("span",{className:"".concat(P,"__modifiedCheckBox"),children:(0,n.jsx)(o.CheckboxInput,{checked:V,id:"modifiedOnly",label:A.t("version:modifiedOnly"),onToggle:G})}),X&&(0,n.jsxs)(o.Pill,{"aria-controls":"".concat(P,"-locales"),"aria-expanded":D,className:"".concat(P,"__toggle-locales"),icon:(0,n.jsx)(o.ChevronIcon,{direction:D?"up":"down"}),onClick:()=>R(e=>!e),pillStyle:"light",size:"small",children:[(0,n.jsxs)("span",{className:"".concat(P,"__toggle-locales-label"),children:[O("general:locales"),":"," "]}),(0,n.jsx)("span",{className:"".concat(P,"__toggle-locales-list"),children:j.filter(e=>e.selected).map(e=>e.name).join(", ")})]})]})]}),X&&(0,n.jsx)(k,{locales:j,localeSelectorOpen:D,onChange:Y})]}),(0,n.jsx)(o.Gutter,{className:"".concat(P,"-controls-bottom"),children:(0,n.jsxs)("div",{className:"".concat(P,"-control
27s-bottom__wrapper"),children:[(0,n.jsxs)("div",{className:"".concat(P,"__version-from"),children:[(0,n.jsxs)("div",{className:"".concat(P,"__version-from-labels"),children:[(0,n.jsx)("span",{children:O("version:comparingAgainst")}),ee&&(0,n.jsx)("span",{className:"".concat(P,"__time-elapsed"),children:ee})]}),(0,n.jsx)(S,{collectionSlug:F,docID:I,globalSlug:L,onChange:Z,versionFromID:p,versionFromOptions:g})]}),(0,n.jsxs)("div",{className:"".concat(P,"__version-to"),children:[(0,n.jsxs)("div",{className:"".concat(P,"__version-to-labels"),children:[(0,n.jsx)("span",{children:O("version:currentlyViewing")}),(0,n.jsx)("span",{className:"".concat(P,"__time-elapsed"),children:Q})]}),(0,n.jsxs)("div",{className:"".concat(P,"__version-to-version"),children:[b,t&&(0,n.jsx)(m,{className:"".concat(P,"__restore"),collectionConfig:z,globalConfig:U,label:(null==z?void 0:z.labels.singular)||(null==U?void 0:U.label),originalDocID:I,status:w,versionDateFormatted:v,versionID:_})]})]})]})}),(0,n.jsx)(N,{collectionConfig:z,globalConfig:U,id:I,versionToCreatedAtFormatted:v,versionToID:_,versionToUseAsTitle:x}),(0,n.jsx)(o.Gutter,{className:"".concat(P,"__diff-wrap"),children:(0,n.jsx)(T.a,{value:{selectedLocales:j.map(e=>e.name)},children:y&&c})})]})}},69717:(e,t,r)=>{"use strict";r.d(t,{d:()=>o,g:()=>l});var n=r(61731),i=r(32532);function o(e,t){let r=t.body?t.body.childNodes:[],n=[],o=[];for(let t=0;t<r.length;t++){let l=r[t];if(!a.has(l.nodeName)){let t=function e(t,r,n,o,l=new Map,u){let c=[];if(a.has(t.nodeName))return c;let d=null,f=function(e,t){let{nodeName:r}=e,n=t._htmlConversions.get(r.toLowerCase()),i=null;if(void 0!==n)for(let t of n){let r=t(e);null!==r&&(null===i||(i.priority||0)<=(r.priority||0))&&(i=r)}return null!==i?i.conversion:null}(t,r),p=f?f(t):null,g=null;if(null!==p){g=p.after;let e=p.node;if(null!==(d=Array.isArray(e)?e[e.length-1]:e)){for(let[,e]of l)if(!(d=e(d,u)))break;d&&c.push(...Array.isArray(e)?e:[d])}null!=p.forChild&&l.set(t.nodeName,p.forChild)}let m=t.childNodes,y=[],v=(null==d||!(0,i.IqF)(d))&&(null!=d&&(0,i.y68)(d)||o);for(let t=0;t<m.length;t++)y.push(...e(m[t],r,n,v,new Map(l),d));return null!=g&&(y=g(y)),(0,i.a9V)(t)&&(y=function(e,t,r){let n=e.style.textAlign,o=[],l=[];for(let e=0;e<t.length;e++){let a=t[e];if((0,i.y68)(a))n&&!a.getFormat()&&a.setFormat(n),o.push(a);else if(l.push(a),e===t.length-1||e<t.length-1&&(0,i.y68)(t[e+1])){let e=r();e.setFormat(n),e.append(...l),o.push(e),l=[]}}return o}(t,y,v?()=>{let e=new i.A7V;return n.push(e),e}:i.lJ7)),null==d?y.length>0?c=c.concat(y):(0,i.a9V)(t)&&null!=t.nextSibling&&null!=t.previousSibling&&(0,i._On)(t.nextSibling)&&(0,i._On)(t.previousSibling)&&(c=c.concat((0,i.WKo)())):(0,i.ff4)(d)&&d.append(...y),c}(l,e,o,!1);null!==t&&(n=n.concat(t))}}return function(e){for(let t of e)t.getNextSibling()instanceof i.A7V&&t.insertAfter((0,i.WKo)());for(let t of e){for(let e of t.getChildren())t.insertBefore(e);t.remove()}}(o),n}function l(e,t){if("undefined"==typeof document||"undefined"==typeof window&&void 0===global.window)throw Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");let r=document.createElement("div"),o=(0,i.NiT)().getChildren();for(let l=0;l<o.length;l++)!function e(t,r,o,l=null){let a=null===l||r.isSelected(l),u=(0,i.ff4)(r)&&r.excludeFromCopy("html"),c=r;if(null!==l){let e=(0,i.BEs)(r);c=e=(0,i.kFe)(e)&&null!==l?(0,n.SD)(l,e):e}let d=(0,i.ff4)(c)?c.getChildren():[],f=t._nodes.get(c.getType()),{element:p,after:g}=f&&void 0!==f.exportDOM?f.exportDOM(t,c):c.exportDOM(t);if(!p)return!1;let m=document.createDocumentFragment();for(let n=0;n<d.length;n++){let o=d[n],u=e(t,o,m,l);!a&&(0,i.ff4)(r)&&u&&r.extractWithChild(o,l,"html")&&(a=!0)}if(a&&!u){if(((0,i.sby)(p)||(0,i.K8K)(p))&&p.append(m),o.append(p),g){let e=g.call(c,p);e&&((0,i.K8K)(p)?p.replaceChildren(e):p.replaceWith(e))}}else o.append(m);return a}(e,o[l],r,t);return r.innerHTML}let a=new Set(["STYLE","SCRIPT"])},70247:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;let n=r(79772),i=r(73274);function o(e,t,r){let{gen:o,compositeRule:l,data:a,opts:u}=e;if(void 0===r)return;let c=(0,n._)`${a}${(0,n.getProperty)(t)}`;if(l)return void(0,i.checkStrictMode)(e,`default is ignored for: ${c}`);let d=(0,n._)`${c} === undefined`;"empty"===u.useDefaults&&(d=(0,n._)`${d} || ${c} === null || ${c} === ""`),o.if(d,(0,n._)`${c} = ${(0,n.stringify)(r)}`)}t.assignDefaults=function(e,t){let{properties:r,items:n}=e.schema;if("object"===t&&r)for(let t in r)o(e,t,r[t].default);
27else"array"===t&&Array.isArray(n)&&n.forEach((t,r)=>o(e,r,t.default))}},70893:(e,t,r)=>{"use strict";r.d(t,{DE:()=>$,HY:()=>A,Mz:()=>C,YW:()=>b,cz:()=>R,i:()=>S,mJ:()=>M,q7:()=>O,us:()=>I,v5:()=>k,x:()=>j});var n=r(92749),i=r(32532),o=r(61731);function l(e,...t){let r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;for(let r of(n.append("code",e),t))n.append("v",r);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function a(e){let t=e.getParent();A(t)||l(40);let r=t;for(;null!==r;)A(r=r.getParent())&&(t=r);return t}function u(e){return C(e)&&A(e.getFirstChild())}function c(e){return S().append(e)}function d(e,t){return C(e)&&(0===t.length||1===t.length&&e.is(t[0])&&0===e.getChildrenSize())}function f(e){let t=(0,i.vJq)();if(null!==t){let r=t.getNodes();if((0,i.I2P)(t)){let n=t.getStartEndPoints();null===n&&l(143);let[o]=n,a=o.getNode(),u=a.getParent();if((0,i.IqF)(a)){let e=a.getFirstChild();if(e)r=e.selectStart().getNodes();else{let e=(0,i.lJ7)();a.append(e),r=e.select().getNodes()}}else if(d(a,r)){let t=$(e);if((0,i.IqF)(u)){a.replace(t);let e=S();(0,i.ff4)(a)&&(e.setFormat(a.getFormatType()),e.setIndent(a.getIndent())),t.append(e)}else if(C(a)){let e=a.getParentOrThrow();p(t,e.getChildren()),e.replace(t)}return}}let n=new Set;for(let t=0;t<r.length;t++){let o=r[t];if(!(0,i.ff4)(o)||!o.isEmpty()||C(o)||n.has(o.getKey())){if((0,i.jG6)(o)){let t=o.getParent();for(;null!=t;){let r=t.getKey();if(A(t)){if(!n.has(r)){let i=$(e);p(i,t.getChildren()),t.replace(i),n.add(r)}break}{let o=t.getParent();if((0,i.IqF)(o)&&!n.has(r)){n.add(r),g(t,e);break}t=o}}}}else g(o,e)}}}function p(e,t){e.splice(e.getChildrenSize(),0,t)}function g(e,t){let r;if(A(e))return e;let n=e.getPreviousSibling(),i=e.getNextSibling(),o=S();if(p(o,e.getChildren()),A(n)&&t===n.getListType())n.append(o),A(i)&&t===i.getListType()&&(p(n,i.getChildren()),i.remove()),r=n;else if(A(i)&&t===i.getListType())i.getFirstChildOrThrow().insertBefore(o),r=i;else{let n=$(t);n.append(o),e.replace(n),r=n}return o.setFormat(e.getFormatType()),o.setIndent(e.getIndent()),e.remove(),r}function m(e,t){let r=e.getLastChild(),n=t.getFirstChild();r&&n&&u(r)&&u(n)&&(m(r.getFirstChild(),n.getFirstChild()),n.remove());let i=t.getChildren();i.length>0&&e.append(...i),t.remove()}function y(...e){let t=[];for(let r of e)if(r&&"string"==typeof r)for(let[e]of r.matchAll(/\S+/g))t.push(e);return t}function v(e,t,r){let n=(0,o.Wh)(t.__textStyle);for(let t in n)e.style.setProperty(`--listitem-marker-${t}`,n[t]);if(r)for(let t in(0,o.Wh)(r.__textStyle))t in n||e.style.removeProperty(`--listitem-marker-${t}`)}class b extends i.fGB{static getType(){return"listitem"}static clone(e){return new b(e.__value,e.__checked,e.__key)}constructor(e,t,r){super(r),this.__value=void 0===e?1:e,this.__checked=t}createDOM(e){let t=document.createElement("li"),r=this.getParent();A(r)&&"check"===r.getListType()&&w(t,this,null),t.value=this.__value,_(t,e.theme,this);let n=this.__style;return n&&(t.style.cssText=n),v(t,this,null),t}updateDOM(e,t,r){let n=this.getParent();A(n)&&"check"===n.getListType()&&w(t,this,e),t.value=this.__value,_(t,r.theme,this);let i=e.__style,o=this.__style;return i!==o&&(""===o?t.removeAttribute("style"):t.style.cssText=o),v(t,this,e),!1}static transform(){return e=>{if(C(e)||l(144),null==e.__checked)return;let t=e.getParent();A(t)&&"check"!==t.getListType()&&null!=e.getChecked()&&e.setChecked(void 0)}}static importDOM(){return{li:()=>({conversion:x,priority:0})}}static importJSON(e){return S().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setValue(e.value).setChecked(e.checked)}exportDOM(e){let t=this.createDOM(e._config);t.style.textAlign=this.getFormatType();let r=this.getDirection();return r&&(t.dir=r),{element:t}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...e){for(let t=0;t<e.length;t++){let r=e[t];if((0,i.ff4)(r)&&this.canMergeWith(r)){let e=r.getChildren();this.append(...e),r.remove()}else super.append(r)}return this}replace(e,t){if(C(e))return super.replace(e);this.setIndent(0);let r=this.getParentOrThrow();if(!A(r))return e;if(r.__first===this.getKey())r.insertBefore(e);else if(r.__last===this.getKey())r.insertAfter(e);else{let t=$(r.getListType()),n=this.getNextSibling();for(;n;){let e=n;n=n.getNextSibling(),t.append(e)}r.insertAfter(e),e.insertAfter(t)}
27return t&&((0,i.ff4)(e)||l(139),this.getChildren().forEach(t=>{e.append(t)})),this.remove(),0===r.getChildrenSize()&&r.remove(),e}insertAfter(e,t=!0){let r=this.getParentOrThrow();if(A(r)||l(39),C(e))return super.insertAfter(e,t);let n=this.getNextSiblings();if(r.insertAfter(e,t),0!==n.length){let i=$(r.getListType());n.forEach(e=>i.append(e)),e.insertAfter(i,t)}return e}remove(e){let t=this.getPreviousSibling(),r=this.getNextSibling();super.remove(e),t&&r&&u(t)&&u(r)&&(m(t.getFirstChild(),r.getFirstChild()),r.remove())}insertNewAfter(e,t=!0){let r=S().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked()&&void 0);return this.insertAfter(r,t),r}collapseAtStart(e){let t=(0,i.lJ7)();this.getChildren().forEach(e=>t.append(e));let r=this.getParentOrThrow(),n=r.getParentOrThrow(),o=C(n);if(1===r.getChildrenSize())if(o)r.remove(),n.select();else{r.insertBefore(t),r.remove();let n=e.anchor,i=e.focus,o=t.getKey();"element"===n.type&&n.getNode().is(this)&&n.set(o,n.offset,"element"),"element"===i.type&&i.getNode().is(this)&&i.set(o,i.offset,"element")}else r.insertBefore(t),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(e){let t=this.getWritable();return t.__value=e,t}getChecked(){let e,t=this.getLatest(),r=this.getParent();return A(r)&&(e=r.getListType()),"check"===e?!!t.__checked:void 0}setChecked(e){let t=this.getWritable();return t.__checked=e,t}toggleChecked(){let e=this.getWritable();return e.setChecked(!e.__checked)}getIndent(){let e=this.getParent();if(null===e||!this.isAttached())return this.getLatest().__indent;let t=e.getParentOrThrow(),r=0;for(;C(t);)t=t.getParentOrThrow().getParentOrThrow(),r++;return r}setIndent(e){"number"!=typeof e&&l(117),(e=Math.floor(e))>=0||l(199);let t=this.getIndent();for(;t!==e;)t<e?(function(e){let t=new Set;if(u(e)||t.has(e.getKey()))return;let r=e.getParent(),n=e.getNextSibling(),i=e.getPreviousSibling();if(u(n)&&u(i)){let r=i.getFirstChild();if(A(r)){r.append(e);let i=n.getFirstChild();A(i)&&(p(r,i.getChildren()),n.remove(),t.add(n.getKey()))}}else if(u(n)){let t=n.getFirstChild();if(A(t)){let r=t.getFirstChild();null!==r&&r.insertBefore(e)}}else if(u(i)){let t=i.getFirstChild();A(t)&&t.append(e)}else if(A(r)){let t=S().setTextFormat(r.getTextFormat()).setTextStyle(r.getTextStyle()),o=$(r.getListType()).setTextFormat(r.getTextFormat()).setTextStyle(r.getTextStyle());t.append(o),o.append(e),i?i.insertAfter(t):n?n.insertBefore(t):r.append(t)}}(this),t++):(function(e){if(u(e))return;let t=e.getParent(),r=t?t.getParent():void 0;if(A(r?r.getParent():void 0)&&C(r)&&A(t)){let n=t?t.getFirstChild():void 0,i=t?t.getLastChild():void 0;if(e.is(n))r.insertBefore(e),t.isEmpty()&&r.remove();else if(e.is(i))r.insertAfter(e),t.isEmpty()&&r.remove();else{let n=t.getListType(),i=S(),o=$(n);
27i.append(o),e.getPreviousSiblings().forEach(e=>o.append(e));let l=S(),a=$(n);l.append(a),p(a,e.getNextSiblings()),r.insertBefore(i),r.insertAfter(l),r.replace(e)}}}(this),t--);return this}canInsertAfter(e){return C(e)}canReplaceWith(e){return C(e)}canMergeWith(e){return C(e)||(0,i.bSg)(e)}extractWithChild(e,t){if(!(0,i.I2P)(t))return!1;let r=t.anchor.getNode(),n=t.focus.getNode();return this.isParentOf(r)&&this.isParentOf(n)&&this.getTextContent().length===t.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return $("bullet")}canMergeWhenEmpty(){return!0}}function _(e,t,r){let i,o=[],l=[],a=t.list,u=a?a.listitem:void 0;if(a&&a.nested&&(i=a.nested.listitem),void 0!==u&&o.push(...y(u)),a){let e=r.getParent(),t=A(e)&&"check"===e.getListType(),n=r.getChecked();t&&!n||l.push(a.listitemUnchecked),t&&n||l.push(a.listitemChecked),t&&o.push(n?a.listitemChecked:a.listitemUnchecked)}if(void 0!==i){let e=y(i);r.getChildren().some(e=>A(e))?o.push(...e):l.push(...e)}l.length>0&&(0,n.HE)(e,...l),o.length>0&&(0,n.ZB)(e,...o)}function w(e,t,r,n){A(t.getFirstChild())?(e.removeAttribute("role"),e.removeAttribute("tabIndex"),e.removeAttribute("aria-checked")):(e.setAttribute("role","checkbox"),e.setAttribute("tabIndex","-1"),r&&t.__checked===r.__checked||e.setAttribute("aria-checked",t.getChecked()?"true":"false"))}function x(e){if(e.classList.contains("task-list-item")){for(let r of e.children)if("INPUT"===r.tagName){var t;return"checkbox"!==(t=r).getAttribute("type")?{node:null}:{node:S(t.hasAttribute("checked"))}}}let r=e.getAttribute("aria-checked");return{node:S("true"===r||"false"!==r&&void 0)}}function S(e){return(0,i.pTq)(new b(void 0,e))}function C(e){return e instanceof b}class k extends i.fGB{static getType(){return"list"}static clone(e){return new k(e.__listType||P[e.__tag],e.__start,e.__key)}constructor(e="number",t=1,r){super(r);let n=P[e]||e;this.__listType=n,this.__tag="number"===n?"ol":"ul",this.__start=t}getTag(){return this.__tag}setListType(e){let t=this.getWritable();return t.__listType=e,t.__tag="number"===e?"ol":"ul",t}getListType(){return this.__listType}getStart(){return this.__start}setStart(e){let t=this.getWritable();return t.__start=e,t}createDOM(e,t){let r=this.__tag,n=document.createElement(r);return 1!==this.__start&&n.setAttribute("start",String(this.__start)),n.__lexicalListType=this.__listType,T(n,e.theme,this),n}updateDOM(e,t,r){return e.__tag!==this.__tag||(T(t,r.theme,this),!1)}static transform(){return e=>{A(e)||l(163),function(e){let t=e.getNextSibling();A(t)&&e.getListType()===t.getListType()&&m(e,t)}(e),function(e){let t="check"!==e.getListType(),r=e.getStart();for(let n of e.getChildren())C(n)&&(n.getValue()!==r&&n.setValue(r),t&&null!=n.getLatest().__checked&&n.setChecked(void 0),A(n.getFirstChild())||r++)}(e)}}static importDOM(){return{ol:()=>({conversion:N,priority:0}),ul:()=>({conversion:N,priority:0})}}static importJSON(e){return $().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setListType(e.listType).setStart(e.start)}exportDOM(e){let t=this.createDOM(e._config,e);return(0,i.sby)(t)&&(1!==this.__start&&t.setAttribute("start",String(this.__start)),"check"===this.__listType&&t.setAttribute("__lexicalListType","check")),{element:t}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(e,t,r){let n=r;for(let e=0;e<r.length;e++){let t=r[e];C(t)||(n===r&&(n=[...r]),n[e]=S().append(!(0,i.ff4)(t)||A(t)||t.isInline()?t:(0,i.sTu)(t.getTextContent())))}return super.splice(e,t,n)}extractWithChild(e){return C(e)}}function T(e,t,r){let i=[],o=[],a=t.list;if(void 0!==a){let e,t=a[`${r.__tag}Depth`]||[],n=function(e){let t=1,r=e.getParent();for(;null!=r;){if(C(r)){let e=r.getParent();if(A(e)){t++,r=e.getParent();continue}l(40)}break}return t}(r)-1,u=n%t.length,c=t[u],d=a[r.__tag],f=a.nested,p=a.checklist;if(void 0!==f&&f.list&&(e=f.list),void 0!==d&&i.push(d),void 0!==p&&"check"===r.__listType&&i.push(p),void 0!==c){i.push(...y(c));for(let e=0;e<t.length;e++)e!==u&&o.push(r.__tag+e)}if(void 0!==e){let t=y(e);n>1?i.push(...t):o.push(...t)}}o.length>0&&(0,n.HE)(e,...o),i.length>0&&(0,n.ZB)(e,...i)}function E(e){let t=[];for(let r=0;r<e.length;r++){let n=e[r];if(C(n)){t.push(n);let e=n.getChildren();e.length>
271&&e.forEach(e=>{A(e)&&t.push(c(e))})}else t.push(c(n))}return t}function N(e){let t=e.nodeName.toLowerCase(),r=null;return"ol"===t?r=$("number",e.start):"ul"===t&&(r=!function(e){if("check"===e.getAttribute("__lexicallisttype")||e.classList.contains("contains-task-list"))return!0;for(let t of e.childNodes)if((0,i.sby)(t)&&t.hasAttribute("aria-checked"))return!0;return!1}(e)?$("bullet"):$("check")),{after:E,node:r}}let P={ol:"number",ul:"bullet"};function $(e="number",t=1){return(0,i.pTq)(new k(e,t))}function A(e){return e instanceof k}let O=(0,i.guI)("INSERT_UNORDERED_LIST_COMMAND"),j=(0,i.guI)("INSERT_ORDERED_LIST_COMMAND"),M=(0,i.guI)("INSERT_CHECK_LIST_COMMAND"),D=(0,i.guI)("REMOVE_LIST_COMMAND");function R(e){return(0,n.Sd)(e.registerCommand(j,()=>(f("number"),!0),i.AcJ),e.registerCommand(O,()=>(f("bullet"),!0),i.AcJ),e.registerCommand(D,()=>((function(){let e=(0,i.vJq)();if((0,i.I2P)(e)){let t=new Set,r=e.getNodes(),o=e.anchor.getNode();if(d(o,r))t.add(a(o));else for(let e=0;e<r.length;e++){let o=r[e];if((0,i.jG6)(o)){let e=(0,n.eu)(o,b);null!=e&&t.add(a(e))}}for(let r of t){let t=r;for(let n of function e(t){let r=[],n=t.getChildren().filter(C);for(let t=0;t<n.length;t++){let i=n[t],o=i.getFirstChild();A(o)?r=r.concat(e(o)):r.push(i)}return r}(r)){let r=(0,i.lJ7)().setTextStyle(e.style).setTextFormat(e.format);p(r,n.getChildren()),t.insertAfter(r),t=r,n.__key===e.anchor.key&&(0,i.wp6)(e.anchor,(0,i.lSZ)((0,i.uwZ)(r,"next"))),n.__key===e.focus.key&&(0,i.wp6)(e.focus,(0,i.lSZ)((0,i.uwZ)(r,"next"))),n.remove()}r.remove()}}})(),!0),i.AcJ),e.registerCommand(i.XKQ,()=>(function(){let e,t=(0,i.vJq)();if(!(0,i.I2P)(t)||!t.isCollapsed())return!1;let r=t.anchor.getNode();if(!C(r)||0!==r.getChildrenSize())return!1;let n=a(r),o=r.getParent();A(o)||l(40);let u=o.getParent();if((0,i.IqF)(u))e=(0,i.lJ7)(),n.insertAfter(e);else{if(!C(u))return!1;e=S(),u.insertAfter(e)}e.setTextStyle(t.style).setTextFormat(t.format).select();let c=r.getNextSiblings();if(c.length>0){let t=$(o.getListType());if(C(e)){let r=S();r.append(t),e.insertAfter(r)}else e.insertAfter(t);t.append(...c)}return function(e){let t=e;for(;null==t.getNextSibling()&&null==t.getPreviousSibling();){let e=t.getParent();if(null==e||!C(e)&&!A(e))break;t=e}t.remove()}(r),!0})(),i.AcJ),e.registerNodeTransform(b,e=>{let t=e.getFirstChild();if(t){if((0,i.kFe)(t)){let r=t.getStyle(),n=t.getFormat();e.getTextStyle()!==r&&e.setTextStyle(r),e.getTextFormat()!==n&&e.setTextFormat(n)}}else{let t=(0,i.vJq)();(0,i.I2P)(t)&&(t.style!==e.getTextStyle()||t.format!==e.getTextFormat())&&t.isCollapsed()&&e.is(t.anchor.getNode())&&e.setTextStyle(t.style).setTextFormat(t.format)}}),e.registerNodeTransform(i.Ey8,e=>{let t=e.getParent();if(C(t)&&e.is(t.getFirstChild())){let r=e.getStyle(),n=e.getFormat();r===t.getTextStyle()&&n===t.getTextFormat()||t.setTextStyle(r).setTextFormat(n)}}))}function I(e,t){e.update(()=>f(t))}},72823:(e,t,r)=>{"use strict";r.d(t,{DefaultNavClient:()=>g});var n=r(19749),i=r(95155),o=r(84365),l=r(58028),a=r(87677),u=r(92825),c=r(78234),d=r(35695),f=r(6001),p=r(12115);let g=e=>{let t,r,g,m,y=(0,n.c)(21),{groups:v,navPreferences:b}=e,_=(0,d.usePathname)(),{config:w}=(0,l.b)(),{admin:x,folders:S,routes:C}=w,{routes:k}=x,{browseByFolder:T}=k,{admin:E}=C,{i18n:N}=(0,a.d)();if(y[0]!==E||y[1]!==S||y[2]!==T||y[3]!==_){let e=(0,f.Q)({adminRoute:E,path:T}),n=_.startsWith(e);r=i.jsxs,g=p.Fragment,t=S&&S.browseByFolder&&(0,i.jsx)(u.BrowseByFolderButton,{active:n}),y[0]=E,y[1]=S,y[2]=T,y[3]=_,y[4]=t,y[5]=r,y[6]=g}else t=y[4],r=y[5],g=y[6];if(y[7]!==E||y[8]!==v||y[9]!==N||y[10]!==(null==b?void 0:b.groups)||y[11]!==_||y[12]!==t||y[13]!==r||y[14]!==g){let e;y[16]!==E||y[17]!==N||y[18]!==(null==b?void 0:b.groups)||y[19]!==_?(e=(e,t)=>{var r,n;let{entities:l,label:a}=e;return(0,i.jsx)(u.NavGroup,{isOpen:null==b||null==(n=b.groups)||null==(r=n[a])?void 0:r.open,label:a,children:l.map((e,t)=>{let r,n,{slug:l,type:a,label:d}=e;a===c.ck.collection&&(r=(0,f.Q)({adminRoute:E,path:"/collections/".concat(l)}),n="nav-".concat(l)),a===c.ck.global&&(r=(0,f.Q)({adminRoute:E,path:"/globals/".concat(l)}),n="nav-global-".concat(l));let p=_.startsWith(r)&&["/",void 0].includes(_[r.length]),g=(0,i.jsxs)(i.Fragment,{children:[p&&(0,i.jsx)("div",{className:"".concat("nav","__link-indicator")}
27),(0,i.jsx)("span",{className:"".concat("nav","__link-label"),children:(0,o.s)(d,N)})]});return _===r?(0,i.jsx)("div",{className:"".concat("nav","__link"),id:n,children:g},t):(0,i.jsx)(u.Link,{className:"".concat("nav","__link"),href:r,id:n,prefetch:!1,children:g},t)})},t)},y[16]=E,y[17]=N,y[18]=null==b?void 0:b.groups,y[19]=_,y[20]=e):e=y[20],m=r(g,{children:[t,v.map(e)]}),y[7]=E,y[8]=v,y[9]=N,y[10]=null==b?void 0:b.groups,y[11]=_,y[12]=t,y[13]=r,y[14]=g,y[15]=m}else m=y[15];return m}},73264:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(79772);t.default={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,n.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,n._)`{format: ${e}}`},code(e,t){let{gen:r,data:i,$data:o,schema:l,schemaCode:a,it:u}=e,{opts:c,errSchemaPath:d,schemaEnv:f,self:p}=u;c.validateFormats&&(o?function(){let o=r.scopeValue("formats",{ref:p.formats,code:c.code.formats}),l=r.const("fDef",(0,n._)`${o}[${a}]`),u=r.let("fType"),d=r.let("format");r.if((0,n._)`typeof ${l} == "object" && !(${l} instanceof RegExp)`,()=>r.assign(u,(0,n._)`${l}.type || "string"`).assign(d,(0,n._)`${l}.validate`),()=>r.assign(u,(0,n._)`"string"`).assign(d,l)),e.fail$data((0,n.or)(!1===c.strictSchema?n.nil:(0,n._)`${a} && !${d}`,function(){let e=f.$async?(0,n._)`(${l}.async ? await ${d}(${i}) : ${d}(${i}))`:(0,n._)`${d}(${i})`,r=(0,n._)`(typeof ${d} == "function" ? ${e} : ${d}.test(${i}))`;return(0,n._)`${d} && ${d} !== true && ${u} === ${t} && !${r}`}()))}():function(){let o=p.formats[l];if(!o){if(!1===c.strictSchema)return p.logger.warn(a());throw Error(a());function a(){return`unknown format "${l}" ignored in schema at path "${d}"`}}if(!0===o)return;let[u,g,m]=function(e){let t=e instanceof RegExp?(0,n.regexpCode)(e):c.code.formats?(0,n._)`${c.code.formats}${(0,n.getProperty)(l)}`:void 0,i=r.scopeValue("formats",{key:l,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,i]:[e.type||"string",e.validate,(0,n._)`${i}.validate`]}(o);u===t&&e.pass(function(){if("object"==typeof o&&!(o instanceof RegExp)&&o.async){if(!f.$async)throw Error("async format in sync schema");return(0,n._)`await ${m}(${i})`}return"function"==typeof g?(0,n._)`${m}(${i})`:(0,n._)`${m}.test(${i})`}())}())}}},73274:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;let i=r(79772),o=r(53921);function l(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema||"boolean"==typeof t)return;let i=n.RULES.keywords;for(let r in t)i[r]||m(e,`unknown keyword: "${r}"`)}function a(e,t){if("boolean"==typeof e)return!e;for(let r in e)if(t[r])return!0;return!1}function u(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function c(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function d({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(o,l,a,u)=>{let c=void 0===a?l:a instanceof i.Name?(l instanceof i.Name?e(o,l,a):t(o,l,a),a):l instanceof i.Name?(t(o,a,l),l):r(l,a);return u!==i.Name||c instanceof i.Name?c:n(o,c)}}function f(e,t){if(!0===t)return e.var("props",!0);let r=e.var("props",(0,i._)`{}`);return void 0!==t&&p(e,r,t),r}function p(e,t,r){Object.keys(r).forEach(r=>e.assign((0,i._)`${t}${(0,i.getProperty)(r)}`,!0))}t.toHash=function(e){let t={};for(let r of e)t[r]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(l(e,t),!a(t,e.self.RULES.all))},t.checkUnknownRules=l,t.schemaHasRules=a,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(let r in e)if("$ref"!==r&&t.all[r])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,n,o){if(!o){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return(0,i._)`${r}`}return(0,i._)`${e}${t}${(0,i.getProperty)(n)}`},t.unescapeFragment=function(e){return c(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(u(e))},t.escapeJsonPointer=u,t.unescapeJsonPointer=c,t.eachItem=function(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)},t.mergeEvaluated={props:d({mergeNames:(e,t,r)=>e.if((0,i._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,i._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,i._)`${r} || {}`).code((0,i._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,i._)`${r} !== true`,()=>{!0===t?e.assign(r,!0):(e.assign(r,(0,i._)`${r} || {}`),p(e,r,t))}),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:f}),items:d({mergeNames:(e,t,r)=>e.if((0,i._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,i._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,i._)`${r} !== true`,()=>e.assign(r,!0===t||(0,i._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>
27e.var("items",t)})},t.evaluatedPropsToName=f,t.setEvaluated=p;let g={};function m(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:g[t.code]||(g[t.code]=new o._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(n||(t.Type=n={})),t.getErrorPath=function(e,t,r){if(e instanceof i.Name){let o=t===n.Num;return r?o?(0,i._)`"[" + ${e} + "]"`:(0,i._)`"['" + ${e} + "']"`:o?(0,i._)`"/" + ${e}`:(0,i._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,i.getProperty)(e).toString():"/"+u(e)},t.checkStrictMode=m},74455:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=r},74619:(e,t,r)=>{"use strict";async function n(e){return new Promise(t=>{setTimeout(t,e)})}r.d(t,{u:()=>n})},74765:(e,t,r)=>{"use strict";r.d(t,{Q:()=>l});var n=r(70893),i=r(94271),o=r(12115);function l(){let[e]=(0,i.DF)();return(0,o.useEffect)(()=>{if(!e.hasNodes([n.v5,n.YW]))throw Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[e]),(0,o.useEffect)(()=>(0,n.cz)(e),[e]),null}},75004:(e,t,r)=>{"use strict";function n(e,t=0){if(0===e)return"0 bytes";let r=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/1024**r).toFixed(t<0?0:t))}${[" bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][r]}`}r.d(t,{B:()=>n})},76510:(e,t,r)=>{"use strict";r.d(t,{VercelBlobClientUploadHandler:()=>V});var n,i,o=r(95155),l=r(92825),a=r(58028),u=r(12115);let c=globalThis.fetch.bind(globalThis);var d=r(28713),f=r(64101);let p={toWeb(){throw Error("Vercel Blob: Sorry, we cannot get a Readable stream in this environment. If you see this message please open an issue here: https://github.com/vercel/storage/ with details on your environment.")}};var g=r(86682),m=r(49509),y=class extends Error{constructor(e){super(`Vercel Blob: ${e}`)}},v=!1;try{((null==(n=m.env.DEBUG)?void 0:n.includes("blob"))||(null==(i=m.env.NEXT_PUBLIC_DEBUG)?void 0:i.includes("blob")))&&(v=!0)}catch(e){}function b(e,...t){v&&console.debug(`vercel-blob: ${e}`,...t)}var _=class extends y{constructor(){super("Access denied, please provide a valid token for this resource.")}},w=class extends y{constructor(){super("This store does not exist.")}},x=class extends y{constructor(){super("This store has been suspended.")}},S=class extends y{constructor(){super("Unknown error, please visit https://vercel.com/help.")}},C=class extends y{constructor(){super("The requested blob does not exist")}},k=class extends y{constructor(){super("The blob service is currently not available. Please try again.")}},T=class extends y{constructor(e){super(`Too many requests please lower the number of concurrent requests ${e?` - try again in ${e} seconds`:""}.`),this.retryAfter=null!=e?e:0}};async function E(e){var t,r,n;let i,o,l;try{let l=await e.json();i=null!=(r=null==(t=l.error)?void 0:t.code)?r:"unknown_error",o=null==(n=l.error)?void 0:n.message}catch{i="unknown_error"}switch(i){case"store_suspended":l=new x;break;case"forbidden":l=new _;break;case"not_found":l=new C;break;case"store_not_found":l=new w;break;case"bad_request":l=new y(null!=o?o:"Bad request");break;case"service_unavailable":l=new k;break;case"rate_limited":l=function(e){let t=e.headers.get("retry-after");return new T(t?parseInt(t,10):void 0)}(e);break;default:l=new S}return{code:i,error:l}}async function N(e,t,r){let n=function(){let e=null;try{e=m.env.VERCEL_BLOB_API_VERSION_OVERRIDE||m.env.NEXT_PUBLIC_VERCEL_BLOB_API_VERSION_OVERRIDE}catch{}return`${null!=e?e:7}`}(),i=function(e){if(null==e?void 0:e.token)return e.token;if(m.env.BLOB_READ_WRITE_TOKEN)return m.env.BLOB_READ_WRITE_TOKEN;throw new y("No token found. Either configure the `BLOB_READ_WRITE_TOKEN` environment variable, or pass a `token` option to your calls.")}(r),o=await d(async r=>{let o=await c(function(e=""){let t=null;try{t=m.env.VERCEL_BLOB_API_URL||m.env.NEXT_PUBLIC_VERCEL_BLOB_API_URL}catch{}return`${t||"https://blob.vercel-storage.com"}${e}`}(e),{...t,headers:{"x-api-version":n,authorization:`Bearer ${i}`,...t.headers}});if(o.ok)return o;let{code:l,error:a}=await E(o);if("unknown_error"===l||"service_unavailable"===l)throw a;r(a)},{retries:function(){try{let e=m.env.VERCEL_BLOB_RETRIES||"10";return parseInt(e,10)}catch{return 10}}(),onRetry:t=>{b(`retrying API request to ${e}`,t.message)}});if(!o)throw new S;return await o.json()}
27var P={cacheControlMaxAge:"x-cache-control-max-age",addRandomSuffix:"x-add-random-suffix",contentType:"x-content-type"};function $(e,t){let r={};return e.includes("contentType")&&t.contentType&&(r[P.contentType]=t.contentType),e.includes("addRandomSuffix")&&void 0!==t.addRandomSuffix&&(r[P.addRandomSuffix]=t.addRandomSuffix?"1":"0"),e.includes("cacheControlMaxAge")&&void 0!==t.cacheControlMaxAge&&(r[P.cacheControlMaxAge]=t.cacheControlMaxAge.toString()),r}async function A({pathname:e,options:t,extraChecks:r,getToken:n}){if(!e)throw new y("pathname is required");if(!t)throw new y("missing options, see usage");if("public"!==t.access)throw new y('access must be "public"');return r&&r(t),n&&(t.token=await n(e,t)),t}async function O({uploadId:e,key:t,pathname:r,parts:n,headers:i,options:o}){try{let l=await N(`/mpu/${r}`,{method:"POST",headers:{...i,"content-type":"application/json","x-mpu-action":"complete","x-mpu-upload-id":e,"x-mpu-key":encodeURI(t)},body:JSON.stringify(n)},o);return b("mpu: complete",l),l}catch(e){if(e instanceof TypeError&&("Failed to fetch"===e.message||"fetch failed"===e.message))throw new k;throw e}}async function j(e,t,r){b("mpu: create","pathname:",e);try{let n=await N(`/mpu/${e}`,{method:"POST",headers:{...t,"x-mpu-action":"create"}},r);return b("mpu: create",n),n}catch(e){if(e instanceof TypeError&&("Failed to fetch"===e.message||"fetch failed"===e.message))throw new k;throw e}}function M({uploadId:e,key:t,pathname:r,headers:n,options:i,abortController:o,part:l}){return N(`/mpu/${r}`,{signal:null==o?void 0:o.signal,method:"POST",headers:{...n,"x-mpu-action":"upload","x-mpu-key":encodeURI(t),"x-mpu-upload-id":e,"x-mpu-part-number":l.partNumber.toString()},body:l.blob,duplex:"half"},i)}var D="undefined"!=typeof window?6:8,R=8388608*D*2;async function I(e,t,r,n){var i,o;let l;b("mpu: init","pathname:",e,"headers:",r);let a=t instanceof ReadableStream?t:t instanceof Blob?t.stream():"object"==typeof(i=t)&&"function"==typeof i.pipe&&i.readable&&"function"==typeof i._read&&"object"==typeof i._readableState?p.toWeb(t):(l=t instanceof ArrayBuffer?t:g(t)?t.buffer:(o=t,new TextEncoder().encode(o)),new ReadableStream({start(e){e.enqueue(l),e.close()}})),u=await j(e,r,n),c=await function({uploadId:e,key:t,pathname:r,stream:n,headers:i,options:o}){b("mpu: upload init","key:",t);let l=new AbortController;return new Promise((a,u)=>{let c=[],d=[],p=n.getReader(),g=0,m=!1,y=1,v=!1,_=0,w=!1,x=0,S=[],C=0;async function T(){for(b("mpu: upload read start","activeUploads:",g,"currentBytesInMemory:",`${f(_)}/${f(R)}`,"bytesSent:",f(x)),m=!0;_<R&&!v;)try{let{value:e,done:t}=await p.read();if(t){w=!0,b("mpu: upload read consumed the whole stream"),S.length>0&&(c.push({partNumber:y++,blob:new Blob(S,{type:"application/octet-stream"})}),N()),m=!1;return}_+=e.byteLength;let r=0;for(;r<e.byteLength;){let t=8388608-C,n=Math.min(r+t,e.byteLength),i=e.slice(r,n);S.push(i),C+=i.byteLength,r=n,8388608===C&&(c.push({partNumber:y++,blob:new Blob(S,{type:"application/octet-stream"})}),S=[],C=0,N())}}catch(e){P(e)}b("mpu: upload read end","activeUploads:",g,"currentBytesInMemory:",`${f(_)}/${f(R)}`,"bytesSent:",f(x)),m=!1}async function E(n){g++,b("mpu: upload send part start","partNumber:",n.partNumber,"size:",n.blob.size,"activeUploads:",g,"currentBytesInMemory:",`${f(_)}/${f(R)}`,"bytesSent:",f(x));try{let u=await M({uploadId:e,key:t,pathname:r,headers:i,options:o,abortController:l,part:n});if(b("mpu: upload send part end","partNumber:",n.partNumber,"activeUploads",g,"currentBytesInMemory:",`${f(_)}/${f(R)}`,"bytesSent:",f(x)),v)return;if(d.push({partNumber:n.partNumber,etag:u.etag}),_-=n.blob.size,g--,x+=n.blob.size,c.length>0&&N(),w){0===g&&(p.releaseLock(),a(d));return}m||T().catch(P)}catch(e){P(e)}}function N(){if(!v)for(b("send parts","activeUploads",g,"partsToUpload",c.length);g<D&&c.length>0;){let e=c.shift();e&&E(e)}}function P(e){v||(v=!0,l.abort(),p.releaseLock(),e instanceof TypeError&&("Failed to fetch"===e.message||"fetch failed"===e.message)?u(new k):u(e))}T().catch(P)})}({uploadId:u.uploadId,key:u.key,pathname:e,stream:a,headers:r,options:n});return await O({uploadId:u.uploadId,key:u.key,pathname:e,parts:c,headers:r,options:n})}function F({allowedOptions:e,getToken:t,extraChecks:r}){return async function(n,i,o){let l=n.endsWith("/");if(!i&&!l)throw new y("body is required");if(i&&o&&l)throw new y("body is not allowed for creating empty folders");let a=l?void 0:i,u=await A({pathname:n,options:l?i:o,extraChecks:r,getToken:t}),c=$(e,u);if(!0===u.multipart&&a)return I(n,a,c,u);let d=await N(`/${n}`,{method:"PUT",body:a,headers:c,duplex:"half"},u);return{url:d.url,downloadUrl:d.downloadUrl,pathname:d.pathname,contentType:d.contentType,contentDisposition:d.contentDisposition}}}var L=r(44134).hp;function B(e){return function(t){if("undefined"==typeof window)throw new y(`${e} must be called from a client environment`);if(!t.token.startsWith("vercel_blob_client_"))throw new y(`${e} must be called with a client token`);
27if(void 0!==t.addRandomSuffix||void 0!==t.cacheControlMaxAge)throw new y(`${e} doesn't allow addRandomSuffix and cacheControlMaxAge. Configure these options at the server side when generating client tokens.`)}}F({allowedOptions:["contentType"],extraChecks:B("client/`put`")}),function({allowedOptions:e,getToken:t,extraChecks:r}){}({allowedOptions:["contentType"],extraChecks:B("client/`createMultipartUpload`")}),function({allowedOptions:e,getToken:t,extraChecks:r}){}({allowedOptions:["contentType"],extraChecks:B("client/`createMultipartUpload`")}),function({allowedOptions:e,getToken:t,extraChecks:r}){}({allowedOptions:["contentType"],extraChecks:B("client/`multipartUpload`")}),function({allowedOptions:e,getToken:t,extraChecks:r}){}({allowedOptions:["contentType"],extraChecks:B("client/`completeMultipartUpload`")});var z=F({allowedOptions:["contentType"],extraChecks(e){if("undefined"==typeof window)throw new y("client/`upload` must be called from a client environment");if(void 0===e.handleUploadUrl)throw new y("client/`upload` requires the 'handleUploadUrl' parameter");if(void 0!==e.addRandomSuffix||void 0!==e.cacheControlMaxAge)throw new y("client/`upload` doesn't allow addRandomSuffix and cacheControlMaxAge. Configure these options at the server side when generating client tokens.")},async getToken(e,t){var r,n;return q({handleUploadUrl:t.handleUploadUrl,pathname:e,clientPayload:null!=(r=t.clientPayload)?r:null,multipart:null!=(n=t.multipart)&&n})}});async function U(e){return globalThis.crypto.subtle.importKey("raw",new TextEncoder().encode(e),{name:"HMAC",hash:"SHA-256"},!1,["sign","verify"])}async function K(e,t){if(!globalThis.crypto)return crypto.createHmac("sha256",t).update(e).digest("hex");let r=await globalThis.crypto.subtle.sign("HMAC",await U(t),new TextEncoder().encode(e));return L.from(new Uint8Array(r)).toString("hex")}var W={generateClientToken:"blob.generate-client-token"};async function q(e){let{handleUploadUrl:t,pathname:r}=e,n=!function(e){try{return new URL(e),!0}catch(e){return!1}}(t)?new URL(t,window.location.href).href:t,i={type:W.generateClientToken,payload:{pathname:r,callbackUrl:n,clientPayload:e.clientPayload,multipart:e.multipart}},o=await c(n,{method:"POST",body:JSON.stringify(i),headers:{"content-type":"application/json"}});if(!o.ok)throw new y("Failed to retrieve the client token");try{let{clientToken:e}=await o.json();return e}catch(e){throw new y("Failed to retrieve the client token")}}let V=(e=>{let{handler:t}=e;return function(e){let{children:r,collectionSlug:n,enabled:i,extra:c,prefix:d,serverHandlerPath:f}=e,{setUploadHandler:p}=(0,l.useUploadHandlers)(),{config:{routes:{api:g},serverURL:m}}=(0,a.b)(),y=(0,l.useEffectEvent)(()=>{i&&p({collectionSlug:n,handler:e=>{let{file:r,updateFilename:i}=e;return t({apiRoute:g,collectionSlug:n,extra:c,file:r,prefix:d,serverHandlerPath:f,serverURL:m,updateFilename:i})}})});return(0,u.useEffect)(()=>{y()},[]),(0,o.jsx)(u.Fragment,{children:r})}})({handler:async e=>{let{apiRoute:t,collectionSlug:r,extra:{addRandomSuffix:n,baseURL:i,prefix:o=""},file:l,serverHandlerPath:a,serverURL:u,updateFilename:c}=e,d=await z("".concat(o).concat(l.name),l,{access:"public",clientPayload:r,contentType:l.type,handleUploadUrl:"".concat(u).concat(t).concat(a)});return n&&c(d.url.replace("".concat(i,"/"),"")),{prefix:o}}})},76931:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(73274);t.default={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,n.checkStrictMode)(r,`"${e}" without "if" is ignored`)}}},77283:(e,t,r)=>{"use strict";r.d(t,{FolderTableCellClient:()=>u});var n=r(95155),i=r(12115),o=r(58028),l=r(87677),a=r(92825);let u=e=>{let{collectionSlug:t,data:r,docTitle:u,folderCollectionSlug:c,folderFieldName:d}=e,f=r.id,p=null==r?void 0:r[d],{config:g}=(0,o.b)(),{t:m}=(0,l.d)(),[y,v]=i.useState(()=>p?"".concat(m("general:loading"),"..."):m("folder:noFolder")),[b,_]=i.useState(p),w=i.useRef(!1),x=i.useCallback(async e=>{let{id:r,name:n}=e;try{await fetch("".concat(g.routes.api,"/").concat(t,"/").concat(f),{body:JSON.stringify({[d]:r}),credentials:"include",headers:{"Content-Type":"application/json"},method:"PATCH"}),_(r),v(n||m("folder:noFolder"))}catch(e){console.error("Error moving document to folder",e)}},[g.routes.api,t,f,d,m]);return(0,i.useEffect)(()=>{let e=async()=>{try{let e=await fetch("".concat(g.routes.api,"/").concat(c).concat(p?"/".concat(p):""),{credentials:"include",headers:{"Content-Type":"application/json"},method:"GET"}),t=await e.json();v((null==t?void 0:t.name)||m("folder:noFolder"))}catch(e){console.error("Error moving document to folder",e)}};w.current||(e(),w.current=!0)},[g.routes.api,c,p,m]),(0,n.jsx)(a.MoveDocToFolderButton,{buttonProps:{size:"small"},collectionSlug:t,docData:r,docID:f,docTitle:u,folderCollectionSlug:c,folderFieldName:d,fromFolderID:b,fromFolderName:y,modalSlug:"move-doc-to-folder-cell--".concat(f),onConfirm:x,skipConfirmModal:!1})}},77912:(e,t,r)=>{"use strict";r.d(t,{VersionsViewClient:()=>c});var n=r(19749),i=r(95155),o=r(92825),l=r(87677),a=r(35695),u=r(12115);let c=e=>{let t,r,c=(0,n.c)(13),{baseClass:d,columns:f,paginationLimits:p}=e,{data:g,handlePageChange:m,handlePerPageChange:y}=(0,o.useListQuery)(),v=(0,a.useSearchParams)();c[0]!==v?(t=v.get("limit"),c[0]=v,c[1]=t):t=c[1];let b=t,{i18n:_}=(0,l.d)(),w=(null==g?void 0:g.totalDocs)||0,x=!g;return c[2]!==d||c[3]!==f||c[4]!==g||c[5]!==m||c[6]!==y||c[7]!==_||c[8]!==b||c[9]!==p||c[10]!==x||c[11]!==w?(r=(0,i.jsxs)(u.Fragment,{children:[(0,i.jsx)(o.LoadingOverlayToggle,{name:"versions",show:x}),0===w&&(0,i.jsx)("div",{className:"".concat(d,"__no-versions"),children:_.t("version:noFurtherVersionsFound")}),w>0&&(0,i.jsxs)(u.Fragment,{children:[(0,i.jsx)(o.Table,{columns:f,data:null==g?void 0:g.docs}
27),(0,i.jsxs)("div",{className:"".concat(d,"__page-controls"),children:[(0,i.jsx)(o.Pagination,{hasNextPage:g.hasNextPage,hasPrevPage:g.hasPrevPage,limit:g.limit,nextPage:g.nextPage,numberOfNeighbors:1,onChange:m,page:g.page,prevPage:g.prevPage,totalPages:g.totalPages}),(null==g?void 0:g.totalDocs)>0&&(0,i.jsxs)(u.Fragment,{children:[(0,i.jsxs)("div",{className:"".concat(d,"__page-info"),children:[g.page*g.limit-(g.limit-1),"-",g.totalPages>1&&g.totalPages!==g.page?g.limit*g.page:g.totalDocs," ",_.t("general:of")," ",g.totalDocs]}),(0,i.jsx)(o.PerPage,{handleChange:y,limit:b?Number(b):10,limits:p})]})]})]})]}),c[2]=d,c[3]=f,c[4]=g,c[5]=m,c[6]=y,c[7]=_,c[8]=b,c[9]=p,c[10]=x,c[11]=w,c[12]=r):r=c[12],r}},77964:(e,t,r)=>{"use strict";r.d(t,{OverviewComponent:()=>f});var n=r(95155),i=r(92825),o=r(87677),l=r(12115);let{description:{maxLength:a,minLength:u},title:{maxLength:c,minLength:d}}=r(56962).N,f=e=>{let{descriptionOverrides:t,descriptionPath:r,imagePath:f,titleOverrides:p,titlePath:g}=e,{getFields:m}=(0,i.useForm)(),[{[r||"meta.description"]:{value:y}={},[f||"meta.image"]:{value:v}={},[g||"meta.title"]:{value:b}={}}]=(0,i.useAllFormFields)(),{t:_}=(0,o.d)(),[w,x]=(0,l.useState)(),[S,C]=(0,l.useState)(),[k,T]=(0,l.useState)(),E=(null==t?void 0:t.minLength)||u,N=(null==t?void 0:t.maxLength)||a,P=(null==p?void 0:p.minLength)||d,$=(null==p?void 0:p.maxLength)||c;(0,l.useEffect)(()=>{"string"==typeof b&&x(b.length>=P&&b.length<=$),"string"==typeof y&&C(y.length>=E&&y.length<=N),T(!!v)},[b,y,v]);let A=[w,S,k],O=A.filter(Boolean).length;return(0,n.jsx)("div",{style:{marginBottom:"20px"},children:(0,n.jsx)("div",{children:_("plugin-seo:checksPassing",{current:O,max:A.length})})})}},78234:(e,t,r)=>{"use strict";r.d(t,{ck:()=>er,eS:()=>K,Yq:()=>et,wN:()=>W,n_:()=>en,yF:()=>ei,UG:()=>eo,FR:()=>L,qg:()=>U,zG:()=>q}),r(12115);var n=r(46205),i=r(7239),o=r(83039),l=r(95490),a=r(89447);function u(e){let t=(0,a.a)(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),e-r}var c=r(61183),d=r(25703);function f(e,t){let r=(0,a.a)(e,null==t?void 0:t.in);return r.setHours(0,0,0,0),r}var p=r(84423);function g(e,t){return(0,p.k)(e,{...t,weekStartsOn:1})}function m(e,t){let r=(0,a.a)(e,null==t?void 0:t.in),n=r.getFullYear(),o=(0,i.w)(r,0);o.setFullYear(n+1,0,4),o.setHours(0,0,0,0);let l=g(o),u=(0,i.w)(r,0);u.setFullYear(n,0,4),u.setHours(0,0,0,0);let c=g(u);return r.getTime()>=l.getTime()?n+1:r.getTime()>=c.getTime()?n:n-1}function y(e,t){var r,n,o,u,c,d,f,g;let m=(0,a.a)(e,null==t?void 0:t.in),y=m.getFullYear(),v=(0,l.q)(),b=null!=(g=null!=(f=null!=(d=null!=(c=null==t?void 0:t.firstWeekContainsDate)?c:null==t||null==(n=t.locale)||null==(r=n.options)?void 0:r.firstWeekContainsDate)?d:v.firstWeekContainsDate)?f:null==(u=v.locale)||null==(o=u.options)?void 0:o.firstWeekContainsDate)?g:1,_=(0,i.w)((null==t?void 0:t.in)||e,0);_.setFullYear(y+1,0,b),_.setHours(0,0,0,0);let w=(0,p.k)(_,t),x=(0,i.w)((null==t?void 0:t.in)||e,0);x.setFullYear(y,0,b),x.setHours(0,0,0,0);let S=(0,p.k)(x,t);return+m>=+w?y+1:+m>=+S?y:y-1}function v(e,t){let r=Math.abs(e).toString().padStart(t,"0");return(e<0?"-":"")+r}let b={y(e,t){let r=e.getFullYear(),n=r>0?r:1-r;return v("yy"===t?n%100:n,t.length)},M(e,t){let r=e.getMonth();return"M"===t?String(r+1):v(r+1,2)},d:(e,t)=>v(e.getDate(),t.length),a(e,t){let r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h:(e,t)=>v(e.getHours()%12||12,t.length),H:(e,t)=>v(e.getHours(),t.length),m:(e,t)=>v(e.getMinutes(),t.length),s:(e,t)=>v(e.getSeconds(),t.length),S(e,t){let r=t.length;return v(Math.trunc(e.getMilliseconds()*Math.pow(10,r-3)),t.length)}},_={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},w={G:function(e,t,r){let n=+(e.getFullYear()>0);switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if("yo"===t){let t=e.getFullYear();return r.ordinalNumber(t>0?t:1-t,{unit:"year"})}return b.y(e,t)},Y:function(e,t,r,n){let i=y(e,n),o=i>0?i:1-i;return"YY"===t?v(o%100,2):"Yo"===t?r.ordinalNumber(o,{unit:"year"}):v(o,t.length)},R:function(e,t){return v(m(e),t.length)},u:function(e,t){return v(e.getFullYear(),t.length)},Q:function(e,t,r){let n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return v(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){let n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return v(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){let n=e.getMonth();switch(t){case"M":case"MM":return b.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){let n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return v(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){let o=function(e,t){let r=(0,a.a)(e,null==t?void 0:t.in);return Math.round(((0,p.k)(r,t)-function(e,t){var r,n,o,a,u,c,d,f;let g=(0,l.q)(),m=null!=(f=null!=(d=null!=(c=null!=(u=null==t?void 0:t.firstWeekContainsDate)?u:null==t||null==(n=t.locale)||null==(r=n.options)?void 0:r.firstWeekContainsDate)?c:g.firstWeekContainsDate)?d:null==(a=g.locale)||null==(o=a.options)?void 0:o.firstWeekContainsDate)?f:1,v=y(e,t),b=(0,i.w)((null==t?void 0:t.in)||e,0);return b.setFullYear(v,0,m),b.setHours(0,0,0,0),(0,p.k)(b,t)}(r,t))/d.my)+1}(e,n);return"wo"===t?r.ordinalNumber(o,{unit:"week"}):v(o,t.length)},I:function(e,t,r){let n=function(e,t){let r=(0,a.a)(e,void 0);return Math.round((g(r)-function(e,t){let r=m(e,void 0),n=(0,i.w)(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),g(n)}(r))/d.my)+1}(e);return"Io"===t?r.ordinalNumber(n,{unit:"week"}):v(n,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getDate(),{unit:"date"}):b.d(e,t)},D:function(e,t,r){let n=function(e,t){let r=(0,a.a)(e,void 0);return function(e,t,r){let[n,i]=(0,c.x)(void 0,e,t),o=f(n),l=f(i);return Math.round((o-u(o)-(l-u(l)))/d.w4)}(r,function(e,t){let r=(0,a.a)(e,void 0);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}(r))+1}(e);return"Do"===t?r.ordinalNumber(n,{unit:"dayOfYear"}):v(n,t.length)},E:function(e,t,r){let n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){let i=e.getDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return v(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){let i=e.getDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return v(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,r){let n=e.getDay(),i=0===n?7:n;switch(t){case"i":return String(i);case"ii":return v(i,t.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){let n,i=e.getHours();switch(n=12===i?_.noon:0===i?_.midnight:i/12>
27=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,r){let n,i=e.getHours();switch(n=i>=17?_.evening:i>=12?_.afternoon:i>=4?_.morning:_.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),r.ordinalNumber(t,{unit:"hour"})}return b.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getHours(),{unit:"hour"}):b.H(e,t)},K:function(e,t,r){let n=e.getHours()%12;return"Ko"===t?r.ordinalNumber(n,{unit:"hour"}):v(n,t.length)},k:function(e,t,r){let n=e.getHours();return(0===n&&(n=24),"ko"===t)?r.ordinalNumber(n,{unit:"hour"}):v(n,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):b.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getSeconds(),{unit:"second"}):b.s(e,t)},S:function(e,t){return b.S(e,t)},X:function(e,t,r){let n=e.getTimezoneOffset();if(0===n)return"Z";switch(t){case"X":return S(n);case"XXXX":case"XX":return C(n);default:return C(n,":")}},x:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"x":return S(n);case"xxxx":case"xx":return C(n);default:return C(n,":")}},O:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+x(n,":");default:return"GMT"+C(n,":")}},z:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+x(n,":");default:return"GMT"+C(n,":")}},t:function(e,t,r){return v(Math.trunc(e/1e3),t.length)},T:function(e,t,r){return v(+e,t.length)}};function x(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e>0?"-":"+",n=Math.abs(e),i=Math.trunc(n/60),o=n%60;return 0===o?r+String(i):r+String(i)+t+v(o,2)}function S(e,t){return e%60==0?(e>0?"-":"+")+v(Math.abs(e)/60,2):C(e,t)}function C(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=Math.abs(e);return(e>0?"-":"+")+v(Math.trunc(r/60),2)+t+v(r%60,2)}let k=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},T=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},E={p:T,P:(e,t)=>{let r,n=e.match(/(P+)(p+)?/)||[],i=n[1],o=n[2];if(!o)return k(e,t);switch(i){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;default:r=t.dateTime({width:"full"})}return r.replace("{{date}}",k(i,t)).replace("{{time}}",T(o,t))}},N=/^D+$/,P=/^Y+$/,$=["D","DD","YY","YYYY"],A=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,O=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,j=/^'([^]*?)'?$/,M=/''/g,D=/[a-zA-Z]/;function R(e,t,r){var n,i,u,c,d,f,p,g,m,y,v,b,_,x,S,C,k,T;let R=(0,l.q)(),I=null!=(y=null!=(m=null==r?void 0:r.locale)?m:R.locale)?y:o.enUS,F=null!=(x=null!=(_=null!=(b=null!=(v=null==r?void 0:r.firstWeekContainsDate)?v:null==r||null==(i=r.locale)||null==(n=i.options)?void 0:n.firstWeekContainsDate)?b:R.firstWeekContainsDate)?_:null==(c=R.locale)||null==(u=c.options)?void 0:u.firstWeekContainsDate)?x:1,L=null!=(T=null!=(k=null!=(C=null!=(S=null==r?void 0:r.weekStartsOn)?S:null==r||null==(f=r.locale)||null==(d=f.options)?void 0:d.weekStartsOn)?C:R.weekStartsOn)?k:null==(g=R.locale)||null==(p=g.options)?void 0:p.weekStartsOn)?T:0,B=(0,a.a)(e,null==r?void 0:r.in);if(!(B instanceof Date||"object"==typeof B&&"[object Date]"===Object.prototype.toString.call(B))&&"number"!=typeof B||isNaN(+(0,a.a)(B)))throw RangeError("Invalid time value");let z=t.match(O).map(e=>{let t=e[0];return"p"===t||"P"===t?(0,E[t])(e,I.formatLong):e}).join("").match(A).map(e=>{if("''"===e)return{isToken:!1,value:"'"};let t=e[0];if("'"===t)return{isToken:!1,value:function(e){let t=e.match(j);return t?t[1].replace(M,"'"):e}(e)};if(w[t])return{isToken:!0,value:e};
27if(t.match(D))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});I.localize.preprocessor&&(z=I.localize.preprocessor(B,z));let U={firstWeekContainsDate:F,weekStartsOn:L,locale:I};return z.map(n=>{if(!n.isToken)return n.value;let i=n.value;return(!(null==r?void 0:r.useAdditionalWeekYearTokens)&&P.test(i)||!(null==r?void 0:r.useAdditionalDayOfYearTokens)&&N.test(i))&&function(e,t,r){let n=function(e,t,r){let n="Y"===e[0]?"years":"days of the month";return"Use `".concat(e.toLowerCase(),"` instead of `").concat(e,"` (in `").concat(t,"`) for formatting ").concat(n," to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md")}(e,t,r);if(console.warn(n),$.includes(e))throw RangeError(n)}(i,t,String(e)),(0,w[i[0]])(B,i,I.localize,U)}).join("")}var I=r(6001),F=({elements:e,translationString:t})=>{let r=t.split(/(<[^>]+>.*?<\/[^>]+>)/g);return h.createElement("span",null,r.map((t,r)=>{if(e&&t.startsWith("<")&&t.endsWith(">")){let n=t[1],i=e[n];if(i){let e=RegExp(`<${n}>(.*?)</${n}>`,"g"),o=t.replace(e,(e,t)=>t);return h.createElement(i,{key:r},h.createElement(F,{translationString:o}))}}return t}))},L=e=>({...e?.admin?.style||{},...e?.admin?.width?{"--field-width":e.admin.width}:{flex:"1 1 auto"},...e?.admin?.style?.flex?{flex:e.admin.style.flex}:{}}),B=["validate","customComponents"],z=e=>{let t={...e};for(let e of B)delete t[e];return t},U=e=>{let t={};for(let r in e)t[r]=z(e[r]);return t};function K(e){if(e)try{e.abort()}catch{}}function W(e){let t=new AbortController;if(e.current)try{e.current.abort()}catch{}return e.current=t,t}var q={delete:(e,t={headers:{}})=>{let r=t&&t.headers?{...t.headers}:{};return fetch(e,{...t,credentials:"include",headers:{...r},method:"delete"})},get:(e,t={headers:{}})=>{let r="";return t.params&&(r=n.A(t.params,{addQueryPrefix:!0})),fetch(`${e}${r}`,{credentials:"include",...t})},patch:(e,t={headers:{}})=>{let r=t&&t.headers?{...t.headers}:{};return fetch(e,{...t,credentials:"include",headers:{...r},method:"PATCH"})},post:(e,t={headers:{}})=>{let r=t&&t.headers?{...t.headers}:{};return fetch(`${e}`,{...t,credentials:"include",headers:{...r},method:"post"})},put:(e,t={headers:{}})=>{let r=t&&t.headers?{...t.headers}:{};return fetch(e,{...t,credentials:"include",headers:{...r},method:"put"})}},V={},J={};function H(e,t){try{let r=(V[e]||=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format)(t).split("GMT")[1]||"";return r in J?J[r]:Y(r,r.split(":"))}catch{if(e in J)return J[e];let t=e?.match(G);return t?Y(e,t.slice(1)):NaN}}var G=/([+-]\d\d):?(\d\d)?/;function Y(e,t){let r=+t[0],n=+(t[1]||0);return J[e]=r>0?60*r+n:60*r-n}var Z=class e extends Date{constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(H(this.timeZone,this))?this.setTime(NaN):e.length?"number"==typeof e[0]&&(1===e.length||2===e.length&&"number"!=typeof e[1])?this.setTime(e[0]):"string"==typeof e[0]?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),ee(this,NaN),Q(this)):this.setTime(Date.now())}static tz(t,...r){return r.length?new e(...r,t):new e(Date.now(),t)}withTimeZone(t){return new e(+this,t)}getTimezoneOffset(){return-H(this.timeZone,this)}setTime(e){return Date.prototype.setTime.apply(this,arguments),Q(this),+this}[Symbol.for("constructDateFrom")](t){return new e(+new Date(t),this.timeZone)}},X=/^(get|set)(?!UTC)/;function Q(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function ee(e){let t=H(e.timeZone,e),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);let n=-new Date(+e).getTimezoneOffset(),i=n- -new Date(+r).getTimezoneOffset(),o=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();i&&o&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+i);let l=n-t;l&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);let a=H(e.timeZone,e),u=-new Date(+e).getTimezoneOffset()-a-l;if(a!==t&&u){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+u);let t=a-H(e.timeZone,e);t&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+t),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+t))}}
27Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!X.test(e))return;let t=e.replace(X,"$1UTC");Z.prototype[t]&&(e.startsWith("get")?Z.prototype[e]=function(){return this.internal[t]()}:(Z.prototype[e]=function(){var e;return Date.prototype[t].apply(this.internal,arguments),e=this,Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),ee(e),+this},Z.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Q(this),+this}))});var et=({date:e,i18n:t,pattern:r,timezone:n})=>{let o=new Z(new Date(e));if(n){let e=Z.tz(n),l=function(e,t){var r,n;let o="function"==typeof(r=t)&&(null==(n=r.prototype)?void 0:n.constructor)===r?new t(0):(0,i.w)(t,0);return o.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),o.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),o}(o.withTimeZone(n),e);return t.dateFNS?R(l,r,{locale:t.dateFNS}):`${t.t("general:loading")}...`}return t.dateFNS?R(o,r,{locale:t.dateFNS}):`${t.t("general:loading")}...`},er=(e=>(e.collection="collections",e.global="globals",e))(er||{}),en=({adminRoute:e,router:t})=>{let r=(0,I.Q)({adminRoute:e,path:"/"});t.push(r)},ei=({adminRoute:e,collectionSlug:t,router:r})=>{let n=(0,I.Q)({adminRoute:e,path:t?`/collections/${t}`:"/"});r.push(n)},eo=(e,t,r,n,i,o,l,a,u,c)=>{if(u)try{o(e,t??r,n),i||(a.current.hasShownLockedModal=!0),a.current={hasShownLockedModal:a.current?.hasShownLockedModal,isLocked:!0,user:n},l(n),i&&c&&c(!1)}catch(e){console.error("Error during document takeover:",e)}}},78769:(e,t,r)=>{"use strict";r.d(t,{LivePreviewClient:()=>L});var n=r(19749),i=r(95155),o=r(92825),l=r(58028),a=r(87677),u=r(78234),c=r(35695),d=r(6001),f=r(12115);let p=(0,f.createContext)({appIsReady:!1,breakpoint:void 0,breakpoints:void 0,fieldSchemaJSON:void 0,iframeHasLoaded:!1,iframeRef:void 0,isPopupOpen:!1,measuredDeviceSize:{height:0,width:0},openPopupWindow:()=>{},popupRef:void 0,previewWindowType:"iframe",setAppIsReady:()=>{},setBreakpoint:()=>{},setHeight:()=>{},setIframeHasLoaded:()=>{},setMeasuredDeviceSize:()=>{},setPreviewWindowType:()=>{},setSize:()=>{},setToolbarPosition:()=>{},setWidth:()=>{},setZoom:()=>{},size:{height:0,width:0},toolbarPosition:{x:0,y:0},url:void 0,zoom:1}),g=()=>(0,f.use)(p);var m=r(25472),y=r(23999);let v=(e,t)=>e.reduce((e,r)=>{let n=e;switch(r.type){case"array":e.push({name:r.name,type:r.type,fields:v([...r.fields,{name:"id",type:"text"}],t)});break;case"blocks":e.push({name:r.name,type:r.type,blocks:(r.blockReferences??r.blocks).reduce((e,r)=>{let n="string"==typeof r?t.blocksMap[r]:r;return e[n.slug]={fields:v([...n.fields,{name:"id",type:"text"}],t)},e},{})});break;case"collapsible":case"row":n=n.concat(v(r.fields,t));break;case"group":(0,y.Z7)(r)?e.push({name:r.name,type:r.type,fields:v(r.fields,t)}):n=n.concat(v(r.fields,t));break;case"relationship":case"upload":e.push({name:r.name,type:r.type,hasMany:"hasMany"in r&&!!r.hasMany,relationTo:r.relationTo});break;case"tabs":{let e=[];r.tabs.forEach(n=>{if("name"in n)return void e.push({name:n.name,type:r.type,fields:v(n.fields,t)});e=e.concat(v(n.fields,t))}),n=n.concat(e);break}default:"name"in r&&e.push({name:r.name,type:r.type})}return n},[]),b=({collisionRect:e,droppableContainers:t,...r})=>{let n=t.find(({id:e})=>"live-preview-area"===e),i=(0,m.Qo)({...r,collisionRect:e,droppableContainers:[n]});if(0===i.length)return i;let o=n?.rect?.current;if(e.top>=o.top&&e.left>=o.left&&e.bottom<=o.bottom&&e.right<=o.right)return i},_=(e,t)=>{switch(t.type){case"height":return{...e,height:t.value};case"width":return{...e,width:t.value};default:return{...e,...t?.value||{}}}},w=e=>{let{breakpoints:t,children:r,fieldSchema:n,isPopupOpen:o,openPopupWindow:a,popupRef:u,url:c}=e,[d,g]=(0,f.useState)("iframe"),[y,w]=(0,f.useState)(!1),[x,S]=(0,f.useState)(!1),C=f.useRef(null),[k,T]=(0,f.useState)(!1),{config:E}=(0,l.b)(),[N,P]=(0,f.useState)(1),[$,A]=(0,f.useState)({x:0,y:0}),[O,j]=f.useReducer(_,{height:0,width:0}),[M,D]=(0,f.useState)({height:0,width:0}),[R,I]=f.useState("responsive"),[F]=(0,f.useState)(()=>v(n,E)),L=(0,f.useCallback)(e=>{j({type:"width",value:e})},[j]),B=(0,f.useCallback)(e=>{j({type:"height",value:e})},[j]);(0,f.useEffect)(()=>{let e=null==t?void 0:t.find(e=>e.name===R);e&&"responsive"!==R&&"custom"!==R&&"number"==typeof(null==e?void 0:e.width)&&"number"==typeof(null==e?void 0:e.he
27ight)&&j({type:"reset",value:{height:e.height,width:e.width}})},[R,t]),(0,f.useEffect)(()=>{let e=e=>{(null==c?void 0:c.startsWith(e.origin))&&e.data&&"object"==typeof e.data&&"payload-live-preview"===e.data.type&&e.data.ready&&w(!0)};return window.addEventListener("message",e),S(!0),()=>{window.removeEventListener("message",e)}},[c,x]);let z=(0,f.useCallback)(e=>{w(!1),g(e),"popup"===e&&a()},[a]);return(0,f.useEffect)(()=>{(o?"popup":"iframe")!==d&&z("iframe")},[d,o,z]),(0,i.jsx)(p,{value:{appIsReady:y,breakpoint:R,breakpoints:t,fieldSchemaJSON:F,iframeHasLoaded:k,iframeRef:C,isPopupOpen:o,measuredDeviceSize:M,openPopupWindow:a,popupRef:u,previewWindowType:d,setAppIsReady:w,setBreakpoint:I,setHeight:B,setIframeHasLoaded:T,setMeasuredDeviceSize:D,setPreviewWindowType:z,setSize:j,setToolbarPosition:A,setWidth:L,setZoom:P,size:O,toolbarPosition:$,url:c,zoom:N},children:(0,i.jsx)(m.Mp,{collisionDetection:b,onDragEnd:e=>{e.over&&"live-preview-area"===e.over.id&&A({x:$.x+e.delta.x,y:$.y+e.delta.y})},children:x&&r})})};var x=r(14994);let S=e=>{let{children:t}=e,r=f.useRef(null),n=f.useRef(null),{breakpoint:l,setMeasuredDeviceSize:a,size:u,zoom:c}=g(),{size:d}=(0,o.useResize)(r.current),{size:p}=(0,o.useResize)(n.current),m=!1;(0,f.useEffect)(()=>{d&&a(d)},[d,a]);let y="0",v="0";if(l&&"responsive"!==l&&(y="-50%",u&&d&&"number"==typeof c&&"number"==typeof u.width&&"number"==typeof u.height&&"number"==typeof d.width&&"number"==typeof d.height)){v="0 auto";let e=u.width/c,t=d.width*c,r=e-u.width;if(t>p.width)if(c>1){let e=d.width-p.width;y=e<0?"".concat(e/2,"px"):"0"}else y="0";else if(c>=1)y="".concat(r/2,"px");else{let e=p.width-t;y="".concat(e/2,"px"),v="0"}}let b=c?"".concat(100/c,"%"):"100%",_=c?"".concat(100/c,"%"):"100%";return"responsive"!==l&&(b="".concat((null==u?void 0:u.width)/("number"==typeof c?c:1),"px"),_="".concat((null==u?void 0:u.height)/("number"==typeof c?c:1),"px")),(0,i.jsx)("div",{ref:n,style:{height:"100%",width:"100%"},children:(0,i.jsx)("div",{ref:r,style:{height:_,margin:v,transform:"translate3d(".concat(y,", 0, 0)"),width:b},children:t})})},C=e=>{let{ref:t,setIframeHasLoaded:r,url:n}=e,{zoom:o}=g();return(0,i.jsx)("iframe",{className:"live-preview-iframe",onLoad:()=>{r(!0)},ref:t,src:n,style:{transform:"number"==typeof o?"scale(".concat(o,") "):void 0},title:n})},k=e=>{let t,r,o,l,a=(0,n.c)(18),{axis:u}=e,{breakpoint:c,measuredDeviceSize:d,setBreakpoint:p,setSize:m,size:y,zoom:v}=g(),[b,_]=f.useState(("x"===u?null==d?void 0:d.width:null==d?void 0:d.height)||0);a[0]!==u||a[1]!==(null==d?void 0:d.height)||a[2]!==(null==d?void 0:d.width)||a[3]!==p||a[4]!==m||a[5]!==v?(t=e=>{let t=Number(e.target.value);t<0&&(t=0),_(t),p("custom"),m({type:"reset",value:{height:"y"===u?t:Number(null==d?void 0:d.height.toFixed(0))*v,width:"x"===u?t:Number(null==d?void 0:d.width.toFixed(0))*v}})},a[0]=u,a[1]=null==d?void 0:d.height,a[2]=null==d?void 0:d.width,a[3]=p,a[4]=m,a[5]=v,a[6]=t):t=a[6];let w=t;a[7]!==u||a[8]!==c||a[9]!==d||a[10]!==y||a[11]!==v?(r=()=>{"responsive"===c&&d&&("x"===u?_(Number(d.width.toFixed(0))*v):_(Number(d.height.toFixed(0))*v)),"responsive"!==c&&y&&_("x"===u?y.width:y.height)},o=[c,u,d,y,v],a[7]=u,a[8]=c,a[9]=d,a[10]=y,a[11]=v,a[12]=r,a[13]=o):(r=a[12],o=a[13]),(0,f.useEffect)(r,o);let x="x"===u?"live-preview-width":"live-preview-height",S=b||0;return a[14]!==w||a[15]!==x||a[16]!==S?(l=(0,i.jsx)("input",{className:"toolbar-input",min:0,name:x,onChange:w,step:1,type:"number",value:S}),a[14]=w,a[15]=x,a[16]=S,a[17]=l):l=a[17],l},T="live-preview-toolbar-controls",E=[50,75,100,125,150,200],N=()=>{let e,t=(0,n.c)(14),{breakpoint:r,breakpoints:l,setBreakpoint:u,setPreviewWindowType:c,setZoom:d,url:p,zoom:m}=g(),{t:y}=(0,a.d)();if(t[0]!==r||t[1]!==l||t[2]!==u||t[3]!==c||t[4]!==d||t[5]!==y||t[6]!==p||t[7]!==m){var v,b;let n,g,_={label:y("general:custom"),value:"custom"};t[9]!==d||t[10]!==m?(n=e=>{let{close:t}=e;return(0,i.jsx)(o.PopupList.ButtonGroup,{children:(0,i.jsx)(f.Fragment,{children:E.map(e=>(0,i.jsxs)(o.PopupList.Button,{active:100*m==e,onClick:()=>{d(e/100),t()},children:[e,"%"]},e))})})},t[9]=d,t[10]=m,t[11]=n):n=t[11],t[12]!==c?(g=e=>{e.preventDefault(),c("popup")},t[12]=c,t[13]=g):g=t[13],e=(0,i.jsxs)("div",{className:T,children:[(null==l?void 0:l.length)>0&&(0,i.jsx)(o.Popup,{button:(0,i.jsxs)(f.Fragment,{children:[(0,i.jsx)("span",{children:null!=(b=null==(v=l.find(e=>e.name==r))?void 0:v.label)?b:_.label}),(0,i.jsx)(o.ChevronIcon,{className:"".concat(T,"__chevron")})]}),className:"".concat(T,"__breakpoint"),horizontalAlign:"right",render:e=>{let{close:t}=e;return(0,i.jsx)(o.PopupList.ButtonGroup,{children:(0,i.jsxs)(f.Fragment,{children:[l.map(e=>(0,i.jsx)(o.PopupList.Button,{active:e.name==r,onClick:()=>{u(e.name),t()},children:e.label},e.name)),"custom"===r&&(0,i.jsx)(o.PopupList.Button,{active:r==_.value,onClick:()=>{u(_.value),t()},children:_.label})]})})},showScrollbar:!0,verticalAlign:"bottom"}),(0,i.jsxs)("div",{className:"".concat(T,"__device-size"),children:[(0,i.jsx)(k,{axis:"x"}),(0,i.jsx)("span",{className:"".concat(T,"__size-divider"),children:(0,i.jsx)(a.a,{})}),(0,i.jsx)(k,{axis:"y"})]}),(0,i.jsx)(o.Popup,{button:(0,i.jsxs)(f.Fragment,{children:[(0,i.jsxs)("span",{children:[100*m,"%"]}),(0,i.jsx)(o.ChevronIcon,{className:"".concat(T,"__chevron")})]}),className:"".concat(T,"__zoom"),horizontalAlign:"right",render:n,showScrollbar:!0,verticalAlign:"bottom"}),(0,i.jsx)("a",{className:"".concat(T,"__external"),href:p,onClick:g,target:"_blank",type:"button",children:(0,i.jsx)(o.LinkIcon,{})})]}),t[0]=r,t[1]=l,t[2]=u,t[3]=c,t[4]=d,t[5]=y,t[6]=p,t[7]=m,t[8]=e}else e=t[8];return e}
27,P="live-preview-toolbar",$=e=>{let t,r,l,a=(0,n.c)(10),{toolbarPosition:u}=g();a[0]===Symbol.for("react.memo_cache_sentinel")?(t={id:"live-preview-toolbar"},a[0]=t):t=a[0];let{attributes:c,listeners:d,setNodeRef:f,transform:p}=(0,m.PM)(t);a[1]===Symbol.for("react.memo_cache_sentinel")?(r=[P,"".concat(P,"--draggable")],a[1]=r):r=a[1];let y="".concat(u.x,"px"),v="".concat(u.y,"px");return a[2]!==c||a[3]!==d||a[4]!==e||a[5]!==f||a[6]!==y||a[7]!==v||a[8]!==p?(l=(0,i.jsxs)("div",{className:r.join(" "),style:{left:y,top:v,...p?{transform:p?"translate3d(".concat((null==p?void 0:p.x)||0,"px, ").concat((null==p?void 0:p.y)||0,"px, 0)"):void 0}:{}},children:[(0,i.jsx)("button",{...d,...c,className:"".concat(P,"__drag-handle"),ref:f,type:"button",children:(0,i.jsx)(o.DragHandleIcon,{})}),(0,i.jsx)(N,{...e})]}),a[2]=c,a[3]=d,a[4]=e,a[5]=f,a[6]=y,a[7]=v,a[8]=p,a[9]=l):l=a[9],l},A=e=>(0,i.jsx)("div",{className:[P,"".concat(P,"--static")].join(" "),children:(0,i.jsx)(N,{...e})}),O=e=>{let{draggable:t}=e;return t?(0,i.jsx)($,{...e}):(0,i.jsx)(A,{...e})},j="live-preview-window",M=e=>{let t,r,a,u,c=(0,n.c)(41),{appIsReady:d,iframeHasLoaded:p,iframeRef:m,popupRef:y,previewWindowType:v,setIframeHasLoaded:b,url:_}=g(),w=(0,o.useLocale)(),{mostRecentUpdate:k}=(0,o.useDocumentEvents)(),{breakpoint:T,fieldSchemaJSON:E}=g(),N=f.useRef(void 0),[P]=(0,o.useAllFormFields)();if(c[0]!==d||c[1]!==E||c[2]!==P||c[3]!==m||c[4]!==w||c[5]!==k||c[6]!==y||c[7]!==v||c[8]!==_?(t=()=>{if(P&&window&&"postMessage"in window&&d){let t=(0,x.r)(P,!0),r=!N.current||N.current!==v;N.current=v;let n={type:"payload-live-preview",data:t,externallyUpdatedRelationship:k,fieldSchemaJSON:r?E:void 0,locale:w.code};if("popup"===v&&y.current&&y.current.postMessage(n,_),"iframe"===v&&m.current){var e;null==(e=m.current.contentWindow)||e.postMessage(n,_)}}},c[0]=d,c[1]=E,c[2]=P,c[3]=m,c[4]=w,c[5]=k,c[6]=y,c[7]=v,c[8]=_,c[9]=t):t=c[9],c[10]!==d||c[11]!==E||c[12]!==P||c[13]!==p||c[14]!==m||c[15]!==w||c[16]!==k||c[17]!==y||c[18]!==v||c[19]!==b||c[20]!==_?(r=[P,_,p,v,y,d,m,b,E,k,w],c[10]=d,c[11]=E,c[12]=P,c[13]=p,c[14]=m,c[15]=w,c[16]=k,c[17]=y,c[18]=v,c[19]=b,c[20]=_,c[21]=r):r=c[21],(0,f.useEffect)(t,r),c[22]!==m||c[23]!==y||c[24]!==v||c[25]!==_?(a=()=>{let e={type:"payload-document-event"};if("popup"===v&&y.current&&y.current.postMessage(e,_),"iframe"===v&&m.current){var t;null==(t=m.current.contentWindow)||t.postMessage(e,_)}},c[22]=m,c[23]=y,c[24]=v,c[25]=_,c[26]=a):a=c[26],c[27]!==m||c[28]!==k||c[29]!==y||c[30]!==v||c[31]!==_?(u=[k,m,y,v,_],c[27]=m,c[28]=k,c[29]=y,c[30]=v,c[31]=_,c[32]=u):u=c[32],(0,f.useEffect)(a,u),"iframe"===v){let t,r,n=T&&"responsive"!==T&&"".concat(j,"--has-breakpoint");c[33]!==n?(t=[j,n].filter(Boolean),c[33]=n,c[34]=t):t=c[34];let o=t.join(" ");return c[35]!==m||c[36]!==e||c[37]!==b||c[38]!==o||c[39]!==_?(r=(0,i.jsx)("div",{className:o,children:(0,i.jsxs)("div",{className:"".concat(j,"__wrapper"),children:[(0,i.jsx)(O,{...e}),(0,i.jsx)("div",{className:"".concat(j,"__main"),children:(0,i.jsx)(S,{children:_?(0,i.jsx)(C,{ref:m,setIframeHasLoaded:b,url:_}):(0,i.jsx)(l.d,{height:"100%"})})})]})}),c[35]=m,c[36]=e,c[37]=b,c[38]=o,c[39]=_,c[40]=r):r=c[40],r}},D=e=>{let t,r,i,o,a,u,c=(0,n.c)(15),{eventType:d,onMessage:p,url:g}=e,m=(0,f.useRef)(!1),[y,v]=(0,f.useState)(!1),{config:b}=(0,l.b)(),{serverURL:_}=b,w=(0,f.useRef)(null);c[0]!==d||c[1]!==y||c[2]!==p||c[3]!==_||c[4]!==g?(t=()=>{let e=async e=>{var t,r;e.origin===window.location.origin&&e.origin===g&&e.origin===_&&("function"!=typeof p||(null==(t=e.data)?void 0:t.type)!==d||m.current||(m.current=!0,await p(null==(r=e.data)?void 0:r.searchParams),m.current=!1))};return y&&w.current&&window.addEventListener("message",e,!1),()=>{window.removeEventListener("message",e)}},r=[p,d,g,_,y],c[0]=d,c[1]=y,c[2]=p,c[3]=_,c[4]=g,c[5]=t,c[6]=r):(t=c[5],r=c[6]),(0,f.useEffect)(t,r),c[7]!==g?(i=e=>{e&&e.preventDefault();let t={height:700,left:"auto",menubar:"no",popup:"yes",toolbar:"no",top:"auto",width:800},r=Object.entries(t).reduce((e,r)=>
27{let[n,i]=r,o=e;if("auto"===i){if("top"===n){let e=Math.round(window.innerHeight/2-t.height/2);o+="top=".concat(e,",")}else if("left"===n){let e=Math.round(window.innerWidth/2-t.width/2);o+="left=".concat(e,",")}return o}return o+"".concat(n,"=").concat(i,",")},"").slice(0,-1);w.current=window.open(g,"_blank",r),v(!0)},c[7]=g,c[8]=i):i=c[8];let x=i;return c[9]!==y?(o=()=>{let e;return y?e=setInterval(function(){w.current.closed&&(clearInterval(e),v(!1))},1e3):clearInterval(e),()=>{e&&clearInterval(e)}},a=[y,w],c[9]=y,c[10]=o,c[11]=a):(o=c[10],a=c[11]),(0,f.useEffect)(o,a),c[12]!==y||c[13]!==x?(u={isPopupOpen:y,openPopupWindow:x,popupRef:w},c[12]=y,c[13]=x,c[14]=u):u=c[14],u},R="live-preview",I=e=>{try{return new URL(e,window.location.origin).href}catch(t){return e}},F=e=>{var t,r,n,p,m,y,v,b,_;let{BeforeDocumentControls:w,collectionConfig:x,config:S,Description:C,EditMenuItems:k,fields:T,globalConfig:E,PreviewButton:N,PublishButton:P,SaveButton:$,SaveDraftButton:A,schemaPath:O}=e,{id:j,action:D,AfterDocument:I,AfterFields:F,apiURL:L,BeforeFields:B,collectionSlug:z,currentEditor:U,disableActions:K,disableLeaveWithoutSaving:W,docPermissions:q,documentIsLocked:V,getDocPermissions:J,getDocPreferences:H,globalSlug:G,hasPublishPermission:Y,hasSavePermission:Z,incrementVersionCount:X,initialData:Q,initialState:ee,isEditing:et,isInitializing:er,lastUpdateTime:en,setCurrentEditor:ei,setDocumentIsLocked:eo,unlockDocument:el,updateDocumentEditor:ea,updateSavedDocumentData:es}=(0,o.useDocumentInfo)(),{onSave:eu}=(0,o.useDocumentDrawerContext)(),ec=j?"update":"create",{config:{admin:{user:ed},routes:{admin:ef}}}=(0,l.b)(),eh=(0,c.useRouter)(),ep=(0,c.useSearchParams)().get("locale"),{t:eg}=(0,a.d)(),{previewWindowType:em}=g(),{refreshCookieAsync:ey,user:ev}=(0,o.useAuth)(),{reportUpdate:eb}=(0,o.useDocumentEvents)(),{resetUploadEdits:e_}=(0,o.useUploadEdits)(),{getFormState:ew}=(0,o.useServerFunctions)(),{startRouteTransition:ex}=(0,o.useRouteTransition)(),eS=x||E,eC=(null==x?void 0:x.slug)||(null==E?void 0:E.slug),ek=(0,o.useEditDepth)(),eT=(null==eS?void 0:eS.lockDocuments)===void 0||(null==eS?void 0:eS.lockDocuments),eE=!1!==eT,eN="object"==typeof eT?eT.duration:300,eP=!!((null==x||null==(t=x.versions)?void 0:t.drafts)&&(null==x||null==(n=x.versions)||null==(r=n.drafts)?void 0:r.autosave)||(null==E||null==(p=E.versions)?void 0:p.drafts)&&(null==E||null==(y=E.versions)||null==(m=y.drafts)?void 0:m.autosave)),e$=void 0!==W?!W:!eP,[eA,eO]=(0,f.useState)(!1),[ej,eM]=(0,f.useState)(!1),eD=(0,f.useRef)(null),eR=(0,f.useRef)(null),[eI,eF]=(0,f.useState)(Date.now()),eL=en+1e3*eN,eB=Date.now()>eL,ez=(0,f.useRef)({hasShownLockedModal:!1,isLocked:!1,user:null}),eU=(0,f.useCallback)(async e=>{var t,r;let n=(0,u.wN)(eR);if(eb({id:j,entitySlug:eC,updatedAt:(null==e||null==(t=e.result)?void 0:t.updatedAt)||new Date().toISOString()}),ev&&z===ed&&j===ev.id&&ey(),X(),"function"==typeof es&&es((null==e?void 0:e.doc)||{}),"function"==typeof eu&&eu({...e,operation:j?"update":"create"}),!et&&ek<2){let t=(0,d.Q)({adminRoute:ef,path:"/collections/".concat(z,"/").concat(null==e||null==(r=e.doc)?void 0:r.id).concat(ep?"?locale=".concat(ep):"")});ex(()=>eh.push(t))}else e_();if(await J(e),(j||G)&&!eP){let t=await H(),{state:r}=await ew({id:j,collectionSlug:z,data:(null==e?void 0:e.doc)||(null==e?void 0:e.result),docPermissions:q,docPreferences:t,globalSlug:G,operation:ec,renderAllFields:!0,returnLockStatus:!1,schemaPath:eC,signal:n.signal,skipValidation:!0});return eE&&eo(!1),eR.current=null,r}},[ef,z,ek,q,eC,J,H,ew,G,j,X,et,eE,ep,eu,ec,ey,eb,e_,eh,eo,es,ex,ev,ed,eP]),eK=(0,f.useCallback)(async e=>{let{formState:t,submitted:r}=e,n=(0,u.wN)(eD),i=Date.now(),o=i-eI,l=eE&&o>=1e4;l&&eF(i);let a=await H(),{lockedState:c,state:d}=await ew({id:j,collectionSlug:z,docPermissions:q,docPreferences:a,formState:t,globalSlug:G,operation:ec,returnLockStatus:!!eE,schemaPath:O,signal:n.signal,skipValidation:!r,updateLastEdited:l});if(eo(!0),eE){var f,p,g,m,y;let e="object"==typeof(null==(f=ez.current)?void 0:f.user)?null==(g=ez.current)||null==(p=g.user)?void 0:p.id:null==(m=ez.current)?void 0:m.user;if(c){let t="string"==typeof c.user||"number"==typeof c.user?c.user:c.user.id;
27ez.current&&t===e||(e===ev.id&&t!==ev.id&&(eM(!0),ez.current.hasShownLockedModal=!0),ez.current=ez.current={hasShownLockedModal:(null==(y=ez.current)?void 0:y.hasShownLockedModal)||!1,isLocked:!0,user:c.user},ei(c.user))}}return eD.current=null,d},[eI,eE,H,ew,j,z,q,G,ec,O,eo,null==ev?void 0:ev.id,ei]);(0,f.useEffect)(()=>()=>{if(!eE)return;let e=window.location.pathname,t=j||G,r=["preview","api","versions"].some(t=>e.includes(t));if(t&&V&&!r){var n,i,o,l;("object"==typeof(null==(n=ez.current)?void 0:n.user)?(null==(o=ez.current)||null==(i=o.user)?void 0:i.id)===(null==ev?void 0:ev.id):(null==(l=ez.current)?void 0:l.user)===(null==ev?void 0:ev.id))&&(el(j,null!=z?z:G),eo(!1),ei(null))}eM(!1)},[z,G,j,el,ev,ei,eE,V,eo]),(0,f.useEffect)(()=>{let e=eD.current,t=eR.current;return()=>{(0,u.eS)(e),(0,u.eS)(t)}});let eW=V&&U&&("object"==typeof U?U.id!==(null==ev?void 0:ev.id):U!==(null==ev?void 0:ev.id))&&!eA&&!ej&&!(null==(v=ez.current)?void 0:v.hasShownLockedModal)&&!eB;return(0,i.jsx)(o.OperationProvider,{operation:ec,children:(0,i.jsxs)(o.Form,{action:D,className:"".concat(R,"__form"),disabled:eA||!Z,initialState:ee,isInitializing:er,method:j?"PATCH":"POST",onChange:[eK],onSuccess:eU,children:[eE&&eW&&!eA&&(0,i.jsx)(o.DocumentLocked,{handleGoBack:()=>(0,u.yF)({adminRoute:ef,collectionSlug:z,router:eh}),isActive:eW,onReadOnly:()=>{eO(!0),eM(!1)},onTakeOver:()=>(0,u.UG)(j,z,G,ev,!1,ea,ei,ez,eE),updatedAt:en,user:U}),eE&&ej&&(0,i.jsx)(o.DocumentTakeOver,{handleBackToDashboard:()=>(0,u.n_)({adminRoute:ef,router:eh}),isActive:ej,onReadOnly:()=>{eO(!0),eM(!1)}}),!eA&&e$&&(0,i.jsx)(o.LeaveWithoutSaving,{}),(0,i.jsx)(o.SetDocumentStepNav,{collectionSlug:z,globalLabel:null==E?void 0:E.label,globalSlug:G,id:j,pluralLabel:x?null==x||null==(b=x.labels)?void 0:b.plural:void 0,useAsTitle:x?null==x||null==(_=x.admin)?void 0:_.useAsTitle:void 0,view:eg("general:livePreview")}),(0,i.jsx)(o.SetDocumentTitle,{collectionConfig:x,config:S,fallback:(null==j?void 0:j.toString())||"",globalConfig:E}),(0,i.jsx)(o.DocumentControls,{apiURL:L,BeforeDocumentControls:w,customComponents:{PreviewButton:N,PublishButton:P,SaveButton:$,SaveDraftButton:A},data:Q,disableActions:K,EditMenuItems:k,hasPublishPermission:Y,hasSavePermission:Z,id:j,isEditing:et,onTakeOver:()=>(0,u.UG)(j,z,G,ev,!0,ea,ei,ez,eE,eO),permissions:q,readOnlyForIncomingUser:eA,slug:(null==x?void 0:x.slug)||(null==E?void 0:E.slug),user:U}),(0,i.jsxs)("div",{className:[R,"popup"===em&&"".concat(R,"--detached")].filter(Boolean).join(" "),children:[(0,i.jsxs)("div",{className:["".concat(R,"__main"),"popup"===em&&"".concat(R,"__main--popup-open")].filter(Boolean).join(" "),children:[(0,i.jsx)(o.DocumentFields,{AfterFields:F,BeforeFields:B,Description:C,docPermissions:q,fields:T,forceSidebarWrap:!0,readOnly:eA||!Z,schemaPathSegments:[z||G]}),I]}),(0,i.jsx)(M,{collectionSlug:z,globalSlug:G})]})]})})},L=e=>{let t,r,a,u=(0,n.c)(24),{breakpoints:c,url:d}=e,{collectionSlug:p,globalSlug:g}=(0,o.useDocumentInfo)(),{config:m,config:y,getEntityConfig:v}=(0,l.b)(),{routes:b,serverURL:_}=y,{api:x}=b;u[0]!==d?(t=d.startsWith("http://")||d.startsWith("https://")?d:I(d),u[0]=d,u[1]=t):t=u[1];let S=t;u[2]!==S?(r={eventType:"payload-live-preview",url:S},u[2]=S,u[3]=r):r=u[3];let{isPopupOpen:C,openPopupWindow:k,popupRef:T}=D(r);if(u[4]!==x||u[5]!==c||u[6]!==p||u[7]!==m||u[8]!==v||u[9]!==g||u[10
27]!==C||u[11]!==k||u[12]!==T||u[13]!==e.BeforeDocumentControls||u[14]!==e.Description||u[15]!==e.EditMenuItems||u[16]!==e.PreviewButton||u[17]!==e.PublishButton||u[18]!==e.SaveButton||u[19]!==e.SaveDraftButton||u[20]!==e.Upload||u[21]!==_||u[22]!==S){var E;let t=v({collectionSlug:p}),r=v({globalSlug:g}),n=p||g;a=(0,i.jsx)(f.Fragment,{children:(0,i.jsx)(w,{breakpoints:c,fieldSchema:(null==t?void 0:t.fields)||(null==r?void 0:r.fields),isPopupOpen:C,openPopupWindow:k,popupRef:T,url:S,children:(0,i.jsx)(F,{apiRoute:x,BeforeDocumentControls:e.BeforeDocumentControls,collectionConfig:t,config:m,Description:e.Description,EditMenuItems:e.EditMenuItems,fields:null==(E=t||r)?void 0:E.fields,globalConfig:r,PreviewButton:e.PreviewButton,PublishButton:e.PublishButton,SaveButton:e.SaveButton,SaveDraftButton:e.SaveDraftButton,schemaPath:n,serverURL:_,Upload:e.Upload})})}),u[4]=x,u[5]=c,u[6]=p,u[7]=m,u[8]=v,u[9]=g,u[10]=C,u[11]=k,u[12]=T,u[13]=e.BeforeDocumentControls,u[14]=e.Description,u[15]=e.EditMenuItems,u[16]=e.PreviewButton,u[17]=e.PublishButton,u[18]=e.SaveButton,u[19]=e.SaveDraftButton,u[20]=e.Upload,u[21]=_,u[22]=S,u[23]=a}else a=u[23];return a}},79016:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;let n=r(79772),i=r(61974),o=r(81708),l=r(7525);function a(e){let{gen:t,data:r,it:i}=e;t.if(i.parentData,()=>t.assign(r,(0,n._)`${i.parentData}[${i.parentDataProperty}]`))}function u(e,t,r){if(void 0===r)throw Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,n.stringify)(r)})}t.macroKeywordCode=function(e,t){let{gen:r,keyword:i,schema:o,parentSchema:l,it:a}=e,c=t.macro.call(a.self,o,l,a),d=u(r,i,c);!1!==a.opts.validateSchema&&a.self.validateSchema(c,!0);let f=r.name("valid");e.subschema({schema:c,schemaPath:n.nil,errSchemaPath:`${a.errSchemaPath}/${i}`,topSchemaRef:d,compositeRule:!0},f),e.pass(f,()=>e.error(!0))},t.funcKeywordCode=function(e,t){var r;let{gen:c,keyword:d,schema:f,parentSchema:p,$data:g,it:m}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw Error("async keyword in sync schema")}(m,t);let y=u(c,d,!g&&t.compile?t.compile.call(m.self,f,p,m):t.validate),v=c.let("valid");function b(r=t.async?(0,n._)`await `:n.nil){let l=m.opts.passContext?i.default.this:i.default.self,a=!("compile"in t&&!g||!1===t.schema);c.assign(v,(0,n._)`${r}${(0,o.callValidateCode)(e,y,l,a)}`,t.modifying)}function _(e){var r;c.if((0,n.not)(null!=(r=t.valid)?r:v),e)}e.block$data(v,function(){if(!1===t.errors)b(),t.modifying&&a(e),_(()=>e.error());else{let r=t.async?function(){let e=c.let("ruleErrs",null);return c.try(()=>b((0,n._)`await `),t=>c.assign(v,!1).if((0,n._)`${t} instanceof ${m.ValidationError}`,()=>c.assign(e,(0,n._)`${t}.errors`),()=>c.throw(t))),e}():function(){let e=(0,n._)`${y}.errors`;return c.assign(e,null),b(n.nil),e}();t.modifying&&a(e),_(()=>(function(e,t){let{gen:r}=e;r.if((0,n._)`Array.isArray(${t})`,()=>{r.assign(i.default.vErrors,(0,n._)`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`).assign(i.default.errors,(0,n._)`${i.default.vErrors}.length`),(0,l.extendErrors)(e)},()=>e.error())})(e,r))}}),e.ok(null!=(r=t.valid)?r:v)},t.validSchemaType=function(e,t,r=!1){return!t.length||t.some(t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e)},t.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:n},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw Error("ajv implementation error");let l=i.dependencies;if(null==l?void 0:l.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw Error(`parent schema must have dependencies of ${o}: ${l.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[o])){let e=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if("log"===t.validateSchema)r.logger.error(e);else throw Error(e)}}},79558:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(79772),i=r(73274);function o(e,t){let r=e.schema[t];return void 0!==r&&!(0,i.alwaysValidSchema)(e,r)}t.default={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>(0,n.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,n._)`{failingKeyword: ${e.ifClause}}`},code(e){let{gen:t,parentSchema:r,it:l}=e;void 0===r.then&&void 0===r.else&&(0,i.checkStrictMode)(l,'"if" without "then" and "else" is ignored');let a=o(l,"then"),u=o(l,"else");if(!a&&!u)return;let c=t.let("valid",!0),d=t.name("_valid");if(function(){let t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},d);e.mergeEvaluated(t)}(),e.reset(),a&&u){let r=t.let("ifClause");e.setParams({ifClause:r}),t.if(d,f("then",r),f("else",r))}else a?t.if(d,f("then")):t.if((0,n.not)(d),f("else"));function f(r,i){return()=>{let o=e.subschema({keyword:r},d);t.assign(c,d),e.mergeValidEvaluated(o,c),i?t.assign(i,(0,n._)`${r}`):e.setParams({ifClause:r})}}e.pass(c,()=>e.error(!0))}}},79615:(e,t,r)=>{"use strict";r.d(t,{RenderVersionFieldsToDiff:()=>u});var n=r(19749),i=r(95155),o=r(58028),l=r(12115);let a="render-field-diffs",u=e=>{let t,r,u,d=(0,n.c)(6),{parent:f,versionFields:p}=e,[g,m]=l.useState(!1);d[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{m(!0)},r=[],d[0]=t,d[1]=r):(t=d[0],r=d[1]),(0,l.useEffect)(t,r);let y="".concat(a).concat(void 0!==f&&f?" ".concat(a,"--parent"):"");return d[2]!==g||d[3]!==y||d[4]!==p?(u=(0,i.jsx)("div",{className:y,children:g?null==p?void 0:p.map(c):(0,i.jsx)(l.Fragment,{children:(0,i.jsx)(o.d,{height:"8rem",width:"100%"})})}
27),d[2]=g,d[3]=y,d[4]=p,d[5]=u):u=d[5],u};function c(e,t){if(e.fieldByLocale){let r=[];for(let[n,o]of Object.entries(e.fieldByLocale))r.push((0,i.jsx)("div",{className:"".concat(a,"__locale"),"data-field-path":o.path,"data-locale":n,children:(0,i.jsx)("div",{className:"".concat(a,"__locale-value"),children:o.CustomComponent})},[n,t].join("-")));return(0,i.jsx)("div",{className:"".concat(a,"__field"),children:r},t)}return e.field?(0,i.jsx)("div",{className:"".concat(a,"__field field__").concat(e.field.type),"data-field-path":e.field.path,children:e.field.CustomComponent},t):null}},79737:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});let n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};for(var i,o=new Uint8Array(16),l=[],a=0;a<256;++a)l.push((a+256).toString(16).slice(1));let u=function(e,t,r){if(n.randomUUID&&!t&&!e)return n.randomUUID();var a=(e=e||{}).random||(e.rng||function(){if(!i&&!(i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(o)})();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t){r=r||0;for(var u=0;u<16;++u)t[r+u]=a[u];return t}return function(e,t=0){return(l[e[t+0]]+l[e[t+1]]+l[e[t+2]]+l[e[t+3]]+"-"+l[e[t+4]]+l[e[t+5]]+"-"+l[e[t+6]]+l[e[t+7]]+"-"+l[e[t+8]]+l[e[t+9]]+"-"+l[e[t+10]]+l[e[t+11]]+l[e[t+12]]+l[e[t+13]]+l[e[t+14]]+l[e[t+15]]).toLowerCase()}(a)}},79772:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;let n=r(53921),i=r(93524);var o=r(53921);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return o.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return o.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return o.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return o.Name}});var l=r(93524);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return l.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return l.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return l.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return l.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class a{optimizeNodes(){return this}optimizeNames(e,t){return this}}class u extends a{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){let r=e?i.varKinds.var:this.varKind,n=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=M(this.rhs,e,t)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class c extends a{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof n.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=M(this.rhs,e,t),this}get names(){return j(this.lhs instanceof n.Name?{}:{...this.lhs.names},this.rhs)}}class d extends c{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class f extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class p extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){let t=this.label?` ${this.label}`:"";return`break${t};`+e}}class g extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class m extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}
27optimizeNames(e,t){return this.code=M(this.code,e,t),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class y extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:r}=this,n=r.length;for(;n--;){let i=r[n];i.optimizeNames(e,t)||(function(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}(e,i.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>O(e,t.names),{})}}class v extends y{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class b extends y{}class _ extends v{}_.kind="else";class w extends v{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){let e=t.optimizeNodes();t=this.else=Array.isArray(e)?new _(e):e}return t?!1===e?t instanceof w?t:t.nodes:this.nodes.length?this:new w(D(e),t instanceof w?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null==(r=this.else)?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=M(this.condition,e,t),this}get names(){let e=super.names;return j(e,this.condition),this.else&&O(e,this.else.names),e}}w.kind="if";class x extends v{}x.kind="for";class S extends x{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=M(this.iteration,e,t),this}get names(){return O(super.names,this.iteration.names)}}class C extends x{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){let t=e.es5?i.varKinds.var:this.varKind,{name:r,from:n,to:o}=this;return`for(${t} ${r}=${n}; ${r}<${o}; ${r}++)`+super.render(e)}get names(){let e=j(super.names,this.from);return j(e,this.to)}}class k extends x{constructor(e,t,r,n){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=M(this.iterable,e,t),this}get names(){return O(super.names,this.iterable.names)}}class T extends v{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){let t=this.async?"async ":"";return`${t}function ${this.name}(${this.args})`+super.render(e)}}T.kind="func";class E extends y{render(e){return"return "+super.render(e)}}E.kind="return";class N extends v{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null==(e=this.catch)||e.optimizeNodes(),null==(t=this.finally)||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),null==(r=this.catch)||r.optimizeNames(e,t),null==(n=this.finally)||n.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&O(e,this.catch.names),this.finally&&O(e,this.finally.names),e}}class P extends v{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}P.kind="catch";class $ extends v{render(e){return"finally"+super.render(e)}}$.kind="finally";class A{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new i.Scope({parent:e}),this._nodes=[new b]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){let i=this._scope.toName(t);return void 0!==r&&n&&(this._constants[i.str]=r),this._leafNode(new u(e,i,r)),i}const(e,t,r){return this._def(i.varKinds.const,e,t,r)}let(e,t,r){return this._def(i.varKinds.let,e,t,r)}var(e,t,r){return this._def(i.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new c(e,t,r))}add(e,r){return this._leafNode(new d(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==n.nil&&this._leafNode(new m(e)),this}object(...e){let t=["{"];for(let[r,i]of e)t.length>1&&t.push(","),t.push(r),(r!==i||this.opts.es5)&&(t.push(":"),(0,n.addCodeArg)(t,i));return t.push("}"),new n._Code(t)}
27if(e,t,r){if(this._blockNode(new w(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new w(e))}else(){return this._elseNode(new _)}endIf(){return this._endBlockNode(w,_)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new S(e),t)}forRange(e,t,r,n,o=this.opts.es5?i.varKinds.var:i.varKinds.let){let l=this._scope.toName(e);return this._for(new C(o,l,t,r),()=>n(l))}forOf(e,t,r,o=i.varKinds.const){let l=this._scope.toName(e);if(this.opts.es5){let e=t instanceof n.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,n._)`${e}.length`,t=>{this.var(l,(0,n._)`${e}[${t}]`),r(l)})}return this._for(new k("of",o,l,t),()=>r(l))}forIn(e,t,r,o=this.opts.es5?i.varKinds.var:i.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,n._)`Object.keys(${t})`,r);let l=this._scope.toName(e);return this._for(new k("in",o,l,t),()=>r(l))}endFor(){return this._endBlockNode(x)}label(e){return this._leafNode(new f(e))}break(e){return this._leafNode(new p(e))}return(e){let t=new E;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(e,t,r){if(!t&&!r)throw Error('CodeGen: "try" without "catch" and "finally"');let n=new N;if(this._blockNode(n),this.code(e),t){let e=this.name("e");this._currNode=n.catch=new P(e),t(e)}return r&&(this._currNode=n.finally=new $,this.code(r)),this._endBlockNode(P,$)}throw(e){return this._leafNode(new g(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(void 0===t)throw Error("CodeGen: not in self-balancing block");let r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=n.nil,r,i){return this._blockNode(new T(e,t,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(T)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof w))throw Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}}function O(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function j(e,t){return t instanceof n._CodeOrName?O(e,t.names):e}function M(e,t,r){var i;if(e instanceof n.Name)return o(e);if(!((i=e)instanceof n._Code&&i._items.some(e=>e instanceof n.Name&&1===t[e.str]&&void 0!==r[e.str])))return e;return new n._Code(e._items.reduce((e,t)=>(t instanceof n.Name&&(t=o(t)),t instanceof n._Code?e.push(...t._items):e.push(t),e),[]));function o(e){let n=r[e.str];return void 0===n||1!==t[e.str]?e:(delete t[e.str],n)}}function D(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:(0,n._)`!${L(e)}`}t.CodeGen=A,t.not=D;let R=F(t.operators.AND);t.and=function(...e){return e.reduce(R)};let I=F(t.operators.OR);function F(e){return(t,r)=>t===n.nil?r:r===n.nil?t:(0,n._)`${L(t)} ${e} ${L(r)}`}function L(e){return e instanceof n.Name?e:(0,n._)`(${e})`}t.or=function(...e){return e.reduce(I)}},79975:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(79772),i=r(73274),o=r(81708),l=r(97208);t.default={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,n.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,n._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:a}=r;n.items=!0,(0,i.alwaysValidSchema)(n,t)||(a?(0,l.validateAdditionalItems)(e,a):e.ok((0,o.validateArray)(e)))}}},81581:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});let n={src:"/_next/static/media/static-og-image.477255a8.png",height:480,width:640,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAGCAMAAADJ2y/JAAAAD1BMVEX39/f///+urq7Hx8e6urr/rfEaAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAHUlEQVR4nGNghAIGEAYTjIwMTCwgEsRgRpO
27CKAYABUMAMfeXEyAAAAAASUVORK5CYII=",blurWidth:8,blurHeight:6}},81708:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;let n=r(79772),i=r(73274),o=r(61974),l=r(73274);function a(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,n._)`Object.prototype.hasOwnProperty`})}function u(e,t,r){return(0,n._)`${a(e)}.call(${t}, ${r})`}function c(e,t,r,i){let o=(0,n._)`${t}${(0,n.getProperty)(r)} === undefined`;return i?(0,n.or)(o,(0,n.not)(u(e,t,r))):o}function d(e){return e?Object.keys(e).filter(e=>"__proto__"!==e):[]}t.checkReportMissingProp=function(e,t){let{gen:r,data:i,it:o}=e;r.if(c(r,i,t,o.opts.ownProperties),()=>{e.setParams({missingProperty:(0,n._)`${t}`},!0),e.error()})},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},i,o){return(0,n.or)(...i.map(i=>(0,n.and)(c(e,t,i,r.ownProperties),(0,n._)`${o} = ${i}`)))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=u,t.propertyInData=function(e,t,r,i){let o=(0,n._)`${t}${(0,n.getProperty)(r)} !== undefined`;return i?(0,n._)`${o} && ${u(e,t,r)}`:o},t.noPropertyInData=c,t.allSchemaProperties=d,t.schemaProperties=function(e,t){return d(t).filter(r=>!(0,i.alwaysValidSchema)(e,t[r]))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:i,schemaPath:l,errorPath:a},it:u},c,d,f){let p=f?(0,n._)`${e}, ${t}, ${i}${l}`:t,g=[[o.default.instancePath,(0,n.strConcat)(o.default.instancePath,a)],[o.default.parentData,u.parentData],[o.default.parentDataProperty,u.parentDataProperty],[o.default.rootData,o.default.rootData]];u.opts.dynamicRef&&g.push([o.default.dynamicAnchors,o.default.dynamicAnchors]);let m=(0,n._)`${p}, ${r.object(...g)}`;return d!==n.nil?(0,n._)`${c}.call(${d}, ${m})`:(0,n._)`${c}(${m})`};let f=(0,n._)`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){let i=t.unicodeRegExp?"u":"",{regExp:o}=t.code,a=o(r,i);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:(0,n._)`${"new RegExp"===o.code?f:(0,l.useFunc)(e,o)}(${r}, ${i})`})},t.validateArray=function(e){let{gen:t,data:r,keyword:o,it:l}=e,a=t.name("valid");if(l.allErrors){let e=t.let("valid",!0);return u(()=>t.assign(e,!1)),e}return t.var(a,!0),u(()=>t.break()),a;function u(l){let u=t.const("len",(0,n._)`${r}.length`);t.forRange("i",0,u,r=>{e.subschema({keyword:o,dataProp:r,dataPropType:i.Type.Num},a),t.if((0,n.not)(a),l)})}},t.validateUnion=function(e){let{gen:t,schema:r,keyword:o,it:l}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(r.some(e=>(0,i.alwaysValidSchema)(l,e))&&!l.opts.unevaluated)return;let a=t.let("valid",!1),u=t.name("_valid");t.block(()=>r.forEach((r,i)=>{let l=e.subschema({keyword:o,schemaProp:i,compositeRule:!0},u);t.assign(a,(0,n._)`${a} || ${u}`),e.mergeValidEvaluated(l,u)||t.if((0,n.not)(a))})),e.result(a,()=>e.reset(),()=>e.error(!0))}},83039:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>f,enUS:()=>d});let n={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};var i=r(52143);let o={date:(0,i.k)({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:(0,i.k)({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:(0,i.k)({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},l={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};var a=r(38265);let u={ordinalNumber:(e,t)=>{let r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:(0,a.o)({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:(0,a.o)({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:(0,a.o)({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:(0,a.o)({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
27ay","Saturday"]},defaultWidth:"wide"}),dayPeriod:(0,a.o)({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};var c=r(87291);let d={code:"en-US",formatDistance:(e,t,r)=>{let i,o=n[e];if(i="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null==r?void 0:r.addSuffix)if(r.comparison&&r.comparison>0)return"in "+i;else return i+" ago";return i},formatLong:o,formatRelative:(e,t,r,n)=>l[e],localize:u,match:{ordinalNumber:(0,r(66943).K)({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:(0,c.A)({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:(0,c.A)({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:(0,c.A)({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:(0,c.A)({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:(0,c.A)({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},f=d},83795:(e,t,r)=>{"use strict";r.d(t,{a:()=>E,b:()=>N,c:()=>x,d:()=>S,e:()=>C});var n=r(93916),i=r(48643),o=r(95155),l=r(12115),a=r(94271),u=r(84365),c=r(87677),d=r(92825),f=r(58028),p=r(78234),g=r(32532),m=r(15526),y=r(14994),v=r(79737),b=r(1585),_=class extends g.Kp7{__cacheBuster;__fields;constructor({cacheBuster:e,fields:t,key:r}){super(r),this.__fields=t,this.__cacheBuster=e||0}static clone(e){return new this({cacheBuster:e.__cacheBuster,fields:e.__fields,key:e.__key})}static getType(){return"inlineBlock"}static importDOM(){return{}}static importJSON(e){var t;return new _({fields:{...t=e.fields,id:t?.id||new b.default().toHexString()}})}static isInline(){return!1}canIndent(){return!0}createDOM(){let e=document.createElement("span");return e.classList.add("inline-block-container"),e}decorate(e,t){return null}exportDOM(){let e=document.createElement("span");e.classList.add("inline-block-container");let t=document.createTextNode(this.getTextContent());return e.append(t),{element:e}}exportJSON(){return{type:"inlineBlock",fields:this.getFields(),version:1}}getCacheBuster(){return this.getLatest().__cacheBuster}getFields(){return this.getLatest().__fields}getTextContent(){return"Block Field"}isInline(){return!0}setFields(e,t){let r=this.getWritable();r.__fields=e,t||r.__cacheBuster++}updateDOM(){return!1}},w=l.lazy(()=>r.e(3630).then(r.bind(r,33630)).then(e=>({default:e.InlineBlockComponent}))),x=class extends _{static clone(e){return super.clone(e)}static getType(){return super.getType()}static importJSON(e){return S(e.fields)}decorate(e,t){return(0,o.jsx)(w,{cacheBuster:this.getCacheBuster(),formData:this.getFields(),nodeKey:this.getKey()})}
27exportJSON(){return super.exportJSON()}};function S(e){return new x({fields:{...e,id:e?.id||new b.default().toHexString()}})}function C(e){return e instanceof x}var k="inline-block",T=(0,l.createContext)({initialState:!1}),E=()=>l.use(T),N=e=>{let{cacheBuster:t,formData:r,nodeKey:b}=e,[_]=(0,a.DF)(),{i18n:w,t:x}=(0,c.d)(),{createdInlineBlock:S,fieldProps:{featureClientSchemaMap:E,initialLexicalFormState:N,permissions:P,readOnly:$,schemaPath:A},setCreatedInlineBlock:O,uuid:j}=(0,i.b)(),{fields:M}=(0,d.useDocumentForm)(),{getFormState:D}=(0,d.useServerFunctions)(),R=(0,d.useEditDepth)(),I=(0,l.useRef)(!1),[F,L]=l.useState(()=>N?.[r.id]?.formState),B=(0,l.useRef)(!1),z=(0,l.useRef)(t);(0,l.useEffect)(()=>{B.current?(z.current!==t&&L(!1),z.current=t):B.current=!0},[t]);let[U,K]=l.useState(F?._components?.customComponents?.BlockLabel),[W,q]=l.useState(F?._components?.customComponents?.Block),V=(0,d.formatDrawerSlug)({slug:`lexical-inlineBlocks-create-${j}-${r.id}`,depth:R}),{toggleDrawer:J}=(0,n.a)(V,!0),H=(0,l.useRef)(null),{id:G,collectionSlug:Y,getDocPreferences:Z,globalSlug:X}=(0,d.useDocumentInfo)(),{config:Q}=(0,f.b)(),ee=`${A}.lexical_internal_feature.blocks.lexical_inline_blocks.${r.blockType}`,et=E.blocks?.[ee]?.[0],er=et.blockReferences?"string"==typeof et?.blockReferences?.[0]?Q.blocksMap[et?.blockReferences?.[0]]:et?.blockReferences?.[0]:et?.blocks?.[0],en=er?.fields??[];(0,l.useEffect)(()=>{I.current||S?.getKey()!==b||(en.length>2&&J(),O?.(void 0),I.current=!0)},[en.length,S,b,O,J]);let ei=(0,l.useCallback)(()=>{_.update(()=>{(0,g.nsf)(b)?.remove()})},[_,b]),eo=er?.labels?.singular?(0,u.s)(er?.labels.singular,w):er?.slug,el=(0,l.useRef)(new AbortController),ea=`${A}.lexical_internal_feature.blocks.lexical_inline_blocks.${er?.slug}.fields`;(0,l.useEffect)(()=>{let e=new AbortController;return r&&!F&&(async()=>{let{state:t}=await D({id:G,collectionSlug:Y,data:r,docPermissions:{fields:!0},docPreferences:await Z(),documentFormState:(0,m.KS)(M),globalSlug:X,initialBlockData:r,initialBlockFormState:r,operation:"update",renderAllFields:!0,schemaPath:ea,signal:e.signal});if(t){let e=(0,y.r)((0,m.KS)(t),!0);_.update(()=>{let t=(0,g.nsf)(b);t&&C(t)&&(e.blockType=r.blockType,t.setFields(e,!0))}),L(t),K(t._components?.customComponents?.BlockLabel),q(t._components?.customComponents?.Block)}})(),()=>{(0,p.eS)(e)}},[D,_,b,ea,G,r,F,Y,X,Z,M]);let es=(0,l.useCallback)(async({formState:e,submit:t})=>{(0,p.eS)(el.current);let r=new AbortController;el.current=r;let{state:n}=await D({id:G,collectionSlug:Y,docPermissions:{fields:!0},docPreferences:await Z(),documentFormState:(0,m.KS)(M),formState:e,globalSlug:X,initialBlockFormState:e,operation:"update",renderAllFields:!!t,schemaPath:ea,signal:r.signal});return n?(t&&(K(n._components?.customComponents?.BlockLabel),q(n._components?.customComponents?.Block)),n):e},[D,G,Y,Z,M,X,ea]);(0,l.useEffect)(()=>{let e=(e,t)=>Object.keys(t).some(r=>t[r]&&e[r]!==t[r].value);return()=>{F&&e(r,F)&&L(!1),(0,p.eS)(el.current)}},[r,F]);let eu=(0,l.useCallback)((e,t)=>{t.blockType=r.blockType,_.update(()=>{let e=(0,g.nsf)(b);e&&C(e)&&e.setFields(t,!0)})},[_,b,r]),ec=(0,l.useMemo)(()=>()=>(0,o.jsx)(d.Button,{buttonStyle:"icon-label",className:`${k}__removeButton`,disabled:$,icon:"x",onClick:e=>{e.preventDefault(),ei()},round:!0,size:"small",tooltip:x("lexical:blocks:inlineBlocks:remove",{label:eo})}),[eo,$,ei,x]),ed=(0,l.useMemo)(()=>()=>(0,o.jsx)(d.Button,{buttonStyle:"icon-label",className:`${k}__editButton`,disabled:$,el:"button",icon:"edit",onClick:()=>{J()},round:!0,size:"small",tooltip:x("lexical:blocks:inlineBlocks:edit",{label:eo})}),[eo,$,x,J]),ef=(0,l.useMemo)(()=>({children:e,className:t})=>(0,o.jsx)("div",{className:[k,k+"-"+r.blockType,t].filter(Boolean).join(" "),ref:H,children:e}),[r.blockType]),eh=(0,l.useMemo)(()=>U?()=>U:()=>(0,o.jsx)("div",{children:er?.labels?(0,u.s)(er?.labels.singular,w):""}),[U,er?.labels,w]);return er?(0,o.jsxs)(d.Form,{beforeSubmit:[async({formState:e})=>await es({formState:e,submit:!0})],disableValidationOnSubmit:!0,el:"div",fields:er?.fields,initialState:F||{},onChange:[es],onSubmit:(e,t)=>
27{eu(e,t),J()},uuid:(0,v.A)(),children:[(0,o.jsx)(d.EditDepthProvider,{children:(0,o.jsx)(d.Drawer,{className:"",slug:V,title:x(`lexical:blocks:inlineBlocks:${r?.id?"edit":"create"}`,{label:eo??x("lexical:blocks:inlineBlocks:label")}),children:F?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.RenderFields,{fields:er?.fields,forceRender:!0,parentIndexPath:"",parentPath:"",parentSchemaPath:ea,permissions:!0,readOnly:!1}),(0,o.jsx)(d.FormSubmit,{programmaticSubmit:!0,children:x("fields:saveChanges")})]}):null})}),W?(0,o.jsx)(T,{value:{EditButton:ed,initialState:F,InlineBlockContainer:ef,Label:eh,nodeKey:b,RemoveButton:ec},children:W}):(0,o.jsxs)(ef,{children:[F?(0,o.jsx)(eh,{}):(0,o.jsx)(f.d,{height:"15px",width:"40px"}),_.isEditable()?(0,o.jsxs)("div",{className:`${k}__actions`,children:[(0,o.jsx)(ed,{}),(0,o.jsx)(ec,{})]}):null]})]}):(0,o.jsxs)(ef,{className:`${k}-not-found`,children:[(0,o.jsxs)("span",{children:["Error: Block '",r.blockType,"' not found"]}),_.isEditable()?(0,o.jsx)("div",{className:`${k}__actions`,children:(0,o.jsx)(ec,{})}):null]})}},84365:(e,t,r)=>{"use strict";r.d(t,{s:()=>n});let n=(e,t)=>{if("object"==typeof e&&!Object.prototype.hasOwnProperty.call(e,"$$typeof")){if(e[t.language])return e[t.language];let r=[];"string"==typeof t.fallbackLanguage?r=[t.fallbackLanguage]:Array.isArray(t.fallbackLanguage)&&(r=t.fallbackLanguage);let n=r.find(t=>e[t]);return n&&e[n]?e[n]:e[Object.keys(e)[0]]}return"function"==typeof e?e({i18n:t,t:t.t}):e}},84423:(e,t,r)=>{"use strict";r.d(t,{k:()=>o});var n=r(95490),i=r(89447);function o(e,t){var r,o,l,a,u,c,d,f;let p=(0,n.q)(),g=null!=(f=null!=(d=null!=(c=null!=(u=null==t?void 0:t.weekStartsOn)?u:null==t||null==(o=t.locale)||null==(r=o.options)?void 0:r.weekStartsOn)?c:p.weekStartsOn)?d:null==(a=p.locale)||null==(l=a.options)?void 0:l.weekStartsOn)?f:0,m=(0,i.a)(e,null==t?void 0:t.in),y=m.getDay();return m.setDate(m.getDate()-(7*(y<g)+y-g)),m.setHours(0,0,0,0),m}},84896:(e,t,r)=>{e.exports=r(90342)},84930:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(79772),i=r(73274),o=r(99155);t.default={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,n._)`{allowedValues: ${e}}`},code(e){let t,r,{gen:l,data:a,$data:u,schema:c,schemaCode:d,it:f}=e;if(!u&&0===c.length)throw Error("enum must have non-empty array");let p=c.length>=f.opts.loopEnum,g=()=>null!=t?t:t=(0,i.useFunc)(l,o.default);if(p||u)r=l.let("valid"),e.block$data(r,function(){l.assign(r,!1),l.forOf("v",d,e=>l.if((0,n._)`${g()}(${a}, ${e})`,()=>l.assign(r,!0).break()))});else{if(!Array.isArray(c))throw Error("ajv implementation error");let e=l.const("vSchema",d);r=(0,n.or)(...c.map((t,r)=>(function(e,t){let r=c[t];return"object"==typeof r&&null!==r?(0,n._)`${g()}(${a}, ${e}[${t}])`:(0,n._)`${a} === ${r}`})(e,r)))}e.pass(r)}}},85331:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;let n=r(66534),i=r(62889),o=r(51270),l=r(62889),a=r(70247),u=r(79016),c=r(21526),d=r(79772),f=r(61974),p=r(4186),g=r(73274),m=r(7525);function y({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},o){var l;i.code.es5?e.func(t,(0,d._)`${f.default.data}, ${f.default.valCxt}`,n.$async,()=>{var t,n;e.code((0,d._)`"use strict"; ${v(r,i)}`),t=e,n=i,t.if(f.default.valCxt,()=>{t.var(f.default.instancePath,(0,d._)`${f.default.valCxt}.${f.default.instancePath}`),t.var(f.default.parentData,(0,d._)`${f.default.valCxt}.${f.default.parentData}`),t.var(f.default.parentDataProperty,(0,d._)`${f.default.valCxt}.${f.default.parentDataProperty}`),t.var(f.default.rootData,(0,d._)`${f.default.valCxt}.${f.default.rootData}`),n.dynamicRef&&t.var(f.default.dynamicAnchors,(0,d._)`${f.default.valCxt}.${f.default.dynamicAnchors}`)},()=>{t.var(f.default.instancePath,(0,d._)`""`),t.var(f.default.parentData,(0,d._)`undefined`),t.var(f.default.parentDataProperty,(0,d._)`undefined`),t.var(f.default.rootData,f.default.data),n.dynamicRef&&t.var(f.default.dynamicAnchors,(0,d._)`{}`)}),e.code(o)}):e.func(t,(0,d._)`${f.default.data}, ${(l=i,(0,d._)`{${f.default.instancePath}="", ${f.default.parentData}, ${f.default.parentDataProperty}, ${f.default.rootData}=${f.default.data}${l.dynamicRef?(0,d._)`, ${f.default.dynamicAnchors}={}`:d.nil}}={}`)}`,n.$async,()=>e.code(v(r,i)).code(o))}function v(e,t){let r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,d._)`/*# sourceURL=${r} */`:d.nil}function b({schema:e,self:t}){if("boolean"==typeof e)return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function _(e){return"boolean"!=typeof e.schema}function w(e){(0,g.checkUnknownRules)(e),function(e){let{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,g.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function x(e,t){if(e.opts.jtd)return C(e,[],!1,t);let r=(0,i.getSchemaTypes)(e.schema),n=(0,i.coerceAndCheckDataType)(e,r);C(e,r,!n,t)}function S({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(!0===i.$comment)e.code((0,d._)`${f.default.self}.logger.log(${o})`);else if("function"==typeof i.$comment){let r=(0,d.str)`${n}/$comment`,i=e.scopeValue("root",{ref:t.root});e.code((0,d._)`${f.default.self}.opts.$comment(${o}, ${r}, ${i}.schema)`)}}function C(e,t,r,n){var i,a,u,c;let{gen:p,schema:m,data:y,allErrors:v,opts:b,self:_}=e,{RULES:w}=_;if(m.$ref&&(b.ignoreKeywordsWithRef||!(0,g.schemaHasRulesButRef)(m,w)))return void p.block(()=>P(e,"$ref",w.all.$ref.definition));function x(i){(0,o.shouldUseGroup)(m,i)&&(i.type?(p.if((0,l.checkDataType)(i.type,y,b.strictNumbers)),k(e,i),1===t.length&&t[0]===i.type&&r&&(p.else(),(0,l.reportTypeError)(e)),p.endIf()):k(e,i),v||p.if((0,d._)`${f.default.errors} === ${n||0}`))}b.jtd||(i=e,a=t,!i.schemaEnv.meta&&i.opts.strictTypes&&(function(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>{T(e.dataTypes,t)||E(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)}),function(e,t){let r=[];for(let n of e.dataTypes)T(t,n)?r.push(n):t.includes("integer")&&"number"===n&&r.push("integer");e.dataTypes=r}(e,t)}}(i,a),i.opts.allowUnionTypes||(u=i,(c=a).length>1&&!(2===c.length&&c.includes("null"))&&E(u,"use allowUnionTypes to allow union type keyword")),function(e,t){let r=e.self.RULES.all;for(let n in r){let i=r[n];if("object"==typeof i&&(0,o.shouldUseRule)(e.schema,i)){let{type:r}=i.definition;r.length&&!r.some(e=>{var r,n;return r=t,n=e,r.includes(n)||"number"===n&&r.includes("integer")})&&E(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}(i,i.dataTypes))),p.block(()=>{for(let e of w.rules)x(e);x(w.post)})}function k(e,t){let{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,a.assignDefaults)(e,t.type),r.block(()=>{for(let r of t.rules)(0,o.shouldUseRule)(n,r)&&P(e,r.keyword,r.definition,t.type)})}function T(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function E(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,g.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){if(_(e)&&(w(e),b(e)))return void function(e){let{schema:t,opts:r,gen:n}=e;y(e,()=>{r.$comment&&t.$comment&&S(e),function(e){let{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,g.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(f.default.vErrors,null),n.let(f.default.errors,0),r.unevaluated&&function(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,d._)`${r}.evaluated`),t.if((0,d._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,d._)`${e.evaluated}.props`,(0,d._)`undefined`)),t.if((0,d._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,d._)`${e.evaluated}.items`,(0,d._)`undefined`))}(e),x(e),function(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=e;r.$async?t.if((0,d._)`${f.default.errors} === 0`,()=>t.return(f.default.data),()=>t.throw((0,d._)`new ${i}(${f.default.vErrors})`)):(t.assign((0,d._)`${n}.errors`,f.default.vErrors),o.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof d.Name&&e.assign((0,d._)`${t}.props`,r),n instanceof d.Name&&e.assign((0,d._)`${t}.items`,n)}(e),t.return((0,d._)`${f.default.errors} === 0`))}(e)})}(e);y(e,()=>(0,n.topBoolOrEmptySchema)(e))};class N{constructor(e,t,r){if((0,u.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,g.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",O(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,u.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",f.default.errors))}result(e,t,r){this.failResult((0,d.not)(e),t,r)}
27failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,d.not)(e),void 0,t)}fail(e){if(void 0===e){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,d._)`${t} !== undefined && (${(0,d.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t){this.setParams(t),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,t){(e?m.reportExtraError:m.reportError)(this,this.def.error,t)}$dataError(){(0,m.reportError)(this,this.def.$dataError||m.keyword$DataError)}reset(){if(void 0===this.errsCount)throw Error('add "trackErrors" to keyword definition');(0,m.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=d.nil){this.gen.block(()=>{this.check$data(e,r),t()})}check$data(e=d.nil,t=d.nil){if(!this.$data)return;let{gen:r,schemaCode:n,schemaType:i,def:o}=this;r.if((0,d.or)((0,d._)`${n} === undefined`,t)),e!==d.nil&&r.assign(e,!0),(i.length||o.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==d.nil&&r.assign(e,!1)),r.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:r,def:n,it:i}=this;return(0,d.or)(function(){if(r.length){if(!(t instanceof d.Name))throw Error("ajv implementation error");let e=Array.isArray(r)?r:[r];return(0,d._)`${(0,l.checkDataTypes)(e,t,i.opts.strictNumbers,l.DataType.Wrong)}`}return d.nil}(),function(){if(n.validateSchema){let r=e.scopeValue("validate$data",{ref:n.validateSchema});return(0,d._)`!${r}(${t})`}return d.nil}())}subschema(e,t){let r=(0,c.getSubschema)(this.it,e);(0,c.extendSubschemaData)(r,this.it,e),(0,c.extendSubschemaMode)(r,e);let i={...this.it,...r,items:void 0,props:void 0};return!function(e,t){if(_(e)&&(w(e),b(e))){var r=e,i=t;let{schema:n,gen:o,opts:l}=r;l.$comment&&n.$comment&&S(r),function(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,p.resolveUrl)(e.opts.uriResolver,e.baseId,t))}(r),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error("async schema in sync schema")}(r);let a=o.const("_errs",f.default.errors);x(r,a),o.var(i,(0,d._)`${a} === ${f.default.errors}`);return}(0,n.boolOrEmptySchema)(e,t)}(i,t),i}mergeEvaluated(e,t){let{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=g.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=g.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){let{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,()=>this.mergeEvaluated(e,d.Name)),!0}}function P(e,t,r,n){let i=new N(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,u.funcKeywordCode)(i,r):"macro"in r?(0,u.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,u.funcKeywordCode)(i,r)}t.KeywordCxt=N;let $=/^\/(?:[^~]|~0|~1)*$/,A=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function O(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,o;if(""===e)return f.default.rootData;if("/"===e[0]){if(!$.test(e))throw Error(`Invalid JSON-pointer: ${e}`);i=e,o=f.default.rootData}else{let l=A.exec(e);if(!l)throw Error(`Invalid JSON-pointer: ${e}`);let u=+l[1];if("#"===(i=l[2])){if(u>=t)throw Error(a("property/index",u));return n[t-u]}if(u>t)throw Error(a("data",u));if(o=r[t-u],!i)return o}let l=o;for(let e of i.split("/"))e&&(o=(0,d._)`${o}${(0,d.getProperty)((0,g.unescapeJsonPointer)(e))}`,l=(0,d._)`${l} && ${o}`);return l;function a(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=O},85513:(e,t,r)=>{"use strict";r.d(t,{Row:()=>o});var n=r(95155);r(12115);var i=r(79615);let o=e=>{let{baseVersionField:t}=e;return(0,n.jsx)("div",{className:"row-diff",children:(0,n.jsx)(i.RenderVersionFieldsToDiff,{versionFields:t.fields})})}},85849:(e,t,r)=>{"use strict";r.d(t,{VersionDrawerCreatedAtCell:()=>d});var n=r(19749),i=r(95155),o=r(58028),l=r(92825),a=r(87677),u=r(78234),c=r(35695);let d=e=>{let t,r,d,f=(0,n.c)(14),{rowData:p}=e;f[0]!==p?(t=void 0===p?{}:p,f[0]=p,f[1]=t):t=f[1];let{id:g,updatedAt:m}=t,{config:y}=(0,o.b)(),{admin:v}=y,{dateFormat:b}=v,{closeAllModals:_}=(0,l.useModal)(),w=(0,c.useRouter)(),x=(0,c.usePathname)(),S=(0,c.useSearchParams)(),{startRouteTransition:C}=(0,l.useRouteTransition)(),{i18n:k}=(0,a.d)();return f[2]!==_||f[3]!==g||f[4]!==x||f[5]!==w||f[6]!==S||f[7]!==C?(r=()=>{_();let e=new URLSearchParams(Array.from(S.entries()));g&&e.set("versionFrom",String(g));let t=e.toString(),r=t?"?".concat(t):"";C(()=>w.push("".concat(x).concat(r)))},f[2]=_,f[3]=g,f[4]=x,f[5]=w,f[6]=S,f[7]=C,f[8]=r):r=f[8],f[9]!==b||f[10]!==k||f[11]!==r||f[12]!==m?(d=(0,i.jsx)("button",{className:"created-at-cell",onClick:r,type:"button",children:(0,u.Yq)({date:m,i18n:k,pattern:b})}),f[9]=b,f[10]=k,f[11]=r,f[12]=m,f[13]=d):d=f[13],d}},86124:(e,t,r)=>{"use strict";r.d(t,{MetaImageComponent:()=>d});
27var n=r(95155),i=r(58028),o=r(92825),l=r(87677),a=r(78234),u=r(12115),c=r(45280);let d=e=>{let{field:{admin:{allowCreate:t}={},label:r,localized:d,relationTo:f,required:p},hasGenerateImageFn:g,readOnly:m}=e,{config:{routes:{api:y},serverURL:v},getEntityConfig:b}=(0,i.b)(),{customComponents:{Error:_,Label:w}={},filterOptions:x,path:S,setValue:C,showError:k,value:T}=(0,o.useField)(),{t:E}=(0,l.d)(),N=(0,o.useLocale)(),{getData:P}=(0,o.useForm)(),$=(0,o.useDocumentInfo)(),{title:A}=(0,o.useDocumentTitle)(),O=(0,u.useCallback)(async()=>{var e;if(!g)return;let t="".concat(v).concat(y,"/plugin-seo/generate-image"),r=await fetch(t,{body:JSON.stringify({id:$.id,collectionSlug:$.collectionSlug,doc:P(),docPermissions:$.docPermissions,globalSlug:$.globalSlug,hasPublishPermission:$.hasPublishPermission,hasSavePermission:$.hasSavePermission,initialData:$.initialData,initialState:(0,a.qg)(null!=(e=$.initialState)?e:{}),locale:"object"==typeof N?null==N?void 0:N.code:N,title:A}),credentials:"include",headers:{"Content-Type":"application/json"},method:"POST"}),{result:n}=await r.json();C(n||"")},[g,v,y,$.id,$.collectionSlug,$.docPermissions,$.globalSlug,$.hasPublishPermission,$.hasSavePermission,$.initialData,$.initialState,P,N,C,A]),j=!!T,M=b({collectionSlug:f});return(0,n.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,n.jsxs)("div",{style:{marginBottom:"5px",position:"relative"},children:[(0,n.jsxs)("div",{className:"plugin-seo__field",children:[(0,n.jsx)(o.RenderCustomComponent,{CustomComponent:w,Fallback:(0,n.jsx)(o.FieldLabel,{label:r,localized:d,path:S,required:p})}),g&&(0,n.jsxs)(u.Fragment,{children:["\xa0 â \xa0",(0,n.jsx)("button",{disabled:m,onClick:()=>{O()},style:{background:"none",backgroundColor:"transparent",border:"none",color:"currentcolor",cursor:"pointer",padding:0,textDecoration:"underline"},type:"button",children:E("plugin-seo:autoGenerate")})]})]}),g&&(0,n.jsx)("div",{style:{color:"#9A9A9A"},children:E("plugin-seo:imageAutoGenerationTip")})]}),(0,n.jsx)("div",{style:{marginBottom:"10px",position:"relative"},children:(0,n.jsx)(o.UploadInput,{allowCreate:!1!==t,api:y,collection:M,Error:_,filterOptions:x,onChange:e=>{if(null!==e)if("object"==typeof e){let{id:t}=e;C(t)}else C(e);else C(null)},path:S,readOnly:m,relationTo:f,required:p,serverURL:v,showError:k,style:{marginBottom:0},value:T})}),(0,n.jsx)("div",{style:{alignItems:"center",display:"flex",width:"100%"},children:(0,n.jsx)(c.a,{backgroundColor:j?"green":"red",color:"white",label:E(j?"plugin-seo:good":"plugin-seo:noImage")})})]})}},86200:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},86682:e=>{e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},87291:(e,t,r)=>{"use strict";function n(e){return function(t){let r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.width,o=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],l=t.match(o);if(!l)return null;let a=l[0],u=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(u)?function(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}(u,e=>e.test(a)):function(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}(u,e=>e.test(a));return r=e.valueCallback?e.valueCallback(c):c,{value:r=n.valueCallback?n.valueCallback(r):r,rest:t.slice(a.length)}}}r.d(t,{A:()=>n})},88473:(e,t,r)=>{"use strict";r.d(t,{z:()=>n});let n={autosaveInterval:2e3}},88515:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(66183);t.default={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")}},88705:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(36793);n.code='require("ajv/dist/runtime/uri").default',t.default=n},88849:(e,t,r)=>{"use strict";r.d(t,{D4:()=>d,F7:()=>v,Pe:()=>m,gd:()=>g,h1:()=>c,kg:()=>y,lF:()=>f,oE:()=>p});var n=r(6652);let i=Object.prototype.hasOwnProperty,o=Array.isArray,l=function(){let e=[];for(let t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),a=function(e){for(;e.length>1;){let t=e.pop(),r=t.obj[t.prop];if(o(r)){let e=[];for(let t=0;t<r.length;++t)void 0!==r[t]&&e.push(r[t]);t.obj[t.prop]=e}}},u=function(e,t){let r=t&&t.plainObjects?Object.create(null):{};for(let t=0;t<e.length;++t)void 0!==e[t]&&(r[t]=e[t]);return r},c=function e(t,r,n){if(!r)return t;if("object"!=typeof r){if(o(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!i.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);let l=t;return(o(t)&&!o(r)&&(l=u(t,n)),o(t)&&o(r))?(r.forEach(function(r,o){if(i.call(t,o)){let i=t[o];i&&"object"==typeof i&&r&&"object"==typeof r?t[o]=e(i,r,n):t.push(r)}else t[o]=r}),t):Object.keys(r).reduce(function(t,o){let l=r[o];return i.call(t,o)?t[o]=e(t[o],l,n):t[o]=l,t},l)},d=function(e,t,r){let n=e.replace(/\+/g," ");
27if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},f=function(e,t,r,i,o){if(0===e.length)return e;let a=e;if("symbol"==typeof e?a=Symbol.prototype.toString.call(e):"string"!=typeof e&&(a=String(e)),"iso-8859-1"===r)return escape(a).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});let u="";for(let e=0;e<a.length;e+=1024){let t=a.length>=1024?a.slice(e,e+1024):a,r=[];for(let e=0;e<t.length;++e){let i=t.charCodeAt(e);if(45===i||46===i||95===i||126===i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122||o===n.j1&&(40===i||41===i)){r[r.length]=t.charAt(e);continue}if(i<128){r[r.length]=l[i];continue}if(i<2048){r[r.length]=l[192|i>>6]+l[128|63&i];continue}if(i<55296||i>=57344){r[r.length]=l[224|i>>12]+l[128|i>>6&63]+l[128|63&i];continue}e+=1,i=65536+((1023&i)<<10|1023&t.charCodeAt(e)),r[r.length]=l[240|i>>18]+l[128|i>>12&63]+l[128|i>>6&63]+l[128|63&i]}u+=r.join("")}return u},p=function(e){let t=[{obj:{o:e},prop:"o"}],r=[];for(let e=0;e<t.length;++e){let n=t[e],i=n.obj[n.prop],o=Object.keys(i);for(let e=0;e<o.length;++e){let n=o[e],l=i[n];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:i,prop:n}),r.push(l))}}return a(t),e},g=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},m=function(e){return!!e&&"object"==typeof e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},y=function(e,t){return[].concat(e,t)},v=function(e,t){if(o(e)){let r=[];for(let n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)}},88991:(e,t,r)=>{"use strict";r.d(t,{APIViewClient:()=>v});var n=r(95155),i=r(92825),o=r(87677),l=r(58028),a=r(35695),u=r(12115),c=r(19749);let d=e=>{let t,r=(0,c.c)(6),{localeOptions:l,onChange:a}=e,{t:u}=(0,o.d)();if(r[0]!==l||r[1]!==a||r[2]!==u){let e;r[4]!==a?(e=e=>a(e),r[4]=a,r[5]=e):e=r[5],t=(0,n.jsx)(i.SelectField,{field:{name:"locale",label:u("general:locale"),options:l},onChange:e,path:"locale"}),r[0]=l,r[1]=a,r[2]=u,r[3]=t}else t=r[3];return t},f={leftCurlyBracket:"{",leftSquareBracket:"[",rightCurlyBracket:"}",rightSquareBracket:"]"},p="query-inspector",g=e=>{let{type:t,comma:r=!1,position:i}=e,o="object"===t?f.rightCurlyBracket:f.rightSquareBracket,l="object"===t?f.leftCurlyBracket:f.leftSquareBracket;return(0,n.jsxs)("span",{className:"".concat(p,"__bracket ").concat(p,"__bracket--position-").concat(i),children:["end"===i?o:l,"end"===i&&r?",":null]})},m=e=>{let t,r=(0,c.c)(2),{isEmpty:o,object:l,objectKey:a,parentType:d,trailingComma:f}=e,y=void 0!==o&&o,v=void 0===d?"object":d,b=void 0!==f&&f,_=l?Object.keys(l):[],w=_.length,[x,S]=u.useState(!0),C="object"===v||"array"===v;return r[0]!==x?(t=()=>S(!x),r[0]=x,r[1]=t):t=r[1],(0,n.jsxs)("li",{className:C?"".concat(p,"__row-line--nested"):"",children:[(0,n.jsxs)("button",{"aria-label":"toggle",className:"".concat(p,"__list-toggle ").concat(y?"".concat(p,"__list-toggle--empty"):""),onClick:t,type:"button",children:[y?null:(0,n.jsx)(i.ChevronIcon,{className:"".concat(p,"__toggle-row-icon ").concat(p,"__toggle-row-icon--").concat(x?"open":"closed")}),(0,n.jsxs)("span",{children:[a&&'"'.concat(a,'": '),(0,n.jsx)(g,{position:"start",type:v}),y?(0,n.jsx)(g,{comma:b,position:"end",type:v}):null]})]}),(0,n.jsx)("ul",{className:"".concat(p,"__json-children ").concat(C?"".concat(p,"__json-children--nested"):""),children:x&&_.map((e,t)=>{let r,i=l[e],o=t===w-1;if(null===i?r="null":i instanceof Date?(r="date",i=i.toISOString()):r=Array.isArray(i)?"array":"object"==typeof i?"object":"number"==typeof i?"number":"boolean"==typeof i?"boolean":"string","object"===r||"array"===r)return(0,n.jsx)(m,{isEmpty:0===i.length||0===Object.keys(i).length,object:i,objectKey:"object"===v?e:void 0,parentType:r,trailingComma:!o},"".concat(e,"-").concat(t));if("date"===r||"string"===r||"null"===r||"number"===r||"boolean"===r){let l=!!("object"===v&&e),u=["".concat(p,"__row-line"),"".concat(p,"__value-type--").concat(r),"".concat(p,"__row-line--").concat(a?"nested":"top")].filter(Boolean).join(" ");return(0,n.jsxs)("li",{className:u,children:[l?(0,n.jsx)("span",{children:'"'.concat(e,'": ')}):null,(0,n.jsx)("span",{className:"".concat(p,"__value"),children:JSON.stringify(i)}),o?"":","]},"".concat(e,"-").concat(t))}})}),!y&&(0,n.jsx)("span",{className:C?"".concat(p,"__bracket--nested"):"",children:(0,n.jsx)(g,{comma:b,position:"end",type:v})})]})},y="query-inspector",v=()=>{var e,t,r,c;let{id:f,collectionSlug:p,globalSlug:g,initialData:v}=(0,i.useDocumentInfo)(),b=(0,a.useSearchParams)(),{i18n:_,t:w}=(0,o.d)(),{code:x}=(0,i.useLocale)(),{config:{defaultDepth:S,localization:C,routes:{api:k},serverURL:T},getEntityConfig:E}=(0,l.b)(),N=E({collectionSlug:p}),P=E({globalSlug:g}),$=C&&C.locales.map(e=>({label:e.label,value:e.code})),A=!1,O="";N&&(A=!!(null==(r=N.versions)?void 0:r.drafts),O="/".concat(p,"/").concat(f)),P&&(A=!!(null==(c=P.versions)?void 0:c.drafts),O="/globals/".concat(g));let[j,M]=u.useState(v),[D,R]=u.useState("true"===b.get("draft")),[I,F]=u.useState((null==b?void 0:b.get("locale"))||x),[L,B]=u.useState(b.get("depth")||S.toString()),[z,U]=u.useState(!0),[K,W]=u.useState(!1),q=new URLSearchParams({depth:L,draft:String(D),locale:I}
27).toString(),V="".concat(T).concat(k).concat(O,"?").concat(q);return u.useEffect(()=>{(async()=>{try{let e=await fetch(V,{credentials:z?"include":"omit",headers:{"Accept-Language":_.language},method:"GET"});try{let t=await e.json();M(t)}catch(e){i.toast.error("Error parsing response"),console.error(e)}}catch(e){i.toast.error("Error making request"),console.error(e)}})()},[_.language,V,z]),(0,n.jsxs)(i.Gutter,{className:[y,K&&"".concat(y,"--fullscreen")].filter(Boolean).join(" "),right:!1,children:[(0,n.jsx)(i.SetDocumentStepNav,{collectionSlug:p,globalLabel:null==P?void 0:P.label,globalSlug:g,id:f,pluralLabel:N?null==N||null==(e=N.labels)?void 0:e.plural:void 0,useAsTitle:N?null==N||null==(t=N.admin)?void 0:t.useAsTitle:void 0,view:"API"}),(0,n.jsxs)("div",{className:"".concat(y,"__configuration"),children:[(0,n.jsxs)("div",{className:"".concat(y,"__api-url"),children:[(0,n.jsxs)("span",{className:"".concat(y,"__label"),children:["API URL ",(0,n.jsx)(i.CopyToClipboard,{value:V})]}),(0,n.jsx)("a",{href:V,rel:"noopener noreferrer",target:"_blank",children:V})]}),(0,n.jsx)(i.Form,{initialState:{authenticated:{initialValue:z||!1,valid:!0,value:z||!1},depth:{initialValue:Number(L||0),valid:!0,value:Number(L||0)},draft:{initialValue:D||!1,valid:!0,value:D||!1},locale:{initialValue:I,valid:!0,value:I}},children:(0,n.jsxs)("div",{className:"".concat(y,"__form-fields"),children:[(0,n.jsxs)("div",{className:"".concat(y,"__filter-query-checkboxes"),children:[A&&(0,n.jsx)(i.CheckboxField,{field:{name:"draft",label:w("version:draft")},onChange:()=>R(!D),path:"draft"}),(0,n.jsx)(i.CheckboxField,{field:{name:"authenticated",label:w("authentication:authenticated")},onChange:()=>U(!z),path:"authenticated"})]}),$&&(0,n.jsx)(d,{localeOptions:$,onChange:F}),(0,n.jsx)(i.NumberField,{field:{name:"depth",admin:{step:1},label:w("general:depth"),max:10,min:0},onChange:e=>B(null==e?void 0:e.toString()),path:"depth"})]})})]}),(0,n.jsxs)("div",{className:"".concat(y,"__results-wrapper"),children:[(0,n.jsx)("div",{className:"".concat(y,"__toggle-fullscreen-button-container"),children:(0,n.jsx)("button",{"aria-label":"toggle fullscreen",className:"".concat(y,"__toggle-fullscreen-button"),onClick:()=>W(!K),type:"button",children:(0,n.jsx)(i.MinimizeMaximizeIcon,{isMinimized:!K})})}),(0,n.jsx)("div",{className:"".concat(y,"__results"),children:(0,n.jsx)(m,{object:j})})]})]})}},89349:(e,t,r)=>{"use strict";function n(e){return["image/jpeg","image/png","image/gif","image/svg+xml","image/webp","image/avif","image/jxl"].indexOf(e)>-1}r.d(t,{w:()=>n})},89447:(e,t,r)=>{"use strict";r.d(t,{a:()=>i});var n=r(7239);function i(e,t){return(0,n.w)(t||e,e)}},89960:(e,t,r)=>{"use strict";r.d(t,{ReindexButtonClient:()=>f});var n=r(95155),i=r(92825),o=r(58028),l=r(87677),a=r(35695),u=r(12115);let c=()=>{let{i18n:{t:e}}=(0,l.d)();return(0,n.jsx)(i.Pill,{className:"pill--has-action",icon:(0,n.jsx)(i.ChevronIcon,{}),pillStyle:"light",size:"small",children:e("general:reindex")})},d="confirm-reindex-modal",f=e=>{let{collectionLabels:t,searchCollections:r,searchSlug:f}=e,{openModal:p}=(0,i.useModal)(),{config:g}=(0,o.b)(),{i18n:{t:m}}=(0,l.d)(),y=(0,i.useLocale)(),v=(0,a.useRouter)(),[b,_]=(0,u.useState)([]),w=(0,u.useCallback)(()=>p(d),[p]),x=(0,u.useCallback)(async()=>{if(b.length)try{let e=await fetch("".concat(g.routes.api,"/").concat(f,"/reindex?locale=").concat(y.code),{body:JSON.stringify({collections:b}),method:"POST"}),{message:t}=await e.json();if(e.ok)return i.toast.success(t),v.refresh();i.toast.error(t)}catch(e){}finally{_([])}},[b,v,f,y,g]),S=(0,u.useCallback)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r;_("string"==typeof e?[e]:e),w()},[w,r]),C=(0,u.useCallback)((e,t)=>{e(),S(t)},[S]),k=(0,u.useCallback)(e=>{let r=t[e];return"string"==typeof r?r:r&&Object.hasOwn(r,y.code)?r[y.code]:e},[t,y.code]),T=(0,u.useMemo)(()=>r.reduce((e,t)=>{let r=k(t);return r&&(e[t]=r),e},{}),[r,k]),E=b.length===r.length,N=b.map(e=>T[e]).join(", "),P=E?m("general:confirmReindexAll"):m("general:confirmReindex",{collections:N}),$=E?m("general:confirmReindexDescriptionAll"):m("general:confirmReindexDescription",{collections:N});return(0,n.jsxs)("div",{children:[(0,n.jsx)(i.Popup,{button:(0,n.jsx)(c,{}),render:e=>{let{close:t}=e;return(0,n.jsxs)(i.PopupList.ButtonGroup,{children:[r.map(e=>(0,n.jsx)(i.PopupList.Button,{onClick:()=>C(t,e),children:T[e]},e)),(0,n.jsx)(i.PopupList.Button,{onClick:()=>C(t),children:m("general:allCollections")})]})},showScrollbar:!0,size:"large",verticalAlign:"bottom"}),(0,n.jsx)(i.ConfirmationModal,{body:$,heading:P,modalSlug:d,onConfirm:x})]})}},90234:(e,t,r)=>{"use strict";
27Object.defineProperty(t,"__esModule",{value:!0});let n=r(73274);t.default={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:i}=e;if((0,n.alwaysValidSchema)(i,r))return void e.fail();let o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}}},90342:(e,t,r)=>{var n=r(29200);t.operation=function(e){return new n(t.timeouts(e),{forever:e&&(e.forever||e.retries===1/0),unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})},t.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1e3,maxTimeout:1/0,randomize:!1};for(var r in e)t[r]=e[r];if(t.minTimeout>t.maxTimeout)throw Error("minTimeout is greater than maxTimeout");for(var n=[],i=0;i<t.retries;i++)n.push(this.createTimeout(i,t));return e&&e.forever&&!n.length&&n.push(this.createTimeout(i,t)),n.sort(function(e,t){return e-t}),n},t.createTimeout=function(e,t){var r=Math.round((t.randomize?Math.random()+1:1)*Math.max(t.minTimeout,1)*Math.pow(t.factor,e));return Math.min(r,t.maxTimeout)},t.wrap=function(e,r,n){if(r instanceof Array&&(n=r,r=null),!n)for(var i in n=[],e)"function"==typeof e[i]&&n.push(i);for(var o=0;o<n.length;o++){var l=n[o],a=e[l];e[l]=(function(n){var i=t.operation(r),o=Array.prototype.slice.call(arguments,1),l=o.pop();o.push(function(e){i.retry(e)||(e&&(arguments[0]=i.mainError()),l.apply(this,arguments))}),i.attempt(function(){n.apply(e,o)})}).bind(e,a),e[l].options=r}}},90600:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;let n=r(79772),i=r(73274),o=r(81708);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>(0,n.str)`must have ${1===t?"property":"properties"} ${r} when property ${e} is present`,params:({params:{property:e,depsCount:t,deps:r,missingProperty:i}})=>(0,n._)`{property: ${e}, 28 missingProperty: ${i}, 29 depsCount: ${t}, 30 deps: ${r}}`};let l={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){let[t,r]=function({schema:e}){let t={},r={};for(let n in e)"__proto__"!==n&&((Array.isArray(e[n])?t:r)[n]=e[n]);return[t,r]}(e);a(e,t),u(e,r)}};function a(e,t=e.schema){let{gen:r,data:i,it:l}=e;if(0===Object.keys(t).length)return;let u=r.let("missing");for(let a in t){let c=t[a];if(0===c.length)continue;let d=(0,o.propertyInData)(r,i,a,l.opts.ownProperties);e.setParams({property:a,depsCount:c.length,deps:c.join(", ")}),l.allErrors?r.if(d,()=>{for(let t of c)(0,o.checkReportMissingProp)(e,t)}):(r.if((0,n._)`${d} && (${(0,o.checkMissingProp)(e,c,u)})`),(0,o.reportMissingProp)(e,u),r.else())}}function u(e,t=e.schema){let{gen:r,data:n,keyword:l,it:a}=e,c=r.name("valid");for(let u in t)(0,i.alwaysValidSchema)(a,t[u])||(r.if((0,o.propertyInData)(r,n,u,a.opts.ownProperties),()=>{let t=e.subschema({keyword:l,schemaProp:u},c);e.mergeValidEvaluated(t,c)},()=>r.var(c,!0)),e.ok(c))}t.validatePropertyDeps=a,t.validateSchemaDeps=u,t.default=l},90750:(e,t,r)=>{"use strict";r.d(t,{a:()=>y,b:()=>b,c:()=>w});var n=r(48643),i=r(19749),o=r(95155),l=r(92825),a=r(12115),u=r(87677),c=r(78234),d=r(15526),f=r(79737),p=r(58028),g=r(32532),m=({data:e,featureKey:t,fieldMapOverride:r,handleDrawerSubmit:i,schemaFieldsPathOverride:p,schemaPath:g,schemaPathSuffix:m})=>{let{t:y}=(0,u.d)(),{id:v,collectionSlug:b,getDocPreferences:_,globalSlug:w}=(0,l.useDocumentInfo)(),{fields:x}=(0,l.useDocumentForm)(),S=(0,a.useRef)(new AbortController),[C,k]=(0,a.useState)(!1),{fieldProps:{featureClientSchemaMap:T}}=(0,n.b)(),{getFormState:E}=(0,l.useServerFunctions)(),N=p??`${g}.lexical_internal_feature.${t}${m?`.${m}`:""}`,P=r??T[t]?.[N];(0,a.useEffect)(()=>{let t=new AbortController;return(async()=>{let{state:r}=await E({id:v,collectionSlug:b,data:e??{},docPermissions:{fields:!0},docPreferences:await _(),documentFormState:(0,d.KS)(x),globalSlug:w,initialBlockData:e,operation:"update",renderAllFields:!0,schemaPath:N,signal:t.signal});k(r)})(),()=>{(0,c.eS)(t)}},[N,v,e,E,b,w,_,x]);let $=(0,a.useCallback)(async({formState:e})=>{(0,c.eS)(S.current);let t=new AbortController;S.current=t;let{state:r}=await E({id:v,collectionSlug:b,docPermissions:{fields:!0},docPreferences:await _(),documentFormState:(0,d.KS)(x),formState:e,globalSlug:w,initialBlockFormState:e,operation:"update",sc
30hemaPath:N,signal:t.signal});return r||e},[E,v,b,_,x,w,N]);return(0,a.useEffect)(()=>()=>{(0,c.eS)(S.current)},[]),!1===C?null:(0,o.jsxs)(l.Form,{beforeSubmit:[$],disableValidationOnSubmit:!0,fields:Array.isArray(P)?P:[],initialState:C,onChange:[$],onSubmit:i,uuid:(0,f.A)(),children:[(0,o.jsx)(l.RenderFields,{fields:Array.isArray(P)?P:[],forceRender:!0,parentIndexPath:"",parentPath:"",parentSchemaPath:N,permissions:!0,readOnly:!1}),(0,o.jsx)(l.FormSubmit,{children:y("fields:saveChanges")})]})},y=e=>{let t,r=(0,i.c)(15),{className:n,data:a,drawerSlug:u,drawerTitle:c,featureKey:d,fieldMapOverride:f,handleDrawerSubmit:p,schemaFieldsPathOverride:g,schemaPath:y,schemaPathSuffix:v}=e,{closeModal:b}=(0,l.useModal)(),_=c??"",w;return r[0]!==b||r[1]!==u||r[2]!==p?(w=(e,t)=>{b(u),setTimeout(()=>{p(e,t)},1)},r[0]=b,r[1]=u,r[2]=p,r[3]=w):w=r[3],r[4]!==n||r[5]!==a||r[6]!==u||r[7]!==d||r[8]!==f||r[9]!==g||r[10]!==y||r[11]!==v||r[12]!==_||r[13]!==w?(t=(0,o.jsx)(l.EditDepthProvider,{children:(0,o.jsx)(l.Drawer,{className:n,slug:u,title:_,children:(0,o.jsx)(m,{data:a,featureKey:d,fieldMapOverride:f,handleDrawerSubmit:w,schemaFieldsPathOverride:g,schemaPath:y,schemaPathSuffix:v})})}),r[4]=n,r[5]=a,r[6]=u,r[7]=d,r[8]=f,r[9]=g,r[10]=y,r[11]=v,r[12]=_,r[13]=w,r[14]=t):t=r[14],t},v=(e,t)=>e.filter(({slug:e,admin:{enableRichTextRelationship:r},upload:n})=>!!t?.visibleEntities?.collections.includes(e)&&(t?.uploads?r&&!!n:!n&&r)),b=e=>{let t,r=(0,i.c)(20),n,u,c,d;r[0]!==e?({children:u,FallbackComponent:n,uploads:d,...c}=e,r[0]=e,r[1]=n,r[2]=u,r[3]=c,r[4]=d):(n=r[1],u=r[2],c=r[3],d=r[4]);let f=void 0!==d&&d,{config:g}=(0,p.b)(),{collections:m}=g,{user:y}=(0,l.useAuth)(),{visibleEntities:b}=(0,l.useEntityVisibility)(),w;r[5]!==m||r[6]!==f||r[7]!==y||r[8]!==b?(w=()=>v(m,{uploads:f,user:y,visibleEntities:b}).map(_),r[5]=m,r[6]=f,r[7]=y,r[8]=b,r[9]=w):w=r[9];
30let[x]=a.useState(w);if(!x.length){let e;return r[10]!==n||r[11]!==c?(e=n?(0,o.jsx)(n,{...c}):null,r[10]=n,r[11]=c,r[12]=e):e=r[12],e}if(r[13]!==u||r[14]!==x||r[15]!==c){let e;r[17]!==x||r[18]!==c?(e={...c,enabledCollectionSlugs:x},r[17]=x,r[18]=c,r[19]=e):e=r[19],t=a.cloneElement(u,e),r[13]=u,r[14]=x,r[15]=c,r[16]=t}else t=r[16];return t};function _(e){let{slug:t}=e;return t}var w=(0,g.guI)("INSERT_UPLOAD_WITH_DRAWER_COMMAND")},91321:(e,t,r)=>{"use strict";r.d(t,{aG:()=>n});let n=["ar","fa","he"]},91955:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=r(85331);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var i=r(79772);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return i.CodeGen}});let o=r(74455),l=r(24950),a=r(39997),u=r(11930),c=r(79772),d=r(4186),f=r(62889),p=r(73274),g=r(96504),m=r(88705),y=(e,t)=>new RegExp(e,t);y.code="new RegExp";let v=["removeAdditional","useDefaults","coerceTypes"],b=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),_={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated
30ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},w={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};class x{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...function(e){var t,r,n,i,o,l,a,u,c,d,f,p,g,v,b,_,w,x,S,C,k,T,E,N,P;let $=e.strict,A=null==(t=e.code)?void 0:t.optimize,O=!0===A||void 0===A?1:A||0,j=null!=(n=null==(r=e.code)?void 0:r.regExp)?n:y,M=null!=(i=e.uriResolver)?i:m.default;return{strictSchema:null==(l=null!=(o=e.strictSchema)?o:$)||l,strictNumbers:null==(u=null!=(a=e.strictNumbers)?a:$)||u,strictTypes:null!=(d=null!=(c=e.strictTypes)?c:$)?d:"log",strictTuples:null!=(p=null!=(f=e.strictTuples)?f:$)?p:"log",strictRequired:null!=(v=null!=(g=e.strictRequired)?g:$)&&v,code:e.code?{...e.code,optimize:O,regExp:j}:{optimize:O,regExp:j},loopRequired:null!=(b=e.loopRequired)?b:200,loopEnum:null!=(_=e.loopEnum)?_:200,meta:null==(w=e.meta)||w,messages:null==(x=e.messages)||x,inlineRefs:null==(S=e.inlineRefs)||S,schemaId:null!=(C=e.schemaId)?C:"$id",addUsedSchema:null==(k=e.addUsedSchema)||k,validateSchema:null==(T=e.validateSchema)||T,validateFormats:null==(E=e.validateFormats)||E,unicodeRegExp:null==(N=e.unicodeRegExp)||N,int32range:null==(P=e.int32range)||P,uriResolver:M}}(e)};let{es5:t,lines:r}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:b,es5:t,lines:r}),this.logger=function(e){if(!1===e)return P;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw Error("logger must implement log, warn and error methods")}(e.logger);let n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),S.call(this,_,e,"NOT SUPPORTED"),S.call(this,w,e,"DEPRECATED","warn"),this._metaOpts=N.call(this),e.formats&&T.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&E.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),k.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:r}=this.opts,n=g;"id"===r&&((n={...g}).id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(!(r=this.getSchema(e)))throw Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);let n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){let r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw Error("options.loadSchema should be a function");let{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await i.call(this,e.$schema);let r=this._addSchema(e,t);return r.validate||o.call(this,r)}async function i(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof l.default))throw t;return a.call(this,t),await u.call(this,t.missingSchema),o.call(this,e)}}function a({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function u(e){let r=await c.call(this,e);this.refs[e]||await i.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function c(e){let t=this._loading[e];if(t)return t;try{return await (this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){let i;
30if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,r,n);return this}if("object"==typeof e){let{schemaId:t}=this.opts;if(void 0!==(i=e[t])&&"string"!=typeof i)throw Error(`schema ${t} must be string`)}return t=(0,d.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){let r;if("boolean"==typeof e)return!0;if(void 0!==(r=e.$schema)&&"string"!=typeof r)throw Error("$schema must be a string");if(!(r=r||this.opts.defaultMeta||this.defaultMeta()))return this.logger.warn("meta-schema not available"),this.errors=null,!0;let n=this.validate(r,e);if(!n&&t){let e="schema is invalid: "+this.errorsText();if("log"===this.opts.validateSchema)this.logger.error(e);else throw Error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=C.call(this,e));)e=t;if(void 0===t){let{schemaId:r}=this.opts,n=new u.SchemaEnv({schema:{},schemaId:r});if(!(t=u.resolveSchema.call(this,n,e)))return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=C.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{this._cache.delete(e);let t=e[this.opts.schemaId];return t&&(t=(0,d.normalizeId)(t),delete this.schemas[t],delete this.refs[t]),this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else if("object"==typeof e&&void 0===t){if(Array.isArray(r=(t=e).keyword)&&!r.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(A.call(this,r,t),!t)return(0,p.eachItem)(r,e=>O.call(this,e)),this;M.call(this,t);let n={...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)};return(0,p.eachItem)(r,0===n.type.length?e=>O.call(this,e,n):e=>n.type.forEach(t=>O.call(this,e,n,t))),this}getKeyword(e){let t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;for(let r of(delete t.keywords[e],delete t.all[e],t.rules)){let t=r.rules.findIndex(t=>t.keyword===e);t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map(e=>`${r}${e.instancePath} ${e.message}`).reduce((e,r)=>e+t+r):"No errors"}$dataMetaSchema(e,t){let r=this.RULES.all;for(let n of(e=JSON.parse(JSON.stringify(e)),t)){let t=n.split("/").slice(1),i=e;for(let e of t)i=i[e];for(let e in r){let t=r[e];if("object"!=typeof t)continue;let{$data:n}=t.definition,o=i[e];n&&o&&(i[e]=R(o))}}return e}_removeAllSchemas(e,t){for(let r in e){let n=e[r];(!t||t.test(r))&&("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,i=this.opts.addUsedSchema){let o,{schemaId:l}=this.opts;if("object"==typeof e)o=e[l];else if(this.opts.jtd)throw Error("schema must be object");else if("boolean"!=typeof e)throw Error("schema must be object or boolean");let a=this._cache.get(e);if(void 0!==a)return a;r=(0,d.normalizeId)(o||r);let c=d.getSchemaRefs.call(this,e,r);return a=new u.SchemaEnv({schema:e,schemaId:l,meta:t,baseId:r,localRefs:c}),this._cache.set(a.schema,a),i&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=a),n&&this.validateSchema(e,!0),a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):u.compileSchema.call(this,e),!e.validate)throw Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{u.compileSchema.call(this,e)}finally{this.opts=t}}}function S(e,t,r,n="error"){for(let i in e)i in t&&this.logger[n](`${r}: option ${i}. ${e[i]}`)}function C(e){return e=(0,d.normalizeId)(e),this.schemas[e]||this.refs[e]}function k(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function T(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function E(e){if(Array.isArray(e))return void this.addVocabulary(e);for(let t in this.logger.warn("keywords option as map is deprecated, pass array"),e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function N(){let e={...this.opts};for(let t of v)delete e[t];return e}x.ValidationError=o.default,x.MissingRefError=l.default,t.default=x;let P={log(){},warn(){},error(){}},$=/^[a-z_$][a-z0-9_$:-]*$/i;function A(e,t){let{RULES:r}=this;if((0,p.eachItem)(e,e=>{if(r.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!$.test(e))throw Error(`Keyword ${e}
30 has invalid name`)}),t&&t.$data&&!("code"in t||"validate"in t))throw Error('$data keyword must have "code" or "validate" function')}function O(e,t,r){var n;let i=null==t?void 0:t.post;if(r&&i)throw Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,l=i?o.post:o.rules.find(({type:e})=>e===r);if(l||(l={type:r,rules:[]},o.rules.push(l)),o.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)}};t.before?j.call(this,l,a,t.before):l.rules.push(a),o.all[e]=a,null==(n=t.implements)||n.forEach(e=>this.addKeyword(e))}function j(e,t,r){let n=e.rules.findIndex(e=>e.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function M(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=R(t)),e.validateSchema=this.compile(t,!0))}let D={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function R(e){return{anyOf:[e,D]}}},92532:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(81708),i=r(79772),o=r(73274),l=r(73274);t.default={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:a,parentSchema:u,it:c}=e,{opts:d}=c,f=(0,n.allSchemaProperties)(r),p=f.filter(e=>(0,o.alwaysValidSchema)(c,r[e]));if(0===f.length||p.length===f.length&&(!c.opts.unevaluated||!0===c.props))return;let g=d.strictSchema&&!d.allowMatchingProperties&&u.properties,m=t.name("valid");!0===c.props||c.props instanceof i.Name||(c.props=(0,l.evaluatedPropsToName)(t,c.props));let{props:y}=c;for(let e of f)g&&function(e){for(let t in g)new RegExp(e).test(t)&&(0,o.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}(e),c.allErrors?v(e):(t.var(m,!0),v(e),t.if(m));function v(r){t.forIn("key",a,o=>{t.if((0,i._)`${(0,n.usePattern)(e,r)}.test(${o})`,()=>{let n=p.includes(r);n||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:o,dataPropType:l.Type.Str},m),c.opts.unevaluated&&!0!==y?t.assign((0,i._)`${y}[${o}]`,!0):n||c.allErrors||t.if((0,i.not)(m),()=>t.break())})})}}}},92749:(e,t,r)=>{"use strict";r.d(t,{Bt:()=>m,HE:()=>f,K2:()=>w,OV:()=>S,Pe:()=>y,Sd:()=>c,ZB:()=>d,cE:()=>k,cj:()=>v,eu:()=>p,mB:()=>g,vF:()=>C,xj:()=>b,zD:()=>_});var n=r(32532);function i(e,...t){let r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;for(let r of(n.append("code",e),t))n.append("v",r);throw r.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let o="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,l=o&&"documentMode"in document?document.documentMode:null,a=(o&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),o&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent));function u(...e){let t=[];for(let r of e)if(r&&"string"==typeof r)for(let[e]of r.matchAll(/\S+/g))t.push(e);return t}function c(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}o&&"InputEvent"in window&&!l&&new window.InputEvent("input"),o&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),o&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&window.MSStream,o&&/Android/.test(navigator.userAgent),o&&/^(?=.*Chrome).*/i.test(navigator.userAgent);o&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent);function d(e,...t){let r=u(...t);r.length>0&&e.classList.add(...r)}function f(e,...t){let r=u(...t);r.length>0&&e.classList.remove(...r)}function p(e,t){let r=e;for(;null!=r;){if(r instanceof t)return r;r=r.getParent()}return null}function g(e){let t=m(e,e=>(0,n.ff4)(e)&&!e.isInline());return(0,n.ff4)(t)||i(4,e.__key),t}let m=(e,t)=>
30{let r=e;for(;r!==(0,n.NiT)()&&null!=r;){if(t(r))return r;r=r.getParent()}return null};function y(e){let t,r=(0,n.vJq)()||(0,n.S1w)();if((0,n.I2P)(r))t=(0,n.Ave)(r.focus,"next");else{if(null!=r){let e=r.getNodes(),i=e[e.length-1];i&&(t=(0,n.IlV)(i,"next"))}t=t||(0,n.uwZ)((0,n.NiT)(),"previous").getFlipped().insert((0,n.lJ7)())}let o=function(e,t,r){let o=(0,n.Csq)(t,"next");for(let e=o;e;e=(0,n.k1Q)(e,void 0))o=e;return(0,n.rN)(o)&&i(283),o.insert(e.isInline()?(0,n.lJ7)().append(e):e),(0,n.Csq)((0,n.IlV)(e.getLatest(),"next"),t.direction)}(e,t),l=(0,n.erb)(o),a=(0,n.cmH)(l)?(0,n.lSZ)(l):o;return(0,n.xQ8)((0,n.sWS)(a)),e.getLatest()}function v(e,t){let r=t();return e.replace(r),r.append(e),r}function b(e,t){return null!==e&&Object.getPrototypeOf(e).constructor.name===t.name}function _(e,t){let r=[];for(let n=0;n<e.length;n++){let i=t(e[n]);null!==i&&r.push(i)}return r}function w(e,t){(0,n.uwZ)(e,"next").insert(t)}let x=!(a||!o)&&void 0;function S(e){let t=1;if(function(){if(void 0===x){let e=document.createElement("div");e.style.cssText="position: absolute; opacity: 0; width: 100px; left: -1000px;",document.body.appendChild(e);let t=e.getBoundingClientRect();e.style.setProperty("zoom","2"),x=e.getBoundingClientRect().width===t.width,document.body.removeChild(e)}return x}())for(;e;)t*=Number(window.getComputedStyle(e).getPropertyValue("zoom")),e=e.parentElement;return t}function C(e,t){return function e(t,r,i){let o=!1;for(let l of T(t))r(l)?null!==i&&i(l):(o=!0,(0,n.ff4)(l)&&e(l,r,i||(e=>l.insertAfter(e))),l.remove());return o}(e,t,null)}function k(e,t){let r=[],i=Array.from(e).reverse();for(let e=i.pop();void 0!==e;e=i.pop())if(t(e))r.push(e);else if((0,n.ff4)(e))for(let t of T(e))i.push(t);return r}function T(e){return function(e){return(0,n.Bts)({hasNext:n.OpE,initial:e.getAdjacentCaret(),map:e=>e.origin.getLatest(),step:e=>e.getAdjacentCaret()})}((0,n.uwZ)(e,"previous"))}function E(e,t="root"){let r=0,n=e,i=s(n);for(;null===i;){if(r--,!(i=n.getParentCaret(t)))return null;i=s(n=i)}return i&&[i,r]}},93253:(e,t,r)=>{"use strict";r.d(t,{IDCell:()=>o});var n=r(95155),i=r(12115);function o(e){let{id:t}=e;return(0,n.jsx)(i.Fragment,{children:t})}},93524:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;let i=r(53921);class o extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(n||(t.UsedValueState=n={})),t.varKinds={const:new i.Name("const"),let:new i.Name("let"),var:new i.Name("var")};class l{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof i.Name?e:this.name(e)}name(e){return new i.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,r;if((null==(r=null==(t=this._parent)?void 0:t._prefixes)?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=l;class a extends i.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=(0,i._)`.${new i.Name(t)}[${r}]`}}t.ValueScopeName=a;let u=(0,i._)`\n`;class c extends l{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?u:i.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw Error("CodeGen: ref must be passed in value");let n=this.toName(e),{prefix:i}=n,o=null!=(r=t.key)?r:t.ref,l=this._values[i];if(l){let e=l.get(o);if(e)return e}else l=this._values[i]=new Map;l.set(o,n);let a=this._scope[i]||(this._scope[i]=[]),u=a.length;return a[u]=t.ref,n.setValue(t,{property:i,itemIndex:u}),n}getValue(e,t){let r=this._values[e];if(r)return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,t=>{if(void 0===t.scopePath)throw Error(`CodeGen: name "${t}" has no value`);return(0,i._)`${e}${t.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,e=>{if(void 0===e.value)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,r)}_reduceValues(e,r,l={},a){let u=i.nil;for(let c in e){let d=e[c];if(!d)continue;let f=l[c]=l[c]||new Map;
30d.forEach(e=>{if(f.has(e))return;f.set(e,n.Started);let l=r(e);if(l){let r=this.opts.es5?t.varKinds.var:t.varKinds.const;u=(0,i._)`${u}${r} ${e} = ${l};${this.opts._n}`}else if(l=null==a?void 0:a(e))u=(0,i._)`${u}${l}${this.opts._n}`;else throw new o(e);f.set(e,n.Completed)})}return u}}t.ValueScope=c},93810:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(79772),i=r(73274),o=r(36148);t.default={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,n.str)`must NOT have ${"maxLength"===e?"more":"fewer"} than ${t} characters`,params:({schemaCode:e})=>(0,n._)`{limit: ${e}}`},code(e){let{keyword:t,data:r,schemaCode:l,it:a}=e,u="maxLength"===t?n.operators.GT:n.operators.LT,c=!1===a.opts.unicode?(0,n._)`${r}.length`:(0,n._)`${(0,i.useFunc)(e.gen,o.default)}(${r})`;e.fail$data((0,n._)`${c} ${u} ${l}`)}}},93916:(e,t,r)=>{"use strict";r.d(t,{a:()=>u});var n=r(19749),i=r(94271),o=r(92825),l=r(32532),a=r(12115),u=(e,t)=>{let r,u=(0,n.c)(24),[c]=(0,i.DF)(),[d,f]=(0,a.useState)(null),[p,g]=(0,a.useState)(!1),{closeModal:m,modalState:y,toggleModal:v}=(0,o.useModal)(),b;u[0]!==c?(b=()=>{c.read(()=>{f((0,l.vJq)()??(0,l.S1w)())})},u[0]=c,u[1]=b):b=u[1];let _=b,w;u[2]!==c||u[3]!==d?(w=()=>{d&&c.update(()=>{(0,l.n1P)(d.clone())},{discrete:!0,skipTransforms:!0})},u[2]=c,u[3]=d,u[4]=w):w=u[4];let x=w,S;u[5]!==m||u[6]!==e?(S=()=>{m(e)},u[5]=m,u[6]=e,u[7]=S):S=u[7];let C=S,k=y?.[e]?.isOpen,T;u[8]!==k||u[9]!==x||u[10]!==e||u[11]!==_||u[12]!==v?(T=()=>{k?x():_(),g(!0),v(e)},u[8]=k,u[9]=x,u[10]=e,u[11]=_,u[12]=v,u[13]=T):T=u[13];let E=T,N,P;return u[14]!==y||u[15]!==t||u[16]!==x||u[17]!==e||u[18]!==p?(N=()=>{if(!p)return;let r=y[e];r&&!r?.isOpen&&(g(!1),t?setTimeout(()=>{x()},0):x())},P=[y,e,x,p,t],u[14]=y,u[15]=t,u[16]=x,u[17]=e,u[18]=p,u[19]=N,u[20]=P):(N=u[19],P=u[20]),(0,a.useEffect)(N,P),u[21]!==C||u[22]!==E?(r={closeDrawer:C,toggleDrawer:E},u[21]=C,u[22]=E,u[23]=r):r=u[23],r}},93974:(e,t,r)=>{"use strict";r.d(t,{AutosaveCell:()=>u});var n=r(19749),i=r(95155),o=r(87677),l=r(92825);r(12115);var a=r(18940);let u=e=>{let t,r,u=(0,n.c)(8),{currentlyPublishedVersion:c,latestDraftVersion:d,rowData:f}=e,{t:p}=(0,o.d)();return u[0]!==(null==f?void 0:f.autosave)||u[1]!==p?(t=(null==f?void 0:f.autosave)&&(0,i.jsx)(l.Pill,{size:"small",children:p("version:autosave")}),u[0]=null==f?void 0:f.autosave,u[1]=p,u[2]=t):t=u[2],u[3]!==c||u[4]!==d||u[5]!==f||u[6]!==t?(r=(0,i.jsxs)("div",{className:"".concat("autosave-cell","__items"),children:[t,(0,i.jsx)(a.VersionPillLabel,{currentlyPublishedVersion:c,disableDate:!0,doc:f,labelFirst:!1,labelStyle:"pill",latestDraftVersion:d})]}),u[3]=c,u[4]=d,u[5]=f,u[6]=t,u[7]=r):r=u[7],r}},94271:(e,t,r)=>{"use strict";r.d(t,{DF:()=>l,Gu:()=>i,Mx:()=>o});var n=r(12115);let i=(0,n.createContext)(null);function o(e,t){let r=null;return null!=e&&(r=e[1]),{getTheme:function(){return null!=t?t:null!=r?r.getTheme():null}}}function l(){let e=(0,n.useContext)(i);return null==e&&function(e,...t){let r=new URL("https://lexical.dev/docs/error"),n=new URLSearchParams;for(let e of(n.append("code",8),t))n.append("v",e);throw r.search=n.toString(),Error(`Minified Lexical error #${8}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(8),e}},95490:(e,t,r)=>{"use strict";r.d(t,{q:()=>i});let n={};function i(){return n}},95546:(e,t,r)=>{"use strict";r.d(t,{F:()=>i,l:()=>n});let n=e=>{let t=e;if("string"==typeof e)try{t=JSON.parse(e)}catch(t){console.error("Error parsing columns",e,t)}if(t&&Array.isArray(t))return t.map(e=>{if("string"==typeof e){let t="-"!==e[0];return{accessor:t?e:e.slice(1),active:t}}return{accessor:e.accessor,active:e.active}})},i=e=>e.map(e=>e.active?e.accessor:`-${e.accessor}`)},96189:e=>{"use strict";let t=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,r=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function n(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}function i(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function o(e){let t="https"===String(e.scheme).toLowerCase();return(e.port===(t?443:80)||""===e.port)&&(e.port=void 0),e.path||(e.path="/"),e}let l={scheme:"http",domainHost:!0,parse:i,serialize:o},a={scheme:"https",domainHost:l.domainHost,parse:i,serialize:o},u={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=n(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}
30,serialize:function(e){if((e.port===(n(e)?443:80)||""===e.port)&&(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&"/"!==t?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}},c={scheme:"wss",domainHost:u.domainHost,parse:u.parse,serialize:u.serialize},d={http:l,https:a,ws:u,wss:c,urn:{scheme:"urn",parse:function(e,t){if(!e.path)return e.error="URN can not be parsed",e;let n=e.path.match(r);if(n){let r=t.scheme||e.scheme||"urn";e.nid=n[1].toLowerCase(),e.nss=n[2];let i=d[`${r}:${t.nid||e.nid}`];e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,t){let r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),i=d[`${r}:${t.nid||n}`];i&&(e=i.serialize(e,t));let o=e,l=e.nss;return o.path=`${n||t.nid}:${l}`,t.skipEscape=!0,o},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(e,r){return e.uuid=e.nss,e.nss=void 0,r.tolerant||e.uuid&&t.test(e.uuid)||(e.error=e.error||"UUID is not valid."),e},serialize:function(e){return e.nss=(e.uuid||"").toLowerCase(),e},skipNormalize:!0}};e.exports=d},96504:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},97208:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;let n=r(79772),i=r(73274);function o(e,t){let{gen:r,schema:o,data:l,keyword:a,it:u}=e;u.items=!0;let c=r.const("len",(0,n._)`${l}.length`);if(!1===o)e.setParams({len:t.length}),e.pass((0,n._)`${c} <= ${t.length}`);else if("object"==typeof o&&!(0,i.alwaysValidSchema)(u,o)){let o=r.var("valid",(0,n._)`${c} <= ${t.length}`);r.if((0,n.not)(o),()=>{var l;return l=o,void r.forRange("i",t.length,c,t=>{e.subschema({keyword:a,dataProp:t,dataPropType:i.Type.Num},l),u.allErrors||r.if((0,n.not)(l),()=>r.break())})}),e.ok(o)}}t.validateAdditionalItems=o,t.default={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,n.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,n._)`{limit: ${e}}`},code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n))return void(0,i.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');o(e,n)}}},97825:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(53745),i=r(28565),o=r(20419),l=r(50301),a=r(86200);t.default=[n.default,i.default,(0,o.default)(),l.default,a.metadataVocabulary,a.contentVocabulary]},98552:(e,t,r)=>{"use strict";r.d(t,{Wrapper:()=>l});var n=r(19749),i=r(95155),o=r(92825);r(12115);let l=e=>{let t,r,l=(0,n.c)(9),{baseClass:a,children:u,className:c}=e,{hydrated:d,navOpen:f,shouldAnimate:p}=(0,o.useNav)(),g=f&&"".concat(a,"--nav-open"),m=p&&"".concat(a,"--nav-animate"),y=d&&"".concat(a,"--nav-hydrated");l[0]!==a||l[1]!==c||l[2]!==g||l[3]!==m||l[4]!==y?(t=[a,c,g,m,y].filter(Boolean),l[0]=a,l[1]=c,l[2]=g,l[3]=m,l[4]=y,l[5]=t):t=l[5];let v=t.join(" ");return l[6]!==u||l[7]!==v?(r=(0,i.jsx)("div",{className:v,children:u}),l[6]=u,l[7]=v,l[8]=r):r=l[8],r}},98574:(e,t,r)=>{"use strict";r.d(t,{Text:()=>u});var n=r(19749),i=r(95155),o=r(87677),l=r(92825);function a(e){return"string"==typeof e?{tokenizeByCharacter:!0,value:e}:"number"==typeof e?{tokenizeByCharacter:!0,value:String(e)}:"boolean"==typeof e?{tokenizeByCharacter:!1,value:String(e)}:e&&"object"==typeof e?{tokenizeByCharacter:!1,value:"<pre>".concat(JSON.stringify(e,null,2),"</pre>")}:{tokenizeByCharacter:!0,value:void 0}}r(12115);let u=e=>{let t,r=(0,n.c)(8),{comparisonValue:u,field:c,locale:d,nestingLevel:f,versionValue:p}=e,{i18n:g}=(0,o.d)(),m="";if(p==u&&(m='<span class="html-diff-no-value"><span>'),r[0]!==c.label||r[1]!==g||r[2]!==d||r[3]!==f||r[4]!==m||r[5]!==u||r[6]!==p){var y,v,b,_;let e=a(u),n=a(p),o=!0;
30(null==(y=e.value)?void 0:y.length)?o=e.tokenizeByCharacter:(null==(v=n.value)?void 0:v.length)&&(o=n.tokenizeByCharacter);let w=null!=(b=e.value)?b:m,x=null!=(_=n.value)?_:m,{From:S,To:C}=(0,l.getHTMLDiffComponents)({fromHTML:"<p>"+w+"</p>",toHTML:"<p>"+x+"</p>",tokenizeByCharacter:o});t=(0,i.jsx)(l.FieldDiffContainer,{className:"text-diff",From:S,i18n:g,label:{label:c.label,locale:d},nestingLevel:f,To:C}),r[0]=c.label,r[1]=g,r[2]=d,r[3]=f,r[4]=m,r[5]=u,r[6]=p,r[7]=t}else t=r[7];return t}},99155:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(51616);n.code='require("ajv/dist/runtime/equal").default',t.default=n}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.