@livenetworks/ashlar 2.1.0 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/components/ln-accordion/ln-accordion.js +1 -1
  2. package/components/ln-ajax/ln-ajax.js +1 -1
  3. package/components/ln-api-connector/ln-api-connector.js +1 -1
  4. package/components/ln-api-queue/ln-api-queue.js +1 -1
  5. package/components/ln-autoresize/ln-autoresize.js +1 -1
  6. package/components/ln-autoresize/src/ln-autoresize.js +3 -1
  7. package/components/ln-autosave/ln-autosave.js +1 -1
  8. package/components/ln-chart/ln-chart.js +1 -1
  9. package/components/ln-circular-progress/ln-circular-progress.js +1 -1
  10. package/components/ln-confirm/ln-confirm.js +1 -1
  11. package/components/ln-core/lifecycle.js +33 -12
  12. package/components/ln-couchdb-connector/ln-couchdb-connector.js +1 -1
  13. package/components/ln-data-coordinator/ln-data-coordinator.js +1 -1
  14. package/components/ln-data-store/ln-data-store.js +1 -1
  15. package/components/ln-date/ln-date.js +1 -1
  16. package/components/ln-date/src/ln-date.js +22 -13
  17. package/components/ln-debug/ln-debug.js +1 -1
  18. package/components/ln-dropdown/ln-dropdown.js +1 -1
  19. package/components/ln-dropdown/ln-dropdown.schema.json +90 -90
  20. package/components/ln-dropdown/src/ln-dropdown.js +18 -5
  21. package/components/ln-editor/ln-editor.js +1 -1
  22. package/components/ln-editor/src/ln-editor.js +45 -12
  23. package/components/ln-external-links/ln-external-links.js +1 -1
  24. package/components/ln-filter/ln-filter.js +1 -1
  25. package/components/ln-filter/ln-filter.schema.json +1 -1
  26. package/components/ln-filter/src/ln-filter.js +11 -10
  27. package/components/ln-form/ln-form.js +1 -1
  28. package/components/ln-form/src/ln-form.js +11 -0
  29. package/components/ln-icon/ln-icon.js +1 -1
  30. package/components/ln-include/ln-include.js +1 -1
  31. package/components/ln-key/ln-key.js +1 -1
  32. package/components/ln-link/ln-link.js +1 -1
  33. package/components/ln-list/ln-list.js +1 -1
  34. package/components/ln-list/src/ln-list.js +14 -5
  35. package/components/ln-modal/ln-modal.js +1 -1
  36. package/components/ln-nav/ln-nav.js +1 -1
  37. package/components/ln-number/ln-number.js +1 -1
  38. package/components/ln-number/src/ln-number.js +22 -12
  39. package/components/ln-obfuscator/ln-obfuscator.js +1 -1
  40. package/components/ln-options/ln-options.js +1 -1
  41. package/components/ln-picklist/ln-picklist.js +1 -1
  42. package/components/ln-popover/ln-popover.js +1 -1
  43. package/components/ln-popover/ln-popover.schema.json +82 -82
  44. package/components/ln-popover/src/ln-popover.js +22 -5
  45. package/components/ln-progress/ln-progress.js +1 -1
  46. package/components/ln-router/ln-router.js +1 -1
  47. package/components/ln-scroll/ln-scroll.js +1 -1
  48. package/components/ln-search/ln-search.js +1 -1
  49. package/components/ln-search/ln-search.schema.json +103 -103
  50. package/components/ln-search/src/ln-search.js +9 -5
  51. package/components/ln-slug/ln-slug.js +1 -1
  52. package/components/ln-sort/ln-sort.js +1 -1
  53. package/components/ln-sortable/ln-sortable.js +1 -1
  54. package/components/ln-sortable/src/ln-sortable.js +52 -7
  55. package/components/ln-stat/ln-stat.js +1 -1
  56. package/components/ln-table/ln-table.js +1 -1
  57. package/components/ln-table-coordinator/ln-table-coordinator.js +1 -1
  58. package/components/ln-tabs/ln-tabs.js +1 -1
  59. package/components/ln-tabs/src/ln-tabs.js +12 -8
  60. package/components/ln-time/ln-time.js +1 -1
  61. package/components/ln-time/src/ln-time.js +17 -7
  62. package/components/ln-toast/ln-toast.js +1 -1
  63. package/components/ln-toggle/ln-toggle.js +1 -1
  64. package/components/ln-tooltip/ln-tooltip.js +1 -1
  65. package/components/ln-translations/ln-translations.js +1 -1
  66. package/components/ln-ui-coordinator/ln-ui-coordinator.js +1 -1
  67. package/components/ln-upload/ln-upload.js +1 -1
  68. package/components/ln-validate/ln-validate.js +1 -1
  69. package/components/ln-validate/src/ln-validate.js +21 -7
  70. package/components/ln-websocket-connector/ln-websocket-connector.js +1 -1
  71. package/package.json +1 -1
  72. package/web-types.json +1 -1
