@livenetworks/ashlar 2.0.8 → 2.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/components/ln-accordion/ln-accordion.js +1 -1
  2. package/components/ln-ajax/ln-ajax.js +1 -1
  3. package/components/ln-api-connector/ln-api-connector.js +1 -1
  4. package/components/ln-api-connector/ln-api-connector.schema.json +105 -96
  5. package/components/ln-api-connector/src/ln-api-connector.js +1 -0
  6. package/components/ln-api-queue/ln-api-queue.js +1 -1
  7. package/components/ln-autoresize/ln-autoresize.js +1 -1
  8. package/components/ln-autosave/ln-autosave.js +1 -1
  9. package/components/ln-chart/ln-chart.js +1 -1
  10. package/components/ln-circular-progress/ln-circular-progress.js +1 -1
  11. package/components/ln-confirm/ln-confirm.js +1 -1
  12. package/components/ln-core/attrs.js +13 -0
  13. package/components/ln-core/form.js +10 -0
  14. package/components/ln-core/lifecycle.js +6 -1
  15. package/components/ln-core/ln-core.schema.json +110 -109
  16. package/components/ln-couchdb-connector/ln-couchdb-connector.js +1 -1
  17. package/components/ln-data-coordinator/ln-data-coordinator.js +1 -1
  18. package/components/ln-data-coordinator/src/ln-data-coordinator.js +7 -3
  19. package/components/ln-data-store/ln-data-store.js +1 -1
  20. package/components/ln-date/ln-date.js +1 -1
  21. package/components/ln-debug/ln-debug.js +1 -1
  22. package/components/ln-debug/src/generated-attributes.js +3 -0
  23. package/components/ln-dropdown/ln-dropdown.js +1 -1
  24. package/components/ln-editor/ln-editor.js +1 -1
  25. package/components/ln-external-links/ln-external-links.js +1 -1
  26. package/components/ln-fill/ln-fill.js +1 -1
  27. package/components/ln-filter/ln-filter.js +1 -1
  28. package/components/ln-filter/ln-filter.schema.json +161 -153
  29. package/components/ln-filter/src/ln-filter.js +77 -5
  30. package/components/ln-form/ln-form.js +1 -1
  31. package/components/ln-form/ln-form.schema.json +51 -45
  32. package/components/ln-form/src/ln-form.js +21 -0
  33. package/components/ln-http/ln-http.js +1 -1
  34. package/components/ln-include/ln-include.js +1 -1
  35. package/components/ln-key/ln-key.js +1 -1
  36. package/components/ln-link/ln-link.js +1 -1
  37. package/components/ln-list/ln-list.js +1 -1
  38. package/components/ln-modal/ln-modal.js +1 -1
  39. package/components/ln-nav/ln-nav.js +1 -1
  40. package/components/ln-number/ln-number.js +1 -1
  41. package/components/ln-number/src/ln-number.js +26 -0
  42. package/components/ln-obfuscator/ln-obfuscator.js +1 -1
  43. package/components/ln-options/ln-options.js +1 -1
  44. package/components/ln-options/ln-options.schema.json +47 -41
  45. package/components/ln-options/src/ln-options.js +4 -4
  46. package/components/ln-persist/ln-persist.js +1 -1
  47. package/components/ln-picklist/ln-picklist.js +1 -1
  48. package/components/ln-popover/ln-popover.js +1 -1
  49. package/components/ln-progress/ln-progress.js +1 -1
  50. package/components/ln-router/ln-router.js +1 -1
  51. package/components/ln-scroll/ln-scroll.js +1 -1
  52. package/components/ln-search/ln-search.js +1 -1
  53. package/components/ln-search/src/ln-search.js +17 -1
  54. package/components/ln-slug/ln-slug.js +1 -1
  55. package/components/ln-slug/src/ln-slug.js +25 -1
  56. package/components/ln-sort/ln-sort.js +1 -1
  57. package/components/ln-sortable/ln-sortable.js +1 -1
  58. package/components/ln-stat/ln-stat.js +1 -1
  59. package/components/ln-table/ln-table.js +1 -1
  60. package/components/ln-table-coordinator/ln-table-coordinator.js +1 -1
  61. package/components/ln-tabs/ln-tabs.js +1 -1
  62. package/components/ln-time/ln-time.js +1 -1
  63. package/components/ln-toast/ln-toast.js +1 -1
  64. package/components/ln-toggle/ln-toggle.js +1 -1
  65. package/components/ln-tooltip/ln-tooltip.js +1 -1
  66. package/components/ln-translations/ln-translations.js +1 -1
  67. package/components/ln-ui-coordinator/ln-ui-coordinator.js +1 -1
  68. package/components/ln-upload/ln-upload.js +1 -1
  69. package/components/ln-validate/ln-validate.js +1 -1
  70. package/components/ln-websocket-connector/ln-websocket-connector.js +1 -1
  71. package/ln-ashlar.html-data.json +13 -0
  72. package/package.json +2 -1
  73. package/web-types.json +22 -1
