PageSourceSearch

https://agapestreetministry.org/build/generator-bMqVPZXZ.js

js agapestreetministry.org collected 2026-09-27 05:55:43 UTC 284,495 bytes, 179 lines download raw bytes

1var co=Object.defineProperty;var uo=(t,e,n)=>e in t?co(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Zn=(t,e,n)=>(uo(t,typeof e!="symbol"?e+"":e,n),n);import{y as X,g as Je,r as $,aS as qr,aT as Gr,aU as Yr,j as c,d,aj as Xr,a as Jr,s as po,aV as fo,aW as ho,aX as In,aY as Zr,aZ as go,a_ as Qr,F as ei,P as ti,a$ as mo,b0 as ni,b1 as bo,aN as Gt,b2 as yo,b3 as xo,aD as vo,b4 as $o,b5 as wo,b6 as ko,t as _o,b7 as ri,f as So,b8 as To,ai as $t,ay as Io,S as Co,p as jo,aq as Lo,ax as Po,b9 as Eo,ba as Ao,bb as Qn}from"./index-yjs0jCN1.js";import{J as fe,m as se,H as K,a2 as W,Q as Ze,U as Cn,W as jn,I as Ro,n as ii,g as Mo,L as xe,M as de,G as Oo,V as zo,K as Oe,a4 as Ln,a5 as Do,N as cn,a6 as si,P as Ft,O as Bo,a7 as Fo,a8 as No,a3 as Nt,a9 as oi,Z as ai,_ as li,aa as ci,ab as Ho,$ as Ko,a1 as di,a0 as ui}from"./pagebuilder_section-nn2rM2Nn.js";import{c as Ht,s as Wo,a as Vo,b as we,g as Uo,u as er,L as qo,R as pi,C as fi,D as hi,M as gi,d as mi,P as bi,G as yi,e as Go,n as xi,f as Yo,v as vi,U as Xo,h as Jo,i as $i,S as Zo,j as Qo,k as ea,l as ta,m as na,o as ra,p as ia,q as sa,B as oa,r as aa,F as la,_ as ca,t as da,w as ua,x as pa}from"./form-M3P2QDd6.js";import{u as wi,e as fa,p as ha,f as ga,g as ki,h as ma,i as ba,j as ya,k as xa,l as va,n as $a,m as _i,o as wa,c as ka,d as _a,t as Sa}from"./index-CYkanOlq.js";import{u as Si}from"./useRailsContext-Phen6V97.js";import{a as tr}from"./admin_layout_base-DUwP-dbX.js";import{p as Ta}from"./path_from_slugs-BkrKpry9.js";import{p as Ia}from"./actions-BV_hQGVL.js";import{u as ot}from"./useMutation-D1nG7fOt.js";import{u as J,g as Ti,a as Ca,T as nr}from"./gql-BXUds3tn.js";import{O as ja,k as La}from"./kebabCase-DHY2oZoI.js";import{s as Pn}from"./safely_parse_json-6PRpHd_K.js";import{l as U,j as Pa,g as Ea,h as Aa,f as Ra,i as Ma,e as Oa,k as wt,m as za}from"./utils-Bkix2AFA.js";import{n as dn}from"./typography-BJycEVMQ.js";import{m as Ii}from"./main-BcECSJOR.js";import{c as qe,f as Da,F as N,d as ze,S as Ie,e as Ci,l as ji,g as Li,h as Qe,E as Q,i as ke,j as Pi,k as et,m as me,w as En,I as An,n as Kt,o as ce,p as ue,q as un,s as Ei,t as Ba,T as St,v as Ai,x as Fa,y as oe,z as tt,A as Na,P as Ri,B as Ha,C as Rn,D as rt,G as Ka,_ as Wa,H as Va,J as Ua,r as qa,K as Ga,M as Ya,O as Xa,Q as Ja,U as Za,V as Qa,W as el,X as tl,Y as nl,Z as rr,$ as rl,a0 as il,a1 as sl,a2 as ol,a3 as ir,a4 as al,a5 as ll,a6 as sr,a7 as cl,a8 as dl,a9 as ul,aa as pl,ab as fl,ac as hl,ad as gl,ae as Mi,af as Oi,ag as ml,ah as bl,ai as yl,aj as xl,ak as vl,al as $l,am as wl,an as kl,ao as _l,ap as Sl,aq as Tl,ar as Il}from"./nav_builder-CK5rs8h-.js";import{c as Ce}from"./index-Cll4-HYu.js";import{u as zi}from"./utils-B9bFpkA1.js";import{i as pn}from"./isEmpty-BwMI7IIv.js";import{b as Cl}from"./object-CJENTY4W.js";import{N as jl}from"./nav_renderer-6Yuj3TIM.js";const Ll=(t,e)=>({should:e,handle:({parentSchema:n,schema:r})=>{let i=r;return n&&t.forEach(s=>{const o=Array.isArray(s)?n.getIn(s):n.get(s);o!==void 0&&(i=Array.isArray(s)?i.setIn(s,o):i.set(s,o))}),{schema:i}}}),Pl=(t,e,n)=>{const r=X.useRef(void 0),[i,s]=X.useState({changed:!1,value:void 0});X.useLayoutEffect(()=>(s({changed:!1,value:t}),()=>window.clearTimeout(r.current)),[t,r]),X.useEffect(()=>{if(!(typeof i.value>"u"||!i.changed))return r.current=window.setTimeout(()=>{n(i.value)},e),()=>window.clearTimeout(r.current)},[i,s,e,r,n]);const o=X.useCallback(l=>{i.value!==l&&(window.clearTimeout(r.current),n(i.value))},[n,i]),a=X.useCallback(l=>{s({changed:!0,value:l})},[s]);return{bubbleBounce:o,bounceVal:i,setBounceVal:s,changeBounceVal:a}};function El(t,e=null){return function(n,r){let{$from:i,$to:s}=n.selection,o=i.blockRange(s),a=!1,l=o;if(!o)return!1;if(o.depth>=2&&i.node(o.depth-1).type.compatibleContent(t)&&o.startIndex==0){if(i.index(o.depth-1)==0)return!1;let p=n.doc.resolve(o.start-2);l=new qe(p,p,o.depth),o.endIndex<o.parent.childCount&&(o=new qe(i,n.doc.resolve(s.end(o.depth)),o.depth)),a=!0}let u=Da(l,t,e,o);return u?(r&&r(Al(n.tr,o,u,a,t).scrollIntoView()),!0):!1}}function Al(t,e,n,r,i){let s=N.empty;for(let p=n.length-1;p>=0;p--)s=N.from(n[p].type.create(n[p].attrs,s));t.step(new ze(e.start-(r?2:0),e.end,e.start,e.end,new Ie(s,0,0),n.length,!0));let o=0;for(let p=0;p<n.length;p++)n[p].type==i&&(o=p+1);let a=n.length-o,l=e.start+n.length-(r?2:0),u=e.parent;for(let p=e.startIndex,f=e.endIndex,h=!0;p<f;p++,h=!1)!h&&Ci(t.doc,l,a)&&(t.split(l,a),l+=2*a),l+=u.child(p).nodeSize;return t}function Rl(t){return function(e,n){let{$from:r,$to:i}=e.selection,s=r.blockRange(i,o=>o.childCount>0&&o.firstChild.type==t);return s?n?r.node(s.depth-1).type==t?Ml(e,n,t,s):Ol(e,n,s):!0:!1}}function Ml(t,e,n,r){let i=t.tr,s=r.end,o=r.$to.end(r.depth);s<o&&(i.step(new ze(s-1,o,s,o,new Ie(N.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new qe(i.doc.resolve(r.$from.pos),i.doc.resolve(o),r.depth));const a=ji(r);if(a==null)return!1;i.lift(r,a);let l=i.mapping.map(s,-1)-1;return Li(i.doc,l)&&i.join(l),e(i.scrollIntoView()),!0}function Ol(t,e,n){let r=t.tr,i=n.parent;for(let g=n.end,b=n.endIndex-1,y=n.startIndex;b>y;b--)g-=i.child(b).nodeSize,r.delete(g-1,g+1);let s=r.doc.resolve(n.start),o=s.nodeAfter;if(r.mapping.map(n.end)!=n.start+s.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,l=n.endIndex==i.childCount,u=s.node(-1),p=s.index(-1);if(!u.canReplace(p+(a?0:1),p+1,o.content.append(l?N.empty:N.from(i))))return!1;let f=s.pos,h=f+o.nodeSize;return r.step(new ze(f-(a?1:0),h+(l?1:0),f+1,h-1,new Ie((a?N.empty:N.from(i.copy(N.empty))).append(l?N.empty:N.from(i.copy(N.empty))),a?0:1,l?0:1),a?0:1)),e(r.scrollIntoView()),!0}var zl=Object.defineProperty,Dl=Object.getOwnPropertyDescriptor,ae=(t,e,n,r)=>{for(var i=r>1?void 0:r?Dl(e,n):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(i=(r?o(e,n,i):o(i))||i);return r&&i&&zl(e,n,i),i};function fn(t){var e;return!!((e=t.spec.group)!=null&&e.includes(Q.ListContainerNode))}function Bl(t){var e;return!!((e=t.spec.group)!=null&&e.includes(Q.ListItemNode))}function _e(t){return fn(t.type)}function ve(t){return Bl(t.type)}function Mn(t,e){return n=>{const{dispatch:r,tr:i}=n,s=Ei(i,n.state),{$from:o,$to:a}=i.selection,l=o.blockRange(a);if(!l)return!1;const u=Ba({predicate:p=>fn(p.type),selection:i.selection});if(u&&l.depth-u.depth<=1&&l.startIndex===0){if(u.node.type===t)return Fi(e)(n);if(fn(u.node.type))return t.validContent(u.node.content)?(r==null||r(i.setNodeMarkup(u.pos,t)),!0):Fl(i,u,t,e)?(r==null||r(i.scrollIntoView()),!0):!1}return El(t)(s,r)}}function Di(t,e=["checked"]){return function({tr:n,dispatch:r,state:i}){var s,o;const a=Na(t,i.schema),{$from:l,$to:u}=n.selection;if(Ai(n.selection)&&n.selection.node.isBlock||l.depth<2||!l.sameParent(u))return!1;const p=l.node(-1);if(p.type!==a)return!1;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if
1(l.depth===2||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(r){const y=l.index(-1)>0;let w=N.empty;for(let j=l.depth-(y?1:2);j>=l.depth-3;j--)w=N.from(l.node(j).copy(w));const T=((s=a.contentMatch.defaultType)==null?void 0:s.createAndFill())||void 0;w=w.append(N.from(a.createAndFill(null,T)||void 0));const I=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3;n.replace(l.before(y?void 0:-1),l.after(-I),new Ie(w,y?3:2,2)),n.setSelection(n.selection.constructor.near(n.doc.resolve(l.pos+(y?3:2)))),r(n.scrollIntoView())}return!0}if(p.attrs.closed&&l.sameParent(u)&&u.pos===u.end()){if(r){const y=l.after(-1),w=((o=a.contentMatch.defaultType)==null?void 0:o.createAndFill())||void 0,T=a.createAndFill(null,w);T&&(n.insert(y,T),n.setSelection(St.near(n.doc.resolve(y+1)))),n.delete(l.pos,u.pos),r(n.scrollIntoView())}return!0}const f=Object.fromEntries(Object.entries(p.attrs).filter(([y])=>!e.includes(y))),h=u.pos===l.end()?p.contentMatchAt(0).defaultType:null,g={...l.node().attrs};n.delete(l.pos,u.pos);const b=h?[{type:a,attrs:f},{type:h,attrs:g}]:[{type:a,attrs:f}];return Ci(n.doc,l.pos,2)?(r&&r(n.split(l.pos,2,b).scrollIntoView()),!0):!1}}function Fl(t,e,n,r){const i=e.node,s=t.doc.resolve(e.start),o=s.node(-1),a=s.index(-1);if(!o||!o.canReplace(a,a+1,N.from(n.create())))return!1;const l=[];for(let g=0;g<i.childCount;g++){const b=i.child(g);if(!r.validContent(b.content))return!1;const y=r.createChecked(null,b.content);l.push(y)}const u=n.createChecked(null,l),p=e.pos,f=p+i.nodeSize,h=t.selection.from;return t.replaceRangeWith(p,f,u),t.setSelection(t.selection.constructor.near(t.doc.resolve(h))),!0}function Nl({listType:t,itemType:e,tr:n,range:r}){var i;const s=r.parent,o=n.doc.slice(r.start,r.end);if(s.type===t&&((i=o.content.firstChild)==null?void 0:i.type)===e)return!1;const a=[];for(let u=0;u<o.content.childCount;u++){const p=o.content.child(u);if(!e.validContent(p.content))return!1;const f=e.createChecked(null,p.content);a.push(f)}const l=t.createChecked(null,a);return n.replaceRange(r.start,r.end,new Ie(N.from(l),0,0)),!0}function Ge({listType:t,itemType:e,tr:n}){const r=Tt(n.selection);if(!r)return!1;const i=r.startIndex===0,{from:s,to:o}=n.selection;return Nl({listType:t,itemType:e,tr:n,range:r})?(n.setSelection(St.between(n.doc.resolve(i?s:s+2),n.doc.resolve(i?o:o+2))),n.scrollIntoView(),!0):!1}function Hl(t,e,n){const r=t.tr,i=n.parent,s=r.mapping.maps.length;for(let b=n.end,y=n.endIndex-1,w=n.startIndex;y>w;y--)b-=i.child(y).nodeSize,r.delete(b-1,b+1);const o=r.doc.resolve(n.start),a=o.nodeAfter;if(!a||r.mapping.slice(s).map(n.end)!==n.start+a.nodeSize)return!1;const l=n.startIndex===0,u=n.endIndex===i.childCount,p=o.node(-1),f=o.index(-1);if(!p.canReplace(f+(l?0:1),f+1,a.content.append(u?N.empty:N.from(i))))return!1;const h=o.pos,g=h+a.nodeSize;return r.step(new ze(h-(l?1:0),g+(u?1:0),h+1,g-1,new Ie((l?N.empty:N.from(i.copy(N.empty))).append(u?N.empty:N.from(i.copy(N.empty))),l?0:1,u?0:1),l?0:1)),e(r.scrollIntoView()),!0}function Bi(t,e){const n=e||t.selection.$from;let r=[],i,s,o,a;for(let u=n.depth;u>=0;u--){if(s=n.node(u),i=n.index(u),o=s.maybeChild(i-1),a=s.maybeChild(i),o&&a&&o.type.name===a.type.name&&_e(o)){const p=n.before(u+1);r.push(p)}if(i=n.indexAfter(u),o=s.maybeChild(i-1),a=s.maybeChild(i),o&&a&&o.type.name===a.type.name&&_e(o)){const p=n.after(u+1);r.push(p)}}r=[...new Set(r)].sort((u,p)=>p-u);let l=!1;for(const u of r)Li(t.doc,u)&&(t.join(u),l=!0);return l}function Fi(t){return e=>{const{dispatch:n,tr:r}=e,i=Ei(r,e.state),s=Kl(t,r.selection);return s?(n&&Hl(i,n,s),!0):!1}}function Kl(t,e){const{$from:n,$to:r}=e;return n.blockRange(r,s=>{var o;return((o=s.firstChild)==null?void 0:o.type)===t})}function Tt(t){const{$from:e,$to:n}=t;return e.blockRange(n,_e)}function Wl(t){const e=t.selection.$from,n=e.blockRange();if(!n||!ve(n.parent)||n.startIndex!==0)return!1;const r=e.node(n.depth-2),i=e.index(n.depth),s=e.index(n.depth-1),o=e.index(n.depth-2),a=r.maybeChild(o-1),l=a==null?void 0:a.lastChild;if(i!==0||s!==0)return!1;if(a&&_e(a)&&l&&ve(l))return Ge({listType:a.type,itemType:l.type,tr:t});if(ve(r)){const u=r,p=e.node(n.depth-3);if(_e(p))return Ge({listType:p.type,itemType:u.type,tr:t})}return!1}function or({view:t}){if(!t)return!1;{const e=t.state.selection.$cursor;if(!e||e.parentOffset>0)return!1;const n=e.blockRange();if(!n||!ve(n.parent)||n.startIndex!==0)return!1}{const e=t.state.tr;Wl(e)&&t.dispatch(e)}{const e=t.state.selection.$cursor;if(!e||e.parentOffset>0)return!1;const n=e.blockRange();if(!n||!ve(n.parent)||n.startIndex!==0)return!1;const r=e.index(n.depth),i=e.index(n.depth-1),s=e.index(n.depth-2),o=n.depth-2>=1&&ve(e.node(n.depth-2));r===0&&i===0&&s<=1&&o&&Rl(n.parent.type)(t.state,t.dispatch)}return Ka(t.state,t.dispatch,t),!0}function Ni({node:t,mark:e,updateDOM:n,updateMark:r}){const i=document.createElement("label");i.contentEditable="false",i.classList.add(ke.LIST_ITEM_MARKER_CONTAINER),i.append(e);const s=document.createElement("div"),o=document.createElement("li");o.classList.add(ke.LIST_ITEM_WITH_CUSTOM_MARKER),o.append(i),o.append(s);const a=l=>l.type!==t.type?!1:(t=l,n(t,o),r(t,e),!0);return a(t),{dom:o,contentDOM:s,update:a}}
1function Vl(t,e){const n=t.node(e.depth-1),r=t.node(e.depth-2);return!ve(n)||!_e(r)?!1:{parentItem:n,parentList:r}}function Ul(t,e){const n=e.parent,r=e.parent.child(e.endIndex-1),i=e.end,s=e.$to.end(e.depth);return i<s?(t.step(new ze(i-1,s,i,s,new Ie(N.from(r.type.create(null,n.copy())),1,0),1,!0)),new qe(t.doc.resolve(e.$from.pos),t.doc.resolve(s),e.depth)):e}function ql(t,e){const n=e.parent,r=e.parent.child(e.endIndex-1),i=e.end,s=e.$to.end(e.depth-1);return i+1<s?(t.step(new ze(i-1,s,i+1,s,new Ie(N.from(n.type.create(null,r.type.create(null))),2,0),0,!0)),new qe(t.selection.$from,t.selection.$to,e.depth)):e}function Gl(t,e,n,r){return Ge({listType:n.type,itemType:r.type,tr:t})?new qe(t.selection.$from,t.selection.$to,e.depth):e}function Yl(t){let e=Tt(t.selection);if(!e)return!1;const n=Vl(t.selection.$from,e);if(!n)return!1;const{parentItem:r,parentList:i}=n;e=Ul(t,e),e=ql(t,e),e=Gl(t,e,i,r);const s=ji(e);return typeof s!="number"||(t.lift(e,s),e=Tt(t.selection),e&&Bi(t,t.doc.resolve(e.end-2))),!0}var Xl=({tr:t,dispatch:e})=>Yl(t)?(e==null||e(t.scrollIntoView()),!0):!1;function Jl(t,e,n){let r,i,s,o;const a=e.doc;if(n.startIndex>=1){r=t.child(n.startIndex-1),i=t,o=a.resolve(n.start).start(n.depth),s=o+1;for(let l=0;l<n.startIndex-1;l++)s+=i.child(l).nodeSize}else{const l=e.index(n.depth-1);if(l>=1){const u=e.node(n.depth-1),p=e.start(n.depth-1);if(i=u.child(l-1),!_e(i))return!1;o=p+1;for(let f=0;f<l-1;f++)o+=u.child(f).nodeSize;if(r=i.child(i.childCount-1),s=o+i.nodeSize-r.nodeSize-1,!ve(r))return!1}else return!1}return{previousItem:r,previousList:i,previousItemStart:s,previousListStart:o}}function Zl(t,e,n){let r,i;const s=n.start,o=e.depth>=n.depth+2?e.end(n.depth+2):n.end-1,a=n.end;return o+1>=a?(r=t.slice(s,a),i=null):(r=t.slice(s,o),i=t.slice(o+1,a-1)),{selectedSlice:r,unselectedSlice:i}}function Ql(t){const{$from:e,$to:n}=t.selection,r=Tt(t.selection);if(!r)return!1;const i=t.doc.resolve(r.start).node();if(!_e(i))return!1;const s=Jl(i,e,r);if(!s)return!1;const{previousItem:o,previousList:a,previousItemStart:l}=s,{selectedSlice:u,unselectedSlice:p}=Zl(t.doc,n,r),f=o.content.append(N.fromArray([i.copy(u.content)])).append(p?p.content:N.empty);t.deleteRange(r.start,r.end);const h=l+o.nodeSize-2,g=o.copy(f);return g.check(),t.replaceRangeWith(l-1,h+1,g),t.setSelection(a===i?St.between(t.doc.resolve(e.pos),t.doc.resolve(n.pos)):St.between(t.doc.resolve(e.pos-2),t.doc.resolve(n.pos-2))),!0}var ec=({tr:t,dispatch:e})=>Ql(t)?(e==null||e(t.scrollIntoView()),!0):!1,Hi=class extends Ri{get name(){return"listItemShared"}createKeymap(){const t={Tab:ec,"Shift-Tab":Xl,Backspace:or,"Mod-Backspace":or};if(Ha.isMac){const e={"Ctrl-h":t.Backspace,"Alt-Backspace":t["Mod-Backspace"]};return{...t,...e}}return t}createPlugin(){return{appendTransaction:(t,e,n)=>{const r=n.tr;return Bi(r)?r:null}}}},Ye=class extends Qe{get name(){return"listItem"}createTags(){return[Q.ListItemNode]}createNodeSpec(t,e){return{content:"paragraph block*",defining:!0,draggable:!1,...e,attrs:{...t.defaults(),closed:{default:!1},nested:{default:!1}},parseDOM:[{tag:"li",getAttrs:t.parse,priority:et.Lowest},...e.parseDOM??[]],toDOM:n=>["li",t.dom(n),0]}}createNodeViews(){return this.options.enableCollapsible?(t,e,n)=>{const r=document.createElement("div");return r.classList.add(ke.COLLAPSIBLE_LIST_ITEM_BUTTON),r.contentEditable="false",r.addEventListener("click",()=>{if(r.classList.contains("disabled"))return;const i=n(),s=Pi.create(e.state.doc,i);return e.dispatch(e.state.tr.setSelection(s)),this.store.commands.toggleListItemClosed(),!0}),Ni({mark:r,node:t,updateDOM:tc,updateMark:nc})}:{}}createKeymap(){return{Enter:Di(this.type)}}createExtensions(){return[new Hi]}toggleListItemClosed(t){return({state:{tr:e,selection:n},dispatch:r})=>{if(!Ai(n)||n.node.type.name!==this.name)return!1;const{node:i,from:s}=n;return t=Fa(t)?t:!i.attrs.closed,r==null||r(e.setNodeMarkup(s,void 0,{...i.attrs,closed:t})),!0}}liftListItemOutOfList(t){return Fi(t??this.type)}};ae([oe()],Ye.prototype,"toggleListItemClosed",1);ae([oe()],Ye.prototype,"liftListItemOutOfList",1);Ye=ae([tt({defaultOptions:{enableCollapsible:!1},staticKeys:["enableCollapsible"]})],Ye);function tc(t,e){t.attrs.closed?e.classList.add(ke.COLLAPSIBLE_LIST_ITEM_CLOSED):e.classList.remove(ke.COLLAPSIBLE_LIST_ITEM_CLOSED)}function nc(t,e){t.childCount<=1?e.classList.add("disabled"):e.classList.remove("disabled")}var at=class extends Qe{get name(){return"bulletList"}createTags(){return[Q.Block,Q.ListContainerNode]}createNodeSpec(t,e){return{content:"listItem+",...e,attrs:t.defaults(),parseDOM:[{tag:"ul",getAttrs:t.parse},...e.parseDOM??[]],toDOM:n=>["ul",t.dom(n),0]}}createNodeViews(){return this.options.enableSpine?(t,e,n)=>{var r;const i=document.createElement("div");i.style.position="relative";const s=n(),o=e.state.doc.resolve(s+1),a=o.node(o.depth-1);if(!(((r=a==null?void 0:a.type)==null?void 0:r.name)!=="listItem")){const p=document.createElement("div");p.contentEditable="false",p.classList.add(ke.LIST_SPINE),p.addEventListener("click",f=>{const h=n(),g=e.state.doc.resolve(h+1),b=g.start(g.depth-1),y=Pi.create(e.state.doc,b-1);e.dispatch(e.state.tr.setSelection(y)),this.store.commands.toggleListItemClosed(),f.preventDefault(),f.stopPropagation()}),i.append(p)}const u=document.createElement("ul");return u.classList.add(ke.UL_LIST_CONTENT),i.append(u),{dom:i,contentDOM:u}}:{}}createExtensions(){return[new Ye({priority:et.Low,enableCollapsible:this.options.enableSpine})]}toggleBulletList(){return Mn(this.type,me(this.store.schema.nodes,"listItem"))}listShortcut(t){return this.toggleBulletList()(t)}createInputRules(){const t=/^\s*([*+-])\s$/;return[En(t,this.type),new An(t,(e,n,r,i)=>{const s=e.tr;
1return s.deleteRange(r,i),Ge({listType:this.type,itemType:me(this.store.schema.nodes,"listItem"),tr:s})?s:null})]}};ae([oe({icon:"listUnordered",label:({t})=>t(Rn.BULLET_LIST_LABEL)})],at.prototype,"toggleBulletList",1);ae([Kt({shortcut:ce.BulletList,command:"toggleBulletList"})],at.prototype,"listShortcut",1);at=ae([tt({defaultOptions:{enableSpine:!1},staticKeys:["enableSpine"]})],at);var lt=class extends Qe{get name(){return"orderedList"}createTags(){return[Q.Block,Q.ListContainerNode]}createNodeSpec(t,e){return{content:"listItem+",...e,attrs:{...t.defaults(),order:{default:1}},parseDOM:[{tag:"ol",getAttrs:n=>ue(n)?{...t.parse(n),order:+(n.getAttribute("start")??1)}:{}},...e.parseDOM??[]],toDOM:n=>{const r=t.dom(n);return n.attrs.order===1?["ol",r,0]:["ol",{...r,start:n.attrs.order},0]}}}createExtensions(){return[new Ye({priority:et.Low})]}toggleOrderedList(){return Mn(this.type,me(this.store.schema.nodes,"listItem"))}listShortcut(t){return this.toggleOrderedList()(t)}createInputRules(){const t=/^(\d+)\.\s$/;return[En(t,this.type,e=>({order:+me(e,1)}),(e,n)=>n.childCount+n.attrs.order===+me(e,1)),new An(t,(e,n,r,i)=>{const s=e.tr;if(s.deleteRange(r,i),!Ge({listType:this.type,itemType:me(this.store.schema.nodes,"listItem"),tr:s}))return null;const a=+me(n,1);if(a!==1){const l=un({selection:s.selection,types:this.type});l&&s.setNodeMarkup(l.pos,void 0,{order:a})}return s})]}};ae([oe({icon:"listOrdered",label:({t})=>t(Rn.ORDERED_LIST_LABEL)})],lt.prototype,"toggleOrderedList",1);ae([Kt({shortcut:ce.OrderedList,command:"toggleOrderedList"})],lt.prototype,"listShortcut",1);lt=ae([tt({})],lt);var Ki=class extends Qe{get name(){return"taskListItem"}createTags(){return[Q.ListItemNode]}createNodeSpec(t,e){return{content:"paragraph block*",defining:!0,draggable:!1,...e,attrs:{...t.defaults(),checked:{default:!1}},parseDOM:[{tag:"li[data-task-list-item]",getAttrs:n=>{let r=!1;return ue(n)&&n.getAttribute("data-checked")!==null&&(r=!0),{checked:r,...t.parse(n)}},priority:et.Medium},...e.parseDOM??[]],toDOM:n=>["li",{...t.dom(n),"data-task-list-item":"","data-checked":n.attrs.checked?"":void 0},0]}}createNodeViews(){return(t,e,n)=>{const r=document.createElement("input");return r.type="checkbox",r.classList.add(ke.LIST_ITEM_CHECKBOX),r.contentEditable="false",r.addEventListener("click",i=>{e.editable||i.preventDefault()}),r.addEventListener("change",()=>{const i=n(),s=e.state.doc.resolve(i+1);this.store.commands.toggleCheckboxChecked({$pos:s})}),r.checked=t.attrs.checked,Ni({node:t,mark:r,updateDOM:rc,updateMark:ic})}}createKeymap(){return{Enter:Di(this.type)}}createExtensions(){return[new Hi]}toggleCheckboxChecked(t){let e,n;return typeof t=="boolean"?e=t:t&&(e=t.checked,n=t.$pos),({tr:r,dispatch:i})=>{const s=un({selection:n??r.selection.$from,types:this.type});if(!s)return!1;const{node:o,pos:a}=s,l={...o.attrs,checked:e??!o.attrs.checked};return i==null||i(r.setNodeMarkup(a,void 0,l)),!0}}createInputRules(){const t=/^\s*(\[( ?|x|X)]\s)$/;return[En(t,this.type,e=>({checked:["x","X"].includes(rt(e,2))})),new An(t,(e,n,r,i)=>{const s=e.tr;if(s.deleteRange(r,i),!Ge({listType:me(this.store.schema.nodes,"taskList"),itemType:this.type,tr:s}))return null;const a=["x","X"].includes(rt(n,2));if(a){const l=un({selection:s.selection,types:this.type});l&&s.setNodeMarkup(l.pos,void 0,{checked:a})}return s})]}};ae([oe()],Ki.prototype,"toggleCheckboxChecked",1);function rc(t,e){t.attrs.checked?e.setAttribute("data-checked",""):e.removeAttribute("data-checked"),e.setAttribute("data-task-list-item","")}function ic(t,e){e.checked=!!t.attrs.checked}var Wi=class extends Qe{get name(){return"taskList"}createTags(){return[Q.Block,Q.ListContainerNode]}createNodeSpec(t,e){return{content:"taskListItem+",...e,attrs:t.defaults(),parseDOM:[{tag:"ul[data-task-list]",getAttrs:t.parse,priority:et.Medium},...e.parseDOM??[]],toDOM:n=>["ul",{...t.dom(n),"data-task-list":""},0]}}createExtensions(){return[new Ki({})]}toggleTaskList(){return Mn(this.type,me(this.store.schema.nodes,"taskListItem"))}listShortcut(t){return this.toggleTaskList()(t)}};ae([oe({icon:"checkboxMultipleLine",label:({t})=>t(Rn.TASK_LIST_LABEL)})],Wi.prototype,"toggleTaskList",1);ae([Kt({shortcut:ce.TaskList,command:"toggleTaskList"})],Wi.prototype,"listShortcut",1);var Vi={exports:{}},Ui={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],ol
1ive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},qi={exports:{}},sc=function(e){return!e||typeof e=="string"?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!=="String")},oc=sc,ac=Array.prototype.concat,lc=Array.prototype.slice,ar=qi.exports=function(e){for(var n=[],r=0,i=e.length;r<i;r++){var s=e[r];oc(s)?n=ac.call(n,lc.call(s)):n.push(s)}return n};ar.wrap=function(t){return function(){return t(ar(arguments))}};var cc=qi.exports,it=Ui,dt=cc,Gi=Object.hasOwnProperty,Yi=Object.create(null);for(var Yt in it)Gi.call(it,Yt)&&(Yi[it[Yt]]=Yt);var re=Vi.exports={to:{},get:{}};re.get=function(t){var e=t.substring(0,3).toLowerCase(),n,r;switch(e){case"hsl":n=re.get.hsl(t),r="hsl";break;case"hwb":n=re.get.hwb(t),r="hwb";break;default:n=re.get.rgb(t),r="rgb";break}return n?{model:r,value:n}:null};re.get.rgb=function(t){if(!t)return null;var e=/^#([a-f0-9]{3,4})$/i,n=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,r=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,i=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,s=/^(\w+)$/,o=[0,0,0,1],a,l,u;if(a=t.match(n)){for(u=a[2],a=a[1],l=0;l<3;l++){var p=l*2;o[l]=parseInt(a.slice(p,p+2),16)}u&&(o[3]=parseInt(u,16)/255)}else if(a=t.match(e)){for(a=a[1],u=a[3],l=0;l<3;l++)o[l]=parseInt(a[l]+a[l],16);u&&(o[3]=parseInt(u+u,16)/255)}else if(a=t.match(r)){for(l=0;l<3;l++)o[l]=parseInt(a[l+1],0);a[4]&&(a[5]?o[3]=parseFloat(a[4])*.01:o[3]=parseFloat(a[4]))}else if(a=t.match(i)){for(l=0;l<3;l++)o[l]=Math.round(parseFloat(a[l+1])*2.55);a[4]&&(a[5]?o[3]=parseFloat(a[4])*.01:o[3]=parseFloat(a[4]))}else return(a=t.match(s))?a[1]==="transparent"?[0,0,0,0]:Gi.call(it,a[1])?(o=it[a[1]],o[3]=1,o):null:null;for(l=0;l<3;l++)o[l]=$e(o[l],0,255);return o[3]=$e(o[3],0,1),o};re.get.hsl=function(t){if(!t)return null;var e=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=t.match(e);if(n){var r=parseFloat(n[4]),i=(parseFloat(n[1])%360+360)%360,s=$e(parseFloat(n[2]),0,100),o=$e(parseFloat(n[3]),0,100),a=$e(isNaN(r)?1:r,0,1);return[i,s,o,a]}return null};re.get.hwb=function(t){if(!t)return null;var e=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=t.match(e);if(n){var r=parseFloat(n[4]),i=(parseFloat(n[1])%360+360)%360,s=$e(parseFloat(n[2]),0,100),o=$e(parseFloat(n[3]),0,100),a=$e(isNaN(r)?1:r,0,1);return[i,s,o,a]}return null};re.to.hex=function(){var t=dt(arguments);return"#"+gt(t[0])+gt(t[1])+gt(t[2])+(t[3]<1?gt(Math.round(t[3]*255)):"")};re.to.rgb=function(){var t=dt(arguments);return t.length<4||t[3]===1?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"};re.to.rgb.percent=function(){var t=dt(arguments),e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||t[3]===1?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"};re.to.hsl=function(){var t=dt(arguments);return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};re.to.hwb=function(){var t=dt(arguments),e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"};re.to.keyword=function(t){return Yi[t.slice(0,3)]};function $e(t,e,n){return Math.min(Math.max(e,t),n)}function gt(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}var dc=Vi.exports;const ct=Ui,Xi={};for(const t of Object.keys(ct))Xi[ct[t]]=t;const L={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var Ji=L;for(const t of Object.keys(L)){if(!("channels"in L[t]))throw new Error("missing channels property: "+t);if(!("labels"in L[t]))throw new Error("missing channel labels property: "+t);if(L[t].labels.length!==L[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:n}=L[t];delete L[t].channels,delete L[t].labels,Object.defineProperty(L[t],"channels",{value:e}),Object.defineProperty(L[t],"labels",{value:n})}L.rgb.hsl=function(t){const e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.min(e,n,r),s=Math.max(e,n,r),o=s-i;let a,l;s===i?a=0:e===s?a=(n-r)/o:n===s?a=2+(r-e)/o:r===s&&(a=4+(e-n)/o),a=Math.min(a*60,360),a<0&&(a+=360);const u=(i+s)/2;return s===i?l=0:u<=.5?l=o/(s+i):l=o/(2-s-i),[a,l*100,u*100]};L.rgb.hsv=function(t){let e,n,r,i,s;const o=t[0]/255,a=t[1]/255,l=t[2]/255,u=Math.max(o,a,l),p=u-Math.min(o,a,l),f=function(h){return(u-h)/6/p+1/2};return p===0?(i=0,s=0):(s=p/u,e=f(o),n=f(a),r=f(l),o===u?i=r-n:a===u?i=1/3+e-r:l===u&&(i=2/3+n-e),i<0?i+=1:i>1&&(i-=1)),[i*360,s*100,u*100]};L.rgb.hwb=function(t){const e=t[0],n=t[1];let r=t[2];const i=L.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(n,r));return r=1-1/255*Math.max(e,Math.max(n,r)),[i,s*100,r*100]};L.rgb.cmyk=function(t){const e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.min(1-e,1-n,1-r),s=(1-e-i)/(1-i)||0,o=(1-n-i)/(1-i)||0,a=(1-r-i)/(1-i)||0;return[s*100,o*100,a*100,i*100]};function uc(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}
vendor: 9,784 bytes, line 1
1L.rgb.keyword=function(t){const e=Xi[t];if(e)return e;let n=1/0,r;for(const i of Object.keys(ct)){const s=ct[i],o=uc(t,s);o<n&&(n=o,r=i)}return r};L.keyword.rgb=function(t){return ct[t]};L.rgb.xyz=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255;e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const i=e*.4124+n*.3576+r*.1805,s=e*.2126+n*.7152+r*.0722,o=e*.0193+n*.1192+r*.9505;return[i*100,s*100,o*100]};L.rgb.lab=function(t){const e=L.rgb.xyz(t);let n=e[0],r=e[1],i=e[2];n/=95.047,r/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;const s=116*r-16,o=500*(n-r),a=200*(r-i);return[s,o,a]};L.hsl.rgb=function(t){const e=t[0]/360,n=t[1]/100,r=t[2]/100;let i,s,o;if(n===0)return o=r*255,[o,o,o];r<.5?i=r*(1+n):i=r+n-r*n;const a=2*r-i,l=[0,0,0];for(let u=0;u<3;u++)s=e+1/3*-(u-1),s<0&&s++,s>1&&s--,6*s<1?o=a+(i-a)*6*s:2*s<1?o=i:3*s<2?o=a+(i-a)*(2/3-s)*6:o=a,l[u]=o*255;return l};L.hsl.hsv=function(t){const e=t[0];let n=t[1]/100,r=t[2]/100,i=n;const s=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=s<=1?s:2-s;const o=(r+n)/2,a=r===0?2*i/(s+i):2*n/(r+n);return[e,a*100,o*100]};L.hsv.rgb=function(t){const e=t[0]/60,n=t[1]/100;let r=t[2]/100;const i=Math.floor(e)%6,s=e-Math.floor(e),o=255*r*(1-n),a=255*r*(1-n*s),l=255*r*(1-n*(1-s));switch(r*=255,i){case 0:return[r,l,o];case 1:return[a,r,o];case 2:return[o,r,l];case 3:return[o,a,r];case 4:return[l,o,r];case 5:return[r,o,a]}};L.hsv.hsl=function(t){const e=t[0],n=t[1]/100,r=t[2]/100,i=Math.max(r,.01);let s,o;o=(2-n)*r;const a=(2-n)*i;return s=n*i,s/=a<=1?a:2-a,s=s||0,o/=2,[e,s*100,o*100]};L.hwb.rgb=function(t){const e=t[0]/360;let n=t[1]/100,r=t[2]/100;const i=n+r;let s;i>1&&(n/=i,r/=i);const o=Math.floor(6*e),a=1-r;s=6*e-o,o&1&&(s=1-s);const l=n+s*(a-n);let u,p,f;switch(o){default:case 6:case 0:u=a,p=l,f=n;break;case 1:u=l,p=a,f=n;break;case 2:u=n,p=a,f=l;break;case 3:u=n,p=l,f=a;break;case 4:u=l,p=n,f=a;break;case 5:u=a,p=n,f=l;break}return[u*255,p*255,f*255]};L.cmyk.rgb=function(t){const e=t[0]/100,n=t[1]/100,r=t[2]/100,i=t[3]/100,s=1-Math.min(1,e*(1-i)+i),o=1-Math.min(1,n*(1-i)+i),a=1-Math.min(1,r*(1-i)+i);return[s*255,o*255,a*255]};L.xyz.rgb=function(t){const e=t[0]/100,n=t[1]/100,r=t[2]/100;let i,s,o;return i=e*3.2406+n*-1.5372+r*-.4986,s=e*-.9689+n*1.8758+r*.0415,o=e*.0557+n*-.204+r*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),[i*255,s*255,o*255]};L.xyz.lab=function(t){let e=t[0],n=t[1],r=t[2];e/=95.047,n/=100,r/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const i=116*n-16,s=500*(e-n),o=200*(n-r);return[i,s,o]};L.lab.xyz=function(t){const e=t[0],n=t[1],r=t[2];let i,s,o;s=(e+16)/116,i=n/500+s,o=s-r/200;const a=s**3,l=i**3,u=o**3;return s=a>.008856?a:(s-16/116)/7.787,i=l>.008856?l:(i-16/116)/7.787,o=u>.008856?u:(o-16/116)/7.787,i*=95.047,s*=100,o*=108.883,[i,s,o]};L.lab.lch=function(t){const e=t[0],n=t[1],r=t[2];let i;i=Math.atan2(r,n)*360/2/Math.PI,i<0&&(i+=360);const o=Math.sqrt(n*n+r*r);return[e,o,i]};L.lch.lab=function(t){const e=t[0],n=t[1],i=t[2]/360*2*Math.PI,s=n*Math.cos(i),o=n*Math.sin(i);return[e,s,o]};L.rgb.ansi16=function(t,e=null){const[n,r,i]=t;let s=e===null?L.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),s===0)return 30;let o=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return s===2&&(o+=60),o};L.hsv.ansi16=function(t){return L.rgb.ansi16(L.hsv.rgb(t),t[2])};L.rgb.ansi256=function(t){const e=t[0],n=t[1],r=t[2];return e===n&&n===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};L.ansi16.rgb=function(t){let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];const n=(~~(t>50)+1)*.5,r=(e&1)*n*255,i=(e>>1&1)*n*255,s=(e>>2&1)*n*255;return[r,i,s]};L.ansi256.rgb=function(t){if(t>=232){const s=(t-232)*10+8;return[s,s,s]}t-=16;let e;const n=Math.floor(t/36)/5*255,r=Math.floor((e=t%36)/6)/5*255,i=e%6/5*255;return[n,r,i]};L.rgb.hex=function(t){const n=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};L.hex.rgb=function(t){const e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let n=e[0];e[0].length===3&&(n=n.split("").map(a=>a+a).join(""));const r=parseInt(n,16),i=r>>16&255,s=r>>8&255,o=r&255;return[i,s,o]};L.rgb.hcg=function(t){const e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.max(Math.max(e,n),r),s=Math.min(Math.min(e,n),r),o=i-s;let a,l;return o<1?a=s/(1-o):a=0,o<=0?l=0:i===e?l=(n-r)/o%6:i===n?l=2+(r-e)/o:l=4+(e-n)/o,l/=6,l%=1,[l*360,o*100,a*100]};L.hsl.hcg=function(t){const e=t[1]/100,n=t[2]/100,r=n<.5?2*e*n:2*e*(1-n);let i=0;return r<1&&(i=(n-.5*r)/(1-r)),[t[0],r*100,i*100]};L.hsv.hcg=function(t){const e=t[1]/100,n=t[2]/100,r=e*n;let i=0;return r<1&&(i=(n-r)/(1-r)),[t[0],r*100,i*100]};L.hcg.rgb=function(t){const e=t[0]/360,n=t[1]/100,r=t[2]/100;if(n===0)return[r*255,r*255,r*255];const i=[0,0,0],s=e%1*6,o=s%1,a=1-o;let l=0;switch(Math.floor(s)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return l=(1-n)*r,[(n*i[0]+l)*255,(n*i[1]+l)*255,(n*i[2]+l)*255]};L.hcg.hsv=function(t){const e=t[1]/100,n=t[2]/100,r=e+n*(1-e);let i=0;return r>0&&(i=e/r),[t[0],i*100,r*100]};L.hcg.hsl=function(t){const e=t[1]/100,r=t[2]/100*(1-e)+.5*e;let i=0;return r>0&&r<.5?i=e/(2*r):r>=.5&&r<1&&(i=e/(2*(1-r))),[t[0],i*100,r*100]};L.hcg.hwb=function(t){const e=t[1]/100,n=t[2]/100,r=e+n*(1-e);return[t[0],(r-e)*100,(1-r)*100]};L.hwb.hcg=function(t){const e=t[1]/100,r=1-t[2]/100,i=r-e;let s=0;return i<1&&(s=(r-i)/(1-i)),[t[0],i*100,s*100]};L.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};L.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};L.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};L.gray.hsl=function(t){return[0,0,t[0]]};L.gray.hsv=L.gray.hsl;L.gray.hwb=function(t){return[0,100,t[0]]};L.gray.cmyk=function(t){return[0,0,0,t[0]]};L.gray.lab=function(t){return[t[0],0,0]};L.gray.hex=function(t){const e=Math.round(t[0]/100*255)&255,r=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(r.length)+r};L.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};const It=Ji;function pc(){const t={},e=Object.keys(It);for(let n=e.length,r=0;r<n;r++)t[e[r]]={distance:-1,parent:null};return t}function fc(t){const e=pc(),n=[t];for(e[t].distance=0;n.length;){const r=n.pop(),i=Object.keys(It[r]);for(let s=i.length,o=0;o<s;o++){const a=i[o],l=e[a];l.distance===-1&&(l.distance=e[r].distance+1,l.parent=r,n.unshift(a))}}return e}function hc(t,e){return function(n){return e(t(n))}}function gc(t,e){const n=[e[t].parent,t];let r=It[e[t].parent][t],i=e[t].parent;for(;e[i].parent;)n.unshift(e[i].parent),r=hc(It[e[i].parent][i],r),i=e[i].parent;return r.conversion=n,r}var mc=function(t){const e=fc(t),n={},r=Object.keys(e);for(let i=r.length,s=0;s<i;s++){const o=r[s];e[o].parent!==null&&(n[o]=gc(o,e))}return n};const hn=Ji,bc=mc,Ne={},yc=Object.keys(hn);function xc(t){const e=function(...n){const r=n[0];return r==null?r:(r.length>1&&(n=r),t(n))};return"conversion"in t&&(e.conversion=t.conversion),e}function vc(t){const e=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const i=t(n);if(typeof i=="object")for(let s=i.length,o=0;o<s;o++)i[o]=Math.round(i[o]);return i};return"conversion"in t&&(e.conversion=t.conversion),e}yc.forEach(t=>{Ne[t]={},Object.defineProperty(Ne[t],"channels",{value:hn[t].channels}),Object.defineProperty(Ne[t],"labels",{value:hn[t].labels});const e=bc(t);Object.keys(e).forEach(r=>{const i=e[r];Ne[t][r]=vc(i),Ne[t][r].raw=xc(i)})});var $c=Ne;const He=dc,ne=$c,Zi=["keyword","gray","hex"],gn={};for(const t of Object.keys(ne))gn[[...ne[t].labels].sort().join("")]=t;const Ct={};function Y(t,e){if(!(this instanceof Y))return new Y(t,e);if(e&&e in Zi&&(e=null),e&&!(e in ne))throw new Error("Unknown model: "+e);let n,r;if(t==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof Y)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if(typeof t=="string"){const i=He.get(t);if(i===null)throw new Error("Unable to parse color from string: "+t);this.model=i.model,r=ne[this.model].channels,this.color=i.value.slice(0,r),this.valpha=typeof i.value[r]=="number"?i.value[r]:1}else if(t.length>0){this.model=e||"rgb",r=ne[this.model].channels;const i=Array.prototype.slice.call(t,0,r);this.color=mn(i,r),this.valpha=typeof t[r]=="number"?t[r]:1}else if(typeof t=="number")this.model="rgb",this.color=[t>>16&255,t>>8&255,t&255],this.valpha=1;else{this.valpha=1;const i=Object.keys(t);"alpha"in t&&(i.splice(i.indexOf("alpha"),1),this.valpha=typeof t.alpha=="number"?t.alpha:0);const s=i.sort().join("");if(!(s in gn))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=gn[s];const{labels:o}=ne[this.model],a=[];for(n=0;n<o.length;n++)a.push(t[o[n]]);this.color=mn(a)}if(Ct[this.model])for(r=ne[this.model].channels,n=0;n<r;n++){const i=Ct[this.model][n];i&&(this.color[n]=i(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}Y.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let e=this.model in He.to?this:this.rgb();e=e.round(typeof t=="number"?t:1);const n=e.valpha===1?e.color:[...e.color,this.valpha];return He.to[e.model](n)}
1,percentString(t){const e=this.rgb().round(typeof t=="number"?t:1),n=e.valpha===1?e.color:[...e.color,this.valpha];return He.to.rgb.percent(n)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const t={},{channels:e}=ne[this.model],{labels:n}=ne[this.model];for(let r=0;r<e;r++)t[n[r]]=this.color[r];return this.valpha!==1&&(t.alpha=this.valpha),t},unitArray(){const t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,this.valpha!==1&&t.push(this.valpha),t},unitObject(){const t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,this.valpha!==1&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new Y([...this.color.map(kc(t)),this.valpha],this.model)},alpha(t){return t!==void 0?new Y([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:V("rgb",0,q(255)),green:V("rgb",1,q(255)),blue:V("rgb",2,q(255)),hue:V(["hsl","hsv","hsl","hwb","hcg"],0,t=>(t%360+360)%360),saturationl:V("hsl",1,q(100)),lightness:V("hsl",2,q(100)),saturationv:V("hsv",1,q(100)),value:V("hsv",2,q(100)),chroma:V("hcg",1,q(100)),gray:V("hcg",2,q(100)),white:V("hwb",1,q(100)),wblack:V("hwb",2,q(100)),cyan:V("cmyk",0,q(100)),magenta:V("cmyk",1,q(100)),yellow:V("cmyk",2,q(100)),black:V("cmyk",3,q(100)),x:V("xyz",0,q(95.047)),y:V("xyz",1,q(100)),z:V("xyz",2,q(108.833)),l:V("lab",0,q(100)),a:V("lab",1),b:V("lab",2),keyword(t){return t!==void 0?new Y(t):ne[this.model].keyword(this.color)},hex(t){return t!==void 0?new Y(t):He.to.hex(this.rgb().round().color)},hexa(t){if(t!==void 0)return new Y(t);const e=this.rgb().round().color;let n=Math.round(this.valpha*255).toString(16).toUpperCase();return n.length===1&&(n="0"+n),He.to.hex(e)+n},rgbNumber(){const t=this.rgb().color;return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255},luminosity(){const t=this.rgb().color,e=[];for(const[n,r]of t.entries()){const i=r/255;e[n]=i<=.04045?i/12.92:((i+.055)/1.055)**2.4}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(t){const e=this.luminosity(),n=t.luminosity();return e>n?(e+.05)/(n+.05):(n+.05)/(e+.05)},level(t){const e=this.contrast(t);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){const t=this.rgb().color;return(t[0]*2126+t[1]*7152+t[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const t=this.rgb();for(let e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten(t){const e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){const e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate(t){const e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate(t){const e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten(t){const e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken(t){const e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale(){const t=this.rgb().color,e=t[0]*.3+t[1]*.59+t[2]*.11;return Y.rgb(e,e,e)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){const e=this.hsl();let n=e.color[0];return n=(n+t)%360,n=n<0?360+n:n,e.color[0]=n,e},mix(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);const n=t.rgb(),r=this.rgb(),i=e===void 0?.5:e,s=2*i-1,o=n.alpha()-r.alpha(),a=((s*o===-1?s:(s+o)/(1+s*o))+1)/2,l=1-a;return Y.rgb(a*n.red()+l*r.red(),a*n.green()+l*r.green(),a*n.blue()+l*r.blue(),n.alpha()*i+r.alpha()*(1-i))}};for(const t of Object.keys(ne)){if(Zi.includes(t))continue;const{channels:e}=ne[t];Y.prototype[t]=function(...n){return this.model===t?new Y(this):n.length>0?new Y(n,t):new Y([..._c(ne[this.model][t].raw(this.color)),this.valpha],t)},Y[t]=function(...n){let r=n[0];return typeof r=="number"&&(r=mn(n,e)),new Y(r,t)}}function wc(t,e){return Number(t.toFixed(e))}function kc(t){return function(e){return wc(e,t)}}function V(t,e,n){t=Array.isArray(t)?t:[t];for(const r of t)(Ct[r]||(Ct[r]=[]))[e]=n;return t=t[0],function(r){let i;return r!==void 0?(n&&(r=n(r)),i=this[t](),i.color[e]=r,i):(i=this[t]().color[e],n&&(i=n(i)),i)}}function q(t){return function(e){return Math.max(0,Math.min(t,e))}}function _c(t){return Array.isArray(t)?t:[t]}function mn(t,e){for(let n=0;n<e;n++)typeof t[n]!="number"&&(t[n]=0);return t}var Sc=Y;const Tc=Je(Sc),lr=({children:t,routeContext:e,navigationContext:n,locationContext:r})=>c.jsx(qr.Provider,{value:e,children:c.jsx(Gr.Provider,{value:n,children:c.jsx(Yr.Provider,{value:r,children:t})})}),Ic=$.createContext(()=>{throw new Error("scopedRouterParentContext not initialized")}
1),Cc=({children:t})=>{const e=$.useContext(qr),n=$.useContext(Gr),r=$.useContext(Yr),i=({children:s})=>c.jsx(lr,{routeContext:e,navigationContext:n,locationContext:r,children:s});return c.jsx(Ic.Provider,{value:i,children:c.jsx(lr,{routeContext:{outlet:null,matches:[],isDataRoute:!1},navigationContext:null,locationContext:null,children:t})})},jc={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"accordion_section",type:"object",widget:"accordion_section",version:"1.0.0",label:"Accordion",properties:{section_properties:{type:"object",required:["title","body"],properties:{"title/styles":{$ref:"#/$defs/text_styles","@context":{"@id":{default:"title_1"}}},title:{type:"string",localizable:!0,maxLength:50,view:{placeholder:"Title"}},accordion_items:{t:{add_item:"Add accordion item",remove_item:"Remove accordion item",label:"Accordion Item"},type:"array",maxItems:10,items:{type:"object",properties:{__id:{type:"string",hidden:!0,format:"uuid"},title:{type:"string",localizable:!0,maxLength:100,view:{placeholder:"Title"}},body:{type:"string",localizable:!0,view:{placeholder:"Body"}}}}},styles:{$ref:"#/$defs/section_styles",properties:{container_width:{enum:["small","medium","large"]},background:{properties:{contain:{hidden:!1}}}}}}}}},Lc={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"background",type:"object",label:"Background",properties:{color:{type:"string",widget:"color"},carousel:{type:"boolean",hidden:!0,default:!1},contain:{hidden:!0,type:"boolean",default:!1,t:{label:"Apply to section container background"}}},if:{properties:{carousel:{const:!0}}},then:{properties:{images:{type:"array",minItems:2,maxItems:10,items:{$ref:"#/$defs/image"}}}},else:{properties:{image:{properties:{opacity:{type:"number",widget:"slider",minimum:.05,maximum:1,default:1,view:{step:.05,formatOptions:{style:"percent"}}}},$ref:"#/$defs/image"}}}},Pc={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"banner_section",type:"object",widget:"banner_section",version:"1.0.0",properties:{section_properties:{type:"object",properties:{"title/styles":{$ref:"#/$defs/text_styles","@context":{"@id":{default:"title_1"}}},title:{type:"string",label:"Title",maxLength:50,view:{placeholder:"Add a title"},localizable:!0},"subtitle/styles":{$ref:"#/$defs/text_styles","@context":{"@id":{default:"subheadline"}}},subtitle:{type:"string",label:"Subtitle",maxLength:100,view:{placeholder:"Add a subtitle"}},link:{$ref:"#/$defs/link",t:{label:"Banner link"}},styles:{$ref:"#/$defs/section_styles",properties:{container_width:{enum:["small","medium","large","extraLarge"],default:"large"},background:{properties:{contain:{hidden:!1}}}}}}}}},Ec={$schema:"https://json-schema.org/draft/2019-09/schema",type:"object",widget:"calendar_section",properties:{section_properties:{type:"object",properties:{"title/styles":{$ref:"#/$defs/text_styles","@context":{"@id":{default:"title_1"}}},title:{type:"string",localizable:!0},styles:{$ref:"#/$defs/section_styles",properties:{container_width:{enum:["large","medium"],default:"large"}}}}},events_feeds:{type:"object",properties:{events_feed_properties:{type:"array",minItems:1,maxItems:10,items:{type:"object",required:["feed_source","title"],properties:{feed_source:{type:["string","number","null"],widget:"select","@context":{graphql:'query { contentFeeds(contentType: "event") { contentFeeds { id title } } }',accessor:"contentFeeds.contentFeeds",map:{key:"id",label:"title"}},t:{label:"Event Feed to Display"}},title:{type:"string"},color:{type:"string",widget:"color"}}}}}}}},Ac={$schema:"https://json-schema.org/draft/2019-09/schema",type:"object",widget:"card",label:"Card",properties:{"@id":{type:"string",hidden:!0},"@type":{type:"string",default:"resource",hidden:!0},image:{$ref:"#/$defs/image"},title:{type:"string",localizable:!0,view:{placeholder:"Add a title"}},subtitle:{type:"string",localizable:!0,view:{placeholder:"Add a subtitle"}},description:{type:"string",localizable:!0,widget:"text_area",view:{placeholder:"Add a description"}},teaser:{type:"string",localizable:!0,hidden:!0},tertiary_text:{type:"string",localizable:!0,hidden:!0},link:{$ref:"#/$defs/link",properties:{variant:{hidden:!0}}}},required:["title"]},Rc={$schema:"https://json-schema.org/draft/2019-09/schema",type:"object",widget:"cards_section",version:"1.0.0",properties:{section_properties:{type:"object",order:["__t","title","more_link","data_source","@id","incoming_feeds_config","filter_by_upstream_feed","max_cards","offset","sort_by","thing_type_keys","content_categories","collection_type_keys"],delta_attrs:[["thing_type_keys"],["content_categories"],["collection_type_keys"],["incoming_feeds_config"],["filter_by_upstream_feed"],["max_cards"],["offset"],["sort_by"],["styles"]],allOf:[{$ref:"#/$defs/content_spot","@context":{feed_key:"cards"},properties:{__t:{type:"string",enum:["scroll","featured","grid","list"],default:"scroll",widget:"select",t:{label:"Layout"}},"title/styles":{$ref:"#/$defs/text_styles","@context":{"@id":{default:"title_1"}}},title:{type:"string",localizable:!0,t:{label:"Title"}},more_link:{$ref:"#/$defs/link",t:{label:"More link"}},cards:{type:"array",maxItems:100,items:{$ref:"#/$defs/card"}},styles:{$ref:"#/$defs/section_styles",properties:{image:{hidden:!1},text:{properties:{truncate:{hidden:!1}}},container_width:{enum:["medium","large","extraLarge","full"],default:"large"},card_background:{type:"string",widget:"color"},show_title:{type:"boolean",default:!0},show_image:{type:"boolean",default:!0},show_subtitle:{type:"boolean",default:!0},show_description:{type:"boolean",default:!0},show_tertiary_text:{type:"boolean",default:!0},show_link:{type:"boolean",default:!0},background:{properties:{images:{hidden:!0}}}}}}},{if:{properties:{__t:{const:"scroll"}}},then:{properties:{styles:{properties:{card_layout:{type:"string",default:"continuous",widget:"segmented_control",enum:["discrete","continuous","overlay"]},background:{not:{required:["contain"]},properties:{contain:{hidden:!0}}}}}}}},{if:{properties:{__t:{const:"list"}}},then:{properties:{styles:{properties:{text:{properties:{align:{hidden:!0}}},list_orientation:{type:"string",default:"vertical",widget:"segmented_control",enum:["vertical","horizontal"]},container_width:{enum:["small","medium","large","extraLarge"],default:"large"},background:{properties:{contain:{hidden:!1}}}}}}}},{if:{properties:{__t:{const:"single"}}},then:{properties:{max_cards:{const:1,hidden:!0},cards:{maxItems:1}}}},{if:{properties:{__t:{const:"featured"}}},then:{properties:{featured_card:{label:"Featured Card",$ref:"#/$defs/card"},cards:{maxItems:5}}}},{if:{properties:{__t:{const:"grid"}}},then:{properties:{styles:{properties:{max_columns:{type:"number",enum:[1,2,3,4,5],default:3,widget:"segmented_control"},spacing:{type:"string",enum:["none","auto"],default:"auto",widget:"segmented_control"},card_orientation:{type:"string",default:"vertical",widget:"segmented_control",enum:["vertical","horizontal"]}}}}}},{if:{properties:{data_source:{const:"db_content"}}},then:{properties:{cards:{hidden:!0}}}},{if:{properties:{data_source:{const:"direct"}}
1},then:{properties:{"@id":{hidden:!0},thing_type_keys:{hidden:!0},content_categories:{hidden:!0},collection_type_keys:{hidden:!0}}}}]}}},Mc={$schema:"https://json-schema.org/draft/2019-09/schema",type:"object",version:"1",properties:{"@type":{default:"content_spot",type:"string",hidden:!0},data_source:{type:"string",enum:["direct","db_content"],default:"direct",widget:"segmented_control",t:{label:"Fill items",enum:{direct:"Manual",db_content:"Dynamic"}}}},if:{properties:{data_source:{const:"db_content"}}},then:{properties:{"@id":{type:["string","number","null"],widget:"select_spot",t:{label:"Symbol"}},incoming_feeds_config:{type:["string","number","null"],widget:"select","@context":{graphql:'query { contentFeeds(feedSet: "own_feed_structure") { contentFeeds { id title } } }',accessor:"contentFeeds.contentFeeds",map:{key:"id",label:"title"}},t:{label:"Source Feed"}},filter_by_upstream_feed:{type:["string","number","null"],widget:"select","@context":{graphql:'query { contentFeeds(upstreamOf: "ad_hoc_feed", feedSet: "own_feed_structure") { contentFeeds { id title } } }',accessor:"contentFeeds.contentFeeds",map:{key:"id",label:"title"}},t:{label:"Filter by Feed"}},max_cards:{type:"number",default:4,t:{label:"Items Limit"}},offset:{type:"number",default:1,t:{label:"Start at item"}},sort_by:{type:"string",enum:["published_at","position","alphabetical","event_date"],widget:"select",default:"published_at",t:{label:"Sort Order"}},thing_type_keys:{type:["string","null"],widget:"select_spot_thing_type",t:{label:"Content Type"}},content_categories:{type:["string","null"],widget:"select_spot_content_categories",t:{label:"Content Type"}},collection_type_keys:{type:["string","null"],widget:"select_spot_collection_type",t:{label:"Collection Type"}}}}},Oc={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"css_class",type:"object",label:"CSS Class",description:"Multiple classes can be entered delineated by a space",properties:{custom_class:{type:"string",view:{placeholder:"Add a custom css class"}}}},zc={$schema:"https://json-schema.org/draft/2019-09/schema",type:"object",widget:"custom_html_section",properties:{section_properties:{type:"object",$ref:"#/$defs/content_spot",delta_attrs:[["html_block","@id"]],auto_create_content_spot:!0,properties:{data_source:{default:"db_content",hidden:!0},html_block:{type:"object",properties:{"@type":{default:"html_block",hidden:!0},"@id":{type:["string","number","null"],widget:"select_from_gql_options",options_source:"custom_html",t:{label:"Select a preset block"},view:{allow_new_spot:!1}},html_content:{type:"string",hidden:!0}}},styles:{$ref:"#/$defs/section_styles",properties:{container_width:{enum:["default","small","medium","large","full"]}}}}}}},Dc={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"donation_section",type:"object",widget:"donation_section",version:"1.0.0",properties:{section_properties:{type:"object",properties:{styles:{$ref:"#/$defs/section_styles",properties:{donation_placement:{type:"string",enum:["left","right"],default:"left",widget:"segmented_control",label:"Donation Placement"},container_width:{enum:["small","medium","large"],default:"large"},padding:{hidden:!0},background:{properties:{carousel:{hidden:!0}}}}}}}}},Bc={$schema:"https://json-schema.org/draft/2019-09/schema",type:"object",widget:"heading_section",properties:{section_properties:{type:"object",properties:{title:{type:"string",localizable:!0},styles:{$ref:"#/$defs/section_styles",properties:{container_width:{enum:["large","medium","small"],default:"large"}}}}}}},Fc={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"hero_section",type:"object",version:"1.0.0",widget:"hero_section",properties:{section_properties:{type:"object",required:["title","__t"],order:["__t","title","subtitle","links",null,"styles"],allOf:[{properties:{__t:{type:"string",enum:["large_title","collage","wide_image"],default:"large_title",widget:"select",t:{label:"Layout",enum:{wide_image:"Notch Overlay",large_title:"Text Overlay"}}},"title/styles":{$ref:"#/$defs/text_styles","@context":{"@id":{default:"large_title"}}},title:{type:"string",localizable:!0,maxLength:100,view:{placeholder:"Add a title"}}
1,"subtitle/styles":{$ref:"#/$defs/text_styles","@context":{"@id":{default:"subheadline"}}},links:{type:"array",maxItems:2,uniqueItems:!0,items:{$ref:"#/$defs/link"}},styles:{$ref:"#/$defs/section_styles",properties:{container_width:{enum:["small","medium","large","extraLarge","full"]}}}}},{if:{properties:{__t:{enum:["large_title","overlay","collage"]}}},then:{properties:{subtitle:{type:"string",localizable:!0},styles:{properties:{container_width:{hidden:!1,enum:["large","medium"],default:"large"}}}}}},{if:{properties:{__t:{enum:["large_title","wide_image","overlay"]}}},then:{properties:{video_background:{type:"boolean"},search:{type:"boolean",default:!1,t:{label:"Show Search Box"}},styles:{properties:{background:{properties:{carousel:{hidden:!1}}}}},show_announcements:{type:"boolean",default:!1,t:{label:"Show Pinned Announcements"}}}}},{if:{properties:{__t:{const:"collage"}}},then:{properties:{images:{type:["array","null"],maxItems:4,minItems:4,items:{$ref:"#/$defs/image",view:{aspectRatio:"4 / 1"}}},styles:{properties:{collage_style:{type:"string",enum:["grid","dense"],default:"grid",widget:"segmented_control"}}}}}},{if:{properties:{__t:{const:"large_title"}}},then:{properties:{vertical_align:{type:"string",enum:["top","middle","bottom"],default:"auto",widget:"segmented_control"}}}}]}}},Nc={$schema:"https://json-schema.org/draft/2019-09/schema",type:"object",widget:"icon_section",version:"1.0.0",properties:{section_properties:{type:"object",required:["_t"],properties:{__t:{type:"string",enum:["grid"],default:"grid",widget:"select",hidden:!0,t:{label:"Layout"}},icons:{type:"array",items:{$ref:"#/$defs/image",t:{label:"Icon"},view:{allowFocusEditing:!1,allowEditing:!1},properties:{title:{type:"string",localizable:!0,t:{label:"Title"}},contentMediaType:{type:"string",hidden:!0,default:"image/svg+xml"}}},maxItems:12},styles:{$ref:"#/$defs/section_styles",properties:{background:{properties:{image:{hidden:!0},contain:{hidden:!1}}},container_width:{enum:["medium","large"],default:"large"}}}}}}},Hc={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"image_section",type:"object",widget:"image_section",version:"1.0.0",label:"Text Only",properties:{section_properties:{type:"object",required:["__t"],properties:{__t:{type:"string",enum:["grid"],default:"grid",widget:"select",hidden:!0,t:{label:"Layout"}},"title/styles":{$ref:"#/$defs/text_styles","@context":{"@id":{default:"title_1"}}},title:{type:"string",localizable:!0,maxLength:260,view:{placeholder:"Title (optional)"}},lightbox:{type:"boolean",default:!1,t:{label:"Open images in lightbox"}},images:{type:"array",items:{$ref:"#/$defs/image"},maxItems:25},styles:{$ref:"#/$defs/section_styles",properties:{image:{hidden:!1},container_width:{enum:["medium","large"],default:"large"},max_columns:{type:"number",enum:[3,4,5],default:3,widget:"segmented_control"},background:{properties:{contain:{hidden:!1}}}}}}}}},Kc={$schema:"https://json-schema.org/draft/2019-09/schema",type:"object",widget:"link",t:{label:"Link"},allOf:[{properties:{title:{type:"string",localizable:!0},href:{type:"string"},variant:{type:"string",widget:"select",default:"link",enum:["link","button"]},new_tab:{type:"boolean",t:{label:"Open in New Tab"}}}},{if:{properties:{variant:{const:"button"}}},then:{properties:{appearance:{type:"string",widget:"select",enum:["outline","fill"],default:"outline"}}}}]},Wc={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"mass_times_finder_section",type:"object",widget:"mass_times_finder_section",version:"1.0.0",label:"Text Only",properties:{section_properties:{type:"object",required:["title","subtitle","massfinder_link ","_t"],properties:{__t:{type:"string",enum:["center"],default:"center",widget:"select",hidden:!0,t:{label:"Layout"}},"title/styles":{$ref:"#/$defs/text_styles","@context":{"@id":{default:"title_1"}}},title:{type:"string",label:"Title",maxLength:260,view:{placeholder:"Title (optional)"},localizable:!0},"subtitle/styles":{$ref:"#/$defs/text_styles","@context":{"@id":{default:"subheadline"}}},subtitle:{type:"string",label:"Subtitle",maxLength:100,view:{placeholder:"Add a subtitle"}},massfinder_link:{$ref:"#/$defs/link",t:{label:"Massfinder link"}},search:{type:"boolean",default:!1,t:{label:"Show massfinder search"}},links:{type:"array",maxItems:3,uniqueItems:!0,items:{$ref:"#/$defs/link"}},styles:{$ref:"#/$defs/section_styles",properties:{text:{properties:{align:{hidden:!1}}},background:{properties:{contain:{hidden:!1}}},container_width:{enum:["small","medium","large","extraLarge"],default:"large"}}}}}}},Vc={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"mass_times_section",type:"object",widget:"mass_times_section",version:"1.0.0",label:"Text Only",properties:{section_properties:{type:"object",required:["title","subtitle","massfinder_link ","_t"],properties:{__t:{type:"string",enum:["center"],default:"center",widget:"select",hidden:!0,t:{label:"Layout"}},"title/styles":{$ref:"#/$defs/text_styles","@context":{"@id":{default:"title_1"}}},title:{type:"string",label:"Title",maxLength:260,view:{placeholder:"Title (optional)"},localizable:!0},link:{$ref:"#/$defs/link",t:{label:"Mass times link"}},styles:{$ref:"#/$defs/section_styles",properties:{text:{properties:{align:{hidden:!1}}},background:{properties:{contain:{hidden:!1}}},container_width:{enum:["small","medium","large","extraLarge"],default:"large"}}}}}}},Uc={type:"object",widget:"menu_section",properties:{section_properties:{type:"object",required:["id"],properties:{typography:{$ref:"#/$defs/text_styles","@context":{"@id":{default:"title_1"}}},id:{type:"string",label:"Menu",widget:"select","@context":{graphql:"query { navs { navs { id title } } }",accessor:"navs.navs",map:{key:"id",label:"title"}}},styles:{$ref:"#/$defs/section_styles",properties:{text:{properties:{align:{hidden:!1}}},background:{properties:{contain:{hidden:!1}}},container_width:{enum:["small","medium","large","extraLarge"],default:"large"}}}}}}},qc={$schema:"https://json-schema.org/draft/2019-09/schema",type:"object",widget:"multi_column_section",properties:{section_properties:{type:"object",default:{columns:[]},properties:{"title/styles":{$ref:"#/$defs/text_styles","@context":{"@id":{default:"title_3"}}},title:{type:"string",localizable:!0,maxLength:260,view:{placeholder:"Title (optional)"}}
1,columns:{type:"array",widget:"column_list",notSortable:!0,maxItems:4,minItems:2,default:[{sections:[{}]},{sections:[{}]}],items:{type:"object",properties:{__id:{type:"string",format:"uuid",hidden:!0},sections:{type:"array",widget:"section_list",default:[{__t:"cards_section"}],maxItems:3,items:{type:"object",required:["__t","__id"],allOf:[{properties:{__t:{type:"string",enum:["cards_section","subscribe_section"],default:"cards_section",widget:"select",t:{label:"Type"}},__id:{type:"string",format:"uuid",hidden:!0},styles:{properties:{container_width:{hidden:!0}}}}},{if:{properties:{__t:{const:"cards_section"}}},then:{$ref:"#/$defs/cards_section",properties:{section_properties:{properties:{__t:{enum:["single"],default:"list"}}}}}},{if:{properties:{__t:{const:"subscribe_section"}}},then:{$ref:"#/$defs/subscribe_section"}}]}}}}},styles:{$ref:"#/$defs/section_styles",properties:{container_width:{enum:["medium","large"],default:"large"},columns:{type:"string",enum:["2-1","1-1","1-2","3-1","1-3","1-1-1","2-1-1","1-1-2","1-1-1-1"],default:"1-1",widget:"select",t:{enum:{"2-1":"2 / 1","1-1":"1 / 1","1-2":"1 / 2","3-1":"3 / 1","1-3":"1 / 3","1-1-1":"1 / 1 / 1","2-1-1":"2 / 1 / 1","1-1-2":"1 / 1 / 2","1-1-1-1":"1 / 1 / 1 / 1"}}}}}}}}},Gc={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"rich_text_section",type:"object",widget:"rich_text_section",version:"0.0.0",label:"Rich Text",properties:{section_properties:{type:"object",properties:{text:{type:"string",widget:"rich_text",localizable:!0,label:"Text",maxLength:1200},styles:{$ref:"#/$defs/section_styles",properties:{container_width:{enum:["small","medium","large","extraLarge"],default:"large"},background:{properties:{contain:{hidden:!1}}}}}}}}},cr={$schema:"https://json-schema.org/draft/2019-09/schema",type:"object",label:"Styles",view:{labelAppearance:"default",separator:!0},additionalProperties:!1,properties:{css:{$ref:"#/$defs/css_class"},background:{$ref:"#/$defs/background"},text:{type:"object",label:"Text",view:{separator:!0},properties:{color:{type:"string",widget:"color",label:!1},align:{type:"string",widget:"segmented_control",t:{label:"Align"},enum:["left","center","right"]},truncate:{hidden:!0,type:"string",widget:"segmented_control",enum:["none","auto"],default:"auto",t:{label:"Truncate Text"}}}},container_width:{type:"string",widget:"select",t:{label:"Container size"},default:"default",enum:["default"]},padding:{type:"object",t:{label:"Padding"},view:{separator:!0},properties:{apply_to_top_and_bottom:{type:"boolean",default:!0,t:{label:"Apply to top and bottom"}}},if:{properties:{apply_to_top_and_bottom:{const:!0}}},then:{required:["all"],properties:{all:{$ref:"#/$defs/padding",enum:["auto"],default:"auto"}}},else:{properties:{top:{$ref:"#/$defs/padding"},bottom:{$ref:"#/$defs/padding"}}}},image:{type:"object",hidden:!0,properties:{radius:{type:"string",widget:"segmented_control",enum:["none","default","circle"],default:"default"},aspect_ratio:{type:"string",enum:["landscape","portrait","square"],default:"landscape",widget:"segmented_control",t:{label:"Image Aspect Ratio"}}}}},$defs:{padding:{type:"string",widget:"select",t:{label:"Padding",enum:{top_bottom_separate:"Set top & bottom separately"}},enum:["default","none","small","medium","large"]}}},Yc={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"subscribe_section",type:"object",widget:"subscribe_section",version:"1.0.0",properties:{section_properties:{type:"object",required:["_t"],properties:{__t:{type:"string",enum:["center"],default:"center",widget:"select",hidden:!0,t:{label:"Layout"}},logo:{$ref:"#/$defs/image"},"title/styles":{$ref:"#/$defs/text_styles","@context":{"@id":{default:"title_1"}}},title:{type:"string",localizable:!0,maxLength:260,view:{placeholder:"Title (optional)"}},"subtitle/styles":{$ref:"#/$defs/text_styles","@context":{"@id":{default:"subheadline"}}},subtitle:{type:"string",localizable:!0,maxLength:260,widget:"text_area",view:{placeholder:"Subtitle (optional)"}},thank_you_message:{type:"string",localizable:!0,maxLength:260,widget:"text_area",t:{label:"Thank you message (optional)"}},show_social_media:{type:"boolean",default:!0,label:"Show social media icons"},styles:{$ref:"#/$defs/section_styles",properties:{container_width:{enum:["small","medium","large","extraLarge"],default:"large"},text:{properties:{align:{default:"center",hidden:!1}}},background:{properties:{contain:{hidden:!1}}}}}}}}},Xc={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"text_and_image_section",type:"object",widget:"text_and_image_section",version:"1.0.0",properties:{section_properties:{type:"object",required:["text_block","__t"],allOf:[{properties:{__t:{type:"string",enum:["split","full_bleed"],default:"split",widget:"segmented_control",t:{label:"Layout"}},image:{$ref:"#/$defs/image",t:{label:"Image"}},"title/styles":{$ref:"#/$defs/text_styles","@context":{"@id":{default:"title_1"}}},title:{type:"string",localizable:!0,maxLength:260,view:{placeholder:"Title (optional)"}},"text_block/styles":{$ref:"#/$defs/text_styles","@context":{"@id":{default:"body"}}},text_block:{type:"string",localizable:!0,widget:"text_area",maxLength:1200,view:{rows:5,placeholder:"Add some text"},t:{label:"Text"}},links:{type:"array",maxItems:4,uniqueItems:!0,items:{$ref:"#/$defs/link"}},styles:{$ref:"#/$defs/section_styles",properties:{container_width:{enum:["medium","large"],default:"large"},image_placement:{type:"string",enum:["left","right"],default:"left",widget:"segmented_control",label:"Image Placement"},image:{hidden:!1}}}}},{if:{properties:{__t:{const:"full_bleed"}}},then:{properties:{styles:{properties:{container_width:{enum:["full"],default:"full"},background:{properties:{contain:{hidden:!1}}}}}}}},{if:{properties:{__t:{const:"split"}}},then:{properties:{styles:{properties:{image:{type:"object",allOf:[{t:{label:"Image"},properties:{corners:{type:"string",widget:"segmented_control",enum:["none","rounded","circle"],default:"rounded",t:{label:"Image Corner Radius"}},size:{type:"string",enum:["small","large"],default:"large",widget:"segmented_control",t:{label:"Image Size"}},aspect_ratio:{type:"string",enum:["landscape","portrait"],default:"landscape",widget:"segmented_control",t:{label:"Image Aspect Ratio"}}}},{if:{properties:{size:{const:"small"}}},then:{properties:{aspect_ratio:{enum:["square","landscape","portrait"]}}}}]},container_width:{enum:["small","medium","large","extraLarge"],default:"large"},background:{properties:{contain:{hidden:!1}}}}}}}}]}}},Jc={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"text_block_section",type:"object",widget:"text_block_section",version:"1.0.0",label:"Text Only",properties:{section_properties:{type:"object",required:["__t"],properties:{__t:{type:"string",enum:["center"],default:"center",widget:"select",hidden:!0,t:{label:"Layout"}},"title/styles":{$ref:"#/$defs/text_styles","@context":{"@id":{default:"title_1"}}},title:{type:"string",localizable:!0,maxLength:260,view:{placeholder:"Title (optional)"}},"text_block/styles":{$ref:"#/$defs/text_styles","@context":{"@id":{default:"body"}}},text_block:{type:"string",widget:"text_area",localizable:!0,label:"Text",maxLength:1200,view:{rows:5,placeholder:"Add some text"}},links:{type:"array",maxItems:4,uniqueItems:!0,items:{$ref:"#/$defs/link"}},styles:{$ref:"#/$defs/section_styles",properties:{container_width:{enum:["small","medium","large"]},background:{properties:{contain:{hidden:!1}}}}}}}}},Qi={$schema:"http://json-schema.org/draft-07/schema#",type:"object",widget:"text_styles",styles:!0,description:"Attaches text styles to a string of text. By convention, the plugin will look for styles by '{key}/styles'",properties:{"@id":{type:"string",hidden:!0,enum:["xlarge_title","large_title","title_1","title_2","title_3","headline","subheadline","body","callout","footnote","caption_1","caption_2","category_link_1","category_link_2","small_1","small_2","custom_1","custom_2","custom_3","custom_4"]},name:{type:"string",hidden:!0},fontFamily:{type:"string",widget:"font_picker",t:{label:"Font Family"}},fontWeight:{type:"string",t:{label:"Font Weight"},widget:"select",enum:["100","200","300","400","500","600","700","800","900"]},color:{type:"string",widget:"color",label:!1},fontSize:{type:"number",minimum:8,maximum:96,view:{stepper:!0},t:{label:"Font Size"}},lineHeight:{type:"number",maximum:5,default:1.25,minimum:-1,view:{stepper:!0,step:.
101},t:{label:"Line Height"}},textTransform:{type:"string",widget:"segmented_control",t:{label:"Text Transform"},enum:["none","capitalize","uppercase","lowercase"],view:{size:"regular",icons:{none:"DisableIcon",capitalize:"Aa",uppercase:"AA",lowercase:"aa"}}},letterSpacing:{type:"number",maximum:5,default:1,minimum:-1,view:{stepper:!0,step:.01},t:{label:"Letter Spacing"}}}},Zc={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"theme",type:"object",properties:{accent_color:{type:"string",widget:"color"},background_color:{type:"string",widget:"color"},foreground_color:{type:"string",widget:"color"}}},Qc=d.globalCss({"@font-face":{fontFamily:"Bathilda",src:'url(/system/refinery/images/static/bayridge/Bathilda.otf) format("otf")'}}),ed=d.styled("div",{position:"absolute",inset:"50%",transform:"translate(-50%, calc(-50% - 100px))",fontFamily:"Bathilda",color:"$white",textShadow:"0 0 clamp(5px, 5vw, 10px) #00000080",whiteSpace:"nowrap",display:"inline-flex",flexDirection:"column",width:"fit-content",fontSize:"clamp(20px, 15vw, 50px)","> div":{display:"block"},"> :first-child":{marginLeft:"10%"},"> :nth-child(2)":{marginLeft:"auto",marginRight:"15%"},"> :not(:last-child)::after":{content:'","'}});function td(t){return Qc(),c.jsx(W,{id:"bayridge_top",minHeight:"200px",fallback:{padding:!0},omit:["backgroundImage","containerWidth"],css:{position:"relative",overflow:"hidden"},...t,children:({properties:e})=>{var n;return c.jsxs(c.Fragment,{children:[c.jsx(d.Grid,{css:{gap:"min(5vw, 50px)",transform:"translateY(calc((max(5vw, 10px) * -0.5) - 25px))",marginInline:"-5%",isolation:"isolate",position:"relative","@tabletLandscape":{gap:"max(5%, 50px)",marginLeft:"-5%"}},children:e.has("images")?(n=e.get("images"))==null?void 0:n.map((r,i)=>c.jsx(d.GridItem,{columns:{"@initial":6,"@tabletLandscape":3},css:{isolation:"isolate",position:"relative","&:nth-of-type(even)":{transform:"translateY(max(5vw, 10px))"},"&::before":{content:'""',position:"absolute",size:"100%",backgroundImage:`url('/system/refinery/images/static/bayridge-pattern-${i+1}.jpeg')`,backgroundSize:"cover",backgroundRepeat:"no-repeat",zIndex:"-1",top:"min(2.5vw, 25px)",left:"min(2.5vw, 25px)",borderRadius:"$3",aspectRatio:"36 / 48"}},children:c.jsx(d.Image,{src:Ze(r==null?void 0:r.get("@id"),"500x"),srcSet:Cn(r==null?void 0:r.get("@id")),css:{aspectRatio:"36 / 48",borderRadius:"$3",width:"100%",maxWidth:500,objectFit:"cover",objectPosition:jn(r==null?void 0:r.get("position"))},alt:r==null?void 0:r.get("alt")})},r==null?void 0:r.get("__id"))):null}),e.has("overlay_text")?c.jsx(ed,{children:e.get("overlay_text").split(",").map((r,i)=>c.jsx("div",{children:r},r+i))}):null]})}})}const nd=K,rd=fe(se(td)),es={widget:"bayridge_catholic_section",type:"object",properties:{section_properties:{type:"object",properties:{images:{type:"array",items:{$ref:"#/$defs/image"},default:[{},{},{},{}],maxItems:4},overlay_text:{type:"string",default:"Bold, Resilient, Christ-centered",view:{helpText:"Line breaks are inserted at commas."}},styles:{$ref:"#/$defs/styles"}}}}},id=Object.freeze(Object.defineProperty({__proto__:null,editor:nd,schema:es,viewer:rd},Symbol.toStringTag,{value:"Module"})),sd=["hero_section","text_block_section","image_section","icon_section","text_and_image_section","cards_section","subscribe_section","heading_section","custom_html_section","accordion_section","banner_section","mass_times_section","calendar_section"],Xt={orgSlugs:{bayridgecatholic:["bayridge_catholic_section"]},orgThemes:{diocese_admin:["mass_times_finder_section"]},isAgent:{true:["menu_section","multi_column_section"]}};function od({slug:t,orgTheme:e,isAgent:n}){const r=sd.concat(Xt.orgSlugs[t]||[]).concat(Xt.orgThemes[e]||[]).concat(Xt.isAgent[n]||[]);return Ht({$schema:"https://json-schema.org/draft/2019-09/schema",id:"page-builder-base-schema",version:"1.0",type:"object",additionalProperties:!1,properties:{sections:{type:"array",widget:"section_list",default:[{__t:"heading_section",__id:Ro.Utils.uuid()}],minItems:1,maxItems:15,items:{type:"object",allOf:[{type:"object",required:["__t","__id"],properties:{__t:{default:"hero_section",type:"string",enum:r,widget:"select",t:{label:"Type",enum:{image_section:"Image Gallery"}}},__id:{type:"string",format:"uuid",hidden:!0}}},...r.map(i=>({if:{properties:{__t:{const:i}}},then:{$ref:`#/$defs/${i}`}})).concat([{if:{properties:{__t:{const:"rich_text_section"}}},then:{$ref:"#/$defs/rich_text_section"}}])]}},theme:{label:"Theme",$ref:"#/$defs/theme"}},$defs:{text_block_section:Jc,hero_section:Fc,cards_section:Rc,subscribe_section:Yc,text_and_image_section:Xc,calendar_section:Ec,heading_section:Bc,custom_html_section:zc,image_section:Hc,bayridge_catholic_section:es,multi_column_section:qc,icon_section:Nc,mass_times_finder_section:Wc,accordion_section:jc,banner_section:Pc,text_styles:Qi,donation_section:Dc,mass_times_section:Vc,menu_section:Uc,rich_text_section:Gc,section_styles:cr,content_spot:Mc,link:Kc,padding:cr.$defs.padding,card:Ac,image:Wo,theme:Zc,background:Lc,css_class:Oc}})}function ad(t){const{onChange:e,showValidity:n,storeKeys:r,valid:i,currentPluginIndex:s}=t,o=$.useRef(t.errors.get("errors")),a=ii(r),l=t.errors.get("errors");$.useEffect(()=>{l!==o.current&&(e({type:"set",storeKeys:a,scopes:["valid"],data:{valid:l.isEmpty()?void 0:l}}),o.current=l)},[e,a,l]),$.useEffect(()=>()=>{e({type:"set",storeKeys:a,scopes:["valid"],data:{valid:void 0}})},[e,a]);const u=s+1,p=Mo(u,t.widgets);return c.jsx(p,{...t,currentPluginIndex:u,valid:i,showValidity:n})}function ts(t,e,n,r=!1){if(!t||t.size===0)return 0;let i=0;const s=[];
1for(const[,o]of t)if(de.isMap(o))if(n){const a=o.getIn(n);if((typeof a<"u"||typeof e>"u")&&a===e&&(i++,!r)||e==="presence"&&typeof a<"u"&&(i++,!r)||e==="instances"&&typeof a<"u"&&xe.isList(a)&&a.size&&(i+=a.size,!r))break;s.push(o.deleteIn(n))}else s.push(o);else if(o===e&&(i++,!r))break;if(s.length&&(!i||i&&r)){for(const o of s)if(i+=ts(o,e,n,r),i&&!r)break}return i}function ld(t,e=xe([]),{count:n=!1,type:r}){return t?ts(t.getIn(e),"instances",[r],n):0}const ns="TRANSLATE_FIELDS_EVENT",cd=new Event(ns);function dd({store:t}){var I;const[e,n]=$.useState(!1),{formatMessage:r}=Xr(),i=d.useConfirm(),s=t.getValues(),o=t.values.get("@id"),a=d.useToaster(),[l]=ot(wi),[u]=ot(fa),p=Jr(),f=Ta(p),{csrf:h}=Si(),{data:g}=J(ha,{variables:{path:f}}),b=((I=g==null?void 0:g.page)==null?void 0:I.draft)||!1;async function y(){try{a.add({intent:"info",title:"Generating Translations ..."}),await u({variables:{schemaValues:s.toJS()}}),await T()}catch(j){a.add({intent:"danger",title:"Error",description:j==null?void 0:j.message})}}async function w({goBackOnPublish:j=!1}={}){const R="missing-translation";n(j);const M=ld(t.getValidity(),xe([]),{count:!0,type:R});if(M)try{await i({title:"Saving with Auto-translations",intent:"warning",confirmIcon:d.DatabaseWarningIcon,confirmLabel:"Auto-translate and Save",message:r({id:"pagebuilder.errors",defaultMessage:`There are {errorCount} missing translations on this page. Clicking "Auto-translate and Save" will populate each of these
2              for all Locales set on this page with automatic translations. Feel free to manually edit these translations as you see fit.`},{errorCount:M})}),window.dispatchEvent(cd)}catch{return!1}else await l({variables:{id:o,contentSpot:{schemaValues:JSON.stringify(s.toJS())}}}),await T()}async function T(){b?(await Ia({csrf:h}),a.add({intent:"success",title:"Published",description:"Your page has been published"})):a.add({intent:"success",title:"Page Saved",description:"Your changes have been saved."}),e?window.location.pathname="/admin/pages":location.reload()}tr("save",()=>w({goBackOnPublish:!0})),tr("update-continue",()=>w({goBackOnPublish:!1})),po(ns,y)}function rs({scope:t,matching:e}){return c.jsx(d.Card,{css:{margin:"$2",padding:"$2",backgroundColor:"$gray5",display:"inline-block"},border:!0,children:c.jsxs(d.Text,{children:["Missing"," ",c.jsxs(d.Code,{children:[t,": ",e]})]})})}function ud({isVirtual:t,WidgetOverride:e,widgetName:n,schemaType:r,widgets:i,NoWidget:s}){const o=s||rs;let a=null;if(t)a=zo;else if(e)a=e;else if(n&&i.custom)i.custom[n]?a=i.custom[n]:(a=()=>c.jsx(o,{scope:"custom",matching:n}),a.displayName="NoWidgetCustom");else if(r&&i.types){const l=Oo(r);l&&(l==="object"?a=i.ObjectRenderer||ja:i.types[l]?a=i.types[l]:l==="null"?a=null:(a=()=>c.jsx(o,{scope:"type",matching:l}),a.displayName="NoWidgetType"))}return a}const pd=({value:t,internalValue:e,WidgetOverride:n,errors:r,onErrors:i,requiredList:s,currentPluginIndex:o,...a})=>{const{schema:l,widgets:u,isVirtual:p}=a,f=ii(r);$.useEffect(()=>i&&i(f),[i,f]);const h=l.get("type"),g=l.get("widget"),b=ud({isVirtual:!!p,WidgetOverride:n,NoWidget:rs,widgetName:g,schemaType:h,widgets:u}),y=!p&&(h==="array"||h==="object"||xe.isList(h)&&(h.indexOf("array")!==-1||h.indexOf("object")!==-1));return b?c.jsx(b,{...a,value:y?void 0:t,internalValue:y?void 0:e,errors:f}):null},fd=d.styled("a",{$$backgroundColor:"$white",$$color:"$label",$$borderColor:"$label",backgroundColor:"$backgroundColor",borderColor:"$$borderColor",color:"$$color",border:"3px solid $label",borderRadius:"$round",fontSize:"$3",fontWeight:"500",padding:"$2 $5",transition:"$normal",whiteSpace:"nowrap",textDecoration:"none","@tabletPortrait":{fontSize:"$4"},variants:{preview:{true:{cursor:"default"}},appearance:{fill:{backgroundColor:"$white",color:"$black",borderColor:"$white","&:hover":{backgroundColor:"#FFFFFF80",borderColor:"#FFFFFF80"}},outline:{backgroundColor:"transparent",color:"var(--org-theme-primary-contrast-color, $black)",borderColor:"$white","&:hover":{color:"$black",backgroundColor:"$white",borderColor:"$white"}}},contrastType:{dark:{color:"$label",borderColor:"$label"},custom:{$$color:"var(--org-theme-primary-contrast-color, $white)",$$borderColor:"var(--org-theme-primary-contrast-color, $white)","&:hover":{$$color:"var(--org-theme-color, $white)",$$backgroundColor:"var(--org-theme-primary-contrast-color, $label)"}},light:{color:"$white",borderColor:"$white"}}},compoundVariants:[{appearance:"fill",contrastType:"dark",css:{backgroundColor:"$label",color:"$white","&:hover":{backgroundColor:"hsl($hsl_label / 0.8)",color:"$white"}}},{appearance:"outline",contrastType:"dark",css:{"&:hover":{backgroundColor:"$label",color:"$white"}}}],defaultVariants:{appearance:"outline",contrastType:"light"}});function hd(t){const{editing:e,preview:n}=Oe();return c.jsx(fd,{title:n&&t.href,preview:n,as:n&&"div",...t})}function gd(t){return c.jsx(d.InputGroup,{size:"small",justify:"center",children:c.jsx(K,{noGrid:!0,...t})})}const is={viewer:hd,editor:gd},bn=d.styled("div",{gridArea:"image",display:"flex",width:"100%",borderTopLeftRadius:"$2",borderTopRightRadius:"$2",backgroundColor:"$gray5",position:"relative","&, & > img":{transition:"$slow"},variants:{showImage:{false:{display:"none"}},hasImage:{true:{}},layout:{discrete:{borderRadius:"$2",overflow:"hidden",boxShadow:"$1"},continuous:{overflow:"hidden"},overlay:{borderRadius:"$2"}},radius:{none:{borderRadius:0},circle:{"&":{aspectRatio:"1 / 1"},borderRadius:"$round"},rounded:{borderTopLeftRadius:"$2",borderTopRightRadius:"$2"}},aspectRatio:{square:{"> img":{aspectRatio:"1 / 1"}},landscape:{"> img":{aspectRatio:"16 / 9"}},portrait:{"> img":{aspectRatio:"4 / 5"}}},imageOrder:{first:{order:"-1"},last:{order:"1"}},orientation:{horizontal:{},vertical:{}}},compoundVariants:[{layout:"overlay",showImage:!0,hasImage:!0,css:{"&::before":{content:'""',backgroundImage:"linear-gradient(to bottom, transparent, rgb(0 0 0 / 0.35))",position:"absolute",width:"100%",height:"100%",inset:"0"}}},{layout:"overlay",aspectRatio:"portrait",css:{"> img":{aspectRatio:"4 / 5"}}}
2,{layout:"discrete",radius:"rounded",css:{borderRadius:"$2",overflow:"hidden"}},{radius:"circle",aspectRatio:"square",orientation:"horizontal",css:{width:"clamp(70px, 5vw, 90px)"}}],defaultVariants:{layout:"continuous",radius:"rounded",aspectRatio:"square"}}),ss=d.styled(d.Heading,{capsize:{fontSize:15,lineGap:5},variants:{isMultiColumn:{true:{},false:{}},cardSectionLayout:{scroll:{},list:{fontSize:"clamp($5, 3cqw, $6)",lineHeight:"1.25"},single:{fontSize:"20px; font-size: clamp(25px, 9cqw, 65px);",lineHeight:"1.25"},grid:{}},hasImage:{true:{}},layout:{overlay:{}}},compoundVariants:[{isMultiColumn:!1,cardSectionLayout:"list",css:{fontSize:"clamp(20px, 5vw, 44px)","@supports(font-size: 10cqw)":{fontSize:"clamp(20px, 4cqw, 44px)"},lineHeight:"1.25"}}]}),Wt=d.styled("a",d.VStack,{display:"flex",flexDirection:"column",scrollSnapAlign:"center",textDecoration:"none",cursor:"pointer",color:"var(--ui-color)",alignSelf:"stretch",alignContent:"center",containerName:"card-container",containerType:"inline-size",$$backgroundColor:"var(--ui-card_background, $colors$gray5)","@tabletLandscape":{scrollSnapAlign:"start"},variants:{hasHref:{true:{cursor:"pointer"},false:{cursor:"default"}},hasImage:{true:{alignItems:"start"},false:{[`&:hover ${ss}`]:{textDecoration:"underline"}}},layout:{discrete:{gap:"$3",color:"inherit",overflow:"hidden","&:hover":{[`${bn} > img`]:{boxShadow:"$3",transform:"scale(1.02)"}}},continuous:{borderRadius:"$2",boxShadow:"$1",backgroundColor:"$$backgroundColor","&:hover":{boxShadow:"$3"}},overlay:{position:"relative",borderRadius:"$2",overflow:"hidden","&:hover":{[`${bn}`]:{transform:"scale(1.02)"}}}},orientation:{horizontal:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gridTemplateAreas:"'content content content content content image image'",flexDirection:"row",alignItems:"center",justifyContent:"start"},vertical:{flexDirection:"column",alignItems:"center"}},cardSectionLayout:{scroll:{},list:{gap:"clamp($3, 2cqw, $7)"},single:{}},imageOrder:{first:{gridTemplateAreas:"'image image image content content content content content'"},last:{gridTemplateAreas:"'content content content content content image image image'"}},radius:{circle:{},rounded:{},none:{}},spacing:{auto:{},none:{}}},compoundVariants:[{orientation:"horizontal",imageOrder:"first",hasImage:!0,css:{gridTemplateAreas:"'image image content content content content content'"}},{orientation:"horizontal",imageOrder:"last",hasImage:!0,css:{gridTemplateAreas:"'content content content content content image image'"}}
2,{orientation:"horizontal",hasImage:!1,css:{gridTemplateColumns:"1fr",gridTemplateAreas:"'content'"}},{orientation:"horizontal",layout:"discrete",imageOrder:"first",radius:"circle",css:{gridTemplateAreas:"'image content content content content content content'",alignItems:"center"}},{orientation:"horizontal",layout:"discrete",imageOrder:"last",radius:"circle",css:{gridTemplateAreas:"'content content content content content content image'",alignItems:"center"}},{layout:"overlay",spacing:"none",radius:"none",css:{borderRadius:"0"}}],defaultVariants:{imageOrder:"first",layout:"continuous"}}),md=d.styled(d.VStack,{color:"var(--ui-color)",display:"grid",gridTemplateColumns:"1fr",gridAutoFlow:"row",width:"100%",gridArea:"content",img:{width:"100%",marginInline:"auto",borderRadius:"$2"},"b, strong":{fontWeight:"$bold"},"em,i":{fontStyle:"italic"},variants:{isMultiColumn:{true:{},false:{}},cardSectionLayout:{scroll:{},list:{},single:{}},layout:{discrete:{color:"var(--ui-color)",padding:"$4 0"},continuous:{aspectRatio:"3 / 1",padding:"$4 $3 $5",textAlign:"center",borderBottomLeftRadius:"$2",borderBottomRightRadius:"$2",color:"var(--ui-color, --ui-card-background-contrast);"},overlay:{color:"var(--ui-color)",position:"absolute",bottom:"0",padding:"$6",backgroundColor:"transparent","&:not(:has(#description))":{paddingBlockEnd:"$6"}}},orientation:{horizontal:{padding:"$1 0",flexDirection:"column",textAlign:"left"},vertical:{}},hasImage:{true:{},false:{alignItems:"center",paddingBlock:"$4"}}},compoundVariants:[{isMultiColumn:!1,cardSectionLayout:"list",css:{padding:"$5 0",gap:"clamp(5px, 3vw, 25px)"}},{layout:"discrete",orientation:"horizontal",cardSectionLayout:"list",hasImage:!1,
2css:{"@container card-container (min-width: 900px)":{gridTemplateColumns:"50%",gridAutoFlow:"row",width:"100cqw",placeContent:"start","> *":{gridColumn:"1 / 1"},".pb-card-widget-description":{gridColumn:"-1 / -1"}}}},{hasImage:!0,orientation:"horizontal",layout:"discrete",cardSectionLayout:"list",css:{padding:"0"}}],defaultVariants:{layout:"continuous"}});function bd({schema:t,parentSchema:e,storeKeys:n,value:r=de({}),styles:i=de({}),layout:s=i.get("card_layout","continuous"),align:o=i.getIn(["text","align"]),aspectRatio:a,orientation:l=i.get("card_orientation"),imageOrder:u,hasLink:p=!0,cardSectionLayout:f="scroll",preview:h,locale:g="en",imageRadius:b,editing:y}){var B,x;const{isMultiColumn:w=!1}=Oe(),T=i.get("show_image",!0),I=i.get("show_title",!0),j=!!((B=r.toJS())!=null&&B.image),R=i.get("show_subtitle",!0),M=i.get("show_description",!0),P=i.get("show_link",!0),A=i.get("show_tertiary_text",!0),m=i.get("spacing","auto");b||(b=i.getIn(["image","radius"])),b==="circle"&&(a="square"),f==="grid"&&m==="none"&&(b="none"),!u&&l==="horizontal"&&(u="first",o==="right"&&(u="last"));const k=$.useMemo(()=>Ln({parentSchema:e,schema:t,storeKeys:n,editing:y,preview:h}),[e,t,n,h,y]),[_]=d.useColorContrast({backgroundColor:i.get("card_background","white"),foregroundColors:["black","white"]}),S=r.getIn(["link","href"]);return(!S||S==="#")&&(p=!1),c.jsxs(Wt,{orientation:l,imageOrder:u,layout:s,hasImage:T,as:p?"a":"div",href:p?r.getIn(["link","href"]):null,hasHref:p&&
2!!r.getIn(["link","href"]),target:r.getIn(["link","new_tab"])===!0?"_blank":void 0,rel:"noreferer noopener",space:"none",cardSectionLayout:f,style:{"--ui-card-background-contrast":_},radius:b,spacing:m,children:[c.jsx(k,{accessor:"image",wrapper:bn,wrapperProps:{showImage:T,hasImage:j,radius:b,layout:s,aspectRatio:a||i.getIn(["image","aspect_ratio"]),orientation:l,className:"card-image"}}),c.jsxs(md,{align:o,layout:s,orientation:l,cardSectionLayout:f,isMultiColumn:w,justify:"center",hasImage:T,css:{textAlign:o},children:[R&&c.jsx(k,{accessor:"subtitle",as:d.Heading,size:"groupHeadline",css:{capsize:{fontSize:11,lineGap:3},fontWeight:"500","@container card-container (min-width: 500px)":{capsize:{fontSize:15,lineGap:3}}},className:"card-subtitle"}),I&&c.jsx(k,{accessor:"title",as:ss,isMultiColumn:w,cardSectionLayout:f,previewPlaceholder:"Add a title",hasImage:j,layout:s,className:"card-title"}),M&&c.jsx(k,{accessor:"description",showWhenEmpty:!!((x=r.get)!=null&&x.call(r,"teaser")),wrapper:d.Text,wrapperProps:{size:"caption1",lineClamp:i.getIn(["text","truncate"],"auto")==="auto"?3:void 0,className:"card-description"},as:({children:v})=>{var G;let D=v||r.get("teaser");return Do(D)&&(D=D.get(g)),D||(D=r.get("teaser")),c.jsx("span",{id:"description",dangerouslySetInnerHTML:{__html:(G=D==null?void 0:D.replace)==null?void 0:G.call(D,/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"")}})}}),A&&c.jsx(k,{accessor:"tertiary_text",as:d.Text,size:"caption1",className:"card-tertiary-text"}),P&&p&&c.jsx(k,{accessor:"link",variant:"link",wrapper:d.Box,wrapperProps:{className:"card-link"}})]})]})}const Ue=Wt.toString;Ue.toString=Wt.toString;const yd=K,os=fe(se(bd));os.toString=Wt.toString;var le=globalThis.globalSpotState;le||(le={});const as=({currentPluginIndex:t,isColumn:e,...n})=>{var I,j,R,M,P,A,m;const{onChange:r,storeKeys:i,value:s,internalValue:o,schema:a,editing:l}=n,u=d.useIsSSR(),p=t+1,f=(I=o==null?void 0:o.get)==null?void 0:I.call(o,"updateDelta",0),h=((j=s==null?void 0:s.get)==null?void 0:j.call(s,"@type"))==="content_spot"&&i.size>0,g=(R=s==null?void 0:s.get)==null?void 0:R.call(s,"@id");le[g]||(le[g]={delta:-1,fetched:!1});const b=((M=a==null?void 0:a.get)==null?void 0:M.call(a,"content_spot_type"))||void 0,y=a.getIn(["@context","feed_key"],"cards"),[w]=ot(wi),T=k=>{le[g]={delta:f||0,fetched:!0};const _=Pn(k==null?void 0:k.schemaValues,null);_&&r({type:"update",storeKeys:i.push(y),scopes:["value"],updater:()=>({value:si(_[y])})})};if(J(ga,{variables:{id:g,contentSpotType:b},skip:!h||!g||e||le[g].fetched===!0,onCompleted(k){le[g].delta!==f&&(le[g].fetched?console.log("DEBUG: something else, getting fresh data"):console.log("DEBUG: spot initializing, getting fresh data"),T(k==null?void 0:k.contentSpot))},onError:()=>{T({id:g,schemaValues:JSON.stringify({thing_type_keys:"","@id":"","@type":"content_spot",data_source:"db_content",[y]:[]})})}}),!h||!g)return c.jsx(cn,{...n,currentPluginIndex:p});if(h&&((P=s==null?void 0:s.get)==null?void 0:P.call(s,"data_source"))==="direct"){const k={[y]:xe([])};k[y]=(A=s.get(y))==null?void 0:A.filter(_=>!_.get("@id")),k[y].size===((m=s.get(y))==null?void 0:m.size)&&delete k[y],g&&(k["@id"]=null),Vo(n,k)}return l&&!u&&le[g].delta!==f&&(console.info(`DEBUG: saving spot @id=${g} because number changed from ${le[g].delta} to ${f}`),le[g].delta=f||0,w({variables:{id:g,contentSpot:{schemaValues:JSON.stringify(s.toJS())}},onCompleted:k=>T(k.contentSpot)})),c.jsx(cn,{...n,currentPluginIndex:p})},ls=d.styled("a",{$$color:"var(--ui-color, currentColor)",userSelect:"none",textDecoration:"none",cursor:"pointer",color:"var(--gc--color, black)","&:empty":{display:"none"},variants:{preview:{true:{cursor:"default"}},appearance:{outline:{},fill:{}},size:{small:{},medium:{},large:{}},variant:{link:{textDecoration:"underline",textUnderlineOffset:"3px",color:"$$color","&:hover":{textDecoration:"none"}},button:{border:"3px solid $label",borderRadius:"$round",fontWeight:"$medium",padding:"0 $5",height:"$8",display:"inline-flex",alignItems:"center",transition:"$normal",whiteSpace:"nowrap",textDecoration:"none",width:"max-content",capsize:{fontSize:13},"@tabletPortrait":{height:"$10",capsize:{fontSize:15}}}}},compoundVariants:[{variant:"button",appearance:"outline",css:{backgroundColor:"transparent",borderColor:"var(--gc--color, black)",color:"var(--gc--color, black)","&:hover":{color:"var(--ui-contrast-over-color, white)",backgroundColor:"var(--gc--color, black)"}}},{variant:"button",appearance:"fill",css:{backgroundColor:"var(--ui-color, black)",color:"var(--ui-contrast-over-color, white)",borderColor:"var(--ui-color, black)","&:hover":{opacity:.8}}},{variant:"button",size:"small",css:{height:"$7",padding:"0 $4",capsize:{fontSize:12.5}}}],defaultVariants:{appearance:"outline",variant:"link",size:"medium"}});ls.displayName="StyledLinkWidgetViewer";function xd(t){const{storeKeys:e,schema:n,value:r=de({})}=t,i=t.variant||r.get("variant"),s=t.size||r.get("size"),o=t.appearance||r.get("appearance");return c.jsx(ls,{href:r.get("href"),variant:i,size:s,appearance:o,target:r.get("new_tab")===!0?"_blank":"",rel:"noreferer noopener",children:c.jsx(Ft,{...t,parentSchema:n,schema:n.getIn(["properties","title"]),storeKeys:e.push("title"),raw:!0})})}function vd(t){const{t:e,storeKeys:n,schema:r}=t;return c.jsx(d.InputGroup,{size:"small",justify:"center",label:e(n.last().toString(),null,r),children:c.jsx(d.Grid,{css:{gridTemplateColumns:"1fr 1fr !important",justifyContent:"center",alignItems:"center"},space:"extraSmall",children:c.jsx(K,{noGrid:!0,...t})})})}const $d=vd,wd=fe(se(xd));function kd({storeKeys:t,onChange:e,schema:n,errors:r,valid:i,value:s,t:o}){let a;const l={labelAttr:"label",blankLabel:"Please choose",valueAttr:"",dataKeys:[""]};n.get("options_source")==="thing_types"&&(a=ki,l.blankLabel="All",l.valueAttr="thingTypeKey",l.dataKeys=["thingTypes","thingTypes"]),n.get("options_source")==="custom_html"&&(a=ma,l.valueAttr="id",l.labelAttr="title",l.dataKeys=["customHtmlBlocks","customHtmlBlocks"]);const{data:u,loading:p}=J(a,{skip:!a});if(p)return c.jsx(d.Spinner,{});const f=si(u).getIn(l.dataKeys);return s&&!f.find(h=>s===h.get(l.valueAttr))?null:c.jsxs(d.SelectField,{value:s,errorMessage:r.toSeq().last(),size:n.getIn(["view","size"],"regular"),label:o(t.last(),void 0,n),invalid:!i,onChange:h=>{we({onChange:e,storeKeys:t},h.currentTarget.value)},children:[c.jsx("option",{value:"",children:l.blankLabel},"blank"),f.map(h=>c.jsx("option",{value:h.get(l.valueAttr),children:h.get(l.labelAttr)},h.get(l.valueAttr)))]})}const dr=Uo(`
3	query GetContentSpotOptions {
4		contentSpots {
5			contentSpots {
6				id
7				title
8				identifier
9        contentFeedId
10			}
11		}
12	}
13`);function _d({storeKeys:t,onChange:e,schema:n,errors:r,valid:i,value:s,internalValue:o,t:a}){var P;const[l,u]=$.useState(void 0),[p,f]=$.useState(!1),[h,g,b]=fo(()=>f(!1),5e3),{data:y,loading:w}=J(dr),[T,{loading:I}]=ot(ba);if($.useEffect(()=>{var A;w||u((A=j.find(({value:m})=>m===s))==null?void 0:A.contentFeedId)},[w]),w)return c.jsx(d.Spinner,{});const j=(P=y==null?void 0:y.contentSpots)==null?void 0:P.contentSpots.map(({id:A,title:m,identifier:k,contentFeedId:_})=>({id:A,label:m??k,value:!k||k==="dynamic"?A:k,contentFeedId:_})),R=()=>{const A=o.get("new_spot_title");T({variables:{contentSpot:{identifier:"dynamic",title:A,reusable:!!(A!=null&&A.length)}},onCompleted:m=>{var k,_;we({onChange:e,storeKeys:t}
13,(k=m==null?void 0:m.createContentSpot)==null?void 0:k.id),u((_=m==null?void 0:m.createContentSpot)==null?void 0:_.contentFeedId)},refetchQueries:[dr]}),er({onChange:e,storeKeys:t},"new_spot_title","")},M=()=>{f(!0),e({type:"update",storeKeys:t.pop(),scopes:["internal"],updater:({internal:A=de()})=>({internal:A.set("updateDelta",A.get("updateDelta",0)+1)})}),b()};return c.jsxs(d.VStack,{children:[n.getIn(["view","allow_new_spot"],!0)===!0&&c.jsxs(d.InputGroup,{label:a(t.last(),void 0,n),children:[c.jsx(d.TextInput,{value:o==null?void 0:o.get("new_spot_title"),placeholder:"Symbol name",size:"regular","aria-label":"Symbol name",onChange:A=>er({onChange:e,storeKeys:t},"new_spot_title",A)}),c.jsx(d.Button,{appearance:"outline",iconBefore:d.AddIcon,onPress:R,children:"New"})]}),c.jsxs(d.SelectField,{value:s,invalid:!i,size:n.getIn(["view","size"],"regular"),errorMessage:r==null?void 0:r.toSeq().last(),onChange:({currentTarget:{value:A}})=>{var m;A&&(u((m=j.find(({value:k})=>k===A))==null?void 0:m.contentFeedId),we({onChange:e,storeKeys:t},A),A==="_create_blank_"&&R())},children:[c.jsx("option",{value:"_create_blank_",children:"None"},"blank"),j==null?void 0:j.map(({id:A,label:m,value:k})=>c.jsx("option",{value:k,children:m},A))]}),c.jsxs(d.HStack,{children:[c.jsx(d.Button,{size:"small",disabled:p||!l,onPress:M,children:"Apply Changes"}),c.jsx(d.Button,{size:"small",iconAfter:d.ExternalLinkIcon,disabled:p||I||!l,as:"a",href:`/admin/article/content_feeds/${l}/edit`,target:"_blank",children:"Edit Feed"})]})]})}function Sd({storeKeys:t,onChange:e,schema:n,errors:r,valid:i,value:s,t:o}){var p;const{data:a,loading:l}=J(ya);if(l)return c.jsx(d.Spinner,{});const u=(p=a==null?void 0:a.contentCategories)==null?void 0:p.categories;return(u==null?void 0:u.length)===0?null:c.jsxs(d.SelectField,{value:s,errorMessage:r.toSeq().last(),size:n.getIn(["view","size"],"regular"),label:o(t.last(),null,n),invalid:!i,onChange:f=>{we({onChange:e,storeKeys:t},f.currentTarget.value)},children:[c.jsx("option",{value:"",children:"All"},"blank"),u==null?void 0:u.map(({id:f,slug:h,title:g})=>c.jsx("option",{value:f,children:g},h))]})}function Td({storeKeys:t,onChange:e,schema:n,errors:r,valid:i,required:s,value:o,t:a}){var f;const{data:l,loading:u}=J(ki);if(u)return c.jsx(d.Spinner,{});const p=(f=l==null?void 0:l.thingTypes)==null?void 0:f.thingTypes;return(p==null?void 0:p.length)===0?null:c.jsxs(d.SelectField,{value:o,errorMessage:r.toSeq().last(),size:n.getIn(["view","size"],"regular"),label:a(t.last(),null,n),invalid:!i,onChange:h=>{we({onChange:e,storeKeys:t},h.currentTarget.value)},children:[c.jsx("option",{value:"",children:"All"},"blank"),p==null?void 0:p.map(({thingTypeKey:h,label:g})=>c.jsx("option",{value:h,children:g},h))]})}function Id({storeKeys:t,onChange:e,schema:n,errors:r,valid:i,required:s,value:o,t:a}){var f;const{data:l,loading:u}=J(xa);if(u)return c.jsx(d.Spinner,{});const p=(f=l==null?void 0:l.collectionTypes)==null?void 0:f.collectionTypes;return c.jsxs(d.SelectField,{value:o,errorMessage:r.toSeq().last(),size:n.getIn(["view","size"],"regular"),label:a(t.last(),null,n),invalid:!i,onChange:h=>{we({onChange:e,storeKeys:t},h.currentTarget.value)},children:[c.jsx("option",{value:"",children:"All"},"blank"),p==null?void 0:p.map(({collectionTypeKey:h,label:g})=>c.jsx("option",{value:h,children:g},h))]})}function Cd({storeKeys:t,onChange:e,schema:n,t:r,required:i,value:s,...o}){var u;const a=$.useCallback(p=>{e({storeKeys:t,scopes:["value"],type:"set",schema:n,required:i,data:{value:p}})},[t,e,n,i]),{bounceVal:l}=Pl(s,50,a);return c.jsx(d.Slider,{...o,defaultValue:n.get("default"),value:l.value||0,label:r(t.last(),null,n),labelProps:{appearance:"group"},formatOptions:(u=n.getIn(["view","formatOptions"]))==null?void 0:u.toJS(),step:n.getIn(["view","step"]),minValue:n.get("minimum"),maxValue:n.get("maximum"),onChange:p=>{e({storeKeys:t,scopes:["value"],type:"set",schema:n,required:i,data:{value:p}})}})}const cs=fe(se(Cd)),jd=null,Ld={should({value:t}){var n;return t&&((n=t==null?void 0:t.get)==null?void 0:n.call(t,"__t"))==="multi_column_section"||!1},handle(t){var o;
13const{value:e,onChange:n}=t,r=(o=e.getIn(["section_properties","columns"]))==null?void 0:o.size,i=e.getIn(["section_properties","styles","columns"],"1-1").split("-").length,s=t.storeKeys.concat(["section_properties","columns"]);return r>i?n({storeKeys:s,scopes:["value","internal"],type:"list-item-delete",index:r-1}):(!r||r<i)&&n({storeKeys:s,schema:t.schema.getIn(["properties","section_properties","properties","columns"]),scopes:["value","internal"],type:"list-item-add"}),t},noHandle(t){return t}};function Pd(t){return $.useMemo(()=>{var i;let n=t.get("order");if(!n)return t;const r=(i=t.get("properties"))==null?void 0:i.keySeq().filter(s=>!(n!=null&&n.includes(s)));return r&&(n.contains(null)?n=xe(n.splice(n.indexOf(null),1,...r)):n=n.concat(r)),t.set("properties",n.filter(s=>t.hasIn(["properties",s])).reduce((s,o)=>typeof o=="string"?s.set(o,t.getIn(["properties",o])):s,Bo()))},[t])}const Ed=({schema:t,...e})=>(t=Pd(t),c.jsx(cn,{schema:t,...e}));var Ad=ho();const Rd=Je(Ad),Md=d.styled("div",{borderInlineStart:"1px solid $gray3",aspectRatio:"1 / 1","&:last-child, &:first-child":{border:"none"},variants:{isOutsideVisibleRange:{true:{color:"$gray3"}}}}),Od=d.styled("div",{margin:"$1",size:"$5",display:"inline-flex",alignItems:"center",justifyContent:"center",variants:{today:{true:{backgroundColor:"$$accentColor",color:"$white",borderRadius:"$round"}}}});function ur({date:t,state:e}){const n=$.useRef(null),{cellProps:r,isOutsideVisibleRange:i,formattedDate:s}=In.useCalendarCell({date:t},e,n),o=t.toDate(e.timeZone).toDateString()===new Date().toDateString();return c.jsx(Md,{ref:n,isOutsideVisibleRange:i,...r,children:c.jsx(Od,{id:"date-cell",today:o,children:c.jsx(d.Text,{size:"caption2",children:s})})})}const On=$.createContext({hoveredEventId:void 0,setHoveredEventId:dn,openId:void 0,setOpenId:dn,calendars:[]});function zd(t,e){return t.hasSame(e,"day")?t:t.until(e)}function Dd(t){switch(t){case"gregory":return new Zr.GregorianCalendar;default:throw new Error(`Unsupported calendar ${t}`)}}function Bd(){const[t,{width:e}]=go(),n=e===0?1300:e;return{maxEventsInRow:(()=>{const s=n/7-35;
13return n<768?0:Math.floor(s/27.5)})(),ref:t}}const Fd=d.styled("div",{$$topOffset:"$space$7",$$cellHeight:"$sizes$5",position:"absolute",inset:0,top:"$$topOffset",width:"100%",display:"grid",gridTemplateRows:"masonry",alignContent:"start",alignItems:"start",gap:"calc($1 / 2)",gridTemplateColumns:"repeat(7, 1fr)",gridAutoFlow:"row dense","@supports (grid-template-rows: masonry)":{gridTemplateRows:"masonry"}}),ds=d.styled("span",{$$calendarColor:"$colors$primary",$$color:"$colors$gray6",position:"relative",display:"flex",alignItems:"center",width:"calc(100% - $2)",height:"$$cellHeight",backgroundColor:"$$color",padding:"$1",border:"1px solid $gray4",borderRadius:"$1",marginInline:"$1",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",userSelect:"none",cursor:"pointer",paddingLeft:"$3",transition:"background-color $fast",capsize:{fontSize:12,lineGap:1},variants:{isActive:{true:{outline:"2px solid $$calendarColor",outlineOffset:"1px"}},isHovered:{true:{backgroundColor:"color-mix(in lch, $$color, black 5%)"}},abuts:{left:{marginLeft:"-$1",borderTopLeftRadius:0,borderBottomLeftRadius:0,width:"calc(100% - $1)",paddingRight:"$2",paddingLeft:"$5","&::before":{left:"$3"}},right:{marginRight:"-$1",borderTopRightRadius:0,borderBottomRightRadius:0,width:"calc(100% - $1)",paddingRight:"$4"},both:{marginLeft:"-$1",marginRight:"-$1",borderRadius:0,width:"calc(100% + $1)",paddingRight:"$4",paddingLeft:"$5","&::before":{left:"$3"}}},isOverflow:{true:{backgroundColor:"transparent",border:"0px ","&:hover ":{backgroundColor:"color-mix(in lch, $$color, black 5%)"},"@media(max-width: 480px)":{size:"calc(100cqw/7)",width:"100%",margin:0,bottom:"$$topOffset",fontSize:"0 !important",position:"relative","&::after":{content:'""',size:"clamp(1px, 3vw, $2)",backgroundColor:"$gray4",borderRadius:"$round",display:"block",position:"absolute",top:"clamp(2px, 3vw, $2)",right:"clamp($1, 1vw, $2)",zIndex:-1},"&:hover ":{backgroundColor:"color-mix(in lch, $$color, transparent 50%)"}},"@media(max-width: 768px)":{display:"flex",alignItems:"center",fontSize:"clamp(12px, 2cqw, 16px)",size:"calc(100cqw/7)",width:"100%",margin:0,bottom:"$$topOffset",position:"relative","&:hover ":{backgroundColor:"color-mix(in lch, $$color, transparent 50%)"}}},false:{"&::before":{content:'""',display:"block",position:"absolute",left:"$1",width:"calc($1 / 2)",height:"calc(100% - $2)",borderRadius:"$round",backgroundColor:"$$calendarColor"}}},inActiveMonth:{true:{},false:{opacity:.5}}},defaultVariants:{isOverflow:!1}});function Nd({events:t,currentMonthStart:e,DetailsComponent:n}){var u;const{hoveredEventId:r,setHoveredEventId:i,openId:s,setOpenId:o,calendars:a}=$.useContext(On),l=U.Interval.fromDateTimes(e.startOf("month"),e.endOf("month"));return c.jsxs(Fd,{className:"events-row",children:[(u=t.eventsToDisplay)==null?void 0:u.map(p=>c.jsx(d.Popover,{css:{outline:"none"},possiblePlacements:["right","left"],containerOffset:10,content:n==null?void 0:n(p),closeOnClickOutside:!0,onClose:()=>o(void 0),children:({isOpen:f,triggerProps:h,setOpen:g})=>{var b,y;return c.jsx(ds,{className:"events-cell",...h,onClick:()=>{g(!f),o(f?void 0:p.id)},onMouseEnter:()=>i(p.id),onMouseLeave:()=>i(void 0),inActiveMonth:l.overlaps(p.interval),isActive:f||s===p.id,isHovered:r===p.id,abuts:p.abuts,css:{$$calendarColor:((b=a.find(w=>w.id===p.calendarId))==null?void 0:b.color)||"$colors$primary",gridColumnStart:Math.ceil((p.index||0)+1),gridColumnEnd:Math.min(Math.ceil((p.index||0)+(((y=p.interval)==null?void 0:y.toDuration("days").days)||1)+1),8)},children:p.title})}}
13,p.id)),Array(7).fill(null).map((p,f)=>c.jsx(Kd,{index:f,DetailsComponent:n,events:t.eventsToHide.filter(h=>h.index===f)},f))]})}function Hd({events:t,DetailsComponent:e}){return!t.length||typeof e!="function"?null:c.jsx(d.VStack,{children:t.map((n,r)=>c.jsxs($.Fragment,{children:[e(n),r!==t.length-1&&c.jsx(d.Separator,{orientation:"horizontal"})]},n.id))})}function Kd({events:t,index:e,DetailsComponent:n}){return t.length===0?null:c.jsx(d.Popover,{css:{outline:"none"},possiblePlacements:["right","left"],containerOffset:10,content:c.jsx(Hd,{DetailsComponent:n,events:t}),children:({isOpen:r,setOpen:i,triggerProps:s})=>c.jsx(ds,{isOverflow:!0,...s,isActive:r,onClick:()=>{i(!r)},css:{$$start:Math.ceil((e||0)+1),gridColumnStart:Math.ceil((e||0)+1),gridColumnEnd:"Math.ceil( $$start + 2)"},children:`${t.length} more`})})}const Wd=d.styled(d.VStack,{containerType:"inline-size",containerName:"calendar"}),Vd=d.styled("div",{fontWeight:"500",height:30,display:"grid",gridTemplateColumns:"repeat(7, 1fr)",alignItems:"center"}),Ud=d.styled("div",{$$accentColor:"$colors$primary",border:"1px solid $gray3",width:"100%",display:"grid",gridAutoFlow:"row"}),qd=d.styled("div",{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",overflow:"hidden",position:"relative",width:"100%",borderBlockStart:"1px solid $gray3",variants:{eventsRow:{true:{gridTemplateRows:"masonry"}}}});function Gd(t,e,n){const r=U.DateTime.local().zoneName,i=U.DateTime.fromJSDate(e[0].toDate(r)).startOf("day"),s=U.DateTime.fromJSDate(e[6].toDate(r)).endOf("day"),o=U.Interval.fromDateTimes(i,s),a=t.filter(f=>{const h=f.start,g=f.end,b=U.Interval.fromDateTimes(h,g);return o.overlaps(b)}).map(f=>{let h=f.start.minus({days:0}),g=f.end.plus({days:0});const b=h.toMillis()<i.toMillis(),y=g.toMillis()>s.toMillis(),w=b&&y?"both":b?"left":y?"right":void 0;o.isAfter(h)&&(h=i),o.isBefore(g)&&(g=s);const T=e.findIndex(I=>I&&U.DateTime.fromJSDate(I.toDate(r)).hasSame(f.start,"day"));return{...f,index:T>-1?T:void 0,interval:U.Interval.fromDateTimes(h,g),duration:U.Interval.fromDateTimes(h,g).toDuration("days").days,abuts:w}}).toSorted((f,h)=>f.start.toMillis()-h.start.toMillis()).toSorted((f,h)=>h.duration-f.duration),l=[],u=a.filter((f,h,g)=>{let b=n;if(n===0)return l.push(f),!1;const y=g.filter(T=>T.interval.overlaps(f.interval));return y.length>b&&(b-=1),y.filter((T,I)=>h<I).length>b?(l.push(f),!1):!0}),p=l.flatMap(f=>f.interval.hasSame("day")?{...f,index:e.findIndex(b=>b&&U.DateTime.fromJSDate(b.toDate(r)).hasSame(f.start,"day")),end:f.start}:o.intersection(f.interval).splitBy({days:1}).map(b=>b.start).map(b=>({...f,index:e.findIndex(y=>y&&U.DateTime.fromJSDate(y.toDate(r)).hasSame(b,"day")),start:f.start})));return{eventsToDisplay:u,eventsToHide:p}}function Yd({state:t,calendars:e,events:n,DetailsComponent:r,...i}){const{locale:s}=Qr(),{gridProps:o,headerProps:a}=In.useCalendarGrid(i,t),l=Zr.getWeeksInMonth(t.visibleRange.start,s),{ref:u,maxEventsInRow:p}=Bd();return c.jsxs(Ud,{...o,ref:u,children:[c.jsx(Vd,{...a,children:Rd(0,7).map(f=>c.jsx(d.Text,{size:"caption2","aria-hidden":!0,css:{fontWeight:"$medium",paddingInline:"$1"},children:U.DateTime.fromObject({weekday:(f+6)%7+1}).toFormat("ccc")},f))}),[...new Array(l).keys()].map(f=>c.jsxs(qd,{id:"calendar-row",children:[t.getDatesInWeek(f).map((h,g)=>h?c.jsx(ur,{state:t,date:h},g):c.jsx(ur,{},g)),c.jsx(Xd,{DetailsComponent:r,events:n,state:t,weekIndex:f,maxEventsInRow:p})]},f))]})}function Xd({events:t,maxEventsInRow:e,state:n,weekIndex:r,DetailsComponent:i}){const s=$.useMemo(()=>Gd(t,n.getDatesInWeek(r),e),[t,e,n,r]);return c.jsx(Nd,{DetailsComponent:i,currentMonthStart:U.DateTime.fromJSDate(n.visibleRange.start.toDate(U.DateTime.local().zoneName)),events:s})}function Jd(t){const{locale:e}=Qr(),{DetailsComponent:n,onMonthChange:r=dn,loading:i=!1,...s}=t,o=Ii.useCalendarState({...s,locale:e,createCalendar:Dd,onFocusChange:y=>r(d.toLuxonDateTime(y))}),[a,l]=$.useState(void 0),[u,p]=$.useState(void 0),{calendarProps:f,nextButtonProps:h,prevButtonProps:g,title:b}=In.useCalendar(s,o);return c.jsx(On.Provider,{value:{hoveredEventId:a,setHoveredEventId:l,openId:u,setOpenId:p,calendars:t.calendars},children:c.jsxs(Wd,{space:"none",...f,children:[c.jsxs(d.HStack,{align:"center",css:{paddingBlock:"$2"},children:[c.jsx(d.Button,{onPress:()=>o.setFocusedDate(d.today(U.DateTime.local().zoneName)),children:c.jsx(ei,{id:"today",defaultMessage:"Today"})}),c.jsx(d.Button,{icon:d.ChevronLeftIcon,...g,children:"Previous"}),c.jsx(d.Button,{icon:d.ChevronRightIcon,...h,children:"Next"}),c.jsx(d.Text,{children:b}),i&&c.jsx(d.Spinner,{size:"$3"})]}),c.jsx(Yd,{state:o,calendars:t.calendars,events:t.events,DetailsComponent:n})]})})}var Zd=ti,Qd=Wa;function eu(t,e){return t&&t.length?Qd(t,Zd(e)):[]}var tu=eu;const nu=Je(tu),ru=Ti(`
14	query GetEvents($feedIds: [ID!]!, $fromDate: String, $toDate: String) {
15		events(feedIds: $feedIds, fromDate: $fromDate, toDate: $toDate) {
16			events {
17				id
18				title
19				isRecurring
20				linkUrl
21				location
22				feed
23				calendarId
24				start
25				end
26			}
27		}
28	}
29`);function iu(t){const e=t.value??de();return c.jsx(W,{...t,children:c.jsx(ou,{value:e})})}const su=({calendarId:t,title:e,start:n,end:r,location:i,linkUrl:s})=>{const o=zd(n,r),{calendars:a}=$.useContext(On),l=a.find(p=>p.id===t),u=d.createTheme({colors:{primary:(l==null?void 0:l.color)||"$colors$primary"}});return c.jsxs(d.VStack,{className:u.className,css:{padding:"$4",width:"100%",minWidth:"$40",maxWidth:"$60"},children:[c.jsx(d.Heading,{size:"subHeadline",children:e}
29),(l==null?void 0:l.title)&&c.jsx(d.Heading,{css:{color:`color-mix(in hsl, ${l.color}, black 15%)`,backgroundColor:`color-mix(in hsl, ${l.color}, transparent 85%)`,marginRight:"auto",padding:"$1",borderRadius:"$1",fontWeight:"$bold"},size:"groupHeadline",children:l.title}),c.jsxs(d.HStack,{align:"center",children:[c.jsx(d.TimeClockCircleIcon,{size:"15px"}),c.jsx(d.Text,{size:"caption1",children:o.toFormat("LLL dd")})]}),i&&c.jsxs(d.HStack,{align:"center",children:[c.jsx(d.MapsPinIcon,{size:"15px"}),c.jsx(d.Text,{size:"caption1",children:i})]}),s&&c.jsx(d.Anchor,{underline:!0,href:s,size:"caption1",css:{"&:focus":{backgroundColor:"transparent"}},children:"View Event Details"})]})};function ou({value:t}){var u,p;const e=t==null?void 0:t.getIn(["events_feeds","events_feed_properties"],[]),n=e.map(f=>({id:f.get("feed_source"),title:f.get("title"),color:f.get("color")})),r=e.map(f=>f.get("feed_source")),{error:i,data:s,fetchMore:o,loading:a}=J(ru,{notifyOnNetworkStatusChange:!0,variables:{feedIds:r,fromDate:U.DateTime.local().startOf("month").minus({months:1}).toString(),toDate:U.DateTime.local().endOf("month").plus({months:1}).toString()}}),l=((p=(u=s==null?void 0:s.events)==null?void 0:u.events)==null?void 0:p.map(f=>{var h;return{...f,calendarId:(h=f.calendarId)==null?void 0:h.toString(),start:U.DateTime.fromISO(f.start),end:U.DateTime.fromISO(f.end)}}))??[];return i?c.jsx(d.EmptyState,{title:"Error loading events"}):c.jsx(Jd,{DetailsComponent:su,calendars:n,events:l,loading:a,onMonthChange:async f=>{const h=f.startOf("month");await o({variables:{fromDate:h.minus({months:1}).toString(),toDate:h.plus({months:2}).toString()},updateQuery(g,b){const{fetchMoreResult:y}=b;return y?{...g,events:{events:nu([...g.events.events,...y.events.events],"id")}}:g}})}})}const au=fe(se(iu)),lu=K,cu=Object.freeze(Object.defineProperty({__proto__:null,editor:lu,viewer:au},Symbol.toStringTag,{value:"Module"}));function du(t){const{value:e,isMultiColumn:n,...r}=t,i=t.layouts,s=$.useMemo(()=>typeof i=="function"?i({isMultiColumn:n}):i,[i,n]),o=e.getIn(["section_properties","__t"]),a=s[o]||s.default;return c.jsx(Ft,{...r,__id:e.get("__id"),__t:e.get("__t"),isMultiColumn:n,parentSchema:t.schema,schema:t.schema.getIn(["properties","section_properties"]),storeKeys:t.storeKeys.push("section_properties"),WidgetOverride:a})}const uu=$.memo(du,(t,e)=>t.value.getIn(["section_properties","__t"])===e.value.getIn(["section_properties","__t"])),zn=fe(uu);function ut({Property:t,Wrapper:e=$.Fragment,wrapperProps:n={},justify:r="between"}){return c.jsx(e,{...n,children:c.jsxs(d.HStack,{align:"center",justify:r,children:[c.jsx(t,{accessor:"title",as:d.Heading,className:"card-heading"}),c.jsx(t,{accessor:"more_link",size:"small"})]})})}const pu=d.styled(d.VStack,{paddingTop:"$3","@tabletLandscape":{paddingLeft:"$5",paddingTop:"0"}});function fu(t){const{t:e,schema:n}=t;return c.jsx(W,{fallback:{padding:!0},omit:["backgroundImage","textAlign"],...t,children:({styles:r,styleSchema:i,Property:s,properties:o})=>c.jsxs(d.Grid,{space:{"@tabletLandscape":"extraLarge","@initial":"large"},children:[c.jsx(d.GridItem,{columns:{"@tabletLandscape":7,"@initial":12},children:c.jsxs(d.VStack,{space:"large",children:[c.jsx(d.GridItem,{columns:{"@tabletLandscape":7,"@initial":12},children:c.jsx(d.Heading,{size:"headline",children:e("cards.layout.featured.title",{fallback:"Featured"},n)})}),c.jsx(s,{accessor:"featured_card",align:"start",layout:"discrete",aspectRatio:"landscape",styles:o.get("styles")})]})}),c.jsx(d.GridItem,{columns:{"@tabletLandscape":5,"@initial":12},children:c.jsxs(pu,{space:"large",children:[c.jsx(ut,{Property:s,styles:r}),c.jsx(s,{accessor:"cards",aspectRatio:"landscape",orientation:"horizontal",imageOrder:"last",layout:"discrete",styles:i==null?void 0:i.removeAll(["image"]),previewPlaceholder:c.jsxs(d.Text,{children:["There are currently no ",o.get("thing_type_keys")," items to display."]})})]})})]})})}const hu=d.styled(d.Grid,{alignItems:"top",placeContent:"center",justifyContent:"center",gridTemplateColumns:"repeat(auto-fill, minmax(250px, 1fr))",[`${Ue}`]:{width:"100%"},variants:{showSeparators:{true:{[`${Ue}
29::before`]:{content:'""',display:"block",width:"100%",height:"2px",position:"absolute",top:"calc(var(--gc-space-medium) / -2 + 1px)",left:0,backgroundColor:"$muted"}}},spacing:{auto:{gap:"$3"},none:{maxWidth:"100%",width:"100%",gap:2,gridTemplateColumns:"1fr"}},orientation:{vertical:{},horizontal:{gap:"$5"}},contain:{true:{paddingInline:"$5"},false:{}}},compoundVariants:[{spacing:"none",showSeparators:!0,css:{gap:2}}],defaultVariants:{spacing:"auto"}}),gu=d.styled(d.VStack,{variants:{spacing:{none:{paddingBlock:"2px"}}}});function mu(t){const{preview:e,isMultiColumn:n}=t;return c.jsx(W,{fallback:{padding:!0},omit:r=>["backgroundImage",(r.get("spacing")==="none"||n)&&"paddingBlock"],...t,children:({Property:r,properties:i,styleSchema:s})=>c.jsx(bu,{Property:r,properties:i,styleSchema:s,preview:e})})}function bu({Property:t,styleSchema:e,properties:n,preview:r}){var u,p;const i=n.getIn(["styles","max_columns"],3),s=((u=n==null?void 0:n.get("cards"))==null?void 0:u.size)??1,o=e.get("spacing","auto"),a=o==="none",l=e.get("show_separator",!1);return(((p=n==null?void 0:n.get("cards"))==null?void 0:p.size)||0)===0&&!r?null:c.jsx(d.Box,{children:c.jsxs(gu,{space:"large",spacing:o,children:[!a&&(n.has("title")||n.hasIn(["more_link","title"]))&&c.jsx(ut,{Property:t}),c.jsx(t,{wrapper:hu,wrapperProps:{spacing:o,showSeparators:l,radius:e.getIn(["image","radius"]),css:{[`@media (min-width: ${250*i+(i-1)*5}px)`]:{gridTemplateColumns:`repeat(auto-fill, minmax(calc(100% / ${i+1}), 1fr))`}},orientation:e.get("card_orientation"),contain:e.getIn(["background","contain"],!1)},accessor:"cards",styles:e,hasLink:!n.get("displayOnly"),layout:o==="none"?"overlay":"discrete",previewPlaceholder:`There are currently no ${n.get("thing_type_keys")} items to display.`,cardSectionLayout:"grid"},s)]})})}const yu=d.styled(d.Separator,{color:"$gray3",variants:{isMultiColumn:{true:{backgroundColor:"$primary",height:2}}}}),xu=d.styled(d.Grid,{alignItems:"start",alignContent:"start",rowGap:"clamp($3, 5cqw, $8)",[`${Ue}`]:{width:"100%",justifySelf:"center",alignSelf:"start"},variants:{listOrientation:{horizontal:{},vertical:{[`${Ue}`]:{alignSelf:"center"}}},radius:{circle:{[`${Ue}`]:{textAlign:"center"}}},contain:{true:{paddingInline:"$5"},false:{}}}});function vu(t){const{preview:e,isMultiColumn:n,locale:r}=t;return c.jsx(W,{fallback:{padding:!0},omit:["backgroundImage",n&&"paddingBlock"],...t,children:({Property:i,styleSchema:s,properties:o})=>{var g;const a=((g=o==null?void 0:o.get("cards"))==null?void 0:g.size)??0;s.get("max_columns",3);const l=o.getIn(["title",r])||o.getIn(["more_link","title",r]),u=s.get("show_separator",!1),p=s.get("list_orientation","vertical"),f=p==="vertical"?"horizontal":"vertical",h=(()=>{let b=Array(a).fill("auto");return u&&(b=b.flatMap(y=>[y,"2px"])),l&&p==="vertical"&&(b=["2px",...b]),b})();return a===0&&!e?null:c.jsxs(d.VStack,{space:"large",children:[l&&c.jsx(ut,{Property:i,justify:"between"}),c.jsxs(xu,{space:"medium",style:{gridTemplateRows:p==="vertical"?h.join(" "):"unset",gridTemplateColumns:p==="horizontal"?h.join(" "):"unset"},listOrientation:p,radius:s.getIn(["image","radius"],"square"),contain:s.getIn(["background","contain"],!1),children:[l&&f==="horizontal"&&c.jsx(yu,{isMultiColumn:n}),c.jsx(i,{accessor:"cards",aspectRatio:"landscape",styles:s==null?void 0:s.removeAll(["image"]),previewPlaceholder:`There are currently no ${o.get("thing_type_keys")} items to display.`,isMultiColumn:n,hasLink:!o.get("displayOnly"),layout:"discrete",align:"right",orientation:"horizontal",cardSectionLayout:"list"})]})]})}})}function pr(t,e,n={behavior:"smooth"}){let r=2;const i=e==="up"||e==="down"?"y":"x",s=e==="right"||e==="down"?"+":"-",o=i==="x"?t.scrollWidth-t.offsetWidth:t.scrollHeight-t.offsetHeight,a=_u(t)[i];s==="-"&&(r*=-1);const l=t[i==="x"?"scrollLeft":"scrollTop"]+r,u=a.filter(f=>s==="+"?f>l:f<l).sort((f,h)=>s==="+"?f-h:h-f);let p;return u.length>0?p=u[0]:s==="+"?p=o:p=0,t.scrollTo({...n,[i==="x"?"left":"top"]:p})}function $u(t){const e=window.getComputedStyle(t),n=t.getBoundingClientRect();let r=e.getPropertyValue("scroll-padding-left").replace("auto","0px"),i=e.getPropertyValue("scroll-padding-top").replace("auto","0px"),s=e.getPropertyValue("scroll-padding-right").replace("auto","0px"),o=e.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function a(h,g){let b=parseFloat(h);return/%/.test(h)&&(b/=100,b*=g),b}let l=a(r,n.width),u=a(i,n.height),p=a(s,n.width),f=a(o,n.height);return{x:{before:l,after:p},y:{before:u,after:f}}}function wu(t,e,n="both"){return n==="x"&&t.right>=e.left&&t.left<=e.right||n==="y"&&t.bottom>=e.top&&t.top<=e.bottom||n==="both"&&t.right>=e.left&&t.left<=e.right&&t.bottom>=e.top&&t.top<=e.bottom}function us(t){let e=[];for(const n of t.children)e=e.concat(n,us(n));return e}function ku(t,e=!0){const n=t.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},i=us(t);for(const s of["x","y"]){const o=s==="x"?"y":"x",a=s==="x"?"left":"top",l=s==="x"?"width":"height",u=s==="x"?"scrollLeft":"scrollTop";for(const p of i){const f=p.getBoundingClientRect();if(e&&!wu(n,f,o))continue;const h=window.getComputedStyle(p);let[g,b]=h.getPropertyValue("scroll-snap-align").split(" ");typeof b>"u"&&(b=g);const y=s==="x"?b:g,w=f[a]-n[a]+t[u];switch(y){case"none":break;case"start":r[s].start.push(w);break;case"center":r[s].center.push(w+f[l]/2);break;case"end":r[s].end.push(w+f[l]);break}}}return r}function _u(t){const e=t.getBoundingClientRect(),n=$u(t),r=ku(t),i={x:t.scrollWidth-t.offsetWidth,y:t.scrollHeight-t.offsetHeight},s=(o,a)=>l=>Math.max(o,Math.min(a,l));return{x:fr([...r.x.start.map(o=>o-n.x.before),...r.x.center.map(o=>o-e.width/2),...r.x.end.map(o=>o-e.width+n.x.after)].map(s(0,i.x))),y:fr([...r.y.start.map(o=>o-n.y.before),...r.y.center.map(o=>o-e.height/2),...r.y.end.map(o=>o-e.height+n.y.after)].map(s(0,i.y)))}}function fr(t){return Array.from(new Set(t))}const Su=d.styled("div",{display:"grid",minHeight:250,overflowX:"auto",scrollPaddingInline:"50px",marginInline:"auto",gap:"$5"});function hr(t){return c.jsx(W,{...t,omit:["backgroundImage"],fallback:{padding:!0},css:{position:"relative",isolation:"isolate"},__UNSAFE__DEOPTIMIZE:["cards","title","links"],children:({Property:e,properties:n,styles:r,styleSchema:i})=>c.jsx(Tu,{Property:e,properties:n,styles:r,styleSchema:i})})}function gr(t){const{editing:e}=Oe();return e?null:c.jsx(d.Button,{...t,round:!0,appearance:"outline",color:"custom",css:{placeSelf:"center",$$color:"var(--ui-color); color-mix(in hsl var(--ui-color), transparent 30%)",$$onColor:"var(--ui-contrast-over-color)",$$outlineColor:"var(--ui-color); color-mix(in hsl var(--ui-color), transparent 30%)",opacity:.7,"@laptop":{display:"flex"}}})}function Tu({Property:t,styleSchema:e,properties:n}){var p;const{locale:r}=Oe(),i=$.useRef(null),s=((p=n.get("cards"))==null?void 0:p.size)??n.get("max_cards")??1,o=e.get("
29card_layout")??"continuous",[a,l]=$.useState("50%");$.useEffect(()=>{var h,g,b;if(!i.current)return;const f=(b=(g=(h=i.current)==null?void 0:h.querySelector("img"))==null?void 0:g.getBoundingClientRect())==null?void 0:b.height;f&&l(`${f}px`)},[i.current]);const u={overlay:{imageRadius:"rounded",aspectRatio:"portrait"},discrete:{imageRadius:"rounded",aspectRatio:"landscape"},continuous:{}}[o]||{};return c.jsxs(c.Fragment,{children:[c.jsx(d.HStack,{align:"center",justify:"end",css:{position:"absolute",left:"-25px",top:a,transform:"translateY(-50%) translateX(-100%)",zIndex:99,"@media (pointer: coarse)":{display:"none"}},children:c.jsx(gr,{icon:d.ChevronLeftIcon,onPress:()=>pr(i.current,"left")})}),c.jsxs(Su,{children:[(n.getIn(["title",r])||n.getIn(["more_link","title",r]))&&c.jsx(ut,{Wrapper:d.GridItem,wrapperProps:{columns:12},Property:t}),c.jsx(d.GridItem,{as:Ce.motion.div,ref:i,columns:"12",css:{alignItems:"center",justifyContent:"start",display:"grid",minHeight:250,gap:"$4",overflowX:"auto",scrollSnapType:"x mandatory",scrollPaddingInline:"50px",paddingBlock:"$1","&::-webkit-scrollbar, &::-webkit-scrollbar-track, &::-webkit-scrollbar-thumb":{opacity:0}
29,gridTemplateColumns:`repeat(${s}, 270px)`,"@laptop":{gap:"$5",gridTemplateColumns:`repeat(${s}, min(calc(100cqw / ${Math.min(s,4)} - $4), 350px))`}},children:c.jsx(t,{accessor:"cards",styles:e==null?void 0:e.removeAll(["image"]),aspectRatio:e==null?void 0:e.getIn(["image","aspect_ratio"],u.aspectRatio),imageRadius:e==null?void 0:e.getIn(["image","radius"],u.imageRadius)})})]}),c.jsx(d.HStack,{align:"center",justify:"start",css:{position:"absolute",right:"-25px",top:a,transform:"translateY(-50%) translateX(100%)",zIndex:99,"@media (pointer: coarse)":{display:"none"}},children:c.jsx(gr,{icon:d.ChevronRightIcon,onPress:()=>pr(i.current,"right")})})]})}function Iu(t){const{isMultiColumn:e,locale:n}=t;return c.jsx(W,{fallback:{padding:"medium"},omit:["backgroundImage","paddingBlock"],...t,children:({Property:r,properties:i,styleSchema:s,type:o})=>c.jsxs(d.VStack,{space:"large",css:{justifySelf:"center",marginBlock:"auto"},justify:e&&"center",children:[(i.getIn(["title",n])||i.getIn(["more_link","title",n]))&&c.jsx(ut,{Property:r}),c.jsx(d.VStack,{orientation:s.get("list_orientation","vertical"),css:{alignItems:"top",height:"100%"},children:c.jsx(r,{accessor:"cards",cardSectionLayout:o,layout:"discrete",orientation:"vertical",styles:s})})]})})}const Cu=t=>c.jsx(zn,{...t,layouts:({isMultiColumn:e})=>{let n={single:Iu,list:vu,grid:mu,featured:fu,scroll:hr,default:hr};return e&&(n=mo(n,["single","list","grid"]),n.default=n.list),n}}),ju=K,Lu=Object.freeze(Object.defineProperty({__proto__:null,editor:ju,viewer:Cu},Symbol.toStringTag,{value:"Module"})),Pu=d.styled("iframe",{width:"100%",border:"none",padding:0,margin:0,overflowY:"hidden"}),Eu=!1;function Au({value:t,...e}){const{editing:n}=Oe(),r=$.useRef(null),i=t.get("section_properties")??de({}),o=(i.get("styles")??de({})).get("container_width","default"),{data:a}=J(va,{variables:{id:i.getIn(["html_block","@id"])},skip:!i.getIn(["html_block","@id"])}),l=a==null?void 0:a.customHtmlBlock,u=(l==null?void 0:l.customHtml)??"",p=(l==null?void 0:l.isShadowDom)??!0,f=Fo(i.get("styles"),{omit:["backgroundImage","color"],fallback:{padding:"default"}});function h(){var b,y,w;const g=r.current;if(g){const T=(w=(y=(b=g.contentWindow)==null?void 0:b.document.body)==null?void 0:y.scrollHeight)==null?void 0:w.toString();T!==g.height&&(g.height=T)}}return ni(h,500),c.jsx(W,{...e,__UNSAFE__DEOPTIMIZE:["data_source",["html_block","@id"]],children:()=>c.jsx(d.Box,{css:f,children:c.jsxs(d.Box,{css:{display:"flex",maxWidth:o==="full"?`$sizes$container-${o}`:`min($sizes$container-${o}, calc(100% - $$gutter))`,minHeight:n&&p&&300,marginInline:"auto",position:"relative"},children:[p?c.jsx(Pu,{onLoad:h,ref:r,srcDoc:`
30                  <!-- Fixes iframe styles -->
31                  <style>body { margin: 0; padding: 0; border: 0; }</style>
32                  <!-- Fixes some things that need a recaptcha placeholder -->
33                  <div class="g-recaptcha" id="YOUR-ID" data-sitekey="YOUR-KEY" render="explicit"></div>
34                  ${u}
35                `,allowFullScreen:!0}):n?c.jsx(d.Card,{css:{backgroundColor:"#0007",color:"$white",padding:"$4"},children:c.jsx(d.Text,{children:c.jsx(ei,{id:"custom_html_section.unsafe_html",defaultMessage:"HTML previews are only available for Safe HTML. View this page live to see your custom HTML."})})}):c.jsx("div",{dangerouslySetInnerHTML:{__html:u}}),Eu]})})})}const Ru=K,Mu=fe(se(Au)),Ou=Object.freeze(Object.defineProperty({__proto__:null,editor:Ru,viewer:Mu},Symbol.toStringTag,{value:"Module"})),zu=d.styled("div",{position:"absolute",inset:0,zIndex:0,isolation:"isolate"}),Du=d.styled(Ce.motion.img,{size:"100%",position:"absolute",inset:0,objectFit:"cover"}),Bu={initial:{opacity:0}
35,animate:{opacity:1},exit:{opacity:0}};function ps({images:t}){const e=t==null?void 0:t.toJS(),[n,r]=$.useState(0);return ni(()=>{(e==null?void 0:e.length)>=2&&r((n+1)%e.length)},5e3),e?c.jsx(zu,{children:c.jsx(Ce.AnimatePresence,{initial:!1,children:e.map((i,s)=>s===n?c.jsx(Du,{variants:Bu,initial:"initial",animate:"animate",exit:"exit",transition:{duration:2},src:Ze(i==null?void 0:i["@id"]),style:{objectPosition:jn(i.position)}},i["@id"]):null)})}):null}const Fu=d.styled("video",{position:"absolute",objectFit:"cover",width:"100%",height:"100%",display:"block"});function fs({fallback:t=null,css:e={}}){const{videoUrl:n}=zi();return n?c.jsx(Fu,{css:e,as:"video",autoPlay:!0,loop:!0,muted:!0,playsInline:!0,disableRemotePlayback:!0,children:c.jsx("source",{src:n,type:"video/mp4"})}):t}const hs=d.styled(d.TextInput,{borderRadius:"$1",width:"100%",boxShadow:"none",fontSize:"large !important",variants:{size:{extraLarge:{width:"100%",minWidth:"50vw; min-width: 50cqw",height:"calc($18)",fontSize:"$5"}}}}),Nu=d.styled(d.Box,{[`${d.Icon}`]:{width:"$6",translate:"13px"},[`${hs}`]:{paddingLeft:"$15"}});function Dn({placeholder:t="What can we help you find?",action:e="/search",size:n="large",searchParamKey:r="search",scope:i}){const s=new URLSearchParams;return i&&s.append("scope",i),c.jsx(Nu,{children:c.jsx("form",{action:e,children:c.jsx(hs,{size:n,name:r,placeholder:t,iconBefore:d.SearchIcon})})})}const gs=d.styled("a",d.VStack,{"&:hover":{color:"var(--org-theme-color, $black)"},color:"$label",textDecoration:"none",textAlign:"start",maxWidth:"100%"}),Hu=d.styled(d.Heading,{alignSelf:"flex-start",fontFamily:"$sans",textAlign:"start",fontWeight:"$medium"}),Ku=d.styled(d.Text,{alignSelf:"flex-start",fontFamily:"$sans",width:"100%"}),Wu=({title:t,teaser:e,link:n,image:r})=>c.jsx(gs,{space:"none",href:n,target:"_blank",children:c.jsxs(d.HStack,{justify:"between",space:"small",css:{padding:"$3"},children:[c.jsxs(d.VStack,{children:[c.jsx(Hu,{size:"subHeadline",children:t}),e&&c.jsx(Ku,{as:"span",size:"caption1",children:e})]}),!pn(r)&&!pn(r.src)&&c.jsx(d.Image,{id:`pinned_announcement_image_${r.id}`,src:r.src||"",alt:r.alt||"",css:{aspectRatio:1/1,maxWidth:84,alignSelf:"center"}})]})}),Vu=d.styled(d.Pane,{overflow:"hidden",overflowY:"auto",backgroundColor:"$background",textAlign:"center",justifyContent:"center",position:"relative",width:"calc(100% - $$gutter)",marginInline:"auto",border:"1px solid #f5f5f5",borderRadius:"$1",top:"$3",maxWidth:"min(500px, calc(100vw - $2))",maxHeight:"clamp(300px,25vw, 400px)",zIndex:"$overlay","@tabletLandscape":{maxWidth:"300px",width:"calc(100% - $6)",position:"absolute",right:"$3"},[`${gs}:not(:last-child)::after`]:{content:"''",width:"100%",height:"1px",marginBlock:"$1",backgroundColor:"$gray4"}}),Uu=Ti(`
36	query GetPinnedAnnouncements {
37		announcements(pinned: true) {
38			id
39			title
40			teaser
41			link
42			image(geometry: "300x") {
43				id
44				src
45				alt
46			}
47		}
48	}
49`),ms=()=>{const{data:t,loading:e}=J(Uu);if(e)return null;const n=((t==null?void 0:t.announcements)??[]).slice(0,2);return n.length>0&&c.jsx(Vu,{children:n.map(({id:r,...i})=>c.jsx(Wu,{...i},r))})},qu=d.styled("div",{width:"100%",height:"100%",display:"flex",marginTop:"auto",variants:{align:{left:{alignItems:"flex-end",justifyContent:"flex-start"},center:{alignItems:"flex-end",justifyContent:"center"},right:{alignItems:"flex-end",justifyContent:"flex-end"}},verticalAlign:{center:{},bottom:{paddingBottom:"max($10, 7%)"}},hasBackgroundImage:{true:{textShadow:"0 0 40px rgba(0, 0, 0, 0.5), 0 0 10px rgba(0, 0, 0, 0.25)"},false:{}}},defaultVariants:{align:"center"}}),bs=d.styled(d.Heading,{fontFamily:"$serif",fontWeight:"$regular",capsize:{fontSize:18,lineGap:9},"@tabletPortrait":{capsize:{fontSize:24,lineGap:12}}}),ys=d.styled(d.Heading,{fontFamily:"$serif",fontWeight:"normal",lineHeight:"1.35",fontSize:"clamp(18px, 15vw, 36px)","@tabletPortrait":{fontSize:"$extraLargeTitle"}});function Jt(t){return c.jsx(W,{...t,fallback:{containerWidth:!0},defaultHeight:"75vh",minHeight:"400px",css:{position:"relative"},background:({styleSchema:e,properties:n})=>c.jsxs(c.Fragment,{children:[n.get("show_announcements")&&c.jsx(ms,{}),n.get("video_background")&&c.jsx(fs,{}),e.getIn(["background","carousel"])===!0&&c.jsx(ps,{images:e.getIn(["background","images"])})]}),__UNSAFE__DEOPTIMIZE:["vertical_align"],children:({styles:e,Property:n,styleSchema:r,properties:i})=>{const s=No(i.get("vertical_align"));return c.jsx(qu,{align:e.textAlign||"center",css:{alignItems:s,paddingBlock:s!=="center"?"$12":"$0",width:"100%"}
49,hasBackgroundImage:r.getIn(["background","carousel"])||r.getIn(["background","image","@id"]),children:c.jsxs(d.VStack,{space:"large",justify:"start",css:{width:"100%",position:"relative"},children:[c.jsx(n,{accessor:"subtitle",as:bs,size:"headline"}),c.jsx(n,{accessor:"title",as:ys,size:"extraLargeTitle",previewPlaceholder:"Add a title"}),c.jsx(n,{accessor:"links",wrapper:d.HStack,wrapperProps:{justify:Nt(e.textAlign)}}),c.jsx(n,{accessor:"search",as:Dn,size:"extraLarge"})]})})}})}function Gu(t){return c.jsx(W,{fallback:{padding:!0},...t,children:({Property:e})=>c.jsx(e,{accessor:"title",as:ys,previewPlaceholder:!0})})}const Yu=Gu,Xu=K,Ju=Object.freeze(Object.defineProperty({__proto__:null,editor:Xu,viewer:Yu},Symbol.toStringTag,{value:"Module"})),be=(t,e="600x",{position:n}={})=>String(t).match("static")?`/image.jpg?file=${encodeURIComponent(t)}&size=${encodeURIComponent(e)}`:`/image.jpg?id=${encodeURIComponent(t)}&size=${encodeURIComponent(e)}${n!=null&&n.x?`&position=${encodeURIComponent(JSON.stringify(n))}`:""}`;function Zu({images:t=xe([])}){return c.jsx(d.Box,{style:{width:"100%",marginLeft:"auto",position:"relative"},children:c.jsxs(d.Box,{style:{aspectRatio:"1335 / 1137",width:"100%",position:"relative"},children:[c.jsx(d.Box,{style:{borderTopLeftRadius:9999,borderTopRightRadius:9999,border:"2px solid #E0A961",width:"78.5%",position:"absolute",left:"50%",top:"50%",transform:"translateX(-49%) translateY(-76%)",aspectRatio:"480 / 242"}},"top-gold-semi-circle"),c.jsx(d.Image,{style:{transform:"translateX(2%) translateY(-33%)",width:"32%",left:"0",top:"50%",aspectRatio:"426 / 628",borderRadius:"25px",position:"absolute",objectFit:"cover"},src:be(t.getIn([0,"@id"],"static/hero1.jpg"),"426x628#",{position:t.getIn([0,"position"])})},"top-left-image"),c.jsx(d.Image,{style:{transform:"translateX(-49%) translateY(15%)",bottom:"0",left:"50%",width:"79%",aspectRatio:"854 / 428",position:"absolute"},src:be("static/hero_oval.png","427x214#")},"burlap-semi-circle-upside-down"),c.jsx(d.Image,{style:{width:"49%",aspectRatio:"300 / 310",borderRadius:"25px",position:"absolute",objectFit:"cover",right:0},src:be(t.getIn([3,"@id"],"static/hero4.jpg"),"426x628#",{position:t.getIn([3,"position"])})},"top-right-image"),c.jsx(d.Image,{style:{transform:"translateX(62.8%) translateY(61%)",width:"49%",aspectRatio:"672 / 1007",borderRadius:"25px",position:"absolute",bottom:"50%",objectFit:"cover"},src:be(t.getIn([1,"@id"],"static/hero2.jpg"),"426x628#",{position:t.getIn([1,"position"])})},"bottom-center-image"),c.jsx(d.Image,{style:{transform:"translateX(70%) translateY(36%)",bottom:"0",width:"27.3%",aspectRatio:"365 / 465",borderRadius:"8%",position:"absolute",objectFit:"cover"},src:be(t.getIn([2,"@id"],"static/hero3.jpg"),"426x628#",{position:t.getIn([2,"position"])})},"bottom-left-image"),c.jsx(d.Box,{style:{borderBottomRightRadius:9999,borderBottomLeftRadius:9999,border:"2px solid #E0A961",width:"38%",position:"absolute",right:"0",bottom:"0",transform:"translateX(-31.2%) translateY(49%)",aspectRatio:"225 / 112"}},"gold-semi-circle")]})})}function Qu({images:t=xe([])}){return c.jsx(d.Box,{style:{width:"100%",marginLeft:"auto",position:"relative"},children:c.jsxs(d.Box,{style:{aspectRatio:"1335 / 1137",width:"100%",position:"relative"},children:[c.jsx(d.Image,{style:{transform:"translateX(33%) translateY(35%)",width:"60%",aspectRatio:"854 / 428",position:"absolute"},src:be("static/hero_oval_upright.png","427x214#")},"burlap-semi-circle"),c.jsx("img",{style:{transform:"translateX(111%) translateY(3%)",width:"32%",aspectRatio:"456 / 574",borderRadius:"8%",position:"absolute",objectFit:"cover"},src:Ze(t.getIn([0,"@id"],"static/hero1.jpg"),"426x628#",{position:t.getIn([0,"position"])})},"top-center-image"),c.jsx(d.Image,{style:{transform:"translateX(0%) translateY(41.9%)",width:"28.9%",aspectRatio:"410 / 574",borderRadius:"8%",position:"absolute",objectFit:"cover",right:0},src:be(t.getIn([3,"@id"],"static/hero4.jpg"),"426x628#",{position:t.getIn([3,"position"])})},"top-right-image"),c.jsx(d.Box,{style:{borderBottomRightRadius:9999,borderTopRightRadius:9999,border:"2px s
49olid #E0A961",height:"44.5%",position:"absolute",right:"0",bottom:"0",transform:"translateX(-95%) translateY(-23%)",aspectRatio:"112 / 225"}},"gold-semi-circle"),c.jsx(d.Image,{style:{transform:"translateX(111%)",width:"32%",aspectRatio:"456 / 574",borderRadius:"8%",position:"absolute",bottom:0,objectFit:"cover"},src:be(t.getIn([1,"@id"],"static/hero2.jpg"),"426x628#",{position:t.getIn([1,"position"])})},"bottom-center-image"),c.jsx(d.Image,{style:{transform:"translateY(70%)",width:"32.3%",aspectRatio:"456 / 574",borderRadius:"8%",position:"absolute",objectFit:"cover"},src:be(t.getIn([2,"@id"],"static/hero3.jpg"),"426x628#",{position:t.getIn([2,"position"])})},"top-left-image")]})})}function ep(t){return c.jsx(W,{fallback:{padding:"clamp(120px, 10vw, 190px)"},omit:["backgroundImage","textAlign"],...t,children:({Property:e,properties:n})=>c.jsxs(d.Box,{css:{display:"grid",gridTemplateColumns:"1fr",gap:"$5",rowGap:"$15",alignItems:"center","@tabletPortrait":{gridTemplateColumns:"repeat(auto-fit, minmax(500px, 1fr))"}},children:[c.jsxs(d.Box,{css:{gridRow:"2","@tabletPortrait":{gridRow:"auto"}},children:[c.jsx(e,{accessor:"subtitle",as:bs,size:"headline"}),c.jsx(e,{accessor:"title",as:d.Heading,css:{fontFamily:"$serif",fontWeight:"normal",lineHeight:"1.35",fontSize:"$title1","@tabletPortrait":{fontSize:"$largeTitle"}},previewPlaceholder:"Add a title"}),c.jsx(d.Spacer,{size:"$10"}),c.jsx(e,{accessor:"links",wrapper:d.HStack,wrapperProps:{align:"center"},variant:"button"})]}),n.getIn(["styles","collage_style"])==="grid"?c.jsx(Qu,{images:n.get("images")},"grid"):c.jsx(Zu,{images:n.get("images")},"dense")]})})}const tp=d.styled("div",{"@tabletPortrait":{width:"100%",zIndex:1,position:"absolute",bottom:"0",display:"flex",justifyContent:"center",alignItems:"bottom",transform:"translateY(50%)",paddingInline:"$5"}}),np=d.styled("div",{aspectRatio:"16/9"}),rp=d.styled("div",{padding:"$5",width:"100%",backgroundColor:"$background",textAlign:"center","@tabletPortrait":{padding:"$10",borderRadius:"$2",maxWidth:700}});function ip(t){return c.jsx(W,{omit:["paddingBlock"],css:{"@tabletPortrait":{paddingBlock:"0",marginBottom:200}},background:({properties:e})=>c.jsxs(c.Fragment,{children:[e.get("video_background")&&c.jsx(fs,{}),e.getIn(["styles","background","carousel"])===!0&&c.jsx(ps,{images:e.getIn(["styles","background","images"])}),e.get("show_announcements")&&c.jsx(ms,{})]}),...t,children:({Property:e})=>c.jsxs(c.Fragment,{children:[c.jsx(np,{"aria-hidden":!0}),c.jsx(tp,{children:c.jsxs(rp,{children:[c.jsx(e,{accessor:"title",as:d.Heading,size:"title2",css:{lineHeight:1.5,fontWeight:"regular",fontFamily:"$serif",fontSize:"$title2","@tabletPortrait":{fontSize:"$title1"}},previewPlaceholder:"Add a title"}),c.jsx(e,{accessor:"links",wrapper:d.HStack,wrapperProps:{align:"center",justify:"center",css:{paddingTop:"$10"}},variant:"button"}),c.jsx(e,{accessor:"search",as:Dn,size:"extraLarge"})]})})]})})}const sp=t=>c.jsx(zn,{...t,layouts:{large_title:Jt,wide_image:ip,overlay:Jt,collage:ep,default:Jt}}),op=K,ap=Object.freeze(Object.defineProperty({__proto__:null,editor:op,viewer:sp},Symbol.toStringTag,{value:"Module"}));var lp=bo();const cp={enter:t=>({x:t===0?0:t>0?1e3:-1e3,opacity:0,scale:.8}),center:{zIndex:1,x:0,scale:1,opacity:1},exit:t=>({zIndex:0,x:t<0?1e3:-1e3,opacity:0,scale:.8})},dp=d.styled(Ce.motion.img,{maxHeight:"calc(100vh - $5)",maxWidth:"calc(100vw - $5)",size:"100%",objectFit:"contain",position:"absolute",cursor:"grab",opacity:0,"&:active":{cursor:"grabbing"},"@tabletLandscape":{maxWidth:"calc(100vw - 200px)"}}),up=d.styled(Ce.motion.div,{all:"unset",inset:0,margin:0,width:"100vw",height:"100vh",border:"none",position:"fixed",backdropFilter:"blur(15px) brightness(25%)",backgroundColor:"hsl($colors$primary_h $colors$primary_s $colors$primary_l / 0.5 / 0.85)"}),mr=1e4,pp=(t,e)=>Math.abs(t)*e;function fp({isShown:t,images:e=[],startingImageIndex:n=0,onClose:r}){const i=$.useRef(null),[[s,o],a]=$.useState([n,0]),l=lp.wrap(0,e.length,s);$.useEffect(()=>{t&&typeof n=="number"&&s!==n&&a([n,0])},[t]);function u(f){a([s+f,f])}function p(){var f;(f=i.current)==null||f.close(),r==null||r()}return Gt("ArrowLeft",()=>u(-1)),Gt("ArrowRight",()=>u(1)),Gt("Escape",r),yo(t),t?c.jsx(Va,{children:c.jsx(d.StackingProvider,{layer:"overlay",children:f=>c.jsxs(up,{variants:{enter:{opacity:0}
49,center:{opacity:1},exit:{opacity:0}},css:{zIndex:f},initial:"enter",animate:"center",exit:"exit",transition:{delayChildren:4},children:[c.jsx(d.HStack,{align:"center",justify:"center",css:{size:"100%"},children:c.jsx(Ce.AnimatePresence,{custom:o,children:c.jsx(dp,{custom:o,src:Ze(e[l]["@id"],"500x"),srcSet:Cn(e[l]["@id"]),initial:"enter",animate:"center",exit:"exit",variants:cp,transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}},drag:"x",dragConstraints:{left:0,right:0,top:0,bottom:0},dragElastic:1,onDragEnd:(h,{offset:g,velocity:b})=>{const y=pp(g.x,b.x);y<-mr?u(1):y>mr&&u(-1)}},s)})}),c.jsx(d.Button,{icon:d.CloseIcon,css:{position:"absolute",top:"$4",right:"$4",zIndex:2},color:"tertiary",onClick:p,round:!0}),c.jsxs(d.HStack,{justify:"between",css:{position:"absolute",inset:"auto $4 $5",zIndex:2,"@tabletLandscape":{inset:"50% $4 auto"}},children:[c.jsx(d.Button,{icon:d.ArrowLeftIcon,onPress:()=>u(-1),appearance:"outline",round:!0,size:"large",css:{color:"$white",$$outlineColor:"white"}}),c.jsx(d.Button,{icon:d.ArrowRightIcon,onPress:()=>u(1),appearance:"outline",round:!0,size:"large",css:{color:"$white",$$outlineColor:"white"}})]}),c.jsx(d.Box,{css:{position:"absolute",bottom:"$8",left:"50%",transform:"translateX(-50%)",zIndex:1e3,color:"$white","@tabletLandscape":{left:"$5",bottom:"$5",transform:"none"}},children:c.jsx(d.Card,{css:{backgroundColor:"#00000080",padding:"$2",whiteSpace:"nowrap"},children:c.jsxs(d.HStack,{children:[c.jsxs(d.Text,{css:{fontVariant:"tabular-nums"},children:[l+1," / ",e.length]}),e[l].alt&&c.jsx(d.Text,{children:e[l].alt})]})})})]})})}):null}const hp=d.styled("img",{width:"100%",borderRadius:"$2",objectFit:"cover",backgroundColor:"$gray5",variants:{hasLightBox:{true:{cursor:"pointer",transition:"$normal","&:hover":{boxShadow:"0 0 0 3px $colors$gray3"}}},aspectRatio:{square:{aspectRatio:"1 / 1"},landscape:{aspectRatio:"3 / 2"},portrait:{aspectRatio:"2 / 3",maxWidth:400,maxHeight:600}},radius:{none:{borderRadius:0},circle:{"&":{aspectRatio:"1 / 1",maxWidth:600,maxHeight:600},borderRadius:"$round"}},imageCount:{lessThanThree:{"&:first-child":{marginLeft:"auto"},"&:last-child":{marginRight:"auto"},"&:first-child:last-child":{marginInline:"auto"}}}},compoundVariants:[{imageCount:"lessThanThree",aspectRatio:"portrait",css:{maxWidth:400,maxHeight:600}},{imageCount:"lessThanThree",aspectRatio:"square",css:{maxWidth:600}},{imageCount:"lessThanThree",aspectRatio:"landscape",css:{maxWidth:800}}]});function gp(t){var f,h,g;const{value:e}=t,{editing:n}=Oe(),[r,i]=$.useState(null),[s,o]=$.useState(!1),a=e.get("section_properties")??Ht({}),l=((f=a.get("images"))==null?void 0:f.size)??1;let u=a.getIn(["styles","max_columns"],3);l<u&&(u=l);const p=Ln(t);return c.jsxs(W,{__UNSAFE__DEOPTIMIZE:["images"],fallback:{padding:!0},omit:["backgroundImage"],...t,children:[c.jsxs(d.VStack,{space:"large",children:[c.jsx(p,{accessor:"title",as:d.Heading}),c.jsx(d.Grid,{css:{alignItems:"top",width:"100%",marginInline:"auto",placeContent:"center",justifyContent:"center",gap:"$1",gridTemplateColumns:"repeat(auto-fill, minmax(250px, 1fr))",gridTemplateRows:"max-content",[`@media (min-width: ${250*u+(u-1)*5}px)`]:{gap:"$3",gridTemplateColumns:`repeat(auto-fill, minmax(calc((100% + $$gutter * 2) / ${u+1}), 1fr))`}},children:a.has("images")?(h=a.get("images"))==null?void 0:h.map((b,y)=>c.jsx(hp,{src:Ze(b==null?void 0:b.get("@id"),"500x"),srcSet:Cn(b==null?void 0:b.get("@id")),alt:b==null?void 0:b.get("alt"),style:{objectPosition:jn(b==null?void 0:b.getIn(["position"]))},radius:a.getIn(["styles","image","radius"],"default"),aspectRatio:a.getIn(["styles","image","aspect_ratio"],"landscape"),hasLightBox:a.get("lightbox")===!0,loading:"lazy",onClick:()=>{n||a.get("lightbox")===!0&&(o(!0),i(y))},imageCount:l<3?"lessThanThree":void 0},(b==null?void 0:b.get("__id"))??(b==null?void 0:b.get("@id")))):n?c.jsx(d.Card,{css:{backgroundColor:"#2d2d2d50",size:`calc(100% / ${u})`}}):null})]}),c.jsx(Ce.AnimatePresence,{children:c.jsx(fp,{onClose:()=>o(!1),images:(g=a.get("images"))==null?void 0:g.toJS(),isShown:s,startingImageIndex:r})})]},s)}const mp=K,bp=fe(se(gp)),yp=Object.freeze(Object.defineProperty({__proto__:null,editor:mp,viewer:bp},Symbol.toStringTag,{value:"Module"})),xp=d.styled("img",{size:"clamp(80px, 8vw, 120px)"}),vp=fe(se(({value:t=de(),schema:e,storeKeys:n,...r})=>c.jsxs(d.VStack,{align:"center",justify:"start",css:{width:"clamp(80px, 8vw, 120px)",textAlign:"center"},children:[c.jsx(xp,{src:Ze(t==null?void 0:t.get("@id"),null,{raw:!0,extension:"svg"}),alt:t==null?void 0:t.get("alt"),loading:"lazy"},t==null?void 0:t.get("@id")),c.jsx(Ft,{...r,parentSchema:e,schema:e.getIn(["properties","title"]),storeKeys:n.push("title"),css:{fontSize:"clamp($3, 2.5vw, $4)"},raw:!0})]},t==null?void 0:t.get("@id"))));function $p(t){return c.jsx(W,{...t,fallback:{padding:!0},omit:["backgroundImage"],children:({Property:e})=>c.jsx(e,{accessor:"icons",as:vp,wrapper:d.HStack,wrapperProps:{align:"start",justify:"evenly",wrap:!0,css:{gap:"$10",minHeight:150}}})})}const wp=K,kp=$p,_p=Object.freeze(Object.defineProperty({__proto__:null,editor:wp,viewer:kp},Symbol.toStringTag,{value:"Module"}));function Sp(t){return c.jsx(W,{fallback:{color:!0,backgroundColor:!0},...t,children:({styleSchema:e,Property:n})=>{const r=e.get("image_placement","left");return c.jsxs(d.Grid,{css:{minHeight:250,alignItems:"center",gap:0},children:[c.jsx(d.GridItem,{columns:{"@initial":12,"@tabletPortrait":6},css:{order:0,alignSelf:"stretch","@laptop":{order:r==="left"?0:1}},children:c.jsx(n,{accessor:"image",showWhenEmpty:!0,css:{backgroundColor:"$gray2",height:"100%",aspectRatio:"7 / 4",top:0}})}),c.jsx(d.GridItem,{columns:{"@initial":12,"@tabletPortrait":6},css:{display:"flex",justifyContent:"center",minHeight:200},children:c.jsxs(d.VStack,{space:"large",justify:"center",css:{maxWidth:450,paddingBlock:"$$gutter",paddingInline:"$$gutter","@laptop":{minWidth:300}},children:[c.jsx(n,{accessor:"title",as:d.Heading,size:"headline",css:{capsize:{fontSize:24,lineGap:12}}}),c.jsx(n,{accessor:"text_block",as:d.Paragraph,css:{whiteSpace:"pre-line"},previewPlaceholder:!0}),c.jsx(n,{accessor:"links",wrapper:d.HStack,wrapperProps:{align:"center"}})]})})]})}})}function br(t){return c.jsx(W,{fallback:{containerWidth:"large",padding:!0},...t,children:({styleSchema:e,Property:n})=>{const r=e.get("image_placement","left"),i=e.getIn(["image","size"],"large"),s=e.getIn(["image","as
49pect_ratio"],"landscape"),o={square:"1 / 1",landscape:"7 / 4",portrait:"9 / 14"}[s],a={none:"none",rounded:"$4",circle:s==="square"?"$round":"$4"}[e.getIn(["image","corners"],"rounded")],l={small:"min(calc(100vw - $2), 300px)",large:s==="portrait"?"min(calc(100vw - $2), 400px)":"calc(100vw - $2)"}[i];return c.jsxs(d.Grid,{css:{gap:"clamp($3, 2.5vw, $10)",minHeight:250,alignItems:"center",gridTemplateColumns:"repeat(auto-fit, minmax(250px, 1fr))"},children:[c.jsx(d.GridItem,{css:{order:0,placeContent:"center",placeItems:"center",display:"flex","@tabletLandscape":{order:r==="left"?0:1}},children:c.jsx(n,{accessor:"image",showWhenEmpty:!0,css:{maxWidth:l,borderRadius:a,aspectRatio:o}})}),c.jsxs(d.VStack,{space:"large",justify:"center",css:{maxWidth:450,alignItems:Nt(e.getIn(["text","align"],"left"))},children:[c.jsx(n,{accessor:"title",as:d.Heading,size:"headline",css:{capsize:{fontSize:24,lineGap:12}}}),c.jsx(n,{accessor:"text_block",as:d.Paragraph,css:{whiteSpace:"pre-line"},previewPlaceholder:!0}),c.jsx(n,{accessor:"links",wrapper:d.HStack,wrapperProps:{align:"center"}})]})]})}})}const Tp=t=>c.jsx(zn,{...t,layouts:{full_bleed:Sp,split:br,default:br}}),Ip=K,Cp=Object.freeze(Object.defineProperty({__proto__:null,editor:Ip,viewer:Tp},Symbol.toStringTag,{value:"Module"}));function jp(t){return c.jsx(W,{fallback:{backgroundColor:!0,color:!0,padding:!0,containerWidth:"medium"},...t,children:({styles:e,Property:n})=>c.jsxs(d.VStack,{justify:"center",children:[c.jsx(n,{accessor:"title",as:d.Heading,size:"headline"}),c.jsx(n,{accessor:"text_block",as:d.Paragraph,size:"large",css:{whiteSpace:"pre-line"}}),c.jsx(n,{accessor:"links",wrapper:d.HStack,wrapperProps:{align:"center",justify:e.justify,wrap:!0}})]})})}const Lp=K,Pp=jp,Ep=Object.freeze(Object.defineProperty({__proto__:null,editor:Lp,viewer:Pp},Symbol.toStringTag,{value:"Module"})),Ap=d.styled("div",{display:"contents",variants:{editing:{true:{'& > section[data-empty="true"]':{border:"1px dashed $gray2",borderRadius:"$1"}}}}});function Rp(t){const e=t.index,n=t.showSeparator&&e!==0,r=Ln(t);return c.jsxs(Ap,{editing:t.editing,className:"pagebuilder-column",children:[n&&c.jsx(d.Separator,{orientation:"vertical"}),c.jsx(r,{accessor:"sections",isColumn:!0,isMultiColumn:!0})]})}const Mp=d.styled("div",{display:"grid",gridTemplateColumns:"1fr",gap:"clamp($5, 5vw, $14)",minHeight:50,"@tabletLandscape":{gridTemplateColumns:"1fr 1fr"},[`${d.GridItem}`]:{display:"flex",flexDirection:"column"},variants:{showSeparator:{true:{},false:{}},editing:{true:{[`${d.GridItem}`]:{"*":{pointerEvents:"none"}}}},columnLayout:{"1-1-1":{"@tabletLandscape":{gridTemplateColumns:"1fr 1fr 1fr"}},"1-1":{"@tabletLandscape":{gridTemplateColumns:"1fr 1fr"}},"1-2":{"@tabletLandscape":{gridTemplateColumns:"1fr 2fr"}},"2-1":{"@tabletLandscape":{gridTemplateColumns:"2fr 1fr"}},"1-3":{"@tabletLandscape":{gridTemplateColumns:"1fr 3fr"}},"3-1":{"@tabletLandscape":{gridTemplateColumns:"3fr 1fr"}},"2-1-1":{"@tabletLandscape":{gridTemplateColumns:"2fr 1fr 1fr"}},"1-1-2":{"@tabletLandscape":{gridTemplateColumns:"1fr 1fr 2fr"}},"1-1-1-1":{"@tabletLandscape":{gridTemplateColumns:"repeat(4, 1fr)"}}}},compoundVariants:[{showSeparator:!0,columnLayout:"1-1-1",css:{"@tabletLandscape":{gridTemplateColumns:"1fr 2px 1fr 2px 1fr"}}},{showSeparator:!0,columnLayout:"1-1",css:{"@tabletLandscape":{gridTemplateColumns:"1fr 2px 1fr"}}},{showSeparator:!0,columnLayout:"1-2",css:{"@tabletLandscape":{gridTemplateColumns:"1fr 2px 2fr"}}},{showSeparator:!0,columnLayout:"2-1",css:{"@tabletLandscape":{gridTemplateColumns:"2fr 2px 1fr"}}},{showSeparator:!0,columnLayout:"1-3",css:{"@tabletLandscape":{gridTemplateColumns:"1fr 2px 3fr"}}},{showSeparator:!0,columnLayout:"3-1",css:{"@tabletLandscape":{gridTemplateColumns:"3fr 2px 1fr"}}},{showSeparator:!0,columnLayout:"2-1-1",css:{"@tabletLandscape":{gridTemplateColumns:"2fr 2px 1fr 2px 1fr"}}},{showSeparator:!0,columnLayout:"1-1-2",css:{"@tabletLandscape":{gridTemplateColumns:"1fr 2px 1fr 2px 2fr"}}},{showSeparator:!0,columnLayout:"1-1-1-1",css:{"@tabletLandscape":{gridTemplateColumns:"1fr 2px 1fr 2px 1fr 2px 1fr"}}}]}),xs={OneOneOne:"1-1-1",OneOne:"1-1",OneTwo:"1-2",TwoOne:"2-1",TwoOneOne:"2-1-1",OneOneTwo:"1-1-2",OneOneOneOne:"1-1-1-1"};function Op(t){const{editing:e}=t;return c.jsx(W,{omit:["backgroundImage"],fallback:{padding:!0},...t,children:({styleSchema:n,Property:r})=>{const i=n.get("columns")||xs.OneOne,s=n.get("show_separator")||!1;return c.jsxs(d.VStack,{css:{minHeight:e&&150,width:"100%"},children:[c.jsx(r,{accessor:"title",as:d.Heading,size:"subHeadline"}),c.jsx(r,{accessor:"columns",wrapper:Mp,wrapperProps:{showSeparator:s,columnLayout:i,editing:e},showSeparator:s,as:Rp})]})}})}const zp=K,Dp=Op,Bp=Object.freeze(Object.defineProperty({__proto__:null,COLUMN_LAYOUT:xs,editor:zp,viewer:Dp},Symbol.toStringTag,{value:"Module"}));function Fp(t){return c.jsx(W,{fallback:{padding:!0},...t,children:({Property:e,styles:n})=>c.jsxs(d.Grid,{css:{alignItems:"center",gridTemplateColumns:"repeat(auto-fit, minmax(400px, 1fr))"},children:[c.jsxs(d.VStack,{space:"large",children:[c.jsx(e,{accessor:"subtitle",as:d.Text,size:"caption1"}),c.jsx(e,{accessor:"title",as:d.Heading,size:"title2"}),c.jsx(e,{accessor:"links",wrapper:d.HStack,wrapperProps:{justify:Nt(n.textAlign)}})]}),c.jsxs(d.VStack,{css:{maxWidth:"500px"},children:[c.jsx(e,{accessor:"search",as:Dn,placeholder:"Search by parish or location",action:"https://massfinder.ca/search",searchParamKey:"query"}),c.jsx(d.Spacer,{}),c.jsx(e,{accessor:"massfinder_link",variant:"button"})]})]})})}const Np=K,Hp=Fp,Kp=Object.freeze(Object.defineProperty({__proto__:null,editor:Np,viewer:Hp},Symbol.toStringTag,{value:"Module"})),pt=typeof document<"u"?X.useLayoutEffect:()=>{};function Le(t){const e=$.useRef(null);return pt(()=>{e.current=t},[t]),$.useCallback((...n)=>{const r=e.current;return r==null?void 0:r(...n)},[])}const jt={prefix:String(Math.round(Math.random()*1e10)),current:0},vs=X.createContext(jt),Wp=X.createContext(!1);let Vp=!!(typeof window<"u"&&window.document&&window.document.createElement),Zt=new WeakMap;function Up(t=!1){let e=$.useContext(vs),n=$.useRef(null);if(n.current===null&&!t){var r,i;
49let s=(i=X.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(s){let o=Zt.get(s);o==null?Zt.set(s,{id:e.current,state:s.memoizedState}):s.memoizedState!==o.state&&(e.current=o.id,Zt.delete(s))}n.current=++e.current}return n.current}function qp(t){let e=$.useContext(vs);e===jt&&!Vp&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=Up(!!t),r=`react-aria${e.prefix}`;return t||`${r}-${n}`}function Gp(t){let e=X.useId(),[n]=$.useState($s()),r=n?"react-aria":`react-aria${jt.prefix}`;return t||`${r}-${e}`}const Yp=typeof X.useId=="function"?Gp:qp;function Xp(){return!1}function Jp(){return!0}function Zp(t){return()=>{}}function $s(){return typeof X.useSyncExternalStore=="function"?X.useSyncExternalStore(Zp,Xp,Jp):$.useContext(Wp)}let Qp=!!(typeof window<"u"&&window.document&&window.document.createElement),Lt=new Map;function yr(t){let[e,n]=$.useState(t),r=$.useRef(null),i=Yp(e),s=$.useCallback(o=>{r.current=o},[]);return Qp&&Lt.set(i,s),pt(()=>{let o=i;return()=>{Lt.delete(o)}},[i]),$.useEffect(()=>{let o=r.current;o&&(r.current=null,n(o))}),i}function ef(t,e){if(t===e)return t;let n=Lt.get(t);if(n)return n(e),e;let r=Lt.get(e);return r?(r(t),t):e}function ws(...t){return(...e)=>{for(let n of t)typeof n=="function"&&n(...e)}}const te=t=>{var e;return(e=t==null?void 0:t.ownerDocument)!==null&&e!==void 0?e:document},Pe=t=>t&&"window"in t&&t.window===t?t:te(t).defaultView||window;function pe(...t){let e={...t[0]};for(let n=1;n<t.length;n++){let r=t[n];for(let i in r){let s=e[i],o=r[i];typeof s=="function"&&typeof o=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?e[i]=ws(s,o):(i==="className"||i==="UNSAFE_className")&&typeof s=="string"&&typeof o=="string"?e[i]=xo(s,o):i==="id"&&s&&o?e.id=ef(s,o):e[i]=o!==void 0?o:s}}return e}const tf=new Set(["id"]),nf=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),rf=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),sf=/^(data-.*)$/;function of(t,e={}){let{labelable:n,isLink:r,propNames:i}=e,s={};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(tf.has(o)||n&&nf.has(o)||r&&rf.has(o)||i!=null&&i.has(o)||sf.test(o))&&(s[o]=t[o]);return s}function ye(t){if(af())t.focus({preventScroll:!0});else{let e=lf(t);t.focus(),cf(e)}}let mt=null;function af(){if(mt==null){mt=!1;try{document.createElement("div").focus({get preventScroll(){return mt=!0,!0}})}catch{}}return mt}function lf(t){let e=t.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==r;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&n.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function cf(t){for(let{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}function Vt(t){var e;return typeof window>"u"||window.navigator==null?!1:((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.brands.some(n=>t.test(n.brand)))||t.test(window.navigator.userAgent)}function Bn(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function Ee(){return Bn(/^Mac/i)}function df(){return Bn(/^iPhone/i)}function ks(){return Bn(/^iPad/i)||Ee()&&navigator.maxTouchPoints>1}function Fn(){return df()||ks()}function uf(){return Ee()||Fn()}function pf(){return Vt(/AppleWebKit/i)&&!ff()}function ff(){return Vt(/Chrome/i)}function _s(){return Vt(/Android/i)}function hf(){return Vt(/Firefox/i)}const gf=$.createContext({isNative:!0,open:bf,useHref:t=>t});function Ss(){return $.useContext(gf)}function Ae(t,e,n=!0){var r,i;let{metaKey:s,ctrlKey:o,altKey:a,shiftKey:l}=e;hf()&&(!((i=window.event)===null||i===void 0||(r=i.type)===null||r===void 0)&&r.startsWith("key"))&&t.target==="_blank"&&(Ee()?s=!0:o=!0);let u=pf()&&Ee()&&!ks()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:s,ctrlKey:o,altKey:a,shift
49Key:l}):new MouseEvent("click",{metaKey:s,ctrlKey:o,altKey:a,shiftKey:l,bubbles:!0,cancelable:!0});Ae.isOpening=n,ye(t),t.dispatchEvent(u),Ae.isOpening=!1}Ae.isOpening=!1;function mf(t,e){if(t instanceof HTMLAnchorElement)e(t);else if(t.hasAttribute("data-href")){let n=document.createElement("a");n.href=t.getAttribute("data-href"),t.hasAttribute("data-target")&&(n.target=t.getAttribute("data-target")),t.hasAttribute("data-rel")&&(n.rel=t.getAttribute("data-rel")),t.hasAttribute("data-download")&&(n.download=t.getAttribute("data-download")),t.hasAttribute("data-ping")&&(n.ping=t.getAttribute("data-ping")),t.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=t.getAttribute("data-referrer-policy")),t.appendChild(n),e(n),t.removeChild(n)}}function bf(t,e){mf(t,n=>Ae(n,e))}let Ke=new Map,yn=new Set;function xr(){if(typeof window>"u")return;function t(r){return"propertyName"in r}let e=r=>{if(!t(r)||!r.target)return;let i=Ke.get(r.target);i||(i=new Set,Ke.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!t(r)||!r.target)return;let i=Ke.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),Ke.delete(r.target)),Ke.size===0)){for(let s of yn)s();yn.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?xr():document.addEventListener("DOMContentLoaded",xr));function Ts(t){requestAnimationFrame(()=>{Ke.size===0?t():yn.add(t)})}function Is(){let t=$.useRef(new Map),e=$.useCallback((i,s,o,a)=>{let l=a!=null&&a.once?(...u)=>{t.current.delete(o),o(...u)}:o;t.current.set(o,{type:s,eventTarget:i,fn:l,options:a}),i.addEventListener(s,o,a)},[]),n=$.useCallback((i,s,o,a)=>{var l;let u=((l=t.current.get(o))===null||l===void 0?void 0:l.fn)||o;i.removeEventListener(s,u,a),t.current.delete(o)},[]),r=$.useCallback(()=>{t.current.forEach((i,s)=>{n(i.eventTarget,i.type,s,i.options)})},[n]);return $.useEffect(()=>r,[r]),{addGlobalListener:e,removeGlobalListener:n,removeAllGlobalListeners:r}}function Cs(t,e){pt(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}function xn(t,e){let n=window.getComputedStyle(t),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&e&&(r=t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth),r}function yf(t,e){const n=[];for(;t&&t!==document.documentElement;)xn(t,e)&&n.push(t),t=t.parentElement;return n}let xf=0;const Qt=new Map;function vf(t){let[e,n]=$.useState();return pt(()=>{if(!t)return;let r=Qt.get(t);if(r)n(r.element.id);else{let i=`react-aria-description-${xf++}`;n(i);let s=document.createElement("div");s.id=i,s.style.display="none",s.textContent=t,document.body.appendChild(s),r={refCount:0,element:s},Qt.set(t,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),Qt.delete(t))}},[t]),{"aria-describedby":t?e:void 0}}function $f(t,e,n,r){let i=Le(n),s=n==null;$.useEffect(()=>{if(s||!t.current)return;let o=t.current;return o.addEventListener(e,i,r),()=>{o.removeEventListener(e,i,r)}},[t,e,r,s,i])}function js(t,e){let n=vr(t,e,"left"),r=vr(t,e,"top"),i=e.offsetWidth,s=e.offsetHeight,o=t.scrollLeft,a=t.scrollTop,{borderTopWidth:l,borderLeftWidth:u}=getComputedStyle(t),p=t.scrollLeft+parseInt(u,10),f=t.scrollTop+parseInt(l,10),h=p+t.clientWidth,g=f+t.clientHeight;n<=o?o=n-parseInt(u,10):n+i>h&&(o+=n+i-h),r<=f?a=r-parseInt(l,10):r+s>g&&(a+=r+s-g),t.scrollLeft=o,t.scrollTop=a}function vr(t,e,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;e.offsetParent&&(i+=e[r],e.offsetParent!==t);){if(e.offsetParent.contains(t)){i-=t[r];break}e=e.offsetParent}return i}function $r(t,e){if(document.contains(t)){let o=document.scrollingElement||document.documentElement;if(window.getComputedStyle(o).overflow==="hidden"){let l=yf(t);for(let u of l)js(u,t)}else{var n;let{left:l,top:u}=t.getBoundingClientRect();t==null||(n=t.scrollIntoView)===null||n===void 0||n.call(t,{block:"nearest"});let{left:p,top:f}=t.getBoundingClientRect();if(Math.abs(l-p)>1||Math.abs(u-f)>1){var r,i,s;e==null||(i=e.containingElement)===null||i===void 0||(r=i.scrollIntoView)===null||r===void 0||r.call(i,{block:"center",inline:"center"}),(s=t.scrollIntoView)===null||s===void 0||s.call(t,{block:"nearest"})}}}}function vn(t){return t.mozInputSource===0&&t.isTrusted?!0:_s()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function wf(t){return!_s()&&t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}let Ve="default",$n="",kt=new WeakMap;
49function wr(t){if(Fn()){if(Ve==="default"){const e=te(t);$n=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}Ve="disabled"}else(t instanceof HTMLElement||t instanceof SVGElement)&&(kt.set(t,t.style.userSelect),t.style.userSelect="none")}function bt(t){if(Fn()){if(Ve!=="disabled")return;Ve="restoring",setTimeout(()=>{Ts(()=>{if(Ve==="restoring"){const e=te(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=$n||""),$n="",Ve="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&kt.has(t)){let e=kt.get(t);t.style.userSelect==="none"&&(t.style.userSelect=e),t.getAttribute("style")===""&&t.removeAttribute("style"),kt.delete(t)}}const Ls=X.createContext({register:()=>{}});Ls.displayName="PressResponderContext";function kf(t,e){return e.get?e.get.call(t):e.value}function Ps(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function _f(t,e){var n=Ps(t,e,"get");return kf(t,n)}function Sf(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Tf(t,e,n){Sf(t,e),e.set(t,n)}function If(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}function kr(t,e,n){var r=Ps(t,e,"set");return If(t,r,n),n}function Cf(t){let e=$.useContext(Ls);if(e){let{register:n,...r}=e;t=pe(r,t),n()}return Cs(e,t.ref),t}var yt=new WeakMap;class xt{continuePropagation(){kr(this,yt,!1)}get shouldStopPropagation(){return _f(this,yt)}constructor(e,n,r){Tf(this,yt,{writable:!0,value:void 0}),kr(this,yt,!0),this.type=e,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey}}const _r=Symbol("linkClicked");function Nn(t){let{onPress:e,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:s,isDisabled:o,isPressed:a,preventFocusOnPress:l,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:p,ref:f,...h}=Cf(t),[g,b]=$.useState(!1),y=$.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:w,removeAllGlobalListeners:T}=Is(),I=Le((m,k)=>{let _=y.current;if(o||_.didFirePressStart)return!1;let S=!0;if(_.isTriggeringEvent=!0,r){let B=new xt("pressstart",k,m);r(B),S=B.shouldStopPropagation}return n&&n(!0),_.isTriggeringEvent=!1,_.didFirePressStart=!0,b(!0),S}),j=Le((m,k,_=!0)=>{let S=y.current;if(!S.didFirePressStart)return!1;S.ignoreClickAfterPress=!0,S.didFirePressStart=!1,S.isTriggeringEvent=!0;let B=!0;if(i){let x=new xt("pressend",k,m);i(x),B=x.shouldStopPropagation}if(n&&n(!1),b(!1),e&&_&&!o){let x=new xt("press",k,m);e(x),B&&(B=x.shouldStopPropagation)}return S.isTriggeringEvent=!1,B}),R=Le((m,k)=>{let _=y.current;if(o)return!1;if(s){_.isTriggeringEvent=!0;let S=new xt("pressup",k,m);return s(S),_.isTriggeringEvent=!1,S.shouldStopPropagation}return!0}),M=Le(m=>{let k=y.current;k.isPressed&&k.target&&(k.isOverTarget&&k.pointerType!=null&&j(ge(k.target,m),k.pointerType,!1),k.isPressed=!1,k.isOverTarget=!1,k.activePointerId=null,k.pointerType=null,T(),p||bt(k.target))}),P=Le(m=>{u&&M(m)}),A=$.useMemo(()=>{let m=y.current,k={onKeyDown(S){if(en(S.nativeEvent,S.currentTarget)&&S.currentTarget.contains(S.target)){var B;Tr(S.target,S.key)&&S.preventDefault();let x=!0;if(!m.isPressed&&!S.repeat){m.target=S.currentTarget,m.isPressed=!0,x=I(S,"keyboard");let v=S.currentTarget,D=G=>{en(G,v)&&!G.repeat&&v.contains(G.target)&&m.target&&R(ge(m.target,G),"keyboard")};w(te(S.currentTarget),"keyup",ws(D,_),!0)}x&&S.stopPropagation(),S.metaKey&&Ee()&&((B=m.metaKeyEvents)===null||B===void 0||B.set(S.key,S.nativeEvent))}else S.key==="Meta"&&(m.metaKeyEvents=new Map)},onClick(S){if(!(S&&!S.currentTarget.contains(S.target))&&S&&S.button===0&&!m.isTriggeringEvent&&!Ae.isOpening){let B=!0;if(o&&S.preventDefault(),!m.ignoreClickAfterPress&&!m.ignoreEmulatedMouseEvents&&!m.isPressed&&(m.pointerType==="virtual"||vn(S.nativeEvent))){!o&&!l&&ye(S.currentTarget);let x=I(S,"virtual"),v=R(S,"virtual"),D=j(S,"virtual");B=x&&v&&D}m.ignoreEmulatedMouseEvents=!1,m.ignoreClickAfterPress=!1,B&&S.stopPropagation()}}},_=S=>{var B;if(m.isPressed&&m.target&&en(S,m.target)){var x;Tr(S.target,S.key)&&S.preventDefault();let D=S.target;j(ge(m.target,S),"keyboard",m.target.contains(D)),T(),S.key!=="Enter"&&Hn(m.target)&&m.target.contains(D)&&!S[_r]&&(S[_r]=!0,Ae(m.target,S,!1)),m.isPressed=!1,(x=m.metaKeyEvents)===null||x===void 0||x.delete(S.key)}else if(S.key==="Meta"&&(!((B=m.metaKeyEvents)===null||B===void 0)&&B.size)){var v;let D=m.metaKeyEvents;m.metaKeyEvents=void 0;for(let G of D.values())(v=m.target)===null||v===void 0||v.dispatchEvent(new KeyboardEvent("keyup",G))}};if(typeof PointerEvent<"u"){k.onPointerDown=v=>{if(v.button!==0||!v.currentTarget.contains(v.target))return;if(wf(v.nativeEvent)){m.pointerType="virtual";return}tn(v.currentTarget)&&v.preventDefault(),m.pointerType=v.pointerType;let D=!0;
49m.isPressed||(m.isPressed=!0,m.isOverTarget=!0,m.activePointerId=v.pointerId,m.target=v.currentTarget,!o&&!l&&ye(v.currentTarget),p||wr(m.target),D=I(v,m.pointerType),w(te(v.currentTarget),"pointermove",S,!1),w(te(v.currentTarget),"pointerup",B,!1),w(te(v.currentTarget),"pointercancel",x,!1)),D&&v.stopPropagation()},k.onMouseDown=v=>{v.currentTarget.contains(v.target)&&v.button===0&&(tn(v.currentTarget)&&v.preventDefault(),v.stopPropagation())},k.onPointerUp=v=>{!v.currentTarget.contains(v.target)||m.pointerType==="virtual"||v.button===0&&Fe(v,v.currentTarget)&&R(v,m.pointerType||v.pointerType)};let S=v=>{v.pointerId===m.activePointerId&&(m.target&&Fe(v,m.target)?!m.isOverTarget&&m.pointerType!=null&&(m.isOverTarget=!0,I(ge(m.target,v),m.pointerType)):m.target&&m.isOverTarget&&m.pointerType!=null&&(m.isOverTarget=!1,j(ge(m.target,v),m.pointerType,!1),P(v)))},B=v=>{v.pointerId===m.activePointerId&&m.isPressed&&v.button===0&&m.target&&(Fe(v,m.target)&&m.pointerType!=null?j(ge(m.target,v),m.pointerType):m.isOverTarget&&m.pointerType!=null&&j(ge(m.target,v),m.pointerType,!1),m.isPressed=!1,m.isOverTarget=!1,m.activePointerId=null,m.pointerType=null,T(),p||bt(m.target))},x=v=>{M(v)};k.onDragStart=v=>{v.currentTarget.contains(v.target)&&M(v)}}else{k.onMouseDown=x=>{if(x.button!==0||!x.currentTarget.contains(x.target))return;if(tn(x.currentTarget)&&x.preventDefault(),m.ignoreEmulatedMouseEvents){x.stopPropagation();return}m.isPressed=!0,m.isOverTarget=!0,m.target=x.currentTarget,m.pointerType=vn(x.nativeEvent)?"virtual":"mouse",!o&&!l&&ye(x.currentTarget),I(x,m.pointerType)&&x.stopPropagation(),w(te(x.currentTarget),"mouseup",S,!1)},k.onMouseEnter=x=>{if(!x.currentTarget.contains(x.target))return;let v=!0;m.isPressed&&!m.ignoreEmulatedMouseEvents&&m.pointerType!=null&&(m.isOverTarget=!0,v=I(x,m.pointerType)),v&&x.stopPropagation()},k.onMouseLeave=x=>{if(!x.currentTarget.contains(x.target))return;let v=!0;m.isPressed&&!m.ignoreEmulatedMouseEvents&&m.pointerType!=null&&(m.isOverTarget=!1,v=j(x,m.pointerType,!1),P(x)),v&&x.stopPropagation()},k.onMouseUp=x=>{x.currentTarget.contains(x.target)&&!m.ignoreEmulatedMouseEvents&&x.button===0&&R(x,m.pointerType||"mouse")};let S=x=>{if(x.button===0){if(m.isPressed=!1,T(),m.ignoreEmulatedMouseEvents){m.ignoreEmulatedMouseEvents=!1;return}m.target&&Fe(x,m.target)&&m.pointerType!=null?j(ge(m.target,x),m.pointerType):m.target&&m.isOverTarget&&m.pointerType!=null&&j(ge(m.target,x),m.pointerType,!1),m.isOverTarget=!1}};k.onTouchStart=x=>{if(!x.currentTarget.contains(x.target))return;let v=jf(x.nativeEvent);if(!v)return;m.activePointerId=v.identifier,m.ignoreEmulatedMouseEvents=!0,m.isOverTarget=!0,m.isPressed=!0,m.target=x.currentTarget,m.pointerType="touch",!o&&!l&&ye(x.currentTarget),p||wr(m.target),I(x,m.pointerType)&&x.stopPropagation(),w(Pe(x.currentTarget),"scroll",B,!0)},k.onTouchMove=x=>{if(!x.currentTarget.contains(x.target))return;if(!m.isPressed){x.stopPropagation();return}let v=Sr(x.nativeEvent,m.activePointerId),D=!0;v&&Fe(v,x.currentTarget)?!m.isOverTarget&&m.pointerType!=null&&(m.isOverTarget=!0,D=I(x,m.pointerType)):m.isOverTarget&&m.pointerType!=null&&(m.isOverTarget=!1,D=j(x,m.pointerType,!1),P(x)),D&&x.stopPropagation()},k.onTouchEnd=x=>{if(!x.currentTarget.contains(x.target))return;if(!m.isPressed){x.stopPropagation();return}let v=Sr(x.nativeEvent,m.activePointerId),D=!0;v&&Fe(v,x.currentTarget)&&m.pointerType!=null?(R(x,m.pointerType),D=j(x,m.pointerType)):m.isOverTarget&&m.pointerType!=null&&(D=j(x,m.pointerType,!1)),D&&x.stopPropagation(),m.isPressed=!1,m.activePointerId=null,m.isOverTarget=!1,m.ignoreEmulatedMouseEvents=!0,m.target&&!p&&bt(m.target),T()},k.onTouchCancel=x=>{x.currentTarget.contains(x.target)&&(x.stopPropagation(),m.isPressed&&M(x))};let B=x=>{m.isPressed&&x.target.contains(m.target)&&M({currentTarget:m.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};k.onDragStart=x=>{x.currentTarget.contains(x.target)&&M(x)}}return k},[w,o,l,T,p,M,P,j,I,R]);return $.useEffect(()=>()=>{var m;p||bt((m=y.current.target)!==null&&m!==void 0?m:void 0)},[p]),{isPressed:a||g,pressProps:pe(h,A)}}function Hn(t){return t.tagName==="A"&&t.hasAttribute("href")}function en(t,e){const{key:n,code:r}=t,i=e,s=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof Pe(i).HTMLInputElement&&!Es(i,n)||i instanceof Pe(i).HTMLTextAreaElement||i.isContentEditable)&&!((s==="link"||!s&&Hn(i))&&n!=="Enter")}function jf(t){const{targetTouches:e}=t;return e.length>0?e[0]:null}function Sr(t,e){const n=t.changedTouches;for(let r=0;r<n.length;r++){const i=n[r];if(i.identifier===e)return i}return null}function ge(t,e){return{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey}}function Lf(t){let e=0,n=0;return t.width!==void 0?e=t.width/2:t.radiusX!==void 0&&(e=t.radiusX),t.height!==void 0?n=t.height/2:t.radiusY!==void 0&&(n=t.radiusY),{top:t.clientY-n,right:t.clientX+e,bottom:t.clientY+n,left:t.clientX-e}}function Pf(t,e){return!(t.left>e.right||e.left>t.right||t.top>e.bottom||e.top>t.bottom)}function Fe(t,e){let n=e.getBoundingClientRect(),r=Lf(t);return Pf(n,r)}function tn(t){return!(t instanceof HTMLElement)||!t.hasAttribute("draggable")}function Tr(t,e){return t instanceof HTMLInputElement?!Es(t,e):t instanceof HTMLButtonElement?t.type!=="submit"&&t.type!=="reset"
49:!Hn(t)}const Ef=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Es(t,e){return t.type==="checkbox"||t.type==="radio"?e===" ":Ef.has(t.type)}class Af{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=e}}function Rf(t){let e=$.useRef({isFocused:!1,observer:null});pt(()=>{const r=e.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=Le(r=>{t==null||t(r)});return $.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){e.current.isFocused=!0;let i=r.target,s=o=>{e.current.isFocused=!1,i.disabled&&n(new Af("blur",o)),e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};i.addEventListener("focusout",s,{once:!0}),e.current.observer=new MutationObserver(()=>{if(e.current.isFocused&&i.disabled){var o;(o=e.current.observer)===null||o===void 0||o.disconnect();let a=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),e.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function Mf(t){let{isDisabled:e,onFocus:n,onBlur:r,onFocusChange:i}=t;const s=$.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),i&&i(!1),!0},[r,i]),o=Rf(s),a=$.useCallback(l=>{const u=te(l.target);l.target===l.currentTarget&&u.activeElement===l.target&&(n&&n(l),i&&i(!0),o(l))},[i,n,o]);return{focusProps:{onFocus:!e&&(n||i||r)?a:void 0,onBlur:!e&&(r||i)?s:void 0}}}let ft=null,Of=new Set,st=new Map,Re=!1,wn=!1;function Kn(t,e){for(let n of Of)n(t,e)}function zf(t){return!(t.metaKey||!Ee()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function Pt(t){Re=!0,zf(t)&&(ft="keyboard",Kn("keyboard",t))}function ie(t){ft="pointer",(t.type==="mousedown"||t.type==="pointerdown")&&(Re=!0,Kn("pointer",t))}function As(t){vn(t)&&(Re=!0,ft="virtual")}function Rs(t){t.target===window||t.target===document||(!Re&&!wn&&(ft="virtual",Kn("virtual",t)),Re=!1,wn=!1)}function Ms(){Re=!1,wn=!0}function Ir(t){if(typeof window>"u"||st.get(Pe(t)))return;const e=Pe(t),n=te(t);let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){Re=!0,r.apply(this,arguments)},n.addEventListener("keydown",Pt,!0),n.addEventListener("keyup",Pt,!0),n.addEventListener("click",As,!0),e.addEventListener("focus",Rs,!0),e.addEventListener("blur",Ms,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",ie,!0),n.addEventListener("pointermove",ie,!0),n.addEventListener("pointerup",ie,!0)):(n.addEventListener("mousedown",ie,!0),n.addEventListener("mousemove",ie,!0),n.addEventListener("mouseup",ie,!0)),e.addEventListener("beforeunload",()=>{Os(t)},{once:!0}),st.set(e,{focus:r})}const Os=(t,e)=>{const n=Pe(t),r=te(t);e&&r.removeEventListener("DOMContentLoaded",e),st.has(n)&&(n.HTMLElement.prototype.focus=st.get(n).focus,r.removeEventListener("keydown",Pt,!0),r.removeEventListener("keyup",Pt,!0),r.removeEventListener("click",As,!0),n.removeEventListener("focus",Rs,!0),n.removeEventListener("blur",Ms,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",ie,!0),r.removeEventListener("pointermove",ie,!0),r.removeEventListener("pointerup",ie,!0)):(r.removeEventListener("mousedown",ie,!0),r.removeEventListener("mousemove",ie,!0),r.removeEventListener("mouseup",ie,!0)),st.delete(n))};function Df(t){const e=te(t);let n;return e.readyState!=="loading"?Ir(t):(n=()=>
49{Ir(t)},e.addEventListener("DOMContentLoaded",n)),()=>Os(t,n)}typeof document<"u"&&Df();function kn(){return ft}function Cr(t){if(!t)return;let e=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.")},continuePropagation(){e=!1}};t(r),e&&n.stopPropagation()}}function Bf(t){return{keyboardProps:t.isDisabled?{}:{onKeyDown:Cr(t.onKeyDown),onKeyUp:Cr(t.onKeyUp)}}}const Ff=500;function Nf(t){let{isDisabled:e,onLongPressStart:n,onLongPressEnd:r,onLongPress:i,threshold:s=Ff,accessibilityDescription:o}=t;const a=$.useRef();let{addGlobalListener:l,removeGlobalListener:u}=Is(),{pressProps:p}=Nn({isDisabled:e,onPressStart(h){if(h.continuePropagation(),(h.pointerType==="mouse"||h.pointerType==="touch")&&(n&&n({...h,type:"longpressstart"}),a.current=setTimeout(()=>{h.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),i&&i({...h,type:"longpress"}),a.current=void 0},s),h.pointerType==="touch")){let g=b=>{b.preventDefault()};l(h.target,"contextmenu",g,{once:!0}),l(window,"pointerup",()=>{setTimeout(()=>{u(h.target,"contextmenu",g)},30)},{once:!0})}},onPressEnd(h){a.current&&clearTimeout(a.current),r&&(h.pointerType==="mouse"||h.pointerType==="touch")&&r({...h,type:"longpressend"})}}),f=vf(i&&!e?o:void 0);return{longPressProps:pe(p,f)}}function Et(t){const e=te(t);if(kn()==="virtual"){let n=e.activeElement;Ts(()=>{e.activeElement===n&&t.isConnected&&ye(t)})}else ye(t)}function Hf(t){const e=Pe(t);if(!(t instanceof e.HTMLElement)&&!(t instanceof e.SVGElement))return!1;let{display:n,visibility:r}=t.style,i=n!=="none"&&r!=="hidden"&&r!=="collapse";if(i){const{getComputedStyle:s}=t.ownerDocument.defaultView;let{display:o,visibility:a}=s(t);i=o!=="none"&&a!=="hidden"&&a!=="collapse"}return i}function Kf(t,e){return!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&(t.nodeName==="DETAILS"&&e&&e.nodeName!=="SUMMARY"?t.hasAttribute("open"):!0)}function zs(t,e){return t.nodeName!=="#comment"&&Hf(t)&&Kf(t,e)&&(!t.parentElement||zs(t.parentElement,t))}const Wn=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],Wf=Wn.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";Wn.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const Vf=Wn.join(':not([hidden]):not([tabindex="-1"]),');function Ds(t,e){return!t||!e?!1:e.some(n=>n.contains(t))}function Uf(t,e,n){let r=e!=null&&e.tabbable?Vf:Wf,i=te(t).createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode(s){var o;return!(e==null||(o=e.from)===null||o===void 0)&&o.contains(s)?NodeFilter.FILTER_REJECT:s.matches(r)&&zs(s)&&(!n||Ds(s,n))&&(!(e!=null&&e.accept)||e.accept(s))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e!=null&&e.from&&(i.currentNode=e.from),i}class Vn{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,n,r){let i=this.fastMap.get(n??null);if(!i)return;let s=new jr({scopeRef:e});i.addChild(s),s.parent=i,this.fastMap.set(e,s),r&&(s.nodeToRestore=r)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let n=this.fastMap.get(e);if(!n)return;let r=n.parent;for(let s of this.traverse())s!==n&&n.nodeToRestore&&s.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&Ds(s.nodeToRestore,n.scopeRef.current)&&(s.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(s=>r&&r.addChild(s))),this.fastMap.delete(n.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let n of e.children)yield*this.traverse(n)}clone(){var e;let n=new Vn;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(e=i.parent)===null||e===void 0?void 0:e.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new jr({scopeRef:null}),this.fastMap.set(null,this.root)}}class jr{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}new Vn;let qf=X.createContext(null);function Gf(t){let e=$.useContext(qf)||{};Cs(e,t);let{ref:n,...r}=e;return r}function Yf(t,e){let{focusProps:n}=Mf(t),{keyboardProps:r}=Bf(t),i=pe(n,r),s=Gf(e),o=t.isDisabled?{}:s,a=$.useRef(t.autoFocus);return $.useEffect(()=>{a.current&&e.current&&Et(e.current),a.current=!1},[e]),{focusableProps:pe({...i,tabIndex:t.excludeFromTabOrder&&!t.isDisabled?-1:void 0},o)}}function Xf(t,e){let{elementType:n="button",isDisabled:r,onPress:i,onPressStart:s,onPressEnd:o,onPressUp:a,onPressChange:l,preventFocusOnPress:u,allowFocusWhenDisabled:p,onClick:f,href:h,target:g,rel:b,type:y="button"}=t,w;n==="button"?w={type:y,disabled:r}:w={role:"button",tabIndex:r?void 0:0,href:n==="a"&&r?void 0:h,target:n==="a"?g:void 0,type:n==="input"?y:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?b:void 0};let{pressProps:T,isPressed:I}=Nn({onPressStart:s,onPressEnd:o,onPressChange:l,onPress:i,onPressUp:a,isDisabled:r,preventFocusOnPress:u,ref:e}),{focusableProps:j}=Yf(t,e);p&&(j.tabIndex=r?-1:j.tabIndex);let R=pe(j,T,of(t,{labelable:!0}));return{isPressed:I,buttonProps:pe(w,R,{"aria-haspopup":t["aria-haspopup"],"aria-expanded":t["aria-expanded"],"aria-controls":t["aria-controls"],"aria-pressed":t["aria-pressed"],onClick:M=>{f&&(f(M),console.warn("onClick is deprecated, please use onPress"))}})}}function _n(t){return uf()?t.altKey:t.ctrlKey}function We(t){return Ee()?t.metaKey:t.ctrlKey}const Jf=1e3;function Zf(t){let{keyboardDelegate:e,selectionManager:n,onTypeSelect:r}=t,i=$.useRef({search:"",timeout:null}).current,s=o=>{let a=Qf(o.key);if(!a||o.ctrlKey||o.metaKey||!o.currentTarget.contains(o.target))return;a===" "&&i.search.trim().length>0&&(o.preventDefault(),"continuePropagation"in o||o.stopPropagation()),i.search+=a;let l=e.getKeyForSearch(i.search,n.focusedKey);l==null&&(l=e.getKeyForSearch(i.search)),l!=null&&(n.setFocusedKey(l),r&&r(l)),clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=""},Jf)};return{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?s:null}}}function Qf(t){return t.length===1||!/^[A-Z]/i.test(t)?t:""}
49const eh=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),th=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function nh(t){if(Intl.Locale){let n=new Intl.Locale(t).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return eh.has(n.script)}let e=t.split("-")[0];return th.has(e)}const rh=Symbol.for("react-aria.i18n.locale");function Bs(){let t=typeof window<"u"&&window[rh]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([t])}catch{t="en-US"}return{locale:t,direction:nh(t)?"rtl":"ltr"}}let Sn=Bs(),nt=new Set;function Lr(){Sn=Bs();for(let t of nt)t(Sn)}function ih(){let t=$s(),[e,n]=$.useState(Sn);return $.useEffect(()=>(nt.size===0&&window.addEventListener("languagechange",Lr),nt.add(n),()=>{nt.delete(n),nt.size===0&&window.removeEventListener("languagechange",Lr)}),[]),t?{locale:"en-US",direction:"ltr"}:e}const sh=X.createContext(null);function Fs(){let t=ih();return $.useContext(sh)||t}let nn=new Map;function oh(t){let{locale:e}=Fs(),n=e+(t?Object.entries(t).sort((i,s)=>i[0]<s[0]?-1:1).join():"");if(nn.has(n))return nn.get(n);let r=new Intl.Collator(e,t);return nn.set(n,r),r}function ah(t){let{selectionManager:e,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:s=!1,disallowEmptySelection:o=!1,disallowSelectAll:a=!1,selectOnFocus:l=e.selectionBehavior==="replace",disallowTypeAhead:u=!1,shouldUseVirtualFocus:p,allowsTabNavigation:f=!1,isVirtualized:h,scrollRef:g=r,linkBehavior:b="action"}=t,{direction:y}=Fs(),w=Ss(),T=_=>{if(_.altKey&&_.key==="Tab"&&_.preventDefault(),!r.current.contains(_.target))return;const S=(F,je)=>{if(F!=null){if(e.isLink(F)&&b==="selection"&&l&&!_n(_)){vo.flushSync(()=>{e.setFocusedKey(F,je)});let Be=g.current.querySelector(`[data-key="${CSS.escape(F.toString())}"]`),Jn=e.getItemProps(F);w.open(Be,_,Jn.href,Jn.routerOptions);return}if(e.setFocusedKey(F,je),e.isLink(F)&&b==="override")return;_.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(F):l&&!_n(_)&&e.replaceSelection(F)}};switch(_.key){case"ArrowDown":if(n.getKeyBelow){var B,x;_.preventDefault();let F=e.focusedKey!=null?n.getKeyBelow(e.focusedKey):(B=n.getFirstKey)===null||B===void 0?void 0:B.call(n);F==null&&s&&(F=(x=n.getFirstKey)===null||x===void 0?void 0:x.call(n,e.focusedKey)),S(F)}break;case"ArrowUp":if(n.getKeyAbove){var v,D;_.preventDefault();let F=e.focusedKey!=null?n.getKeyAbove(e.focusedKey):(v=n.getLastKey)===null||v===void 0?void 0:v.call(n);F==null&&s&&(F=(D=n.getLastKey)===null||D===void 0?void 0:D.call(n,e.focusedKey)),S(F)}break;case"ArrowLeft":if(n.getKeyLeftOf){var G,E;_.preventDefault();let F=n.getKeyLeftOf(e.focusedKey);F==null&&s&&(F=y==="rtl"?(G=n.getFirstKey)===null||G===void 0?void 0:G.call(n,e.focusedKey):(E=n.getLastKey)===null||E===void 0?void 0:E.call(n,e.focusedKey)),S(F,y==="rtl"?"first":"last")}break;case"ArrowRight":if(n.getKeyRightOf){var he,qt;_.preventDefault();let F=n.getKeyRightOf(e.focusedKey);F==null&&s&&(F=y==="rtl"?(he=n.getLastKey)===null||he===void 0?void 0:he.call(n,e.focusedKey):(qt=n.getFirstKey)===null||qt===void 0?void 0:qt.call(n,e.focusedKey)),S(F,y==="rtl"?"last":"first")}break;case"Home":if(n.getFirstKey){_.preventDefault();let F=n.getFirstKey(e.focusedKey,We(_));e.setFocusedKey(F),We(_)&&_.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(F):l&&e.replaceSelection(F)}break;case"End":if(n.getLastKey){_.preventDefault();let F=n.getLastKey(e.focusedKey,We(_));e.setFocusedKey(F),We(_)&&_.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(F):l&&e.replaceSelection(F)}break;case"PageDown":if(n.getKeyPageBelow){_.preventDefault();let F=n.getKeyPageBelow(e.focusedKey);S(F)}break;case"PageUp":if(n.getKeyPageAbove){_.preventDefault();let F=n.getKeyPageAbove(e.focusedKey);S(F)}break;case"a":We(_)&&e.selectionMode==="multiple"&&a!==!0&&(_.preventDefault(),e.selectAll());break;case"Escape":!o&&e.selectedKeys.size!==0&&(_.stopPropagation(),_.preventDefault(),e.clearSelection());break;case"Tab":if(!f){if(_.shiftKey)r.current.focus();else{let F=Uf(r.current,{tabbable:!0}),je,Be;do Be=F.lastChild(),Be&&(je=Be);while(Be);je&&!je.contains(document.activeElement)&&ye(je)}break}}},I=$.useRef({top:0,left:0});$f(g,"scroll",h?null:()=>{I.current={top:g.current.scrollTop,left:g.current.scrollLeft}});let j=_=>{if(e.isFocused){_.currentTarget.contains(_.target)||e.setFocused(!1);return}if(_.currentTarget.contains(_.target)){if(e.setFocused(!0),e.focusedKey==null){let x=D=>{D!=null&&(e.setFocusedKey(D),l&&e.replaceSelection(D))},v=_.relatedTarget;var S,B;v&&_.currentTarget.compareDocumentPosition(v)&Node.DOCUMENT_POSITION_FOLLOWING?x((S=e.lastSelectedKey)!==null&&S!==void 0?S:n.getLastKey()):x((B=e.firstSelectedKey)!==null&&B!==void 0?B:n.getFirstKey())}else h||(g.current.scrollTop=I.current.top,g.current.scrollLeft=I.current.left);if(!h&&e.focusedKey!=null){let x=g.current.querySelector(`[data-key="${CSS.escape(e.focu
49sedKey.toString())}"]`);x&&(x.contains(document.activeElement)||ye(x),kn()==="keyboard"&&$r(x,{containingElement:r.current}))}}},R=_=>{_.currentTarget.contains(_.relatedTarget)||e.setFocused(!1)};const M=$.useRef(i);$.useEffect(()=>{if(M.current){let _=null;i==="first"&&(_=n.getFirstKey()),i==="last"&&(_=n.getLastKey());let S=e.selectedKeys;if(S.size){for(let B of S)if(e.canSelectItem(B)){_=B;break}}e.setFocused(!0),e.setFocusedKey(_),_==null&&!p&&Et(r.current)}},[]);let P=$.useRef(e.focusedKey);$.useEffect(()=>{let _=kn();if(e.isFocused&&e.focusedKey!=null&&(g!=null&&g.current)){let S=g.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);S&&(_==="keyboard"||M.current)&&(h||js(g.current,S),_!=="virtual"&&$r(S,{containingElement:r.current}))}e.isFocused&&e.focusedKey==null&&P.current!=null&&Et(r.current),P.current=e.focusedKey,M.current=!1},[h,g,e.focusedKey,e.isFocused,r]);let A={onKeyDown:T,onFocus:j,onBlur:R,onMouseDown(_){g.current===_.target&&_.preventDefault()}},{typeSelectProps:m}=Zf({keyboardDelegate:n,selectionManager:e});u||(A=pe(m,A));let k;return p||(k=e.focusedKey==null?0:-1),{collectionProps:{...A,tabIndex:k}}}function lh(t){let{selectionManager:e,key:n,ref:r,shouldSelectOnPressUp:i,shouldUseVirtualFocus:s,focus:o,isDisabled:a,onAction:l,allowsDifferentPressOrigin:u,linkBehavior:p="action"}=t,f=Ss(),h=E=>{if(E.pointerType==="keyboard"&&_n(E))e.toggleSelection(n);else{if(e.selectionMode==="none")return;if(e.isLink(n)){if(p==="selection"){let he=e.getItemProps(n);f.open(r.current,E,he.href,he.routerOptions),e.setSelectedKeys(e.selectedKeys);return}else if(p==="override"||p==="none")return}e.selectionMode==="single"?e.isSelected(n)&&!e.disallowEmptySelection?e.toggleSelection(n):e.replaceSelection(n):E&&E.shiftKey?e.extendSelection(n):e.selectionBehavior==="toggle"||E&&(We(E)||E.pointerType==="touch"||E.pointerType==="virtual")?e.toggleSelection(n):e.replaceSelection(n)}};$.useEffect(()=>{n===e.focusedKey&&e.isFocused&&!s&&(o?o():document.activeElement!==r.current&&Et(r.current))},[r,n,e.focusedKey,e.childFocusStrategy,e.isFocused,s]),a=a||e.isDisabled(n);let g={};!s&&!a?g={tabIndex:n===e.focusedKey?0:-1,onFocus(E){E.target===r.current&&e.setFocusedKey(n)}}:a&&(g.onMouseDown=E=>{E.preventDefault()});let b=e.isLink(n)&&p==="override",y=e.isLink(n)&&p!=="selection"&&p!=="none",w=!a&&e.canSelectItem(n)&&!b,T=(l||y)&&!a,I=T&&(e.selectionBehavior==="replace"?!w:!w||e.isEmpty),j=T&&w&&e.selectionBehavior==="replace",R=I||j,M=$.useRef(null),P=R&&w,A=$.useRef(!1),m=$.useRef(!1),k=E=>{if(l&&l(),y){let he=e.getItemProps(n);f.open(r.current,E,he.href,he.routerOptions)}},_={};i?(_.onPressStart=E=>{M.current=E.pointerType,A.current=P,E.pointerType==="keyboard"&&(!R||Er())&&h(E)},u?(_.onPressUp=I?null:E=>{E.pointerType!=="keyboard"&&w&&h(E)},_.onPress=I?k:null):_.onPress=E=>{if(I||j&&E.pointerType!=="mouse"){if(E.pointerType==="keyboard"&&!Pr())return;k(E)}else E.pointerType!=="keyboard"&&w&&h(E)}):(_.onPressStart=E=>{M.current=E.pointerType,A.current=P,m.current=I,w&&(E.pointerType==="mouse"&&!I||E.pointerType==="keyboard"&&(!T||Er()))&&h(E)},_.onPress=E=>{(E.pointerType==="touch"||E.pointerType==="pen"||E.pointerType==="virtual"||E.pointerType==="keyboard"&&R&&Pr()||E.pointerType==="mouse"&&m.current)&&(R?k(E):w&&h(E))}),g["data-key"]=n,_.preventFocusOnPress=s;let{pressProps:S,isPressed:B}=Nn(_),x=j?E=>{M.current==="mouse"&&(E.stopPropagation(),E.preventDefault(),k(E))}:void 0,{longPressProps:v}=Nf({isDisabled:!P,onLongPress(E){E.pointerType==="touch"&&(h(E),e.setSelectionBehavior("toggle"))}}),D=E=>{M.current==="touch"&&A.current&&E.preventDefault()},G=e.isLink(n)?E=>{Ae.isOpening||E.preventDefault()}:void 0;return{itemProps:pe(g,w||I?S:{},P?v:{},{onDoubleClick:x,onDragStartCapture:D,onClick:G}),isPressed:B,isSelected:e.isSelected(n),isFocused:e.isFocused&&e.focusedKey===n,isDisabled:a,allowsSelection:w,hasAction:R}}function Pr(){let t=window.event;return(t==null?void 0:t.key)==="Enter"}function Er(){let t=window.event;return(t==null?void 0:t.key)===" "||(t==null?void 0:t.code)==="Space"}class ch{isDisabled(e){var n;return this.disabledBehavior==="all"&&(((n=e.props)===null||n===void 0?void 0:n.isDisabled)||this.disabledKeys.has(e.key))}getNextKey(e){for(e=this.collection.getKeyAfter(e);e!=null;){let n=this.collection.getItem(e);if(n.type==="item"&&!this.isDisabled(n))return e;e=this.collection.getKeyAfter(e)}return null}getPreviousKey(e){for(e=this.collection.getKeyBefore(e);e!=null;){let n=this.collection.getItem(e);if(n.type==="item"&&!this.isDisabled(n))return e;e=this.collection.getKeyBefore(e)}return null}findKey(e,n,r){let i=this.getItem(e);if(!i)return null;let s=i.getBoundingClientRect();do e=n(e),i=this.getItem(e);while(i&&r(s,i.getBoundingClientRect()));return e}isSameRow(e,n){return e.top===n.top||e.left!==n.left}isSameColumn(e,n){return e.left===n.left||e.top!==n.top}
49getKeyBelow(e){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,n=>this.getNextKey(n),this.isSameRow):this.getNextKey(e)}getKeyAbove(e){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,n=>this.getPreviousKey(n),this.isSameRow):this.getPreviousKey(e)}getNextColumn(e,n){return n?this.getPreviousKey(e):this.getNextKey(e)}getKeyRightOf(e){return this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="rtl"):this.findKey(e,n=>this.getNextColumn(n,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="rtl"):null}getKeyLeftOf(e){return this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="ltr"):this.findKey(e,n=>this.getNextColumn(n,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="ltr"):null}getFirstKey(){let e=this.collection.getFirstKey();for(;e!=null;){let n=this.collection.getItem(e);if((n==null?void 0:n.type)==="item"&&!this.isDisabled(n))return e;e=this.collection.getKeyAfter(e)}return null}getLastKey(){let e=this.collection.getLastKey();for(;e!=null;){let n=this.collection.getItem(e);if(n.type==="item"&&!this.isDisabled(n))return e;e=this.collection.getKeyBefore(e)}return null}getItem(e){return e!==null?this.ref.current.querySelector(`[data-key="${CSS.escape(e.toString())}"]`):null}getKeyPageAbove(e){let n=this.ref.current,r=this.getItem(e);if(!r)return null;if(!xn(n))return this.getFirstKey();let i=n.getBoundingClientRect(),s=r.getBoundingClientRect();if(this.orientation==="horizontal"){let o=i.x-n.scrollLeft,a=Math.max(0,s.x-o+s.width-i.width);for(;r&&s.x-o>a;)e=this.getKeyAbove(e),r=e==null?null:this.getItem(e),s=r==null?void 0:r.getBoundingClientRect()}else{let o=i.y-n.scrollTop,a=Math.max(0,s.y-o+s.height-i.height);for(;r&&s.y-o>a;)e=this.getKeyAbove(e),r=e==null?null:this.getItem(e),s=r==null?void 0:r.getBoundingClientRect()}return e??this.getFirstKey()}getKeyPageBelow(e){let n=this.ref.current,r=this.getItem(e);if(!r)return null;if(!xn(n))return this.getLastKey();let i=n.getBoundingClientRect(),s=r.getBoundingClientRect();if(this.orientation==="horizontal"){let o=i.x-n.scrollLeft,a=Math.min(n.scrollWidth,s.x-o-s.width+i.width);for(;r&&s.x-o<a;)e=this.getKeyBelow(e),r=e==null?null:this.getItem(e),s=r==null?void 0:r.getBoundingClientRect()}else{let o=i.y-n.scrollTop,a=Math.min(n.scrollHeight,s.y-o-s.height+i.height);for(;r&&s.y-o<a;)e=this.getKeyBelow(e),r=e==null?null:this.getItem(e),s=r==null?void 0:r.getBoundingClientRect()}return e??this.getLastKey()}getKeyForSearch(e,n){if(!this.collator)return null;let r=this.collection,i=n||this.getFirstKey();for(;i!=null;){let s=r.getItem(i),o=s.textValue.slice(0,e.length);if(s.textValue&&this.collator.compare(o,e)===0)return i;i=this.getKeyBelow(i)}return null}constructor(...e){if(e.length===1){let n=e[0];this.collection=n.collection,this.ref=n.ref,this.collator=n.collator,this.disabledKeys=n.disabledKeys||new Set,this.disabledBehavior=n.disabledBehavior||"all",this.orientation=n.orientation,this.direction=n.direction,this.layout=n.layout||"stack"}else this.collection=e[0],this.disabledKeys=e[1],this.ref=e[2],this.collator=e[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all";this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}function dh(t){let{selectionManager:e,collection:n,disabledKeys:r,ref:i,keyboardDelegate:s}=t,o=oh({usage:"search",sensitivity:"base"}),a=e.disabledBehavior,l=$.useMemo(()=>s||new ch({collection:n,disabledKeys:r,disabledBehavior:a,ref:i,collator:o}),[s,n,r,i,o,a]),{collectionProps:u}=ah({...t,ref:i,selectionManager:e,keyboardDelegate:l});return{listProps:u}}function uh(t,e,n){let{item:r}=t,i=yr(),s=yr(),o=e.disabledKeys.has(r.key),{itemProps:a}=lh({selectionManager:e.selectionManager,key:r.key,ref:n}),{buttonProps:l}=Xf(pe(a,{id:i,elementType:"button",isDisabled:o,onPress:()=>e.toggleKey(r.key)}),n),u=e.expandedKeys.has(r.key);return{buttonProps:{...l,"aria-expanded":u,"aria-controls":u?s:void 0},regionProps:{id:s,role:"region","aria-labelledby":i}}}function ph(t,e,n){let{listProps:r}=dh({...t,...e,allowsTabNavigation:!0,disallowTypeAhead:!0,ref:n});return{accordionProps:{...r,tabIndex:void 0}}}const fh=d.styled("div",{display:"flex",flexDirection:"column",alignItems:"flex-start"}
49),hh=d.styled("h6",{paddingBlock:"$4",display:"flex",width:"100%",justifyContent:"flex-start",flexWrap:"wrap",textAlign:"left","&:last-child":{borderBottomLeftRadius:"$2",borderBottomRightRadius:"$2"}}),gh=d.styled("button",{appearance:"none",border:"none",background:"none",width:"100%",paddingInline:"0",outline:"none",cursor:"pointer",opacity:1,color:"inherit",borderBottom:"0.5px solid $gray4",variants:{isFocusVisible:{true:{boxShadow:"0 0 0 2px $colors$blue",borderRadius:"4px"}}}}),mh=d.styled("div",{display:"flex",justifyContent:"space-between",width:"100%",alignItems:"center"}),bh=d.styled(Ce.motion.div,{overflow:"hidden"}),yh={open:{height:"auto",opacity:1},closed:{height:0,opacity:0}};function Un(t){var n,r;return[La((r=(n=t.props)==null?void 0:n.title)==null?void 0:r.toString()).split("-",3).join("-"),t.key.slice(-7)].join("-")}function xh(t){const e=$.useRef(null),{item:n,state:r}=t,{buttonProps:i,regionProps:s}=uh(t,r,e),o=r.selectionManager.isSelected(n.key),a=r.disabledKeys.has(n.key),{hoverProps:l}=$o({isDisabled:a}),{focusProps:u,isFocusVisible:p}=wo({within:!0}),f=()=>o?c.jsx(d.SubtractIcon,{size:"$3"}):c.jsx(d.AddIcon,{size:"$3"}),h=Un(n);function g(b){i.onClick(b),r.selectionManager.toggleSelection(n.key),r.expandedKeys.clear()}return c.jsxs(fh,{children:[c.jsx(gh,{...ko(i,l),ref:e,...u,isFocusVisible:p,onClick:g,children:c.jsxs(mh,{children:[c.jsx(hh,{id:h,children:c.jsx(d.Strong,{size:"caption1",style:{fontWeight:"bold"},children:n.props.title})}),f()]})}),o&&c.jsx(d.Spacer,{size:"$4"}),c.jsx(bh,{initial:!1,animate:o?"open":"closed",variants:yh,...s,children:n.props.children}),o&&c.jsx(d.Spacer,{size:"$4"})]})}function vh(t,e){const n=_o();ri(()=>{var o,a;const r=[...e.collection].map(l=>({[Un(l)]:{key:l.key}})),i=((o=n.hash)==null?void 0:o.substring(1))||"",s=Object.assign({},...r);(a=s[i])!=null&&a.key&&(e.selectionManager.replaceSelection(s[i].key),t.current.querySelector(`#${i}`).scrollIntoView({behavior:"smooth"}))},[n.hash,t,e.collection,e.selectionManager])}const $h=d.styled("div",{display:"flex",flexDirection:"column"});function wh(t){const e=$.useRef(null),n=Ii.useTreeState({...t,onExpandedChange:r,selectionMode:t.isEditing?"multiple":"single"});ri(()=>{t.isEditing&&n.selectionManager.toggleSelectAll()}),vh(e,n);function r(s){if(s.size>0){const o=s.values().next().value,a=[...n.collection].find(u=>u.key===o),l=Un(a);n.selectionManager.isSelected(a.key)?window.history.replaceState(null,null," "):window.history.replaceState(window.history.state,"",`#${l}`)}}const{accordionProps:i}=ph({...t},n,e);return c.jsx($h,{...i,ref:e,children:[...n.collection].map(s=>c.jsx(xh,{item:s,state:n},s.key))})}function kh(t){return c.jsx(W,{fallback:{padding:!0,containerWidth:"small"},...t,__UNSAFE__DEOPTIMIZE:["accordion_items"],children:({Property:e,properties:n})=>{var i;const r={items:((i=n.get("accordion_items"))==null?void 0:i.toJS().map(s=>{var o,a;return{key:s.__id,title:(o=s==null?void 0:s.title)==null?void 0:o[t.locale],body:(a=s==null?void 0:s.body)==null?void 0:a[t.locale]}}))||[]};return c.jsxs(d.VStack,{justify:"center",children:[c.jsx(e,{accessor:"title",as:d.Heading,size:"headline"}),c.jsx(wh,{...r,isEditing:t.editing,children:s=>c.jsx(d.Item,{title:s.title,children:s.body},s.key)})]})}})}const _h=K,Sh=kh,Th=Object.freeze(Object.defineProperty({__proto__:null,editor:_h,viewer:Sh},Symbol.toStringTag,{value:"Module"}));function Ih(t){return c.jsx(W,{fallback:{padding:!0},...t,children:({Property:e})=>c.jsxs(d.HStack,{justify:"between",css:{paddingInline:"clamp($10, 5vw, $20)",isolation:"isolate",alignItems:"center",flexWrap:"wrap",rowGap:"$2"},children:[c.jsxs(d.VStack,{css:{gap:"clamp($8, 5vw, $10)"},children:[c.jsx(e,{accessor:"title",as:d.Heading,size:"title2",previewPlaceholder:!0}),c.jsx(e,{accessor:"subtitle",as:d.Heading,size:"subHeadline",previewPlaceholder:!0})]}),c.jsx(d.Box,{children:c.jsx(e,{accessor:"link",wrapper:d.VStack,wrapperProps:{css:{alignSelf:"center"}},variant:"button"})})]})})}const Ch=Ih,jh=K,Lh=Object.freeze(Object.defineProperty({__proto__:null,editor:jh,viewer:Ch},Symbol.toStringTag,{value:"Module"}));d.styled("div",{"&::before":{content:'""',position:"absolute",background:"$$color",inset:0,opacity:"$$opacity"}});d.styled("div",{justifyContent:"center",display:"grid",gridTemplateColumns:"370px",gridTemplateAreas:`
50        'donation'
51        'image'
52        `,variants:{donationModulePlacement:{start:{"@tabletLandscape":{justifyContent:"space-between",gridTemplateAreas:"'donation image image'",alignItems:"flex-start",ga
52p:"clamp($15, 5vw, $20)"}},end:{"@tabletLandscape":{justifyContent:"space-between",gridTemplateAreas:"'image image donation'",alignItems:"flex-start",gap:"clamp($10, 5vw, $14)"}}}},defaultVariants:{donationModulePlacement:"start"}});d.styled(d.HStack,{flexWrap:"wrap",width:"100%",gap:"$10",justifyContent:"center",flexDirection:"column","@tabletLandscape":{justifyContent:"space-between"},variants:{donationModulePlacement:{start:{"@tabletLandscape":{flexDirection:"row"}},center:{"@tabletLandscape":{flexDirection:"row-reverse"}},end:{"@tabletLandscape":{flexDirection:"row-reverse"}}}},defaultVariants:{donationModulePlacement:"start"}});d.styled(d.Image,{gridArea:"image",maxWidth:"100%",borderRadius:"$3",boxShadow:"$3",transition:"0.25s all ease-in-out"});d.styled(d.Box,{gridArea:"donation",textAlign:"initial",color:"$label",variants:{editing:{true:{pointerEvents:"all",border:"1px dashed $white",borderRadius:"$3","&:hover":{boxShadow:"0 0 0 5px #80808070"}},false:{}}}});d.styled(d.VStack,{textAlign:"center",variants:{alignment:{start:{"@tabletLandscape":{align:"left",alignItems:"start"}},end:{"@tabletLandscape":{align:"right",alignItems:"end"}}}},defaultVariants:{alignment:"start"}});function Ph(t){return $.useState(),$.useState(),t.editing,null}const Eh=Ph,Ah=K,Rh=Object.freeze(Object.defineProperty({__proto__:null,editor:Ah,viewer:Eh},Symbol.toStringTag,{value:"Module"}));function Mh(t,e,n,r){for(var i=-1,s=t==null?0:t.length;++i<s;){var o=t[i];e(r,o,n(o),t)}return r}var Oh=Mh,zh=Cl;function Dh(t,e,n,r){return zh(t,function(i,s,o){e(r,i,n(i),o)}),r}var Bh=Dh,Fh=Oh,Nh=Bh,Hh=ti,Kh=So;function Wh(t,e){return function(n,r){var i=Kh(n)?Fh:Nh,s=e?e():{};return i(n,t,Hh(r),s)}}var Vh=Wh,Uh=To,qh=Vh,Gh=Object.prototype,Yh=Gh.hasOwnProperty,Xh=qh(function(t,e,n){Yh.call(t,n)?t[n].push(e):Uh(t,n,[e])}),Jh=Xh;const Zh=Je(Jh),Qh={month:"short",day:"numeric",year:"numeric"},Ns={hour:"numeric",minute:"2-digit"};function eg({masses:t,heading:e}){const n=Zh(t,r=>{var i;return(i=r.nextDate)==null?void 0:i.weekday});return pn(n)?null:c.jsx(ng,{masses:n,heading:e})}const tg=d.styled(d.Text,{color:"$primary",fontWeight:"$bold",paddingBlock:"$5",textAlign:"start",textTransform:"capitalize"});function ng({masses:t,heading:e=""}){const n=Object.values(t);return n.length<=0?null:c.jsxs(d.VStack,{css:{minWidth:225},children:[c.jsx(tg,{size:"large",children:e}),n.map((r,i)=>{var s,o;return c.jsx(d.HStack,{as:d.Pane,justify:"between",align:"start",children:c.jsxs(d.VStack,{css:{display:"flex",paddingBlockEnd:"$5",textAlign:"start"},children:[c.jsx(d.Text,{children:ig((o=(s=r==null?void 0:r[0])==null?void 0:s.nextDate)==null?void 0:o.weekdayLong,r==null?void 0:r[0].type,r==null?void 0:r[0].rank)}),c.jsx(d.Box,{css:{display:"flex"},children:r.map((a,l)=>l===r.length-1?c.jsx(Ar,{mass:a},a.id):c.jsxs(d.Box,{css:{display:"flex"},children:[c.jsx(Ar,{mass:a},a.id),c.jsxs(d.Text,{size:"caption1",css:{paddingInline:"$2"},children:[" ","|"," "]})]},i))})]})},i)})]})}const rg=(t,e,n)=>{switch(t){case"CANCEL":return c.jsx(d.Box,{css:{marginBlockStart:"$3"},children:c.jsxs(d.Text,{size:"footnote",css:{color:"$red"},children:["* Notice: Cancelled on"," ",`${e==null?void 0:e.toLocaleString({month:"short",day:"numeric",year:"numeric"})}`]})});case"MODIFY":return c.jsx(d.Box,{css:{paddingBlockStart:"$3"},children:c.jsxs(d.Text,{size:"footnote",css:{color:"$red"},children:["* Notice: Changed to ",`${n==null?void 0:n.toLocaleString(Ns)}`," on"," ",`${n==null?void 0:n.toLocaleString({month:"short",day:"numeric",year:"numeric"})}`]})});default:return null}};function Ar({mass:t}){var o,a,l,u,p,f,h;const{oldDate:e,exType:n}=t;let r;n&&t.exdates&&((a=(o=t.exdates[0].date)==null?void 0:o.data)!=null&&a.newDate)&&(r=U.DateTime.fromISO((u=(l=t.exdates[0].date)==null?void 0:l.data)==null?void 0:u.newDate));const{formatDisplayName:i}=Xr(),s=i(((p=t==null?void 0:t.language)==null?void 0:p.toString())??"",{type:"language"});return c.jsxs(d.Box,{children:[!t.isRecurring&&c.jsx(d.Text,{size:"footnote",css:{display:"block",color:"$primary",paddingBlockEnd:"$2"}
52,children:(f=t.nextDate)==null?void 0:f.toLocaleString(Qh)}),c.jsx(d.Text,{size:"caption1",children:(h=t.nextDate)==null?void 0:h.toLocaleString(Ns)}),n&&c.jsx(d.Text,{css:{cursor:"help",color:"$warning",display:"block"},size:"footnote",children:rg(n,e,r)}),t.note&&c.jsx(d.Text,{size:"footnote",css:{display:"block",color:"$primary",paddingBlockStart:"$1"},children:t.note}),t.language&&c.jsx(d.Text,{size:"footnote",css:{display:"block",color:"$gray1",paddingBlockStart:"$1"},children:s})]},t.id)}function ig(t,e,n=""){return t.toLocaleLowerCase()==="saturday"&&e==="MASS"&&n==="SUNDAY"?"Saturday Anticipatory Mass":t.toLocaleLowerCase()==="sunday"&&e==="MASS"?"Sunday Masses":t}const sg=d.styled(d.HStack,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(300px, 1fr))","@tabletLandscape":{display:"flex",flexDirection:"row",justifyContent:"center",flexWrap:"wrap"}}),og=t=>{const e=wt([...t],"DEVOTION"),n=za(e),r=[],i=[];for(const s in n)n[s].length>1?i.push({heading:s,services:n[s]}):r.push(n[s][0]);return{uncategorizedDevotions:r,cateogrizedDevotions:i}};function ag(t){var p,f;const{data:e}=J(Pa),{timezone:n}=zi();Ea.timezone=n||"America/Los_Angeles";const r=$.useMemo(()=>Aa(e==null?void 0:e.services,{exceptions:!1}),[e==null?void 0:e.services]),i=Ra(r),s=Ma(r),o=Oa(r),a=[];a.push({heading:"Weekend Mass",services:wt(i,"MASS")}),a.push({heading:"Daily Mass",services:wt(s,"MASS")}),a.push({heading:"Confession",services:wt([...i,...s],"CONFESSION")});const{uncategorizedDevotions:l,cateogrizedDevotions:u}=og([...i,...s]);return a.push({heading:"Devotions",services:l}),u.forEach(h=>{a.push(h)}),(p=o==null?void 0:o["Single Services"])!=null&&p.days&&a.push({heading:"Additional Services",services:Object.values((f=o["Single Services"])==null?void 0:f.days).flat()}),n?c.jsx(W,{fallback:{padding:!0},...t,children:({Property:h,styles:g})=>c.jsxs(d.VStack,{children:[c.jsx(h,{accessor:"title",as:d.Heading,size:"title2",previewPlaceholder:!0}),c.jsx(h,{accessor:"link",wrapper:d.VStack,wrapperProps:{css:{alignSelf:Nt(g.textAlign)}},variant:"button"}),c.jsx(sg,{children:a.map(b=>c.jsx(eg,{heading:b.heading,masses:b.services},b.heading))})]})}):null}const lg=ag,cg=K,dg=Object.freeze(Object.defineProperty({__proto__:null,editor:cg,viewer:lg},Symbol.toStringTag,{value:"Module"}));function ug(t){return c.jsx(W,{css:Ua,fallback:{backgroundColor:!0,color:!0,padding:!0,containerWidth:"medium"},allowPointerEvents:!0,...t,children:({Property:e})=>c.jsx(e,{accessor:"text"})})}const pg=ug,fg=K,hg=Object.freeze(Object.defineProperty({__proto__:null,editor:fg,viewer:pg},Symbol.toStringTag,{value:"Module"}));function gg(t){return c.jsx(W,{fallback:{padding:"small",containerWidth:"large"},...t,children:({Property:e})=>c.jsx(e,{accessor:"id",as:mg})})}function mg({children:t,schema:e}){var r,i;const{data:n}=J($a,{variables:{id:t}});return n!=null&&n.nav.identifier&&["main","footer"].includes(n==null?void 0:n.nav.identifier)?c.jsx(qo,{schema:e,text:"Cannot render main or footer menu"}):(r=n==null?void 0:n.nav)!=null&&r.schemaValues?c.jsx("div",{style:{"--gc-colors-background":"var(--ui-background-color)","--gc-colors-label":"var(--ui-color)"},children:c.jsx(jl,{json:qa((i=n==null?void 0:n.nav)==null?void 0:i.schemaValues)})}):null}const bg=K,yg=gg,xg=Object.freeze(Object.defineProperty({__proto__:null,editor:bg,viewer:yg},Symbol.toStringTag,{value:"Module"})),vg=Object.freeze(Object.defineProperty({__proto__:null,accordion_section:Th,banner_section:Lh,bayridge_catholic_section:id,calendar_section:cu,cards_section:Lu,custom_html_section:Ou,donation_section:Rh,heading_section:Ju,hero_section:ap,icon_section:_p,image_section:yp,mass_times_finder_section:Kp,mass_times_section:dg,menu_section:xg,multi_column_section:Bp,rich_text_section:hg,subscribe_section:Ga,text_and_image_section:Cp,text_block_section:Ep},Symbol.toStringTag,{value:"Module"})),$g=({showValidity:t,schema:e,schemaKeys:n,storeKeys:r,index:i})=>c.jsx(Ft,{showValidity:t,noGrid:!0,schema:e.get("items"),parentSchema:e,storeKeys:r.push(i),schemaKeys:n==null?void 0:n.push("items")}),wg=se($g),kg=({schemaKeys:t,storeKeys:e,schema:n,listSize:r,onChange:i,showValidity:s,required:o,columnIds:a})=>c.jsxs(d.VStack,{children:[c.jsx(d.Separator,{}),c.jsx(d.Heading,{size:"subHeadline",children:"Column"}),Array.from(Array(r||0)).map((l,u)=>c.jsx(wg,{index:u,showValidity:s,schema:n,storeKeys:e,schemaKeys:t,required:o,onChange:i},a.get(u)))]}),_g=se(kg),Sg=t=>{const{value:e,...n}=$t(t,["internalValue"]),r=e==null?void 0:e.map(i=>i==null?void 0:i.get("__id"));return c.jsx(_g,{listSize:e==null?void 0:e.size,columnIds:r,...n})},Tg=fe(Sg);var Ig=Object.defineProperty,Cg=Object.getOwnPropertyDescriptor,Hs=(t,e,n,r)=>{for(var i=r>1?void 0:r?Cg(e,n):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(i=(r?o(e,n,i):o(i))||i);return r&&i&&Ig(e,n,i),i},{LABEL:jg}=el,Lg={icon:({attrs:t})=>`h${(t==null?void 0:t.level)??"1"}`,label:({t,attrs:e})=>t({...jg,values:{level:e==null?void 0:e.level}})},Pg=[ce.H1,ce.H2,ce.H3,ce.H4,ce.H5,ce.H6],At=class extends Qe{get name(){return"heading"}createTags(){return[Q.Block,Q.TextBlock,Q.FormattingNode]}createNodeSpec(t,e){return{content:"inline*",defining:!0,draggable:!1,...e,attrs:{...t.defaults(),level:{default:this.options.defaultLevel}},parseDOM:[...this.options.levels.map(n=>({tag:`h${n}`,getAttrs:r=>({...t.parse(r),level:n})}
52)),...e.parseDOM??[]],toDOM:n=>this.options.levels.includes(n.attrs.level)?[`h${n.attrs.level}`,t.dom(n),0]:[`h${this.options.defaultLevel}`,t.dom(n),0]}}toggleHeading(t={}){return Ya({type:this.type,toggleType:"paragraph",attrs:t})}createKeymap(t){const e=this.store.getExtension(Xa),n=Ja(),r=[];for(const i of this.options.levels){const s=Pg[i-1]??ce.H1;n[s]=Za(this.type,{level:i}),r.push({attrs:{level:i},shortcut:t(s)[0]})}return e.updateDecorated("toggleHeading",{shortcut:r}),n}createInputRules(){return this.options.levels.map(t=>Qa(new RegExp(`^(#{1,${t}})\\s$`),this.type,()=>({level:t})))}createPasteRules(){return this.options.levels.map(t=>({type:"node",nodeType:this.type,regexp:new RegExp(`^#{${t}}\\s([\\s\\w]+)$`),getAttributes:()=>({level:t}),startOfTextBlock:!0}))}};Hs([oe(Lg)],At.prototype,"toggleHeading",1);At=Hs([tt({defaultOptions:{levels:[1,2,3,4,5,6],defaultLevel:1},staticKeys:["defaultLevel","levels"]})],At);var Ks={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(typeof self<"u"?self:Io,function(){return function(n){function r(s){if(i[s])return i[s].exports;var o=i[s]={i:s,l:!1,exports:{}};return n[s].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var i={};return r.m=n,r.c=i,r.d=function(s,o,a){r.o(s,o)||Object.defineProperty(s,o,{configurable:!1,enumerable:!0,get:a})},r.n=function(s){var o=s&&s.__esModule?function(){return s.default}:function(){return s};return r.d(o,"a",o),o},r.o=function(s,o){return Object.prototype.hasOwnProperty.call(s,o)},r.p="",r(r.s=0)}([function(n,r,i){function s(){throw new TypeError("The given URL is not a string. Please verify your string|array.")}function o(u){typeof u!="string"&&s();for(var p=0,f=0,h=0,g=u.length,b=0;g--&&++b&&!(p&&-1<a.indexOf(u[b]));)u[b]==="."&&(++p,f=b);for(p=b,b=f;b--;)if(l.indexOf(u[b])!==-1){h=b+1;break}return 2>h?"":u.slice(h,p)}var a=["/",":","?","#"],l=[".","/","@"];n.exports=function(u){if(typeof u=="string")return o(u);if(Array.isArray(u)){var p=[],f,h=0;for(f=u.length;h<f;h++)p.push(o(u[h]));return p}s()}}])})})(Ks);var Eg=Ks.exports;const Ag=Je(Eg);var Rg=Object.defineProperty,Mg=Object.getOwnPropertyDescriptor,ht=(t,e,n,r)=>{for(var i=r>1?void 0:r?Mg(e,n):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(i=(r?o(e,n,i):o(i))||i);return r&&i&&Rg(e,n,i),i},Og=["com","de","net","org","uk","cn","ga","nl","cf","ml","tk","ru","br","gq","xyz","fr","eu","info","co","au","ca","it","in","ch","pl","es","online","us","top","be","jp","biz","se","at","dk","cz","za","me","ir","icu","shop","kr","site","mx","hu","io","cc","club","no","cyou"],Rr="updateLink",zg=/(?:(?:(?:https?|ftp):)?\/\/)?(?:\S+(?::\S*)?@)?(?:(?:[\da-z\u00A1-\uFFFF][\w\u00A1-\uFFFF-]{0,62})?[\da-z\u00A1-\uFFFF]\.)*(?:(?:\d(?!\.)|[a-z\u00A1-\uFFFF])(?:[\da-z\u00A1-\uFFFF][\w\u00A1-\uFFFF-]{0,62})?[\da-z\u00A1-\uFFFF]\.)+[a-z\u00A1-\uFFFF]{2,}(?::\d{2,5})?(?:[#/?]\S*)?/gi,Me=class extends tl{constructor(){super(...arguments),this._autoLinkRegexNonGlobal=void 0}get name(){return"link"}createTags(){return[Q.Link,Q.ExcludeInputRules]}createMarkSpec(t,e){const n="data-link-auto",r=i=>{const{defaultTarget:s,supportedTargets:o}=this.options,a=s?[...o,s]:o;return i&&fl(a,i)?{target:i}:void 0};return{inclusive:!1,excludes:"_",...e,attrs:{...t.defaults(),href:{},target:{default:this.options.defaultTarget},auto:{default:!1}},parseDOM:[{tag:"a[href]",getAttrs:i=>{if(!ue(i))return!1;const s=i.getAttribute("href"),o=i.textContent,a=this.options.autoLink&&(i.hasAttribute(n)||s===o||(s==null?void 0:s.replace(`${this.options.defaultProtocol}//`,""))===o);return{...t.parse(i),href:s,auto:a,...r(i.getAttribute("target"))}}},...e.parseDOM??[]],toDOM:i=>{const{auto:s,target:o,...a}=nl(i.attrs,t),l=i.attrs.auto?{[n]:""}:{};return["a",{...t.dom(i),...a,rel:"noopener noreferrer nofollow",...l,...r(i.attrs.target)},0]}}}onCreate(){const{autoLinkRegex:t}=this.options;this._autoLinkRegexNonGlobal=new RegExp(`^${t.source}$`,t.flags.replace("g",""))}shortcut({tr:t}){let e="",{from:n,to:r,empty:i,$from:s}=t.selection,o=!1;const a=rr(s,this.type);if(i){const l=a??rl(t);if(!l)return!1;({text:e,from:n,to:r}=l),o=!0}return n===r?!1:(o||(e=t.doc.textBetween(n,r)),this.options.onActivateLink(e),this.options.onShortcut({activeLink:a?{attrs:a.mark.attrs,from:a.from,to:a.to}:void 0,selectedText:e,from:n,to:r}),!0)}updateLink(t,e){return n=>{const{tr:r}=n;return!(il(r.selection)&&!sl(r.selection)||ol(r.selection)||ir({trState:r,type:this.t
52ype}))&&!e?!1:(r.setMeta(this.name,{command:Rr,attrs:t,range:e}),al({type:this.type,attrs:t,range:e})(n))}}selectLink(){return this.store.commands.selectMark.original(this.type)}removeLink(t){return e=>{const{tr:n}=e;return ir({trState:n,type:this.type,...t})?ll({type:this.type,expand:!0,range:t})(e):!1}}createPasteRules(){return[{type:"mark",regexp:this.options.autoLinkRegex,markType:this.type,getAttributes:(t,e)=>({href:this.buildHref(rt(t)),auto:!e}),transformMatch:t=>{const e=rt(t);return!e||!this.isValidUrl(e)?!1:e}}]}createEventHandlers(){return{clickMark:(t,e)=>{const n=e.getMark(this.type);if(!n)return;const r=n.mark.attrs,i={...r,...n};if(this.options.onClick(t,i))return!0;if(!this.store.view.editable)return;let s=!1;if(this.options.openLinkOnClick){s=!0;const o=r.href;window.open(o,"_blank")}return this.options.selectTextOnClick&&(s=!0,this.store.commands.selectText(n)),s}}}createPlugin(){return{appendTransaction:(t,e,n)=>{if(t.filter(g=>!!g.getMeta(this.name)).forEach(g=>{const b=g.getMeta(this.name);if(b.command===Rr){const{range:y,attrs:w}=b,{selection:T,doc:I}=n,j={range:y,selection:T,doc:I,attrs:w},{from:R,to:M}=y??T;this.options.onUpdateLink(I.textBetween(R,M),j)}}),!this.options.autoLink||sr(e)-sr(n)===1||!t.some(g=>g.docChanged))return;const o=cl(t,e),a=dl(o,[ze,hl]),{mapping:l}=o,{tr:u,doc:p}=n,{updateLink:f,removeLink:h}=this.store.chain(u);if(a.forEach(({prevFrom:g,prevTo:b,from:y,to:w})=>{const T=[],I=w-y===2,j=this.getLinkMarksInRange(e.doc,g,b,!0).filter(R=>R.mark.type===this.type).map(({from:R,to:M,text:P})=>({mappedFrom:l.map(R),mappedTo:l.map(M),text:P,from:R,to:M}));j.forEach(({mappedFrom:R,mappedTo:M,from:P,to:A},m)=>this.getLinkMarksInRange(p,R,M,!0).filter(k=>k.mark.type===this.type).forEach(k=>{const _=e.doc.textBetween(P,A,void 0," "),S=p.textBetween(k.from,k.to+1,void 0," ").trim(),B=this.isValidUrl(_);this.isValidUrl(S)||(B&&(h({from:k.from,to:k.to}).tr(),j.splice(m,1)),!I&&y===w&&this.findAutoLinks(S).map(v=>this.addLinkProperties({...v,from:R+v.start,to:R+v.end})).forEach(({attrs:v,range:D,text:G})=>{f(v,D).tr(),T.push({attrs:v,range:D,text:G})}))})),this.findTextBlocksInRange(p,{from:y,to:w}).forEach(({text:R,positionStart:M})=>{this.findAutoLinks(R).map(P=>this.addLinkProperties({...P,from:M+P.start+1,to:M+P.end+1})).filter(({range:P})=>{const A=y>=P.from&&y<=P.to,m=w>=P.from&&w<=P.to;return A||m||I}).filter(({range:P})=>this.getLinkMarksInRange(u.doc,P.from,P.to,!1).length===0).filter(({range:{from:P},text:A})=>!j.some(({text:m,mappedFrom:k})=>k===P&&m===A)).forEach(({attrs:P,text:A,range:m})=>{f(P,m).tr(),T.push({attrs:P,range:m,text:A})})}),window.requestAnimationFrame(()=>{T.forEach(({attrs:R,range:M,text:P})=>{const{doc:A,selection:m}=u;this.options.onUpdateLink(P,{attrs:R,doc:A,range:M,selection:m})})})}),u.steps.length!==0)return u}}}buildHref(t){return this.options.extractHref({url:t,defaultProtocol:this.options.defaultProtocol})}getLinkMarksInRange(t,e,n,r){const i=[];if(e===n){const s=Math.max(e-1,0),o=t.resolve(s),a=rr(o,this.type);(a==null?void 0:a.mark.attrs.auto)===r&&i.push(a)}else t.nodesBetween(e,n,(s,o)=>{const l=(s.marks??[]).find(({type:u,attrs:p})=>u===this.type&&p.auto===r);l&&i.push({from:o,to:o+s.nodeSize,mark:l,text:s.textContent})});return i}findTextBlocksInRange(t,e){const n=[];return t.nodesBetween(e.from,e.to,(r,i)=>{!r.isTextblock||!r.type.allowsMarkType(this.type)||n.push({node:r,pos:i})}),n.map(r=>({text:t.textBetween(r.pos,r.pos+r.node.nodeSize,void 0," "),positionStart:r.pos}))}addLinkProperties({from:t,to:e,href:n,...r}){return{...r,range:{from:t,to:e},attrs:{href:n,auto:!0}}}findAutoLinks(t){if(this.options.findAutoLinks)return this.options.findAutoLinks(t,this.options.defaultProtocol);const e=[];for(const n of ul(t,this.options.autoLinkRegex)){const r=rt(n);if(!r)continue;const i=this.buildHref(r);!this.isValidTLD(i)&&!i.startsWith("tel:")||e.push({text:r,href:i,start:n.index,end:n.index+r.length})}return e}isValidUrl(t){var e;return this.options.isValidUrl?this.options.isValidUrl(t,this.options.defaultProtocol):this.isValidTLD(this.buildHref(t))&&!!((e=this._autoLinkRegexNonGlobal)!=null&&e.test(t))}isValidTLD(t){const{autoLinkAllowedTLDs:e}=this.options;if(e.length===0)return!0;const n=Ag(t);if(n==="")return!0;const r=pl(n.split("."));return e.includes(r)}};ht([Kt({shortcut:ce.InsertLink})],Me.prototype,"shortcut",1);ht([oe()],Me.prototype,"updateLink",1);ht([oe()],Me.prototype,"selectLink",1);ht([oe()],Me.prototype,"removeLink",1);Me=ht([tt({defaultOptions:{autoLink:!1,defaultProtocol:"",selectTextOnClick:!1,openLinkOnClick:!1,autoLinkRegex:zg,autoLinkAllowedTLDs:Og,findAutoLinks:void 0,isValidUrl:void 0,defaultTarget:null,supportedTargets:[],extractHref:Dg},staticKeys:["autoLinkRegex"],handlerKeyOptions:{onClick:{earlyReturnValue:!0}},handlerKeys:["onActivateLink","onShortcut","onUpdateLink","onClick"],defaultPriority:et.Medium})],Me);function Dg({url:t,defaultProtocol:e}){const n=/^((?:https?|ftp)?:)\/\//.test(t);return!n&&t.includes("@")?`mailto:${t}`:n?t:`${e}//${t}`}function Bg(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])}return t}function Tn(t,e){return Array(e+1).join(t)}function Fg(t){return t.replace(/^\n*/,"")}function Ng(t){for(var e=t.length;e>0&&t[e-1]===`
53`;)e--;return t.substring(0,e)}var Hg=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function qn(t){return Gn(t,Hg)}var Ws=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function Vs(t){return Gn(t,Ws)}function Kg(t){return qs(t,Ws)}var Us=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function Wg(t){return Gn(t,Us)}function Vg(t){return qs(t,Us)}function Gn(t,e){return e.indexOf(t.nodeName)>=0}function qs(t,e){return t.getElementsByTagName&&e.some(function(n){return t.getElementsByTagName(n).length})}var ee={};ee.paragraph={filter:"p",replacement:function(t){return`
54
55`+t+`
56
57`}};ee.lineBreak={filter:"br",replacement:function(t,e,n){return n.br+`
58`}};ee.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:function(t,e,n){var r=Number(e.nodeName.charAt(1));if(n.headingStyle==="setext"&&r<3){var i=Tn(r===1?"=":"-",t.length);return`
59
60`+t+`
61`+i+`
62
63`}else return`
64
65`+Tn("#",r)+" "+t+`
66
67`}};ee.blockquote={filter:"blockquote",replacement:function(t){return t=t.replace(/^\n+|\n+$/g,""),t=t.replace(/^/gm,"> "),`
68
69`+t+`
70
71`}};ee.list={filter:["ul","ol"],replacement:function(t,e){var n=e.parentNode;return n.nodeName==="LI"&&n.lastElementChild===e?`
72`+t:`
73
74`+t+`
75
76`}};ee.listItem={filter:"li",replacement:function(t,e,n){t=t.replace(/^\n+/,"").replace(/\n+$/,`
77`).replace(/\n/gm,`
78    `);var r=n.bulletListMarker+"   ",i=e.parentNode;if(i.nodeName==="OL"){var s=i.getAttribute("start"),o=Array.prototype.indexOf.call(i.children,e);r=(s?Number(s)+o:o+1)+".  "}return r+t+(e.nextSibling&&!/\n$/.test(t)?`
79`:"")}};ee.indentedCodeBlock={filter:function(t,e){return e.codeBlockStyle==="indented"&&t.nodeName==="PRE"&&t.firstChild&&t.firstChild.nodeName==="CODE"},replacement:function(t,e,n){return`
80
81    `+e.firstChild.textContent.replace(/\n/g,`
82    `)+`
83
84`}};ee.fencedCodeBlock={filter:function(t,e){return e.codeBlockStyle==="fenced"&&t.nodeName==="PRE"&&t.firstChild&&t.firstChild.nodeName==="CODE"},replacement:function(t,e,n){for(var r=e.firstChild.getAttribute("class")||"",i=(r.match(/language-(\S+)/)||[null,""])[1],s=e.firstChild.textContent,o=n.fence.charAt(0),a=3,l=new RegExp("^"+o+"{3,}","gm"),u;u=l.exec(s);)u[0].length>=a&&(a=u[0].length+1);var p=Tn(o,a);return`
85
86`+p+i+`
87`+s.replace(/\n$/,"")+`
88`+p+`
89
90`}};ee.horizontalRule={filter:"hr",replacement:function(t,e,n){return`
91
92`+n.hr+`
93
94`}};ee.inlineLink={filter:function(t,e){return e.linkStyle==="inlined"&&t.nodeName==="A"&&t.getAttribute("href")},replacement:function(t,e){var n=e.getAttribute("href"),r=Rt(e.getAttribute("title"));return r&&(r=' "'+r+'"'),"["+t+"]("+n+r+")"}};ee.referenceLink={filter:function(t,e){return e.linkStyle==="referenced"&&t.nodeName==="A"&&t.getAttribute("href")},replacement:function(t,e,n){var r=e.getAttribute("href"),i=Rt(e.getAttribute("title"));i&&(i=' "'+i+'"');var s,o;switch(n.linkReferenceStyle){case"collapsed":s="["+t+"][]",o="["+t+"]: "+r+i;break;case"shortcut":s="["+t+"]",o="["+t+"]: "+r+i;break;default:var a=this.references.length+1;s="["+t+"]["+a+"]",o="["+a+"]: "+r+i}return this.references.push(o),s},references:[],append:function(t){var e="";return this.references.length&&(e=`
95
96`+this.references.join(`
97`)+`
98
99`,this.references=[]),e}};ee.emphasis={filter:["em","i"],replacement:function(t,e,n){return t.trim()?n.emDelimiter+t+n.emDelimiter:""}};ee.strong={filter:["strong","b"],replacement:function(t,e,n){return t.trim()?n.strongDelimiter+t+n.strongDelimiter:""}};ee.code={filter:function(t){var e=t.previousSibling||t.nextSibling,n=t.parentNode.nodeName==="PRE"&&!e;return t.nodeName==="CODE"&&!n},replacement:function(t){if(!t)return"";t=t.replace(/\r?\n|\r/g," ");for(var e=/^`|^ .*?[^ ].* $|`$/.test(t)?" ":"",n="`",r=t.match(/`+/gm)||[];r.indexOf(n)!==-1;)n=n+"`";return n+e+t+e+n}};ee.image={filter:"img",replacement:function(t,e){var n=Rt(e.getAttribute("alt")),r=e.getAttribute("src")||"",i=Rt(e.getAttribute("title")),s=i?' "'+i+'"':"";return r?"!["+n+"]("+r+s+")":""}};function Rt(t){return t?t.replace(/(\n+\s*)+/g,`
100`):""}function Gs(t){this.options=t,this._keep=[],this._remove=[],this.blankRule={replacement:t.blankReplacement},this.keepReplacement=t.keepReplacement,this.defaultRule={replacement:t.defaultReplacement},this.array=[];for(var e in t.rules)this.array.push(t.rules[e])}Gs.prototype={add:function(t,e){this.array.unshift(e)},keep:function(t){this._keep.unshift({filter:t,replacement:this.keepReplacement})},remove:function(t){this._remove.unshift({filter:t,replacement:function(){return""}})},forNode:function(t){if(t.isBlank)return this.blankRule;var e;return(e=rn(this.array,t,this.options))||(e=rn(this._keep,t,this.options))||(e=rn(this._remove,t,this.options))?e:this.defaultRule},forEach:function(t){for(var e=0;e<this.array.length;e++)t(this.array[e],e)}};function rn(t,e,n){for(var r=0;r<t.length;r++){var i=t[r];
100if(Ug(i,e,n))return i}}function Ug(t,e,n){var r=t.filter;if(typeof r=="string"){if(r===e.nodeName.toLowerCase())return!0}else if(Array.isArray(r)){if(r.indexOf(e.nodeName.toLowerCase())>-1)return!0}else if(typeof r=="function"){if(r.call(t,e,n))return!0}else throw new TypeError("`filter` needs to be a string, array, or function")}function qg(t){var e=t.element,n=t.isBlock,r=t.isVoid,i=t.isPre||function(f){return f.nodeName==="PRE"};if(!(!e.firstChild||i(e))){for(var s=null,o=!1,a=null,l=Mr(a,e,i);l!==e;){if(l.nodeType===3||l.nodeType===4){var u=l.data.replace(/[ \r\n\t]+/g," ");if((!s||/ $/.test(s.data))&&!o&&u[0]===" "&&(u=u.substr(1)),!u){l=sn(l);continue}l.data=u,s=l}else if(l.nodeType===1)n(l)||l.nodeName==="BR"?(s&&(s.data=s.data.replace(/ $/,"")),s=null,o=!1):r(l)||i(l)?(s=null,o=!0):s&&(o=!1);else{l=sn(l);continue}var p=Mr(a,l,i);a=l,l=p}s&&(s.data=s.data.replace(/ $/,""),s.data||sn(s))}}function sn(t){var e=t.nextSibling||t.parentNode;return t.parentNode.removeChild(t),e}function Mr(t,e,n){return t&&t.parentNode===e||n(e)?e.nextSibling||e.parentNode:e.firstChild||e.nextSibling||e.parentNode}var Ys=typeof window<"u"?window:{};function Gg(){var t=Ys.DOMParser,e=!1;try{new t().parseFromString("","text/html")&&(e=!0)}catch{}return e}function Yg(){var t=function(){};return Xg()?t.prototype.parseFromString=function(e){var n=new window.ActiveXObject("htmlfile");return n.designMode="on",n.open(),n.write(e),n.close(),n}:t.prototype.parseFromString=function(e){var n=document.implementation.createHTMLDocument("");return n.open(),n.write(e),n.close(),n},t}function Xg(){var t=!1;try{document.implementation.createHTMLDocument("").open()}catch{window.ActiveXObject&&(t=!0)}return t}var Jg=Gg()?Ys.DOMParser:Yg();function Zg(t,e){var n;if(typeof t=="string"){var r=Qg().parseFromString('<x-turndown id="turndown-root">'+t+"</x-turndown>","text/html");n=r.getElementById("turndown-root")}else n=t.cloneNode(!0);return qg({element:n,isBlock:qn,isVoid:Vs,isPre:e.preformattedCode?em:null}),n}var on;function Qg(){return on=on||new Jg,on}function em(t){return t.nodeName==="PRE"||t.nodeName==="CODE"}function tm(t,e){return t.isBlock=qn(t),t.isCode=t.nodeName==="CODE"||t.parentNode.isCode,t.isBlank=nm(t),t.flankingWhitespace=rm(t,e),t}function nm(t){return!Vs(t)&&!Wg(t)&&/^\s*$/i.test(t.textContent)&&!Kg(t)&&!Vg(t)}function rm(t,e){if(t.isBlock||e.preformattedCode&&t.isCode)return{leading:"",trailing:""};var n=im(t.textContent);return n.leadingAscii&&Or("left",t,e)&&(n.leading=n.leadingNonAscii),n.trailingAscii&&Or("right",t,e)&&(n.trailing=n.trailingNonAscii),{leading:n.leading,trailing:n.trailing}}function im(t){var e=t.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/);return{leading:e[1],leadingAscii:e[2],leadingNonAscii:e[3],trailing:e[4],trailingNonAscii:e[5],trailingAscii:e[6]}}function Or(t,e,n){var r,i,s;return t==="left"?(r=e.previousSibling,i=/ $/):(r=e.nextSibling,i=/^ /),r&&(r.nodeType===3?s=i.test(r.nodeValue):n.preformattedCode&&r.nodeName==="CODE"?s=!1:r.nodeType===1&&!qn(r)&&(s=i.test(r.textContent))),s}var sm=Array.prototype.reduce,om=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function Mt(t){if(!(this instanceof Mt))return new Mt(t);var e={rules:ee,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:"  ",preformattedCode:!1,blankReplacement:function(n,r){return r.isBlock?`
101
102`:""},keepReplacement:function(n,r){return r.isBlock?`
103
104`+r.outerHTML+`
105
106`:r.outerHTML},defaultReplacement:function(n,r){return r.isBlock?`
107
108`+n+`
109
110`:n}};this.options=Bg({},e,t),this.rules=new Gs(this.options)}Mt.prototype={turndown:function(t){if(!cm(t))throw new TypeError(t+" is not a string, or an element/document/fragment node.");if(t==="")return"";var e=Xs.call(this,new Zg(t,this.options));return am.call(this,e)},use:function(t){if(Array.isArray(t))for(var e=0;e<t.length;e++)this.use(t[e]);else if(typeof t=="function")t(this);else throw new TypeError("plugin must be a Function or an Array of Functions");return this},addRule:function(t,e){return this.rules.add(t,e),this},keep:function(t){return this.rules.keep(t),this},remove:function(t){return this.rules.remove(t),this},escape:function(t){return om.reduce(function(e,n){return e.replace(n[0],n[1])},t)}};function Xs(t){var e=this;return sm.call(t.childNodes,function(n,r){r=new tm(r,e.options);var i="";return r.nodeType===3?i=r.isCode?r.nodeValue:e.escape(r.nodeValue):r.nodeType===1&&(i=lm.call(e,r)),Js(n,i)},"")}function am(t){var e=this;return this.rules.forEach(function(n){typeof n.append=="function"&&(t=Js(t,n.append(e.options)))}),t.replace(/^[\t\r\n]+/,"").replace(/[\t\r\n\s]+$/,"")}function lm(t){var e=this.rules.forNode(t),n=Xs.call(this,t),r=t.flankingWhitespace;return(r.leading||r.trailing)&&(n=n.trim()),r.leading+e.replacement(n,t,this.options)+r.trailing}function Js(t,e){var n=Ng(t),r=Fg(e),i=Math.max(t.length-n.length,e.length-r.length),s=`
111
112`.substring(0,i);return n+s+r}function cm(t){return t!=null&&(typeof t=="string"||t.nodeType&&(t.nodeType===1||t.nodeType===9||t.nodeType===11))}function Zs(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let De=Zs();function dm(t){De=t}const Qs=/[&<>"']/,um=new RegExp(Qs.source,"g"),eo=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,pm=new RegExp(eo.source,"g"),fm={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},zr=t=>fm[t];function Z(t,e){if(e){if(Qs.test(t))return t.replace(um,zr)}else if(eo.test(t))return t.replace(pm,zr);return t}const hm=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function to(t){return t.replace(hm,(e,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const gm=/(^|[^\[])\^/g;function H(t,e){t=typeof t=="string"?t:t.source,e=e||"";const n={replace:(r,i)=>(i=i.source||i,i=i.replace(gm,"$1"),t=t.replace(r,i),n),getRegex:()=>new RegExp(t,e)};return n}const mm=/[^\w:]/g,bm=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Dr(t,e,n){if(t){let r;try{r=decodeURIComponent(to(n)).replace(mm,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}e&&!bm.test(n)&&(n=$m(e,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const vt={},ym=/^[^:]+:\/*[^/]*$/,xm=/^([^:]+:)[\s\S]*$/,vm=/^([^:]+:\/*[^/]*)[\s\S]*$/;function $m(t,e){vt[" "+t]||(ym.test(t)?vt[" "+t]=t+"/":vt[" "+t]=_t(t,"/",!0)),t=vt[" "+t];const n=t.indexOf(":")===-1;return e.substring(0,2)==="//"?n?e:t.replace(xm,"$1")+e:e.charAt(0)==="/"?n?e:t.replace(vm,"$1")+e:t+e}const Ot={exec:function(){}};function Br(t,e){const n=t.replace(/\|/g,(s,o,a)=>{let l=!1,u=o;for(;--u>=0&&a[u]==="\\";)l=!l;return l?"|":" |"}),r=n.split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(/\\\|/g,"|");return r}function _t(t,e,n){const r=t.length;if(r===0)return"";let i=0;for(;i<r;){const s=t.charAt(r-i-1);if(s===e&&!n)i++;else if(s!==e&&n)i++;else break}return t.slice(0,r-i)}function wm(t,e){if(t.indexOf(e[1])===-1)return-1;const n=t.length;let r=0,i=0;for(;i<n;i++)if(t[i]==="\\")i++;else if(t[i]===e[0])r++;else if(t[i]===e[1]&&(r--,r<0))return i;return-1}function km(t){t&&t.sanitize&&!t.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function Fr(t,e){if(e<1)return"";let n="";for(;e>1;)e&1&&(n+=t),e>>=1,t+=t;return n+t}function Nr(t,e,n,r){const i=e.href,s=e.title?Z(e.title):null,o=t[1].replace(/\\([\[\]])/g,"$1");if(t[0].charAt(0)!=="!"){r.state.inLink=!0;const a={type:"link",raw:n,href:i,title:s,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,a}return{type:"image",raw:n,href:i,title:s,text:Z(o)}}function _m(t,e){const n=t.match(/^(\s+)(?:```)/);if(n===null)return e;const r=n[1];return e.split(`
113`).map(i=>{const s=i.match(/^\s+/);if(s===null)return i;const[o]=s;return o.length>
vendor: 4,183 bytes, lines 113-123
113=r.length?i.slice(r.length):i}).join(`
114`)}class Yn{constructor(e){this.options=e||De}space(e){const n=this.rules.block.newline.exec(e);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(e){const n=this.rules.block.code.exec(e);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:_t(r,`
115`)}}}fences(e){const n=this.rules.block.fences.exec(e);if(n){const r=n[0],i=_m(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:i}}}heading(e){const n=this.rules.block.heading.exec(e);if(n){let r=n[2].trim();if(/#$/.test(r)){const i=_t(r,"#");(this.options.pedantic||!i||/ $/.test(i))&&(r=i.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const n=this.rules.block.hr.exec(e);if(n)return{type:"hr",raw:n[0]}}blockquote(e){const n=this.rules.block.blockquote.exec(e);if(n){const r=n[0].replace(/^ *>[ \t]?/gm,""),i=this.lexer.state.top;this.lexer.state.top=!0;const s=this.lexer.blockTokens(r);return this.lexer.state.top=i,{type:"blockquote",raw:n[0],tokens:s,text:r}}}list(e){let n=this.rules.block.list.exec(e);if(n){let r,i,s,o,a,l,u,p,f,h,g,b,y=n[1].trim();const w=y.length>1,T={type:"list",raw:"",ordered:w,start:w?+y.slice(0,-1):"",loose:!1,items:[]};y=w?`\\d{1,9}\\${y.slice(-1)}`:`\\${y}`,this.options.pedantic&&(y=w?y:"[*+-]");const I=new RegExp(`^( {0,3}${y})((?:[	 ][^\\n]*)?(?:\\n|$))`);for(;e&&(b=!1,!(!(n=I.exec(e))||this.rules.block.hr.test(e)));){if(r=n[0],e=e.substring(r.length),p=n[2].split(`
116`,1)[0].replace(/^\t+/,R=>" ".repeat(3*R.length)),f=e.split(`
117`,1)[0],this.options.pedantic?(o=2,g=p.trimLeft()):(o=n[2].search(/[^ ]/),o=o>4?1:o,g=p.slice(o),o+=n[1].length),l=!1,!p&&/^ *$/.test(f)&&(r+=f+`
118`,e=e.substring(f.length+1),b=!0),!b){const R=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ 	][^\\n]*)?(?:\\n|$))`),M=new RegExp(`^ {0,${Math.min(3,o-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),P=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:\`\`\`|~~~)`),A=new RegExp(`^ {0,${Math.min(3,o-1)}}#`);for(;e&&(h=e.split(`
119`,1)[0],f=h,this.options.pedantic&&(f=f.replace(/^ {1,4}(?=( {4})*[^ ])/g,"  ")),!(P.test(f)||A.test(f)||R.test(f)||M.test(e)));){if(f.search(/[^ ]/)>=o||!f.trim())g+=`
120`+f.slice(o);else{if(l||p.search(/[^ ]/)>=4||P.test(p)||A.test(p)||M.test(p))break;g+=`
121`+f}!l&&!f.trim()&&(l=!0),r+=h+`
122`,e=e.substring(h.length+1),p=f.slice(o)}}T.loose||(u?T.loose=!0:/\n *\n *$/.test(r)&&(u=!0)),this.options.gfm&&(i=/^\[[ xX]\] /.exec(g),i&&(s=i[0]!=="[ ] ",g=g.replace(/^\[[ xX]\] +/,""))),T.items.push({type:"list_item",raw:r,task:!!i,checked:s,loose:!1,text:g}),T.raw+=r}T.items[T.items.length-1].raw=r.trimRight(),T.items[T.items.length-1].text=g.trimRight(),T.raw=T.raw.trimRight();const j=T.items.length;for(a=0;a<j;a++)if(this.lexer.state.top=!1,T.items[a].tokens=this.lexer.blockTokens(T.items[a].text,[]),!T.loose){const R=T.items[a].tokens.filter(P=>P.type==="space"),M=R.length>0&&R.some(P=>/\n.*\n/.test(P.raw));T.loose=M}if(T.loose)for(a=0;a<j;a++)T.items[a].loose=!0;return T}}html(e){const n=this.rules.block.html.exec(e);if(n){const r={type:"html",raw:n[0],pre:!this.options.sanitizer&&(n[1]==="pre"||n[1]==="script"||n[1]==="style"),text:n[0]};if(this.options.sanitize){const i=this.options.sanitizer?this.options.sanitizer(n[0]):Z(n[0]);r.type="paragraph",r.text=i,r.tokens=this.lexer.inline(i)}return r}}def(e){const n=this.rules.block.def.exec(e);if(n){const r=n[1].toLowerCase().replace(/\s+/g," "),i=n[2]?n[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",s=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:i,title:s}}}table(e){const n=this.rules.block.table.exec(e);if(n){const r={type:"table",header:Br(n[1]).map(i=>({text:i})),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(`
123`):[]};if(r.header.length===r.align.length){r.raw=n[0];let i=r.align.length,s,o,a,l;for(s=0;s<i;s++)/^ *-+: *$/.test(r.align[s])?r.align[s]="right":/^ *:-+: *$/.test(r.align[s])?r.align[s]="center"
123:/^ *:-+ *$/.test(r.align[s])?r.align[s]="left":r.align[s]=null;for(i=r.rows.length,s=0;s<i;s++)r.rows[s]=Br(r.rows[s],r.header.length).map(u=>({text:u}));for(i=r.header.length,o=0;o<i;o++)r.header[o].tokens=this.lexer.inline(r.header[o].text);for(i=r.rows.length,o=0;o<i;o++)for(l=r.rows[o],a=0;a<l.length;a++)l[a].tokens=this.lexer.inline(l[a].text);return r}}}lheading(e){const n=this.rules.block.lheading.exec(e);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(e){const n=this.rules.block.paragraph.exec(e);if(n){const r=n[1].charAt(n[1].length-1)===`
124`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(e){const n=this.rules.block.text.exec(e);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(e){const n=this.rules.inline.escape.exec(e);if(n)return{type:"escape",raw:n[0],text:Z(n[1])}}tag(e){const n=this.rules.inline.tag.exec(e);if(n)return!this.lexer.state.inLink&&/^<a /i.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):Z(n[0]):n[0]}}link(e){const n=this.rules.inline.link.exec(e);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^</.test(r)){if(!/>$/.test(r))return;const o=_t(r.slice(0,-1),"\\");if((r.length-o.length)%2===0)return}else{const o=wm(n[2],"()");if(o>-1){const l=(n[0].indexOf("!")===0?5:4)+n[1].length+o;n[2]=n[2].substring(0,o),n[0]=n[0].substring(0,l).trim(),n[3]=""}}let i=n[2],s="";if(this.options.pedantic){const o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);o&&(i=o[1],s=o[3])}else s=n[3]?n[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(this.options.pedantic&&!/>$/.test(r)?i=i.slice(1):i=i.slice(1,-1)),Nr(n,{href:i&&i.replace(this.rules.inline._escapes,"$1"),title:s&&s.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(e,n){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let i=(r[2]||r[1]).replace(/\s+/g," ");if(i=n[i.toLowerCase()],!i){const s=r[0].charAt(0);return{type:"text",raw:s,text:s}}return Nr(r,i,r[0],this.lexer)}}emStrong(e,n,r=""){let i=this.rules.inline.emStrong.lDelim.exec(e);if(!i||i[3]&&r.match(/[\p{L}\p{N}]/u))return;const s=i[1]||i[2]||"";if(!s||s&&(r===""||this.rules.inline.punctuation.exec(r))){const o=i[0].length-1;let a,l,u=o,p=0;const f=i[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(f.lastIndex=0,n=n.slice(-1*e.length+o);(i=f.exec(n))!=null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(l=a.length,i[3]||i[4]){u+=l;continue}else if((i[5]||i[6])&&o%3&&!((o+l)%3)){p+=l;continue}if(u-=l,u>0)continue;l=Math.min(l,l+u+p);const h=e.slice(0,o+i.index+(i[0].length-a.length)+l);if(Math.min(o,l)%2){const b=h.slice(1,-1);return{type:"em",raw:h,text:b,tokens:this.lexer.inlineTokens(b)}}const g=h.slice(2,-2);return{type:"strong",raw:h,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(e){const n=this.rules.inline.code.exec(e);if(n){let r=n[2].replace(/\n/g," ");const i=/[^ ]/.test(r),s=/^ /.test(r)&&/ $/.test(r);return i&&s&&(r=r.substring(1,r.length-1)),r=Z(r,!0),{type:"codespan",raw:n[0],text:r}}}br(e){const n=this.rules.inline.br.exec(e);if(n)return{type:"br",raw:n[0]}}del(e){const n=this.rules.inline.del.exec(e);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(e,n){const r=this.rules.inline.autolink.exec(e);if(r){let i,s;return r[2]==="@"?(i=Z(this.options.mangle?n(r[1]):r[1]),s="mailto:"+i):(i=Z(r[1]),s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(e,n){let r;if(r=this.rules.inline.url.exec(e)){let i,s;if(r[2]==="@")i=Z(this.options.mangle?n(r[0]):r[0]),s="mailto:"+i;else{let o;do o=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0];while(o!==r[0]);i=Z(r[0]),r[1]==="www."?s="http://"+r[0]:s=r[0]}return{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(e,n){const r=this.rules.inline.text.exec(e);if(r){let i;return this.lexer.state.inRawBlock?i=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):Z(r[0]):r[0]:i=Z(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:i}}}}const z={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}
vendor: 16,824 bytes, lines 124-155
124(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Ot,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};z._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;z._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;z.def=H(z.def).replace("label",z._label).replace("title",z._title).getRegex();z.bullet=/(?:[*+-]|\d{1,9}[.)])/;z.listItemStart=H(/^( *)(bull) */).replace("bull",z.bullet).getRegex();z.list=H(z.list).replace(/bull/g,z.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+z.def.source+")").getRegex();z._tag="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";z._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/;z.html=H(z.html,"i").replace("comment",z._comment).replace("tag",z._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();z.paragraph=H(z._paragraph).replace("hr",z.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",z._tag).getRegex();z.blockquote=H(z.blockquote).replace("paragraph",z.paragraph).getRegex();z.normal={...z};z.gfm={...z.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};z.gfm.table=H(z.gfm.table).replace("hr",z.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",z._tag).getRegex();z.gfm.paragraph=H(z._paragraph).replace("hr",z.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",z.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",z._tag).getRegex();z.pedantic={...z.normal,html:H(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",z._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ot,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:H(z.normal._paragraph).replace("hr",z.hr).replace("heading",` *#{1,6} *[^
125]`).replace("lheading",z.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const C={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Ot,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Ot,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};C._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~";C.punctuation=H(C.punctuation).replace(/punctuation/g,C._punctuation).getRegex();C.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;C.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g;C._comment=H(z._comment).replace("(?:-->|$)","-->").getRegex();C.emStrong.lDelim=H(C.emStrong.lDelim).replace(/punct/g,C._punctuation).getRegex();C.emStrong.rDelimAst=H(C.emStrong.rDelimAst,"g").replace(/punct/g,C._punctuation).getRegex();C.emStrong.rDelimUnd=H(C.emStrong.rDelimUnd,"g").replace(/punct/g,C._punctuation).getRegex();C._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;C._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;C._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;C.autolink=H(C.autolink).replace("scheme",C._scheme).replace("email",C._email).getRegex();C._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;C.tag=H(C.tag).replace("comment",C._comment).replace("attribute",C._attribute).getRegex();C._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;C._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;C._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;C.link=H(C.link).replace("label",C._label).replace("href",C._href).replace("title",C._title).getRegex();C.reflink=H(C.reflink).replace("label",C._label).replace("ref",z._label).getRegex();C.nolink=H(C.nolink).replace("ref",z._label).getRegex();C.reflinkSearch=H(C.reflinkSearch,"g").replace("reflink",C.reflink).replace("nolink",C.nolink).getRegex();C.normal={...C};C.pedantic={...C.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:H(/^!?\[(label)\]\((.*?)\)/).replace("label",C._label).getRegex(),reflink:H(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",C._label).getRegex()};C.gfm={...C.normal,escape:H(C.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/};C.gfm.url=H(C.gfm.url,"i").replace("email",C.gfm._extended_email).getRegex();C.breaks={...C.gfm,br:H(C.br).replace("{2,}","*").getRegex(),text:H(C.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};function Sm(t){return t.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function Hr(t){let e="",n,r;const i=t.length;for(n=0;n<i;n++)r=t.charCodeAt(n),Math.random()>.5&&(r="x"+r.toString(16)),e+="&#"+r+";";return e}class Se{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||De,this.options.tokenizer=this.options.tokenizer||new Yn,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={block:z.normal,inline:C.normal};this.options.pedantic?(n.block=z.pedantic,n.inline=C.pedantic):this.options.gfm&&(n.block=z.gfm,this.options.breaks?n.inline=C.breaks:n.inline=C.gfm),this.tokenizer.rules=n}static get rules(){return{block:z,inline:C}}static lex(e,n){return new Se(n).lex(e)}static lexInline(e,n){return new Se(n).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,`
126`),this.blockTokens(e,this.tokens);let n;for(;n=this.inlineQueue.shift();)this.inlineTokens(n.src,n.tokens);return this.tokens}blockTokens(e,n=[]){this.options.pedantic?e=e.replace(/\t/g,"    ").replace(/^ +$/gm,""):e=e.replace(/^( *)(\t+)/gm,(a,l,u)=>l+"    ".repeat(u.length));let r,i,s,o;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(r=a.call({lexer:this},e,n))?(e=e.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=`
127`:n.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
128`+r.raw,i.text+=`
129`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
130`+r.raw,i.text+=`
131`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),n.push(r);continue}if(s=e,this.options.extensions&&this.options.extensions.startBlock){let a=1/0;const l=e.slice(1);let u;this.options.extensions.startBlock.forEach(function(p){u=p.call({lexer:this},l),typeof u=="number"&&u>=0&&(a=Math.min(a,u))}),a<1/0&&a>=0&&(s=e.substring(0,a+1))}if(this.state.top&&(r=this.tokenizer.paragraph(s))){i=n[n.length-1],o&&i.type==="paragraph"?(i.raw+=`
132`+r.raw,i.text+=`
133`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r),o=s.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length),i=n[n.length-1],i&&i.type==="text"?(i.raw+=`
134`+r.raw,i.text+=`
135`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(e){const a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){let r,i,s,o=e,a,l,u;if(this.tokens.links){const p=Object.keys(this.tokens.links);if(p.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(o))!=null;)p.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,a.index)+"["+Fr("a",a[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(o))!=null;)o=o.slice(0,a.index)+"["+Fr("a",a[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.escapedEmSt.exec(o))!=null;)o=o.slice(0,a.index+a[0].length-2)+"++"+o.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(l||(u=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(p=>(r=p.call({lexer:this},e,n))?(e=e.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(e,o,u)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(e,Hr)){e=e.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e,Hr))){e=e.substring(r.raw.length),n.push(r);continue}if(s=e,this.options.extensions&&this.options.extensions.startInline){let p=1/0;const f=e.slice(1);let h;this.options.extensions.startInline.forEach(function(g){h=g.call({lexer:this},f),typeof h=="number"&&h>=0&&(p=Math.min(p,h))}),p<1/0&&p>=0&&(s=e.substring(0,p+1))}if(r=this.tokenizer.inlineText(s,Sm)){e=e.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(u=r.raw.slice(-1)),l=!0,i=n[n.length-1],i&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(e){const p="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return n}}class Xn{constructor(e){this.options=e||De}code(e,n,r){const i=(n||"").match(/\S*/)[0];if(this.options.highlight){const s=this.options.highlight(e,i);s!=null&&s!==e&&(r=!0,e=s)}return e=e.replace(/\n$/,"")+`
136`,i?'<pre><code class="'+this.options.langPrefix+Z(i)+'">'+(r?e:Z(e,!0))+`</code></pre>
137`:"<pre><code>"+(r?e:Z(e,!0))+`</code></pre>
138`}blockquote(e){return`<blockquote>
139${e}</blockquote>
140`}html(e){return e}heading(e,n,r,i){if(this.options.headerIds){const s=this.options.headerPrefix+i.slug(r);return`<h${n} id="${s}">${e}</h${n}>
141`}return`<h${n}>${e}</h${n}>
142`}hr(){return this.options.xhtml?`<hr/>
143`:`<hr>
144`}list(e,n,r){const i=n?"ol":"ul",s=n&&r!==1?' start="'+r+'"':"";return"<"+i+s+`>
145`+e+"</"+i+`>
146`}listitem(e){return`<li>${e}</li>
147`}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(e){return`<p>${e}</p>
148`}table(e,n){return n&&(n=`<tbody>${n}</tbody>`),`<table>
149<thead>
150`+e+`</thead>
151`+n+`</table>
152`}tablerow(e){return`<tr>
153${e}</tr>
154`}tablecell(e,n){const r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+e+`</${r}>
155`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return this.options.xhtml?"<br/>":"<br>"}del(e){return`<del>${e}</del>`}link(e,n,r){if(e=Dr(this.options.sanitize,this.options.baseUrl,e),e===null)return r;let i='<a href="'+e+'"';return n&&(i+=' title="'+n+'"'),i+=">"+r+"</a>",i}image(e,n,r){if(e=Dr(this.options.sanitize,this.options.baseUrl,e),e===null)return r;let i=`<img src="${e}" alt="${r}"`;return n&&(i+=` title="${n}"`),i+=this.options.xhtml?"/>":">",i}text(e){return e}}class no{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,n,r){return""+r}image(e,n,r){return""+r}br(){return""}}class ro{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}
vendor: 4,488 bytes, lines 155-157
155getNextSafeSlug(e,n){let r=e,i=0;if(this.seen.hasOwnProperty(r)){i=this.seen[e];do i++,r=e+"-"+i;while(this.seen.hasOwnProperty(r))}return n||(this.seen[e]=i,this.seen[r]=0),r}slug(e,n={}){const r=this.serialize(e);return this.getNextSafeSlug(r,n.dryrun)}}class Te{constructor(e){this.options=e||De,this.options.renderer=this.options.renderer||new Xn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new no,this.slugger=new ro}static parse(e,n){return new Te(n).parse(e)}static parseInline(e,n){return new Te(n).parseInline(e)}parse(e,n=!0){let r="",i,s,o,a,l,u,p,f,h,g,b,y,w,T,I,j,R,M,P;const A=e.length;for(i=0;i<A;i++){if(g=e[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[g.type]&&(P=this.options.extensions.renderers[g.type].call({parser:this},g),P!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(g.type))){r+=P||"";continue}switch(g.type){case"space":continue;case"hr":{r+=this.renderer.hr();continue}case"heading":{r+=this.renderer.heading(this.parseInline(g.tokens),g.depth,to(this.parseInline(g.tokens,this.textRenderer)),this.slugger);continue}case"code":{r+=this.renderer.code(g.text,g.lang,g.escaped);continue}case"table":{for(f="",p="",a=g.header.length,s=0;s<a;s++)p+=this.renderer.tablecell(this.parseInline(g.header[s].tokens),{header:!0,align:g.align[s]});for(f+=this.renderer.tablerow(p),h="",a=g.rows.length,s=0;s<a;s++){for(u=g.rows[s],p="",l=u.length,o=0;o<l;o++)p+=this.renderer.tablecell(this.parseInline(u[o].tokens),{header:!1,align:g.align[o]});h+=this.renderer.tablerow(p)}r+=this.renderer.table(f,h);continue}case"blockquote":{h=this.parse(g.tokens),r+=this.renderer.blockquote(h);continue}case"list":{for(b=g.ordered,y=g.start,w=g.loose,a=g.items.length,h="",s=0;s<a;s++)I=g.items[s],j=I.checked,R=I.task,T="",I.task&&(M=this.renderer.checkbox(j),w?I.tokens.length>0&&I.tokens[0].type==="paragraph"?(I.tokens[0].text=M+" "+I.tokens[0].text,I.tokens[0].tokens&&I.tokens[0].tokens.length>0&&I.tokens[0].tokens[0].type==="text"&&(I.tokens[0].tokens[0].text=M+" "+I.tokens[0].tokens[0].text)):I.tokens.unshift({type:"text",text:M}):T+=M),T+=this.parse(I.tokens,w),h+=this.renderer.listitem(T,R,j);r+=this.renderer.list(h,b,y);continue}case"html":{r+=this.renderer.html(g.text);continue}case"paragraph":{r+=this.renderer.paragraph(this.parseInline(g.tokens));continue}case"text":{for(h=g.tokens?this.parseInline(g.tokens):g.text;i+1<A&&e[i+1].type==="text";)g=e[++i],h+=`
156`+(g.tokens?this.parseInline(g.tokens):g.text);r+=n?this.renderer.paragraph(h):h;continue}default:{const m='Token with "'+g.type+'" type was not found.';if(this.options.silent){console.error(m);return}else throw new Error(m)}}}return r}parseInline(e,n){n=n||this.renderer;let r="",i,s,o;const a=e.length;for(i=0;i<a;i++){if(s=e[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]&&(o=this.options.extensions.renderers[s.type].call({parser:this},s),o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type))){r+=o||"";continue}switch(s.type){case"escape":{r+=n.text(s.text);break}case"html":{r+=n.html(s.text);break}case"link":{r+=n.link(s.href,s.title,this.parseInline(s.tokens,n));break}case"image":{r+=n.image(s.href,s.title,s.text);break}case"strong":{r+=n.strong(this.parseInline(s.tokens,n));break}case"em":{r+=n.em(this.parseInline(s.tokens,n));break}case"codespan":{r+=n.codespan(s.text);break}case"br":{r+=n.br();break}case"del":{r+=n.del(this.parseInline(s.tokens,n));break}case"text":{r+=n.text(s.text);break}default:{const l='Token with "'+s.type+'" type was not found.';if(this.options.silent){console.error(l);return}else throw new Error(l)}}}return r}}class zt{constructor(e){this.options=e||De}preprocess(e){return e}postprocess(e){return e}}Zn(zt,"passThroughHooks",new Set(["preprocess","postprocess"]));function Tm(t,e,n){return r=>{if(r.message+=`
157Please report this to https://github.com/markedjs/marked.`,t){const i="<p>An error occurred:</p><pre>"+Z(r.message+"",!0)+"</pre>";if(e)return Promise.resolve(i);if(n){n(null,i);return}return i}if(e)return Promise.reject(r);if(n){n(r);return}throw r}}function io(t,e){return(n,r,i)=>{typeof r=="function"&&(i=r,r=null);const s={...r};r={...O.defaults,...s};const o=Tm(r.silent,r.async,i);if(typeof n>"u"||n===null)return o(new Error("marked(): input parameter is undefined or null"));
157if(typeof n!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(km(r),r.hooks&&(r.hooks.options=r),i){const a=r.highlight;let l;try{r.hooks&&(n=r.hooks.preprocess(n)),l=t(n,r)}catch(f){return o(f)}const u=function(f){let h;if(!f)try{r.walkTokens&&O.walkTokens(l,r.walkTokens),h=e(l,r),r.hooks&&(h=r.hooks.postprocess(h))}catch(g){f=g}return r.highlight=a,f?o(f):i(null,h)};if(!a||a.length<3||(delete r.highlight,!l.length))return u();let p=0;O.walkTokens(l,function(f){f.type==="code"&&(p++,setTimeout(()=>{a(f.text,f.lang,function(h,g){if(h)return u(h);g!=null&&g!==f.text&&(f.text=g,f.escaped=!0),p--,p===0&&u()})},0))}),p===0&&u();return}if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(n):n).then(a=>t(a,r)).then(a=>r.walkTokens?Promise.all(O.walkTokens(a,r.walkTokens)).then(()=>a):a).then(a=>e(a,r)).then(a=>r.hooks?r.hooks.postprocess(a):a).catch(o);try{r.hooks&&(n=r.hooks.preprocess(n));const a=t(n,r);r.walkTokens&&O.walkTokens(a,r.walkTokens);let l=e(a,r);return r.hooks&&(l=r.hooks.postprocess(l)),l}catch(a){return o(a)}}}function O(t,e,n){return io(Se.lex,Te.parse)(t,e,n)}O.options=O.setOptions=function(t){return O.defaults={...O.defaults,...t},dm(O.defaults),O};O.getDefaults=Zs;O.defaults=De;O.use=function(...t){const e=O.defaults.extensions||{renderers:{},childTokens:{}};t.forEach(n=>{const r={...n};if(r.async=O.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if(i.renderer){const s=e.renderers[i.name];s?e.renderers[i.name]=function(...o){let a=i.renderer.apply(this,o);return a===!1&&(a=s.apply(this,o)),a}:e.renderers[i.name]=i.renderer}if(i.tokenizer){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");e[i.level]?e[i.level].unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),r.extensions=e),n.renderer){const i=O.defaults.renderer||new Xn;for(const s in n.renderer){const o=i[s];i[s]=(...a)=>{let l=n.renderer[s].apply(i,a);return l===!1&&(l=o.apply(i,a)),l}}r.renderer=i}if(n.tokenizer){const i=O.defaults.tokenizer||new Yn;for(const s in n.tokenizer){const o=i[s];i[s]=(...a)=>{let l=n.tokenizer[s].apply(i,a);return l===!1&&(l=o.apply(i,a)),l}}r.tokenizer=i}if(n.hooks){const i=O.defaults.hooks||new zt;for(const s in n.hooks){const o=i[s];zt.passThroughHooks.has(s)?i[s]=a=>{if(O.defaults.async)return Promise.resolve(n.hooks[s].call(i,a)).then(u=>o.call(i,u));const l=n.hooks[s].call(i,a);return o.call(i,l)}:i[s]=(...a)=>{let l=n.hooks[s].apply(i,a);return l===!1&&(l=o.apply(i,a)),l}}r.hooks=i}if(n.walkTokens){const i=O.defaults.walkTokens;r.walkTokens=function(s){let o=[];return o.push(n.walkTokens.call(this,s)),i&&(o=o.concat(i.call(this,s))),o}}O.setOptions(r)})};O.walkTokens=function(t,e){let n=[];for(const r of t)switch(n=n.concat(e.call(O,r)),r.type){case"table":{for(const i of r.header)n=n.concat(O.walkTokens(i.tokens,e));for(const i of r.rows)for(const s of i)n=n.concat(O.walkTokens(s.tokens,e));break}case"list":{n=n.concat(O.walkTokens(r.items,e));break}default:O.defaults.extensions&&O.defaults.extensions.childTokens&&O.defaults.extensions.childTokens[r.type]?O.defaults.extensions.childTokens[r.type].forEach(function(i){n=n.concat(O.walkTokens(r[i],e))}):r.tokens&&(n=n.concat(O.walkTokens(r.tokens,e)))}return n};O.parseInline=io(Se.lexInline,Te.parseInline);O.Parser=Te;O.parser=Te.parse;O.Renderer=Xn;O.TextRenderer=no;O.Lexer=Se;O.lexer=Se.lex;O.Tokenizer=Yn;O.Slugger=ro;O.Hooks=zt;O.parse=O;O.options;O.setOptions;O.use;O.walkTokens;O.parseInline;Te.parse;Se.lex;var Im=Object.defineProperty,Cm=Object.getOwnPropertyDescriptor,Ut=(t,e,n,r)=>{for(var i=r>1?void 0:r?Cm(e,n):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(i=(r?o(e,n,i):o(i))||i);return r&&i&&Im(e,n,i),i},jm=gl(Mt);function Lm(t){return Em.turndown(t)}function an(t){const e=t.parentNode;if(!ue(e))return!1;if(e.nodeName==="THEAD")return!0;
157if(e.nodeName!=="TABLE"&&!so(e))return!1;const n=[...t.childNodes];return n.every(r=>r.nodeName==="TH")&&n.some(r=>!!r.textContent)}function Dt(t){return ue(t)&&t.matches("th[data-controller-cell]")}function Pm(t){const e=t.parentNode;return!ue(e)||e.nodeName!=="TABLE"&&!so(e)?!1:[...t.childNodes].every(r=>Dt(r))}function so(t){var e;if(t.nodeName!=="TBODY")return!1;const n=t.previousSibling;return n?ue(n)&&n.nodeName==="THEAD"&&!((e=n.textContent)!=null&&e.trim()):!0}function Kr(t){const e=t.closest("table");if(!e)return!1;const{parentNode:n}=e;return n?!!n.closest("table"):!0}function Wr(t,e){var n;const r=[];for(const o of((n=e.parentNode)==null?void 0:n.childNodes)??[])Dt(o)||r.push(o);return`${(r.indexOf(e)===0?"| ":" ")+t.trim()} |`}var Em=new jm({codeBlockStyle:"fenced",headingStyle:"atx"}).addRule("taskListItems",{filter:t=>t.nodeName==="LI"&&t.hasAttribute("data-task-list-item"),replacement:(t,e)=>`- ${e.hasAttribute("data-checked")?"[x]":"[ ]"} ${t.trimStart()}`}).addRule("tableCell",{filter:["th","td"],replacement:(t,e)=>Dt(e)?"":Wr(t,e)}).addRule("tableRow",{filter:"tr",replacement:(t,e)=>{let n="";const r={left:":--",right:"--:",center:":-:"},i=[...e.childNodes].filter(s=>!Dt(s));if(an(e))for(const s of i){if(!ue(s))continue;let o="---";const a=(s.getAttribute("align")??"").toLowerCase();a&&(o=r[a]||o),n+=Wr(o,s)}return`
158${t}${n?`
159${n}`:""}`}}).addRule("table",{filter:t=>
159{if(t.nodeName!=="TABLE"||Kr(t))return!1;const e=[...t.rows].filter(n=>!Pm(n));return an(e[0])},replacement:t=>(t=t.replace(`
160
161`,`
162`),`
163
164${t}
165
166`)}).addRule("tableSection",{filter:["thead","tbody","tfoot"],replacement:function(t){return t}}).keep(t=>t.nodeName==="TABLE"&&!an(t.rows[0])).keep(t=>t.nodeName==="TABLE"&&Kr(t)).addRule("strikethrough",{filter:["del","s","strike"],replacement:function(t){return`~${t}~`}}).addRule("fencedCodeBlock",{filter:(t,e)=>!!(e.codeBlockStyle==="fenced"&&t.nodeName==="PRE"&&t.firstChild&&t.firstChild.nodeName==="CODE"),replacement:(t,e,n)=>{var r,i;Mi(ue(e.firstChild),{code:Oi.EXTENSION,message:`Invalid node \`${(r=e.firstChild)==null?void 0:r.nodeName}\` encountered for codeblock when converting html to markdown.`});const o=((i=(e.firstChild.getAttribute("class")??"").match(/(?:lang|language)-(\S+)/))==null?void 0:i[1])??e.firstChild.getAttribute("data-code-block-language")??"";return`
167
168${n.fence}${o}
169${e.firstChild.textContent}
170${n.fence}
171
172`}});O.use({renderer:{list(t,e,n){return e?`<ol ${n!==1?`start="${n}"`:""}>
173${t}</ol>
174`:`<ul ${t.startsWith("<li data-task-list-item ")?"data-task-list":""}>
175${t}</ul>
176`},listitem(t,e,n){return e?`<li data-task-list-item ${n?"data-checked":""}>${t}</li>
177`:`<li>${t}</li>
178`}}});function Am(t,e){return O(t,{gfm:!0,smartLists:!0,xhtml:!0,sanitizer:e})}function Rm(t){Mi(typeof document,{code:Oi.EXTENSION,message:"Attempting to sanitize html within a non-browser environment. Please provide your own `sanitizeHtml` method to the `MarkdownExtension`."});const e=new DOMParser().parseFromString(`<!DOCTYPE html><html><body>${t}</body>`,"text/html");return e.normalize(),oo(e.body),e.body.innerHTML}function oo(t){if(!bl(t)){if(!ue(t)||/^(script|iframe|object|embed|svg)$/i.test(t.tagName))return t==null?void 0:t.remove();for(const{name:e}of t.attributes)/^(class|id|name|href|src|alt|align|valign)$/i.test(e)||t.attributes.removeNamedItem(e);for(const e of t.childNodes)oo(e)}}var Xe=class extends Ri{get name(){return"markdown"}onCreate(){this.store.setStringHandler("markdown",this.markdownToProsemirrorNode.bind(this))}createPlugin(){return{props:{clipboardTextSerializer:this.options.copyAsMarkdown?e=>{const n=document.createElement("div"),r=ml.fromSchema(this.store.schema);return n.append(r.serializeFragment(e.content)),this.options.htmlToMarkdown(n.innerHTML)}:void 0}}}markdownToProsemirrorNode(t){return this.store.stringHandlers.html({...t,content:this.options.markdownToHtml(t.content,this.options.htmlSanitizer)})}insertMarkdown(t,e){return n=>{const{state:r}=n;let i=this.options.markdownToHtml(t,this.options.htmlSanitizer);i=!(e!=null&&e.alwaysWrapInBlock)&&i.startsWith("<p><")&&i.endsWith(`</p>
179`)?i.slice(3,-5):`<div>${i}</div>`;const s=this.store.stringHandlers.html({content:i,schema:r.schema,fragment:!0});return this.store.commands.insertNode.original(s,{...e,replaceEmptyParentBlock:!0})(n)}}getMarkdown(t){return this.options.htmlToMarkdown(this.store.helpers.getHTML(t))}toggleBoldMarkdown(){return t=>!1}};Ut([oe()],Xe.prototype,"insertMarkdown",1);Ut([yl()],Xe.prototype,"getMarkdown",1);Ut([oe()],Xe.prototype,"toggleBoldMarkdown",1);Xe=Ut([tt({defaultOptions:{htmlToMarkdown:Lm,markdownToHtml:Am,htmlSanitizer:Rm,activeNodes:[Q.Code],copyAsMarkdown:!1},staticKeys:["htmlToMarkdown","markdownToHtml","htmlSanitizer"]})],Xe);const Mm={blockquote:"blockquote",bulletList:"ul",callout:wl,codeBlock:kl,doc:_l,hardBreak:"br",heading:Sl,horizontalRule:"hr",image:"img",listItem:"li",paragraph:"p",orderedList:"ol",text:Tl},Om={italic:"em",bold:"strong",code:"code",link:Il({target:"_blank"}),underline:"u"},zm=[new at,new lt,new Me({autoLink:!0}),new At,new Xe],Dm=t=>{const{value:e}=t,{editing:n,preview:r}=Oe(),i=d.useIsSSR();if(!n){const s=typeof e=="string"?Pn(e,void 0):document,o=xl(s)?s:document;return c.jsx(vl,{json:o,typeMap:Mm,markMap:Om})}return i||typeof document>"u"||!r?null:c.jsx($l,{document:e,placeholder:"Start typing...",onChange:s=>we(t,s),enabled:r&&n,extra:{extensions:zm}})},Bt=Object.entries(vg).reduce((t,[e,n])=>(t.viewers[e]=n.viewer||n.default.viewer,t.editors[e]=n.editor||n.default.editor||K,t),{viewers:{},editors:{}}),ao={types:{boolean:oa},custom:{segmented_control:aa},pluginSimpleStack:vi,GroupRenderer:yi,WidgetRenderer:pd,ErrorFallback:la},Bm=oi(ao,{pluginStack:[pi,ai,fi,hi,as,gi,mi,li,bi,ad,Ed],GroupRenderer:yi,types:{string:Go,number:xi.editor,array:Yo,object:K},pluginSimpleStack:[...vi,Ld,Xo,Ll(["additionalProperties"])],custom:{...Bt.editors,rich_text:()=>null,text_styles:()=>null,heading_section:Bt.editors.text_block_section,column_list:Tg,section_list:ci,image:Jo,button:is.editor,link:$d,color:$i.editor,select:Zo,select_spot:_d,select_spot_thing_type:Td,select_spot_content_categories:Sd,select_spot_collection_type:Id,select_from_gql_options:kd,slider:cs,card:yd,text_area:Qo}}),Fm=oi(ao,{pluginStack:[pi,ai,fi,hi,as,mi,li,bi,gi],GroupRenderer:ea,pluginSimpleStack:[],types:{string:ta,number:xi.viewer,array:na,object:K},custom:{...Bt.viewers,rich_text:Dm,heading_section:Bt.viewers.text_block_section,slider:jd,section_list:ci,image:ra,button:is.viewer,link:wd,color:$i.viewer,select:ia,c
179ard:os,text_area:sa}}),Nm=({store:t,onChange:e,schema:n})=>{const[r,i]=$.useState(!1),[s,o]=$.useState(JSON.stringify(t.valuesToJS(),null,3));return c.jsxs(c.Fragment,{children:[c.jsx(d.Sheet,{title:"JSON",isShown:r,onClose:()=>i(!1),children:c.jsxs(d.VStack,{children:[c.jsx(d.TextInput,{as:"textarea",value:s,onChange:o,css:{minHeight:"calc(100vh - 300px)",width:"100%"}}),c.jsx(d.Button,{iconBefore:d.FloppyDiskIcon,onPress:()=>{e({storeKeys:xe([]),scopes:["value"],type:"set",schema:n,data:{value:Ht(Pn(s))}}),i(!1)},intent:"success",children:"Save JSON"})]})}),c.jsx(d.Button,{iconBefore:d.FileEditIcon,onPress:()=>{o(JSON.stringify(t.valuesToJS(),null,3)),i(!0)},appearance:"minimal",size:"small",children:"JSON"})]})};var Hm=Co;function Km(t,e){return Hm(t,e)}var Wm=Km;const Vr=Je(Wm),ln=[];function Vm({onChange:t,storeKeys:e,schema:n,value:r}){const{contains:i}=d.useFilter({sensitivity:"base",usage:"search",ignorePunctuation:!0}),{compare:s}=d.useCollator({sensitivity:"base",usage:"search",ignorePunctuation:!0}),o="AIzaSyAx75EleiADgH60LsZSt2cKIAIjzzEKpV8",a=d.useAsyncList({initialFilterText:r,initialSelectedKeys:r,async load({filterText:l}){if(!ln.length){const p=await(await fetch(`https://www.googleapis.com/webfonts/v1/webfonts?key=${o}`)).json();ln.push(...p.items)}return{items:ln.map(u=>({id:u.family,family:u.family})).filter(u=>i(u.family,l)||u.family===r).sort((u,p)=>s(u.family,p.family))}}});return c.jsx(d.ComboBox,{label:"Font Family",labelProps:{appearance:"group"},placeholder:"Search Google Fonts",inputValue:a.filterText,onInputChange:a.setFilterText,onSelectionChange:l=>{a.setSelectedKeys(new Set([l])),we({onChange:t,storeKeys:e,schema:n},l)},items:a.items,loading:a.isLoading,onLoadMore:a.loadMore,children:l=>c.jsx(d.Item,{title:l.family,children:l.family},l.id)})}function Um(t){const e=$.useRef(null);return $.useEffect(()=>{e.current||(e.current=t)},[t]),e}function qm(){var g;const{cache:t}=Ca(),{id:e}=Jr(),n=jo(),{data:r}=J(_i,{variables:{id:e}}),i=Um(r==null?void 0:r.typography),[s]=ot(wa),o=d.useConfirm(),a=r==null?void 0:r.typography,l=i.current?!Vr(i.current,a):!1;function u(){l?o({title:"Are you sure?",message:"You have unsaved changes. Are you sure you want to leave?",confirmLabel:"Leave"}).then(()=>n(-1)):n(-1)}const p=$.useCallback(async b=>{const y=$t(b,["id","@id","name","__typename"]);y.color||(y.color=null),await s({variables:{id:e,typography:y}}),n(-1)},[s,e,n]),f=$.useCallback(b=>{const y=$t(b,["id","@id","name","__typename"]),w=$t(i.current,["id","@id","name","__typename"]);Vr(y,w)||t.writeQuery({query:nr,variables:{id:e},data:{typography:b}})},[t,e,i]);if(!a)return null;const h=t.readQuery({query:nr,variables:{id:e}});return c.jsxs(d.VStack,{css:{padding:"$3"},children:[c.jsx(d.Button,{iconBefore:d.ArrowLeftIcon,onPress:u,appearance:"minimal",round:!0,size:"small",children:"Back"}),c.jsxs(d.VStack,{children:[c.jsx(d.Label,{children:"Name"}),c.jsx(d.Heading,{style:{lineHeight:1.125,color:"#000",...a,...h,letterSpacing:`clamp(0em, calc(${(h==null?void 0:h.letterSpacing)-1}em), 2em)`,fontSize:h!=null&&h.fontSize?`clamp(9px, ${(h==null?void 0:h.fontSize)/16}rem, 72px)`:void 0},children:(g=r==null?void 0:r.typography)==null?void 0:g.name})]}),c.jsx(d.Spacer,{}),a!=null&&a.id?c.jsx(ca,{widgets:{custom:{slider:cs,font_picker:Vm}},schema:{...Lo(Qi,{properties:{letterSpacing:{default:1}}}),widget:void 0},initialValues:a,onSave:p,onChangeEnd:f}):null]})}const lo=Ho(pa),Gm=Po({currentLocale:"en"});function y0({initialValues:t,legacyRailsValues:e,editing:n}){var A,m,k,_,S,B,x;const[r,i]=$.useState(()=>Ko(Ht(t))),s=da(),{data:{domainOrg:o}={}}=J(_a),{locale:a}=Si(),{availableLocales:l,slug:u,theme:p}=o||{},{data:f}=J(ka,{skip:!n});dd({store:r});const h=$.useCallback(v=>{i(ua(v))},[i]),{data:g}=J(Sa),b=(A=g==null?void 0:g.typographies)==null?void 0:A.find(v=>v.id==="body"),y=(m=g==null?void 0:g.typographies)==null?void 0:m.find(v=>v.id==="title_1"),w=((_=(k=r.values)==null?void 0:k.get("theme"))==null?void 0:_.toJS())||{},T=d.createTheme("pagebuilder-theme",{fonts:{sans:"Inter, -system-ui, sans-serif",serif:"Lora, Georgia, Cambria, 'Times New Roman', Times, serif",heading:(y==null?void 0:y.fontFamily)||"$serif",body:(b==null?void 0:b.fontFamily)||"$sans"}}),I=$.useMemo(()=>{var D;let v;try{v=Tc((w==null?void 0:w.accent_color)||((D=t==null?void 0:t.theme)==null?void 0:D.accent_color))}catch{}
179return{"--gc-colors-pageBuilderBackgroundColor":(w==null?void 0:w.background_color)||"#fff","--gc-colors-pageBuilderForegroundColor":(w==null?void 0:w.foreground_color)||"$colors$label","--gc-colors-pageBuilderAccentColor":"$colors$primary","--gc-sizes-container-full":"100%","--gc-sizes-container-extraLarge":"1700px","--gc-sizes-container-large":"1300px","--gc-sizes-container-medium":"900px","--gc-sizes-container-small":"600px","--gc-sizes-container-default":"var(--gc-sizes-container-medium)","--gc-sizes-max-container":"min($sizes$container-large, calc(100% - $sizes$8))","--ui-color":"var(--gc-colors-pageBuilderForegroundColor)","--ui-contrast-over-color":"var(--gc-colors-pageBuilderBackgroundColor)","--gc-space-padding-large":"clamp(100px, 10vw, 150px)","--gc-space-padding-medium":"clamp(var(--gc-space-13), 8vw, var(--gc-space-15))","--gc-space-padding-small":"clamp(var(--gc-space-3), 5vw, var(--gc-space-5))","--gc-space-padding-none":"0","--gc-space-padding-default":"var(--gc-space-padding-medium)","--gc-fonts-heading":(y==null?void 0:y.fontFamily)||"$fonts$heading","--gc-fonts-body":(b==null?void 0:b.fontFamily)||"$fonts$body",...v&&{"--gc-colors-primary":v.hsl().string(),"--gc-colors-primary_h":v.hue(),"--gc-colors-primary_s":v.saturationl()+"%","--gc-colors-primary_l":v.lightness()+"%","--gc-colors-pageBuilderAccentColor":v.hsl().string(),"--gc-colors-focusOutline":v.hsl().string()}}},[w==null?void 0:w.accent_color,w==null?void 0:w.background_color,w==null?void 0:w.foreground_color,(S=t==null?void 0:t.theme)==null?void 0:S.accent_color,y==null?void 0:y.fontFamily,b==null?void 0:b.fontFamily]),[{currentLocale:j}]=Gm(),R=$.useMemo(()=>({theme:de(t==null?void 0:t.theme),legacyRailsValues:e,t:s,locale:n?j:a,locales:l||["en"],defaultLocale:"en",localize:!0}),[j,l]),M=n?((B=f==null?void 0:f.currentPerson)==null?void 0:B.isAgent)??!1:!0,P=$.useMemo(()=>od({slug:u,orgTheme:p,isAgent:M}),[u,p,M]);return n?c.jsxs(d.HStack,{css:{width:"100%",$$gutter:"$sizes$10"},children:[c.jsx(d.Box,{className:`${T==null?void 0:T.className} pagebuilder-theme`,css:{padding:"$6 $4",width:"100%",$$gutter:"$sizes$10"},style:I,children:c.jsx(d.Card,{border:!0,elevation:2,css:{width:"100%",height:"100%",minHeight:"50vh",overflow:"hidden"},children:c.jsx(Ur,{schema:P,store:r,meta:R,editing:n,onChange:h,themeColorVariables:I,themeStyles:T})})}),c.jsx(d.Pane,{css:{width:"100%",maxWidth:"320px",maxHeight:"calc(100vh - $14)",overflowY:"auto",alignSelf:"stretch",position:"sticky",backgroundColor:"$background",top:"$14",$$idealHeight:"100vh"},borderLeft:!0,children:c.jsx(Cc,{children:c.jsx(Eo,{children:c.jsxs(Ao,{children:[c.jsx(Qn,{path:"/",index:!0,element:c.jsx(Ym,{schema:P,meta:R,onChange:h,isAgent:(x=f==null?void 0:f.currentPerson)==null?void 0:x.isAgent,store:r})}),c.jsx(Qn,{path:"/typography/:id",element:c.jsx(qm,{})})]})})})})]}):c.jsx(Ur,{schema:P,store:r,meta:R,editing:!1,onChange:h,showValidity:!1,themeColorVariables:I,themeStyles:T})}const Ur=se(({store:t,onChange:e,themeStyles:n,meta:r,themeColorVariables:i,schema:s,editing:o=!0})=>{const{data:a}=J(_i,{variables:{id:"body"}}),l=a==null?void 0:a.typography;return c.jsx(di,{...r,preview:!0,editing:o,widgets:Fm,children:c.jsx(ui,{store:t,onChange:e,showValidity:!1,children:c.jsx(d.Box,{className:`${n==null?void 0:n.className} ${d.theme.className} pagebuilder-theme`,css:{...l,minHeight:"100%",backgroundColor:"var(--gc-colors-pageBuilderBackgroundColor)",color:"var(--gc-colors-pageBuilderForegroundColor)",$$gutter:"$sizes$10",...i},children:c.jsx(lo,{schema:s,isRoot:!0})})})})}),Ym=se(({meta:t,schema:e,store:n,onChange:r,isAgent:i})=>c.jsx(d.DefaultVariantProvider,{value:{label:{appearance:"group"}},children:c.jsx(di,{...t,editing:!0,widgets:Bm,children:c.jsx(ui,{store:n,onChange:r,showValidity:!0,children:c.jsxs(d.Box,{css:{padding:"$3"},children:[i&&c.jsx(Nm,{onChange:r,schema:e,store:n}),c.jsx(lo,{schema:e,isRoot:!0})]})})})}));export{y0 as G,cd as T,Gm as u};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.