PageSourceSearch

https://www.leidenconventionbureau.nl/build/8576.5ba67ce79eb2050200de.bundle.js

js leidenconventionbureau.nl collected 2026-10-06 01:59:42 UTC 61,982 bytes, 1 lines download raw bytes

1(self.webpackChunkkunstmaan_edition=self.webpackChunkkunstmaan_edition||[]).push([[8576],{758:(e,t,n)=>{var i={"./back-to-top-controller.js":5826,"./csrf_protection_controller.js":1899,"./distance-between-controller.js":2721,"./distance-controller.js":2994,"./distance-toggle-controller.js":2535,"./favorite-handle-controller.js":3150,"./modal-popup-controller.js":7299,"./node-favorite-load-controller.js":5269,"./recaptcha-controller.js":2954,"./splide-controller.js":1434,"./toggle-group-controller.js":1165};function s(e){var t=r(e);return n(t)}function r(e){if(!n.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}s.keys=function(){return Object.keys(i)},s.resolve=r,e.exports=s,s.id=758},1165:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var i=n(2891);const s=class extends i.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||n.e(5937).then(n.bind(n,5937)).then(e=>{this.application.register(this.identifier,e.default)})}}},1434:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var i=n(2891);const s=class extends i.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||n.e(902).then(n.bind(n,902)).then(e=>{this.application.register(this.identifier,e.default)})}}},1899:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var i=n(2891);const s=class extends i.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||n.e(5575).then(n.bind(n,5575)).then(e=>{this.application.register(this.identifier,e.default)})}}},2535:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var i=n(2891);const s=class extends i.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||n.e(9451).then(n.bind(n,9451)).then(e=>{this.application.register(this.identifier,e.default)})}}},2721:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var i=n(2891);const s=class extends i.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||n.e(2685).then(n.bind(n,2685)).then(e=>{this.application.register(this.identifier,e.default)})}}},2954:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var i=n(2891),s=n(3249);const r=class extends i.xI{static values={siteKey:String};async connect(){const e=this.element.closest('[data-controller~="live"]'),t=await(0,s.QQ)(e);this.run(t)}run(e){window.grecaptcha?this.execute(e):window.addEventListener("recaptchaLoaded",()=>this.execute(e),{once:!0})}async execute(e){grecaptcha.ready(()=>{grecaptcha.execute(this.siteKeyValue,{action:"login"}).then(e=>{this.element.value=e,this.element.dispatchEvent(new Event("input",{bubbles:!0}))})})}}},2994:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var i=n(2891);const s=class extends i.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||n.e(9686).then(n.bind(n,9686)).then(e=>{this.application.register(this.identifier,e.default)})}}},3150:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var i=n(2891);const s=class extends i.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||n.e(4778).then(n.bind(n,4778)).then(e=>{this.application.register(this.identifier,e.default)})}}},3249:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>z,QQ:()=>h});var i=n(2891),s=class{constructor(e,t,n){this.isResolved=!1,this.promise=e,this.promise.then(e=>(this.isResolved=!0,e)),this.actions=t,this.updatedModels=n}containsOneOfActions(e){return this.actions.filter(t=>e.includes(t)).length>0}areAnyModelsUpdated(e){return this.updatedModels.filter(t=>e.includes(t)).length>0}},r=class{constructor(e,t="post",n="same-origin"){this.url=e,this.method=t,this.credentials=n}buildRequest(e,t,n,i,s,r){const o=this.url.split("?");let[a]=o;const[,l]=o,c=new URLSearchParams(l||""),d={};d.credentials=this.credentials,d.headers={Accept:"application/vnd.live-component+html","X-Requested-With":"XMLHttpRequest","X-Live-Url":window.location.pathname+window.location.search};const h=Object.entries(r).reduce((e,t)=>
1e+t.length,0),u=Object.keys(i).length>0;if(0===t.length&&0===h&&"get"===this.method&&this.willDataFitInUrl(JSON.stringify(e),JSON.stringify(n),c,JSON.stringify(i),JSON.stringify(s)))c.set("props",JSON.stringify(e)),c.set("updated",JSON.stringify(n)),Object.keys(s).length>0&&c.set("propsFromParent",JSON.stringify(s)),u&&c.set("children",JSON.stringify(i)),d.method="GET";else{d.method="POST";const o={props:e,updated:n};Object.keys(s).length>0&&(o.propsFromParent=s),u&&(o.children=i),t.length>0&&(1===t.length?(o.args=t[0].args,a+=`/${encodeURIComponent(t[0].name)}`):(a+="/_batch",o.actions=t));const l=new FormData;l.append("data",JSON.stringify(o));for(const[e,t]of Object.entries(r)){const n=t.length;for(let i=0;i<n;++i)l.append(e,t[i])}d.body=l}const m=c.toString();return{url:`${a}${m.length>0?`?${m}`:""}`,fetchOptions:d}}willDataFitInUrl(e,t,n,i,s){return(new URLSearchParams(e+t+i+s).toString()+n.toString()).length<1500}},o=class{constructor(e,t="post",n="same-origin"){this.requestBuilder=new r(e,t,n)}makeRequest(e,t,n,i,r,o){const{url:a,fetchOptions:l}=this.requestBuilder.buildRequest(e,t,n,i,r,o);return new s(fetch(a,l),t.map(e=>e.name),Object.keys(n))}},a=class{constructor(e){this.response=e}async getBody(){return this.body||(this.body=await this.response.text()),this.body}getLiveUrl(){return void 0===this.liveUrl&&(this.liveUrl=this.response.headers.get("X-Live-Url")),this.liveUrl}};function l(e){return e.innerHTML?e.outerHTML.slice(0,e.outerHTML.indexOf(e.innerHTML)):e.outerHTML}let c=new WeakMap,d=new Map;const h=e=>new Promise((t,n)=>{let i=0;const s=setInterval(()=>{const r=c.get(e);r&&(clearInterval(s),t(r)),i++,i>10&&(clearInterval(s),n(new Error(`Component not found for element ${l(e)}`)))},5)});function u(e){const t=[];if(!e)return t;let n="",i="",s=[],r=[],o="action";const a=()=>{if(n)return n;if(0===t.length)throw new Error("Could not find any directives");return t[t.length-1].action},l=()=>{t.push({action:n,args:s,modifiers:r,getString:()=>e}),n="",i="",s=[],r=[],o="action"},c=()=>{s.push(i.trim()),i=""},d=()=>{if(s.length>1)throw new Error(`The modifier "${n}()" does not support multiple arguments.`);r.push({name:n,value:s.length>0?s[0]:null}),n="",s=[],o="action"};for(let t=0;t<e.length;t++){const s=e[t];switch(o){case"action":if("("===s){o="arguments";break}if(" "===s){n&&l();break}if("|"===s){d();break}n+=s;break;case"arguments":if(")"===s){c(),o="after_arguments";break}if(","===s){c();break}i+=s;break;case"after_arguments":if("|"===s){d();break}if(" "!==s)throw new Error(`Missing space after ${a()}()`);l()}}switch(o){case"action":case"after_arguments":n&&l();break;default:throw new Error(`Did you forget to add a closing ")" after "${n}"?`)}return t}function m(e){const t=[];return e.forEach(e=>{var n;t.push(...(n=e,n.replace(/[\s]+/g," ").trim()).split(" "))}),t}function p(e){return e.replace(/\[]$/,"").split("[").map(e=>e.replace("]","")).join(".")}function f(e,t){if(e instanceof HTMLInputElement){if("checkbox"===e.type){const n=b(e,!1);if(null!==n){const i=t.get(n.action);if(Array.isArray(i))return w(e,i);if(Object(i)===i)return w(e,Object.values(i))}return e.hasAttribute("value")?e.checked?e.getAttribute("value"):null:e.checked}return A(e)}return e instanceof HTMLSelectElement?e.multiple?Array.from(e.selectedOptions).map(e=>e.value):e.value:e.hasAttribute("data-value")?e.dataset.value:"value"in e?e.value:e.hasAttribute("value")?e.getAttribute("value"):null}function g(e,t){if(e instanceof HTMLInputElement){if("file"===e.type)return;if("radio"===e.type)return void(e.checked=e.value==t);if("checkbox"===e.type)return void(Array.isArray(t)?e.checked=t.some(t=>t==e.value):e.hasAttribute("value")?e.checked=e.value==t:e.checked=t)}if(e instanceof HTMLSelectElement){const n=[].concat(t).map(e=>`${e}`);return void Array.from(e.options).forEach(e=>{e.selected=n.includes(e.value)})}t=void 0===t?"":t,e.value=t}function v(e){if(!e.dataset.model)return[];const t=u(e.dataset.model);return t.forEach(t=>{if(t.args.length>0)throw new Error(`The data-model="${e.dataset.model}" format is invalid: it does not support passing arguments to the model.`);t.action=p(t.action)}),t}function b(e,t=!0){const n=v(e);if(n.length>0)return n[0];if(e.getAttribute("name")){const t=e.closest("form");if(t&&"model"in t.dataset){const n=u(t.dataset.model||"*")[0];if(n.args.length>0)throw new Error(`The data-model="${t.dataset.model}
1" format is invalid: it does not support passing arguments to the model.`);return n.action=p(e.getAttribute("name")),n}}if(!t)return null;throw new Error(`Cannot determine the model name for "${l(e)}": the element must either have a "data-model" (or "name" attribute living inside a <form data-model="*">).`)}function y(e,t){return t.element===e||!!t.element.contains(e)&&e.closest('[data-controller~="live"]')===t.element}function E(e){const t=e.cloneNode(!0);if(!(t instanceof HTMLElement))throw new Error("Could not clone element");return t}const w=(e,t)=>{const n=[...t],i=A(e),s=t.indexOf(i);return e.checked?(-1===s&&n.push(i),n):(s>-1&&n.splice(s,1),n)},A=e=>e.dataset.value?e.dataset.value:e.value;var M=class{constructor(){this.hooks=new Map}register(e,t){const n=this.hooks.get(e)||[];n.push(t),this.hooks.set(e,n)}unregister(e,t){const n=this.hooks.get(e)||[],i=n.indexOf(t);-1!==i&&(n.splice(i,1),this.hooks.set(e,n))}triggerHook(e,...t){(this.hooks.get(e)||[]).forEach(e=>{e(...t)})}},S=function(){let e=new Set,t={morphStyle:"outerHTML",callbacks:{beforeNodeAdded:d,afterNodeAdded:d,beforeNodeMorphed:d,afterNodeMorphed:d,beforeNodeRemoved:d,afterNodeRemoved:d,beforeAttributeUpdated:d},head:{style:"merge",shouldPreserve:function(e){return"true"===e.getAttribute("im-preserve")},shouldReAppend:function(e){return"true"===e.getAttribute("im-re-append")},shouldRemove:d,afterHeadMorphed:d}};function n(e,t,i){if(i.head.block){let s=e.querySelector("head"),r=t.querySelector("head");if(s&&r){let o=l(r,s,i);return void Promise.all(o).then(function(){n(e,t,Object.assign(i,{head:{block:!1,ignore:!0}}))})}}if("innerHTML"===i.morphStyle)return r(t,e,i),e.children;if("outerHTML"===i.morphStyle||null==i.morphStyle){let n=function(e,t,n){let i;i=e.firstChild;let s=i,r=0;for(;i;){let e=g(i,t,n);e>r&&(s=i,r=e),i=i.nextSibling}return s}(t,e,i),r=n?.previousSibling,o=n?.nextSibling,a=s(e,n,i);return n?function(e,t,n){let i=[],s=[];for(;null!=e;)i.push(e),e=e.previousSibling;for(;i.length>0;){let e=i.pop();s.push(e),t.parentElement.insertBefore(e,t)}for(s.push(t);null!=n;)i.push(n),s.push(n),n=n.nextSibling;for(;i.length>0;)t.parentElement.insertBefore(i.pop(),t.nextSibling);return s}(r,a,o):[]}throw"Do not understand how to morph style "+i.morphStyle}function i(e,t){return t.ignoreActiveValue&&e===document.activeElement}function s(e,t,n){if(!n.ignoreActive||e!==document.activeElement)return null==t?!1===n.callbacks.beforeNodeRemoved(e)?e:(e.remove(),n.callbacks.afterNodeRemoved(e),null):u(e,t)?(!1===n.callbacks.beforeNodeMorphed(e,t)||(e instanceof HTMLHeadElement&&n.head.ignore||(e instanceof HTMLHeadElement&&"morph"!==n.head.style?l(t,e,n):(function(e,t,n){let s=e.nodeType;if(1===s){const i=e.attributes,s=t.attributes;for(const e of i)o(e.name,t,"update",n)||t.getAttribute(e.name)!==e.value&&t.setAttribute(e.name,e.value);for(let i=s.length-1;0<=i;i--){const r=s[i];o(r.name,t,"remove",n)||e.hasAttribute(r.name)||t.removeAttribute(r.name)}}8!==s&&3!==s||t.nodeValue!==e.nodeValue&&(t.nodeValue=e.nodeValue),i(t,n)||function(e,t,n){if(e instanceof HTMLInputElement&&t instanceof HTMLInputElement&&"file"!==e.type){let i=e.value,s=t.value;a(e,t,"checked",n),a(e,t,"disabled",n),e.hasAttribute("value")?i!==s&&(o("value",t,"update",n)||(t.setAttribute("value",i),t.value=i)):o("value",t,"remove",n)||(t.value="",t.removeAttribute("value"))}else if(e instanceof HTMLOptionElement)a(e,t,"selected",n);else if(e instanceof HTMLTextAreaElement&&t instanceof HTMLTextAreaElement){let i=e.value,s=t.value;if(o("value",t,"update",n))return;i!==s&&(t.value=i),t.firstChild&&t.firstChild.nodeValue!==i&&(t.firstChild.nodeValue=i)}}(e,t,n)}(t,e,n),i(e,n)||r(t,e,n))),n.callbacks.afterNodeMorphed(e,t)),e):!1===n.callbacks.beforeNodeRemoved(e)||!1===n.callbacks.beforeNodeAdded(t)?e:(e.parentElement.replaceChild(t,e),n.callbacks.afterNodeAdded(t),n.callbacks.afterNodeRemoved(e),t)}function r(e,t,n){let i,r=e.firstChild,o=t.firstChild;for(;r;){if(i=r,r=i.nextSibling,null==o){if(!1===n.callbacks.beforeNodeAdded(i))return;t.appendChild(i),n.callbacks.afterNodeAdded(i),E(n,i);continue}if(h(i,o,n)){s(o,i,n),o=o.nextSibling,E(n,i);continue}let a=p(e,t,i,o,n);if(a){o=m(o,a,n),s(a,i,n),E(n,i);continue}let l=f(e,0,i,o,n);if(l)o=m(o,l,n),s(l,i,n),E(n,i);else{if(!1===n.callbacks.beforeNodeAdded(i))return;t.insertBefore(i,o),n.callbacks.afterNodeAdded(i),E(n,i)}}for(;null!==o;){let e=o;o=o.nextSibling,v(e,n)}}function o(e,t,n,i){return!("value"!==e||!i.ignoreActiveValue||t!==document.activeElement)||!1===i.callbacks.beforeAttributeUpdated(e,t,n)}function a(e,t,n,i){if(e[n]!==t[n]){let s=o(n,t,"update",i);s||(t[n]=e[n]),e[n]?s||t.setAttribute(n,e[n]):o(n,t,"remove",i)||t.removeAttribute(n)}}
1function l(e,t,n){let i=[],s=[],r=[],o=[],a=n.head.style,l=new Map;for(const t of e.children)l.set(t.outerHTML,t);for(const e of t.children){let t=l.has(e.outerHTML),i=n.head.shouldReAppend(e),c=n.head.shouldPreserve(e);t||c?i?s.push(e):(l.delete(e.outerHTML),r.push(e)):"append"===a?i&&(s.push(e),o.push(e)):!1!==n.head.shouldRemove(e)&&s.push(e)}o.push(...l.values());let d=[];for(const e of o){c();let s=document.createRange().createContextualFragment(e.outerHTML).firstChild;if(c(),!1!==n.callbacks.beforeNodeAdded(s)){if(s.href||s.src){let e=null,t=new Promise(function(t){e=t});s.addEventListener("load",function(){e()}),d.push(t)}t.appendChild(s),n.callbacks.afterNodeAdded(s),i.push(s)}}for(const e of s)!1!==n.callbacks.beforeNodeRemoved(e)&&(t.removeChild(e),n.callbacks.afterNodeRemoved(e));return n.head.afterHeadMorphed(t,{added:i,kept:r,removed:s}),d}function c(){}function d(){}function h(e,t,n){return null!=e&&null!=t&&e.nodeType===t.nodeType&&e.tagName===t.tagName&&(""!==e.id&&e.id===t.id||w(n,e,t)>0)}function u(e,t){return null!=e&&null!=t&&e.nodeType===t.nodeType&&e.tagName===t.tagName}function m(e,t,n){for(;e!==t;){let t=e;e=e.nextSibling,v(t,n)}return E(n,t),t.nextSibling}function p(e,t,n,i,s){let r=w(s,n,t);if(r>0){let t=i,o=0;for(;null!=t;){if(h(n,t,s))return t;if(o+=w(s,t,e),o>r)return null;t=t.nextSibling}}return null}function f(e,t,n,i,s){let r=i,o=n.nextSibling,a=0;for(;null!=r;){if(w(s,r,e)>0)return null;if(u(n,r))return r;if(u(o,r)&&(a++,o=o.nextSibling,a>=2))return null;r=r.nextSibling}return r}function g(e,t,n){return u(e,t)?.5+w(n,e,t):0}function v(e,t){E(t,e),!1!==t.callbacks.beforeNodeRemoved(e)&&(e.remove(),t.callbacks.afterNodeRemoved(e))}function b(e,t){return!e.deadIds.has(t)}function y(t,n,i){return(t.idMap.get(i)||e).has(n)}function E(t,n){let i=t.idMap.get(n)||e;for(const e of i)t.deadIds.add(e)}function w(t,n,i){let s=t.idMap.get(n)||e,r=0;for(const e of s)b(t,e)&&y(t,e,i)&&++r;return r}function A(e,t){let n=e.parentElement,i=e.querySelectorAll("[id]");for(const e of i){let i=e;for(;i!==n&&null!=i;){let n=t.get(i);null==n&&(n=new Set,t.set(i,n)),n.add(e.id),i=i.parentElement}}}function M(e,t){let n=new Map;return A(e,n),A(t,n),n}return{morph:function(e,i,s={}){e instanceof Document&&(e=e.documentElement),"string"==typeof i&&(i=function(e){let t=new DOMParser,n=e.replace(/<svg(\s[^>]*>|>)([\s\S]*?)<\/svg>/gim,"");if(n.match(/<\/html>/)||n.match(/<\/head>/)||n.match(/<\/body>/)){let i=t.parseFromString(e,"text/html");if(n.match(/<\/html>/))return i.generatedByIdiomorph=!0,i;{let e=i.firstChild;return e?(e.generatedByIdiomorph=!0,e):null}}{let n=t.parseFromString("<body><template>"+e+"</template></body>","text/html").body.querySelector("template").content;return n.generatedByIdiomorph=!0,n}}(i));let r=function(e){if(null==e)return document.createElement("div");if(e.generatedByIdiomorph)return e;if(e instanceof Node){const t=document.createElement("div");return t.append(e),t}{const t=document.createElement("div");for(const n of[...e])t.append(n);return t}}(i),o=function(e,n,i){return{target:e,newContent:n,config:i=function(e){let n={};return Object.assign(n,t),Object.assign(n,e),n.callbacks={},Object.assign(n.callbacks,t.callbacks),Object.assign(n.callbacks,e.callbacks),n.head={},Object.assign(n.head,t.head),Object.assign(n.head,e.head),n}(i),morphStyle:i.morphStyle,ignoreActive:i.ignoreActive,ignoreActiveValue:i.ignoreActiveValue,idMap:M(e,n),deadIds:new Set,callbacks:i.callbacks,head:i.head}}(e,r,s);return n(e,r,o)},defaults:t}}();function k(e){e instanceof HTMLInputElement&&"file"===e.type||("value"in e?e.setAttribute("value",e.value):e.hasAttribute("value")&&e.setAttribute("value","")),Array.from(e.children).forEach(e=>{k(e)})}var C=class{constructor(){this.changedItems=new Map,this.removedItems=new Map}setItem(e,t,n){if(this.removedItems.has(e)){const n=this.removedItems.get(e);if(this.removedItems.delete(e),n.original===t)return}if(this.changedItems.has(e)){const n=this.changedItems.get(e);return n.original===t?void this.changedItems.delete(e):void this.changedItems.set(e,{original:n.original,new:t})}this.changedItems.set(e,{original:n,new:t})}removeItem(e,t){let n=t;this.changedItems.has(e)&&(n=this.changedItems.get(e).original,this.changedItems.delete(e),null===n)||this.removedItems.has(e)||this.removedItems.set(e,{original:n})}getChangedItems(){return Array.from(this.changedItems,([e,{new:t}])=>({name:e,value:t}))}getRemovedItems(){return Array.from(this.removedItems.keys())}isEmpty(){return 0===this.changedItems.size&&0===this.removedItems.size}}
1,T=class{constructor(){this.addedClasses=new Set,this.removedClasses=new Set,this.styleChanges=new C,this.attributeChanges=new C}addClass(e){this.removedClasses.delete(e)||this.addedClasses.add(e)}removeClass(e){this.addedClasses.delete(e)||this.removedClasses.add(e)}addStyle(e,t,n){this.styleChanges.setItem(e,t,n)}removeStyle(e,t){this.styleChanges.removeItem(e,t)}addAttribute(e,t,n){this.attributeChanges.setItem(e,t,n)}removeAttribute(e,t){this.attributeChanges.removeItem(e,t)}getAddedClasses(){return[...this.addedClasses]}getRemovedClasses(){return[...this.removedClasses]}getChangedStyles(){return this.styleChanges.getChangedItems()}getRemovedStyles(){return this.styleChanges.getRemovedItems()}getChangedAttributes(){return this.attributeChanges.getChangedItems()}getRemovedAttributes(){return this.attributeChanges.getRemovedItems()}applyToElement(e){e.classList.add(...this.addedClasses),e.classList.remove(...this.removedClasses),this.styleChanges.getChangedItems().forEach(t=>{/!\s*important/i.test(t.value)?e.style.setProperty(t.name,t.value.replace(/!\s*important/i,"").trim(),"important"):e.style.setProperty(t.name,t.value)}
1),this.styleChanges.getRemovedItems().forEach(t=>{e.style.removeProperty(t)}),this.attributeChanges.getChangedItems().forEach(t=>{e.setAttribute(t.name,t.value)}),this.attributeChanges.getRemovedItems().forEach(t=>{e.removeAttribute(t)})}isEmpty(){return 0===this.addedClasses.size&&0===this.removedClasses.size&&this.styleChanges.isEmpty()&&this.attributeChanges.isEmpty()}},L=class{constructor(e,t){this.changedElements=new WeakMap,this.changedElementsCount=0,this.addedElements=[],this.removedElements=[],this.isStarted=!1,this.element=e,this.shouldTrackChangeCallback=t,this.mutationObserver=new MutationObserver(this.onMutations.bind(this))}start(){this.isStarted||(this.mutationObserver.observe(this.element,{childList:!0,subtree:!0,attributes:!0,attributeOldValue:!0}),this.isStarted=!0)}stop(){this.isStarted&&(this.mutationObserver.disconnect(),this.isStarted=!1)}getChangedElement(e){return this.changedElements.has(e)?this.changedElements.get(e):null}getAddedElements(){return this.addedElements}wasElementAdded(e){return this.addedElements.includes(e)}handlePendingChanges(){this.onMutations(this.mutationObserver.takeRecords())}onMutations(e){const t=new WeakMap;for(const n of e){const e=n.target;if(!this.shouldTrackChangeCallback(e))continue;if(this.isElementAddedByTranslation(e))continue;let i=!1;for(const t of this.addedElements)if(t.contains(e)){i=!0;break}if(!i)switch(n.type){case"childList":this.handleChildListMutation(n);break;case"attributes":t.has(e)||t.set(e,[]),t.get(e).includes(n.attributeName)||(this.handleAttributeMutation(n),t.set(e,[...t.get(e),n.attributeName]))}}}handleChildListMutation(e){e.addedNodes.forEach(e=>{e instanceof Element&&(this.removedElements.includes(e)?this.removedElements.splice(this.removedElements.indexOf(e),1):this.isElementAddedByTranslation(e)||this.addedElements.push(e))}),e.removedNodes.forEach(e=>{e instanceof Element&&(this.addedElements.includes(e)?this.addedElements.splice(this.addedElements.indexOf(e),1):this.removedElements.push(e))})}handleAttributeMutation(e){const t=e.target;this.changedElements.has(t)||(this.changedElements.set(t,new T),this.changedElementsCount++);const n=this.changedElements.get(t);switch(e.attributeName){case"class":this.handleClassAttributeMutation(e,n);break;case"style":this.handleStyleAttributeMutation(e,n);break;default:this.handleGenericAttributeMutation(e,n)}n.isEmpty()&&(this.changedElements.delete(t),this.changedElementsCount--)}handleClassAttributeMutation(e,t){const n=e.target,i=(e.oldValue||"").match(/(\S+)/gu)||[],s=[].slice.call(n.classList),r=s.filter(e=>!i.includes(e)),o=i.filter(e=>!s.includes(e));r.forEach(e=>{t.addClass(e)}),o.forEach(e=>{t.removeClass(e)})}handleStyleAttributeMutation(e,t){const n=e.target,i=e.oldValue||"",s=this.extractStyles(i),r=n.getAttribute("style")||"",o=this.extractStyles(r),a=Object.keys(o).filter(e=>void 0===s[e]||s[e]!==o[e]),l=Object.keys(s).filter(e=>!o[e]);a.forEach(e=>{t.addStyle(e,o[e],void 0===s[e]?null:s[e])}),l.forEach(e=>{t.removeStyle(e,s[e])})}handleGenericAttributeMutation(e,t){const n=e.attributeName,i=e.target;let s=e.oldValue,r=i.getAttribute(n);if(s===n&&(s=""),r===n&&(r=""),i.hasAttribute(n))r!==s&&t.addAttribute(n,i.getAttribute(n),e.oldValue);else{if(null===s)return;t.removeAttribute(n,e.oldValue)}}extractStyles(e){const t={};return e.split(";").forEach(e=>{const n=e.split(":");if(1===n.length)return;const i=n[0].trim();t[i]=n.slice(1).join(":").trim()}),t}isElementAddedByTranslation(e){return"FONT"===e.tagName&&"vertical-align: inherit;"===e.getAttribute("style")}},x=class{constructor(e,t){this.elementEventListeners=[{event:"input",callback:e=>this.handleInputEvent(e)}],this.component=e,this.modelElementResolver=t,this.unsyncedInputs=new P}activate(){this.elementEventListeners.forEach(({event:e,callback:t})=>{this.component.element.addEventListener(e,t)})}deactivate(){this.elementEventListeners.forEach(({event:e,callback:t})=>{this.component.element.removeEventListener(e,t)})}markModelAsSynced(e){this.unsyncedInputs.markModelAsSynced(e)}handleInputEvent(e){const t=e.target;t&&this.updateModelFromElement(t)}updateModelFromElement(e){if(!y(e,this.component))return;if(!(e instanceof HTMLElement))throw new Error("Could not update model for non HTMLElement");const t=this.modelElementResolver.getModelName(e);this.unsyncedInputs.add(e,t)}getUnsyncedInputs(){return this.unsyncedInputs.allUnsyncedInputs()}getUnsyncedModels(){return Array.from(this.unsyncedInputs.getUnsyncedModelNames())}resetUnsyncedFields(){this.unsyncedInputs.resetUnsyncedFields()}},P=class{constructor(){this.unsyncedNonModelFields=[],this.unsyncedModelNames=[],this.unsyncedModelFields=new Map}add(e,t=null){if(t)return this.unsyncedModelFields.set(t,e),void(this.unsyncedModelNames.includes(t)||this.unsyncedModelNames.push(t));this.unsyncedNonModelFields.push(e)}resetUnsyncedFields(){this.unsyncedModelFields.forEach((e,t)=>{this.unsyncedModelNames.includes(t)||this.unsyncedModelFields.delete(t)})}allUnsyncedInputs(){return[...this.unsyncedNonModelFields,...this.unsyncedModelFields.values()]}markModelAsSynced(e){const t=this.unsyncedModelNames.indexOf(e);-1!==t&&this.unsyncedModelNames.splice(t,1)}getUnsyncedModelNames(){return this.unsyncedModelNames}};var O=class{constructor(e){this.props={},this.dirtyProps={},this.pendingProps={},this.updatedPropsFromParent={},this.props=e}get(e){const t=p(e);return void 0!==this.dirtyProps[t]?this.dirtyProps[t]:void 0!==this.pendingProps[t]?this.pendingProps[t]:void 0!==this.props[t]?this.props[t]:function(e,t){const{currentLevelData:n,finalKey:i}=((e,t)=>{const n=JSON.parse(JSON.stringify(e));let i=n;const s=t.split(".");for(let e=0;e<s.length-1;e++)i=i[s[e]];return{currentLevelData:i,finalData:n,finalKey:s[s.length-1],parts:s}})(e,t);if(void 0!==n)return n[i]}(this.props,t)}has(e){return void 0!==this.get(e)}set(e,t){const n=p(e);return this.get(n)!==t&&(this.dirtyProps[n]=t,!0)}getOriginalProps(){return{...this.props}}getDirtyProps(){return{...this.dirtyProps}}getUpdatedPropsFromParent(){return{...this.updatedPropsFromParent}}flushDirtyPropsToPending(){this.pendingProps={...this.dirtyProps},this.dirtyProps={}}reinitializeAllProps(e){this.props=e,this.updatedPropsFromParent={},this.pendingProps={}}pushPendingPropsBackToDirty(){this.dirtyProps={...this.pendingProps,...this.dirtyProps},this.pendingProps={}}storeNewPropsFromParent(e){let t=!1;for(const[n,i]of Object.entries(e))this.get(n)!==i&&(t=!0);return t&&(this.updatedPropsFromParent=e),t}},I=class{constructor(e,t,n,i,s,r,o){this.fingerprint="",this.defaultDebounce=150,this.backendRequest=null,this.pendingActions=[],this.pendingFiles={},this.isRequestPending=!1,this.requestDebounceTimeout=null,this.element=e,this.name=t,this.backend=r,this.elementDriver=o,this.id=s,this.listeners=new Map,i.forEac
1h(e=>{this.listeners.has(e.event)||this.listeners.set(e.event,[]),this.listeners.get(e.event)?.push(e.action)}),this.valueStore=new O(n),this.unsyncedInputsTracker=new x(this,o),this.hooks=new M,this.resetPromise(),this.externalMutationTracker=new L(this.element,e=>y(e,this)),this.externalMutationTracker.start()}addPlugin(e){e.attachToComponent(this)}connect(){var e;e=this,c.set(e.element,e),d.set(e,e.name),this.hooks.triggerHook("connect",this),this.unsyncedInputsTracker.activate(),this.externalMutationTracker.start()}disconnect(){c.delete(this.element),d.delete(this),this.hooks.triggerHook("disconnect",this),this.clearRequestDebounceTimeout(),this.unsyncedInputsTracker.deactivate(),this.externalMutationTracker.stop()}on(e,t){this.hooks.register(e,t)}off(e,t){this.hooks.unregister(e,t)}set(e,t,n=!1,i=!1){const s=this.nextRequestPromise,r=p(e);if(!this.valueStore.has(r))throw new Error(`Invalid model name "${e}".`);const o=this.valueStore.set(r,t);return this.hooks.triggerHook("model:set",e,t,this),this.unsyncedInputsTracker.markModelAsSynced(r),n&&o&&this.debouncedStartRequest(i),s}getData(e){const t=p(e);if(!this.valueStore.has(t))throw new Error(`Invalid model "${e}".`);return this.valueStore.get(t)}action(e,t={},n=!1){const i=this.nextRequestPromise;return this.pendingActions.push({name:e,args:t}),this.debouncedStartRequest(n),i}files(e,t){this.pendingFiles[e]=t}render(){const e=this.nextRequestPromise;return this.tryStartingRequest(),e}getUnsyncedModels(){return this.unsyncedInputsTracker.getUnsyncedModels()}emit(e,t,n=null){this.performEmit(e,t,!1,n)}emitUp(e,t,n=null){this.performEmit(e,t,!0,n)}emitSelf(e,t){this.doEmit(e,t)}performEmit(e,t,n,i){((e,t,n)=>{const i=[];return d.forEach((s,r)=>{(!t||e!==r&&r.element.contains(e.element))&&(n&&s!==n||i.push(r))}),i})(this,n,i).forEach(n=>{n.doEmit(e,t)})}doEmit(e,t){this.listeners.has(e)&&(this.listeners.get(e)||[]).forEach(e=>{this.action(e,t,1)})}isTurboEnabled(){return"undefined"!=typeof Turbo&&!this.element.closest('[data-turbo="false"]')}tryStartingRequest(){this.backendRequest?this.isRequestPending=!0:this.performRequest()}performRequest(){const e=this.nextRequestPromiseResolve;this.resetPromise(),this.unsyncedInputsTracker.resetUnsyncedFields();const t={};for(const[e,n]of Object.entries(this.pendingFiles))n.files&&(t[e]=n.files);const n=this.pendingActions.slice(0,50),i=this.pendingActions.slice(50),s={props:this.valueStore.getOriginalProps(),actions:n,updated:this.valueStore.getDirtyProps(),children:{},updatedPropsFromParent:this.valueStore.getUpdatedPropsFromParent(),files:t};this.hooks.triggerHook("request:started",s),this.backendRequest=this.backend.makeRequest(s.props,s.actions,s.updated,s.children,s.updatedPropsFromParent,s.files),this.hooks.triggerHook("loading.state:started",this.element,this.backendRequest),this.pendingActions=i,this.valueStore.flushDirtyPropsToPending(),this.isRequestPending=i.length>0,this.backendRequest.promise.then(async t=>{const n=new a(t),i=await n.getBody();for(const e of Object.values(this.pendingFiles))e.value="";const s=n.response.headers;if(!s.get("Content-Type")?.includes("application/vnd.live-component+html")&&!s.get("X-Live-Redirect")){const s={displayError:!0};return this.valueStore.pushPendingPropsBackToDirty(),this.hooks.triggerHook("response:error",n,s),s.displayError&&this.renderError(i),this.backendRequest=null,e(n),t}const r=n.getLiveUrl();return r&&history.replaceState(history.state,"",new URL(r+window.location.hash,window.location.origin)),this.processRerender(i,n),this.backendRequest=null,e(n),this.isRequestPending&&(this.isRequestPending=!1,this.performRequest()),t})}processRerender(e,t){const n={shouldRender:!0};if(this.hooks.triggerHook("render:started",e,t,n),!n.shouldRender)return;if(t.response.headers.get("Location"))return void(this.isTurboEnabled()?Turbo.visit(t.response.headers.get("Location")):window.location.href=t.response.headers.get("Location")||"");this.hooks.triggerHook("loading.state:finished",this.element);const i={};let s;Object.keys(this.valueStore.getDirtyProps()).forEach(e=>{i[e]=this.valueStore.get(e)});try{if(s=function(e){const t=document.createElement("template");if(e=e.trim(),t.innerHTML=e,t.content.childElementCount>1)throw new Error(`Component HTML contains ${t.content.childElementCount} elements, but only 1 root element is allowed.`);const n=t.content.firstElementChild;if(!n)throw new Error("Child not found");if(!(n instanceof HTMLElement))throw new Error(`Created element is not an HTMLElement: ${e.trim()}`);return n}(e),!s.matches("[data-controller~=live]"))throw new Error("A live component template must contain a single root controller element.")}catch(e){throw console.error(`There was a problem with the '${this.name}' component HTML returned:`,{id:this.id}),e}this.externalMutationTracker.handlePendingChanges(),this.externalMutationTracker.stop(),function(e,t,n,i,s){const r=[],o=new Map,a=(e,t)=>{const n=o.get(e);if(!(n instanceof HTMLElement))throw new Error(`Original element with id ${e} not found`);if(r.push(e),!t)return null;const i=E(n);return n.replaceWith(i),i};t.querySelectorAll("[data-live-preserve]").forEach(t=>{const n=t.id;if(!n)throw new Error("The data-live-preserve attribute requires an id attribute to be set on the element");const i=e.querySelector(`#${n}`);if(!(i instanceof HTMLElement))throw new Error(`The element with id "${n}" was not found in the original HTML`);t.removeAttribute("data-live-preserve"),o.set(n,i),((e,t)=>{for(let n=0;n<e.attributes.length;n++){const i=e.attributes[n];t.setAttribute(i.name,i.value)}})(t,i)}),S.morph(e,t,{callbacks:{beforeNodeMorphed:(t,r)=>{if(!(t instanceof Element&&r instanceof Element))return!0;
1if(t===e)return!0;if(t.id&&o.has(t.id)){if(t.id===r.id)return!1;const e=a(t.id,!0);if(!e)throw new Error("missing clone");return S.morph(e,r),!1}if(t instanceof HTMLElement&&r instanceof HTMLElement){if(void 0!==t.__x){if(!window.Alpine)throw new Error("Unable to access Alpine.js though the global window.Alpine variable. Please make sure Alpine.js is loaded before Symfony UX LiveComponent.");if("function"!=typeof window.Alpine.morph)throw new Error("Unable to access Alpine.js morph function. Please make sure the Alpine.js Morph plugin is installed and loaded, see https://alpinejs.dev/plugins/morph for more information.");window.Alpine.morph(t.__x,r)}if(s.wasElementAdded(t))return t.insertAdjacentElement("afterend",r),!1;n.includes(t)&&g(r,i(t)),t===document.activeElement&&t!==document.body&&null!==b(t,!1)&&g(r,i(t));const e=s.getChangedElement(t);if(e&&e.applyToElement(r),"OPTION"!==t.nodeName.toUpperCase()&&t.isEqualNode(r)){const e=E(t);k(e);const n=E(r);if(k(n),e.isEqualNode(n))return!1}}return t.hasAttribute("data-skip-morph")||t.id&&t.id!==r.id?(t.innerHTML=r.innerHTML,!0):!t.parentElement?.hasAttribute("data-skip-morph")&&!t.hasAttribute("data-live-ignore")},beforeNodeRemoved:e=>
1!(e instanceof HTMLElement&&(e.id&&o.has(e.id)?(a(e.id,!1),0):s.wasElementAdded(e)||e.hasAttribute("data-live-ignore")))}}),r.forEach(t=>{const n=e.querySelector(`#${t}`),i=o.get(t);if(!(n instanceof HTMLElement&&i instanceof HTMLElement))throw new Error("Missing elements.");n.replaceWith(i)})}(this.element,s,this.unsyncedInputsTracker.getUnsyncedInputs(),e=>f(e,this.valueStore),this.externalMutationTracker),this.externalMutationTracker.start();const r=this.elementDriver.getComponentProps();this.valueStore.reinitializeAllProps(r);const o=this.elementDriver.getEventsToEmit(),a=this.elementDriver.getBrowserEventsToDispatch();Object.keys(i).forEach(e=>{this.valueStore.set(e,i[e])}),o.forEach(({event:e,data:t,target:n,componentName:i})=>{"up"!==n?"self"!==n?this.emit(e,t,i):this.emitSelf(e,t):this.emitUp(e,t,i)}),a.forEach(({event:e,payload:t})=>{this.element.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0}))}),this.hooks.triggerHook("render:finished",this)}calculateDebounce(e){return!0===e?this.defaultDebounce:!1===e?0:e}clearRequestDebounceTimeout(){this.requestDebounceTimeout&&(clearTimeout(this.requestDebounceTimeout),this.requestDebounceTimeout=null)}debouncedStartRequest(e){this.clearRequestDebounceTimeout(),this.requestDebounceTimeout=window.setTimeout(()=>{this.render()},this.calculateDebounce(e))}renderError(e){let t=document.getElementById("live-component-error");t?t.innerHTML="":(t=document.createElement("div"),t.id="live-component-error",t.style.padding="50px",t.style.backgroundColor="rgba(0, 0, 0, .5)",t.style.zIndex="100000",t.style.position="fixed",t.style.top="0px",t.style.bottom="0px",t.style.left="0px",t.style.right="0px",t.style.display="flex",t.style.flexDirection="column");const n=document.createElement("iframe");n.style.borderRadius="5px",n.style.flexGrow="1",t.appendChild(n),document.body.prepend(t),document.body.style.overflow="hidden",n.contentWindow&&(n.contentWindow.document.open(),n.contentWindow.document.write(e),n.contentWindow.document.close());const i=e=>{e&&(e.outerHTML=""),document.body.style.overflow="visible"};t.addEventListener("click",()=>i(t)),t.setAttribute("tabindex","0"),t.addEventListener("keydown",e=>{"Escape"===e.key&&i(t)}),t.focus()}resetPromise(){this.nextRequestPromise=new Promise(e=>{this.nextRequestPromiseResolve=e})}_updateFromParentProps(e){this.valueStore.storeNewPropsFromParent(e)&&this.render()}},N=class{constructor(e){this.controller=e}getModelName(e){const t=b(e,!1);return t?t.action:null}getComponentProps(){return this.controller.propsValue}getEventsToEmit(){return this.controller.eventsToEmitValue}getBrowserEventsToDispatch(){return this.controller.eventsToDispatchValue}};function R(e){let t=!0,n=null,i=!1,s=null,r=null,o=null,a=null;e.modifiers.forEach(l=>{switch(l.name){case"on":if(!l.value)throw new Error(`The "on" modifier in ${e.getString()} requires a value - e.g. on(change).`);if(!["input","change"].includes(l.value))throw new Error(`The "on" modifier in ${e.getString()} only accepts the arguments "input" or "change".`);n=l.value;break;case"norender":t=!1;break;case"debounce":i=!l.value||Number.parseInt(l.value);break;case"min_length":s=l.value?Number.parseInt(l.value):null;break;case"max_length":r=l.value?Number.parseInt(l.value):null;break;case"min_value":o=l.value?Number.parseFloat(l.value):null;break;case"max_value":a=l.value?Number.parseFloat(l.value):null;break;default:throw new Error(`Unknown modifier "${l.name}" in data-model="${e.getString()}".`)}});const[l,c]=e.action.split(":");return{modelName:l,innerModelName:c||null,shouldRender:t,debounce:i,targetEventName:n,minLength:s,maxLength:r,minValue:o,maxValue:a}}var H=class{constructor(e){this.parentModelBindings=[],this.component=e,this.parentModelBindings=v(this.component.element).map(R)}attachToComponent(e){e.on("request:started",e=>{e.children=this.getChildrenFingerprints()}),e.on("model:set",(e,t)=>{this.notifyParentModelChange(e,t)})}getChildrenFingerprints(){const e={};
1return this.getChildren().forEach(t=>{if(!t.id)throw new Error("missing id");e[t.id]={fingerprint:t.fingerprint,tag:t.element.tagName.toLowerCase()}}),e}notifyParentModelChange(e,t){const n=(()=>{let e=this.component.element.parentElement;for(;e;){const t=c.get(e);if(t)return t;e=e.parentElement}return null})();n&&this.parentModelBindings.forEach(i=>{(i.innerModelName||"value")===e&&n.set(i.modelName,t,i.shouldRender,i.debounce)})}getChildren(){return(e=>{const t=[];return d.forEach((n,i)=>{if(e===i)return;if(!e.element.contains(i.element))return;let s=!1;d.forEach((e,t)=>{s||t!==i&&t.element.contains(i.element)&&(s=!0)}),t.push(i)}),t})(this.component)}},F=class{constructor(){this.intersectionObserver=null}attachToComponent(e){"lazy"===e.element.attributes.getNamedItem("loading")?.value&&(e.on("connect",()=>{this.getObserver().observe(e.element)}),e.on("disconnect",()=>{this.intersectionObserver?.unobserve(e.element)}))}getObserver(){return this.intersectionObserver||(this.intersectionObserver=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&(e.target.dispatchEvent(new CustomEvent("live:appear")),t.unobserve(e.target))})})),this.intersectionObserver}},_=class{attachToComponent(e){e.on("loading.state:started",(t,n)=>{this.startLoading(e,t,n)}),e.on("loading.state:finished",t=>{this.finishLoading(e,t)}),this.finishLoading(e,e.element)}startLoading(e,t,n){this.handleLoadingToggle(e,!0,t,n)}finishLoading(e,t){this.handleLoadingToggle(e,!1,t,null)}handleLoadingToggle(e,t,n,i){t?this.addAttributes(n,["busy"]):this.removeAttributes(n,["busy"]),this.getLoadingDirectives(e,n).forEach(({element:e,directives:n})=>{t?this.addAttributes(e,["data-live-is-loading"]):this.removeAttributes(e,["data-live-is-loading"]),n.forEach(n=>{this.handleLoadingDirective(e,t,n,i)})})}handleLoadingDirective(e,t,n,i){const s=V(n.action,t),r=[],o=[];let a=0;const l=new Map;if(l.set("delay",e=>{t&&(a=e.value?Number.parseInt(e.value):200)}),l.set("action",e=>{if(!e.value)throw new Error(`The "action" in data-loading must have an action name - e.g. action(foo). It's missing for "${n.getString()}"`);r.push(e.value)}),l.set("model",e=>{if(!e.value)throw new Error(`The "model" in data-loading must have an action name - e.g. model(foo). It's missing for "${n.getString()}"`);o.push(e.value)}),n.modifiers.forEach(e=>{if(!l.has(e.name))throw new Error(`Unknown modifier "${e.name}" used in data-loading="${n.getString()}". Available modifiers are: ${Array.from(l.keys()).join(", ")}.`);(l.get(e.name)??(()=>{}))(e)}),t&&r.length>0&&i&&!i.containsOneOfActions(r))return;if(t&&o.length>0&&i&&!i.areAnyModelsUpdated(o))return;let c;switch(s){case"show":c=()=>this.showElement(e);break;case"hide":c=()=>this.hideElement(e);break;case"addClass":c=()=>this.addClass(e,n.args);break;case"removeClass":c=()=>this.removeClass(e,n.args);break;case"addAttribute":c=()=>this.addAttributes(e,n.args);break;case"removeAttribute":c=()=>this.removeAttributes(e,n.args);break;default:throw new Error(`Unknown data-loading action "${s}"`)}a?window.setTimeout(()=>{i&&!i.isResolved&&c()},a):c()}getLoadingDirectives(e,t){const n=[];let i=Array.from(t.querySelectorAll("[data-loading]"));return i=i.filter(t=>
1y(t,e)),t.hasAttribute("data-loading")&&(i=[t,...i]),i.forEach(e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))throw new Error("Invalid Element Type");const t=u(e.dataset.loading||"show");n.push({element:e,directives:t})}),n}showElement(e){e.style.display="revert"}hideElement(e){e.style.display="none"}addClass(e,t){e.classList.add(...m(t))}removeClass(e,t){e.classList.remove(...m(t)),0===e.classList.length&&e.removeAttribute("class")}addAttributes(e,t){t.forEach(t=>{e.setAttribute(t,"")})}removeAttributes(e,t){t.forEach(t=>{e.removeAttribute(t)})}};const V=(e,t)=>{switch(e){case"show":return t?"show":"hide";case"hide":return t?"hide":"show";case"addClass":return t?"addClass":"removeClass";case"removeClass":return t?"removeClass":"addClass";case"addAttribute":return t?"addAttribute":"removeAttribute";case"removeAttribute":return t?"removeAttribute":"addAttribute"}throw new Error(`Unknown data-loading action "${e}"`)};var $=class{constructor(){this.isConnected=!1}attachToComponent(e){e.on("render:started",(e,t,n)=>{this.isConnected||(n.shouldRender=!1)}),e.on("connect",()=>{this.isConnected=!0}),e.on("disconnect",()=>{this.isConnected=!1})}},q=class{constructor(e){this.isPollingActive=!0,this.pollingIntervals=[],this.component=e}addPoll(e,t){this.polls.push({actionName:e,duration:t}),this.isPollingActive&&this.initiatePoll(e,t)}startAllPolling(){this.isPollingActive||(this.isPollingActive=!0,this.polls.forEach(({actionName:e,duration:t})=>{this.initiatePoll(e,t)}))}stopAllPolling(){this.isPollingActive=!1,this.pollingIntervals.forEach(e=>{clearInterval(e)})}clearPolling(){this.stopAllPolling(),this.polls=[],this.startAllPolling()}initiatePoll(e,t){let n;n="$render"===e?()=>{this.component.render()}:()=>{this.component.action(e,{},0)};const i=window.setInterval(()=>{n()},t);this.pollingIntervals.push(i)}},D=class{attachToComponent(e){this.element=e.element,this.pollingDirector=new q(e),this.initializePolling(),e.on("connect",()=>{this.pollingDirector.startAllPolling()}),e.on("disconnect",()=>{this.pollingDirector.stopAllPolling()}),e.on("render:finished",()=>{this.initializePolling()})}addPoll(e,t){this.pollingDirector.addPoll(e,t)}clearPolling(){this.pollingDirector.clearPolling()}initializePolling(){if(this.clearPolling(),void 0===this.element.dataset.poll)return;const e=this.element.dataset.poll;u(e||"$render").forEach(t=>{let n=2e3;t.modifiers.forEach(t=>{"delay"===t.name?t.value&&(n=Number.parseInt(t.value)):console.warn(`Unknown modifier "${t.name}" in data-poll "${e}".`)}),this.addPoll(t.action,n)})}},j=class{attachToComponent(e){this.synchronizeValueOfModelFields(e),e.on("render:finished",()=>{this.synchronizeValueOfModelFields(e)})}synchronizeValueOfModelFields(e){e.element.querySelectorAll("[data-model]").forEach(t=>{if(!(t instanceof HTMLElement))throw new Error("Invalid element using data-model.");if(t instanceof HTMLFormElement)return;if(!y(t,e))return;const n=b(t);if(!n)return;const i=n.action;e.getUnsyncedModels().includes(i)||(e.valueStore.has(i)&&g(t,e.valueStore.get(i)),t instanceof HTMLSelectElement&&!t.multiple&&e.valueStore.set(i,f(t,e.valueStore)))})}},U=class{attachToComponent(e){e.on("model:set",t=>{this.handleModelSet(t,e.valueStore)})}handleModelSet(e,t){if(t.has("validatedFields")){const n=[...t.get("validatedFields")];n.includes(e)||n.push(e),t.set("validatedFields",n)}}},z=class e extends i.xI{constructor(...e){super(...e),this.pendingActionTriggerModelElement=null,this.elementEventListeners=[{event:"input",callback:e=>this.handleInputEvent(e)},{event:"change",callback:e=>this.handleChangeEvent(e)}],this.pendingFiles={}}initialize(){this.mutationObserver=new MutationObserver(this.onMutations.bind(this)),this.createComponent()}connect(){this.connectComponent(),this.mutationObserver.observe(this.element,{attributes:!0})}disconnect(){this.disconnectComponent(),this.mutationObserver.disconnect()}update(e){if("input"===e.type||"change"===e.type)throw new Error(`Since LiveComponents 2.3, you no longer need data-action="live#update" on form elements. Found on element: ${l(e.currentTarget)}`);this.updateModelFromElementEvent(e.currentTarget,null)}action(e){const t=e.params;if(!t.action)throw new Error(`No action name provided on element: ${l(e.currentTarget)}. Did you forget to add the "data-live-action-param" attribute?`);const n=t.action,i={...t};delete i.action;const s=u(n);let r=!1;
1s.forEach(t=>{let s={};const o=new Map;o.set("stop",()=>{e.stopPropagation()}),o.set("self",()=>{e.target,e.currentTarget}),o.set("debounce",e=>{r=!e.value||Number.parseInt(e.value)}),o.set("files",e=>{e.value?this.pendingFiles[e.value]&&(s[e.value]=this.pendingFiles[e.value]):s=this.pendingFiles}),t.modifiers.forEach(e=>{o.has(e.name)?(o.get(e.name)??(()=>{}))(e):console.warn(`Unknown modifier ${e.name} in action "${n}". Available modifiers are: ${Array.from(o.keys()).join(", ")}.`)});for(const[e,t]of Object.entries(s))t.files&&this.component.files(e,t),delete this.pendingFiles[e];this.component.action(t.action,i,r),b(e.currentTarget,!1)&&(this.pendingActionTriggerModelElement=e.currentTarget)})}$render(){return this.component.render()}emit(e){this.getEmitDirectives(e).forEach(({name:e,data:t,nameMatch:n})=>{this.component.emit(e,t,n)})}emitUp(e){this.getEmitDirectives(e).forEach(({name:e,data:t,nameMatch:n})=>{this.component.emitUp(e,t,n)})}emitSelf(e){this.getEmitDirectives(e).forEach(({name:e,data:t})=>{this.component.emitSelf(e,t)})}$updateModel(e,t,n=!0,i=!0){return this.component.set(e,t,n,i)}propsUpdatedFromParentValueChanged(){this.component._updateFromParentProps(this.propsUpdatedFromParentValue)}fingerprintValueChanged(){this.component.fingerprint=this.fingerprintValue}getEmitDirectives(e){const t=e.params;if(!t.event)throw new Error(`No event name provided on element: ${l(e.currentTarget)}. Did you forget to add the "data-live-event-param" attribute?`);const n=t.event,i={...t};delete i.event;const s=u(n),r=[];return s.forEach(e=>{let t=null;e.modifiers.forEach(e=>{if("name"!==e.name)throw new Error(`Unknown modifier ${e.name} in event "${n}".`);t=e.value}),r.push({name:e.action,data:i,nameMatch:t})}),r}createComponent(){const t=this.element.id||null;var n;this.component=new I(this.element,this.nameValue,this.propsValue,this.listenersValue,t,e.backendFactory(this),new N(this)),this.proxiedComponent=(n=this.component,new Proxy(n,{get(e,t){if(t in e||"string"!=typeof t){if("function"==typeof e[t]){const n=e[t];return(...t)=>n.apply(e,t)}return Reflect.get(e,t)}return e.valueStore.has(t)?e.getData(t):n=>e.action.apply(e,[t,n])},set:(e,t,n)=>t in e?(e[t]=n,!0):(e.set(t,n),!0)})),Object.defineProperty(this.element,"__component",{value:this.proxiedComponent,writable:!0}),this.hasDebounceValue&&(this.component.defaultDebounce=this.debounceValue),[new _,new F,new U,new $,new D,new j,new H(this.component)].forEach(e=>{this.component.addPlugin(e)})}connectComponent(){this.component.connect(),this.mutationObserver.observe(this.element,{attributes:!0}),this.elementEventListeners.forEach(({event:e,callback:t})=>{this.component.element.addEventListener(e,t)}),this.dispatchEvent("connect")}disconnectComponent(){this.component.disconnect(),this.elementEventListeners.forEach(({event:e,callback:t})=>{this.component.element.removeEventListener(e,t)}),this.dispatchEvent("disconnect")}handleInputEvent(e){const t=e.target;t&&this.updateModelFromElementEvent(t,"input")}handleChangeEvent(e){const t=e.target;t&&this.updateModelFromElementEvent(t,"change")}updateModelFromElementEvent(e,t){if(!y(e,this.component))return;if(!(e instanceof HTMLElement))throw new Error("Could not update model for non HTMLElement");if(e instanceof HTMLInputElement&&"file"===e.type){const t=e.name;e.files?.length?this.pendingFiles[t]=e:this.pendingFiles[t]&&delete this.pendingFiles[t]}const n=b(e,!1);if(!n)return;const i=R(n);if(i.targetEventName||(i.targetEventName="input"),this.pendingActionTriggerModelElement===e&&(i.shouldRender=!1),"change"===t&&"input"===i.targetEventName&&(i.targetEventName="change"),t&&i.targetEventName!==t)return;!1===i.debounce&&("input"===i.targetEventName?i.debounce=!0:i.debounce=0);const s=f(e,this.component.valueStore),r=""===s||null==s;if((o=e)instanceof HTMLInputElement&&["text","email","password","search","tel","url"].includes(o.type)||function(e){return e instanceof HTMLTextAreaElement}(e)){if(!r&&null!==i.minLength&&"string"==typeof s&&s.length<i.minLength)return;if(!r&&null!==i.maxLength&&"string"==typeof s&&s.length>i.maxLength)return}var o;if(function(e){return e instanceof HTMLInputElement&&["number","range"].includes(e.type)}(e)&&!r){const e=Number(s);if(null!==i.minValue&&e<i.minValue)return;if(null!==i.maxValue&&e>i.maxValue)return}this.component.set(i.modelName,s,i.shouldRender,i.debounce)}
1dispatchEvent(e,t={},n=!0,i=!1){t.controller=this,t.component=this.proxiedComponent,this.dispatch(e,{detail:t,prefix:"live",cancelable:i,bubbles:n})}onMutations(e){e.forEach(e=>{"attributes"===e.type&&"id"===e.attributeName&&this.element.id!==this.component.id&&(this.disconnectComponent(),this.createComponent(),this.connectComponent())})}};z.values={name:String,url:String,props:{type:Object,default:{}},propsUpdatedFromParent:{type:Object,default:{}},listeners:{type:Array,default:[]},eventsToEmit:{type:Array,default:[]},eventsToDispatch:{type:Array,default:[]},debounce:{type:Number,default:150},fingerprint:{type:String,default:""},requestMethod:{type:String,default:"post"},fetchCredentials:{type:String,default:"same-origin"}},z.backendFactory=e=>new o(e.urlValue,e.requestMethodValue,e.fetchCredentialsValue)},4424:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var i=n(9470),s=n(8385);function r(e){const t=(0,i.A)("[data-modal-close]",e.target);null!==t&&(e.preventDefault(),(0,s.A)("click",t))}let o=null;function a(e){const t=document.body;t.dataset.modalOpen="open",t.classList.add("scroll-disabled");const n=(0,i.A)("#modal-container");null!==n&&(n.innerHTML=e);const s=(0,i.A)("#modal");return null===s||s.hasAttribute("open")||(s.showModal(),s.addEventListener("cancel",r)),new Promise(e=>{o=e})}const l={hide:function(){null!==o&&o();const e=document.body;delete e.dataset.modalOpen,e.classList.remove("scroll-disabled");const t=(0,i.A)("#modal");null!==t&&(t.close(),t.removeEventListener("cancel",r));const n=(0,i.A)("#modal-container");null!==n&&(n.innerHTML="")},dom:a,ajax:async function(e){const t=(0,i.A)("#modal-spinner");null!==t&&(t.style.display="");const n=await fetch(e,{headers:{"X-Requested-With":"XMLHttpRequest"}});if(null!==t&&(t.style.display="none"),n.ok)return{closing:a(await n.text())}}}},5116:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});const i=(0,n(3066).E)(n(758))},5269:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var i=n(2891);const s=class extends i.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||n.e(8681).then(n.bind(n,8681)).then(e=>{this.application.register(this.identifier,e.default)})}}},5826:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var i=n(2891);const s=class extends i.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||n.e(3982).then(n.bind(n,3982)).then(e=>{this.application.register(this.identifier,e.default)})}}},5941:(e,t,n)=>{"use strict";n.d(t,{A:()=>M});var i=n(2891),s=n(2354);function r(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function o(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function a(e,t){return e.get(o(e,t))}var l=new WeakSet,c=new WeakMap,d=class extends i.xI{constructor(...e){var t;super(...e),r(this,t=l),t.add(this),this.isObserving=!1,this.hasLoadedChoicesPreviously=!1,this.originalOptions=[],function(e,t){r(e,t),t.set(e,e=>Array.isArray(e)?e.reduce((e,t)=>("string"==typeof t&&(e[t]={}),"object"==typeof t&&t.name&&(e[t.name]=t.options||{}),e),{}):e)}(this,c)}initialize(){this.mutationObserver||(this.mutationObserver=new MutationObserver(e=>{this.onMutations(e)}))}connect(){this.selectElement&&(this.originalOptions=this.createOptionsDataStructure(this.selectElement)),this.initializeTomSelect()}initializeTomSelect(){this.selectElement&&this.selectElement.setAttribute("data-skip-morph",""),this.urlValue?this.tomSelect=o(l,this,p).call(this,this.urlValue,this.hasMinCharactersValue?this.minCharactersValue:null):this.optionsAsHtmlValue?this.tomSelect=o(l,this,m).call(this):(this.tomSelect=o(l,this,u).call(this),this.startMutationObserver())}disconnect(){if(this.stopMutationObserver(),!this.tomSelect)return;let e=[];this.selectElement&&(e=this.selectElement.multiple?Array.from(this.selectElement.options).filter(e=>e.selected).map(e=>e.value):[this.selectElement.value]),this.tomSelect.destroy(),this.tomSelect=void 0,this.selectElement&&(this.selectElement.multiple?Array.from(this.selectElement.options).forEac
1h(t=>{t.selected=e.includes(t.value)}):this.selectElement.value=e[0])}urlValueChanged(){this.resetTomSelect()}getMaxOptions(){return this.selectElement?this.selectElement.options.length:50}get selectElement(){return this.element instanceof HTMLSelectElement?this.element:null}get formElement(){if(!(this.element instanceof HTMLInputElement||this.element instanceof HTMLSelectElement))throw new Error("Autocomplete Stimulus controller can only be used on an <input> or <select>.");return this.element}dispatchEvent(e,t){this.dispatch(e,{detail:t,prefix:"autocomplete"})}get preload(){return this.hasPreloadValue?"false"!==this.preloadValue&&("true"===this.preloadValue||this.preloadValue):"focus"}resetTomSelect(){if(this.tomSelect){this.dispatchEvent("before-reset",{tomSelect:this.tomSelect}),this.stopMutationObserver();const e=this.element.innerHTML,t=this.tomSelect.getValue();this.tomSelect.destroy(),this.element.innerHTML=e,this.initializeTomSelect(),this.tomSelect.setValue(t)}}changeTomSelectDisabledState(e){this.tomSelect&&(this.stopMutationObserver(),e?this.tomSelect.disable():this.tomSelect.enable(),this.startMutationObserver())}startMutationObserver(){!this.isObserving&&this.mutationObserver&&(this.mutationObserver.observe(this.element,{childList:!0,subtree:!0,attributes:!0,characterData:!0,attributeOldValue:!0}),this.isObserving=!0)}stopMutationObserver(){this.isObserving&&this.mutationObserver&&(this.mutationObserver.disconnect(),this.isObserving=!1)}onMutations(e){let t=!1,n=!1;e.forEach(e=>{switch(e.type){case"attributes":if(e.target===this.element&&"disabled"===e.attributeName){t=!0;break}if(e.target===this.element&&"multiple"===e.attributeName){this.element.hasAttribute("multiple")!==("multiple"===e.oldValue)&&(n=!0);break}}});const i=this.selectElement?this.createOptionsDataStructure(this.selectElement):[];this.areOptionsEquivalent(i)&&!n||(this.originalOptions=i,this.resetTomSelect()),t&&this.changeTomSelectDisabledState(this.formElement.disabled)}createOptionsDataStructure(e){return Array.from(e.options).map(e=>({value:e.value,text:e.text}))}areOptionsEquivalent(e){const t=this.originalOptions.filter(e=>""!==e.value),n=e.filter(e=>""!==e.value),i=this.originalOptions.find(e=>""===e.value),s=e.find(e=>""===e.value);if(i&&s&&i.text!==s.text)return!1;if(t.length!==n.length)return!1;const r=e=>`${e.value}-${e.text}`,o=new Set(t.map(r)),a=new Set(n.map(r));return o.size===a.size&&[...o].every(e=>a.has(e))}};function h(){const e={},t=!this.selectElement||this.selectElement.multiple;this.formElement.disabled||t||(e.clear_button={title:""}),t&&(e.remove_button={title:""}),this.urlValue&&(e.virtual_scroll={});const n={render:{no_results:()=>`<div class="no-results">${this.noResultsFoundTextValue}</div>`,option_create:(e,t)=>`<div class="create">${this.createOptionTextValue.replace("%placeholder%",`<strong>${t(e.input)}</strong>`)}</div>`},plugins:e,onItemAdd:()=>{this.tomSelect?.setTextboxValue("")},closeAfterSelect:!0,onOptionAdd:(e,t)=>{if(!this.tomSelect)return;let n=this.tomSelect.input,i=null;const s=t[this.tomSelect.settings.optgroupField];if(s&&this.tomSelect.optgroups&&(i=this.tomSelect.optgroups[s],i)){const e=n.querySelector(`optgroup[label="${i.label}"]`);e&&(n=e)}const r=document.createElement("option");r.value=e,r.text=t[this.tomSelect.settings.labelField];const o=t.$order;let a=null;for(const[,e]of Object.entries(this.tomSelect.options))if(e.$order===o){a=n.querySelector(`:scope > option[value="${CSS.escape(e[this.tomSelect.settings.valueField])}"]`);break}a?a.insertAdjacentElement("afterend",r):o>=0?n.append(r):n.prepend(r)}};return this.selectElement||this.urlValue||(n.shouldLoad=()=>!1),o(l,this,g).call(this,n,this.tomSelectOptionsValue)}function u(){const e=o(l,this,g).call(this,o(l,this,h).call(this),{maxOptions:this.getMaxOptions()});return o(l,this,b).call(this,e)}function m(){const e=o(l,this,h).call(this),t=e.labelField??"text",n=o(l,this,g).call(this,e,{maxOptions:this.getMaxOptions(),score:e=>{const n=this.tomSelect?.getScoreFunction(e);return e=>n?.({...e,text:o(l,this,f).call(this,e[t])})},render:{...e.render,item:e=>`<div>${e[t]}</div>`,option:e=>`<div>${e[t]}</div>`}});return o(l,this,b).call(this,n)}function p(e,t){const n=o(l,this,h).call(this),i=n.labelField??"text",s=o(l,this,g).call(this,n,{firstUrl:t=>`${e}${e.includes("?")?"&":"?"}query=${encodeURIComponent(t)}`,load:function(e,t){const n=this.getUrl(e);fetch(n).then(e=>e.json()).then(n=>{this.setNextUrl(e,n.next_page),t(n.results.options||n.results,n.results.optgroups||[])}).catch(()=>t([],[]))},shouldLoad:e=>null!==t?e.length>=t:!!this.hasLoadedChoicesPreviously||(e.length>0&&(this.hasLoadedChoicesPreviously=!0),e.length>=3),optgroupField:"group_by",score:e=>e=>1,render:{option:(e,t)=>`<div>${this.optionsAsHtmlValue?e[i]:t(e[i])}</div>`,item:(e,t)=>
1`<div>${this.optionsAsHtmlValue?e[i]:t(e[i])}</div>`,loading_more:()=>`<div class="loading-more-results">${this.loadingMoreTextValue}</div>`,no_more_results:()=>`<div class="no-more-results">${this.noMoreResultsTextValue}</div>`,no_results:()=>`<div class="no-results">${this.noResultsFoundTextValue}</div>`,option_create:(e,t)=>`<div class="create">${this.createOptionTextValue.replace("%placeholder%",`<strong>${t(e.input)}</strong>`)}</div>`},onFocus:()=>{this.resetOnFocusValue&&this.tomSelect&&""===this.tomSelect.control_input.value.trim()&&(this.tomSelect.clearOptions(),this.tomSelect.loadedSearches={},"function"==typeof this.tomSelect.clearPagination&&this.tomSelect.clearPagination(),this.tomSelect.load(""))},preload:this.preload});return o(l,this,b).call(this,s)}function f(e){return e.replace(/(<([^>]+)>)/gi,"")}function g(e,t){return{...e,...t,plugins:o(l,this,v).call(this,{...a(c,this).call(this,e.plugins||{}),...a(c,this).call(this,t.plugins||{})})}}function v(e){return Object.entries(e).reduce((e,[t,n])=>(!1!==n&&(e[t]=n),e),{})}function b(e){const t={options:e};this.dispatchEvent("pre-connect",t);const n=new s.A(this.formElement,e),i={tomSelect:n,options:e};return this.dispatchEvent("connect",i),n}d.values={url:String,optionsAsHtml:Boolean,loadingMoreText:String,noResultsFoundText:String,noMoreResultsText:String,createOptionText:String,minCharacters:Number,tomSelectOptions:Object,preload:String,resetOnFocus:Boolean};var y=n(106);y.$L&&y.t1.register(...y.$L);let E=!1;var w=class extends i.xI{constructor(...e){super(...e),this.chart=null}connect(){if(E||(E=!0,this.dispatchEvent("init",{Chart:y.t1})),!(this.element instanceof HTMLCanvasElement))throw new Error("Invalid element");const e=this.viewValue;Array.isArray(e.options)&&0===e.options.length&&(e.options={}),this.dispatchEvent("pre-connect",{options:e.options,config:e});const t=this.element.getContext("2d");if(!t)throw new Error("Could not getContext() from Element");this.chart=new y.t1(t,e),this.dispatchEvent("connect",{chart:this.chart})}disconnect(){this.dispatchEvent("disconnect",{chart:this.chart}),this.chart&&(this.chart.destroy(),this.chart=null)}viewValueChanged(){if(this.chart){const e={data:this.viewValue.data,options:this.viewValue.options};Array.isArray(e.options)&&0===e.options.length&&(e.options={}),this.dispatchEvent("view-value-change",e),this.chart.data=e.data,this.chart.options=e.options,this.chart.update();const t=this.element.parentElement;if(t&&this.chart.options.responsive){const e=t.style.width;t.style.width=`${t.offsetWidth+1}px`,setTimeout(()=>{t.style.width=e},0)}}}dispatchEvent(e,t){this.dispatch(e,{detail:t,prefix:"chartjs"})}};w.values={view:Object};var A=n(3249);const M={"symfony--ux-autocomplete--autocomplete":d,"symfony--ux-chartjs--chart":w,"symfony--ux-leaflet-map--map":class extends i.xI{constructor(e){super(e),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(e=>e.identifier===this.identifier&&e.__stimulusLazyController)||Promise.all([n.e(3481),n.e(6547)]).then(n.bind(n,6547)).then(e=>{this.application.register(this.identifier,e.default)})}},live:A.Ay}},7299:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var i=n(4424),s=n(2891);const r=class extends s.xI{static values={renderOnConnect:Boolean};connect(){this.checkPopup()}async checkPopup(){const e=this.element;e&&this.renderOnConnectValue&&(i.A.dom(e.innerHTML),this.showedPopup=!0)}}},8385:(e,t,n)=>{"use strict";function i(e,t,n=!0,i=!0,s=null){let r;"function"==typeof window.CustomEvent?r=new CustomEvent(e,{bubbles:!0,cancelable:!1,detail:s}):(r=document.createEvent("CustomEvent"),r.initCustomEvent(e,n,i,s)),t.dispatchEvent(r)}n.d(t,{A:()=>i})}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.