@nightingale-elements/nightingale-structure
Version:
Nightingale Structure
35 lines • 2.53 MB
JavaScript
import e,{withManager as t,withHighlight as r,customElementOnce as n}from"@nightingale-elements/nightingale-new-core";var a=function(e,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},a(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},o.apply(this,arguments)};function s(e,t,r,n){var a,i=arguments.length,o=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o}function u(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}u((n=n.apply(e,t||[])).next())}))}function c(e,t){var r,n,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(o=0)),o;)try{if(r=1,n&&(a=2&s[0]?n.return:s[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,s[1])).done)return a;switch(n=0,a&&(s=[2&s[0],a.value]),s[0]){case 0:case 1:a=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.length>0&&a[a.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]<a[3])){o.label=s[1];break}if(6===s[0]&&o.label<a[1]){o.label=a[1],a=s;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(s);break}a[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{r=a=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function l(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function d(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,i=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return o}function f(e,t,r){if(r||2===arguments.length)for(var n,a=0,i=t.length;a<i;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))}function p(e){return this instanceof p?(this.v=e,this):new p(e)}function m(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,a=r.apply(e,t||[]),i=[];return n={},o("next"),o("throw"),o("return"),n[Symbol.asyncIterator]=function(){return this},n;function o(e){a[e]&&(n[e]=function(t){return new Promise((function(r,n){i.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{!function(e){e.value instanceof p?Promise.resolve(e.value.v).then(u,c):l(i[0][2],e)}(a[e](t))}catch(e){l(i[0][3],e)}}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function h(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=l(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,a){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,a,(t=e[r](t)).done,t.value)}))}}}function v(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}"function"==typeof SuppressedError&&SuppressedError;
/**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const g=globalThis,y=g.ShadowRoot&&(void 0===g.ShadyCSS||g.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,b=Symbol(),x=new WeakMap;let _=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==b)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(y&&void 0===e){const r=void 0!==t&&1===t.length;r&&(e=x.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&x.set(t,e))}return e}toString(){return this.cssText}};const S=y?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return(e=>new _("string"==typeof e?e:e+"",void 0,b))(t)})(e):e
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/,{is:C,defineProperty:w,getOwnPropertyDescriptor:A,getOwnPropertyNames:T,getOwnPropertySymbols:P,getPrototypeOf:I}=Object,D=globalThis,E=D.trustedTypes,M=E?E.emptyScript:"",B=D.reactiveElementPolyfillSupport,k=(e,t)=>e,R={toAttribute(e,t){switch(t){case Boolean:e=e?M:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(e){r=null}}return r}},O=(e,t)=>!C(e,t),F={attribute:!0,type:String,converter:R,reflect:!1,hasChanged:O};Symbol.metadata??=Symbol("metadata"),D.litPropertyMetadata??=new WeakMap;let N=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=F){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),n=this.getPropertyDescriptor(e,r,t);void 0!==n&&w(this.prototype,e,n)}}static getPropertyDescriptor(e,t,r){const{get:n,set:a}=A(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get(){return n?.call(this)},set(t){const i=n?.call(this);a.call(this,t),this.requestUpdate(e,i,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??F}static _$Ei(){if(this.hasOwnProperty(k("elementProperties")))return;const e=I(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(k("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(k("properties"))){const e=this.properties,t=[...T(e),...P(e)];for(const r of t)this.createProperty(r,e[r])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,r]of t)this.elementProperties.set(e,r)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const r=this._$Eu(e,t);void 0!==r&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const e of r)t.unshift(S(e))}else void 0!==e&&t.push(S(e));return t}static _$Eu(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(y)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const r of t){const t=document.createElement("style"),n=g.litNonce;void 0!==n&&t.setAttribute("nonce",n),t.textContent=r.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EC(e,t){const r=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,r);if(void 0!==n&&!0===r.reflect){const a=(void 0!==r.converter?.toAttribute?r.converter:R).toAttribute(t,r.type);this._$Em=e,null==a?this.removeAttribute(n):this.setAttribute(n,a),this._$Em=null}}_$AK(e,t){const r=this.constructor,n=r._$Eh.get(e);if(void 0!==n&&this._$Em!==n){const e=r.getPropertyOptions(n),a="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:R;this._$Em=n,this[n]=a.fromAttribute(t,e.type),this._$Em=null}}requestUpdate(e,t,r){if(void 0!==e){if(r??=this.constructor.getPropertyOptions(e),!(r.hasChanged??O)(this[e],t))return;this.P(e,t,r)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(e,t,r){this._$AL.has(e)||this._$AL.set(e,t),!0===r.reflect&&this._$Em!==e&&(this._$Ej??=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,r]of e)!0!==r.wrapped||this._$AL.has(t)||void 0===this[t]||this.P(t,this[t],r)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&=this._$Ej.forEach((e=>this._$EC(e,this[e]))),this._$EU()}updated(e){}firstUpdated(e){}};N.elementStyles=[],N.shadowRootOptions={mode:"open"},N[k("elementProperties")]=new Map,N[k("finalized")]=new Map,B?.({ReactiveElement:N}),(D.reactiveElementVersions??=[]).push("2.0.4");
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const L=globalThis,U=L.trustedTypes,G=U?U.createPolicy("lit-html",{createHTML:e=>e}):void 0,z="$lit$",V=`lit$${Math.random().toFixed(9).slice(2)}$`,j="?"+V,H=`<${j}>`,q=document,W=()=>q.createComment(""),X=e=>null===e||"object"!=typeof e&&"function"!=typeof e,Y=Array.isArray,K="[ \t\n\f\r]",Z=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Q=/-->/g,J=/>/g,$=RegExp(`>|${K}(?:([^\\s"'>=/]+)(${K}*=${K}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),ee=/'/g,te=/"/g,re=/^(?:script|style|textarea|title)$/i,ne=(e=>(t,...r)=>({_$litType$:e,strings:t,values:r}))(1),ae=Symbol.for("lit-noChange"),ie=Symbol.for("lit-nothing"),oe=new WeakMap,se=q.createTreeWalker(q,129);function ue(e,t){if(!Y(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==G?G.createHTML(t):t}let ce=class e{constructor({strings:t,_$litType$:r},n){let a;this.parts=[];let i=0,o=0;const s=t.length-1,u=this.parts,[c,l]=((e,t)=>{const r=e.length-1,n=[];let a,i=2===t?"<svg>":3===t?"<math>":"",o=Z;for(let t=0;t<r;t++){const r=e[t];let s,u,c=-1,l=0;for(;l<r.length&&(o.lastIndex=l,u=o.exec(r),null!==u);)l=o.lastIndex,o===Z?"!--"===u[1]?o=Q:void 0!==u[1]?o=J:void 0!==u[2]?(re.test(u[2])&&(a=RegExp("</"+u[2],"g")),o=$):void 0!==u[3]&&(o=$):o===$?">"===u[0]?(o=a??Z,c=-1):void 0===u[1]?c=-2:(c=o.lastIndex-u[2].length,s=u[1],o=void 0===u[3]?$:'"'===u[3]?te:ee):o===te||o===ee?o=$:o===Q||o===J?o=Z:(o=$,a=void 0);const d=o===$&&e[t+1].startsWith("/>")?" ":"";i+=o===Z?r+H:c>=0?(n.push(s),r.slice(0,c)+z+r.slice(c)+V+d):r+V+(-2===c?t:d)}return[ue(e,i+(e[r]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),n]})(t,r);if(this.el=e.createElement(c,n),se.currentNode=this.el.content,2===r||3===r){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(a=se.nextNode())&&u.length<s;){if(1===a.nodeType){if(a.hasAttributes())for(const e of a.getAttributeNames())if(e.endsWith(z)){const t=l[o++],r=a.getAttribute(e).split(V),n=/([.?@])?(.*)/.exec(t);u.push({type:1,index:i,name:n[2],strings:r,ctor:"."===n[1]?me:"?"===n[1]?he:"@"===n[1]?ve:pe}),a.removeAttribute(e)}else e.startsWith(V)&&(u.push({type:6,index:i}),a.removeAttribute(e));if(re.test(a.tagName)){const e=a.textContent.split(V),t=e.length-1;if(t>0){a.textContent=U?U.emptyScript:"";for(let r=0;r<t;r++)a.append(e[r],W()),se.nextNode(),u.push({type:2,index:++i});a.append(e[t],W())}}}else if(8===a.nodeType)if(a.data===j)u.push({type:2,index:i});else{let e=-1;for(;-1!==(e=a.data.indexOf(V,e+1));)u.push({type:7,index:i}),e+=V.length-1}i++}}static createElement(e,t){const r=q.createElement("template");return r.innerHTML=e,r}};function le(e,t,r=e,n){if(t===ae)return t;let a=void 0!==n?r._$Co?.[n]:r._$Cl;const i=X(t)?void 0:t._$litDirective$;return a?.constructor!==i&&(a?._$AO?.(!1),void 0===i?a=void 0:(a=new i(e),a._$AT(e,r,n)),void 0!==n?(r._$Co??=[])[n]=a:r._$Cl=a),void 0!==a&&(t=le(e,a._$AS(e,t.values),a,n)),t}let de=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:r}=this._$AD,n=(e?.creationScope??q).importNode(t,!0);se.currentNode=n;let a=se.nextNode(),i=0,o=0,s=r[0];for(;void 0!==s;){if(i===s.index){let t;2===s.type?t=new fe(a,a.nextSibling,this,e):1===s.type?t=new s.ctor(a,s.name,s.strings,this,e):6===s.type&&(t=new ge(a,this,e)),this._$AV.push(t),s=r[++o]}i!==s?.index&&(a=se.nextNode(),i++)}return se.currentNode=q,n}p(e){let t=0;for(const r of this._$AV)void 0!==r&&(void 0!==r.strings?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}},fe=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,n){this.type=2,this._$AH=ie,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=le(this,e,t),X(e)?e===ie||null==e||""===e?(this._$AH!==ie&&this._$AR(),this._$AH=ie):e!==this._$AH&&e!==ae&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):(e=>Y(e)||"function"==typeof e?.[Symbol.iterator])(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==ie&&X(this._$AH)?this._$AA.nextSibling.data=e:this.T(q.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:r}=e,n="number"==typeof r?this._$AC(e):(void 0===r.el&&(r.el=ce.createElement(ue(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(t);else{const e=new de(n,this),r=e.u(this.options);e.p(t),this.T(r),this._$AH=e}}_$AC(e){let t=oe.get(e.strings);return void 0===t&&oe.set(e.strings,t=new ce(e)),t}k(t){Y(this._$AH)||(this._$AH=[],this._$AR());const r=this._$AH;let n,a=0;for(const i of t)a===r.length?r.push(n=new e(this.O(W()),this.O(W()),this,this.options)):n=r[a],n._$AI(i),a++;a<r.length&&(this._$AR(n&&n._$AB.nextSibling,a),r.length=a)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}},pe=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,n,a){this.type=1,this._$AH=ie,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=a,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=ie}_$AI(e,t=this,r,n){const a=this.strings;let i=!1;if(void 0===a)e=le(this,e,t,0),i=!X(e)||e!==this._$AH&&e!==ae,i&&(this._$AH=e);else{const n=e;let o,s;for(e=a[0],o=0;o<a.length-1;o++)s=le(this,n[r+o],t,o),s===ae&&(s=this._$AH[o]),i||=!X(s)||s!==this._$AH[o],s===ie?e=ie:e!==ie&&(e+=(s??"")+a[o+1]),this._$AH[o]=s}i&&!n&&this.j(e)}j(e){e===ie?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},me=class extends pe{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===ie?void 0:e}},he=class extends pe{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==ie)}},ve=class extends pe{constructor(e,t,r,n,a){super(e,t,r,n,a),this.type=5}_$AI(e,t=this){if((e=le(this,e,t,0)??ie)===ae)return;const r=this._$AH,n=e===ie&&r!==ie||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,a=e!==ie&&(r===ie||n);n&&this.element.removeEventListener(this.name,this,r),a&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},ge=class{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){le(this,e)}};const ye=L.litHtmlPolyfillSupport;ye?.(ce,fe),(L.litHtmlVersions??=[]).push("3.2.1");
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
let be=class extends N{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,r)=>{const n=r?.renderBefore??t;let a=n._$litPart$;if(void 0===a){const e=r?.renderBefore??null;n._$litPart$=a=new fe(t.insertBefore(W(),e),e,void 0,r??{})}return a._$AI(e),a})(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return ae}};be._$litElement$=!0,be.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:be});const xe=globalThis.litElementPolyfillSupport;xe?.({LitElement:be}),(globalThis.litElementVersions??=[]).push("4.1.1");
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const _e={attribute:!0,type:String,converter:R,reflect:!1,hasChanged:O},Se=(e=_e,t,r)=>{const{kind:n,metadata:a}=r;let i=globalThis.litPropertyMetadata.get(a);if(void 0===i&&globalThis.litPropertyMetadata.set(a,i=new Map),i.set(r.name,e),"accessor"===n){const{name:n}=r;return{set(r){const a=t.get.call(this);t.set.call(this,r),this.requestUpdate(n,a,e)},init(t){return void 0!==t&&this.P(n,void 0,e),t}}}if("setter"===n){const{name:n}=r;return function(r){const a=this[n];t.call(this,r),this.requestUpdate(n,a,e)}}throw Error("Unsupported decorator location: "+n)};function Ce(e){return(t,r)=>"object"==typeof r?Se(e,t,r):((e,t,r)=>{const n=t.hasOwnProperty(r);return t.constructor.createProperty(r,n?{...e,wrapped:!0}:e),n?Object.getOwnPropertyDescriptor(t,r):void 0})(e,t,r)
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/}function we(e){return Ce({...e,state:!0,attribute:!1})}var Ae,Te,Pe,Ie,De,Ee,Me;"undefined"!=typeof window&&function(){window.console=window.console||{};for(var e,t,r=window.console,n={},a=function(){},i="memory".split(","),o="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)r[e]||(r[e]=n);for(;t=o.pop();)r[t]||(r[t]=a)}(),void 0===window.HTMLCanvasElement||window.HTMLCanvasElement.prototype.toBlob||Object.defineProperty(window.HTMLCanvasElement.prototype,"toBlob",{value:function(e,t,r){for(var n=window.atob(this.toDataURL(t,r).split(",")[1]),a=n.length,i=a>>2,o=new Uint8Array(a),s=new Uint32Array(o.buffer,0,i),u=0,c=0;c<i;c++)s[c]=n.charCodeAt(u++)|n.charCodeAt(u++)<<8|n.charCodeAt(u++)<<16|n.charCodeAt(u++)<<24;for(var l=3&a;l--;)o[u]=n.charCodeAt(u++);e(new window.Blob([o],{type:t||"image/png"}))}}),Math.cbrt=Math.cbrt||function(e){var t=Math.pow(Math.abs(e),1/3);return e<0?-t:t},Math.sign||(Math.sign=function(e){return 0===(e=+e)||isNaN(e)?Number(e):e>0?1:-1}),Number.isInteger||(Number.isInteger=function(e){return"number"==typeof e&&isFinite(e)&&e>-9007199254740992&&e<9007199254740992&&Math.floor(e)===e}),Number.isNaN||(Number.isNaN=function(e){return e!=e}),Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var t,r=Object(e),n=!1,a=1;a<arguments.length;a++){var i=arguments[a];if(null!=i){for(var o=Object.keys(Object(i)),s=0,u=o.length;s<u;s++){var c=o[s];try{var l=Object.getOwnPropertyDescriptor(i,c);void 0!==l&&l.enumerable&&(r[c]=i[c])}catch(e){n||(n=!0,t=e)}}if(n)throw t}}return r}}),String.prototype.startsWith||function(){var e=function(){var e;try{var t={},r=Object.defineProperty;e=r(t,t,t)&&r}catch(e){}return e}(),t={}.toString,r=function(e){if(null===this)throw TypeError();var r=String(this);if(e&&"[object RegExp]"===t.call(e))throw TypeError();var n=r.length,a=String(e),i=a.length,o=arguments.length>1?arguments[1]:void 0,s=o?Number(o):0;Number.isNaN(s)&&(s=0);var u=Math.min(Math.max(s,0),n);if(i+u>n)return!1;for(var c=-1;++c<i;)if(r.charCodeAt(u+c)!==a.charCodeAt(c))return!1;return!0};e?e(String.prototype,"startsWith",{value:r,configurable:!0,writable:!0}):String.prototype.startsWith=r}(),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){var r=this.toString();("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t>r.length)&&(t=r.length),t-=e.length;var n=r.indexOf(e,t);return-1!==n&&n===t}),String.prototype.repeat||(String.prototype.repeat=function(e){if(null===this)throw new TypeError("can't convert "+this+" to object");var t=""+this;if(e=+e,Number.isNaN(e)&&(e=0),e<0)throw new RangeError("repeat count must be non-negative");if(e===1/0)throw new RangeError("repeat count must be less than infinity");if(e=Math.floor(e),0===t.length||0===e)return"";if(t.length*e>=1<<28)throw new RangeError("repeat count must not overflow maximum string size");for(var r="";1&~e||(r+=t),0!==(e>>>=1);)t+=t;return r}),String.prototype.includes||(String.prototype.includes=function(e,t){return"number"!=typeof t&&(t=0),!(t+e.length>this.length)&&-1!==this.indexOf(e,t)}),Array.prototype.includes||(Array.prototype.includes=function(e){if(null==this)throw new TypeError("Array.prototype.includes called on null or undefined");var t=Object(this),r=parseInt(t.length,10)||0;if(0===r)return!1;var n,a,i=parseInt(arguments[1],10)||0;for(i>=0?n=i:(n=r+i)<0&&(n=0);n<r;){if(e===(a=t[n])||Number.isNaN(e)&&Number.isNaN(a))return!0;n++}return!1}),Array.from||(Array.from=(Ae=Object.prototype.toString,Te=function(e){return"function"==typeof e||"[object Function]"===Ae.call(e)},Pe=Math.pow(2,53)-1,Ie=function(e){var t=function(e){var t=Number(e);return isNaN(t)?0:0!==t&&isFinite(t)?(t>0?1:-1)*Math.floor(Math.abs(t)):t}(e);return Math.min(Math.max(t,0),Pe)},function(e){var t=Object(e);if(null==e)throw new TypeError("Array.from requires an array-like object - not null or undefined");var r,n=arguments.length>1?arguments[1]:void 0;if(void 0!==n){if(!Te(n))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(r=arguments[2])}for(var a,i=Ie(t.length),o=Te(this)?Object(new this(i)):new Array(i),s=0;s<i;)a=t[s],o[s]=n?void 0===r?n(a,s):n.call(r,a,s):a,s+=1;return o.length=i,o})),"undefined"!=typeof window&&function(){for(var e=0,t=["ms","moz","webkit","o"],r=0;r<t.length&&!window.requestAnimationFrame;++r)window.requestAnimationFrame=window[t[r]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[t[r]+"CancelAnimationFrame"]||window[t[r]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(t){var r=(new Date).getTime(),n=Math.max(0,16-(r-e)),a=window.setTimeout((function(){t(r+n)}),n);return e=r+n,a}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(e){clearTimeout(e)})}(),void 0===Function.prototype.name&&void 0!==Object.defineProperty&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*(\S*)\s*\(/)[1]}}),"undefined"!=typeof window&&(void 0===window.performance&&(window.performance={}),void 0===window.performance.now&&function(){var e=Date.now();window.performance.now=function(){return Date.now()-e}}()),void 0!==Object.defineProperty&&(void 0===Number.MAX_SAFE_INTEGER&&Object.defineProperty(Number,"MAX_SAFE_INTEGER",{enumerable:!1,configurable:!1,writable:!1,value:Math.pow(2,53)-1}),void 0===Number.MIN_SAFE_INTEGER&&Object.defineProperty(Number,"MIN_SAFE_INTEGER",{enumerable:!1,configurable:!1,writable:!1,value:-(Math.pow(2,53)-1)})),Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),r=t.length,n=new Array(r);r--;)n[r]=[t[r],e[t[r]]];return n}),Object.hasOwn||(Object.hasOwn=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null==this)throw TypeError('"this" is null or not defined');var t=Object(this),r=t.length>>>0;if("function"!=typeof e)throw TypeError("predicate must be a function");for(var n=arguments[1],a=0;a<r;){var i=t[a];if(e.call(n,i,a,t))return i;a++}},configurable:!0,writable:!0}),Array.prototype.fill||Object.defineProperty(Array.prototype,"fill",{value:function(e){if(null==this)throw new TypeError("this is null or not defined");for(var t=Object(this),r=t.length>>>0,n=arguments[1]|0,a=n<0?Math.max(r+n,0):Math.min(n,r),i=arguments[2],o=void 0===i?r:i|0,s=o<0?Math.max(r+o,0):Math.min(o,r);a<s;)t[a]=e,a++;return t}}),Array.prototype.copyWithin||Object.defineProperty(Array.prototype,"copyWithin",{value:function(e,t){if(null==this)throw new TypeError("this is null or not defined");var r=Object(this),n=r.length>>>0,a=e|0,i=a<0?Math.max(n+a,0):Math.min(a,n),o=t|0,s=o<0?Math.max(n+o,0):Math.min(o,n),u=arguments[2],c=void 0===u?n:u|0,l=c<0?Math.max(n+c,0):Math.min(c,n),d=Math.min(l-s,n-i),f=1;for(s<i&&i<s+d&&(f=-1,s+=d-1,i+=d-1);d>0;)s in r?r[i]=r[s]:delete r[i],s+=f,i+=f,d--;return r},configurable:!0,writable:!0}),Int8Array.prototype.copyWithin||Object.defineProperty(Int8Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Int16Array.prototype.copyWithin||Object.defineProperty(Int16Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Int32Array.prototype.copyWithin||Object.defineProperty(Int32Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Uint8Array.prototype.copyWithin||Object.defineProperty(Uint8Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Uint16Array.prototype.copyWithin||Object.defineProperty(Uint16Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Uint32Array.prototype.copyWithin||Object.defineProperty(Uint32Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Float32Array.prototype.copyWithin||Object.defineProperty(Float32Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Float64Array.prototype.copyWithin||Object.defineProperty(Float64Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),function(e){e.create=function(e){return e},e.getDuration=function(e,t){var r,n;if(t.customDurationMs)return t.customDurationMs;var a=null===(n=(r=t.definition).getDuration)||void 0===n?void 0:n.call(r,t.params,e);return"fixed"===(null==a?void 0:a.kind)?a.durationMs:void 0}}(De||(De={})),function(e){e.create=function(e){return e},e.has=function(e,t){return!!(e&t)},e.hasAll=function(e,t){return!!t&&(e&t)===t}}(Ee||(Ee={})),function(e){e.create=function(e){return void 0===e&&(e=512),{current:[],offset:0,capacity:e,chunks:[]}},e.getString=function(e){return e.chunks.length?(e.offset>0&&(e.chunks[e.chunks.length]=e.current.length===e.offset?e.current.join(""):e.current.slice(0,e.offset).join("")),e.chunks.join("")):e.current.length===e.offset?e.current.join(""):e.current.splice(0,e.offset).join("")},e.getSize=function(e){for(var t=0,r=0,n=e.chunks;r<n.length;r++){t+=n[r].length}for(var a=0;a<e.offset;a++)t+=e.current[a].length;return t},e.getChunks=function(e){return e.offset>0&&(e.current.length===e.offset?e.chunks[e.chunks.length]=e.current.join(""):e.chunks[e.chunks.length]=e.current.slice(0,e.offset).join(""),e.offset=0),e.chunks};var t=[];function r(e,r){r>0&&n(e,t[r])}function n(e,t){e.offset===e.capacity&&(e.chunks[e.chunks.length]=e.current.join(""),e.offset=0),e.current[e.offset++]=t}!function(){for(var e="",r=0;r<512;r++)t[r]=e,e+=" "}(),e.newline=function(e){n(e,"\n")},e.whitespace=r,e.whitespace1=function(e){n(e," ")},e.write=function(e,t){t&&(e.offset===e.capacity&&(e.chunks[e.chunks.length]=e.current.join(""),e.offset=0),e.current[e.offset++]=t)},e.writeSafe=n,e.writePadLeft=function(e,t,a){t?(r(e,a-t.length),n(e,t)):r(e,a)},e.writePadRight=function(e,t,a){if(t){var i=a-t.length;n(e,t),r(e,i)}else r(e,a)},e.writeInteger=function(e,t){n(e,""+t)},e.writeIntegerAndSpace=function(e,t){n(e,t+" ")},e.writeIntegerPadLeft=function(e,t,a){var i=""+t;r(e,a-i.length),n(e,i)},e.writeIntegerPadRight=function(e,t,a){var i=""+t,o=a-i.length;n(e,i),r(e,o)},e.writeFloat=function(e,t,r){n(e,""+Math.round(r*t)/r)},e.writeFloatPadLeft=function(e,t,a,i){var o=""+Math.round(a*t)/a;r(e,i-o.length),n(e,o)},e.writeFloatPadRight=function(e,t,a,i){var o=""+Math.round(a*t)/a,s=i-o.length;n(e,o),r(e,s)}}(Me||(Me={}));var Be,ke,Re,Oe=function(){if("undefined"!=typeof window&&window.performance){var e=window.performance;return function(){return e.now()}}return"undefined"!=typeof process&&"undefined"!==process.hrtime&&"function"==typeof process.hrtime?function(){var e=process.hrtime();return 1e3*e[0]+e[1]/1e6}:Date.now?function(){return Date.now()}:function(){return+new Date}}();function Fe(e,t){if(void 0===t&&(t=!0),isNaN(e))return"n/a";for(var r=Math.floor(e/36e5),n=Math.floor(e/6e4%60),a=Math.floor(e/1e3%60),i=Math.floor(e%1e3).toString();i.length<3;)i="0"+i;for(;!t&&i.length>1&&"0"===i[i.length-1];)i=i.substr(0,i.length-1);return r>0?"".concat(r,"h").concat(n,"m").concat(a,".").concat(i,"s"):n>0?"".concat(n,"m").concat(a,".").concat(i,"s"):a>0?"".concat(a,".").concat(i,"s"):"".concat(e.toFixed(0),"ms")}function Ne(e,t){return e-t}function Le(e,t){void 0===e&&(e=0),void 0===t&&(t=Number.MAX_SAFE_INTEGER);var r=e;return function(){var e=r;return r=(r+1)%t,e}}!function(e){var t="undefined"!=typeof btoa?btoa:function(e){return Buffer.from(e).toString("base64")},r=[];e.create22=function(){for(var e=+new Date+Oe(),n=0;n<16;n++)r[n]=String.fromCharCode((e+255*Math.random())%255|0),e=Math.floor(e/255);return t(r.join("")).replace(/\+/g,"-").replace(/\//g,"_").substr(0,22)},e.createv4=function(){var e=+new Date+Oe(),t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var r=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?r:3&r|8).toString(16)}));return t},e.is=function(e){return"string"==typeof e}}(Be||(Be={})),function(e){var t=function(){function e(){this.size=0}return e.prototype.has=function(e){return!1},e.prototype.forEach=function(e,t){return t},e}(),r=function(){function e(e){this.idx=e,this.size=1}return e.prototype.has=function(e){return e===this.idx},e.prototype.forEach=function(e,t){return e(this.idx,t),t},e}(),n=function(){function e(e,t){this.mask=e,this.size=t,this.length=e.length}return e.prototype.has=function(e){return e<this.length&&!!this.mask[e]},e.prototype._forEach=function(e,t){for(var r=0;r<this.length;r++)this.mask[r]&&e(r,t)},e.prototype.forEach=function(e,t){return this._forEach(e,t),t},e}(),a=function(){function e(e){this.size=e}return e.prototype.has=function(e){return!0},e.prototype._forEach=function(e,t){for(var r=0;r<this.size;r++)e(r,t)},e.prototype.forEach=function(e,t){return this._forEach(e,t),t},e}(),i=function(){function e(e){this.set=e,this._flat=void 0,this.size=e.size}return e.prototype.has=function(e){return this.set.has(e)},e.prototype._forEach=function(e,t){for(var r=0,n=this.flatten();r<n.length;r++){e(n[r],t)}},e.prototype.flatten=function(){if(this._flat)return this._flat;var e=new Int32Array(this.size),t=0;return this.set.forEach((function(r){return e[t++]=r})),function(e){Array.prototype.sort.call(e,Ne)}(e),this._flat=e,this._flat},e.prototype.forEach=function(e,t){return this._forEach(e,t),t},e}();function o(e){return new i(e)}function s(e,t){return new n(e,t)}e.always=function(e){return new a(e)},e.never=new t,e.ofSet=o,e.singleton=function(e){return new r(e)},e.ofUniqueIndices=function(e){var o=e.length;if(0===o)return new t;if(1===o)return new r(e[0]);for(var s=0,u=0,c=e;u<c.length;u++){(p=c[u])>s&&(s=p)}if(o===s)return new a(o);if(o/s<1/12){for(var l=new Set,d=0,f=e;d<f.length;d++){var p=f[d];l.add(p)}return new i(l)}for(var m=new Int8Array(s+1),h=0,v=e;h<v.length;h++){m[p=v[h]]=1}return new n(m,e.length)},e.ofMask=s,e.hasAny=function(e,t){for(var r=0,n=t;r<n.length;r++){var a=n[r];if(e.has(a))return!0}return!1},e.complement=function(e,t){var r=0,n=0;if(t.forEach((function(t){e.has(t)||(r++,t>n&&(n=t))})),r/n<1/12){var a=new Set;return t.forEach((function(t){e.has(t)||a.add(t)})),o(a)}var i=new Uint8Array(n+1);return t.forEach((function(t){e.has(t)||(i[t]=1)})),s(i,r)}}(ke||(ke={})),function(e){e.create=function(e){return{ref:e}},e.set=function(e,t){return e.ref=t,e}}(Re||(Re={}));var Ue,Ge,ze=Le(0,2147483647);!function(e){e.create=function(e,t){return{id:ze(),version:0,value:e,metadata:t}},e.withValue=function(e,t){return{id:e.id,version:e.version+1,value:t,metadata:e.metadata}}}(Ue||(Ue={})),function(e){function t(e,t){return Re.set(e,Ue.withValue(e.ref,t))}e.create=function(e,t){return Re.create(Ue.create(e,t))},e.update=t,e.set=function(e,t){return Re.set(e,t)},e.updateIfChanged=function(e,r){return e.ref.value!==r?t(e,r):e}}(Ge||(Ge={}));var Ve=function(){};function je(e,t){var r=e.length;if(r!==t.length)return!1;for(var n=0;n<r;n++)if(e[n]!==t[n])return!1;return!0}var He,qe,We=Object.prototype.hasOwnProperty;function Xe(e,t){if(e===t)return!0;var r=Array.isArray(e),n=Array.isArray(t);if(r&&n){if(e.length!==t.length)return!1;for(var a=0;a<e.length;a++)if(!Xe(e[a],t[a]))return!1;return!0}if(r!==n)return!1;if(e&&t&&"object"==typeof e&&"object"==typeof t){var i=Object.keys(e);if(i.length!==Object.keys(t).length)return!1;var o=e instanceof Date,s=t instanceof Date;if(o&&s)return e.getTime()===t.getTime();if(o!==s)return!1;var u=e instanceof RegExp,c=t instanceof RegExp;if(u&&c)return e.toString()===t.toString();if(u!==c)return!1;for(a=0;a<i.length;a++)if(!We.call(t,i[a]))return!1;for(a=0;a<i.length;a++)if(!Xe(e[i[a]],t[i[a]]))return!1;return!0}return!1}function Ye(e,t){if(e===t)return!0;var r=Array.isArray(e),n=Array.isArray(t);return r&&n?function(e,t){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(var r=0,n=e.length;r<n;++r)if(e[r]!==t[r])return!1;return!0}(e,t):r===n&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&Ke(e,t))}function Ke(e,t){if(e===t)return!0;if(!e||!t)return!1;var r=Object.keys(e);if(Object.keys(t).length!==r.length)return!1;for(var n=0,a=r;n<a.length;n++){var i=a[n];if(!We.call(e,i)||e[i]!==t[i])return!1}return!0}function Ze(e,t){return void 0!==e?e:t}!function(e){function t(e){var t;return t=function(){function t(t,r){this.data=t,this.id=Be.create22(),this.type=e,this.label=r&&r.label||e.name,this.description=r&&r.description}return t.is=function(t){return!!t&&e===t.type},t}(),t.type=e,t}e.factory=function(){return function(e){return t(e)}},e.create=t,e.hasTag=function(e,t){if(!e.tags)return!1;for(var r=0,n=e.tags;r<n.length;r++){if(n[r]===t)return!0}return!1},e.Null={id:Be.create22(),type:{name:"Null",typeClass:"Null"},data:void 0,label:"Null"}}(He||(He={})),function(e){e.is=function(e){var t=e;return!!(t&&t.transform&&t.parent&&t.status)},e.resolve=function(t,r){var n="string"==typeof r?r:e.is(r)?r.transform.ref:r.ref;return t.cells.get(n)}}(qe||(qe={}));var Qe,Je=function(){function e(e,t){this.ref=e,this.state=t}return Object.defineProperty(e.prototype,"cell",{get:function(){var e;return null===(e=this.state)||void 0===e?void 0:e.cells.get(this.ref)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"obj",{get:function(){var e,t;return null===(t=null===(e=this.state)||void 0===e?void 0:e.cells.get(this.ref))||void 0===t?void 0:t.obj},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){var e;return null===(e=this.obj)||void 0===e?void 0:e.data},enumerable:!1,configurable:!0}),e.prototype.update=function(e,t){if(!this.state)throw new Error("To use update() from StateObjectSelector, 'state' must be defined.");return t||(t=this.state.build()),(t||this.state.build()).to(this).update(e),t},e.prototype.checkValid=function(){if(!this.state)throw new Error("Unassigned State.");var e=this.cell;if(!e)throw new Error("Not created at all. Did you await/then the corresponding state update?");if("ok"===e.status)return!0;if("error"===e.status)throw new Error(e.errorText);if(e.obj===He.Null)throw new Error("The object is Null.");throw new Error("Unresolved. Did you await/then the corresponding state update?")},Object.defineProperty(e.prototype,"isOk",{get:function(){var e=this.cell;return e&&"ok"===e.status&&e.obj!==He.Null},enumerable:!1,configurable:!0}),e}();!function(e){function t(e,t){if(t)return qe.is(t)?t:"string"==typeof t?e.cells.get(t):t.cell}e.resolveRef=function(e){var t;if(e)return"string"==typeof e?e:qe.is(e)?e.transform.ref:null===(t=e.cell)||void 0===t?void 0:t.transform.ref},e.resolve=t,e.resolveAndCheck=function(e,r){var n=t(e,r);if(n&&n.obj&&"ok"===n.status)return n}}(Qe||(Qe={}));var $e="delete",et=32,tt=31,rt={};function nt(e){e&&(e.value=!0)}function at(){}function it(e){return void 0===e.size&&(e.size=e.__iterate(st)),e.size}function ot(e,t){if("number"!=typeof t){var r=t>>>0;if(""+r!==t||4294967295===r)return NaN;t=r}return t<0?it(e)+t:t}function st(){return!0}function ut(e,t,r){return(0===e&&!ft(e)||void 0!==r&&e<=-r)&&(void 0===t||void 0!==r&&t>=r)}function ct(e,t){return dt(e,t,0)}function lt(e,t){return dt(e,t,t)}function dt(e,t,r){return void 0===e?r:ft(e)?t===1/0?t:0|Math.max(0,t+e):void 0===t||t===e?e:0|Math.min(t,e)}function ft(e){return e<0||0===e&&1/e==-1/0}var pt="@@__IMMUTABLE_ITERABLE__@@";function mt(e){return Boolean(e&&e[pt])}var ht="@@__IMMUTABLE_KEYED__@@";function vt(e){return Boolean(e&&e[ht])}var gt="@@__IMMUTABLE_INDEXED__@@";function yt(e){return Boolean(e&&e[gt])}function bt(e){return vt(e)||yt(e)}var xt=function(e){return mt(e)?e:jt(e)},_t=function(e){function t(e){return vt(e)?e:Ht(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(xt),St=function(e){function t(e){return yt(e)?e:qt(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(xt),Ct=function(e){function t(e){return mt(e)&&!bt(e)?e:Wt(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(xt);xt.Keyed=_t,xt.Indexed=St,xt.Set=Ct;var wt="@@__IMMUTABLE_SEQ__@@";function At(e){return Boolean(e&&e[wt])}var Tt="@@__IMMUTABLE_RECORD__@@";function Pt(e){return Boolean(e&&e[Tt])}function It(e){return mt(e)||Pt(e)}var Dt="@@__IMMUTABLE_ORDERED__@@";function Et(e){return Boolean(e&&e[Dt])}var Mt="function"==typeof Symbol&&Symbol.iterator,Bt="@@iterator",kt=Mt||Bt,Rt=function(e){this.next=e};function Ot(e,t,r,n){var a=0===e?t:1===e?r:[t,r];return n?n.value=a:n={value:a,done:!1},n}function Ft(){return{value:void 0,done:!0}}function Nt(e){return!!Array.isArray(e)||!!Gt(e)}function Lt(e){return e&&"function"==typeof e.next}function Ut(e){var t=Gt(e);return t&&t.call(e)}function Gt(e){var t=e&&(Mt&&e[Mt]||e[Bt]);if("function"==typeof t)return t}Rt.prototype.toString=function(){return"[Iterator]"},Rt.KEYS=0,Rt.VALUES=1,Rt.ENTRIES=2,Rt.prototype.inspect=Rt.prototype.toSource=function(){return this.toString()},Rt.prototype[kt]=function(){return this};var zt=Object.prototype.hasOwnProperty;function Vt(e){return!(!Array.isArray(e)&&"string"!=typeof e)||e&&"object"==typeof e&&Number.isInteger(e.length)&&e.length>=0&&(0===e.length?1===Object.keys(e).length:e.hasOwnProperty(e.length-1))}var jt=function(e){function t(e){return null==e?Qt():It(e)?e.toSeq():function(e){var t=er(e);if(t)return(n=Gt(r=e))&&n===r.entries?t.fromEntrySeq():function(e){var t=Gt(e);return t&&t===e.keys}(e)?t.toSetSeq():t;var r,n;if("object"==typeof e)return new Yt(e);throw new TypeError("Expected Array or collection object of values, or keyed object: "+e)}(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq {","}")},t.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},t.prototype.__iterate=function(e,t){var r=this._cache;if(r){for(var n=r.length,a=0;a!==n;){var i=r[t?n-++a:a++];if(!1===e(i[1],i[0],this))break}return a}return this.__iterateUncached(e,t)},t.prototype.__iterator=function(e,t){var r=this._cache;if(r){var n=r.length,a=0;return new Rt((function(){if(a===n)return{value:void 0,done:!0};var i=r[t?n-++a:a++];return Ot(e,i[0],i[1])}))}return this.__iteratorUncached(e,t)},t}(xt),Ht=function(e){function t(e){return null==e?Qt().toKeyedSeq():mt(e)?vt(e)?e.toSeq():e.fromEntrySeq():Pt(e)?e.toSeq():Jt(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toKeyedSeq=function(){return this},t}(jt),qt=function(e){function t(e){return null==e?Qt():mt(e)?vt(e)?e.entrySeq():e.toIndexedSeq():Pt(e)?e.toSeq().entrySeq():$t(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toIndexedSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq [","]")},t}(jt),Wt=function(e){function t(e){return(mt(e)&&!bt(e)?e:qt(e)).toSetSeq()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toSetSeq=function(){return this},t}(jt);jt.isSeq=At,jt.Keyed=Ht,jt.Set=Wt,jt.Indexed=qt,jt.prototype[wt]=!0;var Xt=function(e){function t(e){this._array=e,this.size=e.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this.has(e)?this._array[ot(this,e)]:t},t.prototype.__iterate=function(e,t){for(var r=this._array,n=r.length,a=0;a!==n;){var i=t?n-++a:a++;if(!1===e(r[i],i,this))break}return a},t.prototype.__iterator=function(e,t){var r=this._array,n=r.length,a=0;return new Rt((function(){if(a===n)return{value:void 0,done:!0};var i=t?n-++a:a++;return Ot(e,i,r[i])}))},t}(qt),Yt=function(e){function t(e){var t=Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[]);this._object=e,this._keys=t,this.size=t.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},t.prototype.has=function(e){return zt.call(this._object,e)},t.prototype.__iterate=function(e,t){for(var r=this._object,n=this._keys,a=n.length,i=0;i!==a;){var o=n[t?a-++i:i++];if(!1===e(r[o],o,this))break}return i},t.prototype.__iterator=function(e,t){var r=this._object,n=this._keys,a=n.length,i=0;return new Rt((function(){if(i===a)return{value:void 0,done:!0};var o=n[t?a-++i:i++];return Ot(e,o,r[o])}))},t}(Ht);Yt.prototype[Dt]=!0;var Kt,Zt=function(e){function t(e){this._collection=e,this.size=e.length||e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var r=Ut(this._collection),n=0;if(Lt(r))for(var a;!(a=r.next()).done&&!1!==e(a.value,n++,this););return n},t.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var r=Ut(this._collection);if(!Lt(r))return new Rt(Ft);var n=0;return new Rt((function(){var t=r.next();return t.done?t:Ot(e,n++,t.value)}))},t}(qt);function Qt(){return Kt||(Kt=new Xt([]))}function Jt(e){var t=er(e);if(t)return t.fromEntrySeq();if("object"==typeof e)return new Yt(e);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function $t(e){var t=er(e);if(t)return t;throw new TypeError("Expected Array or collection object of values: "+e)}function er(e){return Vt(e)?new Xt(e):Nt(e)?new Zt(e):void 0}var tr="@@__IMMUTABLE_MAP__@@";function rr(e){return Boolean(e&&e[tr])}function nr(e){return rr(e)&&Et(e)}function ar(e){return Boolean(e&&"function"==typeof e.equals&&"function"==typeof e.hashCode)}function ir(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!!(ar(e)&&ar(t)&&e.equals(t))}var or="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var r=65535&(e|=0),n=65535&(t|=0);return r*n+((e>>>16)*n+r*(t>>>16)<<16>>>0)|0};function sr(e){return e>>>1&1073741824|3221225471&e}var ur=Object.prototype.valueOf;function cr(e){if(null==e)return lr(e);if("function"==typeof e.hashCode)return sr(e.hashCode(e));var t,r=(t=e).valueOf!==ur&&"function"==typeof t.valueOf?t.valueOf(t):t;if(null==r)return lr(r);switch(typeof r){case"boolean":return r?1108378657:1108378656;case"number":return function(e){if(e!=e||e===1/0)return 0;var t=0|e;t!==e&&(t^=4294967295*e);for(;e>4294967295;)t^=e/=4294967295;return sr(t)}(r);case"string":return r.length>xr?function(e){var t=Cr[e];void 0===t&&(t=dr(e),Sr===_r&&(Sr=0,Cr={}),Sr++,Cr[e]=t);return t}(r):dr(r);case"object":case"function":return function(e){var t;if(vr&&void 0!==(t=hr.get(e)))return t;if(t=e[br],void 0!==t)return t;if(!pr){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[br]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=mr(),vr)hr.set(e,t);else{if(void 0!==fr&&!1===fr(e))throw new Error("Non-extensible objects are not allowed as keys.");if(pr)Object.defineProperty(e,br,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[br]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[br]=t}}return t}(r);case"symbol":return function(e){var t=gr[e];if(void 0!==t)return t;return t=mr(),gr[e]=t,t}(r);default:if("function"==typeof r.toString)return dr(r.toString());throw new Error("Value type "+typeof r+" cannot be hashed.")}}function lr(e){return null===e?1108378658:1108378659}function dr(e){for(var t=0,r=0;r<e.length;r++)t=31*t+e.charCodeAt(r)|0;return sr(t)}var fr=Object.isExtensible,pr=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();function mr(){var e=++yr;return 1073741824&yr&&(yr=0),e}var hr,vr="function"==typeof WeakMap;vr&&(hr=new WeakMap);var gr=Object.create(null),yr=0,br="__immutablehash__";"function"==typeof Symbol&&(br=Symbol(br));var xr=16,_r=255,Sr=0,Cr={},wr=function(e){function t(e,t){this._iter=e,this._useKeys=t,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this._iter.get(e,t)},t.prototype.has=function(e){return this._iter.has(e)},t.prototype.valueSeq=function(){return this._iter.valueSeq()},t.prototype.reverse=function(){var e=this,t=Er(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},t.prototype.map=function(e,t){var r=this,n=Dr(this,e,t);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(e,t)}),n},t.prototype.__iterate=function(e,t){var r=this;return this._iter.__iterate((function(t,n){return e(t,n,r)}),t)},t.prototype.__iterator=function(e,t){return this._iter.__iterator(e,t)},t}(Ht);wr.prototype[Dt]=!0;var Ar=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype)