@livenetworks/ashlar 2.0.10 → 2.1.0

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 (63) hide show
  1. package/components/ln-accordion/ln-accordion.js +1 -1
  2. package/components/ln-ajax/ln-ajax.js +1 -1
  3. package/components/ln-ajax/src/ln-ajax.js +15 -26
  4. package/components/ln-api-connector/ln-api-connector.js +1 -1
  5. package/components/ln-api-queue/ln-api-queue.js +1 -1
  6. package/components/ln-autoresize/ln-autoresize.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/helpers.js +1 -1
  12. package/components/ln-core/index.js +1 -1
  13. package/components/ln-core/lifecycle.js +97 -40
  14. package/components/ln-couchdb-connector/ln-couchdb-connector.js +1 -1
  15. package/components/ln-data-coordinator/ln-data-coordinator.js +1 -1
  16. package/components/ln-data-store/ln-data-store.js +1 -1
  17. package/components/ln-date/ln-date.js +1 -1
  18. package/components/ln-debug/ln-debug.js +1 -1
  19. package/components/ln-dropdown/ln-dropdown.js +1 -1
  20. package/components/ln-editor/ln-editor.js +1 -1
  21. package/components/ln-external-links/ln-external-links.js +1 -1
  22. package/components/ln-external-links/src/ln-external-links.js +9 -21
  23. package/components/ln-filter/ln-filter.js +1 -1
  24. package/components/ln-form/ln-form.js +1 -1
  25. package/components/ln-icon/ln-icon.js +1 -1
  26. package/components/ln-icon/src/ln-icon.js +14 -16
  27. package/components/ln-include/ln-include.js +1 -1
  28. package/components/ln-key/ln-key.js +1 -1
  29. package/components/ln-link/ln-link.js +1 -1
  30. package/components/ln-link/src/ln-link.js +16 -26
  31. package/components/ln-list/ln-list.js +1 -1
  32. package/components/ln-modal/ln-modal.js +1 -1
  33. package/components/ln-nav/ln-nav.js +1 -1
  34. package/components/ln-nav/src/ln-nav.js +5 -4
  35. package/components/ln-number/ln-number.js +1 -1
  36. package/components/ln-obfuscator/ln-obfuscator.js +1 -1
  37. package/components/ln-options/ln-options.js +1 -1
  38. package/components/ln-persist/ln-persist.js +1 -1
  39. package/components/ln-picklist/ln-picklist.js +1 -1
  40. package/components/ln-popover/ln-popover.js +1 -1
  41. package/components/ln-progress/ln-progress.js +1 -1
  42. package/components/ln-progress/src/ln-progress.js +9 -21
  43. package/components/ln-router/ln-router.js +1 -1
  44. package/components/ln-scroll/ln-scroll.js +1 -1
  45. package/components/ln-search/ln-search.js +1 -1
  46. package/components/ln-slug/ln-slug.js +1 -1
  47. package/components/ln-sort/ln-sort.js +1 -1
  48. package/components/ln-sortable/ln-sortable.js +1 -1
  49. package/components/ln-stat/ln-stat.js +1 -1
  50. package/components/ln-table/ln-table.js +1 -1
  51. package/components/ln-table-coordinator/ln-table-coordinator.js +1 -1
  52. package/components/ln-tabs/ln-tabs.js +1 -1
  53. package/components/ln-time/ln-time.js +1 -1
  54. package/components/ln-toast/ln-toast.js +1 -1
  55. package/components/ln-toggle/ln-toggle.js +1 -1
  56. package/components/ln-tooltip/ln-tooltip.js +1 -1
  57. package/components/ln-translations/ln-translations.js +1 -1
  58. package/components/ln-ui-coordinator/ln-ui-coordinator.js +1 -1
  59. package/components/ln-upload/ln-upload.js +1 -1
  60. package/components/ln-validate/ln-validate.js +1 -1
  61. package/components/ln-websocket-connector/ln-websocket-connector.js +1 -1
  62. package/package.json +1 -1
  63. 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 I(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let r=null;for(let o=1;o<t.length;o++)if(t[o]&&t[o].nodeType===1){r=t[o];break}if(!I(r))return}e.apply(console,t)}}function H(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function M(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){M(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function ae(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ce(e,t){const n=!!(t&&t.typed),r=t&&t.exclude,o={},a=e.elements,s={};if(n)for(let c=0;c<a.length;c++){const l=a[c];l.name&&l.type==="checkbox"&&!l.disabled&&(s[l.name]=(s[l.name]||0)+1)}for(let c=0;c<a.length;c++){const l=a[c];if(!(!l.name||l.disabled||l.type==="file"||l.type==="submit"||l.type==="button")&&!(r&&l.matches&&l.matches(r)))if(l.type==="checkbox")n&&s[l.name]===1?o[l.name]=l.checked:(o[l.name]||(o[l.name]=[]),l.checked&&o[l.name].push(l.value));else if(l.type==="radio")l.checked&&(o[l.name]=l.value);else if(l.type==="select-multiple"){o[l.name]=[];for(let i=0;i<l.options.length;i++)l.options[i].selected&&o[l.name].push(l.options[i].value)}else if(n&&l.type==="hidden")o[l.name]=l.value;else if(n&&(l.type==="number"||l.type==="range")){const i=Number(l.value);o[l.name]=l.value===""||isNaN(i)?null:i}else o[l.name]=l.value}return o}function ue(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function de(e,t){const n=e.elements,r=[],o={};for(let a=0;a<n.length;a++){const s=n[a];s.name&&s.type==="checkbox"&&(o[s.name]=(o[s.name]||0)+1)}for(let a=0;a<n.length;a++){const s=n[a];if(s.type==="file"||s.type==="submit"||s.type==="button")continue;const c=s.getAttribute("data-ln-fill-as")||s.name;if(!c||!(c in t))continue;const l=t[c];if(s.type==="checkbox"){if(Array.isArray(l))s.checked=l.indexOf(s.value)!==-1;else if(o[s.name]>1){const i=String(l).split(",").map(function(u){return u.trim()});s.checked=i.indexOf(s.value)!==-1}else s.checked=ue(l);r.push(s)}else if(s.type==="radio")s.checked=s.value===String(l),r.push(s);else if(s.type==="select-multiple"){if(Array.isArray(l))for(let i=0;i<s.options.length;i++)s.options[i].selected=l.indexOf(s.options[i].value)!==-1;r.push(s)}else s.value=l,s.tagName==="SELECT"&&l!=null&&s.setAttribute("data-ln-value",l),r.push(s)}return r}function fe(e,t,{get:n,set:r}){Object.defineProperty(e,"value",{get:function(){return n?n.call(this):t.get.call(this)},set:function(o){r?r.call(this,o,a=>t.set.call(this,a)):t.set.call(this,o)},configurable:!0})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=de,window.lnCore.serializeForm=ce,window.lnCore.resolveFormMethod=ae);const W={};function he(e,t){W[e]=t}function me(e){return W[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=he,window.lnCore.getDataMapper=me);function L(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 U(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,M(function(){new MutationObserver(function(){H(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const K={};function Q(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];K[n]=t}function E(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return K[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Q,window.lnCore.getLocaleFallback=E,window.lnCore.ensureLocaleObserver=U);const F={};function pe(e,t){F[e]||(F[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=F[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function Y(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let s=0;s<n.length;s++){const c=n[s],l=c.getAttribute("data-ln-field");t[l]!=null&&(c.textContent=t[l])}const r=e.querySelectorAll("[data-ln-attr]");for(let s=0;s<r.length;s++){const c=r[s],l=c.getAttribute("data-ln-attr").split(",");for(let i=0;i<l.length;i++){const u=l[i].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),h=u[1].trim();t[h]!=null&&c.setAttribute(d,t[h])}}const o=e.querySelectorAll("[data-ln-show]");for(let s=0;s<o.length;s++){const c=o[s],l=c.getAttribute("data-ln-show");l in t&&c.classList.toggle("hidden",!t[l])}const a=e.querySelectorAll("[data-ln-class]");for(let s=0;s<a.length;s++){const c=a[s],l=c.getAttribute("data-ln-class").split(",");for(let i=0;i<l.length;i++){const u=l[i].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),h=u[1].trim();h in t&&c.classList.toggle(d,!!t[h])}}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 r=0;r<n.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[r],t??null),n[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)Y(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 J(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const a=n.currentNode;a.textContent.indexOf("{{")!==-1&&(a.textContent=a.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(s,c){return t[c]!==void 0?t[c]:""}))}const r=function(a,s){return t[s]!==void 0?t[s]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let a=0;a<o.length;a++){const s=o[a],c=s.attributes;for(let l=0;l<c.length;l++){const i=c[l];i.value.indexOf("{{")!==-1&&s.setAttribute(i.name,i.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function ge(e,t,n,r,o,a){const s={};for(let l=0;l<e.children.length;l++){const i=e.children[l],u=i.getAttribute("data-ln-render-key");u&&(s[u]=i)}const c=document.createDocumentFragment();for(let l=0;l<t.length;l++){const i=t[l],u=String(r(i));let d=s[u];if(d)o(d,i,l);else{const h=pe(n,a);if(!h||(J(h,i),d=h.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",u),o(d,i,l)}c.appendChild(d)}e.textContent="",e.appendChild(c)}function be(e,t){const n={},r=e.querySelectorAll("["+t+"]");for(let o=0;o<r.length;o++)n[r[o].getAttribute(t)]=r[o].textContent,r[o].remove();return n}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=J,window.lnCore.fill=Y,window.lnCore.lnFill=we,window.lnCore.renderList=ge);function R(e,t,n){const r=e.getAttribute(t);return r===null?n:r}function z(e,t,n){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?n:r}function G(e,t,n=!1){const r=e.getAttribute(t);if(r===null)return!!n;const o=r.trim().toLowerCase();return!(o==="false"||o==="0")}function X(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const B=new Map;function Z(e,t){const n=(e?e.join("|"):"")+"::"+t;if(B.has(n))return B.get(n);const r=new Set(e||[]),o=function(a,s){const c=a.getAttribute(s);return c!==null&&r.has(c)?c:t};return B.set(n,o),o}function ee(e,t,n){const r=parseFloat(e.getAttribute(t));return isNaN(r)?n:r}function te(e,t,n){const r=e.getAttribute(t);if(!r)return n;try{return JSON.parse(r)}catch{return n}}function ne(e,t,n,r,o){if(!e||t===null)return!0;const a=r||"ln-component",s=e.type;if(s==="trigger"||s==="marker"||s==="string"||s==="list"||!s||t===""&&e.fallback!==void 0)return!0;const c=l=>{o?console.warn(l,o):console.warn(l)};if(s==="boolean"){const l=t.trim().toLowerCase();return l!==""&&l!=="true"&&l!=="false"&&l!=="1"&&l!=="0"?(c(`[${a}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(s==="enum"){const l=e.values||[];return l.includes(t)?!0:(c(`[${a}] Invalid value "${t}" for attribute "${n}". Allowed: ${l.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(s==="integer"){if(!/^-?\d+$/.test(t))return c(`[${a}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const l=parseInt(t,10);return e.min!==void 0&&l<e.min?(c(`[${a}] Value ${l} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&l>e.max?(c(`[${a}] Value ${l} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(s==="float")return isNaN(Number(t))?(c(`[${a}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(s==="json")try{return JSON.parse(t),!0}catch(l){return c(`[${a}] Invalid JSON for attribute "${n}": ${l.message}. Fallback: ${e.fallback}.`),!1}return!0}function ye(e,t,n){for(const r in n){const[o,a,s]=n[r];Object.defineProperty(e,r,{get:function(){return o(t,a,s)},enumerable:!0,configurable:!0})}return e}function Ce(e){const t={};for(const n in e){const r=e[n];if(!r||!r.prop)continue;let o=r.read;if(!o&&r.type)switch(r.type){case"enum":o=Z(r.values,r.fallback);break;case"integer":o=z;break;case"float":o=ee;break;case"boolean":o=G;break;case"list":o=X;break;case"json":o=te;break;case"string":default:o=R;break}o||(o=R),t[r.prop]=[o,n,r.fallback]}return t}function _e(e){const t={};for(const n in e){const r=e[n];r&&r.effect&&(t[n]=r.effect)}return Object.keys(t).length?t:null}function 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=ye,window.lnCore.attrSpec=Ce,window.lnCore.attrStr=R,window.lnCore.attrInt=z,window.lnCore.attrBool=G,window.lnCore.attrList=X,window.lnCore.attrEnum=Z,window.lnCore.attrFloat=ee,window.lnCore.attrJson=te);function $(e,t,n,r){if(e.nodeType!==1)return;const a=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",s=Array.from(e.querySelectorAll(a));e.matches&&e.matches(a)&&s.push(e);for(const c of s)if(!c[n]){window.lnCore._persistSink&&c.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(c,t);try{c[n]=new r(c)}catch(l){console.error("["+n+"] init failed",c,l)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ae(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function xe(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function re(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function Se(e){const t=re(),n=e.observed||[];for(let r=0;r<n.length;r++){const o=n[r];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 r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const o=t.byDeclaredAttr.get(r);o.some(a=>a.componentTag===e.componentTag)||o.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=ve(e);if(r===null)t.reactiveWildcard.push(e);else for(const o of r)t.byReactive.has(o)||t.byReactive.set(o,[]),t.byReactive.get(o).push(e)}e.persist&&t.persist.push(e)}function oe(e,t,n,r){for(let o=0;o<e.length;o++){const a=e[o];if(!t[a.attribute])continue;const s=a.effects&&a.effects[n];s?s(t,n,r):a.onAttrChange&&(!a.declared||a.declared.has(n))&&a.onAttrChange(t,n,r)}}function ke(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const r=re(),o=r.byAttr.get(n);if(P()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(n)&&I(t)){const a=r.byDeclaredAttr.get(n),s=t.getAttribute(n);for(let c=0;c<a.length;c++)ne(a[c].spec,s,n,a[c].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||o)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const a=r.byReactive.get(n);a&&oe(a,t,n,e.oldValue),r.reactiveWildcard.length&&oe(r.reactiveWildcard,t,n,e.oldValue)}if(o)for(let a=0;a<o.length;a++){const s=o[a];if(s.handler){s.handler(t,n,e.oldValue);continue}s.onAttributeChange&&t[s.attribute]?s.onAttributeChange(t,n):($(t,s.selector,s.attribute,s.ComponentFn),s.onInit&&s.onInit(t))}}function Ee(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,M(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{ke(t[n])}catch(r){console.error("[ln-core] mutation handler failed",t[n].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function ie(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function Oe(e){const t=ie();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const r=t[n];if(r.onSubtreeChange){const o=r.query,a=e.target.nodeType===1?e.target.matches(o)?e.target:e.target.closest(o):e.target.parentElement?e.target.parentElement.closest(o):null;a&&r.onSubtreeChange(a,e)}}for(let n=0;n<e.addedNodes.length;n++){const r=e.addedNodes[n];if(r.nodeType===1)for(let o=0;o<t.length;o++){const a=t[o];$(r,a.selector,a.attribute,a.ComponentFn),a.onInit&&a.onInit(r)}}for(let n=0;n<e.removedNodes.length;n++){const r=e.removedNodes[n];if(r.nodeType===1)for(let o=0;o<t.length;o++){const a=t[o],s=a.query,c=Array.from(r.querySelectorAll(s));r.matches&&r.matches(s)&&c.push(r);for(let l=0;l<c.length;l++){const i=c[l];if(!document.contains(i)){const u=i[a.attribute];if(u&&typeof u.destroy=="function")try{u.destroy()}catch(d){console.error("["+a.attribute+"] destroy failed",i,d)}delete i[a.attribute]}}}}}}function Te(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,M(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{Oe(r)}catch(o){console.error("[ln-core] lifecycle handler failed",r.target,o)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function le(e,t,n,r,o={}){const a=o.extraAttributes||[],s=o.onAttributeChange||null,c=o.onSubtreeChange||null,l=o.onInit||null,i=o.onAttrChange||null,u=o.effects||null,d=o.attributes||null,h=d?_e(d):u,b=d?new Set(Object.keys(d)):null,w=o.persist||null;function g(m){const p=m||document.body;if($(p,e,t,n),d&&P())for(const y in d){const v=d[y],x=Array.from(p.querySelectorAll("["+y+"]"));p.matches&&p.matches("["+y+"]")&&x.push(p);for(let D=0;D<x.length;D++){const k=x[D];I(k)&&ne(v,k.getAttribute(y),y,r,k)}}l&&l(p)}const C=[];if(e.indexOf("[")!==-1){const m=/\[([\w-]+)/g;let p;for(;(p=m.exec(e))!==null;)C.push(p[1])}else C.push(e);Se({selector:e,attribute:t,componentTag:r,attributes:d,ComponentFn:n,onInit:l,observed:C.concat(a),onAttributeChange:s,onAttrChange:i,effects:h,declared:b,persist:w}),Ee();const A=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,T=o.subtreeQuery||(A?e:"["+e+"]");ie().push({selector:e,attribute:t,ComponentFn:n,onInit:l,onSubtreeChange:c,query:T}),Te(),window[t]=g,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=le);function f(){Ae()>0?xe(function(){g(document.body)}):g(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",f):f(),g}function se(e){return(e||"").replace(/^#/,"")}function V(e){const t=e===void 0?location.hash:e,n={},r=se(t);if(!r)return n;const o=r.split("&");for(let a=0;a<o.length;a++){const s=o[a];if(!s)continue;const c=s.indexOf(":"),l=c>-1?s.slice(0,c):s,i=c>-1?s.slice(c+1):"";if(l)try{n[l]=decodeURIComponent(i)}catch{n[l]=i}}return n}function De(e){if(!e)return null;const t=V();return e in t?t[e]:null}function Me(e,t){if(!e)return;const n=V();t==null?delete n[e]:n[e]=String(t);const o=Object.keys(n).map(function(a){const s=n[a];return s===""?a:a+":"+encodeURIComponent(s)}).join("&");se(location.hash)!==o&&(location.hash=o)}function Le(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ne(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function Ie(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Fe(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Re(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Be(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),r=e.slice(t+1),o=r?r.split(",").map(function(a){try{return decodeURIComponent(a)}catch{return a}}).filter(Boolean):[];return{key:n,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=V,window.lnCore.hashGet=De,window.lnCore.hashSet=Me,window.lnCore.hashLinkClick=Le,window.lnCore.resolveHashNamespace=Ne,window.lnCore.hashSortEncode=Ie,window.lnCore.hashSortDecode=Fe,window.lnCore.hashFilterEncode=Re,window.lnCore.hashFilterDecode=Be);function $e(){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=$e);function _(e){if(e==null||e==="")return null;if(e instanceof Date)return isNaN(e.getTime())?null:e;const t=Number(e);if(!isNaN(t)&&t>0){const n=t<1e11?t*1e3:t,r=new Date(n);return isNaN(r.getTime())?null:r}if(typeof e=="string"){const n=e.trim();if(!n)return null;const r=/^(\d{4})-(\d{2})-(\d{2})$/.exec(n);if(r){const a=+r[1],s=+r[2],c=+r[3],l=new Date(a,s-1,c);return l.getFullYear()!==a||l.getMonth()!==s-1||l.getDate()!==c?null:l}const o=new Date(n);return isNaN(o.getTime())?null:o}return null}function S(e){if(!e||!(e instanceof Date)||isNaN(e.getTime()))return"";const t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return t+"-"+n+"-"+r}const j=/^(short|medium|long)(\s+datetime)?$/,Ve={short:{dateStyle:"short"},medium:{dateStyle:"medium"},long:{dateStyle:"long"},"short datetime":{dateStyle:"short",timeStyle:"short"},"medium datetime":{dateStyle:"medium",timeStyle:"short"},"long datetime":{dateStyle:"long",timeStyle:"short"}};function je(e){return!e||e===""?{dateStyle:"medium"}:String(e).trim().match(j)?Ve[e.trim()]:null}function O(e){if(!e||typeof e!="string")return null;const t=e.trim();if(t.length<6)return null;let n,r;if(t.indexOf(".")!==-1)n=".",r=t.split(".");else if(t.indexOf("/")!==-1)n="/",r=t.split("/");else if(t.indexOf("-")!==-1)n="-",r=t.split("-");else return null;if(r.length!==3)return null;const o=[];for(let i=0;i<3;i++){const u=parseInt(r[i],10);if(isNaN(u))return null;o.push(u)}let a,s,c;n==="."?(a=o[0],s=o[1],c=o[2]):n==="/"?(s=o[0],a=o[1],c=o[2]):r[0].length===4?(c=o[0],s=o[1],a=o[2]):(a=o[0],s=o[1],c=o[2]),c<100&&(c+=c<50?2e3:1900);const l=new Date(c,s-1,a);return l.getFullYear()!==c||l.getMonth()!==s-1||l.getDate()!==a?null:l}function q(e,t,n,r){if(!e||!(e instanceof Date)||isNaN(e.getTime())||!t||typeof t!="string")return"";const o=e.getDate(),a=e.getMonth(),s=e.getFullYear(),c=e.getHours(),l=e.getMinutes();let i,u;const d=(n||"").toLowerCase().split("-")[0];let h=!1;try{const g=new Intl.DateTimeFormat(n,{month:"long"}).resolvedOptions().locale.toLowerCase().split("-")[0];h=!!(r&&g!==d)}catch{h=!!r}if(h&&r&&r.monthsLong)i=r.monthsLong[a];else try{i=new Intl.DateTimeFormat(n,{month:"long"}).format(e)}catch{i=String(a+1)}if(h&&r&&r.monthsShort)u=r.monthsShort[a];else try{u=new Intl.DateTimeFormat(n,{month:"short"}).format(e)}catch{u=String(a+1)}const b={yyyy:String(s),yy:String(s).slice(-2),MMMM:i,MMM:u,MM:String(a+1).padStart(2,"0"),M:String(a+1),dd:String(o).padStart(2,"0"),d:String(o),HH:String(c).padStart(2,"0"),mm:String(l).padStart(2,"0")};return t.replace(/yyyy|yy|MMMM|MMM|MM|M|dd|d|HH|mm/g,function(w){return b[w]!==void 0?b[w]:w})}function N(e,t,n,r){if(!e||!(e instanceof Date)||isNaN(e.getTime()))return"";const o=je(t);if(o)try{const a=new Intl.DateTimeFormat(n,o),s=(n||"").toLowerCase().split("-")[0],c=a.resolvedOptions().locale.toLowerCase().split("-")[0];return r&&c!==s?q(e,"dd.MM.yyyy",n,r):a.format(e)}catch{return q(e,"dd.MM.yyyy",n,r)}return q(e,t||"dd.MM.yyyy",n,r)}(function(){const e="data-ln-date",t="lnDate";if(window[t]!==void 0)return;function n(i){const u=i[t];if(u){if(u.isTextElement)u._initTextElement();else if(u.value){const d=_(u.value);d&&u._displayFormatted(d)}}}const r={"data-ln-date":{type:"enum",values:["short","medium","long","full","iso"],fallback:"medium",effect:n,description:"Date display style preset or activator"},"data-ln-date-format":{type:"string",effect:n,description:"Custom Intl.DateTimeFormat pattern or options"},"data-ln-date-locale":{type:"string",effect:n,description:"BCP 47 language tag override for date formatting"},"data-ln-value":{type:"string",effect:n,description:"Raw ISO date string or timestamp for non-time elements (td, span)"},"data-ln-date-dict":{type:"marker",description:"Container for date translation dictionary"},"data-ln-date-dict-key":{type:"string",description:"Dictionary key for relative time or custom date formatting"},"data-ln-date-field":{type:"string",description:"Field name mapping for date record binding"},"data-ln-date-label":{type:"string",description:"Accessible label text for the date input"}},o=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");function a(i,u,d){H(i.dom,"ln-date:change",{value:u,formatted:i.dom.value,date:d}),i.dom.dispatchEvent(new Event("change",{bubbles:!0}))}function s(i,u,d,h){i._setHiddenRaw(u),o.set.call(i._picker,u),i._lastISO=u,h!==void 0?(i._isFormatting=!0,i.dom.value=h,i._isFormatting=!1):d&&i._displayFormatted(d),a(i,u,d)}function c(i){i._setHiddenRaw(""),o.set.call(i._picker,""),i._isFormatting=!0,i.dom.value="",i._isFormatting=!1,i._lastISO="",a(i,"",null)}function l(i){if(i[t])return i[t];i[t]=this,this.dom=i;const u=this;if(this._onLocaleChange=function(){if(u.isTextElement)u._formatTextContent();else if(u.value){const f=_(u.value);f&&u._displayFormatted(f)}},U(),document.addEventListener("ln-core:locale-change",this._onLocaleChange),i.tagName!=="INPUT")return this.isTextElement=!0,this._initTextElement(),this;this.isTextElement=!1;const d=i.value,h=i.name,b=i.closest(".form-element, form")||i.parentNode;if(b){const f=b.querySelectorAll("[data-ln-date-dict]");for(let m=0;m<f.length;m++){const p=f[m].getAttribute("data-ln-date-dict");if(p){const y=be(f[m],"data-ln-date-dict-key");y["months-long"]&&(y.monthsLong=y["months-long"].split(",").map(v=>v.trim())),y["months-short"]&&(y.monthsShort=y["months-short"].split(",").map(v=>v.trim())),Q(p,y)}}}const w=document.createElement("span");w.setAttribute("data-ln-date-field",""),i.parentNode.insertBefore(w,i),w.appendChild(i),this._wrapper=w;const g=document.createElement("input");g.type="hidden",g.name=h,i.removeAttribute("name"),i.hasAttribute("data-ln-fill-as")&&g.setAttribute("data-ln-fill-as",i.getAttribute("data-ln-fill-as")),i.insertAdjacentElement("afterend",g),this._hidden=g;const C=document.createElement("input");C.type="date",C.tabIndex=-1,C.setAttribute("tabindex","-1"),C.setAttribute("aria-hidden","true"),C.setAttribute("aria-label",i.getAttribute("data-ln-date-label")||"Date picker"),C.style.cssText="position:absolute;opacity:0;width:0;height:0;overflow:hidden;pointer-events:none",g.insertAdjacentElement("afterend",C),this._picker=C,i.type="text";const A=document.createElement("button");A.type="button",A.setAttribute("aria-label",i.getAttribute("data-ln-date-label")||"Open date picker"),A.innerHTML='<svg class="ln-icon" aria-hidden="true"><use href="#ln-icon-calendar"></use></svg>',C.insertAdjacentElement("afterend",A),this._btn=A,this._lastISO="",Object.defineProperty(g,"value",{get:function(){return o.get.call(g)},set:function(f){if(o.set.call(g,f),f&&f!==""){const m=_(f);m&&s(u,f,m)}else f===""&&c(u)}}),fe(i,o,{get:function(){return o.get.call(i)},set:function(f,m){if(u._isFormatting){m(f);return}if(!f||f===""){m(""),c(u);return}const p=_(f)||O(f);if(p){const y=S(p),v=i.getAttribute(e)||"",x=L(i),D=E(x),k=N(p,v,x,D);m(k),s(u,y,p,k)}else m(String(f)),c(u)}}),this._onPickerChange=function(){const f=C.value;if(f){const m=_(f);m&&s(u,f,m)}else c(u)},C.addEventListener("change",this._onPickerChange),this._onBlur=function(){const f=u.dom.value.trim();if(f===""){u._lastISO!==""&&c(u);return}if(u._lastISO){const p=_(u._lastISO);if(p){const y=u.dom.getAttribute(e)||"",v=L(u.dom),x=E(v);if(f===N(p,y,v,x))return}}const m=O(f);if(m){const p=S(m);s(u,p,m)}else if(u._lastISO){const p=_(u._lastISO);p&&u._displayFormatted(p)}else u.dom.value=""},i.addEventListener("blur",this._onBlur),this._onBtnClick=function(){u._openPicker()},A.addEventListener("click",this._onBtnClick);const T=i.form;if(T&&(this._form=T,this._onFormReset=function(){setTimeout(function(){const f=u.dom.value;if(f){const m=_(f)||O(f);if(m){const p=S(m);s(u,p,m);return}}c(u)},0)},T.addEventListener("reset",this._onFormReset)),d&&d!==""){const f=_(d);f&&s(u,d,f)}return this}l.prototype._initTextElement=function(){const i=this.dom,u=i.getAttribute("data-ln-value"),d=i.getAttribute("data-ln-date"),h=i.getAttribute("datetime");let b=null;i.tagName==="TIME"&&h!==null&&h!==""?b=h:u!==null&&u!==""?b=u:h!==null&&h!==""?b=h:d!==null&&d!==""&&d!=="true"&&!j.test(d)?b=d:b=i.textContent.trim();const w=_(b)||O(b);if(w&&!isNaN(w.getTime())){const g=S(w);this._rawValue=g,i.tagName!=="TIME"&&!i.hasAttribute("data-ln-value")&&i.setAttribute("data-ln-value",g),this._formatTextContent()}else this._rawValue=null},l.prototype._formatTextContent=function(){if(this._rawValue){const i=_(this._rawValue);if(i){let d=this.dom.getAttribute("data-ln-date-format");if(!d){const w=this.dom.getAttribute("data-ln-date");w&&j.test(w)&&(d=w)}const h=L(this.dom),b=E(h);this.dom.textContent=N(i,d||"medium",h,b)}}},l.prototype._openPicker=function(){if(typeof this._picker.showPicker=="function")try{this._picker.showPicker()}catch{this._picker.click()}else this._picker.click()},l.prototype._setHiddenRaw=function(i){o.set.call(this._hidden,i)},l.prototype._displayFormatted=function(i){const u=this.dom.getAttribute(e)||"",d=L(this.dom),h=E(d);this._isFormatting=!0,this.dom.value=N(i,u,d,h),this._isFormatting=!1},Object.defineProperty(l.prototype,"value",{get:function(){return this.isTextElement?this._rawValue||"":o.get.call(this._hidden)},set:function(i){if(this.isTextElement){if(!i||i===""){this._rawValue=null,this.dom.removeAttribute("data-ln-value"),this.dom.tagName==="TIME"&&this.dom.removeAttribute("datetime"),this.dom.textContent="";return}const d=_(i)||O(i);if(!d)return;const h=S(d);this._rawValue=h,this.dom.tagName==="TIME"?this.dom.setAttribute("datetime",h):this.dom.setAttribute("data-ln-value",h),this._formatTextContent();return}if(!i||i===""){c(this);return}const u=_(i);u&&s(this,i,u)}}),Object.defineProperty(l.prototype,"date",{get:function(){const i=this.value;return i?_(i):null},set:function(i){if(!i||!(i instanceof Date)||isNaN(i.getTime())){this.value="";return}this.value=S(i)}}),Object.defineProperty(l.prototype,"formatted",{get:function(){return this.isTextElement?this.dom.textContent:this.dom.value}}),l.prototype.destroy=function(){if(!this.dom[t])return;if(this._onLocaleChange&&document.removeEventListener("ln-core:locale-change",this._onLocaleChange),this.isTextElement){delete this.dom[t];return}this._form&&this._onFormReset&&this._form.removeEventListener("reset",this._onFormReset),this._picker.removeEventListener("change",this._onPickerChange),this.dom.removeEventListener("blur",this._onBlur),this._btn.removeEventListener("click",this._onBtnClick);const i=this.value;this._hidden.remove(),this._picker.remove(),this._btn.remove(),this._wrapper&&this._wrapper.parentNode&&(this._wrapper.parentNode.insertBefore(this.dom,this._wrapper),this._wrapper.remove()),delete this.dom.value,this.dom.name=this._hidden.name,this.dom.type="date",i&&(this.dom.value=i),delete this.dom[t]},le(e,t,l,"ln-date",{attributes:r,extraAttributes:["datetime","lang"],onAttributeChange:n})})()})();
1
+ (function(){"use strict";function W(){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 I(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let n=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){n=t[l];break}if(!I(n))return}e.apply(console,t)}}function U(e,t,r){const n=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,n),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))}function M(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){M(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function de(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function fe(e,t){const r=!!(t&&t.typed),n=t&&t.exclude,l={},a=e.elements,i={};if(r)for(let c=0;c<a.length;c++){const o=a[c];o.name&&o.type==="checkbox"&&!o.disabled&&(i[o.name]=(i[o.name]||0)+1)}for(let c=0;c<a.length;c++){const o=a[c];if(!(!o.name||o.disabled||o.type==="file"||o.type==="submit"||o.type==="button")&&!(n&&o.matches&&o.matches(n)))if(o.type==="checkbox")r&&i[o.name]===1?l[o.name]=o.checked:(l[o.name]||(l[o.name]=[]),o.checked&&l[o.name].push(o.value));else if(o.type==="radio")o.checked&&(l[o.name]=o.value);else if(o.type==="select-multiple"){l[o.name]=[];for(let s=0;s<o.options.length;s++)o.options[s].selected&&l[o.name].push(o.options[s].value)}else if(r&&o.type==="hidden")l[o.name]=o.value;else if(r&&(o.type==="number"||o.type==="range")){const s=Number(o.value);l[o.name]=o.value===""||isNaN(s)?null:s}else l[o.name]=o.value}return l}function he(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function me(e,t){const r=e.elements,n=[],l={};for(let a=0;a<r.length;a++){const i=r[a];i.name&&i.type==="checkbox"&&(l[i.name]=(l[i.name]||0)+1)}for(let a=0;a<r.length;a++){const i=r[a];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 o=t[c];if(i.type==="checkbox"){if(Array.isArray(o))i.checked=o.indexOf(i.value)!==-1;else if(l[i.name]>1){const s=String(o).split(",").map(function(u){return u.trim()});i.checked=s.indexOf(i.value)!==-1}else i.checked=he(o);n.push(i)}else if(i.type==="radio")i.checked=i.value===String(o),n.push(i);else if(i.type==="select-multiple"){if(Array.isArray(o))for(let s=0;s<i.options.length;s++)i.options[s].selected=o.indexOf(i.options[s].value)!==-1;n.push(i)}else i.value=o,i.tagName==="SELECT"&&o!=null&&i.setAttribute("data-ln-value",o),n.push(i)}return n}function pe(e,t,{get:r,set:n}){Object.defineProperty(e,"value",{get:function(){return r?r.call(this):t.get.call(this)},set:function(l){n?n.call(this,l,a=>t.set.call(this,a)):t.set.call(this,l)},configurable:!0})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=me,window.lnCore.serializeForm=fe,window.lnCore.resolveFormMethod=de);const K={};function we(e,t){K[e]=t}function ge(e){return K[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=we,window.lnCore.getDataMapper=ge);function N(e){const t=e?e.closest("[lang]"):null,r=(t?t.getAttribute("lang")||t.lang:null)||(typeof document<"u"&&document.documentElement?document.documentElement.getAttribute("lang")||document.documentElement.lang:null)||(typeof navigator<"u"?navigator.language:null);return r?r.trim():"en-US"}function Q(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,M(function(){new MutationObserver(function(){U(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const Y={};function J(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];Y[r]=t}function E(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return Y[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=J,window.lnCore.getLocaleFallback=E,window.lnCore.ensureLocaleObserver=Q);const R={};function be(e,t){R[e]||(R[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=R[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function z(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let i=0;i<r.length;i++){const c=r[i],o=c.getAttribute("data-ln-field");t[o]!=null&&(c.textContent=t[o])}const n=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<n.length;i++){const c=n[i],o=c.getAttribute("data-ln-attr").split(",");for(let s=0;s<o.length;s++){const u=o[s].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),h=u[1].trim();t[h]!=null&&c.setAttribute(d,t[h])}}const l=e.querySelectorAll("[data-ln-show]");for(let i=0;i<l.length;i++){const c=l[i],o=c.getAttribute("data-ln-show");o in t&&c.classList.toggle("hidden",!t[o])}const a=e.querySelectorAll("[data-ln-class]");for(let i=0;i<a.length;i++){const c=a[i],o=c.getAttribute("data-ln-class").split(",");for(let s=0;s<o.length;s++){const u=o[s].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),h=u[1].trim();h in t&&c.classList.toggle(d,!!t[h])}}return e}function ye(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const r=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let n=0;n<r.length;n++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[n],t??null),r[n].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)z(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let r=0;r<t.length;r++)t[r].textContent=""}})));function G(e,t){if(!e||!t)return e;const r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const a=r.currentNode;a.textContent.indexOf("{{")!==-1&&(a.textContent=a.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,c){return t[c]!==void 0?t[c]:""}))}const n=function(a,i){return t[i]!==void 0?t[i]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let a=0;a<l.length;a++){const i=l[a],c=i.attributes;for(let o=0;o<c.length;o++){const s=c[o];s.value.indexOf("{{")!==-1&&i.setAttribute(s.name,s.value.replace(/\{\{\s*(\w+)\s*\}\}/g,n))}}return e}function Ce(e,t,r,n,l,a){const i={};for(let o=0;o<e.children.length;o++){const s=e.children[o],u=s.getAttribute("data-ln-render-key");u&&(i[u]=s)}const c=document.createDocumentFragment();for(let o=0;o<t.length;o++){const s=t[o],u=String(n(s));let d=i[u];if(d)l(d,s,o);else{const h=be(r,a);if(!h||(G(h,s),d=h.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",u),l(d,s,o)}c.appendChild(d)}e.textContent="",e.appendChild(c)}function _e(e,t){const r={},n=e.querySelectorAll("["+t+"]");for(let l=0;l<n.length;l++)r[n[l].getAttribute(t)]=n[l].textContent,n[l].remove();return r}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=G,window.lnCore.fill=z,window.lnCore.lnFill=ye,window.lnCore.renderList=Ce);function q(e,t,r){const n=e.getAttribute(t);return n===null?r:n}function X(e,t,r){const n=parseInt(e.getAttribute(t),10);return isNaN(n)?r:n}function Z(e,t,r=!1){const n=e.getAttribute(t);if(n===null)return!!r;const l=n.trim().toLowerCase();return!(l==="false"||l==="0")}function ee(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const B=new Map;function te(e,t){const r=(e?e.join("|"):"")+"::"+t;if(B.has(r))return B.get(r);const n=new Set(e||[]),l=function(a,i){const c=a.getAttribute(i);return c!==null&&n.has(c)?c:t};return B.set(r,l),l}function ne(e,t,r){const n=parseFloat(e.getAttribute(t));return isNaN(n)?r:n}function re(e,t,r){const n=e.getAttribute(t);if(!n)return r;try{return JSON.parse(n)}catch{return r}}function oe(e,t,r,n,l){if(!e||t===null)return!0;const a=n||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const c=o=>{l?console.warn(o,l):console.warn(o)};if(i==="boolean"){const o=t.trim().toLowerCase();return o!==""&&o!=="true"&&o!=="false"&&o!=="1"&&o!=="0"?(c(`[${a}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const o=e.values||[];return o.includes(t)?!0:(c(`[${a}] Invalid value "${t}" for attribute "${r}". Allowed: ${o.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return c(`[${a}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const o=parseInt(t,10);return e.min!==void 0&&o<e.min?(c(`[${a}] Value ${o} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(c(`[${a}] Value ${o} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(c(`[${a}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(o){return c(`[${a}] Invalid JSON for attribute "${r}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function ve(e,t,r){for(const n in r){const[l,a,i]=r[n];Object.defineProperty(e,n,{get:function(){return l(t,a,i)},enumerable:!0,configurable:!0})}return e}function Ae(e){const t={};for(const r in e){const n=e[r];if(!n||!n.prop)continue;let l=n.read;if(!l&&n.type)switch(n.type){case"enum":l=te(n.values,n.fallback);break;case"integer":l=X;break;case"float":l=ne;break;case"boolean":l=Z;break;case"list":l=ee;break;case"json":l=re;break;case"string":default:l=q;break}l||(l=q),t[n.prop]=[l,r,n.fallback]}return t}function xe(e){const t={};for(const r in e){const n=e[r];n&&n.effect&&(t[r]=n.effect)}return Object.keys(t).length?t:null}function Se(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const r in e.effects)t.add(r);if(e.onAttrChange&&e.declared)for(const r of e.declared)t.add(r);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=ve,window.lnCore.attrSpec=Ae,window.lnCore.attrStr=q,window.lnCore.attrInt=X,window.lnCore.attrBool=Z,window.lnCore.attrList=ee,window.lnCore.attrEnum=te,window.lnCore.attrFloat=ne,window.lnCore.attrJson=re);function D(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(r){console.error("["+t.attribute+"] init failed",e,r)}}}function ie(e,t,r,n){if(e.nodeType!==1)return;const a=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:r,ComponentFn:n};if(e.matches&&e.matches(a)&&D(e,i),e.querySelectorAll){const c=e.querySelectorAll(a);for(let o=0;o<c.length;o++)D(c[o],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 Ee(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 le(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function De(e){const t=le(),r=e.observed||[];for(let n=0;n<r.length;n++){const l=r[n];t.byAttr.has(l)||t.byAttr.set(l,[]),t.byAttr.get(l).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const n in e.attributes){t.byDeclaredAttr.has(n)||t.byDeclaredAttr.set(n,[]);const l=t.byDeclaredAttr.get(n);l.some(a=>a.componentTag===e.componentTag)||l.push({spec:e.attributes[n],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const n=Se(e);if(n===null)t.reactiveWildcard.push(e);else for(const l of n)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function se(e,t,r,n){for(let l=0;l<e.length;l++){const a=e[l];if(!t[a.attribute])continue;const i=a.effects&&a.effects[r];i?i(t,r,n):a.onAttrChange&&(!a.declared||a.declared.has(r))&&a.onAttrChange(t,r,n)}}function Oe(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,n=le(),l=n.byAttr.get(t),a=W()&&n.byDeclaredAttr&&n.byDeclaredAttr.has(t);if(!r&&!l&&!a)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(a&&I(i)){const c=n.byDeclaredAttr.get(t),o=i.getAttribute(t);for(let s=0;s<c.length;s++)oe(c[s].spec,o,t,c[s].componentTag,i)}if(window.lnCore._debugSink&&(r||l)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),r){const c=n.byReactive.get(t);c&&se(c,i,t,e.oldValue),n.reactiveWildcard.length&&se(n.reactiveWildcard,i,t,e.oldValue)}if(l)for(let c=0;c<l.length;c++){const o=l[c];if(o.handler){o.handler(i,t,e.oldValue);continue}o.onAttributeChange&&i[o.attribute]?o.onAttributeChange(i,t):(ie(i,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(i))}}}function Te(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,M(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{Oe(t[r])}catch(n){console.error("[ln-core] mutation handler failed",t[r].target,n)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function $(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function V(e,t){if(!document.contains(e))if(t.attribute){const r=e[t.attribute];if(r&&typeof r.destroy=="function")try{r.destroy()}catch(n){console.error("["+t.attribute+"] destroy failed",e,n)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function Le(e){const t=$();if(t.length){if(e.target)for(let r=0;r<t.length;r++){const n=t[r];if(n.onSubtreeChange&&n.query){const l=n.query,a=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;a&&n.onSubtreeChange(a,e)}}for(let r=0;r<e.addedNodes.length;r++){const n=e.addedNodes[r];if(n.nodeType===1){const l=!!(n.firstElementChild||n.children&&n.children.length);for(let a=0;a<t.length;a++){const i=t[a];if(i.selector&&i.attribute&&i.ComponentFn){if(!l)n.matches&&n.matches(i.query)&&D(n,i);else if(n.matches&&n.matches(i.query)&&D(n,i),n.querySelectorAll){const c=n.querySelectorAll(i.query);for(let o=0;o<c.length;o++)D(c[o],i)}}i.onInit&&i.onInit(n)}}}for(let r=0;r<e.removedNodes.length;r++){const n=e.removedNodes[r];if(n.nodeType===1){const l=!!(n.firstElementChild||n.children&&n.children.length);for(let a=0;a<t.length;a++){const i=t[a],c=i.query;if(c){if(!l)n.matches&&n.matches(c)&&V(n,i);else if(n.matches&&n.matches(c)&&V(n,i),n.querySelectorAll){const o=n.querySelectorAll(c);for(let s=0;s<o.length;s++)V(o[s],i)}}}}}}}function ae(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,M(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++){const n=t[r];if(n.type==="childList")try{Le(n)}catch(l){console.error("[ln-core] lifecycle handler failed",n.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Me(e){$().push(e),ae()}function ce(e,t,r,n,l={}){const a=l.extraAttributes||[],i=l.onAttributeChange||null,c=l.onSubtreeChange||null,o=l.onInit||null,s=l.onAttrChange||null,u=l.effects||null,d=l.attributes||null,h=d?xe(d):u,b=d?new Set(Object.keys(d)):null,w=l.persist||null;function g(m){const p=m||document.body;if(ie(p,e,t,r),d&&W())for(const y in d){const v=d[y],x=Array.from(p.querySelectorAll("["+y+"]"));p.matches&&p.matches("["+y+"]")&&x.push(p);for(let L=0;L<x.length;L++){const k=x[L];I(k)&&oe(v,k.getAttribute(y),y,n,k)}}o&&o(p)}const C=[];if(e.indexOf("[")!==-1){const m=/\[([\w-]+)/g;let p;for(;(p=m.exec(e))!==null;)C.push(p[1])}else C.push(e);De({selector:e,attribute:t,componentTag:n,attributes:d,ComponentFn:r,onInit:o,observed:C.concat(a),onAttributeChange:i,onAttrChange:s,effects:h,declared:b,persist:w}),Te();const A=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,T=l.subtreeQuery||(A?e:"["+e+"]");$().push({selector:e,attribute:t,ComponentFn:r,onInit:o,onSubtreeChange:c,query:T}),ae(),window[t]=g,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ce,window.lnCore.observeLifecycle=Me);function f(){ke()>0?Ee(function(){g(document.body)}):g(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",f):f(),g}function ue(e){return(e||"").replace(/^#/,"")}function j(e){const t=e===void 0?location.hash:e,r={},n=ue(t);if(!n)return r;const l=n.split("&");for(let a=0;a<l.length;a++){const i=l[a];if(!i)continue;const c=i.indexOf(":"),o=c>-1?i.slice(0,c):i,s=c>-1?i.slice(c+1):"";if(o)try{r[o]=decodeURIComponent(s)}catch{r[o]=s}}return r}function Ne(e){if(!e)return null;const t=j();return e in t?t[e]:null}function Fe(e,t){if(!e)return;const r=j();t==null?delete r[e]:r[e]=String(t);const l=Object.keys(r).map(function(a){const i=r[a];return i===""?a:a+":"+encodeURIComponent(i)}).join("&");ue(location.hash)!==l&&(location.hash=l)}function Ie(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Re(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const r=e.getAttribute("data-ln-hash");if(r&&r.trim()!=="")return r.trim();const n=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return n?t?n+"-"+t:n:t||null}function qe(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 Ve(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const r=e.slice(0,t),n=e.slice(t+1),l=n?n.split(",").map(function(a){try{return decodeURIComponent(a)}catch{return a}}).filter(Boolean):[];return{key:r,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=j,window.lnCore.hashGet=Ne,window.lnCore.hashSet=Fe,window.lnCore.hashLinkClick=Ie,window.lnCore.resolveHashNamespace=Re,window.lnCore.hashSortEncode=qe,window.lnCore.hashSortDecode=Be,window.lnCore.hashFilterEncode=$e,window.lnCore.hashFilterDecode=Ve);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);function _(e){if(e==null||e==="")return null;if(e instanceof Date)return isNaN(e.getTime())?null:e;const t=Number(e);if(!isNaN(t)&&t>0){const r=t<1e11?t*1e3:t,n=new Date(r);return isNaN(n.getTime())?null:n}if(typeof e=="string"){const r=e.trim();if(!r)return null;const n=/^(\d{4})-(\d{2})-(\d{2})$/.exec(r);if(n){const a=+n[1],i=+n[2],c=+n[3],o=new Date(a,i-1,c);return o.getFullYear()!==a||o.getMonth()!==i-1||o.getDate()!==c?null:o}const l=new Date(r);return isNaN(l.getTime())?null:l}return null}function S(e){if(!e||!(e instanceof Date)||isNaN(e.getTime()))return"";const t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return t+"-"+r+"-"+n}const P=/^(short|medium|long)(\s+datetime)?$/,Pe={short:{dateStyle:"short"},medium:{dateStyle:"medium"},long:{dateStyle:"long"},"short datetime":{dateStyle:"short",timeStyle:"short"},"medium datetime":{dateStyle:"medium",timeStyle:"short"},"long datetime":{dateStyle:"long",timeStyle:"short"}};function He(e){return!e||e===""?{dateStyle:"medium"}:String(e).trim().match(P)?Pe[e.trim()]:null}function O(e){if(!e||typeof e!="string")return null;const t=e.trim();if(t.length<6)return null;let r,n;if(t.indexOf(".")!==-1)r=".",n=t.split(".");else if(t.indexOf("/")!==-1)r="/",n=t.split("/");else if(t.indexOf("-")!==-1)r="-",n=t.split("-");else return null;if(n.length!==3)return null;const l=[];for(let s=0;s<3;s++){const u=parseInt(n[s],10);if(isNaN(u))return null;l.push(u)}let a,i,c;r==="."?(a=l[0],i=l[1],c=l[2]):r==="/"?(i=l[0],a=l[1],c=l[2]):n[0].length===4?(c=l[0],i=l[1],a=l[2]):(a=l[0],i=l[1],c=l[2]),c<100&&(c+=c<50?2e3:1900);const o=new Date(c,i-1,a);return o.getFullYear()!==c||o.getMonth()!==i-1||o.getDate()!==a?null:o}function H(e,t,r,n){if(!e||!(e instanceof Date)||isNaN(e.getTime())||!t||typeof t!="string")return"";const l=e.getDate(),a=e.getMonth(),i=e.getFullYear(),c=e.getHours(),o=e.getMinutes();let s,u;const d=(r||"").toLowerCase().split("-")[0];let h=!1;try{const g=new Intl.DateTimeFormat(r,{month:"long"}).resolvedOptions().locale.toLowerCase().split("-")[0];h=!!(n&&g!==d)}catch{h=!!n}if(h&&n&&n.monthsLong)s=n.monthsLong[a];else try{s=new Intl.DateTimeFormat(r,{month:"long"}).format(e)}catch{s=String(a+1)}if(h&&n&&n.monthsShort)u=n.monthsShort[a];else try{u=new Intl.DateTimeFormat(r,{month:"short"}).format(e)}catch{u=String(a+1)}const b={yyyy:String(i),yy:String(i).slice(-2),MMMM:s,MMM:u,MM:String(a+1).padStart(2,"0"),M:String(a+1),dd:String(l).padStart(2,"0"),d:String(l),HH:String(c).padStart(2,"0"),mm:String(o).padStart(2,"0")};return t.replace(/yyyy|yy|MMMM|MMM|MM|M|dd|d|HH|mm/g,function(w){return b[w]!==void 0?b[w]:w})}function F(e,t,r,n){if(!e||!(e instanceof Date)||isNaN(e.getTime()))return"";const l=He(t);if(l)try{const a=new Intl.DateTimeFormat(r,l),i=(r||"").toLowerCase().split("-")[0],c=a.resolvedOptions().locale.toLowerCase().split("-")[0];return n&&c!==i?H(e,"dd.MM.yyyy",r,n):a.format(e)}catch{return H(e,"dd.MM.yyyy",r,n)}return H(e,t||"dd.MM.yyyy",r,n)}(function(){const e="data-ln-date",t="lnDate";if(window[t]!==void 0)return;function r(s){const u=s[t];if(u){if(u.isTextElement)u._initTextElement();else if(u.value){const d=_(u.value);d&&u._displayFormatted(d)}}}const n={"data-ln-date":{type:"enum",values:["short","medium","long","full","iso"],fallback:"medium",effect:r,description:"Date display style preset or activator"},"data-ln-date-format":{type:"string",effect:r,description:"Custom Intl.DateTimeFormat pattern or options"},"data-ln-date-locale":{type:"string",effect:r,description:"BCP 47 language tag override for date formatting"},"data-ln-value":{type:"string",effect:r,description:"Raw ISO date string or timestamp for non-time elements (td, span)"},"data-ln-date-dict":{type:"marker",description:"Container for date translation dictionary"},"data-ln-date-dict-key":{type:"string",description:"Dictionary key for relative time or custom date formatting"},"data-ln-date-field":{type:"string",description:"Field name mapping for date record binding"},"data-ln-date-label":{type:"string",description:"Accessible label text for the date input"}},l=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");function a(s,u,d){U(s.dom,"ln-date:change",{value:u,formatted:s.dom.value,date:d}),s.dom.dispatchEvent(new Event("change",{bubbles:!0}))}function i(s,u,d,h){s._setHiddenRaw(u),l.set.call(s._picker,u),s._lastISO=u,h!==void 0?(s._isFormatting=!0,s.dom.value=h,s._isFormatting=!1):d&&s._displayFormatted(d),a(s,u,d)}function c(s){s._setHiddenRaw(""),l.set.call(s._picker,""),s._isFormatting=!0,s.dom.value="",s._isFormatting=!1,s._lastISO="",a(s,"",null)}function o(s){if(s[t])return s[t];s[t]=this,this.dom=s;const u=this;if(this._onLocaleChange=function(){if(u.isTextElement)u._formatTextContent();else if(u.value){const f=_(u.value);f&&u._displayFormatted(f)}},Q(),document.addEventListener("ln-core:locale-change",this._onLocaleChange),s.tagName!=="INPUT")return this.isTextElement=!0,this._initTextElement(),this;this.isTextElement=!1;const d=s.value,h=s.name,b=s.closest(".form-element, form")||s.parentNode;if(b){const f=b.querySelectorAll("[data-ln-date-dict]");for(let m=0;m<f.length;m++){const p=f[m].getAttribute("data-ln-date-dict");if(p){const y=_e(f[m],"data-ln-date-dict-key");y["months-long"]&&(y.monthsLong=y["months-long"].split(",").map(v=>v.trim())),y["months-short"]&&(y.monthsShort=y["months-short"].split(",").map(v=>v.trim())),J(p,y)}}}const w=document.createElement("span");w.setAttribute("data-ln-date-field",""),s.parentNode.insertBefore(w,s),w.appendChild(s),this._wrapper=w;const g=document.createElement("input");g.type="hidden",g.name=h,s.removeAttribute("name"),s.hasAttribute("data-ln-fill-as")&&g.setAttribute("data-ln-fill-as",s.getAttribute("data-ln-fill-as")),s.insertAdjacentElement("afterend",g),this._hidden=g;const C=document.createElement("input");C.type="date",C.tabIndex=-1,C.setAttribute("tabindex","-1"),C.setAttribute("aria-hidden","true"),C.setAttribute("aria-label",s.getAttribute("data-ln-date-label")||"Date picker"),C.style.cssText="position:absolute;opacity:0;width:0;height:0;overflow:hidden;pointer-events:none",g.insertAdjacentElement("afterend",C),this._picker=C,s.type="text";const A=document.createElement("button");A.type="button",A.setAttribute("aria-label",s.getAttribute("data-ln-date-label")||"Open date picker"),A.innerHTML='<svg class="ln-icon" aria-hidden="true"><use href="#ln-icon-calendar"></use></svg>',C.insertAdjacentElement("afterend",A),this._btn=A,this._lastISO="",Object.defineProperty(g,"value",{get:function(){return l.get.call(g)},set:function(f){if(l.set.call(g,f),f&&f!==""){const m=_(f);m&&i(u,f,m)}else f===""&&c(u)}}),pe(s,l,{get:function(){return l.get.call(s)},set:function(f,m){if(u._isFormatting){m(f);return}if(!f||f===""){m(""),c(u);return}const p=_(f)||O(f);if(p){const y=S(p),v=s.getAttribute(e)||"",x=N(s),L=E(x),k=F(p,v,x,L);m(k),i(u,y,p,k)}else m(String(f)),c(u)}}),this._onPickerChange=function(){const f=C.value;if(f){const m=_(f);m&&i(u,f,m)}else c(u)},C.addEventListener("change",this._onPickerChange),this._onBlur=function(){const f=u.dom.value.trim();if(f===""){u._lastISO!==""&&c(u);return}if(u._lastISO){const p=_(u._lastISO);if(p){const y=u.dom.getAttribute(e)||"",v=N(u.dom),x=E(v);if(f===F(p,y,v,x))return}}const m=O(f);if(m){const p=S(m);i(u,p,m)}else if(u._lastISO){const p=_(u._lastISO);p&&u._displayFormatted(p)}else u.dom.value=""},s.addEventListener("blur",this._onBlur),this._onBtnClick=function(){u._openPicker()},A.addEventListener("click",this._onBtnClick);const T=s.form;if(T&&(this._form=T,this._onFormReset=function(){setTimeout(function(){const f=u.dom.value;if(f){const m=_(f)||O(f);if(m){const p=S(m);i(u,p,m);return}}c(u)},0)},T.addEventListener("reset",this._onFormReset)),d&&d!==""){const f=_(d);f&&i(u,d,f)}return this}o.prototype._initTextElement=function(){const s=this.dom,u=s.getAttribute("data-ln-value"),d=s.getAttribute("data-ln-date"),h=s.getAttribute("datetime");let b=null;s.tagName==="TIME"&&h!==null&&h!==""?b=h:u!==null&&u!==""?b=u:h!==null&&h!==""?b=h:d!==null&&d!==""&&d!=="true"&&!P.test(d)?b=d:b=s.textContent.trim();const w=_(b)||O(b);if(w&&!isNaN(w.getTime())){const g=S(w);this._rawValue=g,s.tagName!=="TIME"&&!s.hasAttribute("data-ln-value")&&s.setAttribute("data-ln-value",g),this._formatTextContent()}else this._rawValue=null},o.prototype._formatTextContent=function(){if(this._rawValue){const s=_(this._rawValue);if(s){let d=this.dom.getAttribute("data-ln-date-format");if(!d){const w=this.dom.getAttribute("data-ln-date");w&&P.test(w)&&(d=w)}const h=N(this.dom),b=E(h);this.dom.textContent=F(s,d||"medium",h,b)}}},o.prototype._openPicker=function(){if(typeof this._picker.showPicker=="function")try{this._picker.showPicker()}catch{this._picker.click()}else this._picker.click()},o.prototype._setHiddenRaw=function(s){l.set.call(this._hidden,s)},o.prototype._displayFormatted=function(s){const u=this.dom.getAttribute(e)||"",d=N(this.dom),h=E(d);this._isFormatting=!0,this.dom.value=F(s,u,d,h),this._isFormatting=!1},Object.defineProperty(o.prototype,"value",{get:function(){return this.isTextElement?this._rawValue||"":l.get.call(this._hidden)},set:function(s){if(this.isTextElement){if(!s||s===""){this._rawValue=null,this.dom.removeAttribute("data-ln-value"),this.dom.tagName==="TIME"&&this.dom.removeAttribute("datetime"),this.dom.textContent="";return}const d=_(s)||O(s);if(!d)return;const h=S(d);this._rawValue=h,this.dom.tagName==="TIME"?this.dom.setAttribute("datetime",h):this.dom.setAttribute("data-ln-value",h),this._formatTextContent();return}if(!s||s===""){c(this);return}const u=_(s);u&&i(this,s,u)}}),Object.defineProperty(o.prototype,"date",{get:function(){const s=this.value;return s?_(s):null},set:function(s){if(!s||!(s instanceof Date)||isNaN(s.getTime())){this.value="";return}this.value=S(s)}}),Object.defineProperty(o.prototype,"formatted",{get:function(){return this.isTextElement?this.dom.textContent:this.dom.value}}),o.prototype.destroy=function(){if(!this.dom[t])return;if(this._onLocaleChange&&document.removeEventListener("ln-core:locale-change",this._onLocaleChange),this.isTextElement){delete this.dom[t];return}this._form&&this._onFormReset&&this._form.removeEventListener("reset",this._onFormReset),this._picker.removeEventListener("change",this._onPickerChange),this.dom.removeEventListener("blur",this._onBlur),this._btn.removeEventListener("click",this._onBtnClick);const s=this.value;this._hidden.remove(),this._picker.remove(),this._btn.remove(),this._wrapper&&this._wrapper.parentNode&&(this._wrapper.parentNode.insertBefore(this.dom,this._wrapper),this._wrapper.remove()),delete this.dom.value,this.dom.name=this._hidden.name,this.dom.type="date",s&&(this.dom.value=s),delete this.dom[t]},ce(e,t,o,"ln-date",{attributes:n,extraAttributes:["datetime","lang"],onAttributeChange:r})})()})();
@@ -1 +1 @@
1
- var LnAshlarComponent=(function(y){"use strict";function N(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function A(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 a=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){a=t[l];break}if(!A(a))return}e.apply(console,t)}}function ie(e,t){window.lnCore=window.lnCore||{},window.lnCore._debugSink=e,window.lnCore._debugIsContained=t||null}function de(e,t,n){const a=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,a),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:a}))}function b(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){b(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function se(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ce(e,t){const n=!!(t&&t.typed),a=t&&t.exclude,l={},i=e.elements,o={};if(n)for(let d=0;d<i.length;d++){const r=i[d];r.name&&r.type==="checkbox"&&!r.disabled&&(o[r.name]=(o[r.name]||0)+1)}for(let d=0;d<i.length;d++){const r=i[d];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(a&&r.matches&&r.matches(a)))if(r.type==="checkbox")n&&o[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 s=0;s<r.options.length;s++)r.options[s].selected&&l[r.name].push(r.options[s].value)}else if(n&&r.type==="hidden")l[r.name]=r.value;else if(n&&(r.type==="number"||r.type==="range")){const s=Number(r.value);l[r.name]=r.value===""||isNaN(s)?null:s}else l[r.name]=r.value}return l}function ue(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function fe(e,t){const n=e.elements,a=[],l={};for(let i=0;i<n.length;i++){const o=n[i];o.name&&o.type==="checkbox"&&(l[o.name]=(l[o.name]||0)+1)}for(let i=0;i<n.length;i++){const o=n[i];if(o.type==="file"||o.type==="submit"||o.type==="button")continue;const d=o.getAttribute("data-ln-fill-as")||o.name;if(!d||!(d in t))continue;const r=t[d];if(o.type==="checkbox"){if(Array.isArray(r))o.checked=r.indexOf(o.value)!==-1;else if(l[o.name]>1){const s=String(r).split(",").map(function(c){return c.trim()});o.checked=s.indexOf(o.value)!==-1}else o.checked=ue(r);a.push(o)}else if(o.type==="radio")o.checked=o.value===String(r),a.push(o);else if(o.type==="select-multiple"){if(Array.isArray(r))for(let s=0;s<o.options.length;s++)o.options[s].selected=r.indexOf(o.options[s].value)!==-1;a.push(o)}else o.value=r,o.tagName==="SELECT"&&r!=null&&o.setAttribute("data-ln-value",r),a.push(o)}return a}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=fe,window.lnCore.serializeForm=ce,window.lnCore.resolveFormMethod=se);const F={};function we(e,t){F[e]=t}function pe(e){return F[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=we,window.lnCore.getDataMapper=pe);function be(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,b(function(){new MutationObserver(function(){de(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const j={};function he(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];j[n]=t}function me(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return j[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=he,window.lnCore.getLocaleFallback=me,window.lnCore.ensureLocaleObserver=be);const x={};function ge(e,t){x[e]||(x[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=x[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function R(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let o=0;o<n.length;o++){const d=n[o],r=d.getAttribute("data-ln-field");t[r]!=null&&(d.textContent=t[r])}const a=e.querySelectorAll("[data-ln-attr]");for(let o=0;o<a.length;o++){const d=a[o],r=d.getAttribute("data-ln-attr").split(",");for(let s=0;s<r.length;s++){const c=r[s].trim().split(":");if(c.length!==2)continue;const u=c[0].trim(),f=c[1].trim();t[f]!=null&&d.setAttribute(u,t[f])}}const l=e.querySelectorAll("[data-ln-show]");for(let o=0;o<l.length;o++){const d=l[o],r=d.getAttribute("data-ln-show");r in t&&d.classList.toggle("hidden",!t[r])}const i=e.querySelectorAll("[data-ln-class]");for(let o=0;o<i.length;o++){const d=i[o],r=d.getAttribute("data-ln-class").split(",");for(let s=0;s<r.length;s++){const c=r[s].trim().split(":");if(c.length!==2)continue;const u=c[0].trim(),f=c[1].trim();f in t&&d.classList.toggle(u,!!t[f])}}return e}function ye(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 a=0;a<n.length;a++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[a],t??null),n[a].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)R(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function B(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const i=n.currentNode;i.textContent.indexOf("{{")!==-1&&(i.textContent=i.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(o,d){return t[d]!==void 0?t[d]:""}))}const a=function(i,o){return t[o]!==void 0?t[o]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let i=0;i<l.length;i++){const o=l[i],d=o.attributes;for(let r=0;r<d.length;r++){const s=d[r];s.value.indexOf("{{")!==-1&&o.setAttribute(s.name,s.value.replace(/\{\{\s*(\w+)\s*\}\}/g,a))}}return e}function Ce(e,t,n,a,l,i){const o={};for(let r=0;r<e.children.length;r++){const s=e.children[r],c=s.getAttribute("data-ln-render-key");c&&(o[c]=s)}const d=document.createDocumentFragment();for(let r=0;r<t.length;r++){const s=t[r],c=String(a(s));let u=o[c];if(u)l(u,s,r);else{const f=ge(n,i);if(!f||(B(f,s),u=f.firstElementChild,!u))continue;u.setAttribute("data-ln-render-key",c),l(u,s,r)}d.appendChild(u)}e.textContent="",e.appendChild(d)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=B,window.lnCore.fill=R,window.lnCore.lnFill=ye,window.lnCore.renderList=Ce);function S(e,t,n){const a=e.getAttribute(t);return a===null?n:a}function W(e,t,n){const a=parseInt(e.getAttribute(t),10);return isNaN(a)?n:a}function U(e,t,n=!1){const a=e.getAttribute(t);if(a===null)return!!n;const l=a.trim().toLowerCase();return!(l==="false"||l==="0")}function V(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const k=new Map;function H(e,t){const n=(e?e.join("|"):"")+"::"+t;if(k.has(n))return k.get(n);const a=new Set(e||[]),l=function(i,o){const d=i.getAttribute(o);return d!==null&&a.has(d)?d:t};return k.set(n,l),l}function z(e,t,n){const a=parseFloat(e.getAttribute(t));return isNaN(a)?n:a}function G(e,t,n){const a=e.getAttribute(t);if(!a)return n;try{return JSON.parse(a)}catch{return n}}function Q(e,t,n,a,l){if(!e||t===null)return!0;const i=a||"ln-component",o=e.type;if(o==="trigger"||o==="marker"||o==="string"||o==="list"||!o||t===""&&e.fallback!==void 0)return!0;const d=r=>{l?console.warn(r,l):console.warn(r)};if(o==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(d(`[${i}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(o==="enum"){const r=e.values||[];return r.includes(t)?!0:(d(`[${i}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(o==="integer"){if(!/^-?\d+$/.test(t))return d(`[${i}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(d(`[${i}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(d(`[${i}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(o==="float")return isNaN(Number(t))?(d(`[${i}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(o==="json")try{return JSON.parse(t),!0}catch(r){return d(`[${i}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function ve(e,t,n){for(const a in n){const[l,i,o]=n[a];Object.defineProperty(e,a,{get:function(){return l(t,i,o)},enumerable:!0,configurable:!0})}return e}function Ae(e){const t={};for(const n in e){const a=e[n];if(!a||!a.prop)continue;let l=a.read;if(!l&&a.type)switch(a.type){case"enum":l=H(a.values,a.fallback);break;case"integer":l=W;break;case"float":l=z;break;case"boolean":l=U;break;case"list":l=V;break;case"json":l=G;break;case"string":default:l=S;break}l||(l=S),t[a.prop]=[l,n,a.fallback]}return t}function xe(e){const t={};for(const n in e){const a=e[n];a&&a.effect&&(t[n]=a.effect)}return Object.keys(t).length?t:null}function Se(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=ve,window.lnCore.attrSpec=Ae,window.lnCore.attrStr=S,window.lnCore.attrInt=W,window.lnCore.attrBool=U,window.lnCore.attrList=V,window.lnCore.attrEnum=H,window.lnCore.attrFloat=z,window.lnCore.attrJson=G);function _(e,t,n,a){if(e.nodeType!==1)return;const i=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",o=Array.from(e.querySelectorAll(i));e.matches&&e.matches(i)&&o.push(e);for(const d of o)if(!d[n]){window.lnCore._persistSink&&d.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(d,t);try{d[n]=new a(d)}catch(r){console.error("["+n+"] init failed",d,r)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function J(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function K(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 P(){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 X(e){const t=P(),n=e.observed||[];for(let a=0;a<n.length;a++){const l=n[a];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 a in e.attributes){t.byDeclaredAttr.has(a)||t.byDeclaredAttr.set(a,[]);const l=t.byDeclaredAttr.get(a);l.some(i=>i.componentTag===e.componentTag)||l.push({spec:e.attributes[a],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const a=Se(e);if(a===null)t.reactiveWildcard.push(e);else for(const l of a)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function Y(e,t,n,a){for(let l=0;l<e.length;l++){const i=e[l];if(!t[i.attribute])continue;const o=i.effects&&i.effects[n];o?o(t,n,a):i.onAttrChange&&(!i.declared||i.declared.has(n))&&i.onAttrChange(t,n,a)}}function ke(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const a=P(),l=a.byAttr.get(n);if(N()&&a.byDeclaredAttr&&a.byDeclaredAttr.has(n)&&A(t)){const i=a.byDeclaredAttr.get(n),o=t.getAttribute(n);for(let d=0;d<i.length;d++)Q(i[d].spec,o,n,i[d].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||l)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const i=a.byReactive.get(n);i&&Y(i,t,n,e.oldValue),a.reactiveWildcard.length&&Y(a.reactiveWildcard,t,n,e.oldValue)}if(l)for(let i=0;i<l.length;i++){const o=l[i];if(o.handler){o.handler(t,n,e.oldValue);continue}o.onAttributeChange&&t[o.attribute]?o.onAttributeChange(t,n):(_(t,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(t))}}function Z(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,b(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{ke(t[n])}catch(a){console.error("[ln-core] mutation handler failed",t[n].target,a)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function ee(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function _e(e){const t=ee();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const a=t[n];if(a.onSubtreeChange){const l=a.query,i=e.target.nodeType===1?e.target.matches(l)?e.target:e.target.closest(l):e.target.parentElement?e.target.parentElement.closest(l):null;i&&a.onSubtreeChange(i,e)}}for(let n=0;n<e.addedNodes.length;n++){const a=e.addedNodes[n];if(a.nodeType===1)for(let l=0;l<t.length;l++){const i=t[l];_(a,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(a)}}for(let n=0;n<e.removedNodes.length;n++){const a=e.removedNodes[n];if(a.nodeType===1)for(let l=0;l<t.length;l++){const i=t[l],o=i.query,d=Array.from(a.querySelectorAll(o));a.matches&&a.matches(o)&&d.push(a);for(let r=0;r<d.length;r++){const s=d[r];if(!document.contains(s)){const c=s[i.attribute];if(c&&typeof c.destroy=="function")try{c.destroy()}catch(u){console.error("["+i.attribute+"] destroy failed",s,u)}delete s[i.attribute]}}}}}}function De(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,b(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const a=t[n];if(a.type==="childList")try{_e(a)}catch(l){console.error("[ln-core] lifecycle handler failed",a.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function $e(e,t){X({observed:e,handler:t}),Z()}function te(e,t,n,a,l={}){const i=l.extraAttributes||[],o=l.onAttributeChange||null,d=l.onSubtreeChange||null,r=l.onInit||null,s=l.onAttrChange||null,c=l.effects||null,u=l.attributes||null,f=u?xe(u):c,O=u?new Set(Object.keys(u)):null,Je=l.persist||null;function v(L){const w=L||document.body;if(_(w,e,t,n),u&&N())for(const g in u){const Xe=u[g],T=Array.from(w.querySelectorAll("["+g+"]"));w.matches&&w.matches("["+g+"]")&&T.push(w);for(let q=0;q<T.length;q++){const M=T[q];A(M)&&Q(Xe,M.getAttribute(g),g,a,M)}}r&&r(w)}const E=[];if(e.indexOf("[")!==-1){const L=/\[([\w-]+)/g;let w;for(;(w=L.exec(e))!==null;)E.push(w[1])}else E.push(e);X({selector:e,attribute:t,componentTag:a,attributes:u,ComponentFn:n,onInit:r,observed:E.concat(i),onAttributeChange:o,onAttrChange:s,effects:f,declared:O,persist:Je}),Z();const Ke=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,Pe=l.subtreeQuery||(Ke?e:"["+e+"]");ee().push({selector:e,attribute:t,ComponentFn:n,onInit:r,onSubtreeChange:d,query:Pe}),De(),window[t]=v,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=te);function re(){J()>0?K(function(){v(document.body)}):v(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",re):re(),v}function ne(e){return(e||"").replace(/^#/,"")}function D(e){const t=e===void 0?location.hash:e,n={},a=ne(t);if(!a)return n;const l=a.split("&");for(let i=0;i<l.length;i++){const o=l[i];if(!o)continue;const d=o.indexOf(":"),r=d>-1?o.slice(0,d):o,s=d>-1?o.slice(d+1):"";if(r)try{n[r]=decodeURIComponent(s)}catch{n[r]=s}}return n}function Ie(e){if(!e)return null;const t=D();return e in t?t[e]:null}function Oe(e,t){if(!e)return;const n=D();t==null?delete n[e]:n[e]=String(t);const l=Object.keys(n).map(function(i){const o=n[i];return o===""?i:i+":"+encodeURIComponent(o)}).join("&");ne(location.hash)!==l&&(location.hash=l)}function Ee(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 a=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return a?t?a+"-"+t:a:t||null}function Te(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 Me(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ne(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),a=e.slice(t+1),l=a?a.split(",").map(function(i){try{return decodeURIComponent(i)}catch{return i}}).filter(Boolean):[];return{key:n,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=D,window.lnCore.hashGet=Ie,window.lnCore.hashSet=Oe,window.lnCore.hashLinkClick=Ee,window.lnCore.resolveHashNamespace=Le,window.lnCore.hashSortEncode=Te,window.lnCore.hashSortDecode=qe,window.lnCore.hashFilterEncode=Me,window.lnCore.hashFilterDecode=Ne);function Fe(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Fe);const $=new Set(["data-ln-accordion","data-ln-ajax","data-ln-api-base-url","data-ln-api-connector","data-ln-api-connector-query-debounce","data-ln-api-endpoint","data-ln-api-headers","data-ln-api-param-limit","data-ln-api-param-offset","data-ln-api-param-search","data-ln-api-param-sort-dir","data-ln-api-param-sort-field","data-ln-api-path","data-ln-api-queue","data-ln-api-queue-online","data-ln-attr","data-ln-autoresize","data-ln-autosave","data-ln-autosave-clear","data-ln-autosave-debounce-input","data-ln-autosave-exclude","data-ln-chart","data-ln-chart-area","data-ln-chart-count","data-ln-chart-empty","data-ln-chart-labels","data-ln-chart-line","data-ln-chart-max","data-ln-chart-min","data-ln-chart-padding","data-ln-chart-plot","data-ln-chart-sort","data-ln-chart-source","data-ln-chart-type","data-ln-chart-x","data-ln-chart-y","data-ln-chart-zero","data-ln-circular-progress","data-ln-circular-progress-label","data-ln-circular-progress-max","data-ln-class","data-ln-col","data-ln-confirm","data-ln-confirm-active","data-ln-confirm-announcer","data-ln-confirm-idle","data-ln-confirm-state","data-ln-confirm-timeout","data-ln-connector","data-ln-couchdb-auth","data-ln-couchdb-connector","data-ln-couchdb-db","data-ln-couchdb-headers","data-ln-couchdb-url","data-ln-data-coordinator","data-ln-data-coordinator-connector","data-ln-data-coordinator-filters","data-ln-data-coordinator-mapper","data-ln-data-coordinator-no-autosync","data-ln-data-coordinator-scope","data-ln-data-coordinator-search","data-ln-data-coordinator-sort-direction","data-ln-data-coordinator-sort-field","data-ln-data-coordinator-stale","data-ln-data-store","data-ln-data-store-frozen","data-ln-data-store-indexes","data-ln-data-store-no-autosync","data-ln-data-store-no-local-query","data-ln-data-store-search-fields","data-ln-data-store-stale","data-ln-data-store-window","data-ln-data-store-window-page","data-ln-date","data-ln-date-dict","data-ln-date-dict-key","data-ln-date-field","data-ln-date-format","data-ln-date-label","data-ln-date-locale","data-ln-debug","data-ln-dropdown","data-ln-dropdown-menu","data-ln-dropdown-placement","data-ln-dropdown-position","data-ln-editor","data-ln-editor-action","data-ln-editor-source","data-ln-empty","data-ln-empty-state","data-ln-empty-when","data-ln-error","data-ln-external-link","data-ln-field","data-ln-fill-as","data-ln-fill-form","data-ln-fill-id","data-ln-fillable","data-ln-filter","data-ln-filter-col","data-ln-filter-hide","data-ln-filter-key","data-ln-filter-options","data-ln-filter-reset","data-ln-filter-search","data-ln-filter-target","data-ln-filter-value","data-ln-filter-values","data-ln-form","data-ln-form-action-edit","data-ln-form-action-method","data-ln-hash","data-ln-include","data-ln-initial-value","data-ln-item","data-ln-item-action","data-ln-item-id","data-ln-item-select","data-ln-key","data-ln-key-allow-input","data-ln-key-for","data-ln-key-modifier","data-ln-key-target","data-ln-link","data-ln-list","data-ln-list-body","data-ln-list-count","data-ln-list-empty","data-ln-list-field","data-ln-list-filtered","data-ln-list-select-all","data-ln-list-selectable","data-ln-list-selected","data-ln-list-source","data-ln-list-total","data-ln-list-window","data-ln-list-window-page","data-ln-list-window-threshold","data-ln-modal","data-ln-modal-close","data-ln-modal-for","data-ln-modal-mode","data-ln-modal-when","data-ln-nav","data-ln-nav-exact","data-ln-number","data-ln-number-decimals","data-ln-number-max","data-ln-number-min","data-ln-obfuscator","data-ln-obfuscator-codec","data-ln-obfuscator-key","data-ln-options","data-ln-options-label","data-ln-options-value","data-ln-outlet","data-ln-panel","data-ln-persist","data-ln-persist-scope","data-ln-picklist","data-ln-picklist-list","data-ln-picklist-max","data-ln-popover","data-ln-popover-for","data-ln-popover-placement","data-ln-popover-position","data-ln-progress","data-ln-progress-max","data-ln-render-key","data-ln-route","data-ln-route-keep","data-ln-route-target","data-ln-route-title","data-ln-router-base","data-ln-router-hydrate","data-ln-scroll","data-ln-scroll-behavior","data-ln-scroll-block","data-ln-scroll-delay","data-ln-scroll-focus","data-ln-scroll-set","data-ln-scroll-update-hash","data-ln-search","data-ln-search-clear","data-ln-search-clear-for","data-ln-search-exclude","data-ln-search-fields","data-ln-search-for","data-ln-search-hide","data-ln-search-items","data-ln-show","data-ln-slug-from","data-ln-sort","data-ln-sort-dir","data-ln-sort-exclude","data-ln-sort-field","data-ln-sort-icon","data-ln-sort-items","data-ln-sort-state","data-ln-sortable","data-ln-sortable-handle","data-ln-stat","data-ln-stat-card","data-ln-stat-filter","data-ln-stat-label","data-ln-stat-trend","data-ln-stat-value","data-ln-step","data-ln-step-label","data-ln-stepper","data-ln-store","data-ln-tab","data-ln-table","data-ln-table-body","data-ln-table-cell-attr","data-ln-table-clear","data-ln-table-clear-all","data-ln-table-col","data-ln-table-col-filter","data-ln-table-col-select","data-ln-table-col-sort","data-ln-table-coordinator","data-ln-table-count","data-ln-table-dict","data-ln-table-empty","data-ln-table-empty-when","data-ln-table-filter-col","data-ln-table-filtered","data-ln-table-row","data-ln-table-row-action","data-ln-table-row-id","data-ln-table-row-select","data-ln-table-select-all-label","data-ln-table-selectable","data-ln-table-selected","data-ln-table-sort","data-ln-table-source","data-ln-table-total","data-ln-table-window","data-ln-table-window-page","data-ln-table-window-threshold","data-ln-tabs","data-ln-tabs-active","data-ln-tabs-default","data-ln-tabs-focus","data-ln-tabs-key","data-ln-template","data-ln-time","data-ln-time-locale","data-ln-toast","data-ln-toast-close","data-ln-toast-item","data-ln-toast-max","data-ln-toast-timeout","data-ln-toast-when","data-ln-toggle","data-ln-toggle-action","data-ln-toggle-for","data-ln-tooltip","data-ln-tooltip-enhance","data-ln-tooltip-enhanced","data-ln-tooltip-placement","data-ln-tooltip-position","data-ln-translatable","data-ln-translatable-lang","data-ln-translations","data-ln-translations-active","data-ln-translations-add","data-ln-translations-default","data-ln-translations-lang","data-ln-translations-locales","data-ln-translations-placeholder","data-ln-translations-prefix","data-ln-translations-remove-label","data-ln-ui-coordinator","data-ln-upload","data-ln-upload-accept","data-ln-upload-action","data-ln-upload-delete","data-ln-upload-dict","data-ln-upload-ext","data-ln-upload-file-field","data-ln-upload-id","data-ln-upload-ids-field","data-ln-upload-item","data-ln-upload-list","data-ln-upload-local-id","data-ln-upload-max-files","data-ln-upload-max-size","data-ln-upload-progress","data-ln-upload-size","data-ln-upload-state","data-ln-upload-zone","data-ln-validate","data-ln-validate-error","data-ln-validate-errors","data-ln-value","data-ln-websocket-connector","data-ln-websocket-connector-url"]);function je(e,t){if(e===t)return 0;if(!e.length)return t.length;if(!t.length)return e.length;const n=[];for(let a=0;a<=t.length;a++)n[a]=[a];for(let a=0;a<=e.length;a++)n[0][a]=a;for(let a=1;a<=t.length;a++)for(let l=1;l<=e.length;l++)t.charAt(a-1)===e.charAt(l-1)?n[a][l]=n[a-1][l-1]:n[a][l]=Math.min(n[a-1][l-1]+1,n[a][l-1]+1,n[a-1][l]+1);return n[t.length][e.length]}function Re(e,t=$){if(t.has(e))return null;let n=null,a=1/0;for(const i of t){const o=je(e,i);o<a&&(a=o,n=i)}const l=Math.max(3,Math.floor(e.length*.4));return a<=l?n:null}function ae(e){return typeof CSS<"u"&&CSS.escape?CSS.escape(e):e.replace(/([!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~])/g,"\\$1")}function Be(e=document){const t=e.ownerDocument||e,n=e.nodeType===9?e.body||e.documentElement:e;if(!n)return[];const a=[],l=[n,...n.querySelectorAll("*")];for(let i=0;i<l.length;i++){const o=l[i];if(o.attributes)for(let d=0;d<o.attributes.length;d++){const r=o.attributes[d];if(r.name.startsWith("data-ln-")&&r.name.endsWith("-for")){const s=(r.value||"").trim();if(!s){a.push({type:"id-empty",element:o,attribute:r.name,targetId:"",message:`[ln-debug] Empty ID reference in <${o.tagName.toLowerCase()} ${r.name}="">.`});continue}t.getElementById(s)||t.querySelector("#"+ae(s))||a.push({type:"id-unresolved",element:o,attribute:r.name,targetId:s,message:`[ln-debug] Unresolved ID reference: <${o.tagName.toLowerCase()} ${r.name}="${s}"> targets "#${s}", but no element with id="${s}" exists in the document.`})}}}return a}function We(e=document){const t=e.ownerDocument||e,n=e.nodeType===9?e.body||e.documentElement:e;if(!n)return[];const a=[],l=[n,...n.querySelectorAll("*")];for(let i=0;i<l.length;i++){const o=l[i];if(o.attributes)for(let d=0;d<o.attributes.length;d++){const r=o.attributes[d];if(r.name.startsWith("data-ln-")&&(r.name.endsWith("-source")||r.name.endsWith("-store"))&&r.name!=="data-ln-data-store"){const c=(r.value||"").trim();if(!c){a.push({type:"store-empty",element:o,attribute:r.name,storeName:"",message:`[ln-debug] Empty store reference in <${o.tagName.toLowerCase()} ${r.name}="">.`});continue}const u=ae(c),f=t.querySelector(`[data-ln-data-store="${u}"], [data-ln-store="${u}"]`),O=typeof window<"u"&&window.lnDataStore&&typeof window.lnDataStore.getStore=="function"&&window.lnDataStore.getStore(c);!f&&!O&&a.push({type:"store-unresolved",element:o,attribute:r.name,storeName:c,message:`[ln-debug] Unresolved store reference: <${o.tagName.toLowerCase()} ${r.name}="${c}"> targets store "${c}", but no [data-ln-data-store="${c}"] exists in the document.`})}}}return a}function Ue(e=document){e.ownerDocument;const t=e.nodeType===9?e.body||e.documentElement:e;if(!t)return[];const n=[],a=Array.from(t.querySelectorAll("[data-ln-data-store]"));t.hasAttribute&&t.hasAttribute("data-ln-data-store")&&a.unshift(t);const l=new Map;for(let i=0;i<a.length;i++){const o=a[i],d=(o.getAttribute("data-ln-data-store")||"").trim();d&&(l.has(d)||l.set(d,[]),l.get(d).push(o))}for(const[i,o]of l.entries())o.length>1&&n.push({type:"store-duplicate",storeName:i,elements:o,message:`[ln-debug] Duplicate store name: Multiple elements declare data-ln-data-store="${i}". Store names must be unique across the document.`});return n}function Ve(e=document,t=$){const n=e.nodeType===9?e.body||e.documentElement:e;if(!n)return[];const a=[],l=[n,...n.querySelectorAll("*")];for(let i=0;i<l.length;i++){const o=l[i];if(o.attributes)for(let d=0;d<o.attributes.length;d++){const r=o.attributes[d];if(r.name.startsWith("data-ln-")&&!t.has(r.name)){const s=Re(r.name,t),c=s?` Did you mean "${s}"?`:"";a.push({type:"attribute-unknown",element:o,attribute:r.name,suggestion:s,message:`[ln-debug] Unknown attribute "${r.name}" on <${o.tagName.toLowerCase()}>.${c}`})}}}return a}function C(e=typeof document<"u"?document:null,t={}){if(!e)return{idIssues:[],storeIssues:[],uniquenessIssues:[],spellingIssues:[],total:0};const n=t.validAttributes||$,a=Be(e),l=We(e),i=Ue(e),o=Ve(e,n),d=[...a,...l,...i,...o];if(!t.silent)for(let r=0;r<d.length;r++)console.warn(d[r].message);return{idIssues:a,storeIssues:l,uniquenessIssues:i,spellingIssues:o,total:d.length}}let h=null;function m(e=typeof document<"u"?document:null,t=50,n=null){if(!e)return;h&&(clearTimeout(h),h=null);function a(){h=setTimeout(()=>{h=null;const l=C(e);n&&n(l)},t)}J()>0?K(a):a()}function He(e,t,n,a){e==="event"?(console.groupCollapsed("[ln-debug] event",t),console.log("target",n),console.log("detail",a),console.groupEnd()):e==="attr"&&(console.groupCollapsed("[ln-debug] attr",t),console.log("target",n),console.log("old → new",a.oldValue,"→",a.newValue),console.groupEnd())}let p=[];function ze(){p=Array.from(document.body.querySelectorAll("[data-ln-debug]")),document.body.hasAttribute("data-ln-debug")&&p.push(document.body)}function oe(e){if(e===window||e===document)return p.indexOf(document.body)!==-1;for(let t=0;t<p.length;t++)if(p[t].contains(e))return!0;return!1}function Ge(e,t,n,a){oe(n)&&He(e,t,n,a)}function I(){ze(),ie(p.length>0?Ge:null,p.length>0?oe:null)}function le(){I()}function Qe(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._debugGateBound&&(window.lnCore._debugGateBound=!0,b(function(){I(),$e(["data-ln-debug"],I)},"ln-debug")))}return(function(){const e="data-ln-debug",t="lnDebug";if(typeof window<"u"&&window[t]!==void 0)return;const n={"data-ln-debug":{type:"marker",description:"Enables developer diagnostics overlay, live validation badges, and inspection logging"}};Qe();function a(i){return this.dom=i,m(i.ownerDocument||document),le(),this}a.prototype.verify=function(i,o){return C(i||(this.dom?this.dom.ownerDocument||this.dom:document),o)},a.prototype.destroy=function(){delete this.dom[t],le()};const l=te(e,t,a,"ln-debug",{attributes:n,onInit:function(i){typeof document<"u"&&m(i&&i.ownerDocument?i.ownerDocument:document)},onSubtreeChange:function(i){typeof document<"u"&&m(i&&i.ownerDocument?i.ownerDocument:document)}});l.verify=function(i,o){return C(i||document,o)},l.schedule=function(i,o,d){return m(i||document,o,d)}})(),y.scheduleVerification=m,y.verifyDOM=C,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}),y})({});
1
+ var LnAshlarComponent=(function(C){"use strict";function j(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function x(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let n=null;for(let r=1;r<t.length;r++)if(t[r]&&t[r].nodeType===1){n=t[r];break}if(!x(n))return}e.apply(console,t)}}function ce(e,t){window.lnCore=window.lnCore||{},window.lnCore._debugSink=e,window.lnCore._debugIsContained=t||null}function ue(e,t,a){const n=a||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,n),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))}function b(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){b(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function fe(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function we(e,t){const a=!!(t&&t.typed),n=t&&t.exclude,r={},i=e.elements,o={};if(a)for(let d=0;d<i.length;d++){const l=i[d];l.name&&l.type==="checkbox"&&!l.disabled&&(o[l.name]=(o[l.name]||0)+1)}for(let d=0;d<i.length;d++){const l=i[d];if(!(!l.name||l.disabled||l.type==="file"||l.type==="submit"||l.type==="button")&&!(n&&l.matches&&l.matches(n)))if(l.type==="checkbox")a&&o[l.name]===1?r[l.name]=l.checked:(r[l.name]||(r[l.name]=[]),l.checked&&r[l.name].push(l.value));else if(l.type==="radio")l.checked&&(r[l.name]=l.value);else if(l.type==="select-multiple"){r[l.name]=[];for(let s=0;s<l.options.length;s++)l.options[s].selected&&r[l.name].push(l.options[s].value)}else if(a&&l.type==="hidden")r[l.name]=l.value;else if(a&&(l.type==="number"||l.type==="range")){const s=Number(l.value);r[l.name]=l.value===""||isNaN(s)?null:s}else r[l.name]=l.value}return r}function pe(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function be(e,t){const a=e.elements,n=[],r={};for(let i=0;i<a.length;i++){const o=a[i];o.name&&o.type==="checkbox"&&(r[o.name]=(r[o.name]||0)+1)}for(let i=0;i<a.length;i++){const o=a[i];if(o.type==="file"||o.type==="submit"||o.type==="button")continue;const d=o.getAttribute("data-ln-fill-as")||o.name;if(!d||!(d in t))continue;const l=t[d];if(o.type==="checkbox"){if(Array.isArray(l))o.checked=l.indexOf(o.value)!==-1;else if(r[o.name]>1){const s=String(l).split(",").map(function(c){return c.trim()});o.checked=s.indexOf(o.value)!==-1}else o.checked=pe(l);n.push(o)}else if(o.type==="radio")o.checked=o.value===String(l),n.push(o);else if(o.type==="select-multiple"){if(Array.isArray(l))for(let s=0;s<o.options.length;s++)o.options[s].selected=l.indexOf(o.options[s].value)!==-1;n.push(o)}else o.value=l,o.tagName==="SELECT"&&l!=null&&o.setAttribute("data-ln-value",l),n.push(o)}return n}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=be,window.lnCore.serializeForm=we,window.lnCore.resolveFormMethod=fe);const R={};function he(e,t){R[e]=t}function me(e){return R[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=he,window.lnCore.getDataMapper=me);function ge(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,b(function(){new MutationObserver(function(){ue(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const B={};function ye(e,t){if(!e||typeof t!="object")return;const a=e.toLowerCase().split("-")[0];B[a]=t}function Ce(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return B[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ye,window.lnCore.getLocaleFallback=Ce,window.lnCore.ensureLocaleObserver=ge);const S={};function ve(e,t){S[e]||(S[e]=document.querySelector('[data-ln-template="'+e+'"]'));const a=S[e];return a?a.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function W(e,t){if(!e||!t)return e;const a=e.querySelectorAll("[data-ln-field]");for(let o=0;o<a.length;o++){const d=a[o],l=d.getAttribute("data-ln-field");t[l]!=null&&(d.textContent=t[l])}const n=e.querySelectorAll("[data-ln-attr]");for(let o=0;o<n.length;o++){const d=n[o],l=d.getAttribute("data-ln-attr").split(",");for(let s=0;s<l.length;s++){const c=l[s].trim().split(":");if(c.length!==2)continue;const u=c[0].trim(),f=c[1].trim();t[f]!=null&&d.setAttribute(u,t[f])}}const r=e.querySelectorAll("[data-ln-show]");for(let o=0;o<r.length;o++){const d=r[o],l=d.getAttribute("data-ln-show");l in t&&d.classList.toggle("hidden",!t[l])}const i=e.querySelectorAll("[data-ln-class]");for(let o=0;o<i.length;o++){const d=i[o],l=d.getAttribute("data-ln-class").split(",");for(let s=0;s<l.length;s++){const c=l[s].trim().split(":");if(c.length!==2)continue;const u=c[0].trim(),f=c[1].trim();f in t&&d.classList.toggle(u,!!t[f])}}return e}function Ae(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const a=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let n=0;n<a.length;n++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",a[n],t??null),a[n].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)W(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let a=0;a<t.length;a++)t[a].textContent=""}})));function U(e,t){if(!e||!t)return e;const a=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;a.nextNode();){const i=a.currentNode;i.textContent.indexOf("{{")!==-1&&(i.textContent=i.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(o,d){return t[d]!==void 0?t[d]:""}))}const n=function(i,o){return t[o]!==void 0?t[o]:""},r=Array.from(e.querySelectorAll("*"));e.nodeType===1&&r.push(e);for(let i=0;i<r.length;i++){const o=r[i],d=o.attributes;for(let l=0;l<d.length;l++){const s=d[l];s.value.indexOf("{{")!==-1&&o.setAttribute(s.name,s.value.replace(/\{\{\s*(\w+)\s*\}\}/g,n))}}return e}function xe(e,t,a,n,r,i){const o={};for(let l=0;l<e.children.length;l++){const s=e.children[l],c=s.getAttribute("data-ln-render-key");c&&(o[c]=s)}const d=document.createDocumentFragment();for(let l=0;l<t.length;l++){const s=t[l],c=String(n(s));let u=o[c];if(u)r(u,s,l);else{const f=ve(a,i);if(!f||(U(f,s),u=f.firstElementChild,!u))continue;u.setAttribute("data-ln-render-key",c),r(u,s,l)}d.appendChild(u)}e.textContent="",e.appendChild(d)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=U,window.lnCore.fill=W,window.lnCore.lnFill=Ae,window.lnCore.renderList=xe);function k(e,t,a){const n=e.getAttribute(t);return n===null?a:n}function V(e,t,a){const n=parseInt(e.getAttribute(t),10);return isNaN(n)?a:n}function H(e,t,a=!1){const n=e.getAttribute(t);if(n===null)return!!a;const r=n.trim().toLowerCase();return!(r==="false"||r==="0")}function z(e,t){return(e.getAttribute(t)||"").split(",").map(a=>a.trim()).filter(Boolean)}const _=new Map;function G(e,t){const a=(e?e.join("|"):"")+"::"+t;if(_.has(a))return _.get(a);const n=new Set(e||[]),r=function(i,o){const d=i.getAttribute(o);return d!==null&&n.has(d)?d:t};return _.set(a,r),r}function Q(e,t,a){const n=parseFloat(e.getAttribute(t));return isNaN(n)?a:n}function J(e,t,a){const n=e.getAttribute(t);if(!n)return a;try{return JSON.parse(n)}catch{return a}}function K(e,t,a,n,r){if(!e||t===null)return!0;const i=n||"ln-component",o=e.type;if(o==="trigger"||o==="marker"||o==="string"||o==="list"||!o||t===""&&e.fallback!==void 0)return!0;const d=l=>{r?console.warn(l,r):console.warn(l)};if(o==="boolean"){const l=t.trim().toLowerCase();return l!==""&&l!=="true"&&l!=="false"&&l!=="1"&&l!=="0"?(d(`[${i}] Invalid value "${t}" for boolean attribute "${a}". Allowed: "true", "false", or presence-only.`),!1):!0}if(o==="enum"){const l=e.values||[];return l.includes(t)?!0:(d(`[${i}] Invalid value "${t}" for attribute "${a}". Allowed: ${l.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(o==="integer"){if(!/^-?\d+$/.test(t))return d(`[${i}] Invalid integer "${t}" for attribute "${a}". Fallback: ${e.fallback}.`),!1;const l=parseInt(t,10);return e.min!==void 0&&l<e.min?(d(`[${i}] Value ${l} for attribute "${a}" is less than min (${e.min}).`),!1):e.max!==void 0&&l>e.max?(d(`[${i}] Value ${l} for attribute "${a}" is greater than max (${e.max}).`),!1):!0}if(o==="float")return isNaN(Number(t))?(d(`[${i}] Invalid float "${t}" for attribute "${a}". Fallback: ${e.fallback}.`),!1):!0;if(o==="json")try{return JSON.parse(t),!0}catch(l){return d(`[${i}] Invalid JSON for attribute "${a}": ${l.message}. Fallback: ${e.fallback}.`),!1}return!0}function Se(e,t,a){for(const n in a){const[r,i,o]=a[n];Object.defineProperty(e,n,{get:function(){return r(t,i,o)},enumerable:!0,configurable:!0})}return e}function ke(e){const t={};for(const a in e){const n=e[a];if(!n||!n.prop)continue;let r=n.read;if(!r&&n.type)switch(n.type){case"enum":r=G(n.values,n.fallback);break;case"integer":r=V;break;case"float":r=Q;break;case"boolean":r=H;break;case"list":r=z;break;case"json":r=J;break;case"string":default:r=k;break}r||(r=k),t[n.prop]=[r,a,n.fallback]}return t}function _e(e){const t={};for(const a in e){const n=e[a];n&&n.effect&&(t[a]=n.effect)}return Object.keys(t).length?t:null}function De(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const a in e.effects)t.add(a);if(e.onAttrChange&&e.declared)for(const a of e.declared)t.add(a);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=Se,window.lnCore.attrSpec=ke,window.lnCore.attrStr=k,window.lnCore.attrInt=V,window.lnCore.attrBool=H,window.lnCore.attrList=z,window.lnCore.attrEnum=G,window.lnCore.attrFloat=Q,window.lnCore.attrJson=J);function h(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(a){console.error("["+t.attribute+"] init failed",e,a)}}}function P(e,t,a,n){if(e.nodeType!==1)return;const i=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",o={selector:t,attribute:a,ComponentFn:n};if(e.matches&&e.matches(i)&&h(e,o),e.querySelectorAll){const d=e.querySelectorAll(i);for(let l=0;l<d.length;l++)h(d[l],o)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function X(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Y(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function Z(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function ee(e){const t=Z(),a=e.observed||[];for(let n=0;n<a.length;n++){const r=a[n];t.byAttr.has(r)||t.byAttr.set(r,[]),t.byAttr.get(r).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const n in e.attributes){t.byDeclaredAttr.has(n)||t.byDeclaredAttr.set(n,[]);const r=t.byDeclaredAttr.get(n);r.some(i=>i.componentTag===e.componentTag)||r.push({spec:e.attributes[n],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const n=De(e);if(n===null)t.reactiveWildcard.push(e);else for(const r of n)t.byReactive.has(r)||t.byReactive.set(r,[]),t.byReactive.get(r).push(e)}e.persist&&t.persist.push(e)}function te(e,t,a,n){for(let r=0;r<e.length;r++){const i=e[r];if(!t[i.attribute])continue;const o=i.effects&&i.effects[a];o?o(t,a,n):i.onAttrChange&&(!i.declared||i.declared.has(a))&&i.onAttrChange(t,a,n)}}function $e(e){const t=e.attributeName,a=t.indexOf("data-ln-")===0,n=Z(),r=n.byAttr.get(t),i=j()&&n.byDeclaredAttr&&n.byDeclaredAttr.has(t);if(!a&&!r&&!i)return;const o=e.target;if(e.oldValue!==o.getAttribute(t)){if(i&&x(o)){const d=n.byDeclaredAttr.get(t),l=o.getAttribute(t);for(let s=0;s<d.length;s++)K(d[s].spec,l,t,d[s].componentTag,o)}if(window.lnCore._debugSink&&(a||r)&&window.lnCore._debugSink("attr",t,o,{oldValue:e.oldValue,newValue:o.getAttribute(t)}),a){const d=n.byReactive.get(t);d&&te(d,o,t,e.oldValue),n.reactiveWildcard.length&&te(n.reactiveWildcard,o,t,e.oldValue)}if(r)for(let d=0;d<r.length;d++){const l=r[d];if(l.handler){l.handler(o,t,e.oldValue);continue}l.onAttributeChange&&o[l.attribute]?l.onAttributeChange(o,t):(P(o,l.selector,l.attribute,l.ComponentFn),l.onInit&&l.onInit(o))}}}function ne(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,b(function(){new MutationObserver(function(t){for(let a=0;a<t.length;a++)try{$e(t[a])}catch(n){console.error("[ln-core] mutation handler failed",t[a].target,n)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function D(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function $(e,t){if(!document.contains(e))if(t.attribute){const a=e[t.attribute];if(a&&typeof a.destroy=="function")try{a.destroy()}catch(n){console.error("["+t.attribute+"] destroy failed",e,n)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function Ie(e){const t=D();if(t.length){if(e.target)for(let a=0;a<t.length;a++){const n=t[a];if(n.onSubtreeChange&&n.query){const r=n.query,i=e.target.nodeType===1?e.target.matches&&e.target.matches(r)?e.target:e.target.closest?e.target.closest(r):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(r):null;i&&n.onSubtreeChange(i,e)}}for(let a=0;a<e.addedNodes.length;a++){const n=e.addedNodes[a];if(n.nodeType===1){const r=!!(n.firstElementChild||n.children&&n.children.length);for(let i=0;i<t.length;i++){const o=t[i];if(o.selector&&o.attribute&&o.ComponentFn){if(!r)n.matches&&n.matches(o.query)&&h(n,o);else if(n.matches&&n.matches(o.query)&&h(n,o),n.querySelectorAll){const d=n.querySelectorAll(o.query);for(let l=0;l<d.length;l++)h(d[l],o)}}o.onInit&&o.onInit(n)}}}for(let a=0;a<e.removedNodes.length;a++){const n=e.removedNodes[a];if(n.nodeType===1){const r=!!(n.firstElementChild||n.children&&n.children.length);for(let i=0;i<t.length;i++){const o=t[i],d=o.query;if(d){if(!r)n.matches&&n.matches(d)&&$(n,o);else if(n.matches&&n.matches(d)&&$(n,o),n.querySelectorAll){const l=n.querySelectorAll(d);for(let s=0;s<l.length;s++)$(l[s],o)}}}}}}}function ae(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,b(function(){new MutationObserver(function(t){for(let a=0;a<t.length;a++){const n=t[a];if(n.type==="childList")try{Ie(n)}catch(r){console.error("[ln-core] lifecycle handler failed",n.target,r)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ee(e,t){ee({observed:e,handler:t}),ne()}function Oe(e){D().push(e),ae()}function oe(e,t,a,n,r={}){const i=r.extraAttributes||[],o=r.onAttributeChange||null,d=r.onSubtreeChange||null,l=r.onInit||null,s=r.onAttrChange||null,c=r.effects||null,u=r.attributes||null,f=u?_e(u):c,q=u?new Set(Object.keys(u)):null,Xe=r.persist||null;function A(T){const w=T||document.body;if(P(w,e,t,a),u&&j())for(const y in u){const et=u[y],M=Array.from(w.querySelectorAll("["+y+"]"));w.matches&&w.matches("["+y+"]")&&M.push(w);for(let N=0;N<M.length;N++){const F=M[N];x(F)&&K(et,F.getAttribute(y),y,n,F)}}l&&l(w)}const L=[];if(e.indexOf("[")!==-1){const T=/\[([\w-]+)/g;let w;for(;(w=T.exec(e))!==null;)L.push(w[1])}else L.push(e);ee({selector:e,attribute:t,componentTag:n,attributes:u,ComponentFn:a,onInit:l,observed:L.concat(i),onAttributeChange:o,onAttrChange:s,effects:f,declared:q,persist:Xe}),ne();const Ye=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,Ze=r.subtreeQuery||(Ye?e:"["+e+"]");D().push({selector:e,attribute:t,ComponentFn:a,onInit:l,onSubtreeChange:d,query:Ze}),ae(),window[t]=A,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=oe,window.lnCore.observeLifecycle=Oe);function se(){X()>0?Y(function(){A(document.body)}):A(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",se):se(),A}function le(e){return(e||"").replace(/^#/,"")}function I(e){const t=e===void 0?location.hash:e,a={},n=le(t);if(!n)return a;const r=n.split("&");for(let i=0;i<r.length;i++){const o=r[i];if(!o)continue;const d=o.indexOf(":"),l=d>-1?o.slice(0,d):o,s=d>-1?o.slice(d+1):"";if(l)try{a[l]=decodeURIComponent(s)}catch{a[l]=s}}return a}function qe(e){if(!e)return null;const t=I();return e in t?t[e]:null}function Le(e,t){if(!e)return;const a=I();t==null?delete a[e]:a[e]=String(t);const r=Object.keys(a).map(function(i){const o=a[i];return o===""?i:i+":"+encodeURIComponent(o)}).join("&");le(location.hash)!==r&&(location.hash=r)}function Te(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 a=e.getAttribute("data-ln-hash");if(a&&a.trim()!=="")return a.trim();const n=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return n?t?n+"-"+t:n:t||null}function Ne(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Fe(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function je(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Re(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const a=e.slice(0,t),n=e.slice(t+1),r=n?n.split(",").map(function(i){try{return decodeURIComponent(i)}catch{return i}}).filter(Boolean):[];return{key:a,values:r}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=I,window.lnCore.hashGet=qe,window.lnCore.hashSet=Le,window.lnCore.hashLinkClick=Te,window.lnCore.resolveHashNamespace=Me,window.lnCore.hashSortEncode=Ne,window.lnCore.hashSortDecode=Fe,window.lnCore.hashFilterEncode=je,window.lnCore.hashFilterDecode=Re);function Be(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Be);const E=new Set(["data-ln-accordion","data-ln-ajax","data-ln-api-base-url","data-ln-api-connector","data-ln-api-connector-query-debounce","data-ln-api-endpoint","data-ln-api-headers","data-ln-api-param-limit","data-ln-api-param-offset","data-ln-api-param-search","data-ln-api-param-sort-dir","data-ln-api-param-sort-field","data-ln-api-path","data-ln-api-queue","data-ln-api-queue-online","data-ln-attr","data-ln-autoresize","data-ln-autosave","data-ln-autosave-clear","data-ln-autosave-debounce-input","data-ln-autosave-exclude","data-ln-chart","data-ln-chart-area","data-ln-chart-count","data-ln-chart-empty","data-ln-chart-labels","data-ln-chart-line","data-ln-chart-max","data-ln-chart-min","data-ln-chart-padding","data-ln-chart-plot","data-ln-chart-sort","data-ln-chart-source","data-ln-chart-type","data-ln-chart-x","data-ln-chart-y","data-ln-chart-zero","data-ln-circular-progress","data-ln-circular-progress-label","data-ln-circular-progress-max","data-ln-class","data-ln-col","data-ln-confirm","data-ln-confirm-active","data-ln-confirm-announcer","data-ln-confirm-idle","data-ln-confirm-state","data-ln-confirm-timeout","data-ln-connector","data-ln-couchdb-auth","data-ln-couchdb-connector","data-ln-couchdb-db","data-ln-couchdb-headers","data-ln-couchdb-url","data-ln-data-coordinator","data-ln-data-coordinator-connector","data-ln-data-coordinator-filters","data-ln-data-coordinator-mapper","data-ln-data-coordinator-no-autosync","data-ln-data-coordinator-scope","data-ln-data-coordinator-search","data-ln-data-coordinator-sort-direction","data-ln-data-coordinator-sort-field","data-ln-data-coordinator-stale","data-ln-data-store","data-ln-data-store-frozen","data-ln-data-store-indexes","data-ln-data-store-no-autosync","data-ln-data-store-no-local-query","data-ln-data-store-search-fields","data-ln-data-store-stale","data-ln-data-store-window","data-ln-data-store-window-page","data-ln-date","data-ln-date-dict","data-ln-date-dict-key","data-ln-date-field","data-ln-date-format","data-ln-date-label","data-ln-date-locale","data-ln-debug","data-ln-dropdown","data-ln-dropdown-menu","data-ln-dropdown-placement","data-ln-dropdown-position","data-ln-editor","data-ln-editor-action","data-ln-editor-source","data-ln-empty","data-ln-empty-state","data-ln-empty-when","data-ln-error","data-ln-external-link","data-ln-field","data-ln-fill-as","data-ln-fill-form","data-ln-fill-id","data-ln-fillable","data-ln-filter","data-ln-filter-col","data-ln-filter-hide","data-ln-filter-key","data-ln-filter-options","data-ln-filter-reset","data-ln-filter-search","data-ln-filter-target","data-ln-filter-value","data-ln-filter-values","data-ln-form","data-ln-form-action-edit","data-ln-form-action-method","data-ln-hash","data-ln-include","data-ln-initial-value","data-ln-item","data-ln-item-action","data-ln-item-id","data-ln-item-select","data-ln-key","data-ln-key-allow-input","data-ln-key-for","data-ln-key-modifier","data-ln-key-target","data-ln-link","data-ln-list","data-ln-list-body","data-ln-list-count","data-ln-list-empty","data-ln-list-field","data-ln-list-filtered","data-ln-list-select-all","data-ln-list-selectable","data-ln-list-selected","data-ln-list-source","data-ln-list-total","data-ln-list-window","data-ln-list-window-page","data-ln-list-window-threshold","data-ln-modal","data-ln-modal-close","data-ln-modal-for","data-ln-modal-mode","data-ln-modal-when","data-ln-nav","data-ln-nav-exact","data-ln-number","data-ln-number-decimals","data-ln-number-max","data-ln-number-min","data-ln-obfuscator","data-ln-obfuscator-codec","data-ln-obfuscator-key","data-ln-options","data-ln-options-label","data-ln-options-value","data-ln-outlet","data-ln-panel","data-ln-persist","data-ln-persist-scope","data-ln-picklist","data-ln-picklist-list","data-ln-picklist-max","data-ln-popover","data-ln-popover-for","data-ln-popover-placement","data-ln-popover-position","data-ln-progress","data-ln-progress-max","data-ln-render-key","data-ln-route","data-ln-route-keep","data-ln-route-target","data-ln-route-title","data-ln-router-base","data-ln-router-hydrate","data-ln-scroll","data-ln-scroll-behavior","data-ln-scroll-block","data-ln-scroll-delay","data-ln-scroll-focus","data-ln-scroll-set","data-ln-scroll-update-hash","data-ln-search","data-ln-search-clear","data-ln-search-clear-for","data-ln-search-exclude","data-ln-search-fields","data-ln-search-for","data-ln-search-hide","data-ln-search-items","data-ln-show","data-ln-slug-from","data-ln-sort","data-ln-sort-dir","data-ln-sort-exclude","data-ln-sort-field","data-ln-sort-icon","data-ln-sort-items","data-ln-sort-state","data-ln-sortable","data-ln-sortable-handle","data-ln-stat","data-ln-stat-card","data-ln-stat-filter","data-ln-stat-label","data-ln-stat-trend","data-ln-stat-value","data-ln-step","data-ln-step-label","data-ln-stepper","data-ln-store","data-ln-tab","data-ln-table","data-ln-table-body","data-ln-table-cell-attr","data-ln-table-clear","data-ln-table-clear-all","data-ln-table-col","data-ln-table-col-filter","data-ln-table-col-select","data-ln-table-col-sort","data-ln-table-coordinator","data-ln-table-count","data-ln-table-dict","data-ln-table-empty","data-ln-table-empty-when","data-ln-table-filter-col","data-ln-table-filtered","data-ln-table-row","data-ln-table-row-action","data-ln-table-row-id","data-ln-table-row-select","data-ln-table-select-all-label","data-ln-table-selectable","data-ln-table-selected","data-ln-table-sort","data-ln-table-source","data-ln-table-total","data-ln-table-window","data-ln-table-window-page","data-ln-table-window-threshold","data-ln-tabs","data-ln-tabs-active","data-ln-tabs-default","data-ln-tabs-focus","data-ln-tabs-key","data-ln-template","data-ln-time","data-ln-time-locale","data-ln-toast","data-ln-toast-close","data-ln-toast-item","data-ln-toast-max","data-ln-toast-timeout","data-ln-toast-when","data-ln-toggle","data-ln-toggle-action","data-ln-toggle-for","data-ln-tooltip","data-ln-tooltip-enhance","data-ln-tooltip-enhanced","data-ln-tooltip-placement","data-ln-tooltip-position","data-ln-translatable","data-ln-translatable-lang","data-ln-translations","data-ln-translations-active","data-ln-translations-add","data-ln-translations-default","data-ln-translations-lang","data-ln-translations-locales","data-ln-translations-placeholder","data-ln-translations-prefix","data-ln-translations-remove-label","data-ln-ui-coordinator","data-ln-upload","data-ln-upload-accept","data-ln-upload-action","data-ln-upload-delete","data-ln-upload-dict","data-ln-upload-ext","data-ln-upload-file-field","data-ln-upload-id","data-ln-upload-ids-field","data-ln-upload-item","data-ln-upload-list","data-ln-upload-local-id","data-ln-upload-max-files","data-ln-upload-max-size","data-ln-upload-progress","data-ln-upload-size","data-ln-upload-state","data-ln-upload-zone","data-ln-validate","data-ln-validate-error","data-ln-validate-errors","data-ln-value","data-ln-websocket-connector","data-ln-websocket-connector-url"]);function We(e,t){if(e===t)return 0;if(!e.length)return t.length;if(!t.length)return e.length;const a=[];for(let n=0;n<=t.length;n++)a[n]=[n];for(let n=0;n<=e.length;n++)a[0][n]=n;for(let n=1;n<=t.length;n++)for(let r=1;r<=e.length;r++)t.charAt(n-1)===e.charAt(r-1)?a[n][r]=a[n-1][r-1]:a[n][r]=Math.min(a[n-1][r-1]+1,a[n][r-1]+1,a[n-1][r]+1);return a[t.length][e.length]}function Ue(e,t=E){if(t.has(e))return null;let a=null,n=1/0;for(const i of t){const o=We(e,i);o<n&&(n=o,a=i)}const r=Math.max(3,Math.floor(e.length*.4));return n<=r?a:null}function re(e){return typeof CSS<"u"&&CSS.escape?CSS.escape(e):e.replace(/([!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~])/g,"\\$1")}function Ve(e=document){const t=e.ownerDocument||e,a=e.nodeType===9?e.body||e.documentElement:e;if(!a)return[];const n=[],r=[a,...a.querySelectorAll("*")];for(let i=0;i<r.length;i++){const o=r[i];if(o.attributes)for(let d=0;d<o.attributes.length;d++){const l=o.attributes[d];if(l.name.startsWith("data-ln-")&&l.name.endsWith("-for")){const s=(l.value||"").trim();if(!s){n.push({type:"id-empty",element:o,attribute:l.name,targetId:"",message:`[ln-debug] Empty ID reference in <${o.tagName.toLowerCase()} ${l.name}="">.`});continue}t.getElementById(s)||t.querySelector("#"+re(s))||n.push({type:"id-unresolved",element:o,attribute:l.name,targetId:s,message:`[ln-debug] Unresolved ID reference: <${o.tagName.toLowerCase()} ${l.name}="${s}"> targets "#${s}", but no element with id="${s}" exists in the document.`})}}}return n}function He(e=document){const t=e.ownerDocument||e,a=e.nodeType===9?e.body||e.documentElement:e;if(!a)return[];const n=[],r=[a,...a.querySelectorAll("*")];for(let i=0;i<r.length;i++){const o=r[i];if(o.attributes)for(let d=0;d<o.attributes.length;d++){const l=o.attributes[d];if(l.name.startsWith("data-ln-")&&(l.name.endsWith("-source")||l.name.endsWith("-store"))&&l.name!=="data-ln-data-store"){const c=(l.value||"").trim();if(!c){n.push({type:"store-empty",element:o,attribute:l.name,storeName:"",message:`[ln-debug] Empty store reference in <${o.tagName.toLowerCase()} ${l.name}="">.`});continue}const u=re(c),f=t.querySelector(`[data-ln-data-store="${u}"], [data-ln-store="${u}"]`),q=typeof window<"u"&&window.lnDataStore&&typeof window.lnDataStore.getStore=="function"&&window.lnDataStore.getStore(c);!f&&!q&&n.push({type:"store-unresolved",element:o,attribute:l.name,storeName:c,message:`[ln-debug] Unresolved store reference: <${o.tagName.toLowerCase()} ${l.name}="${c}"> targets store "${c}", but no [data-ln-data-store="${c}"] exists in the document.`})}}}return n}function ze(e=document){e.ownerDocument;const t=e.nodeType===9?e.body||e.documentElement:e;if(!t)return[];const a=[],n=Array.from(t.querySelectorAll("[data-ln-data-store]"));t.hasAttribute&&t.hasAttribute("data-ln-data-store")&&n.unshift(t);const r=new Map;for(let i=0;i<n.length;i++){const o=n[i],d=(o.getAttribute("data-ln-data-store")||"").trim();d&&(r.has(d)||r.set(d,[]),r.get(d).push(o))}for(const[i,o]of r.entries())o.length>1&&a.push({type:"store-duplicate",storeName:i,elements:o,message:`[ln-debug] Duplicate store name: Multiple elements declare data-ln-data-store="${i}". Store names must be unique across the document.`});return a}function Ge(e=document,t=E){const a=e.nodeType===9?e.body||e.documentElement:e;if(!a)return[];const n=[],r=[a,...a.querySelectorAll("*")];for(let i=0;i<r.length;i++){const o=r[i];if(o.attributes)for(let d=0;d<o.attributes.length;d++){const l=o.attributes[d];if(l.name.startsWith("data-ln-")&&!t.has(l.name)){const s=Ue(l.name,t),c=s?` Did you mean "${s}"?`:"";n.push({type:"attribute-unknown",element:o,attribute:l.name,suggestion:s,message:`[ln-debug] Unknown attribute "${l.name}" on <${o.tagName.toLowerCase()}>.${c}`})}}}return n}function v(e=typeof document<"u"?document:null,t={}){if(!e)return{idIssues:[],storeIssues:[],uniquenessIssues:[],spellingIssues:[],total:0};const a=t.validAttributes||E,n=Ve(e),r=He(e),i=ze(e),o=Ge(e,a),d=[...n,...r,...i,...o];if(!t.silent)for(let l=0;l<d.length;l++)console.warn(d[l].message);return{idIssues:n,storeIssues:r,uniquenessIssues:i,spellingIssues:o,total:d.length}}let m=null;function g(e=typeof document<"u"?document:null,t=50,a=null){if(!e)return;m&&(clearTimeout(m),m=null);function n(){m=setTimeout(()=>{m=null;const r=v(e);a&&a(r)},t)}X()>0?Y(n):n()}function Qe(e,t,a,n){e==="event"?(console.groupCollapsed("[ln-debug] event",t),console.log("target",a),console.log("detail",n),console.groupEnd()):e==="attr"&&(console.groupCollapsed("[ln-debug] attr",t),console.log("target",a),console.log("old → new",n.oldValue,"→",n.newValue),console.groupEnd())}let p=[];function Je(){p=Array.from(document.body.querySelectorAll("[data-ln-debug]")),document.body.hasAttribute("data-ln-debug")&&p.push(document.body)}function ie(e){if(e===window||e===document)return p.indexOf(document.body)!==-1;for(let t=0;t<p.length;t++)if(p[t].contains(e))return!0;return!1}function Ke(e,t,a,n){ie(a)&&Qe(e,t,a,n)}function O(){Je(),ce(p.length>0?Ke:null,p.length>0?ie:null)}function de(){O()}function Pe(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._debugGateBound&&(window.lnCore._debugGateBound=!0,b(function(){O(),Ee(["data-ln-debug"],O)},"ln-debug")))}return(function(){const e="data-ln-debug",t="lnDebug";if(typeof window<"u"&&window[t]!==void 0)return;const a={"data-ln-debug":{type:"marker",description:"Enables developer diagnostics overlay, live validation badges, and inspection logging"}};Pe();function n(i){return this.dom=i,g(i.ownerDocument||document),de(),this}n.prototype.verify=function(i,o){return v(i||(this.dom?this.dom.ownerDocument||this.dom:document),o)},n.prototype.destroy=function(){delete this.dom[t],de()};const r=oe(e,t,n,"ln-debug",{attributes:a,onInit:function(i){typeof document<"u"&&g(i&&i.ownerDocument?i.ownerDocument:document)},onSubtreeChange:function(i){typeof document<"u"&&g(i&&i.ownerDocument?i.ownerDocument:document)}});r.verify=function(i,o){return v(i||document,o)},r.schedule=function(i,o,d){return g(i||document,o,d)}})(),C.scheduleVerification=g,C.verifyDOM=v,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"}),C})({});
@@ -1 +1 @@
1
- (function(){"use strict";function q(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function E(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 l=null;for(let s=1;s<t.length;s++)if(t[s]&&t[s].nodeType===1){l=t[s];break}if(!E(l))return}e.apply(console,t)}}function k(e,t,o){const l=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,l),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:l}))}function A(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){A(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function Z(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ee(e,t){const o=!!(t&&t.typed),l=t&&t.exclude,s={},u=e.elements,i={};if(o)for(let r=0;r<u.length;r++){const n=u[r];n.name&&n.type==="checkbox"&&!n.disabled&&(i[n.name]=(i[n.name]||0)+1)}for(let r=0;r<u.length;r++){const n=u[r];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(l&&n.matches&&n.matches(l)))if(n.type==="checkbox")o&&i[n.name]===1?s[n.name]=n.checked:(s[n.name]||(s[n.name]=[]),n.checked&&s[n.name].push(n.value));else if(n.type==="radio")n.checked&&(s[n.name]=n.value);else if(n.type==="select-multiple"){s[n.name]=[];for(let c=0;c<n.options.length;c++)n.options[c].selected&&s[n.name].push(n.options[c].value)}else if(o&&n.type==="hidden")s[n.name]=n.value;else if(o&&(n.type==="number"||n.type==="range")){const c=Number(n.value);s[n.name]=n.value===""||isNaN(c)?null:c}else s[n.name]=n.value}return s}function te(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ne(e,t){const o=e.elements,l=[],s={};for(let u=0;u<o.length;u++){const i=o[u];i.name&&i.type==="checkbox"&&(s[i.name]=(s[i.name]||0)+1)}for(let u=0;u<o.length;u++){const i=o[u];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const r=i.getAttribute("data-ln-fill-as")||i.name;if(!r||!(r in t))continue;const n=t[r];if(i.type==="checkbox"){if(Array.isArray(n))i.checked=n.indexOf(i.value)!==-1;else if(s[i.name]>1){const c=String(n).split(",").map(function(d){return d.trim()});i.checked=c.indexOf(i.value)!==-1}else i.checked=te(n);l.push(i)}else if(i.type==="radio")i.checked=i.value===String(n),l.push(i);else if(i.type==="select-multiple"){if(Array.isArray(n))for(let c=0;c<i.options.length;c++)i.options[c].selected=n.indexOf(i.options[c].value)!==-1;l.push(i)}else i.value=n,i.tagName==="SELECT"&&n!=null&&i.setAttribute("data-ln-value",n),l.push(i)}return l}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ne,window.lnCore.serializeForm=ee,window.lnCore.resolveFormMethod=Z);const B={};function oe(e,t){B[e]=t}function ie(e){return B[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=oe,window.lnCore.getDataMapper=ie);function re(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,A(function(){new MutationObserver(function(){k(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const F={};function le(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];F[o]=t}function se(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return F[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=le,window.lnCore.getLocaleFallback=se,window.lnCore.ensureLocaleObserver=re);const x={};function ue(e,t){x[e]||(x[e]=document.querySelector('[data-ln-template="'+e+'"]'));const o=x[e];return o?o.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function M(e,t){if(!e||!t)return e;const o=e.querySelectorAll("[data-ln-field]");for(let i=0;i<o.length;i++){const r=o[i],n=r.getAttribute("data-ln-field");t[n]!=null&&(r.textContent=t[n])}const l=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<l.length;i++){const r=l[i],n=r.getAttribute("data-ln-attr").split(",");for(let c=0;c<n.length;c++){const d=n[c].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();t[f]!=null&&r.setAttribute(a,t[f])}}const s=e.querySelectorAll("[data-ln-show]");for(let i=0;i<s.length;i++){const r=s[i],n=r.getAttribute("data-ln-show");n in t&&r.classList.toggle("hidden",!t[n])}const u=e.querySelectorAll("[data-ln-class]");for(let i=0;i<u.length;i++){const r=u[i],n=r.getAttribute("data-ln-class").split(",");for(let c=0;c<n.length;c++){const d=n[c].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();f in t&&r.classList.toggle(a,!!t[f])}}return e}function ce(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const o=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let l=0;l<o.length;l++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",o[l],t??null),o[l].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)M(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let o=0;o<t.length;o++)t[o].textContent=""}})));function $(e,t){if(!e||!t)return e;const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const u=o.currentNode;u.textContent.indexOf("{{")!==-1&&(u.textContent=u.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,r){return t[r]!==void 0?t[r]:""}))}const l=function(u,i){return t[i]!==void 0?t[i]:""},s=Array.from(e.querySelectorAll("*"));e.nodeType===1&&s.push(e);for(let u=0;u<s.length;u++){const i=s[u],r=i.attributes;for(let n=0;n<r.length;n++){const c=r[n];c.value.indexOf("{{")!==-1&&i.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,l))}}return e}function de(e,t,o,l,s,u){const i={};for(let n=0;n<e.children.length;n++){const c=e.children[n],d=c.getAttribute("data-ln-render-key");d&&(i[d]=c)}const r=document.createDocumentFragment();for(let n=0;n<t.length;n++){const c=t[n],d=String(l(c));let a=i[d];if(a)s(a,c,n);else{const f=ue(o,u);if(!f||($(f,c),a=f.firstElementChild,!a))continue;a.setAttribute("data-ln-render-key",d),s(a,c,n)}r.appendChild(a)}e.textContent="",e.appendChild(r)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=$,window.lnCore.fill=M,window.lnCore.lnFill=ce,window.lnCore.renderList=de);function S(e,t,o){const l=e.getAttribute(t);return l===null?o:l}function N(e,t,o){const l=parseInt(e.getAttribute(t),10);return isNaN(l)?o:l}function j(e,t,o=!1){const l=e.getAttribute(t);if(l===null)return!!o;const s=l.trim().toLowerCase();return!(s==="false"||s==="0")}function z(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const L=new Map;function W(e,t){const o=(e?e.join("|"):"")+"::"+t;if(L.has(o))return L.get(o);const l=new Set(e||[]),s=function(u,i){const r=u.getAttribute(i);return r!==null&&l.has(r)?r:t};return L.set(o,s),s}function P(e,t,o){const l=parseFloat(e.getAttribute(t));return isNaN(l)?o:l}function U(e,t,o){const l=e.getAttribute(t);if(!l)return o;try{return JSON.parse(l)}catch{return o}}function H(e,t,o,l,s){if(!e||t===null)return!0;const u=l||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const r=n=>{s?console.warn(n,s):console.warn(n)};if(i==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(r(`[${u}] Invalid value "${t}" for boolean attribute "${o}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const n=e.values||[];return n.includes(t)?!0:(r(`[${u}] Invalid value "${t}" for attribute "${o}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return r(`[${u}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(r(`[${u}] Value ${n} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(r(`[${u}] Value ${n} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(r(`[${u}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(n){return r(`[${u}] Invalid JSON for attribute "${o}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function V(e,t,o){for(const l in o){const[s,u,i]=o[l];Object.defineProperty(e,l,{get:function(){return s(t,u,i)},enumerable:!0,configurable:!0})}return e}function K(e){const t={};for(const o in e){const l=e[o];if(!l||!l.prop)continue;let s=l.read;if(!s&&l.type)switch(l.type){case"enum":s=W(l.values,l.fallback);break;case"integer":s=N;break;case"float":s=P;break;case"boolean":s=j;break;case"list":s=z;break;case"json":s=U;break;case"string":default:s=S;break}s||(s=S),t[l.prop]=[s,o,l.fallback]}return t}function ae(e){const t={};for(const o in e){const l=e[o];l&&l.effect&&(t[o]=l.effect)}return Object.keys(t).length?t:null}function fe(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const o in e.effects)t.add(o);if(e.onAttrChange&&e.declared)for(const o of e.declared)t.add(o);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=V,window.lnCore.attrSpec=K,window.lnCore.attrStr=S,window.lnCore.attrInt=N,window.lnCore.attrBool=j,window.lnCore.attrList=z,window.lnCore.attrEnum=W,window.lnCore.attrFloat=P,window.lnCore.attrJson=U);function O(e,t,o,l){if(e.nodeType!==1)return;const u=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i=Array.from(e.querySelectorAll(u));e.matches&&e.matches(u)&&i.push(e);for(const r of i)if(!r[o]){window.lnCore._persistSink&&r.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(r,t);try{r[o]=new l(r)}catch(n){console.error("["+o+"] init failed",r,n)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function ge(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function pe(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 Q(){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 we(e){const t=Q(),o=e.observed||[];for(let l=0;l<o.length;l++){const s=o[l];t.byAttr.has(s)||t.byAttr.set(s,[]),t.byAttr.get(s).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const l in e.attributes){t.byDeclaredAttr.has(l)||t.byDeclaredAttr.set(l,[]);const s=t.byDeclaredAttr.get(l);s.some(u=>u.componentTag===e.componentTag)||s.push({spec:e.attributes[l],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const l=fe(e);if(l===null)t.reactiveWildcard.push(e);else for(const s of l)t.byReactive.has(s)||t.byReactive.set(s,[]),t.byReactive.get(s).push(e)}e.persist&&t.persist.push(e)}function J(e,t,o,l){for(let s=0;s<e.length;s++){const u=e[s];if(!t[u.attribute])continue;const i=u.effects&&u.effects[o];i?i(t,o,l):u.onAttrChange&&(!u.declared||u.declared.has(o))&&u.onAttrChange(t,o,l)}}function he(e){const t=e.target,o=e.attributeName;if(e.oldValue===t.getAttribute(o))return;const l=Q(),s=l.byAttr.get(o);if(q()&&l.byDeclaredAttr&&l.byDeclaredAttr.has(o)&&E(t)){const u=l.byDeclaredAttr.get(o),i=t.getAttribute(o);for(let r=0;r<u.length;r++)H(u[r].spec,i,o,u[r].componentTag,t)}if(window.lnCore._debugSink&&(o.indexOf("data-ln-")===0||s)&&window.lnCore._debugSink("attr",o,t,{oldValue:e.oldValue,newValue:t.getAttribute(o)}),o.indexOf("data-ln-")===0){const u=l.byReactive.get(o);u&&J(u,t,o,e.oldValue),l.reactiveWildcard.length&&J(l.reactiveWildcard,t,o,e.oldValue)}if(s)for(let u=0;u<s.length;u++){const i=s[u];if(i.handler){i.handler(t,o,e.oldValue);continue}i.onAttributeChange&&t[i.attribute]?i.onAttributeChange(t,o):(O(t,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(t))}}function be(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,A(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{he(t[o])}catch(l){console.error("[ln-core] mutation handler failed",t[o].target,l)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function G(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function me(e){const t=G();if(t.length){if(e.target)for(let o=0;o<t.length;o++){const l=t[o];if(l.onSubtreeChange){const s=l.query,u=e.target.nodeType===1?e.target.matches(s)?e.target:e.target.closest(s):e.target.parentElement?e.target.parentElement.closest(s):null;u&&l.onSubtreeChange(u,e)}}for(let o=0;o<e.addedNodes.length;o++){const l=e.addedNodes[o];if(l.nodeType===1)for(let s=0;s<t.length;s++){const u=t[s];O(l,u.selector,u.attribute,u.ComponentFn),u.onInit&&u.onInit(l)}}for(let o=0;o<e.removedNodes.length;o++){const l=e.removedNodes[o];if(l.nodeType===1)for(let s=0;s<t.length;s++){const u=t[s],i=u.query,r=Array.from(l.querySelectorAll(i));l.matches&&l.matches(i)&&r.push(l);for(let n=0;n<r.length;n++){const c=r[n];if(!document.contains(c)){const d=c[u.attribute];if(d&&typeof d.destroy=="function")try{d.destroy()}catch(a){console.error("["+u.attribute+"] destroy failed",c,a)}delete c[u.attribute]}}}}}}function ye(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,A(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++){const l=t[o];if(l.type==="childList")try{me(l)}catch(s){console.error("[ln-core] lifecycle handler failed",l.target,s)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function X(e,t,o,l,s={}){const u=s.extraAttributes||[],i=s.onAttributeChange||null,r=s.onSubtreeChange||null,n=s.onInit||null,c=s.onAttrChange||null,d=s.effects||null,a=s.attributes||null,f=a?ae(a):d,_=a?new Set(Object.keys(a)):null,v=s.persist||null;function C(w){const p=w||document.body;if(O(p,e,t,o),a&&q())for(const h in a){const De=a[h],D=Array.from(p.querySelectorAll("["+h+"]"));p.matches&&p.matches("["+h+"]")&&D.push(p);for(let I=0;I<D.length;I++){const R=D[I];E(R)&&H(De,R.getAttribute(h),h,l,R)}}n&&n(p)}const b=[];if(e.indexOf("[")!==-1){const w=/\[([\w-]+)/g;let p;for(;(p=w.exec(e))!==null;)b.push(p[1])}else b.push(e);we({selector:e,attribute:t,componentTag:l,attributes:a,ComponentFn:o,onInit:n,observed:b.concat(u),onAttributeChange:i,onAttrChange:c,effects:f,declared:_,persist:v}),be();const m=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,y=s.subtreeQuery||(m?e:"["+e+"]");G().push({selector:e,attribute:t,ComponentFn:o,onInit:n,onSubtreeChange:r,query:y}),ye(),window[t]=C,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=X);function g(){ge()>0?pe(function(){C(document.body)}):C(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",g):g(),C}function Y(e){return(e||"").replace(/^#/,"")}function T(e){const t=e===void 0?location.hash:e,o={},l=Y(t);if(!l)return o;const s=l.split("&");for(let u=0;u<s.length;u++){const i=s[u];if(!i)continue;const r=i.indexOf(":"),n=r>-1?i.slice(0,r):i,c=r>-1?i.slice(r+1):"";if(n)try{o[n]=decodeURIComponent(c)}catch{o[n]=c}}return o}function Ce(e){if(!e)return null;const t=T();return e in t?t[e]:null}function ve(e,t){if(!e)return;const o=T();t==null?delete o[e]:o[e]=String(t);const s=Object.keys(o).map(function(u){const i=o[u];return i===""?u:u+":"+encodeURIComponent(i)}).join("&");Y(location.hash)!==s&&(location.hash=s)}function _e(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ae(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const o=e.getAttribute("data-ln-hash");if(o&&o.trim()!=="")return o.trim();const l=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return l?t?l+"-"+t:l:t||null}function Ee(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function ke(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 xe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Se(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const o=e.slice(0,t),l=e.slice(t+1),s=l?l.split(",").map(function(u){try{return decodeURIComponent(u)}catch{return u}}).filter(Boolean):[];return{key:o,values:s}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=T,window.lnCore.hashGet=Ce,window.lnCore.hashSet=ve,window.lnCore.hashLinkClick=_e,window.lnCore.resolveHashNamespace=Ae,window.lnCore.hashSortEncode=Ee,window.lnCore.hashSortDecode=ke,window.lnCore.hashFilterEncode=xe,window.lnCore.hashFilterDecode=Se);function Le(e,t,o,l){const s=typeof l=="number"?l:4,u=window.innerWidth,i=window.innerHeight,r=t.width,n=t.height,c=o.split("-"),d=c[0],a=c[1]==="start"||c[1]==="end"?c[1]:"center",f={top:["top","bottom","right","left"],bottom:["bottom","top","right","left"],left:["left","right","top","bottom"],right:["right","left","top","bottom"]},_=f[d]||f.bottom;function v(g){return g==="top"||g==="bottom"?a==="start"?e.left:a==="end"?e.right-r:e.left+(e.width-r)/2:a==="start"?e.top:a==="end"?e.bottom-n:e.top+(e.height-n)/2}function C(g){let w,p,h=!0;return g==="top"?(w=e.top-s-n,p=v(g),w<0&&(h=!1)):g==="bottom"?(w=e.bottom+s,p=v(g),w+n>i&&(h=!1)):g==="left"?(w=v(g),p=e.left-s-r,p<0&&(h=!1)):(w=v(g),p=e.right+s,p+r>u&&(h=!1)),{top:w,left:p,side:g,fits:h}}let b=null;for(let g=0;g<_.length;g++){const w=C(_[g]);if(w.fits){b=w;break}}b||(b=C(_[0]));let m=b.top,y=b.left;return r>=u?y=0:(y<0&&(y=0),y+r>u&&(y=u-r)),n>=i?m=0:(m<0&&(m=0),m+n>i&&(m=i-n)),{top:m,left:y,placement:b.side}}function Oe(e){if(!e)return{width:0,height:0};const t=e.style,o=t.visibility,l=t.display,s=t.position;t.visibility="hidden",t.display="block",t.position="fixed";const u=e.offsetWidth,i=e.offsetHeight;return t.visibility=o,t.display=l,t.position=s,{width:u,height:i}}function Te(){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=Te),(function(){const e="data-ln-dropdown",t="lnDropdown",o="bottom-end";if(window[t]!==void 0)return;const l={"data-ln-dropdown":{type:"marker",description:"Initializes the dropdown container"},"data-ln-dropdown-position":{prop:"position",type:"enum",values:["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],fallback:o,description:"Preferred positioning anchor"},"data-ln-dropdown-placement":{type:"enum",values:["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],description:"Active calculated placement applied at runtime"},"data-ln-dropdown-menu":{type:"marker",description:"Dropdown menu element containing items"}},s=K(l);function u(i){this.dom=i,V(this,i,s),this.toggleEl=i.querySelector("[data-ln-toggle]"),this._boundDocClick=null,this._docClickTimeout=null,this._boundScrollReposition=null,this._boundResizeClose=null,this.toggleEl&&(this.toggleEl.setAttribute("data-ln-dropdown-menu",""),this.toggleEl.setAttribute("role","menu"),this.toggleEl.setAttribute("popover","manual"),this._initMenuAria()),this.triggerBtn=i.querySelector("[data-ln-toggle-for]"),this.triggerBtn&&(this.triggerBtn.setAttribute("aria-haspopup","menu"),this.triggerBtn.setAttribute("aria-expanded","false"));const r=this;return this._onRequestOpen=function(){r.toggleEl&&r.toggleEl.setAttribute("data-ln-toggle","open")},this._onRequestClose=function(){r.toggleEl&&r.toggleEl.setAttribute("data-ln-toggle","close")},this._onRequestToggle=function(){if(r.toggleEl){const n=r.toggleEl.getAttribute("data-ln-toggle");r.toggleEl.setAttribute("data-ln-toggle",n==="open"?"close":"open")}},this._onKeydown=function(n){const c=r.toggleEl&&r.toggleEl.getAttribute("data-ln-toggle")==="open";if(n.key==="Escape"){c&&(n.preventDefault(),n.stopPropagation(),r.toggleEl.setAttribute("data-ln-toggle","close"),r.triggerBtn&&r.triggerBtn.focus());return}if(n.key==="Tab"){c&&(r.triggerBtn&&r.triggerBtn.focus(),r.toggleEl.setAttribute("data-ln-toggle","close"));return}const d=r._getMenuItems();if(d.length===0)return;if(!c&&(n.key==="ArrowDown"||n.key==="ArrowUp")){n.preventDefault(),r.toggleEl.setAttribute("data-ln-toggle","open"),setTimeout(function(){const f=r._getMenuItems();f.length>0&&r._focusItem(f,n.key==="ArrowDown"?0:f.length-1)},0);return}if(!c)return;const a=d.indexOf(document.activeElement);if(n.key==="ArrowDown"){n.preventDefault();const f=a<d.length-1?a+1:0;r._focusItem(d,f)}else if(n.key==="ArrowUp"){n.preventDefault();const f=a>0?a-1:d.length-1;r._focusItem(d,f)}else n.key==="Home"?(n.preventDefault(),r._focusItem(d,0)):n.key==="End"&&(n.preventDefault(),r._focusItem(d,d.length-1))},this.dom.addEventListener("ln-dropdown:request-open",this._onRequestOpen),this.dom.addEventListener("ln-dropdown:request-close",this._onRequestClose),this.dom.addEventListener("ln-dropdown:request-toggle",this._onRequestToggle),this.dom.addEventListener("keydown",this._onKeydown),this._onToggleOpen=function(n){!n.detail||n.detail.target!==r.toggleEl||(r.triggerBtn&&r.triggerBtn.setAttribute("aria-expanded","true"),typeof r.toggleEl.showPopover=="function"&&r.toggleEl.showPopover(),r._initMenuAria(),r._reposition(),r._addOutsideClickListener(),r._addScrollRepositionListener(),r._addResizeCloseListener(),k(i,"ln-dropdown:open",{target:n.detail.target}))},this._onToggleClose=function(n){!n.detail||n.detail.target!==r.toggleEl||(r.triggerBtn&&r.triggerBtn.setAttribute("aria-expanded","false"),r._removeOutsideClickListener(),r._removeScrollRepositionListener(),r._removeResizeCloseListener(),r.toggleEl.style.top="",r.toggleEl.style.left="",r.toggleEl.removeAttribute("data-ln-dropdown-placement"),typeof r.toggleEl.hidePopover=="function"&&r.toggleEl.matches(":popover-open")&&r.toggleEl.hidePopover(),k(i,"ln-dropdown:close",{target:n.detail.target}))},this.toggleEl&&(this.toggleEl.addEventListener("ln-toggle:open",this._onToggleOpen),this.toggleEl.addEventListener("ln-toggle:close",this._onToggleClose)),this}u.prototype._initMenuAria=function(){if(!this.toggleEl)return;const i=this.toggleEl.querySelectorAll("li");for(const n of i)n.setAttribute("role","none");const r=this._getMenuItems();for(let n=0;n<r.length;n++)r[n].setAttribute("role","menuitem"),r[n].setAttribute("tabindex",n===0?"0":"-1")},u.prototype._getMenuItems=function(){return this.toggleEl?Array.from(this.toggleEl.querySelectorAll('a[href], button:not([disabled]), [role="menuitem"]:not([disabled])')):[]},u.prototype._focusItem=function(i,r){for(let n=0;n<i.length;n++)i[n].setAttribute("tabindex",n===r?"0":"-1");i[r]&&i[r].focus()},u.prototype._reposition=function(){if(!this.triggerBtn||!this.toggleEl)return;const i=this.triggerBtn.getBoundingClientRect(),r=Oe(this.toggleEl),n=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--size-xs"))*16||4,c=this.position||o,d=Le(i,r,c,n);this.toggleEl.style.top=d.top+"px",this.toggleEl.style.left=d.left+"px",this.toggleEl.setAttribute("data-ln-dropdown-placement",d.placement)},u.prototype._addOutsideClickListener=function(){if(this._boundDocClick)return;const i=this;this._boundDocClick=function(r){i.dom.contains(r.target)||i.toggleEl&&i.toggleEl.contains(r.target)||i.toggleEl&&i.toggleEl.getAttribute("data-ln-toggle")==="open"&&i.toggleEl.setAttribute("data-ln-toggle","close")},i._docClickTimeout=setTimeout(function(){i._docClickTimeout=null,document.addEventListener("click",i._boundDocClick)},0)},u.prototype._removeOutsideClickListener=function(){this._docClickTimeout&&(clearTimeout(this._docClickTimeout),this._docClickTimeout=null),this._boundDocClick&&(document.removeEventListener("click",this._boundDocClick),this._boundDocClick=null)},u.prototype._addScrollRepositionListener=function(){const i=this;this._boundScrollReposition=function(){i._reposition()},window.addEventListener("scroll",this._boundScrollReposition,{passive:!0,capture:!0})},u.prototype._removeScrollRepositionListener=function(){this._boundScrollReposition&&(window.removeEventListener("scroll",this._boundScrollReposition,{capture:!0}),this._boundScrollReposition=null)},u.prototype._addResizeCloseListener=function(){const i=this;this._boundResizeClose=function(){i.toggleEl&&i.toggleEl.getAttribute("data-ln-toggle")==="open"&&i.toggleEl.setAttribute("data-ln-toggle","close")},window.addEventListener("resize",this._boundResizeClose)},u.prototype._removeResizeCloseListener=function(){this._boundResizeClose&&(window.removeEventListener("resize",this._boundResizeClose),this._boundResizeClose=null)},u.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-dropdown:request-open",this._onRequestOpen),this.dom.removeEventListener("ln-dropdown:request-close",this._onRequestClose),this.dom.removeEventListener("ln-dropdown:request-toggle",this._onRequestToggle),this.dom.removeEventListener("keydown",this._onKeydown),this._removeOutsideClickListener(),this._removeScrollRepositionListener(),this._removeResizeCloseListener(),this.toggleEl&&typeof this.toggleEl.hidePopover=="function"&&this.toggleEl.matches(":popover-open")&&this.toggleEl.hidePopover(),this.toggleEl&&(this.toggleEl.removeAttribute("data-ln-dropdown-placement"),this.toggleEl.removeEventListener("ln-toggle:open",this._onToggleOpen),this.toggleEl.removeEventListener("ln-toggle:close",this._onToggleClose)),delete this.dom[t])},X(e,t,u,"ln-dropdown",{attributes:l})})()})();
1
+ (function(){"use strict";function F(){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 k(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 s=1;s<t.length;s++)if(t[s]&&t[s].nodeType===1){i=t[s];break}if(!k(i))return}e.apply(console,t)}}function x(e,t,r){const i=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))}function E(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){E(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function ne(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function oe(e,t){const r=!!(t&&t.typed),i=t&&t.exclude,s={},u=e.elements,o={};if(r)for(let l=0;l<u.length;l++){const n=u[l];n.name&&n.type==="checkbox"&&!n.disabled&&(o[n.name]=(o[n.name]||0)+1)}for(let l=0;l<u.length;l++){const n=u[l];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(i&&n.matches&&n.matches(i)))if(n.type==="checkbox")r&&o[n.name]===1?s[n.name]=n.checked:(s[n.name]||(s[n.name]=[]),n.checked&&s[n.name].push(n.value));else if(n.type==="radio")n.checked&&(s[n.name]=n.value);else if(n.type==="select-multiple"){s[n.name]=[];for(let c=0;c<n.options.length;c++)n.options[c].selected&&s[n.name].push(n.options[c].value)}else if(r&&n.type==="hidden")s[n.name]=n.value;else if(r&&(n.type==="number"||n.type==="range")){const c=Number(n.value);s[n.name]=n.value===""||isNaN(c)?null:c}else s[n.name]=n.value}return s}function ie(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function re(e,t){const r=e.elements,i=[],s={};for(let u=0;u<r.length;u++){const o=r[u];o.name&&o.type==="checkbox"&&(s[o.name]=(s[o.name]||0)+1)}for(let u=0;u<r.length;u++){const o=r[u];if(o.type==="file"||o.type==="submit"||o.type==="button")continue;const l=o.getAttribute("data-ln-fill-as")||o.name;if(!l||!(l in t))continue;const n=t[l];if(o.type==="checkbox"){if(Array.isArray(n))o.checked=n.indexOf(o.value)!==-1;else if(s[o.name]>1){const c=String(n).split(",").map(function(d){return d.trim()});o.checked=c.indexOf(o.value)!==-1}else o.checked=ie(n);i.push(o)}else if(o.type==="radio")o.checked=o.value===String(n),i.push(o);else if(o.type==="select-multiple"){if(Array.isArray(n))for(let c=0;c<o.options.length;c++)o.options[c].selected=n.indexOf(o.options[c].value)!==-1;i.push(o)}else o.value=n,o.tagName==="SELECT"&&n!=null&&o.setAttribute("data-ln-value",n),i.push(o)}return i}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=re,window.lnCore.serializeForm=oe,window.lnCore.resolveFormMethod=ne);const M={};function le(e,t){M[e]=t}function se(e){return M[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=le,window.lnCore.getDataMapper=se);function ue(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,E(function(){new MutationObserver(function(){x(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const $={};function ce(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];$[r]=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=ce,window.lnCore.getLocaleFallback=de,window.lnCore.ensureLocaleObserver=ue);const S={};function ae(e,t){S[e]||(S[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=S[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function N(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let o=0;o<r.length;o++){const l=r[o],n=l.getAttribute("data-ln-field");t[n]!=null&&(l.textContent=t[n])}const i=e.querySelectorAll("[data-ln-attr]");for(let o=0;o<i.length;o++){const l=i[o],n=l.getAttribute("data-ln-attr").split(",");for(let c=0;c<n.length;c++){const d=n[c].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();t[f]!=null&&l.setAttribute(a,t[f])}}const s=e.querySelectorAll("[data-ln-show]");for(let o=0;o<s.length;o++){const l=s[o],n=l.getAttribute("data-ln-show");n in t&&l.classList.toggle("hidden",!t[n])}const u=e.querySelectorAll("[data-ln-class]");for(let o=0;o<u.length;o++){const l=u[o],n=l.getAttribute("data-ln-class").split(",");for(let c=0;c<n.length;c++){const d=n[c].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();f in t&&l.classList.toggle(a,!!t[f])}}return e}function fe(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const r=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let i=0;i<r.length;i++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[i],t??null),r[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 r=0;r<t.length;r++)t[r].textContent=""}})));function j(e,t){if(!e||!t)return e;const r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const u=r.currentNode;u.textContent.indexOf("{{")!==-1&&(u.textContent=u.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(o,l){return t[l]!==void 0?t[l]:""}))}const i=function(u,o){return t[o]!==void 0?t[o]:""},s=Array.from(e.querySelectorAll("*"));e.nodeType===1&&s.push(e);for(let u=0;u<s.length;u++){const o=s[u],l=o.attributes;for(let n=0;n<l.length;n++){const c=l[n];c.value.indexOf("{{")!==-1&&o.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function ge(e,t,r,i,s,u){const o={};for(let n=0;n<e.children.length;n++){const c=e.children[n],d=c.getAttribute("data-ln-render-key");d&&(o[d]=c)}const l=document.createDocumentFragment();for(let n=0;n<t.length;n++){const c=t[n],d=String(i(c));let a=o[d];if(a)s(a,c,n);else{const f=ae(r,u);if(!f||(j(f,c),a=f.firstElementChild,!a))continue;a.setAttribute("data-ln-render-key",d),s(a,c,n)}l.appendChild(a)}e.textContent="",e.appendChild(l)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=j,window.lnCore.fill=N,window.lnCore.lnFill=fe,window.lnCore.renderList=ge);function L(e,t,r){const i=e.getAttribute(t);return i===null?r:i}function z(e,t,r){const i=parseInt(e.getAttribute(t),10);return isNaN(i)?r:i}function W(e,t,r=!1){const i=e.getAttribute(t);if(i===null)return!!r;const s=i.trim().toLowerCase();return!(s==="false"||s==="0")}function P(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const O=new Map;function U(e,t){const r=(e?e.join("|"):"")+"::"+t;if(O.has(r))return O.get(r);const i=new Set(e||[]),s=function(u,o){const l=u.getAttribute(o);return l!==null&&i.has(l)?l:t};return O.set(r,s),s}function H(e,t,r){const i=parseFloat(e.getAttribute(t));return isNaN(i)?r:i}function V(e,t,r){const i=e.getAttribute(t);if(!i)return r;try{return JSON.parse(i)}catch{return r}}function K(e,t,r,i,s){if(!e||t===null)return!0;const u=i||"ln-component",o=e.type;if(o==="trigger"||o==="marker"||o==="string"||o==="list"||!o||t===""&&e.fallback!==void 0)return!0;const l=n=>{s?console.warn(n,s):console.warn(n)};if(o==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(l(`[${u}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(o==="enum"){const n=e.values||[];return n.includes(t)?!0:(l(`[${u}] Invalid value "${t}" for attribute "${r}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(o==="integer"){if(!/^-?\d+$/.test(t))return l(`[${u}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(l(`[${u}] Value ${n} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(l(`[${u}] Value ${n} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(o==="float")return isNaN(Number(t))?(l(`[${u}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(o==="json")try{return JSON.parse(t),!0}catch(n){return l(`[${u}] Invalid JSON for attribute "${r}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function Q(e,t,r){for(const i in r){const[s,u,o]=r[i];Object.defineProperty(e,i,{get:function(){return s(t,u,o)},enumerable:!0,configurable:!0})}return e}function J(e){const t={};for(const r in e){const i=e[r];if(!i||!i.prop)continue;let s=i.read;if(!s&&i.type)switch(i.type){case"enum":s=U(i.values,i.fallback);break;case"integer":s=z;break;case"float":s=H;break;case"boolean":s=W;break;case"list":s=P;break;case"json":s=V;break;case"string":default:s=L;break}s||(s=L),t[i.prop]=[s,r,i.fallback]}return t}function pe(e){const t={};for(const r in e){const i=e[r];i&&i.effect&&(t[r]=i.effect)}return Object.keys(t).length?t:null}function he(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const r in e.effects)t.add(r);if(e.onAttrChange&&e.declared)for(const r of e.declared)t.add(r);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=Q,window.lnCore.attrSpec=J,window.lnCore.attrStr=L,window.lnCore.attrInt=z,window.lnCore.attrBool=W,window.lnCore.attrList=P,window.lnCore.attrEnum=U,window.lnCore.attrFloat=H,window.lnCore.attrJson=V);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(r){console.error("["+t.attribute+"] init failed",e,r)}}}function G(e,t,r,i){if(e.nodeType!==1)return;const u=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",o={selector:t,attribute:r,ComponentFn:i};if(e.matches&&e.matches(u)&&_(e,o),e.querySelectorAll){const l=e.querySelectorAll(u);for(let n=0;n<l.length;n++)_(l[n],o)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function we(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function be(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function X(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function me(e){const t=X(),r=e.observed||[];for(let i=0;i<r.length;i++){const s=r[i];t.byAttr.has(s)||t.byAttr.set(s,[]),t.byAttr.get(s).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const i in e.attributes){t.byDeclaredAttr.has(i)||t.byDeclaredAttr.set(i,[]);const s=t.byDeclaredAttr.get(i);s.some(u=>u.componentTag===e.componentTag)||s.push({spec:e.attributes[i],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const i=he(e);if(i===null)t.reactiveWildcard.push(e);else for(const s of i)t.byReactive.has(s)||t.byReactive.set(s,[]),t.byReactive.get(s).push(e)}e.persist&&t.persist.push(e)}function Y(e,t,r,i){for(let s=0;s<e.length;s++){const u=e[s];if(!t[u.attribute])continue;const o=u.effects&&u.effects[r];o?o(t,r,i):u.onAttrChange&&(!u.declared||u.declared.has(r))&&u.onAttrChange(t,r,i)}}function Ce(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,i=X(),s=i.byAttr.get(t),u=F()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(t);if(!r&&!s&&!u)return;const o=e.target;if(e.oldValue!==o.getAttribute(t)){if(u&&k(o)){const l=i.byDeclaredAttr.get(t),n=o.getAttribute(t);for(let c=0;c<l.length;c++)K(l[c].spec,n,t,l[c].componentTag,o)}if(window.lnCore._debugSink&&(r||s)&&window.lnCore._debugSink("attr",t,o,{oldValue:e.oldValue,newValue:o.getAttribute(t)}),r){const l=i.byReactive.get(t);l&&Y(l,o,t,e.oldValue),i.reactiveWildcard.length&&Y(i.reactiveWildcard,o,t,e.oldValue)}if(s)for(let l=0;l<s.length;l++){const n=s[l];if(n.handler){n.handler(o,t,e.oldValue);continue}n.onAttributeChange&&o[n.attribute]?n.onAttributeChange(o,t):(G(o,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(o))}}}function ye(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,E(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{Ce(t[r])}catch(i){console.error("[ln-core] mutation handler failed",t[r].target,i)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function D(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function T(e,t){if(!document.contains(e))if(t.attribute){const r=e[t.attribute];if(r&&typeof r.destroy=="function")try{r.destroy()}catch(i){console.error("["+t.attribute+"] destroy failed",e,i)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function ve(e){const t=D();if(t.length){if(e.target)for(let r=0;r<t.length;r++){const i=t[r];if(i.onSubtreeChange&&i.query){const s=i.query,u=e.target.nodeType===1?e.target.matches&&e.target.matches(s)?e.target:e.target.closest?e.target.closest(s):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(s):null;u&&i.onSubtreeChange(u,e)}}for(let r=0;r<e.addedNodes.length;r++){const i=e.addedNodes[r];if(i.nodeType===1){const s=!!(i.firstElementChild||i.children&&i.children.length);for(let u=0;u<t.length;u++){const o=t[u];if(o.selector&&o.attribute&&o.ComponentFn){if(!s)i.matches&&i.matches(o.query)&&_(i,o);else if(i.matches&&i.matches(o.query)&&_(i,o),i.querySelectorAll){const l=i.querySelectorAll(o.query);for(let n=0;n<l.length;n++)_(l[n],o)}}o.onInit&&o.onInit(i)}}}for(let r=0;r<e.removedNodes.length;r++){const i=e.removedNodes[r];if(i.nodeType===1){const s=!!(i.firstElementChild||i.children&&i.children.length);for(let u=0;u<t.length;u++){const o=t[u],l=o.query;if(l){if(!s)i.matches&&i.matches(l)&&T(i,o);else if(i.matches&&i.matches(l)&&T(i,o),i.querySelectorAll){const n=i.querySelectorAll(l);for(let c=0;c<n.length;c++)T(n[c],o)}}}}}}}function Z(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,E(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++){const i=t[r];if(i.type==="childList")try{ve(i)}catch(s){console.error("[ln-core] lifecycle handler failed",i.target,s)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function _e(e){D().push(e),Z()}function ee(e,t,r,i,s={}){const u=s.extraAttributes||[],o=s.onAttributeChange||null,l=s.onSubtreeChange||null,n=s.onInit||null,c=s.onAttrChange||null,d=s.effects||null,a=s.attributes||null,f=a?pe(a):d,A=a?new Set(Object.keys(a)):null,v=s.persist||null;function y(h){const p=h||document.body;if(G(p,e,t,r),a&&F())for(const w in a){const Re=a[w],I=Array.from(p.querySelectorAll("["+w+"]"));p.matches&&p.matches("["+w+"]")&&I.push(p);for(let R=0;R<I.length;R++){const B=I[R];k(B)&&K(Re,B.getAttribute(w),w,i,B)}}n&&n(p)}const b=[];if(e.indexOf("[")!==-1){const h=/\[([\w-]+)/g;let p;for(;(p=h.exec(e))!==null;)b.push(p[1])}else b.push(e);me({selector:e,attribute:t,componentTag:i,attributes:a,ComponentFn:r,onInit:n,observed:b.concat(u),onAttributeChange:o,onAttrChange:c,effects:f,declared:A,persist:v}),ye();const m=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,C=s.subtreeQuery||(m?e:"["+e+"]");D().push({selector:e,attribute:t,ComponentFn:r,onInit:n,onSubtreeChange:l,query:C}),Z(),window[t]=y,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ee,window.lnCore.observeLifecycle=_e);function g(){we()>0?be(function(){y(document.body)}):y(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",g):g(),y}function te(e){return(e||"").replace(/^#/,"")}function q(e){const t=e===void 0?location.hash:e,r={},i=te(t);if(!i)return r;const s=i.split("&");for(let u=0;u<s.length;u++){const o=s[u];if(!o)continue;const l=o.indexOf(":"),n=l>-1?o.slice(0,l):o,c=l>-1?o.slice(l+1):"";if(n)try{r[n]=decodeURIComponent(c)}catch{r[n]=c}}return r}function Ae(e){if(!e)return null;const t=q();return e in t?t[e]:null}function Ee(e,t){if(!e)return;const r=q();t==null?delete r[e]:r[e]=String(t);const s=Object.keys(r).map(function(u){const o=r[u];return o===""?u:u+":"+encodeURIComponent(o)}).join("&");te(location.hash)!==s&&(location.hash=s)}function ke(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function xe(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const r=e.getAttribute("data-ln-hash");if(r&&r.trim()!=="")return r.trim();const 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 Se(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Le(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 Oe(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 r=e.slice(0,t),i=e.slice(t+1),s=i?i.split(",").map(function(u){try{return decodeURIComponent(u)}catch{return u}}).filter(Boolean):[];return{key:r,values:s}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=q,window.lnCore.hashGet=Ae,window.lnCore.hashSet=Ee,window.lnCore.hashLinkClick=ke,window.lnCore.resolveHashNamespace=xe,window.lnCore.hashSortEncode=Se,window.lnCore.hashSortDecode=Le,window.lnCore.hashFilterEncode=Oe,window.lnCore.hashFilterDecode=De);function Te(e,t,r,i){const s=typeof i=="number"?i:4,u=window.innerWidth,o=window.innerHeight,l=t.width,n=t.height,c=r.split("-"),d=c[0],a=c[1]==="start"||c[1]==="end"?c[1]:"center",f={top:["top","bottom","right","left"],bottom:["bottom","top","right","left"],left:["left","right","top","bottom"],right:["right","left","top","bottom"]},A=f[d]||f.bottom;function v(g){return g==="top"||g==="bottom"?a==="start"?e.left:a==="end"?e.right-l:e.left+(e.width-l)/2:a==="start"?e.top:a==="end"?e.bottom-n:e.top+(e.height-n)/2}function y(g){let h,p,w=!0;return g==="top"?(h=e.top-s-n,p=v(g),h<0&&(w=!1)):g==="bottom"?(h=e.bottom+s,p=v(g),h+n>o&&(w=!1)):g==="left"?(h=v(g),p=e.left-s-l,p<0&&(w=!1)):(h=v(g),p=e.right+s,p+l>u&&(w=!1)),{top:h,left:p,side:g,fits:w}}let b=null;for(let g=0;g<A.length;g++){const h=y(A[g]);if(h.fits){b=h;break}}b||(b=y(A[0]));let m=b.top,C=b.left;return l>=u?C=0:(C<0&&(C=0),C+l>u&&(C=u-l)),n>=o?m=0:(m<0&&(m=0),m+n>o&&(m=o-n)),{top:m,left:C,placement:b.side}}function qe(e){if(!e)return{width:0,height:0};const t=e.style,r=t.visibility,i=t.display,s=t.position;t.visibility="hidden",t.display="block",t.position="fixed";const u=e.offsetWidth,o=e.offsetHeight;return t.visibility=r,t.display=i,t.position=s,{width:u,height:o}}function Ie(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Ie),(function(){const e="data-ln-dropdown",t="lnDropdown",r="bottom-end";if(window[t]!==void 0)return;const i={"data-ln-dropdown":{type:"marker",description:"Initializes the dropdown container"},"data-ln-dropdown-position":{prop:"position",type:"enum",values:["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],fallback:r,description:"Preferred positioning anchor"},"data-ln-dropdown-placement":{type:"enum",values:["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],description:"Active calculated placement applied at runtime"},"data-ln-dropdown-menu":{type:"marker",description:"Dropdown menu element containing items"}},s=J(i);function u(o){this.dom=o,Q(this,o,s),this.toggleEl=o.querySelector("[data-ln-toggle]"),this._boundDocClick=null,this._docClickTimeout=null,this._boundScrollReposition=null,this._boundResizeClose=null,this.toggleEl&&(this.toggleEl.setAttribute("data-ln-dropdown-menu",""),this.toggleEl.setAttribute("role","menu"),this.toggleEl.setAttribute("popover","manual"),this._initMenuAria()),this.triggerBtn=o.querySelector("[data-ln-toggle-for]"),this.triggerBtn&&(this.triggerBtn.setAttribute("aria-haspopup","menu"),this.triggerBtn.setAttribute("aria-expanded","false"));const l=this;return this._onRequestOpen=function(){l.toggleEl&&l.toggleEl.setAttribute("data-ln-toggle","open")},this._onRequestClose=function(){l.toggleEl&&l.toggleEl.setAttribute("data-ln-toggle","close")},this._onRequestToggle=function(){if(l.toggleEl){const n=l.toggleEl.getAttribute("data-ln-toggle");l.toggleEl.setAttribute("data-ln-toggle",n==="open"?"close":"open")}},this._onKeydown=function(n){const c=l.toggleEl&&l.toggleEl.getAttribute("data-ln-toggle")==="open";if(n.key==="Escape"){c&&(n.preventDefault(),n.stopPropagation(),l.toggleEl.setAttribute("data-ln-toggle","close"),l.triggerBtn&&l.triggerBtn.focus());return}if(n.key==="Tab"){c&&(l.triggerBtn&&l.triggerBtn.focus(),l.toggleEl.setAttribute("data-ln-toggle","close"));return}const d=l._getMenuItems();if(d.length===0)return;if(!c&&(n.key==="ArrowDown"||n.key==="ArrowUp")){n.preventDefault(),l.toggleEl.setAttribute("data-ln-toggle","open"),setTimeout(function(){const f=l._getMenuItems();f.length>0&&l._focusItem(f,n.key==="ArrowDown"?0:f.length-1)},0);return}if(!c)return;const a=d.indexOf(document.activeElement);if(n.key==="ArrowDown"){n.preventDefault();const f=a<d.length-1?a+1:0;l._focusItem(d,f)}else if(n.key==="ArrowUp"){n.preventDefault();const f=a>0?a-1:d.length-1;l._focusItem(d,f)}else n.key==="Home"?(n.preventDefault(),l._focusItem(d,0)):n.key==="End"&&(n.preventDefault(),l._focusItem(d,d.length-1))},this.dom.addEventListener("ln-dropdown:request-open",this._onRequestOpen),this.dom.addEventListener("ln-dropdown:request-close",this._onRequestClose),this.dom.addEventListener("ln-dropdown:request-toggle",this._onRequestToggle),this.dom.addEventListener("keydown",this._onKeydown),this._onToggleOpen=function(n){!n.detail||n.detail.target!==l.toggleEl||(l.triggerBtn&&l.triggerBtn.setAttribute("aria-expanded","true"),typeof l.toggleEl.showPopover=="function"&&l.toggleEl.showPopover(),l._initMenuAria(),l._reposition(),l._addOutsideClickListener(),l._addScrollRepositionListener(),l._addResizeCloseListener(),x(o,"ln-dropdown:open",{target:n.detail.target}))},this._onToggleClose=function(n){!n.detail||n.detail.target!==l.toggleEl||(l.triggerBtn&&l.triggerBtn.setAttribute("aria-expanded","false"),l._removeOutsideClickListener(),l._removeScrollRepositionListener(),l._removeResizeCloseListener(),l.toggleEl.style.top="",l.toggleEl.style.left="",l.toggleEl.removeAttribute("data-ln-dropdown-placement"),typeof l.toggleEl.hidePopover=="function"&&l.toggleEl.matches(":popover-open")&&l.toggleEl.hidePopover(),x(o,"ln-dropdown:close",{target:n.detail.target}))},this.toggleEl&&(this.toggleEl.addEventListener("ln-toggle:open",this._onToggleOpen),this.toggleEl.addEventListener("ln-toggle:close",this._onToggleClose)),this}u.prototype._initMenuAria=function(){if(!this.toggleEl)return;const o=this.toggleEl.querySelectorAll("li");for(const n of o)n.setAttribute("role","none");const l=this._getMenuItems();for(let n=0;n<l.length;n++)l[n].setAttribute("role","menuitem"),l[n].setAttribute("tabindex",n===0?"0":"-1")},u.prototype._getMenuItems=function(){return this.toggleEl?Array.from(this.toggleEl.querySelectorAll('a[href], button:not([disabled]), [role="menuitem"]:not([disabled])')):[]},u.prototype._focusItem=function(o,l){for(let n=0;n<o.length;n++)o[n].setAttribute("tabindex",n===l?"0":"-1");o[l]&&o[l].focus()},u.prototype._reposition=function(){if(!this.triggerBtn||!this.toggleEl)return;const o=this.triggerBtn.getBoundingClientRect(),l=qe(this.toggleEl),n=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--size-xs"))*16||4,c=this.position||r,d=Te(o,l,c,n);this.toggleEl.style.top=d.top+"px",this.toggleEl.style.left=d.left+"px",this.toggleEl.setAttribute("data-ln-dropdown-placement",d.placement)},u.prototype._addOutsideClickListener=function(){if(this._boundDocClick)return;const o=this;this._boundDocClick=function(l){o.dom.contains(l.target)||o.toggleEl&&o.toggleEl.contains(l.target)||o.toggleEl&&o.toggleEl.getAttribute("data-ln-toggle")==="open"&&o.toggleEl.setAttribute("data-ln-toggle","close")},o._docClickTimeout=setTimeout(function(){o._docClickTimeout=null,document.addEventListener("click",o._boundDocClick)},0)},u.prototype._removeOutsideClickListener=function(){this._docClickTimeout&&(clearTimeout(this._docClickTimeout),this._docClickTimeout=null),this._boundDocClick&&(document.removeEventListener("click",this._boundDocClick),this._boundDocClick=null)},u.prototype._addScrollRepositionListener=function(){const o=this;this._boundScrollReposition=function(){o._reposition()},window.addEventListener("scroll",this._boundScrollReposition,{passive:!0,capture:!0})},u.prototype._removeScrollRepositionListener=function(){this._boundScrollReposition&&(window.removeEventListener("scroll",this._boundScrollReposition,{capture:!0}),this._boundScrollReposition=null)},u.prototype._addResizeCloseListener=function(){const o=this;this._boundResizeClose=function(){o.toggleEl&&o.toggleEl.getAttribute("data-ln-toggle")==="open"&&o.toggleEl.setAttribute("data-ln-toggle","close")},window.addEventListener("resize",this._boundResizeClose)},u.prototype._removeResizeCloseListener=function(){this._boundResizeClose&&(window.removeEventListener("resize",this._boundResizeClose),this._boundResizeClose=null)},u.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-dropdown:request-open",this._onRequestOpen),this.dom.removeEventListener("ln-dropdown:request-close",this._onRequestClose),this.dom.removeEventListener("ln-dropdown:request-toggle",this._onRequestToggle),this.dom.removeEventListener("keydown",this._onKeydown),this._removeOutsideClickListener(),this._removeScrollRepositionListener(),this._removeResizeCloseListener(),this.toggleEl&&typeof this.toggleEl.hidePopover=="function"&&this.toggleEl.matches(":popover-open")&&this.toggleEl.hidePopover(),this.toggleEl&&(this.toggleEl.removeAttribute("data-ln-dropdown-placement"),this.toggleEl.removeEventListener("ln-toggle:open",this._onToggleOpen),this.toggleEl.removeEventListener("ln-toggle:close",this._onToggleClose)),delete this.dom[t])},ee(e,t,u,"ln-dropdown",{attributes:i})})()})();