attraverso 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,22 +24,22 @@ Error generating stack: `+e.message+`
24
24
  `});++r<e.length;)r&&n.push({type:`text`,value:`
25
25
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
26
26
  `}),n}function yy(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function by(e,t){let n=my(e,t),r=n.one(e,void 0),i=Xv(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
27
- `},i)),a}function xy(e,t){return e&&`run`in e?async function(n,r){let i=by(n,{file:r,...t});await e.run(i,r)}:function(n,r){return by(n,{file:r,...e||t})}}function Sy(e){if(e)throw e}var Cy=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function wy(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Ty(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?Ey(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function Ey(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var Dy={basename:Oy,dirname:ky,extname:Ay,join:jy,sep:`/`};function Oy(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);Py(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function ky(e){if(Py(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function Ay(e){Py(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function jy(...e){let t=-1,n;for(;++t<e.length;)Py(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:My(n)}function My(e){Py(e);let t=e.codePointAt(0)===47,n=Ny(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function Ny(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function Py(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Fy={cwd:Iy};function Iy(){return`/`}function Ly(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Ry(e){if(typeof e==`string`)e=new URL(e);else if(!Ly(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return zy(e)}function zy(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var By=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Vy=class{constructor(e){let t;t=e?Ly(e)?{path:e}:typeof e==`string`||Gy(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Fy.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<By.length;){let e=By[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)By.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?Dy.basename(this.path):void 0}set basename(e){Uy(e,`basename`),Hy(e,`basename`),this.path=Dy.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?Dy.dirname(this.path):void 0}set dirname(e){Wy(this.basename,`dirname`),this.path=Dy.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?Dy.extname(this.path):void 0}set extname(e){if(Hy(e,`extname`),Wy(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=Dy.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){Ly(e)&&(e=Ry(e)),Uy(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?Dy.basename(this.path,this.extname):void 0}set stem(e){Uy(e,`stem`),Hy(e,`stem`),this.path=Dy.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new wm(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Hy(e,t){if(e&&e.includes(Dy.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+Dy.sep+"`")}function Uy(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function Wy(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Gy(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Ky=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),qy=l(Cy(),1),Jy={}.hasOwnProperty,Yy=new class e extends Ky{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Ty()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,qy.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Qy(`data`,this.frozen),this.namespace[e]=t,this):Jy.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Qy(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=tb(e),n=this.parser||this.Parser;return Xy(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Xy(`process`,this.parser||this.Parser),Zy(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=tb(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);rb(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Xy(`processSync`,this.parser||this.Parser),Zy(`processSync`,this.compiler||this.Compiler),this.process(e,r),eb(`processSync`,`process`,t),n;function r(e,r){t=!0,Sy(e),n=r}}run(e,t,n){$y(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=tb(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),eb(`runSync`,`run`,n),r;function i(e,t){Sy(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=tb(t),r=this.compiler||this.Compiler;return Zy(`stringify`,r),$y(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Qy(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,qy.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];wy(o)&&wy(r)&&(r=(0,qy.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Xy(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Zy(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Qy(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function $y(e){if(!wy(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function eb(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function tb(e){return nb(e)?e:new Vy(e)}function nb(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function rb(e){return typeof e==`string`||ib(e)}function ib(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var ab=[],ob={allowDangerousHtml:!0},sb=/^(https?|ircs?|mailto|xmpp)$/i,cb=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function lb(e){let t=ub(e),n=db(e);return fb(t.runSync(t.parse(n),n),e)}function ub(e){let t=e.rehypePlugins||ab,n=e.remarkPlugins||ab,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ob}:ob;return Yy().use(tv).use(n).use(xy,r).use(t)}function db(e){let t=e.children||``,n=new Vy;return typeof t==`string`?n.value=t:``+t,n}function fb(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||pb;for(let e of cb)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return t.className&&(e={type:`element`,tagName:`div`,properties:{className:t.className},children:e.type===`root`?e.children:[e]}),ly(e,l),Mm(e,{Fragment:b.Fragment,components:i,ignoreInvalidStyle:!0,jsx:b.jsx,jsxs:b.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in th)if(Object.hasOwn(th,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=th[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function pb(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||sb.test(e.slice(0,t))?e:``}function mb({title:e,count:t,open:n,onToggle:r,children:i}){return(0,b.jsxs)(`div`,{className:`section`,children:[(0,b.jsxs)(`button`,{className:`section__head`,onClick:r,"aria-expanded":n,children:[(0,b.jsx)(`span`,{className:`section__caret`,"aria-hidden":`true`,children:n?`▾`:`▸`}),e,t!==void 0&&t>0&&(0,b.jsx)(`span`,{className:`section__count`,children:t})]}),n&&(0,b.jsx)(`div`,{className:`section__body`,children:i})]})}var hb=null,gb=()=>hb===null?{}:{authorization:`Bearer ${hb}`};function _b(e,t){return e===void 0?Promise.resolve({mode:`local`}):e.start(t)}var vb=`/api/store`,yb=()=>new URLSearchParams(window.location.search).get(`t`),bb=()=>yb()!==null||Object.keys(gb()).length>0;function xb(e){let t=yb(),n=gb();if(t!==null)return{"x-apm-token":t,...n};if(Object.keys(n).length>0)return n;throw Error(`this viewer is read-only - open it with the open_viewer tool to ${e}`)}async function Sb(e,t,n){let r=await fetch(`/api/ticket?project=${encodeURIComponent(e)}&ref=${encodeURIComponent(t)}`,{method:`POST`,headers:{"content-type":`application/json`,...xb(`change a status`)},body:JSON.stringify({status:n})});if(!r.ok)throw Error((await r.json()).error??`could not change the status (${r.status})`)}async function Cb(e,t){let n=await fetch(`/api/layout?project=${encodeURIComponent(e)}`,{method:`POST`,headers:{"content-type":`application/json`,...xb(`save the layout`)},body:JSON.stringify({layout:t})});if(!n.ok)throw Error((await n.json()).error??`could not save the layout (${n.status})`)}var wb=`/api/changes`;async function Tb(e,t,n){let r=new URLSearchParams({project:e,ref:t}),i=await fetch(`/api/item?${r}`,{headers:gb(),signal:n});if(i.status===404)return null;if(!i.ok)throw Error(`/api/item returned ${i.status} ${i.statusText}`);return await i.json()}async function Eb(e,t,n){let r=new URLSearchParams({project:e,q:t}),i=await fetch(`/api/search?${r}`,{headers:gb(),signal:n});return i.ok?await i.json():null}async function Db(e,t){let n=await fetch(`/api/media/${t}?project=${encodeURIComponent(e)}`,{method:`DELETE`,headers:xb(`remove an image`)});if(!n.ok)throw Error((await n.json()).error??`remove failed (${n.status})`)}async function Ob(e,t,n){let r=await fetch(`/api/media?project=${encodeURIComponent(e)}&ref=${encodeURIComponent(t)}`,{method:`POST`,headers:{"content-type":n.type,...xb(`upload`)},body:n}),i=await r.json();if(!r.ok)throw Error(i.error??`upload failed (${r.status})`);return{hash:i.hash,mime:i.mime,bytes:i.bytes,at:new Date().toISOString()}}var kb=e=>Object.entries(e).map(([e,t])=>({heading:e,content:t})).sort((e,t)=>Number(t.heading===`protocol`)-Number(e.heading===`protocol`));function Ab(e,t){let n=new Map;for(let r of e)n.set(t(r),[...n.get(t(r))??[],r]);return n}async function jb(){let e=await fetch(vb,{headers:gb()});if(!e.ok)throw Error(`${vb} returned ${e.status} ${e.statusText}`);let{path:t,store:n,metrics:r,uploadsDisabled:i,files:a}=await e.json();return{storePath:t,uploadsDisabled:i??null,projects:(n.projects??[]).map(e=>({key:e.key,name:e.name,items:e.items.map(e=>({id:e.ref,area:e.area,status:e.status,title:e.title,deps:e.deps??[],parent:e.parent??null,start:e.start,due:e.due,closed:e.closed_at})),next:(e.next??[]).filter(t=>e.items.some(e=>e.ref===t)),layout:Object.fromEntries(Object.entries(e.layout??{}).map(([e,t])=>{let[n,r]=t.split(`,`).map(Number);return[e,{x:n,y:r}]})),metrics:Ab(r?.[e.key]??[],e=>e.ref??``),context:kb(e.context??{}),file:a?.[e.key]??null,areaInfo:Object.fromEntries((e.areas??[]).map(e=>[e.key,{name:e.name,description:e.description}]))}))}}function Mb(e){let t=decodeURIComponent(e.replace(/^#/,``)),n=t.indexOf(`/`);return{project:(n===-1?t:t.slice(0,n))||null,item:n===-1?null:t.slice(n+1)||null}}var Nb=`context:`,Pb=e=>e?.startsWith(`context:`)?e.slice(8):null;function Fb(e,t){if(e.length===0)return{project:null,notice:`This store has no projects yet. Create one and it will appear here.`};if(t!==null){let n=e.find(e=>e.key===t);return n?{project:n,notice:null}:{project:null,notice:`No project "${t}" in this store. It holds: ${e.map(e=>e.key).join(`, `)}.`}}return{project:e[0],notice:null}}var Ib=e=>e<1048576?`${Math.round(e/1024)} KB`:`${(e/1024/1024).toFixed(1)} MB`;function Lb({projectKey:e,ref_:t,images:n,uploadsDisabled:r,reload:i,open:a,onToggle:o}){let[s,c]=(0,_.useState)(!1),[l,u]=(0,_.useState)(null),[d,f]=(0,_.useState)(!1),p=(0,_.useRef)(null),m=bb(),h=m&&r===null;(0,_.useEffect)(()=>u(null),[t]);async function g(e){c(!0),u(null);try{await e()}catch(e){u(e instanceof Error?e.message:String(e))}finally{c(!1),i()}}let v=n=>n===null||n.length===0?Promise.resolve():g(async()=>{for(let r of Array.from(n))await Ob(e,t,r)});return(0,b.jsxs)(mb,{title:`Images`,count:n.length,open:a,onToggle:o,children:[n.length>0&&(0,b.jsx)(`div`,{className:`attachments__grid`,children:n.map(t=>(0,b.jsxs)(`div`,{className:`attachments__item`,children:[(0,b.jsx)(`a`,{href:`/media/${t.hash}`,target:`_blank`,rel:`noreferrer`,children:(0,b.jsx)(`img`,{className:`attachments__thumb`,src:`/media/${t.hash}`,alt:t.caption??`attachment`,loading:`lazy`})}),(0,b.jsx)(`span`,{className:`attachments__meta`,children:Ib(t.bytes)}),m&&(0,b.jsx)(`button`,{className:`attachments__remove`,title:`Remove this image from the ticket`,disabled:s,onClick:()=>void g(()=>Db(e,t.hash)),children:`x`})]},t.hash))}),h?(0,b.jsxs)(`div`,{className:`attachments__drop${d?` attachments__drop--over`:``}`,onDragOver:e=>{e.preventDefault(),f(!0)},onDragLeave:()=>f(!1),onDrop:e=>{e.preventDefault(),f(!1),v(e.dataTransfer.files)},onClick:()=>p.current?.click(),children:[(0,b.jsx)(`input`,{ref:p,type:`file`,accept:`image/png,image/jpeg,image/webp,image/gif`,multiple:!0,hidden:!0,onChange:e=>{v(e.target.files),e.target.value=``}}),s?`Uploading...`:`Drop an image on ${t}, or click to choose`]}):r===null?n.length===0&&(0,b.jsx)(`p`,{className:`attachments__readonly`,children:`Open the viewer with the open_viewer tool to add images.`}):(0,b.jsx)(`p`,{className:`attachments__readonly`,children:r}),l!==null&&(0,b.jsx)(`p`,{className:`attachments__error`,children:l})]})}var Rb=e=>new Date(e).toLocaleDateString(void 0,{day:`numeric`,month:`short`}),zb=e=>e.latest===null&&e.latestText===null;function Bb(e){if(e.latest!==null){let t=Number.isInteger(e.latest)?String(e.latest):e.latest.toFixed(2).replace(/\.?0+$/,``);return e.units.length>0?`${t} ${e.units.join(`/`)}`:t}if(e.values.length>1){let t=e.values.map(e=>`${e.text} x${e.count}`).join(`, `),n=e.distinctValues-e.values.length;return n>0?`${t}, +${n} more`:t}return e.latestText??``}function Vb({metrics:e,open:t,onToggle:n}){return e.length===0?null:(0,b.jsx)(mb,{title:`Metrics`,count:e.length,open:t,onToggle:n,children:(0,b.jsx)(`table`,{className:`metrics__table`,children:(0,b.jsx)(`tbody`,{children:e.map(e=>(0,b.jsxs)(`tr`,{children:[(0,b.jsx)(`td`,{className:`metrics__name`,children:e.metric}),(0,b.jsx)(`td`,{className:`metrics__value`,"data-mixed":e.units.length>1,"data-wrap":e.values.length>1,children:Bb(e)}),(0,b.jsx)(`td`,{className:`metrics__count`,children:zb(e)?`${e.count} ${e.count===1?`occurrence`:`occurrences`}, to ${Rb(e.latestAt)}`:e.count===1?Rb(e.latestAt):`${e.count} readings, to ${Rb(e.latestAt)}`})]},e.metric))})})})}function Hb(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Ub(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function Wb(e,t,n){let r=Zv((n||{}).ignore||[]),i=Gb(t),a=-1;for(;++a<i.length;)sy(e,o);function o(e,t,n){if(e.type===`text`&&typeof n==`number`)return s(e,t,n);if(r(e,n,t[t.length-1]))return oy}function s(e,t,n){let r=t[t.length-1],o=i[a][0],s=i[a][1],c=0,l=!1,u=[];o.lastIndex=0;let d=o.exec(e.value);for(;d;){let n=d.index,r={index:d.index,input:d.input,stack:[...t,e]},i=s(...d,r);if(typeof i==`string`&&(i=i.length>0?{type:`text`,value:i}:void 0),i===!1)o.lastIndex=n+1;else{if(c!==n&&f({type:`text`,value:e.value.slice(c,n)}),Array.isArray(i))for(let e of i)f(e);else i&&f(i);c=n+d[0].length,l=!0}if(!o.global)break;d=o.exec(e.value)}return l?(c<e.value.length&&f({type:`text`,value:e.value.slice(c)}),r.children.splice(n,1,...u)):u=[e],n+u.length;function f(e){let t=u[u.length-1];t&&t.type===`text`&&e.type===`text`?t.value+=e.value:u.push(e)}}}function Gb(e){if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let t=[],n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([Kb(e[0]),qb(e[1])])}return t}function Kb(e){return typeof e==`string`?new RegExp(Ub(e),`g`):e}function qb(e){return typeof e==`function`?e:function(){return e}}var Jb=`phrasing`,Yb=[`autolink`,`link`,`image`,`label`];function Xb(){return{transforms:[ix],enter:{literalAutolink:Qb,literalAutolinkEmail:$b,literalAutolinkHttp:$b,literalAutolinkWww:$b},exit:{literalAutolink:rx,literalAutolinkEmail:nx,literalAutolinkHttp:ex,literalAutolinkWww:tx}}}function Zb(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:Jb,notInConstruct:Yb},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:Jb,notInConstruct:Yb},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:Jb,notInConstruct:Yb}]}}function Qb(e){this.enter({type:`link`,title:null,url:``,children:[],position:void 0},e)}function $b(e){this.config.enter.autolinkProtocol.call(this,e)}function ex(e){this.config.exit.autolinkProtocol.call(this,e)}function tx(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function nx(e){this.config.exit.autolinkEmail.call(this,e)}function rx(e){this.exit(e)}function ix(e){Wb(e,[[/(?<![\da-z])(https?:\/\/|www(?=\.))([\w-]*\.[\w\-.]*)([^\t\n\r ]*)/gi,ax],[/(?<![\w+\-.@])xmpp:([\w+\-.]+)@([\w-]+(?:\.[\w-]+)+)(\/(?:[\w\-/]|\.(?=[\dA-Za-z]))*)?/g,cx],[/(?<![\w+\-.@])mailto:([\w+\-.]+)@([\w-]+(?:\.[\w-]+)+)/g,sx],[/(?<![\w+\-.]|(?:^|[^\d@A-Za-z])(?:mailto|xmpp):)([\w+\-.]+)@([\w-]+(?:\.[\w-]+)+)/g,ox]],{ignore:[`link`,`linkReference`]})}function ax(e,t,n,r,i){if(!dx(i))return!1;let a=``;if(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),Th(n.charCodeAt(0))||!lx(n))return!1;let o=ux(n+r),s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0],position:void 0}],position:void 0};return o[1]?[s,{type:`text`,value:o[1],position:void 0}]:s}function ox(e,t,n){return!/[\d\-_]$/.test(n)&&{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n,position:void 0}],position:void 0}}function sx(e,t,n){if(/[\d\-_]$/.test(n))return!1;let r=`mailto:`+t+`@`+n;return{type:`link`,title:null,url:r,children:[{type:`text`,value:r,position:void 0}],position:void 0}}function cx(e,t,n,r,i){if(/[\d\-_]$/.test(n)||r&&(!/[A-Za-z]$/.test(r)||i.input.charAt(i.index+e.length)===`@`))return!1;let a=`xmpp:`+t+`@`+n+(r||``);return{type:`link`,title:null,url:a,children:[{type:`text`,value:a,position:void 0}],position:void 0}}function lx(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[\dA-Za-z]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[\dA-Za-z]/.test(t[t.length-2])))}function ux(e){let t=e.length;for(;t>0;){let n=e.charCodeAt(t-1);if(n===33||n===34||n===38||n===39||n===41||n===44||n===46||n===58||n===59||n===60||n===62||n===63||n===93||n===125)t--;else break}if(t===e.length)return[e,void 0];let n=e.slice(t);e=e.slice(0,t);let r=n.indexOf(`)`),i=Hb(e,`(`),a=Hb(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function dx(e){let t=e.input.charCodeAt(e.index-1);return e.index===0||Eh(t)||Th(t)}xx.peek=bx;function fx(){this.buffer()}function px(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function mx(){this.buffer()}function hx(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function gx(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gh(this.sliceSerialize(e)).toLowerCase(),n.label=t}function _x(e){this.exit(e)}function vx(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gh(this.sliceSerialize(e)).toLowerCase(),n.label=t}function yx(e){this.exit(e)}function bx(){return`[`}function xx(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Sx(){return{enter:{gfmFootnoteCallString:fx,gfmFootnoteCall:px,gfmFootnoteDefinitionLabelString:mx,gfmFootnoteDefinition:hx},exit:{gfmFootnoteCallString:gx,gfmFootnoteCall:_x,gfmFootnoteDefinitionLabelString:vx,gfmFootnoteDefinition:yx}}}function Cx(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:xx},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
28
- `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Tx:wx))),s(),o}}function wx(e,t,n){return t===0?e:Tx(e,t,n)}function Tx(e,t,n){return(n?``:` `)+e}var Ex=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];jx.attention=Mx,jx.peek=Nx;function Dx(){return{canContainEols:[`delete`],enter:{strikethrough:kx},exit:{strikethrough:Ax}}}function Ox(){return{handlers:{delete:jx},unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Ex}]}}function kx(e){this.enter({type:`delete`,children:[],position:void 0},e)}function Ax(e){this.exit(e)}function jx(e,t,n,r){let i=n.createTracker(r),a=n.stack.includes(`strikethrough`)?`~`:`~~`,o=n.enter(`strikethrough`),s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:`~`}),s+=i.move(a),o(),s}function Mx(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function Nx(){return`~`}function Px(e){return e.length}function Fx(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Px,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=Ix(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=Lx(r[d]);else{let e=Lx(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u],r=n.fillRows===!1?Math.max(1,o[u===1?0:u].length):l;d=-1;let i=[];for(;++d<r;){let o=e[d]||``,s=``,l=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];if(n===114)s=` `.repeat(e);else if(n===99){let t=e/2;e%2?(s=` `.repeat(t+.5),l=` `.repeat(t-.5)):(s=` `.repeat(t),l=s)}else l=` `.repeat(e)}n.delimiterStart!==!1&&!d&&i.push(`|`),n.padding===!1||n.alignDelimiters===!1&&o===``||n.delimiterStart===!1&&!d||i.push(` `),n.alignDelimiters!==!1&&i.push(s),i.push(o),n.alignDelimiters!==!1&&i.push(l),n.padding!==!1&&i.push(` `),(n.delimiterEnd!==!1||d!==r-1)&&i.push(`|`)}m.push(n.delimiterEnd===!1?i.join(``).replace(/ +$/,``):i.join(``))}return m.join(`
29
- `)}function Ix(e){return e==null?``:String(e)}function Lx(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var Rx=Zv([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function zx(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),Bx);return i(),o}function Bx(e,t,n){return`>`+(n?``:` `)+e}function Vx(e,t){return Hx(e,t.inConstruct,!0)&&!Hx(e,t.notInConstruct,!1)}function Hx(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Ux(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){let e=n.unsafe[i];if(e.character===`
30
- `&&!e.before&&!e.after&&Vx(n.stack,e))return/[\t ]/.test(r.before)?``:` `}return`\\
31
- `}function Wx(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function Gx(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^\n\r ]/.test(e.value)||/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function Kx(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function qx(e,t,n,r){let i=Kx(n),a=e.value||``;if(Gx(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Jx);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(Wx(a,i)+1,3)),c=n.enter(`codeFenced`),l=i==="`"?`GraveAccent`:`Tilde`,u=o.move(s);if(e.lang){let t=n.enter(`codeFencedLang${l}`);u+=o.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${l}`);u+=o.move(` `),u+=o.move(n.safe(e.meta,{before:u,after:`
27
+ `},i)),a}function xy(e,t){return e&&`run`in e?async function(n,r){let i=by(n,{file:r,...t});await e.run(i,r)}:function(n,r){return by(n,{file:r,...e||t})}}function Sy(e){if(e)throw e}var Cy=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function wy(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Ty(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?Ey(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function Ey(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var Dy={basename:Oy,dirname:ky,extname:Ay,join:jy,sep:`/`};function Oy(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);Py(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function ky(e){if(Py(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function Ay(e){Py(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function jy(...e){let t=-1,n;for(;++t<e.length;)Py(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:My(n)}function My(e){Py(e);let t=e.codePointAt(0)===47,n=Ny(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function Ny(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function Py(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Fy={cwd:Iy};function Iy(){return`/`}function Ly(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Ry(e){if(typeof e==`string`)e=new URL(e);else if(!Ly(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return zy(e)}function zy(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var By=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Vy=class{constructor(e){let t;t=e?Ly(e)?{path:e}:typeof e==`string`||Gy(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Fy.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<By.length;){let e=By[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)By.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?Dy.basename(this.path):void 0}set basename(e){Uy(e,`basename`),Hy(e,`basename`),this.path=Dy.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?Dy.dirname(this.path):void 0}set dirname(e){Wy(this.basename,`dirname`),this.path=Dy.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?Dy.extname(this.path):void 0}set extname(e){if(Hy(e,`extname`),Wy(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=Dy.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){Ly(e)&&(e=Ry(e)),Uy(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?Dy.basename(this.path,this.extname):void 0}set stem(e){Uy(e,`stem`),Hy(e,`stem`),this.path=Dy.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new wm(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Hy(e,t){if(e&&e.includes(Dy.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+Dy.sep+"`")}function Uy(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function Wy(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Gy(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Ky=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),qy=l(Cy(),1),Jy={}.hasOwnProperty,Yy=new class e extends Ky{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Ty()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,qy.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Qy(`data`,this.frozen),this.namespace[e]=t,this):Jy.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Qy(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=tb(e),n=this.parser||this.Parser;return Xy(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Xy(`process`,this.parser||this.Parser),Zy(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=tb(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);rb(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Xy(`processSync`,this.parser||this.Parser),Zy(`processSync`,this.compiler||this.Compiler),this.process(e,r),eb(`processSync`,`process`,t),n;function r(e,r){t=!0,Sy(e),n=r}}run(e,t,n){$y(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=tb(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),eb(`runSync`,`run`,n),r;function i(e,t){Sy(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=tb(t),r=this.compiler||this.Compiler;return Zy(`stringify`,r),$y(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Qy(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,qy.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];wy(o)&&wy(r)&&(r=(0,qy.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Xy(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Zy(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Qy(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function $y(e){if(!wy(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function eb(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function tb(e){return nb(e)?e:new Vy(e)}function nb(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function rb(e){return typeof e==`string`||ib(e)}function ib(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var ab=[],ob={allowDangerousHtml:!0},sb=/^(https?|ircs?|mailto|xmpp)$/i,cb=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function lb(e){let t=ub(e),n=db(e);return fb(t.runSync(t.parse(n),n),e)}function ub(e){let t=e.rehypePlugins||ab,n=e.remarkPlugins||ab,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ob}:ob;return Yy().use(tv).use(n).use(xy,r).use(t)}function db(e){let t=e.children||``,n=new Vy;return typeof t==`string`?n.value=t:``+t,n}function fb(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||pb;for(let e of cb)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return t.className&&(e={type:`element`,tagName:`div`,properties:{className:t.className},children:e.type===`root`?e.children:[e]}),ly(e,l),Mm(e,{Fragment:b.Fragment,components:i,ignoreInvalidStyle:!0,jsx:b.jsx,jsxs:b.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in th)if(Object.hasOwn(th,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=th[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function pb(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||sb.test(e.slice(0,t))?e:``}function mb({title:e,count:t,open:n,onToggle:r,children:i}){return(0,b.jsxs)(`div`,{className:`section`,children:[(0,b.jsxs)(`button`,{className:`section__head`,onClick:r,"aria-expanded":n,children:[(0,b.jsx)(`span`,{className:`section__caret`,"aria-hidden":`true`,children:n?`▾`:`▸`}),e,t!==void 0&&t>0&&(0,b.jsx)(`span`,{className:`section__count`,children:t})]}),n&&(0,b.jsx)(`div`,{className:`section__body`,children:i})]})}var hb=null,gb=()=>hb===null?{}:{authorization:`Bearer ${hb}`};function _b(e,t){return e===void 0?Promise.resolve({mode:`local`}):e.start(t)}var vb=`/api/store`,yb=()=>new URLSearchParams(window.location.search).get(`t`),bb=()=>yb()!==null||Object.keys(gb()).length>0;function xb(e){let t=yb(),n=gb();if(t!==null)return{"x-apm-token":t,...n};if(Object.keys(n).length>0)return n;throw Error(`this viewer is read-only - open it with the open_viewer tool to ${e}`)}async function Sb(e,t,n){let r=await fetch(`/api/ticket?project=${encodeURIComponent(e)}&ref=${encodeURIComponent(t)}`,{method:`POST`,headers:{"content-type":`application/json`,...xb(`change a status`)},body:JSON.stringify({status:n})});if(!r.ok)throw Error((await r.json()).error??`could not change the status (${r.status})`)}async function Cb(e,t){let n=await fetch(`/api/layout?project=${encodeURIComponent(e)}`,{method:`POST`,headers:{"content-type":`application/json`,...xb(`save the layout`)},body:JSON.stringify({layout:t})});if(!n.ok)throw Error((await n.json()).error??`could not save the layout (${n.status})`)}var wb=`/api/changes`;async function Tb(e,t,n){let r=new URLSearchParams({project:e,ref:t}),i=await fetch(`/api/item?${r}`,{headers:gb(),signal:n});if(i.status===404)return null;if(!i.ok)throw Error(`/api/item returned ${i.status} ${i.statusText}`);return await i.json()}async function Eb(e,t,n){let r=new URLSearchParams({project:e,q:t}),i=await fetch(`/api/search?${r}`,{headers:gb(),signal:n});return i.ok?await i.json():null}async function Db(e,t){let n=await fetch(`/api/media/${t}?project=${encodeURIComponent(e)}`,{method:`DELETE`,headers:xb(`remove an image`)});if(!n.ok)throw Error((await n.json()).error??`remove failed (${n.status})`)}async function Ob(e,t,n){let r=await fetch(`/api/media?project=${encodeURIComponent(e)}&ref=${encodeURIComponent(t)}`,{method:`POST`,headers:{"content-type":n.type,...xb(`upload`)},body:n}),i=await r.json();if(!r.ok)throw Error(i.error??`upload failed (${r.status})`);return{hash:i.hash,mime:i.mime,bytes:i.bytes,at:new Date().toISOString()}}var kb=e=>Object.entries(e).map(([e,t])=>({heading:e,content:t})).sort((e,t)=>Number(t.heading===`protocol`)-Number(e.heading===`protocol`));function Ab(e,t){let n=new Map;for(let r of e)n.set(t(r),[...n.get(t(r))??[],r]);return n}function jb(e){let t=new Map;for(let n of e){let e=n.created_at??``,r=t.get(n.area);(r===void 0||e<r)&&t.set(n.area,e)}return[...t].sort(([e,t],[n,r])=>t===r?e.localeCompare(n):t<r?-1:1).map(([e])=>e)}async function Mb(){let e=await fetch(vb,{headers:gb()});if(!e.ok)throw Error(`${vb} returned ${e.status} ${e.statusText}`);let{path:t,store:n,metrics:r,uploadsDisabled:i,files:a}=await e.json();return{storePath:t,uploadsDisabled:i??null,projects:(n.projects??[]).map(e=>({key:e.key,name:e.name,items:e.items.map(e=>({id:e.ref,area:e.area,status:e.status,title:e.title,deps:e.deps??[],parent:e.parent??null,start:e.start,due:e.due,closed:e.closed_at})),next:(e.next??[]).filter(t=>e.items.some(e=>e.ref===t)),layout:Object.fromEntries(Object.entries(e.layout??{}).map(([e,t])=>{let[n,r]=t.split(`,`).map(Number);return[e,{x:n,y:r}]})),metrics:Ab(r?.[e.key]??[],e=>e.ref??``),context:kb(e.context??{}),file:a?.[e.key]??null,areaInfo:Object.fromEntries((e.areas??[]).map(e=>[e.key,{name:e.name,description:e.description}])),areaOrder:jb(e.items)}))}}function Nb(e){let t=decodeURIComponent(e.replace(/^#/,``)),n=t.indexOf(`/`);return{project:(n===-1?t:t.slice(0,n))||null,item:n===-1?null:t.slice(n+1)||null}}var Pb=`context:`,Fb=e=>e?.startsWith(`context:`)?e.slice(8):null;function Ib(e,t){if(e.length===0)return{project:null,notice:`This store has no projects yet. Create one and it will appear here.`};if(t!==null){let n=e.find(e=>e.key===t);return n?{project:n,notice:null}:{project:null,notice:`No project "${t}" in this store. It holds: ${e.map(e=>e.key).join(`, `)}.`}}return{project:e[0],notice:null}}var Lb=e=>e<1048576?`${Math.round(e/1024)} KB`:`${(e/1024/1024).toFixed(1)} MB`;function Rb({projectKey:e,ref_:t,images:n,uploadsDisabled:r,reload:i,open:a,onToggle:o}){let[s,c]=(0,_.useState)(!1),[l,u]=(0,_.useState)(null),[d,f]=(0,_.useState)(!1),p=(0,_.useRef)(null),m=bb(),h=m&&r===null;(0,_.useEffect)(()=>u(null),[t]);async function g(e){c(!0),u(null);try{await e()}catch(e){u(e instanceof Error?e.message:String(e))}finally{c(!1),i()}}let v=n=>n===null||n.length===0?Promise.resolve():g(async()=>{for(let r of Array.from(n))await Ob(e,t,r)});return(0,b.jsxs)(mb,{title:`Images`,count:n.length,open:a,onToggle:o,children:[n.length>0&&(0,b.jsx)(`div`,{className:`attachments__grid`,children:n.map(t=>(0,b.jsxs)(`div`,{className:`attachments__item`,children:[(0,b.jsx)(`a`,{href:`/media/${t.hash}`,target:`_blank`,rel:`noreferrer`,children:(0,b.jsx)(`img`,{className:`attachments__thumb`,src:`/media/${t.hash}`,alt:t.caption??`attachment`,loading:`lazy`})}),(0,b.jsx)(`span`,{className:`attachments__meta`,children:Lb(t.bytes)}),m&&(0,b.jsx)(`button`,{className:`attachments__remove`,title:`Remove this image from the ticket`,disabled:s,onClick:()=>void g(()=>Db(e,t.hash)),children:`x`})]},t.hash))}),h?(0,b.jsxs)(`div`,{className:`attachments__drop${d?` attachments__drop--over`:``}`,onDragOver:e=>{e.preventDefault(),f(!0)},onDragLeave:()=>f(!1),onDrop:e=>{e.preventDefault(),f(!1),v(e.dataTransfer.files)},onClick:()=>p.current?.click(),children:[(0,b.jsx)(`input`,{ref:p,type:`file`,accept:`image/png,image/jpeg,image/webp,image/gif`,multiple:!0,hidden:!0,onChange:e=>{v(e.target.files),e.target.value=``}}),s?`Uploading...`:`Drop an image on ${t}, or click to choose`]}):r===null?n.length===0&&(0,b.jsx)(`p`,{className:`attachments__readonly`,children:`Open the viewer with the open_viewer tool to add images.`}):(0,b.jsx)(`p`,{className:`attachments__readonly`,children:r}),l!==null&&(0,b.jsx)(`p`,{className:`attachments__error`,children:l})]})}var zb=e=>new Date(e).toLocaleDateString(void 0,{day:`numeric`,month:`short`}),Bb=e=>e.latest===null&&e.latestText===null;function Vb(e){if(e.latest!==null){let t=Number.isInteger(e.latest)?String(e.latest):e.latest.toFixed(2).replace(/\.?0+$/,``);return e.units.length>0?`${t} ${e.units.join(`/`)}`:t}if(e.values.length>1){let t=e.values.map(e=>`${e.text} x${e.count}`).join(`, `),n=e.distinctValues-e.values.length;return n>0?`${t}, +${n} more`:t}return e.latestText??``}function Hb({metrics:e,open:t,onToggle:n}){return e.length===0?null:(0,b.jsx)(mb,{title:`Metrics`,count:e.length,open:t,onToggle:n,children:(0,b.jsx)(`table`,{className:`metrics__table`,children:(0,b.jsx)(`tbody`,{children:e.map(e=>(0,b.jsxs)(`tr`,{children:[(0,b.jsx)(`td`,{className:`metrics__name`,children:e.metric}),(0,b.jsx)(`td`,{className:`metrics__value`,"data-mixed":e.units.length>1,"data-wrap":e.values.length>1,children:Vb(e)}),(0,b.jsx)(`td`,{className:`metrics__count`,children:Bb(e)?`${e.count} ${e.count===1?`occurrence`:`occurrences`}, to ${zb(e.latestAt)}`:e.count===1?zb(e.latestAt):`${e.count} readings, to ${zb(e.latestAt)}`})]},e.metric))})})})}function Ub(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Wb(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function Gb(e,t,n){let r=Zv((n||{}).ignore||[]),i=Kb(t),a=-1;for(;++a<i.length;)sy(e,o);function o(e,t,n){if(e.type===`text`&&typeof n==`number`)return s(e,t,n);if(r(e,n,t[t.length-1]))return oy}function s(e,t,n){let r=t[t.length-1],o=i[a][0],s=i[a][1],c=0,l=!1,u=[];o.lastIndex=0;let d=o.exec(e.value);for(;d;){let n=d.index,r={index:d.index,input:d.input,stack:[...t,e]},i=s(...d,r);if(typeof i==`string`&&(i=i.length>0?{type:`text`,value:i}:void 0),i===!1)o.lastIndex=n+1;else{if(c!==n&&f({type:`text`,value:e.value.slice(c,n)}),Array.isArray(i))for(let e of i)f(e);else i&&f(i);c=n+d[0].length,l=!0}if(!o.global)break;d=o.exec(e.value)}return l?(c<e.value.length&&f({type:`text`,value:e.value.slice(c)}),r.children.splice(n,1,...u)):u=[e],n+u.length;function f(e){let t=u[u.length-1];t&&t.type===`text`&&e.type===`text`?t.value+=e.value:u.push(e)}}}function Kb(e){if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let t=[],n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([qb(e[0]),Jb(e[1])])}return t}function qb(e){return typeof e==`string`?new RegExp(Wb(e),`g`):e}function Jb(e){return typeof e==`function`?e:function(){return e}}var Yb=`phrasing`,Xb=[`autolink`,`link`,`image`,`label`];function Zb(){return{transforms:[ax],enter:{literalAutolink:$b,literalAutolinkEmail:ex,literalAutolinkHttp:ex,literalAutolinkWww:ex},exit:{literalAutolink:ix,literalAutolinkEmail:rx,literalAutolinkHttp:tx,literalAutolinkWww:nx}}}function Qb(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:Yb,notInConstruct:Xb},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:Yb,notInConstruct:Xb},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:Yb,notInConstruct:Xb}]}}function $b(e){this.enter({type:`link`,title:null,url:``,children:[],position:void 0},e)}function ex(e){this.config.enter.autolinkProtocol.call(this,e)}function tx(e){this.config.exit.autolinkProtocol.call(this,e)}function nx(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function rx(e){this.config.exit.autolinkEmail.call(this,e)}function ix(e){this.exit(e)}function ax(e){Gb(e,[[/(?<![\da-z])(https?:\/\/|www(?=\.))([\w-]*\.[\w\-.]*)([^\t\n\r ]*)/gi,ox],[/(?<![\w+\-.@])xmpp:([\w+\-.]+)@([\w-]+(?:\.[\w-]+)+)(\/(?:[\w\-/]|\.(?=[\dA-Za-z]))*)?/g,lx],[/(?<![\w+\-.@])mailto:([\w+\-.]+)@([\w-]+(?:\.[\w-]+)+)/g,cx],[/(?<![\w+\-.]|(?:^|[^\d@A-Za-z])(?:mailto|xmpp):)([\w+\-.]+)@([\w-]+(?:\.[\w-]+)+)/g,sx]],{ignore:[`link`,`linkReference`]})}function ox(e,t,n,r,i){if(!fx(i))return!1;let a=``;if(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),Th(n.charCodeAt(0))||!ux(n))return!1;let o=dx(n+r),s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0],position:void 0}],position:void 0};return o[1]?[s,{type:`text`,value:o[1],position:void 0}]:s}function sx(e,t,n){return!/[\d\-_]$/.test(n)&&{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n,position:void 0}],position:void 0}}function cx(e,t,n){if(/[\d\-_]$/.test(n))return!1;let r=`mailto:`+t+`@`+n;return{type:`link`,title:null,url:r,children:[{type:`text`,value:r,position:void 0}],position:void 0}}function lx(e,t,n,r,i){if(/[\d\-_]$/.test(n)||r&&(!/[A-Za-z]$/.test(r)||i.input.charAt(i.index+e.length)===`@`))return!1;let a=`xmpp:`+t+`@`+n+(r||``);return{type:`link`,title:null,url:a,children:[{type:`text`,value:a,position:void 0}],position:void 0}}function ux(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[\dA-Za-z]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[\dA-Za-z]/.test(t[t.length-2])))}function dx(e){let t=e.length;for(;t>0;){let n=e.charCodeAt(t-1);if(n===33||n===34||n===38||n===39||n===41||n===44||n===46||n===58||n===59||n===60||n===62||n===63||n===93||n===125)t--;else break}if(t===e.length)return[e,void 0];let n=e.slice(t);e=e.slice(0,t);let r=n.indexOf(`)`),i=Ub(e,`(`),a=Ub(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function fx(e){let t=e.input.charCodeAt(e.index-1);return e.index===0||Eh(t)||Th(t)}Sx.peek=xx;function px(){this.buffer()}function mx(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function hx(){this.buffer()}function gx(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function _x(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gh(this.sliceSerialize(e)).toLowerCase(),n.label=t}function vx(e){this.exit(e)}function yx(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gh(this.sliceSerialize(e)).toLowerCase(),n.label=t}function bx(e){this.exit(e)}function xx(){return`[`}function Sx(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Cx(){return{enter:{gfmFootnoteCallString:px,gfmFootnoteCall:mx,gfmFootnoteDefinitionLabelString:hx,gfmFootnoteDefinition:gx},exit:{gfmFootnoteCallString:_x,gfmFootnoteCall:vx,gfmFootnoteDefinitionLabelString:yx,gfmFootnoteDefinition:bx}}}function wx(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Sx},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
28
+ `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Ex:Tx))),s(),o}}function Tx(e,t,n){return t===0?e:Ex(e,t,n)}function Ex(e,t,n){return(n?``:` `)+e}var Dx=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Mx.attention=Nx,Mx.peek=Px;function Ox(){return{canContainEols:[`delete`],enter:{strikethrough:Ax},exit:{strikethrough:jx}}}function kx(){return{handlers:{delete:Mx},unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Dx}]}}function Ax(e){this.enter({type:`delete`,children:[],position:void 0},e)}function jx(e){this.exit(e)}function Mx(e,t,n,r){let i=n.createTracker(r),a=n.stack.includes(`strikethrough`)?`~`:`~~`,o=n.enter(`strikethrough`),s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:`~`}),s+=i.move(a),o(),s}function Nx(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function Px(){return`~`}function Fx(e){return e.length}function Ix(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Fx,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=Lx(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=Rx(r[d]);else{let e=Rx(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u],r=n.fillRows===!1?Math.max(1,o[u===1?0:u].length):l;d=-1;let i=[];for(;++d<r;){let o=e[d]||``,s=``,l=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];if(n===114)s=` `.repeat(e);else if(n===99){let t=e/2;e%2?(s=` `.repeat(t+.5),l=` `.repeat(t-.5)):(s=` `.repeat(t),l=s)}else l=` `.repeat(e)}n.delimiterStart!==!1&&!d&&i.push(`|`),n.padding===!1||n.alignDelimiters===!1&&o===``||n.delimiterStart===!1&&!d||i.push(` `),n.alignDelimiters!==!1&&i.push(s),i.push(o),n.alignDelimiters!==!1&&i.push(l),n.padding!==!1&&i.push(` `),(n.delimiterEnd!==!1||d!==r-1)&&i.push(`|`)}m.push(n.delimiterEnd===!1?i.join(``).replace(/ +$/,``):i.join(``))}return m.join(`
29
+ `)}function Lx(e){return e==null?``:String(e)}function Rx(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var zx=Zv([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Bx(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),Vx);return i(),o}function Vx(e,t,n){return`>`+(n?``:` `)+e}function Hx(e,t){return Ux(e,t.inConstruct,!0)&&!Ux(e,t.notInConstruct,!1)}function Ux(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Wx(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){let e=n.unsafe[i];if(e.character===`
30
+ `&&!e.before&&!e.after&&Hx(n.stack,e))return/[\t ]/.test(r.before)?``:` `}return`\\
31
+ `}function Gx(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function Kx(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^\n\r ]/.test(e.value)||/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function qx(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Jx(e,t,n,r){let i=qx(n),a=e.value||``;if(Kx(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Yx);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(Gx(a,i)+1,3)),c=n.enter(`codeFenced`),l=i==="`"?`GraveAccent`:`Tilde`,u=o.move(s);if(e.lang){let t=n.enter(`codeFencedLang${l}`);u+=o.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${l}`);u+=o.move(` `),u+=o.move(n.safe(e.meta,{before:u,after:`
32
32
  `,encode:["`"],...o.current()})),t()}return u+=o.move(`
33
33
  `),a&&(u+=o.move(a+`
34
- `)),u+=o.move(s),c(),u}function Jx(e,t,n){return(n?``:` `)+e}function Yx(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Xx(e,t,n,r){let i=Yx(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
35
- `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function Zx(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Qx(e){let t=e.codePointAt(0);return t===void 0?``:String.fromCodePoint(t)}function $x(e){let t=e.codePointAt(e.length-2);return t!==void 0&&t>65535?e.slice(-2):e.slice(-1)}function eS(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function tS(e,t,n){let r=Rh(e),i=Rh(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function nS(e){if(e.charCodeAt(0)!==60)return;let t=e.charCodeAt(1);if(t===33){let t=e.charCodeAt(2);return t===45?2:t===91?5:_h(t)?4:void 0}if(t===63)return 3;let n=t===47,r=n?2:1,i=r,a=e.charCodeAt(i);if(!_h(a))return;for(;a===45||vh(a);)a=e.charCodeAt(++i);let o=e.slice(r,i).toLowerCase();return!n&&a!==47&&Lg.includes(o)?1:Ig.includes(o)?6:7}var rS=new Map([[`*`,!1],[`_`,!0]]);function iS(e,t,n){let r=new Set;for(let i of e){let e=n.get(i);if(e&&i.attention&&t.some(e=>e.attention===i.attention))for(let t of e.tokens)r.add(t.attention)}let i=[];for(let t of e)t.attention&&r.delete(t.attention)&&i.push(t.attention);return i.reverse(),i}function aS(e,t,n){let r=[],i=new Map,a=new Map,o=0;for(;o<e.length;){if(!e[o].attention){o++;continue}let s=e[o].value.charAt(0),c=rS.get(s),l=o+1;for(;l<e.length&&e[l].attention&&e[l].value.charAt(0)===s;)l++;let u=o?e[o-1].value:t,d=Rh(u.charCodeAt(u.length-1)),f=Rh((l<e.length?e[l].value:n).charCodeAt(0)),p=!f||f===2&&!!d,m=!d||d===2&&!!f,h={tokens:e.slice(o,l),markers:[],start:0,end:0,open:c?p&&(!!d||!m):p,close:c?m&&(!!f||!p):m,split:c!==void 0};for(let e of h.tokens){i.set(e,[...h.tokens]),a.set(e,h);let t=e.value.length;for(;t--;)h.markers.push(e)}h.end=h.markers.length,r.push(h),o=l}for(cS(r,i),o=-1;++o<e.length;){let t=i.get(e[o]);if(t)return{attention:iS(e,t,a),index:o}}}function oS(e,t){let n=e[t?0:e.length-1];if(!n||n.attention)return;let r=t?Qx(n.value):$x(n.value),i=eS(r.codePointAt(0));if(t)n.value=i+n.value.slice(r.length);else{let e=n.value.slice(0,n.value.length-r.length),t=0;for(;e.charCodeAt(e.length-1-t)===92;)t++;t%2&&(e+=`\\`),n.value=e+i}}function sS(e,t,n,r,i){for(let a of n.attention){let o=t.get(a)||a.sequences[0];for(let s of a.sequences){if(s===o)continue;let c=new Map(t);c.set(a,s);let l=mS(e,c,r,i),u=aS(l,r,i);if(!u||u.index>n.index)return{chosen:c,mistake:u,tokens:l}}}}function cS(e,t){let n=new Map;for(let r of e){let e=r.tokens[0].value.charAt(0),i=n.get(e);i||(i=[],n.set(e,i));let a=r.close?i.length:0;for(;a--&&r.start<r.end;){let e=i[a],n=e.end-e.start,o=r.end-r.start;if(r.split?(e.close||r.open)&&o%3&&!((n+o)%3):n!==e.markers.length||n!==o)continue;let s=r.split?n>1&&o>1?2:1:o,c=e.markers.slice(e.end-s,e.end),l=r.markers.slice(r.start,r.start+s),u=c[0],d=l[0];if(u===c[s-1]&&u.value.length===s&&d===l[s-1]&&d.value.length===s&&u.attention===d.attention)t.delete(u),t.delete(d);else{let e=[...new Set([...c,...l])];for(let n of e){let r=t.get(n);r&&r.push(...e)}}e.end-=s,r.start+=s,e.start===e.end&&i.splice(a,1),a=i.length}r.open&&r.start<r.end&&i.push(r)}}function lS(e,t,n){if(t.length===0)throw Error("Cannot serialize `"+e+"` as attention without markers, expected one or more markers");if(n.length===0)throw Error("Cannot serialize `"+e+"` as attention without sizes, expected one or more sizes");for(let t of n)if(!Number.isSafeInteger(t)||t<1)throw Error("Cannot serialize `"+e+"` as attention with `"+t+"` as size, expected positive integer");let r=[];for(let i of t){if(i.length!==1)throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected a single ascii character");if(!Ch(i.charCodeAt(0)))throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected ascii punctuation");for(let e of n)r.push(i.repeat(e))}return r}function uS(e,t,n){let r=t.indexStack,i=e.children||[],a=[],o=-1,s=n.before;r.push(-1);let c=t.createTracker(n);for(;++o<i.length;){let l=i[o],u;if(r[r.length-1]=o,o+1<i.length){let n=t.handle.handlers[i[o+1].type];n&&n.peek&&(n=n.peek),u=n?Qx(n(i[o+1],e,t,{before:``,after:``,...c.current()})):``}else u=n.after;let d=a[a.length-1];typeof d==`string`&&(s===`\r`||s===`
36
- `)&&l.type===`html`&&nS(l.value)!==7&&(a[a.length-1]=d.replace(/(\r?\n|\r)$/,` `),s=` `,c=t.createTracker(n),c.move(hS(a,n.before,n.after)));let f=t.handle.handlers[l.type];if(f&&f.attention){let e=dS(l,f.attention,t,c);if(!e)continue;a.push(e),s=$x(e.sequences[0])}else{let n=t.handle(l,e,t,{...c.current(),after:u,before:s});if(!n)continue;c.move(n),a.push(n),s=$x(n)}}return r.pop(),a}function dS(e,t,n,r){let{construct:i,markers:a,sizes:o}=t(e,n),s=lS(e.type,a,o),c=s[0],l=n.enter(i),u=n.createTracker(r.current());u.move(c);let d=uS(e,n,{...u.current(),before:c,after:c});if(l(),d.length!==0)return r.move(c),r.move(hS(d,c,c)),r.move(c),{children:d,sequences:s}}function fS(e,t,n,r){let i=mS(e,t,n,r),a=aS(i,n,r);for(;a;){let o=sS(e,t,a,n,r);if(!o)return;t=o.chosen,i=o.tokens,a=o.mistake}return i}function pS(e,t,n,r){let i=n,a=-1;for(;++a<e.length;){let o=e[a];if(typeof o==`string`){i=``;continue}let s=a===e.length-1?r:``,c=o.sequences.find(function(t){let r=t.charAt(0);return r!==i.charAt(0)&&r!==s.charAt(0)||e.length===1&&rS.has(r)&&t.length>n.length})||o.sequences[0];c!==o.sequences[0]&&t.set(o,c),pS(o.children,t,c,c),i=c}}function mS(e,t,n,r){let i=[],a,o=$x(n),s=-1;for(;++s<e.length;){let n=e[s];if(typeof n==`string`){let e={value:n,attention:void 0};a&&a===Qx(n)&&oS([e],!0),a=void 0,i.push(e),e.value&&(o=$x(e.value));continue}let c=t.get(n)||n.sequences[0],l=c.charAt(0),u=e[s+1],d=o,f=Qx(u===void 0?r:typeof u==`string`?u:t.get(u)||u.sequences[0]),p=mS(n.children,t,c,c),m=p[0].value,h=tS(d.charCodeAt(d.length-1),m.charCodeAt(0),l);h.inside&&oS(p,!0);let g=$x(p[p.length-1].value),_=tS(f.charCodeAt(0),g.charCodeAt(g.length-1),l);_.inside&&oS(p,!1),h.outside&&d!==`
37
- `&&d!==`\r`&&oS(i,!1),_.outside&&(a=f),i.push({value:c,attention:n},...p,{value:c,attention:n}),o=c.charAt(c.length-1)}return i}function hS(e,t,n){let r=new Map;pS(e,r,t,n);let i=(r.size>0?fS(e,r,t,n):void 0)||fS(e,new Map,t,n)||mS(e,new Map,t,n),a=``;for(let e of i)a+=e.value;return a}gS.attention=_S,gS.peek=vS;function gS(e,t,n,r){let i=n.enter(`phrasing`),a=dS(e,_S,n,n.createTracker(r)),o=a?hS([a],r.before,r.after):``;return i(),o}function _S(e,t){return{construct:`emphasis`,markers:Zx(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[1]}}function vS(e,t,n){return n.options.emphasis||`*`}function yS(e,t){let n=!1;return ly(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&rh(e)&&(t.options.setext||n))}function bS(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(yS(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
34
+ `)),u+=o.move(s),c(),u}function Yx(e,t,n){return(n?``:` `)+e}function Xx(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Zx(e,t,n,r){let i=Xx(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
35
+ `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function Qx(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function $x(e){let t=e.codePointAt(0);return t===void 0?``:String.fromCodePoint(t)}function eS(e){let t=e.codePointAt(e.length-2);return t!==void 0&&t>65535?e.slice(-2):e.slice(-1)}function tS(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function nS(e,t,n){let r=Rh(e),i=Rh(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function rS(e){if(e.charCodeAt(0)!==60)return;let t=e.charCodeAt(1);if(t===33){let t=e.charCodeAt(2);return t===45?2:t===91?5:_h(t)?4:void 0}if(t===63)return 3;let n=t===47,r=n?2:1,i=r,a=e.charCodeAt(i);if(!_h(a))return;for(;a===45||vh(a);)a=e.charCodeAt(++i);let o=e.slice(r,i).toLowerCase();return!n&&a!==47&&Lg.includes(o)?1:Ig.includes(o)?6:7}var iS=new Map([[`*`,!1],[`_`,!0]]);function aS(e,t,n){let r=new Set;for(let i of e){let e=n.get(i);if(e&&i.attention&&t.some(e=>e.attention===i.attention))for(let t of e.tokens)r.add(t.attention)}let i=[];for(let t of e)t.attention&&r.delete(t.attention)&&i.push(t.attention);return i.reverse(),i}function oS(e,t,n){let r=[],i=new Map,a=new Map,o=0;for(;o<e.length;){if(!e[o].attention){o++;continue}let s=e[o].value.charAt(0),c=iS.get(s),l=o+1;for(;l<e.length&&e[l].attention&&e[l].value.charAt(0)===s;)l++;let u=o?e[o-1].value:t,d=Rh(u.charCodeAt(u.length-1)),f=Rh((l<e.length?e[l].value:n).charCodeAt(0)),p=!f||f===2&&!!d,m=!d||d===2&&!!f,h={tokens:e.slice(o,l),markers:[],start:0,end:0,open:c?p&&(!!d||!m):p,close:c?m&&(!!f||!p):m,split:c!==void 0};for(let e of h.tokens){i.set(e,[...h.tokens]),a.set(e,h);let t=e.value.length;for(;t--;)h.markers.push(e)}h.end=h.markers.length,r.push(h),o=l}for(lS(r,i),o=-1;++o<e.length;){let t=i.get(e[o]);if(t)return{attention:aS(e,t,a),index:o}}}function sS(e,t){let n=e[t?0:e.length-1];if(!n||n.attention)return;let r=t?$x(n.value):eS(n.value),i=tS(r.codePointAt(0));if(t)n.value=i+n.value.slice(r.length);else{let e=n.value.slice(0,n.value.length-r.length),t=0;for(;e.charCodeAt(e.length-1-t)===92;)t++;t%2&&(e+=`\\`),n.value=e+i}}function cS(e,t,n,r,i){for(let a of n.attention){let o=t.get(a)||a.sequences[0];for(let s of a.sequences){if(s===o)continue;let c=new Map(t);c.set(a,s);let l=hS(e,c,r,i),u=oS(l,r,i);if(!u||u.index>n.index)return{chosen:c,mistake:u,tokens:l}}}}function lS(e,t){let n=new Map;for(let r of e){let e=r.tokens[0].value.charAt(0),i=n.get(e);i||(i=[],n.set(e,i));let a=r.close?i.length:0;for(;a--&&r.start<r.end;){let e=i[a],n=e.end-e.start,o=r.end-r.start;if(r.split?(e.close||r.open)&&o%3&&!((n+o)%3):n!==e.markers.length||n!==o)continue;let s=r.split?n>1&&o>1?2:1:o,c=e.markers.slice(e.end-s,e.end),l=r.markers.slice(r.start,r.start+s),u=c[0],d=l[0];if(u===c[s-1]&&u.value.length===s&&d===l[s-1]&&d.value.length===s&&u.attention===d.attention)t.delete(u),t.delete(d);else{let e=[...new Set([...c,...l])];for(let n of e){let r=t.get(n);r&&r.push(...e)}}e.end-=s,r.start+=s,e.start===e.end&&i.splice(a,1),a=i.length}r.open&&r.start<r.end&&i.push(r)}}function uS(e,t,n){if(t.length===0)throw Error("Cannot serialize `"+e+"` as attention without markers, expected one or more markers");if(n.length===0)throw Error("Cannot serialize `"+e+"` as attention without sizes, expected one or more sizes");for(let t of n)if(!Number.isSafeInteger(t)||t<1)throw Error("Cannot serialize `"+e+"` as attention with `"+t+"` as size, expected positive integer");let r=[];for(let i of t){if(i.length!==1)throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected a single ascii character");if(!Ch(i.charCodeAt(0)))throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected ascii punctuation");for(let e of n)r.push(i.repeat(e))}return r}function dS(e,t,n){let r=t.indexStack,i=e.children||[],a=[],o=-1,s=n.before;r.push(-1);let c=t.createTracker(n);for(;++o<i.length;){let l=i[o],u;if(r[r.length-1]=o,o+1<i.length){let n=t.handle.handlers[i[o+1].type];n&&n.peek&&(n=n.peek),u=n?$x(n(i[o+1],e,t,{before:``,after:``,...c.current()})):``}else u=n.after;let d=a[a.length-1];typeof d==`string`&&(s===`\r`||s===`
36
+ `)&&l.type===`html`&&rS(l.value)!==7&&(a[a.length-1]=d.replace(/(\r?\n|\r)$/,` `),s=` `,c=t.createTracker(n),c.move(gS(a,n.before,n.after)));let f=t.handle.handlers[l.type];if(f&&f.attention){let e=fS(l,f.attention,t,c);if(!e)continue;a.push(e),s=eS(e.sequences[0])}else{let n=t.handle(l,e,t,{...c.current(),after:u,before:s});if(!n)continue;c.move(n),a.push(n),s=eS(n)}}return r.pop(),a}function fS(e,t,n,r){let{construct:i,markers:a,sizes:o}=t(e,n),s=uS(e.type,a,o),c=s[0],l=n.enter(i),u=n.createTracker(r.current());u.move(c);let d=dS(e,n,{...u.current(),before:c,after:c});if(l(),d.length!==0)return r.move(c),r.move(gS(d,c,c)),r.move(c),{children:d,sequences:s}}function pS(e,t,n,r){let i=hS(e,t,n,r),a=oS(i,n,r);for(;a;){let o=cS(e,t,a,n,r);if(!o)return;t=o.chosen,i=o.tokens,a=o.mistake}return i}function mS(e,t,n,r){let i=n,a=-1;for(;++a<e.length;){let o=e[a];if(typeof o==`string`){i=``;continue}let s=a===e.length-1?r:``,c=o.sequences.find(function(t){let r=t.charAt(0);return r!==i.charAt(0)&&r!==s.charAt(0)||e.length===1&&iS.has(r)&&t.length>n.length})||o.sequences[0];c!==o.sequences[0]&&t.set(o,c),mS(o.children,t,c,c),i=c}}function hS(e,t,n,r){let i=[],a,o=eS(n),s=-1;for(;++s<e.length;){let n=e[s];if(typeof n==`string`){let e={value:n,attention:void 0};a&&a===$x(n)&&sS([e],!0),a=void 0,i.push(e),e.value&&(o=eS(e.value));continue}let c=t.get(n)||n.sequences[0],l=c.charAt(0),u=e[s+1],d=o,f=$x(u===void 0?r:typeof u==`string`?u:t.get(u)||u.sequences[0]),p=hS(n.children,t,c,c),m=p[0].value,h=nS(d.charCodeAt(d.length-1),m.charCodeAt(0),l);h.inside&&sS(p,!0);let g=eS(p[p.length-1].value),_=nS(f.charCodeAt(0),g.charCodeAt(g.length-1),l);_.inside&&sS(p,!1),h.outside&&d!==`
37
+ `&&d!==`\r`&&sS(i,!1),_.outside&&(a=f),i.push({value:c,attention:n},...p,{value:c,attention:n}),o=c.charAt(c.length-1)}return i}function gS(e,t,n){let r=new Map;mS(e,r,t,n);let i=(r.size>0?pS(e,r,t,n):void 0)||pS(e,new Map,t,n)||hS(e,new Map,t,n),a=``;for(let e of i)a+=e.value;return a}_S.attention=vS,_S.peek=yS;function _S(e,t,n,r){let i=n.enter(`phrasing`),a=fS(e,vS,n,n.createTracker(r)),o=a?gS([a],r.before,r.after):``;return i(),o}function vS(e,t){return{construct:`emphasis`,markers:Qx(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[1]}}function yS(e,t,n){return n.options.emphasis||`*`}function bS(e,t){let n=!1;return ly(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&rh(e)&&(t.options.setext||n))}function xS(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(bS(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
38
38
  `,after:`
39
39
  `});return r(),t(),o+`
40
40
  `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
41
41
  `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
42
- `,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=eS(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}xS.peek=SS;function xS(e){return e.value||``}function SS(){return`<`}CS.peek=wS;function CS(e,t,n,r){let i=Yx(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function wS(){return`!`}TS.peek=ES;function TS(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function ES(){return`!`}DS.peek=OS;function DS(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function OS(){return"`"}function kS(e,t){let n=rh(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][+\-.a-z]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}AS.peek=jS;function AS(e,t,n,r){let i=Yx(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(kS(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`),u=n.containerPhrasing(e,{before:l,after:`](`,...o.current()});l+=o.move(u),c(),l+=o.move(`](`);let d=/[\0- \u007F]/.test(e.url),f=r.before.charAt(r.before.length-1),p=e.title||void 0;if(!p&&!d&&(f===`
43
- `||f===`\r`)){let e=0;for(;e<u.length&&u.charCodeAt(e)!==93;)e+=u.charCodeAt(e)===92?2:1;u.charCodeAt(e+1)===58&&(p=``)}return!e.url&&typeof p==`string`||d?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:typeof p==`string`?` `:`)`,...o.current()}))),c(),typeof p==`string`&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(p,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function jS(e,t,n){return kS(e,n)?`<`:`[`}MS.peek=NS;function MS(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function NS(){return`[`}function PS(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function FS(e){let t=PS(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function IS(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function LS(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function RS(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?IS(n):PS(n),s=e.ordered?o===`.`?`)`:`.`:FS(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if(o!==`*`&&o!==`-`||!t||t.children&&t.children[0]||n.stack[n.stack.length-1]!==`list`||n.stack[n.stack.length-2]!==`listItem`||n.stack[n.stack.length-3]!==`list`||n.stack[n.stack.length-4]!==`listItem`||n.indexStack[n.indexStack.length-1]!==0||n.indexStack[n.indexStack.length-2]!==0||n.indexStack[n.indexStack.length-3]!==0||(c=!0),LS(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function zS(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function BS(e,t,n,r){let i=zS(n),a=n.bulletCurrent||PS(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function VS(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function HS(e,t,n,r){if(!e.children.some(function(e){return Rx(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function US(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}WS.attention=GS,WS.peek=KS;function WS(e,t,n,r){let i=n.enter(`phrasing`),a=dS(e,GS,n,n.createTracker(r)),o=a?hS([a],r.before,r.after):``;return i(),o}function GS(e,t){return{construct:`strong`,markers:US(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function KS(e,t,n){return n.options.strong||`*`}function qS(e,t,n,r){let i=t?t.children:[],a=n.indexStack[n.indexStack.length-1];return n.safe(e.value,{...r,afterNode:i[a+1],beforeNode:i[a-1]})}function JS(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function YS(e,t,n){let r=(LS(n)+(n.options.ruleSpaces?` `:``)).repeat(JS(n));return n.options.ruleSpaces?r.slice(0,-1):r}var XS={blockquote:zx,break:Ux,code:qx,definition:Xx,emphasis:gS,hardBreak:Ux,heading:bS,html:xS,image:CS,imageReference:TS,inlineCode:DS,link:AS,linkReference:MS,list:RS,listItem:BS,paragraph:VS,root:HS,strong:WS,text:qS,thematicBreak:YS};function ZS(){return{enter:{table:QS,tableData:nC,tableHeader:nC,tableRow:eC},exit:{codeText:rC,table:$S,tableData:tC,tableHeader:tC,tableRow:tC}}}function QS(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[],position:void 0},e),this.data.inTable=!0}function $S(e){this.exit(e),this.data.inTable=void 0}function eC(e){this.enter({type:`tableRow`,children:[],position:void 0},e)}function tC(e){this.exit(e)}function nC(e){this.enter({type:`tableCell`,children:[],position:void 0},e)}function rC(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,iC));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function iC(e,t){return t===`|`?t:e}function aC(e){let{tableCellPadding:t,tablePipeAlign:n,stringLength:r}=e||{},i=t?` `:`|`;return{handlers:{inlineCode:d,table:a,tableCell:s,tableRow:o},join:[oC],unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
42
+ `,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=tS(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}SS.peek=CS;function SS(e){return e.value||``}function CS(){return`<`}wS.peek=TS;function wS(e,t,n,r){let i=Xx(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function TS(){return`!`}ES.peek=DS;function ES(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function DS(){return`!`}OS.peek=kS;function OS(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function kS(){return"`"}function AS(e,t){let n=rh(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][+\-.a-z]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}jS.peek=MS;function jS(e,t,n,r){let i=Xx(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(AS(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`),u=n.containerPhrasing(e,{before:l,after:`](`,...o.current()});l+=o.move(u),c(),l+=o.move(`](`);let d=/[\0- \u007F]/.test(e.url),f=r.before.charAt(r.before.length-1),p=e.title||void 0;if(!p&&!d&&(f===`
43
+ `||f===`\r`)){let e=0;for(;e<u.length&&u.charCodeAt(e)!==93;)e+=u.charCodeAt(e)===92?2:1;u.charCodeAt(e+1)===58&&(p=``)}return!e.url&&typeof p==`string`||d?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:typeof p==`string`?` `:`)`,...o.current()}))),c(),typeof p==`string`&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(p,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function MS(e,t,n){return AS(e,n)?`<`:`[`}NS.peek=PS;function NS(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function PS(){return`[`}function FS(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function IS(e){let t=FS(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function LS(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function RS(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function zS(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?LS(n):FS(n),s=e.ordered?o===`.`?`)`:`.`:IS(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if(o!==`*`&&o!==`-`||!t||t.children&&t.children[0]||n.stack[n.stack.length-1]!==`list`||n.stack[n.stack.length-2]!==`listItem`||n.stack[n.stack.length-3]!==`list`||n.stack[n.stack.length-4]!==`listItem`||n.indexStack[n.indexStack.length-1]!==0||n.indexStack[n.indexStack.length-2]!==0||n.indexStack[n.indexStack.length-3]!==0||(c=!0),RS(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function BS(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function VS(e,t,n,r){let i=BS(n),a=n.bulletCurrent||FS(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function HS(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function US(e,t,n,r){if(!e.children.some(function(e){return zx(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function WS(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}GS.attention=KS,GS.peek=qS;function GS(e,t,n,r){let i=n.enter(`phrasing`),a=fS(e,KS,n,n.createTracker(r)),o=a?gS([a],r.before,r.after):``;return i(),o}function KS(e,t){return{construct:`strong`,markers:WS(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function qS(e,t,n){return n.options.strong||`*`}function JS(e,t,n,r){let i=t?t.children:[],a=n.indexStack[n.indexStack.length-1];return n.safe(e.value,{...r,afterNode:i[a+1],beforeNode:i[a-1]})}function YS(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function XS(e,t,n){let r=(RS(n)+(n.options.ruleSpaces?` `:``)).repeat(YS(n));return n.options.ruleSpaces?r.slice(0,-1):r}var ZS={blockquote:Bx,break:Wx,code:Jx,definition:Zx,emphasis:_S,hardBreak:Wx,heading:xS,html:SS,image:wS,imageReference:ES,inlineCode:OS,link:jS,linkReference:NS,list:zS,listItem:VS,paragraph:HS,root:US,strong:GS,text:JS,thematicBreak:XS};function QS(){return{enter:{table:$S,tableData:rC,tableHeader:rC,tableRow:tC},exit:{codeText:iC,table:eC,tableData:nC,tableHeader:nC,tableRow:nC}}}function $S(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[],position:void 0},e),this.data.inTable=!0}function eC(e){this.exit(e),this.data.inTable=void 0}function tC(e){this.enter({type:`tableRow`,children:[],position:void 0},e)}function nC(e){this.exit(e)}function rC(e){this.enter({type:`tableCell`,children:[],position:void 0},e)}function iC(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,aC));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function aC(e,t){return t===`|`?t:e}function oC(e){let{tableCellPadding:t,tablePipeAlign:n,stringLength:r}=e||{},i=t?` `:`|`;return{handlers:{inlineCode:d,table:a,tableCell:s,tableRow:o},join:[sC],unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
44
44
  `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}]};function a(e,t,n,r){let i=l(e,n,r),a=i[0];if(a){let t=e.align?e.align.length:0,n=-1;if(!t)for(;++n<i.length;)i[n].length>t&&(t=i[n].length);for(;a.length<t;)a.push(``)}return c(i,e.align)}function o(e,t,n,r){let i=c([u(e,n,r)]);return i.slice(0,i.indexOf(`
45
- `))}function s(e,t,n,r){let a=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:i,after:i});return o(),a(),s}function c(e,i){return Fx(e,{align:i,alignDelimiters:n,fillRows:!1,padding:t,stringLength:r})}function l(e,t,n){let{children:r}=e,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=u(r[i],t,n);return o(),a}function u(e,t,n){let{children:r}=e,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=s(r[i],e,t,n);return o(),a}function d(e,t,n){let r=XS.inlineCode(e,t,n);if(!n.stack.includes(`tableCell`))return r;let i=[],a=0,o=r.indexOf(`|`);for(;o!==-1;){let e=o;for(;e>a&&r.charCodeAt(e-1)===92;)e--;i.push(r.slice(a,o)),(o-e)%2==0&&i.push(`\\`),a=o,o=r.indexOf(`|`,o+1)}return i.push(r.slice(a)),i.join(``)}}function oC(e,t,n,r){if(e.type===`table`&&n.type===`listItem`&&n.spread===!1&&(t.type===`definition`||t.type===`heading`&&sC(t,r)||t.type===`paragraph`||t.type===`table`))return 1}function sC(e,t){let n=!1;return ly(e,function(e){if(e.type===`break`||`value`in e&&/\r?\n|\r/.test(e.value))return n=!0,!1}),!!((!e.depth||e.depth<3)&&rh(e)&&(t.options.setext||n))}function cC(){return{exit:{taskListCheckValueChecked:uC,taskListCheckValueUnchecked:uC,paragraph:dC}}}function lC(){return{handlers:{paragraph:fC},join:[pC]}}function uC(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function dC(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start={...n.position.start}))}}this.exit(e)}function fC(e,t,n,r){if(!t||t.type!==`listItem`||mC(t)!==e)return XS.paragraph(e,t,n,r);let i=`[`+(t.checked?`x`:` `)+`] `,a=n.createTracker(r);return a.move(i),i+XS.paragraph(e.children.length>0?e:{type:`paragraph`,children:[{type:`text`,value:` `}]},t,n,{...r,...a.current()})}function pC(e,t,n){if(e.type!==`definition`||n.type!==`listItem`)return;let r=mC(n);if(r&&n.children.indexOf(e)<n.children.indexOf(r))return 0}function mC(e){if(typeof e.checked==`boolean`)for(let t of e.children){if(t.type===`paragraph`)return t;if(t.type!==`definition`)return}}function hC(){return[Xb(),Sx(),Dx(),ZS(),cC()]}function gC(e){return{extensions:[Zb(),Cx(e),Ox(),aC(e),lC()]}}var _C={tokenize:jC,partial:!0},vC={tokenize:MC,partial:!0},yC={tokenize:NC,partial:!0},bC={tokenize:PC,partial:!0},xC={tokenize:FC,partial:!0},SC={name:`wwwAutolink`,tokenize:kC,previous:IC},CC={name:`protocolAutolink`,tokenize:AC,previous:LC},wC={name:`emailAutolink`,tokenize:OC,previous:RC},TC={};function EC(){return{text:TC}}for(var DC=48;DC<123;)TC[DC]=wC,DC++,DC===58?DC=65:DC===91&&(DC=97);TC[43]=wC,TC[45]=wC,TC[46]=wC,TC[95]=wC,TC[72]=[wC,CC],TC[104]=[wC,CC],TC[87]=[wC,SC],TC[119]=[wC,SC];function OC(e,t,n){let r=this,i,a;return o;function o(t){return!zC(t)||!RC.call(r,r.previous)||BC(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return zC(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(xC,u,l)(t):t===45||t===95||vh(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&_h(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function kC(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!IC.call(r,r.previous)||BC(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(_C,e.attempt(vC,e.attempt(yC,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function AC(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&LC.call(r,r.previous)&&!BC(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(_h(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||bh(t)||wh(t)||Eh(t)||Th(t)?n(t):e.attempt(vC,e.attempt(yC,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function jC(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function MC(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(bC,c,s)(t):t===null||wh(t)||Eh(t)||t!==45&&Th(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function NC(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(bC,t,a)(o):o===null||wh(o)||Eh(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function PC(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||wh(o)||Eh(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||wh(e)||Eh(e)?t(e):r(e)}function a(e){return _h(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):_h(t)?(e.consume(t),o):n(t)}}function FC(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return vh(e)?n(e):t(e)}}function IC(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||wh(e)}function LC(e){return!_h(e)}function RC(e){return!(e===47||zC(e))}function zC(e){return e===43||e===45||e===46||e===95||vh(e)}function BC(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var VC={tokenize:YC,partial:!0};function HC(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:KC,continuation:{tokenize:qC},exit:JC}},text:{91:{name:`gfmFootnoteCall`,tokenize:GC},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:UC,resolveTo:WC}}}}function UC(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=gh(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function WC(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function GC(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||wh(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(gh(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return wh(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function KC(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||wh(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=gh(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return wh(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),Y(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function qC(e,t,n){return e.check(Kh,t,e.attempt(VC,t,n))}function JC(e){e.exit(`gfmFootnoteDefinition`)}function YC(e,t,n){let r=this;return Y(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function XC(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&lh(o,o.length,0,zh(s,e.slice(r+1,n),t)),lh(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),lh(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Rh(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Rh(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var ZC=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){QC(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function QC(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function $C(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function ew(){return{flow:{null:{name:`table`,tokenize:tw,resolveAll:nw}}}}function tw(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):q(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):J(t)?Y(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||wh(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,J(t)?Y(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return J(t)?Y(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||q(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return J(t)?Y(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||q(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||q(n)?(e.exit(`tableRow`),t(n)):J(n)?Y(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||wh(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function nw(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new ZC;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(iw(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=rw(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=rw(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=rw(f,t,o,i,n,d)):(o[0]=o[1],d=rw(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&iw(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=$C(t.events,n))}return e}function rw(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},aw(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=aw(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=aw(t.events,n[2]),a=aw(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},aw(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function iw(e,t,n,r,i){let a=[],o=aw(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function aw(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var ow={name:`tasklistCheck`,tokenize:cw};function sw(){return{text:{91:ow}}}function cw(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return wh(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return q(r)?t(r):J(r)?e.check({tokenize:lw},t,n)(r):n(r)}}function lw(e,t,n){return Y(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function uw(e){return fh([EC(),HC(),XC(e),ew(),sw()])}var dw={};function fw(e){let t=this,n=e||dw,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(uw(n)),a.push(hC()),o.push(gC(n))}var pw=(0,_.createContext)({}),mw=()=>(0,_.useContext)(pw),hw={done:{icon:`✓`,label:`done`,colour:`#34d399`,strike:!0},review:{icon:`◐`,label:`review`,colour:`#a884f3`,strike:!1},"in-progress":{icon:`●`,label:`in-progress`,colour:`#4f9dff`,strike:!1},"to-do":{icon:`○`,label:`to-do`,colour:`#fbbf24`,strike:!1},planning:{icon:`○`,label:`planning`,colour:`#e8590c`,strike:!1}};Object.keys(hw);var gw=/^[A-Z][A-Z0-9]*-[1-9]\d*(\.[1-9]\d*)*$/,_w=e=>gw.test(e);function vw(e){let t=e.indexOf(`:`);if(t<=0)return null;let n=e.slice(t+1);return _w(n)?{project:e.slice(0,t),ref:n}:null}function yw(e){let t=[];for(let n of e)t.includes(n.area)||t.push(n.area);return t}var bw=o(((e,t)=>{var n=class{_isDirected=!0;_isMultigraph=!1;_isCompound=!1;_label;_defaultNodeLabelFn=()=>void 0;_defaultEdgeLabelFn=()=>void 0;_nodes={};_in={};_preds={};_out={};_sucs={};_edgeObjs={};_edgeLabels={};_nodeCount=0;_edgeCount=0;_parent;_children;constructor(e){e&&(this._isDirected=!Object.hasOwn(e,`directed`)||e.directed,this._isMultigraph=Object.hasOwn(e,`multigraph`)?e.multigraph:!1,this._isCompound=Object.hasOwn(e,`compound`)?e.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[`\0`]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return this._defaultNodeLabelFn=e,typeof e!=`function`&&(this._defaultNodeLabelFn=()=>e),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var e=this;return this.nodes().filter(t=>Object.keys(e._in[t]).length===0)}sinks(){var e=this;return this.nodes().filter(t=>Object.keys(e._out[t]).length===0)}setNodes(e,t){var n=arguments,r=this;return e.forEach(function(e){n.length>1?r.setNode(e,t):r.setNode(e)}),this}setNode(e,t){return Object.hasOwn(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=`\0`,this._children[e]={},this._children[`\0`][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.hasOwn(this._nodes,e)}removeNode(e){var t=this;if(Object.hasOwn(this._nodes,e)){var n=e=>t.removeEdge(t._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(function(e){t.setParent(e)}),delete this._children[e]),Object.keys(this._in[e]).forEach(n),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(t===void 0)t=`\0`;else{t+=``;for(var n=t;n!==void 0;n=this.parent(n))if(n===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==`\0`)return t}}children(e=`\0`){if(this._isCompound){var t=this._children[e];if(t)return Object.keys(t)}else if(e===`\0`)return this.nodes();else if(this.hasNode(e))return[]}predecessors(e){var t=this._preds[e];if(t)return Object.keys(t)}successors(e){var t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){var t=this.predecessors(e);if(t){let r=new Set(t);for(var n of this.successors(e))r.add(n);return Array.from(r.values())}}isLeaf(e){return(this.isDirected()?this.successors(e):this.neighbors(e)).length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;Object.entries(this._nodes).forEach(function([n,r]){e(n)&&t.setNode(n,r)}),Object.values(this._edgeObjs).forEach(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});var r={};function i(e){var a=n.parent(e);return a===void 0||t.hasNode(a)?(r[e]=a,a):a in r?r[a]:i(a)}return this._isCompound&&t.nodes().forEach(e=>t.setParent(e,i(e))),t}setDefaultEdgeLabel(e){return this._defaultEdgeLabelFn=e,typeof e!=`function`&&(this._defaultEdgeLabelFn=()=>e),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){var n=this,r=arguments;return e.reduce(function(e,i){return r.length>1?n.setEdge(e,i,t):n.setEdge(e,i),i}),this}setEdge(){var e,t,n,i,s=!1,c=arguments[0];typeof c==`object`&&c&&`v`in c?(e=c.v,t=c.w,n=c.name,arguments.length===2&&(i=arguments[1],s=!0)):(e=c,t=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],s=!0)),e=``+e,t=``+t,n!==void 0&&(n=``+n);var l=a(this._isDirected,e,t,n);if(Object.hasOwn(this._edgeLabels,l))return s&&(this._edgeLabels[l]=i),this;if(n!==void 0&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(e),this.setNode(t),this._edgeLabels[l]=s?i:this._defaultEdgeLabelFn(e,t,n);var u=o(this._isDirected,e,t,n);return e=u.v,t=u.w,Object.freeze(u),this._edgeObjs[l]=u,r(this._preds[t],e),r(this._sucs[e],t),this._in[t][l]=u,this._out[e][l]=u,this._edgeCount++,this}edge(e,t,n){var r=arguments.length===1?s(this._isDirected,arguments[0]):a(this._isDirected,e,t,n);return this._edgeLabels[r]}edgeAsObj(){let e=this.edge(...arguments);return typeof e==`object`?e:{label:e}}hasEdge(e,t,n){var r=arguments.length===1?s(this._isDirected,arguments[0]):a(this._isDirected,e,t,n);return Object.hasOwn(this._edgeLabels,r)}removeEdge(e,t,n){var r=arguments.length===1?s(this._isDirected,arguments[0]):a(this._isDirected,e,t,n),o=this._edgeObjs[r];return o&&(e=o.v,t=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],i(this._preds[t],e),i(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,t){var n=this._in[e];if(n){var r=Object.values(n);return t?r.filter(e=>e.v===t):r}}outEdges(e,t){var n=this._out[e];if(n){var r=Object.values(n);return t?r.filter(e=>e.w===t):r}}nodeEdges(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}};function r(e,t){e[t]?e[t]++:e[t]=1}function i(e,t){--e[t]||delete e[t]}function a(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}return i+``+a+``+(r===void 0?`\0`:r)}function o(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function s(e,t){return a(e,t.v,t.w,t.name)}t.exports=n})),xw=o(((e,t)=>{t.exports=`2.2.4`})),Sw=o(((e,t)=>{t.exports={Graph:bw(),version:xw()}})),Cw=o(((e,t)=>{var n=bw();t.exports={write:r,read:o};function r(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:i(e),edges:a(e)};return e.graph()!==void 0&&(t.value=structuredClone(e.graph())),t}function i(e){return e.nodes().map(function(t){var n=e.node(t),r=e.parent(t),i={v:t};return n!==void 0&&(i.value=n),r!==void 0&&(i.parent=r),i})}function a(e){return e.edges().map(function(t){var n=e.edge(t),r={v:t.v,w:t.w};return t.name!==void 0&&(r.name=t.name),n!==void 0&&(r.value=n),r})}function o(e){var t=new n(e.options).setGraph(e.value);return e.nodes.forEach(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),e.edges.forEach(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}})),ww=o(((e,t)=>{t.exports=n;function n(e){var t={},n=[],r;function i(n){Object.hasOwn(t,n)||(t[n]=!0,r.push(n),e.successors(n).forEach(i),e.predecessors(n).forEach(i))}return e.nodes().forEach(function(e){r=[],i(e),r.length&&n.push(r)}),n}})),Tw=o(((e,t)=>{t.exports=class{_arr=[];_keyIndices={};size(){return this._arr.length}keys(){return this._arr.map(function(e){return e.key})}has(e){return Object.hasOwn(this._keyIndices,e)}priority(e){var t=this._keyIndices[e];if(t!==void 0)return this._arr[t].priority}min(){if(this.size()===0)throw Error(`Queue underflow`);return this._arr[0].key}add(e,t){var n=this._keyIndices;if(e=String(e),!Object.hasOwn(n,e)){var r=this._arr,i=r.length;return n[e]=i,r.push({key:e,priority:t}),this._decrease(i),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw Error(`New priority is greater than current priority. Key: `+e+` Old: `+this._arr[n].priority+` New: `+t);this._arr[n].priority=t,this._decrease(n)}_heapify(e){var t=this._arr,n=2*e,r=n+1,i=e;n<t.length&&(i=t[n].priority<t[i].priority?n:i,r<t.length&&(i=t[r].priority<t[i].priority?r:i),i!==e&&(this._swap(e,i),this._heapify(i)))}_decrease(e){for(var t=this._arr,n=t[e].priority,r;e!==0&&(r=e>>1,!(t[r].priority<n));)this._swap(e,r),e=r}_swap(e,t){var n=this._arr,r=this._keyIndices,i=n[e],a=n[t];n[e]=a,n[t]=i,r[a.key]=e,r[i.key]=t}}})),Ew=o(((e,t)=>{var n=Tw();t.exports=i;var r=()=>1;function i(e,t,n,i){return a(e,String(t),n||r,i||function(t){return e.outEdges(t)})}function a(e,t,r,i){var a={},o=new n,s,c,l=function(e){var t=e.v===s?e.w:e.v,n=a[t],i=r(e),l=c.distance+i;if(i<0)throw Error(`dijkstra does not allow negative edge weights. Bad edge: `+e+` Weight: `+i);l<n.distance&&(n.distance=l,n.predecessor=s,o.decrease(t,l))};for(e.nodes().forEach(function(e){var n=e===t?0:1/0;a[e]={distance:n},o.add(e,n)});o.size()>0&&(s=o.removeMin(),c=a[s],c.distance!==1/0);)i(s).forEach(l);return a}})),Dw=o(((e,t)=>{var n=Ew();t.exports=r;function r(e,t,r){return e.nodes().reduce(function(i,a){return i[a]=n(e,a,t,r),i},{})}})),Ow=o(((e,t)=>{t.exports=n;function n(e){var t=0,n=[],r={},i=[];function a(o){var s=r[o]={onStack:!0,lowlink:t,index:t++};if(n.push(o),e.successors(o).forEach(function(e){Object.hasOwn(r,e)?r[e].onStack&&(s.lowlink=Math.min(s.lowlink,r[e].index)):(a(e),s.lowlink=Math.min(s.lowlink,r[e].lowlink))}),s.lowlink===s.index){var c=[],l;do l=n.pop(),r[l].onStack=!1,c.push(l);while(o!==l);i.push(c)}}return e.nodes().forEach(function(e){Object.hasOwn(r,e)||a(e)}),i}})),kw=o(((e,t)=>{var n=Ow();t.exports=r;function r(e){return n(e).filter(function(t){return t.length>1||t.length===1&&e.hasEdge(t[0],t[0])})}})),Aw=o(((e,t)=>{t.exports=r;var n=()=>1;function r(e,t,r){return i(e,t||n,r||function(t){return e.outEdges(t)})}function i(e,t,n){var r={},i=e.nodes();return i.forEach(function(e){r[e]={},r[e][e]={distance:0},i.forEach(function(t){e!==t&&(r[e][t]={distance:1/0})}),n(e).forEach(function(n){var i=n.v===e?n.w:n.v,a=t(n);r[e][i]={distance:a,predecessor:e}})}),i.forEach(function(e){var t=r[e];i.forEach(function(n){var a=r[n];i.forEach(function(n){var r=a[e],i=t[n],o=a[n],s=r.distance+i.distance;s<o.distance&&(o.distance=s,o.predecessor=i.predecessor)})})}),r}})),jw=o(((e,t)=>{function n(e){var t={},n={},i=[];function a(o){if(Object.hasOwn(n,o))throw new r;Object.hasOwn(t,o)||(n[o]=!0,t[o]=!0,e.predecessors(o).forEach(a),delete n[o],i.push(o))}if(e.sinks().forEach(a),Object.keys(t).length!==e.nodeCount())throw new r;return i}var r=class extends Error{constructor(){super(...arguments)}};t.exports=n,n.CycleException=r})),Mw=o(((e,t)=>{var n=jw();t.exports=r;function r(e){try{n(e)}catch(e){if(e instanceof n.CycleException)return!1;throw e}return!0}})),Nw=o(((e,t)=>{t.exports=n;function n(e,t,n){Array.isArray(t)||(t=[t]);var a=e.isDirected()?t=>e.successors(t):t=>e.neighbors(t),o=n===`post`?r:i,s=[],c={};return t.forEach(t=>{if(!e.hasNode(t))throw Error(`Graph does not have node: `+t);o(t,a,c,s)}),s}function r(e,t,n,r){for(var i=[[e,!1]];i.length>0;){var o=i.pop();o[1]?r.push(o[0]):Object.hasOwn(n,o[0])||(n[o[0]]=!0,i.push([o[0],!0]),a(t(o[0]),e=>i.push([e,!1])))}}function i(e,t,n,r){for(var i=[e];i.length>0;){var o=i.pop();Object.hasOwn(n,o)||(n[o]=!0,r.push(o),a(t(o),e=>i.push(e)))}}function a(e,t){for(var n=e.length;n--;)t(e[n],n,e);return e}})),Pw=o(((e,t)=>{var n=Nw();t.exports=r;function r(e,t){return n(e,t,`post`)}})),Fw=o(((e,t)=>{var n=Nw();t.exports=r;function r(e,t){return n(e,t,`pre`)}})),Iw=o(((e,t)=>{var n=bw(),r=Tw();t.exports=i;function i(e,t){var i=new n,a={},o=new r,s;function c(e){var n=e.v===s?e.w:e.v,r=o.priority(n);if(r!==void 0){var i=t(e);i<r&&(a[n]=s,o.decrease(n,i))}}if(e.nodeCount()===0)return i;e.nodes().forEach(function(e){o.add(e,1/0),i.setNode(e)}),o.decrease(e.nodes()[0],0);for(var l=!1;o.size()>0;){if(s=o.removeMin(),Object.hasOwn(a,s))i.setEdge(s,a[s]);else if(l)throw Error(`Input graph is not connected: `+e);else l=!0;e.nodeEdges(s).forEach(c)}return i}})),Lw=o(((e,t)=>{t.exports={components:ww(),dijkstra:Ew(),dijkstraAll:Dw(),findCycles:kw(),floydWarshall:Aw(),isAcyclic:Mw(),postorder:Pw(),preorder:Fw(),prim:Iw(),tarjan:Ow(),topsort:jw()}})),Rw=o(((e,t)=>{var n=Sw();t.exports={Graph:n.Graph,json:Cw(),alg:Lw(),version:n.version}})),zw=o(((e,t)=>{var n=class{constructor(){let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return r(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&r(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,n=t._prev;for(;n!==t;)e.push(JSON.stringify(n,i)),n=n._prev;return`[`+e.join(`, `)+`]`}};function r(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function i(e,t){if(e!==`_next`&&e!==`_prev`)return t}t.exports=n})),Bw=o(((e,t)=>{var n=Rw().Graph,r=zw();t.exports=a;var i=()=>1;function a(e,t){if(e.nodeCount()<=1)return[];let n=c(e,t||i);return o(n.graph,n.buckets,n.zeroIdx).flatMap(t=>e.outEdges(t.v,t.w))}function o(e,t,n){let r=[],i=t[t.length-1],a=t[0],o;for(;e.nodeCount();){for(;o=a.dequeue();)s(e,t,n,o);for(;o=i.dequeue();)s(e,t,n,o);if(e.nodeCount()){for(let i=t.length-2;i>0;--i)if(o=t[i].dequeue(),o){r=r.concat(s(e,t,n,o,!0));break}}}return r}function s(e,t,n,r,i){let a=i?[]:void 0;return e.inEdges(r.v).forEach(r=>{let o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,l(t,n,s)}),e.outEdges(r.v).forEach(r=>{let i=e.edge(r),a=r.w,o=e.node(a);o.in-=i,l(t,n,o)}),e.removeNode(r.v),a}function c(e,t){let i=new n,a=0,o=0;e.nodes().forEach(e=>{i.setNode(e,{v:e,in:0,out:0})}),e.edges().forEach(e=>{let n=i.edge(e.v,e.w)||0,r=t(e),s=n+r;i.setEdge(e.v,e.w,s),o=Math.max(o,i.node(e.v).out+=r),a=Math.max(a,i.node(e.w).in+=r)});let s=u(o+a+3).map(()=>new r),c=a+1;return i.nodes().forEach(e=>{l(s,c,i.node(e))}),{graph:i,buckets:s,zeroIdx:c}}function l(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}function u(e){let t=[];for(let n=0;n<e;n++)t.push(n);return t}})),Vw=o(((e,t)=>{var n=Rw().Graph;t.exports={addBorderNode:f,addDummyNode:r,applyWithChunking:h,asNonCompoundGraph:a,buildLayerMatrix:l,intersectRect:c,mapValues:w,maxRank:g,normalizeRanks:u,notime:y,partition:_,pick:C,predecessorWeights:s,range:S,removeEmptyRanks:d,simplify:i,successorWeights:o,time:v,uniqueId:x,zipObject:T};function r(e,t,n,r){for(var i=r;e.hasNode(i);)i=x(r);return n.dummy=t,e.setNode(i,n),i}function i(e){let t=new n().setGraph(e.graph());return e.nodes().forEach(n=>t.setNode(n,e.node(n))),e.edges().forEach(n=>{let r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function a(e){let t=new n({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(n=>{e.children(n).length||t.setNode(n,e.node(n))}),e.edges().forEach(n=>{t.setEdge(n,e.edge(n))}),t}function o(e){let t=e.nodes().map(t=>{let n={};return e.outEdges(t).forEach(t=>{n[t.w]=(n[t.w]||0)+e.edge(t).weight}),n});return T(e.nodes(),t)}function s(e){let t=e.nodes().map(t=>{let n={};return e.inEdges(t).forEach(t=>{n[t.v]=(n[t.v]||0)+e.edge(t).weight}),n});return T(e.nodes(),t)}function c(e,t){let n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);let c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function l(e){let t=S(g(e)+1).map(()=>[]);return e.nodes().forEach(n=>{let r=e.node(n),i=r.rank;i!==void 0&&(t[i][r.order]=n)}),t}function u(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MAX_VALUE:n}),n=h(Math.min,t);e.nodes().forEach(t=>{let r=e.node(t);Object.hasOwn(r,`rank`)&&(r.rank-=n)})}function d(e){let t=e.nodes().map(t=>e.node(t).rank),n=h(Math.min,t),r=[];e.nodes().forEach(t=>{let i=e.node(t).rank-n;r[i]||(r[i]=[]),r[i].push(t)});let i=0,a=e.graph().nodeRankFactor;Array.from(r).forEach((t,n)=>{t===void 0&&n%a!==0?--i:t!==void 0&&i&&t.forEach(t=>e.node(t).rank+=i)})}function f(e,t,n,i){let a={width:0,height:0};return arguments.length>=4&&(a.rank=n,a.order=i),r(e,`border`,a,t)}function p(e,t=m){let n=[];for(let r=0;r<e.length;r+=t){let i=e.slice(r,r+t);n.push(i)}return n}var m=65535;function h(e,t){if(t.length>m){let n=p(t);return e.apply(null,n.map(t=>e.apply(null,t)))}return e.apply(null,t)}function g(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MIN_VALUE:n});return h(Math.max,t)}function _(e,t){let n={lhs:[],rhs:[]};return e.forEach(e=>{t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function v(e,t){let n=Date.now();try{return t()}finally{console.log(e+` time: `+(Date.now()-n)+`ms`)}}function y(e,t){return t()}var b=0;function x(e){return e+(``+ ++b)}function S(e,t,n=1){t??(t=e,e=0);let r=e=>e<t;n<0&&(r=e=>t<e);let i=[];for(let t=e;r(t);t+=n)i.push(t);return i}function C(e,t){let n={};for(let r of t)e[r]!==void 0&&(n[r]=e[r]);return n}function w(e,t){let n=t;return typeof t==`string`&&(n=e=>e[t]),Object.entries(e).reduce((e,[t,r])=>(e[t]=n(r,t),e),{})}function T(e,t){return e.reduce((e,n,r)=>(e[n]=t[r],e),{})}})),Hw=o(((e,t)=>{var n=Bw(),r=Vw().uniqueId;t.exports={run:i,undo:o};function i(e){(e.graph().acyclicer===`greedy`?n(e,t(e)):a(e)).forEach(t=>{let n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,r(`rev`))});function t(e){return t=>e.edge(t).weight}}function a(e){let t=[],n={},r={};function i(a){Object.hasOwn(r,a)||(r[a]=!0,n[a]=!0,e.outEdges(a).forEach(e=>{Object.hasOwn(n,e.w)?t.push(e):i(e.w)}),delete n[a])}return e.nodes().forEach(i),t}function o(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.reversed){e.removeEdge(t);let r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}})),Uw=o(((e,t)=>{var n=Vw();t.exports={run:r,undo:a};function r(e){e.graph().dummyChains=[],e.edges().forEach(t=>i(e,t))}function i(e,t){let r=t.v,i=e.node(r).rank,a=t.w,o=e.node(a).rank,s=t.name,c=e.edge(t),l=c.labelRank;if(o===i+1)return;e.removeEdge(t);let u,d,f=0;for(++i;i<o;++f,++i)c.points=[],d={width:0,height:0,edgeLabel:c,edgeObj:t,rank:i},u=n.addDummyNode(e,`edge`,d,`_d`),i===l&&(d.width=c.width,d.height=c.height,d.dummy=`edge-label`,d.labelpos=c.labelpos),e.setEdge(r,u,{weight:c.weight},s),f===0&&e.graph().dummyChains.push(u),r=u;e.setEdge(r,a,{weight:c.weight},s)}function a(e){e.graph().dummyChains.forEach(t=>{let n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}})),Ww=o(((e,t)=>{var{applyWithChunking:n}=Vw();t.exports={longestPath:r,slack:i};function r(e){var t={};function r(i){var a=e.node(i);if(Object.hasOwn(t,i))return a.rank;t[i]=!0;let o=e.outEdges(i).map(t=>t==null?1/0:r(t.w)-e.edge(t).minlen);var s=n(Math.min,o);return s===1/0&&(s=0),a.rank=s}e.sources().forEach(r)}function i(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}})),Gw=o(((e,t)=>{var n=Rw().Graph,r=Ww().slack;t.exports=i;function i(e){var t=new n({directed:!1}),i=e.nodes()[0],c=e.nodeCount();t.setNode(i,{});for(var l,u;a(t,e)<c;)l=o(t,e),u=t.hasNode(l.v)?r(e,l):-r(e,l),s(t,e,u);return t}function a(e,t){function n(i){t.nodeEdges(i).forEach(a=>{var o=a.v,s=i===o?a.w:o;!e.hasNode(s)&&!r(t,a)&&(e.setNode(s,{}),e.setEdge(i,s,{}),n(s))})}return e.nodes().forEach(n),e.nodeCount()}function o(e,t){return t.edges().reduce((n,i)=>{let a=1/0;return e.hasNode(i.v)!==e.hasNode(i.w)&&(a=r(t,i)),a<n[0]?[a,i]:n},[1/0,null])[1]}function s(e,t,n){e.nodes().forEach(e=>t.node(e).rank+=n)}})),Kw=o(((e,t)=>{var n=Gw(),r=Ww().slack,i=Ww().longestPath,a=Rw().alg.preorder,o=Rw().alg.postorder,s=Vw().simplify;t.exports=c,c.initLowLimValues=f,c.initCutValues=l,c.calcCutValue=d,c.leaveEdge=m,c.enterEdge=h,c.exchangeEdges=g;function c(e){e=s(e),i(e);var t=n(e);f(t),l(t,e);for(var r,a;r=m(t);)a=h(t,e,r),g(t,e,r,a)}function l(e,t){var n=o(e,e.nodes());n=n.slice(0,n.length-1),n.forEach(n=>u(e,t,n))}function u(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=d(e,t,n)}function d(e,t,n){var r=e.node(n).parent,i=!0,a=t.edge(n,r),o=0;return a||=(i=!1,t.edge(r,n)),o=a.weight,t.nodeEdges(n).forEach(a=>{var s=a.v===n,c=s?a.w:a.v;if(c!==r){var l=s===i,u=t.edge(a).weight;if(o+=l?u:-u,v(e,n,c)){var d=e.edge(n,c).cutvalue;o+=l?-d:d}}}),o}function f(e,t){arguments.length<2&&(t=e.nodes()[0]),p(e,{},1,t)}function p(e,t,n,r,i){var a=n,o=e.node(r);return t[r]=!0,e.neighbors(r).forEach(i=>{Object.hasOwn(t,i)||(n=p(e,t,n,i,r))}),o.low=a,o.lim=n++,i?o.parent=i:delete o.parent,n}function m(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function h(e,t,n){var i=n.v,a=n.w;t.hasEdge(i,a)||(i=n.w,a=n.v);var o=e.node(i),s=e.node(a),c=o,l=!1;return o.lim>s.lim&&(c=s,l=!0),t.edges().filter(t=>l===y(e,e.node(t.v),c)&&l!==y(e,e.node(t.w),c)).reduce((e,n)=>r(t,n)<r(t,e)?n:e)}function g(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),f(e),l(e,t),_(e,t)}function _(e,t){var n=a(e,e.nodes().find(e=>!t.node(e).parent));n=n.slice(1),n.forEach(n=>{var r=e.node(n).parent,i=t.edge(n,r),a=!1;i||(i=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?i.minlen:-i.minlen)})}function v(e,t,n){return e.hasEdge(t,n)}function y(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}})),qw=o(((e,t)=>{var n=Ww().longestPath,r=Gw(),i=Kw();t.exports=a;function a(e){var t=e.graph().ranker;if(t instanceof Function)return t(e);switch(e.graph().ranker){case`network-simplex`:c(e);break;case`tight-tree`:s(e);break;case`longest-path`:o(e);break;case`none`:break;default:c(e)}}var o=n;function s(e){n(e),r(e)}function c(e){i(e)}})),Jw=o(((e,t)=>{t.exports=n;function n(e){let t=i(e);e.graph().dummyChains.forEach(n=>{let i=e.node(n),a=i.edgeObj,o=r(e,t,a.v,a.w),s=o.path,c=o.lca,l=0,u=s[l],d=!0;for(;n!==a.w;){if(i=e.node(n),d){for(;(u=s[l])!==c&&e.node(u).maxRank<i.rank;)l++;u===c&&(d=!1)}if(!d){for(;l<s.length-1&&e.node(u=s[l+1]).minRank<=i.rank;)l++;u=s[l]}e.setParent(n,u),n=e.successors(n)[0]}})}function r(e,t,n,r){let i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c,l;c=n;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}function i(e){let t={},n=0;function r(i){let a=n;e.children(i).forEach(r),t[i]={low:a,lim:n++}}return e.children().forEach(r),t}})),Yw=o(((e,t)=>{var n=Vw();t.exports={run:r,cleanup:s};function r(e){let t=n.addDummyNode(e,`root`,{},`_root`),r=a(e),s=Object.values(r),c=n.applyWithChunking(Math.max,s)-1,l=2*c+1;e.graph().nestingRoot=t,e.edges().forEach(t=>e.edge(t).minlen*=l);let u=o(e)+1;e.children().forEach(n=>i(e,t,l,u,c,r,n)),e.graph().nodeRankFactor=l}function i(e,t,r,a,o,s,c){let l=e.children(c);if(!l.length){c!==t&&e.setEdge(t,c,{weight:0,minlen:r});return}let u=n.addBorderNode(e,`_bt`),d=n.addBorderNode(e,`_bb`),f=e.node(c);e.setParent(u,c),f.borderTop=u,e.setParent(d,c),f.borderBottom=d,l.forEach(n=>{i(e,t,r,a,o,s,n);let l=e.node(n),f=l.borderTop?l.borderTop:n,p=l.borderBottom?l.borderBottom:n,m=l.borderTop?a:2*a,h=f===p?o-s[c]+1:1;e.setEdge(u,f,{weight:m,minlen:h,nestingEdge:!0}),e.setEdge(p,d,{weight:m,minlen:h,nestingEdge:!0})}),e.parent(c)||e.setEdge(t,u,{weight:0,minlen:o+s[c]})}function a(e){var t={};function n(r,i){var a=e.children(r);a&&a.length&&a.forEach(e=>n(e,i+1)),t[r]=i}return e.children().forEach(e=>n(e,1)),t}function o(e){return e.edges().reduce((t,n)=>t+e.edge(n).weight,0)}function s(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(t=>{e.edge(t).nestingEdge&&e.removeEdge(t)})}})),Xw=o(((e,t)=>{var n=Vw();t.exports=r;function r(e){function t(n){let r=e.children(n),a=e.node(n);if(r.length&&r.forEach(t),Object.hasOwn(a,`minRank`)){a.borderLeft=[],a.borderRight=[];for(let t=a.minRank,r=a.maxRank+1;t<r;++t)i(e,`borderLeft`,`_bl`,n,a,t),i(e,`borderRight`,`_br`,n,a,t)}}e.children().forEach(t)}function i(e,t,r,i,a,o){let s={width:0,height:0,rank:o,borderType:t},c=a[t][o-1],l=n.addDummyNode(e,`border`,s,r);a[t][o]=l,e.setParent(l,i),c&&e.setEdge(c,l,{weight:1})}})),Zw=o(((e,t)=>{t.exports={adjust:n,undo:r};function n(e){let t=e.graph().rankdir.toLowerCase();(t===`lr`||t===`rl`)&&i(e)}function r(e){let t=e.graph().rankdir.toLowerCase();(t===`bt`||t===`rl`)&&o(e),(t===`lr`||t===`rl`)&&(c(e),i(e))}function i(e){e.nodes().forEach(t=>a(e.node(t))),e.edges().forEach(t=>a(e.edge(t)))}function a(e){let t=e.width;e.width=e.height,e.height=t}function o(e){e.nodes().forEach(t=>s(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(s),Object.hasOwn(n,`y`)&&s(n)})}function s(e){e.y=-e.y}function c(e){e.nodes().forEach(t=>l(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(l),Object.hasOwn(n,`x`)&&l(n)})}function l(e){let t=e.x;e.x=e.y,e.y=t}})),Qw=o(((e,t)=>{var n=Vw();t.exports=r;function r(e){let t={},r=e.nodes().filter(t=>!e.children(t).length),i=r.map(t=>e.node(t).rank),a=n.applyWithChunking(Math.max,i),o=n.range(a+1).map(()=>[]);function s(n){if(t[n])return;t[n]=!0;let r=e.node(n);o[r.rank].push(n),e.successors(n).forEach(s)}return r.sort((t,n)=>e.node(t).rank-e.node(n).rank).forEach(s),o}})),$w=o(((e,t)=>{var n=Vw().zipObject;t.exports=r;function r(e,t){let n=0;for(let r=1;r<t.length;++r)n+=i(e,t[r-1],t[r]);return n}function i(e,t,r){let i=n(r,r.map((e,t)=>t)),a=t.flatMap(t=>e.outEdges(t).map(t=>({pos:i[t.w],weight:e.edge(t).weight})).sort((e,t)=>e.pos-t.pos)),o=1;for(;o<r.length;)o<<=1;let s=2*o-1;--o;let c=Array(s).fill(0),l=0;return a.forEach(e=>{let t=e.pos+o;c[t]+=e.weight;let n=0;for(;t>0;)t%2&&(n+=c[t+1]),t=t-1>>1,c[t]+=e.weight;l+=e.weight*n}),l}})),eT=o(((e,t)=>{t.exports=n;function n(e,t=[]){return t.map(t=>{let n=e.inEdges(t);if(n.length){let r=n.reduce((t,n)=>{let r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}return{v:t}})}})),tT=o(((e,t)=>{var n=Vw();t.exports=r;function r(e,t){let n={};return e.forEach((e,t)=>{let r=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};e.barycenter!==void 0&&(r.barycenter=e.barycenter,r.weight=e.weight)}),t.edges().forEach(e=>{let t=n[e.v],r=n[e.w];t!==void 0&&r!==void 0&&(r.indegree++,t.out.push(n[e.w]))}),i(Object.values(n).filter(e=>!e.indegree))}function i(e){let t=[];function r(e){return t=>{t.merged||(t.barycenter===void 0||e.barycenter===void 0||t.barycenter>=e.barycenter)&&a(e,t)}}function i(t){return n=>{n.in.push(t),--n.indegree===0&&e.push(n)}}for(;e.length;){let n=e.pop();t.push(n),n.in.reverse().forEach(r(n)),n.out.forEach(i(n))}return t.filter(e=>!e.merged).map(e=>n.pick(e,[`vs`,`i`,`barycenter`,`weight`]))}function a(e,t){let n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}})),nT=o(((e,t)=>{var n=Vw();t.exports=r;function r(e,t){let r=n.partition(e,e=>Object.hasOwn(e,`barycenter`)),o=r.lhs,s=r.rhs.sort((e,t)=>t.i-e.i),c=[],l=0,u=0,d=0;o.sort(a(!!t)),d=i(c,s,d),o.forEach(e=>{d+=e.vs.length,c.push(e.vs),l+=e.barycenter*e.weight,u+=e.weight,d=i(c,s,d)});let f={vs:c.flat(!0)};return u&&(f.barycenter=l/u,f.weight=u),f}function i(e,t,n){let r;for(;t.length&&(r=t[t.length-1]).i<=n;)t.pop(),e.push(r.vs),n++;return n}function a(e){return(t,n)=>t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}})),rT=o(((e,t)=>{var n=eT(),r=tT(),i=nT();t.exports=a;function a(e,t,c,l){let u=e.children(t),d=e.node(t),f=d?d.borderLeft:void 0,p=d?d.borderRight:void 0,m={};f&&(u=u.filter(e=>e!==f&&e!==p));let h=n(e,u);h.forEach(t=>{if(e.children(t.v).length){let n=a(e,t.v,c,l);m[t.v]=n,Object.hasOwn(n,`barycenter`)&&s(t,n)}});let g=r(h,c);o(g,m);let _=i(g,l);if(f&&(_.vs=[f,_.vs,p].flat(!0),e.predecessors(f).length)){let t=e.node(e.predecessors(f)[0]),n=e.node(e.predecessors(p)[0]);Object.hasOwn(_,`barycenter`)||(_.barycenter=0,_.weight=0),_.barycenter=(_.barycenter*_.weight+t.order+n.order)/(_.weight+2),_.weight+=2}return _}function o(e,t){e.forEach(e=>{e.vs=e.vs.flatMap(e=>t[e]?t[e].vs:e)})}function s(e,t){e.barycenter===void 0?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}})),iT=o(((e,t)=>{var n=Rw().Graph,r=Vw();t.exports=i;function i(e,t,r,i){i||=e.nodes();let o=a(e),s=new n({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(t=>e.node(t));return i.forEach(n=>{let i=e.node(n),a=e.parent(n);(i.rank===t||i.minRank<=t&&t<=i.maxRank)&&(s.setNode(n),s.setParent(n,a||o),e[r](n).forEach(t=>{let r=t.v===n?t.w:t.v,i=s.edge(r,n),a=i===void 0?0:i.weight;s.setEdge(r,n,{weight:e.edge(t).weight+a})}),Object.hasOwn(i,`minRank`)&&s.setNode(n,{borderLeft:i.borderLeft[t],borderRight:i.borderRight[t]}))}),s}function a(e){for(var t;e.hasNode(t=r.uniqueId(`_root`)););return t}})),aT=o(((e,t)=>{t.exports=n;function n(e,t,n){let r={},i;n.forEach(n=>{let a=e.parent(n),o,s;for(;a;){if(o=e.parent(a),o?(s=r[o],r[o]=a):(s=i,i=a),s&&s!==a){t.setEdge(s,a);return}a=o}})}})),oT=o(((e,t)=>{var n=Qw(),r=$w(),i=rT(),a=iT(),o=aT(),s=Rw().Graph,c=Vw();t.exports=l;function l(e,t){if(t&&typeof t.customOrder==`function`){t.customOrder(e,l);return}let i=c.maxRank(e),a=u(e,c.range(1,i+1),`inEdges`),o=u(e,c.range(i-1,-1,-1),`outEdges`),s=n(e);if(f(e,s),t&&t.disableOptimalOrderHeuristic)return;let p=1/0,m;for(let t=0,n=0;n<4;++t,++n){d(t%2?a:o,t%4>=2),s=c.buildLayerMatrix(e);let i=r(e,s);i<p&&(n=0,m=Object.assign({},s),p=i)}f(e,m)}function u(e,t,n){let r=new Map,i=(e,t)=>{r.has(e)||r.set(e,[]),r.get(e).push(t)};for(let t of e.nodes()){let n=e.node(t);if(typeof n.rank==`number`&&i(n.rank,t),typeof n.minRank==`number`&&typeof n.maxRank==`number`)for(let e=n.minRank;e<=n.maxRank;e++)e!==n.rank&&i(e,t)}return t.map(function(t){return a(e,t,n,r.get(t)||[])})}function d(e,t){let n=new s;e.forEach(function(e){let r=e.graph().root,a=i(e,r,n,t);a.vs.forEach((t,n)=>e.node(t).order=n),o(e,n,a.vs)})}function f(e,t){Object.values(t).forEach(t=>t.forEach((t,n)=>e.node(t).order=n))}})),sT=o(((e,t)=>{var n=Rw().Graph,r=Vw();t.exports={positionX:h,findType1Conflicts:i,findType2Conflicts:a,addConflict:s,hasConflict:c,verticalAlignment:l,horizontalCompaction:u,alignCoordinates:p,findSmallestWidthAlignment:f,balance:m};function i(e,t){let n={};function r(t,r){let i=0,a=0,c=t.length,l=r[r.length-1];return r.forEach((t,u)=>{let d=o(e,t),f=d?e.node(d).order:c;(d||t===l)&&(r.slice(a,u+1).forEach(t=>{e.predecessors(t).forEach(r=>{let a=e.node(r),o=a.order;(o<i||f<o)&&!(a.dummy&&e.node(t).dummy)&&s(n,r,t)})}),a=u+1,i=f)}),r}return t.length&&t.reduce(r),n}function a(e,t){let n={};function i(t,i,a,o,c){let l;r.range(i,a).forEach(r=>{l=t[r],e.node(l).dummy&&e.predecessors(l).forEach(t=>{let r=e.node(t);r.dummy&&(r.order<o||r.order>c)&&s(n,t,l)})})}function a(t,n){let r=-1,a,o=0;return n.forEach((s,c)=>{if(e.node(s).dummy===`border`){let t=e.predecessors(s);t.length&&(a=e.node(t[0]).order,i(n,o,c,r,a),o=c,r=a)}i(n,o,n.length,a,t.length)}),n}return t.length&&t.reduce(a),n}function o(e,t){if(e.node(t).dummy)return e.predecessors(t).find(t=>e.node(t).dummy)}function s(e,t,n){if(t>n){let e=t;t=n,n=e}let r=e[t];r||(e[t]=r={}),r[n]=!0}function c(e,t,n){if(t>n){let e=t;t=n,n=e}return!!e[t]&&Object.hasOwn(e[t],n)}function l(e,t,n,r){let i={},a={},o={};return t.forEach(e=>{e.forEach((e,t)=>{i[e]=e,a[e]=e,o[e]=t})}),t.forEach(e=>{let t=-1;e.forEach(e=>{let s=r(e);if(s.length){s=s.sort((e,t)=>o[e]-o[t]);let r=(s.length-1)/2;for(let l=Math.floor(r),u=Math.ceil(r);l<=u;++l){let r=s[l];a[e]===e&&t<o[r]&&!c(n,e,r)&&(a[r]=e,a[e]=i[e]=i[r],t=o[r])}}})}),{root:i,align:a}}function u(e,t,n,r,i){let a={},o=d(e,t,n,i),s=i?`borderLeft`:`borderRight`;function c(e,t){let n=o.nodes(),r=n.pop(),i={};for(;r;)i[r]?e(r):(i[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}function l(e){a[e]=o.inEdges(e).reduce((e,t)=>Math.max(e,a[t.v]+o.edge(t)),0)}function u(t){let n=o.outEdges(t).reduce((e,t)=>Math.min(e,a[t.w]-o.edge(t)),1/0),r=e.node(t);n!==1/0&&r.borderType!==s&&(a[t]=Math.max(a[t],n))}return c(l,o.predecessors.bind(o)),c(u,o.successors.bind(o)),Object.keys(r).forEach(e=>a[e]=a[n[e]]),a}function d(e,t,r,i){let a=new n,o=e.graph(),s=g(o.nodesep,o.edgesep,i);return t.forEach(t=>{let n;t.forEach(t=>{let i=r[t];if(a.setNode(i),n){var o=r[n],c=a.edge(o,i);a.setEdge(o,i,Math.max(s(e,t,n),c||0))}n=t})}),a}function f(e,t){return Object.values(t).reduce((t,n)=>{let r=-1/0,i=1/0;Object.entries(n).forEach(([t,n])=>{let a=_(e,t)/2;r=Math.max(n+a,r),i=Math.min(n-a,i)});let a=r-i;return a<t[0]&&(t=[a,n]),t},[1/0,null])[1]}function p(e,t){let n=Object.values(t),i=r.applyWithChunking(Math.min,n),a=r.applyWithChunking(Math.max,n);[`u`,`d`].forEach(n=>{[`l`,`r`].forEach(o=>{let s=n+o,c=e[s];if(c===t)return;let l=Object.values(c),u=i-r.applyWithChunking(Math.min,l);o!==`l`&&(u=a-r.applyWithChunking(Math.max,l)),u&&(e[s]=r.mapValues(c,e=>e+u))})})}function m(e,t){return r.mapValues(e.ul,(n,r)=>{if(t)return e[t.toLowerCase()][r];{let t=Object.values(e).map(e=>e[r]).sort((e,t)=>e-t);return(t[1]+t[2])/2}})}function h(e){let t=r.buildLayerMatrix(e),n=Object.assign(i(e,t),a(e,t)),o={},s;return[`u`,`d`].forEach(i=>{s=i===`u`?t:Object.values(t).reverse(),[`l`,`r`].forEach(t=>{t===`r`&&(s=s.map(e=>Object.values(e).reverse()));let a=(i===`u`?e.predecessors:e.successors).bind(e),c=l(e,s,n,a),d=u(e,s,c.root,c.align,t===`r`);t===`r`&&(d=r.mapValues(d,e=>-e)),o[i+t]=d})}),p(o,f(e,o)),m(o,e.graph().align)}function g(e,t,n){return(r,i,a)=>{let o=r.node(i),s=r.node(a),c=0,l;if(c+=o.width/2,Object.hasOwn(o,`labelpos`))switch(o.labelpos.toLowerCase()){case`l`:l=-o.width/2;break;case`r`:l=o.width/2}if(l&&(c+=n?l:-l),l=0,c+=(o.dummy?t:e)/2,c+=(s.dummy?t:e)/2,c+=s.width/2,Object.hasOwn(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:l=s.width/2;break;case`r`:l=-s.width/2}return l&&(c+=n?l:-l),l=0,c}}function _(e,t){return e.node(t).width}})),cT=o(((e,t)=>{var n=Vw(),r=sT().positionX;t.exports=i;function i(e){e=n.asNonCompoundGraph(e),a(e),Object.entries(r(e)).forEach(([t,n])=>e.node(t).x=n)}function a(e){let t=n.buildLayerMatrix(e),r=e.graph().ranksep,i=0;t.forEach(t=>{let n=t.reduce((t,n)=>{let r=e.node(n).height;return t>r?t:r},0);t.forEach(t=>e.node(t).y=i+n/2),i+=n+r})}})),lT=o(((e,t)=>{var n=Hw(),r=Uw(),i=qw(),a=Vw().normalizeRanks,o=Jw(),s=Vw().removeEmptyRanks,c=Yw(),l=Xw(),u=Zw(),d=oT(),f=cT(),p=Vw(),m=Rw().Graph;t.exports=h;function h(e,t){let n=t&&t.debugTiming?p.time:p.notime;n(`layout`,()=>{let r=n(` buildLayoutGraph`,()=>E(e));n(` runLayout`,()=>g(r,n,t)),n(` updateInputGraph`,()=>_(e,r))})}function g(e,t,m){t(` makeSpaceForEdgeLabels`,()=>D(e)),t(` removeSelfEdges`,()=>I(e)),t(` acyclic`,()=>n.run(e)),t(` nestingGraph.run`,()=>c.run(e)),t(` rank`,()=>i(p.asNonCompoundGraph(e))),t(` injectEdgeLabelProxies`,()=>O(e)),t(` removeEmptyRanks`,()=>s(e)),t(` nestingGraph.cleanup`,()=>c.cleanup(e)),t(` normalizeRanks`,()=>a(e)),t(` assignRankMinMax`,()=>k(e)),t(` removeEdgeLabelProxies`,()=>A(e)),t(` normalize.run`,()=>r.run(e)),t(` parentDummyChains`,()=>o(e)),t(` addBorderSegments`,()=>l(e)),t(` order`,()=>d(e,m)),t(` insertSelfEdges`,()=>ee(e)),t(` adjustCoordinateSystem`,()=>u.adjust(e)),t(` position`,()=>f(e)),t(` positionSelfEdges`,()=>te(e)),t(` removeBorderNodes`,()=>F(e)),t(` normalize.undo`,()=>r.undo(e)),t(` fixupEdgeLabelCoords`,()=>N(e)),t(` undoCoordinateSystem`,()=>u.undo(e)),t(` translateGraph`,()=>j(e)),t(` assignNodeIntersects`,()=>M(e)),t(` reversePoints`,()=>P(e)),t(` acyclic.undo`,()=>n.undo(e))}function _(e,t){e.nodes().forEach(n=>{let r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,r.rank=i.rank,t.children(n).length&&(r.width=i.width,r.height=i.height))}),e.edges().forEach(n=>{let r=e.edge(n),i=t.edge(n);r.points=i.points,Object.hasOwn(i,`x`)&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var v=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],y={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},b=[`acyclicer`,`ranker`,`rankdir`,`align`],x=[`width`,`height`,`rank`],S={width:0,height:0},C=[`minlen`,`weight`,`width`,`height`,`labeloffset`],w={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},T=[`labelpos`];function E(e){let t=new m({multigraph:!0,compound:!0}),n=ne(e.graph());return t.setGraph(Object.assign({},y,L(n,v),p.pick(n,b))),e.nodes().forEach(n=>{let r=L(ne(e.node(n)),x);Object.keys(S).forEach(e=>{r[e]===void 0&&(r[e]=S[e])}),t.setNode(n,r),t.setParent(n,e.parent(n))}),e.edges().forEach(n=>{let r=ne(e.edge(n));t.setEdge(n,Object.assign({},w,L(r,C),p.pick(r,T)))}),t}function D(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(n=>{let r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!==`c`&&(t.rankdir===`TB`||t.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function O(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.width&&n.height){let n=e.node(t.v),r={rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t};p.addDummyNode(e,`edge-proxy`,r,`_ep`)}})}function k(e){let t=0;e.nodes().forEach(n=>{let r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=Math.max(t,r.maxRank))}),e.graph().maxRank=t}function A(e){e.nodes().forEach(t=>{let n=e.node(t);n.dummy===`edge-proxy`&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function j(e){let t=1/0,n=0,r=1/0,i=0,a=e.graph(),o=a.marginx||0,s=a.marginy||0;function c(e){let a=e.x,o=e.y,s=e.width,c=e.height;t=Math.min(t,a-s/2),n=Math.max(n,a+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}e.nodes().forEach(t=>c(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);Object.hasOwn(n,`x`)&&c(n)}),t-=o,r-=s,e.nodes().forEach(n=>{let i=e.node(n);i.x-=t,i.y-=r}),e.edges().forEach(n=>{let i=e.edge(n);i.points.forEach(e=>{e.x-=t,e.y-=r}),Object.hasOwn(i,`x`)&&(i.x-=t),Object.hasOwn(i,`y`)&&(i.y-=r)}),a.width=n-t+o,a.height=i-r+s}function M(e){e.edges().forEach(t=>{let n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(p.intersectRect(r,a)),n.points.push(p.intersectRect(i,o))})}function N(e){e.edges().forEach(t=>{let n=e.edge(t);if(Object.hasOwn(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset}})}function P(e){e.edges().forEach(t=>{let n=e.edge(t);n.reversed&&n.points.reverse()})}function F(e){e.nodes().forEach(t=>{if(e.children(t).length){let n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(n.borderLeft[n.borderLeft.length-1]),o=e.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy===`border`&&e.removeNode(t)})}function I(e){e.edges().forEach(t=>{if(t.v===t.w){var n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function ee(e){p.buildLayerMatrix(e).forEach(t=>{var n=0;t.forEach((t,r)=>{var i=e.node(t);i.order=r+n,(i.selfEdges||[]).forEach(t=>{p.addDummyNode(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:i.rank,order:r+ ++n,e:t.e,label:t.label},`_se`)}),delete i.selfEdges})})}function te(e){e.nodes().forEach(t=>{var n=e.node(t);if(n.dummy===`selfedge`){var r=e.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function L(e,t){return p.mapValues(p.pick(e,t),Number)}function ne(e){var t={};return e&&Object.entries(e).forEach(([e,n])=>{typeof e==`string`&&(e=e.toLowerCase()),t[e]=n}),t}})),uT=o(((e,t)=>{var n=Vw(),r=Rw().Graph;t.exports={debugOrdering:i};function i(e){let t=n.buildLayerMatrix(e),i=new r({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(t=>{i.setNode(t,{label:t}),i.setParent(t,`layer`+e.node(t).rank)}),e.edges().forEach(e=>i.setEdge(e.v,e.w,{},e.name)),t.forEach((e,t)=>{let n=`layer`+t;i.setNode(n,{rank:`same`}),e.reduce((e,t)=>(i.setEdge(e,t,{style:`invis`}),t))}),i}})),dT=o(((e,t)=>{t.exports=`1.1.8`})),fT=l(o(((e,t)=>{t.exports={graphlib:Rw(),layout:lT(),debug:uT(),util:{time:Vw().time,notime:Vw().notime},version:dT()}}))(),1),pT=(e,t)=>`elsewhere:${e}:${t}`,mT=e=>`elsewhere:${e}`;function hT(e){return e.flatMap(e=>e.deps.flatMap(t=>{let n=vw(t);return n===null?[]:[{ghostId:pT(n.project,n.ref),...n,dependent:e.id}]}))}var gT=[54,66,78];function _T(e){let t=2166136261;for(let n=0;n<e.length;n++)t=Math.imul(t^e.charCodeAt(n),16777619);return t>>>=0,`hsl(${t%360} 72% ${gT[Math.floor(t/360)%gT.length]}%)`}function vT(e){return Object.fromEntries(e.map(e=>[e,_T(e)]))}var yT=212,bT=62,xT=3,ST=13,CT=17,wT=184,TT=42,ET=e=>` `.includes(e)?.28:"iljI.,:;'!|`".includes(e)?.3:`frt()[]{}-/\\"`.includes(e)?.4:`mwMW@%`.includes(e)?.9:e>=`A`&&e<=`Z`?.72:e>=`0`&&e<=`9`?.6:.57,DT=e=>[...e].reduce((e,t)=>e+ET(t),0)*ST*1.06;function OT(e){let t=1,n=0;for(let r of e.split(/\s+/).filter(Boolean)){let e=DT(r),i=n===0?e:n+DT(` `)+e;i<=wT?n=i:(t+=n===0?0:1,t+=Math.floor(e/wT),n=e%wT)}return Math.min(t,xT)}var kT=e=>Math.max(bT,TT+OT(e.title)*CT),AT=34,jT=18,MT=46,NT=20,PT=68,FT={width:248,height:104},IT=e=>`area:${e}`,LT=34,RT=12,zT=92,BT=10,VT=e=>Math.round(e/BT)*BT,HT=e=>Math.ceil(e/BT)*BT,UT=30,WT=(e,t)=>e.filter(e=>e.parent===t),GT=(e,t)=>e===t||e.startsWith(`${t}.`)||t.startsWith(`${e}.`);function KT(e,t,n){let r=WT(t,e.id);if(r.length===0)return{width:yT,height:kT(e)};let i=$T(r,t,n).box;return{width:i.width,height:i.height}}function qT(e,t,n){let r=new fT.default.graphlib.Graph;r.setGraph({rankdir:`LR`,nodesep:UT,ranksep:zT}),r.setDefaultEdgeLabel(()=>({}));for(let t of e){let e=n.get(t.id);r.setNode(t.id,{width:e.width,height:e.height})}for(let[e,n]of t)r.setEdge(e,n);fT.default.layout(r);let i=new Map,a=1/0,o=1/0;for(let t of e){let e=r.node(t.id),s=n.get(t.id),c=e.x-s.width/2,l=e.y-s.height/2;i.set(t.id,{x:c,y:l,width:s.width,height:s.height}),a=Math.min(a,c),o=Math.min(o,l)}let s=0,c=0;for(let e of i.values())e.x-=a,e.y-=o,s=Math.max(s,e.x+e.width),c=Math.max(c,e.y+e.height);return{placements:i,extent:{width:s,height:c}}}function JT(e,t,n){let r=new Map,i=0,a=0,o=0,s=0;for(let c of e)i>0&&i+c.width>t&&(a+=o+n,i=0,o=0),r.set(c.id,{x:i,y:a,width:c.width,height:c.height}),i+=c.width+n,s=Math.max(s,i-n),o=Math.max(o,c.height);return{placements:r,extent:{width:s,height:a+o}}}function YT(e,t,n){let r=Math.max(t,...e.map(e=>e.width)),i=[{x:0,y:0,width:r}],a=new Map,o=[...e].sort((e,t)=>t.height-e.height||t.width-e.width);for(let e of o){let t=null;for(let n of i){let a=n.x;if(a+e.width>r)continue;let o=0;for(let t of i)t.x+t.width<=a||t.x>=a+e.width||(o=Math.max(o,t.y));(t===null||o<t.y||o===t.y&&a<t.x)&&(t={x:a,y:o})}let o=t??{x:0,y:0};a.set(e.id,{x:o.x,y:o.y,width:e.width,height:e.height}),i=XT(i,o.x,e.width+n,o.y+e.height+n)}let s=0,c=0;for(let e of a.values())s=Math.max(s,e.x+e.width),c=Math.max(c,e.y+e.height);return{placements:a,extent:{width:s,height:c}}}function XT(e,t,n,r){let i=t+n,a=[];for(let n of e){let e=n.x+n.width;e<=t||n.x>=i?a.push(n):(n.x<t&&a.push({x:n.x,y:n.y,width:t-n.x}),e>i&&a.push({x:i,y:n.y,width:e-i}))}a.push({x:t,y:r,width:n}),a.sort((e,t)=>e.x-t.x);let o=[];for(let e of a){let t=o[o.length-1];t&&t.y===e.y&&t.x+t.width===e.x?t.width+=e.width:o.push({...e})}return o}function ZT(e,t,n=2.8){let r=e.reduce((e,n)=>e+(n.width+t)*(n.height+t),0),i=Math.max(...e.map(e=>e.width));return Math.max(i,Math.sqrt(r*n))}function QT(e,t){let n=new Set(e.map(e=>e.id)),r=e.flatMap(e=>e.deps.filter(e=>n.has(e)).map(t=>[t,e.id])),i=new Set(r.flat()),a=e.filter(e=>i.has(e.id)),o=e.filter(e=>!i.has(e.id)),s=new Map,c=a.length>0?qT(a,r,t):{placements:new Map,extent:{width:0,height:0}};for(let[e,t]of c.placements)s.set(e,t);if(o.length>0){let e=o.map(e=>({id:e.id,...t.get(e.id)})),n=JT(e,Math.max(c.extent.width,ZT(e,AT)),AT),r=a.length>0?c.extent.height+AT:0;for(let[e,t]of n.placements)s.set(e,{...t,y:t.y+r})}return s}function $T(e,t,n){let r=new Map(e.map(e=>[e.id,KT(e,t,n)])),i=new Set(e.map(e=>e.id)),a=rE(e.map(e=>({id:e.id,...r.get(e.id),deps:e.deps.filter(e=>i.has(e))})),e=>n[e],AT,2.8,()=>QT(e,r));return{placements:a,box:lE(a)}}var eE=e=>e===`x`?`width`:`height`,tE=e=>e===`x`?`y`:`x`,nE=(e,t,n,r)=>e[n]+e[eE(n)]+r>t[n]&&t[n]+t[eE(n)]+r>e[n];function rE(e,t,n,r,i,a=`after-previous`){let o=e.some(e=>t(e.id)!==void 0)?null:i(),s=new Map;for(let n of e){let e=o?o.get(n.id):t(n.id);e&&s.set(n.id,{id:n.id,x:VT(e.x),y:VT(e.y),width:n.width,height:n.height})}let c=new Set,l=ZT(e,n,r);e.forEach((t,r)=>{if(s.has(t.id))return;c.add(t.id);let i=a===`best-fit`?aE(t,s,n,l):iE(t,e.slice(0,r),s,n,l);s.set(t.id,{id:t.id,x:HT(i.x),y:HT(i.y),width:t.width,height:t.height})});let u=[...s.values()];return oE(u,n,c),sE(u,n),new Map(u.map(({id:e,...t})=>[e,t]))}function iE(e,t,n,r,i){let a=e.deps.flatMap(e=>n.get(e)??[]);if(a.length>0){let e=a.reduce((e,t)=>t.x+t.width>e.x+e.width?t:e);return{x:e.x+e.width+r,y:e.y}}let o=[...t].reverse().flatMap(e=>n.get(e.id)??[])[0];return o&&o.x+o.width+r+e.width<=i?{x:o.x+o.width+r,y:o.y}:{x:0,y:Math.max(-r,...[...n.values()].map(e=>e.y+e.height))+r}}function aE(e,t,n,r){let i=[...t.values()],a=Math.max(0,...i.map(e=>e.x+e.width)),o=Math.max(0,...i.map(e=>e.y+e.height)),s=[{x:0,y:0},...i.flatMap(e=>[{x:e.x+e.width+n,y:e.y},{x:e.x,y:e.y+e.height+n}])],c=null;for(let t of s){let s={id:e.id,...t,width:e.width,height:e.height};if(i.some(e=>nE(s,e,`x`,n)&&nE(s,e,`y`,n)))continue;let l=Math.max(a,t.x+e.width),u=l*Math.max(o,t.y+e.height)*(l>r?4:1);(c===null||u<c.score||u===c.score&&(t.y<c.y||t.y===c.y&&t.x<c.x))&&(c={...t,score:u})}return c??{x:0,y:o+n}}function oE(e,t,n){for(let r=0;r<=e.length*e.length;r++){let r=null;search:for(let n=0;n<e.length;n++)for(let i=n+1;i<e.length;i++)if(nE(e[n],e[i],`x`,t)&&nE(e[n],e[i],`y`,t)){r=[e[n],e[i]];break search}if(r===null)return;let[i,a]=r,o=e=>{let[r,o]=i[e]<a[e]||i[e]===a[e]&&(n.has(i.id)||!n.has(a.id))?[i,a]:[a,i];return{axis:e,stays:r,moves:o,by:HT(r[e]+r[eE(e)]+t-o[e])}},s=e=>(Math.min(i[e]+i[eE(e)],a[e]+a[eE(e)])+t-Math.max(i[e],a[e]))/(Math.min(i[eE(e)],a[eE(e)])+t),{axis:c,stays:l,moves:u,by:d}=s(`x`)<=s(`y`)?o(`x`):o(`y`),f=u[c];for(let t of e)t!==l&&t[c]>=f&&(t[c]+=d)}}function sE(e,t){for(let n=0;n<32;n++){let n=e.map(e=>e.x+e.y*1e6);if(cE(e,`x`,t),cE(e,`y`,t),e.every((e,t)=>e.x+e.y*1e6===n[t]))return}}function cE(e,t,n){let r=tE(t),i=[...e].sort((e,n)=>e[t]-n[t]),a=new Map(i.map(e=>[e,e[t]])),o=[];for(let e of i){let i=0;for(let s of o)i=Math.max(i,s[t]+(a.get(s)<a.get(e)?BT:0)),nE(e,s,r,n)&&(i=Math.max(i,s[t]+s[eE(t)]+n));e[t]=HT(i),o.push(e)}}function lE(e){let t=0,n=0;for(let r of e.values())t=Math.max(t,r.x+r.width),n=Math.max(n,r.y+r.height);return{width:t+36,height:n+MT+NT}}function uE(e,t){let n=e=>e.split(`-`)[0]??e,r=new Map;for(let e of t)for(let t of e.deps){let i=vw(t),[a,o]=[i===null?n(t):mT(i.project),n(e.id)];if(a!==o){let e=r.get(o)??new Set;e.add(a),r.set(o,e)}}let i=new Map(e.map(e=>[e.area,e])),a=new Set,o=[],s=e=>{let t=i.get(e);if(t&&!a.has(e)){a.add(e);for(let t of r.get(e)??[])s(t);o.push(t)}};for(let t of e)s(t.area);return o}function dE(e,t,n,r,i,a,o={},s=new Set){let c=new Set(e.map(e=>e.id)),l=e.flatMap(e=>e.deps.filter(t=>c.has(t)&&!GT(t,e.id)).map(t=>({id:`${t}->${e.id}`,source:t,target:e.id}))),u=new Map;for(let t of hT(e))c.has(t.dependent)&&u.set(t.ghostId,[...u.get(t.ghostId)??[],t.dependent]);let d=[...u].flatMap(([e,t])=>t.map(t=>({source:e,target:t}))),f=new Map(e.map(e=>[e.id,e.parent])),p=i?new Set([i,...[...l,...d].filter(e=>e.source===i||e.target===i).flatMap(e=>[e.source,e.target])].flatMap(e=>{let t=[e];for(let n=f.get(e);n;n=f.get(n))t.push(n);return t})):null,m=e=>e.split(`-`)[0]??e,h=new Set(e.filter(e=>e.status===`done`).map(e=>e.id)),g=new Set,_=new Set;for(let e of l){let t=a.has(e.source)||a.has(e.target),n=m(e.source)!==m(e.target)&&h.has(e.source);(t||n)&&(a.has(e.source)||_.add(e.source),a.has(e.target)||g.add(e.target))}let v=e=>r===`area`?n[e.area]??`#94a3b8`:hw[e.status]?.colour??`#94a3b8`,y=e=>({item:e,colour:v(e),statusColour:hw[e.status]?.colour??`#94a3b8`,selected:e.id===i,dimmed:p?!p.has(e.id):!1,hiddenLinkIn:g.has(e.id),hiddenLinkOut:_.has(e.id)}),b=(t,n)=>{let{placements:r,box:i}=$T(n,e,o);return{nodes:n.flatMap(n=>{let i=r.get(n.id),o={x:jT+i.x,y:MT+i.y},s=WT(e,n.id);if(s.length>0){let e=b(n.id,s);return[{id:n.id,type:`ticket`,parentId:t,position:o,hidden:a.has(n.id),style:{width:e.box.width,height:e.box.height},data:{...y(n),count:s.length},zIndex:1},...e.nodes]}return[{id:n.id,type:`item`,parentId:t,position:o,hidden:a.has(n.id),style:{width:yT,height:kT(n)},data:y(n),zIndex:3}]}),box:i}},x=t.flatMap(t=>{let n=e.filter(e=>e.area===t&&e.parent===null);if(n.length===0)return[];if(s.has(t))return[{area:t,inner:{nodes:[],box:FT},size:FT}];let r=b(`area:${t}`,n);return[{area:t,inner:r,size:r.box}]}),S=uE([...[...new Set([...u.keys()].map(e=>e.split(`:`)[1]))].sort().map(e=>{let t=[...u.keys()].filter(t=>t.startsWith(`elsewhere:${e}:`)).map(t=>t.slice(`elsewhere:${e}:`.length)).sort(),n=t.map((t,n)=>{let r=pT(e,t);return{id:r,type:`ghost`,parentId:`area:${mT(e)}`,position:{x:jT,y:MT+n*46},hidden:(u.get(r)??[]).every(e=>a.has(e)),data:{project:e,ref:t,dimmed:p?!p.has(r):!1},style:{width:yT,height:LT},zIndex:3}}),r={width:248,height:MT+t.length*LT+(t.length-1)*RT+NT};return{area:mT(e),foreign:e,inner:{nodes:n,box:r},size:r}}),...x],e),C=S.map(e=>({id:e.area,...e.size})),w={placements:rE(C.map(e=>({...e,deps:[]})),e=>o[`area:${e}`],PT,1.6,()=>YT(C,ZT(C,PT,1.6),PT).placements,`best-fit`)};return S.flatMap(t=>{let r=w.placements.get(t.area);if(t.foreign!==void 0)return[{id:`area:${t.area}`,type:`area`,position:{x:r.x,y:r.y},hidden:t.inner.nodes.every(e=>e.hidden===!0),data:{area:t.foreign,colour:`#64748b`,count:t.inner.nodes.length,foreign:!0},style:{width:t.size.width,height:t.size.height},zIndex:0},...t.inner.nodes];let i=e.filter(e=>e.area===t.area);if(s.has(t.area)){let e=new Map;for(let t of i)e.set(t.status,(e.get(t.status)??0)+1);return[{id:IT(t.area),type:`area`,position:{x:r.x,y:r.y},hidden:i.every(e=>a.has(e.id)),data:{area:t.area,colour:n[t.area]??`#94a3b8`,count:i.length,collapsed:{byStatus:Object.keys(hw).flatMap(t=>e.has(t)?[[t,e.get(t)]]:[])}},style:{width:FT.width,height:FT.height},zIndex:3}]}return[{id:`area:${t.area}`,type:`area`,position:{x:r.x,y:r.y},hidden:i.every(e=>a.has(e.id)),data:{area:t.area,colour:n[t.area]??`#94a3b8`,count:i.length},style:{width:t.size.width,height:t.size.height},zIndex:0},...t.inner.nodes]})}function fE(e){let t={};for(let n of e)n.type!==`ghost`&&(t[n.id]=pE(n.parentId,n.position));return t}var pE=(e,t)=>e?{x:VT(t.x-jT),y:VT(t.y-MT)}:{x:VT(t.x),y:VT(t.y)};function mE(e,t,n,r,i,a,o,s=new Set){let c=new Set(e.map(e=>e.id)),l=e=>s.has(e.split(`-`)[0]??e)?IT(e.split(`-`)[0]??e):e,u=new Set(e.filter(e=>e.status===`done`).map(e=>e.id)),d=e=>e.split(`-`)[0]??e,f=e=>n===`area`?t[e.area]??`#94a3b8`:hw[e.status]?.colour??`#94a3b8`,p=hT(e).filter(e=>c.has(e.dependent)).map(e=>{let t=`${e.ghostId}->${e.dependent}`,n=r===e.ghostId||r===e.dependent,s=i!=null&&(e.ghostId===i||e.dependent===i),c=n||s||t===a,u=o.has(e.dependent);return{id:t,source:e.ghostId,target:l(e.dependent),type:`smoothstep`,pathOptions:{borderRadius:12},hidden:u&&!s,animated:n,zIndex:-1,style:{stroke:c?`#cbd5e1`:`#7c8aa0`,strokeWidth:c?2.5:1.2,strokeDasharray:`6 5`,opacity:c?1:r?.08:.4}}});return[...hE(e.flatMap(e=>e.deps.filter(t=>c.has(t)&&!GT(t,e.id)).map(t=>{let n=`${t}->${e.id}`,s=r===t||r===e.id,c=i!=null&&(t===i||e.id===i),l=d(t)!==d(e.id),p=s||c||n===a,m=l&&u.has(t),h=o.has(t)||o.has(e.id),g=c&&h;return{id:n,source:t,target:e.id,type:`smoothstep`,pathOptions:{borderRadius:12},hidden:h&&!g||m&&!p,animated:s,zIndex:-1,style:{stroke:p?f(e):`#7c8aa0`,strokeWidth:p?2.5:l?1.2:1.5,strokeDasharray:l?`6 5`:void 0,opacity:p?1:r?l?.08:.12:l?.4:.6}}})),l,s.size>0),...p.filter((e,t,n)=>n.findIndex(t=>t.source===e.source&&t.target===e.target)===t)]}function hE(e,t,n){if(!n)return e;let r=new Map;for(let n of e){let[e,i]=[t(n.source),t(n.target)];if(e===i)continue;let a=`${e}->${i}`,o=(n.style?.opacity??0)===1,s=r.get(a);s===void 0?r.set(a,{edge:{...n,id:a,source:e,target:i},count:1,allHidden:n.hidden===!0}):(s.count+=1,s.allHidden&&=n.hidden===!0,o&&(s.edge={...n,id:a,source:e,target:i}))}return[...r.values()].map(({edge:e,count:t,allHidden:n})=>({...e,hidden:n,...t>1?{label:String(t),labelBgPadding:[4,2],labelBgBorderRadius:4,labelStyle:{fill:`#dce3ec`,fontSize:11},labelBgStyle:{fill:`#1e2836`}}:{}}))}function gE({data:e}){let{item:t,colour:n,statusColour:r,selected:i,dimmed:a,hiddenLinkIn:o,hiddenLinkOut:s}=e,c=hw[t.status];return(0,b.jsxs)(`div`,{className:`item-node`,"data-selected":i,"data-dimmed":a,style:{"--area":n},children:[(0,b.jsx)(Ku,{type:`target`,position:B.Left,className:o?`handle--hidden-link`:void 0}),(0,b.jsx)(`div`,{className:`item-node__rail`}),(0,b.jsxs)(`div`,{className:`item-node__body`,children:[(0,b.jsxs)(`div`,{className:`item-node__meta`,children:[(0,b.jsx)(`span`,{className:`item-node__id`,children:t.id}),(0,b.jsx)(`span`,{className:`item-node__status`,title:c?.label??t.status,style:{color:r},children:c?.icon??`?`})]}),(0,b.jsx)(`div`,{className:`item-node__title`,"data-strike":c?.strike??!1,children:t.title})]}),(0,b.jsx)(Ku,{type:`source`,position:B.Right,className:s?`handle--hidden-link`:void 0})]})}function _E({data:e,selected:t}){return e.collapsed===void 0?(0,b.jsxs)(`div`,{className:`area-box`,"data-foreign":e.foreign===!0,style:{"--area":e.colour},children:[(0,b.jsx)(fp,{isVisible:t,minWidth:220,minHeight:120,lineClassName:`box-resize-line`,handleClassName:`box-resize-handle`}),(0,b.jsxs)(`div`,{className:`area-box__title`,children:[(0,b.jsx)(`span`,{className:`area-box__name`,children:e.area}),(0,b.jsx)(`span`,{className:`area-box__count`,children:e.count})]})]}):(0,b.jsxs)(`div`,{className:`area-box area-box--collapsed`,style:{"--area":e.colour},title:`Click to open this area`,children:[(0,b.jsx)(Ku,{type:`target`,position:B.Left}),(0,b.jsxs)(`div`,{className:`area-box__title`,children:[(0,b.jsx)(`span`,{className:`area-box__name`,children:e.area}),(0,b.jsx)(`span`,{className:`area-box__count`,children:e.count})]}),(0,b.jsx)(`div`,{className:`area-box__summary`,children:e.collapsed.byStatus.map(([e,t])=>(0,b.jsxs)(`span`,{className:`area-box__status`,style:{color:hw[e].colour},title:e,children:[hw[e].icon,` `,t]},e))}),(0,b.jsx)(Ku,{type:`source`,position:B.Right})]})}function vE({data:e}){let{item:t,colour:n,statusColour:r,count:i,selected:a,dimmed:o,hiddenLinkIn:s,hiddenLinkOut:c}=e,l=hw[t.status];return(0,b.jsxs)(`div`,{className:`ticket-box`,"data-selected":a,"data-dimmed":o,style:{"--area":n},children:[(0,b.jsx)(fp,{isVisible:a,minWidth:200,minHeight:100,lineClassName:`box-resize-line`,handleClassName:`box-resize-handle`}),(0,b.jsx)(Ku,{type:`target`,position:B.Left,className:s?`handle--hidden-link`:void 0}),(0,b.jsxs)(`div`,{className:`ticket-box__title`,children:[(0,b.jsx)(`span`,{className:`ticket-box__id`,children:t.id}),(0,b.jsx)(`span`,{className:`ticket-box__status`,title:l?.label??t.status,style:{color:r},children:l?.icon??`?`}),(0,b.jsx)(`span`,{className:`ticket-box__label`,"data-strike":l?.strike??!1,children:t.title}),(0,b.jsx)(`span`,{className:`ticket-box__count`,children:i})]}),(0,b.jsx)(Ku,{type:`source`,position:B.Right,className:c?`handle--hidden-link`:void 0})]})}function yE({data:e}){let{project:t,ref:n,dimmed:r}=e;return(0,b.jsxs)(`div`,{className:`ghost-node`,"data-dimmed":r,title:`${n} lives in the ${t} project, which is not open here`,children:[(0,b.jsx)(`span`,{className:`ghost-node__ref`,children:n}),(0,b.jsx)(Ku,{type:`source`,position:B.Right})]})}var bE=`roadmap.positions.v2`,xE=`roadmap.layout.v1`,SE=`roadmap.sizes.v2`,CE=(e,t)=>`${e}:${t}`;function wE(e){try{let t=localStorage.getItem(e);return t?JSON.parse(t):{}}catch{return{}}}function TE(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}var EE=e=>wE(CE(xE,e)),DE=(e,t)=>TE(CE(xE,e),t),OE=e=>wE(CE(SE,e)),kE=(e,t)=>TE(CE(SE,e),t);function AE(e){try{localStorage.removeItem(CE(xE,e)),localStorage.removeItem(CE(bE,e)),localStorage.removeItem(CE(SE,e))}catch{}}var jE=e=>`${hw[e].icon} ${hw[e].label}`;function ME({projectKey:e,ref_:t,status:n,reload:r}){let[i,a]=(0,_.useState)(!1),[o,s]=(0,_.useState)(null);if((0,_.useEffect)(()=>s(null),[t]),!bb())return(0,b.jsx)(`span`,{className:`detail__status`,children:jE(n)});async function c(i){if(i!==n){a(!0),s(null);try{await Sb(e,t,i)}catch(e){s(e instanceof Error?e.message:String(e))}finally{a(!1),r()}}}return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`select`,{className:`detail__status detail__status--edit`,value:n,disabled:i,"aria-label":`Status`,onChange:e=>void c(e.target.value),children:Object.keys(hw).map(e=>(0,b.jsx)(`option`,{value:e,children:jE(e)},e))}),o!==null&&(0,b.jsx)(`span`,{className:`detail__status-error`,children:o})]})}var NE,X,PE,FE,IE,LE,RE,zE,BE,VE={},HE=[],UE=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function WE(e,t){for(var n in t)e[n]=t[n];return e}function GE(e){var t=e.parentNode;t&&t.removeChild(e)}function Z(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?NE.call(arguments,2):n),typeof e==`function`&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return KE(e,o,r,i,null)}function KE(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++PE};return i==null&&X.vnode!=null&&X.vnode(a),a}function qE(){return{current:null}}function JE(e){return e.children}function YE(e,t,n,r,i){for(var a in n)a===`children`||a===`key`||a in t||ZE(e,a,null,n[a],r);for(a in t)i&&typeof t[a]!=`function`||a===`children`||a===`key`||a===`value`||a===`checked`||n[a]===t[a]||ZE(e,a,t[a],n[a],r)}function XE(e,t,n){t[0]===`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||UE.test(t)?n:n+`px`}function ZE(e,t,n,r,i){var a;n:if(t===`style`){if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||XE(e.style,t,``);if(n)for(t in n)r&&n[t]===r[t]||XE(e.style,t,n[t])}}else if(t[0]===`o`&&t[1]===`n`)a=t!==(t=t.replace(/Capture$/,``)),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||={},e.l[t+a]=n,n?r||e.addEventListener(t,a?$E:QE,a):e.removeEventListener(t,a?$E:QE,a);else if(t!==`dangerouslySetInnerHTML`){if(i)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!==`width`&&t!==`height`&&t!==`href`&&t!==`list`&&t!==`form`&&t!==`tabIndex`&&t!==`download`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t.indexOf(`-`)==-1?e.removeAttribute(t):e.setAttribute(t,n))}}function QE(e){IE=!0;try{return this.l[e.type+!1](X.event?X.event(e):e)}finally{IE=!1}}function $E(e){IE=!0;try{return this.l[e.type+!0](X.event?X.event(e):e)}finally{IE=!1}}function eD(e,t){this.props=e,this.context=t}function tD(e,t){if(t==null)return e.__?tD(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?tD(e):null}function nD(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return nD(e)}}function rD(e){IE?setTimeout(e):zE(e)}function iD(e){(!e.__d&&(e.__d=!0)&&LE.push(e)&&!aD.__r++||RE!==X.debounceRendering)&&((RE=X.debounceRendering)||rD)(aD)}function aD(){var e,t,n,r,i,a,o,s;for(LE.sort(function(e,t){return e.__v.__b-t.__v.__b});e=LE.shift();)e.__d&&(t=LE.length,r=void 0,i=void 0,o=(a=(n=e).__v).__e,(s=n.__P)&&(r=[],(i=WE({},a)).__v=a.__v+1,dD(s,a,i,n.__n,s.ownerSVGElement!==void 0,a.__h==null?null:[o],r,o??tD(a),a.__h),fD(r,a),a.__e!=o&&nD(a)),LE.length>t&&LE.sort(function(e,t){return e.__v.__b-t.__v.__b}));aD.__r=0}function oD(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_=r&&r.__k||HE,v=_.length;for(n.__k=[],u=0;u<t.length;u++)if((p=n.__k[u]=(p=t[u])==null||typeof p==`boolean`?null:typeof p==`string`||typeof p==`number`||typeof p==`bigint`?KE(null,p,null,null,p):Array.isArray(p)?KE(JE,{children:p},null,null,null):p.__b>0?KE(p.type,p.props,p.key,p.ref?p.ref:null,p.__v):p)!=null){if(p.__=n,p.__b=n.__b+1,(f=_[u])===null||f&&p.key==f.key&&p.type===f.type)_[u]=void 0;else for(d=0;d<v;d++){if((f=_[d])&&p.key==f.key&&p.type===f.type){_[d]=void 0;break}f=null}dD(e,p,f||=VE,i,a,o,s,c,l),m=p.__e,(d=p.ref)&&f.ref!=d&&(g||=[],f.ref&&g.push(f.ref,null,p),g.push(d,p.__c||m,p)),m==null?c&&f.__e==c&&c.parentNode!=e&&(c=tD(f)):(h??=m,typeof p.type==`function`&&p.__k===f.__k?p.__d=c=sD(p,c,e):c=lD(e,p,f,_,m,c),typeof n.type==`function`&&(n.__d=c))}for(n.__e=h,u=v;u--;)_[u]!=null&&(typeof n.type==`function`&&_[u].__e!=null&&_[u].__e==n.__d&&(n.__d=uD(r).nextSibling),hD(_[u],_[u]));if(g)for(u=0;u<g.length;u++)mD(g[u],g[++u],g[++u])}function sD(e,t,n){for(var r,i=e.__k,a=0;i&&a<i.length;a++)(r=i[a])&&(r.__=e,t=typeof r.type==`function`?sD(r,t,n):lD(n,r,r,i,r.__e,t));return t}function cD(e,t){return t||=[],e==null||typeof e==`boolean`||(Array.isArray(e)?e.some(function(e){cD(e,t)}):t.push(e)),t}function lD(e,t,n,r,i,a){var o,s,c;if(t.__d!==void 0)o=t.__d,t.__d=void 0;else if(n==null||i!=a||i.parentNode==null)n:if(a==null||a.parentNode!==e)e.appendChild(i),o=null;else{for(s=a,c=0;(s=s.nextSibling)&&c<r.length;c+=1)if(s==i)break n;e.insertBefore(i,a),o=a}return o===void 0?i.nextSibling:o}function uD(e){var t,n,r;if(e.type==null||typeof e.type==`string`)return e.__e;if(e.__k){for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=uD(n)))return r}return null}function dD(e,t,n,r,i,a,o,s,c){var l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(c=n.__h,s=t.__e=n.__e,t.__h=null,a=[s]),(l=X.__b)&&l(t);try{n:if(typeof w==`function`){if(g=t.props,_=(l=w.contextType)&&r[l.__c],v=l?_?_.props.value:l.__:r,n.__c?h=(u=t.__c=n.__c).__=u.__E:(`prototype`in w&&w.prototype.render?t.__c=u=new w(g,v):(t.__c=u=new eD(g,v),u.constructor=w,u.render=gD),_&&_.sub(u),u.props=g,u.state||(u.state={}),u.context=v,u.__n=r,d=u.__d=!0,u.__h=[],u._sb=[]),u.__s??(u.__s=u.state),w.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=WE({},u.__s)),WE(u.__s,w.getDerivedStateFromProps(g,u.__s))),f=u.props,p=u.state,u.__v=t,d)w.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(w.getDerivedStateFromProps==null&&g!==f&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(g,v),!u.__e&&u.shouldComponentUpdate!=null&&!1===u.shouldComponentUpdate(g,u.__s,v)||t.__v===n.__v){for(t.__v!==n.__v&&(u.props=g,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(e){e&&(e.__=t)}),y=0;y<u._sb.length;y++)u.__h.push(u._sb[y]);u._sb=[],u.__h.length&&o.push(u);break n}u.componentWillUpdate!=null&&u.componentWillUpdate(g,u.__s,v),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(f,p,m)})}if(u.context=v,u.props=g,u.__P=e,b=X.__r,x=0,`prototype`in w&&w.prototype.render){for(u.state=u.__s,u.__d=!1,b&&b(t),l=u.render(u.props,u.state,u.context),S=0;S<u._sb.length;S++)u.__h.push(u._sb[S]);u._sb=[]}else do u.__d=!1,b&&b(t),l=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++x<25);u.state=u.__s,u.getChildContext!=null&&(r=WE(WE({},r),u.getChildContext())),d||u.getSnapshotBeforeUpdate==null||(m=u.getSnapshotBeforeUpdate(f,p)),C=l!=null&&l.type===JE&&l.key==null?l.props.children:l,oD(e,Array.isArray(C)?C:[C],t,n,r,i,a,o,s,c),u.base=t.__e,t.__h=null,u.__h.length&&o.push(u),h&&(u.__E=u.__=null),u.__e=!1}else a==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=pD(n.__e,t,n,r,i,a,o,c);(l=X.diffed)&&l(t)}catch(e){t.__v=null,(c||a!=null)&&(t.__e=s,t.__h=!!c,a[a.indexOf(s)]=null),X.__e(e,t,n)}}function fD(e,t){X.__c&&X.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){X.__e(e,t.__v)}})}function pD(e,t,n,r,i,a,o,s){var c,l,u,d=n.props,f=t.props,p=t.type,m=0;if(p===`svg`&&(i=!0),a!=null){for(;m<a.length;m++)if((c=a[m])&&`setAttribute`in c==!!p&&(p?c.localName===p:c.nodeType===3)){e=c,a[m]=null;break}}if(e==null){if(p===null)return document.createTextNode(f);e=i?document.createElementNS(`http://www.w3.org/2000/svg`,p):document.createElement(p,f.is&&f),a=null,s=!1}if(p===null)d===f||s&&e.data===f||(e.data=f);else{if(a&&=NE.call(e.childNodes),l=(d=n.props||VE).dangerouslySetInnerHTML,u=f.dangerouslySetInnerHTML,!s){if(a!=null)for(d={},m=0;m<e.attributes.length;m++)d[e.attributes[m].name]=e.attributes[m].value;(u||l)&&(u&&(l&&u.__html==l.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||``))}if(YE(e,f,d,i,s),u)t.__k=[];else if(m=t.props.children,oD(e,Array.isArray(m)?m:[m],t,n,r,i&&p!==`foreignObject`,a,o,a?a[0]:n.__k&&tD(n,0),s),a!=null)for(m=a.length;m--;)a[m]!=null&&GE(a[m]);s||(`value`in f&&(m=f.value)!==void 0&&(m!==e.value||p===`progress`&&!m||p===`option`&&m!==d.value)&&ZE(e,`value`,m,d.value,!1),`checked`in f&&(m=f.checked)!==void 0&&m!==e.checked&&ZE(e,`checked`,m,d.checked,!1))}return e}function mD(e,t,n){try{typeof e==`function`?e(t):e.current=t}catch(e){X.__e(e,n)}}function hD(e,t,n){var r,i;if(X.unmount&&X.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||mD(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){X.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&hD(r[i],t,n||typeof e.type!=`function`);n||e.__e==null||GE(e.__e),e.__=e.__e=e.__d=void 0}function gD(e,t,n){return this.constructor(e,n)}function _D(e,t,n){var r,i,a;X.__&&X.__(e,t),i=(r=typeof n==`function`)?null:n&&n.__k||t.__k,a=[],dD(t,e=(!r&&n||t).__k=Z(JE,null,[e]),i||VE,VE,t.ownerSVGElement!==void 0,!r&&n?[n]:i?null:t.firstChild?NE.call(t.childNodes):null,a,!r&&n?n:i?i.__e:t.firstChild,r),fD(a,e)}function vD(e,t){var n={__c:t=`__cC`+BE++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(function(e){e.__e=!0,iD(e)})},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}NE=HE.slice,X={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},PE=0,FE=function(e){return e!=null&&e.constructor===void 0},IE=!1,eD.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=WE({},this.state);typeof e==`function`&&(e=e(WE({},n),this.props)),e&&WE(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),iD(this))},eD.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),iD(this))},eD.prototype.render=JE,LE=[],zE=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,aD.__r=0,BE=0;var yD,bD,xD,SD=[],CD=[],wD=X.__b,TD=X.__r,ED=X.diffed,DD=X.__c,OD=X.unmount;function kD(){for(var e;e=SD.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(MD),e.__H.__h.forEach(ND),e.__H.__h=[]}catch(t){e.__H.__h=[],X.__e(t,e.__v)}}X.__b=function(e){yD=null,wD&&wD(e)},X.__r=function(e){TD&&TD(e);var t=(yD=e.__c).__H;t&&(bD===yD?(t.__h=[],yD.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.__V=CD,e.__N=e.i=void 0})):(t.__h.forEach(MD),t.__h.forEach(ND),t.__h=[])),bD=yD},X.diffed=function(e){ED&&ED(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(SD.push(t)!==1&&xD===X.requestAnimationFrame||((xD=X.requestAnimationFrame)||jD)(kD)),t.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.__V!==CD&&(e.__=e.__V),e.i=void 0,e.__V=CD})),bD=yD=null},X.__c=function(e,t){t.some(function(e){try{e.__h.forEach(MD),e.__h=e.__h.filter(function(e){return!e.__||ND(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],X.__e(n,e.__v)}}),DD&&DD(e,t)},X.unmount=function(e){OD&&OD(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{MD(e)}catch(e){t=e}}),n.__H=void 0,t&&X.__e(t,n.__v))};var AD=typeof requestAnimationFrame==`function`;function jD(e){var t,n=function(){clearTimeout(r),AD&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);AD&&(t=requestAnimationFrame(n))}function MD(e){var t=yD,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),yD=t}function ND(e){var t=yD;e.__c=e.__(),yD=t}function PD(e,t){for(var n in t)e[n]=t[n];return e}function FD(e,t){for(var n in e)if(n!==`__source`&&!(n in t))return!0;for(var r in t)if(r!==`__source`&&e[r]!==t[r])return!0;return!1}function ID(e){this.props=e}(ID.prototype=new eD).isPureReactComponent=!0,ID.prototype.shouldComponentUpdate=function(e,t){return FD(this.props,e)||FD(this.state,t)};var LD=X.__b;X.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),LD&&LD(e)},typeof Symbol<`u`&&Symbol.for;var RD=X.__e;X.__e=function(e,t,n,r){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e??(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}RD(e,t,n,r)};var zD=X.unmount;function BD(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){typeof e.__c==`function`&&e.__c()}),e.__c.__H=null),(e=PD({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return BD(e,t,n)})),e}function VD(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return VD(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function HD(){this.__u=0,this.t=null,this.__b=null}function UD(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function WD(){this.u=null,this.o=null}X.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),zD&&zD(e)},(HD.prototype=new eD).__c=function(e,t){var n=t.__c,r=this;r.t??=[],r.t.push(n);var i=UD(r.__v),a=!1,o=function(){a||(a=!0,n.__R=null,i?i(s):s())};n.__R=o;var s=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=VD(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},HD.prototype.componentWillUnmount=function(){this.t=[]},HD.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement(`div`),r=this.__v.__k[0].__c;this.__v.__k[0]=BD(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&Z(JE,null,e.fallback);return i&&(i.__h=null),[Z(JE,null,t.__a?null:e.children),i]};var GD=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!==`t`||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function KD(e){return this.getChildContext=function(){return e.context},e.children}function qD(e){var t=this,n=e.i;t.componentWillUnmount=function(){_D(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||=(t.i=n,{nodeType:1,parentNode:n,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),_D(Z(KD,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function JD(e,t){var n=Z(qD,{__v:e,i:t});return n.containerInfo=t,n}(WD.prototype=new eD).__a=function(e){var t=this,n=UD(t.__v),r=t.o.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),GD(t,e,r)):i()};n?n(a):a()}},WD.prototype.render=function(e){this.u=null,this.o=new Map;var t=cD(e.children);e.revealOrder&&e.revealOrder[0]===`b`&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},WD.prototype.componentDidUpdate=WD.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){GD(e,n,t)})};var YD=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.element`)||60103,XD=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ZD=typeof document<`u`,QD=function(e){return(typeof Symbol<`u`&&typeof Symbol()==`symbol`?/fil|che|rad/i:/fil|che|ra/i).test(e)};eD.prototype.isReactComponent={},[`componentWillMount`,`componentWillReceiveProps`,`componentWillUpdate`].forEach(function(e){Object.defineProperty(eD.prototype,e,{configurable:!0,get:function(){return this[`UNSAFE_`+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var $D=X.event;function eO(){}function tO(){return this.cancelBubble}function nO(){return this.defaultPrevented}X.event=function(e){return $D&&(e=$D(e)),e.persist=eO,e.isPropagationStopped=tO,e.isDefaultPrevented=nO,e.nativeEvent=e};var rO={configurable:!0,get:function(){return this.class}},iO=X.vnode;X.vnode=function(e){var t=e.type,n=e.props,r=n;if(typeof t==`string`){var i=t.indexOf(`-`)===-1;for(var a in r={},n){var o=n[a];ZD&&a===`children`&&t===`noscript`||a===`value`&&`defaultValue`in n&&o==null||(a===`defaultValue`&&`value`in n&&n.value==null?a=`value`:a===`download`&&!0===o?o=``:/ondoubleclick/i.test(a)?a=`ondblclick`:/^onchange(textarea|input)/i.test(a+t)&&!QD(n.type)?a=`oninput`:/^onfocus$/i.test(a)?a=`onfocusin`:/^onblur$/i.test(a)?a=`onfocusout`:/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(a)?a=a.toLowerCase():i&&XD.test(a)?a=a.replace(/[A-Z0-9]/g,`-$&`).toLowerCase():o===null&&(o=void 0),/^oninput$/i.test(a)&&(a=a.toLowerCase(),r[a]&&(a=`oninputCapture`)),r[a]=o)}t==`select`&&r.multiple&&Array.isArray(r.value)&&(r.value=cD(n.children).forEach(function(e){e.props.selected=r.value.indexOf(e.props.value)!=-1})),t==`select`&&r.defaultValue!=null&&(r.value=cD(n.children).forEach(function(e){e.props.selected=r.multiple?r.defaultValue.indexOf(e.props.value)!=-1:r.defaultValue==e.props.value})),e.props=r,n.class!=n.className&&(rO.enumerable=`className`in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",rO))}e.$$typeof=YD,iO&&iO(e)};var aO=X.__r;X.__r=function(e){aO&&aO(e),e.__c};var oO=[],sO=new Map;function cO(e){oO.push(e),sO.forEach(t=>{fO(t,e)})}function lO(e){e.isConnected&&e.getRootNode&&uO(e.getRootNode())}function uO(e){let t=sO.get(e);if(!t||!t.isConnected){if(t=e.querySelector(`style[data-fullcalendar]`),!t){t=document.createElement(`style`),t.setAttribute(`data-fullcalendar`,``);let n=mO();n&&(t.nonce=n);let r=e===document?document.head:e,i=e===document?r.querySelector(`script,link[rel=stylesheet],link[as=style],style`):r.firstChild;r.insertBefore(t,i)}sO.set(e,t),dO(t)}}function dO(e){for(let t of oO)fO(e,t)}function fO(e,t){let{sheet:n}=e,r=n.cssRules.length;t.split(`}`).forEach((e,t)=>{e=e.trim(),e&&n.insertRule(e+`}`,r+t)})}var pO;function mO(){return pO===void 0&&(pO=hO()),pO}function hO(){let e=document.querySelector(`meta[name="csp-nonce"]`);if(e&&e.hasAttribute(`content`))return e.getAttribute(`content`);let t=document.querySelector(`script[nonce]`);return t&&t.nonce||``}typeof document<`u`&&uO(document),cO(`:root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:"\\e900"}.fc-icon-chevron-right:before{content:"\\e901"}.fc-icon-chevrons-left:before{content:"\\e902"}.fc-icon-chevrons-right:before{content:"\\e903"}.fc-icon-minus-square:before{content:"\\e904"}.fc-icon-plus-square:before{content:"\\e905"}.fc-icon-x:before{content:"\\e906"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:"";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:"";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}`);var gO=class{constructor(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}request(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),e==null?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))}pause(e=``){let{pauseDepths:t}=this;t[e]=(t[e]||0)+1,this.clearTimeout()}resume(e=``,t){let{pauseDepths:n}=this;e in n&&(t?delete n[e]:(--n[e],n[e]<=0&&delete n[e]),this.tryDrain())}isPaused(){return Object.keys(this.pauseDepths).length}tryDrain(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}}clear(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}}clearTimeout(){this.timeoutId&&=(clearTimeout(this.timeoutId),0)}drained(){this.drainedOption&&this.drainedOption()}};function _O(e){e.parentNode&&e.parentNode.removeChild(e)}function vO(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(yO(e,t))return e;e=e.parentElement||e.parentNode}while(e!==null&&e.nodeType===1);return null}function yO(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}function bO(e,t){let n=e instanceof HTMLElement?[e]:e,r=[];for(let e=0;e<n.length;e+=1){let i=n[e].querySelectorAll(t);for(let e=0;e<i.length;e+=1)r.push(i[e])}return r}var xO=/(top|left|right|bottom|width|height)$/i;function SO(e,t){for(let n in t)CO(e,n,t[n])}function CO(e,t,n){n==null?e.style[t]=``:typeof n==`number`&&xO.test(t)?e.style[t]=`${n}px`:e.style[t]=n}function wO(e){return e.composedPath?.call(e)[0]??e.target}var TO=0;function EO(){return TO+=1,`fc-dom-`+TO}function DO(e,t){return n=>{let r=vO(n.target,e);r&&t.call(r,n,r)}}function OO(e,t,n,r){let i=DO(n,r);return e.addEventListener(t,i),()=>{e.removeEventListener(t,i)}}function kO(e,t,n,r){let i;return OO(e,`mouseover`,t,(e,t)=>{if(t!==i){i=t,n(e,t);let a=e=>{i=null,r(e,t),t.removeEventListener(`mouseleave`,a)};t.addEventListener(`mouseleave`,a)}})}function AO(e){return Object.assign({onClick:e},jO(e))}function jO(e){return{tabIndex:0,onKeyDown(t){(t.key===`Enter`||t.key===` `)&&(e(t),t.preventDefault())}}}var MO=0;function NO(){return MO+=1,String(MO)}function PO(e){let t=[],n=[],r,i;for(typeof e==`string`?n=e.split(/\s*,\s*/):typeof e==`function`?n=[e]:Array.isArray(e)&&(n=e),r=0;r<n.length;r+=1)i=n[r],typeof i==`string`?t.push(i.charAt(0)===`-`?{field:i.substring(1),order:-1}:{field:i,order:1}):typeof i==`function`&&t.push({func:i});return t}function FO(e,t,n){let r,i;for(r=0;r<n.length;r+=1)if(i=IO(e,t,n[r]),i)return i;return 0}function IO(e,t,n){return n.func?n.func(e,t):LO(e[n.field],t[n.field])*(n.order||1)}function LO(e,t){return!e&&!t?0:t==null?-1:e==null?1:typeof e==`string`||typeof t==`string`?String(e).localeCompare(String(t)):e-t}function RO(e,t){let n=String(e);return`000`.substr(0,t-n.length)+n}function zO(e,t,n){return typeof e==`function`?e(...t):typeof e==`string`?t.reduce((e,t,n)=>e.replace(`$`+n,t||``),e):n}function BO(e){return e%1==0}function VO(e){let t=e.querySelector(`.fc-scrollgrid-shrink-frame`),n=e.querySelector(`.fc-scrollgrid-shrink-cushion`);if(!t)throw Error(`needs fc-scrollgrid-shrink-frame className`);if(!n)throw Error(`needs fc-scrollgrid-shrink-cushion className`);return e.getBoundingClientRect().width-t.getBoundingClientRect().width+n.getBoundingClientRect().width}var HO=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function UO(e,t){return typeof e==`string`?WO(e):typeof e==`object`&&e?GO(e):typeof e==`number`?GO({[t||`milliseconds`]:e}):null}function WO(e){let t=HO.exec(e);if(t){let e=t[1]?-1:1;return{years:0,months:0,days:e*(t[2]?parseInt(t[2],10):0),milliseconds:e*((t[3]?parseInt(t[3],10):0)*60*60*1e3+(t[4]?parseInt(t[4],10):0)*60*1e3+(t[5]?parseInt(t[5],10):0)*1e3+(t[6]?parseInt(t[6],10):0))}}return null}function GO(e){let t={years:e.years||e.year||0,months:e.months||e.month||0,days:e.days||e.day||0,milliseconds:(e.hours||e.hour||0)*60*60*1e3+(e.minutes||e.minute||0)*60*1e3+(e.seconds||e.second||0)*1e3+(e.milliseconds||e.millisecond||e.ms||0)},n=e.weeks||e.week;return n&&(t.days+=n*7,t.specifiedWeeks=!0),t}function KO(e,t){return e.years===t.years&&e.months===t.months&&e.days===t.days&&e.milliseconds===t.milliseconds}function qO(e,t){return{years:e.years-t.years,months:e.months-t.months,days:e.days-t.days,milliseconds:e.milliseconds-t.milliseconds}}function JO(e){return XO(e)/365}function YO(e){return XO(e)/30}function XO(e){return ZO(e)/864e5}function ZO(e){return e.years*31536e6+e.months*2592e6+e.days*864e5+e.milliseconds}function QO(e){let t=e.milliseconds;if(t){if(t%1e3!=0)return{unit:`millisecond`,value:t};if(t%6e4!=0)return{unit:`second`,value:t/1e3};if(t%36e5!=0)return{unit:`minute`,value:t/6e4};if(t)return{unit:`hour`,value:t/36e5}}return e.days?e.specifiedWeeks&&e.days%7==0?{unit:`week`,value:e.days/7}:{unit:`day`,value:e.days}:e.months?{unit:`month`,value:e.months}:e.years?{unit:`year`,value:e.years}:{unit:`millisecond`,value:0}}function $O(e,t,n){if(e===t)return!0;let r=e.length,i;if(r!==t.length)return!1;for(i=0;i<r;i+=1)if(!(n?n(e[i],t[i]):e[i]===t[i]))return!1;return!0}var ek=[`sun`,`mon`,`tue`,`wed`,`thu`,`fri`,`sat`];function tk(e,t){let n=xk(e);return n[2]+=t*7,Sk(n)}function nk(e,t){let n=xk(e);return n[2]+=t,Sk(n)}function rk(e,t){let n=xk(e);return n[6]+=t,Sk(n)}function ik(e,t){return ak(e,t)/7}function ak(e,t){return(t.valueOf()-e.valueOf())/864e5}function ok(e,t){return(t.valueOf()-e.valueOf())/36e5}function sk(e,t){return(t.valueOf()-e.valueOf())/6e4}function ck(e,t){return(t.valueOf()-e.valueOf())/1e3}function lk(e,t){let n=fk(e),r=fk(t);return{years:0,months:0,days:Math.round(ak(n,r)),milliseconds:t.valueOf()-r.valueOf()-(e.valueOf()-n.valueOf())}}function uk(e,t){let n=dk(e,t);return n!==null&&n%7==0?n/7:null}function dk(e,t){return wk(e)===wk(t)?Math.round(ak(e,t)):null}function fk(e){return Sk([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function pk(e){return Sk([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}function mk(e){return Sk([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}function hk(e){return Sk([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()])}function gk(e,t,n){let r=e.getUTCFullYear(),i=_k(e,r,t,n);if(i<1)return _k(e,r-1,t,n);let a=_k(e,r+1,t,n);return a>=1?Math.min(i,a):i}function _k(e,t,n,r){let i=Sk([t,0,1+vk(t,n,r)]),a=fk(e),o=Math.round(ak(i,a));return Math.floor(o/7)+1}function vk(e,t,n){let r=7+t-n;return-((7+Sk([e,0,r]).getUTCDay()-t)%7)+r-1}function yk(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function bk(e){return new Date(e[0],e[1]||0,e[2]==null?1:e[2],e[3]||0,e[4]||0,e[5]||0)}function xk(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function Sk(e){return e.length===1&&(e=e.concat([0])),new Date(Date.UTC(...e))}function Ck(e){return!isNaN(e.valueOf())}function wk(e){return e.getUTCHours()*1e3*60*60+e.getUTCMinutes()*1e3*60+e.getUTCSeconds()*1e3+e.getUTCMilliseconds()}function Tk(e,t,n=!1){let r=e.toISOString();return r=r.replace(`.000`,``),n&&(r=r.replace(`T00:00:00Z`,``)),r.length>10&&(t==null?r=r.replace(`Z`,``):t!==0&&(r=r.replace(`Z`,Ok(t,!0)))),r}function Ek(e){return e.toISOString().replace(/T.*$/,``)}function Dk(e){return e.toISOString().match(/^\d{4}-\d{2}/)[0]}function Ok(e,t=!1){let n=e<0?`-`:`+`,r=Math.abs(e),i=Math.floor(r/60),a=Math.round(r%60);return t?`${n+RO(i,2)}:${RO(a,2)}`:`GMT${n}${i}${a?`:${RO(a,2)}`:``}`}function Q(e,t,n){let r,i;return function(...a){if(!r)i=e.apply(this,a);else if(!$O(r,a)){n&&n(i);let r=e.apply(this,a);t&&t(r,i)||(i=r)}return r=a,i}}function kk(e,t,n){let r,i;return a=>{if(!r)i=e.call(this,a);else if(!mA(r,a)){n&&n(i);let r=e.call(this,a);t&&t(r,i)||(i=r)}return r=a,i}}var Ak={week:3,separator:9,omitZeroMinute:9,meridiem:9,omitCommas:9},jk={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},Mk=/\s*([ap])\.?m\.?/i,Nk=/,/g,Pk=/\s+/g,Fk=/\u200e/g,Ik=/UTC|GMT/,Lk=class{constructor(e){let t={},n={},r=9;for(let i in e)i in Ak?(n[i]=e[i],Ak[i]<9&&(r=Math.min(Ak[i],r))):(t[i]=e[i],i in jk&&(r=Math.min(jk[i],r)));this.standardDateProps=t,this.extendedSettings=n,this.smallestUnitNum=r,this.buildFormattingFunc=Q(Rk)}format(e,t){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,t)(e)}formatRange(e,t,n,r){let{standardDateProps:i,extendedSettings:a}=this,o=Wk(e.marker,t.marker,n.calendarSystem);if(!o)return this.format(e,n);let s=o;s>1&&(i.year===`numeric`||i.year===`2-digit`)&&(i.month===`numeric`||i.month===`2-digit`)&&(i.day===`numeric`||i.day===`2-digit`)&&(s=1);let c=this.format(e,n),l=this.format(t,n);if(c===l)return c;let u=Rk(Gk(i,s),a,n),d=u(e),f=u(t),p=Kk(c,d,l,f),m=a.separator||r||n.defaultSeparator||``;return p?p.before+d+m+f+p.after:c+m+l}getSmallestUnit(){switch(this.smallestUnitNum){case 7:case 6:case 5:return`year`;case 4:return`month`;case 3:return`week`;case 2:return`day`;default:return`time`}}};function Rk(e,t,n){let r=Object.keys(e).length;return r===1&&e.timeZoneName===`short`?e=>Ok(e.timeZoneOffset):r===0&&t.week?e=>Uk(n.computeWeekNumber(e.marker),n.weekText,n.weekTextLong,n.locale,t.week):zk(e,t,n)}function zk(e,t,n){e=Object.assign({},e),t=Object.assign({},t),Bk(e,t),e.timeZone=`UTC`;let r=new Intl.DateTimeFormat(n.locale.codes,e),i;if(t.omitZeroMinute){let t=Object.assign({},e);delete t.minute,i=new Intl.DateTimeFormat(n.locale.codes,t)}return a=>{let{marker:o}=a,s;return s=i&&!o.getUTCMinutes()?i:r,Vk(s.format(o),a,e,t,n)}}function Bk(e,t){e.timeZoneName&&(e.hour||=`2-digit`,e.minute||=`2-digit`),e.timeZoneName===`long`&&(e.timeZoneName=`short`),t.omitZeroMinute&&(e.second||e.millisecond)&&delete t.omitZeroMinute}function Vk(e,t,n,r,i){return e=e.replace(Fk,``),n.timeZoneName===`short`&&(e=Hk(e,i.timeZone===`UTC`||t.timeZoneOffset==null?`UTC`:Ok(t.timeZoneOffset))),r.omitCommas&&(e=e.replace(Nk,``).trim()),r.omitZeroMinute&&(e=e.replace(`:00`,``)),r.meridiem===!1?e=e.replace(Mk,``).trim():r.meridiem===`narrow`?e=e.replace(Mk,(e,t)=>t.toLocaleLowerCase()):r.meridiem===`short`?e=e.replace(Mk,(e,t)=>`${t.toLocaleLowerCase()}m`):r.meridiem===`lowercase`&&(e=e.replace(Mk,e=>e.toLocaleLowerCase())),e=e.replace(Pk,` `),e=e.trim(),e}function Hk(e,t){let n=!1;return e=e.replace(Ik,()=>(n=!0,t)),n||(e+=` ${t}`),e}function Uk(e,t,n,r,i){let a=[];return i===`long`?a.push(n):(i===`short`||i===`narrow`)&&a.push(t),(i===`long`||i===`short`)&&a.push(` `),a.push(r.simpleNumberFormat.format(e)),r.options.direction===`rtl`&&a.reverse(),a.join(``)}function Wk(e,t,n){return n.getMarkerYear(e)===n.getMarkerYear(t)?n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerDay(e)===n.getMarkerDay(t)?wk(e)===wk(t)?0:1:2:4:5}function Gk(e,t){let n={};for(let r in e)(!(r in jk)||jk[r]<=t)&&(n[r]=e[r]);return n}function Kk(e,t,n,r){let i=0;for(;i<e.length;){let a=e.indexOf(t,i);if(a===-1)break;let o=e.substr(0,a);i=a+t.length;let s=e.substr(i),c=0;for(;c<n.length;){let e=n.indexOf(r,c);if(e===-1)break;let t=n.substr(0,e);c=e+r.length;let i=n.substr(c);if(o===t&&s===i)return{before:o,after:s}}}return null}function qk(e,t){let n=t.markerToArray(e.marker);return{marker:e.marker,timeZoneOffset:e.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function Jk(e,t,n,r){let i=qk(e,n.calendarSystem);return{date:i,start:i,end:t?qk(t,n.calendarSystem):null,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}var Yk=class{constructor(e){this.cmdStr=e}format(e,t,n){return t.cmdFormatter(this.cmdStr,Jk(e,null,t,n))}formatRange(e,t,n,r){return n.cmdFormatter(this.cmdStr,Jk(e,t,n,r))}},Xk=class{constructor(e){this.func=e}format(e,t,n){return this.func(Jk(e,null,t,n))}formatRange(e,t,n,r){return this.func(Jk(e,t,n,r))}};function Zk(e){return typeof e==`object`&&e?new Lk(e):typeof e==`string`?new Yk(e):typeof e==`function`?new Xk(e):null}var Qk={navLinkDayClick:$,navLinkWeekClick:$,duration:UO,bootstrapFontAwesome:$,buttonIcons:$,customButtons:$,defaultAllDayEventDuration:UO,defaultTimedEventDuration:UO,nextDayThreshold:UO,scrollTime:UO,scrollTimeReset:Boolean,slotMinTime:UO,slotMaxTime:UO,dayPopoverFormat:Zk,slotDuration:UO,snapDuration:UO,headerToolbar:$,footerToolbar:$,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:Zk,dayHeaderClassNames:$,dayHeaderContent:$,dayHeaderDidMount:$,dayHeaderWillUnmount:$,dayCellClassNames:$,dayCellContent:$,dayCellDidMount:$,dayCellWillUnmount:$,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:$,weekNumbers:Boolean,weekNumberClassNames:$,weekNumberContent:$,weekNumberDidMount:$,weekNumberWillUnmount:$,editable:Boolean,viewClassNames:$,viewDidMount:$,viewWillUnmount:$,nowIndicator:Boolean,nowIndicatorSnap:$,nowIndicatorClassNames:$,nowIndicatorContent:$,nowIndicatorDidMount:$,nowIndicatorWillUnmount:$,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:$,locale:$,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:$,eventOrder:PO,eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:$,contentHeight:$,direction:String,weekNumberFormat:Zk,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:$,initialDate:$,now:$,eventDataTransform:$,stickyHeaderDates:$,stickyFooterScrollbar:$,viewHeight:$,defaultAllDay:Boolean,eventSourceFailure:$,eventSourceSuccess:$,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:$,eventConstraint:$,eventAllow:$,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:$,eventContent:$,eventDidMount:$,eventWillUnmount:$,selectConstraint:$,selectOverlap:$,selectAllow:$,droppable:Boolean,unselectCancel:String,slotLabelFormat:$,slotLaneClassNames:$,slotLaneContent:$,slotLaneDidMount:$,slotLaneWillUnmount:$,slotLabelClassNames:$,slotLabelContent:$,slotLabelDidMount:$,slotLabelWillUnmount:$,dayMaxEvents:$,dayMaxEventRows:$,dayMinWidth:Number,slotLabelInterval:UO,allDayText:String,allDayClassNames:$,allDayContent:$,allDayDidMount:$,allDayWillUnmount:$,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:Zk,rerenderDelay:Number,moreLinkText:$,moreLinkHint:$,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:$,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:UO,hiddenDays:$,fixedWeekCount:Boolean,validRange:$,visibleRange:$,titleFormat:$,eventInteractive:Boolean,noEventsText:String,viewHint:$,navLinkHint:$,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:$,moreLinkClassNames:$,moreLinkContent:$,moreLinkDidMount:$,moreLinkWillUnmount:$,monthStartFormat:Zk,handleCustomRendering:$,customRenderingMetaMap:$,customRenderingReplaces:Boolean},$k={eventDisplay:`auto`,defaultRangeSeparator:` - `,titleRangeSeparator:` – `,defaultTimedEventDuration:`01:00:00`,defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:`00:00:00`,dayHeaders:!0,initialView:``,aspectRatio:1.35,headerToolbar:{start:`title`,center:``,end:`today prev,next`},weekends:!0,weekNumbers:!1,weekNumberCalculation:`local`,editable:!1,nowIndicator:!1,scrollTime:`06:00:00`,scrollTimeReset:!0,slotMinTime:`00:00:00`,slotMaxTime:`24:00:00`,showNonCurrentDates:!0,lazyFetching:!0,startParam:`start`,endParam:`end`,timeZoneParam:`timeZone`,timeZone:`local`,locales:[],locale:``,themeSystem:`standard`,dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:`*`,eventOrder:`start,-duration,allDay,title`,dayPopoverFormat:{month:`long`,day:`numeric`,year:`numeric`},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30,monthStartFormat:{month:`long`,day:`numeric`},nowIndicatorSnap:`auto`},eA={datesSet:$,eventsSet:$,eventAdd:$,eventChange:$,eventRemove:$,windowResize:$,eventClick:$,eventMouseEnter:$,eventMouseLeave:$,select:$,unselect:$,loading:$,_unmount:$,_beforeprint:$,_afterprint:$,_noEventDrop:$,_noEventResize:$,_resize:$,_scrollRequest:$},tA={buttonText:$,buttonHints:$,views:$,plugins:$,initialEvents:$,events:$,eventSources:$},nA={headerToolbar:rA,footerToolbar:rA,buttonText:rA,buttonHints:rA,buttonIcons:rA,dateIncrement:rA,plugins:iA,events:iA,eventSources:iA,resources:iA};function rA(e,t){return typeof e==`object`&&typeof t==`object`&&e&&t?mA(e,t):e===t}function iA(e,t){return Array.isArray(e)&&Array.isArray(t)?$O(e,t):e===t}var aA={type:String,component:$,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:$,usesMinMaxTime:Boolean,classNames:$,content:$,didMount:$,willUnmount:$};function oA(e){return lA(e,nA)}function sA(e,t){let n={},r={};for(let r in t)r in e&&(n[r]=t[r](e[r]));for(let n in e)n in t||(r[n]=e[n]);return{refined:n,extra:r}}function $(e){return e}var{hasOwnProperty:cA}=Object.prototype;function lA(e,t){let n={};if(t){for(let r in t)if(t[r]===rA){let t=[];for(let i=e.length-1;i>=0;--i){let a=e[i][r];if(typeof a==`object`&&a)t.unshift(a);else if(a!==void 0){n[r]=a;break}}t.length&&(n[r]=lA(t))}}for(let t=e.length-1;t>=0;--t){let r=e[t];for(let e in r)e in n||(n[e]=r[e])}return n}function uA(e,t){let n={};for(let r in e)t(e[r],r)&&(n[r]=e[r]);return n}function dA(e,t){let n={};for(let r in e)n[r]=t(e[r],r);return n}function fA(e){let t={};for(let n of e)t[n]=!0;return t}function pA(e){let t=[];for(let n in e)t.push(e[n]);return t}function mA(e,t){if(e===t)return!0;for(let n in e)if(cA.call(e,n)&&!(n in t))return!1;for(let n in t)if(cA.call(t,n)&&e[n]!==t[n])return!1;return!0}var hA=/^on[A-Z]/;function gA(e,t){let n=_A(e,t);for(let e of n)if(!hA.test(e))return!1;return!0}function _A(e,t){let n=[];for(let r in e)cA.call(e,r)&&(r in t||n.push(r));for(let r in t)cA.call(t,r)&&e[r]!==t[r]&&n.push(r);return n}function vA(e,t,n={}){if(e===t)return!0;for(let r in t)if(!(r in e&&yA(e[r],t[r],n[r])))return!1;for(let n in e)if(!(n in t))return!1;return!0}function yA(e,t,n){return e===t||n===!0?!0:n?n(e,t):!1}function bA(e,t=0,n,r=1){let i=[];n??=Object.keys(e).length;for(let a=t;a<n;a+=r){let t=e[a];t!==void 0&&i.push(t)}return i}var xA={};function SA(e,t){xA[e]=t}function CA(e){return new xA[e]}SA(`gregory`,class{getMarkerYear(e){return e.getUTCFullYear()}getMarkerMonth(e){return e.getUTCMonth()}getMarkerDay(e){return e.getUTCDate()}arrayToMarker(e){return Sk(e)}markerToArray(e){return xk(e)}});var wA=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function TA(e){let t=wA.exec(e);if(t){let e=new Date(Date.UTC(Number(t[1]),t[3]?Number(t[3])-1:0,Number(t[5]||1),Number(t[7]||0),Number(t[8]||0),Number(t[10]||0),t[12]?Number(`0.${t[12]}`)*1e3:0));if(Ck(e)){let n=null;return t[13]&&(n=(t[15]===`-`?-1:1)*(Number(t[16]||0)*60+Number(t[18]||0))),{marker:e,isTimeUnspecified:!t[6],timeZoneOffset:n}}}return null}var EA=class{constructor(e){let t=this.timeZone=e.timeZone,n=t!==`local`&&t!==`UTC`;e.namedTimeZoneImpl&&n&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(t)),this.canComputeOffset=!(n&&!this.namedTimeZoneImpl),this.calendarSystem=CA(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,e.weekNumberCalculation===`ISO`&&(this.weekDow=1,this.weekDoy=4),typeof e.firstDay==`number`&&(this.weekDow=e.firstDay),typeof e.weekNumberCalculation==`function`&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=e.weekText==null?e.locale.options.weekText:e.weekText,this.weekTextLong=(e.weekTextLong==null?e.locale.options.weekTextLong:e.weekTextLong)||this.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}createMarker(e){let t=this.createMarkerMeta(e);return t===null?null:t.marker}createNowMarker(){return this.canComputeOffset?this.timestampToMarker(new Date().valueOf()):Sk(yk(new Date))}createMarkerMeta(e){if(typeof e==`string`)return this.parse(e);let t=null;return typeof e==`number`?t=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(t=this.timestampToMarker(e))):Array.isArray(e)&&(t=Sk(e)),t===null||!Ck(t)?null:{marker:t,isTimeUnspecified:!1,forcedTzo:null}}parse(e){let t=TA(e);if(t===null)return null;let{marker:n}=t,r=null;return t.timeZoneOffset!==null&&(this.canComputeOffset?n=this.timestampToMarker(n.valueOf()-t.timeZoneOffset*60*1e3):r=t.timeZoneOffset),{marker:n,isTimeUnspecified:t.isTimeUnspecified,forcedTzo:r}}getYear(e){return this.calendarSystem.getMarkerYear(e)}getMonth(e){return this.calendarSystem.getMarkerMonth(e)}getDay(e){return this.calendarSystem.getMarkerDay(e)}add(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]+=t.years,n[1]+=t.months,n[2]+=t.days,n[6]+=t.milliseconds,this.calendarSystem.arrayToMarker(n)}subtract(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]-=t.years,n[1]-=t.months,n[2]-=t.days,n[6]-=t.milliseconds,this.calendarSystem.arrayToMarker(n)}addYears(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]+=t,this.calendarSystem.arrayToMarker(n)}addMonths(e,t){let n=this.calendarSystem.markerToArray(e);return n[1]+=t,this.calendarSystem.arrayToMarker(n)}diffWholeYears(e,t){let{calendarSystem:n}=this;return wk(e)===wk(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)&&n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerYear(t)-n.getMarkerYear(e):null}diffWholeMonths(e,t){let{calendarSystem:n}=this;return wk(e)===wk(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)?n.getMarkerMonth(t)-n.getMarkerMonth(e)+(n.getMarkerYear(t)-n.getMarkerYear(e))*12:null}greatestWholeUnit(e,t){let n=this.diffWholeYears(e,t);return n===null?(n=this.diffWholeMonths(e,t),n===null?(n=uk(e,t),n===null?(n=dk(e,t),n===null?(n=ok(e,t),BO(n)?{unit:`hour`,value:n}:(n=sk(e,t),BO(n)?{unit:`minute`,value:n}:(n=ck(e,t),BO(n)?{unit:`second`,value:n}:{unit:`millisecond`,value:t.valueOf()-e.valueOf()}))):{unit:`day`,value:n}):{unit:`week`,value:n}):{unit:`month`,value:n}):{unit:`year`,value:n}}countDurationsBetween(e,t,n){let r;return n.years&&(r=this.diffWholeYears(e,t),r!==null)?r/JO(n):n.months&&(r=this.diffWholeMonths(e,t),r!==null)?r/YO(n):n.days&&(r=dk(e,t),r!==null)?r/XO(n):(t.valueOf()-e.valueOf())/ZO(n)}startOf(e,t){return t===`year`?this.startOfYear(e):t===`month`?this.startOfMonth(e):t===`week`?this.startOfWeek(e):t===`day`?fk(e):t===`hour`?pk(e):t===`minute`?mk(e):t===`second`?hk(e):null}startOfYear(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])}startOfMonth(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])}startOfWeek(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])}computeWeekNumber(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):gk(e,this.weekDow,this.weekDoy)}format(e,t,n={}){return t.format({marker:e,timeZoneOffset:n.forcedTzo==null?this.offsetForMarker(e):n.forcedTzo},this)}formatRange(e,t,n,r={}){return r.isEndExclusive&&(t=rk(t,-1)),n.formatRange({marker:e,timeZoneOffset:r.forcedStartTzo==null?this.offsetForMarker(e):r.forcedStartTzo},{marker:t,timeZoneOffset:r.forcedEndTzo==null?this.offsetForMarker(t):r.forcedEndTzo},this,r.defaultSeparator)}formatIso(e,t={}){let n=null;return t.omitTimeZoneOffset||(n=t.forcedTzo==null?this.offsetForMarker(e):t.forcedTzo),Tk(e,n,t.omitTime)}timestampToMarker(e){return this.timeZone===`local`?Sk(yk(new Date(e))):this.timeZone===`UTC`||!this.namedTimeZoneImpl?new Date(e):Sk(this.namedTimeZoneImpl.timestampToArray(e))}offsetForMarker(e){return this.timeZone===`local`?-bk(xk(e)).getTimezoneOffset():this.timeZone===`UTC`?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(xk(e)):null}toDate(e,t){return this.timeZone===`local`?bk(xk(e)):this.timeZone===`UTC`?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-this.namedTimeZoneImpl.offsetForArray(xk(e))*1e3*60):new Date(e.valueOf()-(t||0))}},DA=class{constructor(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}setIconOverride(e){let t,n;if(typeof e==`object`&&e){for(n in t=Object.assign({},this.iconClasses),e)t[n]=this.applyIconOverridePrefix(e[n]);this.iconClasses=t}else e===!1&&(this.iconClasses={})}applyIconOverridePrefix(e){let t=this.iconOverridePrefix;return t&&e.indexOf(t)!==0&&(e=t+e),e}getClass(e){return this.classes[e]||``}getIconClass(e,t){let n;return n=t&&this.rtlIconClasses&&this.rtlIconClasses[e]||this.iconClasses[e],n?`${this.baseIconClass} ${n}`:``}getCustomButtonIconClass(e){let t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption],t)?`${this.baseIconClass} ${this.applyIconOverridePrefix(t)}`:``}};DA.prototype.classes={},DA.prototype.iconClasses={},DA.prototype.baseIconClass=``,DA.prototype.iconOverridePrefix=``;function OA(e){e();let t=X.debounceRendering,n=[];function r(e){n.push(e)}for(X.debounceRendering=r,_D(Z(kA,{}),document.createElement(`div`));n.length;)n.shift()();X.debounceRendering=t}var kA=class extends eD{render(){return Z(`div`,{})}componentDidMount(){this.setState({})}};function AA(e){let t=vD(e),n=t.Provider;return t.Provider=function(){let e=!this.getChildContext,t=n.apply(this,arguments);if(e){let e=[];this.shouldComponentUpdate=t=>{this.props.value!==t.value&&e.forEach(e=>{e.context=t.value,e.forceUpdate()})},this.sub=t=>{e.push(t);let n=t.componentWillUnmount;t.componentWillUnmount=()=>{e.splice(e.indexOf(t),1),n&&n.call(t)}}}return t},t}var jA=class{constructor(e,t,n,r){this.execFunc=e,this.emitter=t,this.scrollTime=n,this.scrollTimeReset=r,this.handleScrollRequest=e=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},e),this.drain()},t.on(`_scrollRequest`,this.handleScrollRequest),this.fireInitialScroll()}detach(){this.emitter.off(`_scrollRequest`,this.handleScrollRequest)}update(e){e&&this.scrollTimeReset?this.fireInitialScroll():this.drain()}fireInitialScroll(){this.handleScrollRequest({time:this.scrollTime})}drain(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)}},MA=AA({});function NA(e,t,n,r,i,a,o,s,c,l,u,d,f,p){return{dateEnv:i,nowManager:a,options:n,pluginHooks:s,emitter:u,dispatch:c,getCurrentData:l,calendarApi:d,viewSpec:e,viewApi:t,dateProfileGenerator:r,theme:o,isRtl:n.direction===`rtl`,addResizeHandler(e){u.on(`_resize`,e)},removeResizeHandler(e){u.off(`_resize`,e)},createScrollResponder(e){return new jA(e,u,UO(n.scrollTime),n.scrollTimeReset)},registerInteractiveComponent:f,unregisterInteractiveComponent:p}}var PA=class extends eD{shouldComponentUpdate(e,t){return!vA(this.props,e,this.propEquality)||!vA(this.state,t,this.stateEquality)}safeSetState(e){vA(this.state,Object.assign(Object.assign({},this.state),e),this.stateEquality)||this.setState(e)}};PA.addPropsEquality=IA,PA.addStateEquality=LA,PA.contextType=MA,PA.prototype.propEquality={},PA.prototype.stateEquality={};var FA=class extends PA{};FA.contextType=MA;function IA(e){let t=Object.create(this.prototype.propEquality);Object.assign(t,e),this.prototype.propEquality=t}function LA(e){let t=Object.create(this.prototype.stateEquality);Object.assign(t,e),this.prototype.stateEquality=t}function RA(e,t){typeof e==`function`?e(t):e&&(e.current=t)}var zA=class extends FA{constructor(){super(...arguments),this.id=NO(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=e=>{let{options:t}=this.context,{generatorName:n}=this.props;t.customRenderingReplaces&&BA(n,t)||this.updateElRef(e)},this.updateElRef=e=>{this.props.elRef&&RA(this.props.elRef,e)}}render(){let{props:e,context:t}=this,{options:n}=t,{customGenerator:r,defaultGenerator:i,renderProps:a}=e,o=VA(e,[],this.handleEl),s=!1,c,l=[],u;if(r!=null){let e=typeof r==`function`?r(a,Z):r;if(e===!0)s=!0;else{let t=e&&typeof e==`object`;t&&`html`in e?o.dangerouslySetInnerHTML={__html:e.html}:t&&`domNodes`in e?l=Array.prototype.slice.call(e.domNodes):(t?FE(e):typeof e!=`function`)?c=e:u=e}}else s=!BA(e.generatorName,n);return s&&i&&(c=i(a)),this.queuedDomNodes=l,this.currentGeneratorMeta=u,Z(e.elTag,o,c)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(e){let{props:t,context:n}=this,{handleCustomRendering:r,customRenderingMetaMap:i}=n.options;if(r){let n=this.currentGeneratorMeta??i?.[t.generatorName];n&&r(Object.assign(Object.assign({id:this.id,isActive:e,containerEl:this.base,reportNewContainerEl:this.updateElRef,generatorMeta:n},t),{elClasses:(t.elClasses||[]).filter(HA)}))}}applyQueueudDomNodes(){let{queuedDomNodes:e,currentDomNodes:t}=this,n=this.base;if(!$O(e,t)){t.forEach(_O);for(let t of e)n.appendChild(t);this.currentDomNodes=e}}};zA.addPropsEquality({elClasses:$O,elStyle:mA,elAttrs:gA,renderProps:mA});function BA(e,t){return!!(t.handleCustomRendering&&e&&t.customRenderingMetaMap?.[e])}function VA(e,t,n){let r=Object.assign(Object.assign({},e.elAttrs),{ref:n});return(e.elClasses||t)&&(r.className=(e.elClasses||[]).concat(t||[]).concat(r.className||[]).filter(Boolean).join(` `)),e.elStyle&&(r.style=e.elStyle),r}function HA(e){return!!e}var UA=AA(0),WA=class extends eD{constructor(){super(...arguments),this.InnerContent=GA.bind(void 0,this),this.handleEl=e=>{this.el=e,this.props.elRef&&(RA(this.props.elRef,e),e&&this.didMountMisfire&&this.componentDidMount())}}render(){let{props:e}=this,t=KA(e.classNameGenerator,e.renderProps);if(e.children){let n=VA(e,t,this.handleEl),r=e.children(this.InnerContent,e.renderProps,n);return e.elTag?Z(e.elTag,n,r):r}return Z(zA,Object.assign(Object.assign({},e),{elRef:this.handleEl,elTag:e.elTag||`div`,elClasses:(e.elClasses||[]).concat(t),renderId:this.context}))}componentDidMount(){var e,t;this.el?(t=(e=this.props).didMount)==null||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el})):this.didMountMisfire=!0}componentWillUnmount(){var e,t;(t=(e=this.props).willUnmount)==null||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el}))}};WA.contextType=UA;function GA(e,t){let n=e.props;return Z(zA,Object.assign({renderProps:n.renderProps,generatorName:n.generatorName,customGenerator:n.customGenerator,defaultGenerator:n.defaultGenerator,renderId:e.context},t))}function KA(e,t){let n=typeof e==`function`?e(t):e||[];return typeof n==`string`?[n]:n}var qA=class extends FA{render(){let{props:e,context:t}=this,{options:n}=t,r={view:t.viewApi};return Z(WA,{elRef:e.elRef,elTag:e.elTag||`div`,elAttrs:e.elAttrs,elClasses:[...JA(e.viewSpec),...e.elClasses||[]],elStyle:e.elStyle,renderProps:r,classNameGenerator:n.viewClassNames,generatorName:void 0,didMount:n.viewDidMount,willUnmount:n.viewWillUnmount},()=>e.children)}};function JA(e){return[`fc-${e.type}-view`,`fc-view`]}function YA(e,t){let n=null,r=null;return e.start&&(n=t.createMarker(e.start)),e.end&&(r=t.createMarker(e.end)),!n&&!r||n&&r&&r<n?null:{start:n,end:r}}function XA(e,t){let n=[],{start:r}=t,i,a;for(e.sort(ZA),i=0;i<e.length;i+=1)a=e[i],a.start>r&&n.push({start:r,end:a.start}),a.end>r&&(r=a.end);return r<t.end&&n.push({start:r,end:t.end}),n}function ZA(e,t){return e.start.valueOf()-t.start.valueOf()}function QA(e,t){let{start:n,end:r}=e,i=null;return t.start!==null&&(n=n===null?t.start:new Date(Math.max(n.valueOf(),t.start.valueOf()))),t.end!=null&&(r=r===null?t.end:new Date(Math.min(r.valueOf(),t.end.valueOf()))),(n===null||r===null||n<r)&&(i={start:n,end:r}),i}function $A(e,t){return(e.end===null||t.start===null||e.end>t.start)&&(e.start===null||t.end===null||e.start<t.end)}function ej(e,t){return(e.start===null||t>=e.start)&&(e.end===null||t<e.end)}function tj(e,t){return t.start!=null&&e<t.start?t.start:t.end!=null&&e>=t.end?new Date(t.end.valueOf()-1):e}function nj(e){let t=Math.floor(ak(e.start,e.end))||1,n=fk(e.start);return{start:n,end:nk(n,t)}}function rj(e,t=UO(0)){let n=null,r=null;if(e.end){r=fk(e.end);let n=e.end.valueOf()-r.valueOf();n&&n>=ZO(t)&&(r=nk(r,1))}return e.start&&(n=fk(e.start),r&&r<=n&&(r=nk(n,1))),{start:n,end:r}}function ij(e,t,n,r){return r===`year`?UO(n.diffWholeYears(e,t),`year`):r===`month`?UO(n.diffWholeMonths(e,t),`month`):lk(e,t)}var aj=class{constructor(e){this.props=e,this.initHiddenDays()}buildPrev(e,t,n){let{dateEnv:r}=this.props,i=r.subtract(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,-1,n)}buildNext(e,t,n){let{dateEnv:r}=this.props,i=r.add(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,1,n)}build(e,t,n=!0){let{props:r}=this,i,a,o,s,c,l;return i=this.buildValidRange(),i=this.trimHiddenDays(i),n&&(e=tj(e,i)),a=this.buildCurrentRangeInfo(e,t),o=/^(year|month|week|day)$/.test(a.unit),s=this.buildRenderRange(this.trimHiddenDays(a.range),a.unit,o),s=this.trimHiddenDays(s),c=s,r.showNonCurrentDates||(c=QA(c,a.range)),c=this.adjustActiveRange(c),c=QA(c,i),l=$A(a.range,i),ej(s,e)||(e=s.start),{currentDate:e,validRange:i,currentRange:a.range,currentRangeUnit:a.unit,isRangeAllDay:o,activeRange:c,renderRange:s,slotMinTime:r.slotMinTime,slotMaxTime:r.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(a.duration)}}buildValidRange(){let e=this.props.validRangeInput,t=typeof e==`function`?e.call(this.props.calendarApi,this.props.dateEnv.toDate(this.props.nowManager.getDateMarker())):e;return this.refineRange(t)||{start:null,end:null}}buildCurrentRangeInfo(e,t){let{props:n}=this,r=null,i=null,a=null,o;return n.duration?(r=n.duration,i=n.durationUnit,a=this.buildRangeFromDuration(e,t,r,i)):(o=this.props.dayCount)?(i=`day`,a=this.buildRangeFromDayCount(e,t,o)):(a=this.buildCustomVisibleRange(e))?i=n.dateEnv.greatestWholeUnit(a.start,a.end).unit:(r=this.getFallbackDuration(),i=QO(r).unit,a=this.buildRangeFromDuration(e,t,r,i)),{duration:r,unit:i,range:a}}getFallbackDuration(){return UO({day:1})}adjustActiveRange(e){let{dateEnv:t,usesMinMaxTime:n,slotMinTime:r,slotMaxTime:i}=this.props,{start:a,end:o}=e;return n&&(XO(r)<0&&(a=fk(a),a=t.add(a,r)),XO(i)>1&&(o=fk(o),o=nk(o,-1),o=t.add(o,i))),{start:a,end:o}}buildRangeFromDuration(e,t,n,r){let{dateEnv:i,dateAlignment:a}=this.props,o,s,c;if(!a){let{dateIncrement:e}=this.props;a=e&&ZO(e)<ZO(n)?QO(e).unit:r}XO(n)<=1&&this.isHiddenDay(o)&&(o=this.skipHiddenDays(o,t),o=fk(o));function l(){o=i.startOf(e,a),s=i.add(o,n),c={start:o,end:s}}return l(),this.trimHiddenDays(c)||(e=this.skipHiddenDays(e,t),l()),c}buildRangeFromDayCount(e,t,n){let{dateEnv:r,dateAlignment:i}=this.props,a=0,o=e,s;i&&(o=r.startOf(o,i)),o=fk(o),o=this.skipHiddenDays(o,t),s=o;do s=nk(s,1),this.isHiddenDay(s)||(a+=1);while(a<n);return{start:o,end:s}}buildCustomVisibleRange(e){let{props:t}=this,n=t.visibleRangeInput,r=typeof n==`function`?n.call(t.calendarApi,t.dateEnv.toDate(e)):n,i=this.refineRange(r);return i&&(i.start==null||i.end==null)?null:i}buildRenderRange(e,t,n){return e}buildDateIncrement(e){let{dateIncrement:t}=this.props,n;return t||((n=this.props.dateAlignment)?UO(1,n):e||UO({days:1}))}refineRange(e){if(e){let t=YA(e,this.props.dateEnv);return t&&=rj(t),t}return null}initHiddenDays(){let e=this.props.hiddenDays||[],t=[],n=0,r;for(this.props.weekends===!1&&e.push(0,6),r=0;r<7;r+=1)(t[r]=e.indexOf(r)!==-1)||(n+=1);if(!n)throw Error(`invalid hiddenDays`);this.isHiddenDayHash=t}trimHiddenDays(e){let{start:t,end:n}=e;return t&&=this.skipHiddenDays(t),n&&=this.skipHiddenDays(n,-1,!0),t==null||n==null||t<n?{start:t,end:n}:null}isHiddenDay(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]}skipHiddenDays(e,t=1,n=!1){for(;this.isHiddenDayHash[(e.getUTCDay()+(n?t:0)+7)%7];)e=nk(e,t);return e}};function oj(e,t,n,r){return{instanceId:NO(),defId:e,range:t,forcedStartTzo:n??null,forcedEndTzo:r??null}}function sj(e,t,n,r){for(let i=0;i<r.length;i+=1){let a=r[i].parse(e,n);if(a){let{allDay:n}=e;return n??(n=t,n??(n=a.allDayGuess,n??=!1)),{allDay:n,duration:a.duration,typeData:a.typeData,typeId:i}}}return null}function cj(e,t,n){let{dateEnv:r,pluginHooks:i,options:a}=n,{defs:o,instances:s}=e;s=uA(s,e=>!o[e.defId].recurringDef);for(let e in o){let n=o[e];if(n.recurringDef){let{duration:o}=n.recurringDef;o||=n.allDay?a.defaultAllDayEventDuration:a.defaultTimedEventDuration;let c=lj(n,o,t,r,i.recurringTypes);for(let t of c){let n=oj(e,{start:t,end:r.add(t,o)});s[n.instanceId]=n}}}return{defs:o,instances:s}}function lj(e,t,n,r,i){let a=i[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(a=a.map(fk)),a}var uj={id:String,groupId:String,title:String,url:String,interactive:Boolean},dj={start:$,end:$,date:$,allDay:Boolean},fj=Object.assign(Object.assign(Object.assign({},uj),dj),{extendedProps:$});function pj(e,t,n,r,i=hj(n),a,o){let{refined:s,extra:c}=mj(e,n,i),l=vj(t,n),u=sj(s,l,n.dateEnv,n.pluginHooks.recurringTypes);if(u){let e=gj(s,c,t?t.sourceId:``,u.allDay,!!u.duration,n,a);return e.recurringDef={typeId:u.typeId,typeData:u.typeData,duration:u.duration},{def:e,instance:null}}let d=_j(s,l,n,r);if(d){let e=gj(s,c,t?t.sourceId:``,d.allDay,d.hasEnd,n,a),r=oj(e.defId,d.range,d.forcedStartTzo,d.forcedEndTzo);return o&&e.publicId&&o[e.publicId]&&(r.instanceId=o[e.publicId]),{def:e,instance:r}}return null}function mj(e,t,n=hj(t)){return sA(e,n)}function hj(e){return Object.assign(Object.assign(Object.assign({},kj),fj),e.pluginHooks.eventRefiners)}function gj(e,t,n,r,i,a,o){let s={title:e.title||``,groupId:e.groupId||``,publicId:e.id||``,url:e.url||``,recurringDef:null,defId:(o&&e.id?o[e.id]:``)||NO(),sourceId:n,allDay:r,hasEnd:i,interactive:e.interactive,ui:jj(e,a),extendedProps:Object.assign(Object.assign({},e.extendedProps||{}),t)};for(let t of a.pluginHooks.eventDefMemberAdders)Object.assign(s,t(e));return Object.freeze(s.ui.classNames),Object.freeze(s.extendedProps),s}function _j(e,t,n,r){let{allDay:i}=e,a,o=null,s=!1,c,l=null,u=e.start==null?e.date:e.start;if(a=n.dateEnv.createMarkerMeta(u),a)o=a.marker;else if(!r)return null;return e.end!=null&&(c=n.dateEnv.createMarkerMeta(e.end)),i??=t??((!a||a.isTimeUnspecified)&&(!c||c.isTimeUnspecified)),i&&o&&(o=fk(o)),c&&(l=c.marker,i&&(l=fk(l)),o&&l<=o&&(l=null)),l?s=!0:r||(s=n.options.forceEventDuration||!1,l=n.dateEnv.add(o,i?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:i,hasEnd:s,range:{start:o,end:l},forcedStartTzo:a?a.forcedTzo:null,forcedEndTzo:c?c.forcedTzo:null}}function vj(e,t){let n=null;return e&&(n=e.defaultAllDay),n??=t.options.defaultAllDay,n}function yj(e,t,n,r,i,a){let o=Cj(),s=hj(n);for(let c of e){let e=pj(c,t,n,r,s,i,a);e&&bj(e,o)}return o}function bj(e,t=Cj()){return t.defs[e.def.defId]=e.def,e.instance&&(t.instances[e.instance.instanceId]=e.instance),t}function xj(e,t){let n=e.instances[t];if(n){let t=e.defs[n.defId],r=Tj(e,e=>Sj(t,e));return r.defs[t.defId]=t,r.instances[n.instanceId]=n,r}return Cj()}function Sj(e,t){return!!(e.groupId&&e.groupId===t.groupId)}function Cj(){return{defs:{},instances:{}}}function wj(e,t){return{defs:Object.assign(Object.assign({},e.defs),t.defs),instances:Object.assign(Object.assign({},e.instances),t.instances)}}function Tj(e,t){let n=uA(e.defs,t);return{defs:n,instances:uA(e.instances,e=>n[e.defId])}}function Ej(e,t){let{defs:n,instances:r}=e,i={},a={};for(let e in n)t.defs[e]||(i[e]=n[e]);for(let e in r)!t.instances[e]&&i[r[e].defId]&&(a[e]=r[e]);return{defs:i,instances:a}}function Dj(e,t){return Array.isArray(e)?yj(e,null,t,!0):typeof e==`object`&&e?yj([e],null,t,!0):e==null?null:String(e)}function Oj(e){return Array.isArray(e)?e:typeof e==`string`?e.split(/\s+/):[]}var kj={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:$,overlap:$,allow:$,className:Oj,classNames:Oj,color:String,backgroundColor:String,borderColor:String,textColor:String},Aj={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:``,borderColor:``,textColor:``,classNames:[]};function jj(e,t){let n=Dj(e.constraint,t);return{display:e.display||null,startEditable:e.startEditable==null?e.editable:e.startEditable,durationEditable:e.durationEditable==null?e.editable:e.durationEditable,constraints:n==null?[]:[n],overlap:e.overlap==null?null:e.overlap,allows:e.allow==null?[]:[e.allow],backgroundColor:e.backgroundColor||e.color||``,borderColor:e.borderColor||e.color||``,textColor:e.textColor||``,classNames:(e.className||[]).concat(e.classNames||[])}}function Mj(e){return e.reduce(Nj,Aj)}function Nj(e,t){return{display:t.display==null?e.display:t.display,startEditable:t.startEditable==null?e.startEditable:t.startEditable,durationEditable:t.durationEditable==null?e.durationEditable:t.durationEditable,constraints:e.constraints.concat(t.constraints),overlap:typeof t.overlap==`boolean`?t.overlap:e.overlap,allows:e.allows.concat(t.allows),backgroundColor:t.backgroundColor||e.backgroundColor,borderColor:t.borderColor||e.borderColor,textColor:t.textColor||e.textColor,classNames:e.classNames.concat(t.classNames)}}var Pj={id:String,defaultAllDay:Boolean,url:String,format:String,events:$,eventDataTransform:$,success:$,failure:$};function Fj(e,t,n=Ij(t)){let r;if(typeof e==`string`?r={url:e}:typeof e==`function`||Array.isArray(e)?r={events:e}:typeof e==`object`&&e&&(r=e),r){let{refined:i,extra:a}=sA(r,n),o=Lj(i,t);if(o)return{_raw:e,isFetching:!1,latestFetchId:``,fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||``,sourceId:NO(),sourceDefId:o.sourceDefId,meta:o.meta,ui:jj(i,t),extendedProps:a}}return null}function Ij(e){return Object.assign(Object.assign(Object.assign({},kj),Pj),e.pluginHooks.eventSourceRefiners)}function Lj(e,t){let n=t.pluginHooks.eventSourceDefs;for(let t=n.length-1;t>=0;--t){let r=n[t].parseMeta(e);if(r)return{sourceDefId:t,meta:r}}return null}function Rj(e,t,n,r,i){switch(t.type){case`RECEIVE_EVENTS`:return zj(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,i);case`RESET_RAW_EVENTS`:return Bj(e,n[t.sourceId],t.rawEvents,r.activeRange,i);case`ADD_EVENTS`:return Uj(e,t.eventStore,r?r.activeRange:null,i);case`RESET_EVENTS`:return t.eventStore;case`MERGE_EVENTS`:return wj(e,t.eventStore);case`PREV`:case`NEXT`:case`CHANGE_DATE`:case`CHANGE_VIEW_TYPE`:return r?cj(e,r.activeRange,i):e;case`REMOVE_EVENTS`:return Ej(e,t.eventStore);case`REMOVE_EVENT_SOURCE`:return Gj(e,t.sourceId);case`REMOVE_ALL_EVENT_SOURCES`:return Tj(e,e=>!e.sourceId);case`REMOVE_ALL_EVENTS`:return Cj();default:return e}}function zj(e,t,n,r,i,a){if(t&&n===t.latestFetchId){let n=yj(Vj(i,t,a),t,a);return r&&(n=cj(n,r,a)),wj(Gj(e,t.sourceId),n)}return e}function Bj(e,t,n,r,i){let{defIdMap:a,instanceIdMap:o}=Kj(e);return cj(yj(Vj(n,t,i),t,i,!1,a,o),r,i)}function Vj(e,t,n){let r=n.options.eventDataTransform,i=t?t.eventDataTransform:null;return i&&(e=Hj(e,i)),r&&(e=Hj(e,r)),e}function Hj(e,t){let n;if(!t)n=e;else{n=[];for(let r of e){let e=t(r);e?n.push(e):e??n.push(r)}}return n}function Uj(e,t,n,r){return n&&(t=cj(t,n,r)),wj(e,t)}function Wj(e,t,n){let{defs:r}=e;return{defs:r,instances:dA(e.instances,e=>r[e.defId].allDay?e:Object.assign(Object.assign({},e),{range:{start:n.createMarker(t.toDate(e.range.start,e.forcedStartTzo)),end:n.createMarker(t.toDate(e.range.end,e.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:e.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:e.forcedEndTzo}))}}function Gj(e,t){return Tj(e,e=>e.sourceId!==t)}function Kj(e){let{defs:t,instances:n}=e,r={},i={};for(let e in t){let{publicId:n}=t[e];n&&(r[n]=e)}for(let e in n){let{publicId:r}=t[n[e].defId];r&&(i[r]=e)}return{defIdMap:r,instanceIdMap:i}}var qj=class{constructor(){this.handlers={},this.thisContext=null}setThisContext(e){this.thisContext=e}setOptions(e){this.options=e}on(e,t){Jj(this.handlers,e,t)}off(e,t){Yj(this.handlers,e,t)}trigger(e,...t){let n=this.handlers[e]||[],r=this.options&&this.options[e],i=[].concat(r||[],n);for(let e of i)e.apply(this.thisContext,t)}hasHandlers(e){return!!(this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e])}};function Jj(e,t,n){(e[t]||(e[t]=[])).push(n)}function Yj(e,t,n){n?e[t]&&(e[t]=e[t].filter(e=>e!==n)):delete e[t]}var Xj={startTime:`09:00`,endTime:`17:00`,daysOfWeek:[1,2,3,4,5],display:`inverse-background`,classNames:`fc-non-business`,groupId:`_businessHours`};function Zj(e,t){return yj(Qj(e),null,t)}function Qj(e){let t;return t=e===!0?[{}]:Array.isArray(e)?e.filter(e=>e.daysOfWeek):typeof e==`object`&&e?[e]:[],t=t.map(e=>Object.assign(Object.assign({},Xj),e)),t}function $j(e,t,n){n.emitter.trigger(`select`,Object.assign(Object.assign({},tM(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function eM(e,t){t.emitter.trigger(`unselect`,{jsEvent:e?e.origEvent:null,view:t.viewApi||t.calendarApi.view})}function tM(e,t){let n={};for(let r of t.pluginHooks.dateSpanTransforms)Object.assign(n,r(e,t));return Object.assign(n,OM(e,t.dateEnv)),n}function nM(e,t,n){let{dateEnv:r,options:i}=n,a=t;return e?(a=fk(a),a=r.add(a,i.defaultAllDayEventDuration)):a=r.add(a,i.defaultTimedEventDuration),a}function rM(e,t,n,r){let i=pM(e.defs,t),a=Cj();for(let t in e.defs){let o=e.defs[t];a.defs[t]=iM(o,i[t],n,r)}for(let t in e.instances){let o=e.instances[t],s=a.defs[o.defId];a.instances[t]=aM(o,s,i[o.defId],n,r)}return a}function iM(e,t,n,r){let i=n.standardProps||{};i.hasEnd==null&&t.durationEditable&&(n.startDelta||n.endDelta)&&(i.hasEnd=!0);let a=Object.assign(Object.assign(Object.assign({},e),i),{ui:Object.assign(Object.assign({},e.ui),i.ui)});n.extendedProps&&(a.extendedProps=Object.assign(Object.assign({},a.extendedProps),n.extendedProps));for(let e of r.pluginHooks.eventDefMutationAppliers)e(a,n,r);return!a.hasEnd&&r.options.forceEventDuration&&(a.hasEnd=!0),a}function aM(e,t,n,r,i){let{dateEnv:a}=i,o=r.standardProps&&r.standardProps.allDay===!0,s=r.standardProps&&r.standardProps.hasEnd===!1,c=Object.assign({},e);return o&&(c.range=nj(c.range)),r.datesDelta&&n.startEditable&&(c.range={start:a.add(c.range.start,r.datesDelta),end:a.add(c.range.end,r.datesDelta)}),r.startDelta&&n.durationEditable&&(c.range={start:a.add(c.range.start,r.startDelta),end:c.range.end}),r.endDelta&&n.durationEditable&&(c.range={start:c.range.start,end:a.add(c.range.end,r.endDelta)}),s&&(c.range={start:c.range.start,end:nM(t.allDay,c.range.start,i)}),t.allDay&&(c.range={start:fk(c.range.start),end:fk(c.range.end)}),c.range.end<c.range.start&&(c.range.end=nM(t.allDay,c.range.start,i)),c}var oM=class{constructor(e,t){this.context=e,this.internalEventSource=t}remove(){this.context.dispatch({type:`REMOVE_EVENT_SOURCE`,sourceId:this.internalEventSource.sourceId})}refetch(){this.context.dispatch({type:`FETCH_EVENT_SOURCES`,sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})}get id(){return this.internalEventSource.publicId}get url(){return this.internalEventSource.meta.url}get format(){return this.internalEventSource.meta.format}},sM=class e{constructor(e,t,n){this._context=e,this._def=t,this._instance=n||null}setProp(e,t){if(e in dj)console.warn(`Could not set date-related prop 'name'. Use one of the date-related methods instead.`);else if(e===`id`)t=uj[e](t),this.mutate({standardProps:{publicId:t}});else if(e in uj)t=uj[e](t),this.mutate({standardProps:{[e]:t}});else if(e in kj){let n=kj[e](t);n=e===`color`?{backgroundColor:t,borderColor:t}:e===`editable`?{startEditable:t,durationEditable:t}:{[e]:t},this.mutate({standardProps:{ui:n}})}else console.warn(`Could not set prop '${e}'. Use setExtendedProp instead.`)}setExtendedProp(e,t){this.mutate({extendedProps:{[e]:t}})}setStart(e,t={}){let{dateEnv:n}=this._context,r=n.createMarker(e);if(r&&this._instance){let e=this._instance.range,i=ij(e.start,r,n,t.granularity);t.maintainDuration?this.mutate({datesDelta:i}):this.mutate({startDelta:i})}}setEnd(e,t={}){let{dateEnv:n}=this._context,r;if(!(e!=null&&(r=n.createMarker(e),!r))&&this._instance){if(r){let e=ij(this._instance.range.end,r,n,t.granularity);this.mutate({endDelta:e})}else this.mutate({standardProps:{hasEnd:!1}})}}setDates(e,t,n={}){let{dateEnv:r}=this._context,i={allDay:n.allDay},a=r.createMarker(e),o;if(a&&!(t!=null&&(o=r.createMarker(t),!o))&&this._instance){let e=this._instance.range;n.allDay===!0&&(e=nj(e));let t=ij(e.start,a,r,n.granularity);if(o){let a=ij(e.end,o,r,n.granularity);KO(t,a)?this.mutate({datesDelta:t,standardProps:i}):this.mutate({startDelta:t,endDelta:a,standardProps:i})}else i.hasEnd=!1,this.mutate({datesDelta:t,standardProps:i})}}moveStart(e){let t=UO(e);t&&this.mutate({startDelta:t})}moveEnd(e){let t=UO(e);t&&this.mutate({endDelta:t})}moveDates(e){let t=UO(e);t&&this.mutate({datesDelta:t})}setAllDay(e,t={}){let n={allDay:e},{maintainDuration:r}=t;r??=this._context.options.allDayMaintainDuration,this._def.allDay!==e&&(n.hasEnd=r),this.mutate({standardProps:n})}formatRange(e){let{dateEnv:t}=this._context,n=this._instance,r=Zk(e);return this._def.hasEnd?t.formatRange(n.range.start,n.range.end,r,{forcedStartTzo:n.forcedStartTzo,forcedEndTzo:n.forcedEndTzo}):t.format(n.range.start,r,{forcedTzo:n.forcedStartTzo})}mutate(t){let n=this._instance;if(n){let r=this._def,i=this._context,{eventStore:a}=i.getCurrentData(),o=xj(a,n.instanceId);o=rM(o,{"":{display:``,startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:``,borderColor:``,textColor:``,classNames:[]}},t,i);let s=new e(i,r,n);this._def=o.defs[r.defId],this._instance=o.instances[n.instanceId],i.dispatch({type:`MERGE_EVENTS`,eventStore:o}),i.emitter.trigger(`eventChange`,{oldEvent:s,event:this,relatedEvents:lM(o,i,n),revert(){i.dispatch({type:`RESET_EVENTS`,eventStore:a})}})}}remove(){let e=this._context,t=cM(this);e.dispatch({type:`REMOVE_EVENTS`,eventStore:t}),e.emitter.trigger(`eventRemove`,{event:this,relatedEvents:[],revert(){e.dispatch({type:`MERGE_EVENTS`,eventStore:t})}})}get source(){let{sourceId:e}=this._def;return e?new oM(this._context,this._context.getCurrentData().eventSources[e]):null}get start(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null}get end(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null}get startStr(){let e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):``}get endStr(){let e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):``}get id(){return this._def.publicId}get groupId(){return this._def.groupId}get allDay(){return this._def.allDay}get title(){return this._def.title}get url(){return this._def.url}get display(){return this._def.ui.display||`auto`}get startEditable(){return this._def.ui.startEditable}get durationEditable(){return this._def.ui.durationEditable}get constraint(){return this._def.ui.constraints[0]||null}get overlap(){return this._def.ui.overlap}get allow(){return this._def.ui.allows[0]||null}get backgroundColor(){return this._def.ui.backgroundColor}get borderColor(){return this._def.ui.borderColor}get textColor(){return this._def.ui.textColor}get classNames(){return this._def.ui.classNames}get extendedProps(){return this._def.extendedProps}toPlainObject(e={}){let t=this._def,{ui:n}=t,{startStr:r,endStr:i}=this,a={allDay:t.allDay};return t.title&&(a.title=t.title),r&&(a.start=r),i&&(a.end=i),t.publicId&&(a.id=t.publicId),t.groupId&&(a.groupId=t.groupId),t.url&&(a.url=t.url),n.display&&n.display!==`auto`&&(a.display=n.display),e.collapseColor&&n.backgroundColor&&n.backgroundColor===n.borderColor?a.color=n.backgroundColor:(n.backgroundColor&&(a.backgroundColor=n.backgroundColor),n.borderColor&&(a.borderColor=n.borderColor)),n.textColor&&(a.textColor=n.textColor),n.classNames.length&&(a.classNames=n.classNames),Object.keys(t.extendedProps).length&&(e.collapseExtendedProps?Object.assign(a,t.extendedProps):a.extendedProps=t.extendedProps),a}toJSON(){return this.toPlainObject()}};function cM(e){let t=e._def,n=e._instance;return{defs:{[t.defId]:t},instances:n?{[n.instanceId]:n}:{}}}function lM(e,t,n){let{defs:r,instances:i}=e,a=[],o=n?n.instanceId:``;for(let e in i){let n=i[e],s=r[n.defId];n.instanceId!==o&&a.push(new sM(t,s,n))}return a}function uM(e,t,n,r){let i={},a={},o={},s=[],c=[],l=pM(e.defs,t);for(let t in e.defs){let n=e.defs[t];l[n.defId].display===`inverse-background`&&(n.groupId?(i[n.groupId]=[],o[n.groupId]||(o[n.groupId]=n)):a[t]=[])}for(let t in e.instances){let o=e.instances[t],u=e.defs[o.defId],d=l[u.defId],f=o.range,p=!u.allDay&&r?rj(f,r):f,m=QA(p,n);m&&(d.display===`inverse-background`?u.groupId?i[u.groupId].push(m):a[o.defId].push(m):d.display!==`none`&&(d.display===`background`?s:c).push({def:u,ui:d,instance:o,range:m,isStart:p.start&&p.start.valueOf()===m.start.valueOf(),isEnd:p.end&&p.end.valueOf()===m.end.valueOf()}))}for(let e in i){let t=i[e],r=XA(t,n);for(let t of r){let n=o[e],r=l[n.defId];s.push({def:n,ui:r,instance:null,range:t,isStart:!1,isEnd:!1})}}for(let t in a){let r=a[t],i=XA(r,n);for(let n of i)s.push({def:e.defs[t],ui:l[t],instance:null,range:n,isStart:!1,isEnd:!1})}return{bg:s,fg:c}}function dM(e,t){e.fcSeg=t}function fM(e){return e.fcSeg||e.parentNode.fcSeg||null}function pM(e,t){return dA(e,e=>mM(e,t))}function mM(e,t){let n=[];return t[``]&&n.push(t[``]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),Mj(n)}function hM(e,t){let n=e.map(gM);return n.sort((e,n)=>FO(e,n,t)),n.map(e=>e._seg)}function gM(e){let{eventRange:t}=e,n=t.def,r=t.instance?t.instance.range:t.range,i=r.start?r.start.valueOf():0,a=r.end?r.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},n.extendedProps),n),{id:n.publicId,start:i,end:a,duration:a-i,allDay:Number(n.allDay),_seg:e})}function _M(e,t){let{pluginHooks:n}=t,r=n.isDraggableTransformers,{def:i,ui:a}=e.eventRange,o=a.startEditable;for(let e of r)o=e(o,i,a,t);return o}function vM(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function yM(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function bM(e,t,n,r,i,a,o){let{dateEnv:s,options:c}=n,{displayEventTime:l,displayEventEnd:u}=c,d=e.eventRange.def,f=e.eventRange.instance;l??=r!==!1,u??=i!==!1;let p=f.range.start,m=f.range.end,h=a||e.start||e.eventRange.range.start,g=o||e.end||e.eventRange.range.end,_=fk(p).valueOf()===fk(h).valueOf(),v=fk(rk(m,-1)).valueOf()===fk(rk(g,-1)).valueOf();return l&&!d.allDay&&(_||v)?(h=_?p:h,g=v?m:g,u&&d.hasEnd?s.formatRange(h,g,t,{forcedStartTzo:a?null:f.forcedStartTzo,forcedEndTzo:o?null:f.forcedEndTzo}):s.format(h,t,{forcedTzo:a?null:f.forcedStartTzo})):``}function xM(e,t,n){let r=e.eventRange.range;return{isPast:r.end<=(n||t.start),isFuture:r.start>=(n||t.end),isToday:t&&ej(t,r.start)}}function SM(e){let t=[`fc-event`];return e.isMirror&&t.push(`fc-event-mirror`),e.isDraggable&&t.push(`fc-event-draggable`),(e.isStartResizable||e.isEndResizable)&&t.push(`fc-event-resizable`),e.isDragging&&t.push(`fc-event-dragging`),e.isResizing&&t.push(`fc-event-resizing`),e.isSelected&&t.push(`fc-event-selected`),e.isStart&&t.push(`fc-event-start`),e.isEnd&&t.push(`fc-event-end`),e.isPast&&t.push(`fc-event-past`),e.isToday&&t.push(`fc-event-today`),e.isFuture&&t.push(`fc-event-future`),t}function CM(e){return e.instance?e.instance.instanceId:`${e.def.defId}:${e.range.start.toISOString()}`}function wM(e,t){let{def:n,instance:r}=e.eventRange,{url:i}=n;if(i)return{href:i};let{emitter:a,options:o}=t,{eventInteractive:s}=o;return s??(s=n.interactive,s??=!!a.hasHandlers(`eventClick`)),s?jO(e=>{a.trigger(`eventClick`,{el:e.target,event:new sM(t,n,r),jsEvent:e,view:t.viewApi})}):{}}var TM={start:$,end:$,allDay:Boolean};function EM(e,t,n){let r=DM(e,t),{range:i}=r;if(!i.start)return null;if(!i.end){if(n==null)return null;i.end=t.add(i.start,n)}return r}function DM(e,t){let{refined:n,extra:r}=sA(e,TM),i=n.start?t.createMarkerMeta(n.start):null,a=n.end?t.createMarkerMeta(n.end):null,{allDay:o}=n;return o??=i&&i.isTimeUnspecified&&(!a||a.isTimeUnspecified),Object.assign({range:{start:i?i.marker:null,end:a?a.marker:null},allDay:o},r)}function OM(e,t){return Object.assign(Object.assign({},AM(e.range,t,e.allDay)),{allDay:e.allDay})}function kM(e,t,n){return Object.assign(Object.assign({},AM(e,t,n)),{timeZone:t.timeZone})}function AM(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}function jM(e,t,n){let r=mj({editable:!1},n),i=gj(r.refined,r.extra,``,e.allDay,!0,n);return{def:i,ui:mM(i,t),instance:oj(i.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}function MM(e,t,n){let r=!1,i=function(e){r||(r=!0,t(e))},a=function(e){r||(r=!0,n(e))},o=e(i,a);o&&typeof o.then==`function`&&o.then(i,a)}var NM=class extends Error{constructor(e,t){super(e),this.response=t}};function PM(e,t,n){e=e.toUpperCase();let r={method:e};return e===`GET`?t+=(t.indexOf(`?`)===-1?`?`:`&`)+new URLSearchParams(n):(r.body=new URLSearchParams(n),r.headers={"Content-Type":`application/x-www-form-urlencoded`}),fetch(t,r).then(e=>{if(e.ok)return e.json().then(t=>[t,e],()=>{throw new NM(`Failure parsing JSON`,e)});throw new NM(`Request failed`,e)})}var FM;function IM(){return FM??=LM(),FM}function LM(){if(typeof document>`u`)return!0;let e=document.createElement(`div`);e.style.position=`absolute`,e.style.top=`0px`,e.style.left=`0px`,e.innerHTML=`<table><tr><td><div></div></td></tr></table>`,e.querySelector(`table`).style.height=`100px`,e.querySelector(`div`).style.height=`100%`,document.body.appendChild(e);let t=e.querySelector(`div`).offsetHeight>0;return document.body.removeChild(e),t}var RM=class extends FA{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{OA(()=>{this.setState({forPrint:!0})})},this.handleAfterPrint=()=>{OA(()=>{this.setState({forPrint:!1})})}}render(){let{props:e}=this,{options:t}=e,{forPrint:n}=this.state,r=n||t.height===`auto`||t.contentHeight===`auto`,i=!r&&t.height!=null?t.height:``,a=[`fc`,n?`fc-media-print`:`fc-media-screen`,`fc-direction-${t.direction}`,e.theme.getClass(`root`)];return IM()||a.push(`fc-liquid-hack`),e.children(a,i,r,n)}componentDidMount(){let{emitter:e}=this.props;e.on(`_beforeprint`,this.handleBeforePrint),e.on(`_afterprint`,this.handleAfterPrint)}componentWillUnmount(){let{emitter:e}=this.props;e.off(`_beforeprint`,this.handleBeforePrint),e.off(`_afterprint`,this.handleAfterPrint)}},zM=class{constructor(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}destroy(){}};function BM(e,t){return{component:e,el:t.el,useEventCenter:t.useEventCenter==null||t.useEventCenter,isHitComboAllowed:t.isHitComboAllowed||null}}var VM={},HM=class extends eD{constructor(e,t){super(e,t),this.handleRefresh=()=>{let e=this.computeTiming();e.state.nowDate.valueOf()!==this.state.nowDate.valueOf()&&this.setState(e.state),this.clearTimeout(),this.setTimeout(e.waitMs)},this.handleVisibilityChange=()=>{document.hidden||this.handleRefresh()},this.state=this.computeTiming().state}render(){let{props:e,state:t}=this;return e.children(t.nowDate,t.todayRange)}componentDidMount(){this.setTimeout(),this.context.nowManager.addResetListener(this.handleRefresh),document.addEventListener(`visibilitychange`,this.handleVisibilityChange)}componentDidUpdate(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())}componentWillUnmount(){this.clearTimeout(),this.context.nowManager.removeResetListener(this.handleRefresh),document.removeEventListener(`visibilitychange`,this.handleVisibilityChange)}computeTiming(){let{props:e,context:t}=this,n=t.nowManager.getDateMarker(),{nowIndicatorSnap:r}=t.options;r===`auto`&&(r=/year|month|week|day/.test(e.unit)||(e.unitValue||1)===1);let i,a;return r?(i=t.dateEnv.startOf(n,e.unit),a=t.dateEnv.add(i,UO(1,e.unit)).valueOf()-n.valueOf()):(i=n,a=6e4),a=Math.min(864e5,a),{state:{nowDate:i,todayRange:UM(i)},waitMs:a}}setTimeout(e=this.computeTiming().waitMs){this.timeoutId=setTimeout(()=>{let e=this.computeTiming();this.setState(e.state,()=>{this.setTimeout(e.waitMs)})},e)}clearTimeout(){this.timeoutId&&clearTimeout(this.timeoutId)}};HM.contextType=MA;function UM(e){let t=fk(e);return{start:t,end:nk(t,1)}}var WM=class{getCurrentData(){return this.currentDataManager.getCurrentData()}dispatch(e){this.currentDataManager.dispatch(e)}get view(){return this.getCurrentData().viewApi}batchRendering(e){e()}updateSize(){this.trigger(`_resize`,!0)}setOption(e,t){this.dispatch({type:`SET_OPTION`,optionName:e,rawOptionValue:t})}getOption(e){return this.currentDataManager.currentCalendarOptionsInput[e]}getAvailableLocaleCodes(){return Object.keys(this.getCurrentData().availableRawLocales)}on(e,t){let{currentDataManager:n}=this;n.currentCalendarOptionsRefiners[e]?n.emitter.on(e,t):console.warn(`Unknown listener name '${e}'`)}off(e,t){this.currentDataManager.emitter.off(e,t)}trigger(e,...t){this.currentDataManager.emitter.trigger(e,...t)}changeView(e,t){this.batchRendering(()=>{if(this.unselect(),t){if(t.start&&t.end)this.dispatch({type:`CHANGE_VIEW_TYPE`,viewType:e}),this.dispatch({type:`SET_OPTION`,optionName:`visibleRange`,rawOptionValue:t});else{let{dateEnv:n}=this.getCurrentData();this.dispatch({type:`CHANGE_VIEW_TYPE`,viewType:e,dateMarker:n.createMarker(t)})}}else this.dispatch({type:`CHANGE_VIEW_TYPE`,viewType:e})})}zoomTo(e,t){let n=this.getCurrentData(),r;t||=`day`,r=n.viewSpecs[t]||this.getUnitViewSpec(t),this.unselect(),r?this.dispatch({type:`CHANGE_VIEW_TYPE`,viewType:r.type,dateMarker:e}):this.dispatch({type:`CHANGE_DATE`,dateMarker:e})}getUnitViewSpec(e){let{viewSpecs:t,toolbarConfig:n}=this.getCurrentData(),r=[].concat(n.header?n.header.viewsWithButtons:[],n.footer?n.footer.viewsWithButtons:[]),i,a;for(let e in t)r.push(e);for(i=0;i<r.length;i+=1)if(a=t[r[i]],a&&a.singleUnit===e)return a;return null}prev(){this.unselect(),this.dispatch({type:`PREV`})}next(){this.unselect(),this.dispatch({type:`NEXT`})}prevYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:e.dateEnv.addYears(e.currentDate,-1)})}nextYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:e.dateEnv.addYears(e.currentDate,1)})}today(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:e.nowManager.getDateMarker()})}gotoDate(e){let t=this.getCurrentData();this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:t.dateEnv.createMarker(e)})}incrementDate(e){let t=this.getCurrentData(),n=UO(e);n&&(this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:t.dateEnv.add(t.currentDate,n)}))}getDate(){let e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)}formatDate(e,t){let{dateEnv:n}=this.getCurrentData();return n.format(n.createMarker(e),Zk(t))}formatRange(e,t,n){let{dateEnv:r}=this.getCurrentData();return r.formatRange(r.createMarker(e),r.createMarker(t),Zk(n),n)}formatIso(e,t){let{dateEnv:n}=this.getCurrentData();return n.formatIso(n.createMarker(e),{omitTime:t})}select(e,t){let n;n=t==null?e.start==null?{start:e,end:null}:e:{start:e,end:t};let r=this.getCurrentData(),i=EM(n,r.dateEnv,UO({days:1}));i&&(this.dispatch({type:`SELECT_DATES`,selection:i}),$j(i,null,r))}unselect(e){let t=this.getCurrentData();t.dateSelection&&(this.dispatch({type:`UNSELECT_DATES`}),eM(e,t))}addEvent(e,t){if(e instanceof sM){let t=e._def,n=e._instance;return this.getCurrentData().eventStore.defs[t.defId]||(this.dispatch({type:`ADD_EVENTS`,eventStore:bj({def:t,instance:n})}),this.triggerEventAdd(e)),e}let n=this.getCurrentData(),r;if(t instanceof oM)r=t.internalEventSource;else if(typeof t==`boolean`)t&&([r]=pA(n.eventSources));else if(t!=null){let e=this.getEventSourceById(t);if(!e)return console.warn(`Could not find an event source with ID "${t}"`),null;r=e.internalEventSource}let i=pj(e,r,n,!1);if(i){let e=new sM(n,i.def,i.def.recurringDef?null:i.instance);return this.dispatch({type:`ADD_EVENTS`,eventStore:bj(i)}),this.triggerEventAdd(e),e}return null}triggerEventAdd(e){let{emitter:t}=this.getCurrentData();t.trigger(`eventAdd`,{event:e,relatedEvents:[],revert:()=>{this.dispatch({type:`REMOVE_EVENTS`,eventStore:cM(e)})}})}getEventById(e){let t=this.getCurrentData(),{defs:n,instances:r}=t.eventStore;e=String(e);for(let i in n){let a=n[i];if(a.publicId===e){if(a.recurringDef)return new sM(t,a,null);for(let e in r){let n=r[e];if(n.defId===a.defId)return new sM(t,a,n)}}}return null}getEvents(){let e=this.getCurrentData();return lM(e.eventStore,e)}removeAllEvents(){this.dispatch({type:`REMOVE_ALL_EVENTS`})}getEventSources(){let e=this.getCurrentData(),t=e.eventSources,n=[];for(let r in t)n.push(new oM(e,t[r]));return n}getEventSourceById(e){let t=this.getCurrentData(),n=t.eventSources;e=String(e);for(let r in n)if(n[r].publicId===e)return new oM(t,n[r]);return null}addEventSource(e){let t=this.getCurrentData();if(e instanceof oM)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:`ADD_EVENT_SOURCES`,sources:[e.internalEventSource]}),e;let n=Fj(e,t);return n?(this.dispatch({type:`ADD_EVENT_SOURCES`,sources:[n]}),new oM(t,n)):null}removeAllEventSources(){this.dispatch({type:`REMOVE_ALL_EVENT_SOURCES`})}refetchEvents(){this.dispatch({type:`FETCH_EVENT_SOURCES`,isRefetch:!0})}scrollToTime(e){let t=UO(e);t&&this.trigger(`_scrollRequest`,{time:t})}};function GM(e,t){let n={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)};return n.left<n.right&&n.top<n.bottom&&n}function KM(e,t,n,r){return{dow:e.getUTCDay(),isDisabled:!(!r||r.activeRange&&ej(r.activeRange,e)),isOther:!(!r||ej(r.currentRange,e)),isToday:!!(t&&ej(t,e)),isPast:!!(n?e<n:t&&e<t.start),isFuture:!!(n?e>n:t&&e>=t.end)}}function qM(e,t){let n=[`fc-day`,`fc-day-${ek[e.dow]}`];return e.isDisabled?n.push(`fc-day-disabled`):(e.isToday&&(n.push(`fc-day-today`),n.push(t.getClass(`today`))),e.isPast&&n.push(`fc-day-past`),e.isFuture&&n.push(`fc-day-future`),e.isOther&&n.push(`fc-day-other`)),n}var JM=Zk({year:`numeric`,month:`long`,day:`numeric`}),YM=Zk({week:`long`});function XM(e,t,n=`day`,r=!0){let{dateEnv:i,options:a,calendarApi:o}=e,s=i.format(t,n===`week`?YM:JM);if(a.navLinks){let e=i.toDate(t),c=e=>{let r=n===`day`?a.navLinkDayClick:n===`week`?a.navLinkWeekClick:null;typeof r==`function`?r.call(o,i.toDate(t),e):(typeof r==`string`&&(n=r),o.zoomTo(t,n))};return Object.assign({title:zO(a.navLinkHint,[s,e],s),"data-navlink":``},r?AO(c):{onClick:c})}return{"aria-label":s}}var ZM;function QM(){return ZM||=$M(),ZM}function $M(){let e=document.createElement(`div`);e.style.overflow=`scroll`,e.style.position=`absolute`,e.style.top=`-9999px`,e.style.left=`-9999px`,document.body.appendChild(e);let t=eN(e);return document.body.removeChild(e),t}function eN(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}function tN(e){let t=nN(e),n=e.getBoundingClientRect();for(let e of t){let t=GM(n,e.getBoundingClientRect());if(t)n=t;else return null}return n}function nN(e){let t=[];for(;e instanceof HTMLElement;){let n=window.getComputedStyle(e);if(n.position===`fixed`)break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}var rN=class{constructor(e,t,n,r){this.els=t;let i=this.originClientRect=e.getBoundingClientRect();n&&this.buildElHorizontals(i.left),r&&this.buildElVerticals(i.top)}buildElHorizontals(e){let t=[],n=[];for(let r of this.els){let i=r.getBoundingClientRect();t.push(i.left-e),n.push(i.right-e)}this.lefts=t,this.rights=n}buildElVerticals(e){let t=[],n=[];for(let r of this.els){let i=r.getBoundingClientRect();t.push(i.top-e),n.push(i.bottom-e)}this.tops=t,this.bottoms=n}leftToIndex(e){let{lefts:t,rights:n}=this,r=t.length,i=0;for(;i<r;i+=1)if(e>=t[i]&&e<n[i])return i}topToIndex(e){let{tops:t,bottoms:n}=this,r=t.length,i=0;for(;i<r;i+=1)if(e>=t[i]&&e<n[i])return i}getWidth(e){return this.rights[e]-this.lefts[e]}getHeight(e){return this.bottoms[e]-this.tops[e]}similarTo(e){return iN(this.tops||[],e.tops||[])&&iN(this.bottoms||[],e.bottoms||[])&&iN(this.lefts||[],e.lefts||[])&&iN(this.rights||[],e.rights||[])}};function iN(e,t){let n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(Math.round(e[r])!==Math.round(t[r]))return!1;return!0}var aN=class extends FA{constructor(){super(...arguments),this.uid=NO()}prepareHits(){}queryHit(e,t,n,r){return null}isValidSegDownEl(e){return!this.props.eventDrag&&!this.props.eventResize&&!vO(e,`.fc-event-mirror`)}isValidDateDownEl(e){return!vO(e,`.fc-event:not(.fc-bg-event)`)&&!vO(e,`.fc-more-link`)&&!vO(e,`a[data-navlink]`)&&!vO(e,`.fc-popover`)}},oN=class{constructor(e=e=>e.thickness||1){this.getEntryThickness=e,this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}addSegs(e){let t=[];for(let n of e)this.insertEntry(n,t);return t}insertEntry(e,t){let n=this.findInsertion(e);this.isInsertionValid(n,e)?this.insertEntryAt(e,n):this.handleInvalidInsertion(n,e,t)}isInsertionValid(e,t){return(this.maxCoord===-1||e.levelCoord+this.getEntryThickness(t)<=this.maxCoord)&&(this.maxStackCnt===-1||e.stackCnt<this.maxStackCnt)}handleInvalidInsertion(e,t,n){if(this.allowReslicing&&e.touchingEntry){let r=Object.assign(Object.assign({},t),{span:lN(t.span,e.touchingEntry.span)});n.push(r),this.splitEntry(t,e.touchingEntry,n)}else n.push(t)}splitEntry(e,t,n){let r=e.span,i=t.span;r.start<i.start&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:r.start,end:i.start}},n),r.end>i.end&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:i.end,end:r.end}},n)}insertEntryAt(e,t){let{entriesByLevel:n,levelCoords:r}=this;t.lateral===-1?(uN(r,t.level,t.levelCoord),uN(n,t.level,[e])):uN(n[t.level],t.lateral,e),this.stackCnts[cN(e)]=t.stackCnt}findInsertion(e){let{levelCoords:t,entriesByLevel:n,strictOrder:r,stackCnts:i}=this,a=t.length,o=0,s=-1,c=-1,l=null,u=0;for(let d=0;d<a;d+=1){let a=t[d];if(!r&&a>=o+this.getEntryThickness(e))break;let f=n[d],p,m=dN(f,e.span.start,sN),h=m[0]+m[1];for(;(p=f[h])&&p.span.start<e.span.end;){let e=a+this.getEntryThickness(p);e>o&&(o=e,l=p,s=d,c=h),e===o&&(u=Math.max(u,i[cN(p)]+1)),h+=1}}let d=0;if(l)for(d=s+1;d<a&&t[d]<o;)d+=1;let f=-1;return d<a&&t[d]===o&&(f=dN(n[d],e.span.end,sN)[0]),{touchingLevel:s,touchingLateral:c,touchingEntry:l,stackCnt:u,levelCoord:o,level:d,lateral:f}}toRects(){let{entriesByLevel:e,levelCoords:t}=this,n=e.length,r=[];for(let i=0;i<n;i+=1){let n=e[i],a=t[i];for(let e of n)r.push(Object.assign(Object.assign({},e),{thickness:this.getEntryThickness(e),levelCoord:a}))}return r}};function sN(e){return e.span.end}function cN(e){return e.index+`:`+e.span.start}function lN(e,t){let n=Math.max(e.start,t.start),r=Math.min(e.end,t.end);return n<r?{start:n,end:r}:null}function uN(e,t,n){e.splice(t,0,n)}function dN(e,t,n){let r=0,i=e.length;if(!i||t<n(e[r]))return[0,0];if(t>n(e[i-1]))return[i,0];for(;r<i;){let a=Math.floor(r+(i-r)/2),o=n(e[a]);if(t<o)i=a;else if(t>o)r=a+1;else return[a,1]}return[r,0]}function fN(e,t){return Zk(!e||t>10?{weekday:`short`}:t>1?{weekday:`short`,month:`numeric`,day:`numeric`,omitCommas:!0}:{weekday:`long`})}var pN=`fc-col-header-cell`;function mN(e){return e.text}var hN=class extends FA{render(){let{dateEnv:e,options:t,theme:n,viewApi:r}=this.context,{props:i}=this,{date:a,dateProfile:o}=i,s=KM(a,i.todayRange,null,o),c=[pN].concat(qM(s,n)),l=e.format(a,i.dayHeaderFormat),u=!s.isDisabled&&i.colCnt>1?XM(this.context,a):{},d=e.toDate(a);e.namedTimeZoneImpl&&(d=rk(d,36e5));let f=Object.assign(Object.assign(Object.assign({date:d,view:r},i.extraRenderProps),{text:l}),s);return Z(WA,{elTag:`th`,elClasses:c,elAttrs:Object.assign({role:`columnheader`,colSpan:i.colSpan,"data-date":s.isDisabled?void 0:Ek(a)},i.extraDataAttrs),renderProps:f,generatorName:`dayHeaderContent`,customGenerator:t.dayHeaderContent,defaultGenerator:mN,classNameGenerator:t.dayHeaderClassNames,didMount:t.dayHeaderDidMount,willUnmount:t.dayHeaderWillUnmount},e=>Z(`div`,{className:`fc-scrollgrid-sync-inner`},!s.isDisabled&&Z(e,{elTag:`a`,elAttrs:u,elClasses:[`fc-col-header-cell-cushion`,i.isSticky&&`fc-sticky`]})))}},gN=Zk({weekday:`long`}),_N=class extends FA{render(){let{props:e}=this,{dateEnv:t,theme:n,viewApi:r,options:i}=this.context,a=nk(new Date(2592e5),e.dow),o={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},s=t.format(a,e.dayHeaderFormat),c=Object.assign(Object.assign(Object.assign(Object.assign({date:a},o),{view:r}),e.extraRenderProps),{text:s});return Z(WA,{elTag:`th`,elClasses:[pN,...qM(o,n),...e.extraClassNames||[]],elAttrs:Object.assign({role:`columnheader`,colSpan:e.colSpan},e.extraDataAttrs),renderProps:c,generatorName:`dayHeaderContent`,customGenerator:i.dayHeaderContent,defaultGenerator:mN,classNameGenerator:i.dayHeaderClassNames,didMount:i.dayHeaderDidMount,willUnmount:i.dayHeaderWillUnmount},n=>Z(`div`,{className:`fc-scrollgrid-sync-inner`},Z(n,{elTag:`a`,elClasses:[`fc-col-header-cell-cushion`,e.isSticky&&`fc-sticky`],elAttrs:{"aria-label":t.format(a,gN)}})))}},vN=class extends FA{constructor(){super(...arguments),this.createDayHeaderFormatter=Q(yN)}render(){let{context:e}=this,{dates:t,dateProfile:n,datesRepDistinctDays:r,renderIntro:i}=this.props,a=this.createDayHeaderFormatter(e.options.dayHeaderFormat,r,t.length);return Z(HM,{unit:`day`},(e,o)=>Z(`tr`,{role:`row`},i&&i(`day`),t.map(e=>r?Z(hN,{key:e.toISOString(),date:e,dateProfile:n,todayRange:o,colCnt:t.length,dayHeaderFormat:a}):Z(_N,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:a}))))}};function yN(e,t,n){return e||fN(t,n)}var bN=class{constructor(e,t){let n=e.start,{end:r}=e,i=[],a=[],o=-1;for(;n<r;)t.isHiddenDay(n)?i.push(o+.5):(o+=1,i.push(o),a.push(n)),n=nk(n,1);this.dates=a,this.indices=i,this.cnt=a.length}sliceRange(e){let t=this.getDateDayIndex(e.start),n=this.getDateDayIndex(nk(e.end,-1)),r=Math.max(0,t),i=Math.min(this.cnt-1,n);return r=Math.ceil(r),i=Math.floor(i),r<=i?{firstIndex:r,lastIndex:i,isStart:t===r,isEnd:n===i}:null}getDateDayIndex(e){let{indices:t}=this,n=Math.floor(ak(this.dates[0],e));return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]}},xN=class{constructor(e,t){let{dates:n}=e,r,i,a;if(t){for(i=n[0].getUTCDay(),r=1;r<n.length&&n[r].getUTCDay()!==i;r+=1);a=Math.ceil(n.length/r)}else a=1,r=n.length;this.rowCnt=a,this.colCnt=r,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}buildCells(){let e=[];for(let t=0;t<this.rowCnt;t+=1){let n=[];for(let e=0;e<this.colCnt;e+=1)n.push(this.buildCell(t,e));e.push(n)}return e}buildCell(e,t){let n=this.daySeries.dates[e*this.colCnt+t];return{key:n.toISOString(),date:n}}buildHeaderDates(){let e=[];for(let t=0;t<this.colCnt;t+=1)e.push(this.cells[0][t].date);return e}sliceRange(e){let{colCnt:t}=this,n=this.daySeries.sliceRange(e),r=[];if(n){let{firstIndex:e,lastIndex:i}=n,a=e;for(;a<=i;){let o=Math.floor(a/t),s=Math.min((o+1)*t,i+1);r.push({row:o,firstCol:a%t,lastCol:(s-1)%t,isStart:n.isStart&&a===e,isEnd:n.isEnd&&s-1===i}),a=s}}return r}},SN=class{constructor(){this.sliceBusinessHours=Q(this._sliceBusinessHours),this.sliceDateSelection=Q(this._sliceDateSpan),this.sliceEventStore=Q(this._sliceEventStore),this.sliceEventDrag=Q(this._sliceInteraction),this.sliceEventResize=Q(this._sliceInteraction),this.forceDayIfListItem=!1}sliceProps(e,t,n,r,...i){let{eventUiBases:a}=e,o=this.sliceEventStore(e.eventStore,a,t,n,...i);return{dateSelectionSegs:this.sliceDateSelection(e.dateSelection,t,n,a,r,...i),businessHourSegs:this.sliceBusinessHours(e.businessHours,t,n,r,...i),fgEventSegs:o.fg,bgEventSegs:o.bg,eventDrag:this.sliceEventDrag(e.eventDrag,a,t,n,...i),eventResize:this.sliceEventResize(e.eventResize,a,t,n,...i),eventSelection:e.eventSelection}}sliceNowDate(e,t,n,r,...i){return this._sliceDateSpan({range:{start:e,end:rk(e,1)},allDay:!1},t,n,{},r,...i)}_sliceBusinessHours(e,t,n,r,...i){return e?this._sliceEventStore(cj(e,CN(t,!!n),r),{},t,n,...i).bg:[]}_sliceEventStore(e,t,n,r,...i){if(e){let a=uM(e,t,CN(n,!!r),r);return{bg:this.sliceEventRanges(a.bg,i),fg:this.sliceEventRanges(a.fg,i)}}return{bg:[],fg:[]}}_sliceInteraction(e,t,n,r,...i){if(!e)return null;let a=uM(e.mutatedEvents,t,CN(n,!!r),r);return{segs:this.sliceEventRanges(a.fg,i),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}}_sliceDateSpan(e,t,n,r,i,...a){if(!e)return[];let o=CN(t,!!n),s=QA(e.range,o);if(s){e=Object.assign(Object.assign({},e),{range:s});let t=jM(e,r,i),n=this.sliceRange(e.range,...a);for(let e of n)e.eventRange=t;return n}return[]}sliceEventRanges(e,t){let n=[];for(let r of e)n.push(...this.sliceEventRange(r,t));return n}sliceEventRange(e,t){let n=e.range;this.forceDayIfListItem&&e.ui.display===`list-item`&&(n={start:n.start,end:nk(n.start,1)});let r=this.sliceRange(n,...t);for(let t of r)t.eventRange=e,t.isStart=e.isStart&&t.isStart,t.isEnd=e.isEnd&&t.isEnd;return r}};function CN(e,t){let n=e.activeRange;return t?n:{start:rk(n.start,e.slotMinTime.milliseconds),end:rk(n.end,e.slotMaxTime.milliseconds-864e5)}}var wN=/^(visible|hidden)$/,TN=class extends FA{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,RA(this.props.elRef,e)}}render(){let{props:e}=this,{liquid:t,liquidIsAbsolute:n}=e,r=t&&n,i=[`fc-scroller`];return t&&(n?i.push(`fc-scroller-liquid-absolute`):i.push(`fc-scroller-liquid`)),Z(`div`,{ref:this.handleEl,className:i.join(` `),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:r&&-(e.overcomeLeft||0)||``,right:r&&-(e.overcomeRight||0)||``,bottom:r&&-(e.overcomeBottom||0)||``,marginLeft:!r&&-(e.overcomeLeft||0)||``,marginRight:!r&&-(e.overcomeRight||0)||``,marginBottom:!r&&-(e.overcomeBottom||0)||``,maxHeight:e.maxHeight||``}},e.children)}needsXScrolling(){if(wN.test(this.props.overflowX))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:n}=e;for(let e=0;e<n.length;e+=1)if(n[e].getBoundingClientRect().width>t)return!0;return!1}needsYScrolling(){if(wN.test(this.props.overflowY))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:n}=e;for(let e=0;e<n.length;e+=1)if(n[e].getBoundingClientRect().height>t)return!0;return!1}getXScrollbarWidth(){return wN.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return wN.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}},EN=class{constructor(e){this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(e,t)=>{let{depths:n,currentMap:r}=this,i=!1,a=!1;e===null?(--n[t],n[t]||(delete r[t],delete this.callbackMap[t],i=!0)):(i=t in r,r[t]=e,n[t]=(n[t]||0)+1,a=!0),this.masterCallback&&(i&&this.masterCallback(null,String(t)),a&&this.masterCallback(e,String(t)))}}createRef(e){let t=this.callbackMap[e];return t||=this.callbackMap[e]=t=>{this.handleValue(t,String(e))},t}collect(e,t,n){return bA(this.currentMap,e,t,n)}getAll(){return pA(this.currentMap)}};function DN(e){let t=bO(e,`.fc-scrollgrid-shrink`),n=0;for(let e of t)n=Math.max(n,VO(e));return Math.ceil(n)}function ON(e,t){return e.liquid&&t.liquid}function kN(e,t){return t.maxHeight!=null||ON(e,t)}function AN(e,t,n,r){let{expandRows:i}=n;return typeof t.content==`function`?t.content(n):Z(`table`,{role:`presentation`,className:[t.tableClassName,e.syncRowHeights?`fc-scrollgrid-sync-table`:``].join(` `),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:i?n.clientHeight:``}},n.tableColGroupNode,Z(r?`thead`:`tbody`,{role:`presentation`},typeof t.rowContent==`function`?t.rowContent(n):t.rowContent))}function jN(e,t){return $O(e,t,mA)}function MN(e,t){let n=[];for(let r of e){let e=r.span||1;for(let i=0;i<e;i+=1)n.push(Z(`col`,{style:{width:r.width===`shrink`?NN(t):r.width||``,minWidth:r.minWidth||``}}))}return Z(`colgroup`,{},...n)}function NN(e){return e??4}function PN(e){for(let t of e)if(t.width===`shrink`)return!0;return!1}function FN(e,t){let n=[`fc-scrollgrid`,t.theme.getClass(`table`)];return e&&n.push(`fc-scrollgrid-liquid`),n}function IN(e,t){let n=[`fc-scrollgrid-section`,`fc-scrollgrid-section-${e.type}`,e.className];return t&&e.liquid&&e.maxHeight==null&&n.push(`fc-scrollgrid-section-liquid`),e.isSticky&&n.push(`fc-scrollgrid-section-sticky`),n}function LN(e){return Z(`div`,{className:`fc-scrollgrid-sticky-shim`,style:{width:e.clientWidth,minWidth:e.tableMinWidth}})}function RN(e){let{stickyHeaderDates:t}=e;return(t==null||t===`auto`)&&(t=e.height===`auto`||e.viewHeight===`auto`),t}function zN(e){let{stickyFooterScrollbar:t}=e;return(t==null||t===`auto`)&&(t=e.height===`auto`||e.viewHeight===`auto`),t}var BN=class extends FA{constructor(){super(...arguments),this.processCols=Q(e=>e,jN),this.renderMicroColGroup=Q(MN),this.scrollerRefs=new EN,this.scrollerElRefs=new EN(this._handleScrollerEl.bind(this)),this.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},this.handleSizing=()=>{this.safeSetState(Object.assign({shrinkWidth:this.computeShrinkWidth()},this.computeScrollerDims()))}}render(){let{props:e,state:t,context:n}=this,r=e.sections||[],i=this.processCols(e.cols),a=this.renderMicroColGroup(i,t.shrinkWidth),o=FN(e.liquid,n);e.collapsibleWidth&&o.push(`fc-scrollgrid-collapsible`);let s=r.length,c=0,l,u=[],d=[],f=[];for(;c<s&&(l=r[c]).type===`header`;)u.push(this.renderSection(l,a,!0)),c+=1;for(;c<s&&(l=r[c]).type===`body`;)d.push(this.renderSection(l,a,!1)),c+=1;for(;c<s&&(l=r[c]).type===`footer`;)f.push(this.renderSection(l,a,!0)),c+=1;let p=!IM(),m={role:`rowgroup`};return Z(`table`,{role:`grid`,className:o.join(` `),style:{height:e.height}},!(p||!u.length)&&Z(`thead`,m,...u),!(p||!d.length)&&Z(`tbody`,m,...d),!(p||!f.length)&&Z(`tfoot`,m,...f),p&&Z(`tbody`,m,...u,...d,...f))}renderSection(e,t,n){return`outerContent`in e?Z(JE,{key:e.key},e.outerContent):Z(`tr`,{key:e.key,role:`presentation`,className:IN(e,this.props.liquid).join(` `)},this.renderChunkTd(e,t,e.chunk,n))}renderChunkTd(e,t,n,r){if(`outerContent`in n)return n.outerContent;let{props:i}=this,{forceYScrollbars:a,scrollerClientWidths:o,scrollerClientHeights:s}=this.state,c=kN(i,e),l=ON(i,e),u=i.liquid?a?`scroll`:c?`auto`:`hidden`:`visible`,d=e.key,f=AN(e,n,{tableColGroupNode:t,tableMinWidth:``,clientWidth:!i.collapsibleWidth&&o[d]!==void 0?o[d]:null,clientHeight:s[d]===void 0?null:s[d],expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:()=>{}},r);return Z(r?`th`:`td`,{ref:n.elRef,role:`presentation`},Z(`div`,{className:`fc-scroller-harness${l?` fc-scroller-harness-liquid`:``}`},Z(TN,{ref:this.scrollerRefs.createRef(d),elRef:this.scrollerElRefs.createRef(d),overflowY:u,overflowX:i.liquid?`hidden`:`visible`,maxHeight:e.maxHeight,liquid:l,liquidIsAbsolute:!0},f)))}_handleScrollerEl(e,t){let n=VN(this.props.sections,t);n&&RA(n.chunk.scrollerElRef,e)}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return PN(this.props.cols)?DN(this.scrollerElRefs.getAll()):0}computeScrollerDims(){let e=QM(),{scrollerRefs:t,scrollerElRefs:n}=this,r=!1,i={},a={};for(let e in t.currentMap){let n=t.currentMap[e];if(n&&n.needsYScrolling()){r=!0;break}}for(let t of this.props.sections){let o=t.key,s=n.currentMap[o];if(s){let t=s.parentNode;i[o]=Math.floor(t.getBoundingClientRect().width-(r?e.y:0)),a[o]=Math.floor(t.getBoundingClientRect().height)}}return{forceYScrollbars:r,scrollerClientWidths:i,scrollerClientHeights:a}}};BN.addStateEquality({scrollerClientWidths:mA,scrollerClientHeights:mA});function VN(e,t){for(let n of e)if(n.key===t)return n;return null}var HN=class extends FA{constructor(){super(...arguments),this.buildPublicEvent=Q((e,t,n)=>new sM(e,t,n)),this.handleEl=e=>{this.el=e,RA(this.props.elRef,e),e&&dM(e,this.props.seg)}}render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,{eventRange:i}=r,{ui:a}=i,o={event:this.buildPublicEvent(t,i.def,i.instance),view:t.viewApi,timeText:e.timeText,textColor:a.textColor,backgroundColor:a.backgroundColor,borderColor:a.borderColor,isDraggable:!e.disableDragging&&_M(r,t),isStartResizable:!e.disableResizing&&vM(r,t),isEndResizable:!e.disableResizing&&yM(r),isMirror:!!(e.isDragging||e.isResizing||e.isDateSelecting),isStart:!!r.isStart,isEnd:!!r.isEnd,isPast:!!e.isPast,isFuture:!!e.isFuture,isToday:!!e.isToday,isSelected:!!e.isSelected,isDragging:!!e.isDragging,isResizing:!!e.isResizing};return Z(WA,{elRef:this.handleEl,elTag:e.elTag,elAttrs:e.elAttrs,elClasses:[...SM(o),...r.eventRange.ui.classNames,...e.elClasses||[]],elStyle:e.elStyle,renderProps:o,generatorName:`eventContent`,customGenerator:n.eventContent,defaultGenerator:e.defaultGenerator,classNameGenerator:n.eventClassNames,didMount:n.eventDidMount,willUnmount:n.eventWillUnmount},e.children)}componentDidUpdate(e){this.el&&this.props.seg!==e.seg&&dM(this.el,this.props.seg)}},UN=class extends FA{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,{ui:i}=r.eventRange,a=bM(r,n.eventTimeFormat||e.defaultTimeFormat,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return Z(HN,Object.assign({},e,{elTag:`a`,elStyle:{borderColor:i.borderColor,backgroundColor:i.backgroundColor},elAttrs:wM(r,t),defaultGenerator:WN,timeText:a}),(e,t)=>Z(JE,null,Z(e,{elTag:`div`,elClasses:[`fc-event-main`],elStyle:{color:t.textColor}}),!!t.isStartResizable&&Z(`div`,{className:`fc-event-resizer fc-event-resizer-start`}),!!t.isEndResizable&&Z(`div`,{className:`fc-event-resizer fc-event-resizer-end`})))}};UN.addPropsEquality({seg:mA});function WN(e){return Z(`div`,{className:`fc-event-main-frame`},e.timeText&&Z(`div`,{className:`fc-event-time`},e.timeText),Z(`div`,{className:`fc-event-title-container`},Z(`div`,{className:`fc-event-title fc-sticky`},e.event.title||Z(JE,null,`\xA0`))))}var GN=Zk({day:`numeric`}),KN=class extends FA{constructor(){super(...arguments),this.refineRenderProps=kk(JN)}render(){let{props:e,context:t}=this,{options:n}=t,r=this.refineRenderProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,isMonthStart:e.isMonthStart||!1,showDayNumber:e.showDayNumber,extraRenderProps:e.extraRenderProps,viewApi:t.viewApi,dateEnv:t.dateEnv,monthStartFormat:n.monthStartFormat});return Z(WA,{elRef:e.elRef,elTag:e.elTag,elAttrs:Object.assign(Object.assign({},e.elAttrs),r.isDisabled?{}:{"data-date":Ek(e.date)}),elClasses:[...qM(r,t.theme),...e.elClasses||[]],elStyle:e.elStyle,renderProps:r,generatorName:`dayCellContent`,customGenerator:n.dayCellContent,defaultGenerator:e.defaultGenerator,classNameGenerator:r.isDisabled?void 0:n.dayCellClassNames,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount},e.children)}};function qN(e){return!!(e.dayCellContent||BA(`dayCellContent`,e))}function JN(e){let{date:t,dateEnv:n,dateProfile:r,isMonthStart:i}=e,a=KM(t,e.todayRange,null,r),o=e.showDayNumber?n.format(t,i?e.monthStartFormat:GN):``;return Object.assign(Object.assign(Object.assign({date:n.toDate(t),view:e.viewApi},a),{isMonthStart:i,dayNumberText:o}),e.extraRenderProps)}var YN=class extends FA{render(){let{props:e}=this,{seg:t}=e;return Z(HN,{elTag:`div`,elClasses:[`fc-bg-event`],elStyle:{backgroundColor:t.eventRange.ui.backgroundColor},defaultGenerator:XN,seg:t,timeText:``,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,disableDragging:!0,disableResizing:!0})}};function XN(e){let{title:t}=e.event;return t&&Z(`div`,{className:`fc-event-title`},e.event.title)}function ZN(e){return Z(`div`,{className:`fc-${e}`})}var QN=e=>Z(MA.Consumer,null,t=>{let{dateEnv:n,options:r}=t,{date:i}=e,a=r.weekNumberFormat||e.defaultFormat,o={num:n.computeWeekNumber(i),text:n.format(i,a),date:i};return Z(WA,{elRef:e.elRef,elTag:e.elTag,elAttrs:e.elAttrs,elClasses:e.elClasses,elStyle:e.elStyle,renderProps:o,generatorName:`weekNumberContent`,customGenerator:r.weekNumberContent,defaultGenerator:$N,classNameGenerator:r.weekNumberClassNames,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount},e.children)});function $N(e){return e.text}var eP=10,tP=class extends FA{constructor(){super(...arguments),this.state={titleId:EO()},this.handleRootEl=e=>{this.rootEl=e,this.props.elRef&&RA(this.props.elRef,e)},this.handleDocumentMouseDown=e=>{let t=wO(e);this.rootEl.contains(t)||this.handleCloseClick()},this.handleDocumentKeyDown=e=>{e.key===`Escape`&&this.handleCloseClick()},this.handleCloseClick=()=>{let{onClose:e}=this.props;e&&e()}}render(){let{theme:e,options:t}=this.context,{props:n,state:r}=this,i=[`fc-popover`,e.getClass(`popover`)].concat(n.extraClassNames||[]);return JD(Z(`div`,Object.assign({},n.extraAttrs,{id:n.id,className:i.join(` `),"aria-labelledby":r.titleId,ref:this.handleRootEl}),Z(`div`,{className:`fc-popover-header `+e.getClass(`popoverHeader`)},Z(`span`,{className:`fc-popover-title`,id:r.titleId},n.title),Z(`span`,{className:`fc-popover-close `+e.getIconClass(`close`),title:t.closeHint,onClick:this.handleCloseClick})),Z(`div`,{className:`fc-popover-body `+e.getClass(`popoverContent`)},n.children)),n.parentEl)}componentDidMount(){document.addEventListener(`mousedown`,this.handleDocumentMouseDown),document.addEventListener(`keydown`,this.handleDocumentKeyDown),this.updateSize()}componentWillUnmount(){document.removeEventListener(`mousedown`,this.handleDocumentMouseDown),document.removeEventListener(`keydown`,this.handleDocumentKeyDown)}updateSize(){let{isRtl:e}=this.context,{alignmentEl:t,alignGridTop:n}=this.props,{rootEl:r}=this,i=tN(t);if(i){let a=r.getBoundingClientRect(),o=n?vO(t,`.fc-scrollgrid`).getBoundingClientRect().top:i.top,s=e?i.right-a.width:i.left;o=Math.max(o,eP),s=Math.min(s,document.documentElement.clientWidth-eP-a.width),s=Math.max(s,eP);let c=r.offsetParent.getBoundingClientRect();SO(r,{top:o-c.top,left:s-c.left})}}},nP=class extends aN{constructor(){super(...arguments),this.handleRootEl=e=>{this.rootEl=e,e?this.context.registerInteractiveComponent(this,{el:e,useEventCenter:!1}):this.context.unregisterInteractiveComponent(this)}}render(){let{options:e,dateEnv:t}=this.context,{props:n}=this,{startDate:r,todayRange:i,dateProfile:a}=n,o=t.format(r,e.dayPopoverFormat);return Z(KN,{elRef:this.handleRootEl,date:r,dateProfile:a,todayRange:i},(t,r,i)=>Z(tP,{elRef:i.ref,id:n.id,title:o,extraClassNames:[`fc-more-popover`].concat(i.className||[]),extraAttrs:i,parentEl:n.parentEl,alignmentEl:n.alignmentEl,alignGridTop:n.alignGridTop,onClose:n.onClose},qN(e)&&Z(t,{elTag:`div`,elClasses:[`fc-more-popover-misc`]}),n.children))}queryHit(e,t,n,r){let{rootEl:i,props:a}=this;return e>=0&&e<n&&t>=0&&t<r?{dateProfile:a.dateProfile,dateSpan:Object.assign({allDay:!a.forceTimed,range:{start:a.startDate,end:a.endDate}},a.extraDateSpan),dayEl:i,rect:{left:0,top:0,right:n,bottom:r},layer:1}:null}},rP=class extends FA{constructor(){super(...arguments),this.state={isPopoverOpen:!1,popoverId:EO()},this.handleLinkEl=e=>{this.linkEl=e,this.props.elRef&&RA(this.props.elRef,e)},this.handleClick=e=>{let{props:t,context:n}=this,{moreLinkClick:r}=n.options,i=aP(t).start;function a(e){let{def:t,instance:r,range:i}=e.eventRange;return{event:new sM(n,t,r),start:n.dateEnv.toDate(i.start),end:n.dateEnv.toDate(i.end),isStart:e.isStart,isEnd:e.isEnd}}typeof r==`function`&&(r=r({date:i,allDay:!!t.allDayDate,allSegs:t.allSegs.map(a),hiddenSegs:t.hiddenSegs.map(a),jsEvent:e,view:n.viewApi})),!r||r===`popover`?this.setState({isPopoverOpen:!0}):typeof r==`string`&&n.calendarApi.zoomTo(i,r)},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:e,state:t}=this;return Z(MA.Consumer,null,n=>{let{viewApi:r,options:i,calendarApi:a}=n,{moreLinkText:o}=i,{moreCnt:s}=e,c=aP(e),l=typeof o==`function`?o.call(a,s):`+${s} ${o}`,u=zO(i.moreLinkHint,[s],l),d={num:s,shortText:`+${s}`,text:l,view:r};return Z(JE,null,!!e.moreCnt&&Z(WA,{elTag:e.elTag||`a`,elRef:this.handleLinkEl,elClasses:[...e.elClasses||[],`fc-more-link`],elStyle:e.elStyle,elAttrs:Object.assign(Object.assign(Object.assign({},e.elAttrs),AO(this.handleClick)),{title:u,"aria-expanded":t.isPopoverOpen,"aria-controls":t.isPopoverOpen?t.popoverId:``}),renderProps:d,generatorName:`moreLinkContent`,customGenerator:i.moreLinkContent,defaultGenerator:e.defaultGenerator||iP,classNameGenerator:i.moreLinkClassNames,didMount:i.moreLinkDidMount,willUnmount:i.moreLinkWillUnmount},e.children),t.isPopoverOpen&&Z(nP,{id:t.popoverId,startDate:c.start,endDate:c.end,dateProfile:e.dateProfile,todayRange:e.todayRange,extraDateSpan:e.extraDateSpan,parentEl:this.parentEl,alignmentEl:e.alignmentElRef?e.alignmentElRef.current:this.linkEl,alignGridTop:e.alignGridTop,forceTimed:e.forceTimed,onClose:this.handlePopoverClose},e.popoverContent()))})}componentDidMount(){this.updateParentEl()}componentDidUpdate(){this.updateParentEl()}updateParentEl(){this.linkEl&&(this.parentEl=vO(this.linkEl,`.fc-view-harness`))}};function iP(e){return e.text}function aP(e){if(e.allDayDate)return{start:e.allDayDate,end:nk(e.allDayDate,1)};let{hiddenSegs:t}=e;return{start:oP(t),end:cP(t)}}function oP(e){return e.reduce(sP).eventRange.range.start}function sP(e,t){return e.eventRange.range.start<t.eventRange.range.start?e:t}function cP(e){return e.reduce(lP).eventRange.range.end}function lP(e,t){return e.eventRange.range.end>t.eventRange.range.end?e:t}var uP=class{constructor(){this.handlers=[]}set(e){this.currentValue=e;for(let t of this.handlers)t(e)}subscribe(e){this.handlers.push(e),this.currentValue!==void 0&&e(this.currentValue)}},dP=class extends uP{constructor(){super(...arguments),this.map=new Map}handle(e){let{map:t}=this,n=!1;e.isActive?(t.set(e.id,e),n=!0):t.has(e.id)&&(t.delete(e.id),n=!0),n&&this.set(t)}},fP=[],pP={code:`en`,week:{dow:0,doy:4},direction:`ltr`,buttonText:{prev:`prev`,next:`next`,prevYear:`prev year`,nextYear:`next year`,year:`year`,today:`today`,month:`month`,week:`week`,day:`day`,list:`list`},weekText:`W`,weekTextLong:`Week`,closeHint:`Close`,timeHint:`Time`,eventHint:`Event`,allDayText:`all-day`,moreLinkText:`more`,noEventsText:`No events to display`},mP=Object.assign(Object.assign({},pP),{buttonHints:{prev:`Previous $0`,next:`Next $0`,today(e,t){return t===`day`?`Today`:`This ${e}`}},viewHint:`$0 view`,navLinkHint:`Go to $0`,moreLinkHint(e){return`Show ${e} more event${e===1?``:`s`}`}});function hP(e){let t=e.length>0?e[0].code:`en`,n=fP.concat(e),r={en:mP};for(let e of n)r[e.code]=e;return{map:r,defaultCode:t}}function gP(e,t){return typeof e==`object`&&!Array.isArray(e)?yP(e.code,[e.code],e):_P(e,t)}function _P(e,t){let n=[].concat(e||[]);return yP(e,n,vP(n,t)||mP)}function vP(e,t){for(let n=0;n<e.length;n+=1){let r=e[n].toLocaleLowerCase().split(`-`);for(let e=r.length;e>0;--e){let n=r.slice(0,e).join(`-`);if(t[n])return t[n]}}return null}function yP(e,t,n){let r=lA([pP,n],[`buttonText`]);delete r.code;let{week:i}=r;return delete r.week,{codeArg:e,codes:t,week:i,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}function bP(e){return{id:NO(),name:e.name,premiumReleaseDate:e.premiumReleaseDate?new Date(e.premiumReleaseDate):void 0,deps:e.deps||[],reducers:e.reducers||[],isLoadingFuncs:e.isLoadingFuncs||[],contextInit:[].concat(e.contextInit||[]),eventRefiners:e.eventRefiners||{},eventDefMemberAdders:e.eventDefMemberAdders||[],eventSourceRefiners:e.eventSourceRefiners||{},isDraggableTransformers:e.isDraggableTransformers||[],eventDragMutationMassagers:e.eventDragMutationMassagers||[],eventDefMutationAppliers:e.eventDefMutationAppliers||[],dateSelectionTransformers:e.dateSelectionTransformers||[],datePointTransforms:e.datePointTransforms||[],dateSpanTransforms:e.dateSpanTransforms||[],views:e.views||{},viewPropsTransformers:e.viewPropsTransformers||[],isPropsValid:e.isPropsValid||null,externalDefTransforms:e.externalDefTransforms||[],viewContainerAppends:e.viewContainerAppends||[],eventDropTransformers:e.eventDropTransformers||[],componentInteractions:e.componentInteractions||[],calendarInteractions:e.calendarInteractions||[],themeClasses:e.themeClasses||{},eventSourceDefs:e.eventSourceDefs||[],cmdFormatter:e.cmdFormatter,recurringTypes:e.recurringTypes||[],namedTimeZonedImpl:e.namedTimeZonedImpl,initialView:e.initialView||``,elementDraggingImpl:e.elementDraggingImpl,optionChangeHandlers:e.optionChangeHandlers||{},scrollGridImpl:e.scrollGridImpl||null,listenerRefiners:e.listenerRefiners||{},optionRefiners:e.optionRefiners||{},propSetHandlers:e.propSetHandlers||{}}}function xP(e,t){let n={},r={premiumReleaseDate:void 0,reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:``,elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function i(e){for(let t of e){let e=t.name,a=n[e];a===void 0?(n[e]=t.id,i(t.deps),r=CP(r,t)):a!==t.id&&console.warn(`Duplicate plugin '${e}'`)}}return e&&i(e),i(t),r}function SP(){let e=[],t=[],n;return(r,i)=>(n&&$O(r,e)&&$O(i,t)||(n=xP(r,i)),e=r,t=i,n)}function CP(e,t){return{premiumReleaseDate:wP(e.premiumReleaseDate,t.premiumReleaseDate),reducers:e.reducers.concat(t.reducers),isLoadingFuncs:e.isLoadingFuncs.concat(t.isLoadingFuncs),contextInit:e.contextInit.concat(t.contextInit),eventRefiners:Object.assign(Object.assign({},e.eventRefiners),t.eventRefiners),eventDefMemberAdders:e.eventDefMemberAdders.concat(t.eventDefMemberAdders),eventSourceRefiners:Object.assign(Object.assign({},e.eventSourceRefiners),t.eventSourceRefiners),isDraggableTransformers:e.isDraggableTransformers.concat(t.isDraggableTransformers),eventDragMutationMassagers:e.eventDragMutationMassagers.concat(t.eventDragMutationMassagers),eventDefMutationAppliers:e.eventDefMutationAppliers.concat(t.eventDefMutationAppliers),dateSelectionTransformers:e.dateSelectionTransformers.concat(t.dateSelectionTransformers),datePointTransforms:e.datePointTransforms.concat(t.datePointTransforms),dateSpanTransforms:e.dateSpanTransforms.concat(t.dateSpanTransforms),views:Object.assign(Object.assign({},e.views),t.views),viewPropsTransformers:e.viewPropsTransformers.concat(t.viewPropsTransformers),isPropsValid:t.isPropsValid||e.isPropsValid,externalDefTransforms:e.externalDefTransforms.concat(t.externalDefTransforms),viewContainerAppends:e.viewContainerAppends.concat(t.viewContainerAppends),eventDropTransformers:e.eventDropTransformers.concat(t.eventDropTransformers),calendarInteractions:e.calendarInteractions.concat(t.calendarInteractions),componentInteractions:e.componentInteractions.concat(t.componentInteractions),themeClasses:Object.assign(Object.assign({},e.themeClasses),t.themeClasses),eventSourceDefs:e.eventSourceDefs.concat(t.eventSourceDefs),cmdFormatter:t.cmdFormatter||e.cmdFormatter,recurringTypes:e.recurringTypes.concat(t.recurringTypes),namedTimeZonedImpl:t.namedTimeZonedImpl||e.namedTimeZonedImpl,initialView:e.initialView||t.initialView,elementDraggingImpl:e.elementDraggingImpl||t.elementDraggingImpl,optionChangeHandlers:Object.assign(Object.assign({},e.optionChangeHandlers),t.optionChangeHandlers),scrollGridImpl:t.scrollGridImpl||e.scrollGridImpl,listenerRefiners:Object.assign(Object.assign({},e.listenerRefiners),t.listenerRefiners),optionRefiners:Object.assign(Object.assign({},e.optionRefiners),t.optionRefiners),propSetHandlers:Object.assign(Object.assign({},e.propSetHandlers),t.propSetHandlers)}}function wP(e,t){return e===void 0?t:t===void 0?e:new Date(Math.max(e.valueOf(),t.valueOf()))}var TP=class extends DA{};TP.prototype.classes={root:`fc-theme-standard`,tableCellShaded:`fc-cell-shaded`,buttonGroup:`fc-button-group`,button:`fc-button fc-button-primary`,buttonActive:`fc-button-active`},TP.prototype.baseIconClass=`fc-icon`,TP.prototype.iconClasses={close:`fc-icon-x`,prev:`fc-icon-chevron-left`,next:`fc-icon-chevron-right`,prevYear:`fc-icon-chevrons-left`,nextYear:`fc-icon-chevrons-right`},TP.prototype.rtlIconClasses={prev:`fc-icon-chevron-right`,next:`fc-icon-chevron-left`,prevYear:`fc-icon-chevrons-right`,nextYear:`fc-icon-chevrons-left`},TP.prototype.iconOverrideOption=`buttonIcons`,TP.prototype.iconOverrideCustomButtonOption=`icon`,TP.prototype.iconOverridePrefix=`fc-icon-`;function EP(e,t){let n={},r;for(r in e)DP(r,n,e,t);for(r in t)DP(r,n,e,t);return n}function DP(e,t,n,r){if(t[e])return t[e];let i=OP(e,t,n,r);return i&&(t[e]=i),i}function OP(e,t,n,r){let i=n[e],a=r[e],o=e=>i&&i[e]!==null?i[e]:a&&a[e]!==null?a[e]:null,s=o(`component`),c=o(`superType`),l=null;if(c){if(c===e)throw Error(`Can't have a custom view type that references itself`);l=DP(c,t,n,r)}return!s&&l&&(s=l.component),s?{type:e,component:s,defaults:Object.assign(Object.assign({},l?l.defaults:{}),i?i.rawOptions:{}),overrides:Object.assign(Object.assign({},l?l.overrides:{}),a?a.rawOptions:{})}:null}function kP(e){return dA(e,AP)}function AP(e){let t=typeof e==`function`?{component:e}:e,{component:n}=t;return t.content?n=jP(t):n&&!(n.prototype instanceof FA)&&(n=jP(Object.assign(Object.assign({},t),{content:n}))),{superType:t.type,component:n,rawOptions:t}}function jP(e){return t=>Z(MA.Consumer,null,n=>Z(WA,{elTag:`div`,elClasses:JA(n.viewSpec),renderProps:Object.assign(Object.assign({},t),{nextDayThreshold:n.options.nextDayThreshold}),generatorName:void 0,customGenerator:e.content,classNameGenerator:e.classNames,didMount:e.didMount,willUnmount:e.willUnmount}))}function MP(e,t,n,r){let i=kP(e),a=kP(t.views);return dA(EP(i,a),e=>NP(e,a,t,n,r))}function NP(e,t,n,r,i){let a=e.overrides.duration||e.defaults.duration||r.duration||n.duration,o=null,s=``,c=``,l={};if(a&&(o=FP(a),o)){let e=QO(o);s=e.unit,e.value===1&&(c=s,l=t[s]?t[s].rawOptions:{})}let u=t=>{let n=t.buttonText||{},r=e.defaults.buttonTextKey;return r!=null&&n[r]!=null?n[r]:n[e.type]==null?n[c]==null?null:n[c]:n[e.type]},d=t=>{let n=t.buttonHints||{},r=e.defaults.buttonTextKey;return r!=null&&n[r]!=null?n[r]:n[e.type]==null?n[c]==null?null:n[c]:n[e.type]};return{type:e.type,component:e.component,duration:o,durationUnit:s,singleUnit:c,optionDefaults:e.defaults,optionOverrides:Object.assign(Object.assign({},l),e.overrides),buttonTextOverride:u(r)||u(n)||e.overrides.buttonText,buttonTextDefault:u(i)||e.defaults.buttonText||u($k)||e.type,buttonTitleOverride:d(r)||d(n)||e.overrides.buttonHint,buttonTitleDefault:d(i)||e.defaults.buttonHint||d($k)}}var PP={};function FP(e){let t=JSON.stringify(e),n=PP[t];return n===void 0&&(n=UO(e),PP[t]=n),n}function IP(e,t){return t.type===`CHANGE_VIEW_TYPE`&&(e=t.viewType),e}function LP(e,t){switch(t.type){case`CHANGE_DATE`:return t.dateMarker;default:return e}}function RP(e,t,n){let r=e.initialDate;return r==null?n.getDateMarker():t.createMarker(r)}function zP(e,t){switch(t.type){case`SET_OPTION`:return Object.assign(Object.assign({},e),{[t.optionName]:t.rawOptionValue});default:return e}}function BP(e,t,n,r){let i;switch(t.type){case`CHANGE_VIEW_TYPE`:return r.build(t.dateMarker||n);case`CHANGE_DATE`:return r.build(t.dateMarker);case`PREV`:if(i=r.buildPrev(e,n),i.isValid)return i;break;case`NEXT`:if(i=r.buildNext(e,n),i.isValid)return i}return e}function VP(e,t,n){let r=t?t.activeRange:null;return GP({},$P(e,n),r,n)}function HP(e,t,n,r){let i=n?n.activeRange:null;switch(t.type){case`ADD_EVENT_SOURCES`:return GP(e,t.sources,i,r);case`REMOVE_EVENT_SOURCE`:return KP(e,t.sourceId);case`PREV`:case`NEXT`:case`CHANGE_DATE`:case`CHANGE_VIEW_TYPE`:return n?qP(e,i,r):e;case`FETCH_EVENT_SOURCES`:return YP(e,t.sourceIds?fA(t.sourceIds):QP(e,r),i,t.isRefetch||!1,r);case`RECEIVE_EVENTS`:case`RECEIVE_EVENT_ERROR`:return ZP(e,t.sourceId,t.fetchId,t.fetchRange);case`REMOVE_ALL_EVENT_SOURCES`:return{};default:return e}}function UP(e,t,n){let r=t?t.activeRange:null;return YP(e,QP(e,n),r,!0,n)}function WP(e){for(let t in e)if(e[t].isFetching)return!0;return!1}function GP(e,t,n,r){let i={};for(let e of t)i[e.sourceId]=e;return n&&(i=qP(i,n,r)),Object.assign(Object.assign({},e),i)}function KP(e,t){return uA(e,e=>e.sourceId!==t)}function qP(e,t,n){return YP(e,uA(e,e=>JP(e,t,n)),t,!1,n)}function JP(e,t,n){return eF(e,n)?!n.options.lazyFetching||!e.fetchRange||e.isFetching||t.start<e.fetchRange.start||t.end>e.fetchRange.end:!e.latestFetchId}function YP(e,t,n,r,i){let a={};for(let o in e){let s=e[o];a[o]=t[o]?XP(s,n,r,i):s}return a}function XP(e,t,n,r){let{options:i,calendarApi:a}=r,o=r.pluginHooks.eventSourceDefs[e.sourceDefId],s=NO();return o.fetch({eventSource:e,range:t,isRefetch:n,context:r},n=>{let{rawEvents:o}=n;i.eventSourceSuccess&&(o=i.eventSourceSuccess.call(a,o,n.response)||o),e.success&&(o=e.success.call(a,o,n.response)||o),r.dispatch({type:`RECEIVE_EVENTS`,sourceId:e.sourceId,fetchId:s,fetchRange:t,rawEvents:o})},n=>{let o=!1;i.eventSourceFailure&&(i.eventSourceFailure.call(a,n),o=!0),e.failure&&(e.failure(n),o=!0),o||console.warn(n.message,n),r.dispatch({type:`RECEIVE_EVENT_ERROR`,sourceId:e.sourceId,fetchId:s,fetchRange:t,error:n})}),Object.assign(Object.assign({},e),{isFetching:!0,latestFetchId:s})}function ZP(e,t,n,r){let i=e[t];return i&&n===i.latestFetchId?Object.assign(Object.assign({},e),{[t]:Object.assign(Object.assign({},i),{isFetching:!1,fetchRange:r})}):e}function QP(e,t){return uA(e,e=>eF(e,t))}function $P(e,t){let n=Ij(t),r=[].concat(e.eventSources||[]),i=[];e.initialEvents&&r.unshift(e.initialEvents),e.events&&r.unshift(e.events);for(let e of r){let r=Fj(e,t,n);r&&i.push(r)}return i}function eF(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function tF(e,t){switch(t.type){case`UNSELECT_DATES`:return null;case`SELECT_DATES`:return t.selection;default:return e}}function nF(e,t){switch(t.type){case`UNSELECT_EVENT`:return``;case`SELECT_EVENT`:return t.eventInstanceId;default:return e}}function rF(e,t){let n;switch(t.type){case`UNSET_EVENT_DRAG`:return null;case`SET_EVENT_DRAG`:return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function iF(e,t){let n;switch(t.type){case`UNSET_EVENT_RESIZE`:return null;case`SET_EVENT_RESIZE`:return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function aF(e,t,n,r,i){return{header:e.headerToolbar?oF(e.headerToolbar,e,t,n,r,i):null,footer:e.footerToolbar?oF(e.footerToolbar,e,t,n,r,i):null}}function oF(e,t,n,r,i,a){let o={},s=[],c=!1;for(let l in e){let u=e[l],d=sF(u,t,n,r,i,a);o[l]=d.widgets,s.push(...d.viewsWithButtons),c||=d.hasTitle}return{sectionWidgets:o,viewsWithButtons:s,hasTitle:c}}function sF(e,t,n,r,i,a){let o=t.direction===`rtl`,s=t.customButtons||{},c=n.buttonText||{},l=t.buttonText||{},u=n.buttonHints||{},d=t.buttonHints||{},f=e?e.split(` `):[],p=[],m=!1;return{widgets:f.map(e=>e.split(`,`).map(e=>{if(e===`title`)return m=!0,{buttonName:e};let n,f,h,g,_,v;if(n=s[e])h=e=>{n.click&&n.click.call(e.target,e,e.target)},(g=r.getCustomButtonIconClass(n))||(g=r.getIconClass(e,o))||(_=n.text),v=n.hint||n.text;else if(f=i[e]){p.push(e),h=()=>{a.changeView(e)},(_=f.buttonTextOverride)||(g=r.getIconClass(e,o))||(_=f.buttonTextDefault);let n=f.buttonTextOverride||f.buttonTextDefault;v=zO(f.buttonTitleOverride||f.buttonTitleDefault||t.viewHint,[n,e],n)}else if(a[e]){if(h=()=>{a[e]()},(_=c[e])||(g=r.getIconClass(e,o))||(_=l[e]),e===`prevYear`||e===`nextYear`){let t=e===`prevYear`?`prev`:`next`;v=zO(u[t]||d[t],[l.year||`year`,`year`],l[e])}else v=t=>zO(u[e]||d[e],[l[t]||t,t],l[e])}return{buttonName:e,buttonClick:h,buttonIcon:g,buttonText:_,buttonHint:v}})),viewsWithButtons:p,hasTitle:m}}var cF=class{constructor(e,t,n){this.type=e,this.getCurrentData=t,this.dateEnv=n}get calendar(){return this.getCurrentData().calendarApi}get title(){return this.getCurrentData().viewTitle}get activeStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)}get activeEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)}get currentStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)}get currentEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)}getOption(e){return this.getCurrentData().options[e]}},lF=bP({name:`array-event-source`,eventSourceDefs:[{ignoreRange:!0,parseMeta(e){return Array.isArray(e.events)?e.events:null},fetch(e,t){t({rawEvents:e.eventSource.meta})}}]}),uF=bP({name:`func-event-source`,eventSourceDefs:[{parseMeta(e){return typeof e.events==`function`?e.events:null},fetch(e,t,n){let{dateEnv:r}=e.context,i=e.eventSource.meta;MM(i.bind(null,kM(e.range,r)),e=>t({rawEvents:e}),n)}}]}),dF=bP({name:`json-event-source`,eventSourceRefiners:{method:String,extraParams:$,startParam:String,endParam:String,timeZoneParam:String},eventSourceDefs:[{parseMeta(e){return e.url&&(e.format===`json`||!e.format)?{url:e.url,format:`json`,method:(e.method||`GET`).toUpperCase(),extraParams:e.extraParams,startParam:e.startParam,endParam:e.endParam,timeZoneParam:e.timeZoneParam}:null},fetch(e,t,n){let{meta:r}=e.eventSource,i=fF(r,e.range,e.context);PM(r.method,r.url,i).then(([e,n])=>{t({rawEvents:e,response:n})},n)}}]});function fF(e,t,n){let{dateEnv:r,options:i}=n,a,o,s,c,l={};return a=e.startParam,a??=i.startParam,o=e.endParam,o??=i.endParam,s=e.timeZoneParam,s??=i.timeZoneParam,c=typeof e.extraParams==`function`?e.extraParams():e.extraParams||{},Object.assign(l,c),l[a]=r.formatIso(t.start),l[o]=r.formatIso(t.end),r.timeZone!==`local`&&(l[s]=r.timeZone),l}var pF=bP({name:`simple-recurring-event`,recurringTypes:[{parse(e,t){if(e.daysOfWeek||e.startTime||e.endTime||e.startRecur||e.endRecur){let n={daysOfWeek:e.daysOfWeek||null,startTime:e.startTime||null,endTime:e.endTime||null,startRecur:e.startRecur?t.createMarker(e.startRecur):null,endRecur:e.endRecur?t.createMarker(e.endRecur):null,dateEnv:t},r;return e.duration&&(r=e.duration),!r&&e.startTime&&e.endTime&&(r=qO(e.endTime,e.startTime)),{allDayGuess:!e.startTime&&!e.endTime,duration:r,typeData:n}}return null},expand(e,t,n){let r=QA(t,{start:e.startRecur,end:e.endRecur});return r?mF(e.daysOfWeek,e.startTime,e.dateEnv,n,r):[]}}],eventRefiners:{daysOfWeek:$,startTime:UO,endTime:UO,duration:UO,startRecur:$,endRecur:$}});function mF(e,t,n,r,i){let a=e?fA(e):null,o=fk(i.start),s=i.end,c=[];for(t&&(t.milliseconds<0?s=nk(s,1):t.milliseconds>=864e5&&(o=nk(o,-1)));o<s;){let e;(!a||a[o.getUTCDay()])&&(e=t?r.add(o,t):o,c.push(r.createMarker(n.toDate(e)))),o=nk(o,1)}return c}var hF=bP({name:`change-handler`,optionChangeHandlers:{events(e,t){gF([e],t)},eventSources:gF}});function gF(e,t){let n=pA(t.getCurrentData().eventSources);if(n.length===1&&e.length===1&&Array.isArray(n[0]._raw)&&Array.isArray(e[0])){t.dispatch({type:`RESET_RAW_EVENTS`,sourceId:n[0].sourceId,rawEvents:e[0]});return}let r=[];for(let t of e){let e=!1;for(let r=0;r<n.length;r+=1)if(n[r]._raw===t){n.splice(r,1),e=!0;break}e||r.push(t)}for(let e of n)t.dispatch({type:`REMOVE_EVENT_SOURCE`,sourceId:e.sourceId});for(let e of r)t.calendarApi.addEventSource(e)}function _F(e,t){t.emitter.trigger(`datesSet`,Object.assign(Object.assign({},kM(e.activeRange,t.dateEnv)),{view:t.viewApi}))}function vF(e,t){let{emitter:n}=t;n.hasHandlers(`eventsSet`)&&n.trigger(`eventsSet`,lM(e,t))}var yF=[lF,uF,dF,pF,hF,bP({name:`misc`,isLoadingFuncs:[e=>WP(e.eventSources)],propSetHandlers:{dateProfile:_F,eventStore:vF}})],bF=class{constructor(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new gO(this.drain.bind(this))}request(e,t){this.queue.push(e),this.delayedRunner.request(t)}pause(e){this.delayedRunner.pause(e)}resume(e,t){this.delayedRunner.resume(e,t)}drain(){let{queue:e}=this;for(;e.length;){let t=[],n;for(;n=e.shift();)this.runTask(n),t.push(n);this.drained(t)}}runTask(e){this.runTaskOption&&this.runTaskOption(e)}drained(e){this.drainedOption&&this.drainedOption(e)}};function xF(e,t,n){let r;return r=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,n.formatRange(r.start,r.end,Zk(t.titleFormat||SF(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}function SF(e){let{currentRangeUnit:t}=e;if(t===`year`)return{year:`numeric`};if(t===`month`)return{year:`numeric`,month:`long`};let n=dk(e.currentRange.start,e.currentRange.end);return n!==null&&n>1?{year:`numeric`,month:`short`,day:`numeric`}:{year:`numeric`,month:`long`,day:`numeric`}}var CF=class{constructor(){this.resetListeners=new Set}handleInput(e,t){let n=this.dateEnv;if(e!==n&&(typeof t==`function`?this.nowFn=t:n||(this.nowAnchorDate=e.toDate(t?e.createMarker(t):e.createNowMarker()),this.nowAnchorQueried=Date.now()),this.dateEnv=e,n))for(let e of this.resetListeners.values())e()}getDateMarker(){return this.nowAnchorDate?this.dateEnv.timestampToMarker(this.nowAnchorDate.valueOf()+(Date.now()-this.nowAnchorQueried)):this.dateEnv.createMarker(this.nowFn())}addResetListener(e){this.resetListeners.add(e)}removeResetListener(e){this.resetListeners.delete(e)}},wF=class{constructor(e){this.computeCurrentViewData=Q(this._computeCurrentViewData),this.organizeRawLocales=Q(hP),this.buildLocale=Q(gP),this.buildPluginHooks=SP(),this.buildDateEnv=Q(TF),this.buildTheme=Q(EF),this.parseToolbars=Q(aF),this.buildViewSpecs=Q(MP),this.buildDateProfileGenerator=kk(DF),this.buildViewApi=Q(OF),this.buildViewUiProps=kk(jF),this.buildEventUiBySource=Q(kF,mA),this.buildEventUiBases=Q(AF),this.parseContextBusinessHours=kk(NF),this.buildTitle=Q(xF),this.nowManager=new CF,this.emitter=new qj,this.actionRunner=new bF(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.optionsForRefining=[],this.optionsForHandling=[],this.getCurrentData=()=>this.data,this.dispatch=e=>{this.actionRunner.request(e)},this.props=e,this.actionRunner.pause(),this.nowManager=new CF;let t={},n=this.computeOptionsData(e.optionOverrides,t,e.calendarApi),r=n.calendarOptions.initialView||n.pluginHooks.initialView,i=this.computeCurrentViewData(r,n,e.optionOverrides,t);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(i.options);let a={nowManager:this.nowManager,dateEnv:n.dateEnv,options:n.calendarOptions,pluginHooks:n.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},o=RP(n.calendarOptions,n.dateEnv,this.nowManager),s=i.dateProfileGenerator.build(o);ej(s.activeRange,o)||(o=s.currentRange.start);for(let e of n.pluginHooks.contextInit)e(a);let c=VP(n.calendarOptions,s,a),l={dynamicOptionOverrides:t,currentViewType:r,currentDate:o,dateProfile:s,businessHours:this.parseContextBusinessHours(a),eventSources:c,eventUiBases:{},eventStore:Cj(),renderableEventStore:Cj(),dateSelection:null,eventSelection:``,eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(a).selectionConfig},u=Object.assign(Object.assign({},a),l);for(let e of n.pluginHooks.reducers)Object.assign(l,e(null,null,u));MF(l,a)&&this.emitter.trigger(`loading`,!0),this.state=l,this.updateData(),this.actionRunner.resume()}resetOptions(e,t){let{props:n}=this;t===void 0?n.optionOverrides=e:(n.optionOverrides=Object.assign(Object.assign({},n.optionOverrides||{}),e),this.optionsForRefining.push(...t)),(t===void 0||t.length)&&this.actionRunner.request({type:`NOTHING`})}_handleAction(e){let{props:t,state:n,emitter:r}=this,i=zP(n.dynamicOptionOverrides,e),a=this.computeOptionsData(t.optionOverrides,i,t.calendarApi),o=IP(n.currentViewType,e),s=this.computeCurrentViewData(o,a,t.optionOverrides,i);t.calendarApi.currentDataManager=this,r.setThisContext(t.calendarApi),r.setOptions(s.options);let c={nowManager:this.nowManager,dateEnv:a.dateEnv,options:a.calendarOptions,pluginHooks:a.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:r,getCurrentData:this.getCurrentData},{currentDate:l,dateProfile:u}=n;this.data&&this.data.dateProfileGenerator!==s.dateProfileGenerator&&(u=s.dateProfileGenerator.build(l)),l=LP(l,e),u=BP(u,e,l,s.dateProfileGenerator),e.type!==`PREV`&&e.type!==`NEXT`&&ej(u.currentRange,l)||(l=u.currentRange.start);let d=HP(n.eventSources,e,u,c),f=Rj(n.eventStore,e,d,u,c),p=WP(d)&&!s.options.progressiveEventRendering&&n.renderableEventStore||f,{eventUiSingleBase:m,selectionConfig:h}=this.buildViewUiProps(c),g=this.buildEventUiBySource(d),_=this.buildEventUiBases(p.defs,m,g),v={dynamicOptionOverrides:i,currentViewType:o,currentDate:l,dateProfile:u,eventSources:d,eventStore:f,renderableEventStore:p,selectionConfig:h,eventUiBases:_,businessHours:this.parseContextBusinessHours(c),dateSelection:tF(n.dateSelection,e),eventSelection:nF(n.eventSelection,e),eventDrag:rF(n.eventDrag,e),eventResize:iF(n.eventResize,e)},y=Object.assign(Object.assign({},c),v);for(let t of a.pluginHooks.reducers)Object.assign(v,t(n,e,y));let b=MF(n,c),x=MF(v,c);!b&&x?r.trigger(`loading`,!0):b&&!x&&r.trigger(`loading`,!1),this.state=v,t.onAction&&t.onAction(e)}updateData(){let{props:e,state:t}=this,n=this.data,r=this.computeOptionsData(e.optionOverrides,t.dynamicOptionOverrides,e.calendarApi),i=this.computeCurrentViewData(t.currentViewType,r,e.optionOverrides,t.dynamicOptionOverrides),a=this.data=Object.assign(Object.assign(Object.assign({nowManager:this.nowManager,viewTitle:this.buildTitle(t.dateProfile,i.options,r.dateEnv),calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},r),i),t),o=r.pluginHooks.optionChangeHandlers,s=n&&n.calendarOptions,c=r.calendarOptions;if(s&&s!==c){s.timeZone!==c.timeZone&&(t.eventSources=a.eventSources=UP(a.eventSources,t.dateProfile,a),t.eventStore=a.eventStore=Wj(a.eventStore,n.dateEnv,a.dateEnv),t.renderableEventStore=a.renderableEventStore=Wj(a.renderableEventStore,n.dateEnv,a.dateEnv));for(let e in o)(this.optionsForHandling.indexOf(e)!==-1||s[e]!==c[e])&&o[e](c[e],a)}this.optionsForHandling=[],e.onData&&e.onData(a)}computeOptionsData(e,t,n){if(!this.optionsForRefining.length&&e===this.stableOptionOverrides&&t===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:r,pluginHooks:i,localeDefaults:a,availableLocaleData:o,extra:s}=this.processRawCalendarOptions(e,t);PF(s);let c=this.buildDateEnv(r.timeZone,r.locale,r.weekNumberCalculation,r.firstDay,r.weekText,i,o,r.defaultRangeSeparator),l=this.buildViewSpecs(i.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,a),u=this.buildTheme(r,i),d=this.parseToolbars(r,this.stableOptionOverrides,u,l,n);return this.stableCalendarOptionsData={calendarOptions:r,pluginHooks:i,dateEnv:c,viewSpecs:l,theme:u,toolbarConfig:d,localeDefaults:a,availableRawLocales:o.map}}processRawCalendarOptions(e,t){let{locales:n,locale:r}=oA([$k,e,t]),i=this.organizeRawLocales(n),a=i.map,o=this.buildLocale(r||i.defaultCode,a).options,s=this.buildPluginHooks(e.plugins||[],yF),c=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Qk),eA),tA),s.listenerRefiners),s.optionRefiners),l={},u=oA([$k,o,e,t]),d={},f=this.currentCalendarOptionsInput,p=this.currentCalendarOptionsRefined,m=!1;for(let e in u)this.optionsForRefining.indexOf(e)===-1&&(u[e]===f[e]||nA[e]&&e in f&&nA[e](f[e],u[e]))?d[e]=p[e]:c[e]?(d[e]=c[e](u[e]),m=!0):l[e]=f[e];return m&&(this.currentCalendarOptionsInput=u,this.currentCalendarOptionsRefined=d,this.stableOptionOverrides=e,this.stableDynamicOptionOverrides=t),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:s,availableLocaleData:i,localeDefaults:o,extra:l}}_computeCurrentViewData(e,t,n,r){let i=t.viewSpecs[e];if(!i)throw Error(`viewType "${e}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:a,extra:o}=this.processRawViewOptions(i,t.pluginHooks,t.localeDefaults,n,r);return PF(o),this.nowManager.handleInput(t.dateEnv,a.now),{viewSpec:i,options:a,dateProfileGenerator:this.buildDateProfileGenerator({dateProfileGeneratorClass:i.optionDefaults.dateProfileGeneratorClass,nowManager:this.nowManager,duration:i.duration,durationUnit:i.durationUnit,usesMinMaxTime:i.optionDefaults.usesMinMaxTime,dateEnv:t.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:a.slotMinTime,slotMaxTime:a.slotMaxTime,showNonCurrentDates:a.showNonCurrentDates,dayCount:a.dayCount,dateAlignment:a.dateAlignment,dateIncrement:a.dateIncrement,hiddenDays:a.hiddenDays,weekends:a.weekends,validRangeInput:a.validRange,visibleRangeInput:a.visibleRange,fixedWeekCount:a.fixedWeekCount}),viewApi:this.buildViewApi(e,this.getCurrentData,t.dateEnv)}}processRawViewOptions(e,t,n,r,i){let a=oA([$k,e.optionDefaults,n,r,e.optionOverrides,i]),o=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Qk),eA),tA),aA),t.listenerRefiners),t.optionRefiners),s={},c=this.currentViewOptionsInput,l=this.currentViewOptionsRefined,u=!1,d={};for(let e in a)a[e]===c[e]||nA[e]&&nA[e](a[e],c[e])?s[e]=l[e]:(a[e]===this.currentCalendarOptionsInput[e]||nA[e]&&nA[e](a[e],this.currentCalendarOptionsInput[e])?e in this.currentCalendarOptionsRefined&&(s[e]=this.currentCalendarOptionsRefined[e]):o[e]?s[e]=o[e](a[e]):d[e]=a[e],u=!0);return u&&(this.currentViewOptionsInput=a,this.currentViewOptionsRefined=s),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:d}}};function TF(e,t,n,r,i,a,o,s){let c=gP(t||o.defaultCode,o.map);return new EA({calendarSystem:`gregory`,timeZone:e,namedTimeZoneImpl:a.namedTimeZonedImpl,locale:c,weekNumberCalculation:n,firstDay:r,weekText:i,cmdFormatter:a.cmdFormatter,defaultSeparator:s})}function EF(e,t){return new(t.themeClasses[e.themeSystem]||TP)(e)}function DF(e){return new(e.dateProfileGeneratorClass||aj)(e)}function OF(e,t,n){return new cF(e,t,n)}function kF(e){return dA(e,e=>e.ui)}function AF(e,t,n){let r={"":t};for(let t in e){let i=e[t];i.sourceId&&n[i.sourceId]&&(r[t]=n[i.sourceId])}return r}function jF(e){let{options:t}=e;return{eventUiSingleBase:jj({display:t.eventDisplay,editable:t.editable,startEditable:t.eventStartEditable,durationEditable:t.eventDurationEditable,constraint:t.eventConstraint,overlap:typeof t.eventOverlap==`boolean`?t.eventOverlap:void 0,allow:t.eventAllow,backgroundColor:t.eventBackgroundColor,borderColor:t.eventBorderColor,textColor:t.eventTextColor,color:t.eventColor},e),selectionConfig:jj({constraint:t.selectConstraint,overlap:typeof t.selectOverlap==`boolean`?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function MF(e,t){for(let n of t.pluginHooks.isLoadingFuncs)if(n(e))return!0;return!1}function NF(e){return Zj(e.options.businessHours,e)}function PF(e,t){for(let n in e)console.warn(`Unknown option '${n}'`+(t?` for view '${t}'`:``))}var FF=class extends FA{render(){return Z(`div`,{className:`fc-toolbar-chunk`},...this.props.widgetGroups.map(e=>this.renderWidgetGroup(e)))}renderWidgetGroup(e){let{props:t}=this,{theme:n}=this.context,r=[],i=!0;for(let a of e){let{buttonName:e,buttonClick:o,buttonText:s,buttonIcon:c,buttonHint:l}=a;if(e===`title`)i=!1,r.push(Z(`h2`,{className:`fc-toolbar-title`,id:t.titleId},t.title));else{let i=e===t.activeButton,a=!t.isTodayEnabled&&e===`today`||!t.isPrevEnabled&&e===`prev`||!t.isNextEnabled&&e===`next`,u=[`fc-${e}-button`,n.getClass(`button`)];i&&u.push(n.getClass(`buttonActive`)),r.push(Z(`button`,{type:`button`,title:typeof l==`function`?l(t.navUnit):l,disabled:a,"aria-pressed":i,className:u.join(` `),onClick:o},s||(c?Z(`span`,{className:c,role:`img`}):``)))}}return r.length>1?Z(`div`,{className:i&&n.getClass(`buttonGroup`)||``},...r):r[0]}},IF=class extends FA{render(){let{model:e,extraClassName:t}=this.props,n=!1,r,i,a=e.sectionWidgets,o=a.center;return a.left?(n=!0,r=a.left):r=a.start,a.right?(n=!0,i=a.right):i=a.end,Z(`div`,{className:[t||``,`fc-toolbar`,n?`fc-toolbar-ltr`:``].join(` `)},this.renderSection(`start`,r||[]),this.renderSection(`center`,o||[]),this.renderSection(`end`,i||[]))}renderSection(e,t){let{props:n}=this;return Z(FF,{key:e,widgetGroups:t,title:n.title,navUnit:n.navUnit,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled,titleId:n.titleId})}},LF=class extends FA{constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=e=>{this.el=e,RA(this.props.elRef,e),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:e,state:t}=this,{aspectRatio:n}=e,r=[`fc-view-harness`,n||e.liquid||e.height?`fc-view-harness-active`:`fc-view-harness-passive`],i=``,a=``;return n?t.availableWidth===null?a=`${1/n*100}%`:i=t.availableWidth/n:i=e.height||``,Z(`div`,{"aria-labelledby":e.labeledById,ref:this.handleEl,className:r.join(` `),style:{height:i,paddingBottom:a}},e.children)}componentDidMount(){this.context.addResizeHandler(this.handleResize)}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateAvailableWidth(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})}},RF=class extends zM{constructor(e){super(e),this.handleSegClick=(e,t)=>{let{component:n}=this,{context:r}=n,i=fM(t);if(i&&n.isValidSegDownEl(e.target)){let a=vO(e.target,`.fc-event-forced-url`),o=a?a.querySelector(`a[href]`).href:``;r.emitter.trigger(`eventClick`,{el:t,event:new sM(n.context,i.eventRange.def,i.eventRange.instance),jsEvent:e,view:r.viewApi}),o&&!e.defaultPrevented&&(window.location.href=o)}},this.destroy=OO(e.el,`click`,`.fc-event`,this.handleSegClick)}},zF=class extends zM{constructor(e){super(e),this.handleEventElRemove=e=>{e===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(e,t)=>{fM(t)&&(this.currentSegEl=t,this.triggerEvent(`eventMouseEnter`,e,t))},this.handleSegLeave=(e,t)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent(`eventMouseLeave`,e,t))},this.removeHoverListeners=kO(e.el,`.fc-event`,this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(e,t,n){let{component:r}=this,{context:i}=r,a=fM(n);(!t||r.isValidSegDownEl(t.target))&&i.emitter.trigger(e,{el:n,event:new sM(i,a.eventRange.def,a.eventRange.instance),jsEvent:t,view:i.viewApi})}},BF=class extends PA{constructor(){super(...arguments),this.buildViewContext=Q(NA),this.buildViewPropTransformers=Q(HF),this.buildToolbarProps=Q(VF),this.headerRef=qE(),this.footerRef=qE(),this.interactionsStore={},this.state={viewLabelId:EO()},this.registerInteractiveComponent=(e,t)=>{let n=BM(e,t),r=[RF,zF].concat(this.props.pluginHooks.componentInteractions).map(e=>new e(n));this.interactionsStore[e.uid]=r,VM[e.uid]=n},this.unregisterInteractiveComponent=e=>{let t=this.interactionsStore[e.uid];if(t){for(let e of t)e.destroy();delete this.interactionsStore[e.uid]}delete VM[e.uid]},this.resizeRunner=new gO(()=>{this.props.emitter.trigger(`_resize`,!0),this.props.emitter.trigger(`windowResize`,{view:this.props.viewApi})}),this.handleWindowResize=e=>{let{options:t}=this.props;t.handleWindowResize&&e.target===window&&this.resizeRunner.request(t.windowResizeDelay)}}render(){let{props:e}=this,{toolbarConfig:t,options:n}=e,r=!1,i=``,a;e.isHeightAuto||e.forPrint?i=``:n.height==null?n.contentHeight==null?a=Math.max(n.aspectRatio,.5):i=n.contentHeight:r=!0;let o=this.buildViewContext(e.viewSpec,e.viewApi,e.options,e.dateProfileGenerator,e.dateEnv,e.nowManager,e.theme,e.pluginHooks,e.dispatch,e.getCurrentData,e.emitter,e.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),s=t.header&&t.header.hasTitle?this.state.viewLabelId:void 0;return Z(MA.Provider,{value:o},Z(HM,{unit:`day`},n=>{let o=this.buildToolbarProps(e.viewSpec,e.dateProfile,e.dateProfileGenerator,e.currentDate,n,e.viewTitle);return Z(JE,null,t.header&&Z(IF,Object.assign({ref:this.headerRef,extraClassName:`fc-header-toolbar`,model:t.header,titleId:s},o)),Z(LF,{liquid:r,height:i,aspectRatio:a,labeledById:s},this.renderView(e),this.buildAppendContent()),t.footer&&Z(IF,Object.assign({ref:this.footerRef,extraClassName:`fc-footer-toolbar`,model:t.footer,titleId:``},o)))}))}componentDidMount(){let{props:e}=this;this.calendarInteractions=e.pluginHooks.calendarInteractions.map(t=>new t(e)),window.addEventListener(`resize`,this.handleWindowResize);let{propSetHandlers:t}=e.pluginHooks;for(let n in t)t[n](e[n],e)}componentDidUpdate(e){let{props:t}=this,{propSetHandlers:n}=t.pluginHooks;for(let r in n)t[r]!==e[r]&&n[r](t[r],t)}componentWillUnmount(){window.removeEventListener(`resize`,this.handleWindowResize),this.resizeRunner.clear();for(let e of this.calendarInteractions)e.destroy();this.props.emitter.trigger(`_unmount`)}buildAppendContent(){let{props:e}=this;return Z(JE,{},...e.pluginHooks.viewContainerAppends.map(t=>t(e)))}renderView(e){let{pluginHooks:t}=e,{viewSpec:n}=e,r={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},i=this.buildViewPropTransformers(t.viewPropsTransformers);for(let t of i)Object.assign(r,t.transform(r,e));let a=n.component;return Z(a,Object.assign({},r))}};function VF(e,t,n,r,i,a){let o=n.build(i,void 0,!1),s=n.buildPrev(t,r,!1),c=n.buildNext(t,r,!1);return{title:a,activeButton:e.type,navUnit:e.singleUnit,isTodayEnabled:o.isValid&&!ej(t.currentRange,i),isPrevEnabled:s.isValid,isNextEnabled:c.isValid}}function HF(e){return e.map(e=>new e)}var UF=class extends WM{constructor(e,t={}){super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=e=>{switch(e.type){case`SET_EVENT_DRAG`:case`SET_EVENT_RESIZE`:this.renderRunner.tryDrain()}},this.handleData=e=>{this.currentData=e,this.renderRunner.request(e.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:e}=this;OA(()=>{_D(Z(RM,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},(t,n,r,i)=>(this.setClassNames(t),this.setHeight(n),Z(UA.Provider,{value:this.customContentRenderId},Z(BF,Object.assign({isHeightAuto:r,forPrint:i},e))))),this.el)})}else this.isRendered&&(this.isRendered=!1,_D(null,this.el),this.setClassNames([]),this.setHeight(``))},lO(e),this.el=e,this.renderRunner=new gO(this.handleRenderRequest),new wF({optionOverrides:t,calendarApi:this,onAction:this.handleAction,onData:this.handleData})}render(){let e=this.isRendering;e?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()}destroy(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())}updateSize(){OA(()=>{super.updateSize()})}batchRendering(e){this.renderRunner.pause(`batchRendering`),e(),this.renderRunner.resume(`batchRendering`)}pauseRendering(){this.renderRunner.pause(`pauseRendering`)}resumeRendering(){this.renderRunner.resume(`pauseRendering`,!0)}resetOptions(e,t){this.currentDataManager.resetOptions(e,t)}setClassNames(e){if(!$O(e,this.currentClassNames)){let{classList:t}=this.el;for(let e of this.currentClassNames)t.remove(e);for(let n of e)t.add(n);this.currentClassNames=e}}setHeight(e){CO(this.el,`height`,e)}},WF=parseInt(`18.3.1`.split(`.`)[0])<18,GF=class extends _.Component{constructor(){super(...arguments),this.elRef=(0,_.createRef)(),this.isUpdating=!1,this.isUnmounting=!1,this.state={customRenderingMap:new Map},this.requestResize=()=>{this.isUnmounting||(this.cancelResize(),this.resizeId=requestAnimationFrame(()=>{this.doResize()}))}}render(){let e=[];for(let t of this.state.customRenderingMap.values())e.push(_.createElement(KF,{key:t.id,customRendering:t}));return _.createElement(`div`,{ref:this.elRef},e)}componentDidMount(){this.isUnmounting=!1;let e=new dP;this.handleCustomRendering=e.handle.bind(e),this.calendar=new UF(this.elRef.current,Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.calendar.render(),this.calendar.on(`_beforeprint`,()=>{(0,vl.flushSync)(()=>{})});let t;e.subscribe(e=>{let n=Date.now(),r=!t;(WF||r||this.isUpdating||this.isUnmounting||n-t<100?qF:vl.flushSync)(()=>{this.setState({customRenderingMap:e},()=>{t=n,r?this.doResize():this.requestResize()})})})}componentDidUpdate(){this.isUpdating=!0,this.calendar.resetOptions(Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.isUpdating=!1}componentWillUnmount(){this.isUnmounting=!0,this.cancelResize(),this.calendar.destroy()}doResize(){this.calendar.updateSize()}cancelResize(){this.resizeId!==void 0&&(cancelAnimationFrame(this.resizeId),this.resizeId=void 0)}getApi(){return this.calendar}};GF.act=qF;var KF=class extends _.PureComponent{render(){let{customRendering:e}=this.props,{generatorMeta:t}=e,n=typeof t==`function`?t(e.renderProps):t;return(0,vl.createPortal)(n,e.containerEl)}};function qF(e){e()}var JF=class extends aN{constructor(){super(...arguments),this.headerElRef=qE()}renderSimpleLayout(e,t){let{props:n,context:r}=this,i=[],a=RN(r.options);return e&&i.push({type:`header`,key:`header`,isSticky:a,chunk:{elRef:this.headerElRef,tableClassName:`fc-col-header`,rowContent:e}}),i.push({type:`body`,key:`body`,liquid:!0,chunk:{content:t}}),Z(qA,{elClasses:[`fc-daygrid`],viewSpec:r.viewSpec},Z(BN,{liquid:!n.isHeightAuto&&!n.forPrint,collapsibleWidth:n.forPrint,cols:[],sections:i}))}renderHScrollLayout(e,t,n,r){let i=this.context.pluginHooks.scrollGridImpl;if(!i)throw Error(`No ScrollGrid implementation`);let{props:a,context:o}=this,s=!a.forPrint&&RN(o.options),c=!a.forPrint&&zN(o.options),l=[];return e&&l.push({type:`header`,key:`header`,isSticky:s,chunks:[{key:`main`,elRef:this.headerElRef,tableClassName:`fc-col-header`,rowContent:e}]}),l.push({type:`body`,key:`body`,liquid:!0,chunks:[{key:`main`,content:t}]}),c&&l.push({type:`footer`,key:`footer`,isSticky:!0,chunks:[{key:`main`,content:LN}]}),Z(qA,{elClasses:[`fc-daygrid`],viewSpec:o.viewSpec},Z(i,{liquid:!a.isHeightAuto&&!a.forPrint,forPrint:a.forPrint,collapsibleWidth:a.forPrint,colGroups:[{cols:[{span:n,minWidth:r}]}],sections:l}))}};function YF(e,t){let n=[];for(let e=0;e<t;e+=1)n[e]=[];for(let t of e)n[t.row].push(t);return n}function XF(e,t){let n=[];for(let e=0;e<t;e+=1)n[e]=[];for(let t of e)n[t.firstCol].push(t);return n}function ZF(e,t){let n=[];if(e){for(let r=0;r<t;r+=1)n[r]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(let t of e.segs)n[t.row].segs.push(t)}else for(let e=0;e<t;e+=1)n[e]=null;return n}var QF=Zk({hour:`numeric`,minute:`2-digit`,omitZeroMinute:!0,meridiem:`narrow`});function $F(e){let{display:t}=e.eventRange.ui;return t===`list-item`||t===`auto`&&!e.eventRange.def.allDay&&e.firstCol===e.lastCol&&e.isStart&&e.isEnd}var eI=class extends FA{render(){let{props:e}=this;return Z(UN,Object.assign({},e,{elClasses:[`fc-daygrid-event`,`fc-daygrid-block-event`,`fc-h-event`],defaultTimeFormat:QF,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))}},tI=class extends FA{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,i=bM(r,n.eventTimeFormat||QF,t,!0,e.defaultDisplayEventEnd);return Z(HN,Object.assign({},e,{elTag:`a`,elClasses:[`fc-daygrid-event`,`fc-daygrid-dot-event`],elAttrs:wM(e.seg,t),defaultGenerator:nI,timeText:i,isResizing:!1,isDateSelecting:!1}))}};function nI(e){return Z(JE,null,Z(`div`,{className:`fc-daygrid-event-dot`,style:{borderColor:e.borderColor||e.backgroundColor}}),e.timeText&&Z(`div`,{className:`fc-event-time`},e.timeText),Z(`div`,{className:`fc-event-title`},e.event.title||Z(JE,null,`\xA0`)))}var rI=class extends FA{constructor(){super(...arguments),this.compileSegs=Q(iI)}render(){let{props:e}=this,{allSegs:t,invisibleSegs:n}=this.compileSegs(e.singlePlacements);return Z(rP,{elClasses:[`fc-daygrid-more-link`],dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,moreCnt:e.moreCnt,allSegs:t,hiddenSegs:n,alignmentElRef:e.alignmentElRef,alignGridTop:e.alignGridTop,extraDateSpan:e.extraDateSpan,popoverContent:()=>{let n=(e.eventDrag?e.eventDrag.affectedInstances:null)||(e.eventResize?e.eventResize.affectedInstances:null)||{};return Z(JE,null,t.map(t=>{let r=t.eventRange.instance.instanceId;return Z(`div`,{className:`fc-daygrid-event-harness`,key:r,style:{visibility:n[r]?`hidden`:``}},$F(t)?Z(tI,Object.assign({seg:t,isDragging:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},xM(t,e.todayRange))):Z(eI,Object.assign({seg:t,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},xM(t,e.todayRange))))}))}})}};function iI(e){let t=[],n=[];for(let r of e)t.push(r.seg),r.isVisible||n.push(r.seg);return{allSegs:t,invisibleSegs:n}}var aI=Zk({week:`narrow`}),oI=class extends aN{constructor(){super(...arguments),this.rootElRef=qE(),this.state={dayNumberId:EO()},this.handleRootEl=e=>{RA(this.rootElRef,e),RA(this.props.elRef,e)}}render(){let{context:e,props:t,state:n,rootElRef:r}=this,{options:i,dateEnv:a}=e,{date:o,dateProfile:s}=t,c=t.showDayNumber&&cI(o,s.currentRange,a);return Z(KN,{elTag:`td`,elRef:this.handleRootEl,elClasses:[`fc-daygrid-day`,...t.extraClassNames||[]],elAttrs:Object.assign(Object.assign(Object.assign({},t.extraDataAttrs),t.showDayNumber?{"aria-labelledby":n.dayNumberId}:{}),{role:`gridcell`}),defaultGenerator:sI,date:o,dateProfile:s,todayRange:t.todayRange,showDayNumber:t.showDayNumber,isMonthStart:c,extraRenderProps:t.extraRenderProps},(a,s)=>Z(`div`,{ref:t.innerElRef,className:`fc-daygrid-day-frame fc-scrollgrid-sync-inner`,style:{minHeight:t.minHeight}},t.showWeekNumber&&Z(QN,{elTag:`a`,elClasses:[`fc-daygrid-week-number`],elAttrs:XM(e,o,`week`),date:o,defaultFormat:aI}),!s.isDisabled&&(t.showDayNumber||qN(i)||t.forceDayTop)?Z(`div`,{className:`fc-daygrid-day-top`},Z(a,{elTag:`a`,elClasses:[`fc-daygrid-day-number`,c&&`fc-daygrid-month-start`],elAttrs:Object.assign(Object.assign({},XM(e,o)),{id:n.dayNumberId})})):t.showDayNumber?Z(`div`,{className:`fc-daygrid-day-top`,style:{visibility:`hidden`}},Z(`a`,{className:`fc-daygrid-day-number`},`\xA0`)):void 0,Z(`div`,{className:`fc-daygrid-day-events`,ref:t.fgContentElRef},t.fgContent,Z(`div`,{className:`fc-daygrid-day-bottom`,style:{marginTop:t.moreMarginTop}},Z(rI,{allDayDate:o,singlePlacements:t.singlePlacements,moreCnt:t.moreCnt,alignmentElRef:r,alignGridTop:!t.showDayNumber,extraDateSpan:t.extraDateSpan,dateProfile:t.dateProfile,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,todayRange:t.todayRange}))),Z(`div`,{className:`fc-daygrid-day-bg`},t.bgContent)))}};function sI(e){return e.dayNumberText||Z(JE,null,`\xA0`)}function cI(e,t,n){let{start:r,end:i}=t,a=rk(i,-1),o=n.getYear(r),s=n.getMonth(r),c=n.getYear(a),l=n.getMonth(a);return(o!==c||s!==l)&&(e.valueOf()===r.valueOf()||n.getDay(e)===1&&e.valueOf()<i.valueOf())}function lI(e){return e.eventRange.instance.instanceId+`:`+e.firstCol}function uI(e){return lI(e)+`:`+e.lastCol}function dI(e,t,n,r,i,a,o){let s=new hI(t=>i[e[t.index].eventRange.instance.instanceId+`:`+t.span.start+`:`+(t.span.end-1)]||1);s.allowReslicing=!0,s.strictOrder=r,t===!0||n===!0?(s.maxCoord=a,s.hiddenConsumes=!0):typeof t==`number`?s.maxStackCnt=t:typeof n==`number`&&(s.maxStackCnt=n,s.hiddenConsumes=!0);let c=[],l=[];for(let t=0;t<e.length;t+=1){let n=e[t];i[uI(n)]==null?l.push(n):c.push({index:t,span:{start:n.firstCol,end:n.lastCol+1}})}let u=s.addSegs(c),{singleColPlacements:d,multiColPlacements:f,leftoverMargins:p}=fI(s.toRects(),e,o),m=[],h=[];for(let e of l){f[e.firstCol].push({seg:e,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let t=e.firstCol;t<=e.lastCol;t+=1)d[t].push({seg:mI(e,t,t+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let e=0;e<o.length;e+=1)m.push(0);for(let t of u){let n=e[t.index],r=t.span;f[r.start].push({seg:mI(n,r.start,r.end,o),isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let e=r.start;e<r.end;e+=1)m[e]+=1,d[e].push({seg:mI(n,e,e+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let e=0;e<o.length;e+=1)h.push(p[e]);return{singleColPlacements:d,multiColPlacements:f,moreCnts:m,moreMarginTops:h}}function fI(e,t,n){let r=pI(e,n.length),i=[],a=[],o=[];for(let e=0;e<n.length;e+=1){let s=r[e],c=[],l=0,u=0;for(let r of s){let i=t[r.index];c.push({seg:mI(i,e,e+1,n),isVisible:!0,isAbsolute:!1,absoluteTop:r.levelCoord,marginTop:r.levelCoord-l}),l=r.levelCoord+r.thickness}let d=[];l=0,u=0;for(let r of s){let i=t[r.index],a=r.span.end-r.span.start>1,o=r.span.start===e;u+=r.levelCoord-l,l=r.levelCoord+r.thickness,a?(u+=r.thickness,o&&d.push({seg:mI(i,r.span.start,r.span.end,n),isVisible:!0,isAbsolute:!0,absoluteTop:r.levelCoord,marginTop:0})):o&&(d.push({seg:mI(i,r.span.start,r.span.end,n),isVisible:!0,isAbsolute:!1,absoluteTop:r.levelCoord,marginTop:u}),u=0)}i.push(c),a.push(d),o.push(u)}return{singleColPlacements:i,multiColPlacements:a,leftoverMargins:o}}function pI(e,t){let n=[];for(let e=0;e<t;e+=1)n.push([]);for(let t of e)for(let e=t.span.start;e<t.span.end;e+=1)n[e].push(t);return n}function mI(e,t,n,r){if(e.firstCol===t&&e.lastCol===n-1)return e;let i=e.eventRange,a=i.range,o=QA(a,{start:r[t].date,end:nk(r[n-1].date,1)});return Object.assign(Object.assign({},e),{firstCol:t,lastCol:n-1,eventRange:{def:i.def,ui:Object.assign(Object.assign({},i.ui),{durationEditable:!1}),instance:i.instance,range:o},isStart:e.isStart&&o.start.valueOf()===a.start.valueOf(),isEnd:e.isEnd&&o.end.valueOf()===a.end.valueOf()})}var hI=class extends oN{constructor(){super(...arguments),this.hiddenConsumes=!1,this.forceHidden={}}addSegs(e){let t=super.addSegs(e),{entriesByLevel:n}=this,r=e=>!this.forceHidden[cN(e)];for(let e=0;e<n.length;e+=1)n[e]=n[e].filter(r);return t}handleInvalidInsertion(e,t,n){let{entriesByLevel:r,forceHidden:i}=this,{touchingEntry:a,touchingLevel:o,touchingLateral:s}=e;if(this.hiddenConsumes&&a){let e=cN(a);if(!i[e]){if(this.allowReslicing){let e=Object.assign(Object.assign({},a),{span:lN(a.span,t.span)}),c=cN(e);i[c]=!0,r[o][s]=e,n.push(e),this.splitEntry(a,t,n)}else i[e]=!0,n.push(a)}}super.handleInvalidInsertion(e,t,n)}},gI=class extends aN{constructor(){super(...arguments),this.cellElRefs=new EN,this.frameElRefs=new EN,this.fgElRefs=new EN,this.segHarnessRefs=new EN,this.rootElRef=qE(),this.state={framePositions:null,maxContentHeight:null,segHeights:{}},this.handleResize=e=>{e&&this.updateSizing(!0)}}render(){let{props:e,state:t,context:n}=this,{options:r}=n,i=e.cells.length,a=XF(e.businessHourSegs,i),o=XF(e.bgEventSegs,i),s=XF(this.getHighlightSegs(),i),c=XF(this.getMirrorSegs(),i),{singleColPlacements:l,multiColPlacements:u,moreCnts:d,moreMarginTops:f}=dI(hM(e.fgEventSegs,r.eventOrder),e.dayMaxEvents,e.dayMaxEventRows,r.eventOrderStrict,t.segHeights,t.maxContentHeight,e.cells),p=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{};return Z(`tr`,{ref:this.rootElRef,role:`row`},e.renderIntro&&e.renderIntro(),e.cells.map((t,n)=>{let r=this.renderFgSegs(n,e.forPrint?l[n]:u[n],e.todayRange,p),i=this.renderFgSegs(n,_I(c[n],u),e.todayRange,{},!!e.eventDrag,!!e.eventResize,!1);return Z(oI,{key:t.key,elRef:this.cellElRefs.createRef(t.key),innerElRef:this.frameElRefs.createRef(t.key),dateProfile:e.dateProfile,date:t.date,showDayNumber:e.showDayNumbers,showWeekNumber:e.showWeekNumbers&&n===0,forceDayTop:e.showWeekNumbers,todayRange:e.todayRange,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,extraRenderProps:t.extraRenderProps,extraDataAttrs:t.extraDataAttrs,extraClassNames:t.extraClassNames,extraDateSpan:t.extraDateSpan,moreCnt:d[n],moreMarginTop:f[n],singlePlacements:l[n],fgContentElRef:this.fgElRefs.createRef(t.key),fgContent:Z(JE,null,Z(JE,null,r),Z(JE,null,i)),bgContent:Z(JE,null,this.renderFillSegs(s[n],`highlight`),this.renderFillSegs(a[n],`non-business`),this.renderFillSegs(o[n],`bg-event`)),minHeight:e.cellMinHeight})}))}componentDidMount(){this.updateSizing(!0),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,t){let n=this.props;this.updateSizing(!mA(e,n))}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}getHighlightSegs(){let{props:e}=this;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs}getMirrorSegs(){let{props:e}=this;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]}renderFgSegs(e,t,n,r,i,a,o){let{context:s}=this,{eventSelection:c}=this.props,{framePositions:l}=this.state,u=this.props.cells.length===1,d=i||a||o,f=[];if(l)for(let e of t){let{seg:t}=e,{instanceId:p}=t.eventRange.instance,m=e.isVisible&&!r[p],h=e.isAbsolute,g=``,_=``;h&&(s.isRtl?(_=0,g=l.lefts[t.lastCol]-l.lefts[t.firstCol]):(g=0,_=l.rights[t.firstCol]-l.rights[t.lastCol])),f.push(Z(`div`,{className:`fc-daygrid-event-harness`+(h?` fc-daygrid-event-harness-abs`:``),key:lI(t),ref:d?null:this.segHarnessRefs.createRef(uI(t)),style:{visibility:m?``:`hidden`,marginTop:h?``:e.marginTop,top:h?e.absoluteTop:``,left:g,right:_}},$F(t)?Z(tI,Object.assign({seg:t,isDragging:i,isSelected:p===c,defaultDisplayEventEnd:u},xM(t,n))):Z(eI,Object.assign({seg:t,isDragging:i,isResizing:a,isDateSelecting:o,isSelected:p===c,defaultDisplayEventEnd:u},xM(t,n)))))}return f}renderFillSegs(e,t){let{isRtl:n}=this.context,{todayRange:r}=this.props,{framePositions:i}=this.state,a=[];if(i)for(let o of e){let e=n?{right:0,left:i.lefts[o.lastCol]-i.lefts[o.firstCol]}:{left:0,right:i.rights[o.firstCol]-i.rights[o.lastCol]};a.push(Z(`div`,{key:CM(o.eventRange),className:`fc-daygrid-bg-harness`,style:e},t===`bg-event`?Z(YN,Object.assign({seg:o},xM(o,r))):ZN(t)))}return Z(JE,{},...a)}updateSizing(e){let{props:t,state:n,frameElRefs:r}=this;if(!t.forPrint&&t.clientWidth!==null){if(e){let e=t.cells.map(e=>r.currentMap[e.key]);if(e.length){let t=this.rootElRef.current,r=new rN(t,e,!0,!1);n.framePositions&&n.framePositions.similarTo(r)||this.setState({framePositions:new rN(t,e,!0,!1)})}}let i=this.state.segHeights,a=this.querySegHeights(),o=t.dayMaxEvents===!0||t.dayMaxEventRows===!0;this.safeSetState({segHeights:Object.assign(Object.assign({},i),a),maxContentHeight:o?this.computeMaxContentHeight():null})}}querySegHeights(){let e=this.segHarnessRefs.currentMap,t={};for(let n in e){let r=Math.round(e[n].getBoundingClientRect().height);t[n]=Math.max(t[n]||0,r)}return t}computeMaxContentHeight(){let e=this.props.cells[0].key,t=this.cellElRefs.currentMap[e],n=this.fgElRefs.currentMap[e];return t.getBoundingClientRect().bottom-n.getBoundingClientRect().top}getCellEls(){let e=this.cellElRefs.currentMap;return this.props.cells.map(t=>e[t.key])}};gI.addStateEquality({segHeights:mA});function _I(e,t){if(!e.length)return[];let n=vI(t);return e.map(e=>({seg:e,isVisible:!0,isAbsolute:!0,absoluteTop:n[e.eventRange.instance.instanceId],marginTop:0}))}function vI(e){let t={};for(let n of e)for(let e of n)t[e.seg.eventRange.instance.instanceId]=e.absoluteTop;return t}var yI=class extends aN{constructor(){super(...arguments),this.splitBusinessHourSegs=Q(YF),this.splitBgEventSegs=Q(bI),this.splitFgEventSegs=Q(YF),this.splitDateSelectionSegs=Q(YF),this.splitEventDrag=Q(ZF),this.splitEventResize=Q(ZF),this.rowRefs=new EN}render(){let{props:e,context:t}=this,n=e.cells.length,r=this.splitBusinessHourSegs(e.businessHourSegs,n),i=this.splitBgEventSegs(e.bgEventSegs,n),a=this.splitFgEventSegs(e.fgEventSegs,n),o=this.splitDateSelectionSegs(e.dateSelectionSegs,n),s=this.splitEventDrag(e.eventDrag,n),c=this.splitEventResize(e.eventResize,n),l=n>=7&&e.clientWidth?e.clientWidth/t.options.aspectRatio/6:null;return Z(HM,{unit:`day`},(t,u)=>Z(JE,null,e.cells.map((t,d)=>Z(gI,{ref:this.rowRefs.createRef(d),key:t.length?t[0].date.toISOString():d,showDayNumbers:n>1,showWeekNumbers:e.showWeekNumbers,todayRange:u,dateProfile:e.dateProfile,cells:t,renderIntro:e.renderRowIntro,businessHourSegs:r[d],eventSelection:e.eventSelection,bgEventSegs:i[d],fgEventSegs:a[d],dateSelectionSegs:o[d],eventDrag:s[d],eventResize:c[d],dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,clientWidth:e.clientWidth,clientHeight:e.clientHeight,cellMinHeight:l,forPrint:e.forPrint}))))}componentDidMount(){this.registerInteractiveComponent()}componentDidUpdate(){this.registerInteractiveComponent()}registerInteractiveComponent(){if(!this.rootEl){let e=this.rowRefs.currentMap[0].getCellEls()[0],t=e?e.closest(`.fc-daygrid-body`):null;t&&(this.rootEl=t,this.context.registerInteractiveComponent(this,{el:t,isHitComboAllowed:this.props.isHitComboAllowed}))}}componentWillUnmount(){this.rootEl&&=(this.context.unregisterInteractiveComponent(this),null)}prepareHits(){this.rowPositions=new rN(this.rootEl,this.rowRefs.collect().map(e=>e.getCellEls()[0]),!1,!0),this.colPositions=new rN(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(e,t){let{colPositions:n,rowPositions:r}=this,i=n.leftToIndex(e),a=r.topToIndex(t);if(a!=null&&i!=null){let e=this.props.cells[a][i];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(a,i),allDay:!0},e.extraDateSpan),dayEl:this.getCellEl(a,i),rect:{left:n.lefts[i],right:n.rights[i],top:r.tops[a],bottom:r.bottoms[a]},layer:0}}return null}getCellEl(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]}getCellRange(e,t){let n=this.props.cells[e][t].date;return{start:n,end:nk(n,1)}}};function bI(e,t){return YF(e.filter(xI),t)}function xI(e){return e.eventRange.def.allDay}var SI=class extends aN{constructor(){super(...arguments),this.elRef=qE(),this.needsScrollReset=!1}render(){let{props:e}=this,{dayMaxEventRows:t,dayMaxEvents:n,expandRows:r}=e,i=n===!0||t===!0;i&&!r&&(i=!1,t=null,n=null);let a=[`fc-daygrid-body`,i?`fc-daygrid-body-balanced`:`fc-daygrid-body-unbalanced`,r?``:`fc-daygrid-body-natural`];return Z(`div`,{ref:this.elRef,className:a.join(` `),style:{width:e.clientWidth,minWidth:e.tableMinWidth}},Z(`table`,{role:`presentation`,className:`fc-scrollgrid-sync-table`,style:{width:e.clientWidth,minWidth:e.tableMinWidth,height:r?e.clientHeight:``}},e.colGroupNode,Z(`tbody`,{role:`presentation`},Z(yI,{dateProfile:e.dateProfile,cells:e.cells,renderRowIntro:e.renderRowIntro,showWeekNumbers:e.showWeekNumbers,clientWidth:e.clientWidth,clientHeight:e.clientHeight,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,dayMaxEvents:n,dayMaxEventRows:t,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed}))))}componentDidMount(){this.requestScrollReset()}componentDidUpdate(e){e.dateProfile===this.props.dateProfile?this.flushScrollReset():this.requestScrollReset()}requestScrollReset(){this.needsScrollReset=!0,this.flushScrollReset()}flushScrollReset(){if(this.needsScrollReset&&this.props.clientWidth){let e=CI(this.elRef.current,this.props.dateProfile);if(e){let t=e.closest(`.fc-daygrid-body`),n=t.closest(`.fc-scroller`),r=e.getBoundingClientRect().top-t.getBoundingClientRect().top;n.scrollTop=r?r+1:0}this.needsScrollReset=!1}}};function CI(e,t){let n;return t.currentRangeUnit.match(/year|month/)&&(n=e.querySelector(`[data-date="${Dk(t.currentDate)}-01"]`)),n||=e.querySelector(`[data-date="${Ek(t.currentDate)}"]`),n}var wI=class extends SN{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,t){return t.sliceRange(e)}},TI=class extends aN{constructor(){super(...arguments),this.slicer=new wI,this.tableRef=qE()}render(){let{props:e,context:t}=this;return Z(SI,Object.assign({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))}},EI=class extends JF{constructor(){super(...arguments),this.buildDayTableModel=Q(DI),this.headerRef=qE(),this.tableRef=qE()}render(){let{options:e,dateProfileGenerator:t}=this.context,{props:n}=this,r=this.buildDayTableModel(n.dateProfile,t),i=e.dayHeaders&&Z(vN,{ref:this.headerRef,dateProfile:n.dateProfile,dates:r.headerDates,datesRepDistinctDays:r.rowCnt===1}),a=t=>Z(TI,{ref:this.tableRef,dateProfile:n.dateProfile,dayTableModel:r,businessHours:n.businessHours,dateSelection:n.dateSelection,eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,nextDayThreshold:e.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.weekNumbers,expandRows:!n.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:n.forPrint});return e.dayMinWidth?this.renderHScrollLayout(i,a,r.colCnt,e.dayMinWidth):this.renderSimpleLayout(i,a)}};function DI(e,t){return new xN(new bN(e.renderRange,t),/year|month|week/.test(e.currentRangeUnit))}var OI=class extends aj{buildRenderRange(e,t,n){let r=super.buildRenderRange(e,t,n),{props:i}=this;return kI({currentRange:r,snapToWeek:/^(year|month)$/.test(t),fixedWeekCount:i.fixedWeekCount,dateEnv:i.dateEnv})}};function kI(e){let{dateEnv:t,currentRange:n}=e,{start:r,end:i}=n,a;if(e.snapToWeek&&(r=t.startOfWeek(r),a=t.startOfWeek(i),a.valueOf()!==i.valueOf()&&(i=tk(a,1))),e.fixedWeekCount){let e=t.startOfWeek(t.startOfMonth(nk(n.end,-1))),r=Math.ceil(ik(e,i));i=tk(i,6-r)}return{start:r,end:i}}cO(`:root{--fc-daygrid-event-dot-width:8px}.fc-daygrid-day-events:after,.fc-daygrid-day-events:before,.fc-daygrid-day-frame:after,.fc-daygrid-day-frame:before,.fc-daygrid-event-harness:after,.fc-daygrid-event-harness:before{clear:both;content:"";display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-daygrid-day-frame{min-height:100%;position:relative}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{padding:4px;position:relative;z-index:4}.fc .fc-daygrid-month-start{font-size:1.1em;font-weight:700}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{left:0;position:absolute;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{min-height:2em;position:relative}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{left:0;position:absolute;right:0;top:0}.fc .fc-daygrid-bg-harness{bottom:0;position:absolute;top:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{margin-top:1px;z-index:6}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;margin:0 2px}.fc .fc-daygrid-day-bottom:after,.fc .fc-daygrid-day-bottom:before{clear:both;content:"";display:table}.fc .fc-daygrid-more-link{border-radius:3px;cursor:pointer;line-height:1;margin-top:1px;max-width:100%;overflow:hidden;padding:2px;position:relative;white-space:nowrap;z-index:4}.fc .fc-daygrid-more-link:hover{background-color:rgba(0,0,0,.1)}.fc .fc-daygrid-week-number{background-color:var(--fc-neutral-bg-color);color:var(--fc-neutral-text-color);min-width:1.5em;padding:2px;position:absolute;text-align:center;top:0;z-index:5}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-more-link{float:left}.fc-direction-ltr .fc-daygrid-week-number{border-radius:0 0 3px 0;left:0}.fc-direction-rtl .fc-daygrid-more-link{float:right}.fc-direction-rtl .fc-daygrid-week-number{border-radius:0 0 0 3px;right:0}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{border-radius:3px;font-size:var(--fc-small-font-size);position:relative;white-space:nowrap}.fc-daygrid-block-event .fc-event-time{font-weight:700}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{align-items:center;display:flex;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;font-weight:700;min-width:0;overflow:hidden}.fc-daygrid-dot-event.fc-event-mirror,.fc-daygrid-dot-event:hover{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-daygrid-event-dot{border:calc(var(--fc-daygrid-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-daygrid-event-dot-width)/2);box-sizing:content-box;height:0;margin:0 4px;width:0}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}`);var AI=bP({name:`@fullcalendar/daygrid`,initialView:`dayGridMonth`,views:{dayGrid:{component:EI,dateProfileGeneratorClass:OI},dayGridDay:{type:`dayGrid`,duration:{days:1}},dayGridWeek:{type:`dayGrid`,duration:{weeks:1}},dayGridMonth:{type:`dayGrid`,duration:{months:1},fixedWeekCount:!0},dayGridYear:{type:`dayGrid`,duration:{years:1}}}});function jI(e){let t=new Date(`${e}T00:00:00Z`);return t.setUTCDate(t.getUTCDate()+1),t.toISOString().slice(0,10)}function MI(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}`}function NI(e){let t=e.start??e.due,n=e.due??e.start;if(t!==void 0&&n!==void 0)return{start:t,end:jI(n)};if(e.closed===void 0)return null;let r=MI(e.closed);return{start:r,end:jI(r)}}var PI=e=>e.filter(e=>NI(e)!==null).length;function FI({entries:e,multiProject:t,selected:n,onSelect:r}){let i=e.flatMap(({project:e,item:t,colour:n})=>{let r=NI(t);return r===null?[]:[{id:`${e}:${t.id}`,title:t.title,start:r.start,end:r.end,allDay:!0,backgroundColor:n,borderColor:n,extendedProps:{project:e,item:t}}]}),a=(e,t)=>n?.project===e&&n.ref===t;return(0,b.jsx)(`div`,{className:`cal`,children:(0,b.jsx)(GF,{plugins:[AI],initialView:`dayGridMonth`,headerToolbar:{left:`prev,next today`,center:`title`,right:`dayGridMonth,dayGridWeek`},buttonText:{today:`today`,month:`month`,week:`week`},timeZone:`UTC`,firstDay:1,height:`100%`,events:i,eventContent:({event:e})=>{let{project:n,item:r}=e.extendedProps,i=hw[r.status];return(0,b.jsxs)(`div`,{className:`cal__event`,"data-strike":i.strike,"data-on":a(n,r.id),title:`${r.id} [${i.label}] ${r.title}`,children:[(0,b.jsx)(`span`,{className:`cal__icon`,children:i.icon}),(0,b.jsx)(`span`,{className:`cal__ref`,children:t?`${n}:${r.id}`:r.id}),(0,b.jsx)(`span`,{className:`cal__title`,children:r.title})]})},eventClick:({event:e,jsEvent:t})=>{t.preventDefault();let{project:n,item:i}=e.extendedProps;r(n,i.id)},dayMaxEvents:!0})})}var II={full:`55.9 59.4 271 154.5`,icon:`111.4 56.7 160 160`};function LI({className:e,crop:t=`full`}){return(0,b.jsx)(`svg`,{className:e,viewBox:II[t],"aria-hidden":`true`,focusable:`false`,children:(0,b.jsxs)(`g`,{transform:`matrix(0.1, 0, 0, -0.1, 62.431001, 269.861486)`,fill:`currentColor`,children:[(0,b.jsx)(`path`,{d:`M 1191.17 2095.39 C 1155.17 2079.39 1133.17 2038.39 1142.17 2001.39 C 1150.17 1970.39 1184.17 1929.39 1202.17 1929.39 C 1211.17 1929.39 1236.17 1881.39 1236.17 1863.39 C 1236.17 1861.39 1206.17 1859.39 1169.17 1859.39 C 1053.17 1858.39 976.178 1816.39 936.178 1733.39 C 917.178 1692.39 915.178 1672.39 918.178 1588.39 C 921.178 1498.39 923.178 1488.39 952.178 1447.39 C 975.178 1416.39 999.178 1398.39 1037.17 1382.39 C 1086.17 1362.39 1108.17 1360.39 1273.17 1359.39 C 1486.17 1359.39 1543.17 1369.39 1593.17 1412.39 C 1647.17 1459.39 1666.17 1509.39 1666.17 1606.39 C 1666.17 1719.39 1638.17 1778.39 1562.17 1827.39 C 1526.17 1850.39 1509.17 1854.39 1415.17 1857.39 L 1309.17 1861.39 L 1297.17 1900.39 C 1287.17 1933.39 1288.17 1943.39 1301.17 1961.39 C 1323.17 1994.39 1320.17 2044.39 1294.17 2073.39 C 1265.17 2105.39 1230.17 2112.39 1191.17 2095.39 Z M 1359.17 1799.39 C 1419.17 1798.39 1469.17 1779.39 1452.17 1762.39 C 1448.17 1757.39 1386.17 1753.39 1315.17 1752.39 C 1243.17 1750.39 1176.17 1744.39 1165.17 1739.39 C 1123.17 1716.39 1111.17 1681.39 1110.17 1572.39 C 1110.17 1516.39 1106.17 1466.39 1102.17 1462.39 C 1098.17 1457.39 1086.17 1465.39 1075.17 1478.39 C 1060.17 1496.39 1056.17 1517.39 1056.17 1580.39 C 1056.17 1655.39 1055.17 1660.39 1031.17 1671.39 C 1017.18 1677.39 1006.18 1690.39 1006.18 1699.39 C 1006.18 1726.39 1062.17 1771.39 1108.17 1781.39 C 1167.17 1794.39 1268.17 1807.39 1284.17 1802.39 C 1292.17 1801.39 1325.17 1799.39 1359.17 1799.39 Z M 1314.17 1657.39 C 1321.17 1650.39 1326.17 1624.39 1326.17 1599.39 C 1326.17 1549.39 1313.17 1529.39 1282.17 1529.39 C 1249.17 1529.39 1236.17 1543.39 1230.17 1580.39 C 1221.17 1632.39 1240.17 1669.39 1274.17 1669.39 C 1289.17 1669.39 1307.17 1664.39 1314.17 1657.39 Z M 1545.17 1655.39 C 1552.17 1647.39 1556.17 1620.39 1554.17 1593.39 C 1551.17 1539.39 1528.17 1516.39 1499.17 1535.39 C 1476.17 1549.39 1468.17 1648.39 1488.17 1660.39 C 1508.17 1673.39 1532.17 1671.39 1545.17 1655.39 Z`}),(0,b.jsx)(`path`,{d:`M -65.514 1330.67 C -65.514 1290.67 -61.514 1279.67 -47.514 1276.67 C -30.514 1271.67 -28.514 1256.67 -26.514 1089.67 C -24.514 912.673 -24.514 908.673 -44.514 908.673 C -64.514 908.673 -65.514 902.673 -65.514 804.673 C -65.514 713.673 -63.514 699.673 -47.514 694.673 C -24.514 687.673 155.486 653.673 274.486 634.673 C 939.486 526.673 1794.49 535.673 2469.49 659.673 C 2557.49 675.673 2632.49 688.673 2637.49 688.673 C 2641.49 688.673 2644.49 738.673 2644.49 798.673 C 2644.49 898.673 2642.49 909.673 2627.49 906.673 C 2610.49 903.673 2609.49 918.673 2606.49 1086.67 C 2604.49 1263.67 2604.49 1270.67 2624.49 1275.67 C 2640.49 1279.67 2644.49 1289.67 2644.49 1324.67 C 2644.49 1348.67 2639.49 1368.67 2633.49 1368.67 C 2628.49 1368.67 2593.49 1361.67 2556.49 1353.67 C 2183.49 1272.67 1745.49 1228.67 1184.49 1217.67 C 1069.49 1215.67 622.486 1255.67 389.486 1289.67 C 252.486 1309.67 -42.514 1365.67 -57.514 1374.67 C -62.514 1377.67 -65.514 1357.67 -65.514 1330.67 Z M 169.486 1234.67 C 213.486 1226.67 278.486 1215.67 314.486 1209.67 C 350.486 1204.67 396.486 1196.67 417.486 1193.67 L 454.486 1187.67 L 454.486 1006.67 L 454.486 826.673 L 397.486 832.673 C 336.486 839.673 119.486 874.673 72.486 884.673 L 44.486 890.673 L 44.486 1043.67 C 44.486 1221.67 49.486 1261.67 73.486 1254.67 C 82.486 1251.67 125.486 1243.67 169.486 1234.67 Z M 2526.49 1123.67 C 2527.49 1054.67 2528.49 972.673 2529.49 941.673 L 2529.49 883.673 L 2394.49 862.673 C 2320.49 850.673 2226.49 837.673 2186.49 833.673 L 2114.49 826.673 L 2116.49 1004.67 L 2119.49 1182.67 L 2154.49 1189.67 C 2173.49 1193.67 2250.49 1206.67 2324.49 1218.67 C 2398.49 1230.67 2461.49 1242.67 2463.49 1244.67 C 2465.49 1246.67 2480.49 1248.67 2496.49 1248.67 L 2524.49 1248.67 L 2526.49 1123.67 Z M 709.486 1158.67 C 759.486 1153.67 829.486 1148.67 866.486 1148.67 C 971.486 1148.67 964.486 1161.67 964.486 962.673 L 964.486 788.673 L 922.486 788.673 C 871.486 788.673 612.486 807.673 567.486 814.673 L 534.486 819.673 L 534.486 992.673 C 534.486 1087.67 537.486 1167.67 540.486 1170.67 C 543.486 1173.67 562.486 1174.67 582.486 1172.67 C 602.486 1170.67 660.486 1164.67 709.486 1158.67 Z M 2042.49 995.673 L 2044.49 819.673 L 2012.49 814.673 C 1956.49 805.673 1739.49 788.673 1680.49 788.673 L 1624.49 788.673 L 1626.49 966.673 L 1629.49 1143.67 L 1744.49 1150.67 C 1807.49 1154.67 1895.49 1162.67 1939.49 1166.67 C 1983.49 1171.67 2024.49 1174.67 2029.49 1173.67 C 2035.49 1172.67 2040.49 1103.67 2042.49 995.673 Z M 1542.49 961.673 L 1539.49 783.673 L 1294.49 783.673 L 1049.49 783.673 L 1046.49 961.673 L 1044.49 1138.67 L 1294.49 1138.67 L 1544.49 1138.67 L 1542.49 961.673 Z`})]})})}function RI({projectKey:e,colours:t,hidden:n,titleOf:r,query:i,onQuery:a,onPick:o,onClose:s}){let[c,l]=(0,_.useState)([]),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(`idle`),[m,h]=(0,_.useState)(0),g=(0,_.useRef)(null);(0,_.useEffect)(()=>g.current?.focus(),[]),(0,_.useEffect)(()=>{if(i.trim()===``){l([]),p(`idle`);return}let t=new AbortController,n=setTimeout(()=>{p(`searching`),Eb(e,i,t.signal).then(e=>{if(e===null)return p(`unavailable`);l(e.hits),d(e.relaxed),h(0),p(`done`)}).catch(e=>{e.name!==`AbortError`&&p(`unavailable`)})},120);return()=>{clearTimeout(n),t.abort()}},[e,i]);let v=e=>e.source===`context`||e.ref!==null,y=e=>{e!==void 0&&v(e)&&o(e)};return(0,b.jsxs)(`aside`,{className:`detail search`,"aria-label":`Search`,children:[(0,b.jsxs)(`div`,{className:`detail__head`,children:[(0,b.jsx)(`span`,{className:`detail__id`,children:`Search`}),(0,b.jsx)(`button`,{className:`detail__close`,onClick:s,"aria-label":`Close`,children:`×`})]}),(0,b.jsx)(`input`,{ref:g,className:`search__input`,type:`search`,placeholder:`Search items, comments and context, or type a ref`,value:i,onChange:e=>a(e.target.value),onKeyDown:e=>{if(e.key===`Escape`)s();else if(e.key===`ArrowDown`)h(e=>Math.min(e+1,c.length-1));else if(e.key===`ArrowUp`)h(e=>Math.max(e-1,0));else if(e.key===`Enter`)y(c[m]);else return;e.preventDefault()},"aria-label":`Search`}),f===`unavailable`&&(0,b.jsx)(`div`,{className:`search__note`,children:`This server cannot search. Reconnect it to pick up the newer code.`}),f===`done`&&c.length===0&&(0,b.jsx)(`div`,{className:`search__note`,children:`Nothing matches.`}),f===`done`&&u&&c.length>0&&(0,b.jsx)(`div`,{className:`search__note`,children:`Nothing has every word, so these have some of them.`}),c.length>0&&(0,b.jsx)(`ul`,{className:`search__hits`,role:`listbox`,children:c.map((e,i)=>(0,b.jsx)(`li`,{role:`option`,"aria-selected":i===m,children:(0,b.jsxs)(`button`,{className:`search__hit`,"data-active":i===m,disabled:!v(e),onMouseEnter:()=>h(i),onClick:()=>y(e),children:[(0,b.jsxs)(`span`,{className:`search__line`,children:[(0,b.jsx)(`span`,{className:`search__source`,children:e.source===`context`?`context`:e.source===`comment`?e.audience===`agent`?`agent comment`:`comment`:`item`}),e.ref!==null&&(0,b.jsx)(`span`,{className:`search__ref`,style:{color:t[e.ref.split(`-`)[0]??``]},children:e.ref}),(0,b.jsx)(`span`,{className:`search__title`,children:e.source===`context`?e.id:e.title??(e.ref===null?``:r(e.ref))}),e.ref!==null&&n.has(e.ref)&&(0,b.jsx)(`span`,{className:`search__hidden`,children:`hidden`})]}),e.snippet!==``&&(0,b.jsx)(`span`,{className:`search__snippet`,children:zI(e.snippet)})]})},`${e.source}:${e.id}`))})]})}function zI(e){return e.replace(/\*\*|__/g,``).split(/⟦|⟧/).map((e,t)=>t%2==1?(0,b.jsx)(`mark`,{children:e},t):e)}var BI=e=>new Date(e).toLocaleDateString(void 0,{day:`numeric`,month:`short`,year:`numeric`});function VI({comments:e,open:t,onToggle:n}){let[r,i]=(0,_.useState)(!1),a=e.filter(e=>e.audience===`agent`).length,o=r?e:e.filter(e=>e.audience!==`agent`);return(0,b.jsxs)(mb,{title:`Comments`,count:e.length,open:t,onToggle:n,children:[o.length===0&&a===0&&(0,b.jsx)(`p`,{className:`comments__empty`,children:`No comments on this item yet.`}),(0,b.jsx)(`ul`,{className:`comments`,children:o.map(e=>(0,b.jsxs)(`li`,{className:`comment`,"data-agent":e.audience===`agent`,children:[(0,b.jsxs)(`div`,{className:`comment__meta`,children:[(0,b.jsx)(`span`,{children:e.actor}),(0,b.jsx)(`span`,{children:BI(e.at)}),e.audience===`agent`&&(0,b.jsx)(`span`,{className:`comment__tag`,children:`Claude's note`})]}),(0,b.jsx)(`div`,{className:`comment__body`,children:(0,b.jsx)(lb,{remarkPlugins:[fw],children:e.body})})]},e.id))}),a>0&&(0,b.jsx)(`button`,{className:`comments__toggle`,onClick:()=>i(e=>!e),children:r?`Hide Claude's ${a===1?`note`:`${a} notes`}`:`Show Claude's ${a===1?`note`:`${a} notes`}`})]})}var HI=Object.keys(hw);function UI({area:e,name:t,description:n,colour:r,items:i,next:a,hidden:o,onPick:s,onZoom:c,onClose:l}){let u=new Map(HI.map(e=>[e,i.filter(t=>t.status===e).length])),d=i.filter(e=>e.status!==`done`),f=u.get(`done`)??0,p=(e,t)=>(0,b.jsx)(`li`,{children:(0,b.jsxs)(`button`,{className:`next__item`,"data-hidden":o.has(e.id),onClick:()=>s(e),title:e.title,children:[(0,b.jsx)(`span`,{className:`next__pos`,style:typeof t==`string`?{color:hw[e.status].colour}:void 0,children:t}),(0,b.jsx)(`span`,{className:`next__id`,style:{color:r},children:e.id}),(0,b.jsx)(`span`,{className:`next__title`,children:e.title})]})},e.id);return(0,b.jsxs)(`aside`,{className:`detail`,"aria-label":`Area ${e}`,children:[(0,b.jsxs)(`div`,{className:`detail__head`,children:[(0,b.jsxs)(`div`,{children:[(0,b.jsx)(`span`,{className:`detail__id`,style:{color:r},children:e}),(0,b.jsxs)(`button`,{className:`detail__dep area-pane__zoom`,onClick:c,children:[(0,b.jsxs)(`svg`,{viewBox:`0 0 16 16`,width:`12`,height:`12`,"aria-hidden":`true`,children:[(0,b.jsx)(`circle`,{cx:`8`,cy:`8`,r:`5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,b.jsx)(`circle`,{cx:`8`,cy:`8`,r:`1.6`,fill:`currentColor`}),(0,b.jsx)(`path`,{d:`M8 0.5v2.5M8 13v2.5M0.5 8h2.5M13 8h2.5`,stroke:`currentColor`,strokeWidth:`1.5`})]}),`fit to view`]})]}),(0,b.jsx)(`button`,{className:`detail__close`,onClick:l,"aria-label":`Close`,children:`×`})]}),(0,b.jsx)(`h2`,{className:`detail__title`,children:t??e}),n!==void 0&&n!==``&&(0,b.jsx)(`div`,{className:`detail__doc`,children:(0,b.jsx)(lb,{remarkPlugins:[fw],children:n})}),(0,b.jsxs)(`div`,{className:`area-pane__progress`,children:[(0,b.jsx)(`div`,{className:`area-pane__bar`,role:`img`,"aria-label":`${f} of ${i.length} done`,children:HI.map(e=>(u.get(e)??0)>0?(0,b.jsx)(`span`,{style:{flexGrow:u.get(e),background:hw[e].colour},title:`${u.get(e)} ${hw[e].label}`},e):null)}),(0,b.jsx)(`div`,{className:`area-pane__counts`,children:HI.filter(e=>(u.get(e)??0)>0).map(e=>(0,b.jsxs)(`span`,{children:[(0,b.jsx)(`span`,{style:{color:hw[e].colour},children:hw[e].icon}),` `,u.get(e),` `,hw[e].label]},e))})]}),a.length>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{className:`settings__label area-pane__label`,children:`In the next list`}),(0,b.jsx)(`ol`,{className:`next__list area-pane__list`,children:a.map(({item:e,position:t})=>p(e,t))})]}),(0,b.jsx)(`div`,{className:`settings__label area-pane__label`,children:d.length===0?`Nothing open`:`Open (${d.length})`}),d.length>0&&(0,b.jsx)(`ul`,{className:`next__list area-pane__list`,children:d.map(e=>p(e,hw[e.status].icon))})]})}var WI={item:gE,area:_E,ticket:vE,ghost:yE},GI=Object.keys(hw),KI=[`status`,`area`],qI=20,JI=[],YI=[],XI=[],ZI=[`graph`,`calendar`],QI=e=>(0,b.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:e}),$I=()=>QI((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`rect`,{x:`3`,y:`5`,width:`18`,height:`16`,rx:`2`}),(0,b.jsx)(`path`,{d:`M3 10h18M8 3v4M16 3v4`})]})),eL=()=>QI((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`circle`,{cx:`6`,cy:`6`,r:`2.5`}),(0,b.jsx)(`circle`,{cx:`18`,cy:`8`,r:`2.5`}),(0,b.jsx)(`circle`,{cx:`9`,cy:`18`,r:`2.5`}),(0,b.jsx)(`path`,{d:`M8.3 7.2l7.4 0.6M7 8.4l1.6 7.2`})]})),tL=()=>QI((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`circle`,{cx:`11`,cy:`11`,r:`6.5`}),(0,b.jsx)(`path`,{d:`M20 20l-4.2-4.2`})]})),nL=()=>QI((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`path`,{d:`M4 7h10M18 7h2M4 17h4M12 17h8`}),(0,b.jsx)(`circle`,{cx:`16`,cy:`7`,r:`2`}),(0,b.jsx)(`circle`,{cx:`10`,cy:`17`,r:`2`})]})),rL=()=>QI((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`path`,{d:`M9 4l-6 2v14l6-2 6 2 6-2V4l-6 2-6-2z`}),(0,b.jsx)(`path`,{d:`M9 4v14M15 6v14`})]}));function iL(e,t,n){let[r,i]=(0,_.useState)(()=>{try{let r=localStorage.getItem(e);return n.includes(r)?r:t}catch{return t}});return[r,(0,_.useCallback)(t=>{i(t);try{localStorage.setItem(e,t)}catch{}},[e])]}var aL=e=>new Date(`${e}T00:00:00Z`).toLocaleDateString(void 0,{weekday:`short`,day:`numeric`,month:`short`,year:`numeric`,timeZone:`UTC`});function oL({plan:e,selection:t,focus:n,reload:r}){let i=t.project,{MenuActions:a,EmptyPlan:o}=mw(),s=i?.key??``,c=i?.items??YI,l=(0,_.useMemo)(()=>yw(c),[c]),u=(0,_.useMemo)(()=>vT(l),[l]),[d,f]=(0,_.useState)(new Set),[p,m]=(0,_.useState)(new Set([`done`])),[h,g]=(0,_.useState)(`area`),[v,y]=(0,_.useState)(!1),[x,S]=(0,_.useState)(()=>n===null&&(typeof window>`u`||window.innerWidth>=700)?`next`:null),[C,w]=(0,_.useState)(``),[T,E]=(0,_.useState)(null);(0,_.useEffect)(()=>{let e=e=>{let t=e.target,n=t!==null&&(t.isContentEditable||[`INPUT`,`TEXTAREA`,`SELECT`].includes(t.tagName));!(e.key===`k`&&(e.metaKey||e.ctrlKey)||e.key===`/`&&!n)||n&&e.key===`/`||(e.preventDefault(),te(`search`))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,_.useEffect)(()=>{if(!v)return;let e=e=>e.key===`Escape`&&y(!1);return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[v]);let[D,O]=iL(`attraverso.lock`,`selected`,[`selected`,`free`]),k=D===`selected`,[A,j]=(0,_.useState)(Pb(n)===null?n:null),[M,N]=(0,_.useState)(()=>{let e=Pb(n);return e===null?null:{heading:e}}),P=(0,_.useCallback)(e=>{j(null),I(null),S(null),N({heading:e})},[]),[F,I]=(0,_.useState)(null),ee=(0,_.useCallback)(e=>{j(null),N(null),S(null),I(e)},[]);function te(e){j(null),N(null),I(null),S(e)}let L=e=>{E(null),typeof e==`string`?te(e):ee(e.area)};(0,_.useEffect)(()=>{A!==null&&(N(null),I(null),S(null))},[A]);let ne=M?.heading??null;(0,_.useEffect)(()=>{if(i===null)return;let e=`#${encodeURIComponent(i.key)}`,t=ne===null?null:`${e}/${encodeURIComponent(Nb+ne)}`,n=window.location.hash;t!==null&&n!==t&&history.replaceState(null,``,t),t===null&&Pb(decodeURIComponent(n.slice(e.length+1)))!==null&&history.replaceState(null,``,e)},[ne,i]);let[R,re]=(0,_.useState)(new Set),ie=(0,_.useCallback)(e=>{re(t=>{if(!t.has(e))return t;let n=new Set(t);return n.delete(e),n})},[]);(0,_.useEffect)(()=>{let e=A?.split(`-`)[0];e!==void 0&&ie(e)},[A,ie]),(0,_.useEffect)(()=>{let e=Pb(n);e===null?j(n):P(e)},[n,P]);let[z,ae]=iL(`attraverso.view`,`graph`,ZI),oe=z===`graph`?`calendar`:`graph`,se=typeof window<`u`&&window.innerWidth<700,[ce,le]=iL(se?`attraverso.minimap.narrow`:`attraverso.minimap.wide`,se?`hidden`:`shown`,[`shown`,`hidden`]),[ue,de]=iL(`attraverso.calendar.span`,`all`,[`project`,`all`]),fe=ue===`all`&&e.projects.length>1,[pe,me]=(0,_.useState)(null),[he,ge]=(0,_.useState)(null),[_e,ve]=(0,_.useState)(0),[ye,be]=(0,_.useState)(()=>new Set([`images`,`comments`])),xe=e=>({open:!ye.has(e),onToggle:()=>be(t=>ut(t,e))}),Se=(0,_.useMemo)(()=>(i?.next??XI).flatMap(e=>c.find(t=>t.id===e)??[]),[i,c]),Ce=x===`next`&&Se.length===0?null:x,[we,Te]=(0,_.useState)(()=>{try{let e=Number(window.localStorage.getItem(sL));return e>=lL?e:cL}catch{return cL}}),Ee=e=>{e.preventDefault();let t=e.clientX,n=we,r=n,i=e=>{r=Math.round(Math.min(Math.max(n+t-e.clientX,lL),window.innerWidth-80)),Te(r)},a=()=>{window.removeEventListener(`pointermove`,i),window.removeEventListener(`pointerup`,a);try{window.localStorage.setItem(sL,String(r))}catch{}};window.addEventListener(`pointermove`,i),window.addEventListener(`pointerup`,a)},De=(0,_.useMemo)(()=>{let e=new Set;for(let t of c)for(let n of t.deps)e.add(n).add(t.id);return e},[c]),Oe=(0,_.useMemo)(()=>c.filter(e=>!d.has(e.area)&&!p.has(e.status)),[c,d,p]),ke=(0,_.useMemo)(()=>{let e=new Map;for(let t of c){if(!t.parent)continue;let n=e.get(t.parent);n?n.push(t):e.set(t.parent,[t])}let t=e=>d.has(e.area)||p.has(e.status),n=new Map,r=i=>{let a=n.get(i.id);if(a!==void 0)return a;let o=e.get(i.id),s=o?o.every(r):t(i);return n.set(i.id,s),s},i=new Set;for(let e of c)r(e)&&i.add(e.id);return i},[c,d,p]),Ae=(0,_.useMemo)(()=>{let e=(e,t)=>e===t||e.startsWith(`${t}.`)||t.startsWith(`${e}.`),t=new Map,n=(e,n)=>{let r=t.get(e)??new Set;r.add(n),t.set(e,r)};for(let t of c)for(let r of t.deps)e(r,t.id)||(ke.has(t.id)&&!ke.has(r)&&n(r,t.id),ke.has(r)&&!ke.has(t.id)&&n(t.id,r));return t},[c,ke]),[je,Me]=Df([]),Ne=(0,_.useRef)(null),[Pe,Fe]=(0,_.useState)(null);(0,_.useEffect)(()=>{if(Pe===null||Ne.current===null)return;let e=je.find(e=>e.id===Pe);if(e===void 0||e.hidden===!0)return;let t=Pe.startsWith(`area:`);Ne.current.fitView({nodes:[{id:Pe}],duration:400,maxZoom:t?1.2:1.1,padding:t?.08:.6}),Fe(null)},[Pe,je]);let Ie=e=>{f(t=>t.has(e)?ut(t,e):t),Fe(`area:${e}`),se&&y(!1)},[Le,Re,ze]=Of([]),Be=(0,_.useMemo)(()=>bb(),[]),Ve=(0,_.useRef)(Be?i?.layout??{}:(()=>{let e=EE(s);return Object.keys(e).length>0?e:i?.layout??{}})()),He=(0,_.useRef)(null),Ue=(0,_.useRef)(!1),We=(0,_.useCallback)(e=>{if(!Be)return DE(s,e);He.current!==null&&clearTimeout(He.current),He.current=setTimeout(()=>{He.current=null,Cb(s,e).catch(t=>{console.warn(`the layout could not be saved to the plan; keeping it in this browser`,t),DE(s,e)})},400)},[s,Be]),Ge=(0,_.useRef)(OE(s)),Ke=(0,_.useRef)(new Map),qe=(0,_.useRef)({}),Je=(0,_.useCallback)(e=>{let t=[],n=!1;for(let r of e)r.type===`position`?(r.position&&(qe.current[r.id]=r.position),r.dragging===!1&&t.push(r.id)):r.type===`dimensions`&&r.dimensions&&r.resizing!==void 0&&(Ge.current[r.id]=r.dimensions,r.resizing===!1&&(n=!0));if(n&&kE(s,Ge.current),Me(t=>tu(e,t)),t.length>0){for(let e of t){let t=qe.current[e];t&&(Ve.current={...Ve.current,[e]:pE(Ke.current.get(e),t)}),delete qe.current[e]}Ue.current=!0,ve(e=>e+1)}},[s,Me]),Ye=(0,_.useCallback)(()=>{window.confirm(`Lay the map out afresh? Everything moves, including anything you arranged by hand.`)&&(AE(s),Ve.current={},Ge.current={},Ue.current=!0,ve(e=>e+1))},[s]),Xe=(0,_.useRef)(i?.layout??{});(0,_.useEffect)(()=>{let e=i?.layout??{};Be&&!uL(e,Xe.current)&&(Xe.current=e,He.current!==null||Ue.current||uL(e,Ve.current)||(Ve.current=e,ve(e=>e+1)))},[i?.layout,Be]),(0,_.useEffect)(()=>{let e=dE(c,l,u,h,A,ke,Ve.current);Ke.current=new Map(e.map(e=>[e.id,e.parentId]));let t=fE(e);(Ue.current||!uL(t,Ve.current))&&(Ue.current=!1,Ve.current=t,We(t));let n=c.filter(e=>!ke.has(e.id)),r=e;if(n.length<c.length||R.size>0){let i=new Map(e.map(e=>[e.id,e])),a=dE(n,yw(n),u,h,A,new Set,t,R),o=new Set(a.map(e=>e.id)),s=e=>e.type!==`ghost`&&R.has(e.id.split(`-`)[0]??``);r=[...a.map(e=>e.type===`area`&&e.data.collapsed!==void 0?e:{...e,data:i.get(e.id)?.data??e.data}),...e.filter(e=>!o.has(e.id)).map(e=>s(e)?{...e,hidden:!0}:e)]}Me(e=>{let t=new Set(e.filter(e=>e.selected===!0).map(e=>e.id));return r.map(e=>{let n=Ge.current[e.id],r=n?{...e,style:{...e.style,width:n.width,height:n.height}}:e;return t.has(e.id)?{...r,selected:!0}:r})})},[c,l,u,h,A,ke,R,_e,We,Me]),(0,_.useEffect)(()=>{Re(mE(c,u,h,A,pe,he,ke,R))},[c,u,h,A,pe,he,ke,R,Re]);let Ze=(0,_.useRef)(new Set);(0,_.useEffect)(()=>{let e=(pe?Ae.get(pe):void 0)??new Set,t=Ze.current;(e.size!==0||t.size!==0)&&(Me(n=>n.map(n=>{if(e.has(n.id))return{...n,hidden:!1,style:{...n.style,opacity:.42}};if(t.has(n.id)){let e={...n.style};return delete e.opacity,{...n,hidden:ke.has(n.id),style:e}}return n})),Ze.current=e)},[pe,Ae,ke,Me]);let Qe=(0,_.useMemo)(()=>k?je.map(e=>e.selected||e.id===A?{...e,draggable:!0}:e):je,[je,k,A]),$e=A?c.find(e=>e.id===A)??null:null,et=$e!==null||M!==null||F!==null||Ce!==null,tt=(0,_.useRef)(null);(0,_.useEffect)(()=>{let e=tt.current;if(!et||e===null)return;let t=()=>{let t=e.querySelector(`.detail`),n=t!==null&&t.scrollHeight-t.scrollTop-t.clientHeight>2;e.dataset.more=String(n)};t(),e.addEventListener(`scroll`,t,!0);let n=new MutationObserver(t);n.observe(e,{childList:!0,subtree:!0,characterData:!0});let r=new ResizeObserver(t);return r.observe(e),()=>{e.removeEventListener(`scroll`,t,!0),n.disconnect(),r.disconnect()}},[et]);let nt=(0,_.useMemo)(()=>vT(e.projects.map(e=>e.key)),[e.projects]),rt=(0,_.useMemo)(()=>fe?e.projects.flatMap(e=>e.items.filter(e=>!p.has(e.status)).map(t=>({project:e.key,item:t,colour:nt[e.key]}))):i?Oe.map(e=>({project:i.key,item:e,colour:h===`status`?hw[e.status].colour:u[e.area]})):[],[fe,e.projects,p,nt,i,Oe,h,u]),it=(0,_.useMemo)(()=>PI(rt.map(e=>e.item)),[rt]),at=(e,t)=>{e===i?.key?j(t):window.location.hash=`${encodeURIComponent(e)}/${encodeURIComponent(t)}`},[ot,st]=(0,_.useState)(null),ct=$e?.id??null;(0,_.useEffect)(()=>{if(ct===null||i===null)return st(null);let e=new AbortController;return st(e=>e!==null&&e.ref===ct?e:{ref:ct,state:`loading`}),Tb(i.key,ct,e.signal).then(e=>st(e??{ref:ct,state:`missing`})).catch(e=>{e.name!==`AbortError`&&st({ref:ct,state:`failed`})}),()=>e.abort()},[ct,i,e]);let lt=ot!==null&&`body`in ot&&ot.ref===ct?ot:null,ut=(e,t)=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n},dt=e=>{if(e.source===`context`)return P(e.id);let t=e.ref===null?void 0:c.find(t=>t.id===e.ref);t!==void 0&&(ft(t),E(`search`))},ft=e=>{ke.has(e.id)&&(m(t=>t.has(e.status)?ut(t,e.status):t),f(t=>t.has(e.area)?ut(t,e.area):t)),ae(`graph`),j(e.id),Fe(e.id)},pt=(e,t)=>{(t.type===`item`||t.type===`ticket`)&&(j(t.data.item.id),E(null));let n=t.data;t.type===`area`&&n.area!==void 0&&(n.collapsed===void 0?n.foreign!==!0&&ee(n.area):ie(n.area))},mt=(e,t)=>{let n=t.data;if(t.type===`area`&&n.collapsed===void 0&&n.foreign!==!0&&n.area!==void 0){let e=n.area;re(t=>new Set(t).add(e)),A?.split(`-`)[0]===e&&j(null)}},ht=(e,t)=>{De.has(t.id)&&me(t.id)},gt=()=>me(null),_t=(e,t)=>ge(t.id),vt=()=>ge(null),yt=(0,_.useMemo)(()=>{let e=new Map,t=new Map;for(let n of c)e.set(n.area,(e.get(n.area)??0)+1),t.set(n.status,(t.get(n.status)??0)+1);return{byArea:e,byStatus:t}},[c]),bt=c.length-Oe.length;return(0,b.jsxs)(`div`,{className:`app`,children:[(0,b.jsxs)(`header`,{className:`topbar`,children:[(0,b.jsx)(`div`,{className:`topbar__title`,children:(0,b.jsxs)(`span`,{className:`picker-wrap`,children:[(0,b.jsx)(LI,{className:`picker__logo`,crop:`icon`}),(()=>{let t=i?.file??(e.storePath===null?null:e.storePath.split(`,`)[0].split(`/`).pop()),n=t!==null&&(0,b.jsx)(`span`,{className:`picker__file`,title:e.storePath??void 0,children:t});return e.projects.length<=1?(0,b.jsxs)(`span`,{className:`picker picker--static`,children:[(0,b.jsx)(`strong`,{className:`picker__name`,children:i?.name??`no project`}),n]}):(0,b.jsxs)(`label`,{className:`picker`,title:`Switch project`,children:[(0,b.jsx)(`span`,{className:`picker__name`,children:i?.name??`choose a project`}),n,(0,b.jsxs)(`select`,{className:`picker__native`,"aria-label":`Project`,value:i?.key??``,onChange:e=>{window.location.hash=e.target.value},children:[i===null&&(0,b.jsx)(`option`,{value:``,children:`choose a project`}),e.projects.map(e=>(0,b.jsx)(`option`,{value:e.key,children:e.name},e.key))]})]})})()]})}),(0,b.jsxs)(`div`,{className:`filters`,children:[(0,b.jsxs)(`button`,{className:`toolbtn`,"aria-label":`Show the ${oe}`,title:`Show the ${oe}`,onClick:()=>ae(oe),children:[(0,b.jsx)(`span`,{className:`toolbtn__main`,children:oe===`calendar`?(0,b.jsx)($I,{}):(0,b.jsx)(eL,{})}),(0,b.jsx)(`span`,{className:`toolbtn__sub`,children:oe})]}),(0,b.jsxs)(`button`,{className:`toolbtn`,"data-on":v,"aria-haspopup":`dialog`,"aria-expanded":v,"aria-label":`View settings`,onClick:()=>y(e=>!e),children:[(0,b.jsxs)(`span`,{className:`toolbtn__main`,children:[(0,b.jsx)(nL,{}),`view`]}),(0,b.jsx)(`span`,{className:`toolbtn__sub`,children:bt>0?`${bt} hidden`:`all shown`})]})]}),v&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{className:`settings__backdrop`,onClick:()=>y(!1)}),(0,b.jsxs)(`div`,{className:`settings`,role:`dialog`,"aria-label":`View settings`,children:[(0,b.jsxs)(`div`,{className:`settings__head`,title:e.storePath??void 0,children:[i?.name??`No project`,e.storePath!==null&&` - ${i?.file??e.storePath.split(`/`).pop()}`]}),!(z===`calendar`&&fe)&&(0,b.jsx)(`div`,{className:`settings__label`,children:`Areas`}),!(z===`calendar`&&fe)&&(0,b.jsx)(`div`,{className:`filters__group`,children:l.map(e=>z===`graph`?(0,b.jsxs)(`span`,{className:`chip-pair`,"data-off":d.has(e),children:[(0,b.jsxs)(`button`,{className:`chip`,style:{"--area":u[e]},onClick:()=>Ie(e),title:d.has(e)?`Show ${e} and zoom to it`:`Zoom to ${e}`,children:[(0,b.jsx)(`span`,{className:`chip__dot`}),e,(0,b.jsx)(`span`,{className:`chip__count`,children:yt.byArea.get(e)})]}),(0,b.jsx)(`button`,{className:`chip chip--eye`,onClick:()=>f(t=>ut(t,e)),title:d.has(e)?`Show ${e}`:`Hide ${e}`,"aria-label":d.has(e)?`Show ${e}`:`Hide ${e}`,children:(0,b.jsxs)(`svg`,{viewBox:`0 0 16 16`,width:`13`,height:`13`,"aria-hidden":`true`,children:[(0,b.jsx)(`path`,{d:`M1 8s2.6-4.5 7-4.5S15 8 15 8s-2.6 4.5-7 4.5S1 8 1 8z`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.4`}),(0,b.jsx)(`circle`,{cx:`8`,cy:`8`,r:`2`,fill:`currentColor`}),d.has(e)&&(0,b.jsx)(`path`,{d:`M2.5 13.5l11-11`,stroke:`currentColor`,strokeWidth:`1.4`})]})})]},e):(0,b.jsxs)(`button`,{className:`chip`,"data-off":d.has(e),style:{"--area":u[e]},onClick:()=>f(t=>ut(t,e)),children:[(0,b.jsx)(`span`,{className:`chip__dot`}),e,(0,b.jsx)(`span`,{className:`chip__count`,children:yt.byArea.get(e)})]},e))}),!(z===`calendar`&&fe)&&(0,b.jsxs)(`div`,{className:`settings__row`,children:[(0,b.jsx)(`button`,{className:`chip`,disabled:d.size===0,onClick:()=>f(new Set),children:`show all`}),(0,b.jsx)(`button`,{className:`chip`,disabled:l.every(e=>d.has(e)),onClick:()=>f(new Set(l)),children:`hide all`})]}),(0,b.jsx)(`div`,{className:`settings__label`,children:`Statuses`}),(0,b.jsx)(`div`,{className:`filters__group`,children:GI.map(e=>(0,b.jsxs)(`button`,{className:`chip`,"data-off":p.has(e),style:{"--area":hw[e].colour},onClick:()=>m(t=>ut(t,e)),children:[(0,b.jsx)(`span`,{className:`chip__dot`}),hw[e].label,(0,b.jsx)(`span`,{className:`chip__count`,children:yt.byStatus.get(e)??0})]},e))}),(0,b.jsxs)(`div`,{className:`settings__row`,children:[!(z===`calendar`&&fe)&&(0,b.jsxs)(`div`,{className:`segmented`,role:`group`,"aria-label":`Colour by`,children:[(0,b.jsx)(`span`,{className:`segmented__label`,children:`colour`}),KI.map(e=>(0,b.jsx)(`button`,{className:`segmented__btn`,"data-on":h===e,onClick:()=>g(e),children:e},e))]}),z===`calendar`&&e.projects.length>1&&(0,b.jsx)(`button`,{className:`chip`,"data-on":fe,onClick:()=>de(fe?`project`:`all`),title:`Show every project's dated items on one calendar, coloured by project`,children:`all projects`})]}),z===`graph`&&(0,b.jsx)(`div`,{className:`settings__label`,children:`Layout`}),(0,b.jsxs)(`div`,{className:`settings__row`,children:[z===`graph`&&(0,b.jsx)(`button`,{className:`chip`,"data-on":k,onClick:()=>O(k?`free`:`selected`),title:k?`Only the selected item moves. Click to let everything move`:`Everything moves. Click to move only the selected item`,children:k?`🔒 move selected only`:`🔓 move anything`}),z===`graph`&&(0,b.jsx)(`button`,{className:`chip`,disabled:R.size===0,onClick:()=>re(new Set),title:`Open every area. Click a folded area to open just that one`,children:`expand all`}),z===`graph`&&(0,b.jsx)(`button`,{className:`chip`,disabled:l.every(e=>R.has(e)),onClick:()=>{j(null),re(new Set(l))},title:`Fold every area into a summary. Double-click an open area's frame to fold just that one`,children:`collapse all`}),z===`graph`&&(0,b.jsx)(`button`,{className:`chip`,onClick:Ye,title:`Lay the map out afresh, forgetting where everything was`,children:`reset layout`})]}),a!==void 0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{className:`settings__label`,children:`Plan`}),(0,b.jsx)(`div`,{className:`settings__row`,children:(0,b.jsx)(a,{plan:e,project:i,reload:r})})]})]})]})]}),(0,b.jsxs)(`div`,{className:`body`,"data-pane":et?`open`:void 0,children:[(0,b.jsxs)(`div`,{className:`graph`,children:[e.projects.length===0&&o!==void 0?(0,b.jsx)(`div`,{className:`graph__notice`,children:(0,b.jsx)(o,{reload:r})}):t.notice!==null&&!(z===`calendar`&&fe)?(0,b.jsx)(`div`,{className:`graph__notice`,children:t.notice}):z===`calendar`&&it===0&&(0,b.jsxs)(`div`,{className:`graph__notice`,children:[`Nothing here has a date yet. Give an item a `,(0,b.jsx)(`code`,{children:`due`}),` (or a `,(0,b.jsx)(`code`,{children:`start`}),`) with`,` `,(0,b.jsx)(`code`,{children:`edit_item`}),` and it appears on the calendar.`]}),z===`graph`&&i!==null&&(0,b.jsxs)(`div`,{className:`fabs`,children:[Se.length>0&&(0,b.jsxs)(`button`,{className:`next-fab`,"data-on":Ce===`next`,onClick:()=>Ce===`next`?S(null):te(`next`),title:`The order agreed with set_next`,children:[`Next`,(0,b.jsx)(`span`,{className:`chip__count`,children:Se.length})]}),i!==null&&i.context.length>0&&(0,b.jsxs)(`button`,{className:`next-fab`,"data-on":M!==null,onClick:()=>M===null?P(null):N(null),title:`The project's context sections: what it is, and how it is worked on`,children:[`Context`,(0,b.jsx)(`span`,{className:`chip__count`,children:i.context.length})]}),(0,b.jsx)(`button`,{className:`next-fab next-fab--icon`,"data-on":Ce===`search`,"aria-label":`Search`,title:`Search (/ or Cmd+K)`,onClick:()=>Ce===`search`?S(null):te(`search`),children:(0,b.jsx)(tL,{})})]}),z===`calendar`?(0,b.jsx)(FI,{entries:rt,multiProject:fe,selected:i&&A?{project:i.key,ref:A}:null,onSelect:at}):(0,b.jsxs)(Ef,{nodes:Qe,edges:Le,nodeTypes:WI,onNodesChange:Je,onEdgesChange:ze,onInit:e=>Ne.current=e,onNodeClick:pt,onNodeDoubleClick:mt,zoomOnDoubleClick:!1,onNodeMouseEnter:ht,onNodeMouseLeave:gt,onEdgeMouseEnter:_t,onEdgeMouseLeave:vt,onPaneClick:()=>j(null),nodesDraggable:!k,nodesConnectable:!1,fitView:!0,snapToGrid:!0,snapGrid:[qI,qI],minZoom:.05,maxZoom:1.75,proOptions:{hideAttribution:!0},children:[(0,b.jsx)(Ff,{gap:qI,color:`#232a33`}),ce===`shown`&&(0,b.jsx)(sp,{pannable:!0,zoomable:!0,nodeColor:e=>e.data.colour??`#2b3644`,nodeStrokeColor:`#0b0f14`,nodeBorderRadius:4,maskColor:`rgba(11,15,20,0.6)`}),(0,b.jsx)(Wf,{showInteractive:!1,children:(0,b.jsx)(Vf,{onClick:()=>le(ce===`shown`?`hidden`:`shown`),title:ce===`shown`?`Hide the minimap`:`Show the minimap`,"aria-label":ce===`shown`?`Hide the minimap`:`Show the minimap`,children:(0,b.jsx)(rL,{})})})]})]}),et&&(0,b.jsxs)(`div`,{className:`pane`,ref:tt,style:{width:we},children:[(0,b.jsx)(`div`,{className:`pane__resize`,onPointerDown:Ee,title:`Drag to resize`,"aria-hidden":`true`}),$e&&(0,b.jsxs)(`aside`,{className:`detail`,children:[(0,b.jsxs)(`div`,{className:`detail__head`,children:[(0,b.jsxs)(`div`,{children:[T!==null&&(0,b.jsx)(`button`,{className:`detail__close detail__back`,onClick:()=>L(T),"aria-label":`Back to ${typeof T==`string`?T===`next`?`Next`:`Search`:T.area}`,title:`Back to ${typeof T==`string`?T===`next`?`Next`:`Search`:T.area}`,children:`‹`}),(0,b.jsx)(`span`,{className:`detail__id`,style:{color:u[$e.area]},children:$e.id}),i&&(0,b.jsx)(ME,{projectKey:i.key,ref_:$e.id,status:$e.status,reload:r})]}),(0,b.jsx)(`button`,{className:`detail__close`,onClick:()=>j(null),"aria-label":`Close`,children:`×`})]}),(0,b.jsx)(`h2`,{className:`detail__title`,children:$e.title}),($e.start!==void 0||$e.due!==void 0)&&(0,b.jsx)(`div`,{className:`detail__deps`,children:[$e.start&&`starts ${aL($e.start)}`,$e.due&&`due ${aL($e.due)}`].filter(Boolean).join(`, `)}),$e.deps.length>0&&(0,b.jsxs)(`div`,{className:`detail__deps`,children:[`depends on:`,` `,$e.deps.map((e,t)=>{let n=vw(e);return(0,b.jsxs)(`span`,{children:[t>0&&`, `,n===null?(0,b.jsx)(`button`,{className:`detail__dep`,onClick:()=>j(e),children:e}):(0,b.jsx)(`span`,{className:`detail__dep detail__dep--elsewhere`,title:`${n.ref} in the ${n.project} project, which is not open here`,children:e})]},e)})]}),(0,b.jsx)(`div`,{className:`detail__doc`,children:lt===null?(0,b.jsx)(`p`,{className:`detail__pending`,children:ot!==null&&`state`in ot&&ot.state===`missing`?`This item is no longer in the plan.`:ot!==null&&`state`in ot&&ot.state===`failed`?`Could not load this item. Try reopening it.`:`Loading…`}):(0,b.jsx)(lb,{remarkPlugins:[fw],children:lt.body})}),i&&(0,b.jsx)(Vb,{metrics:i.metrics.get($e.id)??JI,...xe(`metrics`)}),i&&(0,b.jsx)(Lb,{...xe(`images`),projectKey:i.key,ref_:$e.id,images:lt?.attachments??JI,uploadsDisabled:e.uploadsDisabled,reload:r}),lt!==null&&(0,b.jsx)(VI,{comments:lt.comments,...xe(`comments`)})]}),!$e&&M===null&&F!==null&&i!==null&&(0,b.jsx)(UI,{area:F,name:i.areaInfo[F]?.name,description:i.areaInfo[F]?.description,colour:u[F],items:c.filter(e=>e.area===F),next:Se.flatMap((e,t)=>e.area===F?[{item:e,position:t+1}]:[]),hidden:ke,onPick:e=>{ft(e),E({area:F})},onZoom:()=>Ie(F),onClose:()=>I(null)}),!$e&&M===null&&F===null&&Ce===`next`&&(0,b.jsxs)(`aside`,{className:`detail`,"aria-label":`Next`,children:[(0,b.jsxs)(`div`,{className:`detail__head`,children:[(0,b.jsx)(`span`,{className:`detail__id`,children:`Next`}),(0,b.jsx)(`button`,{className:`detail__close`,onClick:()=>S(null),"aria-label":`Close`,children:`×`})]}),(0,b.jsx)(`ol`,{className:`next__list area-pane__list`,children:Se.map((e,t)=>(0,b.jsx)(`li`,{children:(0,b.jsxs)(`button`,{className:`next__item`,"data-hidden":ke.has(e.id),onClick:()=>{ft(e),E(`next`)},children:[(0,b.jsx)(`span`,{className:`next__pos`,children:t+1}),(0,b.jsx)(`span`,{className:`next__id`,style:{color:u[e.area]},children:e.id}),(0,b.jsx)(`span`,{className:`next__title`,children:e.title})]})},e.id))})]}),!$e&&M===null&&F===null&&Ce===`search`&&i!==null&&(0,b.jsx)(RI,{projectKey:i.key,colours:u,hidden:ke,titleOf:e=>c.find(t=>t.id===e)?.title,query:C,onQuery:w,onPick:dt,onClose:()=>S(null)}),!$e&&M!==null&&i!==null&&(0,b.jsxs)(`aside`,{className:`detail`,"aria-label":`Context`,children:[(0,b.jsxs)(`div`,{className:`detail__head`,children:[(0,b.jsxs)(`div`,{children:[M.heading!==null&&(0,b.jsx)(`button`,{className:`detail__close detail__back`,onClick:()=>N({heading:null}),"aria-label":`Back to Context`,title:`Back to Context`,children:`‹`}),(0,b.jsx)(`span`,{className:`detail__id`,children:`Context`})]}),(0,b.jsx)(`button`,{className:`detail__close`,onClick:()=>N(null),"aria-label":`Close`,children:`×`})]}),M.heading===null?(0,b.jsx)(`ul`,{className:`context__list`,children:i.context.map(e=>(0,b.jsx)(`li`,{children:(0,b.jsx)(`button`,{className:`context__item`,onClick:()=>N({heading:e.heading}),children:e.heading})},e.heading))}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`h2`,{className:`detail__title`,children:M.heading}),(0,b.jsx)(`div`,{className:`detail__doc`,children:(0,b.jsx)(lb,{remarkPlugins:[fw],children:i.context.find(e=>e.heading===M.heading)?.content??`This section no longer exists.`})})]})]})]})]})]})}var sL=`attraverso.pane.width`,cL=420,lL=300;function uL(e,t){let n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>t[n]!==void 0&&e[n].x===t[n].x&&e[n].y===t[n].y)}function dL({extensions:e}){let[t,n]=(0,_.useState)(null),[r,i]=(0,_.useState)(null),[a,o]=(0,_.useState)(null),s=mL();(0,_.useEffect)(()=>{_b(e.session,o).then(o,()=>o({mode:`local`}))},[e.session]);let c=(0,_.useCallback)(()=>{jb().then(n,e=>i(e instanceof Error?e.message:String(e)))},[]),l=(0,_.useCallback)(()=>{jb().then(n,()=>{})},[]);if(pL(t!==null&&e.liveRefresh!==!1,l),(0,_.useEffect)(()=>{a!==null&&a.mode!==`anonymous`&&c()},[a,c]),a===null)return(0,b.jsx)(`div`,{className:`boot`,children:`Starting...`});if(a.mode===`anonymous`)return(0,b.jsxs)(`div`,{className:`boot`,children:[(0,b.jsx)(`strong`,{children:`Sign in to see your projects`}),(0,b.jsx)(`span`,{className:`boot__hint`,children:`This viewer is hosted, so it shows the projects belonging to your account.`}),(0,b.jsx)(`button`,{className:`boot__action`,onClick:a.signIn,children:a.signInLabel})]});if(r)return(0,b.jsxs)(`div`,{className:`boot boot--error`,children:[(0,b.jsx)(`strong`,{children:`Could not load the plan.`}),(0,b.jsx)(`span`,{children:r}),(0,b.jsxs)(`span`,{className:`boot__hint`,children:[`Nothing is serving `,(0,b.jsx)(`code`,{children:vb}),`. Run `,(0,b.jsx)(`code`,{children:`yarn viewer`}),`, or open the viewer from the MCP server so it serves the store it already has loaded.`]})]});if(!t)return(0,b.jsx)(`div`,{className:`boot`,children:`Loading the plan...`});let u=Fb(t.projects,s.project);return(0,b.jsx)(pw.Provider,{value:e,children:(0,b.jsx)(oL,{plan:t,selection:u,focus:s.item,reload:c},u.project?.key??`none`)})}var fL=5;function pL(e,t){(0,_.useEffect)(()=>{if(!e||typeof EventSource>`u`)return;let n,r=null,i=0,a=!1,o=()=>{r?.close(),r=null},s=()=>{if(a||r!==null||document.visibilityState!==`visible`)return;let e=new EventSource(wb);r=e,e.addEventListener(`open`,()=>i=0),e.addEventListener(`version`,e=>{let r=e.data;n!==void 0&&r!==n&&t(),n=r}),e.addEventListener(`error`,()=>{(e.readyState===EventSource.CLOSED||++i>=fL)&&(a=!0,o())})},c=()=>document.visibilityState===`visible`?s():o();return s(),document.addEventListener(`visibilitychange`,c),()=>{a=!0,o(),document.removeEventListener(`visibilitychange`,c)}},[e,t])}function mL(){let e=()=>Mb(window.location.hash),[t,n]=(0,_.useState)(e);return(0,_.useEffect)(()=>{let t=()=>n(e());return window.addEventListener(`hashchange`,t),()=>window.removeEventListener(`hashchange`,t)},[]),t}function hL(e={}){(0,v.createRoot)(document.getElementById(`root`)).render((0,b.jsx)(_.StrictMode,{children:(0,b.jsx)(dL,{extensions:e})}))}hL();
45
+ `))}function s(e,t,n,r){let a=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:i,after:i});return o(),a(),s}function c(e,i){return Ix(e,{align:i,alignDelimiters:n,fillRows:!1,padding:t,stringLength:r})}function l(e,t,n){let{children:r}=e,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=u(r[i],t,n);return o(),a}function u(e,t,n){let{children:r}=e,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=s(r[i],e,t,n);return o(),a}function d(e,t,n){let r=ZS.inlineCode(e,t,n);if(!n.stack.includes(`tableCell`))return r;let i=[],a=0,o=r.indexOf(`|`);for(;o!==-1;){let e=o;for(;e>a&&r.charCodeAt(e-1)===92;)e--;i.push(r.slice(a,o)),(o-e)%2==0&&i.push(`\\`),a=o,o=r.indexOf(`|`,o+1)}return i.push(r.slice(a)),i.join(``)}}function sC(e,t,n,r){if(e.type===`table`&&n.type===`listItem`&&n.spread===!1&&(t.type===`definition`||t.type===`heading`&&cC(t,r)||t.type===`paragraph`||t.type===`table`))return 1}function cC(e,t){let n=!1;return ly(e,function(e){if(e.type===`break`||`value`in e&&/\r?\n|\r/.test(e.value))return n=!0,!1}),!!((!e.depth||e.depth<3)&&rh(e)&&(t.options.setext||n))}function lC(){return{exit:{taskListCheckValueChecked:dC,taskListCheckValueUnchecked:dC,paragraph:fC}}}function uC(){return{handlers:{paragraph:pC},join:[mC]}}function dC(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function fC(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start={...n.position.start}))}}this.exit(e)}function pC(e,t,n,r){if(!t||t.type!==`listItem`||hC(t)!==e)return ZS.paragraph(e,t,n,r);let i=`[`+(t.checked?`x`:` `)+`] `,a=n.createTracker(r);return a.move(i),i+ZS.paragraph(e.children.length>0?e:{type:`paragraph`,children:[{type:`text`,value:` `}]},t,n,{...r,...a.current()})}function mC(e,t,n){if(e.type!==`definition`||n.type!==`listItem`)return;let r=hC(n);if(r&&n.children.indexOf(e)<n.children.indexOf(r))return 0}function hC(e){if(typeof e.checked==`boolean`)for(let t of e.children){if(t.type===`paragraph`)return t;if(t.type!==`definition`)return}}function gC(){return[Zb(),Cx(),Ox(),QS(),lC()]}function _C(e){return{extensions:[Qb(),wx(e),kx(),oC(e),uC()]}}var vC={tokenize:MC,partial:!0},yC={tokenize:NC,partial:!0},bC={tokenize:PC,partial:!0},xC={tokenize:FC,partial:!0},SC={tokenize:IC,partial:!0},CC={name:`wwwAutolink`,tokenize:AC,previous:LC},wC={name:`protocolAutolink`,tokenize:jC,previous:RC},TC={name:`emailAutolink`,tokenize:kC,previous:zC},EC={};function DC(){return{text:EC}}for(var OC=48;OC<123;)EC[OC]=TC,OC++,OC===58?OC=65:OC===91&&(OC=97);EC[43]=TC,EC[45]=TC,EC[46]=TC,EC[95]=TC,EC[72]=[TC,wC],EC[104]=[TC,wC],EC[87]=[TC,CC],EC[119]=[TC,CC];function kC(e,t,n){let r=this,i,a;return o;function o(t){return!BC(t)||!zC.call(r,r.previous)||VC(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return BC(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(SC,u,l)(t):t===45||t===95||vh(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&_h(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function AC(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!LC.call(r,r.previous)||VC(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(vC,e.attempt(yC,e.attempt(bC,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function jC(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&RC.call(r,r.previous)&&!VC(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(_h(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||bh(t)||wh(t)||Eh(t)||Th(t)?n(t):e.attempt(yC,e.attempt(bC,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function MC(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function NC(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(xC,c,s)(t):t===null||wh(t)||Eh(t)||t!==45&&Th(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function PC(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(xC,t,a)(o):o===null||wh(o)||Eh(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function FC(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||wh(o)||Eh(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||wh(e)||Eh(e)?t(e):r(e)}function a(e){return _h(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):_h(t)?(e.consume(t),o):n(t)}}function IC(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return vh(e)?n(e):t(e)}}function LC(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||wh(e)}function RC(e){return!_h(e)}function zC(e){return!(e===47||BC(e))}function BC(e){return e===43||e===45||e===46||e===95||vh(e)}function VC(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var HC={tokenize:XC,partial:!0};function UC(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:qC,continuation:{tokenize:JC},exit:YC}},text:{91:{name:`gfmFootnoteCall`,tokenize:KC},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:WC,resolveTo:GC}}}}function WC(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=gh(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function GC(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function KC(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||wh(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(gh(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return wh(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function qC(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||wh(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=gh(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return wh(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),Y(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function JC(e,t,n){return e.check(Kh,t,e.attempt(HC,t,n))}function YC(e){e.exit(`gfmFootnoteDefinition`)}function XC(e,t,n){let r=this;return Y(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function ZC(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&lh(o,o.length,0,zh(s,e.slice(r+1,n),t)),lh(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),lh(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Rh(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Rh(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var QC=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){$C(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function $C(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function ew(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function tw(){return{flow:{null:{name:`table`,tokenize:nw,resolveAll:rw}}}}function nw(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):q(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):J(t)?Y(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||wh(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,J(t)?Y(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return J(t)?Y(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||q(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return J(t)?Y(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||q(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||q(n)?(e.exit(`tableRow`),t(n)):J(n)?Y(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||wh(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function rw(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new QC;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(aw(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=iw(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=iw(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=iw(f,t,o,i,n,d)):(o[0]=o[1],d=iw(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&aw(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=ew(t.events,n))}return e}function iw(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},ow(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=ow(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=ow(t.events,n[2]),a=ow(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},ow(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function aw(e,t,n,r,i){let a=[],o=ow(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function ow(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var sw={name:`tasklistCheck`,tokenize:lw};function cw(){return{text:{91:sw}}}function lw(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return wh(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return q(r)?t(r):J(r)?e.check({tokenize:uw},t,n)(r):n(r)}}function uw(e,t,n){return Y(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function dw(e){return fh([DC(),UC(),ZC(e),tw(),cw()])}var fw={};function pw(e){let t=this,n=e||fw,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(dw(n)),a.push(gC()),o.push(_C(n))}var mw=(0,_.createContext)({}),hw=()=>(0,_.useContext)(mw),gw={done:{icon:`✓`,label:`done`,colour:`#34d399`,strike:!0},review:{icon:`◐`,label:`review`,colour:`#a884f3`,strike:!1},"in-progress":{icon:`●`,label:`in-progress`,colour:`#4f9dff`,strike:!1},"to-do":{icon:`○`,label:`to-do`,colour:`#fbbf24`,strike:!1},planning:{icon:`○`,label:`planning`,colour:`#e8590c`,strike:!1}};Object.keys(gw);var _w=/^[A-Z][A-Z0-9]*-[1-9]\d*(\.[1-9]\d*)*$/,vw=e=>_w.test(e);function yw(e){let t=e.indexOf(`:`);if(t<=0)return null;let n=e.slice(t+1);return vw(n)?{project:e.slice(0,t),ref:n}:null}function bw(e){let t=[];for(let n of e)t.includes(n.area)||t.push(n.area);return t}var xw=o(((e,t)=>{var n=class{_isDirected=!0;_isMultigraph=!1;_isCompound=!1;_label;_defaultNodeLabelFn=()=>void 0;_defaultEdgeLabelFn=()=>void 0;_nodes={};_in={};_preds={};_out={};_sucs={};_edgeObjs={};_edgeLabels={};_nodeCount=0;_edgeCount=0;_parent;_children;constructor(e){e&&(this._isDirected=!Object.hasOwn(e,`directed`)||e.directed,this._isMultigraph=Object.hasOwn(e,`multigraph`)?e.multigraph:!1,this._isCompound=Object.hasOwn(e,`compound`)?e.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[`\0`]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return this._defaultNodeLabelFn=e,typeof e!=`function`&&(this._defaultNodeLabelFn=()=>e),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var e=this;return this.nodes().filter(t=>Object.keys(e._in[t]).length===0)}sinks(){var e=this;return this.nodes().filter(t=>Object.keys(e._out[t]).length===0)}setNodes(e,t){var n=arguments,r=this;return e.forEach(function(e){n.length>1?r.setNode(e,t):r.setNode(e)}),this}setNode(e,t){return Object.hasOwn(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=`\0`,this._children[e]={},this._children[`\0`][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.hasOwn(this._nodes,e)}removeNode(e){var t=this;if(Object.hasOwn(this._nodes,e)){var n=e=>t.removeEdge(t._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(function(e){t.setParent(e)}),delete this._children[e]),Object.keys(this._in[e]).forEach(n),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(t===void 0)t=`\0`;else{t+=``;for(var n=t;n!==void 0;n=this.parent(n))if(n===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==`\0`)return t}}children(e=`\0`){if(this._isCompound){var t=this._children[e];if(t)return Object.keys(t)}else if(e===`\0`)return this.nodes();else if(this.hasNode(e))return[]}predecessors(e){var t=this._preds[e];if(t)return Object.keys(t)}successors(e){var t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){var t=this.predecessors(e);if(t){let r=new Set(t);for(var n of this.successors(e))r.add(n);return Array.from(r.values())}}isLeaf(e){return(this.isDirected()?this.successors(e):this.neighbors(e)).length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;Object.entries(this._nodes).forEach(function([n,r]){e(n)&&t.setNode(n,r)}),Object.values(this._edgeObjs).forEach(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});var r={};function i(e){var a=n.parent(e);return a===void 0||t.hasNode(a)?(r[e]=a,a):a in r?r[a]:i(a)}return this._isCompound&&t.nodes().forEach(e=>t.setParent(e,i(e))),t}setDefaultEdgeLabel(e){return this._defaultEdgeLabelFn=e,typeof e!=`function`&&(this._defaultEdgeLabelFn=()=>e),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){var n=this,r=arguments;return e.reduce(function(e,i){return r.length>1?n.setEdge(e,i,t):n.setEdge(e,i),i}),this}setEdge(){var e,t,n,i,s=!1,c=arguments[0];typeof c==`object`&&c&&`v`in c?(e=c.v,t=c.w,n=c.name,arguments.length===2&&(i=arguments[1],s=!0)):(e=c,t=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],s=!0)),e=``+e,t=``+t,n!==void 0&&(n=``+n);var l=a(this._isDirected,e,t,n);if(Object.hasOwn(this._edgeLabels,l))return s&&(this._edgeLabels[l]=i),this;if(n!==void 0&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(e),this.setNode(t),this._edgeLabels[l]=s?i:this._defaultEdgeLabelFn(e,t,n);var u=o(this._isDirected,e,t,n);return e=u.v,t=u.w,Object.freeze(u),this._edgeObjs[l]=u,r(this._preds[t],e),r(this._sucs[e],t),this._in[t][l]=u,this._out[e][l]=u,this._edgeCount++,this}edge(e,t,n){var r=arguments.length===1?s(this._isDirected,arguments[0]):a(this._isDirected,e,t,n);return this._edgeLabels[r]}edgeAsObj(){let e=this.edge(...arguments);return typeof e==`object`?e:{label:e}}hasEdge(e,t,n){var r=arguments.length===1?s(this._isDirected,arguments[0]):a(this._isDirected,e,t,n);return Object.hasOwn(this._edgeLabels,r)}removeEdge(e,t,n){var r=arguments.length===1?s(this._isDirected,arguments[0]):a(this._isDirected,e,t,n),o=this._edgeObjs[r];return o&&(e=o.v,t=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],i(this._preds[t],e),i(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,t){var n=this._in[e];if(n){var r=Object.values(n);return t?r.filter(e=>e.v===t):r}}outEdges(e,t){var n=this._out[e];if(n){var r=Object.values(n);return t?r.filter(e=>e.w===t):r}}nodeEdges(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}};function r(e,t){e[t]?e[t]++:e[t]=1}function i(e,t){--e[t]||delete e[t]}function a(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}return i+``+a+``+(r===void 0?`\0`:r)}function o(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function s(e,t){return a(e,t.v,t.w,t.name)}t.exports=n})),Sw=o(((e,t)=>{t.exports=`2.2.4`})),Cw=o(((e,t)=>{t.exports={Graph:xw(),version:Sw()}})),ww=o(((e,t)=>{var n=xw();t.exports={write:r,read:o};function r(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:i(e),edges:a(e)};return e.graph()!==void 0&&(t.value=structuredClone(e.graph())),t}function i(e){return e.nodes().map(function(t){var n=e.node(t),r=e.parent(t),i={v:t};return n!==void 0&&(i.value=n),r!==void 0&&(i.parent=r),i})}function a(e){return e.edges().map(function(t){var n=e.edge(t),r={v:t.v,w:t.w};return t.name!==void 0&&(r.name=t.name),n!==void 0&&(r.value=n),r})}function o(e){var t=new n(e.options).setGraph(e.value);return e.nodes.forEach(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),e.edges.forEach(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}})),Tw=o(((e,t)=>{t.exports=n;function n(e){var t={},n=[],r;function i(n){Object.hasOwn(t,n)||(t[n]=!0,r.push(n),e.successors(n).forEach(i),e.predecessors(n).forEach(i))}return e.nodes().forEach(function(e){r=[],i(e),r.length&&n.push(r)}),n}})),Ew=o(((e,t)=>{t.exports=class{_arr=[];_keyIndices={};size(){return this._arr.length}keys(){return this._arr.map(function(e){return e.key})}has(e){return Object.hasOwn(this._keyIndices,e)}priority(e){var t=this._keyIndices[e];if(t!==void 0)return this._arr[t].priority}min(){if(this.size()===0)throw Error(`Queue underflow`);return this._arr[0].key}add(e,t){var n=this._keyIndices;if(e=String(e),!Object.hasOwn(n,e)){var r=this._arr,i=r.length;return n[e]=i,r.push({key:e,priority:t}),this._decrease(i),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw Error(`New priority is greater than current priority. Key: `+e+` Old: `+this._arr[n].priority+` New: `+t);this._arr[n].priority=t,this._decrease(n)}_heapify(e){var t=this._arr,n=2*e,r=n+1,i=e;n<t.length&&(i=t[n].priority<t[i].priority?n:i,r<t.length&&(i=t[r].priority<t[i].priority?r:i),i!==e&&(this._swap(e,i),this._heapify(i)))}_decrease(e){for(var t=this._arr,n=t[e].priority,r;e!==0&&(r=e>>1,!(t[r].priority<n));)this._swap(e,r),e=r}_swap(e,t){var n=this._arr,r=this._keyIndices,i=n[e],a=n[t];n[e]=a,n[t]=i,r[a.key]=e,r[i.key]=t}}})),Dw=o(((e,t)=>{var n=Ew();t.exports=i;var r=()=>1;function i(e,t,n,i){return a(e,String(t),n||r,i||function(t){return e.outEdges(t)})}function a(e,t,r,i){var a={},o=new n,s,c,l=function(e){var t=e.v===s?e.w:e.v,n=a[t],i=r(e),l=c.distance+i;if(i<0)throw Error(`dijkstra does not allow negative edge weights. Bad edge: `+e+` Weight: `+i);l<n.distance&&(n.distance=l,n.predecessor=s,o.decrease(t,l))};for(e.nodes().forEach(function(e){var n=e===t?0:1/0;a[e]={distance:n},o.add(e,n)});o.size()>0&&(s=o.removeMin(),c=a[s],c.distance!==1/0);)i(s).forEach(l);return a}})),Ow=o(((e,t)=>{var n=Dw();t.exports=r;function r(e,t,r){return e.nodes().reduce(function(i,a){return i[a]=n(e,a,t,r),i},{})}})),kw=o(((e,t)=>{t.exports=n;function n(e){var t=0,n=[],r={},i=[];function a(o){var s=r[o]={onStack:!0,lowlink:t,index:t++};if(n.push(o),e.successors(o).forEach(function(e){Object.hasOwn(r,e)?r[e].onStack&&(s.lowlink=Math.min(s.lowlink,r[e].index)):(a(e),s.lowlink=Math.min(s.lowlink,r[e].lowlink))}),s.lowlink===s.index){var c=[],l;do l=n.pop(),r[l].onStack=!1,c.push(l);while(o!==l);i.push(c)}}return e.nodes().forEach(function(e){Object.hasOwn(r,e)||a(e)}),i}})),Aw=o(((e,t)=>{var n=kw();t.exports=r;function r(e){return n(e).filter(function(t){return t.length>1||t.length===1&&e.hasEdge(t[0],t[0])})}})),jw=o(((e,t)=>{t.exports=r;var n=()=>1;function r(e,t,r){return i(e,t||n,r||function(t){return e.outEdges(t)})}function i(e,t,n){var r={},i=e.nodes();return i.forEach(function(e){r[e]={},r[e][e]={distance:0},i.forEach(function(t){e!==t&&(r[e][t]={distance:1/0})}),n(e).forEach(function(n){var i=n.v===e?n.w:n.v,a=t(n);r[e][i]={distance:a,predecessor:e}})}),i.forEach(function(e){var t=r[e];i.forEach(function(n){var a=r[n];i.forEach(function(n){var r=a[e],i=t[n],o=a[n],s=r.distance+i.distance;s<o.distance&&(o.distance=s,o.predecessor=i.predecessor)})})}),r}})),Mw=o(((e,t)=>{function n(e){var t={},n={},i=[];function a(o){if(Object.hasOwn(n,o))throw new r;Object.hasOwn(t,o)||(n[o]=!0,t[o]=!0,e.predecessors(o).forEach(a),delete n[o],i.push(o))}if(e.sinks().forEach(a),Object.keys(t).length!==e.nodeCount())throw new r;return i}var r=class extends Error{constructor(){super(...arguments)}};t.exports=n,n.CycleException=r})),Nw=o(((e,t)=>{var n=Mw();t.exports=r;function r(e){try{n(e)}catch(e){if(e instanceof n.CycleException)return!1;throw e}return!0}})),Pw=o(((e,t)=>{t.exports=n;function n(e,t,n){Array.isArray(t)||(t=[t]);var a=e.isDirected()?t=>e.successors(t):t=>e.neighbors(t),o=n===`post`?r:i,s=[],c={};return t.forEach(t=>{if(!e.hasNode(t))throw Error(`Graph does not have node: `+t);o(t,a,c,s)}),s}function r(e,t,n,r){for(var i=[[e,!1]];i.length>0;){var o=i.pop();o[1]?r.push(o[0]):Object.hasOwn(n,o[0])||(n[o[0]]=!0,i.push([o[0],!0]),a(t(o[0]),e=>i.push([e,!1])))}}function i(e,t,n,r){for(var i=[e];i.length>0;){var o=i.pop();Object.hasOwn(n,o)||(n[o]=!0,r.push(o),a(t(o),e=>i.push(e)))}}function a(e,t){for(var n=e.length;n--;)t(e[n],n,e);return e}})),Fw=o(((e,t)=>{var n=Pw();t.exports=r;function r(e,t){return n(e,t,`post`)}})),Iw=o(((e,t)=>{var n=Pw();t.exports=r;function r(e,t){return n(e,t,`pre`)}})),Lw=o(((e,t)=>{var n=xw(),r=Ew();t.exports=i;function i(e,t){var i=new n,a={},o=new r,s;function c(e){var n=e.v===s?e.w:e.v,r=o.priority(n);if(r!==void 0){var i=t(e);i<r&&(a[n]=s,o.decrease(n,i))}}if(e.nodeCount()===0)return i;e.nodes().forEach(function(e){o.add(e,1/0),i.setNode(e)}),o.decrease(e.nodes()[0],0);for(var l=!1;o.size()>0;){if(s=o.removeMin(),Object.hasOwn(a,s))i.setEdge(s,a[s]);else if(l)throw Error(`Input graph is not connected: `+e);else l=!0;e.nodeEdges(s).forEach(c)}return i}})),Rw=o(((e,t)=>{t.exports={components:Tw(),dijkstra:Dw(),dijkstraAll:Ow(),findCycles:Aw(),floydWarshall:jw(),isAcyclic:Nw(),postorder:Fw(),preorder:Iw(),prim:Lw(),tarjan:kw(),topsort:Mw()}})),zw=o(((e,t)=>{var n=Cw();t.exports={Graph:n.Graph,json:ww(),alg:Rw(),version:n.version}})),Bw=o(((e,t)=>{var n=class{constructor(){let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return r(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&r(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,n=t._prev;for(;n!==t;)e.push(JSON.stringify(n,i)),n=n._prev;return`[`+e.join(`, `)+`]`}};function r(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function i(e,t){if(e!==`_next`&&e!==`_prev`)return t}t.exports=n})),Vw=o(((e,t)=>{var n=zw().Graph,r=Bw();t.exports=a;var i=()=>1;function a(e,t){if(e.nodeCount()<=1)return[];let n=c(e,t||i);return o(n.graph,n.buckets,n.zeroIdx).flatMap(t=>e.outEdges(t.v,t.w))}function o(e,t,n){let r=[],i=t[t.length-1],a=t[0],o;for(;e.nodeCount();){for(;o=a.dequeue();)s(e,t,n,o);for(;o=i.dequeue();)s(e,t,n,o);if(e.nodeCount()){for(let i=t.length-2;i>0;--i)if(o=t[i].dequeue(),o){r=r.concat(s(e,t,n,o,!0));break}}}return r}function s(e,t,n,r,i){let a=i?[]:void 0;return e.inEdges(r.v).forEach(r=>{let o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,l(t,n,s)}),e.outEdges(r.v).forEach(r=>{let i=e.edge(r),a=r.w,o=e.node(a);o.in-=i,l(t,n,o)}),e.removeNode(r.v),a}function c(e,t){let i=new n,a=0,o=0;e.nodes().forEach(e=>{i.setNode(e,{v:e,in:0,out:0})}),e.edges().forEach(e=>{let n=i.edge(e.v,e.w)||0,r=t(e),s=n+r;i.setEdge(e.v,e.w,s),o=Math.max(o,i.node(e.v).out+=r),a=Math.max(a,i.node(e.w).in+=r)});let s=u(o+a+3).map(()=>new r),c=a+1;return i.nodes().forEach(e=>{l(s,c,i.node(e))}),{graph:i,buckets:s,zeroIdx:c}}function l(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}function u(e){let t=[];for(let n=0;n<e;n++)t.push(n);return t}})),Hw=o(((e,t)=>{var n=zw().Graph;t.exports={addBorderNode:f,addDummyNode:r,applyWithChunking:h,asNonCompoundGraph:a,buildLayerMatrix:l,intersectRect:c,mapValues:w,maxRank:g,normalizeRanks:u,notime:y,partition:_,pick:C,predecessorWeights:s,range:S,removeEmptyRanks:d,simplify:i,successorWeights:o,time:v,uniqueId:x,zipObject:T};function r(e,t,n,r){for(var i=r;e.hasNode(i);)i=x(r);return n.dummy=t,e.setNode(i,n),i}function i(e){let t=new n().setGraph(e.graph());return e.nodes().forEach(n=>t.setNode(n,e.node(n))),e.edges().forEach(n=>{let r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function a(e){let t=new n({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(n=>{e.children(n).length||t.setNode(n,e.node(n))}),e.edges().forEach(n=>{t.setEdge(n,e.edge(n))}),t}function o(e){let t=e.nodes().map(t=>{let n={};return e.outEdges(t).forEach(t=>{n[t.w]=(n[t.w]||0)+e.edge(t).weight}),n});return T(e.nodes(),t)}function s(e){let t=e.nodes().map(t=>{let n={};return e.inEdges(t).forEach(t=>{n[t.v]=(n[t.v]||0)+e.edge(t).weight}),n});return T(e.nodes(),t)}function c(e,t){let n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);let c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function l(e){let t=S(g(e)+1).map(()=>[]);return e.nodes().forEach(n=>{let r=e.node(n),i=r.rank;i!==void 0&&(t[i][r.order]=n)}),t}function u(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MAX_VALUE:n}),n=h(Math.min,t);e.nodes().forEach(t=>{let r=e.node(t);Object.hasOwn(r,`rank`)&&(r.rank-=n)})}function d(e){let t=e.nodes().map(t=>e.node(t).rank),n=h(Math.min,t),r=[];e.nodes().forEach(t=>{let i=e.node(t).rank-n;r[i]||(r[i]=[]),r[i].push(t)});let i=0,a=e.graph().nodeRankFactor;Array.from(r).forEach((t,n)=>{t===void 0&&n%a!==0?--i:t!==void 0&&i&&t.forEach(t=>e.node(t).rank+=i)})}function f(e,t,n,i){let a={width:0,height:0};return arguments.length>=4&&(a.rank=n,a.order=i),r(e,`border`,a,t)}function p(e,t=m){let n=[];for(let r=0;r<e.length;r+=t){let i=e.slice(r,r+t);n.push(i)}return n}var m=65535;function h(e,t){if(t.length>m){let n=p(t);return e.apply(null,n.map(t=>e.apply(null,t)))}return e.apply(null,t)}function g(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MIN_VALUE:n});return h(Math.max,t)}function _(e,t){let n={lhs:[],rhs:[]};return e.forEach(e=>{t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function v(e,t){let n=Date.now();try{return t()}finally{console.log(e+` time: `+(Date.now()-n)+`ms`)}}function y(e,t){return t()}var b=0;function x(e){return e+(``+ ++b)}function S(e,t,n=1){t??(t=e,e=0);let r=e=>e<t;n<0&&(r=e=>t<e);let i=[];for(let t=e;r(t);t+=n)i.push(t);return i}function C(e,t){let n={};for(let r of t)e[r]!==void 0&&(n[r]=e[r]);return n}function w(e,t){let n=t;return typeof t==`string`&&(n=e=>e[t]),Object.entries(e).reduce((e,[t,r])=>(e[t]=n(r,t),e),{})}function T(e,t){return e.reduce((e,n,r)=>(e[n]=t[r],e),{})}})),Uw=o(((e,t)=>{var n=Vw(),r=Hw().uniqueId;t.exports={run:i,undo:o};function i(e){(e.graph().acyclicer===`greedy`?n(e,t(e)):a(e)).forEach(t=>{let n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,r(`rev`))});function t(e){return t=>e.edge(t).weight}}function a(e){let t=[],n={},r={};function i(a){Object.hasOwn(r,a)||(r[a]=!0,n[a]=!0,e.outEdges(a).forEach(e=>{Object.hasOwn(n,e.w)?t.push(e):i(e.w)}),delete n[a])}return e.nodes().forEach(i),t}function o(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.reversed){e.removeEdge(t);let r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}})),Ww=o(((e,t)=>{var n=Hw();t.exports={run:r,undo:a};function r(e){e.graph().dummyChains=[],e.edges().forEach(t=>i(e,t))}function i(e,t){let r=t.v,i=e.node(r).rank,a=t.w,o=e.node(a).rank,s=t.name,c=e.edge(t),l=c.labelRank;if(o===i+1)return;e.removeEdge(t);let u,d,f=0;for(++i;i<o;++f,++i)c.points=[],d={width:0,height:0,edgeLabel:c,edgeObj:t,rank:i},u=n.addDummyNode(e,`edge`,d,`_d`),i===l&&(d.width=c.width,d.height=c.height,d.dummy=`edge-label`,d.labelpos=c.labelpos),e.setEdge(r,u,{weight:c.weight},s),f===0&&e.graph().dummyChains.push(u),r=u;e.setEdge(r,a,{weight:c.weight},s)}function a(e){e.graph().dummyChains.forEach(t=>{let n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}})),Gw=o(((e,t)=>{var{applyWithChunking:n}=Hw();t.exports={longestPath:r,slack:i};function r(e){var t={};function r(i){var a=e.node(i);if(Object.hasOwn(t,i))return a.rank;t[i]=!0;let o=e.outEdges(i).map(t=>t==null?1/0:r(t.w)-e.edge(t).minlen);var s=n(Math.min,o);return s===1/0&&(s=0),a.rank=s}e.sources().forEach(r)}function i(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}})),Kw=o(((e,t)=>{var n=zw().Graph,r=Gw().slack;t.exports=i;function i(e){var t=new n({directed:!1}),i=e.nodes()[0],c=e.nodeCount();t.setNode(i,{});for(var l,u;a(t,e)<c;)l=o(t,e),u=t.hasNode(l.v)?r(e,l):-r(e,l),s(t,e,u);return t}function a(e,t){function n(i){t.nodeEdges(i).forEach(a=>{var o=a.v,s=i===o?a.w:o;!e.hasNode(s)&&!r(t,a)&&(e.setNode(s,{}),e.setEdge(i,s,{}),n(s))})}return e.nodes().forEach(n),e.nodeCount()}function o(e,t){return t.edges().reduce((n,i)=>{let a=1/0;return e.hasNode(i.v)!==e.hasNode(i.w)&&(a=r(t,i)),a<n[0]?[a,i]:n},[1/0,null])[1]}function s(e,t,n){e.nodes().forEach(e=>t.node(e).rank+=n)}})),qw=o(((e,t)=>{var n=Kw(),r=Gw().slack,i=Gw().longestPath,a=zw().alg.preorder,o=zw().alg.postorder,s=Hw().simplify;t.exports=c,c.initLowLimValues=f,c.initCutValues=l,c.calcCutValue=d,c.leaveEdge=m,c.enterEdge=h,c.exchangeEdges=g;function c(e){e=s(e),i(e);var t=n(e);f(t),l(t,e);for(var r,a;r=m(t);)a=h(t,e,r),g(t,e,r,a)}function l(e,t){var n=o(e,e.nodes());n=n.slice(0,n.length-1),n.forEach(n=>u(e,t,n))}function u(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=d(e,t,n)}function d(e,t,n){var r=e.node(n).parent,i=!0,a=t.edge(n,r),o=0;return a||=(i=!1,t.edge(r,n)),o=a.weight,t.nodeEdges(n).forEach(a=>{var s=a.v===n,c=s?a.w:a.v;if(c!==r){var l=s===i,u=t.edge(a).weight;if(o+=l?u:-u,v(e,n,c)){var d=e.edge(n,c).cutvalue;o+=l?-d:d}}}),o}function f(e,t){arguments.length<2&&(t=e.nodes()[0]),p(e,{},1,t)}function p(e,t,n,r,i){var a=n,o=e.node(r);return t[r]=!0,e.neighbors(r).forEach(i=>{Object.hasOwn(t,i)||(n=p(e,t,n,i,r))}),o.low=a,o.lim=n++,i?o.parent=i:delete o.parent,n}function m(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function h(e,t,n){var i=n.v,a=n.w;t.hasEdge(i,a)||(i=n.w,a=n.v);var o=e.node(i),s=e.node(a),c=o,l=!1;return o.lim>s.lim&&(c=s,l=!0),t.edges().filter(t=>l===y(e,e.node(t.v),c)&&l!==y(e,e.node(t.w),c)).reduce((e,n)=>r(t,n)<r(t,e)?n:e)}function g(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),f(e),l(e,t),_(e,t)}function _(e,t){var n=a(e,e.nodes().find(e=>!t.node(e).parent));n=n.slice(1),n.forEach(n=>{var r=e.node(n).parent,i=t.edge(n,r),a=!1;i||(i=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?i.minlen:-i.minlen)})}function v(e,t,n){return e.hasEdge(t,n)}function y(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}})),Jw=o(((e,t)=>{var n=Gw().longestPath,r=Kw(),i=qw();t.exports=a;function a(e){var t=e.graph().ranker;if(t instanceof Function)return t(e);switch(e.graph().ranker){case`network-simplex`:c(e);break;case`tight-tree`:s(e);break;case`longest-path`:o(e);break;case`none`:break;default:c(e)}}var o=n;function s(e){n(e),r(e)}function c(e){i(e)}})),Yw=o(((e,t)=>{t.exports=n;function n(e){let t=i(e);e.graph().dummyChains.forEach(n=>{let i=e.node(n),a=i.edgeObj,o=r(e,t,a.v,a.w),s=o.path,c=o.lca,l=0,u=s[l],d=!0;for(;n!==a.w;){if(i=e.node(n),d){for(;(u=s[l])!==c&&e.node(u).maxRank<i.rank;)l++;u===c&&(d=!1)}if(!d){for(;l<s.length-1&&e.node(u=s[l+1]).minRank<=i.rank;)l++;u=s[l]}e.setParent(n,u),n=e.successors(n)[0]}})}function r(e,t,n,r){let i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c,l;c=n;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}function i(e){let t={},n=0;function r(i){let a=n;e.children(i).forEach(r),t[i]={low:a,lim:n++}}return e.children().forEach(r),t}})),Xw=o(((e,t)=>{var n=Hw();t.exports={run:r,cleanup:s};function r(e){let t=n.addDummyNode(e,`root`,{},`_root`),r=a(e),s=Object.values(r),c=n.applyWithChunking(Math.max,s)-1,l=2*c+1;e.graph().nestingRoot=t,e.edges().forEach(t=>e.edge(t).minlen*=l);let u=o(e)+1;e.children().forEach(n=>i(e,t,l,u,c,r,n)),e.graph().nodeRankFactor=l}function i(e,t,r,a,o,s,c){let l=e.children(c);if(!l.length){c!==t&&e.setEdge(t,c,{weight:0,minlen:r});return}let u=n.addBorderNode(e,`_bt`),d=n.addBorderNode(e,`_bb`),f=e.node(c);e.setParent(u,c),f.borderTop=u,e.setParent(d,c),f.borderBottom=d,l.forEach(n=>{i(e,t,r,a,o,s,n);let l=e.node(n),f=l.borderTop?l.borderTop:n,p=l.borderBottom?l.borderBottom:n,m=l.borderTop?a:2*a,h=f===p?o-s[c]+1:1;e.setEdge(u,f,{weight:m,minlen:h,nestingEdge:!0}),e.setEdge(p,d,{weight:m,minlen:h,nestingEdge:!0})}),e.parent(c)||e.setEdge(t,u,{weight:0,minlen:o+s[c]})}function a(e){var t={};function n(r,i){var a=e.children(r);a&&a.length&&a.forEach(e=>n(e,i+1)),t[r]=i}return e.children().forEach(e=>n(e,1)),t}function o(e){return e.edges().reduce((t,n)=>t+e.edge(n).weight,0)}function s(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(t=>{e.edge(t).nestingEdge&&e.removeEdge(t)})}})),Zw=o(((e,t)=>{var n=Hw();t.exports=r;function r(e){function t(n){let r=e.children(n),a=e.node(n);if(r.length&&r.forEach(t),Object.hasOwn(a,`minRank`)){a.borderLeft=[],a.borderRight=[];for(let t=a.minRank,r=a.maxRank+1;t<r;++t)i(e,`borderLeft`,`_bl`,n,a,t),i(e,`borderRight`,`_br`,n,a,t)}}e.children().forEach(t)}function i(e,t,r,i,a,o){let s={width:0,height:0,rank:o,borderType:t},c=a[t][o-1],l=n.addDummyNode(e,`border`,s,r);a[t][o]=l,e.setParent(l,i),c&&e.setEdge(c,l,{weight:1})}})),Qw=o(((e,t)=>{t.exports={adjust:n,undo:r};function n(e){let t=e.graph().rankdir.toLowerCase();(t===`lr`||t===`rl`)&&i(e)}function r(e){let t=e.graph().rankdir.toLowerCase();(t===`bt`||t===`rl`)&&o(e),(t===`lr`||t===`rl`)&&(c(e),i(e))}function i(e){e.nodes().forEach(t=>a(e.node(t))),e.edges().forEach(t=>a(e.edge(t)))}function a(e){let t=e.width;e.width=e.height,e.height=t}function o(e){e.nodes().forEach(t=>s(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(s),Object.hasOwn(n,`y`)&&s(n)})}function s(e){e.y=-e.y}function c(e){e.nodes().forEach(t=>l(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(l),Object.hasOwn(n,`x`)&&l(n)})}function l(e){let t=e.x;e.x=e.y,e.y=t}})),$w=o(((e,t)=>{var n=Hw();t.exports=r;function r(e){let t={},r=e.nodes().filter(t=>!e.children(t).length),i=r.map(t=>e.node(t).rank),a=n.applyWithChunking(Math.max,i),o=n.range(a+1).map(()=>[]);function s(n){if(t[n])return;t[n]=!0;let r=e.node(n);o[r.rank].push(n),e.successors(n).forEach(s)}return r.sort((t,n)=>e.node(t).rank-e.node(n).rank).forEach(s),o}})),eT=o(((e,t)=>{var n=Hw().zipObject;t.exports=r;function r(e,t){let n=0;for(let r=1;r<t.length;++r)n+=i(e,t[r-1],t[r]);return n}function i(e,t,r){let i=n(r,r.map((e,t)=>t)),a=t.flatMap(t=>e.outEdges(t).map(t=>({pos:i[t.w],weight:e.edge(t).weight})).sort((e,t)=>e.pos-t.pos)),o=1;for(;o<r.length;)o<<=1;let s=2*o-1;--o;let c=Array(s).fill(0),l=0;return a.forEach(e=>{let t=e.pos+o;c[t]+=e.weight;let n=0;for(;t>0;)t%2&&(n+=c[t+1]),t=t-1>>1,c[t]+=e.weight;l+=e.weight*n}),l}})),tT=o(((e,t)=>{t.exports=n;function n(e,t=[]){return t.map(t=>{let n=e.inEdges(t);if(n.length){let r=n.reduce((t,n)=>{let r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}return{v:t}})}})),nT=o(((e,t)=>{var n=Hw();t.exports=r;function r(e,t){let n={};return e.forEach((e,t)=>{let r=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};e.barycenter!==void 0&&(r.barycenter=e.barycenter,r.weight=e.weight)}),t.edges().forEach(e=>{let t=n[e.v],r=n[e.w];t!==void 0&&r!==void 0&&(r.indegree++,t.out.push(n[e.w]))}),i(Object.values(n).filter(e=>!e.indegree))}function i(e){let t=[];function r(e){return t=>{t.merged||(t.barycenter===void 0||e.barycenter===void 0||t.barycenter>=e.barycenter)&&a(e,t)}}function i(t){return n=>{n.in.push(t),--n.indegree===0&&e.push(n)}}for(;e.length;){let n=e.pop();t.push(n),n.in.reverse().forEach(r(n)),n.out.forEach(i(n))}return t.filter(e=>!e.merged).map(e=>n.pick(e,[`vs`,`i`,`barycenter`,`weight`]))}function a(e,t){let n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}})),rT=o(((e,t)=>{var n=Hw();t.exports=r;function r(e,t){let r=n.partition(e,e=>Object.hasOwn(e,`barycenter`)),o=r.lhs,s=r.rhs.sort((e,t)=>t.i-e.i),c=[],l=0,u=0,d=0;o.sort(a(!!t)),d=i(c,s,d),o.forEach(e=>{d+=e.vs.length,c.push(e.vs),l+=e.barycenter*e.weight,u+=e.weight,d=i(c,s,d)});let f={vs:c.flat(!0)};return u&&(f.barycenter=l/u,f.weight=u),f}function i(e,t,n){let r;for(;t.length&&(r=t[t.length-1]).i<=n;)t.pop(),e.push(r.vs),n++;return n}function a(e){return(t,n)=>t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}})),iT=o(((e,t)=>{var n=tT(),r=nT(),i=rT();t.exports=a;function a(e,t,c,l){let u=e.children(t),d=e.node(t),f=d?d.borderLeft:void 0,p=d?d.borderRight:void 0,m={};f&&(u=u.filter(e=>e!==f&&e!==p));let h=n(e,u);h.forEach(t=>{if(e.children(t.v).length){let n=a(e,t.v,c,l);m[t.v]=n,Object.hasOwn(n,`barycenter`)&&s(t,n)}});let g=r(h,c);o(g,m);let _=i(g,l);if(f&&(_.vs=[f,_.vs,p].flat(!0),e.predecessors(f).length)){let t=e.node(e.predecessors(f)[0]),n=e.node(e.predecessors(p)[0]);Object.hasOwn(_,`barycenter`)||(_.barycenter=0,_.weight=0),_.barycenter=(_.barycenter*_.weight+t.order+n.order)/(_.weight+2),_.weight+=2}return _}function o(e,t){e.forEach(e=>{e.vs=e.vs.flatMap(e=>t[e]?t[e].vs:e)})}function s(e,t){e.barycenter===void 0?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}})),aT=o(((e,t)=>{var n=zw().Graph,r=Hw();t.exports=i;function i(e,t,r,i){i||=e.nodes();let o=a(e),s=new n({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(t=>e.node(t));return i.forEach(n=>{let i=e.node(n),a=e.parent(n);(i.rank===t||i.minRank<=t&&t<=i.maxRank)&&(s.setNode(n),s.setParent(n,a||o),e[r](n).forEach(t=>{let r=t.v===n?t.w:t.v,i=s.edge(r,n),a=i===void 0?0:i.weight;s.setEdge(r,n,{weight:e.edge(t).weight+a})}),Object.hasOwn(i,`minRank`)&&s.setNode(n,{borderLeft:i.borderLeft[t],borderRight:i.borderRight[t]}))}),s}function a(e){for(var t;e.hasNode(t=r.uniqueId(`_root`)););return t}})),oT=o(((e,t)=>{t.exports=n;function n(e,t,n){let r={},i;n.forEach(n=>{let a=e.parent(n),o,s;for(;a;){if(o=e.parent(a),o?(s=r[o],r[o]=a):(s=i,i=a),s&&s!==a){t.setEdge(s,a);return}a=o}})}})),sT=o(((e,t)=>{var n=$w(),r=eT(),i=iT(),a=aT(),o=oT(),s=zw().Graph,c=Hw();t.exports=l;function l(e,t){if(t&&typeof t.customOrder==`function`){t.customOrder(e,l);return}let i=c.maxRank(e),a=u(e,c.range(1,i+1),`inEdges`),o=u(e,c.range(i-1,-1,-1),`outEdges`),s=n(e);if(f(e,s),t&&t.disableOptimalOrderHeuristic)return;let p=1/0,m;for(let t=0,n=0;n<4;++t,++n){d(t%2?a:o,t%4>=2),s=c.buildLayerMatrix(e);let i=r(e,s);i<p&&(n=0,m=Object.assign({},s),p=i)}f(e,m)}function u(e,t,n){let r=new Map,i=(e,t)=>{r.has(e)||r.set(e,[]),r.get(e).push(t)};for(let t of e.nodes()){let n=e.node(t);if(typeof n.rank==`number`&&i(n.rank,t),typeof n.minRank==`number`&&typeof n.maxRank==`number`)for(let e=n.minRank;e<=n.maxRank;e++)e!==n.rank&&i(e,t)}return t.map(function(t){return a(e,t,n,r.get(t)||[])})}function d(e,t){let n=new s;e.forEach(function(e){let r=e.graph().root,a=i(e,r,n,t);a.vs.forEach((t,n)=>e.node(t).order=n),o(e,n,a.vs)})}function f(e,t){Object.values(t).forEach(t=>t.forEach((t,n)=>e.node(t).order=n))}})),cT=o(((e,t)=>{var n=zw().Graph,r=Hw();t.exports={positionX:h,findType1Conflicts:i,findType2Conflicts:a,addConflict:s,hasConflict:c,verticalAlignment:l,horizontalCompaction:u,alignCoordinates:p,findSmallestWidthAlignment:f,balance:m};function i(e,t){let n={};function r(t,r){let i=0,a=0,c=t.length,l=r[r.length-1];return r.forEach((t,u)=>{let d=o(e,t),f=d?e.node(d).order:c;(d||t===l)&&(r.slice(a,u+1).forEach(t=>{e.predecessors(t).forEach(r=>{let a=e.node(r),o=a.order;(o<i||f<o)&&!(a.dummy&&e.node(t).dummy)&&s(n,r,t)})}),a=u+1,i=f)}),r}return t.length&&t.reduce(r),n}function a(e,t){let n={};function i(t,i,a,o,c){let l;r.range(i,a).forEach(r=>{l=t[r],e.node(l).dummy&&e.predecessors(l).forEach(t=>{let r=e.node(t);r.dummy&&(r.order<o||r.order>c)&&s(n,t,l)})})}function a(t,n){let r=-1,a,o=0;return n.forEach((s,c)=>{if(e.node(s).dummy===`border`){let t=e.predecessors(s);t.length&&(a=e.node(t[0]).order,i(n,o,c,r,a),o=c,r=a)}i(n,o,n.length,a,t.length)}),n}return t.length&&t.reduce(a),n}function o(e,t){if(e.node(t).dummy)return e.predecessors(t).find(t=>e.node(t).dummy)}function s(e,t,n){if(t>n){let e=t;t=n,n=e}let r=e[t];r||(e[t]=r={}),r[n]=!0}function c(e,t,n){if(t>n){let e=t;t=n,n=e}return!!e[t]&&Object.hasOwn(e[t],n)}function l(e,t,n,r){let i={},a={},o={};return t.forEach(e=>{e.forEach((e,t)=>{i[e]=e,a[e]=e,o[e]=t})}),t.forEach(e=>{let t=-1;e.forEach(e=>{let s=r(e);if(s.length){s=s.sort((e,t)=>o[e]-o[t]);let r=(s.length-1)/2;for(let l=Math.floor(r),u=Math.ceil(r);l<=u;++l){let r=s[l];a[e]===e&&t<o[r]&&!c(n,e,r)&&(a[r]=e,a[e]=i[e]=i[r],t=o[r])}}})}),{root:i,align:a}}function u(e,t,n,r,i){let a={},o=d(e,t,n,i),s=i?`borderLeft`:`borderRight`;function c(e,t){let n=o.nodes(),r=n.pop(),i={};for(;r;)i[r]?e(r):(i[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}function l(e){a[e]=o.inEdges(e).reduce((e,t)=>Math.max(e,a[t.v]+o.edge(t)),0)}function u(t){let n=o.outEdges(t).reduce((e,t)=>Math.min(e,a[t.w]-o.edge(t)),1/0),r=e.node(t);n!==1/0&&r.borderType!==s&&(a[t]=Math.max(a[t],n))}return c(l,o.predecessors.bind(o)),c(u,o.successors.bind(o)),Object.keys(r).forEach(e=>a[e]=a[n[e]]),a}function d(e,t,r,i){let a=new n,o=e.graph(),s=g(o.nodesep,o.edgesep,i);return t.forEach(t=>{let n;t.forEach(t=>{let i=r[t];if(a.setNode(i),n){var o=r[n],c=a.edge(o,i);a.setEdge(o,i,Math.max(s(e,t,n),c||0))}n=t})}),a}function f(e,t){return Object.values(t).reduce((t,n)=>{let r=-1/0,i=1/0;Object.entries(n).forEach(([t,n])=>{let a=_(e,t)/2;r=Math.max(n+a,r),i=Math.min(n-a,i)});let a=r-i;return a<t[0]&&(t=[a,n]),t},[1/0,null])[1]}function p(e,t){let n=Object.values(t),i=r.applyWithChunking(Math.min,n),a=r.applyWithChunking(Math.max,n);[`u`,`d`].forEach(n=>{[`l`,`r`].forEach(o=>{let s=n+o,c=e[s];if(c===t)return;let l=Object.values(c),u=i-r.applyWithChunking(Math.min,l);o!==`l`&&(u=a-r.applyWithChunking(Math.max,l)),u&&(e[s]=r.mapValues(c,e=>e+u))})})}function m(e,t){return r.mapValues(e.ul,(n,r)=>{if(t)return e[t.toLowerCase()][r];{let t=Object.values(e).map(e=>e[r]).sort((e,t)=>e-t);return(t[1]+t[2])/2}})}function h(e){let t=r.buildLayerMatrix(e),n=Object.assign(i(e,t),a(e,t)),o={},s;return[`u`,`d`].forEach(i=>{s=i===`u`?t:Object.values(t).reverse(),[`l`,`r`].forEach(t=>{t===`r`&&(s=s.map(e=>Object.values(e).reverse()));let a=(i===`u`?e.predecessors:e.successors).bind(e),c=l(e,s,n,a),d=u(e,s,c.root,c.align,t===`r`);t===`r`&&(d=r.mapValues(d,e=>-e)),o[i+t]=d})}),p(o,f(e,o)),m(o,e.graph().align)}function g(e,t,n){return(r,i,a)=>{let o=r.node(i),s=r.node(a),c=0,l;if(c+=o.width/2,Object.hasOwn(o,`labelpos`))switch(o.labelpos.toLowerCase()){case`l`:l=-o.width/2;break;case`r`:l=o.width/2}if(l&&(c+=n?l:-l),l=0,c+=(o.dummy?t:e)/2,c+=(s.dummy?t:e)/2,c+=s.width/2,Object.hasOwn(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:l=s.width/2;break;case`r`:l=-s.width/2}return l&&(c+=n?l:-l),l=0,c}}function _(e,t){return e.node(t).width}})),lT=o(((e,t)=>{var n=Hw(),r=cT().positionX;t.exports=i;function i(e){e=n.asNonCompoundGraph(e),a(e),Object.entries(r(e)).forEach(([t,n])=>e.node(t).x=n)}function a(e){let t=n.buildLayerMatrix(e),r=e.graph().ranksep,i=0;t.forEach(t=>{let n=t.reduce((t,n)=>{let r=e.node(n).height;return t>r?t:r},0);t.forEach(t=>e.node(t).y=i+n/2),i+=n+r})}})),uT=o(((e,t)=>{var n=Uw(),r=Ww(),i=Jw(),a=Hw().normalizeRanks,o=Yw(),s=Hw().removeEmptyRanks,c=Xw(),l=Zw(),u=Qw(),d=sT(),f=lT(),p=Hw(),m=zw().Graph;t.exports=h;function h(e,t){let n=t&&t.debugTiming?p.time:p.notime;n(`layout`,()=>{let r=n(` buildLayoutGraph`,()=>E(e));n(` runLayout`,()=>g(r,n,t)),n(` updateInputGraph`,()=>_(e,r))})}function g(e,t,m){t(` makeSpaceForEdgeLabels`,()=>D(e)),t(` removeSelfEdges`,()=>I(e)),t(` acyclic`,()=>n.run(e)),t(` nestingGraph.run`,()=>c.run(e)),t(` rank`,()=>i(p.asNonCompoundGraph(e))),t(` injectEdgeLabelProxies`,()=>O(e)),t(` removeEmptyRanks`,()=>s(e)),t(` nestingGraph.cleanup`,()=>c.cleanup(e)),t(` normalizeRanks`,()=>a(e)),t(` assignRankMinMax`,()=>k(e)),t(` removeEdgeLabelProxies`,()=>A(e)),t(` normalize.run`,()=>r.run(e)),t(` parentDummyChains`,()=>o(e)),t(` addBorderSegments`,()=>l(e)),t(` order`,()=>d(e,m)),t(` insertSelfEdges`,()=>ee(e)),t(` adjustCoordinateSystem`,()=>u.adjust(e)),t(` position`,()=>f(e)),t(` positionSelfEdges`,()=>te(e)),t(` removeBorderNodes`,()=>F(e)),t(` normalize.undo`,()=>r.undo(e)),t(` fixupEdgeLabelCoords`,()=>N(e)),t(` undoCoordinateSystem`,()=>u.undo(e)),t(` translateGraph`,()=>j(e)),t(` assignNodeIntersects`,()=>M(e)),t(` reversePoints`,()=>P(e)),t(` acyclic.undo`,()=>n.undo(e))}function _(e,t){e.nodes().forEach(n=>{let r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,r.rank=i.rank,t.children(n).length&&(r.width=i.width,r.height=i.height))}),e.edges().forEach(n=>{let r=e.edge(n),i=t.edge(n);r.points=i.points,Object.hasOwn(i,`x`)&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var v=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],y={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},b=[`acyclicer`,`ranker`,`rankdir`,`align`],x=[`width`,`height`,`rank`],S={width:0,height:0},C=[`minlen`,`weight`,`width`,`height`,`labeloffset`],w={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},T=[`labelpos`];function E(e){let t=new m({multigraph:!0,compound:!0}),n=ne(e.graph());return t.setGraph(Object.assign({},y,L(n,v),p.pick(n,b))),e.nodes().forEach(n=>{let r=L(ne(e.node(n)),x);Object.keys(S).forEach(e=>{r[e]===void 0&&(r[e]=S[e])}),t.setNode(n,r),t.setParent(n,e.parent(n))}),e.edges().forEach(n=>{let r=ne(e.edge(n));t.setEdge(n,Object.assign({},w,L(r,C),p.pick(r,T)))}),t}function D(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(n=>{let r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!==`c`&&(t.rankdir===`TB`||t.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function O(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.width&&n.height){let n=e.node(t.v),r={rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t};p.addDummyNode(e,`edge-proxy`,r,`_ep`)}})}function k(e){let t=0;e.nodes().forEach(n=>{let r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=Math.max(t,r.maxRank))}),e.graph().maxRank=t}function A(e){e.nodes().forEach(t=>{let n=e.node(t);n.dummy===`edge-proxy`&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function j(e){let t=1/0,n=0,r=1/0,i=0,a=e.graph(),o=a.marginx||0,s=a.marginy||0;function c(e){let a=e.x,o=e.y,s=e.width,c=e.height;t=Math.min(t,a-s/2),n=Math.max(n,a+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}e.nodes().forEach(t=>c(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);Object.hasOwn(n,`x`)&&c(n)}),t-=o,r-=s,e.nodes().forEach(n=>{let i=e.node(n);i.x-=t,i.y-=r}),e.edges().forEach(n=>{let i=e.edge(n);i.points.forEach(e=>{e.x-=t,e.y-=r}),Object.hasOwn(i,`x`)&&(i.x-=t),Object.hasOwn(i,`y`)&&(i.y-=r)}),a.width=n-t+o,a.height=i-r+s}function M(e){e.edges().forEach(t=>{let n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(p.intersectRect(r,a)),n.points.push(p.intersectRect(i,o))})}function N(e){e.edges().forEach(t=>{let n=e.edge(t);if(Object.hasOwn(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset}})}function P(e){e.edges().forEach(t=>{let n=e.edge(t);n.reversed&&n.points.reverse()})}function F(e){e.nodes().forEach(t=>{if(e.children(t).length){let n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(n.borderLeft[n.borderLeft.length-1]),o=e.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy===`border`&&e.removeNode(t)})}function I(e){e.edges().forEach(t=>{if(t.v===t.w){var n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function ee(e){p.buildLayerMatrix(e).forEach(t=>{var n=0;t.forEach((t,r)=>{var i=e.node(t);i.order=r+n,(i.selfEdges||[]).forEach(t=>{p.addDummyNode(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:i.rank,order:r+ ++n,e:t.e,label:t.label},`_se`)}),delete i.selfEdges})})}function te(e){e.nodes().forEach(t=>{var n=e.node(t);if(n.dummy===`selfedge`){var r=e.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function L(e,t){return p.mapValues(p.pick(e,t),Number)}function ne(e){var t={};return e&&Object.entries(e).forEach(([e,n])=>{typeof e==`string`&&(e=e.toLowerCase()),t[e]=n}),t}})),dT=o(((e,t)=>{var n=Hw(),r=zw().Graph;t.exports={debugOrdering:i};function i(e){let t=n.buildLayerMatrix(e),i=new r({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(t=>{i.setNode(t,{label:t}),i.setParent(t,`layer`+e.node(t).rank)}),e.edges().forEach(e=>i.setEdge(e.v,e.w,{},e.name)),t.forEach((e,t)=>{let n=`layer`+t;i.setNode(n,{rank:`same`}),e.reduce((e,t)=>(i.setEdge(e,t,{style:`invis`}),t))}),i}})),fT=o(((e,t)=>{t.exports=`1.1.8`})),pT=l(o(((e,t)=>{t.exports={graphlib:zw(),layout:uT(),debug:dT(),util:{time:Hw().time,notime:Hw().notime},version:fT()}}))(),1),mT=(e,t)=>`elsewhere:${e}:${t}`,hT=e=>`elsewhere:${e}`;function gT(e){return e.flatMap(e=>e.deps.flatMap(t=>{let n=yw(t);return n===null?[]:[{ghostId:mT(n.project,n.ref),...n,dependent:e.id}]}))}var _T=[`#4f9dff`,`#f472b6`,`#34d399`,`#fb923c`,`#a884f3`,`#22d3ee`,`#fbbf24`,`#f87171`,`#a3e635`,`#e879f9`],vT=[`#9ec9ff`,`#f9b1d7`,`#8fe7c7`,`#fdc394`,`#cfbbf8`,`#85e7f6`,`#fddc87`,`#fbb1b1`,`#ccf190`,`#f2b5fc`];function yT(e){let t=2166136261;for(let n=0;n<e.length;n++)t=Math.imul(t^e.charCodeAt(n),16777619);return(t>>>0)%_T.length}function bT(e,t=[]){let n=new Set(e),r=[...t.filter(e=>n.has(e)),...e.filter(e=>!t.includes(e))],i=[..._T,...vT],a=new Set,o={};for(let e of new Set(r)){let t=yT(e),n=Array.from({length:i.length},(e,n)=>n<_T.length?(t+n)%_T.length:_T.length+(t+n)%_T.length).find(e=>!a.has(e))??t;a.add(n),o[e]=i[n]}return o}var xT=212,ST=62,CT=3,wT=13,TT=17,ET=184,DT=42,OT=e=>` `.includes(e)?.28:"iljI.,:;'!|`".includes(e)?.3:`frt()[]{}-/\\"`.includes(e)?.4:`mwMW@%`.includes(e)?.9:e>=`A`&&e<=`Z`?.72:e>=`0`&&e<=`9`?.6:.57,kT=e=>[...e].reduce((e,t)=>e+OT(t),0)*wT*1.06;function AT(e){let t=1,n=0;for(let r of e.split(/\s+/).filter(Boolean)){let e=kT(r),i=n===0?e:n+kT(` `)+e;i<=ET?n=i:(t+=n===0?0:1,t+=Math.floor(e/ET),n=e%ET)}return Math.min(t,CT)}var jT=e=>Math.max(ST,DT+AT(e.title)*TT),MT=34,NT=18,PT=46,FT=20,IT=68,LT={width:248,height:104},RT=e=>`area:${e}`,zT=34,BT=12,VT=92,HT=10,UT=e=>Math.round(e/HT)*HT,WT=e=>Math.ceil(e/HT)*HT,GT=30,KT=(e,t)=>e.filter(e=>e.parent===t),qT=(e,t)=>e===t||e.startsWith(`${t}.`)||t.startsWith(`${e}.`);function JT(e,t,n){let r=KT(t,e.id);if(r.length===0)return{width:xT,height:jT(e)};let i=tE(r,t,n).box;return{width:i.width,height:i.height}}function YT(e,t,n){let r=new pT.default.graphlib.Graph;r.setGraph({rankdir:`LR`,nodesep:GT,ranksep:VT}),r.setDefaultEdgeLabel(()=>({}));for(let t of e){let e=n.get(t.id);r.setNode(t.id,{width:e.width,height:e.height})}for(let[e,n]of t)r.setEdge(e,n);pT.default.layout(r);let i=new Map,a=1/0,o=1/0;for(let t of e){let e=r.node(t.id),s=n.get(t.id),c=e.x-s.width/2,l=e.y-s.height/2;i.set(t.id,{x:c,y:l,width:s.width,height:s.height}),a=Math.min(a,c),o=Math.min(o,l)}let s=0,c=0;for(let e of i.values())e.x-=a,e.y-=o,s=Math.max(s,e.x+e.width),c=Math.max(c,e.y+e.height);return{placements:i,extent:{width:s,height:c}}}function XT(e,t,n){let r=new Map,i=0,a=0,o=0,s=0;for(let c of e)i>0&&i+c.width>t&&(a+=o+n,i=0,o=0),r.set(c.id,{x:i,y:a,width:c.width,height:c.height}),i+=c.width+n,s=Math.max(s,i-n),o=Math.max(o,c.height);return{placements:r,extent:{width:s,height:a+o}}}function ZT(e,t,n){let r=Math.max(t,...e.map(e=>e.width)),i=[{x:0,y:0,width:r}],a=new Map,o=[...e].sort((e,t)=>t.height-e.height||t.width-e.width);for(let e of o){let t=null;for(let n of i){let a=n.x;if(a+e.width>r)continue;let o=0;for(let t of i)t.x+t.width<=a||t.x>=a+e.width||(o=Math.max(o,t.y));(t===null||o<t.y||o===t.y&&a<t.x)&&(t={x:a,y:o})}let o=t??{x:0,y:0};a.set(e.id,{x:o.x,y:o.y,width:e.width,height:e.height}),i=QT(i,o.x,e.width+n,o.y+e.height+n)}let s=0,c=0;for(let e of a.values())s=Math.max(s,e.x+e.width),c=Math.max(c,e.y+e.height);return{placements:a,extent:{width:s,height:c}}}function QT(e,t,n,r){let i=t+n,a=[];for(let n of e){let e=n.x+n.width;e<=t||n.x>=i?a.push(n):(n.x<t&&a.push({x:n.x,y:n.y,width:t-n.x}),e>i&&a.push({x:i,y:n.y,width:e-i}))}a.push({x:t,y:r,width:n}),a.sort((e,t)=>e.x-t.x);let o=[];for(let e of a){let t=o[o.length-1];t&&t.y===e.y&&t.x+t.width===e.x?t.width+=e.width:o.push({...e})}return o}function $T(e,t,n=2.8){let r=e.reduce((e,n)=>e+(n.width+t)*(n.height+t),0),i=Math.max(...e.map(e=>e.width));return Math.max(i,Math.sqrt(r*n))}function eE(e,t){let n=new Set(e.map(e=>e.id)),r=e.flatMap(e=>e.deps.filter(e=>n.has(e)).map(t=>[t,e.id])),i=new Set(r.flat()),a=e.filter(e=>i.has(e.id)),o=e.filter(e=>!i.has(e.id)),s=new Map,c=a.length>0?YT(a,r,t):{placements:new Map,extent:{width:0,height:0}};for(let[e,t]of c.placements)s.set(e,t);if(o.length>0){let e=o.map(e=>({id:e.id,...t.get(e.id)})),n=XT(e,Math.max(c.extent.width,$T(e,MT)),MT),r=a.length>0?c.extent.height+MT:0;for(let[e,t]of n.placements)s.set(e,{...t,y:t.y+r})}return s}function tE(e,t,n){let r=new Map(e.map(e=>[e.id,JT(e,t,n)])),i=new Set(e.map(e=>e.id)),a=aE(e.map(e=>({id:e.id,...r.get(e.id),deps:e.deps.filter(e=>i.has(e))})),e=>n[e],MT,2.8,()=>eE(e,r));return{placements:a,box:dE(a)}}var nE=e=>e===`x`?`width`:`height`,rE=e=>e===`x`?`y`:`x`,iE=(e,t,n,r)=>e[n]+e[nE(n)]+r>t[n]&&t[n]+t[nE(n)]+r>e[n];function aE(e,t,n,r,i,a=`after-previous`){let o=e.some(e=>t(e.id)!==void 0)?null:i(),s=new Map;for(let n of e){let e=o?o.get(n.id):t(n.id);e&&s.set(n.id,{id:n.id,x:UT(e.x),y:UT(e.y),width:n.width,height:n.height})}let c=new Set,l=$T(e,n,r);e.forEach((t,r)=>{if(s.has(t.id))return;c.add(t.id);let i=a===`best-fit`?sE(t,s,n,l):oE(t,e.slice(0,r),s,n,l);s.set(t.id,{id:t.id,x:WT(i.x),y:WT(i.y),width:t.width,height:t.height})});let u=[...s.values()];return cE(u,n,c),lE(u,n),new Map(u.map(({id:e,...t})=>[e,t]))}function oE(e,t,n,r,i){let a=e.deps.flatMap(e=>n.get(e)??[]);if(a.length>0){let e=a.reduce((e,t)=>t.x+t.width>e.x+e.width?t:e);return{x:e.x+e.width+r,y:e.y}}let o=[...t].reverse().flatMap(e=>n.get(e.id)??[])[0];return o&&o.x+o.width+r+e.width<=i?{x:o.x+o.width+r,y:o.y}:{x:0,y:Math.max(-r,...[...n.values()].map(e=>e.y+e.height))+r}}function sE(e,t,n,r){let i=[...t.values()],a=Math.max(0,...i.map(e=>e.x+e.width)),o=Math.max(0,...i.map(e=>e.y+e.height)),s=[{x:0,y:0},...i.flatMap(e=>[{x:e.x+e.width+n,y:e.y},{x:e.x,y:e.y+e.height+n}])],c=null;for(let t of s){let s={id:e.id,...t,width:e.width,height:e.height};if(i.some(e=>iE(s,e,`x`,n)&&iE(s,e,`y`,n)))continue;let l=Math.max(a,t.x+e.width),u=l*Math.max(o,t.y+e.height)*(l>r?4:1);(c===null||u<c.score||u===c.score&&(t.y<c.y||t.y===c.y&&t.x<c.x))&&(c={...t,score:u})}return c??{x:0,y:o+n}}function cE(e,t,n){for(let r=0;r<=e.length*e.length;r++){let r=null;search:for(let n=0;n<e.length;n++)for(let i=n+1;i<e.length;i++)if(iE(e[n],e[i],`x`,t)&&iE(e[n],e[i],`y`,t)){r=[e[n],e[i]];break search}if(r===null)return;let[i,a]=r,o=e=>{let[r,o]=i[e]<a[e]||i[e]===a[e]&&(n.has(i.id)||!n.has(a.id))?[i,a]:[a,i];return{axis:e,stays:r,moves:o,by:WT(r[e]+r[nE(e)]+t-o[e])}},s=e=>(Math.min(i[e]+i[nE(e)],a[e]+a[nE(e)])+t-Math.max(i[e],a[e]))/(Math.min(i[nE(e)],a[nE(e)])+t),{axis:c,stays:l,moves:u,by:d}=s(`x`)<=s(`y`)?o(`x`):o(`y`),f=u[c];for(let t of e)t!==l&&t[c]>=f&&(t[c]+=d)}}function lE(e,t){for(let n=0;n<32;n++){let n=e.map(e=>e.x+e.y*1e6);if(uE(e,`x`,t),uE(e,`y`,t),e.every((e,t)=>e.x+e.y*1e6===n[t]))return}}function uE(e,t,n){let r=rE(t),i=[...e].sort((e,n)=>e[t]-n[t]),a=new Map(i.map(e=>[e,e[t]])),o=[];for(let e of i){let i=0;for(let s of o)i=Math.max(i,s[t]+(a.get(s)<a.get(e)?HT:0)),iE(e,s,r,n)&&(i=Math.max(i,s[t]+s[nE(t)]+n));e[t]=WT(i),o.push(e)}}function dE(e){let t=0,n=0;for(let r of e.values())t=Math.max(t,r.x+r.width),n=Math.max(n,r.y+r.height);return{width:t+36,height:n+PT+FT}}function fE(e,t){let n=e=>e.split(`-`)[0]??e,r=new Map;for(let e of t)for(let t of e.deps){let i=yw(t),[a,o]=[i===null?n(t):hT(i.project),n(e.id)];if(a!==o){let e=r.get(o)??new Set;e.add(a),r.set(o,e)}}let i=new Map(e.map(e=>[e.area,e])),a=new Set,o=[],s=e=>{let t=i.get(e);if(t&&!a.has(e)){a.add(e);for(let t of r.get(e)??[])s(t);o.push(t)}};for(let t of e)s(t.area);return o}function pE(e,t,n,r,i,a,o={},s=new Set){let c=new Set(e.map(e=>e.id)),l=e.flatMap(e=>e.deps.filter(t=>c.has(t)&&!qT(t,e.id)).map(t=>({id:`${t}->${e.id}`,source:t,target:e.id}))),u=new Map;for(let t of gT(e))c.has(t.dependent)&&u.set(t.ghostId,[...u.get(t.ghostId)??[],t.dependent]);let d=[...u].flatMap(([e,t])=>t.map(t=>({source:e,target:t}))),f=new Map(e.map(e=>[e.id,e.parent])),p=i?new Set([i,...[...l,...d].filter(e=>e.source===i||e.target===i).flatMap(e=>[e.source,e.target])].flatMap(e=>{let t=[e];for(let n=f.get(e);n;n=f.get(n))t.push(n);return t})):null,m=e=>e.split(`-`)[0]??e,h=new Set(e.filter(e=>e.status===`done`).map(e=>e.id)),g=new Set,_=new Set;for(let e of l){let t=a.has(e.source)||a.has(e.target),n=m(e.source)!==m(e.target)&&h.has(e.source);(t||n)&&(a.has(e.source)||_.add(e.source),a.has(e.target)||g.add(e.target))}let v=e=>r===`area`?n[e.area]??`#94a3b8`:gw[e.status]?.colour??`#94a3b8`,y=e=>({item:e,colour:v(e),statusColour:gw[e.status]?.colour??`#94a3b8`,selected:e.id===i,dimmed:p?!p.has(e.id):!1,hiddenLinkIn:g.has(e.id),hiddenLinkOut:_.has(e.id)}),b=(t,n)=>{let{placements:r,box:i}=tE(n,e,o);return{nodes:n.flatMap(n=>{let i=r.get(n.id),o={x:NT+i.x,y:PT+i.y},s=KT(e,n.id);if(s.length>0){let e=b(n.id,s);return[{id:n.id,type:`ticket`,parentId:t,position:o,hidden:a.has(n.id),style:{width:e.box.width,height:e.box.height},data:{...y(n),count:s.length},zIndex:1},...e.nodes]}return[{id:n.id,type:`item`,parentId:t,position:o,hidden:a.has(n.id),style:{width:xT,height:jT(n)},data:y(n),zIndex:3}]}),box:i}},x=t.flatMap(t=>{let n=e.filter(e=>e.area===t&&e.parent===null);if(n.length===0)return[];if(s.has(t))return[{area:t,inner:{nodes:[],box:LT},size:LT}];let r=b(`area:${t}`,n);return[{area:t,inner:r,size:r.box}]}),S=fE([...[...new Set([...u.keys()].map(e=>e.split(`:`)[1]))].sort().map(e=>{let t=[...u.keys()].filter(t=>t.startsWith(`elsewhere:${e}:`)).map(t=>t.slice(`elsewhere:${e}:`.length)).sort(),n=t.map((t,n)=>{let r=mT(e,t);return{id:r,type:`ghost`,parentId:`area:${hT(e)}`,position:{x:NT,y:PT+n*46},hidden:(u.get(r)??[]).every(e=>a.has(e)),data:{project:e,ref:t,dimmed:p?!p.has(r):!1},style:{width:xT,height:zT},zIndex:3}}),r={width:248,height:PT+t.length*zT+(t.length-1)*BT+FT};return{area:hT(e),foreign:e,inner:{nodes:n,box:r},size:r}}),...x],e),C=S.map(e=>({id:e.area,...e.size})),w={placements:aE(C.map(e=>({...e,deps:[]})),e=>o[`area:${e}`],IT,1.6,()=>ZT(C,$T(C,IT,1.6),IT).placements,`best-fit`)};return S.flatMap(t=>{let r=w.placements.get(t.area);if(t.foreign!==void 0)return[{id:`area:${t.area}`,type:`area`,position:{x:r.x,y:r.y},hidden:t.inner.nodes.every(e=>e.hidden===!0),data:{area:t.foreign,colour:`#64748b`,count:t.inner.nodes.length,foreign:!0},style:{width:t.size.width,height:t.size.height},zIndex:0},...t.inner.nodes];let i=e.filter(e=>e.area===t.area);if(s.has(t.area)){let e=new Map;for(let t of i)e.set(t.status,(e.get(t.status)??0)+1);return[{id:RT(t.area),type:`area`,position:{x:r.x,y:r.y},hidden:i.every(e=>a.has(e.id)),data:{area:t.area,colour:n[t.area]??`#94a3b8`,count:i.length,collapsed:{byStatus:Object.keys(gw).flatMap(t=>e.has(t)?[[t,e.get(t)]]:[])}},style:{width:LT.width,height:LT.height},zIndex:3}]}return[{id:`area:${t.area}`,type:`area`,position:{x:r.x,y:r.y},hidden:i.every(e=>a.has(e.id)),data:{area:t.area,colour:n[t.area]??`#94a3b8`,count:i.length},style:{width:t.size.width,height:t.size.height},zIndex:0},...t.inner.nodes]})}function mE(e){let t={};for(let n of e)n.type!==`ghost`&&(t[n.id]=hE(n.parentId,n.position));return t}var hE=(e,t)=>e?{x:UT(t.x-NT),y:UT(t.y-PT)}:{x:UT(t.x),y:UT(t.y)};function gE(e,t,n,r,i,a,o,s=new Set){let c=new Set(e.map(e=>e.id)),l=e=>s.has(e.split(`-`)[0]??e)?RT(e.split(`-`)[0]??e):e,u=new Set(e.filter(e=>e.status===`done`).map(e=>e.id)),d=e=>e.split(`-`)[0]??e,f=e=>n===`area`?t[e.area]??`#94a3b8`:gw[e.status]?.colour??`#94a3b8`,p=gT(e).filter(e=>c.has(e.dependent)).map(e=>{let t=`${e.ghostId}->${e.dependent}`,n=r===e.ghostId||r===e.dependent,s=i!=null&&(e.ghostId===i||e.dependent===i),c=n||s||t===a,u=o.has(e.dependent);return{id:t,source:e.ghostId,target:l(e.dependent),type:`smoothstep`,pathOptions:{borderRadius:12},hidden:u&&!s,animated:n,zIndex:-1,style:{stroke:c?`#cbd5e1`:`#7c8aa0`,strokeWidth:c?2.5:1.2,strokeDasharray:`6 5`,opacity:c?1:r?.08:.4}}});return[..._E(e.flatMap(e=>e.deps.filter(t=>c.has(t)&&!qT(t,e.id)).map(t=>{let n=`${t}->${e.id}`,s=r===t||r===e.id,c=i!=null&&(t===i||e.id===i),l=d(t)!==d(e.id),p=s||c||n===a,m=l&&u.has(t),h=o.has(t)||o.has(e.id),g=c&&h;return{id:n,source:t,target:e.id,type:`smoothstep`,pathOptions:{borderRadius:12},hidden:h&&!g||m&&!p,animated:s,zIndex:-1,style:{stroke:p?f(e):`#7c8aa0`,strokeWidth:p?2.5:l?1.2:1.5,strokeDasharray:l?`6 5`:void 0,opacity:p?1:r?l?.08:.12:l?.4:.6}}})),l,s.size>0),...p.filter((e,t,n)=>n.findIndex(t=>t.source===e.source&&t.target===e.target)===t)]}function _E(e,t,n){if(!n)return e;let r=new Map;for(let n of e){let[e,i]=[t(n.source),t(n.target)];if(e===i)continue;let a=`${e}->${i}`,o=(n.style?.opacity??0)===1,s=r.get(a);s===void 0?r.set(a,{edge:{...n,id:a,source:e,target:i},count:1,allHidden:n.hidden===!0}):(s.count+=1,s.allHidden&&=n.hidden===!0,o&&(s.edge={...n,id:a,source:e,target:i}))}return[...r.values()].map(({edge:e,count:t,allHidden:n})=>({...e,hidden:n,...t>1?{label:String(t),labelBgPadding:[4,2],labelBgBorderRadius:4,labelStyle:{fill:`#dce3ec`,fontSize:11},labelBgStyle:{fill:`#1e2836`}}:{}}))}function vE({data:e}){let{item:t,colour:n,statusColour:r,selected:i,dimmed:a,hiddenLinkIn:o,hiddenLinkOut:s}=e,c=gw[t.status];return(0,b.jsxs)(`div`,{className:`item-node`,"data-selected":i,"data-dimmed":a,style:{"--area":n},children:[(0,b.jsx)(Ku,{type:`target`,position:B.Left,className:o?`handle--hidden-link`:void 0}),(0,b.jsx)(`div`,{className:`item-node__rail`}),(0,b.jsxs)(`div`,{className:`item-node__body`,children:[(0,b.jsxs)(`div`,{className:`item-node__meta`,children:[(0,b.jsx)(`span`,{className:`item-node__id`,children:t.id}),(0,b.jsx)(`span`,{className:`item-node__status`,title:c?.label??t.status,style:{color:r},children:c?.icon??`?`})]}),(0,b.jsx)(`div`,{className:`item-node__title`,"data-strike":c?.strike??!1,children:t.title})]}),(0,b.jsx)(Ku,{type:`source`,position:B.Right,className:s?`handle--hidden-link`:void 0})]})}function yE({data:e,selected:t}){return e.collapsed===void 0?(0,b.jsxs)(`div`,{className:`area-box`,"data-foreign":e.foreign===!0,style:{"--area":e.colour},children:[(0,b.jsx)(fp,{isVisible:t,minWidth:220,minHeight:120,lineClassName:`box-resize-line`,handleClassName:`box-resize-handle`}),(0,b.jsxs)(`div`,{className:`area-box__title`,children:[(0,b.jsx)(`span`,{className:`area-box__name`,children:e.area}),(0,b.jsx)(`span`,{className:`area-box__count`,children:e.count})]})]}):(0,b.jsxs)(`div`,{className:`area-box area-box--collapsed`,style:{"--area":e.colour},title:`Click to open this area`,children:[(0,b.jsx)(Ku,{type:`target`,position:B.Left}),(0,b.jsxs)(`div`,{className:`area-box__title`,children:[(0,b.jsx)(`span`,{className:`area-box__name`,children:e.area}),(0,b.jsx)(`span`,{className:`area-box__count`,children:e.count})]}),(0,b.jsx)(`div`,{className:`area-box__summary`,children:e.collapsed.byStatus.map(([e,t])=>(0,b.jsxs)(`span`,{className:`area-box__status`,style:{color:gw[e].colour},title:e,children:[gw[e].icon,` `,t]},e))}),(0,b.jsx)(Ku,{type:`source`,position:B.Right})]})}function bE({data:e}){let{item:t,colour:n,statusColour:r,count:i,selected:a,dimmed:o,hiddenLinkIn:s,hiddenLinkOut:c}=e,l=gw[t.status];return(0,b.jsxs)(`div`,{className:`ticket-box`,"data-selected":a,"data-dimmed":o,style:{"--area":n},children:[(0,b.jsx)(fp,{isVisible:a,minWidth:200,minHeight:100,lineClassName:`box-resize-line`,handleClassName:`box-resize-handle`}),(0,b.jsx)(Ku,{type:`target`,position:B.Left,className:s?`handle--hidden-link`:void 0}),(0,b.jsxs)(`div`,{className:`ticket-box__title`,children:[(0,b.jsx)(`span`,{className:`ticket-box__id`,children:t.id}),(0,b.jsx)(`span`,{className:`ticket-box__status`,title:l?.label??t.status,style:{color:r},children:l?.icon??`?`}),(0,b.jsx)(`span`,{className:`ticket-box__label`,"data-strike":l?.strike??!1,children:t.title}),(0,b.jsx)(`span`,{className:`ticket-box__count`,children:i})]}),(0,b.jsx)(Ku,{type:`source`,position:B.Right,className:c?`handle--hidden-link`:void 0})]})}function xE({data:e}){let{project:t,ref:n,dimmed:r}=e;return(0,b.jsxs)(`div`,{className:`ghost-node`,"data-dimmed":r,title:`${n} lives in the ${t} project, which is not open here`,children:[(0,b.jsx)(`span`,{className:`ghost-node__ref`,children:n}),(0,b.jsx)(Ku,{type:`source`,position:B.Right})]})}var SE=`roadmap.positions.v2`,CE=`roadmap.layout.v1`,wE=`roadmap.sizes.v2`,TE=(e,t)=>`${e}:${t}`;function EE(e){try{let t=localStorage.getItem(e);return t?JSON.parse(t):{}}catch{return{}}}function DE(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}var OE=e=>EE(TE(CE,e)),kE=(e,t)=>DE(TE(CE,e),t),AE=e=>EE(TE(wE,e)),jE=(e,t)=>DE(TE(wE,e),t);function ME(e){try{localStorage.removeItem(TE(CE,e)),localStorage.removeItem(TE(SE,e)),localStorage.removeItem(TE(wE,e))}catch{}}var NE=e=>`${gw[e].icon} ${gw[e].label}`;function PE({projectKey:e,ref_:t,status:n,reload:r}){let[i,a]=(0,_.useState)(!1),[o,s]=(0,_.useState)(null);if((0,_.useEffect)(()=>s(null),[t]),!bb())return(0,b.jsx)(`span`,{className:`detail__status`,children:NE(n)});async function c(i){if(i!==n){a(!0),s(null);try{await Sb(e,t,i)}catch(e){s(e instanceof Error?e.message:String(e))}finally{a(!1),r()}}}return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`select`,{className:`detail__status detail__status--edit`,value:n,disabled:i,"aria-label":`Status`,onChange:e=>void c(e.target.value),children:Object.keys(gw).map(e=>(0,b.jsx)(`option`,{value:e,children:NE(e)},e))}),o!==null&&(0,b.jsx)(`span`,{className:`detail__status-error`,children:o})]})}var FE,X,IE,LE,RE,zE,BE,VE,HE,UE={},WE=[],GE=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function KE(e,t){for(var n in t)e[n]=t[n];return e}function qE(e){var t=e.parentNode;t&&t.removeChild(e)}function Z(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?FE.call(arguments,2):n),typeof e==`function`&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return JE(e,o,r,i,null)}function JE(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++IE};return i==null&&X.vnode!=null&&X.vnode(a),a}function YE(){return{current:null}}function XE(e){return e.children}function ZE(e,t,n,r,i){for(var a in n)a===`children`||a===`key`||a in t||$E(e,a,null,n[a],r);for(a in t)i&&typeof t[a]!=`function`||a===`children`||a===`key`||a===`value`||a===`checked`||n[a]===t[a]||$E(e,a,t[a],n[a],r)}function QE(e,t,n){t[0]===`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||GE.test(t)?n:n+`px`}function $E(e,t,n,r,i){var a;n:if(t===`style`){if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||QE(e.style,t,``);if(n)for(t in n)r&&n[t]===r[t]||QE(e.style,t,n[t])}}else if(t[0]===`o`&&t[1]===`n`)a=t!==(t=t.replace(/Capture$/,``)),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||={},e.l[t+a]=n,n?r||e.addEventListener(t,a?tD:eD,a):e.removeEventListener(t,a?tD:eD,a);else if(t!==`dangerouslySetInnerHTML`){if(i)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!==`width`&&t!==`height`&&t!==`href`&&t!==`list`&&t!==`form`&&t!==`tabIndex`&&t!==`download`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t.indexOf(`-`)==-1?e.removeAttribute(t):e.setAttribute(t,n))}}function eD(e){RE=!0;try{return this.l[e.type+!1](X.event?X.event(e):e)}finally{RE=!1}}function tD(e){RE=!0;try{return this.l[e.type+!0](X.event?X.event(e):e)}finally{RE=!1}}function nD(e,t){this.props=e,this.context=t}function rD(e,t){if(t==null)return e.__?rD(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?rD(e):null}function iD(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return iD(e)}}function aD(e){RE?setTimeout(e):VE(e)}function oD(e){(!e.__d&&(e.__d=!0)&&zE.push(e)&&!sD.__r++||BE!==X.debounceRendering)&&((BE=X.debounceRendering)||aD)(sD)}function sD(){var e,t,n,r,i,a,o,s;for(zE.sort(function(e,t){return e.__v.__b-t.__v.__b});e=zE.shift();)e.__d&&(t=zE.length,r=void 0,i=void 0,o=(a=(n=e).__v).__e,(s=n.__P)&&(r=[],(i=KE({},a)).__v=a.__v+1,pD(s,a,i,n.__n,s.ownerSVGElement!==void 0,a.__h==null?null:[o],r,o??rD(a),a.__h),mD(r,a),a.__e!=o&&iD(a)),zE.length>t&&zE.sort(function(e,t){return e.__v.__b-t.__v.__b}));sD.__r=0}function cD(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_=r&&r.__k||WE,v=_.length;for(n.__k=[],u=0;u<t.length;u++)if((p=n.__k[u]=(p=t[u])==null||typeof p==`boolean`?null:typeof p==`string`||typeof p==`number`||typeof p==`bigint`?JE(null,p,null,null,p):Array.isArray(p)?JE(XE,{children:p},null,null,null):p.__b>0?JE(p.type,p.props,p.key,p.ref?p.ref:null,p.__v):p)!=null){if(p.__=n,p.__b=n.__b+1,(f=_[u])===null||f&&p.key==f.key&&p.type===f.type)_[u]=void 0;else for(d=0;d<v;d++){if((f=_[d])&&p.key==f.key&&p.type===f.type){_[d]=void 0;break}f=null}pD(e,p,f||=UE,i,a,o,s,c,l),m=p.__e,(d=p.ref)&&f.ref!=d&&(g||=[],f.ref&&g.push(f.ref,null,p),g.push(d,p.__c||m,p)),m==null?c&&f.__e==c&&c.parentNode!=e&&(c=rD(f)):(h??=m,typeof p.type==`function`&&p.__k===f.__k?p.__d=c=lD(p,c,e):c=dD(e,p,f,_,m,c),typeof n.type==`function`&&(n.__d=c))}for(n.__e=h,u=v;u--;)_[u]!=null&&(typeof n.type==`function`&&_[u].__e!=null&&_[u].__e==n.__d&&(n.__d=fD(r).nextSibling),_D(_[u],_[u]));if(g)for(u=0;u<g.length;u++)gD(g[u],g[++u],g[++u])}function lD(e,t,n){for(var r,i=e.__k,a=0;i&&a<i.length;a++)(r=i[a])&&(r.__=e,t=typeof r.type==`function`?lD(r,t,n):dD(n,r,r,i,r.__e,t));return t}function uD(e,t){return t||=[],e==null||typeof e==`boolean`||(Array.isArray(e)?e.some(function(e){uD(e,t)}):t.push(e)),t}function dD(e,t,n,r,i,a){var o,s,c;if(t.__d!==void 0)o=t.__d,t.__d=void 0;else if(n==null||i!=a||i.parentNode==null)n:if(a==null||a.parentNode!==e)e.appendChild(i),o=null;else{for(s=a,c=0;(s=s.nextSibling)&&c<r.length;c+=1)if(s==i)break n;e.insertBefore(i,a),o=a}return o===void 0?i.nextSibling:o}function fD(e){var t,n,r;if(e.type==null||typeof e.type==`string`)return e.__e;if(e.__k){for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=fD(n)))return r}return null}function pD(e,t,n,r,i,a,o,s,c){var l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(c=n.__h,s=t.__e=n.__e,t.__h=null,a=[s]),(l=X.__b)&&l(t);try{n:if(typeof w==`function`){if(g=t.props,_=(l=w.contextType)&&r[l.__c],v=l?_?_.props.value:l.__:r,n.__c?h=(u=t.__c=n.__c).__=u.__E:(`prototype`in w&&w.prototype.render?t.__c=u=new w(g,v):(t.__c=u=new nD(g,v),u.constructor=w,u.render=vD),_&&_.sub(u),u.props=g,u.state||(u.state={}),u.context=v,u.__n=r,d=u.__d=!0,u.__h=[],u._sb=[]),u.__s??(u.__s=u.state),w.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=KE({},u.__s)),KE(u.__s,w.getDerivedStateFromProps(g,u.__s))),f=u.props,p=u.state,u.__v=t,d)w.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(w.getDerivedStateFromProps==null&&g!==f&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(g,v),!u.__e&&u.shouldComponentUpdate!=null&&!1===u.shouldComponentUpdate(g,u.__s,v)||t.__v===n.__v){for(t.__v!==n.__v&&(u.props=g,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(e){e&&(e.__=t)}),y=0;y<u._sb.length;y++)u.__h.push(u._sb[y]);u._sb=[],u.__h.length&&o.push(u);break n}u.componentWillUpdate!=null&&u.componentWillUpdate(g,u.__s,v),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(f,p,m)})}if(u.context=v,u.props=g,u.__P=e,b=X.__r,x=0,`prototype`in w&&w.prototype.render){for(u.state=u.__s,u.__d=!1,b&&b(t),l=u.render(u.props,u.state,u.context),S=0;S<u._sb.length;S++)u.__h.push(u._sb[S]);u._sb=[]}else do u.__d=!1,b&&b(t),l=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++x<25);u.state=u.__s,u.getChildContext!=null&&(r=KE(KE({},r),u.getChildContext())),d||u.getSnapshotBeforeUpdate==null||(m=u.getSnapshotBeforeUpdate(f,p)),C=l!=null&&l.type===XE&&l.key==null?l.props.children:l,cD(e,Array.isArray(C)?C:[C],t,n,r,i,a,o,s,c),u.base=t.__e,t.__h=null,u.__h.length&&o.push(u),h&&(u.__E=u.__=null),u.__e=!1}else a==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=hD(n.__e,t,n,r,i,a,o,c);(l=X.diffed)&&l(t)}catch(e){t.__v=null,(c||a!=null)&&(t.__e=s,t.__h=!!c,a[a.indexOf(s)]=null),X.__e(e,t,n)}}function mD(e,t){X.__c&&X.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){X.__e(e,t.__v)}})}function hD(e,t,n,r,i,a,o,s){var c,l,u,d=n.props,f=t.props,p=t.type,m=0;if(p===`svg`&&(i=!0),a!=null){for(;m<a.length;m++)if((c=a[m])&&`setAttribute`in c==!!p&&(p?c.localName===p:c.nodeType===3)){e=c,a[m]=null;break}}if(e==null){if(p===null)return document.createTextNode(f);e=i?document.createElementNS(`http://www.w3.org/2000/svg`,p):document.createElement(p,f.is&&f),a=null,s=!1}if(p===null)d===f||s&&e.data===f||(e.data=f);else{if(a&&=FE.call(e.childNodes),l=(d=n.props||UE).dangerouslySetInnerHTML,u=f.dangerouslySetInnerHTML,!s){if(a!=null)for(d={},m=0;m<e.attributes.length;m++)d[e.attributes[m].name]=e.attributes[m].value;(u||l)&&(u&&(l&&u.__html==l.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||``))}if(ZE(e,f,d,i,s),u)t.__k=[];else if(m=t.props.children,cD(e,Array.isArray(m)?m:[m],t,n,r,i&&p!==`foreignObject`,a,o,a?a[0]:n.__k&&rD(n,0),s),a!=null)for(m=a.length;m--;)a[m]!=null&&qE(a[m]);s||(`value`in f&&(m=f.value)!==void 0&&(m!==e.value||p===`progress`&&!m||p===`option`&&m!==d.value)&&$E(e,`value`,m,d.value,!1),`checked`in f&&(m=f.checked)!==void 0&&m!==e.checked&&$E(e,`checked`,m,d.checked,!1))}return e}function gD(e,t,n){try{typeof e==`function`?e(t):e.current=t}catch(e){X.__e(e,n)}}function _D(e,t,n){var r,i;if(X.unmount&&X.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||gD(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){X.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&_D(r[i],t,n||typeof e.type!=`function`);n||e.__e==null||qE(e.__e),e.__=e.__e=e.__d=void 0}function vD(e,t,n){return this.constructor(e,n)}function yD(e,t,n){var r,i,a;X.__&&X.__(e,t),i=(r=typeof n==`function`)?null:n&&n.__k||t.__k,a=[],pD(t,e=(!r&&n||t).__k=Z(XE,null,[e]),i||UE,UE,t.ownerSVGElement!==void 0,!r&&n?[n]:i?null:t.firstChild?FE.call(t.childNodes):null,a,!r&&n?n:i?i.__e:t.firstChild,r),mD(a,e)}function bD(e,t){var n={__c:t=`__cC`+HE++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(function(e){e.__e=!0,oD(e)})},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}FE=WE.slice,X={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},IE=0,LE=function(e){return e!=null&&e.constructor===void 0},RE=!1,nD.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=KE({},this.state);typeof e==`function`&&(e=e(KE({},n),this.props)),e&&KE(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),oD(this))},nD.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),oD(this))},nD.prototype.render=XE,zE=[],VE=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,sD.__r=0,HE=0;var xD,SD,CD,wD=[],TD=[],ED=X.__b,DD=X.__r,OD=X.diffed,kD=X.__c,AD=X.unmount;function jD(){for(var e;e=wD.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(PD),e.__H.__h.forEach(FD),e.__H.__h=[]}catch(t){e.__H.__h=[],X.__e(t,e.__v)}}X.__b=function(e){xD=null,ED&&ED(e)},X.__r=function(e){DD&&DD(e);var t=(xD=e.__c).__H;t&&(SD===xD?(t.__h=[],xD.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.__V=TD,e.__N=e.i=void 0})):(t.__h.forEach(PD),t.__h.forEach(FD),t.__h=[])),SD=xD},X.diffed=function(e){OD&&OD(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(wD.push(t)!==1&&CD===X.requestAnimationFrame||((CD=X.requestAnimationFrame)||ND)(jD)),t.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.__V!==TD&&(e.__=e.__V),e.i=void 0,e.__V=TD})),SD=xD=null},X.__c=function(e,t){t.some(function(e){try{e.__h.forEach(PD),e.__h=e.__h.filter(function(e){return!e.__||FD(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],X.__e(n,e.__v)}}),kD&&kD(e,t)},X.unmount=function(e){AD&&AD(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{PD(e)}catch(e){t=e}}),n.__H=void 0,t&&X.__e(t,n.__v))};var MD=typeof requestAnimationFrame==`function`;function ND(e){var t,n=function(){clearTimeout(r),MD&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);MD&&(t=requestAnimationFrame(n))}function PD(e){var t=xD,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),xD=t}function FD(e){var t=xD;e.__c=e.__(),xD=t}function ID(e,t){for(var n in t)e[n]=t[n];return e}function LD(e,t){for(var n in e)if(n!==`__source`&&!(n in t))return!0;for(var r in t)if(r!==`__source`&&e[r]!==t[r])return!0;return!1}function RD(e){this.props=e}(RD.prototype=new nD).isPureReactComponent=!0,RD.prototype.shouldComponentUpdate=function(e,t){return LD(this.props,e)||LD(this.state,t)};var zD=X.__b;X.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),zD&&zD(e)},typeof Symbol<`u`&&Symbol.for;var BD=X.__e;X.__e=function(e,t,n,r){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e??(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}BD(e,t,n,r)};var VD=X.unmount;function HD(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){typeof e.__c==`function`&&e.__c()}),e.__c.__H=null),(e=ID({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return HD(e,t,n)})),e}function UD(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return UD(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function WD(){this.__u=0,this.t=null,this.__b=null}function GD(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function KD(){this.u=null,this.o=null}X.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),VD&&VD(e)},(WD.prototype=new nD).__c=function(e,t){var n=t.__c,r=this;r.t??=[],r.t.push(n);var i=GD(r.__v),a=!1,o=function(){a||(a=!0,n.__R=null,i?i(s):s())};n.__R=o;var s=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=UD(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},WD.prototype.componentWillUnmount=function(){this.t=[]},WD.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement(`div`),r=this.__v.__k[0].__c;this.__v.__k[0]=HD(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&Z(XE,null,e.fallback);return i&&(i.__h=null),[Z(XE,null,t.__a?null:e.children),i]};var qD=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!==`t`||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function JD(e){return this.getChildContext=function(){return e.context},e.children}function YD(e){var t=this,n=e.i;t.componentWillUnmount=function(){yD(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||=(t.i=n,{nodeType:1,parentNode:n,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),yD(Z(JD,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function XD(e,t){var n=Z(YD,{__v:e,i:t});return n.containerInfo=t,n}(KD.prototype=new nD).__a=function(e){var t=this,n=GD(t.__v),r=t.o.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),qD(t,e,r)):i()};n?n(a):a()}},KD.prototype.render=function(e){this.u=null,this.o=new Map;var t=uD(e.children);e.revealOrder&&e.revealOrder[0]===`b`&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},KD.prototype.componentDidUpdate=KD.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){qD(e,n,t)})};var ZD=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.element`)||60103,QD=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,$D=typeof document<`u`,eO=function(e){return(typeof Symbol<`u`&&typeof Symbol()==`symbol`?/fil|che|rad/i:/fil|che|ra/i).test(e)};nD.prototype.isReactComponent={},[`componentWillMount`,`componentWillReceiveProps`,`componentWillUpdate`].forEach(function(e){Object.defineProperty(nD.prototype,e,{configurable:!0,get:function(){return this[`UNSAFE_`+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var tO=X.event;function nO(){}function rO(){return this.cancelBubble}function iO(){return this.defaultPrevented}X.event=function(e){return tO&&(e=tO(e)),e.persist=nO,e.isPropagationStopped=rO,e.isDefaultPrevented=iO,e.nativeEvent=e};var aO={configurable:!0,get:function(){return this.class}},oO=X.vnode;X.vnode=function(e){var t=e.type,n=e.props,r=n;if(typeof t==`string`){var i=t.indexOf(`-`)===-1;for(var a in r={},n){var o=n[a];$D&&a===`children`&&t===`noscript`||a===`value`&&`defaultValue`in n&&o==null||(a===`defaultValue`&&`value`in n&&n.value==null?a=`value`:a===`download`&&!0===o?o=``:/ondoubleclick/i.test(a)?a=`ondblclick`:/^onchange(textarea|input)/i.test(a+t)&&!eO(n.type)?a=`oninput`:/^onfocus$/i.test(a)?a=`onfocusin`:/^onblur$/i.test(a)?a=`onfocusout`:/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(a)?a=a.toLowerCase():i&&QD.test(a)?a=a.replace(/[A-Z0-9]/g,`-$&`).toLowerCase():o===null&&(o=void 0),/^oninput$/i.test(a)&&(a=a.toLowerCase(),r[a]&&(a=`oninputCapture`)),r[a]=o)}t==`select`&&r.multiple&&Array.isArray(r.value)&&(r.value=uD(n.children).forEach(function(e){e.props.selected=r.value.indexOf(e.props.value)!=-1})),t==`select`&&r.defaultValue!=null&&(r.value=uD(n.children).forEach(function(e){e.props.selected=r.multiple?r.defaultValue.indexOf(e.props.value)!=-1:r.defaultValue==e.props.value})),e.props=r,n.class!=n.className&&(aO.enumerable=`className`in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",aO))}e.$$typeof=ZD,oO&&oO(e)};var sO=X.__r;X.__r=function(e){sO&&sO(e),e.__c};var cO=[],lO=new Map;function uO(e){cO.push(e),lO.forEach(t=>{mO(t,e)})}function dO(e){e.isConnected&&e.getRootNode&&fO(e.getRootNode())}function fO(e){let t=lO.get(e);if(!t||!t.isConnected){if(t=e.querySelector(`style[data-fullcalendar]`),!t){t=document.createElement(`style`),t.setAttribute(`data-fullcalendar`,``);let n=gO();n&&(t.nonce=n);let r=e===document?document.head:e,i=e===document?r.querySelector(`script,link[rel=stylesheet],link[as=style],style`):r.firstChild;r.insertBefore(t,i)}lO.set(e,t),pO(t)}}function pO(e){for(let t of cO)mO(e,t)}function mO(e,t){let{sheet:n}=e,r=n.cssRules.length;t.split(`}`).forEach((e,t)=>{e=e.trim(),e&&n.insertRule(e+`}`,r+t)})}var hO;function gO(){return hO===void 0&&(hO=_O()),hO}function _O(){let e=document.querySelector(`meta[name="csp-nonce"]`);if(e&&e.hasAttribute(`content`))return e.getAttribute(`content`);let t=document.querySelector(`script[nonce]`);return t&&t.nonce||``}typeof document<`u`&&fO(document),uO(`:root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:"\\e900"}.fc-icon-chevron-right:before{content:"\\e901"}.fc-icon-chevrons-left:before{content:"\\e902"}.fc-icon-chevrons-right:before{content:"\\e903"}.fc-icon-minus-square:before{content:"\\e904"}.fc-icon-plus-square:before{content:"\\e905"}.fc-icon-x:before{content:"\\e906"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:"";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:"";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}`);var vO=class{constructor(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}request(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),e==null?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))}pause(e=``){let{pauseDepths:t}=this;t[e]=(t[e]||0)+1,this.clearTimeout()}resume(e=``,t){let{pauseDepths:n}=this;e in n&&(t?delete n[e]:(--n[e],n[e]<=0&&delete n[e]),this.tryDrain())}isPaused(){return Object.keys(this.pauseDepths).length}tryDrain(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}}clear(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}}clearTimeout(){this.timeoutId&&=(clearTimeout(this.timeoutId),0)}drained(){this.drainedOption&&this.drainedOption()}};function yO(e){e.parentNode&&e.parentNode.removeChild(e)}function bO(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(xO(e,t))return e;e=e.parentElement||e.parentNode}while(e!==null&&e.nodeType===1);return null}function xO(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}function SO(e,t){let n=e instanceof HTMLElement?[e]:e,r=[];for(let e=0;e<n.length;e+=1){let i=n[e].querySelectorAll(t);for(let e=0;e<i.length;e+=1)r.push(i[e])}return r}var CO=/(top|left|right|bottom|width|height)$/i;function wO(e,t){for(let n in t)TO(e,n,t[n])}function TO(e,t,n){n==null?e.style[t]=``:typeof n==`number`&&CO.test(t)?e.style[t]=`${n}px`:e.style[t]=n}function EO(e){return e.composedPath?.call(e)[0]??e.target}var DO=0;function OO(){return DO+=1,`fc-dom-`+DO}function kO(e,t){return n=>{let r=bO(n.target,e);r&&t.call(r,n,r)}}function AO(e,t,n,r){let i=kO(n,r);return e.addEventListener(t,i),()=>{e.removeEventListener(t,i)}}function jO(e,t,n,r){let i;return AO(e,`mouseover`,t,(e,t)=>{if(t!==i){i=t,n(e,t);let a=e=>{i=null,r(e,t),t.removeEventListener(`mouseleave`,a)};t.addEventListener(`mouseleave`,a)}})}function MO(e){return Object.assign({onClick:e},NO(e))}function NO(e){return{tabIndex:0,onKeyDown(t){(t.key===`Enter`||t.key===` `)&&(e(t),t.preventDefault())}}}var PO=0;function FO(){return PO+=1,String(PO)}function IO(e){let t=[],n=[],r,i;for(typeof e==`string`?n=e.split(/\s*,\s*/):typeof e==`function`?n=[e]:Array.isArray(e)&&(n=e),r=0;r<n.length;r+=1)i=n[r],typeof i==`string`?t.push(i.charAt(0)===`-`?{field:i.substring(1),order:-1}:{field:i,order:1}):typeof i==`function`&&t.push({func:i});return t}function LO(e,t,n){let r,i;for(r=0;r<n.length;r+=1)if(i=RO(e,t,n[r]),i)return i;return 0}function RO(e,t,n){return n.func?n.func(e,t):zO(e[n.field],t[n.field])*(n.order||1)}function zO(e,t){return!e&&!t?0:t==null?-1:e==null?1:typeof e==`string`||typeof t==`string`?String(e).localeCompare(String(t)):e-t}function BO(e,t){let n=String(e);return`000`.substr(0,t-n.length)+n}function VO(e,t,n){return typeof e==`function`?e(...t):typeof e==`string`?t.reduce((e,t,n)=>e.replace(`$`+n,t||``),e):n}function HO(e){return e%1==0}function UO(e){let t=e.querySelector(`.fc-scrollgrid-shrink-frame`),n=e.querySelector(`.fc-scrollgrid-shrink-cushion`);if(!t)throw Error(`needs fc-scrollgrid-shrink-frame className`);if(!n)throw Error(`needs fc-scrollgrid-shrink-cushion className`);return e.getBoundingClientRect().width-t.getBoundingClientRect().width+n.getBoundingClientRect().width}var WO=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function GO(e,t){return typeof e==`string`?KO(e):typeof e==`object`&&e?qO(e):typeof e==`number`?qO({[t||`milliseconds`]:e}):null}function KO(e){let t=WO.exec(e);if(t){let e=t[1]?-1:1;return{years:0,months:0,days:e*(t[2]?parseInt(t[2],10):0),milliseconds:e*((t[3]?parseInt(t[3],10):0)*60*60*1e3+(t[4]?parseInt(t[4],10):0)*60*1e3+(t[5]?parseInt(t[5],10):0)*1e3+(t[6]?parseInt(t[6],10):0))}}return null}function qO(e){let t={years:e.years||e.year||0,months:e.months||e.month||0,days:e.days||e.day||0,milliseconds:(e.hours||e.hour||0)*60*60*1e3+(e.minutes||e.minute||0)*60*1e3+(e.seconds||e.second||0)*1e3+(e.milliseconds||e.millisecond||e.ms||0)},n=e.weeks||e.week;return n&&(t.days+=n*7,t.specifiedWeeks=!0),t}function JO(e,t){return e.years===t.years&&e.months===t.months&&e.days===t.days&&e.milliseconds===t.milliseconds}function YO(e,t){return{years:e.years-t.years,months:e.months-t.months,days:e.days-t.days,milliseconds:e.milliseconds-t.milliseconds}}function XO(e){return QO(e)/365}function ZO(e){return QO(e)/30}function QO(e){return $O(e)/864e5}function $O(e){return e.years*31536e6+e.months*2592e6+e.days*864e5+e.milliseconds}function ek(e){let t=e.milliseconds;if(t){if(t%1e3!=0)return{unit:`millisecond`,value:t};if(t%6e4!=0)return{unit:`second`,value:t/1e3};if(t%36e5!=0)return{unit:`minute`,value:t/6e4};if(t)return{unit:`hour`,value:t/36e5}}return e.days?e.specifiedWeeks&&e.days%7==0?{unit:`week`,value:e.days/7}:{unit:`day`,value:e.days}:e.months?{unit:`month`,value:e.months}:e.years?{unit:`year`,value:e.years}:{unit:`millisecond`,value:0}}function tk(e,t,n){if(e===t)return!0;let r=e.length,i;if(r!==t.length)return!1;for(i=0;i<r;i+=1)if(!(n?n(e[i],t[i]):e[i]===t[i]))return!1;return!0}var nk=[`sun`,`mon`,`tue`,`wed`,`thu`,`fri`,`sat`];function rk(e,t){let n=Ck(e);return n[2]+=t*7,wk(n)}function ik(e,t){let n=Ck(e);return n[2]+=t,wk(n)}function ak(e,t){let n=Ck(e);return n[6]+=t,wk(n)}function ok(e,t){return sk(e,t)/7}function sk(e,t){return(t.valueOf()-e.valueOf())/864e5}function ck(e,t){return(t.valueOf()-e.valueOf())/36e5}function lk(e,t){return(t.valueOf()-e.valueOf())/6e4}function uk(e,t){return(t.valueOf()-e.valueOf())/1e3}function dk(e,t){let n=mk(e),r=mk(t);return{years:0,months:0,days:Math.round(sk(n,r)),milliseconds:t.valueOf()-r.valueOf()-(e.valueOf()-n.valueOf())}}function fk(e,t){let n=pk(e,t);return n!==null&&n%7==0?n/7:null}function pk(e,t){return Ek(e)===Ek(t)?Math.round(sk(e,t)):null}function mk(e){return wk([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function hk(e){return wk([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}function gk(e){return wk([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}function _k(e){return wk([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()])}function vk(e,t,n){let r=e.getUTCFullYear(),i=yk(e,r,t,n);if(i<1)return yk(e,r-1,t,n);let a=yk(e,r+1,t,n);return a>=1?Math.min(i,a):i}function yk(e,t,n,r){let i=wk([t,0,1+bk(t,n,r)]),a=mk(e),o=Math.round(sk(i,a));return Math.floor(o/7)+1}function bk(e,t,n){let r=7+t-n;return-((7+wk([e,0,r]).getUTCDay()-t)%7)+r-1}function xk(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function Sk(e){return new Date(e[0],e[1]||0,e[2]==null?1:e[2],e[3]||0,e[4]||0,e[5]||0)}function Ck(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function wk(e){return e.length===1&&(e=e.concat([0])),new Date(Date.UTC(...e))}function Tk(e){return!isNaN(e.valueOf())}function Ek(e){return e.getUTCHours()*1e3*60*60+e.getUTCMinutes()*1e3*60+e.getUTCSeconds()*1e3+e.getUTCMilliseconds()}function Dk(e,t,n=!1){let r=e.toISOString();return r=r.replace(`.000`,``),n&&(r=r.replace(`T00:00:00Z`,``)),r.length>10&&(t==null?r=r.replace(`Z`,``):t!==0&&(r=r.replace(`Z`,Ak(t,!0)))),r}function Ok(e){return e.toISOString().replace(/T.*$/,``)}function kk(e){return e.toISOString().match(/^\d{4}-\d{2}/)[0]}function Ak(e,t=!1){let n=e<0?`-`:`+`,r=Math.abs(e),i=Math.floor(r/60),a=Math.round(r%60);return t?`${n+BO(i,2)}:${BO(a,2)}`:`GMT${n}${i}${a?`:${BO(a,2)}`:``}`}function Q(e,t,n){let r,i;return function(...a){if(!r)i=e.apply(this,a);else if(!tk(r,a)){n&&n(i);let r=e.apply(this,a);t&&t(r,i)||(i=r)}return r=a,i}}function jk(e,t,n){let r,i;return a=>{if(!r)i=e.call(this,a);else if(!gA(r,a)){n&&n(i);let r=e.call(this,a);t&&t(r,i)||(i=r)}return r=a,i}}var Mk={week:3,separator:9,omitZeroMinute:9,meridiem:9,omitCommas:9},Nk={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},Pk=/\s*([ap])\.?m\.?/i,Fk=/,/g,Ik=/\s+/g,Lk=/\u200e/g,Rk=/UTC|GMT/,zk=class{constructor(e){let t={},n={},r=9;for(let i in e)i in Mk?(n[i]=e[i],Mk[i]<9&&(r=Math.min(Mk[i],r))):(t[i]=e[i],i in Nk&&(r=Math.min(Nk[i],r)));this.standardDateProps=t,this.extendedSettings=n,this.smallestUnitNum=r,this.buildFormattingFunc=Q(Bk)}format(e,t){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,t)(e)}formatRange(e,t,n,r){let{standardDateProps:i,extendedSettings:a}=this,o=Kk(e.marker,t.marker,n.calendarSystem);if(!o)return this.format(e,n);let s=o;s>1&&(i.year===`numeric`||i.year===`2-digit`)&&(i.month===`numeric`||i.month===`2-digit`)&&(i.day===`numeric`||i.day===`2-digit`)&&(s=1);let c=this.format(e,n),l=this.format(t,n);if(c===l)return c;let u=Bk(qk(i,s),a,n),d=u(e),f=u(t),p=Jk(c,d,l,f),m=a.separator||r||n.defaultSeparator||``;return p?p.before+d+m+f+p.after:c+m+l}getSmallestUnit(){switch(this.smallestUnitNum){case 7:case 6:case 5:return`year`;case 4:return`month`;case 3:return`week`;case 2:return`day`;default:return`time`}}};function Bk(e,t,n){let r=Object.keys(e).length;return r===1&&e.timeZoneName===`short`?e=>Ak(e.timeZoneOffset):r===0&&t.week?e=>Gk(n.computeWeekNumber(e.marker),n.weekText,n.weekTextLong,n.locale,t.week):Vk(e,t,n)}function Vk(e,t,n){e=Object.assign({},e),t=Object.assign({},t),Hk(e,t),e.timeZone=`UTC`;let r=new Intl.DateTimeFormat(n.locale.codes,e),i;if(t.omitZeroMinute){let t=Object.assign({},e);delete t.minute,i=new Intl.DateTimeFormat(n.locale.codes,t)}return a=>{let{marker:o}=a,s;return s=i&&!o.getUTCMinutes()?i:r,Uk(s.format(o),a,e,t,n)}}function Hk(e,t){e.timeZoneName&&(e.hour||=`2-digit`,e.minute||=`2-digit`),e.timeZoneName===`long`&&(e.timeZoneName=`short`),t.omitZeroMinute&&(e.second||e.millisecond)&&delete t.omitZeroMinute}function Uk(e,t,n,r,i){return e=e.replace(Lk,``),n.timeZoneName===`short`&&(e=Wk(e,i.timeZone===`UTC`||t.timeZoneOffset==null?`UTC`:Ak(t.timeZoneOffset))),r.omitCommas&&(e=e.replace(Fk,``).trim()),r.omitZeroMinute&&(e=e.replace(`:00`,``)),r.meridiem===!1?e=e.replace(Pk,``).trim():r.meridiem===`narrow`?e=e.replace(Pk,(e,t)=>t.toLocaleLowerCase()):r.meridiem===`short`?e=e.replace(Pk,(e,t)=>`${t.toLocaleLowerCase()}m`):r.meridiem===`lowercase`&&(e=e.replace(Pk,e=>e.toLocaleLowerCase())),e=e.replace(Ik,` `),e=e.trim(),e}function Wk(e,t){let n=!1;return e=e.replace(Rk,()=>(n=!0,t)),n||(e+=` ${t}`),e}function Gk(e,t,n,r,i){let a=[];return i===`long`?a.push(n):(i===`short`||i===`narrow`)&&a.push(t),(i===`long`||i===`short`)&&a.push(` `),a.push(r.simpleNumberFormat.format(e)),r.options.direction===`rtl`&&a.reverse(),a.join(``)}function Kk(e,t,n){return n.getMarkerYear(e)===n.getMarkerYear(t)?n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerDay(e)===n.getMarkerDay(t)?Ek(e)===Ek(t)?0:1:2:4:5}function qk(e,t){let n={};for(let r in e)(!(r in Nk)||Nk[r]<=t)&&(n[r]=e[r]);return n}function Jk(e,t,n,r){let i=0;for(;i<e.length;){let a=e.indexOf(t,i);if(a===-1)break;let o=e.substr(0,a);i=a+t.length;let s=e.substr(i),c=0;for(;c<n.length;){let e=n.indexOf(r,c);if(e===-1)break;let t=n.substr(0,e);c=e+r.length;let i=n.substr(c);if(o===t&&s===i)return{before:o,after:s}}}return null}function Yk(e,t){let n=t.markerToArray(e.marker);return{marker:e.marker,timeZoneOffset:e.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function Xk(e,t,n,r){let i=Yk(e,n.calendarSystem);return{date:i,start:i,end:t?Yk(t,n.calendarSystem):null,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}var Zk=class{constructor(e){this.cmdStr=e}format(e,t,n){return t.cmdFormatter(this.cmdStr,Xk(e,null,t,n))}formatRange(e,t,n,r){return n.cmdFormatter(this.cmdStr,Xk(e,t,n,r))}},Qk=class{constructor(e){this.func=e}format(e,t,n){return this.func(Xk(e,null,t,n))}formatRange(e,t,n,r){return this.func(Xk(e,t,n,r))}};function $k(e){return typeof e==`object`&&e?new zk(e):typeof e==`string`?new Zk(e):typeof e==`function`?new Qk(e):null}var eA={navLinkDayClick:$,navLinkWeekClick:$,duration:GO,bootstrapFontAwesome:$,buttonIcons:$,customButtons:$,defaultAllDayEventDuration:GO,defaultTimedEventDuration:GO,nextDayThreshold:GO,scrollTime:GO,scrollTimeReset:Boolean,slotMinTime:GO,slotMaxTime:GO,dayPopoverFormat:$k,slotDuration:GO,snapDuration:GO,headerToolbar:$,footerToolbar:$,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:$k,dayHeaderClassNames:$,dayHeaderContent:$,dayHeaderDidMount:$,dayHeaderWillUnmount:$,dayCellClassNames:$,dayCellContent:$,dayCellDidMount:$,dayCellWillUnmount:$,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:$,weekNumbers:Boolean,weekNumberClassNames:$,weekNumberContent:$,weekNumberDidMount:$,weekNumberWillUnmount:$,editable:Boolean,viewClassNames:$,viewDidMount:$,viewWillUnmount:$,nowIndicator:Boolean,nowIndicatorSnap:$,nowIndicatorClassNames:$,nowIndicatorContent:$,nowIndicatorDidMount:$,nowIndicatorWillUnmount:$,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:$,locale:$,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:$,eventOrder:IO,eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:$,contentHeight:$,direction:String,weekNumberFormat:$k,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:$,initialDate:$,now:$,eventDataTransform:$,stickyHeaderDates:$,stickyFooterScrollbar:$,viewHeight:$,defaultAllDay:Boolean,eventSourceFailure:$,eventSourceSuccess:$,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:$,eventConstraint:$,eventAllow:$,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:$,eventContent:$,eventDidMount:$,eventWillUnmount:$,selectConstraint:$,selectOverlap:$,selectAllow:$,droppable:Boolean,unselectCancel:String,slotLabelFormat:$,slotLaneClassNames:$,slotLaneContent:$,slotLaneDidMount:$,slotLaneWillUnmount:$,slotLabelClassNames:$,slotLabelContent:$,slotLabelDidMount:$,slotLabelWillUnmount:$,dayMaxEvents:$,dayMaxEventRows:$,dayMinWidth:Number,slotLabelInterval:GO,allDayText:String,allDayClassNames:$,allDayContent:$,allDayDidMount:$,allDayWillUnmount:$,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:$k,rerenderDelay:Number,moreLinkText:$,moreLinkHint:$,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:$,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:GO,hiddenDays:$,fixedWeekCount:Boolean,validRange:$,visibleRange:$,titleFormat:$,eventInteractive:Boolean,noEventsText:String,viewHint:$,navLinkHint:$,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:$,moreLinkClassNames:$,moreLinkContent:$,moreLinkDidMount:$,moreLinkWillUnmount:$,monthStartFormat:$k,handleCustomRendering:$,customRenderingMetaMap:$,customRenderingReplaces:Boolean},tA={eventDisplay:`auto`,defaultRangeSeparator:` - `,titleRangeSeparator:` – `,defaultTimedEventDuration:`01:00:00`,defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:`00:00:00`,dayHeaders:!0,initialView:``,aspectRatio:1.35,headerToolbar:{start:`title`,center:``,end:`today prev,next`},weekends:!0,weekNumbers:!1,weekNumberCalculation:`local`,editable:!1,nowIndicator:!1,scrollTime:`06:00:00`,scrollTimeReset:!0,slotMinTime:`00:00:00`,slotMaxTime:`24:00:00`,showNonCurrentDates:!0,lazyFetching:!0,startParam:`start`,endParam:`end`,timeZoneParam:`timeZone`,timeZone:`local`,locales:[],locale:``,themeSystem:`standard`,dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:`*`,eventOrder:`start,-duration,allDay,title`,dayPopoverFormat:{month:`long`,day:`numeric`,year:`numeric`},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30,monthStartFormat:{month:`long`,day:`numeric`},nowIndicatorSnap:`auto`},nA={datesSet:$,eventsSet:$,eventAdd:$,eventChange:$,eventRemove:$,windowResize:$,eventClick:$,eventMouseEnter:$,eventMouseLeave:$,select:$,unselect:$,loading:$,_unmount:$,_beforeprint:$,_afterprint:$,_noEventDrop:$,_noEventResize:$,_resize:$,_scrollRequest:$},rA={buttonText:$,buttonHints:$,views:$,plugins:$,initialEvents:$,events:$,eventSources:$},iA={headerToolbar:aA,footerToolbar:aA,buttonText:aA,buttonHints:aA,buttonIcons:aA,dateIncrement:aA,plugins:oA,events:oA,eventSources:oA,resources:oA};function aA(e,t){return typeof e==`object`&&typeof t==`object`&&e&&t?gA(e,t):e===t}function oA(e,t){return Array.isArray(e)&&Array.isArray(t)?tk(e,t):e===t}var sA={type:String,component:$,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:$,usesMinMaxTime:Boolean,classNames:$,content:$,didMount:$,willUnmount:$};function cA(e){return dA(e,iA)}function lA(e,t){let n={},r={};for(let r in t)r in e&&(n[r]=t[r](e[r]));for(let n in e)n in t||(r[n]=e[n]);return{refined:n,extra:r}}function $(e){return e}var{hasOwnProperty:uA}=Object.prototype;function dA(e,t){let n={};if(t){for(let r in t)if(t[r]===aA){let t=[];for(let i=e.length-1;i>=0;--i){let a=e[i][r];if(typeof a==`object`&&a)t.unshift(a);else if(a!==void 0){n[r]=a;break}}t.length&&(n[r]=dA(t))}}for(let t=e.length-1;t>=0;--t){let r=e[t];for(let e in r)e in n||(n[e]=r[e])}return n}function fA(e,t){let n={};for(let r in e)t(e[r],r)&&(n[r]=e[r]);return n}function pA(e,t){let n={};for(let r in e)n[r]=t(e[r],r);return n}function mA(e){let t={};for(let n of e)t[n]=!0;return t}function hA(e){let t=[];for(let n in e)t.push(e[n]);return t}function gA(e,t){if(e===t)return!0;for(let n in e)if(uA.call(e,n)&&!(n in t))return!1;for(let n in t)if(uA.call(t,n)&&e[n]!==t[n])return!1;return!0}var _A=/^on[A-Z]/;function vA(e,t){let n=yA(e,t);for(let e of n)if(!_A.test(e))return!1;return!0}function yA(e,t){let n=[];for(let r in e)uA.call(e,r)&&(r in t||n.push(r));for(let r in t)uA.call(t,r)&&e[r]!==t[r]&&n.push(r);return n}function bA(e,t,n={}){if(e===t)return!0;for(let r in t)if(!(r in e&&xA(e[r],t[r],n[r])))return!1;for(let n in e)if(!(n in t))return!1;return!0}function xA(e,t,n){return e===t||n===!0?!0:n?n(e,t):!1}function SA(e,t=0,n,r=1){let i=[];n??=Object.keys(e).length;for(let a=t;a<n;a+=r){let t=e[a];t!==void 0&&i.push(t)}return i}var CA={};function wA(e,t){CA[e]=t}function TA(e){return new CA[e]}wA(`gregory`,class{getMarkerYear(e){return e.getUTCFullYear()}getMarkerMonth(e){return e.getUTCMonth()}getMarkerDay(e){return e.getUTCDate()}arrayToMarker(e){return wk(e)}markerToArray(e){return Ck(e)}});var EA=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function DA(e){let t=EA.exec(e);if(t){let e=new Date(Date.UTC(Number(t[1]),t[3]?Number(t[3])-1:0,Number(t[5]||1),Number(t[7]||0),Number(t[8]||0),Number(t[10]||0),t[12]?Number(`0.${t[12]}`)*1e3:0));if(Tk(e)){let n=null;return t[13]&&(n=(t[15]===`-`?-1:1)*(Number(t[16]||0)*60+Number(t[18]||0))),{marker:e,isTimeUnspecified:!t[6],timeZoneOffset:n}}}return null}var OA=class{constructor(e){let t=this.timeZone=e.timeZone,n=t!==`local`&&t!==`UTC`;e.namedTimeZoneImpl&&n&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(t)),this.canComputeOffset=!(n&&!this.namedTimeZoneImpl),this.calendarSystem=TA(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,e.weekNumberCalculation===`ISO`&&(this.weekDow=1,this.weekDoy=4),typeof e.firstDay==`number`&&(this.weekDow=e.firstDay),typeof e.weekNumberCalculation==`function`&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=e.weekText==null?e.locale.options.weekText:e.weekText,this.weekTextLong=(e.weekTextLong==null?e.locale.options.weekTextLong:e.weekTextLong)||this.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}createMarker(e){let t=this.createMarkerMeta(e);return t===null?null:t.marker}createNowMarker(){return this.canComputeOffset?this.timestampToMarker(new Date().valueOf()):wk(xk(new Date))}createMarkerMeta(e){if(typeof e==`string`)return this.parse(e);let t=null;return typeof e==`number`?t=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(t=this.timestampToMarker(e))):Array.isArray(e)&&(t=wk(e)),t===null||!Tk(t)?null:{marker:t,isTimeUnspecified:!1,forcedTzo:null}}parse(e){let t=DA(e);if(t===null)return null;let{marker:n}=t,r=null;return t.timeZoneOffset!==null&&(this.canComputeOffset?n=this.timestampToMarker(n.valueOf()-t.timeZoneOffset*60*1e3):r=t.timeZoneOffset),{marker:n,isTimeUnspecified:t.isTimeUnspecified,forcedTzo:r}}getYear(e){return this.calendarSystem.getMarkerYear(e)}getMonth(e){return this.calendarSystem.getMarkerMonth(e)}getDay(e){return this.calendarSystem.getMarkerDay(e)}add(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]+=t.years,n[1]+=t.months,n[2]+=t.days,n[6]+=t.milliseconds,this.calendarSystem.arrayToMarker(n)}subtract(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]-=t.years,n[1]-=t.months,n[2]-=t.days,n[6]-=t.milliseconds,this.calendarSystem.arrayToMarker(n)}addYears(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]+=t,this.calendarSystem.arrayToMarker(n)}addMonths(e,t){let n=this.calendarSystem.markerToArray(e);return n[1]+=t,this.calendarSystem.arrayToMarker(n)}diffWholeYears(e,t){let{calendarSystem:n}=this;return Ek(e)===Ek(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)&&n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerYear(t)-n.getMarkerYear(e):null}diffWholeMonths(e,t){let{calendarSystem:n}=this;return Ek(e)===Ek(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)?n.getMarkerMonth(t)-n.getMarkerMonth(e)+(n.getMarkerYear(t)-n.getMarkerYear(e))*12:null}greatestWholeUnit(e,t){let n=this.diffWholeYears(e,t);return n===null?(n=this.diffWholeMonths(e,t),n===null?(n=fk(e,t),n===null?(n=pk(e,t),n===null?(n=ck(e,t),HO(n)?{unit:`hour`,value:n}:(n=lk(e,t),HO(n)?{unit:`minute`,value:n}:(n=uk(e,t),HO(n)?{unit:`second`,value:n}:{unit:`millisecond`,value:t.valueOf()-e.valueOf()}))):{unit:`day`,value:n}):{unit:`week`,value:n}):{unit:`month`,value:n}):{unit:`year`,value:n}}countDurationsBetween(e,t,n){let r;return n.years&&(r=this.diffWholeYears(e,t),r!==null)?r/XO(n):n.months&&(r=this.diffWholeMonths(e,t),r!==null)?r/ZO(n):n.days&&(r=pk(e,t),r!==null)?r/QO(n):(t.valueOf()-e.valueOf())/$O(n)}startOf(e,t){return t===`year`?this.startOfYear(e):t===`month`?this.startOfMonth(e):t===`week`?this.startOfWeek(e):t===`day`?mk(e):t===`hour`?hk(e):t===`minute`?gk(e):t===`second`?_k(e):null}startOfYear(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])}startOfMonth(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])}startOfWeek(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])}computeWeekNumber(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):vk(e,this.weekDow,this.weekDoy)}format(e,t,n={}){return t.format({marker:e,timeZoneOffset:n.forcedTzo==null?this.offsetForMarker(e):n.forcedTzo},this)}formatRange(e,t,n,r={}){return r.isEndExclusive&&(t=ak(t,-1)),n.formatRange({marker:e,timeZoneOffset:r.forcedStartTzo==null?this.offsetForMarker(e):r.forcedStartTzo},{marker:t,timeZoneOffset:r.forcedEndTzo==null?this.offsetForMarker(t):r.forcedEndTzo},this,r.defaultSeparator)}formatIso(e,t={}){let n=null;return t.omitTimeZoneOffset||(n=t.forcedTzo==null?this.offsetForMarker(e):t.forcedTzo),Dk(e,n,t.omitTime)}timestampToMarker(e){return this.timeZone===`local`?wk(xk(new Date(e))):this.timeZone===`UTC`||!this.namedTimeZoneImpl?new Date(e):wk(this.namedTimeZoneImpl.timestampToArray(e))}offsetForMarker(e){return this.timeZone===`local`?-Sk(Ck(e)).getTimezoneOffset():this.timeZone===`UTC`?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(Ck(e)):null}toDate(e,t){return this.timeZone===`local`?Sk(Ck(e)):this.timeZone===`UTC`?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-this.namedTimeZoneImpl.offsetForArray(Ck(e))*1e3*60):new Date(e.valueOf()-(t||0))}},kA=class{constructor(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}setIconOverride(e){let t,n;if(typeof e==`object`&&e){for(n in t=Object.assign({},this.iconClasses),e)t[n]=this.applyIconOverridePrefix(e[n]);this.iconClasses=t}else e===!1&&(this.iconClasses={})}applyIconOverridePrefix(e){let t=this.iconOverridePrefix;return t&&e.indexOf(t)!==0&&(e=t+e),e}getClass(e){return this.classes[e]||``}getIconClass(e,t){let n;return n=t&&this.rtlIconClasses&&this.rtlIconClasses[e]||this.iconClasses[e],n?`${this.baseIconClass} ${n}`:``}getCustomButtonIconClass(e){let t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption],t)?`${this.baseIconClass} ${this.applyIconOverridePrefix(t)}`:``}};kA.prototype.classes={},kA.prototype.iconClasses={},kA.prototype.baseIconClass=``,kA.prototype.iconOverridePrefix=``;function AA(e){e();let t=X.debounceRendering,n=[];function r(e){n.push(e)}for(X.debounceRendering=r,yD(Z(jA,{}),document.createElement(`div`));n.length;)n.shift()();X.debounceRendering=t}var jA=class extends nD{render(){return Z(`div`,{})}componentDidMount(){this.setState({})}};function MA(e){let t=bD(e),n=t.Provider;return t.Provider=function(){let e=!this.getChildContext,t=n.apply(this,arguments);if(e){let e=[];this.shouldComponentUpdate=t=>{this.props.value!==t.value&&e.forEach(e=>{e.context=t.value,e.forceUpdate()})},this.sub=t=>{e.push(t);let n=t.componentWillUnmount;t.componentWillUnmount=()=>{e.splice(e.indexOf(t),1),n&&n.call(t)}}}return t},t}var NA=class{constructor(e,t,n,r){this.execFunc=e,this.emitter=t,this.scrollTime=n,this.scrollTimeReset=r,this.handleScrollRequest=e=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},e),this.drain()},t.on(`_scrollRequest`,this.handleScrollRequest),this.fireInitialScroll()}detach(){this.emitter.off(`_scrollRequest`,this.handleScrollRequest)}update(e){e&&this.scrollTimeReset?this.fireInitialScroll():this.drain()}fireInitialScroll(){this.handleScrollRequest({time:this.scrollTime})}drain(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)}},PA=MA({});function FA(e,t,n,r,i,a,o,s,c,l,u,d,f,p){return{dateEnv:i,nowManager:a,options:n,pluginHooks:s,emitter:u,dispatch:c,getCurrentData:l,calendarApi:d,viewSpec:e,viewApi:t,dateProfileGenerator:r,theme:o,isRtl:n.direction===`rtl`,addResizeHandler(e){u.on(`_resize`,e)},removeResizeHandler(e){u.off(`_resize`,e)},createScrollResponder(e){return new NA(e,u,GO(n.scrollTime),n.scrollTimeReset)},registerInteractiveComponent:f,unregisterInteractiveComponent:p}}var IA=class extends nD{shouldComponentUpdate(e,t){return!bA(this.props,e,this.propEquality)||!bA(this.state,t,this.stateEquality)}safeSetState(e){bA(this.state,Object.assign(Object.assign({},this.state),e),this.stateEquality)||this.setState(e)}};IA.addPropsEquality=RA,IA.addStateEquality=zA,IA.contextType=PA,IA.prototype.propEquality={},IA.prototype.stateEquality={};var LA=class extends IA{};LA.contextType=PA;function RA(e){let t=Object.create(this.prototype.propEquality);Object.assign(t,e),this.prototype.propEquality=t}function zA(e){let t=Object.create(this.prototype.stateEquality);Object.assign(t,e),this.prototype.stateEquality=t}function BA(e,t){typeof e==`function`?e(t):e&&(e.current=t)}var VA=class extends LA{constructor(){super(...arguments),this.id=FO(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=e=>{let{options:t}=this.context,{generatorName:n}=this.props;t.customRenderingReplaces&&HA(n,t)||this.updateElRef(e)},this.updateElRef=e=>{this.props.elRef&&BA(this.props.elRef,e)}}render(){let{props:e,context:t}=this,{options:n}=t,{customGenerator:r,defaultGenerator:i,renderProps:a}=e,o=UA(e,[],this.handleEl),s=!1,c,l=[],u;if(r!=null){let e=typeof r==`function`?r(a,Z):r;if(e===!0)s=!0;else{let t=e&&typeof e==`object`;t&&`html`in e?o.dangerouslySetInnerHTML={__html:e.html}:t&&`domNodes`in e?l=Array.prototype.slice.call(e.domNodes):(t?LE(e):typeof e!=`function`)?c=e:u=e}}else s=!HA(e.generatorName,n);return s&&i&&(c=i(a)),this.queuedDomNodes=l,this.currentGeneratorMeta=u,Z(e.elTag,o,c)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(e){let{props:t,context:n}=this,{handleCustomRendering:r,customRenderingMetaMap:i}=n.options;if(r){let n=this.currentGeneratorMeta??i?.[t.generatorName];n&&r(Object.assign(Object.assign({id:this.id,isActive:e,containerEl:this.base,reportNewContainerEl:this.updateElRef,generatorMeta:n},t),{elClasses:(t.elClasses||[]).filter(WA)}))}}applyQueueudDomNodes(){let{queuedDomNodes:e,currentDomNodes:t}=this,n=this.base;if(!tk(e,t)){t.forEach(yO);for(let t of e)n.appendChild(t);this.currentDomNodes=e}}};VA.addPropsEquality({elClasses:tk,elStyle:gA,elAttrs:vA,renderProps:gA});function HA(e,t){return!!(t.handleCustomRendering&&e&&t.customRenderingMetaMap?.[e])}function UA(e,t,n){let r=Object.assign(Object.assign({},e.elAttrs),{ref:n});return(e.elClasses||t)&&(r.className=(e.elClasses||[]).concat(t||[]).concat(r.className||[]).filter(Boolean).join(` `)),e.elStyle&&(r.style=e.elStyle),r}function WA(e){return!!e}var GA=MA(0),KA=class extends nD{constructor(){super(...arguments),this.InnerContent=qA.bind(void 0,this),this.handleEl=e=>{this.el=e,this.props.elRef&&(BA(this.props.elRef,e),e&&this.didMountMisfire&&this.componentDidMount())}}render(){let{props:e}=this,t=JA(e.classNameGenerator,e.renderProps);if(e.children){let n=UA(e,t,this.handleEl),r=e.children(this.InnerContent,e.renderProps,n);return e.elTag?Z(e.elTag,n,r):r}return Z(VA,Object.assign(Object.assign({},e),{elRef:this.handleEl,elTag:e.elTag||`div`,elClasses:(e.elClasses||[]).concat(t),renderId:this.context}))}componentDidMount(){var e,t;this.el?(t=(e=this.props).didMount)==null||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el})):this.didMountMisfire=!0}componentWillUnmount(){var e,t;(t=(e=this.props).willUnmount)==null||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el}))}};KA.contextType=GA;function qA(e,t){let n=e.props;return Z(VA,Object.assign({renderProps:n.renderProps,generatorName:n.generatorName,customGenerator:n.customGenerator,defaultGenerator:n.defaultGenerator,renderId:e.context},t))}function JA(e,t){let n=typeof e==`function`?e(t):e||[];return typeof n==`string`?[n]:n}var YA=class extends LA{render(){let{props:e,context:t}=this,{options:n}=t,r={view:t.viewApi};return Z(KA,{elRef:e.elRef,elTag:e.elTag||`div`,elAttrs:e.elAttrs,elClasses:[...XA(e.viewSpec),...e.elClasses||[]],elStyle:e.elStyle,renderProps:r,classNameGenerator:n.viewClassNames,generatorName:void 0,didMount:n.viewDidMount,willUnmount:n.viewWillUnmount},()=>e.children)}};function XA(e){return[`fc-${e.type}-view`,`fc-view`]}function ZA(e,t){let n=null,r=null;return e.start&&(n=t.createMarker(e.start)),e.end&&(r=t.createMarker(e.end)),!n&&!r||n&&r&&r<n?null:{start:n,end:r}}function QA(e,t){let n=[],{start:r}=t,i,a;for(e.sort($A),i=0;i<e.length;i+=1)a=e[i],a.start>r&&n.push({start:r,end:a.start}),a.end>r&&(r=a.end);return r<t.end&&n.push({start:r,end:t.end}),n}function $A(e,t){return e.start.valueOf()-t.start.valueOf()}function ej(e,t){let{start:n,end:r}=e,i=null;return t.start!==null&&(n=n===null?t.start:new Date(Math.max(n.valueOf(),t.start.valueOf()))),t.end!=null&&(r=r===null?t.end:new Date(Math.min(r.valueOf(),t.end.valueOf()))),(n===null||r===null||n<r)&&(i={start:n,end:r}),i}function tj(e,t){return(e.end===null||t.start===null||e.end>t.start)&&(e.start===null||t.end===null||e.start<t.end)}function nj(e,t){return(e.start===null||t>=e.start)&&(e.end===null||t<e.end)}function rj(e,t){return t.start!=null&&e<t.start?t.start:t.end!=null&&e>=t.end?new Date(t.end.valueOf()-1):e}function ij(e){let t=Math.floor(sk(e.start,e.end))||1,n=mk(e.start);return{start:n,end:ik(n,t)}}function aj(e,t=GO(0)){let n=null,r=null;if(e.end){r=mk(e.end);let n=e.end.valueOf()-r.valueOf();n&&n>=$O(t)&&(r=ik(r,1))}return e.start&&(n=mk(e.start),r&&r<=n&&(r=ik(n,1))),{start:n,end:r}}function oj(e,t,n,r){return r===`year`?GO(n.diffWholeYears(e,t),`year`):r===`month`?GO(n.diffWholeMonths(e,t),`month`):dk(e,t)}var sj=class{constructor(e){this.props=e,this.initHiddenDays()}buildPrev(e,t,n){let{dateEnv:r}=this.props,i=r.subtract(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,-1,n)}buildNext(e,t,n){let{dateEnv:r}=this.props,i=r.add(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,1,n)}build(e,t,n=!0){let{props:r}=this,i,a,o,s,c,l;return i=this.buildValidRange(),i=this.trimHiddenDays(i),n&&(e=rj(e,i)),a=this.buildCurrentRangeInfo(e,t),o=/^(year|month|week|day)$/.test(a.unit),s=this.buildRenderRange(this.trimHiddenDays(a.range),a.unit,o),s=this.trimHiddenDays(s),c=s,r.showNonCurrentDates||(c=ej(c,a.range)),c=this.adjustActiveRange(c),c=ej(c,i),l=tj(a.range,i),nj(s,e)||(e=s.start),{currentDate:e,validRange:i,currentRange:a.range,currentRangeUnit:a.unit,isRangeAllDay:o,activeRange:c,renderRange:s,slotMinTime:r.slotMinTime,slotMaxTime:r.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(a.duration)}}buildValidRange(){let e=this.props.validRangeInput,t=typeof e==`function`?e.call(this.props.calendarApi,this.props.dateEnv.toDate(this.props.nowManager.getDateMarker())):e;return this.refineRange(t)||{start:null,end:null}}buildCurrentRangeInfo(e,t){let{props:n}=this,r=null,i=null,a=null,o;return n.duration?(r=n.duration,i=n.durationUnit,a=this.buildRangeFromDuration(e,t,r,i)):(o=this.props.dayCount)?(i=`day`,a=this.buildRangeFromDayCount(e,t,o)):(a=this.buildCustomVisibleRange(e))?i=n.dateEnv.greatestWholeUnit(a.start,a.end).unit:(r=this.getFallbackDuration(),i=ek(r).unit,a=this.buildRangeFromDuration(e,t,r,i)),{duration:r,unit:i,range:a}}getFallbackDuration(){return GO({day:1})}adjustActiveRange(e){let{dateEnv:t,usesMinMaxTime:n,slotMinTime:r,slotMaxTime:i}=this.props,{start:a,end:o}=e;return n&&(QO(r)<0&&(a=mk(a),a=t.add(a,r)),QO(i)>1&&(o=mk(o),o=ik(o,-1),o=t.add(o,i))),{start:a,end:o}}buildRangeFromDuration(e,t,n,r){let{dateEnv:i,dateAlignment:a}=this.props,o,s,c;if(!a){let{dateIncrement:e}=this.props;a=e&&$O(e)<$O(n)?ek(e).unit:r}QO(n)<=1&&this.isHiddenDay(o)&&(o=this.skipHiddenDays(o,t),o=mk(o));function l(){o=i.startOf(e,a),s=i.add(o,n),c={start:o,end:s}}return l(),this.trimHiddenDays(c)||(e=this.skipHiddenDays(e,t),l()),c}buildRangeFromDayCount(e,t,n){let{dateEnv:r,dateAlignment:i}=this.props,a=0,o=e,s;i&&(o=r.startOf(o,i)),o=mk(o),o=this.skipHiddenDays(o,t),s=o;do s=ik(s,1),this.isHiddenDay(s)||(a+=1);while(a<n);return{start:o,end:s}}buildCustomVisibleRange(e){let{props:t}=this,n=t.visibleRangeInput,r=typeof n==`function`?n.call(t.calendarApi,t.dateEnv.toDate(e)):n,i=this.refineRange(r);return i&&(i.start==null||i.end==null)?null:i}buildRenderRange(e,t,n){return e}buildDateIncrement(e){let{dateIncrement:t}=this.props,n;return t||((n=this.props.dateAlignment)?GO(1,n):e||GO({days:1}))}refineRange(e){if(e){let t=ZA(e,this.props.dateEnv);return t&&=aj(t),t}return null}initHiddenDays(){let e=this.props.hiddenDays||[],t=[],n=0,r;for(this.props.weekends===!1&&e.push(0,6),r=0;r<7;r+=1)(t[r]=e.indexOf(r)!==-1)||(n+=1);if(!n)throw Error(`invalid hiddenDays`);this.isHiddenDayHash=t}trimHiddenDays(e){let{start:t,end:n}=e;return t&&=this.skipHiddenDays(t),n&&=this.skipHiddenDays(n,-1,!0),t==null||n==null||t<n?{start:t,end:n}:null}isHiddenDay(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]}skipHiddenDays(e,t=1,n=!1){for(;this.isHiddenDayHash[(e.getUTCDay()+(n?t:0)+7)%7];)e=ik(e,t);return e}};function cj(e,t,n,r){return{instanceId:FO(),defId:e,range:t,forcedStartTzo:n??null,forcedEndTzo:r??null}}function lj(e,t,n,r){for(let i=0;i<r.length;i+=1){let a=r[i].parse(e,n);if(a){let{allDay:n}=e;return n??(n=t,n??(n=a.allDayGuess,n??=!1)),{allDay:n,duration:a.duration,typeData:a.typeData,typeId:i}}}return null}function uj(e,t,n){let{dateEnv:r,pluginHooks:i,options:a}=n,{defs:o,instances:s}=e;s=fA(s,e=>!o[e.defId].recurringDef);for(let e in o){let n=o[e];if(n.recurringDef){let{duration:o}=n.recurringDef;o||=n.allDay?a.defaultAllDayEventDuration:a.defaultTimedEventDuration;let c=dj(n,o,t,r,i.recurringTypes);for(let t of c){let n=cj(e,{start:t,end:r.add(t,o)});s[n.instanceId]=n}}}return{defs:o,instances:s}}function dj(e,t,n,r,i){let a=i[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(a=a.map(mk)),a}var fj={id:String,groupId:String,title:String,url:String,interactive:Boolean},pj={start:$,end:$,date:$,allDay:Boolean},mj=Object.assign(Object.assign(Object.assign({},fj),pj),{extendedProps:$});function hj(e,t,n,r,i=_j(n),a,o){let{refined:s,extra:c}=gj(e,n,i),l=bj(t,n),u=lj(s,l,n.dateEnv,n.pluginHooks.recurringTypes);if(u){let e=vj(s,c,t?t.sourceId:``,u.allDay,!!u.duration,n,a);return e.recurringDef={typeId:u.typeId,typeData:u.typeData,duration:u.duration},{def:e,instance:null}}let d=yj(s,l,n,r);if(d){let e=vj(s,c,t?t.sourceId:``,d.allDay,d.hasEnd,n,a),r=cj(e.defId,d.range,d.forcedStartTzo,d.forcedEndTzo);return o&&e.publicId&&o[e.publicId]&&(r.instanceId=o[e.publicId]),{def:e,instance:r}}return null}function gj(e,t,n=_j(t)){return lA(e,n)}function _j(e){return Object.assign(Object.assign(Object.assign({},jj),mj),e.pluginHooks.eventRefiners)}function vj(e,t,n,r,i,a,o){let s={title:e.title||``,groupId:e.groupId||``,publicId:e.id||``,url:e.url||``,recurringDef:null,defId:(o&&e.id?o[e.id]:``)||FO(),sourceId:n,allDay:r,hasEnd:i,interactive:e.interactive,ui:Nj(e,a),extendedProps:Object.assign(Object.assign({},e.extendedProps||{}),t)};for(let t of a.pluginHooks.eventDefMemberAdders)Object.assign(s,t(e));return Object.freeze(s.ui.classNames),Object.freeze(s.extendedProps),s}function yj(e,t,n,r){let{allDay:i}=e,a,o=null,s=!1,c,l=null,u=e.start==null?e.date:e.start;if(a=n.dateEnv.createMarkerMeta(u),a)o=a.marker;else if(!r)return null;return e.end!=null&&(c=n.dateEnv.createMarkerMeta(e.end)),i??=t??((!a||a.isTimeUnspecified)&&(!c||c.isTimeUnspecified)),i&&o&&(o=mk(o)),c&&(l=c.marker,i&&(l=mk(l)),o&&l<=o&&(l=null)),l?s=!0:r||(s=n.options.forceEventDuration||!1,l=n.dateEnv.add(o,i?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:i,hasEnd:s,range:{start:o,end:l},forcedStartTzo:a?a.forcedTzo:null,forcedEndTzo:c?c.forcedTzo:null}}function bj(e,t){let n=null;return e&&(n=e.defaultAllDay),n??=t.options.defaultAllDay,n}function xj(e,t,n,r,i,a){let o=Tj(),s=_j(n);for(let c of e){let e=hj(c,t,n,r,s,i,a);e&&Sj(e,o)}return o}function Sj(e,t=Tj()){return t.defs[e.def.defId]=e.def,e.instance&&(t.instances[e.instance.instanceId]=e.instance),t}function Cj(e,t){let n=e.instances[t];if(n){let t=e.defs[n.defId],r=Dj(e,e=>wj(t,e));return r.defs[t.defId]=t,r.instances[n.instanceId]=n,r}return Tj()}function wj(e,t){return!!(e.groupId&&e.groupId===t.groupId)}function Tj(){return{defs:{},instances:{}}}function Ej(e,t){return{defs:Object.assign(Object.assign({},e.defs),t.defs),instances:Object.assign(Object.assign({},e.instances),t.instances)}}function Dj(e,t){let n=fA(e.defs,t);return{defs:n,instances:fA(e.instances,e=>n[e.defId])}}function Oj(e,t){let{defs:n,instances:r}=e,i={},a={};for(let e in n)t.defs[e]||(i[e]=n[e]);for(let e in r)!t.instances[e]&&i[r[e].defId]&&(a[e]=r[e]);return{defs:i,instances:a}}function kj(e,t){return Array.isArray(e)?xj(e,null,t,!0):typeof e==`object`&&e?xj([e],null,t,!0):e==null?null:String(e)}function Aj(e){return Array.isArray(e)?e:typeof e==`string`?e.split(/\s+/):[]}var jj={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:$,overlap:$,allow:$,className:Aj,classNames:Aj,color:String,backgroundColor:String,borderColor:String,textColor:String},Mj={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:``,borderColor:``,textColor:``,classNames:[]};function Nj(e,t){let n=kj(e.constraint,t);return{display:e.display||null,startEditable:e.startEditable==null?e.editable:e.startEditable,durationEditable:e.durationEditable==null?e.editable:e.durationEditable,constraints:n==null?[]:[n],overlap:e.overlap==null?null:e.overlap,allows:e.allow==null?[]:[e.allow],backgroundColor:e.backgroundColor||e.color||``,borderColor:e.borderColor||e.color||``,textColor:e.textColor||``,classNames:(e.className||[]).concat(e.classNames||[])}}function Pj(e){return e.reduce(Fj,Mj)}function Fj(e,t){return{display:t.display==null?e.display:t.display,startEditable:t.startEditable==null?e.startEditable:t.startEditable,durationEditable:t.durationEditable==null?e.durationEditable:t.durationEditable,constraints:e.constraints.concat(t.constraints),overlap:typeof t.overlap==`boolean`?t.overlap:e.overlap,allows:e.allows.concat(t.allows),backgroundColor:t.backgroundColor||e.backgroundColor,borderColor:t.borderColor||e.borderColor,textColor:t.textColor||e.textColor,classNames:e.classNames.concat(t.classNames)}}var Ij={id:String,defaultAllDay:Boolean,url:String,format:String,events:$,eventDataTransform:$,success:$,failure:$};function Lj(e,t,n=Rj(t)){let r;if(typeof e==`string`?r={url:e}:typeof e==`function`||Array.isArray(e)?r={events:e}:typeof e==`object`&&e&&(r=e),r){let{refined:i,extra:a}=lA(r,n),o=zj(i,t);if(o)return{_raw:e,isFetching:!1,latestFetchId:``,fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||``,sourceId:FO(),sourceDefId:o.sourceDefId,meta:o.meta,ui:Nj(i,t),extendedProps:a}}return null}function Rj(e){return Object.assign(Object.assign(Object.assign({},jj),Ij),e.pluginHooks.eventSourceRefiners)}function zj(e,t){let n=t.pluginHooks.eventSourceDefs;for(let t=n.length-1;t>=0;--t){let r=n[t].parseMeta(e);if(r)return{sourceDefId:t,meta:r}}return null}function Bj(e,t,n,r,i){switch(t.type){case`RECEIVE_EVENTS`:return Vj(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,i);case`RESET_RAW_EVENTS`:return Hj(e,n[t.sourceId],t.rawEvents,r.activeRange,i);case`ADD_EVENTS`:return Gj(e,t.eventStore,r?r.activeRange:null,i);case`RESET_EVENTS`:return t.eventStore;case`MERGE_EVENTS`:return Ej(e,t.eventStore);case`PREV`:case`NEXT`:case`CHANGE_DATE`:case`CHANGE_VIEW_TYPE`:return r?uj(e,r.activeRange,i):e;case`REMOVE_EVENTS`:return Oj(e,t.eventStore);case`REMOVE_EVENT_SOURCE`:return qj(e,t.sourceId);case`REMOVE_ALL_EVENT_SOURCES`:return Dj(e,e=>!e.sourceId);case`REMOVE_ALL_EVENTS`:return Tj();default:return e}}function Vj(e,t,n,r,i,a){if(t&&n===t.latestFetchId){let n=xj(Uj(i,t,a),t,a);return r&&(n=uj(n,r,a)),Ej(qj(e,t.sourceId),n)}return e}function Hj(e,t,n,r,i){let{defIdMap:a,instanceIdMap:o}=Jj(e);return uj(xj(Uj(n,t,i),t,i,!1,a,o),r,i)}function Uj(e,t,n){let r=n.options.eventDataTransform,i=t?t.eventDataTransform:null;return i&&(e=Wj(e,i)),r&&(e=Wj(e,r)),e}function Wj(e,t){let n;if(!t)n=e;else{n=[];for(let r of e){let e=t(r);e?n.push(e):e??n.push(r)}}return n}function Gj(e,t,n,r){return n&&(t=uj(t,n,r)),Ej(e,t)}function Kj(e,t,n){let{defs:r}=e;return{defs:r,instances:pA(e.instances,e=>r[e.defId].allDay?e:Object.assign(Object.assign({},e),{range:{start:n.createMarker(t.toDate(e.range.start,e.forcedStartTzo)),end:n.createMarker(t.toDate(e.range.end,e.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:e.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:e.forcedEndTzo}))}}function qj(e,t){return Dj(e,e=>e.sourceId!==t)}function Jj(e){let{defs:t,instances:n}=e,r={},i={};for(let e in t){let{publicId:n}=t[e];n&&(r[n]=e)}for(let e in n){let{publicId:r}=t[n[e].defId];r&&(i[r]=e)}return{defIdMap:r,instanceIdMap:i}}var Yj=class{constructor(){this.handlers={},this.thisContext=null}setThisContext(e){this.thisContext=e}setOptions(e){this.options=e}on(e,t){Xj(this.handlers,e,t)}off(e,t){Zj(this.handlers,e,t)}trigger(e,...t){let n=this.handlers[e]||[],r=this.options&&this.options[e],i=[].concat(r||[],n);for(let e of i)e.apply(this.thisContext,t)}hasHandlers(e){return!!(this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e])}};function Xj(e,t,n){(e[t]||(e[t]=[])).push(n)}function Zj(e,t,n){n?e[t]&&(e[t]=e[t].filter(e=>e!==n)):delete e[t]}var Qj={startTime:`09:00`,endTime:`17:00`,daysOfWeek:[1,2,3,4,5],display:`inverse-background`,classNames:`fc-non-business`,groupId:`_businessHours`};function $j(e,t){return xj(eM(e),null,t)}function eM(e){let t;return t=e===!0?[{}]:Array.isArray(e)?e.filter(e=>e.daysOfWeek):typeof e==`object`&&e?[e]:[],t=t.map(e=>Object.assign(Object.assign({},Qj),e)),t}function tM(e,t,n){n.emitter.trigger(`select`,Object.assign(Object.assign({},rM(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function nM(e,t){t.emitter.trigger(`unselect`,{jsEvent:e?e.origEvent:null,view:t.viewApi||t.calendarApi.view})}function rM(e,t){let n={};for(let r of t.pluginHooks.dateSpanTransforms)Object.assign(n,r(e,t));return Object.assign(n,AM(e,t.dateEnv)),n}function iM(e,t,n){let{dateEnv:r,options:i}=n,a=t;return e?(a=mk(a),a=r.add(a,i.defaultAllDayEventDuration)):a=r.add(a,i.defaultTimedEventDuration),a}function aM(e,t,n,r){let i=hM(e.defs,t),a=Tj();for(let t in e.defs){let o=e.defs[t];a.defs[t]=oM(o,i[t],n,r)}for(let t in e.instances){let o=e.instances[t],s=a.defs[o.defId];a.instances[t]=sM(o,s,i[o.defId],n,r)}return a}function oM(e,t,n,r){let i=n.standardProps||{};i.hasEnd==null&&t.durationEditable&&(n.startDelta||n.endDelta)&&(i.hasEnd=!0);let a=Object.assign(Object.assign(Object.assign({},e),i),{ui:Object.assign(Object.assign({},e.ui),i.ui)});n.extendedProps&&(a.extendedProps=Object.assign(Object.assign({},a.extendedProps),n.extendedProps));for(let e of r.pluginHooks.eventDefMutationAppliers)e(a,n,r);return!a.hasEnd&&r.options.forceEventDuration&&(a.hasEnd=!0),a}function sM(e,t,n,r,i){let{dateEnv:a}=i,o=r.standardProps&&r.standardProps.allDay===!0,s=r.standardProps&&r.standardProps.hasEnd===!1,c=Object.assign({},e);return o&&(c.range=ij(c.range)),r.datesDelta&&n.startEditable&&(c.range={start:a.add(c.range.start,r.datesDelta),end:a.add(c.range.end,r.datesDelta)}),r.startDelta&&n.durationEditable&&(c.range={start:a.add(c.range.start,r.startDelta),end:c.range.end}),r.endDelta&&n.durationEditable&&(c.range={start:c.range.start,end:a.add(c.range.end,r.endDelta)}),s&&(c.range={start:c.range.start,end:iM(t.allDay,c.range.start,i)}),t.allDay&&(c.range={start:mk(c.range.start),end:mk(c.range.end)}),c.range.end<c.range.start&&(c.range.end=iM(t.allDay,c.range.start,i)),c}var cM=class{constructor(e,t){this.context=e,this.internalEventSource=t}remove(){this.context.dispatch({type:`REMOVE_EVENT_SOURCE`,sourceId:this.internalEventSource.sourceId})}refetch(){this.context.dispatch({type:`FETCH_EVENT_SOURCES`,sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})}get id(){return this.internalEventSource.publicId}get url(){return this.internalEventSource.meta.url}get format(){return this.internalEventSource.meta.format}},lM=class e{constructor(e,t,n){this._context=e,this._def=t,this._instance=n||null}setProp(e,t){if(e in pj)console.warn(`Could not set date-related prop 'name'. Use one of the date-related methods instead.`);else if(e===`id`)t=fj[e](t),this.mutate({standardProps:{publicId:t}});else if(e in fj)t=fj[e](t),this.mutate({standardProps:{[e]:t}});else if(e in jj){let n=jj[e](t);n=e===`color`?{backgroundColor:t,borderColor:t}:e===`editable`?{startEditable:t,durationEditable:t}:{[e]:t},this.mutate({standardProps:{ui:n}})}else console.warn(`Could not set prop '${e}'. Use setExtendedProp instead.`)}setExtendedProp(e,t){this.mutate({extendedProps:{[e]:t}})}setStart(e,t={}){let{dateEnv:n}=this._context,r=n.createMarker(e);if(r&&this._instance){let e=this._instance.range,i=oj(e.start,r,n,t.granularity);t.maintainDuration?this.mutate({datesDelta:i}):this.mutate({startDelta:i})}}setEnd(e,t={}){let{dateEnv:n}=this._context,r;if(!(e!=null&&(r=n.createMarker(e),!r))&&this._instance){if(r){let e=oj(this._instance.range.end,r,n,t.granularity);this.mutate({endDelta:e})}else this.mutate({standardProps:{hasEnd:!1}})}}setDates(e,t,n={}){let{dateEnv:r}=this._context,i={allDay:n.allDay},a=r.createMarker(e),o;if(a&&!(t!=null&&(o=r.createMarker(t),!o))&&this._instance){let e=this._instance.range;n.allDay===!0&&(e=ij(e));let t=oj(e.start,a,r,n.granularity);if(o){let a=oj(e.end,o,r,n.granularity);JO(t,a)?this.mutate({datesDelta:t,standardProps:i}):this.mutate({startDelta:t,endDelta:a,standardProps:i})}else i.hasEnd=!1,this.mutate({datesDelta:t,standardProps:i})}}moveStart(e){let t=GO(e);t&&this.mutate({startDelta:t})}moveEnd(e){let t=GO(e);t&&this.mutate({endDelta:t})}moveDates(e){let t=GO(e);t&&this.mutate({datesDelta:t})}setAllDay(e,t={}){let n={allDay:e},{maintainDuration:r}=t;r??=this._context.options.allDayMaintainDuration,this._def.allDay!==e&&(n.hasEnd=r),this.mutate({standardProps:n})}formatRange(e){let{dateEnv:t}=this._context,n=this._instance,r=$k(e);return this._def.hasEnd?t.formatRange(n.range.start,n.range.end,r,{forcedStartTzo:n.forcedStartTzo,forcedEndTzo:n.forcedEndTzo}):t.format(n.range.start,r,{forcedTzo:n.forcedStartTzo})}mutate(t){let n=this._instance;if(n){let r=this._def,i=this._context,{eventStore:a}=i.getCurrentData(),o=Cj(a,n.instanceId);o=aM(o,{"":{display:``,startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:``,borderColor:``,textColor:``,classNames:[]}},t,i);let s=new e(i,r,n);this._def=o.defs[r.defId],this._instance=o.instances[n.instanceId],i.dispatch({type:`MERGE_EVENTS`,eventStore:o}),i.emitter.trigger(`eventChange`,{oldEvent:s,event:this,relatedEvents:dM(o,i,n),revert(){i.dispatch({type:`RESET_EVENTS`,eventStore:a})}})}}remove(){let e=this._context,t=uM(this);e.dispatch({type:`REMOVE_EVENTS`,eventStore:t}),e.emitter.trigger(`eventRemove`,{event:this,relatedEvents:[],revert(){e.dispatch({type:`MERGE_EVENTS`,eventStore:t})}})}get source(){let{sourceId:e}=this._def;return e?new cM(this._context,this._context.getCurrentData().eventSources[e]):null}get start(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null}get end(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null}get startStr(){let e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):``}get endStr(){let e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):``}get id(){return this._def.publicId}get groupId(){return this._def.groupId}get allDay(){return this._def.allDay}get title(){return this._def.title}get url(){return this._def.url}get display(){return this._def.ui.display||`auto`}get startEditable(){return this._def.ui.startEditable}get durationEditable(){return this._def.ui.durationEditable}get constraint(){return this._def.ui.constraints[0]||null}get overlap(){return this._def.ui.overlap}get allow(){return this._def.ui.allows[0]||null}get backgroundColor(){return this._def.ui.backgroundColor}get borderColor(){return this._def.ui.borderColor}get textColor(){return this._def.ui.textColor}get classNames(){return this._def.ui.classNames}get extendedProps(){return this._def.extendedProps}toPlainObject(e={}){let t=this._def,{ui:n}=t,{startStr:r,endStr:i}=this,a={allDay:t.allDay};return t.title&&(a.title=t.title),r&&(a.start=r),i&&(a.end=i),t.publicId&&(a.id=t.publicId),t.groupId&&(a.groupId=t.groupId),t.url&&(a.url=t.url),n.display&&n.display!==`auto`&&(a.display=n.display),e.collapseColor&&n.backgroundColor&&n.backgroundColor===n.borderColor?a.color=n.backgroundColor:(n.backgroundColor&&(a.backgroundColor=n.backgroundColor),n.borderColor&&(a.borderColor=n.borderColor)),n.textColor&&(a.textColor=n.textColor),n.classNames.length&&(a.classNames=n.classNames),Object.keys(t.extendedProps).length&&(e.collapseExtendedProps?Object.assign(a,t.extendedProps):a.extendedProps=t.extendedProps),a}toJSON(){return this.toPlainObject()}};function uM(e){let t=e._def,n=e._instance;return{defs:{[t.defId]:t},instances:n?{[n.instanceId]:n}:{}}}function dM(e,t,n){let{defs:r,instances:i}=e,a=[],o=n?n.instanceId:``;for(let e in i){let n=i[e],s=r[n.defId];n.instanceId!==o&&a.push(new lM(t,s,n))}return a}function fM(e,t,n,r){let i={},a={},o={},s=[],c=[],l=hM(e.defs,t);for(let t in e.defs){let n=e.defs[t];l[n.defId].display===`inverse-background`&&(n.groupId?(i[n.groupId]=[],o[n.groupId]||(o[n.groupId]=n)):a[t]=[])}for(let t in e.instances){let o=e.instances[t],u=e.defs[o.defId],d=l[u.defId],f=o.range,p=!u.allDay&&r?aj(f,r):f,m=ej(p,n);m&&(d.display===`inverse-background`?u.groupId?i[u.groupId].push(m):a[o.defId].push(m):d.display!==`none`&&(d.display===`background`?s:c).push({def:u,ui:d,instance:o,range:m,isStart:p.start&&p.start.valueOf()===m.start.valueOf(),isEnd:p.end&&p.end.valueOf()===m.end.valueOf()}))}for(let e in i){let t=i[e],r=QA(t,n);for(let t of r){let n=o[e],r=l[n.defId];s.push({def:n,ui:r,instance:null,range:t,isStart:!1,isEnd:!1})}}for(let t in a){let r=a[t],i=QA(r,n);for(let n of i)s.push({def:e.defs[t],ui:l[t],instance:null,range:n,isStart:!1,isEnd:!1})}return{bg:s,fg:c}}function pM(e,t){e.fcSeg=t}function mM(e){return e.fcSeg||e.parentNode.fcSeg||null}function hM(e,t){return pA(e,e=>gM(e,t))}function gM(e,t){let n=[];return t[``]&&n.push(t[``]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),Pj(n)}function _M(e,t){let n=e.map(vM);return n.sort((e,n)=>LO(e,n,t)),n.map(e=>e._seg)}function vM(e){let{eventRange:t}=e,n=t.def,r=t.instance?t.instance.range:t.range,i=r.start?r.start.valueOf():0,a=r.end?r.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},n.extendedProps),n),{id:n.publicId,start:i,end:a,duration:a-i,allDay:Number(n.allDay),_seg:e})}function yM(e,t){let{pluginHooks:n}=t,r=n.isDraggableTransformers,{def:i,ui:a}=e.eventRange,o=a.startEditable;for(let e of r)o=e(o,i,a,t);return o}function bM(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function xM(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function SM(e,t,n,r,i,a,o){let{dateEnv:s,options:c}=n,{displayEventTime:l,displayEventEnd:u}=c,d=e.eventRange.def,f=e.eventRange.instance;l??=r!==!1,u??=i!==!1;let p=f.range.start,m=f.range.end,h=a||e.start||e.eventRange.range.start,g=o||e.end||e.eventRange.range.end,_=mk(p).valueOf()===mk(h).valueOf(),v=mk(ak(m,-1)).valueOf()===mk(ak(g,-1)).valueOf();return l&&!d.allDay&&(_||v)?(h=_?p:h,g=v?m:g,u&&d.hasEnd?s.formatRange(h,g,t,{forcedStartTzo:a?null:f.forcedStartTzo,forcedEndTzo:o?null:f.forcedEndTzo}):s.format(h,t,{forcedTzo:a?null:f.forcedStartTzo})):``}function CM(e,t,n){let r=e.eventRange.range;return{isPast:r.end<=(n||t.start),isFuture:r.start>=(n||t.end),isToday:t&&nj(t,r.start)}}function wM(e){let t=[`fc-event`];return e.isMirror&&t.push(`fc-event-mirror`),e.isDraggable&&t.push(`fc-event-draggable`),(e.isStartResizable||e.isEndResizable)&&t.push(`fc-event-resizable`),e.isDragging&&t.push(`fc-event-dragging`),e.isResizing&&t.push(`fc-event-resizing`),e.isSelected&&t.push(`fc-event-selected`),e.isStart&&t.push(`fc-event-start`),e.isEnd&&t.push(`fc-event-end`),e.isPast&&t.push(`fc-event-past`),e.isToday&&t.push(`fc-event-today`),e.isFuture&&t.push(`fc-event-future`),t}function TM(e){return e.instance?e.instance.instanceId:`${e.def.defId}:${e.range.start.toISOString()}`}function EM(e,t){let{def:n,instance:r}=e.eventRange,{url:i}=n;if(i)return{href:i};let{emitter:a,options:o}=t,{eventInteractive:s}=o;return s??(s=n.interactive,s??=!!a.hasHandlers(`eventClick`)),s?NO(e=>{a.trigger(`eventClick`,{el:e.target,event:new lM(t,n,r),jsEvent:e,view:t.viewApi})}):{}}var DM={start:$,end:$,allDay:Boolean};function OM(e,t,n){let r=kM(e,t),{range:i}=r;if(!i.start)return null;if(!i.end){if(n==null)return null;i.end=t.add(i.start,n)}return r}function kM(e,t){let{refined:n,extra:r}=lA(e,DM),i=n.start?t.createMarkerMeta(n.start):null,a=n.end?t.createMarkerMeta(n.end):null,{allDay:o}=n;return o??=i&&i.isTimeUnspecified&&(!a||a.isTimeUnspecified),Object.assign({range:{start:i?i.marker:null,end:a?a.marker:null},allDay:o},r)}function AM(e,t){return Object.assign(Object.assign({},MM(e.range,t,e.allDay)),{allDay:e.allDay})}function jM(e,t,n){return Object.assign(Object.assign({},MM(e,t,n)),{timeZone:t.timeZone})}function MM(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}function NM(e,t,n){let r=gj({editable:!1},n),i=vj(r.refined,r.extra,``,e.allDay,!0,n);return{def:i,ui:gM(i,t),instance:cj(i.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}function PM(e,t,n){let r=!1,i=function(e){r||(r=!0,t(e))},a=function(e){r||(r=!0,n(e))},o=e(i,a);o&&typeof o.then==`function`&&o.then(i,a)}var FM=class extends Error{constructor(e,t){super(e),this.response=t}};function IM(e,t,n){e=e.toUpperCase();let r={method:e};return e===`GET`?t+=(t.indexOf(`?`)===-1?`?`:`&`)+new URLSearchParams(n):(r.body=new URLSearchParams(n),r.headers={"Content-Type":`application/x-www-form-urlencoded`}),fetch(t,r).then(e=>{if(e.ok)return e.json().then(t=>[t,e],()=>{throw new FM(`Failure parsing JSON`,e)});throw new FM(`Request failed`,e)})}var LM;function RM(){return LM??=zM(),LM}function zM(){if(typeof document>`u`)return!0;let e=document.createElement(`div`);e.style.position=`absolute`,e.style.top=`0px`,e.style.left=`0px`,e.innerHTML=`<table><tr><td><div></div></td></tr></table>`,e.querySelector(`table`).style.height=`100px`,e.querySelector(`div`).style.height=`100%`,document.body.appendChild(e);let t=e.querySelector(`div`).offsetHeight>0;return document.body.removeChild(e),t}var BM=class extends LA{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{AA(()=>{this.setState({forPrint:!0})})},this.handleAfterPrint=()=>{AA(()=>{this.setState({forPrint:!1})})}}render(){let{props:e}=this,{options:t}=e,{forPrint:n}=this.state,r=n||t.height===`auto`||t.contentHeight===`auto`,i=!r&&t.height!=null?t.height:``,a=[`fc`,n?`fc-media-print`:`fc-media-screen`,`fc-direction-${t.direction}`,e.theme.getClass(`root`)];return RM()||a.push(`fc-liquid-hack`),e.children(a,i,r,n)}componentDidMount(){let{emitter:e}=this.props;e.on(`_beforeprint`,this.handleBeforePrint),e.on(`_afterprint`,this.handleAfterPrint)}componentWillUnmount(){let{emitter:e}=this.props;e.off(`_beforeprint`,this.handleBeforePrint),e.off(`_afterprint`,this.handleAfterPrint)}},VM=class{constructor(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}destroy(){}};function HM(e,t){return{component:e,el:t.el,useEventCenter:t.useEventCenter==null||t.useEventCenter,isHitComboAllowed:t.isHitComboAllowed||null}}var UM={},WM=class extends nD{constructor(e,t){super(e,t),this.handleRefresh=()=>{let e=this.computeTiming();e.state.nowDate.valueOf()!==this.state.nowDate.valueOf()&&this.setState(e.state),this.clearTimeout(),this.setTimeout(e.waitMs)},this.handleVisibilityChange=()=>{document.hidden||this.handleRefresh()},this.state=this.computeTiming().state}render(){let{props:e,state:t}=this;return e.children(t.nowDate,t.todayRange)}componentDidMount(){this.setTimeout(),this.context.nowManager.addResetListener(this.handleRefresh),document.addEventListener(`visibilitychange`,this.handleVisibilityChange)}componentDidUpdate(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())}componentWillUnmount(){this.clearTimeout(),this.context.nowManager.removeResetListener(this.handleRefresh),document.removeEventListener(`visibilitychange`,this.handleVisibilityChange)}computeTiming(){let{props:e,context:t}=this,n=t.nowManager.getDateMarker(),{nowIndicatorSnap:r}=t.options;r===`auto`&&(r=/year|month|week|day/.test(e.unit)||(e.unitValue||1)===1);let i,a;return r?(i=t.dateEnv.startOf(n,e.unit),a=t.dateEnv.add(i,GO(1,e.unit)).valueOf()-n.valueOf()):(i=n,a=6e4),a=Math.min(864e5,a),{state:{nowDate:i,todayRange:GM(i)},waitMs:a}}setTimeout(e=this.computeTiming().waitMs){this.timeoutId=setTimeout(()=>{let e=this.computeTiming();this.setState(e.state,()=>{this.setTimeout(e.waitMs)})},e)}clearTimeout(){this.timeoutId&&clearTimeout(this.timeoutId)}};WM.contextType=PA;function GM(e){let t=mk(e);return{start:t,end:ik(t,1)}}var KM=class{getCurrentData(){return this.currentDataManager.getCurrentData()}dispatch(e){this.currentDataManager.dispatch(e)}get view(){return this.getCurrentData().viewApi}batchRendering(e){e()}updateSize(){this.trigger(`_resize`,!0)}setOption(e,t){this.dispatch({type:`SET_OPTION`,optionName:e,rawOptionValue:t})}getOption(e){return this.currentDataManager.currentCalendarOptionsInput[e]}getAvailableLocaleCodes(){return Object.keys(this.getCurrentData().availableRawLocales)}on(e,t){let{currentDataManager:n}=this;n.currentCalendarOptionsRefiners[e]?n.emitter.on(e,t):console.warn(`Unknown listener name '${e}'`)}off(e,t){this.currentDataManager.emitter.off(e,t)}trigger(e,...t){this.currentDataManager.emitter.trigger(e,...t)}changeView(e,t){this.batchRendering(()=>{if(this.unselect(),t){if(t.start&&t.end)this.dispatch({type:`CHANGE_VIEW_TYPE`,viewType:e}),this.dispatch({type:`SET_OPTION`,optionName:`visibleRange`,rawOptionValue:t});else{let{dateEnv:n}=this.getCurrentData();this.dispatch({type:`CHANGE_VIEW_TYPE`,viewType:e,dateMarker:n.createMarker(t)})}}else this.dispatch({type:`CHANGE_VIEW_TYPE`,viewType:e})})}zoomTo(e,t){let n=this.getCurrentData(),r;t||=`day`,r=n.viewSpecs[t]||this.getUnitViewSpec(t),this.unselect(),r?this.dispatch({type:`CHANGE_VIEW_TYPE`,viewType:r.type,dateMarker:e}):this.dispatch({type:`CHANGE_DATE`,dateMarker:e})}getUnitViewSpec(e){let{viewSpecs:t,toolbarConfig:n}=this.getCurrentData(),r=[].concat(n.header?n.header.viewsWithButtons:[],n.footer?n.footer.viewsWithButtons:[]),i,a;for(let e in t)r.push(e);for(i=0;i<r.length;i+=1)if(a=t[r[i]],a&&a.singleUnit===e)return a;return null}prev(){this.unselect(),this.dispatch({type:`PREV`})}next(){this.unselect(),this.dispatch({type:`NEXT`})}prevYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:e.dateEnv.addYears(e.currentDate,-1)})}nextYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:e.dateEnv.addYears(e.currentDate,1)})}today(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:e.nowManager.getDateMarker()})}gotoDate(e){let t=this.getCurrentData();this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:t.dateEnv.createMarker(e)})}incrementDate(e){let t=this.getCurrentData(),n=GO(e);n&&(this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:t.dateEnv.add(t.currentDate,n)}))}getDate(){let e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)}formatDate(e,t){let{dateEnv:n}=this.getCurrentData();return n.format(n.createMarker(e),$k(t))}formatRange(e,t,n){let{dateEnv:r}=this.getCurrentData();return r.formatRange(r.createMarker(e),r.createMarker(t),$k(n),n)}formatIso(e,t){let{dateEnv:n}=this.getCurrentData();return n.formatIso(n.createMarker(e),{omitTime:t})}select(e,t){let n;n=t==null?e.start==null?{start:e,end:null}:e:{start:e,end:t};let r=this.getCurrentData(),i=OM(n,r.dateEnv,GO({days:1}));i&&(this.dispatch({type:`SELECT_DATES`,selection:i}),tM(i,null,r))}unselect(e){let t=this.getCurrentData();t.dateSelection&&(this.dispatch({type:`UNSELECT_DATES`}),nM(e,t))}addEvent(e,t){if(e instanceof lM){let t=e._def,n=e._instance;return this.getCurrentData().eventStore.defs[t.defId]||(this.dispatch({type:`ADD_EVENTS`,eventStore:Sj({def:t,instance:n})}),this.triggerEventAdd(e)),e}let n=this.getCurrentData(),r;if(t instanceof cM)r=t.internalEventSource;else if(typeof t==`boolean`)t&&([r]=hA(n.eventSources));else if(t!=null){let e=this.getEventSourceById(t);if(!e)return console.warn(`Could not find an event source with ID "${t}"`),null;r=e.internalEventSource}let i=hj(e,r,n,!1);if(i){let e=new lM(n,i.def,i.def.recurringDef?null:i.instance);return this.dispatch({type:`ADD_EVENTS`,eventStore:Sj(i)}),this.triggerEventAdd(e),e}return null}triggerEventAdd(e){let{emitter:t}=this.getCurrentData();t.trigger(`eventAdd`,{event:e,relatedEvents:[],revert:()=>{this.dispatch({type:`REMOVE_EVENTS`,eventStore:uM(e)})}})}getEventById(e){let t=this.getCurrentData(),{defs:n,instances:r}=t.eventStore;e=String(e);for(let i in n){let a=n[i];if(a.publicId===e){if(a.recurringDef)return new lM(t,a,null);for(let e in r){let n=r[e];if(n.defId===a.defId)return new lM(t,a,n)}}}return null}getEvents(){let e=this.getCurrentData();return dM(e.eventStore,e)}removeAllEvents(){this.dispatch({type:`REMOVE_ALL_EVENTS`})}getEventSources(){let e=this.getCurrentData(),t=e.eventSources,n=[];for(let r in t)n.push(new cM(e,t[r]));return n}getEventSourceById(e){let t=this.getCurrentData(),n=t.eventSources;e=String(e);for(let r in n)if(n[r].publicId===e)return new cM(t,n[r]);return null}addEventSource(e){let t=this.getCurrentData();if(e instanceof cM)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:`ADD_EVENT_SOURCES`,sources:[e.internalEventSource]}),e;let n=Lj(e,t);return n?(this.dispatch({type:`ADD_EVENT_SOURCES`,sources:[n]}),new cM(t,n)):null}removeAllEventSources(){this.dispatch({type:`REMOVE_ALL_EVENT_SOURCES`})}refetchEvents(){this.dispatch({type:`FETCH_EVENT_SOURCES`,isRefetch:!0})}scrollToTime(e){let t=GO(e);t&&this.trigger(`_scrollRequest`,{time:t})}};function qM(e,t){let n={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)};return n.left<n.right&&n.top<n.bottom&&n}function JM(e,t,n,r){return{dow:e.getUTCDay(),isDisabled:!(!r||r.activeRange&&nj(r.activeRange,e)),isOther:!(!r||nj(r.currentRange,e)),isToday:!!(t&&nj(t,e)),isPast:!!(n?e<n:t&&e<t.start),isFuture:!!(n?e>n:t&&e>=t.end)}}function YM(e,t){let n=[`fc-day`,`fc-day-${nk[e.dow]}`];return e.isDisabled?n.push(`fc-day-disabled`):(e.isToday&&(n.push(`fc-day-today`),n.push(t.getClass(`today`))),e.isPast&&n.push(`fc-day-past`),e.isFuture&&n.push(`fc-day-future`),e.isOther&&n.push(`fc-day-other`)),n}var XM=$k({year:`numeric`,month:`long`,day:`numeric`}),ZM=$k({week:`long`});function QM(e,t,n=`day`,r=!0){let{dateEnv:i,options:a,calendarApi:o}=e,s=i.format(t,n===`week`?ZM:XM);if(a.navLinks){let e=i.toDate(t),c=e=>{let r=n===`day`?a.navLinkDayClick:n===`week`?a.navLinkWeekClick:null;typeof r==`function`?r.call(o,i.toDate(t),e):(typeof r==`string`&&(n=r),o.zoomTo(t,n))};return Object.assign({title:VO(a.navLinkHint,[s,e],s),"data-navlink":``},r?MO(c):{onClick:c})}return{"aria-label":s}}var $M;function eN(){return $M||=tN(),$M}function tN(){let e=document.createElement(`div`);e.style.overflow=`scroll`,e.style.position=`absolute`,e.style.top=`-9999px`,e.style.left=`-9999px`,document.body.appendChild(e);let t=nN(e);return document.body.removeChild(e),t}function nN(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}function rN(e){let t=iN(e),n=e.getBoundingClientRect();for(let e of t){let t=qM(n,e.getBoundingClientRect());if(t)n=t;else return null}return n}function iN(e){let t=[];for(;e instanceof HTMLElement;){let n=window.getComputedStyle(e);if(n.position===`fixed`)break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}var aN=class{constructor(e,t,n,r){this.els=t;let i=this.originClientRect=e.getBoundingClientRect();n&&this.buildElHorizontals(i.left),r&&this.buildElVerticals(i.top)}buildElHorizontals(e){let t=[],n=[];for(let r of this.els){let i=r.getBoundingClientRect();t.push(i.left-e),n.push(i.right-e)}this.lefts=t,this.rights=n}buildElVerticals(e){let t=[],n=[];for(let r of this.els){let i=r.getBoundingClientRect();t.push(i.top-e),n.push(i.bottom-e)}this.tops=t,this.bottoms=n}leftToIndex(e){let{lefts:t,rights:n}=this,r=t.length,i=0;for(;i<r;i+=1)if(e>=t[i]&&e<n[i])return i}topToIndex(e){let{tops:t,bottoms:n}=this,r=t.length,i=0;for(;i<r;i+=1)if(e>=t[i]&&e<n[i])return i}getWidth(e){return this.rights[e]-this.lefts[e]}getHeight(e){return this.bottoms[e]-this.tops[e]}similarTo(e){return oN(this.tops||[],e.tops||[])&&oN(this.bottoms||[],e.bottoms||[])&&oN(this.lefts||[],e.lefts||[])&&oN(this.rights||[],e.rights||[])}};function oN(e,t){let n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(Math.round(e[r])!==Math.round(t[r]))return!1;return!0}var sN=class extends LA{constructor(){super(...arguments),this.uid=FO()}prepareHits(){}queryHit(e,t,n,r){return null}isValidSegDownEl(e){return!this.props.eventDrag&&!this.props.eventResize&&!bO(e,`.fc-event-mirror`)}isValidDateDownEl(e){return!bO(e,`.fc-event:not(.fc-bg-event)`)&&!bO(e,`.fc-more-link`)&&!bO(e,`a[data-navlink]`)&&!bO(e,`.fc-popover`)}},cN=class{constructor(e=e=>e.thickness||1){this.getEntryThickness=e,this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}addSegs(e){let t=[];for(let n of e)this.insertEntry(n,t);return t}insertEntry(e,t){let n=this.findInsertion(e);this.isInsertionValid(n,e)?this.insertEntryAt(e,n):this.handleInvalidInsertion(n,e,t)}isInsertionValid(e,t){return(this.maxCoord===-1||e.levelCoord+this.getEntryThickness(t)<=this.maxCoord)&&(this.maxStackCnt===-1||e.stackCnt<this.maxStackCnt)}handleInvalidInsertion(e,t,n){if(this.allowReslicing&&e.touchingEntry){let r=Object.assign(Object.assign({},t),{span:dN(t.span,e.touchingEntry.span)});n.push(r),this.splitEntry(t,e.touchingEntry,n)}else n.push(t)}splitEntry(e,t,n){let r=e.span,i=t.span;r.start<i.start&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:r.start,end:i.start}},n),r.end>i.end&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:i.end,end:r.end}},n)}insertEntryAt(e,t){let{entriesByLevel:n,levelCoords:r}=this;t.lateral===-1?(fN(r,t.level,t.levelCoord),fN(n,t.level,[e])):fN(n[t.level],t.lateral,e),this.stackCnts[uN(e)]=t.stackCnt}findInsertion(e){let{levelCoords:t,entriesByLevel:n,strictOrder:r,stackCnts:i}=this,a=t.length,o=0,s=-1,c=-1,l=null,u=0;for(let d=0;d<a;d+=1){let a=t[d];if(!r&&a>=o+this.getEntryThickness(e))break;let f=n[d],p,m=pN(f,e.span.start,lN),h=m[0]+m[1];for(;(p=f[h])&&p.span.start<e.span.end;){let e=a+this.getEntryThickness(p);e>o&&(o=e,l=p,s=d,c=h),e===o&&(u=Math.max(u,i[uN(p)]+1)),h+=1}}let d=0;if(l)for(d=s+1;d<a&&t[d]<o;)d+=1;let f=-1;return d<a&&t[d]===o&&(f=pN(n[d],e.span.end,lN)[0]),{touchingLevel:s,touchingLateral:c,touchingEntry:l,stackCnt:u,levelCoord:o,level:d,lateral:f}}toRects(){let{entriesByLevel:e,levelCoords:t}=this,n=e.length,r=[];for(let i=0;i<n;i+=1){let n=e[i],a=t[i];for(let e of n)r.push(Object.assign(Object.assign({},e),{thickness:this.getEntryThickness(e),levelCoord:a}))}return r}};function lN(e){return e.span.end}function uN(e){return e.index+`:`+e.span.start}function dN(e,t){let n=Math.max(e.start,t.start),r=Math.min(e.end,t.end);return n<r?{start:n,end:r}:null}function fN(e,t,n){e.splice(t,0,n)}function pN(e,t,n){let r=0,i=e.length;if(!i||t<n(e[r]))return[0,0];if(t>n(e[i-1]))return[i,0];for(;r<i;){let a=Math.floor(r+(i-r)/2),o=n(e[a]);if(t<o)i=a;else if(t>o)r=a+1;else return[a,1]}return[r,0]}function mN(e,t){return $k(!e||t>10?{weekday:`short`}:t>1?{weekday:`short`,month:`numeric`,day:`numeric`,omitCommas:!0}:{weekday:`long`})}var hN=`fc-col-header-cell`;function gN(e){return e.text}var _N=class extends LA{render(){let{dateEnv:e,options:t,theme:n,viewApi:r}=this.context,{props:i}=this,{date:a,dateProfile:o}=i,s=JM(a,i.todayRange,null,o),c=[hN].concat(YM(s,n)),l=e.format(a,i.dayHeaderFormat),u=!s.isDisabled&&i.colCnt>1?QM(this.context,a):{},d=e.toDate(a);e.namedTimeZoneImpl&&(d=ak(d,36e5));let f=Object.assign(Object.assign(Object.assign({date:d,view:r},i.extraRenderProps),{text:l}),s);return Z(KA,{elTag:`th`,elClasses:c,elAttrs:Object.assign({role:`columnheader`,colSpan:i.colSpan,"data-date":s.isDisabled?void 0:Ok(a)},i.extraDataAttrs),renderProps:f,generatorName:`dayHeaderContent`,customGenerator:t.dayHeaderContent,defaultGenerator:gN,classNameGenerator:t.dayHeaderClassNames,didMount:t.dayHeaderDidMount,willUnmount:t.dayHeaderWillUnmount},e=>Z(`div`,{className:`fc-scrollgrid-sync-inner`},!s.isDisabled&&Z(e,{elTag:`a`,elAttrs:u,elClasses:[`fc-col-header-cell-cushion`,i.isSticky&&`fc-sticky`]})))}},vN=$k({weekday:`long`}),yN=class extends LA{render(){let{props:e}=this,{dateEnv:t,theme:n,viewApi:r,options:i}=this.context,a=ik(new Date(2592e5),e.dow),o={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},s=t.format(a,e.dayHeaderFormat),c=Object.assign(Object.assign(Object.assign(Object.assign({date:a},o),{view:r}),e.extraRenderProps),{text:s});return Z(KA,{elTag:`th`,elClasses:[hN,...YM(o,n),...e.extraClassNames||[]],elAttrs:Object.assign({role:`columnheader`,colSpan:e.colSpan},e.extraDataAttrs),renderProps:c,generatorName:`dayHeaderContent`,customGenerator:i.dayHeaderContent,defaultGenerator:gN,classNameGenerator:i.dayHeaderClassNames,didMount:i.dayHeaderDidMount,willUnmount:i.dayHeaderWillUnmount},n=>Z(`div`,{className:`fc-scrollgrid-sync-inner`},Z(n,{elTag:`a`,elClasses:[`fc-col-header-cell-cushion`,e.isSticky&&`fc-sticky`],elAttrs:{"aria-label":t.format(a,vN)}})))}},bN=class extends LA{constructor(){super(...arguments),this.createDayHeaderFormatter=Q(xN)}render(){let{context:e}=this,{dates:t,dateProfile:n,datesRepDistinctDays:r,renderIntro:i}=this.props,a=this.createDayHeaderFormatter(e.options.dayHeaderFormat,r,t.length);return Z(WM,{unit:`day`},(e,o)=>Z(`tr`,{role:`row`},i&&i(`day`),t.map(e=>r?Z(_N,{key:e.toISOString(),date:e,dateProfile:n,todayRange:o,colCnt:t.length,dayHeaderFormat:a}):Z(yN,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:a}))))}};function xN(e,t,n){return e||mN(t,n)}var SN=class{constructor(e,t){let n=e.start,{end:r}=e,i=[],a=[],o=-1;for(;n<r;)t.isHiddenDay(n)?i.push(o+.5):(o+=1,i.push(o),a.push(n)),n=ik(n,1);this.dates=a,this.indices=i,this.cnt=a.length}sliceRange(e){let t=this.getDateDayIndex(e.start),n=this.getDateDayIndex(ik(e.end,-1)),r=Math.max(0,t),i=Math.min(this.cnt-1,n);return r=Math.ceil(r),i=Math.floor(i),r<=i?{firstIndex:r,lastIndex:i,isStart:t===r,isEnd:n===i}:null}getDateDayIndex(e){let{indices:t}=this,n=Math.floor(sk(this.dates[0],e));return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]}},CN=class{constructor(e,t){let{dates:n}=e,r,i,a;if(t){for(i=n[0].getUTCDay(),r=1;r<n.length&&n[r].getUTCDay()!==i;r+=1);a=Math.ceil(n.length/r)}else a=1,r=n.length;this.rowCnt=a,this.colCnt=r,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}buildCells(){let e=[];for(let t=0;t<this.rowCnt;t+=1){let n=[];for(let e=0;e<this.colCnt;e+=1)n.push(this.buildCell(t,e));e.push(n)}return e}buildCell(e,t){let n=this.daySeries.dates[e*this.colCnt+t];return{key:n.toISOString(),date:n}}buildHeaderDates(){let e=[];for(let t=0;t<this.colCnt;t+=1)e.push(this.cells[0][t].date);return e}sliceRange(e){let{colCnt:t}=this,n=this.daySeries.sliceRange(e),r=[];if(n){let{firstIndex:e,lastIndex:i}=n,a=e;for(;a<=i;){let o=Math.floor(a/t),s=Math.min((o+1)*t,i+1);r.push({row:o,firstCol:a%t,lastCol:(s-1)%t,isStart:n.isStart&&a===e,isEnd:n.isEnd&&s-1===i}),a=s}}return r}},wN=class{constructor(){this.sliceBusinessHours=Q(this._sliceBusinessHours),this.sliceDateSelection=Q(this._sliceDateSpan),this.sliceEventStore=Q(this._sliceEventStore),this.sliceEventDrag=Q(this._sliceInteraction),this.sliceEventResize=Q(this._sliceInteraction),this.forceDayIfListItem=!1}sliceProps(e,t,n,r,...i){let{eventUiBases:a}=e,o=this.sliceEventStore(e.eventStore,a,t,n,...i);return{dateSelectionSegs:this.sliceDateSelection(e.dateSelection,t,n,a,r,...i),businessHourSegs:this.sliceBusinessHours(e.businessHours,t,n,r,...i),fgEventSegs:o.fg,bgEventSegs:o.bg,eventDrag:this.sliceEventDrag(e.eventDrag,a,t,n,...i),eventResize:this.sliceEventResize(e.eventResize,a,t,n,...i),eventSelection:e.eventSelection}}sliceNowDate(e,t,n,r,...i){return this._sliceDateSpan({range:{start:e,end:ak(e,1)},allDay:!1},t,n,{},r,...i)}_sliceBusinessHours(e,t,n,r,...i){return e?this._sliceEventStore(uj(e,TN(t,!!n),r),{},t,n,...i).bg:[]}_sliceEventStore(e,t,n,r,...i){if(e){let a=fM(e,t,TN(n,!!r),r);return{bg:this.sliceEventRanges(a.bg,i),fg:this.sliceEventRanges(a.fg,i)}}return{bg:[],fg:[]}}_sliceInteraction(e,t,n,r,...i){if(!e)return null;let a=fM(e.mutatedEvents,t,TN(n,!!r),r);return{segs:this.sliceEventRanges(a.fg,i),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}}_sliceDateSpan(e,t,n,r,i,...a){if(!e)return[];let o=TN(t,!!n),s=ej(e.range,o);if(s){e=Object.assign(Object.assign({},e),{range:s});let t=NM(e,r,i),n=this.sliceRange(e.range,...a);for(let e of n)e.eventRange=t;return n}return[]}sliceEventRanges(e,t){let n=[];for(let r of e)n.push(...this.sliceEventRange(r,t));return n}sliceEventRange(e,t){let n=e.range;this.forceDayIfListItem&&e.ui.display===`list-item`&&(n={start:n.start,end:ik(n.start,1)});let r=this.sliceRange(n,...t);for(let t of r)t.eventRange=e,t.isStart=e.isStart&&t.isStart,t.isEnd=e.isEnd&&t.isEnd;return r}};function TN(e,t){let n=e.activeRange;return t?n:{start:ak(n.start,e.slotMinTime.milliseconds),end:ak(n.end,e.slotMaxTime.milliseconds-864e5)}}var EN=/^(visible|hidden)$/,DN=class extends LA{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,BA(this.props.elRef,e)}}render(){let{props:e}=this,{liquid:t,liquidIsAbsolute:n}=e,r=t&&n,i=[`fc-scroller`];return t&&(n?i.push(`fc-scroller-liquid-absolute`):i.push(`fc-scroller-liquid`)),Z(`div`,{ref:this.handleEl,className:i.join(` `),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:r&&-(e.overcomeLeft||0)||``,right:r&&-(e.overcomeRight||0)||``,bottom:r&&-(e.overcomeBottom||0)||``,marginLeft:!r&&-(e.overcomeLeft||0)||``,marginRight:!r&&-(e.overcomeRight||0)||``,marginBottom:!r&&-(e.overcomeBottom||0)||``,maxHeight:e.maxHeight||``}},e.children)}needsXScrolling(){if(EN.test(this.props.overflowX))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:n}=e;for(let e=0;e<n.length;e+=1)if(n[e].getBoundingClientRect().width>t)return!0;return!1}needsYScrolling(){if(EN.test(this.props.overflowY))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:n}=e;for(let e=0;e<n.length;e+=1)if(n[e].getBoundingClientRect().height>t)return!0;return!1}getXScrollbarWidth(){return EN.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return EN.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}},ON=class{constructor(e){this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(e,t)=>{let{depths:n,currentMap:r}=this,i=!1,a=!1;e===null?(--n[t],n[t]||(delete r[t],delete this.callbackMap[t],i=!0)):(i=t in r,r[t]=e,n[t]=(n[t]||0)+1,a=!0),this.masterCallback&&(i&&this.masterCallback(null,String(t)),a&&this.masterCallback(e,String(t)))}}createRef(e){let t=this.callbackMap[e];return t||=this.callbackMap[e]=t=>{this.handleValue(t,String(e))},t}collect(e,t,n){return SA(this.currentMap,e,t,n)}getAll(){return hA(this.currentMap)}};function kN(e){let t=SO(e,`.fc-scrollgrid-shrink`),n=0;for(let e of t)n=Math.max(n,UO(e));return Math.ceil(n)}function AN(e,t){return e.liquid&&t.liquid}function jN(e,t){return t.maxHeight!=null||AN(e,t)}function MN(e,t,n,r){let{expandRows:i}=n;return typeof t.content==`function`?t.content(n):Z(`table`,{role:`presentation`,className:[t.tableClassName,e.syncRowHeights?`fc-scrollgrid-sync-table`:``].join(` `),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:i?n.clientHeight:``}},n.tableColGroupNode,Z(r?`thead`:`tbody`,{role:`presentation`},typeof t.rowContent==`function`?t.rowContent(n):t.rowContent))}function NN(e,t){return tk(e,t,gA)}function PN(e,t){let n=[];for(let r of e){let e=r.span||1;for(let i=0;i<e;i+=1)n.push(Z(`col`,{style:{width:r.width===`shrink`?FN(t):r.width||``,minWidth:r.minWidth||``}}))}return Z(`colgroup`,{},...n)}function FN(e){return e??4}function IN(e){for(let t of e)if(t.width===`shrink`)return!0;return!1}function LN(e,t){let n=[`fc-scrollgrid`,t.theme.getClass(`table`)];return e&&n.push(`fc-scrollgrid-liquid`),n}function RN(e,t){let n=[`fc-scrollgrid-section`,`fc-scrollgrid-section-${e.type}`,e.className];return t&&e.liquid&&e.maxHeight==null&&n.push(`fc-scrollgrid-section-liquid`),e.isSticky&&n.push(`fc-scrollgrid-section-sticky`),n}function zN(e){return Z(`div`,{className:`fc-scrollgrid-sticky-shim`,style:{width:e.clientWidth,minWidth:e.tableMinWidth}})}function BN(e){let{stickyHeaderDates:t}=e;return(t==null||t===`auto`)&&(t=e.height===`auto`||e.viewHeight===`auto`),t}function VN(e){let{stickyFooterScrollbar:t}=e;return(t==null||t===`auto`)&&(t=e.height===`auto`||e.viewHeight===`auto`),t}var HN=class extends LA{constructor(){super(...arguments),this.processCols=Q(e=>e,NN),this.renderMicroColGroup=Q(PN),this.scrollerRefs=new ON,this.scrollerElRefs=new ON(this._handleScrollerEl.bind(this)),this.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},this.handleSizing=()=>{this.safeSetState(Object.assign({shrinkWidth:this.computeShrinkWidth()},this.computeScrollerDims()))}}render(){let{props:e,state:t,context:n}=this,r=e.sections||[],i=this.processCols(e.cols),a=this.renderMicroColGroup(i,t.shrinkWidth),o=LN(e.liquid,n);e.collapsibleWidth&&o.push(`fc-scrollgrid-collapsible`);let s=r.length,c=0,l,u=[],d=[],f=[];for(;c<s&&(l=r[c]).type===`header`;)u.push(this.renderSection(l,a,!0)),c+=1;for(;c<s&&(l=r[c]).type===`body`;)d.push(this.renderSection(l,a,!1)),c+=1;for(;c<s&&(l=r[c]).type===`footer`;)f.push(this.renderSection(l,a,!0)),c+=1;let p=!RM(),m={role:`rowgroup`};return Z(`table`,{role:`grid`,className:o.join(` `),style:{height:e.height}},!(p||!u.length)&&Z(`thead`,m,...u),!(p||!d.length)&&Z(`tbody`,m,...d),!(p||!f.length)&&Z(`tfoot`,m,...f),p&&Z(`tbody`,m,...u,...d,...f))}renderSection(e,t,n){return`outerContent`in e?Z(XE,{key:e.key},e.outerContent):Z(`tr`,{key:e.key,role:`presentation`,className:RN(e,this.props.liquid).join(` `)},this.renderChunkTd(e,t,e.chunk,n))}renderChunkTd(e,t,n,r){if(`outerContent`in n)return n.outerContent;let{props:i}=this,{forceYScrollbars:a,scrollerClientWidths:o,scrollerClientHeights:s}=this.state,c=jN(i,e),l=AN(i,e),u=i.liquid?a?`scroll`:c?`auto`:`hidden`:`visible`,d=e.key,f=MN(e,n,{tableColGroupNode:t,tableMinWidth:``,clientWidth:!i.collapsibleWidth&&o[d]!==void 0?o[d]:null,clientHeight:s[d]===void 0?null:s[d],expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:()=>{}},r);return Z(r?`th`:`td`,{ref:n.elRef,role:`presentation`},Z(`div`,{className:`fc-scroller-harness${l?` fc-scroller-harness-liquid`:``}`},Z(DN,{ref:this.scrollerRefs.createRef(d),elRef:this.scrollerElRefs.createRef(d),overflowY:u,overflowX:i.liquid?`hidden`:`visible`,maxHeight:e.maxHeight,liquid:l,liquidIsAbsolute:!0},f)))}_handleScrollerEl(e,t){let n=UN(this.props.sections,t);n&&BA(n.chunk.scrollerElRef,e)}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return IN(this.props.cols)?kN(this.scrollerElRefs.getAll()):0}computeScrollerDims(){let e=eN(),{scrollerRefs:t,scrollerElRefs:n}=this,r=!1,i={},a={};for(let e in t.currentMap){let n=t.currentMap[e];if(n&&n.needsYScrolling()){r=!0;break}}for(let t of this.props.sections){let o=t.key,s=n.currentMap[o];if(s){let t=s.parentNode;i[o]=Math.floor(t.getBoundingClientRect().width-(r?e.y:0)),a[o]=Math.floor(t.getBoundingClientRect().height)}}return{forceYScrollbars:r,scrollerClientWidths:i,scrollerClientHeights:a}}};HN.addStateEquality({scrollerClientWidths:gA,scrollerClientHeights:gA});function UN(e,t){for(let n of e)if(n.key===t)return n;return null}var WN=class extends LA{constructor(){super(...arguments),this.buildPublicEvent=Q((e,t,n)=>new lM(e,t,n)),this.handleEl=e=>{this.el=e,BA(this.props.elRef,e),e&&pM(e,this.props.seg)}}render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,{eventRange:i}=r,{ui:a}=i,o={event:this.buildPublicEvent(t,i.def,i.instance),view:t.viewApi,timeText:e.timeText,textColor:a.textColor,backgroundColor:a.backgroundColor,borderColor:a.borderColor,isDraggable:!e.disableDragging&&yM(r,t),isStartResizable:!e.disableResizing&&bM(r,t),isEndResizable:!e.disableResizing&&xM(r),isMirror:!!(e.isDragging||e.isResizing||e.isDateSelecting),isStart:!!r.isStart,isEnd:!!r.isEnd,isPast:!!e.isPast,isFuture:!!e.isFuture,isToday:!!e.isToday,isSelected:!!e.isSelected,isDragging:!!e.isDragging,isResizing:!!e.isResizing};return Z(KA,{elRef:this.handleEl,elTag:e.elTag,elAttrs:e.elAttrs,elClasses:[...wM(o),...r.eventRange.ui.classNames,...e.elClasses||[]],elStyle:e.elStyle,renderProps:o,generatorName:`eventContent`,customGenerator:n.eventContent,defaultGenerator:e.defaultGenerator,classNameGenerator:n.eventClassNames,didMount:n.eventDidMount,willUnmount:n.eventWillUnmount},e.children)}componentDidUpdate(e){this.el&&this.props.seg!==e.seg&&pM(this.el,this.props.seg)}},GN=class extends LA{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,{ui:i}=r.eventRange,a=SM(r,n.eventTimeFormat||e.defaultTimeFormat,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return Z(WN,Object.assign({},e,{elTag:`a`,elStyle:{borderColor:i.borderColor,backgroundColor:i.backgroundColor},elAttrs:EM(r,t),defaultGenerator:KN,timeText:a}),(e,t)=>Z(XE,null,Z(e,{elTag:`div`,elClasses:[`fc-event-main`],elStyle:{color:t.textColor}}),!!t.isStartResizable&&Z(`div`,{className:`fc-event-resizer fc-event-resizer-start`}),!!t.isEndResizable&&Z(`div`,{className:`fc-event-resizer fc-event-resizer-end`})))}};GN.addPropsEquality({seg:gA});function KN(e){return Z(`div`,{className:`fc-event-main-frame`},e.timeText&&Z(`div`,{className:`fc-event-time`},e.timeText),Z(`div`,{className:`fc-event-title-container`},Z(`div`,{className:`fc-event-title fc-sticky`},e.event.title||Z(XE,null,`\xA0`))))}var qN=$k({day:`numeric`}),JN=class extends LA{constructor(){super(...arguments),this.refineRenderProps=jk(XN)}render(){let{props:e,context:t}=this,{options:n}=t,r=this.refineRenderProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,isMonthStart:e.isMonthStart||!1,showDayNumber:e.showDayNumber,extraRenderProps:e.extraRenderProps,viewApi:t.viewApi,dateEnv:t.dateEnv,monthStartFormat:n.monthStartFormat});return Z(KA,{elRef:e.elRef,elTag:e.elTag,elAttrs:Object.assign(Object.assign({},e.elAttrs),r.isDisabled?{}:{"data-date":Ok(e.date)}),elClasses:[...YM(r,t.theme),...e.elClasses||[]],elStyle:e.elStyle,renderProps:r,generatorName:`dayCellContent`,customGenerator:n.dayCellContent,defaultGenerator:e.defaultGenerator,classNameGenerator:r.isDisabled?void 0:n.dayCellClassNames,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount},e.children)}};function YN(e){return!!(e.dayCellContent||HA(`dayCellContent`,e))}function XN(e){let{date:t,dateEnv:n,dateProfile:r,isMonthStart:i}=e,a=JM(t,e.todayRange,null,r),o=e.showDayNumber?n.format(t,i?e.monthStartFormat:qN):``;return Object.assign(Object.assign(Object.assign({date:n.toDate(t),view:e.viewApi},a),{isMonthStart:i,dayNumberText:o}),e.extraRenderProps)}var ZN=class extends LA{render(){let{props:e}=this,{seg:t}=e;return Z(WN,{elTag:`div`,elClasses:[`fc-bg-event`],elStyle:{backgroundColor:t.eventRange.ui.backgroundColor},defaultGenerator:QN,seg:t,timeText:``,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,disableDragging:!0,disableResizing:!0})}};function QN(e){let{title:t}=e.event;return t&&Z(`div`,{className:`fc-event-title`},e.event.title)}function $N(e){return Z(`div`,{className:`fc-${e}`})}var eP=e=>Z(PA.Consumer,null,t=>{let{dateEnv:n,options:r}=t,{date:i}=e,a=r.weekNumberFormat||e.defaultFormat,o={num:n.computeWeekNumber(i),text:n.format(i,a),date:i};return Z(KA,{elRef:e.elRef,elTag:e.elTag,elAttrs:e.elAttrs,elClasses:e.elClasses,elStyle:e.elStyle,renderProps:o,generatorName:`weekNumberContent`,customGenerator:r.weekNumberContent,defaultGenerator:tP,classNameGenerator:r.weekNumberClassNames,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount},e.children)});function tP(e){return e.text}var nP=10,rP=class extends LA{constructor(){super(...arguments),this.state={titleId:OO()},this.handleRootEl=e=>{this.rootEl=e,this.props.elRef&&BA(this.props.elRef,e)},this.handleDocumentMouseDown=e=>{let t=EO(e);this.rootEl.contains(t)||this.handleCloseClick()},this.handleDocumentKeyDown=e=>{e.key===`Escape`&&this.handleCloseClick()},this.handleCloseClick=()=>{let{onClose:e}=this.props;e&&e()}}render(){let{theme:e,options:t}=this.context,{props:n,state:r}=this,i=[`fc-popover`,e.getClass(`popover`)].concat(n.extraClassNames||[]);return XD(Z(`div`,Object.assign({},n.extraAttrs,{id:n.id,className:i.join(` `),"aria-labelledby":r.titleId,ref:this.handleRootEl}),Z(`div`,{className:`fc-popover-header `+e.getClass(`popoverHeader`)},Z(`span`,{className:`fc-popover-title`,id:r.titleId},n.title),Z(`span`,{className:`fc-popover-close `+e.getIconClass(`close`),title:t.closeHint,onClick:this.handleCloseClick})),Z(`div`,{className:`fc-popover-body `+e.getClass(`popoverContent`)},n.children)),n.parentEl)}componentDidMount(){document.addEventListener(`mousedown`,this.handleDocumentMouseDown),document.addEventListener(`keydown`,this.handleDocumentKeyDown),this.updateSize()}componentWillUnmount(){document.removeEventListener(`mousedown`,this.handleDocumentMouseDown),document.removeEventListener(`keydown`,this.handleDocumentKeyDown)}updateSize(){let{isRtl:e}=this.context,{alignmentEl:t,alignGridTop:n}=this.props,{rootEl:r}=this,i=rN(t);if(i){let a=r.getBoundingClientRect(),o=n?bO(t,`.fc-scrollgrid`).getBoundingClientRect().top:i.top,s=e?i.right-a.width:i.left;o=Math.max(o,nP),s=Math.min(s,document.documentElement.clientWidth-nP-a.width),s=Math.max(s,nP);let c=r.offsetParent.getBoundingClientRect();wO(r,{top:o-c.top,left:s-c.left})}}},iP=class extends sN{constructor(){super(...arguments),this.handleRootEl=e=>{this.rootEl=e,e?this.context.registerInteractiveComponent(this,{el:e,useEventCenter:!1}):this.context.unregisterInteractiveComponent(this)}}render(){let{options:e,dateEnv:t}=this.context,{props:n}=this,{startDate:r,todayRange:i,dateProfile:a}=n,o=t.format(r,e.dayPopoverFormat);return Z(JN,{elRef:this.handleRootEl,date:r,dateProfile:a,todayRange:i},(t,r,i)=>Z(rP,{elRef:i.ref,id:n.id,title:o,extraClassNames:[`fc-more-popover`].concat(i.className||[]),extraAttrs:i,parentEl:n.parentEl,alignmentEl:n.alignmentEl,alignGridTop:n.alignGridTop,onClose:n.onClose},YN(e)&&Z(t,{elTag:`div`,elClasses:[`fc-more-popover-misc`]}),n.children))}queryHit(e,t,n,r){let{rootEl:i,props:a}=this;return e>=0&&e<n&&t>=0&&t<r?{dateProfile:a.dateProfile,dateSpan:Object.assign({allDay:!a.forceTimed,range:{start:a.startDate,end:a.endDate}},a.extraDateSpan),dayEl:i,rect:{left:0,top:0,right:n,bottom:r},layer:1}:null}},aP=class extends LA{constructor(){super(...arguments),this.state={isPopoverOpen:!1,popoverId:OO()},this.handleLinkEl=e=>{this.linkEl=e,this.props.elRef&&BA(this.props.elRef,e)},this.handleClick=e=>{let{props:t,context:n}=this,{moreLinkClick:r}=n.options,i=sP(t).start;function a(e){let{def:t,instance:r,range:i}=e.eventRange;return{event:new lM(n,t,r),start:n.dateEnv.toDate(i.start),end:n.dateEnv.toDate(i.end),isStart:e.isStart,isEnd:e.isEnd}}typeof r==`function`&&(r=r({date:i,allDay:!!t.allDayDate,allSegs:t.allSegs.map(a),hiddenSegs:t.hiddenSegs.map(a),jsEvent:e,view:n.viewApi})),!r||r===`popover`?this.setState({isPopoverOpen:!0}):typeof r==`string`&&n.calendarApi.zoomTo(i,r)},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:e,state:t}=this;return Z(PA.Consumer,null,n=>{let{viewApi:r,options:i,calendarApi:a}=n,{moreLinkText:o}=i,{moreCnt:s}=e,c=sP(e),l=typeof o==`function`?o.call(a,s):`+${s} ${o}`,u=VO(i.moreLinkHint,[s],l),d={num:s,shortText:`+${s}`,text:l,view:r};return Z(XE,null,!!e.moreCnt&&Z(KA,{elTag:e.elTag||`a`,elRef:this.handleLinkEl,elClasses:[...e.elClasses||[],`fc-more-link`],elStyle:e.elStyle,elAttrs:Object.assign(Object.assign(Object.assign({},e.elAttrs),MO(this.handleClick)),{title:u,"aria-expanded":t.isPopoverOpen,"aria-controls":t.isPopoverOpen?t.popoverId:``}),renderProps:d,generatorName:`moreLinkContent`,customGenerator:i.moreLinkContent,defaultGenerator:e.defaultGenerator||oP,classNameGenerator:i.moreLinkClassNames,didMount:i.moreLinkDidMount,willUnmount:i.moreLinkWillUnmount},e.children),t.isPopoverOpen&&Z(iP,{id:t.popoverId,startDate:c.start,endDate:c.end,dateProfile:e.dateProfile,todayRange:e.todayRange,extraDateSpan:e.extraDateSpan,parentEl:this.parentEl,alignmentEl:e.alignmentElRef?e.alignmentElRef.current:this.linkEl,alignGridTop:e.alignGridTop,forceTimed:e.forceTimed,onClose:this.handlePopoverClose},e.popoverContent()))})}componentDidMount(){this.updateParentEl()}componentDidUpdate(){this.updateParentEl()}updateParentEl(){this.linkEl&&(this.parentEl=bO(this.linkEl,`.fc-view-harness`))}};function oP(e){return e.text}function sP(e){if(e.allDayDate)return{start:e.allDayDate,end:ik(e.allDayDate,1)};let{hiddenSegs:t}=e;return{start:cP(t),end:uP(t)}}function cP(e){return e.reduce(lP).eventRange.range.start}function lP(e,t){return e.eventRange.range.start<t.eventRange.range.start?e:t}function uP(e){return e.reduce(dP).eventRange.range.end}function dP(e,t){return e.eventRange.range.end>t.eventRange.range.end?e:t}var fP=class{constructor(){this.handlers=[]}set(e){this.currentValue=e;for(let t of this.handlers)t(e)}subscribe(e){this.handlers.push(e),this.currentValue!==void 0&&e(this.currentValue)}},pP=class extends fP{constructor(){super(...arguments),this.map=new Map}handle(e){let{map:t}=this,n=!1;e.isActive?(t.set(e.id,e),n=!0):t.has(e.id)&&(t.delete(e.id),n=!0),n&&this.set(t)}},mP=[],hP={code:`en`,week:{dow:0,doy:4},direction:`ltr`,buttonText:{prev:`prev`,next:`next`,prevYear:`prev year`,nextYear:`next year`,year:`year`,today:`today`,month:`month`,week:`week`,day:`day`,list:`list`},weekText:`W`,weekTextLong:`Week`,closeHint:`Close`,timeHint:`Time`,eventHint:`Event`,allDayText:`all-day`,moreLinkText:`more`,noEventsText:`No events to display`},gP=Object.assign(Object.assign({},hP),{buttonHints:{prev:`Previous $0`,next:`Next $0`,today(e,t){return t===`day`?`Today`:`This ${e}`}},viewHint:`$0 view`,navLinkHint:`Go to $0`,moreLinkHint(e){return`Show ${e} more event${e===1?``:`s`}`}});function _P(e){let t=e.length>0?e[0].code:`en`,n=mP.concat(e),r={en:gP};for(let e of n)r[e.code]=e;return{map:r,defaultCode:t}}function vP(e,t){return typeof e==`object`&&!Array.isArray(e)?xP(e.code,[e.code],e):yP(e,t)}function yP(e,t){let n=[].concat(e||[]);return xP(e,n,bP(n,t)||gP)}function bP(e,t){for(let n=0;n<e.length;n+=1){let r=e[n].toLocaleLowerCase().split(`-`);for(let e=r.length;e>0;--e){let n=r.slice(0,e).join(`-`);if(t[n])return t[n]}}return null}function xP(e,t,n){let r=dA([hP,n],[`buttonText`]);delete r.code;let{week:i}=r;return delete r.week,{codeArg:e,codes:t,week:i,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}function SP(e){return{id:FO(),name:e.name,premiumReleaseDate:e.premiumReleaseDate?new Date(e.premiumReleaseDate):void 0,deps:e.deps||[],reducers:e.reducers||[],isLoadingFuncs:e.isLoadingFuncs||[],contextInit:[].concat(e.contextInit||[]),eventRefiners:e.eventRefiners||{},eventDefMemberAdders:e.eventDefMemberAdders||[],eventSourceRefiners:e.eventSourceRefiners||{},isDraggableTransformers:e.isDraggableTransformers||[],eventDragMutationMassagers:e.eventDragMutationMassagers||[],eventDefMutationAppliers:e.eventDefMutationAppliers||[],dateSelectionTransformers:e.dateSelectionTransformers||[],datePointTransforms:e.datePointTransforms||[],dateSpanTransforms:e.dateSpanTransforms||[],views:e.views||{},viewPropsTransformers:e.viewPropsTransformers||[],isPropsValid:e.isPropsValid||null,externalDefTransforms:e.externalDefTransforms||[],viewContainerAppends:e.viewContainerAppends||[],eventDropTransformers:e.eventDropTransformers||[],componentInteractions:e.componentInteractions||[],calendarInteractions:e.calendarInteractions||[],themeClasses:e.themeClasses||{},eventSourceDefs:e.eventSourceDefs||[],cmdFormatter:e.cmdFormatter,recurringTypes:e.recurringTypes||[],namedTimeZonedImpl:e.namedTimeZonedImpl,initialView:e.initialView||``,elementDraggingImpl:e.elementDraggingImpl,optionChangeHandlers:e.optionChangeHandlers||{},scrollGridImpl:e.scrollGridImpl||null,listenerRefiners:e.listenerRefiners||{},optionRefiners:e.optionRefiners||{},propSetHandlers:e.propSetHandlers||{}}}function CP(e,t){let n={},r={premiumReleaseDate:void 0,reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:``,elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function i(e){for(let t of e){let e=t.name,a=n[e];a===void 0?(n[e]=t.id,i(t.deps),r=TP(r,t)):a!==t.id&&console.warn(`Duplicate plugin '${e}'`)}}return e&&i(e),i(t),r}function wP(){let e=[],t=[],n;return(r,i)=>(n&&tk(r,e)&&tk(i,t)||(n=CP(r,i)),e=r,t=i,n)}function TP(e,t){return{premiumReleaseDate:EP(e.premiumReleaseDate,t.premiumReleaseDate),reducers:e.reducers.concat(t.reducers),isLoadingFuncs:e.isLoadingFuncs.concat(t.isLoadingFuncs),contextInit:e.contextInit.concat(t.contextInit),eventRefiners:Object.assign(Object.assign({},e.eventRefiners),t.eventRefiners),eventDefMemberAdders:e.eventDefMemberAdders.concat(t.eventDefMemberAdders),eventSourceRefiners:Object.assign(Object.assign({},e.eventSourceRefiners),t.eventSourceRefiners),isDraggableTransformers:e.isDraggableTransformers.concat(t.isDraggableTransformers),eventDragMutationMassagers:e.eventDragMutationMassagers.concat(t.eventDragMutationMassagers),eventDefMutationAppliers:e.eventDefMutationAppliers.concat(t.eventDefMutationAppliers),dateSelectionTransformers:e.dateSelectionTransformers.concat(t.dateSelectionTransformers),datePointTransforms:e.datePointTransforms.concat(t.datePointTransforms),dateSpanTransforms:e.dateSpanTransforms.concat(t.dateSpanTransforms),views:Object.assign(Object.assign({},e.views),t.views),viewPropsTransformers:e.viewPropsTransformers.concat(t.viewPropsTransformers),isPropsValid:t.isPropsValid||e.isPropsValid,externalDefTransforms:e.externalDefTransforms.concat(t.externalDefTransforms),viewContainerAppends:e.viewContainerAppends.concat(t.viewContainerAppends),eventDropTransformers:e.eventDropTransformers.concat(t.eventDropTransformers),calendarInteractions:e.calendarInteractions.concat(t.calendarInteractions),componentInteractions:e.componentInteractions.concat(t.componentInteractions),themeClasses:Object.assign(Object.assign({},e.themeClasses),t.themeClasses),eventSourceDefs:e.eventSourceDefs.concat(t.eventSourceDefs),cmdFormatter:t.cmdFormatter||e.cmdFormatter,recurringTypes:e.recurringTypes.concat(t.recurringTypes),namedTimeZonedImpl:t.namedTimeZonedImpl||e.namedTimeZonedImpl,initialView:e.initialView||t.initialView,elementDraggingImpl:e.elementDraggingImpl||t.elementDraggingImpl,optionChangeHandlers:Object.assign(Object.assign({},e.optionChangeHandlers),t.optionChangeHandlers),scrollGridImpl:t.scrollGridImpl||e.scrollGridImpl,listenerRefiners:Object.assign(Object.assign({},e.listenerRefiners),t.listenerRefiners),optionRefiners:Object.assign(Object.assign({},e.optionRefiners),t.optionRefiners),propSetHandlers:Object.assign(Object.assign({},e.propSetHandlers),t.propSetHandlers)}}function EP(e,t){return e===void 0?t:t===void 0?e:new Date(Math.max(e.valueOf(),t.valueOf()))}var DP=class extends kA{};DP.prototype.classes={root:`fc-theme-standard`,tableCellShaded:`fc-cell-shaded`,buttonGroup:`fc-button-group`,button:`fc-button fc-button-primary`,buttonActive:`fc-button-active`},DP.prototype.baseIconClass=`fc-icon`,DP.prototype.iconClasses={close:`fc-icon-x`,prev:`fc-icon-chevron-left`,next:`fc-icon-chevron-right`,prevYear:`fc-icon-chevrons-left`,nextYear:`fc-icon-chevrons-right`},DP.prototype.rtlIconClasses={prev:`fc-icon-chevron-right`,next:`fc-icon-chevron-left`,prevYear:`fc-icon-chevrons-right`,nextYear:`fc-icon-chevrons-left`},DP.prototype.iconOverrideOption=`buttonIcons`,DP.prototype.iconOverrideCustomButtonOption=`icon`,DP.prototype.iconOverridePrefix=`fc-icon-`;function OP(e,t){let n={},r;for(r in e)kP(r,n,e,t);for(r in t)kP(r,n,e,t);return n}function kP(e,t,n,r){if(t[e])return t[e];let i=AP(e,t,n,r);return i&&(t[e]=i),i}function AP(e,t,n,r){let i=n[e],a=r[e],o=e=>i&&i[e]!==null?i[e]:a&&a[e]!==null?a[e]:null,s=o(`component`),c=o(`superType`),l=null;if(c){if(c===e)throw Error(`Can't have a custom view type that references itself`);l=kP(c,t,n,r)}return!s&&l&&(s=l.component),s?{type:e,component:s,defaults:Object.assign(Object.assign({},l?l.defaults:{}),i?i.rawOptions:{}),overrides:Object.assign(Object.assign({},l?l.overrides:{}),a?a.rawOptions:{})}:null}function jP(e){return pA(e,MP)}function MP(e){let t=typeof e==`function`?{component:e}:e,{component:n}=t;return t.content?n=NP(t):n&&!(n.prototype instanceof LA)&&(n=NP(Object.assign(Object.assign({},t),{content:n}))),{superType:t.type,component:n,rawOptions:t}}function NP(e){return t=>Z(PA.Consumer,null,n=>Z(KA,{elTag:`div`,elClasses:XA(n.viewSpec),renderProps:Object.assign(Object.assign({},t),{nextDayThreshold:n.options.nextDayThreshold}),generatorName:void 0,customGenerator:e.content,classNameGenerator:e.classNames,didMount:e.didMount,willUnmount:e.willUnmount}))}function PP(e,t,n,r){let i=jP(e),a=jP(t.views);return pA(OP(i,a),e=>FP(e,a,t,n,r))}function FP(e,t,n,r,i){let a=e.overrides.duration||e.defaults.duration||r.duration||n.duration,o=null,s=``,c=``,l={};if(a&&(o=LP(a),o)){let e=ek(o);s=e.unit,e.value===1&&(c=s,l=t[s]?t[s].rawOptions:{})}let u=t=>{let n=t.buttonText||{},r=e.defaults.buttonTextKey;return r!=null&&n[r]!=null?n[r]:n[e.type]==null?n[c]==null?null:n[c]:n[e.type]},d=t=>{let n=t.buttonHints||{},r=e.defaults.buttonTextKey;return r!=null&&n[r]!=null?n[r]:n[e.type]==null?n[c]==null?null:n[c]:n[e.type]};return{type:e.type,component:e.component,duration:o,durationUnit:s,singleUnit:c,optionDefaults:e.defaults,optionOverrides:Object.assign(Object.assign({},l),e.overrides),buttonTextOverride:u(r)||u(n)||e.overrides.buttonText,buttonTextDefault:u(i)||e.defaults.buttonText||u(tA)||e.type,buttonTitleOverride:d(r)||d(n)||e.overrides.buttonHint,buttonTitleDefault:d(i)||e.defaults.buttonHint||d(tA)}}var IP={};function LP(e){let t=JSON.stringify(e),n=IP[t];return n===void 0&&(n=GO(e),IP[t]=n),n}function RP(e,t){return t.type===`CHANGE_VIEW_TYPE`&&(e=t.viewType),e}function zP(e,t){switch(t.type){case`CHANGE_DATE`:return t.dateMarker;default:return e}}function BP(e,t,n){let r=e.initialDate;return r==null?n.getDateMarker():t.createMarker(r)}function VP(e,t){switch(t.type){case`SET_OPTION`:return Object.assign(Object.assign({},e),{[t.optionName]:t.rawOptionValue});default:return e}}function HP(e,t,n,r){let i;switch(t.type){case`CHANGE_VIEW_TYPE`:return r.build(t.dateMarker||n);case`CHANGE_DATE`:return r.build(t.dateMarker);case`PREV`:if(i=r.buildPrev(e,n),i.isValid)return i;break;case`NEXT`:if(i=r.buildNext(e,n),i.isValid)return i}return e}function UP(e,t,n){let r=t?t.activeRange:null;return qP({},tF(e,n),r,n)}function WP(e,t,n,r){let i=n?n.activeRange:null;switch(t.type){case`ADD_EVENT_SOURCES`:return qP(e,t.sources,i,r);case`REMOVE_EVENT_SOURCE`:return JP(e,t.sourceId);case`PREV`:case`NEXT`:case`CHANGE_DATE`:case`CHANGE_VIEW_TYPE`:return n?YP(e,i,r):e;case`FETCH_EVENT_SOURCES`:return ZP(e,t.sourceIds?mA(t.sourceIds):eF(e,r),i,t.isRefetch||!1,r);case`RECEIVE_EVENTS`:case`RECEIVE_EVENT_ERROR`:return $P(e,t.sourceId,t.fetchId,t.fetchRange);case`REMOVE_ALL_EVENT_SOURCES`:return{};default:return e}}function GP(e,t,n){let r=t?t.activeRange:null;return ZP(e,eF(e,n),r,!0,n)}function KP(e){for(let t in e)if(e[t].isFetching)return!0;return!1}function qP(e,t,n,r){let i={};for(let e of t)i[e.sourceId]=e;return n&&(i=YP(i,n,r)),Object.assign(Object.assign({},e),i)}function JP(e,t){return fA(e,e=>e.sourceId!==t)}function YP(e,t,n){return ZP(e,fA(e,e=>XP(e,t,n)),t,!1,n)}function XP(e,t,n){return nF(e,n)?!n.options.lazyFetching||!e.fetchRange||e.isFetching||t.start<e.fetchRange.start||t.end>e.fetchRange.end:!e.latestFetchId}function ZP(e,t,n,r,i){let a={};for(let o in e){let s=e[o];a[o]=t[o]?QP(s,n,r,i):s}return a}function QP(e,t,n,r){let{options:i,calendarApi:a}=r,o=r.pluginHooks.eventSourceDefs[e.sourceDefId],s=FO();return o.fetch({eventSource:e,range:t,isRefetch:n,context:r},n=>{let{rawEvents:o}=n;i.eventSourceSuccess&&(o=i.eventSourceSuccess.call(a,o,n.response)||o),e.success&&(o=e.success.call(a,o,n.response)||o),r.dispatch({type:`RECEIVE_EVENTS`,sourceId:e.sourceId,fetchId:s,fetchRange:t,rawEvents:o})},n=>{let o=!1;i.eventSourceFailure&&(i.eventSourceFailure.call(a,n),o=!0),e.failure&&(e.failure(n),o=!0),o||console.warn(n.message,n),r.dispatch({type:`RECEIVE_EVENT_ERROR`,sourceId:e.sourceId,fetchId:s,fetchRange:t,error:n})}),Object.assign(Object.assign({},e),{isFetching:!0,latestFetchId:s})}function $P(e,t,n,r){let i=e[t];return i&&n===i.latestFetchId?Object.assign(Object.assign({},e),{[t]:Object.assign(Object.assign({},i),{isFetching:!1,fetchRange:r})}):e}function eF(e,t){return fA(e,e=>nF(e,t))}function tF(e,t){let n=Rj(t),r=[].concat(e.eventSources||[]),i=[];e.initialEvents&&r.unshift(e.initialEvents),e.events&&r.unshift(e.events);for(let e of r){let r=Lj(e,t,n);r&&i.push(r)}return i}function nF(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function rF(e,t){switch(t.type){case`UNSELECT_DATES`:return null;case`SELECT_DATES`:return t.selection;default:return e}}function iF(e,t){switch(t.type){case`UNSELECT_EVENT`:return``;case`SELECT_EVENT`:return t.eventInstanceId;default:return e}}function aF(e,t){let n;switch(t.type){case`UNSET_EVENT_DRAG`:return null;case`SET_EVENT_DRAG`:return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function oF(e,t){let n;switch(t.type){case`UNSET_EVENT_RESIZE`:return null;case`SET_EVENT_RESIZE`:return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function sF(e,t,n,r,i){return{header:e.headerToolbar?cF(e.headerToolbar,e,t,n,r,i):null,footer:e.footerToolbar?cF(e.footerToolbar,e,t,n,r,i):null}}function cF(e,t,n,r,i,a){let o={},s=[],c=!1;for(let l in e){let u=e[l],d=lF(u,t,n,r,i,a);o[l]=d.widgets,s.push(...d.viewsWithButtons),c||=d.hasTitle}return{sectionWidgets:o,viewsWithButtons:s,hasTitle:c}}function lF(e,t,n,r,i,a){let o=t.direction===`rtl`,s=t.customButtons||{},c=n.buttonText||{},l=t.buttonText||{},u=n.buttonHints||{},d=t.buttonHints||{},f=e?e.split(` `):[],p=[],m=!1;return{widgets:f.map(e=>e.split(`,`).map(e=>{if(e===`title`)return m=!0,{buttonName:e};let n,f,h,g,_,v;if(n=s[e])h=e=>{n.click&&n.click.call(e.target,e,e.target)},(g=r.getCustomButtonIconClass(n))||(g=r.getIconClass(e,o))||(_=n.text),v=n.hint||n.text;else if(f=i[e]){p.push(e),h=()=>{a.changeView(e)},(_=f.buttonTextOverride)||(g=r.getIconClass(e,o))||(_=f.buttonTextDefault);let n=f.buttonTextOverride||f.buttonTextDefault;v=VO(f.buttonTitleOverride||f.buttonTitleDefault||t.viewHint,[n,e],n)}else if(a[e]){if(h=()=>{a[e]()},(_=c[e])||(g=r.getIconClass(e,o))||(_=l[e]),e===`prevYear`||e===`nextYear`){let t=e===`prevYear`?`prev`:`next`;v=VO(u[t]||d[t],[l.year||`year`,`year`],l[e])}else v=t=>VO(u[e]||d[e],[l[t]||t,t],l[e])}return{buttonName:e,buttonClick:h,buttonIcon:g,buttonText:_,buttonHint:v}})),viewsWithButtons:p,hasTitle:m}}var uF=class{constructor(e,t,n){this.type=e,this.getCurrentData=t,this.dateEnv=n}get calendar(){return this.getCurrentData().calendarApi}get title(){return this.getCurrentData().viewTitle}get activeStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)}get activeEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)}get currentStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)}get currentEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)}getOption(e){return this.getCurrentData().options[e]}},dF=SP({name:`array-event-source`,eventSourceDefs:[{ignoreRange:!0,parseMeta(e){return Array.isArray(e.events)?e.events:null},fetch(e,t){t({rawEvents:e.eventSource.meta})}}]}),fF=SP({name:`func-event-source`,eventSourceDefs:[{parseMeta(e){return typeof e.events==`function`?e.events:null},fetch(e,t,n){let{dateEnv:r}=e.context,i=e.eventSource.meta;PM(i.bind(null,jM(e.range,r)),e=>t({rawEvents:e}),n)}}]}),pF=SP({name:`json-event-source`,eventSourceRefiners:{method:String,extraParams:$,startParam:String,endParam:String,timeZoneParam:String},eventSourceDefs:[{parseMeta(e){return e.url&&(e.format===`json`||!e.format)?{url:e.url,format:`json`,method:(e.method||`GET`).toUpperCase(),extraParams:e.extraParams,startParam:e.startParam,endParam:e.endParam,timeZoneParam:e.timeZoneParam}:null},fetch(e,t,n){let{meta:r}=e.eventSource,i=mF(r,e.range,e.context);IM(r.method,r.url,i).then(([e,n])=>{t({rawEvents:e,response:n})},n)}}]});function mF(e,t,n){let{dateEnv:r,options:i}=n,a,o,s,c,l={};return a=e.startParam,a??=i.startParam,o=e.endParam,o??=i.endParam,s=e.timeZoneParam,s??=i.timeZoneParam,c=typeof e.extraParams==`function`?e.extraParams():e.extraParams||{},Object.assign(l,c),l[a]=r.formatIso(t.start),l[o]=r.formatIso(t.end),r.timeZone!==`local`&&(l[s]=r.timeZone),l}var hF=SP({name:`simple-recurring-event`,recurringTypes:[{parse(e,t){if(e.daysOfWeek||e.startTime||e.endTime||e.startRecur||e.endRecur){let n={daysOfWeek:e.daysOfWeek||null,startTime:e.startTime||null,endTime:e.endTime||null,startRecur:e.startRecur?t.createMarker(e.startRecur):null,endRecur:e.endRecur?t.createMarker(e.endRecur):null,dateEnv:t},r;return e.duration&&(r=e.duration),!r&&e.startTime&&e.endTime&&(r=YO(e.endTime,e.startTime)),{allDayGuess:!e.startTime&&!e.endTime,duration:r,typeData:n}}return null},expand(e,t,n){let r=ej(t,{start:e.startRecur,end:e.endRecur});return r?gF(e.daysOfWeek,e.startTime,e.dateEnv,n,r):[]}}],eventRefiners:{daysOfWeek:$,startTime:GO,endTime:GO,duration:GO,startRecur:$,endRecur:$}});function gF(e,t,n,r,i){let a=e?mA(e):null,o=mk(i.start),s=i.end,c=[];for(t&&(t.milliseconds<0?s=ik(s,1):t.milliseconds>=864e5&&(o=ik(o,-1)));o<s;){let e;(!a||a[o.getUTCDay()])&&(e=t?r.add(o,t):o,c.push(r.createMarker(n.toDate(e)))),o=ik(o,1)}return c}var _F=SP({name:`change-handler`,optionChangeHandlers:{events(e,t){vF([e],t)},eventSources:vF}});function vF(e,t){let n=hA(t.getCurrentData().eventSources);if(n.length===1&&e.length===1&&Array.isArray(n[0]._raw)&&Array.isArray(e[0])){t.dispatch({type:`RESET_RAW_EVENTS`,sourceId:n[0].sourceId,rawEvents:e[0]});return}let r=[];for(let t of e){let e=!1;for(let r=0;r<n.length;r+=1)if(n[r]._raw===t){n.splice(r,1),e=!0;break}e||r.push(t)}for(let e of n)t.dispatch({type:`REMOVE_EVENT_SOURCE`,sourceId:e.sourceId});for(let e of r)t.calendarApi.addEventSource(e)}function yF(e,t){t.emitter.trigger(`datesSet`,Object.assign(Object.assign({},jM(e.activeRange,t.dateEnv)),{view:t.viewApi}))}function bF(e,t){let{emitter:n}=t;n.hasHandlers(`eventsSet`)&&n.trigger(`eventsSet`,dM(e,t))}var xF=[dF,fF,pF,hF,_F,SP({name:`misc`,isLoadingFuncs:[e=>KP(e.eventSources)],propSetHandlers:{dateProfile:yF,eventStore:bF}})],SF=class{constructor(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new vO(this.drain.bind(this))}request(e,t){this.queue.push(e),this.delayedRunner.request(t)}pause(e){this.delayedRunner.pause(e)}resume(e,t){this.delayedRunner.resume(e,t)}drain(){let{queue:e}=this;for(;e.length;){let t=[],n;for(;n=e.shift();)this.runTask(n),t.push(n);this.drained(t)}}runTask(e){this.runTaskOption&&this.runTaskOption(e)}drained(e){this.drainedOption&&this.drainedOption(e)}};function CF(e,t,n){let r;return r=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,n.formatRange(r.start,r.end,$k(t.titleFormat||wF(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}function wF(e){let{currentRangeUnit:t}=e;if(t===`year`)return{year:`numeric`};if(t===`month`)return{year:`numeric`,month:`long`};let n=pk(e.currentRange.start,e.currentRange.end);return n!==null&&n>1?{year:`numeric`,month:`short`,day:`numeric`}:{year:`numeric`,month:`long`,day:`numeric`}}var TF=class{constructor(){this.resetListeners=new Set}handleInput(e,t){let n=this.dateEnv;if(e!==n&&(typeof t==`function`?this.nowFn=t:n||(this.nowAnchorDate=e.toDate(t?e.createMarker(t):e.createNowMarker()),this.nowAnchorQueried=Date.now()),this.dateEnv=e,n))for(let e of this.resetListeners.values())e()}getDateMarker(){return this.nowAnchorDate?this.dateEnv.timestampToMarker(this.nowAnchorDate.valueOf()+(Date.now()-this.nowAnchorQueried)):this.dateEnv.createMarker(this.nowFn())}addResetListener(e){this.resetListeners.add(e)}removeResetListener(e){this.resetListeners.delete(e)}},EF=class{constructor(e){this.computeCurrentViewData=Q(this._computeCurrentViewData),this.organizeRawLocales=Q(_P),this.buildLocale=Q(vP),this.buildPluginHooks=wP(),this.buildDateEnv=Q(DF),this.buildTheme=Q(OF),this.parseToolbars=Q(sF),this.buildViewSpecs=Q(PP),this.buildDateProfileGenerator=jk(kF),this.buildViewApi=Q(AF),this.buildViewUiProps=jk(NF),this.buildEventUiBySource=Q(jF,gA),this.buildEventUiBases=Q(MF),this.parseContextBusinessHours=jk(FF),this.buildTitle=Q(CF),this.nowManager=new TF,this.emitter=new Yj,this.actionRunner=new SF(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.optionsForRefining=[],this.optionsForHandling=[],this.getCurrentData=()=>this.data,this.dispatch=e=>{this.actionRunner.request(e)},this.props=e,this.actionRunner.pause(),this.nowManager=new TF;let t={},n=this.computeOptionsData(e.optionOverrides,t,e.calendarApi),r=n.calendarOptions.initialView||n.pluginHooks.initialView,i=this.computeCurrentViewData(r,n,e.optionOverrides,t);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(i.options);let a={nowManager:this.nowManager,dateEnv:n.dateEnv,options:n.calendarOptions,pluginHooks:n.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},o=BP(n.calendarOptions,n.dateEnv,this.nowManager),s=i.dateProfileGenerator.build(o);nj(s.activeRange,o)||(o=s.currentRange.start);for(let e of n.pluginHooks.contextInit)e(a);let c=UP(n.calendarOptions,s,a),l={dynamicOptionOverrides:t,currentViewType:r,currentDate:o,dateProfile:s,businessHours:this.parseContextBusinessHours(a),eventSources:c,eventUiBases:{},eventStore:Tj(),renderableEventStore:Tj(),dateSelection:null,eventSelection:``,eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(a).selectionConfig},u=Object.assign(Object.assign({},a),l);for(let e of n.pluginHooks.reducers)Object.assign(l,e(null,null,u));PF(l,a)&&this.emitter.trigger(`loading`,!0),this.state=l,this.updateData(),this.actionRunner.resume()}resetOptions(e,t){let{props:n}=this;t===void 0?n.optionOverrides=e:(n.optionOverrides=Object.assign(Object.assign({},n.optionOverrides||{}),e),this.optionsForRefining.push(...t)),(t===void 0||t.length)&&this.actionRunner.request({type:`NOTHING`})}_handleAction(e){let{props:t,state:n,emitter:r}=this,i=VP(n.dynamicOptionOverrides,e),a=this.computeOptionsData(t.optionOverrides,i,t.calendarApi),o=RP(n.currentViewType,e),s=this.computeCurrentViewData(o,a,t.optionOverrides,i);t.calendarApi.currentDataManager=this,r.setThisContext(t.calendarApi),r.setOptions(s.options);let c={nowManager:this.nowManager,dateEnv:a.dateEnv,options:a.calendarOptions,pluginHooks:a.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:r,getCurrentData:this.getCurrentData},{currentDate:l,dateProfile:u}=n;this.data&&this.data.dateProfileGenerator!==s.dateProfileGenerator&&(u=s.dateProfileGenerator.build(l)),l=zP(l,e),u=HP(u,e,l,s.dateProfileGenerator),e.type!==`PREV`&&e.type!==`NEXT`&&nj(u.currentRange,l)||(l=u.currentRange.start);let d=WP(n.eventSources,e,u,c),f=Bj(n.eventStore,e,d,u,c),p=KP(d)&&!s.options.progressiveEventRendering&&n.renderableEventStore||f,{eventUiSingleBase:m,selectionConfig:h}=this.buildViewUiProps(c),g=this.buildEventUiBySource(d),_=this.buildEventUiBases(p.defs,m,g),v={dynamicOptionOverrides:i,currentViewType:o,currentDate:l,dateProfile:u,eventSources:d,eventStore:f,renderableEventStore:p,selectionConfig:h,eventUiBases:_,businessHours:this.parseContextBusinessHours(c),dateSelection:rF(n.dateSelection,e),eventSelection:iF(n.eventSelection,e),eventDrag:aF(n.eventDrag,e),eventResize:oF(n.eventResize,e)},y=Object.assign(Object.assign({},c),v);for(let t of a.pluginHooks.reducers)Object.assign(v,t(n,e,y));let b=PF(n,c),x=PF(v,c);!b&&x?r.trigger(`loading`,!0):b&&!x&&r.trigger(`loading`,!1),this.state=v,t.onAction&&t.onAction(e)}updateData(){let{props:e,state:t}=this,n=this.data,r=this.computeOptionsData(e.optionOverrides,t.dynamicOptionOverrides,e.calendarApi),i=this.computeCurrentViewData(t.currentViewType,r,e.optionOverrides,t.dynamicOptionOverrides),a=this.data=Object.assign(Object.assign(Object.assign({nowManager:this.nowManager,viewTitle:this.buildTitle(t.dateProfile,i.options,r.dateEnv),calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},r),i),t),o=r.pluginHooks.optionChangeHandlers,s=n&&n.calendarOptions,c=r.calendarOptions;if(s&&s!==c){s.timeZone!==c.timeZone&&(t.eventSources=a.eventSources=GP(a.eventSources,t.dateProfile,a),t.eventStore=a.eventStore=Kj(a.eventStore,n.dateEnv,a.dateEnv),t.renderableEventStore=a.renderableEventStore=Kj(a.renderableEventStore,n.dateEnv,a.dateEnv));for(let e in o)(this.optionsForHandling.indexOf(e)!==-1||s[e]!==c[e])&&o[e](c[e],a)}this.optionsForHandling=[],e.onData&&e.onData(a)}computeOptionsData(e,t,n){if(!this.optionsForRefining.length&&e===this.stableOptionOverrides&&t===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:r,pluginHooks:i,localeDefaults:a,availableLocaleData:o,extra:s}=this.processRawCalendarOptions(e,t);IF(s);let c=this.buildDateEnv(r.timeZone,r.locale,r.weekNumberCalculation,r.firstDay,r.weekText,i,o,r.defaultRangeSeparator),l=this.buildViewSpecs(i.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,a),u=this.buildTheme(r,i),d=this.parseToolbars(r,this.stableOptionOverrides,u,l,n);return this.stableCalendarOptionsData={calendarOptions:r,pluginHooks:i,dateEnv:c,viewSpecs:l,theme:u,toolbarConfig:d,localeDefaults:a,availableRawLocales:o.map}}processRawCalendarOptions(e,t){let{locales:n,locale:r}=cA([tA,e,t]),i=this.organizeRawLocales(n),a=i.map,o=this.buildLocale(r||i.defaultCode,a).options,s=this.buildPluginHooks(e.plugins||[],xF),c=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},eA),nA),rA),s.listenerRefiners),s.optionRefiners),l={},u=cA([tA,o,e,t]),d={},f=this.currentCalendarOptionsInput,p=this.currentCalendarOptionsRefined,m=!1;for(let e in u)this.optionsForRefining.indexOf(e)===-1&&(u[e]===f[e]||iA[e]&&e in f&&iA[e](f[e],u[e]))?d[e]=p[e]:c[e]?(d[e]=c[e](u[e]),m=!0):l[e]=f[e];return m&&(this.currentCalendarOptionsInput=u,this.currentCalendarOptionsRefined=d,this.stableOptionOverrides=e,this.stableDynamicOptionOverrides=t),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:s,availableLocaleData:i,localeDefaults:o,extra:l}}_computeCurrentViewData(e,t,n,r){let i=t.viewSpecs[e];if(!i)throw Error(`viewType "${e}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:a,extra:o}=this.processRawViewOptions(i,t.pluginHooks,t.localeDefaults,n,r);return IF(o),this.nowManager.handleInput(t.dateEnv,a.now),{viewSpec:i,options:a,dateProfileGenerator:this.buildDateProfileGenerator({dateProfileGeneratorClass:i.optionDefaults.dateProfileGeneratorClass,nowManager:this.nowManager,duration:i.duration,durationUnit:i.durationUnit,usesMinMaxTime:i.optionDefaults.usesMinMaxTime,dateEnv:t.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:a.slotMinTime,slotMaxTime:a.slotMaxTime,showNonCurrentDates:a.showNonCurrentDates,dayCount:a.dayCount,dateAlignment:a.dateAlignment,dateIncrement:a.dateIncrement,hiddenDays:a.hiddenDays,weekends:a.weekends,validRangeInput:a.validRange,visibleRangeInput:a.visibleRange,fixedWeekCount:a.fixedWeekCount}),viewApi:this.buildViewApi(e,this.getCurrentData,t.dateEnv)}}processRawViewOptions(e,t,n,r,i){let a=cA([tA,e.optionDefaults,n,r,e.optionOverrides,i]),o=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},eA),nA),rA),sA),t.listenerRefiners),t.optionRefiners),s={},c=this.currentViewOptionsInput,l=this.currentViewOptionsRefined,u=!1,d={};for(let e in a)a[e]===c[e]||iA[e]&&iA[e](a[e],c[e])?s[e]=l[e]:(a[e]===this.currentCalendarOptionsInput[e]||iA[e]&&iA[e](a[e],this.currentCalendarOptionsInput[e])?e in this.currentCalendarOptionsRefined&&(s[e]=this.currentCalendarOptionsRefined[e]):o[e]?s[e]=o[e](a[e]):d[e]=a[e],u=!0);return u&&(this.currentViewOptionsInput=a,this.currentViewOptionsRefined=s),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:d}}};function DF(e,t,n,r,i,a,o,s){let c=vP(t||o.defaultCode,o.map);return new OA({calendarSystem:`gregory`,timeZone:e,namedTimeZoneImpl:a.namedTimeZonedImpl,locale:c,weekNumberCalculation:n,firstDay:r,weekText:i,cmdFormatter:a.cmdFormatter,defaultSeparator:s})}function OF(e,t){return new(t.themeClasses[e.themeSystem]||DP)(e)}function kF(e){return new(e.dateProfileGeneratorClass||sj)(e)}function AF(e,t,n){return new uF(e,t,n)}function jF(e){return pA(e,e=>e.ui)}function MF(e,t,n){let r={"":t};for(let t in e){let i=e[t];i.sourceId&&n[i.sourceId]&&(r[t]=n[i.sourceId])}return r}function NF(e){let{options:t}=e;return{eventUiSingleBase:Nj({display:t.eventDisplay,editable:t.editable,startEditable:t.eventStartEditable,durationEditable:t.eventDurationEditable,constraint:t.eventConstraint,overlap:typeof t.eventOverlap==`boolean`?t.eventOverlap:void 0,allow:t.eventAllow,backgroundColor:t.eventBackgroundColor,borderColor:t.eventBorderColor,textColor:t.eventTextColor,color:t.eventColor},e),selectionConfig:Nj({constraint:t.selectConstraint,overlap:typeof t.selectOverlap==`boolean`?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function PF(e,t){for(let n of t.pluginHooks.isLoadingFuncs)if(n(e))return!0;return!1}function FF(e){return $j(e.options.businessHours,e)}function IF(e,t){for(let n in e)console.warn(`Unknown option '${n}'`+(t?` for view '${t}'`:``))}var LF=class extends LA{render(){return Z(`div`,{className:`fc-toolbar-chunk`},...this.props.widgetGroups.map(e=>this.renderWidgetGroup(e)))}renderWidgetGroup(e){let{props:t}=this,{theme:n}=this.context,r=[],i=!0;for(let a of e){let{buttonName:e,buttonClick:o,buttonText:s,buttonIcon:c,buttonHint:l}=a;if(e===`title`)i=!1,r.push(Z(`h2`,{className:`fc-toolbar-title`,id:t.titleId},t.title));else{let i=e===t.activeButton,a=!t.isTodayEnabled&&e===`today`||!t.isPrevEnabled&&e===`prev`||!t.isNextEnabled&&e===`next`,u=[`fc-${e}-button`,n.getClass(`button`)];i&&u.push(n.getClass(`buttonActive`)),r.push(Z(`button`,{type:`button`,title:typeof l==`function`?l(t.navUnit):l,disabled:a,"aria-pressed":i,className:u.join(` `),onClick:o},s||(c?Z(`span`,{className:c,role:`img`}):``)))}}return r.length>1?Z(`div`,{className:i&&n.getClass(`buttonGroup`)||``},...r):r[0]}},RF=class extends LA{render(){let{model:e,extraClassName:t}=this.props,n=!1,r,i,a=e.sectionWidgets,o=a.center;return a.left?(n=!0,r=a.left):r=a.start,a.right?(n=!0,i=a.right):i=a.end,Z(`div`,{className:[t||``,`fc-toolbar`,n?`fc-toolbar-ltr`:``].join(` `)},this.renderSection(`start`,r||[]),this.renderSection(`center`,o||[]),this.renderSection(`end`,i||[]))}renderSection(e,t){let{props:n}=this;return Z(LF,{key:e,widgetGroups:t,title:n.title,navUnit:n.navUnit,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled,titleId:n.titleId})}},zF=class extends LA{constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=e=>{this.el=e,BA(this.props.elRef,e),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:e,state:t}=this,{aspectRatio:n}=e,r=[`fc-view-harness`,n||e.liquid||e.height?`fc-view-harness-active`:`fc-view-harness-passive`],i=``,a=``;return n?t.availableWidth===null?a=`${1/n*100}%`:i=t.availableWidth/n:i=e.height||``,Z(`div`,{"aria-labelledby":e.labeledById,ref:this.handleEl,className:r.join(` `),style:{height:i,paddingBottom:a}},e.children)}componentDidMount(){this.context.addResizeHandler(this.handleResize)}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateAvailableWidth(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})}},BF=class extends VM{constructor(e){super(e),this.handleSegClick=(e,t)=>{let{component:n}=this,{context:r}=n,i=mM(t);if(i&&n.isValidSegDownEl(e.target)){let a=bO(e.target,`.fc-event-forced-url`),o=a?a.querySelector(`a[href]`).href:``;r.emitter.trigger(`eventClick`,{el:t,event:new lM(n.context,i.eventRange.def,i.eventRange.instance),jsEvent:e,view:r.viewApi}),o&&!e.defaultPrevented&&(window.location.href=o)}},this.destroy=AO(e.el,`click`,`.fc-event`,this.handleSegClick)}},VF=class extends VM{constructor(e){super(e),this.handleEventElRemove=e=>{e===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(e,t)=>{mM(t)&&(this.currentSegEl=t,this.triggerEvent(`eventMouseEnter`,e,t))},this.handleSegLeave=(e,t)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent(`eventMouseLeave`,e,t))},this.removeHoverListeners=jO(e.el,`.fc-event`,this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(e,t,n){let{component:r}=this,{context:i}=r,a=mM(n);(!t||r.isValidSegDownEl(t.target))&&i.emitter.trigger(e,{el:n,event:new lM(i,a.eventRange.def,a.eventRange.instance),jsEvent:t,view:i.viewApi})}},HF=class extends IA{constructor(){super(...arguments),this.buildViewContext=Q(FA),this.buildViewPropTransformers=Q(WF),this.buildToolbarProps=Q(UF),this.headerRef=YE(),this.footerRef=YE(),this.interactionsStore={},this.state={viewLabelId:OO()},this.registerInteractiveComponent=(e,t)=>{let n=HM(e,t),r=[BF,VF].concat(this.props.pluginHooks.componentInteractions).map(e=>new e(n));this.interactionsStore[e.uid]=r,UM[e.uid]=n},this.unregisterInteractiveComponent=e=>{let t=this.interactionsStore[e.uid];if(t){for(let e of t)e.destroy();delete this.interactionsStore[e.uid]}delete UM[e.uid]},this.resizeRunner=new vO(()=>{this.props.emitter.trigger(`_resize`,!0),this.props.emitter.trigger(`windowResize`,{view:this.props.viewApi})}),this.handleWindowResize=e=>{let{options:t}=this.props;t.handleWindowResize&&e.target===window&&this.resizeRunner.request(t.windowResizeDelay)}}render(){let{props:e}=this,{toolbarConfig:t,options:n}=e,r=!1,i=``,a;e.isHeightAuto||e.forPrint?i=``:n.height==null?n.contentHeight==null?a=Math.max(n.aspectRatio,.5):i=n.contentHeight:r=!0;let o=this.buildViewContext(e.viewSpec,e.viewApi,e.options,e.dateProfileGenerator,e.dateEnv,e.nowManager,e.theme,e.pluginHooks,e.dispatch,e.getCurrentData,e.emitter,e.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),s=t.header&&t.header.hasTitle?this.state.viewLabelId:void 0;return Z(PA.Provider,{value:o},Z(WM,{unit:`day`},n=>{let o=this.buildToolbarProps(e.viewSpec,e.dateProfile,e.dateProfileGenerator,e.currentDate,n,e.viewTitle);return Z(XE,null,t.header&&Z(RF,Object.assign({ref:this.headerRef,extraClassName:`fc-header-toolbar`,model:t.header,titleId:s},o)),Z(zF,{liquid:r,height:i,aspectRatio:a,labeledById:s},this.renderView(e),this.buildAppendContent()),t.footer&&Z(RF,Object.assign({ref:this.footerRef,extraClassName:`fc-footer-toolbar`,model:t.footer,titleId:``},o)))}))}componentDidMount(){let{props:e}=this;this.calendarInteractions=e.pluginHooks.calendarInteractions.map(t=>new t(e)),window.addEventListener(`resize`,this.handleWindowResize);let{propSetHandlers:t}=e.pluginHooks;for(let n in t)t[n](e[n],e)}componentDidUpdate(e){let{props:t}=this,{propSetHandlers:n}=t.pluginHooks;for(let r in n)t[r]!==e[r]&&n[r](t[r],t)}componentWillUnmount(){window.removeEventListener(`resize`,this.handleWindowResize),this.resizeRunner.clear();for(let e of this.calendarInteractions)e.destroy();this.props.emitter.trigger(`_unmount`)}buildAppendContent(){let{props:e}=this;return Z(XE,{},...e.pluginHooks.viewContainerAppends.map(t=>t(e)))}renderView(e){let{pluginHooks:t}=e,{viewSpec:n}=e,r={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},i=this.buildViewPropTransformers(t.viewPropsTransformers);for(let t of i)Object.assign(r,t.transform(r,e));let a=n.component;return Z(a,Object.assign({},r))}};function UF(e,t,n,r,i,a){let o=n.build(i,void 0,!1),s=n.buildPrev(t,r,!1),c=n.buildNext(t,r,!1);return{title:a,activeButton:e.type,navUnit:e.singleUnit,isTodayEnabled:o.isValid&&!nj(t.currentRange,i),isPrevEnabled:s.isValid,isNextEnabled:c.isValid}}function WF(e){return e.map(e=>new e)}var GF=class extends KM{constructor(e,t={}){super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=e=>{switch(e.type){case`SET_EVENT_DRAG`:case`SET_EVENT_RESIZE`:this.renderRunner.tryDrain()}},this.handleData=e=>{this.currentData=e,this.renderRunner.request(e.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:e}=this;AA(()=>{yD(Z(BM,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},(t,n,r,i)=>(this.setClassNames(t),this.setHeight(n),Z(GA.Provider,{value:this.customContentRenderId},Z(HF,Object.assign({isHeightAuto:r,forPrint:i},e))))),this.el)})}else this.isRendered&&(this.isRendered=!1,yD(null,this.el),this.setClassNames([]),this.setHeight(``))},dO(e),this.el=e,this.renderRunner=new vO(this.handleRenderRequest),new EF({optionOverrides:t,calendarApi:this,onAction:this.handleAction,onData:this.handleData})}render(){let e=this.isRendering;e?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()}destroy(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())}updateSize(){AA(()=>{super.updateSize()})}batchRendering(e){this.renderRunner.pause(`batchRendering`),e(),this.renderRunner.resume(`batchRendering`)}pauseRendering(){this.renderRunner.pause(`pauseRendering`)}resumeRendering(){this.renderRunner.resume(`pauseRendering`,!0)}resetOptions(e,t){this.currentDataManager.resetOptions(e,t)}setClassNames(e){if(!tk(e,this.currentClassNames)){let{classList:t}=this.el;for(let e of this.currentClassNames)t.remove(e);for(let n of e)t.add(n);this.currentClassNames=e}}setHeight(e){TO(this.el,`height`,e)}},KF=parseInt(`18.3.1`.split(`.`)[0])<18,qF=class extends _.Component{constructor(){super(...arguments),this.elRef=(0,_.createRef)(),this.isUpdating=!1,this.isUnmounting=!1,this.state={customRenderingMap:new Map},this.requestResize=()=>{this.isUnmounting||(this.cancelResize(),this.resizeId=requestAnimationFrame(()=>{this.doResize()}))}}render(){let e=[];for(let t of this.state.customRenderingMap.values())e.push(_.createElement(JF,{key:t.id,customRendering:t}));return _.createElement(`div`,{ref:this.elRef},e)}componentDidMount(){this.isUnmounting=!1;let e=new pP;this.handleCustomRendering=e.handle.bind(e),this.calendar=new GF(this.elRef.current,Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.calendar.render(),this.calendar.on(`_beforeprint`,()=>{(0,vl.flushSync)(()=>{})});let t;e.subscribe(e=>{let n=Date.now(),r=!t;(KF||r||this.isUpdating||this.isUnmounting||n-t<100?YF:vl.flushSync)(()=>{this.setState({customRenderingMap:e},()=>{t=n,r?this.doResize():this.requestResize()})})})}componentDidUpdate(){this.isUpdating=!0,this.calendar.resetOptions(Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.isUpdating=!1}componentWillUnmount(){this.isUnmounting=!0,this.cancelResize(),this.calendar.destroy()}doResize(){this.calendar.updateSize()}cancelResize(){this.resizeId!==void 0&&(cancelAnimationFrame(this.resizeId),this.resizeId=void 0)}getApi(){return this.calendar}};qF.act=YF;var JF=class extends _.PureComponent{render(){let{customRendering:e}=this.props,{generatorMeta:t}=e,n=typeof t==`function`?t(e.renderProps):t;return(0,vl.createPortal)(n,e.containerEl)}};function YF(e){e()}var XF=class extends sN{constructor(){super(...arguments),this.headerElRef=YE()}renderSimpleLayout(e,t){let{props:n,context:r}=this,i=[],a=BN(r.options);return e&&i.push({type:`header`,key:`header`,isSticky:a,chunk:{elRef:this.headerElRef,tableClassName:`fc-col-header`,rowContent:e}}),i.push({type:`body`,key:`body`,liquid:!0,chunk:{content:t}}),Z(YA,{elClasses:[`fc-daygrid`],viewSpec:r.viewSpec},Z(HN,{liquid:!n.isHeightAuto&&!n.forPrint,collapsibleWidth:n.forPrint,cols:[],sections:i}))}renderHScrollLayout(e,t,n,r){let i=this.context.pluginHooks.scrollGridImpl;if(!i)throw Error(`No ScrollGrid implementation`);let{props:a,context:o}=this,s=!a.forPrint&&BN(o.options),c=!a.forPrint&&VN(o.options),l=[];return e&&l.push({type:`header`,key:`header`,isSticky:s,chunks:[{key:`main`,elRef:this.headerElRef,tableClassName:`fc-col-header`,rowContent:e}]}),l.push({type:`body`,key:`body`,liquid:!0,chunks:[{key:`main`,content:t}]}),c&&l.push({type:`footer`,key:`footer`,isSticky:!0,chunks:[{key:`main`,content:zN}]}),Z(YA,{elClasses:[`fc-daygrid`],viewSpec:o.viewSpec},Z(i,{liquid:!a.isHeightAuto&&!a.forPrint,forPrint:a.forPrint,collapsibleWidth:a.forPrint,colGroups:[{cols:[{span:n,minWidth:r}]}],sections:l}))}};function ZF(e,t){let n=[];for(let e=0;e<t;e+=1)n[e]=[];for(let t of e)n[t.row].push(t);return n}function QF(e,t){let n=[];for(let e=0;e<t;e+=1)n[e]=[];for(let t of e)n[t.firstCol].push(t);return n}function $F(e,t){let n=[];if(e){for(let r=0;r<t;r+=1)n[r]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(let t of e.segs)n[t.row].segs.push(t)}else for(let e=0;e<t;e+=1)n[e]=null;return n}var eI=$k({hour:`numeric`,minute:`2-digit`,omitZeroMinute:!0,meridiem:`narrow`});function tI(e){let{display:t}=e.eventRange.ui;return t===`list-item`||t===`auto`&&!e.eventRange.def.allDay&&e.firstCol===e.lastCol&&e.isStart&&e.isEnd}var nI=class extends LA{render(){let{props:e}=this;return Z(GN,Object.assign({},e,{elClasses:[`fc-daygrid-event`,`fc-daygrid-block-event`,`fc-h-event`],defaultTimeFormat:eI,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))}},rI=class extends LA{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,i=SM(r,n.eventTimeFormat||eI,t,!0,e.defaultDisplayEventEnd);return Z(WN,Object.assign({},e,{elTag:`a`,elClasses:[`fc-daygrid-event`,`fc-daygrid-dot-event`],elAttrs:EM(e.seg,t),defaultGenerator:iI,timeText:i,isResizing:!1,isDateSelecting:!1}))}};function iI(e){return Z(XE,null,Z(`div`,{className:`fc-daygrid-event-dot`,style:{borderColor:e.borderColor||e.backgroundColor}}),e.timeText&&Z(`div`,{className:`fc-event-time`},e.timeText),Z(`div`,{className:`fc-event-title`},e.event.title||Z(XE,null,`\xA0`)))}var aI=class extends LA{constructor(){super(...arguments),this.compileSegs=Q(oI)}render(){let{props:e}=this,{allSegs:t,invisibleSegs:n}=this.compileSegs(e.singlePlacements);return Z(aP,{elClasses:[`fc-daygrid-more-link`],dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,moreCnt:e.moreCnt,allSegs:t,hiddenSegs:n,alignmentElRef:e.alignmentElRef,alignGridTop:e.alignGridTop,extraDateSpan:e.extraDateSpan,popoverContent:()=>{let n=(e.eventDrag?e.eventDrag.affectedInstances:null)||(e.eventResize?e.eventResize.affectedInstances:null)||{};return Z(XE,null,t.map(t=>{let r=t.eventRange.instance.instanceId;return Z(`div`,{className:`fc-daygrid-event-harness`,key:r,style:{visibility:n[r]?`hidden`:``}},tI(t)?Z(rI,Object.assign({seg:t,isDragging:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},CM(t,e.todayRange))):Z(nI,Object.assign({seg:t,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},CM(t,e.todayRange))))}))}})}};function oI(e){let t=[],n=[];for(let r of e)t.push(r.seg),r.isVisible||n.push(r.seg);return{allSegs:t,invisibleSegs:n}}var sI=$k({week:`narrow`}),cI=class extends sN{constructor(){super(...arguments),this.rootElRef=YE(),this.state={dayNumberId:OO()},this.handleRootEl=e=>{BA(this.rootElRef,e),BA(this.props.elRef,e)}}render(){let{context:e,props:t,state:n,rootElRef:r}=this,{options:i,dateEnv:a}=e,{date:o,dateProfile:s}=t,c=t.showDayNumber&&uI(o,s.currentRange,a);return Z(JN,{elTag:`td`,elRef:this.handleRootEl,elClasses:[`fc-daygrid-day`,...t.extraClassNames||[]],elAttrs:Object.assign(Object.assign(Object.assign({},t.extraDataAttrs),t.showDayNumber?{"aria-labelledby":n.dayNumberId}:{}),{role:`gridcell`}),defaultGenerator:lI,date:o,dateProfile:s,todayRange:t.todayRange,showDayNumber:t.showDayNumber,isMonthStart:c,extraRenderProps:t.extraRenderProps},(a,s)=>Z(`div`,{ref:t.innerElRef,className:`fc-daygrid-day-frame fc-scrollgrid-sync-inner`,style:{minHeight:t.minHeight}},t.showWeekNumber&&Z(eP,{elTag:`a`,elClasses:[`fc-daygrid-week-number`],elAttrs:QM(e,o,`week`),date:o,defaultFormat:sI}),!s.isDisabled&&(t.showDayNumber||YN(i)||t.forceDayTop)?Z(`div`,{className:`fc-daygrid-day-top`},Z(a,{elTag:`a`,elClasses:[`fc-daygrid-day-number`,c&&`fc-daygrid-month-start`],elAttrs:Object.assign(Object.assign({},QM(e,o)),{id:n.dayNumberId})})):t.showDayNumber?Z(`div`,{className:`fc-daygrid-day-top`,style:{visibility:`hidden`}},Z(`a`,{className:`fc-daygrid-day-number`},`\xA0`)):void 0,Z(`div`,{className:`fc-daygrid-day-events`,ref:t.fgContentElRef},t.fgContent,Z(`div`,{className:`fc-daygrid-day-bottom`,style:{marginTop:t.moreMarginTop}},Z(aI,{allDayDate:o,singlePlacements:t.singlePlacements,moreCnt:t.moreCnt,alignmentElRef:r,alignGridTop:!t.showDayNumber,extraDateSpan:t.extraDateSpan,dateProfile:t.dateProfile,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,todayRange:t.todayRange}))),Z(`div`,{className:`fc-daygrid-day-bg`},t.bgContent)))}};function lI(e){return e.dayNumberText||Z(XE,null,`\xA0`)}function uI(e,t,n){let{start:r,end:i}=t,a=ak(i,-1),o=n.getYear(r),s=n.getMonth(r),c=n.getYear(a),l=n.getMonth(a);return(o!==c||s!==l)&&(e.valueOf()===r.valueOf()||n.getDay(e)===1&&e.valueOf()<i.valueOf())}function dI(e){return e.eventRange.instance.instanceId+`:`+e.firstCol}function fI(e){return dI(e)+`:`+e.lastCol}function pI(e,t,n,r,i,a,o){let s=new _I(t=>i[e[t.index].eventRange.instance.instanceId+`:`+t.span.start+`:`+(t.span.end-1)]||1);s.allowReslicing=!0,s.strictOrder=r,t===!0||n===!0?(s.maxCoord=a,s.hiddenConsumes=!0):typeof t==`number`?s.maxStackCnt=t:typeof n==`number`&&(s.maxStackCnt=n,s.hiddenConsumes=!0);let c=[],l=[];for(let t=0;t<e.length;t+=1){let n=e[t];i[fI(n)]==null?l.push(n):c.push({index:t,span:{start:n.firstCol,end:n.lastCol+1}})}let u=s.addSegs(c),{singleColPlacements:d,multiColPlacements:f,leftoverMargins:p}=mI(s.toRects(),e,o),m=[],h=[];for(let e of l){f[e.firstCol].push({seg:e,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let t=e.firstCol;t<=e.lastCol;t+=1)d[t].push({seg:gI(e,t,t+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let e=0;e<o.length;e+=1)m.push(0);for(let t of u){let n=e[t.index],r=t.span;f[r.start].push({seg:gI(n,r.start,r.end,o),isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let e=r.start;e<r.end;e+=1)m[e]+=1,d[e].push({seg:gI(n,e,e+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let e=0;e<o.length;e+=1)h.push(p[e]);return{singleColPlacements:d,multiColPlacements:f,moreCnts:m,moreMarginTops:h}}function mI(e,t,n){let r=hI(e,n.length),i=[],a=[],o=[];for(let e=0;e<n.length;e+=1){let s=r[e],c=[],l=0,u=0;for(let r of s){let i=t[r.index];c.push({seg:gI(i,e,e+1,n),isVisible:!0,isAbsolute:!1,absoluteTop:r.levelCoord,marginTop:r.levelCoord-l}),l=r.levelCoord+r.thickness}let d=[];l=0,u=0;for(let r of s){let i=t[r.index],a=r.span.end-r.span.start>1,o=r.span.start===e;u+=r.levelCoord-l,l=r.levelCoord+r.thickness,a?(u+=r.thickness,o&&d.push({seg:gI(i,r.span.start,r.span.end,n),isVisible:!0,isAbsolute:!0,absoluteTop:r.levelCoord,marginTop:0})):o&&(d.push({seg:gI(i,r.span.start,r.span.end,n),isVisible:!0,isAbsolute:!1,absoluteTop:r.levelCoord,marginTop:u}),u=0)}i.push(c),a.push(d),o.push(u)}return{singleColPlacements:i,multiColPlacements:a,leftoverMargins:o}}function hI(e,t){let n=[];for(let e=0;e<t;e+=1)n.push([]);for(let t of e)for(let e=t.span.start;e<t.span.end;e+=1)n[e].push(t);return n}function gI(e,t,n,r){if(e.firstCol===t&&e.lastCol===n-1)return e;let i=e.eventRange,a=i.range,o=ej(a,{start:r[t].date,end:ik(r[n-1].date,1)});return Object.assign(Object.assign({},e),{firstCol:t,lastCol:n-1,eventRange:{def:i.def,ui:Object.assign(Object.assign({},i.ui),{durationEditable:!1}),instance:i.instance,range:o},isStart:e.isStart&&o.start.valueOf()===a.start.valueOf(),isEnd:e.isEnd&&o.end.valueOf()===a.end.valueOf()})}var _I=class extends cN{constructor(){super(...arguments),this.hiddenConsumes=!1,this.forceHidden={}}addSegs(e){let t=super.addSegs(e),{entriesByLevel:n}=this,r=e=>!this.forceHidden[uN(e)];for(let e=0;e<n.length;e+=1)n[e]=n[e].filter(r);return t}handleInvalidInsertion(e,t,n){let{entriesByLevel:r,forceHidden:i}=this,{touchingEntry:a,touchingLevel:o,touchingLateral:s}=e;if(this.hiddenConsumes&&a){let e=uN(a);if(!i[e]){if(this.allowReslicing){let e=Object.assign(Object.assign({},a),{span:dN(a.span,t.span)}),c=uN(e);i[c]=!0,r[o][s]=e,n.push(e),this.splitEntry(a,t,n)}else i[e]=!0,n.push(a)}}super.handleInvalidInsertion(e,t,n)}},vI=class extends sN{constructor(){super(...arguments),this.cellElRefs=new ON,this.frameElRefs=new ON,this.fgElRefs=new ON,this.segHarnessRefs=new ON,this.rootElRef=YE(),this.state={framePositions:null,maxContentHeight:null,segHeights:{}},this.handleResize=e=>{e&&this.updateSizing(!0)}}render(){let{props:e,state:t,context:n}=this,{options:r}=n,i=e.cells.length,a=QF(e.businessHourSegs,i),o=QF(e.bgEventSegs,i),s=QF(this.getHighlightSegs(),i),c=QF(this.getMirrorSegs(),i),{singleColPlacements:l,multiColPlacements:u,moreCnts:d,moreMarginTops:f}=pI(_M(e.fgEventSegs,r.eventOrder),e.dayMaxEvents,e.dayMaxEventRows,r.eventOrderStrict,t.segHeights,t.maxContentHeight,e.cells),p=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{};return Z(`tr`,{ref:this.rootElRef,role:`row`},e.renderIntro&&e.renderIntro(),e.cells.map((t,n)=>{let r=this.renderFgSegs(n,e.forPrint?l[n]:u[n],e.todayRange,p),i=this.renderFgSegs(n,yI(c[n],u),e.todayRange,{},!!e.eventDrag,!!e.eventResize,!1);return Z(cI,{key:t.key,elRef:this.cellElRefs.createRef(t.key),innerElRef:this.frameElRefs.createRef(t.key),dateProfile:e.dateProfile,date:t.date,showDayNumber:e.showDayNumbers,showWeekNumber:e.showWeekNumbers&&n===0,forceDayTop:e.showWeekNumbers,todayRange:e.todayRange,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,extraRenderProps:t.extraRenderProps,extraDataAttrs:t.extraDataAttrs,extraClassNames:t.extraClassNames,extraDateSpan:t.extraDateSpan,moreCnt:d[n],moreMarginTop:f[n],singlePlacements:l[n],fgContentElRef:this.fgElRefs.createRef(t.key),fgContent:Z(XE,null,Z(XE,null,r),Z(XE,null,i)),bgContent:Z(XE,null,this.renderFillSegs(s[n],`highlight`),this.renderFillSegs(a[n],`non-business`),this.renderFillSegs(o[n],`bg-event`)),minHeight:e.cellMinHeight})}))}componentDidMount(){this.updateSizing(!0),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,t){let n=this.props;this.updateSizing(!gA(e,n))}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}getHighlightSegs(){let{props:e}=this;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs}getMirrorSegs(){let{props:e}=this;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]}renderFgSegs(e,t,n,r,i,a,o){let{context:s}=this,{eventSelection:c}=this.props,{framePositions:l}=this.state,u=this.props.cells.length===1,d=i||a||o,f=[];if(l)for(let e of t){let{seg:t}=e,{instanceId:p}=t.eventRange.instance,m=e.isVisible&&!r[p],h=e.isAbsolute,g=``,_=``;h&&(s.isRtl?(_=0,g=l.lefts[t.lastCol]-l.lefts[t.firstCol]):(g=0,_=l.rights[t.firstCol]-l.rights[t.lastCol])),f.push(Z(`div`,{className:`fc-daygrid-event-harness`+(h?` fc-daygrid-event-harness-abs`:``),key:dI(t),ref:d?null:this.segHarnessRefs.createRef(fI(t)),style:{visibility:m?``:`hidden`,marginTop:h?``:e.marginTop,top:h?e.absoluteTop:``,left:g,right:_}},tI(t)?Z(rI,Object.assign({seg:t,isDragging:i,isSelected:p===c,defaultDisplayEventEnd:u},CM(t,n))):Z(nI,Object.assign({seg:t,isDragging:i,isResizing:a,isDateSelecting:o,isSelected:p===c,defaultDisplayEventEnd:u},CM(t,n)))))}return f}renderFillSegs(e,t){let{isRtl:n}=this.context,{todayRange:r}=this.props,{framePositions:i}=this.state,a=[];if(i)for(let o of e){let e=n?{right:0,left:i.lefts[o.lastCol]-i.lefts[o.firstCol]}:{left:0,right:i.rights[o.firstCol]-i.rights[o.lastCol]};a.push(Z(`div`,{key:TM(o.eventRange),className:`fc-daygrid-bg-harness`,style:e},t===`bg-event`?Z(ZN,Object.assign({seg:o},CM(o,r))):$N(t)))}return Z(XE,{},...a)}updateSizing(e){let{props:t,state:n,frameElRefs:r}=this;if(!t.forPrint&&t.clientWidth!==null){if(e){let e=t.cells.map(e=>r.currentMap[e.key]);if(e.length){let t=this.rootElRef.current,r=new aN(t,e,!0,!1);n.framePositions&&n.framePositions.similarTo(r)||this.setState({framePositions:new aN(t,e,!0,!1)})}}let i=this.state.segHeights,a=this.querySegHeights(),o=t.dayMaxEvents===!0||t.dayMaxEventRows===!0;this.safeSetState({segHeights:Object.assign(Object.assign({},i),a),maxContentHeight:o?this.computeMaxContentHeight():null})}}querySegHeights(){let e=this.segHarnessRefs.currentMap,t={};for(let n in e){let r=Math.round(e[n].getBoundingClientRect().height);t[n]=Math.max(t[n]||0,r)}return t}computeMaxContentHeight(){let e=this.props.cells[0].key,t=this.cellElRefs.currentMap[e],n=this.fgElRefs.currentMap[e];return t.getBoundingClientRect().bottom-n.getBoundingClientRect().top}getCellEls(){let e=this.cellElRefs.currentMap;return this.props.cells.map(t=>e[t.key])}};vI.addStateEquality({segHeights:gA});function yI(e,t){if(!e.length)return[];let n=bI(t);return e.map(e=>({seg:e,isVisible:!0,isAbsolute:!0,absoluteTop:n[e.eventRange.instance.instanceId],marginTop:0}))}function bI(e){let t={};for(let n of e)for(let e of n)t[e.seg.eventRange.instance.instanceId]=e.absoluteTop;return t}var xI=class extends sN{constructor(){super(...arguments),this.splitBusinessHourSegs=Q(ZF),this.splitBgEventSegs=Q(SI),this.splitFgEventSegs=Q(ZF),this.splitDateSelectionSegs=Q(ZF),this.splitEventDrag=Q($F),this.splitEventResize=Q($F),this.rowRefs=new ON}render(){let{props:e,context:t}=this,n=e.cells.length,r=this.splitBusinessHourSegs(e.businessHourSegs,n),i=this.splitBgEventSegs(e.bgEventSegs,n),a=this.splitFgEventSegs(e.fgEventSegs,n),o=this.splitDateSelectionSegs(e.dateSelectionSegs,n),s=this.splitEventDrag(e.eventDrag,n),c=this.splitEventResize(e.eventResize,n),l=n>=7&&e.clientWidth?e.clientWidth/t.options.aspectRatio/6:null;return Z(WM,{unit:`day`},(t,u)=>Z(XE,null,e.cells.map((t,d)=>Z(vI,{ref:this.rowRefs.createRef(d),key:t.length?t[0].date.toISOString():d,showDayNumbers:n>1,showWeekNumbers:e.showWeekNumbers,todayRange:u,dateProfile:e.dateProfile,cells:t,renderIntro:e.renderRowIntro,businessHourSegs:r[d],eventSelection:e.eventSelection,bgEventSegs:i[d],fgEventSegs:a[d],dateSelectionSegs:o[d],eventDrag:s[d],eventResize:c[d],dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,clientWidth:e.clientWidth,clientHeight:e.clientHeight,cellMinHeight:l,forPrint:e.forPrint}))))}componentDidMount(){this.registerInteractiveComponent()}componentDidUpdate(){this.registerInteractiveComponent()}registerInteractiveComponent(){if(!this.rootEl){let e=this.rowRefs.currentMap[0].getCellEls()[0],t=e?e.closest(`.fc-daygrid-body`):null;t&&(this.rootEl=t,this.context.registerInteractiveComponent(this,{el:t,isHitComboAllowed:this.props.isHitComboAllowed}))}}componentWillUnmount(){this.rootEl&&=(this.context.unregisterInteractiveComponent(this),null)}prepareHits(){this.rowPositions=new aN(this.rootEl,this.rowRefs.collect().map(e=>e.getCellEls()[0]),!1,!0),this.colPositions=new aN(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(e,t){let{colPositions:n,rowPositions:r}=this,i=n.leftToIndex(e),a=r.topToIndex(t);if(a!=null&&i!=null){let e=this.props.cells[a][i];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(a,i),allDay:!0},e.extraDateSpan),dayEl:this.getCellEl(a,i),rect:{left:n.lefts[i],right:n.rights[i],top:r.tops[a],bottom:r.bottoms[a]},layer:0}}return null}getCellEl(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]}getCellRange(e,t){let n=this.props.cells[e][t].date;return{start:n,end:ik(n,1)}}};function SI(e,t){return ZF(e.filter(CI),t)}function CI(e){return e.eventRange.def.allDay}var wI=class extends sN{constructor(){super(...arguments),this.elRef=YE(),this.needsScrollReset=!1}render(){let{props:e}=this,{dayMaxEventRows:t,dayMaxEvents:n,expandRows:r}=e,i=n===!0||t===!0;i&&!r&&(i=!1,t=null,n=null);let a=[`fc-daygrid-body`,i?`fc-daygrid-body-balanced`:`fc-daygrid-body-unbalanced`,r?``:`fc-daygrid-body-natural`];return Z(`div`,{ref:this.elRef,className:a.join(` `),style:{width:e.clientWidth,minWidth:e.tableMinWidth}},Z(`table`,{role:`presentation`,className:`fc-scrollgrid-sync-table`,style:{width:e.clientWidth,minWidth:e.tableMinWidth,height:r?e.clientHeight:``}},e.colGroupNode,Z(`tbody`,{role:`presentation`},Z(xI,{dateProfile:e.dateProfile,cells:e.cells,renderRowIntro:e.renderRowIntro,showWeekNumbers:e.showWeekNumbers,clientWidth:e.clientWidth,clientHeight:e.clientHeight,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,dayMaxEvents:n,dayMaxEventRows:t,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed}))))}componentDidMount(){this.requestScrollReset()}componentDidUpdate(e){e.dateProfile===this.props.dateProfile?this.flushScrollReset():this.requestScrollReset()}requestScrollReset(){this.needsScrollReset=!0,this.flushScrollReset()}flushScrollReset(){if(this.needsScrollReset&&this.props.clientWidth){let e=TI(this.elRef.current,this.props.dateProfile);if(e){let t=e.closest(`.fc-daygrid-body`),n=t.closest(`.fc-scroller`),r=e.getBoundingClientRect().top-t.getBoundingClientRect().top;n.scrollTop=r?r+1:0}this.needsScrollReset=!1}}};function TI(e,t){let n;return t.currentRangeUnit.match(/year|month/)&&(n=e.querySelector(`[data-date="${kk(t.currentDate)}-01"]`)),n||=e.querySelector(`[data-date="${Ok(t.currentDate)}"]`),n}var EI=class extends wN{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,t){return t.sliceRange(e)}},DI=class extends sN{constructor(){super(...arguments),this.slicer=new EI,this.tableRef=YE()}render(){let{props:e,context:t}=this;return Z(wI,Object.assign({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))}},OI=class extends XF{constructor(){super(...arguments),this.buildDayTableModel=Q(kI),this.headerRef=YE(),this.tableRef=YE()}render(){let{options:e,dateProfileGenerator:t}=this.context,{props:n}=this,r=this.buildDayTableModel(n.dateProfile,t),i=e.dayHeaders&&Z(bN,{ref:this.headerRef,dateProfile:n.dateProfile,dates:r.headerDates,datesRepDistinctDays:r.rowCnt===1}),a=t=>Z(DI,{ref:this.tableRef,dateProfile:n.dateProfile,dayTableModel:r,businessHours:n.businessHours,dateSelection:n.dateSelection,eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,nextDayThreshold:e.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.weekNumbers,expandRows:!n.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:n.forPrint});return e.dayMinWidth?this.renderHScrollLayout(i,a,r.colCnt,e.dayMinWidth):this.renderSimpleLayout(i,a)}};function kI(e,t){return new CN(new SN(e.renderRange,t),/year|month|week/.test(e.currentRangeUnit))}var AI=class extends sj{buildRenderRange(e,t,n){let r=super.buildRenderRange(e,t,n),{props:i}=this;return jI({currentRange:r,snapToWeek:/^(year|month)$/.test(t),fixedWeekCount:i.fixedWeekCount,dateEnv:i.dateEnv})}};function jI(e){let{dateEnv:t,currentRange:n}=e,{start:r,end:i}=n,a;if(e.snapToWeek&&(r=t.startOfWeek(r),a=t.startOfWeek(i),a.valueOf()!==i.valueOf()&&(i=rk(a,1))),e.fixedWeekCount){let e=t.startOfWeek(t.startOfMonth(ik(n.end,-1))),r=Math.ceil(ok(e,i));i=rk(i,6-r)}return{start:r,end:i}}uO(`:root{--fc-daygrid-event-dot-width:8px}.fc-daygrid-day-events:after,.fc-daygrid-day-events:before,.fc-daygrid-day-frame:after,.fc-daygrid-day-frame:before,.fc-daygrid-event-harness:after,.fc-daygrid-event-harness:before{clear:both;content:"";display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-daygrid-day-frame{min-height:100%;position:relative}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{padding:4px;position:relative;z-index:4}.fc .fc-daygrid-month-start{font-size:1.1em;font-weight:700}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{left:0;position:absolute;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{min-height:2em;position:relative}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{left:0;position:absolute;right:0;top:0}.fc .fc-daygrid-bg-harness{bottom:0;position:absolute;top:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{margin-top:1px;z-index:6}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;margin:0 2px}.fc .fc-daygrid-day-bottom:after,.fc .fc-daygrid-day-bottom:before{clear:both;content:"";display:table}.fc .fc-daygrid-more-link{border-radius:3px;cursor:pointer;line-height:1;margin-top:1px;max-width:100%;overflow:hidden;padding:2px;position:relative;white-space:nowrap;z-index:4}.fc .fc-daygrid-more-link:hover{background-color:rgba(0,0,0,.1)}.fc .fc-daygrid-week-number{background-color:var(--fc-neutral-bg-color);color:var(--fc-neutral-text-color);min-width:1.5em;padding:2px;position:absolute;text-align:center;top:0;z-index:5}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-more-link{float:left}.fc-direction-ltr .fc-daygrid-week-number{border-radius:0 0 3px 0;left:0}.fc-direction-rtl .fc-daygrid-more-link{float:right}.fc-direction-rtl .fc-daygrid-week-number{border-radius:0 0 0 3px;right:0}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{border-radius:3px;font-size:var(--fc-small-font-size);position:relative;white-space:nowrap}.fc-daygrid-block-event .fc-event-time{font-weight:700}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{align-items:center;display:flex;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;font-weight:700;min-width:0;overflow:hidden}.fc-daygrid-dot-event.fc-event-mirror,.fc-daygrid-dot-event:hover{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-daygrid-event-dot{border:calc(var(--fc-daygrid-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-daygrid-event-dot-width)/2);box-sizing:content-box;height:0;margin:0 4px;width:0}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}`);var MI=SP({name:`@fullcalendar/daygrid`,initialView:`dayGridMonth`,views:{dayGrid:{component:OI,dateProfileGeneratorClass:AI},dayGridDay:{type:`dayGrid`,duration:{days:1}},dayGridWeek:{type:`dayGrid`,duration:{weeks:1}},dayGridMonth:{type:`dayGrid`,duration:{months:1},fixedWeekCount:!0},dayGridYear:{type:`dayGrid`,duration:{years:1}}}});function NI(e){let t=new Date(`${e}T00:00:00Z`);return t.setUTCDate(t.getUTCDate()+1),t.toISOString().slice(0,10)}function PI(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}`}function FI(e){let t=e.start??e.due,n=e.due??e.start;if(t!==void 0&&n!==void 0)return{start:t,end:NI(n)};if(e.closed===void 0)return null;let r=PI(e.closed);return{start:r,end:NI(r)}}var II=e=>e.filter(e=>FI(e)!==null).length;function LI({entries:e,multiProject:t,selected:n,onSelect:r}){let i=e.flatMap(({project:e,item:t,colour:n})=>{let r=FI(t);return r===null?[]:[{id:`${e}:${t.id}`,title:t.title,start:r.start,end:r.end,allDay:!0,backgroundColor:n,borderColor:n,extendedProps:{project:e,item:t}}]}),a=(e,t)=>n?.project===e&&n.ref===t;return(0,b.jsx)(`div`,{className:`cal`,children:(0,b.jsx)(qF,{plugins:[MI],initialView:`dayGridMonth`,headerToolbar:{left:`prev,next today`,center:`title`,right:`dayGridMonth,dayGridWeek`},buttonText:{today:`today`,month:`month`,week:`week`},timeZone:`UTC`,firstDay:1,height:`100%`,events:i,eventContent:({event:e})=>{let{project:n,item:r}=e.extendedProps,i=gw[r.status];return(0,b.jsxs)(`div`,{className:`cal__event`,"data-strike":i.strike,"data-on":a(n,r.id),title:`${r.id} [${i.label}] ${r.title}`,children:[(0,b.jsx)(`span`,{className:`cal__icon`,children:i.icon}),(0,b.jsx)(`span`,{className:`cal__ref`,children:t?`${n}:${r.id}`:r.id}),(0,b.jsx)(`span`,{className:`cal__title`,children:r.title})]})},eventClick:({event:e,jsEvent:t})=>{t.preventDefault();let{project:n,item:i}=e.extendedProps;r(n,i.id)},dayMaxEvents:!0})})}var RI={full:`55.9 59.4 271 154.5`,icon:`111.4 56.7 160 160`};function zI({className:e,crop:t=`full`}){return(0,b.jsx)(`svg`,{className:e,viewBox:RI[t],"aria-hidden":`true`,focusable:`false`,children:(0,b.jsxs)(`g`,{transform:`matrix(0.1, 0, 0, -0.1, 62.431001, 269.861486)`,fill:`currentColor`,children:[(0,b.jsx)(`path`,{d:`M 1191.17 2095.39 C 1155.17 2079.39 1133.17 2038.39 1142.17 2001.39 C 1150.17 1970.39 1184.17 1929.39 1202.17 1929.39 C 1211.17 1929.39 1236.17 1881.39 1236.17 1863.39 C 1236.17 1861.39 1206.17 1859.39 1169.17 1859.39 C 1053.17 1858.39 976.178 1816.39 936.178 1733.39 C 917.178 1692.39 915.178 1672.39 918.178 1588.39 C 921.178 1498.39 923.178 1488.39 952.178 1447.39 C 975.178 1416.39 999.178 1398.39 1037.17 1382.39 C 1086.17 1362.39 1108.17 1360.39 1273.17 1359.39 C 1486.17 1359.39 1543.17 1369.39 1593.17 1412.39 C 1647.17 1459.39 1666.17 1509.39 1666.17 1606.39 C 1666.17 1719.39 1638.17 1778.39 1562.17 1827.39 C 1526.17 1850.39 1509.17 1854.39 1415.17 1857.39 L 1309.17 1861.39 L 1297.17 1900.39 C 1287.17 1933.39 1288.17 1943.39 1301.17 1961.39 C 1323.17 1994.39 1320.17 2044.39 1294.17 2073.39 C 1265.17 2105.39 1230.17 2112.39 1191.17 2095.39 Z M 1359.17 1799.39 C 1419.17 1798.39 1469.17 1779.39 1452.17 1762.39 C 1448.17 1757.39 1386.17 1753.39 1315.17 1752.39 C 1243.17 1750.39 1176.17 1744.39 1165.17 1739.39 C 1123.17 1716.39 1111.17 1681.39 1110.17 1572.39 C 1110.17 1516.39 1106.17 1466.39 1102.17 1462.39 C 1098.17 1457.39 1086.17 1465.39 1075.17 1478.39 C 1060.17 1496.39 1056.17 1517.39 1056.17 1580.39 C 1056.17 1655.39 1055.17 1660.39 1031.17 1671.39 C 1017.18 1677.39 1006.18 1690.39 1006.18 1699.39 C 1006.18 1726.39 1062.17 1771.39 1108.17 1781.39 C 1167.17 1794.39 1268.17 1807.39 1284.17 1802.39 C 1292.17 1801.39 1325.17 1799.39 1359.17 1799.39 Z M 1314.17 1657.39 C 1321.17 1650.39 1326.17 1624.39 1326.17 1599.39 C 1326.17 1549.39 1313.17 1529.39 1282.17 1529.39 C 1249.17 1529.39 1236.17 1543.39 1230.17 1580.39 C 1221.17 1632.39 1240.17 1669.39 1274.17 1669.39 C 1289.17 1669.39 1307.17 1664.39 1314.17 1657.39 Z M 1545.17 1655.39 C 1552.17 1647.39 1556.17 1620.39 1554.17 1593.39 C 1551.17 1539.39 1528.17 1516.39 1499.17 1535.39 C 1476.17 1549.39 1468.17 1648.39 1488.17 1660.39 C 1508.17 1673.39 1532.17 1671.39 1545.17 1655.39 Z`}),(0,b.jsx)(`path`,{d:`M -65.514 1330.67 C -65.514 1290.67 -61.514 1279.67 -47.514 1276.67 C -30.514 1271.67 -28.514 1256.67 -26.514 1089.67 C -24.514 912.673 -24.514 908.673 -44.514 908.673 C -64.514 908.673 -65.514 902.673 -65.514 804.673 C -65.514 713.673 -63.514 699.673 -47.514 694.673 C -24.514 687.673 155.486 653.673 274.486 634.673 C 939.486 526.673 1794.49 535.673 2469.49 659.673 C 2557.49 675.673 2632.49 688.673 2637.49 688.673 C 2641.49 688.673 2644.49 738.673 2644.49 798.673 C 2644.49 898.673 2642.49 909.673 2627.49 906.673 C 2610.49 903.673 2609.49 918.673 2606.49 1086.67 C 2604.49 1263.67 2604.49 1270.67 2624.49 1275.67 C 2640.49 1279.67 2644.49 1289.67 2644.49 1324.67 C 2644.49 1348.67 2639.49 1368.67 2633.49 1368.67 C 2628.49 1368.67 2593.49 1361.67 2556.49 1353.67 C 2183.49 1272.67 1745.49 1228.67 1184.49 1217.67 C 1069.49 1215.67 622.486 1255.67 389.486 1289.67 C 252.486 1309.67 -42.514 1365.67 -57.514 1374.67 C -62.514 1377.67 -65.514 1357.67 -65.514 1330.67 Z M 169.486 1234.67 C 213.486 1226.67 278.486 1215.67 314.486 1209.67 C 350.486 1204.67 396.486 1196.67 417.486 1193.67 L 454.486 1187.67 L 454.486 1006.67 L 454.486 826.673 L 397.486 832.673 C 336.486 839.673 119.486 874.673 72.486 884.673 L 44.486 890.673 L 44.486 1043.67 C 44.486 1221.67 49.486 1261.67 73.486 1254.67 C 82.486 1251.67 125.486 1243.67 169.486 1234.67 Z M 2526.49 1123.67 C 2527.49 1054.67 2528.49 972.673 2529.49 941.673 L 2529.49 883.673 L 2394.49 862.673 C 2320.49 850.673 2226.49 837.673 2186.49 833.673 L 2114.49 826.673 L 2116.49 1004.67 L 2119.49 1182.67 L 2154.49 1189.67 C 2173.49 1193.67 2250.49 1206.67 2324.49 1218.67 C 2398.49 1230.67 2461.49 1242.67 2463.49 1244.67 C 2465.49 1246.67 2480.49 1248.67 2496.49 1248.67 L 2524.49 1248.67 L 2526.49 1123.67 Z M 709.486 1158.67 C 759.486 1153.67 829.486 1148.67 866.486 1148.67 C 971.486 1148.67 964.486 1161.67 964.486 962.673 L 964.486 788.673 L 922.486 788.673 C 871.486 788.673 612.486 807.673 567.486 814.673 L 534.486 819.673 L 534.486 992.673 C 534.486 1087.67 537.486 1167.67 540.486 1170.67 C 543.486 1173.67 562.486 1174.67 582.486 1172.67 C 602.486 1170.67 660.486 1164.67 709.486 1158.67 Z M 2042.49 995.673 L 2044.49 819.673 L 2012.49 814.673 C 1956.49 805.673 1739.49 788.673 1680.49 788.673 L 1624.49 788.673 L 1626.49 966.673 L 1629.49 1143.67 L 1744.49 1150.67 C 1807.49 1154.67 1895.49 1162.67 1939.49 1166.67 C 1983.49 1171.67 2024.49 1174.67 2029.49 1173.67 C 2035.49 1172.67 2040.49 1103.67 2042.49 995.673 Z M 1542.49 961.673 L 1539.49 783.673 L 1294.49 783.673 L 1049.49 783.673 L 1046.49 961.673 L 1044.49 1138.67 L 1294.49 1138.67 L 1544.49 1138.67 L 1542.49 961.673 Z`})]})})}function BI({projectKey:e,colours:t,hidden:n,titleOf:r,query:i,onQuery:a,onPick:o,onClose:s}){let[c,l]=(0,_.useState)([]),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(`idle`),[m,h]=(0,_.useState)(0),g=(0,_.useRef)(null);(0,_.useEffect)(()=>g.current?.focus(),[]),(0,_.useEffect)(()=>{if(i.trim()===``){l([]),p(`idle`);return}let t=new AbortController,n=setTimeout(()=>{p(`searching`),Eb(e,i,t.signal).then(e=>{if(e===null)return p(`unavailable`);l(e.hits),d(e.relaxed),h(0),p(`done`)}).catch(e=>{e.name!==`AbortError`&&p(`unavailable`)})},120);return()=>{clearTimeout(n),t.abort()}},[e,i]);let v=e=>e.source===`context`||e.ref!==null,y=e=>{e!==void 0&&v(e)&&o(e)};return(0,b.jsxs)(`aside`,{className:`detail search`,"aria-label":`Search`,children:[(0,b.jsxs)(`div`,{className:`detail__head`,children:[(0,b.jsx)(`span`,{className:`detail__id`,children:`Search`}),(0,b.jsx)(`button`,{className:`detail__close`,onClick:s,"aria-label":`Close`,children:`×`})]}),(0,b.jsx)(`input`,{ref:g,className:`search__input`,type:`search`,placeholder:`Search items, comments and context, or type a ref`,value:i,onChange:e=>a(e.target.value),onKeyDown:e=>{if(e.key===`Escape`)s();else if(e.key===`ArrowDown`)h(e=>Math.min(e+1,c.length-1));else if(e.key===`ArrowUp`)h(e=>Math.max(e-1,0));else if(e.key===`Enter`)y(c[m]);else return;e.preventDefault()},"aria-label":`Search`}),f===`unavailable`&&(0,b.jsx)(`div`,{className:`search__note`,children:`This server cannot search. Reconnect it to pick up the newer code.`}),f===`done`&&c.length===0&&(0,b.jsx)(`div`,{className:`search__note`,children:`Nothing matches.`}),f===`done`&&u&&c.length>0&&(0,b.jsx)(`div`,{className:`search__note`,children:`Nothing has every word, so these have some of them.`}),c.length>0&&(0,b.jsx)(`ul`,{className:`search__hits`,role:`listbox`,children:c.map((e,i)=>(0,b.jsx)(`li`,{role:`option`,"aria-selected":i===m,children:(0,b.jsxs)(`button`,{className:`search__hit`,"data-active":i===m,disabled:!v(e),onMouseEnter:()=>h(i),onClick:()=>y(e),children:[(0,b.jsxs)(`span`,{className:`search__line`,children:[(0,b.jsx)(`span`,{className:`search__source`,children:e.source===`context`?`context`:e.source===`comment`?e.audience===`agent`?`agent comment`:`comment`:`item`}),e.ref!==null&&(0,b.jsx)(`span`,{className:`search__ref`,style:{color:t[e.ref.split(`-`)[0]??``]},children:e.ref}),(0,b.jsx)(`span`,{className:`search__title`,children:e.source===`context`?e.id:e.title??(e.ref===null?``:r(e.ref))}),e.ref!==null&&n.has(e.ref)&&(0,b.jsx)(`span`,{className:`search__hidden`,children:`hidden`})]}),e.snippet!==``&&(0,b.jsx)(`span`,{className:`search__snippet`,children:VI(e.snippet)})]})},`${e.source}:${e.id}`))})]})}function VI(e){return e.replace(/\*\*|__/g,``).split(/⟦|⟧/).map((e,t)=>t%2==1?(0,b.jsx)(`mark`,{children:e},t):e)}var HI=e=>new Date(e).toLocaleDateString(void 0,{day:`numeric`,month:`short`,year:`numeric`});function UI({comments:e,open:t,onToggle:n}){let[r,i]=(0,_.useState)(!1),a=e.filter(e=>e.audience===`agent`).length,o=r?e:e.filter(e=>e.audience!==`agent`);return(0,b.jsxs)(mb,{title:`Comments`,count:e.length,open:t,onToggle:n,children:[o.length===0&&a===0&&(0,b.jsx)(`p`,{className:`comments__empty`,children:`No comments on this item yet.`}),(0,b.jsx)(`ul`,{className:`comments`,children:o.map(e=>(0,b.jsxs)(`li`,{className:`comment`,"data-agent":e.audience===`agent`,children:[(0,b.jsxs)(`div`,{className:`comment__meta`,children:[(0,b.jsx)(`span`,{children:e.actor}),(0,b.jsx)(`span`,{children:HI(e.at)}),e.audience===`agent`&&(0,b.jsx)(`span`,{className:`comment__tag`,children:`Claude's note`})]}),(0,b.jsx)(`div`,{className:`comment__body`,children:(0,b.jsx)(lb,{remarkPlugins:[pw],children:e.body})})]},e.id))}),a>0&&(0,b.jsx)(`button`,{className:`comments__toggle`,onClick:()=>i(e=>!e),children:r?`Hide Claude's ${a===1?`note`:`${a} notes`}`:`Show Claude's ${a===1?`note`:`${a} notes`}`})]})}var WI=Object.keys(gw);function GI({area:e,name:t,description:n,colour:r,items:i,next:a,hidden:o,onPick:s,onZoom:c,onClose:l}){let u=new Map(WI.map(e=>[e,i.filter(t=>t.status===e).length])),d=i.filter(e=>e.status!==`done`),f=u.get(`done`)??0,p=(e,t)=>(0,b.jsx)(`li`,{children:(0,b.jsxs)(`button`,{className:`next__item`,"data-hidden":o.has(e.id),onClick:()=>s(e),title:e.title,children:[(0,b.jsx)(`span`,{className:`next__pos`,style:typeof t==`string`?{color:gw[e.status].colour}:void 0,children:t}),(0,b.jsx)(`span`,{className:`next__id`,style:{color:r},children:e.id}),(0,b.jsx)(`span`,{className:`next__title`,children:e.title})]})},e.id);return(0,b.jsxs)(`aside`,{className:`detail`,"aria-label":`Area ${e}`,children:[(0,b.jsxs)(`div`,{className:`detail__head`,children:[(0,b.jsxs)(`div`,{children:[(0,b.jsx)(`span`,{className:`detail__id`,style:{color:r},children:e}),(0,b.jsxs)(`button`,{className:`detail__dep area-pane__zoom`,onClick:c,children:[(0,b.jsxs)(`svg`,{viewBox:`0 0 16 16`,width:`12`,height:`12`,"aria-hidden":`true`,children:[(0,b.jsx)(`circle`,{cx:`8`,cy:`8`,r:`5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,b.jsx)(`circle`,{cx:`8`,cy:`8`,r:`1.6`,fill:`currentColor`}),(0,b.jsx)(`path`,{d:`M8 0.5v2.5M8 13v2.5M0.5 8h2.5M13 8h2.5`,stroke:`currentColor`,strokeWidth:`1.5`})]}),`fit to view`]})]}),(0,b.jsx)(`button`,{className:`detail__close`,onClick:l,"aria-label":`Close`,children:`×`})]}),(0,b.jsx)(`h2`,{className:`detail__title`,children:t??e}),n!==void 0&&n!==``&&(0,b.jsx)(`div`,{className:`detail__doc`,children:(0,b.jsx)(lb,{remarkPlugins:[pw],children:n})}),(0,b.jsxs)(`div`,{className:`area-pane__progress`,children:[(0,b.jsx)(`div`,{className:`area-pane__bar`,role:`img`,"aria-label":`${f} of ${i.length} done`,children:WI.map(e=>(u.get(e)??0)>0?(0,b.jsx)(`span`,{style:{flexGrow:u.get(e),background:gw[e].colour},title:`${u.get(e)} ${gw[e].label}`},e):null)}),(0,b.jsx)(`div`,{className:`area-pane__counts`,children:WI.filter(e=>(u.get(e)??0)>0).map(e=>(0,b.jsxs)(`span`,{children:[(0,b.jsx)(`span`,{style:{color:gw[e].colour},children:gw[e].icon}),` `,u.get(e),` `,gw[e].label]},e))})]}),a.length>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{className:`settings__label area-pane__label`,children:`In the next list`}),(0,b.jsx)(`ol`,{className:`next__list area-pane__list`,children:a.map(({item:e,position:t})=>p(e,t))})]}),(0,b.jsx)(`div`,{className:`settings__label area-pane__label`,children:d.length===0?`Nothing open`:`Open (${d.length})`}),d.length>0&&(0,b.jsx)(`ul`,{className:`next__list area-pane__list`,children:d.map(e=>p(e,gw[e.status].icon))})]})}var KI={item:vE,area:yE,ticket:bE,ghost:xE},qI=Object.keys(gw),JI=[`status`,`area`],YI=20,XI=[],ZI=[],QI=[],$I=[`graph`,`calendar`],eL=e=>(0,b.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:e}),tL=()=>eL((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`rect`,{x:`3`,y:`5`,width:`18`,height:`16`,rx:`2`}),(0,b.jsx)(`path`,{d:`M3 10h18M8 3v4M16 3v4`})]})),nL=()=>eL((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`circle`,{cx:`6`,cy:`6`,r:`2.5`}),(0,b.jsx)(`circle`,{cx:`18`,cy:`8`,r:`2.5`}),(0,b.jsx)(`circle`,{cx:`9`,cy:`18`,r:`2.5`}),(0,b.jsx)(`path`,{d:`M8.3 7.2l7.4 0.6M7 8.4l1.6 7.2`})]})),rL=()=>eL((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`circle`,{cx:`11`,cy:`11`,r:`6.5`}),(0,b.jsx)(`path`,{d:`M20 20l-4.2-4.2`})]})),iL=()=>eL((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`path`,{d:`M4 7h10M18 7h2M4 17h4M12 17h8`}),(0,b.jsx)(`circle`,{cx:`16`,cy:`7`,r:`2`}),(0,b.jsx)(`circle`,{cx:`10`,cy:`17`,r:`2`})]})),aL=()=>eL((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`path`,{d:`M9 4l-6 2v14l6-2 6 2 6-2V4l-6 2-6-2z`}),(0,b.jsx)(`path`,{d:`M9 4v14M15 6v14`})]}));function oL(e,t,n){let[r,i]=(0,_.useState)(()=>{try{let r=localStorage.getItem(e);return n.includes(r)?r:t}catch{return t}});return[r,(0,_.useCallback)(t=>{i(t);try{localStorage.setItem(e,t)}catch{}},[e])]}var sL=e=>new Date(`${e}T00:00:00Z`).toLocaleDateString(void 0,{weekday:`short`,day:`numeric`,month:`short`,year:`numeric`,timeZone:`UTC`});function cL({plan:e,selection:t,focus:n,reload:r}){let i=t.project,{MenuActions:a,EmptyPlan:o}=hw(),s=i?.key??``,c=i?.items??ZI,l=(0,_.useMemo)(()=>bw(c),[c]),u=(0,_.useMemo)(()=>bT(l,i?.areaOrder),[l,i?.areaOrder]),[d,f]=(0,_.useState)(new Set),[p,m]=(0,_.useState)(new Set([`done`])),[h,g]=(0,_.useState)(`area`),[v,y]=(0,_.useState)(!1),[x,S]=(0,_.useState)(()=>n===null&&(typeof window>`u`||window.innerWidth>=700)?`next`:null),[C,w]=(0,_.useState)(``),[T,E]=(0,_.useState)(null);(0,_.useEffect)(()=>{let e=e=>{let t=e.target,n=t!==null&&(t.isContentEditable||[`INPUT`,`TEXTAREA`,`SELECT`].includes(t.tagName));!(e.key===`k`&&(e.metaKey||e.ctrlKey)||e.key===`/`&&!n)||n&&e.key===`/`||(e.preventDefault(),te(`search`))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,_.useEffect)(()=>{if(!v)return;let e=e=>e.key===`Escape`&&y(!1);return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[v]);let[D,O]=oL(`attraverso.lock`,`selected`,[`selected`,`free`]),k=D===`selected`,[A,j]=(0,_.useState)(Fb(n)===null?n:null),[M,N]=(0,_.useState)(()=>{let e=Fb(n);return e===null?null:{heading:e}}),P=(0,_.useCallback)(e=>{j(null),I(null),S(null),N({heading:e})},[]),[F,I]=(0,_.useState)(null),ee=(0,_.useCallback)(e=>{j(null),N(null),S(null),I(e)},[]);function te(e){j(null),N(null),I(null),S(e)}let L=e=>{E(null),typeof e==`string`?te(e):ee(e.area)};(0,_.useEffect)(()=>{A!==null&&(N(null),I(null),S(null))},[A]);let ne=M?.heading??null;(0,_.useEffect)(()=>{if(i===null)return;let e=`#${encodeURIComponent(i.key)}`,t=ne===null?null:`${e}/${encodeURIComponent(Pb+ne)}`,n=window.location.hash;t!==null&&n!==t&&history.replaceState(null,``,t),t===null&&Fb(decodeURIComponent(n.slice(e.length+1)))!==null&&history.replaceState(null,``,e)},[ne,i]);let[R,re]=(0,_.useState)(new Set),ie=(0,_.useCallback)(e=>{re(t=>{if(!t.has(e))return t;let n=new Set(t);return n.delete(e),n})},[]);(0,_.useEffect)(()=>{let e=A?.split(`-`)[0];e!==void 0&&ie(e)},[A,ie]),(0,_.useEffect)(()=>{let e=Fb(n);e===null?j(n):P(e)},[n,P]);let[z,ae]=oL(`attraverso.view`,`graph`,$I),oe=z===`graph`?`calendar`:`graph`,se=typeof window<`u`&&window.innerWidth<700,[ce,le]=oL(se?`attraverso.minimap.narrow`:`attraverso.minimap.wide`,se?`hidden`:`shown`,[`shown`,`hidden`]),[ue,de]=oL(`attraverso.calendar.span`,`all`,[`project`,`all`]),fe=ue===`all`&&e.projects.length>1,[pe,me]=(0,_.useState)(null),[he,ge]=(0,_.useState)(null),[_e,ve]=(0,_.useState)(0),[ye,be]=(0,_.useState)(()=>new Set([`images`,`comments`])),xe=e=>({open:!ye.has(e),onToggle:()=>be(t=>ut(t,e))}),Se=(0,_.useMemo)(()=>(i?.next??QI).flatMap(e=>c.find(t=>t.id===e)??[]),[i,c]),Ce=x===`next`&&Se.length===0?null:x,[we,Te]=(0,_.useState)(()=>{try{let e=Number(window.localStorage.getItem(lL));return e>=dL?e:uL}catch{return uL}}),Ee=e=>{e.preventDefault();let t=e.clientX,n=we,r=n,i=e=>{r=Math.round(Math.min(Math.max(n+t-e.clientX,dL),window.innerWidth-80)),Te(r)},a=()=>{window.removeEventListener(`pointermove`,i),window.removeEventListener(`pointerup`,a);try{window.localStorage.setItem(lL,String(r))}catch{}};window.addEventListener(`pointermove`,i),window.addEventListener(`pointerup`,a)},De=(0,_.useMemo)(()=>{let e=new Set;for(let t of c)for(let n of t.deps)e.add(n).add(t.id);return e},[c]),Oe=(0,_.useMemo)(()=>c.filter(e=>!d.has(e.area)&&!p.has(e.status)),[c,d,p]),ke=(0,_.useMemo)(()=>{let e=new Map;for(let t of c){if(!t.parent)continue;let n=e.get(t.parent);n?n.push(t):e.set(t.parent,[t])}let t=e=>d.has(e.area)||p.has(e.status),n=new Map,r=i=>{let a=n.get(i.id);if(a!==void 0)return a;let o=e.get(i.id),s=o?o.every(r):t(i);return n.set(i.id,s),s},i=new Set;for(let e of c)r(e)&&i.add(e.id);return i},[c,d,p]),Ae=(0,_.useMemo)(()=>{let e=(e,t)=>e===t||e.startsWith(`${t}.`)||t.startsWith(`${e}.`),t=new Map,n=(e,n)=>{let r=t.get(e)??new Set;r.add(n),t.set(e,r)};for(let t of c)for(let r of t.deps)e(r,t.id)||(ke.has(t.id)&&!ke.has(r)&&n(r,t.id),ke.has(r)&&!ke.has(t.id)&&n(t.id,r));return t},[c,ke]),[je,Me]=Df([]),Ne=(0,_.useRef)(null),[Pe,Fe]=(0,_.useState)(null);(0,_.useEffect)(()=>{if(Pe===null||Ne.current===null)return;let e=je.find(e=>e.id===Pe);if(e===void 0||e.hidden===!0)return;let t=Pe.startsWith(`area:`);Ne.current.fitView({nodes:[{id:Pe}],duration:400,maxZoom:t?1.2:1.1,padding:t?.08:.6}),Fe(null)},[Pe,je]);let Ie=e=>{f(t=>t.has(e)?ut(t,e):t),Fe(`area:${e}`),se&&y(!1)},[Le,Re,ze]=Of([]),Be=(0,_.useMemo)(()=>bb(),[]),Ve=(0,_.useRef)(Be?i?.layout??{}:(()=>{let e=OE(s);return Object.keys(e).length>0?e:i?.layout??{}})()),He=(0,_.useRef)(null),Ue=(0,_.useRef)(!1),We=(0,_.useCallback)(e=>{if(!Be)return kE(s,e);He.current!==null&&clearTimeout(He.current),He.current=setTimeout(()=>{He.current=null,Cb(s,e).catch(t=>{console.warn(`the layout could not be saved to the plan; keeping it in this browser`,t),kE(s,e)})},400)},[s,Be]),Ge=(0,_.useRef)(AE(s)),Ke=(0,_.useRef)(new Map),qe=(0,_.useRef)({}),Je=(0,_.useCallback)(e=>{let t=[],n=!1;for(let r of e)r.type===`position`?(r.position&&(qe.current[r.id]=r.position),r.dragging===!1&&t.push(r.id)):r.type===`dimensions`&&r.dimensions&&r.resizing!==void 0&&(Ge.current[r.id]=r.dimensions,r.resizing===!1&&(n=!0));if(n&&jE(s,Ge.current),Me(t=>tu(e,t)),t.length>0){for(let e of t){let t=qe.current[e];t&&(Ve.current={...Ve.current,[e]:hE(Ke.current.get(e),t)}),delete qe.current[e]}Ue.current=!0,ve(e=>e+1)}},[s,Me]),Ye=(0,_.useCallback)(()=>{window.confirm(`Lay the map out afresh? Everything moves, including anything you arranged by hand.`)&&(ME(s),Ve.current={},Ge.current={},Ue.current=!0,ve(e=>e+1))},[s]),Xe=(0,_.useRef)(i?.layout??{});(0,_.useEffect)(()=>{let e=i?.layout??{};Be&&!fL(e,Xe.current)&&(Xe.current=e,He.current!==null||Ue.current||fL(e,Ve.current)||(Ve.current=e,ve(e=>e+1)))},[i?.layout,Be]),(0,_.useEffect)(()=>{let e=pE(c,l,u,h,A,ke,Ve.current);Ke.current=new Map(e.map(e=>[e.id,e.parentId]));let t=mE(e);(Ue.current||!fL(t,Ve.current))&&(Ue.current=!1,Ve.current=t,We(t));let n=c.filter(e=>!ke.has(e.id)),r=e;if(n.length<c.length||R.size>0){let i=new Map(e.map(e=>[e.id,e])),a=pE(n,bw(n),u,h,A,new Set,t,R),o=new Set(a.map(e=>e.id)),s=e=>e.type!==`ghost`&&R.has(e.id.split(`-`)[0]??``);r=[...a.map(e=>e.type===`area`&&e.data.collapsed!==void 0?e:{...e,data:i.get(e.id)?.data??e.data}),...e.filter(e=>!o.has(e.id)).map(e=>s(e)?{...e,hidden:!0}:e)]}Me(e=>{let t=new Set(e.filter(e=>e.selected===!0).map(e=>e.id));return r.map(e=>{let n=Ge.current[e.id],r=n?{...e,style:{...e.style,width:n.width,height:n.height}}:e;return t.has(e.id)?{...r,selected:!0}:r})})},[c,l,u,h,A,ke,R,_e,We,Me]),(0,_.useEffect)(()=>{Re(gE(c,u,h,A,pe,he,ke,R))},[c,u,h,A,pe,he,ke,R,Re]);let Ze=(0,_.useRef)(new Set);(0,_.useEffect)(()=>{let e=(pe?Ae.get(pe):void 0)??new Set,t=Ze.current;(e.size!==0||t.size!==0)&&(Me(n=>n.map(n=>{if(e.has(n.id))return{...n,hidden:!1,style:{...n.style,opacity:.42}};if(t.has(n.id)){let e={...n.style};return delete e.opacity,{...n,hidden:ke.has(n.id),style:e}}return n})),Ze.current=e)},[pe,Ae,ke,Me]);let Qe=(0,_.useMemo)(()=>k?je.map(e=>e.selected||e.id===A?{...e,draggable:!0}:e):je,[je,k,A]),$e=A?c.find(e=>e.id===A)??null:null,et=$e!==null||M!==null||F!==null||Ce!==null,tt=(0,_.useRef)(null);(0,_.useEffect)(()=>{let e=tt.current;if(!et||e===null)return;let t=()=>{let t=e.querySelector(`.detail`),n=t!==null&&t.scrollHeight-t.scrollTop-t.clientHeight>2;e.dataset.more=String(n)};t(),e.addEventListener(`scroll`,t,!0);let n=new MutationObserver(t);n.observe(e,{childList:!0,subtree:!0,characterData:!0});let r=new ResizeObserver(t);return r.observe(e),()=>{e.removeEventListener(`scroll`,t,!0),n.disconnect(),r.disconnect()}},[et]);let nt=(0,_.useMemo)(()=>bT(e.projects.map(e=>e.key)),[e.projects]),rt=(0,_.useMemo)(()=>fe?e.projects.flatMap(e=>e.items.filter(e=>!p.has(e.status)).map(t=>({project:e.key,item:t,colour:nt[e.key]}))):i?Oe.map(e=>({project:i.key,item:e,colour:h===`status`?gw[e.status].colour:u[e.area]})):[],[fe,e.projects,p,nt,i,Oe,h,u]),it=(0,_.useMemo)(()=>II(rt.map(e=>e.item)),[rt]),at=(e,t)=>{e===i?.key?j(t):window.location.hash=`${encodeURIComponent(e)}/${encodeURIComponent(t)}`},[ot,st]=(0,_.useState)(null),ct=$e?.id??null;(0,_.useEffect)(()=>{if(ct===null||i===null)return st(null);let e=new AbortController;return st(e=>e!==null&&e.ref===ct?e:{ref:ct,state:`loading`}),Tb(i.key,ct,e.signal).then(e=>st(e??{ref:ct,state:`missing`})).catch(e=>{e.name!==`AbortError`&&st({ref:ct,state:`failed`})}),()=>e.abort()},[ct,i,e]);let lt=ot!==null&&`body`in ot&&ot.ref===ct?ot:null,ut=(e,t)=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n},dt=e=>{if(e.source===`context`)return P(e.id);let t=e.ref===null?void 0:c.find(t=>t.id===e.ref);t!==void 0&&(ft(t),E(`search`))},ft=e=>{ke.has(e.id)&&(m(t=>t.has(e.status)?ut(t,e.status):t),f(t=>t.has(e.area)?ut(t,e.area):t)),ae(`graph`),j(e.id),Fe(e.id)},pt=(e,t)=>{(t.type===`item`||t.type===`ticket`)&&(j(t.data.item.id),E(null));let n=t.data;t.type===`area`&&n.area!==void 0&&(n.collapsed===void 0?n.foreign!==!0&&ee(n.area):ie(n.area))},mt=(e,t)=>{let n=t.data;if(t.type===`area`&&n.collapsed===void 0&&n.foreign!==!0&&n.area!==void 0){let e=n.area;re(t=>new Set(t).add(e)),A?.split(`-`)[0]===e&&j(null)}},ht=(e,t)=>{De.has(t.id)&&me(t.id)},gt=()=>me(null),_t=(e,t)=>ge(t.id),vt=()=>ge(null),yt=(0,_.useMemo)(()=>{let e=new Map,t=new Map;for(let n of c)e.set(n.area,(e.get(n.area)??0)+1),t.set(n.status,(t.get(n.status)??0)+1);return{byArea:e,byStatus:t}},[c]),bt=c.length-Oe.length;return(0,b.jsxs)(`div`,{className:`app`,children:[(0,b.jsxs)(`header`,{className:`topbar`,children:[(0,b.jsx)(`div`,{className:`topbar__title`,children:(0,b.jsxs)(`span`,{className:`picker-wrap`,children:[(0,b.jsx)(zI,{className:`picker__logo`,crop:`icon`}),(()=>{let t=i?.file??(e.storePath===null?null:e.storePath.split(`,`)[0].split(`/`).pop()),n=t!==null&&(0,b.jsx)(`span`,{className:`picker__file`,title:e.storePath??void 0,children:t});return e.projects.length<=1?(0,b.jsxs)(`span`,{className:`picker picker--static`,children:[(0,b.jsx)(`strong`,{className:`picker__name`,children:i?.name??`no project`}),n]}):(0,b.jsxs)(`label`,{className:`picker`,title:`Switch project`,children:[(0,b.jsx)(`span`,{className:`picker__name`,children:i?.name??`choose a project`}),n,(0,b.jsxs)(`select`,{className:`picker__native`,"aria-label":`Project`,value:i?.key??``,onChange:e=>{window.location.hash=e.target.value},children:[i===null&&(0,b.jsx)(`option`,{value:``,children:`choose a project`}),e.projects.map(e=>(0,b.jsx)(`option`,{value:e.key,children:e.name},e.key))]})]})})()]})}),(0,b.jsxs)(`div`,{className:`filters`,children:[(0,b.jsxs)(`button`,{className:`toolbtn`,"aria-label":`Show the ${oe}`,title:`Show the ${oe}`,onClick:()=>ae(oe),children:[(0,b.jsx)(`span`,{className:`toolbtn__main`,children:oe===`calendar`?(0,b.jsx)(tL,{}):(0,b.jsx)(nL,{})}),(0,b.jsx)(`span`,{className:`toolbtn__sub`,children:oe})]}),(0,b.jsxs)(`button`,{className:`toolbtn`,"data-on":v,"aria-haspopup":`dialog`,"aria-expanded":v,"aria-label":`View settings`,onClick:()=>y(e=>!e),children:[(0,b.jsxs)(`span`,{className:`toolbtn__main`,children:[(0,b.jsx)(iL,{}),`view`]}),(0,b.jsx)(`span`,{className:`toolbtn__sub`,children:bt>0?`${bt} hidden`:`all shown`})]})]}),v&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{className:`settings__backdrop`,onClick:()=>y(!1)}),(0,b.jsxs)(`div`,{className:`settings`,role:`dialog`,"aria-label":`View settings`,children:[(0,b.jsxs)(`div`,{className:`settings__head`,title:e.storePath??void 0,children:[i?.name??`No project`,e.storePath!==null&&` - ${i?.file??e.storePath.split(`/`).pop()}`]}),!(z===`calendar`&&fe)&&(0,b.jsx)(`div`,{className:`settings__label`,children:`Areas`}),!(z===`calendar`&&fe)&&(0,b.jsx)(`div`,{className:`filters__group`,children:l.map(e=>z===`graph`?(0,b.jsxs)(`span`,{className:`chip-pair`,"data-off":d.has(e),children:[(0,b.jsxs)(`button`,{className:`chip`,style:{"--area":u[e]},onClick:()=>Ie(e),title:d.has(e)?`Show ${e} and zoom to it`:`Zoom to ${e}`,children:[(0,b.jsx)(`span`,{className:`chip__dot`}),e,(0,b.jsx)(`span`,{className:`chip__count`,children:yt.byArea.get(e)})]}),(0,b.jsx)(`button`,{className:`chip chip--eye`,onClick:()=>f(t=>ut(t,e)),title:d.has(e)?`Show ${e}`:`Hide ${e}`,"aria-label":d.has(e)?`Show ${e}`:`Hide ${e}`,children:(0,b.jsxs)(`svg`,{viewBox:`0 0 16 16`,width:`13`,height:`13`,"aria-hidden":`true`,children:[(0,b.jsx)(`path`,{d:`M1 8s2.6-4.5 7-4.5S15 8 15 8s-2.6 4.5-7 4.5S1 8 1 8z`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.4`}),(0,b.jsx)(`circle`,{cx:`8`,cy:`8`,r:`2`,fill:`currentColor`}),d.has(e)&&(0,b.jsx)(`path`,{d:`M2.5 13.5l11-11`,stroke:`currentColor`,strokeWidth:`1.4`})]})})]},e):(0,b.jsxs)(`button`,{className:`chip`,"data-off":d.has(e),style:{"--area":u[e]},onClick:()=>f(t=>ut(t,e)),children:[(0,b.jsx)(`span`,{className:`chip__dot`}),e,(0,b.jsx)(`span`,{className:`chip__count`,children:yt.byArea.get(e)})]},e))}),!(z===`calendar`&&fe)&&(0,b.jsxs)(`div`,{className:`settings__row`,children:[(0,b.jsx)(`button`,{className:`chip`,disabled:d.size===0,onClick:()=>f(new Set),children:`show all`}),(0,b.jsx)(`button`,{className:`chip`,disabled:l.every(e=>d.has(e)),onClick:()=>f(new Set(l)),children:`hide all`})]}),(0,b.jsx)(`div`,{className:`settings__label`,children:`Statuses`}),(0,b.jsx)(`div`,{className:`filters__group`,children:qI.map(e=>(0,b.jsxs)(`button`,{className:`chip`,"data-off":p.has(e),style:{"--area":gw[e].colour},onClick:()=>m(t=>ut(t,e)),children:[(0,b.jsx)(`span`,{className:`chip__dot`}),gw[e].label,(0,b.jsx)(`span`,{className:`chip__count`,children:yt.byStatus.get(e)??0})]},e))}),(0,b.jsxs)(`div`,{className:`settings__row`,children:[!(z===`calendar`&&fe)&&(0,b.jsxs)(`div`,{className:`segmented`,role:`group`,"aria-label":`Colour by`,children:[(0,b.jsx)(`span`,{className:`segmented__label`,children:`colour`}),JI.map(e=>(0,b.jsx)(`button`,{className:`segmented__btn`,"data-on":h===e,onClick:()=>g(e),children:e},e))]}),z===`calendar`&&e.projects.length>1&&(0,b.jsx)(`button`,{className:`chip`,"data-on":fe,onClick:()=>de(fe?`project`:`all`),title:`Show every project's dated items on one calendar, coloured by project`,children:`all projects`})]}),z===`graph`&&(0,b.jsx)(`div`,{className:`settings__label`,children:`Layout`}),(0,b.jsxs)(`div`,{className:`settings__row`,children:[z===`graph`&&(0,b.jsx)(`button`,{className:`chip`,"data-on":k,onClick:()=>O(k?`free`:`selected`),title:k?`Only the selected item moves. Click to let everything move`:`Everything moves. Click to move only the selected item`,children:k?`🔒 move selected only`:`🔓 move anything`}),z===`graph`&&(0,b.jsx)(`button`,{className:`chip`,disabled:R.size===0,onClick:()=>re(new Set),title:`Open every area. Click a folded area to open just that one`,children:`expand all`}),z===`graph`&&(0,b.jsx)(`button`,{className:`chip`,disabled:l.every(e=>R.has(e)),onClick:()=>{j(null),re(new Set(l))},title:`Fold every area into a summary. Double-click an open area's frame to fold just that one`,children:`collapse all`}),z===`graph`&&(0,b.jsx)(`button`,{className:`chip`,onClick:Ye,title:`Lay the map out afresh, forgetting where everything was`,children:`reset layout`})]}),a!==void 0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{className:`settings__label`,children:`Plan`}),(0,b.jsx)(`div`,{className:`settings__row`,children:(0,b.jsx)(a,{plan:e,project:i,reload:r})})]})]})]})]}),(0,b.jsxs)(`div`,{className:`body`,"data-pane":et?`open`:void 0,children:[(0,b.jsxs)(`div`,{className:`graph`,children:[e.projects.length===0&&o!==void 0?(0,b.jsx)(`div`,{className:`graph__notice`,children:(0,b.jsx)(o,{reload:r})}):t.notice!==null&&!(z===`calendar`&&fe)?(0,b.jsx)(`div`,{className:`graph__notice`,children:t.notice}):z===`calendar`&&it===0&&(0,b.jsxs)(`div`,{className:`graph__notice`,children:[`Nothing here has a date yet. Give an item a `,(0,b.jsx)(`code`,{children:`due`}),` (or a `,(0,b.jsx)(`code`,{children:`start`}),`) with`,` `,(0,b.jsx)(`code`,{children:`edit_item`}),` and it appears on the calendar.`]}),z===`graph`&&i!==null&&(0,b.jsxs)(`div`,{className:`fabs`,children:[Se.length>0&&(0,b.jsxs)(`button`,{className:`next-fab`,"data-on":Ce===`next`,onClick:()=>Ce===`next`?S(null):te(`next`),title:`The order agreed with set_next`,children:[`Next`,(0,b.jsx)(`span`,{className:`chip__count`,children:Se.length})]}),i!==null&&i.context.length>0&&(0,b.jsxs)(`button`,{className:`next-fab`,"data-on":M!==null,onClick:()=>M===null?P(null):N(null),title:`The project's context sections: what it is, and how it is worked on`,children:[`Context`,(0,b.jsx)(`span`,{className:`chip__count`,children:i.context.length})]}),(0,b.jsx)(`button`,{className:`next-fab next-fab--icon`,"data-on":Ce===`search`,"aria-label":`Search`,title:`Search (/ or Cmd+K)`,onClick:()=>Ce===`search`?S(null):te(`search`),children:(0,b.jsx)(rL,{})})]}),z===`calendar`?(0,b.jsx)(LI,{entries:rt,multiProject:fe,selected:i&&A?{project:i.key,ref:A}:null,onSelect:at}):(0,b.jsxs)(Ef,{nodes:Qe,edges:Le,nodeTypes:KI,onNodesChange:Je,onEdgesChange:ze,onInit:e=>Ne.current=e,onNodeClick:pt,onNodeDoubleClick:mt,zoomOnDoubleClick:!1,onNodeMouseEnter:ht,onNodeMouseLeave:gt,onEdgeMouseEnter:_t,onEdgeMouseLeave:vt,onPaneClick:()=>j(null),nodesDraggable:!k,nodesConnectable:!1,fitView:!0,snapToGrid:!0,snapGrid:[YI,YI],minZoom:.05,maxZoom:1.75,proOptions:{hideAttribution:!0},children:[(0,b.jsx)(Ff,{gap:YI,color:`#232a33`}),ce===`shown`&&(0,b.jsx)(sp,{pannable:!0,zoomable:!0,nodeColor:e=>e.data.colour??`#2b3644`,nodeStrokeColor:`#0b0f14`,nodeBorderRadius:4,maskColor:`rgba(11,15,20,0.6)`}),(0,b.jsx)(Wf,{showInteractive:!1,children:(0,b.jsx)(Vf,{onClick:()=>le(ce===`shown`?`hidden`:`shown`),title:ce===`shown`?`Hide the minimap`:`Show the minimap`,"aria-label":ce===`shown`?`Hide the minimap`:`Show the minimap`,children:(0,b.jsx)(aL,{})})})]})]}),et&&(0,b.jsxs)(`div`,{className:`pane`,ref:tt,style:{width:we},children:[(0,b.jsx)(`div`,{className:`pane__resize`,onPointerDown:Ee,title:`Drag to resize`,"aria-hidden":`true`}),$e&&(0,b.jsxs)(`aside`,{className:`detail`,children:[(0,b.jsxs)(`div`,{className:`detail__head`,children:[(0,b.jsxs)(`div`,{children:[T!==null&&(0,b.jsx)(`button`,{className:`detail__close detail__back`,onClick:()=>L(T),"aria-label":`Back to ${typeof T==`string`?T===`next`?`Next`:`Search`:T.area}`,title:`Back to ${typeof T==`string`?T===`next`?`Next`:`Search`:T.area}`,children:`‹`}),(0,b.jsx)(`span`,{className:`detail__id`,style:{color:u[$e.area]},children:$e.id}),i&&(0,b.jsx)(PE,{projectKey:i.key,ref_:$e.id,status:$e.status,reload:r})]}),(0,b.jsx)(`button`,{className:`detail__close`,onClick:()=>j(null),"aria-label":`Close`,children:`×`})]}),(0,b.jsx)(`h2`,{className:`detail__title`,children:$e.title}),($e.start!==void 0||$e.due!==void 0)&&(0,b.jsx)(`div`,{className:`detail__deps`,children:[$e.start&&`starts ${sL($e.start)}`,$e.due&&`due ${sL($e.due)}`].filter(Boolean).join(`, `)}),$e.deps.length>0&&(0,b.jsxs)(`div`,{className:`detail__deps`,children:[`depends on:`,` `,$e.deps.map((e,t)=>{let n=yw(e);return(0,b.jsxs)(`span`,{children:[t>0&&`, `,n===null?(0,b.jsx)(`button`,{className:`detail__dep`,onClick:()=>j(e),children:e}):(0,b.jsx)(`span`,{className:`detail__dep detail__dep--elsewhere`,title:`${n.ref} in the ${n.project} project, which is not open here`,children:e})]},e)})]}),(0,b.jsx)(`div`,{className:`detail__doc`,children:lt===null?(0,b.jsx)(`p`,{className:`detail__pending`,children:ot!==null&&`state`in ot&&ot.state===`missing`?`This item is no longer in the plan.`:ot!==null&&`state`in ot&&ot.state===`failed`?`Could not load this item. Try reopening it.`:`Loading…`}):(0,b.jsx)(lb,{remarkPlugins:[pw],children:lt.body})}),i&&(0,b.jsx)(Hb,{metrics:i.metrics.get($e.id)??XI,...xe(`metrics`)}),i&&(0,b.jsx)(Rb,{...xe(`images`),projectKey:i.key,ref_:$e.id,images:lt?.attachments??XI,uploadsDisabled:e.uploadsDisabled,reload:r}),lt!==null&&(0,b.jsx)(UI,{comments:lt.comments,...xe(`comments`)})]}),!$e&&M===null&&F!==null&&i!==null&&(0,b.jsx)(GI,{area:F,name:i.areaInfo[F]?.name,description:i.areaInfo[F]?.description,colour:u[F],items:c.filter(e=>e.area===F),next:Se.flatMap((e,t)=>e.area===F?[{item:e,position:t+1}]:[]),hidden:ke,onPick:e=>{ft(e),E({area:F})},onZoom:()=>Ie(F),onClose:()=>I(null)}),!$e&&M===null&&F===null&&Ce===`next`&&(0,b.jsxs)(`aside`,{className:`detail`,"aria-label":`Next`,children:[(0,b.jsxs)(`div`,{className:`detail__head`,children:[(0,b.jsx)(`span`,{className:`detail__id`,children:`Next`}),(0,b.jsx)(`button`,{className:`detail__close`,onClick:()=>S(null),"aria-label":`Close`,children:`×`})]}),(0,b.jsx)(`ol`,{className:`next__list area-pane__list`,children:Se.map((e,t)=>(0,b.jsx)(`li`,{children:(0,b.jsxs)(`button`,{className:`next__item`,"data-hidden":ke.has(e.id),onClick:()=>{ft(e),E(`next`)},children:[(0,b.jsx)(`span`,{className:`next__pos`,children:t+1}),(0,b.jsx)(`span`,{className:`next__id`,style:{color:u[e.area]},children:e.id}),(0,b.jsx)(`span`,{className:`next__title`,children:e.title})]})},e.id))})]}),!$e&&M===null&&F===null&&Ce===`search`&&i!==null&&(0,b.jsx)(BI,{projectKey:i.key,colours:u,hidden:ke,titleOf:e=>c.find(t=>t.id===e)?.title,query:C,onQuery:w,onPick:dt,onClose:()=>S(null)}),!$e&&M!==null&&i!==null&&(0,b.jsxs)(`aside`,{className:`detail`,"aria-label":`Context`,children:[(0,b.jsxs)(`div`,{className:`detail__head`,children:[(0,b.jsxs)(`div`,{children:[M.heading!==null&&(0,b.jsx)(`button`,{className:`detail__close detail__back`,onClick:()=>N({heading:null}),"aria-label":`Back to Context`,title:`Back to Context`,children:`‹`}),(0,b.jsx)(`span`,{className:`detail__id`,children:`Context`})]}),(0,b.jsx)(`button`,{className:`detail__close`,onClick:()=>N(null),"aria-label":`Close`,children:`×`})]}),M.heading===null?(0,b.jsx)(`ul`,{className:`context__list`,children:i.context.map(e=>(0,b.jsx)(`li`,{children:(0,b.jsx)(`button`,{className:`context__item`,onClick:()=>N({heading:e.heading}),children:e.heading})},e.heading))}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`h2`,{className:`detail__title`,children:M.heading}),(0,b.jsx)(`div`,{className:`detail__doc`,children:(0,b.jsx)(lb,{remarkPlugins:[pw],children:i.context.find(e=>e.heading===M.heading)?.content??`This section no longer exists.`})})]})]})]})]})]})}var lL=`attraverso.pane.width`,uL=420,dL=300;function fL(e,t){let n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>t[n]!==void 0&&e[n].x===t[n].x&&e[n].y===t[n].y)}function pL({extensions:e}){let[t,n]=(0,_.useState)(null),[r,i]=(0,_.useState)(null),[a,o]=(0,_.useState)(null),s=gL();(0,_.useEffect)(()=>{_b(e.session,o).then(o,()=>o({mode:`local`}))},[e.session]);let c=(0,_.useCallback)(()=>{Mb().then(n,e=>i(e instanceof Error?e.message:String(e)))},[]),l=(0,_.useCallback)(()=>{Mb().then(n,()=>{})},[]);if(hL(t!==null&&e.liveRefresh!==!1,l),(0,_.useEffect)(()=>{a!==null&&a.mode!==`anonymous`&&c()},[a,c]),a===null)return(0,b.jsx)(`div`,{className:`boot`,children:`Starting...`});if(a.mode===`anonymous`)return(0,b.jsxs)(`div`,{className:`boot`,children:[(0,b.jsx)(`strong`,{children:`Sign in to see your projects`}),(0,b.jsx)(`span`,{className:`boot__hint`,children:`This viewer is hosted, so it shows the projects belonging to your account.`}),(0,b.jsx)(`button`,{className:`boot__action`,onClick:a.signIn,children:a.signInLabel})]});if(r)return(0,b.jsxs)(`div`,{className:`boot boot--error`,children:[(0,b.jsx)(`strong`,{children:`Could not load the plan.`}),(0,b.jsx)(`span`,{children:r}),(0,b.jsxs)(`span`,{className:`boot__hint`,children:[`Nothing is serving `,(0,b.jsx)(`code`,{children:vb}),`. Run `,(0,b.jsx)(`code`,{children:`yarn viewer`}),`, or open the viewer from the MCP server so it serves the store it already has loaded.`]})]});if(!t)return(0,b.jsx)(`div`,{className:`boot`,children:`Loading the plan...`});let u=Ib(t.projects,s.project);return(0,b.jsx)(mw.Provider,{value:e,children:(0,b.jsx)(cL,{plan:t,selection:u,focus:s.item,reload:c},u.project?.key??`none`)})}var mL=5;function hL(e,t){(0,_.useEffect)(()=>{if(!e||typeof EventSource>`u`)return;let n,r=null,i=0,a=!1,o=()=>{r?.close(),r=null},s=()=>{if(a||r!==null||document.visibilityState!==`visible`)return;let e=new EventSource(wb);r=e,e.addEventListener(`open`,()=>i=0),e.addEventListener(`version`,e=>{let r=e.data;n!==void 0&&r!==n&&t(),n=r}),e.addEventListener(`error`,()=>{(e.readyState===EventSource.CLOSED||++i>=mL)&&(a=!0,o())})},c=()=>document.visibilityState===`visible`?s():o();return s(),document.addEventListener(`visibilitychange`,c),()=>{a=!0,o(),document.removeEventListener(`visibilitychange`,c)}},[e,t])}function gL(){let e=()=>Nb(window.location.hash),[t,n]=(0,_.useState)(e);return(0,_.useEffect)(()=>{let t=()=>n(e());return window.addEventListener(`hashchange`,t),()=>window.removeEventListener(`hashchange`,t)},[]),t}function _L(e={}){(0,v.createRoot)(document.getElementById(`root`)).render((0,b.jsx)(_.StrictMode,{children:(0,b.jsx)(pL,{extensions:e})}))}_L();