@livenetworks/ashlar 2.1.11 → 2.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -2
- package/components/COMPONENTS.md +82 -78
- package/components/ln-accordion/ln-accordion.js +1 -1
- package/components/ln-ajax/ln-ajax.js +1 -1
- package/components/ln-api-connector/ln-api-connector.js +1 -1
- package/components/ln-api-queue/ln-api-queue.js +1 -1
- package/components/ln-autosave/ln-autosave.js +1 -1
- package/components/ln-chart/ln-chart.js +1 -1
- package/components/ln-circular-progress/ln-circular-progress.js +1 -1
- package/components/ln-confirm/ln-confirm.js +1 -1
- package/components/ln-core/README.md +25 -69
- package/components/ln-core/events.js +5 -2
- package/components/ln-core/index.js +1 -1
- package/components/ln-core/lifecycle.js +25 -44
- package/components/ln-core/reactive.js +0 -59
- package/components/ln-couchdb-connector/ln-couchdb-connector.js +1 -1
- package/components/ln-data-coordinator/ln-data-coordinator.js +1 -1
- package/components/ln-data-store/ln-data-store.js +1 -1
- package/components/ln-date/ln-date.js +1 -1
- package/components/ln-debug/ln-debug.js +1 -1
- package/components/ln-debug/ln-debug.schema.json +28 -28
- package/components/ln-debug/src/debug-verifier.js +24 -30
- package/components/ln-debug/src/ln-debug.js +3 -11
- package/components/ln-dropdown/ln-dropdown.js +1 -1
- package/components/ln-editor/ln-editor.js +1 -1
- package/components/ln-external-links/ln-external-links.js +1 -1
- package/components/ln-filter/ln-filter.js +1 -1
- package/components/ln-filter/src/ln-filter.js +3 -1
- package/components/ln-form/ln-form.js +1 -1
- package/components/ln-icon/ln-icon.js +1 -1
- package/components/ln-include/ln-include.js +1 -1
- package/components/ln-key/ln-key.js +1 -1
- package/components/ln-link/ln-link.js +1 -1
- package/components/ln-list/ln-list.js +1 -1
- package/components/ln-modal/ln-modal.js +1 -1
- package/components/ln-nav/ln-nav.js +1 -1
- package/components/ln-number/ln-number.js +1 -1
- package/components/ln-obfuscator/ln-obfuscator.js +1 -1
- package/components/ln-options/ln-options.js +1 -1
- package/components/ln-persist/ln-persist.js +1 -1
- package/components/ln-picklist/ln-picklist.js +1 -1
- package/components/ln-popover/ln-popover.js +1 -1
- package/components/ln-progress/ln-progress.js +1 -1
- package/components/ln-router/ln-router.js +1 -1
- package/components/ln-scroll/ln-scroll.js +1 -1
- package/components/ln-search/ln-search.js +1 -1
- package/components/ln-slug/ln-slug.js +1 -1
- package/components/ln-sort/ln-sort.js +1 -1
- package/components/ln-sortable/ln-sortable.js +1 -1
- package/components/ln-stat/ln-stat.js +1 -1
- package/components/ln-table/ln-table.js +1 -1
- package/components/ln-table-coordinator/ln-table-coordinator.js +1 -1
- package/components/ln-tabs/ln-tabs.js +1 -1
- package/components/ln-time/ln-time.js +1 -1
- package/components/ln-toast/ln-toast.js +1 -1
- package/components/ln-toggle/ln-toggle.js +1 -1
- package/components/ln-tooltip/ln-tooltip.js +1 -1
- package/components/ln-translations/ln-translations.js +1 -1
- package/components/ln-ui-coordinator/ln-ui-coordinator.js +1 -1
- package/components/ln-upload/ln-upload.js +1 -1
- package/components/ln-validate/ln-validate.js +1 -1
- package/components/ln-websocket-connector/ln-websocket-connector.js +1 -1
- package/package.json +95 -85
- package/theme/README.md +73 -0
- package/theme/components/_table.scss +1 -2
- package/theme/config/_density.scss +104 -191
- package/theme/config/mixins/_avatar.scss +2 -2
- package/theme/config/mixins/_card.scss +2 -5
- package/theme/config/mixins/_form.scss +26 -39
- package/theme/config/mixins/_nav.scss +4 -4
- package/theme/config/mixins/_spacing.scss +4 -4
- package/theme/config/mixins/_table.scss +9 -33
- package/theme/tailwind/components.css +1661 -0
- package/theme/tailwind/entry.css +3 -0
- package/theme/tailwind/theme.css +23 -0
- package/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";function J(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function B(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let o=null;for(let i=1;i<t.length;i++)if(t[i]&&t[i].nodeType===1){o=t[i];break}if(!B(o))return}e.apply(console,t)}}function ye(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function me(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o);const i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:o});return e.dispatchEvent(i),i}function O(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){O(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 Ae(e,t){const n=!!(t&&t.typed),o=t&&t.exclude,i={},s=e.elements,l={};if(n)for(let c=0;c<s.length;c++){const r=s[c];r.name&&r.type==="checkbox"&&!r.disabled&&(l[r.name]=(l[r.name]||0)+1)}for(let c=0;c<s.length;c++){const r=s[c];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(o&&r.matches&&r.matches(o)))if(r.type==="checkbox")n&&l[r.name]===1?i[r.name]=r.checked:(i[r.name]||(i[r.name]=[]),r.checked&&i[r.name].push(r.value));else if(r.type==="radio")r.checked&&(i[r.name]=r.value);else if(r.type==="select-multiple"){i[r.name]=[];for(let f=0;f<r.options.length;f++)r.options[f].selected&&i[r.name].push(r.options[f].value)}else if(n&&r.type==="hidden")i[r.name]=r.value;else if(n&&(r.type==="number"||r.type==="range")){const f=Number(r.value);i[r.name]=r.value===""||isNaN(f)?null:f}else i[r.name]=r.value}return i}function _e(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function Se(e,t){const n=e.elements,o=[],i={};for(let s=0;s<n.length;s++){const l=n[s];l.name&&l.type==="checkbox"&&(i[l.name]=(i[l.name]||0)+1)}for(let s=0;s<n.length;s++){const l=n[s];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const c=l.getAttribute("data-ln-fill-as")||l.name;if(!c||!(c in t))continue;const r=t[c];if(l.type==="checkbox"){if(Array.isArray(r))l.checked=r.indexOf(l.value)!==-1;else if(i[l.name]>1){const f=String(r).split(",").map(function(w){return w.trim()});l.checked=f.indexOf(l.value)!==-1}else l.checked=_e(r);o.push(l)}else if(l.type==="radio")l.checked=l.value===String(r),o.push(l);else if(l.type==="select-multiple"){if(Array.isArray(r))for(let f=0;f<l.options.length;f++)l.options[f].selected=r.indexOf(l.options[f].value)!==-1;o.push(l)}else l.value=r,l.tagName==="SELECT"&&r!=null&&l.setAttribute("data-ln-value",r),o.push(l)}return o}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=Se,window.lnCore.serializeForm=Ae,window.lnCore.resolveFormMethod=Ce);const G={};function ve(e,t){G[e]=t}function xe(e){return G[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ve,window.lnCore.getDataMapper=xe);function Ee(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,O(function(){new MutationObserver(function(){ye(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const X={};function qe(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];X[n]=t}function ke(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return X[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=qe,window.lnCore.getLocaleFallback=ke,window.lnCore.ensureLocaleObserver=Ee);const N={};function Te(e,t){N[e]||(N[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=N[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function Y(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let l=0;l<n.length;l++){const c=n[l],r=c.getAttribute("data-ln-field");t[r]!=null&&(c.textContent=t[r])}const o=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<o.length;l++){const c=o[l],r=c.getAttribute("data-ln-attr").split(",");for(let f=0;f<r.length;f++){const w=r[f].trim().split(":");if(w.length!==2)continue;const p=w[0].trim(),C=w[1].trim();t[C]!=null&&c.setAttribute(p,t[C])}}const i=e.querySelectorAll("[data-ln-show]");for(let l=0;l<i.length;l++){const c=i[l],r=c.getAttribute("data-ln-show");r in t&&c.classList.toggle("hidden",!t[r])}const s=e.querySelectorAll("[data-ln-class]");for(let l=0;l<s.length;l++){const c=s[l],r=c.getAttribute("data-ln-class").split(",");for(let f=0;f<r.length;f++){const w=r[f].trim().split(":");if(w.length!==2)continue;const p=w[0].trim(),C=w[1].trim();C in t&&c.classList.toggle(p,!!t[C])}}return e}function Le(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let o=0;o<n.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[o],t??null),n[o].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)Y(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function Z(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,c){return t[c]!==void 0?t[c]:""}))}const o=function(s,l){return t[l]!==void 0?t[l]:""},i=Array.from(e.querySelectorAll("*"));e.nodeType===1&&i.push(e);for(let s=0;s<i.length;s++){const l=i[s],c=l.attributes;for(let r=0;r<c.length;r++){const f=c[r];f.value.indexOf("{{")!==-1&&l.setAttribute(f.name,f.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function Ie(e,t,n,o,i,s){const l={};for(let r=0;r<e.children.length;r++){const f=e.children[r],w=f.getAttribute("data-ln-render-key");w&&(l[w]=f)}const c=document.createDocumentFragment();for(let r=0;r<t.length;r++){const f=t[r],w=String(o(f));let p=l[w];if(p)i(p,f,r);else{const C=Te(n,s);if(!C||(Z(C,f),p=C.firstElementChild,!p))continue;p.setAttribute("data-ln-render-key",w),i(p,f,r)}c.appendChild(p)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=Z,window.lnCore.fill=Y,window.lnCore.lnFill=Le,window.lnCore.renderList=Ie);function R(e,t,n){const o=e.getAttribute(t);return o===null?n:o}function ee(e,t,n){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?n:o}function te(e,t,n=!1){const o=e.getAttribute(t);if(o===null)return!!n;const i=o.trim().toLowerCase();return!(i==="false"||i==="0")}function ne(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const $=new Map;function re(e,t){const n=(e?e.join("|"):"")+"::"+t;if($.has(n))return $.get(n);const o=new Set(e||[]),i=function(s,l){const c=s.getAttribute(l);return c!==null&&o.has(c)?c:t};return $.set(n,i),i}function oe(e,t,n){const o=parseFloat(e.getAttribute(t));return isNaN(o)?n:o}function ie(e,t,n){const o=e.getAttribute(t);if(!o)return n;try{return JSON.parse(o)}catch{return n}}function le(e,t,n,o,i){if(!e||t===null)return!0;const s=o||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const c=r=>{i?console.warn(r,i):console.warn(r)};if(l==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const r=e.values||[];return r.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(c(`[${s}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(c(`[${s}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(r){return c(`[${s}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function se(e,t,n){for(const o in n){const[i,s,l]=n[o];Object.defineProperty(e,o,{get:function(){return i(t,s,l)},enumerable:!0,configurable:!0})}return e}function ce(e){const t={};for(const n in e){const o=e[n];if(!o||!o.prop)continue;let i=o.read;if(!i&&o.type)switch(o.type){case"enum":i=re(o.values,o.fallback);break;case"integer":i=ee;break;case"float":i=oe;break;case"boolean":i=te;break;case"list":i=ne;break;case"json":i=ie;break;case"string":default:i=R;break}i||(i=R),t[o.prop]=[i,n,o.fallback]}return t}function Oe(e){const t={};for(const n in e){const o=e[n];o&&o.effect&&(t[n]=o.effect)}return Object.keys(t).length?t:null}function Re(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=se,window.lnCore.attrSpec=ce,window.lnCore.attrStr=R,window.lnCore.attrInt=ee,window.lnCore.attrBool=te,window.lnCore.attrList=ne,window.lnCore.attrEnum=re,window.lnCore.attrFloat=oe,window.lnCore.attrJson=ie);function T(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 ae(e,t,n,o){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:n,ComponentFn:o};if(e.matches&&e.matches(s)&&T(e,l),e.querySelectorAll){const c=e.querySelectorAll(s);for(let r=0;r<c.length;r++)T(c[r],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function De(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function H(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 ue(){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 Fe(e){const t=ue(),n=e.observed||[];for(let o=0;o<n.length;o++){const i=n[o];t.byAttr.has(i)||t.byAttr.set(i,[]),t.byAttr.get(i).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const o in e.attributes){t.byDeclaredAttr.has(o)||t.byDeclaredAttr.set(o,[]);const i=t.byDeclaredAttr.get(o);i.some(s=>s.componentTag===e.componentTag)||i.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=Re(e);if(o===null)t.reactiveWildcard.push(e);else for(const i of o)t.byReactive.has(i)||t.byReactive.set(i,[]),t.byReactive.get(i).push(e)}e.persist&&t.persist.push(e)}function de(e,t,n,o){for(let i=0;i<e.length;i++){const s=e[i];if(!t[s.attribute])continue;const l=s.effects&&s.effects[n];l?l(t,n,o):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,o)}}function Be(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,o=ue(),i=o.byAttr.get(t),s=J()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(t);if(!n&&!i&&!s)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(s&&B(l)){const c=o.byDeclaredAttr.get(t),r=l.getAttribute(t);for(let f=0;f<c.length;f++)le(c[f].spec,r,t,c[f].componentTag,l)}if(window.lnCore._debugSink&&(n||i)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),n){const c=o.byReactive.get(t);c&&de(c,l,t,e.oldValue),o.reactiveWildcard.length&&de(o.reactiveWildcard,l,t,e.oldValue)}if(i)for(let c=0;c<i.length;c++){const r=i[c];if(r.handler){r.handler(l,t,e.oldValue);continue}r.onAttributeChange&&l[r.attribute]?r.onAttributeChange(l,t):(ae(l,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(l))}}}function Ne(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,O(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Be(t[n])}catch(o){console.error("[ln-core] mutation handler failed",t[n].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function M(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function P(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function U(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(o){console.error("["+t.attribute+"] destroy failed",e,o)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function fe(e){const t=M();if(!t.length)return;const n=e.target;if(n){const i=n.nodeType===1?n:n.parentElement;if(i&&(i.isContentEditable||i.closest&&i.closest('[contenteditable]:not([contenteditable="false"])')))return}const o=P();if(e.target&&o.length)for(let i=0;i<o.length;i++){const s=o[i],l=s.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;c&&s.onSubtreeChange(c,e)}for(let i=0;i<e.addedNodes.length;i++){const s=e.addedNodes[i];if(s.nodeType===1){const l=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const r=t[c];if(r.selector&&r.attribute&&r.ComponentFn){if(!l)s.matches&&s.matches(r.query)&&T(s,r);else if(s.matches&&s.matches(r.query)&&T(s,r),s.querySelectorAll){const f=s.querySelectorAll(r.query);for(let w=0;w<f.length;w++)T(f[w],r)}}r.onInit&&r.onInit(s)}}}for(let i=0;i<e.removedNodes.length;i++){const s=e.removedNodes[i];if(s.nodeType===1){if(document.contains(s))continue;const l=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const r=t[c],f=r.query;if(f){if(!l)s.matches&&s.matches(f)&&U(s,r);else if(s.matches&&s.matches(f)&&U(s,r),s.querySelectorAll){const w=s.querySelectorAll(f);for(let p=0;p<w.length;p++)U(w[p],r)}}}}}}function he(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,O(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const o=t[n];if(o.type==="childList")try{fe(o)}catch(i){console.error("[ln-core] lifecycle handler failed",o.target,i)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function $e(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const n=t.takeRecords();for(let o=0;o<n.length;o++){const i=n[o];if(i.type==="childList")try{fe(i)}catch(s){console.error("[ln-core] lifecycle handler failed",i.target,s)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function He(e){M().push(e),e.onSubtreeChange&&e.query&&P().push(e),he()}function j(e,t,n,o,i={}){const s=i.extraAttributes||[],l=i.onAttributeChange||null,c=i.onSubtreeChange||null,r=i.onInit||null,f=i.onAttrChange||null,w=i.effects||null,p=i.attributes||null,C=p?Oe(p):w,L=p?new Set(Object.keys(p)):null,_=i.persist||null;function S(x){const d=x||document.body;if(ae(d,e,t,n),p&&J())for(const u in p){const a=p[u],h=Array.from(d.querySelectorAll("["+u+"]"));d.matches&&d.matches("["+u+"]")&&h.push(d);for(let b=0;b<h.length;b++){const A=h[b];B(A)&&le(a,A.getAttribute(u),u,o,A)}}r&&r(d)}const I=[];if(e.indexOf("[")!==-1){const x=/\[([\w-]+)/g;let d;for(;(d=x.exec(e))!==null;)I.push(d[1])}else I.push(e);Fe({selector:e,attribute:t,componentTag:o,attributes:p,ComponentFn:n,onInit:r,observed:I.concat(s),onAttributeChange:l,onAttrChange:f,effects:C,declared:L,persist:_}),Ne();const E=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,q=i.subtreeQuery||(E?e:"["+e+"]"),v={selector:e,attribute:t,ComponentFn:n,onInit:r,onSubtreeChange:c,query:q};M().push(v),c&&q&&P().push(v),he(),window[t]=S,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=j,window.lnCore.observeLifecycle=He,window.lnCore.withoutLifecycle=$e);function F(){De()>0?H(function(){S(document.body)}):S(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",F):F(),S}function Me(e,t){let n=!1;return function(){n||(n=!0,queueMicrotask(function(){n=!1,e()}))}}function we(e){return(e||"").replace(/^#/,"")}function W(e){const t=e===void 0?location.hash:e,n={},o=we(t);if(!o)return n;const i=o.split("&");for(let s=0;s<i.length;s++){const l=i[s];if(!l)continue;const c=l.indexOf(":"),r=c>-1?l.slice(0,c):l,f=c>-1?l.slice(c+1):"";if(r)try{n[r]=decodeURIComponent(f)}catch{n[r]=f}}return n}function V(e){if(!e)return null;const t=W();return e in t?t[e]:null}function pe(e,t){if(!e)return;const n=W();t==null?delete n[e]:n[e]=String(t);const i=Object.keys(n).map(function(s){const l=n[s];return l===""?s:s+":"+encodeURIComponent(l)}).join("&");we(location.hash)!==i&&(location.hash=i)}function Pe(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function K(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"-"+t:o:t||null}function Ue(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function je(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function We(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ve(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),o=e.slice(t+1),i=o?o.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=W,window.lnCore.hashGet=V,window.lnCore.hashSet=pe,window.lnCore.hashLinkClick=Pe,window.lnCore.resolveHashNamespace=K,window.lnCore.hashSortEncode=Ue,window.lnCore.hashSortDecode=je,window.lnCore.hashFilterEncode=We,window.lnCore.hashFilterDecode=Ve);function Ke(e){return(e||"").replace(/^\?/,"")}function Qe(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},o=Ke(t);if(!o)return n;const i=new URLSearchParams(o);for(const[s,l]of i.entries())n[s]=l;return n}function Q(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function be(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const o=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",o)}function z(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");if(n&&n.trim()!=="")return n.trim();const o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"_"+t:o:t||null}function ze(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Je(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const o=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:o}}}return null}function Ge(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function Xe(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=Qe,window.lnCore.queryGet=Q,window.lnCore.querySet=be,window.lnCore.resolveQueryParam=z,window.lnCore.querySortEncode=ze,window.lnCore.querySortDecode=Je,window.lnCore.queryFilterEncode=Ge,window.lnCore.queryFilterDecode=Xe);function Ye(){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=Ye);function D(e){return String(e||"").trim().toLowerCase()}function Ze(e){const t=D(e);return t?t.split(/\s+/).filter(Boolean):[]}function et(e){if(e==null)return null;const t=String(e).split(",").map(n=>n.trim()).filter(Boolean);return t.length?t:null}function tt(e,t){if(!t||t.length===0)return!0;if(!e)return!1;const n=String(e).toLowerCase();for(let o=0;o<t.length;o++)if(n.indexOf(t[o])===-1)return!1;return!0}function nt(e){return!e||e.length===0?"":e.join(" ").replace(/\s+/g," ").trim().toLowerCase()}(function(){const e="data-ln-search",t="lnSearch",n="data-ln-search-for",o="lnSearchControl",i="data-ln-search-items",s="data-ln-search-fields",l="data-ln-search-exclude",c="data-ln-search-hide",r="data-ln-hash",f="data-ln-query";if(window[t]!==void 0)return;const w={"data-ln-search":{type:"string",effect:x,description:"Active search query term on target element or container"},"data-ln-hash":{type:"string",effect:x,description:"URL hash routing key for search state persistence"},"data-ln-query":{type:"string",effect:x,description:"URL query parameter name for search query state synchronization"},"data-ln-search-for":{prop:"targetId",type:"string",read:R,fallback:null,description:"Target table or list element ID that this input controls"},"data-ln-search-fields":{type:"list",description:"Comma-separated field names to include in client search"},"data-ln-search-items":{type:"string",description:"CSS selector matching searchable child items"},"data-ln-search-exclude":{type:"string",description:"CSS selector matching child items to exclude from search"},"data-ln-search-hide":{type:"enum",values:["collapse","none"],fallback:"collapse",description:"CSS hiding strategy for non-matching rows"},"data-ln-search-clear-for":{type:"trigger",description:"Click trigger to clear search input for target"}},p=ce(w);function C(d){const u=K(d,"search");if(u)return u;if(d.id){const a=document.querySelector("["+n+'="'+d.id+'"]');if(a){const h=K(a,"search");if(h)return h}}return null}function L(d){const u=z(d,"search");if(u)return u;if(d.id){const a=document.querySelector("["+n+'="'+d.id+'"]');if(a){const h=z(a,"search");if(h)return h}}return null}function _(d){return d.matches("input, textarea")?d:d.querySelector("input, textarea")}function S(d,u){const a=d.childNodes;for(let h=0;h<a.length;h++){const b=a[h];if(b.nodeType===3){u.push(b.nodeValue);continue}b.nodeType===1&&(b.hasAttribute(l)||S(b,u))}}function I(d){if(d._lnSearchText!==void 0)return d._lnSearchText;const u=[];S(d,u);const a=nt(u);return d._lnSearchText=a,a}function E(d,u){if(!d.id)return;const a=document.querySelectorAll("["+n+'="'+d.id+'"]');for(const h of a){const b=_(h);b&&b.value!==u&&(b.value=u)}}function q(d){this.dom=d,this.term=d.getAttribute(e)||"",this._destroyed=!1;const u=this;return this.nsKey=C(d),this.hashEnabled=!!this.nsKey,this.queryParam=L(d),this.queryEnabled=!!this.queryParam,this._queueApply=Me(function(){u._destroyed||u._apply()}),this._onHashChange=function(){if(u._destroyed||!u.hashEnabled)return;const a=V(u.nsKey),h=u.dom.getAttribute(e)||"";a!==null&&a!==h?u.dom.setAttribute(e,a):a===null&&h!==""&&u.dom.setAttribute(e,"")},this._onPopState=function(){if(u._destroyed||!u.queryEnabled)return;const a=Q(u.queryParam)||"",h=u.dom.getAttribute(e)||"";a!==h&&u.dom.setAttribute(e,a)},this.hashEnabled&&window.addEventListener("hashchange",this._onHashChange),this.queryEnabled&&window.addEventListener("popstate",this._onPopState),H(function(){if(!u._destroyed){if(u.hashEnabled){const a=V(u.nsKey);if(a!==null&&a!==u.term){u.term=a,u.dom.setAttribute(e,a),E(u.dom,a),u._apply();return}}else if(u.queryEnabled){const a=Q(u.queryParam);if(a!==null&&a!==u.term){u.term=a,u.dom.setAttribute(e,a),E(u.dom,a),u._apply();return}}D(u.term)&&(E(u.dom,u.term),u._apply())}}),this}q.prototype._apply=function(){const d=this.dom,u=D(this.term),a=Ze(u);this.hashEnabled?pe(this.nsKey,this.term?this.term:null):this.queryEnabled&&be(this.queryParam,this.term?this.term:null);const h=et(d.getAttribute(s));if(me(d,"ln-search:change",{term:u,tokens:a,targetId:d.id,fields:h}).defaultPrevented)return;const A=d.getAttribute(i),g=A?d.querySelectorAll(A):d.children;for(let y=0;y<g.length;y++){const m=g[y];if(m.hasAttribute(l)){m.hasAttribute(c)&&m.removeAttribute(c);continue}const k=a.length>0&&!tt(I(m),a),ge=m.hasAttribute(c);k&&!ge?m.setAttribute(c,"true"):!k&&ge&&m.removeAttribute(c)}},q.prototype.destroy=function(){this.dom[t]&&(this._destroyed=!0,this.hashEnabled&&this._onHashChange&&window.removeEventListener("hashchange",this._onHashChange),this.queryEnabled&&this._onPopState&&window.removeEventListener("popstate",this._onPopState),delete this.dom[t])};function v(d){if(this.dom=d,se(this,d,p),this.input=_(d),this._attachHandler(),this.input&&this.input.value.trim()){const u=this;H(function(){const a=document.getElementById(u.targetId);a&&((a.getAttribute(e)||"").trim()||u._write(u.input.value))})}return this}v.prototype._write=function(d){const u=document.getElementById(this.targetId);u&&u.getAttribute(e)!==d&&u.setAttribute(e,d)},v.prototype._attachHandler=function(){if(!this.input)return;const d=this;this._onInput=function(){d._write(d.input.value)},this.input.addEventListener("input",this._onInput)},v.prototype.destroy=function(){this.dom[o]&&(this.input&&this._onInput&&this.input.removeEventListener("input",this._onInput),delete this.dom[o])};function F(d){const u=d.getAttribute("data-ln-search-clear-for");if(u){const g=document.getElementById(u),y=document.querySelector("["+n+'="'+u+'"]'),m=y?_(y):null;return{target:g,input:m}}const a=d.closest("["+e+"]");if(a){const g=a.id?document.querySelector("["+n+'="'+a.id+'"]'):null,y=g?_(g):null;return{target:a,input:y}}const h=d.closest("[data-ln-table-source], [data-ln-list-source]");if(h){const g=h.getAttribute("data-ln-table-source")||h.getAttribute("data-ln-list-source"),y=g?document.getElementById(g):null;if(y&&y.hasAttribute(e)){const m=document.querySelector("["+n+'="'+g+'"]'),k=m?_(m):null;return{target:y,input:k}}}const b=d.closest("["+n+"]");if(b){const g=b.getAttribute(n),y=g?document.getElementById(g):null,m=_(b);return{target:y,input:m}}const A=d.parentElement;if(A){const g=A.querySelector("["+n+"]");if(g){const y=g.getAttribute(n),m=y?document.getElementById(y):null,k=_(g);return{target:m,input:k}}}return{target:null,input:null}}document.addEventListener("click",function(d){const u=d.target.closest("[data-ln-search-clear], [data-ln-search-clear-for]");if(!u)return;const a=F(u);!a.target&&!a.input||(d.preventDefault(),a.input&&(a.input.value="",a.input.focus()),a.target&&a.target.setAttribute(e,""))});function x(d,u){const a=d[t];if(!a||a._destroyed)return;if(u===r){a._onHashChange&&window.removeEventListener("hashchange",a._onHashChange),a.nsKey=C(d),a.hashEnabled=!!a.nsKey,a.hashEnabled&&window.addEventListener("hashchange",a._onHashChange);return}if(u===f){a._onPopState&&window.removeEventListener("popstate",a._onPopState),a.queryParam=L(d),a.queryEnabled=!!a.queryParam,a.queryEnabled&&window.addEventListener("popstate",a._onPopState);return}const h=d.getAttribute(e)||"";h!==a.term&&(a.term=h,E(d,h),a._apply())}j(e,t,q,"ln-search",{attributes:w,onSubtreeChange:function(d,u){const a=u.target;a&&a._lnSearchText!==void 0&&delete a._lnSearchText,a&&a.parentElement&&a.parentElement._lnSearchText!==void 0&&delete a.parentElement._lnSearchText;const h=d[t];if(h&&!h._destroyed&&D(h.term)&&(u.addedNodes.length>0||u.removedNodes.length>0)){for(let b=0;b<u.addedNodes.length;b++){const A=u.addedNodes[b];A._lnSearchText!==void 0&&delete A._lnSearchText}h._queueApply()}},persist:{attr:e,hashActive:function(d){return!!C(d)||!!L(d)}}}),j(n,o,v,"ln-search-control")})()})();
|
|
1
|
+
(function(){"use strict";function z(){if(typeof window>"u")return!1;if(window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink)return!0;if(typeof document<"u"){if(document.documentElement&&document.documentElement.hasAttribute("data-ln-debug"))return!0;if(document.body)return document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null}return!1}function B(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 i=1;i<t.length;i++)if(t[i]&&t[i].nodeType===1){r=t[i];break}if(!B(r))return}e.apply(console,t)}}function me(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 ye(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r);const i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});return e.dispatchEvent(i),i}function I(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){I(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 Ae(e,t){const n=!!(t&&t.typed),r=t&&t.exclude,i={},s=e.elements,l={};if(n)for(let c=0;c<s.length;c++){const o=s[c];o.name&&o.type==="checkbox"&&!o.disabled&&(l[o.name]=(l[o.name]||0)+1)}for(let c=0;c<s.length;c++){const o=s[c];if(!(!o.name||o.disabled||o.type==="file"||o.type==="submit"||o.type==="button")&&!(r&&o.matches&&o.matches(r)))if(o.type==="checkbox")n&&l[o.name]===1?i[o.name]=o.checked:(i[o.name]||(i[o.name]=[]),o.checked&&i[o.name].push(o.value));else if(o.type==="radio")o.checked&&(i[o.name]=o.value);else if(o.type==="select-multiple"){i[o.name]=[];for(let f=0;f<o.options.length;f++)o.options[f].selected&&i[o.name].push(o.options[f].value)}else if(n&&o.type==="hidden")i[o.name]=o.value;else if(n&&(o.type==="number"||o.type==="range")){const f=Number(o.value);i[o.name]=o.value===""||isNaN(f)?null:f}else i[o.name]=o.value}return i}function _e(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function Se(e,t){const n=e.elements,r=[],i={};for(let s=0;s<n.length;s++){const l=n[s];l.name&&l.type==="checkbox"&&(i[l.name]=(i[l.name]||0)+1)}for(let s=0;s<n.length;s++){const l=n[s];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const c=l.getAttribute("data-ln-fill-as")||l.name;if(!c||!(c in t))continue;const o=t[c];if(l.type==="checkbox"){if(Array.isArray(o))l.checked=o.indexOf(l.value)!==-1;else if(i[l.name]>1){const f=String(o).split(",").map(function(p){return p.trim()});l.checked=f.indexOf(l.value)!==-1}else l.checked=_e(o);r.push(l)}else if(l.type==="radio")l.checked=l.value===String(o),r.push(l);else if(l.type==="select-multiple"){if(Array.isArray(o))for(let f=0;f<l.options.length;f++)l.options[f].selected=o.indexOf(l.options[f].value)!==-1;r.push(l)}else l.value=o,l.tagName==="SELECT"&&o!=null&&l.setAttribute("data-ln-value",o),r.push(l)}return r}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=Se,window.lnCore.serializeForm=Ae,window.lnCore.resolveFormMethod=Ce);const J={};function ve(e,t){J[e]=t}function Ee(e){return J[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ve,window.lnCore.getDataMapper=Ee);function xe(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,I(function(){new MutationObserver(function(){me(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const G={};function qe(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];G[n]=t}function ke(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return G[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=qe,window.lnCore.getLocaleFallback=ke,window.lnCore.ensureLocaleObserver=xe);const N={};function Te(e,t){N[e]||(N[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=N[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function X(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let l=0;l<n.length;l++){const c=n[l],o=c.getAttribute("data-ln-field");t[o]!=null&&(c.textContent=t[o])}const r=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<r.length;l++){const c=r[l],o=c.getAttribute("data-ln-attr").split(",");for(let f=0;f<o.length;f++){const p=o[f].trim().split(":");if(p.length!==2)continue;const w=p[0].trim(),C=p[1].trim();t[C]!=null&&c.setAttribute(w,t[C])}}const i=e.querySelectorAll("[data-ln-show]");for(let l=0;l<i.length;l++){const c=i[l],o=c.getAttribute("data-ln-show");o in t&&c.classList.toggle("hidden",!t[o])}const s=e.querySelectorAll("[data-ln-class]");for(let l=0;l<s.length;l++){const c=s[l],o=c.getAttribute("data-ln-class").split(",");for(let f=0;f<o.length;f++){const p=o[f].trim().split(":");if(p.length!==2)continue;const w=p[0].trim(),C=p[1].trim();C in t&&c.classList.toggle(w,!!t[C])}}return e}function Le(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)X(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 Y(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,c){return t[c]!==void 0?t[c]:""}))}const r=function(s,l){return t[l]!==void 0?t[l]:""},i=Array.from(e.querySelectorAll("*"));e.nodeType===1&&i.push(e);for(let s=0;s<i.length;s++){const l=i[s],c=l.attributes;for(let o=0;o<c.length;o++){const f=c[o];f.value.indexOf("{{")!==-1&&l.setAttribute(f.name,f.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function Ie(e,t,n,r,i,s){const l={};for(let o=0;o<e.children.length;o++){const f=e.children[o],p=f.getAttribute("data-ln-render-key");p&&(l[p]=f)}const c=document.createDocumentFragment();for(let o=0;o<t.length;o++){const f=t[o],p=String(r(f));let w=l[p];if(w)i(w,f,o);else{const C=Te(n,s);if(!C||(Y(C,f),w=C.firstElementChild,!w))continue;w.setAttribute("data-ln-render-key",p),i(w,f,o)}c.appendChild(w)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=Y,window.lnCore.fill=X,window.lnCore.lnFill=Le,window.lnCore.renderList=Ie);function O(e,t,n){const r=e.getAttribute(t);return r===null?n:r}function Z(e,t,n){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?n:r}function ee(e,t,n=!1){const r=e.getAttribute(t);if(r===null)return!!n;const i=r.trim().toLowerCase();return!(i==="false"||i==="0")}function te(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const $=new Map;function ne(e,t){const n=(e?e.join("|"):"")+"::"+t;if($.has(n))return $.get(n);const r=new Set(e||[]),i=function(s,l){const c=s.getAttribute(l);return c!==null&&r.has(c)?c:t};return $.set(n,i),i}function re(e,t,n){const r=parseFloat(e.getAttribute(t));return isNaN(r)?n:r}function oe(e,t,n){const r=e.getAttribute(t);if(!r)return n;try{return JSON.parse(r)}catch{return n}}function ie(e,t,n,r,i){if(!e||t===null)return!0;const s=r||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const c=o=>{i?console.warn(o,i):console.warn(o)};if(l==="boolean"){const o=t.trim().toLowerCase();return o!==""&&o!=="true"&&o!=="false"&&o!=="1"&&o!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const o=e.values||[];return o.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${o.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const o=parseInt(t,10);return e.min!==void 0&&o<e.min?(c(`[${s}] Value ${o} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(c(`[${s}] Value ${o} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(o){return c(`[${s}] Invalid JSON for attribute "${n}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function le(e,t,n){for(const r in n){const[i,s,l]=n[r];Object.defineProperty(e,r,{get:function(){return i(t,s,l)},enumerable:!0,configurable:!0})}return e}function se(e){const t={};for(const n in e){const r=e[n];if(!r||!r.prop)continue;let i=r.read;if(!i&&r.type)switch(r.type){case"enum":i=ne(r.values,r.fallback);break;case"integer":i=Z;break;case"float":i=re;break;case"boolean":i=ee;break;case"list":i=te;break;case"json":i=oe;break;case"string":default:i=O;break}i||(i=O),t[r.prop]=[i,n,r.fallback]}return t}function Oe(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 Re(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=le,window.lnCore.attrSpec=se,window.lnCore.attrStr=O,window.lnCore.attrInt=Z,window.lnCore.attrBool=ee,window.lnCore.attrList=te,window.lnCore.attrEnum=ne,window.lnCore.attrFloat=re,window.lnCore.attrJson=oe);function R(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 ce(e,t,n,r){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:n,ComponentFn:r};if(e.matches&&e.matches(s)&&R(e,l),e.querySelectorAll){const c=e.querySelectorAll(s);for(let o=0;o<c.length;o++)R(c[o],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function De(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function H(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 ue(){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 Fe(e){const t=ue(),n=e.observed||[];for(let r=0;r<n.length;r++){const i=n[r];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 r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const i=t.byDeclaredAttr.get(r);i.some(s=>s.componentTag===e.componentTag)||i.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=Re(e);if(r===null)t.reactiveWildcard.push(e);else for(const i of r)t.byReactive.has(i)||t.byReactive.set(i,[]),t.byReactive.get(i).push(e)}e.persist&&t.persist.push(e)}function ae(e,t,n,r){for(let i=0;i<e.length;i++){const s=e[i];if(!t[s.attribute])continue;const l=s.effects&&s.effects[n];l?l(t,n,r):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,r)}}function Be(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,r=ue(),i=r.byAttr.get(t),s=z()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(t);if(!n&&!i&&!s)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(s&&B(l)){const c=r.byDeclaredAttr.get(t),o=l.getAttribute(t);for(let f=0;f<c.length;f++)ie(c[f].spec,o,t,c[f].componentTag,l)}if(window.lnCore._debugSink&&(n||i)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),n){const c=r.byReactive.get(t);c&&ae(c,l,t,e.oldValue),r.reactiveWildcard.length&&ae(r.reactiveWildcard,l,t,e.oldValue)}if(i)for(let c=0;c<i.length;c++){const o=i[c];if(o.handler){o.handler(l,t,e.oldValue);continue}o.onAttributeChange&&l[o.attribute]?o.onAttributeChange(l,t):(ce(l,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(l))}}}function Ne(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,I(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Be(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 M(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function P(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function de(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 fe(e){const t=M();if(!t.length)return;const n=e.target;if(n){const i=n.nodeType===1?n:n.parentElement;if(i&&(i.isContentEditable||i.closest&&i.closest('[contenteditable]:not([contenteditable="false"])')))return}const r=P();if(e.target&&r.length)for(let i=0;i<r.length;i++){const s=r[i],l=s.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;c&&s.onSubtreeChange(c,e)}for(let i=0;i<e.addedNodes.length;i++){const s=e.addedNodes[i];if(s.nodeType!==1)continue;const l=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const o=t[c],f=o.query;if(f&&(s.matches&&s.matches(f)&&(o.ComponentFn&&R(s,o),o.onInit&&o.onInit(s)),l&&s.querySelectorAll)){const p=s.querySelectorAll(f);for(let w=0;w<p.length;w++)o.ComponentFn&&R(p[w],o),o.onInit&&o.onInit(p[w])}}}for(let i=0;i<e.removedNodes.length;i++){const s=e.removedNodes[i];if(s.nodeType!==1||document.contains(s))continue;const l=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const o=t[c],f=o.query;if(f&&(s.matches&&s.matches(f)&&de(s,o),l&&s.querySelectorAll)){const p=s.querySelectorAll(f);for(let w=0;w<p.length;w++)de(p[w],o)}}}}function he(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,I(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{fe(r)}catch(i){console.error("[ln-core] lifecycle handler failed",r.target,i)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function $e(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const n=t.takeRecords();for(let r=0;r<n.length;r++){const i=n[r];if(i.type==="childList")try{fe(i)}catch(s){console.error("[ln-core] lifecycle handler failed",i.target,s)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function He(e){M().push(e),e.onSubtreeChange&&e.query&&P().push(e),he()}function U(e,t,n,r,i={}){const s=i.extraAttributes||[],l=i.onAttributeChange||null,c=i.onSubtreeChange||null,o=i.onInit||null,f=i.onAttrChange||null,p=i.effects||null,w=i.attributes||null,C=w?Oe(w):p,T=w?new Set(Object.keys(w)):null,_=i.persist||null;function S(E){const d=E||document.body;if(ce(d,e,t,n),w&&z())for(const a in w){const u=w[a],h=Array.from(d.querySelectorAll("["+a+"]"));d.matches&&d.matches("["+a+"]")&&h.push(d);for(let b=0;b<h.length;b++){const A=h[b];B(A)&&ie(u,A.getAttribute(a),a,r,A)}}o&&o(d)}const L=[];if(e.indexOf("[")!==-1){const E=/\[([\w-]+)/g;let d;for(;(d=E.exec(e))!==null;)L.push(d[1])}else L.push(e);Fe({selector:e,attribute:t,componentTag:r,attributes:w,ComponentFn:n,onInit:o,observed:L.concat(s),onAttributeChange:l,onAttrChange:f,effects:C,declared:T,persist:_}),Ne();const x=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,q=i.subtreeQuery||(x?e:"["+e+"]"),v={selector:e,attribute:t,ComponentFn:n,onInit:o,onSubtreeChange:c,query:q};M().push(v),c&&q&&P().push(v),he(),window[t]=S,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=U,window.lnCore.observeLifecycle=He,window.lnCore.withoutLifecycle=$e);function F(){De()>0?H(function(){S(document.body)}):S(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",F):F(),S}function Me(e,t){let n=!1;return function(){n||(n=!0,queueMicrotask(function(){n=!1,e()}))}}function we(e){return(e||"").replace(/^#/,"")}function j(e){const t=e===void 0?location.hash:e,n={},r=we(t);if(!r)return n;const i=r.split("&");for(let s=0;s<i.length;s++){const l=i[s];if(!l)continue;const c=l.indexOf(":"),o=c>-1?l.slice(0,c):l,f=c>-1?l.slice(c+1):"";if(o)try{n[o]=decodeURIComponent(f)}catch{n[o]=f}}return n}function W(e){if(!e)return null;const t=j();return e in t?t[e]:null}function pe(e,t){if(!e)return;const n=j();t==null?delete n[e]:n[e]=String(t);const i=Object.keys(n).map(function(s){const l=n[s];return l===""?s:s+":"+encodeURIComponent(l)}).join("&");we(location.hash)!==i&&(location.hash=i)}function Pe(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function V(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function Ue(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function je(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function We(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ve(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),i=r?r.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=j,window.lnCore.hashGet=W,window.lnCore.hashSet=pe,window.lnCore.hashLinkClick=Pe,window.lnCore.resolveHashNamespace=V,window.lnCore.hashSortEncode=Ue,window.lnCore.hashSortDecode=je,window.lnCore.hashFilterEncode=We,window.lnCore.hashFilterDecode=Ve);function Ke(e){return(e||"").replace(/^\?/,"")}function Qe(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},r=Ke(t);if(!r)return n;const i=new URLSearchParams(r);for(const[s,l]of i.entries())n[s]=l;return n}function K(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function be(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const r=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",r)}function Q(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");if(n&&n.trim()!=="")return n.trim();const 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 ze(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Je(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const r=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:r}}}return null}function Ge(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function Xe(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=Qe,window.lnCore.queryGet=K,window.lnCore.querySet=be,window.lnCore.resolveQueryParam=Q,window.lnCore.querySortEncode=ze,window.lnCore.querySortDecode=Je,window.lnCore.queryFilterEncode=Ge,window.lnCore.queryFilterDecode=Xe);function Ye(){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=Ye);function D(e){return String(e||"").trim().toLowerCase()}function Ze(e){const t=D(e);return t?t.split(/\s+/).filter(Boolean):[]}function et(e){if(e==null)return null;const t=String(e).split(",").map(n=>n.trim()).filter(Boolean);return t.length?t:null}function tt(e,t){if(!t||t.length===0)return!0;if(!e)return!1;const n=String(e).toLowerCase();for(let r=0;r<t.length;r++)if(n.indexOf(t[r])===-1)return!1;return!0}function nt(e){return!e||e.length===0?"":e.join(" ").replace(/\s+/g," ").trim().toLowerCase()}(function(){const e="data-ln-search",t="lnSearch",n="data-ln-search-for",r="lnSearchControl",i="data-ln-search-items",s="data-ln-search-fields",l="data-ln-search-exclude",c="data-ln-search-hide",o="data-ln-hash",f="data-ln-query";if(window[t]!==void 0)return;const p={"data-ln-search":{type:"string",effect:E,description:"Active search query term on target element or container"},"data-ln-hash":{type:"string",effect:E,description:"URL hash routing key for search state persistence"},"data-ln-query":{type:"string",effect:E,description:"URL query parameter name for search query state synchronization"},"data-ln-search-for":{prop:"targetId",type:"string",read:O,fallback:null,description:"Target table or list element ID that this input controls"},"data-ln-search-fields":{type:"list",description:"Comma-separated field names to include in client search"},"data-ln-search-items":{type:"string",description:"CSS selector matching searchable child items"},"data-ln-search-exclude":{type:"string",description:"CSS selector matching child items to exclude from search"},"data-ln-search-hide":{type:"enum",values:["collapse","none"],fallback:"collapse",description:"CSS hiding strategy for non-matching rows"},"data-ln-search-clear-for":{type:"trigger",description:"Click trigger to clear search input for target"}},w=se(p);function C(d){const a=V(d,"search");if(a)return a;if(d.id){const u=document.querySelector("["+n+'="'+d.id+'"]');if(u){const h=V(u,"search");if(h)return h}}return null}function T(d){const a=Q(d,"search");if(a)return a;if(d.id){const u=document.querySelector("["+n+'="'+d.id+'"]');if(u){const h=Q(u,"search");if(h)return h}}return null}function _(d){return d.matches("input, textarea")?d:d.querySelector("input, textarea")}function S(d,a){const u=d.childNodes;for(let h=0;h<u.length;h++){const b=u[h];if(b.nodeType===3){a.push(b.nodeValue);continue}b.nodeType===1&&(b.hasAttribute(l)||S(b,a))}}function L(d){if(d._lnSearchText!==void 0)return d._lnSearchText;const a=[];S(d,a);const u=nt(a);return d._lnSearchText=u,u}function x(d,a){if(!d.id)return;const u=document.querySelectorAll("["+n+'="'+d.id+'"]');for(const h of u){const b=_(h);b&&b.value!==a&&(b.value=a)}}function q(d){this.dom=d,this.term=d.getAttribute(e)||"",this._destroyed=!1;const a=this;return this.nsKey=C(d),this.hashEnabled=!!this.nsKey,this.queryParam=T(d),this.queryEnabled=!!this.queryParam,this._queueApply=Me(function(){a._destroyed||a._apply()}),this._onHashChange=function(){if(a._destroyed||!a.hashEnabled)return;const u=W(a.nsKey),h=a.dom.getAttribute(e)||"";u!==null&&u!==h?a.dom.setAttribute(e,u):u===null&&h!==""&&a.dom.setAttribute(e,"")},this._onPopState=function(){if(a._destroyed||!a.queryEnabled)return;const u=K(a.queryParam)||"",h=a.dom.getAttribute(e)||"";u!==h&&a.dom.setAttribute(e,u)},this.hashEnabled&&window.addEventListener("hashchange",this._onHashChange),this.queryEnabled&&window.addEventListener("popstate",this._onPopState),H(function(){if(!a._destroyed){if(a.hashEnabled){const u=W(a.nsKey);if(u!==null&&u!==a.term){a.term=u,a.dom.setAttribute(e,u),x(a.dom,u),a._apply();return}}else if(a.queryEnabled){const u=K(a.queryParam);if(u!==null&&u!==a.term){a.term=u,a.dom.setAttribute(e,u),x(a.dom,u),a._apply();return}}D(a.term)&&(x(a.dom,a.term),a._apply())}}),this}q.prototype._apply=function(){const d=this.dom,a=D(this.term),u=Ze(a);this.hashEnabled?pe(this.nsKey,this.term?this.term:null):this.queryEnabled&&be(this.queryParam,this.term?this.term:null);const h=et(d.getAttribute(s));if(ye(d,"ln-search:change",{term:a,tokens:u,targetId:d.id,fields:h}).defaultPrevented)return;const A=d.getAttribute(i),g=A?d.querySelectorAll(A):d.children;for(let m=0;m<g.length;m++){const y=g[m];if(y.hasAttribute(l)){y.hasAttribute(c)&&y.removeAttribute(c);continue}const k=u.length>0&&!tt(L(y),u),ge=y.hasAttribute(c);k&&!ge?y.setAttribute(c,"true"):!k&&ge&&y.removeAttribute(c)}},q.prototype.destroy=function(){this.dom[t]&&(this._destroyed=!0,this.hashEnabled&&this._onHashChange&&window.removeEventListener("hashchange",this._onHashChange),this.queryEnabled&&this._onPopState&&window.removeEventListener("popstate",this._onPopState),delete this.dom[t])};function v(d){if(this.dom=d,le(this,d,w),this.input=_(d),this._attachHandler(),this.input&&this.input.value.trim()){const a=this;H(function(){const u=document.getElementById(a.targetId);u&&((u.getAttribute(e)||"").trim()||a._write(a.input.value))})}return this}v.prototype._write=function(d){const a=document.getElementById(this.targetId);a&&a.getAttribute(e)!==d&&a.setAttribute(e,d)},v.prototype._attachHandler=function(){if(!this.input)return;const d=this;this._onInput=function(){d._write(d.input.value)},this.input.addEventListener("input",this._onInput)},v.prototype.destroy=function(){this.dom[r]&&(this.input&&this._onInput&&this.input.removeEventListener("input",this._onInput),delete this.dom[r])};function F(d){const a=d.getAttribute("data-ln-search-clear-for");if(a){const g=document.getElementById(a),m=document.querySelector("["+n+'="'+a+'"]'),y=m?_(m):null;return{target:g,input:y}}const u=d.closest("["+e+"]");if(u){const g=u.id?document.querySelector("["+n+'="'+u.id+'"]'):null,m=g?_(g):null;return{target:u,input:m}}const h=d.closest("[data-ln-table-source], [data-ln-list-source]");if(h){const g=h.getAttribute("data-ln-table-source")||h.getAttribute("data-ln-list-source"),m=g?document.getElementById(g):null;if(m&&m.hasAttribute(e)){const y=document.querySelector("["+n+'="'+g+'"]'),k=y?_(y):null;return{target:m,input:k}}}const b=d.closest("["+n+"]");if(b){const g=b.getAttribute(n),m=g?document.getElementById(g):null,y=_(b);return{target:m,input:y}}const A=d.parentElement;if(A){const g=A.querySelector("["+n+"]");if(g){const m=g.getAttribute(n),y=m?document.getElementById(m):null,k=_(g);return{target:y,input:k}}}return{target:null,input:null}}document.addEventListener("click",function(d){const a=d.target.closest("[data-ln-search-clear], [data-ln-search-clear-for]");if(!a)return;const u=F(a);!u.target&&!u.input||(d.preventDefault(),u.input&&(u.input.value="",u.input.focus()),u.target&&u.target.setAttribute(e,""))});function E(d,a){const u=d[t];if(!u||u._destroyed)return;if(a===o){u._onHashChange&&window.removeEventListener("hashchange",u._onHashChange),u.nsKey=C(d),u.hashEnabled=!!u.nsKey,u.hashEnabled&&window.addEventListener("hashchange",u._onHashChange);return}if(a===f){u._onPopState&&window.removeEventListener("popstate",u._onPopState),u.queryParam=T(d),u.queryEnabled=!!u.queryParam,u.queryEnabled&&window.addEventListener("popstate",u._onPopState);return}const h=d.getAttribute(e)||"";h!==u.term&&(u.term=h,x(d,h),u._apply())}U(e,t,q,"ln-search",{attributes:p,onSubtreeChange:function(d,a){const u=a.target;u&&u._lnSearchText!==void 0&&delete u._lnSearchText,u&&u.parentElement&&u.parentElement._lnSearchText!==void 0&&delete u.parentElement._lnSearchText;const h=d[t];if(h&&!h._destroyed&&D(h.term)&&(a.addedNodes.length>0||a.removedNodes.length>0)){for(let b=0;b<a.addedNodes.length;b++){const A=a.addedNodes[b];A._lnSearchText!==void 0&&delete A._lnSearchText}h._queueApply()}},persist:{attr:e,hashActive:function(d){return!!C(d)||!!T(d)}}}),U(n,r,v,"ln-search-control")})()})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";function D(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function y(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let o=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){o=t[l];break}if(!y(o))return}e.apply(console,t)}}function te(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function b(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){b(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function ne(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function re(e,t){const n=!!(t&&t.typed),o=t&&t.exclude,l={},s=e.elements,i={};if(n)for(let c=0;c<s.length;c++){const r=s[c];r.name&&r.type==="checkbox"&&!r.disabled&&(i[r.name]=(i[r.name]||0)+1)}for(let c=0;c<s.length;c++){const r=s[c];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(o&&r.matches&&r.matches(o)))if(r.type==="checkbox")n&&i[r.name]===1?l[r.name]=r.checked:(l[r.name]||(l[r.name]=[]),r.checked&&l[r.name].push(r.value));else if(r.type==="radio")r.checked&&(l[r.name]=r.value);else if(r.type==="select-multiple"){l[r.name]=[];for(let u=0;u<r.options.length;u++)r.options[u].selected&&l[r.name].push(r.options[u].value)}else if(n&&r.type==="hidden")l[r.name]=r.value;else if(n&&(r.type==="number"||r.type==="range")){const u=Number(r.value);l[r.name]=r.value===""||isNaN(u)?null:u}else l[r.name]=r.value}return l}function oe(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 n=e.elements,o=[],l={};for(let s=0;s<n.length;s++){const i=n[s];i.name&&i.type==="checkbox"&&(l[i.name]=(l[i.name]||0)+1)}for(let s=0;s<n.length;s++){const i=n[s];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const c=i.getAttribute("data-ln-fill-as")||i.name;if(!c||!(c in t))continue;const r=t[c];if(i.type==="checkbox"){if(Array.isArray(r))i.checked=r.indexOf(i.value)!==-1;else if(l[i.name]>1){const u=String(r).split(",").map(function(a){return a.trim()});i.checked=u.indexOf(i.value)!==-1}else i.checked=oe(r);o.push(i)}else if(i.type==="radio")i.checked=i.value===String(r),o.push(i);else if(i.type==="select-multiple"){if(Array.isArray(r))for(let u=0;u<i.options.length;u++)i.options[u].selected=r.indexOf(i.options[u].value)!==-1;o.push(i)}else i.value=r,i.tagName==="SELECT"&&r!=null&&i.setAttribute("data-ln-value",r),o.push(i)}return o}function le(e,t,{get:n,set:o}){Object.defineProperty(e,"value",{get:function(){return n?n.call(this):t.get.call(this)},set:function(l){o?o.call(this,l,s=>t.set.call(this,s)):t.set.call(this,l)},configurable:!0})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ie,window.lnCore.serializeForm=re,window.lnCore.resolveFormMethod=ne);const R={};function se(e,t){R[e]=t}function ce(e){return R[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=se,window.lnCore.getDataMapper=ce);function ue(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,b(function(){new MutationObserver(function(){te(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const F={};function ae(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];F[n]=t}function de(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return F[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ae,window.lnCore.getLocaleFallback=de,window.lnCore.ensureLocaleObserver=ue);const C={};function fe(e,t){C[e]||(C[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=C[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function I(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let i=0;i<n.length;i++){const c=n[i],r=c.getAttribute("data-ln-field");t[r]!=null&&(c.textContent=t[r])}const o=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<o.length;i++){const c=o[i],r=c.getAttribute("data-ln-attr").split(",");for(let u=0;u<r.length;u++){const a=r[u].trim().split(":");if(a.length!==2)continue;const d=a[0].trim(),f=a[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 u=0;u<r.length;u++){const a=r[u].trim().split(":");if(a.length!==2)continue;const d=a[0].trim(),f=a[1].trim();f in t&&c.classList.toggle(d,!!t[f])}}return e}function we(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let o=0;o<n.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[o],t??null),n[o].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)I(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function $(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,c){return t[c]!==void 0?t[c]:""}))}const o=function(s,i){return t[i]!==void 0?t[i]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let s=0;s<l.length;s++){const i=l[s],c=i.attributes;for(let r=0;r<c.length;r++){const u=c[r];u.value.indexOf("{{")!==-1&&i.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function he(e,t,n,o,l,s){const i={};for(let r=0;r<e.children.length;r++){const u=e.children[r],a=u.getAttribute("data-ln-render-key");a&&(i[a]=u)}const c=document.createDocumentFragment();for(let r=0;r<t.length;r++){const u=t[r],a=String(o(u));let d=i[a];if(d)l(d,u,r);else{const f=fe(n,s);if(!f||($(f,u),d=f.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",a),l(d,u,r)}c.appendChild(d)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=$,window.lnCore.fill=I,window.lnCore.lnFill=we,window.lnCore.renderList=he);function g(e,t,n){const o=e.getAttribute(t);return o===null?n:o}function N(e,t,n){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?n:o}function T(e,t,n=!1){const o=e.getAttribute(t);if(o===null)return!!n;const l=o.trim().toLowerCase();return!(l==="false"||l==="0")}function j(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const A=new Map;function M(e,t){const n=(e?e.join("|"):"")+"::"+t;if(A.has(n))return A.get(n);const o=new Set(e||[]),l=function(s,i){const c=s.getAttribute(i);return c!==null&&o.has(c)?c:t};return A.set(n,l),l}function B(e,t,n){const o=parseFloat(e.getAttribute(t));return isNaN(o)?n:o}function U(e,t,n){const o=e.getAttribute(t);if(!o)return n;try{return JSON.parse(o)}catch{return n}}function W(e,t,n,o,l){if(!e||t===null)return!0;const s=o||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const c=r=>{l?console.warn(r,l):console.warn(r)};if(i==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const r=e.values||[];return r.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(c(`[${s}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(c(`[${s}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(r){return c(`[${s}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function V(e,t,n){for(const o in n){const[l,s,i]=n[o];Object.defineProperty(e,o,{get:function(){return l(t,s,i)},enumerable:!0,configurable:!0})}return e}function P(e){const t={};for(const n in e){const o=e[n];if(!o||!o.prop)continue;let l=o.read;if(!l&&o.type)switch(o.type){case"enum":l=M(o.values,o.fallback);break;case"integer":l=N;break;case"float":l=B;break;case"boolean":l=T;break;case"list":l=j;break;case"json":l=U;break;case"string":default:l=g;break}l||(l=g),t[o.prop]=[l,n,o.fallback]}return t}function pe(e){const t={};for(const n in e){const o=e[n];o&&o.effect&&(t[n]=o.effect)}return Object.keys(t).length?t:null}function be(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=V,window.lnCore.attrSpec=P,window.lnCore.attrStr=g,window.lnCore.attrInt=N,window.lnCore.attrBool=T,window.lnCore.attrList=j,window.lnCore.attrEnum=M,window.lnCore.attrFloat=B,window.lnCore.attrJson=U);function h(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(n){console.error("["+t.attribute+"] init failed",e,n)}}}function H(e,t,n,o){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:n,ComponentFn:o};if(e.matches&&e.matches(s)&&h(e,i),e.querySelectorAll){const c=e.querySelectorAll(s);for(let r=0;r<c.length;r++)h(c[r],i)}}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 me(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function Q(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function ye(e){const t=Q(),n=e.observed||[];for(let o=0;o<n.length;o++){const l=n[o];t.byAttr.has(l)||t.byAttr.set(l,[]),t.byAttr.get(l).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const o in e.attributes){t.byDeclaredAttr.has(o)||t.byDeclaredAttr.set(o,[]);const l=t.byDeclaredAttr.get(o);l.some(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=be(e);if(o===null)t.reactiveWildcard.push(e);else for(const l of o)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function J(e,t,n,o){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const i=s.effects&&s.effects[n];i?i(t,n,o):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,o)}}function Ce(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,o=Q(),l=o.byAttr.get(t),s=D()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(t);if(!n&&!l&&!s)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(s&&y(i)){const c=o.byDeclaredAttr.get(t),r=i.getAttribute(t);for(let u=0;u<c.length;u++)W(c[u].spec,r,t,c[u].componentTag,i)}if(window.lnCore._debugSink&&(n||l)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),n){const c=o.byReactive.get(t);c&&J(c,i,t,e.oldValue),o.reactiveWildcard.length&&J(o.reactiveWildcard,i,t,e.oldValue)}if(l)for(let c=0;c<l.length;c++){const r=l[c];if(r.handler){r.handler(i,t,e.oldValue);continue}r.onAttributeChange&&i[r.attribute]?r.onAttributeChange(i,t):(H(i,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(i))}}}function Ae(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,b(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Ce(t[n])}catch(o){console.error("[ln-core] mutation handler failed",t[n].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function _(){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 v(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(o){console.error("["+t.attribute+"] destroy failed",e,o)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function K(e){const 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 o=S();if(e.target&&o.length)for(let l=0;l<o.length;l++){const s=o[l],i=s.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(i)?e.target:e.target.closest?e.target.closest(i):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(i):null;c&&s.onSubtreeChange(c,e)}for(let l=0;l<e.addedNodes.length;l++){const s=e.addedNodes[l];if(s.nodeType===1){const i=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const r=t[c];if(r.selector&&r.attribute&&r.ComponentFn){if(!i)s.matches&&s.matches(r.query)&&h(s,r);else if(s.matches&&s.matches(r.query)&&h(s,r),s.querySelectorAll){const u=s.querySelectorAll(r.query);for(let a=0;a<u.length;a++)h(u[a],r)}}r.onInit&&r.onInit(s)}}}for(let l=0;l<e.removedNodes.length;l++){const s=e.removedNodes[l];if(s.nodeType===1){if(document.contains(s))continue;const i=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const r=t[c],u=r.query;if(u){if(!i)s.matches&&s.matches(u)&&v(s,r);else if(s.matches&&s.matches(u)&&v(s,r),s.querySelectorAll){const a=s.querySelectorAll(u);for(let d=0;d<a.length;d++)v(a[d],r)}}}}}}function z(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,b(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const o=t[n];if(o.type==="childList")try{K(o)}catch(l){console.error("[ln-core] lifecycle handler failed",o.target,l)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function _e(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const n=t.takeRecords();for(let o=0;o<n.length;o++){const l=n[o];if(l.type==="childList")try{K(l)}catch(s){console.error("[ln-core] lifecycle handler failed",l.target,s)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function Se(e){_().push(e),e.onSubtreeChange&&e.query&&S().push(e),z()}function G(e,t,n,o,l={}){const s=l.extraAttributes||[],i=l.onAttributeChange||null,c=l.onSubtreeChange||null,r=l.onInit||null,u=l.onAttrChange||null,a=l.effects||null,d=l.attributes||null,f=d?pe(d):a,Ve=d?new Set(Object.keys(d)):null,Pe=l.persist||null;function m(E){const w=E||document.body;if(H(w,e,t,n),d&&D())for(const p in d){const Qe=d[p],L=Array.from(w.querySelectorAll("["+p+"]"));w.matches&&w.matches("["+p+"]")&&L.push(w);for(let O=0;O<L.length;O++){const q=L[O];y(q)&&W(Qe,q.getAttribute(p),p,o,q)}}r&&r(w)}const k=[];if(e.indexOf("[")!==-1){const E=/\[([\w-]+)/g;let w;for(;(w=E.exec(e))!==null;)k.push(w[1])}else k.push(e);ye({selector:e,attribute:t,componentTag:o,attributes:d,ComponentFn:n,onInit:r,observed:k.concat(s),onAttributeChange:i,onAttrChange:u,effects:f,declared:Ve,persist:Pe}),Ae();const He=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,Y=l.subtreeQuery||(He?e:"["+e+"]"),Z={selector:e,attribute:t,ComponentFn:n,onInit:r,onSubtreeChange:c,query:Y};_().push(Z),c&&Y&&S().push(Z),z(),window[t]=m,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=G,window.lnCore.observeLifecycle=Se,window.lnCore.withoutLifecycle=_e);function ee(){ge()>0?me(function(){m(document.body)}):m(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ee):ee(),m}function X(e){return(e||"").replace(/^#/,"")}function x(e){const t=e===void 0?location.hash:e,n={},o=X(t);if(!o)return n;const l=o.split("&");for(let s=0;s<l.length;s++){const i=l[s];if(!i)continue;const c=i.indexOf(":"),r=c>-1?i.slice(0,c):i,u=c>-1?i.slice(c+1):"";if(r)try{n[r]=decodeURIComponent(u)}catch{n[r]=u}}return n}function ve(e){if(!e)return null;const t=x();return e in t?t[e]:null}function xe(e,t){if(!e)return;const n=x();t==null?delete n[e]:n[e]=String(t);const l=Object.keys(n).map(function(s){const i=n[s];return i===""?s:s+":"+encodeURIComponent(i)}).join("&");X(location.hash)!==l&&(location.hash=l)}function ke(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ee(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"-"+t:o:t||null}function Le(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Oe(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function qe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function De(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),o=e.slice(t+1),l=o?o.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=x,window.lnCore.hashGet=ve,window.lnCore.hashSet=xe,window.lnCore.hashLinkClick=ke,window.lnCore.resolveHashNamespace=Ee,window.lnCore.hashSortEncode=Le,window.lnCore.hashSortDecode=Oe,window.lnCore.hashFilterEncode=qe,window.lnCore.hashFilterDecode=De);function Re(e){return(e||"").replace(/^\?/,"")}function Fe(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},o=Re(t);if(!o)return n;const l=new URLSearchParams(o);for(const[s,i]of l.entries())n[s]=i;return n}function Ie(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function $e(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const o=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",o)}function Ne(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");if(n&&n.trim()!=="")return n.trim();const o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"_"+t:o:t||null}function Te(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function je(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const o=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:o}}}return null}function Me(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function Be(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=Fe,window.lnCore.queryGet=Ie,window.lnCore.querySet=$e,window.lnCore.resolveQueryParam=Ne,window.lnCore.querySortEncode=Te,window.lnCore.querySortDecode=je,window.lnCore.queryFilterEncode=Me,window.lnCore.queryFilterDecode=Be);function Ue(){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=Ue);function We(e,t="-"){if(e==null)return"";const n=t||"-",o=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return String(e).normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,n).replace(new RegExp(`${o}+`,"g"),n).replace(new RegExp(`^${o}+|${o}+$`,"g"),"")}(function(){const e="data-ln-slug-from",t="lnSlug";if(window[t]!==void 0)return;const n={"data-ln-slug-from":{prop:"sourceName",type:"string",read:g,fallback:"",description:"Name of the source input field to derive URL slug from"}},o=P(n),l=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");function s(i){if(i.tagName!=="INPUT")return console.warn("[ln-slug] Can only be applied to <input>, got:",i.tagName),this;const c=i.form;if(!c)return console.warn("[ln-slug] Slug input is not inside a <form>:",i),this;V(this,i,o);const r=c.elements[this.sourceName];if(!r)return console.warn('[ln-slug] Source field "'+this.sourceName+'" not found in form:',i),this;if(typeof r.addEventListener!="function")return console.warn('[ln-slug] Source field "'+this.sourceName+'" is a RadioNodeList (same-name group) — single source field required:',i),this;this.dom=i,this.form=c,this.source=r,this._pristine=i.value==="",this._mirroring=!1;const u=this;return le(i,l,{get:function(){return l.get.call(i)},set:function(a){l.set.call(i,a),u._mirroring||(u._pristine=a===""||a===null||a===void 0)}}),this._onSource=function(){u._pristine&&u._mirror()},this._onSlug=function(){u._mirroring||(u._pristine=u.dom.value==="")},this._onFormReset=function(){setTimeout(function(){u._pristine=u.dom.value===""},0)},r.addEventListener("input",this._onSource),i.addEventListener("input",this._onSlug),c.addEventListener("reset",this._onFormReset),this._pristine&&r.value&&r.value.trim()!==""&&this._mirror(),this}s.prototype._mirror=function(){this._mirroring=!0,this.dom.value=We(this.source.value),this.dom.dispatchEvent(new Event("input",{bubbles:!0})),this._mirroring=!1},s.prototype.destroy=function(){this.dom[t]&&(this.source.removeEventListener("input",this._onSource),this.dom.removeEventListener("input",this._onSlug),this._onFormReset&&this.form&&this.form.removeEventListener("reset",this._onFormReset),Object.defineProperty(this.dom,"value",l),delete this.dom[t])},G(e,t,s,"ln-slug",{attributes:n})})()})();
|
|
1
|
+
(function(){"use strict";function D(){if(typeof window>"u")return!1;if(window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink)return!0;if(typeof document<"u"){if(document.documentElement&&document.documentElement.hasAttribute("data-ln-debug"))return!0;if(document.body)return document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null}return!1}function y(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let o=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){o=t[l];break}if(!y(o))return}e.apply(console,t)}}function te(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function p(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){p(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function ne(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function re(e,t){const n=!!(t&&t.typed),o=t&&t.exclude,l={},s=e.elements,i={};if(n)for(let c=0;c<s.length;c++){const r=s[c];r.name&&r.type==="checkbox"&&!r.disabled&&(i[r.name]=(i[r.name]||0)+1)}for(let c=0;c<s.length;c++){const r=s[c];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(o&&r.matches&&r.matches(o)))if(r.type==="checkbox")n&&i[r.name]===1?l[r.name]=r.checked:(l[r.name]||(l[r.name]=[]),r.checked&&l[r.name].push(r.value));else if(r.type==="radio")r.checked&&(l[r.name]=r.value);else if(r.type==="select-multiple"){l[r.name]=[];for(let u=0;u<r.options.length;u++)r.options[u].selected&&l[r.name].push(r.options[u].value)}else if(n&&r.type==="hidden")l[r.name]=r.value;else if(n&&(r.type==="number"||r.type==="range")){const u=Number(r.value);l[r.name]=r.value===""||isNaN(u)?null:u}else l[r.name]=r.value}return l}function oe(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 n=e.elements,o=[],l={};for(let s=0;s<n.length;s++){const i=n[s];i.name&&i.type==="checkbox"&&(l[i.name]=(l[i.name]||0)+1)}for(let s=0;s<n.length;s++){const i=n[s];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const c=i.getAttribute("data-ln-fill-as")||i.name;if(!c||!(c in t))continue;const r=t[c];if(i.type==="checkbox"){if(Array.isArray(r))i.checked=r.indexOf(i.value)!==-1;else if(l[i.name]>1){const u=String(r).split(",").map(function(a){return a.trim()});i.checked=u.indexOf(i.value)!==-1}else i.checked=oe(r);o.push(i)}else if(i.type==="radio")i.checked=i.value===String(r),o.push(i);else if(i.type==="select-multiple"){if(Array.isArray(r))for(let u=0;u<i.options.length;u++)i.options[u].selected=r.indexOf(i.options[u].value)!==-1;o.push(i)}else i.value=r,i.tagName==="SELECT"&&r!=null&&i.setAttribute("data-ln-value",r),o.push(i)}return o}function le(e,t,{get:n,set:o}){Object.defineProperty(e,"value",{get:function(){return n?n.call(this):t.get.call(this)},set:function(l){o?o.call(this,l,s=>t.set.call(this,s)):t.set.call(this,l)},configurable:!0})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ie,window.lnCore.serializeForm=re,window.lnCore.resolveFormMethod=ne);const q={};function se(e,t){q[e]=t}function ce(e){return q[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=se,window.lnCore.getDataMapper=ce);function ue(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,p(function(){new MutationObserver(function(){te(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const F={};function ae(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];F[n]=t}function de(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return F[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ae,window.lnCore.getLocaleFallback=de,window.lnCore.ensureLocaleObserver=ue);const C={};function fe(e,t){C[e]||(C[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=C[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function R(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let i=0;i<n.length;i++){const c=n[i],r=c.getAttribute("data-ln-field");t[r]!=null&&(c.textContent=t[r])}const o=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<o.length;i++){const c=o[i],r=c.getAttribute("data-ln-attr").split(",");for(let u=0;u<r.length;u++){const a=r[u].trim().split(":");if(a.length!==2)continue;const d=a[0].trim(),f=a[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 u=0;u<r.length;u++){const a=r[u].trim().split(":");if(a.length!==2)continue;const d=a[0].trim(),f=a[1].trim();f in t&&c.classList.toggle(d,!!t[f])}}return e}function we(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let o=0;o<n.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[o],t??null),n[o].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)R(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function I(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,c){return t[c]!==void 0?t[c]:""}))}const o=function(s,i){return t[i]!==void 0?t[i]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let s=0;s<l.length;s++){const i=l[s],c=i.attributes;for(let r=0;r<c.length;r++){const u=c[r];u.value.indexOf("{{")!==-1&&i.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function he(e,t,n,o,l,s){const i={};for(let r=0;r<e.children.length;r++){const u=e.children[r],a=u.getAttribute("data-ln-render-key");a&&(i[a]=u)}const c=document.createDocumentFragment();for(let r=0;r<t.length;r++){const u=t[r],a=String(o(u));let d=i[a];if(d)l(d,u,r);else{const f=fe(n,s);if(!f||(I(f,u),d=f.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",a),l(d,u,r)}c.appendChild(d)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=I,window.lnCore.fill=R,window.lnCore.lnFill=we,window.lnCore.renderList=he);function b(e,t,n){const o=e.getAttribute(t);return o===null?n:o}function $(e,t,n){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?n:o}function N(e,t,n=!1){const o=e.getAttribute(t);if(o===null)return!!n;const l=o.trim().toLowerCase();return!(l==="false"||l==="0")}function T(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const A=new Map;function j(e,t){const n=(e?e.join("|"):"")+"::"+t;if(A.has(n))return A.get(n);const o=new Set(e||[]),l=function(s,i){const c=s.getAttribute(i);return c!==null&&o.has(c)?c:t};return A.set(n,l),l}function M(e,t,n){const o=parseFloat(e.getAttribute(t));return isNaN(o)?n:o}function B(e,t,n){const o=e.getAttribute(t);if(!o)return n;try{return JSON.parse(o)}catch{return n}}function U(e,t,n,o,l){if(!e||t===null)return!0;const s=o||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const c=r=>{l?console.warn(r,l):console.warn(r)};if(i==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const r=e.values||[];return r.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(c(`[${s}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(c(`[${s}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(r){return c(`[${s}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function W(e,t,n){for(const o in n){const[l,s,i]=n[o];Object.defineProperty(e,o,{get:function(){return l(t,s,i)},enumerable:!0,configurable:!0})}return e}function V(e){const t={};for(const n in e){const o=e[n];if(!o||!o.prop)continue;let l=o.read;if(!l&&o.type)switch(o.type){case"enum":l=j(o.values,o.fallback);break;case"integer":l=$;break;case"float":l=M;break;case"boolean":l=N;break;case"list":l=T;break;case"json":l=B;break;case"string":default:l=b;break}l||(l=b),t[o.prop]=[l,n,o.fallback]}return t}function pe(e){const t={};for(const n in e){const o=e[n];o&&o.effect&&(t[n]=o.effect)}return Object.keys(t).length?t:null}function be(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=W,window.lnCore.attrSpec=V,window.lnCore.attrStr=b,window.lnCore.attrInt=$,window.lnCore.attrBool=N,window.lnCore.attrList=T,window.lnCore.attrEnum=j,window.lnCore.attrFloat=M,window.lnCore.attrJson=B);function g(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(n){console.error("["+t.attribute+"] init failed",e,n)}}}function P(e,t,n,o){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:n,ComponentFn:o};if(e.matches&&e.matches(s)&&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 ge(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function me(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 H(){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=H(),n=e.observed||[];for(let o=0;o<n.length;o++){const l=n[o];t.byAttr.has(l)||t.byAttr.set(l,[]),t.byAttr.get(l).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const o in e.attributes){t.byDeclaredAttr.has(o)||t.byDeclaredAttr.set(o,[]);const l=t.byDeclaredAttr.get(o);l.some(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=be(e);if(o===null)t.reactiveWildcard.push(e);else for(const l of o)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function Q(e,t,n,o){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const i=s.effects&&s.effects[n];i?i(t,n,o):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,o)}}function Ce(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,o=H(),l=o.byAttr.get(t),s=D()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(t);if(!n&&!l&&!s)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(s&&y(i)){const c=o.byDeclaredAttr.get(t),r=i.getAttribute(t);for(let u=0;u<c.length;u++)U(c[u].spec,r,t,c[u].componentTag,i)}if(window.lnCore._debugSink&&(n||l)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),n){const c=o.byReactive.get(t);c&&Q(c,i,t,e.oldValue),o.reactiveWildcard.length&&Q(o.reactiveWildcard,i,t,e.oldValue)}if(l)for(let c=0;c<l.length;c++){const r=l[c];if(r.handler){r.handler(i,t,e.oldValue);continue}r.onAttributeChange&&i[r.attribute]?r.onAttributeChange(i,t):(P(i,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(i))}}}function Ae(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,p(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Ce(t[n])}catch(o){console.error("[ln-core] mutation handler failed",t[n].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function _(){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 J(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(o){console.error("["+t.attribute+"] destroy failed",e,o)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function K(e){const 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 o=S();if(e.target&&o.length)for(let l=0;l<o.length;l++){const s=o[l],i=s.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(i)?e.target:e.target.closest?e.target.closest(i):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(i):null;c&&s.onSubtreeChange(c,e)}for(let l=0;l<e.addedNodes.length;l++){const s=e.addedNodes[l];if(s.nodeType!==1)continue;const i=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const r=t[c],u=r.query;if(u&&(s.matches&&s.matches(u)&&(r.ComponentFn&&g(s,r),r.onInit&&r.onInit(s)),i&&s.querySelectorAll)){const a=s.querySelectorAll(u);for(let d=0;d<a.length;d++)r.ComponentFn&&g(a[d],r),r.onInit&&r.onInit(a[d])}}}for(let l=0;l<e.removedNodes.length;l++){const s=e.removedNodes[l];if(s.nodeType!==1||document.contains(s))continue;const i=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const r=t[c],u=r.query;if(u&&(s.matches&&s.matches(u)&&J(s,r),i&&s.querySelectorAll)){const a=s.querySelectorAll(u);for(let d=0;d<a.length;d++)J(a[d],r)}}}}function z(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,p(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const o=t[n];if(o.type==="childList")try{K(o)}catch(l){console.error("[ln-core] lifecycle handler failed",o.target,l)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function _e(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const n=t.takeRecords();for(let o=0;o<n.length;o++){const l=n[o];if(l.type==="childList")try{K(l)}catch(s){console.error("[ln-core] lifecycle handler failed",l.target,s)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function Se(e){_().push(e),e.onSubtreeChange&&e.query&&S().push(e),z()}function G(e,t,n,o,l={}){const s=l.extraAttributes||[],i=l.onAttributeChange||null,c=l.onSubtreeChange||null,r=l.onInit||null,u=l.onAttrChange||null,a=l.effects||null,d=l.attributes||null,f=d?pe(d):a,Ve=d?new Set(Object.keys(d)):null,Pe=l.persist||null;function m(k){const w=k||document.body;if(P(w,e,t,n),d&&D())for(const h in d){const Qe=d[h],E=Array.from(w.querySelectorAll("["+h+"]"));w.matches&&w.matches("["+h+"]")&&E.push(w);for(let L=0;L<E.length;L++){const O=E[L];y(O)&&U(Qe,O.getAttribute(h),h,o,O)}}r&&r(w)}const x=[];if(e.indexOf("[")!==-1){const k=/\[([\w-]+)/g;let w;for(;(w=k.exec(e))!==null;)x.push(w[1])}else x.push(e);ye({selector:e,attribute:t,componentTag:o,attributes:d,ComponentFn:n,onInit:r,observed:x.concat(s),onAttributeChange:i,onAttrChange:u,effects:f,declared:Ve,persist:Pe}),Ae();const He=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,Y=l.subtreeQuery||(He?e:"["+e+"]"),Z={selector:e,attribute:t,ComponentFn:n,onInit:r,onSubtreeChange:c,query:Y};_().push(Z),c&&Y&&S().push(Z),z(),window[t]=m,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=G,window.lnCore.observeLifecycle=Se,window.lnCore.withoutLifecycle=_e);function ee(){ge()>0?me(function(){m(document.body)}):m(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ee):ee(),m}function X(e){return(e||"").replace(/^#/,"")}function v(e){const t=e===void 0?location.hash:e,n={},o=X(t);if(!o)return n;const l=o.split("&");for(let s=0;s<l.length;s++){const i=l[s];if(!i)continue;const c=i.indexOf(":"),r=c>-1?i.slice(0,c):i,u=c>-1?i.slice(c+1):"";if(r)try{n[r]=decodeURIComponent(u)}catch{n[r]=u}}return n}function ve(e){if(!e)return null;const t=v();return e in t?t[e]:null}function xe(e,t){if(!e)return;const n=v();t==null?delete n[e]:n[e]=String(t);const l=Object.keys(n).map(function(s){const i=n[s];return i===""?s:s+":"+encodeURIComponent(i)}).join("&");X(location.hash)!==l&&(location.hash=l)}function ke(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ee(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"-"+t:o:t||null}function Le(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Oe(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function De(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function qe(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),o=e.slice(t+1),l=o?o.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=v,window.lnCore.hashGet=ve,window.lnCore.hashSet=xe,window.lnCore.hashLinkClick=ke,window.lnCore.resolveHashNamespace=Ee,window.lnCore.hashSortEncode=Le,window.lnCore.hashSortDecode=Oe,window.lnCore.hashFilterEncode=De,window.lnCore.hashFilterDecode=qe);function Fe(e){return(e||"").replace(/^\?/,"")}function Re(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},o=Fe(t);if(!o)return n;const l=new URLSearchParams(o);for(const[s,i]of l.entries())n[s]=i;return n}function Ie(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function $e(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const o=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",o)}function Ne(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");if(n&&n.trim()!=="")return n.trim();const o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"_"+t:o:t||null}function Te(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function je(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const o=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:o}}}return null}function Me(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function Be(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=Re,window.lnCore.queryGet=Ie,window.lnCore.querySet=$e,window.lnCore.resolveQueryParam=Ne,window.lnCore.querySortEncode=Te,window.lnCore.querySortDecode=je,window.lnCore.queryFilterEncode=Me,window.lnCore.queryFilterDecode=Be);function Ue(){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=Ue);function We(e,t="-"){if(e==null)return"";const n=t||"-",o=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return String(e).normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,n).replace(new RegExp(`${o}+`,"g"),n).replace(new RegExp(`^${o}+|${o}+$`,"g"),"")}(function(){const e="data-ln-slug-from",t="lnSlug";if(window[t]!==void 0)return;const n={"data-ln-slug-from":{prop:"sourceName",type:"string",read:b,fallback:"",description:"Name of the source input field to derive URL slug from"}},o=V(n),l=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");function s(i){if(i.tagName!=="INPUT")return console.warn("[ln-slug] Can only be applied to <input>, got:",i.tagName),this;const c=i.form;if(!c)return console.warn("[ln-slug] Slug input is not inside a <form>:",i),this;W(this,i,o);const r=c.elements[this.sourceName];if(!r)return console.warn('[ln-slug] Source field "'+this.sourceName+'" not found in form:',i),this;if(typeof r.addEventListener!="function")return console.warn('[ln-slug] Source field "'+this.sourceName+'" is a RadioNodeList (same-name group) — single source field required:',i),this;this.dom=i,this.form=c,this.source=r,this._pristine=i.value==="",this._mirroring=!1;const u=this;return le(i,l,{get:function(){return l.get.call(i)},set:function(a){l.set.call(i,a),u._mirroring||(u._pristine=a===""||a===null||a===void 0)}}),this._onSource=function(){u._pristine&&u._mirror()},this._onSlug=function(){u._mirroring||(u._pristine=u.dom.value==="")},this._onFormReset=function(){setTimeout(function(){u._pristine=u.dom.value===""},0)},r.addEventListener("input",this._onSource),i.addEventListener("input",this._onSlug),c.addEventListener("reset",this._onFormReset),this._pristine&&r.value&&r.value.trim()!==""&&this._mirror(),this}s.prototype._mirror=function(){this._mirroring=!0,this.dom.value=We(this.source.value),this.dom.dispatchEvent(new Event("input",{bubbles:!0})),this._mirroring=!1},s.prototype.destroy=function(){this.dom[t]&&(this.source.removeEventListener("input",this._onSource),this.dom.removeEventListener("input",this._onSlug),this._onFormReset&&this.form&&this.form.removeEventListener("reset",this._onFormReset),Object.defineProperty(this.dom,"value",l),delete this.dom[t])},G(e,t,s,"ln-slug",{attributes:n})})()})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";function G(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function D(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let r=null;for(let i=1;i<t.length;i++)if(t[i]&&t[i].nodeType===1){r=t[i];break}if(!D(r))return}e.apply(console,t)}}function _e(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 R(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r);const i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});return e.dispatchEvent(i),i}function q(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){q(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function F(e){return e.hasAttribute("value")?e.getAttribute("value"):e.hasAttribute("data-ln-value")?e.getAttribute("data-ln-value"):e.tagName==="TIME"&&e.hasAttribute("datetime")?e.getAttribute("datetime"):e.textContent.trim()}function Se(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ve(e,t){const n=!!(t&&t.typed),r=t&&t.exclude,i={},c=e.elements,l={};if(n)for(let a=0;a<c.length;a++){const o=c[a];o.name&&o.type==="checkbox"&&!o.disabled&&(l[o.name]=(l[o.name]||0)+1)}for(let a=0;a<c.length;a++){const o=c[a];if(!(!o.name||o.disabled||o.type==="file"||o.type==="submit"||o.type==="button")&&!(r&&o.matches&&o.matches(r)))if(o.type==="checkbox")n&&l[o.name]===1?i[o.name]=o.checked:(i[o.name]||(i[o.name]=[]),o.checked&&i[o.name].push(o.value));else if(o.type==="radio")o.checked&&(i[o.name]=o.value);else if(o.type==="select-multiple"){i[o.name]=[];for(let u=0;u<o.options.length;u++)o.options[u].selected&&i[o.name].push(o.options[u].value)}else if(n&&o.type==="hidden")i[o.name]=o.value;else if(n&&(o.type==="number"||o.type==="range")){const u=Number(o.value);i[o.name]=o.value===""||isNaN(u)?null:u}else i[o.name]=o.value}return i}function Ee(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function xe(e,t){const n=e.elements,r=[],i={};for(let c=0;c<n.length;c++){const l=n[c];l.name&&l.type==="checkbox"&&(i[l.name]=(i[l.name]||0)+1)}for(let c=0;c<n.length;c++){const l=n[c];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const a=l.getAttribute("data-ln-fill-as")||l.name;if(!a||!(a in t))continue;const o=t[a];if(l.type==="checkbox"){if(Array.isArray(o))l.checked=o.indexOf(l.value)!==-1;else if(i[l.name]>1){const u=String(o).split(",").map(function(h){return h.trim()});l.checked=u.indexOf(l.value)!==-1}else l.checked=Ee(o);r.push(l)}else if(l.type==="radio")l.checked=l.value===String(o),r.push(l);else if(l.type==="select-multiple"){if(Array.isArray(o))for(let u=0;u<l.options.length;u++)l.options[u].selected=o.indexOf(l.options[u].value)!==-1;r.push(l)}else l.value=o,l.tagName==="SELECT"&&o!=null&&l.setAttribute("data-ln-value",o),r.push(l)}return r}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=xe,window.lnCore.serializeForm=ve,window.lnCore.resolveFormMethod=Se);const X={};function ke(e,t){X[e]=t}function qe(e){return X[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ke,window.lnCore.getDataMapper=qe);function Le(e){const t=e?e.closest("[lang]"):null,n=(t?t.getAttribute("lang")||t.lang:null)||(typeof document<"u"&&document.documentElement?document.documentElement.getAttribute("lang")||document.documentElement.lang:null)||(typeof navigator<"u"?navigator.language:null);return n?n.trim():"en-US"}function Ie(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,q(function(){new MutationObserver(function(){_e(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const Y={};function Te(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];Y[n]=t}function Oe(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return Y[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Te,window.lnCore.getLocaleFallback=Oe,window.lnCore.ensureLocaleObserver=Ie);const N={};function De(e,t){N[e]||(N[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=N[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function Z(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let l=0;l<n.length;l++){const a=n[l],o=a.getAttribute("data-ln-field");t[o]!=null&&(a.textContent=t[o])}const r=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<r.length;l++){const a=r[l],o=a.getAttribute("data-ln-attr").split(",");for(let u=0;u<o.length;u++){const h=o[u].trim().split(":");if(h.length!==2)continue;const b=h[0].trim(),A=h[1].trim();t[A]!=null&&a.setAttribute(b,t[A])}}const i=e.querySelectorAll("[data-ln-show]");for(let l=0;l<i.length;l++){const a=i[l],o=a.getAttribute("data-ln-show");o in t&&a.classList.toggle("hidden",!t[o])}const c=e.querySelectorAll("[data-ln-class]");for(let l=0;l<c.length;l++){const a=c[l],o=a.getAttribute("data-ln-class").split(",");for(let u=0;u<o.length;u++){const h=o[u].trim().split(":");if(h.length!==2)continue;const b=h[0].trim(),A=h[1].trim();A in t&&a.classList.toggle(b,!!t[A])}}return e}function Re(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)Z(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 ee(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const c=n.currentNode;c.textContent.indexOf("{{")!==-1&&(c.textContent=c.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,a){return t[a]!==void 0?t[a]:""}))}const r=function(c,l){return t[l]!==void 0?t[l]:""},i=Array.from(e.querySelectorAll("*"));e.nodeType===1&&i.push(e);for(let c=0;c<i.length;c++){const l=i[c],a=l.attributes;for(let o=0;o<a.length;o++){const u=a[o];u.value.indexOf("{{")!==-1&&l.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function Fe(e,t,n,r,i,c){const l={};for(let o=0;o<e.children.length;o++){const u=e.children[o],h=u.getAttribute("data-ln-render-key");h&&(l[h]=u)}const a=document.createDocumentFragment();for(let o=0;o<t.length;o++){const u=t[o],h=String(r(u));let b=l[h];if(b)i(b,u,o);else{const A=De(n,c);if(!A||(ee(A,u),b=A.firstElementChild,!b))continue;b.setAttribute("data-ln-render-key",h),i(b,u,o)}a.appendChild(b)}e.textContent="",e.appendChild(a)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=ee,window.lnCore.fill=Z,window.lnCore.lnFill=Re,window.lnCore.renderList=Fe);function L(e,t,n){const r=e.getAttribute(t);return r===null?n:r}function te(e,t,n){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?n:r}function ne(e,t,n=!1){const r=e.getAttribute(t);if(r===null)return!!n;const i=r.trim().toLowerCase();return!(i==="false"||i==="0")}function re(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const $=new Map;function oe(e,t){const n=(e?e.join("|"):"")+"::"+t;if($.has(n))return $.get(n);const r=new Set(e||[]),i=function(c,l){const a=c.getAttribute(l);return a!==null&&r.has(a)?a:t};return $.set(n,i),i}function ie(e,t,n){const r=parseFloat(e.getAttribute(t));return isNaN(r)?n:r}function le(e,t,n){const r=e.getAttribute(t);if(!r)return n;try{return JSON.parse(r)}catch{return n}}function se(e,t,n,r,i){if(!e||t===null)return!0;const c=r||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const a=o=>{i?console.warn(o,i):console.warn(o)};if(l==="boolean"){const o=t.trim().toLowerCase();return o!==""&&o!=="true"&&o!=="false"&&o!=="1"&&o!=="0"?(a(`[${c}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const o=e.values||[];return o.includes(t)?!0:(a(`[${c}] Invalid value "${t}" for attribute "${n}". Allowed: ${o.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return a(`[${c}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const o=parseInt(t,10);return e.min!==void 0&&o<e.min?(a(`[${c}] Value ${o} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(a(`[${c}] Value ${o} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(a(`[${c}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(o){return a(`[${c}] Invalid JSON for attribute "${n}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function ce(e,t,n){for(const r in n){const[i,c,l]=n[r];Object.defineProperty(e,r,{get:function(){return i(t,c,l)},enumerable:!0,configurable:!0})}return e}function ae(e){const t={};for(const n in e){const r=e[n];if(!r||!r.prop)continue;let i=r.read;if(!i&&r.type)switch(r.type){case"enum":i=oe(r.values,r.fallback);break;case"integer":i=te;break;case"float":i=ie;break;case"boolean":i=ne;break;case"list":i=re;break;case"json":i=le;break;case"string":default:i=L;break}i||(i=L),t[r.prop]=[i,n,r.fallback]}return t}function Ne(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 $e(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=ce,window.lnCore.attrSpec=ae,window.lnCore.attrStr=L,window.lnCore.attrInt=te,window.lnCore.attrBool=ne,window.lnCore.attrList=re,window.lnCore.attrEnum=oe,window.lnCore.attrFloat=ie,window.lnCore.attrJson=le);function x(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(n){console.error("["+t.attribute+"] init failed",e,n)}}}function ue(e,t,n,r){if(e.nodeType!==1)return;const c=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:n,ComponentFn:r};if(e.matches&&e.matches(c)&&x(e,l),e.querySelectorAll){const a=e.querySelectorAll(c);for(let o=0;o<a.length;o++)x(a[o],l)}}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 I(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 de(){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 Pe(e){const t=de(),n=e.observed||[];for(let r=0;r<n.length;r++){const i=n[r];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 r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const i=t.byDeclaredAttr.get(r);i.some(c=>c.componentTag===e.componentTag)||i.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=$e(e);if(r===null)t.reactiveWildcard.push(e);else for(const i of r)t.byReactive.has(i)||t.byReactive.set(i,[]),t.byReactive.get(i).push(e)}e.persist&&t.persist.push(e)}function fe(e,t,n,r){for(let i=0;i<e.length;i++){const c=e[i];if(!t[c.attribute])continue;const l=c.effects&&c.effects[n];l?l(t,n,r):c.onAttrChange&&(!c.declared||c.declared.has(n))&&c.onAttrChange(t,n,r)}}function Me(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,r=de(),i=r.byAttr.get(t),c=G()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(t);if(!n&&!i&&!c)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(c&&D(l)){const a=r.byDeclaredAttr.get(t),o=l.getAttribute(t);for(let u=0;u<a.length;u++)se(a[u].spec,o,t,a[u].componentTag,l)}if(window.lnCore._debugSink&&(n||i)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),n){const a=r.byReactive.get(t);a&&fe(a,l,t,e.oldValue),r.reactiveWildcard.length&&fe(r.reactiveWildcard,l,t,e.oldValue)}if(i)for(let a=0;a<i.length;a++){const o=i[a];if(o.handler){o.handler(l,t,e.oldValue);continue}o.onAttributeChange&&l[o.attribute]?o.onAttributeChange(l,t):(ue(l,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(l))}}}function je(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,q(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Me(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 B(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function P(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function M(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 he(e){const t=B();if(!t.length)return;const n=e.target;if(n){const i=n.nodeType===1?n:n.parentElement;if(i&&(i.isContentEditable||i.closest&&i.closest('[contenteditable]:not([contenteditable="false"])')))return}const r=P();if(e.target&&r.length)for(let i=0;i<r.length;i++){const c=r[i],l=c.query,a=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;a&&c.onSubtreeChange(a,e)}for(let i=0;i<e.addedNodes.length;i++){const c=e.addedNodes[i];if(c.nodeType===1){const l=!!(c.firstElementChild||c.children&&c.children.length);for(let a=0;a<t.length;a++){const o=t[a];if(o.selector&&o.attribute&&o.ComponentFn){if(!l)c.matches&&c.matches(o.query)&&x(c,o);else if(c.matches&&c.matches(o.query)&&x(c,o),c.querySelectorAll){const u=c.querySelectorAll(o.query);for(let h=0;h<u.length;h++)x(u[h],o)}}o.onInit&&o.onInit(c)}}}for(let i=0;i<e.removedNodes.length;i++){const c=e.removedNodes[i];if(c.nodeType===1){if(document.contains(c))continue;const l=!!(c.firstElementChild||c.children&&c.children.length);for(let a=0;a<t.length;a++){const o=t[a],u=o.query;if(u){if(!l)c.matches&&c.matches(u)&&M(c,o);else if(c.matches&&c.matches(u)&&M(c,o),c.querySelectorAll){const h=c.querySelectorAll(u);for(let b=0;b<h.length;b++)M(h[b],o)}}}}}}function we(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,q(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{he(r)}catch(i){console.error("[ln-core] lifecycle handler failed",r.target,i)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function pe(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const n=t.takeRecords();for(let r=0;r<n.length;r++){const i=n[r];if(i.type==="childList")try{he(i)}catch(c){console.error("[ln-core] lifecycle handler failed",i.target,c)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function Ue(e){B().push(e),e.onSubtreeChange&&e.query&&P().push(e),we()}function be(e,t,n,r,i={}){const c=i.extraAttributes||[],l=i.onAttributeChange||null,a=i.onSubtreeChange||null,o=i.onInit||null,u=i.onAttrChange||null,h=i.effects||null,b=i.attributes||null,A=b?Ne(b):h,E=b?new Set(Object.keys(b)):null,d=i.persist||null;function g(C){const m=C||document.body;if(ue(m,e,t,n),b&&G())for(const S in b){const z=b[S],k=Array.from(m.querySelectorAll("["+S+"]"));m.matches&&m.matches("["+S+"]")&&k.push(m);for(let _=0;_<k.length;_++){const J=k[_];D(J)&&se(z,J.getAttribute(S),S,r,J)}}o&&o(m)}const s=[];if(e.indexOf("[")!==-1){const C=/\[([\w-]+)/g;let m;for(;(m=C.exec(e))!==null;)s.push(m[1])}else s.push(e);Pe({selector:e,attribute:t,componentTag:r,attributes:b,ComponentFn:n,onInit:o,observed:s.concat(c),onAttributeChange:l,onAttrChange:u,effects:A,declared:E,persist:d}),je();const y=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,w=i.subtreeQuery||(y?e:"["+e+"]"),p={selector:e,attribute:t,ComponentFn:n,onInit:o,onSubtreeChange:a,query:w};B().push(p),a&&w&&P().push(p),we(),window[t]=g,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=be,window.lnCore.observeLifecycle=Ue,window.lnCore.withoutLifecycle=pe);function f(){Be()>0?I(function(){g(document.body)}):g(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",f):f(),g}function Ve(e){let t=!1;for(let n=0;n<e.length;n++){const r=e[n];if(!(r===""||r==null)&&(t=!0,!Number.isFinite(Number(r))))return"string"}return t?"number":"string"}function He(e,t,n,r){if(n==="number"){const l=parseFloat(e),a=parseFloat(t);return(isNaN(l)?0:l)-(isNaN(a)?0:a)}const i=e!=null?String(e):"",c=t!=null?String(t):"";return r?r.compare(i,c):i<c?-1:i>c?1:0}function ge(e){return(e||"").replace(/^#/,"")}function j(e){const t=e===void 0?location.hash:e,n={},r=ge(t);if(!r)return n;const i=r.split("&");for(let c=0;c<i.length;c++){const l=i[c];if(!l)continue;const a=l.indexOf(":"),o=a>-1?l.slice(0,a):l,u=a>-1?l.slice(a+1):"";if(o)try{n[o]=decodeURIComponent(u)}catch{n[o]=u}}return n}function U(e){if(!e)return null;const t=j();return e in t?t[e]:null}function me(e,t){if(!e)return;const n=j();t==null?delete n[e]:n[e]=String(t);const i=Object.keys(n).map(function(c){const l=n[c];return l===""?c:c+":"+encodeURIComponent(l)}).join("&");ge(location.hash)!==i&&(location.hash=i)}function We(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function T(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 ye(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function V(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Ke(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Qe(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),i=r?r.split(",").map(function(c){try{return decodeURIComponent(c)}catch{return c}}).filter(Boolean):[];return{key:n,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=j,window.lnCore.hashGet=U,window.lnCore.hashSet=me,window.lnCore.hashLinkClick=We,window.lnCore.resolveHashNamespace=T,window.lnCore.hashSortEncode=ye,window.lnCore.hashSortDecode=V,window.lnCore.hashFilterEncode=Ke,window.lnCore.hashFilterDecode=Qe);function ze(e){return(e||"").replace(/^\?/,"")}function H(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},r=ze(t);if(!r)return n;const i=new URLSearchParams(r);for(const[c,l]of i.entries())n[c]=l;return n}function W(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function Ce(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const r=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",r)}function O(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");if(n&&n.trim()!=="")return n.trim();const 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 Ae(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function K(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const r=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:r}}}return null}function Je(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function Ge(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=H,window.lnCore.queryGet=W,window.lnCore.querySet=Ce,window.lnCore.resolveQueryParam=O,window.lnCore.querySortEncode=Ae,window.lnCore.querySortDecode=K,window.lnCore.queryFilterEncode=Je,window.lnCore.queryFilterDecode=Ge);function Xe(){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=Xe);function v(e){const t=String(e||"").trim().toLowerCase();return t==="asc"||t==="ascending"?"asc":t==="desc"||t==="descending"?"desc":"none"}function Ye(e){const t=v(e);return t==="asc"?"ascending":t==="desc"?"descending":"none"}function Ze(e,t){return!e||!t?!1:e.field!==null&&e.field!==void 0&&t.field!==null&&t.field!==void 0?e.field===t.field:e.column!==null&&e.column!==void 0&&t.column!==null&&t.column!==void 0?String(e.column)===String(t.column):!1}function et(e,t,n,r){const i=v(e);if(i==="none")return()=>0;const c=i==="desc"?-1:1,l=typeof r=="function"?r:a=>a;return function(a,o){const u=l(a),h=l(o);return He(u,h,t,n)*c}}function Q(e){return!!(!e||typeof e!="object"||e.nodeType!==1||e.tagName==="TEMPLATE"||typeof e.hasAttribute=="function"&&(e.hasAttribute("data-ln-sort-exclude")||e.hasAttribute("hidden"))||e.classList&&e.classList.contains("hidden")||e.style&&e.style.display==="none"||typeof e.matches=="function"&&e.matches(".empty-state, .ln-table__empty, .ln-table__empty-state, [data-ln-empty], [data-ln-empty-state], [data-ln-table-empty]"))}function tt(e,t){if(!e||typeof e!="object"||e.nodeType!==1)return[];const n=t||(typeof e.getAttribute=="function"?e.getAttribute("data-ln-sort-items"):null)||null;if(n&&typeof e.querySelectorAll=="function")return Array.from(e.querySelectorAll(n));if(e.tagName==="TABLE"){const r=e.tBodies&&e.tBodies.length?e.tBodies[0]:typeof e.querySelector=="function"?e.querySelector("tbody"):null;if(r)return Array.from(r.children||[]);if(typeof e.querySelectorAll=="function")return Array.from(e.querySelectorAll("tbody tr, tr"))}return Array.from(e.children||[])}(function(){const e="data-ln-sort",t="lnSort",n="data-ln-sort-field",r="data-ln-sort-state",i="data-ln-sort-dir",c="data-ln-hash",l="data-ln-query";if(window[t]!==void 0)return;function a(d,g){return d.getAttribute(g)||null}const o={"data-ln-sort":{prop:"targetId",type:"string",read:L,fallback:null,description:"Target table or list element ID to sort"},"data-ln-sort-field":{prop:"field",type:"string",read:a,effect:E,description:"Field name or column key to sort by"},"data-ln-sort-dir":{type:"enum",values:["asc","desc"],fallback:"asc",description:"Default or requested sort direction"},"data-ln-sort-items":{prop:"itemsSelector",type:"string",read:a,description:"CSS selector matching sortable child items"},"data-ln-sort-state":{type:"enum",values:["asc","desc","none"],fallback:"none",effect:E,description:"Active sort state applied to column or control"},"data-ln-hash":{type:"string",effect:E,description:"URL hash routing key for sort state persistence"},"data-ln-query":{type:"string",effect:E,description:"URL query parameter name for sort state persistence"}},u=ae(o),h=new WeakMap;function b(d,g,s){if(g){const y=d.querySelector('[data-ln-field="'+g+'"]');return y?F(y):""}return s!=null&&d.cells&&d.cells[s]?F(d.cells[s]):F(d)}function A(d){this.dom=d,ce(this,d,u);const g=d.closest("th");this.column=!this.field&&g?g.cellIndex:null,this._state=v(d.getAttribute(r)),d.hasAttribute(r)||d.setAttribute(r,this._state),this._destroyed=!1,this.nsKey=T(d,"sort"),this.hashEnabled=!!this.nsKey,this.queryParam=O(d,"sort"),this.queryEnabled=!!this.queryParam;const s=this;this._onClick=function(w){const p=w.target.closest("["+i+"]");if(!p)return;const f=v(p.getAttribute(i));s._apply(f)},d.addEventListener("click",this._onClick),this._onSortChange=function(w){if(s._destroyed||!w.detail)return;const p=s._resolveTarget();if(!(p&&(w.target===p||p.contains(w.target))||w.detail.targetId&&w.detail.targetId===s.targetId))return;if(Ze({field:s.field,column:s.column},{field:w.detail.field,column:w.detail.column})){const m=v(w.detail.direction);m&&d.getAttribute(r)!==m&&(s._state=m,d.setAttribute(r,m),s._updateAriaSort(m));return}d.getAttribute(r)!=="none"&&(s._state="none",d.setAttribute(r,"none"),s._updateAriaSort("none"))},document.addEventListener("ln-sort:change",this._onSortChange),this._onHashChange=function(){if(s._destroyed||!s.hashEnabled)return;const w=U(s.nsKey),p=V(w);if(p)s.field!==null&&p.fieldOrColumn===s.field||s.column!==null&&String(s.column)===p.fieldOrColumn?s._state!==p.direction&&s._apply(p.direction,!0):s._state!=="none"&&(s._state="none",d.setAttribute(r,"none"),s._updateAriaSort("none"));else if(s._state!=="none"){s._state="none",d.setAttribute(r,"none"),s._updateAriaSort("none");const f=s._resolveTarget();f&&(R(f,"ln-sort:change",{field:s.field,column:s.column,direction:"none",targetId:s.targetId}).defaultPrevented||s._defaultSort(f,"none"))}},this._onPopState=function(){if(s._destroyed||!s.queryEnabled)return;const w=W(s.queryParam),p=H(),f=K(w,p);if(f)s.field!==null&&f.fieldOrColumn===s.field||s.column!==null&&String(s.column)===f.fieldOrColumn?s._state!==f.direction&&s._apply(f.direction,!0):s._state!=="none"&&(s._state="none",d.setAttribute(r,"none"),s._updateAriaSort("none"));else if(s._state!=="none"){s._state="none",d.setAttribute(r,"none"),s._updateAriaSort("none");const C=s._resolveTarget();C&&(R(C,"ln-sort:change",{field:s.field,column:s.column,direction:"none",targetId:s.targetId}).defaultPrevented||s._defaultSort(C,"none"))}},this.hashEnabled&&window.addEventListener("hashchange",this._onHashChange),this.queryEnabled&&window.addEventListener("popstate",this._onPopState);let y=!1;if(this.hashEnabled){const w=U(this.nsKey),p=V(w);p&&((s.field!==null&&p.fieldOrColumn===s.field||s.column!==null&&String(s.column)===p.fieldOrColumn)&&I(function(){s._destroyed||s._apply(p.direction,!0)}),y=!0)}else if(this.queryEnabled){const w=W(this.queryParam),p=H(),f=K(w,p);f&&((s.field!==null&&f.fieldOrColumn===s.field||s.column!==null&&String(s.column)===f.fieldOrColumn)&&I(function(){s._destroyed||s._apply(f.direction,!0)}),y=!0)}if(!y){const w=v(d.getAttribute(r));w&&w!=="none"&&I(function(){s._destroyed||s._apply(w,!0)})}return this}A.prototype._resolveTarget=function(){return document.getElementById(this.targetId)},A.prototype._updateAriaSort=function(d){const g=this.dom.closest("th");g&&g.setAttribute("aria-sort",Ye(d))},A.prototype._apply=function(d,g){if(this._destroyed)return;if(!this.field&&this.column===null){const f=this.dom.closest("th");f&&f.cellIndex!==void 0&&(this.column=f.cellIndex)}const s=v(d);this._state=s,this.dom.getAttribute(r)!==s&&this.dom.setAttribute(r,s),this._updateAriaSort(s);const y=this._resolveTarget();if(!y)return;const w={field:this.field,column:this.column,direction:s,targetId:this.targetId};if(!g){if(this.hashEnabled){const f=ye(this.field!==null?this.field:this.column,s);me(this.nsKey,f)}else if(this.queryEnabled){const f=Ae(this.field!==null?this.field:this.column,s);Ce(this.queryParam,f)}}R(y,"ln-sort:change",w).defaultPrevented||this._defaultSort(y,s)},A.prototype._defaultSort=function(d,g){const s=tt(d,this.itemsSelector);if(!s.length)return;const y=s[0].parentNode,w=s.filter(function(f){return!Q(f)});if(!w.length)return;h.has(d)||h.set(d,w.slice());let p;if(g==="none"){const f=h.get(d)||w;h.delete(d),p=f.filter(function(C){return C.parentNode===y&&!Q(C)})}else{const f=this.field,C=this.column,m=w.map(function(_){return{el:_,val:b(_,f,C)}}),S=Ve(m.map(function(_){return _.val})),z=typeof Intl<"u"?new Intl.Collator(Le(this.dom),{sensitivity:"base",numeric:!0}):null,k=et(g,S,z,function(_){return _.val});m.sort(k),p=m.map(function(_){return _.el})}pe(function(){const f=document.createDocumentFragment();let C=0;for(let m=0;m<s.length;m++){const S=s[m];Q(S)?f.appendChild(S):C<p.length&&f.appendChild(p[C++])}y.appendChild(f)})},A.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.dom.removeEventListener("click",this._onClick),document.removeEventListener("ln-sort:change",this._onSortChange),this.hashEnabled&&this._onHashChange&&window.removeEventListener("hashchange",this._onHashChange),this.queryEnabled&&this._onPopState&&window.removeEventListener("popstate",this._onPopState),delete this.dom[t])};function E(d,g){const s=d[t];if(!(!s||s._destroyed))if(g===n){const y=d.closest("th");s.column=!s.field&&y?y.cellIndex:null}else if(g===r){const y=v(d.getAttribute(r));y!==s._state&&s._apply(y)}else g===c?(s.hashEnabled&&s._onHashChange&&window.removeEventListener("hashchange",s._onHashChange),s.nsKey=T(d,"sort"),s.hashEnabled=!!s.nsKey,s.hashEnabled&&window.addEventListener("hashchange",s._onHashChange)):g===l&&(s.queryEnabled&&s._onPopState&&window.removeEventListener("popstate",s._onPopState),s.queryParam=O(d,"sort"),s.queryEnabled=!!s.queryParam,s.queryEnabled&&window.addEventListener("popstate",s._onPopState))}be(e,t,A,"ln-sort",{attributes:o,persist:{attr:r,hashActive:function(d){return!!T(d,"sort")||!!O(d,"sort")}}})})()})();
|
|
1
|
+
(function(){"use strict";function J(){if(typeof window>"u")return!1;if(window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink)return!0;if(typeof document<"u"){if(document.documentElement&&document.documentElement.hasAttribute("data-ln-debug"))return!0;if(document.body)return document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null}return!1}function D(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let r=null;for(let i=1;i<t.length;i++)if(t[i]&&t[i].nodeType===1){r=t[i];break}if(!D(r))return}e.apply(console,t)}}function _e(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 R(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r);const i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});return e.dispatchEvent(i),i}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 F(e){return e.hasAttribute("value")?e.getAttribute("value"):e.hasAttribute("data-ln-value")?e.getAttribute("data-ln-value"):e.tagName==="TIME"&&e.hasAttribute("datetime")?e.getAttribute("datetime"):e.textContent.trim()}function Se(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ve(e,t){const n=!!(t&&t.typed),r=t&&t.exclude,i={},c=e.elements,l={};if(n)for(let u=0;u<c.length;u++){const o=c[u];o.name&&o.type==="checkbox"&&!o.disabled&&(l[o.name]=(l[o.name]||0)+1)}for(let u=0;u<c.length;u++){const o=c[u];if(!(!o.name||o.disabled||o.type==="file"||o.type==="submit"||o.type==="button")&&!(r&&o.matches&&o.matches(r)))if(o.type==="checkbox")n&&l[o.name]===1?i[o.name]=o.checked:(i[o.name]||(i[o.name]=[]),o.checked&&i[o.name].push(o.value));else if(o.type==="radio")o.checked&&(i[o.name]=o.value);else if(o.type==="select-multiple"){i[o.name]=[];for(let a=0;a<o.options.length;a++)o.options[a].selected&&i[o.name].push(o.options[a].value)}else if(n&&o.type==="hidden")i[o.name]=o.value;else if(n&&(o.type==="number"||o.type==="range")){const a=Number(o.value);i[o.name]=o.value===""||isNaN(a)?null:a}else i[o.name]=o.value}return i}function Ee(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function xe(e,t){const n=e.elements,r=[],i={};for(let c=0;c<n.length;c++){const l=n[c];l.name&&l.type==="checkbox"&&(i[l.name]=(i[l.name]||0)+1)}for(let c=0;c<n.length;c++){const l=n[c];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const u=l.getAttribute("data-ln-fill-as")||l.name;if(!u||!(u in t))continue;const o=t[u];if(l.type==="checkbox"){if(Array.isArray(o))l.checked=o.indexOf(l.value)!==-1;else if(i[l.name]>1){const a=String(o).split(",").map(function(h){return h.trim()});l.checked=a.indexOf(l.value)!==-1}else l.checked=Ee(o);r.push(l)}else if(l.type==="radio")l.checked=l.value===String(o),r.push(l);else if(l.type==="select-multiple"){if(Array.isArray(o))for(let a=0;a<l.options.length;a++)l.options[a].selected=o.indexOf(l.options[a].value)!==-1;r.push(l)}else l.value=o,l.tagName==="SELECT"&&o!=null&&l.setAttribute("data-ln-value",o),r.push(l)}return r}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=xe,window.lnCore.serializeForm=ve,window.lnCore.resolveFormMethod=Se);const G={};function ke(e,t){G[e]=t}function qe(e){return G[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ke,window.lnCore.getDataMapper=qe);function Le(e){const t=e?e.closest("[lang]"):null,n=(t?t.getAttribute("lang")||t.lang:null)||(typeof document<"u"&&document.documentElement?document.documentElement.getAttribute("lang")||document.documentElement.lang:null)||(typeof navigator<"u"?navigator.language:null);return n?n.trim():"en-US"}function Ie(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,k(function(){new MutationObserver(function(){_e(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const X={};function Te(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];X[n]=t}function Oe(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return X[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Te,window.lnCore.getLocaleFallback=Oe,window.lnCore.ensureLocaleObserver=Ie);const N={};function De(e,t){N[e]||(N[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=N[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function Y(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let l=0;l<n.length;l++){const u=n[l],o=u.getAttribute("data-ln-field");t[o]!=null&&(u.textContent=t[o])}const r=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<r.length;l++){const u=r[l],o=u.getAttribute("data-ln-attr").split(",");for(let a=0;a<o.length;a++){const h=o[a].trim().split(":");if(h.length!==2)continue;const p=h[0].trim(),A=h[1].trim();t[A]!=null&&u.setAttribute(p,t[A])}}const i=e.querySelectorAll("[data-ln-show]");for(let l=0;l<i.length;l++){const u=i[l],o=u.getAttribute("data-ln-show");o in t&&u.classList.toggle("hidden",!t[o])}const c=e.querySelectorAll("[data-ln-class]");for(let l=0;l<c.length;l++){const u=c[l],o=u.getAttribute("data-ln-class").split(",");for(let a=0;a<o.length;a++){const h=o[a].trim().split(":");if(h.length!==2)continue;const p=h[0].trim(),A=h[1].trim();A in t&&u.classList.toggle(p,!!t[A])}}return e}function Re(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<n.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[r],t??null),n[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)Y(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function Z(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const c=n.currentNode;c.textContent.indexOf("{{")!==-1&&(c.textContent=c.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,u){return t[u]!==void 0?t[u]:""}))}const r=function(c,l){return t[l]!==void 0?t[l]:""},i=Array.from(e.querySelectorAll("*"));e.nodeType===1&&i.push(e);for(let c=0;c<i.length;c++){const l=i[c],u=l.attributes;for(let o=0;o<u.length;o++){const a=u[o];a.value.indexOf("{{")!==-1&&l.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function Fe(e,t,n,r,i,c){const l={};for(let o=0;o<e.children.length;o++){const a=e.children[o],h=a.getAttribute("data-ln-render-key");h&&(l[h]=a)}const u=document.createDocumentFragment();for(let o=0;o<t.length;o++){const a=t[o],h=String(r(a));let p=l[h];if(p)i(p,a,o);else{const A=De(n,c);if(!A||(Z(A,a),p=A.firstElementChild,!p))continue;p.setAttribute("data-ln-render-key",h),i(p,a,o)}u.appendChild(p)}e.textContent="",e.appendChild(u)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=Z,window.lnCore.fill=Y,window.lnCore.lnFill=Re,window.lnCore.renderList=Fe);function q(e,t,n){const r=e.getAttribute(t);return r===null?n:r}function ee(e,t,n){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?n:r}function te(e,t,n=!1){const r=e.getAttribute(t);if(r===null)return!!n;const i=r.trim().toLowerCase();return!(i==="false"||i==="0")}function ne(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const $=new Map;function re(e,t){const n=(e?e.join("|"):"")+"::"+t;if($.has(n))return $.get(n);const r=new Set(e||[]),i=function(c,l){const u=c.getAttribute(l);return u!==null&&r.has(u)?u:t};return $.set(n,i),i}function oe(e,t,n){const r=parseFloat(e.getAttribute(t));return isNaN(r)?n:r}function ie(e,t,n){const r=e.getAttribute(t);if(!r)return n;try{return JSON.parse(r)}catch{return n}}function le(e,t,n,r,i){if(!e||t===null)return!0;const c=r||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const u=o=>{i?console.warn(o,i):console.warn(o)};if(l==="boolean"){const o=t.trim().toLowerCase();return o!==""&&o!=="true"&&o!=="false"&&o!=="1"&&o!=="0"?(u(`[${c}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const o=e.values||[];return o.includes(t)?!0:(u(`[${c}] Invalid value "${t}" for attribute "${n}". Allowed: ${o.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return u(`[${c}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const o=parseInt(t,10);return e.min!==void 0&&o<e.min?(u(`[${c}] Value ${o} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(u(`[${c}] Value ${o} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(u(`[${c}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(o){return u(`[${c}] Invalid JSON for attribute "${n}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function se(e,t,n){for(const r in n){const[i,c,l]=n[r];Object.defineProperty(e,r,{get:function(){return i(t,c,l)},enumerable:!0,configurable:!0})}return e}function ce(e){const t={};for(const n in e){const r=e[n];if(!r||!r.prop)continue;let i=r.read;if(!i&&r.type)switch(r.type){case"enum":i=re(r.values,r.fallback);break;case"integer":i=ee;break;case"float":i=oe;break;case"boolean":i=te;break;case"list":i=ne;break;case"json":i=ie;break;case"string":default:i=q;break}i||(i=q),t[r.prop]=[i,n,r.fallback]}return t}function Ne(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 $e(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=se,window.lnCore.attrSpec=ce,window.lnCore.attrStr=q,window.lnCore.attrInt=ee,window.lnCore.attrBool=te,window.lnCore.attrList=ne,window.lnCore.attrEnum=re,window.lnCore.attrFloat=oe,window.lnCore.attrJson=ie);function L(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 ue(e,t,n,r){if(e.nodeType!==1)return;const c=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:n,ComponentFn:r};if(e.matches&&e.matches(c)&&L(e,l),e.querySelectorAll){const u=e.querySelectorAll(c);for(let o=0;o<u.length;o++)L(u[o],l)}}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 I(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 ae(){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 Pe(e){const t=ae(),n=e.observed||[];for(let r=0;r<n.length;r++){const i=n[r];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 r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const i=t.byDeclaredAttr.get(r);i.some(c=>c.componentTag===e.componentTag)||i.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=$e(e);if(r===null)t.reactiveWildcard.push(e);else for(const i of r)t.byReactive.has(i)||t.byReactive.set(i,[]),t.byReactive.get(i).push(e)}e.persist&&t.persist.push(e)}function de(e,t,n,r){for(let i=0;i<e.length;i++){const c=e[i];if(!t[c.attribute])continue;const l=c.effects&&c.effects[n];l?l(t,n,r):c.onAttrChange&&(!c.declared||c.declared.has(n))&&c.onAttrChange(t,n,r)}}function Me(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,r=ae(),i=r.byAttr.get(t),c=J()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(t);if(!n&&!i&&!c)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(c&&D(l)){const u=r.byDeclaredAttr.get(t),o=l.getAttribute(t);for(let a=0;a<u.length;a++)le(u[a].spec,o,t,u[a].componentTag,l)}if(window.lnCore._debugSink&&(n||i)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),n){const u=r.byReactive.get(t);u&&de(u,l,t,e.oldValue),r.reactiveWildcard.length&&de(r.reactiveWildcard,l,t,e.oldValue)}if(i)for(let u=0;u<i.length;u++){const o=i[u];if(o.handler){o.handler(l,t,e.oldValue);continue}o.onAttributeChange&&l[o.attribute]?o.onAttributeChange(l,t):(ue(l,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(l))}}}function je(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,k(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Me(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 B(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function P(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function fe(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 he(e){const t=B();if(!t.length)return;const n=e.target;if(n){const i=n.nodeType===1?n:n.parentElement;if(i&&(i.isContentEditable||i.closest&&i.closest('[contenteditable]:not([contenteditable="false"])')))return}const r=P();if(e.target&&r.length)for(let i=0;i<r.length;i++){const c=r[i],l=c.query,u=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;u&&c.onSubtreeChange(u,e)}for(let i=0;i<e.addedNodes.length;i++){const c=e.addedNodes[i];if(c.nodeType!==1)continue;const l=!!(c.firstElementChild||c.children&&c.children.length);for(let u=0;u<t.length;u++){const o=t[u],a=o.query;if(a&&(c.matches&&c.matches(a)&&(o.ComponentFn&&L(c,o),o.onInit&&o.onInit(c)),l&&c.querySelectorAll)){const h=c.querySelectorAll(a);for(let p=0;p<h.length;p++)o.ComponentFn&&L(h[p],o),o.onInit&&o.onInit(h[p])}}}for(let i=0;i<e.removedNodes.length;i++){const c=e.removedNodes[i];if(c.nodeType!==1||document.contains(c))continue;const l=!!(c.firstElementChild||c.children&&c.children.length);for(let u=0;u<t.length;u++){const o=t[u],a=o.query;if(a&&(c.matches&&c.matches(a)&&fe(c,o),l&&c.querySelectorAll)){const h=c.querySelectorAll(a);for(let p=0;p<h.length;p++)fe(h[p],o)}}}}function we(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,k(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{he(r)}catch(i){console.error("[ln-core] lifecycle handler failed",r.target,i)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function pe(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const n=t.takeRecords();for(let r=0;r<n.length;r++){const i=n[r];if(i.type==="childList")try{he(i)}catch(c){console.error("[ln-core] lifecycle handler failed",i.target,c)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function Ue(e){B().push(e),e.onSubtreeChange&&e.query&&P().push(e),we()}function be(e,t,n,r,i={}){const c=i.extraAttributes||[],l=i.onAttributeChange||null,u=i.onSubtreeChange||null,o=i.onInit||null,a=i.onAttrChange||null,h=i.effects||null,p=i.attributes||null,A=p?Ne(p):h,E=p?new Set(Object.keys(p)):null,d=i.persist||null;function g(C){const m=C||document.body;if(ue(m,e,t,n),p&&J())for(const S in p){const Q=p[S],x=Array.from(m.querySelectorAll("["+S+"]"));m.matches&&m.matches("["+S+"]")&&x.push(m);for(let _=0;_<x.length;_++){const z=x[_];D(z)&&le(Q,z.getAttribute(S),S,r,z)}}o&&o(m)}const s=[];if(e.indexOf("[")!==-1){const C=/\[([\w-]+)/g;let m;for(;(m=C.exec(e))!==null;)s.push(m[1])}else s.push(e);Pe({selector:e,attribute:t,componentTag:r,attributes:p,ComponentFn:n,onInit:o,observed:s.concat(c),onAttributeChange:l,onAttrChange:a,effects:A,declared:E,persist:d}),je();const y=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,w=i.subtreeQuery||(y?e:"["+e+"]"),b={selector:e,attribute:t,ComponentFn:n,onInit:o,onSubtreeChange:u,query:w};B().push(b),u&&w&&P().push(b),we(),window[t]=g,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=be,window.lnCore.observeLifecycle=Ue,window.lnCore.withoutLifecycle=pe);function f(){Be()>0?I(function(){g(document.body)}):g(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",f):f(),g}function Ve(e){let t=!1;for(let n=0;n<e.length;n++){const r=e[n];if(!(r===""||r==null)&&(t=!0,!Number.isFinite(Number(r))))return"string"}return t?"number":"string"}function He(e,t,n,r){if(n==="number"){const l=parseFloat(e),u=parseFloat(t);return(isNaN(l)?0:l)-(isNaN(u)?0:u)}const i=e!=null?String(e):"",c=t!=null?String(t):"";return r?r.compare(i,c):i<c?-1:i>c?1:0}function ge(e){return(e||"").replace(/^#/,"")}function M(e){const t=e===void 0?location.hash:e,n={},r=ge(t);if(!r)return n;const i=r.split("&");for(let c=0;c<i.length;c++){const l=i[c];if(!l)continue;const u=l.indexOf(":"),o=u>-1?l.slice(0,u):l,a=u>-1?l.slice(u+1):"";if(o)try{n[o]=decodeURIComponent(a)}catch{n[o]=a}}return n}function j(e){if(!e)return null;const t=M();return e in t?t[e]:null}function me(e,t){if(!e)return;const n=M();t==null?delete n[e]:n[e]=String(t);const i=Object.keys(n).map(function(c){const l=n[c];return l===""?c:c+":"+encodeURIComponent(l)}).join("&");ge(location.hash)!==i&&(location.hash=i)}function We(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function T(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 ye(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function U(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Ke(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Qe(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),i=r?r.split(",").map(function(c){try{return decodeURIComponent(c)}catch{return c}}).filter(Boolean):[];return{key:n,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=M,window.lnCore.hashGet=j,window.lnCore.hashSet=me,window.lnCore.hashLinkClick=We,window.lnCore.resolveHashNamespace=T,window.lnCore.hashSortEncode=ye,window.lnCore.hashSortDecode=U,window.lnCore.hashFilterEncode=Ke,window.lnCore.hashFilterDecode=Qe);function ze(e){return(e||"").replace(/^\?/,"")}function V(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},r=ze(t);if(!r)return n;const i=new URLSearchParams(r);for(const[c,l]of i.entries())n[c]=l;return n}function H(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function Ce(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const r=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",r)}function O(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");if(n&&n.trim()!=="")return n.trim();const 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 Ae(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function W(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const r=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:r}}}return null}function Je(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function Ge(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=V,window.lnCore.queryGet=H,window.lnCore.querySet=Ce,window.lnCore.resolveQueryParam=O,window.lnCore.querySortEncode=Ae,window.lnCore.querySortDecode=W,window.lnCore.queryFilterEncode=Je,window.lnCore.queryFilterDecode=Ge);function Xe(){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=Xe);function v(e){const t=String(e||"").trim().toLowerCase();return t==="asc"||t==="ascending"?"asc":t==="desc"||t==="descending"?"desc":"none"}function Ye(e){const t=v(e);return t==="asc"?"ascending":t==="desc"?"descending":"none"}function Ze(e,t){return!e||!t?!1:e.field!==null&&e.field!==void 0&&t.field!==null&&t.field!==void 0?e.field===t.field:e.column!==null&&e.column!==void 0&&t.column!==null&&t.column!==void 0?String(e.column)===String(t.column):!1}function et(e,t,n,r){const i=v(e);if(i==="none")return()=>0;const c=i==="desc"?-1:1,l=typeof r=="function"?r:u=>u;return function(u,o){const a=l(u),h=l(o);return He(a,h,t,n)*c}}function K(e){return!!(!e||typeof e!="object"||e.nodeType!==1||e.tagName==="TEMPLATE"||typeof e.hasAttribute=="function"&&(e.hasAttribute("data-ln-sort-exclude")||e.hasAttribute("hidden"))||e.classList&&e.classList.contains("hidden")||e.style&&e.style.display==="none"||typeof e.matches=="function"&&e.matches(".empty-state, .ln-table__empty, .ln-table__empty-state, [data-ln-empty], [data-ln-empty-state], [data-ln-table-empty]"))}function tt(e,t){if(!e||typeof e!="object"||e.nodeType!==1)return[];const n=t||(typeof e.getAttribute=="function"?e.getAttribute("data-ln-sort-items"):null)||null;if(n&&typeof e.querySelectorAll=="function")return Array.from(e.querySelectorAll(n));if(e.tagName==="TABLE"){const r=e.tBodies&&e.tBodies.length?e.tBodies[0]:typeof e.querySelector=="function"?e.querySelector("tbody"):null;if(r)return Array.from(r.children||[]);if(typeof e.querySelectorAll=="function")return Array.from(e.querySelectorAll("tbody tr, tr"))}return Array.from(e.children||[])}(function(){const e="data-ln-sort",t="lnSort",n="data-ln-sort-field",r="data-ln-sort-state",i="data-ln-sort-dir",c="data-ln-hash",l="data-ln-query";if(window[t]!==void 0)return;function u(d,g){return d.getAttribute(g)||null}const o={"data-ln-sort":{prop:"targetId",type:"string",read:q,fallback:null,description:"Target table or list element ID to sort"},"data-ln-sort-field":{prop:"field",type:"string",read:u,effect:E,description:"Field name or column key to sort by"},"data-ln-sort-dir":{type:"enum",values:["asc","desc"],fallback:"asc",description:"Default or requested sort direction"},"data-ln-sort-items":{prop:"itemsSelector",type:"string",read:u,description:"CSS selector matching sortable child items"},"data-ln-sort-state":{type:"enum",values:["asc","desc","none"],fallback:"none",effect:E,description:"Active sort state applied to column or control"},"data-ln-hash":{type:"string",effect:E,description:"URL hash routing key for sort state persistence"},"data-ln-query":{type:"string",effect:E,description:"URL query parameter name for sort state persistence"}},a=ce(o),h=new WeakMap;function p(d,g,s){if(g){const y=d.querySelector('[data-ln-field="'+g+'"]');return y?F(y):""}return s!=null&&d.cells&&d.cells[s]?F(d.cells[s]):F(d)}function A(d){this.dom=d,se(this,d,a);const g=d.closest("th");this.column=!this.field&&g?g.cellIndex:null,this._state=v(d.getAttribute(r)),d.hasAttribute(r)||d.setAttribute(r,this._state),this._destroyed=!1,this.nsKey=T(d,"sort"),this.hashEnabled=!!this.nsKey,this.queryParam=O(d,"sort"),this.queryEnabled=!!this.queryParam;const s=this;this._onClick=function(w){const b=w.target.closest("["+i+"]");if(!b)return;const f=v(b.getAttribute(i));s._apply(f)},d.addEventListener("click",this._onClick),this._onSortChange=function(w){if(s._destroyed||!w.detail)return;const b=s._resolveTarget();if(!(b&&(w.target===b||b.contains(w.target))||w.detail.targetId&&w.detail.targetId===s.targetId))return;if(Ze({field:s.field,column:s.column},{field:w.detail.field,column:w.detail.column})){const m=v(w.detail.direction);m&&d.getAttribute(r)!==m&&(s._state=m,d.setAttribute(r,m),s._updateAriaSort(m));return}d.getAttribute(r)!=="none"&&(s._state="none",d.setAttribute(r,"none"),s._updateAriaSort("none"))},document.addEventListener("ln-sort:change",this._onSortChange),this._onHashChange=function(){if(s._destroyed||!s.hashEnabled)return;const w=j(s.nsKey),b=U(w);if(b)s.field!==null&&b.fieldOrColumn===s.field||s.column!==null&&String(s.column)===b.fieldOrColumn?s._state!==b.direction&&s._apply(b.direction,!0):s._state!=="none"&&(s._state="none",d.setAttribute(r,"none"),s._updateAriaSort("none"));else if(s._state!=="none"){s._state="none",d.setAttribute(r,"none"),s._updateAriaSort("none");const f=s._resolveTarget();f&&(R(f,"ln-sort:change",{field:s.field,column:s.column,direction:"none",targetId:s.targetId}).defaultPrevented||s._defaultSort(f,"none"))}},this._onPopState=function(){if(s._destroyed||!s.queryEnabled)return;const w=H(s.queryParam),b=V(),f=W(w,b);if(f)s.field!==null&&f.fieldOrColumn===s.field||s.column!==null&&String(s.column)===f.fieldOrColumn?s._state!==f.direction&&s._apply(f.direction,!0):s._state!=="none"&&(s._state="none",d.setAttribute(r,"none"),s._updateAriaSort("none"));else if(s._state!=="none"){s._state="none",d.setAttribute(r,"none"),s._updateAriaSort("none");const C=s._resolveTarget();C&&(R(C,"ln-sort:change",{field:s.field,column:s.column,direction:"none",targetId:s.targetId}).defaultPrevented||s._defaultSort(C,"none"))}},this.hashEnabled&&window.addEventListener("hashchange",this._onHashChange),this.queryEnabled&&window.addEventListener("popstate",this._onPopState);let y=!1;if(this.hashEnabled){const w=j(this.nsKey),b=U(w);b&&((s.field!==null&&b.fieldOrColumn===s.field||s.column!==null&&String(s.column)===b.fieldOrColumn)&&I(function(){s._destroyed||s._apply(b.direction,!0)}),y=!0)}else if(this.queryEnabled){const w=H(this.queryParam),b=V(),f=W(w,b);f&&((s.field!==null&&f.fieldOrColumn===s.field||s.column!==null&&String(s.column)===f.fieldOrColumn)&&I(function(){s._destroyed||s._apply(f.direction,!0)}),y=!0)}if(!y){const w=v(d.getAttribute(r));w&&w!=="none"&&I(function(){s._destroyed||s._apply(w,!0)})}return this}A.prototype._resolveTarget=function(){return document.getElementById(this.targetId)},A.prototype._updateAriaSort=function(d){const g=this.dom.closest("th");g&&g.setAttribute("aria-sort",Ye(d))},A.prototype._apply=function(d,g){if(this._destroyed)return;if(!this.field&&this.column===null){const f=this.dom.closest("th");f&&f.cellIndex!==void 0&&(this.column=f.cellIndex)}const s=v(d);this._state=s,this.dom.getAttribute(r)!==s&&this.dom.setAttribute(r,s),this._updateAriaSort(s);const y=this._resolveTarget();if(!y)return;const w={field:this.field,column:this.column,direction:s,targetId:this.targetId};if(!g){if(this.hashEnabled){const f=ye(this.field!==null?this.field:this.column,s);me(this.nsKey,f)}else if(this.queryEnabled){const f=Ae(this.field!==null?this.field:this.column,s);Ce(this.queryParam,f)}}R(y,"ln-sort:change",w).defaultPrevented||this._defaultSort(y,s)},A.prototype._defaultSort=function(d,g){const s=tt(d,this.itemsSelector);if(!s.length)return;const y=s[0].parentNode,w=s.filter(function(f){return!K(f)});if(!w.length)return;h.has(d)||h.set(d,w.slice());let b;if(g==="none"){const f=h.get(d)||w;h.delete(d),b=f.filter(function(C){return C.parentNode===y&&!K(C)})}else{const f=this.field,C=this.column,m=w.map(function(_){return{el:_,val:p(_,f,C)}}),S=Ve(m.map(function(_){return _.val})),Q=typeof Intl<"u"?new Intl.Collator(Le(this.dom),{sensitivity:"base",numeric:!0}):null,x=et(g,S,Q,function(_){return _.val});m.sort(x),b=m.map(function(_){return _.el})}pe(function(){const f=document.createDocumentFragment();let C=0;for(let m=0;m<s.length;m++){const S=s[m];K(S)?f.appendChild(S):C<b.length&&f.appendChild(b[C++])}y.appendChild(f)})},A.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.dom.removeEventListener("click",this._onClick),document.removeEventListener("ln-sort:change",this._onSortChange),this.hashEnabled&&this._onHashChange&&window.removeEventListener("hashchange",this._onHashChange),this.queryEnabled&&this._onPopState&&window.removeEventListener("popstate",this._onPopState),delete this.dom[t])};function E(d,g){const s=d[t];if(!(!s||s._destroyed))if(g===n){const y=d.closest("th");s.column=!s.field&&y?y.cellIndex:null}else if(g===r){const y=v(d.getAttribute(r));y!==s._state&&s._apply(y)}else g===c?(s.hashEnabled&&s._onHashChange&&window.removeEventListener("hashchange",s._onHashChange),s.nsKey=T(d,"sort"),s.hashEnabled=!!s.nsKey,s.hashEnabled&&window.addEventListener("hashchange",s._onHashChange)):g===l&&(s.queryEnabled&&s._onPopState&&window.removeEventListener("popstate",s._onPopState),s.queryParam=O(d,"sort"),s.queryEnabled=!!s.queryParam,s.queryEnabled&&window.addEventListener("popstate",s._onPopState))}be(e,t,A,"ln-sort",{attributes:o,persist:{attr:r,hashActive:function(d){return!!T(d,"sort")||!!O(d,"sort")}}})})()})();
|