@livenetworks/ashlar 2.0.8 → 2.0.9

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 (70) 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 +5 -0
  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 +2 -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-form/ln-form.js +1 -1
  29. package/components/ln-form/ln-form.schema.json +51 -45
  30. package/components/ln-form/src/ln-form.js +21 -0
  31. package/components/ln-http/ln-http.js +1 -1
  32. package/components/ln-include/ln-include.js +1 -1
  33. package/components/ln-key/ln-key.js +1 -1
  34. package/components/ln-link/ln-link.js +1 -1
  35. package/components/ln-list/ln-list.js +1 -1
  36. package/components/ln-modal/ln-modal.js +1 -1
  37. package/components/ln-nav/ln-nav.js +1 -1
  38. package/components/ln-number/ln-number.js +1 -1
  39. package/components/ln-number/src/ln-number.js +26 -0
  40. package/components/ln-obfuscator/ln-obfuscator.js +1 -1
  41. package/components/ln-options/ln-options.js +1 -1
  42. package/components/ln-options/ln-options.schema.json +47 -41
  43. package/components/ln-options/src/ln-options.js +4 -4
  44. package/components/ln-persist/ln-persist.js +1 -1
  45. package/components/ln-picklist/ln-picklist.js +1 -1
  46. package/components/ln-popover/ln-popover.js +1 -1
  47. package/components/ln-progress/ln-progress.js +1 -1
  48. package/components/ln-router/ln-router.js +1 -1
  49. package/components/ln-scroll/ln-scroll.js +1 -1
  50. package/components/ln-search/ln-search.js +1 -1
  51. package/components/ln-slug/ln-slug.js +1 -1
  52. package/components/ln-slug/src/ln-slug.js +25 -1
  53. package/components/ln-sort/ln-sort.js +1 -1
  54. package/components/ln-sortable/ln-sortable.js +1 -1
  55. package/components/ln-stat/ln-stat.js +1 -1
  56. package/components/ln-table/ln-table.js +1 -1
  57. package/components/ln-table-coordinator/ln-table-coordinator.js +1 -1
  58. package/components/ln-tabs/ln-tabs.js +1 -1
  59. package/components/ln-time/ln-time.js +1 -1
  60. package/components/ln-toast/ln-toast.js +1 -1
  61. package/components/ln-toggle/ln-toggle.js +1 -1
  62. package/components/ln-tooltip/ln-tooltip.js +1 -1
  63. package/components/ln-translations/ln-translations.js +1 -1
  64. package/components/ln-ui-coordinator/ln-ui-coordinator.js +1 -1
  65. package/components/ln-upload/ln-upload.js +1 -1
  66. package/components/ln-validate/ln-validate.js +1 -1
  67. package/components/ln-websocket-connector/ln-websocket-connector.js +1 -1
  68. package/ln-ashlar.html-data.json +8 -0
  69. package/package.json +2 -1
  70. package/web-types.json +15 -1
