@blinkk/root-cms 2.0.9 → 2.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/app.js CHANGED
@@ -7,7 +7,7 @@ import { render as renderToString } from "preact-render-to-string";
7
7
  // package.json
8
8
  var package_default = {
9
9
  name: "@blinkk/root-cms",
10
- version: "2.0.9",
10
+ version: "2.0.10",
11
11
  author: "s@blinkk.com",
12
12
  license: "MIT",
13
13
  engines: {
@@ -154,7 +154,7 @@ var package_default = {
154
154
  yjs: "13.6.27"
155
155
  },
156
156
  peerDependencies: {
157
- "@blinkk/root": "2.0.9",
157
+ "@blinkk/root": "2.0.10",
158
158
  "firebase-admin": ">=11",
159
159
  "firebase-functions": ">=4",
160
160
  preact: ">=10",
package/dist/ui/ui.js CHANGED
@@ -41,7 +41,7 @@ Content-Type: `+c.contentType+`\r
41
41
  `));let r=[],o=t.split(/(\n|\r\n)/);o[o.length-1]||o.pop();for(let n=0;n<o.length;n++){let i=o[n];n%2&&!e.newlineIsToken?r[r.length-1]+=i:r.push(i)}return r}ge();function ke(...t){return t.filter(e=>!!e).join(" ")||void 0}ko();ko();var HRe=0,ikt=Array.isArray;function p(t,e,r,o,n,i){var a,s,l={};for(s in e)s=="ref"?a=e[s]:l[s]=e[s];var c={type:t,props:l,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--HRe,__i:-1,__u:0,__source:n,__self:i};if(typeof t=="function"&&(a=t.defaultProps))for(s in a)l[s]===void 0&&(l[s]=a[s]);return Pe.vnode&&Pe.vnode(c),c}function dQ(t){let{oldCode:e,newCode:r,className:o=""}=t,n=Be(()=>PM(e,r),[e,r]),i=H(null);L(()=>{if(i.current){let s=i.current.querySelector(".JsDiff__diffLine--added, .JsDiff__diffLine--removed");s&&s.scrollIntoView({behavior:"smooth",block:"center"})}},[e,r]);let a=()=>{let s=[],l=0;return n.forEach((c,d)=>{let u=c.added?"+":c.removed?"-":" ",f=c.value.split(`
42
42
  `);f.forEach((m,h)=>{(m.length>0||h<f.length-1)&&s.push(p("div",{className:ke("JsDiff__diffLine",c.added&&"JsDiff__diffLine--added",c.removed&&"JsDiff__diffLine--removed",!c.added&&!c.removed&&"JsDiff__diffLine--unchanged"),children:[p("span",{className:"JsDiff__lineNumber",children:++l}),p("span",{className:"JsDiff__lineContent",children:[p("span",{className:"JsDiff__sign",children:u}),p("span",{children:m||" "})]})]},`${d}-${h}`))})}),s};return p("div",{className:ke("JsDiff__container",o),children:p("div",{className:"JsDiff__content",ref:i,children:a()})})}var _ee=dp(gee(),1);var qM=_ee.default;var qLe={};function WM(t,e){let r=e||qLe,o=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,n=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return yee(t,o,n)}function yee(t,e,r){if(WLe(t)){if("value"in t)return t.type==="html"&&!r?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return xee(t.children,e,r)}return Array.isArray(t)?xee(t,e,r):""}function xee(t,e,r){let o=[],n=-1;for(;++n<t.length;)o[n]=yee(t[n],e,r);return o.join("")}function WLe(t){return!!(t&&typeof t=="object")}var bee=document.createElement("i");function jm(t){let e="&"+t+";";bee.innerHTML=e;let r=bee.textContent;return r.charCodeAt(r.length-1)===59&&t!=="semi"||r===e?!1:r}function po(t,e,r,o){let n=t.length,i=0,a;if(e<0?e=-e>n?0:n+e:e=e>n?n:e,r=r>0?r:0,o.length<1e4)a=Array.from(o),a.unshift(e,r),t.splice(...a);else for(r&&t.splice(e,r);i<o.length;)a=o.slice(i,i+1e4),a.unshift(e,0),t.splice(...a),i+=1e4,e+=1e4}function qn(t,e){return t.length>0?(po(t,t.length,0,e),t):e}var vee={}.hasOwnProperty;function TS(t){let e={},r=-1;for(;++r<t.length;)KLe(e,t[r]);return e}function KLe(t,e){let r;for(r in e){let n=(vee.call(t,r)?t[r]:void 0)||(t[r]={}),i=e[r],a;if(i)for(a in i){vee.call(n,a)||(n[a]=[]);let s=i[a];YLe(n[a],Array.isArray(s)?s:s?[s]:[])}}}function YLe(t,e){let r=-1,o=[];for(;++r<e.length;)(e[r].add==="after"?t:o).push(e[r]);po(t,0,0,o)}function kS(t,e){let r=Number.parseInt(t,e);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"\uFFFD":String.fromCodePoint(r)}function wn(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var bo=jc(/[A-Za-z]/),vo=jc(/[\dA-Za-z]/),Iee=jc(/[#-'*+\--9=?A-Z^-~]/);function nf(t){return t!==null&&(t<32||t===127)}var xy=jc(/\d/),wee=jc(/[\dA-Fa-f]/),Eee=jc(/[!-/:-@[-`{-~]/);function _e(t){return t!==null&&t<-2}function wt(t){return t!==null&&(t<0||t===32)}function Ze(t){return t===-2||t===-1||t===32}var af=jc(/\p{P}|\p{S}/u),Bs=jc(/\s/);function jc(t){return e;function e(r){return r!==null&&r>-1&&t.test(String.fromCharCode(r))}}function Xe(t,e,r,o){let n=o?o-1:Number.POSITIVE_INFINITY,i=0;return a;function a(l){return Ze(l)?(t.enter(r),s(l)):e(l)}function s(l){return Ze(l)&&i++<n?(t.consume(l),s):(t.exit(r),e(l))}}var See={tokenize:XLe};function XLe(t){let e=t.attempt(this.parser.constructs.contentInitial,o,n),r;return e;function o(s){if(s===null){t.consume(s);return}return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),Xe(t,e,"linePrefix")}function n(s){return t.enter("paragraph"),i(s)}function i(s){let l=t.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=l),r=l,a(s)}function a(s){if(s===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(s);return}return _e(s)?(t.consume(s),t.exit("chunkText"),i):(t.consume(s),a)}}var Tee={tokenize:JLe},Cee={tokenize:QLe};function JLe(t){let e=this,r=[],o=0,n,i,a;return s;function s(b){if(o<r.length){let I=r[o];return e.containerState=I[1],t.attempt(I[0].continuation,l,c)(b)}return c(b)}function l(b){if(o++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,n&&y();let I=e.events.length,w=I,v;for(;w--;)if(e.events[w][0]==="exit"&&e.events[w][1].type==="chunkFlow"){v=e.events[w][1].end;break}x(o);let E=I;for(;E<e.events.length;)e.events[E][1].end=Object.assign({},v),E++;return po(e.events,w+1,0,e.events.slice(I)),e.events.length=E,c(b)}return s(b)}function c(b){if(o===r.length){if(!n)return f(b);if(n.currentConstruct&&n.currentConstruct.concrete)return h(b);e.interrupt=!!(n.currentConstruct&&!n._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(Cee,d,u)(b)}function d(b){return n&&y(),x(o),f(b)}function u(b){return e.parser.lazy[e.now().line]=o!==r.length,a=e.now().offset,h(b)}function f(b){return e.containerState={},t.attempt(Cee,m,h)(b)}function m(b){return o++,r.push([e.currentConstruct,e.containerState]),f(b)}function h(b){if(b===null){n&&y(),x(0),t.consume(b);return}return n=n||e.parser.flow(e.now()),t.enter("chunkFlow",{contentType:"flow",previous:i,_tokenizer:n}),g(b)}function g(b){if(b===null){_(t.exit("chunkFlow"),!0),x(0),t.consume(b);return}return _e(b)?(t.consume(b),_(t.exit("chunkFlow")),o=0,e.interrupt=void 0,s):(t.consume(b),g)}function _(b,I){let w=e.sliceStream(b);if(I&&w.push(null),b.previous=i,i&&(i.next=b),i=b,n.defineSkip(b.start),n.write(w),e.parser.lazy[b.start.line]){let v=n.events.length;for(;v--;)if(n.events[v][1].start.offset<a&&(!n.events[v][1].end||n.events[v][1].end.offset>a))return;let E=e.events.length,C=E,S,T;for(;C--;)if(e.events[C][0]==="exit"&&e.events[C][1].type==="chunkFlow"){if(S){T=e.events[C][1].end;break}S=!0}for(x(o),v=E;v<e.events.length;)e.events[v][1].end=Object.assign({},T),v++;po(e.events,C+1,0,e.events.slice(E)),e.events.length=v}}function x(b){let I=r.length;for(;I-- >b;){let w=r[I];e.containerState=w[1],w[0].exit.call(e,t)}r.length=b}function y(){n.write([null]),i=void 0,n=void 0,e.containerState._closeFlow=void 0}}function QLe(t,e,r){return Xe(t,t.attempt(this.parser.constructs.document,e,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Gm(t){if(t===null||wt(t)||Bs(t))return 1;if(af(t))return 2}function Gc(t,e,r){let o=[],n=-1;for(;++n<t.length;){let i=t[n].resolveAll;i&&!o.includes(i)&&(e=i(e,r),o.push(i))}return e}var yy={name:"attention",tokenize:e2e,resolveAll:ZLe};function ZLe(t,e){let r=-1,o,n,i,a,s,l,c,d;for(;++r<t.length;)if(t[r][0]==="enter"&&t[r][1].type==="attentionSequence"&&t[r][1]._close){for(o=r;o--;)if(t[o][0]==="exit"&&t[o][1].type==="attentionSequence"&&t[o][1]._open&&e.sliceSerialize(t[o][1]).charCodeAt(0)===e.sliceSerialize(t[r][1]).charCodeAt(0)){if((t[o][1]._close||t[r][1]._open)&&(t[r][1].end.offset-t[r][1].start.offset)%3&&!((t[o][1].end.offset-t[o][1].start.offset+t[r][1].end.offset-t[r][1].start.offset)%3))continue;l=t[o][1].end.offset-t[o][1].start.offset>1&&t[r][1].end.offset-t[r][1].start.offset>1?2:1;let u=Object.assign({},t[o][1].end),f=Object.assign({},t[r][1].start);kee(u,-l),kee(f,l),a={type:l>1?"strongSequence":"emphasisSequence",start:u,end:Object.assign({},t[o][1].end)},s={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},t[r][1].start),end:f},i={type:l>1?"strongText":"emphasisText",start:Object.assign({},t[o][1].end),end:Object.assign({},t[r][1].start)},n={type:l>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},s.end)},t[o][1].end=Object.assign({},a.start),t[r][1].start=Object.assign({},s.end),c=[],t[o][1].end.offset-t[o][1].start.offset&&(c=qn(c,[["enter",t[o][1],e],["exit",t[o][1],e]])),c=qn(c,[["enter",n,e],["enter",a,e],["exit",a,e],["enter",i,e]]),c=qn(c,Gc(e.parser.constructs.insideSpan.null,t.slice(o+1,r),e)),c=qn(c,[["exit",i,e],["enter",s,e],["exit",s,e],["exit",n,e]]),t[r][1].end.offset-t[r][1].start.offset?(d=2,c=qn(c,[["enter",t[r][1],e],["exit",t[r][1],e]])):d=0,po(t,o-1,r-o+3,c),r=o+c.length-d-2;break}}for(r=-1;++r<t.length;)t[r][1].type==="attentionSequence"&&(t[r][1].type="data");return t}function e2e(t,e){let r=this.parser.constructs.attentionMarkers.null,o=this.previous,n=Gm(o),i;return a;function a(l){return i=l,t.enter("attentionSequence"),s(l)}function s(l){if(l===i)return t.consume(l),s;let c=t.exit("attentionSequence"),d=Gm(l),u=!d||d===2&&n||r.includes(l),f=!n||n===2&&d||r.includes(o);return c._open=!!(i===42?u:u&&(n||!f)),c._close=!!(i===42?f:f&&(d||!u)),e(l)}}function kee(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}var KM={name:"autolink",tokenize:t2e};function t2e(t,e,r){let o=0;return n;function n(m){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(m),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),i}function i(m){return bo(m)?(t.consume(m),a):m===64?r(m):c(m)}function a(m){return m===43||m===45||m===46||vo(m)?(o=1,s(m)):c(m)}function s(m){return m===58?(t.consume(m),o=0,l):(m===43||m===45||m===46||vo(m))&&o++<32?(t.consume(m),s):(o=0,c(m))}function l(m){return m===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(m),t.exit("autolinkMarker"),t.exit("autolink"),e):m===null||m===32||m===60||nf(m)?r(m):(t.consume(m),l)}function c(m){return m===64?(t.consume(m),d):Iee(m)?(t.consume(m),c):r(m)}function d(m){return vo(m)?u(m):r(m)}function u(m){return m===46?(t.consume(m),o=0,d):m===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(m),t.exit("autolinkMarker"),t.exit("autolink"),e):f(m)}function f(m){if((m===45||vo(m))&&o++<63){let h=m===45?f:u;return t.consume(m),h}return r(m)}}var $s={tokenize:r2e,partial:!0};function r2e(t,e,r){return o;function o(i){return Ze(i)?Xe(t,n,"linePrefix")(i):n(i)}function n(i){return i===null||_e(i)?e(i):r(i)}}var NS={name:"blockQuote",tokenize:o2e,continuation:{tokenize:n2e},exit:i2e};function o2e(t,e,r){let o=this;return n;function n(a){if(a===62){let s=o.containerState;return s.open||(t.enter("blockQuote",{_container:!0}),s.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(a),t.exit("blockQuoteMarker"),i}return r(a)}function i(a){return Ze(a)?(t.enter("blockQuotePrefixWhitespace"),t.consume(a),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(a))}}function n2e(t,e,r){let o=this;return n;function n(a){return Ze(a)?Xe(t,i,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):i(a)}function i(a){return t.attempt(NS,e,r)(a)}}function i2e(t){t.exit("blockQuote")}var OS={name:"characterEscape",tokenize:a2e};function a2e(t,e,r){return o;function o(i){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(i),t.exit("escapeMarker"),n}function n(i){return Eee(i)?(t.enter("characterEscapeValue"),t.consume(i),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):r(i)}}var PS={name:"characterReference",tokenize:s2e};function s2e(t,e,r){let o=this,n=0,i,a;return s;function s(u){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(u),t.exit("characterReferenceMarker"),l}function l(u){return u===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(u),t.exit("characterReferenceMarkerNumeric"),c):(t.enter("characterReferenceValue"),i=31,a=vo,d(u))}function c(u){return u===88||u===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(u),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),i=6,a=wee,d):(t.enter("characterReferenceValue"),i=7,a=xy,d(u))}function d(u){if(u===59&&n){let f=t.exit("characterReferenceValue");return a===vo&&!jm(o.sliceSerialize(f))?r(u):(t.enter("characterReferenceMarker"),t.consume(u),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return a(u)&&n++<i?(t.consume(u),d):r(u)}}var Nee={tokenize:c2e,partial:!0},AS={name:"codeFenced",tokenize:l2e,concrete:!0};function l2e(t,e,r){let o=this,n={tokenize:w,partial:!0},i=0,a=0,s;return l;function l(v){return c(v)}function c(v){let E=o.events[o.events.length-1];return i=E&&E[1].type==="linePrefix"?E[2].sliceSerialize(E[1],!0).length:0,s=v,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),d(v)}function d(v){return v===s?(a++,t.consume(v),d):a<3?r(v):(t.exit("codeFencedFenceSequence"),Ze(v)?Xe(t,u,"whitespace")(v):u(v))}function u(v){return v===null||_e(v)?(t.exit("codeFencedFence"),o.interrupt?e(v):t.check(Nee,g,I)(v)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),f(v))}function f(v){return v===null||_e(v)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),u(v)):Ze(v)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Xe(t,m,"whitespace")(v)):v===96&&v===s?r(v):(t.consume(v),f)}function m(v){return v===null||_e(v)?u(v):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),h(v))}function h(v){return v===null||_e(v)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),u(v)):v===96&&v===s?r(v):(t.consume(v),h)}function g(v){return t.attempt(n,I,_)(v)}function _(v){return t.enter("lineEnding"),t.consume(v),t.exit("lineEnding"),x}function x(v){return i>0&&Ze(v)?Xe(t,y,"linePrefix",i+1)(v):y(v)}function y(v){return v===null||_e(v)?t.check(Nee,g,I)(v):(t.enter("codeFlowValue"),b(v))}function b(v){return v===null||_e(v)?(t.exit("codeFlowValue"),y(v)):(t.consume(v),b)}function I(v){return t.exit("codeFenced"),e(v)}function w(v,E,C){let S=0;return T;function T(D){return v.enter("lineEnding"),v.consume(D),v.exit("lineEnding"),A}function A(D){return v.enter("codeFencedFence"),Ze(D)?Xe(v,B,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):B(D)}function B(D){return D===s?(v.enter("codeFencedFenceSequence"),O(D)):C(D)}function O(D){return D===s?(S++,v.consume(D),O):S>=a?(v.exit("codeFencedFenceSequence"),Ze(D)?Xe(v,R,"whitespace")(D):R(D)):C(D)}function R(D){return D===null||_e(D)?(v.exit("codeFencedFence"),E(D)):C(D)}}}function c2e(t,e,r){let o=this;return n;function n(a){return a===null?r(a):(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),i)}function i(a){return o.parser.lazy[o.now().line]?r(a):e(a)}}var by={name:"codeIndented",tokenize:u2e},d2e={tokenize:f2e,partial:!0};function u2e(t,e,r){let o=this;return n;function n(c){return t.enter("codeIndented"),Xe(t,i,"linePrefix",5)(c)}function i(c){let d=o.events[o.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(c):r(c)}function a(c){return c===null?l(c):_e(c)?t.attempt(d2e,a,l)(c):(t.enter("codeFlowValue"),s(c))}function s(c){return c===null||_e(c)?(t.exit("codeFlowValue"),a(c)):(t.consume(c),s)}function l(c){return t.exit("codeIndented"),e(c)}}function f2e(t,e,r){let o=this;return n;function n(a){return o.parser.lazy[o.now().line]?r(a):_e(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),n):Xe(t,i,"linePrefix",5)(a)}function i(a){let s=o.events[o.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?e(a):_e(a)?n(a):r(a)}}var YM={name:"codeText",tokenize:h2e,resolve:p2e,previous:m2e};function p2e(t){let e=t.length-4,r=3,o,n;if((t[r][1].type==="lineEnding"||t[r][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(o=r;++o<e;)if(t[o][1].type==="codeTextData"){t[r][1].type="codeTextPadding",t[e][1].type="codeTextPadding",r+=2,e-=2;break}}for(o=r-1,e++;++o<=e;)n===void 0?o!==e&&t[o][1].type!=="lineEnding"&&(n=o):(o===e||t[o][1].type==="lineEnding")&&(t[n][1].type="codeTextData",o!==n+2&&(t[n][1].end=t[o-1][1].end,t.splice(n+2,o-n-2),e-=o-n-2,o=n+2),n=void 0);return t}function m2e(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function h2e(t,e,r){let o=this,n=0,i,a;return s;function s(f){return t.enter("codeText"),t.enter("codeTextSequence"),l(f)}function l(f){return f===96?(t.consume(f),n++,l):(t.exit("codeTextSequence"),c(f))}function c(f){return f===null?r(f):f===32?(t.enter("space"),t.consume(f),t.exit("space"),c):f===96?(a=t.enter("codeTextSequence"),i=0,u(f)):_e(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),c):(t.enter("codeTextData"),d(f))}function d(f){return f===null||f===32||f===96||_e(f)?(t.exit("codeTextData"),c(f)):(t.consume(f),d)}function u(f){return f===96?(t.consume(f),i++,u):i===n?(t.exit("codeTextSequence"),t.exit("codeText"),e(f)):(a.type="codeTextData",d(f))}}var DS=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,r){let o=r??Number.POSITIVE_INFINITY;return o<this.left.length?this.left.slice(e,o):e>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(e,r,o){let n=r||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-n,Number.POSITIVE_INFINITY);return o&&vy(this.left,o),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),vy(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),vy(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let r=this.left.splice(e,Number.POSITIVE_INFINITY);vy(this.right,r.reverse())}else{let r=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);vy(this.left,r.reverse())}}};function vy(t,e){let r=0;if(e.length<1e4)t.push(...e);else for(;r<e.length;)t.push(...e.slice(r,r+1e4)),r+=1e4}function RS(t){let e={},r=-1,o,n,i,a,s,l,c,d=new DS(t);for(;++r<d.length;){for(;r in e;)r=e[r];if(o=d.get(r),r&&o[1].type==="chunkFlow"&&d.get(r-1)[1].type==="listItemPrefix"&&(l=o[1]._tokenizer.events,i=0,i<l.length&&l[i][1].type==="lineEndingBlank"&&(i+=2),i<l.length&&l[i][1].type==="content"))for(;++i<l.length&&l[i][1].type!=="content";)l[i][1].type==="chunkText"&&(l[i][1]._isInFirstContentOfListItem=!0,i++);if(o[0]==="enter")o[1].contentType&&(Object.assign(e,g2e(d,r)),r=e[r],c=!0);else if(o[1]._container){for(i=r,n=void 0;i--&&(a=d.get(i),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(n&&(d.get(n)[1].type="lineEndingBlank"),a[1].type="lineEnding",n=i);n&&(o[1].end=Object.assign({},d.get(n)[1].start),s=d.slice(n,r),s.unshift(o),d.splice(n,r-n+1,s))}}return po(t,0,Number.POSITIVE_INFINITY,d.slice(0)),!c}function g2e(t,e){let r=t.get(e)[1],o=t.get(e)[2],n=e-1,i=[],a=r._tokenizer||o.parser[r.contentType](r.start),s=a.events,l=[],c={},d,u,f=-1,m=r,h=0,g=0,_=[g];for(;m;){for(;t.get(++n)[1]!==m;);i.push(n),m._tokenizer||(d=o.sliceStream(m),m.next||d.push(null),u&&a.defineSkip(m.start),m._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(d),m._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),u=m,m=m.next}for(m=r;++f<s.length;)s[f][0]==="exit"&&s[f-1][0]==="enter"&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(g=f+1,_.push(g),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(a.events=[],m?(m._tokenizer=void 0,m.previous=void 0):_.pop(),f=_.length;f--;){let x=s.slice(_[f],_[f+1]),y=i.pop();l.push([y,y+x.length-1]),t.splice(y,2,x)}for(l.reverse(),f=-1;++f<l.length;)c[h+l[f][0]]=h+l[f][1],h+=l[f][1]-l[f][0]-1;return c}var XM={tokenize:y2e,resolve:x2e},_2e={tokenize:b2e,partial:!0};function x2e(t){return RS(t),t}function y2e(t,e){let r;return o;function o(s){return t.enter("content"),r=t.enter("chunkContent",{contentType:"content"}),n(s)}function n(s){return s===null?i(s):_e(s)?t.check(_2e,a,i)(s):(t.consume(s),n)}function i(s){return t.exit("chunkContent"),t.exit("content"),e(s)}function a(s){return t.consume(s),t.exit("chunkContent"),r.next=t.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,n}}function b2e(t,e,r){let o=this;return n;function n(a){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),Xe(t,i,"linePrefix")}function i(a){if(a===null||_e(a))return r(a);let s=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?e(a):t.interrupt(o.parser.constructs.flow,r,e)(a)}}function MS(t,e,r,o,n,i,a,s,l){let c=l||Number.POSITIVE_INFINITY,d=0;return u;function u(x){return x===60?(t.enter(o),t.enter(n),t.enter(i),t.consume(x),t.exit(i),f):x===null||x===32||x===41||nf(x)?r(x):(t.enter(o),t.enter(a),t.enter(s),t.enter("chunkString",{contentType:"string"}),g(x))}function f(x){return x===62?(t.enter(i),t.consume(x),t.exit(i),t.exit(n),t.exit(o),e):(t.enter(s),t.enter("chunkString",{contentType:"string"}),m(x))}function m(x){return x===62?(t.exit("chunkString"),t.exit(s),f(x)):x===null||x===60||_e(x)?r(x):(t.consume(x),x===92?h:m)}function h(x){return x===60||x===62||x===92?(t.consume(x),m):m(x)}function g(x){return!d&&(x===null||x===41||wt(x))?(t.exit("chunkString"),t.exit(s),t.exit(a),t.exit(o),e(x)):d<c&&x===40?(t.consume(x),d++,g):x===41?(t.consume(x),d--,g):x===null||x===32||x===40||nf(x)?r(x):(t.consume(x),x===92?_:g)}function _(x){return x===40||x===41||x===92?(t.consume(x),g):g(x)}}function LS(t,e,r,o,n,i){let a=this,s=0,l;return c;function c(m){return t.enter(o),t.enter(n),t.consume(m),t.exit(n),t.enter(i),d}function d(m){return s>999||m===null||m===91||m===93&&!l||m===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?r(m):m===93?(t.exit(i),t.enter(n),t.consume(m),t.exit(n),t.exit(o),e):_e(m)?(t.enter("lineEnding"),t.consume(m),t.exit("lineEnding"),d):(t.enter("chunkString",{contentType:"string"}),u(m))}function u(m){return m===null||m===91||m===93||_e(m)||s++>999?(t.exit("chunkString"),d(m)):(t.consume(m),l||(l=!Ze(m)),m===92?f:u)}function f(m){return m===91||m===92||m===93?(t.consume(m),s++,u):u(m)}}function FS(t,e,r,o,n,i){let a;return s;function s(f){return f===34||f===39||f===40?(t.enter(o),t.enter(n),t.consume(f),t.exit(n),a=f===40?41:f,l):r(f)}function l(f){return f===a?(t.enter(n),t.consume(f),t.exit(n),t.exit(o),e):(t.enter(i),c(f))}function c(f){return f===a?(t.exit(i),l(a)):f===null?r(f):_e(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),Xe(t,c,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===a||f===null||_e(f)?(t.exit("chunkString"),c(f)):(t.consume(f),f===92?u:d)}function u(f){return f===a||f===92?(t.consume(f),d):d(f)}}function sf(t,e){let r;return o;function o(n){return _e(n)?(t.enter("lineEnding"),t.consume(n),t.exit("lineEnding"),r=!0,o):Ze(n)?Xe(t,o,r?"linePrefix":"lineSuffix")(n):e(n)}}var JM={name:"definition",tokenize:I2e},v2e={tokenize:w2e,partial:!0};function I2e(t,e,r){let o=this,n;return i;function i(m){return t.enter("definition"),a(m)}function a(m){return LS.call(o,t,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function s(m){return n=wn(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),m===58?(t.enter("definitionMarker"),t.consume(m),t.exit("definitionMarker"),l):r(m)}function l(m){return wt(m)?sf(t,c)(m):c(m)}function c(m){return MS(t,d,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function d(m){return t.attempt(v2e,u,u)(m)}function u(m){return Ze(m)?Xe(t,f,"whitespace")(m):f(m)}function f(m){return m===null||_e(m)?(t.exit("definition"),o.parser.defined.push(n),e(m)):r(m)}}function w2e(t,e,r){return o;function o(s){return wt(s)?sf(t,n)(s):r(s)}function n(s){return FS(t,i,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function i(s){return Ze(s)?Xe(t,a,"whitespace")(s):a(s)}function a(s){return s===null||_e(s)?e(s):r(s)}}var QM={name:"hardBreakEscape",tokenize:E2e};function E2e(t,e,r){return o;function o(i){return t.enter("hardBreakEscape"),t.consume(i),n}function n(i){return _e(i)?(t.exit("hardBreakEscape"),e(i)):r(i)}}var ZM={name:"headingAtx",tokenize:C2e,resolve:S2e};function S2e(t,e){let r=t.length-2,o=3,n,i;return t[o][1].type==="whitespace"&&(o+=2),r-2>o&&t[r][1].type==="whitespace"&&(r-=2),t[r][1].type==="atxHeadingSequence"&&(o===r-1||r-4>o&&t[r-2][1].type==="whitespace")&&(r-=o+1===r?2:4),r>o&&(n={type:"atxHeadingText",start:t[o][1].start,end:t[r][1].end},i={type:"chunkText",start:t[o][1].start,end:t[r][1].end,contentType:"text"},po(t,o,r-o+1,[["enter",n,e],["enter",i,e],["exit",i,e],["exit",n,e]])),t}function C2e(t,e,r){let o=0;return n;function n(d){return t.enter("atxHeading"),i(d)}function i(d){return t.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&o++<6?(t.consume(d),a):d===null||wt(d)?(t.exit("atxHeadingSequence"),s(d)):r(d)}function s(d){return d===35?(t.enter("atxHeadingSequence"),l(d)):d===null||_e(d)?(t.exit("atxHeading"),e(d)):Ze(d)?Xe(t,s,"whitespace")(d):(t.enter("atxHeadingText"),c(d))}function l(d){return d===35?(t.consume(d),l):(t.exit("atxHeadingSequence"),s(d))}function c(d){return d===null||d===35||wt(d)?(t.exit("atxHeadingText"),s(d)):(t.consume(d),c)}}var Oee=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],eL=["pre","script","style","textarea"];var tL={name:"htmlFlow",tokenize:O2e,resolveTo:N2e,concrete:!0},T2e={tokenize:A2e,partial:!0},k2e={tokenize:P2e,partial:!0};function N2e(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function O2e(t,e,r){let o=this,n,i,a,s,l;return c;function c(M){return d(M)}function d(M){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(M),u}function u(M){return M===33?(t.consume(M),f):M===47?(t.consume(M),i=!0,g):M===63?(t.consume(M),n=3,o.interrupt?e:P):bo(M)?(t.consume(M),a=String.fromCharCode(M),_):r(M)}function f(M){return M===45?(t.consume(M),n=2,m):M===91?(t.consume(M),n=5,s=0,h):bo(M)?(t.consume(M),n=4,o.interrupt?e:P):r(M)}function m(M){return M===45?(t.consume(M),o.interrupt?e:P):r(M)}function h(M){let ce="CDATA[";return M===ce.charCodeAt(s++)?(t.consume(M),s===ce.length?o.interrupt?e:B:h):r(M)}function g(M){return bo(M)?(t.consume(M),a=String.fromCharCode(M),_):r(M)}function _(M){if(M===null||M===47||M===62||wt(M)){let ce=M===47,Te=a.toLowerCase();return!ce&&!i&&eL.includes(Te)?(n=1,o.interrupt?e(M):B(M)):Oee.includes(a.toLowerCase())?(n=6,ce?(t.consume(M),x):o.interrupt?e(M):B(M)):(n=7,o.interrupt&&!o.parser.lazy[o.now().line]?r(M):i?y(M):b(M))}return M===45||vo(M)?(t.consume(M),a+=String.fromCharCode(M),_):r(M)}function x(M){return M===62?(t.consume(M),o.interrupt?e:B):r(M)}function y(M){return Ze(M)?(t.consume(M),y):T(M)}function b(M){return M===47?(t.consume(M),T):M===58||M===95||bo(M)?(t.consume(M),I):Ze(M)?(t.consume(M),b):T(M)}function I(M){return M===45||M===46||M===58||M===95||vo(M)?(t.consume(M),I):w(M)}function w(M){return M===61?(t.consume(M),v):Ze(M)?(t.consume(M),w):b(M)}function v(M){return M===null||M===60||M===61||M===62||M===96?r(M):M===34||M===39?(t.consume(M),l=M,E):Ze(M)?(t.consume(M),v):C(M)}function E(M){return M===l?(t.consume(M),l=null,S):M===null||_e(M)?r(M):(t.consume(M),E)}function C(M){return M===null||M===34||M===39||M===47||M===60||M===61||M===62||M===96||wt(M)?w(M):(t.consume(M),C)}function S(M){return M===47||M===62||Ze(M)?b(M):r(M)}function T(M){return M===62?(t.consume(M),A):r(M)}function A(M){return M===null||_e(M)?B(M):Ze(M)?(t.consume(M),A):r(M)}function B(M){return M===45&&n===2?(t.consume(M),F):M===60&&n===1?(t.consume(M),$):M===62&&n===4?(t.consume(M),Q):M===63&&n===3?(t.consume(M),P):M===93&&n===5?(t.consume(M),G):_e(M)&&(n===6||n===7)?(t.exit("htmlFlowData"),t.check(T2e,ne,O)(M)):M===null||_e(M)?(t.exit("htmlFlowData"),O(M)):(t.consume(M),B)}function O(M){return t.check(k2e,R,ne)(M)}function R(M){return t.enter("lineEnding"),t.consume(M),t.exit("lineEnding"),D}function D(M){return M===null||_e(M)?O(M):(t.enter("htmlFlowData"),B(M))}function F(M){return M===45?(t.consume(M),P):B(M)}function $(M){return M===47?(t.consume(M),a="",V):B(M)}function V(M){if(M===62){let ce=a.toLowerCase();return eL.includes(ce)?(t.consume(M),Q):B(M)}return bo(M)&&a.length<8?(t.consume(M),a+=String.fromCharCode(M),V):B(M)}function G(M){return M===93?(t.consume(M),P):B(M)}function P(M){return M===62?(t.consume(M),Q):M===45&&n===2?(t.consume(M),P):B(M)}function Q(M){return M===null||_e(M)?(t.exit("htmlFlowData"),ne(M)):(t.consume(M),Q)}function ne(M){return t.exit("htmlFlow"),e(M)}}function P2e(t,e,r){let o=this;return n;function n(a){return _e(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),i):r(a)}function i(a){return o.parser.lazy[o.now().line]?r(a):e(a)}}function A2e(t,e,r){return o;function o(n){return t.enter("lineEnding"),t.consume(n),t.exit("lineEnding"),t.attempt($s,e,r)}}var rL={name:"htmlText",tokenize:D2e};function D2e(t,e,r){let o=this,n,i,a;return s;function s(P){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(P),l}function l(P){return P===33?(t.consume(P),c):P===47?(t.consume(P),w):P===63?(t.consume(P),b):bo(P)?(t.consume(P),C):r(P)}function c(P){return P===45?(t.consume(P),d):P===91?(t.consume(P),i=0,h):bo(P)?(t.consume(P),y):r(P)}function d(P){return P===45?(t.consume(P),m):r(P)}function u(P){return P===null?r(P):P===45?(t.consume(P),f):_e(P)?(a=u,$(P)):(t.consume(P),u)}function f(P){return P===45?(t.consume(P),m):u(P)}function m(P){return P===62?F(P):P===45?f(P):u(P)}function h(P){let Q="CDATA[";return P===Q.charCodeAt(i++)?(t.consume(P),i===Q.length?g:h):r(P)}function g(P){return P===null?r(P):P===93?(t.consume(P),_):_e(P)?(a=g,$(P)):(t.consume(P),g)}function _(P){return P===93?(t.consume(P),x):g(P)}function x(P){return P===62?F(P):P===93?(t.consume(P),x):g(P)}function y(P){return P===null||P===62?F(P):_e(P)?(a=y,$(P)):(t.consume(P),y)}function b(P){return P===null?r(P):P===63?(t.consume(P),I):_e(P)?(a=b,$(P)):(t.consume(P),b)}function I(P){return P===62?F(P):b(P)}function w(P){return bo(P)?(t.consume(P),v):r(P)}function v(P){return P===45||vo(P)?(t.consume(P),v):E(P)}function E(P){return _e(P)?(a=E,$(P)):Ze(P)?(t.consume(P),E):F(P)}function C(P){return P===45||vo(P)?(t.consume(P),C):P===47||P===62||wt(P)?S(P):r(P)}function S(P){return P===47?(t.consume(P),F):P===58||P===95||bo(P)?(t.consume(P),T):_e(P)?(a=S,$(P)):Ze(P)?(t.consume(P),S):F(P)}function T(P){return P===45||P===46||P===58||P===95||vo(P)?(t.consume(P),T):A(P)}function A(P){return P===61?(t.consume(P),B):_e(P)?(a=A,$(P)):Ze(P)?(t.consume(P),A):S(P)}function B(P){return P===null||P===60||P===61||P===62||P===96?r(P):P===34||P===39?(t.consume(P),n=P,O):_e(P)?(a=B,$(P)):Ze(P)?(t.consume(P),B):(t.consume(P),R)}function O(P){return P===n?(t.consume(P),n=void 0,D):P===null?r(P):_e(P)?(a=O,$(P)):(t.consume(P),O)}function R(P){return P===null||P===34||P===39||P===60||P===61||P===96?r(P):P===47||P===62||wt(P)?S(P):(t.consume(P),R)}function D(P){return P===47||P===62||wt(P)?S(P):r(P)}function F(P){return P===62?(t.consume(P),t.exit("htmlTextData"),t.exit("htmlText"),e):r(P)}function $(P){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(P),t.exit("lineEnding"),V}function V(P){return Ze(P)?Xe(t,G,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):G(P)}function G(P){return t.enter("htmlTextData"),a(P)}}var lf={name:"labelEnd",tokenize:$2e,resolveTo:B2e,resolveAll:F2e},R2e={tokenize:z2e},M2e={tokenize:U2e},L2e={tokenize:V2e};function F2e(t){let e=-1;for(;++e<t.length;){let r=t[e][1];(r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd")&&(t.splice(e+1,r.type==="labelImage"?4:2),r.type="data",e++)}return t}function B2e(t,e){let r=t.length,o=0,n,i,a,s;for(;r--;)if(n=t[r][1],i){if(n.type==="link"||n.type==="labelLink"&&n._inactive)break;t[r][0]==="enter"&&n.type==="labelLink"&&(n._inactive=!0)}else if(a){if(t[r][0]==="enter"&&(n.type==="labelImage"||n.type==="labelLink")&&!n._balanced&&(i=r,n.type!=="labelLink")){o=2;break}}else n.type==="labelEnd"&&(a=r);let l={type:t[i][1].type==="labelLink"?"link":"image",start:Object.assign({},t[i][1].start),end:Object.assign({},t[t.length-1][1].end)},c={type:"label",start:Object.assign({},t[i][1].start),end:Object.assign({},t[a][1].end)},d={type:"labelText",start:Object.assign({},t[i+o+2][1].end),end:Object.assign({},t[a-2][1].start)};return s=[["enter",l,e],["enter",c,e]],s=qn(s,t.slice(i+1,i+o+3)),s=qn(s,[["enter",d,e]]),s=qn(s,Gc(e.parser.constructs.insideSpan.null,t.slice(i+o+4,a-3),e)),s=qn(s,[["exit",d,e],t[a-2],t[a-1],["exit",c,e]]),s=qn(s,t.slice(a+1)),s=qn(s,[["exit",l,e]]),po(t,i,t.length,s),t}function $2e(t,e,r){let o=this,n=o.events.length,i,a;for(;n--;)if((o.events[n][1].type==="labelImage"||o.events[n][1].type==="labelLink")&&!o.events[n][1]._balanced){i=o.events[n][1];break}return s;function s(f){return i?i._inactive?u(f):(a=o.parser.defined.includes(wn(o.sliceSerialize({start:i.end,end:o.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(f),t.exit("labelMarker"),t.exit("labelEnd"),l):r(f)}function l(f){return f===40?t.attempt(R2e,d,a?d:u)(f):f===91?t.attempt(M2e,d,a?c:u)(f):a?d(f):u(f)}function c(f){return t.attempt(L2e,d,u)(f)}function d(f){return e(f)}function u(f){return i._balanced=!0,r(f)}}function z2e(t,e,r){return o;function o(u){return t.enter("resource"),t.enter("resourceMarker"),t.consume(u),t.exit("resourceMarker"),n}function n(u){return wt(u)?sf(t,i)(u):i(u)}function i(u){return u===41?d(u):MS(t,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function a(u){return wt(u)?sf(t,l)(u):d(u)}function s(u){return r(u)}function l(u){return u===34||u===39||u===40?FS(t,c,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):d(u)}function c(u){return wt(u)?sf(t,d)(u):d(u)}function d(u){return u===41?(t.enter("resourceMarker"),t.consume(u),t.exit("resourceMarker"),t.exit("resource"),e):r(u)}}function U2e(t,e,r){let o=this;return n;function n(s){return LS.call(o,t,i,a,"reference","referenceMarker","referenceString")(s)}function i(s){return o.parser.defined.includes(wn(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?e(s):r(s)}function a(s){return r(s)}}function V2e(t,e,r){return o;function o(i){return t.enter("reference"),t.enter("referenceMarker"),t.consume(i),t.exit("referenceMarker"),n}function n(i){return i===93?(t.enter("referenceMarker"),t.consume(i),t.exit("referenceMarker"),t.exit("reference"),e):r(i)}}var oL={name:"labelStartImage",tokenize:H2e,resolveAll:lf.resolveAll};function H2e(t,e,r){let o=this;return n;function n(s){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(s),t.exit("labelImageMarker"),i}function i(s){return s===91?(t.enter("labelMarker"),t.consume(s),t.exit("labelMarker"),t.exit("labelImage"),a):r(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in o.parser.constructs?r(s):e(s)}}var nL={name:"labelStartLink",tokenize:j2e,resolveAll:lf.resolveAll};function j2e(t,e,r){let o=this;return n;function n(a){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(a),t.exit("labelMarker"),t.exit("labelLink"),i}function i(a){return a===94&&"_hiddenFootnoteSupport"in o.parser.constructs?r(a):e(a)}}var Iy={name:"lineEnding",tokenize:G2e};function G2e(t,e){return r;function r(o){return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),Xe(t,e,"linePrefix")}}var cf={name:"thematicBreak",tokenize:q2e};function q2e(t,e,r){let o=0,n;return i;function i(c){return t.enter("thematicBreak"),a(c)}function a(c){return n=c,s(c)}function s(c){return c===n?(t.enter("thematicBreakSequence"),l(c)):o>=3&&(c===null||_e(c))?(t.exit("thematicBreak"),e(c)):r(c)}function l(c){return c===n?(t.consume(c),o++,l):(t.exit("thematicBreakSequence"),Ze(c)?Xe(t,s,"whitespace")(c):s(c))}}var En={name:"list",tokenize:Y2e,continuation:{tokenize:X2e},exit:Q2e},W2e={tokenize:Z2e,partial:!0},K2e={tokenize:J2e,partial:!0};function Y2e(t,e,r){let o=this,n=o.events[o.events.length-1],i=n&&n[1].type==="linePrefix"?n[2].sliceSerialize(n[1],!0).length:0,a=0;return s;function s(m){let h=o.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!o.containerState.marker||m===o.containerState.marker:xy(m)){if(o.containerState.type||(o.containerState.type=h,t.enter(h,{_container:!0})),h==="listUnordered")return t.enter("listItemPrefix"),m===42||m===45?t.check(cf,r,c)(m):c(m);if(!o.interrupt||m===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(m)}return r(m)}function l(m){return xy(m)&&++a<10?(t.consume(m),l):(!o.interrupt||a<2)&&(o.containerState.marker?m===o.containerState.marker:m===41||m===46)?(t.exit("listItemValue"),c(m)):r(m)}function c(m){return t.enter("listItemMarker"),t.consume(m),t.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||m,t.check($s,o.interrupt?r:d,t.attempt(W2e,f,u))}function d(m){return o.containerState.initialBlankLine=!0,i++,f(m)}function u(m){return Ze(m)?(t.enter("listItemPrefixWhitespace"),t.consume(m),t.exit("listItemPrefixWhitespace"),f):r(m)}function f(m){return o.containerState.size=i+o.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(m)}}function X2e(t,e,r){let o=this;return o.containerState._closeFlow=void 0,t.check($s,n,i);function n(s){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,Xe(t,e,"listItemIndent",o.containerState.size+1)(s)}function i(s){return o.containerState.furtherBlankLines||!Ze(s)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,a(s)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,t.attempt(K2e,e,a)(s))}function a(s){return o.containerState._closeFlow=!0,o.interrupt=void 0,Xe(t,t.attempt(En,e,r),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function J2e(t,e,r){let o=this;return Xe(t,n,"listItemIndent",o.containerState.size+1);function n(i){let a=o.events[o.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===o.containerState.size?e(i):r(i)}}function Q2e(t){t.exit(this.containerState.type)}function Z2e(t,e,r){let o=this;return Xe(t,n,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function n(i){let a=o.events[o.events.length-1];return!Ze(i)&&a&&a[1].type==="listItemPrefixWhitespace"?e(i):r(i)}}var BS={name:"setextUnderline",tokenize:tFe,resolveTo:eFe};function eFe(t,e){let r=t.length,o,n,i;for(;r--;)if(t[r][0]==="enter"){if(t[r][1].type==="content"){o=r;break}t[r][1].type==="paragraph"&&(n=r)}else t[r][1].type==="content"&&t.splice(r,1),!i&&t[r][1].type==="definition"&&(i=r);let a={type:"setextHeading",start:Object.assign({},t[n][1].start),end:Object.assign({},t[t.length-1][1].end)};return t[n][1].type="setextHeadingText",i?(t.splice(n,0,["enter",a,e]),t.splice(i+1,0,["exit",t[o][1],e]),t[o][1].end=Object.assign({},t[i][1].end)):t[o][1]=a,t.push(["exit",a,e]),t}function tFe(t,e,r){let o=this,n;return i;function i(c){let d=o.events.length,u;for(;d--;)if(o.events[d][1].type!=="lineEnding"&&o.events[d][1].type!=="linePrefix"&&o.events[d][1].type!=="content"){u=o.events[d][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||u)?(t.enter("setextHeadingLine"),n=c,a(c)):r(c)}function a(c){return t.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===n?(t.consume(c),s):(t.exit("setextHeadingLineSequence"),Ze(c)?Xe(t,l,"lineSuffix")(c):l(c))}function l(c){return c===null||_e(c)?(t.exit("setextHeadingLine"),e(c)):r(c)}}var Pee={tokenize:rFe};function rFe(t){let e=this,r=t.attempt($s,o,t.attempt(this.parser.constructs.flowInitial,n,Xe(t,t.attempt(this.parser.constructs.flow,n,t.attempt(XM,n)),"linePrefix")));return r;function o(i){if(i===null){t.consume(i);return}return t.enter("lineEndingBlank"),t.consume(i),t.exit("lineEndingBlank"),e.currentConstruct=void 0,r}function n(i){if(i===null){t.consume(i);return}return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),e.currentConstruct=void 0,r}}var Aee={resolveAll:Lee()},Dee=Mee("string"),Ree=Mee("text");function Mee(t){return{tokenize:e,resolveAll:Lee(t==="text"?oFe:void 0)};function e(r){let o=this,n=this.parser.constructs[t],i=r.attempt(n,a,s);return a;function a(d){return c(d)?i(d):s(d)}function s(d){if(d===null){r.consume(d);return}return r.enter("data"),r.consume(d),l}function l(d){return c(d)?(r.exit("data"),i(d)):(r.consume(d),l)}function c(d){if(d===null)return!0;let u=n[d],f=-1;if(u)for(;++f<u.length;){let m=u[f];if(!m.previous||m.previous.call(o,o.previous))return!0}return!1}}}function Lee(t){return e;function e(r,o){let n=-1,i;for(;++n<=r.length;)i===void 0?r[n]&&r[n][1].type==="data"&&(i=n,n++):(!r[n]||r[n][1].type!=="data")&&(n!==i+2&&(r[i][1].end=r[n-1][1].end,r.splice(i+2,n-i-2),n=i+2),i=void 0);return t?t(r,o):r}}function oFe(t,e){let r=0;for(;++r<=t.length;)if((r===t.length||t[r][1].type==="lineEnding")&&t[r-1][1].type==="data"){let o=t[r-1][1],n=e.sliceStream(o),i=n.length,a=-1,s=0,l;for(;i--;){let c=n[i];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(c===-2)l=!0,s++;else if(c!==-1){i++;break}}if(s){let c={type:r===t.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{line:o.end.line,column:o.end.column-s,offset:o.end.offset-s,_index:o.start._index+i,_bufferIndex:i?a:o.start._bufferIndex+a},end:Object.assign({},o.end)};o.end=Object.assign({},c.start),o.start.offset===o.end.offset?Object.assign(o,c):(t.splice(r,0,["enter",c,e],["exit",c,e]),r+=2)}r++}return t}function Fee(t,e,r){let o=Object.assign(r?Object.assign({},r):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),n={},i=[],a=[],s=[],l=!0,c={consume:I,enter:w,exit:v,attempt:S(E),check:S(C),interrupt:S(C,{interrupt:!0})},d={previous:null,code:null,containerState:{},events:[],parser:t,sliceStream:g,sliceSerialize:h,now:_,defineSkip:x,write:m},u=e.tokenize.call(d,c),f;return e.resolveAll&&i.push(e),d;function m(O){return a=qn(a,O),y(),a[a.length-1]!==null?[]:(T(e,0),d.events=Gc(i,d.events,d),d.events)}function h(O,R){return iFe(g(O),R)}function g(O){return nFe(a,O)}function _(){let{line:O,column:R,offset:D,_index:F,_bufferIndex:$}=o;return{line:O,column:R,offset:D,_index:F,_bufferIndex:$}}function x(O){n[O.line]=O.column,B()}function y(){let O;for(;o._index<a.length;){let R=a[o._index];if(typeof R=="string")for(O=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===O&&o._bufferIndex<R.length;)b(R.charCodeAt(o._bufferIndex));else b(R)}}function b(O){l=void 0,f=O,u=u(O)}function I(O){_e(O)?(o.line++,o.column=1,o.offset+=O===-3?2:1,B()):O!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===a[o._index].length&&(o._bufferIndex=-1,o._index++)),d.previous=O,l=!0}function w(O,R){let D=R||{};return D.type=O,D.start=_(),d.events.push(["enter",D,d]),s.push(D),D}function v(O){let R=s.pop();return R.end=_(),d.events.push(["exit",R,d]),R}function E(O,R){T(O,R.from)}function C(O,R){R.restore()}function S(O,R){return D;function D(F,$,V){let G,P,Q,ne;return Array.isArray(F)?ce(F):"tokenize"in F?ce([F]):M(F);function M(Ne){return ve;function ve(it){let Ut=it!==null&&Ne[it],at=it!==null&&Ne.null,ht=[...Array.isArray(Ut)?Ut:Ut?[Ut]:[],...Array.isArray(at)?at:at?[at]:[]];return ce(ht)(it)}}function ce(Ne){return G=Ne,P=0,Ne.length===0?V:Te(Ne[P])}function Te(Ne){return ve;function ve(it){return ne=A(),Q=Ne,Ne.partial||(d.currentConstruct=Ne),Ne.name&&d.parser.constructs.disable.null.includes(Ne.name)?nt(it):Ne.tokenize.call(R?Object.assign(Object.create(d),R):d,c,ze,nt)(it)}}function ze(Ne){return l=!0,O(Q,ne),$}function nt(Ne){return l=!0,ne.restore(),++P<G.length?Te(G[P]):V}}}function T(O,R){O.resolveAll&&!i.includes(O)&&i.push(O),O.resolve&&po(d.events,R,d.events.length-R,O.resolve(d.events.slice(R),d)),O.resolveTo&&(d.events=O.resolveTo(d.events,d))}function A(){let O=_(),R=d.previous,D=d.currentConstruct,F=d.events.length,$=Array.from(s);return{restore:V,from:F};function V(){o=O,d.previous=R,d.currentConstruct=D,d.events.length=F,s=$,B()}}function B(){o.line in n&&o.column<2&&(o.column=n[o.line],o.offset+=n[o.line]-1)}}function nFe(t,e){let r=e.start._index,o=e.start._bufferIndex,n=e.end._index,i=e.end._bufferIndex,a;if(r===n)a=[t[r].slice(o,i)];else{if(a=t.slice(r,n),o>-1){let s=a[0];typeof s=="string"?a[0]=s.slice(o):a.shift()}i>0&&a.push(t[n].slice(0,i))}return a}function iFe(t,e){let r=-1,o=[],n;for(;++r<t.length;){let i=t[r],a;if(typeof i=="string")a=i;else switch(i){case-5:{a="\r";break}case-4:{a=`
43
43
  `;break}case-3:{a=`\r
44
- `;break}case-2:{a=e?" ":" ";break}case-1:{if(!e&&n)continue;a=" ";break}default:a=String.fromCharCode(i)}n=i===-2,o.push(a)}return o.join("")}var iL={};Xt(iL,{attentionMarkers:()=>pFe,contentInitial:()=>sFe,disable:()=>mFe,document:()=>aFe,flow:()=>cFe,flowInitial:()=>lFe,insideSpan:()=>fFe,string:()=>dFe,text:()=>uFe});var aFe={42:En,43:En,45:En,48:En,49:En,50:En,51:En,52:En,53:En,54:En,55:En,56:En,57:En,62:NS},sFe={91:JM},lFe={[-2]:by,[-1]:by,32:by},cFe={35:ZM,42:cf,45:[BS,cf],60:tL,61:BS,95:cf,96:AS,126:AS},dFe={38:PS,92:OS},uFe={[-5]:Iy,[-4]:Iy,[-3]:Iy,33:oL,38:PS,42:yy,60:[KM,rL],91:nL,92:[QM,OS],93:lf,95:yy,96:YM},fFe={null:[yy,Aee]},pFe={null:[42,95]},mFe={null:[]};function aL(t){let r=TS([iL,...(t||{}).extensions||[]]),o={defined:[],lazy:{},constructs:r,content:n(See),document:n(Tee),flow:n(Pee),string:n(Dee),text:n(Ree)};return o;function n(i){return a;function a(s){return Fee(o,i,s)}}}function sL(t){for(;!RS(t););return t}var Bee=/[\0\t\n\r]/g;function lL(){let t=1,e="",r=!0,o;return n;function n(i,a,s){let l=[],c,d,u,f,m;for(i=e+(typeof i=="string"?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,e="",r&&(i.charCodeAt(0)===65279&&u++,r=void 0);u<i.length;){if(Bee.lastIndex=u,c=Bee.exec(i),f=c&&c.index!==void 0?c.index:i.length,m=i.charCodeAt(f),!c){e=i.slice(u);break}if(m===10&&u===f&&o)l.push(-3),o=void 0;else switch(o&&(l.push(-5),o=void 0),u<f&&(l.push(i.slice(u,f)),t+=f-u),m){case 0:{l.push(65533),t++;break}case 9:{for(d=Math.ceil(t/4)*4,l.push(-2);t++<d;)l.push(-1);break}case 10:{l.push(-4),t=1;break}default:o=!0,t=1}u=f+1}return s&&(o&&l.push(-5),e&&l.push(e),l.push(null)),l}}var hFe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function $ee(t){return t.replace(hFe,gFe)}function gFe(t,e,r){if(e)return e;if(r.charCodeAt(0)===35){let n=r.charCodeAt(1),i=n===120||n===88;return kS(r.slice(i?2:1),i?16:10)}return jm(r)||t}function qm(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?zee(t.position):"start"in t||"end"in t?zee(t):"line"in t||"column"in t?cL(t):""}function cL(t){return Uee(t&&t.line)+":"+Uee(t&&t.column)}function zee(t){return cL(t&&t.start)+"-"+cL(t&&t.end)}function Uee(t){return t&&typeof t=="number"?t:1}var Hee={}.hasOwnProperty;function dL(t,e,r){return typeof e!="string"&&(r=e,e=void 0),_Fe(r)(sL(aL(r).document().write(lL()(t,e,!0))))}function _Fe(t){let e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(Vt),autolinkProtocol:S,autolinkEmail:S,atxHeading:i(To),blockQuote:i(it),characterEscape:S,characterReference:S,codeFenced:i(Ut),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(Ut,a),codeText:i(at,a),codeTextData:S,data:S,codeFlowValue:S,definition:i(ht),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(bt),hardBreakEscape:i(Rt),hardBreakTrailing:i(Rt),htmlFlow:i(me,a),htmlFlowData:S,htmlText:i(me,a),htmlTextData:S,image:i(kn),label:a,link:i(Vt),listItem:i(go),listItemValue:f,listOrdered:i(ct,u),listUnordered:i(ct),paragraph:i(ro),reference:M,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(To),strong:i(Wo),thematicBreak:i(Z)},exit:{atxHeading:l(),atxHeadingSequence:w,autolink:l(),autolinkEmail:ve,autolinkProtocol:Ne,blockQuote:l(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:Te,characterReferenceMarkerNumeric:Te,characterReferenceValue:ze,characterReference:nt,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:T,codeIndented:l(x),codeText:l(D),codeTextData:T,data:T,definition:l(),definitionDestinationString:I,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(B),hardBreakTrailing:l(B),htmlFlow:l(O),htmlFlowData:T,htmlText:l(R),htmlTextData:T,image:l($),label:G,labelText:V,lineEnding:A,link:l(F),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ce,resourceDestinationString:P,resourceTitleString:Q,resource:ne,setextHeading:l(C),setextHeadingLineSequence:E,setextHeadingText:v,strong:l(),thematicBreak:l()}};jee(e,(t||{}).mdastExtensions||[]);let r={};return o;function o(z){let W={type:"root",children:[]},se={stack:[W],tokenStack:[],config:e,enter:s,exit:c,buffer:a,resume:d,data:r},Ve=[],_t=-1;for(;++_t<z.length;)if(z[_t][1].type==="listOrdered"||z[_t][1].type==="listUnordered")if(z[_t][0]==="enter")Ve.push(_t);else{let Pt=Ve.pop();_t=n(z,Pt,_t)}for(_t=-1;++_t<z.length;){let Pt=e[z[_t][0]];Hee.call(Pt,z[_t][1].type)&&Pt[z[_t][1].type].call(Object.assign({sliceSerialize:z[_t][2].sliceSerialize},se),z[_t][1])}if(se.tokenStack.length>0){let Pt=se.tokenStack[se.tokenStack.length-1];(Pt[1]||Vee).call(se,void 0,Pt[0])}for(W.position={start:qc(z.length>0?z[0][1].start:{line:1,column:1,offset:0}),end:qc(z.length>0?z[z.length-2][1].end:{line:1,column:1,offset:0})},_t=-1;++_t<e.transforms.length;)W=e.transforms[_t](W)||W;return W}function n(z,W,se){let Ve=W-1,_t=-1,Pt=!1,ri,Gr,Rr,Ji;for(;++Ve<=se;){let Ko=z[Ve];switch(Ko[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ko[0]==="enter"?_t++:_t--,Ji=void 0;break}case"lineEndingBlank":{Ko[0]==="enter"&&(ri&&!Ji&&!_t&&!Rr&&(Rr=Ve),Ji=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ji=void 0}if(!_t&&Ko[0]==="enter"&&Ko[1].type==="listItemPrefix"||_t===-1&&Ko[0]==="exit"&&(Ko[1].type==="listUnordered"||Ko[1].type==="listOrdered")){if(ri){let Nn=Ve;for(Gr=void 0;Nn--;){let On=z[Nn];if(On[1].type==="lineEnding"||On[1].type==="lineEndingBlank"){if(On[0]==="exit")continue;Gr&&(z[Gr][1].type="lineEndingBlank",Pt=!0),On[1].type="lineEnding",Gr=Nn}else if(!(On[1].type==="linePrefix"||On[1].type==="blockQuotePrefix"||On[1].type==="blockQuotePrefixWhitespace"||On[1].type==="blockQuoteMarker"||On[1].type==="listItemIndent"))break}Rr&&(!Gr||Rr<Gr)&&(ri._spread=!0),ri.end=Object.assign({},Gr?z[Gr][1].start:Ko[1].end),z.splice(Gr||Ve,0,["exit",ri,Ko[2]]),Ve++,se++}if(Ko[1].type==="listItemPrefix"){let Nn={type:"listItem",_spread:!1,start:Object.assign({},Ko[1].start),end:void 0};ri=Nn,z.splice(Ve,0,["enter",Nn,Ko[2]]),Ve++,se++,Rr=void 0,Ji=!0}}}return z[W][1]._spread=Pt,se}function i(z,W){return se;function se(Ve){s.call(this,z(Ve),Ve),W&&W.call(this,Ve)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(z,W,se){this.stack[this.stack.length-1].children.push(z),this.stack.push(z),this.tokenStack.push([W,se]),z.position={start:qc(W.start),end:void 0}}function l(z){return W;function W(se){z&&z.call(this,se),c.call(this,se)}}function c(z,W){let se=this.stack.pop(),Ve=this.tokenStack.pop();if(Ve)Ve[0].type!==z.type&&(W?W.call(this,z,Ve[0]):(Ve[1]||Vee).call(this,z,Ve[0]));else throw new Error("Cannot close `"+z.type+"` ("+qm({start:z.start,end:z.end})+"): it\u2019s not open");se.position.end=qc(z.end)}function d(){return WM(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function f(z){if(this.data.expectingFirstListItemValue){let W=this.stack[this.stack.length-2];W.start=Number.parseInt(this.sliceSerialize(z),10),this.data.expectingFirstListItemValue=void 0}}function m(){let z=this.resume(),W=this.stack[this.stack.length-1];W.lang=z}function h(){let z=this.resume(),W=this.stack[this.stack.length-1];W.meta=z}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){let z=this.resume(),W=this.stack[this.stack.length-1];W.value=z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){let z=this.resume(),W=this.stack[this.stack.length-1];W.value=z.replace(/(\r?\n|\r)$/g,"")}function y(z){let W=this.resume(),se=this.stack[this.stack.length-1];se.label=W,se.identifier=wn(this.sliceSerialize(z)).toLowerCase()}function b(){let z=this.resume(),W=this.stack[this.stack.length-1];W.title=z}function I(){let z=this.resume(),W=this.stack[this.stack.length-1];W.url=z}function w(z){let W=this.stack[this.stack.length-1];if(!W.depth){let se=this.sliceSerialize(z).length;W.depth=se}}function v(){this.data.setextHeadingSlurpLineEnding=!0}function E(z){let W=this.stack[this.stack.length-1];W.depth=this.sliceSerialize(z).codePointAt(0)===61?1:2}function C(){this.data.setextHeadingSlurpLineEnding=void 0}function S(z){let se=this.stack[this.stack.length-1].children,Ve=se[se.length-1];(!Ve||Ve.type!=="text")&&(Ve=Le(),Ve.position={start:qc(z.start),end:void 0},se.push(Ve)),this.stack.push(Ve)}function T(z){let W=this.stack.pop();W.value+=this.sliceSerialize(z),W.position.end=qc(z.end)}function A(z){let W=this.stack[this.stack.length-1];if(this.data.atHardBreak){let se=W.children[W.children.length-1];se.position.end=qc(z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(W.type)&&(S.call(this,z),T.call(this,z))}function B(){this.data.atHardBreak=!0}function O(){let z=this.resume(),W=this.stack[this.stack.length-1];W.value=z}function R(){let z=this.resume(),W=this.stack[this.stack.length-1];W.value=z}function D(){let z=this.resume(),W=this.stack[this.stack.length-1];W.value=z}function F(){let z=this.stack[this.stack.length-1];if(this.data.inReference){let W=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=W,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function $(){let z=this.stack[this.stack.length-1];if(this.data.inReference){let W=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=W,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function V(z){let W=this.sliceSerialize(z),se=this.stack[this.stack.length-2];se.label=$ee(W),se.identifier=wn(W).toLowerCase()}function G(){let z=this.stack[this.stack.length-1],W=this.resume(),se=this.stack[this.stack.length-1];if(this.data.inReference=!0,se.type==="link"){let Ve=z.children;se.children=Ve}else se.alt=W}function P(){let z=this.resume(),W=this.stack[this.stack.length-1];W.url=z}function Q(){let z=this.resume(),W=this.stack[this.stack.length-1];W.title=z}function ne(){this.data.inReference=void 0}function M(){this.data.referenceType="collapsed"}function ce(z){let W=this.resume(),se=this.stack[this.stack.length-1];se.label=W,se.identifier=wn(this.sliceSerialize(z)).toLowerCase(),this.data.referenceType="full"}function Te(z){this.data.characterReferenceType=z.type}function ze(z){let W=this.sliceSerialize(z),se=this.data.characterReferenceType,Ve;se?(Ve=kS(W,se==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ve=jm(W);let _t=this.stack[this.stack.length-1];_t.value+=Ve}function nt(z){let W=this.stack.pop();W.position.end=qc(z.end)}function Ne(z){T.call(this,z);let W=this.stack[this.stack.length-1];W.url=this.sliceSerialize(z)}function ve(z){T.call(this,z);let W=this.stack[this.stack.length-1];W.url="mailto:"+this.sliceSerialize(z)}function it(){return{type:"blockquote",children:[]}}function Ut(){return{type:"code",lang:null,meta:null,value:""}}function at(){return{type:"inlineCode",value:""}}function ht(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function bt(){return{type:"emphasis",children:[]}}function To(){return{type:"heading",depth:0,children:[]}}function Rt(){return{type:"break"}}function me(){return{type:"html",value:""}}function kn(){return{type:"image",title:null,url:"",alt:null}}function Vt(){return{type:"link",title:null,url:"",children:[]}}function ct(z){return{type:"list",ordered:z.type==="listOrdered",start:null,spread:z._spread,children:[]}}function go(z){return{type:"listItem",spread:z._spread,checked:null,children:[]}}function ro(){return{type:"paragraph",children:[]}}function Wo(){return{type:"strong",children:[]}}function Le(){return{type:"text",value:""}}function Z(){return{type:"thematicBreak"}}}function qc(t){return{line:t.line,column:t.column,offset:t.offset}}function jee(t,e){let r=-1;for(;++r<e.length;){let o=e[r];Array.isArray(o)?jee(t,o):xFe(t,o)}}function xFe(t,e){let r;for(r in e)if(Hee.call(e,r))switch(r){case"canContainEols":{let o=e[r];o&&t[r].push(...o);break}case"transforms":{let o=e[r];o&&t[r].push(...o);break}case"enter":case"exit":{let o=e[r];o&&Object.assign(t[r],o);break}}}function Vee(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+qm({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+qm({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+qm({start:e.start,end:e.end})+") is still open")}function uL(t,e){let r=String(t);if(typeof e!="string")throw new TypeError("Expected character");let o=0,n=r.indexOf(e);for(;n!==-1;)o++,n=r.indexOf(e,n+e.length);return o}function fL(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Wm=function(t){if(t==null)return IFe;if(typeof t=="function")return $S(t);if(typeof t=="object")return Array.isArray(t)?yFe(t):bFe(t);if(typeof t=="string")return vFe(t);throw new Error("Expected function, string, or object as test")};function yFe(t){let e=[],r=-1;for(;++r<t.length;)e[r]=Wm(t[r]);return $S(o);function o(...n){let i=-1;for(;++i<e.length;)if(e[i].apply(this,n))return!0;return!1}}function bFe(t){let e=t;return $S(r);function r(o){let n=o,i;for(i in t)if(n[i]!==e[i])return!1;return!0}}function vFe(t){return $S(e);function e(r){return r&&r.type===t}}function $S(t){return e;function e(r,o,n){return!!(wFe(r)&&t.call(this,r,typeof o=="number"?o:void 0,n||void 0))}}function IFe(){return!0}function wFe(t){return t!==null&&typeof t=="object"&&"type"in t}var Gee=[],qee=!0,pL=!1,Wee="skip";function mL(t,e,r,o){let n;typeof e=="function"&&typeof r!="function"?(o=r,r=e):n=e;let i=Wm(n),a=o?-1:1;s(t,void 0,[])();function s(l,c,d){let u=l&&typeof l=="object"?l:{};if(typeof u.type=="string"){let m=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(l.type+(m?"<"+m+">":""))+")"})}return f;function f(){let m=Gee,h,g,_;if((!e||i(l,c,d[d.length-1]||void 0))&&(m=EFe(r(l,d)),m[0]===pL))return m;if("children"in l&&l.children){let x=l;if(x.children&&m[0]!==Wee)for(g=(o?x.children.length:-1)+a,_=d.concat(x);g>-1&&g<x.children.length;){let y=x.children[g];if(h=s(y,g,_)(),h[0]===pL)return h;g=typeof h[1]=="number"?h[1]:g+a}}return m}}}function EFe(t){return Array.isArray(t)?t:typeof t=="number"?[qee,t]:t==null?Gee:[t]}function hL(t,e,r){let n=Wm((r||{}).ignore||[]),i=SFe(e),a=-1;for(;++a<i.length;)mL(t,"text",s);function s(c,d){let u=-1,f;for(;++u<d.length;){let m=d[u],h=f?f.children:void 0;if(n(m,h?h.indexOf(m):void 0,f))return;f=m}if(f)return l(c,d)}function l(c,d){let u=d[d.length-1],f=i[a][0],m=i[a][1],h=0,_=u.children.indexOf(c),x=!1,y=[];f.lastIndex=0;let b=f.exec(c.value);for(;b;){let I=b.index,w={index:b.index,input:b.input,stack:[...d,c]},v=m(...b,w);if(typeof v=="string"&&(v=v.length>0?{type:"text",value:v}:void 0),v===!1?f.lastIndex=I+1:(h!==I&&y.push({type:"text",value:c.value.slice(h,I)}),Array.isArray(v)?y.push(...v):v&&y.push(v),h=I+b[0].length,x=!0),!f.global)break;b=f.exec(c.value)}return x?(h<c.value.length&&y.push({type:"text",value:c.value.slice(h)}),u.children.splice(_,1,...y)):y=[c],_+y.length}}function SFe(t){let e=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");let r=!t[0]||Array.isArray(t[0])?t:[t],o=-1;for(;++o<r.length;){let n=r[o];e.push([CFe(n[0]),TFe(n[1])])}return e}function CFe(t){return typeof t=="string"?new RegExp(fL(t),"g"):t}function TFe(t){return typeof t=="function"?t:function(){return t}}function _L(){return{transforms:[DFe],enter:{literalAutolink:kFe,literalAutolinkEmail:gL,literalAutolinkHttp:gL,literalAutolinkWww:gL},exit:{literalAutolink:AFe,literalAutolinkEmail:PFe,literalAutolinkHttp:NFe,literalAutolinkWww:OFe}}}function kFe(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function gL(t){this.config.enter.autolinkProtocol.call(this,t)}function NFe(t){this.config.exit.autolinkProtocol.call(this,t)}function OFe(t){this.config.exit.data.call(this,t);let e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(t)}function PFe(t){this.config.exit.autolinkEmail.call(this,t)}function AFe(t){this.exit(t)}function DFe(t){hL(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,RFe],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,MFe]],{ignore:["link","linkReference"]})}function RFe(t,e,r,o,n){let i="";if(!Kee(n)||(/^w/i.test(e)&&(r=e+r,e="",i="http://"),!LFe(r)))return!1;let a=FFe(r+o);if(!a[0])return!1;let s={type:"link",title:null,url:i+e+a[0],children:[{type:"text",value:e+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function MFe(t,e,r,o){return!Kee(o,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+r,children:[{type:"text",value:e+"@"+r}]}}function LFe(t){let e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function FFe(t){let e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let r=e[0],o=r.indexOf(")"),n=uL(t,"("),i=uL(t,")");for(;o!==-1&&n>i;)t+=r.slice(0,o+1),r=r.slice(o+1),o=r.indexOf(")"),i++;return[t,r]}function Kee(t,e){let r=t.input.charCodeAt(t.index-1);return(t.index===0||Bs(r)||af(r))&&(!e||r!==47)}WFe.peek=KFe;function xL(){return{enter:{gfmFootnoteDefinition:$Fe,gfmFootnoteDefinitionLabelString:zFe,gfmFootnoteCall:HFe,gfmFootnoteCallString:jFe},exit:{gfmFootnoteDefinition:VFe,gfmFootnoteDefinitionLabelString:UFe,gfmFootnoteCall:qFe,gfmFootnoteCallString:GFe}}}function $Fe(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function zFe(){this.buffer()}function UFe(t){let e=this.resume(),r=this.stack[this.stack.length-1];r.type,r.label=e,r.identifier=wn(this.sliceSerialize(t)).toLowerCase()}function VFe(t){this.exit(t)}function HFe(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function jFe(){this.buffer()}function GFe(t){let e=this.resume(),r=this.stack[this.stack.length-1];r.type,r.label=e,r.identifier=wn(this.sliceSerialize(t)).toLowerCase()}function qFe(t){this.exit(t)}function WFe(t,e,r,o){let n=r.createTracker(o),i=n.move("[^"),a=r.enter("footnoteReference"),s=r.enter("reference");return i+=n.move(r.safe(r.associationId(t),{...n.current(),before:i,after:"]"})),s(),a(),i+=n.move("]"),i}function KFe(){return"["}QFe.peek=ZFe;function yL(){return{canContainEols:["delete"],enter:{strikethrough:XFe},exit:{strikethrough:JFe}}}function XFe(t){this.enter({type:"delete",children:[]},t)}function JFe(t){this.exit(t)}function QFe(t,e,r,o){let n=r.createTracker(o),i=r.enter("strikethrough"),a=n.move("~~");return a+=r.containerPhrasing(t,{...n.current(),before:a,after:"~"}),a+=n.move("~~"),i(),a}function ZFe(){return"~"}function vL(){return{enter:{table:tBe,tableData:Yee,tableHeader:Yee,tableRow:oBe},exit:{codeText:nBe,table:rBe,tableData:bL,tableHeader:bL,tableRow:bL}}}function tBe(t){let e=t._align;this.enter({type:"table",align:e.map(function(r){return r==="none"?null:r}),children:[]},t),this.data.inTable=!0}function rBe(t){this.exit(t),this.data.inTable=void 0}function oBe(t){this.enter({type:"tableRow",children:[]},t)}function bL(t){this.exit(t)}function Yee(t){this.enter({type:"tableCell",children:[]},t)}function nBe(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,iBe));let r=this.stack[this.stack.length-1];r.type,r.value=e,this.exit(t)}function iBe(t,e){return e==="|"?e:t}function IL(){return{exit:{taskListCheckValueChecked:Xee,taskListCheckValueUnchecked:Xee,paragraph:sBe}}}function Xee(t){let e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function sBe(t){let e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){let r=this.stack[this.stack.length-1];r.type;let o=r.children[0];if(o&&o.type==="text"){let n=e.children,i=-1,a;for(;++i<n.length;){let s=n[i];if(s.type==="paragraph"){a=s;break}}a===r&&(o.value=o.value.slice(1),o.value.length===0?r.children.shift():r.position&&o.position&&typeof o.position.start.offset=="number"&&(o.position.start.column++,o.position.start.offset++,r.position.start=Object.assign({},o.position.start)))}}this.exit(t)}function wL(){return[_L(),xL(),yL(),vL(),IL()]}var cBe={tokenize:mBe,partial:!0},Jee={tokenize:hBe,partial:!0},Qee={tokenize:gBe,partial:!0},Zee={tokenize:_Be,partial:!0},dBe={tokenize:xBe,partial:!0},ete={tokenize:fBe,previous:rte},tte={tokenize:pBe,previous:ote},kl={tokenize:uBe,previous:nte},zs={};function SL(){return{text:zs}}var df=48;for(;df<123;)zs[df]=kl,df++,df===58?df=65:df===91&&(df=97);zs[43]=kl;zs[45]=kl;zs[46]=kl;zs[95]=kl;zs[72]=[kl,tte];zs[104]=[kl,tte];zs[87]=[kl,ete];zs[119]=[kl,ete];function uBe(t,e,r){let o=this,n,i;return a;function a(u){return!EL(u)||!nte.call(o,o.previous)||CL(o.events)?r(u):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),s(u))}function s(u){return EL(u)?(t.consume(u),s):u===64?(t.consume(u),l):r(u)}function l(u){return u===46?t.check(dBe,d,c)(u):u===45||u===95||vo(u)?(i=!0,t.consume(u),l):d(u)}function c(u){return t.consume(u),n=!0,l}function d(u){return i&&n&&bo(o.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(u)):r(u)}}function fBe(t,e,r){let o=this;return n;function n(a){return a!==87&&a!==119||!rte.call(o,o.previous)||CL(o.events)?r(a):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(cBe,t.attempt(Jee,t.attempt(Qee,i),r),r)(a))}function i(a){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(a)}}function pBe(t,e,r){let o=this,n="",i=!1;return a;function a(u){return(u===72||u===104)&&ote.call(o,o.previous)&&!CL(o.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),n+=String.fromCodePoint(u),t.consume(u),s):r(u)}function s(u){if(bo(u)&&n.length<5)return n+=String.fromCodePoint(u),t.consume(u),s;if(u===58){let f=n.toLowerCase();if(f==="http"||f==="https")return t.consume(u),l}return r(u)}function l(u){return u===47?(t.consume(u),i?c:(i=!0,l)):r(u)}function c(u){return u===null||nf(u)||wt(u)||Bs(u)||af(u)?r(u):t.attempt(Jee,t.attempt(Qee,d),r)(u)}function d(u){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(u)}}function mBe(t,e,r){let o=0;return n;function n(a){return(a===87||a===119)&&o<3?(o++,t.consume(a),n):a===46&&o===3?(t.consume(a),i):r(a)}function i(a){return a===null?r(a):e(a)}}function hBe(t,e,r){let o,n,i;return a;function a(c){return c===46||c===95?t.check(Zee,l,s)(c):c===null||wt(c)||Bs(c)||c!==45&&af(c)?l(c):(i=!0,t.consume(c),a)}function s(c){return c===95?o=!0:(n=o,o=void 0),t.consume(c),a}function l(c){return n||o||!i?r(c):e(c)}}function gBe(t,e){let r=0,o=0;return n;function n(a){return a===40?(r++,t.consume(a),n):a===41&&o<r?i(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?t.check(Zee,e,i)(a):a===null||wt(a)||Bs(a)?e(a):(t.consume(a),n)}function i(a){return a===41&&o++,t.consume(a),n}}function _Be(t,e,r){return o;function o(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(t.consume(s),o):s===38?(t.consume(s),i):s===93?(t.consume(s),n):s===60||s===null||wt(s)||Bs(s)?e(s):r(s)}function n(s){return s===null||s===40||s===91||wt(s)||Bs(s)?e(s):o(s)}function i(s){return bo(s)?a(s):r(s)}function a(s){return s===59?(t.consume(s),o):bo(s)?(t.consume(s),a):r(s)}}function xBe(t,e,r){return o;function o(i){return t.consume(i),n}function n(i){return vo(i)?r(i):e(i)}}function rte(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||wt(t)}function ote(t){return!bo(t)}function nte(t){return!(t===47||EL(t))}function EL(t){return t===43||t===45||t===46||t===95||vo(t)}function CL(t){let e=t.length,r=!1;for(;e--;){let o=t[e][1];if((o.type==="labelLink"||o.type==="labelImage")&&!o._balanced){r=!0;break}if(o._gfmAutolinkLiteralWalkedInto){r=!1;break}}return t.length>0&&!r&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}var yBe={tokenize:CBe,partial:!0};function TL(){return{document:{91:{tokenize:wBe,continuation:{tokenize:EBe},exit:SBe}},text:{91:{tokenize:IBe},93:{add:"after",tokenize:bBe,resolveTo:vBe}}}}function bBe(t,e,r){let o=this,n=o.events.length,i=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]),a;for(;n--;){let l=o.events[n][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!a||!a._balanced)return r(l);let c=wn(o.sliceSerialize({start:a.end,end:o.now()}));return c.codePointAt(0)!==94||!i.includes(c.slice(1))?r(l):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(l),t.exit("gfmFootnoteCallLabelMarker"),e(l))}}function vBe(t,e){let r=t.length,o;for(;r--;)if(t[r][1].type==="labelImage"&&t[r][0]==="enter"){o=t[r][1];break}t[r+1][1].type="data",t[r+3][1].type="gfmFootnoteCallLabelMarker";let n={type:"gfmFootnoteCall",start:Object.assign({},t[r+3][1].start),end:Object.assign({},t[t.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},t[r+3][1].end),end:Object.assign({},t[r+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},t[t.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[t[r+1],t[r+2],["enter",n,e],t[r+3],t[r+4],["enter",i,e],["exit",i,e],["enter",a,e],["enter",s,e],["exit",s,e],["exit",a,e],t[t.length-2],t[t.length-1],["exit",n,e]];return t.splice(r,t.length-r+1,...l),t}function IBe(t,e,r){let o=this,n=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]),i=0,a;return s;function s(u){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(u),t.exit("gfmFootnoteCallLabelMarker"),l}function l(u){return u!==94?r(u):(t.enter("gfmFootnoteCallMarker"),t.consume(u),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",c)}function c(u){if(i>999||u===93&&!a||u===null||u===91||wt(u))return r(u);if(u===93){t.exit("chunkString");let f=t.exit("gfmFootnoteCallString");return n.includes(wn(o.sliceSerialize(f)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(u),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):r(u)}return wt(u)||(a=!0),i++,t.consume(u),u===92?d:c}function d(u){return u===91||u===92||u===93?(t.consume(u),i++,c):c(u)}}function wBe(t,e,r){let o=this,n=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]),i,a=0,s;return l;function l(h){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(h),t.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(h){return h===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(h),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",d):r(h)}function d(h){if(a>999||h===93&&!s||h===null||h===91||wt(h))return r(h);if(h===93){t.exit("chunkString");let g=t.exit("gfmFootnoteDefinitionLabelString");return i=wn(o.sliceSerialize(g)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(h),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),f}return wt(h)||(s=!0),a++,t.consume(h),h===92?u:d}function u(h){return h===91||h===92||h===93?(t.consume(h),a++,d):d(h)}function f(h){return h===58?(t.enter("definitionMarker"),t.consume(h),t.exit("definitionMarker"),n.includes(i)||n.push(i),Xe(t,m,"gfmFootnoteDefinitionWhitespace")):r(h)}function m(h){return e(h)}}function EBe(t,e,r){return t.check($s,e,t.attempt(yBe,e,r))}function SBe(t){t.exit("gfmFootnoteDefinition")}function CBe(t,e,r){let o=this;return Xe(t,n,"gfmFootnoteDefinitionIndent",5);function n(i){let a=o.events[o.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?e(i):r(i)}}function kL(t){let r=(t||{}).singleTilde,o={tokenize:i,resolveAll:n};return r==null&&(r=!0),{text:{126:o},insideSpan:{null:[o]},attentionMarkers:{null:[126]}};function n(a,s){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let c=l;for(;c--;)if(a[c][0]==="exit"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[c][1].end.offset-a[c][1].start.offset){a[l][1].type="strikethroughSequence",a[c][1].type="strikethroughSequence";let d={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[l][1].end)},u={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[l][1].start)},f=[["enter",d,s],["enter",a[c][1],s],["exit",a[c][1],s],["enter",u,s]],m=s.parser.constructs.insideSpan.null;m&&po(f,f.length,0,Gc(m,a.slice(c+1,l),s)),po(f,f.length,0,[["exit",u,s],["enter",a[l][1],s],["exit",a[l][1],s],["exit",d,s]]),po(a,c-1,l-c+3,f),l=c+f.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function i(a,s,l){let c=this.previous,d=this.events,u=0;return f;function f(h){return c===126&&d[d.length-1][1].type!=="characterEscape"?l(h):(a.enter("strikethroughSequenceTemporary"),m(h))}function m(h){let g=Gm(c);if(h===126)return u>1?l(h):(a.consume(h),u++,m);if(u<2&&!r)return l(h);let _=a.exit("strikethroughSequenceTemporary"),x=Gm(h);return _._open=!x||x===2&&!!g,_._close=!g||g===2&&!!x,s(h)}}}var zS=class{constructor(){this.map=[]}add(e,r,o){TBe(this,e,r,o)}consume(e){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let r=this.map.length,o=[];for(;r>0;)r-=1,o.push(e.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),e.length=this.map[r][0];o.push([...e]),e.length=0;let n=o.pop();for(;n;)e.push(...n),n=o.pop();this.map.length=0}};function TBe(t,e,r,o){let n=0;if(!(r===0&&o.length===0)){for(;n<t.map.length;){if(t.map[n][0]===e){t.map[n][1]+=r,t.map[n][2].push(...o);return}n+=1}t.map.push([e,r,o])}}function ite(t,e){let r=!1,o=[];for(;e<t.length;){let n=t[e];if(r){if(n[0]==="enter")n[1].type==="tableContent"&&o.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(n[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){let i=o.length-1;o[i]=o[i]==="left"?"center":"right"}}else if(n[1].type==="tableDelimiterRow")break}else n[0]==="enter"&&n[1].type==="tableDelimiterRow"&&(r=!0);e+=1}return o}function NL(){return{flow:{null:{tokenize:kBe,resolveAll:NBe}}}}function kBe(t,e,r){let o=this,n=0,i=0,a;return s;function s(T){let A=o.events.length-1;for(;A>-1;){let R=o.events[A][1].type;if(R==="lineEnding"||R==="linePrefix")A--;else break}let B=A>-1?o.events[A][1].type:null,O=B==="tableHead"||B==="tableRow"?v:l;return O===v&&o.parser.lazy[o.now().line]?r(T):O(T)}function l(T){return t.enter("tableHead"),t.enter("tableRow"),c(T)}function c(T){return T===124||(a=!0,i+=1),d(T)}function d(T){return T===null?r(T):_e(T)?i>1?(i=0,o.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(T),t.exit("lineEnding"),m):r(T):Ze(T)?Xe(t,d,"whitespace")(T):(i+=1,a&&(a=!1,n+=1),T===124?(t.enter("tableCellDivider"),t.consume(T),t.exit("tableCellDivider"),a=!0,d):(t.enter("data"),u(T)))}function u(T){return T===null||T===124||wt(T)?(t.exit("data"),d(T)):(t.consume(T),T===92?f:u)}function f(T){return T===92||T===124?(t.consume(T),u):u(T)}function m(T){return o.interrupt=!1,o.parser.lazy[o.now().line]?r(T):(t.enter("tableDelimiterRow"),a=!1,Ze(T)?Xe(t,h,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):h(T))}function h(T){return T===45||T===58?_(T):T===124?(a=!0,t.enter("tableCellDivider"),t.consume(T),t.exit("tableCellDivider"),g):w(T)}function g(T){return Ze(T)?Xe(t,_,"whitespace")(T):_(T)}function _(T){return T===58?(i+=1,a=!0,t.enter("tableDelimiterMarker"),t.consume(T),t.exit("tableDelimiterMarker"),x):T===45?(i+=1,x(T)):T===null||_e(T)?I(T):w(T)}function x(T){return T===45?(t.enter("tableDelimiterFiller"),y(T)):w(T)}function y(T){return T===45?(t.consume(T),y):T===58?(a=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(T),t.exit("tableDelimiterMarker"),b):(t.exit("tableDelimiterFiller"),b(T))}function b(T){return Ze(T)?Xe(t,I,"whitespace")(T):I(T)}function I(T){return T===124?h(T):T===null||_e(T)?!a||n!==i?w(T):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(T)):w(T)}function w(T){return r(T)}function v(T){return t.enter("tableRow"),E(T)}function E(T){return T===124?(t.enter("tableCellDivider"),t.consume(T),t.exit("tableCellDivider"),E):T===null||_e(T)?(t.exit("tableRow"),e(T)):Ze(T)?Xe(t,E,"whitespace")(T):(t.enter("data"),C(T))}function C(T){return T===null||T===124||wt(T)?(t.exit("data"),E(T)):(t.consume(T),T===92?S:C)}function S(T){return T===92||T===124?(t.consume(T),C):C(T)}}function NBe(t,e){let r=-1,o=!0,n=0,i=[0,0,0,0],a=[0,0,0,0],s=!1,l=0,c,d,u,f=new zS;for(;++r<t.length;){let m=t[r],h=m[1];m[0]==="enter"?h.type==="tableHead"?(s=!1,l!==0&&(ate(f,e,l,c,d),d=void 0,l=0),c={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(r,0,[["enter",c,e]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(o=!0,u=void 0,i=[0,0,0,0],a=[0,r+1,0,0],s&&(s=!1,d={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(r,0,[["enter",d,e]])),n=h.type==="tableDelimiterRow"?2:d?3:1):n&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(o=!1,a[2]===0&&(i[1]!==0&&(a[0]=a[1],u=US(f,e,i,n,void 0,u),i=[0,0,0,0]),a[2]=r)):h.type==="tableCellDivider"&&(o?o=!1:(i[1]!==0&&(a[0]=a[1],u=US(f,e,i,n,void 0,u)),i=a,a=[i[1],r,0,0])):h.type==="tableHead"?(s=!0,l=r):h.type==="tableRow"||h.type==="tableDelimiterRow"?(l=r,i[1]!==0?(a[0]=a[1],u=US(f,e,i,n,r,u)):a[1]!==0&&(u=US(f,e,a,n,r,u)),n=0):n&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(a[3]=r)}for(l!==0&&ate(f,e,l,c,d),f.consume(e.events),r=-1;++r<e.events.length;){let m=e.events[r];m[0]==="enter"&&m[1].type==="table"&&(m[1]._align=ite(e.events,r))}return t}function US(t,e,r,o,n,i){let a=o===1?"tableHeader":o===2?"tableDelimiter":"tableData",s="tableContent";r[0]!==0&&(i.end=Object.assign({},Km(e.events,r[0])),t.add(r[0],0,[["exit",i,e]]));let l=Km(e.events,r[1]);if(i={type:a,start:Object.assign({},l),end:Object.assign({},l)},t.add(r[1],0,[["enter",i,e]]),r[2]!==0){let c=Km(e.events,r[2]),d=Km(e.events,r[3]),u={type:s,start:Object.assign({},c),end:Object.assign({},d)};if(t.add(r[2],0,[["enter",u,e]]),o!==2){let f=e.events[r[2]],m=e.events[r[3]];if(f[1].end=Object.assign({},m[1].end),f[1].type="chunkText",f[1].contentType="text",r[3]>r[2]+1){let h=r[2]+1,g=r[3]-r[2]-1;t.add(h,g,[])}}t.add(r[3]+1,0,[["exit",u,e]])}return n!==void 0&&(i.end=Object.assign({},Km(e.events,n)),t.add(n,0,[["exit",i,e]]),i=void 0),i}function ate(t,e,r,o,n){let i=[],a=Km(e.events,r);n&&(n.end=Object.assign({},a),i.push(["exit",n,e])),o.end=Object.assign({},a),i.push(["exit",o,e]),t.add(r+1,0,i)}function Km(t,e){let r=t[e],o=r[0]==="enter"?"start":"end";return r[1][o]}var OBe={tokenize:PBe};function OL(){return{text:{91:OBe}}}function PBe(t,e,r){let o=this;return n;function n(l){return o.previous!==null||!o._gfmTasklistFirstContentOfListItem?r(l):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),i)}function i(l){return wt(l)?(t.enter("taskListCheckValueUnchecked"),t.consume(l),t.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(t.enter("taskListCheckValueChecked"),t.consume(l),t.exit("taskListCheckValueChecked"),a):r(l)}function a(l){return l===93?(t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),s):r(l)}function s(l){return _e(l)?e(l):Ze(l)?t.check({tokenize:ABe},e,r)(l):r(l)}}function ABe(t,e,r){return Xe(t,o,"whitespace");function o(n){return n===null?r(n):e(n)}}function ste(t){return TS([SL(),TL(),kL(t),NL(),OL()])}ge();ge();var lte=["bmp","gif","ico","jpeg","jpg","png","tiff","webp"],cte=[...lte,"svg"],dte=["mp4","webm"],DBe="https://lh3.googleusercontent.com/";async function Wc(t,e){let r=window.__ROOT_CTX.rootConfig.projectId,o=await $Be(t),n=Ym(t.name),i=e?.preserveFilename?`${o}/${t.name}`:`${o}.${n}`,a=`${r}/uploads/${i}`,s=QJ(window.firebase.storage,a),l=XJ(s,t),c=-1,d=Date.now();return await new Promise((u,f)=>{let m=setInterval(()=>{Date.now()-d>1e4&&(clearInterval(m),f(new Error("Upload stalled: no progress for 10 seconds")))},1e3);l.on("state_changed",h=>{h.bytesTransferred>0&&clearInterval(m),console.log(`uploading ${t.name}: ${h.bytesTransferred} / ${h.totalBytes} bytes`),h.bytesTransferred!==c&&(c=h.bytesTransferred,d=Date.now())},h=>{clearInterval(m),f(h)},()=>{console.log(`uploaded ${a}`),clearInterval(m),u(l.snapshot)})}),RBe(s,t,n,e)}async function RBe(t,e,r,o){let n={};n.filename=e.name,n.uploadedBy=window.firebase.user.email||"unknown",n.uploadedAt=String(Math.floor(new Date().getTime()));let i=`/${t.bucket}/${t.fullPath}`,a=`https://storage.googleapis.com${i}`;if(cte.includes(r)){let l=await FBe(e);if(n.width=l.width,n.height=l.height,!o?.disableGci&&lte.includes(r)){let c=await LBe(i);c&&(n.gcsPath=i,a=c)}n.canvasBgColor=await UBe(e)?"dark":"light"}else if(dte.includes(r)){let l=await BBe(a);n.width=l.width,n.height=l.height,console.log("video dimensions:",l)}let s=o?.cacheControl||"public, max-age=31536000";return await JJ(t,{cacheControl:s,customMetadata:zBe(n)}),console.log("updated meta data: ",n),{...n,src:a}}function Ym(t){return MBe(t.split(".").at(-1)||"")}function MBe(t){let e=String(t).toLowerCase();return e==="jpeg"&&(e="jpg"),e}async function LBe(t){let e=window.__ROOT_CTX.rootConfig.gci;if(!e)return"";let r=new URLSearchParams({gcs:t}),o=`${e}/_/serving_url?${r.toString()}`,n=await window.fetch(o);if(n.status!==200){let a=await n.text();throw console.error(`failed to get gci url: ${o}`),console.error(a),new Error("failed to get gci url")}return(await n.json()).servingUrl}async function FBe(t){return new Promise((e,r)=>{let o=new FileReader;o.onload=()=>{let n=new Image;n.onload=()=>{e({width:n.width,height:n.height})},n.onerror=r,n.src=String(o.result)},o.onerror=r,o.readAsDataURL(t)})}async function BBe(t){return new Promise((e,r)=>{let o=document.createElement("video");o.addEventListener("loadedmetadata",()=>{let n={width:o.videoWidth,height:o.videoHeight};e(n),document.body.removeChild(o)},!1),o.addEventListener("error",()=>{r(new Error("Failed to load video metadata")),document.body.removeChild(o)},!1),o.className="sr-only",o.src=t,o.preload="metadata",document.body.appendChild(o)})}async function $Be(t){let e=await t.arrayBuffer(),r=await crypto.subtle.digest("SHA-1",e);return Array.from(new Uint8Array(r)).map(i=>i.toString(16).padStart(2,"0")).join("")}function zBe(t){let e={};return Object.entries(t).forEach(([r,o])=>{t[r]=String(o).trim()}),e}function PL(t){if(!t)return!1;if(VS(t)||t.startsWith("data:image/"))return!0;let e=Ym(t);return cte.includes(e)}function VS(t){return t?t.startsWith(DBe):!1}function AL(t){if(!t)return!1;let e=Ym(t);return dte.includes(e)}function ute(t){return VS(t)?t.split("=")[0]+"=s0-d":t}function UBe(t){return new Promise((e,r)=>{let o=new Image,n=new FileReader;n.onload=()=>{o.src=n.result},o.onload=()=>{let i=document.createElement("canvas"),a=i.getContext("2d");i.width=o.width,i.height=o.height,a.drawImage(o,0,0,i.width,i.height);let{data:s}=a.getImageData(0,0,i.width,i.height),l=0,c=0,d=0,u=0;for(let m=0;m<s.length;m+=4*100)l+=s[m],c+=s[m+1],d+=s[m+2],u++;let f=.299*(l/u)+.587*(c/u)+.114*(d/u);e(f<128)},o.onerror=r,n.onerror=r,n.readAsDataURL(t)})}function HS(t){let[e,r]=N(""),o=H(null),n=H(null),[i,a]=N(null),[s,l]=N(!1),c=!e;function d(x){return x.endsWith(".jpg")?"image/jpeg":"image/png"}async function u(){if(!e)return;let x=[{type:"text",text:e}];i&&x.push({type:"image",image:{src:i.src,width:i.width,height:i.height,alt:i.filename}});let y=t.chat.addMessage({sender:"user",blocks:x});r(""),a(null),f();let b=[{text:e}];i&&b.push({media:{url:i.src,contentType:d(i.filename)}});let I=await t.chat.sendPrompt(y,b,t.options);t.onData?.(I)}function f(){window.requestAnimationFrame(()=>{let x=o.current;x.style.height="auto",x.style.height=`${x.scrollHeight}px`})}function m(x){if(x.key==="Enter"&&!x.shiftKey){x.preventDefault(),u();return}}async function h(x){try{l(!0),f();let y=await Wc(x,{disableGci:!0});a({src:y.src,width:y.width,height:y.height,filename:y.filename}),l(!1)}catch{l(!1)}if(n.current){let y=n.current;y.value=""}}function g(x){let I=(x.target.files||[])[0];I&&h(I)}function _(){a(null),f()}return L(()=>{f()},[e]),p("div",{className:"AIPage__ChatBar",children:[p("div",{className:ke("AIPage__ChatBar__prompt",(s||i)&&"AIPage__ChatBar__prompt--hasImage"),children:[p("label",{className:"AIPage__ChatBar__prompt__imageUpload",children:[p("input",{className:"AIPage__ChatBar__prompt__imageUpload__input",type:"file",accept:"image/png, image/jpeg, image/webp",onChange:g,ref:n}),p(Ee,{label:"Upload image",children:p(Ke,{component:"div",className:"AIPage__ChatBar__prompt__imageUpload__icon",radius:"xl",children:p(sy,{size:18})})})]}),p("textarea",{className:"AIPage__ChatBar__prompt__textInput",ref:o,placeholder:"Enter prompt...",rows:1,onKeyDown:m,onPaste:x=>{let y=x.clipboardData?.items||[];for(let b of y)if(b.kind==="file"&&b.type.startsWith("image/")){let I=b.getAsFile();I&&h(I)}},onChange:x=>{r(x.target.value)},value:e,autofocus:!0}),(s||i)&&p("div",{className:"AIPage__ChatBar__prompt__imagePreview",children:s?p(We,{size:"sm"}):p(Ee,{label:i.filename,transition:"pop",position:"right",withArrow:!0,children:p("button",{className:"AIPage__ChatBar__prompt__imagePreview__closeButton",onClick:()=>_(),children:[p("img",{src:i.src,width:i.width,height:i.height,alt:"attachment"}),p("div",{className:"AIPage__ChatBar__prompt__imagePreview__closeButton__icon",children:p(py,{size:24,color:"white"})})]})})}),p(Ke,{className:"AIPage__ChatBar__prompt__submit",variant:"filled",color:"dark",radius:"xl",onClick:()=>u(),disabled:c,children:p(TM,{size:18})})]}),p("div",{className:"AIPage__ChatBar__disclaimer",children:"Root AI is experimental and makes mistakes. Check all info."})]})}var fte={name:"@blinkk/root-cms",version:"2.0.9",author:"s@blinkk.com",license:"MIT",engines:{node:">=16.0.0"},repository:{type:"git",url:"git+https://github.com/blinkk/rootjs.git",directory:"packages/root-cms"},files:["dist/**/*"],bin:{"root-cms":"./bin/root-cms.js"},type:"module",module:"./dist/index.js",types:"./dist/index.d.ts",exports:{".":{types:"./dist/core.d.ts",import:"./dist/core.js"},"./client":{types:"./dist/client.d.ts",import:"./dist/client.js"},"./core":{types:"./dist/core.d.ts",import:"./dist/core.js"},"./functions":{types:"./dist/functions.d.ts",import:"./dist/functions.js"},"./plugin":{types:"./dist/plugin.d.ts",import:"./dist/plugin.js"},"./project":{types:"./dist/project.d.ts",import:"./dist/project.js"},"./richtext":{types:"./dist/richtext.d.ts",import:"./dist/richtext.js"}},scripts:{build:'rm -rf dist && concurrently -n "core,signin,ui" npm:build:core npm:build:signin npm:build:ui',"build:core":"tsup-node --config=./core/tsup.config.ts","//":"NOTE: esbuild is used here because tsup doesn't currently support aliases.","build:ui":"esbuild ui/ui.tsx --bundle --minify --alias:react=@preact/compat --alias:react-dom=@preact/compat --tsconfig=ui/tsconfig.json --outdir=dist/ui","build:signin":"esbuild signin/signin.tsx --bundle --minify --tsconfig=signin/tsconfig.json --outdir=dist/ui",dev:'rm -rf dist && concurrently -k -n "core,ui" npm:dev:core npm:dev:signin npm:dev:ui',"dev:core":"pnpm build:core --watch","dev:signin":"pnpm build:signin --watch","dev:ui":"pnpm build:ui --watch",test:"pnpm build && firebase emulators:exec 'vitest run'","test:watch":"pnpm build && firebase emulators:exec 'vitest'"},dependencies:{"@genkit-ai/ai":"1.15.5","@genkit-ai/core":"1.15.5","@genkit-ai/vertexai":"1.15.5","@hello-pangea/dnd":"18.0.1","body-parser":"1.20.2",commander:"11.0.0","csv-parse":"5.5.2","csv-stringify":"6.4.4",diff:"8.0.2","dts-dom":"3.7.0","fnv-plus":"1.3.1",genkit:"1.15.5",jsonwebtoken:"9.0.2",kleur:"4.1.5",sirv:"2.0.3","tiny-glob":"0.2.9"},"//":"NOTE(stevenle): due to compat issues with mantine and preact, mantine is pinned to v4.2.12",devDependencies:{"@babel/core":"7.17.9","@blinkk/root":"workspace:*","@editorjs/editorjs":"2.30.8","@editorjs/header":"2.8.8","@editorjs/image":"2.10.2","@editorjs/list":"2.0.6","@editorjs/nested-list":"1.4.3","@editorjs/raw":"2.5.1","@editorjs/table":"2.4.4","@editorjs/underline":"1.2.1","@emotion/react":"11.10.5","@firebase/app-compat":"0.2.19","@firebase/app-types":"0.9.0","@firebase/rules-unit-testing":"3.0.1","@lexical/code":"0.33.1","@lexical/html":"0.33.1","@lexical/link":"0.33.1","@lexical/list":"0.33.1","@lexical/markdown":"0.33.1","@lexical/react":"0.33.1","@lexical/rich-text":"0.33.1","@lexical/selection":"0.33.1","@lexical/utils":"0.33.1","@mantine/core":"4.2.12","@mantine/hooks":"4.2.12","@mantine/modals":"4.2.12","@mantine/notifications":"4.2.12","@mantine/spotlight":"4.2.12","@preact/compat":"17.1.2","@tabler/icons-preact":"2.47.0","@types/body-parser":"1.19.3","@types/fnv-plus":"1.3.2","@types/gapi":"0.0.47","@types/gapi.client.drive-v3":"0.0.4","@types/gapi.client.sheets-v4":"0.0.4","@types/google.accounts":"0.0.14","@types/jsonwebtoken":"9.0.1","@types/node":"18.11.8",concurrently:"7.6.0",esbuild:"0.19.9",firebase:"10.5.2","firebase-admin":"11.11.1","firebase-functions":"4.8.0","firebase-tools":"12.9.1","highlight.js":"11.6.0","json-diff-kit":"1.0.29",lexical:"0.33.1",marked:"9.1.1","mdast-util-from-markdown":"2.0.1","mdast-util-gfm":"3.0.0","micromark-extension-gfm":"3.0.0",preact:"10.19.3","preact-render-to-string":"6.3.1","preact-router":"4.1.2",react:"npm:@preact/compat@^17.1.2","react-dom":"npm:@preact/compat@^17.1.2","react-json-view-compare":"2.0.2",tsup:"8.0.1",typescript:"5.2.2",vite:"5.0.8",vitest:"0.34.6",yjs:"13.6.27"},peerDependencies:{"@blinkk/root":"2.0.9","firebase-admin":">=11","firebase-functions":">=4",preact:">=10","preact-render-to-string":">=5"},peerDependenciesMeta:{"firebase-functions":{optional:!0}}};function pte(){return p("svg",{width:"100",height:"23",viewBox:"0 0 100 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[p("g",{"clip-path":"url(#clip0_1_318)",children:[p("path",{d:"M7.82998 5.01802C3.12925 5.6479 0.833937 18.1194 2.62578 19.6731C5.64773 22.2934 16.6441 14.1722 15.6786 9.46913C15.3009 6.61371 11.2717 4.28377 7.82998 5.01802Z",fill:"black"}),p("path",{d:"M13.9782 0.720147C12.6553 0.896474 12.0093 4.38767 12.5136 4.8226C13.364 5.55611 16.4587 3.28271 16.187 1.96616C16.0807 1.16683 14.9468 0.514607 13.9782 0.720147Z",fill:"black"}),p("path",{d:"M92.7383 17.6275C90.9681 17.6275 89.3816 17.0263 88.3796 16.0744C87.9955 15.7237 87.8953 15.3396 88.246 14.9555L88.8305 14.2541C89.1645 13.87 89.5486 13.7865 89.9327 14.1205C90.6007 14.6883 91.7029 15.1726 92.5713 15.1726C93.5232 15.1726 94.1244 14.8219 94.1244 14.2875C94.1244 13.5193 93.2059 13.4358 91.9868 13.0684C90.417 12.6008 88.5132 11.7324 88.5132 9.64493C88.5132 7.70773 90.25 6.37173 92.7383 6.37173C94.2413 6.37173 95.5272 6.87273 96.4123 7.57413C96.8131 7.90813 96.9467 8.27553 96.596 8.67633L96.0282 9.37773C95.7109 9.76183 95.3435 9.82863 94.926 9.51133C94.3916 9.09383 93.6568 8.69303 92.7884 8.69303C92.0202 8.69303 91.5192 9.01033 91.5192 9.51133C91.5192 10.1292 92.3041 10.4131 93.1224 10.6636C94.9761 11.2314 97.1304 11.8326 97.1304 14.2708C97.1304 16.4585 95.1264 17.6275 92.7383 17.6275Z",fill:"black"}),p("path",{d:"M87.0008 16.6756C87.0843 17.1766 86.8171 17.4271 86.2994 17.4271H85.097C84.596 17.4271 84.3789 17.1766 84.3121 16.6756L83.7443 11.9161L81.757 16.7424C81.5399 17.2434 81.1892 17.5106 80.6882 17.5106H80.5212C80.0202 17.5106 79.6695 17.2434 79.4524 16.7424L77.4651 11.8994L76.8973 16.6756C76.8472 17.1766 76.6301 17.4271 76.1291 17.4271H74.7263C74.2086 17.4271 73.9414 17.1766 74.0082 16.6756L75.4945 7.24013C75.5613 6.75583 75.8786 6.48863 76.3796 6.48863H76.5466C77.0476 6.48863 77.3315 6.75583 77.5486 7.24013L80.6047 13.8032L83.4938 7.24013C83.7109 6.75583 84.0115 6.48863 84.4958 6.48863H84.6795C85.1638 6.48863 85.4811 6.75583 85.5646 7.24013L87.0008 16.6756Z",fill:"black"}),p("path",{d:"M68.6496 17.6275C65.3096 17.6275 62.7211 15.2227 62.7211 11.9996C62.7211 8.77653 65.3096 6.37173 68.683 6.37173C70.3029 6.37173 71.7558 6.97293 72.7745 7.99163C73.1419 8.34233 73.1419 8.77653 72.7745 9.09383L71.9228 9.81193C71.5554 10.1292 71.2047 10.1125 70.8206 9.79523C70.2361 9.31093 69.5013 9.01033 68.683 9.01033C67.013 9.01033 65.7104 10.2628 65.7104 11.9996C65.7104 13.7364 67.013 14.9889 68.683 14.9889C69.5013 14.9889 70.2528 14.6883 70.8206 14.204C71.2047 13.8867 71.5554 13.87 71.9228 14.1873L72.7745 14.9054C73.1419 15.2227 73.1419 15.6569 72.7745 16.0076C71.7558 17.0263 70.3029 17.6275 68.6496 17.6275Z",fill:"black"}),p("path",{d:"M58.575 16.2915C58.7587 16.6923 58.4581 16.8927 58.241 17.0597C57.7233 17.4271 56.9384 17.6442 56.1201 17.6442C54.4501 17.6442 52.8469 16.6923 52.8469 14.4044V11.0978H52.1121C51.6111 11.0978 51.3439 10.8139 51.3439 10.3296V9.76183C51.3439 9.26083 51.6111 8.99363 52.1121 8.99363H52.8469V7.05643C52.8469 6.57213 53.1308 6.38843 53.6151 6.28823L54.9511 6.05443C55.4521 5.95423 55.7193 6.30493 55.7193 6.80593V8.99363H57.3726C57.8569 8.99363 58.1408 9.26083 58.1408 9.76183V10.3296C58.1408 10.8139 57.8569 11.0978 57.3726 11.0978H55.7193V14.1038C55.7193 14.9221 56.1368 15.1893 56.6545 15.1893C56.905 15.1893 57.1555 15.0724 57.3392 14.9555C57.7567 14.6883 57.9571 14.8887 58.1074 15.206L58.575 16.2915Z",fill:"black"}),p("path",{d:"M46.2592 17.6442C43.5538 17.6442 41.5999 15.7738 41.5999 13.2521C41.5999 10.7304 43.5538 8.86003 46.2592 8.86003C48.9646 8.86003 50.9185 10.7304 50.9185 13.2521C50.9185 15.7738 48.9646 17.6442 46.2592 17.6442ZM46.2592 15.1726C47.3113 15.1726 48.0628 14.3543 48.0628 13.2521C48.0628 12.1499 47.3113 11.3316 46.2592 11.3316C45.2071 11.3316 44.4389 12.1499 44.4389 13.2521C44.4389 14.3543 45.2071 15.1726 46.2592 15.1726Z",fill:"black"}),p("path",{d:"M36.052 17.6442C33.3466 17.6442 31.3927 15.7738 31.3927 13.2521C31.3927 10.7304 33.3466 8.86003 36.052 8.86003C38.7574 8.86003 40.7113 10.7304 40.7113 13.2521C40.7113 15.7738 38.7574 17.6442 36.052 17.6442ZM36.052 15.1726C37.1041 15.1726 37.8556 14.3543 37.8556 13.2521C37.8556 12.1499 37.1041 11.3316 36.052 11.3316C34.9999 11.3316 34.2317 12.1499 34.2317 13.2521C34.2317 14.3543 34.9999 15.1726 36.052 15.1726Z",fill:"black"}),p("path",{d:"M28.7099 13.0851L30.6805 16.6422C30.9644 17.1599 30.6638 17.4271 30.1628 17.4271H28.4594C27.9417 17.4271 27.8081 17.1766 27.5242 16.6589L25.7707 13.4859H24.6351V16.6422C24.6351 17.1432 24.3512 17.4271 23.8502 17.4271H22.4808C21.9798 17.4271 21.6959 17.1432 21.6959 16.6422V7.35703C21.6959 6.85603 21.9798 6.57213 22.4808 6.57213H26.5222C29.3111 6.57213 30.8141 7.92483 30.8141 10.1125C30.8141 11.5654 29.9791 12.5841 28.7099 13.0851ZM24.6351 8.96023V11.5153H26.4721C27.2236 11.5153 27.8248 11.0644 27.8248 10.2628C27.8248 9.44453 27.2236 8.96023 26.4721 8.96023H24.6351Z",fill:"black"})]}),p("defs",{children:p("clipPath",{id:"clip0_1_318",children:p("rect",{width:"99",height:"22",fill:"white",transform:"translate(0.0175781 0.177246)"})})})]})}var Nl="1.5";function Oe(t){return p("div",{className:"Layout",children:[p(Oe.Top,{}),p(Oe.Side,{}),p(Oe.Main,{...t,children:t.children}),p(Oe.Bottom,{})]})}Oe.Top=()=>{let t=window.__ROOT_CTX.rootConfig.projectName||window.__ROOT_CTX.rootConfig.projectId;return p("div",{className:"Layout__top",children:[p("a",{className:"Layout__top__logo",href:"/cms",children:p(pte,{})}),p("div",{className:"Layout__top__version",children:["v",fte.version]}),p("div",{className:"Layout__top__project",children:t})]})};Oe.Side=()=>{let[t]=rQ(),e=t.url.replace(/\/*$/g,""),r=window.firebase.user,o=window.__ROOT_CTX.sidebar?.tools,n=window.__ROOT_CTX.experiments||{};return p("div",{className:"Layout__side",children:[p("div",{className:"Layout__side__buttons",children:[p(Oe.SideButton,{label:"Home",url:"/cms",active:e==="/cms",children:p(gM,{stroke:Nl})}),p(Oe.SideButton,{label:"Content",url:"/cms/content",active:e.startsWith("/cms/content"),children:p(Ju,{stroke:Nl})}),p(Oe.SideButton,{label:"Releases",url:"/cms/releases",active:e.startsWith("/cms/releases"),children:p(zm,{stroke:Nl})}),p(Oe.SideButton,{label:"Data",url:"/cms/data",active:e.startsWith("/cms/data"),children:p(nM,{stroke:Nl})}),p(Oe.SideButton,{label:"Assets",url:"/cms/assets",active:e.startsWith("/cms/assets"),children:p(pS,{stroke:Nl})}),p(Oe.SideButton,{label:"Translations",url:"/cms/translations",active:e.startsWith("/cms/translations"),children:p(Vc,{stroke:Nl})}),n.ai&&p(Oe.SideButton,{label:"Root AI (experimental)",url:"/cms/ai",active:e.startsWith("/cms/ai"),children:p(Zu,{stroke:Nl})}),o&&p(we,{children:[p("div",{className:"Layout__side__divider"}),Object.entries(o).map(([i,a])=>p(Oe.SideButton,{className:"Layout__side__tool",label:a.label||"",url:`/cms/tools/${i}`,active:e.startsWith(`/cms/tools/${i}`),children:a.icon?p("img",{className:"Layout__side__tool__icon",src:a.icon,alt:a.label||""}):p(QR,{stroke:Nl})})),p("div",{className:"Layout__side__divider"})]}),p(Oe.SideButton,{label:"Settings",url:"/cms/settings",active:e.startsWith("/cms/settings"),children:p(ef,{stroke:Nl})})]}),p("div",{className:"Layout__side__user",children:p(Ee,{label:r.email,position:"right",withArrow:!0,children:p(da,{src:r.photoURL,alt:r.email,size:30,radius:"xl"})})})]})};Oe.SideButton=t=>p(Ee,{className:ke("Layout__side__button",t.className),label:t.label,position:"right",withArrow:!0,children:p("a",{className:ke(t.active&&"active"),href:t.url,children:t.children})});Oe.Main=t=>p("div",{className:"Layout__main",children:t.children});Oe.Bottom=()=>p("div",{className:"Layout__bottom"});function Ya(t){t||(t=6);let e=[],r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",o=r.length;for(let n=0;n<t;n++)e.push(r.charAt(Math.floor(Math.random()*o)));return e.join("")}function mte(t,e){return Math.random()*(e-t)+t}var HBe=[20,40];qM.configure({ignoreUnescapedHTML:!0});function hte(){return mte(...HBe)}function wy(){let[t,e]=N([]),[r,o]=N(""),n=s=>{let l=0;return e(c=>{let d={sender:"bot",blocks:[{type:"pending"}],key:Ya()},u=[...c,{...s,key:Ya()},d];return l=u.length-1,u}),l},i=(s,l)=>{e(c=>{let d=[...c];return d[s]={...l,key:Ya()},d})};return{chatId:r,messages:t,addMessage:n,updateMessage:i,sendPrompt:async(s,l,c)=>{let d="/cms/api/ai.chat";typeof window.__ROOT_CTX.experiments?.ai=="object"&&window.__ROOT_CTX.experiments.ai.endpoint&&(d=window.__ROOT_CTX.experiments.ai.endpoint);let u={prompt:l,chatId:r,options:c},f=await window.fetch(d,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(u)});if(f.status!==200){let h=await f.text();console.error("chat failed",h);let g=["Something went wrong:","```",h,"```"].join(`
44
+ `;break}case-2:{a=e?" ":" ";break}case-1:{if(!e&&n)continue;a=" ";break}default:a=String.fromCharCode(i)}n=i===-2,o.push(a)}return o.join("")}var iL={};Xt(iL,{attentionMarkers:()=>pFe,contentInitial:()=>sFe,disable:()=>mFe,document:()=>aFe,flow:()=>cFe,flowInitial:()=>lFe,insideSpan:()=>fFe,string:()=>dFe,text:()=>uFe});var aFe={42:En,43:En,45:En,48:En,49:En,50:En,51:En,52:En,53:En,54:En,55:En,56:En,57:En,62:NS},sFe={91:JM},lFe={[-2]:by,[-1]:by,32:by},cFe={35:ZM,42:cf,45:[BS,cf],60:tL,61:BS,95:cf,96:AS,126:AS},dFe={38:PS,92:OS},uFe={[-5]:Iy,[-4]:Iy,[-3]:Iy,33:oL,38:PS,42:yy,60:[KM,rL],91:nL,92:[QM,OS],93:lf,95:yy,96:YM},fFe={null:[yy,Aee]},pFe={null:[42,95]},mFe={null:[]};function aL(t){let r=TS([iL,...(t||{}).extensions||[]]),o={defined:[],lazy:{},constructs:r,content:n(See),document:n(Tee),flow:n(Pee),string:n(Dee),text:n(Ree)};return o;function n(i){return a;function a(s){return Fee(o,i,s)}}}function sL(t){for(;!RS(t););return t}var Bee=/[\0\t\n\r]/g;function lL(){let t=1,e="",r=!0,o;return n;function n(i,a,s){let l=[],c,d,u,f,m;for(i=e+(typeof i=="string"?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,e="",r&&(i.charCodeAt(0)===65279&&u++,r=void 0);u<i.length;){if(Bee.lastIndex=u,c=Bee.exec(i),f=c&&c.index!==void 0?c.index:i.length,m=i.charCodeAt(f),!c){e=i.slice(u);break}if(m===10&&u===f&&o)l.push(-3),o=void 0;else switch(o&&(l.push(-5),o=void 0),u<f&&(l.push(i.slice(u,f)),t+=f-u),m){case 0:{l.push(65533),t++;break}case 9:{for(d=Math.ceil(t/4)*4,l.push(-2);t++<d;)l.push(-1);break}case 10:{l.push(-4),t=1;break}default:o=!0,t=1}u=f+1}return s&&(o&&l.push(-5),e&&l.push(e),l.push(null)),l}}var hFe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function $ee(t){return t.replace(hFe,gFe)}function gFe(t,e,r){if(e)return e;if(r.charCodeAt(0)===35){let n=r.charCodeAt(1),i=n===120||n===88;return kS(r.slice(i?2:1),i?16:10)}return jm(r)||t}function qm(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?zee(t.position):"start"in t||"end"in t?zee(t):"line"in t||"column"in t?cL(t):""}function cL(t){return Uee(t&&t.line)+":"+Uee(t&&t.column)}function zee(t){return cL(t&&t.start)+"-"+cL(t&&t.end)}function Uee(t){return t&&typeof t=="number"?t:1}var Hee={}.hasOwnProperty;function dL(t,e,r){return typeof e!="string"&&(r=e,e=void 0),_Fe(r)(sL(aL(r).document().write(lL()(t,e,!0))))}function _Fe(t){let e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(Vt),autolinkProtocol:S,autolinkEmail:S,atxHeading:i(To),blockQuote:i(it),characterEscape:S,characterReference:S,codeFenced:i(Ut),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(Ut,a),codeText:i(at,a),codeTextData:S,data:S,codeFlowValue:S,definition:i(ht),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(bt),hardBreakEscape:i(Rt),hardBreakTrailing:i(Rt),htmlFlow:i(me,a),htmlFlowData:S,htmlText:i(me,a),htmlTextData:S,image:i(kn),label:a,link:i(Vt),listItem:i(go),listItemValue:f,listOrdered:i(ct,u),listUnordered:i(ct),paragraph:i(ro),reference:M,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(To),strong:i(Wo),thematicBreak:i(Z)},exit:{atxHeading:l(),atxHeadingSequence:w,autolink:l(),autolinkEmail:ve,autolinkProtocol:Ne,blockQuote:l(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:Te,characterReferenceMarkerNumeric:Te,characterReferenceValue:ze,characterReference:nt,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:T,codeIndented:l(x),codeText:l(D),codeTextData:T,data:T,definition:l(),definitionDestinationString:I,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(B),hardBreakTrailing:l(B),htmlFlow:l(O),htmlFlowData:T,htmlText:l(R),htmlTextData:T,image:l($),label:G,labelText:V,lineEnding:A,link:l(F),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ce,resourceDestinationString:P,resourceTitleString:Q,resource:ne,setextHeading:l(C),setextHeadingLineSequence:E,setextHeadingText:v,strong:l(),thematicBreak:l()}};jee(e,(t||{}).mdastExtensions||[]);let r={};return o;function o(z){let W={type:"root",children:[]},se={stack:[W],tokenStack:[],config:e,enter:s,exit:c,buffer:a,resume:d,data:r},Ve=[],_t=-1;for(;++_t<z.length;)if(z[_t][1].type==="listOrdered"||z[_t][1].type==="listUnordered")if(z[_t][0]==="enter")Ve.push(_t);else{let Pt=Ve.pop();_t=n(z,Pt,_t)}for(_t=-1;++_t<z.length;){let Pt=e[z[_t][0]];Hee.call(Pt,z[_t][1].type)&&Pt[z[_t][1].type].call(Object.assign({sliceSerialize:z[_t][2].sliceSerialize},se),z[_t][1])}if(se.tokenStack.length>0){let Pt=se.tokenStack[se.tokenStack.length-1];(Pt[1]||Vee).call(se,void 0,Pt[0])}for(W.position={start:qc(z.length>0?z[0][1].start:{line:1,column:1,offset:0}),end:qc(z.length>0?z[z.length-2][1].end:{line:1,column:1,offset:0})},_t=-1;++_t<e.transforms.length;)W=e.transforms[_t](W)||W;return W}function n(z,W,se){let Ve=W-1,_t=-1,Pt=!1,ri,Gr,Rr,Ji;for(;++Ve<=se;){let Ko=z[Ve];switch(Ko[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ko[0]==="enter"?_t++:_t--,Ji=void 0;break}case"lineEndingBlank":{Ko[0]==="enter"&&(ri&&!Ji&&!_t&&!Rr&&(Rr=Ve),Ji=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ji=void 0}if(!_t&&Ko[0]==="enter"&&Ko[1].type==="listItemPrefix"||_t===-1&&Ko[0]==="exit"&&(Ko[1].type==="listUnordered"||Ko[1].type==="listOrdered")){if(ri){let Nn=Ve;for(Gr=void 0;Nn--;){let On=z[Nn];if(On[1].type==="lineEnding"||On[1].type==="lineEndingBlank"){if(On[0]==="exit")continue;Gr&&(z[Gr][1].type="lineEndingBlank",Pt=!0),On[1].type="lineEnding",Gr=Nn}else if(!(On[1].type==="linePrefix"||On[1].type==="blockQuotePrefix"||On[1].type==="blockQuotePrefixWhitespace"||On[1].type==="blockQuoteMarker"||On[1].type==="listItemIndent"))break}Rr&&(!Gr||Rr<Gr)&&(ri._spread=!0),ri.end=Object.assign({},Gr?z[Gr][1].start:Ko[1].end),z.splice(Gr||Ve,0,["exit",ri,Ko[2]]),Ve++,se++}if(Ko[1].type==="listItemPrefix"){let Nn={type:"listItem",_spread:!1,start:Object.assign({},Ko[1].start),end:void 0};ri=Nn,z.splice(Ve,0,["enter",Nn,Ko[2]]),Ve++,se++,Rr=void 0,Ji=!0}}}return z[W][1]._spread=Pt,se}function i(z,W){return se;function se(Ve){s.call(this,z(Ve),Ve),W&&W.call(this,Ve)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(z,W,se){this.stack[this.stack.length-1].children.push(z),this.stack.push(z),this.tokenStack.push([W,se]),z.position={start:qc(W.start),end:void 0}}function l(z){return W;function W(se){z&&z.call(this,se),c.call(this,se)}}function c(z,W){let se=this.stack.pop(),Ve=this.tokenStack.pop();if(Ve)Ve[0].type!==z.type&&(W?W.call(this,z,Ve[0]):(Ve[1]||Vee).call(this,z,Ve[0]));else throw new Error("Cannot close `"+z.type+"` ("+qm({start:z.start,end:z.end})+"): it\u2019s not open");se.position.end=qc(z.end)}function d(){return WM(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function f(z){if(this.data.expectingFirstListItemValue){let W=this.stack[this.stack.length-2];W.start=Number.parseInt(this.sliceSerialize(z),10),this.data.expectingFirstListItemValue=void 0}}function m(){let z=this.resume(),W=this.stack[this.stack.length-1];W.lang=z}function h(){let z=this.resume(),W=this.stack[this.stack.length-1];W.meta=z}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){let z=this.resume(),W=this.stack[this.stack.length-1];W.value=z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){let z=this.resume(),W=this.stack[this.stack.length-1];W.value=z.replace(/(\r?\n|\r)$/g,"")}function y(z){let W=this.resume(),se=this.stack[this.stack.length-1];se.label=W,se.identifier=wn(this.sliceSerialize(z)).toLowerCase()}function b(){let z=this.resume(),W=this.stack[this.stack.length-1];W.title=z}function I(){let z=this.resume(),W=this.stack[this.stack.length-1];W.url=z}function w(z){let W=this.stack[this.stack.length-1];if(!W.depth){let se=this.sliceSerialize(z).length;W.depth=se}}function v(){this.data.setextHeadingSlurpLineEnding=!0}function E(z){let W=this.stack[this.stack.length-1];W.depth=this.sliceSerialize(z).codePointAt(0)===61?1:2}function C(){this.data.setextHeadingSlurpLineEnding=void 0}function S(z){let se=this.stack[this.stack.length-1].children,Ve=se[se.length-1];(!Ve||Ve.type!=="text")&&(Ve=Le(),Ve.position={start:qc(z.start),end:void 0},se.push(Ve)),this.stack.push(Ve)}function T(z){let W=this.stack.pop();W.value+=this.sliceSerialize(z),W.position.end=qc(z.end)}function A(z){let W=this.stack[this.stack.length-1];if(this.data.atHardBreak){let se=W.children[W.children.length-1];se.position.end=qc(z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(W.type)&&(S.call(this,z),T.call(this,z))}function B(){this.data.atHardBreak=!0}function O(){let z=this.resume(),W=this.stack[this.stack.length-1];W.value=z}function R(){let z=this.resume(),W=this.stack[this.stack.length-1];W.value=z}function D(){let z=this.resume(),W=this.stack[this.stack.length-1];W.value=z}function F(){let z=this.stack[this.stack.length-1];if(this.data.inReference){let W=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=W,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function $(){let z=this.stack[this.stack.length-1];if(this.data.inReference){let W=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=W,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function V(z){let W=this.sliceSerialize(z),se=this.stack[this.stack.length-2];se.label=$ee(W),se.identifier=wn(W).toLowerCase()}function G(){let z=this.stack[this.stack.length-1],W=this.resume(),se=this.stack[this.stack.length-1];if(this.data.inReference=!0,se.type==="link"){let Ve=z.children;se.children=Ve}else se.alt=W}function P(){let z=this.resume(),W=this.stack[this.stack.length-1];W.url=z}function Q(){let z=this.resume(),W=this.stack[this.stack.length-1];W.title=z}function ne(){this.data.inReference=void 0}function M(){this.data.referenceType="collapsed"}function ce(z){let W=this.resume(),se=this.stack[this.stack.length-1];se.label=W,se.identifier=wn(this.sliceSerialize(z)).toLowerCase(),this.data.referenceType="full"}function Te(z){this.data.characterReferenceType=z.type}function ze(z){let W=this.sliceSerialize(z),se=this.data.characterReferenceType,Ve;se?(Ve=kS(W,se==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ve=jm(W);let _t=this.stack[this.stack.length-1];_t.value+=Ve}function nt(z){let W=this.stack.pop();W.position.end=qc(z.end)}function Ne(z){T.call(this,z);let W=this.stack[this.stack.length-1];W.url=this.sliceSerialize(z)}function ve(z){T.call(this,z);let W=this.stack[this.stack.length-1];W.url="mailto:"+this.sliceSerialize(z)}function it(){return{type:"blockquote",children:[]}}function Ut(){return{type:"code",lang:null,meta:null,value:""}}function at(){return{type:"inlineCode",value:""}}function ht(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function bt(){return{type:"emphasis",children:[]}}function To(){return{type:"heading",depth:0,children:[]}}function Rt(){return{type:"break"}}function me(){return{type:"html",value:""}}function kn(){return{type:"image",title:null,url:"",alt:null}}function Vt(){return{type:"link",title:null,url:"",children:[]}}function ct(z){return{type:"list",ordered:z.type==="listOrdered",start:null,spread:z._spread,children:[]}}function go(z){return{type:"listItem",spread:z._spread,checked:null,children:[]}}function ro(){return{type:"paragraph",children:[]}}function Wo(){return{type:"strong",children:[]}}function Le(){return{type:"text",value:""}}function Z(){return{type:"thematicBreak"}}}function qc(t){return{line:t.line,column:t.column,offset:t.offset}}function jee(t,e){let r=-1;for(;++r<e.length;){let o=e[r];Array.isArray(o)?jee(t,o):xFe(t,o)}}function xFe(t,e){let r;for(r in e)if(Hee.call(e,r))switch(r){case"canContainEols":{let o=e[r];o&&t[r].push(...o);break}case"transforms":{let o=e[r];o&&t[r].push(...o);break}case"enter":case"exit":{let o=e[r];o&&Object.assign(t[r],o);break}}}function Vee(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+qm({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+qm({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+qm({start:e.start,end:e.end})+") is still open")}function uL(t,e){let r=String(t);if(typeof e!="string")throw new TypeError("Expected character");let o=0,n=r.indexOf(e);for(;n!==-1;)o++,n=r.indexOf(e,n+e.length);return o}function fL(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Wm=function(t){if(t==null)return IFe;if(typeof t=="function")return $S(t);if(typeof t=="object")return Array.isArray(t)?yFe(t):bFe(t);if(typeof t=="string")return vFe(t);throw new Error("Expected function, string, or object as test")};function yFe(t){let e=[],r=-1;for(;++r<t.length;)e[r]=Wm(t[r]);return $S(o);function o(...n){let i=-1;for(;++i<e.length;)if(e[i].apply(this,n))return!0;return!1}}function bFe(t){let e=t;return $S(r);function r(o){let n=o,i;for(i in t)if(n[i]!==e[i])return!1;return!0}}function vFe(t){return $S(e);function e(r){return r&&r.type===t}}function $S(t){return e;function e(r,o,n){return!!(wFe(r)&&t.call(this,r,typeof o=="number"?o:void 0,n||void 0))}}function IFe(){return!0}function wFe(t){return t!==null&&typeof t=="object"&&"type"in t}var Gee=[],qee=!0,pL=!1,Wee="skip";function mL(t,e,r,o){let n;typeof e=="function"&&typeof r!="function"?(o=r,r=e):n=e;let i=Wm(n),a=o?-1:1;s(t,void 0,[])();function s(l,c,d){let u=l&&typeof l=="object"?l:{};if(typeof u.type=="string"){let m=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(l.type+(m?"<"+m+">":""))+")"})}return f;function f(){let m=Gee,h,g,_;if((!e||i(l,c,d[d.length-1]||void 0))&&(m=EFe(r(l,d)),m[0]===pL))return m;if("children"in l&&l.children){let x=l;if(x.children&&m[0]!==Wee)for(g=(o?x.children.length:-1)+a,_=d.concat(x);g>-1&&g<x.children.length;){let y=x.children[g];if(h=s(y,g,_)(),h[0]===pL)return h;g=typeof h[1]=="number"?h[1]:g+a}}return m}}}function EFe(t){return Array.isArray(t)?t:typeof t=="number"?[qee,t]:t==null?Gee:[t]}function hL(t,e,r){let n=Wm((r||{}).ignore||[]),i=SFe(e),a=-1;for(;++a<i.length;)mL(t,"text",s);function s(c,d){let u=-1,f;for(;++u<d.length;){let m=d[u],h=f?f.children:void 0;if(n(m,h?h.indexOf(m):void 0,f))return;f=m}if(f)return l(c,d)}function l(c,d){let u=d[d.length-1],f=i[a][0],m=i[a][1],h=0,_=u.children.indexOf(c),x=!1,y=[];f.lastIndex=0;let b=f.exec(c.value);for(;b;){let I=b.index,w={index:b.index,input:b.input,stack:[...d,c]},v=m(...b,w);if(typeof v=="string"&&(v=v.length>0?{type:"text",value:v}:void 0),v===!1?f.lastIndex=I+1:(h!==I&&y.push({type:"text",value:c.value.slice(h,I)}),Array.isArray(v)?y.push(...v):v&&y.push(v),h=I+b[0].length,x=!0),!f.global)break;b=f.exec(c.value)}return x?(h<c.value.length&&y.push({type:"text",value:c.value.slice(h)}),u.children.splice(_,1,...y)):y=[c],_+y.length}}function SFe(t){let e=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");let r=!t[0]||Array.isArray(t[0])?t:[t],o=-1;for(;++o<r.length;){let n=r[o];e.push([CFe(n[0]),TFe(n[1])])}return e}function CFe(t){return typeof t=="string"?new RegExp(fL(t),"g"):t}function TFe(t){return typeof t=="function"?t:function(){return t}}function _L(){return{transforms:[DFe],enter:{literalAutolink:kFe,literalAutolinkEmail:gL,literalAutolinkHttp:gL,literalAutolinkWww:gL},exit:{literalAutolink:AFe,literalAutolinkEmail:PFe,literalAutolinkHttp:NFe,literalAutolinkWww:OFe}}}function kFe(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function gL(t){this.config.enter.autolinkProtocol.call(this,t)}function NFe(t){this.config.exit.autolinkProtocol.call(this,t)}function OFe(t){this.config.exit.data.call(this,t);let e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(t)}function PFe(t){this.config.exit.autolinkEmail.call(this,t)}function AFe(t){this.exit(t)}function DFe(t){hL(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,RFe],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,MFe]],{ignore:["link","linkReference"]})}function RFe(t,e,r,o,n){let i="";if(!Kee(n)||(/^w/i.test(e)&&(r=e+r,e="",i="http://"),!LFe(r)))return!1;let a=FFe(r+o);if(!a[0])return!1;let s={type:"link",title:null,url:i+e+a[0],children:[{type:"text",value:e+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function MFe(t,e,r,o){return!Kee(o,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+r,children:[{type:"text",value:e+"@"+r}]}}function LFe(t){let e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function FFe(t){let e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let r=e[0],o=r.indexOf(")"),n=uL(t,"("),i=uL(t,")");for(;o!==-1&&n>i;)t+=r.slice(0,o+1),r=r.slice(o+1),o=r.indexOf(")"),i++;return[t,r]}function Kee(t,e){let r=t.input.charCodeAt(t.index-1);return(t.index===0||Bs(r)||af(r))&&(!e||r!==47)}WFe.peek=KFe;function xL(){return{enter:{gfmFootnoteDefinition:$Fe,gfmFootnoteDefinitionLabelString:zFe,gfmFootnoteCall:HFe,gfmFootnoteCallString:jFe},exit:{gfmFootnoteDefinition:VFe,gfmFootnoteDefinitionLabelString:UFe,gfmFootnoteCall:qFe,gfmFootnoteCallString:GFe}}}function $Fe(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function zFe(){this.buffer()}function UFe(t){let e=this.resume(),r=this.stack[this.stack.length-1];r.type,r.label=e,r.identifier=wn(this.sliceSerialize(t)).toLowerCase()}function VFe(t){this.exit(t)}function HFe(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function jFe(){this.buffer()}function GFe(t){let e=this.resume(),r=this.stack[this.stack.length-1];r.type,r.label=e,r.identifier=wn(this.sliceSerialize(t)).toLowerCase()}function qFe(t){this.exit(t)}function WFe(t,e,r,o){let n=r.createTracker(o),i=n.move("[^"),a=r.enter("footnoteReference"),s=r.enter("reference");return i+=n.move(r.safe(r.associationId(t),{...n.current(),before:i,after:"]"})),s(),a(),i+=n.move("]"),i}function KFe(){return"["}QFe.peek=ZFe;function yL(){return{canContainEols:["delete"],enter:{strikethrough:XFe},exit:{strikethrough:JFe}}}function XFe(t){this.enter({type:"delete",children:[]},t)}function JFe(t){this.exit(t)}function QFe(t,e,r,o){let n=r.createTracker(o),i=r.enter("strikethrough"),a=n.move("~~");return a+=r.containerPhrasing(t,{...n.current(),before:a,after:"~"}),a+=n.move("~~"),i(),a}function ZFe(){return"~"}function vL(){return{enter:{table:tBe,tableData:Yee,tableHeader:Yee,tableRow:oBe},exit:{codeText:nBe,table:rBe,tableData:bL,tableHeader:bL,tableRow:bL}}}function tBe(t){let e=t._align;this.enter({type:"table",align:e.map(function(r){return r==="none"?null:r}),children:[]},t),this.data.inTable=!0}function rBe(t){this.exit(t),this.data.inTable=void 0}function oBe(t){this.enter({type:"tableRow",children:[]},t)}function bL(t){this.exit(t)}function Yee(t){this.enter({type:"tableCell",children:[]},t)}function nBe(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,iBe));let r=this.stack[this.stack.length-1];r.type,r.value=e,this.exit(t)}function iBe(t,e){return e==="|"?e:t}function IL(){return{exit:{taskListCheckValueChecked:Xee,taskListCheckValueUnchecked:Xee,paragraph:sBe}}}function Xee(t){let e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function sBe(t){let e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){let r=this.stack[this.stack.length-1];r.type;let o=r.children[0];if(o&&o.type==="text"){let n=e.children,i=-1,a;for(;++i<n.length;){let s=n[i];if(s.type==="paragraph"){a=s;break}}a===r&&(o.value=o.value.slice(1),o.value.length===0?r.children.shift():r.position&&o.position&&typeof o.position.start.offset=="number"&&(o.position.start.column++,o.position.start.offset++,r.position.start=Object.assign({},o.position.start)))}}this.exit(t)}function wL(){return[_L(),xL(),yL(),vL(),IL()]}var cBe={tokenize:mBe,partial:!0},Jee={tokenize:hBe,partial:!0},Qee={tokenize:gBe,partial:!0},Zee={tokenize:_Be,partial:!0},dBe={tokenize:xBe,partial:!0},ete={tokenize:fBe,previous:rte},tte={tokenize:pBe,previous:ote},kl={tokenize:uBe,previous:nte},zs={};function SL(){return{text:zs}}var df=48;for(;df<123;)zs[df]=kl,df++,df===58?df=65:df===91&&(df=97);zs[43]=kl;zs[45]=kl;zs[46]=kl;zs[95]=kl;zs[72]=[kl,tte];zs[104]=[kl,tte];zs[87]=[kl,ete];zs[119]=[kl,ete];function uBe(t,e,r){let o=this,n,i;return a;function a(u){return!EL(u)||!nte.call(o,o.previous)||CL(o.events)?r(u):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),s(u))}function s(u){return EL(u)?(t.consume(u),s):u===64?(t.consume(u),l):r(u)}function l(u){return u===46?t.check(dBe,d,c)(u):u===45||u===95||vo(u)?(i=!0,t.consume(u),l):d(u)}function c(u){return t.consume(u),n=!0,l}function d(u){return i&&n&&bo(o.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(u)):r(u)}}function fBe(t,e,r){let o=this;return n;function n(a){return a!==87&&a!==119||!rte.call(o,o.previous)||CL(o.events)?r(a):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(cBe,t.attempt(Jee,t.attempt(Qee,i),r),r)(a))}function i(a){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(a)}}function pBe(t,e,r){let o=this,n="",i=!1;return a;function a(u){return(u===72||u===104)&&ote.call(o,o.previous)&&!CL(o.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),n+=String.fromCodePoint(u),t.consume(u),s):r(u)}function s(u){if(bo(u)&&n.length<5)return n+=String.fromCodePoint(u),t.consume(u),s;if(u===58){let f=n.toLowerCase();if(f==="http"||f==="https")return t.consume(u),l}return r(u)}function l(u){return u===47?(t.consume(u),i?c:(i=!0,l)):r(u)}function c(u){return u===null||nf(u)||wt(u)||Bs(u)||af(u)?r(u):t.attempt(Jee,t.attempt(Qee,d),r)(u)}function d(u){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(u)}}function mBe(t,e,r){let o=0;return n;function n(a){return(a===87||a===119)&&o<3?(o++,t.consume(a),n):a===46&&o===3?(t.consume(a),i):r(a)}function i(a){return a===null?r(a):e(a)}}function hBe(t,e,r){let o,n,i;return a;function a(c){return c===46||c===95?t.check(Zee,l,s)(c):c===null||wt(c)||Bs(c)||c!==45&&af(c)?l(c):(i=!0,t.consume(c),a)}function s(c){return c===95?o=!0:(n=o,o=void 0),t.consume(c),a}function l(c){return n||o||!i?r(c):e(c)}}function gBe(t,e){let r=0,o=0;return n;function n(a){return a===40?(r++,t.consume(a),n):a===41&&o<r?i(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?t.check(Zee,e,i)(a):a===null||wt(a)||Bs(a)?e(a):(t.consume(a),n)}function i(a){return a===41&&o++,t.consume(a),n}}function _Be(t,e,r){return o;function o(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(t.consume(s),o):s===38?(t.consume(s),i):s===93?(t.consume(s),n):s===60||s===null||wt(s)||Bs(s)?e(s):r(s)}function n(s){return s===null||s===40||s===91||wt(s)||Bs(s)?e(s):o(s)}function i(s){return bo(s)?a(s):r(s)}function a(s){return s===59?(t.consume(s),o):bo(s)?(t.consume(s),a):r(s)}}function xBe(t,e,r){return o;function o(i){return t.consume(i),n}function n(i){return vo(i)?r(i):e(i)}}function rte(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||wt(t)}function ote(t){return!bo(t)}function nte(t){return!(t===47||EL(t))}function EL(t){return t===43||t===45||t===46||t===95||vo(t)}function CL(t){let e=t.length,r=!1;for(;e--;){let o=t[e][1];if((o.type==="labelLink"||o.type==="labelImage")&&!o._balanced){r=!0;break}if(o._gfmAutolinkLiteralWalkedInto){r=!1;break}}return t.length>0&&!r&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}var yBe={tokenize:CBe,partial:!0};function TL(){return{document:{91:{tokenize:wBe,continuation:{tokenize:EBe},exit:SBe}},text:{91:{tokenize:IBe},93:{add:"after",tokenize:bBe,resolveTo:vBe}}}}function bBe(t,e,r){let o=this,n=o.events.length,i=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]),a;for(;n--;){let l=o.events[n][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!a||!a._balanced)return r(l);let c=wn(o.sliceSerialize({start:a.end,end:o.now()}));return c.codePointAt(0)!==94||!i.includes(c.slice(1))?r(l):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(l),t.exit("gfmFootnoteCallLabelMarker"),e(l))}}function vBe(t,e){let r=t.length,o;for(;r--;)if(t[r][1].type==="labelImage"&&t[r][0]==="enter"){o=t[r][1];break}t[r+1][1].type="data",t[r+3][1].type="gfmFootnoteCallLabelMarker";let n={type:"gfmFootnoteCall",start:Object.assign({},t[r+3][1].start),end:Object.assign({},t[t.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},t[r+3][1].end),end:Object.assign({},t[r+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},t[t.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[t[r+1],t[r+2],["enter",n,e],t[r+3],t[r+4],["enter",i,e],["exit",i,e],["enter",a,e],["enter",s,e],["exit",s,e],["exit",a,e],t[t.length-2],t[t.length-1],["exit",n,e]];return t.splice(r,t.length-r+1,...l),t}function IBe(t,e,r){let o=this,n=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]),i=0,a;return s;function s(u){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(u),t.exit("gfmFootnoteCallLabelMarker"),l}function l(u){return u!==94?r(u):(t.enter("gfmFootnoteCallMarker"),t.consume(u),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",c)}function c(u){if(i>999||u===93&&!a||u===null||u===91||wt(u))return r(u);if(u===93){t.exit("chunkString");let f=t.exit("gfmFootnoteCallString");return n.includes(wn(o.sliceSerialize(f)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(u),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):r(u)}return wt(u)||(a=!0),i++,t.consume(u),u===92?d:c}function d(u){return u===91||u===92||u===93?(t.consume(u),i++,c):c(u)}}function wBe(t,e,r){let o=this,n=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]),i,a=0,s;return l;function l(h){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(h),t.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(h){return h===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(h),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",d):r(h)}function d(h){if(a>999||h===93&&!s||h===null||h===91||wt(h))return r(h);if(h===93){t.exit("chunkString");let g=t.exit("gfmFootnoteDefinitionLabelString");return i=wn(o.sliceSerialize(g)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(h),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),f}return wt(h)||(s=!0),a++,t.consume(h),h===92?u:d}function u(h){return h===91||h===92||h===93?(t.consume(h),a++,d):d(h)}function f(h){return h===58?(t.enter("definitionMarker"),t.consume(h),t.exit("definitionMarker"),n.includes(i)||n.push(i),Xe(t,m,"gfmFootnoteDefinitionWhitespace")):r(h)}function m(h){return e(h)}}function EBe(t,e,r){return t.check($s,e,t.attempt(yBe,e,r))}function SBe(t){t.exit("gfmFootnoteDefinition")}function CBe(t,e,r){let o=this;return Xe(t,n,"gfmFootnoteDefinitionIndent",5);function n(i){let a=o.events[o.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?e(i):r(i)}}function kL(t){let r=(t||{}).singleTilde,o={tokenize:i,resolveAll:n};return r==null&&(r=!0),{text:{126:o},insideSpan:{null:[o]},attentionMarkers:{null:[126]}};function n(a,s){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let c=l;for(;c--;)if(a[c][0]==="exit"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[c][1].end.offset-a[c][1].start.offset){a[l][1].type="strikethroughSequence",a[c][1].type="strikethroughSequence";let d={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[l][1].end)},u={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[l][1].start)},f=[["enter",d,s],["enter",a[c][1],s],["exit",a[c][1],s],["enter",u,s]],m=s.parser.constructs.insideSpan.null;m&&po(f,f.length,0,Gc(m,a.slice(c+1,l),s)),po(f,f.length,0,[["exit",u,s],["enter",a[l][1],s],["exit",a[l][1],s],["exit",d,s]]),po(a,c-1,l-c+3,f),l=c+f.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function i(a,s,l){let c=this.previous,d=this.events,u=0;return f;function f(h){return c===126&&d[d.length-1][1].type!=="characterEscape"?l(h):(a.enter("strikethroughSequenceTemporary"),m(h))}function m(h){let g=Gm(c);if(h===126)return u>1?l(h):(a.consume(h),u++,m);if(u<2&&!r)return l(h);let _=a.exit("strikethroughSequenceTemporary"),x=Gm(h);return _._open=!x||x===2&&!!g,_._close=!g||g===2&&!!x,s(h)}}}var zS=class{constructor(){this.map=[]}add(e,r,o){TBe(this,e,r,o)}consume(e){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let r=this.map.length,o=[];for(;r>0;)r-=1,o.push(e.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),e.length=this.map[r][0];o.push([...e]),e.length=0;let n=o.pop();for(;n;)e.push(...n),n=o.pop();this.map.length=0}};function TBe(t,e,r,o){let n=0;if(!(r===0&&o.length===0)){for(;n<t.map.length;){if(t.map[n][0]===e){t.map[n][1]+=r,t.map[n][2].push(...o);return}n+=1}t.map.push([e,r,o])}}function ite(t,e){let r=!1,o=[];for(;e<t.length;){let n=t[e];if(r){if(n[0]==="enter")n[1].type==="tableContent"&&o.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(n[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){let i=o.length-1;o[i]=o[i]==="left"?"center":"right"}}else if(n[1].type==="tableDelimiterRow")break}else n[0]==="enter"&&n[1].type==="tableDelimiterRow"&&(r=!0);e+=1}return o}function NL(){return{flow:{null:{tokenize:kBe,resolveAll:NBe}}}}function kBe(t,e,r){let o=this,n=0,i=0,a;return s;function s(T){let A=o.events.length-1;for(;A>-1;){let R=o.events[A][1].type;if(R==="lineEnding"||R==="linePrefix")A--;else break}let B=A>-1?o.events[A][1].type:null,O=B==="tableHead"||B==="tableRow"?v:l;return O===v&&o.parser.lazy[o.now().line]?r(T):O(T)}function l(T){return t.enter("tableHead"),t.enter("tableRow"),c(T)}function c(T){return T===124||(a=!0,i+=1),d(T)}function d(T){return T===null?r(T):_e(T)?i>1?(i=0,o.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(T),t.exit("lineEnding"),m):r(T):Ze(T)?Xe(t,d,"whitespace")(T):(i+=1,a&&(a=!1,n+=1),T===124?(t.enter("tableCellDivider"),t.consume(T),t.exit("tableCellDivider"),a=!0,d):(t.enter("data"),u(T)))}function u(T){return T===null||T===124||wt(T)?(t.exit("data"),d(T)):(t.consume(T),T===92?f:u)}function f(T){return T===92||T===124?(t.consume(T),u):u(T)}function m(T){return o.interrupt=!1,o.parser.lazy[o.now().line]?r(T):(t.enter("tableDelimiterRow"),a=!1,Ze(T)?Xe(t,h,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):h(T))}function h(T){return T===45||T===58?_(T):T===124?(a=!0,t.enter("tableCellDivider"),t.consume(T),t.exit("tableCellDivider"),g):w(T)}function g(T){return Ze(T)?Xe(t,_,"whitespace")(T):_(T)}function _(T){return T===58?(i+=1,a=!0,t.enter("tableDelimiterMarker"),t.consume(T),t.exit("tableDelimiterMarker"),x):T===45?(i+=1,x(T)):T===null||_e(T)?I(T):w(T)}function x(T){return T===45?(t.enter("tableDelimiterFiller"),y(T)):w(T)}function y(T){return T===45?(t.consume(T),y):T===58?(a=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(T),t.exit("tableDelimiterMarker"),b):(t.exit("tableDelimiterFiller"),b(T))}function b(T){return Ze(T)?Xe(t,I,"whitespace")(T):I(T)}function I(T){return T===124?h(T):T===null||_e(T)?!a||n!==i?w(T):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(T)):w(T)}function w(T){return r(T)}function v(T){return t.enter("tableRow"),E(T)}function E(T){return T===124?(t.enter("tableCellDivider"),t.consume(T),t.exit("tableCellDivider"),E):T===null||_e(T)?(t.exit("tableRow"),e(T)):Ze(T)?Xe(t,E,"whitespace")(T):(t.enter("data"),C(T))}function C(T){return T===null||T===124||wt(T)?(t.exit("data"),E(T)):(t.consume(T),T===92?S:C)}function S(T){return T===92||T===124?(t.consume(T),C):C(T)}}function NBe(t,e){let r=-1,o=!0,n=0,i=[0,0,0,0],a=[0,0,0,0],s=!1,l=0,c,d,u,f=new zS;for(;++r<t.length;){let m=t[r],h=m[1];m[0]==="enter"?h.type==="tableHead"?(s=!1,l!==0&&(ate(f,e,l,c,d),d=void 0,l=0),c={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(r,0,[["enter",c,e]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(o=!0,u=void 0,i=[0,0,0,0],a=[0,r+1,0,0],s&&(s=!1,d={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(r,0,[["enter",d,e]])),n=h.type==="tableDelimiterRow"?2:d?3:1):n&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(o=!1,a[2]===0&&(i[1]!==0&&(a[0]=a[1],u=US(f,e,i,n,void 0,u),i=[0,0,0,0]),a[2]=r)):h.type==="tableCellDivider"&&(o?o=!1:(i[1]!==0&&(a[0]=a[1],u=US(f,e,i,n,void 0,u)),i=a,a=[i[1],r,0,0])):h.type==="tableHead"?(s=!0,l=r):h.type==="tableRow"||h.type==="tableDelimiterRow"?(l=r,i[1]!==0?(a[0]=a[1],u=US(f,e,i,n,r,u)):a[1]!==0&&(u=US(f,e,a,n,r,u)),n=0):n&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(a[3]=r)}for(l!==0&&ate(f,e,l,c,d),f.consume(e.events),r=-1;++r<e.events.length;){let m=e.events[r];m[0]==="enter"&&m[1].type==="table"&&(m[1]._align=ite(e.events,r))}return t}function US(t,e,r,o,n,i){let a=o===1?"tableHeader":o===2?"tableDelimiter":"tableData",s="tableContent";r[0]!==0&&(i.end=Object.assign({},Km(e.events,r[0])),t.add(r[0],0,[["exit",i,e]]));let l=Km(e.events,r[1]);if(i={type:a,start:Object.assign({},l),end:Object.assign({},l)},t.add(r[1],0,[["enter",i,e]]),r[2]!==0){let c=Km(e.events,r[2]),d=Km(e.events,r[3]),u={type:s,start:Object.assign({},c),end:Object.assign({},d)};if(t.add(r[2],0,[["enter",u,e]]),o!==2){let f=e.events[r[2]],m=e.events[r[3]];if(f[1].end=Object.assign({},m[1].end),f[1].type="chunkText",f[1].contentType="text",r[3]>r[2]+1){let h=r[2]+1,g=r[3]-r[2]-1;t.add(h,g,[])}}t.add(r[3]+1,0,[["exit",u,e]])}return n!==void 0&&(i.end=Object.assign({},Km(e.events,n)),t.add(n,0,[["exit",i,e]]),i=void 0),i}function ate(t,e,r,o,n){let i=[],a=Km(e.events,r);n&&(n.end=Object.assign({},a),i.push(["exit",n,e])),o.end=Object.assign({},a),i.push(["exit",o,e]),t.add(r+1,0,i)}function Km(t,e){let r=t[e],o=r[0]==="enter"?"start":"end";return r[1][o]}var OBe={tokenize:PBe};function OL(){return{text:{91:OBe}}}function PBe(t,e,r){let o=this;return n;function n(l){return o.previous!==null||!o._gfmTasklistFirstContentOfListItem?r(l):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),i)}function i(l){return wt(l)?(t.enter("taskListCheckValueUnchecked"),t.consume(l),t.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(t.enter("taskListCheckValueChecked"),t.consume(l),t.exit("taskListCheckValueChecked"),a):r(l)}function a(l){return l===93?(t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),s):r(l)}function s(l){return _e(l)?e(l):Ze(l)?t.check({tokenize:ABe},e,r)(l):r(l)}}function ABe(t,e,r){return Xe(t,o,"whitespace");function o(n){return n===null?r(n):e(n)}}function ste(t){return TS([SL(),TL(),kL(t),NL(),OL()])}ge();ge();var lte=["bmp","gif","ico","jpeg","jpg","png","tiff","webp"],cte=[...lte,"svg"],dte=["mp4","webm"],DBe="https://lh3.googleusercontent.com/";async function Wc(t,e){let r=window.__ROOT_CTX.rootConfig.projectId,o=await $Be(t),n=Ym(t.name),i=e?.preserveFilename?`${o}/${t.name}`:`${o}.${n}`,a=`${r}/uploads/${i}`,s=QJ(window.firebase.storage,a),l=XJ(s,t),c=-1,d=Date.now();return await new Promise((u,f)=>{let m=setInterval(()=>{Date.now()-d>1e4&&(clearInterval(m),f(new Error("Upload stalled: no progress for 10 seconds")))},1e3);l.on("state_changed",h=>{h.bytesTransferred>0&&clearInterval(m),console.log(`uploading ${t.name}: ${h.bytesTransferred} / ${h.totalBytes} bytes`),h.bytesTransferred!==c&&(c=h.bytesTransferred,d=Date.now())},h=>{clearInterval(m),f(h)},()=>{console.log(`uploaded ${a}`),clearInterval(m),u(l.snapshot)})}),RBe(s,t,n,e)}async function RBe(t,e,r,o){let n={};n.filename=e.name,n.uploadedBy=window.firebase.user.email||"unknown",n.uploadedAt=String(Math.floor(new Date().getTime()));let i=`/${t.bucket}/${t.fullPath}`,a=`https://storage.googleapis.com${i}`;if(cte.includes(r)){let l=await FBe(e);if(n.width=l.width,n.height=l.height,!o?.disableGci&&lte.includes(r)){let c=await LBe(i);c&&(n.gcsPath=i,a=c)}n.canvasBgColor=await UBe(e)?"dark":"light"}else if(dte.includes(r)){let l=await BBe(a);n.width=l.width,n.height=l.height,console.log("video dimensions:",l)}let s=o?.cacheControl||"public, max-age=31536000";return await JJ(t,{cacheControl:s,customMetadata:zBe(n)}),console.log("updated meta data: ",n),{...n,src:a}}function Ym(t){return MBe(t.split(".").at(-1)||"")}function MBe(t){let e=String(t).toLowerCase();return e==="jpeg"&&(e="jpg"),e}async function LBe(t){let e=window.__ROOT_CTX.rootConfig.gci;if(!e)return"";let r=new URLSearchParams({gcs:t}),o=`${e}/_/serving_url?${r.toString()}`,n=await window.fetch(o);if(n.status!==200){let a=await n.text();throw console.error(`failed to get gci url: ${o}`),console.error(a),new Error("failed to get gci url")}return(await n.json()).servingUrl}async function FBe(t){return new Promise((e,r)=>{let o=new FileReader;o.onload=()=>{let n=new Image;n.onload=()=>{e({width:n.width,height:n.height})},n.onerror=r,n.src=String(o.result)},o.onerror=r,o.readAsDataURL(t)})}async function BBe(t){return new Promise((e,r)=>{let o=document.createElement("video");o.addEventListener("loadedmetadata",()=>{let n={width:o.videoWidth,height:o.videoHeight};e(n),document.body.removeChild(o)},!1),o.addEventListener("error",()=>{r(new Error("Failed to load video metadata")),document.body.removeChild(o)},!1),o.className="sr-only",o.src=t,o.preload="metadata",document.body.appendChild(o)})}async function $Be(t){let e=await t.arrayBuffer(),r=await crypto.subtle.digest("SHA-1",e);return Array.from(new Uint8Array(r)).map(i=>i.toString(16).padStart(2,"0")).join("")}function zBe(t){let e={};return Object.entries(t).forEach(([r,o])=>{t[r]=String(o).trim()}),e}function PL(t){if(!t)return!1;if(VS(t)||t.startsWith("data:image/"))return!0;let e=Ym(t);return cte.includes(e)}function VS(t){return t?t.startsWith(DBe):!1}function AL(t){if(!t)return!1;let e=Ym(t);return dte.includes(e)}function ute(t){return VS(t)?t.split("=")[0]+"=s0-d":t}function UBe(t){return new Promise((e,r)=>{let o=new Image,n=new FileReader;n.onload=()=>{o.src=n.result},o.onload=()=>{let i=document.createElement("canvas"),a=i.getContext("2d");i.width=o.width,i.height=o.height,a.drawImage(o,0,0,i.width,i.height);let{data:s}=a.getImageData(0,0,i.width,i.height),l=0,c=0,d=0,u=0;for(let m=0;m<s.length;m+=4*100)l+=s[m],c+=s[m+1],d+=s[m+2],u++;let f=.299*(l/u)+.587*(c/u)+.114*(d/u);e(f<128)},o.onerror=r,n.onerror=r,n.readAsDataURL(t)})}function HS(t){let[e,r]=N(""),o=H(null),n=H(null),[i,a]=N(null),[s,l]=N(!1),c=!e;function d(x){return x.endsWith(".jpg")?"image/jpeg":"image/png"}async function u(){if(!e)return;let x=[{type:"text",text:e}];i&&x.push({type:"image",image:{src:i.src,width:i.width,height:i.height,alt:i.filename}});let y=t.chat.addMessage({sender:"user",blocks:x});r(""),a(null),f();let b=[{text:e}];i&&b.push({media:{url:i.src,contentType:d(i.filename)}});let I=await t.chat.sendPrompt(y,b,t.options);t.onData?.(I)}function f(){window.requestAnimationFrame(()=>{let x=o.current;x.style.height="auto",x.style.height=`${x.scrollHeight}px`})}function m(x){if(x.key==="Enter"&&!x.shiftKey){x.preventDefault(),u();return}}async function h(x){try{l(!0),f();let y=await Wc(x,{disableGci:!0});a({src:y.src,width:y.width,height:y.height,filename:y.filename}),l(!1)}catch{l(!1)}if(n.current){let y=n.current;y.value=""}}function g(x){let I=(x.target.files||[])[0];I&&h(I)}function _(){a(null),f()}return L(()=>{f()},[e]),p("div",{className:"AIPage__ChatBar",children:[p("div",{className:ke("AIPage__ChatBar__prompt",(s||i)&&"AIPage__ChatBar__prompt--hasImage"),children:[p("label",{className:"AIPage__ChatBar__prompt__imageUpload",children:[p("input",{className:"AIPage__ChatBar__prompt__imageUpload__input",type:"file",accept:"image/png, image/jpeg, image/webp",onChange:g,ref:n}),p(Ee,{label:"Upload image",children:p(Ke,{component:"div",className:"AIPage__ChatBar__prompt__imageUpload__icon",radius:"xl",children:p(sy,{size:18})})})]}),p("textarea",{className:"AIPage__ChatBar__prompt__textInput",ref:o,placeholder:"Enter prompt...",rows:1,onKeyDown:m,onPaste:x=>{let y=x.clipboardData?.items||[];for(let b of y)if(b.kind==="file"&&b.type.startsWith("image/")){let I=b.getAsFile();I&&h(I)}},onChange:x=>{r(x.target.value)},value:e,autofocus:!0}),(s||i)&&p("div",{className:"AIPage__ChatBar__prompt__imagePreview",children:s?p(We,{size:"sm"}):p(Ee,{label:i.filename,transition:"pop",position:"right",withArrow:!0,children:p("button",{className:"AIPage__ChatBar__prompt__imagePreview__closeButton",onClick:()=>_(),children:[p("img",{src:i.src,width:i.width,height:i.height,alt:"attachment"}),p("div",{className:"AIPage__ChatBar__prompt__imagePreview__closeButton__icon",children:p(py,{size:24,color:"white"})})]})})}),p(Ke,{className:"AIPage__ChatBar__prompt__submit",variant:"filled",color:"dark",radius:"xl",onClick:()=>u(),disabled:c,children:p(TM,{size:18})})]}),p("div",{className:"AIPage__ChatBar__disclaimer",children:"Root AI is experimental and makes mistakes. Check all info."})]})}var fte={name:"@blinkk/root-cms",version:"2.0.10",author:"s@blinkk.com",license:"MIT",engines:{node:">=16.0.0"},repository:{type:"git",url:"git+https://github.com/blinkk/rootjs.git",directory:"packages/root-cms"},files:["dist/**/*"],bin:{"root-cms":"./bin/root-cms.js"},type:"module",module:"./dist/index.js",types:"./dist/index.d.ts",exports:{".":{types:"./dist/core.d.ts",import:"./dist/core.js"},"./client":{types:"./dist/client.d.ts",import:"./dist/client.js"},"./core":{types:"./dist/core.d.ts",import:"./dist/core.js"},"./functions":{types:"./dist/functions.d.ts",import:"./dist/functions.js"},"./plugin":{types:"./dist/plugin.d.ts",import:"./dist/plugin.js"},"./project":{types:"./dist/project.d.ts",import:"./dist/project.js"},"./richtext":{types:"./dist/richtext.d.ts",import:"./dist/richtext.js"}},scripts:{build:'rm -rf dist && concurrently -n "core,signin,ui" npm:build:core npm:build:signin npm:build:ui',"build:core":"tsup-node --config=./core/tsup.config.ts","//":"NOTE: esbuild is used here because tsup doesn't currently support aliases.","build:ui":"esbuild ui/ui.tsx --bundle --minify --alias:react=@preact/compat --alias:react-dom=@preact/compat --tsconfig=ui/tsconfig.json --outdir=dist/ui","build:signin":"esbuild signin/signin.tsx --bundle --minify --tsconfig=signin/tsconfig.json --outdir=dist/ui",dev:'rm -rf dist && concurrently -k -n "core,ui" npm:dev:core npm:dev:signin npm:dev:ui',"dev:core":"pnpm build:core --watch","dev:signin":"pnpm build:signin --watch","dev:ui":"pnpm build:ui --watch",test:"pnpm build && firebase emulators:exec 'vitest run'","test:watch":"pnpm build && firebase emulators:exec 'vitest'"},dependencies:{"@genkit-ai/ai":"1.15.5","@genkit-ai/core":"1.15.5","@genkit-ai/vertexai":"1.15.5","@hello-pangea/dnd":"18.0.1","body-parser":"1.20.2",commander:"11.0.0","csv-parse":"5.5.2","csv-stringify":"6.4.4",diff:"8.0.2","dts-dom":"3.7.0","fnv-plus":"1.3.1",genkit:"1.15.5",jsonwebtoken:"9.0.2",kleur:"4.1.5",sirv:"2.0.3","tiny-glob":"0.2.9"},"//":"NOTE(stevenle): due to compat issues with mantine and preact, mantine is pinned to v4.2.12",devDependencies:{"@babel/core":"7.17.9","@blinkk/root":"workspace:*","@editorjs/editorjs":"2.30.8","@editorjs/header":"2.8.8","@editorjs/image":"2.10.2","@editorjs/list":"2.0.6","@editorjs/nested-list":"1.4.3","@editorjs/raw":"2.5.1","@editorjs/table":"2.4.4","@editorjs/underline":"1.2.1","@emotion/react":"11.10.5","@firebase/app-compat":"0.2.19","@firebase/app-types":"0.9.0","@firebase/rules-unit-testing":"3.0.1","@lexical/code":"0.33.1","@lexical/html":"0.33.1","@lexical/link":"0.33.1","@lexical/list":"0.33.1","@lexical/markdown":"0.33.1","@lexical/react":"0.33.1","@lexical/rich-text":"0.33.1","@lexical/selection":"0.33.1","@lexical/utils":"0.33.1","@mantine/core":"4.2.12","@mantine/hooks":"4.2.12","@mantine/modals":"4.2.12","@mantine/notifications":"4.2.12","@mantine/spotlight":"4.2.12","@preact/compat":"17.1.2","@tabler/icons-preact":"2.47.0","@types/body-parser":"1.19.3","@types/fnv-plus":"1.3.2","@types/gapi":"0.0.47","@types/gapi.client.drive-v3":"0.0.4","@types/gapi.client.sheets-v4":"0.0.4","@types/google.accounts":"0.0.14","@types/jsonwebtoken":"9.0.1","@types/node":"18.11.8",concurrently:"7.6.0",esbuild:"0.19.9",firebase:"10.5.2","firebase-admin":"11.11.1","firebase-functions":"4.8.0","firebase-tools":"12.9.1","highlight.js":"11.6.0","json-diff-kit":"1.0.29",lexical:"0.33.1",marked:"9.1.1","mdast-util-from-markdown":"2.0.1","mdast-util-gfm":"3.0.0","micromark-extension-gfm":"3.0.0",preact:"10.19.3","preact-render-to-string":"6.3.1","preact-router":"4.1.2",react:"npm:@preact/compat@^17.1.2","react-dom":"npm:@preact/compat@^17.1.2","react-json-view-compare":"2.0.2",tsup:"8.0.1",typescript:"5.2.2",vite:"5.0.8",vitest:"0.34.6",yjs:"13.6.27"},peerDependencies:{"@blinkk/root":"2.0.10","firebase-admin":">=11","firebase-functions":">=4",preact:">=10","preact-render-to-string":">=5"},peerDependenciesMeta:{"firebase-functions":{optional:!0}}};function pte(){return p("svg",{width:"100",height:"23",viewBox:"0 0 100 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[p("g",{"clip-path":"url(#clip0_1_318)",children:[p("path",{d:"M7.82998 5.01802C3.12925 5.6479 0.833937 18.1194 2.62578 19.6731C5.64773 22.2934 16.6441 14.1722 15.6786 9.46913C15.3009 6.61371 11.2717 4.28377 7.82998 5.01802Z",fill:"black"}),p("path",{d:"M13.9782 0.720147C12.6553 0.896474 12.0093 4.38767 12.5136 4.8226C13.364 5.55611 16.4587 3.28271 16.187 1.96616C16.0807 1.16683 14.9468 0.514607 13.9782 0.720147Z",fill:"black"}),p("path",{d:"M92.7383 17.6275C90.9681 17.6275 89.3816 17.0263 88.3796 16.0744C87.9955 15.7237 87.8953 15.3396 88.246 14.9555L88.8305 14.2541C89.1645 13.87 89.5486 13.7865 89.9327 14.1205C90.6007 14.6883 91.7029 15.1726 92.5713 15.1726C93.5232 15.1726 94.1244 14.8219 94.1244 14.2875C94.1244 13.5193 93.2059 13.4358 91.9868 13.0684C90.417 12.6008 88.5132 11.7324 88.5132 9.64493C88.5132 7.70773 90.25 6.37173 92.7383 6.37173C94.2413 6.37173 95.5272 6.87273 96.4123 7.57413C96.8131 7.90813 96.9467 8.27553 96.596 8.67633L96.0282 9.37773C95.7109 9.76183 95.3435 9.82863 94.926 9.51133C94.3916 9.09383 93.6568 8.69303 92.7884 8.69303C92.0202 8.69303 91.5192 9.01033 91.5192 9.51133C91.5192 10.1292 92.3041 10.4131 93.1224 10.6636C94.9761 11.2314 97.1304 11.8326 97.1304 14.2708C97.1304 16.4585 95.1264 17.6275 92.7383 17.6275Z",fill:"black"}),p("path",{d:"M87.0008 16.6756C87.0843 17.1766 86.8171 17.4271 86.2994 17.4271H85.097C84.596 17.4271 84.3789 17.1766 84.3121 16.6756L83.7443 11.9161L81.757 16.7424C81.5399 17.2434 81.1892 17.5106 80.6882 17.5106H80.5212C80.0202 17.5106 79.6695 17.2434 79.4524 16.7424L77.4651 11.8994L76.8973 16.6756C76.8472 17.1766 76.6301 17.4271 76.1291 17.4271H74.7263C74.2086 17.4271 73.9414 17.1766 74.0082 16.6756L75.4945 7.24013C75.5613 6.75583 75.8786 6.48863 76.3796 6.48863H76.5466C77.0476 6.48863 77.3315 6.75583 77.5486 7.24013L80.6047 13.8032L83.4938 7.24013C83.7109 6.75583 84.0115 6.48863 84.4958 6.48863H84.6795C85.1638 6.48863 85.4811 6.75583 85.5646 7.24013L87.0008 16.6756Z",fill:"black"}),p("path",{d:"M68.6496 17.6275C65.3096 17.6275 62.7211 15.2227 62.7211 11.9996C62.7211 8.77653 65.3096 6.37173 68.683 6.37173C70.3029 6.37173 71.7558 6.97293 72.7745 7.99163C73.1419 8.34233 73.1419 8.77653 72.7745 9.09383L71.9228 9.81193C71.5554 10.1292 71.2047 10.1125 70.8206 9.79523C70.2361 9.31093 69.5013 9.01033 68.683 9.01033C67.013 9.01033 65.7104 10.2628 65.7104 11.9996C65.7104 13.7364 67.013 14.9889 68.683 14.9889C69.5013 14.9889 70.2528 14.6883 70.8206 14.204C71.2047 13.8867 71.5554 13.87 71.9228 14.1873L72.7745 14.9054C73.1419 15.2227 73.1419 15.6569 72.7745 16.0076C71.7558 17.0263 70.3029 17.6275 68.6496 17.6275Z",fill:"black"}),p("path",{d:"M58.575 16.2915C58.7587 16.6923 58.4581 16.8927 58.241 17.0597C57.7233 17.4271 56.9384 17.6442 56.1201 17.6442C54.4501 17.6442 52.8469 16.6923 52.8469 14.4044V11.0978H52.1121C51.6111 11.0978 51.3439 10.8139 51.3439 10.3296V9.76183C51.3439 9.26083 51.6111 8.99363 52.1121 8.99363H52.8469V7.05643C52.8469 6.57213 53.1308 6.38843 53.6151 6.28823L54.9511 6.05443C55.4521 5.95423 55.7193 6.30493 55.7193 6.80593V8.99363H57.3726C57.8569 8.99363 58.1408 9.26083 58.1408 9.76183V10.3296C58.1408 10.8139 57.8569 11.0978 57.3726 11.0978H55.7193V14.1038C55.7193 14.9221 56.1368 15.1893 56.6545 15.1893C56.905 15.1893 57.1555 15.0724 57.3392 14.9555C57.7567 14.6883 57.9571 14.8887 58.1074 15.206L58.575 16.2915Z",fill:"black"}),p("path",{d:"M46.2592 17.6442C43.5538 17.6442 41.5999 15.7738 41.5999 13.2521C41.5999 10.7304 43.5538 8.86003 46.2592 8.86003C48.9646 8.86003 50.9185 10.7304 50.9185 13.2521C50.9185 15.7738 48.9646 17.6442 46.2592 17.6442ZM46.2592 15.1726C47.3113 15.1726 48.0628 14.3543 48.0628 13.2521C48.0628 12.1499 47.3113 11.3316 46.2592 11.3316C45.2071 11.3316 44.4389 12.1499 44.4389 13.2521C44.4389 14.3543 45.2071 15.1726 46.2592 15.1726Z",fill:"black"}),p("path",{d:"M36.052 17.6442C33.3466 17.6442 31.3927 15.7738 31.3927 13.2521C31.3927 10.7304 33.3466 8.86003 36.052 8.86003C38.7574 8.86003 40.7113 10.7304 40.7113 13.2521C40.7113 15.7738 38.7574 17.6442 36.052 17.6442ZM36.052 15.1726C37.1041 15.1726 37.8556 14.3543 37.8556 13.2521C37.8556 12.1499 37.1041 11.3316 36.052 11.3316C34.9999 11.3316 34.2317 12.1499 34.2317 13.2521C34.2317 14.3543 34.9999 15.1726 36.052 15.1726Z",fill:"black"}),p("path",{d:"M28.7099 13.0851L30.6805 16.6422C30.9644 17.1599 30.6638 17.4271 30.1628 17.4271H28.4594C27.9417 17.4271 27.8081 17.1766 27.5242 16.6589L25.7707 13.4859H24.6351V16.6422C24.6351 17.1432 24.3512 17.4271 23.8502 17.4271H22.4808C21.9798 17.4271 21.6959 17.1432 21.6959 16.6422V7.35703C21.6959 6.85603 21.9798 6.57213 22.4808 6.57213H26.5222C29.3111 6.57213 30.8141 7.92483 30.8141 10.1125C30.8141 11.5654 29.9791 12.5841 28.7099 13.0851ZM24.6351 8.96023V11.5153H26.4721C27.2236 11.5153 27.8248 11.0644 27.8248 10.2628C27.8248 9.44453 27.2236 8.96023 26.4721 8.96023H24.6351Z",fill:"black"})]}),p("defs",{children:p("clipPath",{id:"clip0_1_318",children:p("rect",{width:"99",height:"22",fill:"white",transform:"translate(0.0175781 0.177246)"})})})]})}var Nl="1.5";function Oe(t){return p("div",{className:"Layout",children:[p(Oe.Top,{}),p(Oe.Side,{}),p(Oe.Main,{...t,children:t.children}),p(Oe.Bottom,{})]})}Oe.Top=()=>{let t=window.__ROOT_CTX.rootConfig.projectName||window.__ROOT_CTX.rootConfig.projectId;return p("div",{className:"Layout__top",children:[p("a",{className:"Layout__top__logo",href:"/cms",children:p(pte,{})}),p("div",{className:"Layout__top__version",children:["v",fte.version]}),p("div",{className:"Layout__top__project",children:t})]})};Oe.Side=()=>{let[t]=rQ(),e=t.url.replace(/\/*$/g,""),r=window.firebase.user,o=window.__ROOT_CTX.sidebar?.tools,n=window.__ROOT_CTX.experiments||{};return p("div",{className:"Layout__side",children:[p("div",{className:"Layout__side__buttons",children:[p(Oe.SideButton,{label:"Home",url:"/cms",active:e==="/cms",children:p(gM,{stroke:Nl})}),p(Oe.SideButton,{label:"Content",url:"/cms/content",active:e.startsWith("/cms/content"),children:p(Ju,{stroke:Nl})}),p(Oe.SideButton,{label:"Releases",url:"/cms/releases",active:e.startsWith("/cms/releases"),children:p(zm,{stroke:Nl})}),p(Oe.SideButton,{label:"Data",url:"/cms/data",active:e.startsWith("/cms/data"),children:p(nM,{stroke:Nl})}),p(Oe.SideButton,{label:"Assets",url:"/cms/assets",active:e.startsWith("/cms/assets"),children:p(pS,{stroke:Nl})}),p(Oe.SideButton,{label:"Translations",url:"/cms/translations",active:e.startsWith("/cms/translations"),children:p(Vc,{stroke:Nl})}),n.ai&&p(Oe.SideButton,{label:"Root AI (experimental)",url:"/cms/ai",active:e.startsWith("/cms/ai"),children:p(Zu,{stroke:Nl})}),o&&p(we,{children:[p("div",{className:"Layout__side__divider"}),Object.entries(o).map(([i,a])=>p(Oe.SideButton,{className:"Layout__side__tool",label:a.label||"",url:`/cms/tools/${i}`,active:e.startsWith(`/cms/tools/${i}`),children:a.icon?p("img",{className:"Layout__side__tool__icon",src:a.icon,alt:a.label||""}):p(QR,{stroke:Nl})})),p("div",{className:"Layout__side__divider"})]}),p(Oe.SideButton,{label:"Settings",url:"/cms/settings",active:e.startsWith("/cms/settings"),children:p(ef,{stroke:Nl})})]}),p("div",{className:"Layout__side__user",children:p(Ee,{label:r.email,position:"right",withArrow:!0,children:p(da,{src:r.photoURL,alt:r.email,size:30,radius:"xl"})})})]})};Oe.SideButton=t=>p(Ee,{className:ke("Layout__side__button",t.className),label:t.label,position:"right",withArrow:!0,children:p("a",{className:ke(t.active&&"active"),href:t.url,children:t.children})});Oe.Main=t=>p("div",{className:"Layout__main",children:t.children});Oe.Bottom=()=>p("div",{className:"Layout__bottom"});function Ya(t){t||(t=6);let e=[],r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",o=r.length;for(let n=0;n<t;n++)e.push(r.charAt(Math.floor(Math.random()*o)));return e.join("")}function mte(t,e){return Math.random()*(e-t)+t}var HBe=[20,40];qM.configure({ignoreUnescapedHTML:!0});function hte(){return mte(...HBe)}function wy(){let[t,e]=N([]),[r,o]=N(""),n=s=>{let l=0;return e(c=>{let d={sender:"bot",blocks:[{type:"pending"}],key:Ya()},u=[...c,{...s,key:Ya()},d];return l=u.length-1,u}),l},i=(s,l)=>{e(c=>{let d=[...c];return d[s]={...l,key:Ya()},d})};return{chatId:r,messages:t,addMessage:n,updateMessage:i,sendPrompt:async(s,l,c)=>{let d="/cms/api/ai.chat";typeof window.__ROOT_CTX.experiments?.ai=="object"&&window.__ROOT_CTX.experiments.ai.endpoint&&(d=window.__ROOT_CTX.experiments.ai.endpoint);let u={prompt:l,chatId:r,options:c},f=await window.fetch(d,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(u)});if(f.status!==200){let h=await f.text();console.error("chat failed",h);let g=["Something went wrong:","```",h,"```"].join(`
45
45
  `);return i(s,{sender:"bot",blocks:[{type:"text",text:g}]}),{message:g,data:{},error:h}}let m=await f.json();return m.success&&m.chatId?(o(m.chatId),i(s,{sender:"bot",data:m.response?.data||{},blocks:[{type:"text",text:m.response?.message||""}]}),m.response):{message:"Sorry. Something went wrong. An unknown error occurred.",data:{},error:"Unknown error"}}}}function gte(){let t=wy(),e=window.__ROOT_CTX.experiments?.ai||!1;return p(Oe,{children:p("div",{className:"AIPage",children:e?p(we,{children:[p(DL,{chat:t,children:p("p",{children:"Chat with me about your website. Ask questions about the content and I can tell you about it."})}),p(HS,{chat:t})]}):p("div",{className:"AIPage__notEnabled",children:[p("div",{className:"AIPage__notEnabled__icon",children:p(Zu,{size:36})}),p("div",{className:"AIPage__notEnabled__title",children:"Root AI is not enabled for this project."})]})})})}function DL(t){let e=t.chat.messages;return p("div",{className:"AIPage__ChatWindow",children:e.length>0?p("div",{className:"AIPage__ChatWindow__messages",children:t.chat.messages.map((r,o)=>p(jBe,{message:r},r.key||o))}):p("div",{className:"AIPage__ChatWindow__welcome",children:[p("div",{className:"AIPage__ChatWindow__welcome__icon",children:p(Zu,{size:36})}),p("div",{className:"AIPage__ChatWindow__welcome__title",children:"Root AI is ready"}),t.children&&p("div",{className:"AIPage__ChatWindow__welcome__body",children:t.children})]})})}function jBe(t){let e=t.message,r=e.sender==="user"?"You":"Root AI",o=window.firebase.user,n=e.sender==="bot",i=H(null);return L(()=>{e.sender==="user"&&i.current.scrollIntoView({behavior:"smooth",block:"start"})},[]),p("div",{className:"AIPage__ChatMessage",ref:i,children:[p("div",{className:"AIPage__ChatMessage__side",children:p("div",{className:"AIPage__ChatMessage__side__avatar",children:e.sender==="user"?p(da,{src:o.photoURL,alt:o.email,size:28,radius:"xl"}):p(Zu,{size:28})})}),p("div",{className:"AIPage__ChatMessage__main",children:[p("div",{className:"AIPage__ChatMessage__main__username",children:r}),p("div",{className:"AIPage__ChatMessage__main__blocks",children:p(GBe,{message:e,animated:n})})]})]})}function GBe(t){let e=t.message,[r,o]=N(t.animated?[]:e.blocks);function n(){if(r.length>=e.blocks.length)return;let i=[...r,e.blocks[r.length]];o(i)}return L(()=>{t.animated&&n()},[t.animated]),p("div",{className:"AIPage__ChatMessageBlocks",children:r.map((i,a)=>{let s=`${a}-${i.type}`;return i.type==="image"?p(YBe,{block:i,animated:t.animated,onAnimationComplete:()=>n()},s):i.type==="pending"?p(KBe,{block:i,animated:t.animated,onAnimationComplete:()=>n()},s):i.type==="text"?p(qBe,{block:i,animated:t.animated,onAnimationComplete:()=>n()},s):p("div",{children:["unknown block type: ",i.type]})})})}function _te(t){let[e,r]=N(t.animated?[]:t.nodes),o=e.length>=t.nodes.length,n=()=>{r(a=>a.length>=t.nodes.length?t.nodes:[...a,t.nodes[a.length]])},i=()=>{if(e.length>=t.nodes.length){t.onAnimationComplete&&t.onAnimationComplete();return}window.setTimeout(()=>n(),hte())};return L(()=>{t.animated&&n()},[]),{nodes:e,next:i,complete:o}}function qBe(t){let e=Be(()=>dL(t.block.text,{extensions:[ste()],mdastExtensions:[wL()]}),[t.block.text]),{nodes:r,next:o}=_te({nodes:e.children,animated:t.animated,onAnimationComplete:t.onAnimationComplete});return p("div",{className:"AIPage__ChatMessageTextBlock",children:r.map((n,i)=>p(xte,{node:n,animated:t.animated,onAnimationComplete:o},i))})}function xte(t){let e=t.node;if(e.type==="code")return p(WBe,{text:e.value,language:e.lang,animated:t.animated,onAnimationComplete:t.onAnimationComplete});if(e.type==="heading"){let r=`h${e.depth||2}`;return p(uf,{as:r,nodes:e.children,animated:t.animated,onAnimationComplete:t.onAnimationComplete})}if(e.type==="inlineCode")return p(uf,{as:"code",nodes:[{type:"text",value:e.value}],animated:t.animated,onAnimationComplete:t.onAnimationComplete});if(e.type==="link")return p(uf,{as:"a",attrs:{href:e.url,target:"_blank"},nodes:e.children,animated:t.animated,onAnimationComplete:t.onAnimationComplete});if(e.type==="list"){let r=e.ordered?"ol":"ul";return p(uf,{as:r,nodes:e.children,animated:t.animated,onAnimationComplete:t.onAnimationComplete})}return e.type==="listItem"?p(uf,{as:"li",nodes:e.children,animated:t.animated,onAnimationComplete:t.onAnimationComplete}):e.type==="paragraph"?p(uf,{as:"p",nodes:e.children,animated:t.animated,onAnimationComplete:t.onAnimationComplete}):e.type==="strong"?p(uf,{as:"b",nodes:e.children,animated:t.animated,onAnimationComplete:t.onAnimationComplete}):e.type==="text"?p(yte,{text:e.value,animated:t.animated,onAnimationComplete:t.onAnimationComplete}):p("div",{children:JSON.stringify(t.node)})}function uf(t){let{nodes:e,next:r}=_te({nodes:t.nodes,animated:t.animated,onAnimationComplete:t.onAnimationComplete}),o=t.as;return p(o,{...t.attrs,children:e.map((n,i)=>p(xte,{node:n,animated:t.animated,onAnimationComplete:()=>r()},i))})}function yte(t){let e=t.sep||" ",r=Be(()=>t.text.split(e),[t.text]),[o,n]=N(t.animated?0:r.length),i=o>=r.length;return L(()=>{if(!t.animated||o>=r.length)return;let a=window.setTimeout(()=>{n(o+1)},hte());return()=>window.clearTimeout(a)},[t.text,o]),L(()=>{i&&t.animated&&t.onAnimationComplete()},[i]),p(we,{children:[r.slice(0,o).join(e),!i&&p(bte,{})]})}function WBe(t){let e=H(null),[r,o]=N(!1);function n(){let s=e.current;qM.highlightElement(s),console.log("highlight:",s)}async function i(){try{await navigator.clipboard.writeText(t.text),o(!0),window.setTimeout(()=>{o(!1)},2e3)}catch(s){console.error("failed to copy to clipboard:",s)}}function a(){n(),t.onAnimationComplete()}return L(()=>{t.animated||n()},[t.animated]),p("div",{className:"AIPage__CodeBlockNode",children:[p("div",{className:"AIPage__CodeBlockNode__header",children:[t.language&&p("div",{className:"AIPage__CodeBlockNode__language",children:t.language}),p(Ee,{label:"Copy code",position:"bottom",transition:"pop",children:p(Ke,{onClick:()=>i(),size:"xs",children:r?p(tM,{color:"#80868b","stroke-width":1.5,size:16}):p(Zx,{color:"#80868b","stroke-width":1.5,size:16})})})]}),p("pre",{ref:e,class:`language-${t.language||"unknown"}`,children:p(yte,{text:t.text,sep:`
46
46
  `,animated:t.animated,onAnimationComplete:a})})]})}function KBe(t){return L(()=>{t.animated&&t.onAnimationComplete()},[]),p("div",{className:"AIPage__PendingMessageBlock",children:p(bte,{})})}function bte(){return p("div",{className:"AIPage__CursorDot"})}function YBe(t){let e=t.block.image;return L(()=>{t.animated&&t.onAnimationComplete()},[]),p("div",{className:"AIPage__ImageMessageBlock",children:p("img",{src:e.src,width:e.width,height:e.height,alt:e.alt})})}function vte(t){let e=wy();return p(we,{children:[p(DL,{chat:e,children:t.children}),p(HS,{chat:e,options:{mode:"edit",editData:t.editModeData},onData:t.onEditModeResponse})]})}var RL="AiEditModal";function Ite(){let t=xt(),e=Dt();return{open:r=>{t.openContextModal(RL,{...e,title:r.title||"Edit with AI (Experimental)",innerProps:r,size:"calc(min(1920px, calc(100% - 96px)))",centered:!0})},close:()=>{t.closeModal(RL)}}}function jS(t){let{innerProps:e,context:r,id:o}=t,n=H(null),i=JSON.stringify(e.data||{},null,2),[a,s]=N(i),[l,c]=N(!0),[d,u]=N(!1);function f(h){s(h);try{JSON.parse(h),c(!0)}catch{c(!1)}u(h!==i)}function m(){let h=JSON.parse(a);e.onSave&&e.onSave(h)}return p("div",{className:"AiEditModal",children:[p("div",{className:"AiEditModal__SplitPanel",children:[p("div",{className:"AiEditModal__SplitPanel__JsonPanel",children:p(vs,{className:"AiEditModal__Tabs",grow:!0,children:[p(vs.Tab,{label:"JSON",icon:p(xM,{size:20}),children:p("div",{className:"AiEditModal__JsonEditor",children:p(xc,{value:a,onChange:f,formatOnBlur:!0,height:"100%",className:"AiEditModal__JsonInput"})})}),p(vs.Tab,{ref:n,label:"Diff",icon:p(cM,{size:20}),children:p("div",{className:"AiEditModal__JsonDiffViewer",children:e.data&&a&&p(dQ,{oldCode:JSON.stringify(e.data,null,2),newCode:a})})})]})}),p("div",{className:"AiEditModal__SplitPanel__ChatPanel",children:p(vte,{editModeData:JSON.parse(a),onEditModeResponse:h=>{let g=JSON.stringify(h.data,null,2);s(g),u(g!==i),n.current&&n.current.click()},children:[p("p",{children:"Tell me what you want to change. I can make simple text edits, replace content within a module, or answer questions about the content."}),p("p",{children:"Just enter simple instructions, or attach a screenshot and ask me to use it as reference."})]})})]}),p("div",{className:"AiEditModal__buttons",children:[p(Y,{variant:"default",size:"xs",color:"dark",type:"button",onClick:()=>r.closeModal(o),children:"Cancel"}),p(Y,{variant:"default",size:"xs",type:"button",leftIcon:p(Yx,{size:16}),disabled:!d,onClick:()=>{s(i),c(!0),u(!1)},children:"Reset"}),p(Y,{leftIcon:p(Qx,{size:16}),variant:"filled",size:"xs",color:"green",disabled:!l||!d,onClick:m,children:"Accept changes"})]})]})}jS.id=RL;ge();var XBe=/^[a-z0-9_]+(?:--?[a-z0-9_]+)*$/;function Us(t,e){e||(e=XBe);let r=typeof e=="string"?new RegExp(e):e;return!!(t&&r.test(t))}function Kc(t){return t.replace(/^[\s/]*/g,"").replace(/[\s/]*$/g,"").replace(/^\/+|\/+$/g,"").replaceAll("/","--")}var Io={year:31536e6,month:2628e6,week:6048e5,day:864e5,hour:36e5,minute:6e4,second:1e3};function ya(t,e){let r=Math.abs(t-new Date().getTime());if(r<Io.second)return"just now";let o=e||{numeric:"auto"},n=new Intl.RelativeTimeFormat("en",o);return r<Io.minute?n.format(Math.round(-r/Io.second),"second"):r<Io.hour?n.format(Math.round(-r/Io.minute),"minute"):r<Io.day?n.format(Math.round(-r/Io.hour),"hour"):r<Io.week?n.format(Math.round(-r/Io.day),"day"):new Date(t).toLocaleDateString("en",{year:"numeric",month:"short",day:"numeric"})}function Ey(){return Math.floor(new Date().getTime())}function GS(t){return new Date(t.toMillis()).toLocaleDateString("en",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function Xm(){let t=s=>s<10?"0"+s:s,e=new Date,r=e.getFullYear(),o=t(e.getMonth()+1),n=t(e.getDate()),i=t(e.getHours()),a=t(e.getMinutes());return`${r}-${o}-${n}T${i}:${a}`}var wte={};async function Et(t,e){let r=e?.throttle||0,o=e?.throttleId?`${t}::${e.throttleId}`:t;if(JBe(o,r))return;let n=await fetch("/cms/api/actions.log",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:t,metadata:e?.metadata||{}})});if(n.status!==200){let i=await n.text();console.error(`failed to log action "${t}":`,i);return}wte[o]=Ey()}async function Ete(t){let e=window.__ROOT_CTX.rootConfig.projectId,r=window.firebase.db,o=Li(r,"Projects",e,"ActionLogs"),n=t?.limit||40,i=Math.ceil(n*1.5),a=yo(o,xa("timestamp","desc"),wJ(i)),s=await Fi(a),l=[];function c(u){if(l.length===0)return!1;let f=l.at(-1);return u.action==="doc.save"&&f.action==="doc.save"&&u.by===f.by&&u.metadata.docId===f.metadata.docId&&u.timestamp.toMillis()-f.timestamp.toMillis()<60*Io.minute}let d=0;for(let u of s.docs){if(d>=n)break;let f=u.data();c(f)||(l.push(f),d+=1)}return l}function JBe(t,e){if(e===0)return!1;let r=wte[t];return r?Ey()-r<e:!1}var ML=new Map;function QBe(t){return ML.get(t)||null}async function qS(t){let e=QBe(t);if(e)return e;let r=ba(t),n=(await fo(r)).data();return Sy(t,n),n}function Sy(t,e){ML.set(t,e)}function LL(t){ML.delete(t)}function Ste(t){for(let e of t)LL(e)}function FL(){let t=window.__ROOT_CTX.rootConfig.projectId,e=window.firebase.db;return Li(e,"Projects",t,"Translations")}async function Yc(t){let e=FL(),r=t?.tags?yo(e,Ux("tags","array-contains-any",t.tags)):yo(e),o=await Fi(r),n={};return o.forEach(i=>{let a=i.id;n[a]=i.data()}),n}async function Cte(t){let e=window.__ROOT_CTX.rootConfig.projectId,r=window.firebase.db,o=Ae(r,"Projects",e,"Translations",t);return(await fo(o)).data()}async function Tte(t,e){let r=window.__ROOT_CTX.rootConfig.projectId,o=window.firebase.db,n=Ae(o,"Projects",r,"Translations",t),i={};for(let a in e){let s=t4e(a);s&&(i[s]=e[a])}console.log("updating translations: ",i),await Ir(n,i),Et("translations.save",{metadata:{hash:t},throttle:5*Io.minute,throttleId:t})}async function WS(t){return ZBe(Ol(t))}async function ZBe(t){let r=new TextEncoder().encode(t),o=await crypto.subtle.digest("SHA-1",r);return Array.from(new Uint8Array(o)).map(a=>a.toString(16).padStart(2,"0")).join("")}function Ol(t){return String(t).trim().split(`
47
47
  `).map(r=>e4e(r)).join(`
@@ -165,7 +165,7 @@ ${ze.current.stack}
165
165
  -moz-user-select: none;
166
166
  -ms-user-select: none;
167
167
  overflow-anchor: none;
168
- `}}];return{always:Fy(a,"always"),resting:Fy(a,"resting"),dragging:Fy(a,"dragging"),dropAnimating:Fy(a,"dropAnimating"),userCancel:Fy(a,"userCancel")}},ji=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?At:L,U2=()=>{let t=document.querySelector("head");return t||re(),t},Fne=t=>{let e=document.createElement("style");return t&&e.setAttribute("nonce",t),e.type="text/css",e};function w7e(t,e){let r=Ft(()=>I7e(t),[t]),o=H(null),n=H(null),i=He(Bo(u=>{let f=n.current;f||re(),f.textContent=u}),[]),a=He(u=>{let f=o.current;f||re(),f.textContent=u},[]);ji(()=>{!o.current&&!n.current||re();let u=Fne(e),f=Fne(e);return o.current=u,n.current=f,u.setAttribute(`${_h}-always`,t),f.setAttribute(`${_h}-dynamic`,t),U2().appendChild(u),U2().appendChild(f),a(r.always),i(r.resting),()=>{let m=h=>{let g=h.current;g||re(),U2().removeChild(g),h.current=null};m(o),m(n)}},[e,a,i,r.always,r.resting,t]);let s=He(()=>i(r.dragging),[i,r.dragging]),l=He(u=>{if(u==="DROP"){i(r.dropAnimating);return}i(r.userCancel)},[i,r.dropAnimating,r.userCancel]),c=He(()=>{n.current&&i(r.resting)},[i,r.resting]);return Ft(()=>({dragging:s,dropping:l,resting:c}),[s,l,c])}function Oie(t,e){return Array.from(t.querySelectorAll(e))}var Pie=t=>t&&t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView:window;function Qy(t){return t instanceof Pie(t).HTMLElement}function Aie(t,e){let r=`[${xh.contextId}="${t}"]`,o=Oie(document,r);if(!o.length)return null;let n=o.find(i=>i.getAttribute(xh.draggableId)===e);return!n||!Qy(n)?null:n}function E7e(t){let e=H({}),r=H(null),o=H(null),n=H(!1),i=He(function(f,m){let h={id:f,focus:m};return e.current[f]=h,function(){let _=e.current;_[f]!==h&&delete _[f]}},[]),a=He(function(f){let m=Aie(t,f);m&&m!==document.activeElement&&m.focus()},[t]),s=He(function(f,m){r.current===f&&(r.current=m)},[]),l=He(function(){o.current||n.current&&(o.current=requestAnimationFrame(()=>{o.current=null;let f=r.current;f&&a(f)}))},[a]),c=He(function(f){r.current=null;let m=document.activeElement;m&&m.getAttribute(xh.draggableId)===f&&(r.current=f)},[]);return ji(()=>(n.current=!0,function(){n.current=!1;let f=o.current;f&&cancelAnimationFrame(f)}),[]),Ft(()=>({register:i,tryRecordFocus:c,tryRestoreFocusRecorded:l,tryShiftRecord:s}),[i,c,l,s])}function S7e(){let t={draggables:{},droppables:{}},e=[];function r(u){return e.push(u),function(){let m=e.indexOf(u);m!==-1&&e.splice(m,1)}}function o(u){e.length&&e.forEach(f=>f(u))}function n(u){return t.draggables[u]||null}function i(u){let f=n(u);return f||re(),f}let a={register:u=>{t.draggables[u.descriptor.id]=u,o({type:"ADDITION",value:u})},update:(u,f)=>{let m=t.draggables[f.descriptor.id];m&&m.uniqueId===u.uniqueId&&(delete t.draggables[f.descriptor.id],t.draggables[u.descriptor.id]=u)},unregister:u=>{let f=u.descriptor.id,m=n(f);m&&u.uniqueId===m.uniqueId&&(delete t.draggables[f],t.droppables[u.descriptor.droppableId]&&o({type:"REMOVAL",value:u}))},getById:i,findById:n,exists:u=>!!n(u),getAllByType:u=>Object.values(t.draggables).filter(f=>f.descriptor.type===u)};function s(u){return t.droppables[u]||null}function l(u){let f=s(u);return f||re(),f}let c={register:u=>{t.droppables[u.descriptor.id]=u},unregister:u=>{let f=s(u.descriptor.id);f&&u.uniqueId===f.uniqueId&&delete t.droppables[u.descriptor.id]},getById:l,findById:s,exists:u=>!!s(u),getAllByType:u=>Object.values(t.droppables).filter(f=>f.descriptor.type===u)};function d(){t.draggables={},t.droppables={},e.length=0}return{draggable:a,droppable:c,subscribe:r,clean:d}}function C7e(){let t=Ft(S7e,[]);return L(()=>function(){t.clean()},[t]),t}var hF=k.createContext(null),qy=()=>{let t=document.body;return t||re(),t},T7e={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},k7e=t=>`rfd-announcement-${t}`;function N7e(t){let e=Ft(()=>k7e(t),[t]),r=H(null);return L(function(){let i=document.createElement("div");return r.current=i,i.id=e,i.setAttribute("aria-live","assertive"),i.setAttribute("aria-atomic","true"),pc(i.style,T7e),qy().appendChild(i),function(){setTimeout(function(){let l=qy();l.contains(i)&&l.removeChild(i),i===r.current&&(r.current=null)})}},[e]),He(n=>{let i=r.current;if(i){i.textContent=n;return}},[])}var O7e={separator:"::"};function gF(t,e=O7e){let r=k.useId();return Ft(()=>`${t}${e.separator}${r}`,[e.separator,t,r])}function P7e({contextId:t,uniqueId:e}){return`rfd-hidden-text-${t}-${e}`}function A7e({contextId:t,text:e}){let r=gF("hidden-text",{separator:"-"}),o=Ft(()=>P7e({contextId:t,uniqueId:r}),[r,t]);return L(function(){let i=document.createElement("div");return i.id=o,i.textContent=e,i.style.display="none",qy().appendChild(i),function(){let s=qy();s.contains(i)&&s.removeChild(i)}},[o,e]),o}var KC=k.createContext(null),D7e={react:"^18.0.0 || ^19.0.0"},R7e=/(\d+)\.(\d+)\.(\d+)/,Bne=t=>{let e=R7e.exec(t);e==null&&re();let r=Number(e[1]),o=Number(e[2]),n=Number(e[3]);return{major:r,minor:o,patch:n,raw:t}},M7e=(t,e)=>e.major>t.major?!0:e.major<t.major?!1:e.minor>t.minor?!0:e.minor<t.minor?!1:e.patch>=t.patch,L7e=(t,e)=>{let r=Bne(t),o=Bne(e);M7e(r,o)};var F7e=t=>{let e=t.doctype;e&&(e.name.toLowerCase(),e.publicId)};function Zy(t,e){}function B7e(){Zy(()=>{L7e(D7e.react,k.version),F7e(document)},[])}function _F(t){let e=H(t);return L(()=>{e.current=t}),e}function $7e(){let t=null;function e(){return!!t}function r(a){return a===t}function o(a){t&&re();let s={abandon:a};return t=s,s}function n(){t||re(),t=null}function i(){t&&(t.abandon(),n())}return{isClaimed:e,isActive:r,claim:o,release:n,tryAbandon:i}}function Wy(t){return t.phase==="IDLE"||t.phase==="DROP_ANIMATING"?!1:t.isDragging}var z7e=9,U7e=13,xF=27,Die=32,V7e=33,H7e=34,j7e=35,G7e=36,q7e=37,W7e=38,K7e=39,Y7e=40,X7e={[U7e]:!0,[z7e]:!0},Rie=t=>{X7e[t.keyCode]&&t.preventDefault()},YC=(()=>{let t="visibilitychange";return typeof document>"u"?t:[t,`ms${t}`,`webkit${t}`,`moz${t}`,`o${t}`].find(o=>`on${o}`in document)||t})(),Mie=0,$ne=5;function J7e(t,e){return Math.abs(e.x-t.x)>=$ne||Math.abs(e.y-t.y)>=$ne}var zne={type:"IDLE"};function Q7e({cancel:t,completed:e,getPhase:r,setPhase:o}){return[{eventName:"mousemove",fn:n=>{let{button:i,clientX:a,clientY:s}=n;if(i!==Mie)return;let l={x:a,y:s},c=r();if(c.type==="DRAGGING"){n.preventDefault(),c.actions.move(l);return}c.type!=="PENDING"&&re();let d=c.point;if(!J7e(d,l))return;n.preventDefault();let u=c.actions.fluidLift(l);o({type:"DRAGGING",actions:u})}},{eventName:"mouseup",fn:n=>{let i=r();if(i.type!=="DRAGGING"){t();return}n.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),e()}},{eventName:"mousedown",fn:n=>{r().type==="DRAGGING"&&n.preventDefault(),t()}},{eventName:"keydown",fn:n=>{if(r().type==="PENDING"){t();return}if(n.keyCode===xF){n.preventDefault(),t();return}Rie(n)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{r().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:n=>{let i=r();if(i.type==="IDLE"&&re(),i.actions.shouldRespectForcePress()){t();return}n.preventDefault()}},{eventName:YC,fn:t}]}function Z7e(t){let e=H(zne),r=H(id),o=Ft(()=>({eventName:"mousedown",fn:function(u){if(u.defaultPrevented||u.button!==Mie||u.ctrlKey||u.metaKey||u.shiftKey||u.altKey)return;let f=t.findClosestDraggableId(u);if(!f)return;let m=t.tryGetLock(f,a,{sourceEvent:u});if(!m)return;u.preventDefault();let h={x:u.clientX,y:u.clientY};r.current(),c(m,h)}}),[t]),n=Ft(()=>({eventName:"webkitmouseforcewillbegin",fn:d=>{if(d.defaultPrevented)return;let u=t.findClosestDraggableId(d);if(!u)return;let f=t.findOptionsForDraggable(u);f&&(f.shouldRespectForcePress||t.canGetLock(u)&&d.preventDefault())}}),[t]),i=He(function(){let u={passive:!1,capture:!0};r.current=Sa(window,[n,o],u)},[n,o]),a=He(()=>{e.current.type!=="IDLE"&&(e.current=zne,r.current(),i())},[i]),s=He(()=>{let d=e.current;a(),d.type==="DRAGGING"&&d.actions.cancel({shouldBlockNextClick:!0}),d.type==="PENDING"&&d.actions.abort()},[a]),l=He(function(){let u={capture:!0,passive:!1},f=Q7e({cancel:s,completed:a,getPhase:()=>e.current,setPhase:m=>{e.current=m}});r.current=Sa(window,f,u)},[s,a]),c=He(function(u,f){e.current.type!=="IDLE"&&re(),e.current={type:"PENDING",point:f,actions:u},l()},[l]);ji(function(){return i(),function(){r.current()}},[i])}function eje(){}var tje={[H7e]:!0,[V7e]:!0,[G7e]:!0,[j7e]:!0};function rje(t,e){function r(){e(),t.cancel()}function o(){e(),t.drop()}return[{eventName:"keydown",fn:n=>{if(n.keyCode===xF){n.preventDefault(),r();return}if(n.keyCode===Die){n.preventDefault(),o();return}if(n.keyCode===Y7e){n.preventDefault(),t.moveDown();return}if(n.keyCode===W7e){n.preventDefault(),t.moveUp();return}if(n.keyCode===K7e){n.preventDefault(),t.moveRight();return}if(n.keyCode===q7e){n.preventDefault(),t.moveLeft();return}if(tje[n.keyCode]){n.preventDefault();return}Rie(n)}},{eventName:"mousedown",fn:r},{eventName:"mouseup",fn:r},{eventName:"click",fn:r},{eventName:"touchstart",fn:r},{eventName:"resize",fn:r},{eventName:"wheel",fn:r,options:{passive:!0}},{eventName:YC,fn:r}]}function oje(t){let e=H(eje),r=Ft(()=>({eventName:"keydown",fn:function(i){if(i.defaultPrevented||i.keyCode!==Die)return;let a=t.findClosestDraggableId(i);if(!a)return;let s=t.tryGetLock(a,d,{sourceEvent:i});if(!s)return;i.preventDefault();let l=!0,c=s.snapLift();e.current();function d(){l||re(),l=!1,e.current(),o()}e.current=Sa(window,rje(c,d),{capture:!0,passive:!1})}}),[t]),o=He(function(){let i={passive:!1,capture:!0};e.current=Sa(window,[r],i)},[r]);ji(function(){return o(),function(){e.current()}},[o])}var V2={type:"IDLE"},nje=120,ije=.15;function aje({cancel:t,getPhase:e}){return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:r=>{r.preventDefault()}},{eventName:"keydown",fn:r=>{if(e().type!=="DRAGGING"){t();return}r.keyCode===xF&&r.preventDefault(),t()}},{eventName:YC,fn:t}]}function sje({cancel:t,completed:e,getPhase:r}){return[{eventName:"touchmove",options:{capture:!1},fn:o=>{let n=r();if(n.type!=="DRAGGING"){t();return}n.hasMoved=!0;let{clientX:i,clientY:a}=o.touches[0],s={x:i,y:a};o.preventDefault(),n.actions.move(s)}},{eventName:"touchend",fn:o=>{let n=r();if(n.type!=="DRAGGING"){t();return}o.preventDefault(),n.actions.drop({shouldBlockNextClick:!0}),e()}},{eventName:"touchcancel",fn:o=>{if(r().type!=="DRAGGING"){t();return}o.preventDefault(),t()}},{eventName:"touchforcechange",fn:o=>{let n=r();n.type==="IDLE"&&re();let i=o.touches[0];if(!i||!(i.force>=ije))return;let s=n.actions.shouldRespectForcePress();if(n.type==="PENDING"){s&&t();return}if(s){if(n.hasMoved){o.preventDefault();return}t();return}o.preventDefault()}},{eventName:YC,fn:t}]}function lje(t){let e=H(V2),r=H(id),o=He(function(){return e.current},[]),n=He(function(m){e.current=m},[]),i=Ft(()=>({eventName:"touchstart",fn:function(m){if(m.defaultPrevented)return;let h=t.findClosestDraggableId(m);if(!h)return;let g=t.tryGetLock(h,s,{sourceEvent:m});if(!g)return;let _=m.touches[0],{clientX:x,clientY:y}=_,b={x,y};r.current(),u(g,b)}}),[t]),a=He(function(){let m={capture:!0,passive:!1};r.current=Sa(window,[i],m)},[i]),s=He(()=>{let f=e.current;f.type!=="IDLE"&&(f.type==="PENDING"&&clearTimeout(f.longPressTimerId),n(V2),r.current(),a())},[a,n]),l=He(()=>{let f=e.current;s(),f.type==="DRAGGING"&&f.actions.cancel({shouldBlockNextClick:!0}),f.type==="PENDING"&&f.actions.abort()},[s]),c=He(function(){let m={capture:!0,passive:!1},h={cancel:l,completed:s,getPhase:o},g=Sa(window,sje(h),m),_=Sa(window,aje(h),m);r.current=function(){g(),_()}},[l,o,s]),d=He(function(){let m=o();m.type!=="PENDING"&&re();let h=m.actions.fluidLift(m.point);n({type:"DRAGGING",actions:h,hasMoved:!1})},[o,n]),u=He(function(m,h){o().type!=="IDLE"&&re();let g=setTimeout(d,nje);n({type:"PENDING",point:h,actions:m,longPressTimerId:g}),c()},[c,o,n,d]);ji(function(){return a(),function(){r.current();let h=o();h.type==="PENDING"&&(clearTimeout(h.longPressTimerId),n(V2))}},[o,a,n]),ji(function(){return Sa(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}function cje(t){}var dje=["input","button","textarea","select","option","optgroup","video","audio"];function Lie(t,e){if(e==null)return!1;if(dje.includes(e.tagName.toLowerCase()))return!0;let o=e.getAttribute("contenteditable");return o==="true"||o===""?!0:e===t?!1:Lie(t,e.parentElement)}function uje(t,e){let r=e.target;return Qy(r)?Lie(t,r):!1}var fje=t=>Ea(t.getBoundingClientRect()).center;function pje(t){return t instanceof Pie(t).Element}var mje=(()=>{let t="matches";return typeof document>"u"?t:[t,"msMatchesSelector","webkitMatchesSelector"].find(o=>o in Element.prototype)||t})();function Fie(t,e){return t==null?null:t[mje](e)?t:Fie(t.parentElement,e)}function hje(t,e){return t.closest?t.closest(e):Fie(t,e)}function gje(t){return`[${xh.contextId}="${t}"]`}function _je(t,e){let r=e.target;if(!pje(r))return null;let o=gje(t),n=hje(r,o);return!n||!Qy(n)?null:n}function xje(t,e){let r=_je(t,e);return r?r.getAttribute(xh.draggableId):null}function yje(t,e){let r=`[${Q2.contextId}="${t}"]`,n=Oie(document,r).find(i=>i.getAttribute(Q2.id)===e);return!n||!Qy(n)?null:n}function bje(t){t.preventDefault()}function BC({expected:t,phase:e,isLockActive:r,shouldWarn:o}){return!(!r()||t!==e)}function Bie({lockAPI:t,store:e,registry:r,draggableId:o}){if(t.isClaimed())return!1;let n=r.draggable.findById(o);return!(!n||!n.options.isEnabled||!Cie(e.getState(),o))}function vje({lockAPI:t,contextId:e,store:r,registry:o,draggableId:n,forceSensorStop:i,sourceEvent:a}){if(!Bie({lockAPI:t,store:r,registry:o,draggableId:n}))return null;let l=o.draggable.getById(n),c=yje(e,l.descriptor.id);if(!c||a&&!l.options.canDragInteractiveElements&&uje(c,a))return null;let d=t.claim(i||id),u="PRE_DRAG";function f(){return l.options.shouldRespectForcePress}function m(){return t.isActive(d)}function h(w,v){BC({expected:w,phase:u,isLockActive:m,shouldWarn:!0})&&r.dispatch(v())}let g=h.bind(null,"DRAGGING");function _(w){function v(){t.release(),u="COMPLETED"}u!=="PRE_DRAG"&&(v(),re()),r.dispatch(c8e(w.liftActionArgs)),u="DRAGGING";function E(C,S={shouldBlockNextClick:!1}){if(w.cleanup(),S.shouldBlockNextClick){let T=Sa(window,[{eventName:"click",fn:bje,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(T)}v(),r.dispatch(xie({reason:C}))}return{isActive:()=>BC({expected:"DRAGGING",phase:u,isLockActive:m,shouldWarn:!1}),shouldRespectForcePress:f,drop:C=>E("DROP",C),cancel:C=>E("CANCEL",C),...w.actions}}function x(w){let v=hh(C=>{g(()=>_ie({client:C}))});return{..._({liftActionArgs:{id:n,clientSelection:w,movementMode:"FLUID"},cleanup:()=>v.cancel(),actions:{move:v}}),move:v}}function y(){let w={moveUp:()=>g(x8e),moveRight:()=>g(b8e),moveDown:()=>g(y8e),moveLeft:()=>g(v8e)};return _({liftActionArgs:{id:n,clientSelection:fje(c),movementMode:"SNAP"},cleanup:id,actions:w})}function b(){BC({expected:"PRE_DRAG",phase:u,isLockActive:m,shouldWarn:!0})&&t.release()}return{isActive:()=>BC({expected:"PRE_DRAG",phase:u,isLockActive:m,shouldWarn:!1}),shouldRespectForcePress:f,fluidLift:x,snapLift:y,abort:b}}var Ije=[Z7e,oje,lje];function wje({contextId:t,store:e,registry:r,customSensors:o,enableDefaultSensors:n}){let i=[...n?Ije:[],...o||[]],a=N(()=>$7e())[0],s=He(function(_,x){Wy(_)&&!Wy(x)&&a.tryAbandon()},[a]);ji(function(){let _=e.getState();return e.subscribe(()=>{let y=e.getState();s(_,y),_=y})},[a,e,s]),ji(()=>a.tryAbandon,[a.tryAbandon]);let l=He(g=>Bie({lockAPI:a,registry:r,store:e,draggableId:g}),[a,r,e]),c=He((g,_,x)=>vje({lockAPI:a,registry:r,contextId:t,store:e,draggableId:g,forceSensorStop:_||null,sourceEvent:x&&x.sourceEvent?x.sourceEvent:null}),[t,a,r,e]),d=He(g=>xje(t,g),[t]),u=He(g=>{let _=r.draggable.findById(g);return _?_.options:null},[r.draggable]),f=He(function(){a.isClaimed()&&(a.tryAbandon(),e.getState().phase!=="IDLE"&&e.dispatch(lF()))},[a,e]),m=He(()=>a.isClaimed(),[a]),h=Ft(()=>({canGetLock:l,tryGetLock:c,findClosestDraggableId:d,findOptionsForDraggable:u,tryReleaseLock:f,isLockClaimed:m}),[l,c,d,u,f,m]);cje(i);for(let g=0;g<i.length;g++)i[g](h)}var Eje=t=>({onBeforeCapture:e=>{sl(()=>{t.onBeforeCapture&&t.onBeforeCapture(e)})},onBeforeDragStart:t.onBeforeDragStart,onDragStart:t.onDragStart,onDragEnd:t.onDragEnd,onDragUpdate:t.onDragUpdate}),Sje=t=>({...Gy,...t.autoScrollerOptions,durationDampening:{...Gy.durationDampening,...t.autoScrollerOptions}});function By(t){return t.current||re(),t.current}function Cje(t){let{contextId:e,setCallbacks:r,sensors:o,nonce:n,dragHandleUsageInstructions:i}=t,a=H(null);B7e();let s=_F(t),l=He(()=>Eje(s.current),[s]),c=He(()=>Sje(s.current),[s]),d=N7e(e),u=A7e({contextId:e,text:i}),f=w7e(e,n),m=He(T=>{By(a).dispatch(T)},[]),h=Ft(()=>S2({publishWhileDragging:u8e,updateDroppableScroll:p8e,updateDroppableIsEnabled:m8e,updateDroppableIsCombineEnabled:h8e,collectionStarting:f8e},m),[m]),g=C7e(),_=Ft(()=>t7e(g,h),[g,h]),x=Ft(()=>x7e({scrollWindow:r7e,scrollDroppable:_.scrollDroppable,getAutoScrollerOptions:c,...S2({move:_ie},m)}),[_.scrollDroppable,m,c]),y=E7e(e),b=Ft(()=>J8e({announce:d,autoScroller:x,dimensionMarshal:_,focusMarshal:y,getResponders:l,styleMarshal:f}),[d,x,_,y,l,f]);a.current=b;let I=He(()=>{let T=By(a);T.getState().phase!=="IDLE"&&T.dispatch(lF())},[]),w=He(()=>{let T=By(a).getState();return T.phase==="DROP_ANIMATING"?!0:T.phase==="IDLE"?!1:T.isDragging},[]),v=Ft(()=>({isDragging:w,tryAbort:I}),[w,I]);r(v);let E=He(T=>Cie(By(a).getState(),T),[]),C=He(()=>If(By(a).getState()),[]),S=Ft(()=>({marshal:_,focus:y,contextId:e,canLift:E,isMovementAllowed:C,dragHandleUsageInstructionsId:u,registry:g}),[e,_,u,y,E,C,g]);return wje({contextId:e,store:b,registry:g,customSensors:o||null,enableDefaultSensors:t.enableDefaultSensors!==!1}),L(()=>I,[I]),k.createElement(KC.Provider,{value:S},k.createElement(gne,{context:hF,store:b},t.children))}function Tje(){return k.useId()}function $ie(t){let e=Tje(),r=t.dragHandleUsageInstructions||zC.dragHandleUsageInstructions;return k.createElement(W2,null,o=>k.createElement(Cje,{nonce:t.nonce,contextId:e,setCallbacks:o,dragHandleUsageInstructions:r,enableDefaultSensors:t.enableDefaultSensors,sensors:t.sensors,onBeforeCapture:t.onBeforeCapture,onBeforeDragStart:t.onBeforeDragStart,onDragStart:t.onDragStart,onDragUpdate:t.onDragUpdate,onDragEnd:t.onDragEnd,autoScrollerOptions:t.autoScrollerOptions},t.children))}var Une={dragging:5e3,dropAnimating:4500},kje=(t,e)=>e?zy.drop(e.duration):t?zy.snap:zy.fluid,Nje=(t,e)=>{if(t)return e?jy.opacity.drop:jy.opacity.combining},Oje=t=>t.forceShouldAnimate!=null?t.forceShouldAnimate:t.mode==="SNAP";function Pje(t){let r=t.dimension.client,{offset:o,combineWith:n,dropping:i}=t,a=!!n,s=Oje(t),l=!!i,c=l?X2.drop(o,a):X2.moveTo(o);return{position:"fixed",top:r.marginBox.top,left:r.marginBox.left,boxSizing:"border-box",width:r.borderBox.width,height:r.borderBox.height,transition:kje(s,i),transform:c,opacity:Nje(a,l),zIndex:l?Une.dropAnimating:Une.dragging,pointerEvents:"none"}}function Aje(t){return{transform:X2.moveTo(t.offset),transition:t.shouldAnimateDisplacement?void 0:"none"}}function Dje(t){return t.type==="DRAGGING"?Pje(t):Aje(t)}function Rje(t,e,r=$o){let o=window.getComputedStyle(e),n=e.getBoundingClientRect(),i=M2(n,o),a=My(i,r),s={client:i,tagName:e.tagName.toLowerCase(),display:o.display},l={x:i.marginBox.width,y:i.marginBox.height};return{descriptor:t,placeholder:s,displaceBy:l,client:i,page:a}}function Mje(t){let e=gF("draggable"),{descriptor:r,registry:o,getDraggableRef:n,canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}=t,l=Ft(()=>({canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}),[i,s,a]),c=He(m=>{let h=n();return h||re(),Rje(r,h,m)},[r,n]),d=Ft(()=>({uniqueId:e,descriptor:r,options:l,getDimension:c}),[r,c,l,e]),u=H(d),f=H(!0);ji(()=>(o.draggable.register(u.current),()=>o.draggable.unregister(u.current)),[o.draggable]),ji(()=>{if(f.current){f.current=!1;return}let m=u.current;u.current=d,o.draggable.update(d,m)},[d,o.draggable])}var yF=k.createContext(null);function zie(t){t&&Qy(t)||re()}function Lje(t,e,r){Zy(()=>{function o(i){return`Draggable[id: ${i}]: `}let n=t.draggableId;n||re(!1),typeof n!="string"&&re(!1),Number.isInteger(t.index)||re(!1),t.mapped.type!=="DRAGGING"&&(zie(r()),t.isEnabled&&(Aie(e,n)||re(!1)))})}function Fje(t){}function HC(t){let e=rt(t);return e||re(),e}function Bje(t){t.preventDefault()}var $je=t=>{let e=H(null),r=He((v=null)=>{e.current=v},[]),o=He(()=>e.current,[]),{contextId:n,dragHandleUsageInstructionsId:i,registry:a}=HC(KC),{type:s,droppableId:l}=HC(yF),c=Ft(()=>({id:t.draggableId,index:t.index,type:s,droppableId:l}),[t.draggableId,t.index,s,l]),{children:d,draggableId:u,isEnabled:f,shouldRespectForcePress:m,canDragInteractiveElements:h,isClone:g,mapped:_,dropAnimationFinished:x}=t;if(Lje(t,n,o),Fje(g),!g){let v=Ft(()=>({descriptor:c,registry:a,getDraggableRef:o,canDragInteractiveElements:h,shouldRespectForcePress:m,isEnabled:f}),[c,a,o,h,m,f]);Mje(v)}let y=Ft(()=>f?{tabIndex:0,role:"button","aria-describedby":i,"data-rfd-drag-handle-draggable-id":u,"data-rfd-drag-handle-context-id":n,draggable:!1,onDragStart:Bje}:null,[n,i,u,f]),b=He(v=>{_.type==="DRAGGING"&&_.dropping&&v.propertyName==="transform"&&sl(x)},[x,_]),I=Ft(()=>{let v=Dje(_),E=_.type==="DRAGGING"&&_.dropping?b:void 0;return{innerRef:r,draggableProps:{"data-rfd-draggable-context-id":n,"data-rfd-draggable-id":u,style:v,onTransitionEnd:E},dragHandleProps:y}},[n,y,u,_,b,r]),w=Ft(()=>({draggableId:c.id,type:c.type,source:{index:c.index,droppableId:c.droppableId}}),[c.droppableId,c.id,c.index,c.type]);return k.createElement(k.Fragment,null,d(I,_.snapshot,w))},Uie=(t,e)=>t===e,Vie=t=>{let{combine:e,destination:r}=t;return r?r.droppableId:e?e.droppableId:null},zje=t=>t.combine?t.combine.draggableId:null,Uje=t=>t.at&&t.at.type==="COMBINE"?t.at.combine.draggableId:null;function Vje(){let t=Bo((n,i)=>({x:n,y:i})),e=Bo((n,i,a=null,s=null,l=null)=>({isDragging:!0,isClone:i,isDropAnimating:!!l,dropAnimation:l,mode:n,draggingOver:a,combineWith:s,combineTargetFor:null})),r=Bo((n,i,a,s,l=null,c=null,d=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:l,combineWith:c,mode:i,offset:n,dimension:a,forceShouldAnimate:d,snapshot:e(i,s,l,c,null)}}));return(n,i)=>{if(Wy(n)){if(n.critical.draggable.id!==i.draggableId)return null;let a=n.current.client.offset,s=n.dimensions.draggables[i.draggableId],l=Hi(n.impact),c=Uje(n.impact),d=n.forceShouldAnimate;return r(t(a.x,a.y),n.movementMode,s,i.isClone,l,c,d)}if(n.phase==="DROP_ANIMATING"){let a=n.completed;if(a.result.draggableId!==i.draggableId)return null;let s=i.isClone,l=n.dimensions.draggables[i.draggableId],c=a.result,d=c.mode,u=Vie(c),f=zje(c),h={duration:n.dropDuration,curve:dF.drop,moveTo:n.newHomeClientOffset,opacity:f?jy.opacity.drop:null,scale:f?jy.scale.drop:null};return{mapped:{type:"DRAGGING",offset:n.newHomeClientOffset,dimension:l,dropping:h,draggingOver:u,combineWith:f,mode:d,forceShouldAnimate:null,snapshot:e(d,s,u,f,h)}}}return null}}function Hie(t=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:t,combineWith:null}}var Hje={mapped:{type:"SECONDARY",offset:$o,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Hie(null)}};function jje(){let t=Bo((a,s)=>({x:a,y:s})),e=Bo(Hie),r=Bo((a,s=null,l)=>({mapped:{type:"SECONDARY",offset:a,combineTargetFor:s,shouldAnimateDisplacement:l,snapshot:e(s)}})),o=a=>a?r($o,a,!0):null,n=(a,s,l,c)=>{let d=l.displaced.visible[a],u=!!(c.inVirtualList&&c.effected[a]),f=GC(l),m=f&&f.draggableId===a?s:null;if(!d){if(!u)return o(m);if(l.displaced.invisible[a])return null;let _=yh(c.displacedBy.point),x=t(_.x,_.y);return r(x,m,!0)}if(u)return o(m);let h=l.displacedBy.point,g=t(h.x,h.y);return r(g,m,d.shouldAnimate)};return(a,s)=>{if(Wy(a))return a.critical.draggable.id===s.draggableId?null:n(s.draggableId,a.critical.draggable.id,a.impact,a.afterCritical);if(a.phase==="DROP_ANIMATING"){let l=a.completed;return l.result.draggableId===s.draggableId?null:n(s.draggableId,l.result.draggableId,l.impact,l.afterCritical)}return null}}var Gje=()=>{let t=Vje(),e=jje();return(o,n)=>t(o,n)||e(o,n)||Hje},qje={dropAnimationFinished:yie},Wje=A2(Gje,qje,null,{context:hF,areStatePropsEqual:Uie})($je);function jie(t){return HC(yF).isUsingCloneFor===t.draggableId&&!t.isClone?null:k.createElement(Wje,t)}function Gie(t){let e=typeof t.isDragDisabled=="boolean"?!t.isDragDisabled:!0,r=!!t.disableInteractiveElementBlocking,o=!!t.shouldRespectForcePress;return k.createElement(jie,pc({},t,{isClone:!1,isEnabled:e,canDragInteractiveElements:r,shouldRespectForcePress:o}))}var bF=t=>e=>t===e,Kje=bF("scroll"),Yje=bF("auto"),Xje=bF("visible"),Vne=(t,e)=>e(t.overflowX)||e(t.overflowY),Jje=(t,e)=>e(t.overflowX)&&e(t.overflowY),qie=t=>{let e=window.getComputedStyle(t),r={overflowX:e.overflowX,overflowY:e.overflowY};return Vne(r,Kje)||Vne(r,Yje)},Qje=()=>!1,Wie=t=>t==null?null:t===document.body?Qje()?t:null:t===document.documentElement?null:qie(t)?t:Wie(t.parentElement);var Z2=t=>({x:t.scrollLeft,y:t.scrollTop}),Kie=t=>t?window.getComputedStyle(t).position==="fixed"?!0:Kie(t.parentElement):!1,Zje=t=>{let e=Wie(t),r=Kie(t);return{closestScrollable:e,isFixedOnPage:r}},eGe=({descriptor:t,isEnabled:e,isCombineEnabled:r,isFixedOnPage:o,direction:n,client:i,page:a,closest:s})=>{let l=(()=>{if(!s)return null;let{scrollSize:f,client:m}=s,h=wie({scrollHeight:f.scrollHeight,scrollWidth:f.scrollWidth,height:m.paddingBox.height,width:m.paddingBox.width});return{pageMarginBox:s.page.marginBox,frameClient:m,scrollSize:f,shouldClipSubject:s.shouldClipSubject,scroll:{initial:s.scroll,current:s.scroll,max:h,diff:{value:$o,displacement:$o}}}})(),c=n==="vertical"?oF:rie,d=gh({page:a,withPlaceholder:null,axis:c,frame:l});return{descriptor:t,isCombineEnabled:r,isFixedOnPage:o,axis:c,isEnabled:e,client:i,page:a,frame:l,subject:d}},tGe=(t,e)=>{let r=L2(t);if(!e||t!==e)return r;let o=r.paddingBox.top-e.scrollTop,n=r.paddingBox.left-e.scrollLeft,i=o+e.scrollHeight,a=n+e.scrollWidth,l=MC({top:o,right:a,bottom:i,left:n},r.border);return LC({borderBox:l,margin:r.margin,border:r.border,padding:r.padding})},rGe=({ref:t,descriptor:e,env:r,windowScroll:o,direction:n,isDropDisabled:i,isCombineEnabled:a,shouldClipSubject:s})=>{let l=r.closestScrollable,c=tGe(t,l),d=My(c,o),u=(()=>{if(!l)return null;let m=L2(l),h={scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth};return{client:m,page:My(m,o),scroll:Z2(l),scrollSize:h,shouldClipSubject:s}})();return eGe({descriptor:e,isEnabled:!i,isCombineEnabled:a,isFixedOnPage:r.isFixedOnPage,direction:n,client:c,page:d,closest:u})},oGe={passive:!1},nGe={passive:!0},Hne=t=>t.shouldPublishImmediately?oGe:nGe,$C=t=>t&&t.env.closestScrollable||null;function iGe(t){let e=H(null),r=HC(KC),o=gF("droppable"),{registry:n,marshal:i}=r,a=_F(t),s=Ft(()=>({id:t.droppableId,type:t.type,mode:t.mode}),[t.droppableId,t.mode,t.type]),l=H(s),c=Ft(()=>Bo((I,w)=>{e.current||re();let v={x:I,y:w};i.updateDroppableScroll(s.id,v)}),[s.id,i]),d=He(()=>{let I=e.current;return!I||!I.env.closestScrollable?$o:Z2(I.env.closestScrollable)},[]),u=He(()=>{let I=d();c(I.x,I.y)},[d,c]),f=Ft(()=>hh(u),[u]),m=He(()=>{let I=e.current,w=$C(I);if(I&&w||re(),I.scrollOptions.shouldPublishImmediately){u();return}f()},[f,u]),h=He((I,w)=>{e.current&&re();let v=a.current,E=v.getDroppableRef();E||re();let C=Zje(E),S={ref:E,descriptor:s,env:C,scrollOptions:w};e.current=S;let T=rGe({ref:E,descriptor:s,env:C,windowScroll:I,direction:v.direction,isDropDisabled:v.isDropDisabled,isCombineEnabled:v.isCombineEnabled,shouldClipSubject:!v.ignoreContainerClipping}),A=C.closestScrollable;return A&&(A.setAttribute(Lne.contextId,r.contextId),A.addEventListener("scroll",m,Hne(S.scrollOptions))),T},[r.contextId,s,m,a]),g=He(()=>{let I=e.current,w=$C(I);return I&&w||re(),Z2(w)},[]),_=He(()=>{let I=e.current;I||re();let w=$C(I);e.current=null,w&&(f.cancel(),w.removeAttribute(Lne.contextId),w.removeEventListener("scroll",m,Hne(I.scrollOptions)))},[m,f]),x=He(I=>{let w=e.current;w||re();let v=$C(w);v||re(),v.scrollTop+=I.y,v.scrollLeft+=I.x},[]),y=Ft(()=>({getDimensionAndWatchScroll:h,getScrollWhileDragging:g,dragStopped:_,scroll:x}),[_,h,g,x]),b=Ft(()=>({uniqueId:o,descriptor:s,callbacks:y}),[y,s,o]);ji(()=>(l.current=b.descriptor,n.droppable.register(b),()=>{e.current&&_(),n.droppable.unregister(b)}),[y,s,_,b,i,n.droppable]),ji(()=>{e.current&&i.updateDroppableIsEnabled(l.current.id,!t.isDropDisabled)},[t.isDropDisabled,i]),ji(()=>{e.current&&i.updateDroppableIsCombineEnabled(l.current.id,t.isCombineEnabled)},[t.isCombineEnabled,i])}function H2(){}var jne={width:0,height:0,margin:iHe},aGe=({isAnimatingOpenOnMount:t,placeholder:e,animate:r})=>t||r==="close"?jne:{height:e.client.borderBox.height,width:e.client.borderBox.width,margin:e.client.margin},sGe=({isAnimatingOpenOnMount:t,placeholder:e,animate:r})=>{let o=aGe({isAnimatingOpenOnMount:t,placeholder:e,animate:r});return{display:e.display,boxSizing:"border-box",width:o.width,height:o.height,marginTop:o.margin.top,marginRight:o.margin.right,marginBottom:o.margin.bottom,marginLeft:o.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:r!=="none"?zy.placeholder:null}},lGe=t=>{let e=H(null),r=He(()=>{e.current&&(clearTimeout(e.current),e.current=null)},[]),{animate:o,onTransitionEnd:n,onClose:i,contextId:a}=t,[s,l]=N(t.animate==="open");L(()=>s?o!=="open"?(r(),l(!1),H2):e.current?H2:(e.current=setTimeout(()=>{e.current=null,l(!1)}),r):H2,[o,s,r]);let c=He(u=>{u.propertyName==="height"&&(n(),o==="close"&&i())},[o,i,n]),d=sGe({isAnimatingOpenOnMount:s,animate:t.animate,placeholder:t.placeholder});return k.createElement(t.placeholder.tagName,{style:d,"data-rfd-placeholder-context-id":a,onTransitionEnd:c,ref:t.innerRef})},cGe=k.memo(lGe);function j2(t){return typeof t=="boolean"}function G2(t,e){e.forEach(r=>r(t))}var dGe=[function({props:e}){e.droppableId||re(),typeof e.droppableId!="string"&&re()},function({props:e}){j2(e.isDropDisabled)||re(),j2(e.isCombineEnabled)||re(),j2(e.ignoreContainerClipping)||re()},function({getDroppableRef:e}){zie(e())}],uGe=[function({props:e,getPlaceholderRef:r}){!e.placeholder||r()}],fGe=[function({props:e}){e.renderClone||re()},function({getPlaceholderRef:e}){e()&&re()}];function pGe(t){Zy(()=>{G2(t,dGe),t.props.mode==="standard"&&G2(t,uGe),t.props.mode==="virtual"&&G2(t,fGe)})}var eF=class extends k.PureComponent{constructor(...e){super(...e),this.state={isVisible:!!this.props.on,data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{this.state.animate==="close"&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(e,r){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:r.isVisible?{isVisible:!0,data:r.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!e.on,data:e.on,animate:"none"}}render(){if(!this.state.isVisible)return null;let e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)}},mGe=t=>{let e=rt(KC);e||re();let{contextId:r,isMovementAllowed:o}=e,n=H(null),i=H(null),{children:a,droppableId:s,type:l,mode:c,direction:d,ignoreContainerClipping:u,isDropDisabled:f,isCombineEnabled:m,snapshot:h,useClone:g,updateViewportMaxScroll:_,getContainerForClone:x}=t,y=He(()=>n.current,[]),b=He((B=null)=>{n.current=B},[]),I=He(()=>i.current,[]),w=He((B=null)=>{i.current=B},[]);pGe({props:t,getDroppableRef:y,getPlaceholderRef:I});let v=He(()=>{o()&&_({maxScroll:Sie()})},[o,_]);iGe({droppableId:s,type:l,mode:c,direction:d,isDropDisabled:f,isCombineEnabled:m,ignoreContainerClipping:u,getDroppableRef:y});let E=Ft(()=>k.createElement(eF,{on:t.placeholder,shouldAnimate:t.shouldAnimatePlaceholder},({onClose:B,data:O,animate:R})=>k.createElement(cGe,{placeholder:O,onClose:B,innerRef:w,animate:R,contextId:r,onTransitionEnd:v})),[r,v,t.placeholder,t.shouldAnimatePlaceholder,w]),C=Ft(()=>({innerRef:b,placeholder:E,droppableProps:{"data-rfd-droppable-id":s,"data-rfd-droppable-context-id":r}}),[r,s,E,b]),S=g?g.dragging.draggableId:null,T=Ft(()=>({droppableId:s,type:l,isUsingCloneFor:S}),[s,S,l]);function A(){if(!g)return null;let{dragging:B,render:O}=g,R=k.createElement(jie,{draggableId:B.draggableId,index:B.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(D,F)=>O(D,F,B));return k.createPortal(R,x())}return k.createElement(yF.Provider,{value:T},a(C,h),A())};function hGe(){return document.body||re(),document.body}var Gne={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:hGe},Yie=t=>{let e={...t},r;for(r in Gne)t[r]===void 0&&(e={...e,[r]:Gne[r]});return e},q2=(t,e)=>t===e.droppable.type,qne=(t,e)=>e.draggables[t.draggable.id],gGe=()=>{let t={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},e={...t,shouldAnimatePlaceholder:!1},r=Bo(i=>({draggableId:i.id,type:i.type,source:{index:i.index,droppableId:i.droppableId}})),o=Bo((i,a,s,l,c,d)=>{let u=c.descriptor.id;if(c.descriptor.droppableId===i){let h=d?{render:d,dragging:r(c.descriptor)}:null,g={isDraggingOver:s,draggingOverWith:s?u:null,draggingFromThisWith:u,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!1,snapshot:g,useClone:h}}if(!a)return e;if(!l)return t;let m={isDraggingOver:s,draggingOverWith:u,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!0,snapshot:m,useClone:null}});return(i,a)=>{let s=Yie(a),l=s.droppableId,c=s.type,d=!s.isDropDisabled,u=s.renderClone;if(Wy(i)){let f=i.critical;if(!q2(c,f))return e;let m=qne(f,i.dimensions),h=Hi(i.impact)===l;return o(l,d,h,h,m,u)}if(i.phase==="DROP_ANIMATING"){let f=i.completed;if(!q2(c,f.critical))return e;let m=qne(f.critical,i.dimensions);return o(l,d,Vie(f.result)===l,Hi(f.impact)===l,m,u)}if(i.phase==="IDLE"&&i.completed&&!i.shouldFlush){let f=i.completed;if(!q2(c,f.critical))return e;let m=Hi(f.impact)===l,h=!!(f.impact.at&&f.impact.at.type==="COMBINE"),g=f.critical.droppable.id===l;return m?h?t:e:g?t:e}return e}},_Ge={updateViewportMaxScroll:_8e},Xie=A2(gGe,_Ge,(t,e,r)=>({...Yie(r),...t,...e}),{context:hF,areStatePropsEqual:Uie})(mGe);ko();ge();function vF(t){return typeof t=="object"&&!Array.isArray(t)&&t!==null}function IF(t){return vF(t)&&Array.isArray(t.blocks)&&t.blocks.length>0}function eb(t){if(IF(t)&&(t.time=Date.now()),vF(t))for(let e in t)Object.hasOwn(t,e)&&eb(t[e]);else Array.isArray(t)&&t.forEach(e=>eb(e));return t}ko();ge();function xGe(){return new URLSearchParams(window.location.search).get("deeplink")||""}var Jie=ut(null);function Qie(t){let[e,r]=N(xGe()),o={value:e,setValue:r};return L(()=>{let n=i=>{let a=i.data;if(a.scrollToDeeplink){let s=a.scrollToDeeplink.deepKey,l=document.getElementById(s);if(l){r(s),wF(l,{behavior:"smooth",force:!0});let c=new URL(window.location.href);c.searchParams.set("deeplink",s),window.history.replaceState({},"",c.toString())}}};return window.addEventListener("message",n),()=>{window.removeEventListener("message",n)}},[]),p(Jie.Provider,{value:o,children:t.children})}function tb(){let t=rt(Jie);if(!t)throw new Error("[useDeeplink()] DeeplinkContext not found, be sure to add <DeeplinkProvider>");return t}function yGe(t){let e=t;for(;e&&e!==document.body;){let r=e.closest("details");if(r&&r.parentElement)r.open=!0,e=r.parentElement;else break}}function bGe(t){let e=[],r=t;for(;r&&r!==document.body;){let o=r.closest(".DocEditor__ArrayField__item");if(!o)break;let n=o.querySelector(".DocEditor__ArrayField__item__header");if(n&&!e.includes(n))e.push(n),r=o.parentElement;else break}return e}function wF(t,e={behavior:"auto"}){setTimeout(()=>{let r=document.querySelector(".DocumentPage__side");if(!r||r.scrollTop>0&&!e.force)return;yGe(t);let n=bGe(t).reduce((a,s)=>a+s.offsetHeight,0),i=t.offsetTop-n;r.scroll({top:i,behavior:e.behavior})},e.force?0:300)}function Zie(t){let e=new URL(window.location.href);return e.searchParams.set("deeplink",t),e.toString()}ge();function XC(t,e){let r;return(...o)=>{window.clearTimeout(r),r=window.setTimeout(()=>{t(...o)},e)}}var ld=class{constructor(){this.events=new Map}on(e,r){let o=this.events.get(e)??[];return this.events.set(e,[...o,r]),()=>{this.off(e,r)}}off(e,r){let o=this.events.get(e)??[],n=o.indexOf(r);n>=0&&o.splice(n,1)}dispatch(e,...r){(this.events.get(e)??[]).forEach(n=>n(...r))}dispose(){this.events.clear()}};var eae=3*Io.second,vGe=5*Io.minute;var IGe=30,EF=class extends ld{constructor(r){super();this.pendingUpdates=new Map;this.cachedData={};this.subscribers={};this.saveState="NO_CHANGES";this.autolock=!1;this.autolockReason="autolock";this.autolockApplied=!1;this.started=!1;this.queueChanges=XC(()=>this.flush(),eae);this.projectId=window.__ROOT_CTX.rootConfig.projectId;let[o,n]=r.split("/");this.docId=r,this.collectionId=o,this.slug=n,this.db=window.firebase.db,this.docRef=Ae(this.db,"Projects",this.projectId,"Collections",o,"Drafts",n);let i=window.__ROOT_CTX.collections[o];i&&(this.autolock=!!i.autolock,i.autolockReason&&(this.autolockReason=i.autolockReason))}async start(){this.started||(this.started=!0,this.dbUnsubscribe=Fc(this.docRef,r=>{let o=r.data();this.pendingUpdates.size>0&&JC(o,Object.fromEntries(this.pendingUpdates)),this.cachedData=o,this.notifySubscribers()}))}stop(){this.started&&(this.dbUnsubscribe&&this.dbUnsubscribe(),this.flush(),this.started=!1)}onChange(r){return this.on("CHANGE",r)}onSaveStateChange(r){return this.on("SAVE_STATE_CHANGE",r)}onFlush(r){return this.on("FLUSH",r)}subscribe(r,o){return this.subscribers[r]??=new Set,this.subscribers[r].add(o),o(this.getValue(r)),()=>{this.subscribers[r].delete(o),this.subscribers[r].size===0&&delete this.subscribers[r]}}notifySubscribers(){let r=this.cachedData;this.dispatch("CHANGE",r),tae(this.subscribers,r)}getValue(r){return wo(this.cachedData,r)}async updateKey(r,o){await this.updateKeys({[r]:o})}async updateKeys(r){for(let o in r)this.pendingUpdates.set(o,r[o]);JC(this.cachedData,r),this.dispatch("CHANGE",this.cachedData),this.setSaveState("UPDATE_PENDING"),this.queueChanges()}async removeKey(r){this.pendingUpdates.set(r,Lo()),JC(this.cachedData,{[r]:void 0}),this.dispatch("CHANGE",this.cachedData),this.setSaveState("UPDATE_PENDING"),this.queueChanges()}setSaveState(r){let o=this.saveState;r==="SAVED"&&o!=="SAVING"||(this.saveState=r,r==="SAVED"&&window.setTimeout(()=>{this.saveState==="SAVED"&&this.setSaveState("NO_CHANGES")},eae),this.dispatch("SAVE_STATE_CHANGE",r))}async flush(){if(this.pendingUpdates.size===0)return;let r=Object.fromEntries(this.pendingUpdates);r["sys.modifiedAt"]=hr(),r["sys.modifiedBy"]=window.firebase.user.email,this.autolock&&!this.autolockApplied&&!this.cachedData?.sys?.publishingLocked&&(this.autolockApplied=!0,r["sys.publishingLocked"]={lockedAt:hr(),lockedBy:window.firebase.user.email,reason:this.autolockReason}),this.pendingUpdates.clear();try{this.setSaveState("SAVING"),await Ir(this.docRef,r),this.setSaveState("SAVED"),this.dispatch("FLUSH"),Et("doc.save",{metadata:{docId:this.docId},throttle:vGe,throttleId:this.docId})}catch(o){console.error("failed to update doc"),console.error(o),this.setSaveState("ERROR"),Se({title:"Failed to save",message:`Failed to save changes to ${this.slug}`,color:"red",autoClose:!1});for(let n in r)n.startsWith("sys.")||this.pendingUpdates.has(n)||(this.pendingUpdates.set(n,r[n]),this.queueChanges(),console.log("re-queued updates"))}}getLocales(){return this.cachedData&&this.cachedData.sys?.locales?this.cachedData.sys.locales:["en"]}setLocales(r){this.updateKey("sys.locales",r)}async dispose(){super.dispose(),this.stop()}};function JC(t,e){for(let r in e){let o=e[r];if(r.includes(".")){let[n,i]=wGe(r);t[n]??={},JC(t[n],{[i]:o})}else typeof o>"u"?delete t[r]:t[r]=o}}function tae(t,e,r){r||(r=[]);for(let o in e){let n=[...r,o],i=n.join("."),a=t[i],s=e[o];a&&Array.from(a).forEach(l=>{l(s)}),Jc(s)&&tae(t,s,n)}}function wGe(t){let e=t.indexOf("."),r=t.substring(0,e),o=t.substring(e+1);return[r,o]}function rae(t){let[e,r]=N(!0),[o,n]=N({}),i=Be(()=>new EF(t),[t]),[a,s]=N("NO_CHANGES");return L(()=>{i.onChange(c=>{n(c),r(!1),Sy(t,c)}),i.onSaveStateChange(c=>s(c)),i.start();let l=()=>{let c;document.hidden||document.visibilityState!=="visible"?c=window.setTimeout(()=>{i.stop()},IGe*1e3):(c&&(clearTimeout(c),c=void 0),i.started||(r(!0),i.start()))};return document.addEventListener("visibilitychange",l),()=>{i.dispose(),document.removeEventListener("visibilitychange",l)}},[t]),{loading:e,saveState:a,controller:i,data:o}}function mi(t,e){if(!SGe())return;let r=EGe();r&&r.contentWindow?.postMessage({highlightNode:{deepKey:t,options:e}},"*")}function EGe(){return document.querySelector('iframe[title="iframe preview"]')}function SGe(){let t=window.__ROOT_CTX.preview;return[!0,"to-preview"].includes(t.channel)}function oae(t,e){return t.replace(/\{(.+?)\}/g,(r,o)=>{let n=e(o);return n??r})}function rb(t,e){if(e==null)return!0;switch(t.type){case"string":case"select":case"date":case"datetime":return e==="";case"multiselect":return!Array.isArray(e)||e.length===0;case"number":case"boolean":return e==null;case"image":case"file":return!e||!e.src;case"reference":return!e||!e.id;case"richtext":return!IF(e);case"object":if(!Jc(e)||Object.keys(e).length===0)return!0;for(let r of t.fields||[])if(r.id&&!rb(r,e[r.id]))return!1;return!0;case"array":if(!Jc(e)||!Array.isArray(e._array)||e._array.length===0)return!0;for(let r of e._array)if(!rb(t.of,e[r]))return!1;return!1;case"oneof":{if(!Jc(e)||!e._type)return!0;let r=(t.types||[]).find(o=>o.name===e._type);if(!r)return!0;for(let o of r.fields||[])if(o.id&&!rb(o,e[o.id]))return!1;return!0}default:return!1}}function QC(t){let r=new URLSearchParams(window.location.search).get("e");return r?r.split(",").includes(t):!1}ge();function nae(t,e){let r=!1;return(...o)=>{r||(t(...o),r=!0,setTimeout(()=>{r=!1},e))}}var ob=class extends ld{constructor(r){super();this.interval=0;this.timeout=0;this.interval=r}start(){this.timeout=window.setTimeout(()=>{this.tick()},this.interval)}tick(){this.dispatch("tick"),this.start()}reset(){this.stop(),this.start()}stop(){this.timeout&&(window.clearTimeout(this.timeout),this.timeout=0)}};var CGe=60*Io.second,iae=5*Io.minute,SF=class extends ld{constructor(r){super();this.started=!1;this.timer=new ob(CGe);this.idleTimer=new ob(iae);this.onUserInteraction=nae(()=>{this.idleTimer.reset()},5e3);this.id=r;let o=window.__ROOT_CTX.rootConfig.projectId,n=window.firebase.db;this.docRef=Ae(n,"Projects",o,"Viewers",r),this.timer.on("tick",()=>this.onTick()),this.idleTimer.on("tick",()=>this.onIdle()),window.addEventListener("mousemove",this.onUserInteraction),window.addEventListener("keypress",this.onUserInteraction)}async start(){this.started||(this.started=!0,this.dbUnsubscribe=Fc(this.docRef,r=>{let o=r.data();this.onData(o)}),this.onTick(),this.timer.start())}onData(r){let o=window.firebase.user,n=Tt.now(),i=Object.values(r).filter(a=>!(a.email===o.email||n.toMillis()-a.lastViewedAt.toMillis()>iae));this.dispatch("change",i)}async onTick(){let r=window.firebase.user;if(!r.email){console.log("no user email:",r);return}await Lc(this.docRef,{[r.email]:{email:r.email,photoURL:r.photoURL,lastViewedAt:hr()}},{merge:!0})}async onIdle(){this.stop()}stop(){this.started&&(this.dbUnsubscribe&&this.dbUnsubscribe(),this.timer.stop(),this.idleTimer.stop(),this.onDisconnect(),this.started=!1)}async onDisconnect(){let r=window.firebase.user;if(!r.email){console.log("no user email:",r);return}let o=new fn(r.email,"disconnectedAt");await Ir(this.docRef,o,hr())}async dispose(){super.dispose(),this.stop(),this.timer.dispose(),this.idleTimer.dispose()}};function aae(t){let e=Kc(t.id),[r,o]=N([]);if(L(()=>{let i=new SF(e);i.on("change",s=>o(s)),i.start();let a=()=>{document.hidden||document.visibilityState!=="visible"?i.stop():i.started||i.start()};return document.addEventListener("visibilitychange",a),()=>{i.dispose(),document.removeEventListener("visibilitychange",a)}},[e]),r.length===0)return null;function n(i){return i.disconnectedAt?i.disconnectedAt>i.lastViewedAt:!1}return p(QI,{className:"Viewers",limit:3,size:30,children:r.map(i=>{if(!i.photoURL){let a=i.email[0].toUpperCase();return p(da,{alt:i.email,size:24,radius:"xl",children:a})}return p(da,{className:ke("Viewers__viewer",n(i)&&"Viewers__viewer--disconnected"),src:i.photoURL,alt:i.email,size:24,radius:"xl"},i.email)})})}ge();function sae(t){let r=t.field.checkboxLabel||"Enabled",[o,n]=N(!1),i=ye(a=>{n(a),t.draft.updateKey(t.deepKey,a)},[t.deepKey]);return L(()=>t.draft.subscribe(t.deepKey,s=>{n(s)}),[]),p("div",{className:"DocEditor__BooleanField",children:p(gc,{label:r,onChange:a=>{let s=a.currentTarget;i(s.checked)},checked:o,size:"xs"})})}ge();function lae(t){let e=t.field,[r,o]=N(e.default||""),n=ye(i=>{i?(t.draft.updateKey(t.deepKey,i),o(i)):(o(""),t.draft.removeKey(t.deepKey)),t.onChange&&t.onChange(i)},[t.deepKey]);return L(()=>t.draft.subscribe(t.deepKey,a=>{o(a||"")}),[]),p("div",{className:"DocEditor__DateField",children:p("input",{type:"date",value:r,onChange:i=>{let a=i.currentTarget;n(a.value)}})})}ge();function dae(t){let[e,r]=N(""),o=ye(n=>{if(n){let i=Math.floor(new Date(n).getTime()),a=Tt.fromMillis(i);r(cae(a)),t.draft.updateKey(t.deepKey,a)}else r(""),t.draft.removeKey(t.deepKey)},[t.deepKey]);return L(()=>t.draft.subscribe(t.deepKey,i=>{r(i?cae(i):"")}),[]),p("div",{className:"DocEditor__DateTimeField",children:[p("input",{type:"datetime-local",value:e,onChange:n=>{let a=n.target.value;o(a)}}),p("div",{className:"DocEditor__DateTimeField__timezone",children:["timezone: ",Intl.DateTimeFormat().resolvedOptions().timeZone]})]})}function cae(t){let e=t.toDate();return e.setMinutes(e.getMinutes()-e.getTimezoneOffset()),e.toISOString().slice(0,16)}ge();ko();ll();ge();var TGe=["image/gif","image/jpeg","image/png","image/svg+xml","image/webp"],kGe=["#25262b","#868e96","#fa5252","#e64980","#be4bdb","#7950f2","#4c6ef5","#228be6","#15aabf","#12b886","#40c057","#82c91e","#fab005","#fd7e14"],NGe=QC("DisableTextareaAutosize"),Ih=ut(null);function Yn(t){let e=or(),r=H(null),[o,n]=N(!1),[i,a]=N({uploadedFile:t.file}),s=t.exts??(t.variant==="image"?TGe:[]);L(()=>{a(x=>({...x,uploadedFile:t.file}))},[t.file]);async function l(x){try{a(b=>({...b,state:"uploading",file:x}));let y=await Wc(x,{preserveFilename:t.preserveFilename,cacheControl:t.cacheControl});c(y)}catch(y){console.error("upload failed"),console.error(y),a(b=>({...b,state:"error"})),Se({title:"Upload failed",message:"Failed to upload: "+String(y),color:"red",autoClose:!1})}}function c(x){a(y=>({...y,uploadedFile:{...y.uploadedFile,...x,alt:x.alt||y.uploadedFile?.alt||""}})),t.onFileChange?.(x),a(y=>({...y,state:"finished"}))}function d(x,y){if(!x)return;y?.as==="svg"&&(x=new File([new Blob([x],{type:"image/svg+xml"})],"untitled.svg",{type:"image/svg+xml"})),x=x;let b=Ym(x.name);if(s.length>0&&!s.some(I=>I.endsWith(b)||I===`*/${b}`||I==="*/*"||I===x.type)){Se({title:"Invalid file type",message:`File type ${b} is not allowed.`,color:"red",autoClose:!0});return}l(x)}function u(){r.current?.focus()}function f(){if(i.uploadedFile)if(VS(i.uploadedFile.src)){let x=document.createElement("a");x.href=ute(i.uploadedFile.src),i.uploadedFile.filename&&(x.download=i.uploadedFile.filename),document.body.appendChild(x),x.click(),document.body.removeChild(x)}else window.open(i.uploadedFile.src,"_blank")}function m(){let x=document.createElement("input");x.type="file",s.length>0&&(x.accept=s.join(",")),x.onchange=y=>{let b=y.target;b.files&&b.files.length>0&&d(b.files[0])},x.click(),x.remove()}function h(){n(!0)}function g(x){let y=x||"";a(b=>b.uploadedFile?{...b,uploadedFile:{...b.uploadedFile,alt:y}}:b),t.onFileChange?.({...i.uploadedFile,alt:y})}async function _(x){let y=i?.uploadedFile;if(!y?.src||!x)return;a(I=>({...I,state:"uploading"}));let b=await x.sendPrompt(x.addMessage({sender:"user",blocks:[{type:"image",image:{src:y.src}}]}),[{text:"Generate alt text for the image above."},{media:{url:y.src}}],{mode:"altText"});b?.error?Se({title:"Sorry, something went wrong.",message:b.error,color:"red",autoClose:!0}):b?.message&&g(b.message),a(I=>({...I,state:"finished"}))}return p(Ih.Provider,{value:{fileUpload:i,variant:t.variant,alt:t.alt,acceptedFileTypes:s,handleFile:d,focusDropZone:u,requestGenerateAltText:_,requestFileUpload:m,requestFileDownload:f,requestPlaceholderModalOpen:h,setFileData:c,setAltText:g,removeFile:()=>{a(x=>({...x,uploadedFile:null})),t.onFileChange?.(null)}},children:[p(yc,{size:"sm",opened:o,onClose:()=>n(!1),title:"Placeholder image",centered:!0,overlayColor:e.colorScheme==="dark"?e.colors.dark[9]:e.colors.gray[2],children:p("form",{onSubmit:x=>{x.preventDefault();let y=new FormData(x.currentTarget),b=parseInt(y.get("width"),10),I=parseInt(y.get("height"),10),w=y.get("backgroundColor"),v=y.get("label")||`${b}x${I}`,E=`<svg xmlns="http://www.w3.org/2000/svg" width="${b}" height="${I}" viewBox="0 0 ${b} ${I}"><rect width="${b}" height="${I}" fill="${w}" />`;if(v){let R=b*.5/(v.length*.6);E+=`<text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" font-family="sans-serif" font-size="${R}" fill="#fff">${v}</text>`}E+="</svg>";let S=new TextEncoder().encode(E),A={src:`data:image/svg+xml;base64,${btoa(String.fromCharCode(...S))}`,filename:"placeholder.svg",width:b,height:I,alt:""};c(A),n(!1)},children:[p(bc,{gap:"xs",children:[p(Jt,{label:"Width",name:"width",type:"number",defaultValue:1600,"data-autofocus":!0}),p(Jt,{label:"Height",name:"height",type:"number",defaultValue:900}),p(Jt,{name:"label",label:"Label",defaultValue:"",autofocus:!0}),p(mw,{name:"backgroundColor",label:"Background color",format:"hex",defaultValue:"#868e96",swatches:kGe})]}),p("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"1rem"},children:p(Y,{variant:"filled",type:"submit",children:"Create"})})]})}),p("div",{className:"FileUploadField",children:[p(Yn.Dropzone,{ref:r}),i.uploadedFile?.src?p(Yn.Preview,{}):p(Yn.InvisibleDropzone,{children:p(Yn.Empty,{})})]})]})}Yn.Preview=()=>{let t=rt(Ih),[e,r]=N(!1),[o,n]=N(!1),i=t?.fileUpload,a=wy(),s=window.__ROOT_CTX.experiments||{};if(!i||!i.uploadedFile)return null;let l=uae(t?.fileUpload?.uploadedFile?.filename),[c,d]=N(!l),{uploadedFile:u}=i;return p("div",{className:"FileUploadField__Preview",children:[p("div",{className:"FileUploadField__Preview__InfoButton",children:[l&&p(Ee,{label:"Toggle file info",position:"top",withArrow:!0,children:p(Ke,{onClick:()=>d(f=>!f),size:"sm",variant:"outline",className:"FileUploadField__Preview__InfoButton__Icon",children:p(_M,{size:16})})}),p(Fe,{className:"FileUploadField__Preview__Menu",shadow:"sm",withinPortal:!1,closeOnItemClick:!1,control:p(Ke,{variant:"outline",size:"sm",radius:"sm",c:"black",className:"FileUploadField__Preview__InfoButton__Icon",children:p(Yu,{size:16})}),children:[p(Fe.Label,{size:"sm",children:"REPLACE"}),p(Fe.Item,{icon:t.variant==="image"?p(fS,{size:16}):p(Fs,{size:16}),onClick:()=>t.requestFileUpload(),children:["Upload ",t.variant==="image"?"image":"file"]}),fae(t.acceptedFileTypes)&&p(Fe.Item,{disabled:!u.src,icon:p(uS,{size:16}),onClick:()=>{t.requestPlaceholderModalOpen()},children:"Placeholder image"}),p(la,{}),p(Fe.Item,{disabled:u.src.startsWith("data:"),onClick:()=>{t?.requestFileDownload()},icon:p(lM,{size:16}),children:"Download file"}),p(Fe.Item,{closeOnItemClick:!1,icon:p(Ku,{size:16}),onClick:()=>{n(!1),navigator.clipboard.writeText(u.src).then(()=>n(!0)).finally(()=>setTimeout(()=>{n(!1)},2e3))},children:o?"Copied!":"Copy URL"}),p(la,{}),p(Fe.Item,{color:"red",onClick:()=>{t?.removeFile()},icon:p(fi,{size:16}),children:"Remove file"})]})]}),p("div",{className:ke("FileUploadField__Canvas",c&&"FileUploadField__Canvas--infoOpened",e&&"dragging"),style:OGe(u),onDragOver:f=>{f.preventDefault(),r(!0)},onDragLeave:f=>{f.preventDefault(),r(!1)},onDrop:f=>{f.preventDefault(),r(!1);let m=f.dataTransfer?.files[0];m&&t&&t.handleFile(m)},onPaste:f=>{f.preventDefault();let m=f.clipboardData?.files[0];if(m){t.handleFile(m);return}let h=f.clipboardData?.getData("text/plain");if(h&&pae(h)){t.handleFile(h,{as:"svg"});return}},children:[p(pa,{visible:t.fileUpload?.state==="uploading"}),c?p("div",{className:"FileUploadField__Canvas__Info",children:[p(sy,{size:16,className:"FileUploadField__Canvas__Info__Icon"}),p(Jr,{className:"FileUploadField__Canvas__InfoTable",verticalSpacing:"xs",fontSize:"xs",children:p("tbody",{children:[u.filename&&p("tr",{children:[p("td",{children:p("b",{children:"Name"})}),p("td",{children:u.filename})]}),u.uploadedAt&&p("tr",{children:[p("td",{children:p("b",{children:"Uploaded"})}),p("td",{children:[new Date(parseInt(u.uploadedAt,10)).toLocaleString(),u.uploadedBy&&p(we,{children:[" by ",u.uploadedBy]})]})]}),u.width!==void 0&&u.height!==void 0&&p("tr",{children:[p("td",{children:p("b",{children:"Dimensions"})}),p("td",{children:[u.width,"x",u.height]})]}),p("tr",{children:[p("td",{children:p("b",{children:"URL"})}),p("td",{children:p(ur,{readOnly:!0,value:u.src,size:"xs",autosize:!NGe,radius:0})})]})]})})]}):p(we,{children:[u.width!==void 0&&u.height!==void 0&&p(de,{radius:"sm",className:"FileUploadField__Preview__Info",children:[u.width,"x",u.height]}),PL(u.src)&&p("img",{onClick:()=>{t?.focusDropZone()},onDblClick:()=>{t?.requestFileUpload()},src:u.src,alt:u.alt||"Uploaded file preview",className:"FileUploadField__Preview__Image"}),AL(u.src)&&p(we,{children:p("video",{className:"FileUploadField__Preview__Image",controls:!0,muted:!0,preload:"metadata",children:p("source",{src:u.src,type:`video/${Ym(u.src)}`})})})]}),p("div",{className:"FileUploadField__reupload",children:p(Yn.UploadButton,{className:"FileUploadField__reupload__button",compact:!0})})]}),t.alt!==!1&&(u.alt||uae(u.filename)||t.variant==="image")&&p("div",{className:"DocEditor__ImageField__imagePreview__Image__Alt",children:[p(ur,{radius:0,className:"DocEditor__ImageField__imagePreview__Image__Alt__Textarea",value:u.alt,placeholder:"Alt text",size:"xs",autosize:!0,disabled:t.fileUpload?.state==="uploading",onChange:f=>{t?.setAltText(f.currentTarget.value)}}),s.ai&&!u.alt&&u.src?.startsWith("http")&&p(Ee,{label:"Generate alt text with AI",position:"top",withArrow:!0,children:p(Ke,{className:"DocEditor__ImageField__imagePreview__Image__Alt__AiButton",onClick:()=>{t.requestGenerateAltText(a)},disabled:t.fileUpload?.state==="uploading",children:p(ly,{size:20,stroke:"1.75"})})})]})]})};Yn.UploadButton=t=>{let e=rt(Ih),r=e?.fileUpload?.state==="uploading";if(!e)return null;let o=t.compact?14:16;return p(Y,{color:"black",variant:"default",disabled:r,size:t.compact?"compact-xs":"compact-md",className:ke("FileUploadField__FileUploadButton",t.compact&&"FileUploadField__FileUploadButton--compact"),onClick:()=>{e.requestFileUpload()},leftIcon:p(we,{children:r&&!t.compact?p(We,{size:o}):e?.variant==="image"?p(fS,{size:o}):p(Fs,{size:o})}),children:r&&!t.compact?"Uploading...":e?.fileUpload?.uploadedFile?.src?"Upload":"Paste, drop, or click to upload"})};Yn.InvisibleDropzone=t=>{let[e,r]=N(!1),o=rt(Ih);return o?p("div",{className:ke("FileUploadField__InvisibleDropzone",e&&"dragging"),onDragOver:n=>{n.preventDefault(),n.stopPropagation(),r(!0)},onDragLeave:n=>{n.preventDefault(),n.stopPropagation(),r(!1)},onDrop:n=>{n.preventDefault(),n.stopPropagation(),r(!1);let i=n.dataTransfer?.files[0];i&&o.handleFile(i)},children:t.children}):null};Yn.Empty=()=>{let t=rt(Ih);if(!t)return null;let e=t.acceptedFileTypes.map(r=>r.split("/").pop().split("+")[0].replaceAll(".","")).sort();return p("div",{className:"FileUploadField__Empty",children:[p("div",{className:"FileUploadField__Empty__Label",children:[p(Yn.UploadButton,{}),fae(t.acceptedFileTypes)&&p("div",{children:p(Ee,{label:"Create placeholder image",children:p(Ke,{className:"FileUploadField__Empty__Label__PlaceholderButton",onClick:()=>{t.requestPlaceholderModalOpen()},title:"Create placeholder image",children:p(uS,{size:16})})})})]}),t.acceptedFileTypes.length>0&&p("div",{children:p("div",{className:"FileUploadField__Empty__AcceptTypes",children:["Allowed file types: ",e.join(", ")]})})]})};Yn.Dropzone=K((t,e)=>{let[r,o]=N(!1),n=rt(Ih);return p("button",{ref:e,className:ke("FileUploadField__Dropzone",r&&"dragging"),onDblClick:()=>{n?.requestFileUpload()},onCopy:i=>{n?.fileUpload?.uploadedFile&&(i.preventDefault(),i.clipboardData?.setData("text/plain",n.fileUpload.uploadedFile.src),i.clipboardData?.setData("application/json",JSON.stringify(n.fileUpload.uploadedFile)))},onKeyDown:i=>{((i.metaKey||i.ctrlKey)&&i.key==="Backspace"||i.key==="Delete")&&(i.preventDefault(),n?.fileUpload?.uploadedFile&&n?.removeFile())},onDragOver:i=>{i.preventDefault(),o(!0)},onDragLeave:i=>{i.preventDefault(),o(!1)},onDrop:i=>{i.preventDefault(),o(!1);let a=i.dataTransfer?.files[0];a&&n&&n.handleFile(a)},onPaste:i=>{if(i.preventDefault(),!n)return;let a=i.clipboardData?.getData("application/json");if(a)try{let c=JSON.parse(a);if(c&&c.src&&c.filename&&n){console.log("Parsed JSON file:",c),n.setFileData(c);return}}catch(c){console.error("error parsing json",c)}let s=i.clipboardData?.files[0];if(s){n.handleFile(s);return}let l=i.clipboardData?.getData("text/plain");if(l&&pae(l)){n.handleFile(l,{as:"svg"});return}},title:"Drop or paste to upload a file"})});function uae(t){return t?PL(t)||AL(t):!1}function fae(t){return t.some(e=>e.startsWith("image/"))||t.length===0}function OGe(t){let e={};if(t.width&&t.height){e["--canvas-aspect-ratio"]=`${t.width} / ${t.height}`,e["--canvas-asset-width"]=`${t.width}px`;let r=Math.min(t.height,280);r<80&&(r=80),e["--canvas-max-height"]=`${r}px`}return t.canvasBgColor==="dark"&&(e["--canvas-bg-color"]="#000"),e}function pae(t){return/^(?:\uFEFF)?\s*(?:<!--[\s\S]*?-->\s*)*(?:<\?xml[\s\S]*?\?>\s*)?(?:<!DOCTYPE\s+svg[\s\S]*?>\s*)?<svg\b[^>]*?(?:\/>|>[\s\S]*?<\/svg>)\s*$/.test(t)}function mae(t){let e=t.field,[r,o]=N(null);return L(()=>{let n=t.draft.subscribe(t.deepKey,i=>{o(i)});return()=>{n()}},[]),p(Yn,{file:r,variant:"file",alt:e.alt,exts:e.exts,preserveFilename:e.preserveFilename,cacheControl:e.cacheControl,onFileChange:n=>{n?t.draft.updateKey(t.deepKey,n):t.draft.removeKey(t.deepKey),o(n)}})}ge();function hae(t){let e=t.field,[r,o]=N(null);return L(()=>{let n=t.draft.subscribe(t.deepKey,i=>{o(i)});return()=>{n()}},[]),p(Yn,{file:r,variant:"image",alt:e.alt,exts:e.exts,onFileChange:n=>{n?t.draft.updateKey(t.deepKey,n):t.draft.removeKey(t.deepKey),o(n)}})}ge();function gae(t){let e=t.field,[r,o]=N([]),n=(e.options||[]).map(a=>typeof a=="string"?{label:a,value:a}:{label:a.label??a.value??"",value:a.value??a.label??""}),i=ye(a=>{t.draft.updateKey(t.deepKey,a||[]),o(a)},[t.deepKey]);return L(()=>t.draft.subscribe(t.deepKey,s=>{o(s||[])}),[]),p("div",{className:"DocEditor__MultiSelectField",children:p(Pw,{data:n,size:"xs",radius:0,placeholder:e.placeholder,value:r,searchable:!0,creatable:e.creatable||!1,getCreateLabel:a=>`+ Add "${a}"`,onChange:a=>i(a),dropdownComponent:"div"})})}ge();function _ae(t){let e=t.field,[r,o]=N(e.default||0),n=ye(i=>{o(i),t.draft.updateKey(t.deepKey,i)},[t.deepKey]);return L(()=>t.draft.subscribe(t.deepKey,a=>{o(a)}),[]),p(Lw,{size:"xs",radius:0,value:r,onChange:i=>n(i),hideControls:!0})}ge();function wh(t){let e=t.field,[r,o]=N(""),n=ye(l=>{if(l){let[c,d]=l.split("/");t.draft.updateKey(t.deepKey,{id:l,collection:c,slug:d})}else t.draft.removeKey(t.deepKey);o(l)},[t.deepKey]);L(()=>t.draft.subscribe(t.deepKey,c=>{o(c?.id||"")}),[]);let i=tre();function a(){let l=r?r.split("/")[0]:e.initialCollection;i.open({collections:e.collections,initialCollection:l,onChange:c=>{n(c),i.close()}})}function s(){n("")}return p("div",{className:"ReferenceField",children:[r?p("div",{className:"ReferenceField__ref",children:[p(wh.Preview,{id:r}),p("div",{className:"ReferenceField__remove",children:p(Ee,{label:"Remove",children:p(Ke,{className:"ReferenceField__remove__icon",onClick:()=>s(),children:p(fi,{size:16})})})})]}):p("div",{className:"ReferenceField__none",children:"None selected"}),p(Y,{color:"dark",size:"xs",onClick:()=>a(),children:e.buttonLabel||"Select"})]})}wh.Preview=t=>{let[e,r]=N(!0),[o,n]=N(null);async function i(){r(!0),await qt(async()=>{let a=await qS(t.id);n(a)}),r(!1)}return L(()=>{i()},[t.id]),p("div",{className:"ReferenceField__Preview",children:e?p("div",{className:"ReferenceField__Preview__loading",children:p(We,{color:"gray",size:"sm"})}):o?p(wh.DocCard,{doc:o}):p("div",{className:"ReferenceField__Preview__notfound",children:['Doc Not found: "',t.id,'" (was it deleted?). Select a new doc or remove using the trash icon to the right.']})})};wh.DocCard=t=>{let e=t.doc,r=e.id||e.sys?.id||"";if(!r)return p("div",{className:"ReferenceField__DocCard ReferenceField__DocCard--error",children:JSON.stringify(e)});let o=r.split("/")[0],n=e.fields||{},i=window.__ROOT_CTX.collections[o];if(!i)throw new Error(`could not find collection: ${o}`);let a=wo(n,i.preview?.title||"meta.title"),s=wo(n,i.preview?.image||"meta.image")||i.preview?.defaultImage;return p("a",{className:"ReferenceField__DocCard",href:`/cms/content/${r}`,target:"_blank",children:[p("div",{className:"ReferenceField__DocCard__image",children:p(fa,{src:s?.src,width:80,height:60,withPlaceholder:!s?.src})}),p("div",{className:"ReferenceField__DocCard__content",children:[p("div",{className:"ReferenceField__DocCard__content__header",children:p("div",{className:"ReferenceField__DocCard__content__header__docId",children:r})}),p("div",{className:"ReferenceField__DocCard__content__title",children:a||"[UNTITLED]"})]})]})};ge();(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(".ce-hint--align-start{text-align:left}.ce-hint--align-center{text-align:center}.ce-hint__description{opacity:.6;margin-top:3px}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();var db=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ET(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function PGe(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function o(){return this instanceof o?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(o){var n=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(r,o,n.get?n:{enumerable:!0,get:function(){return t[o]}})}),r}function CF(){}Object.assign(CF,{default:CF,register:CF,revert:function(){},__esModule:!0});Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(t){let e=(this.document||this.ownerDocument).querySelectorAll(t),r=e.length;for(;--r>=0&&e.item(r)!==this;);return r>-1});Element.prototype.closest||(Element.prototype.closest=function(t){let e=this;if(!document.documentElement.contains(e))return null;do{if(e.matches(t))return e;e=e.parentElement||e.parentNode}while(e!==null);return null});Element.prototype.prepend||(Element.prototype.prepend=function(t){let e=document.createDocumentFragment();Array.isArray(t)||(t=[t]),t.forEach(r=>{let o=r instanceof Node;e.appendChild(o?r:document.createTextNode(r))}),this.insertBefore(e,this.firstChild)});Element.prototype.scrollIntoViewIfNeeded||(Element.prototype.scrollIntoViewIfNeeded=function(t){t=arguments.length===0?!0:!!t;let e=this.parentNode,r=window.getComputedStyle(e,null),o=parseInt(r.getPropertyValue("border-top-width")),n=parseInt(r.getPropertyValue("border-left-width")),i=this.offsetTop-e.offsetTop<e.scrollTop,a=this.offsetTop-e.offsetTop+this.clientHeight-o>e.scrollTop+e.clientHeight,s=this.offsetLeft-e.offsetLeft<e.scrollLeft,l=this.offsetLeft-e.offsetLeft+this.clientWidth-n>e.scrollLeft+e.clientWidth,c=i&&!a;(i||a)&&t&&(e.scrollTop=this.offsetTop-e.offsetTop-e.clientHeight/2-o+this.clientHeight/2),(s||l)&&t&&(e.scrollLeft=this.offsetLeft-e.offsetLeft-e.clientWidth/2-n+this.clientWidth/2),(i||a||s||l)&&!t&&this.scrollIntoView(c)});window.requestIdleCallback=window.requestIdleCallback||function(t){let e=Date.now();return setTimeout(function(){t({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-e))}})},1)};window.cancelIdleCallback=window.cancelIdleCallback||function(t){clearTimeout(t)};var AGe=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,r)=>(r&=63,r<36?e+=r.toString(36):r<62?e+=(r-26).toString(36).toUpperCase():r>62?e+="-":e+="_",e),""),Pae=(t=>(t.VERBOSE="VERBOSE",t.INFO="INFO",t.WARN="WARN",t.ERROR="ERROR",t))(Pae||{}),mt={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,LEFT:37,UP:38,DOWN:40,RIGHT:39,DELETE:46,META:91,SLASH:191},DGe={LEFT:0,WHEEL:1,RIGHT:2,BACKWARD:3,FORWARD:4};function xb(t,e,r="log",o,n="color: inherit"){if(!("console"in window)||!window.console[r])return;let i=["info","log","warn","error"].includes(r),a=[];switch(xb.logLevel){case"ERROR":if(r!=="error")return;break;case"WARN":if(!["error","warn"].includes(r))return;break;case"INFO":if(!i||t)return;break}o&&a.push(o);let s="Editor.js 2.31.0-rc.7",l=`line-height: 1em;
168
+ `}}];return{always:Fy(a,"always"),resting:Fy(a,"resting"),dragging:Fy(a,"dragging"),dropAnimating:Fy(a,"dropAnimating"),userCancel:Fy(a,"userCancel")}},ji=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?At:L,U2=()=>{let t=document.querySelector("head");return t||re(),t},Fne=t=>{let e=document.createElement("style");return t&&e.setAttribute("nonce",t),e.type="text/css",e};function w7e(t,e){let r=Ft(()=>I7e(t),[t]),o=H(null),n=H(null),i=He(Bo(u=>{let f=n.current;f||re(),f.textContent=u}),[]),a=He(u=>{let f=o.current;f||re(),f.textContent=u},[]);ji(()=>{!o.current&&!n.current||re();let u=Fne(e),f=Fne(e);return o.current=u,n.current=f,u.setAttribute(`${_h}-always`,t),f.setAttribute(`${_h}-dynamic`,t),U2().appendChild(u),U2().appendChild(f),a(r.always),i(r.resting),()=>{let m=h=>{let g=h.current;g||re(),U2().removeChild(g),h.current=null};m(o),m(n)}},[e,a,i,r.always,r.resting,t]);let s=He(()=>i(r.dragging),[i,r.dragging]),l=He(u=>{if(u==="DROP"){i(r.dropAnimating);return}i(r.userCancel)},[i,r.dropAnimating,r.userCancel]),c=He(()=>{n.current&&i(r.resting)},[i,r.resting]);return Ft(()=>({dragging:s,dropping:l,resting:c}),[s,l,c])}function Oie(t,e){return Array.from(t.querySelectorAll(e))}var Pie=t=>t&&t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView:window;function Qy(t){return t instanceof Pie(t).HTMLElement}function Aie(t,e){let r=`[${xh.contextId}="${t}"]`,o=Oie(document,r);if(!o.length)return null;let n=o.find(i=>i.getAttribute(xh.draggableId)===e);return!n||!Qy(n)?null:n}function E7e(t){let e=H({}),r=H(null),o=H(null),n=H(!1),i=He(function(f,m){let h={id:f,focus:m};return e.current[f]=h,function(){let _=e.current;_[f]!==h&&delete _[f]}},[]),a=He(function(f){let m=Aie(t,f);m&&m!==document.activeElement&&m.focus()},[t]),s=He(function(f,m){r.current===f&&(r.current=m)},[]),l=He(function(){o.current||n.current&&(o.current=requestAnimationFrame(()=>{o.current=null;let f=r.current;f&&a(f)}))},[a]),c=He(function(f){r.current=null;let m=document.activeElement;m&&m.getAttribute(xh.draggableId)===f&&(r.current=f)},[]);return ji(()=>(n.current=!0,function(){n.current=!1;let f=o.current;f&&cancelAnimationFrame(f)}),[]),Ft(()=>({register:i,tryRecordFocus:c,tryRestoreFocusRecorded:l,tryShiftRecord:s}),[i,c,l,s])}function S7e(){let t={draggables:{},droppables:{}},e=[];function r(u){return e.push(u),function(){let m=e.indexOf(u);m!==-1&&e.splice(m,1)}}function o(u){e.length&&e.forEach(f=>f(u))}function n(u){return t.draggables[u]||null}function i(u){let f=n(u);return f||re(),f}let a={register:u=>{t.draggables[u.descriptor.id]=u,o({type:"ADDITION",value:u})},update:(u,f)=>{let m=t.draggables[f.descriptor.id];m&&m.uniqueId===u.uniqueId&&(delete t.draggables[f.descriptor.id],t.draggables[u.descriptor.id]=u)},unregister:u=>{let f=u.descriptor.id,m=n(f);m&&u.uniqueId===m.uniqueId&&(delete t.draggables[f],t.droppables[u.descriptor.droppableId]&&o({type:"REMOVAL",value:u}))},getById:i,findById:n,exists:u=>!!n(u),getAllByType:u=>Object.values(t.draggables).filter(f=>f.descriptor.type===u)};function s(u){return t.droppables[u]||null}function l(u){let f=s(u);return f||re(),f}let c={register:u=>{t.droppables[u.descriptor.id]=u},unregister:u=>{let f=s(u.descriptor.id);f&&u.uniqueId===f.uniqueId&&delete t.droppables[u.descriptor.id]},getById:l,findById:s,exists:u=>!!s(u),getAllByType:u=>Object.values(t.droppables).filter(f=>f.descriptor.type===u)};function d(){t.draggables={},t.droppables={},e.length=0}return{draggable:a,droppable:c,subscribe:r,clean:d}}function C7e(){let t=Ft(S7e,[]);return L(()=>function(){t.clean()},[t]),t}var hF=k.createContext(null),qy=()=>{let t=document.body;return t||re(),t},T7e={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},k7e=t=>`rfd-announcement-${t}`;function N7e(t){let e=Ft(()=>k7e(t),[t]),r=H(null);return L(function(){let i=document.createElement("div");return r.current=i,i.id=e,i.setAttribute("aria-live","assertive"),i.setAttribute("aria-atomic","true"),pc(i.style,T7e),qy().appendChild(i),function(){setTimeout(function(){let l=qy();l.contains(i)&&l.removeChild(i),i===r.current&&(r.current=null)})}},[e]),He(n=>{let i=r.current;if(i){i.textContent=n;return}},[])}var O7e={separator:"::"};function gF(t,e=O7e){let r=k.useId();return Ft(()=>`${t}${e.separator}${r}`,[e.separator,t,r])}function P7e({contextId:t,uniqueId:e}){return`rfd-hidden-text-${t}-${e}`}function A7e({contextId:t,text:e}){let r=gF("hidden-text",{separator:"-"}),o=Ft(()=>P7e({contextId:t,uniqueId:r}),[r,t]);return L(function(){let i=document.createElement("div");return i.id=o,i.textContent=e,i.style.display="none",qy().appendChild(i),function(){let s=qy();s.contains(i)&&s.removeChild(i)}},[o,e]),o}var KC=k.createContext(null),D7e={react:"^18.0.0 || ^19.0.0"},R7e=/(\d+)\.(\d+)\.(\d+)/,Bne=t=>{let e=R7e.exec(t);e==null&&re();let r=Number(e[1]),o=Number(e[2]),n=Number(e[3]);return{major:r,minor:o,patch:n,raw:t}},M7e=(t,e)=>e.major>t.major?!0:e.major<t.major?!1:e.minor>t.minor?!0:e.minor<t.minor?!1:e.patch>=t.patch,L7e=(t,e)=>{let r=Bne(t),o=Bne(e);M7e(r,o)};var F7e=t=>{let e=t.doctype;e&&(e.name.toLowerCase(),e.publicId)};function Zy(t,e){}function B7e(){Zy(()=>{L7e(D7e.react,k.version),F7e(document)},[])}function _F(t){let e=H(t);return L(()=>{e.current=t}),e}function $7e(){let t=null;function e(){return!!t}function r(a){return a===t}function o(a){t&&re();let s={abandon:a};return t=s,s}function n(){t||re(),t=null}function i(){t&&(t.abandon(),n())}return{isClaimed:e,isActive:r,claim:o,release:n,tryAbandon:i}}function Wy(t){return t.phase==="IDLE"||t.phase==="DROP_ANIMATING"?!1:t.isDragging}var z7e=9,U7e=13,xF=27,Die=32,V7e=33,H7e=34,j7e=35,G7e=36,q7e=37,W7e=38,K7e=39,Y7e=40,X7e={[U7e]:!0,[z7e]:!0},Rie=t=>{X7e[t.keyCode]&&t.preventDefault()},YC=(()=>{let t="visibilitychange";return typeof document>"u"?t:[t,`ms${t}`,`webkit${t}`,`moz${t}`,`o${t}`].find(o=>`on${o}`in document)||t})(),Mie=0,$ne=5;function J7e(t,e){return Math.abs(e.x-t.x)>=$ne||Math.abs(e.y-t.y)>=$ne}var zne={type:"IDLE"};function Q7e({cancel:t,completed:e,getPhase:r,setPhase:o}){return[{eventName:"mousemove",fn:n=>{let{button:i,clientX:a,clientY:s}=n;if(i!==Mie)return;let l={x:a,y:s},c=r();if(c.type==="DRAGGING"){n.preventDefault(),c.actions.move(l);return}c.type!=="PENDING"&&re();let d=c.point;if(!J7e(d,l))return;n.preventDefault();let u=c.actions.fluidLift(l);o({type:"DRAGGING",actions:u})}},{eventName:"mouseup",fn:n=>{let i=r();if(i.type!=="DRAGGING"){t();return}n.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),e()}},{eventName:"mousedown",fn:n=>{r().type==="DRAGGING"&&n.preventDefault(),t()}},{eventName:"keydown",fn:n=>{if(r().type==="PENDING"){t();return}if(n.keyCode===xF){n.preventDefault(),t();return}Rie(n)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{r().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:n=>{let i=r();if(i.type==="IDLE"&&re(),i.actions.shouldRespectForcePress()){t();return}n.preventDefault()}},{eventName:YC,fn:t}]}function Z7e(t){let e=H(zne),r=H(id),o=Ft(()=>({eventName:"mousedown",fn:function(u){if(u.defaultPrevented||u.button!==Mie||u.ctrlKey||u.metaKey||u.shiftKey||u.altKey)return;let f=t.findClosestDraggableId(u);if(!f)return;let m=t.tryGetLock(f,a,{sourceEvent:u});if(!m)return;u.preventDefault();let h={x:u.clientX,y:u.clientY};r.current(),c(m,h)}}),[t]),n=Ft(()=>({eventName:"webkitmouseforcewillbegin",fn:d=>{if(d.defaultPrevented)return;let u=t.findClosestDraggableId(d);if(!u)return;let f=t.findOptionsForDraggable(u);f&&(f.shouldRespectForcePress||t.canGetLock(u)&&d.preventDefault())}}),[t]),i=He(function(){let u={passive:!1,capture:!0};r.current=Sa(window,[n,o],u)},[n,o]),a=He(()=>{e.current.type!=="IDLE"&&(e.current=zne,r.current(),i())},[i]),s=He(()=>{let d=e.current;a(),d.type==="DRAGGING"&&d.actions.cancel({shouldBlockNextClick:!0}),d.type==="PENDING"&&d.actions.abort()},[a]),l=He(function(){let u={capture:!0,passive:!1},f=Q7e({cancel:s,completed:a,getPhase:()=>e.current,setPhase:m=>{e.current=m}});r.current=Sa(window,f,u)},[s,a]),c=He(function(u,f){e.current.type!=="IDLE"&&re(),e.current={type:"PENDING",point:f,actions:u},l()},[l]);ji(function(){return i(),function(){r.current()}},[i])}function eje(){}var tje={[H7e]:!0,[V7e]:!0,[G7e]:!0,[j7e]:!0};function rje(t,e){function r(){e(),t.cancel()}function o(){e(),t.drop()}return[{eventName:"keydown",fn:n=>{if(n.keyCode===xF){n.preventDefault(),r();return}if(n.keyCode===Die){n.preventDefault(),o();return}if(n.keyCode===Y7e){n.preventDefault(),t.moveDown();return}if(n.keyCode===W7e){n.preventDefault(),t.moveUp();return}if(n.keyCode===K7e){n.preventDefault(),t.moveRight();return}if(n.keyCode===q7e){n.preventDefault(),t.moveLeft();return}if(tje[n.keyCode]){n.preventDefault();return}Rie(n)}},{eventName:"mousedown",fn:r},{eventName:"mouseup",fn:r},{eventName:"click",fn:r},{eventName:"touchstart",fn:r},{eventName:"resize",fn:r},{eventName:"wheel",fn:r,options:{passive:!0}},{eventName:YC,fn:r}]}function oje(t){let e=H(eje),r=Ft(()=>({eventName:"keydown",fn:function(i){if(i.defaultPrevented||i.keyCode!==Die)return;let a=t.findClosestDraggableId(i);if(!a)return;let s=t.tryGetLock(a,d,{sourceEvent:i});if(!s)return;i.preventDefault();let l=!0,c=s.snapLift();e.current();function d(){l||re(),l=!1,e.current(),o()}e.current=Sa(window,rje(c,d),{capture:!0,passive:!1})}}),[t]),o=He(function(){let i={passive:!1,capture:!0};e.current=Sa(window,[r],i)},[r]);ji(function(){return o(),function(){e.current()}},[o])}var V2={type:"IDLE"},nje=120,ije=.15;function aje({cancel:t,getPhase:e}){return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:r=>{r.preventDefault()}},{eventName:"keydown",fn:r=>{if(e().type!=="DRAGGING"){t();return}r.keyCode===xF&&r.preventDefault(),t()}},{eventName:YC,fn:t}]}function sje({cancel:t,completed:e,getPhase:r}){return[{eventName:"touchmove",options:{capture:!1},fn:o=>{let n=r();if(n.type!=="DRAGGING"){t();return}n.hasMoved=!0;let{clientX:i,clientY:a}=o.touches[0],s={x:i,y:a};o.preventDefault(),n.actions.move(s)}},{eventName:"touchend",fn:o=>{let n=r();if(n.type!=="DRAGGING"){t();return}o.preventDefault(),n.actions.drop({shouldBlockNextClick:!0}),e()}},{eventName:"touchcancel",fn:o=>{if(r().type!=="DRAGGING"){t();return}o.preventDefault(),t()}},{eventName:"touchforcechange",fn:o=>{let n=r();n.type==="IDLE"&&re();let i=o.touches[0];if(!i||!(i.force>=ije))return;let s=n.actions.shouldRespectForcePress();if(n.type==="PENDING"){s&&t();return}if(s){if(n.hasMoved){o.preventDefault();return}t();return}o.preventDefault()}},{eventName:YC,fn:t}]}function lje(t){let e=H(V2),r=H(id),o=He(function(){return e.current},[]),n=He(function(m){e.current=m},[]),i=Ft(()=>({eventName:"touchstart",fn:function(m){if(m.defaultPrevented)return;let h=t.findClosestDraggableId(m);if(!h)return;let g=t.tryGetLock(h,s,{sourceEvent:m});if(!g)return;let _=m.touches[0],{clientX:x,clientY:y}=_,b={x,y};r.current(),u(g,b)}}),[t]),a=He(function(){let m={capture:!0,passive:!1};r.current=Sa(window,[i],m)},[i]),s=He(()=>{let f=e.current;f.type!=="IDLE"&&(f.type==="PENDING"&&clearTimeout(f.longPressTimerId),n(V2),r.current(),a())},[a,n]),l=He(()=>{let f=e.current;s(),f.type==="DRAGGING"&&f.actions.cancel({shouldBlockNextClick:!0}),f.type==="PENDING"&&f.actions.abort()},[s]),c=He(function(){let m={capture:!0,passive:!1},h={cancel:l,completed:s,getPhase:o},g=Sa(window,sje(h),m),_=Sa(window,aje(h),m);r.current=function(){g(),_()}},[l,o,s]),d=He(function(){let m=o();m.type!=="PENDING"&&re();let h=m.actions.fluidLift(m.point);n({type:"DRAGGING",actions:h,hasMoved:!1})},[o,n]),u=He(function(m,h){o().type!=="IDLE"&&re();let g=setTimeout(d,nje);n({type:"PENDING",point:h,actions:m,longPressTimerId:g}),c()},[c,o,n,d]);ji(function(){return a(),function(){r.current();let h=o();h.type==="PENDING"&&(clearTimeout(h.longPressTimerId),n(V2))}},[o,a,n]),ji(function(){return Sa(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}function cje(t){}var dje=["input","button","textarea","select","option","optgroup","video","audio"];function Lie(t,e){if(e==null)return!1;if(dje.includes(e.tagName.toLowerCase()))return!0;let o=e.getAttribute("contenteditable");return o==="true"||o===""?!0:e===t?!1:Lie(t,e.parentElement)}function uje(t,e){let r=e.target;return Qy(r)?Lie(t,r):!1}var fje=t=>Ea(t.getBoundingClientRect()).center;function pje(t){return t instanceof Pie(t).Element}var mje=(()=>{let t="matches";return typeof document>"u"?t:[t,"msMatchesSelector","webkitMatchesSelector"].find(o=>o in Element.prototype)||t})();function Fie(t,e){return t==null?null:t[mje](e)?t:Fie(t.parentElement,e)}function hje(t,e){return t.closest?t.closest(e):Fie(t,e)}function gje(t){return`[${xh.contextId}="${t}"]`}function _je(t,e){let r=e.target;if(!pje(r))return null;let o=gje(t),n=hje(r,o);return!n||!Qy(n)?null:n}function xje(t,e){let r=_je(t,e);return r?r.getAttribute(xh.draggableId):null}function yje(t,e){let r=`[${Q2.contextId}="${t}"]`,n=Oie(document,r).find(i=>i.getAttribute(Q2.id)===e);return!n||!Qy(n)?null:n}function bje(t){t.preventDefault()}function BC({expected:t,phase:e,isLockActive:r,shouldWarn:o}){return!(!r()||t!==e)}function Bie({lockAPI:t,store:e,registry:r,draggableId:o}){if(t.isClaimed())return!1;let n=r.draggable.findById(o);return!(!n||!n.options.isEnabled||!Cie(e.getState(),o))}function vje({lockAPI:t,contextId:e,store:r,registry:o,draggableId:n,forceSensorStop:i,sourceEvent:a}){if(!Bie({lockAPI:t,store:r,registry:o,draggableId:n}))return null;let l=o.draggable.getById(n),c=yje(e,l.descriptor.id);if(!c||a&&!l.options.canDragInteractiveElements&&uje(c,a))return null;let d=t.claim(i||id),u="PRE_DRAG";function f(){return l.options.shouldRespectForcePress}function m(){return t.isActive(d)}function h(w,v){BC({expected:w,phase:u,isLockActive:m,shouldWarn:!0})&&r.dispatch(v())}let g=h.bind(null,"DRAGGING");function _(w){function v(){t.release(),u="COMPLETED"}u!=="PRE_DRAG"&&(v(),re()),r.dispatch(c8e(w.liftActionArgs)),u="DRAGGING";function E(C,S={shouldBlockNextClick:!1}){if(w.cleanup(),S.shouldBlockNextClick){let T=Sa(window,[{eventName:"click",fn:bje,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(T)}v(),r.dispatch(xie({reason:C}))}return{isActive:()=>BC({expected:"DRAGGING",phase:u,isLockActive:m,shouldWarn:!1}),shouldRespectForcePress:f,drop:C=>E("DROP",C),cancel:C=>E("CANCEL",C),...w.actions}}function x(w){let v=hh(C=>{g(()=>_ie({client:C}))});return{..._({liftActionArgs:{id:n,clientSelection:w,movementMode:"FLUID"},cleanup:()=>v.cancel(),actions:{move:v}}),move:v}}function y(){let w={moveUp:()=>g(x8e),moveRight:()=>g(b8e),moveDown:()=>g(y8e),moveLeft:()=>g(v8e)};return _({liftActionArgs:{id:n,clientSelection:fje(c),movementMode:"SNAP"},cleanup:id,actions:w})}function b(){BC({expected:"PRE_DRAG",phase:u,isLockActive:m,shouldWarn:!0})&&t.release()}return{isActive:()=>BC({expected:"PRE_DRAG",phase:u,isLockActive:m,shouldWarn:!1}),shouldRespectForcePress:f,fluidLift:x,snapLift:y,abort:b}}var Ije=[Z7e,oje,lje];function wje({contextId:t,store:e,registry:r,customSensors:o,enableDefaultSensors:n}){let i=[...n?Ije:[],...o||[]],a=N(()=>$7e())[0],s=He(function(_,x){Wy(_)&&!Wy(x)&&a.tryAbandon()},[a]);ji(function(){let _=e.getState();return e.subscribe(()=>{let y=e.getState();s(_,y),_=y})},[a,e,s]),ji(()=>a.tryAbandon,[a.tryAbandon]);let l=He(g=>Bie({lockAPI:a,registry:r,store:e,draggableId:g}),[a,r,e]),c=He((g,_,x)=>vje({lockAPI:a,registry:r,contextId:t,store:e,draggableId:g,forceSensorStop:_||null,sourceEvent:x&&x.sourceEvent?x.sourceEvent:null}),[t,a,r,e]),d=He(g=>xje(t,g),[t]),u=He(g=>{let _=r.draggable.findById(g);return _?_.options:null},[r.draggable]),f=He(function(){a.isClaimed()&&(a.tryAbandon(),e.getState().phase!=="IDLE"&&e.dispatch(lF()))},[a,e]),m=He(()=>a.isClaimed(),[a]),h=Ft(()=>({canGetLock:l,tryGetLock:c,findClosestDraggableId:d,findOptionsForDraggable:u,tryReleaseLock:f,isLockClaimed:m}),[l,c,d,u,f,m]);cje(i);for(let g=0;g<i.length;g++)i[g](h)}var Eje=t=>({onBeforeCapture:e=>{sl(()=>{t.onBeforeCapture&&t.onBeforeCapture(e)})},onBeforeDragStart:t.onBeforeDragStart,onDragStart:t.onDragStart,onDragEnd:t.onDragEnd,onDragUpdate:t.onDragUpdate}),Sje=t=>({...Gy,...t.autoScrollerOptions,durationDampening:{...Gy.durationDampening,...t.autoScrollerOptions}});function By(t){return t.current||re(),t.current}function Cje(t){let{contextId:e,setCallbacks:r,sensors:o,nonce:n,dragHandleUsageInstructions:i}=t,a=H(null);B7e();let s=_F(t),l=He(()=>Eje(s.current),[s]),c=He(()=>Sje(s.current),[s]),d=N7e(e),u=A7e({contextId:e,text:i}),f=w7e(e,n),m=He(T=>{By(a).dispatch(T)},[]),h=Ft(()=>S2({publishWhileDragging:u8e,updateDroppableScroll:p8e,updateDroppableIsEnabled:m8e,updateDroppableIsCombineEnabled:h8e,collectionStarting:f8e},m),[m]),g=C7e(),_=Ft(()=>t7e(g,h),[g,h]),x=Ft(()=>x7e({scrollWindow:r7e,scrollDroppable:_.scrollDroppable,getAutoScrollerOptions:c,...S2({move:_ie},m)}),[_.scrollDroppable,m,c]),y=E7e(e),b=Ft(()=>J8e({announce:d,autoScroller:x,dimensionMarshal:_,focusMarshal:y,getResponders:l,styleMarshal:f}),[d,x,_,y,l,f]);a.current=b;let I=He(()=>{let T=By(a);T.getState().phase!=="IDLE"&&T.dispatch(lF())},[]),w=He(()=>{let T=By(a).getState();return T.phase==="DROP_ANIMATING"?!0:T.phase==="IDLE"?!1:T.isDragging},[]),v=Ft(()=>({isDragging:w,tryAbort:I}),[w,I]);r(v);let E=He(T=>Cie(By(a).getState(),T),[]),C=He(()=>If(By(a).getState()),[]),S=Ft(()=>({marshal:_,focus:y,contextId:e,canLift:E,isMovementAllowed:C,dragHandleUsageInstructionsId:u,registry:g}),[e,_,u,y,E,C,g]);return wje({contextId:e,store:b,registry:g,customSensors:o||null,enableDefaultSensors:t.enableDefaultSensors!==!1}),L(()=>I,[I]),k.createElement(KC.Provider,{value:S},k.createElement(gne,{context:hF,store:b},t.children))}function Tje(){return k.useId()}function $ie(t){let e=Tje(),r=t.dragHandleUsageInstructions||zC.dragHandleUsageInstructions;return k.createElement(W2,null,o=>k.createElement(Cje,{nonce:t.nonce,contextId:e,setCallbacks:o,dragHandleUsageInstructions:r,enableDefaultSensors:t.enableDefaultSensors,sensors:t.sensors,onBeforeCapture:t.onBeforeCapture,onBeforeDragStart:t.onBeforeDragStart,onDragStart:t.onDragStart,onDragUpdate:t.onDragUpdate,onDragEnd:t.onDragEnd,autoScrollerOptions:t.autoScrollerOptions},t.children))}var Une={dragging:5e3,dropAnimating:4500},kje=(t,e)=>e?zy.drop(e.duration):t?zy.snap:zy.fluid,Nje=(t,e)=>{if(t)return e?jy.opacity.drop:jy.opacity.combining},Oje=t=>t.forceShouldAnimate!=null?t.forceShouldAnimate:t.mode==="SNAP";function Pje(t){let r=t.dimension.client,{offset:o,combineWith:n,dropping:i}=t,a=!!n,s=Oje(t),l=!!i,c=l?X2.drop(o,a):X2.moveTo(o);return{position:"fixed",top:r.marginBox.top,left:r.marginBox.left,boxSizing:"border-box",width:r.borderBox.width,height:r.borderBox.height,transition:kje(s,i),transform:c,opacity:Nje(a,l),zIndex:l?Une.dropAnimating:Une.dragging,pointerEvents:"none"}}function Aje(t){return{transform:X2.moveTo(t.offset),transition:t.shouldAnimateDisplacement?void 0:"none"}}function Dje(t){return t.type==="DRAGGING"?Pje(t):Aje(t)}function Rje(t,e,r=$o){let o=window.getComputedStyle(e),n=e.getBoundingClientRect(),i=M2(n,o),a=My(i,r),s={client:i,tagName:e.tagName.toLowerCase(),display:o.display},l={x:i.marginBox.width,y:i.marginBox.height};return{descriptor:t,placeholder:s,displaceBy:l,client:i,page:a}}function Mje(t){let e=gF("draggable"),{descriptor:r,registry:o,getDraggableRef:n,canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}=t,l=Ft(()=>({canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}),[i,s,a]),c=He(m=>{let h=n();return h||re(),Rje(r,h,m)},[r,n]),d=Ft(()=>({uniqueId:e,descriptor:r,options:l,getDimension:c}),[r,c,l,e]),u=H(d),f=H(!0);ji(()=>(o.draggable.register(u.current),()=>o.draggable.unregister(u.current)),[o.draggable]),ji(()=>{if(f.current){f.current=!1;return}let m=u.current;u.current=d,o.draggable.update(d,m)},[d,o.draggable])}var yF=k.createContext(null);function zie(t){t&&Qy(t)||re()}function Lje(t,e,r){Zy(()=>{function o(i){return`Draggable[id: ${i}]: `}let n=t.draggableId;n||re(!1),typeof n!="string"&&re(!1),Number.isInteger(t.index)||re(!1),t.mapped.type!=="DRAGGING"&&(zie(r()),t.isEnabled&&(Aie(e,n)||re(!1)))})}function Fje(t){}function HC(t){let e=rt(t);return e||re(),e}function Bje(t){t.preventDefault()}var $je=t=>{let e=H(null),r=He((v=null)=>{e.current=v},[]),o=He(()=>e.current,[]),{contextId:n,dragHandleUsageInstructionsId:i,registry:a}=HC(KC),{type:s,droppableId:l}=HC(yF),c=Ft(()=>({id:t.draggableId,index:t.index,type:s,droppableId:l}),[t.draggableId,t.index,s,l]),{children:d,draggableId:u,isEnabled:f,shouldRespectForcePress:m,canDragInteractiveElements:h,isClone:g,mapped:_,dropAnimationFinished:x}=t;if(Lje(t,n,o),Fje(g),!g){let v=Ft(()=>({descriptor:c,registry:a,getDraggableRef:o,canDragInteractiveElements:h,shouldRespectForcePress:m,isEnabled:f}),[c,a,o,h,m,f]);Mje(v)}let y=Ft(()=>f?{tabIndex:0,role:"button","aria-describedby":i,"data-rfd-drag-handle-draggable-id":u,"data-rfd-drag-handle-context-id":n,draggable:!1,onDragStart:Bje}:null,[n,i,u,f]),b=He(v=>{_.type==="DRAGGING"&&_.dropping&&v.propertyName==="transform"&&sl(x)},[x,_]),I=Ft(()=>{let v=Dje(_),E=_.type==="DRAGGING"&&_.dropping?b:void 0;return{innerRef:r,draggableProps:{"data-rfd-draggable-context-id":n,"data-rfd-draggable-id":u,style:v,onTransitionEnd:E},dragHandleProps:y}},[n,y,u,_,b,r]),w=Ft(()=>({draggableId:c.id,type:c.type,source:{index:c.index,droppableId:c.droppableId}}),[c.droppableId,c.id,c.index,c.type]);return k.createElement(k.Fragment,null,d(I,_.snapshot,w))},Uie=(t,e)=>t===e,Vie=t=>{let{combine:e,destination:r}=t;return r?r.droppableId:e?e.droppableId:null},zje=t=>t.combine?t.combine.draggableId:null,Uje=t=>t.at&&t.at.type==="COMBINE"?t.at.combine.draggableId:null;function Vje(){let t=Bo((n,i)=>({x:n,y:i})),e=Bo((n,i,a=null,s=null,l=null)=>({isDragging:!0,isClone:i,isDropAnimating:!!l,dropAnimation:l,mode:n,draggingOver:a,combineWith:s,combineTargetFor:null})),r=Bo((n,i,a,s,l=null,c=null,d=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:l,combineWith:c,mode:i,offset:n,dimension:a,forceShouldAnimate:d,snapshot:e(i,s,l,c,null)}}));return(n,i)=>{if(Wy(n)){if(n.critical.draggable.id!==i.draggableId)return null;let a=n.current.client.offset,s=n.dimensions.draggables[i.draggableId],l=Hi(n.impact),c=Uje(n.impact),d=n.forceShouldAnimate;return r(t(a.x,a.y),n.movementMode,s,i.isClone,l,c,d)}if(n.phase==="DROP_ANIMATING"){let a=n.completed;if(a.result.draggableId!==i.draggableId)return null;let s=i.isClone,l=n.dimensions.draggables[i.draggableId],c=a.result,d=c.mode,u=Vie(c),f=zje(c),h={duration:n.dropDuration,curve:dF.drop,moveTo:n.newHomeClientOffset,opacity:f?jy.opacity.drop:null,scale:f?jy.scale.drop:null};return{mapped:{type:"DRAGGING",offset:n.newHomeClientOffset,dimension:l,dropping:h,draggingOver:u,combineWith:f,mode:d,forceShouldAnimate:null,snapshot:e(d,s,u,f,h)}}}return null}}function Hie(t=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:t,combineWith:null}}var Hje={mapped:{type:"SECONDARY",offset:$o,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Hie(null)}};function jje(){let t=Bo((a,s)=>({x:a,y:s})),e=Bo(Hie),r=Bo((a,s=null,l)=>({mapped:{type:"SECONDARY",offset:a,combineTargetFor:s,shouldAnimateDisplacement:l,snapshot:e(s)}})),o=a=>a?r($o,a,!0):null,n=(a,s,l,c)=>{let d=l.displaced.visible[a],u=!!(c.inVirtualList&&c.effected[a]),f=GC(l),m=f&&f.draggableId===a?s:null;if(!d){if(!u)return o(m);if(l.displaced.invisible[a])return null;let _=yh(c.displacedBy.point),x=t(_.x,_.y);return r(x,m,!0)}if(u)return o(m);let h=l.displacedBy.point,g=t(h.x,h.y);return r(g,m,d.shouldAnimate)};return(a,s)=>{if(Wy(a))return a.critical.draggable.id===s.draggableId?null:n(s.draggableId,a.critical.draggable.id,a.impact,a.afterCritical);if(a.phase==="DROP_ANIMATING"){let l=a.completed;return l.result.draggableId===s.draggableId?null:n(s.draggableId,l.result.draggableId,l.impact,l.afterCritical)}return null}}var Gje=()=>{let t=Vje(),e=jje();return(o,n)=>t(o,n)||e(o,n)||Hje},qje={dropAnimationFinished:yie},Wje=A2(Gje,qje,null,{context:hF,areStatePropsEqual:Uie})($je);function jie(t){return HC(yF).isUsingCloneFor===t.draggableId&&!t.isClone?null:k.createElement(Wje,t)}function Gie(t){let e=typeof t.isDragDisabled=="boolean"?!t.isDragDisabled:!0,r=!!t.disableInteractiveElementBlocking,o=!!t.shouldRespectForcePress;return k.createElement(jie,pc({},t,{isClone:!1,isEnabled:e,canDragInteractiveElements:r,shouldRespectForcePress:o}))}var bF=t=>e=>t===e,Kje=bF("scroll"),Yje=bF("auto"),Xje=bF("visible"),Vne=(t,e)=>e(t.overflowX)||e(t.overflowY),Jje=(t,e)=>e(t.overflowX)&&e(t.overflowY),qie=t=>{let e=window.getComputedStyle(t),r={overflowX:e.overflowX,overflowY:e.overflowY};return Vne(r,Kje)||Vne(r,Yje)},Qje=()=>!1,Wie=t=>t==null?null:t===document.body?Qje()?t:null:t===document.documentElement?null:qie(t)?t:Wie(t.parentElement);var Z2=t=>({x:t.scrollLeft,y:t.scrollTop}),Kie=t=>t?window.getComputedStyle(t).position==="fixed"?!0:Kie(t.parentElement):!1,Zje=t=>{let e=Wie(t),r=Kie(t);return{closestScrollable:e,isFixedOnPage:r}},eGe=({descriptor:t,isEnabled:e,isCombineEnabled:r,isFixedOnPage:o,direction:n,client:i,page:a,closest:s})=>{let l=(()=>{if(!s)return null;let{scrollSize:f,client:m}=s,h=wie({scrollHeight:f.scrollHeight,scrollWidth:f.scrollWidth,height:m.paddingBox.height,width:m.paddingBox.width});return{pageMarginBox:s.page.marginBox,frameClient:m,scrollSize:f,shouldClipSubject:s.shouldClipSubject,scroll:{initial:s.scroll,current:s.scroll,max:h,diff:{value:$o,displacement:$o}}}})(),c=n==="vertical"?oF:rie,d=gh({page:a,withPlaceholder:null,axis:c,frame:l});return{descriptor:t,isCombineEnabled:r,isFixedOnPage:o,axis:c,isEnabled:e,client:i,page:a,frame:l,subject:d}},tGe=(t,e)=>{let r=L2(t);if(!e||t!==e)return r;let o=r.paddingBox.top-e.scrollTop,n=r.paddingBox.left-e.scrollLeft,i=o+e.scrollHeight,a=n+e.scrollWidth,l=MC({top:o,right:a,bottom:i,left:n},r.border);return LC({borderBox:l,margin:r.margin,border:r.border,padding:r.padding})},rGe=({ref:t,descriptor:e,env:r,windowScroll:o,direction:n,isDropDisabled:i,isCombineEnabled:a,shouldClipSubject:s})=>{let l=r.closestScrollable,c=tGe(t,l),d=My(c,o),u=(()=>{if(!l)return null;let m=L2(l),h={scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth};return{client:m,page:My(m,o),scroll:Z2(l),scrollSize:h,shouldClipSubject:s}})();return eGe({descriptor:e,isEnabled:!i,isCombineEnabled:a,isFixedOnPage:r.isFixedOnPage,direction:n,client:c,page:d,closest:u})},oGe={passive:!1},nGe={passive:!0},Hne=t=>t.shouldPublishImmediately?oGe:nGe,$C=t=>t&&t.env.closestScrollable||null;function iGe(t){let e=H(null),r=HC(KC),o=gF("droppable"),{registry:n,marshal:i}=r,a=_F(t),s=Ft(()=>({id:t.droppableId,type:t.type,mode:t.mode}),[t.droppableId,t.mode,t.type]),l=H(s),c=Ft(()=>Bo((I,w)=>{e.current||re();let v={x:I,y:w};i.updateDroppableScroll(s.id,v)}),[s.id,i]),d=He(()=>{let I=e.current;return!I||!I.env.closestScrollable?$o:Z2(I.env.closestScrollable)},[]),u=He(()=>{let I=d();c(I.x,I.y)},[d,c]),f=Ft(()=>hh(u),[u]),m=He(()=>{let I=e.current,w=$C(I);if(I&&w||re(),I.scrollOptions.shouldPublishImmediately){u();return}f()},[f,u]),h=He((I,w)=>{e.current&&re();let v=a.current,E=v.getDroppableRef();E||re();let C=Zje(E),S={ref:E,descriptor:s,env:C,scrollOptions:w};e.current=S;let T=rGe({ref:E,descriptor:s,env:C,windowScroll:I,direction:v.direction,isDropDisabled:v.isDropDisabled,isCombineEnabled:v.isCombineEnabled,shouldClipSubject:!v.ignoreContainerClipping}),A=C.closestScrollable;return A&&(A.setAttribute(Lne.contextId,r.contextId),A.addEventListener("scroll",m,Hne(S.scrollOptions))),T},[r.contextId,s,m,a]),g=He(()=>{let I=e.current,w=$C(I);return I&&w||re(),Z2(w)},[]),_=He(()=>{let I=e.current;I||re();let w=$C(I);e.current=null,w&&(f.cancel(),w.removeAttribute(Lne.contextId),w.removeEventListener("scroll",m,Hne(I.scrollOptions)))},[m,f]),x=He(I=>{let w=e.current;w||re();let v=$C(w);v||re(),v.scrollTop+=I.y,v.scrollLeft+=I.x},[]),y=Ft(()=>({getDimensionAndWatchScroll:h,getScrollWhileDragging:g,dragStopped:_,scroll:x}),[_,h,g,x]),b=Ft(()=>({uniqueId:o,descriptor:s,callbacks:y}),[y,s,o]);ji(()=>(l.current=b.descriptor,n.droppable.register(b),()=>{e.current&&_(),n.droppable.unregister(b)}),[y,s,_,b,i,n.droppable]),ji(()=>{e.current&&i.updateDroppableIsEnabled(l.current.id,!t.isDropDisabled)},[t.isDropDisabled,i]),ji(()=>{e.current&&i.updateDroppableIsCombineEnabled(l.current.id,t.isCombineEnabled)},[t.isCombineEnabled,i])}function H2(){}var jne={width:0,height:0,margin:iHe},aGe=({isAnimatingOpenOnMount:t,placeholder:e,animate:r})=>t||r==="close"?jne:{height:e.client.borderBox.height,width:e.client.borderBox.width,margin:e.client.margin},sGe=({isAnimatingOpenOnMount:t,placeholder:e,animate:r})=>{let o=aGe({isAnimatingOpenOnMount:t,placeholder:e,animate:r});return{display:e.display,boxSizing:"border-box",width:o.width,height:o.height,marginTop:o.margin.top,marginRight:o.margin.right,marginBottom:o.margin.bottom,marginLeft:o.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:r!=="none"?zy.placeholder:null}},lGe=t=>{let e=H(null),r=He(()=>{e.current&&(clearTimeout(e.current),e.current=null)},[]),{animate:o,onTransitionEnd:n,onClose:i,contextId:a}=t,[s,l]=N(t.animate==="open");L(()=>s?o!=="open"?(r(),l(!1),H2):e.current?H2:(e.current=setTimeout(()=>{e.current=null,l(!1)}),r):H2,[o,s,r]);let c=He(u=>{u.propertyName==="height"&&(n(),o==="close"&&i())},[o,i,n]),d=sGe({isAnimatingOpenOnMount:s,animate:t.animate,placeholder:t.placeholder});return k.createElement(t.placeholder.tagName,{style:d,"data-rfd-placeholder-context-id":a,onTransitionEnd:c,ref:t.innerRef})},cGe=k.memo(lGe);function j2(t){return typeof t=="boolean"}function G2(t,e){e.forEach(r=>r(t))}var dGe=[function({props:e}){e.droppableId||re(),typeof e.droppableId!="string"&&re()},function({props:e}){j2(e.isDropDisabled)||re(),j2(e.isCombineEnabled)||re(),j2(e.ignoreContainerClipping)||re()},function({getDroppableRef:e}){zie(e())}],uGe=[function({props:e,getPlaceholderRef:r}){!e.placeholder||r()}],fGe=[function({props:e}){e.renderClone||re()},function({getPlaceholderRef:e}){e()&&re()}];function pGe(t){Zy(()=>{G2(t,dGe),t.props.mode==="standard"&&G2(t,uGe),t.props.mode==="virtual"&&G2(t,fGe)})}var eF=class extends k.PureComponent{constructor(...e){super(...e),this.state={isVisible:!!this.props.on,data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{this.state.animate==="close"&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(e,r){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:r.isVisible?{isVisible:!0,data:r.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!e.on,data:e.on,animate:"none"}}render(){if(!this.state.isVisible)return null;let e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)}},mGe=t=>{let e=rt(KC);e||re();let{contextId:r,isMovementAllowed:o}=e,n=H(null),i=H(null),{children:a,droppableId:s,type:l,mode:c,direction:d,ignoreContainerClipping:u,isDropDisabled:f,isCombineEnabled:m,snapshot:h,useClone:g,updateViewportMaxScroll:_,getContainerForClone:x}=t,y=He(()=>n.current,[]),b=He((B=null)=>{n.current=B},[]),I=He(()=>i.current,[]),w=He((B=null)=>{i.current=B},[]);pGe({props:t,getDroppableRef:y,getPlaceholderRef:I});let v=He(()=>{o()&&_({maxScroll:Sie()})},[o,_]);iGe({droppableId:s,type:l,mode:c,direction:d,isDropDisabled:f,isCombineEnabled:m,ignoreContainerClipping:u,getDroppableRef:y});let E=Ft(()=>k.createElement(eF,{on:t.placeholder,shouldAnimate:t.shouldAnimatePlaceholder},({onClose:B,data:O,animate:R})=>k.createElement(cGe,{placeholder:O,onClose:B,innerRef:w,animate:R,contextId:r,onTransitionEnd:v})),[r,v,t.placeholder,t.shouldAnimatePlaceholder,w]),C=Ft(()=>({innerRef:b,placeholder:E,droppableProps:{"data-rfd-droppable-id":s,"data-rfd-droppable-context-id":r}}),[r,s,E,b]),S=g?g.dragging.draggableId:null,T=Ft(()=>({droppableId:s,type:l,isUsingCloneFor:S}),[s,S,l]);function A(){if(!g)return null;let{dragging:B,render:O}=g,R=k.createElement(jie,{draggableId:B.draggableId,index:B.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(D,F)=>O(D,F,B));return k.createPortal(R,x())}return k.createElement(yF.Provider,{value:T},a(C,h),A())};function hGe(){return document.body||re(),document.body}var Gne={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:hGe},Yie=t=>{let e={...t},r;for(r in Gne)t[r]===void 0&&(e={...e,[r]:Gne[r]});return e},q2=(t,e)=>t===e.droppable.type,qne=(t,e)=>e.draggables[t.draggable.id],gGe=()=>{let t={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},e={...t,shouldAnimatePlaceholder:!1},r=Bo(i=>({draggableId:i.id,type:i.type,source:{index:i.index,droppableId:i.droppableId}})),o=Bo((i,a,s,l,c,d)=>{let u=c.descriptor.id;if(c.descriptor.droppableId===i){let h=d?{render:d,dragging:r(c.descriptor)}:null,g={isDraggingOver:s,draggingOverWith:s?u:null,draggingFromThisWith:u,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!1,snapshot:g,useClone:h}}if(!a)return e;if(!l)return t;let m={isDraggingOver:s,draggingOverWith:u,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!0,snapshot:m,useClone:null}});return(i,a)=>{let s=Yie(a),l=s.droppableId,c=s.type,d=!s.isDropDisabled,u=s.renderClone;if(Wy(i)){let f=i.critical;if(!q2(c,f))return e;let m=qne(f,i.dimensions),h=Hi(i.impact)===l;return o(l,d,h,h,m,u)}if(i.phase==="DROP_ANIMATING"){let f=i.completed;if(!q2(c,f.critical))return e;let m=qne(f.critical,i.dimensions);return o(l,d,Vie(f.result)===l,Hi(f.impact)===l,m,u)}if(i.phase==="IDLE"&&i.completed&&!i.shouldFlush){let f=i.completed;if(!q2(c,f.critical))return e;let m=Hi(f.impact)===l,h=!!(f.impact.at&&f.impact.at.type==="COMBINE"),g=f.critical.droppable.id===l;return m?h?t:e:g?t:e}return e}},_Ge={updateViewportMaxScroll:_8e},Xie=A2(gGe,_Ge,(t,e,r)=>({...Yie(r),...t,...e}),{context:hF,areStatePropsEqual:Uie})(mGe);ko();ge();function vF(t){return typeof t=="object"&&!Array.isArray(t)&&t!==null}function IF(t){return vF(t)&&Array.isArray(t.blocks)&&t.blocks.length>0}function eb(t){if(IF(t)&&(t.time=Date.now()),vF(t))for(let e in t)Object.hasOwn(t,e)&&eb(t[e]);else Array.isArray(t)&&t.forEach(e=>eb(e));return t}ko();ge();function xGe(){return new URLSearchParams(window.location.search).get("deeplink")||""}var Jie=ut(null);function Qie(t){let[e,r]=N(xGe()),o={value:e,setValue:r};return L(()=>{let n=i=>{let a=i.data;if(a.scrollToDeeplink){let s=a.scrollToDeeplink.deepKey,l=document.getElementById(s);if(l){r(s),wF(l,{behavior:"smooth",force:!0});let c=new URL(window.location.href);c.searchParams.set("deeplink",s),window.history.replaceState({},"",c.toString())}}};return window.addEventListener("message",n),()=>{window.removeEventListener("message",n)}},[]),p(Jie.Provider,{value:o,children:t.children})}function tb(){let t=rt(Jie);if(!t)throw new Error("[useDeeplink()] DeeplinkContext not found, be sure to add <DeeplinkProvider>");return t}function yGe(t){let e=t;for(;e&&e!==document.body;){let r=e.closest("details");if(r&&r.parentElement)r.open=!0,e=r.parentElement;else break}}function bGe(t){let e=[],r=t;for(;r&&r!==document.body;){let o=r.closest(".DocEditor__ArrayField__item");if(!o)break;let n=o.querySelector(".DocEditor__ArrayField__item__header");if(n&&!e.includes(n))e.push(n),r=o.parentElement;else break}return e}function wF(t,e={behavior:"auto"}){setTimeout(()=>{let r=document.querySelector(".DocumentPage__side");if(!r||r.scrollTop>0&&!e.force)return;yGe(t);let n=bGe(t).reduce((a,s)=>a+s.offsetHeight,0),i=t.offsetTop-n;r.scroll({top:i,behavior:e.behavior})},e.force?0:300)}function Zie(t){let e=new URL(window.location.href);return e.searchParams.set("deeplink",t),e.toString()}ge();function XC(t,e){let r;return(...o)=>{window.clearTimeout(r),r=window.setTimeout(()=>{t(...o)},e)}}var ld=class{constructor(){this.events=new Map}on(e,r){let o=this.events.get(e)??[];return this.events.set(e,[...o,r]),()=>{this.off(e,r)}}off(e,r){let o=this.events.get(e)??[],n=o.indexOf(r);n>=0&&o.splice(n,1)}dispatch(e,...r){(this.events.get(e)??[]).forEach(n=>n(...r))}dispose(){this.events.clear()}};var eae=3*Io.second,vGe=5*Io.minute;var IGe=30,EF=class extends ld{constructor(r){super();this.pendingUpdates=new Map;this.cachedData={};this.subscribers={};this.saveState="NO_CHANGES";this.autolock=!1;this.autolockReason="autolock";this.autolockApplied=!1;this.started=!1;this.queueChanges=XC(()=>this.flush(),eae);this.projectId=window.__ROOT_CTX.rootConfig.projectId;let[o,n]=r.split("/");this.docId=r,this.collectionId=o,this.slug=n,this.db=window.firebase.db,this.docRef=Ae(this.db,"Projects",this.projectId,"Collections",o,"Drafts",n);let i=window.__ROOT_CTX.collections[o];i&&(this.autolock=!!i.autolock,i.autolockReason&&(this.autolockReason=i.autolockReason))}async start(){this.started||(this.started=!0,this.dbUnsubscribe=Fc(this.docRef,r=>{if(r.metadata.hasPendingWrites)return;let o=r.data();this.pendingUpdates.size>0&&JC(o,Object.fromEntries(this.pendingUpdates)),this.cachedData=o,this.notifySubscribers()}))}stop(){this.started&&(this.dbUnsubscribe&&this.dbUnsubscribe(),this.flush(),this.started=!1)}onChange(r){return this.on("CHANGE",r)}onSaveStateChange(r){return this.on("SAVE_STATE_CHANGE",r)}onFlush(r){return this.on("FLUSH",r)}subscribe(r,o){return this.subscribers[r]??=new Set,this.subscribers[r].add(o),o(this.getValue(r)),()=>{this.subscribers[r].delete(o),this.subscribers[r].size===0&&delete this.subscribers[r]}}notifySubscribers(){let r=this.cachedData;this.dispatch("CHANGE",r),tae(this.subscribers,r)}getValue(r){return wo(this.cachedData,r)}async updateKey(r,o){await this.updateKeys({[r]:o})}async updateKeys(r){for(let o in r)this.pendingUpdates.set(o,r[o]);JC(this.cachedData,r),this.dispatch("CHANGE",this.cachedData),this.setSaveState("UPDATE_PENDING"),this.queueChanges()}async removeKey(r){this.pendingUpdates.set(r,Lo()),JC(this.cachedData,{[r]:void 0}),this.dispatch("CHANGE",this.cachedData),this.setSaveState("UPDATE_PENDING"),this.queueChanges()}setSaveState(r){let o=this.saveState;r==="SAVED"&&o!=="SAVING"||(this.saveState=r,r==="SAVED"&&window.setTimeout(()=>{this.saveState==="SAVED"&&this.setSaveState("NO_CHANGES")},eae),this.dispatch("SAVE_STATE_CHANGE",r))}async flush(){if(this.pendingUpdates.size===0)return;let r=Object.fromEntries(this.pendingUpdates);r["sys.modifiedAt"]=hr(),r["sys.modifiedBy"]=window.firebase.user.email,this.autolock&&!this.autolockApplied&&!this.cachedData?.sys?.publishingLocked&&(this.autolockApplied=!0,r["sys.publishingLocked"]={lockedAt:hr(),lockedBy:window.firebase.user.email,reason:this.autolockReason}),this.pendingUpdates.clear();try{this.setSaveState("SAVING"),await Ir(this.docRef,r),this.setSaveState("SAVED"),this.dispatch("FLUSH"),Et("doc.save",{metadata:{docId:this.docId},throttle:vGe,throttleId:this.docId})}catch(o){console.error("failed to update doc"),console.error(o),this.setSaveState("ERROR"),Se({title:"Failed to save",message:`Failed to save changes to ${this.slug}`,color:"red",autoClose:!1});for(let n in r)n.startsWith("sys.")||this.pendingUpdates.has(n)||(this.pendingUpdates.set(n,r[n]),this.queueChanges(),console.log("re-queued updates"))}}getLocales(){return this.cachedData&&this.cachedData.sys?.locales?this.cachedData.sys.locales:["en"]}setLocales(r){this.updateKey("sys.locales",r)}async dispose(){super.dispose(),this.stop()}};function JC(t,e){for(let r in e){let o=e[r];if(r.includes(".")){let[n,i]=wGe(r);t[n]??={},JC(t[n],{[i]:o})}else typeof o>"u"?delete t[r]:t[r]=o}}function tae(t,e,r){r||(r=[]);for(let o in e){let n=[...r,o],i=n.join("."),a=t[i],s=e[o];a&&Array.from(a).forEach(l=>{l(s)}),Jc(s)&&tae(t,s,n)}}function wGe(t){let e=t.indexOf("."),r=t.substring(0,e),o=t.substring(e+1);return[r,o]}function rae(t){let[e,r]=N(!0),[o,n]=N({}),i=Be(()=>new EF(t),[t]),[a,s]=N("NO_CHANGES");return L(()=>{i.onChange(c=>{n(c),r(!1),Sy(t,c)}),i.onSaveStateChange(c=>s(c)),i.start();let l=()=>{let c;document.hidden||document.visibilityState!=="visible"?c=window.setTimeout(()=>{i.stop()},IGe*1e3):(c&&(clearTimeout(c),c=void 0),i.started||(r(!0),i.start()))};return document.addEventListener("visibilitychange",l),()=>{i.dispose(),document.removeEventListener("visibilitychange",l)}},[t]),{loading:e,saveState:a,controller:i,data:o}}function mi(t,e){if(!SGe())return;let r=EGe();r&&r.contentWindow?.postMessage({highlightNode:{deepKey:t,options:e}},"*")}function EGe(){return document.querySelector('iframe[title="iframe preview"]')}function SGe(){let t=window.__ROOT_CTX.preview;return[!0,"to-preview"].includes(t.channel)}function oae(t,e){return t.replace(/\{(.+?)\}/g,(r,o)=>{let n=e(o);return n??r})}function rb(t,e){if(e==null)return!0;switch(t.type){case"string":case"select":case"date":case"datetime":return e==="";case"multiselect":return!Array.isArray(e)||e.length===0;case"number":case"boolean":return e==null;case"image":case"file":return!e||!e.src;case"reference":return!e||!e.id;case"richtext":return!IF(e);case"object":if(!Jc(e)||Object.keys(e).length===0)return!0;for(let r of t.fields||[])if(r.id&&!rb(r,e[r.id]))return!1;return!0;case"array":if(!Jc(e)||!Array.isArray(e._array)||e._array.length===0)return!0;for(let r of e._array)if(!rb(t.of,e[r]))return!1;return!1;case"oneof":{if(!Jc(e)||!e._type)return!0;let r=(t.types||[]).find(o=>o.name===e._type);if(!r)return!0;for(let o of r.fields||[])if(o.id&&!rb(o,e[o.id]))return!1;return!0}default:return!1}}function QC(t){let r=new URLSearchParams(window.location.search).get("e");return r?r.split(",").includes(t):!1}ge();function nae(t,e){let r=!1;return(...o)=>{r||(t(...o),r=!0,setTimeout(()=>{r=!1},e))}}var ob=class extends ld{constructor(r){super();this.interval=0;this.timeout=0;this.interval=r}start(){this.timeout=window.setTimeout(()=>{this.tick()},this.interval)}tick(){this.dispatch("tick"),this.start()}reset(){this.stop(),this.start()}stop(){this.timeout&&(window.clearTimeout(this.timeout),this.timeout=0)}};var CGe=60*Io.second,iae=5*Io.minute,SF=class extends ld{constructor(r){super();this.started=!1;this.timer=new ob(CGe);this.idleTimer=new ob(iae);this.onUserInteraction=nae(()=>{this.idleTimer.reset()},5e3);this.id=r;let o=window.__ROOT_CTX.rootConfig.projectId,n=window.firebase.db;this.docRef=Ae(n,"Projects",o,"Viewers",r),this.timer.on("tick",()=>this.onTick()),this.idleTimer.on("tick",()=>this.onIdle()),window.addEventListener("mousemove",this.onUserInteraction),window.addEventListener("keypress",this.onUserInteraction)}async start(){this.started||(this.started=!0,this.dbUnsubscribe=Fc(this.docRef,r=>{let o=r.data();this.onData(o)}),this.onTick(),this.timer.start())}onData(r){let o=window.firebase.user,n=Tt.now(),i=Object.values(r).filter(a=>!(a.email===o.email||n.toMillis()-a.lastViewedAt.toMillis()>iae));this.dispatch("change",i)}async onTick(){let r=window.firebase.user;if(!r.email){console.log("no user email:",r);return}await Lc(this.docRef,{[r.email]:{email:r.email,photoURL:r.photoURL,lastViewedAt:hr()}},{merge:!0})}async onIdle(){this.stop()}stop(){this.started&&(this.dbUnsubscribe&&this.dbUnsubscribe(),this.timer.stop(),this.idleTimer.stop(),this.onDisconnect(),this.started=!1)}async onDisconnect(){let r=window.firebase.user;if(!r.email){console.log("no user email:",r);return}let o=new fn(r.email,"disconnectedAt");await Ir(this.docRef,o,hr())}async dispose(){super.dispose(),this.stop(),this.timer.dispose(),this.idleTimer.dispose()}};function aae(t){let e=Kc(t.id),[r,o]=N([]);if(L(()=>{let i=new SF(e);i.on("change",s=>o(s)),i.start();let a=()=>{document.hidden||document.visibilityState!=="visible"?i.stop():i.started||i.start()};return document.addEventListener("visibilitychange",a),()=>{i.dispose(),document.removeEventListener("visibilitychange",a)}},[e]),r.length===0)return null;function n(i){return i.disconnectedAt?i.disconnectedAt>i.lastViewedAt:!1}return p(QI,{className:"Viewers",limit:3,size:30,children:r.map(i=>{if(!i.photoURL){let a=i.email[0].toUpperCase();return p(da,{alt:i.email,size:24,radius:"xl",children:a})}return p(da,{className:ke("Viewers__viewer",n(i)&&"Viewers__viewer--disconnected"),src:i.photoURL,alt:i.email,size:24,radius:"xl"},i.email)})})}ge();function sae(t){let r=t.field.checkboxLabel||"Enabled",[o,n]=N(!1),i=ye(a=>{n(a),t.draft.updateKey(t.deepKey,a)},[t.deepKey]);return L(()=>t.draft.subscribe(t.deepKey,s=>{n(s)}),[]),p("div",{className:"DocEditor__BooleanField",children:p(gc,{label:r,onChange:a=>{let s=a.currentTarget;i(s.checked)},checked:o,size:"xs"})})}ge();function lae(t){let e=t.field,[r,o]=N(e.default||""),n=ye(i=>{i?(t.draft.updateKey(t.deepKey,i),o(i)):(o(""),t.draft.removeKey(t.deepKey)),t.onChange&&t.onChange(i)},[t.deepKey]);return L(()=>t.draft.subscribe(t.deepKey,a=>{o(a||"")}),[]),p("div",{className:"DocEditor__DateField",children:p("input",{type:"date",value:r,onChange:i=>{let a=i.currentTarget;n(a.value)}})})}ge();function dae(t){let[e,r]=N(""),o=ye(n=>{if(n){let i=Math.floor(new Date(n).getTime()),a=Tt.fromMillis(i);r(cae(a)),t.draft.updateKey(t.deepKey,a)}else r(""),t.draft.removeKey(t.deepKey)},[t.deepKey]);return L(()=>t.draft.subscribe(t.deepKey,i=>{r(i?cae(i):"")}),[]),p("div",{className:"DocEditor__DateTimeField",children:[p("input",{type:"datetime-local",value:e,onChange:n=>{let a=n.target.value;o(a)}}),p("div",{className:"DocEditor__DateTimeField__timezone",children:["timezone: ",Intl.DateTimeFormat().resolvedOptions().timeZone]})]})}function cae(t){let e=t.toDate();return e.setMinutes(e.getMinutes()-e.getTimezoneOffset()),e.toISOString().slice(0,16)}ge();ko();ll();ge();var TGe=["image/gif","image/jpeg","image/png","image/svg+xml","image/webp"],kGe=["#25262b","#868e96","#fa5252","#e64980","#be4bdb","#7950f2","#4c6ef5","#228be6","#15aabf","#12b886","#40c057","#82c91e","#fab005","#fd7e14"],NGe=QC("DisableTextareaAutosize"),Ih=ut(null);function Yn(t){let e=or(),r=H(null),[o,n]=N(!1),[i,a]=N({uploadedFile:t.file}),s=t.exts??(t.variant==="image"?TGe:[]);L(()=>{a(x=>({...x,uploadedFile:t.file}))},[t.file]);async function l(x){try{a(b=>({...b,state:"uploading",file:x}));let y=await Wc(x,{preserveFilename:t.preserveFilename,cacheControl:t.cacheControl});c(y)}catch(y){console.error("upload failed"),console.error(y),a(b=>({...b,state:"error"})),Se({title:"Upload failed",message:"Failed to upload: "+String(y),color:"red",autoClose:!1})}}function c(x){a(y=>({...y,uploadedFile:{...y.uploadedFile,...x,alt:x.alt||y.uploadedFile?.alt||""}})),t.onFileChange?.(x),a(y=>({...y,state:"finished"}))}function d(x,y){if(!x)return;y?.as==="svg"&&(x=new File([new Blob([x],{type:"image/svg+xml"})],"untitled.svg",{type:"image/svg+xml"})),x=x;let b=Ym(x.name);if(s.length>0&&!s.some(I=>I.endsWith(b)||I===`*/${b}`||I==="*/*"||I===x.type)){Se({title:"Invalid file type",message:`File type ${b} is not allowed.`,color:"red",autoClose:!0});return}l(x)}function u(){r.current?.focus()}function f(){if(i.uploadedFile)if(VS(i.uploadedFile.src)){let x=document.createElement("a");x.href=ute(i.uploadedFile.src),i.uploadedFile.filename&&(x.download=i.uploadedFile.filename),document.body.appendChild(x),x.click(),document.body.removeChild(x)}else window.open(i.uploadedFile.src,"_blank")}function m(){let x=document.createElement("input");x.type="file",s.length>0&&(x.accept=s.join(",")),x.onchange=y=>{let b=y.target;b.files&&b.files.length>0&&d(b.files[0])},x.click(),x.remove()}function h(){n(!0)}function g(x){let y=x||"";a(b=>b.uploadedFile?{...b,uploadedFile:{...b.uploadedFile,alt:y}}:b),t.onFileChange?.({...i.uploadedFile,alt:y})}async function _(x){let y=i?.uploadedFile;if(!y?.src||!x)return;a(I=>({...I,state:"uploading"}));let b=await x.sendPrompt(x.addMessage({sender:"user",blocks:[{type:"image",image:{src:y.src}}]}),[{text:"Generate alt text for the image above."},{media:{url:y.src}}],{mode:"altText"});b?.error?Se({title:"Sorry, something went wrong.",message:b.error,color:"red",autoClose:!0}):b?.message&&g(b.message),a(I=>({...I,state:"finished"}))}return p(Ih.Provider,{value:{fileUpload:i,variant:t.variant,alt:t.alt,acceptedFileTypes:s,handleFile:d,focusDropZone:u,requestGenerateAltText:_,requestFileUpload:m,requestFileDownload:f,requestPlaceholderModalOpen:h,setFileData:c,setAltText:g,removeFile:()=>{a(x=>({...x,uploadedFile:null})),t.onFileChange?.(null)}},children:[p(yc,{size:"sm",opened:o,onClose:()=>n(!1),title:"Placeholder image",centered:!0,overlayColor:e.colorScheme==="dark"?e.colors.dark[9]:e.colors.gray[2],children:p("form",{onSubmit:x=>{x.preventDefault();let y=new FormData(x.currentTarget),b=parseInt(y.get("width"),10),I=parseInt(y.get("height"),10),w=y.get("backgroundColor"),v=y.get("label")||`${b}x${I}`,E=`<svg xmlns="http://www.w3.org/2000/svg" width="${b}" height="${I}" viewBox="0 0 ${b} ${I}"><rect width="${b}" height="${I}" fill="${w}" />`;if(v){let R=b*.5/(v.length*.6);E+=`<text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" font-family="sans-serif" font-size="${R}" fill="#fff">${v}</text>`}E+="</svg>";let S=new TextEncoder().encode(E),A={src:`data:image/svg+xml;base64,${btoa(String.fromCharCode(...S))}`,filename:"placeholder.svg",width:b,height:I,alt:""};c(A),n(!1)},children:[p(bc,{gap:"xs",children:[p(Jt,{label:"Width",name:"width",type:"number",defaultValue:1600,"data-autofocus":!0}),p(Jt,{label:"Height",name:"height",type:"number",defaultValue:900}),p(Jt,{name:"label",label:"Label",defaultValue:"",autofocus:!0}),p(mw,{name:"backgroundColor",label:"Background color",format:"hex",defaultValue:"#868e96",swatches:kGe})]}),p("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"1rem"},children:p(Y,{variant:"filled",type:"submit",children:"Create"})})]})}),p("div",{className:"FileUploadField",children:[p(Yn.Dropzone,{ref:r}),i.uploadedFile?.src?p(Yn.Preview,{}):p(Yn.InvisibleDropzone,{children:p(Yn.Empty,{})})]})]})}Yn.Preview=()=>{let t=rt(Ih),[e,r]=N(!1),[o,n]=N(!1),i=t?.fileUpload,a=wy(),s=window.__ROOT_CTX.experiments||{};if(!i||!i.uploadedFile)return null;let l=uae(t?.fileUpload?.uploadedFile?.filename),[c,d]=N(!l),{uploadedFile:u}=i;return p("div",{className:"FileUploadField__Preview",children:[p("div",{className:"FileUploadField__Preview__InfoButton",children:[l&&p(Ee,{label:"Toggle file info",position:"top",withArrow:!0,children:p(Ke,{onClick:()=>d(f=>!f),size:"sm",variant:"outline",className:"FileUploadField__Preview__InfoButton__Icon",children:p(_M,{size:16})})}),p(Fe,{className:"FileUploadField__Preview__Menu",shadow:"sm",withinPortal:!1,closeOnItemClick:!1,control:p(Ke,{variant:"outline",size:"sm",radius:"sm",c:"black",className:"FileUploadField__Preview__InfoButton__Icon",children:p(Yu,{size:16})}),children:[p(Fe.Label,{size:"sm",children:"REPLACE"}),p(Fe.Item,{icon:t.variant==="image"?p(fS,{size:16}):p(Fs,{size:16}),onClick:()=>t.requestFileUpload(),children:["Upload ",t.variant==="image"?"image":"file"]}),fae(t.acceptedFileTypes)&&p(Fe.Item,{disabled:!u.src,icon:p(uS,{size:16}),onClick:()=>{t.requestPlaceholderModalOpen()},children:"Placeholder image"}),p(la,{}),p(Fe.Item,{disabled:u.src.startsWith("data:"),onClick:()=>{t?.requestFileDownload()},icon:p(lM,{size:16}),children:"Download file"}),p(Fe.Item,{closeOnItemClick:!1,icon:p(Ku,{size:16}),onClick:()=>{n(!1),navigator.clipboard.writeText(u.src).then(()=>n(!0)).finally(()=>setTimeout(()=>{n(!1)},2e3))},children:o?"Copied!":"Copy URL"}),p(la,{}),p(Fe.Item,{color:"red",onClick:()=>{t?.removeFile()},icon:p(fi,{size:16}),children:"Remove file"})]})]}),p("div",{className:ke("FileUploadField__Canvas",c&&"FileUploadField__Canvas--infoOpened",e&&"dragging"),style:OGe(u),onDragOver:f=>{f.preventDefault(),r(!0)},onDragLeave:f=>{f.preventDefault(),r(!1)},onDrop:f=>{f.preventDefault(),r(!1);let m=f.dataTransfer?.files[0];m&&t&&t.handleFile(m)},onPaste:f=>{f.preventDefault();let m=f.clipboardData?.files[0];if(m){t.handleFile(m);return}let h=f.clipboardData?.getData("text/plain");if(h&&pae(h)){t.handleFile(h,{as:"svg"});return}},children:[p(pa,{visible:t.fileUpload?.state==="uploading"}),c?p("div",{className:"FileUploadField__Canvas__Info",children:[p(sy,{size:16,className:"FileUploadField__Canvas__Info__Icon"}),p(Jr,{className:"FileUploadField__Canvas__InfoTable",verticalSpacing:"xs",fontSize:"xs",children:p("tbody",{children:[u.filename&&p("tr",{children:[p("td",{children:p("b",{children:"Name"})}),p("td",{children:u.filename})]}),u.uploadedAt&&p("tr",{children:[p("td",{children:p("b",{children:"Uploaded"})}),p("td",{children:[new Date(parseInt(u.uploadedAt,10)).toLocaleString(),u.uploadedBy&&p(we,{children:[" by ",u.uploadedBy]})]})]}),u.width!==void 0&&u.height!==void 0&&p("tr",{children:[p("td",{children:p("b",{children:"Dimensions"})}),p("td",{children:[u.width,"x",u.height]})]}),p("tr",{children:[p("td",{children:p("b",{children:"URL"})}),p("td",{children:p(ur,{readOnly:!0,value:u.src,size:"xs",autosize:!NGe,radius:0})})]})]})})]}):p(we,{children:[u.width!==void 0&&u.height!==void 0&&p(de,{radius:"sm",className:"FileUploadField__Preview__Info",children:[u.width,"x",u.height]}),PL(u.src)&&p("img",{onClick:()=>{t?.focusDropZone()},onDblClick:()=>{t?.requestFileUpload()},src:u.src,alt:u.alt||"Uploaded file preview",className:"FileUploadField__Preview__Image"}),AL(u.src)&&p(we,{children:p("video",{className:"FileUploadField__Preview__Image",controls:!0,muted:!0,preload:"metadata",children:p("source",{src:u.src,type:`video/${Ym(u.src)}`})})})]}),p("div",{className:"FileUploadField__reupload",children:p(Yn.UploadButton,{className:"FileUploadField__reupload__button",compact:!0})})]}),t.alt!==!1&&(u.alt||uae(u.filename)||t.variant==="image")&&p("div",{className:"DocEditor__ImageField__imagePreview__Image__Alt",children:[p(ur,{radius:0,className:"DocEditor__ImageField__imagePreview__Image__Alt__Textarea",value:u.alt,placeholder:"Alt text",size:"xs",autosize:!0,disabled:t.fileUpload?.state==="uploading",onChange:f=>{t?.setAltText(f.currentTarget.value)}}),s.ai&&!u.alt&&u.src?.startsWith("http")&&p(Ee,{label:"Generate alt text with AI",position:"top",withArrow:!0,children:p(Ke,{className:"DocEditor__ImageField__imagePreview__Image__Alt__AiButton",onClick:()=>{t.requestGenerateAltText(a)},disabled:t.fileUpload?.state==="uploading",children:p(ly,{size:20,stroke:"1.75"})})})]})]})};Yn.UploadButton=t=>{let e=rt(Ih),r=e?.fileUpload?.state==="uploading";if(!e)return null;let o=t.compact?14:16;return p(Y,{color:"black",variant:"default",disabled:r,size:t.compact?"compact-xs":"compact-md",className:ke("FileUploadField__FileUploadButton",t.compact&&"FileUploadField__FileUploadButton--compact"),onClick:()=>{e.requestFileUpload()},leftIcon:p(we,{children:r&&!t.compact?p(We,{size:o}):e?.variant==="image"?p(fS,{size:o}):p(Fs,{size:o})}),children:r&&!t.compact?"Uploading...":e?.fileUpload?.uploadedFile?.src?"Upload":"Paste, drop, or click to upload"})};Yn.InvisibleDropzone=t=>{let[e,r]=N(!1),o=rt(Ih);return o?p("div",{className:ke("FileUploadField__InvisibleDropzone",e&&"dragging"),onDragOver:n=>{n.preventDefault(),n.stopPropagation(),r(!0)},onDragLeave:n=>{n.preventDefault(),n.stopPropagation(),r(!1)},onDrop:n=>{n.preventDefault(),n.stopPropagation(),r(!1);let i=n.dataTransfer?.files[0];i&&o.handleFile(i)},children:t.children}):null};Yn.Empty=()=>{let t=rt(Ih);if(!t)return null;let e=t.acceptedFileTypes.map(r=>r.split("/").pop().split("+")[0].replaceAll(".","")).sort();return p("div",{className:"FileUploadField__Empty",children:[p("div",{className:"FileUploadField__Empty__Label",children:[p(Yn.UploadButton,{}),fae(t.acceptedFileTypes)&&p("div",{children:p(Ee,{label:"Create placeholder image",children:p(Ke,{className:"FileUploadField__Empty__Label__PlaceholderButton",onClick:()=>{t.requestPlaceholderModalOpen()},title:"Create placeholder image",children:p(uS,{size:16})})})})]}),t.acceptedFileTypes.length>0&&p("div",{children:p("div",{className:"FileUploadField__Empty__AcceptTypes",children:["Allowed file types: ",e.join(", ")]})})]})};Yn.Dropzone=K((t,e)=>{let[r,o]=N(!1),n=rt(Ih);return p("button",{ref:e,className:ke("FileUploadField__Dropzone",r&&"dragging"),onDblClick:()=>{n?.requestFileUpload()},onCopy:i=>{n?.fileUpload?.uploadedFile&&(i.preventDefault(),i.clipboardData?.setData("text/plain",n.fileUpload.uploadedFile.src),i.clipboardData?.setData("application/json",JSON.stringify(n.fileUpload.uploadedFile)))},onKeyDown:i=>{((i.metaKey||i.ctrlKey)&&i.key==="Backspace"||i.key==="Delete")&&(i.preventDefault(),n?.fileUpload?.uploadedFile&&n?.removeFile())},onDragOver:i=>{i.preventDefault(),o(!0)},onDragLeave:i=>{i.preventDefault(),o(!1)},onDrop:i=>{i.preventDefault(),o(!1);let a=i.dataTransfer?.files[0];a&&n&&n.handleFile(a)},onPaste:i=>{if(i.preventDefault(),!n)return;let a=i.clipboardData?.getData("application/json");if(a)try{let c=JSON.parse(a);if(c&&c.src&&c.filename&&n){console.log("Parsed JSON file:",c),n.setFileData(c);return}}catch(c){console.error("error parsing json",c)}let s=i.clipboardData?.files[0];if(s){n.handleFile(s);return}let l=i.clipboardData?.getData("text/plain");if(l&&pae(l)){n.handleFile(l,{as:"svg"});return}},title:"Drop or paste to upload a file"})});function uae(t){return t?PL(t)||AL(t):!1}function fae(t){return t.some(e=>e.startsWith("image/"))||t.length===0}function OGe(t){let e={};if(t.width&&t.height){e["--canvas-aspect-ratio"]=`${t.width} / ${t.height}`,e["--canvas-asset-width"]=`${t.width}px`;let r=Math.min(t.height,280);r<80&&(r=80),e["--canvas-max-height"]=`${r}px`}return t.canvasBgColor==="dark"&&(e["--canvas-bg-color"]="#000"),e}function pae(t){return/^(?:\uFEFF)?\s*(?:<!--[\s\S]*?-->\s*)*(?:<\?xml[\s\S]*?\?>\s*)?(?:<!DOCTYPE\s+svg[\s\S]*?>\s*)?<svg\b[^>]*?(?:\/>|>[\s\S]*?<\/svg>)\s*$/.test(t)}function mae(t){let e=t.field,[r,o]=N(null);return L(()=>{let n=t.draft.subscribe(t.deepKey,i=>{o(i)});return()=>{n()}},[]),p(Yn,{file:r,variant:"file",alt:e.alt,exts:e.exts,preserveFilename:e.preserveFilename,cacheControl:e.cacheControl,onFileChange:n=>{n?t.draft.updateKey(t.deepKey,n):t.draft.removeKey(t.deepKey),o(n)}})}ge();function hae(t){let e=t.field,[r,o]=N(null);return L(()=>{let n=t.draft.subscribe(t.deepKey,i=>{o(i)});return()=>{n()}},[]),p(Yn,{file:r,variant:"image",alt:e.alt,exts:e.exts,onFileChange:n=>{n?t.draft.updateKey(t.deepKey,n):t.draft.removeKey(t.deepKey),o(n)}})}ge();function gae(t){let e=t.field,[r,o]=N([]),n=(e.options||[]).map(a=>typeof a=="string"?{label:a,value:a}:{label:a.label??a.value??"",value:a.value??a.label??""}),i=ye(a=>{t.draft.updateKey(t.deepKey,a||[]),o(a)},[t.deepKey]);return L(()=>t.draft.subscribe(t.deepKey,s=>{o(s||[])}),[]),p("div",{className:"DocEditor__MultiSelectField",children:p(Pw,{data:n,size:"xs",radius:0,placeholder:e.placeholder,value:r,searchable:!0,creatable:e.creatable||!1,getCreateLabel:a=>`+ Add "${a}"`,onChange:a=>i(a),dropdownComponent:"div"})})}ge();function _ae(t){let e=t.field,[r,o]=N(e.default||0),n=ye(i=>{o(i),t.draft.updateKey(t.deepKey,i)},[t.deepKey]);return L(()=>t.draft.subscribe(t.deepKey,a=>{o(a)}),[]),p(Lw,{size:"xs",radius:0,value:r,onChange:i=>n(i),hideControls:!0})}ge();function wh(t){let e=t.field,[r,o]=N(""),n=ye(l=>{if(l){let[c,d]=l.split("/");t.draft.updateKey(t.deepKey,{id:l,collection:c,slug:d})}else t.draft.removeKey(t.deepKey);o(l)},[t.deepKey]);L(()=>t.draft.subscribe(t.deepKey,c=>{o(c?.id||"")}),[]);let i=tre();function a(){let l=r?r.split("/")[0]:e.initialCollection;i.open({collections:e.collections,initialCollection:l,onChange:c=>{n(c),i.close()}})}function s(){n("")}return p("div",{className:"ReferenceField",children:[r?p("div",{className:"ReferenceField__ref",children:[p(wh.Preview,{id:r}),p("div",{className:"ReferenceField__remove",children:p(Ee,{label:"Remove",children:p(Ke,{className:"ReferenceField__remove__icon",onClick:()=>s(),children:p(fi,{size:16})})})})]}):p("div",{className:"ReferenceField__none",children:"None selected"}),p(Y,{color:"dark",size:"xs",onClick:()=>a(),children:e.buttonLabel||"Select"})]})}wh.Preview=t=>{let[e,r]=N(!0),[o,n]=N(null);async function i(){r(!0),await qt(async()=>{let a=await qS(t.id);n(a)}),r(!1)}return L(()=>{i()},[t.id]),p("div",{className:"ReferenceField__Preview",children:e?p("div",{className:"ReferenceField__Preview__loading",children:p(We,{color:"gray",size:"sm"})}):o?p(wh.DocCard,{doc:o}):p("div",{className:"ReferenceField__Preview__notfound",children:['Doc Not found: "',t.id,'" (was it deleted?). Select a new doc or remove using the trash icon to the right.']})})};wh.DocCard=t=>{let e=t.doc,r=e.id||e.sys?.id||"";if(!r)return p("div",{className:"ReferenceField__DocCard ReferenceField__DocCard--error",children:JSON.stringify(e)});let o=r.split("/")[0],n=e.fields||{},i=window.__ROOT_CTX.collections[o];if(!i)throw new Error(`could not find collection: ${o}`);let a=wo(n,i.preview?.title||"meta.title"),s=wo(n,i.preview?.image||"meta.image")||i.preview?.defaultImage;return p("a",{className:"ReferenceField__DocCard",href:`/cms/content/${r}`,target:"_blank",children:[p("div",{className:"ReferenceField__DocCard__image",children:p(fa,{src:s?.src,width:80,height:60,withPlaceholder:!s?.src})}),p("div",{className:"ReferenceField__DocCard__content",children:[p("div",{className:"ReferenceField__DocCard__content__header",children:p("div",{className:"ReferenceField__DocCard__content__header__docId",children:r})}),p("div",{className:"ReferenceField__DocCard__content__title",children:a||"[UNTITLED]"})]})]})};ge();(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(".ce-hint--align-start{text-align:left}.ce-hint--align-center{text-align:center}.ce-hint__description{opacity:.6;margin-top:3px}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();var db=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ET(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function PGe(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function o(){return this instanceof o?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(o){var n=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(r,o,n.get?n:{enumerable:!0,get:function(){return t[o]}})}),r}function CF(){}Object.assign(CF,{default:CF,register:CF,revert:function(){},__esModule:!0});Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(t){let e=(this.document||this.ownerDocument).querySelectorAll(t),r=e.length;for(;--r>=0&&e.item(r)!==this;);return r>-1});Element.prototype.closest||(Element.prototype.closest=function(t){let e=this;if(!document.documentElement.contains(e))return null;do{if(e.matches(t))return e;e=e.parentElement||e.parentNode}while(e!==null);return null});Element.prototype.prepend||(Element.prototype.prepend=function(t){let e=document.createDocumentFragment();Array.isArray(t)||(t=[t]),t.forEach(r=>{let o=r instanceof Node;e.appendChild(o?r:document.createTextNode(r))}),this.insertBefore(e,this.firstChild)});Element.prototype.scrollIntoViewIfNeeded||(Element.prototype.scrollIntoViewIfNeeded=function(t){t=arguments.length===0?!0:!!t;let e=this.parentNode,r=window.getComputedStyle(e,null),o=parseInt(r.getPropertyValue("border-top-width")),n=parseInt(r.getPropertyValue("border-left-width")),i=this.offsetTop-e.offsetTop<e.scrollTop,a=this.offsetTop-e.offsetTop+this.clientHeight-o>e.scrollTop+e.clientHeight,s=this.offsetLeft-e.offsetLeft<e.scrollLeft,l=this.offsetLeft-e.offsetLeft+this.clientWidth-n>e.scrollLeft+e.clientWidth,c=i&&!a;(i||a)&&t&&(e.scrollTop=this.offsetTop-e.offsetTop-e.clientHeight/2-o+this.clientHeight/2),(s||l)&&t&&(e.scrollLeft=this.offsetLeft-e.offsetLeft-e.clientWidth/2-n+this.clientWidth/2),(i||a||s||l)&&!t&&this.scrollIntoView(c)});window.requestIdleCallback=window.requestIdleCallback||function(t){let e=Date.now();return setTimeout(function(){t({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-e))}})},1)};window.cancelIdleCallback=window.cancelIdleCallback||function(t){clearTimeout(t)};var AGe=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,r)=>(r&=63,r<36?e+=r.toString(36):r<62?e+=(r-26).toString(36).toUpperCase():r>62?e+="-":e+="_",e),""),Pae=(t=>(t.VERBOSE="VERBOSE",t.INFO="INFO",t.WARN="WARN",t.ERROR="ERROR",t))(Pae||{}),mt={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,LEFT:37,UP:38,DOWN:40,RIGHT:39,DELETE:46,META:91,SLASH:191},DGe={LEFT:0,WHEEL:1,RIGHT:2,BACKWARD:3,FORWARD:4};function xb(t,e,r="log",o,n="color: inherit"){if(!("console"in window)||!window.console[r])return;let i=["info","log","warn","error"].includes(r),a=[];switch(xb.logLevel){case"ERROR":if(r!=="error")return;break;case"WARN":if(!["error","warn"].includes(r))return;break;case"INFO":if(!i||t)return;break}o&&a.push(o);let s="Editor.js 2.31.0-rc.7",l=`line-height: 1em;
169
169
  color: #006FEA;
170
170
  display: inline-block;
171
171
  font-size: 11px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blinkk/root-cms",
3
- "version": "2.0.9",
3
+ "version": "2.0.10",
4
4
  "author": "s@blinkk.com",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -131,10 +131,10 @@
131
131
  "vite": "5.0.8",
132
132
  "vitest": "0.34.6",
133
133
  "yjs": "13.6.27",
134
- "@blinkk/root": "2.0.9"
134
+ "@blinkk/root": "2.0.10"
135
135
  },
136
136
  "peerDependencies": {
137
- "@blinkk/root": "2.0.9",
137
+ "@blinkk/root": "2.0.10",
138
138
  "firebase-admin": ">=11",
139
139
  "firebase-functions": ">=4",
140
140
  "preact": ">=10",