@livenetworks/ashlar 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ln-modal/ln-modal.js +1 -1
- package/components/ln-modal/ln-modal.scss +1 -1
- package/components/ln-modal/src/ln-modal.js +1 -0
- package/components/ln-toast/ln-toast.js +1 -1
- package/components/ln-toast/ln-toast.scss +5 -1
- package/components/ln-toast/src/ln-toast.js +1 -1
- package/package.json +1 -1
- package/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";function x(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function C(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let r=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){r=t[l];break}if(!C(r))return}e.apply(console,t)}}function m(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function $(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r);const l=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});return e.dispatchEvent(l),l}function b(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){b(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function y(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}const D={};function V(e,t){D[e]=t}function H(e){return D[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=V,window.lnCore.getDataMapper=H);function U(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,b(function(){new MutationObserver(function(){m(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const I={};function Q(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];I[n]=t}function K(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return I[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Q,window.lnCore.getLocaleFallback=K,window.lnCore.ensureLocaleObserver=U);const A={};function P(e,t){A[e]||(A[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=A[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function R(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let i=0;i<n.length;i++){const d=n[i],s=d.getAttribute("data-ln-field");t[s]!=null&&(d.textContent=t[s])}const r=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<r.length;i++){const d=r[i],s=d.getAttribute("data-ln-attr").split(",");for(let c=0;c<s.length;c++){const u=s[c].trim().split(":");if(u.length!==2)continue;const a=u[0].trim(),f=u[1].trim();t[f]!=null&&d.setAttribute(a,t[f])}}const l=e.querySelectorAll("[data-ln-show]");for(let i=0;i<l.length;i++){const d=l[i],s=d.getAttribute("data-ln-show");s in t&&d.classList.toggle("hidden",!t[s])}const o=e.querySelectorAll("[data-ln-class]");for(let i=0;i<o.length;i++){const d=o[i],s=d.getAttribute("data-ln-class").split(",");for(let c=0;c<s.length;c++){const u=s[c].trim().split(":");if(u.length!==2)continue;const a=u[0].trim(),f=u[1].trim();f in t&&d.classList.toggle(a,!!t[f])}}return e}function G(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<n.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[r],t??null),n[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)R(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function T(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const o=n.currentNode;o.textContent.indexOf("{{")!==-1&&(o.textContent=o.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,d){return t[d]!==void 0?t[d]:""}))}const r=function(o,i){return t[i]!==void 0?t[i]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let o=0;o<l.length;o++){const i=l[o],d=i.attributes;for(let s=0;s<d.length;s++){const c=d[s];c.value.indexOf("{{")!==-1&&i.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function J(e,t,n,r,l,o){const i={};for(let s=0;s<e.children.length;s++){const c=e.children[s],u=c.getAttribute("data-ln-render-key");u&&(i[u]=c)}const d=document.createDocumentFragment();for(let s=0;s<t.length;s++){const c=t[s],u=String(r(c));let a=i[u];if(a)l(a,c,s);else{const f=P(n,o);if(!f||(T(f,c),a=f.firstElementChild,!a))continue;a.setAttribute("data-ln-render-key",u),l(a,c,s)}d.appendChild(a)}e.textContent="",e.appendChild(d)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=T,window.lnCore.fill=R,window.lnCore.lnFill=G,window.lnCore.renderList=J);function M(e,t,n,r,l){if(!e||t===null)return!0;const o=r||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const d=s=>{l?console.warn(s,l):console.warn(s)};if(i==="boolean"){const s=t.trim().toLowerCase();return s!==""&&s!=="true"&&s!=="false"&&s!=="1"&&s!=="0"?(d(`[${o}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const s=e.values||[];return s.includes(t)?!0:(d(`[${o}] Invalid value "${t}" for attribute "${n}". Allowed: ${s.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return d(`[${o}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const s=parseInt(t,10);return e.min!==void 0&&s<e.min?(d(`[${o}] Value ${s} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&s>e.max?(d(`[${o}] Value ${s} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(d(`[${o}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(s){return d(`[${o}] Invalid JSON for attribute "${n}": ${s.message}. Fallback: ${e.fallback}.`),!1}return!0}function X(e){const t={};for(const n in e){const r=e[n];r&&r.effect&&(t[n]=r.effect)}return Object.keys(t).length?t:null}function z(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}function v(e,t,n,r){if(e.nodeType!==1)return;const o=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i=Array.from(e.querySelectorAll(o));e.matches&&e.matches(o)&&i.push(e);for(const d of i)if(!d[n]){window.lnCore._persistSink&&d.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(d,t);try{d[n]=new r(d)}catch(s){console.error("["+n+"] init failed",d,s)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Y(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Z(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function F(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function ee(e){const t=F(),n=e.observed||[];for(let r=0;r<n.length;r++){const l=n[r];t.byAttr.has(l)||t.byAttr.set(l,[]),t.byAttr.get(l).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const l=t.byDeclaredAttr.get(r);l.some(o=>o.componentTag===e.componentTag)||l.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=z(e);if(r===null)t.reactiveWildcard.push(e);else for(const l of r)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function B(e,t,n,r){for(let l=0;l<e.length;l++){const o=e[l];if(!t[o.attribute])continue;const i=o.effects&&o.effects[n];i?i(t,n,r):o.onAttrChange&&(!o.declared||o.declared.has(n))&&o.onAttrChange(t,n,r)}}function te(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const r=F(),l=r.byAttr.get(n);if(x()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(n)&&C(t)){const o=r.byDeclaredAttr.get(n),i=t.getAttribute(n);for(let d=0;d<o.length;d++)M(o[d].spec,i,n,o[d].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||l)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const o=r.byReactive.get(n);o&&B(o,t,n,e.oldValue),r.reactiveWildcard.length&&B(r.reactiveWildcard,t,n,e.oldValue)}if(l)for(let o=0;o<l.length;o++){const i=l[o];if(i.handler){i.handler(t,n,e.oldValue);continue}i.onAttributeChange&&t[i.attribute]?i.onAttributeChange(t,n):(v(t,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(t))}}function ne(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,b(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{te(t[n])}catch(r){console.error("[ln-core] mutation handler failed",t[n].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function W(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function oe(e){const t=W();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const r=t[n];if(r.onSubtreeChange){const l=r.query,o=e.target.nodeType===1?e.target.matches(l)?e.target:e.target.closest(l):e.target.parentElement?e.target.parentElement.closest(l):null;o&&r.onSubtreeChange(o,e)}}for(let n=0;n<e.addedNodes.length;n++){const r=e.addedNodes[n];if(r.nodeType===1)for(let l=0;l<t.length;l++){const o=t[l];v(r,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(r)}}for(let n=0;n<e.removedNodes.length;n++){const r=e.removedNodes[n];if(r.nodeType===1)for(let l=0;l<t.length;l++){const o=t[l],i=o.query,d=Array.from(r.querySelectorAll(i));r.matches&&r.matches(i)&&d.push(r);for(let s=0;s<d.length;s++){const c=d[s];if(!document.contains(c)){const u=c[o.attribute];if(u&&typeof u.destroy=="function")try{u.destroy()}catch(a){console.error("["+o.attribute+"] destroy failed",c,a)}delete c[o.attribute]}}}}}}function re(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,b(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{oe(r)}catch(l){console.error("[ln-core] lifecycle handler failed",r.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function ie(e,t,n,r,l={}){const o=l.extraAttributes||[],i=l.onAttributeChange||null,d=l.onSubtreeChange||null,s=l.onInit||null,c=l.onAttrChange||null,u=l.effects||null,a=l.attributes||null,f=a?X(a):u,S=a?new Set(Object.keys(a)):null,p=l.persist||null;function g(O){const w=O||document.body;if(v(w,e,t,n),a&&x())for(const h in a){const be=a[h],L=Array.from(w.querySelectorAll("["+h+"]"));w.matches&&w.matches("["+h+"]")&&L.push(w);for(let E=0;E<L.length;E++){const q=L[E];C(q)&&M(be,q.getAttribute(h),h,r,q)}}s&&s(w)}const k=[];if(e.indexOf("[")!==-1){const O=/\[([\w-]+)/g;let w;for(;(w=O.exec(e))!==null;)k.push(w[1])}else k.push(e);ee({selector:e,attribute:t,componentTag:r,attributes:a,ComponentFn:n,onInit:s,observed:k.concat(o),onAttributeChange:i,onAttrChange:c,effects:f,declared:S,persist:p}),ne();const he=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]";W().push({selector:e,attribute:t,ComponentFn:n,onInit:s,onSubtreeChange:d,query:he}),re(),window[t]=g;function N(){Y()>0?Z(function(){g(document.body)}):g(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",N):N(),g}function j(e){return(e||"").replace(/^#/,"")}function _(e){const t=e===void 0?location.hash:e,n={},r=j(t);if(!r)return n;const l=r.split("&");for(let o=0;o<l.length;o++){const i=l[o];if(!i)continue;const d=i.indexOf(":"),s=d>-1?i.slice(0,d):i,c=d>-1?i.slice(d+1):"";if(s)try{n[s]=decodeURIComponent(c)}catch{n[s]=c}}return n}function le(e){if(!e)return null;const t=_();return e in t?t[e]:null}function se(e,t){if(!e)return;const n=_();t==null?delete n[e]:n[e]=String(t);const l=Object.keys(n).map(function(o){const i=n[o];return i===""?o:o+":"+encodeURIComponent(i)}).join("&");j(location.hash)!==l&&(location.hash=l)}function de(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function ce(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function ue(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function ae(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function fe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function we(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),r=e.slice(t+1),l=r?r.split(",").map(function(o){try{return decodeURIComponent(o)}catch{return o}}).filter(Boolean):[];return{key:n,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=_,window.lnCore.hashGet=le,window.lnCore.hashSet=se,window.lnCore.hashLinkClick=de,window.lnCore.resolveHashNamespace=ce,window.lnCore.hashSortEncode=ue,window.lnCore.hashSortDecode=ae,window.lnCore.hashFilterEncode=fe,window.lnCore.hashFilterDecode=we),(function(){const e="data-ln-modal",t="lnModal";if(window[t]!==void 0)return;const n={"data-ln-modal":{type:"enum",values:["open","close"],fallback:"close",effect:l,description:"Control state of the modal dialog"},"data-ln-modal-close":{type:"trigger",description:"Click dismiss trigger inside the modal"}};function r(o){this.dom=o,this.isOpen=o.getAttribute(e)==="open";const i=this;return this._onRequestOpen=function(){i.dom.setAttribute(e,"open")},this._onRequestClose=function(){i.dom.setAttribute(e,"close")},this._onCancel=function(d){d.preventDefault(),i.dom.setAttribute(e,"close")},this._onClickClose=function(d){const s=d.target.closest("[data-ln-modal-close]");s&&i.dom.contains(s)&&(d.preventDefault(),i.dom.setAttribute(e,"close"))},this.dom.addEventListener("ln-modal:request-open",this._onRequestOpen),this.dom.addEventListener("ln-modal:request-close",this._onRequestClose),this.dom.addEventListener("cancel",this._onCancel),this.dom.addEventListener("click",this._onClickClose),this.isOpen&&(typeof this.dom.showModal=="function"&&this.dom.showModal(),document.body.classList.add("ln-modal-open")),this}r.prototype.open=function(){this.dom.setAttribute(e,"open")},r.prototype.close=function(){this.dom.setAttribute(e,"close")},r.prototype.toggle=function(){const o=this.dom.getAttribute(e);this.dom.setAttribute(e,o==="open"?"close":"open")},r.prototype.destroy=function(){if(this.dom[t]){if(this.dom.removeEventListener("ln-modal:request-open",this._onRequestOpen),this.dom.removeEventListener("ln-modal:request-close",this._onRequestClose),this.dom.removeEventListener("cancel",this._onCancel),this.dom.removeEventListener("click",this._onClickClose),this.isOpen){const o=this.dom;Array.prototype.some.call(document.querySelectorAll("["+e+'="open"]'),function(d){return d!==o})||document.body.classList.remove("ln-modal-open")}delete this.dom[t]}};function l(o){const i=o[t];if(!i)return;const s=o.getAttribute(e)==="open";if(s!==i.isOpen)if(s){if($(o,"ln-modal:before-open",{modalId:o.id,target:o}).defaultPrevented){o.setAttribute(e,"close");return}i.isOpen=!0,document.body.classList.add("ln-modal-open"),typeof o.showModal=="function"&&o.showModal();const u=o.querySelector("[autofocus]");if(u&&y(u))u.focus();else{const a=o.querySelectorAll('input:not([disabled]):not([type="hidden"]), textarea:not([disabled]), select:not([disabled])'),f=Array.prototype.find.call(a,y);if(f)f.focus();else{const S=o.querySelectorAll("a[href], button:not([disabled])"),p=Array.prototype.find.call(S,y);p&&p.focus()}}m(o,"ln-modal:open",{modalId:o.id,target:o})}else{if($(o,"ln-modal:before-close",{modalId:o.id,target:o}).defaultPrevented){o.setAttribute(e,"open");return}i.isOpen=!1,m(o,"ln-modal:close",{modalId:o.id,target:o}),typeof o.close=="function"&&o.close(),document.querySelector("["+e+'="open"]')||document.body.classList.remove("ln-modal-open")}}ie(e,t,r,"ln-modal",{attributes:n})})()})();
|
|
1
|
+
(function(){"use strict";function x(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function C(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let r=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){r=t[l];break}if(!C(r))return}e.apply(console,t)}}function b(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function I(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r);const l=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});return e.dispatchEvent(l),l}function p(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){p(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function y(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}const $={};function V(e,t){$[e]=t}function H(e){return $[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=V,window.lnCore.getDataMapper=H);function U(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,p(function(){new MutationObserver(function(){b(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const D={};function Q(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];D[n]=t}function K(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return D[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Q,window.lnCore.getLocaleFallback=K,window.lnCore.ensureLocaleObserver=U);const A={};function P(e,t){A[e]||(A[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=A[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function R(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let i=0;i<n.length;i++){const d=n[i],s=d.getAttribute("data-ln-field");t[s]!=null&&(d.textContent=t[s])}const r=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<r.length;i++){const d=r[i],s=d.getAttribute("data-ln-attr").split(",");for(let c=0;c<s.length;c++){const u=s[c].trim().split(":");if(u.length!==2)continue;const a=u[0].trim(),f=u[1].trim();t[f]!=null&&d.setAttribute(a,t[f])}}const l=e.querySelectorAll("[data-ln-show]");for(let i=0;i<l.length;i++){const d=l[i],s=d.getAttribute("data-ln-show");s in t&&d.classList.toggle("hidden",!t[s])}const o=e.querySelectorAll("[data-ln-class]");for(let i=0;i<o.length;i++){const d=o[i],s=d.getAttribute("data-ln-class").split(",");for(let c=0;c<s.length;c++){const u=s[c].trim().split(":");if(u.length!==2)continue;const a=u[0].trim(),f=u[1].trim();f in t&&d.classList.toggle(a,!!t[f])}}return e}function G(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<n.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[r],t??null),n[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)R(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function T(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const o=n.currentNode;o.textContent.indexOf("{{")!==-1&&(o.textContent=o.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,d){return t[d]!==void 0?t[d]:""}))}const r=function(o,i){return t[i]!==void 0?t[i]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let o=0;o<l.length;o++){const i=l[o],d=i.attributes;for(let s=0;s<d.length;s++){const c=d[s];c.value.indexOf("{{")!==-1&&i.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function J(e,t,n,r,l,o){const i={};for(let s=0;s<e.children.length;s++){const c=e.children[s],u=c.getAttribute("data-ln-render-key");u&&(i[u]=c)}const d=document.createDocumentFragment();for(let s=0;s<t.length;s++){const c=t[s],u=String(r(c));let a=i[u];if(a)l(a,c,s);else{const f=P(n,o);if(!f||(T(f,c),a=f.firstElementChild,!a))continue;a.setAttribute("data-ln-render-key",u),l(a,c,s)}d.appendChild(a)}e.textContent="",e.appendChild(d)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=T,window.lnCore.fill=R,window.lnCore.lnFill=G,window.lnCore.renderList=J);function M(e,t,n,r,l){if(!e||t===null)return!0;const o=r||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const d=s=>{l?console.warn(s,l):console.warn(s)};if(i==="boolean"){const s=t.trim().toLowerCase();return s!==""&&s!=="true"&&s!=="false"&&s!=="1"&&s!=="0"?(d(`[${o}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const s=e.values||[];return s.includes(t)?!0:(d(`[${o}] Invalid value "${t}" for attribute "${n}". Allowed: ${s.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return d(`[${o}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const s=parseInt(t,10);return e.min!==void 0&&s<e.min?(d(`[${o}] Value ${s} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&s>e.max?(d(`[${o}] Value ${s} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(d(`[${o}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(s){return d(`[${o}] Invalid JSON for attribute "${n}": ${s.message}. Fallback: ${e.fallback}.`),!1}return!0}function X(e){const t={};for(const n in e){const r=e[n];r&&r.effect&&(t[n]=r.effect)}return Object.keys(t).length?t:null}function z(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}function v(e,t,n,r){if(e.nodeType!==1)return;const o=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i=Array.from(e.querySelectorAll(o));e.matches&&e.matches(o)&&i.push(e);for(const d of i)if(!d[n]){window.lnCore._persistSink&&d.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(d,t);try{d[n]=new r(d)}catch(s){console.error("["+n+"] init failed",d,s)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Y(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Z(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function F(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function ee(e){const t=F(),n=e.observed||[];for(let r=0;r<n.length;r++){const l=n[r];t.byAttr.has(l)||t.byAttr.set(l,[]),t.byAttr.get(l).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const l=t.byDeclaredAttr.get(r);l.some(o=>o.componentTag===e.componentTag)||l.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=z(e);if(r===null)t.reactiveWildcard.push(e);else for(const l of r)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function B(e,t,n,r){for(let l=0;l<e.length;l++){const o=e[l];if(!t[o.attribute])continue;const i=o.effects&&o.effects[n];i?i(t,n,r):o.onAttrChange&&(!o.declared||o.declared.has(n))&&o.onAttrChange(t,n,r)}}function te(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const r=F(),l=r.byAttr.get(n);if(x()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(n)&&C(t)){const o=r.byDeclaredAttr.get(n),i=t.getAttribute(n);for(let d=0;d<o.length;d++)M(o[d].spec,i,n,o[d].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||l)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const o=r.byReactive.get(n);o&&B(o,t,n,e.oldValue),r.reactiveWildcard.length&&B(r.reactiveWildcard,t,n,e.oldValue)}if(l)for(let o=0;o<l.length;o++){const i=l[o];if(i.handler){i.handler(t,n,e.oldValue);continue}i.onAttributeChange&&t[i.attribute]?i.onAttributeChange(t,n):(v(t,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(t))}}function ne(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,p(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{te(t[n])}catch(r){console.error("[ln-core] mutation handler failed",t[n].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function W(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function oe(e){const t=W();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const r=t[n];if(r.onSubtreeChange){const l=r.query,o=e.target.nodeType===1?e.target.matches(l)?e.target:e.target.closest(l):e.target.parentElement?e.target.parentElement.closest(l):null;o&&r.onSubtreeChange(o,e)}}for(let n=0;n<e.addedNodes.length;n++){const r=e.addedNodes[n];if(r.nodeType===1)for(let l=0;l<t.length;l++){const o=t[l];v(r,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(r)}}for(let n=0;n<e.removedNodes.length;n++){const r=e.removedNodes[n];if(r.nodeType===1)for(let l=0;l<t.length;l++){const o=t[l],i=o.query,d=Array.from(r.querySelectorAll(i));r.matches&&r.matches(i)&&d.push(r);for(let s=0;s<d.length;s++){const c=d[s];if(!document.contains(c)){const u=c[o.attribute];if(u&&typeof u.destroy=="function")try{u.destroy()}catch(a){console.error("["+o.attribute+"] destroy failed",c,a)}delete c[o.attribute]}}}}}}function re(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,p(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{oe(r)}catch(l){console.error("[ln-core] lifecycle handler failed",r.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function ie(e,t,n,r,l={}){const o=l.extraAttributes||[],i=l.onAttributeChange||null,d=l.onSubtreeChange||null,s=l.onInit||null,c=l.onAttrChange||null,u=l.effects||null,a=l.attributes||null,f=a?X(a):u,S=a?new Set(Object.keys(a)):null,g=l.persist||null;function m(O){const w=O||document.body;if(v(w,e,t,n),a&&x())for(const h in a){const be=a[h],L=Array.from(w.querySelectorAll("["+h+"]"));w.matches&&w.matches("["+h+"]")&&L.push(w);for(let E=0;E<L.length;E++){const q=L[E];C(q)&&M(be,q.getAttribute(h),h,r,q)}}s&&s(w)}const k=[];if(e.indexOf("[")!==-1){const O=/\[([\w-]+)/g;let w;for(;(w=O.exec(e))!==null;)k.push(w[1])}else k.push(e);ee({selector:e,attribute:t,componentTag:r,attributes:a,ComponentFn:n,onInit:s,observed:k.concat(o),onAttributeChange:i,onAttrChange:c,effects:f,declared:S,persist:g}),ne();const he=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]";W().push({selector:e,attribute:t,ComponentFn:n,onInit:s,onSubtreeChange:d,query:he}),re(),window[t]=m;function N(){Y()>0?Z(function(){m(document.body)}):m(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",N):N(),m}function j(e){return(e||"").replace(/^#/,"")}function _(e){const t=e===void 0?location.hash:e,n={},r=j(t);if(!r)return n;const l=r.split("&");for(let o=0;o<l.length;o++){const i=l[o];if(!i)continue;const d=i.indexOf(":"),s=d>-1?i.slice(0,d):i,c=d>-1?i.slice(d+1):"";if(s)try{n[s]=decodeURIComponent(c)}catch{n[s]=c}}return n}function le(e){if(!e)return null;const t=_();return e in t?t[e]:null}function se(e,t){if(!e)return;const n=_();t==null?delete n[e]:n[e]=String(t);const l=Object.keys(n).map(function(o){const i=n[o];return i===""?o:o+":"+encodeURIComponent(i)}).join("&");j(location.hash)!==l&&(location.hash=l)}function de(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function ce(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function ue(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function ae(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function fe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function we(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),r=e.slice(t+1),l=r?r.split(",").map(function(o){try{return decodeURIComponent(o)}catch{return o}}).filter(Boolean):[];return{key:n,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=_,window.lnCore.hashGet=le,window.lnCore.hashSet=se,window.lnCore.hashLinkClick=de,window.lnCore.resolveHashNamespace=ce,window.lnCore.hashSortEncode=ue,window.lnCore.hashSortDecode=ae,window.lnCore.hashFilterEncode=fe,window.lnCore.hashFilterDecode=we),(function(){const e="data-ln-modal",t="lnModal";if(window[t]!==void 0)return;const n={"data-ln-modal":{type:"enum",values:["open","close"],fallback:"close",effect:l,description:"Control state of the modal dialog"},"data-ln-modal-close":{type:"trigger",description:"Click dismiss trigger inside the modal"}};function r(o){this.dom=o,this.isOpen=o.getAttribute(e)==="open";const i=this;return this._onRequestOpen=function(){i.dom.setAttribute(e,"open")},this._onRequestClose=function(){i.dom.setAttribute(e,"close")},this._onCancel=function(d){d.preventDefault(),i.dom.setAttribute(e,"close")},this._onClickClose=function(d){const s=d.target.closest("[data-ln-modal-close]");s&&i.dom.contains(s)&&(d.preventDefault(),i.dom.setAttribute(e,"close"))},this.dom.addEventListener("ln-modal:request-open",this._onRequestOpen),this.dom.addEventListener("ln-modal:request-close",this._onRequestClose),this.dom.addEventListener("cancel",this._onCancel),this.dom.addEventListener("click",this._onClickClose),this.isOpen&&(typeof this.dom.showModal=="function"&&this.dom.showModal(),document.body.classList.add("ln-modal-open"),b(this.dom,"ln-modal:open",{modalId:this.dom.id,target:this.dom})),this}r.prototype.open=function(){this.dom.setAttribute(e,"open")},r.prototype.close=function(){this.dom.setAttribute(e,"close")},r.prototype.toggle=function(){const o=this.dom.getAttribute(e);this.dom.setAttribute(e,o==="open"?"close":"open")},r.prototype.destroy=function(){if(this.dom[t]){if(this.dom.removeEventListener("ln-modal:request-open",this._onRequestOpen),this.dom.removeEventListener("ln-modal:request-close",this._onRequestClose),this.dom.removeEventListener("cancel",this._onCancel),this.dom.removeEventListener("click",this._onClickClose),this.isOpen){const o=this.dom;Array.prototype.some.call(document.querySelectorAll("["+e+'="open"]'),function(d){return d!==o})||document.body.classList.remove("ln-modal-open")}delete this.dom[t]}};function l(o){const i=o[t];if(!i)return;const s=o.getAttribute(e)==="open";if(s!==i.isOpen)if(s){if(I(o,"ln-modal:before-open",{modalId:o.id,target:o}).defaultPrevented){o.setAttribute(e,"close");return}i.isOpen=!0,document.body.classList.add("ln-modal-open"),typeof o.showModal=="function"&&o.showModal();const u=o.querySelector("[autofocus]");if(u&&y(u))u.focus();else{const a=o.querySelectorAll('input:not([disabled]):not([type="hidden"]), textarea:not([disabled]), select:not([disabled])'),f=Array.prototype.find.call(a,y);if(f)f.focus();else{const S=o.querySelectorAll("a[href], button:not([disabled])"),g=Array.prototype.find.call(S,y);g&&g.focus()}}b(o,"ln-modal:open",{modalId:o.id,target:o})}else{if(I(o,"ln-modal:before-close",{modalId:o.id,target:o}).defaultPrevented){o.setAttribute(e,"open");return}i.isOpen=!1,b(o,"ln-modal:close",{modalId:o.id,target:o}),typeof o.close=="function"&&o.close(),document.querySelector("["+e+'="open"]')||document.body.classList.remove("ln-modal-open")}}ie(e,t,r,"ln-modal",{attributes:n})})()})();
|
|
@@ -62,6 +62,7 @@ import { registerComponent, dispatch, dispatchCancelable, isVisible } from '../.
|
|
|
62
62
|
if (this.isOpen) {
|
|
63
63
|
if (typeof this.dom.showModal === 'function') this.dom.showModal();
|
|
64
64
|
document.body.classList.add('ln-modal-open');
|
|
65
|
+
dispatch(this.dom, 'ln-modal:open', { modalId: this.dom.id, target: this.dom });
|
|
65
66
|
}
|
|
66
67
|
|
|
67
68
|
return this;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";function $(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function _(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let o=null;for(let r=1;r<t.length;r++)if(t[r]&&t[r].nodeType===1){o=t[r];break}if(!_(o))return}e.apply(console,t)}}function U(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function A(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){A(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}const N={};function Q(e,t){N[e]=t}function J(e){return N[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=Q,window.lnCore.getDataMapper=J);function K(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,A(function(){new MutationObserver(function(){U(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const M={};function G(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];M[n]=t}function z(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return M[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=G,window.lnCore.getLocaleFallback=z,window.lnCore.ensureLocaleObserver=K);const v={};function B(e,t){v[e]||(v[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=v[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function X(e,t,n){if(e){const o=e.querySelector('[data-ln-template="'+t+'"]');if(o)return o.content.cloneNode(!0)}return B(t,n)}function S(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let l=0;l<n.length;l++){const a=n[l],c=a.getAttribute("data-ln-field");t[c]!=null&&(a.textContent=t[c])}const o=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<o.length;l++){const a=o[l],c=a.getAttribute("data-ln-attr").split(",");for(let f=0;f<c.length;f++){const h=c[f].trim().split(":");if(h.length!==2)continue;const w=h[0].trim(),m=h[1].trim();t[m]!=null&&a.setAttribute(w,t[m])}}const r=e.querySelectorAll("[data-ln-show]");for(let l=0;l<r.length;l++){const a=r[l],c=a.getAttribute("data-ln-show");c in t&&a.classList.toggle("hidden",!t[c])}const i=e.querySelectorAll("[data-ln-class]");for(let l=0;l<i.length;l++){const a=i[l],c=a.getAttribute("data-ln-class").split(",");for(let f=0;f<c.length;f++){const h=c[f].trim().split(":");if(h.length!==2)continue;const w=h[0].trim(),m=h[1].trim();m in t&&a.classList.toggle(w,!!t[m])}}return e}function Y(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let o=0;o<n.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[o],t??null),n[o].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)S(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function F(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const i=n.currentNode;i.textContent.indexOf("{{")!==-1&&(i.textContent=i.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,a){return t[a]!==void 0?t[a]:""}))}const o=function(i,l){return t[l]!==void 0?t[l]:""},r=Array.from(e.querySelectorAll("*"));e.nodeType===1&&r.push(e);for(let i=0;i<r.length;i++){const l=r[i],a=l.attributes;for(let c=0;c<a.length;c++){const f=a[c];f.value.indexOf("{{")!==-1&&l.setAttribute(f.name,f.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function Z(e,t,n,o,r,i){const l={};for(let c=0;c<e.children.length;c++){const f=e.children[c],h=f.getAttribute("data-ln-render-key");h&&(l[h]=f)}const a=document.createDocumentFragment();for(let c=0;c<t.length;c++){const f=t[c],h=String(o(f));let w=l[h];if(w)r(w,f,c);else{const m=B(n,i);if(!m||(F(m,f),w=m.firstElementChild,!w))continue;w.setAttribute("data-ln-render-key",h),r(w,f,c)}a.appendChild(w)}e.textContent="",e.appendChild(a)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=F,window.lnCore.fill=S,window.lnCore.lnFill=Y,window.lnCore.renderList=Z);function R(e,t,n){const o=e.getAttribute(t);return o===null?n:o}function k(e,t,n){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?n:o}function ee(e,t,n=!1){const o=e.getAttribute(t);if(o===null)return!!n;const r=o.trim().toLowerCase();return!(r==="false"||r==="0")}function te(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const E=new Map;function ne(e,t){const n=(e?e.join("|"):"")+"::"+t;if(E.has(n))return E.get(n);const o=new Set(e||[]),r=function(i,l){const a=i.getAttribute(l);return a!==null&&o.has(a)?a:t};return E.set(n,r),r}function oe(e,t,n){const o=parseFloat(e.getAttribute(t));return isNaN(o)?n:o}function re(e,t,n){const o=e.getAttribute(t);if(!o)return n;try{return JSON.parse(o)}catch{return n}}function j(e,t,n,o,r){if(!e||t===null)return!0;const i=o||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const a=c=>{r?console.warn(c,r):console.warn(c)};if(l==="boolean"){const c=t.trim().toLowerCase();return c!==""&&c!=="true"&&c!=="false"&&c!=="1"&&c!=="0"?(a(`[${i}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const c=e.values||[];return c.includes(t)?!0:(a(`[${i}] Invalid value "${t}" for attribute "${n}". Allowed: ${c.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return a(`[${i}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const c=parseInt(t,10);return e.min!==void 0&&c<e.min?(a(`[${i}] Value ${c} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&c>e.max?(a(`[${i}] Value ${c} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(a(`[${i}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(c){return a(`[${i}] Invalid JSON for attribute "${n}": ${c.message}. Fallback: ${e.fallback}.`),!1}return!0}function ie(e,t,n){for(const o in n){const[r,i,l]=n[o];Object.defineProperty(e,o,{get:function(){return r(t,i,l)},enumerable:!0,configurable:!0})}return e}function le(e){const t={};for(const n in e){const o=e[n];if(!o||!o.prop)continue;let r=o.read;if(!r&&o.type)switch(o.type){case"enum":r=ne(o.values,o.fallback);break;case"integer":r=k;break;case"float":r=oe;break;case"boolean":r=ee;break;case"list":r=te;break;case"json":r=re;break;case"string":default:r=R;break}r||(r=R),t[o.prop]=[r,n,o.fallback]}return t}function se(e){const t={};for(const n in e){const o=e[n];o&&o.effect&&(t[n]=o.effect)}return Object.keys(t).length?t:null}function ae(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}function L(e,t,n,o){if(e.nodeType!==1)return;const i=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l=Array.from(e.querySelectorAll(i));e.matches&&e.matches(i)&&l.push(e);for(const a of l)if(!a[n]){window.lnCore._persistSink&&a.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(a,t);try{a[n]=new o(a)}catch(c){console.error("["+n+"] init failed",a,c)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function ce(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function ue(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function W(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function de(e){const t=W(),n=e.observed||[];for(let o=0;o<n.length;o++){const r=n[o];t.byAttr.has(r)||t.byAttr.set(r,[]),t.byAttr.get(r).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const o in e.attributes){t.byDeclaredAttr.has(o)||t.byDeclaredAttr.set(o,[]);const r=t.byDeclaredAttr.get(o);r.some(i=>i.componentTag===e.componentTag)||r.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=ae(e);if(o===null)t.reactiveWildcard.push(e);else for(const r of o)t.byReactive.has(r)||t.byReactive.set(r,[]),t.byReactive.get(r).push(e)}e.persist&&t.persist.push(e)}function H(e,t,n,o){for(let r=0;r<e.length;r++){const i=e[r];if(!t[i.attribute])continue;const l=i.effects&&i.effects[n];l?l(t,n,o):i.onAttrChange&&(!i.declared||i.declared.has(n))&&i.onAttrChange(t,n,o)}}function fe(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const o=W(),r=o.byAttr.get(n);if($()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(n)&&_(t)){const i=o.byDeclaredAttr.get(n),l=t.getAttribute(n);for(let a=0;a<i.length;a++)j(i[a].spec,l,n,i[a].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||r)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const i=o.byReactive.get(n);i&&H(i,t,n,e.oldValue),o.reactiveWildcard.length&&H(o.reactiveWildcard,t,n,e.oldValue)}if(r)for(let i=0;i<r.length;i++){const l=r[i];if(l.handler){l.handler(t,n,e.oldValue);continue}l.onAttributeChange&&t[l.attribute]?l.onAttributeChange(t,n):(L(t,l.selector,l.attribute,l.ComponentFn),l.onInit&&l.onInit(t))}}function we(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,A(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{fe(t[n])}catch(o){console.error("[ln-core] mutation handler failed",t[n].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function V(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function he(e){const t=V();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const o=t[n];if(o.onSubtreeChange){const r=o.query,i=e.target.nodeType===1?e.target.matches(r)?e.target:e.target.closest(r):e.target.parentElement?e.target.parentElement.closest(r):null;i&&o.onSubtreeChange(i,e)}}for(let n=0;n<e.addedNodes.length;n++){const o=e.addedNodes[n];if(o.nodeType===1)for(let r=0;r<t.length;r++){const i=t[r];L(o,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(o)}}for(let n=0;n<e.removedNodes.length;n++){const o=e.removedNodes[n];if(o.nodeType===1)for(let r=0;r<t.length;r++){const i=t[r],l=i.query,a=Array.from(o.querySelectorAll(l));o.matches&&o.matches(l)&&a.push(o);for(let c=0;c<a.length;c++){const f=a[c];if(!document.contains(f)){const h=f[i.attribute];if(h&&typeof h.destroy=="function")try{h.destroy()}catch(w){console.error("["+i.attribute+"] destroy failed",f,w)}delete f[i.attribute]}}}}}}function pe(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,A(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const o=t[n];if(o.type==="childList")try{he(o)}catch(r){console.error("[ln-core] lifecycle handler failed",o.target,r)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function be(e,t,n,o,r={}){const i=r.extraAttributes||[],l=r.onAttributeChange||null,a=r.onSubtreeChange||null,c=r.onInit||null,f=r.onAttrChange||null,h=r.effects||null,w=r.attributes||null,m=w?se(w):h,O=w?new Set(Object.keys(w)):null,x=r.persist||null;function C(b){const g=b||document.body;if(L(g,e,t,n),w&&$())for(const y in w){const ke=w[y],q=Array.from(g.querySelectorAll("["+y+"]"));g.matches&&g.matches("["+y+"]")&&q.push(g);for(let I=0;I<q.length;I++){const D=q[I];_(D)&&j(ke,D.getAttribute(y),y,o,D)}}c&&c(g)}const s=[];if(e.indexOf("[")!==-1){const b=/\[([\w-]+)/g;let g;for(;(g=b.exec(e))!==null;)s.push(g[1])}else s.push(e);de({selector:e,attribute:t,componentTag:o,attributes:w,ComponentFn:n,onInit:c,observed:s.concat(i),onAttributeChange:l,onAttrChange:f,effects:m,declared:O,persist:x}),we();const d=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]";V().push({selector:e,attribute:t,ComponentFn:n,onInit:c,onSubtreeChange:a,query:d}),pe(),window[t]=C;function p(){ce()>0?ue(function(){C(document.body)}):C(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",p):p(),C}function P(e){return(e||"").replace(/^#/,"")}function T(e){const t=e===void 0?location.hash:e,n={},o=P(t);if(!o)return n;const r=o.split("&");for(let i=0;i<r.length;i++){const l=r[i];if(!l)continue;const a=l.indexOf(":"),c=a>-1?l.slice(0,a):l,f=a>-1?l.slice(a+1):"";if(c)try{n[c]=decodeURIComponent(f)}catch{n[c]=f}}return n}function me(e){if(!e)return null;const t=T();return e in t?t[e]:null}function ge(e,t){if(!e)return;const n=T();t==null?delete n[e]:n[e]=String(t);const r=Object.keys(n).map(function(i){const l=n[i];return l===""?i:i+":"+encodeURIComponent(l)}).join("&");P(location.hash)!==r&&(location.hash=r)}function ye(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ce(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"-"+t:o:t||null}function Ae(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function _e(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function ve(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Se(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),o=e.slice(t+1),r=o?o.split(",").map(function(i){try{return decodeURIComponent(i)}catch{return i}}).filter(Boolean):[];return{key:n,values:r}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=T,window.lnCore.hashGet=me,window.lnCore.hashSet=ge,window.lnCore.hashLinkClick=ye,window.lnCore.resolveHashNamespace=Ce,window.lnCore.hashSortEncode=Ae,window.lnCore.hashSortDecode=_e,window.lnCore.hashFilterEncode=ve,window.lnCore.hashFilterDecode=Se),(function(){const e="data-ln-toast",t="lnToast",n="ln-toast-item";if(window[t]!==void 0)return;const o={"data-ln-toast":{type:"marker",description:"Initializes the toast notifications container"},"data-ln-toast-timeout":{prop:"timeoutDefault",type:"integer",read:k,fallback:6e3,min:500,description:"Default auto-dismiss timeout in ms"},"data-ln-toast-max":{prop:"max",type:"integer",read:k,fallback:5,min:1,description:"Maximum visible concurrent toast notifications"},"data-ln-toast-close":{type:"trigger",description:"Click dismiss trigger inside a toast item"},"data-ln-toast-item":{type:"marker",description:"Individual toast notification element"}},r=le(o);function i(s){if(!(!s||!(s instanceof HTMLElement))&&(s.hasAttribute("popover")||s.setAttribute("popover","manual"),typeof s.showPopover=="function")){if(s.matches(":popover-open"))try{s.hidePopover()}catch{}try{s.showPopover()}catch{}}}function l(s){if(!s||!(s instanceof HTMLElement))return;if(s.querySelectorAll("[data-ln-toast-item]").length===0&&typeof s.hidePopover=="function"&&s.matches(":popover-open"))try{s.hidePopover()}catch{}}function a(s){this.dom=s,ie(this,s,r);const u=Array.from(s.querySelectorAll("[data-ln-toast-item]"));for(;u.length>this.max;)s.removeChild(u.shift());for(const d of u)O(d,this);return u.length>0&&i(s),this}a.prototype.enqueue=function(s){if(!s)return;const u=c(s,this.dom);if(!u)return;const d=Number.isFinite(s.timeout)?s.timeout:this.timeoutDefault;h(this,u),d>0&&(u._timer=setTimeout(()=>w(u),d))},a.prototype.clear=function(){for(const s of Array.from(this.dom.querySelectorAll("[data-ln-toast-item]")))w(s)},a.prototype.destroy=function(){if(this.dom[t]){for(const s of Array.from(this.dom.querySelectorAll("[data-ln-toast-item]")))w(s);l(this.dom),delete this.dom[t]}};function c(s,u){const d=((s.type||"")+"").trim().toLowerCase(),p=X(u,n,"ln-toast");if(!p)return console.warn('[ln-toast] Template "'+n+'" not found'),null;S(p,{type:d,title:s.title,message:typeof s.message=="string"?s.message:void 0});const b=p.firstElementChild;if(!b)return null;b.hasAttribute("data-ln-toast-item")||b.setAttribute("data-ln-toast-item",""),b.classList.add("ln-enter");const g=b.querySelector(".body");g&&f(g,s);const y=b.querySelector("[data-ln-toast-close]");return y&&y.addEventListener("click",function(){w(b)}),b}function f(s,u){if(Array.isArray(u.message)){const d=document.createElement("ul");for(const p of u.message){const b=document.createElement("li");b.textContent=p,d.appendChild(b)}s.appendChild(d)}if(u.data&&u.data.errors){const d=document.createElement("ul");for(const p of Object.values(u.data.errors).flat()){const b=document.createElement("li");b.textContent=p,d.appendChild(b)}s.appendChild(d)}}function h(s,u){const d=Array.from(s.dom.querySelectorAll("[data-ln-toast-item]"));for(;d.length>=s.max&&d.length>0;)s.dom.removeChild(d.shift());s.dom.appendChild(u),i(s.dom),requestAnimationFrame(()=>u.classList.remove("ln-enter"))}function w(s){if(!s||!s.parentNode)return;const u=s.parentNode;clearTimeout(s._timer),s.classList.remove("ln-enter"),s.classList.add("ln-out"),setTimeout(()=>{s.parentNode&&(s.parentNode.removeChild(s),l(u))},200)}function m(s){let u=s&&s.container;return typeof u=="string"&&(u=document.querySelector(u)),u instanceof HTMLElement||(u=document.querySelector("["+e+"]")||document.getElementById("ln-toast-container")),u||null}function O(s,u){if(s._lnToastHydrated)return;s._lnToastHydrated=!0;const d=s.querySelector("[data-ln-toast-close]");d&&d.addEventListener("click",function(){w(s)});const p=+(s.getAttribute("data-ln-toast-timeout")??u.timeoutDefault);p>0&&(s._timer=setTimeout(function(){w(s)},p))}function x(s){const u=s.detail||{},d=m(u);if(!d){console.warn("[ln-toast] No toast container found");return}(d[t]||(d[t]=new a(d))).enqueue(u)}function C(s){const u=s&&s.detail||{};if(u.container){const d=m(u);d&&(d[t]||(d[t]=new a(d))).clear()}else{const d=document.querySelectorAll("["+e+"]");for(const p of Array.from(d))(p[t]||(p[t]=new a(p))).clear()}}A(function(){window.addEventListener("ln-toast:enqueue",x),window.addEventListener("ln-toast:clear",C),window.addEventListener("ln-modal:open",function(){const s=document.querySelectorAll("["+e+"]");for(const u of Array.from(s))u.querySelectorAll("[data-ln-toast-item]").length>0&&i(u)})},"ln-toast"),be(e,t,a,"ln-toast",{attributes:o})})()})();
|
|
1
|
+
(function(){"use strict";function $(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function _(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let o=null;for(let r=1;r<t.length;r++)if(t[r]&&t[r].nodeType===1){o=t[r];break}if(!_(o))return}e.apply(console,t)}}function U(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function A(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){A(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}const N={};function Q(e,t){N[e]=t}function J(e){return N[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=Q,window.lnCore.getDataMapper=J);function K(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,A(function(){new MutationObserver(function(){U(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const M={};function G(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];M[n]=t}function z(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return M[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=G,window.lnCore.getLocaleFallback=z,window.lnCore.ensureLocaleObserver=K);const v={};function B(e,t){v[e]||(v[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=v[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function X(e,t,n){if(e){const o=e.querySelector('[data-ln-template="'+t+'"]');if(o)return o.content.cloneNode(!0)}return B(t,n)}function S(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let l=0;l<n.length;l++){const a=n[l],c=a.getAttribute("data-ln-field");t[c]!=null&&(a.textContent=t[c])}const o=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<o.length;l++){const a=o[l],c=a.getAttribute("data-ln-attr").split(",");for(let f=0;f<c.length;f++){const h=c[f].trim().split(":");if(h.length!==2)continue;const w=h[0].trim(),m=h[1].trim();t[m]!=null&&a.setAttribute(w,t[m])}}const r=e.querySelectorAll("[data-ln-show]");for(let l=0;l<r.length;l++){const a=r[l],c=a.getAttribute("data-ln-show");c in t&&a.classList.toggle("hidden",!t[c])}const i=e.querySelectorAll("[data-ln-class]");for(let l=0;l<i.length;l++){const a=i[l],c=a.getAttribute("data-ln-class").split(",");for(let f=0;f<c.length;f++){const h=c[f].trim().split(":");if(h.length!==2)continue;const w=h[0].trim(),m=h[1].trim();m in t&&a.classList.toggle(w,!!t[m])}}return e}function Y(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let o=0;o<n.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[o],t??null),n[o].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)S(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function F(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const i=n.currentNode;i.textContent.indexOf("{{")!==-1&&(i.textContent=i.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,a){return t[a]!==void 0?t[a]:""}))}const o=function(i,l){return t[l]!==void 0?t[l]:""},r=Array.from(e.querySelectorAll("*"));e.nodeType===1&&r.push(e);for(let i=0;i<r.length;i++){const l=r[i],a=l.attributes;for(let c=0;c<a.length;c++){const f=a[c];f.value.indexOf("{{")!==-1&&l.setAttribute(f.name,f.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function Z(e,t,n,o,r,i){const l={};for(let c=0;c<e.children.length;c++){const f=e.children[c],h=f.getAttribute("data-ln-render-key");h&&(l[h]=f)}const a=document.createDocumentFragment();for(let c=0;c<t.length;c++){const f=t[c],h=String(o(f));let w=l[h];if(w)r(w,f,c);else{const m=B(n,i);if(!m||(F(m,f),w=m.firstElementChild,!w))continue;w.setAttribute("data-ln-render-key",h),r(w,f,c)}a.appendChild(w)}e.textContent="",e.appendChild(a)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=F,window.lnCore.fill=S,window.lnCore.lnFill=Y,window.lnCore.renderList=Z);function R(e,t,n){const o=e.getAttribute(t);return o===null?n:o}function k(e,t,n){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?n:o}function ee(e,t,n=!1){const o=e.getAttribute(t);if(o===null)return!!n;const r=o.trim().toLowerCase();return!(r==="false"||r==="0")}function te(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const E=new Map;function ne(e,t){const n=(e?e.join("|"):"")+"::"+t;if(E.has(n))return E.get(n);const o=new Set(e||[]),r=function(i,l){const a=i.getAttribute(l);return a!==null&&o.has(a)?a:t};return E.set(n,r),r}function oe(e,t,n){const o=parseFloat(e.getAttribute(t));return isNaN(o)?n:o}function re(e,t,n){const o=e.getAttribute(t);if(!o)return n;try{return JSON.parse(o)}catch{return n}}function j(e,t,n,o,r){if(!e||t===null)return!0;const i=o||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const a=c=>{r?console.warn(c,r):console.warn(c)};if(l==="boolean"){const c=t.trim().toLowerCase();return c!==""&&c!=="true"&&c!=="false"&&c!=="1"&&c!=="0"?(a(`[${i}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const c=e.values||[];return c.includes(t)?!0:(a(`[${i}] Invalid value "${t}" for attribute "${n}". Allowed: ${c.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return a(`[${i}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const c=parseInt(t,10);return e.min!==void 0&&c<e.min?(a(`[${i}] Value ${c} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&c>e.max?(a(`[${i}] Value ${c} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(a(`[${i}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(c){return a(`[${i}] Invalid JSON for attribute "${n}": ${c.message}. Fallback: ${e.fallback}.`),!1}return!0}function ie(e,t,n){for(const o in n){const[r,i,l]=n[o];Object.defineProperty(e,o,{get:function(){return r(t,i,l)},enumerable:!0,configurable:!0})}return e}function le(e){const t={};for(const n in e){const o=e[n];if(!o||!o.prop)continue;let r=o.read;if(!r&&o.type)switch(o.type){case"enum":r=ne(o.values,o.fallback);break;case"integer":r=k;break;case"float":r=oe;break;case"boolean":r=ee;break;case"list":r=te;break;case"json":r=re;break;case"string":default:r=R;break}r||(r=R),t[o.prop]=[r,n,o.fallback]}return t}function se(e){const t={};for(const n in e){const o=e[n];o&&o.effect&&(t[n]=o.effect)}return Object.keys(t).length?t:null}function ae(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}function L(e,t,n,o){if(e.nodeType!==1)return;const i=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l=Array.from(e.querySelectorAll(i));e.matches&&e.matches(i)&&l.push(e);for(const a of l)if(!a[n]){window.lnCore._persistSink&&a.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(a,t);try{a[n]=new o(a)}catch(c){console.error("["+n+"] init failed",a,c)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function ce(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function ue(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function W(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function de(e){const t=W(),n=e.observed||[];for(let o=0;o<n.length;o++){const r=n[o];t.byAttr.has(r)||t.byAttr.set(r,[]),t.byAttr.get(r).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const o in e.attributes){t.byDeclaredAttr.has(o)||t.byDeclaredAttr.set(o,[]);const r=t.byDeclaredAttr.get(o);r.some(i=>i.componentTag===e.componentTag)||r.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=ae(e);if(o===null)t.reactiveWildcard.push(e);else for(const r of o)t.byReactive.has(r)||t.byReactive.set(r,[]),t.byReactive.get(r).push(e)}e.persist&&t.persist.push(e)}function H(e,t,n,o){for(let r=0;r<e.length;r++){const i=e[r];if(!t[i.attribute])continue;const l=i.effects&&i.effects[n];l?l(t,n,o):i.onAttrChange&&(!i.declared||i.declared.has(n))&&i.onAttrChange(t,n,o)}}function fe(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const o=W(),r=o.byAttr.get(n);if($()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(n)&&_(t)){const i=o.byDeclaredAttr.get(n),l=t.getAttribute(n);for(let a=0;a<i.length;a++)j(i[a].spec,l,n,i[a].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||r)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const i=o.byReactive.get(n);i&&H(i,t,n,e.oldValue),o.reactiveWildcard.length&&H(o.reactiveWildcard,t,n,e.oldValue)}if(r)for(let i=0;i<r.length;i++){const l=r[i];if(l.handler){l.handler(t,n,e.oldValue);continue}l.onAttributeChange&&t[l.attribute]?l.onAttributeChange(t,n):(L(t,l.selector,l.attribute,l.ComponentFn),l.onInit&&l.onInit(t))}}function we(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,A(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{fe(t[n])}catch(o){console.error("[ln-core] mutation handler failed",t[n].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function V(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function he(e){const t=V();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const o=t[n];if(o.onSubtreeChange){const r=o.query,i=e.target.nodeType===1?e.target.matches(r)?e.target:e.target.closest(r):e.target.parentElement?e.target.parentElement.closest(r):null;i&&o.onSubtreeChange(i,e)}}for(let n=0;n<e.addedNodes.length;n++){const o=e.addedNodes[n];if(o.nodeType===1)for(let r=0;r<t.length;r++){const i=t[r];L(o,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(o)}}for(let n=0;n<e.removedNodes.length;n++){const o=e.removedNodes[n];if(o.nodeType===1)for(let r=0;r<t.length;r++){const i=t[r],l=i.query,a=Array.from(o.querySelectorAll(l));o.matches&&o.matches(l)&&a.push(o);for(let c=0;c<a.length;c++){const f=a[c];if(!document.contains(f)){const h=f[i.attribute];if(h&&typeof h.destroy=="function")try{h.destroy()}catch(w){console.error("["+i.attribute+"] destroy failed",f,w)}delete f[i.attribute]}}}}}}function pe(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,A(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const o=t[n];if(o.type==="childList")try{he(o)}catch(r){console.error("[ln-core] lifecycle handler failed",o.target,r)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function be(e,t,n,o,r={}){const i=r.extraAttributes||[],l=r.onAttributeChange||null,a=r.onSubtreeChange||null,c=r.onInit||null,f=r.onAttrChange||null,h=r.effects||null,w=r.attributes||null,m=w?se(w):h,O=w?new Set(Object.keys(w)):null,x=r.persist||null;function C(b){const g=b||document.body;if(L(g,e,t,n),w&&$())for(const y in w){const ke=w[y],q=Array.from(g.querySelectorAll("["+y+"]"));g.matches&&g.matches("["+y+"]")&&q.push(g);for(let I=0;I<q.length;I++){const D=q[I];_(D)&&j(ke,D.getAttribute(y),y,o,D)}}c&&c(g)}const s=[];if(e.indexOf("[")!==-1){const b=/\[([\w-]+)/g;let g;for(;(g=b.exec(e))!==null;)s.push(g[1])}else s.push(e);de({selector:e,attribute:t,componentTag:o,attributes:w,ComponentFn:n,onInit:c,observed:s.concat(i),onAttributeChange:l,onAttrChange:f,effects:m,declared:O,persist:x}),we();const d=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]";V().push({selector:e,attribute:t,ComponentFn:n,onInit:c,onSubtreeChange:a,query:d}),pe(),window[t]=C;function p(){ce()>0?ue(function(){C(document.body)}):C(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",p):p(),C}function P(e){return(e||"").replace(/^#/,"")}function T(e){const t=e===void 0?location.hash:e,n={},o=P(t);if(!o)return n;const r=o.split("&");for(let i=0;i<r.length;i++){const l=r[i];if(!l)continue;const a=l.indexOf(":"),c=a>-1?l.slice(0,a):l,f=a>-1?l.slice(a+1):"";if(c)try{n[c]=decodeURIComponent(f)}catch{n[c]=f}}return n}function me(e){if(!e)return null;const t=T();return e in t?t[e]:null}function ge(e,t){if(!e)return;const n=T();t==null?delete n[e]:n[e]=String(t);const r=Object.keys(n).map(function(i){const l=n[i];return l===""?i:i+":"+encodeURIComponent(l)}).join("&");P(location.hash)!==r&&(location.hash=r)}function ye(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ce(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"-"+t:o:t||null}function Ae(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function _e(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function ve(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Se(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),o=e.slice(t+1),r=o?o.split(",").map(function(i){try{return decodeURIComponent(i)}catch{return i}}).filter(Boolean):[];return{key:n,values:r}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=T,window.lnCore.hashGet=me,window.lnCore.hashSet=ge,window.lnCore.hashLinkClick=ye,window.lnCore.resolveHashNamespace=Ce,window.lnCore.hashSortEncode=Ae,window.lnCore.hashSortDecode=_e,window.lnCore.hashFilterEncode=ve,window.lnCore.hashFilterDecode=Se),(function(){const e="data-ln-toast",t="lnToast",n="ln-toast-item";if(window[t]!==void 0)return;const o={"data-ln-toast":{type:"marker",description:"Initializes the toast notifications container"},"data-ln-toast-timeout":{prop:"timeoutDefault",type:"integer",read:k,fallback:6e3,min:500,description:"Default auto-dismiss timeout in ms"},"data-ln-toast-max":{prop:"max",type:"integer",read:k,fallback:5,min:1,description:"Maximum visible concurrent toast notifications"},"data-ln-toast-close":{type:"trigger",description:"Click dismiss trigger inside a toast item"},"data-ln-toast-item":{type:"marker",description:"Individual toast notification element"}},r=le(o);function i(s){if(!(!s||!(s instanceof HTMLElement))&&(s.hasAttribute("popover")||s.setAttribute("popover","manual"),typeof s.showPopover=="function")){if(s.matches(":popover-open"))try{s.hidePopover()}catch{}try{s.showPopover()}catch{}}}function l(s){if(!s||!(s instanceof HTMLElement))return;if(s.querySelectorAll("[data-ln-toast-item]").length===0&&typeof s.hidePopover=="function"&&s.matches(":popover-open"))try{s.hidePopover()}catch{}}function a(s){this.dom=s,ie(this,s,r);const u=Array.from(s.querySelectorAll("[data-ln-toast-item]"));for(;u.length>this.max;)s.removeChild(u.shift());for(const d of u)O(d,this);return u.length>0&&i(s),this}a.prototype.enqueue=function(s){if(!s)return;const u=c(s,this.dom);if(!u)return;const d=Number.isFinite(s.timeout)?s.timeout:this.timeoutDefault;h(this,u),d>0&&(u._timer=setTimeout(()=>w(u),d))},a.prototype.clear=function(){for(const s of Array.from(this.dom.querySelectorAll("[data-ln-toast-item]")))w(s)},a.prototype.destroy=function(){if(this.dom[t]){for(const s of Array.from(this.dom.querySelectorAll("[data-ln-toast-item]")))w(s);l(this.dom),delete this.dom[t]}};function c(s,u){const d=((s.type||"")+"").trim().toLowerCase(),p=X(u,n,"ln-toast");if(!p)return console.warn('[ln-toast] Template "'+n+'" not found'),null;S(p,{type:d,title:s.title,message:typeof s.message=="string"?s.message:void 0});const b=p.firstElementChild;if(!b)return null;b.hasAttribute("data-ln-toast-item")||b.setAttribute("data-ln-toast-item",""),b.classList.add("ln-enter");const g=b.querySelector(".body");g&&f(g,s);const y=b.querySelector("[data-ln-toast-close]");return y&&y.addEventListener("click",function(){w(b)}),b}function f(s,u){if(Array.isArray(u.message)){const d=document.createElement("ul");for(const p of u.message){const b=document.createElement("li");b.textContent=p,d.appendChild(b)}s.appendChild(d)}if(u.data&&u.data.errors){const d=document.createElement("ul");for(const p of Object.values(u.data.errors).flat()){const b=document.createElement("li");b.textContent=p,d.appendChild(b)}s.appendChild(d)}}function h(s,u){const d=Array.from(s.dom.querySelectorAll("[data-ln-toast-item]"));for(;d.length>=s.max&&d.length>0;)s.dom.removeChild(d.shift());s.dom.appendChild(u),i(s.dom),requestAnimationFrame(()=>u.classList.remove("ln-enter"))}function w(s){if(!s||!s.parentNode)return;const u=s.parentNode;clearTimeout(s._timer),s.classList.remove("ln-enter"),s.classList.add("ln-out"),setTimeout(()=>{s.parentNode&&(s.parentNode.removeChild(s),l(u))},200)}function m(s){let u=s&&s.container;return typeof u=="string"&&(u=document.querySelector(u)),u instanceof HTMLElement||(u=document.querySelector("["+e+"]")||document.getElementById("ln-toast-container")),u||null}function O(s,u){if(s._lnToastHydrated)return;s._lnToastHydrated=!0;const d=s.querySelector("[data-ln-toast-close]");d&&d.addEventListener("click",function(){w(s)});const p=+(s.getAttribute("data-ln-toast-timeout")??u.timeoutDefault);p>0&&(s._timer=setTimeout(function(){w(s)},p))}function x(s){const u=s.detail||{},d=m(u);if(!d){console.warn("[ln-toast] No toast container found");return}(d[t]||(d[t]=new a(d))).enqueue(u)}function C(s){const u=s&&s.detail||{};if(u.container){const d=m(u);d&&(d[t]||(d[t]=new a(d))).clear()}else{const d=document.querySelectorAll("["+e+"]");for(const p of Array.from(d))(p[t]||(p[t]=new a(p))).clear()}}A(function(){window.addEventListener("ln-toast:enqueue",x),window.addEventListener("ln-toast:clear",C),window.addEventListener("ln-modal:open",function(){const s=document.querySelectorAll("["+e+"], #ln-toast-container");for(const u of Array.from(s))u.querySelectorAll("[data-ln-toast-item]").length>0&&i(u)})},"ln-toast"),be(e,t,a,"ln-toast",{attributes:o})})()})();
|
|
@@ -3,9 +3,13 @@
|
|
|
3
3
|
// ==========================================================================
|
|
4
4
|
|
|
5
5
|
[data-ln-toast] {
|
|
6
|
+
position: fixed;
|
|
7
|
+
z-index: var(--z-toast, 50);
|
|
8
|
+
inset: auto;
|
|
9
|
+
right: var(--size-lg, 1.5rem);
|
|
10
|
+
bottom: var(--size-lg, 1.5rem);
|
|
6
11
|
border: none;
|
|
7
12
|
background: transparent;
|
|
8
|
-
inset: auto;
|
|
9
13
|
list-style: none;
|
|
10
14
|
padding: 0;
|
|
11
15
|
margin: 0;
|
|
@@ -218,7 +218,7 @@ import { guardBody, cloneTemplateScoped, fill, registerComponent, defineAttrs, a
|
|
|
218
218
|
window.addEventListener('ln-toast:enqueue', _onEnqueue);
|
|
219
219
|
window.addEventListener('ln-toast:clear', _onClear);
|
|
220
220
|
window.addEventListener('ln-modal:open', function () {
|
|
221
|
-
const containers = document.querySelectorAll("[" + DOM_SELECTOR + "]");
|
|
221
|
+
const containers = document.querySelectorAll("[" + DOM_SELECTOR + "], #ln-toast-container");
|
|
222
222
|
for (const container of Array.from(containers)) {
|
|
223
223
|
if (container.querySelectorAll("[data-ln-toast-item]").length > 0) {
|
|
224
224
|
_promoteTopLayer(container);
|
package/package.json
CHANGED