PageSourceSearch

https://www.oetwil.ch/static/js/femodules/core/a11yDialog.min.js?ver=1.8.117_1

js oetwil.ch collected 2026-10-02 16:55:31 UTC 3,158 bytes, 1 lines download raw bytes

1(()=>{"use strict";const e=e=>globalThis.govisSandboxGetUrl?globalThis.govisSandboxGetUrl(e):`/route/${e}`;function t(e,t,o){!function(e,t,o){const{input:s,init:i}=n(e,t);fetch(s,i).then((e=>e.text())).then(o)}({url:e},t,o)}const n=(e,t)=>{const n={method:e.method||"POST",headers:{"Content-type":"application/x-www-form-urlencoded; charset=UTF-8","X-Requested-With":"XMLHttpRequest"}};let o=e.url;if(t){const e=s(t);"POST"==n.method?n.body=e:o+="&"+e}return{input:o,init:n}},o=e=>{let t=e;var n;return"object"!=typeof(n=e)||null==n||Array.isArray(e)||(t=JSON.stringify(e)),null===t?"":t},s=e=>{const t=[];for(let n in e)e.hasOwnProperty(n)&&t.push(encodeURIComponent(n)+"="+encodeURIComponent(o(e[n])));return t.join("&")};Object.assign("govis.module.core.a11yDialog".split(".").reduce(((e,t)=>(e[t]||(e[t]={}),e[t])),globalThis),{init:function(e,t){return new Promise((()=>{const n=i._setInstance(e,t);e.hasOwnProperty("postponeFn")||(e.postponeFn=e=>Promise.resolve(e));const o=[i._loadTemplate(e,n),i._loadLibraries(e),e.postponeFn(e,n)];return Promise.all(o).then((()=>(n.dialog?n.dialog.show():i._init(e,n),e)))}))},get:e=>{const t=i._getIdentifier(e);return i._instances[t]},hideAll:function(){i._hideAll()}});const i={_instances:{},_getIdentifier:function(e){return e.template?[e.dialogClass,e.template,e.jsonData].join("-"):e.dialogClass},_setInstance:function(e,t){var n;e.template=e.template||"",e.template&&(e.jsonData=JSON.stringify((n=e.data||{},Object.keys(n).sort().reduce(((e,t)=>(e[t]=n[t],e)),{}))));const o=this._getIdentifier(e);return this._instances.hasOwnProperty(o)?this._instances[o].callback=t:this._instances[o]={dialog:null,callback:t},this._instances[o]},_addToBody:(e,t,n)=>{if(!t.hasOwnProperty(e.template)){const o="js-"+window.helperJs.getInternalId(),s=document.createElement("div");s.innerHTML=n.trim(),s.querySelectorAll(`.${e.dialogClass}`).forEach((e=>{e.classList.add(o)})),t[e.template]=o,document.body.insertAdjacentHTML("beforeend",s.innerHTML)}},_loadTemplate:function(n,o){return!n.template||o.hasOwnProperty(n.template)?Promise.resolve(n):new Promise(((s,i)=>{t(e("cms-index-renderCommonTemplate"),{template:n.template,data:n.jsonData},(e=>{try{this._addToBody(n,o,e),s(n)}catch(e){i(n)}}))}))},_loadLibraries:function(e){return new Promise((t=>{window.helperJs.executeScript({executeFn:function(){t(e)},resources:[{alias:"lib",name:"a11y-dialog",isLoadedFn:()=>window.A11yDialog}]})}))},_init:function(e,t){const n=document.getElementsByClassName(e.template?t[e.template]:e.dialogClass)[0];if(n){const e=n.getElementsByClassName("js-dialog-confirm")[0];e&&e.setAttribute("autofocus",""),t.dialog=new window.A11yDialog(n),t.dialog.show(),t.dialog.on("hide",(function(){t.callback&&delete t.callback})),n.addEventListener("click",(e=>{const n=e.target,o=n.classList.contains("js-dialog-close");(n.classList.contains("js-dialog-confirm")||o)&&(!o&&t.callback&&t.callback(),t.dialog.hide())}))}else console.warn(["a11yDialog: element not found",e,t])},_hideAll:function(){for(let e in this._instances)if(this._instances.hasOwnProperty(e)){const t=this._instances[e];t.dialog&&t.dialog.shown&&t.dialog.hide()}}}})();

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.