@livenetworks/ashlar 2.1.0 → 2.1.2

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.
Files changed (72) hide show
  1. package/components/ln-accordion/ln-accordion.js +1 -1
  2. package/components/ln-ajax/ln-ajax.js +1 -1
  3. package/components/ln-api-connector/ln-api-connector.js +1 -1
  4. package/components/ln-api-queue/ln-api-queue.js +1 -1
  5. package/components/ln-autoresize/ln-autoresize.js +1 -1
  6. package/components/ln-autoresize/src/ln-autoresize.js +3 -1
  7. package/components/ln-autosave/ln-autosave.js +1 -1
  8. package/components/ln-chart/ln-chart.js +1 -1
  9. package/components/ln-circular-progress/ln-circular-progress.js +1 -1
  10. package/components/ln-confirm/ln-confirm.js +1 -1
  11. package/components/ln-core/lifecycle.js +33 -12
  12. package/components/ln-couchdb-connector/ln-couchdb-connector.js +1 -1
  13. package/components/ln-data-coordinator/ln-data-coordinator.js +1 -1
  14. package/components/ln-data-store/ln-data-store.js +1 -1
  15. package/components/ln-date/ln-date.js +1 -1
  16. package/components/ln-date/src/ln-date.js +22 -13
  17. package/components/ln-debug/ln-debug.js +1 -1
  18. package/components/ln-dropdown/ln-dropdown.js +1 -1
  19. package/components/ln-dropdown/ln-dropdown.schema.json +90 -90
  20. package/components/ln-dropdown/src/ln-dropdown.js +18 -5
  21. package/components/ln-editor/ln-editor.js +1 -1
  22. package/components/ln-editor/src/ln-editor.js +45 -12
  23. package/components/ln-external-links/ln-external-links.js +1 -1
  24. package/components/ln-filter/ln-filter.js +1 -1
  25. package/components/ln-filter/ln-filter.schema.json +1 -1
  26. package/components/ln-filter/src/ln-filter.js +11 -10
  27. package/components/ln-form/ln-form.js +1 -1
  28. package/components/ln-form/src/ln-form.js +11 -0
  29. package/components/ln-icon/ln-icon.js +1 -1
  30. package/components/ln-include/ln-include.js +1 -1
  31. package/components/ln-key/ln-key.js +1 -1
  32. package/components/ln-link/ln-link.js +1 -1
  33. package/components/ln-list/ln-list.js +1 -1
  34. package/components/ln-list/src/ln-list.js +14 -5
  35. package/components/ln-modal/ln-modal.js +1 -1
  36. package/components/ln-nav/ln-nav.js +1 -1
  37. package/components/ln-number/ln-number.js +1 -1
  38. package/components/ln-number/src/ln-number.js +22 -12
  39. package/components/ln-obfuscator/ln-obfuscator.js +1 -1
  40. package/components/ln-options/ln-options.js +1 -1
  41. package/components/ln-picklist/ln-picklist.js +1 -1
  42. package/components/ln-popover/ln-popover.js +1 -1
  43. package/components/ln-popover/ln-popover.schema.json +82 -82
  44. package/components/ln-popover/src/ln-popover.js +22 -5
  45. package/components/ln-progress/ln-progress.js +1 -1
  46. package/components/ln-router/ln-router.js +1 -1
  47. package/components/ln-scroll/ln-scroll.js +1 -1
  48. package/components/ln-search/ln-search.js +1 -1
  49. package/components/ln-search/ln-search.schema.json +103 -103
  50. package/components/ln-search/src/ln-search.js +9 -5
  51. package/components/ln-slug/ln-slug.js +1 -1
  52. package/components/ln-sort/ln-sort.js +1 -1
  53. package/components/ln-sortable/ln-sortable.js +1 -1
  54. package/components/ln-sortable/src/ln-sortable.js +52 -7
  55. package/components/ln-stat/ln-stat.js +1 -1
  56. package/components/ln-table/ln-table.js +1 -1
  57. package/components/ln-table-coordinator/ln-table-coordinator.js +1 -1
  58. package/components/ln-tabs/ln-tabs.js +1 -1
  59. package/components/ln-tabs/src/ln-tabs.js +12 -8
  60. package/components/ln-time/ln-time.js +1 -1
  61. package/components/ln-time/src/ln-time.js +17 -7
  62. package/components/ln-toast/ln-toast.js +1 -1
  63. package/components/ln-toggle/ln-toggle.js +1 -1
  64. package/components/ln-tooltip/ln-tooltip.js +1 -1
  65. package/components/ln-translations/ln-translations.js +1 -1
  66. package/components/ln-ui-coordinator/ln-ui-coordinator.js +1 -1
  67. package/components/ln-upload/ln-upload.js +1 -1
  68. package/components/ln-validate/ln-validate.js +1 -1
  69. package/components/ln-validate/src/ln-validate.js +21 -7
  70. package/components/ln-websocket-connector/ln-websocket-connector.js +1 -1
  71. package/package.json +1 -1
  72. package/web-types.json +1 -1