@@ -1 +1 @@
1
- (function(){"use strict";function N(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function E(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let o=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){o=t[l];break}if(!E(o))return}e.apply(console,t)}}function C(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function k(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o);const l=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:o});return e.dispatchEvent(l),l}function S(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){S(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}const U={};function K(e,t){U[e]=t}function J(e){return U[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=K,window.lnCore.getDataMapper=J);function Q(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 G(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,S(function(){new MutationObserver(function(){C(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const M={};function Z(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];M[n]=t}function Y(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return M[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Z,window.lnCore.getLocaleFallback=Y,window.lnCore.ensureLocaleObserver=G);const L={};function B(e,t){L[e]||(L[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=L[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function ee(e,t,n){if(e){const o=e.querySelector('[data-ln-template="'+t+'"]');if(o)return o.content.cloneNode(!0)}return B(t,n)}function _(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let s=0;s<n.length;s++){const c=n[s],d=c.getAttribute("data-ln-field");t[d]!=null&&(c.textContent=t[d])}const o=e.querySelectorAll("[data-ln-attr]");for(let s=0;s<o.length;s++){const c=o[s],d=c.getAttribute("data-ln-attr").split(",");for(let r=0;r<d.length;r++){const i=d[r].trim().split(":");if(i.length!==2)continue;const u=i[0].trim(),f=i[1].trim();t[f]!=null&&c.setAttribute(u,t[f])}}const l=e.querySelectorAll("[data-ln-show]");for(let s=0;s<l.length;s++){const c=l[s],d=c.getAttribute("data-ln-show");d in t&&c.classList.toggle("hidden",!t[d])}const a=e.querySelectorAll("[data-ln-class]");for(let s=0;s<a.length;s++){const c=a[s],d=c.getAttribute("data-ln-class").split(",");for(let r=0;r<d.length;r++){const i=d[r].trim().split(":");if(i.length!==2)continue;const u=i[0].trim(),f=i[1].trim();f in t&&c.classList.toggle(u,!!t[f])}}return e}function te(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let o=0;o<n.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[o],t??null),n[o].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)_(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function $(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const a=n.currentNode;a.textContent.indexOf("{{")!==-1&&(a.textContent=a.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(s,c){return t[c]!==void 0?t[c]:""}))}const o=function(a,s){return t[s]!==void 0?t[s]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let a=0;a<l.length;a++){const s=l[a],c=s.attributes;for(let d=0;d<c.length;d++){const r=c[d];r.value.indexOf("{{")!==-1&&s.setAttribute(r.name,r.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function ne(e,t,n,o,l,a){const s={};for(let d=0;d<e.children.length;d++){const r=e.children[d],i=r.getAttribute("data-ln-render-key");i&&(s[i]=r)}const c=document.createDocumentFragment();for(let d=0;d<t.length;d++){const r=t[d],i=String(o(r));let u=s[i];if(u)l(u,r,d);else{const f=B(n,a);if(!f||($(f,r),u=f.firstElementChild,!u))continue;u.setAttribute("data-ln-render-key",i),l(u,r,d)}c.appendChild(u)}e.textContent="",e.appendChild(c)}function oe(e,t){const n={},o=e.querySelectorAll("["+t+"]");for(let l=0;l<o.length;l++)n[o[l].getAttribute(t)]=o[l].textContent,o[l].remove();return n}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=$,window.lnCore.fill=_,window.lnCore.lnFill=te,window.lnCore.renderList=ne);function x(e,t,n){const o=e.getAttribute(t);return o===null?n:o}function D(e,t,n){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?n:o}function re(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 ie(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const F=new Map;function le(e,t){const n=(e?e.join("|"):"")+"::"+t;if(F.has(n))return F.get(n);const o=new Set(e||[]),l=function(a,s){const c=a.getAttribute(s);return c!==null&&o.has(c)?c:t};return F.set(n,l),l}function ae(e,t,n){const o=parseFloat(e.getAttribute(t));return isNaN(o)?n:o}function se(e,t,n){const o=e.getAttribute(t);if(!o)return n;try{return JSON.parse(o)}catch{return n}}function H(e,t,n,o,l){if(!e||t===null)return!0;const a=o||"ln-component",s=e.type;if(s==="trigger"||s==="marker"||s==="string"||s==="list"||!s||t===""&&e.fallback!==void 0)return!0;const c=d=>{l?console.warn(d,l):console.warn(d)};if(s==="boolean"){const d=t.trim().toLowerCase();return d!==""&&d!=="true"&&d!=="false"&&d!=="1"&&d!=="0"?(c(`[${a}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(s==="enum"){const d=e.values||[];return d.includes(t)?!0:(c(`[${a}] Invalid value "${t}" for attribute "${n}". Allowed: ${d.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(s==="integer"){if(!/^-?\d+$/.test(t))return c(`[${a}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const d=parseInt(t,10);return e.min!==void 0&&d<e.min?(c(`[${a}] Value ${d} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&d>e.max?(c(`[${a}] Value ${d} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(s==="float")return isNaN(Number(t))?(c(`[${a}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(s==="json")try{return JSON.parse(t),!0}catch(d){return c(`[${a}] Invalid JSON for attribute "${n}": ${d.message}. Fallback: ${e.fallback}.`),!1}return!0}function de(e,t,n){for(const o in n){const[l,a,s]=n[o];Object.defineProperty(e,o,{get:function(){return l(t,a,s)},enumerable:!0,configurable:!0})}return e}function ue(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=le(o.values,o.fallback);break;case"integer":l=D;break;case"float":l=ae;break;case"boolean":l=re;break;case"list":l=ie;break;case"json":l=se;break;case"string":default:l=x;break}l||(l=x),t[o.prop]=[l,n,o.fallback]}return t}function ce(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 fe(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}function q(e,t,n,o){if(e.nodeType!==1)return;const a=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",s=Array.from(e.querySelectorAll(a));e.matches&&e.matches(a)&&s.push(e);for(const c of s)if(!c[n]){window.lnCore._persistSink&&c.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(c,t);try{c[n]=new o(c)}catch(d){console.error("["+n+"] init failed",c,d)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function pe(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function he(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 W(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function me(e){const t=W(),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(a=>a.componentTag===e.componentTag)||l.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=fe(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 a=e[l];if(!t[a.attribute])continue;const s=a.effects&&a.effects[n];s?s(t,n,o):a.onAttrChange&&(!a.declared||a.declared.has(n))&&a.onAttrChange(t,n,o)}}function ge(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const o=W(),l=o.byAttr.get(n);if(N()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(n)&&E(t)){const a=o.byDeclaredAttr.get(n),s=t.getAttribute(n);for(let c=0;c<a.length;c++)H(a[c].spec,s,n,a[c].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||l)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const a=o.byReactive.get(n);a&&j(a,t,n,e.oldValue),o.reactiveWildcard.length&&j(o.reactiveWildcard,t,n,e.oldValue)}if(l)for(let a=0;a<l.length;a++){const s=l[a];if(s.handler){s.handler(t,n,e.oldValue);continue}s.onAttributeChange&&t[s.attribute]?s.onAttributeChange(t,n):(q(t,s.selector,s.attribute,s.ComponentFn),s.onInit&&s.onInit(t))}}function be(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,S(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{ge(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 P(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function we(e){const t=P();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const o=t[n];if(o.onSubtreeChange){const l=o.query,a=e.target.nodeType===1?e.target.matches(l)?e.target:e.target.closest(l):e.target.parentElement?e.target.parentElement.closest(l):null;a&&o.onSubtreeChange(a,e)}}for(let n=0;n<e.addedNodes.length;n++){const o=e.addedNodes[n];if(o.nodeType===1)for(let l=0;l<t.length;l++){const a=t[l];q(o,a.selector,a.attribute,a.ComponentFn),a.onInit&&a.onInit(o)}}for(let n=0;n<e.removedNodes.length;n++){const o=e.removedNodes[n];if(o.nodeType===1)for(let l=0;l<t.length;l++){const a=t[l],s=a.query,c=Array.from(o.querySelectorAll(s));o.matches&&o.matches(s)&&c.push(o);for(let d=0;d<c.length;d++){const r=c[d];if(!document.contains(r)){const i=r[a.attribute];if(i&&typeof i.destroy=="function")try{i.destroy()}catch(u){console.error("["+a.attribute+"] destroy failed",r,u)}delete r[a.attribute]}}}}}}function ye(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,S(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const o=t[n];if(o.type==="childList")try{we(o)}catch(l){console.error("[ln-core] lifecycle handler failed",o.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function ve(e,t,n,o,l={}){const a=l.extraAttributes||[],s=l.onAttributeChange||null,c=l.onSubtreeChange||null,d=l.onInit||null,r=l.onAttrChange||null,i=l.effects||null,u=l.attributes||null,f=u?ce(u):i,p=u?new Set(Object.keys(u)):null,b=l.persist||null;function w(y){const v=y||document.body;if(q(v,e,t,n),u&&N())for(const I in u){const ze=u[I],R=Array.from(v.querySelectorAll("["+I+"]"));v.matches&&v.matches("["+I+"]")&&R.push(v);for(let O=0;O<R.length;O++){const T=R[O];E(T)&&H(ze,T.getAttribute(I),I,o,T)}}d&&d(v)}const m=[];if(e.indexOf("[")!==-1){const y=/\[([\w-]+)/g;let v;for(;(v=y.exec(e))!==null;)m.push(v[1])}else m.push(e);me({selector:e,attribute:t,componentTag:o,attributes:u,ComponentFn:n,onInit:d,observed:m.concat(a),onAttributeChange:s,onAttrChange:r,effects:f,declared:p,persist:b}),be();const g=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]";P().push({selector:e,attribute:t,ComponentFn:n,onInit:d,onSubtreeChange:c,query:g}),ye(),window[t]=w;function h(){pe()>0?he(function(){w(document.body)}):w(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",h):h(),w}function V(e){return(e||"").replace(/^#/,"")}function z(e){const t=e===void 0?location.hash:e,n={},o=V(t);if(!o)return n;const l=o.split("&");for(let a=0;a<l.length;a++){const s=l[a];if(!s)continue;const c=s.indexOf(":"),d=c>-1?s.slice(0,c):s,r=c>-1?s.slice(c+1):"";if(d)try{n[d]=decodeURIComponent(r)}catch{n[d]=r}}return n}function Ce(e){if(!e)return null;const t=z();return e in t?t[e]:null}function Ae(e,t){if(!e)return;const n=z();t==null?delete n[e]:n[e]=String(t);const l=Object.keys(n).map(function(a){const s=n[a];return s===""?a:a+":"+encodeURIComponent(s)}).join("&");V(location.hash)!==l&&(location.hash=l)}function _e(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function xe(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"-"+t:o:t||null}function Ie(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Se(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 Ee(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function ke(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(a){try{return decodeURIComponent(a)}catch{return a}}).filter(Boolean):[];return{key:n,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=z,window.lnCore.hashGet=Ce,window.lnCore.hashSet=Ae,window.lnCore.hashLinkClick=_e,window.lnCore.resolveHashNamespace=xe,window.lnCore.hashSortEncode=Ie,window.lnCore.hashSortDecode=Se,window.lnCore.hashFilterEncode=Ee,window.lnCore.hashFilterDecode=ke);function Le(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Le);function De(e){if(!e)return null;const t=String(e).split(",").map(n=>n.trim().toLowerCase()).filter(Boolean).map(n=>n.startsWith(".")?n.slice(1):n);return t.length?t:null}function X(e){return!e||typeof e!="string"||!e.includes(".")?"":e.split(".").pop().toLowerCase()}function Fe(e,t){if(!t||t.length===0)return!0;if(!e)return!1;const n=X(e.name),o=String(e.type||"").toLowerCase();return t.some(l=>{if(l.includes("/")){if(l.endsWith("/*")){const a=l.slice(0,-1);return o.startsWith(a)}return o===l}return n===l})}function qe(e,t="en",n={}){if(typeof e!="number"||isNaN(e)||e===0)return"0 "+(n["unit-b"]||"B");const o=1024,l=[n["unit-b"]||"B",n["unit-kb"]||"KB",n["unit-mb"]||"MB",n["unit-gb"]||"GB"],a=Math.floor(Math.log(e)/Math.log(o)),s=Math.min(a,l.length-1),c=e/Math.pow(o,s);return new Intl.NumberFormat(t,{maximumFractionDigits:1,minimumFractionDigits:0}).format(c)+" "+l[s]}(function(){const e="data-ln-upload",t="lnUpload",n="file",o="file_ids[]";if(window[t]!==void 0)return;const l={"data-ln-upload":{prop:"uploadUrl",read:x,type:"string",fallback:"",description:"Endpoint URL for file uploads"},"data-ln-upload-accept":{type:"string",description:"Comma-separated list of allowed file extensions or MIME types"},"data-ln-upload-delete":{prop:"deleteUrlPattern",read:x,type:"string",fallback:"",description:"Endpoint URL pattern for deleting uploaded files"},"data-ln-upload-max-size":{prop:"maxSize",read:D,type:"integer",fallback:0,min:0,description:"Maximum allowed file size in bytes (0 for unlimited)"},"data-ln-upload-max-files":{prop:"maxFiles",read:D,type:"integer",fallback:0,min:0,description:"Maximum number of files allowed in upload queue (0 for unlimited)"},"data-ln-upload-file-field":{prop:"fileFieldName",read:x,type:"string",fallback:n,description:"Form data field name used for file payloads"},"data-ln-upload-ids-field":{prop:"idsFieldName",read:x,type:"string",fallback:o,description:"Form field name for submitting uploaded file IDs"},"data-ln-upload-dict":{type:"string",description:"Dictionary key prefix mapping for translatable upload messages"},"data-ln-upload-zone":{type:"marker",description:"Designates container as dropzone for drag-and-drop file uploads"},"data-ln-upload-list":{type:"marker",description:"Container element holding rendered upload items"},"data-ln-upload-item":{type:"marker",description:"Container element for an individual file upload item"},"data-ln-upload-action":{type:"enum",values:["remove","retry"],description:"Action button within upload item"},"data-ln-upload-state":{type:"enum",values:["ready","dragover","pending","uploading","success","error"],description:"Runtime status of dropzone or individual upload item"},"data-ln-upload-id":{type:"string",description:"Server-assigned file identifier for completed upload"},"data-ln-upload-local-id":{type:"string",description:"Client-generated unique ID for tracking file item in DOM"},"data-ln-upload-size":{type:"integer",min:0,description:"File size in bytes"},"data-ln-upload-ext":{type:"string",description:"Normalized file extension"}},a=ue(l);function s(r,i,u){return qe(r,i,u)}function c(){const r=document.querySelector('meta[name="csrf-token"]');return r?r.getAttribute("content"):""}function d(r){this.dom=r,de(this,r,a),this.dict=oe(r,"data-ln-upload-dict"),this.locale=Q(r),this.zone=r.querySelector("[data-ln-upload-zone]")||r,this.list=r.querySelector("[data-ln-upload-list]"),this.input=r.querySelector('input[type="file"]'),this.input||console.warn('[ln-upload] Missing <input type="file"> in container:',r);const i=r.getAttribute("data-ln-upload-accept")||(this.input?this.input.getAttribute("accept"):"");return this.allowedExts=De(i),this.uploadedFiles=new Map,this.fileIdCounter=0,this._dragDepth=0,this._hydrate(),this._bindEvents(),this}d.prototype._hydrate=function(){const r=this;if(!this.list)return;const i=this.list.querySelectorAll("[data-ln-upload-item]");for(let f=0;f<i.length;f++){const p=i[f],b=p.getAttribute("data-ln-upload-id"),w="file-"+ ++r.fileIdCounter;p.setAttribute("data-ln-upload-local-id",w);const m=p.querySelector('[data-ln-field="name"]'),A=p.querySelector('[data-ln-field="sizeText"]'),g=p.getAttribute("data-ln-upload-size"),h=g?parseInt(g,10):null;r.uploadedFiles.set(w,{serverId:b||null,name:m?m.textContent.trim():"",size:h!==null&&!isNaN(h)?h:A?A.textContent.trim():""})}const u=this.dom.querySelectorAll('input[type="hidden"]');for(let f=0;f<u.length;f++){const p=u[f];if(p.name===r.idsFieldName&&p.value&&!Array.from(r.uploadedFiles.values()).some(function(w){return String(w.serverId)===String(p.value)})){const w="file-"+ ++r.fileIdCounter;r.uploadedFiles.set(w,{serverId:p.value,name:"",size:""})}}this._syncHiddenInputs()},d.prototype._syncHiddenInputs=function(){const r=this,i=this.dom.querySelectorAll('input[type="hidden"]');for(let u=0;u<i.length;u++)i[u].name===r.idsFieldName&&i[u].remove();for(const[,u]of this.uploadedFiles)if(u.serverId){const f=document.createElement("input");f.type="hidden",f.name=r.idsFieldName,f.value=u.serverId,r.dom.appendChild(f)}},d.prototype._bindEvents=function(){const r=this;this._onZoneClick=function(i){r.zone===r.dom&&i.target.closest("[data-ln-upload-list], [data-ln-upload-action], input, button, a")||r.input&&i.target!==r.input&&r.input.click()},this._onInputChange=function(){r.input&&r.input.files&&(r.upload(r.input.files),r.input.value="")},this._onDragEnter=function(i){i.preventDefault(),i.stopPropagation(),r._dragDepth++,r.zone.setAttribute("data-ln-upload-state","dragover")},this._onDragOver=function(i){i.preventDefault(),i.stopPropagation(),r.zone.setAttribute("data-ln-upload-state","dragover")},this._onDragLeave=function(i){i.preventDefault(),i.stopPropagation(),r._dragDepth--,r._dragDepth<=0&&(r._dragDepth=0,r.zone.removeAttribute("data-ln-upload-state"))},this._onDrop=function(i){i.preventDefault(),i.stopPropagation(),r._dragDepth=0,r.zone.removeAttribute("data-ln-upload-state"),i.dataTransfer&&i.dataTransfer.files&&r.upload(i.dataTransfer.files)},this._onListClick=function(i){const u=i.target.closest('[data-ln-upload-action="remove"]');if(!u||!r.list||!r.list.contains(u)||u.disabled)return;const f=u.closest("[data-ln-upload-item]");if(f){const p=f.getAttribute("data-ln-upload-local-id");p&&r.remove(p)}},this._onRequestUpload=function(i){i.detail&&i.detail.files&&r.upload(i.detail.files)},this._onRequestRemove=function(i){if(i.detail){const u=i.detail.localId!==void 0?i.detail.localId:i.detail.serverId;u!==void 0&&r.remove(u)}},this._onRequestClear=function(){r.clear()},this.zone.addEventListener("click",this._onZoneClick),this.input&&this.input.addEventListener("change",this._onInputChange),this.zone.addEventListener("dragenter",this._onDragEnter),this.zone.addEventListener("dragover",this._onDragOver),this.zone.addEventListener("dragleave",this._onDragLeave),this.zone.addEventListener("drop",this._onDrop),this.list&&this.list.addEventListener("click",this._onListClick),this.dom.addEventListener("ln-upload:request-upload",this._onRequestUpload),this.dom.addEventListener("ln-upload:request-remove",this._onRequestRemove),this.dom.addEventListener("ln-upload:request-clear",this._onRequestClear)},d.prototype.upload=function(r){const i=this,u=Array.from(r);for(let f=0;f<u.length;f++){const p=u[f];if(i.maxFiles>0&&i.uploadedFiles.size>=i.maxFiles){C(i.dom,"ln-upload:invalid",{file:p,reason:"max-files"});continue}if(!Fe(p,i.allowedExts)){C(i.dom,"ln-upload:invalid",{file:p,reason:"accept"});continue}if(i.maxSize>0&&p.size>i.maxSize){C(i.dom,"ln-upload:invalid",{file:p,reason:"max-size"});continue}k(i.dom,"ln-upload:before-upload",{file:p}).defaultPrevented||i._uploadSingleFile(p)}},d.prototype._uploadSingleFile=function(r){const i=this,u="file-"+ ++i.fileIdCounter,f=X(r.name);let p=null;if(this.list){const g=ee(this.dom,"ln-upload-item","ln-upload");if(g&&(p=g.firstElementChild,p)){p.setAttribute("data-ln-upload-item",""),p.setAttribute("data-ln-upload-local-id",u),p.setAttribute("data-ln-upload-ext",f),p.setAttribute("data-ln-upload-state","uploading"),_(p,{name:r.name,sizeText:"0%",removeLabel:i.dict.remove||"Remove",uploading:!0,error:!1,deleting:!1});const h=p.querySelector('[data-ln-upload-action="remove"]');h&&(h.disabled=!0);const y=p.querySelector("[data-ln-progress]");y&&y.setAttribute("data-ln-progress","0"),i.list.appendChild(p)}}const b=new FormData;b.append(i.fileFieldName,r);const w=this.dom.querySelectorAll("input, select, textarea");for(let g=0;g<w.length;g++){const h=w[g];!h.name||h.name===i.idsFieldName||h.type==="file"||(h.type==="checkbox"||h.type==="radio")&&!h.checked||b.append(h.name,h.value)}const m=new XMLHttpRequest;i.uploadedFiles.set(u,{serverId:null,name:r.name,size:r.size,xhr:m}),m.upload.addEventListener("progress",function(g){if(g.lengthComputable){const h=Math.round(g.loaded/g.total*100);if(p){const y=p.querySelector("[data-ln-progress]");y&&y.setAttribute("data-ln-progress",String(h)),_(p,{sizeText:h+"%"})}C(i.dom,"ln-upload:progress",{localId:u,file:r,percent:h,loaded:g.loaded,total:g.total})}}),m.addEventListener("load",function(){const g=i.uploadedFiles.get(u);if(g&&delete g.xhr,m.status>=200&&m.status<300){let h;try{h=JSON.parse(m.responseText)}catch(v){A(i.dict.error||"Error",m.status,v);return}const y=h.id||h.serverId;if(p){p.removeAttribute("data-ln-upload-state"),y&&p.setAttribute("data-ln-upload-id",String(y)),_(p,{sizeText:s(h.size||r.size,i.locale,i.dict),uploading:!1});const v=p.querySelector('[data-ln-upload-action="remove"]');v&&(v.disabled=!1)}g&&(g.serverId=y,g.size=h.size||r.size,g.name=h.name||r.name),i._syncHiddenInputs(),C(i.dom,"ln-upload:uploaded",{localId:u,serverId:y,name:h.name||r.name,size:h.size||r.size,response:h})}else{let h="";try{h=JSON.parse(m.responseText).message||""}catch{}A(h,m.status,null)}}),m.addEventListener("error",function(){const g=i.uploadedFiles.get(u);g&&delete g.xhr,A("",0,null)});function A(g,h,y){if(p){p.setAttribute("data-ln-upload-state","error"),_(p,{sizeText:i.dict.error||"Error",uploading:!1,error:!0});const v=p.querySelector('[data-ln-upload-action="remove"]');v&&(v.disabled=!1)}C(i.dom,"ln-upload:error",{file:r,message:g,status:h,error:y})}i.uploadUrl?(m.open("POST",i.uploadUrl),m.setRequestHeader("X-CSRF-TOKEN",c()),m.setRequestHeader("X-Requested-With","XMLHttpRequest"),m.setRequestHeader("Accept","application/json"),m.send(b)):console.warn("[ln-upload] No upload URL configured (missing data-ln-upload)")},d.prototype.remove=function(r){const i=this;let u=null,f=null;if(i.uploadedFiles.has(r))u=r,f=i.uploadedFiles.get(r);else for(const[m,A]of i.uploadedFiles)if(String(A.serverId)===String(r)){u=m,f=A;break}if(!u||!f||k(i.dom,"ln-upload:before-remove",{localId:u,serverId:f.serverId}).defaultPrevented)return;const b=i.list?i.list.querySelector('[data-ln-upload-local-id="'+u+'"]'):null;if(f.xhr&&typeof f.xhr.abort=="function"&&f.xhr.abort(),!f.serverId){b&&b.remove(),i.uploadedFiles.delete(u),i._syncHiddenInputs(),C(i.dom,"ln-upload:removed",{localId:u,serverId:null});return}let w=null;if(i.deleteUrlPattern?w=i.deleteUrlPattern.replace("{id}",encodeURIComponent(f.serverId)):i.uploadUrl&&i.uploadUrl.includes("{id}")&&(w=i.uploadUrl.replace("{id}",encodeURIComponent(f.serverId))),!w){b&&b.remove(),i.uploadedFiles.delete(u),i._syncHiddenInputs(),C(i.dom,"ln-upload:removed",{localId:u,serverId:f.serverId});return}b&&(b.setAttribute("data-ln-upload-state","deleting"),_(b,{deleting:!0})),fetch(w,{method:"DELETE",headers:{"X-CSRF-TOKEN":c(),"X-Requested-With":"XMLHttpRequest",Accept:"application/json"}}).then(function(m){m.ok?(b&&b.remove(),i.uploadedFiles.delete(u),i._syncHiddenInputs(),C(i.dom,"ln-upload:removed",{localId:u,serverId:f.serverId})):(b&&(b.removeAttribute("data-ln-upload-state"),_(b,{deleting:!1})),C(i.dom,"ln-upload:error",{file:f,message:"",status:m.status}))}).catch(function(m){b&&(b.removeAttribute("data-ln-upload-state"),_(b,{deleting:!1})),C(i.dom,"ln-upload:error",{file:f,message:"",status:0,error:m})})},d.prototype.clear=function(){const r=this;if(!k(r.dom,"ln-upload:before-clear",{}).defaultPrevented){for(const[,u]of this.uploadedFiles)if(u.xhr&&typeof u.xhr.abort=="function"&&u.xhr.abort(),u.serverId){let f=null;r.deleteUrlPattern?f=r.deleteUrlPattern.replace("{id}",encodeURIComponent(u.serverId)):r.uploadUrl&&r.uploadUrl.includes("{id}")&&(f=r.uploadUrl.replace("{id}",encodeURIComponent(u.serverId))),f&&fetch(f,{method:"DELETE",headers:{"X-CSRF-TOKEN":c(),"X-Requested-With":"XMLHttpRequest",Accept:"application/json"}}).catch(function(){})}r.uploadedFiles.clear(),r.list&&(r.list.innerHTML=""),r._syncHiddenInputs(),C(r.dom,"ln-upload:cleared",{})}},d.prototype.getFileIds=function(){return Array.from(this.uploadedFiles.values()).map(function(r){return r.serverId}).filter(Boolean)},d.prototype.getFiles=function(){return Array.from(this.uploadedFiles.values()).map(function(r){return{serverId:r.serverId,name:r.name,size:r.size}})},d.prototype.destroy=function(){if(this.dom[t]){for(const[,r]of this.uploadedFiles)r.xhr&&typeof r.xhr.abort=="function"&&r.xhr.abort();this.zone.removeEventListener("click",this._onZoneClick),this.input&&this.input.removeEventListener("change",this._onInputChange),this.zone.removeEventListener("dragenter",this._onDragEnter),this.zone.removeEventListener("dragover",this._onDragOver),this.zone.removeEventListener("dragleave",this._onDragLeave),this.zone.removeEventListener("drop",this._onDrop),this.list&&this.list.removeEventListener("click",this._onListClick),this.dom.removeEventListener("ln-upload:request-upload",this._onRequestUpload),this.dom.removeEventListener("ln-upload:request-remove",this._onRequestRemove),this.dom.removeEventListener("ln-upload:request-clear",this._onRequestClear),this.uploadedFiles.clear(),this.dict={},delete this.dom[t]}},ve(e,t,d,"ln-upload",{attributes:l})})()})();
1
+ (function(){"use strict";function N(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function E(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let o=null;for(let i=1;i<t.length;i++)if(t[i]&&t[i].nodeType===1){o=t[i];break}if(!E(o))return}e.apply(console,t)}}function v(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function L(e,t,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 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 ne(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function oe(e,t){const n=!!(t&&t.typed),o=t&&t.exclude,i={},d=e.elements,s={};if(n)for(let u=0;u<d.length;u++){const l=d[u];l.name&&l.type==="checkbox"&&!l.disabled&&(s[l.name]=(s[l.name]||0)+1)}for(let u=0;u<d.length;u++){const l=d[u];if(!(!l.name||l.disabled||l.type==="file"||l.type==="submit"||l.type==="button")&&!(o&&l.matches&&l.matches(o)))if(l.type==="checkbox")n&&s[l.name]===1?i[l.name]=l.checked:(i[l.name]||(i[l.name]=[]),l.checked&&i[l.name].push(l.value));else if(l.type==="radio")l.checked&&(i[l.name]=l.value);else if(l.type==="select-multiple"){i[l.name]=[];for(let r=0;r<l.options.length;r++)l.options[r].selected&&i[l.name].push(l.options[r].value)}else if(n&&l.type==="hidden")i[l.name]=l.value;else if(n&&(l.type==="number"||l.type==="range")){const r=Number(l.value);i[l.name]=l.value===""||isNaN(r)?null:r}else i[l.name]=l.value}return i}function re(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ie(e,t){const n=e.elements,o=[],i={};for(let d=0;d<n.length;d++){const s=n[d];s.name&&s.type==="checkbox"&&(i[s.name]=(i[s.name]||0)+1)}for(let d=0;d<n.length;d++){const s=n[d];if(s.type==="file"||s.type==="submit"||s.type==="button")continue;const u=s.getAttribute("data-ln-fill-as")||s.name;if(!u||!(u in t))continue;const l=t[u];if(s.type==="checkbox"){if(Array.isArray(l))s.checked=l.indexOf(s.value)!==-1;else if(i[s.name]>1){const r=String(l).split(",").map(function(a){return a.trim()});s.checked=r.indexOf(s.value)!==-1}else s.checked=re(l);o.push(s)}else if(s.type==="radio")s.checked=s.value===String(l),o.push(s);else if(s.type==="select-multiple"){if(Array.isArray(l))for(let r=0;r<s.options.length;r++)s.options[r].selected=l.indexOf(s.options[r].value)!==-1;o.push(s)}else s.value=l,s.tagName==="SELECT"&&l!=null&&s.setAttribute("data-ln-value",l),o.push(s)}return o}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ie,window.lnCore.serializeForm=oe,window.lnCore.resolveFormMethod=ne);const M={};function le(e,t){M[e]=t}function ae(e){return M[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=le,window.lnCore.getDataMapper=ae);function se(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 de(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,I(function(){new MutationObserver(function(){v(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const U={};function ue(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];U[n]=t}function ce(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return U[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ue,window.lnCore.getLocaleFallback=ce,window.lnCore.ensureLocaleObserver=de);const F={};function B(e,t){F[e]||(F[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=F[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function fe(e,t,n){if(e){const o=e.querySelector('[data-ln-template="'+t+'"]');if(o)return o.content.cloneNode(!0)}return B(t,n)}function x(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let s=0;s<n.length;s++){const u=n[s],l=u.getAttribute("data-ln-field");t[l]!=null&&(u.textContent=t[l])}const o=e.querySelectorAll("[data-ln-attr]");for(let s=0;s<o.length;s++){const u=o[s],l=u.getAttribute("data-ln-attr").split(",");for(let r=0;r<l.length;r++){const a=l[r].trim().split(":");if(a.length!==2)continue;const c=a[0].trim(),f=a[1].trim();t[f]!=null&&u.setAttribute(c,t[f])}}const i=e.querySelectorAll("[data-ln-show]");for(let s=0;s<i.length;s++){const u=i[s],l=u.getAttribute("data-ln-show");l in t&&u.classList.toggle("hidden",!t[l])}const d=e.querySelectorAll("[data-ln-class]");for(let s=0;s<d.length;s++){const u=d[s],l=u.getAttribute("data-ln-class").split(",");for(let r=0;r<l.length;r++){const a=l[r].trim().split(":");if(a.length!==2)continue;const c=a[0].trim(),f=a[1].trim();f in t&&u.classList.toggle(c,!!t[f])}}return e}function pe(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const 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)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 $(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const d=n.currentNode;d.textContent.indexOf("{{")!==-1&&(d.textContent=d.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(s,u){return t[u]!==void 0?t[u]:""}))}const o=function(d,s){return t[s]!==void 0?t[s]:""},i=Array.from(e.querySelectorAll("*"));e.nodeType===1&&i.push(e);for(let d=0;d<i.length;d++){const s=i[d],u=s.attributes;for(let l=0;l<u.length;l++){const r=u[l];r.value.indexOf("{{")!==-1&&s.setAttribute(r.name,r.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function he(e,t,n,o,i,d){const s={};for(let l=0;l<e.children.length;l++){const r=e.children[l],a=r.getAttribute("data-ln-render-key");a&&(s[a]=r)}const u=document.createDocumentFragment();for(let l=0;l<t.length;l++){const r=t[l],a=String(o(r));let c=s[a];if(c)i(c,r,l);else{const f=B(n,d);if(!f||($(f,r),c=f.firstElementChild,!c))continue;c.setAttribute("data-ln-render-key",a),i(c,r,l)}u.appendChild(c)}e.textContent="",e.appendChild(u)}function me(e,t){const n={},o=e.querySelectorAll("["+t+"]");for(let i=0;i<o.length;i++)n[o[i].getAttribute(t)]=o[i].textContent,o[i].remove();return n}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=$,window.lnCore.fill=x,window.lnCore.lnFill=pe,window.lnCore.renderList=he);function _(e,t,n){const o=e.getAttribute(t);return o===null?n:o}function k(e,t,n){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?n:o}function H(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 j(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const D=new Map;function W(e,t){const n=(e?e.join("|"):"")+"::"+t;if(D.has(n))return D.get(n);const o=new Set(e||[]),i=function(d,s){const u=d.getAttribute(s);return u!==null&&o.has(u)?u:t};return D.set(n,i),i}function P(e,t,n){const o=parseFloat(e.getAttribute(t));return isNaN(o)?n:o}function V(e,t,n){const o=e.getAttribute(t);if(!o)return n;try{return JSON.parse(o)}catch{return n}}function X(e,t,n,o,i){if(!e||t===null)return!0;const d=o||"ln-component",s=e.type;if(s==="trigger"||s==="marker"||s==="string"||s==="list"||!s||t===""&&e.fallback!==void 0)return!0;const u=l=>{i?console.warn(l,i):console.warn(l)};if(s==="boolean"){const l=t.trim().toLowerCase();return l!==""&&l!=="true"&&l!=="false"&&l!=="1"&&l!=="0"?(u(`[${d}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(s==="enum"){const l=e.values||[];return l.includes(t)?!0:(u(`[${d}] Invalid value "${t}" for attribute "${n}". Allowed: ${l.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(s==="integer"){if(!/^-?\d+$/.test(t))return u(`[${d}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const l=parseInt(t,10);return e.min!==void 0&&l<e.min?(u(`[${d}] Value ${l} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&l>e.max?(u(`[${d}] Value ${l} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(s==="float")return isNaN(Number(t))?(u(`[${d}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(s==="json")try{return JSON.parse(t),!0}catch(l){return u(`[${d}] Invalid JSON for attribute "${n}": ${l.message}. Fallback: ${e.fallback}.`),!1}return!0}function K(e,t,n){for(const o in n){const[i,d,s]=n[o];Object.defineProperty(e,o,{get:function(){return i(t,d,s)},enumerable:!0,configurable:!0})}return e}function J(e){const t={};for(const n in e){const o=e[n];if(!o||!o.prop)continue;let i=o.read;if(!i&&o.type)switch(o.type){case"enum":i=W(o.values,o.fallback);break;case"integer":i=k;break;case"float":i=P;break;case"boolean":i=H;break;case"list":i=j;break;case"json":i=V;break;case"string":default:i=_;break}i||(i=_),t[o.prop]=[i,n,o.fallback]}return t}function ge(e){const t={};for(const n in e){const o=e[n];o&&o.effect&&(t[n]=o.effect)}return Object.keys(t).length?t:null}function we(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=K,window.lnCore.attrSpec=J,window.lnCore.attrStr=_,window.lnCore.attrInt=k,window.lnCore.attrBool=H,window.lnCore.attrList=j,window.lnCore.attrEnum=W,window.lnCore.attrFloat=P,window.lnCore.attrJson=V);function q(e,t,n,o){if(e.nodeType!==1)return;const d=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",s=Array.from(e.querySelectorAll(d));e.matches&&e.matches(d)&&s.push(e);for(const u of s)if(!u[n]){window.lnCore._persistSink&&u.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(u,t);try{u[n]=new o(u)}catch(l){console.error("["+n+"] init failed",u,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 ye(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function 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 Ce(e){const t=Q(),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(d=>d.componentTag===e.componentTag)||i.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=we(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 G(e,t,n,o){for(let i=0;i<e.length;i++){const d=e[i];if(!t[d.attribute])continue;const s=d.effects&&d.effects[n];s?s(t,n,o):d.onAttrChange&&(!d.declared||d.declared.has(n))&&d.onAttrChange(t,n,o)}}function ve(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const o=Q(),i=o.byAttr.get(n);if(N()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(n)&&E(t)){const d=o.byDeclaredAttr.get(n),s=t.getAttribute(n);for(let u=0;u<d.length;u++)X(d[u].spec,s,n,d[u].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||i)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const d=o.byReactive.get(n);d&&G(d,t,n,e.oldValue),o.reactiveWildcard.length&&G(o.reactiveWildcard,t,n,e.oldValue)}if(i)for(let d=0;d<i.length;d++){const s=i[d];if(s.handler){s.handler(t,n,e.oldValue);continue}s.onAttributeChange&&t[s.attribute]?s.onAttributeChange(t,n):(q(t,s.selector,s.attribute,s.ComponentFn),s.onInit&&s.onInit(t))}}function Ae(){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{ve(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 Z(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function xe(e){const t=Z();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const o=t[n];if(o.onSubtreeChange){const i=o.query,d=e.target.nodeType===1?e.target.matches(i)?e.target:e.target.closest(i):e.target.parentElement?e.target.parentElement.closest(i):null;d&&o.onSubtreeChange(d,e)}}for(let n=0;n<e.addedNodes.length;n++){const o=e.addedNodes[n];if(o.nodeType===1)for(let i=0;i<t.length;i++){const d=t[i];q(o,d.selector,d.attribute,d.ComponentFn),d.onInit&&d.onInit(o)}}for(let n=0;n<e.removedNodes.length;n++){const o=e.removedNodes[n];if(o.nodeType===1)for(let i=0;i<t.length;i++){const d=t[i],s=d.query,u=Array.from(o.querySelectorAll(s));o.matches&&o.matches(s)&&u.push(o);for(let l=0;l<u.length;l++){const r=u[l];if(!document.contains(r)){const a=r[d.attribute];if(a&&typeof a.destroy=="function")try{a.destroy()}catch(c){console.error("["+d.attribute+"] destroy failed",r,c)}delete r[d.attribute]}}}}}}function _e(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,I(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const o=t[n];if(o.type==="childList")try{xe(o)}catch(i){console.error("[ln-core] lifecycle handler failed",o.target,i)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Y(e,t,n,o,i={}){const d=i.extraAttributes||[],s=i.onAttributeChange||null,u=i.onSubtreeChange||null,l=i.onInit||null,r=i.onAttrChange||null,a=i.effects||null,c=i.attributes||null,f=c?ge(c):a,p=c?new Set(Object.keys(c)):null,w=i.persist||null;function b(y){const C=y||document.body;if(q(C,e,t,n),c&&N())for(const S in c){const Ne=c[S],R=Array.from(C.querySelectorAll("["+S+"]"));C.matches&&C.matches("["+S+"]")&&R.push(C);for(let O=0;O<R.length;O++){const T=R[O];E(T)&&X(Ne,T.getAttribute(S),S,o,T)}}l&&l(C)}const m=[];if(e.indexOf("[")!==-1){const y=/\[([\w-]+)/g;let C;for(;(C=y.exec(e))!==null;)m.push(C[1])}else m.push(e);Ce({selector:e,attribute:t,componentTag:o,attributes:c,ComponentFn:n,onInit:l,observed:m.concat(d),onAttributeChange:s,onAttrChange:r,effects:f,declared:p,persist:w}),Ae();const A=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,g=i.subtreeQuery||(A?e:"["+e+"]");Z().push({selector:e,attribute:t,ComponentFn:n,onInit:l,onSubtreeChange:u,query:g}),_e(),window[t]=b,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=Y);function h(){be()>0?ye(function(){b(document.body)}):b(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",h):h(),b}function ee(e){return(e||"").replace(/^#/,"")}function z(e){const t=e===void 0?location.hash:e,n={},o=ee(t);if(!o)return n;const i=o.split("&");for(let d=0;d<i.length;d++){const s=i[d];if(!s)continue;const u=s.indexOf(":"),l=u>-1?s.slice(0,u):s,r=u>-1?s.slice(u+1):"";if(l)try{n[l]=decodeURIComponent(r)}catch{n[l]=r}}return n}function Se(e){if(!e)return null;const t=z();return e in t?t[e]:null}function Ie(e,t){if(!e)return;const n=z();t==null?delete n[e]:n[e]=String(t);const i=Object.keys(n).map(function(d){const s=n[d];return s===""?d:d+":"+encodeURIComponent(s)}).join("&");ee(location.hash)!==i&&(location.hash=i)}function ke(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ee(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const 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 Fe(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function De(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function 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),i=o?o.split(",").map(function(d){try{return decodeURIComponent(d)}catch{return d}}).filter(Boolean):[];return{key:n,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=z,window.lnCore.hashGet=Se,window.lnCore.hashSet=Ie,window.lnCore.hashLinkClick=ke,window.lnCore.resolveHashNamespace=Ee,window.lnCore.hashSortEncode=Le,window.lnCore.hashSortDecode=Fe,window.lnCore.hashFilterEncode=De,window.lnCore.hashFilterDecode=qe);function ze(){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=ze);function Re(e){if(!e)return null;const t=String(e).split(",").map(n=>n.trim().toLowerCase()).filter(Boolean).map(n=>n.startsWith(".")?n.slice(1):n);return t.length?t:null}function te(e){return!e||typeof e!="string"||!e.includes(".")?"":e.split(".").pop().toLowerCase()}function Oe(e,t){if(!t||t.length===0)return!0;if(!e)return!1;const n=te(e.name),o=String(e.type||"").toLowerCase();return t.some(i=>{if(i.includes("/")){if(i.endsWith("/*")){const d=i.slice(0,-1);return o.startsWith(d)}return o===i}return n===i})}function Te(e,t="en",n={}){if(typeof e!="number"||isNaN(e)||e===0)return"0 "+(n["unit-b"]||"B");const o=1024,i=[n["unit-b"]||"B",n["unit-kb"]||"KB",n["unit-mb"]||"MB",n["unit-gb"]||"GB"],d=Math.floor(Math.log(e)/Math.log(o)),s=Math.min(d,i.length-1),u=e/Math.pow(o,s);return new Intl.NumberFormat(t,{maximumFractionDigits:1,minimumFractionDigits:0}).format(u)+" "+i[s]}(function(){const e="data-ln-upload",t="lnUpload",n="file",o="file_ids[]";if(window[t]!==void 0)return;const i={"data-ln-upload":{prop:"uploadUrl",read:_,type:"string",fallback:"",description:"Endpoint URL for file uploads"},"data-ln-upload-accept":{type:"string",description:"Comma-separated list of allowed file extensions or MIME types"},"data-ln-upload-delete":{prop:"deleteUrlPattern",read:_,type:"string",fallback:"",description:"Endpoint URL pattern for deleting uploaded files"},"data-ln-upload-max-size":{prop:"maxSize",read:k,type:"integer",fallback:0,min:0,description:"Maximum allowed file size in bytes (0 for unlimited)"},"data-ln-upload-max-files":{prop:"maxFiles",read:k,type:"integer",fallback:0,min:0,description:"Maximum number of files allowed in upload queue (0 for unlimited)"},"data-ln-upload-file-field":{prop:"fileFieldName",read:_,type:"string",fallback:n,description:"Form data field name used for file payloads"},"data-ln-upload-ids-field":{prop:"idsFieldName",read:_,type:"string",fallback:o,description:"Form field name for submitting uploaded file IDs"},"data-ln-upload-dict":{type:"string",description:"Dictionary key prefix mapping for translatable upload messages"},"data-ln-upload-zone":{type:"marker",description:"Designates container as dropzone for drag-and-drop file uploads"},"data-ln-upload-list":{type:"marker",description:"Container element holding rendered upload items"},"data-ln-upload-item":{type:"marker",description:"Container element for an individual file upload item"},"data-ln-upload-action":{type:"enum",values:["remove","retry"],description:"Action button within upload item"},"data-ln-upload-state":{type:"enum",values:["ready","dragover","pending","uploading","success","error"],description:"Runtime status of dropzone or individual upload item"},"data-ln-upload-id":{type:"string",description:"Server-assigned file identifier for completed upload"},"data-ln-upload-local-id":{type:"string",description:"Client-generated unique ID for tracking file item in DOM"},"data-ln-upload-size":{type:"integer",min:0,description:"File size in bytes"},"data-ln-upload-ext":{type:"string",description:"Normalized file extension"}},d=J(i);function s(r,a,c){return Te(r,a,c)}function u(){const r=document.querySelector('meta[name="csrf-token"]');return r?r.getAttribute("content"):""}function l(r){this.dom=r,K(this,r,d),this.dict=me(r,"data-ln-upload-dict"),this.locale=se(r),this.zone=r.querySelector("[data-ln-upload-zone]")||r,this.list=r.querySelector("[data-ln-upload-list]"),this.input=r.querySelector('input[type="file"]'),this.input||console.warn('[ln-upload] Missing <input type="file"> in container:',r);const a=r.getAttribute("data-ln-upload-accept")||(this.input?this.input.getAttribute("accept"):"");return this.allowedExts=Re(a),this.uploadedFiles=new Map,this.fileIdCounter=0,this._dragDepth=0,this._hydrate(),this._bindEvents(),this}l.prototype._hydrate=function(){const r=this;if(!this.list)return;const a=this.list.querySelectorAll("[data-ln-upload-item]");for(let f=0;f<a.length;f++){const p=a[f],w=p.getAttribute("data-ln-upload-id"),b="file-"+ ++r.fileIdCounter;p.setAttribute("data-ln-upload-local-id",b);const m=p.querySelector('[data-ln-field="name"]'),A=p.querySelector('[data-ln-field="sizeText"]'),g=p.getAttribute("data-ln-upload-size"),h=g?parseInt(g,10):null;r.uploadedFiles.set(b,{serverId:w||null,name:m?m.textContent.trim():"",size:h!==null&&!isNaN(h)?h:A?A.textContent.trim():""})}const c=this.dom.querySelectorAll('input[type="hidden"]');for(let f=0;f<c.length;f++){const p=c[f];if(p.name===r.idsFieldName&&p.value&&!Array.from(r.uploadedFiles.values()).some(function(b){return String(b.serverId)===String(p.value)})){const b="file-"+ ++r.fileIdCounter;r.uploadedFiles.set(b,{serverId:p.value,name:"",size:""})}}this._syncHiddenInputs()},l.prototype._syncHiddenInputs=function(){const r=this,a=this.dom.querySelectorAll('input[type="hidden"]');for(let c=0;c<a.length;c++)a[c].name===r.idsFieldName&&a[c].remove();for(const[,c]of this.uploadedFiles)if(c.serverId){const f=document.createElement("input");f.type="hidden",f.name=r.idsFieldName,f.value=c.serverId,r.dom.appendChild(f)}},l.prototype._bindEvents=function(){const r=this;this._onZoneClick=function(a){r.zone===r.dom&&a.target.closest("[data-ln-upload-list], [data-ln-upload-action], input, button, a")||r.input&&a.target!==r.input&&r.input.click()},this._onInputChange=function(){r.input&&r.input.files&&(r.upload(r.input.files),r.input.value="")},this._onDragEnter=function(a){a.preventDefault(),a.stopPropagation(),r._dragDepth++,r.zone.setAttribute("data-ln-upload-state","dragover")},this._onDragOver=function(a){a.preventDefault(),a.stopPropagation(),r.zone.setAttribute("data-ln-upload-state","dragover")},this._onDragLeave=function(a){a.preventDefault(),a.stopPropagation(),r._dragDepth--,r._dragDepth<=0&&(r._dragDepth=0,r.zone.removeAttribute("data-ln-upload-state"))},this._onDrop=function(a){a.preventDefault(),a.stopPropagation(),r._dragDepth=0,r.zone.removeAttribute("data-ln-upload-state"),a.dataTransfer&&a.dataTransfer.files&&r.upload(a.dataTransfer.files)},this._onListClick=function(a){const c=a.target.closest('[data-ln-upload-action="remove"]');if(!c||!r.list||!r.list.contains(c)||c.disabled)return;const f=c.closest("[data-ln-upload-item]");if(f){const p=f.getAttribute("data-ln-upload-local-id");p&&r.remove(p)}},this._onRequestUpload=function(a){a.detail&&a.detail.files&&r.upload(a.detail.files)},this._onRequestRemove=function(a){if(a.detail){const c=a.detail.localId!==void 0?a.detail.localId:a.detail.serverId;c!==void 0&&r.remove(c)}},this._onRequestClear=function(){r.clear()},this.zone.addEventListener("click",this._onZoneClick),this.input&&this.input.addEventListener("change",this._onInputChange),this.zone.addEventListener("dragenter",this._onDragEnter),this.zone.addEventListener("dragover",this._onDragOver),this.zone.addEventListener("dragleave",this._onDragLeave),this.zone.addEventListener("drop",this._onDrop),this.list&&this.list.addEventListener("click",this._onListClick),this.dom.addEventListener("ln-upload:request-upload",this._onRequestUpload),this.dom.addEventListener("ln-upload:request-remove",this._onRequestRemove),this.dom.addEventListener("ln-upload:request-clear",this._onRequestClear)},l.prototype.upload=function(r){const a=this,c=Array.from(r);for(let f=0;f<c.length;f++){const p=c[f];if(a.maxFiles>0&&a.uploadedFiles.size>=a.maxFiles){v(a.dom,"ln-upload:invalid",{file:p,reason:"max-files"});continue}if(!Oe(p,a.allowedExts)){v(a.dom,"ln-upload:invalid",{file:p,reason:"accept"});continue}if(a.maxSize>0&&p.size>a.maxSize){v(a.dom,"ln-upload:invalid",{file:p,reason:"max-size"});continue}L(a.dom,"ln-upload:before-upload",{file:p}).defaultPrevented||a._uploadSingleFile(p)}},l.prototype._uploadSingleFile=function(r){const a=this,c="file-"+ ++a.fileIdCounter,f=te(r.name);let p=null;if(this.list){const g=fe(this.dom,"ln-upload-item","ln-upload");if(g&&(p=g.firstElementChild,p)){p.setAttribute("data-ln-upload-item",""),p.setAttribute("data-ln-upload-local-id",c),p.setAttribute("data-ln-upload-ext",f),p.setAttribute("data-ln-upload-state","uploading"),x(p,{name:r.name,sizeText:"0%",removeLabel:a.dict.remove||"Remove",uploading:!0,error:!1,deleting:!1});const h=p.querySelector('[data-ln-upload-action="remove"]');h&&(h.disabled=!0);const y=p.querySelector("[data-ln-progress]");y&&y.setAttribute("data-ln-progress","0"),a.list.appendChild(p)}}const w=new FormData;w.append(a.fileFieldName,r);const b=this.dom.querySelectorAll("input, select, textarea");for(let g=0;g<b.length;g++){const h=b[g];!h.name||h.name===a.idsFieldName||h.type==="file"||(h.type==="checkbox"||h.type==="radio")&&!h.checked||w.append(h.name,h.value)}const m=new XMLHttpRequest;a.uploadedFiles.set(c,{serverId:null,name:r.name,size:r.size,xhr:m}),m.upload.addEventListener("progress",function(g){if(g.lengthComputable){const h=Math.round(g.loaded/g.total*100);if(p){const y=p.querySelector("[data-ln-progress]");y&&y.setAttribute("data-ln-progress",String(h)),x(p,{sizeText:h+"%"})}v(a.dom,"ln-upload:progress",{localId:c,file:r,percent:h,loaded:g.loaded,total:g.total})}}),m.addEventListener("load",function(){const g=a.uploadedFiles.get(c);if(g&&delete g.xhr,m.status>=200&&m.status<300){let h;try{h=JSON.parse(m.responseText)}catch(C){A(a.dict.error||"Error",m.status,C);return}const y=h.id||h.serverId;if(p){p.removeAttribute("data-ln-upload-state"),y&&p.setAttribute("data-ln-upload-id",String(y)),x(p,{sizeText:s(h.size||r.size,a.locale,a.dict),uploading:!1});const C=p.querySelector('[data-ln-upload-action="remove"]');C&&(C.disabled=!1)}g&&(g.serverId=y,g.size=h.size||r.size,g.name=h.name||r.name),a._syncHiddenInputs(),v(a.dom,"ln-upload:uploaded",{localId:c,serverId:y,name:h.name||r.name,size:h.size||r.size,response:h})}else{let h="";try{h=JSON.parse(m.responseText).message||""}catch{}A(h,m.status,null)}}),m.addEventListener("error",function(){const g=a.uploadedFiles.get(c);g&&delete g.xhr,A("",0,null)});function A(g,h,y){if(p){p.setAttribute("data-ln-upload-state","error"),x(p,{sizeText:a.dict.error||"Error",uploading:!1,error:!0});const C=p.querySelector('[data-ln-upload-action="remove"]');C&&(C.disabled=!1)}v(a.dom,"ln-upload:error",{file:r,message:g,status:h,error:y})}a.uploadUrl?(m.open("POST",a.uploadUrl),m.setRequestHeader("X-CSRF-TOKEN",u()),m.setRequestHeader("X-Requested-With","XMLHttpRequest"),m.setRequestHeader("Accept","application/json"),m.send(w)):console.warn("[ln-upload] No upload URL configured (missing data-ln-upload)")},l.prototype.remove=function(r){const a=this;let c=null,f=null;if(a.uploadedFiles.has(r))c=r,f=a.uploadedFiles.get(r);else for(const[m,A]of a.uploadedFiles)if(String(A.serverId)===String(r)){c=m,f=A;break}if(!c||!f||L(a.dom,"ln-upload:before-remove",{localId:c,serverId:f.serverId}).defaultPrevented)return;const w=a.list?a.list.querySelector('[data-ln-upload-local-id="'+c+'"]'):null;if(f.xhr&&typeof f.xhr.abort=="function"&&f.xhr.abort(),!f.serverId){w&&w.remove(),a.uploadedFiles.delete(c),a._syncHiddenInputs(),v(a.dom,"ln-upload:removed",{localId:c,serverId:null});return}let b=null;if(a.deleteUrlPattern?b=a.deleteUrlPattern.replace("{id}",encodeURIComponent(f.serverId)):a.uploadUrl&&a.uploadUrl.includes("{id}")&&(b=a.uploadUrl.replace("{id}",encodeURIComponent(f.serverId))),!b){w&&w.remove(),a.uploadedFiles.delete(c),a._syncHiddenInputs(),v(a.dom,"ln-upload:removed",{localId:c,serverId:f.serverId});return}w&&(w.setAttribute("data-ln-upload-state","deleting"),x(w,{deleting:!0})),fetch(b,{method:"DELETE",headers:{"X-CSRF-TOKEN":u(),"X-Requested-With":"XMLHttpRequest",Accept:"application/json"}}).then(function(m){m.ok?(w&&w.remove(),a.uploadedFiles.delete(c),a._syncHiddenInputs(),v(a.dom,"ln-upload:removed",{localId:c,serverId:f.serverId})):(w&&(w.removeAttribute("data-ln-upload-state"),x(w,{deleting:!1})),v(a.dom,"ln-upload:error",{file:f,message:"",status:m.status}))}).catch(function(m){w&&(w.removeAttribute("data-ln-upload-state"),x(w,{deleting:!1})),v(a.dom,"ln-upload:error",{file:f,message:"",status:0,error:m})})},l.prototype.clear=function(){const r=this;if(!L(r.dom,"ln-upload:before-clear",{}).defaultPrevented){for(const[,c]of this.uploadedFiles)if(c.xhr&&typeof c.xhr.abort=="function"&&c.xhr.abort(),c.serverId){let f=null;r.deleteUrlPattern?f=r.deleteUrlPattern.replace("{id}",encodeURIComponent(c.serverId)):r.uploadUrl&&r.uploadUrl.includes("{id}")&&(f=r.uploadUrl.replace("{id}",encodeURIComponent(c.serverId))),f&&fetch(f,{method:"DELETE",headers:{"X-CSRF-TOKEN":u(),"X-Requested-With":"XMLHttpRequest",Accept:"application/json"}}).catch(function(){})}r.uploadedFiles.clear(),r.list&&(r.list.innerHTML=""),r._syncHiddenInputs(),v(r.dom,"ln-upload:cleared",{})}},l.prototype.getFileIds=function(){return Array.from(this.uploadedFiles.values()).map(function(r){return r.serverId}).filter(Boolean)},l.prototype.getFiles=function(){return Array.from(this.uploadedFiles.values()).map(function(r){return{serverId:r.serverId,name:r.name,size:r.size}})},l.prototype.destroy=function(){if(this.dom[t]){for(const[,r]of this.uploadedFiles)r.xhr&&typeof r.xhr.abort=="function"&&r.xhr.abort();this.zone.removeEventListener("click",this._onZoneClick),this.input&&this.input.removeEventListener("change",this._onInputChange),this.zone.removeEventListener("dragenter",this._onDragEnter),this.zone.removeEventListener("dragover",this._onDragOver),this.zone.removeEventListener("dragleave",this._onDragLeave),this.zone.removeEventListener("drop",this._onDrop),this.list&&this.list.removeEventListener("click",this._onListClick),this.dom.removeEventListener("ln-upload:request-upload",this._onRequestUpload),this.dom.removeEventListener("ln-upload:request-remove",this._onRequestRemove),this.dom.removeEventListener("ln-upload:request-clear",this._onRequestClear),this.uploadedFiles.clear(),this.dict={},delete this.dom[t]}},Y(e,t,l,"ln-upload",{attributes:i})})()})();
@@ -1 +1 @@
1
- (function(){"use strict";function I(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function _(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(!_(o))return}e.apply(console,t)}}function A(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function y(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){y(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}const D={};function H(e,t){D[e]=t}function K(e){return D[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=H,window.lnCore.getDataMapper=K);function P(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,y(function(){new MutationObserver(function(){A(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const q={};function G(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];q[n]=t}function Q(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return q[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=G,window.lnCore.getLocaleFallback=Q,window.lnCore.ensureLocaleObserver=P);const x={};function z(e,t){x[e]||(x[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=x[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function T(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let s=0;s<n.length;s++){const a=n[s],r=a.getAttribute("data-ln-field");t[r]!=null&&(a.textContent=t[r])}const o=e.querySelectorAll("[data-ln-attr]");for(let s=0;s<o.length;s++){const a=o[s],r=a.getAttribute("data-ln-attr").split(",");for(let d=0;d<r.length;d++){const c=r[d].trim().split(":");if(c.length!==2)continue;const u=c[0].trim(),w=c[1].trim();t[w]!=null&&a.setAttribute(u,t[w])}}const i=e.querySelectorAll("[data-ln-show]");for(let s=0;s<i.length;s++){const a=i[s],r=a.getAttribute("data-ln-show");r in t&&a.classList.toggle("hidden",!t[r])}const l=e.querySelectorAll("[data-ln-class]");for(let s=0;s<l.length;s++){const a=l[s],r=a.getAttribute("data-ln-class").split(",");for(let d=0;d<r.length;d++){const c=r[d].trim().split(":");if(c.length!==2)continue;const u=c[0].trim(),w=c[1].trim();w in t&&a.classList.toggle(u,!!t[w])}}return e}function J(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)T(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 F(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const l=n.currentNode;l.textContent.indexOf("{{")!==-1&&(l.textContent=l.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(s,a){return t[a]!==void 0?t[a]:""}))}const o=function(l,s){return t[s]!==void 0?t[s]:""},i=Array.from(e.querySelectorAll("*"));e.nodeType===1&&i.push(e);for(let l=0;l<i.length;l++){const s=i[l],a=s.attributes;for(let r=0;r<a.length;r++){const d=a[r];d.value.indexOf("{{")!==-1&&s.setAttribute(d.name,d.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function X(e,t,n,o,i,l){const s={};for(let r=0;r<e.children.length;r++){const d=e.children[r],c=d.getAttribute("data-ln-render-key");c&&(s[c]=d)}const a=document.createDocumentFragment();for(let r=0;r<t.length;r++){const d=t[r],c=String(o(d));let u=s[c];if(u)i(u,d,r);else{const w=z(n,l);if(!w||(F(w,d),u=w.firstElementChild,!u))continue;u.setAttribute("data-ln-render-key",c),i(u,d,r)}a.appendChild(u)}e.textContent="",e.appendChild(a)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=F,window.lnCore.fill=T,window.lnCore.lnFill=J,window.lnCore.renderList=X);function $(e,t,n,o,i){if(!e||t===null)return!0;const l=o||"ln-component",s=e.type;if(s==="trigger"||s==="marker"||s==="string"||s==="list"||!s||t===""&&e.fallback!==void 0)return!0;const a=r=>{i?console.warn(r,i):console.warn(r)};if(s==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(a(`[${l}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(s==="enum"){const r=e.values||[];return r.includes(t)?!0:(a(`[${l}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(s==="integer"){if(!/^-?\d+$/.test(t))return a(`[${l}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(a(`[${l}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(a(`[${l}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(s==="float")return isNaN(Number(t))?(a(`[${l}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(s==="json")try{return JSON.parse(t),!0}catch(r){return a(`[${l}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function Y(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 Z(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}function S(e,t,n,o){if(e.nodeType!==1)return;const l=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",s=Array.from(e.querySelectorAll(l));e.matches&&e.matches(l)&&s.push(e);for(const a of s)if(!a[n]){window.lnCore._persistSink&&a.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(a,t);try{a[n]=new o(a)}catch(r){console.error("["+n+"] init failed",a,r)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function ee(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function te(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function M(){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 ne(e){const t=M(),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(l=>l.componentTag===e.componentTag)||i.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=Z(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 V(e,t,n,o){for(let i=0;i<e.length;i++){const l=e[i];if(!t[l.attribute])continue;const s=l.effects&&l.effects[n];s?s(t,n,o):l.onAttrChange&&(!l.declared||l.declared.has(n))&&l.onAttrChange(t,n,o)}}function oe(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const o=M(),i=o.byAttr.get(n);if(I()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(n)&&_(t)){const l=o.byDeclaredAttr.get(n),s=t.getAttribute(n);for(let a=0;a<l.length;a++)$(l[a].spec,s,n,l[a].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||i)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const l=o.byReactive.get(n);l&&V(l,t,n,e.oldValue),o.reactiveWildcard.length&&V(o.reactiveWildcard,t,n,e.oldValue)}if(i)for(let l=0;l<i.length;l++){const s=i[l];if(s.handler){s.handler(t,n,e.oldValue);continue}s.onAttributeChange&&t[s.attribute]?s.onAttributeChange(t,n):(S(t,s.selector,s.attribute,s.ComponentFn),s.onInit&&s.onInit(t))}}function re(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,y(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{oe(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 B(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function ie(e){const t=B();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const o=t[n];if(o.onSubtreeChange){const i=o.query,l=e.target.nodeType===1?e.target.matches(i)?e.target:e.target.closest(i):e.target.parentElement?e.target.parentElement.closest(i):null;l&&o.onSubtreeChange(l,e)}}for(let n=0;n<e.addedNodes.length;n++){const o=e.addedNodes[n];if(o.nodeType===1)for(let i=0;i<t.length;i++){const l=t[i];S(o,l.selector,l.attribute,l.ComponentFn),l.onInit&&l.onInit(o)}}for(let n=0;n<e.removedNodes.length;n++){const o=e.removedNodes[n];if(o.nodeType===1)for(let i=0;i<t.length;i++){const l=t[i],s=l.query,a=Array.from(o.querySelectorAll(s));o.matches&&o.matches(s)&&a.push(o);for(let r=0;r<a.length;r++){const d=a[r];if(!document.contains(d)){const c=d[l.attribute];if(c&&typeof c.destroy=="function")try{c.destroy()}catch(u){console.error("["+l.attribute+"] destroy failed",d,u)}delete d[l.attribute]}}}}}}function le(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,y(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const o=t[n];if(o.type==="childList")try{ie(o)}catch(i){console.error("[ln-core] lifecycle handler failed",o.target,i)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function se(e,t,n,o,i={}){const l=i.extraAttributes||[],s=i.onAttributeChange||null,a=i.onSubtreeChange||null,r=i.onInit||null,d=i.onAttrChange||null,c=i.effects||null,u=i.attributes||null,w=u?Y(u):c,g=u?new Set(Object.keys(u)):null,b=i.persist||null;function f(L){const m=L||document.body;if(S(m,e,t,n),u&&I())for(const C in u){const Ce=u[C],O=Array.from(m.querySelectorAll("["+C+"]"));m.matches&&m.matches("["+C+"]")&&O.push(m);for(let k=0;k<O.length;k++){const R=O[k];_(R)&&$(Ce,R.getAttribute(C),C,o,R)}}r&&r(m)}const h=[];if(e.indexOf("[")!==-1){const L=/\[([\w-]+)/g;let m;for(;(m=L.exec(e))!==null;)h.push(m[1])}else h.push(e);ne({selector:e,attribute:t,componentTag:o,attributes:u,ComponentFn:n,onInit:r,observed:h.concat(l),onAttributeChange:s,onAttrChange:d,effects:w,declared:g,persist:b}),re();const v=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]";B().push({selector:e,attribute:t,ComponentFn:n,onInit:r,onSubtreeChange:a,query:v}),le(),window[t]=f;function U(){ee()>0?te(function(){f(document.body)}):f(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",U):U(),f}function N(e){return(e||"").replace(/^#/,"")}function E(e){const t=e===void 0?location.hash:e,n={},o=N(t);if(!o)return n;const i=o.split("&");for(let l=0;l<i.length;l++){const s=i[l];if(!s)continue;const a=s.indexOf(":"),r=a>-1?s.slice(0,a):s,d=a>-1?s.slice(a+1):"";if(r)try{n[r]=decodeURIComponent(d)}catch{n[r]=d}}return n}function ae(e){if(!e)return null;const t=E();return e in t?t[e]:null}function de(e,t){if(!e)return;const n=E();t==null?delete n[e]:n[e]=String(t);const i=Object.keys(n).map(function(l){const s=n[l];return s===""?l:l+":"+encodeURIComponent(s)}).join("&");N(location.hash)!==i&&(location.hash=i)}function ce(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function ue(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 fe(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function he(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 be(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(l){try{return decodeURIComponent(l)}catch{return l}}).filter(Boolean):[];return{key:n,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=E,window.lnCore.hashGet=ae,window.lnCore.hashSet=de,window.lnCore.hashLinkClick=ce,window.lnCore.resolveHashNamespace=ue,window.lnCore.hashSortEncode=fe,window.lnCore.hashSortDecode=he,window.lnCore.hashFilterEncode=we,window.lnCore.hashFilterDecode=be);function ge(){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=ge);const j={required:"valueMissing",typeMismatch:"typeMismatch",tooShort:"tooShort",tooLong:"tooLong",patternMismatch:"patternMismatch",rangeUnderflow:"rangeUnderflow",rangeOverflow:"rangeOverflow"};function W(e,t=0){return e?!!(e.valid&&t===0):t===0}function pe(e){return e.type==="checkbox"||e.type==="radio"?!!e.checked:!!(e.value&&e.value.trim()!=="")}function me(e,t){const n=[];if(e){const o=Object.keys(j);for(let i=0;i<o.length;i++){const l=o[i],s=j[l];e[s]&&n.push(l)}}if(t){const o=Array.from(t);for(let i=0;i<o.length;i++)o[i]&&n.indexOf(o[i])===-1&&n.push(o[i])}return n}(function(){const e="data-ln-validate",t="lnValidate",n="data-ln-validate-errors",o="data-ln-validate-error",i="ln-validate-valid",l="ln-validate-invalid";if(window[t]!==void 0)return;const s={"data-ln-validate":{type:"marker",description:"Activates validation on form input or field"},"data-ln-validate-errors":{type:"marker",description:"Container element holding validation error message elements"},"data-ln-validate-error":{type:"string",description:"Identifies error message template for a specific validation rule"}};function a(r){this.dom=r,this._touched=!1,this._customErrors=new Set;const d=this,c=r.tagName,u=r.type,w=c==="SELECT"||u==="checkbox"||u==="radio";this._onInput=function(){d._touched=!0,d.validate()},this._onChange=function(){d._touched=!0,d.validate()},this._onSetCustom=function(b){const f=b.detail&&b.detail.error;if(!f)return;d._customErrors.add(f),d._touched=!0;const h=r.closest(".form-element");if(h){const p=h.querySelector("["+o+'="'+f+'"]');p&&p.classList.remove("hidden")}r.classList.remove(i),r.classList.add(l),r.setAttribute("aria-invalid","true")},this._onClearCustom=function(b){const f=b.detail&&b.detail.error,h=r.closest(".form-element");if(f){if(d._customErrors.delete(f),h){const p=h.querySelector("["+o+'="'+f+'"]');p&&p.classList.add("hidden")}}else d._customErrors.forEach(function(p){if(h){const v=h.querySelector("["+o+'="'+p+'"]');v&&v.classList.add("hidden")}}),d._customErrors.clear();d._touched&&d.validate()},w||r.addEventListener("input",this._onInput),r.addEventListener("change",this._onChange),r.addEventListener("ln-validate:set-custom",this._onSetCustom),r.addEventListener("ln-validate:clear-custom",this._onClearCustom);const g=r.form;return g&&(g.hasAttribute("novalidate")||g.setAttribute("novalidate",""),this._onFormReset=function(){d.reset()},this._onValidateRequest=function(b){d._touched=!0,!d.validate()&&b.detail&&b.detail.invalidFields&&b.detail.invalidFields.push(d.dom)},g.addEventListener("reset",this._onFormReset),g.addEventListener("ln-validate:request-validate",this._onValidateRequest),g._lnValidateGateBound||(g._lnValidateGateBound=!0,g.addEventListener("submit",function(b){const f={invalidFields:[]};A(g,"ln-validate:request-validate",f),f.invalidFields.length>0&&(b.preventDefault(),f.invalidFields.sort((h,p)=>h.compareDocumentPosition(p)&Node.DOCUMENT_POSITION_PRECEDING?-1:1),f.invalidFields[0].focus())}))),pe(r)&&(this._touched=!0,this.validate()),this}a.prototype.validate=function(){const r=this.dom,d=r.validity,c=W(d,this._customErrors.size),u=me(d,this._customErrors),w=r.closest(".form-element");if(w){const b=w.querySelector("["+n+"]");if(b){const f=b.querySelectorAll("["+o+"]");for(let h=0;h<f.length;h++){const p=f[h].getAttribute(o);f[h].classList.toggle("hidden",!u.includes(p))}}}return r.classList.toggle(i,c),r.classList.toggle(l,!c),r.setAttribute("aria-invalid",c?"false":"true"),A(r,c?"ln-validate:valid":"ln-validate:invalid",{target:r,field:r.name,errors:u}),c},a.prototype.reset=function(){this._touched=!1,this._customErrors.clear(),this.dom.classList.remove(i,l),this.dom.removeAttribute("aria-invalid");const r=this.dom.closest(".form-element");if(r){const d=r.querySelectorAll("["+o+"]");for(let c=0;c<d.length;c++)d[c].classList.add("hidden")}},Object.defineProperty(a.prototype,"isValid",{get:function(){return W(this.dom.validity,this._customErrors.size)}}),a.prototype.destroy=function(){if(!this.dom[t])return;this.dom.removeEventListener("input",this._onInput),this.dom.removeEventListener("change",this._onChange),this.dom.removeEventListener("ln-validate:set-custom",this._onSetCustom),this.dom.removeEventListener("ln-validate:clear-custom",this._onClearCustom);const r=this.dom.form;r&&(this._onFormReset&&r.removeEventListener("reset",this._onFormReset),this._onValidateRequest&&r.removeEventListener("ln-validate:request-validate",this._onValidateRequest)),this.dom.classList.remove(i,l),this.dom.removeAttribute("aria-invalid"),delete this.dom[t]},se(e,t,a,"ln-validate",{attributes:s})})()})();
1
+ (function(){"use strict";function q(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function _(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let r=null;for(let i=1;i<t.length;i++)if(t[i]&&t[i].nodeType===1){r=t[i];break}if(!_(r))return}e.apply(console,t)}}function A(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 y(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){y(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function Z(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ee(e,t){const n=!!(t&&t.typed),r=t&&t.exclude,i={},s=e.elements,l={};if(n)for(let a=0;a<s.length;a++){const o=s[a];o.name&&o.type==="checkbox"&&!o.disabled&&(l[o.name]=(l[o.name]||0)+1)}for(let a=0;a<s.length;a++){const o=s[a];if(!(!o.name||o.disabled||o.type==="file"||o.type==="submit"||o.type==="button")&&!(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 c=0;c<o.options.length;c++)o.options[c].selected&&i[o.name].push(o.options[c].value)}else if(n&&o.type==="hidden")i[o.name]=o.value;else if(n&&(o.type==="number"||o.type==="range")){const c=Number(o.value);i[o.name]=o.value===""||isNaN(c)?null:c}else i[o.name]=o.value}return i}function te(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ne(e,t){const 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 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 c=String(o).split(",").map(function(d){return d.trim()});l.checked=c.indexOf(l.value)!==-1}else l.checked=te(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 c=0;c<l.options.length;c++)l.options[c].selected=o.indexOf(l.options[c].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=ne,window.lnCore.serializeForm=ee,window.lnCore.resolveFormMethod=Z);const D={};function oe(e,t){D[e]=t}function re(e){return D[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=oe,window.lnCore.getDataMapper=re);function ie(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,y(function(){new MutationObserver(function(){A(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const N={};function le(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];N[n]=t}function se(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return N[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=le,window.lnCore.getLocaleFallback=se,window.lnCore.ensureLocaleObserver=ie);const x={};function ae(e,t){x[e]||(x[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=x[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function T(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 c=0;c<o.length;c++){const d=o[c].trim().split(":");if(d.length!==2)continue;const u=d[0].trim(),h=d[1].trim();t[h]!=null&&a.setAttribute(u,t[h])}}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 s=e.querySelectorAll("[data-ln-class]");for(let l=0;l<s.length;l++){const a=s[l],o=a.getAttribute("data-ln-class").split(",");for(let c=0;c<o.length;c++){const d=o[c].trim().split(":");if(d.length!==2)continue;const u=d[0].trim(),h=d[1].trim();h in t&&a.classList.toggle(u,!!t[h])}}return e}function ce(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<n.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[r],t??null),n[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)T(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function M(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,a){return t[a]!==void 0?t[a]:""}))}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],a=l.attributes;for(let o=0;o<a.length;o++){const c=a[o];c.value.indexOf("{{")!==-1&&l.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function de(e,t,n,r,i,s){const l={};for(let o=0;o<e.children.length;o++){const c=e.children[o],d=c.getAttribute("data-ln-render-key");d&&(l[d]=c)}const a=document.createDocumentFragment();for(let o=0;o<t.length;o++){const c=t[o],d=String(r(c));let u=l[d];if(u)i(u,c,o);else{const h=ae(n,s);if(!h||(M(h,c),u=h.firstElementChild,!u))continue;u.setAttribute("data-ln-render-key",d),i(u,c,o)}a.appendChild(u)}e.textContent="",e.appendChild(a)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=M,window.lnCore.fill=T,window.lnCore.lnFill=ce,window.lnCore.renderList=de);function S(e,t,n){const r=e.getAttribute(t);return r===null?n:r}function $(e,t,n){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?n:r}function B(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 V(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const k=new Map;function j(e,t){const n=(e?e.join("|"):"")+"::"+t;if(k.has(n))return k.get(n);const r=new Set(e||[]),i=function(s,l){const a=s.getAttribute(l);return a!==null&&r.has(a)?a:t};return k.set(n,i),i}function W(e,t,n){const r=parseFloat(e.getAttribute(t));return isNaN(r)?n:r}function U(e,t,n){const r=e.getAttribute(t);if(!r)return n;try{return JSON.parse(r)}catch{return n}}function H(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 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(`[${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:(a(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${o.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return a(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const o=parseInt(t,10);return e.min!==void 0&&o<e.min?(a(`[${s}] Value ${o} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(a(`[${s}] Value ${o} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(a(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(o){return a(`[${s}] Invalid JSON for attribute "${n}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function ue(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 fe(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=j(r.values,r.fallback);break;case"integer":i=$;break;case"float":i=W;break;case"boolean":i=B;break;case"list":i=V;break;case"json":i=U;break;case"string":default:i=S;break}i||(i=S),t[r.prop]=[i,n,r.fallback]}return t}function we(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 he(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=ue,window.lnCore.attrSpec=fe,window.lnCore.attrStr=S,window.lnCore.attrInt=$,window.lnCore.attrBool=B,window.lnCore.attrList=V,window.lnCore.attrEnum=j,window.lnCore.attrFloat=W,window.lnCore.attrJson=U);function E(e,t,n,r){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l=Array.from(e.querySelectorAll(s));e.matches&&e.matches(s)&&l.push(e);for(const a of l)if(!a[n]){window.lnCore._persistSink&&a.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(a,t);try{a[n]=new r(a)}catch(o){console.error("["+n+"] init failed",a,o)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function pe(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function be(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function K(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function me(e){const t=K(),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=he(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 P(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 ge(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const r=K(),i=r.byAttr.get(n);if(q()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(n)&&_(t)){const s=r.byDeclaredAttr.get(n),l=t.getAttribute(n);for(let a=0;a<s.length;a++)H(s[a].spec,l,n,s[a].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||i)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const s=r.byReactive.get(n);s&&P(s,t,n,e.oldValue),r.reactiveWildcard.length&&P(r.reactiveWildcard,t,n,e.oldValue)}if(i)for(let s=0;s<i.length;s++){const l=i[s];if(l.handler){l.handler(t,n,e.oldValue);continue}l.onAttributeChange&&t[l.attribute]?l.onAttributeChange(t,n):(E(t,l.selector,l.attribute,l.ComponentFn),l.onInit&&l.onInit(t))}}function Ce(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,y(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{ge(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 Q(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function ye(e){const t=Q();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const r=t[n];if(r.onSubtreeChange){const i=r.query,s=e.target.nodeType===1?e.target.matches(i)?e.target:e.target.closest(i):e.target.parentElement?e.target.parentElement.closest(i):null;s&&r.onSubtreeChange(s,e)}}for(let n=0;n<e.addedNodes.length;n++){const r=e.addedNodes[n];if(r.nodeType===1)for(let i=0;i<t.length;i++){const s=t[i];E(r,s.selector,s.attribute,s.ComponentFn),s.onInit&&s.onInit(r)}}for(let n=0;n<e.removedNodes.length;n++){const r=e.removedNodes[n];if(r.nodeType===1)for(let i=0;i<t.length;i++){const s=t[i],l=s.query,a=Array.from(r.querySelectorAll(l));r.matches&&r.matches(l)&&a.push(r);for(let o=0;o<a.length;o++){const c=a[o];if(!document.contains(c)){const d=c[s.attribute];if(d&&typeof d.destroy=="function")try{d.destroy()}catch(u){console.error("["+s.attribute+"] destroy failed",c,u)}delete c[s.attribute]}}}}}}function ve(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,y(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{ye(r)}catch(i){console.error("[ln-core] lifecycle handler failed",r.target,i)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function G(e,t,n,r,i={}){const s=i.extraAttributes||[],l=i.onAttributeChange||null,a=i.onSubtreeChange||null,o=i.onInit||null,c=i.onAttrChange||null,d=i.effects||null,u=i.attributes||null,h=u?we(u):d,m=u?new Set(Object.keys(u)):null,p=i.persist||null;function f(O){const g=O||document.body;if(E(g,e,t,n),u&&q())for(const C in u){const qe=u[C],R=Array.from(g.querySelectorAll("["+C+"]"));g.matches&&g.matches("["+C+"]")&&R.push(g);for(let I=0;I<R.length;I++){const F=R[I];_(F)&&H(qe,F.getAttribute(C),C,r,F)}}o&&o(g)}const w=[];if(e.indexOf("[")!==-1){const O=/\[([\w-]+)/g;let g;for(;(g=O.exec(e))!==null;)w.push(g[1])}else w.push(e);me({selector:e,attribute:t,componentTag:r,attributes:u,ComponentFn:n,onInit:o,observed:w.concat(s),onAttributeChange:l,onAttrChange:c,effects:h,declared:m,persist:p}),Ce();const b=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,v=i.subtreeQuery||(b?e:"["+e+"]");Q().push({selector:e,attribute:t,ComponentFn:n,onInit:o,onSubtreeChange:a,query:v}),ve(),window[t]=f,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=G);function Y(){pe()>0?be(function(){f(document.body)}):f(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Y):Y(),f}function J(e){return(e||"").replace(/^#/,"")}function L(e){const t=e===void 0?location.hash:e,n={},r=J(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 a=l.indexOf(":"),o=a>-1?l.slice(0,a):l,c=a>-1?l.slice(a+1):"";if(o)try{n[o]=decodeURIComponent(c)}catch{n[o]=c}}return n}function _e(e){if(!e)return null;const t=L();return e in t?t[e]:null}function Ae(e,t){if(!e)return;const n=L();t==null?delete n[e]:n[e]=String(t);const i=Object.keys(n).map(function(s){const l=n[s];return l===""?s:s+":"+encodeURIComponent(l)}).join("&");J(location.hash)!==i&&(location.hash=i)}function xe(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Se(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 ke(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Ee(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Le(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Oe(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const 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=L,window.lnCore.hashGet=_e,window.lnCore.hashSet=Ae,window.lnCore.hashLinkClick=xe,window.lnCore.resolveHashNamespace=Se,window.lnCore.hashSortEncode=ke,window.lnCore.hashSortDecode=Ee,window.lnCore.hashFilterEncode=Le,window.lnCore.hashFilterDecode=Oe);function Re(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Re);const z={required:"valueMissing",typeMismatch:"typeMismatch",tooShort:"tooShort",tooLong:"tooLong",patternMismatch:"patternMismatch",rangeUnderflow:"rangeUnderflow",rangeOverflow:"rangeOverflow"};function X(e,t=0){return e?!!(e.valid&&t===0):t===0}function Ie(e){return e.type==="checkbox"||e.type==="radio"?!!e.checked:!!(e.value&&e.value.trim()!=="")}function Fe(e,t){const n=[];if(e){const r=Object.keys(z);for(let i=0;i<r.length;i++){const s=r[i],l=z[s];e[l]&&n.push(s)}}if(t){const r=Array.from(t);for(let i=0;i<r.length;i++)r[i]&&n.indexOf(r[i])===-1&&n.push(r[i])}return n}(function(){const e="data-ln-validate",t="lnValidate",n="data-ln-validate-errors",r="data-ln-validate-error",i="ln-validate-valid",s="ln-validate-invalid";if(window[t]!==void 0)return;const l={"data-ln-validate":{type:"marker",description:"Activates validation on form input or field"},"data-ln-validate-errors":{type:"marker",description:"Container element holding validation error message elements"},"data-ln-validate-error":{type:"string",description:"Identifies error message template for a specific validation rule"}};function a(o){this.dom=o,this._touched=!1,this._customErrors=new Set;const c=this,d=o.tagName,u=o.type,h=d==="SELECT"||u==="checkbox"||u==="radio";this._onInput=function(){c._touched=!0,c.validate()},this._onChange=function(){c._touched=!0,c.validate()},this._onSetCustom=function(p){const f=p.detail&&p.detail.error;if(!f)return;c._customErrors.add(f),c._touched=!0;const w=o.closest(".form-element");if(w){const b=w.querySelector("["+r+'="'+f+'"]');b&&b.classList.remove("hidden")}o.classList.remove(i),o.classList.add(s),o.setAttribute("aria-invalid","true")},this._onClearCustom=function(p){const f=p.detail&&p.detail.error,w=o.closest(".form-element");if(f){if(c._customErrors.delete(f),w){const b=w.querySelector("["+r+'="'+f+'"]');b&&b.classList.add("hidden")}}else c._customErrors.forEach(function(b){if(w){const v=w.querySelector("["+r+'="'+b+'"]');v&&v.classList.add("hidden")}}),c._customErrors.clear();c._touched&&c.validate()},h||o.addEventListener("input",this._onInput),o.addEventListener("change",this._onChange),o.addEventListener("ln-validate:set-custom",this._onSetCustom),o.addEventListener("ln-validate:clear-custom",this._onClearCustom);const m=o.form;return m&&(m.hasAttribute("novalidate")||m.setAttribute("novalidate",""),this._onFormReset=function(){c.reset()},this._onValidateRequest=function(p){c._touched=!0,!c.validate()&&p.detail&&p.detail.invalidFields&&p.detail.invalidFields.push(c.dom)},m.addEventListener("reset",this._onFormReset),m.addEventListener("ln-validate:request-validate",this._onValidateRequest),m._lnValidateGateBound||(m._lnValidateGateBound=!0,m.addEventListener("submit",function(p){const f={invalidFields:[]};A(m,"ln-validate:request-validate",f),f.invalidFields.length>0&&(p.preventDefault(),f.invalidFields.sort((w,b)=>w.compareDocumentPosition(b)&Node.DOCUMENT_POSITION_PRECEDING?-1:1),f.invalidFields[0].focus())}))),Ie(o)&&(this._touched=!0,this.validate()),this}a.prototype.validate=function(){const o=this.dom,c=o.validity,d=X(c,this._customErrors.size),u=Fe(c,this._customErrors),h=o.closest(".form-element");if(h){const p=h.querySelector("["+n+"]");if(p){const f=p.querySelectorAll("["+r+"]");for(let w=0;w<f.length;w++){const b=f[w].getAttribute(r);f[w].classList.toggle("hidden",!u.includes(b))}}}return o.classList.toggle(i,d),o.classList.toggle(s,!d),o.setAttribute("aria-invalid",d?"false":"true"),A(o,d?"ln-validate:valid":"ln-validate:invalid",{target:o,field:o.name,errors:u}),d},a.prototype.reset=function(){this._touched=!1,this._customErrors.clear(),this.dom.classList.remove(i,s),this.dom.removeAttribute("aria-invalid");const o=this.dom.closest(".form-element");if(o){const c=o.querySelectorAll("["+r+"]");for(let d=0;d<c.length;d++)c[d].classList.add("hidden")}},Object.defineProperty(a.prototype,"isValid",{get:function(){return X(this.dom.validity,this._customErrors.size)}}),a.prototype.destroy=function(){if(!this.dom[t])return;this.dom.removeEventListener("input",this._onInput),this.dom.removeEventListener("change",this._onChange),this.dom.removeEventListener("ln-validate:set-custom",this._onSetCustom),this.dom.removeEventListener("ln-validate:clear-custom",this._onClearCustom);const o=this.dom.form;o&&(this._onFormReset&&o.removeEventListener("reset",this._onFormReset),this._onValidateRequest&&o.removeEventListener("ln-validate:request-validate",this._onValidateRequest)),this.dom.classList.remove(i,s),this.dom.removeAttribute("aria-invalid"),delete this.dom[t]},G(e,t,a,"ln-validate",{attributes:l})})()})();
@@ -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 x(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let o=null;for(let r=1;r<t.length;r++)if(t[r]&&t[r].nodeType===1){o=t[r];break}if(!x(o))return}e.apply(console,t)}}function g(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function k(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){k(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}const M={};function V(e,t){M[e]=t}function H(e){return M[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=V,window.lnCore.getDataMapper=H);function J(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,k(function(){new MutationObserver(function(){g(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const $={};function P(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];$[n]=t}function Q(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return $[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=P,window.lnCore.getLocaleFallback=Q,window.lnCore.ensureLocaleObserver=J);const v={};function G(e,t){v[e]||(v[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=v[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function N(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let s=0;s<n.length;s++){const u=n[s],d=u.getAttribute("data-ln-field");t[d]!=null&&(u.textContent=t[d])}const o=e.querySelectorAll("[data-ln-attr]");for(let s=0;s<o.length;s++){const u=o[s],d=u.getAttribute("data-ln-attr").split(",");for(let f=0;f<d.length;f++){const b=d[f].trim().split(":");if(b.length!==2)continue;const a=b[0].trim(),c=b[1].trim();t[c]!=null&&u.setAttribute(a,t[c])}}const r=e.querySelectorAll("[data-ln-show]");for(let s=0;s<r.length;s++){const u=r[s],d=u.getAttribute("data-ln-show");d in t&&u.classList.toggle("hidden",!t[d])}const i=e.querySelectorAll("[data-ln-class]");for(let s=0;s<i.length;s++){const u=i[s],d=u.getAttribute("data-ln-class").split(",");for(let f=0;f<d.length;f++){const b=d[f].trim().split(":");if(b.length!==2)continue;const a=b[0].trim(),c=b[1].trim();c in t&&u.classList.toggle(a,!!t[c])}}return e}function X(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let o=0;o<n.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[o],t??null),n[o].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)N(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function F(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const i=n.currentNode;i.textContent.indexOf("{{")!==-1&&(i.textContent=i.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(s,u){return t[u]!==void 0?t[u]:""}))}const o=function(i,s){return t[s]!==void 0?t[s]:""},r=Array.from(e.querySelectorAll("*"));e.nodeType===1&&r.push(e);for(let i=0;i<r.length;i++){const s=r[i],u=s.attributes;for(let d=0;d<u.length;d++){const f=u[d];f.value.indexOf("{{")!==-1&&s.setAttribute(f.name,f.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function z(e,t,n,o,r,i){const s={};for(let d=0;d<e.children.length;d++){const f=e.children[d],b=f.getAttribute("data-ln-render-key");b&&(s[b]=f)}const u=document.createDocumentFragment();for(let d=0;d<t.length;d++){const f=t[d],b=String(o(f));let a=s[b];if(a)r(a,f,d);else{const c=G(n,i);if(!c||(F(c,f),a=c.firstElementChild,!a))continue;a.setAttribute("data-ln-render-key",b),r(a,f,d)}u.appendChild(a)}e.textContent="",e.appendChild(u)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=F,window.lnCore.fill=N,window.lnCore.lnFill=X,window.lnCore.renderList=z);function S(e,t,n){const o=e.getAttribute(t);return o===null?n:o}function Y(e,t,n){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?n:o}function Z(e,t,n=!1){const o=e.getAttribute(t);if(o===null)return!!n;const r=o.trim().toLowerCase();return!(r==="false"||r==="0")}function ee(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const O=new Map;function te(e,t){const n=(e?e.join("|"):"")+"::"+t;if(O.has(n))return O.get(n);const o=new Set(e||[]),r=function(i,s){const u=i.getAttribute(s);return u!==null&&o.has(u)?u:t};return O.set(n,r),r}function ne(e,t,n){const o=parseFloat(e.getAttribute(t));return isNaN(o)?n:o}function oe(e,t,n){const o=e.getAttribute(t);if(!o)return n;try{return JSON.parse(o)}catch{return n}}function B(e,t,n,o,r){if(!e||t===null)return!0;const i=o||"ln-component",s=e.type;if(s==="trigger"||s==="marker"||s==="string"||s==="list"||!s||t===""&&e.fallback!==void 0)return!0;const u=d=>{r?console.warn(d,r):console.warn(d)};if(s==="boolean"){const d=t.trim().toLowerCase();return d!==""&&d!=="true"&&d!=="false"&&d!=="1"&&d!=="0"?(u(`[${i}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(s==="enum"){const d=e.values||[];return d.includes(t)?!0:(u(`[${i}] Invalid value "${t}" for attribute "${n}". Allowed: ${d.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(s==="integer"){if(!/^-?\d+$/.test(t))return u(`[${i}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const d=parseInt(t,10);return e.min!==void 0&&d<e.min?(u(`[${i}] Value ${d} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&d>e.max?(u(`[${i}] Value ${d} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(s==="float")return isNaN(Number(t))?(u(`[${i}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(s==="json")try{return JSON.parse(t),!0}catch(d){return u(`[${i}] Invalid JSON for attribute "${n}": ${d.message}. Fallback: ${e.fallback}.`),!1}return!0}function re(e,t,n){for(const o in n){const[r,i,s]=n[o];Object.defineProperty(e,o,{get:function(){return r(t,i,s)},enumerable:!0,configurable:!0})}return e}function ie(e){const t={};for(const n in e){const o=e[n];if(!o||!o.prop)continue;let r=o.read;if(!r&&o.type)switch(o.type){case"enum":r=te(o.values,o.fallback);break;case"integer":r=Y;break;case"float":r=ne;break;case"boolean":r=Z;break;case"list":r=ee;break;case"json":r=oe;break;case"string":default:r=S;break}r||(r=S),t[o.prop]=[r,n,o.fallback]}return t}function se(e){const t={};for(const n in e){const o=e[n];o&&o.effect&&(t[n]=o.effect)}return Object.keys(t).length?t:null}function ce(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}function q(e,t,n,o){if(e.nodeType!==1)return;const i=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",s=Array.from(e.querySelectorAll(i));e.matches&&e.matches(i)&&s.push(e);for(const u of s)if(!u[n]){window.lnCore._persistSink&&u.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(u,t);try{u[n]=new o(u)}catch(d){console.error("["+n+"] init failed",u,d)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function le(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function de(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 W(){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 ue(e){const t=W(),n=e.observed||[];for(let o=0;o<n.length;o++){const r=n[o];t.byAttr.has(r)||t.byAttr.set(r,[]),t.byAttr.get(r).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const o in e.attributes){t.byDeclaredAttr.has(o)||t.byDeclaredAttr.set(o,[]);const r=t.byDeclaredAttr.get(o);r.some(i=>i.componentTag===e.componentTag)||r.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=ce(e);if(o===null)t.reactiveWildcard.push(e);else for(const r of o)t.byReactive.has(r)||t.byReactive.set(r,[]),t.byReactive.get(r).push(e)}e.persist&&t.persist.push(e)}function j(e,t,n,o){for(let r=0;r<e.length;r++){const i=e[r];if(!t[i.attribute])continue;const s=i.effects&&i.effects[n];s?s(t,n,o):i.onAttrChange&&(!i.declared||i.declared.has(n))&&i.onAttrChange(t,n,o)}}function ae(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const o=W(),r=o.byAttr.get(n);if(D()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(n)&&x(t)){const i=o.byDeclaredAttr.get(n),s=t.getAttribute(n);for(let u=0;u<i.length;u++)B(i[u].spec,s,n,i[u].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||r)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const i=o.byReactive.get(n);i&&j(i,t,n,e.oldValue),o.reactiveWildcard.length&&j(o.reactiveWildcard,t,n,e.oldValue)}if(r)for(let i=0;i<r.length;i++){const s=r[i];if(s.handler){s.handler(t,n,e.oldValue);continue}s.onAttributeChange&&t[s.attribute]?s.onAttributeChange(t,n):(q(t,s.selector,s.attribute,s.ComponentFn),s.onInit&&s.onInit(t))}}function fe(){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{ae(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 U(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function he(e){const t=U();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const o=t[n];if(o.onSubtreeChange){const r=o.query,i=e.target.nodeType===1?e.target.matches(r)?e.target:e.target.closest(r):e.target.parentElement?e.target.parentElement.closest(r):null;i&&o.onSubtreeChange(i,e)}}for(let n=0;n<e.addedNodes.length;n++){const o=e.addedNodes[n];if(o.nodeType===1)for(let r=0;r<t.length;r++){const i=t[r];q(o,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(o)}}for(let n=0;n<e.removedNodes.length;n++){const o=e.removedNodes[n];if(o.nodeType===1)for(let r=0;r<t.length;r++){const i=t[r],s=i.query,u=Array.from(o.querySelectorAll(s));o.matches&&o.matches(s)&&u.push(o);for(let d=0;d<u.length;d++){const f=u[d];if(!document.contains(f)){const b=f[i.attribute];if(b&&typeof b.destroy=="function")try{b.destroy()}catch(a){console.error("["+i.attribute+"] destroy failed",f,a)}delete f[i.attribute]}}}}}}function we(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,k(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const o=t[n];if(o.type==="childList")try{he(o)}catch(r){console.error("[ln-core] lifecycle handler failed",o.target,r)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function pe(e,t,n,o,r={}){const i=r.extraAttributes||[],s=r.onAttributeChange||null,u=r.onSubtreeChange||null,d=r.onInit||null,f=r.onAttrChange||null,b=r.effects||null,a=r.attributes||null,c=a?se(a):b,l=a?new Set(Object.keys(a)):null,h=r.persist||null;function w(R){const m=R||document.body;if(q(m,e,t,n),a&&D())for(const C in a){const ve=a[C],I=Array.from(m.querySelectorAll("["+C+"]"));m.matches&&m.matches("["+C+"]")&&I.push(m);for(let T=0;T<I.length;T++){const L=I[T];x(L)&&B(ve,L.getAttribute(C),C,o,L)}}d&&d(m)}const p=[];if(e.indexOf("[")!==-1){const R=/\[([\w-]+)/g;let m;for(;(m=R.exec(e))!==null;)p.push(m[1])}else p.push(e);ue({selector:e,attribute:t,componentTag:o,attributes:a,ComponentFn:n,onInit:d,observed:p.concat(i),onAttributeChange:s,onAttrChange:f,effects:c,declared:l,persist:h}),fe();const A=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]";U().push({selector:e,attribute:t,ComponentFn:n,onInit:d,onSubtreeChange:u,query:A}),we(),window[t]=w;function _(){le()>0?de(function(){w(document.body)}):w(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",_):_(),w}function K(e){return(e||"").replace(/^#/,"")}function E(e){const t=e===void 0?location.hash:e,n={},o=K(t);if(!o)return n;const r=o.split("&");for(let i=0;i<r.length;i++){const s=r[i];if(!s)continue;const u=s.indexOf(":"),d=u>-1?s.slice(0,u):s,f=u>-1?s.slice(u+1):"";if(d)try{n[d]=decodeURIComponent(f)}catch{n[d]=f}}return n}function be(e){if(!e)return null;const t=E();return e in t?t[e]:null}function ge(e,t){if(!e)return;const n=E();t==null?delete n[e]:n[e]=String(t);const r=Object.keys(n).map(function(i){const s=n[i];return s===""?i:i+":"+encodeURIComponent(s)}).join("&");K(location.hash)!==r&&(location.hash=r)}function me(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function ye(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 _e(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Ce(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 Ae(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),r=o?o.split(",").map(function(i){try{return decodeURIComponent(i)}catch{return i}}).filter(Boolean):[];return{key:n,values:r}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=E,window.lnCore.hashGet=be,window.lnCore.hashSet=ge,window.lnCore.hashLinkClick=me,window.lnCore.resolveHashNamespace=ye,window.lnCore.hashSortEncode=_e,window.lnCore.hashSortDecode=Ce,window.lnCore.hashFilterEncode=ke,window.lnCore.hashFilterDecode=Ae);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(){const e="data-ln-websocket-connector",t="lnWebsocketConnector",n="lnConnector";if(window[t]!==void 0)return;const o=1e3,r=3e4;function i(c){const l=c[t];l&&(l.command==="connect"?l._open():l._disconnect())}function s(c){const l=c[t];!l||l.command!=="connect"||(l._drop("url-changed"),l._open())}const u={"data-ln-websocket-connector":{prop:"command",type:"enum",values:["connect","disconnect"],fallback:"connect",effect:i,description:"Connection command set from outside: connect or disconnect"},"data-ln-websocket-connector-url":{prop:"url",read:S,type:"string",fallback:"",effect:s,description:"WebSocket endpoint URL (ws:// or wss://)"}},d=ie(u),f={"ln-websocket-connector:request-sync":"sync","ln-websocket-connector:request-query":"query","ln-websocket-connector:request-create":"create","ln-websocket-connector:request-update":"update","ln-websocket-connector:request-delete":"delete","ln-websocket-connector:request-bulk-delete":"bulk-delete"};function b(c,l){return c==="sync"?{since:l.since}:c==="query"?{query:l.query||{}}:c==="create"?{data:l.data,idempotencyKey:l.idempotencyKey}:c==="update"?{id:l.id,data:l.data,expected_version:l.expected_version,idempotencyKey:l.idempotencyKey}:c==="delete"?{id:l.id,idempotencyKey:l.idempotencyKey}:{ids:l.ids,idempotencyKey:l.idempotencyKey}}function a(c){this.dom=c,re(this,c,d),c[t]=this,c[n]=this,this.namespace="ln-websocket-connector",this._socket=null,this._status="disconnected",this._attempt=0,this._timer=null,this._seq=0,this._pending=new Map,this._held=[];const l=this;this._onRequest=function(h){l._request(f[h.type],h.detail||{})};for(const h in f)c.addEventListener(h,this._onRequest);return this.command==="connect"&&this._open(),this}a.prototype._open=function(){if(this._socket||this._timer)return;const c=this,l=this.url;this._attempt++,this._status="connecting",g(this.dom,"ln-websocket-connector:connecting",{url:l,attempt:this._attempt});let h;try{h=new WebSocket(l)}catch(w){this._status="disconnected",this._attempt=0,this._failAll(this._held,w.message),this._held=[],g(this.dom,"ln-websocket-connector:disconnected",{url:l,code:0,reason:w.message,willReconnect:!1});return}this._socket=h,h.onopen=function(){c._status="connected",c._attempt=0,g(c.dom,"ln-websocket-connector:connected",{url:l});const w=c._held;c._held=[];for(let p=0;p<w.length;p++)c._send(w[p])},h.onmessage=function(w){c._receive(w.data)},h.onclose=function(w){c._socket=null,c._status="disconnected",c._failPending("connection closed");const p=c.command==="connect";g(c.dom,"ln-websocket-connector:disconnected",{url:l,code:w.code,reason:w.reason,willReconnect:p}),p&&c._scheduleReconnect()}},a.prototype._scheduleReconnect=function(){const c=this,l=Math.min(o*Math.pow(2,Math.max(0,this._attempt-1)),r);this._timer=setTimeout(function(){c._timer=null,c._open()},l)},a.prototype._drop=function(c){const l=!!(this._socket||this._timer);clearTimeout(this._timer),this._timer=null,this._attempt=0,this._socket&&(this._socket.onopen=this._socket.onmessage=this._socket.onclose=null,this._socket.close(1e3,c),this._socket=null),l&&(this._status="disconnected",this._failPending("connection closed"),g(this.dom,"ln-websocket-connector:disconnected",{url:this.url,code:1e3,reason:c,willReconnect:!1}))},a.prototype._disconnect=function(){this._drop("disconnect"),this._failAll(this._held,"disconnected"),this._held=[]},a.prototype._request=function(c,l){const h={ref:String(++this._seq),type:c,detail:l};this._status==="connected"?this._send(h):this.command==="connect"?this._held.push(h):this._fail(h,0,"disconnected",null)},a.prototype._send=function(c){this._pending.set(c.ref,c),this._socket.send(JSON.stringify(Object.assign({ref:c.ref,type:c.type},b(c.type,c.detail))))},a.prototype._receive=function(c){let l;try{l=JSON.parse(c)}catch{console.warn("[ln-websocket-connector] Ignored a frame that is not JSON:",c);return}if(l.ref!==void 0){const h=this._pending.get(String(l.ref));if(!h)return;this._pending.delete(h.ref),l.ok?this._resolve(h,l.content,l.message||null):this._fail(h,l.status||0,l.error,l.data);return}l.type==="changes"&&g(this.dom,"ln-websocket-connector:fetched",{data:{data:l.data||[],deleted:l.deleted||[],synced_at:l.synced_at},since:null,meta:null})},a.prototype._resolve=function(c,l,h){const w=c.detail,p=w.meta||null,y=this.dom;if(c.type==="sync")g(y,"ln-websocket-connector:fetched",{data:l,since:w.since,meta:p});else if(c.type==="query"){const A=w.query||{},_=l||{};g(y,"ln-websocket-connector:fetched",{data:_.data||[],total:_.total,filtered:_.filtered,offset:A.offset,queryGen:A.queryGen,meta:p})}else c.type==="create"?g(y,"ln-websocket-connector:created",{record:l,tempId:w.tempId,message:h,meta:p}):c.type==="update"?g(y,"ln-websocket-connector:updated",{record:l,id:w.id,message:h,meta:p}):c.type==="delete"?g(y,"ln-websocket-connector:deleted",{response:l,id:w.id,message:h,meta:p}):g(y,"ln-websocket-connector:bulk-deleted",{response:l,ids:w.ids,message:h,meta:p})},a.prototype._fail=function(c,l,h,w){const p=c.detail;g(this.dom,"ln-websocket-connector:error",{action:c.type,error:h,status:l,data:w||null,conflictData:l===409&&w||null,since:p.since,id:p.id,ids:p.ids,tempId:p.tempId,meta:p.meta||null})},a.prototype._failAll=function(c,l){for(let h=0;h<c.length;h++)this._fail(c[h],0,l,null)},a.prototype._failPending=function(c){const l=Array.from(this._pending.values());this._pending.clear(),this._failAll(l,c)},a.prototype.destroy=function(){if(this.dom[t]){for(const c in f)this.dom.removeEventListener(c,this._onRequest);clearTimeout(this._timer),this._timer=null,this._socket&&(this._socket.onopen=this._socket.onmessage=this._socket.onclose=null,this._socket.close(1e3,"destroy"),this._socket=null),this._pending.clear(),this._held=[],delete this.dom[t],delete this.dom[n]}},pe(e,t,a,"ln-websocket-connector",{attributes:u})})()})();
1
+ (function(){"use strict";function N(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function x(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let o=null;for(let s=1;s<t.length;s++)if(t[s]&&t[s].nodeType===1){o=t[s];break}if(!x(o))return}e.apply(console,t)}}function m(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function 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 Z(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ee(e,t){const n=!!(t&&t.typed),o=t&&t.exclude,s={},l=e.elements,i={};if(n)for(let d=0;d<l.length;d++){const r=l[d];r.name&&r.type==="checkbox"&&!r.disabled&&(i[r.name]=(i[r.name]||0)+1)}for(let d=0;d<l.length;d++){const r=l[d];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?s[r.name]=r.checked:(s[r.name]||(s[r.name]=[]),r.checked&&s[r.name].push(r.value));else if(r.type==="radio")r.checked&&(s[r.name]=r.value);else if(r.type==="select-multiple"){s[r.name]=[];for(let u=0;u<r.options.length;u++)r.options[u].selected&&s[r.name].push(r.options[u].value)}else if(n&&r.type==="hidden")s[r.name]=r.value;else if(n&&(r.type==="number"||r.type==="range")){const u=Number(r.value);s[r.name]=r.value===""||isNaN(u)?null:u}else s[r.name]=r.value}return s}function te(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ne(e,t){const n=e.elements,o=[],s={};for(let l=0;l<n.length;l++){const i=n[l];i.name&&i.type==="checkbox"&&(s[i.name]=(s[i.name]||0)+1)}for(let l=0;l<n.length;l++){const i=n[l];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const d=i.getAttribute("data-ln-fill-as")||i.name;if(!d||!(d in t))continue;const r=t[d];if(i.type==="checkbox"){if(Array.isArray(r))i.checked=r.indexOf(i.value)!==-1;else if(s[i.name]>1){const u=String(r).split(",").map(function(p){return p.trim()});i.checked=u.indexOf(i.value)!==-1}else i.checked=te(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}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ne,window.lnCore.serializeForm=ee,window.lnCore.resolveFormMethod=Z);const M={};function oe(e,t){M[e]=t}function re(e){return M[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=oe,window.lnCore.getDataMapper=re);function ie(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,k(function(){new MutationObserver(function(){m(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const D={};function se(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];D[n]=t}function le(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return D[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=se,window.lnCore.getLocaleFallback=le,window.lnCore.ensureLocaleObserver=ie);const S={};function ce(e,t){S[e]||(S[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=S[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function $(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let i=0;i<n.length;i++){const d=n[i],r=d.getAttribute("data-ln-field");t[r]!=null&&(d.textContent=t[r])}const o=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<o.length;i++){const d=o[i],r=d.getAttribute("data-ln-attr").split(",");for(let u=0;u<r.length;u++){const p=r[u].trim().split(":");if(p.length!==2)continue;const f=p[0].trim(),c=p[1].trim();t[c]!=null&&d.setAttribute(f,t[c])}}const s=e.querySelectorAll("[data-ln-show]");for(let i=0;i<s.length;i++){const d=s[i],r=d.getAttribute("data-ln-show");r in t&&d.classList.toggle("hidden",!t[r])}const l=e.querySelectorAll("[data-ln-class]");for(let i=0;i<l.length;i++){const d=l[i],r=d.getAttribute("data-ln-class").split(",");for(let u=0;u<r.length;u++){const p=r[u].trim().split(":");if(p.length!==2)continue;const f=p[0].trim(),c=p[1].trim();c in t&&d.classList.toggle(f,!!t[c])}}return e}function de(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let o=0;o<n.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[o],t??null),n[o].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)$(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function F(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const l=n.currentNode;l.textContent.indexOf("{{")!==-1&&(l.textContent=l.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,d){return t[d]!==void 0?t[d]:""}))}const o=function(l,i){return t[i]!==void 0?t[i]:""},s=Array.from(e.querySelectorAll("*"));e.nodeType===1&&s.push(e);for(let l=0;l<s.length;l++){const i=s[l],d=i.attributes;for(let r=0;r<d.length;r++){const u=d[r];u.value.indexOf("{{")!==-1&&i.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function ae(e,t,n,o,s,l){const i={};for(let r=0;r<e.children.length;r++){const u=e.children[r],p=u.getAttribute("data-ln-render-key");p&&(i[p]=u)}const d=document.createDocumentFragment();for(let r=0;r<t.length;r++){const u=t[r],p=String(o(u));let f=i[p];if(f)s(f,u,r);else{const c=ce(n,l);if(!c||(F(c,u),f=c.firstElementChild,!f))continue;f.setAttribute("data-ln-render-key",p),s(f,u,r)}d.appendChild(f)}e.textContent="",e.appendChild(d)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=F,window.lnCore.fill=$,window.lnCore.lnFill=de,window.lnCore.renderList=ae);function A(e,t,n){const o=e.getAttribute(t);return o===null?n:o}function B(e,t,n){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?n:o}function j(e,t,n=!1){const o=e.getAttribute(t);if(o===null)return!!n;const s=o.trim().toLowerCase();return!(s==="false"||s==="0")}function W(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const O=new Map;function U(e,t){const n=(e?e.join("|"):"")+"::"+t;if(O.has(n))return O.get(n);const o=new Set(e||[]),s=function(l,i){const d=l.getAttribute(i);return d!==null&&o.has(d)?d:t};return O.set(n,s),s}function K(e,t,n){const o=parseFloat(e.getAttribute(t));return isNaN(o)?n:o}function V(e,t,n){const o=e.getAttribute(t);if(!o)return n;try{return JSON.parse(o)}catch{return n}}function H(e,t,n,o,s){if(!e||t===null)return!0;const l=o||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const d=r=>{s?console.warn(r,s):console.warn(r)};if(i==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(d(`[${l}] 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:(d(`[${l}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return d(`[${l}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(d(`[${l}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(d(`[${l}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(d(`[${l}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(r){return d(`[${l}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function J(e,t,n){for(const o in n){const[s,l,i]=n[o];Object.defineProperty(e,o,{get:function(){return s(t,l,i)},enumerable:!0,configurable:!0})}return e}function Q(e){const t={};for(const n in e){const o=e[n];if(!o||!o.prop)continue;let s=o.read;if(!s&&o.type)switch(o.type){case"enum":s=U(o.values,o.fallback);break;case"integer":s=B;break;case"float":s=K;break;case"boolean":s=j;break;case"list":s=W;break;case"json":s=V;break;case"string":default:s=A;break}s||(s=A),t[o.prop]=[s,n,o.fallback]}return t}function ue(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 fe(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=J,window.lnCore.attrSpec=Q,window.lnCore.attrStr=A,window.lnCore.attrInt=B,window.lnCore.attrBool=j,window.lnCore.attrList=W,window.lnCore.attrEnum=U,window.lnCore.attrFloat=K,window.lnCore.attrJson=V);function q(e,t,n,o){if(e.nodeType!==1)return;const l=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i=Array.from(e.querySelectorAll(l));e.matches&&e.matches(l)&&i.push(e);for(const d of i)if(!d[n]){window.lnCore._persistSink&&d.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(d,t);try{d[n]=new o(d)}catch(r){console.error("["+n+"] init failed",d,r)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function we(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function he(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function P(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function pe(e){const t=P(),n=e.observed||[];for(let o=0;o<n.length;o++){const s=n[o];t.byAttr.has(s)||t.byAttr.set(s,[]),t.byAttr.get(s).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const o in e.attributes){t.byDeclaredAttr.has(o)||t.byDeclaredAttr.set(o,[]);const s=t.byDeclaredAttr.get(o);s.some(l=>l.componentTag===e.componentTag)||s.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=fe(e);if(o===null)t.reactiveWildcard.push(e);else for(const s of o)t.byReactive.has(s)||t.byReactive.set(s,[]),t.byReactive.get(s).push(e)}e.persist&&t.persist.push(e)}function G(e,t,n,o){for(let s=0;s<e.length;s++){const l=e[s];if(!t[l.attribute])continue;const i=l.effects&&l.effects[n];i?i(t,n,o):l.onAttrChange&&(!l.declared||l.declared.has(n))&&l.onAttrChange(t,n,o)}}function be(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const o=P(),s=o.byAttr.get(n);if(N()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(n)&&x(t)){const l=o.byDeclaredAttr.get(n),i=t.getAttribute(n);for(let d=0;d<l.length;d++)H(l[d].spec,i,n,l[d].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||s)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const l=o.byReactive.get(n);l&&G(l,t,n,e.oldValue),o.reactiveWildcard.length&&G(o.reactiveWildcard,t,n,e.oldValue)}if(s)for(let l=0;l<s.length;l++){const i=s[l];if(i.handler){i.handler(t,n,e.oldValue);continue}i.onAttributeChange&&t[i.attribute]?i.onAttributeChange(t,n):(q(t,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(t))}}function me(){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{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 z(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function ge(e){const t=z();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const o=t[n];if(o.onSubtreeChange){const s=o.query,l=e.target.nodeType===1?e.target.matches(s)?e.target:e.target.closest(s):e.target.parentElement?e.target.parentElement.closest(s):null;l&&o.onSubtreeChange(l,e)}}for(let n=0;n<e.addedNodes.length;n++){const o=e.addedNodes[n];if(o.nodeType===1)for(let s=0;s<t.length;s++){const l=t[s];q(o,l.selector,l.attribute,l.ComponentFn),l.onInit&&l.onInit(o)}}for(let n=0;n<e.removedNodes.length;n++){const o=e.removedNodes[n];if(o.nodeType===1)for(let s=0;s<t.length;s++){const l=t[s],i=l.query,d=Array.from(o.querySelectorAll(i));o.matches&&o.matches(i)&&d.push(o);for(let r=0;r<d.length;r++){const u=d[r];if(!document.contains(u)){const p=u[l.attribute];if(p&&typeof p.destroy=="function")try{p.destroy()}catch(f){console.error("["+l.attribute+"] destroy failed",u,f)}delete u[l.attribute]}}}}}}function ye(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,k(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const o=t[n];if(o.type==="childList")try{ge(o)}catch(s){console.error("[ln-core] lifecycle handler failed",o.target,s)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function X(e,t,n,o,s={}){const l=s.extraAttributes||[],i=s.onAttributeChange||null,d=s.onSubtreeChange||null,r=s.onInit||null,u=s.onAttrChange||null,p=s.effects||null,f=s.attributes||null,c=f?ue(f):p,a=f?new Set(Object.keys(f)):null,w=s.persist||null;function h(I){const g=I||document.body;if(q(g,e,t,n),f&&N())for(const _ in f){const Ee=f[_],L=Array.from(g.querySelectorAll("["+_+"]"));g.matches&&g.matches("["+_+"]")&&L.push(g);for(let R=0;R<L.length;R++){const T=L[R];x(T)&&H(Ee,T.getAttribute(_),_,o,T)}}r&&r(g)}const b=[];if(e.indexOf("[")!==-1){const I=/\[([\w-]+)/g;let g;for(;(g=I.exec(e))!==null;)b.push(g[1])}else b.push(e);pe({selector:e,attribute:t,componentTag:o,attributes:f,ComponentFn:n,onInit:r,observed:b.concat(l),onAttributeChange:i,onAttrChange:u,effects:c,declared:a,persist:w}),me();const y=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,v=s.subtreeQuery||(y?e:"["+e+"]");z().push({selector:e,attribute:t,ComponentFn:n,onInit:r,onSubtreeChange:d,query:v}),ye(),window[t]=h,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=X);function C(){we()>0?he(function(){h(document.body)}):h(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",C):C(),h}function Y(e){return(e||"").replace(/^#/,"")}function E(e){const t=e===void 0?location.hash:e,n={},o=Y(t);if(!o)return n;const s=o.split("&");for(let l=0;l<s.length;l++){const i=s[l];if(!i)continue;const d=i.indexOf(":"),r=d>-1?i.slice(0,d):i,u=d>-1?i.slice(d+1):"";if(r)try{n[r]=decodeURIComponent(u)}catch{n[r]=u}}return n}function Ce(e){if(!e)return null;const t=E();return e in t?t[e]:null}function _e(e,t){if(!e)return;const n=E();t==null?delete n[e]:n[e]=String(t);const s=Object.keys(n).map(function(l){const i=n[l];return i===""?l:l+":"+encodeURIComponent(i)}).join("&");Y(location.hash)!==s&&(location.hash=s)}function ke(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ae(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const 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 ve(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function xe(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 Se(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Oe(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),o=e.slice(t+1),s=o?o.split(",").map(function(l){try{return decodeURIComponent(l)}catch{return l}}).filter(Boolean):[];return{key:n,values:s}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=E,window.lnCore.hashGet=Ce,window.lnCore.hashSet=_e,window.lnCore.hashLinkClick=ke,window.lnCore.resolveHashNamespace=Ae,window.lnCore.hashSortEncode=ve,window.lnCore.hashSortDecode=xe,window.lnCore.hashFilterEncode=Se,window.lnCore.hashFilterDecode=Oe);function qe(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=qe),(function(){const e="data-ln-websocket-connector",t="lnWebsocketConnector",n="lnConnector";if(window[t]!==void 0)return;const o=1e3,s=3e4;function l(c){const a=c[t];a&&(a.command==="connect"?a._open():a._disconnect())}function i(c){const a=c[t];!a||a.command!=="connect"||(a._drop("url-changed"),a._open())}const d={"data-ln-websocket-connector":{prop:"command",type:"enum",values:["connect","disconnect"],fallback:"connect",effect:l,description:"Connection command set from outside: connect or disconnect"},"data-ln-websocket-connector-url":{prop:"url",read:A,type:"string",fallback:"",effect:i,description:"WebSocket endpoint URL (ws:// or wss://)"}},r=Q(d),u={"ln-websocket-connector:request-sync":"sync","ln-websocket-connector:request-query":"query","ln-websocket-connector:request-create":"create","ln-websocket-connector:request-update":"update","ln-websocket-connector:request-delete":"delete","ln-websocket-connector:request-bulk-delete":"bulk-delete"};function p(c,a){return c==="sync"?{since:a.since}:c==="query"?{query:a.query||{}}:c==="create"?{data:a.data,idempotencyKey:a.idempotencyKey}:c==="update"?{id:a.id,data:a.data,expected_version:a.expected_version,idempotencyKey:a.idempotencyKey}:c==="delete"?{id:a.id,idempotencyKey:a.idempotencyKey}:{ids:a.ids,idempotencyKey:a.idempotencyKey}}function f(c){this.dom=c,J(this,c,r),c[t]=this,c[n]=this,this.namespace="ln-websocket-connector",this._socket=null,this._status="disconnected",this._attempt=0,this._timer=null,this._seq=0,this._pending=new Map,this._held=[];const a=this;this._onRequest=function(w){a._request(u[w.type],w.detail||{})};for(const w in u)c.addEventListener(w,this._onRequest);return this.command==="connect"&&this._open(),this}f.prototype._open=function(){if(this._socket||this._timer)return;const c=this,a=this.url;this._attempt++,this._status="connecting",m(this.dom,"ln-websocket-connector:connecting",{url:a,attempt:this._attempt});let w;try{w=new WebSocket(a)}catch(h){this._status="disconnected",this._attempt=0,this._failAll(this._held,h.message),this._held=[],m(this.dom,"ln-websocket-connector:disconnected",{url:a,code:0,reason:h.message,willReconnect:!1});return}this._socket=w,w.onopen=function(){c._status="connected",c._attempt=0,m(c.dom,"ln-websocket-connector:connected",{url:a});const h=c._held;c._held=[];for(let b=0;b<h.length;b++)c._send(h[b])},w.onmessage=function(h){c._receive(h.data)},w.onclose=function(h){c._socket=null,c._status="disconnected",c._failPending("connection closed");const b=c.command==="connect";m(c.dom,"ln-websocket-connector:disconnected",{url:a,code:h.code,reason:h.reason,willReconnect:b}),b&&c._scheduleReconnect()}},f.prototype._scheduleReconnect=function(){const c=this,a=Math.min(o*Math.pow(2,Math.max(0,this._attempt-1)),s);this._timer=setTimeout(function(){c._timer=null,c._open()},a)},f.prototype._drop=function(c){const a=!!(this._socket||this._timer);clearTimeout(this._timer),this._timer=null,this._attempt=0,this._socket&&(this._socket.onopen=this._socket.onmessage=this._socket.onclose=null,this._socket.close(1e3,c),this._socket=null),a&&(this._status="disconnected",this._failPending("connection closed"),m(this.dom,"ln-websocket-connector:disconnected",{url:this.url,code:1e3,reason:c,willReconnect:!1}))},f.prototype._disconnect=function(){this._drop("disconnect"),this._failAll(this._held,"disconnected"),this._held=[]},f.prototype._request=function(c,a){const w={ref:String(++this._seq),type:c,detail:a};this._status==="connected"?this._send(w):this.command==="connect"?this._held.push(w):this._fail(w,0,"disconnected",null)},f.prototype._send=function(c){this._pending.set(c.ref,c),this._socket.send(JSON.stringify(Object.assign({ref:c.ref,type:c.type},p(c.type,c.detail))))},f.prototype._receive=function(c){let a;try{a=JSON.parse(c)}catch{console.warn("[ln-websocket-connector] Ignored a frame that is not JSON:",c);return}if(a.ref!==void 0){const w=this._pending.get(String(a.ref));if(!w)return;this._pending.delete(w.ref),a.ok?this._resolve(w,a.content,a.message||null):this._fail(w,a.status||0,a.error,a.data);return}a.type==="changes"&&m(this.dom,"ln-websocket-connector:fetched",{data:{data:a.data||[],deleted:a.deleted||[],synced_at:a.synced_at},since:null,meta:null})},f.prototype._resolve=function(c,a,w){const h=c.detail,b=h.meta||null,y=this.dom;if(c.type==="sync")m(y,"ln-websocket-connector:fetched",{data:a,since:h.since,meta:b});else if(c.type==="query"){const v=h.query||{},C=a||{};m(y,"ln-websocket-connector:fetched",{data:C.data||[],total:C.total,filtered:C.filtered,offset:v.offset,queryGen:v.queryGen,meta:b})}else c.type==="create"?m(y,"ln-websocket-connector:created",{record:a,tempId:h.tempId,message:w,meta:b}):c.type==="update"?m(y,"ln-websocket-connector:updated",{record:a,id:h.id,message:w,meta:b}):c.type==="delete"?m(y,"ln-websocket-connector:deleted",{response:a,id:h.id,message:w,meta:b}):m(y,"ln-websocket-connector:bulk-deleted",{response:a,ids:h.ids,message:w,meta:b})},f.prototype._fail=function(c,a,w,h){const b=c.detail;m(this.dom,"ln-websocket-connector:error",{action:c.type,error:w,status:a,data:h||null,conflictData:a===409&&h||null,since:b.since,id:b.id,ids:b.ids,tempId:b.tempId,meta:b.meta||null})},f.prototype._failAll=function(c,a){for(let w=0;w<c.length;w++)this._fail(c[w],0,a,null)},f.prototype._failPending=function(c){const a=Array.from(this._pending.values());this._pending.clear(),this._failAll(a,c)},f.prototype.destroy=function(){if(this.dom[t]){for(const c in u)this.dom.removeEventListener(c,this._onRequest);clearTimeout(this._timer),this._timer=null,this._socket&&(this._socket.onopen=this._socket.onmessage=this._socket.onclose=null,this._socket.close(1e3,"destroy"),this._socket=null),this._pending.clear(),this._held=[],delete this.dom[t],delete this.dom[n]}},X(e,t,f,"ln-websocket-connector",{attributes:d})})()})();
@@ -24,6 +24,10 @@
24
24
  "name": "data-ln-api-connector-query-debounce",
25
25
  "description": "Debounce delay in milliseconds before dispatching query requests"
26
26
  },
27
+ {
28
+ "name": "data-ln-api-endpoint",
29
+ "description": "Alias for data-ln-api-path"
30
+ },
27
31
  {
28
32
  "name": "data-ln-api-headers",
29
33
  "description": "Custom HTTP headers in JSON format or semicolon-separated pairs"
@@ -632,6 +636,11 @@
632
636
  "description": "Visual / CSS styling attribute (theme/config/mixins/_filter.scss)",
633
637
  "valueSet": "v"
634
638
  },
639
+ {
640
+ "name": "data-ln-filter-target",
641
+ "description": "Marker on target container or table observed by ln-filter",
642
+ "valueSet": "v"
643
+ },
635
644
  {
636
645
  "name": "data-ln-filter-value",
637
646
  "description": "Value to match for this filter input"
@@ -672,6 +681,10 @@
672
681
  "name": "data-ln-include",
673
682
  "description": "URL of external HTML template to fetch and include"
674
683
  },
684
+ {
685
+ "name": "data-ln-initial-value",
686
+ "description": "data-ln-initial-value attribute"
687
+ },
675
688
  {
676
689
  "name": "data-ln-item",
677
690
  "description": "data-ln-item attribute"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livenetworks/ashlar",
3
- "version": "2.0.8",
3
+ "version": "2.0.10",
4
4
  "description": "LiveNetworks unified frontend library - CSS framework and vanilla JS components",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "author": "Live Networks",
@@ -50,6 +50,7 @@
50
50
  "scripts": {
51
51
  "test": "npm run sync:ln-schemas:check && npm run sync:ln-events:check && npm run sync:css-tokens:check && node --test \"tests/*.test.js\"",
52
52
  "test:p0": "node --test tests/p0-data-integrity.test.js",
53
+ "test:headless": "node tests/headless/run-all.mjs",
53
54
  "dev": "node scripts/build.mjs --watch",
54
55
  "build": "npm run sync:ln-schemas && npm run sync:ln-events && npm run sync:css-tokens && node scripts/build.mjs && npm run build:dev-css && npm run build:demos",
55
56
  "build:demos": "npm run build:demo-index && npm run build:demo-admin && npm run build:demo-docuflow && npm run build:demo-spa && npm run build:demo-landing && npm run build:demo-corporate",
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@livenetworks/ashlar",
4
- "version": "2.0.8",
4
+ "version": "2.0.10",
5
5
  "framework": "html",
6
6
  "contributions": {
7
7
  "html": {
@@ -41,6 +41,13 @@
41
41
  "type": "number"
42
42
  }
43
43
  },
44
+ {
45
+ "name": "data-ln-api-endpoint",
46
+ "description": "Alias for data-ln-api-path",
47
+ "value": {
48
+ "type": "string"
49
+ }
50
+ },
44
51
  {
45
52
  "name": "data-ln-api-headers",
46
53
  "description": "Custom HTTP headers in JSON format or semicolon-separated pairs",
@@ -812,6 +819,13 @@
812
819
  "type": "boolean"
813
820
  }
814
821
  },
822
+ {
823
+ "name": "data-ln-filter-target",
824
+ "description": "Marker on target container or table observed by ln-filter",
825
+ "value": {
826
+ "type": "boolean"
827
+ }
828
+ },
815
829
  {
816
830
  "name": "data-ln-filter-value",
817
831
  "description": "Value to match for this filter input",
@@ -866,6 +880,13 @@
866
880
  "type": "string"
867
881
  }
868
882
  },
883
+ {
884
+ "name": "data-ln-initial-value",
885
+ "description": "data-ln-initial-value attribute",
886
+ "value": {
887
+ "type": "string"
888
+ }
889
+ },
869
890
  {
870
891
  "name": "data-ln-item",
871
892
  "description": "data-ln-item attribute",