@@ -1 +1 @@
1
- (function(){"use strict";function R(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function 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 r=null;for(let s=1;s<t.length;s++)if(t[s]&&t[s].nodeType===1){r=t[s];break}if(!E(r))return}e.apply(console,t)}}function k(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 v(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){v(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}const q={};function H(e,t){q[e]=t}function U(e){return q[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=H,window.lnCore.getDataMapper=U);function V(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,v(function(){new MutationObserver(function(){k(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const B={};function K(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];B[n]=t}function Q(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return B[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=K,window.lnCore.getLocaleFallback=Q,window.lnCore.ensureLocaleObserver=V);const x={};function J(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 $(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let i=0;i<n.length;i++){const o=n[i],l=o.getAttribute("data-ln-field");t[l]!=null&&(o.textContent=t[l])}const r=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<r.length;i++){const o=r[i],l=o.getAttribute("data-ln-attr").split(",");for(let d=0;d<l.length;d++){const c=l[d].trim().split(":");if(c.length!==2)continue;const a=c[0].trim(),f=c[1].trim();t[f]!=null&&o.setAttribute(a,t[f])}}const s=e.querySelectorAll("[data-ln-show]");for(let i=0;i<s.length;i++){const o=s[i],l=o.getAttribute("data-ln-show");l in t&&o.classList.toggle("hidden",!t[l])}const u=e.querySelectorAll("[data-ln-class]");for(let i=0;i<u.length;i++){const o=u[i],l=o.getAttribute("data-ln-class").split(",");for(let d=0;d<l.length;d++){const c=l[d].trim().split(":");if(c.length!==2)continue;const a=c[0].trim(),f=c[1].trim();f in t&&o.classList.toggle(a,!!t[f])}}return e}function G(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)$(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 u=n.currentNode;u.textContent.indexOf("{{")!==-1&&(u.textContent=u.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,o){return t[o]!==void 0?t[o]:""}))}const r=function(u,i){return t[i]!==void 0?t[i]:""},s=Array.from(e.querySelectorAll("*"));e.nodeType===1&&s.push(e);for(let u=0;u<s.length;u++){const i=s[u],o=i.attributes;for(let l=0;l<o.length;l++){const d=o[l];d.value.indexOf("{{")!==-1&&i.setAttribute(d.name,d.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function X(e,t,n,r,s,u){const i={};for(let l=0;l<e.children.length;l++){const d=e.children[l],c=d.getAttribute("data-ln-render-key");c&&(i[c]=d)}const o=document.createDocumentFragment();for(let l=0;l<t.length;l++){const d=t[l],c=String(r(d));let a=i[c];if(a)s(a,d,l);else{const f=J(n,u);if(!f||(M(f,d),a=f.firstElementChild,!a))continue;a.setAttribute("data-ln-render-key",c),s(a,d,l)}o.appendChild(a)}e.textContent="",e.appendChild(o)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=M,window.lnCore.fill=$,window.lnCore.lnFill=G,window.lnCore.renderList=X);function F(e,t,n){const r=e.getAttribute(t);return r===null?n:r}function Y(e,t,n){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?n:r}function Z(e,t,n=!1){const r=e.getAttribute(t);if(r===null)return!!n;const s=r.trim().toLowerCase();return!(s==="false"||s==="0")}function ee(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const S=new Map;function te(e,t){const n=(e?e.join("|"):"")+"::"+t;if(S.has(n))return S.get(n);const r=new Set(e||[]),s=function(u,i){const o=u.getAttribute(i);return o!==null&&r.has(o)?o:t};return S.set(n,s),s}function ne(e,t,n){const r=parseFloat(e.getAttribute(t));return isNaN(r)?n:r}function oe(e,t,n){const r=e.getAttribute(t);if(!r)return n;try{return JSON.parse(r)}catch{return n}}function N(e,t,n,r,s){if(!e||t===null)return!0;const u=r||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const o=l=>{s?console.warn(l,s):console.warn(l)};if(i==="boolean"){const l=t.trim().toLowerCase();return l!==""&&l!=="true"&&l!=="false"&&l!=="1"&&l!=="0"?(o(`[${u}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const l=e.values||[];return l.includes(t)?!0:(o(`[${u}] Invalid value "${t}" for attribute "${n}". Allowed: ${l.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return o(`[${u}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const l=parseInt(t,10);return e.min!==void 0&&l<e.min?(o(`[${u}] Value ${l} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&l>e.max?(o(`[${u}] Value ${l} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(o(`[${u}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(l){return o(`[${u}] Invalid JSON for attribute "${n}": ${l.message}. Fallback: ${e.fallback}.`),!1}return!0}function re(e,t,n){for(const r in n){const[s,u,i]=n[r];Object.defineProperty(e,r,{get:function(){return s(t,u,i)},enumerable:!0,configurable:!0})}return e}function ie(e){const t={};for(const n in e){const r=e[n];if(!r||!r.prop)continue;let s=r.read;if(!s&&r.type)switch(r.type){case"enum":s=te(r.values,r.fallback);break;case"integer":s=Y;break;case"float":s=ne;break;case"boolean":s=Z;break;case"list":s=ee;break;case"json":s=oe;break;case"string":default:s=F;break}s||(s=F),t[r.prop]=[s,n,r.fallback]}return t}function le(e){const t={};for(const n in e){const r=e[n];r&&r.effect&&(t[n]=r.effect)}return Object.keys(t).length?t:null}function se(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}function L(e,t,n,r){if(e.nodeType!==1)return;const u=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i=Array.from(e.querySelectorAll(u));e.matches&&e.matches(u)&&i.push(e);for(const o of i)if(!o[n]){window.lnCore._persistSink&&o.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(o,t);try{o[n]=new r(o)}catch(l){console.error("["+n+"] init failed",o,l)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function ue(){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 ce(e){const t=W(),n=e.observed||[];for(let r=0;r<n.length;r++){const s=n[r];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 r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const s=t.byDeclaredAttr.get(r);s.some(u=>u.componentTag===e.componentTag)||s.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=se(e);if(r===null)t.reactiveWildcard.push(e);else for(const s of r)t.byReactive.has(s)||t.byReactive.set(s,[]),t.byReactive.get(s).push(e)}e.persist&&t.persist.push(e)}function j(e,t,n,r){for(let s=0;s<e.length;s++){const u=e[s];if(!t[u.attribute])continue;const i=u.effects&&u.effects[n];i?i(t,n,r):u.onAttrChange&&(!u.declared||u.declared.has(n))&&u.onAttrChange(t,n,r)}}function ae(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const r=W(),s=r.byAttr.get(n);if(R()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(n)&&E(t)){const u=r.byDeclaredAttr.get(n),i=t.getAttribute(n);for(let o=0;o<u.length;o++)N(u[o].spec,i,n,u[o].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 u=r.byReactive.get(n);u&&j(u,t,n,e.oldValue),r.reactiveWildcard.length&&j(r.reactiveWildcard,t,n,e.oldValue)}if(s)for(let u=0;u<s.length;u++){const i=s[u];if(i.handler){i.handler(t,n,e.oldValue);continue}i.onAttributeChange&&t[i.attribute]?i.onAttributeChange(t,n):(L(t,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(t))}}function fe(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,v(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{ae(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 P(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function ge(e){const t=P();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const r=t[n];if(r.onSubtreeChange){const s=r.query,u=e.target.nodeType===1?e.target.matches(s)?e.target:e.target.closest(s):e.target.parentElement?e.target.parentElement.closest(s):null;u&&r.onSubtreeChange(u,e)}}for(let n=0;n<e.addedNodes.length;n++){const r=e.addedNodes[n];if(r.nodeType===1)for(let s=0;s<t.length;s++){const u=t[s];L(r,u.selector,u.attribute,u.ComponentFn),u.onInit&&u.onInit(r)}}for(let n=0;n<e.removedNodes.length;n++){const r=e.removedNodes[n];if(r.nodeType===1)for(let s=0;s<t.length;s++){const u=t[s],i=u.query,o=Array.from(r.querySelectorAll(i));r.matches&&r.matches(i)&&o.push(r);for(let l=0;l<o.length;l++){const d=o[l];if(!document.contains(d)){const c=d[u.attribute];if(c&&typeof c.destroy=="function")try{c.destroy()}catch(a){console.error("["+u.attribute+"] destroy failed",d,a)}delete d[u.attribute]}}}}}}function pe(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,v(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{ge(r)}catch(s){console.error("[ln-core] lifecycle handler failed",r.target,s)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function he(e,t,n,r,s={}){const u=s.extraAttributes||[],i=s.onAttributeChange||null,o=s.onSubtreeChange||null,l=s.onInit||null,d=s.onAttrChange||null,c=s.effects||null,a=s.attributes||null,f=a?le(a):c,A=a?new Set(Object.keys(a)):null,_=s.persist||null;function C(h){const p=h||document.body;if(L(p,e,t,n),a&&R())for(const w in a){const Se=a[w],T=Array.from(p.querySelectorAll("["+w+"]"));p.matches&&p.matches("["+w+"]")&&T.push(p);for(let D=0;D<T.length;D++){const I=T[D];E(I)&&N(Se,I.getAttribute(w),w,r,I)}}l&&l(p)}const b=[];if(e.indexOf("[")!==-1){const h=/\[([\w-]+)/g;let p;for(;(p=h.exec(e))!==null;)b.push(p[1])}else b.push(e);ce({selector:e,attribute:t,componentTag:r,attributes:a,ComponentFn:n,onInit:l,observed:b.concat(u),onAttributeChange:i,onAttrChange:d,effects:f,declared:A,persist:_}),fe();const m=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]";P().push({selector:e,attribute:t,ComponentFn:n,onInit:l,onSubtreeChange:o,query:m}),pe(),window[t]=C;function g(){ue()>0?de(function(){C(document.body)}):C(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",g):g(),C}function z(e){return(e||"").replace(/^#/,"")}function O(e){const t=e===void 0?location.hash:e,n={},r=z(t);if(!r)return n;const s=r.split("&");for(let u=0;u<s.length;u++){const i=s[u];if(!i)continue;const o=i.indexOf(":"),l=o>-1?i.slice(0,o):i,d=o>-1?i.slice(o+1):"";if(l)try{n[l]=decodeURIComponent(d)}catch{n[l]=d}}return n}function we(e){if(!e)return null;const t=O();return e in t?t[e]:null}function be(e,t){if(!e)return;const n=O();t==null?delete n[e]:n[e]=String(t);const s=Object.keys(n).map(function(u){const i=n[u];return i===""?u:u+":"+encodeURIComponent(i)}).join("&");z(location.hash)!==s&&(location.hash=s)}function me(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ce(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function ye(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function _e(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Ae(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function ve(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),r=e.slice(t+1),s=r?r.split(",").map(function(u){try{return decodeURIComponent(u)}catch{return u}}).filter(Boolean):[];return{key:n,values:s}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=O,window.lnCore.hashGet=we,window.lnCore.hashSet=be,window.lnCore.hashLinkClick=me,window.lnCore.resolveHashNamespace=Ce,window.lnCore.hashSortEncode=ye,window.lnCore.hashSortDecode=_e,window.lnCore.hashFilterEncode=Ae,window.lnCore.hashFilterDecode=ve);function Ee(e,t,n,r){const s=typeof r=="number"?r:4,u=window.innerWidth,i=window.innerHeight,o=t.width,l=t.height,d=n.split("-"),c=d[0],a=d[1]==="start"||d[1]==="end"?d[1]:"center",f={top:["top","bottom","right","left"],bottom:["bottom","top","right","left"],left:["left","right","top","bottom"],right:["right","left","top","bottom"]},A=f[c]||f.bottom;function _(g){return g==="top"||g==="bottom"?a==="start"?e.left:a==="end"?e.right-o:e.left+(e.width-o)/2:a==="start"?e.top:a==="end"?e.bottom-l:e.top+(e.height-l)/2}function C(g){let h,p,w=!0;return g==="top"?(h=e.top-s-l,p=_(g),h<0&&(w=!1)):g==="bottom"?(h=e.bottom+s,p=_(g),h+l>i&&(w=!1)):g==="left"?(h=_(g),p=e.left-s-o,p<0&&(w=!1)):(h=_(g),p=e.right+s,p+o>u&&(w=!1)),{top:h,left:p,side:g,fits:w}}let b=null;for(let g=0;g<A.length;g++){const h=C(A[g]);if(h.fits){b=h;break}}b||(b=C(A[0]));let y=b.top,m=b.left;return o>=u?m=0:(m<0&&(m=0),m+o>u&&(m=u-o)),l>=i?y=0:(y<0&&(y=0),y+l>i&&(y=i-l)),{top:y,left:m,placement:b.side}}function ke(e){if(!e)return{width:0,height:0};const t=e.style,n=t.visibility,r=t.display,s=t.position;t.visibility="hidden",t.display="block",t.position="fixed";const u=e.offsetWidth,i=e.offsetHeight;return t.visibility=n,t.display=r,t.position=s,{width:u,height:i}}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-dropdown",t="lnDropdown",n="bottom-end";if(window[t]!==void 0)return;const r={"data-ln-dropdown":{type:"marker",description:"Initializes the dropdown container"},"data-ln-dropdown-position":{prop:"position",type:"enum",values:["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],fallback:n,description:"Preferred positioning anchor"},"data-ln-dropdown-placement":{type:"enum",values:["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],description:"Active calculated placement applied at runtime"},"data-ln-dropdown-menu":{type:"marker",description:"Dropdown menu element containing items"}},s=ie(r);function u(i){this.dom=i,re(this,i,s),this.toggleEl=i.querySelector("[data-ln-toggle]"),this._boundDocClick=null,this._docClickTimeout=null,this._boundScrollReposition=null,this._boundResizeClose=null,this.toggleEl&&(this.toggleEl.setAttribute("data-ln-dropdown-menu",""),this.toggleEl.setAttribute("role","menu"),this.toggleEl.setAttribute("popover","manual"),this._initMenuAria()),this.triggerBtn=i.querySelector("[data-ln-toggle-for]"),this.triggerBtn&&(this.triggerBtn.setAttribute("aria-haspopup","menu"),this.triggerBtn.setAttribute("aria-expanded","false"));const o=this;return this._onRequestOpen=function(){o.toggleEl&&o.toggleEl.setAttribute("data-ln-toggle","open")},this._onRequestClose=function(){o.toggleEl&&o.toggleEl.setAttribute("data-ln-toggle","close")},this._onRequestToggle=function(){if(o.toggleEl){const l=o.toggleEl.getAttribute("data-ln-toggle");o.toggleEl.setAttribute("data-ln-toggle",l==="open"?"close":"open")}},this._onKeydown=function(l){const d=o.toggleEl&&o.toggleEl.getAttribute("data-ln-toggle")==="open";if(l.key==="Escape"){d&&(l.preventDefault(),l.stopPropagation(),o.toggleEl.setAttribute("data-ln-toggle","close"),o.triggerBtn&&o.triggerBtn.focus());return}if(l.key==="Tab"){d&&(o.triggerBtn&&o.triggerBtn.focus(),o.toggleEl.setAttribute("data-ln-toggle","close"));return}const c=o._getMenuItems();if(c.length===0)return;if(!d&&(l.key==="ArrowDown"||l.key==="ArrowUp")){l.preventDefault(),o.toggleEl.setAttribute("data-ln-toggle","open"),setTimeout(function(){const f=o._getMenuItems();f.length>0&&o._focusItem(f,l.key==="ArrowDown"?0:f.length-1)},0);return}if(!d)return;const a=c.indexOf(document.activeElement);if(l.key==="ArrowDown"){l.preventDefault();const f=a<c.length-1?a+1:0;o._focusItem(c,f)}else if(l.key==="ArrowUp"){l.preventDefault();const f=a>0?a-1:c.length-1;o._focusItem(c,f)}else l.key==="Home"?(l.preventDefault(),o._focusItem(c,0)):l.key==="End"&&(l.preventDefault(),o._focusItem(c,c.length-1))},this.dom.addEventListener("ln-dropdown:request-open",this._onRequestOpen),this.dom.addEventListener("ln-dropdown:request-close",this._onRequestClose),this.dom.addEventListener("ln-dropdown:request-toggle",this._onRequestToggle),this.dom.addEventListener("keydown",this._onKeydown),this._onToggleOpen=function(l){!l.detail||l.detail.target!==o.toggleEl||(o.triggerBtn&&o.triggerBtn.setAttribute("aria-expanded","true"),typeof o.toggleEl.showPopover=="function"&&o.toggleEl.showPopover(),o._initMenuAria(),o._reposition(),o._addOutsideClickListener(),o._addScrollRepositionListener(),o._addResizeCloseListener(),k(i,"ln-dropdown:open",{target:l.detail.target}))},this._onToggleClose=function(l){!l.detail||l.detail.target!==o.toggleEl||(o.triggerBtn&&o.triggerBtn.setAttribute("aria-expanded","false"),o._removeOutsideClickListener(),o._removeScrollRepositionListener(),o._removeResizeCloseListener(),o.toggleEl.style.top="",o.toggleEl.style.left="",o.toggleEl.removeAttribute("data-ln-dropdown-placement"),typeof o.toggleEl.hidePopover=="function"&&o.toggleEl.matches(":popover-open")&&o.toggleEl.hidePopover(),k(i,"ln-dropdown:close",{target:l.detail.target}))},this.toggleEl&&(this.toggleEl.addEventListener("ln-toggle:open",this._onToggleOpen),this.toggleEl.addEventListener("ln-toggle:close",this._onToggleClose)),this}u.prototype._initMenuAria=function(){if(!this.toggleEl)return;const i=this.toggleEl.querySelectorAll("li");for(const l of i)l.setAttribute("role","none");const o=this._getMenuItems();for(let l=0;l<o.length;l++)o[l].setAttribute("role","menuitem"),o[l].setAttribute("tabindex",l===0?"0":"-1")},u.prototype._getMenuItems=function(){return this.toggleEl?Array.from(this.toggleEl.querySelectorAll('a[href], button:not([disabled]), [role="menuitem"]:not([disabled])')):[]},u.prototype._focusItem=function(i,o){for(let l=0;l<i.length;l++)i[l].setAttribute("tabindex",l===o?"0":"-1");i[o]&&i[o].focus()},u.prototype._reposition=function(){if(!this.triggerBtn||!this.toggleEl)return;const i=this.triggerBtn.getBoundingClientRect(),o=ke(this.toggleEl),l=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--size-xs"))*16||4,d=this.position||n,c=Ee(i,o,d,l);this.toggleEl.style.top=c.top+"px",this.toggleEl.style.left=c.left+"px",this.toggleEl.setAttribute("data-ln-dropdown-placement",c.placement)},u.prototype._addOutsideClickListener=function(){if(this._boundDocClick)return;const i=this;this._boundDocClick=function(o){i.dom.contains(o.target)||i.toggleEl&&i.toggleEl.contains(o.target)||i.toggleEl&&i.toggleEl.getAttribute("data-ln-toggle")==="open"&&i.toggleEl.setAttribute("data-ln-toggle","close")},i._docClickTimeout=setTimeout(function(){i._docClickTimeout=null,document.addEventListener("click",i._boundDocClick)},0)},u.prototype._removeOutsideClickListener=function(){this._docClickTimeout&&(clearTimeout(this._docClickTimeout),this._docClickTimeout=null),this._boundDocClick&&(document.removeEventListener("click",this._boundDocClick),this._boundDocClick=null)},u.prototype._addScrollRepositionListener=function(){const i=this;this._boundScrollReposition=function(){i._reposition()},window.addEventListener("scroll",this._boundScrollReposition,{passive:!0,capture:!0})},u.prototype._removeScrollRepositionListener=function(){this._boundScrollReposition&&(window.removeEventListener("scroll",this._boundScrollReposition,{capture:!0}),this._boundScrollReposition=null)},u.prototype._addResizeCloseListener=function(){const i=this;this._boundResizeClose=function(){i.toggleEl&&i.toggleEl.getAttribute("data-ln-toggle")==="open"&&i.toggleEl.setAttribute("data-ln-toggle","close")},window.addEventListener("resize",this._boundResizeClose)},u.prototype._removeResizeCloseListener=function(){this._boundResizeClose&&(window.removeEventListener("resize",this._boundResizeClose),this._boundResizeClose=null)},u.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-dropdown:request-open",this._onRequestOpen),this.dom.removeEventListener("ln-dropdown:request-close",this._onRequestClose),this.dom.removeEventListener("ln-dropdown:request-toggle",this._onRequestToggle),this.dom.removeEventListener("keydown",this._onKeydown),this._removeOutsideClickListener(),this._removeScrollRepositionListener(),this._removeResizeCloseListener(),this.toggleEl&&typeof this.toggleEl.hidePopover=="function"&&this.toggleEl.matches(":popover-open")&&this.toggleEl.hidePopover(),this.toggleEl&&(this.toggleEl.removeAttribute("data-ln-dropdown-placement"),this.toggleEl.removeEventListener("ln-toggle:open",this._onToggleOpen),this.toggleEl.removeEventListener("ln-toggle:close",this._onToggleClose)),delete this.dom[t])},he(e,t,u,"ln-dropdown",{attributes:r})})()})();
1
+ (function(){"use strict";function q(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function E(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let l=null;for(let s=1;s<t.length;s++)if(t[s]&&t[s].nodeType===1){l=t[s];break}if(!E(l))return}e.apply(console,t)}}function k(e,t,o){const l=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,l),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:l}))}function A(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){A(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function Z(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ee(e,t){const o=!!(t&&t.typed),l=t&&t.exclude,s={},u=e.elements,i={};if(o)for(let r=0;r<u.length;r++){const n=u[r];n.name&&n.type==="checkbox"&&!n.disabled&&(i[n.name]=(i[n.name]||0)+1)}for(let r=0;r<u.length;r++){const n=u[r];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(l&&n.matches&&n.matches(l)))if(n.type==="checkbox")o&&i[n.name]===1?s[n.name]=n.checked:(s[n.name]||(s[n.name]=[]),n.checked&&s[n.name].push(n.value));else if(n.type==="radio")n.checked&&(s[n.name]=n.value);else if(n.type==="select-multiple"){s[n.name]=[];for(let c=0;c<n.options.length;c++)n.options[c].selected&&s[n.name].push(n.options[c].value)}else if(o&&n.type==="hidden")s[n.name]=n.value;else if(o&&(n.type==="number"||n.type==="range")){const c=Number(n.value);s[n.name]=n.value===""||isNaN(c)?null:c}else s[n.name]=n.value}return s}function te(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ne(e,t){const o=e.elements,l=[],s={};for(let u=0;u<o.length;u++){const i=o[u];i.name&&i.type==="checkbox"&&(s[i.name]=(s[i.name]||0)+1)}for(let u=0;u<o.length;u++){const i=o[u];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const r=i.getAttribute("data-ln-fill-as")||i.name;if(!r||!(r in t))continue;const n=t[r];if(i.type==="checkbox"){if(Array.isArray(n))i.checked=n.indexOf(i.value)!==-1;else if(s[i.name]>1){const c=String(n).split(",").map(function(d){return d.trim()});i.checked=c.indexOf(i.value)!==-1}else i.checked=te(n);l.push(i)}else if(i.type==="radio")i.checked=i.value===String(n),l.push(i);else if(i.type==="select-multiple"){if(Array.isArray(n))for(let c=0;c<i.options.length;c++)i.options[c].selected=n.indexOf(i.options[c].value)!==-1;l.push(i)}else i.value=n,i.tagName==="SELECT"&&n!=null&&i.setAttribute("data-ln-value",n),l.push(i)}return l}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ne,window.lnCore.serializeForm=ee,window.lnCore.resolveFormMethod=Z);const B={};function oe(e,t){B[e]=t}function ie(e){return B[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=oe,window.lnCore.getDataMapper=ie);function re(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,A(function(){new MutationObserver(function(){k(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const F={};function le(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];F[o]=t}function se(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return F[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=le,window.lnCore.getLocaleFallback=se,window.lnCore.ensureLocaleObserver=re);const x={};function ue(e,t){x[e]||(x[e]=document.querySelector('[data-ln-template="'+e+'"]'));const o=x[e];return o?o.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function M(e,t){if(!e||!t)return e;const o=e.querySelectorAll("[data-ln-field]");for(let i=0;i<o.length;i++){const r=o[i],n=r.getAttribute("data-ln-field");t[n]!=null&&(r.textContent=t[n])}const l=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<l.length;i++){const r=l[i],n=r.getAttribute("data-ln-attr").split(",");for(let c=0;c<n.length;c++){const d=n[c].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();t[f]!=null&&r.setAttribute(a,t[f])}}const s=e.querySelectorAll("[data-ln-show]");for(let i=0;i<s.length;i++){const r=s[i],n=r.getAttribute("data-ln-show");n in t&&r.classList.toggle("hidden",!t[n])}const u=e.querySelectorAll("[data-ln-class]");for(let i=0;i<u.length;i++){const r=u[i],n=r.getAttribute("data-ln-class").split(",");for(let c=0;c<n.length;c++){const d=n[c].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();f in t&&r.classList.toggle(a,!!t[f])}}return e}function ce(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const o=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let l=0;l<o.length;l++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",o[l],t??null),o[l].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)M(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let o=0;o<t.length;o++)t[o].textContent=""}})));function $(e,t){if(!e||!t)return e;const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const u=o.currentNode;u.textContent.indexOf("{{")!==-1&&(u.textContent=u.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,r){return t[r]!==void 0?t[r]:""}))}const l=function(u,i){return t[i]!==void 0?t[i]:""},s=Array.from(e.querySelectorAll("*"));e.nodeType===1&&s.push(e);for(let u=0;u<s.length;u++){const i=s[u],r=i.attributes;for(let n=0;n<r.length;n++){const c=r[n];c.value.indexOf("{{")!==-1&&i.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,l))}}return e}function de(e,t,o,l,s,u){const i={};for(let n=0;n<e.children.length;n++){const c=e.children[n],d=c.getAttribute("data-ln-render-key");d&&(i[d]=c)}const r=document.createDocumentFragment();for(let n=0;n<t.length;n++){const c=t[n],d=String(l(c));let a=i[d];if(a)s(a,c,n);else{const f=ue(o,u);if(!f||($(f,c),a=f.firstElementChild,!a))continue;a.setAttribute("data-ln-render-key",d),s(a,c,n)}r.appendChild(a)}e.textContent="",e.appendChild(r)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=$,window.lnCore.fill=M,window.lnCore.lnFill=ce,window.lnCore.renderList=de);function S(e,t,o){const l=e.getAttribute(t);return l===null?o:l}function N(e,t,o){const l=parseInt(e.getAttribute(t),10);return isNaN(l)?o:l}function j(e,t,o=!1){const l=e.getAttribute(t);if(l===null)return!!o;const s=l.trim().toLowerCase();return!(s==="false"||s==="0")}function z(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const L=new Map;function W(e,t){const o=(e?e.join("|"):"")+"::"+t;if(L.has(o))return L.get(o);const l=new Set(e||[]),s=function(u,i){const r=u.getAttribute(i);return r!==null&&l.has(r)?r:t};return L.set(o,s),s}function P(e,t,o){const l=parseFloat(e.getAttribute(t));return isNaN(l)?o:l}function U(e,t,o){const l=e.getAttribute(t);if(!l)return o;try{return JSON.parse(l)}catch{return o}}function H(e,t,o,l,s){if(!e||t===null)return!0;const u=l||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const r=n=>{s?console.warn(n,s):console.warn(n)};if(i==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(r(`[${u}] Invalid value "${t}" for boolean attribute "${o}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const n=e.values||[];return n.includes(t)?!0:(r(`[${u}] Invalid value "${t}" for attribute "${o}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return r(`[${u}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(r(`[${u}] Value ${n} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(r(`[${u}] Value ${n} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(r(`[${u}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(n){return r(`[${u}] Invalid JSON for attribute "${o}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function V(e,t,o){for(const l in o){const[s,u,i]=o[l];Object.defineProperty(e,l,{get:function(){return s(t,u,i)},enumerable:!0,configurable:!0})}return e}function K(e){const t={};for(const o in e){const l=e[o];if(!l||!l.prop)continue;let s=l.read;if(!s&&l.type)switch(l.type){case"enum":s=W(l.values,l.fallback);break;case"integer":s=N;break;case"float":s=P;break;case"boolean":s=j;break;case"list":s=z;break;case"json":s=U;break;case"string":default:s=S;break}s||(s=S),t[l.prop]=[s,o,l.fallback]}return t}function ae(e){const t={};for(const o in e){const l=e[o];l&&l.effect&&(t[o]=l.effect)}return Object.keys(t).length?t:null}function fe(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const o in e.effects)t.add(o);if(e.onAttrChange&&e.declared)for(const o of e.declared)t.add(o);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=V,window.lnCore.attrSpec=K,window.lnCore.attrStr=S,window.lnCore.attrInt=N,window.lnCore.attrBool=j,window.lnCore.attrList=z,window.lnCore.attrEnum=W,window.lnCore.attrFloat=P,window.lnCore.attrJson=U);function O(e,t,o,l){if(e.nodeType!==1)return;const u=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i=Array.from(e.querySelectorAll(u));e.matches&&e.matches(u)&&i.push(e);for(const r of i)if(!r[o]){window.lnCore._persistSink&&r.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(r,t);try{r[o]=new l(r)}catch(n){console.error("["+o+"] init failed",r,n)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function ge(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function pe(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function J(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function we(e){const t=J(),o=e.observed||[];for(let l=0;l<o.length;l++){const s=o[l];t.byAttr.has(s)||t.byAttr.set(s,[]),t.byAttr.get(s).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const l in e.attributes){t.byDeclaredAttr.has(l)||t.byDeclaredAttr.set(l,[]);const s=t.byDeclaredAttr.get(l);s.some(u=>u.componentTag===e.componentTag)||s.push({spec:e.attributes[l],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const l=fe(e);if(l===null)t.reactiveWildcard.push(e);else for(const s of l)t.byReactive.has(s)||t.byReactive.set(s,[]),t.byReactive.get(s).push(e)}e.persist&&t.persist.push(e)}function Q(e,t,o,l){for(let s=0;s<e.length;s++){const u=e[s];if(!t[u.attribute])continue;const i=u.effects&&u.effects[o];i?i(t,o,l):u.onAttrChange&&(!u.declared||u.declared.has(o))&&u.onAttrChange(t,o,l)}}function he(e){const t=e.target,o=e.attributeName;if(e.oldValue===t.getAttribute(o))return;const l=J(),s=l.byAttr.get(o);if(q()&&l.byDeclaredAttr&&l.byDeclaredAttr.has(o)&&E(t)){const u=l.byDeclaredAttr.get(o),i=t.getAttribute(o);for(let r=0;r<u.length;r++)H(u[r].spec,i,o,u[r].componentTag,t)}if(window.lnCore._debugSink&&(o.indexOf("data-ln-")===0||s)&&window.lnCore._debugSink("attr",o,t,{oldValue:e.oldValue,newValue:t.getAttribute(o)}),o.indexOf("data-ln-")===0){const u=l.byReactive.get(o);u&&Q(u,t,o,e.oldValue),l.reactiveWildcard.length&&Q(l.reactiveWildcard,t,o,e.oldValue)}if(s)for(let u=0;u<s.length;u++){const i=s[u];if(i.handler){i.handler(t,o,e.oldValue);continue}i.onAttributeChange&&t[i.attribute]?i.onAttributeChange(t,o):(O(t,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(t))}}function be(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,A(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{he(t[o])}catch(l){console.error("[ln-core] mutation handler failed",t[o].target,l)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function G(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function me(e){const t=G();if(t.length){if(e.target)for(let o=0;o<t.length;o++){const l=t[o];if(l.onSubtreeChange){const s=l.query,u=e.target.nodeType===1?e.target.matches(s)?e.target:e.target.closest(s):e.target.parentElement?e.target.parentElement.closest(s):null;u&&l.onSubtreeChange(u,e)}}for(let o=0;o<e.addedNodes.length;o++){const l=e.addedNodes[o];if(l.nodeType===1)for(let s=0;s<t.length;s++){const u=t[s];O(l,u.selector,u.attribute,u.ComponentFn),u.onInit&&u.onInit(l)}}for(let o=0;o<e.removedNodes.length;o++){const l=e.removedNodes[o];if(l.nodeType===1)for(let s=0;s<t.length;s++){const u=t[s],i=u.query,r=Array.from(l.querySelectorAll(i));l.matches&&l.matches(i)&&r.push(l);for(let n=0;n<r.length;n++){const c=r[n];if(!document.contains(c)){const d=c[u.attribute];if(d&&typeof d.destroy=="function")try{d.destroy()}catch(a){console.error("["+u.attribute+"] destroy failed",c,a)}delete c[u.attribute]}}}}}}function Ce(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,A(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++){const l=t[o];if(l.type==="childList")try{me(l)}catch(s){console.error("[ln-core] lifecycle handler failed",l.target,s)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function X(e,t,o,l,s={}){const u=s.extraAttributes||[],i=s.onAttributeChange||null,r=s.onSubtreeChange||null,n=s.onInit||null,c=s.onAttrChange||null,d=s.effects||null,a=s.attributes||null,f=a?ae(a):d,_=a?new Set(Object.keys(a)):null,v=s.persist||null;function C(w){const p=w||document.body;if(O(p,e,t,o),a&&q())for(const h in a){const De=a[h],D=Array.from(p.querySelectorAll("["+h+"]"));p.matches&&p.matches("["+h+"]")&&D.push(p);for(let I=0;I<D.length;I++){const R=D[I];E(R)&&H(De,R.getAttribute(h),h,l,R)}}n&&n(p)}const b=[];if(e.indexOf("[")!==-1){const w=/\[([\w-]+)/g;let p;for(;(p=w.exec(e))!==null;)b.push(p[1])}else b.push(e);we({selector:e,attribute:t,componentTag:l,attributes:a,ComponentFn:o,onInit:n,observed:b.concat(u),onAttributeChange:i,onAttrChange:c,effects:f,declared:_,persist:v}),be();const m=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]";G().push({selector:e,attribute:t,ComponentFn:o,onInit:n,onSubtreeChange:r,query:m}),Ce(),window[t]=C,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=X);function g(){ge()>0?pe(function(){C(document.body)}):C(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",g):g(),C}function Y(e){return(e||"").replace(/^#/,"")}function T(e){const t=e===void 0?location.hash:e,o={},l=Y(t);if(!l)return o;const s=l.split("&");for(let u=0;u<s.length;u++){const i=s[u];if(!i)continue;const r=i.indexOf(":"),n=r>-1?i.slice(0,r):i,c=r>-1?i.slice(r+1):"";if(n)try{o[n]=decodeURIComponent(c)}catch{o[n]=c}}return o}function ye(e){if(!e)return null;const t=T();return e in t?t[e]:null}function ve(e,t){if(!e)return;const o=T();t==null?delete o[e]:o[e]=String(t);const s=Object.keys(o).map(function(u){const i=o[u];return i===""?u:u+":"+encodeURIComponent(i)}).join("&");Y(location.hash)!==s&&(location.hash=s)}function _e(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ae(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const o=e.getAttribute("data-ln-hash");if(o&&o.trim()!=="")return o.trim();const l=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return l?t?l+"-"+t:l:t||null}function Ee(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function ke(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function xe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Se(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const o=e.slice(0,t),l=e.slice(t+1),s=l?l.split(",").map(function(u){try{return decodeURIComponent(u)}catch{return u}}).filter(Boolean):[];return{key:o,values:s}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=T,window.lnCore.hashGet=ye,window.lnCore.hashSet=ve,window.lnCore.hashLinkClick=_e,window.lnCore.resolveHashNamespace=Ae,window.lnCore.hashSortEncode=Ee,window.lnCore.hashSortDecode=ke,window.lnCore.hashFilterEncode=xe,window.lnCore.hashFilterDecode=Se);function Le(e,t,o,l){const s=typeof l=="number"?l:4,u=window.innerWidth,i=window.innerHeight,r=t.width,n=t.height,c=o.split("-"),d=c[0],a=c[1]==="start"||c[1]==="end"?c[1]:"center",f={top:["top","bottom","right","left"],bottom:["bottom","top","right","left"],left:["left","right","top","bottom"],right:["right","left","top","bottom"]},_=f[d]||f.bottom;function v(g){return g==="top"||g==="bottom"?a==="start"?e.left:a==="end"?e.right-r:e.left+(e.width-r)/2:a==="start"?e.top:a==="end"?e.bottom-n:e.top+(e.height-n)/2}function C(g){let w,p,h=!0;return g==="top"?(w=e.top-s-n,p=v(g),w<0&&(h=!1)):g==="bottom"?(w=e.bottom+s,p=v(g),w+n>i&&(h=!1)):g==="left"?(w=v(g),p=e.left-s-r,p<0&&(h=!1)):(w=v(g),p=e.right+s,p+r>u&&(h=!1)),{top:w,left:p,side:g,fits:h}}let b=null;for(let g=0;g<_.length;g++){const w=C(_[g]);if(w.fits){b=w;break}}b||(b=C(_[0]));let y=b.top,m=b.left;return r>=u?m=0:(m<0&&(m=0),m+r>u&&(m=u-r)),n>=i?y=0:(y<0&&(y=0),y+n>i&&(y=i-n)),{top:y,left:m,placement:b.side}}function Oe(e){if(!e)return{width:0,height:0};const t=e.style,o=t.visibility,l=t.display,s=t.position;t.visibility="hidden",t.display="block",t.position="fixed";const u=e.offsetWidth,i=e.offsetHeight;return t.visibility=o,t.display=l,t.position=s,{width:u,height:i}}function Te(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Te),(function(){const e="data-ln-dropdown",t="lnDropdown",o="bottom-end";if(window[t]!==void 0)return;const l={"data-ln-dropdown":{type:"marker",description:"Initializes the dropdown container"},"data-ln-dropdown-position":{prop:"position",type:"enum",values:["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],fallback:o,description:"Preferred positioning anchor"},"data-ln-dropdown-placement":{type:"enum",values:["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],description:"Active calculated placement applied at runtime"},"data-ln-dropdown-menu":{type:"marker",description:"Dropdown menu element containing items"}},s=K(l);function u(i){this.dom=i,V(this,i,s),this.toggleEl=i.querySelector("[data-ln-toggle]"),this._boundDocClick=null,this._docClickTimeout=null,this._boundScrollReposition=null,this._boundResizeClose=null,this.toggleEl&&(this.toggleEl.setAttribute("data-ln-dropdown-menu",""),this.toggleEl.setAttribute("role","menu"),this.toggleEl.setAttribute("popover","manual"),this._initMenuAria()),this.triggerBtn=i.querySelector("[data-ln-toggle-for]"),this.triggerBtn&&(this.triggerBtn.setAttribute("aria-haspopup","menu"),this.triggerBtn.setAttribute("aria-expanded","false"));const r=this;return this._onRequestOpen=function(){r.toggleEl&&r.toggleEl.setAttribute("data-ln-toggle","open")},this._onRequestClose=function(){r.toggleEl&&r.toggleEl.setAttribute("data-ln-toggle","close")},this._onRequestToggle=function(){if(r.toggleEl){const n=r.toggleEl.getAttribute("data-ln-toggle");r.toggleEl.setAttribute("data-ln-toggle",n==="open"?"close":"open")}},this._onKeydown=function(n){const c=r.toggleEl&&r.toggleEl.getAttribute("data-ln-toggle")==="open";if(n.key==="Escape"){c&&(n.preventDefault(),n.stopPropagation(),r.toggleEl.setAttribute("data-ln-toggle","close"),r.triggerBtn&&r.triggerBtn.focus());return}if(n.key==="Tab"){c&&(r.triggerBtn&&r.triggerBtn.focus(),r.toggleEl.setAttribute("data-ln-toggle","close"));return}const d=r._getMenuItems();if(d.length===0)return;if(!c&&(n.key==="ArrowDown"||n.key==="ArrowUp")){n.preventDefault(),r.toggleEl.setAttribute("data-ln-toggle","open"),setTimeout(function(){const f=r._getMenuItems();f.length>0&&r._focusItem(f,n.key==="ArrowDown"?0:f.length-1)},0);return}if(!c)return;const a=d.indexOf(document.activeElement);if(n.key==="ArrowDown"){n.preventDefault();const f=a<d.length-1?a+1:0;r._focusItem(d,f)}else if(n.key==="ArrowUp"){n.preventDefault();const f=a>0?a-1:d.length-1;r._focusItem(d,f)}else n.key==="Home"?(n.preventDefault(),r._focusItem(d,0)):n.key==="End"&&(n.preventDefault(),r._focusItem(d,d.length-1))},this.dom.addEventListener("ln-dropdown:request-open",this._onRequestOpen),this.dom.addEventListener("ln-dropdown:request-close",this._onRequestClose),this.dom.addEventListener("ln-dropdown:request-toggle",this._onRequestToggle),this.dom.addEventListener("keydown",this._onKeydown),this._onToggleOpen=function(n){!n.detail||n.detail.target!==r.toggleEl||(r.triggerBtn&&r.triggerBtn.setAttribute("aria-expanded","true"),typeof r.toggleEl.showPopover=="function"&&r.toggleEl.showPopover(),r._initMenuAria(),r._reposition(),r._addOutsideClickListener(),r._addScrollRepositionListener(),r._addResizeCloseListener(),k(i,"ln-dropdown:open",{target:n.detail.target}))},this._onToggleClose=function(n){!n.detail||n.detail.target!==r.toggleEl||(r.triggerBtn&&r.triggerBtn.setAttribute("aria-expanded","false"),r._removeOutsideClickListener(),r._removeScrollRepositionListener(),r._removeResizeCloseListener(),r.toggleEl.style.top="",r.toggleEl.style.left="",r.toggleEl.removeAttribute("data-ln-dropdown-placement"),typeof r.toggleEl.hidePopover=="function"&&r.toggleEl.matches(":popover-open")&&r.toggleEl.hidePopover(),k(i,"ln-dropdown:close",{target:n.detail.target}))},this.toggleEl&&(this.toggleEl.addEventListener("ln-toggle:open",this._onToggleOpen),this.toggleEl.addEventListener("ln-toggle:close",this._onToggleClose)),this}u.prototype._initMenuAria=function(){if(!this.toggleEl)return;const i=this.toggleEl.querySelectorAll("li");for(const n of i)n.setAttribute("role","none");const r=this._getMenuItems();for(let n=0;n<r.length;n++)r[n].setAttribute("role","menuitem"),r[n].setAttribute("tabindex",n===0?"0":"-1")},u.prototype._getMenuItems=function(){return this.toggleEl?Array.from(this.toggleEl.querySelectorAll('a[href], button:not([disabled]), [role="menuitem"]:not([disabled])')):[]},u.prototype._focusItem=function(i,r){for(let n=0;n<i.length;n++)i[n].setAttribute("tabindex",n===r?"0":"-1");i[r]&&i[r].focus()},u.prototype._reposition=function(){if(!this.triggerBtn||!this.toggleEl)return;const i=this.triggerBtn.getBoundingClientRect(),r=Oe(this.toggleEl),n=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--size-xs"))*16||4,c=this.position||o,d=Le(i,r,c,n);this.toggleEl.style.top=d.top+"px",this.toggleEl.style.left=d.left+"px",this.toggleEl.setAttribute("data-ln-dropdown-placement",d.placement)},u.prototype._addOutsideClickListener=function(){if(this._boundDocClick)return;const i=this;this._boundDocClick=function(r){i.dom.contains(r.target)||i.toggleEl&&i.toggleEl.contains(r.target)||i.toggleEl&&i.toggleEl.getAttribute("data-ln-toggle")==="open"&&i.toggleEl.setAttribute("data-ln-toggle","close")},i._docClickTimeout=setTimeout(function(){i._docClickTimeout=null,document.addEventListener("click",i._boundDocClick)},0)},u.prototype._removeOutsideClickListener=function(){this._docClickTimeout&&(clearTimeout(this._docClickTimeout),this._docClickTimeout=null),this._boundDocClick&&(document.removeEventListener("click",this._boundDocClick),this._boundDocClick=null)},u.prototype._addScrollRepositionListener=function(){const i=this;this._boundScrollReposition=function(){i._reposition()},window.addEventListener("scroll",this._boundScrollReposition,{passive:!0,capture:!0})},u.prototype._removeScrollRepositionListener=function(){this._boundScrollReposition&&(window.removeEventListener("scroll",this._boundScrollReposition,{capture:!0}),this._boundScrollReposition=null)},u.prototype._addResizeCloseListener=function(){const i=this;this._boundResizeClose=function(){i.toggleEl&&i.toggleEl.getAttribute("data-ln-toggle")==="open"&&i.toggleEl.setAttribute("data-ln-toggle","close")},window.addEventListener("resize",this._boundResizeClose)},u.prototype._removeResizeCloseListener=function(){this._boundResizeClose&&(window.removeEventListener("resize",this._boundResizeClose),this._boundResizeClose=null)},u.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-dropdown:request-open",this._onRequestOpen),this.dom.removeEventListener("ln-dropdown:request-close",this._onRequestClose),this.dom.removeEventListener("ln-dropdown:request-toggle",this._onRequestToggle),this.dom.removeEventListener("keydown",this._onKeydown),this._removeOutsideClickListener(),this._removeScrollRepositionListener(),this._removeResizeCloseListener(),this.toggleEl&&typeof this.toggleEl.hidePopover=="function"&&this.toggleEl.matches(":popover-open")&&this.toggleEl.hidePopover(),this.toggleEl&&(this.toggleEl.removeAttribute("data-ln-dropdown-placement"),this.toggleEl.removeEventListener("ln-toggle:open",this._onToggleOpen),this.toggleEl.removeEventListener("ln-toggle:close",this._onToggleClose)),delete this.dom[t])},X(e,t,u,"ln-dropdown",{attributes:l})})()})();
@@ -1 +1 @@
1
- (function(){"use strict";function B(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function D(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let r=null;for(let o=1;o<t.length;o++)if(t[o]&&t[o].nodeType===1){r=t[o];break}if(!D(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,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r);const o=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});return e.dispatchEvent(o),o}function T(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){T(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}const R={};function Z(e,t){R[e]=t}function ee(e){return R[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=Z,window.lnCore.getDataMapper=ee);function te(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,T(function(){new MutationObserver(function(){A(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const H={};function ne(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];H[n]=t}function re(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return H[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ne,window.lnCore.getLocaleFallback=re,window.lnCore.ensureLocaleObserver=te);const M={};function $(e,t){M[e]||(M[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=M[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function oe(e,t,n){if(e){const r=e.querySelector('[data-ln-template="'+t+'"]');if(r)return r.content.cloneNode(!0)}return $(t,n)}function F(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let l=0;l<n.length;l++){const u=n[l],c=u.getAttribute("data-ln-field");t[c]!=null&&(u.textContent=t[c])}const r=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<r.length;l++){const u=r[l],c=u.getAttribute("data-ln-attr").split(",");for(let h=0;h<c.length;h++){const m=c[h].trim().split(":");if(m.length!==2)continue;const p=m[0].trim(),v=m[1].trim();t[v]!=null&&u.setAttribute(p,t[v])}}const o=e.querySelectorAll("[data-ln-show]");for(let l=0;l<o.length;l++){const u=o[l],c=u.getAttribute("data-ln-show");c in t&&u.classList.toggle("hidden",!t[c])}const i=e.querySelectorAll("[data-ln-class]");for(let l=0;l<i.length;l++){const u=i[l],c=u.getAttribute("data-ln-class").split(",");for(let h=0;h<c.length;h++){const m=c[h].trim().split(":");if(m.length!==2)continue;const p=m[0].trim(),v=m[1].trim();v in t&&u.classList.toggle(p,!!t[v])}}return e}function ie(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)F(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 P(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(l,u){return t[u]!==void 0?t[u]:""}))}const r=function(i,l){return t[l]!==void 0?t[l]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let i=0;i<o.length;i++){const l=o[i],u=l.attributes;for(let c=0;c<u.length;c++){const h=u[c];h.value.indexOf("{{")!==-1&&l.setAttribute(h.name,h.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function le(e,t,n,r,o,i){const l={};for(let c=0;c<e.children.length;c++){const h=e.children[c],m=h.getAttribute("data-ln-render-key");m&&(l[m]=h)}const u=document.createDocumentFragment();for(let c=0;c<t.length;c++){const h=t[c],m=String(r(h));let p=l[m];if(p)o(p,h,c);else{const v=$(n,i);if(!v||(P(v,h),p=v.firstElementChild,!p))continue;p.setAttribute("data-ln-render-key",m),o(p,h,c)}u.appendChild(p)}e.textContent="",e.appendChild(u)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=P,window.lnCore.fill=F,window.lnCore.lnFill=ie,window.lnCore.renderList=le);function W(e,t,n,r,o){if(!e||t===null)return!0;const i=r||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const u=c=>{o?console.warn(c,o):console.warn(c)};if(l==="boolean"){const c=t.trim().toLowerCase();return c!==""&&c!=="true"&&c!=="false"&&c!=="1"&&c!=="0"?(u(`[${i}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const c=e.values||[];return c.includes(t)?!0:(u(`[${i}] Invalid value "${t}" for attribute "${n}". Allowed: ${c.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return u(`[${i}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const c=parseInt(t,10);return e.min!==void 0&&c<e.min?(u(`[${i}] Value ${c} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&c>e.max?(u(`[${i}] Value ${c} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(u(`[${i}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(c){return u(`[${i}] Invalid JSON for attribute "${n}": ${c.message}. Fallback: ${e.fallback}.`),!1}return!0}function se(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 ae(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 I(e,t,n,r){if(e.nodeType!==1)return;const i=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l=Array.from(e.querySelectorAll(i));e.matches&&e.matches(i)&&l.push(e);for(const u of l)if(!u[n]){window.lnCore._persistSink&&u.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(u,t);try{u[n]=new r(u)}catch(c){console.error("["+n+"] init failed",u,c)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function ce(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function ue(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 U(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function de(e){const t=U(),n=e.observed||[];for(let r=0;r<n.length;r++){const o=n[r];t.byAttr.has(o)||t.byAttr.set(o,[]),t.byAttr.get(o).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const o=t.byDeclaredAttr.get(r);o.some(i=>i.componentTag===e.componentTag)||o.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=ae(e);if(r===null)t.reactiveWildcard.push(e);else for(const o of r)t.byReactive.has(o)||t.byReactive.set(o,[]),t.byReactive.get(o).push(e)}e.persist&&t.persist.push(e)}function j(e,t,n,r){for(let o=0;o<e.length;o++){const i=e[o];if(!t[i.attribute])continue;const l=i.effects&&i.effects[n];l?l(t,n,r):i.onAttrChange&&(!i.declared||i.declared.has(n))&&i.onAttrChange(t,n,r)}}function fe(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const r=U(),o=r.byAttr.get(n);if(B()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(n)&&D(t)){const i=r.byDeclaredAttr.get(n),l=t.getAttribute(n);for(let u=0;u<i.length;u++)W(i[u].spec,l,n,i[u].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||o)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const i=r.byReactive.get(n);i&&j(i,t,n,e.oldValue),r.reactiveWildcard.length&&j(r.reactiveWildcard,t,n,e.oldValue)}if(o)for(let i=0;i<o.length;i++){const l=o[i];if(l.handler){l.handler(t,n,e.oldValue);continue}l.onAttributeChange&&t[l.attribute]?l.onAttributeChange(t,n):(I(t,l.selector,l.attribute,l.ComponentFn),l.onInit&&l.onInit(t))}}function he(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,T(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{fe(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 K(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function we(e){const t=K();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const r=t[n];if(r.onSubtreeChange){const o=r.query,i=e.target.nodeType===1?e.target.matches(o)?e.target:e.target.closest(o):e.target.parentElement?e.target.parentElement.closest(o):null;i&&r.onSubtreeChange(i,e)}}for(let n=0;n<e.addedNodes.length;n++){const r=e.addedNodes[n];if(r.nodeType===1)for(let o=0;o<t.length;o++){const i=t[o];I(r,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(r)}}for(let n=0;n<e.removedNodes.length;n++){const r=e.removedNodes[n];if(r.nodeType===1)for(let o=0;o<t.length;o++){const i=t[o],l=i.query,u=Array.from(r.querySelectorAll(l));r.matches&&r.matches(l)&&u.push(r);for(let c=0;c<u.length;c++){const h=u[c];if(!document.contains(h)){const m=h[i.attribute];if(m&&typeof m.destroy=="function")try{m.destroy()}catch(p){console.error("["+i.attribute+"] destroy failed",h,p)}delete h[i.attribute]}}}}}}function be(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,T(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{we(r)}catch(o){console.error("[ln-core] lifecycle handler failed",r.target,o)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function pe(e,t,n,r,o={}){const i=o.extraAttributes||[],l=o.onAttributeChange||null,u=o.onSubtreeChange||null,c=o.onInit||null,h=o.onAttrChange||null,m=o.effects||null,p=o.attributes||null,v=p?se(p):m,N=p?new Set(Object.keys(p)):null,E=o.persist||null;function k(f){const g=f||document.body;if(I(g,e,t,n),p&&B())for(const b in p){const C=p[b],w=Array.from(g.querySelectorAll("["+b+"]"));g.matches&&g.matches("["+b+"]")&&w.push(g);for(let _=0;_<w.length;_++){const x=w[_];D(x)&&W(C,x.getAttribute(b),b,r,x)}}c&&c(g)}const L=[];if(e.indexOf("[")!==-1){const f=/\[([\w-]+)/g;let g;for(;(g=f.exec(e))!==null;)L.push(g[1])}else L.push(e);de({selector:e,attribute:t,componentTag:r,attributes:p,ComponentFn:n,onInit:c,observed:L.concat(i),onAttributeChange:l,onAttrChange:h,effects:v,declared:N,persist:E}),he();const a=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]";K().push({selector:e,attribute:t,ComponentFn:n,onInit:c,onSubtreeChange:u,query:a}),be(),window[t]=k;function d(){ce()>0?ue(function(){k(document.body)}):k(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",d):d(),k}function V(e){return(e||"").replace(/^#/,"")}function q(e){const t=e===void 0?location.hash:e,n={},r=V(t);if(!r)return n;const o=r.split("&");for(let i=0;i<o.length;i++){const l=o[i];if(!l)continue;const u=l.indexOf(":"),c=u>-1?l.slice(0,u):l,h=u>-1?l.slice(u+1):"";if(c)try{n[c]=decodeURIComponent(h)}catch{n[c]=h}}return n}function ge(e){if(!e)return null;const t=q();return e in t?t[e]:null}function me(e,t){if(!e)return;const n=q();t==null?delete n[e]:n[e]=String(t);const o=Object.keys(n).map(function(i){const l=n[i];return l===""?i:i+":"+encodeURIComponent(l)}).join("&");V(location.hash)!==o&&(location.hash=o)}function _e(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ce(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function ye(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function ve(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function xe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ae(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),r=e.slice(t+1),o=r?r.split(",").map(function(i){try{return decodeURIComponent(i)}catch{return i}}).filter(Boolean):[];return{key:n,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=q,window.lnCore.hashGet=ge,window.lnCore.hashSet=me,window.lnCore.hashLinkClick=_e,window.lnCore.resolveHashNamespace=Ce,window.lnCore.hashSortEncode=ye,window.lnCore.hashSortDecode=ve,window.lnCore.hashFilterEncode=xe,window.lnCore.hashFilterDecode=Ae);function ke(){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=ke),(function(){const e="data-ln-editor",t="lnEditor";if(window[t]!==void 0)return;const n={"data-ln-editor":{type:"marker",description:"Mounts rich text editor instance on container"},"data-ln-editor-action":{type:"enum",values:["bold","italic","underline","strikethrough","heading-2","heading-3","heading-4","blockquote","code","paragraph","ordered-list","unordered-list","link","unlink","clear","confirm-link","cancel-link"],description:"Rich text toolbar formatting action"},"data-ln-editor-source":{type:"string",description:"Selector or ID of backing textarea synchronized with editor content"}},r={P:!0,BR:!0,STRONG:!0,B:!0,EM:!0,I:!0,U:!0,S:!0,A:!0,UL:!0,OL:!0,LI:!0,H2:!0,H3:!0,H4:!0,BLOCKQUOTE:!0,PRE:!0,CODE:!0,DIV:!0},o={bold:"bold",italic:"italic",underline:"underline",strikethrough:"strikeThrough"},i={"heading-2":"h2","heading-3":"h3","heading-4":"h4",blockquote:"blockquote",code:"pre",paragraph:"p"},l={"ordered-list":"insertOrderedList","unordered-list":"insertUnorderedList"};let u=0;function c(s){return!!(o[s]||i[s]||l[s]||s==="link")}function h(s){this.dom=s;const a=this;if(this._textarea=s.querySelector("textarea"),!this._textarea)return console.warn("[ln-editor] No <textarea> found inside",s),this;const d=this._textarea.getAttribute("placeholder")||"";this._textarea.setAttribute("data-ln-editor-source",""),this._surface=document.createElement("div"),this._surface.className="ln-editor__surface",this._surface.setAttribute("contenteditable","true"),this._surface.setAttribute("role","textbox"),this._surface.setAttribute("aria-multiline","true"),d&&this._surface.setAttribute("data-placeholder",d);const f=this._textarea.id;if(f){const w=s.querySelector('label[for="'+f+'"]');w&&(w.id||(w.id=f+"-label"),this._surface.setAttribute("aria-labelledby",w.id))}this._surface.id=f?f+"-surface":"ln-editor-surface-"+ ++u;const g=this._textarea.value.trim();g&&(this._surface.innerHTML=g);const b=s.querySelector('[role="toolbar"]');if(b&&b.nextSibling?s.insertBefore(this._surface,b.nextSibling):s.appendChild(this._surface),b){b.setAttribute("aria-controls",this._surface.id);const w=b.querySelectorAll("[data-ln-editor-action]");for(let _=0;_<w.length;_++){const x=w[_].getAttribute("data-ln-editor-action");c(x)&&w[_].setAttribute("aria-pressed","false")}}this._onInput=function(){a._syncToTextarea(),A(a.dom,"ln-editor:changed",{html:a._textarea.value,target:a.dom})},this._onMousedownToolbar=function(w){w.target.closest("[data-ln-editor-action]")&&w.preventDefault()},this._onClickToolbar=function(w){const _=w.target.closest("[data-ln-editor-action]");if(!_)return;const x=_.getAttribute("data-ln-editor-action");a._execAction(x)},this._onPaste=function(w){v(a,w)},this._onKeydown=function(w){k(a,w)},this._onSelectionChange=function(){document.contains(a._surface)&&a._updateActiveStates()},this._onFocus=function(){A(a.dom,"ln-editor:focus",{target:a.dom})},this._onBlur=function(){a._syncToTextarea(),A(a.dom,"ln-editor:blur",{target:a.dom})},this._onTextareaInput=function(){a._surface.innerHTML!==a._textarea.value&&(a._surface.innerHTML=a._textarea.value,A(a.dom,"ln-editor:changed",{html:a._textarea.value,target:a.dom}))},this._surface.addEventListener("input",this._onInput),this._surface.addEventListener("paste",this._onPaste),this._surface.addEventListener("keydown",this._onKeydown),this._surface.addEventListener("focus",this._onFocus),this._surface.addEventListener("blur",this._onBlur),this._textarea.addEventListener("input",this._onTextareaInput),b&&(b.addEventListener("mousedown",this._onMousedownToolbar),b.addEventListener("click",this._onClickToolbar)),document.addEventListener("selectionchange",this._onSelectionChange),this._onSetContent=function(w){const _=w.detail&&w.detail.html;_!==void 0&&(a._surface.innerHTML=_,a._syncToTextarea(),A(a.dom,"ln-editor:changed",{html:a._textarea.value,target:a.dom}))},s.addEventListener("ln-editor:set-content",this._onSetContent);const C=this._textarea.form;return C&&(this._onFormReset=function(){setTimeout(function(){a._surface.innerHTML=a._textarea.value,A(s,"ln-editor:changed",{html:a._textarea.value,target:s})},0)},C.addEventListener("reset",this._onFormReset)),this}h.prototype._syncToTextarea=function(){this._textarea&&(this._textarea.value=this._surface.innerHTML)},h.prototype._execAction=function(s){if(!(!s||Y(this.dom,"ln-editor:before-change",{action:s,target:this.dom}).defaultPrevented)){if(this._surface.focus(),o[s])document.execCommand(o[s],!1,null);else if(i[s]){const d=i[s],f=m(this._surface);f&&f.toLowerCase()===d?document.execCommand("formatBlock",!1,"<p>"):document.execCommand("formatBlock",!1,"<"+d+">")}else l[s]?document.execCommand(l[s],!1,null):s==="link"?L(this):s==="unlink"?document.execCommand("unlink",!1,null):s==="clear"&&(document.execCommand("removeFormat",!1,null),document.execCommand("formatBlock",!1,"<p>"));this._syncToTextarea(),this._updateActiveStates()}},h.prototype._updateActiveStates=function(){const s=this.dom.querySelector('[role="toolbar"]');if(!s)return;const a=window.getSelection();if(!a||a.rangeCount===0)return;const d=a.anchorNode;if(!d||!this._surface.contains(d))return;const f=s.querySelectorAll("[data-ln-editor-action]");for(let g=0;g<f.length;g++){const b=f[g],C=b.getAttribute("data-ln-editor-action");let w=!1;if(o[C])try{w=document.queryCommandState(o[C])}catch{}else if(i[C]){const _=m(this._surface);w=_&&_.toLowerCase()===i[C]}else if(l[C])try{w=document.queryCommandState(l[C])}catch{}else C==="link"&&(w=!!p(a.anchorNode,"A",this._surface));c(C)&&b.setAttribute("aria-pressed",String(w)),w?b.classList.add("ln-editor-active"):b.classList.remove("ln-editor-active")}},h.prototype.getHTML=function(){return this._surface?this._surface.innerHTML:""},h.prototype.setHTML=function(s){this._surface&&(this._surface.innerHTML=s,this._syncToTextarea(),A(this.dom,"ln-editor:changed",{html:this._textarea.value,target:this.dom}))},h.prototype.destroy=function(){if(!this.dom[t])return;this._surface&&(this._surface.removeEventListener("input",this._onInput),this._surface.removeEventListener("paste",this._onPaste),this._surface.removeEventListener("keydown",this._onKeydown),this._surface.removeEventListener("focus",this._onFocus),this._surface.removeEventListener("blur",this._onBlur),this._surface.remove());const s=this.dom.querySelector('[role="toolbar"]');s&&(s.removeEventListener("mousedown",this._onMousedownToolbar),s.removeEventListener("click",this._onClickToolbar)),document.removeEventListener("selectionchange",this._onSelectionChange),this.dom.removeEventListener("ln-editor:set-content",this._onSetContent);const a=this._textarea?this._textarea.form:null;if(a&&this._onFormReset&&a.removeEventListener("reset",this._onFormReset),this._textarea&&(this._onTextareaInput&&this._textarea.removeEventListener("input",this._onTextareaInput),this._textarea.removeAttribute("data-ln-editor-source")),this._closeLinkPopover)this._closeLinkPopover();else{const d=this.dom.querySelector(".ln-editor__link-popover");d&&d.remove()}delete this.dom[t]};function m(s){const a=window.getSelection();if(!a||a.rangeCount===0)return null;let d=a.anchorNode;if(!d)return null;for(;d&&d!==s;){if(d.nodeType===1){const f=d.tagName;if(f==="H2"||f==="H3"||f==="H4"||f==="BLOCKQUOTE"||f==="PRE"||f==="P")return f}d=d.parentNode}return null}function p(s,a,d){for(;s&&s!==d;){if(s.nodeType===1&&s.tagName===a)return s;s=s.parentNode}return null}function v(s,a){a.preventDefault();let d="";if(a.clipboardData&&(d=a.clipboardData.getData("text/html"),!d)){const g=a.clipboardData.getData("text/plain");g&&(d=g.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\n\n/g,"</p><p>").replace(/\n/g,"<br>"),d="<p>"+d+"</p>")}if(!d)return;const f=N(d);f&&document.execCommand("insertHTML",!1,f)}function N(s){const a=document.createElement("div");return a.innerHTML=s,E(a),a.innerHTML}function E(s){const a=Array.from(s.childNodes);for(let d=0;d<a.length;d++){const f=a[d];if(f.nodeType!==3){if(f.nodeType!==1){s.removeChild(f);continue}if(r[f.tagName]){const g=Array.from(f.attributes);for(let b=0;b<g.length;b++){const C=g[b].name;if(f.tagName==="A"&&C==="href"){const w=f.getAttribute("href")||"";/^(https?:|mailto:|\/|#)/.test(w)||f.removeAttribute("href")}else f.removeAttribute(C)}f.tagName==="A"&&f.setAttribute("rel","noopener noreferrer"),E(f)}else{for(;f.firstChild;)s.insertBefore(f.firstChild,f);s.removeChild(f)}}}}function k(s,a){if(!(a.ctrlKey||a.metaKey))return;let d=null;switch(a.key.toLowerCase()){case"b":d="bold";break;case"i":d="italic";break;case"u":d="underline";break;case"k":d="link";break}d&&(a.preventDefault(),s._execAction(d))}function L(s){const a=window.getSelection();if(!a||a.rangeCount===0)return;const d=p(a.anchorNode,"A",s._surface),f=a.getRangeAt(0).cloneRange();s._closeLinkPopover&&s._closeLinkPopover();const g=oe(s.dom,"ln-editor-link-popover","ln-editor");if(!g)return;const b=g.firstElementChild;if(!b)return;const C=b.querySelector('input[type="url"]'),w=b.querySelector('[data-ln-editor-action="confirm-link"]'),_=b.querySelector('[data-ln-editor-action="cancel-link"]');d&&(C.value=d.getAttribute("href")||"");const x=s.dom.querySelector('[role="toolbar"]');x?x.after(b):s.dom.insertBefore(b,s._surface),C.focus();function Q(){const y=window.getSelection();y.removeAllRanges(),y.addRange(f)}function O(){document.removeEventListener("mousedown",J),s._closeLinkPopover=null,b.remove()}function z(){const y=C.value.trim();if(O(),Q(),s._surface.focus(),y)if(d)d.setAttribute("href",y),d.setAttribute("rel","noopener noreferrer"),s._syncToTextarea(),A(s.dom,"ln-editor:changed",{html:s._textarea.value,target:s.dom});else{document.execCommand("createLink",!1,y);const S=window.getSelection();if(S&&S.anchorNode){const X=p(S.anchorNode,"A",s._surface);X&&(X.setAttribute("rel","noopener noreferrer"),s._syncToTextarea())}}else d&&document.execCommand("unlink",!1,null)}function G(){O(),Q(),s._surface.focus()}function Le(){O()}function J(y){const S=s.dom.contains(y.target)&&y.target.closest('[data-ln-editor-action="link"]');!b.contains(y.target)&&!S&&Le()}s._closeLinkPopover=O,w.addEventListener("click",z),_.addEventListener("click",G),C.addEventListener("keydown",function(y){y.key==="Enter"?(y.preventDefault(),z()):y.key==="Escape"&&(y.preventDefault(),G())}),document.addEventListener("mousedown",J)}pe(e,t,h,"ln-editor",{attributes:n})})()})();
1
+ (function(){"use strict";function R(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function N(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let r=null;for(let o=1;o<t.length;o++)if(t[o]&&t[o].nodeType===1){r=t[o];break}if(!N(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 se(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r);const o=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});return e.dispatchEvent(o),o}function T(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){T(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function ae(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ce(e,t){const n=!!(t&&t.typed),r=t&&t.exclude,o={},s=e.elements,i={};if(n)for(let c=0;c<s.length;c++){const l=s[c];l.name&&l.type==="checkbox"&&!l.disabled&&(i[l.name]=(i[l.name]||0)+1)}for(let c=0;c<s.length;c++){const l=s[c];if(!(!l.name||l.disabled||l.type==="file"||l.type==="submit"||l.type==="button")&&!(r&&l.matches&&l.matches(r)))if(l.type==="checkbox")n&&i[l.name]===1?o[l.name]=l.checked:(o[l.name]||(o[l.name]=[]),l.checked&&o[l.name].push(l.value));else if(l.type==="radio")l.checked&&(o[l.name]=l.value);else if(l.type==="select-multiple"){o[l.name]=[];for(let d=0;d<l.options.length;d++)l.options[d].selected&&o[l.name].push(l.options[d].value)}else if(n&&l.type==="hidden")o[l.name]=l.value;else if(n&&(l.type==="number"||l.type==="range")){const d=Number(l.value);o[l.name]=l.value===""||isNaN(d)?null:d}else o[l.name]=l.value}return o}function ue(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function de(e,t){const n=e.elements,r=[],o={};for(let s=0;s<n.length;s++){const i=n[s];i.name&&i.type==="checkbox"&&(o[i.name]=(o[i.name]||0)+1)}for(let s=0;s<n.length;s++){const i=n[s];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const c=i.getAttribute("data-ln-fill-as")||i.name;if(!c||!(c in t))continue;const l=t[c];if(i.type==="checkbox"){if(Array.isArray(l))i.checked=l.indexOf(i.value)!==-1;else if(o[i.name]>1){const d=String(l).split(",").map(function(m){return m.trim()});i.checked=d.indexOf(i.value)!==-1}else i.checked=ue(l);r.push(i)}else if(i.type==="radio")i.checked=i.value===String(l),r.push(i);else if(i.type==="select-multiple"){if(Array.isArray(l))for(let d=0;d<i.options.length;d++)i.options[d].selected=l.indexOf(i.options[d].value)!==-1;r.push(i)}else i.value=l,i.tagName==="SELECT"&&l!=null&&i.setAttribute("data-ln-value",l),r.push(i)}return r}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=de,window.lnCore.serializeForm=ce,window.lnCore.resolveFormMethod=ae);const H={};function fe(e,t){H[e]=t}function he(e){return H[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=fe,window.lnCore.getDataMapper=he);function we(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,T(function(){new MutationObserver(function(){A(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const $={};function pe(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];$[n]=t}function be(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return $[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=pe,window.lnCore.getLocaleFallback=be,window.lnCore.ensureLocaleObserver=we);const M={};function j(e,t){M[e]||(M[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=M[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function me(e,t,n){if(e){const r=e.querySelector('[data-ln-template="'+t+'"]');if(r)return r.content.cloneNode(!0)}return j(t,n)}function P(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let i=0;i<n.length;i++){const c=n[i],l=c.getAttribute("data-ln-field");t[l]!=null&&(c.textContent=t[l])}const r=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<r.length;i++){const c=r[i],l=c.getAttribute("data-ln-attr").split(",");for(let d=0;d<l.length;d++){const m=l[d].trim().split(":");if(m.length!==2)continue;const b=m[0].trim(),v=m[1].trim();t[v]!=null&&c.setAttribute(b,t[v])}}const o=e.querySelectorAll("[data-ln-show]");for(let i=0;i<o.length;i++){const c=o[i],l=c.getAttribute("data-ln-show");l in t&&c.classList.toggle("hidden",!t[l])}const s=e.querySelectorAll("[data-ln-class]");for(let i=0;i<s.length;i++){const c=s[i],l=c.getAttribute("data-ln-class").split(",");for(let d=0;d<l.length;d++){const m=l[d].trim().split(":");if(m.length!==2)continue;const b=m[0].trim(),v=m[1].trim();v in t&&c.classList.toggle(b,!!t[v])}}return e}function ge(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)P(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 U(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,c){return t[c]!==void 0?t[c]:""}))}const r=function(s,i){return t[i]!==void 0?t[i]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let s=0;s<o.length;s++){const i=o[s],c=i.attributes;for(let l=0;l<c.length;l++){const d=c[l];d.value.indexOf("{{")!==-1&&i.setAttribute(d.name,d.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function Ce(e,t,n,r,o,s){const i={};for(let l=0;l<e.children.length;l++){const d=e.children[l],m=d.getAttribute("data-ln-render-key");m&&(i[m]=d)}const c=document.createDocumentFragment();for(let l=0;l<t.length;l++){const d=t[l],m=String(r(d));let b=i[m];if(b)o(b,d,l);else{const v=j(n,s);if(!v||(U(v,d),b=v.firstElementChild,!b))continue;b.setAttribute("data-ln-render-key",m),o(b,d,l)}c.appendChild(b)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=U,window.lnCore.fill=P,window.lnCore.lnFill=ge,window.lnCore.renderList=Ce);function D(e,t,n){const r=e.getAttribute(t);return r===null?n:r}function W(e,t,n){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?n:r}function K(e,t,n=!1){const r=e.getAttribute(t);if(r===null)return!!n;const o=r.trim().toLowerCase();return!(o==="false"||o==="0")}function V(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const I=new Map;function Q(e,t){const n=(e?e.join("|"):"")+"::"+t;if(I.has(n))return I.get(n);const r=new Set(e||[]),o=function(s,i){const c=s.getAttribute(i);return c!==null&&r.has(c)?c:t};return I.set(n,o),o}function z(e,t,n){const r=parseFloat(e.getAttribute(t));return isNaN(r)?n:r}function J(e,t,n){const r=e.getAttribute(t);if(!r)return n;try{return JSON.parse(r)}catch{return n}}function G(e,t,n,r,o){if(!e||t===null)return!0;const s=r||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const c=l=>{o?console.warn(l,o):console.warn(l)};if(i==="boolean"){const l=t.trim().toLowerCase();return l!==""&&l!=="true"&&l!=="false"&&l!=="1"&&l!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const l=e.values||[];return l.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${l.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const l=parseInt(t,10);return e.min!==void 0&&l<e.min?(c(`[${s}] Value ${l} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&l>e.max?(c(`[${s}] Value ${l} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(l){return c(`[${s}] Invalid JSON for attribute "${n}": ${l.message}. Fallback: ${e.fallback}.`),!1}return!0}function _e(e,t,n){for(const r in n){const[o,s,i]=n[r];Object.defineProperty(e,r,{get:function(){return o(t,s,i)},enumerable:!0,configurable:!0})}return e}function ye(e){const t={};for(const n in e){const r=e[n];if(!r||!r.prop)continue;let o=r.read;if(!o&&r.type)switch(r.type){case"enum":o=Q(r.values,r.fallback);break;case"integer":o=W;break;case"float":o=z;break;case"boolean":o=K;break;case"list":o=V;break;case"json":o=J;break;case"string":default:o=D;break}o||(o=D),t[r.prop]=[o,n,r.fallback]}return t}function ve(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 xe(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=_e,window.lnCore.attrSpec=ye,window.lnCore.attrStr=D,window.lnCore.attrInt=W,window.lnCore.attrBool=K,window.lnCore.attrList=V,window.lnCore.attrEnum=Q,window.lnCore.attrFloat=z,window.lnCore.attrJson=J);function B(e,t,n,r){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i=Array.from(e.querySelectorAll(s));e.matches&&e.matches(s)&&i.push(e);for(const c of i)if(!c[n]){window.lnCore._persistSink&&c.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(c,t);try{c[n]=new r(c)}catch(l){console.error("["+n+"] init failed",c,l)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ae(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function ke(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function X(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function Se(e){const t=X(),n=e.observed||[];for(let r=0;r<n.length;r++){const o=n[r];t.byAttr.has(o)||t.byAttr.set(o,[]),t.byAttr.get(o).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const o=t.byDeclaredAttr.get(r);o.some(s=>s.componentTag===e.componentTag)||o.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=xe(e);if(r===null)t.reactiveWildcard.push(e);else for(const o of r)t.byReactive.has(o)||t.byReactive.set(o,[]),t.byReactive.get(o).push(e)}e.persist&&t.persist.push(e)}function Y(e,t,n,r){for(let o=0;o<e.length;o++){const s=e[o];if(!t[s.attribute])continue;const i=s.effects&&s.effects[n];i?i(t,n,r):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,r)}}function Le(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const r=X(),o=r.byAttr.get(n);if(R()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(n)&&N(t)){const s=r.byDeclaredAttr.get(n),i=t.getAttribute(n);for(let c=0;c<s.length;c++)G(s[c].spec,i,n,s[c].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||o)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const s=r.byReactive.get(n);s&&Y(s,t,n,e.oldValue),r.reactiveWildcard.length&&Y(r.reactiveWildcard,t,n,e.oldValue)}if(o)for(let s=0;s<o.length;s++){const i=o[s];if(i.handler){i.handler(t,n,e.oldValue);continue}i.onAttributeChange&&t[i.attribute]?i.onAttributeChange(t,n):(B(t,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(t))}}function Te(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,T(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Le(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 Z(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function Ee(e){const t=Z();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const r=t[n];if(r.onSubtreeChange){const o=r.query,s=e.target.nodeType===1?e.target.matches(o)?e.target:e.target.closest(o):e.target.parentElement?e.target.parentElement.closest(o):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 o=0;o<t.length;o++){const s=t[o];B(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 o=0;o<t.length;o++){const s=t[o],i=s.query,c=Array.from(r.querySelectorAll(i));r.matches&&r.matches(i)&&c.push(r);for(let l=0;l<c.length;l++){const d=c[l];if(!document.contains(d)){const m=d[s.attribute];if(m&&typeof m.destroy=="function")try{m.destroy()}catch(b){console.error("["+s.attribute+"] destroy failed",d,b)}delete d[s.attribute]}}}}}}function Oe(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,T(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{Ee(r)}catch(o){console.error("[ln-core] lifecycle handler failed",r.target,o)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function ee(e,t,n,r,o={}){const s=o.extraAttributes||[],i=o.onAttributeChange||null,c=o.onSubtreeChange||null,l=o.onInit||null,d=o.onAttrChange||null,m=o.effects||null,b=o.attributes||null,v=b?ve(b):m,F=b?new Set(Object.keys(b)):null,E=o.persist||null;function k(h){const g=h||document.body;if(B(g,e,t,n),b&&R())for(const p in b){const _=b[p],w=Array.from(g.querySelectorAll("["+p+"]"));g.matches&&g.matches("["+p+"]")&&w.push(g);for(let C=0;C<w.length;C++){const x=w[C];N(x)&&G(_,x.getAttribute(p),p,r,x)}}l&&l(g)}const S=[];if(e.indexOf("[")!==-1){const h=/\[([\w-]+)/g;let g;for(;(g=h.exec(e))!==null;)S.push(g[1])}else S.push(e);Se({selector:e,attribute:t,componentTag:r,attributes:b,ComponentFn:n,onInit:l,observed:S.concat(s),onAttributeChange:i,onAttrChange:d,effects:v,declared:F,persist:E}),Te();const u=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]";Z().push({selector:e,attribute:t,ComponentFn:n,onInit:l,onSubtreeChange:c,query:u}),Oe(),window[t]=k,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ee);function f(){Ae()>0?ke(function(){k(document.body)}):k(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",f):f(),k}function te(e){return(e||"").replace(/^#/,"")}function q(e){const t=e===void 0?location.hash:e,n={},r=te(t);if(!r)return n;const o=r.split("&");for(let s=0;s<o.length;s++){const i=o[s];if(!i)continue;const c=i.indexOf(":"),l=c>-1?i.slice(0,c):i,d=c>-1?i.slice(c+1):"";if(l)try{n[l]=decodeURIComponent(d)}catch{n[l]=d}}return n}function Ne(e){if(!e)return null;const t=q();return e in t?t[e]:null}function Me(e,t){if(!e)return;const n=q();t==null?delete n[e]:n[e]=String(t);const o=Object.keys(n).map(function(s){const i=n[s];return i===""?s:s+":"+encodeURIComponent(i)}).join("&");te(location.hash)!==o&&(location.hash=o)}function De(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ie(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 Be(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function qe(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Fe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Re(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),r=e.slice(t+1),o=r?r.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=q,window.lnCore.hashGet=Ne,window.lnCore.hashSet=Me,window.lnCore.hashLinkClick=De,window.lnCore.resolveHashNamespace=Ie,window.lnCore.hashSortEncode=Be,window.lnCore.hashSortDecode=qe,window.lnCore.hashFilterEncode=Fe,window.lnCore.hashFilterDecode=Re);function He(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=He),(function(){const e="data-ln-editor",t="lnEditor";if(window[t]!==void 0)return;const n={"data-ln-editor":{type:"marker",description:"Mounts rich text editor instance on container"},"data-ln-editor-action":{type:"enum",values:["bold","italic","underline","strikethrough","heading-2","heading-3","heading-4","blockquote","code","paragraph","ordered-list","unordered-list","link","unlink","clear","confirm-link","cancel-link"],description:"Rich text toolbar formatting action"},"data-ln-editor-source":{type:"string",description:"Selector or ID of backing textarea synchronized with editor content"}},r={P:!0,BR:!0,STRONG:!0,B:!0,EM:!0,I:!0,U:!0,S:!0,A:!0,UL:!0,OL:!0,LI:!0,H2:!0,H3:!0,H4:!0,BLOCKQUOTE:!0,PRE:!0,CODE:!0,DIV:!0},o={bold:"bold",italic:"italic",underline:"underline",strikethrough:"strikeThrough"},s={"heading-2":"h2","heading-3":"h3","heading-4":"h4",blockquote:"blockquote",code:"pre",paragraph:"p"},i={"ordered-list":"insertOrderedList","unordered-list":"insertUnorderedList"};let c=0;function l(a){return!!(o[a]||s[a]||i[a]||a==="link")}function d(a){this.dom=a;const u=this;if(this._textarea=a.querySelector("textarea"),!this._textarea)return console.warn("[ln-editor] No <textarea> found inside",a),this;const f=this._textarea.getAttribute("placeholder")||"";this._textarea.setAttribute("data-ln-editor-source",""),this._surface=document.createElement("div"),this._surface.className="ln-editor__surface",this._surface.setAttribute("contenteditable","true"),this._surface.setAttribute("role","textbox"),this._surface.setAttribute("aria-multiline","true"),f&&this._surface.setAttribute("data-placeholder",f);const h=this._textarea.id;if(h){const w=a.querySelector('label[for="'+h+'"]');w&&(w.id||(w.id=h+"-label"),this._surface.setAttribute("aria-labelledby",w.id))}this._surface.id=h?h+"-surface":"ln-editor-surface-"+ ++c;const g=this._textarea.value.trim();g&&(this._surface.innerHTML=g);const p=a.querySelector('[role="toolbar"]');if(p&&p.nextSibling?a.insertBefore(this._surface,p.nextSibling):a.appendChild(this._surface),p){p.setAttribute("aria-controls",this._surface.id);const w=p.querySelectorAll("[data-ln-editor-action]");for(let C=0;C<w.length;C++){const x=w[C].getAttribute("data-ln-editor-action");l(x)&&w[C].setAttribute("aria-pressed","false")}}this._onInput=function(){u._syncToTextarea(),A(u.dom,"ln-editor:changed",{html:u._textarea.value,target:u.dom})},this._onMousedownToolbar=function(w){w.target.closest("[data-ln-editor-action]")&&w.preventDefault()},this._onClickToolbar=function(w){const C=w.target.closest("[data-ln-editor-action]");if(!C)return;const x=C.getAttribute("data-ln-editor-action");u._execAction(x)},this._onPaste=function(w){v(u,w)},this._onKeydown=function(w){k(u,w)},this._onSelectionChange=function(){document.contains(u._surface)&&u._updateActiveStates()},this._onFocus=function(){A(u.dom,"ln-editor:focus",{target:u.dom})},this._onBlur=function(){u._syncToTextarea(),A(u.dom,"ln-editor:blur",{target:u.dom})},this._onTextareaInput=function(){u._surface.innerHTML!==u._textarea.value&&(u._surface.innerHTML=u._textarea.value,A(u.dom,"ln-editor:changed",{html:u._textarea.value,target:u.dom}))},this._surface.addEventListener("input",this._onInput),this._surface.addEventListener("paste",this._onPaste),this._surface.addEventListener("keydown",this._onKeydown),this._surface.addEventListener("focus",this._onFocus),this._surface.addEventListener("blur",this._onBlur),this._textarea.addEventListener("input",this._onTextareaInput),p&&(p.addEventListener("mousedown",this._onMousedownToolbar),p.addEventListener("click",this._onClickToolbar)),document.addEventListener("selectionchange",this._onSelectionChange),this._onSetContent=function(w){const C=w.detail&&w.detail.html;C!==void 0&&(u._surface.innerHTML=C,u._syncToTextarea(),A(u.dom,"ln-editor:changed",{html:u._textarea.value,target:u.dom}))},a.addEventListener("ln-editor:set-content",this._onSetContent);const _=this._textarea.form;return _&&(this._onFormReset=function(){setTimeout(function(){u._surface.innerHTML=u._textarea.value,A(a,"ln-editor:changed",{html:u._textarea.value,target:a})},0)},_.addEventListener("reset",this._onFormReset)),this}d.prototype._syncToTextarea=function(){this._textarea&&(this._textarea.value=this._surface.innerHTML)},d.prototype._execAction=function(a){if(!(!a||se(this.dom,"ln-editor:before-change",{action:a,target:this.dom}).defaultPrevented)){if(this._surface.focus(),o[a])document.execCommand(o[a],!1,null);else if(s[a]){const f=s[a],h=m(this._surface);h&&h.toLowerCase()===f?document.execCommand("formatBlock",!1,"<p>"):document.execCommand("formatBlock",!1,"<"+f+">")}else i[a]?document.execCommand(i[a],!1,null):a==="link"?S(this):a==="unlink"?document.execCommand("unlink",!1,null):a==="clear"&&(document.execCommand("removeFormat",!1,null),document.execCommand("formatBlock",!1,"<p>"));this._syncToTextarea(),this._updateActiveStates()}},d.prototype._updateActiveStates=function(){const a=this.dom.querySelector('[role="toolbar"]');if(!a)return;const u=window.getSelection();if(!u||u.rangeCount===0)return;const f=u.anchorNode;if(!f||!this._surface.contains(f))return;const h=a.querySelectorAll("[data-ln-editor-action]");for(let g=0;g<h.length;g++){const p=h[g],_=p.getAttribute("data-ln-editor-action");let w=!1;if(o[_])try{w=document.queryCommandState(o[_])}catch{}else if(s[_]){const C=m(this._surface);w=C&&C.toLowerCase()===s[_]}else if(i[_])try{w=document.queryCommandState(i[_])}catch{}else _==="link"&&(w=!!b(u.anchorNode,"A",this._surface));l(_)&&p.setAttribute("aria-pressed",String(w)),w?p.classList.add("ln-editor-active"):p.classList.remove("ln-editor-active")}},d.prototype.getHTML=function(){return this._surface?this._surface.innerHTML:""},d.prototype.setHTML=function(a){this._surface&&(this._surface.innerHTML=a,this._syncToTextarea(),A(this.dom,"ln-editor:changed",{html:this._textarea.value,target:this.dom}))},d.prototype.destroy=function(){if(!this.dom[t])return;this._surface&&(this._surface.removeEventListener("input",this._onInput),this._surface.removeEventListener("paste",this._onPaste),this._surface.removeEventListener("keydown",this._onKeydown),this._surface.removeEventListener("focus",this._onFocus),this._surface.removeEventListener("blur",this._onBlur),this._surface.remove());const a=this.dom.querySelector('[role="toolbar"]');a&&(a.removeEventListener("mousedown",this._onMousedownToolbar),a.removeEventListener("click",this._onClickToolbar)),document.removeEventListener("selectionchange",this._onSelectionChange),this.dom.removeEventListener("ln-editor:set-content",this._onSetContent);const u=this._textarea?this._textarea.form:null;if(u&&this._onFormReset&&u.removeEventListener("reset",this._onFormReset),this._textarea&&(this._onTextareaInput&&this._textarea.removeEventListener("input",this._onTextareaInput),this._textarea.removeAttribute("data-ln-editor-source")),this._closeLinkPopover)this._closeLinkPopover();else{const f=this.dom.querySelector(".ln-editor__link-popover");f&&f.remove()}delete this.dom[t]};function m(a){const u=window.getSelection();if(!u||u.rangeCount===0)return null;let f=u.anchorNode;if(!f)return null;for(;f&&f!==a;){if(f.nodeType===1){const h=f.tagName;if(h==="H2"||h==="H3"||h==="H4"||h==="BLOCKQUOTE"||h==="PRE"||h==="P")return h}f=f.parentNode}return null}function b(a,u,f){for(;a&&a!==f;){if(a.nodeType===1&&a.tagName===u)return a;a=a.parentNode}return null}function v(a,u){u.preventDefault();let f="";if(u.clipboardData&&(f=u.clipboardData.getData("text/html"),!f)){const g=u.clipboardData.getData("text/plain");g&&(f=g.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\n\n/g,"</p><p>").replace(/\n/g,"<br>"),f="<p>"+f+"</p>")}if(!f)return;const h=F(f);h&&document.execCommand("insertHTML",!1,h)}function F(a){const u=document.createElement("div");return u.innerHTML=a,E(u),u.innerHTML}function E(a){const u=Array.from(a.childNodes);for(let f=0;f<u.length;f++){const h=u[f];if(h.nodeType!==3){if(h.nodeType!==1){a.removeChild(h);continue}if(r[h.tagName]){const g=Array.from(h.attributes);for(let p=0;p<g.length;p++){const _=g[p].name;if(h.tagName==="A"&&_==="href"){const w=h.getAttribute("href")||"";/^(https?:|mailto:|\/|#)/.test(w)||h.removeAttribute("href")}else h.removeAttribute(_)}h.tagName==="A"&&h.setAttribute("rel","noopener noreferrer"),E(h)}else{for(;h.firstChild;)a.insertBefore(h.firstChild,h);a.removeChild(h)}}}}function k(a,u){if(!(u.ctrlKey||u.metaKey))return;let f=null;switch(u.key.toLowerCase()){case"b":f="bold";break;case"i":f="italic";break;case"u":f="underline";break;case"k":f="link";break}f&&(u.preventDefault(),a._execAction(f))}function S(a){const u=window.getSelection();if(!u||u.rangeCount===0)return;const f=b(u.anchorNode,"A",a._surface),h=u.getRangeAt(0).cloneRange();a._closeLinkPopover&&a._closeLinkPopover();const g=me(a.dom,"ln-editor-link-popover","ln-editor");if(!g)return;const p=g.firstElementChild;if(!p)return;const _=p.querySelector('input[type="url"]'),w=p.querySelector('[data-ln-editor-action="confirm-link"]'),C=p.querySelector('[data-ln-editor-action="cancel-link"]');f&&(_.value=f.getAttribute("href")||"");const x=a.dom.querySelector('[role="toolbar"]');x?x.after(p):a.dom.insertBefore(p,a._surface),_.focus();function ne(){const y=window.getSelection();y.removeAllRanges(),y.addRange(h)}function O(){document.removeEventListener("mousedown",ie),a._closeLinkPopover=null,p.remove()}function re(){const y=_.value.trim();if(O(),ne(),a._surface.focus(),y)if(f)f.setAttribute("href",y),f.setAttribute("rel","noopener noreferrer"),a._syncToTextarea(),A(a.dom,"ln-editor:changed",{html:a._textarea.value,target:a.dom});else{document.execCommand("createLink",!1,y);const L=window.getSelection();if(L&&L.anchorNode){const le=b(L.anchorNode,"A",a._surface);le&&(le.setAttribute("rel","noopener noreferrer"),a._syncToTextarea())}}else f&&document.execCommand("unlink",!1,null)}function oe(){O(),ne(),a._surface.focus()}function $e(){O()}function ie(y){const L=a.dom.contains(y.target)&&y.target.closest('[data-ln-editor-action="link"]');!p.contains(y.target)&&!L&&$e()}a._closeLinkPopover=O,w.addEventListener("click",re),C.addEventListener("click",oe),_.addEventListener("keydown",function(y){y.key==="Enter"?(y.preventDefault(),re()):y.key==="Escape"&&(y.preventDefault(),oe())}),document.addEventListener("mousedown",ie)}ee(e,t,d,"ln-editor",{attributes:n})})()})();
@@ -1 +1 @@
1
- (function(){"use strict";function _(){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 g(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let l=null;for(let a=1;a<t.length;a++)if(t[a]&&t[a].nodeType===1){l=t[a];break}if(!g(l))return}e.apply(console,t)}}function b(e,t,n){const l=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,l),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:l}))}function w(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){w(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}const C={};function S(e,t){C[e]=t}function L(e){return C[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=S,window.lnCore.getDataMapper=L);function $(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,w(function(){new MutationObserver(function(){b(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const m={};function O(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];m[n]=t}function D(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=O,window.lnCore.getLocaleFallback=D,window.lnCore.ensureLocaleObserver=$);const h={};function E(e,t){h[e]||(h[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=h[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function y(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let o=0;o<n.length;o++){const i=n[o],r=i.getAttribute("data-ln-field");t[r]!=null&&(i.textContent=t[r])}const l=e.querySelectorAll("[data-ln-attr]");for(let o=0;o<l.length;o++){const i=l[o],r=i.getAttribute("data-ln-attr").split(",");for(let c=0;c<r.length;c++){const u=r[c].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();t[f]!=null&&i.setAttribute(d,t[f])}}const a=e.querySelectorAll("[data-ln-show]");for(let o=0;o<a.length;o++){const i=a[o],r=i.getAttribute("data-ln-show");r in t&&i.classList.toggle("hidden",!t[r])}const s=e.querySelectorAll("[data-ln-class]");for(let o=0;o<s.length;o++){const i=s[o],r=i.getAttribute("data-ln-class").split(",");for(let c=0;c<r.length;c++){const u=r[c].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();f in t&&i.classList.toggle(d,!!t[f])}}return e}function T(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 l=0;l<n.length;l++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[l],t??null),n[l].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)y(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function x(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(o,i){return t[i]!==void 0?t[i]:""}))}const l=function(s,o){return t[o]!==void 0?t[o]:""},a=Array.from(e.querySelectorAll("*"));e.nodeType===1&&a.push(e);for(let s=0;s<a.length;s++){const o=a[s],i=o.attributes;for(let r=0;r<i.length;r++){const c=i[r];c.value.indexOf("{{")!==-1&&o.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,l))}}return e}function I(e,t,n,l,a,s){const o={};for(let r=0;r<e.children.length;r++){const c=e.children[r],u=c.getAttribute("data-ln-render-key");u&&(o[u]=c)}const i=document.createDocumentFragment();for(let r=0;r<t.length;r++){const c=t[r],u=String(l(c));let d=o[u];if(d)a(d,c,r);else{const f=E(n,s);if(!f||(x(f,c),d=f.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",u),a(d,c,r)}i.appendChild(d)}e.textContent="",e.appendChild(i)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=x,window.lnCore.fill=y,window.lnCore.lnFill=T,window.lnCore.renderList=I);function F(e,t,n,l,a){if(!e||t===null)return!0;const s=l||"ln-component",o=e.type;if(o==="trigger"||o==="marker"||o==="string"||o==="list"||!o||t===""&&e.fallback!==void 0)return!0;const i=r=>{a?console.warn(r,a):console.warn(r)};if(o==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(i(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(o==="enum"){const r=e.values||[];return r.includes(t)?!0:(i(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(o==="integer"){if(!/^-?\d+$/.test(t))return i(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(i(`[${s}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(i(`[${s}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(o==="float")return isNaN(Number(t))?(i(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(o==="json")try{return JSON.parse(t),!0}catch(r){return i(`[${s}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function M(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 R(e,t,n,l){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",o=Array.from(e.querySelectorAll(s));e.matches&&e.matches(s)&&o.push(e);for(const i of o)if(!i[n]){window.lnCore._persistSink&&i.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(i,t);try{i[n]=new l(i)}catch(r){console.error("["+n+"] init failed",i,r)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function A(){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 W(e){const t=A(),n=e.observed||[];for(let l=0;l<n.length;l++){const a=n[l];t.byAttr.has(a)||t.byAttr.set(a,[]),t.byAttr.get(a).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const l in e.attributes){t.byDeclaredAttr.has(l)||t.byDeclaredAttr.set(l,[]);const a=t.byDeclaredAttr.get(l);a.some(s=>s.componentTag===e.componentTag)||a.push({spec:e.attributes[l],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const l=M(e);if(l===null)t.reactiveWildcard.push(e);else for(const a of l)t.byReactive.has(a)||t.byReactive.set(a,[]),t.byReactive.get(a).push(e)}e.persist&&t.persist.push(e)}function k(e,t,n,l){for(let a=0;a<e.length;a++){const s=e[a];if(!t[s.attribute])continue;const o=s.effects&&s.effects[n];o?o(t,n,l):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,l)}}function q(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const l=A(),a=l.byAttr.get(n);if(_()&&l.byDeclaredAttr&&l.byDeclaredAttr.has(n)&&g(t)){const s=l.byDeclaredAttr.get(n),o=t.getAttribute(n);for(let i=0;i<s.length;i++)F(s[i].spec,o,n,s[i].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||a)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const s=l.byReactive.get(n);s&&k(s,t,n,e.oldValue),l.reactiveWildcard.length&&k(l.reactiveWildcard,t,n,e.oldValue)}if(a)for(let s=0;s<a.length;s++){const o=a[s];if(o.handler){o.handler(t,n,e.oldValue);continue}o.onAttributeChange&&t[o.attribute]?o.onAttributeChange(t,n):(R(t,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(t))}}function B(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,w(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{q(t[n])}catch(l){console.error("[ln-core] mutation handler failed",t[n].target,l)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function V(e,t){W({observed:e,handler:t}),B()}function v(e){return(e||"").replace(/^#/,"")}function p(e){const t=e===void 0?location.hash:e,n={},l=v(t);if(!l)return n;const a=l.split("&");for(let s=0;s<a.length;s++){const o=a[s];if(!o)continue;const i=o.indexOf(":"),r=i>-1?o.slice(0,i):o,c=i>-1?o.slice(i+1):"";if(r)try{n[r]=decodeURIComponent(c)}catch{n[r]=c}}return n}function j(e){if(!e)return null;const t=p();return e in t?t[e]:null}function N(e,t){if(!e)return;const n=p();t==null?delete n[e]:n[e]=String(t);const a=Object.keys(n).map(function(s){const o=n[s];return o===""?s:s+":"+encodeURIComponent(o)}).join("&");v(location.hash)!==a&&(location.hash=a)}function U(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function H(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 l=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return l?t?l+"-"+t:l:t||null}function K(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function G(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 J(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Q(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),l=e.slice(t+1),a=l?l.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:a}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=p,window.lnCore.hashGet=j,window.lnCore.hashSet=N,window.lnCore.hashLinkClick=U,window.lnCore.resolveHashNamespace=H,window.lnCore.hashSortEncode=K,window.lnCore.hashSortDecode=G,window.lnCore.hashFilterEncode=J,window.lnCore.hashFilterDecode=Q);function z(){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=z),(function(){const e="lnExternalLinks";if(window[e]!==void 0)return;function t(i){return i.hostname&&i.hostname!==window.location.hostname}function n(i){if(i.getAttribute("data-ln-external-link")==="processed"||!t(i))return;i.target="_blank";const r=(i.rel||"").split(/\s+/).filter(Boolean);r.includes("noopener")||r.push("noopener"),r.includes("noreferrer")||r.push("noreferrer"),i.rel=r.join(" ");const c=document.createElement("span");c.className="sr-only",c.textContent="(opens in new tab)",i.appendChild(c),i.setAttribute("data-ln-external-link","processed"),b(i,"ln-external-links:processed",{link:i,href:i.href})}function l(i){i=i||document.body;for(const r of i.querySelectorAll("a, area"))n(r)}function a(){w(function(){document.body.addEventListener("click",function(i){const r=i.target.closest("a, area");r&&r.getAttribute("data-ln-external-link")==="processed"&&b(r,"ln-external-links:clicked",{link:r,href:r.href,text:r.textContent||r.title||""})})},"ln-external-links")}function s(){w(function(){new MutationObserver(function(r){for(const c of r)if(c.type==="childList"){for(const u of c.addedNodes)if(u.nodeType===1&&(u.matches&&(u.matches("a")||u.matches("area"))&&n(u),u.querySelectorAll))for(const d of u.querySelectorAll("a, area"))n(d)}}).observe(document.body,{childList:!0,subtree:!0}),V(["href"],function(r){r.matches&&(r.matches("a")||r.matches("area"))&&n(r)})},"ln-external-links")}function o(){a(),s(),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",function(){l()}):l()}window[e]={process:l},o()})()})();
1
+ (function(){"use strict";function I(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function C(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let i=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){i=t[l];break}if(!C(i))return}e.apply(console,t)}}function p(e,t,r){const i=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))}function w(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){w(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function N(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function T(e,t){const r=!!(t&&t.typed),i=t&&t.exclude,l={},a=e.elements,o={};if(r)for(let s=0;s<a.length;s++){const n=a[s];n.name&&n.type==="checkbox"&&!n.disabled&&(o[n.name]=(o[n.name]||0)+1)}for(let s=0;s<a.length;s++){const n=a[s];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(i&&n.matches&&n.matches(i)))if(n.type==="checkbox")r&&o[n.name]===1?l[n.name]=n.checked:(l[n.name]||(l[n.name]=[]),n.checked&&l[n.name].push(n.value));else if(n.type==="radio")n.checked&&(l[n.name]=n.value);else if(n.type==="select-multiple"){l[n.name]=[];for(let c=0;c<n.options.length;c++)n.options[c].selected&&l[n.name].push(n.options[c].value)}else if(r&&n.type==="hidden")l[n.name]=n.value;else if(r&&(n.type==="number"||n.type==="range")){const c=Number(n.value);l[n.name]=n.value===""||isNaN(c)?null:c}else l[n.name]=n.value}return l}function M(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function B(e,t){const r=e.elements,i=[],l={};for(let a=0;a<r.length;a++){const o=r[a];o.name&&o.type==="checkbox"&&(l[o.name]=(l[o.name]||0)+1)}for(let a=0;a<r.length;a++){const o=r[a];if(o.type==="file"||o.type==="submit"||o.type==="button")continue;const s=o.getAttribute("data-ln-fill-as")||o.name;if(!s||!(s in t))continue;const n=t[s];if(o.type==="checkbox"){if(Array.isArray(n))o.checked=n.indexOf(o.value)!==-1;else if(l[o.name]>1){const c=String(n).split(",").map(function(u){return u.trim()});o.checked=c.indexOf(o.value)!==-1}else o.checked=M(n);i.push(o)}else if(o.type==="radio")o.checked=o.value===String(n),i.push(o);else if(o.type==="select-multiple"){if(Array.isArray(n))for(let c=0;c<o.options.length;c++)o.options[c].selected=n.indexOf(o.options[c].value)!==-1;i.push(o)}else o.value=n,o.tagName==="SELECT"&&n!=null&&o.setAttribute("data-ln-value",n),i.push(o)}return i}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=B,window.lnCore.serializeForm=T,window.lnCore.resolveFormMethod=N);const y={};function R(e,t){y[e]=t}function j(e){return y[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=R,window.lnCore.getDataMapper=j);function q(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,w(function(){new MutationObserver(function(){p(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const x={};function W(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];x[r]=t}function V(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return x[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=W,window.lnCore.getLocaleFallback=V,window.lnCore.ensureLocaleObserver=q);const b={};function U(e,t){b[e]||(b[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=b[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function A(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let o=0;o<r.length;o++){const s=r[o],n=s.getAttribute("data-ln-field");t[n]!=null&&(s.textContent=t[n])}const i=e.querySelectorAll("[data-ln-attr]");for(let o=0;o<i.length;o++){const s=i[o],n=s.getAttribute("data-ln-attr").split(",");for(let c=0;c<n.length;c++){const u=n[c].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();t[f]!=null&&s.setAttribute(d,t[f])}}const l=e.querySelectorAll("[data-ln-show]");for(let o=0;o<l.length;o++){const s=l[o],n=s.getAttribute("data-ln-show");n in t&&s.classList.toggle("hidden",!t[n])}const a=e.querySelectorAll("[data-ln-class]");for(let o=0;o<a.length;o++){const s=a[o],n=s.getAttribute("data-ln-class").split(",");for(let c=0;c<n.length;c++){const u=n[c].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();f in t&&s.classList.toggle(d,!!t[f])}}return e}function H(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const r=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let i=0;i<r.length;i++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[i],t??null),r[i].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)A(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let r=0;r<t.length;r++)t[r].textContent=""}})));function k(e,t){if(!e||!t)return e;const r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const a=r.currentNode;a.textContent.indexOf("{{")!==-1&&(a.textContent=a.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(o,s){return t[s]!==void 0?t[s]:""}))}const i=function(a,o){return t[o]!==void 0?t[o]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let a=0;a<l.length;a++){const o=l[a],s=o.attributes;for(let n=0;n<s.length;n++){const c=s[n];c.value.indexOf("{{")!==-1&&o.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function J(e,t,r,i,l,a){const o={};for(let n=0;n<e.children.length;n++){const c=e.children[n],u=c.getAttribute("data-ln-render-key");u&&(o[u]=c)}const s=document.createDocumentFragment();for(let n=0;n<t.length;n++){const c=t[n],u=String(i(c));let d=o[u];if(d)l(d,c,n);else{const f=U(r,a);if(!f||(k(f,c),d=f.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",u),l(d,c,n)}s.appendChild(d)}e.textContent="",e.appendChild(s)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=k,window.lnCore.fill=A,window.lnCore.lnFill=H,window.lnCore.renderList=J);function h(e,t,r){const i=e.getAttribute(t);return i===null?r:i}function v(e,t,r){const i=parseInt(e.getAttribute(t),10);return isNaN(i)?r:i}function _(e,t,r=!1){const i=e.getAttribute(t);if(i===null)return!!r;const l=i.trim().toLowerCase();return!(l==="false"||l==="0")}function S(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const m=new Map;function L(e,t){const r=(e?e.join("|"):"")+"::"+t;if(m.has(r))return m.get(r);const i=new Set(e||[]),l=function(a,o){const s=a.getAttribute(o);return s!==null&&i.has(s)?s:t};return m.set(r,l),l}function O(e,t,r){const i=parseFloat(e.getAttribute(t));return isNaN(i)?r:i}function $(e,t,r){const i=e.getAttribute(t);if(!i)return r;try{return JSON.parse(i)}catch{return r}}function K(e,t,r,i,l){if(!e||t===null)return!0;const a=i||"ln-component",o=e.type;if(o==="trigger"||o==="marker"||o==="string"||o==="list"||!o||t===""&&e.fallback!==void 0)return!0;const s=n=>{l?console.warn(n,l):console.warn(n)};if(o==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(s(`[${a}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(o==="enum"){const n=e.values||[];return n.includes(t)?!0:(s(`[${a}] Invalid value "${t}" for attribute "${r}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(o==="integer"){if(!/^-?\d+$/.test(t))return s(`[${a}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(s(`[${a}] Value ${n} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(s(`[${a}] Value ${n} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(o==="float")return isNaN(Number(t))?(s(`[${a}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(o==="json")try{return JSON.parse(t),!0}catch(n){return s(`[${a}] Invalid JSON for attribute "${r}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function z(e,t,r){for(const i in r){const[l,a,o]=r[i];Object.defineProperty(e,i,{get:function(){return l(t,a,o)},enumerable:!0,configurable:!0})}return e}function G(e){const t={};for(const r in e){const i=e[r];if(!i||!i.prop)continue;let l=i.read;if(!l&&i.type)switch(i.type){case"enum":l=L(i.values,i.fallback);break;case"integer":l=v;break;case"float":l=O;break;case"boolean":l=_;break;case"list":l=S;break;case"json":l=$;break;case"string":default:l=h;break}l||(l=h),t[i.prop]=[l,r,i.fallback]}return t}function P(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const r in e.effects)t.add(r);if(e.onAttrChange&&e.declared)for(const r of e.declared)t.add(r);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=z,window.lnCore.attrSpec=G,window.lnCore.attrStr=h,window.lnCore.attrInt=v,window.lnCore.attrBool=_,window.lnCore.attrList=S,window.lnCore.attrEnum=L,window.lnCore.attrFloat=O,window.lnCore.attrJson=$);function Q(e,t,r,i){if(e.nodeType!==1)return;const a=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",o=Array.from(e.querySelectorAll(a));e.matches&&e.matches(a)&&o.push(e);for(const s of o)if(!s[r]){window.lnCore._persistSink&&s.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(s,t);try{s[r]=new i(s)}catch(n){console.error("["+r+"] init failed",s,n)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function E(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function X(e){const t=E(),r=e.observed||[];for(let i=0;i<r.length;i++){const l=r[i];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 i in e.attributes){t.byDeclaredAttr.has(i)||t.byDeclaredAttr.set(i,[]);const l=t.byDeclaredAttr.get(i);l.some(a=>a.componentTag===e.componentTag)||l.push({spec:e.attributes[i],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const i=P(e);if(i===null)t.reactiveWildcard.push(e);else for(const l of i)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function D(e,t,r,i){for(let l=0;l<e.length;l++){const a=e[l];if(!t[a.attribute])continue;const o=a.effects&&a.effects[r];o?o(t,r,i):a.onAttrChange&&(!a.declared||a.declared.has(r))&&a.onAttrChange(t,r,i)}}function Y(e){const t=e.target,r=e.attributeName;if(e.oldValue===t.getAttribute(r))return;const i=E(),l=i.byAttr.get(r);if(I()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(r)&&C(t)){const a=i.byDeclaredAttr.get(r),o=t.getAttribute(r);for(let s=0;s<a.length;s++)K(a[s].spec,o,r,a[s].componentTag,t)}if(window.lnCore._debugSink&&(r.indexOf("data-ln-")===0||l)&&window.lnCore._debugSink("attr",r,t,{oldValue:e.oldValue,newValue:t.getAttribute(r)}),r.indexOf("data-ln-")===0){const a=i.byReactive.get(r);a&&D(a,t,r,e.oldValue),i.reactiveWildcard.length&&D(i.reactiveWildcard,t,r,e.oldValue)}if(l)for(let a=0;a<l.length;a++){const o=l[a];if(o.handler){o.handler(t,r,e.oldValue);continue}o.onAttributeChange&&t[o.attribute]?o.onAttributeChange(t,r):(Q(t,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(t))}}function Z(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,w(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{Y(t[r])}catch(i){console.error("[ln-core] mutation handler failed",t[r].target,i)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function ee(e,t){X({observed:e,handler:t}),Z()}function F(e){return(e||"").replace(/^#/,"")}function g(e){const t=e===void 0?location.hash:e,r={},i=F(t);if(!i)return r;const l=i.split("&");for(let a=0;a<l.length;a++){const o=l[a];if(!o)continue;const s=o.indexOf(":"),n=s>-1?o.slice(0,s):o,c=s>-1?o.slice(s+1):"";if(n)try{r[n]=decodeURIComponent(c)}catch{r[n]=c}}return r}function te(e){if(!e)return null;const t=g();return e in t?t[e]:null}function ne(e,t){if(!e)return;const r=g();t==null?delete r[e]:r[e]=String(t);const l=Object.keys(r).map(function(a){const o=r[a];return o===""?a:a+":"+encodeURIComponent(o)}).join("&");F(location.hash)!==l&&(location.hash=l)}function re(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function oe(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const r=e.getAttribute("data-ln-hash");if(r&&r.trim()!=="")return r.trim();const i=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return i?t?i+"-"+t:i:t||null}function ie(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function le(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function se(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 r=e.slice(0,t),i=e.slice(t+1),l=i?i.split(",").map(function(a){try{return decodeURIComponent(a)}catch{return a}}).filter(Boolean):[];return{key:r,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=g,window.lnCore.hashGet=te,window.lnCore.hashSet=ne,window.lnCore.hashLinkClick=re,window.lnCore.resolveHashNamespace=oe,window.lnCore.hashSortEncode=ie,window.lnCore.hashSortDecode=le,window.lnCore.hashFilterEncode=se,window.lnCore.hashFilterDecode=ae);function ce(){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=ce),(function(){const e="lnExternalLinks";if(window[e]!==void 0)return;function t(s){return s.hostname&&s.hostname!==window.location.hostname}function r(s){if(s.getAttribute("data-ln-external-link")==="processed"||!t(s))return;s.target="_blank";const n=(s.rel||"").split(/\s+/).filter(Boolean);n.includes("noopener")||n.push("noopener"),n.includes("noreferrer")||n.push("noreferrer"),s.rel=n.join(" ");const c=document.createElement("span");c.className="sr-only",c.textContent="(opens in new tab)",s.appendChild(c),s.setAttribute("data-ln-external-link","processed"),p(s,"ln-external-links:processed",{link:s,href:s.href})}function i(s){s=s||document.body;for(const n of s.querySelectorAll("a, area"))r(n)}function l(){w(function(){document.body.addEventListener("click",function(s){const n=s.target.closest("a, area");n&&n.getAttribute("data-ln-external-link")==="processed"&&p(n,"ln-external-links:clicked",{link:n,href:n.href,text:n.textContent||n.title||""})})},"ln-external-links")}function a(){w(function(){new MutationObserver(function(n){for(const c of n)if(c.type==="childList"){for(const u of c.addedNodes)if(u.nodeType===1&&(u.matches&&(u.matches("a")||u.matches("area"))&&r(u),u.querySelectorAll))for(const d of u.querySelectorAll("a, area"))r(d)}}).observe(document.body,{childList:!0,subtree:!0}),ee(["href"],function(n){n.matches&&(n.matches("a")||n.matches("area"))&&r(n)})},"ln-external-links")}function o(){l(),a(),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",function(){i()}):i()}window[e]={process:i},o()})()})();
@@ -1 +1 @@
1
- (function(){"use strict";function x(n){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return n?window.lnCore._debugIsContained(n):window.lnCore._debugSink!==null;if(n&&n.closest){const e=n.closest("[data-ln-debug]");return!(!e||typeof document<"u"&&e===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 n=console.warn;console.warn=function(...e){if(typeof e[0]=="string"&&(e[0].startsWith("[ln-")||e[0].startsWith("[lnCore"))){let u=null;for(let s=1;s<e.length;s++)if(e[s]&&e[s].nodeType===1){u=e[s];break}if(!x(u))return}n.apply(console,e)}}function S(n,e,r){const u=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",e,n,u),n.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:u}))}function p(n,e){if(!document.body){document.addEventListener("DOMContentLoaded",function(){p(n,e)}),console.warn("["+e+'] Script loaded before <body> — add "defer" to your <script> tag');return}n()}const C={};function A(n,e){C[n]=e}function _(n){return C[n]||{ingress:e=>e,egress:e=>e}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=A,window.lnCore.getDataMapper=_);function k(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,p(function(){new MutationObserver(function(){S(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const g={};function E(n,e){if(!n||typeof e!="object")return;const r=n.toLowerCase().split("-")[0];g[r]=e}function L(n){if(!n)return null;const e=n.toLowerCase().split("-")[0];return g[e]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=E,window.lnCore.getLocaleFallback=L,window.lnCore.ensureLocaleObserver=k);const w={};function F(n,e){w[n]||(w[n]=document.querySelector('[data-ln-template="'+n+'"]'));const r=w[n];return r?r.content.cloneNode(!0):(console.warn("["+(e||"ln-core")+'] Template "'+n+'" not found'),null)}function b(n,e){if(!n||!e)return n;const r=n.querySelectorAll("[data-ln-field]");for(let t=0;t<r.length;t++){const i=r[t],o=i.getAttribute("data-ln-field");e[o]!=null&&(i.textContent=e[o])}const u=n.querySelectorAll("[data-ln-attr]");for(let t=0;t<u.length;t++){const i=u[t],o=i.getAttribute("data-ln-attr").split(",");for(let d=0;d<o.length;d++){const c=o[d].trim().split(":");if(c.length!==2)continue;const f=c[0].trim(),a=c[1].trim();e[a]!=null&&i.setAttribute(f,e[a])}}const s=n.querySelectorAll("[data-ln-show]");for(let t=0;t<s.length;t++){const i=s[t],o=i.getAttribute("data-ln-show");o in e&&i.classList.toggle("hidden",!e[o])}const l=n.querySelectorAll("[data-ln-class]");for(let t=0;t<l.length;t++){const i=l[t],o=i.getAttribute("data-ln-class").split(",");for(let d=0;d<o.length;d++){const c=o[d].trim().split(":");if(c.length!==2)continue;const f=c[0].trim(),a=c[1].trim();a in e&&i.classList.toggle(f,!!e[a])}}return n}function v(n,e){n.matches&&n.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n,e??null),n.dispatchEvent(new CustomEvent("ln-fill",{detail:e??null,bubbles:!0})));const r=n.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let u=0;u<r.length;u++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[u],e??null),r[u].dispatchEvent(new CustomEvent("ln-fill",{detail:e??null,bubbles:!0}));return n}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(n){if(!(!n.target.matches||!n.target.matches("[data-ln-fillable]")))if(n.detail)b(n.target,n.detail);else{const e=n.target.querySelectorAll("[data-ln-field]");for(let r=0;r<e.length;r++)e[r].textContent=""}})));function m(n,e){if(!n||!e)return n;const r=document.createTreeWalker(n,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const l=r.currentNode;l.textContent.indexOf("{{")!==-1&&(l.textContent=l.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(t,i){return e[i]!==void 0?e[i]:""}))}const u=function(l,t){return e[t]!==void 0?e[t]:""},s=Array.from(n.querySelectorAll("*"));n.nodeType===1&&s.push(n);for(let l=0;l<s.length;l++){const t=s[l],i=t.attributes;for(let o=0;o<i.length;o++){const d=i[o];d.value.indexOf("{{")!==-1&&t.setAttribute(d.name,d.value.replace(/\{\{\s*(\w+)\s*\}\}/g,u))}}return n}function D(n,e,r,u,s,l){const t={};for(let o=0;o<n.children.length;o++){const d=n.children[o],c=d.getAttribute("data-ln-render-key");c&&(t[c]=d)}const i=document.createDocumentFragment();for(let o=0;o<e.length;o++){const d=e[o],c=String(u(d));let f=t[c];if(f)s(f,d,o);else{const a=F(r,l);if(!a||(m(a,d),f=a.firstElementChild,!f))continue;f.setAttribute("data-ln-render-key",c),s(f,d,o)}i.appendChild(f)}n.textContent="",n.appendChild(i)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=m,window.lnCore.fill=b,window.lnCore.lnFill=v,window.lnCore.renderList=D),typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function y(n){return(n||"").replace(/^#/,"")}function h(n){const e=n===void 0?location.hash:n,r={},u=y(e);if(!u)return r;const s=u.split("&");for(let l=0;l<s.length;l++){const t=s[l];if(!t)continue;const i=t.indexOf(":"),o=i>-1?t.slice(0,i):t,d=i>-1?t.slice(i+1):"";if(o)try{r[o]=decodeURIComponent(d)}catch{r[o]=d}}return r}function I(n){if(!n)return null;const e=h();return n in e?e[n]:null}function O(n,e){if(!n)return;const r=h();e==null?delete r[n]:r[n]=String(e);const s=Object.keys(r).map(function(l){const t=r[l];return t===""?l:l+":"+encodeURIComponent(t)}).join("&");y(location.hash)!==s&&(location.hash=s)}function B(n){return n.button===1||n.ctrlKey||n.metaKey||n.shiftKey?!1:(n.preventDefault(),!0)}function T(n,e){if(!n||!n.hasAttribute("data-ln-hash"))return null;const r=n.getAttribute("data-ln-hash");if(r&&r.trim()!=="")return r.trim();const u=n.getAttribute("data-ln-sort")||n.getAttribute("data-ln-search-for")||n.getAttribute("data-ln-search")||n.getAttribute("data-ln-filter")||n.id;return u?e?u+"-"+e:u:e||null}function q(n,e){return!e||e==="none"||n===null||n===void 0?null:String(n)+"."+e}function M(n){return!n||typeof n!="string"?null:n.endsWith(".asc")?{fieldOrColumn:n.slice(0,-4),direction:"asc"}:n.endsWith(".desc")?{fieldOrColumn:n.slice(0,-5),direction:"desc"}:null}function W(n,e){return!n||!Array.isArray(e)||e.length===0?null:n+":"+e.map(encodeURIComponent).join(",")}function U(n){if(!n||typeof n!="string")return null;const e=n.indexOf(":");if(e===-1)return null;const r=n.slice(0,e),u=n.slice(e+1),s=u?u.split(",").map(function(l){try{return decodeURIComponent(l)}catch{return l}}).filter(Boolean):[];return{key:r,values:s}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=h,window.lnCore.hashGet=I,window.lnCore.hashSet=O,window.lnCore.hashLinkClick=B,window.lnCore.resolveHashNamespace=T,window.lnCore.hashSortEncode=q,window.lnCore.hashSortDecode=M,window.lnCore.hashFilterEncode=W,window.lnCore.hashFilterDecode=U);function j(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,n=>{const e=Math.random()*16|0;return(n==="x"?e:e&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=j),(function(){const n="lnFill";if(window[n]!==void 0)return;const e={lnFillForm:!0,lnFillStore:!0};function r(s){const l={},t=s.dataset;for(const i in t){if(!i.startsWith("lnFill")||e[i])continue;const o=i.slice(6);o&&(l[o.charAt(0).toLowerCase()+o.slice(1)]=t[i])}return l}function u(s,l){const t=window.CSS&&CSS.escape?CSS.escape(l):l,i=document.querySelectorAll('[data-ln-fill-id="'+t+'"]');if(i.length===0)return null;for(let o=0;o<i.length;o++){const d=i[o].getAttribute("data-ln-fill-form");if(d){const c=document.getElementById(d);if(c&&s.contains(c))return i[o]}}return i[0]}document.addEventListener("click",function(s){if(s.ctrlKey||s.metaKey||s.button===1)return;const l=s.target.closest("[data-ln-fill-form]");if(!l)return;const t=l.getAttribute("data-ln-fill-form"),i=document.getElementById(t);if(!i)return;const o=r(l),d=Object.keys(o).length>0;window.lnCore.lnFill(i,d?o:null)}),document.addEventListener("ln-fill:request",function(s){const l=s.detail;if(!l)return;const t=s.target,i=l.id;if(i==null){window.lnCore.lnFill(t,null);return}const o=u(t,i);if(!o)return;const d=r(o);window.lnCore.lnFill(t,d)}),window[n]=!0})()})();
1
+ (function(){"use strict";function L(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let l=null;for(let i=1;i<t.length;i++)if(t[i]&&t[i].nodeType===1){l=t[i];break}if(!L(l))return}e.apply(console,t)}}function O(e,t,r){const l=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,l),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:l}))}function C(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){C(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function I(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function D(e,t){const r=!!(t&&t.typed),l=t&&t.exclude,i={},u=e.elements,o={};if(r)for(let s=0;s<u.length;s++){const n=u[s];n.name&&n.type==="checkbox"&&!n.disabled&&(o[n.name]=(o[n.name]||0)+1)}for(let s=0;s<u.length;s++){const n=u[s];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(l&&n.matches&&n.matches(l)))if(n.type==="checkbox")r&&o[n.name]===1?i[n.name]=n.checked:(i[n.name]||(i[n.name]=[]),n.checked&&i[n.name].push(n.value));else if(n.type==="radio")n.checked&&(i[n.name]=n.value);else if(n.type==="select-multiple"){i[n.name]=[];for(let c=0;c<n.options.length;c++)n.options[c].selected&&i[n.name].push(n.options[c].value)}else if(r&&n.type==="hidden")i[n.name]=n.value;else if(r&&(n.type==="number"||n.type==="range")){const c=Number(n.value);i[n.name]=n.value===""||isNaN(c)?null:c}else i[n.name]=n.value}return i}function B(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function N(e,t){const r=e.elements,l=[],i={};for(let u=0;u<r.length;u++){const o=r[u];o.name&&o.type==="checkbox"&&(i[o.name]=(i[o.name]||0)+1)}for(let u=0;u<r.length;u++){const o=r[u];if(o.type==="file"||o.type==="submit"||o.type==="button")continue;const s=o.getAttribute("data-ln-fill-as")||o.name;if(!s||!(s in t))continue;const n=t[s];if(o.type==="checkbox"){if(Array.isArray(n))o.checked=n.indexOf(o.value)!==-1;else if(i[o.name]>1){const c=String(n).split(",").map(function(a){return a.trim()});o.checked=c.indexOf(o.value)!==-1}else o.checked=B(n);l.push(o)}else if(o.type==="radio")o.checked=o.value===String(n),l.push(o);else if(o.type==="select-multiple"){if(Array.isArray(n))for(let c=0;c<o.options.length;c++)o.options[c].selected=n.indexOf(o.options[c].value)!==-1;l.push(o)}else o.value=n,o.tagName==="SELECT"&&n!=null&&o.setAttribute("data-ln-value",n),l.push(o)}return l}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=N,window.lnCore.serializeForm=D,window.lnCore.resolveFormMethod=I);const b={};function j(e,t){b[e]=t}function M(e){return b[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=j,window.lnCore.getDataMapper=M);function T(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,C(function(){new MutationObserver(function(){O(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const g={};function q(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];g[r]=t}function U(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return g[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=q,window.lnCore.getLocaleFallback=U,window.lnCore.ensureLocaleObserver=T);const w={};function W(e,t){w[e]||(w[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=w[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function y(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let o=0;o<r.length;o++){const s=r[o],n=s.getAttribute("data-ln-field");t[n]!=null&&(s.textContent=t[n])}const l=e.querySelectorAll("[data-ln-attr]");for(let o=0;o<l.length;o++){const s=l[o],n=s.getAttribute("data-ln-attr").split(",");for(let c=0;c<n.length;c++){const a=n[c].trim().split(":");if(a.length!==2)continue;const d=a[0].trim(),f=a[1].trim();t[f]!=null&&s.setAttribute(d,t[f])}}const i=e.querySelectorAll("[data-ln-show]");for(let o=0;o<i.length;o++){const s=i[o],n=s.getAttribute("data-ln-show");n in t&&s.classList.toggle("hidden",!t[n])}const u=e.querySelectorAll("[data-ln-class]");for(let o=0;o<u.length;o++){const s=u[o],n=s.getAttribute("data-ln-class").split(",");for(let c=0;c<n.length;c++){const a=n[c].trim().split(":");if(a.length!==2)continue;const d=a[0].trim(),f=a[1].trim();f in t&&s.classList.toggle(d,!!t[f])}}return e}function K(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const r=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let l=0;l<r.length;l++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[l],t??null),r[l].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)y(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let r=0;r<t.length;r++)t[r].textContent=""}})));function x(e,t){if(!e||!t)return e;const r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const u=r.currentNode;u.textContent.indexOf("{{")!==-1&&(u.textContent=u.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(o,s){return t[s]!==void 0?t[s]:""}))}const l=function(u,o){return t[o]!==void 0?t[o]:""},i=Array.from(e.querySelectorAll("*"));e.nodeType===1&&i.push(e);for(let u=0;u<i.length;u++){const o=i[u],s=o.attributes;for(let n=0;n<s.length;n++){const c=s[n];c.value.indexOf("{{")!==-1&&o.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,l))}}return e}function R(e,t,r,l,i,u){const o={};for(let n=0;n<e.children.length;n++){const c=e.children[n],a=c.getAttribute("data-ln-render-key");a&&(o[a]=c)}const s=document.createDocumentFragment();for(let n=0;n<t.length;n++){const c=t[n],a=String(l(c));let d=o[a];if(d)i(d,c,n);else{const f=W(r,u);if(!f||(x(f,c),d=f.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",a),i(d,c,n)}s.appendChild(d)}e.textContent="",e.appendChild(s)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=x,window.lnCore.fill=y,window.lnCore.lnFill=K,window.lnCore.renderList=R);function p(e,t,r){const l=e.getAttribute(t);return l===null?r:l}function k(e,t,r){const l=parseInt(e.getAttribute(t),10);return isNaN(l)?r:l}function S(e,t,r=!1){const l=e.getAttribute(t);if(l===null)return!!r;const i=l.trim().toLowerCase();return!(i==="false"||i==="0")}function A(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const h=new Map;function v(e,t){const r=(e?e.join("|"):"")+"::"+t;if(h.has(r))return h.get(r);const l=new Set(e||[]),i=function(u,o){const s=u.getAttribute(o);return s!==null&&l.has(s)?s:t};return h.set(r,i),i}function _(e,t,r){const l=parseFloat(e.getAttribute(t));return isNaN(l)?r:l}function F(e,t,r){const l=e.getAttribute(t);if(!l)return r;try{return JSON.parse(l)}catch{return r}}function H(e,t,r){for(const l in r){const[i,u,o]=r[l];Object.defineProperty(e,l,{get:function(){return i(t,u,o)},enumerable:!0,configurable:!0})}return e}function J(e){const t={};for(const r in e){const l=e[r];if(!l||!l.prop)continue;let i=l.read;if(!i&&l.type)switch(l.type){case"enum":i=v(l.values,l.fallback);break;case"integer":i=k;break;case"float":i=_;break;case"boolean":i=S;break;case"list":i=A;break;case"json":i=F;break;case"string":default:i=p;break}i||(i=p),t[l.prop]=[i,r,l.fallback]}return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=H,window.lnCore.attrSpec=J,window.lnCore.attrStr=p,window.lnCore.attrInt=k,window.lnCore.attrBool=S,window.lnCore.attrList=A,window.lnCore.attrEnum=v,window.lnCore.attrFloat=_,window.lnCore.attrJson=F),typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function E(e){return(e||"").replace(/^#/,"")}function m(e){const t=e===void 0?location.hash:e,r={},l=E(t);if(!l)return r;const i=l.split("&");for(let u=0;u<i.length;u++){const o=i[u];if(!o)continue;const s=o.indexOf(":"),n=s>-1?o.slice(0,s):o,c=s>-1?o.slice(s+1):"";if(n)try{r[n]=decodeURIComponent(c)}catch{r[n]=c}}return r}function z(e){if(!e)return null;const t=m();return e in t?t[e]:null}function G(e,t){if(!e)return;const r=m();t==null?delete r[e]:r[e]=String(t);const i=Object.keys(r).map(function(u){const o=r[u];return o===""?u:u+":"+encodeURIComponent(o)}).join("&");E(location.hash)!==i&&(location.hash=i)}function P(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Q(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const r=e.getAttribute("data-ln-hash");if(r&&r.trim()!=="")return r.trim();const l=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return l?t?l+"-"+t:l:t||null}function V(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function X(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 Y(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Z(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const r=e.slice(0,t),l=e.slice(t+1),i=l?l.split(",").map(function(u){try{return decodeURIComponent(u)}catch{return u}}).filter(Boolean):[];return{key:r,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=m,window.lnCore.hashGet=z,window.lnCore.hashSet=G,window.lnCore.hashLinkClick=P,window.lnCore.resolveHashNamespace=Q,window.lnCore.hashSortEncode=V,window.lnCore.hashSortDecode=X,window.lnCore.hashFilterEncode=Y,window.lnCore.hashFilterDecode=Z);function $(){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=$),(function(){const e="lnFill";if(window[e]!==void 0)return;const t={lnFillForm:!0,lnFillStore:!0};function r(i){const u={},o=i.dataset;for(const s in o){if(!s.startsWith("lnFill")||t[s])continue;const n=s.slice(6);n&&(u[n.charAt(0).toLowerCase()+n.slice(1)]=o[s])}return u}function l(i,u){const o=window.CSS&&CSS.escape?CSS.escape(u):u,s=document.querySelectorAll('[data-ln-fill-id="'+o+'"]');if(s.length===0)return null;for(let n=0;n<s.length;n++){const c=s[n].getAttribute("data-ln-fill-form");if(c){const a=document.getElementById(c);if(a&&i.contains(a))return s[n]}}return s[0]}document.addEventListener("click",function(i){if(i.ctrlKey||i.metaKey||i.button===1)return;const u=i.target.closest("[data-ln-fill-form]");if(!u)return;const o=u.getAttribute("data-ln-fill-form"),s=document.getElementById(o);if(!s)return;const n=r(u),c=Object.keys(n).length>0;window.lnCore.lnFill(s,c?n:null)}),document.addEventListener("ln-fill:request",function(i){const u=i.detail;if(!u)return;const o=i.target,s=u.id;if(s==null){window.lnCore.lnFill(o,null);return}const n=l(o,s);if(!n)return;const c=r(n);window.lnCore.lnFill(o,c)}),window[e]=!0})()})();