@@ -1 +1 @@
1
- (function(){"use strict";function N(){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 v(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 s=1;s<t.length;s++)if(t[s]&&t[s].nodeType===1){r=t[s];break}if(!v(r))return}e.apply(console,t)}}function I(e,t,o){const r=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function se(e,t,o){const r=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r);const s=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});return e.dispatchEvent(s),s}function y(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){y(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function le(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ae(e,t){const o=!!(t&&t.typed),r=t&&t.exclude,s={},l=e.elements,i={};if(o)for(let a=0;a<l.length;a++){const n=l[a];n.name&&n.type==="checkbox"&&!n.disabled&&(i[n.name]=(i[n.name]||0)+1)}for(let a=0;a<l.length;a++){const n=l[a];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(r&&n.matches&&n.matches(r)))if(n.type==="checkbox")o&&i[n.name]===1?s[n.name]=n.checked:(s[n.name]||(s[n.name]=[]),n.checked&&s[n.name].push(n.value));else if(n.type==="radio")n.checked&&(s[n.name]=n.value);else if(n.type==="select-multiple"){s[n.name]=[];for(let c=0;c<n.options.length;c++)n.options[c].selected&&s[n.name].push(n.options[c].value)}else if(o&&n.type==="hidden")s[n.name]=n.value;else if(o&&(n.type==="number"||n.type==="range")){const c=Number(n.value);s[n.name]=n.value===""||isNaN(c)?null:c}else s[n.name]=n.value}return s}function ce(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ue(e,t){const o=e.elements,r=[],s={};for(let l=0;l<o.length;l++){const i=o[l];i.name&&i.type==="checkbox"&&(s[i.name]=(s[i.name]||0)+1)}for(let l=0;l<o.length;l++){const i=o[l];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const a=i.getAttribute("data-ln-fill-as")||i.name;if(!a||!(a in t))continue;const n=t[a];if(i.type==="checkbox"){if(Array.isArray(n))i.checked=n.indexOf(i.value)!==-1;else if(s[i.name]>1){const c=String(n).split(",").map(function(d){return d.trim()});i.checked=c.indexOf(i.value)!==-1}else i.checked=ce(n);r.push(i)}else if(i.type==="radio")i.checked=i.value===String(n),r.push(i);else if(i.type==="select-multiple"){if(Array.isArray(n))for(let c=0;c<i.options.length;c++)i.options[c].selected=n.indexOf(i.options[c].value)!==-1;r.push(i)}else i.value=n,i.tagName==="SELECT"&&n!=null&&i.setAttribute("data-ln-value",n),r.push(i)}return r}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ue,window.lnCore.serializeForm=ae,window.lnCore.resolveFormMethod=le);const $={};function de(e,t){$[e]=t}function fe(e){return $[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=de,window.lnCore.getDataMapper=fe);function he(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,y(function(){new MutationObserver(function(){I(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const R={};function be(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];R[o]=t}function we(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return R[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=be,window.lnCore.getLocaleFallback=we,window.lnCore.ensureLocaleObserver=he);const k={};function pe(e,t){k[e]||(k[e]=document.querySelector('[data-ln-template="'+e+'"]'));const o=k[e];return o?o.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function M(e,t){if(!e||!t)return e;const o=e.querySelectorAll("[data-ln-field]");for(let i=0;i<o.length;i++){const a=o[i],n=a.getAttribute("data-ln-field");t[n]!=null&&(a.textContent=t[n])}const r=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<r.length;i++){const a=r[i],n=a.getAttribute("data-ln-attr").split(",");for(let c=0;c<n.length;c++){const d=n[c].trim().split(":");if(d.length!==2)continue;const u=d[0].trim(),f=d[1].trim();t[f]!=null&&a.setAttribute(u,t[f])}}const s=e.querySelectorAll("[data-ln-show]");for(let i=0;i<s.length;i++){const a=s[i],n=a.getAttribute("data-ln-show");n in t&&a.classList.toggle("hidden",!t[n])}const l=e.querySelectorAll("[data-ln-class]");for(let i=0;i<l.length;i++){const a=l[i],n=a.getAttribute("data-ln-class").split(",");for(let c=0;c<n.length;c++){const d=n[c].trim().split(":");if(d.length!==2)continue;const u=d[0].trim(),f=d[1].trim();f in t&&a.classList.toggle(u,!!t[f])}}return e}function ge(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 o=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<o.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",o[r],t??null),o[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)M(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let o=0;o<t.length;o++)t[o].textContent=""}})));function j(e,t){if(!e||!t)return e;const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const l=o.currentNode;l.textContent.indexOf("{{")!==-1&&(l.textContent=l.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,a){return t[a]!==void 0?t[a]:""}))}const r=function(l,i){return t[i]!==void 0?t[i]:""},s=Array.from(e.querySelectorAll("*"));e.nodeType===1&&s.push(e);for(let l=0;l<s.length;l++){const i=s[l],a=i.attributes;for(let n=0;n<a.length;n++){const c=a[n];c.value.indexOf("{{")!==-1&&i.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function me(e,t,o,r,s,l){const i={};for(let n=0;n<e.children.length;n++){const c=e.children[n],d=c.getAttribute("data-ln-render-key");d&&(i[d]=c)}const a=document.createDocumentFragment();for(let n=0;n<t.length;n++){const c=t[n],d=String(r(c));let u=i[d];if(u)s(u,c,n);else{const f=pe(o,l);if(!f||(j(f,c),u=f.firstElementChild,!u))continue;u.setAttribute("data-ln-render-key",d),s(u,c,n)}a.appendChild(u)}e.textContent="",e.appendChild(a)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=j,window.lnCore.fill=M,window.lnCore.lnFill=ge,window.lnCore.renderList=me);function x(e,t,o){const r=e.getAttribute(t);return r===null?o:r}function B(e,t,o){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?o:r}function _(e,t,o=!1){const r=e.getAttribute(t);if(r===null)return!!o;const s=r.trim().toLowerCase();return!(s==="false"||s==="0")}function H(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const S=new Map;function W(e,t){const o=(e?e.join("|"):"")+"::"+t;if(S.has(o))return S.get(o);const r=new Set(e||[]),s=function(l,i){const a=l.getAttribute(i);return a!==null&&r.has(a)?a:t};return S.set(o,s),s}function U(e,t,o){const r=parseFloat(e.getAttribute(t));return isNaN(r)?o:r}function P(e,t,o){const r=e.getAttribute(t);if(!r)return o;try{return JSON.parse(r)}catch{return o}}function V(e,t,o,r,s){if(!e||t===null)return!0;const l=r||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const a=n=>{s?console.warn(n,s):console.warn(n)};if(i==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(a(`[${l}] Invalid value "${t}" for boolean attribute "${o}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const n=e.values||[];return n.includes(t)?!0:(a(`[${l}] Invalid value "${t}" for attribute "${o}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return a(`[${l}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(a(`[${l}] Value ${n} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(a(`[${l}] Value ${n} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(a(`[${l}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(n){return a(`[${l}] Invalid JSON for attribute "${o}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function Q(e,t,o){for(const r in o){const[s,l,i]=o[r];Object.defineProperty(e,r,{get:function(){return s(t,l,i)},enumerable:!0,configurable:!0})}return e}function z(e){const t={};for(const o in e){const r=e[o];if(!r||!r.prop)continue;let s=r.read;if(!s&&r.type)switch(r.type){case"enum":s=W(r.values,r.fallback);break;case"integer":s=B;break;case"float":s=U;break;case"boolean":s=_;break;case"list":s=H;break;case"json":s=P;break;case"string":default:s=x;break}s||(s=x),t[r.prop]=[s,o,r.fallback]}return t}function ye(e){const t={};for(const o in e){const r=e[o];r&&r.effect&&(t[o]=r.effect)}return Object.keys(t).length?t:null}function Ce(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const o in e.effects)t.add(o);if(e.onAttrChange&&e.declared)for(const o of e.declared)t.add(o);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=Q,window.lnCore.attrSpec=z,window.lnCore.attrStr=x,window.lnCore.attrInt=B,window.lnCore.attrBool=_,window.lnCore.attrList=H,window.lnCore.attrEnum=W,window.lnCore.attrFloat=U,window.lnCore.attrJson=P);function p(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(o){console.error("["+t.attribute+"] init failed",e,o)}}}function J(e,t,o,r){if(e.nodeType!==1)return;const l=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:o,ComponentFn:r};if(e.matches&&e.matches(l)&&p(e,i),e.querySelectorAll){const a=e.querySelectorAll(l);for(let n=0;n<a.length;n++)p(a[n],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ae(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function ve(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 G(){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 ke(e){const t=G(),o=e.observed||[];for(let r=0;r<o.length;r++){const s=o[r];t.byAttr.has(s)||t.byAttr.set(s,[]),t.byAttr.get(s).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 s=t.byDeclaredAttr.get(r);s.some(l=>l.componentTag===e.componentTag)||s.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=Ce(e);if(r===null)t.reactiveWildcard.push(e);else for(const s of r)t.byReactive.has(s)||t.byReactive.set(s,[]),t.byReactive.get(s).push(e)}e.persist&&t.persist.push(e)}function X(e,t,o,r){for(let s=0;s<e.length;s++){const l=e[s];if(!t[l.attribute])continue;const i=l.effects&&l.effects[o];i?i(t,o,r):l.onAttrChange&&(!l.declared||l.declared.has(o))&&l.onAttrChange(t,o,r)}}function xe(e){const t=e.attributeName,o=t.indexOf("data-ln-")===0,r=G(),s=r.byAttr.get(t),l=N()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(t);if(!o&&!s&&!l)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(l&&v(i)){const a=r.byDeclaredAttr.get(t),n=i.getAttribute(t);for(let c=0;c<a.length;c++)V(a[c].spec,n,t,a[c].componentTag,i)}if(window.lnCore._debugSink&&(o||s)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),o){const a=r.byReactive.get(t);a&&X(a,i,t,e.oldValue),r.reactiveWildcard.length&&X(r.reactiveWildcard,i,t,e.oldValue)}if(s)for(let a=0;a<s.length;a++){const n=s[a];if(n.handler){n.handler(i,t,e.oldValue);continue}n.onAttributeChange&&i[n.attribute]?n.onAttributeChange(i,t):(J(i,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(i))}}}function _e(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,y(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{xe(t[o])}catch(r){console.error("[ln-core] mutation handler failed",t[o].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function L(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function E(e,t){if(!document.contains(e))if(t.attribute){const o=e[t.attribute];if(o&&typeof o.destroy=="function")try{o.destroy()}catch(r){console.error("["+t.attribute+"] destroy failed",e,r)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function Se(e){const t=L();if(t.length){if(e.target)for(let o=0;o<t.length;o++){const r=t[o];if(r.onSubtreeChange&&r.query){const s=r.query,l=e.target.nodeType===1?e.target.matches&&e.target.matches(s)?e.target:e.target.closest?e.target.closest(s):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(s):null;l&&r.onSubtreeChange(l,e)}}for(let o=0;o<e.addedNodes.length;o++){const r=e.addedNodes[o];if(r.nodeType===1){const s=!!(r.firstElementChild||r.children&&r.children.length);for(let l=0;l<t.length;l++){const i=t[l];if(i.selector&&i.attribute&&i.ComponentFn){if(!s)r.matches&&r.matches(i.query)&&p(r,i);else if(r.matches&&r.matches(i.query)&&p(r,i),r.querySelectorAll){const a=r.querySelectorAll(i.query);for(let n=0;n<a.length;n++)p(a[n],i)}}i.onInit&&i.onInit(r)}}}for(let o=0;o<e.removedNodes.length;o++){const r=e.removedNodes[o];if(r.nodeType===1){const s=!!(r.firstElementChild||r.children&&r.children.length);for(let l=0;l<t.length;l++){const i=t[l],a=i.query;if(a){if(!s)r.matches&&r.matches(a)&&E(r,i);else if(r.matches&&r.matches(a)&&E(r,i),r.querySelectorAll){const n=r.querySelectorAll(a);for(let c=0;c<n.length;c++)E(n[c],i)}}}}}}}function Y(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,y(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++){const r=t[o];if(r.type==="childList")try{Se(r)}catch(s){console.error("[ln-core] lifecycle handler failed",r.target,s)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Le(e){L().push(e),Y()}function Z(e,t,o,r,s={}){const l=s.extraAttributes||[],i=s.onAttributeChange||null,a=s.onSubtreeChange||null,n=s.onInit||null,c=s.onAttrChange||null,d=s.effects||null,u=s.attributes||null,f=u?ye(u):d,h=u?new Set(Object.keys(u)):null,A=s.persist||null;function b(q){const w=q||document.body;if(J(w,e,t,o),u&&N())for(const m in u){const Ie=u[m],D=Array.from(w.querySelectorAll("["+m+"]"));w.matches&&w.matches("["+m+"]")&&D.push(w);for(let F=0;F<D.length;F++){const K=D[F];v(K)&&V(Ie,K.getAttribute(m),m,r,K)}}n&&n(w)}const O=[];if(e.indexOf("[")!==-1){const q=/\[([\w-]+)/g;let w;for(;(w=q.exec(e))!==null;)O.push(w[1])}else O.push(e);ke({selector:e,attribute:t,componentTag:r,attributes:u,ComponentFn:o,onInit:n,observed:O.concat(l),onAttributeChange:i,onAttrChange:c,effects:f,declared:h,persist:A}),_e();const Ke=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,Ne=s.subtreeQuery||(Ke?e:"["+e+"]");L().push({selector:e,attribute:t,ComponentFn:o,onInit:n,onSubtreeChange:a,query:Ne}),Y(),window[t]=b,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=Z,window.lnCore.observeLifecycle=Le);function ie(){Ae()>0?ve(function(){b(document.body)}):b(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ie):ie(),b}function ee(e){return(e||"").replace(/^#/,"")}function T(e){const t=e===void 0?location.hash:e,o={},r=ee(t);if(!r)return o;const s=r.split("&");for(let l=0;l<s.length;l++){const i=s[l];if(!i)continue;const a=i.indexOf(":"),n=a>-1?i.slice(0,a):i,c=a>-1?i.slice(a+1):"";if(n)try{o[n]=decodeURIComponent(c)}catch{o[n]=c}}return o}function g(e){if(!e)return null;const t=T();return e in t?t[e]:null}function C(e,t){if(!e)return;const o=T();t==null?delete o[e]:o[e]=String(t);const s=Object.keys(o).map(function(l){const i=o[l];return i===""?l:l+":"+encodeURIComponent(i)}).join("&");ee(location.hash)!==s&&(location.hash=s)}function te(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ee(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const o=e.getAttribute("data-ln-hash");if(o&&o.trim()!=="")return o.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 Te(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Oe(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 qe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function De(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const o=e.slice(0,t),r=e.slice(t+1),s=r?r.split(",").map(function(l){try{return decodeURIComponent(l)}catch{return l}}).filter(Boolean):[];return{key:o,values:s}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=T,window.lnCore.hashGet=g,window.lnCore.hashSet=C,window.lnCore.hashLinkClick=te,window.lnCore.resolveHashNamespace=Ee,window.lnCore.hashSortEncode=Te,window.lnCore.hashSortDecode=Oe,window.lnCore.hashFilterEncode=qe,window.lnCore.hashFilterDecode=De);function Fe(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Fe);function ne(e,t,o,r){const s=(e||"").toLowerCase().trim();if(s)return s;if((t||"").toUpperCase()!=="A")return"";const l=o||"";if(!l.startsWith("#"))return"";const i=l.slice(1);if(!i)return"";const a=i.split("&"),n=(r||"").toLowerCase().trim();if(n)for(const u of a){const f=u.indexOf(":");if(f>0&&u.slice(0,f).toLowerCase().trim()===n)return u.slice(f+1).toLowerCase().trim()}const c=a[a.length-1]||"",d=c.indexOf(":");return(d>0?c.slice(d+1):c).toLowerCase().trim()}function re(e,t){if(!Array.isArray(e)||e.length===0)return{hashEnabled:!1,warning:null};const o=e.filter(l=>(l.tagName||"").toUpperCase()==="A"&&(l.href||"").startsWith("#")),r=o.length>0&&o.length===e.length,s=(t||"").toLowerCase().trim();return o.length>0&&o.length!==e.length?{hashEnabled:!1,warning:"mixed"}:r&&!s?{hashEnabled:!1,warning:"missing-namespace"}:{hashEnabled:r&&!!s,warning:null}}function oe(e,t,o){const r=(e||"").toLowerCase().trim();return r&&Array.isArray(t)&&t.includes(r)?r:(o||"").toLowerCase().trim()}(function(){const e="data-ln-tabs",t="lnTabs";if(window[t]!==void 0&&window[t]!==null)return;function o(n){const c=n.getAttribute("data-ln-tabs-active");n[t]&&n[t]._applyActive(c)}function r(n,c){return(n.getAttribute(c)||n.id||"").toLowerCase().trim()}const s={"data-ln-tabs":{type:"marker",description:"Mounts lnTabs component instance on tabs container"},"data-ln-tabs-active":{effect:o,type:"string",description:"Active tab key identifier"},"data-ln-tabs-default":{type:"string",description:"Default fallback tab key when none selected"},"data-ln-tabs-focus":{prop:"autoFocus",read:_,type:"boolean",fallback:!0,description:"Whether to shift focus to newly activated tab panel"},"data-ln-tabs-key":{prop:"nsKey",read:r,type:"string",description:"Hash namespace key for URL hash synchronization"},"data-ln-tab":{type:"string",description:"Tab trigger key identifier"},"data-ln-panel":{type:"string",description:"Tab content panel key identifier matching corresponding tab"}},l=z(s);function i(n){return this.dom=n,Q(this,n,l),this.activeKey=null,a.call(this),this}function a(){this.tabs=Array.from(this.dom.querySelectorAll("[data-ln-tab]")),this.panels=Array.from(this.dom.querySelectorAll("[data-ln-panel]"));const n=this.tabs.map(u=>({tagName:u.tagName,href:u.getAttribute("href")})),c=re(n,this.nsKey);this.hashEnabled=c.hashEnabled,c.warning==="mixed"?console.warn('[ln-tabs] Mixed <a href="#…"> and <button> triggers in one group — using persist mode. Pick one: anchors for URL hash, buttons for localStorage persist.',this.dom):c.warning==="missing-namespace"&&console.warn("[ln-tabs] Anchor triggers need a hash namespace — add id or data-ln-tabs-key to the wrapper. Falling back to non-hash mode.",this.dom),this.mapTabs={},this.mapPanels={};for(const u of this.tabs){const f=ne(u.getAttribute("data-ln-tab"),u.tagName,u.getAttribute("href"),this.nsKey);f?this.mapTabs[f]=u:console.warn('[ln-tabs] Trigger has no resolvable key — needs `data-ln-tab="key"` or `<a href="#…">`.',u)}for(const u of this.panels){const f=(u.getAttribute("data-ln-panel")||"").toLowerCase().trim();f&&(this.mapPanels[f]=u)}this.defaultKey=(this.dom.getAttribute("data-ln-tabs-default")||"").toLowerCase().trim()||Object.keys(this.mapTabs)[0]||"";const d=this;this._clickHandlers=[];for(const u of this.tabs){if(u[t+"Trigger"])continue;const f=function(h){const A=u.tagName==="A";if(!A&&(h.ctrlKey||h.metaKey||h.button===1))return;const b=ne(u.getAttribute("data-ln-tab"),u.tagName,u.getAttribute("href"),d.nsKey);b&&(A&&!te(h)||(d.hashEnabled?g(d.nsKey)===b?d.dom.setAttribute("data-ln-tabs-active",b):C(d.nsKey,b):d.dom.setAttribute("data-ln-tabs-active",b)))};u.addEventListener("click",f),u[t+"Trigger"]=f,d._clickHandlers.push({el:u,handler:f})}if(this._onRequestSelect=function(u){const f=u.detail&&(u.detail.key||u.detail.tab);f&&d.select(f)},this.dom.addEventListener("ln-tabs:request-select",this._onRequestSelect),this._hashHandler=function(){if(!d.hashEnabled)return;const u=g(d.nsKey);d.dom.setAttribute("data-ln-tabs-active",u!==null?u:d.defaultKey)},this.hashEnabled)window.addEventListener("hashchange",this._hashHandler),this._hashHandler();else{const u=oe(this.dom.getAttribute("data-ln-tabs-active"),Object.keys(this.mapPanels),this.defaultKey);this.dom.setAttribute("data-ln-tabs-active",u)}}i.prototype.select=function(n){const c=(n+"").toLowerCase().trim();c&&(this.hashEnabled?g(this.nsKey)===c?this.dom.setAttribute("data-ln-tabs-active",c):C(this.nsKey,c):this.dom.setAttribute("data-ln-tabs-active",c))},i.prototype._applyActive=function(n){var d;if(n=oe(n,Object.keys(this.mapPanels),this.defaultKey),n===this.activeKey)return;const c=this.activeKey;if(c!==null&&se(this.dom,"ln-tabs:before-change",{key:n,previousKey:c,tab:this.mapTabs[n],panel:this.mapPanels[n],target:this.dom}).defaultPrevented){c in this.mapPanels&&(this.dom.setAttribute("data-ln-tabs-active",c),this.hashEnabled&&g(this.nsKey)!==c&&C(this.nsKey,c));return}this.activeKey=n;for(const u in this.mapTabs){const f=this.mapTabs[u];u===n?(f.setAttribute("data-active",""),f.setAttribute("aria-selected","true")):(f.removeAttribute("data-active"),f.setAttribute("aria-selected","false"))}for(const u in this.mapPanels){const f=this.mapPanels[u],h=u===n;f.hidden=!h,f.classList.toggle("hidden",!h),f.setAttribute("aria-hidden",h?"false":"true")}if(this.autoFocus){const u=(d=this.mapPanels[n])==null?void 0:d.querySelector('input,button,select,textarea,[tabindex]:not([tabindex="-1"])');u&&setTimeout(()=>u.focus({preventScroll:!0}),0)}I(this.dom,"ln-tabs:change",{key:n,previousKey:c,tab:this.mapTabs[n],panel:this.mapPanels[n],target:this.dom})},i.prototype.destroy=function(){if(this.dom[t]){this.dom.removeEventListener("ln-tabs:request-select",this._onRequestSelect);for(const{el:n,handler:c}of this._clickHandlers)n.removeEventListener("click",c),delete n[t+"Trigger"];this.hashEnabled&&window.removeEventListener("hashchange",this._hashHandler),delete this.dom[t]}},Z(e,t,i,"ln-tabs",{attributes:s,persist:{attr:"data-ln-tabs-active",hashActive:function(n){const c=Array.from(n.querySelectorAll("[data-ln-tab]")).map(function(u){return{tagName:u.tagName,href:u.getAttribute("href")}}),d=(n.getAttribute("data-ln-tabs-key")||n.id||"").toLowerCase().trim();return re(c,d).hashEnabled}}})})()})();
1
+ (function(){"use strict";function I(){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 v(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 i=1;i<t.length;i++)if(t[i]&&t[i].nodeType===1){o=t[i];break}if(!v(o))return}e.apply(console,t)}}function R(e,t,r){const o=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function ce(e,t,r){const o=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o);const i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:o});return e.dispatchEvent(i),i}function C(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){C(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function ue(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function de(e,t){const r=!!(t&&t.typed),o=t&&t.exclude,i={},l=e.elements,s={};if(r)for(let a=0;a<l.length;a++){const n=l[a];n.name&&n.type==="checkbox"&&!n.disabled&&(s[n.name]=(s[n.name]||0)+1)}for(let a=0;a<l.length;a++){const n=l[a];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(o&&n.matches&&n.matches(o)))if(n.type==="checkbox")r&&s[n.name]===1?i[n.name]=n.checked:(i[n.name]||(i[n.name]=[]),n.checked&&i[n.name].push(n.value));else if(n.type==="radio")n.checked&&(i[n.name]=n.value);else if(n.type==="select-multiple"){i[n.name]=[];for(let c=0;c<n.options.length;c++)n.options[c].selected&&i[n.name].push(n.options[c].value)}else if(r&&n.type==="hidden")i[n.name]=n.value;else if(r&&(n.type==="number"||n.type==="range")){const c=Number(n.value);i[n.name]=n.value===""||isNaN(c)?null:c}else i[n.name]=n.value}return i}function fe(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function he(e,t){const r=e.elements,o=[],i={};for(let l=0;l<r.length;l++){const s=r[l];s.name&&s.type==="checkbox"&&(i[s.name]=(i[s.name]||0)+1)}for(let l=0;l<r.length;l++){const s=r[l];if(s.type==="file"||s.type==="submit"||s.type==="button")continue;const a=s.getAttribute("data-ln-fill-as")||s.name;if(!a||!(a in t))continue;const n=t[a];if(s.type==="checkbox"){if(Array.isArray(n))s.checked=n.indexOf(s.value)!==-1;else if(i[s.name]>1){const c=String(n).split(",").map(function(d){return d.trim()});s.checked=c.indexOf(s.value)!==-1}else s.checked=fe(n);o.push(s)}else if(s.type==="radio")s.checked=s.value===String(n),o.push(s);else if(s.type==="select-multiple"){if(Array.isArray(n))for(let c=0;c<s.options.length;c++)s.options[c].selected=n.indexOf(s.options[c].value)!==-1;o.push(s)}else s.value=n,s.tagName==="SELECT"&&n!=null&&s.setAttribute("data-ln-value",n),o.push(s)}return o}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=he,window.lnCore.serializeForm=de,window.lnCore.resolveFormMethod=ue);const $={};function be(e,t){$[e]=t}function we(e){return $[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=be,window.lnCore.getDataMapper=we);function pe(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,C(function(){new MutationObserver(function(){R(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const M={};function ge(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];M[r]=t}function me(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=ge,window.lnCore.getLocaleFallback=me,window.lnCore.ensureLocaleObserver=pe);const k={};function ye(e,t){k[e]||(k[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=k[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function j(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let s=0;s<r.length;s++){const a=r[s],n=a.getAttribute("data-ln-field");t[n]!=null&&(a.textContent=t[n])}const o=e.querySelectorAll("[data-ln-attr]");for(let s=0;s<o.length;s++){const a=o[s],n=a.getAttribute("data-ln-attr").split(",");for(let c=0;c<n.length;c++){const d=n[c].trim().split(":");if(d.length!==2)continue;const u=d[0].trim(),f=d[1].trim();t[f]!=null&&a.setAttribute(u,t[f])}}const i=e.querySelectorAll("[data-ln-show]");for(let s=0;s<i.length;s++){const a=i[s],n=a.getAttribute("data-ln-show");n in t&&a.classList.toggle("hidden",!t[n])}const l=e.querySelectorAll("[data-ln-class]");for(let s=0;s<l.length;s++){const a=l[s],n=a.getAttribute("data-ln-class").split(",");for(let c=0;c<n.length;c++){const d=n[c].trim().split(":");if(d.length!==2)continue;const u=d[0].trim(),f=d[1].trim();f in t&&a.classList.toggle(u,!!t[f])}}return e}function Ce(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 r=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let o=0;o<r.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[o],t??null),r[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)j(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let r=0;r<t.length;r++)t[r].textContent=""}})));function B(e,t){if(!e||!t)return e;const r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const l=r.currentNode;l.textContent.indexOf("{{")!==-1&&(l.textContent=l.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(s,a){return t[a]!==void 0?t[a]:""}))}const o=function(l,s){return t[s]!==void 0?t[s]:""},i=Array.from(e.querySelectorAll("*"));e.nodeType===1&&i.push(e);for(let l=0;l<i.length;l++){const s=i[l],a=s.attributes;for(let n=0;n<a.length;n++){const c=a[n];c.value.indexOf("{{")!==-1&&s.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function Ae(e,t,r,o,i,l){const s={};for(let n=0;n<e.children.length;n++){const c=e.children[n],d=c.getAttribute("data-ln-render-key");d&&(s[d]=c)}const a=document.createDocumentFragment();for(let n=0;n<t.length;n++){const c=t[n],d=String(o(c));let u=s[d];if(u)i(u,c,n);else{const f=ye(r,l);if(!f||(B(f,c),u=f.firstElementChild,!u))continue;u.setAttribute("data-ln-render-key",d),i(u,c,n)}a.appendChild(u)}e.textContent="",e.appendChild(a)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=B,window.lnCore.fill=j,window.lnCore.lnFill=Ce,window.lnCore.renderList=Ae);function x(e,t,r){const o=e.getAttribute(t);return o===null?r:o}function H(e,t,r){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?r:o}function _(e,t,r=!1){const o=e.getAttribute(t);if(o===null)return!!r;const i=o.trim().toLowerCase();return!(i==="false"||i==="0")}function W(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const S=new Map;function U(e,t){const r=(e?e.join("|"):"")+"::"+t;if(S.has(r))return S.get(r);const o=new Set(e||[]),i=function(l,s){const a=l.getAttribute(s);return a!==null&&o.has(a)?a:t};return S.set(r,i),i}function P(e,t,r){const o=parseFloat(e.getAttribute(t));return isNaN(o)?r:o}function V(e,t,r){const o=e.getAttribute(t);if(!o)return r;try{return JSON.parse(o)}catch{return r}}function Q(e,t,r,o,i){if(!e||t===null)return!0;const l=o||"ln-component",s=e.type;if(s==="trigger"||s==="marker"||s==="string"||s==="list"||!s||t===""&&e.fallback!==void 0)return!0;const a=n=>{i?console.warn(n,i):console.warn(n)};if(s==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(a(`[${l}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(s==="enum"){const n=e.values||[];return n.includes(t)?!0:(a(`[${l}] Invalid value "${t}" for attribute "${r}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(s==="integer"){if(!/^-?\d+$/.test(t))return a(`[${l}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(a(`[${l}] Value ${n} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(a(`[${l}] Value ${n} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(s==="float")return isNaN(Number(t))?(a(`[${l}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(s==="json")try{return JSON.parse(t),!0}catch(n){return a(`[${l}] Invalid JSON for attribute "${r}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function z(e,t,r){for(const o in r){const[i,l,s]=r[o];Object.defineProperty(e,o,{get:function(){return i(t,l,s)},enumerable:!0,configurable:!0})}return e}function J(e){const t={};for(const r in e){const o=e[r];if(!o||!o.prop)continue;let i=o.read;if(!i&&o.type)switch(o.type){case"enum":i=U(o.values,o.fallback);break;case"integer":i=H;break;case"float":i=P;break;case"boolean":i=_;break;case"list":i=W;break;case"json":i=V;break;case"string":default:i=x;break}i||(i=x),t[o.prop]=[i,r,o.fallback]}return t}function ve(e){const t={};for(const r in e){const o=e[r];o&&o.effect&&(t[r]=o.effect)}return Object.keys(t).length?t:null}function ke(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const r in e.effects)t.add(r);if(e.onAttrChange&&e.declared)for(const r of e.declared)t.add(r);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=z,window.lnCore.attrSpec=J,window.lnCore.attrStr=x,window.lnCore.attrInt=H,window.lnCore.attrBool=_,window.lnCore.attrList=W,window.lnCore.attrEnum=U,window.lnCore.attrFloat=P,window.lnCore.attrJson=V);function g(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(r){console.error("["+t.attribute+"] init failed",e,r)}}}function G(e,t,r,o){if(e.nodeType!==1)return;const l=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",s={selector:t,attribute:r,ComponentFn:o};if(e.matches&&e.matches(l)&&g(e,s),e.querySelectorAll){const a=e.querySelectorAll(l);for(let n=0;n<a.length;n++)g(a[n],s)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function xe(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function _e(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 X(){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 Se(e){const t=X(),r=e.observed||[];for(let o=0;o<r.length;o++){const i=r[o];t.byAttr.has(i)||t.byAttr.set(i,[]),t.byAttr.get(i).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 i=t.byDeclaredAttr.get(o);i.some(l=>l.componentTag===e.componentTag)||i.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=ke(e);if(o===null)t.reactiveWildcard.push(e);else for(const i of o)t.byReactive.has(i)||t.byReactive.set(i,[]),t.byReactive.get(i).push(e)}e.persist&&t.persist.push(e)}function Y(e,t,r,o){for(let i=0;i<e.length;i++){const l=e[i];if(!t[l.attribute])continue;const s=l.effects&&l.effects[r];s?s(t,r,o):l.onAttrChange&&(!l.declared||l.declared.has(r))&&l.onAttrChange(t,r,o)}}function Ee(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,o=X(),i=o.byAttr.get(t),l=I()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(t);if(!r&&!i&&!l)return;const s=e.target;if(e.oldValue!==s.getAttribute(t)){if(l&&v(s)){const a=o.byDeclaredAttr.get(t),n=s.getAttribute(t);for(let c=0;c<a.length;c++)Q(a[c].spec,n,t,a[c].componentTag,s)}if(window.lnCore._debugSink&&(r||i)&&window.lnCore._debugSink("attr",t,s,{oldValue:e.oldValue,newValue:s.getAttribute(t)}),r){const a=o.byReactive.get(t);a&&Y(a,s,t,e.oldValue),o.reactiveWildcard.length&&Y(o.reactiveWildcard,s,t,e.oldValue)}if(i)for(let a=0;a<i.length;a++){const n=i[a];if(n.handler){n.handler(s,t,e.oldValue);continue}n.onAttributeChange&&s[n.attribute]?n.onAttributeChange(s,t):(G(s,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(s))}}}function Le(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,C(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{Ee(t[r])}catch(o){console.error("[ln-core] mutation handler failed",t[r].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function E(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function L(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function T(e,t){if(!document.contains(e))if(t.attribute){const r=e[t.attribute];if(r&&typeof r.destroy=="function")try{r.destroy()}catch(o){console.error("["+t.attribute+"] destroy failed",e,o)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function Te(e){const t=E();if(!t.length)return;const r=e.target;if(r){const i=r.nodeType===1?r:r.parentElement;if(i&&(i.isContentEditable||i.closest&&i.closest('[contenteditable]:not([contenteditable="false"])')))return}const o=L();if(e.target&&o.length)for(let i=0;i<o.length;i++){const l=o[i],s=l.query,a=e.target.nodeType===1?e.target.matches&&e.target.matches(s)?e.target:e.target.closest?e.target.closest(s):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(s):null;a&&l.onSubtreeChange(a,e)}for(let i=0;i<e.addedNodes.length;i++){const l=e.addedNodes[i];if(l.nodeType===1){const s=!!(l.firstElementChild||l.children&&l.children.length);for(let a=0;a<t.length;a++){const n=t[a];if(n.selector&&n.attribute&&n.ComponentFn){if(!s)l.matches&&l.matches(n.query)&&g(l,n);else if(l.matches&&l.matches(n.query)&&g(l,n),l.querySelectorAll){const c=l.querySelectorAll(n.query);for(let d=0;d<c.length;d++)g(c[d],n)}}n.onInit&&n.onInit(l)}}}for(let i=0;i<e.removedNodes.length;i++){const l=e.removedNodes[i];if(l.nodeType===1){const s=!!(l.firstElementChild||l.children&&l.children.length);for(let a=0;a<t.length;a++){const n=t[a],c=n.query;if(c){if(!s)l.matches&&l.matches(c)&&T(l,n);else if(l.matches&&l.matches(c)&&T(l,n),l.querySelectorAll){const d=l.querySelectorAll(c);for(let u=0;u<d.length;u++)T(d[u],n)}}}}}}function Z(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,C(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++){const o=t[r];if(o.type==="childList")try{Te(o)}catch(i){console.error("[ln-core] lifecycle handler failed",o.target,i)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Oe(e){E().push(e),e.onSubtreeChange&&e.query&&L().push(e),Z()}function ee(e,t,r,o,i={}){const l=i.extraAttributes||[],s=i.onAttributeChange||null,a=i.onSubtreeChange||null,n=i.onInit||null,c=i.onAttrChange||null,d=i.effects||null,u=i.attributes||null,f=u?ve(u):d,h=u?new Set(Object.keys(u)):null,p=i.persist||null;function b(D){const w=D||document.body;if(G(w,e,t,r),u&&I())for(const y in u){const $e=u[y],F=Array.from(w.querySelectorAll("["+y+"]"));w.matches&&w.matches("["+y+"]")&&F.push(w);for(let K=0;K<F.length;K++){const N=F[K];v(N)&&Q($e,N.getAttribute(y),y,o,N)}}n&&n(w)}const q=[];if(e.indexOf("[")!==-1){const D=/\[([\w-]+)/g;let w;for(;(w=D.exec(e))!==null;)q.push(w[1])}else q.push(e);Se({selector:e,attribute:t,componentTag:o,attributes:u,ComponentFn:r,onInit:n,observed:q.concat(l),onAttributeChange:s,onAttrChange:c,effects:f,declared:h,persist:p}),Le();const Re=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,se=i.subtreeQuery||(Re?e:"["+e+"]"),le={selector:e,attribute:t,ComponentFn:r,onInit:n,onSubtreeChange:a,query:se};E().push(le),a&&se&&L().push(le),Z(),window[t]=b,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ee,window.lnCore.observeLifecycle=Oe);function ae(){xe()>0?_e(function(){b(document.body)}):b(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ae):ae(),b}function te(e){return(e||"").replace(/^#/,"")}function O(e){const t=e===void 0?location.hash:e,r={},o=te(t);if(!o)return r;const i=o.split("&");for(let l=0;l<i.length;l++){const s=i[l];if(!s)continue;const a=s.indexOf(":"),n=a>-1?s.slice(0,a):s,c=a>-1?s.slice(a+1):"";if(n)try{r[n]=decodeURIComponent(c)}catch{r[n]=c}}return r}function m(e){if(!e)return null;const t=O();return e in t?t[e]:null}function A(e,t){if(!e)return;const r=O();t==null?delete r[e]:r[e]=String(t);const i=Object.keys(r).map(function(l){const s=r[l];return s===""?l:l+":"+encodeURIComponent(s)}).join("&");te(location.hash)!==i&&(location.hash=i)}function ne(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function qe(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const r=e.getAttribute("data-ln-hash");if(r&&r.trim()!=="")return r.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 De(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Fe(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 Ke(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ne(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const r=e.slice(0,t),o=e.slice(t+1),i=o?o.split(",").map(function(l){try{return decodeURIComponent(l)}catch{return l}}).filter(Boolean):[];return{key:r,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=O,window.lnCore.hashGet=m,window.lnCore.hashSet=A,window.lnCore.hashLinkClick=ne,window.lnCore.resolveHashNamespace=qe,window.lnCore.hashSortEncode=De,window.lnCore.hashSortDecode=Fe,window.lnCore.hashFilterEncode=Ke,window.lnCore.hashFilterDecode=Ne);function Ie(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Ie);function re(e,t,r,o){const i=(e||"").toLowerCase().trim();if(i)return i;if((t||"").toUpperCase()!=="A")return"";const l=r||"";if(!l.startsWith("#"))return"";const s=l.slice(1);if(!s)return"";const a=s.split("&"),n=(o||"").toLowerCase().trim();if(n)for(const u of a){const f=u.indexOf(":");if(f>0&&u.slice(0,f).toLowerCase().trim()===n)return u.slice(f+1).toLowerCase().trim()}const c=a[a.length-1]||"",d=c.indexOf(":");return(d>0?c.slice(d+1):c).toLowerCase().trim()}function oe(e,t){if(!Array.isArray(e)||e.length===0)return{hashEnabled:!1,warning:null};const r=e.filter(l=>(l.tagName||"").toUpperCase()==="A"&&(l.href||"").startsWith("#")),o=r.length>0&&r.length===e.length,i=(t||"").toLowerCase().trim();return r.length>0&&r.length!==e.length?{hashEnabled:!1,warning:"mixed"}:o&&!i?{hashEnabled:!1,warning:"missing-namespace"}:{hashEnabled:o&&!!i,warning:null}}function ie(e,t,r){const o=(e||"").toLowerCase().trim();return o&&Array.isArray(t)&&t.includes(o)?o:(r||"").toLowerCase().trim()}(function(){const e="data-ln-tabs",t="lnTabs";if(window[t]!==void 0&&window[t]!==null)return;function r(n){const c=n.getAttribute("data-ln-tabs-active");n[t]&&n[t]._applyActive(c)}function o(n,c){return(n.getAttribute(c)||n.id||"").toLowerCase().trim()}const i={"data-ln-tabs":{type:"marker",description:"Mounts lnTabs component instance on tabs container"},"data-ln-tabs-active":{effect:r,type:"string",description:"Active tab key identifier"},"data-ln-tabs-default":{type:"string",description:"Default fallback tab key when none selected"},"data-ln-tabs-focus":{prop:"autoFocus",read:_,type:"boolean",fallback:!0,description:"Whether to shift focus to newly activated tab panel"},"data-ln-tabs-key":{prop:"nsKey",read:o,type:"string",description:"Hash namespace key for URL hash synchronization"},"data-ln-tab":{type:"string",description:"Tab trigger key identifier"},"data-ln-panel":{type:"string",description:"Tab content panel key identifier matching corresponding tab"}},l=J(i);function s(n){return this.dom=n,z(this,n,l),this.activeKey=null,a.call(this),this}function a(){this.tabs=Array.from(this.dom.querySelectorAll("[data-ln-tab]")),this.panels=Array.from(this.dom.querySelectorAll("[data-ln-panel]"));const n=this.tabs.map(u=>({tagName:u.tagName,href:u.getAttribute("href")})),c=oe(n,this.nsKey);this.hashEnabled=c.hashEnabled,c.warning==="mixed"?console.warn('[ln-tabs] Mixed <a href="#…"> and <button> triggers in one group — using persist mode. Pick one: anchors for URL hash, buttons for localStorage persist.',this.dom):c.warning==="missing-namespace"&&console.warn("[ln-tabs] Anchor triggers need a hash namespace — add id or data-ln-tabs-key to the wrapper. Falling back to non-hash mode.",this.dom),this.mapTabs={},this.mapPanels={};for(const u of this.tabs){const f=re(u.getAttribute("data-ln-tab"),u.tagName,u.getAttribute("href"),this.nsKey);f?this.mapTabs[f]=u:console.warn('[ln-tabs] Trigger has no resolvable key — needs `data-ln-tab="key"` or `<a href="#…">`.',u)}for(const u of this.panels){const f=(u.getAttribute("data-ln-panel")||"").toLowerCase().trim();f&&(this.mapPanels[f]=u)}this.defaultKey=(this.dom.getAttribute("data-ln-tabs-default")||"").toLowerCase().trim()||Object.keys(this.mapTabs)[0]||"";const d=this;this._clickHandlers=[];for(const u of this.tabs){if(u[t+"Trigger"])continue;const f=function(h){const p=u.tagName==="A";if(!p&&(h.ctrlKey||h.metaKey||h.button===1))return;const b=re(u.getAttribute("data-ln-tab"),u.tagName,u.getAttribute("href"),d.nsKey);b&&(p&&!ne(h)||(d.hashEnabled?m(d.nsKey)===b?d.dom.setAttribute("data-ln-tabs-active",b):A(d.nsKey,b):d.dom.setAttribute("data-ln-tabs-active",b)))};u.addEventListener("click",f),u[t+"Trigger"]=f,d._clickHandlers.push({el:u,handler:f})}if(this._onRequestSelect=function(u){const f=u.detail&&(u.detail.key||u.detail.tab);f&&d.select(f)},this.dom.addEventListener("ln-tabs:request-select",this._onRequestSelect),this._hashHandler=function(){if(!d.hashEnabled)return;const u=m(d.nsKey);d.dom.setAttribute("data-ln-tabs-active",u!==null?u:d.defaultKey)},this.hashEnabled)window.addEventListener("hashchange",this._hashHandler),this._hashHandler();else{const u=ie(this.dom.getAttribute("data-ln-tabs-active"),Object.keys(this.mapPanels),this.defaultKey);this.dom.setAttribute("data-ln-tabs-active",u)}}s.prototype.select=function(n){const c=(n+"").toLowerCase().trim();c&&(this.hashEnabled?m(this.nsKey)===c?this.dom.setAttribute("data-ln-tabs-active",c):A(this.nsKey,c):this.dom.setAttribute("data-ln-tabs-active",c))},s.prototype._applyActive=function(n){var d;if(n=ie(n,Object.keys(this.mapPanels),this.defaultKey),n===this.activeKey)return;const c=this.activeKey;if(c!==null&&ce(this.dom,"ln-tabs:before-change",{key:n,previousKey:c,tab:this.mapTabs[n],panel:this.mapPanels[n],target:this.dom}).defaultPrevented){c in this.mapPanels&&(this.dom.setAttribute("data-ln-tabs-active",c),this.hashEnabled&&m(this.nsKey)!==c&&A(this.nsKey,c));return}this.activeKey=n;for(const u in this.mapTabs){const f=this.mapTabs[u];u===n?(f.hasAttribute("data-active")||f.setAttribute("data-active",""),f.getAttribute("aria-selected")!=="true"&&f.setAttribute("aria-selected","true")):(f.hasAttribute("data-active")&&f.removeAttribute("data-active"),f.getAttribute("aria-selected")!=="false"&&f.setAttribute("aria-selected","false"))}for(const u in this.mapPanels){const f=this.mapPanels[u],h=u===n;f.hidden!==!h&&(f.hidden=!h),f.classList.contains("hidden")!==!h&&f.classList.toggle("hidden",!h);const p=h?"false":"true";f.getAttribute("aria-hidden")!==p&&f.setAttribute("aria-hidden",p)}if(this.autoFocus){const u=(d=this.mapPanels[n])==null?void 0:d.querySelector('input,button,select,textarea,[tabindex]:not([tabindex="-1"])');u&&setTimeout(()=>u.focus({preventScroll:!0}),0)}R(this.dom,"ln-tabs:change",{key:n,previousKey:c,tab:this.mapTabs[n],panel:this.mapPanels[n],target:this.dom})},s.prototype.destroy=function(){if(this.dom[t]){this.dom.removeEventListener("ln-tabs:request-select",this._onRequestSelect);for(const{el:n,handler:c}of this._clickHandlers)n.removeEventListener("click",c),delete n[t+"Trigger"];this.hashEnabled&&window.removeEventListener("hashchange",this._hashHandler),delete this.dom[t]}},ee(e,t,s,"ln-tabs",{attributes:i,persist:{attr:"data-ln-tabs-active",hashActive:function(n){const c=Array.from(n.querySelectorAll("[data-ln-tab]")).map(function(u){return{tagName:u.tagName,href:u.getAttribute("href")}}),d=(n.getAttribute("data-ln-tabs-key")||n.id||"").toLowerCase().trim();return oe(c,d).hashEnabled}}})})()})();
@@ -149,20 +149,24 @@ import { deriveKeyFromTrigger, determineTabsMode, resolveActiveTabKey } from './
149
149
 
150
150
  for (const k in this.mapTabs) {
151
151
  const btn = this.mapTabs[k];
152
- if (k === key) {
153
- btn.setAttribute("data-active", "");
154
- btn.setAttribute("aria-selected", "true");
152
+ const isActive = (k === key);
153
+ if (isActive) {
154
+ if (!btn.hasAttribute("data-active")) btn.setAttribute("data-active", "");
155
+ if (btn.getAttribute("aria-selected") !== "true") btn.setAttribute("aria-selected", "true");
155
156
  } else {
156
- btn.removeAttribute("data-active");
157
- btn.setAttribute("aria-selected", "false");
157
+ if (btn.hasAttribute("data-active")) btn.removeAttribute("data-active");
158
+ if (btn.getAttribute("aria-selected") !== "false") btn.setAttribute("aria-selected", "false");
158
159
  }
159
160
  }
160
161
  for (const k in this.mapPanels) {
161
162
  const panel = this.mapPanels[k];
162
163
  const show = (k === key);
163
- panel.hidden = !show;
164
- panel.classList.toggle("hidden", !show);
165
- panel.setAttribute("aria-hidden", show ? "false" : "true");
164
+ if (panel.hidden !== !show) panel.hidden = !show;
165
+ if (panel.classList.contains("hidden") !== !show) panel.classList.toggle("hidden", !show);
166
+ const ariaHiddenStr = show ? "false" : "true";
167
+ if (panel.getAttribute("aria-hidden") !== ariaHiddenStr) {
168
+ panel.setAttribute("aria-hidden", ariaHiddenStr);
169
+ }
166
170
  }
167
171
  if (this.autoFocus) {
168
172
  const first = this.mapPanels[key]?.querySelector('input,button,select,textarea,[tabindex]:not([tabindex="-1"])');
@@ -1 +1 @@
1
- (function(){"use strict";function V(){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 D(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 n=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){n=t[l];break}if(!D(n))return}e.apply(console,t)}}function ae(e,t,r){const n=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,n),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))}function k(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){k(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function ue(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ce(e,t){const r=!!(t&&t.typed),n=t&&t.exclude,l={},s=e.elements,i={};if(r)for(let a=0;a<s.length;a++){const o=s[a];o.name&&o.type==="checkbox"&&!o.disabled&&(i[o.name]=(i[o.name]||0)+1)}for(let a=0;a<s.length;a++){const o=s[a];if(!(!o.name||o.disabled||o.type==="file"||o.type==="submit"||o.type==="button")&&!(n&&o.matches&&o.matches(n)))if(o.type==="checkbox")r&&i[o.name]===1?l[o.name]=o.checked:(l[o.name]||(l[o.name]=[]),o.checked&&l[o.name].push(o.value));else if(o.type==="radio")o.checked&&(l[o.name]=o.value);else if(o.type==="select-multiple"){l[o.name]=[];for(let c=0;c<o.options.length;c++)o.options[c].selected&&l[o.name].push(o.options[c].value)}else if(r&&o.type==="hidden")l[o.name]=o.value;else if(r&&(o.type==="number"||o.type==="range")){const c=Number(o.value);l[o.name]=o.value===""||isNaN(c)?null:c}else l[o.name]=o.value}return l}function fe(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function de(e,t){const r=e.elements,n=[],l={};for(let s=0;s<r.length;s++){const i=r[s];i.name&&i.type==="checkbox"&&(l[i.name]=(l[i.name]||0)+1)}for(let s=0;s<r.length;s++){const i=r[s];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const a=i.getAttribute("data-ln-fill-as")||i.name;if(!a||!(a in t))continue;const o=t[a];if(i.type==="checkbox"){if(Array.isArray(o))i.checked=o.indexOf(i.value)!==-1;else if(l[i.name]>1){const c=String(o).split(",").map(function(h){return h.trim()});i.checked=c.indexOf(i.value)!==-1}else i.checked=fe(o);n.push(i)}else if(i.type==="radio")i.checked=i.value===String(o),n.push(i);else if(i.type==="select-multiple"){if(Array.isArray(o))for(let c=0;c<i.options.length;c++)i.options[c].selected=o.indexOf(i.options[c].value)!==-1;n.push(i)}else i.value=o,i.tagName==="SELECT"&&o!=null&&i.setAttribute("data-ln-value",o),n.push(i)}return n}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=de,window.lnCore.serializeForm=ce,window.lnCore.resolveFormMethod=ue);const H={};function we(e,t){H[e]=t}function he(e){return H[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=we,window.lnCore.getDataMapper=he);function be(e){const t=e?e.closest("[lang]"):null,r=(t?t.getAttribute("lang")||t.lang:null)||(typeof document<"u"&&document.documentElement?document.documentElement.getAttribute("lang")||document.documentElement.lang:null)||(typeof navigator<"u"?navigator.language:null);return r?r.trim():"en-US"}function J(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,k(function(){new MutationObserver(function(){ae(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const Q={};function me(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];Q[r]=t}function M(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return Q[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=me,window.lnCore.getLocaleFallback=M,window.lnCore.ensureLocaleObserver=J);const E={};function ge(e,t){E[e]||(E[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=E[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function z(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let i=0;i<r.length;i++){const a=r[i],o=a.getAttribute("data-ln-field");t[o]!=null&&(a.textContent=t[o])}const n=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<n.length;i++){const a=n[i],o=a.getAttribute("data-ln-attr").split(",");for(let c=0;c<o.length;c++){const h=o[c].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 l=e.querySelectorAll("[data-ln-show]");for(let i=0;i<l.length;i++){const a=l[i],o=a.getAttribute("data-ln-show");o in t&&a.classList.toggle("hidden",!t[o])}const s=e.querySelectorAll("[data-ln-class]");for(let i=0;i<s.length;i++){const a=s[i],o=a.getAttribute("data-ln-class").split(",");for(let c=0;c<o.length;c++){const h=o[c].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 pe(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 r=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let n=0;n<r.length;n++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[n],t??null),r[n].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)z(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let r=0;r<t.length;r++)t[r].textContent=""}})));function K(e,t){if(!e||!t)return e;const r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const s=r.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,a){return t[a]!==void 0?t[a]:""}))}const n=function(s,i){return t[i]!==void 0?t[i]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let s=0;s<l.length;s++){const i=l[s],a=i.attributes;for(let o=0;o<a.length;o++){const c=a[o];c.value.indexOf("{{")!==-1&&i.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,n))}}return e}function ye(e,t,r,n,l,s){const i={};for(let o=0;o<e.children.length;o++){const c=e.children[o],h=c.getAttribute("data-ln-render-key");h&&(i[h]=c)}const a=document.createDocumentFragment();for(let o=0;o<t.length;o++){const c=t[o],h=String(n(c));let w=i[h];if(w)l(w,c,o);else{const m=ge(r,s);if(!m||(K(m,c),w=m.firstElementChild,!w))continue;w.setAttribute("data-ln-render-key",h),l(w,c,o)}a.appendChild(w)}e.textContent="",e.appendChild(a)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=K,window.lnCore.fill=z,window.lnCore.lnFill=pe,window.lnCore.renderList=ye);function F(e,t,r){const n=e.getAttribute(t);return n===null?r:n}function P(e,t,r){const n=parseInt(e.getAttribute(t),10);return isNaN(n)?r:n}function Y(e,t,r=!1){const n=e.getAttribute(t);if(n===null)return!!r;const l=n.trim().toLowerCase();return!(l==="false"||l==="0")}function G(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const I=new Map;function X(e,t){const r=(e?e.join("|"):"")+"::"+t;if(I.has(r))return I.get(r);const n=new Set(e||[]),l=function(s,i){const a=s.getAttribute(i);return a!==null&&n.has(a)?a:t};return I.set(r,l),l}function Z(e,t,r){const n=parseFloat(e.getAttribute(t));return isNaN(n)?r:n}function ee(e,t,r){const n=e.getAttribute(t);if(!n)return r;try{return JSON.parse(n)}catch{return r}}function te(e,t,r,n,l){if(!e||t===null)return!0;const s=n||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const a=o=>{l?console.warn(o,l):console.warn(o)};if(i==="boolean"){const o=t.trim().toLowerCase();return o!==""&&o!=="true"&&o!=="false"&&o!=="1"&&o!=="0"?(a(`[${s}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const o=e.values||[];return o.includes(t)?!0:(a(`[${s}] Invalid value "${t}" for attribute "${r}". Allowed: ${o.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return a(`[${s}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const o=parseInt(t,10);return e.min!==void 0&&o<e.min?(a(`[${s}] Value ${o} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(a(`[${s}] Value ${o} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(a(`[${s}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(o){return a(`[${s}] Invalid JSON for attribute "${r}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function Ce(e,t,r){for(const n in r){const[l,s,i]=r[n];Object.defineProperty(e,n,{get:function(){return l(t,s,i)},enumerable:!0,configurable:!0})}return e}function ve(e){const t={};for(const r in e){const n=e[r];if(!n||!n.prop)continue;let l=n.read;if(!l&&n.type)switch(n.type){case"enum":l=X(n.values,n.fallback);break;case"integer":l=P;break;case"float":l=Z;break;case"boolean":l=Y;break;case"list":l=G;break;case"json":l=ee;break;case"string":default:l=F;break}l||(l=F),t[n.prop]=[l,r,n.fallback]}return t}function Ae(e){const t={};for(const r in e){const n=e[r];n&&n.effect&&(t[r]=n.effect)}return Object.keys(t).length?t:null}function _e(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const r in e.effects)t.add(r);if(e.onAttrChange&&e.declared)for(const r of e.declared)t.add(r);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=Ce,window.lnCore.attrSpec=ve,window.lnCore.attrStr=F,window.lnCore.attrInt=P,window.lnCore.attrBool=Y,window.lnCore.attrList=G,window.lnCore.attrEnum=X,window.lnCore.attrFloat=Z,window.lnCore.attrJson=ee);function x(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(r){console.error("["+t.attribute+"] init failed",e,r)}}}function ne(e,t,r,n){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:r,ComponentFn:n};if(e.matches&&e.matches(s)&&x(e,i),e.querySelectorAll){const a=e.querySelectorAll(s);for(let o=0;o<a.length;o++)x(a[o],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function xe(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Se(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 re(){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 ke(e){const t=re(),r=e.observed||[];for(let n=0;n<r.length;n++){const l=r[n];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 n in e.attributes){t.byDeclaredAttr.has(n)||t.byDeclaredAttr.set(n,[]);const l=t.byDeclaredAttr.get(n);l.some(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[n],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const n=_e(e);if(n===null)t.reactiveWildcard.push(e);else for(const l of n)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function oe(e,t,r,n){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const i=s.effects&&s.effects[r];i?i(t,r,n):s.onAttrChange&&(!s.declared||s.declared.has(r))&&s.onAttrChange(t,r,n)}}function Oe(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,n=re(),l=n.byAttr.get(t),s=V()&&n.byDeclaredAttr&&n.byDeclaredAttr.has(t);if(!r&&!l&&!s)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(s&&D(i)){const a=n.byDeclaredAttr.get(t),o=i.getAttribute(t);for(let c=0;c<a.length;c++)te(a[c].spec,o,t,a[c].componentTag,i)}if(window.lnCore._debugSink&&(r||l)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),r){const a=n.byReactive.get(t);a&&oe(a,i,t,e.oldValue),n.reactiveWildcard.length&&oe(n.reactiveWildcard,i,t,e.oldValue)}if(l)for(let a=0;a<l.length;a++){const o=l[a];if(o.handler){o.handler(i,t,e.oldValue);continue}o.onAttributeChange&&i[o.attribute]?o.onAttributeChange(i,t):(ne(i,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(i))}}}function Le(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,k(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{Oe(t[r])}catch(n){console.error("[ln-core] mutation handler failed",t[r].target,n)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function $(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function N(e,t){if(!document.contains(e))if(t.attribute){const r=e[t.attribute];if(r&&typeof r.destroy=="function")try{r.destroy()}catch(n){console.error("["+t.attribute+"] destroy failed",e,n)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function Te(e){const t=$();if(t.length){if(e.target)for(let r=0;r<t.length;r++){const n=t[r];if(n.onSubtreeChange&&n.query){const l=n.query,s=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;s&&n.onSubtreeChange(s,e)}}for(let r=0;r<e.addedNodes.length;r++){const n=e.addedNodes[r];if(n.nodeType===1){const l=!!(n.firstElementChild||n.children&&n.children.length);for(let s=0;s<t.length;s++){const i=t[s];if(i.selector&&i.attribute&&i.ComponentFn){if(!l)n.matches&&n.matches(i.query)&&x(n,i);else if(n.matches&&n.matches(i.query)&&x(n,i),n.querySelectorAll){const a=n.querySelectorAll(i.query);for(let o=0;o<a.length;o++)x(a[o],i)}}i.onInit&&i.onInit(n)}}}for(let r=0;r<e.removedNodes.length;r++){const n=e.removedNodes[r];if(n.nodeType===1){const l=!!(n.firstElementChild||n.children&&n.children.length);for(let s=0;s<t.length;s++){const i=t[s],a=i.query;if(a){if(!l)n.matches&&n.matches(a)&&N(n,i);else if(n.matches&&n.matches(a)&&N(n,i),n.querySelectorAll){const o=n.querySelectorAll(a);for(let c=0;c<o.length;c++)N(o[c],i)}}}}}}}function ie(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,k(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++){const n=t[r];if(n.type==="childList")try{Te(n)}catch(l){console.error("[ln-core] lifecycle handler failed",n.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function De(e){$().push(e),ie()}function le(e,t,r,n,l={}){const s=l.extraAttributes||[],i=l.onAttributeChange||null,a=l.onSubtreeChange||null,o=l.onInit||null,c=l.onAttrChange||null,h=l.effects||null,w=l.attributes||null,m=w?Ae(w):h,L=w?new Set(Object.keys(w)):null,T=l.persist||null;function A(v){const p=v||document.body;if(ne(p,e,t,r),w&&V())for(const u in w){const f=w[u],d=Array.from(p.querySelectorAll("["+u+"]"));p.matches&&p.matches("["+u+"]")&&d.push(p);for(let g=0;g<d.length;g++){const b=d[g];D(b)&&te(f,b.getAttribute(u),u,n,b)}}o&&o(p)}const S=[];if(e.indexOf("[")!==-1){const v=/\[([\w-]+)/g;let p;for(;(p=v.exec(e))!==null;)S.push(p[1])}else S.push(e);ke({selector:e,attribute:t,componentTag:n,attributes:w,ComponentFn:r,onInit:o,observed:S.concat(s),onAttributeChange:i,onAttrChange:c,effects:m,declared:L,persist:T}),Le();const R=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,C=l.subtreeQuery||(R?e:"["+e+"]");$().push({selector:e,attribute:t,ComponentFn:r,onInit:o,onSubtreeChange:a,query:C}),ie(),window[t]=A,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=le,window.lnCore.observeLifecycle=De);function _(){xe()>0?Se(function(){A(document.body)}):A(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",_):_(),A}function se(e){return(e||"").replace(/^#/,"")}function q(e){const t=e===void 0?location.hash:e,r={},n=se(t);if(!n)return r;const l=n.split("&");for(let s=0;s<l.length;s++){const i=l[s];if(!i)continue;const a=i.indexOf(":"),o=a>-1?i.slice(0,a):i,c=a>-1?i.slice(a+1):"";if(o)try{r[o]=decodeURIComponent(c)}catch{r[o]=c}}return r}function Me(e){if(!e)return null;const t=q();return e in t?t[e]:null}function Ee(e,t){if(!e)return;const r=q();t==null?delete r[e]:r[e]=String(t);const l=Object.keys(r).map(function(s){const i=r[s];return i===""?s:s+":"+encodeURIComponent(i)}).join("&");se(location.hash)!==l&&(location.hash=l)}function Fe(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ie(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const r=e.getAttribute("data-ln-hash");if(r&&r.trim()!=="")return r.trim();const n=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return n?t?n+"-"+t:n:t||null}function $e(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Ne(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 qe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Re(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const r=e.slice(0,t),n=e.slice(t+1),l=n?n.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:r,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=q,window.lnCore.hashGet=Me,window.lnCore.hashSet=Ee,window.lnCore.hashLinkClick=Fe,window.lnCore.resolveHashNamespace=Ie,window.lnCore.hashSortEncode=$e,window.lnCore.hashSortDecode=Ne,window.lnCore.hashFilterEncode=qe,window.lnCore.hashFilterDecode=Re);function Be(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Be);function je(e){if(e==null||e==="")return null;if(e instanceof Date)return isNaN(e.getTime())?null:e;const t=Number(e);if(!isNaN(t)&&t>0){const r=t<1e11?t*1e3:t,n=new Date(r);return isNaN(n.getTime())?null:n}if(typeof e=="string"){const r=e.trim();if(!r)return null;const n=/^(\d{4})-(\d{2})-(\d{2})$/.exec(r);if(n){const s=+n[1],i=+n[2],a=+n[3],o=new Date(s,i-1,a);return o.getFullYear()!==s||o.getMonth()!==i-1||o.getDate()!==a?null:o}const l=new Date(r);return isNaN(l.getTime())?null:l}return null}function We(e,t=Date.now()){if(!e)return{value:0,unit:"second",isOlderThanMonth:!1};const r=typeof t=="number"?t:t.getTime(),n=e.getTime(),l=Math.floor((n-r)/1e3),s=Math.abs(l);return s<10?{value:0,unit:"second",isOlderThanMonth:!1}:s<60?{value:l,unit:"second",isOlderThanMonth:!1}:s<3600?{value:Math.round(l/60),unit:"minute",isOlderThanMonth:!1}:s<86400?{value:Math.round(l/3600),unit:"hour",isOlderThanMonth:!1}:s<604800?{value:Math.round(l/86400),unit:"day",isOlderThanMonth:!1}:s<2592e3?{value:Math.round(l/604800),unit:"week",isOlderThanMonth:!1}:{value:Math.round(l/2592e3),unit:"month",isOlderThanMonth:!0}}function O(e,t,r=new Date){switch(e){case"full":return{dateStyle:"long",timeStyle:"short"};case"date":return{dateStyle:"medium"};case"time":return{timeStyle:"short"};case"short":default:{const n={month:"short",day:"numeric"};return t&&t.getFullYear()!==r.getFullYear()&&(n.year="numeric"),n}}}(function(){const e="data-ln-time",t="lnTime";if(window[t]!==void 0)return;const r={"data-ln-time":{type:"enum",values:["relative","short","medium","long","iso"],fallback:"relative",effect:v,description:"Time format style preset or activator"},"data-ln-time-locale":{type:"string",effect:v,description:"BCP 47 language tag override for time formatting"}},n={},l={};function s(u){return u.getAttribute("data-ln-time-locale")||be(u)}function i(u,f){const d=(u||"")+"|"+JSON.stringify(f);return n[d]||(n[d]=new Intl.DateTimeFormat(u,f)),n[d]}function a(u){const f=u||"";return l[f]||(l[f]=new Intl.RelativeTimeFormat(u,{numeric:"auto",style:"narrow"})),l[f]}const o=new Set;let c=null;function h(){c||(c=setInterval(m,6e4))}function w(){c&&(clearInterval(c),c=null)}function m(){for(const u of o){if(!document.body.contains(u.dom)){o.delete(u);continue}C(u)}o.size===0&&w()}function L(u,f){const d=M(f),g=(f||"").toLowerCase().split("-")[0],b=i(f,O("full",u)),y=b.resolvedOptions().locale.toLowerCase().split("-")[0];if(d&&y!==g&&d.monthsLong){const B=d.monthsLong[u.getMonth()],j=u.getDate(),W=u.getFullYear(),U=String(u.getHours()).padStart(2,"0"),Ue=String(u.getMinutes()).padStart(2,"0");return`${j} ${B} ${W}, ${U}:${Ue}`}return b.format(u)}function T(u,f){const d=O("short",u),g=M(f),b=(f||"").toLowerCase().split("-")[0],y=i(f,d),B=y.resolvedOptions().locale.toLowerCase().split("-")[0];if(g&&B!==b&&g.monthsShort){const j=g.monthsShort[u.getMonth()],W=u.getDate(),U=d.year?" "+u.getFullYear():"";return`${W} ${j}${U}`}return y.format(u)}function A(u,f){return i(f,O("date",u)).format(u)}function S(u,f){return i(f,O("time",u)).format(u)}function R(u,f){const d=We(u);return d.isOlderThanMonth?T(u,f):a(f).format(d.value,d.unit)}function C(u){const f=u.dom.getAttribute("datetime");if(!f)return;const d=je(f);if(!d)return;const g=u.dom.getAttribute(e)||"short",b=s(u.dom);let y;switch(g){case"relative":y=R(d,b);break;case"full":y=L(d,b);break;case"date":y=A(d,b);break;case"time":y=S(d,b);break;default:y=T(d,b);break}u.dom.textContent=y,g!=="full"&&(u.dom.title=L(d,b))}function _(u){this.dom=u;const f=this;return this._onLocaleChange=function(){C(f)},J(),document.addEventListener("ln-core:locale-change",this._onLocaleChange),C(this),u.getAttribute(e)==="relative"&&(o.add(this),h()),this}_.prototype.render=function(){C(this)},_.prototype.destroy=function(){this._onLocaleChange&&document.removeEventListener("ln-core:locale-change",this._onLocaleChange),o.delete(this),o.size===0&&w(),delete this.dom[t]};function v(u){const f=u[t];if(!f)return;u.getAttribute(e)==="relative"?(o.add(f),h()):(o.delete(f),o.size===0&&w()),C(f)}function p(u){u.nodeType===1&&u.hasAttribute&&u.hasAttribute(e)&&u[t]&&C(u[t])}le(e,t,_,"ln-time",{attributes:r,extraAttributes:["datetime","lang"],onAttributeChange:v,onInit:p})})()})();
1
+ (function(){"use strict";function z(){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 M(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 i=1;i<t.length;i++)if(t[i]&&t[i].nodeType===1){o=t[i];break}if(!M(o))return}e.apply(console,t)}}function de(e,t,r){const o=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function L(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){L(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function we(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function he(e,t){const r=!!(t&&t.typed),o=t&&t.exclude,i={},s=e.elements,l={};if(r)for(let a=0;a<s.length;a++){const n=s[a];n.name&&n.type==="checkbox"&&!n.disabled&&(l[n.name]=(l[n.name]||0)+1)}for(let a=0;a<s.length;a++){const n=s[a];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(o&&n.matches&&n.matches(o)))if(n.type==="checkbox")r&&l[n.name]===1?i[n.name]=n.checked:(i[n.name]||(i[n.name]=[]),n.checked&&i[n.name].push(n.value));else if(n.type==="radio")n.checked&&(i[n.name]=n.value);else if(n.type==="select-multiple"){i[n.name]=[];for(let c=0;c<n.options.length;c++)n.options[c].selected&&i[n.name].push(n.options[c].value)}else if(r&&n.type==="hidden")i[n.name]=n.value;else if(r&&(n.type==="number"||n.type==="range")){const c=Number(n.value);i[n.name]=n.value===""||isNaN(c)?null:c}else i[n.name]=n.value}return i}function be(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ge(e,t){const r=e.elements,o=[],i={};for(let s=0;s<r.length;s++){const l=r[s];l.name&&l.type==="checkbox"&&(i[l.name]=(i[l.name]||0)+1)}for(let s=0;s<r.length;s++){const l=r[s];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const a=l.getAttribute("data-ln-fill-as")||l.name;if(!a||!(a in t))continue;const n=t[a];if(l.type==="checkbox"){if(Array.isArray(n))l.checked=n.indexOf(l.value)!==-1;else if(i[l.name]>1){const c=String(n).split(",").map(function(d){return d.trim()});l.checked=c.indexOf(l.value)!==-1}else l.checked=be(n);o.push(l)}else if(l.type==="radio")l.checked=l.value===String(n),o.push(l);else if(l.type==="select-multiple"){if(Array.isArray(n))for(let c=0;c<l.options.length;c++)l.options[c].selected=n.indexOf(l.options[c].value)!==-1;o.push(l)}else l.value=n,l.tagName==="SELECT"&&n!=null&&l.setAttribute("data-ln-value",n),o.push(l)}return o}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ge,window.lnCore.serializeForm=he,window.lnCore.resolveFormMethod=we);const K={};function me(e,t){K[e]=t}function pe(e){return K[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=me,window.lnCore.getDataMapper=pe);function ye(e){const t=e?e.closest("[lang]"):null,r=(t?t.getAttribute("lang")||t.lang:null)||(typeof document<"u"&&document.documentElement?document.documentElement.getAttribute("lang")||document.documentElement.lang:null)||(typeof navigator<"u"?navigator.language:null);return r?r.trim():"en-US"}function P(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,L(function(){new MutationObserver(function(){de(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const Y={};function Ce(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];Y[r]=t}function F(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return Y[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Ce,window.lnCore.getLocaleFallback=F,window.lnCore.ensureLocaleObserver=P);const I={};function ve(e,t){I[e]||(I[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=I[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function G(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let l=0;l<r.length;l++){const a=r[l],n=a.getAttribute("data-ln-field");t[n]!=null&&(a.textContent=t[n])}const o=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<o.length;l++){const a=o[l],n=a.getAttribute("data-ln-attr").split(",");for(let c=0;c<n.length;c++){const d=n[c].trim().split(":");if(d.length!==2)continue;const w=d[0].trim(),b=d[1].trim();t[b]!=null&&a.setAttribute(w,t[b])}}const i=e.querySelectorAll("[data-ln-show]");for(let l=0;l<i.length;l++){const a=i[l],n=a.getAttribute("data-ln-show");n in t&&a.classList.toggle("hidden",!t[n])}const s=e.querySelectorAll("[data-ln-class]");for(let l=0;l<s.length;l++){const a=s[l],n=a.getAttribute("data-ln-class").split(",");for(let c=0;c<n.length;c++){const d=n[c].trim().split(":");if(d.length!==2)continue;const w=d[0].trim(),b=d[1].trim();b in t&&a.classList.toggle(w,!!t[b])}}return e}function Ae(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 r=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let o=0;o<r.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[o],t??null),r[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)G(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let r=0;r<t.length;r++)t[r].textContent=""}})));function X(e,t){if(!e||!t)return e;const r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const s=r.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,a){return t[a]!==void 0?t[a]:""}))}const o=function(s,l){return t[l]!==void 0?t[l]:""},i=Array.from(e.querySelectorAll("*"));e.nodeType===1&&i.push(e);for(let s=0;s<i.length;s++){const l=i[s],a=l.attributes;for(let n=0;n<a.length;n++){const c=a[n];c.value.indexOf("{{")!==-1&&l.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function _e(e,t,r,o,i,s){const l={};for(let n=0;n<e.children.length;n++){const c=e.children[n],d=c.getAttribute("data-ln-render-key");d&&(l[d]=c)}const a=document.createDocumentFragment();for(let n=0;n<t.length;n++){const c=t[n],d=String(o(c));let w=l[d];if(w)i(w,c,n);else{const b=ve(r,s);if(!b||(X(b,c),w=b.firstElementChild,!w))continue;w.setAttribute("data-ln-render-key",d),i(w,c,n)}a.appendChild(w)}e.textContent="",e.appendChild(a)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=X,window.lnCore.fill=G,window.lnCore.lnFill=Ae,window.lnCore.renderList=_e);function $(e,t,r){const o=e.getAttribute(t);return o===null?r:o}function Z(e,t,r){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?r:o}function ee(e,t,r=!1){const o=e.getAttribute(t);if(o===null)return!!r;const i=o.trim().toLowerCase();return!(i==="false"||i==="0")}function te(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const N=new Map;function ne(e,t){const r=(e?e.join("|"):"")+"::"+t;if(N.has(r))return N.get(r);const o=new Set(e||[]),i=function(s,l){const a=s.getAttribute(l);return a!==null&&o.has(a)?a:t};return N.set(r,i),i}function re(e,t,r){const o=parseFloat(e.getAttribute(t));return isNaN(o)?r:o}function oe(e,t,r){const o=e.getAttribute(t);if(!o)return r;try{return JSON.parse(o)}catch{return r}}function ie(e,t,r,o,i){if(!e||t===null)return!0;const s=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=n=>{i?console.warn(n,i):console.warn(n)};if(l==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(a(`[${s}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const n=e.values||[];return n.includes(t)?!0:(a(`[${s}] Invalid value "${t}" for attribute "${r}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return a(`[${s}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(a(`[${s}] Value ${n} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(a(`[${s}] Value ${n} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(a(`[${s}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(n){return a(`[${s}] Invalid JSON for attribute "${r}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function xe(e,t,r){for(const o in r){const[i,s,l]=r[o];Object.defineProperty(e,o,{get:function(){return i(t,s,l)},enumerable:!0,configurable:!0})}return e}function Se(e){const t={};for(const r in e){const o=e[r];if(!o||!o.prop)continue;let i=o.read;if(!i&&o.type)switch(o.type){case"enum":i=ne(o.values,o.fallback);break;case"integer":i=Z;break;case"float":i=re;break;case"boolean":i=ee;break;case"list":i=te;break;case"json":i=oe;break;case"string":default:i=$;break}i||(i=$),t[o.prop]=[i,r,o.fallback]}return t}function ke(e){const t={};for(const r in e){const o=e[r];o&&o.effect&&(t[r]=o.effect)}return Object.keys(t).length?t:null}function Oe(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const r in e.effects)t.add(r);if(e.onAttrChange&&e.declared)for(const r of e.declared)t.add(r);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=xe,window.lnCore.attrSpec=Se,window.lnCore.attrStr=$,window.lnCore.attrInt=Z,window.lnCore.attrBool=ee,window.lnCore.attrList=te,window.lnCore.attrEnum=ne,window.lnCore.attrFloat=re,window.lnCore.attrJson=oe);function x(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(r){console.error("["+t.attribute+"] init failed",e,r)}}}function le(e,t,r,o){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:r,ComponentFn:o};if(e.matches&&e.matches(s)&&x(e,l),e.querySelectorAll){const a=e.querySelectorAll(s);for(let n=0;n<a.length;n++)x(a[n],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Le(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Te(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 se(){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=se(),r=e.observed||[];for(let o=0;o<r.length;o++){const i=r[o];t.byAttr.has(i)||t.byAttr.set(i,[]),t.byAttr.get(i).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 i=t.byDeclaredAttr.get(o);i.some(s=>s.componentTag===e.componentTag)||i.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=Oe(e);if(o===null)t.reactiveWildcard.push(e);else for(const i of o)t.byReactive.has(i)||t.byReactive.set(i,[]),t.byReactive.get(i).push(e)}e.persist&&t.persist.push(e)}function ae(e,t,r,o){for(let i=0;i<e.length;i++){const s=e[i];if(!t[s.attribute])continue;const l=s.effects&&s.effects[r];l?l(t,r,o):s.onAttrChange&&(!s.declared||s.declared.has(r))&&s.onAttrChange(t,r,o)}}function De(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,o=se(),i=o.byAttr.get(t),s=z()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(t);if(!r&&!i&&!s)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(s&&M(l)){const a=o.byDeclaredAttr.get(t),n=l.getAttribute(t);for(let c=0;c<a.length;c++)ie(a[c].spec,n,t,a[c].componentTag,l)}if(window.lnCore._debugSink&&(r||i)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),r){const a=o.byReactive.get(t);a&&ae(a,l,t,e.oldValue),o.reactiveWildcard.length&&ae(o.reactiveWildcard,l,t,e.oldValue)}if(i)for(let a=0;a<i.length;a++){const n=i[a];if(n.handler){n.handler(l,t,e.oldValue);continue}n.onAttributeChange&&l[n.attribute]?n.onAttributeChange(l,t):(le(l,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(l))}}}function Me(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,L(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{De(t[r])}catch(o){console.error("[ln-core] mutation handler failed",t[r].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function q(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function R(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function B(e,t){if(!document.contains(e))if(t.attribute){const r=e[t.attribute];if(r&&typeof r.destroy=="function")try{r.destroy()}catch(o){console.error("["+t.attribute+"] destroy failed",e,o)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function Fe(e){const t=q();if(!t.length)return;const r=e.target;if(r){const i=r.nodeType===1?r:r.parentElement;if(i&&(i.isContentEditable||i.closest&&i.closest('[contenteditable]:not([contenteditable="false"])')))return}const o=R();if(e.target&&o.length)for(let i=0;i<o.length;i++){const s=o[i],l=s.query,a=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;a&&s.onSubtreeChange(a,e)}for(let i=0;i<e.addedNodes.length;i++){const s=e.addedNodes[i];if(s.nodeType===1){const l=!!(s.firstElementChild||s.children&&s.children.length);for(let a=0;a<t.length;a++){const n=t[a];if(n.selector&&n.attribute&&n.ComponentFn){if(!l)s.matches&&s.matches(n.query)&&x(s,n);else if(s.matches&&s.matches(n.query)&&x(s,n),s.querySelectorAll){const c=s.querySelectorAll(n.query);for(let d=0;d<c.length;d++)x(c[d],n)}}n.onInit&&n.onInit(s)}}}for(let i=0;i<e.removedNodes.length;i++){const s=e.removedNodes[i];if(s.nodeType===1){const l=!!(s.firstElementChild||s.children&&s.children.length);for(let a=0;a<t.length;a++){const n=t[a],c=n.query;if(c){if(!l)s.matches&&s.matches(c)&&B(s,n);else if(s.matches&&s.matches(c)&&B(s,n),s.querySelectorAll){const d=s.querySelectorAll(c);for(let w=0;w<d.length;w++)B(d[w],n)}}}}}}function ue(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,L(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++){const o=t[r];if(o.type==="childList")try{Fe(o)}catch(i){console.error("[ln-core] lifecycle handler failed",o.target,i)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ie(e){q().push(e),e.onSubtreeChange&&e.query&&R().push(e),ue()}function ce(e,t,r,o,i={}){const s=i.extraAttributes||[],l=i.onAttributeChange||null,a=i.onSubtreeChange||null,n=i.onInit||null,c=i.onAttrChange||null,d=i.effects||null,w=i.attributes||null,b=w?ke(w):d,E=w?new Set(Object.keys(w)):null,D=i.persist||null;function A(O){const g=O||document.body;if(le(g,e,t,r),w&&z())for(const C in w){const U=w[C],u=Array.from(g.querySelectorAll("["+C+"]"));g.matches&&g.matches("["+C+"]")&&u.push(g);for(let f=0;f<u.length;f++){const h=u[f];M(h)&&ie(U,h.getAttribute(C),C,o,h)}}n&&n(g)}const S=[];if(e.indexOf("[")!==-1){const O=/\[([\w-]+)/g;let g;for(;(g=O.exec(e))!==null;)S.push(g[1])}else S.push(e);Ee({selector:e,attribute:t,componentTag:o,attributes:w,ComponentFn:r,onInit:n,observed:S.concat(s),onAttributeChange:l,onAttrChange:c,effects:b,declared:E,persist:D}),Me();const W=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,y=i.subtreeQuery||(W?e:"["+e+"]"),_={selector:e,attribute:t,ComponentFn:r,onInit:n,onSubtreeChange:a,query:y};q().push(_),a&&y&&R().push(_),ue(),window[t]=A,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ce,window.lnCore.observeLifecycle=Ie);function k(){Le()>0?Te(function(){A(document.body)}):A(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",k):k(),A}function fe(e){return(e||"").replace(/^#/,"")}function j(e){const t=e===void 0?location.hash:e,r={},o=fe(t);if(!o)return r;const i=o.split("&");for(let s=0;s<i.length;s++){const l=i[s];if(!l)continue;const a=l.indexOf(":"),n=a>-1?l.slice(0,a):l,c=a>-1?l.slice(a+1):"";if(n)try{r[n]=decodeURIComponent(c)}catch{r[n]=c}}return r}function $e(e){if(!e)return null;const t=j();return e in t?t[e]:null}function Ne(e,t){if(!e)return;const r=j();t==null?delete r[e]:r[e]=String(t);const i=Object.keys(r).map(function(s){const l=r[s];return l===""?s:s+":"+encodeURIComponent(l)}).join("&");fe(location.hash)!==i&&(location.hash=i)}function qe(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Re(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const r=e.getAttribute("data-ln-hash");if(r&&r.trim()!=="")return r.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 Be(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function je(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 We(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ue(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const r=e.slice(0,t),o=e.slice(t+1),i=o?o.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:r,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=j,window.lnCore.hashGet=$e,window.lnCore.hashSet=Ne,window.lnCore.hashLinkClick=qe,window.lnCore.resolveHashNamespace=Re,window.lnCore.hashSortEncode=Be,window.lnCore.hashSortDecode=je,window.lnCore.hashFilterEncode=We,window.lnCore.hashFilterDecode=Ue);function Ve(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Ve);function He(e){if(e==null||e==="")return null;if(e instanceof Date)return isNaN(e.getTime())?null:e;const t=Number(e);if(!isNaN(t)&&t>0){const r=t<1e11?t*1e3:t,o=new Date(r);return isNaN(o.getTime())?null:o}if(typeof e=="string"){const r=e.trim();if(!r)return null;const o=/^(\d{4})-(\d{2})-(\d{2})$/.exec(r);if(o){const s=+o[1],l=+o[2],a=+o[3],n=new Date(s,l-1,a);return n.getFullYear()!==s||n.getMonth()!==l-1||n.getDate()!==a?null:n}const i=new Date(r);return isNaN(i.getTime())?null:i}return null}function Je(e,t=Date.now()){if(!e)return{value:0,unit:"second",isOlderThanMonth:!1};const r=typeof t=="number"?t:t.getTime(),o=e.getTime(),i=Math.floor((o-r)/1e3),s=Math.abs(i);return s<10?{value:0,unit:"second",isOlderThanMonth:!1}:s<60?{value:i,unit:"second",isOlderThanMonth:!1}:s<3600?{value:Math.round(i/60),unit:"minute",isOlderThanMonth:!1}:s<86400?{value:Math.round(i/3600),unit:"hour",isOlderThanMonth:!1}:s<604800?{value:Math.round(i/86400),unit:"day",isOlderThanMonth:!1}:s<2592e3?{value:Math.round(i/604800),unit:"week",isOlderThanMonth:!1}:{value:Math.round(i/2592e3),unit:"month",isOlderThanMonth:!0}}function T(e,t,r=new Date){switch(e){case"full":return{dateStyle:"long",timeStyle:"short"};case"date":return{dateStyle:"medium"};case"time":return{timeStyle:"short"};case"short":default:{const o={month:"short",day:"numeric"};return t&&t.getFullYear()!==r.getFullYear()&&(o.year="numeric"),o}}}(function(){const e="data-ln-time",t="lnTime";if(window[t]!==void 0)return;const r={"data-ln-time":{type:"enum",values:["relative","short","medium","long","iso"],fallback:"relative",effect:C,description:"Time format style preset or activator"},"data-ln-time-locale":{type:"string",effect:C,description:"BCP 47 language tag override for time formatting"}},o={},i={};function s(u){return u.getAttribute("data-ln-time-locale")||ye(u)}function l(u,f){const h=(u||"")+"|"+JSON.stringify(f);return o[h]||(o[h]=new Intl.DateTimeFormat(u,f)),o[h]}function a(u){const f=u||"";return i[f]||(i[f]=new Intl.RelativeTimeFormat(u,{numeric:"auto",style:"narrow"})),i[f]}const n=new Set;let c=null;function d(){c||(c=setInterval(b,6e4))}function w(){c&&(clearInterval(c),c=null)}function b(){for(const u of n){if(!document.body.contains(u.dom)){n.delete(u);continue}y(u)}n.size===0&&w()}function E(u,f){const h=F(f),v=(f||"").toLowerCase().split("-")[0],m=l(f,T("full",u)),p=m.resolvedOptions().locale.toLowerCase().split("-")[0];if(h&&p!==v&&h.monthsLong){const V=h.monthsLong[u.getMonth()],H=u.getDate(),J=u.getFullYear(),Q=String(u.getHours()).padStart(2,"0"),Qe=String(u.getMinutes()).padStart(2,"0");return`${H} ${V} ${J}, ${Q}:${Qe}`}return m.format(u)}function D(u,f){const h=T("short",u),v=F(f),m=(f||"").toLowerCase().split("-")[0],p=l(f,h),V=p.resolvedOptions().locale.toLowerCase().split("-")[0];if(v&&V!==m&&v.monthsShort){const H=v.monthsShort[u.getMonth()],J=u.getDate(),Q=h.year?" "+u.getFullYear():"";return`${J} ${H}${Q}`}return p.format(u)}function A(u,f){return l(f,T("date",u)).format(u)}function S(u,f){return l(f,T("time",u)).format(u)}function W(u,f){const h=Je(u);return h.isOlderThanMonth?D(u,f):a(f).format(h.value,h.unit)}function y(u){const f=u.dom.getAttribute("datetime");if(!f)return;const h=He(f);if(!h)return;const v=u.dom.getAttribute(e)||"short",m=s(u.dom);let p;switch(v){case"relative":p=W(h,m);break;case"full":p=E(h,m);break;case"date":p=A(h,m);break;case"time":p=S(h,m);break;default:p=D(h,m);break}u.dom.textContent=p,v!=="full"&&(u.dom.title=E(h,m))}const _=new Set;let k=!1;function O(){P(),!k&&(k=!0,document.addEventListener("ln-core:locale-change",function(){_.forEach(function(u){y(u)})}))}function g(u){return this.dom=u,_.add(this),O(),y(this),u.getAttribute(e)==="relative"&&(n.add(this),d()),this}g.prototype.render=function(){y(this)},g.prototype.destroy=function(){_.delete(this),this._onLocaleChange&&document.removeEventListener("ln-core:locale-change",this._onLocaleChange),n.delete(this),n.size===0&&w(),delete this.dom[t]};function C(u){const f=u[t];if(!f)return;u.getAttribute(e)==="relative"?(n.add(f),d()):(n.delete(f),n.size===0&&w()),y(f)}function U(u){u.nodeType===1&&u.hasAttribute&&u.hasAttribute(e)&&u[t]&&y(u[t])}ce(e,t,g,"ln-time",{attributes:r,extraAttributes:["datetime","lang"],onAttributeChange:C,onInit:U})})()})();
@@ -139,17 +139,26 @@ import { calculateRelativeTime, resolveDateFormatOptions } from './time-model.js
139
139
  }
140
140
  }
141
141
 
142
+ const _allInstances = new Set();
143
+ let _localeListenerBound = false;
144
+
145
+ function _ensureLocaleListener() {
146
+ ensureLocaleObserver();
147
+ if (_localeListenerBound) return;
148
+ _localeListenerBound = true;
149
+ document.addEventListener('ln-core:locale-change', function () {
150
+ _allInstances.forEach(function (inst) {
151
+ _render(inst);
152
+ });
153
+ });
154
+ }
155
+
142
156
  // ─── Component ────────────────────────────────────────────
143
157
  function _constructor(dom) {
144
158
  this.dom = dom;
145
- const self = this;
146
159
 
147
- // ── Subscribe to global locale changes ──────────────
148
- this._onLocaleChange = function () {
149
- _render(self);
150
- };
151
- ensureLocaleObserver();
152
- document.addEventListener('ln-core:locale-change', this._onLocaleChange);
160
+ _allInstances.add(this);
161
+ _ensureLocaleListener();
153
162
 
154
163
  _render(this);
155
164
 
@@ -166,6 +175,7 @@ import { calculateRelativeTime, resolveDateFormatOptions } from './time-model.js
166
175
  };
167
176
 
168
177
  _constructor.prototype.destroy = function () {
178
+ _allInstances.delete(this);
169
179
  if (this._onLocaleChange) {
170
180
  document.removeEventListener('ln-core:locale-change', this._onLocaleChange);
171
181
  }
@@ -1 +1 @@
1
- (function(){"use strict";function M(){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 x(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 n=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){n=t[l];break}if(!x(n))return}e.apply(console,t)}}function ne(e,t,o){const n=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,n),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))}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()}function oe(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function re(e,t){const o=!!(t&&t.typed),n=t&&t.exclude,l={},s=e.elements,i={};if(o)for(let a=0;a<s.length;a++){const r=s[a];r.name&&r.type==="checkbox"&&!r.disabled&&(i[r.name]=(i[r.name]||0)+1)}for(let a=0;a<s.length;a++){const r=s[a];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(n&&r.matches&&r.matches(n)))if(r.type==="checkbox")o&&i[r.name]===1?l[r.name]=r.checked:(l[r.name]||(l[r.name]=[]),r.checked&&l[r.name].push(r.value));else if(r.type==="radio")r.checked&&(l[r.name]=r.value);else if(r.type==="select-multiple"){l[r.name]=[];for(let u=0;u<r.options.length;u++)r.options[u].selected&&l[r.name].push(r.options[u].value)}else if(o&&r.type==="hidden")l[r.name]=r.value;else if(o&&(r.type==="number"||r.type==="range")){const u=Number(r.value);l[r.name]=r.value===""||isNaN(u)?null:u}else l[r.name]=r.value}return l}function ie(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function le(e,t){const o=e.elements,n=[],l={};for(let s=0;s<o.length;s++){const i=o[s];i.name&&i.type==="checkbox"&&(l[i.name]=(l[i.name]||0)+1)}for(let s=0;s<o.length;s++){const i=o[s];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const a=i.getAttribute("data-ln-fill-as")||i.name;if(!a||!(a in t))continue;const r=t[a];if(i.type==="checkbox"){if(Array.isArray(r))i.checked=r.indexOf(i.value)!==-1;else if(l[i.name]>1){const u=String(r).split(",").map(function(h){return h.trim()});i.checked=u.indexOf(i.value)!==-1}else i.checked=ie(r);n.push(i)}else if(i.type==="radio")i.checked=i.value===String(r),n.push(i);else if(i.type==="select-multiple"){if(Array.isArray(r))for(let u=0;u<i.options.length;u++)i.options[u].selected=r.indexOf(i.options[u].value)!==-1;n.push(i)}else i.value=r,i.tagName==="SELECT"&&r!=null&&i.setAttribute("data-ln-value",r),n.push(i)}return n}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=le,window.lnCore.serializeForm=re,window.lnCore.resolveFormMethod=oe);const B={};function se(e,t){B[e]=t}function ae(e){return B[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=se,window.lnCore.getDataMapper=ae);function ce(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,A(function(){new MutationObserver(function(){ne(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const R={};function ue(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];R[o]=t}function de(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return R[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ue,window.lnCore.getLocaleFallback=de,window.lnCore.ensureLocaleObserver=ce);const S={};function j(e,t){S[e]||(S[e]=document.querySelector('[data-ln-template="'+e+'"]'));const o=S[e];return o?o.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function fe(e,t,o){if(e){const n=e.querySelector('[data-ln-template="'+t+'"]');if(n)return n.content.cloneNode(!0)}return j(t,o)}function k(e,t){if(!e||!t)return e;const o=e.querySelectorAll("[data-ln-field]");for(let i=0;i<o.length;i++){const a=o[i],r=a.getAttribute("data-ln-field");t[r]!=null&&(a.textContent=t[r])}const n=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<n.length;i++){const a=n[i],r=a.getAttribute("data-ln-attr").split(",");for(let u=0;u<r.length;u++){const h=r[u].trim().split(":");if(h.length!==2)continue;const w=h[0].trim(),b=h[1].trim();t[b]!=null&&a.setAttribute(w,t[b])}}const l=e.querySelectorAll("[data-ln-show]");for(let i=0;i<l.length;i++){const a=l[i],r=a.getAttribute("data-ln-show");r in t&&a.classList.toggle("hidden",!t[r])}const s=e.querySelectorAll("[data-ln-class]");for(let i=0;i<s.length;i++){const a=s[i],r=a.getAttribute("data-ln-class").split(",");for(let u=0;u<r.length;u++){const h=r[u].trim().split(":");if(h.length!==2)continue;const w=h[0].trim(),b=h[1].trim();b in t&&a.classList.toggle(w,!!t[b])}}return e}function we(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 o=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let n=0;n<o.length;n++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",o[n],t??null),o[n].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)k(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let o=0;o<t.length;o++)t[o].textContent=""}})));function W(e,t){if(!e||!t)return e;const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const s=o.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,a){return t[a]!==void 0?t[a]:""}))}const n=function(s,i){return t[i]!==void 0?t[i]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let s=0;s<l.length;s++){const i=l[s],a=i.attributes;for(let r=0;r<a.length;r++){const u=a[r];u.value.indexOf("{{")!==-1&&i.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,n))}}return e}function he(e,t,o,n,l,s){const i={};for(let r=0;r<e.children.length;r++){const u=e.children[r],h=u.getAttribute("data-ln-render-key");h&&(i[h]=u)}const a=document.createDocumentFragment();for(let r=0;r<t.length;r++){const u=t[r],h=String(n(u));let w=i[h];if(w)l(w,u,r);else{const b=j(o,s);if(!b||(W(b,u),w=b.firstElementChild,!w))continue;w.setAttribute("data-ln-render-key",h),l(w,u,r)}a.appendChild(w)}e.textContent="",e.appendChild(a)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=W,window.lnCore.fill=k,window.lnCore.lnFill=we,window.lnCore.renderList=he);function E(e,t,o){const n=e.getAttribute(t);return n===null?o:n}function _(e,t,o){const n=parseInt(e.getAttribute(t),10);return isNaN(n)?o:n}function H(e,t,o=!1){const n=e.getAttribute(t);if(n===null)return!!o;const l=n.trim().toLowerCase();return!(l==="false"||l==="0")}function U(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const L=new Map;function V(e,t){const o=(e?e.join("|"):"")+"::"+t;if(L.has(o))return L.get(o);const n=new Set(e||[]),l=function(s,i){const a=s.getAttribute(i);return a!==null&&n.has(a)?a:t};return L.set(o,l),l}function P(e,t,o){const n=parseFloat(e.getAttribute(t));return isNaN(n)?o:n}function Q(e,t,o){const n=e.getAttribute(t);if(!n)return o;try{return JSON.parse(n)}catch{return o}}function J(e,t,o,n,l){if(!e||t===null)return!0;const s=n||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const a=r=>{l?console.warn(r,l):console.warn(r)};if(i==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(a(`[${s}] Invalid value "${t}" for boolean attribute "${o}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const r=e.values||[];return r.includes(t)?!0:(a(`[${s}] Invalid value "${t}" for attribute "${o}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return a(`[${s}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(a(`[${s}] Value ${r} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(a(`[${s}] Value ${r} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(a(`[${s}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(r){return a(`[${s}] Invalid JSON for attribute "${o}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function K(e,t,o){for(const n in o){const[l,s,i]=o[n];Object.defineProperty(e,n,{get:function(){return l(t,s,i)},enumerable:!0,configurable:!0})}return e}function z(e){const t={};for(const o in e){const n=e[o];if(!n||!n.prop)continue;let l=n.read;if(!l&&n.type)switch(n.type){case"enum":l=V(n.values,n.fallback);break;case"integer":l=_;break;case"float":l=P;break;case"boolean":l=H;break;case"list":l=U;break;case"json":l=Q;break;case"string":default:l=E;break}l||(l=E),t[n.prop]=[l,o,n.fallback]}return t}function pe(e){const t={};for(const o in e){const n=e[o];n&&n.effect&&(t[o]=n.effect)}return Object.keys(t).length?t:null}function me(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const o in e.effects)t.add(o);if(e.onAttrChange&&e.declared)for(const o of e.declared)t.add(o);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=K,window.lnCore.attrSpec=z,window.lnCore.attrStr=E,window.lnCore.attrInt=_,window.lnCore.attrBool=H,window.lnCore.attrList=U,window.lnCore.attrEnum=V,window.lnCore.attrFloat=P,window.lnCore.attrJson=Q);function v(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(o){console.error("["+t.attribute+"] init failed",e,o)}}}function G(e,t,o,n){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:o,ComponentFn:n};if(e.matches&&e.matches(s)&&v(e,i),e.querySelectorAll){const a=e.querySelectorAll(s);for(let r=0;r<a.length;r++)v(a[r],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function be(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function ge(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 X(){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 ye(e){const t=X(),o=e.observed||[];for(let n=0;n<o.length;n++){const l=o[n];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 n in e.attributes){t.byDeclaredAttr.has(n)||t.byDeclaredAttr.set(n,[]);const l=t.byDeclaredAttr.get(n);l.some(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[n],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const n=me(e);if(n===null)t.reactiveWildcard.push(e);else for(const l of n)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function Y(e,t,o,n){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const i=s.effects&&s.effects[o];i?i(t,o,n):s.onAttrChange&&(!s.declared||s.declared.has(o))&&s.onAttrChange(t,o,n)}}function Ce(e){const t=e.attributeName,o=t.indexOf("data-ln-")===0,n=X(),l=n.byAttr.get(t),s=M()&&n.byDeclaredAttr&&n.byDeclaredAttr.has(t);if(!o&&!l&&!s)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(s&&x(i)){const a=n.byDeclaredAttr.get(t),r=i.getAttribute(t);for(let u=0;u<a.length;u++)J(a[u].spec,r,t,a[u].componentTag,i)}if(window.lnCore._debugSink&&(o||l)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),o){const a=n.byReactive.get(t);a&&Y(a,i,t,e.oldValue),n.reactiveWildcard.length&&Y(n.reactiveWildcard,i,t,e.oldValue)}if(l)for(let a=0;a<l.length;a++){const r=l[a];if(r.handler){r.handler(i,t,e.oldValue);continue}r.onAttributeChange&&i[r.attribute]?r.onAttributeChange(i,t):(G(i,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(i))}}}function Ae(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,A(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{Ce(t[o])}catch(n){console.error("[ln-core] mutation handler failed",t[o].target,n)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function q(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function T(e,t){if(!document.contains(e))if(t.attribute){const o=e[t.attribute];if(o&&typeof o.destroy=="function")try{o.destroy()}catch(n){console.error("["+t.attribute+"] destroy failed",e,n)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function ve(e){const t=q();if(t.length){if(e.target)for(let o=0;o<t.length;o++){const n=t[o];if(n.onSubtreeChange&&n.query){const l=n.query,s=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;s&&n.onSubtreeChange(s,e)}}for(let o=0;o<e.addedNodes.length;o++){const n=e.addedNodes[o];if(n.nodeType===1){const l=!!(n.firstElementChild||n.children&&n.children.length);for(let s=0;s<t.length;s++){const i=t[s];if(i.selector&&i.attribute&&i.ComponentFn){if(!l)n.matches&&n.matches(i.query)&&v(n,i);else if(n.matches&&n.matches(i.query)&&v(n,i),n.querySelectorAll){const a=n.querySelectorAll(i.query);for(let r=0;r<a.length;r++)v(a[r],i)}}i.onInit&&i.onInit(n)}}}for(let o=0;o<e.removedNodes.length;o++){const n=e.removedNodes[o];if(n.nodeType===1){const l=!!(n.firstElementChild||n.children&&n.children.length);for(let s=0;s<t.length;s++){const i=t[s],a=i.query;if(a){if(!l)n.matches&&n.matches(a)&&T(n,i);else if(n.matches&&n.matches(a)&&T(n,i),n.querySelectorAll){const r=n.querySelectorAll(a);for(let u=0;u<r.length;u++)T(r[u],i)}}}}}}}function Z(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,A(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++){const n=t[o];if(n.type==="childList")try{ve(n)}catch(l){console.error("[ln-core] lifecycle handler failed",n.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function _e(e){q().push(e),Z()}function ee(e,t,o,n,l={}){const s=l.extraAttributes||[],i=l.onAttributeChange||null,a=l.onSubtreeChange||null,r=l.onInit||null,u=l.onAttrChange||null,h=l.effects||null,w=l.attributes||null,b=w?pe(w):h,D=w?new Set(Object.keys(w)):null,I=l.persist||null;function C(m){const g=m||document.body;if(G(g,e,t,o),w&&M())for(const y in w){const Ie=w[y],N=Array.from(g.querySelectorAll("["+y+"]"));g.matches&&g.matches("["+y+"]")&&N.push(g);for(let F=0;F<N.length;F++){const $=N[F];x($)&&J(Ie,$.getAttribute(y),y,n,$)}}r&&r(g)}const c=[];if(e.indexOf("[")!==-1){const m=/\[([\w-]+)/g;let g;for(;(g=m.exec(e))!==null;)c.push(g[1])}else c.push(e);ye({selector:e,attribute:t,componentTag:n,attributes:w,ComponentFn:o,onInit:r,observed:c.concat(s),onAttributeChange:i,onAttrChange:u,effects:b,declared:D,persist:I}),Ae();const d=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,f=l.subtreeQuery||(d?e:"["+e+"]");q().push({selector:e,attribute:t,ComponentFn:o,onInit:r,onSubtreeChange:a,query:f}),Z(),window[t]=C,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ee,window.lnCore.observeLifecycle=_e);function p(){be()>0?ge(function(){C(document.body)}):C(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",p):p(),C}function te(e){return(e||"").replace(/^#/,"")}function O(e){const t=e===void 0?location.hash:e,o={},n=te(t);if(!n)return o;const l=n.split("&");for(let s=0;s<l.length;s++){const i=l[s];if(!i)continue;const a=i.indexOf(":"),r=a>-1?i.slice(0,a):i,u=a>-1?i.slice(a+1):"";if(r)try{o[r]=decodeURIComponent(u)}catch{o[r]=u}}return o}function xe(e){if(!e)return null;const t=O();return e in t?t[e]:null}function Se(e,t){if(!e)return;const o=O();t==null?delete o[e]:o[e]=String(t);const l=Object.keys(o).map(function(s){const i=o[s];return i===""?s:s+":"+encodeURIComponent(i)}).join("&");te(location.hash)!==l&&(location.hash=l)}function ke(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ee(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const o=e.getAttribute("data-ln-hash");if(o&&o.trim()!=="")return o.trim();const n=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return n?t?n+"-"+t:n:t||null}function Le(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function qe(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 Te(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Oe(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const o=e.slice(0,t),n=e.slice(t+1),l=n?n.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:o,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=O,window.lnCore.hashGet=xe,window.lnCore.hashSet=Se,window.lnCore.hashLinkClick=ke,window.lnCore.resolveHashNamespace=Ee,window.lnCore.hashSortEncode=Le,window.lnCore.hashSortDecode=qe,window.lnCore.hashFilterEncode=Te,window.lnCore.hashFilterDecode=Oe);function De(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=De),(function(){const e="data-ln-toast",t="lnToast",o="ln-toast-item";if(window[t]!==void 0)return;const n={"data-ln-toast":{type:"marker",description:"Initializes the toast notifications container"},"data-ln-toast-timeout":{prop:"timeoutDefault",type:"integer",read:_,fallback:6e3,min:500,description:"Default auto-dismiss timeout in ms"},"data-ln-toast-max":{prop:"max",type:"integer",read:_,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"}},l=z(n);function s(c){if(!(!c||!(c instanceof HTMLElement))&&(c.hasAttribute("popover")||c.setAttribute("popover","manual"),typeof c.showPopover=="function")){if(c.matches(":popover-open"))try{c.hidePopover()}catch{}try{c.showPopover()}catch{}}}function i(c){if(!c||!(c instanceof HTMLElement))return;if(c.querySelectorAll("[data-ln-toast-item]").length===0&&typeof c.hidePopover=="function"&&c.matches(":popover-open"))try{c.hidePopover()}catch{}}function a(c){this.dom=c,K(this,c,l);const d=Array.from(c.querySelectorAll("[data-ln-toast-item]"));for(;d.length>this.max;)c.removeChild(d.shift());for(const f of d)D(f,this);return d.length>0&&s(c),this}a.prototype.enqueue=function(c){if(!c)return;const d=r(c,this.dom);if(!d)return;const f=Number.isFinite(c.timeout)?c.timeout:this.timeoutDefault;h(this,d),f>0&&(d._timer=setTimeout(()=>w(d),f))},a.prototype.clear=function(){for(const c of Array.from(this.dom.querySelectorAll("[data-ln-toast-item]")))w(c)},a.prototype.destroy=function(){if(this.dom[t]){for(const c of Array.from(this.dom.querySelectorAll("[data-ln-toast-item]")))w(c);i(this.dom),delete this.dom[t]}};function r(c,d){const f=((c.type||"")+"").trim().toLowerCase(),p=fe(d,o,"ln-toast");if(!p)return console.warn('[ln-toast] Template "'+o+'" not found'),null;k(p,{type:f,title:c.title,message:typeof c.message=="string"?c.message:void 0});const m=p.firstElementChild;if(!m)return null;m.hasAttribute("data-ln-toast-item")||m.setAttribute("data-ln-toast-item",""),m.classList.add("ln-enter");const g=m.querySelector(".body");g&&u(g,c);const y=m.querySelector("[data-ln-toast-close]");return y&&y.addEventListener("click",function(){w(m)}),m}function u(c,d){if(Array.isArray(d.message)){const f=document.createElement("ul");for(const p of d.message){const m=document.createElement("li");m.textContent=p,f.appendChild(m)}c.appendChild(f)}if(d.data&&d.data.errors){const f=document.createElement("ul");for(const p of Object.values(d.data.errors).flat()){const m=document.createElement("li");m.textContent=p,f.appendChild(m)}c.appendChild(f)}}function h(c,d){const f=Array.from(c.dom.querySelectorAll("[data-ln-toast-item]"));for(;f.length>=c.max&&f.length>0;)c.dom.removeChild(f.shift());c.dom.appendChild(d),s(c.dom),requestAnimationFrame(()=>d.classList.remove("ln-enter"))}function w(c){if(!c||!c.parentNode)return;const d=c.parentNode;clearTimeout(c._timer),c.classList.remove("ln-enter"),c.classList.add("ln-out"),setTimeout(()=>{c.parentNode&&(c.parentNode.removeChild(c),i(d))},200)}function b(c){let d=c&&c.container;return typeof d=="string"&&(d=document.querySelector(d)),d instanceof HTMLElement||(d=document.querySelector("["+e+"]")||document.getElementById("ln-toast-container")),d||null}function D(c,d){if(c._lnToastHydrated)return;c._lnToastHydrated=!0;const f=c.querySelector("[data-ln-toast-close]");f&&f.addEventListener("click",function(){w(c)});const p=+(c.getAttribute("data-ln-toast-timeout")??d.timeoutDefault);p>0&&(c._timer=setTimeout(function(){w(c)},p))}function I(c){const d=c.detail||{},f=b(d);if(!f){console.warn("[ln-toast] No toast container found");return}(f[t]||(f[t]=new a(f))).enqueue(d)}function C(c){const d=c&&c.detail||{};if(d.container){const f=b(d);f&&(f[t]||(f[t]=new a(f))).clear()}else{const f=document.querySelectorAll("["+e+"]");for(const p of Array.from(f))(p[t]||(p[t]=new a(p))).clear()}}A(function(){window.addEventListener("ln-toast:enqueue",I),window.addEventListener("ln-toast:clear",C),window.addEventListener("ln-modal:open",function(){const c=document.querySelectorAll("["+e+"], #ln-toast-container");for(const d of Array.from(c))d.querySelectorAll("[data-ln-toast-item]").length>0&&s(d)})},"ln-toast"),ee(e,t,a,"ln-toast",{attributes:n})})()})();
1
+ (function(){"use strict";function B(){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 S(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(!S(r))return}e.apply(console,t)}}function re(e,t,o){const r=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}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()}function ie(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function le(e,t){const o=!!(t&&t.typed),r=t&&t.exclude,l={},s=e.elements,i={};if(o)for(let c=0;c<s.length;c++){const n=s[c];n.name&&n.type==="checkbox"&&!n.disabled&&(i[n.name]=(i[n.name]||0)+1)}for(let c=0;c<s.length;c++){const n=s[c];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(r&&n.matches&&n.matches(r)))if(n.type==="checkbox")o&&i[n.name]===1?l[n.name]=n.checked:(l[n.name]||(l[n.name]=[]),n.checked&&l[n.name].push(n.value));else if(n.type==="radio")n.checked&&(l[n.name]=n.value);else if(n.type==="select-multiple"){l[n.name]=[];for(let u=0;u<n.options.length;u++)n.options[u].selected&&l[n.name].push(n.options[u].value)}else if(o&&n.type==="hidden")l[n.name]=n.value;else if(o&&(n.type==="number"||n.type==="range")){const u=Number(n.value);l[n.name]=n.value===""||isNaN(u)?null:u}else l[n.name]=n.value}return l}function se(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ce(e,t){const o=e.elements,r=[],l={};for(let s=0;s<o.length;s++){const i=o[s];i.name&&i.type==="checkbox"&&(l[i.name]=(l[i.name]||0)+1)}for(let s=0;s<o.length;s++){const i=o[s];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const c=i.getAttribute("data-ln-fill-as")||i.name;if(!c||!(c in t))continue;const n=t[c];if(i.type==="checkbox"){if(Array.isArray(n))i.checked=n.indexOf(i.value)!==-1;else if(l[i.name]>1){const u=String(n).split(",").map(function(h){return h.trim()});i.checked=u.indexOf(i.value)!==-1}else i.checked=se(n);r.push(i)}else if(i.type==="radio")i.checked=i.value===String(n),r.push(i);else if(i.type==="select-multiple"){if(Array.isArray(n))for(let u=0;u<i.options.length;u++)i.options[u].selected=n.indexOf(i.options[u].value)!==-1;r.push(i)}else i.value=n,i.tagName==="SELECT"&&n!=null&&i.setAttribute("data-ln-value",n),r.push(i)}return r}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ce,window.lnCore.serializeForm=le,window.lnCore.resolveFormMethod=ie);const j={};function ae(e,t){j[e]=t}function ue(e){return j[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ae,window.lnCore.getDataMapper=ue);function de(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,A(function(){new MutationObserver(function(){re(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const W={};function fe(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];W[o]=t}function we(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return W[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=fe,window.lnCore.getLocaleFallback=we,window.lnCore.ensureLocaleObserver=de);const k={};function H(e,t){k[e]||(k[e]=document.querySelector('[data-ln-template="'+e+'"]'));const o=k[e];return o?o.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function he(e,t,o){if(e){const r=e.querySelector('[data-ln-template="'+t+'"]');if(r)return r.content.cloneNode(!0)}return H(t,o)}function E(e,t){if(!e||!t)return e;const o=e.querySelectorAll("[data-ln-field]");for(let i=0;i<o.length;i++){const c=o[i],n=c.getAttribute("data-ln-field");t[n]!=null&&(c.textContent=t[n])}const r=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<r.length;i++){const c=r[i],n=c.getAttribute("data-ln-attr").split(",");for(let u=0;u<n.length;u++){const h=n[u].trim().split(":");if(h.length!==2)continue;const w=h[0].trim(),b=h[1].trim();t[b]!=null&&c.setAttribute(w,t[b])}}const l=e.querySelectorAll("[data-ln-show]");for(let i=0;i<l.length;i++){const c=l[i],n=c.getAttribute("data-ln-show");n in t&&c.classList.toggle("hidden",!t[n])}const s=e.querySelectorAll("[data-ln-class]");for(let i=0;i<s.length;i++){const c=s[i],n=c.getAttribute("data-ln-class").split(",");for(let u=0;u<n.length;u++){const h=n[u].trim().split(":");if(h.length!==2)continue;const w=h[0].trim(),b=h[1].trim();b in t&&c.classList.toggle(w,!!t[b])}}return e}function pe(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 o=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<o.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",o[r],t??null),o[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)E(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let o=0;o<t.length;o++)t[o].textContent=""}})));function U(e,t){if(!e||!t)return e;const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const s=o.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,c){return t[c]!==void 0?t[c]:""}))}const r=function(s,i){return t[i]!==void 0?t[i]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let s=0;s<l.length;s++){const i=l[s],c=i.attributes;for(let n=0;n<c.length;n++){const u=c[n];u.value.indexOf("{{")!==-1&&i.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function me(e,t,o,r,l,s){const i={};for(let n=0;n<e.children.length;n++){const u=e.children[n],h=u.getAttribute("data-ln-render-key");h&&(i[h]=u)}const c=document.createDocumentFragment();for(let n=0;n<t.length;n++){const u=t[n],h=String(r(u));let w=i[h];if(w)l(w,u,n);else{const b=H(o,s);if(!b||(U(b,u),w=b.firstElementChild,!w))continue;w.setAttribute("data-ln-render-key",h),l(w,u,n)}c.appendChild(w)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=U,window.lnCore.fill=E,window.lnCore.lnFill=pe,window.lnCore.renderList=me);function L(e,t,o){const r=e.getAttribute(t);return r===null?o:r}function x(e,t,o){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?o:r}function V(e,t,o=!1){const r=e.getAttribute(t);if(r===null)return!!o;const l=r.trim().toLowerCase();return!(l==="false"||l==="0")}function P(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const q=new Map;function Q(e,t){const o=(e?e.join("|"):"")+"::"+t;if(q.has(o))return q.get(o);const r=new Set(e||[]),l=function(s,i){const c=s.getAttribute(i);return c!==null&&r.has(c)?c:t};return q.set(o,l),l}function J(e,t,o){const r=parseFloat(e.getAttribute(t));return isNaN(r)?o:r}function K(e,t,o){const r=e.getAttribute(t);if(!r)return o;try{return JSON.parse(r)}catch{return o}}function z(e,t,o,r,l){if(!e||t===null)return!0;const s=r||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const c=n=>{l?console.warn(n,l):console.warn(n)};if(i==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${o}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const n=e.values||[];return n.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${o}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(c(`[${s}] Value ${n} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(c(`[${s}] Value ${n} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(n){return c(`[${s}] Invalid JSON for attribute "${o}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function G(e,t,o){for(const r in o){const[l,s,i]=o[r];Object.defineProperty(e,r,{get:function(){return l(t,s,i)},enumerable:!0,configurable:!0})}return e}function X(e){const t={};for(const o in e){const r=e[o];if(!r||!r.prop)continue;let l=r.read;if(!l&&r.type)switch(r.type){case"enum":l=Q(r.values,r.fallback);break;case"integer":l=x;break;case"float":l=J;break;case"boolean":l=V;break;case"list":l=P;break;case"json":l=K;break;case"string":default:l=L;break}l||(l=L),t[r.prop]=[l,o,r.fallback]}return t}function be(e){const t={};for(const o in e){const r=e[o];r&&r.effect&&(t[o]=r.effect)}return Object.keys(t).length?t:null}function ge(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const o in e.effects)t.add(o);if(e.onAttrChange&&e.declared)for(const o of e.declared)t.add(o);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=G,window.lnCore.attrSpec=X,window.lnCore.attrStr=L,window.lnCore.attrInt=x,window.lnCore.attrBool=V,window.lnCore.attrList=P,window.lnCore.attrEnum=Q,window.lnCore.attrFloat=J,window.lnCore.attrJson=K);function v(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(o){console.error("["+t.attribute+"] init failed",e,o)}}}function Y(e,t,o,r){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:o,ComponentFn:r};if(e.matches&&e.matches(s)&&v(e,i),e.querySelectorAll){const c=e.querySelectorAll(s);for(let n=0;n<c.length;n++)v(c[n],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function ye(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Ce(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 Z(){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 Ae(e){const t=Z(),o=e.observed||[];for(let r=0;r<o.length;r++){const l=o[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(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=ge(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 ee(e,t,o,r){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const i=s.effects&&s.effects[o];i?i(t,o,r):s.onAttrChange&&(!s.declared||s.declared.has(o))&&s.onAttrChange(t,o,r)}}function ve(e){const t=e.attributeName,o=t.indexOf("data-ln-")===0,r=Z(),l=r.byAttr.get(t),s=B()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(t);if(!o&&!l&&!s)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(s&&S(i)){const c=r.byDeclaredAttr.get(t),n=i.getAttribute(t);for(let u=0;u<c.length;u++)z(c[u].spec,n,t,c[u].componentTag,i)}if(window.lnCore._debugSink&&(o||l)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),o){const c=r.byReactive.get(t);c&&ee(c,i,t,e.oldValue),r.reactiveWildcard.length&&ee(r.reactiveWildcard,i,t,e.oldValue)}if(l)for(let c=0;c<l.length;c++){const n=l[c];if(n.handler){n.handler(i,t,e.oldValue);continue}n.onAttributeChange&&i[n.attribute]?n.onAttributeChange(i,t):(Y(i,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(i))}}}function _e(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,A(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{ve(t[o])}catch(r){console.error("[ln-core] mutation handler failed",t[o].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function T(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function O(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function D(e,t){if(!document.contains(e))if(t.attribute){const o=e[t.attribute];if(o&&typeof o.destroy=="function")try{o.destroy()}catch(r){console.error("["+t.attribute+"] destroy failed",e,r)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function xe(e){const t=T();if(!t.length)return;const o=e.target;if(o){const l=o.nodeType===1?o:o.parentElement;if(l&&(l.isContentEditable||l.closest&&l.closest('[contenteditable]:not([contenteditable="false"])')))return}const r=O();if(e.target&&r.length)for(let l=0;l<r.length;l++){const s=r[l],i=s.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(i)?e.target:e.target.closest?e.target.closest(i):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(i):null;c&&s.onSubtreeChange(c,e)}for(let l=0;l<e.addedNodes.length;l++){const s=e.addedNodes[l];if(s.nodeType===1){const i=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const n=t[c];if(n.selector&&n.attribute&&n.ComponentFn){if(!i)s.matches&&s.matches(n.query)&&v(s,n);else if(s.matches&&s.matches(n.query)&&v(s,n),s.querySelectorAll){const u=s.querySelectorAll(n.query);for(let h=0;h<u.length;h++)v(u[h],n)}}n.onInit&&n.onInit(s)}}}for(let l=0;l<e.removedNodes.length;l++){const s=e.removedNodes[l];if(s.nodeType===1){const i=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const n=t[c],u=n.query;if(u){if(!i)s.matches&&s.matches(u)&&D(s,n);else if(s.matches&&s.matches(u)&&D(s,n),s.querySelectorAll){const h=s.querySelectorAll(u);for(let w=0;w<h.length;w++)D(h[w],n)}}}}}}function te(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,A(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++){const r=t[o];if(r.type==="childList")try{xe(r)}catch(l){console.error("[ln-core] lifecycle handler failed",r.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Se(e){T().push(e),e.onSubtreeChange&&e.query&&O().push(e),te()}function ne(e,t,o,r,l={}){const s=l.extraAttributes||[],i=l.onAttributeChange||null,c=l.onSubtreeChange||null,n=l.onInit||null,u=l.onAttrChange||null,h=l.effects||null,w=l.attributes||null,b=w?be(w):h,N=w?new Set(Object.keys(w)):null,F=l.persist||null;function y(C){const g=C||document.body;if(Y(g,e,t,o),w&&B())for(const _ in w){const Fe=w[_],$=Array.from(g.querySelectorAll("["+_+"]"));g.matches&&g.matches("["+_+"]")&&$.push(g);for(let M=0;M<$.length;M++){const R=$[M];S(R)&&z(Fe,R.getAttribute(_),_,r,R)}}n&&n(g)}const a=[];if(e.indexOf("[")!==-1){const C=/\[([\w-]+)/g;let g;for(;(g=C.exec(e))!==null;)a.push(g[1])}else a.push(e);Ae({selector:e,attribute:t,componentTag:r,attributes:w,ComponentFn:o,onInit:n,observed:a.concat(s),onAttributeChange:i,onAttrChange:u,effects:b,declared:N,persist:F}),_e();const d=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,f=l.subtreeQuery||(d?e:"["+e+"]"),p={selector:e,attribute:t,ComponentFn:o,onInit:n,onSubtreeChange:c,query:f};T().push(p),c&&f&&O().push(p),te(),window[t]=y,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ne,window.lnCore.observeLifecycle=Se);function m(){ye()>0?Ce(function(){y(document.body)}):y(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",m):m(),y}function oe(e){return(e||"").replace(/^#/,"")}function I(e){const t=e===void 0?location.hash:e,o={},r=oe(t);if(!r)return o;const l=r.split("&");for(let s=0;s<l.length;s++){const i=l[s];if(!i)continue;const c=i.indexOf(":"),n=c>-1?i.slice(0,c):i,u=c>-1?i.slice(c+1):"";if(n)try{o[n]=decodeURIComponent(u)}catch{o[n]=u}}return o}function ke(e){if(!e)return null;const t=I();return e in t?t[e]:null}function Ee(e,t){if(!e)return;const o=I();t==null?delete o[e]:o[e]=String(t);const l=Object.keys(o).map(function(s){const i=o[s];return i===""?s:s+":"+encodeURIComponent(i)}).join("&");oe(location.hash)!==l&&(location.hash=l)}function Le(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function qe(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const o=e.getAttribute("data-ln-hash");if(o&&o.trim()!=="")return o.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 Te(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Oe(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 De(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ie(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const o=e.slice(0,t),r=e.slice(t+1),l=r?r.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:o,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=I,window.lnCore.hashGet=ke,window.lnCore.hashSet=Ee,window.lnCore.hashLinkClick=Le,window.lnCore.resolveHashNamespace=qe,window.lnCore.hashSortEncode=Te,window.lnCore.hashSortDecode=Oe,window.lnCore.hashFilterEncode=De,window.lnCore.hashFilterDecode=Ie);function Ne(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Ne),(function(){const e="data-ln-toast",t="lnToast",o="ln-toast-item";if(window[t]!==void 0)return;const r={"data-ln-toast":{type:"marker",description:"Initializes the toast notifications container"},"data-ln-toast-timeout":{prop:"timeoutDefault",type:"integer",read:x,fallback:6e3,min:500,description:"Default auto-dismiss timeout in ms"},"data-ln-toast-max":{prop:"max",type:"integer",read:x,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"}},l=X(r);function s(a){if(!(!a||!(a instanceof HTMLElement))&&(a.hasAttribute("popover")||a.setAttribute("popover","manual"),typeof a.showPopover=="function")){if(a.matches(":popover-open"))try{a.hidePopover()}catch{}try{a.showPopover()}catch{}}}function i(a){if(!a||!(a instanceof HTMLElement))return;if(a.querySelectorAll("[data-ln-toast-item]").length===0&&typeof a.hidePopover=="function"&&a.matches(":popover-open"))try{a.hidePopover()}catch{}}function c(a){this.dom=a,G(this,a,l);const d=Array.from(a.querySelectorAll("[data-ln-toast-item]"));for(;d.length>this.max;)a.removeChild(d.shift());for(const f of d)N(f,this);return d.length>0&&s(a),this}c.prototype.enqueue=function(a){if(!a)return;const d=n(a,this.dom);if(!d)return;const f=Number.isFinite(a.timeout)?a.timeout:this.timeoutDefault;h(this,d),f>0&&(d._timer=setTimeout(()=>w(d),f))},c.prototype.clear=function(){for(const a of Array.from(this.dom.querySelectorAll("[data-ln-toast-item]")))w(a)},c.prototype.destroy=function(){if(this.dom[t]){for(const a of Array.from(this.dom.querySelectorAll("[data-ln-toast-item]")))w(a);i(this.dom),delete this.dom[t]}};function n(a,d){const f=((a.type||"")+"").trim().toLowerCase(),p=he(d,o,"ln-toast");if(!p)return console.warn('[ln-toast] Template "'+o+'" not found'),null;E(p,{type:f,title:a.title,message:typeof a.message=="string"?a.message:void 0});const m=p.firstElementChild;if(!m)return null;m.hasAttribute("data-ln-toast-item")||m.setAttribute("data-ln-toast-item",""),m.classList.add("ln-enter");const C=m.querySelector(".body");C&&u(C,a);const g=m.querySelector("[data-ln-toast-close]");return g&&g.addEventListener("click",function(){w(m)}),m}function u(a,d){if(Array.isArray(d.message)){const f=document.createElement("ul");for(const p of d.message){const m=document.createElement("li");m.textContent=p,f.appendChild(m)}a.appendChild(f)}if(d.data&&d.data.errors){const f=document.createElement("ul");for(const p of Object.values(d.data.errors).flat()){const m=document.createElement("li");m.textContent=p,f.appendChild(m)}a.appendChild(f)}}function h(a,d){const f=Array.from(a.dom.querySelectorAll("[data-ln-toast-item]"));for(;f.length>=a.max&&f.length>0;)a.dom.removeChild(f.shift());a.dom.appendChild(d),s(a.dom),requestAnimationFrame(()=>d.classList.remove("ln-enter"))}function w(a){if(!a||!a.parentNode)return;const d=a.parentNode;clearTimeout(a._timer),a.classList.remove("ln-enter"),a.classList.add("ln-out"),setTimeout(()=>{a.parentNode&&(a.parentNode.removeChild(a),i(d))},200)}function b(a){let d=a&&a.container;return typeof d=="string"&&(d=document.querySelector(d)),d instanceof HTMLElement||(d=document.querySelector("["+e+"]")||document.getElementById("ln-toast-container")),d||null}function N(a,d){if(a._lnToastHydrated)return;a._lnToastHydrated=!0;const f=a.querySelector("[data-ln-toast-close]");f&&f.addEventListener("click",function(){w(a)});const p=+(a.getAttribute("data-ln-toast-timeout")??d.timeoutDefault);p>0&&(a._timer=setTimeout(function(){w(a)},p))}function F(a){const d=a.detail||{},f=b(d);if(!f){console.warn("[ln-toast] No toast container found");return}(f[t]||(f[t]=new c(f))).enqueue(d)}function y(a){const d=a&&a.detail||{};if(d.container){const f=b(d);f&&(f[t]||(f[t]=new c(f))).clear()}else{const f=document.querySelectorAll("["+e+"]");for(const p of Array.from(f))(p[t]||(p[t]=new c(p))).clear()}}A(function(){window.addEventListener("ln-toast:enqueue",F),window.addEventListener("ln-toast:clear",y),window.addEventListener("ln-modal:open",function(){const a=document.querySelectorAll("["+e+"], #ln-toast-container");for(const d of Array.from(a))d.querySelectorAll("[data-ln-toast-item]").length>0&&s(d)})},"ln-toast"),ne(e,t,c,"ln-toast",{attributes:r})})()})();