@livenetworks/ashlar 2.1.11 → 2.1.13

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 (76) hide show
  1. package/README.md +25 -2
  2. package/components/COMPONENTS.md +82 -78
  3. package/components/ln-accordion/ln-accordion.js +1 -1
  4. package/components/ln-ajax/ln-ajax.js +1 -1
  5. package/components/ln-api-connector/ln-api-connector.js +1 -1
  6. package/components/ln-api-queue/ln-api-queue.js +1 -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/README.md +25 -69
  12. package/components/ln-core/events.js +5 -2
  13. package/components/ln-core/index.js +1 -1
  14. package/components/ln-core/lifecycle.js +25 -44
  15. package/components/ln-core/reactive.js +0 -59
  16. package/components/ln-couchdb-connector/ln-couchdb-connector.js +1 -1
  17. package/components/ln-data-coordinator/ln-data-coordinator.js +1 -1
  18. package/components/ln-data-store/ln-data-store.js +1 -1
  19. package/components/ln-date/ln-date.js +1 -1
  20. package/components/ln-debug/ln-debug.js +1 -1
  21. package/components/ln-debug/ln-debug.schema.json +28 -28
  22. package/components/ln-debug/src/debug-verifier.js +24 -30
  23. package/components/ln-debug/src/ln-debug.js +3 -11
  24. package/components/ln-dropdown/ln-dropdown.js +1 -1
  25. package/components/ln-editor/ln-editor.js +1 -1
  26. package/components/ln-external-links/ln-external-links.js +1 -1
  27. package/components/ln-filter/ln-filter.js +1 -1
  28. package/components/ln-filter/src/ln-filter.js +3 -1
  29. package/components/ln-form/ln-form.js +1 -1
  30. package/components/ln-icon/ln-icon.js +1 -1
  31. package/components/ln-include/ln-include.js +1 -1
  32. package/components/ln-key/ln-key.js +1 -1
  33. package/components/ln-link/ln-link.js +1 -1
  34. package/components/ln-list/ln-list.js +1 -1
  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-obfuscator/ln-obfuscator.js +1 -1
  39. package/components/ln-options/ln-options.js +1 -1
  40. package/components/ln-persist/ln-persist.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-progress/ln-progress.js +1 -1
  44. package/components/ln-router/ln-router.js +1 -1
  45. package/components/ln-scroll/ln-scroll.js +1 -1
  46. package/components/ln-search/ln-search.js +1 -1
  47. package/components/ln-slug/ln-slug.js +1 -1
  48. package/components/ln-sort/ln-sort.js +1 -1
  49. package/components/ln-sortable/ln-sortable.js +1 -1
  50. package/components/ln-stat/ln-stat.js +1 -1
  51. package/components/ln-table/ln-table.js +1 -1
  52. package/components/ln-table-coordinator/ln-table-coordinator.js +1 -1
  53. package/components/ln-tabs/ln-tabs.js +1 -1
  54. package/components/ln-time/ln-time.js +1 -1
  55. package/components/ln-toast/ln-toast.js +1 -1
  56. package/components/ln-toggle/ln-toggle.js +1 -1
  57. package/components/ln-tooltip/ln-tooltip.js +1 -1
  58. package/components/ln-translations/ln-translations.js +1 -1
  59. package/components/ln-ui-coordinator/ln-ui-coordinator.js +1 -1
  60. package/components/ln-upload/ln-upload.js +1 -1
  61. package/components/ln-validate/ln-validate.js +1 -1
  62. package/components/ln-websocket-connector/ln-websocket-connector.js +1 -1
  63. package/package.json +95 -85
  64. package/theme/README.md +73 -0
  65. package/theme/components/_table.scss +1 -2
  66. package/theme/config/_density.scss +104 -191
  67. package/theme/config/mixins/_avatar.scss +2 -2
  68. package/theme/config/mixins/_card.scss +2 -5
  69. package/theme/config/mixins/_form.scss +26 -39
  70. package/theme/config/mixins/_nav.scss +4 -4
  71. package/theme/config/mixins/_spacing.scss +4 -4
  72. package/theme/config/mixins/_table.scss +9 -33
  73. package/theme/tailwind/components.css +1661 -0
  74. package/theme/tailwind/entry.css +3 -0
  75. package/theme/tailwind/theme.css +23 -0
  76. package/web-types.json +1 -1