@@ -1 +1 @@
1
- (function(){"use strict";function I(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function 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 n=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){n=t[l];break}if(!k(n))return}e.apply(console,t)}}function q(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 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 ce(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ue(e,t){const r=!!(t&&t.typed),n=t&&t.exclude,l={},s=e.elements,o={};if(r)for(let c=0;c<s.length;c++){const i=s[c];i.name&&i.type==="checkbox"&&!i.disabled&&(o[i.name]=(o[i.name]||0)+1)}for(let c=0;c<s.length;c++){const i=s[c];if(!(!i.name||i.disabled||i.type==="file"||i.type==="submit"||i.type==="button")&&!(n&&i.matches&&i.matches(n)))if(i.type==="checkbox")r&&o[i.name]===1?l[i.name]=i.checked:(l[i.name]||(l[i.name]=[]),i.checked&&l[i.name].push(i.value));else if(i.type==="radio")i.checked&&(l[i.name]=i.value);else if(i.type==="select-multiple"){l[i.name]=[];for(let u=0;u<i.options.length;u++)i.options[u].selected&&l[i.name].push(i.options[u].value)}else if(r&&i.type==="hidden")l[i.name]=i.value;else if(r&&(i.type==="number"||i.type==="range")){const u=Number(i.value);l[i.name]=i.value===""||isNaN(u)?null:u}else l[i.name]=i.value}return l}function ae(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 r=e.elements,n=[],l={};for(let s=0;s<r.length;s++){const o=r[s];o.name&&o.type==="checkbox"&&(l[o.name]=(l[o.name]||0)+1)}for(let s=0;s<r.length;s++){const o=r[s];if(o.type==="file"||o.type==="submit"||o.type==="button")continue;const c=o.getAttribute("data-ln-fill-as")||o.name;if(!c||!(c in t))continue;const i=t[c];if(o.type==="checkbox"){if(Array.isArray(i))o.checked=i.indexOf(o.value)!==-1;else if(l[o.name]>1){const u=String(i).split(",").map(function(f){return f.trim()});o.checked=u.indexOf(o.value)!==-1}else o.checked=ae(i);n.push(o)}else if(o.type==="radio")o.checked=o.value===String(i),n.push(o);else if(o.type==="select-multiple"){if(Array.isArray(i))for(let u=0;u<o.options.length;u++)o.options[u].selected=i.indexOf(o.options[u].value)!==-1;n.push(o)}else o.value=i,o.tagName==="SELECT"&&i!=null&&o.setAttribute("data-ln-value",i),n.push(o)}return n}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=fe,window.lnCore.serializeForm=ue,window.lnCore.resolveFormMethod=ce);const $={};function de(e,t){$[e]=t}function he(e){return $[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=de,window.lnCore.getDataMapper=he);function we(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,A(function(){new MutationObserver(function(){q(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const R={};function be(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];R[r]=t}function ge(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return R[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=be,window.lnCore.getLocaleFallback=ge,window.lnCore.ensureLocaleObserver=we);const _={};function pe(e,t){_[e]||(_[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=_[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function M(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let o=0;o<r.length;o++){const c=r[o],i=c.getAttribute("data-ln-field");t[i]!=null&&(c.textContent=t[i])}const n=e.querySelectorAll("[data-ln-attr]");for(let o=0;o<n.length;o++){const c=n[o],i=c.getAttribute("data-ln-attr").split(",");for(let u=0;u<i.length;u++){const f=i[u].trim().split(":");if(f.length!==2)continue;const a=f[0].trim(),h=f[1].trim();t[h]!=null&&c.setAttribute(a,t[h])}}const l=e.querySelectorAll("[data-ln-show]");for(let o=0;o<l.length;o++){const c=l[o],i=c.getAttribute("data-ln-show");i in t&&c.classList.toggle("hidden",!t[i])}const s=e.querySelectorAll("[data-ln-class]");for(let o=0;o<s.length;o++){const c=s[o],i=c.getAttribute("data-ln-class").split(",");for(let u=0;u<i.length;u++){const f=i[u].trim().split(":");if(f.length!==2)continue;const a=f[0].trim(),h=f[1].trim();h in t&&c.classList.toggle(a,!!t[h])}}return e}function me(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)M(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 s=r.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(o,c){return t[c]!==void 0?t[c]:""}))}const n=function(s,o){return t[o]!==void 0?t[o]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let s=0;s<l.length;s++){const o=l[s],c=o.attributes;for(let i=0;i<c.length;i++){const u=c[i];u.value.indexOf("{{")!==-1&&o.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,n))}}return e}function ye(e,t,r,n,l,s){const o={};for(let i=0;i<e.children.length;i++){const u=e.children[i],f=u.getAttribute("data-ln-render-key");f&&(o[f]=u)}const c=document.createDocumentFragment();for(let i=0;i<t.length;i++){const u=t[i],f=String(n(u));let a=o[f];if(a)l(a,u,i);else{const h=pe(r,s);if(!h||(j(h,u),a=h.firstElementChild,!a))continue;a.setAttribute("data-ln-render-key",f),l(a,u,i)}c.appendChild(a)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=j,window.lnCore.fill=M,window.lnCore.lnFill=me,window.lnCore.renderList=ye);function S(e,t,r){const n=e.getAttribute(t);return n===null?r:n}function H(e,t,r){const n=parseInt(e.getAttribute(t),10);return isNaN(n)?r:n}function W(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 U(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const v=new Map;function V(e,t){const r=(e?e.join("|"):"")+"::"+t;if(v.has(r))return v.get(r);const n=new Set(e||[]),l=function(s,o){const c=s.getAttribute(o);return c!==null&&n.has(c)?c:t};return v.set(r,l),l}function J(e,t,r){const n=parseFloat(e.getAttribute(t));return isNaN(n)?r:n}function K(e,t,r){const n=e.getAttribute(t);if(!n)return r;try{return JSON.parse(n)}catch{return r}}function Q(e,t,r,n,l){if(!e||t===null)return!0;const s=n||"ln-component",o=e.type;if(o==="trigger"||o==="marker"||o==="string"||o==="list"||!o||t===""&&e.fallback!==void 0)return!0;const c=i=>{l?console.warn(i,l):console.warn(i)};if(o==="boolean"){const i=t.trim().toLowerCase();return i!==""&&i!=="true"&&i!=="false"&&i!=="1"&&i!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(o==="enum"){const i=e.values||[];return i.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${r}". Allowed: ${i.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(o==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const i=parseInt(t,10);return e.min!==void 0&&i<e.min?(c(`[${s}] Value ${i} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&i>e.max?(c(`[${s}] Value ${i} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(o==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(o==="json")try{return JSON.parse(t),!0}catch(i){return c(`[${s}] Invalid JSON for attribute "${r}": ${i.message}. Fallback: ${e.fallback}.`),!1}return!0}function Ce(e,t,r){for(const n in r){const[l,s,o]=r[n];Object.defineProperty(e,n,{get:function(){return l(t,s,o)},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=V(n.values,n.fallback);break;case"integer":l=H;break;case"float":l=J;break;case"boolean":l=W;break;case"list":l=U;break;case"json":l=K;break;case"string":default:l=S;break}l||(l=S),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 ke(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const r in e.effects)t.add(r);if(e.onAttrChange&&e.declared)for(const r of e.declared)t.add(r);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=Ce,window.lnCore.attrSpec=Ae,window.lnCore.attrStr=S,window.lnCore.attrInt=H,window.lnCore.attrBool=W,window.lnCore.attrList=U,window.lnCore.attrEnum=V,window.lnCore.attrFloat=J,window.lnCore.attrJson=K);function y(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(r){console.error("["+t.attribute+"] init failed",e,r)}}}function z(e,t,r,n){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",o={selector:t,attribute:r,ComponentFn:n};if(e.matches&&e.matches(s)&&y(e,o),e.querySelectorAll){const c=e.querySelectorAll(s);for(let i=0;i<c.length;i++)y(c[i],o)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function _e(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Se(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function 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 ve(e){const t=P(),r=e.observed||[];for(let n=0;n<r.length;n++){const l=r[n];t.byAttr.has(l)||t.byAttr.set(l,[]),t.byAttr.get(l).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const n in e.attributes){t.byDeclaredAttr.has(n)||t.byDeclaredAttr.set(n,[]);const l=t.byDeclaredAttr.get(n);l.some(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[n],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const n=ke(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 X(e,t,r,n){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const o=s.effects&&s.effects[r];o?o(t,r,n):s.onAttrChange&&(!s.declared||s.declared.has(r))&&s.onAttrChange(t,r,n)}}function Te(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,n=P(),l=n.byAttr.get(t),s=I()&&n.byDeclaredAttr&&n.byDeclaredAttr.has(t);if(!r&&!l&&!s)return;const o=e.target;if(e.oldValue!==o.getAttribute(t)){if(s&&k(o)){const c=n.byDeclaredAttr.get(t),i=o.getAttribute(t);for(let u=0;u<c.length;u++)Q(c[u].spec,i,t,c[u].componentTag,o)}if(window.lnCore._debugSink&&(r||l)&&window.lnCore._debugSink("attr",t,o,{oldValue:e.oldValue,newValue:o.getAttribute(t)}),r){const c=n.byReactive.get(t);c&&X(c,o,t,e.oldValue),n.reactiveWildcard.length&&X(n.reactiveWildcard,o,t,e.oldValue)}if(l)for(let c=0;c<l.length;c++){const i=l[c];if(i.handler){i.handler(o,t,e.oldValue);continue}i.onAttributeChange&&o[i.attribute]?i.onAttributeChange(o,t):(z(o,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(o))}}}function Ee(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,A(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{Te(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 T(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function E(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 Oe(e){const t=T();if(t.length){if(e.target)for(let r=0;r<t.length;r++){const n=t[r];if(n.onSubtreeChange&&n.query){const l=n.query,s=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;s&&n.onSubtreeChange(s,e)}}for(let r=0;r<e.addedNodes.length;r++){const n=e.addedNodes[r];if(n.nodeType===1){const l=!!(n.firstElementChild||n.children&&n.children.length);for(let s=0;s<t.length;s++){const o=t[s];if(o.selector&&o.attribute&&o.ComponentFn){if(!l)n.matches&&n.matches(o.query)&&y(n,o);else if(n.matches&&n.matches(o.query)&&y(n,o),n.querySelectorAll){const c=n.querySelectorAll(o.query);for(let i=0;i<c.length;i++)y(c[i],o)}}o.onInit&&o.onInit(n)}}}for(let r=0;r<e.removedNodes.length;r++){const n=e.removedNodes[r];if(n.nodeType===1){const l=!!(n.firstElementChild||n.children&&n.children.length);for(let s=0;s<t.length;s++){const o=t[s],c=o.query;if(c){if(!l)n.matches&&n.matches(c)&&E(n,o);else if(n.matches&&n.matches(c)&&E(n,o),n.querySelectorAll){const i=n.querySelectorAll(c);for(let u=0;u<i.length;u++)E(i[u],o)}}}}}}}function G(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,A(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++){const n=t[r];if(n.type==="childList")try{Oe(n)}catch(l){console.error("[ln-core] lifecycle handler failed",n.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ne(e){T().push(e),G()}function Z(e,t,r,n,l={}){const s=l.extraAttributes||[],o=l.onAttributeChange||null,c=l.onSubtreeChange||null,i=l.onInit||null,u=l.onAttrChange||null,f=l.effects||null,a=l.attributes||null,h=a?xe(a):f,p=a?new Set(Object.keys(a)):null,x=l.persist||null;function m(L){const g=L||document.body;if(z(g,e,t,r),a&&I())for(const C in a){const He=a[C],D=Array.from(g.querySelectorAll("["+C+"]"));g.matches&&g.matches("["+C+"]")&&D.push(g);for(let B=0;B<D.length;B++){const F=D[B];k(F)&&Q(He,F.getAttribute(C),C,n,F)}}i&&i(g)}const d=[];if(e.indexOf("[")!==-1){const L=/\[([\w-]+)/g;let g;for(;(g=L.exec(e))!==null;)d.push(g[1])}else d.push(e);ve({selector:e,attribute:t,componentTag:n,attributes:a,ComponentFn:r,onInit:i,observed:d.concat(s),onAttributeChange:o,onAttrChange:u,effects:h,declared:p,persist:x}),Ee();const w=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,b=l.subtreeQuery||(w?e:"["+e+"]");T().push({selector:e,attribute:t,ComponentFn:r,onInit:i,onSubtreeChange:c,query:b}),G(),window[t]=m,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=Z,window.lnCore.observeLifecycle=Ne);function se(){_e()>0?Se(function(){m(document.body)}):m(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",se):se(),m}function Y(e){return(e||"").replace(/^#/,"")}function O(e){const t=e===void 0?location.hash:e,r={},n=Y(t);if(!n)return r;const l=n.split("&");for(let s=0;s<l.length;s++){const o=l[s];if(!o)continue;const c=o.indexOf(":"),i=c>-1?o.slice(0,c):o,u=c>-1?o.slice(c+1):"";if(i)try{r[i]=decodeURIComponent(u)}catch{r[i]=u}}return r}function Le(e){if(!e)return null;const t=O();return e in t?t[e]:null}function De(e,t){if(!e)return;const r=O();t==null?delete r[e]:r[e]=String(t);const l=Object.keys(r).map(function(s){const o=r[s];return o===""?s:s+":"+encodeURIComponent(o)}).join("&");Y(location.hash)!==l&&(location.hash=l)}function Be(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Fe(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 Ie(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function qe(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function $e(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Re(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const r=e.slice(0,t),n=e.slice(t+1),l=n?n.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:r,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=O,window.lnCore.hashGet=Le,window.lnCore.hashSet=De,window.lnCore.hashLinkClick=Be,window.lnCore.resolveHashNamespace=Fe,window.lnCore.hashSortEncode=Ie,window.lnCore.hashSortDecode=qe,window.lnCore.hashFilterEncode=$e,window.lnCore.hashFilterDecode=Re);function Me(){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=Me);function ee(e,t){if(e.length!==1)return e;const r=e.charCodeAt(0);if(r>=65&&r<=90){const n=((r-65+t)%26+26)%26;return String.fromCharCode(65+n)}if(r>=97&&r<=122){const n=((r-97+t)%26+26)%26;return String.fromCharCode(97+n)}if(r>=48&&r<=57){const n=((r-48+t)%10+10)%10;return String.fromCharCode(48+n)}return e}function te(e){if(e==null||e==="")return"";const t=String(e);if(typeof TextEncoder<"u"&&typeof btoa<"u"){const r=new TextEncoder().encode(t);let n="";const l=r.length;for(let s=0;s<l;s++)n+=String.fromCharCode(r[s]);return btoa(n)}return typeof Buffer<"u"?Buffer.from(t,"utf-8").toString("base64"):""}function ne(e){if(e==null||e==="")return"";try{const t=String(e).trim();if(typeof atob<"u"&&typeof TextDecoder<"u"){const r=atob(t),n=new Uint8Array(r.length);for(let l=0;l<r.length;l++)n[l]=r.charCodeAt(l);return new TextDecoder().decode(n)}if(typeof Buffer<"u")return Buffer.from(t,"base64").toString("utf-8")}catch{return e}return e}function re(e,t){const r=String(t||"ln-ashlar");let n;typeof TextEncoder<"u"?n=new TextEncoder().encode(r):typeof Buffer<"u"?n=Buffer.from(r,"utf-8"):n=[108,110];const l=n.length||1,s=new Uint8Array(e.length);for(let o=0;o<e.length;o++)s[o]=e[o]^n[o%l];return s}function oe(e,t="ln-ashlar"){if(e==null||e==="")return"";const r=String(e);let n;if(typeof TextEncoder<"u")n=new TextEncoder().encode(r);else if(typeof Buffer<"u")n=Buffer.from(r,"utf-8");else return"";const l=re(n,t);let s="";for(let o=0;o<l.length;o++)s+=String.fromCharCode(l[o]);return typeof btoa<"u"?btoa(s):typeof Buffer<"u"?Buffer.from(l).toString("base64"):""}function ie(e,t="ln-ashlar"){if(e==null||e==="")return"";try{const r=String(e).trim();let n="";if(typeof atob<"u")n=atob(r);else if(typeof Buffer<"u")n=Buffer.from(r,"base64").toString("binary");else return e;const l=new Uint8Array(n.length);for(let o=0;o<n.length;o++)l[o]=n.charCodeAt(o);const s=re(l,t);if(typeof TextDecoder<"u")return new TextDecoder().decode(s);if(typeof Buffer<"u")return Buffer.from(s).toString("utf-8")}catch{return e}return e}function le(e){if(typeof e=="number"||typeof e=="string"&&/^-?\d+$/.test(String(e).trim()))return{codec:"rot",shift:Number(e)||13,key:"ln-ashlar"};if(e&&typeof e=="object"){const t=(e.codec||(e.key?"xor":"rot")).toLowerCase().trim(),r=t==="xor"||t==="base64"?t:"rot",n=Number(e.shift)||13,l=e.key||"ln-ashlar";return{codec:r,shift:n,key:l}}return{codec:"rot",shift:13,key:"ln-ashlar"}}function je(e,t=13){if(e==null||(typeof e!="string"&&(e=String(e)),e.length===0))return"";const r=le(t);return r.codec==="base64"?te(e):r.codec==="xor"?oe(e,r.key):e.replace(/[a-zA-Z0-9]/g,n=>ee(n,r.shift))}function N(e,t=13){if(e==null||(typeof e!="string"&&(e=String(e)),e.length===0))return"";const r=le(t);return r.codec==="base64"?ne(e):r.codec==="xor"?ie(e,r.key):e.replace(/[a-zA-Z0-9]/g,n=>ee(n,-r.shift))}(function(){const e="data-ln-obfuscator",t="lnObfuscator";if(window[t]!==void 0)return;function r(o){const c=o[t];c&&c.deobfuscate()}const n={"data-ln-obfuscator":{type:"enum",values:["rot13","base64","xor"],fallback:"rot13",effect:r,description:"Codec used to deobfuscate text or links"},"data-ln-obfuscator-codec":{type:"enum",values:["rot13","base64","xor"],fallback:"rot13",effect:r,description:"Explicit codec override attribute"},"data-ln-obfuscator-key":{type:"string",effect:r,description:"Encryption or masking key for XOR codec"}};function l(o){return o[t]?o[t]:(o[t]=this,this.dom=o,this._originalTextNodes=null,this._originalHref=null,this.deobfuscate(),this)}l.prototype.deobfuscate=function(){const o=!!(this.dom.matches&&(this.dom.matches("a")||this.dom.matches("area")));if(this._originalHref===null&&o&&this.dom.hasAttribute("href")&&(this._originalHref=this.dom.getAttribute("href")),(!this._originalTextNodes||this._originalTextNodes.length===0||this._originalTextNodes.some(d=>!this.dom.contains(d.node)))&&(this._originalTextNodes=[],typeof document<"u"&&document.createTreeWalker)){const d=document.createTreeWalker(this.dom,NodeFilter.SHOW_TEXT,{acceptNode:function(w){return w.parentElement&&w.parentElement.classList&&w.parentElement.classList.contains("sr-only")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}});for(;d.nextNode();)this._originalTextNodes.push({node:d.currentNode,raw:d.currentNode.nodeValue})}const i=this.dom.getAttribute(e),u=parseInt(i,10),f=isNaN(u)?13:u,a=(this.dom.getAttribute("data-ln-obfuscator-codec")||"").toLowerCase().trim(),h=this.dom.getAttribute("data-ln-obfuscator-key");let p="rot";a==="xor"||a==="base64"?p=a:h&&(p="xor");const x=h||"ln-ashlar",m={codec:p,shift:f,key:x};if(o&&this.dom.getAttribute("data-ln-external-link")==="processed"){const d=this.dom.querySelectorAll(".sr-only");for(let b=0;b<d.length;b++)d[b].remove();this.dom.removeAttribute("data-ln-external-link"),this.dom.removeAttribute("target");const w=(this.dom.rel||"").split(/\s+/).filter(function(b){return b&&b!=="noopener"&&b!=="noreferrer"});w.length>0?this.dom.rel=w.join(" "):this.dom.removeAttribute("rel")}if(this._originalTextNodes)for(let d=0;d<this._originalTextNodes.length;d++){const w=this._originalTextNodes[d];w.node&&w.raw&&w.raw.length>0&&(w.node.nodeValue=N(w.raw,m))}if(o&&this._originalHref){const d=N(this._originalHref,m);this.dom.setAttribute("href",d)}q(this.dom,"ln-obfuscator:deobfuscated",{target:this.dom,codec:p,shift:f,key:p==="xor"?x:null})},l.prototype.destroy=function(){if(this.dom[t]){if(this._originalTextNodes)for(let o=0;o<this._originalTextNodes.length;o++){const c=this._originalTextNodes[o];c.node&&c.raw&&(c.node.nodeValue=c.raw)}this._originalHref!==null&&this.dom.setAttribute("href",this._originalHref),delete this.dom[t]}};const s=Z(e,t,l,"ln-obfuscator",{attributes:n});s.obfuscate=je,s.deobfuscate=N,s.utf8ToBase64=te,s.base64ToUtf8=ne,s.xorObfuscate=oe,s.xorDeobfuscate=ie})()})();
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){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let r=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){r=t[l];break}if(!_(r))return}e.apply(console,t)}}function R(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 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 ae(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function fe(e,t){const n=!!(t&&t.typed),r=t&&t.exclude,l={},s=e.elements,o={};if(n)for(let c=0;c<s.length;c++){const i=s[c];i.name&&i.type==="checkbox"&&!i.disabled&&(o[i.name]=(o[i.name]||0)+1)}for(let c=0;c<s.length;c++){const i=s[c];if(!(!i.name||i.disabled||i.type==="file"||i.type==="submit"||i.type==="button")&&!(r&&i.matches&&i.matches(r)))if(i.type==="checkbox")n&&o[i.name]===1?l[i.name]=i.checked:(l[i.name]||(l[i.name]=[]),i.checked&&l[i.name].push(i.value));else if(i.type==="radio")i.checked&&(l[i.name]=i.value);else if(i.type==="select-multiple"){l[i.name]=[];for(let u=0;u<i.options.length;u++)i.options[u].selected&&l[i.name].push(i.options[u].value)}else if(n&&i.type==="hidden")l[i.name]=i.value;else if(n&&(i.type==="number"||i.type==="range")){const u=Number(i.value);l[i.name]=i.value===""||isNaN(u)?null:u}else l[i.name]=i.value}return l}function de(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function he(e,t){const n=e.elements,r=[],l={};for(let s=0;s<n.length;s++){const o=n[s];o.name&&o.type==="checkbox"&&(l[o.name]=(l[o.name]||0)+1)}for(let s=0;s<n.length;s++){const o=n[s];if(o.type==="file"||o.type==="submit"||o.type==="button")continue;const c=o.getAttribute("data-ln-fill-as")||o.name;if(!c||!(c in t))continue;const i=t[c];if(o.type==="checkbox"){if(Array.isArray(i))o.checked=i.indexOf(o.value)!==-1;else if(l[o.name]>1){const u=String(i).split(",").map(function(a){return a.trim()});o.checked=u.indexOf(o.value)!==-1}else o.checked=de(i);r.push(o)}else if(o.type==="radio")o.checked=o.value===String(i),r.push(o);else if(o.type==="select-multiple"){if(Array.isArray(i))for(let u=0;u<o.options.length;u++)o.options[u].selected=i.indexOf(o.options[u].value)!==-1;r.push(o)}else o.value=i,o.tagName==="SELECT"&&i!=null&&o.setAttribute("data-ln-value",i),r.push(o)}return r}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=he,window.lnCore.serializeForm=fe,window.lnCore.resolveFormMethod=ae);const $={};function we(e,t){$[e]=t}function be(e){return $[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=we,window.lnCore.getDataMapper=be);function ge(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,A(function(){new MutationObserver(function(){R(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const M={};function pe(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];M[n]=t}function me(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return M[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=pe,window.lnCore.getLocaleFallback=me,window.lnCore.ensureLocaleObserver=ge);const k={};function ye(e,t){k[e]||(k[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=k[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function j(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let o=0;o<n.length;o++){const c=n[o],i=c.getAttribute("data-ln-field");t[i]!=null&&(c.textContent=t[i])}const r=e.querySelectorAll("[data-ln-attr]");for(let o=0;o<r.length;o++){const c=r[o],i=c.getAttribute("data-ln-attr").split(",");for(let u=0;u<i.length;u++){const a=i[u].trim().split(":");if(a.length!==2)continue;const f=a[0].trim(),h=a[1].trim();t[h]!=null&&c.setAttribute(f,t[h])}}const l=e.querySelectorAll("[data-ln-show]");for(let o=0;o<l.length;o++){const c=l[o],i=c.getAttribute("data-ln-show");i in t&&c.classList.toggle("hidden",!t[i])}const s=e.querySelectorAll("[data-ln-class]");for(let o=0;o<s.length;o++){const c=s[o],i=c.getAttribute("data-ln-class").split(",");for(let u=0;u<i.length;u++){const a=i[u].trim().split(":");if(a.length!==2)continue;const f=a[0].trim(),h=a[1].trim();h in t&&c.classList.toggle(f,!!t[h])}}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 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)j(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 H(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(o,c){return t[c]!==void 0?t[c]:""}))}const r=function(s,o){return t[o]!==void 0?t[o]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let s=0;s<l.length;s++){const o=l[s],c=o.attributes;for(let i=0;i<c.length;i++){const u=c[i];u.value.indexOf("{{")!==-1&&o.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function Ae(e,t,n,r,l,s){const o={};for(let i=0;i<e.children.length;i++){const u=e.children[i],a=u.getAttribute("data-ln-render-key");a&&(o[a]=u)}const c=document.createDocumentFragment();for(let i=0;i<t.length;i++){const u=t[i],a=String(r(u));let f=o[a];if(f)l(f,u,i);else{const h=ye(n,s);if(!h||(H(h,u),f=h.firstElementChild,!f))continue;f.setAttribute("data-ln-render-key",a),l(f,u,i)}c.appendChild(f)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=H,window.lnCore.fill=j,window.lnCore.lnFill=Ce,window.lnCore.renderList=Ae);function S(e,t,n){const r=e.getAttribute(t);return r===null?n:r}function W(e,t,n){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?n:r}function U(e,t,n=!1){const r=e.getAttribute(t);if(r===null)return!!n;const l=r.trim().toLowerCase();return!(l==="false"||l==="0")}function V(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const v=new Map;function J(e,t){const n=(e?e.join("|"):"")+"::"+t;if(v.has(n))return v.get(n);const r=new Set(e||[]),l=function(s,o){const c=s.getAttribute(o);return c!==null&&r.has(c)?c:t};return v.set(n,l),l}function K(e,t,n){const r=parseFloat(e.getAttribute(t));return isNaN(r)?n:r}function Q(e,t,n){const r=e.getAttribute(t);if(!r)return n;try{return JSON.parse(r)}catch{return n}}function z(e,t,n,r,l){if(!e||t===null)return!0;const s=r||"ln-component",o=e.type;if(o==="trigger"||o==="marker"||o==="string"||o==="list"||!o||t===""&&e.fallback!==void 0)return!0;const c=i=>{l?console.warn(i,l):console.warn(i)};if(o==="boolean"){const i=t.trim().toLowerCase();return i!==""&&i!=="true"&&i!=="false"&&i!=="1"&&i!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(o==="enum"){const i=e.values||[];return i.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${i.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(o==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const i=parseInt(t,10);return e.min!==void 0&&i<e.min?(c(`[${s}] Value ${i} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&i>e.max?(c(`[${s}] Value ${i} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(o==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(o==="json")try{return JSON.parse(t),!0}catch(i){return c(`[${s}] Invalid JSON for attribute "${n}": ${i.message}. Fallback: ${e.fallback}.`),!1}return!0}function xe(e,t,n){for(const r in n){const[l,s,o]=n[r];Object.defineProperty(e,r,{get:function(){return l(t,s,o)},enumerable:!0,configurable:!0})}return e}function _e(e){const t={};for(const n in e){const r=e[n];if(!r||!r.prop)continue;let l=r.read;if(!l&&r.type)switch(r.type){case"enum":l=J(r.values,r.fallback);break;case"integer":l=W;break;case"float":l=K;break;case"boolean":l=U;break;case"list":l=V;break;case"json":l=Q;break;case"string":default:l=S;break}l||(l=S),t[r.prop]=[l,n,r.fallback]}return t}function ke(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 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=xe,window.lnCore.attrSpec=_e,window.lnCore.attrStr=S,window.lnCore.attrInt=W,window.lnCore.attrBool=U,window.lnCore.attrList=V,window.lnCore.attrEnum=J,window.lnCore.attrFloat=K,window.lnCore.attrJson=Q);function y(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(n){console.error("["+t.attribute+"] init failed",e,n)}}}function P(e,t,n,r){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",o={selector:t,attribute:n,ComponentFn:r};if(e.matches&&e.matches(s)&&y(e,o),e.querySelectorAll){const c=e.querySelectorAll(s);for(let i=0;i<c.length;i++)y(c[i],o)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function ve(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Te(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function 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 Ee(e){const t=X(),n=e.observed||[];for(let r=0;r<n.length;r++){const l=n[r];t.byAttr.has(l)||t.byAttr.set(l,[]),t.byAttr.get(l).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const l=t.byDeclaredAttr.get(r);l.some(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=Se(e);if(r===null)t.reactiveWildcard.push(e);else for(const l of r)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function G(e,t,n,r){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const o=s.effects&&s.effects[n];o?o(t,n,r):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,r)}}function Oe(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,r=X(),l=r.byAttr.get(t),s=q()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(t);if(!n&&!l&&!s)return;const o=e.target;if(e.oldValue!==o.getAttribute(t)){if(s&&_(o)){const c=r.byDeclaredAttr.get(t),i=o.getAttribute(t);for(let u=0;u<c.length;u++)z(c[u].spec,i,t,c[u].componentTag,o)}if(window.lnCore._debugSink&&(n||l)&&window.lnCore._debugSink("attr",t,o,{oldValue:e.oldValue,newValue:o.getAttribute(t)}),n){const c=r.byReactive.get(t);c&&G(c,o,t,e.oldValue),r.reactiveWildcard.length&&G(r.reactiveWildcard,o,t,e.oldValue)}if(l)for(let c=0;c<l.length;c++){const i=l[c];if(i.handler){i.handler(o,t,e.oldValue);continue}i.onAttributeChange&&o[i.attribute]?i.onAttributeChange(o,t):(P(o,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(o))}}}function Ne(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,A(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Oe(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 T(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function E(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function O(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(r){console.error("["+t.attribute+"] destroy failed",e,r)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function Le(e){const t=T();if(!t.length)return;const n=e.target;if(n){const l=n.nodeType===1?n:n.parentElement;if(l&&(l.isContentEditable||l.closest&&l.closest('[contenteditable]:not([contenteditable="false"])')))return}const r=E();if(e.target&&r.length)for(let l=0;l<r.length;l++){const s=r[l],o=s.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(o)?e.target:e.target.closest?e.target.closest(o):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(o):null;c&&s.onSubtreeChange(c,e)}for(let l=0;l<e.addedNodes.length;l++){const s=e.addedNodes[l];if(s.nodeType===1){const o=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const i=t[c];if(i.selector&&i.attribute&&i.ComponentFn){if(!o)s.matches&&s.matches(i.query)&&y(s,i);else if(s.matches&&s.matches(i.query)&&y(s,i),s.querySelectorAll){const u=s.querySelectorAll(i.query);for(let a=0;a<u.length;a++)y(u[a],i)}}i.onInit&&i.onInit(s)}}}for(let l=0;l<e.removedNodes.length;l++){const s=e.removedNodes[l];if(s.nodeType===1){const o=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const i=t[c],u=i.query;if(u){if(!o)s.matches&&s.matches(u)&&O(s,i);else if(s.matches&&s.matches(u)&&O(s,i),s.querySelectorAll){const a=s.querySelectorAll(u);for(let f=0;f<a.length;f++)O(a[f],i)}}}}}}function Z(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,A(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{Le(r)}catch(l){console.error("[ln-core] lifecycle handler failed",r.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function De(e){T().push(e),e.onSubtreeChange&&e.query&&E().push(e),Z()}function Y(e,t,n,r,l={}){const s=l.extraAttributes||[],o=l.onAttributeChange||null,c=l.onSubtreeChange||null,i=l.onInit||null,u=l.onAttrChange||null,a=l.effects||null,f=l.attributes||null,h=f?ke(f):a,p=f?new Set(Object.keys(f)):null,x=l.persist||null;function m(D){const g=D||document.body;if(P(g,e,t,n),f&&q())for(const C in f){const Ue=f[C],B=Array.from(g.querySelectorAll("["+C+"]"));g.matches&&g.matches("["+C+"]")&&B.push(g);for(let F=0;F<B.length;F++){const I=B[F];_(I)&&z(Ue,I.getAttribute(C),C,r,I)}}i&&i(g)}const d=[];if(e.indexOf("[")!==-1){const D=/\[([\w-]+)/g;let g;for(;(g=D.exec(e))!==null;)d.push(g[1])}else d.push(e);Ee({selector:e,attribute:t,componentTag:r,attributes:f,ComponentFn:n,onInit:i,observed:d.concat(s),onAttributeChange:o,onAttrChange:u,effects:h,declared:p,persist:x}),Ne();const w=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,b=l.subtreeQuery||(w?e:"["+e+"]"),ce={selector:e,attribute:t,ComponentFn:n,onInit:i,onSubtreeChange:c,query:b};T().push(ce),c&&b&&E().push(ce),Z(),window[t]=m,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=Y,window.lnCore.observeLifecycle=De);function ue(){ve()>0?Te(function(){m(document.body)}):m(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ue):ue(),m}function ee(e){return(e||"").replace(/^#/,"")}function N(e){const t=e===void 0?location.hash:e,n={},r=ee(t);if(!r)return n;const l=r.split("&");for(let s=0;s<l.length;s++){const o=l[s];if(!o)continue;const c=o.indexOf(":"),i=c>-1?o.slice(0,c):o,u=c>-1?o.slice(c+1):"";if(i)try{n[i]=decodeURIComponent(u)}catch{n[i]=u}}return n}function Be(e){if(!e)return null;const t=N();return e in t?t[e]:null}function Fe(e,t){if(!e)return;const n=N();t==null?delete n[e]:n[e]=String(t);const l=Object.keys(n).map(function(s){const o=n[s];return o===""?s:s+":"+encodeURIComponent(o)}).join("&");ee(location.hash)!==l&&(location.hash=l)}function Ie(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function qe(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const 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 Re(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function $e(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Me(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function je(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),r=e.slice(t+1),l=r?r.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=N,window.lnCore.hashGet=Be,window.lnCore.hashSet=Fe,window.lnCore.hashLinkClick=Ie,window.lnCore.resolveHashNamespace=qe,window.lnCore.hashSortEncode=Re,window.lnCore.hashSortDecode=$e,window.lnCore.hashFilterEncode=Me,window.lnCore.hashFilterDecode=je);function He(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=He);function te(e,t){if(e.length!==1)return e;const n=e.charCodeAt(0);if(n>=65&&n<=90){const r=((n-65+t)%26+26)%26;return String.fromCharCode(65+r)}if(n>=97&&n<=122){const r=((n-97+t)%26+26)%26;return String.fromCharCode(97+r)}if(n>=48&&n<=57){const r=((n-48+t)%10+10)%10;return String.fromCharCode(48+r)}return e}function ne(e){if(e==null||e==="")return"";const t=String(e);if(typeof TextEncoder<"u"&&typeof btoa<"u"){const n=new TextEncoder().encode(t);let r="";const l=n.length;for(let s=0;s<l;s++)r+=String.fromCharCode(n[s]);return btoa(r)}return typeof Buffer<"u"?Buffer.from(t,"utf-8").toString("base64"):""}function re(e){if(e==null||e==="")return"";try{const t=String(e).trim();if(typeof atob<"u"&&typeof TextDecoder<"u"){const n=atob(t),r=new Uint8Array(n.length);for(let l=0;l<n.length;l++)r[l]=n.charCodeAt(l);return new TextDecoder().decode(r)}if(typeof Buffer<"u")return Buffer.from(t,"base64").toString("utf-8")}catch{return e}return e}function oe(e,t){const n=String(t||"ln-ashlar");let r;typeof TextEncoder<"u"?r=new TextEncoder().encode(n):typeof Buffer<"u"?r=Buffer.from(n,"utf-8"):r=[108,110];const l=r.length||1,s=new Uint8Array(e.length);for(let o=0;o<e.length;o++)s[o]=e[o]^r[o%l];return s}function ie(e,t="ln-ashlar"){if(e==null||e==="")return"";const n=String(e);let r;if(typeof TextEncoder<"u")r=new TextEncoder().encode(n);else if(typeof Buffer<"u")r=Buffer.from(n,"utf-8");else return"";const l=oe(r,t);let s="";for(let o=0;o<l.length;o++)s+=String.fromCharCode(l[o]);return typeof btoa<"u"?btoa(s):typeof Buffer<"u"?Buffer.from(l).toString("base64"):""}function le(e,t="ln-ashlar"){if(e==null||e==="")return"";try{const n=String(e).trim();let r="";if(typeof atob<"u")r=atob(n);else if(typeof Buffer<"u")r=Buffer.from(n,"base64").toString("binary");else return e;const l=new Uint8Array(r.length);for(let o=0;o<r.length;o++)l[o]=r.charCodeAt(o);const s=oe(l,t);if(typeof TextDecoder<"u")return new TextDecoder().decode(s);if(typeof Buffer<"u")return Buffer.from(s).toString("utf-8")}catch{return e}return e}function se(e){if(typeof e=="number"||typeof e=="string"&&/^-?\d+$/.test(String(e).trim()))return{codec:"rot",shift:Number(e)||13,key:"ln-ashlar"};if(e&&typeof e=="object"){const t=(e.codec||(e.key?"xor":"rot")).toLowerCase().trim(),n=t==="xor"||t==="base64"?t:"rot",r=Number(e.shift)||13,l=e.key||"ln-ashlar";return{codec:n,shift:r,key:l}}return{codec:"rot",shift:13,key:"ln-ashlar"}}function We(e,t=13){if(e==null||(typeof e!="string"&&(e=String(e)),e.length===0))return"";const n=se(t);return n.codec==="base64"?ne(e):n.codec==="xor"?ie(e,n.key):e.replace(/[a-zA-Z0-9]/g,r=>te(r,n.shift))}function L(e,t=13){if(e==null||(typeof e!="string"&&(e=String(e)),e.length===0))return"";const n=se(t);return n.codec==="base64"?re(e):n.codec==="xor"?le(e,n.key):e.replace(/[a-zA-Z0-9]/g,r=>te(r,-n.shift))}(function(){const e="data-ln-obfuscator",t="lnObfuscator";if(window[t]!==void 0)return;function n(o){const c=o[t];c&&c.deobfuscate()}const r={"data-ln-obfuscator":{type:"enum",values:["rot13","base64","xor"],fallback:"rot13",effect:n,description:"Codec used to deobfuscate text or links"},"data-ln-obfuscator-codec":{type:"enum",values:["rot13","base64","xor"],fallback:"rot13",effect:n,description:"Explicit codec override attribute"},"data-ln-obfuscator-key":{type:"string",effect:n,description:"Encryption or masking key for XOR codec"}};function l(o){return o[t]?o[t]:(o[t]=this,this.dom=o,this._originalTextNodes=null,this._originalHref=null,this.deobfuscate(),this)}l.prototype.deobfuscate=function(){const o=!!(this.dom.matches&&(this.dom.matches("a")||this.dom.matches("area")));if(this._originalHref===null&&o&&this.dom.hasAttribute("href")&&(this._originalHref=this.dom.getAttribute("href")),(!this._originalTextNodes||this._originalTextNodes.length===0||this._originalTextNodes.some(d=>!this.dom.contains(d.node)))&&(this._originalTextNodes=[],typeof document<"u"&&document.createTreeWalker)){const d=document.createTreeWalker(this.dom,NodeFilter.SHOW_TEXT,{acceptNode:function(w){return w.parentElement&&w.parentElement.classList&&w.parentElement.classList.contains("sr-only")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}});for(;d.nextNode();)this._originalTextNodes.push({node:d.currentNode,raw:d.currentNode.nodeValue})}const i=this.dom.getAttribute(e),u=parseInt(i,10),a=isNaN(u)?13:u,f=(this.dom.getAttribute("data-ln-obfuscator-codec")||"").toLowerCase().trim(),h=this.dom.getAttribute("data-ln-obfuscator-key");let p="rot";f==="xor"||f==="base64"?p=f:h&&(p="xor");const x=h||"ln-ashlar",m={codec:p,shift:a,key:x};if(o&&this.dom.getAttribute("data-ln-external-link")==="processed"){const d=this.dom.querySelectorAll(".sr-only");for(let b=0;b<d.length;b++)d[b].remove();this.dom.removeAttribute("data-ln-external-link"),this.dom.removeAttribute("target");const w=(this.dom.rel||"").split(/\s+/).filter(function(b){return b&&b!=="noopener"&&b!=="noreferrer"});w.length>0?this.dom.rel=w.join(" "):this.dom.removeAttribute("rel")}if(this._originalTextNodes)for(let d=0;d<this._originalTextNodes.length;d++){const w=this._originalTextNodes[d];w.node&&w.raw&&w.raw.length>0&&(w.node.nodeValue=L(w.raw,m))}if(o&&this._originalHref){const d=L(this._originalHref,m);this.dom.setAttribute("href",d)}R(this.dom,"ln-obfuscator:deobfuscated",{target:this.dom,codec:p,shift:a,key:p==="xor"?x:null})},l.prototype.destroy=function(){if(this.dom[t]){if(this._originalTextNodes)for(let o=0;o<this._originalTextNodes.length;o++){const c=this._originalTextNodes[o];c.node&&c.raw&&(c.node.nodeValue=c.raw)}this._originalHref!==null&&this.dom.setAttribute("href",this._originalHref),delete this.dom[t]}};const s=Y(e,t,l,"ln-obfuscator",{attributes:r});s.obfuscate=We,s.deobfuscate=L,s.utf8ToBase64=ne,s.base64ToUtf8=re,s.xorObfuscate=ie,s.xorDeobfuscate=le})()})();
@@ -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 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 n=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){n=t[l];break}if(!A(n))return}e.apply(console,t)}}function I(e,t,o){const n=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,n),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))}function 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 ee(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function te(e,t){const o=!!(t&&t.typed),n=t&&t.exclude,l={},s=e.elements,r={};if(o)for(let a=0;a<s.length;a++){const i=s[a];i.name&&i.type==="checkbox"&&!i.disabled&&(r[i.name]=(r[i.name]||0)+1)}for(let a=0;a<s.length;a++){const i=s[a];if(!(!i.name||i.disabled||i.type==="file"||i.type==="submit"||i.type==="button")&&!(n&&i.matches&&i.matches(n)))if(i.type==="checkbox")o&&r[i.name]===1?l[i.name]=i.checked:(l[i.name]||(l[i.name]=[]),i.checked&&l[i.name].push(i.value));else if(i.type==="radio")i.checked&&(l[i.name]=i.value);else if(i.type==="select-multiple"){l[i.name]=[];for(let c=0;c<i.options.length;c++)i.options[c].selected&&l[i.name].push(i.options[c].value)}else if(o&&i.type==="hidden")l[i.name]=i.value;else if(o&&(i.type==="number"||i.type==="range")){const c=Number(i.value);l[i.name]=i.value===""||isNaN(c)?null:c}else l[i.name]=i.value}return l}function ne(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function oe(e,t){const o=e.elements,n=[],l={};for(let s=0;s<o.length;s++){const r=o[s];r.name&&r.type==="checkbox"&&(l[r.name]=(l[r.name]||0)+1)}for(let s=0;s<o.length;s++){const r=o[s];if(r.type==="file"||r.type==="submit"||r.type==="button")continue;const a=r.getAttribute("data-ln-fill-as")||r.name;if(!a||!(a in t))continue;const i=t[a];if(r.type==="checkbox"){if(Array.isArray(i))r.checked=i.indexOf(r.value)!==-1;else if(l[r.name]>1){const c=String(i).split(",").map(function(f){return f.trim()});r.checked=c.indexOf(r.value)!==-1}else r.checked=ne(i);n.push(r)}else if(r.type==="radio")r.checked=r.value===String(i),n.push(r);else if(r.type==="select-multiple"){if(Array.isArray(i))for(let c=0;c<r.options.length;c++)r.options[c].selected=i.indexOf(r.options[c].value)!==-1;n.push(r)}else r.value=i,r.tagName==="SELECT"&&i!=null&&r.setAttribute("data-ln-value",i),n.push(r)}return n}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=oe,window.lnCore.serializeForm=te,window.lnCore.resolveFormMethod=ee);const T={};function re(e,t){T[e]=t}function ie(e){return T[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=re,window.lnCore.getDataMapper=ie);function le(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,m(function(){new MutationObserver(function(){I(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const $={};function se(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];$[o]=t}function ae(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return $[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=se,window.lnCore.getLocaleFallback=ae,window.lnCore.ensureLocaleObserver=le);const v={};function ce(e,t){v[e]||(v[e]=document.querySelector('[data-ln-template="'+e+'"]'));const o=v[e];return o?o.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function N(e,t){if(!e||!t)return e;const o=e.querySelectorAll("[data-ln-field]");for(let r=0;r<o.length;r++){const a=o[r],i=a.getAttribute("data-ln-field");t[i]!=null&&(a.textContent=t[i])}const n=e.querySelectorAll("[data-ln-attr]");for(let r=0;r<n.length;r++){const a=n[r],i=a.getAttribute("data-ln-attr").split(",");for(let c=0;c<i.length;c++){const f=i[c].trim().split(":");if(f.length!==2)continue;const d=f[0].trim(),u=f[1].trim();t[u]!=null&&a.setAttribute(d,t[u])}}const l=e.querySelectorAll("[data-ln-show]");for(let r=0;r<l.length;r++){const a=l[r],i=a.getAttribute("data-ln-show");i in t&&a.classList.toggle("hidden",!t[i])}const s=e.querySelectorAll("[data-ln-class]");for(let r=0;r<s.length;r++){const a=s[r],i=a.getAttribute("data-ln-class").split(",");for(let c=0;c<i.length;c++){const f=i[c].trim().split(":");if(f.length!==2)continue;const d=f[0].trim(),u=f[1].trim();u in t&&a.classList.toggle(d,!!t[u])}}return e}function ue(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const o=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let n=0;n<o.length;n++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",o[n],t??null),o[n].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)N(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 M(e,t){if(!e||!t)return e;const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const s=o.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(r,a){return t[a]!==void 0?t[a]:""}))}const n=function(s,r){return t[r]!==void 0?t[r]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let s=0;s<l.length;s++){const r=l[s],a=r.attributes;for(let i=0;i<a.length;i++){const c=a[i];c.value.indexOf("{{")!==-1&&r.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,n))}}return e}function de(e,t,o,n,l,s){const r={};for(let i=0;i<e.children.length;i++){const c=e.children[i],f=c.getAttribute("data-ln-render-key");f&&(r[f]=c)}const a=document.createDocumentFragment();for(let i=0;i<t.length;i++){const c=t[i],f=String(n(c));let d=r[f];if(d)l(d,c,i);else{const u=ce(o,s);if(!u||(M(u,c),d=u.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",f),l(d,c,i)}a.appendChild(d)}e.textContent="",e.appendChild(a)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=M,window.lnCore.fill=N,window.lnCore.lnFill=ue,window.lnCore.renderList=de);function h(e,t,o){const n=e.getAttribute(t);return n===null?o:n}function R(e,t,o){const n=parseInt(e.getAttribute(t),10);return isNaN(n)?o:n}function B(e,t,o=!1){const n=e.getAttribute(t);if(n===null)return!!o;const l=n.trim().toLowerCase();return!(l==="false"||l==="0")}function j(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const x=new Map;function W(e,t){const o=(e?e.join("|"):"")+"::"+t;if(x.has(o))return x.get(o);const n=new Set(e||[]),l=function(s,r){const a=s.getAttribute(r);return a!==null&&n.has(a)?a:t};return x.set(o,l),l}function U(e,t,o){const n=parseFloat(e.getAttribute(t));return isNaN(n)?o:n}function V(e,t,o){const n=e.getAttribute(t);if(!n)return o;try{return JSON.parse(n)}catch{return o}}function H(e,t,o,n,l){if(!e||t===null)return!0;const s=n||"ln-component",r=e.type;if(r==="trigger"||r==="marker"||r==="string"||r==="list"||!r||t===""&&e.fallback!==void 0)return!0;const a=i=>{l?console.warn(i,l):console.warn(i)};if(r==="boolean"){const i=t.trim().toLowerCase();return i!==""&&i!=="true"&&i!=="false"&&i!=="1"&&i!=="0"?(a(`[${s}] Invalid value "${t}" for boolean attribute "${o}". Allowed: "true", "false", or presence-only.`),!1):!0}if(r==="enum"){const i=e.values||[];return i.includes(t)?!0:(a(`[${s}] Invalid value "${t}" for attribute "${o}". Allowed: ${i.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(r==="integer"){if(!/^-?\d+$/.test(t))return a(`[${s}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const i=parseInt(t,10);return e.min!==void 0&&i<e.min?(a(`[${s}] Value ${i} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&i>e.max?(a(`[${s}] Value ${i} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(r==="float")return isNaN(Number(t))?(a(`[${s}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(r==="json")try{return JSON.parse(t),!0}catch(i){return a(`[${s}] Invalid JSON for attribute "${o}": ${i.message}. Fallback: ${e.fallback}.`),!1}return!0}function Q(e,t,o){for(const n in o){const[l,s,r]=o[n];Object.defineProperty(e,n,{get:function(){return l(t,s,r)},enumerable:!0,configurable:!0})}return e}function J(e){const t={};for(const o in e){const n=e[o];if(!n||!n.prop)continue;let l=n.read;if(!l&&n.type)switch(n.type){case"enum":l=W(n.values,n.fallback);break;case"integer":l=R;break;case"float":l=U;break;case"boolean":l=B;break;case"list":l=j;break;case"json":l=V;break;case"string":default:l=h;break}l||(l=h),t[n.prop]=[l,o,n.fallback]}return t}function fe(e){const t={};for(const o in e){const n=e[o];n&&n.effect&&(t[o]=n.effect)}return Object.keys(t).length?t:null}function we(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const o in e.effects)t.add(o);if(e.onAttrChange&&e.declared)for(const o of e.declared)t.add(o);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=Q,window.lnCore.attrSpec=J,window.lnCore.attrStr=h,window.lnCore.attrInt=R,window.lnCore.attrBool=B,window.lnCore.attrList=j,window.lnCore.attrEnum=W,window.lnCore.attrFloat=U,window.lnCore.attrJson=V);function p(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(o){console.error("["+t.attribute+"] init failed",e,o)}}}function K(e,t,o,n){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",r={selector:t,attribute:o,ComponentFn:n};if(e.matches&&e.matches(s)&&p(e,r),e.querySelectorAll){const a=e.querySelectorAll(s);for(let i=0;i<a.length;i++)p(a[i],r)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function he(){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 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 be(e){const t=P(),o=e.observed||[];for(let n=0;n<o.length;n++){const l=o[n];t.byAttr.has(l)||t.byAttr.set(l,[]),t.byAttr.get(l).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const n in e.attributes){t.byDeclaredAttr.has(n)||t.byDeclaredAttr.set(n,[]);const l=t.byDeclaredAttr.get(n);l.some(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[n],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const n=we(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 z(e,t,o,n){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const r=s.effects&&s.effects[o];r?r(t,o,n):s.onAttrChange&&(!s.declared||s.declared.has(o))&&s.onAttrChange(t,o,n)}}function ge(e){const t=e.attributeName,o=t.indexOf("data-ln-")===0,n=P(),l=n.byAttr.get(t),s=q()&&n.byDeclaredAttr&&n.byDeclaredAttr.has(t);if(!o&&!l&&!s)return;const r=e.target;if(e.oldValue!==r.getAttribute(t)){if(s&&A(r)){const a=n.byDeclaredAttr.get(t),i=r.getAttribute(t);for(let c=0;c<a.length;c++)H(a[c].spec,i,t,a[c].componentTag,r)}if(window.lnCore._debugSink&&(o||l)&&window.lnCore._debugSink("attr",t,r,{oldValue:e.oldValue,newValue:r.getAttribute(t)}),o){const a=n.byReactive.get(t);a&&z(a,r,t,e.oldValue),n.reactiveWildcard.length&&z(n.reactiveWildcard,r,t,e.oldValue)}if(l)for(let a=0;a<l.length;a++){const i=l[a];if(i.handler){i.handler(r,t,e.oldValue);continue}i.onAttributeChange&&r[i.attribute]?i.onAttributeChange(r,t):(K(r,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(r))}}}function Ce(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,m(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{ge(t[o])}catch(n){console.error("[ln-core] mutation handler failed",t[o].target,n)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function _(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function S(e,t){if(!document.contains(e))if(t.attribute){const o=e[t.attribute];if(o&&typeof o.destroy=="function")try{o.destroy()}catch(n){console.error("["+t.attribute+"] destroy failed",e,n)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function me(e){const t=_();if(t.length){if(e.target)for(let o=0;o<t.length;o++){const n=t[o];if(n.onSubtreeChange&&n.query){const l=n.query,s=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;s&&n.onSubtreeChange(s,e)}}for(let o=0;o<e.addedNodes.length;o++){const n=e.addedNodes[o];if(n.nodeType===1){const l=!!(n.firstElementChild||n.children&&n.children.length);for(let s=0;s<t.length;s++){const r=t[s];if(r.selector&&r.attribute&&r.ComponentFn){if(!l)n.matches&&n.matches(r.query)&&p(n,r);else if(n.matches&&n.matches(r.query)&&p(n,r),n.querySelectorAll){const a=n.querySelectorAll(r.query);for(let i=0;i<a.length;i++)p(a[i],r)}}r.onInit&&r.onInit(n)}}}for(let o=0;o<e.removedNodes.length;o++){const n=e.removedNodes[o];if(n.nodeType===1){const l=!!(n.firstElementChild||n.children&&n.children.length);for(let s=0;s<t.length;s++){const r=t[s],a=r.query;if(a){if(!l)n.matches&&n.matches(a)&&S(n,r);else if(n.matches&&n.matches(a)&&S(n,r),n.querySelectorAll){const i=n.querySelectorAll(a);for(let c=0;c<i.length;c++)S(i[c],r)}}}}}}}function G(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,m(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++){const n=t[o];if(n.type==="childList")try{me(n)}catch(l){console.error("[ln-core] lifecycle handler failed",n.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function ye(e){_().push(e),G()}function X(e,t,o,n,l={}){const s=l.extraAttributes||[],r=l.onAttributeChange||null,a=l.onSubtreeChange||null,i=l.onInit||null,c=l.onAttrChange||null,f=l.effects||null,d=l.attributes||null,u=d?fe(d):f,b=d?new Set(Object.keys(d)):null,g=l.persist||null;function y(E){const w=E||document.body;if(K(w,e,t,o),d&&q())for(const C in d){const qe=d[C],L=Array.from(w.querySelectorAll("["+C+"]"));w.matches&&w.matches("["+C+"]")&&L.push(w);for(let D=0;D<L.length;D++){const F=L[D];A(F)&&H(qe,F.getAttribute(C),C,n,F)}}i&&i(w)}const O=[];if(e.indexOf("[")!==-1){const E=/\[([\w-]+)/g;let w;for(;(w=E.exec(e))!==null;)O.push(w[1])}else O.push(e);be({selector:e,attribute:t,componentTag:n,attributes:d,ComponentFn:o,onInit:i,observed:O.concat(s),onAttributeChange:r,onAttrChange:c,effects:u,declared:b,persist:g}),Ce();const De=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,Fe=l.subtreeQuery||(De?e:"["+e+"]");_().push({selector:e,attribute:t,ComponentFn:o,onInit:i,onSubtreeChange:a,query:Fe}),G(),window[t]=y,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=X,window.lnCore.observeLifecycle=ye);function Z(){he()>0?pe(function(){y(document.body)}):y(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Z):Z(),y}function Y(e){return(e||"").replace(/^#/,"")}function k(e){const t=e===void 0?location.hash:e,o={},n=Y(t);if(!n)return o;const l=n.split("&");for(let s=0;s<l.length;s++){const r=l[s];if(!r)continue;const a=r.indexOf(":"),i=a>-1?r.slice(0,a):r,c=a>-1?r.slice(a+1):"";if(i)try{o[i]=decodeURIComponent(c)}catch{o[i]=c}}return o}function Ae(e){if(!e)return null;const t=k();return e in t?t[e]:null}function ve(e,t){if(!e)return;const o=k();t==null?delete o[e]:o[e]=String(t);const l=Object.keys(o).map(function(s){const r=o[s];return r===""?s:s+":"+encodeURIComponent(r)}).join("&");Y(location.hash)!==l&&(location.hash=l)}function xe(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function _e(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const o=e.getAttribute("data-ln-hash");if(o&&o.trim()!=="")return o.trim();const n=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return n?t?n+"-"+t:n:t||null}function Se(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 Oe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ee(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const o=e.slice(0,t),n=e.slice(t+1),l=n?n.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:o,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=k,window.lnCore.hashGet=Ae,window.lnCore.hashSet=ve,window.lnCore.hashLinkClick=xe,window.lnCore.resolveHashNamespace=_e,window.lnCore.hashSortEncode=Se,window.lnCore.hashSortDecode=ke,window.lnCore.hashFilterEncode=Oe,window.lnCore.hashFilterDecode=Ee);function Le(){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=Le),(function(){const e="data-ln-options",t="lnOptions";if(window[t]!==void 0)return;const o={"data-ln-options":{prop:"_storeName",type:"string",read:h,fallback:"",description:"Store or coordinator addressing to populate options from"},"data-ln-options-value":{prop:"_valueField",type:"string",read:h,fallback:"id",description:"Field name used for option value attribute"},"data-ln-options-label":{prop:"_labelField",type:"string",read:h,fallback:"name",description:"Field name used for option visible label text"}},n=J(o);function l(s){this.dom=s,Q(this,s,n);const r=this;return this._onSetData=function(a){a.detail&&r._rebuild(a.detail.data||[])},s.addEventListener("ln-options:set-data",this._onSetData),I(s,"ln-options:request-data",{options:this._storeName}),this}l.prototype._rebuild=function(s){const r=this.dom,a=this._valueField,i=this._labelField,c=r.getAttribute("data-ln-value")||r.value,f=r.querySelectorAll("option");for(let u=f.length-1;u>=0;u--)f[u].value!==""&&r.removeChild(f[u]);for(let u=0;u<s.length;u++){const b=s[u],g=document.createElement("option");g.value=String(b[a]),g.textContent=b[i]!=null?b[i]:"",r.appendChild(g)}const d=r.options;for(let u=0;u<d.length;u++)if(d[u].value===String(c)){r.value=String(c);break}},l.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-options:set-data",this._onSetData),delete this.dom[t])},X(e,t,l,"ln-options",{attributes:o})})()})();
1
+ (function(){"use strict";function I(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function 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 l=null;for(let i=1;i<t.length;i++)if(t[i]&&t[i].nodeType===1){l=t[i];break}if(!A(l))return}e.apply(console,t)}}function T(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 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 oe(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function re(e,t){const o=!!(t&&t.typed),l=t&&t.exclude,i={},s=e.elements,r={};if(o)for(let c=0;c<s.length;c++){const n=s[c];n.name&&n.type==="checkbox"&&!n.disabled&&(r[n.name]=(r[n.name]||0)+1)}for(let c=0;c<s.length;c++){const n=s[c];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(l&&n.matches&&n.matches(l)))if(n.type==="checkbox")o&&r[n.name]===1?i[n.name]=n.checked:(i[n.name]||(i[n.name]=[]),n.checked&&i[n.name].push(n.value));else if(n.type==="radio")n.checked&&(i[n.name]=n.value);else if(n.type==="select-multiple"){i[n.name]=[];for(let a=0;a<n.options.length;a++)n.options[a].selected&&i[n.name].push(n.options[a].value)}else if(o&&n.type==="hidden")i[n.name]=n.value;else if(o&&(n.type==="number"||n.type==="range")){const a=Number(n.value);i[n.name]=n.value===""||isNaN(a)?null:a}else i[n.name]=n.value}return i}function ie(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function le(e,t){const o=e.elements,l=[],i={};for(let s=0;s<o.length;s++){const r=o[s];r.name&&r.type==="checkbox"&&(i[r.name]=(i[r.name]||0)+1)}for(let s=0;s<o.length;s++){const r=o[s];if(r.type==="file"||r.type==="submit"||r.type==="button")continue;const c=r.getAttribute("data-ln-fill-as")||r.name;if(!c||!(c in t))continue;const n=t[c];if(r.type==="checkbox"){if(Array.isArray(n))r.checked=n.indexOf(r.value)!==-1;else if(i[r.name]>1){const a=String(n).split(",").map(function(u){return u.trim()});r.checked=a.indexOf(r.value)!==-1}else r.checked=ie(n);l.push(r)}else if(r.type==="radio")r.checked=r.value===String(n),l.push(r);else if(r.type==="select-multiple"){if(Array.isArray(n))for(let a=0;a<r.options.length;a++)r.options[a].selected=n.indexOf(r.options[a].value)!==-1;l.push(r)}else r.value=n,r.tagName==="SELECT"&&n!=null&&r.setAttribute("data-ln-value",n),l.push(r)}return l}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=le,window.lnCore.serializeForm=re,window.lnCore.resolveFormMethod=oe);const $={};function se(e,t){$[e]=t}function ce(e){return $[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=se,window.lnCore.getDataMapper=ce);function ae(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,m(function(){new MutationObserver(function(){T(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const N={};function ue(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];N[o]=t}function de(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return N[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ue,window.lnCore.getLocaleFallback=de,window.lnCore.ensureLocaleObserver=ae);const v={};function fe(e,t){v[e]||(v[e]=document.querySelector('[data-ln-template="'+e+'"]'));const o=v[e];return o?o.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function R(e,t){if(!e||!t)return e;const o=e.querySelectorAll("[data-ln-field]");for(let r=0;r<o.length;r++){const c=o[r],n=c.getAttribute("data-ln-field");t[n]!=null&&(c.textContent=t[n])}const l=e.querySelectorAll("[data-ln-attr]");for(let r=0;r<l.length;r++){const c=l[r],n=c.getAttribute("data-ln-attr").split(",");for(let a=0;a<n.length;a++){const u=n[a].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();t[f]!=null&&c.setAttribute(d,t[f])}}const i=e.querySelectorAll("[data-ln-show]");for(let r=0;r<i.length;r++){const c=i[r],n=c.getAttribute("data-ln-show");n in t&&c.classList.toggle("hidden",!t[n])}const s=e.querySelectorAll("[data-ln-class]");for(let r=0;r<s.length;r++){const c=s[r],n=c.getAttribute("data-ln-class").split(",");for(let a=0;a<n.length;a++){const u=n[a].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();f in t&&c.classList.toggle(d,!!t[f])}}return e}function we(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const 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)R(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 M(e,t){if(!e||!t)return e;const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const s=o.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(r,c){return t[c]!==void 0?t[c]:""}))}const l=function(s,r){return t[r]!==void 0?t[r]:""},i=Array.from(e.querySelectorAll("*"));e.nodeType===1&&i.push(e);for(let s=0;s<i.length;s++){const r=i[s],c=r.attributes;for(let n=0;n<c.length;n++){const a=c[n];a.value.indexOf("{{")!==-1&&r.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,l))}}return e}function he(e,t,o,l,i,s){const r={};for(let n=0;n<e.children.length;n++){const a=e.children[n],u=a.getAttribute("data-ln-render-key");u&&(r[u]=a)}const c=document.createDocumentFragment();for(let n=0;n<t.length;n++){const a=t[n],u=String(l(a));let d=r[u];if(d)i(d,a,n);else{const f=fe(o,s);if(!f||(M(f,a),d=f.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",u),i(d,a,n)}c.appendChild(d)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=M,window.lnCore.fill=R,window.lnCore.lnFill=we,window.lnCore.renderList=he);function h(e,t,o){const l=e.getAttribute(t);return l===null?o:l}function B(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 i=l.trim().toLowerCase();return!(i==="false"||i==="0")}function W(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const x=new Map;function U(e,t){const o=(e?e.join("|"):"")+"::"+t;if(x.has(o))return x.get(o);const l=new Set(e||[]),i=function(s,r){const c=s.getAttribute(r);return c!==null&&l.has(c)?c:t};return x.set(o,i),i}function V(e,t,o){const l=parseFloat(e.getAttribute(t));return isNaN(l)?o:l}function H(e,t,o){const l=e.getAttribute(t);if(!l)return o;try{return JSON.parse(l)}catch{return o}}function Q(e,t,o,l,i){if(!e||t===null)return!0;const s=l||"ln-component",r=e.type;if(r==="trigger"||r==="marker"||r==="string"||r==="list"||!r||t===""&&e.fallback!==void 0)return!0;const c=n=>{i?console.warn(n,i):console.warn(n)};if(r==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${o}". Allowed: "true", "false", or presence-only.`),!1):!0}if(r==="enum"){const n=e.values||[];return n.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${o}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(r==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(c(`[${s}] Value ${n} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(c(`[${s}] Value ${n} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(r==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(r==="json")try{return JSON.parse(t),!0}catch(n){return c(`[${s}] Invalid JSON for attribute "${o}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function J(e,t,o){for(const l in o){const[i,s,r]=o[l];Object.defineProperty(e,l,{get:function(){return i(t,s,r)},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 i=l.read;if(!i&&l.type)switch(l.type){case"enum":i=U(l.values,l.fallback);break;case"integer":i=B;break;case"float":i=V;break;case"boolean":i=j;break;case"list":i=W;break;case"json":i=H;break;case"string":default:i=h;break}i||(i=h),t[l.prop]=[i,o,l.fallback]}return t}function pe(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 be(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=J,window.lnCore.attrSpec=K,window.lnCore.attrStr=h,window.lnCore.attrInt=B,window.lnCore.attrBool=j,window.lnCore.attrList=W,window.lnCore.attrEnum=U,window.lnCore.attrFloat=V,window.lnCore.attrJson=H);function p(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(o){console.error("["+t.attribute+"] init failed",e,o)}}}function P(e,t,o,l){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",r={selector:t,attribute:o,ComponentFn:l};if(e.matches&&e.matches(s)&&p(e,r),e.querySelectorAll){const c=e.querySelectorAll(s);for(let n=0;n<c.length;n++)p(c[n],r)}}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 Ce(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function z(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function me(e){const t=z(),o=e.observed||[];for(let l=0;l<o.length;l++){const i=o[l];t.byAttr.has(i)||t.byAttr.set(i,[]),t.byAttr.get(i).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const l in e.attributes){t.byDeclaredAttr.has(l)||t.byDeclaredAttr.set(l,[]);const i=t.byDeclaredAttr.get(l);i.some(s=>s.componentTag===e.componentTag)||i.push({spec:e.attributes[l],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const l=be(e);if(l===null)t.reactiveWildcard.push(e);else for(const i of l)t.byReactive.has(i)||t.byReactive.set(i,[]),t.byReactive.get(i).push(e)}e.persist&&t.persist.push(e)}function G(e,t,o,l){for(let i=0;i<e.length;i++){const s=e[i];if(!t[s.attribute])continue;const r=s.effects&&s.effects[o];r?r(t,o,l):s.onAttrChange&&(!s.declared||s.declared.has(o))&&s.onAttrChange(t,o,l)}}function ye(e){const t=e.attributeName,o=t.indexOf("data-ln-")===0,l=z(),i=l.byAttr.get(t),s=I()&&l.byDeclaredAttr&&l.byDeclaredAttr.has(t);if(!o&&!i&&!s)return;const r=e.target;if(e.oldValue!==r.getAttribute(t)){if(s&&A(r)){const c=l.byDeclaredAttr.get(t),n=r.getAttribute(t);for(let a=0;a<c.length;a++)Q(c[a].spec,n,t,c[a].componentTag,r)}if(window.lnCore._debugSink&&(o||i)&&window.lnCore._debugSink("attr",t,r,{oldValue:e.oldValue,newValue:r.getAttribute(t)}),o){const c=l.byReactive.get(t);c&&G(c,r,t,e.oldValue),l.reactiveWildcard.length&&G(l.reactiveWildcard,r,t,e.oldValue)}if(i)for(let c=0;c<i.length;c++){const n=i[c];if(n.handler){n.handler(r,t,e.oldValue);continue}n.onAttributeChange&&r[n.attribute]?n.onAttributeChange(r,t):(P(r,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(r))}}}function Ae(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,m(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{ye(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 _(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function S(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function k(e,t){if(!document.contains(e))if(t.attribute){const o=e[t.attribute];if(o&&typeof o.destroy=="function")try{o.destroy()}catch(l){console.error("["+t.attribute+"] destroy failed",e,l)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function ve(e){const t=_();if(!t.length)return;const o=e.target;if(o){const i=o.nodeType===1?o:o.parentElement;if(i&&(i.isContentEditable||i.closest&&i.closest('[contenteditable]:not([contenteditable="false"])')))return}const l=S();if(e.target&&l.length)for(let i=0;i<l.length;i++){const s=l[i],r=s.query,c=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;c&&s.onSubtreeChange(c,e)}for(let i=0;i<e.addedNodes.length;i++){const s=e.addedNodes[i];if(s.nodeType===1){const r=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const n=t[c];if(n.selector&&n.attribute&&n.ComponentFn){if(!r)s.matches&&s.matches(n.query)&&p(s,n);else if(s.matches&&s.matches(n.query)&&p(s,n),s.querySelectorAll){const a=s.querySelectorAll(n.query);for(let u=0;u<a.length;u++)p(a[u],n)}}n.onInit&&n.onInit(s)}}}for(let i=0;i<e.removedNodes.length;i++){const s=e.removedNodes[i];if(s.nodeType===1){const r=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const n=t[c],a=n.query;if(a){if(!r)s.matches&&s.matches(a)&&k(s,n);else if(s.matches&&s.matches(a)&&k(s,n),s.querySelectorAll){const u=s.querySelectorAll(a);for(let d=0;d<u.length;d++)k(u[d],n)}}}}}}function X(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,m(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++){const l=t[o];if(l.type==="childList")try{ve(l)}catch(i){console.error("[ln-core] lifecycle handler failed",l.target,i)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function xe(e){_().push(e),e.onSubtreeChange&&e.query&&S().push(e),X()}function Y(e,t,o,l,i={}){const s=i.extraAttributes||[],r=i.onAttributeChange||null,c=i.onSubtreeChange||null,n=i.onInit||null,a=i.onAttrChange||null,u=i.effects||null,d=i.attributes||null,f=d?pe(d):u,b=d?new Set(Object.keys(d)):null,g=i.persist||null;function y(L){const w=L||document.body;if(P(w,e,t,o),d&&I())for(const C in d){const Te=d[C],D=Array.from(w.querySelectorAll("["+C+"]"));w.matches&&w.matches("["+C+"]")&&D.push(w);for(let F=0;F<D.length;F++){const q=D[F];A(q)&&Q(Te,q.getAttribute(C),C,l,q)}}n&&n(w)}const O=[];if(e.indexOf("[")!==-1){const L=/\[([\w-]+)/g;let w;for(;(w=L.exec(e))!==null;)O.push(w[1])}else O.push(e);me({selector:e,attribute:t,componentTag:l,attributes:d,ComponentFn:o,onInit:n,observed:O.concat(s),onAttributeChange:r,onAttrChange:a,effects:f,declared:b,persist:g}),Ae();const Ie=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,ee=i.subtreeQuery||(Ie?e:"["+e+"]"),te={selector:e,attribute:t,ComponentFn:o,onInit:n,onSubtreeChange:c,query:ee};_().push(te),c&&ee&&S().push(te),X(),window[t]=y,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=Y,window.lnCore.observeLifecycle=xe);function ne(){ge()>0?Ce(function(){y(document.body)}):y(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ne):ne(),y}function Z(e){return(e||"").replace(/^#/,"")}function E(e){const t=e===void 0?location.hash:e,o={},l=Z(t);if(!l)return o;const i=l.split("&");for(let s=0;s<i.length;s++){const r=i[s];if(!r)continue;const c=r.indexOf(":"),n=c>-1?r.slice(0,c):r,a=c>-1?r.slice(c+1):"";if(n)try{o[n]=decodeURIComponent(a)}catch{o[n]=a}}return o}function _e(e){if(!e)return null;const t=E();return e in t?t[e]:null}function Se(e,t){if(!e)return;const o=E();t==null?delete o[e]:o[e]=String(t);const i=Object.keys(o).map(function(s){const r=o[s];return r===""?s:s+":"+encodeURIComponent(r)}).join("&");Z(location.hash)!==i&&(location.hash=i)}function ke(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ee(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const o=e.getAttribute("data-ln-hash");if(o&&o.trim()!=="")return o.trim();const 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 Oe(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 De(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Fe(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const o=e.slice(0,t),l=e.slice(t+1),i=l?l.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:o,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=E,window.lnCore.hashGet=_e,window.lnCore.hashSet=Se,window.lnCore.hashLinkClick=ke,window.lnCore.resolveHashNamespace=Ee,window.lnCore.hashSortEncode=Oe,window.lnCore.hashSortDecode=Le,window.lnCore.hashFilterEncode=De,window.lnCore.hashFilterDecode=Fe);function qe(){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=qe),(function(){const e="data-ln-options",t="lnOptions";if(window[t]!==void 0)return;const o={"data-ln-options":{prop:"_storeName",type:"string",read:h,fallback:"",description:"Store or coordinator addressing to populate options from"},"data-ln-options-value":{prop:"_valueField",type:"string",read:h,fallback:"id",description:"Field name used for option value attribute"},"data-ln-options-label":{prop:"_labelField",type:"string",read:h,fallback:"name",description:"Field name used for option visible label text"}},l=K(o);function i(s){this.dom=s,J(this,s,l);const r=this;return this._onSetData=function(c){c.detail&&r._rebuild(c.detail.data||[])},s.addEventListener("ln-options:set-data",this._onSetData),T(s,"ln-options:request-data",{options:this._storeName}),this}i.prototype._rebuild=function(s){const r=this.dom,c=this._valueField,n=this._labelField,a=r.getAttribute("data-ln-value")||r.value,u=r.querySelectorAll("option");for(let f=u.length-1;f>=0;f--)u[f].value!==""&&r.removeChild(u[f]);for(let f=0;f<s.length;f++){const b=s[f],g=document.createElement("option");g.value=String(b[c]),g.textContent=b[n]!=null?b[n]:"",r.appendChild(g)}const d=r.options;for(let f=0;f<d.length;f++)if(d[f].value===String(a)){r.value=String(a);break}},i.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-options:set-data",this._onSetData),delete this.dom[t])},Y(e,t,i,"ln-options",{attributes:o})})()})();
@@ -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 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 n=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){n=t[l];break}if(!A(n))return}e.apply(console,t)}}function C(e,t,o){const n=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,n),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))}function Y(e,t,o){const n=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,n);const l=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});return e.dispatchEvent(l),l}function y(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){y(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function 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),n=t&&t.exclude,l={},s=e.elements,i={};if(o)for(let c=0;c<s.length;c++){const r=s[c];r.name&&r.type==="checkbox"&&!r.disabled&&(i[r.name]=(i[r.name]||0)+1)}for(let c=0;c<s.length;c++){const r=s[c];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(n&&r.matches&&r.matches(n)))if(r.type==="checkbox")o&&i[r.name]===1?l[r.name]=r.checked:(l[r.name]||(l[r.name]=[]),r.checked&&l[r.name].push(r.value));else if(r.type==="radio")r.checked&&(l[r.name]=r.value);else if(r.type==="select-multiple"){l[r.name]=[];for(let a=0;a<r.options.length;a++)r.options[a].selected&&l[r.name].push(r.options[a].value)}else if(o&&r.type==="hidden")l[r.name]=r.value;else if(o&&(r.type==="number"||r.type==="range")){const a=Number(r.value);l[r.name]=r.value===""||isNaN(a)?null:a}else l[r.name]=r.value}return l}function 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,n=[],l={};for(let s=0;s<o.length;s++){const i=o[s];i.name&&i.type==="checkbox"&&(l[i.name]=(l[i.name]||0)+1)}for(let s=0;s<o.length;s++){const i=o[s];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const c=i.getAttribute("data-ln-fill-as")||i.name;if(!c||!(c in t))continue;const r=t[c];if(i.type==="checkbox"){if(Array.isArray(r))i.checked=r.indexOf(i.value)!==-1;else if(l[i.name]>1){const a=String(r).split(",").map(function(u){return u.trim()});i.checked=a.indexOf(i.value)!==-1}else i.checked=te(r);n.push(i)}else if(i.type==="radio")i.checked=i.value===String(r),n.push(i);else if(i.type==="select-multiple"){if(Array.isArray(r))for(let a=0;a<i.options.length;a++)i.options[a].selected=r.indexOf(i.options[a].value)!==-1;n.push(i)}else i.value=r,i.tagName==="SELECT"&&r!=null&&i.setAttribute("data-ln-value",r),n.push(i)}return n}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ne,window.lnCore.serializeForm=ee,window.lnCore.resolveFormMethod=Z);const T={};function oe(e,t){T[e]=t}function re(e){return T[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=oe,window.lnCore.getDataMapper=re);function ie(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,y(function(){new MutationObserver(function(){C(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const R={};function le(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];R[o]=t}function se(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return R[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=le,window.lnCore.getLocaleFallback=se,window.lnCore.ensureLocaleObserver=ie);const v={};function ce(e,t){v[e]||(v[e]=document.querySelector('[data-ln-template="'+e+'"]'));const o=v[e];return o?o.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function $(e,t){if(!e||!t)return e;const o=e.querySelectorAll("[data-ln-field]");for(let i=0;i<o.length;i++){const c=o[i],r=c.getAttribute("data-ln-field");t[r]!=null&&(c.textContent=t[r])}const n=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<n.length;i++){const c=n[i],r=c.getAttribute("data-ln-attr").split(",");for(let a=0;a<r.length;a++){const u=r[a].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();t[f]!=null&&c.setAttribute(d,t[f])}}const l=e.querySelectorAll("[data-ln-show]");for(let i=0;i<l.length;i++){const c=l[i],r=c.getAttribute("data-ln-show");r in t&&c.classList.toggle("hidden",!t[r])}const s=e.querySelectorAll("[data-ln-class]");for(let i=0;i<s.length;i++){const c=s[i],r=c.getAttribute("data-ln-class").split(",");for(let a=0;a<r.length;a++){const u=r[a].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();f in t&&c.classList.toggle(d,!!t[f])}}return e}function 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 o=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let n=0;n<o.length;n++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",o[n],t??null),o[n].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)$(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 M(e,t){if(!e||!t)return e;const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const s=o.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,c){return t[c]!==void 0?t[c]:""}))}const n=function(s,i){return t[i]!==void 0?t[i]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let s=0;s<l.length;s++){const i=l[s],c=i.attributes;for(let r=0;r<c.length;r++){const a=c[r];a.value.indexOf("{{")!==-1&&i.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,n))}}return e}function ue(e,t,o,n,l,s){const i={};for(let r=0;r<e.children.length;r++){const a=e.children[r],u=a.getAttribute("data-ln-render-key");u&&(i[u]=a)}const c=document.createDocumentFragment();for(let r=0;r<t.length;r++){const a=t[r],u=String(n(a));let d=i[u];if(d)l(d,a,r);else{const f=ce(o,s);if(!f||(M(f,a),d=f.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",u),l(d,a,r)}c.appendChild(d)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=M,window.lnCore.fill=$,window.lnCore.lnFill=ae,window.lnCore.renderList=ue);function k(e,t,o){const n=e.getAttribute(t);return n===null?o:n}function N(e,t,o){const n=parseInt(e.getAttribute(t),10);return isNaN(n)?o:n}function B(e,t,o=!1){const n=e.getAttribute(t);if(n===null)return!!o;const l=n.trim().toLowerCase();return!(l==="false"||l==="0")}function j(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const x=new Map;function W(e,t){const o=(e?e.join("|"):"")+"::"+t;if(x.has(o))return x.get(o);const n=new Set(e||[]),l=function(s,i){const c=s.getAttribute(i);return c!==null&&n.has(c)?c:t};return x.set(o,l),l}function U(e,t,o){const n=parseFloat(e.getAttribute(t));return isNaN(n)?o:n}function V(e,t,o){const n=e.getAttribute(t);if(!n)return o;try{return JSON.parse(n)}catch{return o}}function H(e,t,o,n,l){if(!e||t===null)return!0;const s=n||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const c=r=>{l?console.warn(r,l):console.warn(r)};if(i==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${o}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const r=e.values||[];return r.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${o}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(c(`[${s}] Value ${r} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(c(`[${s}] Value ${r} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(r){return c(`[${s}] Invalid JSON for attribute "${o}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function de(e,t,o){for(const n in o){const[l,s,i]=o[n];Object.defineProperty(e,n,{get:function(){return l(t,s,i)},enumerable:!0,configurable:!0})}return e}function fe(e){const t={};for(const o in e){const n=e[o];if(!n||!n.prop)continue;let l=n.read;if(!l&&n.type)switch(n.type){case"enum":l=W(n.values,n.fallback);break;case"integer":l=N;break;case"float":l=U;break;case"boolean":l=B;break;case"list":l=j;break;case"json":l=V;break;case"string":default:l=k;break}l||(l=k),t[n.prop]=[l,o,n.fallback]}return t}function he(e){const t={};for(const o in e){const n=e[o];n&&n.effect&&(t[o]=n.effect)}return Object.keys(t).length?t:null}function we(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=de,window.lnCore.attrSpec=fe,window.lnCore.attrStr=k,window.lnCore.attrInt=N,window.lnCore.attrBool=B,window.lnCore.attrList=j,window.lnCore.attrEnum=W,window.lnCore.attrFloat=U,window.lnCore.attrJson=V);function g(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(o){console.error("["+t.attribute+"] init failed",e,o)}}}function Q(e,t,o,n){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:o,ComponentFn:n};if(e.matches&&e.matches(s)&&g(e,i),e.querySelectorAll){const c=e.querySelectorAll(s);for(let r=0;r<c.length;r++)g(c[r],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function be(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function 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 J(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function ge(e){const t=J(),o=e.observed||[];for(let n=0;n<o.length;n++){const l=o[n];t.byAttr.has(l)||t.byAttr.set(l,[]),t.byAttr.get(l).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const n in e.attributes){t.byDeclaredAttr.has(n)||t.byDeclaredAttr.set(n,[]);const l=t.byDeclaredAttr.get(n);l.some(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[n],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const n=we(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 K(e,t,o,n){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const i=s.effects&&s.effects[o];i?i(t,o,n):s.onAttrChange&&(!s.declared||s.declared.has(o))&&s.onAttrChange(t,o,n)}}function me(e){const t=e.attributeName,o=t.indexOf("data-ln-")===0,n=J(),l=n.byAttr.get(t),s=q()&&n.byDeclaredAttr&&n.byDeclaredAttr.has(t);if(!o&&!l&&!s)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(s&&A(i)){const c=n.byDeclaredAttr.get(t),r=i.getAttribute(t);for(let a=0;a<c.length;a++)H(c[a].spec,r,t,c[a].componentTag,i)}if(window.lnCore._debugSink&&(o||l)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),o){const c=n.byReactive.get(t);c&&K(c,i,t,e.oldValue),n.reactiveWildcard.length&&K(n.reactiveWildcard,i,t,e.oldValue)}if(l)for(let c=0;c<l.length;c++){const r=l[c];if(r.handler){r.handler(i,t,e.oldValue);continue}r.onAttributeChange&&i[r.attribute]?r.onAttributeChange(i,t):(Q(i,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(i))}}}function Ce(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,y(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{me(t[o])}catch(n){console.error("[ln-core] mutation handler failed",t[o].target,n)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function _(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function S(e,t){if(!document.contains(e))if(t.attribute){const o=e[t.attribute];if(o&&typeof o.destroy=="function")try{o.destroy()}catch(n){console.error("["+t.attribute+"] destroy failed",e,n)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function ye(e){const t=_();if(t.length){if(e.target)for(let o=0;o<t.length;o++){const n=t[o];if(n.onSubtreeChange&&n.query){const l=n.query,s=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;s&&n.onSubtreeChange(s,e)}}for(let o=0;o<e.addedNodes.length;o++){const n=e.addedNodes[o];if(n.nodeType===1){const l=!!(n.firstElementChild||n.children&&n.children.length);for(let s=0;s<t.length;s++){const i=t[s];if(i.selector&&i.attribute&&i.ComponentFn){if(!l)n.matches&&n.matches(i.query)&&g(n,i);else if(n.matches&&n.matches(i.query)&&g(n,i),n.querySelectorAll){const c=n.querySelectorAll(i.query);for(let r=0;r<c.length;r++)g(c[r],i)}}i.onInit&&i.onInit(n)}}}for(let o=0;o<e.removedNodes.length;o++){const n=e.removedNodes[o];if(n.nodeType===1){const l=!!(n.firstElementChild||n.children&&n.children.length);for(let s=0;s<t.length;s++){const i=t[s],c=i.query;if(c){if(!l)n.matches&&n.matches(c)&&S(n,i);else if(n.matches&&n.matches(c)&&S(n,i),n.querySelectorAll){const r=n.querySelectorAll(c);for(let a=0;a<r.length;a++)S(r[a],i)}}}}}}}function P(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,y(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++){const n=t[o];if(n.type==="childList")try{ye(n)}catch(l){console.error("[ln-core] lifecycle handler failed",n.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ae(e){_().push(e),P()}function z(e,t,o,n,l={}){const s=l.extraAttributes||[],i=l.onAttributeChange||null,c=l.onSubtreeChange||null,r=l.onInit||null,a=l.onAttrChange||null,u=l.effects||null,d=l.attributes||null,f=d?he(d):u,h=d?new Set(Object.keys(d)):null,w=l.persist||null;function p(O){const b=O||document.body;if(Q(b,e,t,o),d&&q())for(const m in d){const qe=d[m],F=Array.from(b.querySelectorAll("["+m+"]"));b.matches&&b.matches("["+m+"]")&&F.push(b);for(let D=0;D<F.length;D++){const I=F[D];A(I)&&H(qe,I.getAttribute(m),m,n,I)}}r&&r(b)}const L=[];if(e.indexOf("[")!==-1){const O=/\[([\w-]+)/g;let b;for(;(b=O.exec(e))!==null;)L.push(b[1])}else L.push(e);ge({selector:e,attribute:t,componentTag:n,attributes:d,ComponentFn:o,onInit:r,observed:L.concat(s),onAttributeChange:i,onAttrChange:a,effects:f,declared:h,persist:w}),Ce();const De=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,Ie=l.subtreeQuery||(De?e:"["+e+"]");_().push({selector:e,attribute:t,ComponentFn:o,onInit:r,onSubtreeChange:c,query:Ie}),P(),window[t]=p,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=z,window.lnCore.observeLifecycle=Ae);function X(){be()>0?pe(function(){p(document.body)}):p(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",X):X(),p}function G(e){return(e||"").replace(/^#/,"")}function E(e){const t=e===void 0?location.hash:e,o={},n=G(t);if(!n)return o;const l=n.split("&");for(let s=0;s<l.length;s++){const i=l[s];if(!i)continue;const c=i.indexOf(":"),r=c>-1?i.slice(0,c):i,a=c>-1?i.slice(c+1):"";if(r)try{o[r]=decodeURIComponent(a)}catch{o[r]=a}}return o}function ve(e){if(!e)return null;const t=E();return e in t?t[e]:null}function ke(e,t){if(!e)return;const o=E();t==null?delete o[e]:o[e]=String(t);const l=Object.keys(o).map(function(s){const i=o[s];return i===""?s:s+":"+encodeURIComponent(i)}).join("&");G(location.hash)!==l&&(location.hash=l)}function xe(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function _e(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const o=e.getAttribute("data-ln-hash");if(o&&o.trim()!=="")return o.trim();const n=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return n?t?n+"-"+t:n:t||null}function Se(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Ee(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 Le(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Oe(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const o=e.slice(0,t),n=e.slice(t+1),l=n?n.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:o,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=E,window.lnCore.hashGet=ve,window.lnCore.hashSet=ke,window.lnCore.hashLinkClick=xe,window.lnCore.resolveHashNamespace=_e,window.lnCore.hashSortEncode=Se,window.lnCore.hashSortDecode=Ee,window.lnCore.hashFilterEncode=Le,window.lnCore.hashFilterDecode=Oe);function Fe(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Fe),(function(){const e="data-ln-picklist",t="lnPicklist",o="data-ln-picklist-list",n="data-ln-picklist-max";if(window[t]!==void 0)return;const l={"data-ln-picklist":{type:"enum",values:["enabled","disabled"],fallback:"enabled",effect:c,description:"Controls enabled/disabled state of the dual-list picklist"},"data-ln-picklist-max":{type:"integer",fallback:1/0,min:1,effect:r,description:"Maximum selectable items in the selected list"},"data-ln-picklist-list":{type:"enum",values:["available","selected"],description:"Role marker for available or selected picklist columns"}};function s(a){if(this.dom=a,this.isEnabled=a.getAttribute(e)!=="disabled",this.max=i(a),this.available=a.querySelector("["+o+'="available"]'),this.selected=a.querySelector("["+o+'="selected"]'),!this.available||!this.selected)return console.warn("[ln-picklist] requires both ["+o+'="available"] and ['+o+'="selected"]',a),this;this._onChange=this._onChange.bind(this),a.addEventListener("change",this._onChange),this._initial=[];for(const u of[this.available,this.selected])for(const d of u.children)this._initial.push(d);return this.sync(),this._form=a.closest("form"),this._form&&(this._onFormReset=this._onFormReset.bind(this),this._form.addEventListener("reset",this._onFormReset)),this}s.prototype.destroy=function(){this.dom[t]&&(this._destroyed=!0,this._onChange&&this.dom.removeEventListener("change",this._onChange),this._form&&this._form.removeEventListener("reset",this._onFormReset),delete this.dom[t])},s.prototype.enable=function(){this.dom.setAttribute(e,"")},s.prototype.disable=function(){this.dom.setAttribute(e,"disabled")},s.prototype.sync=function(){if(!this.available||!this.selected)return;const a=Array.from(this.available.children).concat(Array.from(this.selected.children));for(let d=0;d<a.length;d++)this._initial.includes(a[d])||this._initial.push(a[d]);let u=0;for(let d=0;d<this._initial.length;d++){const f=this._initial[d];if(!f.isConnected)continue;const h=f.querySelector('input[type="checkbox"]');if(!h)continue;let w;h.checked?this.max===null||u<this.max?(w=this.selected,u++):(h.checked=!1,w=this.available):w=this.available,w.appendChild(f)}},s.prototype._onFormReset=function(a){const u=this;setTimeout(function(){u._destroyed||a.defaultPrevented||u.sync()},0)},s.prototype._onChange=function(a){const u=a.target.closest('input[type="checkbox"]');if(!u)return;const d=u.closest("li");if(!d)return;const f=d.parentElement;if(f!==this.available&&f!==this.selected)return;if(!this.isEnabled){u.checked=!u.checked;return}const h=u.checked?this.selected:this.available;if(f===h)return;if(h===this.selected&&this.max!==null&&this.selected.children.length>=this.max){u.checked=!u.checked,C(this.dom,"ln-picklist:max-reached",{max:this.max,item:d,checkbox:u,count:this.selected.children.length});return}const w={item:d,from:f,to:h,checkbox:u};if(Y(this.dom,"ln-picklist:before-move",w).defaultPrevented){u.checked=!u.checked;return}const p=document.activeElement===u;h.appendChild(d),p&&u.focus(),C(this.dom,"ln-picklist:move",w)};function i(a){const u=a.getAttribute(n);if(u===null||u==="")return null;const d=parseInt(u,10);return isNaN(d)||d<0?null:d}function c(a){const u=a[t];if(!u)return;const d=a.getAttribute(e)!=="disabled";d!==u.isEnabled&&(u.isEnabled=d,C(a,d?"ln-picklist:enabled":"ln-picklist:disabled",{target:a}))}function r(a){const u=a[t];u&&(u.max=i(a))}z(e,t,s,"ln-picklist",{attributes:l})})()})();
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 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 l=null;for(let r=1;r<t.length;r++)if(t[r]&&t[r].nodeType===1){l=t[r];break}if(!A(l))return}e.apply(console,t)}}function C(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 te(e,t,o){const l=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,l);const r=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:l});return e.dispatchEvent(r),r}function y(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){y(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function ne(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function oe(e,t){const o=!!(t&&t.typed),l=t&&t.exclude,r={},s=e.elements,i={};if(o)for(let c=0;c<s.length;c++){const n=s[c];n.name&&n.type==="checkbox"&&!n.disabled&&(i[n.name]=(i[n.name]||0)+1)}for(let c=0;c<s.length;c++){const n=s[c];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(l&&n.matches&&n.matches(l)))if(n.type==="checkbox")o&&i[n.name]===1?r[n.name]=n.checked:(r[n.name]||(r[n.name]=[]),n.checked&&r[n.name].push(n.value));else if(n.type==="radio")n.checked&&(r[n.name]=n.value);else if(n.type==="select-multiple"){r[n.name]=[];for(let a=0;a<n.options.length;a++)n.options[a].selected&&r[n.name].push(n.options[a].value)}else if(o&&n.type==="hidden")r[n.name]=n.value;else if(o&&(n.type==="number"||n.type==="range")){const a=Number(n.value);r[n.name]=n.value===""||isNaN(a)?null:a}else r[n.name]=n.value}return r}function re(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ie(e,t){const o=e.elements,l=[],r={};for(let s=0;s<o.length;s++){const i=o[s];i.name&&i.type==="checkbox"&&(r[i.name]=(r[i.name]||0)+1)}for(let s=0;s<o.length;s++){const i=o[s];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const c=i.getAttribute("data-ln-fill-as")||i.name;if(!c||!(c in t))continue;const n=t[c];if(i.type==="checkbox"){if(Array.isArray(n))i.checked=n.indexOf(i.value)!==-1;else if(r[i.name]>1){const a=String(n).split(",").map(function(u){return u.trim()});i.checked=a.indexOf(i.value)!==-1}else i.checked=re(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 a=0;a<i.options.length;a++)i.options[a].selected=n.indexOf(i.options[a].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=ie,window.lnCore.serializeForm=oe,window.lnCore.resolveFormMethod=ne);const R={};function le(e,t){R[e]=t}function se(e){return R[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=le,window.lnCore.getDataMapper=se);function ce(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,y(function(){new MutationObserver(function(){C(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const $={};function ae(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];$[o]=t}function ue(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return $[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ae,window.lnCore.getLocaleFallback=ue,window.lnCore.ensureLocaleObserver=ce);const v={};function de(e,t){v[e]||(v[e]=document.querySelector('[data-ln-template="'+e+'"]'));const o=v[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 c=o[i],n=c.getAttribute("data-ln-field");t[n]!=null&&(c.textContent=t[n])}const l=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<l.length;i++){const c=l[i],n=c.getAttribute("data-ln-attr").split(",");for(let a=0;a<n.length;a++){const u=n[a].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();t[f]!=null&&c.setAttribute(d,t[f])}}const r=e.querySelectorAll("[data-ln-show]");for(let i=0;i<r.length;i++){const c=r[i],n=c.getAttribute("data-ln-show");n in t&&c.classList.toggle("hidden",!t[n])}const s=e.querySelectorAll("[data-ln-class]");for(let i=0;i<s.length;i++){const c=s[i],n=c.getAttribute("data-ln-class").split(",");for(let a=0;a<n.length;a++){const u=n[a].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();f in t&&c.classList.toggle(d,!!t[f])}}return e}function 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 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 N(e,t){if(!e||!t)return e;const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const s=o.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,c){return t[c]!==void 0?t[c]:""}))}const l=function(s,i){return t[i]!==void 0?t[i]:""},r=Array.from(e.querySelectorAll("*"));e.nodeType===1&&r.push(e);for(let s=0;s<r.length;s++){const i=r[s],c=i.attributes;for(let n=0;n<c.length;n++){const a=c[n];a.value.indexOf("{{")!==-1&&i.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,l))}}return e}function he(e,t,o,l,r,s){const i={};for(let n=0;n<e.children.length;n++){const a=e.children[n],u=a.getAttribute("data-ln-render-key");u&&(i[u]=a)}const c=document.createDocumentFragment();for(let n=0;n<t.length;n++){const a=t[n],u=String(l(a));let d=i[u];if(d)r(d,a,n);else{const f=de(o,s);if(!f||(N(f,a),d=f.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",u),r(d,a,n)}c.appendChild(d)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=N,window.lnCore.fill=M,window.lnCore.lnFill=fe,window.lnCore.renderList=he);function k(e,t,o){const l=e.getAttribute(t);return l===null?o:l}function B(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 r=l.trim().toLowerCase();return!(r==="false"||r==="0")}function W(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const _=new Map;function U(e,t){const o=(e?e.join("|"):"")+"::"+t;if(_.has(o))return _.get(o);const l=new Set(e||[]),r=function(s,i){const c=s.getAttribute(i);return c!==null&&l.has(c)?c:t};return _.set(o,r),r}function V(e,t,o){const l=parseFloat(e.getAttribute(t));return isNaN(l)?o:l}function H(e,t,o){const l=e.getAttribute(t);if(!l)return o;try{return JSON.parse(l)}catch{return o}}function Q(e,t,o,l,r){if(!e||t===null)return!0;const s=l||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const c=n=>{r?console.warn(n,r):console.warn(n)};if(i==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${o}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const n=e.values||[];return n.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${o}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(c(`[${s}] Value ${n} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(c(`[${s}] Value ${n} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(n){return c(`[${s}] Invalid JSON for attribute "${o}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function we(e,t,o){for(const l in o){const[r,s,i]=o[l];Object.defineProperty(e,l,{get:function(){return r(t,s,i)},enumerable:!0,configurable:!0})}return e}function be(e){const t={};for(const o in e){const l=e[o];if(!l||!l.prop)continue;let r=l.read;if(!r&&l.type)switch(l.type){case"enum":r=U(l.values,l.fallback);break;case"integer":r=B;break;case"float":r=V;break;case"boolean":r=j;break;case"list":r=W;break;case"json":r=H;break;case"string":default:r=k;break}r||(r=k),t[l.prop]=[r,o,l.fallback]}return t}function pe(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 ge(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const o in e.effects)t.add(o);if(e.onAttrChange&&e.declared)for(const o of e.declared)t.add(o);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=we,window.lnCore.attrSpec=be,window.lnCore.attrStr=k,window.lnCore.attrInt=B,window.lnCore.attrBool=j,window.lnCore.attrList=W,window.lnCore.attrEnum=U,window.lnCore.attrFloat=V,window.lnCore.attrJson=H);function g(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(o){console.error("["+t.attribute+"] init failed",e,o)}}}function J(e,t,o,l){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:o,ComponentFn:l};if(e.matches&&e.matches(s)&&g(e,i),e.querySelectorAll){const c=e.querySelectorAll(s);for(let n=0;n<c.length;n++)g(c[n],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function me(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Ce(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function K(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function ye(e){const t=K(),o=e.observed||[];for(let l=0;l<o.length;l++){const r=o[l];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 l in e.attributes){t.byDeclaredAttr.has(l)||t.byDeclaredAttr.set(l,[]);const r=t.byDeclaredAttr.get(l);r.some(s=>s.componentTag===e.componentTag)||r.push({spec:e.attributes[l],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const l=ge(e);if(l===null)t.reactiveWildcard.push(e);else for(const r of l)t.byReactive.has(r)||t.byReactive.set(r,[]),t.byReactive.get(r).push(e)}e.persist&&t.persist.push(e)}function P(e,t,o,l){for(let r=0;r<e.length;r++){const s=e[r];if(!t[s.attribute])continue;const i=s.effects&&s.effects[o];i?i(t,o,l):s.onAttrChange&&(!s.declared||s.declared.has(o))&&s.onAttrChange(t,o,l)}}function Ae(e){const t=e.attributeName,o=t.indexOf("data-ln-")===0,l=K(),r=l.byAttr.get(t),s=q()&&l.byDeclaredAttr&&l.byDeclaredAttr.has(t);if(!o&&!r&&!s)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(s&&A(i)){const c=l.byDeclaredAttr.get(t),n=i.getAttribute(t);for(let a=0;a<c.length;a++)Q(c[a].spec,n,t,c[a].componentTag,i)}if(window.lnCore._debugSink&&(o||r)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),o){const c=l.byReactive.get(t);c&&P(c,i,t,e.oldValue),l.reactiveWildcard.length&&P(l.reactiveWildcard,i,t,e.oldValue)}if(r)for(let c=0;c<r.length;c++){const n=r[c];if(n.handler){n.handler(i,t,e.oldValue);continue}n.onAttributeChange&&i[n.attribute]?n.onAttributeChange(i,t):(J(i,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(i))}}}function ve(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,y(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{Ae(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 x(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function S(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function E(e,t){if(!document.contains(e))if(t.attribute){const o=e[t.attribute];if(o&&typeof o.destroy=="function")try{o.destroy()}catch(l){console.error("["+t.attribute+"] destroy failed",e,l)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function ke(e){const t=x();if(!t.length)return;const o=e.target;if(o){const r=o.nodeType===1?o:o.parentElement;if(r&&(r.isContentEditable||r.closest&&r.closest('[contenteditable]:not([contenteditable="false"])')))return}const l=S();if(e.target&&l.length)for(let r=0;r<l.length;r++){const s=l[r],i=s.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(i)?e.target:e.target.closest?e.target.closest(i):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(i):null;c&&s.onSubtreeChange(c,e)}for(let r=0;r<e.addedNodes.length;r++){const s=e.addedNodes[r];if(s.nodeType===1){const i=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const n=t[c];if(n.selector&&n.attribute&&n.ComponentFn){if(!i)s.matches&&s.matches(n.query)&&g(s,n);else if(s.matches&&s.matches(n.query)&&g(s,n),s.querySelectorAll){const a=s.querySelectorAll(n.query);for(let u=0;u<a.length;u++)g(a[u],n)}}n.onInit&&n.onInit(s)}}}for(let r=0;r<e.removedNodes.length;r++){const s=e.removedNodes[r];if(s.nodeType===1){const i=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const n=t[c],a=n.query;if(a){if(!i)s.matches&&s.matches(a)&&E(s,n);else if(s.matches&&s.matches(a)&&E(s,n),s.querySelectorAll){const u=s.querySelectorAll(a);for(let d=0;d<u.length;d++)E(u[d],n)}}}}}}function z(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,y(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++){const l=t[o];if(l.type==="childList")try{ke(l)}catch(r){console.error("[ln-core] lifecycle handler failed",l.target,r)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function _e(e){x().push(e),e.onSubtreeChange&&e.query&&S().push(e),z()}function G(e,t,o,l,r={}){const s=r.extraAttributes||[],i=r.onAttributeChange||null,c=r.onSubtreeChange||null,n=r.onInit||null,a=r.onAttrChange||null,u=r.effects||null,d=r.attributes||null,f=d?pe(d):u,h=d?new Set(Object.keys(d)):null,w=r.persist||null;function p(F){const b=F||document.body;if(J(b,e,t,o),d&&q())for(const m in d){const Re=d[m],D=Array.from(b.querySelectorAll("["+m+"]"));b.matches&&b.matches("["+m+"]")&&D.push(b);for(let I=0;I<D.length;I++){const T=D[I];A(T)&&Q(Re,T.getAttribute(m),m,l,T)}}n&&n(b)}const O=[];if(e.indexOf("[")!==-1){const F=/\[([\w-]+)/g;let b;for(;(b=F.exec(e))!==null;)O.push(b[1])}else O.push(e);ye({selector:e,attribute:t,componentTag:l,attributes:d,ComponentFn:o,onInit:n,observed:O.concat(s),onAttributeChange:i,onAttrChange:a,effects:f,declared:h,persist:w}),ve();const qe=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,Y=r.subtreeQuery||(qe?e:"["+e+"]"),Z={selector:e,attribute:t,ComponentFn:o,onInit:n,onSubtreeChange:c,query:Y};x().push(Z),c&&Y&&S().push(Z),z(),window[t]=p,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=G,window.lnCore.observeLifecycle=_e);function ee(){me()>0?Ce(function(){p(document.body)}):p(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ee):ee(),p}function X(e){return(e||"").replace(/^#/,"")}function L(e){const t=e===void 0?location.hash:e,o={},l=X(t);if(!l)return o;const r=l.split("&");for(let s=0;s<r.length;s++){const i=r[s];if(!i)continue;const c=i.indexOf(":"),n=c>-1?i.slice(0,c):i,a=c>-1?i.slice(c+1):"";if(n)try{o[n]=decodeURIComponent(a)}catch{o[n]=a}}return o}function xe(e){if(!e)return null;const t=L();return e in t?t[e]:null}function Se(e,t){if(!e)return;const o=L();t==null?delete o[e]:o[e]=String(t);const r=Object.keys(o).map(function(s){const i=o[s];return i===""?s:s+":"+encodeURIComponent(i)}).join("&");X(location.hash)!==r&&(location.hash=r)}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 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 Oe(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 De(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ie(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const o=e.slice(0,t),l=e.slice(t+1),r=l?l.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:o,values:r}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=L,window.lnCore.hashGet=xe,window.lnCore.hashSet=Se,window.lnCore.hashLinkClick=Ee,window.lnCore.resolveHashNamespace=Le,window.lnCore.hashSortEncode=Oe,window.lnCore.hashSortDecode=Fe,window.lnCore.hashFilterEncode=De,window.lnCore.hashFilterDecode=Ie);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-picklist",t="lnPicklist",o="data-ln-picklist-list",l="data-ln-picklist-max";if(window[t]!==void 0)return;const r={"data-ln-picklist":{type:"enum",values:["enabled","disabled"],fallback:"enabled",effect:c,description:"Controls enabled/disabled state of the dual-list picklist"},"data-ln-picklist-max":{type:"integer",fallback:1/0,min:1,effect:n,description:"Maximum selectable items in the selected list"},"data-ln-picklist-list":{type:"enum",values:["available","selected"],description:"Role marker for available or selected picklist columns"}};function s(a){if(this.dom=a,this.isEnabled=a.getAttribute(e)!=="disabled",this.max=i(a),this.available=a.querySelector("["+o+'="available"]'),this.selected=a.querySelector("["+o+'="selected"]'),!this.available||!this.selected)return console.warn("[ln-picklist] requires both ["+o+'="available"] and ['+o+'="selected"]',a),this;this._onChange=this._onChange.bind(this),a.addEventListener("change",this._onChange),this._initial=[];for(const u of[this.available,this.selected])for(const d of u.children)this._initial.push(d);return this.sync(),this._form=a.closest("form"),this._form&&(this._onFormReset=this._onFormReset.bind(this),this._form.addEventListener("reset",this._onFormReset)),this}s.prototype.destroy=function(){this.dom[t]&&(this._destroyed=!0,this._onChange&&this.dom.removeEventListener("change",this._onChange),this._form&&this._form.removeEventListener("reset",this._onFormReset),delete this.dom[t])},s.prototype.enable=function(){this.dom.setAttribute(e,"")},s.prototype.disable=function(){this.dom.setAttribute(e,"disabled")},s.prototype.sync=function(){if(!this.available||!this.selected)return;const a=Array.from(this.available.children).concat(Array.from(this.selected.children));for(let d=0;d<a.length;d++)this._initial.includes(a[d])||this._initial.push(a[d]);let u=0;for(let d=0;d<this._initial.length;d++){const f=this._initial[d];if(!f.isConnected)continue;const h=f.querySelector('input[type="checkbox"]');if(!h)continue;let w;h.checked?this.max===null||u<this.max?(w=this.selected,u++):(h.checked=!1,w=this.available):w=this.available,w.appendChild(f)}},s.prototype._onFormReset=function(a){const u=this;setTimeout(function(){u._destroyed||a.defaultPrevented||u.sync()},0)},s.prototype._onChange=function(a){const u=a.target.closest('input[type="checkbox"]');if(!u)return;const d=u.closest("li");if(!d)return;const f=d.parentElement;if(f!==this.available&&f!==this.selected)return;if(!this.isEnabled){u.checked=!u.checked;return}const h=u.checked?this.selected:this.available;if(f===h)return;if(h===this.selected&&this.max!==null&&this.selected.children.length>=this.max){u.checked=!u.checked,C(this.dom,"ln-picklist:max-reached",{max:this.max,item:d,checkbox:u,count:this.selected.children.length});return}const w={item:d,from:f,to:h,checkbox:u};if(te(this.dom,"ln-picklist:before-move",w).defaultPrevented){u.checked=!u.checked;return}const p=document.activeElement===u;h.appendChild(d),p&&u.focus(),C(this.dom,"ln-picklist:move",w)};function i(a){const u=a.getAttribute(l);if(u===null||u==="")return null;const d=parseInt(u,10);return isNaN(d)||d<0?null:d}function c(a){const u=a[t];if(!u)return;const d=a.getAttribute(e)!=="disabled";d!==u.isEnabled&&(u.isEnabled=d,C(a,d?"ln-picklist:enabled":"ln-picklist:disabled",{target:a}))}function n(a){const u=a[t];u&&(u.max=i(a))}G(e,t,s,"ln-picklist",{attributes:r})})()})();
@@ -1 +1 @@
1
- (function(){"use strict";function N(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function 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 s=1;s<t.length;s++)if(t[s]&&t[s].nodeType===1){n=t[s];break}if(!x(n))return}e.apply(console,t)}}function S(e,t,o){const n=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,n),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))}function B(e,t,o){const n=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,n);const s=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});return e.dispatchEvent(s),s}function k(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){k(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function oe(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function ie(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function re(e,t){const o=!!(t&&t.typed),n=t&&t.exclude,s={},l=e.elements,r={};if(o)for(let c=0;c<l.length;c++){const i=l[c];i.name&&i.type==="checkbox"&&!i.disabled&&(r[i.name]=(r[i.name]||0)+1)}for(let c=0;c<l.length;c++){const i=l[c];if(!(!i.name||i.disabled||i.type==="file"||i.type==="submit"||i.type==="button")&&!(n&&i.matches&&i.matches(n)))if(i.type==="checkbox")o&&r[i.name]===1?s[i.name]=i.checked:(s[i.name]||(s[i.name]=[]),i.checked&&s[i.name].push(i.value));else if(i.type==="radio")i.checked&&(s[i.name]=i.value);else if(i.type==="select-multiple"){s[i.name]=[];for(let u=0;u<i.options.length;u++)i.options[u].selected&&s[i.name].push(i.options[u].value)}else if(o&&i.type==="hidden")s[i.name]=i.value;else if(o&&(i.type==="number"||i.type==="range")){const u=Number(i.value);s[i.name]=i.value===""||isNaN(u)?null:u}else s[i.name]=i.value}return s}function se(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function le(e,t){const o=e.elements,n=[],s={};for(let l=0;l<o.length;l++){const r=o[l];r.name&&r.type==="checkbox"&&(s[r.name]=(s[r.name]||0)+1)}for(let l=0;l<o.length;l++){const r=o[l];if(r.type==="file"||r.type==="submit"||r.type==="button")continue;const c=r.getAttribute("data-ln-fill-as")||r.name;if(!c||!(c in t))continue;const i=t[c];if(r.type==="checkbox"){if(Array.isArray(i))r.checked=i.indexOf(r.value)!==-1;else if(s[r.name]>1){const u=String(i).split(",").map(function(w){return w.trim()});r.checked=u.indexOf(r.value)!==-1}else r.checked=se(i);n.push(r)}else if(r.type==="radio")r.checked=r.value===String(i),n.push(r);else if(r.type==="select-multiple"){if(Array.isArray(i))for(let u=0;u<r.options.length;u++)r.options[u].selected=i.indexOf(r.options[u].value)!==-1;n.push(r)}else r.value=i,r.tagName==="SELECT"&&i!=null&&r.setAttribute("data-ln-value",i),n.push(r)}return n}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=le,window.lnCore.serializeForm=re,window.lnCore.resolveFormMethod=ie);const M={};function ce(e,t){M[e]=t}function ue(e){return M[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ce,window.lnCore.getDataMapper=ue);function ae(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,k(function(){new MutationObserver(function(){S(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const j={};function de(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];j[o]=t}function fe(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=de,window.lnCore.getLocaleFallback=fe,window.lnCore.ensureLocaleObserver=ae);const E={};function pe(e,t){E[e]||(E[e]=document.querySelector('[data-ln-template="'+e+'"]'));const o=E[e];return o?o.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function W(e,t){if(!e||!t)return e;const o=e.querySelectorAll("[data-ln-field]");for(let r=0;r<o.length;r++){const c=o[r],i=c.getAttribute("data-ln-field");t[i]!=null&&(c.textContent=t[i])}const n=e.querySelectorAll("[data-ln-attr]");for(let r=0;r<n.length;r++){const c=n[r],i=c.getAttribute("data-ln-attr").split(",");for(let u=0;u<i.length;u++){const w=i[u].trim().split(":");if(w.length!==2)continue;const f=w[0].trim(),a=w[1].trim();t[a]!=null&&c.setAttribute(f,t[a])}}const s=e.querySelectorAll("[data-ln-show]");for(let r=0;r<s.length;r++){const c=s[r],i=c.getAttribute("data-ln-show");i in t&&c.classList.toggle("hidden",!t[i])}const l=e.querySelectorAll("[data-ln-class]");for(let r=0;r<l.length;r++){const c=l[r],i=c.getAttribute("data-ln-class").split(",");for(let u=0;u<i.length;u++){const w=i[u].trim().split(":");if(w.length!==2)continue;const f=w[0].trim(),a=w[1].trim();a in t&&c.classList.toggle(f,!!t[a])}}return e}function he(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const o=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let n=0;n<o.length;n++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",o[n],t??null),o[n].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)W(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 P(e,t){if(!e||!t)return e;const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const l=o.currentNode;l.textContent.indexOf("{{")!==-1&&(l.textContent=l.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(r,c){return t[c]!==void 0?t[c]:""}))}const n=function(l,r){return t[r]!==void 0?t[r]:""},s=Array.from(e.querySelectorAll("*"));e.nodeType===1&&s.push(e);for(let l=0;l<s.length;l++){const r=s[l],c=r.attributes;for(let i=0;i<c.length;i++){const u=c[i];u.value.indexOf("{{")!==-1&&r.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,n))}}return e}function ge(e,t,o,n,s,l){const r={};for(let i=0;i<e.children.length;i++){const u=e.children[i],w=u.getAttribute("data-ln-render-key");w&&(r[w]=u)}const c=document.createDocumentFragment();for(let i=0;i<t.length;i++){const u=t[i],w=String(n(u));let f=r[w];if(f)s(f,u,i);else{const a=pe(o,l);if(!a||(P(a,u),f=a.firstElementChild,!f))continue;f.setAttribute("data-ln-render-key",w),s(f,u,i)}c.appendChild(f)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=P,window.lnCore.fill=W,window.lnCore.lnFill=he,window.lnCore.renderList=ge);function O(e,t,o){const n=e.getAttribute(t);return n===null?o:n}function H(e,t,o){const n=parseInt(e.getAttribute(t),10);return isNaN(n)?o:n}function V(e,t,o=!1){const n=e.getAttribute(t);if(n===null)return!!o;const s=n.trim().toLowerCase();return!(s==="false"||s==="0")}function U(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const L=new Map;function K(e,t){const o=(e?e.join("|"):"")+"::"+t;if(L.has(o))return L.get(o);const n=new Set(e||[]),s=function(l,r){const c=l.getAttribute(r);return c!==null&&n.has(c)?c:t};return L.set(o,s),s}function Q(e,t,o){const n=parseFloat(e.getAttribute(t));return isNaN(n)?o:n}function z(e,t,o){const n=e.getAttribute(t);if(!n)return o;try{return JSON.parse(n)}catch{return o}}function J(e,t,o,n,s){if(!e||t===null)return!0;const l=n||"ln-component",r=e.type;if(r==="trigger"||r==="marker"||r==="string"||r==="list"||!r||t===""&&e.fallback!==void 0)return!0;const c=i=>{s?console.warn(i,s):console.warn(i)};if(r==="boolean"){const i=t.trim().toLowerCase();return i!==""&&i!=="true"&&i!=="false"&&i!=="1"&&i!=="0"?(c(`[${l}] Invalid value "${t}" for boolean attribute "${o}". Allowed: "true", "false", or presence-only.`),!1):!0}if(r==="enum"){const i=e.values||[];return i.includes(t)?!0:(c(`[${l}] Invalid value "${t}" for attribute "${o}". Allowed: ${i.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(r==="integer"){if(!/^-?\d+$/.test(t))return c(`[${l}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const i=parseInt(t,10);return e.min!==void 0&&i<e.min?(c(`[${l}] Value ${i} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&i>e.max?(c(`[${l}] Value ${i} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(r==="float")return isNaN(Number(t))?(c(`[${l}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(r==="json")try{return JSON.parse(t),!0}catch(i){return c(`[${l}] Invalid JSON for attribute "${o}": ${i.message}. Fallback: ${e.fallback}.`),!1}return!0}function we(e,t,o){for(const n in o){const[s,l,r]=o[n];Object.defineProperty(e,n,{get:function(){return s(t,l,r)},enumerable:!0,configurable:!0})}return e}function be(e){const t={};for(const o in e){const n=e[o];if(!n||!n.prop)continue;let s=n.read;if(!s&&n.type)switch(n.type){case"enum":s=K(n.values,n.fallback);break;case"integer":s=H;break;case"float":s=Q;break;case"boolean":s=V;break;case"list":s=U;break;case"json":s=z;break;case"string":default:s=O;break}s||(s=O),t[n.prop]=[s,o,n.fallback]}return t}function me(e){const t={};for(const o in e){const n=e[o];n&&n.effect&&(t[o]=n.effect)}return Object.keys(t).length?t:null}function ye(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=we,window.lnCore.attrSpec=be,window.lnCore.attrStr=O,window.lnCore.attrInt=H,window.lnCore.attrBool=V,window.lnCore.attrList=U,window.lnCore.attrEnum=K,window.lnCore.attrFloat=Q,window.lnCore.attrJson=z);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(o){console.error("["+t.attribute+"] init failed",e,o)}}}function G(e,t,o,n){if(e.nodeType!==1)return;const l=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",r={selector:t,attribute:o,ComponentFn:n};if(e.matches&&e.matches(l)&&_(e,r),e.querySelectorAll){const c=e.querySelectorAll(l);for(let i=0;i<c.length;i++)_(c[i],r)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ce(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function ve(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function 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 Ae(e){const t=X(),o=e.observed||[];for(let n=0;n<o.length;n++){const s=o[n];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 n in e.attributes){t.byDeclaredAttr.has(n)||t.byDeclaredAttr.set(n,[]);const s=t.byDeclaredAttr.get(n);s.some(l=>l.componentTag===e.componentTag)||s.push({spec:e.attributes[n],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const n=ye(e);if(n===null)t.reactiveWildcard.push(e);else for(const s of n)t.byReactive.has(s)||t.byReactive.set(s,[]),t.byReactive.get(s).push(e)}e.persist&&t.persist.push(e)}function Y(e,t,o,n){for(let s=0;s<e.length;s++){const l=e[s];if(!t[l.attribute])continue;const r=l.effects&&l.effects[o];r?r(t,o,n):l.onAttrChange&&(!l.declared||l.declared.has(o))&&l.onAttrChange(t,o,n)}}function _e(e){const t=e.attributeName,o=t.indexOf("data-ln-")===0,n=X(),s=n.byAttr.get(t),l=N()&&n.byDeclaredAttr&&n.byDeclaredAttr.has(t);if(!o&&!s&&!l)return;const r=e.target;if(e.oldValue!==r.getAttribute(t)){if(l&&x(r)){const c=n.byDeclaredAttr.get(t),i=r.getAttribute(t);for(let u=0;u<c.length;u++)J(c[u].spec,i,t,c[u].componentTag,r)}if(window.lnCore._debugSink&&(o||s)&&window.lnCore._debugSink("attr",t,r,{oldValue:e.oldValue,newValue:r.getAttribute(t)}),o){const c=n.byReactive.get(t);c&&Y(c,r,t,e.oldValue),n.reactiveWildcard.length&&Y(n.reactiveWildcard,r,t,e.oldValue)}if(s)for(let c=0;c<s.length;c++){const i=s[c];if(i.handler){i.handler(r,t,e.oldValue);continue}i.onAttributeChange&&r[i.attribute]?i.onAttributeChange(r,t):(G(r,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(r))}}}function ke(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,k(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{_e(t[o])}catch(n){console.error("[ln-core] mutation handler failed",t[o].target,n)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function T(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function q(e,t){if(!document.contains(e))if(t.attribute){const o=e[t.attribute];if(o&&typeof o.destroy=="function")try{o.destroy()}catch(n){console.error("["+t.attribute+"] destroy failed",e,n)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function xe(e){const t=T();if(t.length){if(e.target)for(let o=0;o<t.length;o++){const n=t[o];if(n.onSubtreeChange&&n.query){const s=n.query,l=e.target.nodeType===1?e.target.matches&&e.target.matches(s)?e.target:e.target.closest?e.target.closest(s):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(s):null;l&&n.onSubtreeChange(l,e)}}for(let o=0;o<e.addedNodes.length;o++){const n=e.addedNodes[o];if(n.nodeType===1){const s=!!(n.firstElementChild||n.children&&n.children.length);for(let l=0;l<t.length;l++){const r=t[l];if(r.selector&&r.attribute&&r.ComponentFn){if(!s)n.matches&&n.matches(r.query)&&_(n,r);else if(n.matches&&n.matches(r.query)&&_(n,r),n.querySelectorAll){const c=n.querySelectorAll(r.query);for(let i=0;i<c.length;i++)_(c[i],r)}}r.onInit&&r.onInit(n)}}}for(let o=0;o<e.removedNodes.length;o++){const n=e.removedNodes[o];if(n.nodeType===1){const s=!!(n.firstElementChild||n.children&&n.children.length);for(let l=0;l<t.length;l++){const r=t[l],c=r.query;if(c){if(!s)n.matches&&n.matches(c)&&q(n,r);else if(n.matches&&n.matches(c)&&q(n,r),n.querySelectorAll){const i=n.querySelectorAll(c);for(let u=0;u<i.length;u++)q(i[u],r)}}}}}}}function Z(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,k(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++){const n=t[o];if(n.type==="childList")try{xe(n)}catch(s){console.error("[ln-core] lifecycle handler failed",n.target,s)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Se(e){T().push(e),Z()}function D(e,t,o,n,s={}){const l=s.extraAttributes||[],r=s.onAttributeChange||null,c=s.onSubtreeChange||null,i=s.onInit||null,u=s.onAttrChange||null,w=s.effects||null,f=s.attributes||null,a=f?me(f):w,p=f?new Set(Object.keys(f)):null,h=s.persist||null;function b(m){const y=m||document.body;if(G(y,e,t,o),f&&N())for(const A in f){const $e=f[A],F=Array.from(y.querySelectorAll("["+A+"]"));y.matches&&y.matches("["+A+"]")&&F.push(y);for(let R=0;R<F.length;R++){const $=F[R];x($)&&J($e,$.getAttribute(A),A,n,$)}}i&&i(y)}const d=[];if(e.indexOf("[")!==-1){const m=/\[([\w-]+)/g;let y;for(;(y=m.exec(e))!==null;)d.push(y[1])}else d.push(e);Ae({selector:e,attribute:t,componentTag:n,attributes:f,ComponentFn:o,onInit:i,observed:d.concat(l),onAttributeChange:r,onAttrChange:u,effects:a,declared:p,persist:h}),ke();const C=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,v=s.subtreeQuery||(C?e:"["+e+"]");T().push({selector:e,attribute:t,ComponentFn:o,onInit:i,onSubtreeChange:c,query:v}),Z(),window[t]=b,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=D,window.lnCore.observeLifecycle=Se);function g(){Ce()>0?ve(function(){b(document.body)}):b(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",g):g(),b}function ee(e){return(e||"").replace(/^#/,"")}function I(e){const t=e===void 0?location.hash:e,o={},n=ee(t);if(!n)return o;const s=n.split("&");for(let l=0;l<s.length;l++){const r=s[l];if(!r)continue;const c=r.indexOf(":"),i=c>-1?r.slice(0,c):r,u=c>-1?r.slice(c+1):"";if(i)try{o[i]=decodeURIComponent(u)}catch{o[i]=u}}return o}function Ee(e){if(!e)return null;const t=I();return e in t?t[e]:null}function Oe(e,t){if(!e)return;const o=I();t==null?delete o[e]:o[e]=String(t);const s=Object.keys(o).map(function(l){const r=o[l];return r===""?l:l+":"+encodeURIComponent(r)}).join("&");ee(location.hash)!==s&&(location.hash=s)}function Le(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Te(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const o=e.getAttribute("data-ln-hash");if(o&&o.trim()!=="")return o.trim();const n=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return n?t?n+"-"+t:n:t||null}function qe(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function De(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Ie(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Fe(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const o=e.slice(0,t),n=e.slice(t+1),s=n?n.split(",").map(function(l){try{return decodeURIComponent(l)}catch{return l}}).filter(Boolean):[];return{key:o,values:s}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=I,window.lnCore.hashGet=Ee,window.lnCore.hashSet=Oe,window.lnCore.hashLinkClick=Le,window.lnCore.resolveHashNamespace=Te,window.lnCore.hashSortEncode=qe,window.lnCore.hashSortDecode=De,window.lnCore.hashFilterEncode=Ie,window.lnCore.hashFilterDecode=Fe);function te(e,t,o,n){const s=n,l=window.innerWidth,r=window.innerHeight,c=t.width,i=t.height,u=(o||"bottom").split("-"),w=u[0],f=u[1]==="start"||u[1]==="end"?u[1]:"center",a={top:["top","bottom","right","left"],bottom:["bottom","top","right","left"],left:["left","right","top","bottom"],right:["right","left","top","bottom"]},p=a[w]||a.bottom;function h(g){return g==="top"||g==="bottom"?f==="start"?e.left:f==="end"?e.right-c:e.left+(e.width-c)/2:f==="start"?e.top:f==="end"?e.bottom-i:e.top+(e.height-i)/2}function b(g){let m,y,A=!0;return g==="top"?(m=e.top-s-i,y=h(g),m<0&&(A=!1)):g==="bottom"?(m=e.bottom+s,y=h(g),m+i>r&&(A=!1)):g==="left"?(m=h(g),y=e.left-s-c,y<0&&(A=!1)):(m=h(g),y=e.right+s,y+c>l&&(A=!1)),{top:m,left:y,side:g,fits:A}}let d=null;for(let g=0;g<p.length;g++){const m=b(p[g]);if(m.fits){d=m;break}}d||(d=b(p[0]));let C=d.top,v=d.left;return c>=l?v=0:(v<0&&(v=0),v+c>l&&(v=l-c)),i>=r?C=0:(C<0&&(C=0),C+i>r&&(C=r-i)),{top:C,left:v,placement:d.side}}function ne(e){if(!e)return{width:0,height:0};const t=e.style,o=t.visibility,n=t.display,s=t.position;t.visibility="hidden",t.display="block",t.position="fixed";const l=e.offsetWidth,r=e.offsetHeight;return t.visibility=o,t.display=n,t.position=s,{width:l,height:r}}function Re(){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=Re),(function(){const e="data-ln-popover",t="lnPopover",o="data-ln-popover-for",n="data-ln-popover-position";if(window[t]!==void 0)return;const s={"data-ln-popover":{type:"enum",values:["open","close"],fallback:"close",effect:f,description:"Control state of the popover"},"data-ln-popover-for":{type:"string",description:"Target element ID that this trigger controls"},"data-ln-popover-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:"bottom",description:"Preferred positioning anchor"},"data-ln-popover-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"}},l=[];let r=null;function c(){r||(r=function(a){if(a.key!=="Escape"||l.length===0)return;l[l.length-1].close()},document.addEventListener("keydown",r))}function i(){l.length>0||r&&(document.removeEventListener("keydown",r),r=null)}function u(a){this.dom=a,this.isOpen=a.getAttribute(e)==="open",this.trigger=null,this._previousFocus=null,this._boundDocClick=null,this._docClickTimeout=null,this._boundReposition=null;const p=this;return this._onRequestOpen=function(h){const b=h.detail&&h.detail.trigger?h.detail.trigger:null;p.open(b)},this._onRequestClose=function(){p.close()},this._onRequestToggle=function(h){const b=h.detail&&h.detail.trigger?h.detail.trigger:null;p.toggle(b)},this._onNativeToggle=function(h){h.newState==="closed"&&p.isOpen&&(p._applyClose(),p.dom.setAttribute(e,"closed"))},a.addEventListener("ln-popover:request-open",this._onRequestOpen),a.addEventListener("ln-popover:request-close",this._onRequestClose),a.addEventListener("ln-popover:request-toggle",this._onRequestToggle),a.addEventListener("toggle",this._onNativeToggle),a.hasAttribute("tabindex")||a.setAttribute("tabindex","-1"),a.hasAttribute("role")||a.setAttribute("role","dialog"),a.hasAttribute("popover")||a.setAttribute("popover","manual"),this.isOpen&&this._applyOpen(null),this}u.prototype.open=function(a){this.isOpen||(this.trigger=a||null,this.dom.setAttribute(e,"open"))},u.prototype.close=function(){this.isOpen&&this.dom.setAttribute(e,"closed")},u.prototype.toggle=function(a){this.isOpen?this.close():this.open(a)},u.prototype._applyOpen=function(a){this.isOpen=!0,a&&(this.trigger=a),this._previousFocus=document.activeElement,typeof this.dom.showPopover=="function"&&this.dom.showPopover();const p=ne(this.dom);if(this.trigger){const C=this.trigger.getBoundingClientRect(),v=this.dom.getAttribute(n)||"bottom",g=te(C,p,v,8);this.dom.style.top=g.top+"px",this.dom.style.left=g.left+"px",this.dom.setAttribute("data-ln-popover-placement",g.placement),this.trigger.setAttribute("aria-expanded","true")}const h=this.dom.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),b=Array.prototype.find.call(h,oe);b?b.focus():this.dom.focus();const d=this;this._boundDocClick=function(C){d.dom.contains(C.target)||d.trigger&&d.trigger.contains(C.target)||d.close()},d._docClickTimeout=setTimeout(function(){d._docClickTimeout=null,document.addEventListener("click",d._boundDocClick)},0),this._boundReposition=function(){if(!d.trigger)return;const C=d.trigger.getBoundingClientRect(),v=ne(d.dom),g=d.dom.getAttribute(n)||"bottom",m=te(C,v,g,8);d.dom.style.top=m.top+"px",d.dom.style.left=m.left+"px",d.dom.setAttribute("data-ln-popover-placement",m.placement)},window.addEventListener("scroll",this._boundReposition,{passive:!0,capture:!0}),window.addEventListener("resize",this._boundReposition),l.push(this),c(),S(this.dom,"ln-popover:open",{popoverId:this.dom.id,target:this.dom,trigger:this.trigger})},u.prototype._applyClose=function(){this.isOpen=!1,this._docClickTimeout&&(clearTimeout(this._docClickTimeout),this._docClickTimeout=null),this._boundDocClick&&(document.removeEventListener("click",this._boundDocClick),this._boundDocClick=null),this._boundReposition&&(window.removeEventListener("scroll",this._boundReposition,{capture:!0}),window.removeEventListener("resize",this._boundReposition),this._boundReposition=null),this.dom.style.top="",this.dom.style.left="",this.dom.removeAttribute("data-ln-popover-placement"),this.trigger&&this.trigger.setAttribute("aria-expanded","false"),typeof this.dom.hidePopover=="function"&&this.dom.matches(":popover-open")&&this.dom.hidePopover();const a=l.indexOf(this);a!==-1&&l.splice(a,1),i(),this._previousFocus&&this.trigger&&this._previousFocus===this.trigger?this.trigger.focus():this.trigger&&document.activeElement===document.body&&this.trigger.focus(),this._previousFocus=null,S(this.dom,"ln-popover:close",{popoverId:this.dom.id,target:this.dom,trigger:this.trigger}),this.trigger=null},u.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-popover:request-open",this._onRequestOpen),this.dom.removeEventListener("ln-popover:request-close",this._onRequestClose),this.dom.removeEventListener("ln-popover:request-toggle",this._onRequestToggle),this.dom.removeEventListener("toggle",this._onNativeToggle),this.isOpen&&this._applyClose(),delete this.dom[t])};function w(a){this.dom=a;const p=a.getAttribute(o);return a.setAttribute("aria-haspopup","dialog"),a.setAttribute("aria-expanded","false"),a.setAttribute("aria-controls",p),this._onClick=function(h){if(h.ctrlKey||h.metaKey||h.button===1)return;h.preventDefault();const b=document.getElementById(p);if(!b)return;b[t]&&(b[t].trigger=a);const d=b.getAttribute(e);b.setAttribute(e,d==="open"?"closed":"open")},a.addEventListener("click",this._onClick),this}w.prototype.destroy=function(){this.dom.removeEventListener("click",this._onClick),delete this.dom[t+"Trigger"]};function f(a){const p=a[t];if(!p)return;const b=a.getAttribute(e)==="open";if(b!==p.isOpen)if(b){if(B(a,"ln-popover:before-open",{popoverId:a.id,target:a,trigger:p.trigger}).defaultPrevented){a.setAttribute(e,"closed");return}p._applyOpen(p.trigger)}else{if(B(a,"ln-popover:before-close",{popoverId:a.id,target:a,trigger:p.trigger}).defaultPrevented){a.setAttribute(e,"open");return}p._applyClose()}}D(e,t,u,"ln-popover",{attributes:s}),D(o,t+"Trigger",w,"ln-popover-trigger")})()})();
1
+ (function(){"use strict";function M(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function 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 s=null;for(let r=1;r<t.length;r++)if(t[r]&&t[r].nodeType===1){s=t[r];break}if(!E(s))return}e.apply(console,t)}}function S(e,t,o){const s=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,s),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:s}))}function j(e,t,o){const s=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,s);const r=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:s});return e.dispatchEvent(r),r}function x(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){x(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function re(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function se(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function le(e,t){const o=!!(t&&t.typed),s=t&&t.exclude,r={},l=e.elements,i={};if(o)for(let c=0;c<l.length;c++){const n=l[c];n.name&&n.type==="checkbox"&&!n.disabled&&(i[n.name]=(i[n.name]||0)+1)}for(let c=0;c<l.length;c++){const n=l[c];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(s&&n.matches&&n.matches(s)))if(n.type==="checkbox")o&&i[n.name]===1?r[n.name]=n.checked:(r[n.name]||(r[n.name]=[]),n.checked&&r[n.name].push(n.value));else if(n.type==="radio")n.checked&&(r[n.name]=n.value);else if(n.type==="select-multiple"){r[n.name]=[];for(let u=0;u<n.options.length;u++)n.options[u].selected&&r[n.name].push(n.options[u].value)}else if(o&&n.type==="hidden")r[n.name]=n.value;else if(o&&(n.type==="number"||n.type==="range")){const u=Number(n.value);r[n.name]=n.value===""||isNaN(u)?null:u}else r[n.name]=n.value}return r}function ce(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ue(e,t){const o=e.elements,s=[],r={};for(let l=0;l<o.length;l++){const i=o[l];i.name&&i.type==="checkbox"&&(r[i.name]=(r[i.name]||0)+1)}for(let l=0;l<o.length;l++){const i=o[l];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const c=i.getAttribute("data-ln-fill-as")||i.name;if(!c||!(c in t))continue;const n=t[c];if(i.type==="checkbox"){if(Array.isArray(n))i.checked=n.indexOf(i.value)!==-1;else if(r[i.name]>1){const u=String(n).split(",").map(function(p){return p.trim()});i.checked=u.indexOf(i.value)!==-1}else i.checked=ce(n);s.push(i)}else if(i.type==="radio")i.checked=i.value===String(n),s.push(i);else if(i.type==="select-multiple"){if(Array.isArray(n))for(let u=0;u<i.options.length;u++)i.options[u].selected=n.indexOf(i.options[u].value)!==-1;s.push(i)}else i.value=n,i.tagName==="SELECT"&&n!=null&&i.setAttribute("data-ln-value",n),s.push(i)}return s}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ue,window.lnCore.serializeForm=le,window.lnCore.resolveFormMethod=se);const W={};function ae(e,t){W[e]=t}function de(e){return W[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ae,window.lnCore.getDataMapper=de);function fe(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,x(function(){new MutationObserver(function(){S(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const P={};function pe(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];P[o]=t}function he(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return P[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=pe,window.lnCore.getLocaleFallback=he,window.lnCore.ensureLocaleObserver=fe);const O={};function ge(e,t){O[e]||(O[e]=document.querySelector('[data-ln-template="'+e+'"]'));const o=O[e];return o?o.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function H(e,t){if(!e||!t)return e;const o=e.querySelectorAll("[data-ln-field]");for(let i=0;i<o.length;i++){const c=o[i],n=c.getAttribute("data-ln-field");t[n]!=null&&(c.textContent=t[n])}const s=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<s.length;i++){const c=s[i],n=c.getAttribute("data-ln-attr").split(",");for(let u=0;u<n.length;u++){const p=n[u].trim().split(":");if(p.length!==2)continue;const f=p[0].trim(),a=p[1].trim();t[a]!=null&&c.setAttribute(f,t[a])}}const r=e.querySelectorAll("[data-ln-show]");for(let i=0;i<r.length;i++){const c=r[i],n=c.getAttribute("data-ln-show");n in t&&c.classList.toggle("hidden",!t[n])}const l=e.querySelectorAll("[data-ln-class]");for(let i=0;i<l.length;i++){const c=l[i],n=c.getAttribute("data-ln-class").split(",");for(let u=0;u<n.length;u++){const p=n[u].trim().split(":");if(p.length!==2)continue;const f=p[0].trim(),a=p[1].trim();a in t&&c.classList.toggle(f,!!t[a])}}return e}function we(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const o=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let s=0;s<o.length;s++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",o[s],t??null),o[s].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)H(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 V(e,t){if(!e||!t)return e;const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const l=o.currentNode;l.textContent.indexOf("{{")!==-1&&(l.textContent=l.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,c){return t[c]!==void 0?t[c]:""}))}const s=function(l,i){return t[i]!==void 0?t[i]:""},r=Array.from(e.querySelectorAll("*"));e.nodeType===1&&r.push(e);for(let l=0;l<r.length;l++){const i=r[l],c=i.attributes;for(let n=0;n<c.length;n++){const u=c[n];u.value.indexOf("{{")!==-1&&i.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,s))}}return e}function be(e,t,o,s,r,l){const i={};for(let n=0;n<e.children.length;n++){const u=e.children[n],p=u.getAttribute("data-ln-render-key");p&&(i[p]=u)}const c=document.createDocumentFragment();for(let n=0;n<t.length;n++){const u=t[n],p=String(s(u));let f=i[p];if(f)r(f,u,n);else{const a=ge(o,l);if(!a||(V(a,u),f=a.firstElementChild,!f))continue;f.setAttribute("data-ln-render-key",p),r(f,u,n)}c.appendChild(f)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=V,window.lnCore.fill=H,window.lnCore.lnFill=we,window.lnCore.renderList=be);function L(e,t,o){const s=e.getAttribute(t);return s===null?o:s}function U(e,t,o){const s=parseInt(e.getAttribute(t),10);return isNaN(s)?o:s}function K(e,t,o=!1){const s=e.getAttribute(t);if(s===null)return!!o;const r=s.trim().toLowerCase();return!(r==="false"||r==="0")}function Q(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const T=new Map;function z(e,t){const o=(e?e.join("|"):"")+"::"+t;if(T.has(o))return T.get(o);const s=new Set(e||[]),r=function(l,i){const c=l.getAttribute(i);return c!==null&&s.has(c)?c:t};return T.set(o,r),r}function J(e,t,o){const s=parseFloat(e.getAttribute(t));return isNaN(s)?o:s}function G(e,t,o){const s=e.getAttribute(t);if(!s)return o;try{return JSON.parse(s)}catch{return o}}function X(e,t,o,s,r){if(!e||t===null)return!0;const l=s||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const c=n=>{r?console.warn(n,r):console.warn(n)};if(i==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(c(`[${l}] Invalid value "${t}" for boolean attribute "${o}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const n=e.values||[];return n.includes(t)?!0:(c(`[${l}] Invalid value "${t}" for attribute "${o}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return c(`[${l}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(c(`[${l}] Value ${n} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(c(`[${l}] Value ${n} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(c(`[${l}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(n){return c(`[${l}] Invalid JSON for attribute "${o}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function me(e,t,o){for(const s in o){const[r,l,i]=o[s];Object.defineProperty(e,s,{get:function(){return r(t,l,i)},enumerable:!0,configurable:!0})}return e}function ye(e){const t={};for(const o in e){const s=e[o];if(!s||!s.prop)continue;let r=s.read;if(!r&&s.type)switch(s.type){case"enum":r=z(s.values,s.fallback);break;case"integer":r=U;break;case"float":r=J;break;case"boolean":r=K;break;case"list":r=Q;break;case"json":r=G;break;case"string":default:r=L;break}r||(r=L),t[s.prop]=[r,o,s.fallback]}return t}function Ce(e){const t={};for(const o in e){const s=e[o];s&&s.effect&&(t[o]=s.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 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=me,window.lnCore.attrSpec=ye,window.lnCore.attrStr=L,window.lnCore.attrInt=U,window.lnCore.attrBool=K,window.lnCore.attrList=Q,window.lnCore.attrEnum=z,window.lnCore.attrFloat=J,window.lnCore.attrJson=G);function A(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(o){console.error("["+t.attribute+"] init failed",e,o)}}}function Y(e,t,o,s){if(e.nodeType!==1)return;const l=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:o,ComponentFn:s};if(e.matches&&e.matches(l)&&A(e,i),e.querySelectorAll){const c=e.querySelectorAll(l);for(let n=0;n<c.length;n++)A(c[n],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function _e(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Ae(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 ke(e){const t=Z(),o=e.observed||[];for(let s=0;s<o.length;s++){const r=o[s];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 s in e.attributes){t.byDeclaredAttr.has(s)||t.byDeclaredAttr.set(s,[]);const r=t.byDeclaredAttr.get(s);r.some(l=>l.componentTag===e.componentTag)||r.push({spec:e.attributes[s],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const s=ve(e);if(s===null)t.reactiveWildcard.push(e);else for(const r of s)t.byReactive.has(r)||t.byReactive.set(r,[]),t.byReactive.get(r).push(e)}e.persist&&t.persist.push(e)}function ee(e,t,o,s){for(let r=0;r<e.length;r++){const l=e[r];if(!t[l.attribute])continue;const i=l.effects&&l.effects[o];i?i(t,o,s):l.onAttrChange&&(!l.declared||l.declared.has(o))&&l.onAttrChange(t,o,s)}}function xe(e){const t=e.attributeName,o=t.indexOf("data-ln-")===0,s=Z(),r=s.byAttr.get(t),l=M()&&s.byDeclaredAttr&&s.byDeclaredAttr.has(t);if(!o&&!r&&!l)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(l&&E(i)){const c=s.byDeclaredAttr.get(t),n=i.getAttribute(t);for(let u=0;u<c.length;u++)X(c[u].spec,n,t,c[u].componentTag,i)}if(window.lnCore._debugSink&&(o||r)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),o){const c=s.byReactive.get(t);c&&ee(c,i,t,e.oldValue),s.reactiveWildcard.length&&ee(s.reactiveWildcard,i,t,e.oldValue)}if(r)for(let c=0;c<r.length;c++){const n=r[c];if(n.handler){n.handler(i,t,e.oldValue);continue}n.onAttributeChange&&i[n.attribute]?n.onAttributeChange(i,t):(Y(i,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(i))}}}function Ee(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,x(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{xe(t[o])}catch(s){console.error("[ln-core] mutation handler failed",t[o].target,s)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function R(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function q(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function D(e,t){if(!document.contains(e))if(t.attribute){const o=e[t.attribute];if(o&&typeof o.destroy=="function")try{o.destroy()}catch(s){console.error("["+t.attribute+"] destroy failed",e,s)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function Se(e){const t=R();if(!t.length)return;const o=e.target;if(o){const r=o.nodeType===1?o:o.parentElement;if(r&&(r.isContentEditable||r.closest&&r.closest('[contenteditable]:not([contenteditable="false"])')))return}const s=q();if(e.target&&s.length)for(let r=0;r<s.length;r++){const l=s[r],i=l.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(i)?e.target:e.target.closest?e.target.closest(i):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(i):null;c&&l.onSubtreeChange(c,e)}for(let r=0;r<e.addedNodes.length;r++){const l=e.addedNodes[r];if(l.nodeType===1){const i=!!(l.firstElementChild||l.children&&l.children.length);for(let c=0;c<t.length;c++){const n=t[c];if(n.selector&&n.attribute&&n.ComponentFn){if(!i)l.matches&&l.matches(n.query)&&A(l,n);else if(l.matches&&l.matches(n.query)&&A(l,n),l.querySelectorAll){const u=l.querySelectorAll(n.query);for(let p=0;p<u.length;p++)A(u[p],n)}}n.onInit&&n.onInit(l)}}}for(let r=0;r<e.removedNodes.length;r++){const l=e.removedNodes[r];if(l.nodeType===1){const i=!!(l.firstElementChild||l.children&&l.children.length);for(let c=0;c<t.length;c++){const n=t[c],u=n.query;if(u){if(!i)l.matches&&l.matches(u)&&D(l,n);else if(l.matches&&l.matches(u)&&D(l,n),l.querySelectorAll){const p=l.querySelectorAll(u);for(let f=0;f<p.length;f++)D(p[f],n)}}}}}}function te(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,x(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++){const s=t[o];if(s.type==="childList")try{Se(s)}catch(r){console.error("[ln-core] lifecycle handler failed",s.target,r)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Oe(e){R().push(e),e.onSubtreeChange&&e.query&&q().push(e),te()}function I(e,t,o,s,r={}){const l=r.extraAttributes||[],i=r.onAttributeChange||null,c=r.onSubtreeChange||null,n=r.onInit||null,u=r.onAttrChange||null,p=r.effects||null,f=r.attributes||null,a=f?Ce(f):p,h=f?new Set(Object.keys(f)):null,g=r.persist||null;function b(v){const y=v||document.body;if(Y(y,e,t,o),f&&M())for(const k in f){const Be=f[k],$=Array.from(y.querySelectorAll("["+k+"]"));y.matches&&y.matches("["+k+"]")&&$.push(y);for(let N=0;N<$.length;N++){const B=$[N];E(B)&&X(Be,B.getAttribute(k),k,s,B)}}n&&n(y)}const d=[];if(e.indexOf("[")!==-1){const v=/\[([\w-]+)/g;let y;for(;(y=v.exec(e))!==null;)d.push(y[1])}else d.push(e);ke({selector:e,attribute:t,componentTag:s,attributes:f,ComponentFn:o,onInit:n,observed:d.concat(l),onAttributeChange:i,onAttrChange:u,effects:a,declared:h,persist:g}),Ee();const C=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,_=r.subtreeQuery||(C?e:"["+e+"]"),w={selector:e,attribute:t,ComponentFn:o,onInit:n,onSubtreeChange:c,query:_};R().push(w),c&&_&&q().push(w),te(),window[t]=b,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=I,window.lnCore.observeLifecycle=Oe);function m(){_e()>0?Ae(function(){b(document.body)}):b(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",m):m(),b}function ne(e){return(e||"").replace(/^#/,"")}function F(e){const t=e===void 0?location.hash:e,o={},s=ne(t);if(!s)return o;const r=s.split("&");for(let l=0;l<r.length;l++){const i=r[l];if(!i)continue;const c=i.indexOf(":"),n=c>-1?i.slice(0,c):i,u=c>-1?i.slice(c+1):"";if(n)try{o[n]=decodeURIComponent(u)}catch{o[n]=u}}return o}function Le(e){if(!e)return null;const t=F();return e in t?t[e]:null}function Te(e,t){if(!e)return;const o=F();t==null?delete o[e]:o[e]=String(t);const r=Object.keys(o).map(function(l){const i=o[l];return i===""?l:l+":"+encodeURIComponent(i)}).join("&");ne(location.hash)!==r&&(location.hash=r)}function Re(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function qe(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const o=e.getAttribute("data-ln-hash");if(o&&o.trim()!=="")return o.trim();const s=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return s?t?s+"-"+t:s:t||null}function De(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Ie(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Fe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function $e(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const o=e.slice(0,t),s=e.slice(t+1),r=s?s.split(",").map(function(l){try{return decodeURIComponent(l)}catch{return l}}).filter(Boolean):[];return{key:o,values:r}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=F,window.lnCore.hashGet=Le,window.lnCore.hashSet=Te,window.lnCore.hashLinkClick=Re,window.lnCore.resolveHashNamespace=qe,window.lnCore.hashSortEncode=De,window.lnCore.hashSortDecode=Ie,window.lnCore.hashFilterEncode=Fe,window.lnCore.hashFilterDecode=$e);function oe(e,t,o,s){const r=s,l=window.innerWidth,i=window.innerHeight,c=t.width,n=t.height,u=(o||"bottom").split("-"),p=u[0],f=u[1]==="start"||u[1]==="end"?u[1]:"center",a={top:["top","bottom","right","left"],bottom:["bottom","top","right","left"],left:["left","right","top","bottom"],right:["right","left","top","bottom"]},h=a[p]||a.bottom;function g(w){return w==="top"||w==="bottom"?f==="start"?e.left:f==="end"?e.right-c:e.left+(e.width-c)/2:f==="start"?e.top:f==="end"?e.bottom-n:e.top+(e.height-n)/2}function b(w){let m,v,y=!0;return w==="top"?(m=e.top-r-n,v=g(w),m<0&&(y=!1)):w==="bottom"?(m=e.bottom+r,v=g(w),m+n>i&&(y=!1)):w==="left"?(m=g(w),v=e.left-r-c,v<0&&(y=!1)):(m=g(w),v=e.right+r,v+c>l&&(y=!1)),{top:m,left:v,side:w,fits:y}}let d=null;for(let w=0;w<h.length;w++){const m=b(h[w]);if(m.fits){d=m;break}}d||(d=b(h[0]));let C=d.top,_=d.left;return c>=l?_=0:(_<0&&(_=0),_+c>l&&(_=l-c)),n>=i?C=0:(C<0&&(C=0),C+n>i&&(C=i-n)),{top:C,left:_,placement:d.side}}function ie(e){if(!e)return{width:0,height:0};const t=e.style,o=t.visibility,s=t.display,r=t.position;t.visibility="hidden",t.display="block",t.position="fixed";const l=e.offsetWidth,i=e.offsetHeight;return t.visibility=o,t.display=s,t.position=r,{width:l,height:i}}function Ne(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Ne),(function(){const e="data-ln-popover",t="lnPopover",o="data-ln-popover-for",s="data-ln-popover-position";if(window[t]!==void 0)return;const r={"data-ln-popover":{type:"enum",values:["open","close"],fallback:"close",effect:f,description:"Control state of the popover"},"data-ln-popover-for":{type:"string",description:"Target element ID that this trigger controls"},"data-ln-popover-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:"bottom",description:"Preferred positioning anchor"},"data-ln-popover-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"}},l=[];let i=null;function c(){i||(i=function(a){if(a.key!=="Escape"||l.length===0)return;l[l.length-1].close()},document.addEventListener("keydown",i))}function n(){l.length>0||i&&(document.removeEventListener("keydown",i),i=null)}function u(a){this.dom=a,this.isOpen=a.getAttribute(e)==="open",this.trigger=null,this._previousFocus=null,this._boundDocClick=null,this._docClickTimeout=null,this._boundReposition=null;const h=this;return this._onRequestOpen=function(g){const b=g.detail&&g.detail.trigger?g.detail.trigger:null;h.open(b)},this._onRequestClose=function(){h.close()},this._onRequestToggle=function(g){const b=g.detail&&g.detail.trigger?g.detail.trigger:null;h.toggle(b)},this._onNativeToggle=function(g){g.newState==="closed"&&h.isOpen&&(h._applyClose(),h.dom.setAttribute(e,"closed"))},a.addEventListener("ln-popover:request-open",this._onRequestOpen),a.addEventListener("ln-popover:request-close",this._onRequestClose),a.addEventListener("ln-popover:request-toggle",this._onRequestToggle),a.addEventListener("toggle",this._onNativeToggle),a.hasAttribute("tabindex")||a.setAttribute("tabindex","-1"),a.hasAttribute("role")||a.setAttribute("role","dialog"),a.hasAttribute("popover")||a.setAttribute("popover","manual"),this.isOpen&&this._applyOpen(null),this}u.prototype.open=function(a){this.isOpen||(this.trigger=a||null,this.dom.setAttribute(e,"open"))},u.prototype.close=function(){this.isOpen&&this.dom.setAttribute(e,"closed")},u.prototype.toggle=function(a){this.isOpen?this.close():this.open(a)},u.prototype._applyOpen=function(a){this.isOpen=!0,a&&(this.trigger=a),this._previousFocus=document.activeElement,typeof this.dom.showPopover=="function"&&this.dom.showPopover();const h=ie(this.dom);if(this.trigger){const C=this.trigger.getBoundingClientRect(),_=this.dom.getAttribute(s)||"bottom",w=oe(C,h,_,8);this.dom.style.top=w.top+"px",this.dom.style.left=w.left+"px",this.dom.setAttribute("data-ln-popover-placement",w.placement),this.trigger.setAttribute("aria-expanded","true")}const g=this.dom.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),b=Array.prototype.find.call(g,re);b?b.focus():this.dom.focus();const d=this;this._boundDocClick=function(C){d.dom.contains(C.target)||d.trigger&&d.trigger.contains(C.target)||d.close()},d._docClickTimeout=setTimeout(function(){d._docClickTimeout=null,document.addEventListener("click",d._boundDocClick)},0),this._repositionRaf=null,this._performReposition=function(){if(!d.trigger||!document.contains(d.dom))return;const C=d.trigger.getBoundingClientRect(),_=ie(d.dom),w=d.dom.getAttribute(s)||"bottom",m=oe(C,_,w,8),v=m.top+"px",y=m.left+"px";d.dom.style.top!==v&&(d.dom.style.top=v),d.dom.style.left!==y&&(d.dom.style.left=y),d.dom.getAttribute("data-ln-popover-placement")!==m.placement&&d.dom.setAttribute("data-ln-popover-placement",m.placement)},this._boundReposition=function(){d._repositionRaf||(d._repositionRaf=requestAnimationFrame(function(){d._repositionRaf=null,d._performReposition()}))},window.addEventListener("scroll",this._boundReposition,{passive:!0,capture:!0}),window.addEventListener("resize",this._boundReposition),l.push(this),c(),S(this.dom,"ln-popover:open",{popoverId:this.dom.id,target:this.dom,trigger:this.trigger})},u.prototype._applyClose=function(){this.isOpen=!1,this._repositionRaf&&(cancelAnimationFrame(this._repositionRaf),this._repositionRaf=null),this._docClickTimeout&&(clearTimeout(this._docClickTimeout),this._docClickTimeout=null),this._boundDocClick&&(document.removeEventListener("click",this._boundDocClick),this._boundDocClick=null),this._boundReposition&&(window.removeEventListener("scroll",this._boundReposition,{capture:!0}),window.removeEventListener("resize",this._boundReposition),this._boundReposition=null),this.dom.style.top="",this.dom.style.left="",this.dom.removeAttribute("data-ln-popover-placement"),this.trigger&&this.trigger.setAttribute("aria-expanded","false"),typeof this.dom.hidePopover=="function"&&this.dom.matches(":popover-open")&&this.dom.hidePopover();const a=l.indexOf(this);a!==-1&&l.splice(a,1),n(),this._previousFocus&&this.trigger&&this._previousFocus===this.trigger?this.trigger.focus():this.trigger&&document.activeElement===document.body&&this.trigger.focus(),this._previousFocus=null,S(this.dom,"ln-popover:close",{popoverId:this.dom.id,target:this.dom,trigger:this.trigger}),this.trigger=null},u.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-popover:request-open",this._onRequestOpen),this.dom.removeEventListener("ln-popover:request-close",this._onRequestClose),this.dom.removeEventListener("ln-popover:request-toggle",this._onRequestToggle),this.dom.removeEventListener("toggle",this._onNativeToggle),this.isOpen&&this._applyClose(),delete this.dom[t])};function p(a){this.dom=a;const h=a.getAttribute(o);return a.setAttribute("aria-haspopup","dialog"),a.setAttribute("aria-expanded","false"),a.setAttribute("aria-controls",h),this._onClick=function(g){if(g.ctrlKey||g.metaKey||g.button===1)return;g.preventDefault();const b=document.getElementById(h);if(!b)return;b[t]&&(b[t].trigger=a);const d=b.getAttribute(e);b.setAttribute(e,d==="open"?"closed":"open")},a.addEventListener("click",this._onClick),this}p.prototype.destroy=function(){this.dom.removeEventListener("click",this._onClick),delete this.dom[t+"Trigger"]};function f(a){const h=a[t];if(!h)return;const b=a.getAttribute(e)==="open";if(b!==h.isOpen)if(b){if(j(a,"ln-popover:before-open",{popoverId:a.id,target:a,trigger:h.trigger}).defaultPrevented){a.setAttribute(e,"closed");return}h._applyOpen(h.trigger)}else{if(j(a,"ln-popover:before-close",{popoverId:a.id,target:a,trigger:h.trigger}).defaultPrevented){a.setAttribute(e,"open");return}h._applyClose()}}I(e,t,u,"ln-popover",{attributes:r}),I(o,t+"Trigger",p,"ln-popover-trigger")})()})();