@@ -1 +1 @@
1
- (function(){"use strict";function P(){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 F(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 l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){o=t[l];break}if(!F(o))return}e.apply(console,t)}}function O(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function 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 fe(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function he(e,t){const n=!!(t&&t.typed),o=t&&t.exclude,l={},s=e.elements,i={};if(n)for(let c=0;c<s.length;c++){const r=s[c];r.name&&r.type==="checkbox"&&!r.disabled&&(i[r.name]=(i[r.name]||0)+1)}for(let c=0;c<s.length;c++){const r=s[c];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(o&&r.matches&&r.matches(o)))if(r.type==="checkbox")n&&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 a=0;a<r.options.length;a++)r.options[a].selected&&l[r.name].push(r.options[a].value)}else if(n&&r.type==="hidden")l[r.name]=r.value;else if(n&&(r.type==="number"||r.type==="range")){const a=Number(r.value);l[r.name]=r.value===""||isNaN(a)?null:a}else l[r.name]=r.value}return l}function we(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function pe(e,t){const n=e.elements,o=[],l={};for(let s=0;s<n.length;s++){const i=n[s];i.name&&i.type==="checkbox"&&(l[i.name]=(l[i.name]||0)+1)}for(let s=0;s<n.length;s++){const i=n[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 r=t[c];if(i.type==="checkbox"){if(Array.isArray(r))i.checked=r.indexOf(i.value)!==-1;else if(l[i.name]>1){const a=String(r).split(",").map(function(u){return u.trim()});i.checked=a.indexOf(i.value)!==-1}else i.checked=we(r);o.push(i)}else if(i.type==="radio")i.checked=i.value===String(r),o.push(i);else if(i.type==="select-multiple"){if(Array.isArray(r))for(let a=0;a<i.options.length;a++)i.options[a].selected=r.indexOf(i.options[a].value)!==-1;o.push(i)}else i.value=r,i.tagName==="SELECT"&&r!=null&&i.setAttribute("data-ln-value",r),o.push(i)}return o}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=pe,window.lnCore.serializeForm=he,window.lnCore.resolveFormMethod=fe);const V={};function me(e,t){V[e]=t}function ge(e){return V[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=me,window.lnCore.getDataMapper=ge);function H(e){const t=e?e.closest("[lang]"):null,n=(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 n?n.trim():"en-US"}function be(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,L(function(){new MutationObserver(function(){O(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const Q={};function ye(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];Q[n]=t}function Ce(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=ye,window.lnCore.getLocaleFallback=Ce,window.lnCore.ensureLocaleObserver=be);const N={};function G(e,t){N[e]||(N[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=N[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function Ae(e,t,n){if(e){const o=e.querySelector('[data-ln-template="'+t+'"]');if(o)return o.content.cloneNode(!0)}return G(t,n)}function K(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let i=0;i<n.length;i++){const c=n[i],r=c.getAttribute("data-ln-field");t[r]!=null&&(c.textContent=t[r])}const o=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<o.length;i++){const c=o[i],r=c.getAttribute("data-ln-attr").split(",");for(let a=0;a<r.length;a++){const u=r[a].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();t[f]!=null&&c.setAttribute(d,t[f])}}const l=e.querySelectorAll("[data-ln-show]");for(let i=0;i<l.length;i++){const c=l[i],r=c.getAttribute("data-ln-show");r in t&&c.classList.toggle("hidden",!t[r])}const s=e.querySelectorAll("[data-ln-class]");for(let i=0;i<s.length;i++){const c=s[i],r=c.getAttribute("data-ln-class").split(",");for(let a=0;a<r.length;a++){const u=r[a].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();f in t&&c.classList.toggle(d,!!t[f])}}return e}function xe(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let o=0;o<n.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[o],t??null),n[o].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)K(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function I(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.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 o=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 r=0;r<c.length;r++){const a=c[r];a.value.indexOf("{{")!==-1&&i.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function _e(e,t,n,o,l,s){const i={};for(let r=0;r<e.children.length;r++){const a=e.children[r],u=a.getAttribute("data-ln-render-key");u&&(i[u]=a)}const c=document.createDocumentFragment();for(let r=0;r<t.length;r++){const a=t[r],u=String(o(a));let d=i[u];if(d)l(d,a,r);else{const f=G(n,s);if(!f||(I(f,a),d=f.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",u),l(d,a,r)}c.appendChild(d)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=I,window.lnCore.fill=K,window.lnCore.lnFill=xe,window.lnCore.renderList=_e);function q(e,t,n){const o=e.getAttribute(t);return o===null?n:o}function z(e,t,n){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?n:o}function J(e,t,n=!1){const o=e.getAttribute(t);if(o===null)return!!n;const l=o.trim().toLowerCase();return!(l==="false"||l==="0")}function Y(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const R=new Map;function X(e,t){const n=(e?e.join("|"):"")+"::"+t;if(R.has(n))return R.get(n);const o=new Set(e||[]),l=function(s,i){const c=s.getAttribute(i);return c!==null&&o.has(c)?c:t};return R.set(n,l),l}function Z(e,t,n){const o=parseFloat(e.getAttribute(t));return isNaN(o)?n:o}function ee(e,t,n){const o=e.getAttribute(t);if(!o)return n;try{return JSON.parse(o)}catch{return n}}function te(e,t,n,o,l){if(!e||t===null)return!0;const s=o||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const c=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"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const r=e.values||[];return r.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(c(`[${s}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(c(`[${s}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(r){return c(`[${s}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function ne(e,t,n){for(const o in n){const[l,s,i]=n[o];Object.defineProperty(e,o,{get:function(){return l(t,s,i)},enumerable:!0,configurable:!0})}return e}function re(e){const t={};for(const n in e){const o=e[n];if(!o||!o.prop)continue;let l=o.read;if(!l&&o.type)switch(o.type){case"enum":l=X(o.values,o.fallback);break;case"integer":l=z;break;case"float":l=Z;break;case"boolean":l=J;break;case"list":l=Y;break;case"json":l=ee;break;case"string":default:l=q;break}l||(l=q),t[o.prop]=[l,n,o.fallback]}return t}function Se(e){const t={};for(const n in e){const o=e[n];o&&o.effect&&(t[n]=o.effect)}return Object.keys(t).length?t:null}function ve(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=ne,window.lnCore.attrSpec=re,window.lnCore.attrStr=q,window.lnCore.attrInt=z,window.lnCore.attrBool=J,window.lnCore.attrList=Y,window.lnCore.attrEnum=X,window.lnCore.attrFloat=Z,window.lnCore.attrJson=ee);function _(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(n){console.error("["+t.attribute+"] init failed",e,n)}}}function oe(e,t,n,o){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:n,ComponentFn:o};if(e.matches&&e.matches(s)&&_(e,i),e.querySelectorAll){const c=e.querySelectorAll(s);for(let r=0;r<c.length;r++)_(c[r],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function ke(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Le(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 ie(){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 qe(e){const t=ie(),n=e.observed||[];for(let o=0;o<n.length;o++){const l=n[o];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 o in e.attributes){t.byDeclaredAttr.has(o)||t.byDeclaredAttr.set(o,[]);const l=t.byDeclaredAttr.get(o);l.some(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=ve(e);if(o===null)t.reactiveWildcard.push(e);else for(const l of o)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function le(e,t,n,o){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const i=s.effects&&s.effects[n];i?i(t,n,o):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,o)}}function Ee(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,o=ie(),l=o.byAttr.get(t),s=P()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(t);if(!n&&!l&&!s)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(s&&F(i)){const c=o.byDeclaredAttr.get(t),r=i.getAttribute(t);for(let a=0;a<c.length;a++)te(c[a].spec,r,t,c[a].componentTag,i)}if(window.lnCore._debugSink&&(n||l)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),n){const c=o.byReactive.get(t);c&&le(c,i,t,e.oldValue),o.reactiveWildcard.length&&le(o.reactiveWildcard,i,t,e.oldValue)}if(l)for(let c=0;c<l.length;c++){const r=l[c];if(r.handler){r.handler(i,t,e.oldValue);continue}r.onAttributeChange&&i[r.attribute]?r.onAttributeChange(i,t):(oe(i,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(i))}}}function De(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,L(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Ee(t[n])}catch(o){console.error("[ln-core] mutation handler failed",t[n].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function M(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function T(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function B(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(o){console.error("["+t.attribute+"] destroy failed",e,o)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function se(e){const t=M();if(!t.length)return;const n=e.target;if(n){const l=n.nodeType===1?n:n.parentElement;if(l&&(l.isContentEditable||l.closest&&l.closest('[contenteditable]:not([contenteditable="false"])')))return}const o=T();if(e.target&&o.length)for(let l=0;l<o.length;l++){const s=o[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 r=t[c];if(r.selector&&r.attribute&&r.ComponentFn){if(!i)s.matches&&s.matches(r.query)&&_(s,r);else if(s.matches&&s.matches(r.query)&&_(s,r),s.querySelectorAll){const a=s.querySelectorAll(r.query);for(let u=0;u<a.length;u++)_(a[u],r)}}r.onInit&&r.onInit(s)}}}for(let l=0;l<e.removedNodes.length;l++){const s=e.removedNodes[l];if(s.nodeType===1){if(document.contains(s))continue;const i=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const r=t[c],a=r.query;if(a){if(!i)s.matches&&s.matches(a)&&B(s,r);else if(s.matches&&s.matches(a)&&B(s,r),s.querySelectorAll){const u=s.querySelectorAll(a);for(let d=0;d<u.length;d++)B(u[d],r)}}}}}}function ae(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,L(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const o=t[n];if(o.type==="childList")try{se(o)}catch(l){console.error("[ln-core] lifecycle handler failed",o.target,l)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Fe(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const n=t.takeRecords();for(let o=0;o<n.length;o++){const l=n[o];if(l.type==="childList")try{se(l)}catch(s){console.error("[ln-core] lifecycle handler failed",l.target,s)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function Oe(e){M().push(e),e.onSubtreeChange&&e.query&&T().push(e),ae()}function ce(e,t,n,o,l={}){const s=l.extraAttributes||[],i=l.onAttributeChange||null,c=l.onSubtreeChange||null,r=l.onInit||null,a=l.onAttrChange||null,u=l.effects||null,d=l.attributes||null,f=d?Se(d):u,S=d?new Set(Object.keys(d)):null,C=l.persist||null;function m(w){const p=w||document.body;if(oe(p,e,t,n),d&&P())for(const b in d){const D=d[b],j=Array.from(p.querySelectorAll("["+b+"]"));p.matches&&p.matches("["+b+"]")&&j.push(p);for(let U=0;U<j.length;U++){const W=j[U];F(W)&&te(D,W.getAttribute(b),b,o,W)}}r&&r(p)}const A=[];if(e.indexOf("[")!==-1){const w=/\[([\w-]+)/g;let p;for(;(p=w.exec(e))!==null;)A.push(p[1])}else A.push(e);qe({selector:e,attribute:t,componentTag:o,attributes:d,ComponentFn:n,onInit:r,observed:A.concat(s),onAttributeChange:i,onAttrChange:a,effects:f,declared:S,persist:C}),De();const g=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,v=l.subtreeQuery||(g?e:"["+e+"]"),k={selector:e,attribute:t,ComponentFn:n,onInit:r,onSubtreeChange:c,query:v};M().push(k),c&&v&&T().push(k),ae(),window[t]=m,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ce,window.lnCore.observeLifecycle=Oe,window.lnCore.withoutLifecycle=Fe);function h(){ke()>0?Le(function(){m(document.body)}):m(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",h):h(),m}function ue(e){return(e||"").replace(/^#/,"")}function $(e){const t=e===void 0?location.hash:e,n={},o=ue(t);if(!o)return n;const l=o.split("&");for(let s=0;s<l.length;s++){const i=l[s];if(!i)continue;const c=i.indexOf(":"),r=c>-1?i.slice(0,c):i,a=c>-1?i.slice(c+1):"";if(r)try{n[r]=decodeURIComponent(a)}catch{n[r]=a}}return n}function Ne(e){if(!e)return null;const t=$();return e in t?t[e]:null}function Ie(e,t){if(!e)return;const n=$();t==null?delete n[e]:n[e]=String(t);const l=Object.keys(n).map(function(s){const i=n[s];return i===""?s:s+":"+encodeURIComponent(i)}).join("&");ue(location.hash)!==l&&(location.hash=l)}function Re(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Me(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"-"+t:o:t||null}function Te(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Be(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 $e(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function je(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),o=e.slice(t+1),l=o?o.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=$,window.lnCore.hashGet=Ne,window.lnCore.hashSet=Ie,window.lnCore.hashLinkClick=Re,window.lnCore.resolveHashNamespace=Me,window.lnCore.hashSortEncode=Te,window.lnCore.hashSortDecode=Be,window.lnCore.hashFilterEncode=$e,window.lnCore.hashFilterDecode=je);function Ue(e){return(e||"").replace(/^\?/,"")}function We(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},o=Ue(t);if(!o)return n;const l=new URLSearchParams(o);for(const[s,i]of l.entries())n[s]=i;return n}function Pe(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function Ve(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const o=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",o)}function He(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");if(n&&n.trim()!=="")return n.trim();const o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"_"+t:o:t||null}function Qe(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Ge(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const o=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:o}}}return null}function Ke(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function ze(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=We,window.lnCore.queryGet=Pe,window.lnCore.querySet=Ve,window.lnCore.resolveQueryParam=He,window.lnCore.querySortEncode=Qe,window.lnCore.querySortDecode=Ge,window.lnCore.queryFilterEncode=Ke,window.lnCore.queryFilterDecode=ze);function Je(){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=Je);const y={};function Ye(e){const t=e||"default";if(!y[t]){const n=new Intl.NumberFormat(e,{useGrouping:!0}),o=n.formatToParts(1234.5);let l="",s=".";for(let i=0;i<o.length;i++)o[i].type==="group"&&(l=o[i].value),o[i].type==="decimal"&&(s=o[i].value);y[t]={groupSep:l,decimalSep:s,fmt:n}}return y[t]}function E(e,t,n={}){if(typeof e!="number"||isNaN(e)||!Number.isFinite(e))return"";const o=t||"default",l=n.maxDecimals!=null?parseInt(n.maxDecimals,10):null,s=n.userDecimals!=null?n.userDecimals:null;if(l!==null){const i=o+"|max:"+l;return y[i]||(y[i]=new Intl.NumberFormat(t,{useGrouping:!0,minimumFractionDigits:0,maximumFractionDigits:l})),y[i].format(e)}if(s!==null&&s>0){const i=o+"|exact:"+s;return y[i]||(y[i]=new Intl.NumberFormat(t,{useGrouping:!0,minimumFractionDigits:s,maximumFractionDigits:s})),y[i].format(e)}return Ye(t).fmt.format(e)}function de(e){if(e==null||e==="")return null;const t=Number(e);return Number.isFinite(t)?t:null}function x(e){return String(Math.round(e*1e3)/1e3)}function Xe(e,t,n){const o=de(e);return o===null||o<0?0:Math.min(o,Math.min(t,n)/2)}function Ze(e){if(typeof e!="string")return null;const t=e.trim().split(/[\s,]+/).map(Number);return t.length!==4||t.some(n=>!Number.isFinite(n))||t[2]<=0||t[3]<=0?null:{x:t[0],y:t[1],width:t[2],height:t[3]}}function et(e){if(!e||typeof e!="string")return null;const t=e.split(":"),n=t[0].trim();return n?{field:n,direction:t[1]&&t[1].trim().toLowerCase()==="desc"?"desc":"asc"}:null}function tt(e,t){t=t||{};const n=t.viewBox||{x:0,y:0,width:1e3,height:320},o=t.xField||"label",l=t.yField||"value",s=t.includeZero!==!1,i=Xe(t.padding,n.width,n.height),c=Array.isArray(e)?e:[],r=[];for(let h=0;h<c.length;h++){const w=c[h]||{},p=de(w[l]);p!==null&&r.push({record:w,sourceIndex:h,label:w[o]==null?String(h+1):String(w[o]),value:p})}if(r.length===0)return{points:[],linePoints:"",areaPoints:"",count:0,min:null,max:null,domainMin:0,domainMax:1,baselineY:n.y+n.height-i};let a=r[0].value,u=r[0].value;for(let h=1;h<r.length;h++)r[h].value<a&&(a=r[h].value),r[h].value>u&&(u=r[h].value);let d=a,f=u;s&&(d=Math.min(0,d),f=Math.max(0,f)),d===f&&(f===0?f=1:f>0?d=0:f=0);const S=Math.max(1,n.width-i*2),C=Math.max(1,n.height-i*2),m=f-d,A=n.y+n.height-i-(0-d)/m*C,g=[];for(let h=0;h<r.length;h++){const w=r[h],p=r.length===1?.5:h/(r.length-1),b=n.x+i+p*S,D=n.y+n.height-i-(w.value-d)/m*C;g.push({record:w.record,sourceIndex:w.sourceIndex,label:w.label,value:w.value,x:b,y:D,pointString:x(b)+","+x(D)})}const v=g.map(h=>h.pointString).join(" ");let k="";if(g.length>0){const h=g[0],w=g[g.length-1],p=x(h.x)+","+x(A),b=x(w.x)+","+x(A);k=p+" "+v+" "+b}return{points:g,linePoints:v,areaPoints:k,count:g.length,min:a,max:u,domainMin:d,domainMax:f,baselineY:A}}(function(){const e="data-ln-chart",t="lnChart",n={x:0,y:0,width:1e3,height:320};if(window[t]!==void 0)return;function o(a){const u=a[t];u&&u.requestData()}function l(a){const u=a[t];u&&u._render()}const s={"data-ln-chart":{prop:"name",type:"string",read:q,fallback:"",effect:l,description:"Chart instance name or identifier"},"data-ln-chart-source":{type:"string",effect:o,description:"Source store or coordinator identifier"},"data-ln-chart-sort":{type:"string",effect:o,description:"Field name to sort chart series data by"},"data-ln-chart-type":{type:"enum",values:["line","bar","area","scatter"],fallback:"line",effect:l,description:"Visual chart render type"},"data-ln-chart-x":{type:"string",effect:l,description:"Field name mapping to X axis"},"data-ln-chart-y":{type:"string",effect:l,description:"Field name mapping to Y axis"},"data-ln-chart-padding":{type:"integer",fallback:20,min:0,effect:l,description:"Internal plot padding in pixels"},"data-ln-chart-zero":{type:"boolean",effect:l,description:"Forces Y axis scale to start at zero"}},i=re(s);function c(a,u){a&&(a.textContent=u)}function r(a){this.dom=a,ne(this,a,i),this.source=a.getAttribute("data-ln-chart-source")||this.name,this.plot=a.querySelector("[data-ln-chart-plot]"),this.line=a.querySelector("[data-ln-chart-line]"),this.area=a.querySelector("[data-ln-chart-area]"),this.labels=a.querySelector("[data-ln-chart-labels]"),this.empty=a.querySelector("[data-ln-chart-empty]"),this.minimum=a.querySelector("[data-ln-chart-min]"),this.maximum=a.querySelector("[data-ln-chart-max]"),this.count=a.querySelector("[data-ln-chart-count]"),this._data=[],this.model=null,this.isLoaded=!1;const u=this;return this._onSetData=function(d){const f=d.detail||{};u._data=Array.isArray(f.data)?f.data:[],u.isLoaded=!0,u._setLoading(!1),u._render()},this._onSetLoading=function(d){u._setLoading(!!(d.detail&&d.detail.loading))},this._onRefresh=function(){u.requestData()},a.addEventListener("ln-chart:set-data",this._onSetData),a.addEventListener("ln-chart:set-loading",this._onSetLoading),a.addEventListener("ln-chart:request-refresh",this._onRefresh),this.requestData(),this}r.prototype._readOptions=function(){const a=this.dom.getAttribute("data-ln-chart-padding"),u=a===null?NaN:Number(a),d=(this.dom.getAttribute("data-ln-chart-type")||"line").toLowerCase();return{xField:this.dom.getAttribute("data-ln-chart-x")||"label",yField:this.dom.getAttribute("data-ln-chart-y")||"value",includeZero:this.dom.getAttribute("data-ln-chart-zero")!=="false",padding:Number.isFinite(u)&&u>=0?u:16,type:d==="area"||d==="polygon"?"area":"line",viewBox:this.plot&&Ze(this.plot.getAttribute("viewBox"))||n}},r.prototype._setLoading=function(a){this.dom.classList.toggle("ln-chart--loading",a),this.dom.setAttribute("aria-busy",a?"true":"false")},r.prototype._renderLabels=function(a){if(!this.labels||(this.labels.replaceChildren(),a.count===0))return;const u=this.name+"-label",d='[data-ln-template="'+u+'"]';if(!this.dom.querySelector(d)&&!document.querySelector(d))return;const f=Ae(this.dom,u,"ln-chart");if(!f)return;const S=H(this.dom);for(const C of a.points){const m=f.cloneNode(!0);I(m,{label:C.label,value:E(C.value,S)}),this.labels.appendChild(m)}},r.prototype._render=function(){const a=this._readOptions(),u=tt(this._data,a);this.model=u,this.line&&(this.line.setAttribute("points",u.linePoints),this.line.toggleAttribute("hidden",u.count===0)),this.area&&(this.area.setAttribute("points",u.areaPoints),this.area.toggleAttribute("hidden",u.count===0||a.type!=="area"));const d=u.count===0;this.dom.classList.toggle("ln-chart--empty",d),this.empty&&this.empty.toggleAttribute("hidden",!d);const f=H(this.dom);c(this.minimum,E(u.min,f)),c(this.maximum,E(u.max,f)),c(this.count,E(u.count,f)),this._renderLabels(u),O(this.dom,"ln-chart:rendered",{chart:this.name,count:u.count,min:u.min,max:u.max})},r.prototype.requestData=function(){this.source=this.dom.getAttribute("data-ln-chart-source")||this.name,O(this.dom,"ln-chart:request-data",{chart:this.name,source:this.source,sort:et(this.dom.getAttribute("data-ln-chart-sort")),filters:{},search:""})},r.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-chart:set-data",this._onSetData),this.dom.removeEventListener("ln-chart:set-loading",this._onSetLoading),this.dom.removeEventListener("ln-chart:request-refresh",this._onRefresh),this._data=[],this.model=null,delete this.dom[t])},ce(e,t,r,"ln-chart",{attributes:s})})()})();
1
+ (function(){"use strict";function W(){if(typeof window>"u")return!1;if(window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink)return!0;if(typeof document<"u"){if(document.documentElement&&document.documentElement.hasAttribute("data-ln-debug"))return!0;if(document.body)return document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null}return!1}function F(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 l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){o=t[l];break}if(!F(o))return}e.apply(console,t)}}function O(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function 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 fe(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function he(e,t){const n=!!(t&&t.typed),o=t&&t.exclude,l={},s=e.elements,i={};if(n)for(let c=0;c<s.length;c++){const r=s[c];r.name&&r.type==="checkbox"&&!r.disabled&&(i[r.name]=(i[r.name]||0)+1)}for(let c=0;c<s.length;c++){const r=s[c];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(o&&r.matches&&r.matches(o)))if(r.type==="checkbox")n&&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 a=0;a<r.options.length;a++)r.options[a].selected&&l[r.name].push(r.options[a].value)}else if(n&&r.type==="hidden")l[r.name]=r.value;else if(n&&(r.type==="number"||r.type==="range")){const a=Number(r.value);l[r.name]=r.value===""||isNaN(a)?null:a}else l[r.name]=r.value}return l}function we(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function pe(e,t){const n=e.elements,o=[],l={};for(let s=0;s<n.length;s++){const i=n[s];i.name&&i.type==="checkbox"&&(l[i.name]=(l[i.name]||0)+1)}for(let s=0;s<n.length;s++){const i=n[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 r=t[c];if(i.type==="checkbox"){if(Array.isArray(r))i.checked=r.indexOf(i.value)!==-1;else if(l[i.name]>1){const a=String(r).split(",").map(function(u){return u.trim()});i.checked=a.indexOf(i.value)!==-1}else i.checked=we(r);o.push(i)}else if(i.type==="radio")i.checked=i.value===String(r),o.push(i);else if(i.type==="select-multiple"){if(Array.isArray(r))for(let a=0;a<i.options.length;a++)i.options[a].selected=r.indexOf(i.options[a].value)!==-1;o.push(i)}else i.value=r,i.tagName==="SELECT"&&r!=null&&i.setAttribute("data-ln-value",r),o.push(i)}return o}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=pe,window.lnCore.serializeForm=he,window.lnCore.resolveFormMethod=fe);const P={};function me(e,t){P[e]=t}function ge(e){return P[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=me,window.lnCore.getDataMapper=ge);function V(e){const t=e?e.closest("[lang]"):null,n=(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 n?n.trim():"en-US"}function be(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,k(function(){new MutationObserver(function(){O(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const H={};function ye(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];H[n]=t}function Ce(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return H[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ye,window.lnCore.getLocaleFallback=Ce,window.lnCore.ensureLocaleObserver=be);const I={};function Q(e,t){I[e]||(I[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=I[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function Ae(e,t,n){if(e){const o=e.querySelector('[data-ln-template="'+t+'"]');if(o)return o.content.cloneNode(!0)}return Q(t,n)}function G(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let i=0;i<n.length;i++){const c=n[i],r=c.getAttribute("data-ln-field");t[r]!=null&&(c.textContent=t[r])}const o=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<o.length;i++){const c=o[i],r=c.getAttribute("data-ln-attr").split(",");for(let a=0;a<r.length;a++){const u=r[a].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();t[f]!=null&&c.setAttribute(d,t[f])}}const l=e.querySelectorAll("[data-ln-show]");for(let i=0;i<l.length;i++){const c=l[i],r=c.getAttribute("data-ln-show");r in t&&c.classList.toggle("hidden",!t[r])}const s=e.querySelectorAll("[data-ln-class]");for(let i=0;i<s.length;i++){const c=s[i],r=c.getAttribute("data-ln-class").split(",");for(let a=0;a<r.length;a++){const u=r[a].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();f in t&&c.classList.toggle(d,!!t[f])}}return e}function xe(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let o=0;o<n.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[o],t??null),n[o].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)G(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function N(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.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 o=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 r=0;r<c.length;r++){const a=c[r];a.value.indexOf("{{")!==-1&&i.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function _e(e,t,n,o,l,s){const i={};for(let r=0;r<e.children.length;r++){const a=e.children[r],u=a.getAttribute("data-ln-render-key");u&&(i[u]=a)}const c=document.createDocumentFragment();for(let r=0;r<t.length;r++){const a=t[r],u=String(o(a));let d=i[u];if(d)l(d,a,r);else{const f=Q(n,s);if(!f||(N(f,a),d=f.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",u),l(d,a,r)}c.appendChild(d)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=N,window.lnCore.fill=G,window.lnCore.lnFill=xe,window.lnCore.renderList=_e);function L(e,t,n){const o=e.getAttribute(t);return o===null?n:o}function K(e,t,n){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?n:o}function z(e,t,n=!1){const o=e.getAttribute(t);if(o===null)return!!n;const l=o.trim().toLowerCase();return!(l==="false"||l==="0")}function J(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const R=new Map;function Y(e,t){const n=(e?e.join("|"):"")+"::"+t;if(R.has(n))return R.get(n);const o=new Set(e||[]),l=function(s,i){const c=s.getAttribute(i);return c!==null&&o.has(c)?c:t};return R.set(n,l),l}function X(e,t,n){const o=parseFloat(e.getAttribute(t));return isNaN(o)?n:o}function Z(e,t,n){const o=e.getAttribute(t);if(!o)return n;try{return JSON.parse(o)}catch{return n}}function ee(e,t,n,o,l){if(!e||t===null)return!0;const s=o||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const c=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"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const r=e.values||[];return r.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(c(`[${s}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(c(`[${s}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(r){return c(`[${s}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function te(e,t,n){for(const o in n){const[l,s,i]=n[o];Object.defineProperty(e,o,{get:function(){return l(t,s,i)},enumerable:!0,configurable:!0})}return e}function ne(e){const t={};for(const n in e){const o=e[n];if(!o||!o.prop)continue;let l=o.read;if(!l&&o.type)switch(o.type){case"enum":l=Y(o.values,o.fallback);break;case"integer":l=K;break;case"float":l=X;break;case"boolean":l=z;break;case"list":l=J;break;case"json":l=Z;break;case"string":default:l=L;break}l||(l=L),t[o.prop]=[l,n,o.fallback]}return t}function Se(e){const t={};for(const n in e){const o=e[n];o&&o.effect&&(t[n]=o.effect)}return Object.keys(t).length?t:null}function ve(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=te,window.lnCore.attrSpec=ne,window.lnCore.attrStr=L,window.lnCore.attrInt=K,window.lnCore.attrBool=z,window.lnCore.attrList=J,window.lnCore.attrEnum=Y,window.lnCore.attrFloat=X,window.lnCore.attrJson=Z);function E(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(n){console.error("["+t.attribute+"] init failed",e,n)}}}function re(e,t,n,o){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:n,ComponentFn:o};if(e.matches&&e.matches(s)&&E(e,i),e.querySelectorAll){const c=e.querySelectorAll(s);for(let r=0;r<c.length;r++)E(c[r],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function ke(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Le(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 oe(){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=oe(),n=e.observed||[];for(let o=0;o<n.length;o++){const l=n[o];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 o in e.attributes){t.byDeclaredAttr.has(o)||t.byDeclaredAttr.set(o,[]);const l=t.byDeclaredAttr.get(o);l.some(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=ve(e);if(o===null)t.reactiveWildcard.push(e);else for(const l of o)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function ie(e,t,n,o){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const i=s.effects&&s.effects[n];i?i(t,n,o):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,o)}}function qe(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,o=oe(),l=o.byAttr.get(t),s=W()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(t);if(!n&&!l&&!s)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(s&&F(i)){const c=o.byDeclaredAttr.get(t),r=i.getAttribute(t);for(let a=0;a<c.length;a++)ee(c[a].spec,r,t,c[a].componentTag,i)}if(window.lnCore._debugSink&&(n||l)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),n){const c=o.byReactive.get(t);c&&ie(c,i,t,e.oldValue),o.reactiveWildcard.length&&ie(o.reactiveWildcard,i,t,e.oldValue)}if(l)for(let c=0;c<l.length;c++){const r=l[c];if(r.handler){r.handler(i,t,e.oldValue);continue}r.onAttributeChange&&i[r.attribute]?r.onAttributeChange(i,t):(re(i,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(i))}}}function De(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,k(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{qe(t[n])}catch(o){console.error("[ln-core] mutation handler failed",t[n].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function M(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function T(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function le(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(o){console.error("["+t.attribute+"] destroy failed",e,o)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function se(e){const t=M();if(!t.length)return;const n=e.target;if(n){const l=n.nodeType===1?n:n.parentElement;if(l&&(l.isContentEditable||l.closest&&l.closest('[contenteditable]:not([contenteditable="false"])')))return}const o=T();if(e.target&&o.length)for(let l=0;l<o.length;l++){const s=o[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)continue;const i=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const r=t[c],a=r.query;if(a&&(s.matches&&s.matches(a)&&(r.ComponentFn&&E(s,r),r.onInit&&r.onInit(s)),i&&s.querySelectorAll)){const u=s.querySelectorAll(a);for(let d=0;d<u.length;d++)r.ComponentFn&&E(u[d],r),r.onInit&&r.onInit(u[d])}}}for(let l=0;l<e.removedNodes.length;l++){const s=e.removedNodes[l];if(s.nodeType!==1||document.contains(s))continue;const i=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const r=t[c],a=r.query;if(a&&(s.matches&&s.matches(a)&&le(s,r),i&&s.querySelectorAll)){const u=s.querySelectorAll(a);for(let d=0;d<u.length;d++)le(u[d],r)}}}}function ae(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,k(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const o=t[n];if(o.type==="childList")try{se(o)}catch(l){console.error("[ln-core] lifecycle handler failed",o.target,l)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Fe(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const n=t.takeRecords();for(let o=0;o<n.length;o++){const l=n[o];if(l.type==="childList")try{se(l)}catch(s){console.error("[ln-core] lifecycle handler failed",l.target,s)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function Oe(e){M().push(e),e.onSubtreeChange&&e.query&&T().push(e),ae()}function ce(e,t,n,o,l={}){const s=l.extraAttributes||[],i=l.onAttributeChange||null,c=l.onSubtreeChange||null,r=l.onInit||null,a=l.onAttrChange||null,u=l.effects||null,d=l.attributes||null,f=d?Se(d):u,_=d?new Set(Object.keys(d)):null,C=l.persist||null;function m(w){const p=w||document.body;if(re(p,e,t,n),d&&W())for(const b in d){const D=d[b],$=Array.from(p.querySelectorAll("["+b+"]"));p.matches&&p.matches("["+b+"]")&&$.push(p);for(let j=0;j<$.length;j++){const U=$[j];F(U)&&ee(D,U.getAttribute(b),b,o,U)}}r&&r(p)}const A=[];if(e.indexOf("[")!==-1){const w=/\[([\w-]+)/g;let p;for(;(p=w.exec(e))!==null;)A.push(p[1])}else A.push(e);Ee({selector:e,attribute:t,componentTag:o,attributes:d,ComponentFn:n,onInit:r,observed:A.concat(s),onAttributeChange:i,onAttrChange:a,effects:f,declared:_,persist:C}),De();const g=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,S=l.subtreeQuery||(g?e:"["+e+"]"),v={selector:e,attribute:t,ComponentFn:n,onInit:r,onSubtreeChange:c,query:S};M().push(v),c&&S&&T().push(v),ae(),window[t]=m,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ce,window.lnCore.observeLifecycle=Oe,window.lnCore.withoutLifecycle=Fe);function h(){ke()>0?Le(function(){m(document.body)}):m(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",h):h(),m}function ue(e){return(e||"").replace(/^#/,"")}function B(e){const t=e===void 0?location.hash:e,n={},o=ue(t);if(!o)return n;const l=o.split("&");for(let s=0;s<l.length;s++){const i=l[s];if(!i)continue;const c=i.indexOf(":"),r=c>-1?i.slice(0,c):i,a=c>-1?i.slice(c+1):"";if(r)try{n[r]=decodeURIComponent(a)}catch{n[r]=a}}return n}function Ie(e){if(!e)return null;const t=B();return e in t?t[e]:null}function Ne(e,t){if(!e)return;const n=B();t==null?delete n[e]:n[e]=String(t);const l=Object.keys(n).map(function(s){const i=n[s];return i===""?s:s+":"+encodeURIComponent(i)}).join("&");ue(location.hash)!==l&&(location.hash=l)}function Re(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Me(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"-"+t:o:t||null}function Te(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Be(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 $e(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function je(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),o=e.slice(t+1),l=o?o.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=B,window.lnCore.hashGet=Ie,window.lnCore.hashSet=Ne,window.lnCore.hashLinkClick=Re,window.lnCore.resolveHashNamespace=Me,window.lnCore.hashSortEncode=Te,window.lnCore.hashSortDecode=Be,window.lnCore.hashFilterEncode=$e,window.lnCore.hashFilterDecode=je);function Ue(e){return(e||"").replace(/^\?/,"")}function We(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},o=Ue(t);if(!o)return n;const l=new URLSearchParams(o);for(const[s,i]of l.entries())n[s]=i;return n}function Pe(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function Ve(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const o=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",o)}function He(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");if(n&&n.trim()!=="")return n.trim();const o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"_"+t:o:t||null}function Qe(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Ge(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const o=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:o}}}return null}function Ke(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function ze(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=We,window.lnCore.queryGet=Pe,window.lnCore.querySet=Ve,window.lnCore.resolveQueryParam=He,window.lnCore.querySortEncode=Qe,window.lnCore.querySortDecode=Ge,window.lnCore.queryFilterEncode=Ke,window.lnCore.queryFilterDecode=ze);function Je(){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=Je);const y={};function Ye(e){const t=e||"default";if(!y[t]){const n=new Intl.NumberFormat(e,{useGrouping:!0}),o=n.formatToParts(1234.5);let l="",s=".";for(let i=0;i<o.length;i++)o[i].type==="group"&&(l=o[i].value),o[i].type==="decimal"&&(s=o[i].value);y[t]={groupSep:l,decimalSep:s,fmt:n}}return y[t]}function q(e,t,n={}){if(typeof e!="number"||isNaN(e)||!Number.isFinite(e))return"";const o=t||"default",l=n.maxDecimals!=null?parseInt(n.maxDecimals,10):null,s=n.userDecimals!=null?n.userDecimals:null;if(l!==null){const i=o+"|max:"+l;return y[i]||(y[i]=new Intl.NumberFormat(t,{useGrouping:!0,minimumFractionDigits:0,maximumFractionDigits:l})),y[i].format(e)}if(s!==null&&s>0){const i=o+"|exact:"+s;return y[i]||(y[i]=new Intl.NumberFormat(t,{useGrouping:!0,minimumFractionDigits:s,maximumFractionDigits:s})),y[i].format(e)}return Ye(t).fmt.format(e)}function de(e){if(e==null||e==="")return null;const t=Number(e);return Number.isFinite(t)?t:null}function x(e){return String(Math.round(e*1e3)/1e3)}function Xe(e,t,n){const o=de(e);return o===null||o<0?0:Math.min(o,Math.min(t,n)/2)}function Ze(e){if(typeof e!="string")return null;const t=e.trim().split(/[\s,]+/).map(Number);return t.length!==4||t.some(n=>!Number.isFinite(n))||t[2]<=0||t[3]<=0?null:{x:t[0],y:t[1],width:t[2],height:t[3]}}function et(e){if(!e||typeof e!="string")return null;const t=e.split(":"),n=t[0].trim();return n?{field:n,direction:t[1]&&t[1].trim().toLowerCase()==="desc"?"desc":"asc"}:null}function tt(e,t){t=t||{};const n=t.viewBox||{x:0,y:0,width:1e3,height:320},o=t.xField||"label",l=t.yField||"value",s=t.includeZero!==!1,i=Xe(t.padding,n.width,n.height),c=Array.isArray(e)?e:[],r=[];for(let h=0;h<c.length;h++){const w=c[h]||{},p=de(w[l]);p!==null&&r.push({record:w,sourceIndex:h,label:w[o]==null?String(h+1):String(w[o]),value:p})}if(r.length===0)return{points:[],linePoints:"",areaPoints:"",count:0,min:null,max:null,domainMin:0,domainMax:1,baselineY:n.y+n.height-i};let a=r[0].value,u=r[0].value;for(let h=1;h<r.length;h++)r[h].value<a&&(a=r[h].value),r[h].value>u&&(u=r[h].value);let d=a,f=u;s&&(d=Math.min(0,d),f=Math.max(0,f)),d===f&&(f===0?f=1:f>0?d=0:f=0);const _=Math.max(1,n.width-i*2),C=Math.max(1,n.height-i*2),m=f-d,A=n.y+n.height-i-(0-d)/m*C,g=[];for(let h=0;h<r.length;h++){const w=r[h],p=r.length===1?.5:h/(r.length-1),b=n.x+i+p*_,D=n.y+n.height-i-(w.value-d)/m*C;g.push({record:w.record,sourceIndex:w.sourceIndex,label:w.label,value:w.value,x:b,y:D,pointString:x(b)+","+x(D)})}const S=g.map(h=>h.pointString).join(" ");let v="";if(g.length>0){const h=g[0],w=g[g.length-1],p=x(h.x)+","+x(A),b=x(w.x)+","+x(A);v=p+" "+S+" "+b}return{points:g,linePoints:S,areaPoints:v,count:g.length,min:a,max:u,domainMin:d,domainMax:f,baselineY:A}}(function(){const e="data-ln-chart",t="lnChart",n={x:0,y:0,width:1e3,height:320};if(window[t]!==void 0)return;function o(a){const u=a[t];u&&u.requestData()}function l(a){const u=a[t];u&&u._render()}const s={"data-ln-chart":{prop:"name",type:"string",read:L,fallback:"",effect:l,description:"Chart instance name or identifier"},"data-ln-chart-source":{type:"string",effect:o,description:"Source store or coordinator identifier"},"data-ln-chart-sort":{type:"string",effect:o,description:"Field name to sort chart series data by"},"data-ln-chart-type":{type:"enum",values:["line","bar","area","scatter"],fallback:"line",effect:l,description:"Visual chart render type"},"data-ln-chart-x":{type:"string",effect:l,description:"Field name mapping to X axis"},"data-ln-chart-y":{type:"string",effect:l,description:"Field name mapping to Y axis"},"data-ln-chart-padding":{type:"integer",fallback:20,min:0,effect:l,description:"Internal plot padding in pixels"},"data-ln-chart-zero":{type:"boolean",effect:l,description:"Forces Y axis scale to start at zero"}},i=ne(s);function c(a,u){a&&(a.textContent=u)}function r(a){this.dom=a,te(this,a,i),this.source=a.getAttribute("data-ln-chart-source")||this.name,this.plot=a.querySelector("[data-ln-chart-plot]"),this.line=a.querySelector("[data-ln-chart-line]"),this.area=a.querySelector("[data-ln-chart-area]"),this.labels=a.querySelector("[data-ln-chart-labels]"),this.empty=a.querySelector("[data-ln-chart-empty]"),this.minimum=a.querySelector("[data-ln-chart-min]"),this.maximum=a.querySelector("[data-ln-chart-max]"),this.count=a.querySelector("[data-ln-chart-count]"),this._data=[],this.model=null,this.isLoaded=!1;const u=this;return this._onSetData=function(d){const f=d.detail||{};u._data=Array.isArray(f.data)?f.data:[],u.isLoaded=!0,u._setLoading(!1),u._render()},this._onSetLoading=function(d){u._setLoading(!!(d.detail&&d.detail.loading))},this._onRefresh=function(){u.requestData()},a.addEventListener("ln-chart:set-data",this._onSetData),a.addEventListener("ln-chart:set-loading",this._onSetLoading),a.addEventListener("ln-chart:request-refresh",this._onRefresh),this.requestData(),this}r.prototype._readOptions=function(){const a=this.dom.getAttribute("data-ln-chart-padding"),u=a===null?NaN:Number(a),d=(this.dom.getAttribute("data-ln-chart-type")||"line").toLowerCase();return{xField:this.dom.getAttribute("data-ln-chart-x")||"label",yField:this.dom.getAttribute("data-ln-chart-y")||"value",includeZero:this.dom.getAttribute("data-ln-chart-zero")!=="false",padding:Number.isFinite(u)&&u>=0?u:16,type:d==="area"||d==="polygon"?"area":"line",viewBox:this.plot&&Ze(this.plot.getAttribute("viewBox"))||n}},r.prototype._setLoading=function(a){this.dom.classList.toggle("ln-chart--loading",a),this.dom.setAttribute("aria-busy",a?"true":"false")},r.prototype._renderLabels=function(a){if(!this.labels||(this.labels.replaceChildren(),a.count===0))return;const u=this.name+"-label",d='[data-ln-template="'+u+'"]';if(!this.dom.querySelector(d)&&!document.querySelector(d))return;const f=Ae(this.dom,u,"ln-chart");if(!f)return;const _=V(this.dom);for(const C of a.points){const m=f.cloneNode(!0);N(m,{label:C.label,value:q(C.value,_)}),this.labels.appendChild(m)}},r.prototype._render=function(){const a=this._readOptions(),u=tt(this._data,a);this.model=u,this.line&&(this.line.setAttribute("points",u.linePoints),this.line.toggleAttribute("hidden",u.count===0)),this.area&&(this.area.setAttribute("points",u.areaPoints),this.area.toggleAttribute("hidden",u.count===0||a.type!=="area"));const d=u.count===0;this.dom.classList.toggle("ln-chart--empty",d),this.empty&&this.empty.toggleAttribute("hidden",!d);const f=V(this.dom);c(this.minimum,q(u.min,f)),c(this.maximum,q(u.max,f)),c(this.count,q(u.count,f)),this._renderLabels(u),O(this.dom,"ln-chart:rendered",{chart:this.name,count:u.count,min:u.min,max:u.max})},r.prototype.requestData=function(){this.source=this.dom.getAttribute("data-ln-chart-source")||this.name,O(this.dom,"ln-chart:request-data",{chart:this.name,source:this.source,sort:et(this.dom.getAttribute("data-ln-chart-sort")),filters:{},search:""})},r.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-chart:set-data",this._onSetData),this.dom.removeEventListener("ln-chart:set-loading",this._onSetLoading),this.dom.removeEventListener("ln-chart:request-refresh",this._onRefresh),this._data=[],this.model=null,delete this.dom[t])},ce(e,t,r,"ln-chart",{attributes:s})})()})();
@@ -1 +1 @@
1
- (function(){"use strict";function R(){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 o=null;for(let i=1;i<t.length;i++)if(t[i]&&t[i].nodeType===1){o=t[i];break}if(!x(o))return}e.apply(console,t)}}function M(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function 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 re(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function oe(e,t){const n=!!(t&&t.typed),o=t&&t.exclude,i={},s=e.elements,l={};if(n)for(let c=0;c<s.length;c++){const r=s[c];r.name&&r.type==="checkbox"&&!r.disabled&&(l[r.name]=(l[r.name]||0)+1)}for(let c=0;c<s.length;c++){const r=s[c];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(o&&r.matches&&r.matches(o)))if(r.type==="checkbox")n&&l[r.name]===1?i[r.name]=r.checked:(i[r.name]||(i[r.name]=[]),r.checked&&i[r.name].push(r.value));else if(r.type==="radio")r.checked&&(i[r.name]=r.value);else if(r.type==="select-multiple"){i[r.name]=[];for(let a=0;a<r.options.length;a++)r.options[a].selected&&i[r.name].push(r.options[a].value)}else if(n&&r.type==="hidden")i[r.name]=r.value;else if(n&&(r.type==="number"||r.type==="range")){const a=Number(r.value);i[r.name]=r.value===""||isNaN(a)?null:a}else i[r.name]=r.value}return i}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 n=e.elements,o=[],i={};for(let s=0;s<n.length;s++){const l=n[s];l.name&&l.type==="checkbox"&&(i[l.name]=(i[l.name]||0)+1)}for(let s=0;s<n.length;s++){const l=n[s];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const c=l.getAttribute("data-ln-fill-as")||l.name;if(!c||!(c in t))continue;const r=t[c];if(l.type==="checkbox"){if(Array.isArray(r))l.checked=r.indexOf(l.value)!==-1;else if(i[l.name]>1){const a=String(r).split(",").map(function(u){return u.trim()});l.checked=a.indexOf(l.value)!==-1}else l.checked=ie(r);o.push(l)}else if(l.type==="radio")l.checked=l.value===String(r),o.push(l);else if(l.type==="select-multiple"){if(Array.isArray(r))for(let a=0;a<l.options.length;a++)l.options[a].selected=r.indexOf(l.options[a].value)!==-1;o.push(l)}else l.value=r,l.tagName==="SELECT"&&r!=null&&l.setAttribute("data-ln-value",r),o.push(l)}return o}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=le,window.lnCore.serializeForm=oe,window.lnCore.resolveFormMethod=re);const T={};function se(e,t){T[e]=t}function ce(e){return T[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=se,window.lnCore.getDataMapper=ce);function ae(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,y(function(){new MutationObserver(function(){M(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const $={};function ue(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];$[n]=t}function de(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return $[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ue,window.lnCore.getLocaleFallback=de,window.lnCore.ensureLocaleObserver=ae);const v={};function fe(e,t){v[e]||(v[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=v[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function N(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let l=0;l<n.length;l++){const c=n[l],r=c.getAttribute("data-ln-field");t[r]!=null&&(c.textContent=t[r])}const o=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<o.length;l++){const c=o[l],r=c.getAttribute("data-ln-attr").split(",");for(let a=0;a<r.length;a++){const u=r[a].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();t[f]!=null&&c.setAttribute(d,t[f])}}const i=e.querySelectorAll("[data-ln-show]");for(let l=0;l<i.length;l++){const c=i[l],r=c.getAttribute("data-ln-show");r in t&&c.classList.toggle("hidden",!t[r])}const s=e.querySelectorAll("[data-ln-class]");for(let l=0;l<s.length;l++){const c=s[l],r=c.getAttribute("data-ln-class").split(",");for(let a=0;a<r.length;a++){const u=r[a].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();f in t&&c.classList.toggle(d,!!t[f])}}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 n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let o=0;o<n.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[o],t??null),n[o].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)N(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function B(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,c){return t[c]!==void 0?t[c]:""}))}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],c=l.attributes;for(let r=0;r<c.length;r++){const a=c[r];a.value.indexOf("{{")!==-1&&l.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function he(e,t,n,o,i,s){const l={};for(let r=0;r<e.children.length;r++){const a=e.children[r],u=a.getAttribute("data-ln-render-key");u&&(l[u]=a)}const c=document.createDocumentFragment();for(let r=0;r<t.length;r++){const a=t[r],u=String(o(a));let d=l[u];if(d)i(d,a,r);else{const f=fe(n,s);if(!f||(B(f,a),d=f.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",u),i(d,a,r)}c.appendChild(d)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=B,window.lnCore.fill=N,window.lnCore.lnFill=we,window.lnCore.renderList=he);function _(e,t,n){const o=e.getAttribute(t);return o===null?n:o}function j(e,t,n){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?n:o}function U(e,t,n=!1){const o=e.getAttribute(t);if(o===null)return!!n;const i=o.trim().toLowerCase();return!(i==="false"||i==="0")}function W(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const S=new Map;function V(e,t){const n=(e?e.join("|"):"")+"::"+t;if(S.has(n))return S.get(n);const o=new Set(e||[]),i=function(s,l){const c=s.getAttribute(l);return c!==null&&o.has(c)?c:t};return S.set(n,i),i}function H(e,t,n){const o=parseFloat(e.getAttribute(t));return isNaN(o)?n:o}function P(e,t,n){const o=e.getAttribute(t);if(!o)return n;try{return JSON.parse(o)}catch{return n}}function Q(e,t,n,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 c=r=>{i?console.warn(r,i):console.warn(r)};if(l==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const r=e.values||[];return r.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(c(`[${s}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(c(`[${s}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(r){return c(`[${s}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function pe(e,t,n){for(const o in n){const[i,s,l]=n[o];Object.defineProperty(e,o,{get:function(){return i(t,s,l)},enumerable:!0,configurable:!0})}return e}function be(e){const t={};for(const n in e){const o=e[n];if(!o||!o.prop)continue;let i=o.read;if(!i&&o.type)switch(o.type){case"enum":i=V(o.values,o.fallback);break;case"integer":i=j;break;case"float":i=H;break;case"boolean":i=U;break;case"list":i=W;break;case"json":i=P;break;case"string":default:i=_;break}i||(i=_),t[o.prop]=[i,n,o.fallback]}return t}function ge(e){const t={};for(const n in e){const o=e[n];o&&o.effect&&(t[n]=o.effect)}return Object.keys(t).length?t:null}function me(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=pe,window.lnCore.attrSpec=be,window.lnCore.attrStr=_,window.lnCore.attrInt=j,window.lnCore.attrBool=U,window.lnCore.attrList=W,window.lnCore.attrEnum=V,window.lnCore.attrFloat=H,window.lnCore.attrJson=P);function m(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(n){console.error("["+t.attribute+"] init failed",e,n)}}}function G(e,t,n,o){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:n,ComponentFn:o};if(e.matches&&e.matches(s)&&m(e,l),e.querySelectorAll){const c=e.querySelectorAll(s);for(let r=0;r<c.length;r++)m(c[r],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ce(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function ye(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 J(){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=J(),n=e.observed||[];for(let o=0;o<n.length;o++){const i=n[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=me(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 K(e,t,n,o){for(let i=0;i<e.length;i++){const s=e[i];if(!t[s.attribute])continue;const l=s.effects&&s.effects[n];l?l(t,n,o):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,o)}}function xe(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,o=J(),i=o.byAttr.get(t),s=R()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(t);if(!n&&!i&&!s)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(s&&x(l)){const c=o.byDeclaredAttr.get(t),r=l.getAttribute(t);for(let a=0;a<c.length;a++)Q(c[a].spec,r,t,c[a].componentTag,l)}if(window.lnCore._debugSink&&(n||i)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),n){const c=o.byReactive.get(t);c&&K(c,l,t,e.oldValue),o.reactiveWildcard.length&&K(o.reactiveWildcard,l,t,e.oldValue)}if(i)for(let c=0;c<i.length;c++){const r=i[c];if(r.handler){r.handler(l,t,e.oldValue);continue}r.onAttributeChange&&l[r.attribute]?r.onAttributeChange(l,t):(G(l,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(l))}}}function ve(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,y(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{xe(t[n])}catch(o){console.error("[ln-core] mutation handler failed",t[n].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function k(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function E(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function L(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(o){console.error("["+t.attribute+"] destroy failed",e,o)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function z(e){const t=k();if(!t.length)return;const n=e.target;if(n){const i=n.nodeType===1?n:n.parentElement;if(i&&(i.isContentEditable||i.closest&&i.closest('[contenteditable]:not([contenteditable="false"])')))return}const o=E();if(e.target&&o.length)for(let i=0;i<o.length;i++){const s=o[i],l=s.query,c=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;c&&s.onSubtreeChange(c,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 c=0;c<t.length;c++){const r=t[c];if(r.selector&&r.attribute&&r.ComponentFn){if(!l)s.matches&&s.matches(r.query)&&m(s,r);else if(s.matches&&s.matches(r.query)&&m(s,r),s.querySelectorAll){const a=s.querySelectorAll(r.query);for(let u=0;u<a.length;u++)m(a[u],r)}}r.onInit&&r.onInit(s)}}}for(let i=0;i<e.removedNodes.length;i++){const s=e.removedNodes[i];if(s.nodeType===1){if(document.contains(s))continue;const l=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const r=t[c],a=r.query;if(a){if(!l)s.matches&&s.matches(a)&&L(s,r);else if(s.matches&&s.matches(a)&&L(s,r),s.querySelectorAll){const u=s.querySelectorAll(a);for(let d=0;d<u.length;d++)L(u[d],r)}}}}}}function X(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,y(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const o=t[n];if(o.type==="childList")try{z(o)}catch(i){console.error("[ln-core] lifecycle handler failed",o.target,i)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function _e(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const n=t.takeRecords();for(let o=0;o<n.length;o++){const i=n[o];if(i.type==="childList")try{z(i)}catch(s){console.error("[ln-core] lifecycle handler failed",i.target,s)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function Se(e){k().push(e),e.onSubtreeChange&&e.query&&E().push(e),X()}function Z(e,t,n,o,i={}){const s=i.extraAttributes||[],l=i.onAttributeChange||null,c=i.onSubtreeChange||null,r=i.onInit||null,a=i.onAttrChange||null,u=i.effects||null,d=i.attributes||null,f=d?ge(d):u,p=d?new Set(Object.keys(d)):null,w=i.persist||null;function b(q){const h=q||document.body;if(G(h,e,t,n),d&&R())for(const C in d){const Pe=d[C],D=Array.from(h.querySelectorAll("["+C+"]"));h.matches&&h.matches("["+C+"]")&&D.push(h);for(let I=0;I<D.length;I++){const F=D[I];x(F)&&Q(Pe,F.getAttribute(C),C,o,F)}}r&&r(h)}const g=[];if(e.indexOf("[")!==-1){const q=/\[([\w-]+)/g;let h;for(;(h=q.exec(e))!==null;)g.push(h[1])}else g.push(e);Ae({selector:e,attribute:t,componentTag:o,attributes:d,ComponentFn:n,onInit:r,observed:g.concat(s),onAttributeChange:l,onAttrChange:a,effects:f,declared:p,persist:w}),ve();const A=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,ee=i.subtreeQuery||(A?e:"["+e+"]"),te={selector:e,attribute:t,ComponentFn:n,onInit:r,onSubtreeChange:c,query:ee};k().push(te),c&&ee&&E().push(te),X(),window[t]=b,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=Z,window.lnCore.observeLifecycle=Se,window.lnCore.withoutLifecycle=_e);function ne(){Ce()>0?ye(function(){b(document.body)}):b(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ne):ne(),b}function Y(e){return(e||"").replace(/^#/,"")}function O(e){const t=e===void 0?location.hash:e,n={},o=Y(t);if(!o)return n;const i=o.split("&");for(let s=0;s<i.length;s++){const l=i[s];if(!l)continue;const c=l.indexOf(":"),r=c>-1?l.slice(0,c):l,a=c>-1?l.slice(c+1):"";if(r)try{n[r]=decodeURIComponent(a)}catch{n[r]=a}}return n}function ke(e){if(!e)return null;const t=O();return e in t?t[e]:null}function Ee(e,t){if(!e)return;const n=O();t==null?delete n[e]:n[e]=String(t);const i=Object.keys(n).map(function(s){const l=n[s];return l===""?s:s+":"+encodeURIComponent(l)}).join("&");Y(location.hash)!==i&&(location.hash=i)}function Le(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Oe(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"-"+t:o:t||null}function qe(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function De(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 Ie(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Fe(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),o=e.slice(t+1),i=o?o.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=O,window.lnCore.hashGet=ke,window.lnCore.hashSet=Ee,window.lnCore.hashLinkClick=Le,window.lnCore.resolveHashNamespace=Oe,window.lnCore.hashSortEncode=qe,window.lnCore.hashSortDecode=De,window.lnCore.hashFilterEncode=Ie,window.lnCore.hashFilterDecode=Fe);function Re(e){return(e||"").replace(/^\?/,"")}function Me(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},o=Re(t);if(!o)return n;const i=new URLSearchParams(o);for(const[s,l]of i.entries())n[s]=l;return n}function Te(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function $e(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const o=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",o)}function Ne(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");if(n&&n.trim()!=="")return n.trim();const o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"_"+t:o:t||null}function Be(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function je(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const o=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:o}}}return null}function Ue(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function We(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=Me,window.lnCore.queryGet=Te,window.lnCore.querySet=$e,window.lnCore.resolveQueryParam=Ne,window.lnCore.querySortEncode=Be,window.lnCore.querySortDecode=je,window.lnCore.queryFilterEncode=Ue,window.lnCore.queryFilterDecode=We);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,t=100,n=0){const o=parseFloat(String(e))||0,i=parseFloat(String(t))||100,s=parseFloat(String(n))||0,l=Math.max(s,Math.min(o,i)),c=i-s;let r=0;return c>0&&(r=(l-s)/c*100),r=Math.max(0,Math.min(100,r)),{value:o,min:s,max:i,clampedValue:l,percentage:r}}(function(){const e="data-ln-circular-progress",t="lnCircularProgress";if(window[t]!==void 0)return;function n(f){const p=f[t];p&&d.call(p)}const o={"data-ln-circular-progress":{type:"float",fallback:0,min:0,effect:n,description:"Current circular progress value"},"data-ln-circular-progress-max":{type:"float",fallback:100,min:0,effect:n,description:"Maximum circular progress scale value"},"data-ln-circular-progress-label":{type:"string",effect:n,description:"Text label format or template inside circular progress"}},i="http://www.w3.org/2000/svg",s=36,l=16,c=2*Math.PI*l;function r(f){return this.dom=f,this.svg=null,this.trackCircle=null,this.progressCircle=null,this.labelEl=null,u.call(this),d.call(this),this}r.prototype.destroy=function(){this.dom[t]&&(this.svg&&this.svg.remove(),this.labelEl&&this.labelEl.remove(),delete this.dom[t])};function a(f,p){const w=document.createElementNS(i,f);for(const[b,g]of Object.entries(p))w.setAttribute(b,g);return w}function u(){this.svg=a("svg",{viewBox:"0 0 "+s+" "+s,width:s,height:s}),this.svg.classList.add("ln-circular-progress__svg"),this.trackCircle=a("circle",{cx:s/2,cy:s/2,r:l,fill:"none","stroke-width":"3"}),this.trackCircle.classList.add("ln-circular-progress__track"),this.progressCircle=a("circle",{cx:s/2,cy:s/2,r:l,fill:"none","stroke-width":"3","stroke-linecap":"round","stroke-dasharray":c,"stroke-dashoffset":c,transform:"rotate(-90 "+s/2+" "+s/2+")"}),this.progressCircle.classList.add("ln-circular-progress__fill"),this.svg.appendChild(this.trackCircle),this.svg.appendChild(this.progressCircle),this.labelEl=document.createElement("strong"),this.labelEl.classList.add("ln-circular-progress__label"),this.dom.appendChild(this.svg),this.dom.appendChild(this.labelEl)}function d(){const f=this.dom.getAttribute("data-ln-circular-progress"),p=this.dom.getAttribute("data-ln-circular-progress-max"),w=He(f,p||100),b=c-w.percentage/100*c;this.progressCircle.setAttribute("stroke-dashoffset",b);const g=this.dom.getAttribute("data-ln-circular-progress-label"),A=g!==null?g:Math.round(w.percentage)+"%";this.labelEl.textContent=A,this.dom.setAttribute("role","progressbar"),this.dom.setAttribute("aria-valuemin",String(w.min)),this.dom.setAttribute("aria-valuemax",String(w.max)),this.dom.setAttribute("aria-valuenow",String(w.clampedValue)),this.dom.setAttribute("aria-valuetext",A),M(this.dom,"ln-circular-progress:change",{target:this.dom,value:w.value,max:w.max,percentage:w.percentage})}Z(e,t,r,"ln-circular-progress",{attributes:o})})()})();
1
+ (function(){"use strict";function F(){if(typeof window>"u")return!1;if(window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink)return!0;if(typeof document<"u"){if(document.documentElement&&document.documentElement.hasAttribute("data-ln-debug"))return!0;if(document.body)return document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null}return!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 o=null;for(let i=1;i<t.length;i++)if(t[i]&&t[i].nodeType===1){o=t[i];break}if(!x(o))return}e.apply(console,t)}}function R(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function 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 re(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function oe(e,t){const n=!!(t&&t.typed),o=t&&t.exclude,i={},s=e.elements,l={};if(n)for(let c=0;c<s.length;c++){const r=s[c];r.name&&r.type==="checkbox"&&!r.disabled&&(l[r.name]=(l[r.name]||0)+1)}for(let c=0;c<s.length;c++){const r=s[c];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(o&&r.matches&&r.matches(o)))if(r.type==="checkbox")n&&l[r.name]===1?i[r.name]=r.checked:(i[r.name]||(i[r.name]=[]),r.checked&&i[r.name].push(r.value));else if(r.type==="radio")r.checked&&(i[r.name]=r.value);else if(r.type==="select-multiple"){i[r.name]=[];for(let a=0;a<r.options.length;a++)r.options[a].selected&&i[r.name].push(r.options[a].value)}else if(n&&r.type==="hidden")i[r.name]=r.value;else if(n&&(r.type==="number"||r.type==="range")){const a=Number(r.value);i[r.name]=r.value===""||isNaN(a)?null:a}else i[r.name]=r.value}return i}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 n=e.elements,o=[],i={};for(let s=0;s<n.length;s++){const l=n[s];l.name&&l.type==="checkbox"&&(i[l.name]=(i[l.name]||0)+1)}for(let s=0;s<n.length;s++){const l=n[s];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const c=l.getAttribute("data-ln-fill-as")||l.name;if(!c||!(c in t))continue;const r=t[c];if(l.type==="checkbox"){if(Array.isArray(r))l.checked=r.indexOf(l.value)!==-1;else if(i[l.name]>1){const a=String(r).split(",").map(function(d){return d.trim()});l.checked=a.indexOf(l.value)!==-1}else l.checked=ie(r);o.push(l)}else if(l.type==="radio")l.checked=l.value===String(r),o.push(l);else if(l.type==="select-multiple"){if(Array.isArray(r))for(let a=0;a<l.options.length;a++)l.options[a].selected=r.indexOf(l.options[a].value)!==-1;o.push(l)}else l.value=r,l.tagName==="SELECT"&&r!=null&&l.setAttribute("data-ln-value",r),o.push(l)}return o}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=le,window.lnCore.serializeForm=oe,window.lnCore.resolveFormMethod=re);const M={};function se(e,t){M[e]=t}function ce(e){return M[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=se,window.lnCore.getDataMapper=ce);function ae(){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 T={};function ue(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];T[n]=t}function de(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return T[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ue,window.lnCore.getLocaleFallback=de,window.lnCore.ensureLocaleObserver=ae);const v={};function fe(e,t){v[e]||(v[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=v[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function $(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let l=0;l<n.length;l++){const c=n[l],r=c.getAttribute("data-ln-field");t[r]!=null&&(c.textContent=t[r])}const o=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<o.length;l++){const c=o[l],r=c.getAttribute("data-ln-attr").split(",");for(let a=0;a<r.length;a++){const d=r[a].trim().split(":");if(d.length!==2)continue;const u=d[0].trim(),f=d[1].trim();t[f]!=null&&c.setAttribute(u,t[f])}}const i=e.querySelectorAll("[data-ln-show]");for(let l=0;l<i.length;l++){const c=i[l],r=c.getAttribute("data-ln-show");r in t&&c.classList.toggle("hidden",!t[r])}const s=e.querySelectorAll("[data-ln-class]");for(let l=0;l<s.length;l++){const c=s[l],r=c.getAttribute("data-ln-class").split(",");for(let a=0;a<r.length;a++){const d=r[a].trim().split(":");if(d.length!==2)continue;const u=d[0].trim(),f=d[1].trim();f in t&&c.classList.toggle(u,!!t[f])}}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 n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let o=0;o<n.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[o],t??null),n[o].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)$(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function N(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,c){return t[c]!==void 0?t[c]:""}))}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],c=l.attributes;for(let r=0;r<c.length;r++){const a=c[r];a.value.indexOf("{{")!==-1&&l.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function he(e,t,n,o,i,s){const l={};for(let r=0;r<e.children.length;r++){const a=e.children[r],d=a.getAttribute("data-ln-render-key");d&&(l[d]=a)}const c=document.createDocumentFragment();for(let r=0;r<t.length;r++){const a=t[r],d=String(o(a));let u=l[d];if(u)i(u,a,r);else{const f=fe(n,s);if(!f||(N(f,a),u=f.firstElementChild,!u))continue;u.setAttribute("data-ln-render-key",d),i(u,a,r)}c.appendChild(u)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=N,window.lnCore.fill=$,window.lnCore.lnFill=we,window.lnCore.renderList=he);function _(e,t,n){const o=e.getAttribute(t);return o===null?n:o}function B(e,t,n){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?n:o}function j(e,t,n=!1){const o=e.getAttribute(t);if(o===null)return!!n;const i=o.trim().toLowerCase();return!(i==="false"||i==="0")}function U(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const S=new Map;function W(e,t){const n=(e?e.join("|"):"")+"::"+t;if(S.has(n))return S.get(n);const o=new Set(e||[]),i=function(s,l){const c=s.getAttribute(l);return c!==null&&o.has(c)?c:t};return S.set(n,i),i}function V(e,t,n){const o=parseFloat(e.getAttribute(t));return isNaN(o)?n:o}function H(e,t,n){const o=e.getAttribute(t);if(!o)return n;try{return JSON.parse(o)}catch{return n}}function P(e,t,n,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 c=r=>{i?console.warn(r,i):console.warn(r)};if(l==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const r=e.values||[];return r.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(c(`[${s}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(c(`[${s}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(r){return c(`[${s}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function pe(e,t,n){for(const o in n){const[i,s,l]=n[o];Object.defineProperty(e,o,{get:function(){return i(t,s,l)},enumerable:!0,configurable:!0})}return e}function be(e){const t={};for(const n in e){const o=e[n];if(!o||!o.prop)continue;let i=o.read;if(!i&&o.type)switch(o.type){case"enum":i=W(o.values,o.fallback);break;case"integer":i=B;break;case"float":i=V;break;case"boolean":i=j;break;case"list":i=U;break;case"json":i=H;break;case"string":default:i=_;break}i||(i=_),t[o.prop]=[i,n,o.fallback]}return t}function ge(e){const t={};for(const n in e){const o=e[n];o&&o.effect&&(t[n]=o.effect)}return Object.keys(t).length?t:null}function me(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=pe,window.lnCore.attrSpec=be,window.lnCore.attrStr=_,window.lnCore.attrInt=B,window.lnCore.attrBool=j,window.lnCore.attrList=U,window.lnCore.attrEnum=W,window.lnCore.attrFloat=V,window.lnCore.attrJson=H);function y(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(n){console.error("["+t.attribute+"] init failed",e,n)}}}function Q(e,t,n,o){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:n,ComponentFn:o};if(e.matches&&e.matches(s)&&y(e,l),e.querySelectorAll){const c=e.querySelectorAll(s);for(let r=0;r<c.length;r++)y(c[r],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ce(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function ye(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 Ae(e){const t=G(),n=e.observed||[];for(let o=0;o<n.length;o++){const i=n[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=me(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 J(e,t,n,o){for(let i=0;i<e.length;i++){const s=e[i];if(!t[s.attribute])continue;const l=s.effects&&s.effects[n];l?l(t,n,o):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,o)}}function xe(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,o=G(),i=o.byAttr.get(t),s=F()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(t);if(!n&&!i&&!s)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(s&&x(l)){const c=o.byDeclaredAttr.get(t),r=l.getAttribute(t);for(let a=0;a<c.length;a++)P(c[a].spec,r,t,c[a].componentTag,l)}if(window.lnCore._debugSink&&(n||i)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),n){const c=o.byReactive.get(t);c&&J(c,l,t,e.oldValue),o.reactiveWildcard.length&&J(o.reactiveWildcard,l,t,e.oldValue)}if(i)for(let c=0;c<i.length;c++){const r=i[c];if(r.handler){r.handler(l,t,e.oldValue);continue}r.onAttributeChange&&l[r.attribute]?r.onAttributeChange(l,t):(Q(l,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(l))}}}function ve(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,C(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{xe(t[n])}catch(o){console.error("[ln-core] mutation handler failed",t[n].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function k(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function E(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function K(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(o){console.error("["+t.attribute+"] destroy failed",e,o)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function z(e){const t=k();if(!t.length)return;const n=e.target;if(n){const i=n.nodeType===1?n:n.parentElement;if(i&&(i.isContentEditable||i.closest&&i.closest('[contenteditable]:not([contenteditable="false"])')))return}const o=E();if(e.target&&o.length)for(let i=0;i<o.length;i++){const s=o[i],l=s.query,c=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;c&&s.onSubtreeChange(c,e)}for(let i=0;i<e.addedNodes.length;i++){const s=e.addedNodes[i];if(s.nodeType!==1)continue;const l=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const r=t[c],a=r.query;if(a&&(s.matches&&s.matches(a)&&(r.ComponentFn&&y(s,r),r.onInit&&r.onInit(s)),l&&s.querySelectorAll)){const d=s.querySelectorAll(a);for(let u=0;u<d.length;u++)r.ComponentFn&&y(d[u],r),r.onInit&&r.onInit(d[u])}}}for(let i=0;i<e.removedNodes.length;i++){const s=e.removedNodes[i];if(s.nodeType!==1||document.contains(s))continue;const l=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const r=t[c],a=r.query;if(a&&(s.matches&&s.matches(a)&&K(s,r),l&&s.querySelectorAll)){const d=s.querySelectorAll(a);for(let u=0;u<d.length;u++)K(d[u],r)}}}}function X(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,C(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const o=t[n];if(o.type==="childList")try{z(o)}catch(i){console.error("[ln-core] lifecycle handler failed",o.target,i)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function _e(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const n=t.takeRecords();for(let o=0;o<n.length;o++){const i=n[o];if(i.type==="childList")try{z(i)}catch(s){console.error("[ln-core] lifecycle handler failed",i.target,s)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function Se(e){k().push(e),e.onSubtreeChange&&e.query&&E().push(e),X()}function Z(e,t,n,o,i={}){const s=i.extraAttributes||[],l=i.onAttributeChange||null,c=i.onSubtreeChange||null,r=i.onInit||null,a=i.onAttrChange||null,d=i.effects||null,u=i.attributes||null,f=u?ge(u):d,p=u?new Set(Object.keys(u)):null,w=i.persist||null;function b(O){const h=O||document.body;if(Q(h,e,t,n),u&&F())for(const m in u){const Pe=u[m],I=Array.from(h.querySelectorAll("["+m+"]"));h.matches&&h.matches("["+m+"]")&&I.push(h);for(let q=0;q<I.length;q++){const D=I[q];x(D)&&P(Pe,D.getAttribute(m),m,o,D)}}r&&r(h)}const g=[];if(e.indexOf("[")!==-1){const O=/\[([\w-]+)/g;let h;for(;(h=O.exec(e))!==null;)g.push(h[1])}else g.push(e);Ae({selector:e,attribute:t,componentTag:o,attributes:u,ComponentFn:n,onInit:r,observed:g.concat(s),onAttributeChange:l,onAttrChange:a,effects:f,declared:p,persist:w}),ve();const A=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,ee=i.subtreeQuery||(A?e:"["+e+"]"),te={selector:e,attribute:t,ComponentFn:n,onInit:r,onSubtreeChange:c,query:ee};k().push(te),c&&ee&&E().push(te),X(),window[t]=b,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=Z,window.lnCore.observeLifecycle=Se,window.lnCore.withoutLifecycle=_e);function ne(){Ce()>0?ye(function(){b(document.body)}):b(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ne):ne(),b}function Y(e){return(e||"").replace(/^#/,"")}function L(e){const t=e===void 0?location.hash:e,n={},o=Y(t);if(!o)return n;const i=o.split("&");for(let s=0;s<i.length;s++){const l=i[s];if(!l)continue;const c=l.indexOf(":"),r=c>-1?l.slice(0,c):l,a=c>-1?l.slice(c+1):"";if(r)try{n[r]=decodeURIComponent(a)}catch{n[r]=a}}return n}function ke(e){if(!e)return null;const t=L();return e in t?t[e]:null}function Ee(e,t){if(!e)return;const n=L();t==null?delete n[e]:n[e]=String(t);const i=Object.keys(n).map(function(s){const l=n[s];return l===""?s:s+":"+encodeURIComponent(l)}).join("&");Y(location.hash)!==i&&(location.hash=i)}function Le(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Oe(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"-"+t:o:t||null}function Ie(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 De(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Fe(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),o=e.slice(t+1),i=o?o.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=L,window.lnCore.hashGet=ke,window.lnCore.hashSet=Ee,window.lnCore.hashLinkClick=Le,window.lnCore.resolveHashNamespace=Oe,window.lnCore.hashSortEncode=Ie,window.lnCore.hashSortDecode=qe,window.lnCore.hashFilterEncode=De,window.lnCore.hashFilterDecode=Fe);function Re(e){return(e||"").replace(/^\?/,"")}function Me(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},o=Re(t);if(!o)return n;const i=new URLSearchParams(o);for(const[s,l]of i.entries())n[s]=l;return n}function Te(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function $e(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const o=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",o)}function Ne(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");if(n&&n.trim()!=="")return n.trim();const o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"_"+t:o:t||null}function Be(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function je(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const o=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:o}}}return null}function Ue(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function We(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=Me,window.lnCore.queryGet=Te,window.lnCore.querySet=$e,window.lnCore.resolveQueryParam=Ne,window.lnCore.querySortEncode=Be,window.lnCore.querySortDecode=je,window.lnCore.queryFilterEncode=Ue,window.lnCore.queryFilterDecode=We);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,t=100,n=0){const o=parseFloat(String(e))||0,i=parseFloat(String(t))||100,s=parseFloat(String(n))||0,l=Math.max(s,Math.min(o,i)),c=i-s;let r=0;return c>0&&(r=(l-s)/c*100),r=Math.max(0,Math.min(100,r)),{value:o,min:s,max:i,clampedValue:l,percentage:r}}(function(){const e="data-ln-circular-progress",t="lnCircularProgress";if(window[t]!==void 0)return;function n(f){const p=f[t];p&&u.call(p)}const o={"data-ln-circular-progress":{type:"float",fallback:0,min:0,effect:n,description:"Current circular progress value"},"data-ln-circular-progress-max":{type:"float",fallback:100,min:0,effect:n,description:"Maximum circular progress scale value"},"data-ln-circular-progress-label":{type:"string",effect:n,description:"Text label format or template inside circular progress"}},i="http://www.w3.org/2000/svg",s=36,l=16,c=2*Math.PI*l;function r(f){return this.dom=f,this.svg=null,this.trackCircle=null,this.progressCircle=null,this.labelEl=null,d.call(this),u.call(this),this}r.prototype.destroy=function(){this.dom[t]&&(this.svg&&this.svg.remove(),this.labelEl&&this.labelEl.remove(),delete this.dom[t])};function a(f,p){const w=document.createElementNS(i,f);for(const[b,g]of Object.entries(p))w.setAttribute(b,g);return w}function d(){this.svg=a("svg",{viewBox:"0 0 "+s+" "+s,width:s,height:s}),this.svg.classList.add("ln-circular-progress__svg"),this.trackCircle=a("circle",{cx:s/2,cy:s/2,r:l,fill:"none","stroke-width":"3"}),this.trackCircle.classList.add("ln-circular-progress__track"),this.progressCircle=a("circle",{cx:s/2,cy:s/2,r:l,fill:"none","stroke-width":"3","stroke-linecap":"round","stroke-dasharray":c,"stroke-dashoffset":c,transform:"rotate(-90 "+s/2+" "+s/2+")"}),this.progressCircle.classList.add("ln-circular-progress__fill"),this.svg.appendChild(this.trackCircle),this.svg.appendChild(this.progressCircle),this.labelEl=document.createElement("strong"),this.labelEl.classList.add("ln-circular-progress__label"),this.dom.appendChild(this.svg),this.dom.appendChild(this.labelEl)}function u(){const f=this.dom.getAttribute("data-ln-circular-progress"),p=this.dom.getAttribute("data-ln-circular-progress-max"),w=He(f,p||100),b=c-w.percentage/100*c;this.progressCircle.setAttribute("stroke-dashoffset",b);const g=this.dom.getAttribute("data-ln-circular-progress-label"),A=g!==null?g:Math.round(w.percentage)+"%";this.labelEl.textContent=A,this.dom.setAttribute("role","progressbar"),this.dom.setAttribute("aria-valuemin",String(w.min)),this.dom.setAttribute("aria-valuemax",String(w.max)),this.dom.setAttribute("aria-valuenow",String(w.clampedValue)),this.dom.setAttribute("aria-valuetext",A),R(this.dom,"ln-circular-progress:change",{target:this.dom,value:w.value,max:w.max,percentage:w.percentage})}Z(e,t,r,"ln-circular-progress",{attributes:o})})()})();
@@ -1 +1 @@
1
- (function(){"use strict";function D(){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 y(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 i=null;for(let o=1;o<t.length;o++)if(t[o]&&t[o].nodeType===1){i=t[o];break}if(!y(i))return}e.apply(console,t)}}function F(e,t,n){const i=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))}function g(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){g(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function ie(e){return!!(!e||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||typeof e.button=="number"&&e.button!==0)}function oe(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function le(e,t){const n=!!(t&&t.typed),i=t&&t.exclude,o={},s=e.elements,l={};if(n)for(let c=0;c<s.length;c++){const r=s[c];r.name&&r.type==="checkbox"&&!r.disabled&&(l[r.name]=(l[r.name]||0)+1)}for(let c=0;c<s.length;c++){const r=s[c];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(i&&r.matches&&r.matches(i)))if(r.type==="checkbox")n&&l[r.name]===1?o[r.name]=r.checked:(o[r.name]||(o[r.name]=[]),r.checked&&o[r.name].push(r.value));else if(r.type==="radio")r.checked&&(o[r.name]=r.value);else if(r.type==="select-multiple"){o[r.name]=[];for(let u=0;u<r.options.length;u++)r.options[u].selected&&o[r.name].push(r.options[u].value)}else if(n&&r.type==="hidden")o[r.name]=r.value;else if(n&&(r.type==="number"||r.type==="range")){const u=Number(r.value);o[r.name]=r.value===""||isNaN(u)?null:u}else o[r.name]=r.value}return o}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 n=e.elements,i=[],o={};for(let s=0;s<n.length;s++){const l=n[s];l.name&&l.type==="checkbox"&&(o[l.name]=(o[l.name]||0)+1)}for(let s=0;s<n.length;s++){const l=n[s];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const c=l.getAttribute("data-ln-fill-as")||l.name;if(!c||!(c in t))continue;const r=t[c];if(l.type==="checkbox"){if(Array.isArray(r))l.checked=r.indexOf(l.value)!==-1;else if(o[l.name]>1){const u=String(r).split(",").map(function(f){return f.trim()});l.checked=u.indexOf(l.value)!==-1}else l.checked=se(r);i.push(l)}else if(l.type==="radio")l.checked=l.value===String(r),i.push(l);else if(l.type==="select-multiple"){if(Array.isArray(r))for(let u=0;u<l.options.length;u++)l.options[u].selected=r.indexOf(l.options[u].value)!==-1;i.push(l)}else l.value=r,l.tagName==="SELECT"&&r!=null&&l.setAttribute("data-ln-value",r),i.push(l)}return i}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ce,window.lnCore.serializeForm=le,window.lnCore.resolveFormMethod=oe);const R={};function ue(e,t){R[e]=t}function ae(e){return R[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ue,window.lnCore.getDataMapper=ae);function de(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,g(function(){new MutationObserver(function(){F(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const N={};function fe(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];N[n]=t}function we(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return N[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=fe,window.lnCore.getLocaleFallback=we,window.lnCore.ensureLocaleObserver=de);const A={};function he(e,t){A[e]||(A[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=A[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function $(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let l=0;l<n.length;l++){const c=n[l],r=c.getAttribute("data-ln-field");t[r]!=null&&(c.textContent=t[r])}const i=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<i.length;l++){const c=i[l],r=c.getAttribute("data-ln-attr").split(",");for(let u=0;u<r.length;u++){const f=r[u].trim().split(":");if(f.length!==2)continue;const a=f[0].trim(),d=f[1].trim();t[d]!=null&&c.setAttribute(a,t[d])}}const o=e.querySelectorAll("[data-ln-show]");for(let l=0;l<o.length;l++){const c=o[l],r=c.getAttribute("data-ln-show");r in t&&c.classList.toggle("hidden",!t[r])}const s=e.querySelectorAll("[data-ln-class]");for(let l=0;l<s.length;l++){const c=s[l],r=c.getAttribute("data-ln-class").split(",");for(let u=0;u<r.length;u++){const f=r[u].trim().split(":");if(f.length!==2)continue;const a=f[0].trim(),d=f[1].trim();d in t&&c.classList.toggle(a,!!t[d])}}return e}function be(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let i=0;i<n.length;i++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[i],t??null),n[i].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.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function M(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,c){return t[c]!==void 0?t[c]:""}))}const i=function(s,l){return t[l]!==void 0?t[l]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let s=0;s<o.length;s++){const l=o[s],c=l.attributes;for(let r=0;r<c.length;r++){const u=c[r];u.value.indexOf("{{")!==-1&&l.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function me(e,t,n,i,o,s){const l={};for(let r=0;r<e.children.length;r++){const u=e.children[r],f=u.getAttribute("data-ln-render-key");f&&(l[f]=u)}const c=document.createDocumentFragment();for(let r=0;r<t.length;r++){const u=t[r],f=String(i(u));let a=l[f];if(a)o(a,u,r);else{const d=he(n,s);if(!d||(M(d,u),a=d.firstElementChild,!a))continue;a.setAttribute("data-ln-render-key",f),o(a,u,r)}c.appendChild(a)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=M,window.lnCore.fill=$,window.lnCore.lnFill=be,window.lnCore.renderList=me);function v(e,t,n){const i=e.getAttribute(t);return i===null?n:i}function B(e,t,n){const i=parseInt(e.getAttribute(t),10);return isNaN(i)?n:i}function U(e,t,n=!1){const i=e.getAttribute(t);if(i===null)return!!n;const o=i.trim().toLowerCase();return!(o==="false"||o==="0")}function j(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const _=new Map;function W(e,t){const n=(e?e.join("|"):"")+"::"+t;if(_.has(n))return _.get(n);const i=new Set(e||[]),o=function(s,l){const c=s.getAttribute(l);return c!==null&&i.has(c)?c:t};return _.set(n,o),o}function H(e,t,n){const i=parseFloat(e.getAttribute(t));return isNaN(i)?n:i}function V(e,t,n){const i=e.getAttribute(t);if(!i)return n;try{return JSON.parse(i)}catch{return n}}function K(e,t,n,i,o){if(!e||t===null)return!0;const s=i||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const c=r=>{o?console.warn(r,o):console.warn(r)};if(l==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const r=e.values||[];return r.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(c(`[${s}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(c(`[${s}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(r){return c(`[${s}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function P(e,t,n){for(const i in n){const[o,s,l]=n[i];Object.defineProperty(e,i,{get:function(){return o(t,s,l)},enumerable:!0,configurable:!0})}return e}function Q(e){const t={};for(const n in e){const i=e[n];if(!i||!i.prop)continue;let o=i.read;if(!o&&i.type)switch(i.type){case"enum":o=W(i.values,i.fallback);break;case"integer":o=B;break;case"float":o=H;break;case"boolean":o=U;break;case"list":o=j;break;case"json":o=V;break;case"string":default:o=v;break}o||(o=v),t[i.prop]=[o,n,i.fallback]}return t}function pe(e){const t={};for(const n in e){const i=e[n];i&&i.effect&&(t[n]=i.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 n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=P,window.lnCore.attrSpec=Q,window.lnCore.attrStr=v,window.lnCore.attrInt=B,window.lnCore.attrBool=U,window.lnCore.attrList=j,window.lnCore.attrEnum=W,window.lnCore.attrFloat=H,window.lnCore.attrJson=V);function b(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(n){console.error("["+t.attribute+"] init failed",e,n)}}}function J(e,t,n,i){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:n,ComponentFn:i};if(e.matches&&e.matches(s)&&b(e,l),e.querySelectorAll){const c=e.querySelectorAll(s);for(let r=0;r<c.length;r++)b(c[r],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ce(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function ye(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 Ae(e){const t=G(),n=e.observed||[];for(let i=0;i<n.length;i++){const o=n[i];t.byAttr.has(o)||t.byAttr.set(o,[]),t.byAttr.get(o).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const i in e.attributes){t.byDeclaredAttr.has(i)||t.byDeclaredAttr.set(i,[]);const o=t.byDeclaredAttr.get(i);o.some(s=>s.componentTag===e.componentTag)||o.push({spec:e.attributes[i],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const i=ge(e);if(i===null)t.reactiveWildcard.push(e);else for(const o of i)t.byReactive.has(o)||t.byReactive.set(o,[]),t.byReactive.get(o).push(e)}e.persist&&t.persist.push(e)}function z(e,t,n,i){for(let o=0;o<e.length;o++){const s=e[o];if(!t[s.attribute])continue;const l=s.effects&&s.effects[n];l?l(t,n,i):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,i)}}function ve(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,i=G(),o=i.byAttr.get(t),s=D()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(t);if(!n&&!o&&!s)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(s&&y(l)){const c=i.byDeclaredAttr.get(t),r=l.getAttribute(t);for(let u=0;u<c.length;u++)K(c[u].spec,r,t,c[u].componentTag,l)}if(window.lnCore._debugSink&&(n||o)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),n){const c=i.byReactive.get(t);c&&z(c,l,t,e.oldValue),i.reactiveWildcard.length&&z(i.reactiveWildcard,l,t,e.oldValue)}if(o)for(let c=0;c<o.length;c++){const r=o[c];if(r.handler){r.handler(l,t,e.oldValue);continue}r.onAttributeChange&&l[r.attribute]?r.onAttributeChange(l,t):(J(l,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(l))}}}function _e(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,g(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{ve(t[n])}catch(i){console.error("[ln-core] mutation handler failed",t[n].target,i)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function x(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function S(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function k(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(i){console.error("["+t.attribute+"] destroy failed",e,i)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function X(e){const t=x();if(!t.length)return;const n=e.target;if(n){const o=n.nodeType===1?n:n.parentElement;if(o&&(o.isContentEditable||o.closest&&o.closest('[contenteditable]:not([contenteditable="false"])')))return}const i=S();if(e.target&&i.length)for(let o=0;o<i.length;o++){const s=i[o],l=s.query,c=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;c&&s.onSubtreeChange(c,e)}for(let o=0;o<e.addedNodes.length;o++){const s=e.addedNodes[o];if(s.nodeType===1){const l=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const r=t[c];if(r.selector&&r.attribute&&r.ComponentFn){if(!l)s.matches&&s.matches(r.query)&&b(s,r);else if(s.matches&&s.matches(r.query)&&b(s,r),s.querySelectorAll){const u=s.querySelectorAll(r.query);for(let f=0;f<u.length;f++)b(u[f],r)}}r.onInit&&r.onInit(s)}}}for(let o=0;o<e.removedNodes.length;o++){const s=e.removedNodes[o];if(s.nodeType===1){if(document.contains(s))continue;const l=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const r=t[c],u=r.query;if(u){if(!l)s.matches&&s.matches(u)&&k(s,r);else if(s.matches&&s.matches(u)&&k(s,r),s.querySelectorAll){const f=s.querySelectorAll(u);for(let a=0;a<f.length;a++)k(f[a],r)}}}}}}function Y(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,g(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const i=t[n];if(i.type==="childList")try{X(i)}catch(o){console.error("[ln-core] lifecycle handler failed",i.target,o)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function xe(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const n=t.takeRecords();for(let i=0;i<n.length;i++){const o=n[i];if(o.type==="childList")try{X(o)}catch(s){console.error("[ln-core] lifecycle handler failed",o.target,s)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function Se(e){x().push(e),e.onSubtreeChange&&e.query&&S().push(e),Y()}function Z(e,t,n,i,o={}){const s=o.extraAttributes||[],l=o.onAttributeChange||null,c=o.onSubtreeChange||null,r=o.onInit||null,u=o.onAttrChange||null,f=o.effects||null,a=o.attributes||null,d=a?pe(a):f,w=a?new Set(Object.keys(a)):null,m=o.persist||null;function C(L){const h=L||document.body;if(J(h,e,t,n),a&&D())for(const p in a){const Ke=a[p],O=Array.from(h.querySelectorAll("["+p+"]"));h.matches&&h.matches("["+p+"]")&&O.push(h);for(let q=0;q<O.length;q++){const I=O[q];y(I)&&K(Ke,I.getAttribute(p),p,i,I)}}r&&r(h)}const T=[];if(e.indexOf("[")!==-1){const L=/\[([\w-]+)/g;let h;for(;(h=L.exec(e))!==null;)T.push(h[1])}else T.push(e);Ae({selector:e,attribute:t,componentTag:i,attributes:a,ComponentFn:n,onInit:r,observed:T.concat(s),onAttributeChange:l,onAttrChange:u,effects:d,declared:w,persist:m}),_e();const Ve=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,te=o.subtreeQuery||(Ve?e:"["+e+"]"),ne={selector:e,attribute:t,ComponentFn:n,onInit:r,onSubtreeChange:c,query:te};x().push(ne),c&&te&&S().push(ne),Y(),window[t]=C,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=Z,window.lnCore.observeLifecycle=Se,window.lnCore.withoutLifecycle=xe);function re(){Ce()>0?ye(function(){C(document.body)}):C(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",re):re(),C}function ee(e){return(e||"").replace(/^#/,"")}function E(e){const t=e===void 0?location.hash:e,n={},i=ee(t);if(!i)return n;const o=i.split("&");for(let s=0;s<o.length;s++){const l=o[s];if(!l)continue;const c=l.indexOf(":"),r=c>-1?l.slice(0,c):l,u=c>-1?l.slice(c+1):"";if(r)try{n[r]=decodeURIComponent(u)}catch{n[r]=u}}return n}function ke(e){if(!e)return null;const t=E();return e in t?t[e]:null}function Ee(e,t){if(!e)return;const n=E();t==null?delete n[e]:n[e]=String(t);const o=Object.keys(n).map(function(s){const l=n[s];return l===""?s:s+":"+encodeURIComponent(l)}).join("&");ee(location.hash)!==o&&(location.hash=o)}function Te(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Le(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const i=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return i?t?i+"-"+t:i:t||null}function Oe(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 Ie(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 n=e.slice(0,t),i=e.slice(t+1),o=i?i.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=E,window.lnCore.hashGet=ke,window.lnCore.hashSet=Ee,window.lnCore.hashLinkClick=Te,window.lnCore.resolveHashNamespace=Le,window.lnCore.hashSortEncode=Oe,window.lnCore.hashSortDecode=qe,window.lnCore.hashFilterEncode=Ie,window.lnCore.hashFilterDecode=De);function Fe(e){return(e||"").replace(/^\?/,"")}function Re(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},i=Fe(t);if(!i)return n;const o=new URLSearchParams(i);for(const[s,l]of o.entries())n[s]=l;return n}function Ne(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function $e(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const i=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",i)}function Me(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");if(n&&n.trim()!=="")return n.trim();const i=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return i?t?i+"_"+t:i:t||null}function Be(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Ue(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const i=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:i}}}return null}function je(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function We(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=Re,window.lnCore.queryGet=Ne,window.lnCore.querySet=$e,window.lnCore.resolveQueryParam=Me,window.lnCore.querySortEncode=Be,window.lnCore.querySortDecode=Ue,window.lnCore.queryFilterEncode=je,window.lnCore.queryFilterDecode=We);function He(){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=He),(function(){const e="data-ln-confirm",t="lnConfirm",n="data-ln-confirm-state",i="data-ln-confirm-announcer";if(window[t]!==void 0)return;function s(a,d,w){return a.getAttribute(d)||w}function l(a,d,w){const m=parseFloat(a.getAttribute(d));return isNaN(m)||m<=0?w:m}function c(a){const d=document.createElement("span");return d.setAttribute(i,""),d.setAttribute("role","alert"),d.textContent=a,d}const r={"data-ln-confirm":{prop:"confirmText",type:"string",read:s,fallback:"Confirm?",description:"Prompt text or confirmation action trigger"},"data-ln-confirm-timeout":{prop:"timeout",type:"float",read:l,fallback:3,min:.1,description:"Confirmation timeout in seconds before reverting"},"data-ln-confirm-state":{prop:"confirming",type:"enum",values:["confirming"],read:(a,d)=>a.getAttribute(d)==="confirming",description:'Active confirmation state marker on button ("confirming")'}},u=Q(r);function f(a){this.dom=a,P(this,a,u),this.revertTimer=null,this._submitted=!1,this.idleEl=a.querySelector("[data-ln-confirm-idle]"),this.activeEl=a.querySelector("[data-ln-confirm-active]"),this.isTwoElementMode=!!(this.idleEl||this.activeEl),this.originalText=this.isTwoElementMode?"":a.textContent.trim();const d=this;return this._onClick=function(w){if(!ie(w))if(!d.confirming)w.preventDefault(),w.stopImmediatePropagation(),d._enterConfirm();else{if(d._submitted)return;d._submitted=!0,d._reset()}},a.addEventListener("click",this._onClick),this}f.prototype._enterConfirm=function(){if(this.dom.setAttribute(n,"confirming"),this.originalAriaLabel=this.dom.getAttribute("aria-label"),this.originalAriaLive=this.dom.getAttribute("aria-live"),this.isTwoElementMode){this.idleEl&&this.idleEl.setAttribute("hidden","true"),this.activeEl&&this.activeEl.removeAttribute("hidden");const a=this.activeEl?this.activeEl.textContent.trim():"";a&&(this.dom.setAttribute("aria-label",a),this.dom.setAttribute("aria-live","polite"))}else{const a=this.dom.querySelector("svg.ln-icon use");a&&this.originalText===""?(this.isIconButton=!0,this.originalIconHref=a.getAttribute("href"),a.setAttribute("href","#ln-icon-check"),this.dom.setAttribute("aria-label",this.confirmText),this.dom.appendChild(c(this.confirmText))):this.dom.textContent=this.confirmText}this._startTimer(),F(this.dom,"ln-confirm:waiting",{target:this.dom})},f.prototype._startTimer=function(){this.revertTimer&&clearTimeout(this.revertTimer);const a=this,d=this.timeout*1e3;this.revertTimer=setTimeout(function(){a._reset()},d)},f.prototype._reset=function(){if(this._submitted=!1,this.dom.removeAttribute(n),this.isTwoElementMode)this.idleEl&&this.idleEl.removeAttribute("hidden"),this.activeEl&&this.activeEl.setAttribute("hidden","true");else if(this.isIconButton){const a=this.dom.querySelector("svg.ln-icon use");a&&this.originalIconHref&&a.setAttribute("href",this.originalIconHref);const d=this.dom.querySelector("["+i+"]");d&&d.remove(),this.isIconButton=!1,this.originalIconHref=null}else this.dom.textContent=this.originalText;this.originalAriaLabel!==null&&this.originalAriaLabel!==void 0?this.dom.setAttribute("aria-label",this.originalAriaLabel):this.dom.removeAttribute("aria-label"),this.originalAriaLabel=null,this.originalAriaLive!==null&&this.originalAriaLive!==void 0?this.dom.setAttribute("aria-live",this.originalAriaLive):this.dom.removeAttribute("aria-live"),this.originalAriaLive=null,this.revertTimer&&(clearTimeout(this.revertTimer),this.revertTimer=null)},f.prototype.destroy=function(){this.dom[t]&&(this.confirming&&this._reset(),this.dom.removeEventListener("click",this._onClick),delete this.dom[t])},Z(e,t,f,"ln-confirm",{attributes:r})})()})();
1
+ (function(){"use strict";function q(){if(typeof window>"u")return!1;if(window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink)return!0;if(typeof document<"u"){if(document.documentElement&&document.documentElement.hasAttribute("data-ln-debug"))return!0;if(document.body)return document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null}return!1}function y(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 i=null;for(let o=1;o<t.length;o++)if(t[o]&&t[o].nodeType===1){i=t[o];break}if(!y(i))return}e.apply(console,t)}}function D(e,t,n){const i=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))}function p(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){p(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function ie(e){return!!(!e||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||typeof e.button=="number"&&e.button!==0)}function oe(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function le(e,t){const n=!!(t&&t.typed),i=t&&t.exclude,o={},s=e.elements,l={};if(n)for(let c=0;c<s.length;c++){const r=s[c];r.name&&r.type==="checkbox"&&!r.disabled&&(l[r.name]=(l[r.name]||0)+1)}for(let c=0;c<s.length;c++){const r=s[c];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(i&&r.matches&&r.matches(i)))if(r.type==="checkbox")n&&l[r.name]===1?o[r.name]=r.checked:(o[r.name]||(o[r.name]=[]),r.checked&&o[r.name].push(r.value));else if(r.type==="radio")r.checked&&(o[r.name]=r.value);else if(r.type==="select-multiple"){o[r.name]=[];for(let a=0;a<r.options.length;a++)r.options[a].selected&&o[r.name].push(r.options[a].value)}else if(n&&r.type==="hidden")o[r.name]=r.value;else if(n&&(r.type==="number"||r.type==="range")){const a=Number(r.value);o[r.name]=r.value===""||isNaN(a)?null:a}else o[r.name]=r.value}return o}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 n=e.elements,i=[],o={};for(let s=0;s<n.length;s++){const l=n[s];l.name&&l.type==="checkbox"&&(o[l.name]=(o[l.name]||0)+1)}for(let s=0;s<n.length;s++){const l=n[s];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const c=l.getAttribute("data-ln-fill-as")||l.name;if(!c||!(c in t))continue;const r=t[c];if(l.type==="checkbox"){if(Array.isArray(r))l.checked=r.indexOf(l.value)!==-1;else if(o[l.name]>1){const a=String(r).split(",").map(function(f){return f.trim()});l.checked=a.indexOf(l.value)!==-1}else l.checked=se(r);i.push(l)}else if(l.type==="radio")l.checked=l.value===String(r),i.push(l);else if(l.type==="select-multiple"){if(Array.isArray(r))for(let a=0;a<l.options.length;a++)l.options[a].selected=r.indexOf(l.options[a].value)!==-1;i.push(l)}else l.value=r,l.tagName==="SELECT"&&r!=null&&l.setAttribute("data-ln-value",r),i.push(l)}return i}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ce,window.lnCore.serializeForm=le,window.lnCore.resolveFormMethod=oe);const F={};function ue(e,t){F[e]=t}function ae(e){return F[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ue,window.lnCore.getDataMapper=ae);function de(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,p(function(){new MutationObserver(function(){D(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const R={};function fe(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];R[n]=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=fe,window.lnCore.getLocaleFallback=we,window.lnCore.ensureLocaleObserver=de);const A={};function he(e,t){A[e]||(A[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=A[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function N(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let l=0;l<n.length;l++){const c=n[l],r=c.getAttribute("data-ln-field");t[r]!=null&&(c.textContent=t[r])}const i=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<i.length;l++){const c=i[l],r=c.getAttribute("data-ln-attr").split(",");for(let a=0;a<r.length;a++){const f=r[a].trim().split(":");if(f.length!==2)continue;const u=f[0].trim(),d=f[1].trim();t[d]!=null&&c.setAttribute(u,t[d])}}const o=e.querySelectorAll("[data-ln-show]");for(let l=0;l<o.length;l++){const c=o[l],r=c.getAttribute("data-ln-show");r in t&&c.classList.toggle("hidden",!t[r])}const s=e.querySelectorAll("[data-ln-class]");for(let l=0;l<s.length;l++){const c=s[l],r=c.getAttribute("data-ln-class").split(",");for(let a=0;a<r.length;a++){const f=r[a].trim().split(":");if(f.length!==2)continue;const u=f[0].trim(),d=f[1].trim();d in t&&c.classList.toggle(u,!!t[d])}}return e}function be(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let i=0;i<n.length;i++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[i],t??null),n[i].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)N(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function $(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,c){return t[c]!==void 0?t[c]:""}))}const i=function(s,l){return t[l]!==void 0?t[l]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let s=0;s<o.length;s++){const l=o[s],c=l.attributes;for(let r=0;r<c.length;r++){const a=c[r];a.value.indexOf("{{")!==-1&&l.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function me(e,t,n,i,o,s){const l={};for(let r=0;r<e.children.length;r++){const a=e.children[r],f=a.getAttribute("data-ln-render-key");f&&(l[f]=a)}const c=document.createDocumentFragment();for(let r=0;r<t.length;r++){const a=t[r],f=String(i(a));let u=l[f];if(u)o(u,a,r);else{const d=he(n,s);if(!d||($(d,a),u=d.firstElementChild,!u))continue;u.setAttribute("data-ln-render-key",f),o(u,a,r)}c.appendChild(u)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=$,window.lnCore.fill=N,window.lnCore.lnFill=be,window.lnCore.renderList=me);function v(e,t,n){const i=e.getAttribute(t);return i===null?n:i}function M(e,t,n){const i=parseInt(e.getAttribute(t),10);return isNaN(i)?n:i}function B(e,t,n=!1){const i=e.getAttribute(t);if(i===null)return!!n;const o=i.trim().toLowerCase();return!(o==="false"||o==="0")}function U(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const _=new Map;function j(e,t){const n=(e?e.join("|"):"")+"::"+t;if(_.has(n))return _.get(n);const i=new Set(e||[]),o=function(s,l){const c=s.getAttribute(l);return c!==null&&i.has(c)?c:t};return _.set(n,o),o}function W(e,t,n){const i=parseFloat(e.getAttribute(t));return isNaN(i)?n:i}function H(e,t,n){const i=e.getAttribute(t);if(!i)return n;try{return JSON.parse(i)}catch{return n}}function V(e,t,n,i,o){if(!e||t===null)return!0;const s=i||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const c=r=>{o?console.warn(r,o):console.warn(r)};if(l==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const r=e.values||[];return r.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(c(`[${s}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(c(`[${s}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(r){return c(`[${s}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function K(e,t,n){for(const i in n){const[o,s,l]=n[i];Object.defineProperty(e,i,{get:function(){return o(t,s,l)},enumerable:!0,configurable:!0})}return e}function P(e){const t={};for(const n in e){const i=e[n];if(!i||!i.prop)continue;let o=i.read;if(!o&&i.type)switch(i.type){case"enum":o=j(i.values,i.fallback);break;case"integer":o=M;break;case"float":o=W;break;case"boolean":o=B;break;case"list":o=U;break;case"json":o=H;break;case"string":default:o=v;break}o||(o=v),t[i.prop]=[o,n,i.fallback]}return t}function pe(e){const t={};for(const n in e){const i=e[n];i&&i.effect&&(t[n]=i.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 n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=K,window.lnCore.attrSpec=P,window.lnCore.attrStr=v,window.lnCore.attrInt=M,window.lnCore.attrBool=B,window.lnCore.attrList=U,window.lnCore.attrEnum=j,window.lnCore.attrFloat=W,window.lnCore.attrJson=H);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(n){console.error("["+t.attribute+"] init failed",e,n)}}}function Q(e,t,n,i){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:n,ComponentFn:i};if(e.matches&&e.matches(s)&&g(e,l),e.querySelectorAll){const c=e.querySelectorAll(s);for(let r=0;r<c.length;r++)g(c[r],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ce(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function ye(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 J(){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=J(),n=e.observed||[];for(let i=0;i<n.length;i++){const o=n[i];t.byAttr.has(o)||t.byAttr.set(o,[]),t.byAttr.get(o).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const i in e.attributes){t.byDeclaredAttr.has(i)||t.byDeclaredAttr.set(i,[]);const o=t.byDeclaredAttr.get(i);o.some(s=>s.componentTag===e.componentTag)||o.push({spec:e.attributes[i],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const i=ge(e);if(i===null)t.reactiveWildcard.push(e);else for(const o of i)t.byReactive.has(o)||t.byReactive.set(o,[]),t.byReactive.get(o).push(e)}e.persist&&t.persist.push(e)}function G(e,t,n,i){for(let o=0;o<e.length;o++){const s=e[o];if(!t[s.attribute])continue;const l=s.effects&&s.effects[n];l?l(t,n,i):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,i)}}function ve(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,i=J(),o=i.byAttr.get(t),s=q()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(t);if(!n&&!o&&!s)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(s&&y(l)){const c=i.byDeclaredAttr.get(t),r=l.getAttribute(t);for(let a=0;a<c.length;a++)V(c[a].spec,r,t,c[a].componentTag,l)}if(window.lnCore._debugSink&&(n||o)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),n){const c=i.byReactive.get(t);c&&G(c,l,t,e.oldValue),i.reactiveWildcard.length&&G(i.reactiveWildcard,l,t,e.oldValue)}if(o)for(let c=0;c<o.length;c++){const r=o[c];if(r.handler){r.handler(l,t,e.oldValue);continue}r.onAttributeChange&&l[r.attribute]?r.onAttributeChange(l,t):(Q(l,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(l))}}}function _e(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,p(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{ve(t[n])}catch(i){console.error("[ln-core] mutation handler failed",t[n].target,i)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function x(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function S(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function z(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(i){console.error("["+t.attribute+"] destroy failed",e,i)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function X(e){const t=x();if(!t.length)return;const n=e.target;if(n){const o=n.nodeType===1?n:n.parentElement;if(o&&(o.isContentEditable||o.closest&&o.closest('[contenteditable]:not([contenteditable="false"])')))return}const i=S();if(e.target&&i.length)for(let o=0;o<i.length;o++){const s=i[o],l=s.query,c=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;c&&s.onSubtreeChange(c,e)}for(let o=0;o<e.addedNodes.length;o++){const s=e.addedNodes[o];if(s.nodeType!==1)continue;const l=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const r=t[c],a=r.query;if(a&&(s.matches&&s.matches(a)&&(r.ComponentFn&&g(s,r),r.onInit&&r.onInit(s)),l&&s.querySelectorAll)){const f=s.querySelectorAll(a);for(let u=0;u<f.length;u++)r.ComponentFn&&g(f[u],r),r.onInit&&r.onInit(f[u])}}}for(let o=0;o<e.removedNodes.length;o++){const s=e.removedNodes[o];if(s.nodeType!==1||document.contains(s))continue;const l=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const r=t[c],a=r.query;if(a&&(s.matches&&s.matches(a)&&z(s,r),l&&s.querySelectorAll)){const f=s.querySelectorAll(a);for(let u=0;u<f.length;u++)z(f[u],r)}}}}function Y(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,p(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const i=t[n];if(i.type==="childList")try{X(i)}catch(o){console.error("[ln-core] lifecycle handler failed",i.target,o)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function xe(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const n=t.takeRecords();for(let i=0;i<n.length;i++){const o=n[i];if(o.type==="childList")try{X(o)}catch(s){console.error("[ln-core] lifecycle handler failed",o.target,s)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function Se(e){x().push(e),e.onSubtreeChange&&e.query&&S().push(e),Y()}function Z(e,t,n,i,o={}){const s=o.extraAttributes||[],l=o.onAttributeChange||null,c=o.onSubtreeChange||null,r=o.onInit||null,a=o.onAttrChange||null,f=o.effects||null,u=o.attributes||null,d=u?pe(u):f,w=u?new Set(Object.keys(u)):null,b=o.persist||null;function C(T){const h=T||document.body;if(Q(h,e,t,n),u&&q())for(const m in u){const Ke=u[m],L=Array.from(h.querySelectorAll("["+m+"]"));h.matches&&h.matches("["+m+"]")&&L.push(h);for(let O=0;O<L.length;O++){const I=L[O];y(I)&&V(Ke,I.getAttribute(m),m,i,I)}}r&&r(h)}const k=[];if(e.indexOf("[")!==-1){const T=/\[([\w-]+)/g;let h;for(;(h=T.exec(e))!==null;)k.push(h[1])}else k.push(e);Ae({selector:e,attribute:t,componentTag:i,attributes:u,ComponentFn:n,onInit:r,observed:k.concat(s),onAttributeChange:l,onAttrChange:a,effects:d,declared:w,persist:b}),_e();const Ve=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,te=o.subtreeQuery||(Ve?e:"["+e+"]"),ne={selector:e,attribute:t,ComponentFn:n,onInit:r,onSubtreeChange:c,query:te};x().push(ne),c&&te&&S().push(ne),Y(),window[t]=C,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=Z,window.lnCore.observeLifecycle=Se,window.lnCore.withoutLifecycle=xe);function re(){Ce()>0?ye(function(){C(document.body)}):C(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",re):re(),C}function ee(e){return(e||"").replace(/^#/,"")}function E(e){const t=e===void 0?location.hash:e,n={},i=ee(t);if(!i)return n;const o=i.split("&");for(let s=0;s<o.length;s++){const l=o[s];if(!l)continue;const c=l.indexOf(":"),r=c>-1?l.slice(0,c):l,a=c>-1?l.slice(c+1):"";if(r)try{n[r]=decodeURIComponent(a)}catch{n[r]=a}}return n}function Ee(e){if(!e)return null;const t=E();return e in t?t[e]:null}function ke(e,t){if(!e)return;const n=E();t==null?delete n[e]:n[e]=String(t);const o=Object.keys(n).map(function(s){const l=n[s];return l===""?s:s+":"+encodeURIComponent(l)}).join("&");ee(location.hash)!==o&&(location.hash=o)}function Te(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Le(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const i=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return i?t?i+"-"+t:i:t||null}function Oe(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Ie(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 n=e.slice(0,t),i=e.slice(t+1),o=i?i.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=E,window.lnCore.hashGet=Ee,window.lnCore.hashSet=ke,window.lnCore.hashLinkClick=Te,window.lnCore.resolveHashNamespace=Le,window.lnCore.hashSortEncode=Oe,window.lnCore.hashSortDecode=Ie,window.lnCore.hashFilterEncode=qe,window.lnCore.hashFilterDecode=De);function Fe(e){return(e||"").replace(/^\?/,"")}function Re(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},i=Fe(t);if(!i)return n;const o=new URLSearchParams(i);for(const[s,l]of o.entries())n[s]=l;return n}function Ne(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function $e(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const i=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",i)}function Me(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");if(n&&n.trim()!=="")return n.trim();const i=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return i?t?i+"_"+t:i:t||null}function Be(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Ue(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const i=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:i}}}return null}function je(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function We(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=Re,window.lnCore.queryGet=Ne,window.lnCore.querySet=$e,window.lnCore.resolveQueryParam=Me,window.lnCore.querySortEncode=Be,window.lnCore.querySortDecode=Ue,window.lnCore.queryFilterEncode=je,window.lnCore.queryFilterDecode=We);function He(){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=He),(function(){const e="data-ln-confirm",t="lnConfirm",n="data-ln-confirm-state",i="data-ln-confirm-announcer";if(window[t]!==void 0)return;function s(u,d,w){return u.getAttribute(d)||w}function l(u,d,w){const b=parseFloat(u.getAttribute(d));return isNaN(b)||b<=0?w:b}function c(u){const d=document.createElement("span");return d.setAttribute(i,""),d.setAttribute("role","alert"),d.textContent=u,d}const r={"data-ln-confirm":{prop:"confirmText",type:"string",read:s,fallback:"Confirm?",description:"Prompt text or confirmation action trigger"},"data-ln-confirm-timeout":{prop:"timeout",type:"float",read:l,fallback:3,min:.1,description:"Confirmation timeout in seconds before reverting"},"data-ln-confirm-state":{prop:"confirming",type:"enum",values:["confirming"],read:(u,d)=>u.getAttribute(d)==="confirming",description:'Active confirmation state marker on button ("confirming")'}},a=P(r);function f(u){this.dom=u,K(this,u,a),this.revertTimer=null,this._submitted=!1,this.idleEl=u.querySelector("[data-ln-confirm-idle]"),this.activeEl=u.querySelector("[data-ln-confirm-active]"),this.isTwoElementMode=!!(this.idleEl||this.activeEl),this.originalText=this.isTwoElementMode?"":u.textContent.trim();const d=this;return this._onClick=function(w){if(!ie(w))if(!d.confirming)w.preventDefault(),w.stopImmediatePropagation(),d._enterConfirm();else{if(d._submitted)return;d._submitted=!0,d._reset()}},u.addEventListener("click",this._onClick),this}f.prototype._enterConfirm=function(){if(this.dom.setAttribute(n,"confirming"),this.originalAriaLabel=this.dom.getAttribute("aria-label"),this.originalAriaLive=this.dom.getAttribute("aria-live"),this.isTwoElementMode){this.idleEl&&this.idleEl.setAttribute("hidden","true"),this.activeEl&&this.activeEl.removeAttribute("hidden");const u=this.activeEl?this.activeEl.textContent.trim():"";u&&(this.dom.setAttribute("aria-label",u),this.dom.setAttribute("aria-live","polite"))}else{const u=this.dom.querySelector("svg.ln-icon use");u&&this.originalText===""?(this.isIconButton=!0,this.originalIconHref=u.getAttribute("href"),u.setAttribute("href","#ln-icon-check"),this.dom.setAttribute("aria-label",this.confirmText),this.dom.appendChild(c(this.confirmText))):this.dom.textContent=this.confirmText}this._startTimer(),D(this.dom,"ln-confirm:waiting",{target:this.dom})},f.prototype._startTimer=function(){this.revertTimer&&clearTimeout(this.revertTimer);const u=this,d=this.timeout*1e3;this.revertTimer=setTimeout(function(){u._reset()},d)},f.prototype._reset=function(){if(this._submitted=!1,this.dom.removeAttribute(n),this.isTwoElementMode)this.idleEl&&this.idleEl.removeAttribute("hidden"),this.activeEl&&this.activeEl.setAttribute("hidden","true");else if(this.isIconButton){const u=this.dom.querySelector("svg.ln-icon use");u&&this.originalIconHref&&u.setAttribute("href",this.originalIconHref);const d=this.dom.querySelector("["+i+"]");d&&d.remove(),this.isIconButton=!1,this.originalIconHref=null}else this.dom.textContent=this.originalText;this.originalAriaLabel!==null&&this.originalAriaLabel!==void 0?this.dom.setAttribute("aria-label",this.originalAriaLabel):this.dom.removeAttribute("aria-label"),this.originalAriaLabel=null,this.originalAriaLive!==null&&this.originalAriaLive!==void 0?this.dom.setAttribute("aria-live",this.originalAriaLive):this.dom.removeAttribute("aria-live"),this.originalAriaLive=null,this.revertTimer&&(clearTimeout(this.revertTimer),this.revertTimer=null)},f.prototype.destroy=function(){this.dom[t]&&(this.confirming&&this._reset(),this.dom.removeEventListener("click",this._onClick),delete this.dom[t])},Z(e,t,f,"ln-confirm",{attributes:r})})()})();
@@ -13,7 +13,7 @@ ln-core exposes helpers in these categories:
13
13
  - **DOM binding** — declarative data-attribute-driven rendering (`fill`, `renderList`, `fillTemplate`)
14
14
  - **Forms & Inputs** — serialize/populate by field `name`, intercept input value getters/setters (`interceptValueProperty`)
15
15
  - **Target & Event Predicates** — `shouldIgnoreClick`, `isTargetDisabled`, `isUsableTarget`, `isEditableTarget`
16
- - **Reactivity** — `reactiveState`, `deepReactive`, `createBatcher`
16
+ - **Reactivity & Batching** — microtask-coalesced render batcher (`createBatcher`)
17
17
  - **Windowing** — sliding-window sparse cache for server-side virtualization (`createWindowCache`)
18
18
  - **Layout & Positioning** — viewport-aware positioning (`computePlacement`), measurement (`measureHidden`)
19
19
  - **Hash codec** — namespaced URL fragment state (`hashParse`, `hashGet`, `hashSet`, `hashSortEncode`, `hashSortDecode`, `hashFilterEncode`, `hashFilterDecode`, `resolveHashNamespace`)
@@ -542,37 +542,6 @@ fetch('/tpl.html').then(html => {
542
542
 
543
543
  ## reactive.js
544
544
 
545
- ### reactiveState(initial, onChange)
546
-
547
- Shallow `Proxy` — fires `onChange(prop, value, old)` on every property set. No-op if value hasn't changed.
548
-
549
- ```js
550
- const state = reactiveState({ searchTerm: '', sortCol: -1 }, function (prop, value, old) {
551
- batchRender();
552
- });
553
- ```
554
-
555
- - Returns a Proxy wrapping a shallow copy of `initial`
556
- - Only tracks direct property assignments (not nested objects)
557
- - Used by `ln-filter` for flat state
558
-
559
- ### deepReactive(obj, onChange)
560
-
561
- Deep `Proxy` — recursively wraps nested objects and arrays. Fires `onChange()` (no args) on any nested mutation.
562
-
563
- ```js
564
- const state = deepReactive({ toasts: [], files: [] }, function () {
565
- batchRender();
566
- });
567
- state.toasts.push({ title: 'Hello' }); // triggers onChange
568
- ```
569
-
570
- - Wraps existing nested objects on creation
571
- - Auto-wraps newly assigned objects/arrays
572
- - `deleteProperty` also triggers `onChange`
573
- - Internal `Symbol('deepReactive')` flag prevents double-wrapping
574
- - Used by `ln-toast`, `ln-upload` for complex state
575
-
576
545
  ### createBatcher(renderFn, afterRender)
577
546
 
578
547
  Coalesce multiple synchronous state changes into a single `renderFn` call via `queueMicrotask`.
@@ -586,43 +555,28 @@ const batchRender = createBatcher(
586
555
 
587
556
  - Multiple calls to `schedule()` within the same microtask result in one `renderFn` call
588
557
  - Optional `afterRender` callback fires after each render
589
- - Pattern: `deepReactive(state, batchRender)` — every state mutation schedules a batched render
590
-
591
- ---
592
-
593
- ## Reactive Rendering Pattern
594
-
595
- The three reactive primitives (`reactiveState` / `deepReactive` +
596
- `createBatcher` + `fill`) are designed to be used together. They are
597
- the canonical ln-ashlar render loop:
598
-
599
- 1. **State mutation.** Component code assigns to a property on a
600
- reactive proxy (`this.state.value = 'x'`). The proxy fires its
601
- onChange callback.
602
- 2. **Microtask queue.** The onChange is wired to a `createBatcher`
603
- schedule function. Any number of synchronous assignments in the
604
- same sync block schedule a single microtask.
605
- 3. **One render.** When the microtask fires, the batcher calls
606
- `renderFn` exactly once. `renderFn` typically calls `fill(this.dom,
607
- this.state)` (or `renderList` for keyed collections) to project
608
- state into the DOM, then the optional `afterRender` callback fires
609
- (commonly used to dispatch a `ln-{component}:rendered` event).
610
-
611
- Two assignments on the same tick produce one DOM update. External
612
- callers that need to set several properties at once do not need a
613
- `batch()` helper — the batcher handles it.
614
-
615
- The pattern is: **state mutation → microtask queue → one render**.
616
- Never wire a reactive onChange directly to `_render()` without a
617
- batcher between them — you will get one render per assignment, and
618
- the DOM will thrash.
619
-
620
- For the full decision matrix (`reactiveState` vs `deepReactive`, when
621
- to use this pattern at all, anti-patterns), see
622
- [Reactive Rendering Pattern in components/COMPONENTS.md](../../components/COMPONENTS.md#reactive-rendering-pattern).
558
+ - Pattern: used in `ln-search`, `ln-filter`, `ln-list`, `ln-data-coordinator` to debounce/coalesce state and render operations
623
559
 
624
560
  ---
625
561
 
562
+ ## Reactive Rendering Pattern
563
+
564
+ The `createBatcher` primitive and DOM rendering helpers (`fill`, `renderList`) are designed to be used together as the canonical ln-ashlar microtask render loop:
565
+
566
+ 1. **State mutation.** Component updates internal data properties (e.g. `this.state.key = 'val'`).
567
+ 2. **Microtask queue.** The component triggers the `schedule()` function returned by `createBatcher`. Any number of synchronous assignments in the same sync block schedule a single microtask.
568
+ 3. **One render.** When the microtask fires, the batcher calls `renderFn` exactly once. `renderFn` typically calls `fill(this.dom, this.state)` (or `renderList` for keyed collections) to project state into the DOM, then the optional `afterRender` callback fires (commonly used to dispatch a `ln-{component}:rendered` or changed event).
569
+
570
+ Two state assignments on the same tick produce one DOM update:
571
+
572
+ The pattern is: **state mutation → microtask queue → one render**.
573
+ Never wire sync state updates directly to immediate DOM writes when multiple attributes or filter parameters can change simultaneously — batching prevents layout thrashing.
574
+
575
+ For further details, see
576
+ [Reactive Rendering Pattern in components/COMPONENTS.md](../../components/COMPONENTS.md#reactive-rendering-pattern).
577
+
578
+ ---
579
+
626
580
  ## window-cache.js
627
581
 
628
582
  ### createWindowCache(config)
@@ -981,7 +935,7 @@ Returns `true` if the element is an `<input>`, `<textarea>`, `<select>`, or `[co
981
935
  ## Typical Usage Pattern
982
936
 
983
937
  ```js
984
- import { dispatch, dispatchCancelable, guardBody, findElements, deepReactive, createBatcher, fill, renderList } from '../ln-core';
938
+ import { dispatch, dispatchCancelable, guardBody, findElements, createBatcher, fill, renderList } from '../ln-core';
985
939
 
986
940
  (function () {
987
941
  const DOM_SELECTOR = 'data-ln-example';
@@ -997,8 +951,10 @@ import { dispatch, dispatchCancelable, guardBody, findElements, deepReactive, cr
997
951
  const self = this;
998
952
 
999
953
  // Reactive state + batched rendering
1000
- const batchRender = createBatcher(function () { self._render(); });
1001
- this.state = deepReactive({ items: [] }, batchRender);
954
+ this.state = { items: [] };
955
+ this.batchRender = createBatcher(function () {
956
+ if (!self._destroyed) self._render();
957
+ });
1002
958
 
1003
959
  return this;
1004
960
  }
@@ -4,8 +4,11 @@ export function hasActiveDebug() {
4
4
  if (typeof window === 'undefined') return false;
5
5
  if (window.lnDebug === true) return true;
6
6
  if (window.lnCore && window.lnCore._debugSink) return true;
7
- if (typeof document !== 'undefined' && document.body) {
8
- return document.body.hasAttribute('data-ln-debug') || document.body.querySelector('[data-ln-debug]') !== null;
7
+ if (typeof document !== 'undefined') {
8
+ if (document.documentElement && document.documentElement.hasAttribute('data-ln-debug')) return true;
9
+ if (document.body) {
10
+ return document.body.hasAttribute('data-ln-debug') || document.body.querySelector('[data-ln-debug]') !== null;
11
+ }
9
12
  }
10
13
  return false;
11
14
  }
@@ -1,5 +1,5 @@
1
1
  export { cloneTemplate, cloneTemplateScoped, dispatch, dispatchCancelable, requestData, fill, lnFill, fillTemplate, renderList, buildDict, guardBody, findElements, isVisible, shouldIgnoreClick, isTargetDisabled, isUsableTarget, isEditableTarget, serializeForm, populateForm, resolveFormMethod, getLocale, readValue, detectValueType, compareValues, registerComponent, shouldInterceptLink, buildUrl, getHeaders, parseHeaders, registerDataMapper, getDataMapper, interceptValueProperty, registerLocaleFallback, getLocaleFallback, holdInit, releaseInit, pendingCount, queueBoot, ensureLocaleObserver, observeAttributes, observeLifecycle, withoutLifecycle, setDebugSink, setPersistSink, isDevMode, hasActiveDebug } from './helpers.js';
2
- export { reactiveState, deepReactive, createBatcher } from './reactive.js';
2
+ export { createBatcher } from './reactive.js';
3
3
  export { createWindowCache } from './window-cache.js';
4
4
  export { hashParse, hashGet, hashSet, hashLinkClick, resolveHashNamespace, hashSortEncode, hashSortDecode, hashFilterEncode, hashFilterDecode } from './hash.js';
5
5
  export { queryParse, queryGet, querySet, resolveQueryParam, querySortEncode, querySortDecode, queryFilterEncode, queryFilterDecode } from './query.js';