PageSourceSearch

https://www.neqios.eu/.wh/ea/ap/utwente_base.ws2026/ap.mjs

js neqios.eu collected 2026-10-07 01:15:27 UTC 918,674 bytes, 62 lines download raw bytes

1import{$ as Oc,A as Qn,Aa as Pe,B as $o,Ba as ze,C as jc,Ca as xg,D as Ci,Da as Wc,E as Rc,Ea as $t,F as qc,Fa as ts,G as Dc,H as Oi,Ha as at,Ia as Ir,J as B,Ja as yg,K as Zn,Ka as q,L as Ui,La as M,M as Ic,Ma as xe,N as zc,Na as N,O as es,Oa as Ye,P as jt,Pa as is,Q as Fi,Qa as v,R as Yo,Ra as mt,S as xt,Sa as Xe,T as Nc,Ta as Ne,U as Hc,Ua as te,V as ue,Va as Vc,W as re,Wa as Bc,X as bg,Xa as kg,Y as ce,Ya as qt,Z as ie,Za as Go,_ as yt,a as Sc,aa as F,ab as $c,b as it,ba as $e,bb as Tg,c as Lc,cb as ii,d as Mt,da as V,e as Ce,ea as pe,eb as Ko,f as Ut,fa as wg,fb as Dt,g as Wt,ga as G,gb as Yc,h as A,ha as ei,hb as os,i as Ei,ia as Vt,ib as Xc,j as Pt,ja as K,jb as Gc,k as Vo,ka as ti,kb as Kc,l as Cc,lb as zr,m as Rr,ma as Uc,n as T,na as W,o as L,oa as p,p as w,pa as Xo,q as Si,qa as vg,r as ot,ra as kt,sa as x,t as Li,ta as we,u as Fc,ua as Dr,v as Ac,va as Bt,w as Mc,wa as ut,x as Pc,xa as Ai,y as qr,ya as Rt,z as Bo,za as Mi}from"/.wh/ea/ap/utwente_base.ws2026/chunk-RPOHHMHQ.mjs";var Kr=it((a0,Gr)=>{"use strict";var Gg=(function(){var i="v1.2.0",e=null,t=null,o=null;async function n(k){let j=k.url,D=k.success,H=k.error,Y=k.dataType,I={credentials:"same-origin",redirect:"follow"},C;for(let O=0;O<3;++O){j=j.replace("//www.webhare-test.utsp.utwente.nl/","//serviceportal.webhare-test.utsp.utwente.nl/");try{if(C=await fetch(j,I),C.status===200){if(C.redirected){j=C.url;continue}try{let X=Y==="json"?await C.json():null;D(X);return}catch(X){H(C,null,X.message);return}}else{let X=C.statusText;X||(X="Not available"),H(C,null,X);return}}catch{H(C,null,"Connection error");return}}H(C,null,"Max tries exceeded")}function s(){try{Object.keys(localStorage).filter(function(k){return k.substr(0,8)=="searsia-"}).forEach(function(k){localStorage.removeItem(k)})}catch{}}function r(k,j){if(j!=null)try{window.localStorage["searsia-"+k]=j}catch{}}function l(k){try{window.localStorage["searsia-"+k]=null}catch{}}function a(k){var j=null;try{j=window.localStorage["searsia-"+k]}catch{}return j}function d(k){var j=!1;try{j=window.localStorage.hasOwnProperty("searsia-"+k)}catch{}return j}function c(k){o=k,r("mother",JSON.stringify(k)),k.id!=null?e=k.id:e="searsia",r("id",e)}function h(){var k;return o??(k=a("mother"),k?JSON.parse(k):null)}function m(k){t=k,r("apitemplate",k)}function u(){return t??a("apitemplate")}function b(){return e??a("id")}function f(k){var j=b();j!=null&&r(j+"/"+k.id,JSON.stringify(k))}function g(k){var j,D=b();return D==null?null:(j=a(D+"/"+k),j?JSON.parse(j):null)}function _(k){var j=b();return j==null?!1:d(j+"/"+k)}function y(k){var j=b();j!=null&&l(j+"/"+k)}function E(k,j,D,H,Y){k[0]=="/"&&(k=u().split("/").slice(0,3).join("/")+k);var I,C,O,X=".json";return H&&(I=k.lastIndexOf("/"),C=k.indexOf("?"),I>4&&C>
1I&&(k.substring(I+1,C).indexOf(X)!==-1?O=X:O="",k=k.substring(0,I+1)+H+O+k.substring(C,k.length))),D==null&&(D=1),Y==null&&(Y=""),k=k.replace(/\{q\??\}/g,j),k=k.replace(/\{searchTerms\??\}/g,j),k=k.replace(/\{startPage\??\}/,D),k=k.replace(/\{resultType\??\}/,Y),k.replace(/\{[A-Za-z]+\?\}/g,"")}function S(k,j){var D,H=k.length,Y=100;if(H<Y||j.score>k[Y-1].score){for(H<Y&&(H+=1),D=H-1;D>0&&k[D-1].score<j.score;)k[D]=k[D-1],D-=1;k[D]=j}}function P(k){return k.toLowerCase().replace(new RegExp("[^a-z0-9]+","g")," ").replace(new RegExp("^ +| +$","g"),"")}function z(k){return k=k.replace(/&/g,"&amp;"),k=k.replace(/"/g,"&#34;"),k}function $(k){return k=k.replace(/&/g,"&amp;"),k=k.replace(/</g,"&lt;"),k=k.replace(/>/g,"&gt;"),k}function ae(k,j){var D,H,Y,I,C=0;for(I=P(k).split(/ +/),D=0;D<j.length;D+=1)for(Y=I.length,Y>1e3&&(Y=1e3),H=0;H<Y;)j[D]===I[H]&&(C+=1,H=Y),H+=1;return C}function Q(k,j,D){var H,Y,I="",C="";return k!=null&&k.length>D&&(j<0&&(j=0),j>2?(H=k.indexOf(" ",j-1),H===-1?H=j:H+=1,I="... "):H=0,j+D<k.length?(Y=k.lastIndexOf(" ",j+D),Y===-1&&(Y=j+D-3),C=" ..."):Y=j+D,k=I+k.substr(H,Y-H)+C),k}function le(k,j){var D,H,Y,I,C,O;for(D=0;D<k.length;D+=1)if(C=-1,O=-1,j.length<2&&(C=0),k[D].description!=null){for(I=k[D].description.toLowerCase(),H=0;H<j.length;)C===-1?C=I.indexOf(j[H]):O===-1&&(Y=C-120,Y<0&&(Y=0),O=I.indexOf(j[H],Y),O===-1&&(O=I.indexOf(j[H]))),H+=1;C===-1&&(C=0),O===-1&&(O=0),C>O&&(Y=C,C=O,O=Y),O-C<120?I=Q(k[D].description,C-40,192):(I=Q(k[D].description,C-40,92),I+=Q(k[D].description,O-40,92)),k[D].description=I}}function ge(k,j,D){var H,Y,I,C,O,X,J=[],se=0,Z=0;for(j=P(ne(j)),H=j.split(/ +/).sort(function(Ue,Re){return Re.length-Ue.length}),Y=H.length,J=[],O=0;Z<k.hits.length&&(I=k.hits[Z],C=0,X=0,I.title!=null&&(X=ae(I.title,H)),X===0&&I.url!=null&&(X=ae(I.url,H)/1.1),X<Y&&I.description!=null&&(C=ae(I.description,H)),X*1.1>C?C=X*1.1:C+=X/10,C>0&&(C>=Y&&(se+=1),I.score=C,S(J,I),C>O&&(O=C)),!(se>=100));)Z+=1;return D&&(le(J,H),k.hits=J),O}function de(k,j){return j.match(/^https?:\/\//)||j.match(/^\/\//)?j:k==null?null:j.match(/^\//)?k.replace(/([a-z])\/.*$/,"$1")+j:k.replace(/\/[^/]+$/,"/")+j}function He(k){if(!k)return null;var j=k.match(/:\/\/(www\.)?(.[^/:]+)/);return j==null?null:j[2]}function Le(){var k,j,D={q:"",r:"",p:"",t:""},H=window.location.search.substring(1),Y=H.split("&");for(k=0;k<Y.length;k+=1)j=Y[k].split("="),j[0]==="q"?(D.q=j[1],D.q=D.q.replace(/%3C.*?%3E/g,""),D.q=D.q.replace(/%3C|%3E/g,""),D.q=D.q.replace(/^\++|\++$/g,"")):j[0]==="r"?D.r=j[1]:j[0]==="p"?D.p=j[1]:j[0]==="t"&&(D.t=j[1]);return D}function ne(k){return k=k.replace(/\+/g," "),k=decodeURIComponent(k),$(k)}function Me(k){return k=ne(k),k=k.replace(/&amp;/g,"&"),k}function Oe(k){return k=encodeURIComponent(k),k=k.replace(/%20/g,"+"),k}function ki(k,j,D,H){var Y,I,C,O,X=!0,J=!0,se=!1,Z=!0,Ue=k.hits.length-1,Re=null,ke=10;for(Ue>=ke&&(ke=Ue+1),C=k.resource,Re=Number(C.prior),(isNaN(Re)||Re==null)&&(Re=0),C.urltemplate!=null&&(O=He(C.urltemplate)),Y=Ue;Y>=0;Y-=1)I=k.hits[Y],I.title==null?(I.title="Title",console.log("WARNING: result without title")):I.title=$(I.title),I.score=1/Math.sqrt(H)-Y/ke,I.score<.001&&(I.score=.001),I.url==null?C.urltemplate!=null?I.url=E(C.urltemplate,Oe(I.title),1,"",D):I.url=E("?q={searchTerms}&t={resultType?}",Oe(I.title),null,null,D):(C.urltemplate?I.url=de(C.urltemplate,I.url):I.url=de(C.apitemplate,I.url),(O==null||O!==He(I.url))&&(se=!0),I.url=$(I.url)),I.description!=null&&(I.description=$(I.description),Z=!1),I.image!=null&&(I.image=z(de(C.urltemplate,I.image)),Z=!1),I.favicon==null&&C.favicon!=null&&(I.favicon=C.favicon),I.favicon!=null&&(I.favicon=z(I.favicon)),(I.tags==null||I.tags.indexOf("small")===-1)&&(J=!1),(I.tags==null||I.tags.indexOf("image")===-1)&&(X=!1);X?C.type="images":J||Z?C.type="small":se?C.type="full":C.type="web"}function Yn(k,j,D,H,Y,I,C){var O,X,J=!0,se=0;H.resource&&H.resource.apitemplate&&f(H.resource),H.hits&&H.hits.length&&(se=H.hits.length,O=ge(H,k,!1),X=ge(I,k,!0)),(se===0||X-.5>O)&&(H=I,J=!1,se=H.hits.length),se>0&&(ki(H,k,j,Y),C({searsia:i,status:"hits",sessionid:D,resource:H.resource,hits:H.hits,rank:Y,query:k,live:J}))}function Mr(k,j,D,H,Y){var I=0;function C(vt,Oo){I===0&&Oo({searsia:i,sessionid:vt,status:"done"})}function O(vt,Oo,Uo,Kn,Tc,jr,Wo){var Ec=u();Ec==null?Wo({searsia:i,status:"error",sessionid:Uo,resource:{id:Kn},message:"No API template found."}):(I+=1,n({url:E(Ec,vt,1,Kn,Oo),success:function(Jn){Yn(vt,Oo,Uo,Jn,Tc,jr,Wo),I-=1,C(Uo,Wo)}
1,error:function(Jn,Fx,Ax){Jn&&Jn.status===410?y(Kn):Yn(vt,Oo,Uo,jr,Tc,jr,Wo),console.log("WARNING: "+Kn+" unavailable."),I-=1,C(Uo,Wo)},timeout:12e3,dataType:"json"}))}var X,J,se,Z=0,Ue=1,Re=[],ke=H.resource;if(ke!=null?(c(ke),ke.rerank!=null&&ge(H,k,!0)):ke=h(),Y({searsia:i,status:"start",sessionid:D,resource:ke}),J=H.hits,J==null||J.length===0){Y({searsia:i,status:"done",sessionid:D});return}for(;Z<J.length;){if(X=J[Z].rid,X==null)H.resource!=null&&H.resource.urltemplate!=null&&(J[Z].url=de(H.resource.urltemplate,J[Z].url)),Y({searsia:i,hits:[J[Z]],query:k,status:"hits",sessionid:D,rank:Ue}),Ue+=1;else if(Re[X]!==1){if(se={hits:[]},_(X)){for(se.resource=g(X);Z<J.length&&J[Z].rid===X;)J[Z].title!=null&&J[Z].title!==""&&(J[Z].url!=null||se.resource.urltemplate!=null)&&(J[Z].foundBefore==null||Date.now()-new Date(J[Z].foundBefore).getTime()<12096e5)&&se.hits.push(J[Z]),Z+=1;Z-=1}else se.resource={id:X};O(k,j,D,X,Ue,se,Y),Re[X]=1,Ue+=1}Z+=1}}function Pr(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(k){var j=Math.random()*16|0,D=k==="x"?j:j&3|8;return D.toString(16)})}function Xn(k,j){var D,H,Y,I=null,C=u(),O=Pr();if(C==null){j({status:"error",error:"First initialize with searsia.initClient(apiTemplate)"});return}if(k.q==null||k.q===""){j({status:"error",sessionid:O,error:"No query."});return}if(k.q.length>150){j({status:"error",sessionid:O,error:"Query too long."});return}return H=Oe(k.q),k.p==null?Y=1:Y=k.p,k.t&&(I=k.t),D=E(C,H,Y,null,I),n({url:D,success:function(X){Mr(H,I,O,X,j)},error:function(X,J,se){console.log("ERROR: "+se),j({status:"error",sessionid:O,error:"Temporarily out of order. Please try again later."})},timeout:1e4,dataType:"json"}),O}function Gn(k){var j=u();j==null?k({status:"error",error:"If you see this then searsiaclient needs to be initialized with searsia.initClient(apiTemplate)"}):n({url:E(j,"","",null,null),success:function(D){D.resource!=null&&(D.status="connect",c(D.resource)),k(D)},error:function(D,H,Y){console.log("ERROR: "+Y),k({status:"error",error:Y})},timeout:1e4,dataType:"json"})}function Ti(k){var j=u(),D=null;return k!==j?(s(),m(k)):D=h(),D?{resource:D}:null}return{urlParameters:function(){return Le()},printableQuery:function(k){return ne(k)},formQuery:function(k){return Me(k)},encodedQuery:function(k){return Oe(k)},correctUrl:function(k,j){return de(k,j)},fillUrlTemplate:function(k,j,D,H,Y){return E(k,j,D,H,Y)},initClient:function(k){return Ti(k)},connectToServer:function(k){Gn(k)},searchFederated:function(k,j){return Xn(k,j)}}})();typeof Gr<"u"&&(Gr.exports=Gg)});var bp=it((l0,ri)=>{"use strict";var Kg={alsosearched:{type:"related"},alumni:{type:"news"},beeldbank:{type:"image"},bussen:{type:"pubtrans",group:"bus"},courses:{type:"courses"},cultuur:{type:"event"},didyoumean:{type:"didyoumean"},essays:{type:"publication"},evenementen:{type:"event"},facebook:{type:"news"},flickr:{type:"image"},forecast:{type:"weather",group:"weather"},instagram:{type:"image"},maps:{type:"location"},nieuws:{type:"news"},people:{type:"people"},publications:{type:"publication"},serviceportal:{type:"serviceportal"},treinen:{type:"pubtrans",group:"train"},utoday:{type:"news"},vimeo:{type:"video"},youtube:{type:"video"}},Jg=["courses","evenementen","googlecustom","nieuws","people","serviceportal"],Qg={nl:["de","een","en","het","of","a","an","and","or","the"],en:["a","an","and","or","the"]};typeof ri<"u"&&(ri.exports.MIN_SUGGEST_LENGTH=3,ri.exports.NUM_SUGGESTIONS=5,ri.exports.NUM_RELATED=5,ri.exports.SEARSIA_SOURCES=Kg,ri.exports.SEARSIA_DUPLICATE_RESOURCES=Jg,ri.exports.QUERY_STOPWORDS=Qg)});var Yp=it((by,ca)=>{"use strict";var to=typeof Reflect=="object"?Reflect:null,Ip=to&&typeof to.apply=="function"?to.apply:function(e,t,o){return Function.prototype.apply.call(e,t,o)},bs;to&&typeof to.ownKeys=="function"?bs=to.ownKeys:Object.getOwnPropertySymbols?bs=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:bs=function(e){return Object.getOwnPropertyNames(e)};function pf(i){console&&console.warn&&console.warn(i)}var Np=Number.isNaN||function(e){return e!==e};function fe(){fe.init.call(this)}ca.exports=fe;ca.exports.once=gf;fe.EventEmitter=fe;fe.prototype._events=void 0;fe.prototype._eventsCount=0;fe.prototype._maxListeners=void 0;var zp=10;function ws(i){if(typeof i!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof i)}Object.defineProperty(fe,"defaultMaxListeners",{enumerable:!0,get:function(){return zp},set:function(i){if(typeof i!="number"||i<0||Np(i))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+i+".");zp=i}});fe.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};fe.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||Np(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function Hp(i){return i._maxListeners===void 0?fe.defaultMaxListeners:i._maxListeners}fe.prototype.getMaxListeners=function(){return Hp(this)};fe.prototype.emit=function(e){for(var t=[],o=1;o<arguments.length;o++)t.push(arguments[o]);var n=e==="error",s=this._events;if(s!==void 0)n=n&&s.error===void 0;else if(!n)return!1;if(n){var r;if(t.length>0&&(r=t[0]),r instanceof Error)throw r;var l=new Error("Unhandled error."+(r?" ("+r.message+")":""));throw l.context=r,l}var a=s[e];if(a===void 0)return!1;if(typeof a=="function")Ip(a,this,t);else for(var d=a.length,c=Bp(a,d),o=0;o<d;++o)Ip(c[o],this,t);return!0};function Op(i,e,t,o){var n,s,r;if(ws(t),s=i._events,s===void 0?(s=i._events=Object.create(null),i._eventsCount=0):(s.newListener!==void 0&&(i.emit("newListener",e,t.listener?t.listener:t),s=i._events),r=s[e]),r===void 0)r=s[e]=t,++i._eventsCount;else if(typeof r=="function"?r=s[e]=o?[t,r]:[r,t]:o?r.unshift(t):r.push(t),n=Hp(i),n>0&&r.length>n&&!r.warned){r.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+r.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=i,l.type=e,l.count=r.length,pf(l)}return i}fe.prototype.addListener=function(e,t){return Op(this,e,t,!1)};fe.prototype.on=fe.prototype.addListener;fe.prototype.prependListener=function(e,t){return Op(this,e,t,!0)};function hf(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Up(i,e,t){var o={fired:!1,wrapFn:void 0,target:i,type:e,listener:t},n=hf.bind(o);return n.listener=t,o.wrapFn=n,n}fe.prototype.once=function(e,t){return ws(t),this.on(e,Up(this,e,t)),this};fe.prototype.prependOnceListener=function(e,t){return ws(t),this.prependListener(e,Up(this,e,t)),this};fe.prototype.removeListener=function(e,t){var o,n,s,r,l;if(ws(t),n=this._events,n===void 0)return this;if(o=n[e],o===void 0)return this;if(o===t||o.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit
1("removeListener",e,o.listener||t));else if(typeof o!="function"){for(s=-1,r=o.length-1;r>=0;r--)if(o[r]===t||o[r].listener===t){l=o[r].listener,s=r;break}if(s<0)return this;s===0?o.shift():uf(o,s),o.length===1&&(n[e]=o[0]),n.removeListener!==void 0&&this.emit("removeListener",e,l||t)}return this};fe.prototype.off=fe.prototype.removeListener;fe.prototype.removeAllListeners=function(e){var t,o,n;if(o=this._events,o===void 0)return this;if(o.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):o[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete o[e]),this;if(arguments.length===0){var s=Object.keys(o),r;for(n=0;n<s.length;++n)r=s[n],r!=="removeListener"&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(t=o[e],typeof t=="function")this.removeListener(e,t);else if(t!==void 0)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this};function Wp(i,e,t){var o=i._events;if(o===void 0)return[];var n=o[e];return n===void 0?[]:typeof n=="function"?t?[n.listener||n]:[n]:t?mf(n):Bp(n,n.length)}fe.prototype.listeners=function(e){return Wp(this,e,!0)};fe.prototype.rawListeners=function(e){return Wp(this,e,!1)};fe.listenerCount=function(i,e){return typeof i.listenerCount=="function"?i.listenerCount(e):Vp.call(i,e)};fe.prototype.listenerCount=Vp;function Vp(i){var e=this._events;if(e!==void 0){var t=e[i];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}fe.prototype.eventNames=function(){return this._eventsCount>0?bs(this._events):[]};function Bp(i,e){for(var t=new Array(e),o=0;o<e;++o)t[o]=i[o];return t}function uf(i,e){for(;e+1<i.length;e++)i[e]=i[e+1];i.pop()}function mf(i){for(var e=new Array(i.length),t=0;t<e.length;++t)e[t]=i[t].listener||i[t];return e}function gf(i,e){return new Promise(function(t,o){function n(r){i.removeListener(e,s),o(r)}function s(){typeof i.removeListener=="function"&&i.removeListener("error",n),t([].slice.call(arguments))}$p(i,e,s,{once:!0}),e!=="error"&&ff(i,n,{once:!0})})}function ff(i,e,t){typeof i.on=="function"&&$p(i,"error",e,t)}function $p(i,e,t,o){if(typeof i.on=="function")o.once?i.once(e,t):i.on(e,t);else if(typeof i.addEventListener=="function")i.addEventListener(e,function n(s){o.once&&i.removeEventListener(e,n),t(s)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof i)}});var ha=it((wy,Xp)=>{"use strict";N();var _f=Yp(),pa=class extends _f{constructor(e){super(),e||(e={}),this.options={url:e.url||"",log:!!(e.log||xe.rpc),withcredentials:"withCredentials"in e&&e.withcredentials},this.conn=null,this.__date_server=null,this.__date_client=null,this.__date_diff=null}destroy(){this.stopCurrentRequest(),this.conn=null}stopCurrentRequest(){this.conn&&(this.conn.onreadystatechange=null,this.conn.onloadend=null,this.conn.abort()),this.jsoncheckinterval&&(clearTimeout(this.jsoncheckinterval),this.jsoncheckinterval=null)}ensureConnection(){this.conn||(this.conn=new XMLHttpRequest)}startXMLHTTPRequest(e,t,o,n){this.ensureConnection();let s=!n||!n.synchronous;this.laststateevent=null,this.conn.abort(),this.have_response=!1,this.conn.open(e.toUpperCase(),t,s),n&&n.headers&&Object.keys(n.headers).forEach(r=>{this.conn.setRequestHeader(r,n.headers[r])}),this.options.withcredentials&&(this.conn.withCredentials=!0),this.conn.onreadystatechange=this.onStateChange.bind(this),this.conn.onloadend=this.onStateChange.bind(this),this.conn.onabort=this.onAbort.bind(this),this.emit("requeststart",{target:this}),this.conn.send(o),s||this.onStateChange()}onAbort(e){this.laststateevent&&(this.laststateevent.isaborted=!0)}onStateChange(e){if(this.conn.readyState!==4||this.have_response)return;this.have_response=!0;let t=this.conn.getResponseHeader("date");if(t!==""){let n=Date.parse(t);this.__date_server=n,this.__date_client=new Date,this.__date_diff=this.__date_server-this.__date_client}let o={target:this,success:this.conn.status===200,internalerror:this.conn.status===500,message:this.conn.status,responsetext:this.conn.responseText,responsejson:null};try{o.responsejson=JSON.parse(o.responsetext)}catch{}
1this.laststateevent=o,this.emit("requestend",o)}};Xp.exports=pa});var ga=it((xy,Gp)=>{"use strict";ie();var bf=ha(),wf=Math.floor(Math.random()*1e3),ua=class i extends bf{static get HTTP_ERROR(){return-1}static get JSON_ERROR(){return-2}static get PROTOCOL_ERROR(){return-3}static get RPC_ERROR(){return-4}static get OFFLINE_ERROR(){return-5}static get TIMEOUT_ERROR(){return-6}static get SERVER_ERROR(){return-7}constructor(e){super(e),e||(e={}),this.lastid=0,this.requestqueue=[],this.cachecounter=0,this.activerequest=null,this.haveresponse=!1,this.options.waittimeout="waittimeout"in e?e.waittimeout:500,this.options.appendfunctionname="appendfunctionname"in e?e.appendfunctionname:!1,this.waitcallback=null,this.waittimeoutid=null,this.waitingnow=!1,this.on("requestend",this.onResponse.bind(this))}destroy(){super.destroy(),this.requestqueue=[],this.activerequest=null,this.waittimeoutid&&(clearTimeout(this.waittimeoutid),this.waittimeoutid=null)}promiseRequest(e,t,o){let n=Promise.withResolvers(),s=this.request(e,t,n.resolve,(r,l,a)=>{n.reject(new Error(l))},o);return n.promise.__jsonrpcinfo={deferred:n,req:s},n.promise}
1async(e,...t){return this.promiseRequest(e,t)}_doAsyncAbort(e,t,o){if(!e.__jsonrpcinfo)throw new Error("The promise is not an async JSONRPC request");o?e.__jsonrpcinfo.deferred.reject(o):e.__jsonrpcinfo.deferred.resolve(t),e.__jsonrpcinfo.req.cancel()}rpcResolve(e,t){this._doAsyncAbort(e,t)}rpcReject(e,t){this._doAsyncAbort(e,null,t)}request(e,t,o,n,s){if(!t||typeof t!="object"||t.length===void 0)throw new Error("The parameters passed to request must be an Array");let r=++this.lastid,l;s&&s.url?l=s.url+(s.appendfunctionname?(s.url.match(/\/$/)?"":"/")+e:""):this.options.url?l=this.options.url+(this.options.appendfunctionname?(this.options.url.match(/\/$/)?"":"/")+e:""):l=location.href;let a=Math.max(s&&typeof s.timeout=="number"?s.timeout:0,0),d=s&&typeof s.waittimeout=="number"?s.waittimeout:this.options.waittimeout,c=s&&s.synchronous||!1,h=s&&s.errortrace||null;this.options.log&&console.log("JSONRPC request",e,t,s,"timeout:",a,"waitTimeout:",d);let m=new ma(this,r,e,t,l,a,d,o,n,c,h);return(this.options.log||!Pt)&&(m.stack=new Error().stack),this.requestqueue.push(m),this.options.log&&console.log("JSONRPC request is on queue"),this.processNextRequest(),m}handleError(e,t,o,n){e&&setTimeout(()=>e(t,o,n),0),setTimeout(()=>
1this.emit(["error",{target:this,errorcode:t,errormessage:o,rpcid:n}]),0)}isRequestPending(){return this.activerequest!==null||this.requestqueue.length}__cancelRequest(e){if(typeof e=="number"){if(this.activerequest===e){this.stopCurrentRequest(),this.activerequest=null;let t=this.requestqueue.shift();t.timeout&&typeof t.timeout!="boolean"&&clearTimeout(t.timeout),this.processNextRequest()}else for(let t=0;t<this.requestqueue.length;++t)if(this.requestqueue[t].id===e){this.requestqueue.splice(t,1);break}}}processNextRequest(){if(this.activerequest){this.options.log&&console.log("JSONRPC request #"+this.activerequest+" pending, not scheduling a new one yet"),this.handleWaitTimeouts();return}let e=null;for(;!e;){if(e=this.requestqueue[0],!e){this.options.log&&console.log("JSONRPC request - processNextRequest, queue is empty");return}e.timeout&&typeof e.timeout=="boolean"&&(this.requestqueue=this.requestqueue.filter(t=>t!==e),e=this.requestqueue[0])}this.activerequest=e.id,e.timeout&&(e.timeout=setTimeout(()=>this.onTimeout(e),e.timeout)),this.options.log&&console.log("JSONRPC request #"+e.id+" offering for XMLHTTP"),this.startXMLHTTPRequest("post",e.url,JSON.stringify(e.request),{headers:{"Content-Type":"application/json; charset=utf-8"},synchronous:e.synchronous}),this.handleWaitTimeouts()}onResponse(e){this.activerequest=null;let t=this.requestqueue[0];if(!t)return;if(this.requestqueue=this.requestqueue.slice(1),t.timeout){if(typeof t.timeout=="boolean"){this.processNextRequest();return}clearTimeout(t.timeout)}let o=-1,n=null;if(e.success){let s=e.responsejson;s?s.id===null||s.id!==t.id?(o=i.PROTOCOL_ERROR,n="Protocol error: invalid id"):s.error!==null?(o=i.RPC_ERROR,n=s.error,this.options.log&&console.log("RPC error:",n.message?n.message:"*no message*")):"result"in s?(o=0,n=s.result):(o=i.PROTOCOL_ERROR,n="Could not interpret response"):(o=i.JSON_ERROR,n="Invalid JSON response")}else if(o=i.HTTP_ERROR,n="HTTP Error: "+e.message,e.internalerror){let s=null;try{s=e.responsejson;let r;if(s&&s.error&&s.error.data){r=s.error.data.trace||s.error.data.errors||s.error.data.list||[],console.group();let l="RPC #"+wf+":"+t.id+" failed: "+s.error.message;console.warn(l),t.errortrace&&t.errortrace.push(l),r.forEach(a=>{if(a.filename||a.line){let d=a.filename+"#"+a.line+"#"+a.col+(a.func?" ("+a.func+")":"");console.warn(d),t.errortrace&&t.errortrace.push(d)}}),console.groupEnd()}o=i.SERVER_ERROR,n=s.error&&`${s.error.message} from ${t.url}`||"Unknown error"}catch{}}this.processNextRequest(),this.options.log&&(console.log("JSONRPC request",t.request.method,"status:",o,"time:",new Date().getTime()-t.scheduled,"ms, result:"),console.log(n)),setTimeout(()=>t.__completedCall(o,n,e),0)}onTimeout(e){e.timeout=!0,this.activerequest===e.id&&(this.activerequest=null,this.stopCurrentRequest(),this.processNextRequest()),this.handleError(e.onfailure,i.TIMEOUT_ERROR,"Timeout while waiting for response",e.id)}onWaitTimeout(){this.waittimeoutid=null,this.handleWaitTimeouts()}handleWaitTimeouts(){if(this.waittimeoutid&&(clearTimeout(this.waittimeoutid),this.waittimeoutid=null),!this.waitCallback)return;let e=!1,t=-1,o=new Date().getTime();for(let n=0;n<this.requestqueue.length;++n){let s=this.requestqueue[n];if(s.waitTimeout>=0){let r=o-s.scheduled;if(r>=s.waitTimeout)e=!0;else{let l=s.waitTimeout-r;(t<0||t>l)&&(t=l)}}}this.waitingNow!==e&&(this.waitingNow=e,setTimeout(()=>this.waitCallback(e),0)),t>=0&&(this.waittimeoutid=setTimeout(()=>this.onWaitTimeout(),t))}getEstimatedServerTime(){return new Date().getTime()+this.__date_diff}getEstimatedServerDate(){return new Date(this.getEstimatedServerTime())}},ma=class{constructor(e,t,o,n,s,r,l,a,d,c,h){this.cancelled=!1,this.stack=null,e.options.log&&console.log("req",this),this.parent=e,this.id=t,this.request={id:t,method:o,params:n||[]},this.url=s,this.onsuccess=a,this.onfailure=d,this.timeout=r,this.scheduled=new Date-0,this.waittimeout=l,this.synchronous=c,this.errortrace=h}onStartPreload(){}cancel(){this.cancelled=!0,this.parent.__cancelRequest(this.id)}__completedCall(e,t,o){o.isaborted&&(this.cancelled=!0),e===0?this.onsuccess&&!this.cancelled&&this.onsuccess(t):this.cancelled||(this.stack&&(console.log("Stack at calling point:"),console.log(this.stack)),this.parent.handleError(this.onfailure,e,t,this.id))}};Gp.exports=ua});var Lu=it((UC,Qs)=>{(function(i,e,t){var o=i.requestAnimationFrame||i.webkitRequestAnimationFrame||i.mozRequestAnimationFrame||i.oRequestAnimationFrame||i.msRequestAnimationFrame||function(a){i.setTimeout(a,16.666666666666668)},n=(function(){var a={},d=e.createElement("div").style,c=(function(){for(var u=["t","webkitT","MozT","msT","OT"],b,f=0,g=u.length;f<g;f++)if(b=u[f]+"ransform",b in d)return u[f].substr(0,u[f].length-1);return!1})();function h(u){return c===!1?!1:c===""?u:c+u.charAt(0).toUpperCase()+u.substr(1)}a.getTime=Date.now||function(){return new Date().getTime()},a.extend=function(u,b){for(var f in b)u[f]=b[f]}
1,a.addEvent=function(u,b,f,g){u.addEventListener(b,f,!!g)},a.removeEvent=function(u,b,f,g){u.removeEventListener(b,f,!!g)},a.prefixPointerEvent=function(u){return i.MSPointerEvent?"MSPointer"+u.charAt(7).toUpperCase()+u.substr(8):u},a.momentum=function(u,b,f,g,_,y){var E=u-b,S=t.abs(E)/f,P,z;return y=y===void 0?6e-4:y,P=u+S*S/(2*y)*(E<0?-1:1),z=S/y,P<g?(P=_?g-_/2.5*(S/8):g,E=t.abs(P-u),z=E/S):P>0&&(P=_?_/2.5*(S/8):0,E=t.abs(u)+P,z=E/S),{destination:t.round(P),duration:z}};var m=h("transform");return a.extend(a,{hasTransform:m!==!1,hasPerspective:h("perspective")in d,hasTouch:"ontouchstart"in i,hasPointer:!!(i.PointerEvent||i.MSPointerEvent),hasTransition:h("transition")in d}),a.isBadAndroid=(function(){var u=i.navigator.appVersion;if(/Android/.test(u)&&!/Chrome\/\d/.test(u)){var b=u.match(/Safari\/(\d+.\d)/);return b&&typeof b=="object"&&b.length>=2?parseFloat(b[1])<535.19:!0}else return!1})(),a.extend(a.style={},{transform:m,transitionTimingFunction:h("transitionTimingFunction"),transitionDuration:h("transitionDuration"),transitionDelay:h("transitionDelay"),transformOrigin:h("transformOrigin")}),a.hasClass=function(u,b){var f=new RegExp("(^|\\s)"+b+"(\\s|$)");return f.test(u.className)},a.addClass=function(u,b){if(!a.hasClass(u,b)){var f=u.className.split(" ");f.push(b),u.className=f.join(" ")}},a.removeClass=function(u,b){if(a.hasClass(u,b)){var f=new RegExp("(^|\\s)"+b+"(\\s|$)","g");u.className=u.className.replace(f," ")}},a.offset=function(u){for(var b=-u.offsetLeft,f=-u.offsetTop;u=u.offsetParent;)b-=u.offsetLeft,f-=u.offsetTop;return{left:b,top:f}},a.preventDefaultException=function(u,b){for(var f in b)if(b[f].test(u[f]))return!0;return!1},a.extend(a.eventType={},{touchstart:1,touchmove:1,touchend:1,mousedown:2,mousemove:2,mouseup:2,pointerdown:3,pointermove:3,pointerup:3,MSPointerDown:3,MSPointerMove:3,MSPointerUp:3}),a.extend(a.ease={},{quadratic:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(u){return u*(2-u)}},circular:{style:"cubic-bezier(0.1, 0.57, 0.1, 1)",fn:function(u){return t.sqrt(1- --u*u)}},back:{style:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",fn:function(u){var b=4;return(u=u-1)*u*((b+1)*u+b)+1}},bounce:{style:"",fn:function(u){return(u/=1)<1/2.75?7.5625*u*u:u<2/2.75?7.5625*(u-=1.5/2.75)*u+.75:u<2.5/2.75?7.5625*(u-=2.25/2.75)*u+.9375:7.5625*(u-=2.625/2.75)*u+.984375}},elastic:{style:"",fn:function(u){var b=.22,f=.4;return u===0?0:u==1?1:f*t.pow(2,-10*u)*t.sin((u-b/4)*(2*t.PI)/b)+1}}}),a.tap=function(u,b){var f=e.createEvent("Event");f.initEvent(b,!0,!0),f.pageX=u.pageX,f.pageY=u.pageY,f.tapbytouch=u.type=="touchend",f.tapbymouse=u.type=="mouseup",u.target.dispatchEvent(f)},a.click=function(u){var b=u.target,f;/(SELECT|INPUT|TEXTAREA)/i.test(b.tagName)||(f=e.createEvent(i.MouseEvent?"MouseEvents":"Event"),f.initEvent("click",!0,!0),f.view=u.view||i,f.detail=1,f.screenX=b.screenX||0,f.screenY=b.screenY||0,f.clientX=b.clientX||0,f.clientY=b.clientY||0,f.ctrlKey=!!u.ctrlKey,f.altKey=!!u.altKey,f.shiftKey=!!u.shiftKey,f.metaKey=!!u.metaKey,f.button=0,f.relatedTarget=null,f._constructed=!0,b.dispatchEvent(f))},a})();function s(a,d){this.wrapper=typeof a=="string"?e.querySelector(a):a,this.scroller=this.wrapper.children[0],this.scrollerStyle=this.scroller.style,this.options={resizeScrollbars:!0,mouseWheelSpeed:20,snapThreshold:.334,disablePointer:!n.hasPointer,disableTouch:n.hasPointer||!n.hasTouch,disableMouse:n.hasPointer||n.hasTouch,startX:0,startY:0,scrollY:!0,directionLockThreshold:5,momentum:!0,bounce:!0,bounceTime:600,bounceEasing:"",preventDefault:!0,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT)$/},HWCompositing:!0,useTransition:!0,useTransform:!0,bindToWrapper:typeof i.onmousedown>"u",autoUpdatePosition:!0,overrideMeasurements:!1};for(var c in d)this.options[c]=d[c];this.translateZ=this.options.HWCompositing&&n.hasPerspective?" translateZ(0)":"",this.options.useTransition=n.hasTransition&&this.options.useTransition,this.options.useTransform=n.hasTransform&&this.options.useTransform,this.options.eventPassthrough=this.options.eventPassthrough===!0?"vertical":this.options.eventPassthrough,this.options.preventDefault=!this.options.eventPassthrough&&this.options.preventDefault,this.options.scrollY=this.options.eventPassthrough=="vertical"?!1:this.options.scrollY,this.options.scrollX=this.options.eventPassthrough=="horizontal"?!1:this.options.scrollX,this.options.freeScroll=this.options.freeScroll&&!this.options.eventPassthrough,this.options.directionLockThreshold=this.options.eventPassthrough?0:this.options.directionLockThreshold,this.options.bounceEasing=typeof this.options.bounceEasing=="string"?n.ease[this.options.bounceEasing]||n.ease.circular:this.options.bounceEasing,this.options.resizePolling=this.options.resizePolling===void 0?60:this.options.resizePolling,this.options.tap===!0&&(this.options.tap="tap"),!this.options.useTransition&&!this.options.useTransform&&(/relative|absolute/i.test(this.scrollerStyle.position)||(this.scrollerStyle.position="relative")),this.options.shrinkScrollbars=="scale"&&(this.options.useTransition=!1),this.options.invertWheelDirection=this.options.invertWheelDirection?-1:1,d.overrideMeasurements&&(this.wrapperW
1idth=d.wrapperWidth,this.scrollerWidth=d.scrollerWidth,this.maxScrollX=-d.maxScrollX,this.hasHorizontalScroll=d.scrollX&&this.maxScrollX<0,this.hasVerticalScroll=d.scrollY&&this.maxScrollY<0),this.x=0,this.y=0,this.directionX=0,this.directionY=0,this._events={},this._init(),this.refresh(),this.scrollTo(this.options.startX,this.options.startY),this.enable()}s.prototype={version:"5.2.0",_init:function(){this._initEvents(),(this.options.scrollbars||this.options.indicators)&&this._initIndicators(),this.options.mouseWheel&&this._initWheel(),this.options.snap&&this._initSnap(),this.options.keyBindings&&this._initKeys()},destroy:function(){this._initEvents(!0),clearTimeout(this.resizeTimeout),this.resizeTimeout=null,this._execEvent("destroy")},_transitionEnd:function(a){a.target!=this.scroller||!this.isInTransition||(this._transitionTime(),this.resetPosition(this.options.bounceTime)||(this.isInTransition=!1,this._execEvent("scrollEnd")))},_start:function(a){if(n.eventType[a.type]!=1){var d;if(a.which?d=a.button:d=a.button<2?0:a.button==4?1:2,d!==0)return}if(!(!this.enabled||this.initiated&&n.eventType[a.type]!==this.initiated)){this.options.preventDefault&&!n.isBadAndroid&&!n.preventDefaultException(a.target,this.options.preventDefaultException)&&a.preventDefault();var c=a.touches?a.touches[0]:a,h;this.initiated=n.eventType[a.type],this.moved=!1,this.distX=0,this.distY=0,this.directionX=0,this.directionY=0,this.directionLocked=0,this.startTime=n.getTime(),this.options.useTransition&&this.isInTransition?(this._transitionTime(),this.isInTransition=!1,h=this.getComputedPosition(),this._translate(t.round(h.x),t.round(h.y)),this._execEvent("scrollEnd")):!this.options.useTransition&&this.isAnimating&&(this.isAnimating=!1,this._execEvent("scrollEnd")),this.startX=this.x,this.startY=this.y,this.absStartX=this.x,this.absStartY=this.y,this.pointX=c.pageX,this.pointY=c.pageY,this._execEvent("beforeScrollStart")}},_move:function(a){if(!(!this.enabled||n.eventType[a.type]!==this.initiated)){this.options.preventDefault&&a.preventDefault();var d=a.touches?a.touches[0]:a,c=d.pageX-this.pointX,h=d.pageY-this.pointY,m=n.getTime(),u,b,f,g;if(this.pointX=d.pageX,this.pointY=d.pageY,this.distX+=c,this.distY+=h,f=t.abs(this.distX),g=t.abs(this.distY),!(m-this.endTime>300&&f<10&&g<10)){if(!this.directionLocked&&!this.options.freeScroll&&(f>g+this.options.directionLockThreshold?this.directionLocked="h":g>=f+this.options.directionLockThreshold?this.directionLocked="v":this.directionLocked="n"),this.directionLocked=="h"){if(this.options.eventPassthrough=="vertical")a.preventDefault();else if(this.options.eventPassthrough=="horizontal"){this.initiated=!1;return}h=0}else if(this.directionLocked=="v"){if(this.options.eventPassthrough=="horizontal")a.preventDefault();else if(this.options.eventPassthrough=="vertical"){this.initiated=!1;return}c=0}c=this.hasHorizontalScroll?c:0,h=this.hasVerticalScroll?h:0,u=this.x+c,b=this.y+h,(u>0||u<this.maxScrollX)&&(u=this.options.bounce?this.x+c/3:u>0?0:this.maxScrollX),(b>0||b<this.maxScrollY)&&(b=this.options.bounce?this.y+h/3:b>0?0:this.maxScrollY),this.directionX=c>0?-1:c<0?1:0,this.directionY=h>0?-1:h<0?1:0,this.moved||this._execEvent("scrollStart"),this.moved=!0,this._translate(u,b),m-this.startTime>300&&(this.startTime=m,this.startX=this.x,this.startY=this.y)}}},_end:function(a){if(!(!this.enabled||n.eventType[a.type]!==this.initiated)){this.options.preventDefault&&!n.preventDefaultException(a.target,this.options.preventDefaultException)&&a.preventDefault();var d=a.changedTouches?a.changedTouches[0]:a,c,h,m=n.getTime()-this.startTime,u=t.round(this.x),b=t.round(this.y),f=t.abs(u-this.startX),g=t.abs(b-this.startY),_=0,y="";if(this.isInTransition=0,this.initiated=0,this.endTime=n.getTime(),!this.resetPosition(this.options.bounceTime)){if(this.scrollTo(u,b),!this.moved){this.options.tap&&n.tap(a,this.options.tap),this.options.click&&n.click(a),this._execEvent("scrollCancel");return}if(this.options.momentum&&m<300&&(c=this.hasHorizontalScroll?n.momentum(this.x,this.startX,m,this.maxScrollX,this.options.bounce?this.wrapperW
1idth:0,this.options.deceleration):{destination:u,duration:0},h=this.hasVerticalScroll?n.momentum(this.y,this.startY,m,this.maxScrollY,this.options.bounce?this.wrapperHeight:0,this.options.deceleration):{destination:b,duration:0},u=c.destination,b=h.destination,_=t.max(c.duration,h.duration),this.isInTransition=1),this.options.snap){var E=this._nearestSnap(u,b);this.currentPage=E,_=this.options.snapSpeed||t.max(t.max(t.min(t.abs(u-E.x),1e3),t.min(t.abs(b-E.y),1e3)),300),u=E.x,b=E.y,this.directionX=0,this.directionY=0,y=this.options.bounceEasing}if(u!=this.x||b!=this.y){(u>0||u<this.maxScrollX||b>0||b<this.maxScrollY)&&(y=n.ease.quadratic),this.scrollTo(u,b,_,y);return}this._execEvent("scrollEnd")}}},_resize:function(){var a=this;clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(function(){a.refresh()},this.options.resizePolling)},resetPosition:function(a){var d=this.x,c=this.y;return a=a||0,!this.hasHorizontalScroll||this.x>0?d=0:this.x<this.maxScrollX&&(d=this.maxScrollX),!this.hasVerticalScroll||this.y>0?c=0:this.y<this.maxScrollY&&(c=this.maxScrollY),d==this.x&&c==this.y?!1:(this.scrollTo(d,c,a,this.options.bounceEasing),!0)},disable:function(){this.wrapper.style.touchAction="",this.enabled=!1},enable:function(){this.enabled=!0;var a="none";this.options.eventPassthrough=="vertical"?a="pan-y":this.options.eventPassthrough=="horizontal"&&(a="pan-x"),this.wrapper.style.touchAction=a,a!="none"&&(this.wrapper.style.touchAction+=" pinch-zoom")},refresh:function(){var a=this.wrapper.offsetHeight;this.wrapperWidth=this.wrapper.clientWidth,this.wrapperHeight=this.wrapper.clientHeight,this.options.overrideMeasurements||(this.scrollerWidth=this.scroller.offsetWidth,this.scrollerHeight=this.scroller.offsetHeight,this.maxScrollX=this.wrapperWidth-this.scrollerWidth,this.maxScrollY=this.wrapperHeight-this.scrollerHeight),this.hasHorizontalScroll=this.options.scrollX&&this.maxScrollX<0,this.hasVerticalScroll=this.options.scrollY&&this.maxScrollY<0,this.hasHorizontalScroll||(this.maxScrollX=0,this.scrollerWidth=this.wrapperWidth),this.hasVerticalScroll||(this.maxScrollY=0,this.scrollerHeight=this.wrapperHeight),this.endTime=0,this.directionX=0,this.directionY=0,this.wrapperOffset=n.offset(this.wrapper),this._execEvent("refresh"),this.resetPosition()},on:function(a,d){this._events[a]||(this._events[a]=[]),this._events[a].push(d)},off:function(a,d){if(this._events[a]){var c=this._events[a].indexOf(d);c>-1&&this._events[a].splice(c,1)}},_execEvent:function(a){if(this._events[a]){var d=0,c=this._events[a].length;if(c)for(;d<c;d++)this._events[a][d].apply(this,[].slice.call(arguments,1))}},scrollBy:function(a,d,c,h){a=this.x+a,d=this.y+d,c=c||0,this.scrollTo(a,d,c,h)},scrollTo:function(a,d,c,h){this._execEvent("scrollStart"),this.animframe&&cancelAnimationFrame(this.animframe),h=h||n.ease.circular,this.isInTransition=this.options.useTransition&&c>0;var m=this.options.useTransition&&h.style;!c||m?(m&&(this._transitionTimingFunction(h.style),this._transitionTime(c)),this._translate(a,d)):this._animate(a,d,c,h.fn)},scrollToElement:function(a,d,c,h,m){if(a=a.nodeType?a:this.scroller.querySelector(a),!!a){var u=n.offset(a);u.left-=this.wrapperOffset.left,u.top-=this.wrapperOffset.top,c===!0&&(c=t.round(a.offsetWidth/2-this.wrapper.offsetWidth/2)),h===!0&&(h=t.round(a.offsetHeight/2-this.wrapper.offsetHeight/2)),u.left-=c||0,u.top-=h||0,u.left=u.left>0?0:u.left<this.maxScrollX?this.maxScrollX:u.left,u.top=u.top>0?0:u.top<this.maxScrollY?this.maxScrollY:u.top,d=d==null||d==="auto"?t.max(t.abs(this.x-u.left),t.abs(this.y-u.top)):d,this.scrollTo(u.left,u.top,d,m)}},_transitionTime:function(a){if(!this.options.autoUpdatePosition&&this.options.useTransition){a=a||0;var d=n.style.transitionDuration;if(d){if(this.scrollerStyle[d]=a+"ms",!a&&n.isBadAndroid){this.scrollerStyle[d]="0.0001ms";var c=this;o(function(){c.scrollerStyle[d]==="0.0001ms"&&(c.scrollerStyle[d]="0s")})}if(this.indicators)for(var h=this.indicators.length;h--;)this.indicators[h].transitionTime(a)}}},_transitionTimingFunction:function(a){if(!this.options.autoUpdatePosition&&(this.scrollerStyle[n.style.transitionTimingFunction]=a,this.indicators))for(var d=this.indicators.length;d--;)this.indicators[d].transitionTimingFunction(a)},_translate:function(a,d){if(this.options.autoUpdatePosition&&(this.options.useTransform?this.scrollerStyle[n.style.transform]="translate("+a+"px,"+d+"px)"+this.translateZ:(a=t.round(a),d=t.round(d),this.scrollerStyle.left=a+"px",this.scrollerStyle.top=d+"px")),this.x=a,this.y=d,this.indicators)for(var c=this.indicators.length;c--;)this.indicators[c].updatePosition()},_initEvents:function(a){var d=a?n.removeEvent:n.addEvent,c=this.options.bindToWrapper?this.wrapper:i;this.options.overrideMeasurements||(d(i,"orientationchange",this),d(i,"resize",this)),this.options.click&&d(this.wrapper,"click",this,
1!0),this.options.disableMouse||(d(this.wrapper,"mousedown",this),d(c,"mousemove",this),d(c,"mousecancel",this),d(c,"mouseup",this)),n.hasPointer&&!this.options.disablePointer&&(d(this.wrapper,n.prefixPointerEvent("pointerdown"),this),d(c,n.prefixPointerEvent("pointermove"),this),d(c,n.prefixPointerEvent("pointercancel"),this),d(c,n.prefixPointerEvent("pointerup"),this)),n.hasTouch&&!this.options.disableTouch&&(d(this.wrapper,"touchstart",this),d(c,"touchmove",this),d(c,"touchcancel",this),d(c,"touchend",this)),d(this.scroller,"transitionend",this),d(this.scroller,"webkitTransitionEnd",this),d(this.scroller,"MSTransitionEnd",this)},getComputedPosition:function(){var a=i.getComputedStyle(this.scroller,null),d,c;return this.options.useTransform?(a=a[n.style.transform].split(")")[0].split(", "),d=+(a[12]||a[4]),c=+(a[13]||a[5])):(d=+a.left.replace(/[^-\d.]/g,""),c=+a.top.replace(/[^-\d.]/g,"")),{x:d,y:c}},_initIndicators:function(){var a=this.options.interactiveScrollbars,d=typeof this.options.scrollbars!="string",c=[],h,m=this;this.indicators=[],this.options.scrollbars&&(this.options.scrollY&&(h={el:r("v",a,this.options.scrollbars),interactive:a,defaultScrollbars:!0,customStyle:d,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenX:!1},this.wrapper.appendChild(h.el),c.push(h)),this.options.scrollX&&(h={el:r("h",a,this.options.scrollbars),interactive:a,defaultScrollbars:!0,customStyle:d,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenY:!1},this.wrapper.appendChild(h.el),c.push(h))),this.options.indicators&&(c=c.concat(this.options.indicators));for(var u=c.length;u--;)this.indicators.push(new l(this,c[u]));function b(f){if(m.indicators)for(var g=m.indicators.length;g--;)f.call(m.indicators[g])}this.options.fadeScrollbars&&(this.on("scrollEnd",function(){b(function(){this.fade()})}),this.on("scrollCancel",function(){b(function(){this.fade()})}),this.on("scrollStart",function(){b(function(){this.fade(1)})}),this.on("beforeScrollStart",function(){b(function(){this.fade(1,!0)})})),this.on("refresh",function(){b(function(){this.refresh()})}),this.on("destroy",function(){b(function(){this.destroy()}),delete this.indicators})},_initWheel:function(){n.addEvent(this.wrapper,"wheel",this),n.addEvent(this.wrapper,"mousewheel",this),n.addEvent(this.wrapper,"DOMMouseScroll",this),this.on("destroy",function(){clearTimeout(this.wheelTimeout),this.wheelTimeout=null,n.removeEvent(this.wrapper,"wheel",this),n.removeEvent(this.wrapper,"mousewheel",this),n.removeEvent(this.wrapper,"DOMMouseScroll",this)})},_wheel:function(a){if(this.enabled){a.preventDefault();var d,c,h,m,u=this;if(this.wheelTimeout===void 0&&u._execEvent("scrollStart"),clearTimeout(this.wheelTimeout),this.wheelTimeout=setTimeout(function(){u.options.snap||u._execEvent("scrollEnd"),u.wheelTimeout=void 0},400),"deltaX"in a)a.deltaMode===1?(d=-a.deltaX*this.options.mouseWheelSpeed,c=-a.deltaY*this.options.mouseWheelSpeed):(d=-a.deltaX,c=-a.deltaY);else if("wheelDeltaX"in a)d=a.wheelDeltaX/120*this.options.mouseWheelSpeed,c=a.wheelDeltaY/120*this.options.mouseWheelSpeed;else if("wheelDelta"in a)d=c=a.wheelDelta/120*this.options.mouseWheelSpeed;else if("detail"in a)d=c=-a.detail/3*this.options.mouseWheelSpeed;else return;if(d*=this.options.invertWheelDirection,c*=this.options.invertWheelDirection,this.hasVerticalScroll||(d=c,c=0),this.options.snap){h=this.currentPage.pageX,m=this.currentPage.pageY,d>0?h--:d<0&&h++,c>0?m--:c<0&&m++,this.goToPage(h,m);return}h=this.x+t.round(this.hasHorizontalScroll?d:0),m=this.y+t.round(this.hasVerticalScroll?c:0),this.directionX=d>0?-1:d<0?1:0,this.directionY=c>0?-1:c<0?1:0,h>0?h=0:h<this.maxScrollX&&(h=this.maxScrollX),m>0?m=0:m<this.maxScrollY&&(m=this.maxScrollY),this.scrollTo(h,m,0)}},_initSnap:function(){this.currentPage={},typeof this.options.snap=="string"&&(this.options.snap=this.scroller.querySelectorAll(this.options.snap)),this.on("refresh",function(){var a=0,d,c=0,h,m,u,b=0,f,g=this.options.snapStepX||this.wrapperW
1idth,_=this.options.snapStepY||this.wrapperHeight,y;if(this.pages=[],!(!this.wrapperWidth||!this.wrapperHeight||!this.scrollerWidth||!this.scrollerHeight)){if(this.options.snap===!0)for(m=t.round(g/2),u=t.round(_/2);b>-this.scrollerWidth;){for(this.pages[a]=[],d=0,f=0;f>-this.scrollerHeight;)this.pages[a][d]={x:t.max(b,this.maxScrollX),y:t.max(f,this.maxScrollY),width:g,height:_,cx:b-m,cy:f-u},f-=_,d++;b-=g,a++}else for(y=this.options.snap,d=y.length,h=-1;a<d;a++)(a===0||y[a].offsetLeft<=y[a-1].offsetLeft)&&(c=0,h++),this.pages[c]||(this.pages[c]=[]),b=t.max(-y[a].offsetLeft,this.maxScrollX),f=t.max(-y[a].offsetTop,this.maxScrollY),m=b-t.round(y[a].offsetWidth/2),u=f-t.round(y[a].offsetHeight/2),this.pages[c][h]={x:b,y:f,width:y[a].offsetWidth,height:y[a].offsetHeight,cx:m,cy:u},b>this.maxScrollX&&c++;this.goToPage(this.currentPage.pageX||0,this.currentPage.pageY||0,0),this.options.snapThreshold%1===0?(this.snapThresholdX=this.options.snapThreshold,this.snapThresholdY=this.options.snapThreshold):(this.snapThresholdX=t.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].width*this.options.snapThreshold),this.snapThresholdY=t.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].height*this.options.snapThreshold))}}),this.on("flick",function(){console.info("FLICK");var a=this.options.snapSpeed||t.max(t.max(t.min(t.abs(this.x-this.startX),1e3),t.min(t.abs(this.y-this.startY),1e3)),300);this.goToPage(this.currentPage.pageX+this.directionX,this.currentPage.pageY+this.directionY,a)})},_nearestSnap:function(a,d){if(this.options.getNearestSnap){var c=this.options.getNearestSnap(a,d,this);return c}if(!this.pages.length)return{x:0,y:0,pageX:0,pageY:0};var h=0,m=this.pages.length,u=0;if(t.abs(a-this.absStartX)<this.snapThresholdX&&t.abs(d-this.absStartY)<this.snapThresholdY)return this.currentPage;for(a>0?a=0:a<this.maxScrollX&&(a=this.maxScrollX),d>0?d=0:d<this.maxScrollY&&(d=this.maxScrollY);h<m;h++)if(a>=this.pages[h][0].cx){a=this.pages[h][0].x;break}for(m=this.pages[h].length;u<m;u++)if(d>=this.pages[0][u].cy){d=this.pages[0][u].y;break}return h==this.currentPage.pageX&&(h+=this.directionX,h<0?h=0:h>=this.pages.length&&(h=this.pages.length-1),a=this.pages[h][0].x),u==this.currentPage.pageY&&(u+=this.directionY,u<0?u=0:u>=this.pages[0].length&&(u=this.pages[0].length-1),d=this.pages[0][u].y),{x:a,y:d,pageX:h,pageY:u}},goToPage:function(a,d,c,h){if(h=h||this.options.bounceEasing,this.options.getPage){var m=this.options.getPage(a,d),u=m.x,b=m.y;c=c===void 0?this.options.snapSpeed||t.max(t.max(t.min(t.abs(u-this.x),1e3),t.min(t.abs(b-this.y),1e3)),300):c,this.currentPage={x:m.x,y:m.y,pageX:m.x,pageY:m.y},this.scrollTo(u,b,c,h);return}a>=this.pages.length?a=this.pages.length-1:a<0&&(a=0),d>=this.pages[a].length?d=this.pages[a].length-1:d<0&&(d=0);var u=this.pages[a][d].x,b=this.pages[a][d].y;c=c===void 0?this.options.snapSpeed||t.max(t.max(t.min(t.abs(u-this.x),1e3),t.min(t.abs(b-this.y),1e3)),300):c,this.currentPage={x:u,y:b,pageX:a,pageY:d},this.scrollTo(u,b,c,h)},next:function(a,d){var c=this.currentPage.pageX,h=this.currentPage.pageY;c++,c>=this.pages.length&&this.hasVerticalScroll&&(c=0,h++),this.goToPage(c,h,a,d)},prev:function(a,d){var c=this.currentPage.pageX,h=this.currentPage.pageY;c--,c<0&&this.hasVerticalScroll&&(c=0,h--),this.goToPage(c,h,a,d)},_initKeys:function(a){var d={pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40},c;if(typeof this.options.keyBindings=="object")for(c in this.options.keyBindings)typeof this.options.keyBindings[c]=="string"&&(this.options.keyBindings[c]=this.options.keyBindings[c].toUpperCase().charCodeAt(0));else this.options.keyBindings={};for(c in d)this.options.keyBindings[c]=this.options.keyBindings[c]||d[c];n.addEvent(i,"keydown",this),this.on("destroy",function(){n.removeEvent(i,"keydown",this)})},_key:function(a){if(this.enabled){console.log(this.tempid);var d=this.options.snap,c=d?this.currentPage.pageX:this.x,h=d?this.currentPage.pageY:this.y,m=n.getTime(),u=this.keyTime||0,b=.25,f;switch(this.options.useTransition&&this.isInTransition&&(f=this.getComputedPosition(),this._translate(t.round(f.x),t.round(f.y)),this.isInTransition=!1),this.keyAcceleration=m-u<200?t.min(this.keyAcceleration+b,50):0,a.keyCode){case this.options.keyBindings.pageUp:this.hasHorizontalScroll&&!this.hasVerticalScroll?c+=d?1:this.wrapperW
1idth:h+=d?1:this.wrapperHeight;break;case this.options.keyBindings.pageDown:this.hasHorizontalScroll&&!this.hasVerticalScroll?c-=d?1:this.wrapperWidth:h-=d?1:this.wrapperHeight;break;case this.options.keyBindings.end:c=d?this.pages.length-1:this.maxScrollX,h=d?this.pages[0].length-1:this.maxScrollY;break;case this.options.keyBindings.home:c=0,h=0;break;case this.options.keyBindings.left:c+=d?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.up:h+=d?1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.right:c-=d?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.down:h-=d?1:5+this.keyAcceleration>>0;break;default:return}if(d){this.goToPage(c,h);return}c>0?(c=0,this.keyAcceleration=0):c<this.maxScrollX&&(c=this.maxScrollX,this.keyAcceleration=0),h>0?(h=0,this.keyAcceleration=0):h<this.maxScrollY&&(h=this.maxScrollY,this.keyAcceleration=0),this.scrollTo(c,h,0),this.keyTime=m}},_animate:function(a,d,c,h){var m=this,u=this.x,b=this.y,f=n.getTime(),g=f+c;this.animframe&&cancelAnimationFrame(this.animframe);function _(){var y=n.getTime(),E,S,P;if(y>=g){m.isAnimating=!1,m._translate(a,d),m.resetPosition(m.options.bounceTime)||m._execEvent("scrollEnd");return}y=(y-f)/c,P=h(y),E=(a-u)*P+u,S=(d-b)*P+b,m._translate(E,S),m.isAnimating&&(m.animframe=o(_))}this.isAnimating=!0,_()},handleEvent:function(a){switch(a.type){case"touchstart":case"pointerdown":case"MSPointerDown":case"mousedown":this._start(a);break;case"touchmove":case"pointermove":case"MSPointerMove":case"mousemove":this._move(a);break;case"touchend":case"pointerup":case"MSPointerUp":case"mouseup":case"touchcancel":case"pointercancel":case"MSPointerCancel":case"mousecancel":this._end(a);break;case"orientationchange":case"resize":this._resize();break;case"transitionend":case"webkitTransitionEnd":case"MSTransitionEnd":this._transitionEnd(a);break;case"wheel":case"DOMMouseScroll":case"mousewheel":this._wheel(a);break;case"keydown":this._key(a);break;case"click":this.enabled&&!a._constructed&&(a.preventDefault(),a.stopPropagation());break}}};function r(a,d,c){var h=e.createElement("div"),m=e.createElement("div");return c===!0&&(h.style.cssText="position:absolute;z-index:9999",m.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px"),m.className="iScrollIndicator",a=="h"?(c===!0&&(h.style.cssText+=";height:7px;left:2px;right:2px;bottom:0",m.style.height="100%"),h.className="iScrollHorizontalScrollbar"):(c===!0&&(h.style.cssText+=";width:7px;bottom:2px;top:2px;right:1px",m.style.width="100%"),h.className="iScrollVerticalScrollbar"),h.style.cssText+=";overflow:hidden",d||(h.style.pointerEvents="none"),h.appendChild(m),h}function l(a,d){this.wrapper=typeof d.el=="string"?e.querySelector(d.el):d.el,this.wrapperStyle=this.wrapper.style,this.indicator=this.wrapper.children[0],this.indicatorStyle=this.indicator.style,this.scroller=a,this.options={listenX:!0,listenY:!0,interactive:!1,resize:!0,defaultScrollbars:!1,shrink:!1,fade:!1,speedRatioX:0,speedRatioY:0};for(var c in d)this.options[c]=d[c];if(this.sizeRatioX=1,this.sizeRatioY=1,this.maxPosX=0,this.maxPosY=0,this.options.interactive&&(this.options.disableTouch||(n.addEvent(this.indicator,"touchstart",this),n.addEvent(i,"touchend",this)),this.options.disablePointer||(n.addEvent(this.indicator,n.prefixPointerEvent("pointerdown"),this),n.addEvent(i,n.prefixPointerEvent("pointerup"),this)),this.options.disableMouse||(n.addEvent(this.indicator,"mousedown",this),n.addEvent(i,"mouseup",this))),this.options.fade){this.wrapperStyle[n.style.transform]=this.scroller.translateZ;var h=n.style.transitionDuration;if(!h)return;this.wrapperStyle[h]=n.isBadAndroid?"0.0001ms":"0ms";var m=this;n.isBadAndroid&&o(function(){m.wrapperStyle[h]==="0.0001ms"&&(m.wrapperStyle[h]="0s")}),this.wrapperStyle.opacity="0"}}l.prototype={handleEvent:function(a){switch(a.type){case"touchstart":case"pointerdown":case"MSPointerDown":case"mousedown":this._start(a);break;case"touchmove":case"pointermove":case"MSPointerMove":case"mousemove":this._move(a);break;case"touchend":case"pointerup":case"MSPointerUp":case"mouseup":case"touchcancel":case"pointercancel":case"MSPointerCancel":case"mousecancel":this._end(a);break}},destroy:function(){this.options.fadeScrollbars&&(clearTimeout(this.fadeTimeout),this.fadeTimeout=null),this.options.interactive&&(n.removeEvent(this.indicator,"touchstart",this),n.removeEvent(this.indicator,n.prefixPointerEvent("pointerdown"),this),n.removeEvent(this.indicator,"mousedown",this),n.removeEvent(i,"touchmove",this),n.removeEvent(i,n.prefixPointerEvent("pointermove"),this),n.removeEvent(i,"mousemove",this),n.removeEvent(i,"touchend",this),n.removeEvent(i,n.prefixPointerEvent("pointerup"),this),n.removeEvent(i,"mouseup",this)),this.options.defaultScrollbars&&this.wrapper.parentNode.removeChild(this.wrapper)},_start:function(a){var d=a.touches?a.touches[0]:a;a.preventDefault(),a.stopPropagation(),this.transitionTime(),this.initiated=!0,this.moved=!1,this.lastPointX=d.pageX,this.lastPointY=d.pageY,this.startTime=n.getTime(),this.options.disableTouch||n.addEvent(i,"touchmove",this),this.options.disablePointer||n.addEvent(i,n.prefixPointerEvent("pointermove"),this),this.options.disableMouse||n.addEvent(i,"mousemove",this),this.scroller._execEvent("beforeScrollStart")},_move:function(a){var d=a.touches?a.touches[0]:a,c,h,m,u,b=n.getTime();this.moved||this.scroller._execEvent("scrollStart"),this.moved=!0,c=d.pageX-this.lastPointX,this.lastPointX=d.pageX,h=d.pageY-this.lastPointY,this.lastPointY=d.pageY,m=this.x+c,u=this.y+h,this._pos(m,u),a.preventDefault(),a.stopPropagation()}
1,_end:function(a){if(this.initiated){if(this.initiated=!1,a.preventDefault(),a.stopPropagation(),n.removeEvent(i,"touchmove",this),n.removeEvent(i,n.prefixPointerEvent("pointermove"),this),n.removeEvent(i,"mousemove",this),this.scroller.options.snap){var d=this.scroller._nearestSnap(this.scroller.x,this.scroller.y),c=this.options.snapSpeed||t.max(t.max(t.min(t.abs(this.scroller.x-d.x),1e3),t.min(t.abs(this.scroller.y-d.y),1e3)),300);(this.scroller.x!=d.x||this.scroller.y!=d.y)&&(this.scroller.directionX=0,this.scroller.directionY=0,this.scroller.currentPage=d,this.scroller.scrollTo(d.x,d.y,c,this.scroller.options.bounceEasing))}this.moved&&this.scroller._execEvent("scrollEnd")}},transitionTime:function(a){a=a||0;var d=n.style.transitionDuration;if(d&&(this.indicatorStyle[d]=a+"ms",!a&&n.isBadAndroid)){this.indicatorStyle[d]="0.0001ms";var c=this;o(function(){c.indicatorStyle[d]==="0.0001ms"&&(c.indicatorStyle[d]="0s")})}},transitionTimingFunction:function(a){this.indicatorStyle[n.style.transitionTimingFunction]=a},refresh:function(){if(!this.options.overrideMeasurements){this.transitionTime(),this.options.listenX&&!this.options.listenY?this.indicatorStyle.display=this.scroller.hasHorizontalScroll?"block":"none":this.options.listenY&&!this.options.listenX?this.indicatorStyle.display=this.scroller.hasVerticalScroll?"block":"none":this.indicatorStyle.display=this.scroller.hasHorizontalScroll||this.scroller.hasVerticalScroll?"block":"none",this.scroller.hasHorizontalScroll&&this.scroller.hasVerticalScroll?(n.addClass(this.wrapper,"iScrollBothScrollbars"),n.removeClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="8px":this.wrapper.style.bottom="8px")):(n.removeClass(this.wrapper,"iScrollBothScrollbars"),n.addClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="2px":this.wrapper.style.bottom="2px"));var a=this.wrapper.offsetHeight;this.options.listenX&&(this.wrapperWidth=this.wrapper.clientWidth,this.options.resize?(this.indicatorWidth=t.max(t.round(this.wrapperWidth*this.wrapperWidth/(this.scroller.scrollerWidth||this.wrapperWidth||1)),8),this.indicatorStyle.width=this.indicatorWidth+"px"):this.indicatorWidth=this.indicator.clientWidth,this.maxPosX=this.wrapperWidth-this.indicatorWidth,this.options.shrink=="clip"?(this.minBoundaryX=-this.indicatorWidth+8,this.maxBoundaryX=this.wrapperWidth-8):(this.minBoundaryX=0,this.maxBoundaryX=this.maxPosX),this.sizeRatioX=this.options.speedRatioX||this.scroller.maxScrollX&&this.maxPosX/this.scroller.maxScrollX),this.options.listenY&&(this.wrapperHeight=this.wrapper.clientHeight,this.options.resize?(this.indicatorHeight=t.max(t.round(this.wrapperHeight*this.wrapperHeight/(this.scroller.scrollerHeight||this.wrapperHeight||1)),8),this.indicatorStyle.height=this.indicatorHeight+"px"):this.indicatorHeight=this.indicator.clientHeight,this.maxPosY=this.wrapperHeight-this.indicatorHeight,this.options.shrink=="clip"?(this.minBoundaryY=-this.indicatorHeight+8,this.maxBoundaryY=this.wrapperHeight-8):(this.minBoundaryY=0,this.maxBoundaryY=this.maxPosY),this.maxPosY=this.wrapperHeight-this.indicatorHeight,this.sizeRatioY=this.options.speedRatioY||this.scroller.maxScrollY&&this.maxPosY/this.scroller.maxScrollY),this.updatePosition()}},updatePosition:function(){var a=this.options.listenX&&t.round(this.sizeRatioX*this.scroller.x)||0,d=this.options.listenY&&t.round(this.sizeRatioY*this.scroller.y)||0;this.options.ignoreBoundaries||(a<this.minBoundaryX?(this.options.shrink=="scale"&&(this.width=t.max(this.indicatorWidth+a,8),this.indicatorStyle.width=this.width+"px"),a=this.minBoundaryX):a>this.maxBoundaryX?this.options.shrink=="scale"?(this.width=t.max(this.indicatorWidth-(a-this.maxPosX),8),this.indicatorStyle.width=this.width+"px",a=this.maxPosX+this.indicatorWidth-this.width):a=this.maxBoundaryX:this.options.shrink=="scale"&&this.width!=this.indicatorWidth&&(this.width=this.indicatorWidth,this.indicatorStyle.width=this.width+"px"),d<this.minBoundaryY?(this.options.shrink=="scale"&&(this.height=t.max(this.indicatorHeight+d*3,8),this.indicatorStyle.height=this.height+"px"),d=this.minBoundaryY):d>this.maxBoundaryY?this.options.shrink=="scale"?(this.height=t.max(this.indicatorHeight-(d-this.maxPosY)*3,8),this.indicatorStyle.height=this.height+"px",d=this.maxPosY+this.indicatorHeight-this.height):d=this.maxBoundaryY:this.options.shrink=="scale"&&this.height!=this.indicatorHeight&&(this.height=this.indicatorHeight,this.indicatorStyle.height=this.height+"px")),this.x=a,this.y=d,this.scroller.options.useTransform?this.indicatorStyle[n.style.transform]="translate("+a+"px,"+d+"px)"+this.scroller.translateZ:(this.indicatorStyle.left=a+"px",this.indicatorStyle.top=d+"px")},_pos:function(a,d){a<0?a=0:a>this.maxPosX&&(a=this.maxPosX),d<0?d=0:d>this.maxPosY&&(d=this.maxPosY),a=this.options.listenX?t.round(a/this.sizeRatioX):this.scroller.x,d=this.options.listenY?t.round(d/this.sizeRatioY):this.scroller.y,this.scroller.scrollTo(a,d)},fade:function(a,d){if(!(d&&!this.visible)){clearTimeout(this.fadeTimeout),this.fadeTimeout=null;var c=a?250:500,h=a?0:300;a=a?"1":"0",this.wrapperStyle[n.style.transitionDuration]=c+"ms",this.fadeTimeout=setTimeout((function(m){this.wrapperStyle.opacity=m,this.visible=+m}).bind(this,a),h)}}},s.utils=n,typeof Qs<"u"&&Qs.exports?Qs.exports=s:typeof define=="function"&&define.amd?define(function(){return s}):i.IScroll=s})(window,document,Math)});var Fu,Cu,Qt,Zs=Sc(()=>{N();Fu=Mt(Lu()),Cu=0;window.__spc_carrousels||(window.__spc_carrousels=[]);Qt=class{constructor(e,t){if(window.__spc_carrousels.push(this),Cu++,this.tempid=Cu,this.logprefix="name"in t?"[SPC/CARROUSEL/"+t.name+"]":"[SPC/CARROUSEL #"+this.tempid+"]",!e){console.error("SpellcoderCarrousel got null as node.");return}var o=ti(e,"data-carrousel-options");
1if(this.options=Object.assign({gap:20,slidewidth:0,height:0,updateviewportheight:!0,paddingLeft:0,paddingRight:0,activeslidealignment:"left",vertical_align:"top",interactable:!0,useiscroll:!0,draggable:!0,snap:!0,blockscrolloncontentleft:!1,scroll_deceleration:.004,items:"",renderinfo:null,masonry_renderinfo:[],contentnode:null,buttonprevious:null,buttonnext:null,slideskip:1,contentwidth:null,nextSlideDelay:5e3,transitionDuration:750,eventPassthrough:!0,initialslide:0,activateslidewithclick:!0,keyboardnavigation:!0,randomizeslides:!1,autodraw_firstframe:!0,debugoptions:!1,debugslides:!1,debugdimensions:!1,debugdraw:!1,delayfirstframe:!1,ondrawframe:null,items_positions_ordered:!0},o,t),this.node=e,this.nodes={dragarea:this.getSelfOrChild(e,"carrousel__dragarea"),viewport:this.getSelfOrChild(e,"carrousel__viewport"),content:this.options.contentnode?this.options.contentnode:this.getSelfOrChild(e,"carrousel__content"),btn_prev:this.options.buttonprevious?this.options.buttonprevious:this.getSelfOrChild(e,"carrousel__previous"),btn_next:this.options.buttonnext?this.options.buttonnext:this.getSelfOrChild(e,"carrousel__next")},this.options.debugoptions&&(console.groupCollapsed(this.logprefix),console.log("Computed options",this.options),console.groupEnd()),this.nodes.dragarea||(this.nodes.dragarea=this.node),this.nodes.viewport||(this.nodes.viewport=this.node),this.nodes.content||(this.nodes.content=this.nodes.viewport),this.nodes.viewport.tabIndex=-1,this.nodes.viewport.addEventListener("keydown",this.onKeyPress.bind(this)),this.items=[],this.items_onscreen=[],this.visiblenodes=[],this.scrollleft=0,this.width_viewport=0,this.width_content=0,this.largestslideheight=0,this.slide_virtualstartidx=-1,this.slide_offset=0,this.activeslideidx=this.options.initialslide,this.activeslidenode=null,this.alignedslide=null,this.alignedslideidx=this.options.initialslide,this.alignedslidenode=null,this.animationframe=null,this.finishedinit=!1,"renderinfo"in t)this.importRenderInfo(t.renderinfo);else if("masonry_renderinfo"in t)this.importSlidesFromMasonry(t.masonry_renderinfo);else if("items"in t)if(typeof t.items=="string"){console.log("items is a selector string");let n=e.querySelectorAll(t.items);if(n.length==0){console.warn("No slides specified for the carrousel.");return}this.setSlides(n)}else(t.items instanceof NodeList||t.items instanceof Array)&&(console.log("items is a NodeList"),this.setSlides(t.items));else{let n=e.querySelectorAll(".carrousel__cell");if(n.length==0){console.warn("No slides specified for the carrousel.");return}this.setSlides(n)}this.options.contentwidth&&(this.width_content=this.options.contentwidth),this.__determineContainerWidth(),this.virtualwidth=2147483645,this.options.blockscrolloncontentleft?this.scrollleft=0:this.scrollleft=Math.round(this.virtualwidth/2),this.attemptFinishInit()}attemptFinishInit(){if(this.width_content==0){console.info("Carrousel",this.options.name,"cancelled init (content width is 0)");return}else console.info("Carrousel",this.options.name,"is finishing init");let e=this.scrollleft;if(this.options.initialslide!="none"?(e=this.__getLeftForSlide(this.options.initialslide),isNaN(e)&&console.error("Cannot determine initial X position. (internal slides info corrupt?)")):e=this.scrollleft-this.scrollleft%this.width_content,this.options.useiscroll){let t={useTransition:!1,tap:!0,eventPassthrough:this.options.eventPassthrough,deceleration:this.options.scroll_deceleration,autoUpdatePosition:!1,overrideMeasurements:!0,wrapperWidth:this.width_viewport,scrollerWidth:0,maxScrollX:this.virtualwidth,startX:-e,scrollX:!0,scrollY:!1,snap:this.options.snap,getNearestSnap:this.getNearestSnap.bind(this),getPage:this.getPage.bind(this),mouseWheel:!1,name:""};this.options.debugoptions&&console.log(t),this.iscroll=new Fu.default(this.nodes.dragarea,t),this.iscroll.tempid=this.options.name+"-iscroll",this.iscroll.on("scrollEnd",this.onScrollEnd.bind(this)),(!this.options.interactable||!this.options.draggable)&&this.iscroll.disable(),this.prevtime=-1,this.nodes.btn_prev&&this.nodes.btn_prev.addEventListener("click",this.__onPreviousSlideClick.bind(this)),this.nodes.btn_next&&this.nodes.btn_next.addEventListener("click",this.__onNextSlideClick.bind(this)),this.nodes.viewport.addEventListener("tap",this.__detectCellTap.bind(this))}else this.scrollleft=0,this.scrollleft_next=e;this.finishedinit=!0,this.options.delayfirstframe||this.onAnimFrame
1(0,!0)}destroy(){this.iscroll.destroy(),cancelAnimationFrame(this.animationframe);let e=window.__spc_carrousels.indexOf(this);window.__spc_carrousels.splice(e,1)}getSelfOrChild(e,t){return e.classList.contains(t)?e:e.querySelector("."+t)}setOptions(e){Object.assign(this.options,e)}onAnimFrame(e,t){window.cancelAnimationFrame(this.animationframe),this.animationframe=null;var o=window.devicePixelRatio;o||(o=1);var n;if(this.options.useiscroll){if(isNaN(this.iscroll.x))return;n=-Math.round(this.iscroll.x*o)/o}else n=Math.round(this.scrollleft_next*o)/o;if(t||this.scrollleft!=n)this.scrollleft=n,this.__redraw_slides(!0);else if(this.options.ondrawframe){var s=this.scrollleft%this.width_content;this.options.ondrawframe.bind(this)({scrollleft:this.scrollleft,contentleft:s,contentwidth:this.width_content,draw:!1})}this.animationframe||(this.animationframe=requestAnimationFrame(this.onAnimFrame.bind(this)))}scrollTo(e,t){this.options.useiscroll?this.iscroll.scrollTo(-e,0,t?this.options.transitionDuration:0):(console.info(this.options.name+" no iscroll"),this.scrollleft_next=e,this.__redraw_slides(!0))}scrollBy(e,t){this.options.useiscroll?this.iscroll.scrollTo(this.iscroll.x-e,0,t?this.options.transitionDuration:0):(console.info(this.options.name+" no iscroll"),this.scrollleft_next+=newx,this.__redraw_slides(!0))}scrollToContent(e,t,o){let n=Math.floor(this.scrollleft/this.width_content)*this.width_content,s=n+this.width_content;t?this.scrollTo(s,o):this.scrollTo(n,o)}jumpToSlide(e,t,o){if(e>=this.items.length){console.error("Slide #"+e+" doesn't exist.");return}this.activeslideidx=e;var n=this.__getLeftForSlide(e,o);this.iscroll.scrollTo(-n,0,t?this.options.transitionDuration:0)}jumpToVirtualSlide(e){if(e<0){console.error("Negative virtual slide idx not supported.");return}var t=this.__getVirtualLeftForSlide(e);this.iscroll.scrollTo(-t,0,this.options.transitionDuration)}previousSlide(){this.slide_virtualstartidx==-1&&(this.slide_virtualstartidx=this.alignedslidevirtualidx),this.slide_offset-=this.options.slideskip,this.jumpToVirtualSlide(this.slide_virtualstartidx+this.slide_offset,!0)}nextSlide(){this.slide_virtualstartidx==-1&&(this.slide_virtualstartidx=this.alignedslidevirtualidx),this.slide_offset+=this.options.slideskip,this.options.name=="videos"&&console.log("nextSlide to ",this.slide_virtualstartidx,"+",this.slide_offset,"=",this.slide_virtualstartidx+this.slide_offset),this.jumpToVirtualSlide(this.slide_virtualstartidx+this.slide_offset,!0)}onScrollEnd(){this.slide_virtualstartidx=-1,this.slide_offset=0}__determineContainerWidth(){this.width_viewport=this.nodes.viewport.clientWidth,this.options.debugdimensions&&console.log(this.logprefix,"New carrousel width_viewport is ",this.width_viewport),this.width_viewport==0&&console.warn("clientWidth of carrousel viewport is 0.")}refresh(){this.__determineContainerWidth(),this.jumpToSlide(this.alignedslideidx,!1),this.__redraw_slides(!0),this.slide_virtualstartidx=-1,this.slide_offset=0}drawFrame(){this.__redraw_slides(!0)}importRenderInfo(e){this.width_content=e.width,this.largestslideheight=e.height;for(let t of e.items)t.usecount=0,t.nodecopies=[t.node],this.items_onscreen.push(t.node),t.node.__iteminfo=t;this.items=e.items,this.__relayoutViewport()}importSlidesFromMasonry(e){if(e.width==0){console.error("Cannot import data from masonry, it's width is reported to be 0.");return}this.width_content=e.width,this.largestslideheight=e.height;for(let o of e.items){var t={node:o.node,width:o.width,width_real:o.width,height:o.height,left:o.left,right:o.left+o.width,usecount:0,nodecopies:[o.node]};this.items.push(t),this.items_onscreen.push(o.node),o.node.style.left="0",o.node.__iteminfo=t}this.options.randomizeslides&&this._randomizeSlides(),this.__relayoutViewport()}setSlides(e){this.options.debugdimensions&&console.info(this.logprefix,"setSlides");let t=0,o=0;this.width_content=0;var n=Math.round(this.options.slidewidth);for(let d of e){var s=d.offsetWidth,r=d.offsetHeight;r>o&&(o=r);var l=n>0?n:s,a={node:d,width:l,width_real:s,height:r,left:t,right:t+l,usecount:0,nodecopies:[d]};n>0&&(a.left+=(l-s)/2),this.items.push(a),this.items_onscreen.push(d),t+=l+this.options.gap,this.width_content+=l+this.options.gap,d.__iteminfo=a}this.options.randomizeslides&&this._randomizeSlides(),this.largestslideheight=o,this.options.debugdimensions&&this._logSlides(),this.__relayoutViewport()}_randomizeSlides(){for(let e=this.items.length-1;e>0;--e){let t=Math.floor(Math.random()*(e+1)),o=this.items[e];this.items[e]=this.items[t],this.items[t]=o,o=this.items_onscreen[e],this.items_onscreen[e]=this.items_onscreen[t],this.items_onscreen[t]=o}}_addToLog(e){console.info(this.logprefix+" "+e)}_logSlides(){if(this.options.debugdimensions){this._addToLog("largest slide height is "+this.largestslideheight);for(let e of this.items)this._addToLog("slide is "+e.width+"x"+e.height)}}relayoutSlides(){this.options.debugdimensions&&console.info(this.logprefix,"relayoutSlides");let e=0,t=0,o=0;for(var n=Math.round(this.options.slidewidth),s=0;s<this.items.length;s++){var r=this.items[s],l=r.node.offsetWidth,a=r.node.offsetHeight;a>t&&(t=a);var d=n>0?n:l;r.width=d,r.width_real=l,r.height=a,r.left=e,r.right=e+d,n>0&&(r.left+=(d-l)/2),e+=d+this.options.gap,o+=d+this.options.gap}if(o==0){console.error("Content width is 0");return}this.width_content=o,this.largestslideheight=t,this.options.debugdimensions&&this._logSlides(),this.__relayoutViewport(),this.finishedinit||this.attemptFinishInit()}__relayoutViewport(){this.width_viewport=this.nodes.viewport.clientWidth;let e=0;this.options.height?e=this.options.height:(this.options.debugdimensions&&console.info("No options.height set, using the largestslideheight"),e=this.largestslideheight),this.options.debugdimensions&&console.log("__relayoutViewport reads width (",this.width_viewport,") and sets viewport height to",e),this.options.updateviewportheight&&(this.nodes.viewport.style.height=e+"px")}onKeyPress(e){if(!(!this.options.interactable||!this.options.keyboardnavigation))switch(e.keyCode){case 37:{e.preventDefault(),e.stopPropagation(),this.previousSlide();break}case 39:{e.preventDefault(),e.stopPropagation(),this.nextSlide();break}case 27:{e.preventDefault(),e.stopPropagation(),F(this.node,"wh:closeslideshow",{bubbles:!1,cancelable:!1,detail:{carrousel:this}});break}}}__onPreviousSlideClick(e){e.preventDefault(),e.stopPropagation(),this.previousSlide(e)}__onNextSlideClick(e){e.preventDefault(),e.stopPropagation(),this.nextSlide(e)}__detectCellTap(e){if(this.options.activateslidewithclick){var t=ei(e.target,".carrousel__cell");if(t){var o=this.items.indexOf(t.__iteminfo);if(o!=this.activeslideidx){console.info(this.items[o]);var n=this.nodes.viewport.getBoundingClientRect(),s=e.pageX-n.left,r=!1;switch(this.options.activeslidealignment){case"":case"viewport_left":r=!0;break;case"viewport_middle":r=s>this.width_viewport/2;break;case"left":r=s>this.options.paddingLeft;break;case"middle":var l=this.width_viewport-this.options.paddingLeft-this.options.paddingRight,a=l/2+this.options.paddingLeft;r=s>a;break}this.jumpToSlide(o,!0,r)}}}}__getVirtualLeftForSlide(e){var t=this.items.length,o=e%t,n=Math.floor(e/t),s=n*this.width_content+this.__getActivationCenterForSlide(o);return s}__getActivationCenterForSlide(e){var t=this.items[e].left;switch(this.options.activeslidealignment){case"":case"viewport_left":break;case"viewport_middle":t-=(this.width_viewport-this.items[e].width_real)/2;break;case"left":t-=this.options.paddingLeft;break;case"middle":var o=this.width_viewport-this.options.paddingLeft-this.options.paddingRight;t-=(o-this.items[e].width_real)/2+this.options.paddingLeft;break}return t}__getLeftForSlide(e,t){var o=e<0,n;e<0?(e++,e=this.items.length-1- -e%this.items.length,n=-Math.floor(-e%this.items.length)):(e=e%this.items.length,n=Math.floor(e/this.items.length));var s=this.__getActivationCenterForSlide(e);console.info("wanted_left_within_content",s);var r=this.scrollleft+s-this.scrollleft%this.width_content;return t&&r<this.scrollleft?r+=this.width_content:!t&&r>this.scrollleft&&(r-=this.width_content),r}__getContentScrollToVirtualScroll(e,t){return this.scrollleft-this.scrollleft%this.width_content+e}getPage(e,t){console.info("getPage"),e<0&&(console.error("pageX should not be negative."),e=-e);var o=Math.floor(e/this.items.length),n=e%this.items.length;console.log("iScroll pageX",e,"is actually contentrepetition",o," slide #"+n);var s={x:-(o*this.width_content+this.items[n].left),y:0,pageX:e,pageY:t};return console.info("getPage",e," returns ",s),s}getNearestSnap(e,t,o){console.info("getNearestSnap"),e=-e,this.__redraw_slides(!1,e);var n=this.renderinfo,s={x:-this.__getVirtualLeftForSlide(n.newactiveslidevirtualidx),y:0,pageX:n.new
1activeslidevirtualidx,pageY:0};return s}__getActivationX(){var e=0;switch(this.options.activeslidealignment){case"":case"viewport_left":break;case"viewport_middle":e=this.width_viewport/2;break;case"left":e=this.options.paddingLeft;break;case"middle":var t=this.width_viewport-this.options.paddingLeft-this.options.paddingRight;e=t/2+this.options.paddingLeft;break}return e}__redraw_slides(e,t){if(!(this.width_viewport==0||this.width_content==0)){if(isNaN(this.scrollleft)){console.error("scrolleft is NaN");return}var o=t||this.scrollleft,n=o%this.width_content,s=n,r=s+this.width_viewport;if(this.options.ondrawframe&&e&&this.options.ondrawframe.bind(this)({scrollleft:o,contentleft:n,contentwidth:this.width_content,draw:!0}),this.items.length!=0){var l=this.__getActivationX(),a=[];this.visiblenodes=[];var d=0,c=this.items.length,h=0;this.options.debugdraw&&console.log("__redraw_slides()",{scrollleft:n,content_offset:n,width_content:this.width_content,visible_left:s,visible_right:r});for(var m=0;m<this.items.length;m++)this.items[m].usecount=0;for(var u=0,b=-1,f=null,g=null,_=-1,y=Math.floor(o/this.width_content)*this.items.length;d<1e3;){d==999&&console.log("__redraw_slides() overflow",{absolute_scrollleft:o,scrollleft:n,width_content:this.width_content,visible_left:s,visible_right:r,activation_x:l,virtualslideidx:y});var E=this.items[h];if(E.right+u<s){h++,y++,h==c&&(h=0,u+=this.width_content);continue}let de=E.left+u>r;if(de&&this.options.items_positions_ordered)break;if(!de){var S=E.left+u-n;if(e){var P;E.usecount<E.nodecopies.length?P=E.nodecopies[E.usecount]:(P=E.node.cloneNode(!0),P.__iteminfo=E,E.nodecopies.push(P),this.nodes.content.appendChild(P)),P._wh_carrouseldata={slideidx:h,virtualslideidx:y};var z=this.options.height?this.options.height:this.largestslideheight,$=0;this.options.vertical_align=="middle"?$=Math.round(z-E.height)/2:this.options.vertical_align=="bottom"&&($=Math.round(z-E.height));let He="translate3D("+S+"px,"+$+"px,0)";E.scale&&(He+=" scale("+E.scale+")"),P.style.transform=He;var ae=P.querySelector(".carrousel__cell-image");ae&&(ae.style.backgroundImage=""),a.push(P),E.usecount++}var Q=Math.abs(l-S),le=Q;this.visiblenodes.push({x:S,y:$,width:E.width,height:E.height}),(_==-1||le<_)&&(b=h,f=P,g=y,_=le)}h++,y++,h==c&&(h=0,u+=this.width_content),d++}if(d!=0){if(e){for(var m=0;m<this.items_onscreen.length;m++){var ge=this.items_onscreen[m];a.indexOf(ge)==-1&&(ge.style.webkitTransform="translate3D(-50000px,0,0)",ge.style.transform="translate3D(-50000px,0,0)")}this.items_onscreen=a,b>-1&&(this.alignedslidenode!=f&&this.__setActiveSlide(E,b,f,g),this.alignedslideidx=b,this.alignedslidevirtualidx=g)}return this.renderinfo={newactiveslideidx:b,newactivenode:f,newactiveslidevirtualidx:g,newactiveslide_dist:_,width_viewport:this.width_viewport,width_content:this.width_content},this.renderinfo}}}}__setActiveSlide(e,t,o,n){this.options.name=="videos"&&console.log("New active slide",t,o,"prev",this.alignedslidenode),this.alignedslidenode!=o&&(this.alignedslidenode&&this.alignedslidenode.classList.remove("carrousel__cell--aligned"),o.classList.add("carrousel__cell--aligned")),F(this.node,"wh:activeslidechange",{bubbles:!1,cancelable:!1,detail:{carrousel:this,previousactive:this.alignedslide,previousactiveidx:this.alignedslideidx,previousactivenode:this.alignedslidenode,nextactive:e,nextactiveidx:t,nextactivenode:o}}),this.activeslide=e,this.alignedslidenode=o}}});var jl=it((BC,Du)=>{"use strict";N();Zs();var er=null,jn=null,Pu=0,Au=!1;function Gb(i){if(i.node.clientHeight==0)return;Pl(i.node);let e=qu();i.setOptions(e),i.relayoutSlides(),i.refresh()}function Kb(){jn&&(er?(console.log("update active photoviewer"),Gb(er)):Pl(jn))}function Jb(i){let t=i.split("-")[0];console.info("doActivateSlideshowByHash",i);let o=document.querySelector('.carrousel__cell[data-hash^="'+t+'-"]');if(o||(o=document.querySelector('.carrousel__cell[data-hash="'+t+'"]')),console.info('.carrousel__cell[data-hash="'+t+"]"),!o)return;let n=o.closest(".photoalbumwidget__slideshow"),s=n.querySelectorAll(".carrousel__cell"),r=Array.from(s).indexOf(o);ju(n,r)}function Qb(i,e){let t=i+"-slideshow",o=document.getElementById(t);if(!o){console.error("Cannot find slideshow container ",t);return}ju(o,e)}function ju(i,e){let t=i.hasAttribute("data-carrousel-options");Au||(window.addEventListener("resize",Kb),Au=!0),Pu=document.body.scrollTop||document.documentElement.scrollTop,document.body.appendChild(i);let o=i;o.addEventListener("wh:activeslidechange",Zb),o.addEventListener("wh:closeslideshow",Ru),i.classList.add("html__fullscreenelement"),document.documentElement.classList.add("html--onlyfullscreenelement"),i.classList.add("prepare");let n=qu();Pl(o);let s=o.__carrousel;if(o.clientHeight==0&&console.error("Failed to resize fullscreen slideshow."),t)s?(s.setOptions(n),s.relayoutSlides(),s.jumpToSlide(e)):(n.initialslide=e,s=new Qt(o,n),s.node.addEventListener("tap",Mu),o.__carrousel=s),s.drawFrame();else{i.addEventListener("click",Mu);let r=i.querySelectorAll(".carrousel__cell-image");for(let l of r)l.style.backgroundImage=""}document.clientWidth,i.classList.add("visible"),t&&s.nodes.viewport.focus(),document.body.scrollTop=0,document.documentElement.scrollTop=0,t&&(er=o.__c
1arrousel),jn=i}function Ru(){let i=jn;i.classList.remove("prepare"),i.classList.remove("active"),i.classList.remove("html__fullscreenelement"),document.documentElement.classList.remove("html--onlyfullscreenelement");let e=document.querySelector(".header__universe");e&&(e.style.display="block"),window.scrollTo(0,Pu),er=null,jn=null,history.replaceState(void 0,void 0,".")}function Mu(i){let e=i.target.closest(".fsslideshow__button");e&&e.classList.contains("fsslideshow__close")&&Ru()}function Zb(i){let e=i.target.closest(".fsslideshow"),t=e.querySelector(".fsslideshow__title"),o=e.querySelector(".fsslideshow__download"),n=e.querySelector(".carrousel").__carrousel,s=i.detail.nextactivenode;t.textContent=i.detail.nextactiveidx+1+"/"+i.detail.carrousel.items.length+" "+i.detail.nextactivenode.getAttribute("data-title"),o.href=s.getAttribute("data-download"),o.setAttribute("download",s.getAttribute("data-filename"));let r=s.getAttribute("data-hash");history.replaceState(void 0,void 0,"#fsviewer-"+r)}function qu(){let i=window.innerWidth,e=window.innerHeight;return{activeslidealignment:"middle",vertical_align:"middle",gap:i/20,slidewidth:i,height:e,autodraw_firstframe:!1,eventPassthrough:!1}}function Pl(i){let e,t;getComputedStyle(i);let o=i.getBoundingClientRect();e=o.width,t=o.height;let n=e*.75,s=t-130,r=window.devicePixelRatio;r||(r=1);let l=i.querySelectorAll(".carrousel__cell-image");for(let a=0;a<l.length;a++){let d=l[a],c=parseInt(d.getAttribute("data-width")),h=parseInt(d.getAttribute("data-height")),m=n/c,u=s/h,b=m<u?m:u,f=Math.round(c*b*r)/r,g=Math.round(h*b*r)/r;d.style.width=f+"px",d.style.height=g+"px"}}x(".fsslideshow",(i,e)=>{if(e!=0)return;let t=window.location.hash;t!=""&&(t=t.substr(1)),t.substr(0,9)=="fsviewer-"&&Jb(t.substr(9))});Du.exports={doActivateSlideshow:Qb}});var Rl=it((Iu,tr)=>{(function(i,e){typeof define=="function"&&define.amd?define(e):typeof tr=="object"&&tr.exports?tr.exports=e():i.EvEmitter=e()})(typeof window<"u"?window:Iu,function(){"use strict";function i(){}var e=i.prototype;return e.on=function(t,o){if(!(!t||!o)){var n=this._events=this._events||{},s=n[t]=n[t]||[];return s.indexOf(o)==-1&&s.push(o),this}},e.once=function(t,o){if(!(!t||!o)){this.on(t,o);var n=this._onceEvents=this._onceEvents||{},s=n[t]=n[t]||{};return s[o]=!0,this}},e.off=function(t,o){var n=this._events&&this._events[t];if(!(!n||!n.length)){var s=n.indexOf(o);return s!=-1&&n.splice(s,1),this}},e.emitEvent=function(t,o){var n=this._events&&this._events[t];if(!(!n||!n.length)){n=n.slice(0),o=o||[];for(var s=this._onceEvents&&this._onceEvents[t],r=0;r<n.length;r++){var l=n[r],a=s&&s[l];a&&(this.off(t,l),delete s[l]),l.apply(this,o)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},i})});var or=it(($C,ir)=>{(function(i,e){typeof define=="function"&&define.amd?define(e):typeof ir=="object"&&ir.exports?ir.exports=e():i.getSize=e()})(window,function(){"use strict";function e(m){var u=parseFloat(m),b=m.indexOf("%")==-1&&!isNaN(u);return b&&u}function t(){}var o=typeof console>"u"?t:function(m){console.error(m)},n=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],s=n.length;function r(){for(var m={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},u=0;u<s;u++){var b=n[u];m[b]=0}return m}function l(m){var u=getComputedStyle(m);return u||o("Style returned "+u+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),u}var a=!1,d;function c(){if(!a){a=!0;var m=document.createElement("div");m.style.width="200px",m.style.padding="1px 2px 3px 4px",m.style.borderStyle="solid",m.style.borderWidth="1px 2px 3px 4px",m.style.boxSizing="border-box";var u=document.body||document.documentElement;u.appendChild(m);var b=l(m);d=Math.round(e(b.width))==200,h.isBoxSizeOuter=d,u.removeChild(m)}}function h(m){if(c(),typeof m=="string"&&(m=document.querySelector(m)),!(!m||typeof m!="object"||!m.nodeType)){var u=l(m);if(u.display=="none")return r();var b={};b.width=m.offsetWidth,b.height=m.offsetHeight;for(var f=b.isBorderBox=u.boxSizing=="border-box",g=0;g<s;g++){var _=n[g],y=u[_],E=parseFloat(y);b[_]=isNaN(E)?0:E}var S=b.paddingLeft+b.paddingRight,P=b.paddingTop+b.paddingBottom,z=b.marginLeft+b.marginRight,$=b.marginTop+b.marginBottom,ae=b.borderLeftWidth+b.borderRightWidth,Q=b.borderTopWidth+b.borderBottomWidth,le=f&&d,ge=e(u.width);ge!==!1&&(b.width=ge+(le?0:S+ae));var de=e(u.height);
1return de!==!1&&(b.height=de+(le?0:P+Q)),b.innerWidth=b.width-(S+ae),b.innerHeight=b.height-(P+Q),b.outerWidth=b.width+z,b.outerHeight=b.height+$,b}}return h})});var zu=it((YC,nr)=>{(function(i,e){"use strict";typeof define=="function"&&define.amd?define(e):typeof nr=="object"&&nr.exports?nr.exports=e():i.matchesSelector=e()})(window,function(){"use strict";var e=(function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var o=["webkit","moz","ms","o"],n=0;n<o.length;n++){var s=o[n],r=s+"MatchesSelector";if(t[r])return r}})();return function(o,n){return o[e](n)}})});var Nu=it((XC,sr)=>{(function(i,e){typeof define=="function"&&define.amd?define(["desandro-matches-selector/matches-selector"],function(t){return e(i,t)}):typeof sr=="object"&&sr.exports?sr.exports=e(i,zu()):i.fizzyUIUtils=e(i,i.matchesSelector)})(window,function(e,t){"use strict";var o={};o.extend=function(r,l){for(var a in l)r[a]=l[a];return r},o.modulo=function(r,l){return(r%l+l)%l};var n=Array.prototype.slice;o.makeArray=function(r){if(Array.isArray(r))return r;if(r==null)return[];var l=typeof r=="object"&&typeof r.length=="number";return l?n.call(r):[r]},o.removeFrom=function(r,l){var a=r.indexOf(l);a!=-1&&r.splice(a,1)},o.getParent=function(r,l){for(;r.parentNode&&r!=document.body;)if(r=r.parentNode,t(r,l))return r},o.getQueryElement=function(r){return typeof r=="string"?document.querySelector(r):r},o.handleEvent=function(r){var l="on"+r.type;this[l]&&this[l](r)},o.filterFindElements=function(r,l){r=o.makeArray(r);var a=[];return r.forEach(function(d){if(d instanceof HTMLElement){if(!l){a.push(d);return}t(d,l)&&a.push(d);for(var c=d.querySelectorAll(l),h=0;h<c.length;h++)a.push(c[h])}}),a},o.debounceMethod=function(r,l,a){a=a||100;var d=r.prototype[l],c=l+"Timeout";r.prototype[l]=function(){var h=this[c];clearTimeout(h);var m=arguments,u=this;this[c]=setTimeout(function(){d.apply(u,m),delete u[c]},a)}},o.docReady=function(r){var l=document.readyState;l=="complete"||l=="interactive"?setTimeout(r):document.addEventListener("DOMContentLoaded",r)},o.toDashed=function(r){return r.replace(/(.)([A-Z])/g,function(l,a,d){return a+"-"+d}).toLowerCase()};var s=e.console;return o.htmlInit=function(r,l){o.docReady(function(){var a=o.toDashed(l),d="data-"+a,c=document.querySelectorAll("["+d+"]"),h=document.querySelectorAll(".js-"+a),m=o.makeArray(c).concat(o.makeArray(h)),u=d+"-options",b=e.jQuery;m.forEach(function(f){var g=f.getAttribute(d)||f.getAttribute(u),_;try{_=g&&JSON.parse(g)}catch(E){s&&s.error("Error parsing "+d+" on "+f.className+": "+E);return}var y=new r(f,_);b&&b.data(f,l,y)})})},o})});var Hu=it((GC,rr)=>{(function(i,e){typeof define=="function"&&define.amd?define(["ev-emitter/ev-emitter","get-size/get-size"],e):typeof rr=="object"&&rr.exports?rr.exports=e(Rl(),or()):(i.Outlayer={},i.Outlayer.Item=e(i.EvEmitter,i.getSize))})(window,function(e,t){"use strict";function o(f){for(var g in f)return!1;return g=null,!0}var n=document.documentElement.style,s=typeof n.transition=="str
1ing"?"transition":"WebkitTransition",r=typeof n.transform=="string"?"transform":"WebkitTransform",l={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[s],a={transform:r,transition:s,transitionDuration:s+"Duration",transitionProperty:s+"Property",transitionDelay:s+"Delay"};function d(f,g){f&&(this.element=f,this.layout=g,this.position={x:0,y:0},this._create())}var c=d.prototype=Object.create(e.prototype);c.constructor=d,c._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},c.handleEvent=function(f){var g="on"+f.type;this[g]&&this[g](f)},c.getSize=function(){this.size=t(this.element)},c.css=function(f){var g=this.element.style;for(var _ in f){var y=a[_]||_;g[y]=f[_]}},c.getPosition=function(){var f=getComputedStyle(this.element),g=this.layout._getOption("originLeft"),_=this.layout._getOption("originTop"),y=f[g?"left":"right"],E=f[_?"top":"bottom"],S=parseFloat(y),P=parseFloat(E),z=this.layout.size;y.indexOf("%")!=-1&&(S=S/100*z.width),E.indexOf("%")!=-1&&(P=P/100*z.height),S=isNaN(S)?0:S,P=isNaN(P)?0:P,S-=g?z.paddingLeft:z.paddingRight,P-=_?z.paddingTop:z.paddingBottom,this.position.x=S,this.position.y=P},c.layoutPosition=function(){var f=this.layout.size,g={},_=this.layout._getOption("originLeft"),y=this.layout._getOption("originTop"),E=_?"paddingLeft":"paddingRight",S=_?"left":"right",P=_?"right":"left",z=this.position.x+f[E];g[S]=this.getXValue(z),g[P]="";var $=y?"paddingTop":"paddingBottom",ae=y?"top":"bottom",Q=y?"bottom":"top",le=this.position.y+f[$];g[ae]=this.getYValue(le),g[Q]="",this.css(g),this.emitEvent("layout",[this])},c.getXValue=function(f){var g=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!g?f/this.layout.size.width*100+"%":f+"px"},c.getYValue=function(f){var g=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&g?f/this.layout.size.height*100+"%":f+"px"},c._transitionTo=function(f,g){this.getPosition();var _=this.position.x,y=this.position.y,E=f==this.position.x&&g==this.position.y;if(this.setPosition(f,g),E&&!this.isTransitioning){this.layoutPosition();return}var S=f-_,P=g-y,z={};z.transform=this.getTranslate(S,P),this.transition({to:z,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},c.getTranslate=function(f,g){var _=this.layout._getOption("originLeft"),y=this.layout._getOption("originTop");return f=_?f:-f,g=y?g:-g,"translate3d("+f+"px, "+g+"px, 0)"},c.goTo=function(f,g){this.setPosition(f,g),this.layoutPosition()},c.moveTo=c._transitionTo,c.setPosition=function(f,g){this.position.x=parseFloat(f),this.position.y=parseFloat(g)},c._nonTransition=function(f){this.css(f.to),f.isCleaning&&this._removeStyles(f.to);for(var g in f.onTransitionEnd)f.onTransitionEnd[g].call(this)},c.transition=function(f){if(!parseFloat(this.layout.options.transitionDuration)){this._nonTransition(f);return}var g=this._transn;for(var _ in f.onTransitionEnd)g.onEnd[_]=f.onTransitionEnd[_];for(_ in f.to)g.ingProperties[_]=!0,f.isCleaning&&(g.clean[_]=!0);if(f.from){this.css(f.from);var y=this.element.offsetHeight;y=null}this.enableTransition(f.to),this.css(f.to),this.isTransitioning=!0};function h(f){return f.replace(/([A-Z])/g,function(g){return"-"+g.toLowerCase()})}var m="opacity,"+h(r);c.enableTransition=function(){if(!this.isTransitioning){var f=this.layout.options.transitionDuration;f=typeof f=="number"?f+"ms":f,this.css({transitionProperty:m,transitionDuration:f,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(l,this,!1)}},c.onwebkitTransitionEnd=function(f){this.ontransitionend(f)},c.onotransitionend=function(f){this.ontransitionend(f)};var u={"-webkit-transform":"transform"};c.ontransitionend=function(f){if(f.target===this.element){var g=this._transn,_=u[f.propertyName]||f.propertyName;if(delete g.ingProperties[_],o(g.ingProperties)&&this.disableTransition(),_ in g.clean&&(this.element.style[f.propertyName]="",delete g.clean[_]),_ in g.onEnd){var y=g.onEnd[_];y.call(this),delete g.onEnd[_]}this.emitEvent("transitionEnd",[this])}},c.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(l,this,!1),this.isTransitioning=!1},c._removeStyles=function(f){var g={};for(var _ in f)g[_]="";this.css(g)};var b={transitionProperty:"",transitionDuration:"",transitionDelay:""};return c.removeTransitionStyles=function(){this.css(b)},c.stagger=function(f){f=isNaN(f)?0:f,this.staggerDelay=f+"ms"},c.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},c.remove=function(){if(!s||!parseFloat(this.layout.options.transitionDuration)){this.removeElem();return}this.once("transitionEnd",function(){this.removeElem()}),this.hide()},c.reveal=function(){delete this.isHidden,this.css({display:""});var f=this.layout.options,g={},_=this.getHideRevealTransitionEndProperty("visibleStyle");g[_]=this.onRevealTransitionEnd,this.transition({from:f.hiddenStyle,to:f.visibleStyle,isCleaning:!0,onTransitionEnd:g})},c.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},c.getHideRevealTransitionEndProperty=function(f){var g=this.layout.options[f];if(g.opacity)return"opacity";for(var _ in g)return _},c.hide=function(){this.isHidden=!0,this.css({display:""});var f=this.layout.options,g={},_=this.getHideRevealTransitionEndProperty("hiddenStyle");g[_]=this.onHideTransitionEnd,this.transition({from:f.visibleStyle,to:f.hiddenStyle,isCleaning:!0,onTransitionEnd:g})},c.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},c.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},d})});var Ou=it((KC,ar)=>{(function(i,e){"use strict";typeof define=="function"&&define.amd?define(["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(t,o,n,s){return e(i,t,o,n,s)}):typeof ar=="object"&&ar.exports?ar.exports=e(i,Rl(),or(),Nu(),Hu()):i.Outlayer=e(i,i.EvEmitter,i.getSize,i.fizzyUIUtils,i.Outlayer.Item)})(window,function(e,t,o,n,s){"use strict";var r=e.console,l=e.jQuery,a=function(){},d=0,c={};function h(g,_){var y=n.getQueryElement(g);if(!y){r&&r.error("Bad element for "+this.constructor.namespace+": "+(y||g));return}this.element=y,l&&(this.$element=l(this.element)),this.options=n.extend({},this.constructor.defaults),this.option(_);var E=++d;this.element.outlayerGUID=E,c[E]=this,this._create();var S=this._getOption("initLayout");S&&this.layout()}h.namespace="outlayer",h.Item=s,h.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var m=h.prototype;n.extend(m,t.prototype),m.option=function(g){n.extend(this.options,g)},m._getOption=function(g){var _=this.constructor.compatOptions[g];return _&&this.options[_]!==void 0?this.options[_]:this.options[g]},h.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},m._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),n.extend(this.element.style,this.options.containerStyle);var g=this._getOption("resize");g&&this.bindResize()},m.reloadItems=function(){this.items=this._itemize(this.element.children)},m._itemize=function(g){for(var _=this._filterFindItemElements(g),y=this.constructor.Item,E=[],S=0;S<_.length;S++){var P=_[S],z=new y(P,this);E.push(z)}return E},m._filterFindItemElements=function(g){return n.filterFindElements(g,this.options.itemSelector)},m.getItemElements=function(){return this.items.map(function(g){return g.element})},m.layout=function(){this._resetLayout(),this._manageStamps();var g=this._getOption("layoutInstant"),_=g!==void 0?g:!this._isLayoutInited;this.layoutItems(this.items,_),this._isLayoutInited=!0}
1,m._init=m.layout,m._resetLayout=function(){this.getSize()},m.getSize=function(){this.size=o(this.element)},m._getMeasurement=function(g,_){var y=this.options[g],E;y?(typeof y=="string"?E=this.element.querySelector(y):y instanceof HTMLElement&&(E=y),this[g]=E?o(E)[_]:y):this[g]=0},m.layoutItems=function(g,_){g=this._getItemsForLayout(g),this._layoutItems(g,_),this._postLayout()},m._getItemsForLayout=function(g){return g.filter(function(_){return!_.isIgnored})},m._layoutItems=function(g,_){if(this._emitCompleteOnItems("layout",g),!(!g||!g.length)){var y=[];g.forEach(function(E){var S=this._getItemLayoutPosition(E);S.item=E,S.isInstant=_||E.isLayoutInstant,y.push(S)},this),this._processLayoutQueue(y)}},m._getItemLayoutPosition=function(){return{x:0,y:0}},m._processLayoutQueue=function(g){this.updateStagger(),g.forEach(function(_,y){this._positionItem(_.item,_.x,_.y,_.isInstant,y)},this)},m.updateStagger=function(){var g=this.options.stagger;if(g==null){this.stagger=0;return}return this.stagger=f(g),this.stagger},m._positionItem=function(g,_,y,E,S){E?g.goTo(_,y):(g.stagger(S*this.stagger),g.moveTo(_,y))},m._postLayout=function(){this.resizeContainer()},m.resizeContainer=function(){var g=this._getOption("resizeContainer");if(g){var _=this._getContainerSize();_&&(this._setContainerMeasure(_.width,!0),this._setContainerMeasure(_.height,!1))}},m._getContainerSize=a,m._setContainerMeasure=function(g,_){if(g!==void 0){var y=this.size;y.isBorderBox&&(g+=_?y.paddingLeft+y.paddingRight+y.borderLeftWidth+y.borderRightWidth:y.paddingBottom+y.paddingTop+y.borderTopWidth+y.borderBottomWidth),g=Math.max(g,0),this.element.style[_?"width":"height"]=g+"px"}},m._emitCompleteOnItems=function(g,_){var y=this;function E(){y.dispatchEvent(g+"Complete",null,[_])}var S=_.length;if(!_||!S){E();return}var P=0;function z(){P++,P==S&&E()}_.forEach(function($){$.once(g,z)})},m.dispatchEvent=function(g,_,y){var E=_?[_].concat(y):y;if(this.emitEvent(g,E),l)if(this.$element=this.$element||l(this.element),_){var S=l.Event(_);S.type=g,this.$element.trigger(S,y)}else this.$element.trigger(g,y)},m.ignore=function(g){var _=this.getItem(g);_&&(_.isIgnored=!0)},m.unignore=function(g){var _=this.getItem(g);_&&delete _.isIgnored},m.stamp=function(g){g=this._find(g),g&&(this.stamps=this.stamps.concat(g),g.forEach(this.ignore,this))},m.unstamp=function(g){g=this._find(g),g&&g.forEach(function(_){n.removeFrom(this.stamps,_),this.unignore(_)},this)},m._find=function(g){if(g)return typeof g=="string"&&(g=this.element.querySelectorAll(g)),g=n.makeArray(g),g},m._manageStamps=function(){!this.stamps||!this.stamps.length||(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},m._getBoundingRect=function(){var g=this.element.getBoundingClientRect(),_=this.size;this._boundingRect={left:g.left+_.paddingLeft+_.borderLeftWidth,top:g.top+_.paddingTop+_.borderTopWidth,right:g.right-(_.paddingRight+_.borderRightWidth),bottom:g.bottom-(_.paddingBottom+_.borderBottomWidth)}},m._manageStamp=a,m._getElementOffset=function(g){var _=g.getBoundingClientRect(),y=this._boundingRect,E=o(g),S={left:_.left-y.left-E.marginLeft,top:_.top-y.top-E.marginTop,right:y.right-_.right-E.marginRight,bottom:y.bottom-_.bottom-E.marginBottom};return S},m.handleEvent=n.handleEvent,m.bindResize=function(){e.addEventListener("resize",this),this.isResizeBound=!0},m.unbindResize=function(){e.removeEventListener("resize",this),this.isResizeBound=!1},m.onresize=function(){this.resize()},n.debounceMethod(h,"onresize",100),m.resize=function(){!this.isResizeBound||!this.needsResizeLayout()||this.layout()},m.needsResizeLayout=function(){var g=o(this.element),_=this.size&&g;return _&&g.innerWidth!==this.size.innerWidth},m.addItems=function(g){var _=this._itemize(g);return _.length&&(this.items=this.items.concat(_)),_},m.appended=function(g){var _=this.addItems(g);_.length&&(this.layoutItems(_,!0),this.reveal(_))},m.prepended=function(g){var _=this._itemize(g);if(_.length){var y=this.items.slice(0);this.items=_.concat(y),this._resetLayout(),this._manageStamps(),this.layoutItems(_,!0),this.reveal(_),this.layoutItems(y)}},m.reveal=function(g){if(this._emitCompleteOnItems("reveal",g),!(!g||!g.length)){var _=this.updateStagger();g.forEach(function(y,E){y.stagger(E*_),y.reveal()})}},m.hide=function(g){if(this._emitCompleteOnItems("hide",g),!(!g||!g.length)){var _=this.updateStagger();g.forEach(function(y,E){y.stagger(E*_),y.hide()})}},m.revealItemElements=function(g){var _=this.getItems(g);this.reveal(_)},m.hideItemElements=function(g){var _=this.getItems(g);this.hide(_)},m.getItem=function(g){for(var _=0;_<this.items.length;_++){var y=this.items[_];if(y.element==g)return y}},m.getItems=function(g){g=n.makeArray(g);var _=[];return g.forEach(function(y){var E=this.getItem(y);E&&_.push(E)},this),_},m.remove=function(g){var _=this.getItems(g);this._emitCompleteOnItems("remove",_),!(!_||!_.length)&&_.forEach(function(y){y.remove(),n.removeFrom(this.items,y)},this)},m.destroy=function(){var g=this.element.style;
1g.height="",g.position="",g.width="",this.items.forEach(function(y){y.destroy()}),this.unbindResize();var _=this.element.outlayerGUID;delete c[_],delete this.element.outlayerGUID,l&&l.removeData(this.element,this.constructor.namespace)},h.data=function(g){g=n.getQueryElement(g);var _=g&&g.outlayerGUID;return _&&c[_]},h.create=function(g,_){var y=u(h);return y.defaults=n.extend({},h.defaults),n.extend(y.defaults,_),y.compatOptions=n.extend({},h.compatOptions),y.namespace=g,y.data=h.data,y.Item=u(s),n.htmlInit(y,g),l&&l.bridget&&l.bridget(g,y),y};function u(g){function _(){g.apply(this,arguments)}return _.prototype=Object.create(g.prototype),_.prototype.constructor=_,_}var b={ms:1,s:1e3};function f(g){if(typeof g=="number")return g;var _=g.match(/(^\d*\.?\d*)(\w*)/),y=_&&_[1],E=_&&_[2];if(!y.length)return 0;y=parseFloat(y);var S=b[E]||1;return y*S}return h.Item=s,h})});var Uu=it((JC,lr)=>{(function(i,e){typeof define=="function"&&define.amd?define(["outlayer/outlayer","get-size/get-size"],e):typeof lr=="object"&&lr.exports?lr.exports=e(Ou(),or()):i.Masonry=e(i.Outlayer,i.getSize)})(window,function(e,t){"use strict";var o=e.create("masonry");o.compatOptions.fitWidth="isFitWidth";var n=o.prototype;return n._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var s=0;s<this.cols;s++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},n.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var s=this.items[0],r=s&&s.element;this.columnWidth=r&&t(r).outerWidth||this.containerWidth}var l=this.columnWidth+=this.gutter,a=this.containerWidth+this.gutter,d=a/l,c=l-a%l,h=c&&c<1?"round":"floor";d=Math[h](d),this.cols=Math.max(d,1)},n.getContainerWidth=function(){var s=this._getOption("fitWidth"),r=s?this.element.parentNode:this.element,l=t(r);this.containerWidth=l&&l.innerWidth},n._getItemLayoutPosition=function(s){s.getSize();var r=s.size.outerWidth%this.columnWidth,l=r&&r<1?"round":"ceil",a=Math[l](s.size.outerWidth/this.columnWidth);a=Math.min(a,this.cols);for(var d=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",c=this[d](a,s),h={x:this.columnWidth*c.col,y:c.y},m=c.y+s.size.outerHeight,u=a+c.col,b=c.col;b<u;b++)this.colYs[b]=m;return h},n._getTopColPosition=function(s){var r=this._getTopColGroup(s),l=Math.min.apply(Math,r);return{col:r.indexOf(l),y:l}},n._getTopColGroup=function(s){if(s<2)return this.colYs;for(var r=[],l=this.cols+1-s,a=0;a<l;a++)r[a]=this._getColGroupY(a,s);return r},n._getColGroupY=function(s,r){if(r<2)return this.colYs[s];var l=this.colYs.slice(s,s+r);return Math.max.apply(Math,l)},n._getHorizontalColPosition=function(s,r){var l=this.horizontalColIndex%this.cols,a=s>1&&l+s>this.cols;l=a?0:l;var d=r.size.outerWidth&&r.size.outerHeight;return this.horizontalColIndex=d?l+s:this.horizontalColIndex,{col:l,y:this._getColGroupY(l,s)}},n._manageStamp=function(s){var r=t(s),l=this._getElementOffset(s),a=this._getOption("originLeft"),d=a?l.left:l.right,c=d+r.outerWidth,h=Math.floor(d/this.columnWidth);h=Math.max(0,h);var m=Math.floor(c/this.columnWidth);m-=c%this.columnWidth?0:1,m=Math.min(this.cols-1,m);for(var u=this._getOption("originTop"),b=(u?l.top:l.bottom)+r.outerHeight,f=h;f<=m;f++)this.colYs[f]=Math.max(b,this.colYs[f])},n._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var s={height:this.maxY};return this._getOption("fitWidth")&&(s.width=this._getContainerFitWidth()),s},n._getContainerFitWidth=function(){for(var s=0,r=this.cols;--r&&this.colYs[r]===0;)s++;return(this.cols-s)*this.columnWidth-this.gutter},n.needsResizeLayout=function(){var s=this.containerWidth;return this.getContainerWidth(),s!=this.containerWidth},o})});var Fo={};Lc(Fo,{createService:()=>fv,default:()=>Un});function gv(){let i=window.location.href.match(new RegExp("[?&#]wh-debug=([^&#?]*)"));return i?"?wh-debug="+i[1]:""}function fv(i){let e=new jd(i);return new Proxy(e,new Rd)}var mv,Pd,Un,jd,Rd,Ao=Sc(()=>{"use strict";N();mv=1;Pd=class{abortcontroller=new AbortController;timeout;_callurl;_fetchoptions;promise;timedout=!1;aborted=!1;legacyresolve;client;options;constructor(e,t,o,n,s,r,l){this.client=e,this.options=s,l.signal=this.abortcontroller.signal,s.timeout>0&&(this.timeout=s.timeout,setTimeout(()=>this._handleTimeout(),s.timeout)),s.signal&&s.signal.addEventListener("abort",()=>this._abort()),this._callurl=r,this._fetchoptions=l;let a=fetch(this._callurl,this._fetchoptions);this.promise=this._completeCall(t,o,n,a),this.promise.__jsonrpcinfo=this}_handleTimeout(){this.timedout=!0,this.abortcontroller.abort()}_abort(){this.aborted=!0,this.abortcontroller.abort()}_legacyResolve(e){this.legacyresolve=e,this.abortcontroller.abort()}async _completeCall(e,t,o,n){let s;try{for(;;){if(s=await n,s.status===429&&!("retry429"in this.options&&!this.options.retry429)&&s.headers.get("Retry-After")){let l=parseInt(s.headers.get("Retry-After"));this.options.debug&&console.warn(`[rpc] We are being throttled (429 Too Many Requests) - retrying after ${l} seconds`),await new Promise(a=>setTimeout(a,l*1e3)),n=fetch(this._callurl,this._fetchoptions);continue}break}}catch(l){if(this.options.debug&&console.log(`[rpc] #${o} Exception invoking '${e}'`,l),this.aborted)throw new Error("RPC Aborted");if(this.timedout)throw new Error(`RPC Timeout: timeout was set to ${this.timeout} milliseconds`);if(this.legacyresolve&&this.legacyresolve.resolve)return this.legacyresolve.resolve;throw new Error("RPC Failed: exception: "+l)}let r;try{r=await s.json(),this.options.debug&&console.log(`[rpc] #${o} Received response to '${e}'`,r)}catch(l){this.options.debug&&console.warn(`[rpc] #${o}
1 Response was not valid JSON`,l)}if(!r)throw new Error("RPC Failed: Invalid JSON/RPC response received");if(r&&r.error)throw this.client._tryLogError(t,r.error),new Error("RPC Error: "+(r.error.message||"Unknown error"));if(s.status===200&&r&&r.id!==o)throw new Error("RPC Failed: Invalid JSON/RPC response received");return this.options.wrapresult?{status:s.status,result:r.result||null,error:r.error||null,retryafter:s.headers.get("Retry-After")?parseInt(s.headers.get("Retry-After")):null}:r.result}},Un=class{options;url;addfunctionname;urlappend;constructor(e,t){this.options={timeout:0,debug:xe.rpc,...t};let o;e?(o=e.match(/^([a-z0-9_]+):([a-z0-9_]+)$/),o?this.url=`${location.origin}/wh_services/${o[1]}/${o[2]}`:this.url=e):this.url=location.href,this.addfunctionname=this.options.addfunctionname!==void 0?this.options.addfunctionname:!!o,this.urlappend=this.options.urlappend!==void 0?this.options.urlappend:o?gv():""}setOptions(e){this.options={...this.options,...e}}_handleLegacyRPCResolve(e,t){if(!e.__jsonrpcinfo)throw new Error("The promise is not an async JSONRPC request");e.__jsonrpcinfo._legacyResolve({resolve:t})}_tryLogError(e,t){let o=t.data?t.data.trace||t.data.list||[]:[];console.group(),console.warn("RPC failed:",t.message),o.forEach(n=>{if(n.filename||n.line){let s=n.filename+"#"+n.line+"#"+n.col+(n.func?" ("+n.func+")":"");console.log(s)}}),e&&(console.warn("Stack at calling point"),console.log(e)),console.groupEnd()}invoke(...e){let t;typeof e[0]=="object"?t={...this.options,...e.shift()}:t=this.options;let o=e.shift(),n=this.url;this.addfunctionname&&(n+=`/${o}`),n+=this.urlappend;let s=++mv,r;t.debug&&(r=new Error().stack,console.log(`[rpc] #${s} Invoking '${o}'`,e,n));let l={method:"POST",credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json; charset=utf-8"},body:JSON.stringify({id:s,method:o,params:e||[]}),keepalive:!!t.keepalive};return new Pd(this,o,r,s,t,n,l).promise}},jd=class{rpcclient;static get HTTP_ERROR(){return-1}static get JSON_ERROR(){return-2}static get PROTOCOL_ERROR(){return-3}static get RPC_ERROR(){return-4}static get OFFLINE_ERROR(){return-5}static get TIMEOUT_ERROR(){return-6}static get SERVER_ERROR(){return-7}constructor(e){this.rpcclient=new Un(e)}rpcResolve(e,t){this.rpcclient._handleLegacyRPCResolve(e,t)}invoke(...e){return this.rpcclient.invoke(...e)}},Rd=class{get(e,t,o){return t in e?Reflect.get(e,t,o):(...n)=>e.invoke(t,...n)}}});Rr();function Jc(i){let e=[],t=new URL(location.href).searchParams.get(i);if(t&&e.push(...t.split(",")),typeof document<"u"){let o=document.cookie.match(`(?:^|;)\\s*${i}=([^;]*)`);if(o){let n=decodeURIComponent(o[1]);n&&e.push(...n.split(".").filter(s=>!s.startsWith("sig=")))}}if(typeof sessionStorage<"u"){let o=sessionStorage.getItem(i);o&&e.push(...o.split(","))}return e}Fc();re();var Jo,Nr,Wi="production",Qc=typeof document<"u"?document.querySelector("script#wh-config"):null;if(Qc?.textContent){let i=JSON.parse(Qc.textContent);Jo=xt(i,["siteroot","dtapstage","islive"]),Nr=i.siteRoot??i.siteroot,Wi=i.dtapStage??i.dtapstage}Cc(Wi,"/");if(typeof location<"u")for(let i of Jc("wh-debug"))A[i]=!0;var ye={server:0,...Jo,obj:Jo?.obj||{},site:Jo?.site||{},siteRoot:Nr||"",dtapstage:Wi,islive:Wi==="production"||Wi==="acceptance",siteroot:Nr||""};typeof document<"u"&&(ye.locale=Li().tag);if(Wi==="development")for(let i of["islive","dtapstage","siteroot","locale"])Object.defineProperty(ye,i,{get(){throw new Error(`frontendConfig.${i} will be removed`)}});function ee(i,{allowMissing:e=!1}={}){let t=Jo?.[i];if(!t){if(e)return null;throw new Error(`Missing frontend data object: ${i}`)}return t}function Hr(){return ye.siteRoot}bg();(function(){if("Iterator"in globalThis)return;let i={},e=Object.getPrototypeOf([][Symbol.iterator]()),t=Object.getPrototypeOf(e);Object.setPrototypeOf(t,i),Object.defineProperties(i,{[Symbol.iterator]:{value(){return this}},map:{*value(l){let a=this,d=a.next();for(;!d.done;){let h=yield l(d.value);d=a.next(h)}return d.value}},filter:{*value(l){let a=this,d=a.next(),c;for(;!d.done;){let h=d.value;l(h)&&(c=yield h),d=a.next(c)}return d.value}},find:{value(l){let a=this,d=a.next();for(;!d.done;){let c=d.value;if(l(c))return c;d=a.next()}}},every:{value(l){let a=this,d=a.next();for(;!d.done;){let c=d.value;if(!l(c))return!1;d=a.next()}return!0}},some:{value(l){let a=this,d=a.next();for(;!d.done;){let c=d.value;if(l(c))return a.return(),!0;d=a.next()}return!1}},toArray:{value(l=1/0){let a=[],d=this,c=d.next();for(;!c.done;){let h=c.value;if(l<=0)return a;a.push(h),l!==1/0&&l--,c=d.next()}return a}},take:{*value(l){if(l=Number(l),l<0)throw new RangeError("Invalid limit.");let a=this,d=a.next(),c=l,h;for(;!d.done;){let m=d.value;if(c<=0)return;h=yield m,d=a.next(h),c--}return d.value}},drop:{*value(l){if(l=Number(l),l<0)throw new RangeError("Invalid limit.");let a=this,d=a.next(),c=l,h;for(;!d.done;){let m=d.value;if(c>0){d=a.next(h),c--;continue}h=yield m,d=a.next(h)}return d.value}},asIndexedPairs:{*value(){let l=this,a=l.next(),d=0;for(;!a.done;){let c=a.value,h=yield[d,c];a=l.next(h),d++}return a.value}},flatMap:{*value(l){if(typeof l!="function")throw new TypeError("Mapper must be a function.");let a=this,d=a.next(),c;for(;!d.done;){let h=d.value,m=l(h);Symbol.iterator in m?c=yield*m[Symbol.iterator]():c=yield m,d=a.next(c)}return d.value}},reduce:{value(l,a){let d=a,c=this;d===void 0&&(d=c.next().value);let h=c.next();for(;!h.done;){let m=h.value;d=l(d,m),h=c.next()}return d}}
1,forEach:{value(l){let a=this,d=a.next();for(;!d.done;){let c=d.value;l(c),d=a.next()}}},[Symbol.toStringTag]:{value:"IteratorPrototype"},count:{value(){let l=0,a=this,d=a.next();for(;!d.done;)l++,d=a.next();return l}},join:{value(l){let a="",d=!0,c=this,h=c.next();for(;!h.done;){let m=h.value;d?(d=!1,a+=m):a+=l+m,h=c.next()}return a}},chain:{*value(...l){yield*this;for(let a of l)yield*a}},zip:{*value(...l){let a=[this,...l].map(h=>Symbol.iterator in h?h[Symbol.iterator]():h),d=a.map(h=>h.next()),c;for(;d.every(h=>!h.done);)c=yield d.map(h=>h.value),d=a.map(h=>h.next(c))}},takeWhile:{*value(l){let a=this,d=a.next(),c;for(;!d.done;){let h=d.value;if(l(h))c=yield h;else return;d=a.next(c)}return d.value}},dropWhile:{*value(l){let a=this,d=a.next(),c,h=!1;for(;!d.done;){let m=d.value;if(!h&&l(m)){d=a.next(c);continue}h=!0,c=yield m,d=a.next(c)}return d.value}},fuse:{*value(){let l=this,a=l.next(),d;for(;!a.done;){let c=a.value;if(c!=null)d=yield c;else return;a=l.next(d)}return a.value}},partition:{value(l){let a=[],d=[],c=this,h=c.next();for(;!h.done;){let m=h.value;l(m)?a.push(m):d.push(m),h=c.next()}return[a,d]}},findIndex:{value(l){let a=this,d=0,c=a.next();for(;!c.done;){let h=c.value;if(l(h))return d;c=a.next(),d++}return-1}},max:{value(){let l=-1/0,a=this,d=a.next();for(;!d.done;){let c=d.value;l<c&&(l=c),d=a.next()}return l}},min:{value(){let l=1/0,a=this,d=a.next();for(;!d.done;){let c=d.value;l>c&&(l=c),d=a.next()}return l}},cycle:{*value(){let l=[],a=this,d=a.next();for(;!d.done;){let c=d.value;l.push(c);let h=yield c;d=a.next(h)}for(;;)yield*l}}});function o(l){if(l===null)return!1;let a=typeof l;return a==="object"||a==="function"}function n(l){if(!o(l))throw new TypeError;let a=l[Symbol.iterator],d;if(typeof a!="function"?d=l:d=a.call(l),!o(d))throw new TypeError;return d}if(!("Iterator"in globalThis)){let l=function(){};l.prototype=i,globalThis.Iterator=l}class s extends Iterator{#e;constructor(a){super(),this.#e=a}next(...a){return this.#e.next(...a)}return(a){let d=this.#e.return;return d===void 0?{done:!0,value:a}:d.call(this.#e)}}function r(l){let a=n(l);return a instanceof Iterator?a:new s(a)}Object.defineProperty(Iterator,"from",{writable:!0,enumerable:!1,configurable:!0,value:r})})();M();var Or;function Eg(i){if(!ot(i.target)||!Or?.interfaceServers)return;let e=i.target.closest("a[href]");if(!e)return;let t=e.href;if(t.split("#")[0]!==location.href.split("#")[0])for(let o of Or.interfaceServers)try{window.top?.postMessage({type:"webhare-navigation",location:t},o)}catch{}}async function Sg(){try{Or=await(await fetch("/.wh/ea/config/cms.json")).json()}catch(i){console.log("Failed to get CMS configuration",i);return}window.addEventListener("click",Eg)}typeof window<"u"&&window!==window.top&&Sg();M();M();ie();re();globalThis.dataLayer||=[];var Zc;function tp(){globalThis.dataLayer&&(A.anl&&globalThis.dataLayer.slice(globalThis.dataLayer.indexOf(Zc)+1).forEach(i=>console.log("[anl] dataLayer.push:",i)),Zc=globalThis.dataLayer[globalThis.dataLayer.length-1])}function ve(i,e){if(i.eventCallback){let t=i.eventCallback,o;new Promise(n=>o=n).then(()=>t()),setTimeout(()=>o,e?.timeout||200)}globalThis.dataLayer?.push(i),tp()}function Lg(i){let e={},t={},o=w(i,"input[type=radio], input[type=checkbox]");for(let n of o){if(!n.name||e[n.name])continue;e[n.name]=!0;let s=0,r=[],l=[],a=o.filter(d=>d.name===n.name);for(let d of a.filter(c=>c.checked)){let c="form_"+n.name+(s?"_"+s:""),h=d.dataset.gtmTag||w(`label[for="${CSS.escape(d.id)}"]`).map(m=>m.textContent).filter(m=>!!m).join(" ");h=h.trim(),t[c]=d.value,t[c+"_label"]=h,++s,r.push(d.value),l.push(h)}if(r.length){let d="form_"+n.name+"_all";t[d]=r.join(";"),t[d+"_label"]=l.join(";")}}for(let n of i.querySelectorAll("input:not([type=radio]):not([type=checkbox]),select,textarea")){if(!n.name||e[n.name])continue;e[n.name]=!0;let s=n.value;if(t["form_"+n.name]=s,n.matches("select")){let r=n.options[n.selectedIndex];r&&(t["form_"+n.name+"_label"]=r.dataset.gtmTag||r.textContent)}}return t}var ep;function ns(){ep||(ep=!0,A.anl&&setInterval(tp,100))}function Ur(i){ns(),addEventListener("wh:form-analytics",e=>{let t={event:`${i?.eventPrefix||"platform:form_"}${e.detail.event}`};for(let[n,s]of Object.entries(e.detail))n!=="event"&&["string","number","boolean"].includes(typeof s)&&(t[`formmeta_${n}`]=s);let o=e.target;o?.dataset.gtmSubmit&&(Object.assign(t,JSON.parse(o.dataset.gtmSubmit)),Object.assign(t,Lg(o))),ve(t)})}M();M();M();ie();Rr();var Je,oi,Vi;
1function ip(i,e,t){if(typeof i!="string")throw new Error("Cookiename must be of type 'string'");if(A.cst&&console.log(`[cst] consenthandler initialized. cookiename: '${i}'`),oi=i,Vi={cookieduration:365,defaultconsent:[],...t},e)try{Je=JSON.parse(ut(oi)),A.cst&&console.log("[cst] initial consent state:",Je)}catch{}(!Je||typeof Je!="object"||Je.v!==2||typeof Je.c!="object")&&(Je={v:2}),"c"in Je?rp():e&&K(e),sp()}function op(i){if(i===void 0)throw new Error("hasConsent required a string argument");let e=Qo();if(!(!e||!e.consent))return e.consent.includes(i)}function np(i){if(oi===void 0)throw new Error("Invoke consenthandler.setup before modifying consent state!");if(typeof i!="object"||!Array.isArray(i))throw new Error("Expecting an array in call to setConsent");let e=Qo(),t=!1;if(e?.consent)for(let o of e.consent)i.includes(o)||(t=!0);if(!Je)throw new Error("Attempting to change consent status before invoking consenthandler.setup");Je.c=i.sort(),Je.lc=new Date().toISOString(),rp(),t&&(console.log("[cst] Reloading to handle revoked consent"),ce({type:"reload"})),sp()}function Qo(){return Je?"c"in Je?{consent:Je.c,isdefault:!1}:Vi?.defaultconsent&&Vi?.defaultconsent.length>0?{consent:Vi.defaultconsent,isdefault:!0}:{consent:void 0,isdefault:!1}:null}function ss(i,e){window.addEventListener("wh:consent-changed",o=>{o.detail.consent?.includes(i)&&e(o.detail)});let t=Qo();t&&t.consent&&t.consent.includes(i)&&(A.cst&&console.log("[anl] Invoking callback",t),e(t))}function Cg(){let i=w(".wh-requireconsent__overlay"),e=Qo().consent;A.cst&&console.log(`[cst] update ${i.length} consent overlay(s). ${e?`consent: ${e.length?e.join(", "):"<none>"}`:"<undefined>"}`),i.forEach(t=>{let o=t.closest(".wh-requireconsent");o&&o.dataset.whConsentRequired&&(t.hidden=e?.includes(o.dataset.whConsentRequired)||!1)})}function sp(){let i=Qo();if(!i||!i.consent){document.documentElement.dataset.whConsent="unknown";return}document.documentElement.dataset.whConsent=i.consent.length?i.consent.join(" "):"denied",A.cst&&console.log("[cst] Firing wh:consent-changed with",i),F(window,"wh:consent-changed",{bubbles:!1,cancelable:!1,detail:i}),K(Cg)}function rp(){oi&&Bt(oi,JSON.stringify(Je),{duration:Vi.cookieduration,domain:Vi.cookiedomain})}window.whResetConsent=function(){if(oi===void 0)throw new Error("Consent handler not setup");if(!oi)throw new Error("Consent handler is not handling storage");Ai(oi),console.log("Reloading for whResetConsent"),ce({type:"reload"})};var rs=ee("socialite:gtm",{allowMissing:!0}),ap;function Fg(i){let e=i.getAttribute("push");e&&window.dataLayer.push(...JSON.parse(e))}async function Ag(){if(ap||!rs)return!1;ap=!0,window.dataLayer.push({"gtm.start":Date.now()}),await new Promise(i=>window.setTimeout(i,1)),window.dataLayer.push({event:"gtm.js"}),await $t("https://www.googletagmanager.com/gtm.js?id="+encodeURIComponent(rs.a))}x("wh-socialite-gtm",Fg);rs?.a&&!rs?.m&&Ag();window.__gtmformsubmit=1;ns();M();ie();N();var Vr=class{constructor(e,t){this.container=null,this.gridcontainer=null,this.items=[],this.newinforefreshtimer=null,this.waitingforimagecount=0,this.options={width:0,height:0,row_height:256,column_width:256,gutter_x:2,gutter_y:2,debug:!1,debug_layout:!1,fill_last_strip_threshold:40},this.options={...this.options,...t},this.gridcontainer=document.createElement("div"),this.gridcontainer.style.position="relative",typeof this.container=="string"?this.container=document.querySelector(e):this.container=e}setOptions(e){Object.assign(this.options,e)}refresh(){this.refreshHorizontal()}refreshHorizontal(){var e=this.options.width,t=this.options.row_height;if(e==0&&(e=this.container.clientWidth,e==0)){console.warn("Cannot draw, the clientWidth of the specified container is 0 (display: none; ?).");return}var o=0,n=this.items.length,s=0,r=0,l=0,a=0;this.options.debug=this.options.debug||this.options.debug_layout,this.options.debug&&(console.groupCollapsed?console.groupCollapsed("JustifiedContentGrid refresh"):console.group("JustifiedContentGrid refresh"),console.log(n,"images"),this.options.debug_layout||console.log("You can also use debug_layout for more information.")),this.options.debug_layout&&console.log("strip_width:",e);for(var d=999,c=999;o<n&&l<c&&d>0;){d--;var h=0,s=0,r=0;l>0&&(a+=this.options.gutter_y);for(var m=[],u=null;o<n&&r<e;){u=this.items[o];var b=Math.ceil(u.width*(t/u.height));u.width_apply=b,r+=u.width_apply+(h==0?0:this.options.gutter_x),r<e&&(s=r,m.push(u),o++),h++}h--;var f=0;if(s!=e){var g=e-s,_=r-e;if(m.length==0){m.push(u),h++;var y=e/u.width,E=t/u.height,S=y>E?y:E,P=Math.ceil(u.width*S),z=Math.ceil(u.height*S);
1u.width_apply=P,u.node_applied={left:0,top:a,width:e,height:t},u.node.style.left="0",u.node.style.top=a+"px",u.node.style.width=e+"px",u.node.style.height=t+"px",u.img_applied={left:(e-P)/2,top:(t-z)/2,width:u.width_apply},u.img.style.width=u.width_apply+"px",u.img.style.left=u.img_applied.left+"px",u.img.style.top=u.img_applied.top+"px",h++,o++,l++,a+=t,this.options.debug_layout&&console.log(o,"will fill it's own row (panoramic)");continue}o==n&&this.options.fill_last_strip_threshold<g?(m.push(u),h++,this.options.debug_layout&&console.log(o,"last image but no need to grow (fill_last_strip_threshold lower than empty space")):g<_?(f=g,this.options.debug_layout&&console.log(o,"will distribute",f,"to items in row")):(f=-_,m.push(u),this.options.debug_layout&&console.log(o,"will shrink",f,"to make a last image fit in the row"),h++,o++)}this.options.debug_layout&&console.info("Row #"+l+" contains ",m.length,"images");var $=Math.floor(f/h),ae=f-$*h;this.options.debug_layout&&(console.info("We need to grow"),console.info({compensatex:f,columns:h,add_each_item:$,add_last_item:ae}));for(var Q=0,le=0;le<h;le++){var u=m[le];if(u.width_apply_orig=u.width_apply,f!=0&&(u.width_apply+=$,le==h-1&&(u.width_apply+=ae)),u.node_applied={left:Q,top:a,width:u.width_apply,height:t},f>0){var ge=u.height*(u.width_apply/u.width);u.img_applied={left:0,top:Math.round((t-ge)/2),width:u.width_apply}}else f<0?u.img_applied={left:Math.round((u.width_apply-u.width_apply_orig)/2),top:0,width:u.width_apply_orig}:f==0&&(u.img_applied={left:0,top:0,width:u.width_apply_orig});u.node.style.left=u.node_applied.left+"px",u.node.style.top=u.node_applied.top+"px",u.node.style.width=u.node_applied.width+"px",u.node.style.height=u.node_applied.height+"px",u.img.style.left=u.img_applied.left+"px",u.img.style.top=u.img_applied.top+"px",u.img.style.width=u.img_applied.width+"px",Q+=u.width_apply+this.options.gutter_x}l++,a+=t}this.gridcontainer.style.width=this.options.width+"px",this.gridcontainer.style.height=a+"px",this.options.debug&&(console.log("The grid consists of",l,"rows"),console.groupEnd())}importItems(e){for(var t=document.createDocumentFragment(),o=0;o<e.length;o++){var n=e[o],s=document.createElement("div");s.style.cssText="position: absolute; overflow: hidden;",s.appendChild(n.contentnode),t.appendChild(s),n.node=s}this.gridcontainer.appendChild(t)}},Bi=class extends Vr{constructor(e,t){super(e,t);for(var o=e.children,n=o.length,s=[],r=0;r<n;r++){var l=o[r],a;if(l.tagName!="IMG"){if(a=l,l=l.querySelector("img"),!l){console.warn("missing image node");continue}}else a=l;l.style.position="absolute";var d=l.getAttribute("data-width"),c=l.getAttribute("data-height");d===null?d=l.naturalWidth:d=parseInt(d),c===null?c=l.naturalHeight:c=parseInt(c),l.removeAttribute("width"),l.removeAttribute("height");var h={img:l,contentnode:a,node:null,width:d,height:c};s.push(h),(d==0||c==0)&&(this.waitingforimagecount++,l.addEventListener("load",this.__onImageLoad.bind(this,h)))}this.importItems(s),this.items=this.items.concat(s),this.container.appendChild(this.gridcontainer)}__onImageLoad(e,t){this.options.debug&&console.log("Updating image size");var o=t.target;e.width=o.naturalWidth,e.height=o.naturalHeight,o.dataset.width=e.width,o.dataset.height=e.height,this.waitingforimagecount--,this.waitingforimagecount==0?(clearTimeout(this.newinforefreshtimer),this.__forceRefresh()):this.newinforefreshtimer||(this.newinforefreshtimer=setTimeout(()=>this.__forceRefresh(),250))}__forceRefresh(){this.newinforefreshtimer=null,this.refresh()}};te();M();re();ie();var Mg=/^([a-z0-9][-a-z0-9_]*[a-z0-9]):([a-z0-9][-.a-z0-9_]*[a-z0-9])$/,Pg=/^(ds_[0-9a-z_]+)|(dn_[0-9a-z_]+)|(db_[0-9a-z_]+)$/,lp=30,$r,Br,jg=!1,Rg=0,ni,$i;function qg(i){return{url:"/.wh/ea/pxl/",altSampleRate:0,altUrl:"/.wh/ea/pxl/alt/",sessionExpiration:lp,noBrowser:!1,beacon:!1,...$r,...i}}function Pi(i,...e){if(console.error("[pxl] "+i,...e),!Pt)throw new Error(i);return null}function Dg(i,e,t,o){if(o={...$r,...o},typeof e!="string")return Pi(`Invalid eventname name '${e}', expected string, got ${typeof e}`);if(!Mg.test(e))return Pi(`Invalid eventname name '${e}', must be a valid module:event name`);if(t&&typeof t!="object")return Pi(`Invalid data, expected object, got ${typeof t}`);Br||(Br=jt());let n=typeof document<"u"?new URL(i,document.baseURI):new URL(i);n.searchParams.set("pe",e),n.searchParams.set("pp",Br),n.searchParams.set("pc",String(++Rg)),n.searchParams.set("ps",Xr()),n.searchParams.set("pi",o?.pi??Yr()),o.altSampleRate&&n.searchParams.set("pr",String(o.altSampleRate));let s=at();if(n.searchParams.set("bt",s.triplet),s.device&&n.searchParams.set("bd",s.device),typeof document<"u"&&(document.documentElement.dataset.whOb&&n.searchParams.set("ob",document.documentElement.dataset.whOb.substring(0,20)),document.location&&n.searchParams.set("bl",document.location.href.substring(0,1e3)),document.referrer&&n.searchParams.set("br",document.referrer.substring(0,1e3)),o.noBrowser||(n.searchParams.set("bu",window.navigator.userAgent.
1substring(0,300)),window.screen.width&&window.screen.height&&n.searchParams.set("bs",`${window.screen.width}x${window.screen.height}`),window.devicePixelRatio&&n.searchParams.set("bp",String(window.devicePixelRatio)))),t)for(let[r,l]of Object.entries(t)){let a=Pg.exec(r);if(!a)return Pi(`Invalid data field name '${r}', should be ds_XXX, dn_XXX or db_XXX with X consisting of characters in the range 0 - 9, a - z or an underscore`);let d=typeof l;if(a[1]){if(l&&d!=="string")return Pi(`Invalid value type '${d}', expected 'string' for field '${r}'`);n.searchParams.set(r,l||"")}else if(a[2]){if(l&&d!=="number")return Pi(`Invalid value type '${d}', expected 'number' for field '${r}'`);n.searchParams.set(r,String(l)||"0")}else if(a[3]){if(l&&d!=="boolean")return Pi(`Invalid value type '${d}', expected 'boolean' for field '${r}'`);n.searchParams.set(r,l?"true":"false")}}return n}function Yr(){if(!ni)try{let i=localStorage.getItem("_wh.ti");i&&new Date(i)>new Date&&(ni=localStorage.getItem("_wh.pi")||void 0,ni&&A.pxl&&console.log(`[pxl] Using id ${ni} from localStorage`)),ni||=jt();let e=$r?.sessionExpiration??lp,t=new Date(Date.now()+e*24*60*60*1e3);localStorage.setItem("_wh.pi",ni),localStorage.setItem("_wh.ti",t.toISOString())}catch{ni||=jt()}return ni}function Xr(){if(!$i)try{$i=sessionStorage["_wh.ps"],$i||=jt(),sessionStorage["_wh.ps"]=$i}catch{$i||=jt()}return $i}function We(i,e,t){let o=qg(t),n=jg?o.altUrl:o.url;A.pxl&&console.log(`[pxl] Event '${i}'`,e),(async()=>{let s=Dg(n,i,e,o);if(!s)return;if(o.beacon&&typeof navigator<"u"&&navigator.sendBeacon){navigator.sendBeacon(s);return}A.pxl&&console.log(`[pxl] Pinging pxl '${s}'`);let r=await fetch(s,{mode:"no-cors",method:"HEAD",credentials:"same-origin",cache:"no-store",keepalive:!0});if(r.type==="opaque"){A.pxl&&console.log(`[pxl] Assuming succesful pxl event '${i}'`);return}if(!r.ok){console.error(`[pxl] Failed to send pxl event '${i}'`,r);return}o.onComplete&&await r.text(),A.pxl&&console.log(`[pxl] Successfully sent pxl event '${i}'`)})().catch(s=>{console.error(`[pxl] Error while sending pxl event '${i}'`,s)}).finally(()=>{o.onComplete?.()})}function It(i){return getComputedStyle(i)}function nt(i,e){for(var t in e){var o=e[t];typeof o=="number"&&(o=o+"px"),i.style[t]=o}return i}function as(i){var e=document.createElement("div");return e.className=i,e}var cp=typeof Element<"u"&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function si(i,e){if(!cp)throw new Error("No element matching method supported");return cp.call(i,e)}function Xi(i){i.remove?i.remove():i.parentNode&&i.parentNode.removeChild(i)}function pp(i,e){return Array.prototype.filter.call(i.children,function(t){return si(t,e)})}var je={main:"ps",rtl:"ps__rtl",element:{thumb:function(i){return"ps__thumb-"+i},rail:function(i){return"ps__rail-"+i},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(i){return"ps--active-"+i},scrolling:function(i){return"ps--scrolling-"+i}}},mp={x:null,y:null};function gp(i,e){var t=i.element.classList,o=je.state.scrolling(e);t.contains(o)?clearTimeout(mp[e]):t.add(o)}function fp(i,e){mp[e]=setTimeout(function(){return i.isAlive&&i.element.classList.remove(je.state.scrolling(e))},i.settings.scrollingThreshold)}function Ig(i,e){gp(i,e),fp(i,e)}var Zo=function(e){this.element=e,this.handlers={}},_p={isEmpty:{configurable:!0}};Zo.prototype.bind=function(e,t){typeof this.handlers[e]>"u"&&(this.handlers[e]=[]),this.handlers[e].push(t),this.element.addEventListener(e,t,!1)};Zo.prototype.unbind=function(e,t){var o=this;this.handlers[e]=this.handlers[e].filter(function(n){return t&&n!==t?!0:(o.element.removeEventListener(e,n,!1),!1)})};Zo.prototype.unbindAll=function(){for(var e in this.handlers)this.unbind(e)};_p.isEmpty.get=function(){var i=this;return Object.keys(this.handlers).every(function(e){return i.handlers[e].length===0})};Object.defineProperties(Zo.prototype,_p);var Gi=function(){this.eventElements=[]};Gi.prototype.eventElement=function(e){var t=this.eventElements.filter(function(o){return o.element===e})[0];return t||(t=new Zo(e),this.eventElements.push(t)),t};Gi.prototype.bind=function(e,t,o){this.eventElement(e).bind(t,o)};Gi.prototype.unbind=function(e,t,o){var n=this.eventElement(e);n.unbind(t,o),n.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(n),1)};
1Gi.prototype.unbindAll=function(){this.eventElements.forEach(function(e){return e.unbindAll()}),this.eventElements=[]};Gi.prototype.once=function(e,t,o){var n=this.eventElement(e),s=function(r){n.unbind(t,s),o(r)};n.bind(t,s)};function ls(i){if(typeof window.CustomEvent=="function")return new CustomEvent(i);var e=document.createEvent("CustomEvent");return e.initCustomEvent(i,!1,!1,void 0),e}function ds(i,e,t,o,n){o===void 0&&(o=!0),n===void 0&&(n=!1);var s;if(e==="top")s=["contentHeight","containerHeight","scrollTop","y","up","down"];else if(e==="left")s=["contentWidth","containerWidth","scrollLeft","x","left","right"];else throw new Error("A proper axis should be provided");zg(i,t,s,o,n)}function zg(i,e,t,o,n){var s=t[0],r=t[1],l=t[2],a=t[3],d=t[4],c=t[5];o===void 0&&(o=!0),n===void 0&&(n=!1);var h=i.element;i.reach[a]=null,h[l]<1&&(i.reach[a]="start"),h[l]>i[s]-i[r]-1&&(i.reach[a]="end"),e&&(h.dispatchEvent(ls("ps-scroll-"+a)),e<0?h.dispatchEvent(ls("ps-scroll-"+d)):e>0&&h.dispatchEvent(ls("ps-scroll-"+c)),o&&Ig(i,a)),i.reach[a]&&(e||n)&&h.dispatchEvent(ls("ps-"+a+"-reach-"+i.reach[a]))}function Te(i){return parseInt(i,10)||0}function Ng(i){return si(i,"input,[contenteditable]")||si(i,"select,[contenteditable]")||si(i,"textarea,[contenteditable]")||si(i,"button,[contenteditable]")}function Hg(i){var e=It(i);return Te(e.width)+Te(e.paddingLeft)+Te(e.paddingRight)+Te(e.borderLeftWidth)+Te(e.borderRightWidth)}var Yi={isWebKit:typeof document<"u"&&"WebkitAppearance"in document.documentElement.style,supportsTouch:typeof window<"u"&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:typeof navigator<"u"&&navigator.msMaxTouchPoints,isChrome:typeof navigator<"u"&&/Chrome/i.test(navigator&&navigator.userAgent)};function Yt(i){var e=i.element,t=Math.floor(e.scrollTop),o=e.getBoundingClientRect();i.containerWidth=Math.round(o.width),i.containerHeight=Math.round(o.height),i.contentWidth=e.scrollWidth,i.contentHeight=e.scrollHeight,e.contains(i.scrollbarXRail)||(pp(e,je.element.rail("x")).forEach(function(n){return Xi(n)}),e.appendChild(i.scrollbarXRail)),e.contains(i.scrollbarYRail)||(pp(e,je.element.rail("y")).forEach(function(n){return Xi(n)}),e.appendChild(i.scrollbarYRail)),!i.settings.suppressScrollX&&i.containerWidth+i.settings.scrollXMarginOffset<i.contentWidth?(i.scrollbarXActive=!0,i.railXWidth=i.containerWidth-i.railXMarginWidth,i.railXRatio=i.containerWidth/i.railXWidth,i.scrollbarXWidth=hp(i,Te(i.railXWidth*i.containerWidth/i.contentWidth)),i.scrollbarXLeft=Te((i.negativeScrollAdjustment+e.scrollLeft)*(i.railXWidth-i.scrollbarXWidth)/(i.contentWidth-i.containerWidth))):i.scrollbarXActive=!1,!i.settings.suppressScrollY&&i.containerHeight+i.settings.scrollYMarginOffset<i.contentHeight?(i.scrollbarYActive=!0,i.railYHeight=i.containerHeight-i.railYMarginHeight,i.railYRatio=i.containerHeight/i.railYHeight,i.scrollbarYHeight=hp(i,Te(i.railYHeight*i.containerHeight/i.contentHeight)),i.scrollbarYTop=Te(t*(i.railYHeight-i.scrollbarYHeight)/(i.contentHeight-i.containerHeight))):i.scrollbarYActive=!1,i.scrollbarXLeft>=i.railXWidth-i.scrollbarXWidth&&(i.scrollbarXLeft=i.railXWidth-i.scrollbarXWidth),i.scrollbarYTop>=i.railYHeight-i.scrollbarYHeight&&(i.scrollbarYTop=i.railYHeight-i.scrollbarYHeight),Og(e,i),i.scrollbarXActive?e.classList.add(je.state.active("x")):(e.classList.remove(je.state.active("x")),i.scrollbarXWidth=0,i.scrollbarXLeft=0,e.scrollLeft=i.isRtl===!0?i.contentWidth:0),i.scrollbarYActive?e.classList.add(je.state.active("y")):(e.classList.remove(je.state.active("y")),i.scrollbarYHeight=0,i.scrollbarYTop=0,e.scrollTop=0)}function hp(i,e){return i.settings.minScrollbarLength&&(e=Math.max(e,i.settings.minScrollbarLength)),i.settings.maxScrollbarLength&&(e=Math.min(e,i.settings.maxScrollbarLength)),e}function Og(i,e){var t={width:e.railXWidth},o=Math.floor(i.scrollTop);e.isRtl?t.left=e.negativeScrollAdjustment+i.scrollLeft+e.containerWidth-e.contentWidth:t.left=i.scrollLeft,e.isScrollbarXUsingBottom?t.bottom=e.scrollbarXBottom-o:t.top=e.scrollbarXTop+o,nt
1(e.scrollbarXRail,t);var n={top:o,height:e.railYHeight};e.isScrollbarYUsingRight?e.isRtl?n.right=e.contentWidth-(e.negativeScrollAdjustment+i.scrollLeft)-e.scrollbarYRight-e.scrollbarYOuterWidth-9:n.right=e.scrollbarYRight-i.scrollLeft:e.isRtl?n.left=e.negativeScrollAdjustment+i.scrollLeft+e.containerWidth*2-e.contentWidth-e.scrollbarYLeft-e.scrollbarYOuterWidth:n.left=e.scrollbarYLeft+i.scrollLeft,nt(e.scrollbarYRail,n),nt(e.scrollbarX,{left:e.scrollbarXLeft,width:e.scrollbarXWidth-e.railBorderXWidth}),nt(e.scrollbarY,{top:e.scrollbarYTop,height:e.scrollbarYHeight-e.railBorderYWidth})}function Ug(i){var e=i.element;i.event.bind(i.scrollbarY,"mousedown",function(t){return t.stopPropagation()}),i.event.bind(i.scrollbarYRail,"mousedown",function(t){var o=t.pageY-window.pageYOffset-i.scrollbarYRail.getBoundingClientRect().top,n=o>i.scrollbarYTop?1:-1;i.element.scrollTop+=n*i.containerHeight,Yt(i),t.stopPropagation()}),i.event.bind(i.scrollbarX,"mousedown",function(t){return t.stopPropagation()}),i.event.bind(i.scrollbarXRail,"mousedown",function(t){var o=t.pageX-window.pageXOffset-i.scrollbarXRail.getBoundingClientRect().left,n=o>i.scrollbarXLeft?1:-1;i.element.scrollLeft+=n*i.containerWidth,Yt(i),t.stopPropagation()})}function Wg(i){up(i,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),up(i,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])}function up(i,e){var t=e[0],o=e[1],n=e[2],s=e[3],r=e[4],l=e[5],a=e[6],d=e[7],c=e[8],h=i.element,m=null,u=null,b=null;function f(y){y.touches&&y.touches[0]&&(y[n]=y.touches[0].pageY),h[a]=m+b*(y[n]-u),gp(i,d),Yt(i),y.stopPropagation(),y.type.startsWith("touch")&&y.changedTouches.length>1&&y.preventDefault()}function g(){fp(i,d),i[c].classList.remove(je.state.clicking),i.event.unbind(i.ownerDocument,"mousemove",f)}function _(y,E){m=h[a],E&&y.touches&&(y[n]=y.touches[0].pageY),u=y[n],b=(i[o]-i[t])/(i[s]-i[l]),E?i.event.bind(i.ownerDocument,"touchmove",f):(i.event.bind(i.ownerDocument,"mousemove",f),i.event.once(i.ownerDocument,"mouseup",g),y.preventDefault()),i[c].classList.add(je.state.clicking),y.stopPropagation()}i.event.bind(i[r],"mousedown",function(y){_(y)}),i.event.bind(i[r],"touchstart",function(y){_(y,!0)})}function Vg(i){var e=i.element,t=function(){return si(e,":hover")},o=function(){return si(i.scrollbarX,":focus")||si(i.scrollbarY,":focus")};function n(s,r){var l=Math.floor(e.scrollTop);if(s===0){if(!i.scrollbarYActive)return!1;if(l===0&&r>0||l>=i.contentHeight-i.containerHeight&&r<0)return!i.settings.wheelPropagation}var a=e.scrollLeft;if(r===0){if(!i.scrollbarXActive)return!1;if(a===0&&s<0||a>=i.contentWidth-i.containerWidth&&s>0)return!i.settings.wheelPropagation}return!0}i.event.bind(i.ownerDocument,"keydown",function(s){if(!(s.isDefaultPrevented&&s.isDefaultPrevented()||s.defaultPrevented)&&!(!t()&&!o())){var r=document.activeElement?document.activeElement:i.ownerDocument.activeElement;if(r){if(r.tagName==="IFRAME")r=r.contentDocument.activeElement;else for(;r.shadowRoot;)r=r.shadowRoot.activeElement;if(Ng(r))return}var l=0,a=0;switch(s.which){case 37:s.metaKey?l=-i.contentWidth:s.altKey?l=-i.containerWidth:l=-30;break;case 38:s.metaKey?a=i.contentHeight:s.altKey?a=i.containerHeight:a=30;break;case 39:s.metaKey?l=i.contentWidth:s.altKey?l=i.containerWidth:l=30;break;case 40:s.metaKey?a=-i.contentHeight:s.altKey?a=-i.containerHeight:a=-30;break;case 32:s.shiftKey?a=i.containerHeight:a=-i.containerHeight;break;case 33:a=i.containerHeight;break;case 34:a=-i.containerHeight;break;case 36:a=i.contentHeight;break;case 35:a=-i.contentHeight;break;default:return}i.settings.suppressScrollX&&l!==0||i.settings.suppressScrollY&&a!==0||(e.scrollTop-=a,e.scrollLeft+=l,Yt(i),n(l,a)&&s.preventDefault())}})}function Bg(i){var e=i.element;function t(r,l){var a=Math.floor(e.scrollTop),d=e.scrollTop===0,c=a+e.offsetHeight===e.scrollHeight,h=e.scrollLeft===0,m=e.scrollLeft+e.offsetWidth===e.scrollWidth,u;return Math.abs(l)>Math.abs(r)?u=d||c:u=h||m,u?!i.settings.wheelPropagation:!0}function o(r){var l=r.deltaX,a=-1*r.deltaY;return(typeof l>"u"||typeof a>"u")&&(l=-1*r.wheelDeltaX/6,a=r.wheelDeltaY/6),r.deltaMode&&r.deltaMode===1&&(l*=10,a*=10),l!==l&&a!==a&&(l=0,a=r.wheelDelta),r.shiftKey?[-a,-l]:[l,a]}function n(r,l,a){if(!Yi.isWebKit&&e.querySelector("select:focus"))return!0;
1if(!e.contains(r))return!1;for(var d=r;d&&d!==e;){if(d.classList.contains(je.element.consuming))return!0;var c=It(d);if(a&&c.overflowY.match(/(scroll|auto)/)){var h=d.scrollHeight-d.clientHeight;if(h>0&&(d.scrollTop>0&&a<0||d.scrollTop<h&&a>0))return!0}if(l&&c.overflowX.match(/(scroll|auto)/)){var m=d.scrollWidth-d.clientWidth;if(m>0&&(d.scrollLeft>0&&l<0||d.scrollLeft<m&&l>0))return!0}d=d.parentNode}return!1}function s(r){var l=o(r),a=l[0],d=l[1];if(!n(r.target,a,d)){var c=!1;i.settings.useBothWheelAxes?i.scrollbarYActive&&!i.scrollbarXActive?(d?e.scrollTop-=d*i.settings.wheelSpeed:e.scrollTop+=a*i.settings.wheelSpeed,c=!0):i.scrollbarXActive&&!i.scrollbarYActive&&(a?e.scrollLeft+=a*i.settings.wheelSpeed:e.scrollLeft-=d*i.settings.wheelSpeed,c=!0):(e.scrollTop-=d*i.settings.wheelSpeed,e.scrollLeft+=a*i.settings.wheelSpeed),Yt(i),c=c||t(a,d),c&&!r.ctrlKey&&(r.stopPropagation(),r.preventDefault())}}typeof window.onwheel<"u"?i.event.bind(e,"wheel",s):typeof window.onmousewheel<"u"&&i.event.bind(e,"mousewheel",s)}function $g(i){if(!Yi.supportsTouch&&!Yi.supportsIePointer)return;var e=i.element;function t(b,f){var g=Math.floor(e.scrollTop),_=e.scrollLeft,y=Math.abs(b),E=Math.abs(f);if(E>y){if(f<0&&g===i.contentHeight-i.containerHeight||f>0&&g===0)return window.scrollY===0&&f>0&&Yi.isChrome}else if(y>E&&(b<0&&_===i.contentWidth-i.containerWidth||b>0&&_===0))return!0;return!0}function o(b,f){e.scrollTop-=f,e.scrollLeft-=b,Yt(i)}var n={},s=0,r={},l=null;function a(b){return b.targetTouches?b.targetTouches[0]:b}function d(b){return b.pointerType&&b.pointerType==="pen"&&b.buttons===0?!1:!!(b.targetTouches&&b.targetTouches.length===1||b.pointerType&&b.pointerType!=="mouse"&&b.pointerType!==b.MSPOINTER_TYPE_MOUSE)}function c(b){if(d(b)){var f=a(b);n.pageX=f.pageX,n.pageY=f.pageY,s=new Date().getTime(),l!==null&&clearInterval(l)}}function h(b,f,g){if(!e.contains(b))return!1;for(var _=b;_&&_!==e;){if(_.classList.contains(je.element.consuming))return!0;var y=It(_);if(g&&y.overflowY.match(/(scroll|auto)/)){var E=_.scrollHeight-_.clientHeight;if(E>0&&(_.scrollTop>0&&g<0||_.scrollTop<E&&g>0))return!0}if(f&&y.overflowX.match(/(scroll|auto)/)){var S=_.scrollWidth-_.clientWidth;if(S>0&&(_.scrollLeft>0&&f<0||_.scrollLeft<S&&f>0))return!0}_=_.parentNode}return!1}function m(b){if(d(b)){var f=a(b),g={pageX:f.pageX,pageY:f.pageY},_=g.pageX-n.pageX,y=g.pageY-n.pageY;if(h(b.target,_,y))return;o(_,y),n=g;var E=new Date().getTime(),S=E-s;S>0&&(r.x=_/S,r.y=y/S,s=E),t(_,y)&&b.preventDefault()}}function u(){i.settings.swipeEasing&&(clearInterval(l),l=setInterval(function(){if(i.isInitialized){clearInterval(l);return}if(!r.x&&!r.y){clearInterval(l);return}if(Math.abs(r.x)<.01&&Math.abs(r.y)<.01){clearInterval(l);return}if(!i.element){clearInterval(l);return}o(r.x*30,r.y*30),r.x*=.8,r.y*=.8},10))}Yi.supportsTouch?(i.event.bind(e,"touchstart",c),i.event.bind(e,"touchmove",m),i.event.bind(e,"touchend",u)):Yi.supportsIePointer&&(window.PointerEvent?(i.event.bind(e,"pointerdown",c),i.event.bind(e,"pointermove",m),i.event.bind(e,"pointerup",u)):window.MSPointerEvent&&(i.event.bind(e,"MSPointerDown",c),i.event.bind(e,"MSPointerMove",m),i.event.bind(e,"MSPointerUp",u)))}var Yg=function(){return{handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1}},Xg={"click-rail":Ug,"drag-thumb":Wg,keyboard:Vg,wheel:Bg,touch:$g},en=function(e,t){var o=this;if(t===void 0&&(t={}),typeof e=="string"&&(e=document.querySelector(e)),!e||!e.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");this.element=e,e.classList.add(je.main),this.settings=Yg();for(var n in t)this.settings[n]=t[n];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var s=function(){return e.classList.add(je.state.focus)},r=function(){return e.classList.remove(je.state.focus)};this.isRtl=It(e).direction==="rtl",this.isRtl===!0&&e.classList.add(je.rtl),this.isNegativeScroll=(function(){var d=e.scrollLeft,c=null;return e.scrollLeft=-1,c=e.scrollLeft<0,e.scrollLeft=d,c})(),this.negativeScrollAdjustment=this.isNegativeScroll?e.scrollWidth-e.clientWidth:0,this.event=new Gi,this.ownerDocument=e.ownerDocument||document,this.scrollbarXRail=as(je.element.rail("x")),e.appendChild(this.scrollbarXRail),this.scrollbarX=as(je.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",s),this.event.bind(this.scrollbarX,"blur",r),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var l=It(this.scrollbarXRail);this.scrollbarXBottom=parseInt(l.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=Te(l.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=Te(l.borderLeftWidth)+Te(l.borderRightWidth),nt
1(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=Te(l.marginLeft)+Te(l.marginRight),nt(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=as(je.element.rail("y")),e.appendChild(this.scrollbarYRail),this.scrollbarY=as(je.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",s),this.event.bind(this.scrollbarY,"blur",r),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var a=It(this.scrollbarYRail);this.scrollbarYRight=parseInt(a.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=Te(a.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?Hg(this.scrollbarY):null,this.railBorderYWidth=Te(a.borderTopWidth)+Te(a.borderBottomWidth),nt(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=Te(a.marginTop)+Te(a.marginBottom),nt(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:e.scrollLeft<=0?"start":e.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:e.scrollTop<=0?"start":e.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach(function(d){return Xg[d](o)}),this.lastScrollTop=Math.floor(e.scrollTop),this.lastScrollLeft=e.scrollLeft,this.event.bind(this.element,"scroll",function(d){return o.onScroll(d)}),Yt(this)};en.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,nt(this.scrollbarXRail,{display:"block"}),nt(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=Te(It(this.scrollbarXRail).marginLeft)+Te(It(this.scrollbarXRail).marginRight),this.railYMarginHeight=Te(It(this.scrollbarYRail).marginTop)+Te(It(this.scrollbarYRail).marginBottom),nt(this.scrollbarXRail,{display:"none"}),nt(this.scrollbarYRail,{display:"none"}),Yt(this),ds(this,"top",0,!1,!0),ds(this,"left",0,!1,!0),nt(this.scrollbarXRail,{display:""}),nt(this.scrollbarYRail,{display:""}))};en.prototype.onScroll=function(e){this.isAlive&&(Yt(this),ds(this,"top",this.element.scrollTop-this.lastScrollTop),ds(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)};en.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),Xi(this.scrollbarX),Xi(this.scrollbarY),Xi(this.scrollbarXRail),Xi(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)};en.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter(function(e){return!e.match(/^ps([-_].+|)$/)}).join(" ")};var Xt=en;var Ts=Mt(Kr()),gt=Mt(bp());N();function cs(i){let e=JSON.parse(i);return e.publish_from=Date.parse(e.publish_from)||null,e.publish_until=Date.parse(e.publish_until)||null,e.regexes&&e.regexes.forEach(t=>t.regex=new RegExp(t.regex,"i")),e.queries&&(e.queries=e.queries.map((t,o)=>{let n=new RegExp(t,"i");return n._term=e._queryterms[o],n})),e}var qe=class extends Error{constructor(e,t,...o){super(...o),this.name="CTAMatchError",this._prop=e,this._values=t}get prop(){return this._prop}get values(){return this._values}};function tn(i,e){let t=e.date||Date.now();if(xe.umc&&console.info("[umc] tryMatchCTAConfig",i,e,t),i.publish_from&&t<i.publish_from)throw new qe("publish_from",{expected:i.publish_from,got:t},`Not yet published: ${t} < ${i.publish_from}`);if(i.publish_until&&t>=i.publish_until)throw new qe("publish_until",{expected:i.publish_until,got:t},`No longer published: ${t} >= ${i.publish_until}`);if(i.countries&&i.countries.length&&(!e.country||!i.countries.includes(e.country)))throw new qe("countries",{expected:i.countries,got:e.country},`'${e.country}' not in [ '${i.countries.join("', '")}' ]`);if(i.beacons&&i.beacons.length){if(!e.beacons)throw new qe("beacons",{},"No beacons triggered");let o;for(let n of i.beacons){if(!e.beacons[n.tag]){if(i.anybeacon)continue;throw new qe("beacons",{expected:n.tag},`Beacon ${n.tag} not triggered`)}let s=n.maxdays*24*60*60*1e3,r=parseInt(e.beacons[n.tag]);if(s>0&&t>r+s){if(i.anybeacon)continue;throw new qe("beacons",{expected:r+s,got:t,tag:n.tag},`Beacon ${n.tag} too old: ${t} > ${r} + ${s}`)}o=!0}if(!o)throw new qe("beacons",{expected:i.beacons},"No allowed beacon triggered")}if(i.regexes&&i.regexes.length){let o=null,n=!0;for(let s of i.regexes){n=n&&s.exclude;try{if(s.regex.test(e.url)){o=s;break}}catch(r){throw new qe("regexes",{expected:s.regex.source,error:r},`Error while trying to match regular expression '${s.regex.source}': ${r}`)}}if(o){if(o.exclude)throw new qe("regexes",{expected:o.regex.source,got:e.url},`URL ${e.url} matches exclusion regular expression '${o.regex.source}'`);
1xe.umc&&console.info(`[umc] URL ${e.url} matches inclusion regular expression '${o.regex.source}'`)}else if(n)xe.umc&&console.info(`[umc] URL ${e.url} not matching any regular expression`);else throw new qe("regexes",{got:e.url},`URL ${e.url} not matching any regular expression`)}if(i.queries&&i.queries.length){for(let o of i.queries)try{if(o.test(e.query)){xe.umc&&console.info(`[umc] Query '${e.query}' matches search term '${o.source}'`);return}}catch(n){throw new qe("queries",{expected:o.source,error:n},`Error while trying to match search term '${o.source}': ${n}`)}throw new qe("queries",{got:e.query||""},`Query '${e.query||""}' not matching any search term`)}}Go();var Qr;async function Zg(i){let e={countrylang:i?.countrylang},t=await qt("publisher:rpc").getIPInfo(e),o={countrycode:t?t.country:"",creationdate:Date.now()};return t&&i?.countrylang&&(o={...o,["countrylang_"+i.countrylang]:t.countryname}),localStorage.setItem("_wh.geoinfo",JSON.stringify(o)),o}async function Zr(i){let e={cachedays:7,countrylang:"",...i};Qr&&await Qr;let t=Promise.withResolvers();Qr=t.promise;let o;try{let s=localStorage.getItem("_wh.geoinfo");s||(localStorage.setItem("_wh.geoinfo",JSON.stringify({dummy:"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"})),s=localStorage.getItem("_wh.geoinfo")||""),o=JSON.parse(s)}catch(s){return console.error(s),t.resolve(),null}let n=!1;if((!o.creationdate||o.creationdate+e.cachedays*86400*1e3<=Date.now()||e.countrylang&&o.countrycode&&!("countrylang_"+e.countrylang in o))&&(n=!0),n&&(o=await Zg(i)),t.resolve(),o&&o.countrycode){let s={countrycode:o.countrycode};return e.countrylang&&(s.countryname=o["countrylang_"+e.countrylang]),s}return null}xg();var wp=Pe,ea=ze,vp=Rt,xp=Mi;M();var kp=Dr,ai=ut,Tp=Bt,ps=Ai;M();re();M();Go();ie();M();ie();kg();re();function Ep(i){return i.startsWith("http:")||i.startsWith("https:")}function tf(){if(!Vo)throw new Error("You must set the baseUrl option when using the RPC Client outside Webhare");return Ep(Vo)?Vo:new URL(Vo,location.origin)}var ia=class{client;options;abortcontroller;timeout;_callurl;_fetchoptions;promise;timedout;aborted;constructor(e,t,o,n,s,r){this.client=e,this.options=n,(n.timeout||n.signal)&&(this.abortcontroller=new AbortController,r.signal=this.abortcontroller.signal,n.timeout&&n.timeout>0&&(this.timeout=n.timeout,setTimeout(()=>this._handleTimeout(),n.timeout)),n.signal&&n.signal.addEventListener("abort",()=>this._abort())),this._callurl=s.toString(),this._fetchoptions=r;let l=fetch(this._callurl,this._fetchoptions);this.promise=this._completeCall(t,o,l)}_handleTimeout(){this.timedout=!0,this.abortcontroller?.abort()}_abort(){this.aborted=!0,this.abortcontroller?.abort()}async _completeCall(e,t,o){let n;for(;;){try{n=await o}catch(r){throw this.client.debug&&console.log(`[rpc] Exception invoking '${e}'`,r),this.aborted?new Error("RPC Aborted"):this.timedout?new Error(`RPC Timeout: timeout was set to ${this.timeout} milliseconds`):new Error("RPC Failed: exception: "+r)}if(this.options.onResponse?.(n),n.status===429&&!("retry429"in this.options&&!this.options.retry429)&&n.headers.get("Retry-After")){let r=parseInt(n.headers.get("Retry-After")||"");this.client.debug&&console.warn(`[rpc] We are being throttled (429 Too Many Requests) - retrying after ${r} seconds`),await new Promise(l=>setTimeout(l,r*1e3)),o=fetch(this._callurl,this._fetchoptions);continue}break}let s;try{if(s=Ui(await n.text()),s.consoleLog)for(let r of s.consoleLog)console.log(`[remote:${r.method}] ${r.location?`${r.location.filename.split("/").at(-1)}:${r.location.line}: `:""}${r.data}`);this.client.debug&&console.log(`[rpc] Received response to '${e}'`,xt(s,["consoleLog","trace"]))}catch(r){throw this.client.debug&&console.warn("[rpc] Response was not valid JSON",r),new Error("RPC Failed: Invalid response received",{cause:r})}if("error"in s){let r=new Error(`RPC Error: ${s.error}`);if(s.trace)try{Bc(r,s.trace)}catch{}throw this.options.debug&&(console.group(),console.warn("RPC failed:",r),t&&(console.warn("Stack at calling point"),console.log(t)),console.groupEnd()),r}return s.result}},oa=class{url;options;constructor(e,t){this.url=e,this.options={timeout:0,debug:!1,...t}}get debug(){return this.options.debug||A.rpc}_tryLogError(e,t){}invoke(e,t){let o=Ep(this.url)?new URL(this.url+e):new URL(this.url+e,this.options.baseUrl||tf()),n=null,s={method:"POST",headers:new Headers({Accept:"application/json","Content-Type":"application/json; charset=utf-8",...this.options.headers}),body:Zn(t,{typed:!0})};return typeof location<"u"&&o.searchParams.set("pathname",location.pathname),this.debug&&(n=Vc(new Error),console.log(`[rpc] Invoking '${e}'`,t)),this.options.onBeforeRequest?.(o,s),new ia(this,e,n,this.options,o,s).promise}},na=class{client;constructor(e){this.client=e}get(e,t,o){if(!["then","catch","finally"].includes(t))return t==="withOptions"?n=>{let s={...this.client.options,...n,headers:{...this.client.options.headers,...n.headers}};return Ki(this.client.url,s)}:(...n)=>this.client.invoke(t,n)}};function Ki(i,e){if(!i)throw new Error("You must specify either a WebHare rpcService name or a full URL");let t=i.match(/^([a-z0-9_]+):([a-z0-9_]+)$/);if(t)i=`/.wh/rpc/${t[1]}/${t[2]}/`;else if(!i.endsWith("/"))throw new Error("Service URL must end in a slash");let o=new oa(i,e);return new Proxy({}
1,new na(o))}var Sp="_publicauthdata";re();function of(){return ee("wrd:auth",{allowMissing:!0})?.cookiename||null}function Lp(){let i=of();if(!i)return null;try{return Ui(ut(i+Sp))}catch{return null}}function hs(){return(Lp()?.expiresMs||0)>Date.now()}function li(){return hs()?Lp()?.userInfo:null}function us(i,e){let t=qt("wrd:auth");e?.passive&&(e={prompt:"none",...e,passive:void 0});let o=Promise.withResolvers();return t.startLogin2(location.pathname+location.search+location.hash,i,Dc(e)||{}).then(n=>{ce(n)}).catch(n=>{o.reject(n)}),o.promise}function sa(){window.triggerWebHareSSO=us}function ms(i){return`/.wh/ea/ap/${i.replace(":",".")}/`}M();async function gs(i,e){let t=e?.doc??document,o=`${ms(i)}ap.`;t.querySelector(`script[src$="${CSS.escape(o+"mjs")}"`)||await Promise.all([$t(o+"mjs",{module:!0,doc:t}),ts(o+"css",{doc:t})])}function ra(i){typeof window<"u"&&window.top===window&&Pe("wh-feedback:accesstoken")?.match(/^[^.]*\.[^.]*\.[^.]*$/)&&(window.whAuthorModeOptions=i,gs("platform:authormode"))}ie();var Cp=new Map;function fs(i,...e){let[t,o]=e,n={};for(let[s,r]of Object.entries(t??{}))if(r!==void 0)if(typeof r=="string")n[`ds_${s}`]=r;else if(typeof r=="number")n[`dn_${s}`]=r;else if(typeof r=="boolean")n[`db_${s}`]=r;else throw new Error(`Invalid type '${typeof r}' for PXL data key '${s}'`);We(i,n,o)}function aa(i){let e=i?.eventPrefix||"platform:form_",t=Cp.get(e);if(t&&Ei!=="production")return console.error(`Duplicate setupFormAnalytics for prefix '${e}', earlier registration: `,t);Cp.set(e,new Error),addEventListener("wh:form-analytics",o=>{let n={};for(let[s,r]of Object.entries(o.detail))s!=="event"&&["string","number","boolean"].includes(typeof r)&&(n[`formmeta_${s}`]=r);fs(`${e}${o.detail.event}`,n,o.detail.event==="abandoned"?{beacon:!0}:void 0)})}function Ji(){return performance.getEntries()[0]?.serverTiming?.find(i=>i.name==="remoteip")?.description??null}ie();function rf(){let i=document.getElementById("wh-console-log");if(i){let e=atob(i.textContent||"");console.group("[etr] Server-side console output"),console.log(e),console.groupEnd()}}K(rf);var _s="."+document.domain.split(".").slice(location.host.match(/webhare.(nl|dev)$/)?1:-2).join(".");function Ap(){let i=(document.documentElement.lang||"").split("-")[0].toLowerCase();return["nl","de"].includes(i)?i:"en"}var la=class{_consent=!1;cookieName="utwente__avgconsent";avg=!0;constructor(){}reset(){Ai(this.cookieName,{domain:_s}),ze("utwente-design:cookiebar-variant",null),location.reload()}info(){console.log("[utwente-avg-api] Cookiedomain = "+_s),console.log("[utwente-avg-api] Prefs = "+JSON.stringify(Ee._getPrefs())),console.log("[utwente-avg-api] Settings = "+JSON.stringify({consent:Ee._consent}))}getNewTexts(){let e="https://"+(location.host.match(/webhare.nl$/)?"utwente":"www")+_s;switch(Ap()){case"nl":return{privacylink:"https://www.utwente.nl/over-de-website/",cookielink:e+"/nl/cookies/",accept:"Accepteren",reject:"Weigeren"};case"de":return{privacylink:"https://www.utwente.nl/de/ueber-unsere-webseite/",cookielink:e+"/de/cookies/",accept:"Zustimmen",reject:"Ablehnen"};default:return{privacylink:"https://www.utwente.nl/en/about-our-website/",cookielink:e+"/en/cookies/",accept:"Accept",reject:"Reject"}}}getNewContent(e,t){switch(Ap()){case"nl":return[p("h2",null,"Cookies"),p("p",null,"We gebruiken cookies en vergelijkbare technologie\xEBn en verwerken je persoonlijke gegevens (bijv. IP-adres) voor gepersonaliseerde content, advertenties en voor media integraties van externe aanbieders. Voor het gebruiken en analyseren van de website plaatsen wij altijd functionele en strikt analytische cookies. De gegevensverwerking voor niet-functionele en niet-analytische cookies vereist jouw toestemming. Voor meer informatie over het gebruik van je gegevens, bezoek onze ",p("a",{href:t},"privacyverklaring")," of ons ",p("a",{href:e},"cookiebeleid"),".")];case"de":return[p("h2",null,"Cookies"),p("p",null,"Wir verwenden Cookies und \xE4hnliche Technologien und verarbeiten deine personenbezogenen Daten (z.B. IP-Adresse) f\xFCr personalisierte Inhalte, Werbung und die Einbindung von Drittanbieter-Medien. Funktionale und strikt analytische Cookies werden immer gesetzt. F\xFCr nicht notwendige und nicht analytische Cookies ben\xF6tigen wir deine Einwilligung. Weitere Informationen findest du in unserer ",p("a",{href:t},"Datenschutzerkl\xE4rung")," oder unseren ",p("a",{href:e},"Cookie-Richtlinien"),".")];case"en":return[p("h2",null,"Cookies"),p("p",null,"We use cookies and similar technologies to process your personal data (e.g. IP address) for personalised content, ads and third-party media integrations. Functional and strictly analytical cookies are always set. Non-e
1ssential and non-analytical cookies require your permission. For more details, see our ",p("a",{href:t},"privacy statement")," or ",p("a",{href:e},"cookie policy"),".")]}}_showBar(){let e=()=>{Ee._setPrefs({c:!1}),s.close()},t=()=>{Ee._setPrefs({c:!0}),s.close()},o=this.getNewTexts(),n=[p("button",{type:"button",class:"wh-form__button",onClick:e},o.reject),p("button",{type:"button",class:"wh-form__button",onClick:t},o.accept)],s=p("dialog",{"data-nosnippet":!0,class:"utwente-cookiedialog"},this.getNewContent(o.cookielink,o.privacylink),p("div",{class:"utwente-cookiedialog__buttons"},n));document.body.appendChild(s),s.showModal(),getComputedStyle(s).display==="none"?s.close():document.activeElement?.blur?.()}_getPrefs(){try{let e=JSON.parse(ut(this.cookieName)||"{}");if(e?.v==="1"&&(this.cookieName="utwente__cookieprefs",e=JSON.parse(ut(this.cookieName)||"{}")),e.v===1)return{...e,isset:!0}}catch(e){console.log("Error parsing cookie",e)}return{isset:!1,c:!1}}_handlePrefs(e,{ischange:t=!1}){Ee._consent=!!e.c;try{let o={utwenteAnalytics:!0,utwenteConsent:Ee._consent};ve({event:"utwente.cookiesettings",...o}),t&&ve({event:"utwente.cookieconsent",...o}),document.documentElement.classList[Ee._consent?"add":"remove"]("utwente--consent");let n=document.createEvent("HTMLEvents");n.initEvent("wh:consent-change",!0,!1),document.dispatchEvent(n)}catch(o){console.error(o)}}_setCookie(e){let t=JSON.stringify(e),o=new Date(Date.now()+86400*365*1e3);Bt(this.cookieName,t,{domain:_s,expires:o,sameSite:"None",secure:!0})}_setPrefs(e){let t=this._getPrefs(),o={c:e.c??t.c,v:1,lc:new Date().toUTCString()};Ee._setCookie(o),o.isset=!0,Ee._handlePrefs(o,{ischange:!0})}setup(){let e=Ee._getPrefs();if(Ee._handlePrefs(e,{ischange:!1}),e.isset)Ee._setCookie(e);else{if(document.documentElement.classList.contains("utwente--nocookiebar")||document.documentElement.classList.contains("wh-isstaticdownload")||document.documentElement.classList.contains("wh-widgetpreview")||document.querySelector("form.ut-cookiewidget, div.widget-cookiesettings")||location.host.match(/utchallenge.nl$/)||window.top!==window.self)return;Ee._showBar()}}_save(){let e=document.querySelector("#utwenteCookiesConsent")?.checked||!1;this._setPrefs({c:e})}_accept(){this.acceptMarketingCookies()}acceptMarketingCookies(){this._setPrefs({c:!0})}getConsent(){return Ee._consent}getAnalytics(){return!0}getCookieSettingsLink(){return this.getNewTexts().cookielink}getExplicitAnalytics(){return!0}},Ee=new la;function Mp(i){let e=i.elements.namedItem("thirdparty")??ue("Missing checkbox named 'thirdparty' in cookie settings form");e.checked=Ee.getConsent(),e.addEventListener("change",t=>{Ee._setPrefs({c:e.checked})}),i.inert=!1}function Pp(){function i(){let e=[];Ee.getConsent()&&e.push("marketing"),Ee.getAnalytics()&&e.push("analytics"),np(e)}ip(""),window.addEventListener("wh:consent-change",i),i(),x(".utwente__marketing__checkbox",e=>e.addEventListener("change",function(){e.checked&&Ee._setPrefs({c:!0})}))}K(()=>Ee.setup());window.utwenteSetConsent=(i,e)=>Ee._setPrefs({c:e});window.utwenteResetCookies=()=>Ee.reset();var lt=Ee;M();var jp=!1;window._cb=window._cb||[];function af(i){op("marketing")||(i.querySelector(".cb_online").style.display="",i.querySelector(".cb_offline").style.display="none");let e=function(o){ot(o.target)&&o.target.closest("#my_cb_button")||(i.classList.remove("cobrowserchatcontrol--opencontrol"),window.removeEventListener("touchstart",e))};i.querySelector(".cb_chatbutton")?.addEventListener("click",function(){i.classList.add("cobrowserchatcontrol--activated")}),i.querySelector(".cb_online .cb_chatbutton")?.addEventListener("click",function(){window.dataLayer.push({event:"chat-klik"})}),i.addEventListener("touchstart",function(o){i.classList.contains("cobrowserchatcontrol--opencontrol")||(o.preventDefault(),i.classList.add("cobrowserchatcontrol--opencontrol"),window.addEventListener("touchstart",e))});let t=document.querySelector("input#cobrowserchatcontrol_accept_cookies");t&&t.addEventListener("change",function(){t.checked&&(lt._setPrefs({c:!0}),da())})}function da(){let i=document.querySelector("#my_cb_button .cb_online");i&&jp&&getComputedStyle(i).display!=="none"?document.querySelector("#my_cb_button .cb_online .cb_click")?.click():setTimeout(da,200)}function lf(){let i=T("#my_cb_button");i&&(i.querySelector(".cb_online").style.display="none",i.querySelector(".cb_offline").style.display="",jp=!0,window._cb.push(["setSourceHash","58886d0920b635.17133377"]),window._cb.push(["setPrivacyLevel","allowTracking"]),window._cb.push(["setEndpoint","https://app.cobrowser.com//sdk/"]),window._cb.push(["setDataEndpoint","https://app.cobrowser.com//"]),window._cb.push(["setVersion",""]),window._cb.push(["forceTransport","jsonp"]),window._cb.push(["addPageview"]),window._cb.push(["setDefaultCss",!0]),window._cb.push(["setAutoLoad",!0]),window._cb.push(["setDebugMode",!1]),(location.pathname.startsWith("/en/online-open-day/")||location.pathname.startsWith("/en/online-open-day-int/"))&&window._cb.push(["pollAvailability",5e3]),document.body.appendChild(W("script",{id:"cb_script",src:"https://app.cobrowser.com/sdk/loader.js"})))}function Rp(){x("#my_cb_button",af),ss("marketing",()=>lf()),location.hash&&location.hash.includes("#cobrowser")&&da()}M();Pp();N();var Qi={};function dt(){return Qi||{}}function Zi(){return Qi.guid||null}function Gt(i){let e=Zi();Qi={...Qi,...i},Tp("ut-settings",JSON.stringify(Qi),{duration:365}),e!==Zi()&&F(window,"ut-settings-changed",{bubbles:!0,cancelable:!1,detail:{userguid:Zi()}})}try{Qi=JSON.parse(ai("ut-settings"))||{}}catch{}ie();M();function qp(){try{return JSON.parse(ut("ut-sess"))||{}}catch{return{}}}function df(i){Bt("ut-sess",JSON.stringify(i))}
1function Dp(i){return{device:at().triplet,firstreferrer:i}}function st(){let i=qp(),e=dt(),t={device:at().triplet,firstreferrer:(e?e.firstreferrer:"")||"",firstrefertime:(e?e.firstrefertime:0)||0,sessionreferrer:i.referrer||"",sessionstart:i.start||0,clientid:(e?e.clientid:"")||""};if(lt.getConsent())for(let n of["gclid","gbraid","wbraid"])i[n]&&(t[n]=i[n]);let o=Object.keys(zt()).filter(n=>n.startsWith("usertype-"))[0];return o?{...t,beaconusertype:o.substring(9)}:t}function cf(){let i=dt(),e=(document.referrer||"direct:").substr(0,1e3);if(e){let s=new URL(e),r=new URL(location.href).searchParams;for(let l of r.keys())l.match(/^(gclid|utm_.*|fbclid|dyn_.*)$/)&&s.searchParams.set(l,r.get(l));e=s.toString()}let t=qp(),o=null;t.start||(A.anl&&console.log("[anl] trackFirstReferrer: stored as session referrer: "+e),o={referrer:e,start:Date.now()});let n=new URL(location.href);for(let s of["gclid","wbraid","gbraid"])n.searchParams.has(s)&&(o={...o,[s]:n.searchParams.get(s)||""});if(o&&df({...t,...o}),i.firstrefertime){let s=(Date.now()-i.firstrefertime)/864e5;if(s<90){A.anl&&console.log("[anl] trackFirstReferrer: ignoring referrer because currently stored referrer is "+s+" days old");return}}Gt({firstreferrer:e,firstrefertime:Date.now()}),A.anl&&console.log("[anl] trackFirstReferrer: stored as first referrer: "+e)}cf();N();var nn={};Lc(nn,{WRDAuthenticationProvider:()=>on,default:()=>xf,getDefaultAuth:()=>di});N();M();ie();Ko();var Jp=Mt(ga());ie();M();var Tt=null;function vf(i){return i=i.split("/").slice(3).join("/"),i?"?b="+encodeURIComponent(i):""}function Kp(i){return i.split("/").slice(0,3).join("/")}var on=class{userinfo=null;constructor(e){e||(e={}),this.cookiename="cookiename"in e?e.cookiename:"webharelogin",this.refresh(),window.$wh$legacyAuthProvider=this}refresh(){this.isloggedin=!1,this.userinfo=li(),this.logouturl="",this.loginservice=new Jp.default({url:"/wh_services/wrd/auth"});let e=ai(this.cookiename+"_j"),t=ai(this.cookiename+"_c");if(xe.aut&&(console.log("[aut] "+this.cookiename+"_j="+e),console.log("[aut] "+this.cookiename+"_c="+t)),!!e&&!(!t||t.substr(0,e.length)!==e)&&(xe.aut&&console.log("[aut] looks like we're still logged in"),this.isloggedin=!0,t.length>1))try{this.userinfo=JSON.parse(t.substr(e.length))}catch{}}getCurrentSessionId(){return ai(this.cookiename+"_j")||""}logout(){let e=location.href;if(this.logouturl){let o=new URL(this.logouturl,e).toString();if(Kp(e)!==Kp(o))throw new Error("A logout URL is not allowed to change the origin");e=o}let t="/.wrd/auth/logout.shtml"+vf(e);location.replace(t)}setupLoginForm(e){if(!e)throw new Error("No such form");new ii(e,{Enter:t=>this._handleLoginForm(e,t)}),e.addEventListener("submit",t=>this._handleLoginForm(e,t)),e.addEventListener("click",t=>this._handleLoginClick(e,t))}_handleLoginClick(e,t){if(!e.hasAttribute("data-wh-wrdauth-attached")&&ot(t.target)&&t.target.closest(".wh-wrdauth__loginbutton"))return this._handleLoginForm(e,t)}_handleLoginForm(e,t){if(e.hasAttribute("data-wh-wrdauth-attached"))return;V(t);let o=e.querySelector('*[name="login"]'),n=e.querySelector('*[name="password"]'),s=e.querySelector('*[name="persistent"]');if(!o)throw new Error("No field named 'login' found");if(!n)throw new Error("No field named 'password' found");let r=s&&s.checked;this._tryLogin(e,o.value,n.value,{persistent:r})}login(e,t,o){return o={...o},new Promise((n,s)=>{let l={logincontrol:new URL(location.href).searchParams.get("wrdauth_logincontrol")||""};return this.loginservice.request("Login",[location.href,e,t,!!o.persistent,l],function(a){n(a)},function(a){s(a)})})}loginSecondFactor(e,t,o,n){return new Promise((s,r)=>{let a={logincontrol:new URL(location.href).searchParams.get("wrdauth_logincontrol")||""};return this.loginservice.request("LoginSecondFactor",[location.href,e,t,{...o},a],function(d){s(d)},function(d){r(d)})})}getAfterLoginSubmitInstruction(e={}){let t=new URL(location.href),o=e.logincontrol||t.searchParams.get("wrdauth_logincontrol")||"";return new Promise((n,s)=>{this.loginservice.request("getAfterLoginSubmitInstruction",[location.href,o],function(r){n(r)},function(r){s(r)})})}_tryLogin(e,t,o,n){let s=G();e&&e.classList.add("submitting"),this.login(t,o,n).then(r=>this.onLoginSuccess(s,e,r)).catch(r=>this._onLoginFailure(s,e,n,r))}onLoginSuccess(e,t,o){t&&t.classList.remove("submitting");let n=()=>this._completeLoginSuccess(e,o,t);F(t||document.documentElement,"wh:wrdauth-onlogin",{bubbles:!0,cancelable:!0,detail:{callback:n,userinfo:o.userinfo},defaulthandler:n})}_completeLoginSuccess(e,t,o){if(e.release(),t.success){if(t.submitinstruction){ce(t.submitinstruction);return}console.log("Reloading after succesfull login"),ce({type:"reload"});return}this._failLogin("The specified login data is incorrect.",t,o)}_onLoginFailure(e,t,o,n,s){t&&t.classList.remove("submitting"),e.release(),this._failLogin("An error has occurred.",{code:n},t)}_failLogin(e,t,o){["REQUIRESETUPSECONDFACTOR","FAILEDVALIDATIONCHECKS","REQUIRESECONDFACTOR"].includes(t.code)&&(console.error(`Code "${t.code}" is NOT supported by @mod-wrd/js/auth - you will need to remove this library and fully switch to setupAuth in @webhare/frontend to support password requirements and/or MFA`),e="An internal error has occured in the account management system. Please contact the webmaster.");let n={message:e,code:t.code,data:t.data};!F(o||document.documentElement,"wh:wrdauth-loginfailed",{bubbles:!0,cancelable:!0,detail:n})||alert(e)}isLoggedIn(){return hs()}getUserInfo(){return li()}setLogoutURL(e){this.logouturl=e}startLogin(e,t,o){o=o||{};let n=Promise.withResolvers();return this.loginservice.request("StartLogin",[e,t,location.href,o],n.resolve,n.reject),n.promise}startSAMLLogin(e,t){return this.startLogin("saml",e,t)}setupPage(){document.documentElement.classList.toggle("wh-wrdauth-loggedin",this.isLoggedIn()),document.documentElement.classList.toggle("wh-wrdauth--isloggedin",this.isLoggedIn())}static getDefaultAuth(){return Tt}};function di(){return Tt}window.$wh&&window.$wh.WRDAuthenticationProvider?console.log("Both designfiles wrd.auth and @mod-wrd/js/auth are loaded. @mod-wrd/js/auth will not activate"):ye["wrd:auth"]&&(Tt=new on(ye["wrd:auth"]),Tt.setupPage(),x(".wh-wrdauth__logout, .whplugin-wrdauth-logout",i=>{i.whplugin_processed=!0,i.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault(),Tt.logout()})}),x(".wh-wrdauth__loginform, .whplugin-wrdauth-loginform",i=>{i.whplugin_processed=!0,Tt.setupLoginForm(i)}),Tt.userinfo&&(x("*[data-wrdauth-text]",i=>{let e=i.dataset.wrdauthText;e in Tt.userinfo&&(i.textContent=Tt.userinfo[e])}),x("*[data-wrdauth-value]",i=>{let e=i.dataset.wrdauthValue;e in Tt.userinfo&&(i.value=Tt.userinfo[e])})));var xf=on;window.$wh$wrdauth=!0;function vs(i){return i?i.startsWith("2001:67c:2564:")||i.startsWith("2001:610:1908:")||i.startsWith("130.89.")||i.startsWith("145.126.")&&parseInt(i.split(".")[2])<=95?"internal":"external":""}ie();function ji({prompt:i=!1,silent:e=!1,redirect:t=""}={}){let o=t||location.href,n=new URL("/.utdesign/auth/login.shtml",location.href);return n.searchParams.set("goto",o.substr(location.origin.length+1)),i&&n.searchParams.set("prompt","1"),e&&n.searchParams.set("silent","1"),n.toString()}function Ri(){return nn?.getDefaultAuth()?.getUserInfo()}x(".ut-login--clicktologin,a[href^='x-ut-login:']",i=>i.addEventListener("click",e=>{V(e),location.href=ji({redirect:i.dataset.redirect?i.dataset.redirect:""})}));(Ei==="development"||Ei==="test")&&console.log("To debug your login settings go to",new URL("/.utdesign/auth/userinfo.shtml?path="+encodeURIComponent(location.pathname),location.href).toString());var xs=Ri();window.dataLayer?.push({isloggedin:xs?"true":"false",logintype:xs?xs.isemployee?"Yes - employee":xs.isstudent?"Yes - student":"Yes - other":"No",company:Ri()?.company??"",network:vs(Ji())});
1Rr();var ci={},fa=null;function yf(i){if(i.data&&i.data.formdone&&(window.dataLayer&&window.dataLayer.push({event:"formulier-submit",form:i.data.formdone+"-"+(i.data.country||""),form_programme:i.data.study||"",url:location.href}),!location.href.includes("ut-mld-no-redirect")))switch(i.data.formdone){case"meeloopdagen-ba-de":setTimeout(()=>document.location="/de/schnuppertag/bachelor/danke",100);break;case"meeloopdagen-ba-nl":setTimeout(()=>document.location="/meeloopdag/bachelor/bedankt",100);break;case"meeloopdagen-ba-int":setTimeout(()=>document.location="/en/student-for-a-day/bachelor/thanks",100);break;case"meeloopdagen-ma-de":setTimeout(()=>document.location="/de/schnuppertag/master/danke",100);break;case"meeloopdagen-ma-nl":setTimeout(()=>document.location="/meeloopdag/master/bedankt",100);break;case"meeloopdagen-ma-int":setTimeout(()=>document.location="/en/student-for-a-day/master/thanks",100);break}}function Qp(i){if(window.ga&&window.ga.getAll){for(let e of window.ga.getAll())if(e.get("trackingId")===i)return e}return null}function Zp(){let i=window.setTimeout(Zp,500),e=Qp("UA-9767236-1")||Qp("UA-9767236-16");if(e){let t=e.get("clientId");t&&(t!==dt().clientid&&Gt({clientid:t}),window.clearTimeout(i),xp("didclientidcheck",!0))}}function kf(){let i=dt(),e={paginatitel:document.title,fileid:document.documentElement.dataset.id||0,hoofdniveau:document.documentElement.dataset.hoofdniveau||"",subniveau:document.documentElement.dataset.subniveau||"",taal:(document.documentElement.lang||"").split("-")[0],opleiding:document.documentElement.dataset.programme||"",type:document.documentElement.dataset.targetinterest||"",userid:Zi()||"",site:document.documentElement.dataset.site||"",experimentId:document.documentElement.dataset.experimentId||"",experimentVariant:document.documentElement.dataset.experimentVariant||"",country:i?.country||"",countryname:i?.countryname||"",network:vs(Ji())};window.dataLayer.push(e)}async function ct(){fa||(fa=Zr({cachedays:1,countrylang:"en"}));let i=await fa;return i&&(Gt({country:i.countrycode,countryname:i.countryname}),window.dataLayer.push({country:i.countrycode,countryname:i.countryname})),i?.countrycode||null}function ys(){return new URL(location.href).searchParams.get("ut-countrycode")||dt().country||null}function pt(i,e){let t={};i&&(t.guid=i),e&&(t.firstname=e),Gt(t),window.dataLayer&&window.dataLayer.push({userid:Zi()||""})}function Tf(i){if(!i.detail.extrasubmit.referralinfo){i.detail.extrasubmit.referralinfo=st();let e=Object.keys(ci).filter(t=>t.startsWith("usertype-"))[0];e&&(i.detail.extrasubmit.referralinfo.beaconusertype=e.substr(9))}}function zt(){return ci}function eh(){try{return localStorage["umc-beacons"]=JSON.stringify(ci),window.setTimeout(function(){F(window,"ut-beaconchange",{bubbles:!0,cancelable:!0})},0),!0}catch(i){return console.log(i),!1}}function pi(i,e){e||(e=Date.now()),window.dataLayer&&window.dataLayer.push({event:"trigger-user-beacon",beacon:i}),A.umc&&console.log(`[umc] Added ${i} with timestamp ${e}`),ci[i]=e,eh()}function io(i){ci[i]&&(window.dataLayer&&window.dataLayer.push({event:"clear-user-beacon",beacon:i}),A.umc&&console.log("[umc] Clearing "+i),delete ci[i],eh())}function Ef(){kp().filter(o=>o.name.match(/^ut-umc-setbeacon-/)).forEach(o=>{pi(o.name.substr(17),parseInt(o.value)),ps(o.name,{domain:location.host.substr(location.host.indexOf("."))})});let i=Ri(),e="";i&&(i.isemployee?e="employee":i.isstudent&&(e="student"));let t=ai("ut-user-type");if(t&&(["student","employee"].includes(e)||(e=t),location.host.endsWith(".utwente.nl")?ps("ut-user-type",{domain:"utwente.nl"}):ps("ut-user-type")),e){let o=`usertype-${e}`;Object.keys(ci).filter(n=>n!==o&&n.startsWith("usertype-")).forEach(io),pi(o)}}function Sf(i){i.dataset.gtm&&window.dataLayer.push(JSON.parse(i.dataset.gtm))}try{ci=JSON.parse(localStorage["umc-beacons"])||{}}catch{}x(".ut-beacon",i=>pi(i.dataset.setbeacon));x("ut-anl",i=>Sf(i));window.addEventListener("wh:form-preparesubmit",Tf);Ef();Ur({eventPrefix:"publisher:form"});addEventListener("wh:form-analytics",i=>{i.detail.event==="submitted"&&i.target.dataset.gtmSubmit&&setTimeout(()=>ve({event:"formulier-submit"}),1)});kf();window.addEventListener("message",i=>yf(i));ct().then(()=>{},()=>{});vp("didclientidcheck")||window.addEventListener("load",Zp);function _a(i,e,t){let o=i.querySelector("."+t+"--showall");o&&o.addEventListener("click",n=>{if(o.parentNode){let r=getComputedStyle(o);i.setAttribute("data-height",parseInt(i.getAttribute("data-height"))-parseInt(r.height)-parseInt(r.marginTop)),o.parentNode.removeChild(o),i._wsTmpHeight=getComputedStyle(i).height}let s=i.querySelector("."+e);s.classList.contains(e+"--init")&&(s.setAttribute("data-height",s.clientHeight+"px"),s.classList.remove(e+"--init"),s._wsTmpHeight=getComputedStyle(s).height),requestAnimationFrame(()=>{o.classList.contains(t+"--open")?(o.classList.remove(t+"--open"),s.classList.remove(e+"--open"),s.style.height="",i.setAttribute("data-height",parseInt(i.getAttribute("data-height"))-parseInt(s.getAttribute("data-height"))+"px"),i.style.height=i.getAttribute("data-height")):(o.classList.add(t+"--open"),s.classList.add(e+"--open"),s.style.height=s.getAttribute("data-height"),i.setAttribute("data-height",parseInt(i.getAttribute("data-height"))+
1parseInt(s.getAttribute("data-height"))+"px"),i.style.height=i.getAttribute("data-height"))})})}N();Ko();var th=Mt(ha()),ba=Mt(Kr()),sn=class{_node;constructor(e,t,o){this._class=(o?o.baseclass:"")||"selectlist",this._fixitemswidth=!(o&&!o.fixitemswidth),this._node=e,this._items=t,this._connection=new th.default,this._connection.on("requestend",n=>this._gotSuggestions(n)),this._lookuppending=!1,this._lookuphistory=[],this._lookuplock=null,this._dontresuggest=!1,this.options={template:"",noresultstext:"",minlength:3,numsuggestions:10,immediateresuggest:!1,suggestdelay:200,triminput:!0,...o},this._node.addEventListener("input",()=>this._onInput()),this._node.addEventListener("blur",n=>this._onBlur(n)),this._items.addEventListener("click",n=>this._clickItem(n)),new ii(this._node,{ArrowDown:n=>this._onArrowDown(n)},{captureunsafekeys:!0})}cancel(){this._updatetimer&&(clearTimeout(this._updatetimer),this._updatetimer=0),this._endLock()}_clickItem(e){V(e);let t=e.target.closest("."+this._class+"__item");t&&this._doSelectItem(t)}_onArrowDown(e){}_onInput(){this._lookuppending||this._dontresuggest||this._node.disabled||this._node.readOnly||(this._lookuplock||(this._lookuplock=G(),this._node.classList.add(this._class+"--autosuggesting")),this._updatetimer&&clearTimeout(this._updatetimer),this._updatetimer=setTimeout(()=>this._checkInput(),this.options.suggestdelay))}_endLock(){this._lookuplock&&(this._lookuplock.release(),this._lookuplock=null,this._node.classList.remove(this._class+"--autosuggesting"))}_onBlur(){this.cancel()}_safeToSuggest(e){return!(e.length<this.options.minlength)}async _checkInput(){try{await this._offerSuggestions()}finally{this._endLock()}}_getCurrentInput(){let e=this._node.value;return this.options.triminput&&(e=e.trim()),e}async _offerSuggestions(){let e,t;do{if(e=this._getCurrentInput(),!this._safeToSuggest(e)){F(this._node,"searsia:hidesuggestions",{bubbles:!0,cancelable:!1});return}t=await this._lookup(e)}while(e!=this._getCurrentInput());if(!t||t.length==0){F(this._node,"searsia:hidesuggestions",{bubbles:!0,cancelable:!1});return}this._generateItems({input:e,values:t}),F(this._node,"searsia:showsuggestions",{bubbles:!0,cancelable:!1})}async _lookup(e){let t=this._lookuphistory.find(s=>s.input==e);if(t)return t.values;this._lookuppending=!0;let o=ba.default.fillUrlTemplate(this.options.template,ba.default.encodedQuery(e));this._connection.stopCurrentRequest(),this._connection.startXMLHTTPRequest("GET",o),this._deferred=$o();let n=await this._deferred.promise;return this._lookuphistory.push({input:e,values:n}),this._lookuppending=!1,n}_gotSuggestions(e){if(e.responsejson&&e.responsejson.length&&e.responsejson.length>1){let t=e.responsejson[1].slice(0,this.options.numsuggestions);this._deferred.resolve(t);return}this._deferred.reject(new Error("Unexpected suggestion result"))}_generateItems(e){this._items.replaceChildren();for(let t of e.values){let n=t.toUpperCase().indexOf(e.input.toUpperCase())>=0?t.substr(0,e.input.length):"";t=t.substr(n.length),this._items.appendChild(p("span",{class:this._class+"__item searchsheet__section-link"},p("span",{class:"searchsheet__section-link-icon UT-icon-UT_icon_70_search-16px"}),p("span",{class:this._class+"__itemvalue"},n&&p("span",{class:"searchsheet__suggestmatch"},n),t)))}}_doSelectItem(e){let t=e.querySelector("."+this._class+"__itemvalue").textContent;this.options.immediateresuggest||(this._dontresuggest=!0),$e(this._node,t),this._dontresuggest=!1,F(this._node,"searsia:searchsuggestion",{bubbles:!0,cancelable:!1,detail:{value:t}})}};N();ie();re();te();var Lf=/\+3153489(\d{4})/,Cf=/\+316(\d{2}){4}/;function St(i,e){if(A.searsia)return p("span",{class:"searsia__debuginfo"},i.rankscore," (",i.score,"|",e.rank,"|",i.urllang,"|",e.resource,")")}function ih(i,e,t){let o="",n="ut-searchicon_01-ut-14px";return e.type==="serviceportal"?i.isprivate&&(n="ut-searchicon_04-lock-12px"):e.type==="publication"?(o=v("utwente_base:frontend.ws2016.js.searchsheet.publication")+" | ",n="ut-searchicon_08-book-12px"):e.type==="location"?(o=v("utwente_base:frontend.ws2016.js.searchsheet.location")+" | ",n="UT-icon-UT_icon_16_pointer-24px"):e.type==="courses"&&(n="UT-icon-UT_icon_93_education-16px"),p("a",{class:"searsia__result",href:B(i.url,"attribute")},St(i,e),p("span",{class:"searsia__title"},[o,Fe(B(i.title,"attribute"),t,"searsia__title")]),i.description&&p("span",{class:"searsia__desc"},Fe(B(i.description,"attribute"),t,"searsia__desc")),p("span",{class:"searsia__link"},p("span",{class:"searsia__icon "+n}
1),i.url&&oo(B(i.url,"attribute"))))}function oh(i,e,t,o){return t?p("div",{class:"searsia__result searsia__result--news",href:B(i.url,"attribute")},St(i,e),i.image&&p("a",{href:B(i.url,"attribute"),class:"searsia__thumb",style:`background-image: url("${i.image}")`}),p("a",{href:B(i.url,"attribute"),class:"searsia__title"},Fe(B(i.title,"attribute"),o,"searsia__title")),p("span",{class:"searsia__desc"},p("span",{class:"searsia__desc-prefix"},e.resource==="utoday"?v("utwente_base:frontend.ws2016.js.searchsheet.utoday")+": ":"",i.date&&B(i.date,"attribute")),i.description&&Fe(B(i.description,"attribute"),o,"searsia__desc"))):p("a",{class:"searsia__result",href:B(i.url,"attribute")},St(i,e),p("span",{class:"searsia__title"},[v("utwente_base:frontend.ws2016.js.searchsheet.news")+" | ",Fe(B(i.title,"attribute"),o,"searsia__title")]),p("span",{class:"searsia__desc"},i.date&&p("span",{class:"searsia__desc-prefix"},B(i.date,"attribute")),i.description&&Fe(B(i.description,"attribute"),o,"searsia__desc")),p("span",{class:"searsia__link"},p("span",{class:"searsia__icon ut-searchicon_03-news-12px"}),i.url&&oo(B(i.url,"attribute"))))}function nh(i,e,t,o){return t?p("div",{class:"searsia__result searsia__result--news",href:B(i.url,"attribute")},St(i,e),i.image&&p("a",{href:B(i.url,"attribute"),class:"searsia__thumb",style:`background-image: url("${i.image}")`}),p("a",{href:B(i.url,"attribute"),class:"searsia__title"},Fe(B(i.title,"attribute"),o,"searsia__title")),p("span",{class:"searsia__desc"},i.date&&p("span",{class:"searsia__desc-prefix"},B(i.date,"attribute")),i.description&&Fe(B(i.description,"attribute"),o,"searsia__desc"))):p("a",{class:"searsia__result",href:B(i.url,"attribute")},St(i,e),p("span",{class:"searsia__title"},[v("utwente_base:frontend.ws2016.js.searchsheet.event")+" | ",Fe(B(i.title,"attribute"),o,"searsia__title")]),p("span",{class:"searsia__desc"},i.date&&p("span",{class:"searsia__desc-prefix"},B(i.date,"attribute")),i.description&&Fe(B(i.description,"attribute"),o,"searsia__desc")),p("span",{class:"searsia__link"},p("span",{class:"searsia__icon ut-searchicon_07-calendar-12px"}),i.url&&oo(B(i.url,"attribute"))))}function sh(i,e,t,o){return t?p("div",{class:"searsia__result searsia__result--people"},St(i,e),i.image&&p("span",{class:"searsia__thumb",style:`background-image: url("${i.image}")`}),p("span",{class:"searsia__toggle"}),p("span",{class:"searsia__title"},Fe(B(i.name||i.title,"attribute"),o,"searsia__title")),p("span",{class:"searsia__desc"},i.job&&Fe(B(i.job,"attribute"),o,"searsia__desc")),p("div",{class:"searsia__peopledetails"},p("div",{class:"searsia__peopledetails-content"},i.location&&(i.latitude&&i.longitude?p("a",{href:va(`${i.latitude},${i.longitude}`),class:"searsia__peopledetail"},p("span",{class:"searsia__peopledetail-icon UT-icon-UT_icon_16_pointer-24px"}),B(i.location,"attribute")):p("span",{class:"searsia__peopledetail"},p("span",{class:"searsia__peopledetail-icon UT-icon-UT_icon_16_pointer-24px"}),B(i.location,"attribute"))),i.phone&&p("a",{href:`tel:${i.phone}`,class:"searsia__peopledetail"},p("span",{class:"searsia__peopledetail-icon UT-icon-UT_icon_13_phone-24px"}),wa(B(i.phone,"attribute"))),i.mail&&p("a",{href:`mailto:${i.mail}`,class:"searsia__peopledetail"},p("span",{class:"searsia__peopledetail-icon UT-icon-UT_icon_15_mail-24px"}),B(i.mail,"attribute")),p("a",{href:i.url,class:"searsia__peopledetail"},p("span",{class:"searsia__peopledetail-icon UT-icon-UT_icon_40_avatar-24px"}),v("utwente_base:frontend.ws2016.js.searchsheet.peoplepage"))))):p("a",{class:"searsia__result",href:B(i.url,"attribute")},St(i,e),p("span",{class:"searsia__title"},[v("utwente_base:frontend.ws2016.js.searchsheet.people")+" | ",Fe(B(i.name||i.title,"attribute"),o,"searsia__title")]),i.job&&p("span",{class:"searsia__desc"},Fe(B(i.job,"attribute"),o,"searsia__desc")),p("span",{class:"searsia__link"},p("span",{class:"searsia__icon ut-searchicon_02-people-12px"}),i.url&&oo(B(i.url,"attribute"))))}function rh(i,e,t,o){return t?p("div",{class:"searsia__result searsia__result--video"},St(i,e),p("a",{href:B(i.url,"attribute")},i.image&&p("span",{class:"searsia__thumb",style:`background-image: url("${i.image}")`},p("span",{class:"searsia__playbutton themecolor--bg"}),p("span",{class:"searsia__playbutton-icon themecolor--fg"})),p("span",{class:"searsia__title"},Fe(B(i.title,"attribute"),o,"searsia__title")),p("span",{class:"searsia__desc"},i.date&&p("span",{class:"searsia__desc-prefix"},B(i.date,"attribute")),i.description&&Fe(B(i.description,"attribute"),o,"searsia__desc")))):p("a",{class:"searsia__result",href:B(i.url,"attribute")},St(i,e),p("span",{class:"searsia__title"},[v("utwente_base:frontend.ws2016.js.searchsheet.video")+" | ",Fe(B(i.title,"attribute"),o,"searsia__title")]),i.description&&p("span",{class:"searsia__desc"},Fe(B(i.description,"attribute"),o,"searsia__desc")),p("span",{class:"searsia__link"},p("span",{class:"searsia__icon ut-searchicon_05-play-12px"}
1),i.url&&oo(B(i.url,"attribute"))))}function ah(i,e,t,o){return t?p("a",{class:"searsia__imagegrid__item",href:i.url,title:B(i.title,"attribute")},p("img",{src:i.image,class:"searsia__imagegrid__item__image"}),St(i,e)):p("a",{class:"searsia__result",href:B(i.url,"attribute")},St(i,e),p("span",{class:"searsia__title"},[v("utwente_base:frontend.ws2016.js.searchsheet.image")+" | ",Fe(B(i.title,"attribute"),o,"searsia__title")]),i.description&&p("span",{class:"searsia__desc"},Fe(B(i.description,"attribute"),o,"searsia__desc")),p("span",{class:"searsia__link"},p("span",{class:"searsia__icon ut-searchicon_01-ut-14px"}),i.url&&oo(B(i.url,"attribute"))))}function lh(i,e,t){return p("div",{class:"searsia__related"},p("div",{class:"searsia__related__title"},v("utwente_base:frontend.ws2016.js.searchsheet.related")+":"),p("div",{class:"searsia__related__links"},i.map(o=>p("span",{class:"searsia__related__link"},p("span",{class:"searsia__related__linkicon UT-icon-UT_icon_70_search-16px"}),Fe(B(o.title,"attribute"),t,"searsia__related__link")))))}function dh(){return p("div",{class:"searsia__filtered"},v("utwente_base:frontend.ws2016.js.searchsheet.filteredresults"))}function Fe(i,e,t){if(!e)return i;let o=[];for(;i;){let n=i.match(e);if(o.push(n?i.substr(0,n.index):i),!n)break;o.push(p("span",{class:t+"--match ut-querymatch"},n[0])),i=i.substr(n.index+n[0].length)}return o}function oo(i){return i.indexOf("http://")===0?i=i.substr(7):i.indexOf("https://")===0&&(i=i.substr(8)),i.indexOf("www.")===0&&(i=i.substr(4)),i}function wa(i){let e=i.match(Lf);return e?p("span",{class:"searsia__phone"},"+31 (0)53 489 ",p("b",null,e[1])):(e=i.match(Cf),e?p("span",{class:"searsia__phone"},"+31 (0)6 ",e.slice(1).join(" ")):i)}function va(i){return`https://maps.google.com/maps?hl=${encodeURIComponent(v.tidLanguage)}&daddr=${encodeURIComponent(i)}&z=15`}N();ie();re();te();var Qe=null,xa=0;function hh(i,e,t,o){let n;if(i)for(let s of i)switch(s.source.type){case"location":n=Pf(s)||n;break;case"event":n=jf(s,o)||n;break}else{Qe=null;let s=Ff(e,t);s&&(n=s.node,Qe={type:s.type,node:s.node})}return n}function Ff(i,e){for(let t of i)for(let o of t.cta.ctas)try{tn(o.ctaconfig,e),A.umc&&console.info(`[umc] Showing ${t.type} CTA ${o.ctaconfig.tag}`,o);let n;switch(t.type){case"highlight":n=Af(o);break;case"widget":n=Mf(o);break;default:throw`Unknown CTA slot type '${t.type}'`}if(n)return{type:t.type,node:n}}catch(n){if(n instanceof qe)A.umc&&console.warn(`[umc] Not showing ${t.type} CTA ${o.ctaconfig.tag}: ${n.message}`);else throw n}}function Af(i){let e,t,o=p("div",{class:"searsia__widget searsia__widget--highlight","data-widget-type":"highlight"},p("div",{class:"searsia__highlight-text"},e=i.title&&(i.buttonlink?p("a",{class:"searsia__highlight-title",href:i.buttonlink,target:i.buttonnewwindow?"_blank":"",rel:"noreferrer"}):p("div",{class:"searsia__highlight-title"})),t=i.description&&p("div",{class:"searsia__highlight-description"}),i.buttonlink&&i.buttontitle&&p("a",{class:"searsia__highlight-link",href:i.buttonlink,target:i.buttonnewwindow?"_blank":"",rel:"noreferrer"},i.buttontitle)),i.photo&&(i.buttonlink?p("a",{class:"searsia__highlight-image",style:`background-image: url("${i.photo.link}");`+(i.photo.refpoint_backgroundposition?`background-position: ${i.photo.refpoint_backgroundposition};`:""),href:i.buttonlink,target:i.buttonnewwindow?"_blank":"",rel:"noreferrer"},p("span",{class:"searsia__highlight-suggested"},v("utwente_base:frontend.ws2016.js.searchsheet.suggestedresult"))):p("div",{class:"searsia__highlight-image",style:`background-image: url("${i.photo.link}");`+(i.photo.refpoint_backgroundposition?`background-position: ${i.photo.refpoint_backgroundposition};`:"")},p("span",{class:"searsia__highlight-suggested"},v("utwente_base:frontend.ws2016.js.searchsheet.suggestedresult")))));return e&&(e.innerHTML=i.title),t&&(t.innerHTML=i.description),o}function Mf(i){let e,t,o=p("div",{class:"searsia__widget searsia__widget--cta","data-widget-type":"cta"},e=i.title&&p("div",{class:"inlinecta__title"}),i.buttonlink&&i.buttontitle&&p("a",{class:"inlinecta__button themecolor--bg",href:i.buttonlink,"data-wh-datalayer-onclick-cta_type":"inline-button-cta","data-wh-datalayer-onclick-event":"cta-click","data-wh-datalayer-onclick-click_text":i.buttontitle,"data-wh-datalayer-onclick-click_url":i.buttonlink,target:i.buttonnewwindow?"_blank":"",rel:"noreferrer"},i.buttontitle),t=i.description&&p("div",{class:"inlinecta__description"},p("div",{class:"inlinecta__icon UT-icon-UT_icon_117_paperclip-64px"})));if(e&&(e.innerHTML=i.title),t){let n=p("span",null);n.innerHTML=i.description,t.append(...n.childNodes)}return o}function Pf(i){let e;return Qe?Qe.type=="location"&&setTimeout(()=>ph(i.hit.title,xa).then(()=>A.searsia&&console.info(`[searsia] Done for '${i.hit.title}'`))):(A.searsia&&console.info("[searsia] Showing location widget",i),e=p("div",{class:"widget searsia__widget searsia__widget--location searsia__widget--loading","data-widget-type":"location"}),Qe={type:"location",result:i,node:e,locreqid:++xa},setTimeout(()=>ph(i.hit.title,xa).then(()=>A.searsia&&console.info(`[searsia] Done for '${i.hit.title}'`)))),e}async function ph(i,e){if(!i||!Qe)return;
1A.searsia&&console.log(`[searsia] Fetching data for location '${i}'`);let t=await fetch("/.publisher/sd/utwente_base/ws2016/location.shtml?name="+encodeURIComponent(i)+"&lang="+encodeURIComponent(v.tidLanguage),{credentials:"same-origin"});if(t.status!=200){A.searsia&&console.warn(`[searsia] Location '${i}' not found`);return}let o=await t.json();if(!Qe||Qe.locreqid!=e){A.searsia&&console.log("[searsia] Widget no longer shown",Qe.locreqid,e);return}let n=p("div",{class:"widget__front"},o.img&&p("div",{class:"widget__photos"},p("span",{class:"widget__photoslide widget__photoslide--fullwidth",style:`background-image: url("${o.img.link}")`})),p("div",{class:"widget__title widget__title--belowphotos"},B(o.title,"attribute"),o.address&&p("span",null,p("br",null),o.address.street+" "+o.address.nr_detail,p("br",null),o.address.zip+" "+o.address.city)),p("div",{class:"widget__list"},o.phone&&p("a",{href:"tel:"+B(o.phone,"attribute"),class:"widget__listitem widget__listitem--link"},p("div",{class:"overflow__container"},p("span",{class:"widget__listitem-icon UT-icon-UT_icon_13_phone-24px"}),p("span",{class:"widget__listitem-text"},wa(B(o.phone,"attribute"))))),o.email&&p("a",{href:"mailto:"+B(o.email,"attribute"),class:"widget__listitem widget__listitem--link overflow"},p("div",{class:"overflow__container"},p("span",{class:"widget__listitem-icon UT-icon-UT_icon_15_mail-24px"}),p("span",{class:"softbreak"},"\xA0"),p("span",{class:"widget__listitem-text","data-overflow":v("utwente_base:frontend.ws2016.js.searchsheet.overflow--email")},B(o.email,"attribute")))),p("a",{href:o.mappdfurl,class:"widget__listitem widget__listitem--link"},p("div",{class:"overflow__container"},p("span",{class:"widget__listitem-icon UT-icon-UT_icon_22_file-pdf-24px"}),p("span",{class:"widget__listitem-text"},v("utwente_base:frontend.ws2016.js.searchsheet.downloadmap")))),o.coord&&p("a",{href:va(o.coord),class:"widget__listitem widget__listitem--link"},p("span",{class:"widget__listitem-icon UT-icon-UT_icons_164_navigate-24px"}),p("span",{class:"widget__listitem-text"},v("utwente_base:frontend.ws2016.js.searchsheet.route")))));Qe.node.appendChild(n),Qe.node.classList.remove("searsia__widget--loading")}function jf(i,e){let t;if(Qe){if(Qe.type=="event"){let o=p("a",{class:"widget__listitem widget__listitem--link",href:B(i.hit.url,"attribute")},p("span",{class:"widget__listitem-text"},B(i.hit.title,"attribute")),i.hit.date&&p("span",{class:"widget__listitem-subtext"},B(i.hit.date,"attribute")));Qe.node.querySelector(".widget__list").appendChild(o)}}else{A.searsia&&console.info("[searsia] Showing events widget",i);let o=e||i.hit.url.split("!/")[0];t=p("div",{class:"widget searsia__widget searsia__widget--event","data-widget-type":"event"},p("div",{class:"widget__front"},p("div",{class:"widget__title widget__title--withicon"},p("span",{class:"widget__title-icon UT-icon-UT_icon_11_events-24px"}),v("utwente_base:frontend.ws2016.js.searchsheet.events")),i.hit.image&&p("div",{class:"widget__photos"},p("span",{class:"widget__photoslide widget__photoslide--fullwidth",style:`background-image: url("${i.hit.image}")`})),p("div",{class:"widget__list"},p("a",{class:"widget__listitem widget__listitem--link",href:B(i.hit.url,"attribute")},p("span",{class:"widget__listitem-text"},B(i.hit.title,"attribute")),i.hit.date&&p("span",{class:"widget__listitem-subtext"},B(i.hit.date,"attribute")))),p("a",{class:"widget__link",href:o},v("utwente_base:frontend.ws2016.js.searchsheet.allevents")))),Qe={type:"event",result:i,node:t}}return t}var no=Symbol("result-score"),ks=Symbol("result-lang"),Rf=Symbol("result-source"),hi,ya="all";function qf(i,e){for(let t=0;t<i.length;++t)if(i[t]===e[0]){let o;for(o=0;o<e.length&&i[t+o]===e[o];++o);if(o===e.length)return!0}return!1}var ka=class{constructor(e){this.node=e;this.inputNode=L(e,".searchsheet__searchfield"),this.headerNode=e.querySelector(".searchsheet__searchform"),this.statusNode=e.querySelector(".searchsheet__status"),this.resultsNode=e.querySelector(".searsia__results"),this.suggestNode=e.querySelector(".searchsheet__suggestions"),this.ctaslots=[],this.haveResults=!1,this.searsiaSession="",this.headerNode.addEventListener("transitionend",n=>this.onTransitioned(n)),this.inputNode.addEventListener("focus",n=>this.onInputFocus(n)),this.inputNode.addEventListener("blur",n=>this.onInputFocus(n)),this.inputNode.addEventListener("searsia:showsuggestions",n=>this.onShowSuggestions(n)),this.inputNode.addEventListener("searsia:hidesuggestions",n=>this.onHideSuggestions(n)),this.inputNode.addEventListener("searsia:searchsuggestion",n=>this.onStartSearch(n)),this.inputNode.form.addEventListener("submit",n=>this.onStartSearch(n)),this.statusNode.addEventListener("click",n=>this.onClickStatus(n)),this.resultsNode.addEventListener("click",n=>this.onClickResult(n)),e.addEventListener("keydown",n=>this.onKeyDown(n)),this.lang=(document.documentElement.lang||"").split("-")[0],this.stopwordfilters=(gt.QUERY_STOPWORDS[this.lang]||[]).map(n=>new RegExp(`((^|\\s+)${n}(\\s+|$))`,"i")),this.userCountry=ys(),this.userCountry?A.umc&&console.log(`[umc] User country '${this.userCountry}'`):(A.umc&&console.log("[umc] Requesting user country"),ct().then(n=>{this.userCountry=n,console.log(`[umc] User country '${this.userCountry}'`)})),this.userBeacons=zt(),A.umc&&console.log("[umc] User beacons",this.userBeacons),this.url=new URL(location.href),this.searchType=this.url.searchParams.get("t"),this.tabWidgets=!1,this.tabNodes=[],this.tabs=new Map;let t=this.node.querySelector(".searchsheet__tabs");new Xt(t,{swipePropagation:!0,wheelPropagation:!0,suppressScrollY:!0});for(let n of this.node.querySelectorAll(".searchsheet__tab"))n.remove();let o=this.url.searchParams.get("q");o&&!document.documentElement.classList.contains("utwente--ws2026")?this.doSearchFor(o):document.documentElement.classList.contains("searchsheet--fixed")&&(this.toggle(!0),this.reset()),window.addEventListener("pagehide",n=>this.onUnload(n))}node;inputNode;client;async initSearsiaClient(e){e&&(ya=e,this.searchType||(this.searchType=e)),this.configPromise||(this.configPromise=this.fetchSearchConfig()),await this.configPromise}async fetchSearchConfig(){A.searsia&&console.log("[searsia] Fetching search configuration");let t=`/.st/utwente_base/searchsettings.${document.documentElement.lang.substring(0,2)}.json?`+Math.random(),o=await fetch(t,{credentials:"same-origin"});if(o.status!==200){A.searsia&&console.warn("[searsia] Did not receive search configuration");return}let n=await o.json(),s=localStorage.searsiaApiTemplate||n.settings.apitemplate;this.client=Ts.default.initClient(s),this.client||(A.searsia&&console.warn("[searsia] Searsia not yet connected, retrieving client"),this.client=await new Promise(l=>Ts.default.connectToServer(l)),A.searsia&&console.warn("[searsia] We have a client now!")),this.client&&this.client.status!=="error"&&(this.suggest=new sn(this.inputNode,this.suggestNode,{template:this.client.resource.suggesttemplate,minlength:gt.MIN_SUGGEST_LENGTH,numsuggestions:gt.NUM_SUGGESTIONS})),n.searchcta_highlight&&this.ctaslots.push({type:"highlight",cta:n.searchcta_highlight}),n.searchcta_widget&&this.ctaslots.push({type:"widget",cta:n.searchcta_widget});for(let l of this.ctaslots)for(let a of l.cta.ctas)try{a.ctaconfig=cs(a.ctaconfig)}catch{a.ctaconfig=null}this.eventsurl=n.events_url,this.manipulatedqueries=n.queries.filter(l=>l.lang===this.lang).map(l=>({...l,terms:this.getQueryTerms(l.query)}));let r=this.node.querySelector(".searchsheet__tabscontainer");for(let l of n.tabs){let a=p("a",{href:"#",class:"searchsheet__tab","data-tab":l.name},l.title);l.showwidgets&&(a.dataset.widgets=""),this.tabNodes.push(a),this.tabs.set(a.dataset.tab,{node:a}),a.addEventListener("click",d=>this.onShowTab(d)),a.dataset.tab===this.searchType||!this.searchType&&a.dataset.tab===ya?(a.classList.add("searchsheet__tab--current"),this.tabWidgets="widgets"in a.dataset):a.classList.remove("searchsheet__tab--current"),r.append(a)}A.searsia&&console.info("[searsia] Search configuration",this.ctaslots,this.eventsurl)}getQueryTerms(e){let t=e.match(/(\+|")?\b\w+\b"?/g),o=[],n=null;for(let s of t){let r=!1;if(s.startsWith('"')&&(s=s.substr(1),n||(r=!0)),s.endsWith('"')){if(s=s.substr(0,s.length-1),r)r=!1,s="+"+s;else if(n){n.push(s),o.push(n),n=null;continue}}r&&(n=[]),n?n.push(s):(s.startsWith("+"),o.push(s))}return n&&(n.length===1?o.push("+"+n[0]):o.push(n)),o.map(s=>typeof s=="string"?s.toLowerCase():s.map(r=>r.toLowerCase()))}toggle(e,t){let o=!document.documentElement.classList.contains("searchsheet--open");return o?(this.initSearsiaClient(t),F(this.node,"searsia:showsearchsheet",{bubbles:!0,cancelable:!1}),We("utwente_base:searsia_open"),document.documentElement.classList.remove("searchsheet--closing"),document.documentElement.classList.add("searchsheet--opening"),this.node._wsTmpTransition=getComputedStyle(this.node).transition,document.documentElement.classList.add("searchsheet--open"),this.node._wsTmpTransition=getComputedStyle(this.node).transition):e||(We("utwente_base:searsia_close"),this.node.classList.remove("searchsheet--show"),document.documentElement.classList.remove("searchsheet--opening"),document.documentElement.classList.add("searchsheet--closing"),this.node._wsTmpTransition=getComputedStyle(this.node).transition,document.documentElement.classList.add("searchsheet--close"),document.documentElement.classList.remove("searchsheet--open"),this.node._wsTmpTransition=getComputedStyle(this.node).transition,this.updateUrl(!0)),o}showSheet(e){for(let t of["quicklinks","quickresults","results"])t===e?this.node.classList.add("searchsheet--show"+t):this.node.classList.remove("searchsheet--show"+t)}showTab(e,t){if(this.tabs.has(e)){let o=this.tabs.get(e);this.tabWidgets=!1;for(let n of this.tabNodes)n===o.node?(n.classList.add("searchsheet__tab--current"),this.tabWidgets="widgets"in n.dataset):n.classList.remove("searchsheet__tab--current");We("utwente_base:searsia_showtab",{ds_tab:e}),this.searchType=e!=="all"?e:"",t||(this.doSearch(),this.updateUrl())}}setStyles(e){for(let t of Object.keys(e))this.node.style[t]=e[t]}reset(){this.suggest&&this.suggest.cancel(),this.inputNode.form.reset(),this.inputNode.focus(),this.haveResults=!1,this.showSheet("quicklinks"),this.showTab(ya,!0),this.updateUrl(!0)}updateUrl(e){if(e)this.url.searchParams.delete("q"),this.url.searchParams.delete("t");else{let t={q:this.inputNode.value,t:this.searchType};this.url.searchParams.set("q",t.q),t.t?this.url.searchParams.set("t",t.t):this.url.searchParams.delete("t")}window.history.replaceState(null,"",this.url.toString())}onShowTab(e){e.preventDefault();let t=e.target.closest(".searchsheet__tab");t&&this.showTab(t.dataset.tab)}onTransitioned(e){e.propertyName==="transform"&&e.target===this.headerNode&&document.documentElement.classList.contains("searchsheet--close")&&(F(this.node,"searsia:hidesearchsheet",{bubbles:!0,cancelable:!1}),document.documentElement.classList.remove("searchsheet--close"),this.showSheet("quicklinks"))}onInputFocus(e){e.type==="focus"?this.node.classList.add("searchsheet--inputfocus"):this.node.classList.remove("searchsheet--inputfocus")}onShowSuggestions(){this.showSheet("quickresults")}onHideSuggestions(){this.haveResults?this.showSheet("results"):this.showSheet("quicklinks")}onStartSearch(e){e.preventDefault(),this.inputNode.value&&(this.inputNode.blur(),this.doSearch(),this.updateUrl())}doSearchFor(e,t){this.toggle(!0,t),this.inputNode.value=e,t&&this.showTab(t,!0),this.doSearch(),this.updateUrl()}async doSearch(){await this.configPromise,this.suggest&&this.suggest.cancel(),this.orgQuery=this.getFilteredUserQuery();let e={q:this.orgQuery,t:this.searchType};this.query=this.inputNode.value,this.queryWords=this.getUserQueryWords(e.q),this.queryFilter=null,this.filteredResults=0,this.numResults=0,this.didYouMean="",this.relatedNode=null,this.searsiaSession=Ts.default.searchFederated(e,t=>this.onResults(t)),A.searsia&&console.info("[searsia] searchFederated",e,this.searsiaSession),We("utwente_base:searsia_search",{ds_session:this.searsiaSession,ds_query:e.q,ds_type:e.t})}getFilteredUserQuery(){let e=this.inputNode.value;for(let t of this.stopwordfilters)e=e.replace(t," ");return e.trim()}getUserQueryWords(e){return e?new RegExp(`\\b${e.match(/\b\w+\b/g).join("\\b|\\b")}\\b`,"i"):null}getQueryFilter(){if(!this.queryFilter){this.queryFilter=null;let e=this.orgQuery.match(/\b\w+\b/g).map(t=>t.toLowerCase());for(let t of this.manipulatedqueries)if(t.terms.every(o=>
1typeof o=="string"?o.startsWith("+")?e.includes(o.substring(1)):e.includes(o):qf(e,o))){this.queryFilter=t;break}this.queryFilter?(this.queryFilter=this.queryFilter.urls.map(t=>({...t,seen:!1})),A.searsia&&this.queryFilter.length&&console.info("[searsia] Using queryFilter",this.queryFilter)):this.queryFilter=[]}return this.queryFilter}async onResults(e){if(await this.configPromise,this.queryFilter=this.getQueryFilter(),A.searsia&&console.info("[searsia]",e),e.sessionid!==this.searsiaSession){A.searsia&&console.warn(`[searsia] Ignoring search results for old session '${e.sessionid}'`);return}switch(e.status){case"start":We("utwente_base:searsia_start",{ds_session:this.searsiaSession}),this.allhits=[],this.haveResults=!0,this.showSheet("results"),this.resultsNode.replaceChildren(),this.grid=null,this.statusNode.innerHTML=mt("utwente_base:frontend.ws2016.js.searchsheet.searching",this.query),this.searchType==="images"&&this.resultsNode.appendChild(p("div",{class:"searsia__imagegrid"})),this.tabWidgets&&this.showWidgets(),we();break;case"hits":{let t={...gt.SEARSIA_SOURCES[e.resource.id],resource:e.resource.id,rank:e.rank};if(We("utwente_base:searsia_hits",{ds_session:this.searsiaSession,ds_resource:e.resource.id,dn_hits:e.hits.length,db_hidden:t.display===!1}
1),t.display===!1)break;if(t.type==="didyoumean"){!this.didYouMean&&e.hits.length&&(this.didYouMean=e.hits[0].title,this.updateStatusNode(),We("utwente_base:searsia_didyoumean",{ds_session:this.searsiaSession,ds_suggestion:this.didYouMean}));break}if(t.type==="related"){let s=e.hits.slice(0,gt.NUM_RELATED);A.searsia&&console.info("[searsia] Show related searches",s),this.relatedNode=lh(s,t,this.queryWords);break}let o=gt.SEARSIA_DUPLICATE_RESOURCES.indexOf(t.resource),n=[];for(let s of e.hits){let r=this.queryFilter.find(c=>c.url===s.url);if(r&&(r.seen=!0,r.pos<0)){A.searsia&&console.info("[searsia] Skipping filtered hit",s),++this.filteredResults;continue}if(o>=0){let c=this.allhits.findIndex(h=>h.hit.url===s.url);if(c>=0)if(this.allhits[c].score>=o)A.searsia&&console.info("[searsia] Removing duplicate hit",this.allhits[c].hit),this.allhits[c].node.remove(),this.allhits.splice(c,1);else{A.searsia&&console.info("[searsia] Skipping duplicate hit",s);continue}}s.rankscore=s.score,s.urllang=this.getResultLanguage(s,t),r&&(A.searsia&&console.info("[searsia] Promoting hit",s,r.pos),s.rankscore=5-r.pos,s.urllang=this.lang),n.push({hit:s,source:t}),++this.numResults;let l=this.resultsNode;if(this.searchType==="images")l=this.resultsNode.querySelector(".searsia__imagegrid");else if(t.group&&(l=this.resultsNode.querySelector(`.searsia__resultgroup--${t.group}`),!l)){l=p("div",{class:"searsia__resultgroup searsia__resultgroup--"+t.group}),l[no]=1/0;let c=Array.from(this.resultsNode.childNodes).find(h=>h[no]<l[no]);this.resultsNode.insertBefore(l,c)}let a;switch(t.type){case"news":a=oh(s,t,this.searchType==="news",this.queryWords);break;case"event":a=nh(s,t,this.searchType==="news",this.queryWords);break;case"people":a=sh(s,t,this.searchType==="people",this.queryWords);break;case"video":a=rh(s,t,this.searchType==="videos",this.queryWords);break;case"image":a=ah(s,t,this.searchType==="images",this.queryWords);break;default:a=ih(s,t,this.queryWords)}a[no]=s.rankscore,a[ks]=s.urllang,a[Rf]=t.resource;let d=Array.from(l.childNodes).find(c=>c.classList.contains("searsia__widget")?!1:this.lang!=="nl"&&a[ks]!==c[ks]?a[ks]!=="nl":c[no]<a[no]);l.insertBefore(a,d),o>=0&&this.allhits.push({hit:s,node:a,score:o})}this.updateStatusNode(),this.searchType||this.showWidgets(n),we()}break;case"done":{if(We("utwente_base:searsia_done",{ds_session:this.searsiaSession,dn_results:this.numResults}),this.searchType==="images"){let t=this.resultsNode.firstChild;this.grid=new Bi(t,this.getDefaultGridOptions(this.resultsNode)),this.imggridresizetimer||window.addEventListener("resize",()=>{!this.grid||!this.grid.container.clientWidth||(clearTimeout(this.imggridresizetimer),this.imggridresizetimer=setTimeout((function(){let o=this.getDefaultGridOptions(this.resultsNode);this.grid.setOptions(o),this.grid.refresh()}).bind(this),100))}),this.imggridresizetimer=setTimeout((function(){this.grid.refresh()}).bind(this),100)}else if(this.relatedNode){let t=this.resultsNode.querySelector(".searsia__result:nth-of-type(11)");this.resultsNode.insertBefore(this.relatedNode,t)}if(this.filteredResults>0){let t=dh();this.resultsNode.appendChild(t)}this.updateStatusNode(!0),this.numResults&&this.resultsNode.appendChild(p("div",{class:"searsia__resultsdone"},p("p",null,v("utwente_base:frontend.ws2016.js.searchsheet.searchdone"))))}break;case"error":throw new Error(e.error)}}getResultLanguage(e,t){return/:\/\/(www\.)?utwente.nl\/en\//.test(e.url)?"en":/:\/\/(www\.)?utwente.nl\/de\//.test(e.url)?"de":/:\/\/(www\.)?utwente.nl\//.test(e.url)?"nl":"en"}updateStatusNode(e){if(this.numResults||e){let t=mt("utwente_base:frontend.ws2016.js.searchsheet.results",this.numResults,this.query,this.didYouMean);!this.numResults&&!this.didYouMean&&this.searchType&&(t=t+mt("utwente_base:frontend.ws2016.js.searchsheet.searchall")),t=t.split("%S%").join('<span class="searchsheet__didyoumean">').split("%/S%").join("</span>"),this.statusNode.innerHTML=t;let o=!!(this.userBeacons&&this.userBeacons["usertype-student"]),n=!!(this.userBeacons&&this.userBeacons["usertype-employee"]);if(!document.documentElement.classList.contains("loggedin")&&(o||n)&&["","people","serviceportal"].includes(this.searchType)){let s=p("div",{class:"searchsheet__login-msgbox"},p("div",{class:"searchsheet__login-msgbox__content"},this.lang==="nl"?p("p",null,p("a",{href:"x-serviceportal:login"},"Log in")," om interne/afgeschermde pagina's van de Service Portal aan de zoekresultaten toe te voegen."):this.lang==="de"?p("p",null,"Bitte ",p("a",{href:"x-serviceportal:login"},"logge dich ein")," um abgeschirmte Seiten aus dem internen Service Portal in den Suchergebnissen zu sehen."):p("p",null,"Please ",p("a",{href:"x-serviceportal:login"},"log in")," if you also want to see internal/protected pages from the Service Portal.")));this.statusNode.prepend(s)}}}showWidgets(e){let t=hh(e,this.ctaslots,{country:this.userCountry,beacons:this.userBeacons,url:location.href,query:this.query},this.eventsurl);t&&this.resultsNode.insertBefore(t,this.resultsNode.firstChild)}onClickStatus(e){e.target.closest(".searchsheet__didyoumean")&&(We("utwente_base:searsia_clickdidyoumean",{ds_session:this.searsiaSession,ds_suggestion:this.didYouMean||"",ds_type:this.searchType}),this.didYouMean?(this.inputNode.value=this.didYouMean,this.doSearch(),this.updateUrl()):this.showTab("all"))}onClickResult(e){let t=e.target.closest(".searsia__result--people");if(t&&!e.target.closest(".searsia__peopledetails")){e.preventDefault(),t.classList.toggle("searsia__result--open");return}let o=e.target.closest(".searsia__related__link");if(o){let s=o.textContent;We("utwente_base:searsia_clickrelated",{ds_session:this.searsiaSession,ds_suggestion:s}),this.inputNode.value=s,this.doSearch(),this.updateUrl();return}let n=e.target.closest("a");if(n){let s=e.target.closest(".searsia__widget");this.linkClicked=!0,We("utwente_base:searsia_clickresult",{ds_session:this.searsiaSession,ds_url:n.href,ds_target:s?s.dataset.widgetType:"result"},{beacon:!0})}}onKeyDown(e){e.key==="Escape"&&(this.inputNode.value?this.reset():this.toggle(!1))}getDefaultGridOptions(e){return{width:Math.round(e.clientWidth*window.devicePixelRatio)/window.devicePixelRatio,row_height:215,gutter_x:20,gutter_y:20,debug:!0,debug_layout:!0}}onUnload(){document.documentElement.classList.contains("searchsheet--open")&&!this.linkClicked&&We("utwente_base:searsia_unload",{ds_session:this.searsiaSession},{beacon:!0})}};function Df(i){let e=i.querySelector(".searchsheet__content");i._wsTmpTransition=getComputedStyle(i).transition,e._wsTmpTransition=getComputedStyle(e).transition,i.classList.remove("searchsheet--init"),setTimeout(()=>e.classList.remove("searchsheet__content--init"),250),i.querySelector(".searchsheet__searchfield-clear").addEventListener("click",If);for(let t of i.querySelectorAll(".searchsheet__section-links"))_a(t,"searchsheet__section-alllinks","searchsheet__section-link");hi=new ka(i),i.querySelector(".searchsheet__close").addEventListener("click",t=>{V(t),Ta()})}function If(i){i&&(i.preventDefault(),i.stopPropagation()),hi&&hi.reset()}function Ta(){hi&&hi.toggle()&&hi.reset()}function uh(i,e){hi&&hi.doSearchFor(i,e)}x(".searchsheet",i=>Df(i));x("#searsiasearch",i=>i.parentNode.removeChild(i));M();ie();M();ie();if(ye.site.colorscheme){let b=function(E){if(l=E,a=T(".theme__docstate-cta"),d=T(".theme__docstate-cta-hover"),!o||t.length<=1){A.uds&&console.log("[uds] No color animation",o,t);return}let S=Pe("ucs-start");S?(S=(Date.now()-S)%(n*1e3),S>0&&(r=-~~(S/1e3))):ze("ucs-start",Date.now());let P=!1;if(window.CSS.registerProperty)try{getComputedStyle(l).getPropertyValue("--theme-color")?A.uds&&console.log("[uds] Using --theme-color* @property's"):(A.uds&&console.log("[uds] Register --theme-color* properties"),window.CSS.registerProperty({name:"--theme-color",syntax:"<color>",initialValue:"transparent",inherits:!1}),window.CSS.registerProperty({name:"--theme-color-cta",syntax:"<color>",initialValue:"transparent",inherits:!1}),window.CSS.registerProperty({name:"--theme-color-cta-hover",syntax:"<color>",initialValue:"transparent",inherits:!1})),!e&&!A.unc&&y(document.documentElement,["colorscheme","colorscheme-cta","colorscheme-cta-hover"]),l.style.backgroundColor="var(--theme-color)",a.style.backgroundColor="var(--theme-color-cta)",d.style.backgroundColor="var(--theme-color-cta-hover)",P=!0}catch(z){A.uds&&console.error("[uds] Registration failed",z)}if(P||(A.uds&&console.log("[uds] @property and registerProperty not available, falling back to color sync"),!e&&!A.unc&&(y(l,"colorscheme-background"),y(a,"colorscheme-background-cta"),y(d,"colorscheme-background-cta-hover"),window.setInterval(f,1e3/s),f())),e||A.unc){let z=t[1];A.uds&&console.log("[uds] Color animation disabled, showing random color",z),h=z,m=z,u=z,_()}},f=function(){c=c||requestAnimationFrame(g)},g=function(){c=null;let E=[],S=getComputedStyle(l).backgroundColor;S!==h&&(h=S,E.push("color")),S=getComputedStyle(a).backgroundColor,S!==m&&(m=S,E.push("color-cta")),S=getComputedStyle(d).backgroundColor,S!==u&&(u=S,E.push("color-cta-hover")),E.length&&_(E)},_=function(E){h&&(!E||E.includes("color"))&&document.documentElement.style.setProperty("--theme-color",h),m&&(!E||E.includes("color-cta"))&&document.documentElement.style.setProperty("--theme-color-cta",m),u&&(!E||E.includes("color-cta-hover"))&&document.documentElement.style.setProperty("--theme-color-cta-hover",u)},y=function(E,S){let P=e||A.unc?"paused":"",$=(Array.isArray(S)?S:[S]).map(ae=>`${ae} ${n}s ${r}s steps(${s*10}, end) infinite ${P}`).join(", ");
1if(E.style.animation=$,r){let ae=new MutationObserver(()=>{let Q=parseInt(E.style.animationDelay);Q||(A.uds&&console.warn(`[uds] Resetting ${S} animation delay`,Q,r),E.style.animationDelay=`${r}s`),ae.disconnect()});ae.observe(E,{attributes:!0,attributeFilter:["style"]})}};Nf=b,Hf=f,Of=g,Uf=_,Wf=y;let i=at(),e=i.name==="chrome"&&i.platform==="android",t=ye.site.colorscheme,o=ye.site.animatethemecolor??!0,n=t.length*10,s=5,r=0,l=null,a=null,d=null,c=null,h,m,u;x(".theme__docstate",E=>b(E))}var Nf,Hf,Of,Uf,Wf;var mh=at(),Vf=mh.name==="chrome"&&mh.platform==="android",gh=10,Ea=0,Bf=5,fh=0;function _h(){let i=ee("utwente_design:theme",{allowMissing:!0});if(!i)return;A.uds&&document.body.append(p("theme-state",null));let e=i.colorScheme;if(Ea=e.length*gh,e.length<=1){A.uds&&console.log("[uds] No color animation",e);return}let t=Pe("ucs-start");t?(t=(Date.now()-t)%(Ea*1e3),t>0&&(fh=-~~(t/1e3))):ze("ucs-start",Date.now()),!Vf&&!A.unc&&(A.uds&&console.log("[uds] Activate the color scheme animations"),document.documentElement.style.setProperty("--anim-duration",`${Ea}s`),document.documentElement.style.setProperty("--anim-delay",`${fh}s`),document.documentElement.style.setProperty("--anim-steps",`steps(${Bf*gh}, end)`),document.documentElement.classList.add("ws2026-animation"),document.addEventListener("ws2026:animationstate",o=>$f(o)))}function $f(i){document.documentElement.classList.toggle("ws2026-animation",i.detail.active)}var so=(Ne(),Ce(Xe)).registerTexts;so("utwente_base","nl",{frontend:{ws2016:{js:{addtocalendar:"Voeg aan kalender toe","consentblock-accept3thpartycookies":"Accepteer cookies van derden","consentblock-facebook-accept3thpartycookies-suffix":"om de plugin te laden.","consentblock-facebook-line1":"Deze Facebook-plugin plaatst marketingcookies.","consentblock-facebook-title":"Dit element plaatst cookies","consentblock-soundcloud-accept3thpartycookies-suffix":"om de speler te laden.","consentblock-soundcloud-directlink":"de website van SoundCloud.","consentblock-soundcloud-directlink-prefix":"Luisteren zonder cookies kan op","consentblock-soundcloud-line1":["De speler van ",1," plaatst marketingcookies."],"consentblock-soundcloud-title":"Deze audiospeler plaatst cookies","consentblock-twitterembed-accept3thpartycookies-suffix":"om de tijdlijn te bekijken.","consentblock-twitterembed-line1":"De Twitter/X tijdlijn plaatst marketingcookies.","consentblock-video-accept3thpartycookies-suffix":"om de speler te laden.","consentblock-video-directlink":["de website van ",1,"."],"consentblock-video-directlink-prefix":"Kijken zonder cookies kan op","consentblock-video-line1":["De speler ",{t:"ifparam",p:1,value:"",subs:[],subselse:["van ",1]}," plaatst marketingcookies."],"consentblock-video-title":"Deze videospeler plaatst cookies",details:"Details","dialog-close-arialabel":"Sluit popup",email:"Je e-mailadres","error-imagenotfound":"Afbeelding niet gevonden","error-invalidemail":"Fout in e-mailadres","error-invalidurl":"Onbekende url",imageissendto:"Afbeelding is verstuurd naar:","landmark-deeplinks-arialabel":"Inhoudsopgave",list:"Lijst",nosuggestresults:"Geen resultaten",notavali
1dmobilephonenumber:"Dit is geen geldig mobiel nummer.",notavalidphonenumber:"Dit is geen geldig telefoonnummer.",readmore:"Lees verder",starsrequired:"* betekent dat een veld verplicht is",submit:"Verstuur",submitting:"Versturen...",calendar:{appleical:"Apple iCal",facebook:"Facebook Event",google:"Google Calendar",outlook:"Outlook Calendar",outlookcom:"Outlook.com",yahoo:"Yahoo Kalender"},filteredoverview:{"feedbackbar-noresults":"Er zijn geen resultaten","feedbackbar-result":"Resultaat","feedbackbar-results":[1," resultaten"],"feedbackbar-resultslimited":["De eerste ",2," resultaten worden getoond (van de totaal ",1," resultaten)"],hidefilters_header:"Verberg filters",search:"Zoeken",showfilters_header:"Toon filters","tease-noresults":"Geen resultaten","tease-result":["Toon ",1," resultaat"],"tease-results":["Toon ",1," resultaten"]},managedcta:{beacon:["Het beacon '",1,"' is getriggerd"],"beacon-maxdays":["Het beacon '",1,"' is getriggerd in de afgelopen ",{t:"ifparam",p:2,value:"1",subs:["dag"],subselse:[2," dagen"]}],"beacons-skipped":["Het beacon '",1,"' is niet getriggerd"],"beacons-skipped-none":"Geen enkel beacon is getriggerd","beacons-skipped-time":["Het beacon '",1,"' zou getriggerd moeten zijn voor ",2,", maar het is nu ",3],countries:["Het GeoIP-land is een van ",1],"countries-skipped":["De landcode '",2,"' is niet een van ",1],explanation:"Deze CTA wordt getoond wanneer","explanation-skipped":"Deze CTA wordt niet getoond omdat",noctatoshow:"Geen van de CTA's voldoet aan de voorwaarden",publish_from:["De pagina wordt bekeken na ",1],"publish_from-skipped":["De huidige datum ",2," ligt voor de publicatiedatum ",1],publish_until:["De pagina wordt bekeken voor ",1],"publish_until-skipped":["De huidige datum ",2," ligt na de publicatiedatum ",1],query:["De zoekterm matcht een van de zoektermen ",1],"query-skipped":["De zoekterm '",1,"' matcht met geen van de zoektermen"],"query-skipped-error":["De zoekterm '",1,"' veroorzaakte een fout: ",2],regex:["De URL matcht een van de reguliere expressies ",1],"regex-exclude":["De URL matcht geen van de reguliere expressies ",1],"regex-skipped":["De URL '",2,"' matcht de reguliere expressie ",1],"regex-skipped-error":["De reguliere expressie '",1,"' veroorzaakte een fout: ",2],"regex-skipped-none":["De URL '",1,"' matcht geen van de reguliere expressies"]},meetings:{"error-description":["Er is een fout opgetreden bij verwerken van de bijeenkomst.",`
2`,"Probeer het later opnieuw"],"error-title":"Fout tijdens verwerken","thanks-description":"Uw verzoek voor de bijeenkomst is opgeslagen. Er wordt binnenkort contact met u opgenomen.","thanks-title":"Bijeenkomst is opgeslagen"},neoform:{authorizednotset:"Om de zichtbaarheid te beperken moet minstens \xE9\xE9n ontvanger of type medewerker worden geselecteerd.","image-invalid-width":["De breedte van de afbeelding voldoet niet aan de eisen van ",2," pixels. Het vult niet het hele gebied bovenaan de pagina. We vullen de ontbrekende ruimte met een gegenereerde achtergrond. Als je dit niet wilt, upload dan een afbeelding die voldoet aan de minimale breedteeisen (",2," pixels)."],"image-read-error":"De ge\xFCploade afbeelding kon niet worden gelezen.",minheight:["De afbeelding is te klein. Deze moet minimaal ",2," pixels hoog zijn."]},newsevents:{archive:"Toon archief",next_article:"Volgend event","next_article-news":"Volgend bericht",noresults:"Geen resultaten",noupcoming:"Er zijn op dit moment geen aankomende evenementen",previous_article:"Vorig event","previous_article-news":"Vorig bericht","thanks-cultural":"Bedankt voor de reservering","thanks-event":"Bedankt voor de registratie",upcoming:"Ga naar evenementen"},osiris:{back:"Terug",goal:"Doel",loading:"Laden...",more:"Lees meer",moredetailslink:['Ga naar <a href="',1,'" target="osiris">het detailoverzicht</a> in de OSIRIS Onderwijscatalogus'],nocoursefound:"Vak niet gevonden"},pagefilters:{"close-filters":"Verberg filters","daterange-from":"Van","daterange-till":"Tot",reset:"Filters wissen","search-placeholder":"Zoeken","search-xresults":[{t:"ifparam",p:1,value:"1",subs:["1 resultaat"],subselse:[1," resultaten"]}],"show-filters":"Toon filters","show-xresults":[{t:"ifparam",p:1,value:"0",subs:["Geen resultaten"],subselse:["Toon ",{t:"ifparam",p:1,value:"1",subs:["1 resultaat"],subselse:[1," resultaten"]}]}]},searchsheet:{allevents:"Toon alle events",downloadmap:"Download de plattegrond",event:"Event",events:"Events",filteredresults:"Sommige zoekresultaten zijn verwijderd",image:"Afbeelding",location:"Locatie",news:"Nieuws","overflow--email":"Stuur een e-mail",people:"Persoon",peoplepage:"People Page",publication:"Publicatie",related:"Gerelateerde zoekopdrachten",results:[{t:"tag",tag:"b",subs:[{t:"ifparam",p:1,value:"0",subs:["Geen resultaten"],subselse:[{t:"ifparam",p:1,value:"1",subs:["1 resultaat"],subselse:[1," resultaten"]}]}]},' voor "',2,'"',{t:"ifparam",p:3,value:"",subs:[],subselse:['. Bedoelde je misschien "%S%',3,'%/S%"?']}],route:"Route",searchall:". Probeer %S%alles te doorzoeken%/S%.",searchdone:"Er zijn geen verdere zoekresultaten!",searching:['Zoeken naar "',1,'"...'],suggestedresult:"Voorgesteld resultaat",utoday:"UToday",video:"Video"},tablewithfilter:{downloadxlsx:"Download als XLSX"},ufondsdonaties:{"error-description":"Probeer a.u.b. opnieuw.","error-title":"Betaling mislukt.","thanks-description":["Veel dank voor uw donatie!",`
3`,`
4`,"Universiteitsfonds Twente"],"thanks-title":"Bedankt"}}}}});so("utwente_base","en",{frontend:{ws2016:{js:{addtocalendar:"Add to calendar","consentblock-accept3thpartycookies":"Accept third-party cookies","consentblock-facebook-accept3thpartycookies-suffix":"to load the plugin.","consentblock-facebook-line1":"This Facebook plugin uses marketing cookies.","consentblock-facebook-title":"This element uses cookies","consentblock-soundcloud-accept3thpartycookies-suffix":"to load the player.","consentblock-soundcloud-directlink":"the SoundCloud website.","consentblock-soundcloud-directlink-prefix":"Listen without cookies on","consentblock-soundcloud-line1":["The ",1," player uses marketing cookies."],"consentblock-soundcloud-title":"This audio player uses cookies","consentblock-twitterembed-accept3thpartycookies-suffix":"to view the timeline.","consentblock-twitterembed-line1":"The Twitter/X timeline uses marketing cookies.","consentblock-video-accept3thpartycookies-suffix":"to load the player.","consentblock-video-directlink":["the ",1," website."],"consentblock-video-directlink-prefix":"Watch without cookies on","consentblock-video-line1":["The ",1," player uses marketing cookies."],"consentblock-video-title":"This video player uses cookies",details:"Details","dialog-close-arialabel":"Close dialog",email:"Your email address","error-imagenotfound":"Unable to send image","error-invalidemail":"Invalid email","error-invalidurl":"Invalid url",imageissendto:"The image is send to:","landmark-deeplinks-arialabel":"Table of contents",list:"List",nosuggestresults:"No results",notavalidmobilephonenumber:"This is not a valid mobile phone number.",notavalidphonenumber:"This is not a valid phone number.",readmore:"Read more",starsrequired:"* indicates a required field",submit:"Submit",submitting:"Submitting...",calendar:{appleical:"Apple iCal",facebook:"Facebook Event",google:"Google Calendar",outlook:"Outlook Calendar",outlookcom:"Outlook.com",yahoo:"Yahoo Kalender"},filteredoverview:{"feedbackbar-noresults":"No results","feedbackbar-result":"Result","feedbackbar-results":[1," results"],"feedbackbar-resultslimited":["Showing the first ",2," results (out of a total of ",1," results)"],hidefilters_header:"Hide filter",search:"Search",showfilters_header:"Filter","tease-noresults":"No results","tease-result":["Show ",1," result"],"tease-results":["Show ",1," results"]},managedcta:{beacon:["The beacon '",1,"' has been triggered"],"beacon-maxdays":["The beacon '",1,"' has been triggered in the last ",{t:"ifparam",p:2,value:"1",subs:["day"],subselse:[2," days"]}],"beacons-skipped":["The beacon '",1,"' was not triggered"],"beacons-skipped-none":"No beacons are triggered","beacons-skipped-time":["The beacon '",1,"' should have been triggered before ",2,", but is it ",3],countries:["The GeoIP country is one of ",1],"countries-skipped":["The current country code '",2,"' is not one of ",1],explanation:"This CTA is shown if","explanation-skipped":"This CTA is not shown because",noctatoshow:"None of the CTAs satisfy the conditions",publish_from:["The page is viewed after ",1],"publish_from-skipped":["The current date ",2," is before the publication date ",1],publish_until:["The page is viewed before ",1],"publish_until-skipped":["The current date ",2," is after publication date ",1],query:["The search term matches one of the search terms ",1],"query-skipped":["The search term '",1,"'does not match any of the search terms"],"query-skipped-error":["The search term '",1,"' caused an error: ",2],regex:["The URL matches one of the regular expressions ",1],"regex-exclude":["The URL matches none of the regular expressions ",1],"regex-skipped":["The URL '",2,"' matches regular expression ",1],"regex-skipped-error":["The regular expression '",1,"' caused an error: ",2],"regex-skipped-none":["The URL '",1,"' matches none of the regular expressions"]},meetings:{"error-description":["An error occurred while processing the meeting.",`
5`,"Please try again later."],"error-title":"Error while processing","thanks-description":"Your request for the meeting is successfully stored. You will be contacted soon.","thanks-title":"Meeting is stored"},neoform:{authorizednotset:"To limit visibility, select at least one of the recipients or employee types.","image-invalid-width":["The width of the picture does not meet the requirements of ",2," pixels. It does not fill the whole header area. We will fill the missing space with a generated background. If you don't want this, please upload a picture that meets the minimum width requirements (",2," pixels)."],"image-read-error":"The uploaded image could not be read.",minheight:["The image is too small. It should be at least ",2," pixels high."]},newsevents:{archive:"Show archive",next_article:"Next event","next_article-news":"Next article",n
5oresults:"No results",noupcoming:"No upcoming events available",previous_article:"Previous event","previous_article-news":"Previous article","thanks-cultural":"Thank you for the reservation","thanks-event":"Thank you for the registration",upcoming:"Go to events"},osiris:{back:"Back",goal:"Goal",loading:"Loading...",more:"Read more",moredetailslink:['Go to <a href="',1,'" target="osiris">the detailed overview</a> in the OSIRIS Course Catalog'],nocoursefound:"Course not found"},pagefilters:{"close-filters":"Hide filters","daterange-from":"From","daterange-till":"Till",reset:"Reset filters","search-placeholder":"Search","search-xresults":[{t:"ifparam",p:1,value:"1",subs:["1 results"],subselse:[1," results"]}],"show-filters":"Show filters","show-xresults":[{t:"ifparam",p:1,value:"0",subs:["No results"],subselse:["Show ",{t:"ifparam",p:1,value:"1",subs:["1 result"],subselse:[1," results"]}]}]},searchsheet:{allevents:"Show all events",downloadmap:"Download the campus map",event:"Event",events:"Events",filteredresults:"Some search results have been deleted",image:"Image",location:"Location",news:"News","overflow--email":"Send an email",people:"People",peoplepage:"People Page",publication:"Publication",related:"Related searches",results:[{t:"tag",tag:"b",subs:[{t:"ifparam",p:1,value:"0",subs:["No results"],subselse:[{t:"ifparam",p:1,value:"1",subs:["1 result"],subselse:[1," results"]}]}]},' for "',2,'"',{t:"ifparam",p:3,value:"",subs:[],subselse:['. Did you mean "%S%',3,'%/S%"?']}],route:"Route",searchall:". You can try to %S%search all instead%/S%.",searchdone:"We found no further search results!",searching:['Searching for "',1,'"...'],suggestedresult:"Suggested result",utoday:"UToday",video:"Video"},tablewithfilter:{downloadxlsx:"Download as XLSX"},ufondsdonaties:{"error-description":"Please try again.","error-title":"Payment failed.","thanks-description":"Thank you for your donation!","thanks-title":"Thank you"}}}}});so("utwente_base","de",{frontend:{ws2016:{js:{addtocalendar:"Zum Kalender hinzuf\xFCgen","consentblock-accept3thpartycookies":"Bitte akzeptiere Cookies von Dritten","consentblock-facebook-accept3thpartycookies-suffix":"um dieses Element zu anzuzeigen.","consentblock-facebook-line1":"Dieses Element von Facebook setzt Marketing-Cookies.","consentblock-facebook-title":"Dieses Element setzt C
5ookies","consentblock-soundcloud-accept3thpartycookies-suffix":"um den Player zu starten.","consentblock-soundcloud-directlink":"der Webseite von SoundCloud m\xF6glich.","consentblock-soundcloud-directlink-prefix":"Abspielen ohne Cookies zu laden ist auf","consentblock-soundcloud-line1":["Der Player von ",1," setzt Marketing-Cookies."],"consentblock-soundcloud-title":"Dieser Audio-Stream setzt Cookies","consentblock-video-accept3thpartycookies-suffix":"um den Player zu starten.","consentblock-video-directlink":["auf der Webseite von ",1," m\xF6glich."],"consentblock-video-directlink-prefix":"Abspielen ohne Cookies zu laden ist","consentblock-video-line1":["Der Player ",{t:"ifparam",p:1,value:"",subs:[],subselse:["von ",1]}," setzt Marketing-Cookies."],"consentblock-video-title":"Dieser Videoplayer setzt Cookies","landmark-deeplinks-arialabel":"Inhaltsverzeichnis",list:"Liste",nosuggestresults:"Keine Ergebnisse",notavalidmobilephonenumber:"Dies ist keine g\xFCltige Mobilnummer.",notavalidphonenumber:"Dies ist keine g\xFCltige Telefonnummer.",readmore:"Weiter Lesen",starsrequired:"* zeigt ein Pflichtfeld an",filteredoverview:{"feedbackbar-noresults":"Keine Ergebnis","feedbackbar-result":"Ergebnis","feedbackbar-results":[1," Ergebnisse"],hidefilters_header:"Filter ausblenden",showfilters_header:"Filter anzeigen","tease-noresults":"Es gibt keine Ergebnisse","tease-result":["Es gibt ",1," Ergebnis"],"tease-results":["Es gibt ",1," Ergebnisse"]},newsevents:{archive:"Zum Archief",next_article:"N\xE4chste event","next_article-news":"N\xE4chste Artikel",noresults:"Keine Ergebnisse",noupcoming:"Im Moment sind keine neuen Events bekannt",previous_article:"Vorhergehende event","previous_article-news":"Vorhergehende Artikel","thanks-cultural":"Vielen Dank f\xFCr die Reservierung","thanks-event":"Vielen Dank f\xFCr die Registrierung",upcoming:"Zu den aktuellen Events"},osiris:{back:"Zur\xFCck",goal:"Ziel",loading:"Laden...",more:"Weiterlesen",moredetailslink:['<a href="',1,'" target="osiris">Mehr Details</a> aus dem OSIRIS Vorlesungsverzeichnis'],nocoursefound:"Kurs nicht gefunden"},pagefilters:{"close-filters":"Filter ausblenden","daterange-from":"Von","daterange-till":"Bis",reset:"Filters L\xF6schen","search-placeholder":"Suchen","search-xresults":[{t:"ifparam",p:1,value:"1",subs:["1 Ergebniss"],subselse:[1," Ergebnisse"]}],"show-filters":"Zeige Filters","show-xresults":[{t:"ifparam",p:1,value:"0",subs:["Keine Ergebnisse"],subselse:["Zeige ",{t:"ifparam",p:1,value:"1",subs:["1 Ergebniss"],subselse:[1," Ergebnisse"]}]}]},searchsheet:{allevents:"Alle Events zeigen",downloadmap:"Download Campus-Karte",event:"Event",events:"Events",filteredresults:"Einzelne Suchergebnisse wurden gel\xF6scht",image:"Foto",location:"Ort",news:"News","overflow--email":"E-Mail versenden",people:"Personen",peoplepage:"Pers\xF6nliche Seite",publication:"Publikation",related:"\xC4hnliche Suchauftr\xE4ge",results:[{t:"tag",tag:"b",subs:[{t:"ifparam",p:1,value:"0",subs:["Keine Ergebnisse"],subselse:[{t:"ifparam",p:1,value:"1",subs:["1 Ergebnis"],subselse:[1," Ergebnisse"]}]}]},' f\xFCr "',2,'"',{t:"ifparam",p:3,value:"",subs:[],subselse:['. Suchst du "%S%',3,'%/S%"?']}],route:"Wegbeschreibung",searchall:". Du kannst versuchen %S%alle zu suchen%/S%.",searchdone:"Keine weiteren Suchergebnisse vorhanden!",searching:['Suche "',1,'"...'],suggestedresult:"Vorgeschlagene Ergebnisse",utoday:"UToday",video:"Video"}}}}});so("utwente_base","es",{frontend:{ws2016:{js:{starsrequired:"* campo obligatorio",addtocalendar:"Add to calendar","consentblock-accept3thpartycookies":"Accept third-party cookies","consentblock-facebook-accept3thpartycookies-suffix":"to load the plugin.","consentblock-facebook-line1":"This Facebook plugin uses marketing cookies.","consentblock-facebook-title":"This element uses cookies","consentblock-soundcloud-accept3thpartycookies-suffix":"to load the player.","consentblock-soundcloud-directlink":"the SoundCloud website.","consentblock-soundcloud-directlink-prefix":"Listen without cookies on","consentblock-soundcloud-line1":["The ",1," player uses marketing cookies."],"consentblock-soundcloud-title":"This audio player uses co
5okies","consentblock-twitterembed-accept3thpartycookies-suffix":"to view the timeline.","consentblock-twitterembed-line1":"The Twitter/X timeline uses marketing cookies.","consentblock-video-accept3thpartycookies-suffix":"to load the player.","consentblock-video-directlink":["the ",1," website."],"consentblock-video-directlink-prefix":"Watch without cookies on","consentblock-video-line1":["The ",1," player uses marketing cookies."],"consentblock-video-title":"This video player uses cookies",details:"Details","dialog-close-arialabel":"Close dialog",email:"Your email address","error-imagenotfound":"Unable to send image","error-invalidemail":"Invalid email","error-invalidurl":"Invalid url",imageissendto:"The image is send to:","landmark-deeplinks-arialabel":"Table of contents",list:"List",nosuggestresults:"No results",notavalidmobilephonenumber:"This is not a valid mobile phone number.",notavalidphonenumber:"This is not a valid phone number.",readmore:"Read more",submit:"Submit",submitting:"Submitting...",calendar:{appleical:"Apple iCal",facebook:"Facebook Event",google:"Google Calendar",outlook:"Outlook Calendar",outlookcom:"Outlook.com",yahoo:"Yahoo Kalender"},filteredoverview:{"feedbackbar-noresults":"No results","feedbackbar-result":"Result","feedbackbar-results":[1," results"],"feedbackbar-resultslimited":["Showing the first ",2," results (out of a total of ",1," results)"],hidefilters_header:"Hide filter",search:"Search",showfilters_header:"Filter","tease-noresults":"No results","tease-result":["Show ",1," result"],"tease-results":["Show ",1," results"]},managedcta:{beacon:["The beacon '",1,"' has been triggered"],"beacon-maxdays":["The beacon '",1,"' has been triggered in the last ",{t:"ifparam",p:2,value:"1",subs:["day"],subselse:[2," days"]}],"beacons-skipped":["The beacon '",1,"' was not triggered"],"beacons-skipped-none":"No beacons are triggered","beacons-skipped-time":["The beacon '",1,"' should have been triggered before ",2,", but is it ",3],countries:["The GeoIP country is one of ",1],"countries-skipped":["The current country code '",2,"' is not one of ",1],explanation:"This CTA is shown if","explanation-skipped":"This CTA is not shown because",noctatoshow:"None of the CTAs satisfy the conditions",publish_from:["The page is viewed after ",1],"publish_from-skipped":["The current date ",2," is before the publication date ",1],publish_until:["The page is viewed before ",1],"publish_until-skipped":["The current date ",2," is after publication date ",1],query:["The search term matches one of the search terms ",1],"query-skipped":["The search term '",1,"'does not match any of the search terms"],"query-skipped-error":["The search term '",1,"' caused an error: ",2],regex:["The URL matches one of the regular expressions ",1],"regex-exclude":["The URL matches none of the regular expressions ",1],"regex-skipped":["The URL '",2,"' matches regular expression ",1],"regex-skipped-error":["The regular expression '",1,"' caused an error: ",2],"regex-skipped-none":["The URL '",1,"' matches none of the regular expressions"]},meetings:{"error-description":["An error occurred while processing the meeting.",`
6`,"Please try again later."],"error-title":"Error while processing","thanks-description":"Your request for the meeting is successfully stored. You will be contacted soon.","thanks-title":"Meeting is stored"},neoform:{authorizednotset:"To limit visibility, select at least one of the recipients or employee types.","image-invalid-width":["The width of the picture does not meet the requirements of ",2," pixels. It does not fill the whole header area. We will fill the missing space with a generated background. If you don't want this, please upload a picture that meets the minimum width requirements (",2," pixels)."],"image-read-error":"The uploaded image could not be read.",minheight:["The image is too small. It should be at least ",2," pixels high."]},newsevents:{archive:"Show archive",next_article:"Next event","next_article-news":"Next article",noresults:"No results",noupcoming:"No upcoming events available",previous_article:"Previous event","previous_article-news":"Previous article","thanks-cultural":"Thank y
6ou for the reservation","thanks-event":"Thank you for the registration",upcoming:"Go to events"},osiris:{back:"Back",goal:"Goal",loading:"Loading...",more:"Read more",moredetailslink:['Go to <a href="',1,'" target="osiris">the detailed overview</a> in the OSIRIS Course Catalog'],nocoursefound:"Course not found"},pagefilters:{"close-filters":"Hide filters","daterange-from":"From","daterange-till":"Till",reset:"Reset filters","search-placeholder":"Search","search-xresults":[{t:"ifparam",p:1,value:"1",subs:["1 results"],subselse:[1," results"]}],"show-filters":"Show filters","show-xresults":[{t:"ifparam",p:1,value:"0",subs:["No results"],subselse:["Show ",{t:"ifparam",p:1,value:"1",subs:["1 result"],subselse:[1," results"]}]}]},searchsheet:{allevents:"Show all events",downloadmap:"Download the campus map",event:"Event",events:"Events",filteredresults:"Some search results have been deleted",image:"Image",location:"Location",news:"News","overflow--email":"Send an email",people:"People",peoplepage:"People Page",publication:"Publication",related:"Related searches",results:[{t:"tag",tag:"b",subs:[{t:"ifparam",p:1,value:"0",subs:["No results"],subselse:[{t:"ifparam",p:1,value:"1",subs:["1 result"],subselse:[1," results"]}]}]},' for "',2,'"',{t:"ifparam",p:3,value:"",subs:[],subselse:['. Did you mean "%S%',3,'%/S%"?']}],route:"Route",searchall:". You can try to %S%search all instead%/S%.",searchdone:"We found no further search results!",searching:['Searching for "',1,'"...'],suggestedresult:"Suggested result",utoday:"UToday",video:"Video"},tablewithfilter:{downloadxlsx:"Download as XLSX"},ufondsdonaties:{"error-description":"Please try again.","error-title":"Payment failed.","thanks-description":"Thank you for your donation!","thanks-title":"Thank you"}}}}});so("utwente_base","it",{frontend:{ws2016:{js:{addtocalendar:"Add to calendar","consentblock-accept3thpartycookies":"Accept third-party cookies","consentblock-facebook-accept3thpartycookies-suffix":"to load the plugin.","consentblock-facebook-line1":"This Facebook plugin uses marketing cookies.","consentblock-facebook-title":"This element uses cookies","consentblock-soundcloud-accept3thpartycookies-suffix":"to load the player.","consentblock-soundcloud-directlink":"the SoundCloud website.","consentblock-soundcloud-directlink-prefix":"Listen without cookies on","consentblock-soundcloud-line1":["The ",1," player uses marketing cookies."],"consentblock-soundcloud-title":"This audio player uses cookies","consentblock-twitterembed-accept3thpartycookies-suffix":"to view the timeline.","consentblock-twitterembed-line1":"The Twitter/X timeline uses marketing cookies.","consentblock-video-accept3thpartycookies-suffix":"to load the player.","consentblock-video-directlink":["the ",1," website."],"consentblock-video-directlink-prefix":"Watch without cookies on","consentblock-video-line1":["The ",1," player uses marketing cookies."],"consentblock-video-title":"This video player uses cookies",details:"Details","dialog-close-arialabel":"Close dialog",email:"Your email address","error-imagenotfound":"Unable to send image","error-invalidemail":"Invalid email","error-invalidurl":"Invalid url",imageissendto:"The image is send to:","landmark-deeplinks-arialabel":"Table of contents",list:"List",nosuggestresults:"No results",notavalidmobilephonenumber:"This is not a valid mobile phone number.",notavalidphonenumber:"This is not a valid phone number.",readmore:"Read more",starsrequired:"* indicates a required field",submit:"Submit",submitting:"Submitting...",calendar:{appleical:"Apple iCal",facebook:"Facebook Event",google:"Google Calendar",outlook:"Outlook Calendar",outlookcom:"Outlook.com",yahoo:"Yahoo Kalender"},filteredoverview:{"feedbackbar-noresults":"No results","feedbackbar-result":"Result","feedbackbar-results":[1," results"],"feedbackbar-resultslimited":["Showing the first ",2," results (out of a total of ",1," results)"],hidefilters_header:"Hide filter",search:"Search",showfilters_header:"Filter","tease-noresults":"No results","tease-result":["Show ",1," result"],"tease-results":["Show ",1," results"]},managedcta:{beacon:["The beacon '",1,"' has been triggered"],"beacon-maxdays":["The beacon '",1,"' has been triggered in the last ",{t:"ifparam",p:2,value:"1",subs:["day"],subselse:[2," days"]}],"beacons-skipped":["The beacon '",1,"' was not triggered"],"beacons-skipped-none":"No beacons are triggered","beacons-skipped-time":["The beacon '",1,"' should have been triggered before ",2,", but is it ",3],countries:["The GeoIP country is one of ",1],"countries-skipped":["The current country code '",2,"' is not one of ",1],explanation:"This CTA is shown if","explanation-skipped":"This CTA is not shown because",noctatoshow:"None of the CTAs satisfy the conditions",publish_from:["The page is viewed after ",1],"publish_from-skipped":["The current date ",2," is before the publication date ",1],publish_until:["The page is viewed before ",1],"publish_until-skipped":["The current date ",2," is after publication date ",1],query:["The search term matches one of the search terms ",1],"query-skipped":["The search term '",1,"'does not match any of the search terms"],"query-skipped-error":["The search term '",1,"' caused an error: ",2],regex:["The URL matches one of the regular expressions ",1],"regex-exclude":["The URL matches none of the regular expressions ",1],"regex-skipped":["The URL '",2,"' matches regular expression ",1],"regex-skipped-error":["The regular expression '",1,"' caused an error: ",2],"regex-skipped-none":["The URL '",1,"' matches none of the regular expressions"]},meetings:{"error-description":["An error occurred while processing the meeting.",`
7`,"Please try again later."],"error-title":"Error while processing","thanks-description":"Your request for the meeting is successfully stored. You will be contacted soon.","thanks-title":"Meeting is stored"},neoform:{authorizednotset:"To limit visibility, select at least one of the recipients or employee types.","image-invalid-width":["The width of the picture does not meet the requirements of ",2," pixels. It does not fill the whole header area. We will fill the missing space with a generated background. If you don't want this, please upload a picture that meets the minimum width requirements (",2," pixels)."],"image-read-error":"The uploaded image could not be read.",minheight:["The image is too small. It should be at least ",2," pixels high."]},newsevents:{archive:"Show archive",next_article:"Next event","next_article-news":"Next article",n
7oresults:"No results",noupcoming:"No upcoming events available",previous_article:"Previous event","previous_article-news":"Previous article","thanks-cultural":"Thank you for the reservation","thanks-event":"Thank you for the registration",upcoming:"Go to events"},osiris:{back:"Back",goal:"Goal",loading:"Loading...",more:"Read more",moredetailslink:['Go to <a href="',1,'" target="osiris">the detailed overview</a> in the OSIRIS Course Catalog'],nocoursefound:"Course not found"},pagefilters:{"close-filters":"Hide filters","daterange-from":"From","daterange-till":"Till",reset:"Reset filters","search-placeholder":"Search","search-xresults":[{t:"ifparam",p:1,value:"1",subs:["1 results"],subselse:[1," results"]}],"show-filters":"Show filters","show-xresults":[{t:"ifparam",p:1,value:"0",subs:["No results"],subselse:["Show ",{t:"ifparam",p:1,value:"1",subs:["1 result"],subselse:[1," results"]}]}]},searchsheet:{allevents:"Show all events",downloadmap:"Download the campus map",event:"Event",events:"Events",filteredresults:"Some search results have been deleted",image:"Image",location:"Location",news:"News","overflow--email":"Send an email",people:"People",peoplepage:"People Page",publication:"Publication",related:"Related searches",results:[{t:"tag",tag:"b",subs:[{t:"ifparam",p:1,value:"0",subs:["No results"],subselse:[{t:"ifparam",p:1,value:"1",subs:["1 result"],subselse:[1," results"]}]}]},' for "',2,'"',{t:"ifparam",p:3,value:"",subs:[],subselse:['. Did you mean "%S%',3,'%/S%"?']}],route:"Route",searchall:". You can try to %S%search all instead%/S%.",searchdone:"We found no further search results!",searching:['Searching for "',1,'"...'],suggestedresult:"Suggested result",utoday:"UToday",video:"Video"},tablewithfilter:{downloadxlsx:"Download as XLSX"},ufondsdonaties:{"error-description":"Please try again.","error-title":"Payment failed.","thanks-description":"Thank you for your donation!","thanks-title":"Thank you"}}}}});so("utwente_base","xt",{frontend:{ws2016:{js:{addtocalendar:"Add to calendar","consentblock-accept3thpartycookies":"Accept third-party cookies","consentblock-facebook-accept3thpartycookies-suffix":"to load the plugin.","consentblock-facebook-line1":"This Facebook plugin uses marketing cookies.","consentblock-facebook-title":"This element uses cookies","consentblock-soundcloud-accept3thpartycookies-suffix":"to load the player.","consentblock-soundcloud-directlink":"the SoundCloud website.","consentblock-soundcloud-directlink-prefix":"Listen without cookies on","consentblock-soundcloud-line1":["The ",1," player uses marketing cookies."],"consentblock-soundcloud-title":"This audio player uses cookies","consentblock-twitterembed-accept3thpartycookies-suffix":"to view the timeline.","consentblock-twitterembed-line1":"The Twitter/X timeline uses marketing cookies.","consentblock-video-accept3thpartycookies-suffix":"to load the player.","consentblock-video-directlink":["the ",1," website."],"consentblock-video-directlink-prefix":"Watch without cookies on","consentblock-video-line1":["The ",1," player uses marketing cookies."],"consentblock-video-title":"This video player uses cookies",details:"Details","dialog-close-arialabel":"Close dialog",email:"Your email address","error-imagenotfound":"Unable to send image","error-invalidemail":"Invalid email","error-invalidurl":"Invalid url",imageissendto:"The image is send to:","landmark-deeplinks-arialabel":"Table of contents",list:"List",nosuggestresults:"No results",notavalidmobilephonenumber:"This is not a valid mobile phone number.",notavalidphonenumber:"This is not a valid phone number.",readmore:"Read more",starsrequired:"* indicates a required field",submit:"Submit",submitting:"Submitting...",calendar:{appleical:"Apple iCal",facebook:"Facebook Event",google:"Google Calendar",outlook:"Outlook Calendar",outlookcom:"Outlook.com",yahoo:"Yahoo Kalender"},filteredoverview:{"feedbackbar-noresults":"No results","feedbackbar-result":"Result","feedbackbar-results":[1," results"],"feedbackbar-resultslimited":["Showing the first ",2," results (out of a total of ",1," results)"],hidefilters_header:"Hide filter",search:"Search",showfilters_header:"Filter","tease-noresults":"No results","tease-result":["Show ",1," result"],"tease-results":["Show ",1," results"]},managedcta:{beacon:["The beacon '",1,"' has been triggered"],"beacon-maxdays":["The beacon '",1,"' has been triggered in the last ",{t:"ifparam",p:2,value:"1",subs:["day"],subselse:[2," days"]}],"beacons-skipped":["The beacon '",1,"' was not triggered"],"beacons-skipped-none":"No beacons are triggered","beacons-skipped-time":["The beacon '",1,"' should have been triggered before ",2,", but is it ",3],countries:["The GeoIP country is one of ",1],"countries-skipped":["The current country code '",2,"' is not one of ",1],explanation:"This CTA is shown if","explanation-skipped":"This CTA is not shown because",noctatoshow:"None of the CTAs satisfy the conditions",publish_from:["The page is viewed after ",1],"publish_from-skipped":["The current date ",2," is before the publication date ",1],publish_until:["The page is viewed before ",1],"publish_until-skipped":["The current date ",2," is after publication date ",1],query:["The search term matches one of the search terms ",1],"query-skipped":["The search term '",1,"'does not match any of the search terms"],"query-skipped-error":["The search term '",1,"' caused an error: ",2],regex:["The URL matches one of the regular expressions ",1],"regex-exclude":["The URL matches none of the regular expressions ",1],"regex-skipped":["The URL '",2,"' matches regular expression ",1],"regex-skipped-error":["The regular expression '",1,"' caused an error: ",2],"regex-skipped-none":["The URL '",1,"' matches none of the regular expressions"]},meetings:{"error-description":["An error occurred while processing the meeting.",`
8`,"Please try again later."],"error-title":"Error while processing","thanks-description":"Your request for the meeting is successfully stored. You will be contacted soon.","thanks-title":"Meeting is stored"},neoform:{authorizednotset:"To limit visibility, select at least one of the recipients or employee types.","image-invalid-width":["The width of the picture does not meet the requirements of ",2," pixels. It does not fill the whole header area. We will fill the missing space with a generated background. If you don't want this, please upload a picture that meets the minimum width requirements (",2," pixels)."],"image-read-error":"The uploaded image could not be read.",minheight:["The image is too small. It should be at least ",2," pixels high."]},newsevents:{archive:"Show archive",next_article:"Next event","next_article-news":"Next article",n
8oresults:"No results",noupcoming:"No upcoming events available",previous_article:"Previous event","previous_article-news":"Previous article","thanks-cultural":"Thank you for the reservation","thanks-event":"Thank you for the registration",upcoming:"Go to events"},osiris:{back:"Back",goal:"Goal",loading:"Loading...",more:"Read more",moredetailslink:['Go to <a href="',1,'" target="osiris">the detailed overview</a> in the OSIRIS Course Catalog'],nocoursefound:"Course not found"},pagefilters:{"close-filters":"Hide filters","daterange-from":"From","daterange-till":"Till",reset:"Reset filters","search-placeholder":"Search","search-xresults":[{t:"ifparam",p:1,value:"1",subs:["1 results"],subselse:[1," results"]}],"show-filters":"Show filters","show-xresults":[{t:"ifparam",p:1,value:"0",subs:["No results"],subselse:["Show ",{t:"ifparam",p:1,value:"1",subs:["1 result"],subselse:[1," results"]}]}]},searchsheet:{allevents:"Show all events",downloadmap:"Download the campus map",event:"Event",events:"Events",filteredresults:"Some search results have been deleted",image:"Image",location:"Location",news:"News","overflow--email":"Send an email",people:"People",peoplepage:"People Page",publication:"Publication",related:"Related searches",results:[{t:"tag",tag:"b",subs:[{t:"ifparam",p:1,value:"0",subs:["No results"],subselse:[{t:"ifparam",p:1,value:"1",subs:["1 result"],subselse:[1," results"]}]}]},' for "',2,'"',{t:"ifparam",p:3,value:"",subs:[],subselse:['. Did you mean "%S%',3,'%/S%"?']}],route:"Route",searchall:". You can try to %S%search all instead%/S%.",searchdone:"We found no further search results!",searching:['Searching for "',1,'"...'],suggestedresult:"Suggested result",utoday:"UToday",video:"Video"},tablewithfilter:{downloadxlsx:"Download as XLSX"},ufondsdonaties:{"error-description":"Please try again.","error-title":"Payment failed.","thanks-description":"Thank you for your donation!","thanks-title":"Thank you"}}}}});M();te();var bh=!1;function Yf(i){if(!bh){bh=!0,window.addeventasync=function(){addeventatc.settings({license:"aHGbRdipTzsgMbuxYmdh49124",mouse:!1,css:!1,outlook:{show:!0,text:v("utwente_base:frontend.ws2016.js.calendar.outlook")},google:{show:!0,text:v("utwente_base:frontend.ws2016.js.calendar.google")},yahoo:{show:!0,text:v("utwente_base:frontend.ws2016.js.calendar.yahoo")},outlookcom:{show:!0,text:v("utwente_base:frontend.ws2016.js.calendar.outlookcom")},appleical:{show:!0,text:v("utwente_base:frontend.ws2016.js.calendar.appleical")},facebook:{show:!0,text:v("utwente_base:frontend.ws2016.js.calendar.facebook")},dropdown:{order:"google,appleical,outlook,outlookcom,facebook,yahoo"},callback:""}),addeventatc.refresh(i),setTimeout(()=>{i.click()},10)};let e=document.createElement("script");e.src="https://addevent.com/libs/atc/1.6.1/atc.min.js",L("head").appendChild(e)}}x(".addeventatc",i=>{i.addEventListener("click",()=>Yf(i))});N();ie();var Xf=1;async function Gf(){for(let i of ee("utwente_base:nextpager",{allowMissing:!0})?.predictions||[])await fetch(i,{mode:"no-cors"})}async function Kf(){if(!document.documentElement.lang.startsWith("en"))return;let i=A["ut-performance-optin"],e=i?1:Xf;Math.random()>e||await ct()==="NL"&&!i||document.referrer&&document.referrer.startsWith(location.origin)&&fs("utwente_base:internal_referrer")}function wh(){Kf(),document.documentElement.lang.startsWith("en")&&K(()=>window.setTimeout(()=>{Gf()},5e3))}N();N();te();Ne();function Jf(i=document.body){typeof document>"u"||!i||Array.from(i.querySelectorAll("*[data-texttid]")).forEach(function(e){e.textContent=R(e.getAttribute("data-texttid")||"")})}typeof document<"u"&&document.addEventListener("DOMContentLoaded",()=>Jf());var R=((...i)=>v(...i));Object.defineProperty(R,"tidLanguage",{get:Ye,set:is});R.html=mt;var ro=(Ne(),Ce(Xe)).registerTexts;ro("publisher","nl",{site:{rtd:{embedvideo:{"playbutton-aria":"Speel video af",unrecognized:"De URL is niet herkend als een ondersteunde video URL",videourl:"Video URL"}}}});ro("publisher","en",{site:{rtd:{embedvideo:{"playbutton-aria":"Play video",unrecognized:"The URL is not recognized as a supported video URL",videourl:"Video URL"}}}});ro("publisher","de",{site:{rtd:{embedvideo:{"playbutton-aria":"Play video",unrecognized:"The URL is not recognized as a supported video URL",videourl:"Video URL"}}}});ro("publisher","es",{site:{rtd:{embedvideo:{"playbutton-aria":"Play video",unrecognized:"The URL is not recognized as a supported video URL",videourl:"Video URL"}}}});ro("publisher","it",{site:{rtd:{embedvideo:{"playbutton-aria":"Riprodurre il video",unrecognized:"L'URL non \xE8 riconosciuto come URL del video supp
8ortato",videourl:"Video URL"}}}});ro("publisher","xt",{site:{rtd:{embedvideo:{"playbutton-aria":"Play video",unrecognized:"The URL is not recognized as a supported video URL",videourl:"Video URL"}}}});var Qf="www.youtube.com",Zf=["yuja"];window.__videosources||(window.__videosources=[]);function vh(i,e){e={getPlaybackURL:"",...e},window.__videosources.push({tag:i,...e})}function Sa(i){let e=i&&i.inert,t=document.createElement("iframe");return t.style.width="100%",t.style.height="100%",t.setAttribute("frameborder",0),t.setAttribute("allowfullscreen",""),e&&t.setAttribute("inert",""),t.setAttribute("allow","autoplay; fullscreen"),t}function e_(i,e,t){let o=Sa(t),n=[];t.autoplay&&n.push("autoplay=1"),(e.mute||t.mute)&&n.push("mute=1"),e.starttime&&n.push("start="+Math.floor(e.starttime)),e.endtime&&n.push("end="+Math.floor(e.endtime)),typeof t.controls<"u"&&!t.controls&&n.push("controls=0"),(e.loop||t.loop)&&n.push("loop=1","playlist="+e.id),n.push("rel=0","enablejsapi=1","origin="+location.origin);let s=`//${Qf}/embed/${e.id}`;n.length>0&&(s+="?"+n.join("&")),o.src=s,o.title=e.title?"YouTube video: "+e.title:"YouTube video",i.appendChild(o)}function t_(i,e,t){let o=Sa(t),n=[];t.autoplay&&n.push("autoplay=1"),(e.mute||t.mute)&&n.push("muted=1"),e.endtime&&console.warn("setting an endtime doesn't work for Vimeo video's"),t.controls===!1&&console.warn("disabling video controls not possible for Vimeo video's"),(e.loop||t.loop)&&n.push("loop=1"),t.background&&n.push("background=1"),t.api&&(n.push("api="+t.api),t.player_id&&n.push("player_id="+t.player_id));let s="//player.vimeo.com/video/"+e.id;if(n.length>0&&(s+="?"+n.join("&")),e.starttime){let r=e.starttime,l=Math.floor(r/60),a=r%60;s+="#t="+l+"m"+a+"s"}o.src=s,o.title=e.title?"Vimeo video: "+e.title:"Vimeo video",i.appendChild(o)}function La(i,e,t){let o={inert:!1,...t};if(!i.__initalized_iframe)switch(i.__initalized_iframe=!0,i.setAttribute("data-iframeloaded",""),e.network){case"youtube":e_(i,e,o);break;case"vimeo":t_(i,e,o);break;default:{let n=Sa(o),s=null;for(let r of window.__videosources)if(r.tag===e.network){s=r;break}if(s){let r=s.getPlaybackURL(e,o);n.src=r,n.title=e.title?"Video: "+e.title:"Video",i.appendChild(n)}else console.warn(`Unknown video network "${e.network}".`);break}}}function xh(i){let e=JSON.parse(i.dataset.video),t=i.dataset.videoOptions?JSON.parse(i.dataset.videoOptions):{};i.innerHTML="",La(i,e,t)}function yh(i){let e=JSON.parse(i.dataset.whVideo),t=w(i,".wh-video--activate");Zf.includes(e.network)&&La(t[0],e,{autoplay:!1,inert:!0});for(let o of t){o.__initialized=!1,o.__initalized_iframe=!1,o.addEventListener("click",function(){rn(o,e)});let n=o.querySelector(".wh-video__playbutton");n.setAttribute("tabindex","0"),n.setAttribute("role","button"),n.setAttribute("aria-label",R("publisher:site.rtd.embedvideo.playbutton-aria")),n.addEventListener("click",function(){rn(o,e,{autoplay:!0})}),n.addEventListener("keypress",function(s){s.keyCode!==13&&s.keyCode!==32||(s.preventDefault(),rn(o,e,{autoplay:!0}))}),e.autoplay&&(i.dataset.whConsentRequired?ss(i.dataset.whConsentRequired,()=>rn(o,{...e,mute:!0},{autoplay:!0})):rn(o,{...e,mute:!0},{autoplay:!0}))}}function rn(i,e,t){if(!i.__initialized)if(i.querySelector(".wh-video__innerframe__preview").hidden=!0,i.__initialized=!0,i.hasAttribute("data-iframeloaded")){let o=i.querySelector("iframe");switch(o.removeAttribute("inert"),e.network){case"youtube":o.contentWindow.postMessage(JSON.stringify({event:"command",func:"playVideo"}),"https://www.youtube.com");break;case"yuja":o.contentWindow.postMessage({name:"Play"},"*");break}}else La(i,e,t)}vh("yuja",{getPlaybackURL:o_});x(".wh-video",i=>i.dataset.video?xh(i):yh(i));function o_(i,e){let t=[],o=new URL("https://www.example.org/?"+i.id).searchParams,n=o.get("h"),s=o.get("v"),r=o.get("a"),l=`//${n}/V/Video`;return t.push("v="+encodeURIComponent(s)),t.push("a="+encodeURIComponent(r)),e.starttime&&t.push("starttime="+e.starttime),e.endtime&&console.warn("setting an endtime doesn't work for Yuja video's"),e.controls||console.warn("disabling video controls not possible for Yuja video's"),e.loop&&console.warn("loop isn't supported for Yuja video's"),t.length>0&&(l+="?"+t.join("&")),l}M();
8var Ca=class{node;scrollcontainer;constructor(e){this.node=e,this.scrollcontainer=W("div",{class:"wh-rtd__tablescrollcontainer"}),this.scrollcontainer.classList.add("styledscrollbar-x"),this.scrollcontainer.append(...Array.from(this.node.childNodes)),this.node.appendChild(this.scrollcontainer),window.addEventListener("load",()=>this.checkOverflow()),window.addEventListener("resize",()=>this.checkOverflow()),document.fonts.ready.then(()=>this.checkOverflow()).catch(t=>console.error(t)),this.checkOverflow()}checkOverflow(){let e=this.scrollcontainer.clientWidth,t=this.scrollcontainer.scrollWidth;this.node.classList.toggle("wh-rtd__tablewrap--scrollable-x",t>e)}};x(".wh-rtd__tablewrap",i=>new Ca(i));M();K(()=>{setTimeout(()=>{fetch("https://cdn.fonts.net/t/1.css?apiType=css&projectid=7c052a08-29f5-4c10-ab60-eeb1623773d6",{priority:"low"}).then(()=>{},()=>{})},200)});M();M();te();re();function n_(i){var e=document,t=i.container||e.createElement("div"),o=i.preventSubmit||0;t.id=t.id||"autocomplete-"+y();var n=t.style,s=i.debounceWaitMs||0,r=i.disableAutoSelect||!1,l=t.parentElement,a=[],d="",c=2,h=i.showOnFocus,m,u=0,b,f=!1,g=!1;if(i.minLength!==void 0&&(c=i.minLength),!i.input)throw new Error("input undefined");var _=i.input;t.className=[t.className,"autocomplete",i.className||""].join(" ").trim(),t.setAttribute("role","listbox"),_.setAttribute("role","combobox"),_.setAttribute("aria-expanded","false"),_.setAttribute("aria-autocomplete","list"),_.setAttribute("aria-controls",t.id),_.setAttribute("aria-owns",t.id),_.setAttribute("aria-activedescendant",""),_.setAttribute("aria-haspopup","listbox"),n.position="absolute";function y(){return Date.now().toString(36)+Math.random().toString(36).substring(2)}function E(){var C=t.parentNode;C&&C.removeChild(t)}function S(){b&&window.clearTimeout(b)}function P(){t.parentNode||(l||e.body).appendChild(t)}function z(){return!!t.parentNode}function $(){u++,a=[],d="",m=void 0,_.setAttribute("aria-activedescendant",""),_.setAttribute("aria-expanded","false"),E()}function ae(){if(!z())return;_.setAttribute("aria-expanded","true"),n.height="auto",n.width=_.offsetWidth+"px";var C=0,O;function X(){var J=e.documentElement,se=J.clientTop||e.body.clientTop||0,Z=J.clientLeft||e.body.clientLeft||0,Ue=window.pageYOffset||J.scrollTop,Re=window.pageXOffset||J.scrollLeft;O=_.getBoundingClientRect();var ke=O.top+_.offsetHeight+Ue-se,vt=O.left+Re-Z;n.top=ke+"px",n.left=vt+"px",C=window.innerHeight-(O.top+_.offsetHeight),C<0&&(C=0),n.top=ke+"px",n.bottom="",n.left=vt+"px",n.maxHeight=C+"px"}X(),X(),i.customize&&O&&i.customize(_,O,t,C)}function Q(){t.textContent="",_.setAttribute("aria-activedescendant","");var C=function(Z,Ue,Re){var ke=e.createElement("div");return ke.textContent=Z.label||"",ke};i.render&&(C=i.render);var O=function(Z,Ue){var Re=e.createElement("div");return Re.textContent=Z,Re};i.renderGroup&&(O=i.renderGroup);var X=e.createDocumentFragment(),J=y();if(a.forEach(function(Z,Ue){if(Z.group&&Z.group!==J){J=Z.group;var Re=O(Z.group,d);Re&&(Re.className+=" group",X.appendChild(Re))}var ke=C(Z,d,Ue);ke&&(ke.id=t.id+"_"+Ue,ke.setAttribute("role","option"),ke.addEventListener("click",function(vt){g=!0;try{i.onSelect(Z,_)}finally{g=!1}$(),vt.preventDefault(),vt.stopPropagation()}),Z===m&&(ke.className+=" selected",ke.setAttribute("aria-selected","true"),_.setAttribute("aria-activedescendant",ke.id)),X.appendChild(ke))}),t.appendChild(X),a.length<1)if(i.emptyMsg){var se=e.createElement("div");se.id=t.id+"_"+y(),se.className="empty",se.textContent=i.emptyMsg,t.appendChild(se),_.setAttribute("aria-activedescendant",se.id)}else{$();return}P(),ae(),Le()}function le(){z()&&Q()}function ge(){le()}function de(C){C.target!==t?le():C.preventDefault()}function He(){g||Ti(0)}function Le(){var C=t.getElementsByClassName("selected");if(C.length>0){var O=C[0],X=O.previousElementSibling;if(X&&X.className.indexOf("group")!==-1&&!X.previousElementSibling&&(O=X),O.offsetTop<t.scrollTop)t.scrollTop=O.offsetTop;else{var J=O.offsetTop+O.offsetHeight,se=t.scrollTop+t.offsetHeight;J>se&&(t.scrollTop+=J-se)}}}function ne(){var C=a.indexOf(m);
8m=C===-1?void 0:a[(C+a.length-1)%a.length],Oe(C)}function Me(){var C=a.indexOf(m);m=a.length<1?void 0:C===-1?a[0]:a[(C+1)%a.length],Oe(C)}function Oe(C){a.length>0&&(Yn(C),ki(a.indexOf(m)),Le())}function ki(C){var O=e.getElementById(t.id+"_"+C);O&&(O.classList.add("selected"),O.setAttribute("aria-selected","true"),_.setAttribute("aria-activedescendant",O.id))}function Yn(C){var O=e.getElementById(t.id+"_"+C);O&&(O.classList.remove("selected"),O.removeAttribute("aria-selected"),_.removeAttribute("aria-activedescendant"))}function Mr(C,O){var X=z();if(O==="Escape")$();else{if(!X||a.length<1)return;O==="ArrowUp"?ne():Me()}C.preventDefault(),X&&C.stopPropagation()}function Pr(C){if(m){o===2&&C.preventDefault(),g=!0;try{i.onSelect(m,_)}finally{g=!1}$()}o===1&&C.preventDefault()}function Xn(C){var O=C.key;switch(O){case"ArrowUp":case"ArrowDown":case"Escape":Mr(C,O);break;case"Enter":Pr(C);break}}function Gn(){h&&Ti(1)}function Ti(C){_.value.length>=c||C===1?(S(),b=window.setTimeout(function(){return k(_.value,C,_.selectionStart||0)},C===0||C===2?s:0)):$()}function k(C,O,X){if(!f){var J=++u;i.fetch(C,function(se){u===J&&se&&(a=se,d=C,m=a.length<1||r?void 0:a[0],Q())},O,X)}}function j(C){if(i.keyup){i.keyup({event:C,fetch:function(){return Ti(0)}});return}!z()&&C.key==="ArrowDown"&&Ti(0)}function D(C){i.click&&i.click({event:C,fetch:function(){return Ti(2)}})}function H(){setTimeout(function(){e.activeElement!==_&&$()},200)}function Y(){k(_.value,3,_.selectionStart||0)}t.addEventListener("mousedown",function(C){C.stopPropagation(),C.preventDefault()}),t.addEventListener("focus",function(){return _.focus()}),E();function I(){_.removeEventListener("focus",Gn),_.removeEventListener("keyup",j),_.removeEventListener("click",D),_.removeEventListener("keydown",Xn),_.removeEventListener("input",He),_.removeEventListener("blur",H),window.removeEventListener("resize",ge),e.removeEventListener("scroll",de,!0),_.removeAttribute("role"),_.removeAttribute("aria-expanded"),_.removeAttribute("aria-autocomplete"),_.removeAttribute("aria-controls"),_.removeAttribute("aria-activedescendant"),_.removeAttribute("aria-owns"),_.removeAttribute("aria-haspopup"),S(),$(),f=!0}return _.addEventListener("keyup",j),_.addEventListener("click",D),_.addEventListener("keydown",Xn),_.addEventListener("input",He),_.addEventListener("blur",H),_.addEventListener("focus",Gn),window.addEventListener("resize",ge),e.addEventListener("scroll",de,!0),{destroy:I,fetch:Y}}var kh=n_;function Ze(i){return kh(i)}re();var Th=new RegExp("\\w+","g"),s_=new RegExp("(.*[^\\w])?(\\w+)$"),ui=class{index=new Map;items=new Map;_searchFields=[];_autoSearchFields=!0;_suggestFields=[];_autoSuggestFields=!0;_completeSuggestFields=[];get searchFields(){return this._searchFields}set searchFields(e){this._searchFields=e,this._autoSearchFields=!1}get suggestFields(){return this._autoSuggestFields?this._searchFields:this._suggestFields}set suggestFields(e){this._suggestFields=e,this._autoSuggestFields=!1}get completeSuggestFields(){return this._completeSuggestFields}set completeSuggestFields(e){this._completeSuggestFields=e}indexItem(e){let t=new Map;for(let[o,n]of Object.entries(e)){if(typeof n!="string")continue;this._autoSearchFields&&!this._searchFields.includes(o)&&this._searchFields.push(o);let s=n.toLowerCase(),r,l=0;for(;(r=Th.exec(s))!==null;){let a=o+":"+r[0],d=r.index,c=this.index.get(a);c||(c=new Map,this.index.set(a,c));let h=c.get(e);h||(h={positions:[]},c.set(e,h)),h.positions.push(d),++l}t.set(o,l)}this.items.set(e,{fields:t})}suggest(e){let t=new Map,o=s_.exec(e);if(o){let s=o[1]||"",r=o[2],l;s&&(l=this.#e(s).results);for(let[a,d]of this.index){let c=a.split(":")[0];if(!this.suggestFields.includes(c))continue;let h=a.substr(c.length+1),m=this.#t(r,h,{startsWithScore:.9});if(m){let u=s+h;if(t.has(u)||t.set(u,[m]),this.completeSuggestFields.includes(c))for(let b of d.keys()){if(l&&!l.has(b))continue;let f=[m];l&&f.push(...l.get(b)),u=b[c];let g=t.get(u);g?g.push(...f):t.set(u,f)}}}}if(!t)return[];let n=this.#n(t);return this.#i(n)}search(e){let t=this.#e(e);return{items:this.#i(t.results),terms:t.terms}}#e(e){let t=new Map,o=[];e=e.toLowerCase();for(let s of this.searchFields){let r,l=e.match(Th);if(l)for(let a of l){let d=this.#o(s,a);if(d.results.size){for(let c of d.terms)o.includes(c)||o.push(c);if(r){for(let[c,h]of d.results)r.has(c)&&r.get(c).push(...h.scores);for(let c of r.keys())d.results.has(c)||r.delete(c)}else{r=new Map;for(let[c,h]of d.results)r.set(c,h.scores)}}}if(r)for(let[a,d]of r){let c=t.get(a);c?c.push(...d):t.set(a,d)}}return{results:this.#n(t),terms:o}}#o(e,t){let o,n=[],s=this.index.get(e+":"+t);if(s)o=new Map(Array.from(s).map(r=>[r[0],{scores:[1],term:t,positions:r[1].positions}])),n.push(t);else{o=new Map;for(let[r,l]of this.index){let a=r.split(":")[0];if(a!==e&&e!=="*")continue;let d=r.substr(a.length+1),c=this.#t(t,d);if(c){for(let h of Array.from(l))o.has(h[0])?o.get(h[0]).scores.push(c):o.set(h[0],{scores:[c],term:d,positions:h[1].positions});n.push(d)}}for(let[r,l]of o)o.get(r).scores=[l.scores.reduce((a,d,c)=>(a*c+d)/(c+1))]}return{results:o,terms:n}}#t(e,t,{limitDistance:o=2,startsWithScore:n=.25}={}){if(e===t)return 1;let s=0;if(Math.min(e.length,t.length)>=2*o){let r=es(e,t);r<=o&&(s=Math.max(s,(o-r+1)/o))}return t.startsWith(e)&&(s=Math.max(s,n)),s}#n(e){let t=new Map;for(let[o,n]of e)t.set(o,[n.reduce((s,r,l)=>(s*l+r)/(l+1))]);return t}#i(e){return Array.from(e).sort((t,o)=>o[1][0]-t[1][0]).map(t=>t[0])}};var Fa={},r_=matchMedia("(min-width: 751px)");function a_(i){let e=[];for(let[t,o]of Object.entries(i.facets)){let n=o.filter(s=>s.value);for(let{value:s,title:r}of n)e.push({title:r,associatedFilters:[{filter:t,value:s}]})}return e}var Lt=class{srcItems=[];searchIndex=null;customTextSearch;constructor(e,t){if(this.srcItems=e||w(".pagefilters__item").map(o=>
8o.cloneNode(!0)),this.customTextSearch=t?.customTextSearch||!1,!t?.customAutocomplete){this.searchIndex=new ui,this.searchIndex.searchFields=["title","description"],this.searchIndex.completeSuggestFields=["title"],this.srcItems.forEach((n,s)=>{w(n,"[data-autocompletesource-title]").forEach(r=>{let l=r.textContent||"",d=w(n,"[data-autocompletesource-description]").map(c=>c.textContent||"").join(`
9`);(l||d)&&this.searchIndex.indexItem({idx:s,title:l,description:d})})});let o=T(".page-titlebar__form input[name=query]");o&&Ze({input:o,className:"ut-autocomplete",preventSubmit:1,fetch:(n,s)=>{let r=this.searchIndex.suggest(n).slice(0,10);s(r.map(l=>({label:l,value:l})))},onSelect:n=>{o.value=n.label??"",yt(o,"change")},customize:(n,s,r,l)=>{let a=n.parentElement.offsetWidth,d=s.left+(s.width-a);r.style.width=a+"px",r.style.left=d+"px"}})}}filter(e){let t=[],o=[];if(!this.customTextSearch&&this.searchIndex&&e.query.searchWords){let n=this.searchIndex.search(e.query.searchWords);o.push(...n.items.map(s=>s.idx))}return this.srcItems.forEach((n,s)=>{if(!this.customTextSearch&&this.searchIndex&&e.query.searchWords&&!o.includes(s))return;(!e.query.isAnySet||Object.entries(e.query.facets).every(([l,a])=>{if(a.length===0)return!0;let d=n.getAttribute(`data-filter-${l}`)?.split(" ");return d&&a.some(c=>d.includes(c.value))}))&&t.push(n)}),t}},Aa=class{filtername;filter;isFirstRun=!0;itemsContainer;settings;scrollUpdateTimer=null;constructor(e){if(this.settings=e,this.filtername=e.filtername,this.settings.headerTabsFilter&&this.setupHeaderTabs(),this.settings.filters.length>0&&this.buildFilters(),this.itemsContainer=T(".page-content .pagefilters__itemcontainer")||L(".page-content"),document.documentElement.classList.add("pagewithfilters"),document.addEventListener("keyup",o=>{o.key==="Escape"&&document.documentElement.classList.remove("pagefilters--mobilefiltersvisible")}),e.options?.showtextsearch&&this.setupTextSearch(),this.settings.customFilter){let o=Fa[this.settings.customFilter]??ue(`Callback '${this.settings.customFilter}' not registered (use registerFilterCallback)`);this.filter=o(w(".pagefilters__item"))}else this.filter=new Lt(w(".pagefilters__item"),this.settings.options);this.setInitialFiltersFromUrl();let t=location.hash.replace("#","").split(".")[0];this.refilter(),e.options?.viewmodes&&e.options.viewmodes.some(o=>`${o.name}view`===t)?this.onViewModeChange(t.replace("view","")):this.itemsContainer.hidden=!1}setInitialFiltersFromUrl(){let e=new URLSearchParams(location.search);if(this.settings.filters.forEach(o=>{if((o.type?o.type:o.ischeckboxes?"checkboxes":"select")==="daterange"){let s=e.get(`${o.name}.start`),r=e.get(`${o.name}.end`),l=T(`.page-filters__form [name="${o.name}.start"]`),a=T(`.page-filters__form [name="${o.name}.end"]`);s&&l&&(l.value=s),r&&a&&(a.value=r)}else{let s=e.get(o.name);if(!s&&o.name==="themes"&&(s=e.get("theme"),s)){let l=new URL(location.href);l.searchParams.delete("theme"),l.searchParams.set("themes",s),history.replaceState(null,"",l.toString())}if(!s)return;let r=T(`.page-filters__form [name="${o.name}"]`);if(r instanceof HTMLSelectElement)[...r.options].some(l=>l.value===s)&&(r.classList.contains("replacedby-ss")?r.slim.setSelected(s):r.value=s);else if(r instanceof HTMLInputElement)if(r.type==="checkbox"){let l=s.split(",");for(let a of l){let d=T(`.page-filters__form [name="${o.name}"][value="${a}"]`);d&&(d.checked=!0)}}else if(r.type==="radio"){let l=T(`.page-filters__form [name="${o.name}"][value="${s}"]`);l&&(l.checked=!0)}else r.value=s}}),this.settings.headerTabsFilter){let o=e.get(this.settings.headerTabsFilter.name);if(!o)return;let n=T(`.page-filterstabs__listitem [name="${this.settings.headerTabsFilter.name}"][value="${o}"]`);n&&(n.checked=!0)}let t=e.get("query");if(t){let o=T(".page-titlebar__form [name=query]");o&&(o.value=t)}}buildFilter(e){let t=e.type?e.type:e.ischeckboxes?"checkboxes":"select",o=e.options?.filter(s=>s.selected).map(s=>s.rowkey)||[];if(!e.defaultselection&&o.length>0&&(e.defaultselection=o.join(",")),e.defaultselection){let s=new URL(location.href);s.searchParams.get(e.name)||(s.searchParams.set(e.name,e.defaultselection),history.replaceState(null,"",s.toString()))}if(t==="hidden")return null;let n=t==="checkboxes"&&e.options&&e.options.length>0?e.options.map(s=>p("label",{class:"checkbox-label"},p("input",{type:"checkbox",name:e.name,value:s.rowkey,onChange:()=>this.onFilterChange()}),s.title)):t==="radio"&&e.options&&e.options.length>0?e.options.map(s=>p("label",{class:"checkbox-label"},p("input",{type:"radio",name:e.name,value:s.rowkey,onChange:()=>this.onFilterChange()}),s.title)):t==="daterange"?p("div",{class:`fieldline-${t}`},p("div",{class:`fieldline-${t}__line`},p("label",{for:`${this.filtername}-${e.name}-start`},v("utwente_base:frontend.ws2016.js.pagefilters.daterange-from")),p("input",{type:"date",id:`${this.filtername}-${e.name}-start`,name:`${e.name}.start`,onChange:()=>this.onFilterChange(),value:""})),p("div",{class:`fieldline-${t}__line`},p("label",{for:`${this.filtername}-${e.name}-end`},v("utwente_base:frontend.ws2016.js.pagefilters.daterange-till")),p("input",{type:"date",id:`${this.filtername}-${e.name}-end`,name:`${e.name}.end`,onChange:()=>this.onFilterChange(),value:""}))):t==="select"&&e.options&&e.options.length>0?p("select",{name:e.name,id:`${this.filtername}-${e.name}`,onChange:()=>this.onFilterChange()},e.options.map(s=>p("option",{value:s.rowkey},s.title))):"";return p("fieldset",null,p("legend",null,e.title),n,e.comment?p("p",{class:"page-filters__form__comment"},e.comment):null)}setupHeaderTabs(){let e=this.settings.headerTabsFilter?.options?this.settings.headerTabsFilter.options.length:0,t=p("div",{class:"page-filterstabs"},p("div",{class:"page-filterstabs__inner"},e>0?p("ul",{class:"page-filterstabs__list"},this.settings.headerTabsFilter?.options?.map(o=>p("li",{class:"page-filterstabs__listitem"},p("input",{type:"radio",id:`${this.settings.headerTabsFilter?.name}-${o.rowkey}`,checked:!!o.selected,name:this.settings.headerTabsFilter?.name,value:o.rowkey,onChange:()=>this.onFilterChange()}),p("label",{for:`${this.settings.headerTabsFilter?.name}-${o.rowkey}`},p("b",{"aria-hidden":"true",...o.selected?{}:{hidden:!0}},`${o.title}`),p("span",null,`${o.title}`))))):null));L(".page-titlebar").after(t)}buildFilters(){let e=0;this.settings.options?.viewmodes&&this.settings.options.viewmodes.length>0&&(e=this.settings.options.viewmodes.findIndex(r=>r.selected),e===-1&&(e=0));let t=p("div",{class:"page-filterstoolbar"},p("div",{class:"page-filterstoolbar__title",onClick:()=>this.toggleMobileFilters()}
9,p("i",{class:"UT-icon-UT_icon_116_filter-16px"}),p("span",null,"Filter")),p("div",{class:"page-filterstoolbar__controls"},p("div",{class:"page-filterstoolbar__feedback"}),this.settings.options?.viewmodes&&this.settings.options.viewmodes.length>0?p("div",{class:"page-filterstoolbar__options"},this.settings.options.viewmodes.map((r,l)=>p("button",{type:"button",onClick:()=>this.onViewModeChange(r.name),"data-view":r.name,class:`page-filterstoolbar__button${l===e?" page-filterstoolbar__button--active":""}`},r.icon?p("i",{class:r.icon}):null,r.titleMobile?p("span",{class:"page-filterstoolbar__button__title-mobile",hidden:!0},r.titleMobile):null,p("span",{class:"page-filterstoolbar__button__title-desktop"},r.title)))):null)),o=p("div",{class:"page-filters"},p("button",{type:"button",tabindex:"0",class:"page-filters__mobileclose","aria-label":v("utwente_base:frontend.ws2016.js.pagefilters.close-filters"),hidden:!0,onClick:()=>this.toggleMobileFilters()},p("i",{class:"UT-icon-UT_icon_47_cross-16px"})),p("form",{class:"page-filters__form wh-styledinput",method:"post",action:"javascript://"},this.settings.filters.map(r=>this.buildFilter(r)),p("div",{class:"page-filters__form__buttons"},p("button",{type:"reset",class:"page-filters__form__reset",onClick:()=>this.onResetFilters()},v("utwente_base:frontend.ws2016.js.pagefilters.reset")))));L(".page-contentwrapper").before(t);let n=L(".page-sidebar");n.prepend(o),n.hidden=!1,window.addEventListener("resize",()=>this.onResize(o)),this.updateFiltersTop(o);let s=p("button",{type:"button",tabindex:"0",class:"page-filters__mobiletoggle",onClick:()=>this.toggleMobileFilters(),hidden:!0},p("i",{class:"UT-icon-UT_icon_116_filter-16px"}),p("span",{class:"page-filters__mobiletoggle__showlabel"},v("utwente_base:frontend.ws2016.js.pagefilters.show-filters")),p("span",{class:"page-filters__mobiletoggle__hidelabel",hidden:!0},v("utwente_base:frontend.ws2016.js.pagefilters.show-xresults","0")));L(".page-contentwrapper").after(s),we(o)}onResize(e){this.scrollUpdateTimer&&clearTimeout(this.scrollUpdateTimer),this.scrollUpdateTimer=setTimeout(()=>this.updateFiltersTop(e),100)}updateFiltersTop(e){if(!r_.matches){e.style.top="";return}let t=90,o=20;e.style.top=`${Math.min(t,innerHeight-e.getBoundingClientRect().height-o)}px`}onResetFilters(){let e=T(".page-titlebar__form [name=query]");e&&(e.value=""),w(".page-filters__form select.replacedby-ss").forEach(t=>{t.slim.setSelected([],!1)}),this.onFilterChange()}toggleMobileFilters(){document.documentElement.classList.toggle("pagefilters--mobilefiltersvisible")}onViewModeChange(e){if(this.itemsContainer.classList.contains(`pagefilters__itemcontainer--${e}view`)){this.itemsContainer.hidden=!1;return}this.itemsContainer.hidden=!0,location.hash=`${e}view`,this.settings.options?.viewmodes?.forEach(t=>{this.itemsContainer.classList.toggle(`pagefilters__itemcontainer--${t.name}view`,t.name===e)}),F(this.itemsContainer,"pagefilters:viewmodechange",{bubbles:!0,cancelable:!1,detail:{mode:e}}),setTimeout(()=>{this.refilter(),this.itemsContainer.hidden=!1,w(".page-filterstoolbar__button").forEach(t=>{t.classList.toggle("page-filterstoolbar__button--active",t.dataset.view===e)})},100)}setupTextSearch(){let e=p("form",{class:"page-titlebar__form",method:"post",action:"javascript://"},p("button",{type:"submit",class:"UT-icon-UT_icon_70_search-16px"}),p("input",{type:"search",name:"query",onSearch:()=>this.onTextSearch(),onChange:()=>this.onTextSearch(),placeholder:v("utwente_base:frontend.ws2016.js.pagefilters.search-placeholder")}));e.addEventListener("submit",t=>{t.preventDefault(),this.onTextSearch()}),L(".page-titlebar").append(e)}onTextSearch(){this.onFilterChange()}getCurrentFilterOptions(){let e={};for(let s of w(".page-filters__form input, .page-filters__form select, .page-filterstabs__listitem input"))s instanceof HTMLInputElement&&(e[s.name]||=[],["checkbox","radio"].includes(s.type)?s.checked&&s.value&&s.value!=="0"&&e[s.name].push({value:s.value,title:s.closest("label")?.textContent||""}):s.value&&s.value!=="0"&&e[s.name].push({value:s.value,title:s.value})),s instanceof HTMLSelectElement&&s.value&&s.value!=="0"&&(e[s.name]=[{value:s.value,title:s.options[s.selectedIndex]?.text||""}]);let t=this.settings.filters.filter(s=>s.type==="hidden");if(t.length>0){let s=new URLSearchParams(location.search);t.forEach(r=>{let l=s.get(r.name);if(l){let a=r.options?.find(d=>d.rowkey===l);a&&(e[r.name]=[{value:l,title:a.title}])}})}let o=T(".page-titlebar__form [name=query]")?.value||"",n=!!(Object.values(e).some(s=>s.length>0)||o);return w(".page-filters__form__reset").forEach(s=>s.classList.toggle("page-filters__form__reset--active",n)),{facets:e,searchWords:o,isAnySet:n}}onFilterChange(){if(this.settings.options?.reloadOnFilterChange){this.isFirstRun?this.settings.options?.customFeedback&&this.settings.options?.customFeedback&&w(".page-filterstoolbar__feedback").forEach(t=>t.textContent=this.settings.options?.customFeedback??""):(this.updateFiltersInUrl(this.getCurrentFilterOptions()),location.reload());return}let e=G();this.refilter().finally(()=>
9e.release())}refilter=Ci(async()=>{let e=this.getCurrentFilterOptions();if(this.updateTagsBar(e),this.isFirstRun&&(e.isAnySet||this.settings.options&&this.settings.options.startAtFirstRun))await this.showItemsBasedOnFilter(e);else if(!this.isFirstRun||e.isAnySet)this.updateFiltersInUrl(e),await this.showItemsBasedOnFilter(e);else{let t=w(".pagefilters__item"),o=this.settings.options?.customFeedback?this.settings.options.customFeedback:v("utwente_base:frontend.ws2016.js.pagefilters.search-xresults",String(t.length));w(".page-filterstoolbar__feedback").forEach(n=>n.textContent=o),w(".page-filters__mobiletoggle__hidelabel").forEach(n=>n.textContent=v("utwente_base:frontend.ws2016.js.pagefilters.show-xresults",String(t.length))),document.documentElement.classList.toggle("page-filters--noresults",!t.length)}this.isFirstRun=!1},{coalesce:!0});updateFiltersInUrl(e){let t=new URL(location.href);this.settings.filters.forEach(o=>{(o.type?o.type:o.ischeckboxes?"checkboxes":"select")==="daterange"?(t.searchParams.delete(`${o.name}.start`),t.searchParams.delete(`${o.name}.end`)):t.searchParams.delete(o.name)}),this.settings.headerTabsFilter&&t.searchParams.delete(this.settings.headerTabsFilter.name);for(let[o,n]of Object.entries(e.facets))if(n.length>0){let s=n.filter(r=>r.value).map(r=>r.value);s.length>0&&t.searchParams.set(o,s.join(","))}e.searchWords?t.searchParams.set("query",e.searchWords):t.searchParams.delete("query"),history.replaceState(null,"",t.toString())}async showItemsBasedOnFilter(e){let t=this.filter.filter({query:e}),o=t instanceof Promise?await t:t;if(!o||this.settings.options?.reloadOnFilterChange)return;w(".pagefilters__item").forEach(s=>s.remove()),o.forEach(s=>s.classList.add("pagefilters__item")),this.itemsContainer.append(...o);let n=this.settings.options?.customFeedback?this.settings.options.customFeedback:v("utwente_base:frontend.ws2016.js.pagefilters.search-xresults",String(o.length));w(".page-filterstoolbar__feedback").forEach(s=>s.textContent=n),w(".page-filters__mobiletoggle__hidelabel").forEach(s=>s.textContent=v("utwente_base:frontend.ws2016.js.pagefilters.show-xresults",String(o.length))),document.documentElement.classList.toggle("page-filters--noresults",!o.length),we(this.itemsContainer),F(this.itemsContainer,"pagefilters:afterfilter",{bubbles:!0,cancelable:!1,detail:{totalcount:o.length}})}deleteTags(e){for(let{filter:t,value:o}of e){let n=T(`.page-filters__form input[name="${t}"][value="${o}"]`);if(n&&["checkbox","radio"].includes(n.type)){n.checked=!1;continue}let s=T(`.page-filters__form select[name="${t}"]`);if(s){s.classList.contains("replacedby-ss")?s.slim.setSelected(""):s.selectedIndex=0;continue}let r=T(`.page-filters__form input[name="${t}"]`);if(r&&!["checkbox","radio"].includes(r.type)){r.value="";continue}if(this.settings.filters.filter(a=>a.type==="hidden"&&a.name===t)){let a=new URL(location.href);a.searchParams.delete(t),history.replaceState(null,"",a.toString());continue}console.error("Could not find input/select for filter",t,o)}this.onFilterChange()}updateTagsBar(e){let t=T(".pagefilters__tags");if(!t)return;let n=a_(e).map(s=>p("span",{class:"pagefilters__tag",onClick:()=>this.deleteTags(s.associatedFilters)},p("span",null,s.title),p("i",{class:"UT-icon-UT_icon_47_cross-16px","aria-label":`Remove filter ${s.title}`})));t.replaceChildren(...n)}};function Eh(){let i=ee("utwente_base:pagefilters",{allowMissing:!0});i&&setTimeout(()=>K(()=>new Aa(i)))}function ft(i,e){if(Fa[i])throw new Error(`Custom filter with name ${i} is already registered`);Fa[i]=e}var Ma=class{async filter(e){let t=[];return(!e.query.isAnySet||e.query.facets.selectone.some(o=>o.value==="option1"))&&t.push(p("div",{id:"dynitem1"},"I am item 1")),(!e.query.isAnySet||e.query.facets.selectone.some(o=>o.value==="option2"))&&t.push(p("div",{id:"dynitem2"},"I am item 2")),t}};ft("testFilter",()=>new Ma);wh();var ao=(Ne(),Ce(Xe)).registerTexts;ao("utwente_base","nl",{frontend:{ws2026:{js:{common:{next:"Volgende",previous:"Vorige"},header:{"menu-home":"Home"}}}}});ao("utwente_base","en",{frontend:{ws2026:{js:{common:{next:"Next",previous:"Previous"},header:{"menu-home":"Home"}}}}});ao("utwente_base","de",{frontend:{ws2026:{js:{common:{next:"N\xE4chste",previous:"Vorherige"}}}}});ao("utwente_base","es",{frontend:{ws2026:{js:{common:{next:"Next",previous:"Previous"},header:{"menu-home":"Home"}}}}});ao("utwente_base","it",{frontend:{ws2026:{js:{common:{next:"Next",previous:"Previous"},header:{"menu-home":"Home"}}}}});ao("utwente_base","xt",{frontend:{ws2026:{js:{common:{next:"Next",previous:"Previous"},header:{"menu-home":"Home"}}}}});M();var lo=class{menuNode;menuActive=!1;horizontal=!0;
9get menuItemSelector(){return"[tabindex]:not([tabindex='-1']), [href]"}constructor(e,t){this.menuNode=e,pe(document.documentElement,"mousedown",o=>this.onMouseDown(o)),pe(this.menuNode,"click",o=>this.onClick(o)),pe(this.menuNode,"keydown",o=>this.onKeyDown(o)),t?.scrollNode!==null&&(at().platform==="ios"||at().platform==="android"?(t?.scrollNode??this.menuNode).classList.add("nativescroll"):new Xt(t?.scrollNode??this.menuNode,{suppressScrollX:!0}))}closeAllMenus(){this.closeSubmenus(this.menuNode)}onMouseDown(e){this.menuActive&&!this.menuNode.contains(e.target)&&this.closeAllMenus()}onClick(e){let t=e.target.closest("[aria-role=menuitem]");t&&(t.ariaHasPopup==="menu"?(V(e),this.toggleMenu(t)):t.hasAttribute("data-custom-menu-action")&&(V(e),F(t,"ws2026:custom-menu-action",{bubbles:!0,cancelable:!1,detail:{menuItem:t}})))}onKeyDown(e){let t=e.target.closest("[aria-role=menuitem]");if(!t)return;let o=0;for(let a=t;a;a=a.parentElement?.closest("[aria-role=menuitem]")??null)++o;let n=null,s=!1,r,l=this.horizontal&&o===1;switch(e.key){case"ArrowLeft":{l?(n=t.previousElementSibling,r=this.menuActive):o>1&&(n=t.parentElement?.closest("[aria-role=menuitem]")??null,this.horizontal||(r=!1));break}case"ArrowRight":{l?(n=t.nextElementSibling,r=this.menuActive):(this.horizontal||this.toggleMenu(t,!0),n=t.querySelector("[aria-role=menuitem]"));break}case"ArrowDown":{l?(this.toggleMenu(t,!0),n=t.querySelector("[aria-role=menuitem]")):(n=t.nextElementSibling??t.closest("ul")?.nextElementSibling?.querySelector("[aria-role=menuitem]")??null,this.horizontal||(r=!1));break}case"ArrowUp":{l||(t.previousElementSibling?n=t.previousElementSibling:t.parentElement?.previousElementSibling?.querySelector("[aria-role=menuitem]")?n=t.parentElement?.previousElementSibling?.querySelector("[aria-role=menuitem]:last-of-type"):o===2&&this.horizontal&&(n=t.parentElement?.closest("[aria-role=menuitem]")??null),this.horizontal||(r=!1));break}case"Enter":{t.ariaHasPopup==="menu"?n=t:t.hasAttribute("data-custom-menu-action")?F(t,"ws2026:custom-menu-action",{bubbles:!0,cancelable:!1,detail:{menuItem:t}}):s=!0;break}case"Escape":{n=e.target.closest(".opened"),n?r=!1:e.target.blur();break}default:s=!0}n?.matches("[aria-role=menuitem]")&&(this.toggleMenu(n,r??n.ariaHasPopup==="menu")&&!this.horizontal?n=n?.querySelector(`:is(.submenu, .subsubmenu) *:where(${this.menuItemSelector})`)??null:n=n?.tabIndex>=0||n?.hasAttribute("href")?n:n?.querySelector(`:scope > *:where(${this.menuItemSelector})`)??null,n&&n.focus()),s||V(e)}toggleMenu(e,t){let o=!1;for(let n of e.parentElement.children){let s=n.classList.contains("opened");n.classList.toggle("opened",n.isSameNode(e)&&t);let r=n.classList.contains("opened");s&&!r&&this.closeSubmenus(n),o=o||r,n.ariaHasPopup==="menu"&&n.setAttribute("aria-expanded",r?"true":"false")}return this.menuActive=this.menuNode.querySelectorAll(".opened").length>0,o}closeSubmenus(e){for(let t of[...e.querySelectorAll(".opened")].toReversed())this.toggleMenu(t,!1)}};M();var co=(Ne(),Ce(Xe)).registerTexts;co("utwente_design","nl",{utilitymenu:{loginmenu:{editprofile:"Profiel bewerken",mycourses:"Mijn cursussen",myevents:"Mijn eventregistraties",mylangcourses:"Mijn (taal)cursussen",serviceportal:"Service Portal",studywebsite:[1," website"],utlogin:"UT Login"}}});co("utwente_design","en",{utilitymenu:{loginmenu:{editprofile:"Edit profile",mycourses:"My courses",myevents:"My event registrations",mylangcourses:"My (language) courses",serviceportal:"Service Portal",studywebsite:[1," website"],utlogin:"UT Login"}}});co("utwente_design","de",{utilitymenu:{loginmenu:{editprofile:"Edit profile",mycourses:"My courses",myevents:"My event registrations",mylangcourses:"My (language) courses",serviceportal:"Service Portal",studywebsite:[1," website"],utlogin:"UT Login"}}});co("utwente_design","es",{utilitymenu:{loginmenu:{editprofile:"Edit profile",mycourses:"My courses",myevents:"My event registrations",mylangcourses:"My (language) courses",serviceportal:"Service Portal",studywebsite:[1," website"],utlogin:"UT Login"}}});co("utwente_design","it",{utilitymenu:{loginmenu:{editprofile:"Edit profile",mycourses:"My courses",myevents:"My event registrations",mylangcourses:"My (language) courses",serviceportal:"Service Portal",studywebsite:[1," website"],utlogin:"UT Login"}}});co("utwente_design","xt",{utilitymenu:{loginmenu:{editprofile:"Edit profile",mycourses:"My courses",myevents:"My event registrations",mylangcourses:"My (language) courses",serviceportal:"Service Portal",studywebsite:[1," website"],utlogin:"UT Login"}}});var Pa=class extends lo{searchNode;constructor(e){super(e,{scrollNode:null});let t=T(".utility-item--login");if(t&&this.setupLoginMenu(t),this.searchNode=T(".utility-item--search"),this.searchNode){pe(this.searchNode,"ws2026:custom-menu-action",()=>this.handleSearchSheetMenu()),window.addEventListener("keydown",n=>this.maybeOpenSearchSheetMenu(n)),document.addEventListener("searsia:showsearchsheet",()=>this.searchSheetVisibilityUpdated(!0)),document.addEventListener("searsia:hidesearchsheet",()=>this.searchSheetVisibilityUpdated(!1));let o=new URL(location.href).searchParams.get("q");o&&setTimeout(()=>this.handleSearchSheetMenu(o),1)}}setupLoginMenu(e){let t=e.firstElementChild,o=li();if(o){let n=this.getLoginMenuItems(o);t.append(p("div",{class:"utility-toptext"},o.fullname?p("div",{class:"fullname"},o.fullname):null,o.username?p("div",{class:"loginname"},o.username):null),p("ul",{class:"utility-submenu"},n.map(s=>p("li",{class:"utility-subitem","aria-role":"menuitem"},p("a",{href:s.link},s.title,s.subTitle?p("span",{class:"utility-subitem--subtitle"},s.subTitle):null)))))}else t.append(p("ul",{class:"utility-submenu"},p("li",{class:"utility-subitem utility-subitem--icon","aria-role":"menuitem"},p("a",{href:ji()},R("utwente_design:utilitymenu.loginmenu.utlogin")))))}getLoginMenuItems(e){let t=document.documentElement.lang.startsWith("nl"),o=ee("utwente_design:utilitymenu",{allowMissing:!0});if(!o)return[];let n=o.utwenteRoot.endsWith("/")?o.utwenteRoot.slice(0,-1):o.utwenteRoot,s=o.peopleRoot.endsWith("/")?o.peopleRoot.slice(0,-1):o.peopleRoot,r=[];if(!e.isstudent&&n&&r.push({link:`${n}/serviceportal`,title:R("utwente_design:utilitymenu.loginmenu.serviceportal")}),e.isemployee&&s&&r.push({link:`${s}/editprofile`,title:R("utwente_design:utilitymenu.loginmenu.editprofile")}),e.studies&&n)for(let l of e.studies.split(","))l=l.trim(),r.push({link:`${n}/.utwente_base/auth/gotostudy.shtml?study=${encodeURIComponent(l)}`,title:R("utwente_design:utilitymenu.loginmenu.studywebsite",l)});return e.isstudent&&n&&r.push({link:`${n}/students`,title:"Student Services"}),n&&(r.push({link:`${n}/mycourses`,title:e.isemployee?R("utwente_design:utilitymenu.loginmenu.mycourses"):R("utwente_design:utilitymenu.loginmenu.mylangcourses")}),r.push({link:t?`${n}/mijn-eventregistraties/`:`${n}
9/en/my-event-registrations/`,title:R("utwente_design:utilitymenu.loginmenu.myevents")})),r}handleSearchSheetMenu(e){this.closeAllMenus(),F(document,"ws2026:togglesearch",{bubbles:!1,cancelable:!0,detail:{q:e}})}maybeOpenSearchSheetMenu(e){if(!this.searchNode.classList.contains("active")){if(ot(e.target)&&(e.target.isContentEditable||e.target.nodeName==="TEXTAREA"||e.target.nodeName==="INPUT"&&!["checkbox","radio"].includes(e.target.type)))return;e.key==="/"&&(V(e),this.handleSearchSheetMenu())}}searchSheetVisibilityUpdated(e){this.searchNode.classList.toggle("active",e),this.searchNode.setAttribute("aria-expanded",e?"true":"false"),this.searchNode.focus();for(let o of[".header-menu",".header-dest",".header-breadcrumbs",".page-main",".page-footer"]){let n=T(o);n&&(n.inert=e)}let t=T(".searchsheet");t&&(t.inert=!e)}};x(".utility-menu",i=>new Pa(i));M();ie();re();M();var Es=class{node;itemNodes;itemWidths=[];listWidth=0;lastWidth=0;observer;constructor(e){if(this.node=e,this.itemNodes=[...this.node.children],!this.itemNodes.length)return;this.observer=new ResizeObserver(o=>this.checkShortenBreadcrumbList(o[0])),this.observer.observe(this.node);let t=p("div",{class:"breadcrumb breadcrumb--ellipsis"},"\u2026");this.node.firstElementChild.after(t),t.addEventListener("click",()=>this.unshortenBreadcrumbList())}checkShortenBreadcrumbList(e){requestAnimationFrame(()=>{let t=e.borderBoxSize[0].inlineSize;if(!t||t===this.lastWidth)return;if(this.lastWidth=t,!this.listWidth){if(this.node.classList.add("breadcrumbs--measure"),this.node.clientWidth)for(let s of this.node.children){let r=Math.ceil(s.getBoundingClientRect().width);this.itemWidths.push(r),s.classList.contains("breadcrumb--ellipsis")||(this.listWidth+=r)}this.node.classList.remove("breadcrumbs--measure")}let o=getComputedStyle(this.node);t=Math.floor(t-parseFloat(o.paddingLeft)-parseFloat(o.paddingRight));let n=t<this.listWidth;if(this.node.classList.toggle("breadcrumbs--shorten",n),n){let s=this.itemWidths[0]+this.itemWidths[1];for(let r=this.itemNodes.length;r>=2;--r)s+=this.itemWidths[r],this.itemNodes[r-1].classList.toggle("breadcrumb--hide",s>t&&r!==this.itemNodes.length)}})}unshortenBreadcrumbList(){this.observer.disconnect(),this.node.classList.remove("breadcrumbs--shorten")}};M();te();M();function Sh(i){return i+90>750&&(i+90<=1080?i+=90:i+=110,--i),Math.max(Math.ceil(i),750)}function Lh(){for(let i of w(".page-content, .wh-form__richtext")){if(!T(i,":scope > p > img.wh-rtd__img--floatleft, :scope > p > img.wh-rtd__img--floatright"))continue;let e=i.firstElementChild,t=null;for(;e;){let o=e.nextElementSibling;if(e.nodeName==="P"){let n=T(e,":scope > img.wh-rtd__img--floatleft, :scope > img.wh-rtd__img--floatright");n?(t=p("section",{class:"ut-floatwrapper"}),e.before(t),t.append(n),e.childNodes.length===0?e.remove():t.append(e)):t&&t.append(e)}else t=null;e=o}}}var l_=1350,Ss=null;async function Fh(){let i=new URL("utwente-navigation.rpc",document.documentElement.dataset.pageUrl??location.href);i.searchParams.set("what","menu");let e=await fetch(i);return e.ok?await e.json().catch(()=>null):null}function an(i,e){return e.isCurrent&&i.push("current"),e.items?.length&&i.push("subitems"),i.join(" ")}function d_(i){if(!i)return;let e=p("div",{class:"menu-banner"},i.imageSrcSet&&p("img",{srcset:i.imageSrcSet.map(t=>`${t.link} ${t.descriptor}`).join(", "),alt:i.imageAlt}),p("div",{class:"banner-title"},i.title));if(i.content){let t=p("span",null);t.innerHTML=i.content,e.append(...t.childNodes)}return e}function Ah(i,e){let t=e?.homeLink!==void 0?1:0;return p("ul",{class:"menubar","aria-role":"menubar","data-menu-title":t?v("utwente_base:frontend.ws2026.js.header.menu-home"):null,style:`--menu-item-count: ${i.length+t};`},t?p("li",{class:"menu-item home",style:"--menu-item-idx: 0;"},e.homeLink?p("a",{class:"item-title",href:e.homeLink},v("utwente_base:frontend.ws2026.js.header.menu-home")):p("div",{class:"item-title"},v("utwente_base:frontend.ws2026.js.header.menu-home"))):null,i.map((o,n)=>p("li",{class:an(["menu-item"].concat(e?.hasTitle&&!n?["title"]:[]),o),style:`--menu-item-idx: ${n+t};`,"aria-role":"menuitem","aria-haspopup":o.items?.length||"banner"in o&&o.banner?"menu":null},o.items?.length||"banner"in o&&o.banner?p(Xo,null,p("div",{class:"item-title",tabindex:"0"},p("span",{"data-title":o.title},o.title)),p("div",{class:"menu-foldout",style:o.items?.length?`--menu-item-count: ${o.items.length};`:""},o.items?.length&&p("ul",{class:"submenu","arial-role":"menu","data-menu-title":o.title},o.items.map((s,r)=>p("li",{class:an(["submenu-item"],s),style:`--submenu-item-idx: ${r};`,"aria-role":"menuitem","aria-haspopup":"items"in s&&s.items?.length?"menu":null,"aria-expanded":"items"in s&&s.items?.length?"false":null},"items"in s&&s.items?.length?p(Xo,null,p("div",{class:"item-title",tabindex:"0"},p("span",null,s.title)),p("ul",{class:"subsubmenu","aria-role":"menu","data-menu-title":s.title}
9,s.items.map(l=>p("li",{class:an(["subsubmenu-item"],l),"aria-role":"menuitem"},l.link?p("a",{class:"item-title",href:l.link},l.title):p("div",{class:"item-title"},l.title))))):s.link&&p("a",{class:"item-title",href:s.link},s.title)))),"banner"in o&&d_(o.banner))):o.link?p("a",{href:o.link,class:"item-title"},o.title):p("div",{class:"item-title"},o.title))))}function c_(i){return i&&p(Xo,null,i.title?i.title.link?p("a",{href:i.title.link,class:an(["title-item"],i.title),"aria-haspopup":"menu"},i.title.title):p("div",{class:an(["title-item"],i.title)},i.title.title):p(Xo,null),Ah(i.menu,{hasTitle:!!i.title}))}async function Mh(){Ss||=Fh();let i=await Ss;if(i)return Ah(i.mainMenu,{homeLink:i.siteRoot??""})}async function Ph(){Ss||=Fh();let i=await Ss;if(i?.secondaryMenu)return c_(i.secondaryMenu)}function p_(){let i=document.querySelector(".header-menu .menubar > li:not(.home)")?.getBoundingClientRect().left??0,e=document.querySelector(".header-menu .menubar > li:last-of-type")?.getBoundingClientRect().right??0,t=document.querySelector(".header-dest .title-item, .header-dest .menubar > li")?.getBoundingClientRect().left??0,o=document.querySelector(".header-dest .menubar > li:last-of-type")?.getBoundingClientRect().right??0;return t&&o?Math.max(e-i,o-t):e-i}var ja=class{numMenus=-1;seenMenus=0;menuWidth=0;mobile;constructor(){K(()=>{this.numMenus=document.querySelectorAll("#header-main-menu-container, #header-secondary-menu-container").length,this.initMediaQuery()})}addMenuWidth(e){this.menuWidth=Math.max(this.menuWidth,e),++this.seenMenus,this.initMediaQuery()}switchToMobile(){this.mobile=!0,this.updateMobile()}initMediaQuery(){if(this.numMenus>=0&&this.seenMenus===this.numMenus)if(this.menuWidth>l_)this.switchToMobile();else{let e=matchMedia(`screen and (width <= ${Sh(this.menuWidth)}px)`);e.addEventListener("change",t=>this.onMediaQueryChange(t)),this.onMediaQueryChange(e)}}onMediaQueryChange(e){e.matches!==this.mobile&&(this.mobile=e.matches,this.updateMobile())}updateMobile(){document.documentElement.classList.contains("compactmenu")!==this.mobile&&(document.documentElement.classList.remove("compactmenu--transition"),document.documentElement.classList.toggle("compactmenu",this.mobile),this.mobile&&setTimeout(()=>document.documentElement.classList.add("compactmenu--transition"),100)),F(document.documentElement,"ws2026:mobile-menu-switch",{bubbles:!1,cancelable:!1,detail:{mobile:this.mobile}})}},Ch=new ja,Ra=class extends lo{toggleNode;backLinkNode;firstMenuItem;constructor(e){super(e.closest(".menu-mobile")||e,{scrollNode:e}),this.toggleNode=e.closest("nav")?.querySelector(".menu-open, .title-item"),this.backLinkNode=e.closest("nav")?.querySelector(".menu-back"),this.menuNode.addEventListener("transitionend",()=>this.maybeCloseAllMenus()),this.toggleNode&&(this.firstMenuItem=this.menuNode.querySelector(this.menuItemSelector),this.firstMenuItem&&("checked"in this.toggleNode?pe(this.toggleNode,"change",()=>{this.openCurrentSubitem()||this.firstMenuItem.focus()}):pe(this.toggleNode,"click",t=>{this.horizontal||(this.toggleSecondaryMenu(),V(t))}),pe(this.toggleNode,"keydown",t=>this.onKeyDown(t)),this.backLinkNode&&pe(this.backLinkNode,"click",t=>this.levelUp(t))),this.backLinkNode&&new MutationObserver(t=>this.onClassChange(t)).observe(e,{attributeFilter:["class"],attributeOldValue:!0,subtree:!0})),document.documentElement.addEventListener("ws2026:mobile-menu-switch",t=>this.onMobileMenuSwitch(t)),document.documentElement.classList.contains("compactmenu--fixed")?Ch.switchToMobile():Ch.addMenuWidth(p_())}toggleSecondaryMenu(e){if(!this.toggleNode)return;this.toggleNode.classList.toggle("opened",e)?this.openCurrentSubitem():e!==!1&&this.closeAllMenus();let t=this.toggleNode.classList.contains("opened");return this.toggleNode.setAttribute("aria-expanded",t?"true":"false"),this.menuActive=t||this.menuNode.querySelectorAll(".opened").length>0,t}openCurrentSubitem(){let e=this.menuNode.querySelectorAll(".current");for(let t of e)t.classList.contains("subitems")?(t.classList.toggle("opened",!0),t.ariaHasPopup==="menu"&&t.setAttribute("aria-expanded",t.classList.contains("opened")?"true":"false")):t.querySelector(this.menuItemSelector)?.focus();return e.length>0}onMobileMenuSwitch(e){e.detail.mobile===this.horizontal&&(this.horizontal=!e.detail.mobile,this.toggleNode&&("checked"in this.toggleNode?this.toggleNode.checked=!1:this.toggleNode.tabIndex=this.horizontal?-1:0))}onMouseDown(e){this.toggleNode?.contains(e.target)&&(!("checked"in this.toggleNode)||this.toggleNode.checked)||super.onMouseDown(e)}onClick(e){if(this.toggleNode?.contains(e.target)&&!this.horizontal)e.preventDefault();else if(e.target.closest(".menu-banner"))return;super.onClick(e)}
9onKeyDown(e){if(this.toggleNode&&!this.horizontal&&e.key==="Escape"){let t=e.target.closest("[aria-role=menuitem]");if(t&&!t.parentElement.closest("[aria-role=menuitem]")){"checked"in this.toggleNode?this.toggleNode.checked=!1:this.closeAllMenus(),this.toggleNode.focus(),V(e);return}}if(this.toggleNode?.isSameNode(e.target)){e.key==="Enter"&&("checked"in this.toggleNode?this.toggleNode.click():(this.toggleSecondaryMenu()&&!this.openCurrentSubitem()&&this.firstMenuItem&&this.firstMenuItem.focus(),V(e))),e.key==="Escape"&&this.toggleNode.blur();return}if(e.target.closest(".menu-close")){["Enter"," "].includes(e.key)&&(this.toggleNode.click(),this.toggleNode.focus(),V(e));return}if(e.target.closest(".menu-back")){this.levelUp(e);return}super.onKeyDown(e)}onClassChange(e){let t;for(let o of e){let n=new Set(o.oldValue?.split(" ")??[]),s=new Set(o.target.classList.values()),r=o.target.closest("ul");if(!n.has("opened")&&s.has("opened")){if(t=r,this.horizontal&&o.target.classList.contains("menu-item")){let l=o.target.querySelector(".subitems.current");l&&l.classList.add("opened")}}else n.has("opened")&&!s.has("opened")&&(t=r?.parentElement?.closest("ul"))}this.backLinkNode.hidden=!t,t!==void 0&&(this.backLinkNode.textContent=t?.dataset.menuTitle??"",this.backLinkNode.tabIndex=this.backLinkNode.textContent?0:-1)}levelUp(e){let t=[...this.menuNode.querySelectorAll(".opened")].at(-1);t&&(V(e),this.toggleMenu(t,!1),"key"in e&&t.querySelector(this.menuItemSelector)?.focus())}maybeCloseAllMenus(){!this.horizontal&&this.toggleNode&&"checked"in this.toggleNode&&!this.toggleNode.checked&&this.closeAllMenus()}closeAllMenus(){super.closeAllMenus(),this.toggleSecondaryMenu(!1)}};x(".menubar",i=>new Ra(i));M();var h_=60,Ls=null,qa=null;K(m_);window.addEventListener("focusout",u_);function u_(){Ls&&(Ls.removeAttribute("tabindex"),qa&&(qa.style.scrollMarginTop=""),Ls=null)}function m_(){let i=document.querySelector(".skiplinksbutton");i&&i.addEventListener("click",g_)}function g_(i){i.preventDefault();let e=document.querySelector("main"),t=document.querySelector(".contentpart__header"),o=document.querySelector(".contentpart__header-messagesarea"),n=document.querySelector(".headercta"),s=document.querySelector(".contentpart__title-background"),r=document.querySelector(".contentpart__title-container");o&&o.clientHeight===0&&(o=null);let l=o??n??s??r,a=t,d=null;l?(a=t,d=l):(d=e,a=e),a&&!a.hasAttribute("tabindex")&&a.setAttribute("tabindex","-1"),console.log("Set focus to",a),console.log("Scroll to",d);try{a?.focus({preventScroll:!0})}catch{a?.focus()}Ls=a,qa=d;let c=document.querySelector(".contentpart__navbar-container"),h=c?getComputedStyle(c).getPropertyValue("--navbar-position").trim():"",m=0;h==="sticky"&&(m=c.clientHeight),d&&(d.style.scrollMarginTop=m+h_+"px",d.scrollIntoView({behavior:"smooth"}))}var Cs=ee("utwente_design:universe",{allowMissing:!0})?.elements,Da=class{node;constructor(e){this.node=e,!A.unh&&!document.documentElement.classList.contains("ws2016--iframed")&&this.init().catch(t=>console.error(t))}
9async init(){let e=await this.loadElement(this.node.dataset.universeElement);if(e){let t=document.importNode(e.svg,!0);this.node.prepend(p("div",{class:"header-universe"},p("div",{class:"header-universe-container"},t)))}}async loadElement(e){if(e==="-none-")return;let t;if(e&&(t=Cs?.find(o=>o.filename===e)),!t&&Cs?.length){let o=Cs.length>1?Pe("ucs-element"):"";t=Nc(Cs.filter(n=>n.filename!==o)??[])[0]}if(t){ze("ucs-element",t.filename);let o=await fetch(`/.wh/mod/utwente_base/public/img/elements/${t.filename}`);if(o.ok){let n=await o.text(),s=new DOMParser().parseFromString(n,"text/xml");s.documentElement.classList.add("header-universe-element");let r=ee("utwente_design:theme"),l=[];if(r.gradientColor||r.colorScheme.length===1)s.documentElement.setAttribute("fill",r.gradientColor??r.colorScheme[0]);else{let a=s.documentElement.namespaceURI,d=s.createElementNS(a,"radialGradient");d.id="themeGradient";let c=s.createElementNS(a,"stop");c.setAttribute("offset","20%"),c.setAttribute("stop-color","var(--gradient-color-from)");let h=s.createElementNS(a,"stop");h.setAttribute("offset","100%"),h.setAttribute("stop-color","var(--gradient-color-to)"),d.append(c,h),l.push(d),s.documentElement.setAttribute("fill",'url("#themeGradient")')}return s.getElementsByTagName("defs")[0].replaceChildren(...l),{...t,svg:s.documentElement}}}}};x("*[data-universe-element]",i=>new Da(i));x("#header-main-menu-container",i=>{let e=G();Mh().then(t=>{t&&(i.append(t),we())}).catch(t=>console.error(t)).finally(()=>e.release())});x("#header-secondary-menu-container",i=>{let e=G();Ph().then(t=>{t&&(i.append(t),we())}).catch(t=>console.error(t)).finally(()=>e.release())});x(".breadcrumbs",i=>new Es(i));M();x(".page-footer__foldtitle",i=>{i.addEventListener("click",()=>i.classList.toggle("page-footer__foldtitle--open"))});M();x(".js-psa-chatbot",i=>{let e=ts("/repository/utwente-data/psa/css/chat.css"),t=(async()=>{await new Promise(r=>K(r)),await $t("/repository/utwente-data/psa/build/autocomplete.js"),await $t("/repository/utwente-data/psa/build/require.js"),await e;let o=globalThis.require;o.config({baseUrl:"/repository/utwente-data/psa/build",paths:{App:"build/app"}});let n=await new Promise(r=>o(["app"],l=>r(l)));await new Promise(r=>o(["autocomplete"],l=>r(l)));let s=new n.ApplicationAssistant;return s.init(),s})();i.addEventListener("click",o=>{o.preventDefault(),t.then(n=>n.showChat(!0))})});M();x("[data-overflow-placeholder]",i=>{i.replaceChildren(p("span",{class:"op-placeholder","aria-hidden":"true"},i.dataset.overflowPlaceholder),p("span",{class:"op-spacer","aria-hidden":"true"},"\xA0"),p("span",{class:"op-value",style:`background-color: ${i.dataset.overflowBackground||"white"};`},i.textContent))});M();function jh(i){return i?.activeElement||null}function f_(){let i=window;for(;i.frameElement;)i=i.parent;return i}function Rh(i){return i&&i?.matches?.("iframe")?i:null}function ln(i){try{let e=jh(f_().document);for(;;){let t=Rh(e);if(t&&(!i||t.ownerDocument!==i))e=jh(t.contentDocument);else break}return e&&i&&e.ownerDocument!==i?null:e}catch{return null}}function Ia(i,{ignoreInertAttribute:e=!1}={}){return!i.closest||!e&&i.closest("[inert]")?!1:i.contentEditable==="true"||i.shadowRoot?.delegatesFocus?!0:i.tabIndex>=0&&!i.disabled&&!(i.tagName==="A"&&!i.href)}function qi(i,e){typeof e!="object"&&(e={recurseFrames:e});let t=[];if(!i)return t;for(let o of i.children){let n=getComputedStyle(o);if(!n||n.display==="none"||n.visibility==="hidden")continue;let s;if(e?.recurseFrames&&(s=Rh(o)))try{let l=qi(s.contentDocument.documentElement,e);l.length&&(t=t.concat(l))}catch{}else Ia(o,e)&&t.push(o);if(o.isContentEditable)continue;let r=qi(o,e);r.length&&(t=t.concat(r))}return t}var qh={},Dh={};function __(i,e,t){let o=e.split(":"),n=o.length===1;if(o.length>2){console.error(`Illegal merge expression: '${e}'`,i);return}let s="",r=(n?o[0]:o[1]).trim(),l=r.split("(");if(l.length>1){if(l.length!==2){console.error(`Illegal merge value: '${e}'`,i);return}s=l[0].trim();let c=l[1].split(")");if(c.length!==2||c[1]!==""){console.error(`Illegal merge value: '${e}'`,i);return}r=c[0].trim()}let a=t;if(r!=="*"){let c=r.split(".");for(let h=0;h<c.length;++h)if(a=a[c[h].trim()],typeof a>"u")return}if(n){s&&Dh[s]?Dh[s](i,a):console.error(s?`Unknown updating function '${s}' in '${e}'`:`A function is required for merges without a property (in '${e}')`,i);return}let d=o[0].trim();if(s)if(qh[s])a=qh[s](a);else{console.error(`Unknown formatting function '${s}' in '${e}'`,i);return}if(typeof a!="string"&&typeof a!="number"){console.error(`Got a value of type ${typeof a} in '${e}'`,i);return}switch(d){case"events":case"styles":case"children":case"on":case"className":case"class":case"style":case"dataset":case"childNodes":{console.error(`Cannot modify '${d}' with merge`,i);return}default:{i[d]=a;return}}}async function po(i,e,{filter:t}={}){let o=i.querySelectorAll("*[data-merge],*[data-wh-merge]");for(let n of Array.from(o)){if(n.nodeType!==1||t&&!t(n))continue;let s=(n.dataset.merge||n.dataset.whMerge)?.split(";");if(s)for(let r of s)__(n,r,e)}}M();M();N();N();function Ih(i){return i.getFullYear()+"-"+("0"+(i.getMonth()+1)).slice(-2)+"-"+("0"+i.getDate()).slice(-2)}M();ie();re();os();var Ha;async function zh(i,e={}){Ha||(Ha=new Map);let t=Zn({address:i,options:e},{stable:!0});
9return await Fi(Ha,t,{insert:()=>Dt().verifyAddress(location.pathname,i,e)})}M();ie();te();M();var Ct=class extends HTMLElement{static formAssociated=!0;static observedAttributes=["required","disabled"];constructor(){super()}get name(){return this.getAttribute("name")||""}set name(e){this.setAttribute("name",e)}get required(){return this.hasAttribute("required")}set required(e){e?this.setAttribute("required",""):this.removeAttribute("required"),this.refreshState()}get disabled(){return this.hasAttribute("disabled")}set disabled(e){e?this.setAttribute("disabled",""):this.removeAttribute("disabled"),this.refreshState()}refreshState(){}attributeChangedCallback(e,t,o){["disabled","required"].includes(e)&&this.refreshState()}};re();var Fs="[name]:not(button):not(a):not(output)";function v_(i){return ot(i)&&i.tagName==="INPUT"}function cn(i){return Si(i)||i instanceof Ct}function Nh(i){return v_(i)&&["radio","checkbox"].includes(i.type)}function Oa(i){return i instanceof RadioNodeList}function Ft(i){return i.dataset.whFormName||i.name||""}function Hh(i,e){if(i.dataset.whFormName!==void 0)i.dataset.whFormName=e;else if(i.name!==void 0)i.name=e;else throw new Error("Cannot set name on field without existing name")}function mi(i){return Oa(i)?`radiogroup '${i.item(0)?.name||i.item(0)?.id||"<unnamed>"}'`:Si(i)?`native field '${i.name||i.id||"<unnamed>"}'`:i.dataset.whFormName?`custom field '${i.dataset.whFormName||i.id||"<unnamed>"}'`:i.classList.contains("wh-form__fieldgroup")?`field group '${i.dataset.whFormGroupFor||i.id||"<unnamed>"}'`:`${i.tagName} element '${i.id||"<unnamed>"}'`}function Oh(i){for(let e of w(i,"wh-fileedit")){let t=document.createElement("input");t.type="file";for(let o of e.attributes)t.setAttribute(o.name,o.value);e.replaceWith(t)}}function x_(i){let e=i.validity;if(e.customError&&i.validationMessage)return i.validationMessage;if(e.valueMissing)return v("publisher:site.forms.commonerrors.required");if(i instanceof HTMLInputElement){if(e.rangeOverflow){let t=i.type==="date"?dn(i.max):i.max;return v("publisher:site.forms.commonerrors.max",t)}if(e.rangeUnderflow){let t=i.type==="date"?dn(i.min):i.min;return v("publisher:site.forms.commonerrors.min",t)}if(e.tooShort)return v("publisher:site.forms.commonerrors.minlength",i.minLength);if(e.tooLong)return v("publisher:site.forms.commonerrors.maxlength",i.maxLength);if(e.stepMismatch)return!i.step||parseInt(i.step)===1?v("publisher:site.forms.commonerrors.step1mismatch"):v("publisher:site.forms.commonerrors.stepmismatch",i.step)}if(e.badInput)return v("publisher:site.forms.commonerrors.default");if(e.typeMismatch&&["email","url","number"].includes(i.type))return v("publisher:site.forms.commonerrors."+i.type);for(let t of["badInput","customError","patternMismatch","rangeOverflow","rangeUnderflow","stepMismatch","typeMismatch","valueMissing"])if(e[t])return t;return"?"}function Ua(i){return Si(i)&&!i.hasAttribute("data-wh-form-skipnativevalidation")&&!i.checkValidity()}function Wa(i){return Ua(i)?x_(i):null}function pn(i){return JSON.parse(i).c}function hn(i,e){let t=i.closest("form");if(!t)throw new Error("No form found for element");let o=w(i,Fs).filter(n=>!("form"in n)||n.form===t);return e?o.filter(n=>Ft(n).startsWith(e+".")):o}function Va(i,{allowMissing:e=!1}={}){return i.propWhFormhandler||(e?null:ue("No form handler found for form"))}function y_(i){let e=i.closest(".wh-form__fieldgroup")||i;i.propWhCleanupFunction=()=>{e.removeEventListener("change",i.propWhCleanupFunction,!0),e.removeEventListener("input",i.propWhCleanupFunction,!0),e.removeEventListener("blur",i.propWhCleanupFunction,!0),_e(i,"",{serverside:!0}),i.propWhCleanupFunction=void 0},e.addEventListener("change",i.propWhCleanupFunction,!0),e.addEventListener("input",i.propWhCleanupFunction,!0),i.closest("form[novalidate]")||e.addEventListener("blur",i.propWhCleanupFunction,!0)}var Ba=class{el;explicit=null;dynamicError=null;validators=[];constructor(e){this.el=e}getState(){let e=this.getError();return e?{error:e}:this.el.propWhValidationSuggestion?{suggested:this.el.propWhValidationSuggestion}:null}getError(){return this.explicit?.error||this.dynamicError||Wa(this.el)||null}hasError(){return!!this.getError()}},Uh=new WeakMap;function gi(i){let e=Uh.get(i);if(e)return e;let t=new Ba(i);return Uh.set(i,t),t}function _e(i,e,t){if(!ot(i))throw new Error("Field is not a valid target for handling errors");let o=gi(i);if(e)A.fhv&&console.log(`[fhv] ${o.explicit?"Updating":"Setting"} error state for ${mi(i)}`,i,e,t),o.explicit={error:e,serverside:t?.serverside||!1,reportimmediately:t?.reportimmediately||!1,metadata:t?.metadata},t?.serverside&&y_(i);else{if(!o.explicit)return;o.explicit=null,A.fhv&&console.log(`[fhv] Clearing error state for ${mi(i)}`,i,e,t)}$a(i)}function $a(i){let e=gi(i);F(i,"wh:form-setfielderror",{bubbles:!0,cancelable:!0,detail:{error:e.explicit?.error||Wa(i)||"",reportimmediately:e.explicit?.reportimmediately||!1,serverside:e.explicit?.serverside||!1,metadata:e.explicit?.metadata}})}
9function De(i,e){gi(i).validators.push(e),i.dataset.whFormCustomValidator=((i.dataset.whFormCustomValidator||"")+" "+(e.name||"?")).trim()}re();var As=class{node;fieldgroup;pos;constructor(e,t){this.node=e,this.pos=t,this.fieldgroup=e.closest(".wh-form__fieldgroup")??ue("Could not find fieldgroup for field")}},un=class{numvaliditycalls=0;node;formnode;countryNode;currentcountry;fieldName;orderingData;allFields=new Map;_updatingFields=!1;constructor(e){if(this.node=e,this.formnode=e.closest("form")??ue("Could not find form for addressfield"),this.countryNode=L(this.node,"select.wh-form__pulldown"),!this.countryNode)throw new Error("Could not find country select node");if(!this.countryNode.dataset.orderingdata)throw new Error("Addressfield not properly configured");this.currentcountry=this.countryNode.value,this.fieldName=this.countryNode.name.substr(0,this.countryNode.name.lastIndexOf(".")),this.orderingData=JSON.parse(this.countryNode.dataset.orderingdata);let t=this.fieldName.length+1;this.allFields=new Map;let o=0;this.allFields.set(this.countryNode.name.substr(t),new As(this.countryNode,++o));for(let n of w(this.formnode,`[name^='${this.fieldName}.']`))this.allFields.set(n.name.substring(t),new As(n,++o)),n.addEventListener("change",s=>this._gotFieldChange(s));this.orderingData&&(this.countryNode.addEventListener("change",()=>this._reconfigureFieldOrdering()),this._reconfigureFieldOrdering())}_gotFieldChange(e){this._updatingFields||(e.target===this.countryNode&&this.currentcountry!==this.countryNode.value&&(this._clearErrors(),this.currentcountry=this.countryNode.value),!(this._getFieldValue("country")==="NL"&&(!this._getFieldValue("zip")||!this._getFieldValue("nr_detail")))&&this._checkValidity(e))}_getFieldValue(e){let t=this.allFields.get(e);return t?t.node.value:""}_getFirstCountrySpecificField(){let e=null;for(let[t,o]of this.allFields.entries())t!=="country"&&!o.fieldgroup.classList.contains("wh-form__fieldgroup--hidden")&&(!e||e.pos>o.pos)&&(e=o);return e??ue("Cannot find field for error")}_reconfigureFieldOrdering(){let e=this.countryNode.value;if(e){let t=this.orderingData.find(o=>o.countries.length===0||o.countries.includes(e));if(t){let o;for(let n=0;n<t.fieldorder.length;++n){let s=this.allFields.get(t.fieldorder[n]);if(!s)continue;s.pos=n+1;let r=s.fieldgroup;o&&o.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_PRECEDING&&o.parentNode.insertBefore(r,o.nextSibling),o=r}}}for(let t of["street","city"]){let o=this.allFields.get(t);o&&(e.toUpperCase()==="NL"?o.node.setAttribute("data-wh-form-skipnativevalidation",""):o.node.removeAttribute("data-wh-form-skipnativevalidation"))}}_clearErrors(){this.allFields.forEach(e=>_e(e.node,"",{reportimmediately:!0}))}_getCurState(){let e={country:""},t=[],o=!1,n=!0;return this.allFields.forEach((s,r)=>{s.fieldgroup.classList.contains("wh-form__fieldgroup--hidden")||(t.push(s.node.closest(".wh-form__fieldgroup")),e[r]=s.node.value,!o&&r!=="country"&&s.node.value&&(o=!0),s.node.required&&!s.node.value&&!s.node.hasAttribute("data-wh-form-skipnativevalidation")&&(n=!1))}),{value:e,visiblefields:t,anyset:o,allrequiredset:n,lookupkey:JSON.stringify(e)}}async _checkValidity(e){let t=et.getForNode(this.formnode)??ue("Parent form for address field not yet initialized"),o=this._getCurState();if(!o.anyset){this._clearErrors();return}if(!o.allrequiredset)return;let n,s=G();try{o.visiblefields.forEach(r=>r.classList.add("wh-form__fieldgroup--addresslookup")),++this.numvaliditycalls,n=await zh(o.value,{lang:t.getLangCode(),checks:this.node.dataset.checks?.split(" ")??[]})}catch(r){console.error(`Error while validating value: ${r}`);return}finally{--this.numvaliditycalls===0&&o.visiblefields.forEach(r=>r.classList.remove("wh-form__fieldgroup--addresslookup")),s.release()}if(this._getCurState().lookupkey===o.lookupkey){A.fhv&&console.log(`[fhv] Validation result for address '${this.fieldName}': ${n.status}`),A.fdv&&(["different_citystreet","incomplete"].includes(n.status)?console.warn(`[fdv] Address validation was performed, processing incomplete address (status: '${n.status}')`):(console.warn(`[fdv] Ignoring return status '${n.status}' of address validation`),n.status="ok")),this._clearErrors();for(let r of n.errors){let l=this.allFields.get(r.fields[0])??this._getFirstCountrySpecificField();l&&t.setFieldError(l.node,r.message,{reportimmediately:!0})}if(n.corrections){let r=!1;this._updatingFields=!0;for(let[l,a]of Object.entries(n.corrections)){let d=this.allFields.get(l);d&&d.node.value!==a&&($e(d.node,a),r=!0)}this._updatingFields=!1,r&&t.refreshConditions()}}}};te();re();function Wh(i,e,t,o){if(!Bo(e,t,o,{minYear:1}))return"";let n="";for(let s of i.split(""))switch(s.toUpperCase()){case"Y":n+=("000"+e).slice(-4);break;case"M":n+=("0"+t).slice(-2);break;case"D":n+=("0"+o).slice(-2);break;default:n+=s;break}return n}function Vh(i,e,t){if(!e)return null;let n=e.replace(/[./]/g,"-").split("-");if(n.length===3){i=i.toLowerCase();let s=i.indexOf("d"),r=i.indexOf("m"),l=i.indexOf("y"),a=0+(s>r?1:0)+(s>l?1:0),d=0+(r>s?1:0)+(r>l?1:0),c=0+(l>s?1:0)+(l>r?1:0),h=parseInt(n[a],0),m=parseInt(n[d],0),u=parseInt(n[c],0);if(Bo(u,m,h))return{year:u,month:m,day:h}}if(t&&t.nofail)return null;throw new Error(`Invalid date value: '${e}'`)}
9function Ms(i,e){return Vh("y-m-d",i,e)}re();function k_(i){let e=w(i,"input[type='checkbox']"),t=Number(i.dataset.whMin)||0,o=Number(i.dataset.whMax)||0,n=e.some(r=>!r.disabled),s=e.filter(r=>r.checked).length;if(n){if(s<t)return v("publisher:site.forms.commonerrors.mincheck",t);if(o>0&&s>o)return v("publisher:site.forms.commonerrors.maxcheck",o)}}function T_(i){let e=w(i,"input[type='radio']");if(e.some(o=>o.required)&&!e.some(n=>n.checked&&!n.disabled))return v("publisher:site.forms.commonerrors.required")}function dn(i){let e=Ms(i);return e?Wh("D-M-Y",e.year,e.month,e.day):""}function E_(i){if(i.getAttribute("type")!=="date"||!i.value)return"";let e=i.value.match(/^([0-9]+)-([0-9]+)-([0-9]+)$/)||[],t=parseInt(e[1]),o=parseInt(e[2]),n=parseInt(e[3]);if(!Bo(t,o,n))return v("publisher:site.forms.commonerrors.default");let s=("0000"+t).substr(-4)+"-"+("00"+o).substr(-2)+"-"+("00"+n).substr(-2),r=i.getAttribute("min"),l=i.getAttribute("max");return r&&s<r?v("publisher:site.forms.commonerrors.min",dn(r)):l&&s>l?v("publisher:site.forms.commonerrors.max",dn(l)):""}function S_(i){if(i.getAttribute("type")!=="time"||!i.value)return"";let e=i.value.match(/^([0-9]+):([0-9]+)(:([0-9]+))?$/)||[],t=parseInt(e[1]),o=parseInt(e[2]),n=parseInt(e[3]);return isNaN(t)||isNaN(o)||t<0||t>23||o<0||o>59||!isNaN(n)&&(n<0||n>59)?v("publisher:site.forms.commonerrors.default"):""}function Ps(i){for(let e of w(i,"input[type=date]")){for(let t of["whMin","whMax","whValue"])if(e.dataset[t]){let o=e.dataset[t].match(/^now((\+|-)\d+d)?$/);if(o){let n=t.substr(2).toLowerCase(),s;o[1]?s=new Date(Date.now()+parseInt(o[1])*86400*1e3):s=new Date,e[n]=Ih(s)}}e.type!=="date"&&!e.whValidationPolyfilled&&(e.whValidationPolyfilled=!0,De(e,E_))}for(let e of w(i,"input[type=time][data-wh-value]")){if(e.dataset.whValue.match(/^now$/)){let o=new Date,n=("0"+o.getHours()).substr(-2)+"-"+("0"+o.getMinutes()).substr(-2);parseInt(e.getAttribute("step")||"0")%60&&(n+="-"+("0"+o.getSeconds()).substr(-2)),e.value=n}e.type!=="time"&&!e.whValidationPolyfilled&&(e.whValidationPolyfilled=!0,De(e,S_))}for(let e of w(i,".wh-form__fieldgroup--checkboxgroup"))De(e,k_);for(let e of w(i,".wh-form__fieldgroup--radiogroup"))De(e,T_),w(e,"input[type='radio']").forEach(t=>t.dataset.whFormSkipnativevalidation="true");for(let e of w(i,".wh-form__fieldgroup--addressfield"))new un(e)}re();ie();var Nt=Symbol("RegisteredField");te();re();M();function Ya(i,e,t){switch(e.matchtype){case"AND":case"OR":{let o=!1;for(let n of e.conditions)o=Ya(i,n,t)||o;return o}case"NOT":return Ya(i,e.condition,t);default:{let o=t.get(e.field);if(o&&i.querySelector(`[name="${o}"]`))return e.field=o,!0}}return!1}var mn=class{valueNode;nextrowid=0;template;insertPoint;arrayBaseName;handler;node;name;constructor(e,t,o,n){if(this.handler=e,this.node=t,this.name=n,this.arrayBaseName=t.dataset.whFormGroupFor||ue("Missing array base name"),this.template=T(t,"template")||ue("Missing array template"),this.insertPoint=this.template.parentNode.lastElementChild,!this.insertPoint.matches(".wh-form__arrayadd"))throw new Error("Missing array insert point");this.insertPoint.addEventListener("click",s=>this.onAddRow(s)),pe(t,"click",s=>this._onClick(s)),this.valueNode=T(t,"input.wh-form__arrayinput")??ue("Missing array input"),this.valueNode.whUseFormGetValue=!0,this.valueNode.addEventListener("wh:form-getvalue",s=>this._onGetValue(s)),this.valueNode.addEventListener("wh:form-setvalue",s=>this._onSetValue(s));for(let s of w(this.node,".wh-form__arrayrow"))this._fixupRowNode(s);this._checkValidity()}get form(){let e=Va(this.node.closest("form")??ue("Could not find <form>"))??ue("Could not find form for arrayfield");if(!e._getFieldsToValidate)throw new Error("The <form> is not ready yet");return e}addRow(){let e=this.template.content.cloneNode(!0);e.firstElementChild.dataset.whFormRowid=String(this.nextrowid++),this.insertPoint.parentNode.insertBefore(e,this.insertPoint);let t=this.insertPoint.previousElementSibling;return we(t),Ps(t),this._fixupRowNode(t),this._checkValidity(),this.form.__scheduleUpdateConditions(),this.insertPoint.previousSibling}onAddRow(e){V(e),this.addRow()}_onClick(e){let t=e.target.closest(".wh-form__arraydelete");t&&(e.preventDefault(),this._removeRowNode(t.closest(".wh-form__arrayrow")))}getRowHandler(e){let t=this.valueNode.name+"."+e.dataset.whFormRowid,o=hn(e,t).filter(n=>n.dataset.whFormCellname!=="row_uid");return new ho(this.handler,t,o)}getValue(){let e=[];for(let t of w(this.node,".wh-form__arrayrow").filter(o=>o.parentNode===this.template.parentNode)){let n=this.getRowHandler(t).getValue();e.push(n)}return e}_onGetValue(e){e.preventDefault(),e.stopPropagation();let t=[];for(let o of w(this.node,".wh-form__arrayrow").filter(n=>n.parentNode===this.template.parentNode)){let n=this._queryAllFields(o),s=n.map(r=>this.form._getQueryiedFieldValue(r));
9t.push(Promise.all(s).then(r=>{let l={formrowid:o.dataset.whFormRowid};return r.forEach((a,d)=>{let c=n[d],h=c.multi?c.nodes[0]:c.node;l[h.dataset.whFormCellname]=a}),l}))}Promise.all(t).then(o=>e.detail.deferred.resolve(o))}setValue(e){if(!Array.isArray(e))throw new Error(`Invalid value for array field '${this.name}': ${JSON.stringify(e)}`);for(;this.insertPoint.previousElementSibling?.classList.contains("wh-form__arrayrow");)this._removeRowNode(this.insertPoint.previousElementSibling);for(let t of e){let o=this.addRow();this.getRowHandler(o).setValue(t)}this._checkValidity()}_onSetValue(e){for(e.preventDefault(),e.stopPropagation();this.insertPoint.previousElementSibling?.classList.contains("wh-form__arrayrow");)this._removeRowNode(this.insertPoint.previousElementSibling);if(Array.isArray(e.detail.value))for(let t of e.detail.value){let o=this.addRow();for(let n of this._queryAllFields(o))for(let s of n.multi?n.nodes:[n.node])s.dataset.whFormCellname&&s.dataset.whFormCellname in t&&this.form.setFieldValue(s,t[s.dataset.whFormCellname])}this._checkValidity()}_fixupRowNode(e){let t=e.dataset.whFormRowid,o=new Map;for(let n of hn(e,this.arrayBaseName)){let s=n.closest(".wh-form__fieldgroup--array");if(s&&s!==this.node&&!(n.matches(".wh-form__arrayinput")&&s.parentNode.closest(".wh-form__fieldgroup--array")===this.node))continue;let r=Ft(n);n.dataset.whFormCellname||=r.substring(this.arrayBaseName.length+1);let l=n.dataset.whFormCellname,a=this.valueNode.name+"."+t+"."+l;if(Hh(n,a),o.set(r,a),n.id){let d=w(e,`label[for="${n.id}"]`);n.id+="-"+t;for(let c of d)c.htmlFor=n.id}for(let d of["visible","enabled","required"])for(let c of w(e,`[data-wh-form-${d}-if]`)){let h=pn(c.dataset[`whForm${d[0].toUpperCase()+d.slice(1)}If`]);Ya(e,h,o)&&(c.dataset[`whForm${d[0].toUpperCase()+d.slice(1)}If`]=JSON.stringify({c:h}))}}this.getRowHandler(e)}_removeRowNode(e){e.remove(),this._checkValidity()}_checkValidity(){let e=parseInt(this.valueNode.dataset.whMin||"0"),t=parseInt(this.valueNode.dataset.whMax||"0"),o=this.node.querySelectorAll(".wh-form__arrayrow").length;o<e?this.valueNode.setCustomValidity(v("publisher:site.forms.commonerrors.minarray",e)):t>0&&o>t?this.valueNode.setCustomValidity(v("publisher:site.forms.commonerrors.maxarray",t)):this.valueNode.setCustomValidity(""),t>0&&o>=t?this.node.classList.add("wh-form__array--maxrows"):this.node.classList.remove("wh-form__array--maxrows")}_queryAllFields(e){return this.form._queryAllFields({startnode:e,skipfield:this.valueNode})}};re();function C_(i){return i.startsWith("__formfield")?i:qc(i)}function Xa(i){return i.startsWith("__formfield")?i:Rc(i)}function js(i,e){switch(i){case"number":return parseFloat(e);case"boolean":return e==="true";case"date":return new Date(e)}}function tl(i,e,t){switch(i){case null:if(typeof e!="string")throw new Error(`Invalid type ${typeof e} for string field ${t}: ${e}`);return e;case"number":if(typeof e!="number")throw new Error(`Invalid type ${typeof e} for number field ${t}: ${e}`);return String(e);case"boolean":if(typeof e!="boolean")throw new Error(`Invalid type ${typeof e} for boolean field ${t}: ${e}`);return String(e);case"date":if(!Ac(e))throw new Error(`Invalid type ${typeof e} for date field ${t}: ${e}`);return e.toISOString()}}var Ga=class{valuetype;form;field;constructor(e,t){this.form=e,this.field=t,this.valuetype=t.dataset.whFormValueType,!this.valuetype&&t.matches("input[type=number]")&&(this.valuetype="number")}getValue(){if(this.field.matches("input[type=checkbox]"))return this.field.checked;if(this.field.matches("input[type=date]"))return this.field.valueAsDate;if(this.field.tagName==="SELECT"){let e=this.field.selectedOptions[0];return!e||e.dataset.placeholder!==void 0?null:this.valuetype?js(this.valuetype,e.value):e.value}return this.valuetype?js(this.valuetype,this.field.value):this.field.value}setValue(e){if(this.field.matches("input[type=checkbox]")){let t=!!e;if(t===this.field.checked)return;this.field.checked=t}else if(this.field.matches("input[type=date]")){if(this.field?.valueAsDate?.getTime()===e?.getTime())return;this.field.valueAsDate=e}else if(this.field.tagName==="SELECT"&&e===null){let t=this.field.options[0]?.dataset.placeholder!==void 0?0:-1;
9if(this.field.selectedIndex===t)return;this.field.selectedIndex=t}else{let t=this.valuetype?tl(this.valuetype,e,this.field.name):e;if(this.field.value===t)return;this.field.value=t}this.form.__scheduleUpdateConditions()}},Ka=class{valuetype;form;name;rnodes;constructor(e,t,o){this.form=e,this.name=t,this.rnodes=o;let n=o[0].closest(".wh-form__fieldgroup");n?this.valuetype=n.dataset.whFormValueType:(console.error("Missing group for radiofield ",n),console.error('if a radio field does not want to participate in the form, it should set attribute form=""'))}getValue(){let e=this.rnodes.find(t=>t.checked);return e?this.valuetype?js(this.valuetype,e.value):e.value:null}setValue(e){if(e===null){for(let s of this.rnodes)s.checked=!1;this.form.__scheduleUpdateConditions();return}let t=`radio group ${this.name}`,o=tl(this.valuetype,e,t),n=this.rnodes.find(s=>s.value===o);if(!n)throw new Error(`No such value '${o}' in radio group '${this.name}`);n.checked=!0,this.form.__scheduleUpdateConditions()}},Ja=class{valuetype;form;name;cboxes;constructor(e,t,o){this.form=e,this.name=t,this.cboxes=o,this.valuetype=(o[0].closest(".wh-form__fieldgroup")??ue("RadioFormFieldHandler: Missing group")).dataset.whFormValueType}getValue(){return this.cboxes.filter(e=>e.checked).map(e=>this.valuetype?js(this.valuetype,e.value):e.value)}setValue(e){let t=`checkbox group '${this.name}'`;if(!Array.isArray(e))throw new Error(`Value for ${t} should be an array, got '${JSON.stringify(e)}'`);let o=e.map(s=>tl(this.valuetype,s,t));this.cboxes.forEach(s=>s.checked=o.includes(s.value)),this.form.__scheduleUpdateConditions();let n=o.filter(s=>!this.cboxes.some(r=>r.value===s));if(n.length)throw new Error(`Invalid value(s) for ${t}: ${n.join(", ")}`)}},Qa=class{form;field;constructor(e,t){this.form=e,this.field=t}getValue(){return this.field.getValue()}setValue(e){this.field.setValue(e)}},Za=class extends Qa{node;constructor(e,t,o){t[Nt]||=new mn(e,t,o,Ft(o[0])),super(e,t[Nt]),this.node=t}__scheduleUpdateConditions(){this.form.__scheduleUpdateConditions()}},gn=class{fieldmap=new Map;fieldName;constructor(e,t){this.fieldName=e;let o=e?e.length+1:0,n=Map.groupBy(t,s=>Ft(s).substring(o).split(".")[0]);for(let[s,r]of n){let l=(e?e+".":"")+s;if(!s){console.error("There are fields without a name:",r);continue}if(r[0].matches("input[type=radio]")){this.fieldmap.set(s,new Ka(this,l,r));continue}if(r[0].matches(".wh-form__arrayinput")){let d=r[0].closest(".wh-form__fieldgroup--array");if(d){this.fieldmap.set(s,new Za(this,d,r));continue}}if(Ft(r[0])===l){if(r[0].matches("input[type=checkbox]")&&r[0].closest(".wh-form__fieldgroup--checkboxgroup")){this.fieldmap.set(s,new Ja(this,l,r));continue}this.fieldmap.set(s,new Ga(this,r[0]));continue}r[0].matches('select[name$=".country"][data-orderingdata]')?this.fieldmap.set(s,new el(this,l,r)):this.fieldmap.set(s,new ho(this,l,r))}}getField(e,t){let o=C_(e),n=this.fieldmap.get(o);if(n)return n;if(t?.allowMissing)return null;throw new Error(`Field '${e}' not found in this form`)}getFieldNames(){return[...this.fieldmap.keys()].map(Xa)}assign(e,{ignoreUnknownFields:t=!0}={}){for(let[o,n]of Object.entries(e)){let s=this.getField(o,{allowMissing:t});s&&s.setValue(n)}}},ho=class extends gn{form;constructor(e,t,o){super(t,o),this.form=e}getValue(){let e={};for(let[t,o]of this.fieldmap){let n=o.getValue();n!==void 0&&(e[Xa(t)]=n)}return e}setValue(e){if(typeof e!="object"||e===null)throw new Error(`Invalid value for record field '${this.fieldName}': ${e}`);for(let[t,o]of this.fieldmap){let n=Xa(t);n in e&&o.setValue(e[n])}}__scheduleUpdateConditions(){this.form.__scheduleUpdateConditions()}},el=class extends ho{constructor(e,t,o){super(e,t,o)}getValue(){let e=super.getValue();return e?.country?e?.nrDetail!==void 0?{...xt(e,["nrDetail"]),houseNumber:e.nrDetail}:e:null}setValue(e){if(e===null){super.setValue({country:null,city:"",street:"",zip:"",nrDetail:"",state:""});return}super.setValue(e?.houseNumber!==void 0?{...xt(e,["houseNumber"]),nrDetail:e.houseNumber}:e)}},Rs=class{form;constructor(e){this.form=e}get(e,t){let o=typeof t=="string"?this.form.getField(t,{allowMissing:!0}):null;return o?o.getValue():e[t]}set(e,t,o){return this.form.getField(t).setValue(o),!0}ownKeys(e){return this.form.getFieldNames()}getOwnPropertyDescriptor(e,t){return{enumerable:!0,configurable:!0}}};yg();var _n=!1,fn=null,$h;function F_(i){let e=new DocumentFragment;for(let t of i.split(/\r?\n/))e.childNodes.length&&e.appendChild(document.createElement("br")),e.append(t);return e}function A_(i,e){if(typeof e=="number"){if(e<0||e>=i.pages.length)throw new Error(`Cannot navigate to nonexisting page #${e}`);return e}let t=i.pages.indexOf(e);if(t===-1)throw console.error("Cannot find page by element",e),new Error("Cannot find page");return t}function Yh(i){return i.failed.map(e=>Ft(e)||e.dataset.whFormGroupFor||"?").sort().filter((e,t,o)=>o.indexOf(e)===t).join(" ")}function M_(i){return i.matches("input[type=radio],input[type=checkbox]")?i.closest(".wh-form__fieldgroup")?.classList.contains("wh-form__field--everfailed"):i.classList.contains("wh-form__field--everfailed")}function qs(i,e){if((e||fn)&&il(),_n){A.fhv&&console.log("[fhv] doValidation: validations are delayed. now pending: ",i),fn=i;return}let t=i.closest?.("form");if(!t||!t.propWhFormhandler)return;t.propWhFormhandler.validate([i],{focusfailed:!1,iffailedbefore:e})}function P_(){_n&&il(),_n=!0}function il(){if(_n&&(_n=!1,fn)){let i=fn;A.fhv&&console.log("[fhv] releasePendingValidations: ",i),fn=null,qs(i,!1)}}var Gh=null;function j_(i){Gh=i.target,qs(i.target,!1)}function R_(i){i.relatedTarget&&Gh!==i.relatedTarget&&qs(i.relatedTarget,!1)}function Xh(i){qs(i.target,!0)}var et=class extends gn{elements;_formsessionid=jt();_firstinteraction;_submitstart;validationqueue=new Array;_submitter=null;_submittimeout;isInteractive=!0;didLegacyWarning=!1;inSubmit=!1;exitButtonNavigateTo;#e="";data=new Proxy({},new Rs(this));node;
9constructor(e){if(e.nodeName!=="FORM")throw new Error("Specified node is not a <form>");if(super("",hn(e,"")),this.node=e,this.elements=e.elements,this.node.propWhFormhandler)throw new Error("Specified node already has an attached form handler");this.node.propWhFormhandler=this,$h||($h=!0,window.addEventListener("mouseup",il,!0),window.addEventListener("focusin",R_,!0)),Ps(this.node),pe(this.node,"click",o=>this._checkClick(o)),pe(this.node,"dompack:takefocus",o=>this._onTakeFocus(o)),pe(this.node,"input",o=>this._onInputChange(),{capture:!0}),pe(this.node,"change",o=>this._onInputChange(),{capture:!0}),pe(this.node,"submit",o=>this._submit(o,null)),pe(this.node,"wh:form-dosubmit",o=>{throw new Error("wh:form-dosubmit is no longer supported")}),pe(this.node,"wh:form-setfielderror",o=>this._doSetFieldError(o)),pe(this.node,"mousedown",P_),pe(this.node,"focusout",j_,{capture:!0}),pe(this.node,"input",Xh,{capture:!0}),pe(this.node,"change",Xh,{capture:!0}),pe(this.node,"focusin",this.#o,{capture:!0}),this.node.noValidate=!0,this._rewriteEnableOn(),this._updateConditions(!0),this._applyPrefills();let t=this._getPageState();this._updatePageVisibility(t.pages,0),this._updatePageNavigation()}static getForNode(e){return e.propWhFormhandler||null}getElementByName(e){return this.node.elements.namedItem(e)}getLangCode(){return this.node.closest("[lang]")?.lang??"en"}#o=e=>{if(this.node.contains(e.target)){let t=Ft(e.target)||e.target.dataset.whFormGroupFor;t&&(this.#e=t)}};#t=()=>{this.sendFormEvent({event:"abandoned",lastfocused:this.#e,pagenum:this.getCurrentPageNumber()})};__formStarted(){}sendFormEvent(e){let t=Date.now();if(e?.event==="submitted"&&removeEventListener("pagehide",this.#t),!this._firstinteraction){if(!this.isInteractive){e?.event&&A.anl&&console.log(`[anl] Form is supressing broadcast of '${e?.event}' because it hasn't been interacted with yet`);return}this._firstinteraction=t,this.sendFormEvent({event:"started"}),addEventListener("pagehide",this.#t)}if(!e)return;this._firstinteraction||=t;let o=this._getPageState(),n={...e,id:this.node.dataset.whFormId||"",session:this._formsessionid,pagetitle:this._getPageTitle(o.curpage),pagenum:o.curpage+1,time:t-this._firstinteraction,objref:this.node.dataset.whFormObjref||""};this._submitstart&&(n.waittime=Date.now()-this._submitstart),F(this.node,"wh:form-analytics",{bubbles:!0,cancelable:!1,detail:n})}_rewriteEnableOn(){for(let e of w(this.node,"*[data-wh-form-enable]"))for(let t of e.dataset.whFormEnable.split(" ")){let o=this.getElementByName(t);if(o&&o instanceof HTMLElement){let n=(e instanceof HTMLOptionElement?e.closest("select"):e)?.name;if(!n)continue;let s={field:n,matchtype:"IN",value:e.value};o.dataset.whFormEnabledIf&&(s={conditions:[pn(o.dataset.whFormEnabledIf),s],matchtype:"AND"}),o.dataset.whFormEnabledIf=JSON.stringify({c:s})}}}_applyPrefills(){let e=new URL(location.href).searchParams;for(let t of this._queryAllFields()){let o=e.getAll(t.name);if(o.length){if(t.multi&&t.nodes[0].type==="checkbox")for(let n of t.nodes){let s=o.includes(n.value);s!==n.checked&&this.setFieldValue(n,s)}else if(t.multi){let n=t.nodes.filter(s=>s.value===o[o.length-1])[0];n&&!n.checked&&this.setFieldValue(n,!0),n||t.nodes.filter(s=>s.checked).forEach(s=>this.setFieldValue(s,!1))}else if(t.node.matches("input:not([type=file]),select,textarea")){if(!this._isNowSettable(t.node))continue;this.setFieldValue(t.node,o[o.length-1])}}}}_updateFieldGroupMessageState(e,t,o){let n=e.closest(".wh-form__fieldgroup");if(!n)return;let s=n.classList.contains("wh-form__field--"+t)?n:n.querySelector(".wh-form__field--"+t),r=(s&&s.closest(".wh-form__fieldgroup")===n?o(s):null)||null;n.classList.toggle("wh-form__fieldgroup--"+t,!!r),r&&(e.classList.contains("wh-form__field--everfailed")||(A.fhv&&console.log("[fhv] marking as everfailed",e,"because of error",r),e.classList.add("wh-form__field--everfailed")));let l=e.closest("[role=group],.wh-form__subfield,wh-form__fieldgroup"),d=(l?.role==="group"?l:null)??e,c="",h=n.querySelector(".wh-form__"+t);if(h)c=h.id;else{if(!r)return;c="whform-msg-"+Math.floor((1+Math.random())*268435456).toString(16);let u=e.closest(".wh-form__fields")||n.querySelector(".wh-form__fields")||n;h=W("div",{className:"wh-form__"+t}),h.id=c,u.appendChild(h)}r?(h.replaceChildren(typeof r=="string"?F_(r):r),this._addDescribedBy(d,c),t==="error"&&d.setAttribute("aria-invalid","true")):(h.replaceChildren(),this._removeDescribedBy(d,c),d.removeAttribute("aria-invalid"))}_addDescribedBy(e,t){let o=e.getAttribute("aria-describedby")??"",n=o!==""?o.split(" "):[];n.indexOf(t)===-1&&(n.push(t),e.setAttribute("aria-describedby",n.join(" ")))}_removeDescribedBy(e,t){let o=e.getAttribute("aria-describedby")??"",n=o!==""?o.split(" "):[];for(let s=0;s<n.length;s++)if(n[s]===t){n.splice(s,1);break}n.length>0?e.setAttribute("aria-describedby",n.join(" ")):e.removeAttribute("aria-describedby")}_updateFieldGroupErrorState(e){this._updateFieldGroupMessageState(e,"error",t=>gi(t).getError())}_updateFieldGroupSuggestionState(e){this._updateFieldGroupMessageState(e,"suggestion",t=>t.propWhValidationSuggestion||"")}_doSetFieldError(e){V(e),this._reportFieldValidity(e.target)}
9_reportFieldValidity(e){let t=gi(e).getState();return e.classList.toggle("wh-form__field--error",!!t?.error),e.classList.toggle("wh-form__field--suggestion",!!t?.suggested),this._updateFieldGroupErrorState(e),this._updateFieldGroupSuggestionState(e),!(t&&"error"in t)}async validateAndSubmit(e){await this._submit(null,e)}beforeSubmit(e){return!0}async _submit(e,t){if(this.node.classList.contains("wh-form--submitting")||this.inSubmit){e?.preventDefault();return}let o=this._submitter||this.node.querySelector(Ir);this._submitter=null,A.fhv&&console.log("[fhv] received submit event, submitter:",o);let n=null;o&&(n=document.createElement("input"),n.name=o.name,n.value=o.value,n.type="hidden",this.node.appendChild(n));try{this.inSubmit=!0;let s=this.beforeSubmit(t);if(!s||qr(s)&&!await s)return;if(!F(this.node,"wh:form-beforesubmit",{bubbles:!0,cancelable:!0})){console.error("The use of wh:form-beforesubmit is deprecated and will be removed in a future version. Use onBeforeSubmit instead");return}await this._doSubmit(e,t)}finally{n?.remove(),this.inSubmit=!1}}_shouldValidateField(e){return(e.whFormsApiChecker||e.matches(`${Fs},*[data-wh-form-name],*[data-wh-form-custom-validator`))&&this._isPartOfForm(e)}_getFieldsToValidate(e){return w(e??this.node,"*").filter(t=>this._shouldValidateField(t))}resetServerSideErrors(){for(let e of this._getFieldsToValidate())gi(e)?.explicit?.serverside&&e.propWhCleanupFunction&&e.propWhCleanupFunction()}async _doSubmit(e,t){e&&e.preventDefault();let o=G({modal:!0});this._submitstart=Date.now(),this._submittimeout=setTimeout(()=>this._submitHasTimedOut(),5e3),this.node.classList.add("wh-form--submitting");try{this.resetServerSideErrors();let n=await this.validate();if(n.valid){let s=await this.submit(t);s.result&&s.result.submittype&&s.result.submittype!==this._getVariableValueForConditions("formsubmittype")&&(this.node.setAttribute("data-wh-form-var-formsubmittype",s.result.submittype),this._updateConditions(!1))}else this.sendFormEvent({event:"failed",errorfields:Yh(n),errorsource:"client"})}finally{o.release(),this.node.classList.remove("wh-form--submitting"),this._submittimeout&&(clearTimeout(this._submittimeout),this._submittimeout=void 0),this._submitstart=void 0}}_submitHasTimedOut(){this.sendFormEvent({event:"slow",waitfor:"submit"})}async submit(e){return this.node.submit(),{}}_onTakeFocus(e){let t=e.target.closest(".wh-form__page");if(t&&t.classList.contains("wh-form__page--hidden")){let o=w(this.node,".wh-form__page").findIndex(n=>n===t);o>=0&&this.gotoPage(o)}}_checkClick(e){let t=e.target?.closest("*[data-wh-form-action]");if(!t){let o=e.target.closest(Ir);if(o?.form===this.node){if(!this.node.classList.contains("wh-form--allowsubmit")){V(e),this.node.classList.contains("wh-form--allownext")&&this.executeFormAction("next");return}this._submitter=o,setTimeout(()=>this._submitter=null)}return}V(e),this.executeFormAction(t.dataset.whFormAction)}_getPageState(){let e=w(this.node,".wh-form__page"),t=e.findIndex(o=>!o.classList.contains("wh-form__page--hidden"));return{pages:e,curpage:t}}_updatePageVisibility(e,t){e.forEach((o,n)=>{o.classList.toggle("wh-form__page--hidden",n!==t),o.classList.toggle("wh-form__page--visible",n===t)})}getCurrentPage(){let e=this._getPageState();return e.curpage>=0?e.pages[e.curpage]:null}scrollIntoView(e){let t=e;e=(e?e.closest(".wh-form__fieldgroup"):void 0)||this.node,e=e.querySelector(".wh-anchor")||e,t&&e!==t&&A.fhv?console.log("[fhv] Modified scroll target from ",t," to anchor ",e):A.fhv&&console.log("[fhv] Scroll to ",e),e.scrollIntoView()}getCurrentPageNumber(){return this._getPageState().curpage}async gotoPage(e,{__isSubmit:t=!1}={}){let o=this._getPageState(),n=A_(o,e);if(o.curpage===n)return;let s=n>o.curpage;t||this.sendFormEvent({event:s?t?"submitted":"nextpage":"previouspage",targetpagenum:n+1,targetpagetitle:this._getPageTitle(n)}),this._updatePageVisibility(o.pages,n),s&&po(o.pages[n],{form:await this.getFormValue()}),this._updatePageNavigation(),this.scrollIntoView(),F(o.pages[n],"wh:form-pagechange",{bubbles:!0,cancelable:!1,detail:{formHandler:this}})}_getDestinationPage(e,t){let o=e.curpage+t;for(;o>=0&&o<e.pages.length&&(e.pages[o].propWhFormCurrentVisible===!1||e.pages[o].dataset.whFormPagerole==="captcha");)o=o+t;return o<0||o>=e.pages.length?-1:o}_getPageTitle(e){let t=this._getPageState().pages[e];return t?t.dataset.whFormPagetitle||"#"+(e+1):""}async executeFormAction(e){switch(e){case"previous":{if(this.node.classList.contains("wh-form--allowprevious")){let t=this._getPageState();t.curpage>0?this.gotoPage(this._getDestinationPage(t,-1)):this.node.dataset.whFormBacklink&&ce({type:"redirect",url:this.node.dataset.whFormBacklink})}return}case"next":{let t=this._getPageState();if(this.node.classList.contains("wh-form--allownext")){this.resetServerSideErrors();let o=await this.validate(t.pages[t.curpage]);o.valid?this.gotoPage(this._getDestinationPage(t,1)):this.sendFormEvent({event:"failed",errorfields:Yh(o),errorsource:"nextpage"})}return}
9case"exit":{if(!this.exitButtonNavigateTo)throw new Error("No exit navigation target set for this form");ce(this.exitButtonNavigateTo);return}default:console.error(`Unknown form action '${e}'`)}}async refreshConditions(){await this._updateConditions(!1)}_onInputChange(){this.sendFormEvent(),this._updateConditions(!1)}async _updateConditions(e){let t=[],o=[],n=!1;for(let d of w(this.node,".wh-form__page")){let c=!0;d.dataset.whFormVisibleIf&&(c=this._matchesCondition(d.dataset.whFormVisibleIf),c||t.push(d),c!==d.propWhFormCurrentVisible&&(n=!0,d.propWhFormCurrentVisible=c,o.push(d)))}n&&this._updatePageNavigation();let s=new Array,r=[],l=[],a=[];for(let d of w(this.node,".wh-form__fieldgroup")){let c=d.closest(".wh-form__page"),h=(!c||!t.includes(c))&&this._matchesCondition(d.dataset.whFormVisibleIf);h||r.push(d);let m=h&&this._matchesCondition(d.dataset.whFormEnabledIf);m&&l.push(d),d.propWhFormInitialRequired===void 0&&(d.propWhFormInitialRequired=d.classList.contains("wh-form__fieldgroup--required"));let u=m&&(d.dataset.whFormRequiredIf?this._matchesCondition(d.dataset.whFormRequiredIf):d.propWhFormInitialRequired);u&&a.push(d),(h!==d.propWhFormCurrentVisible||m!==d.propWhFormCurrentEnabled||u!==d.propWhFormCurrentRequired)&&(d.propWhFormCurrentVisible=h,d.propWhFormCurrentEnabled=m,d.propWhFormCurrentRequired=u,d.classList.toggle("wh-form__fieldgroup--disabled",!m),d.classList.toggle("wh-form__fieldgroup--hidden",!h),d.classList.toggle("wh-form__fieldgroup--required",u),o.push(d))}for(let d of w(this.node,".wh-form__fieldline")){let c=d.closest(".wh-form__fieldgroup");if(!c)continue;let h=!r.includes(c)&&this._matchesCondition(d.dataset.whFormVisibleIf),m=h&&l.includes(c)&&this._matchesCondition(d.dataset.whFormEnabledIf),u=m&&a.includes(c);h!==d.propWhFormlineCurrentVisible&&(d.propWhFormlineCurrentVisible=h,d.classList.toggle("wh-form__fieldline--hidden",!h));let b=w(d,`${Fs},[data-wh-form-state-listener='true']`);for(let f of b){f.dataset.whFormSavedEnabled||(f.dataset.whFormSavedEnabled=("disabled"in f?!f.disabled:!("whFormDisabled"in f.dataset)).toString()),f.dataset.whFormSavedRequired||(f.dataset.whFormSavedRequired=(!!("required"in f&&f.required)).toString());let g=m&&f.dataset.whFormSavedEnabled==="true"&&this._matchesCondition(f.dataset.whFormEnabledIf);(!f.dataset.whFormCurrentEnabled||g!==(f.dataset.whFormCurrentEnabled==="true"))&&(f.dataset.whFormCurrentEnabled=g?"true":"false",F(f,"wh:form-enable",{bubbles:!0,cancelable:!0,detail:{enabled:g}})&&(cn(f)?f.disabled=!g:g?f.removeAttribute("data-wh-form-disabled"):f.setAttribute("data-wh-form-disabled","")),!e&&!g&&!s.includes(f)&&s.push(f));let _=(f.dataset.whFormSavedRequired==="true"||u)&&g&&h;(!f.dataset.whFormCurrentRequired||f.dataset.whFormCurrentRequired!==(_?"true":"false"))&&(f.dataset.whFormCurrentRequired=_?"true":"false",F(f,"wh:form-require",{bubbles:!0,cancelable:!0,detail:{required:_}})&&(cn(f)?(!Si(f)||f.type!=="checkbox")&&(f.required=_):_?f.setAttribute("data-wh-form-required",""):f.removeAttribute("data-wh-form-required")),!e&&!_&&c.classList.contains("wh-form__fieldgroup--error")&&!s.includes(f)&&s.push(f))}}for(let d of w(this.node,".wh-form__fieldgroup select option")){let c=this._matchesCondition(d.dataset.whFormVisibleIf);d.dataset.whFormSavedEnabled||(d.dataset.whFormSavedEnabled=(!d.disabled).toString()),d.dataset.whFormSavedHidden||(d.dataset.whFormSavedHidden=d.hidden.toString());let h=c&&d.dataset.whFormSavedEnabled==="true",m=!c||d.dataset.whFormSavedHidden==="true";if(h!==(d.dataset.whFormCurrentEnabled==="true")||m!==(d.dataset.whFormCurrentHidden==="true")){d.dataset.whFormCurrentEnabled=h?"true":"false",d.dataset.whFormCurrentHidden=m?"true":"false",d.disabled=!h,d.hidden=m;let u=d.closest("select");u&&d.selected&&(!h||m)&&d.dataset.placeholder===void 0&&(u.options[0].dataset.placeholder!==void 0?u.selectedIndex=0:(u.selectedIndex=-1,u.__didPlaceholderWarning||(u.__didPlaceholderWarning=!0,console.warn("This <select> lacks an explicit placeholder so we had to set selectedIndex to -1",u)))),u&&!e&&!s.includes(u)&&s.push(u)}}s.length&&await this.validate(s,{focusfailed:!1,iffailedbefore:!0}),this.fixupMergeFields(o)}__scheduleUpdateConditions=Ci(()=>this._updateConditions(!1),{coalesce:!0});async fixupMergeFields(e){let t=await this.getFormValue();for(let o of e)if(o.propWhFormCurrentVisible){for(let n of w(o,"*[data-wh-dont-merge]"))n.dataset.merge=n.dataset.whDontMerge,n.removeAttribute("data-wh-dont-merge");po(o,{form:t})}else for(let n of w(o,"*[data-merge]"))n.dataset.whDontMerge=n.dataset.merge,n.removeAttribute("data-merge")}_matchesCondition(e){return e?this._matchesConditionRecursive(pn(e)):!0}_getConditionRawValue(e,t){if(this.node.hasAttribute("data-wh-form-var-"+e))return this.node.getAttribute("data-wh-form-var-"+e);let o=this.getElementByName(e);
9if(!o)return console.error(`No match for conditional required field '${e}'`),null;if(Oa(o)){let n=null;for(let s of o)if((t&&t.checkdisabled||this._isNowSettable(s))&&s.checked){if(s.type!=="checkbox")return s.value;n||(n=[]),n.push(s.value)}return n}else if((!t||!t.checkdisabled)&&!this._isNowSettable(o))return null;return o.type==="checkbox"?o.checked?[o.value]:null:o.type==="radio"?o.checked?o.value:null:o.value}_getVariableValueForConditions(e,t){if(this.node.hasAttribute("data-wh-form-var-"+e))return this.node.getAttribute("data-wh-form-var-"+e);let o=e.split("$");if(o.length>1){let r=o.join(".");if(this.node.hasAttribute("data-wh-form-var-"+r))return this.node.getAttribute("data-wh-form-var-"+r)}let n=this._getConditionRawValue(o[0],t);if(o.length===1||n===null)return n;let s=this.getElementByName(o[0]);if(!s)return console.error(`No match for conditional required field '${e}'`),null;if(s instanceof HTMLSelectElement){if(Array.isArray(n)){let r=n;n=[];for(let l of r){let a=T(s,`option[value="${CSS.escape(l)}"]`);if(!a?.dataset.__extrafields)return null;let d=JSON.parse(a.dataset.__extrafields);n.push(d[o[1]])}}else{let r=T(s,`option[value="${CSS.escape(n)}"]`);if(!r?.dataset.__extrafields)return null;n=JSON.parse(r.dataset.__extrafields)[o[1]]}return n}else return console.error("Subfield matching not supported for non-select fields"),null}_matchesConditionRecursive(e){switch(e.matchtype){case"AND":for(let o of e.conditions)if(!this._matchesConditionRecursive(o))return!1;return!0;case"OR":for(let o of e.conditions)if(this._matchesConditionRecursive(o))return!0;return!1;case"NOT":return!this._matchesConditionRecursive(e.condition);case"AGE<":case"AGE>=":{let o=this._getVariableValueForConditions(e.field);if(!o)return!1;let n=new Date,s=new Date(Array.isArray(o)?o[0]:o),r=n.getFullYear()-s.getFullYear();return(n.getMonth()<s.getMonth()||n.getMonth()===s.getMonth()&&n.getDate()<s.getDate())&&--r,e.matchtype==="AGE<"?r<e.value:r>=e.value}}let t=this._getVariableValueForConditions(e.field,e.options);if(e.matchtype==="HASVALUE")return!!t==!!e.value;if(["IN","HAS","IS"].includes(e.matchtype)){let o=e.options?.matchcase!==!1,n=Array.isArray(e.value)?e.value:e.value?[e.value]:[],s=Array.isArray(t)?t:t?[t]:[];return o||s.forEach((r,l)=>s[l]=s[l].toUpperCase()),!(!s.some(r=>n.includes(r))||(e.matchtype==="HAS"||e.matchtype==="IS")&&n.some(r=>!s.includes(r))||e.matchtype==="IS"&&s.some(r=>!n.includes(r)))}return console.error(`No support for conditional type '${e.matchtype}'`),!1}_updatePageNavigation(){let e=this._getPageState(),t=this._getDestinationPage(e,1),o=t!==-1,n=e.pages[e.curpage]?e.pages[e.curpage].dataset.whFormPagerole:"",s=o?e.pages[t].dataset.whFormPagerole:"";this.node.classList.toggle("wh-form--allowprevious",!!(e.curpage>0&&n!=="thankyou"||e.curpage<=0&&this.node.dataset.whFormBacklink)),this.node.classList.toggle("wh-form--allownext",o&&s!=="thankyou"),this.node.classList.toggle("wh-form--allowsubmit",n==="thankyou"?e.pages[e.curpage].dataset.whFormExitButton!==void 0:!o||s==="thankyou")}_navigateToThankYou(e){let t=this._getPageState();if(t.curpage>=0){let o=this._getDestinationPage(t,1);if(o!==-1&&t.pages[o]&&t.pages[o].dataset.whFormPagerole==="thankyou"){let n=t.pages[o].dataset.whFormNavigateTo,s=t.pages[o].dataset.whFormExitButton,r=n?JSON.parse(n):null;r&&(this.exitButtonNavigateTo=r);let l=parseInt(t.pages[o].dataset.whFormPageredirectDelay??"");if(s){let a=this.node.querySelector(".wh-form__button--submit"),d=a?.querySelector(".wh-form__buttonlabel");a&&d?(a.dataset.whFormAction="exit",d.textContent=s):console.error(`Unable to find the submit button '.wh-form__button--submit .wh-form__buttonlabel' - I need to replace its label with '${s}'!`)}if(r&&!(l>=0)&&!s){ce(r);return}this.updateRichValues(t.pages[o],e),this.gotoPage(o,{__isSubmit:!0}),r&&l>=0&&setTimeout(()=>ce(r),l*1e3||100)}}}updateRichValues(e,t){if(t)for(let{field:o,value:n}of t){let s=e.querySelector(`.wh-form__fieldgroup--richtext[data-wh-form-group-for="${CSS.escape(o)}"] .wh-form__richtext`);s&&(s.innerHTML=n,we(s))}}ensureLegacyWarning(e){!this.didLegacyWarning&&!Pt&&console.warn(`[form] ${mi(e)} is using wh:form-getvalue/wh:form-setvalue events. It should switch to JSFormElement`),this.didLegacyWarning=!0}async getFieldValue(e){if(e[Nt])return e[Nt].getValue();if(e.hasAttribute("data-wh-form-name")||e.whUseFormGetValue){let t=Promise.withResolvers();if(!F(e,"wh:form-getvalue",{bubbles:!0,cancelable:!0,detail:{deferred:t}}))return this.ensureLegacyWarning(e),t.promise}if(!cn(e)){A.fhv&&console.log("[fhv] Cannot get value on non-FormControl",e);return}return e.matches("input[type=file]")?[...e.files||[]].map(t=>({fileName:t.name,file:t,link:null})):e.value}setFieldValue(e,t){if(e[Nt])return e[Nt].setValue(t);if(e.hasAttribute("data-wh-form-name")&&!F(e,"wh:form-setvalue",{bubbles:!0,cancelable:!0,detail:{value:t}})){this.ensureLegacyWarning(e);return}if(!cn(e)){console.error("Cannot set value on non-FormControl",e,t);return}if(typeof t!="string"&&typeof t!="number"&&typeof t!="boolean"){console.error(`Setting value of type ${typeof t} on a FormControl`,e,t);return}let o=this.isInteractive;try{this.isInteractive=!1,Si(e)?$e(e,t):e.value=t}finally{this.isInteractive=o}}_isPartOfForm(e){return!("form"in e)||e.form===this.node||!document.contains(e)||!this.node&&!e.hasAttribute("form")}_queryAllFields(e){let t=new Array,o=e&&e.skiparraymembers;
9for(let n of this._getFieldsToValidate(e?.startnode)){if(e&&n===e.skipfield||!this._isPartOfForm(n)||e&&e.onlysettable&&!this._isNowSettable(n)||o&&n.closest(".wh-form__arrayrow"))continue;let s=Ft(n);if(!s)continue;let r=t.find(l=>l.name===s);if(Nh(n)){if(!r)r={name:s,multi:!0,nodes:[]},t.push(r);else if(!r.multi){console.error(`[fhv] Encountered duplicate field '${s}'`,n);continue}r.nodes.push(n)}else{if(r){console.error(`[fhv] Encountered duplicate field '${s}'`,n);continue}t.push({name:s,multi:!1,node:n})}}return t}getFormElementNames(){return this._queryAllFields().map(e=>e.name)}_getQueryiedFieldValue(e){return e.multi?e.nodes.filter(t=>t.checked).map(t=>t.value):this.getFieldValue(e.node)}async getFormValue(){let e={},t=new Array;for(let o of this._queryAllFields({onlysettable:!0,skiparraymembers:!0}))this._processFieldValue(e,t,o.name,this._getQueryiedFieldValue(o));return await Promise.all(t),e}_isNowSettable(e){if("disabled"in e&&e.disabled)return!1;let t=e.closest(".wh-form__fieldgroup");if(t&&(t.classList.contains("wh-form__fieldgroup--disabled")||t.classList.contains("wh-form__fieldgroup--hidden")))return!1;let o=e.closest(".wh-form__page");return!(o&&o.propWhFormCurrentVisible===!1)}_processFieldValue(e,t,o,n){n!==void 0&&(qr(n)?t.push(new Promise((s,r)=>{n.then(l=>{l!==void 0&&(e[o]=l),s()}).catch(l=>r(l))})):e[o]=n)}getOptions(e){let t=this.getElementByName(e);return t instanceof RadioNodeList?[...t].map(o=>({inputnode:o,fieldline:o.closest(".wh-form__fieldline"),value:o.value})):[]}getSelectedOptions(e){let t=this.getOptions(e);return t=t.filter(o=>o.inputnode.checked),t}getSelectedOption(e){let t=this.getSelectedOptions(e);return t.length?t[0]:null}getFieldGroup(e){let t=this.getElementByName(e);return t instanceof RadioNodeList&&(t=t[0]),t?t.closest(".wh-form__fieldgroup"):null}getValues(e){return this.getSelectedOptions(e).map(t=>t.value)}getValue(e){let t=this.getValues(e);return t.length?t[0]:null}static setupValidator(e,t){De(e,t)}static setFieldError(e,t,o){_e(e,t,o)}setFieldError(e,t,o){_e(e,t,o)}async validateSingleFormField(e){return!0}async _validateSingleFieldOurselves(e){let t=gi(e);if(!t.explicit&&Ua(e))return $a(e),this._reportFieldValidity(e);if(t.dynamicError=null,await this.validateSingleFormField(e),!t.dynamicError){for(let o of t.validators)if(t.dynamicError=await o(e)||null,t.dynamicError)break}return!t.dynamicError&&e.whFormsApiChecker&&await e.whFormsApiChecker(),this._reportFieldValidity(e)}async validate(e,t){if(A.fdv)return console.warn("[fdv] Validation of form was skipped"),{valid:!0,failed:[],firstfailed:null};let o=Promise.withResolvers();return this.validationqueue.push({defer:o,limitset:e,options:t}),this.validationqueue.length===1&&this._executeNextValidation(),o.promise}async _executeNextValidation(){for(;this.validationqueue.length;){let e=this.validationqueue[0];try{let t=await this._executeQueuedValidation(e.limitset,e.options);e.defer.resolve(t)}catch(t){e.defer.reject(t)}this.validationqueue.shift()}}async _executeQueuedValidation(e,t){let o=e;e||(e=this._getFieldsToValidate());let n=new Set;for(let l of Array.isArray(e)?e:[e]){if(l.matches("input[type=radio],input[type=checkbox]")){let a=l.closest(".wh-form__fieldgroup");a&&n.add(a);continue}this._shouldValidateField(l)&&n.add(l);for(let a of this._getFieldsToValidate(l))n.add(a)}let s=[...n];t&&t.iffailedbefore&&(s=s.filter(l=>M_(l))),A.fhv&&console.log("[fhv] Validation of %o expanded to %d elements: %o",o,s.length,[...s]);let r=G();try{if(!s.length)return{valid:!0,failed:[],firstfailed:null};let l=await Promise.all(s.map(c=>this._validateSingleFieldOurselves(c))),a=s.filter((c,h)=>!l[h]),d={valid:a.length===0,failed:a,firstfailed:null};if(d.firstfailed=d.failed.length?d.failed[0]:null,d.firstfailed&&(!t||t.focusfailed)){let c=Ia(d.firstfailed)?d.firstfailed:qi(d.firstfailed)[0];c&&kt(c,{preventScroll:!0}),this.scrollIntoView(d.firstfailed)}return A.fhv&&console.log(`[fhv] Validation of ${s.length} fields done, ${d.failed.length} failed`,d),d}finally{r.release()}}reset(){this.node.reset(),this.gotoPage(0)}};os();N();te();os();re();ie();var bn={};function Kh(i){return!(i.disabled||i.readOnly||i.autocomplete&&i.autocomplete.split(" ").includes("username"))}function q_(i,e,t,o){V(i),t.value=o,t.propWhValidationSuggestion=null,e._reportFieldValidity(t)}async function Jh(i,e){e.dataset.whFormEmailBlocked&&(delete e.dataset.whFormEmailBlocked,_e(e,""));let t=e.value;if(!t||!Kh(e))return!0;
9if(!zc(t))return e.dataset.whFormEmailBlocked="true",_e(e,v("publisher:site.forms.commonerrors.email")),!1;let o="e_"+e.name+"."+t;if(bn[o]===void 0){let s="getRPCFormIdentifier"in i?Dt().formValidateEmail({...i.getRPCFormIdentifier(),field:e.name},t):Dt().validateEmail(Ye(),t);bn[o]=jc(s,3e3,"Timeout")}let n;try{n=await bn[o]}catch(s){A.fhv&&console.log("[fhv] Email validation error or timeout for value",t,s)}if(t!==e.value||!Kh(e))return!0;if(n?.blocked)return e.dataset.whFormEmailBlocked="true",_e(e,n.blocked),!1;if(n?.force)return e.value=n.force,bn["e_"+e.name+"."+n.force]=Promise.resolve({}),!0;if(n?.suggestion){let s=v("publisher:site.forms.commonerrors.email_suggestion","___SUGGESTION___").split("___SUGGESTION___");return bn["e_"+e.name+"."+n.suggestion]=Promise.resolve({}),e.propWhValidationSuggestion=p("span",{class:"wh-form__emailcorrection"},s[0],p("a",{href:"#",class:"wh-form__emailcorrected",on:{click:r=>q_(r,i,e,n.suggestion)}},n.suggestion),s[1]),!0}return!0}N();Ko();var _t=[],wn=null,Ds=null,vn=null;function I_(i){_t.length&&(V(i),_t[_t.length-1].options.allowcancel&&_t[_t.length-1].resolve(null))}function Qh(i,e){if(!_t.length)return;V(i);let t=qi(_t[_t.length-1].contentnode,!0),o=ln(),n=o?t.indexOf(o)+e:-1,s=n<0?t[t.length-1]:n>=t.length?t[0]:t[n];s&&kt(s)}var Is=class{options;_borrowedfrom=null;_borrowednext=null;contentnode;buttonsnode=null;_deferred;open;_previousfocus=null;constructor(e){if(this.options={allowcancel:!0,...e},this.options.borrow&&typeof this.options.borrow=="string"){let t=document.querySelector(this.options.borrow);if(!t)throw new Error("Invalid 'borrow' selectior: "+this.options.borrow);this.options.borrow=t}this.options.borrow&&(this._borrowedfrom=this.options.borrow.parentElement,this._borrowednext=this.options.borrow.nextElementSibling),this.options.signal&&this.options.signal.addEventListener("abort",()=>{this.resolve(null)}),this.contentnode=null,this._deferred=Promise.withResolvers(),this.open=!1}async runModal(){if(this.open)throw new Error("Attempting to re-open already opened dialog");wn||(wn=new ii(window,{Escape:e=>I_(e),Tab:e=>Qh(e,1),"Shift+Tab":e=>Qh(e,-1)},{captureunsafekeys:!0,listenoptions:{capture:!0}})),this._previousfocus=ln(),this._openDialog(),this.open=!0,_t.push(this);try{return this.afterShow(),this._checkFocus(),await this._deferred.promise}finally{this.open&&this.closeDialog()}}_openDialog(){throw new Error("_openDialog not overridden by dialog class")}_checkFocus(){let e=qi(this.contentnode,!0);e.length!==0?kt(e[0]):kt(document.body)}closeDialog(){if(!this.open)return;let e=_t.indexOf(this);e>=0&&_t.splice(e,1),this.open=!1,this.options.borrow&&(this._borrowedfrom?this._borrowedfrom.insertBefore(this.options.borrow,this._borrowednext):this._borrowednext?.remove()),this.options.focusonclose?kt(this.options.focusonclose):this._previousfocus&&kt(this._previousfocus),_t.length===0&&wn&&(wn.destroy(),wn=null)}resolve(e){this.open&&this.closeDialog(),this._deferred.resolve(e)}afterShow(){}};function Zh(i,e){if(Ds){console.error("Duplicate setupDialogs call!");return}Ds=i,vn={messageboxclassbase:"dompack-messagebox__",...e}}function Se(i){if(!Ds)throw new Error("Cannot create dialog, no dialog class defined");let e=Ds(i);return e.options.borrow&&e.contentnode?.appendChild(e.options.borrow),e}async function Ae(i,e,t){e=e||[],t={allowcancel:e.length===0,...t};let o=Se(t),n=e.map(s=>W("button",{type:"button",className:vn?vn.messageboxclassbase+"button "+(s.className||""):"",textContent:s.title,on:{click:()=>o.resolve(s.result||s.title)},dataset:{messageboxResult:s.result||s.title}}));return typeof i=="string"&&(i=W("p",{textContent:i})),Array.isArray(i)?o.contentnode?.append(...i):o.contentnode?.append(i),o.buttonsnode?o.buttonsnode.append(...n):o.contentnode?.append(W("div",{className:vn?vn.messageboxclassbase+"buttongroup":"",childNodes:n})),o.runModal()}ie();re();zr();Go();M();te();var uo=(Ne(),Ce(Xe)).registerTexts;uo("publisher","nl",{site:{captcha:{explain:"Vink het vakje hieronder aan",title:"Verificatie"}}});uo("publisher","en",{site:{captcha:{explain:"Please check the box below",title:"Verification"}}});uo("publisher","de",{site:{captcha:{explain:"Bitte setze das H\xE4kchen",title:"Kontrolle"}}});uo("publisher","es",{site:{captcha:{explain:"Por favor, marque la casilla a continuaci\xF3n",title:"Casi listo"}}});uo("publisher","it",{site:{captcha:{explain:"Seleziona la casella qui sotto",title:"Verifica"}}});uo("publisher","xt",{site:{captcha:{explain:"Please check the box below",title:"Verification"}}});var fi={};async function eu(i,e,t){if(!fi[i.name])throw new Error(`Captcha provider '${i.name}' not registered`);if(!t?.onResponse)throw new Error("onResponse callback is required");let o={title:t?.title??v("publisher:site.captcha.title"),onResponse:t?.onResponse??(()=>{})};await fi[i.name].initialize(i,e,o)}te();var zs=class extends Ct{value="";provider=null;constructor(){super(),this.addEventListener("wh:form-setfielderror",t
9=>{this._setFieldError(t)}),this.whFormsApiChecker=()=>this.check();let e=this.closest("form");e&&e.addEventListener("reset",()=>this.onReset())}check(){this.value?_e(this,"",{reportimmediately:!1}):_e(this,v("publisher:site.forms.commonerrors.required"),{reportimmediately:!1})}setup(e){if(this.provider)throw new Error("CaptchaField is already setup");this.provider=e,this.initialize()}initialize(){this.value="",this.replaceChildren(),eu(this.provider,this,{onResponse:e=>{this.value=e}})}onReset(){this.initialize()}async _setFieldError(e){V(e),e.detail.error&&this.value&&(console.log("Captcha response was rejected, resetting"),this.onReset())}};function ol(i,e){let t=W("wh-captcha",{class:"wh-form__captcha",dataset:{whFormName:"__form_captcha",whFormRequired:"true"}}),o=W("div",{class:"wh-form__captchapage"},[W("div",{class:"wh-form__fieldgroup",dataset:{whFormGroupFor:"__form_captcha"}},[W("label",{class:"wh-form__label"},[v("publisher:site.captcha.title")]),W("div",{class:"wh-form__fields"},[W("div",{class:"wh-form__fieldline"},[t])])])]),n=T(i.node,".wh-form__navbuttons");return n?n.before(o):i.node.appendChild(o),t.setup(e),t}customElements.define("wh-captcha",zs);M();re();var Hs,Ns,tu,z_=150,N_=5e3;async function iu(i,e){var n=[];try{let t=Ut(n,G());void 0;let o=[...new Set(w(i,"[name]").map(a=>a.tagName.toLowerCase()))].filter(a=>a.includes("-"));if(o.length){let a=Promise.all(o.map(c=>customElements.whenDefined(c))).then(()=>({timeout:!1})),d=Date.now()+z_;for(;;){let c=Qn(new Date(d)).then(()=>({timeout:!0}));if(!(await Promise.race([a,c])).timeout)break;let m=o.filter(u=>!customElements.get(u)).join(", ");if(m==="wh-fileedit"){console.warn('Developers: we recommend explicitly registering a component for ".wh-form__upload"'),Oh(i);break}console.warn(`Still waiting for the following custom elements to be defined in form ${i.id??i.dataset.whFormId}:`,m),d=Date.now()+N_}}e(i)}catch(s){var r=s,l=!0}finally{Wt(n,r,l)}}function ou(i){Object.keys(i).length&&(Hs={...Hs,...i},F(window,"wh:form-configure",{bubbles:!0,cancelable:!1,detail:Hs}))}function nl(i){if(!Ns){let e=t=>new me(t);i={"publisher:form":e,"publisher:rpc":e,...i},Ns=new Map}for(let[e,t]of Object.entries(i))Fi(Ns,e,{insert:()=>t,update:o=>{if("promise"in o)return o.resolve(t),o;throw new Error(`Handler '${e}' is already registered`)}});tu||(x("form[data-wh-form-handler]",e=>{let t=Fi(Ns,e.dataset.whFormHandler,{insert:()=>Promise.withResolvers()});"promise"in t?t.promise.then(o=>iu(e,o)):iu(e,t)}),tu=!0)}function _i(i,e){nl({[i]:e})}function nu(){return Hs}function su(i){return Object.entries(i).map(e=>({name:e[0],value:e[1]}))}function sl(i){return{target:i,url:location.href.split("/").slice(3).join("/")}}var Os=class{target;cache;offline;constructor(e,t,o){this.target=sl(e),this.cache=t||new WeakMap,this.offline=o}async uploadFile(e){if(this.offline)throw new Error("Cannot upload files in offline mode");let t=this.cache.get(e);if(t)return t;let o=new Xc(e),n=await Yc().requestUpload(this.target,o.manifest),s=await o.upload(n);return this.cache.set(e,s),s}async convertSubmittable(e){if(Array.isArray(e))return await Promise.all(e.map(t=>this.getSubmittable(t)));if(e&&typeof e=="object"){if(Mc(e))return await this.uploadFile(e);let t={};
9for(let[o,n]of Object.entries(e))t[o]=await this.getSubmittable(n);return t}return e}async getSubmittable(e){return await this.convertSubmittable(e)}};async function ru(i,e,t){let n=await new Os(i,t?.uploadCache||null,t?.offline||!1).getSubmittable(e);if(t?.__setupEvent){let r=t.__setupEvent;r.extrasubmitdata=t.extraSubmit||null,r.submitted=n}return{...sl(i),vals:su(n),extrasubmit:t?.extraSubmit||null}}async function Us(i){return await qt("publisher:forms").formSubmit(i)}var me=class extends et{__formhandler={errors:[],warnings:[],formid:"",url:"",target:"",submitting:!1};#e=!1;#o=new WeakMap;#t=!1;pendingrpcs=new Array;constructor(e){if(super(e),this.__formhandler.formid=e.dataset.whFormId||"",this.__formhandler.url=location.href.split("/").slice(3).join("/"),this.__formhandler.target=e.dataset.whFormTarget||"",window.addEventListener("wh:form-configure",()=>this.checkCaptcha()),this.node.addEventListener("focusin",this.#i,!0),!this.__formhandler.target)if(this.__formhandler.formid)console.error("This page needs to be republished!");else throw Pt||console.error("Missing data-wh-form-target on form, did your witty apply '[form.formattributes]' to the <form> tag ?",e),new Error("Form does not appear to be a WebHare form");this.checkCaptcha()}getRPCFormIdentifier(){return sl(this.__formhandler.target)}async#n(){let e=await this.getFormValue();return await new Os(this.__formhandler.target,this.#o,!1).getSubmittable(e)}async _invokeRPC(e,t,o){let n=Promise.withResolvers();e||this.onRPC(n.promise);let s=G({modal:!e});try{let r=Dt().formInvoke({...this.getRPCFormIdentifier(),vals:su(await this.#n()),methodname:t,args:o});this.pendingrpcs.push(r);let l=await r;return this._processMessages(l.messages),l.result}finally{s.release(),n.resolve()}}processFieldMessage(e,t,o){if(e.startsWith("#page.")){let n=e==="#page.thankyou"?this.node.querySelector(".wh-form__page[data-wh-form-pagerole=thankyou]"):null;if(!n){console.warn("Message for non-page field: "+e+", prop: "+t+", value: "+String(o));return}if(t==="data"){let s=o;n.dataset.whFormNavigateTo=s.redirect?JSON.stringify(s.redirect):void 0,n.dataset.whFormExitButton=s.exitbutton}}else{let n=this.node.querySelector(`*[name="${CSS.escape(e)}"], *[data-wh-form-name="${CSS.escape(e)}"]`);if(!n){console.warn("Message for non-existent field: "+e+", prop: "+t+", value: "+String(o));return}if(t==="value"){this.setFieldValue(n,o);return}}console.warn("Unknown field message: field: "+e+", prop: "+t+", value: "+String(o))}getFormExtraSubmitData(){return{}}onRPC(e){}invokeRPC(e,...t){return this._invokeRPC(!1,e,t)}invokeBackgroundRPC(e,...t){return this._invokeRPC(!0,e,t)}_processMessages(e){for(let t of e)this.processFieldMessage(t.field,t.prop,t.data)}async _flushPendingRPCs(){for(;this.pendingrpcs.length;)try{await this.pendingrpcs.pop()}catch{}}async buildFormSubmission(e,t){let o=this.getFormExtraSubmitData(),n=await this.getFormValue(),s={...e,...await o};return await this._flushPendingRPCs(),F(this.node,"wh:form-preparesubmit",{bubbles:!0,cancelable:!1,detail:{extrasubmit:s}}),await ru(this.__formhandler.target,n,{extraSubmit:s,offline:!1,uploadCache:this.#o,__setupEvent:t?.__setupEvent})}#i=()=>{this.#e=!0,this.checkCaptcha()};checkCaptcha(){let e=nu();(e?.captcha==="onLoad"||e?.captcha==="onActivate"&&this.#e)&&this.node.dataset.whFormCaptcha!==void 0&&!this.#t&&!this.getElementByName("__form_captcha")&&(this.#t=!0,Dt().getCaptchaConfiguration(this.getRPCFormIdentifier()).then(o=>{o&&ol(this,o)}))}async submitForm(e){return await Us(e)}async submit(e){if(this.__formhandler.submitting)throw new Error("The form is already being submitted");let t=Promise.withResolvers(),o=!1;this.onRPC(t.promise);let n={form:this.node,rpchandler:this,submitted:{},errors:[],result:null};try{this.__formhandler.submitting=!0;let s=await this.buildFormSubmission(e,{__setupEvent:n});A.fhv&&console.log("[fhv] start submission",s),o=!0;let r=await this.submitForm(s);if(o=!1,A.fhv&&console.log("[fhv] received response",r),this._processMessages(r.messages),!F(this.node,"wh:form-response",{bubbles:!0,cancelable:!0,detail:r}))return r;n.result=r.result,n.errors=r.errors;let l=!1,a=[];for(let d of r.errors){if(!d.name){a.push(d);continue}let c=this.node.querySelector('[name="'+d.name+'"], [data-wh-form-name="'+d.name+'"]');
9if(!c)if(d.name==="__form_captcha"){let h=d.metadata;c=ol(this,h.provider)}else{console.error("[fhv] Unable to find node '"+d.name+"' which caused error:"+d.message);continue}l||(kt(c),l=!0),_e(c,d.message,{reportimmediately:!0,serverside:!0,metadata:d.metadata})}if(r.success)this.sendFormEvent({event:"submitted"}),F(this.node,"wh:form-submitted",{bubbles:!0,cancelable:!0,detail:n})&&(po(this.node,{form:await this.getFormValue()}),this._navigateToThankYou(r.result&&r.result.richvalues),this.onSubmitSuccess(r.result));else{let d=r.errors.map(c=>c.name||"*").sort().join(" ");this.sendFormEvent({event:"failed",errorfields:d,errorsource:"server"}),a.length&&F(this.node,"wh:form-globalerrors",{bubbles:!0,cancelable:!0,detail:{globalerrors:a}})&&this.displayGlobalErrors(a),F(this.node,"wh:form-failed",{bubbles:!0,cancelable:!0,detail:n})&&this.onSubmitFailed(r.errors,r.result)}return Yo(r,["result"])}catch(s){throw this.sendFormEvent({event:"exception",exception:String(s),errorsource:o?"server":"client"}),F(this.node,"wh:form-exception",{bubbles:!0,cancelable:!0,detail:n})&&this.onSubmitException(s),s}finally{t.resolve(),this.__formhandler.submitting=!1}}displayGlobalErrors(e){try{let t=e.map(o=>W("p",{textContent:o.message}));Ae(t,[{title:"OK"}])}catch(t){console.error("runMessageBox failed",t),alert(e.map(o=>o.message).join(`
10`))}}getFirstFailedGroup(){return this.node.querySelector(".wh-form__fieldgroup-error")}onSubmitSuccess(e){this.node.getBoundingClientRect().top<0&&this.node.scrollIntoView({block:"start",behavior:"smooth"}),e&&e.resultsguid&&(this.node.dataset.whFormResultguid=e.resultsguid),e&&e.submitinstruction&&ce(e.submitinstruction)}onSubmitFailed(e,t){}onSubmitException(e){}async validateSingleFormField(e){if(e instanceof HTMLInputElement&&e.type==="email"){ln()===e&&e.propWhValidationSuggestion&&(e.propWhValidationSuggestion=null);let t=Jh(this,e);if(this.pendingrpcs.push(t),!await t)return!1}return!0}};N();te();N();zr();te();var mo=(Ne(),Ce(Xe)).registerTexts;mo("publisher","nl",{site:{forms:{"imgedit-explain-upload":"Sleep bestanden hier of klik om te uploaden","imgedit-groupelement-replace":[1,", Vervang afbeelding"],"imgedit-groupelement-upload":[1,", Upload afbeelding"],"imgedit-remove":"Verwijder afbeelding",nextpage:"Volgende",previouspage:"Vorige",selectfile:"Selecteer bestand","splitdatetime-day-arialabel":"dag","splitdatetime-hours-arialabel":"uur","splitdatetime-minutes-arialabel":"minuut","splitdatetime-month-arialabel":"maand","splitdatetime-seconds-arialabel":"seconde","splitdatetime-year-arialabel":"jaar",starsrequired:"* betekent dat een veld verplicht is",submit:"Versturen","upload-emptytext":"Geen bestand geselecteerd","upload-filename":["Geselecteerde bestand is ",1],"upload-remove":"Verwijder bestand",addressfield:{address_not_found:"Het adres kon niet worden gevonden.",invalid_nr_detail:"Ongeldig huisnummer.",invalid_zip:"Ongeldige postcode.",zip_not_found:"Combinatie van postcode en huisnummer komt niet voor."},commonerrors:{alphanum:"De waarde moet alfanumeriek zijn.",badfiletype:"Dit bestandstype is niet toegestaan",check:["Kies minimaal ",1," en maximaal ",2," items."],date:"Dit is geen geldige datum.",default:"Deze waarde is onjuist.",digits:"De waarde moet numeriek zijn.",email:"Dit is geen geldig e-mailadres.",email_baddomain:["Vanwege problemen met het e-mailen naar ",1," e-mailadressen, willen we je vragen om een alternatief e-mailadres te gebruiken."],email_suggestion:["Bedoel je ",1,"?"],equalto:"De waardes moeten identiek zijn.",formunavailable:"Dit formulier is momenteel niet beschikbaar",integer:"De waarde moet een nummer zijn.",length:["De waarde moet tussen ",1," en ",2," karakters lang zijn."],max:["De waarde mag niet groter zijn dan ",1,"."],maxarray:["U kunt maximaal ",{t:"ifparam",p:1,value:"1",subs:["1 onderdeel"],subselse:[1," onderdelen"]}," toevoegen."],maxcheck:["Kies maximaal ",{t:"ifparam",p:1,value:"1",subs:["1 item"],subselse:[1," items"]},"."],maxheight:["De afbeelding is te groot. Deze mag maximaal ",2," pixels hoog zijn."],maxlength:["De waarde is te lang. Deze mag maximaal ",{t:"ifparam",p:1,value:"1",subs:["1 karakter"],subselse:[1," karakters"]}," lang zijn."],maxwidth:["De afbeelding is te groot. Deze mag maximaal ",2," pixels breed zijn."],min:["De waarde mag niet lager zijn dan ",1,"."],minarray:["U moet minimaal ",{t:"ifparam",p:1,value:"1",subs:["1 onderdeel"],subselse:[1," onderdelen"]}," toevoegen."],mincheck:["Kies minimaal ",{t:"ifparam",p:1,value:"1",subs:["1 item"],subselse:[1," items"]},"."],minheight:["De afbeelding is te klein. Deze moet minimaal ",2," pixels hoog zijn."],minlength:["De tekst is te kort. Deze moet uit minimaal ",{t:"ifparam",p:1,value:"1",subs:["1 karakter"],subselse:[1," karakters"]}," bestaan."],minwidth:["De afbeelding is te klein. Deze moet minimaal ",2," pixels breed zijn."],notblank:"De waarde mag niet leeg zijn.",number:"De waarde moet een nummer zijn.",pattern:"De waarde is onjuist.",range:["De waarde moet tussen ",1," en ",2," liggen."],required:"Dit veld is verplicht.",step1mismatch:"De waarde moet een geheel getal zijn",stepmismatch:["De waarde moet een meervoud zijn van ",1,"."],time:"Dit is geen geldige tijd.",unacceptableemail:"Dit e-mailadres is hier niet toegestaan",upload_cannotcheck:"Dit bestand kan niet ge\xFCpload worden omdat we het momenteel niet kunnen verifi\xEBren",upload_suspicious:"Dit bestand ziet er verdacht uit en kan helaas niet ge\xFCpload worden",url:"Dit is geen geldige URL."}}}});mo("publisher","en",{site:{forms:{"imgedit-explain-upload":"Drag and drop files here or click to upload","imgedit-groupelement-replace":[1,", Replace image"],"imgedit-groupelement-upload":[1,", Upload image"],"imgedit-remove":"Remove image",nextpage:"Next",previouspage:"Previous",selectfile:"Select file","splitdatetime-day-arialabel":"day","splitdatetime-hours-arialabel":"hour","splitdatetime-minutes-arialabel":"minute","splitdatetime-month-arialabel":"month","splitdatetime-seconds-arialabel":"second","splitdatetime-year-arialabel":"year",starsrequired:"* indicates a required field",submit:"Submit","upload-emptytext":"No file chosen","upload-filename":["Uploaded file is ",1],"upload-remove":"Remove file",addressfield:{address_not_found:"The address could not be found.",invalid_nr_detail:"Invalid house number.",invalid_zip:"Invalid ZIP or postal code.",zip_not_found:"Unknown combination of postal code and house number."},commonerrors:{alphanum:"This value should be alphanumeric.",badfiletype:"This file type is not allowed",cannotprocessfile:"This file looks suspicious and can unfortunately not be uploaded",check:["You must select between ",1," and ",2," choices."],date:"This is not a valid date",default:"This value seems to be invalid.",digits:"This value should be digits.",email:"This value should be a valid email.",email_baddomain:["Due to difficulties with mailing to ",1," email addresses we kindly request you to use an alternative email provider."],email_suggestion:["Did you mean ",1,"?"],equalto:"This value should be the same.",formunavailable:"This form is currently unavailable",integer:"This value should be a valid integer.",length:["This value length is invali
10d. It should be between ",1," and ",2," characters long."],max:["This value should be lower than or equal to ",1,"."],maxarray:["You can add at most ",{t:"ifparam",p:1,value:"1",subs:["1 item"],subselse:[1," items"]},"."],maxcheck:["You must select ",{t:"ifparam",p:1,value:"1",subs:["1 choice"],subselse:[1," choices"]}," or fewer."],maxheight:["The image is too big. It should be at most ",2," pixels high."],maxlength:["This value is too long. It should have ",{t:"ifparam",p:1,value:"1",subs:["1 character"],subselse:[1," characters"]}," or fewer."],maxsignupsreached:"The maximum number of signups has been reached",maxwidth:["The image is too big. It should be at most ",2," pixels wide."],min:["This value should be greater than or equal to ",1,"."],minarray:["You must add at least ",{t:"ifparam",p:1,value:"1",subs:["1 item"],subselse:[1," items"]},"."],mincheck:["You must select at least ",{t:"ifparam",p:1,value:"1",subs:["1 choice"],subselse:[1," choices"]},"."],minheight:["The image is too small. It should be at least ",2," pixels high."],minlength:["This value is too short. It should have ",{t:"ifparam",p:1,value:"1",subs:["1 character"],subselse:[1," characters"]}," or more."],minwidth:["The image is too small. It should be at least ",2," pixels wide."],notblank:"This value should not be blank.",number:"This value should be a valid number.",pattern:"This value seems to be invalid.",range:["This value should be between ",1," and ",2,"."],required:"This value is required.",step1mismatch:"The value must be a whole number",stepmismatch:["The value should be a multiple of ",1,"."],time:"This is not a valid time",unacceptableemail:"This email address is not acceptable here",upload_cannotcheck:"This file cannot be uploaded as we are currently unable to verify it",upload_suspicious:"This file looks suspicious and can unfortunately not be uploaded",url:"This value should be a valid url."}}}});mo("publisher","de",{site:{forms:{nextpage:"Weiter",previouspage:"Zur\xFCck",selectfile:"Datei ausw\xE4hlen",starsrequired:"* zeigt ein Pflichtfeld an",submit:"Abschicken",addressfield:{address_not_found:"Die Adresse konnte nicht gefunden werden.",invalid_nr_detail:"Ung\xFCltige Hausnummer.",invalid_zip:"Ung\xFCltige Postleitzahl.",zip_not_found:"Unbekannte Postleitzahl/Hausnummer Kombination."},commonerrors:{alphanum:"Die Eingabe darf nur Zahlen und/oder Buchstaben befassen.",check:["W\xE4hle zwischen ",1," und ",2," Angaben."],default:"Die Eingabe ist nicht korrekt.",digits:"Die Eingabe darf nur Zahlen enthalten.",email:"Die Eingabe muss eine g\xFCltige E-Mail-Adresse sein.",email_baddomain:["Aufgrund von technischen Schwierigkeiten mit dem Mailprovider ",1," ben\xF6tigen wir eine andere E-Mail Adresse."],email_suggestion:["Meinst du ",1,"?"],equalto:"Dieses Feld muss \xFCbereinstimmen mit dem anderen Feld.",integer:"Die Eingabe muss eine Zahl sein.",length:["Die L\xE4nge der Eingabe ist ung\xFCltig. Es k\xF6nnen zwischen ",1," und ",2," Zeichen eingegeben werden."],max:["Die Eingabe muss kleiner oder gleich ",1," sein."],maxcheck:["W\xE4hle maximal ",1," Angaben aus."],maxlength:["Die Eingabe ist zu lang. Es d\xFCrfen h\xF6chstens ",1," Zeichen eingegeben werden."],min:["Die Eingabe muss gr\xF6\xDFer oder gleich ",1," sein."],mincheck:["Die Eingabe ist zu kurz. Es m\xFCssen mindestens ",1," Zeichen eingegeben werden."],minlength:["W\xE4hle mindestens ",1," Optionen aus."],notblank:"Die Eingabe darf nicht leer sein.",number:"Die Eingabe muss eine Zahl sein.",pattern:"Die Eingabe ist ung\xFCltig.",range:["Die Eingabe muss zwischen ",1," und ",2," liegen."],required:"Dies ist ein Pflichtfeld.",url:"Die Eingabe muss eine g\xFCltige URL sein.",badfiletype:"This file type is not allowed",cannotprocessfile:"This file looks suspicious and can unfortunately not be uploaded",date:"This is not a valid date",formunavailable:"This form is currently unavailable",maxarray:["You can add at most ",{t:"ifparam",p:1,value:"1",subs:["1 item"],subselse:[1," items"]},"."],maxheight:["The image is too big. It should be at most ",2," pixels high."],maxsignupsreached:"The maximum number of signups has been reached",maxwidth:["The image is too big. It should be at most ",2," pixels wide."],minarray:["You must add at least ",{t:"ifparam",p:1,value:"1",subs:["1 item"],subselse:[1," items"]},"."],minheight:["The image is too small. It should be at least ",2," pixels high."],minwidth:["The image is too small. It should be at least ",2," pixels wide."],step1mismatch:"The value must be a whole number",stepmismatch:["The value should be a multiple of ",1,"."],time:"This is not a valid time",unacceptableemail:"This email address is not acceptable here",upload_cannotcheck:"This file cannot be uploaded as we are currently unable to verify it",upload_suspicious:"This file looks suspicious and can unfortunately not be uploaded"},"imgedit-explain-upload":"Drag and drop files here or click to upload","imgedit-groupelement-replace":[1,", Replace image"],"imgedit-groupelement-upload":[1,", Upload image"],"imgedit-remove":"Remove image","splitdatetime-day-arialabel":"day","splitdatetime-hours-arialabel":"hour","splitdatetime-minutes-arialabel":"minute","splitdatetime-month-arialabel":"month","splitdatetime-seconds-arialabel":"second","splitdatetime-year-arialabel":"year","upload-emptytext":"No file chosen","upload-filename":["Uploaded file is ",1],"upload-remove":"Remove file"}}});mo("publisher","es",{site:{forms:{nextpage:"Siguiente",previouspage:"Anterior",selectfile:"Seleccionar archivo",starsrequired:"* Campos obligatorios",submit:"Enviar",addressfield:{address_not_found:"La direcci\xF3n no pudo ser encontrada.",invalid_nr_detail:"N\xFAmero de casa con adici\xF3n inv\xE1lido.",invalid_zip:"C\xF3digo postal inv\xE1lido.",zip_not_found:"Combinaci\xF3n desconocida de c\xF3digo postal y n\xFAmero de casa."},commonerrors:{alphanum:"Este valor debe ser alfanum\xE9rico.",check:["Debe seleccionar entre ",1," y ",2," opciones."],default:"Este valor parece ser inv\xE1lido.",digits:"Este valor debe ser un d\xEDgito v\xE1lido.",email:"Este valor debe ser un correo v\xE1lido.",email_baddomain:["Debido a las dificultades con el env\xEDo de correos a ",1," direcciones de correo electr\xF3nico, le pedimos amablemente que utilice un proveedor de correo electr\xF3nico alternativo."],email_suggestion:["\xBFSe refiere a ",1,"?"],equalto:"Este valor debe ser id\xE9ntico.",integer:"Este valor debe ser un n\xFAmero entero v\xE1lido.",length:["Esta longitud de valor no es v\xE1lida. Debe tener entre ",1," y ",2," caracteres de longitud."],max:["Este valor debe ser menor o igual a ",1,"."],maxcheck:["Debe seleccionar ",1," opciones o menos."],maxlength:["Este valor es muy largo. La longitud m\xE1xima es de ",1," caracteres."],min:["Este valor debe ser mayor o igual que ",1,"."],mincheck:["Debe seleccionar al menos ",1," opciones."],minlength:["Este valor es muy corto. La longitud m\xEDnima es de ",1," caracteres."],notblank:"Este valor no debe estar en blanco.",number:"Este valor debe ser un n\xFAmero v\xE1lido.",pattern:"Este valor parece ser inv\xE1lido.",range:["Este valor debe estar entre ",1," y ",2,"."],required:"Este valor es necesario.",url:"Este valor debe ser una URL v\xE1lida.",badfiletype:"This file type is not allowed",cannotprocessfile:"This file looks suspicious and can unfortunately not be uploaded",date:"This is not a valid date",formunavailable:"This form is currently unavailable",maxarray:["You can add at most ",{t:"ifparam",p:1,value:"1",subs:["1 item"],subselse:[1," items"]},"."],maxheight:["The image is too big. It should be at most ",2," pixels high."],maxsignupsreached:"The maximum number of signups has been reached",maxwidth:["The image is too big. It should be at most ",2," pixels wide."],minarray:["You must add at least ",{t:"ifparam",p:1,value:"1",subs:["1 item"],subselse:[1," items"]},"."],minheight:["The image is too small. It should be at least ",2," pixels high."],minwidth:["The image is too small. It should be at least ",2," pixels wide."],step1mismatch:"The value must be a whole number",stepmismatch:["The value should be a multiple of ",1,"."],time:"This is not a valid time",unacceptableemail:"This email address is not acceptable here",upload_cannotcheck:"This file cannot be uploaded as we are currently unable to verify it",upload_suspicious:"This file looks suspicious and can unfortunately not be uploaded"},"imgedit-explain-upload":"Drag and drop files here or click to upload","imgedit-groupelement-replace":[1,", Replace image"],"imgedit-groupelement-upload":[1,", Upload image"],"imgedit-remove":"Remove image","splitdatetime-day-arialabel":"day","splitdatetime-hours-arialabel":"hour","splitdatetime-minutes-arialabel":"minute","splitdatetime-month-arialabel":"month","splitdatetime-seconds-arialabel":"second","splitdatetime-year-arialabel":"year","upload-emptytext":"No file chosen","upload-filename":["Uploaded file is ",1],"upload-remove":"Remove file"}}});mo("publisher","it",{site:{forms:{"imgedit-groupelement-replace":[1,", sostituire immagine"],"imgedit-groupelement-upload":[1,", caricare immagine"],"imgedit-remove":"Rimuovere immagine",nextpage:"Prossimo",previouspage:"Precedente",selectfile:"Seleziona il file","splitdatetime-day-arialabel":"Giorno","splitdatetime-hours-arialabel":"Ora","splitdatetime-minutes-arialabel":"Minuto","splitdatetime-month-arialabel":"Mese","splitdatetime-seconds-arialabel":"Secondo","splitdatetime-year-arialabel":"Anno",starsrequired:"* indica un campo richiesto",submit:"Invia","upload-emptytext":"Nessun file scelto","upload-filename":["Il file caricato \xE8 ",1],"upload-remove":"Rimuovere file",addressfield:{address_not_found:"Non \xE8 stato possibile trovare l'indirizzo.",invalid_nr_detail:"Numero civico n
10on valido.",invalid_zip:"CAP o codice postale non valido.",zip_not_found:"Combinazione sconosciuta di codice postale e numero civico."},commonerrors:{alphanum:"Questo valore deve essere di tipo alfanumerico.",badfiletype:"Questo tipo di file non \xE8 consentito",cannotprocessfile:"Questo file sembra sospetto e purtroppo non pu\xF2 essere caricato",check:["Devi scegliere tra ",1," e ",2," opzioni."],date:"Questa non \xE8 una data valida",default:"Questo valore sembra essere non valido.",digits:"Questo valore deve essere di tipo numerico.",email:"Questo valore deve essere un indirizzo email valido.",email_baddomain:["A causa di difficolt\xE0 con l'invio agli indirizzi email ",1,", lo richiediamo gentilmente"],email_suggestion:["Intendevi ",1,"?"],equalto:"Questo valore deve essere identico.",integer:"Questo valore deve essere un numero valido.",length:["La lunghezza di questo valore deve essere compresa fra ",1," e ",2," caratteri."],max:["Questo valore deve essere minore di ",1,"."],maxarray:["Puoi aggiungere al massimo ",{t:"ifparam",p:1,value:"1",subs:["1 articolo"],subselse:[1," articoli"]},"."],maxcheck:["Devi scegliere al pi\xF9 ",1," opzioni."],maxlength:["Questo valore \xE8 troppo lungo. La lunghezza massima \xE8 di ",1," caratteri."],min:["Questo valore deve essere maggiore di ",1,"."],minarray:["Devi aggiungere almeno ",{t:"ifparam",p:1,value:"1",subs:["1 articolo"],subselse:[1," articoli"]},"."],mincheck:["Devi scegliere almeno ",1," opzioni."],minlength:["Questo valore \xE8 troppo corto. La lunghezza minima \xE8 di ",1," caratteri."],notblank:"Questo valore non deve essere vuoto.",number:"Questo valore deve essere un numero valido.",pattern:"Questo valore non \xE8 corretto.",range:["Questo valore deve essere compreso tra ",1," e ",2,"."],required:"Questo valore \xE8 richiesto.",step1mismatch:"Il valore deve essere un numero intero",stepmismatch:["Il valore dovrebbe essere un multiplo di ",1,"."],time:"Questo non \xE8 un orario valido",unacceptableemail:"Questo indirizzo email non \xE8 accettabile qui",upload_cannotcheck:"Questo file non pu\xF2 essere caricato poich\xE9 al momento non siamo in grado di verificarlo",upload_suspicious:"Questo file sembra sospetto e purtroppo non pu\xF2 essere caricato",url:"Questo valore deve essere un URL valido.",formunavailable:"This form is currently unavailable",maxheight:["The image is too big. It should be at most ",2," pixels high."],maxsignupsreached:"The maximum number of signups has been reached",maxwidth:["The image is too big. It should be at most ",2," pixels wide."],minheight:["The image is too small. It should be at least ",2," pixels high."],minwidth:["The image is too small. It should be at least ",2," pixels wide."]},"imgedit-explain-upload":"Drag and drop files here or click to upload"}}});mo("publisher","xt",{site:{forms:{"imgedit-explain-upload":"Drag and drop files here or click to upload","imgedit-groupelement-replace":[1,", Replace image"],"imgedit-groupelement-upload":[1,", Upload image"],"imgedit-remove":"Remove image",nextpage:"Next",previouspage:"Previous",selectfile:"Select file","splitdatetime-day-arialabel":"day","splitdatetime-hours-arialabel":"hour","splitdatetime-minutes-arialabel":"minute","splitdatetime-month-arialabel":"month","splitdatetime-seconds-arialabel":"second","splitdatetime-year-arialabel":"year",starsrequired:"* indicates a required field",submit:"Submit","upload-emptytext":"No file chosen","upload-filename":["Uploaded file is ",1],"upload-remove":"Remove file",addressfield:{address_not_found:"The address could not be found.",invalid_nr_detail:"Invalid house number.",invalid_zip:"Invalid ZIP or postal code.",zip_not_found:"Unknown combination of postal code and house number."},commonerrors:{alphanum:"This value should be alphanumeric.",badfiletype:"This file type is not allowed",cannotprocessfile:"This file looks suspicious and can unfortunately not be uploaded",check:["You must select between ",1," and ",2," choices."],date:"This is not a valid date",default:"This value seems to be invalid.",digits:"This value should be digits.",email:"This value should be a valid email.",email_baddomain:["Due to difficulties with mailing to ",1," email addresses we kindly request you to use an alternative email provider."],email_suggestion:["Did you mean ",1,"?"],equalto:"This value should be the same.",formunavailable:"This form is currently unavailable",integer:"This value should be a valid integer.",length:["This value length is invali
10d. It should be between ",1," and ",2," characters long."],max:["This value should be lower than or equal to ",1,"."],maxarray:["You can add at most ",{t:"ifparam",p:1,value:"1",subs:["1 item"],subselse:[1," items"]},"."],maxcheck:["You must select ",{t:"ifparam",p:1,value:"1",subs:["1 choice"],subselse:[1," choices"]}," or fewer."],maxheight:["The image is too big. It should be at most ",2," pixels high."],maxlength:["This value is too long. It should have ",{t:"ifparam",p:1,value:"1",subs:["1 character"],subselse:[1," characters"]}," or fewer."],maxsignupsreached:"The maximum number of signups has been reached",maxwidth:["The image is too big. It should be at most ",2," pixels wide."],min:["This value should be greater than or equal to ",1,"."],minarray:["You must add at least ",{t:"ifparam",p:1,value:"1",subs:["1 item"],subselse:[1," items"]},"."],mincheck:["You must select at least ",{t:"ifparam",p:1,value:"1",subs:["1 choice"],subselse:[1," choices"]},"."],minheight:["The image is too small. It should be at least ",2," pixels high."],minlength:["This value is too short. It should have ",{t:"ifparam",p:1,value:"1",subs:["1 character"],subselse:[1," characters"]}," or more."],minwidth:["The image is too small. It should be at least ",2," pixels wide."],notblank:"This value should not be blank.",number:"This value should be a valid number.",pattern:"This value seems to be invalid.",range:["This value should be between ",1," and ",2,"."],required:"This value is required.",step1mismatch:"The value must be a whole number",stepmismatch:["The value should be a multiple of ",1,"."],time:"This is not a valid time",unacceptableemail:"This email address is not acceptable here",upload_cannotcheck:"This file cannot be uploaded as we are currently unable to verify it",upload_suspicious:"This file looks suspicious and can unfortunately not be uploaded",url:"This value should be a valid url."}}}});function H_(i,e){if(e.includes(i))return!0;let t=i.split("/")[0];return!!(["image","video","audio"].includes(t)&&e.includes(t+"/*"))}var go=class extends Ct{root;maindiv;group;currentFiles=new Array;maxFiles;constructor(){super(),this.root=this.attachShadow({mode:"open",delegatesFocus:!0}),this.maindiv=document.createElement("div"),this.maindiv.inert=this.disabled;let e=document.createElement("link");
10e.rel="stylesheet",e.href="/.wh/ea/p/forms/controls.css",this.root.append(e,this.maindiv),this.group=this.closest(".wh-form__fieldgroup"),this.whFormsApiChecker=async()=>{await this._check()},this.maxFiles=parseInt(this.getAttribute("max-files"))||1,this.getAttribute("value")&&this.#e(JSON.parse(this.getAttribute("value"))),this.group&&(this.group.addEventListener("dragover",t=>t.preventDefault()),this.group.addEventListener("dragenter",t=>t.preventDefault()),this.group.addEventListener("drop",t=>this.doDrop(t)))}isSet(){return this.currentFiles.length>0}async _check(){let e=this.required&&!this.isSet();return e?_e(this,v("publisher:site.forms.commonerrors.required"),{reportimmediately:!1}):_e(this,"",{reportimmediately:!1}),e}refreshState(){this.maindiv.inert=this.disabled}get value(){return this.currentFiles}set value(e){this.#e(e),this.refresh()}#e(e){let t=[];for(let o of e){if(o?.file){if(!this._isAcceptableType(o.file.type))throw new Error(`File type ${o.file.type} is not acceptable for ${mi(this)}`);t.push({fileName:o.fileName||o.file.name,file:o.file,link:null})}else if(o?.link)t.push({fileName:o.fileName||"",file:null,link:o.link});else throw new Error(`Incorrect value type received for ${mi(this)} - expect 'file' or 'link' to be set`);if(t.length>=this.maxFiles)break}this.currentFiles=t}_isAcceptableType(e){let t=this.getAttribute("accept")?.split(",").map(o=>o.trim())??[];return!t.length||H_(e,t)}doDrop(e){e.preventDefault();let t=e.dataTransfer?.files;t&&this.processUpload(t[0])}async uploadFile(e){var s=[];try{e.preventDefault();if(this.disabled||this.currentFiles.length>=this.maxFiles)return;let t=this.getAttribute("accept")?.split(",")??[];let o=Ut(s,G());void 0;let n=await Gc({accept:t});if(!n)return;await this.processUpload(n)}catch(r){var l=r,a=!0}finally{Wt(s,l,a)}}async processUpload(e){if(!(this.disabled||this.currentFiles.length>=this.maxFiles)){if(!this._isAcceptableType(e.type)){let t=this.dataset.whAccepterror||v("publisher:site.forms.commonerrors.badfiletype");_e(this,t,{reportimmediately:!0});return}this.currentFiles.push({fileName:e.name,file:e,link:null}),this.refresh(),F(this,"change",{bubbles:!0,cancelable:!1})}}deleteFile(e,t){e&&V(e),this.currentFiles.splice(t,1),this.refresh(),F(this,"change",{bubbles:!0,cancelable:!1})}setupUploadButton(e){e.addEventListener("click",t=>{this.uploadFile(t)})}setupDeleteButton(e,t){e.addEventListener("click",o=>this.deleteFile(o,t)),e.ariaLabel=v("publisher:site.forms.imgedit-remove")}};re();var xn=class extends go{constructor(){super(),this.refresh()}#e(){let e=document.createElement("div");return e.classList.add("file"),e}refresh(){let e=[];for(let[t,o]of this.currentFiles.entries()){let n=this.#e(),s=Pc(o)?o.name:o.fileName,r=p("input",{part:"filename",class:"file__name",type:"text",value:s,readonly:!0}),l=p("button",{part:"button deletebutton",class:"deletebutton file__deletebutton"});this.setupDeleteButton(l,t),n.append(r,l),e.push(n)}if(this.currentFiles.length<this.maxFiles){let t=this.#e();t.classList.add("file--placeholder");let o=p("input",{part:"filename",class:"file__name",type:"text",value:"",placeholder:v("publisher:site.forms.upload-emptytext"),disabled:!0,readonly:!0}),n=p("button",{part:"button selectbutton",type:"button",class:"wh-form__uploadfieldselect wh-form__button"},p("span",{class:"wh-form__buttonlabel"},v("publisher:site.forms.selectfile")));this.setupUploadButton(t),t.append(o,n),e.push(t)}this.maindiv.replaceChildren(...e)}};M();re();te();zr();var au,O_=new WeakMap;function U_(i){return Fi(O_,i,{insert:()=>{let e=URL.createObjectURL(i);return au||=new FinalizationRegistry(t=>URL.revokeObjectURL(t)),au.register(i,e),e}})}async function W_(i){let e=await Wc(await Kc(i));return{width:e.naturalWidth,height:e.naturalHeight}}var yn=class i extends go{static observedAttributes=["min-width","max-width","min-height","max-height"];static texts=null;minWidth;maxWidth;minHeight;maxHeight;constructor(){super(),this.maindiv.classList.add("images"),this.minWidth=parseInt(this.getAttribute("min-width")||"0")||0,this.maxWidth=parseInt(this.getAttribute("max-width")||"0")||0,this.minHeight=parseInt(this.getAttribute("min-height")||"0")||0,this.maxHeight=parseInt(this.getAttribute("max-height")||"0")||0,this.refresh()}attributeChangedCallback(e,t,o){let n=parseInt(o);if(!isNaN(n))switch(e){case"min-width":{this.minWidth=n;break}case"max-width":{this.maxWidth=n;break}case"min-height":{this.minHeight=n;break}case"max-height":{this.maxHeight=n;break}}}static setTexts(e){i.texts||(i.texts={}),Object.assign(i.texts,e),w("wh-imgedit").forEach(t=>t.refresh())}async _check(){let e=await super._check();if(!e&&this.isSet()&&(this.minWidth||this.maxWidth||this.minHeight||this.maxHeight)){for(let t of this.currentFiles)if(t.file){let o=await W_(t.file);this.minWidth&&o.width<this.minWidth?_e(this,v("publisher:site.forms.commonerrors.minwidth",o.width,this.minWidth),{reportimmediately:!1}):this.maxWidth&&o.width>this.maxWidth?_e(this,v("publisher:site.forms.commonerrors.maxwidth",o.width,this.maxWidth),{reportimmediately:!1}):this.minHeight&&o.height<this.minHeight?_e(this,v("publisher:site.forms.commonerrors.minheight",o.height,this.minHeight),{reportimmediately:!1}):this.maxHeight&&o.height>this.maxHeight&&_e(this,v("publisher:site.forms.commonerrors.maxheight",o.height,this.maxHeight),{reportimmediately:!1})}}return e}refresh(){let e=[];for(let[t,o]of this.currentFiles.entries()){let n=W("div",{class:"image",part:"image"}),s=W("img",{class:"image__img",src:o.link??U_(o.file)}),r=W("button",{part:"button deletebutton",class:"deletebutton image__deletebutton"});this.setupDeleteButton(r,t),n.append(s,r),e.push(n)}if(this.currentFiles.length<this.maxFiles){let t=W("div",{class:"image image--placeholder",part:"image placeholder"}),o=W("div",{class:"image__content"}),n=W("div",{class:"image__uploadicon",part:"uploadicon"}),s=W("div",{class:"image__explain",textContent:i.texts?.explainUpload||v("publisher:site.forms.imgedit-explain-upload")});t.append(o),o.append(n,s),t.tabIndex=0,this.setupUploadButton(t),e.push(t)}this.maindiv.replaceChildren(...e)}};re();N();Ko();N();Ko();Fc();te();M();M();var kn,Ws;window.$wh__ongooglerecaptchaloaded=function(){kn.resolve()};function Y_(){return kn=Promise.withResolvers(),document.querySelector("head,body").append(p("script",{src:"https://www.google.com/recaptcha/api.js?onload=$wh__ongooglerecaptchaloaded&render=explicit"})),kn.promise}async function X_(i,e,t){let o=G({modal:!0});try{await(kn?kn.promise:Y_());let n=p("div",{class:"wh-captcha__googlerecaptchaholder"});if(e.append(n),i.apikey==="mock")n.appendChild(p("label",{class:"wh-captcha__mock"},p("input",{type:"checkbox",on:{click:()=>t.onResponse("mock")}}),"I am a human, beep-bop"));else{let s=window.grecaptcha.render(n,{sitekey:i.apikey,...Ws?.language?{hl:Ws.language}:{},callback:()=>{let r=window.grecaptcha?window.grecaptcha.getResponse(s):"";t.onResponse(r)}})}}finally{o.release()}}function rl(i){if(fi["google-recaptcha"])throw new Error("Duplicate google recaptcha initialization");Ws={...Ws,...i},fi["google-recaptcha"]={initialize:X_}}M();var du="https://cdn.jsdelivr.net/npm/@friendlycaptcha/[email protected]/site.min.js",cu,lu=!1;async function G_(i,e,t){let o=document.createElement("div");if(o.className="frc-captcha",o.dataset.sitekey=i.apikey,cu==="eu"&&(o.dataset.apiEndpoint="eu"),o.addEventListener("frc:widget.complete",(a=>t.onResponse(a.detail.response))),e.append(o),lu)window.frcaptcha.attach();else{var n=[];try{let a=Ut(n,G());void 0;await $t(du,{module:!0});lu=!0}catch(s){var r=s,l=!0}finally{Wt(n,r,l)}}}function al(i){if(fi["friendly-captcha"])throw new Error("Duplicate friendly captcha initialization");i?.script&&(du=i.script),i?.endpoint&&(cu=i.endpoint),fi["friendly-captcha"]={initialize:G_}}function Vs(i){nl(i?.handlers??{}),i&&ou(xt(i,["handlers"]))}M();ie();var J_=class{main;placeholder;values;single;multiString;max;value;valueText;valueDelete;valueOut;deselect;deselectPath;arrow;arrowClose;arrowOpen;content;contentOpen;dirAbove;dirBelow;search;searchHighlighter;searching;status;addable;addablePath;list;optgroup;optgroupLabel;optgroupLabelText;optgroupActions;optgroupSelectAll;optgroupSelectAllBox;optgroupSelectAllCheck;optgroupClosable;option;optionDelete;highlighted;modalOverlay;modalDialog;modalTitle;modalClose;modalContent;mainOpen;close;selected;error;disabled;hide;constructor(i){i||={};let e=(t="",o="")=>`${t} ${o}`.trim();this.main=e("ss-main",i.main),this.placeholder=e("ss-placeholder",i.placeholder),this.values=e("ss-values",i.values),this.single=e("ss-single",i.single),this.multiString=e("ss-multi-string",i.multiString),this.max=e("ss-max",i.max),this.value=e("ss-value",i.value),this.valueText=e("ss-value-text",i.valueText),this.valueDelete=e("ss-value-delete",i.valueDelete),this.valueOut=e("ss-value-out",i.valueOut),this.deselect=e("ss-deselect",i.deselect),this.deselectPath=i.deselectPath||"M10,10 L90,90 M10,90 L90,10",this.arrow=e("ss-arrow",i.arrow),this.arrowClose=i.arrowClose||"M10,30 L50,70 L90,30",this.arrowOpen=i.arrowOpen||"M10,70 L50,30 L90,70",this.content=e("ss-content",i.content),this.contentOpen=e("ss-open",i.contentOpen),this.dirAbove=e("ss-dir-above",i.dirAbove),this.dirBelow=e("ss-dir-below",i.dirBelow),this.search=e("ss-search",i.search),this.searchHighlighter=e("ss-search-highlight",i.searchHighlighter),this.searching=e("ss-searching",i.searching),this.status=e("ss-status",i.status),this.addable=e("ss-addable",i.addable),this.addablePath=i.addablePath||"M50,10 
10L50,90 M10,50 L90,50",this.list=e("ss-list",i.list),this.optgroup=e("ss-optgroup",i.optgroup),this.optgroupLabel=e("ss-optgroup-label",i.optgroupLabel),this.optgroupLabelText=e("ss-optgroup-label-text",i.optgroupLabelText),this.optgroupActions=e("ss-optgroup-actions",i.optgroupActions),this.optgroupSelectAll=e("ss-selectall",i.optgroupSelectAll),this.optgroupSelectAllBox=i.optgroupSelectAllBox||"M15,15 L85,15 L85,85 L15,85 Z",this.optgroupSelectAllCheck=i.optgroupSelectAllCheck||"M25,50 L42,68 L75,32",this.optgroupClosable=e("ss-closable",i.optgroupClosable),this.option=e("ss-option",i.option),this.optionDelete=i.optionDelete||"M10,10 L90,90 M10,90 L90,10",this.highlighted=e("ss-highlighted",i.highlighted),this.modalOverlay=e("ss-modal-overlay",i.modalOverlay),this.modalDialog=e("ss-modal-dialog",i.modalDialog),this.modalTitle=e("ss-modal-title",i.modalTitle),this.modalClose=e("ss-modal-close",i.modalClose),this.modalContent=e("ss-modal-content",i.modalContent),this.mainOpen=e("ss-open",i.mainOpen),this.close=e("ss-close",i.close),this.selected=e("ss-selected",i.selected),this.error=e("ss-error",i.error),this.disabled=e("ss-disabled",i.disabled),this.hide=e("ss-hide",i.hide)}getFirst(i){return this[i].split(" ")[0]}},En=200,Q_=["transform","opacity"];function Z_(i,e=En){let t=i.trim();if(!t)return e;if(t.endsWith("ms")){let n=parseFloat(t);return Number.isNaN(n)?e:n}if(t.endsWith("s")){let n=parseFloat(t);return Number.isNaN(n)?e:n*1e3}let o=parseFloat(t);return Number.isNaN(o)?e:o}function uu(i,e=En){return Z_(getComputedStyle(i).getPropertyValue("--ss-animation-timing").trim(),e)}function ll(i,e,t=En){let o=uu(i,t)+50;return e===void 0?o:Math.max(o,e)}function mu(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function eb(i){return i===void 0?null:new Set(Array.isArray(i)?i:[i])}function tb(i,e,t=En,o){if(mu()||o?.aborted)return Promise.resolve();let n=eb(e);return new Promise(s=>{let r=null,l=!1,a=()=>{l||(l=!0,i.removeEventListener("transitionend",c),o?.removeEventListener("abort",d),r&&clearTimeout(r),s())},d=()=>a(),c=h=>{h.target===i&&(n&&(!n.has(h.propertyName)||(n.delete(h.propertyName),n.size>0))||a())};o?.addEventListener("abort",d,{once:!0}),i.addEventListener("transitionend",c),r=setTimeout(a,t)})}function ib(i,e,t=En,o){return mu()||o?.aborted?Promise.resolve():new Promise(n=>{let s=null,r=!1,l=()=>{r||(r=!0,i.removeEventListener("animationend",d),o?.removeEventListener("abort",a),s&&clearTimeout(s),n())},a=()=>l(),d=c=>{c.target===i&&(e&&c.animationName!==e||l())};o?.addEventListener("abort",a,{once:!0}),i.addEventListener("animationend",d),s=setTimeout(l,t)})}var ob=class{id="";style="";class=[];isMultiple=!1;isOpen=!1;isFullOpen=!1;disabled;alwaysOpen;showSearch;focusSearch;keepSearch;ariaLabel;searchPlaceholder;searchText;searchingText;resultsText;deselectText;removeText;searchHighlight;closeOnSelect;contentLocation;contentPosition;contentWidth;openPosition;placeholderText;allowDeselect;hideSelected;multiString;keepOrder;showOptionTooltips;minSelected;maxSelected;timeoutDelay;maxValuesShown;maxValuesMessage;addableText;selectAll;selectAllText;unselectAllText;modal;modalTitle;constructor(i){i||={},this.id="ss-"+dl(),this.style=i.style||"",this.class=i.class||[],this.disabled=i.disabled!==void 0&&i.disabled,this.alwaysOpen=i.alwaysOpen!==void 0&&i.alwaysOpen,this.showSearch=i.showSearch===void 0||i.showSearch,this.focusSearch=i.focusSearch===void 0||i.focusSearch,this.keepSearch=i.keepSearch!==void 0&&i.keepSearch,this.ariaLabel=i.ariaLabel||"Combobox",this.searchPlaceholder=i.searchPlaceholder||"Search...",this.searchText=i.searchText||"No Results",this.searchingText=i.searchingText||"Searching...",this.resultsText=i.resultsText||"{count} results available",this.deselectText=i.deselectText||"Clear",this.removeText=i.removeText||"Remove",this.searchHighlight=i.searchHighlight!==void 0&&i.searchHighlight,this.closeOnSelect=i.closeOnSelect===void 0||i.closeOnSelect,this.contentLocation=i.contentLocation||document.body,this.contentPosition=i.contentPosition||"absolute",this.contentWidth=i.contentWidth||"",this.openPosition=i.openPosition||"auto",this.placeholderText=i.placeholderText===void 0?"Select Value":i.placeholderText,this.allowDeselect=i.allowDeselect!==void 0&&i.allowDeselect,this.hideSelected=i.hideSelected!==void 0&&i.hideSelected,this.multiString=i.multiString!==void 0&&i.multiString,this.keepOrder=i.keepOrder!==void 0&&i.keepOrder,this.showOptionTooltips=i.showOptionTooltips!==void 0&&i.showOptionTooltips,this.minSelected=i.minSelected||0,this.maxSelected=i.maxSelected||1e3,this.timeoutDelay=i.timeoutDelay||200,this.maxValuesShown=i.maxValuesShown||20,this.maxValuesMessage=i.maxValuesMessage||"{number} selected",this.addableText=i.addableText||'Press "Enter" to add {value}',this.selectAll=i.selectAll!==void 0&&i.selectAll,this.selectAllText=i.selectAllText||"Select All",this.unselectAllText=i.unselectAllText||"Unselect All",this.modal=i.modal||"mobile",this.modalTitle=i.modalTitle||""}};function gu(i){if(!i)return{};let e={};for(let t of Object.keys(i)){let o=i[t];o!==void 0&&(e[t]=o)}return e}function nb(i){let e=i.cloneNode(!0);return e.querySelectorAll("select, option, optgroup, textarea, input, button").forEach(t=>t.remove()),e.textContent?.replace(/\s+/g," ").trim()||""}
vendor: 72,015 bytes, line 10
10function sb(i){if(i.labels&&i.labels.length>0){let e=Array.from(i.labels).map(nb).filter(Boolean);if(e.length>0)return[...new Set(e)].join(" ")}return i.getAttribute("aria-label")?.trim()||""}function dl(){return Math.random().toString(36).substring(2,10)}function fu(i,e){function t(n,s){return s&&n&&n.classList&&n.classList.contains(s)||s&&n&&n.dataset&&n.dataset.id&&n.dataset.id===e?n:null}function o(n,s){return!n||n===document?null:t(n,s)?n:o(n.parentNode,s)}return t(i,e)||o(i,e)}function Bs(i,e=50,t=!1){let o;return function(...n){let s=self,r=()=>{o=null,t||i.apply(s,n)},l=t&&!o;clearTimeout(o),o=setTimeout(r,e),l&&i.apply(s,n)}}function Tn(i,e){if(i.length!==e.length)return!1;let t=[...i].sort(),o=[...e].sort();return t.every((n,s)=>n===o[s])}var rb=["id","value","text","html","defaultSelected","selected","display","disabled","placeholder","class","style","mandatory"];function ab(i,e){let t=Object.keys(i),o=Object.keys(e);if(t.length!==o.length)return!1;for(let n of t)if(i[n]!==e[n])return!1;return!0}function pu(i,e){switch(e){case"id":return i.id||"";case"value":return i.value===void 0?i.text||"":i.value||"";case"text":return i.text||"";case"html":return i.html||"";case"defaultSelected":return i.defaultSelected??!1;case"selected":return i.selected??!1;case"display":return i.display??!0;case"disabled":return i.disabled??!1;case"placeholder":return i.placeholder??!1;case"class":return i.class||"";case"style":return i.style||"";case"mandatory":return i.mandatory??!1;default:return i.data||{}}}function hu(i){return!!i&&typeof i=="object"&&"label"in i&&"options"in i}function _u(i,e){for(let t of rb)if(pu(i,t)!==pu(e,t))return!1;return ab(i.data||{},e.data||{})}function lb(i,e){let t=l=>({id:l.id||"",label:l.label||"",selectAll:l.selectAll??!1,closable:l.closable||"off"}),o=t(i),n=t(e);if(o.id!==n.id||o.label!==n.label||o.selectAll!==n.selectAll||o.closable!==n.closable)return!1;let s=i.options||[],r=e.options||[];if(s.length!==r.length)return!1;for(let l=0;l<s.length;l++)if(!_u(s[l],r[l]))return!1;return!0}function db(i,e){if(i===e)return!0;if(i.length!==e.length)return!1;for(let t=0;t<i.length;t++){let o=i[t],n=e[t],s=hu(o);if(s!==hu(n))return!1;if(s){if(!lb(o,n))return!1;continue}if(!_u(o,n))return!1}return!0}function cb(i){let e=i.replace(/[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g,t=>"-"+t.toLowerCase());return i[0]===i[0].toUpperCase()?e.substring(1):e}function pb(i,e=typeof window<"u"?window.innerWidth:768){return i==="on"||i==="mobile"&&e<768}var hb=class{handlers;attached=!1;constructor(i){this.handlers=i}attach(i){this.attached||(this.attached=!0,window.addEventListener("resize",this.resizeHandler,!1),i.listenScroll&&window.addEventListener("scroll",this.scrollHandler,!1),document.addEventListener("visibilitychange",this.visibilityHandler))}attachDocumentClick(){document.addEventListener("click",this.handlers.onDocumentClick)}detachDocumentClick(){document.removeEventListener("click",this.handlers.onDocumentClick)}detach(i){this.attached&&(this.attached=!1,this.detachDocumentClick(),window.removeEventListener("resize",this.resizeHandler,!1),i.listenScroll&&window.removeEventListener("scroll",this.scrollHandler,!1),document.removeEventListener("visibilitychange",this.visibilityHandler))}resizeHandler=Bs(()=>{this.handlers.onWindowResize()});scrollHandler=Bs(()=>{this.handlers.onWindowScroll()});visibilityHandler=()=>{this.handlers.onVisibilityChange()}},ub=class{handlers;options;state="closed";pendingTimer=null;waitResolvers=[];generation=0;animationAbort=null;constructor(i,e){this.handlers=i,this.options=e}get isOpen(){return this.state==="opening"||this.state==="open"}get isFullOpen(){return this.state==="open"}async requestOpen(){if(this.state==="opening"||this.state==="open")return;this.cancelPending();let i=++this.generation;if(this.handlers.beforeOpen&&this.handlers.beforeOpen(),this.state="opening",await this.waitForPhase("open",i),i!==this.generation){this.state==="opening"&&(this.state="closed");return}this.state="open",this.handlers.afterOpen&&this.handlers.afterOpen(),this.handlers.onOpenReady&&this.handlers.onOpenReady()}async requestClose(i={source:"api",selectionChanged:!1}){if(this.state==="closed"||this.state==="closing"||this.handlers.beforeClose&&this.handlers.beforeClose(i)===!1)return!1;this.cancelPending();let e=++this.generation;return this.handlers.onClose&&this.handlers.onClose(i),this.state="closing",await this.waitForPhase("close",e),e===this.generation&&(this.state="closed",this.handlers.afterClose&&this.handlers.afterClose(),this.handlers.onCloseReady&&this.handlers.onCloseReady(),!0)}cancelPending(){this.generation++,this.animationAbort?.abort(),this.animationAbort=null,this.pendingTimer&&=(clearTimeout(this.pendingTimer),null);let i=this.waitResolvers.splice(0);for(let e of i)e()}destroy(){this.cancelPending(),this.state="closed"}waitForPhase(i,e){return new Promise(t=>{let o=!1,n=()=>{if(o)return;o=!0;let s=this.waitResolvers.indexOf(n);s!==-1&&this.waitResolvers.splice(s,1),t()};if(this.waitResolvers.push(n),this.options.waitForAnimation){let s=new AbortController;this.animationAbort=s,this.options.waitForAnimation(i,s.signal).catch(()=>{}).finally(()=>{this.animationAbort===s&&(this.animationAbort=null),n()})}else this.pendingTimer=setTimeout(()=>{this.pendingTimer=null,n()},this.options.timeoutDelay)}).then(()=>{this.generation})}},he=class{id;value;text;html;defaultSelected;selected;display;disabled;placeholder;class;style;data;mandatory;constructor(i){this.id=!i.id||i.id===""?dl():i.id,this.value=i.value===void 0?i.text||"":i.value||"",this.text=i.text||"",this.html=i.html||"",this.defaultSelected=i.defaultSelected!==void 0&&i.defaultSelected,this.selected=i.selected!==void 0&&i.selected,this.display=i.display===void 0||i.display,this.disabled=i.disabled!==void 0&&i.disabled,this.mandatory=i.mandatory!==void 0&&i.mandatory,this.placeholder=i.placeholder!==void 0&&i.placeholder,this.class=i.class||"",this.style=i.style||"",this.data=gu(i.data)}},Be=class{id;label;selectAll;closable;options;constructor(i){if(this.id=!i.id||i.id===""?dl():i.id,this.label=i.label||"",this.selectAll=i.selectAll!==void 0&&i.selectAll,this.closable=i.closable||"off",this.options=[],i.options)for(let e of i.options)this.options.push(new he(e))}},mb=class{selectType="single";data=[];selectedOrder=[];catalog=null;constructor(i,e){this.selectType=i,this.setData(e),this.snapshotCatalog()}validateDataArray(i){if(!Array.isArray(i))return Error("Data must be an array");for(let e of i)if(e)if(e instanceof Be||"label"in e){if(!("label"in e))return Error("Optgroup must have a label");if("options"in e&&e.options)for(let t of e.options){let o=this.validateOption(t);if(o)return o}}else if(e instanceof he||"text"in e){let t=this.validateOption(e);if(t)return t}else return Error("Data object must be a valid optgroup or option");return null}validateOption(i){return"text"in i?null:Error("Option must have a text")}partialToFullData(i){let e=[];return i.forEach(t=>{if(t){if(t instanceof Be||"label"in t){let o=[];"options"in t&&t.options&&t.options.forEach(n=>{o.push(new he(n))}),o.length>0&&e.push(new Be(t))}(t instanceof he||"text"in t)&&e.push(new he(t))}}),e}snapshotCatalog(){this.catalog=this.cloneData(this.data)}getCatalogData(){return this.cloneData(this.catalog??this.data)}cloneData(i){return i.map(e=>e instanceof Be?new Be({id:e.id,label:e.label,selectAll:e.selectAll,closable:e.closable,options:e.options.map(t=>new he(t instanceof he?{...t}:t))}):new he({...e}))}optionMatchesSelected(i,e){return i.id===e.id||e.value!==""&&i.value!==""&&i.value===e.value}findOptionInData(i,e){for(let t of i){if(t instanceof he){if(this.optionMatchesSelected(t,e))return t;continue}for(let o of t.options)if(this.optionMatchesSelected(o,e))return o}return null}setData(i,e=!1){let t=this.partialToFullData(i),o=[];if(e){o=this.getSelectedOptions();let n=[];o.forEach(l=>{this.findOptionInData(t,l)||n.push(l)}),this.data=[...n,...t];let s=this.selectType==="single"&&o.length===0,r=o.map(l=>{let a=this.findOptionInData(this.data,l);return a?a.id:l.id});this.setSelectedBy("id",r,s)}else this.data=t;!e&&this.selectType==="single"&&this.setSelectedBy("id",this.getSelected(),!1)}getData(i=!0){return this.filter(null,!0,i)}getDataOptions(i=!0){return this.filter(null,!1,i)}addOption(i,e=!1){if(e){let t=[new he(i)];this.setData(t.concat(this.getData()))}else this.setData(this.getData().concat(new he(i)))}setSelectedBy(i,e,t=!1){let o=null,n=!1,s=[];for(let l of this.data){if(l instanceof Be)for(let a of l.options){o||=a;let d=a[i]||"";a.selected=!n&&e.includes(d),a.selected&&(s.push(a),this.selectType==="single"&&(n=!0))}l instanceof he&&(o||=l,l.selected=!n&&e.includes(l[i]),l.selected&&(s.push(l),this.selectType==="single"&&(n=!0)))}this.selectType==="single"&&o&&!n&&!t&&(o.selected=!0,s.push(o));let r=e.map(l=>s.find(a=>a[i]===l)?.id||"");this.selectedOrder=r}getSelected(){return this.getSelectedOptions().map(i=>i.id)}getSelectedValues(){return this.getSelectedOptions().map(i=>i.value)}getSelectedOptions(){let i=[];for(let e of this.data)if(e instanceof Be)for(let t of e.options)t.selected&&i.push(t);else e.selected&&i.push(e);return i}getOptgroupByID(i){for(let e of this.data)if(e instanceof Be&&e.id===i)return e;return null}getOptionByID(i){for(let e of this.data)if(e instanceof Be){for(let t of e.options)if(t.id===i)return t}else if(e.id===i)return e;return null}getSelectType(){return this.selectType}getFirstOption(){let i=null;for(let e of this.data)if(e instanceof Be?i=e.options[0]:e instanceof he&&(i=e),i)break;return i}search(i,e){return i=i.trim(),i===""?this.getData(!1):this.filter(t=>e(t,i),!0,!1)}createOptgroupView(i,e){let t=new Be({id:i.id,label:i.label,selectAll:i.selectAll,closable:i.closable,options:[]});return t.options=e,t}filter(i,e,t=!0){let o=[];return this.data.forEach(n=>{if(n instanceof Be){let s=[];if(n.options.forEach(r=>{(!i||i(r))&&(e?s.push(t?new he(r):r):o.push(t?new he(r):r))}),s.length>0)if(t){let r=new Be(n);r.options=s,o.push(r)}else o.push(this.createOptgroupView(n,s))}n instanceof he&&(!i||i(n))&&o.push(t?new he(n):n)}),o}selectedOrderOptions(i){let e=[];return this.selectedOrder.forEach(t=>{let o=i.find(n=>n.id===t);o&&e.push(o)}),i.forEach(t=>{let o=!1;e.forEach(n=>{if(t.id===n.id){o=!0;return}}),o||e.push(t)}),e}},gb=class{settings;store;callbacks;lastSelectedOption;lastRenderedOptions;optionsListIsFullData=!1;lastSearchFilterTerm="";main;content;classes;positionObserver=null;positionObserverRaf=0;overflowShiftRaf=0;modalElements=null;modalSessionActive=null;bodyScrollLocked=!1;savedBodyOverflow="";constructor(i,e,t,o){this.store=t,this.settings=i,this.classes=e,this.callbacks=o,this.lastSelectedOption=null,this.lastRenderedOptions=[],this.main=this.mainDiv(),this.content=this.contentDiv(),this.updateClassStyles(),this.updateAriaAttributes(),this.settings.contentPosition!=="relative"&&(this.content.main.style.top="-9999px",this.content.main.style.left="-9999px",this.content.main.style.margin="0",this.content.main.style.width="auto"),this.settings.contentLocation&&this.settings.contentLocation.appendChild(this.content.main),this.settings.modal!=="off"&&!this.settings.alwaysOpen&&(this.modalElements=this.createModalElements(),document.body.appendChild(this.modalElements.overlay))}requestClose(i,e){this.callbacks.close({source:i,option:e?.option,selectionChanged:e?.selectionChanged??!1})}selectionChanged(i,e){if(i.length!==e.length)return!0;let t=i.map(n=>n.id).sort(),o=e.map(n=>n.id).sort();return t.some((n,s)=>n!==o[s])}closeOnSingleSelectReclick(i){this.settings.closeOnSelect&&this.requestClose("select",{option:i,selectionChanged:!1})}addClasses(i,e){if(!e||e.trim()==="")return;let t=e.split(" ").filter(o=>o.trim()!=="");for(let o of t)i.classList.add(o.trim())}removeClasses(i,e){if(!e||e.trim()==="")return;let t=e.split(" ").filter(o=>o.trim()!=="");for(let o of t)i.classList.remove(o.trim())}enable(){this.removeClasses(this.main.main,this.classes.disabled),this.main.main.setAttribute("aria-disabled","false"),this.content.search.input.disabled=!1}disable(){this.addClasses(this.main.main,this.classes.disabled),this.main.main.setAttribute("aria-disabled","true"),this.content.search.input.disabled=!0}open(){this.main.arrow.path.setAttribute("d",this.classes.arrowOpen),this.main.main.setAttribute("aria-expanded","true");let i=this.resolveModalView();if(!i){let t=this.settings.openPosition==="up"?this.classes.dirAbove:this.classes.dirBelow;this.addClasses(this.main.main,t),this.addClasses(this.content.main,t)}this.addClasses(this.content.main,this.classes.contentOpen),this.content.search.input.removeAttribute("aria-hidden"),i?this.showModal():this.moveContent();let e=this.store.getSelectedOptions();if(e.length){let t=e[e.length-1].id,o=this.content.list.querySelector('[data-id="'+t+'"]');o&&this.ensureElementInView(this.content.list,o)}}isModalViewActive(){return this.modalSessionActive===!0}resolveModalView(){return this.settings.alwaysOpen||this.settings.modal==="off"||!this.modalElements?!1:(this.modalSessionActive===null&&(this.modalSessionActive=pb(this.settings.modal)),this.modalSessionActive)}createModalElements(){let i=document.createElement("div");this.addClasses(i,this.classes.modalOverlay),this.addClasses(i,this.classes.hide),i.dataset.id=this.settings.id;let e=document.createElement("div");this.addClasses(e,this.classes.modalDialog),e.setAttribute("role","dialog"),e.setAttribute("aria-modal","true");let t=null;this.settings.modalTitle?(t=document.createElement("div"),this.addClasses(t,this.classes.modalTitle),t.id=`${this.settings.id}-modal-title`,t.textContent=this.settings.modalTitle,e.setAttribute("aria-labelledby",t.id)):e.setAttribute("aria-label",this.settings.ariaLabel);let o=document.createElement("button");o.type="button",this.addClasses(o,this.classes.modalClose),o.setAttribute("aria-label","Close"),o.onclick=r=>{r.stopPropagation(),this.requestClose("modal")};let n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("viewBox","0 0 100 100");let s=document.createElementNS("http://www.w3.org/2000/svg","path");return s.setAttribute("d",this.classes.deselectPath),n.appendChild(s),o.appendChild(n),i.onclick=r=>{r.target===i&&this.requestClose("modal")},t&&e.appendChild(t),i.appendChild(e),{overlay:i,dialog:e,closeButton:o,title:t}}showModal(){this.modalElements&&(this.modalElements.dialog.appendChild(this.content.main),this.addClasses(this.content.main,this.classes.modalContent),this.content.main.appendChild(this.modalElements.closeButton),this.content.main.style.top="",this.content.main.style.left="",this.content.main.style.margin="",this.content.main.style.width="",this.removeClasses(this.modalElements.overlay,this.classes.hide),requestAnimationFrame(()=>{this.modalElements&&this.addClasses(this.modalElements.overlay,this.classes.contentOpen)}),this.lockBodyScroll())}lockBodyScroll(){this.bodyScrollLocked||=(this.savedBodyOverflow=document.body.style.overflow,document.body.style.overflow="hidden",!0)}unlockBodyScroll(){this.bodyScrollLocked&&(document.body.style.overflow=this.savedBodyOverflow,this.bodyScrollLocked=!1,this.savedBodyOverflow="")}restoreContentOffscreen(){this.settings.contentLocation&&this.settings.contentLocation.appendChild(this.content.main),this.settings.contentPosition!=="relative"&&(this.content.main.style.top="-9999px",this.content.main.style.left="-9999px",this.content.main.style.margin="0",this.content.main.style.width="auto")}finalizeModalClose(){this.modalElements&&this.content.main.parentElement===this.modalElements.dialog&&(this.addClasses(this.modalElements.overlay,this.classes.hide),this.removeClasses(this.modalElements.overlay,this.classes.contentOpen),this.removeClasses(this.content.main,this.classes.modalContent),this.modalElements.closeButton.remove(),this.restoreContentOffscreen(),this.unlockBodyScroll())}waitForAnimation(i,e){let t=ll(this.content.main,this.settings.timeoutDelay);return tb(this.content.main,Q_,t,e)}close(){this.main.main.setAttribute("aria-expanded","false"),this.main.arrow.path.setAttribute("d",this.classes.arrowClose);let i=this.modalSessionActive===!0;this.removeClasses(this.content.main,this.classes.contentOpen),i||(this.removeClasses(this.main.main,this.classes.dirAbove),this.removeClasses(this.main.main,this.classes.dirBelow)),i&&this.modalElements&&this.removeClasses(this.modalElements.overlay,this.classes.contentOpen),this.modalSessionActive=null,this.content.search.input.setAttribute("aria-hidden","true"),this.main.main.removeAttribute("aria-activedescendant"),this.clearValueChipHighlight()}clearDirectionClasses(){this.removeClasses(this.main.main,this.classes.dirAbove),this.removeClasses(this.main.main,this.classes.dirBelow),this.removeClasses(this.content.main,this.classes.dirAbove),this.removeClasses(this.content.main,this.classes.dirBelow)}updateClassStyles(){if(this.main.main.className="",this.main.main.removeAttribute("style"),this.content.main.className="",this.content.main.removeAttribute("style"),this.addClasses(this.main.main,this.classes.main),this.addClasses(this.content.main,this.classes.content),this.settings.style!==""&&(this.main.main.style.cssText=this.settings.style,this.content.main.style.cssText=this.settings.style),this.settings.class.length)for(let i of this.settings.class)i.trim()!==""&&(this.main.main.classList.add(i.trim()),this.content.main.classList.add(i.trim()));(this.settings.contentPosition==="relative"||this.settings.contentPosition==="fixed")&&this.content.main.classList.add("ss-"+this.settings.contentPosition)}updateAriaAttributes(){let i=this.content.list.id;this.main.main.role="combobox",this.main.main.setAttribute("aria-haspopup","listbox"),this.main.main.setAttribute("aria-controls",i),this.main.main.setAttribute("aria-expanded","false"),this.content.list.setAttribute("role","listbox"),this.content.list.setAttribute("aria-label",this.settings.ariaLabel+" listbox"),this.settings.isMultiple&&this.content.list.setAttribute("aria-multiselectable","true"),this.content.search.input.setAttribute("aria-controls",i)}mainDiv(){let i=document.createElement("div");i.dataset.id=this.settings.id,i.setAttribute("aria-label",this.settings.ariaLabel),i.tabIndex=0,i.onkeydown=a=>{switch(a.key){case"ArrowUp":case"ArrowDown":return this.callbacks.open(),a.key==="ArrowDown"?this.highlight("down"):this.highlight("up"),!1;case"Tab":return this.requestClose("tab"),!0;case"Enter":case" ":this.callbacks.open();let d=this.content.list.querySelector("."+this.classes.getFirst("highlighted"));return d&&d.click(),!1;case"Escape":return this.requestClose("escape"),!1}return a.key.length===1&&this.callbacks.open(),!0},i.onclick=a=>{this.settings.disabled||(this.settings.isOpen?this.requestClose("toggle"):this.callbacks.open())};let e=document.createElement("div");this.addClasses(e,this.classes.values),i.appendChild(e);let t=document.createElement("div");this.addClasses(t,this.classes.deselect),t.setAttribute("role","button"),t.setAttribute("aria-label",this.settings.deselectText),t.setAttribute("tabindex","0");let o=this.store?.getSelectedOptions();!this.settings.allowDeselect||this.settings.isMultiple&&o&&o.length<=0||this.isAtMinSelected()?this.addClasses(t,this.classes.hide):this.removeClasses(t,this.classes.hide),t.onclick=a=>{if(a.stopPropagation(),this.settings.disabled||this.settings.isMultiple&&this.isAtMinSelected())return;let d=!0,c=this.store.getSelectedOptions(),h=[],m="";if(this.settings.isMultiple){let u=this.settings.minSelected,b=this.store.getSelected();if(u>0&&b.length>u)m=this.getMinimumSelectionIds(),h=c.filter(f=>m.includes(f.id));else if(u<=0)m=[];else return}if(this.callbacks.beforeChange&&(d=this.callbacks.beforeChange(h,c)===!0),d){if(this.settings.isMultiple)this.callbacks.setSelected(m,!1),this.updateDeselectAll();else{let u=this.store.getFirstOption(),b=u?u.id:"";this.callbacks.setSelected(b,!1)}this.settings.closeOnSelect&&this.requestClose("deselect",{selectionChanged:!0}),this.callbacks.afterChange&&this.callbacks.afterChange(this.store.getSelectedOptions())}},t.onkeydown=a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),t.click())};let n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("viewBox","0 0 100 100");let s=document.createElementNS("http://www.w3.org/2000/svg","path");s.setAttribute("d",this.classes.deselectPath),n.appendChild(s),t.appendChild(n),i.appendChild(t);let r=document.createElementNS("http://www.w3.org/2000/svg","svg");this.addClasses(r,this.classes.arrow),r.setAttribute("viewBox","0 0 100 100");let l=document.createElementNS("http://www.w3.org/2000/svg","path");return l.setAttribute("d",this.classes.arrowClose),this.settings.alwaysOpen&&this.addClasses(r,this.classes.hide),r.appendChild(l),i.appendChild(r),{main:i,values:e,deselect:{main:t,svg:n,path:s},arrow:{main:r,path:l}}}mainFocus(i){i!=="click"&&this.main.main.focus({preventScroll:!0})}placeholder(){let i=this.store.filter(o=>o.placeholder,!1,!1),e=this.settings.placeholderText;i.length&&(i[0].html===""?i[0].text!==""&&(e=i[0].text):e=i[0].html);let t=document.createElement("div");return this.addClasses(t,this.classes.placeholder),t.innerHTML=e,t}renderValues(){if(!this.settings.isMultiple){this.renderSingleValue();return}this.renderMultipleValues(),this.updateDeselectAll()}renderSingleValue(){let i=this.store.filter(t=>t.selected&&!t.placeholder,!1,!1),e=i.length>0?i[0]:null;if(!e)this.main.values.innerHTML=this.placeholder().outerHTML;else{let t=document.createElement("div");this.addClasses(t,this.classes.single),e.html?t.innerHTML=e.html:t.innerText=e.text,this.main.values.innerHTML=t.outerHTML}!this.settings.allowDeselect||!i.length?this.addClasses(this.main.deselect.main,this.classes.hide):this.removeClasses(this.main.deselect.main,this.classes.hide)}renderMultipleValues(){let i=this.main.values.childNodes,e=this.store.filter(n=>n.selected&&n.display,!1,!1);if(e.length===0){this.main.values.innerHTML=this.placeholder().outerHTML;return}{let n=this.main.values.querySelector("."+this.classes.getFirst("placeholder"));n&&n.remove()}if(this.settings.multiString){let n=e;this.settings.keepOrder&&(n=this.store.selectedOrderOptions(n));let s=document.createElement("div");this.addClasses(s,this.classes.multiString),s.textContent=n.map(r=>r.text).join(", "),this.settings.showOptionTooltips&&s.setAttribute("title",s.textContent),this.main.values.innerHTML=s.outerHTML;return}if(e.length>this.settings.maxValuesShown){let n=document.createElement("div");this.addClasses(n,this.classes.max),n.textContent=this.settings.maxValuesMessage.replace("{number}",e.length.toString()),this.main.values.innerHTML=n.outerHTML;return}{let n=this.main.values.querySelector("."+this.classes.getFirst("max"));n&&n.remove()}this.settings.keepOrder&&(e=this.store.selectedOrderOptions(e));let t=[];for(let n=0;n<i.length;n++){let s=i[n],r=s.getAttribute("data-id");r&&(e.filter(l=>l.id===r,!1).length||t.push(s))}let o=ll(this.content.main,this.settings.timeoutDelay);for(let n of t)this.addClasses(n,this.classes.valueOut),ib(n,"ss-valueOut",o).then(()=>{this.main.values.hasChildNodes()&&this.main.values.contains(n)&&this.main.values.removeChild(n)});i=this.main.values.childNodes;for(let n=0;n<e.length;n++){let s=!0;for(let r=0;r<i.length;r++)e[n].id===String(i[r].dataset.id)&&(s=!1);s&&(this.settings.keepOrder||i.length===0?this.main.values.appendChild(this.multipleValue(e[n])):n===0?this.main.values.insertBefore(this.multipleValue(e[n]),i[n]):i[n-1].insertAdjacentElement("afterend",this.multipleValue(e[n])))}this.updateMultipleValueDeleteVisibility()}isAtMinSelected(){return this.settings.isMultiple&&this.settings.minSelected>0&&this.store.getSelectedOptions().length<=this.settings.minSelected}getMinimumSelectionIds(){let i=this.store.getSelectedOptions();return this.settings.keepOrder&&(i=this.store.selectedOrderOptions(i)),i.slice(0,this.settings.minSelected).map(e=>e.id)}getValueChips(){return!this.settings.isMultiple||this.settings.multiString?[]:Array.from(this.main.values.querySelectorAll("."+this.classes.getFirst("value"))).filter(i=>{if(i.classList.contains(this.classes.getFirst("valueOut")))return!1;let e=i.querySelector("."+this.classes.getFirst("valueDelete"));return!!e&&!e.classList.contains(this.classes.getFirst("hide"))})}getHighlightedValueChip(){return this.getValueChips().find(i=>i.classList.contains(this.classes.getFirst("highlighted")))??null}clearValueChipHighlight(){for(let i of Array.from(this.main.values.querySelectorAll("."+this.classes.getFirst("value"))))this.removeClasses(i,this.classes.highlighted)}highlightValueChip(i){this.clearValueChipHighlight(),i&&this.addClasses(i,this.classes.highlighted)}navigateValueChips(i){let e=this.getValueChips();if(e.length===0)return!1;let t=this.getHighlightedValueChip(),o=t?e.indexOf(t):-1;return i==="left"?(o===-1?this.highlightValueChip(e[e.length-1]):o>0&&this.highlightValueChip(e[o-1]),!0):o!==-1&&(o<e.length-1?this.highlightValueChip(e[o+1]):this.clearValueChipHighlight(),!0)}deleteValueChip(i=!1){let e=this.getValueChips();if(e.length===0)return!1;let t=this.getHighlightedValueChip();if(i&&!t)return!1;let o=t??e[e.length-1],n=o.querySelector("."+this.classes.getFirst("valueDelete"));if(!n)return!1;let s=e.indexOf(o),r=t?e[s-1]??e[s+1]??null:null;return n.click(),r&&r!==o&&this.main.values.contains(r)?this.highlightValueChip(r):this.clearValueChipHighlight(),!0}updateMultipleValueDeleteVisibility(){if(!this.settings.isMultiple||this.settings.multiString)return;let i=!this.isAtMinSelected(),e=this.main.values.querySelectorAll("."+this.classes.getFirst("valueDelete"));for(let t of e)i?this.removeClasses(t,this.classes.hide):this.addClasses(t,this.classes.hide)}multipleValue(i){let e=document.createElement("div");this.addClasses(e,this.classes.value),e.dataset.id=i.id;let t=document.createElement("div");if(this.addClasses(t,this.classes.valueText),t.textContent=i.text,e.appendChild(t),!i.mandatory){let o=document.createElement("div");this.addClasses(o,this.classes.valueDelete),o.setAttribute("tabindex","0"),o.setAttribute("role","button"),o.setAttribute("aria-label",`${this.settings.removeText} ${i.text}`),this.isAtMinSelected()&&this.addClasses(o,this.classes.hide),o.onclick=r=>{if(r.preventDefault(),r.stopPropagation(),this.settings.disabled)return;let l=!0,a=this.store.getSelectedOptions(),d=a.filter(c=>c.selected&&c.id!==i.id,!0);if(!(this.settings.minSelected&&d.length<this.settings.minSelected)&&(this.callbacks.beforeChange&&(l=this.callbacks.beforeChange(d,a)===!0),l)){let c=[];for(let h of d){if(h instanceof Be)for(let m of h.options)m.id&&c.push(m.id);h instanceof he&&c.push(h.id)}this.callbacks.setSelected(c,!1),this.settings.closeOnSelect&&this.requestClose("deselect",{selectionChanged:!0}),this.callbacks.afterChange&&this.callbacks.afterChange(d),this.updateDeselectAll(),this.updateMultipleValueDeleteVisibility()}};let n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("viewBox","0 0 100 100");let s=document.createElementNS("http://www.w3.org/2000/svg","path");s.setAttribute("d",this.classes.optionDelete),n.appendChild(s),o.appendChild(n),e.appendChild(o),o.onkeydown=r=>{r.key==="Enter"&&o.click()}}return e}contentDiv(){let i=document.createElement("div");i.dataset.id=this.settings.id;let e=this.searchDiv();i.appendChild(e.main);let t=document.createElement("div");this.addClasses(t,this.classes.status),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),t.setAttribute("role","status"),i.appendChild(t);let o=this.listDiv();return i.appendChild(o),{main:i,search:e,status:t,list:o}}announce(i){this.settings.showSearch&&(this.content.status.textContent=i)}moveContent(){if(!this.isModalViewActive()){if(this.settings.contentPosition==="relative"){this.moveContentBelow();return}if(this.settings.openPosition==="down"){this.moveContentBelow();return}if(this.settings.openPosition==="up"){this.moveContentAbove();return}this.putContent()==="up"?this.moveContentAbove():this.moveContentBelow()}}startPositionTracking(){this.settings.contentPosition!=="absolute"||this.isModalViewActive()||(this.stopPositionTracking(),!(typeof ResizeObserver>"u")&&(this.positionObserver=new ResizeObserver(()=>{this.settings.isOpen&&(cancelAnimationFrame(this.positionObserverRaf),this.positionObserverRaf=requestAnimationFrame(()=>{this.moveContent()}))}),this.observePositionTargets()))}stopPositionTracking(){cancelAnimationFrame(this.positionObserverRaf),this.positionObserver?.disconnect(),this.positionObserver=null,this.cancelOverflowShift()}observePositionTargets(){if(!this.positionObserver)return;let i=new Set,e=n=>{!n||i.has(n)||(i.add(n),this.positionObserver.observe(n))};e(this.main.main);let t=this.main.main.parentElement,o=this.settings.contentLocation;for(let n=0;t&&n<8&&(e(t),t!==o);n++)t=t.parentElement}searchDiv(){let i=document.createElement("div"),e=document.createElement("input"),t=document.createElement("div");this.addClasses(i,this.classes.search);let o={main:i,input:e},n=this.settings.selectAll&&this.settings.isMultiple;this.settings.showSearch||(e.readOnly=!0,n?this.addClasses(e,this.classes.hide):this.addClasses(i,this.classes.hide)),e.type="search",e.id=`${this.settings.id}-search`,e.placeholder=this.settings.searchPlaceholder,e.tabIndex=-1,e.setAttribute("aria-label",this.settings.searchPlaceholder),e.setAttribute("aria-autocomplete","list"),e.setAttribute("autocapitalize","off"),e.setAttribute("autocomplete","off"),e.setAttribute("autocorrect","off"),e.setAttribute("aria-hidden","true");let s=Bs(()=>{this.callbacks.search(e.value)},100);if(e.oninput=r=>{r.target.value!==""&&this.clearValueChipHighlight(),s()},e.onkeydown=r=>{switch(r.key){case"ArrowUp":case"ArrowDown":return this.clearValueChipHighlight(),r.key==="ArrowDown"?this.highlight("down"):this.highlight("up"),!1;case"ArrowLeft":case"ArrowRight":return e.value!==""||!this.navigateValueChips(r.key==="ArrowLeft"?"left":"right")||(r.preventDefault(),!1);case"Backspace":return e.value!==""||!this.deleteValueChip()||(r.preventDefault(),!1);case"Delete":return e.value!==""||!this.getHighlightedValueChip()||!this.deleteValueChip(!0)||(r.preventDefault(),!1);case"Tab":return this.requestClose("tab"),!0;case"Escape":return this.requestClose("escape"),!1;case"Enter":let l=this.content.list.querySelector("."+this.classes.getFirst("highlighted"));return l?(l.click(),!1):!this.callbacks.addable||(t.click(),!1)}return r.key.length===1&&this.clearValueChipHighlight(),!0},i.appendChild(e),n){let r=this.createSelectAllControl(()=>this.toggleGlobalSelectAll());i.appendChild(r),o.selectAll=r}if(this.callbacks.addable){this.addClasses(t,this.classes.addable);let r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.setAttribute("viewBox","0 0 100 100");let l=document.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",this.classes.addablePath),r.appendChild(l),t.appendChild(r),t.onclick=a=>{if(a.preventDefault(),a.stopPropagation(),!this.callbacks.addable)return;let d=this.content.search.input.value.trim();if(d===""){this.content.search.input.focus();return}let c=m=>{let u=new he(m);if(this.callbacks.addOption(u),this.settings.isMultiple){let b=this.store.getSelected();b.push(u.id),this.callbacks.setSelected(b,!0)}else this.callbacks.setSelected([u.id],!0);if(this.callbacks.search(""),this.settings.closeOnSelect){let b=uu(this.content.main);setTimeout(()=>{this.requestClose("select",{selectionChanged:!0})},b)}},h=this.callbacks.addable(d);h!==!1&&h!=null&&(h instanceof Promise?h.then(m=>{typeof m=="string"?c({text:m,value:m}):h instanceof Error?this.renderError(h.message):c(m)}):typeof h=="string"?c({text:h,value:h}):h instanceof Error?this.renderError(h.message):c(h))},i.appendChild(t),o.addable={main:t,svg:r,path:l}}return o}searchFocus(){this.content.search.input.focus({preventScroll:!0})}getOptions(i=!1,e=!1,t=!1){let o="."+this.classes.getFirst("option");return i&&(o+=":not(."+this.classes.getFirst("placeholder")+")"),e&&(o+=":not(."+this.classes.getFirst("disabled")+")"),t&&(o+=":not(."+this.classes.getFirst("hide")+")"),Array.from(this.content.list.querySelectorAll(o))}highlight(i){let e=this.getOptions(!0,!0,!0);if(e.length===0)return;if(e.length===1&&!e[0].classList.contains(this.classes.getFirst("highlighted"))){this.addClasses(e[0],this.classes.highlighted);return}let t=!1;for(let n of e)n.classList.contains(this.classes.getFirst("highlighted"))&&(t=!0);if(!t){for(let n of e)if(n.classList.contains(this.classes.getFirst("selected"))){this.addClasses(n,this.classes.highlighted);break}}for(let n=0;n<e.length;n++)if(e[n].classList.contains(this.classes.getFirst("highlighted"))){let s=e[n];this.removeClasses(s,this.classes.highlighted);let r=s.parentElement;if(r&&r.classList.contains(this.classes.getFirst("mainOpen"))){let d=r.querySelector("."+this.classes.getFirst("optgroupLabel"));d&&d.click()}let l=e[i==="down"?n+1<e.length?n+1:0:n-1>=0?n-1:e.length-1];this.addClasses(l,this.classes.highlighted),this.ensureElementInView(this.content.list,l),l.id&&this.main.main.setAttribute("aria-activedescendant",l.id);let a=l.parentElement;if(a&&a.classList.contains(this.classes.getFirst("close"))){let d=a.querySelector("."+this.classes.getFirst("optgroupLabel"));d&&d.click()}return}let o=e[i==="down"?0:e.length-1];this.addClasses(o,this.classes.highlighted),o.id&&this.main.main.setAttribute("aria-activedescendant",o.id),this.ensureElementInView(this.content.list,o)}listDiv(){let i=document.createElement("div");this.addClasses(i,this.classes.list);let e=this.settings.id+"-list";return i.id=e,i.dataset.id=e,i}renderError(i){this.optionsListIsFullData=!1,this.content.list.innerHTML="";let e=document.createElement("div");this.addClasses(e,this.classes.error),e.textContent=i,this.content.list.appendChild(e)}renderSearching(){this.optionsListIsFullData=!1,this.content.list.innerHTML="";let i=document.createElement("div");this.addClasses(i,this.classes.searching),i.textContent=this.settings.searchingText,this.content.list.appendChild(i),this.announce(this.settings.searchingText)}renderOptions(i){if(this.lastSearchFilterTerm="",this.lastRenderedOptions=i.map(t=>t instanceof he?[t]:t.options.map(o=>new he(o))).flat(),this.content.list.innerHTML="",i.length===0){this.optionsListIsFullData=!1;let t=document.createElement("div");if(this.addClasses(t,this.classes.search),this.callbacks.addable){let o=this.settings.addableText.replace("{value}",this.content.search.input.value);t.innerHTML=o,this.announce(o)}else t.innerHTML=this.settings.searchText,this.announce(this.settings.searchText);this.content.list.appendChild(t);return}this.settings.allowDeselect&&!this.settings.isMultiple&&(this.store.filter(t=>t.placeholder,!1,!1).length||this.store.addOption(new he({text:"",value:"",selected:!1,placeholder:!0}),!0));let e=document.createDocumentFragment();for(let t of i){if(t instanceof Be){let o=document.createElement("div");this.addClasses(o,this.classes.optgroup);let n=document.createElement("div");this.addClasses(n,this.classes.optgroupLabel),o.appendChild(n);let s=document.createElement("div");this.addClasses(s,this.classes.optgroupLabelText),s.textContent=t.label,n.appendChild(s);let r=document.createElement("div");if(this.addClasses(r,this.classes.optgroupActions),n.appendChild(r),this.settings.isMultiple&&t.selectAll){let l=this.createSelectAllControl(()=>{let a=this.store.getSelected();if(this.isOptgroupAllSelected(t.options,new Set(a))){let d=a.filter(c=>{for(let h of t.options)if(c===h.id)return!1;return!0});this.callbacks.setSelected(d,!0);return}{let d=t.options.map(h=>h.id).filter(h=>h!==void 0),c=a.concat(d);for(let h of t.options)h.id&&!this.store.getOptionByID(h.id)&&this.callbacks.addOption(new he(h));this.callbacks.setSelected(c,!0);return}},this.isOptgroupAllSelected(t.options));r.appendChild(l)}if(t.closable!=="off"){let l=document.createElement("div");this.addClasses(l,this.classes.optgroupClosable);let a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("viewBox","0 0 100 100"),this.addClasses(a,this.classes.arrow),l.appendChild(a);let d=document.createElementNS("http://www.w3.org/2000/svg","path");a.appendChild(d),t.options.some(c=>c.selected)||this.content.search.input.value.trim()!==""?(this.addClasses(l,this.classes.mainOpen),d.setAttribute("d",this.classes.arrowOpen)):t.closable==="open"?(this.addClasses(o,this.classes.mainOpen),d.setAttribute("d",this.classes.arrowOpen)):t.closable==="close"&&(this.addClasses(o,this.classes.close),d.setAttribute("d",this.classes.arrowClose)),n.addEventListener("click",c=>{c.preventDefault(),c.stopPropagation(),this.isClosableOptgroupOpen(o,l)?(this.removeClasses(o,this.classes.mainOpen),this.removeClasses(l,this.classes.mainOpen),this.addClasses(o,this.classes.close),d.setAttribute("d",this.classes.arrowClose)):(this.closeOtherClosableOptgroups(o),this.removeClasses(o,this.classes.close),this.removeClasses(l,this.classes.mainOpen),this.addClasses(o,this.classes.mainOpen),d.setAttribute("d",this.classes.arrowOpen))}),r.appendChild(l)}o.appendChild(n);for(let l of t.options)o.appendChild(this.option(new he(l))),e.appendChild(o)}t instanceof he&&e.appendChild(this.option(t))}this.content.list.appendChild(e),this.setOptionsListFullData(i),this.announce(this.settings.resultsText.replace("{count}",String(this.lastRenderedOptions.length))),this.updateGlobalSelectAllState()}canFilterOptionsInPlace(){return this.optionsListIsFullData?this.content.list.querySelector("."+this.classes.getFirst("option"))!==null:!1}resetSearchFilterState(){this.lastSearchFilterTerm=""}filterOptionsInPlace(i,e){let t=i.trim();if(t===this.lastSearchFilterTerm)return;this.lastSearchFilterTerm=t;let o=[],n=this.content.list.querySelectorAll("."+this.classes.getFirst("option"));for(let s of n){let r=s.dataset.id;if(!r)continue;let l=this.store.getOptionByID(r);if(!l)continue;let a=l.placeholder||!l.display||l.selected&&this.settings.hideSelected,d=e(l,t);a||!d?(this.addClasses(s,this.classes.hide),this.removeClasses(s,this.classes.highlighted)):(this.removeClasses(s,this.classes.hide),this.setOptionElementContent(s,l,t),o.push(l)),l.selected?(this.addClasses(s,this.classes.selected),s.setAttribute("aria-selected","true")):(this.removeClasses(s,this.classes.selected),s.setAttribute("aria-selected","false"))}this.lastRenderedOptions=o,this.updateOptgroupVisibilityAfterSearch(t),o.length===0?this.updateSearchResultsMessage(0,t):(this.removeListSearchMessage(),this.announce(this.settings.resultsText.replace("{count}",String(o.length)))),this.updateOptgroupSelectAllStates(),this.updateGlobalSelectAllState()}setOptionsListFullData(i){let e=this.store.getDataOptions(!1),t=i.map(n=>n instanceof he?[n]:n.options.map(s=>new he(s))).flat();if(t.length!==e.length){this.optionsListIsFullData=!1;return}let o=new Set(e.map(n=>n.id));this.optionsListIsFullData=t.every(n=>o.has(n.id))}isClosableOptgroupOpen(i,e){return i.classList.contains(this.classes.getFirst("close"))?!1:i.classList.contains(this.classes.getFirst("mainOpen"))||e.classList.contains(this.classes.getFirst("mainOpen"))}closeClosableOptgroup(i){let e=i.querySelector("."+this.classes.getFirst("optgroupClosable"));if(!e||i.classList.contains(this.classes.getFirst("close")))return;this.removeClasses(i,this.classes.mainOpen),this.removeClasses(e,this.classes.mainOpen),this.addClasses(i,this.classes.close);let t=e.querySelector("path");t&&t.setAttribute("d",this.classes.arrowClose)}closeOtherClosableOptgroups(i){let e=this.content.list.querySelectorAll("."+this.classes.getFirst("optgroup"));for(let t of e)t!==i&&this.closeClosableOptgroup(t)}updateOptgroupVisibilityAfterSearch(i){let e=this.content.list.querySelectorAll("."+this.classes.getFirst("optgroup"));for(let t of e){let o=t.querySelectorAll("."+this.classes.getFirst("option")),n=!1;for(let s of o)if(!s.classList.contains(this.classes.getFirst("hide"))){n=!0;break}if(!n){this.addClasses(t,this.classes.hide);continue}this.removeClasses(t,this.classes.hide),i!==""&&(this.removeClasses(t,this.classes.close),this.addClasses(t,this.classes.mainOpen))}}updateSearchResultsMessage(i,e){if(this.removeListSearchMessage(),i>0)return;let t=document.createElement("div");if(this.addClasses(t,this.classes.search),this.callbacks.addable){let o=this.settings.addableText.replace("{value}",e);t.innerHTML=o,this.announce(o)}else t.innerHTML=this.settings.searchText,this.announce(this.settings.searchText);this.content.list.appendChild(t)}removeListSearchMessage(){this.content.list.querySelectorAll("."+this.classes.getFirst("search")).forEach(i=>i.remove())}setOptionElementContent(i,e,t){let o=t.trim();this.settings.searchHighlight&&o!==""?i.innerHTML=this.highlightText(e.html===""?e.text:e.html,o,this.classes.searchHighlighter):e.html===""?i.textContent=e.text:i.innerHTML=e.html,this.settings.showOptionTooltips&&i.textContent?i.setAttribute("title",i.textContent):i.removeAttribute("title")}hasRenderedOptions(){return this.content.list.querySelector("."+this.classes.getFirst("option"))!==null}canUpdateOptionSelectionInPlace(){return this.content.search.input.value.trim()===""&&this.hasRenderedOptions()}updateOptionSelection(){let i=new Set(this.store.getSelected()),e=this.content.list.querySelectorAll("."+this.classes.getFirst("option")),t=null;for(let o of e){let n=o.dataset.id;if(!n)continue;let s=this.store.getOptionByID(n);if(!s)continue;let r=i.has(n);r?(this.addClasses(o,this.classes.selected),o.setAttribute("aria-selected","true"),t=o):(this.removeClasses(o,this.classes.selected),o.setAttribute("aria-selected","false")),this.settings.hideSelected&&(r?this.addClasses(o,this.classes.hide):(this.removeClasses(o,this.classes.hide),s.display||this.addClasses(o,this.classes.hide)))}!this.settings.isMultiple&&t?this.main.main.setAttribute("aria-activedescendant",t.id):!this.settings.isMultiple&&i.size===0&&this.main.main.removeAttribute("aria-activedescendant"),this.updateOptgroupSelectAllStates(),this.updateGlobalSelectAllState()}createSelectAllControl(i,e=!1){let t=document.createElement("div");this.addClasses(t,this.classes.optgroupSelectAll),t.setAttribute("role","checkbox"),t.setAttribute("aria-checked",e?"true":"false"),t.setAttribute("aria-label",this.selectAllLabel(e)),t.tabIndex=-1,e&&this.addClasses(t,this.classes.selected);let o=document.createElement("span");o.textContent=this.selectAllLabel(e),t.appendChild(o);let n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("viewBox","0 0 100 100"),n.setAttribute("aria-hidden","true"),t.appendChild(n);let s=document.createElementNS("http://www.w3.org/2000/svg","path");s.setAttribute("d",this.classes.optgroupSelectAllBox),n.appendChild(s);let r=document.createElementNS("http://www.w3.org/2000/svg","path");return r.setAttribute("d",this.classes.optgroupSelectAllCheck),n.appendChild(r),t.addEventListener("click",l=>{l.preventDefault(),l.stopPropagation(),i()}),t}getSelectableOptions(){return this.store.getDataOptions(!1).filter(i=>!i.disabled&&!i.placeholder&&i.display)}isGlobalAllSelected(i){let e=this.getSelectableOptions();if(e.length===0)return!1;let t=i||new Set(this.store.getSelected());for(let o of e)if(!t.has(o.id))return!1;return!0}toggleGlobalSelectAll(){let i=this.getSelectableOptions(),e=new Set(this.store.getSelected());if(this.isGlobalAllSelected(e)){let t=new Set(i.map(n=>n.id)),o=this.store.getSelected().filter(n=>!t.has(n));this.callbacks.setSelected(o,!0);return}this.callbacks.setSelected(i.map(t=>t.id),!0)}updateGlobalSelectAllState(){let i=this.content.search.selectAll;if(!i||!this.settings.isMultiple||!this.settings.selectAll)return;let e=this.isGlobalAllSelected();e?this.addClasses(i,this.classes.selected):this.removeClasses(i,this.classes.selected),i.setAttribute("aria-checked",e?"true":"false"),i.setAttribute("aria-label",this.selectAllLabel(e));let t=i.querySelector("span");t&&(t.textContent=this.selectAllLabel(e))}updateOptgroupSelectAllStates(){if(!this.settings.isMultiple)return;let i=new Set(this.store.getSelected()),e=this.content.list.querySelectorAll("."+this.classes.getFirst("optgroup"));for(let t of e){let o=t.querySelector("."+this.classes.getFirst("optgroupSelectAll"));if(!o)continue;let n=t.querySelectorAll("."+this.classes.getFirst("option")),s=n.length>0;for(let l of n){let a=l.dataset.id;if(!a||!i.has(a)){s=!1;break}}s?this.addClasses(o,this.classes.selected):this.removeClasses(o,this.classes.selected),o.setAttribute("aria-checked",s?"true":"false"),o.setAttribute("aria-label",this.selectAllLabel(s));let r=o.querySelector("span");r&&(r.textContent=this.selectAllLabel(s))}}selectAllLabel(i){return i?this.settings.unselectAllText:this.settings.selectAllText}isOptgroupAllSelected(i,e){if(i.length===0)return!1;for(let t of i)if(!(e?t.id&&e.has(t.id):t.selected))return!1;return!0}option(i){if(i.placeholder){let t=document.createElement("div");return this.addClasses(t,this.classes.option),this.addClasses(t,this.classes.hide),t}let e=document.createElement("div");return e.dataset.id=i.id,e.id=this.settings.id+"-"+i.id,this.addClasses(e,this.classes.option),e.setAttribute("role","option"),i.class&&i.class.split(" ").forEach(t=>{e.classList.add(t)}),i.style&&(e.style.cssText=i.style),this.setOptionElementContent(e,i,this.content.search.input.value),i.display||this.addClasses(e,this.classes.hide),i.disabled&&this.addClasses(e,this.classes.disabled),i.selected&&this.settings.hideSelected&&this.addClasses(e,this.classes.hide),i.selected?(this.addClasses(e,this.classes.selected),e.setAttribute("aria-selected","true"),this.main.main.setAttribute("aria-activedescendant",e.id)):(this.removeClasses(e,this.classes.selected),e.setAttribute("aria-selected","false")),e.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation();let o=this.store.getSelected(),n=t.currentTarget,s=String(n.dataset.id),r=this.store.getOptionByID(s)??i,l=o.includes(s),a=t.ctrlKey||t.metaKey;if(i.disabled)return;if(!this.settings.isMultiple&&l&&!this.settings.allowDeselect){this.closeOnSingleSelectReclick(r);return}if(l&&r.mandatory){this.closeOnSingleSelectReclick(r);return}if(this.settings.isMultiple&&this.settings.maxSelected<=o.length&&!l||this.settings.isMultiple&&this.settings.minSelected>=o.length&&l&&!a)return;let d=!1,c=this.store.getSelectedOptions(),h=[];if(this.settings.isMultiple){let m=c.some(u=>u.id===s);if(t.shiftKey&&this.lastSelectedOption){let u=this.lastRenderedOptions,b=u.findIndex(g=>g.id===this.lastSelectedOption.id),f=u.findIndex(g=>g.id===i.id);if(b>=0&&f>=0){let g=Math.min(b,f),_=Math.max(b,f),y=u.slice(g,_+1).filter(E=>!c.find(S=>S.id===E.id));h=c.length+y.length<=this.settings.maxSelected?c.concat(y):c}else h=c}else h=m?c.filter(u=>u.id!==s):c.concat(r),this.lastSelectedOption=r}if(this.settings.isMultiple||(h=l?[]:[r]),this.callbacks.beforeChange||(d=!0),this.callbacks.beforeChange&&(d=this.callbacks.beforeChange(h,c)!==!1),d){this.store.getOptionByID(s)||this.callbacks.addOption(i),this.callbacks.setSelected(h.map(u=>u.id),!1);let m=t.ctrlKey||t.metaKey||t.shiftKey;this.settings.closeOnSelect&&!(this.settings.isMultiple&&m)&&this.requestClose("select",{option:r,selectionChanged:this.selectionChanged(c,h)}),this.callbacks.afterChange&&this.callbacks.afterChange(h)}}),e}destroy(){this.stopPositionTracking(),this.modalElements?(this.unlockBodyScroll(),this.content.main.parentElement===this.modalElements.dialog&&this.restoreContentOffscreen(),this.modalElements.overlay.remove(),this.modalElements=null):this.bodyScrollLocked&&this.unlockBodyScroll(),this.main.main.remove(),this.content.main.remove(),this.removeDetachedInstanceDom()}removeDetachedInstanceDom(){let i=this.settings.id,e=this.classes.getFirst("main"),t=this.classes.getFirst("content"),o=this.classes.getFirst("modalOverlay");document.querySelectorAll(`[data-id="${i}"]`).forEach(n=>{(n.classList.contains(e)||n.classList.contains(t)||n.classList.contains(o))&&n.remove()})}highlightText(i,e,t){let o=e.trim();if(o==="")return i;let n=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),s=document.createElement("div");s.innerHTML=i;let r=l=>{if(l.nodeType===Node.TEXT_NODE){let a=l.textContent||"",d=RegExp("("+n+")","i");if(d.test(a)){let c=document.createElement("span");a.split(d).forEach((h,m)=>{if(h&&d.test(h)){let u=document.createElement("mark");u.className=t,u.textContent=h,c.appendChild(u)}else h&&c.appendChild(document.createTextNode(h))}),l.parentNode?.replaceChild(c,l)}}else l.nodeType===Node.ELEMENT_NODE&&Array.from(l.childNodes).forEach(a=>r(a))};return Array.from(s.childNodes).forEach(l=>r(l)),s.innerHTML}setContentDirection(i){let e=i==="above",t=e?this.classes.dirAbove:this.classes.dirBelow,o=e?this.classes.dirBelow:this.classes.dirAbove;if(this.removeClasses(this.main.main,o),this.addClasses(this.main.main,t),this.removeClasses(this.content.main,o),this.addClasses(this.content.main,t),e){let n=this.main.main.offsetHeight,s=this.content.main.offsetHeight;this.content.main.style.margin="-"+(n+s-1)+"px 0px 0px 0px"}else this.content.main.style.margin="-1px 0px 0px 0px"}setContentPosition(){let i=this.main.main.getBoundingClientRect();if(this.settings.contentPosition==="relative"){this.applyContentWidth(i);return}this.cancelOverflowShift();let e,t;this.settings.contentPosition==="fixed"?(e=i.top+i.height,t=i.left):(e=i.top+window.scrollY+i.height,t=i.left+window.scrollX),this.content.main.style.top=e+"px",this.content.main.style.left=t+"px",this.applyContentWidth(i);let o=this.getKnownContentWidth(i);if(o!==null){this.content.main.style.left=this.adjustLeftForOverflow(t,i.left,o)+"px";return}this.overflowShiftRaf=requestAnimationFrame(()=>{this.overflowShiftRaf=0,this.applyOverflowShiftFromMeasure()})}applyContentWidth(i){let e=this.settings.contentWidth;if(this.content.main.style.width="",this.content.main.style.minWidth="",this.content.main.style.maxWidth="",!e){this.settings.contentPosition!=="relative"&&(this.content.main.style.width=i.width+"px");return}e.startsWith(">")?this.content.main.style.minWidth=e.slice(1):e.startsWith("<")?this.content.main.style.maxWidth=e.slice(1):this.content.main.style.width=e}cancelOverflowShift(){this.overflowShiftRaf&&=(cancelAnimationFrame(this.overflowShiftRaf),0)}getKnownContentWidth(i){let e=this.settings.contentWidth;if(!e)return i.width;if(e.startsWith(">")||e.startsWith("<")||e.includes("%"))return null;let t=parseFloat(e);return Number.isNaN(t)?null:t}adjustLeftForOverflow(i,e,t){let o=e+t;if(o<=window.innerWidth)return i;let n=i-(o-(window.innerWidth-20));return this.settings.contentPosition==="fixed"?Math.max(0,n):Math.max(window.scrollX,n)}applyOverflowShiftFromMeasure(){let i=this.content.main.getBoundingClientRect().right;if(i<=window.innerWidth)return;let e=i-(window.innerWidth-20),t=(parseFloat(this.content.main.style.left)||0)-e;this.settings.contentPosition==="fixed"?this.content.main.style.left=Math.max(0,t)+"px":this.content.main.style.left=Math.max(window.scrollX,t)+"px"}moveContentAbove(){this.setContentDirection("above"),this.setContentPosition()}moveContentBelow(){this.setContentDirection("below"),this.setContentPosition()}ensureElementInView(i,e){let t=i.scrollTop+i.offsetTop,o=t+i.clientHeight,n=e.offsetTop,s=n+e.clientHeight;n<t?i.scrollTop-=t-n:s>o&&(i.scrollTop+=s-o)}putContent(){let i=this.main.main.offsetHeight,e=this.main.main.getBoundingClientRect(),t=this.content.main.offsetHeight;return window.innerHeight-(e.top+i)<=t&&e.top>t?"up":"down"}updateDeselectAll(){if(!this.store||!this.settings)return;let i=this.store.getSelectedOptions(),e=i&&i.length>0,t=this.settings.isMultiple,o=this.settings.allowDeselect,n=this.isAtMinSelected(),s=this.main.deselect.main,r=this.classes.hide;o&&!(t&&!e)&&!n?this.removeClasses(s,r):this.addClasses(s,r)}};function fb(i,e){let t={classChanged:!1,disabledChanged:!1,optgroupOptionChanged:!1,selectionChanged:!1};for(let o of i){if(o.target===e&&(o.attributeName==="disabled"&&(t.disabledChanged=!0),o.attributeName==="class"&&(t.classChanged=!0),o.type==="childList")){for(let n of Array.from(o.addedNodes))if(n.nodeName==="OPTION"&&n.value===e.value){t.selectionChanged=!0;break}t.optgroupOptionChanged=!0}(o.target.nodeName==="OPTGROUP"||o.target.nodeName==="OPTION")&&(t.optgroupOptionChanged=!0)}return t}var _b=class{select;onValueChange;onClassChange;onDisabledChange;onOptionsChange;onLabelClick;listen=!1;observer=null;isUpdating=!1;pendingOptionsChange=null;preventNativeSelect=null;preventNativeSelectMousedown=null;preventNativeSelectFocus=null;restoreAriaHiddenOnBlur=null;constructor(i){this.select=i,this.valueChange=this.valueChange.bind(this),this.select.addEventListener("change",this.valueChange,{passive:!0}),this.observer=new MutationObserver(this.observeCall.bind(this)),this.changeListen(!0)}enable(){this.select.disabled=!1}disable(){this.select.disabled=!0}hideUI(){this.select.tabIndex=-1,this.select.style.position="absolute",this.select.style.width="1px",this.select.style.height="1px",this.select.style.opacity="0",this.select.style.overflow="hidden",this.select.style.pointerEvents="none",this.select.style.margin="0",this.select.style.padding="0",this.select.style.borderWidth="0",this.select.style.clipPath="inset(50%)",document.activeElement!==this.select&&this.select.setAttribute("aria-hidden","true"),this.preventNativeSelect||(this.preventNativeSelect=i=>{i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation()},this.preventNativeSelectMousedown=i=>{i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation()},this.preventNativeSelectFocus=i=>{this.select.removeAttribute("aria-hidden"),i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation()},this.restoreAriaHiddenOnBlur=()=>{this.select.setAttribute("aria-hidden","true")},this.select.addEventListener("click",this.preventNativeSelect,{capture:!0,passive:!1}),this.select.addEventListener("mousedown",this.preventNativeSelectMousedown,{capture:!0,passive:!1}),this.select.addEventListener("focus",this.preventNativeSelectFocus,{capture:!0,passive:!1}),this.select.addEventListener("blur",this.restoreAriaHiddenOnBlur,{capture:!0,passive:!0}))}showUI(){this.select.removeAttribute("tabindex"),this.select.style.position="",this.select.style.width="",this.select.style.height="",this.select.style.opacity="",this.select.style.overflow="",this.select.style.pointerEvents="",this.select.style.margin="",this.select.style.padding="",this.select.style.borderWidth="",this.select.style.clipPath="",this.select.removeAttribute("aria-hidden"),this.preventNativeSelect&&=(this.select.removeEventListener("click",this.preventNativeSelect,{capture:!0}),null),this.preventNativeSelectMousedown&&=(this.select.removeEventListener("mousedown",this.preventNativeSelectMousedown,{capture:!0}),null),this.preventNativeSelectFocus&&=(this.select.removeEventListener("focus",this.preventNativeSelectFocus,{capture:!0}),null),this.restoreAriaHiddenOnBlur&&=(this.select.removeEventListener("blur",this.restoreAriaHiddenOnBlur,{capture:!0}),null)}changeListen(i){this.listen=i,i&&this.observer&&this.observer.observe(this.select,{subtree:!0,childList:!0,attributes:!0}),i||this.observer&&this.observer.disconnect()}valueChange(i){return this.listen&&this.onValueChange&&this.onValueChange(this.getSelectedOptions()),!0}observeCall(i){if(!this.listen)return;let{classChanged:e,disabledChanged:t,optgroupOptionChanged:o,selectionChanged:n}=fb(i,this.select),s=n;if(e&&this.onClassChange&&this.onClassChange(this.select.className.split(" ")),t&&this.onDisabledChange&&(this.changeListen(!1),this.onDisabledChange(this.select.disabled),this.changeListen(!0)),o&&this.clearLeftoverHiddenDisplay(i),o&&this.onOptionsChange){if(this.isUpdating){if(this.select.options.length>0){let r=this.getData();r.length>0&&(this.pendingOptionsChange=r)}s&&this.select.dispatchEvent(new Event("change"));return}this.changeListen(!1),this.onOptionsChange(this.getData()),this.changeListen(!0),s=!1}s&&this.select.dispatchEvent(new Event("change"))}getData(){let i=[],e=this.select.childNodes;for(let t of e)t.nodeName==="OPTGROUP"&&i.push(this.getDataFromOptgroup(t)),t.nodeName==="OPTION"&&i.push(this.getDataFromOption(t));return i}getDataFromOptgroup(i){let e={id:i.id,label:i.label,selectAll:i.dataset?i.dataset.selectall==="true":!1,closable:i.dataset?i.dataset.closable:"off",options:[]},t=i.childNodes;for(let o of t)o.nodeName==="OPTION"&&e.options.push(this.getDataFromOption(o));return e}clearLeftoverHiddenDisplay(i){for(let e of i){if(e.target.nodeName!=="OPTION"||e.attributeName!=="hidden")continue;let t=e.target;!t.hidden&&t.style.display==="none"&&(t.style.display="")}}getDataFromOption(i){let e=i.hidden||i.hasAttribute("hidden");return{id:i.id,value:i.value,text:i.text,html:i.dataset&&i.dataset.html?i.dataset.html:"",defaultSelected:i.defaultSelected,selected:i.selected,display:i.style.display!=="none"&&!e,disabled:i.disabled,mandatory:i.dataset?i.dataset.mandatory==="true":!1,placeholder:i.dataset.placeholder==="true",class:i.className,style:i.style.cssText,data:gu(i.dataset)}}getSelectedOptions(){let i=[],e=this.select.childNodes;for(let t of e){if(t.nodeName==="OPTGROUP"){let o=t.childNodes;for(let n of o)if(n.nodeName==="OPTION"){let s=n;s.selected&&i.push(this.getDataFromOption(s))}}if(t.nodeName==="OPTION"){let o=t;o.selected&&i.push(this.getDataFromOption(o))}}return i}getSelectedValues(){return this.getSelectedOptions().map(i=>i.value)}hasOptionValues(i){if(i.length===0)return!0;let e=new Set(Array.from(this.select.options).map(t=>t.value));return i.every(t=>e.has(t))}setSelected(i){this.changeListen(!1);let e=this.select.childNodes;for(let o of e){if(o.nodeName==="OPTGROUP"){let n=o.childNodes;for(let s of n)if(s.nodeName==="OPTION"){let r=s;r.selected=i.includes(r.id)}}if(o.nodeName==="OPTION"){let n=o;n.selected=i.includes(n.id)}}let t=this.getSelectedOptions();this.select.multiple||(this.select.value=t.length===1?t[0].value:""),this.select.dispatchEvent(new Event("change",{bubbles:!0})),this.changeListen(!0)}setSelectedByValue(i){this.changeListen(!1);let e=this.select.childNodes;for(let o of e){if(o.nodeName==="OPTGROUP"){let n=o.childNodes;for(let s of n)if(s.nodeName==="OPTION"){let r=s;r.selected=i.includes(r.value)}}if(o.nodeName==="OPTION"){let n=o;n.selected=i.includes(n.value)}}let t=this.getSelectedOptions();this.select.multiple||(this.select.value=t.length===1?t[0].value:""),this.select.dispatchEvent(new Event("change",{bubbles:!0})),this.changeListen(!0)}updateSelect(i,e,t){this.changeListen(!1),i&&(this.select.dataset.id=i),e&&(this.select.style.cssText=e),t&&(this.select.className="",t.forEach(o=>{o.trim()!==""&&this.select.classList.add(o.trim())})),this.changeListen(!0)}updateOptions(i){if(!i||i.length===0)return;this.isUpdating=!0,this.pendingOptionsChange=null,this.changeListen(!1);let e=this.getSelectedValues();this.select.innerHTML="";for(let t of i)t instanceof Be&&this.select.appendChild(this.createOptgroup(t)),t instanceof he&&this.select.appendChild(this.createOption(t));if(Tn(e,this.getSelectedValues())||this.select.dispatchEvent(new Event("change",{bubbles:!0})),this.changeListen(!0),this.isUpdating=!1,this.pendingOptionsChange!==null){let t=this.pendingOptionsChange;t.length>0&&this.onOptionsChange?(this.pendingOptionsChange=null,this.changeListen(!1),this.onOptionsChange(t),this.changeListen(!0)):this.pendingOptionsChange=null}}createOptgroup(i){let e=document.createElement("optgroup");if(e.id=i.id,e.label=i.label,i.selectAll&&(e.dataset.selectAll="true"),i.closable!=="off"&&(e.dataset.closable=i.closable),i.options)for(let t of i.options)e.appendChild(this.createOption(t));return e}createOption(i){let e=document.createElement("option");return e.id=i.id,e.value=i.value,e.textContent=i.text,i.html!==""&&e.setAttribute("data-html",i.html),e.defaultSelected=i.defaultSelected,e.selected=i.selected,i.disabled&&(e.disabled=!0),e.hidden=!i.display,i.placeholder&&e.setAttribute("data-placeholder","true"),i.mandatory&&e.setAttribute("data-mandatory","true"),i.class&&i.class.split(" ").forEach(t=>{e.classList.add(t)}),i.data&&typeof i.data=="object"&&Object.keys(i.data).forEach(t=>{e.setAttribute("data-"+cb(t),i.data[t])}),e}setupLabelHandlers(){let i=[],e=this.select.id;e&&document.querySelectorAll(`label[for="${e}"]`).forEach(o=>i.push(o));let t=this.select.parentElement;for(;t&&t!==document.body;){if(t.tagName==="LABEL"){i.push(t);break}t=t.parentElement}Array.from(new Set(i)).forEach(o=>{if(o.__slimSelectLabelHandler)return;let n=s=>{let r=s.target,l=fu(r,this.select.dataset.id);s.preventDefault(),!l&&this.onLabelClick&&this.onLabelClick()};o.__slimSelectLabelHandler=n,o.addEventListener("click",n,{capture:!0,passive:!1})})}removeLabelHandlers(){let i=[],e=this.select.id;e&&document.querySelectorAll(`label[for="${e}"]`).forEach(o=>i.push(o));let t=this.select.parentElement;for(;t&&t!==document.body;){if(t.tagName==="LABEL"){i.push(t);break}t=t.parentElement}Array.from(new Set(i)).forEach(o=>{let n=o.__slimSelectLabelHandler;n&&(o.removeEventListener("click",n,{capture:!0}),delete o.__slimSelectLabelHandler)})}destroy(){this.changeListen(!1),this.select.removeEventListener("change",this.valueChange),this.preventNativeSelect&&=(this.select.removeEventListener("click",this.preventNativeSelect,{capture:!0}),null),this.preventNativeSelectMousedown&&=(this.select.removeEventListener("mousedown",this.preventNativeSelectMousedown,{capture:!0}),null),this.preventNativeSelectFocus&&=(this.select.removeEventListener("focus",this.preventNativeSelectFocus,{capture:!0}),null),this.restoreAriaHiddenOnBlur&&=(this.select.removeEventListener("blur",this.restoreAriaHiddenOnBlur,{capture:!0}),null),this.observer&&=(this.observer.disconnect(),null),this.removeLabelHandlers(),delete this.select.dataset.id,this.showUI()}};function bb(i,e){return db(i.getData(!1),e)}function wb(i,e){let t=Array.isArray(e)?e:[e],o=i.getDataOptions(!1),n=[];for(let s of t){if(o.find(r=>r.id==s)){n.push(s);continue}for(let r of o.filter(l=>l.value==s))n.push(r.id)}return n}var vb=class{deps;queue=[];flushScheduled=!1;isSyncing=!1;constructor(i){this.deps=i}enqueue(i){if(this.queue.push(i),i.source==="native"){this.flushScheduled||(this.flushScheduled=!0,queueMicrotask(()=>this.flush()));return}this.isSyncing||this.flush()}flush(){if(this.flushScheduled=!1,this.queue.length===0)return;let i=this.coalesceBatch(this.queue);this.queue=[],this.isSyncing=!0;try{for(let e of i)this.applyChange(e)}finally{this.isSyncing=!1,this.queue.length>0&&this.flush()}}coalesceBatch(i){let e=i.some(n=>n.type==="structure"),t=i.some(n=>n.type==="addOption");if(e||t){let n=i.filter(r=>r.type==="structure"||r.type==="addOption"),s=n[n.length-1];return s?.type==="structure"?[s]:n}let o=i.filter(n=>n.type==="selection");return o.length>0?[o[o.length-1]]:i}applyChange(i){switch(i.type){case"structure":this.applyStructure(i.data,i.source,i.preserveSelection,i.isSearchResult);break;case"selection":this.applySelection(i.values,i.source,i.runAfterChange!==!1);break;case"addOption":this.applyAddOption(i.option)}}applyStructure(i,e,t=!1,o=!1){let{store:n,select:s,render:r,events:l}=this.deps;if(!o&&bb(n,i))return;let a=n.getSelected(),d=n.validateDataArray(i);if(d){l.error?l.error(d):this.deps.onError&&this.deps.onError(d);return}n.setData(i,t);let c=n.getData(!1);o||n.snapshotCatalog(),o||s.updateOptions(c),r.renderValues(),r.renderOptions(c),l.afterChange&&!Tn(a,n.getSelected())&&l.afterChange(n.getSelectedOptions())}syncNativeSelection(){let{store:i,select:e}=this.deps,t=i.getSelectedOptions(),o=i.getSelectedValues();if(!e.hasOptionValues(o)){if(t.length>0){e.updateOptions(t);return}let n=i.getCatalogData().find(s=>s instanceof he&&s.placeholder===!0);if(n){e.updateOptions([new he({...n,selected:!0})]);return}}e.setSelectedByValue(o)}applySelection(i,e,t){let{store:o,select:n,render:s,events:r}=this.deps,l=o.getSelected(),a=wb(o,i);if(Tn(l,a))return;o.setSelectedBy("id",a),this.syncNativeSelection(),s.renderValues();let d=s.content.search.input.value.trim();d===""?s.canUpdateOptionSelectionInPlace()?s.updateOptionSelection():s.renderOptions(o.getData(!1)):s.hasRenderedOptions()?s.updateOptionSelection():this.deps.search&&this.deps.search(d),t&&r.afterChange&&!Tn(l,o.getSelected())&&r.afterChange(o.getSelectedOptions())}applyAddOption(i){let{store:e,select:t,render:o,events:n}=this.deps,s=e.getSelected(),r=o.content.search.input.value.trim()!==""&&!!this.deps.search,l=i.value??i.text??"",a=c=>{for(let h of c){if(h instanceof Be){if(h.options.some(m=>(m.value??m.text)===l))return!0;continue}if((h.value??h.text)===l)return!0}return!1};if(!a(e.getData(!1)))if(r){let c=e.getCatalogData();a(c)||e.setData([...c,new he(i)],!0),e.snapshotCatalog()}else e.addOption(i),e.snapshotCatalog();let d=e.getData(!1);if(r){let c=e.getSelectedOptions();c.length>0&&t.updateOptions(c)}else t.updateOptions(d);o.renderValues(),o.renderOptions(d),n.afterChange&&!Tn(s,e.getSelected())&&n.afterChange(e.getSelectedOptions())}},ht=class{selectEl;settings;cssClasses;select;store;render;sync;lifecycle;globalEvents;searchGeneration=0;events={search:void 0,searchFilter:(i,e)=>i.text.toLowerCase().indexOf(e.toLowerCase())!==-1,addable:void 0,beforeChange:void 0,afterChange:void 0,beforeOpen:void 0,afterOpen:void 0,beforeClose:void 0,afterClose:void 0};constructor(i){if(this.selectEl=typeof i.select=="string"?document.querySelector(i.select):i.select,!this.selectEl){i.events&&i.events.error&&i.events.error(Error("Could not find select element"));return}if(this.selectEl.tagName!=="SELECT"){i.events&&i.events.error&&i.events.error(Error("Element isnt of type select"));return}this.selectEl.dataset.ssid&&this.destroy(),this.settings=new ob(i.settings),i.settings?.selectAll===void 0&&this.selectEl.dataset.selectall==="true"&&(this.settings.selectAll=!0),this.cssClasses=new J_(i.cssClasses);let e=["beforeOpen","afterOpen","afterClose"];for(let r in i.events)i.events.hasOwnProperty(r)&&(e.indexOf(r)===-1?this.events[r]=i.events[r]:this.events[r]=Bs(i.events[r],100));this.settings.disabled=i.settings?.disabled?i.settings.disabled:this.selectEl.disabled,this.settings.isMultiple=this.selectEl.multiple,this.settings.style=this.selectEl.style.cssText,this.settings.class=this.selectEl.className.split(" "),this.select=new _b(this.selectEl),this.selectEl.id||(this.selectEl.id=this.settings.id),this.select.updateSelect(this.settings.id,this.settings.style,this.settings.class),this.select.hideUI(),this.select.onClassChange=r=>{this.settings.class=r,this.render.updateClassStyles()},this.select.onDisabledChange=r=>{r?this.disable():this.enable()},this.select.onLabelClick=()=>{this.settings.disabled||(this.settings.isOpen?this.close({source:"toggle",selectionChanged:!1}):this.open())};let t=i.data?i.data:this.select.getData();this.store=new mb(this.settings.isMultiple?"multiple":"single",t),i.data&&this.select.updateOptions(this.store.getData());let o={open:this.open.bind(this),close:this.close.bind(this),addable:this.events.addable?this.events.addable:void 0,setSelected:(r,l)=>{this.sync.enqueue({type:"selection",values:r,source:"ui",runAfterChange:l})},addOption:r=>{this.sync.enqueue({type:"addOption",option:r,source:"ui"})},search:this.search.bind(this),beforeChange:this.events.beforeChange,afterChange:this.events.afterChange};this.settings.modalTitle=i.settings?.modalTitle??sb(this.selectEl),this.render=new gb(this.settings,this.cssClasses,this.store,o),this.settings.timeoutDelay=ll(this.render.content.main,i.settings?.timeoutDelay),this.sync=new vb({select:this.select,store:this.store,render:this.render,events:this.events,search:this.search.bind(this)}),this.select.onValueChange=r=>{this.sync.enqueue({type:"selection",values:r.map(l=>l.id||l.value),source:"native"})},this.select.onOptionsChange=r=>{this.sync.enqueue({type:"structure",data:r||[],source:"native"})},this.lifecycle=new ub({beforeOpen:this.events.beforeOpen,afterOpen:this.events.afterOpen,beforeClose:r=>this.events.beforeClose?.(r),onClose:r=>this.applyClose(r),afterClose:()=>{this.render.clearDirectionClasses(),this.render.finalizeModalClose(),this.events.afterClose&&this.events.afterClose()},onOpenReady:()=>this.globalEvents.attachDocumentClick(),onCloseReady:()=>this.globalEvents.detachDocumentClick()},{timeoutDelay:this.settings.timeoutDelay,waitForAnimation:(r,l)=>this.render.waitForAnimation(r,l)}),this.globalEvents=new hb({onDocumentClick:this.documentClick.bind(this),onWindowResize:()=>{!this.settings.isOpen&&!this.settings.isFullOpen||this.render.moveContent()},onWindowScroll:()=>{!this.settings.isOpen&&!this.settings.isFullOpen||this.render.moveContent()},onVisibilityChange:()=>{document.hidden&&this.close({source:"api",selectionChanged:!1})}}),this.render.renderValues(),this.render.renderOptions(this.store.getData(!1));let n=this.selectEl.getAttribute("aria-label"),s=this.selectEl.getAttribute("aria-labelledby");if(n)this.render.main.main.setAttribute("aria-label",n);else if(s)this.render.main.main.removeAttribute("aria-label"),this.render.main.main.setAttribute("aria-labelledby",s);else if(this.selectEl.labels&&this.selectEl.labels.length>0){let r=Array.from(this.selectEl.labels).map((l,a)=>(l.id||=`${this.settings.id}-label-${a}`,l.id));this.render.main.main.removeAttribute("aria-label"),this.render.main.main.setAttribute("aria-labelledby",r.join(" "))}this.selectEl.parentNode&&this.selectEl.parentNode.insertBefore(this.render.main.main,this.selectEl.nextSibling),this.globalEvents.attach({listenScroll:this.settings.openPosition==="auto"}),this.settings.disabled&&this.disable(),this.settings.alwaysOpen&&this.open(),this.select.setupLabelHandlers(),this.selectEl.slim=this}enable(){this.settings.disabled=!1,this.select.enable(),this.render.enable()}disable(){this.settings.disabled=!0,this.select.disable(),this.render.disable()}getData(){return this.store.getData()}setData(i){this.sync.enqueue({type:"structure",data:i,source:"api"})}getSelected(){let i=this.store.getSelectedOptions();return this.settings.keepOrder&&(i=this.store.selectedOrderOptions(i)),i.map(e=>e.value)}setSelected(i,e=!0){this.sync.enqueue({type:"selection",values:i,source:"api",runAfterChange:e})}addOption(i){this.sync.enqueue({type:"addOption",option:i,source:"api"})}open(){if(this.settings.disabled||this.settings.isOpen)return;this.lifecycle.cancelPending(),this.render.open(),this.settings.showSearch&&this.settings.focusSearch&&this.render.searchFocus(),this.settings.isOpen=!0,this.lifecycle.requestOpen().then(()=>{this.settings.isOpen&&(this.settings.isFullOpen=this.lifecycle.isFullOpen,this.settings.isOpen=this.lifecycle.isOpen)}),this.settings.contentPosition==="absolute"&&!this.render.isModalViewActive()&&this.render.startPositionTracking();let i=this.render.content.search.input.value.trim();i!==""&&this.search(i)}close(i={source:"api",selectionChanged:!1}){!this.settings.isOpen||this.settings.alwaysOpen||this.lifecycle.requestClose(i).then(e=>{e&&(this.settings.isOpen||(this.settings.isOpen=this.lifecycle.isOpen,this.settings.isFullOpen=this.lifecycle.isFullOpen))})}applyClose(i){this.render.close(),!this.settings.keepSearch&&this.render.content.search.input.value!==""&&(this.sync.flush(),this.search(""));let e=i.source==="outside"||i.source==="toggle";this.render.mainFocus(e?"click":null),this.settings.isOpen=!1,this.settings.isFullOpen=!1,this.render.stopPositionTracking()}search(i){let e=i.trim();if(e===""){this.render.content.search.input.value="",this.clearSearch();return}if(this.render.content.search.input.value!==i&&(this.render.content.search.input.value=i),this.events.search){this.runApiSearch(e);return}this.runLocalSearch(e)}clearSearch(){if(this.searchGeneration++,!this.events.search&&this.render.canFilterOptionsInPlace()){this.render.filterOptionsInPlace("",this.events.searchFilter),this.render.resetSearchFilterState();return}this.render.resetSearchFilterState(),this.sync.enqueue({type:"structure",data:this.store.getCatalogData(),source:"api",preserveSelection:!0}
10)}runLocalSearch(i){if(this.render.canFilterOptionsInPlace()){this.render.filterOptionsInPlace(i,this.events.searchFilter);return}let e=this.store.search(i,this.events.searchFilter);this.render.renderOptions(e)}runApiSearch(i){let e=++this.searchGeneration;this.render.renderSearching();let t=this.events.search(i,this.store.getSelectedOptions(),this.store.getCatalogData()),o=n=>{e===this.searchGeneration&&this.render.content.search.input.value.trim()===i&&this.sync.enqueue({type:"structure",data:n,source:"api",preserveSelection:!0,isSearchResult:!0})};if(t instanceof Promise){t.then(o).catch(n=>{e===this.searchGeneration&&this.render.renderError(typeof n=="string"?n:n.message)});return}if(Array.isArray(t)){o(t);return}this.render.renderError("Search event must return a promise or an array of data")}destroy(){this.lifecycle.destroy(),this.render.stopPositionTracking(),this.globalEvents.detach({listenScroll:this.settings.openPosition==="auto"}),this.store.setData([]),this.render.destroy(),this.select.destroy(),delete this.selectEl.slim}documentClick(i){this.settings.isOpen&&i.target&&!fu(i.target,this.settings.id)&&this.close({source:"outside",selectionChanged:!1})}};function bu(i){i=` ${i.replace(/ +/g," ").trim().toLowerCase()} `;let e=[];for(let t=0;t<i.length-2;++t){let o=i.substring(t,t+3);o[1]!==" "&&e.push(o)}return e}var bi=class{constructor(e){this.strs=e;this.total=e.length;for(let t of e){let o=bu(t),n=new Set(o);for(let r of n){let l=this.trigram_occ.get(r)||0;this.trigram_occ.set(r,l+1)}let s={str:t,trigrams:o};this.l.push(s)}}strs;total;trigram_occ=new Map;l=new Array;score(e){let t=bu(e).filter(n=>n[2]!==" "),o=[];for(let n of this.l){let s=0;for(let r of t)n.trigrams.indexOf(r)!==-1&&(s+=this.total/(this.trigram_occ.get(r)||999999));o.push({str:n.str,score:s})}return o.toSorted((n,s)=>s.score-n.score)}};M();ie();function oe(i,e){_i(i,t=>{let o=e(t);return!Pt&&o instanceof et&&!(o instanceof me)&&console.warn(`Form handler for '${i}' is deriving from @mod-publisher/js/forms#FormBase - it should derive from RPCFormBase (In WH5.7+, the FormBase exported by @webhare/forms will *be* the RPCFormBase)`),o})}Vs({handlers:{"publisher:form":i=>new et(i)}});aa();te();var cl=class{input;ss;phoneinput;countries=[];mobileonly=!1;constructor(e){this.input=e,this.input.hidden=!0,this.mobileonly=this.input.dataset.mobileonly==="1",this.input.addEventListener("input",()=>this.syncValueToCustomComponents());let t=this.input.closest(".wh-form__fieldgroup");t&&t.classList.add("wh-form__fieldgroup--slimselect");let o=p("div",{class:"phonefield-fieldswrapper"});this.input.before(o),this.countries=JSON.parse(this.input.dataset.countries||"[]");let n=this.countries.map(r=>({text:`${r.title} (+${r.phone})`,value:r.code,html:`<span class="utwente-flags utwente-flags-${r.code.toLowerCase()}"></span><div class="title">${r.title}</div><span class="phoneprefix">+${r.phone}</span>`})),s=p("select",{class:"webform-utwente--phonefield__country"});o.append(s),this.ss=new ht({select:s,data:n,events:{afterChange:()=>this.syncValueFromCustomComponents()},settings:{modal:"off"}}),this.phoneinput=p("input",{type:"tel",class:"webform-utwente--phonefield__input",placeholder:this.input.placeholder}),this.phoneinput.value=this.input.value.replace(/[^0-9+\s]/g,"").trim(),this.phoneinput.addEventListener("input",()=>this.syncValueFromCustomComponents()),this.phoneinput.addEventListener("change",()=>this.onChange()),this.input.value&&this.syncValueToCustomComponents(),o.append(this.phoneinput),De(this.input,r=>this.validatePhoneNumber(r)),this.phoneinput.value===""?this.prefillCountryCode():this.syncValueFromCustomComponents()}onChange(){let e=this.countries.find(t=>this.input.value.startsWith(`+${t.phone}`));if(e){let t=this.input.value.substring(e.phone.length+1).trim();if(["BE","DE","NL"].includes(e.code)){for(;t.startsWith("0");)t=t.substring(1);this.phoneinput.value=t&&!t.startsWith("+")?"0"+t:t}else this.phoneinput.value=t}}validatePhoneNumber(e){let t=this.ss?this.ss.getSelected():[],o=t.length?t[0]:"",n=o?this.countries.find(l=>l.code===o):"",s=n?`+${n.phone}`:"",r=e.value.replace(/[^0-9]/g,"");if(this.input.required){if(r.length<6||r.length>
1015)return v("utwente_base:frontend.ws2016.js.notavalidphonenumber")}else if(s!==""&&this.input.value===s&&(this.input.value=""),this.input.value!==""&&(r.length<6||r.length>15))return v("utwente_base:frontend.ws2016.js.notavalidphonenumber");if(this.mobileonly&&this.input.value!==""&&!this.isValidMobileNumber(o,this.input.value))return v("utwente_base:frontend.ws2016.js.notavalidmobilephonenumber")}isValidMobileNumber(e,t){let o="+"+t.replace(/[^0-9]/g,"");return e==="BE"?/^\+324[56789]\d{7}$/.test(o):e==="DE"?/^\+49[1-9]\d{1,4}\d{6,10}$/.test(o):e==="NL"?/^\+316\d{8}$/.test(o):!0}syncValueFromCustomComponents(){let e=this.ss?this.ss.getSelected():[],t=e.length?e[0]:"",o=e.length?this.countries.find(l=>l.code===t):"",n=o?`+${o.phone}`:"",s=this.phoneinput.value.replace(/[^0-9+\s]/g,"").trim();if(s.startsWith("+")){let l=this.countries.find(a=>s.startsWith(`+${a.phone}`));l&&(this.ss.setSelected(l.code,!1),n=`+${l.phone}`,s=s.substring(l.phone.length+1).trim(),this.phoneinput.value=s)}if(this.updatePlaceholderForCountry(t),["BE","DE","NL"].includes(t))for(;s.startsWith("0");)s=s.substring(1);let r=s?n+s:"";this.input.value!==r&&$e(this.input,r)}updatePlaceholderForCountry(e){e==="BE"?this.phoneinput.placeholder="(0)470123456":e==="DE"?this.phoneinput.placeholder="(0)1701234567":e==="NL"&&(this.phoneinput.placeholder="(0)612345678")}syncValueToCustomComponents(){let e=this.countries.find(t=>this.input.value.startsWith(`+${t.phone}`));e?this.ss.setSelected(e.code,!1):this.syncValueFromCustomComponents()}async prefillCountryCode(){let e=await ct();e&&this.countries.find(t=>t.code===e)&&(this.ss.selectEl.dataset.prefilledCountry=e,this.ss.setSelected(e))}};x(".webform-utwente--phonefield input[name$='.phone'][data-countries]",i=>new cl(i));N();var pl=class extends Ct{rte=null;node;onInsertVideo;constructor(){super(),this.node=this,this.node.whRTDField=this}async connectedCallback(){var l=[];try{let e=JSON.parse(this.node.dataset.whRtdoptions||"{}");let t=e.structure||null;let o=this.node.getAttribute("hidebuttons")?.split(" ")||[];t&&!t.blockstyles.some(h=>h.type==="table")&&o.push("table");o.push("object-insert");o.push("action-showformatting");let n={enabled:!0,readonly:!1,structure:t,allowtags:null,hidebuttons:o,editembeddedobjects:!1,...e};let s=Ut(l,G());void 0;let r=await import("/.wh/ea/ap/utwente_base.ws2026/richeditor-RLHASJUN.mjs");this.rte=r.createRTE(this.node,{...n,enabled:!this.disabled});this.node.rte=this.rte;this.node.addEventListener("wh:richeditor-action",h=>{this.executeAction(h)});this.node.addEventListener("wh:richeditor-dirty",h=>F(this.node,"input",{bubbles:!0,cancelable:!1}))}catch(a){var d=a,c=!0}finally{Wt(l,d,c)}}get value(){return this.rte?this.rte.getValue():this.node.innerHTML}set value(e){if(typeof e!="string")throw new Error(`Invalid value for RTE field: ${typeof e}`);this.rte?this.rte.setValue(e):this.node.innerHTML=e}async executeAction(e){if(e.detail.action==="object-video"&&this.onInsertVideo){e.stopPropagation(),e.preventDefault(),this.onInsertVideo(this.node);return}}async insertVideoByURL(e){let t=this.node.closest("form")?.propWhFormhandler;if(!t)throw new Error("RTE no longer associated with a form");let o=await t.invokeRPC(this.name+".insertVideoByUrl",e);return o.success?(this.rte.getEditor().insertEmbeddedObject(o.embeddedobject),{success:!0}):{success:!1,message:"Video URL not understood"}}set disabled(e){super.disabled=e,this._updateEnabledStatus(!e)}_updateEnabledStatus(e){this.rte?.setEnabled(e),e?this.node.removeAttribute("data-wh-form-disabled"):this.node.setAttribute("data-wh-form-disabled","")}static getForNode(e){return e.whRTDField||null}},Sn=class{constructor(e,t){let o=t?.hidebuttons||[];t?.onInsertVideo||o.push("object-video"),o.length&&e.setAttribute("hidebuttons",o.join(" ")),customElements.whenDefined("wh-rtdedit").then(()=>{t?.onInsertVideo&&(e.onInsertVideo=t.onInsertVideo)}),customElements.get("wh-rtdedit")||customElements.define("wh-rtdedit",pl)}};M();os();var hl=class extends me{dialog;rtd;constructor(e,t,o){super(e),this.dialog=t,this.rtd=o}async onSubmitSuccess(e){e.video&&(this.rtd.insertVideoByURL("x-wh-embedvideo:"+e.video.network+":"+e.video.videoid),this.dialog.resolve(null))}};async function wu(i){let e=G(),t=i.closest("form")?.propWhFormhandler;if(!t)throw console.error("Cannot find formhandler for node",i),new Error("Cannot find formhandler for RTD node");
10let o=await Dt().requestBuiltinForm(t.getRPCFormIdentifier(),"rtd","embedvideo"),n=Se();n.contentnode.innerHTML=o.html,new hl(L(n.contentnode,"form"),n,i),e.release(),await n.runModal()}M();var fo=(Ne(),Ce(Xe)).registerTexts;fo("utwente_base","nl",{"site-common":{texts:{"cookies-accept":"Accepteer","cookies-cookies":"cookies","cookies-touse":"Om deze functionaliteit te gebruiken:",no:"Nee",yes:"Ja"}}});fo("utwente_base","en",{"site-common":{texts:{"cookies-accept":"Accept","cookies-cookies":"cookies","cookies-touse":"To use this functionality you first need to:",no:"No",yes:"Yes"}}});fo("utwente_base","de",{"site-common":{texts:{"cookies-accept":"akzeptieren","cookies-cookies":"Cookies","cookies-touse":"Zur Nutzung dieser Funktion:",no:"Nein",yes:"Ja"}}});fo("utwente_base","es",{"site-common":{texts:{"cookies-accept":"Accept","cookies-cookies":"cookies","cookies-touse":"To use this functionality you first need to:",no:"No",yes:"Yes"}}});fo("utwente_base","it",{"site-common":{texts:{"cookies-accept":"Accept","cookies-cookies":"cookies","cookies-touse":"To use this functionality you first need to:",no:"No",yes:"Yes"}}});fo("utwente_base","xt",{"site-common":{texts:{"cookies-accept":"Accept","cookies-cookies":"cookies","cookies-touse":"To use this functionality you first need to:",no:"No",yes:"Yes"}}});te();N();var Ln=class extends Is{_dialogclass;holdernode;modalitynode;constructor(e,t){super(t),this._dialogclass=e,this.contentnode=W("div",{className:this._dialogclass}),this.holdernode=W("div",{className:this._dialogclass+"__holder",childNodes:[this.contentnode]}),this.modalitynode=W("div",{className:this._dialogclass+"__modalbg",childNodes:[this.holdernode],on:{click:o=>this._onModalityClick(o),wheel:o=>V(o)}}),t?.theme&&this.modalitynode.classList.add(t.theme)}_openDialog(){document.body.appendChild(this.modalitynode)}closeDialog(){this.modalitynode.remove(),super.closeDialog()}_onModalityClick(e){this.holdernode.contains(e.target)||(V(e),this.options.allowcancel&&this.resolve(null))}afterShow(){we(this.holdernode)}};var xu=document.documentElement.lang.split("-")[0];Zh(i=>new ul(i),{messageboxclassbase:"wh-form__"});var ul=class extends Ln{utheadernode=p("div",{class:"ut-dialog__header"});ps;constructor(e){if(super("ut-dialog",e),e&&e.allowcancel){let o=p("button",{class:"ut-dialog--isclose ut-dialog__closeicon UT-icon-UT_icon_47_cross-16px",onClick:n=>{V(n),this.resolve("close")},"aria-label":v("utwente_base:frontend.ws2016.js.dialog-close-arialabel"),type:"button"});this.holdernode.appendChild(o)}this.contentnode.before(this.utheadernode),(!e||!e.nativescroll)&&(this.ps=new Xt(this.contentnode,{wheelPropagation:!1,suppressScrollX:!0})),new ResizeObserver(()=>this._checkContents()).observe(this.contentnode)}afterShow(){this.holdernode.clientHeight,this.holdernode.classList.add("ut-dialog--aftershow"),this.holdernode.setAttribute("tabindex","-1"),this.holdernode.focus(),we(this.holdernode),this.ps&&setTimeout(()=>this.ps.update(),510)}_checkContents(){let e=this.contentnode;this.holdernode.parentNode.classList.toggle("ut-dialog--scrollable",e.scrollHeight>e.offsetHeight),this.ps&&this.ps.update()}};function yb(i,e){let t=i.getBoundingClientRect();return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}var wi=class{dialognode;name;_timer;constructor(e,t,o={}){this.name=t,this.dialognode=p("dialog",{class:"utdialog2-dialog "+this.name+"-dialog "+(o.classname?o.classname:"")}),e.classList.add(this.name+"-dialog__inner","styledscrollbar-y","utdialog2-dialog__inner"),this.dialognode.appendChild(e),document.body.appendChild(this.dialognode),we(e),this.dialognode.appendChild(p("button",{type:"button","data-action":"close","aria-label":v("utwente_base:frontend.ws2016.js.dialog-close-arialabel"),class:"utdialog2-dialog__close "+this.name+"-dialog__close"})),this.dialognode.addEventListener("click",n=>{(n.target.closest("[data-action='close']")||yb(this.dialognode,n))&&this.dialognode?.close()}),this.dialognode.addEventListener("close",()=>{o.onClose&&o.onClose(),clearTimeout(this._timer),this.dialognode&&(this.dialognode.classList.remove("utdialog2-dialog--aftershow",this.name+"-dialog--aftershow"),this._timer=setTimeout(()=>{this.dialognode&&this.dialognode.remove()},300))})}showModal(){this.dialognode.open||(this.dialognode.showModal(),this.dialognode.classList.add("utdialog2-dialog--aftershow",this.name+"-dialog--aftershow"))}},_o=null;window.addEventListener("dompack:busymodal",i=>{_o||=p("div",{class:"rpc__overlay ut-spinner--showembeddedspinner"},p("div",{class:"rpc__overlaywait"},p("span",{class:"rpc__spinner"},p("span",{class:"ut-spinner2"})),xu==="nl"?"Een ogenblik geduld...":xu==="de"?"Bitte warte einen Moment...":"Please wait a moment...")),i.detail.show?(document.body.appendChild(_o),_o.clientHeight,_o.classList.add("rpc__overlay--visible")):(_o.classList.remove("rpc__overlay--visible"),document.body.removeChild(_o))});M();var tt=class extends me{async getFormExtraSubmitData(){return{...await super.getFormExtraSubmitData(),referralinfo:st(),targetinterest:document.documentElement.dataset.targetinterest||"",targetlanguage:Li().language}}};var ml=document.documentElement.lang.split("-")[0];customElements.define("wh-fileedit",xn);customElements.define("wh-imgedit",yn);x(".wh-form__rtd",i=>new Sn(i,{hidebuttons:["table"],onInsertVideo:void 0}));al({endpoint:"eu"});rl();Vs({captcha:"onLoad"});A["ut-nocustomselect"]||x(".wh-styledinput select:not(:is(.wh-form__prefillcontrol, .wh-rtd__toolbarstyle))",i=>{if(!i.closest(".wh-form__fieldgroup--slimselect")&&!i.classList.contains("replacedby-ss")){let e=w(i,"option").length>10&&(i.name.indexOf("country")>=0||i.name.indexOf("nationality")>=0||i.name.indexOf("language")>=0);if(i.utSlimSelect)throw console.error("SlimSelect already initialized on this node",i,i.utSlimSelect),new Error("SlimSelect already initialized on this node");let t=new ht({select:i,settings:{showSearch:e,modal:"off",searchPlaceholder:ml==="nl"?"Zoek...":"Search...",searchText:ml==="nl"?"Geen resultaten":"No results"}});i.utSlimSelect=t,i.classList.add("replacedby-ss"),i[Nt]={getValue(){return i.value},setValue(o){t.setSelected(o)}}}});x(".wh-form.wh-styledinput",i=>{is(ml??"en"),i.querySelector(".wh-form__fieldgroup--required")&&i.appendChild(p("div",{class:"wh-form__requirednote"},p("p",null,R("utwente_base:frontend.ws2016.js.starsrequired"))))});w(".wh-form .wh-form__fieldgroup.ut-prefilled").forEach(i=>
10{w(i,"input:not([readonly]):not([disabled]),select:not([readonly]):not([disabled]),textarea:not([readonly]):not([disabled])").forEach(t=>t.addEventListener("change",()=>i.classList.add("ut-prefilled--changed")))});x(".utwente-check-studylink-number input",i=>{i.minLength=7,i.maxLength=7,i.type="tel",i.pattern="[0-9]{7}",De(i,e=>{if(!e.value.match(/^[0-9]{7}$/))return"This is not a valid student number. To find your student number please check your Osiris application mail or login to the Osiris application system."})});w(".wh-form input[type=date]").forEach(i=>{let e=kb();e.length>7&&i.after(p("span",{class:"wh-form__suffix"},"(",e,")"))});function kb(){let i=new Date(2026,11,31);return new Intl.DateTimeFormat(void 0).format(i).replace("31","dd").replace("12","mm").replace("2026","yyyy").replace("26","yy")}x("input[type=email]",i=>{(i.maxLength<=0||i.maxLength>100)&&(i.maxLength=100)});M();var gl=class{node;y=0;isSticky=!1;ctablock=null;managedcta=null;ctabar=null;ctabtns=[];constructor(e){this.node=e,window.addEventListener("scroll",()=>this.onScroll(),{passive:!0}),window.addEventListener("load",()=>this.onResize()),window.addEventListener("resize",()=>this.onResize()),document.addEventListener("ws:programmedetailsheader-toggle",()=>this.onResize()),document.fonts.ready.then(()=>this.onResize()).catch(t=>console.error(t)),this.onResize(),this.ctablock=T(".page-contentheader__bottomctacontainer"),this.ctablock?(this.ctabtns=w(this.ctablock,".ctabutton-with-rightarrow"),this.managedcta=T(this.ctablock,".managedcta"),this.checkCTAVisibility(),new MutationObserver(()=>this.checkCTAVisibility()).observe(this.ctablock,{subtree:!1,attributes:!0,characterData:!1}),this.managedcta&&new MutationObserver(()=>this.checkCTAVisibility()).observe(this.managedcta,{subtree:!1,attributes:!0,characterData:!1})):this.node.classList.add("page-contentheader__ctabuttonsbar--showprimary")}checkCTAVisibility(){this.managedcta&&this.ctablock&&(this.ctablock.hidden=!1,this.ctablock.hidden||=this.managedcta.offsetParent===null);let e=!1;this.ctablock.hidden||this.ctabtns.forEach(t=>{e||=t.offsetParent!==null,t.closest(".has-expired-countdown")&&t.closest(".header-countdown-inprogress")&&(e=!1)}),this.node.classList.toggle("page-contentheader__ctabuttonsbar--showprimary",!e)}onResize(){this.node.classList.remove("page-contentheader__ctabuttonsbar--sticky"),this.isSticky=!1,this.y=this.node.getBoundingClientRect().top+window.scrollY-61,this.onScroll()}onScroll(){let e=window.scrollY>this.y;e!==this.isSticky&&(this.isSticky=e,this.node.classList.toggle("page-contentheader__ctabuttonsbar--sticky",e))}};x("#dialog-brochurerequestform-template",i=>{let e=T(i.content,".brochurerequestform-container");if(e)e.classList.add("wh-form--labelleft"),w(e,".wh-form").forEach(t=>t.classList.add("largedialog")),w(".page-contentheader__ctabuttonsbar__button--brochure").forEach(t=>{t.addEventListener("click",()=>{let o=Se({allowcancel:!0,borrow:e});o.contentnode?.classList.add("ut-dialog--large"),o.runModal()})});else{let t=T(i.content,".widget-wh-form");t&&(t.classList.add("largedialog"),w(".page-contentheader__ctabuttonsbar__button--brochure").forEach(o=>{o.addEventListener("click",()=>{let n=Se({allowcancel:!0,borrow:t});n.contentnode?.classList.add("ut-dialog--large"),n.runModal()})}))}});x(".page-contentheader__ctabuttonsbar",i=>new gl(i));M();N();var bl=Symbol(),wl=Symbol(),Tb={autoplay:!1,muted:!1,controls:!0,loop:!1,poster:""};function Eb(i,e){let t=Object.assign(Tb,e);e=Object.assign(t,e);let o,n=[];switch(i.network){case"youtube":n.push("autoplay="+(e.autoplay?"1":"0")),i.starttime&&n.push("start="+Math.floor(i.starttime)),i.endtime&&n.push("end="+Math.floor(i.endtime)),e.controls||n.push("controls=0"),e.loop&&(n.push("loop=1"),n.push("playlist="+i.id)),n.push("rel=0"),n.push("enablejsapi=1"),n.push("origin="+location.protocol+"//"+location.hostname),n.push("iv_load_policy=3"),n.push("modestbranding=1");let s="//www.youtube.com/embed/"+i.id;return n.length>0&&(s+="?"+n.join("&")),o=fl(),o.src=s,e.api?Sb(o):_l(o);case"vimeo":n.push("autoplay="+(e.autoplay?"1":"0")),i.endtime&&console.warn("setting an endtime doesn't work for Vimeo video's"),e.controls||console.warn("disabling video controls not possible for Vimeo video's"),e.loop&&n.push("loop=1"),e.background&&n.push("background=1");let r="//player.vimeo.com/video/"+i.id;if(n.length>0&&(r+="?"+n.join("&")),i.starttime){let l=i.starttime,a=Math.floor(l/60),d=l%60;r+="#t="+a+"m"+d+"s"}return o=fl(),o[wl]=!1,o.addEventListener("load",l=>o[wl]=!0),o.src=r,e.api?Lb(o):_l(o);case"yuja":{let l=new URL("https://www.example.org/?"+i.id).searchParams,a=l.get("h"),d=l.get("v"),c=l.get("a"),h=`//${a}/V/Video`;return n.push("v="+encodeURIComponent(d)),n.push("a="+encodeURIComponent(c)),e.starttime&&n.push("starttime="+e.starttime),e.endtime&&console.warn("setting an endtime doesn't work for Yuja video's"),e.controls||console.warn("disabling video controls not possible for Yuja video's"),e.loop&&console.warn("loop isn't supported for Yuja video's"),n.length>0&&(h+="?"+n.join("&")),o=fl(),o.src=h,Cb(o);break}case"videofile":return o=document.createElement("video"),o.loop=!!e.loop,o.controls=!!e.controls,o.muted=!!e.muted,e.poster&&(o.poster=e.poster),o.style.width="100%",o.style.height="100%",o.src=i.id,e.api?Fb(o):_l(o);default:console.error("Unknown video type");break}return o}function fl(){let i=document.createElement("iframe");return i.style.width="100%",i.style.height="100%",i.frameBorder=0,i.allowFullscreen=!0,i.setAttribute("allow","autoplay"),i}function vi(i){return!!i[bl]}function Ht(i,e){if(i[bl])return;i.innerHTML="",i[bl]=!0;let t=JSON.parse(i.getAttribute("data-video")),o=i.hasAttribute("data-video-options")?JSON.parse(i.getAttribute("data-video-options")):{};return o=Object.assign(o,e),new Promise((n,s)=>{Eb(t,o).then(r=>{i.appendChild(r.node),n(r)})})}var bo=class{constructor(e){this.node=e,this.network="static"}play(){}pause(){}getPaused(){return Promise.resolve()}getFinished(){return Promise.resolve()}setLoop(e){}seekTo(e){}getCurrentTime(){return Promise.resolve()}getDuration(){return Promise.resolve()}setVolume(e){}getVolume(){return Promise.resolve()}getVideoUrl(){return Promise.resolve()}onReady(){F(this.node,"video:ready",{bubbles:!0,cancelable:!1,detail:{player:this}})}onPlay(){F(this.node,"video:play",{bubbles:!0,cancelable:!1,detail:{player:this}})}onPause(){F(this.node,"video:pause",{bubbles:!0,cancelable:!1,detail:{player:this}})}onFinish(){F(this.node,"video:finish",{bubbles:!0,cancelable:!1,detail:{player:this}})}},$s=class extends bo{constructor(e){super(e),this.network="youtube",this.player=new YT.Player(this.node,{events:{onReady:this.onReady.bind(this),onStateChange:this.onStateEvent.bind(this)}})}play(){this.player.playVideo()}pause(){this.player.pauseVideo()}getPaused(){return Promise.resolve(this.player.getPlayerState()===YT.PlayerState.PAUSED)}getFinished(){return Promise.resolve(this.player.getPlayerState()===YT.PlayerState.ENDED)}setLoop(e){this.player.setLoop(!!e)}seekTo(e){this.player.seekTo(e,!0)}getCurrentTime(){return Promise.resolve(this.player.getCurrentTime())}getDuration(){return Promise.resolve(this.player.getDuration())}setVolume(e){this.player.setVolume(e)}getVolume(){return Promise.resolve(this.player.getVolume())}getVideoUrl(){return Promise.resolve(this.player.getVideoUrl())}onStateEvent(e){e.data===YT.PlayerState.PLAYING?this.onPlay():e.data===YT.PlayerState.PAUSED?this.onPause():e.data===YT.PlayerState.ENDED&&this.onFinish()}},Ys=class extends bo{constructor(e){super(e),this.network="vimeo",this.node[wl]?this.initPlayer():this.node.addEventListener("load",this.initPlayer.bind(this))}initPlayer(){this.player=new Vimeo.Player(this.node),this.player.ready().then(this.onReady.bind(this)),this.player.on("play",this.onPlay.bind(this)),this.player.on("pause",this.onPause.bind(this)),this.player.on("ended",this.onFinish.bind(this))}play(){this.player&&this.player.play()}pause(){this.player&&this.player.pause()}getPaused(){return this.player?this.player.getPaused():Promise.reject()}
10getFinished(){return this.player?this.player.getFinished():Promise.reject()}setLoop(e){if(!this.player)return Promise.reject();this.player.setLoop(e)}seekTo(e){if(!this.player)return Promise.reject();this.player.setCurrentTime(e)}getCurrentTime(){return this.player?this.player.getCurrentTime():Promise.reject()}getDuration(){return this.player?this.player.getDuration():Promise.reject()}setVolume(e){if(!this.player)return Promise.reject();this.player.setVolume(e/100)}getVolume(){return this.player?this.player.getVolume().then(e=>e*100):Promise.reject()}getVideoUrl(){return this.player?this.player.getVideoUrl():Promise.reject()}},vl=class extends bo{constructor(e){super(e),this.network="html5",this.node.addEventListener("loadedmetadata",this.onReady.bind(this)),this.node.addEventListener("play",this.onPlay.bind(this)),this.node.addEventListener("pause",this.onPause.bind(this)),this.node.addEventListener("ended",this.onFinish.bind(this))}play(){this.node.play()}pause(){this.node.pause()}getPaused(){return Promise.resolve(this.node.paused)}getFinished(){return Promise.resolve(this.node.ended)}setLoop(e){this.node.loop=!!e}seekTo(e){this.node.currentTime=e}getCurrentTime(){return Promise.resolve(this.node.currentTime)}getDuration(){return Promise.resolve(this.node.duration)}setVolume(e){this.node.volume=e/100}getVolume(){return Promise.resolve(this.node.volume*100)}getVideoUrl(){return Promise.resolve(this.node.src)}},xl=class{constructor(e){this.node=e,this.network="static",this.node_parent=e.parentNode}play(){return console.info("asking to play"),this.node.contentWindow.postMessage(JSON.stringify({name:"Play"}),"*"),Promise.resolve()}pause(){return console.info("asking to pause"),this.node.contentWindow.postMessage(JSON.stringify({name:"Pause"}),"*"),Promise.resolve()}getPaused(){return Promise.resolve()}getFinished(){return Promise.resolve()}setLoop(e){}seekTo(e){}getCurrentTime(){return Promise.resolve()}getDuration(){return Promise.resolve()}setVolume(e){}getVolume(){return Promise.resolve()}getVideoUrl(){return Promise.resolve()}onReady(){F(this.node,"video:ready",{bubbles:!0,cancelable:!1,detail:{player:this}})}onPlay(){F(this.node,"video:play",{bubbles:!0,cancelable:!1,detail:{player:this}})}onPause(){F(this.node,"video:pause",{bubbles:!0,cancelable:!1,detail:{player:this}})}onFinish(){F(this.node,"video:finish",{bubbles:!0,cancelable:!1,detail:{player:this}})}};function _l(i){return Promise.resolve(new bo(i,"static"))}var Ge={};window.onYouTubeIframeAPIReady=function(){Ge.youtube.ready=!0;for(let i of Ge.youtube.waiters)i.deferred.resolve(new $s(i.node))};function Sb(i){if(!Ge.youtube){Ge.youtube={ready:!1,waiters:[]};let e=document.createElement("script");e.src="//www.youtube.com/iframe_api",e.async=!0,document.head.appendChild(e)}if(Ge.youtube.ready)return Promise.resolve(new $s(i));{let e=$o();return Ge.youtube.waiters||(Ge.youtube.waiters=[]),Ge.youtube.waiters.push({deferred:e,node:i}),e.promise}}function Lb(i){if(!Ge.vimeo){Ge.vimeo={ready:!1,waiters:[]};let e=document.createElement("script");e.src="//player.vimeo.com/api/player.js",e.async=!0,e.addEventListener("load",t=>{Ge.vimeo.ready=!0;for(let o of Ge.vimeo.waiters)o.deferred.resolve(new Ys(o.node))}),document.head.appendChild(e)}if(Ge.vimeo.ready)return Promise.resolve(new Ys(i));{let e=$o();return Ge.vimeo.waiters||(Ge.vimeo.waiters=[]),Ge.vimeo.waiters.push({deferred:e,node:i}),e.promise}}function Cb(i){return Promise.resolve(new xl(i))}function Fb(i){return Promise.resolve(new vl(i))}N();te();N();var yl=class{constructor(){this.scrollactions=[],this.elements=[],this.scrollfn=this.onScroll.bind(this),this.resizefn=this.onResize.bind(this),window.addEventListener("scroll",this.scrollfn),window.addEventListener("resize",this.resizefn),this.isinit=!0,this.onResize(),K(()=>{this.addNodes(document.querySelectorAll("[data-scrollevent]"))})}addNodes(e){if(e.length)for(let t=0;t<e.length;++t){let o=e[t].getAttribute("data-scrollevent");o=o?parseInt(o):0;let n={state:"",node:e[t],treshhold:o,boundingrect:null,actions:[],data:null,measure:""},s=e[t].getAttribute("data-scrollvisibleclass");s&&e[t].addEventListener("wh:visibilitychange",()=>e[t].classList.add(s));let r=e[t].getAttribute("data-scrolleventmeasure");r!=""&&(n.measure=r);let l=e[t].getAttribute("data-scrollparallax");if(typeof l=="string"){let d=e[t].hasAttribute("data-scrollparallaxfree"),c=e[t].firstElementChild;if(c){let h=Number(l);n.data={innernode:c,parallax:h||.2,limitparallax:!d},n.actions.push("parallax"),this.scrollactions.push(n)}}let a=e[t].getAttribute("data-scrollzoom");
10if(typeof a=="string"){let d=e[t].firstElementChild;d&&(n.data={innernode:d,zoom:a!==0?Math.abs(a):1},n.actions.push("zoom"),this.scrollactions.push(n))}this.elements=this.elements.filter(d=>d.node!=e[t]),this.elements.push(n)}}onScrollActions(){for(let e=0;e<this.scrollactions.length;e++){let t=this.scrollactions[e];if(t.state=="visible"){if(t.actions.indexOf("parallax")!=-1){let o=t.data.innernode.clientHeight;if(t.data.limitparallax&&!o)continue;let n=t.node.clientHeight,s=o-n,r=2*(t.boundingrect.bottom/(this.viewport_height+n)-.5),l=s*-.5,a=t.data.parallax;t.data.limitparallax&&Math.abs(a)>s&&(a=a<0?-s:s),t.data.innernode.style.transform||(t.data.innernode.style.top="auto",t.data.innernode.style.bottom="auto"),t.data.innernode.style.transform="translate(0,"+(l+r*a)+"px)"}if(t.actions.indexOf("zoom")!=-1)if(t.boundingrect.top<=0){let o=t.node.clientHeight,n=-t.boundingrect.top/o,s=1+n*t.data.zoom;t.data.innernode.style.transform="scale("+s+","+s+")",t.data.innernode.style.opacity=1-n}else t.data.innernode.style.transform="scale(1,1)",t.data.innernode.style.opacity=1}}}onScroll(e){let t=window.scrollY;this.isscrollup=this.lastscroll?this.lastscroll>t:!1,this.lastscroll=t,this.checkElementsVisibility(),this.onScrollActions()}checkElementsVisibility(){for(let e=this.elements.length-1;e>=0;--e){let t=!1,o=this.isinit?0:this.elements[e].treshhold,n;if(this.elements[e].measure=="content"){let s=this.elements[e].node.firstElementChild;for(;s&&(n=s.getBoundingClientRect(),!(n.height>0&&(t=n.top>=o&&this.viewport_height-n.top>=o||n.bottom>o&&this.viewport_height-n.bottom>o,t)));)s=s.nextElementSibling}else{if(n=this.elements[e].node.getBoundingClientRect(),n.height==0)continue;this.elements[e].boundingrect=n,t=n.top>=o&&this.viewport_height-n.top>=o||n.bottom>o&&this.viewport_height-n.bottom>o}t?this.elements[e].state!="visible"&&(this.elements[e].state="visible",F(this.elements[e].node,"wh:visibilitychange",{bubbles:!0,cancelable:!1,detail:{scrolldirection:this.isinit?"":this.isscrollup?"up":"down",target:this.elements[e],visible:!0,nodebounds:n}})):this.elements[e].state=="visible"&&(this.elements[e].state="hide",F(this.elements[e].node,"wh:visibilitychange",{bubbles:!0,cancelable:!1,detail:{scrolldirection:this.isinit?"":this.isscrollup?"up":"down",target:this.elements[e],visible:!1,nodebounds:n}}))}this.isinit=!1}onResize(e){let t=window.innerHeight;this.viewport_height&&this.viewport_height==t||(this.viewport_height=t,this.onScroll())}},Ab=new yl,kl=Ab;var Ke=Symbol(),Fn="",Xs=null,yu=[];function Mb(i){Fn=Fn||ys(),Xs||(Xs=zt(),xe.umc&&console.log("[umc] User beacons",Xs));let e={displayed:!1,ctas:[],curcta:""};for(let t of i.querySelectorAll(".cta--managed"))e.ctas.push({node:t,config:cs(t.dataset.ctaconfig)});if(xe.umc){let t=e.ctas.map(o=>o.config.tag).join(", ");console.log(`[umc] Found a managed CTA ${i.dataset.ctatag} with ${e.ctas.length} CTAs: ${t}`)}i[Ke]=e,Tl(i),yu.push(i),Fn||(xe.umc&&console.log("[umc] Requesting user country"),ct().then(t=>{Fn=t,Tl(i)})),kl.addNodes([i]),i.addEventListener("wh:visibilitychange",Rb),i.addEventListener("click",qb),window.addEventListener("ut-beaconchange",Pb)}function Pb(){yu.forEach(Tl)}function Tl(i){if(!i[Ke]||i[Ke].displayed){xe.umc&&console.log(`[umc] Not updating managed CTA ${i.dataset.ctatag}, it's already been displayed`);return}if(document.documentElement.dataset.site?.match(/Repository/i)||document.documentElement.classList.contains("wh-widgetpreview")){document.documentElement.classList.add("ut--ctapreview"),jb(i);return}let e=!1,o=(new URL(location.href).searchParams.get("showcta")||"").split(":");i[Ke].curcta=null;let n=null;for(let s of i[Ke].ctas){if(o[0]==i.dataset.ctatag)o.length==1||o[1]==s.config.tag?(xe.umc&&console.info(`[umc] Showing forced CTA ${s.config.tag}`),s.node.classList.add("cta--show"),n=s):(xe.umc&&console.warn(`[umc] Not showing CTA ${s.config.tag}: Not matched by URL variable: '${s.config.tag}' != '${o[1]}'`),s.node.classList.remove("cta--show"));else if(e)s.node.classList.remove("cta--show");else try{tn(s.config,{country:Fn,beacons:Xs,url:location.href}),xe.umc&&console.info(`[umc] Showing CTA ${s.config.tag}`),s.node.classList.add("cta--show"),i[Ke].curcta=s.config.tag,n=s,e=!0}catch(r){if(r instanceof qe)xe.umc&&console.warn(`[umc] Not showing CTA ${s.config.tag}: ${r.message}`),s.node.classList.remove("cta--show");else throw r}s.node._wsTmpDisplay=getComputedStyle(s.node).display}n&&(i.style.display="block",i.hidden=!1,i._wsTmpDisplay=getComputedStyle(i).display,setTimeout(()=>{F(i,"ws:managed-cta",{bubbles:!0,cancelable:!1,detail:{cta:n}})},1))}function jb(i){let e=new URL(location.href).searchParams,t=JSON.parse(e.get("testprops"));t&&(t={...t,url:t.url||location.href}),i.style.display="block",i.hidden=!1,i[Ke].curcta=null;let o=i[Ke].ctas.some(n=>{let s;if(t)try{return tn(n.config,t),xe.umc&&console.info(`[umc] Showing CTA ${n.config.tag}`),n.node.classList.add("cta--show"),i[Ke].curcta=n.config.tag,!0}catch(l){if(l instanceof qe){if(xe.umc&&console.warn(`[umc] Not showing CTA ${n.config.tag}: ${l.message}`),!t||!t.showskipped){n.node.classList.remove("cta--show");return}s=l}else throw l}if(n.node.classList.add("cta--show"),n.node.querySelector(".ut--cta__explain"))return;let r=[];if(n.config.publish_from&&(s&&s.prop=="publish_from"?r.push(v("utwente_base:frontend.ws2016.js.managedcta.publish_from-skipped",new Date(s.values.expected).toLocaleStr
10ing(),new Date(s.values.got).toLocaleString())):s||r.push(v("utwente_base:frontend.ws2016.js.managedcta.publish_from",new Date(n.config.publish_from).toLocaleString()))),n.config.publish_until&&(s&&s.prop=="publish_until"?r.push(v("utwente_base:frontend.ws2016.js.managedcta.publish_until-skipped",new Date(s.values.expected).toLocaleString(),new Date(s.values.got).toLocaleString())):s||r.push(v("utwente_base:frontend.ws2016.js.managedcta.publish_until",new Date(n.config.publish_until).toLocaleString()))),n.config.countries&&n.config.countries.length&&(s&&s.prop=="countries"?r.push(v("utwente_base:frontend.ws2016.js.managedcta.countries-skipped",s.values.expected.join(", "),s.values.got)):s||r.push(v("utwente_base:frontend.ws2016.js.managedcta.countries",n.config.countries.join(", ")))),n.config.beacons&&(s&&s.prop=="beacons"?!s.values.expected&&!s.values.got?r.push(v("utwente_base:frontend.ws2016.js.managedcta.beacons-skipped-none")):s.values.got?r.push(v("utwente_base:frontend.ws2016.js.managedcta.beacons-skipped-time",s.values.tag,new Date(s.values.expected).toLocaleString(),new Date(s.values.got).toLocaleString())):r.push(v("utwente_base:frontend.ws2016.js.managedcta.beacons-skipped",s.values.expected)):s||r.push(...n.config.beacons.map(l=>l.maxdays?v("utwente_base:frontend.ws2016.js.managedcta.beacon-maxdays",l.tag,l.maxdays):v("utwente_base:frontend.ws2016.js.managedcta.beacon",l.tag)))),n.config.regexes&&n.config.regexes.length){if(s&&s.prop=="regexes")s.values.error?r.push(v("utwente_base:frontend.ws2016.js.managedcta.regex-skipped-error",s.values.expected,s.values.error)):s.values.expected?r.push(v("utwente_base:frontend.ws2016.js.managedcta.regex-skipped",`/${s.values.expected}/`,s.values.got)):r.push(v("utwente_base:frontend.ws2016.js.managedcta.regex-skipped-none",s.values.got));else if(!s){let l=n.config.regexes.filter(d=>!d.exclude).map(d=>d.regex.source);l.length&&r.push(v("utwente_base:frontend.ws2016.js.managedcta.regex",`[ /${l.join("/, /")}/ ]`));let a=n.config.regexes.filter(d=>d.exclude).map(d=>d.regex.source);a.length&&r.push(v("utwente_base:frontend.ws2016.js.managedcta.regex-exclude",`[ /${a.join("/, /")}/ ]`))}}n.config.queries&&n.config.queries.length&&(s&&s.prop=="queries"?s.values.error?r.push(v("utwente_base:frontend.ws2016.js.managedcta.query-skipped-error",s.values.expected,s.values.error)):r.push(v("utwente_base:frontend.ws2016.js.managedcta.query-skipped",s.values.got)):s||r.push(v("utwente_base:frontend.ws2016.js.managedcta.query",`[ '${n.config.queries.map(l=>l._term).join("', '")}' ]`))),r.length?n.node.after(p("div",{class:"ut--cta__explain"},t&&t.showskipped?v("utwente_base:frontend.ws2016.js.managedcta.explanation-skipped"):v("utwente_base:frontend.ws2016.js.managedcta.explanation"),":",p("ul",{class:"unordered"},r.map(l=>p("li",null,l))))):n.node.after(p("div",{class:"ut--cta__explain ut--cta__explain--empty"}))});t&&t.showskipped&&!o&&i.append(p("div",{class:"ut--cta__explain ut--cta__explain--nocta"},v("utwente_base:frontend.ws2016.js.managedcta.noctatoshow")))}function Rb(i){let e=i.target;if(i.detail.visible&&!e[Ke].displayed&&(xe.umc&&console.info(`[umc] Managed CTA ${e.dataset.ctatag} is displayed`,e),e[Ke].displayed=!0,window.dataLayer&&e[Ke].curcta)){let t={event:"cta-display","cta-tag-main":e.dataset.ctatag};e[Ke].curcta&&(t["cta-tag-variant"]=e[Ke].curcta),window.dataLayer.push(t)}}function qb(i){let e=i.target;if(e.href||(e=e.closest("[href]")),e){let t=e.closest(".managedcta");t&&t[Ke]&&(xe.umc&&console.info(`[umc] Received link click in managed CTA ${t.dataset.ctatag}`),i.stopPropagation(),i.preventDefault(),ve({event:"cta-click","cta-tag-main":t.dataset.ctatag,"cta-tag-variant":t[Ke].curcta||void 0,eventCallback:()=>location.href=e.href}))}}x(".managedcta",Mb);M();var El=class{node;node_day;node_daydigits;node_hours;node_hourdigits;node_minutes;node_minutedigits;node_seconds;node_seconddigits;node_digits;animframetimer=null;options;beforeContainer=null;inprogressContainer=null;expiredContainer=null;state="";countdownvalue=null;countdownto=null;countdownfrom=null;countdownto_timestamp=0;countdownfrom_timestamp=0;previousroundedtime=0;debug=!1;initialized=!1;constructor(e,t){this.node=e,this.options={countdownto:"",countdownfrom:"",onexpired:null,...t},this.debug&&console.log("[CountDownComponent] initializing",t);let o=e.closest(".widget-countdown, .header-countdown");o&&(this.beforeContainer=T(o,".widget-countdown__before, .header-countdown-before"),this.inprogressContainer=T(o,".widget-countdown__inprogress, .header-countdown-inprogress"),this.expiredContainer=T(o,".widget-countdown__expired, .header-countdown-expired")),this.node_day=e.querySelector(".countdown__section--days"),this.node_daydigits=Array.from(this.node_day.querySelectorAll(".countdown__digit")),this.node_hours=e.querySelector(".countdown__section--hours"),this.node_hourdigits=Array.from(this.node_hours.querySelectorAll(".countdown__digit")),this.node_minutes=e.querySelector(".countdown__section--minutes"),this.node_minutedigits=Array.from(this.node_minutes.querySelectorAll(".countdown__digit")),this.node_seconds=e.querySelector(".countdown__section--seconds"),this.node_seconddigits=Array.from(this.node_seconds.querySelectorAll(".countdown__digit")),this.node_digits=Array.from(e.querySelectorAll(".countdown__digit")),this.debug&&console.info("[CountDownComponent] Counting down to %s",e.dataset.countdownto,this.countdownto_timestamp),this.enhanceDOM(),t.countdownfrom?this.setCountdownFrom(t.countdownfrom):e.dataset.countdownfrom&&this.setCountdownFrom(e.dataset.countdownfrom),t.countdownto?this.setCountdownTo(t.countdownto):e.dataset.countdownto?this.setCountdownTo(e.dataset.countdownto):console.error("[CountDownComponent] initialized without setting options.countdownto or a data-countdownto attribute on .component-countdown"),this.refreshAndScheduleNextFrame(),this.countdownvalue&&this.countdownvalue.days===0&&this.node_day.classList.add("countdown__section--initiallyleadingzero"),e.classList.add("component-countdown--allowanimation"),this.node.addEventListener("transitionend",n=>this.onTransitionEnd(n)),document.addEventListener("visibilitychange",()=>this.onPageVisibilityChange()),this.initialized=!0}setCountdownBlockVisibility(e){this.state!==e&&(this.debug&&console.info("[CountDownComponent] Changing countdown block visibility from '"+this.state+"' to '"+e+"'"),this.state=e,this.beforeContainer&&(this.beforeContainer.hidden=e!=="before"),this.inprogressContainer&&(this.inprogressContainer.hidden=e!=="inprogress"),this.expiredContainer&&(this.expiredContainer.hidden=e!=="expired"))}setCountdownFrom(e){this.countdownfrom=ku(e),this.countdownfrom_timestamp=this.countdownfrom.getTime(),this.countdownfrom_timestamp&&new Date().getTime()<this.countdownfrom_timestamp&&(this.debug&&console.info("[CountDownComponent] The countdown has not started yet!"),this.setCountdownBlockVisibility("before"))}setCountdownTo(e){this.countdownto=ku(e),this.countdownto_timestamp=this.countdownto.getTime(),this.countdownvalue=null,this.previousroundedtime=0,this.initialized&&this.refreshAndScheduleNextFrame()}stopCountdown(){this.animframetimer&&(cancelAnimationFrame(this.animframetimer),this.animframetimer=null)}onPageVisibilityChange(){if(document.visibilityState==="hidden"){this.node.classList.remove("component-countdown--allowanimation");return}if(document.visibilityState==="visible"){for(let e of this.node_digits)if(e.firstElementChild.__countdown_value===0){let t=this.__getWrapDigitIDX(e);this.setTrackPosition(e,t)}requestAnimationFrame(this.reenableTransitions.bind(this))}}reenableTransitions(){requestAnimationFrame(this.reenableTransitions2.bind(this))}reenableTransitions2(){this.node.classList.add("component-countdown--allowanimation")}
10onAnimFrame(){this.animframetimer=null,this.refreshAndScheduleNextFrame()}refreshAndScheduleNextFrame(){this.refresh(),!this.animframetimer&&(!this.countdownvalue||!this.countdownvalue.expired)&&(this.animframetimer=requestAnimationFrame(this.onAnimFrame.bind(this)))}refresh(){let t=new Date().getTime();t%1e3>950?t+=1e3-t%1e3:t=t-t%1e3,t!==this.previousroundedtime&&(this.previousroundedtime=t,this.refreshFor(t))}refreshFor(e){if(this.beforeContainer)if(this.countdownfrom_timestamp&&e>=this.countdownfrom_timestamp)this.debug&&console.info("[CountDownComponent] The countdown starts now!"),this.setCountdownBlockVisibility("inprogress");else return;if(e>this.countdownto_timestamp){this.debug&&console.info("[CountDownComponent] The countdown has expired!"),this.setCountdownBlockVisibility("expired"),this.countdownvalue={days:0,hours:0,minutes:0,seconds:0,expired:!0},this.options.onexpired&&this.options.onexpired();return}this.setCountdownBlockVisibility("inprogress");let t=this.countdownto_timestamp-e,o=Math.floor(t/(1e3*60*60*24)),n=Math.floor(t%(1e3*60*60*24)/(1e3*60*60)),s=Math.floor(t%(1e3*60*60)/(1e3*60)),r=Math.floor(t%(1e3*60)/1e3);this.node_day.classList.toggle("leadingzeros",o===0),this.node_hours.classList.toggle("leadingzeros",o===0&&n===0),this.node_minutes.classList.toggle("leadingzeros",o===0&&n===0&&s===0),this.node_seconds.classList.toggle("leadingzeros",o===0&&n===0&&s===0&&r===0);let l=[Math.floor(o/100),Math.floor(o/10)%10,o%10,Math.floor(n/10),n%10,Math.floor(s/10),s%10,Math.floor(r/10),r%10],a=0,d=!0,c=0;for(let h of l){let m=l[a];m>0&&(d=!1),d||c++;let u=this.node_digits[a];!this.initialized&&d&&this.node_digits[a].classList.toggle("countdown__digit--initiallyleadingzero",d),u.firstElementChild.__countdown_value!==m&&(this.setDigit(u,m),this.node_digits[a].classList.toggle("countdown__digit--leadingzero",d)),a++}this.node.setAttribute("data-initiallyvisibledigits",c.toString()),this.countdownvalue={days:o,hours:n,minutes:s,seconds:r,expired:!1},this.debug&&console.info("[CountDownComponent]",this.countdownvalue)}setDigit(e,t){e.firstElementChild.__countdown_value=t,e.setAttribute("data-countvalue",String(t)),this.__shiftTrack(e,t)}__shiftTrack(e,t){t===0&&(!this.initialized||document.visibilityState==="hidden")&&(t=this.__getWrapDigitIDX(e)),this.setTrackPosition(e,t)}__getWrapDigitIDX(e){let t=e.getAttribute("data-digit");return t==="minutes-ten"||t==="seconds-ten"?6:t==="hours-ten"?3:10}setTrackPositionToWrapDigit(e){let t=this.__getWrapDigitIDX(e);this.setTrackPosition(e,t)}setTrackPosition(e,t){let o=`translateY(calc(-${100*t}% - ${t}px))`,n=e.firstElementChild;n.style.transform=o,n.__countdown_digitidx=t}onTransitionEnd(e){let t=e.target;if(t.__countdown_value===0){let o=t.parentNode;document.hidden?this.setTrackPositionToWrapDigit(o):(t.style.transition="none",this.setTrackPositionToWrapDigit(o),setTimeout(()=>{t.style.transition=""}))}}enhanceDOM(){let e=this.node.querySelectorAll(".countdown__digit"),t=this.getDigitsFragment([0,1,2,3,4,5,6,7,8,9,0]),o=this.getDigitsFragment([0,1,2,3,4,5,0]),n=this.getDigitsFragment([0,1,2,0]);for(let s of e){let r=s.getAttribute("data-digit"),l;r==="minutes-ten"||r==="seconds-ten"?l=o:r==="hours-ten"?l=n:l=t,s.replaceChild(l.cloneNode(!0),s.firstChild)}}getDigitsFragment(e){let t=document.createDocumentFragment(),o=document.createElement("div");o.className="countdown__digit__track",t.appendChild(o);for(let n of e){let s=document.createElement("div");s.className="countdown__digit__number",s.innerText=n.toString(),o.appendChild(s)}return t}};function ku(i){let e=i.split(" "),t=e[0].split("-"),o=e[1].split(":");return new Date(Number(t[0]),Number(t[1])-1,Number(t[2]),Number(o[0]),Number(o[1]))}x(".component-countdown[data-countdownto]",i=>new El(i,{}));M();var Gs=class{activeidx;slides;timer;timeout;constructor(e,t){this.activeidx=0,this.slides=w(e,t.selector),this.timeout=t.timeout,!(this.slides.length<=1)&&(e.addEventListener("focusin",()=>this.pauseSlides()),e.addEventListener("focusout",()=>this.resumeSlides()),this.timer=setTimeout(()=>this.nextSlide(),this.timeout))}pauseSlides(){clearTimeout(this.timer),this.timer=void 0}resumeSlides(){this.timer||(this.timer=setTimeout(()=>this.nextSlide(),this.timeout))}nextSlide(){this.gotoSlide(this.activeidx+1)}gotoSlide(e){clearTimeout(this.timer),e<0?e=this.slides.length-1:e>=this.slides.length&&(e=0),this.slides[this.activeidx].hidden=!0,this.activeidx=e,this.slides[this.activeidx].hidden=!1,this.timer=setTimeout(()=>this.nextSlide(),this.timeout)}};var Sl=8e3,Di="page-contentheader__video",Db="750px",Ll=class{videos;curVideo=-1;node;isActive=!1;fallbackTimeout;autoplaySupported=null;constructor(e){if(this.node=e,this.videos=w(e,"."+Di).map(o=>({node:o,player:null})),!this.videos.length)return;let t=matchMedia(`(max-width: ${Db})`);t.addEventListener("change",o=>this.checkVideo(o.matches)),this.checkVideo(t.matches)}checkVideo(e){e?this.pauseVideo():this.startVideo()}pauseVideo(){this.isActive=!1,this.autoplaySupported===!1?(clearTimeout(this.fallbackTimeout),this.fallbackTimeout=void 0):this.curVideo>=0&&this.videos[this.curVideo].player.pause()}async nextVideo(){if(!this.isActive)return;++this.curVideo>=this.videos.length&&(this.curVideo=0);let e=this.videos[this.curVideo];e.player?e.player&&this.playVideo():(e.player=await Ht(e.node,{}),e.node.addEventListener("video:play",()=>this.videoStarted()),e.node.addEventListener("video:finish",()=>{this.nextVideo()}),e.node.addEventListener("video:ready",()=>this.playVideo()))}playVideo(){let e=this.videos[this.curVideo];
10e.node.classList.add(`${Di}--current`);let t=this.curVideo-1;t<0&&(t=this.videos.length-1),this.videos[t].node.classList.remove(`${Di}--current`,`${Di}--playing`),this.videos[t].node.hidden=!0,e.player.play(),this.fallbackTimeout||(this.fallbackTimeout=setTimeout(()=>this.videoFallback(),Sl))}videoStarted(){this.videos[this.curVideo].node.hidden=!1,this.videos[this.curVideo].node.classList.add(`${Di}--playing`),clearTimeout(this.fallbackTimeout),this.fallbackTimeout=void 0,this.autoplaySupported=!0}videoFallback(){console.warn("Video fallback mode activated"),this.autoplaySupported=!1,this.node.classList.add("page-contentheader--fallback"),this.nextVideoSlide()}startVideo(){this.isActive=!0,this.curVideo<0?this.nextVideo():this.autoplaySupported===!1?this.fallbackTimeout=setTimeout(()=>this.nextVideoSlide(),Sl):this.videos[this.curVideo].player.play()}nextVideoSlide(){if(!this.isActive)return;++this.curVideo>=this.videos.length&&(this.curVideo=0),this.videos[this.curVideo].node.classList.add(`${Di}--current`);let e=this.curVideo-1;e<0&&(e=this.videos.length-1),this.videos[e].node.classList.remove(`${Di}--current`),this.fallbackTimeout=setTimeout(()=>this.nextVideoSlide(),Sl)}};x(".page-contentheader--toplevelhome",i=>new Ll(i));var Cl=class{node;width=0;minWidth=0;maxWidth=0;constructor(e){this.node=e,window.addEventListener("scroll",()=>this.onScroll(),{passive:!0}),window.addEventListener("load",()=>this.onResize()),window.addEventListener("resize",()=>this.onResize()),this.onResize()}onResize(){this.node.style.width="",this.width=0,this.node.parentElement.classList.remove("page-contentheader--fullwidth"),this.minWidth=this.node.offsetWidth,this.maxWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}onScroll(){if(!this.minWidth)return;let e=window.scrollY>0?window.scrollY:0,t=Math.floor(this.minWidth*(1+e/2e3));t>this.maxWidth&&(t=this.maxWidth),t!==this.width&&(this.node.style.width=t+"px",t>=this.maxWidth?this.node.parentElement.classList.add("page-contentheader--fullwidth"):this.width>=this.maxWidth&&this.node.parentElement.classList.remove("page-contentheader--fullwidth"),this.width=t)}};x(".page-contentheader:not(.page-contentheader--photosleft) .page-contentheader__inner",i=>new Cl(i));x(".page-contentheader__photoscontainer",i=>{new Gs(i,{timeout:7e3,selector:".page-contentheader__photo"});let e=w(i,".page-contentheader__photo__author__button");e.length>0&&L(".page-contentwrapper").addEventListener("click",t=>{let o=document.elementsFromPoint(t.clientX,t.clientY).filter(n=>e.includes(n));if(o.length>0){let n=T(i,".page-contentheader__photo:not([hidden])");if(n){let s=o.find(r=>r.dataset.idx===n.dataset.idx);console.log(n.dataset.idx,o),s&&s.focus()}}})});M();ie();var Ib=250,be,An,wo;function zb(i){if(i.target===be){let e=localStorage.getItem("ws-notifications");if(e?wo=e.split(";").filter(t=>!!t):wo=[],A.umc&&console.log("[umc] Closed notification CTA's",wo),An=i.detail.cta.config.id,wo.includes(An)){A.umc&&console.warn(`[umc] Not showing closed notification CTA ${An}`),be.remove();return}setTimeout(()=>{be._wsTmpHeight=getComputedStyle(be).height;let t=be.getBoundingClientRect();if(A.notificationdebug){be._wsTmpHeight!=="60px"||t.height!==60?(console.info("_wsTmpHeight",be._wsTmpHeight),console.info("rect",t),console.info("html",be.outerHTML)):setTimeout(()=>{let o=new URL(location.href),n=parseInt(o.search.substring(1))||0;++n,o.search=String(n),location.href=o.toString()},1e3);return}be.style.height="0",be.classList.remove("page-notificationbar--init"),document.documentElement.classList.add("utwente--notificationvisible"),be.classList.add("page-notificationbar--animate"),be._wsTmpHeight=getComputedStyle(be).height,be.style.height=`${t.height}px`,be.style.opacity="1",F(window,"wh:notification-change",{bubbles:!1,cancelable:!1,detail:{visible:!0,height:t.height}})},Ib)}}function Nb(i){i.preventDefault();let e=be.getBoundingClientRect();be.style.height=`${e.height}px`,be.classList.add("page-notificationbar--close"),be._wsTmpHeight=getComputedStyle(be).height,be.style.height="0",be.style.opacity="0",F(window,"wh:notification-change",{bubbles:!1,cancelable:!1,detail:{visible:!1,height:e.height}}),wo.push(An),localStorage.setItem("ws-notifications",wo.join(";")),A.umc&&console.info(`[umc] Closed notification CTA ${An}`)}function Hb(i){!be.parentNode||i.target!==be||i.propertyName!=="height"||(be.classList.contains("page-notificationbar--close")?(be.remove(),document.documentElement.classList.remove("utwente--notificationvisible")):be.style.height="")}x(".page-notificationbar",i=>{be=i,document.documentElement.addEventListener("ws:managed-cta",e=>
10zb(e)),w(".notification__close").forEach(e=>e.addEventListener("click",Nb)),i.addEventListener("transitionend",Hb)});M();var Mn=class{constructor(e){for(let t of e){let o=t.getAttribute("href");if(o&&o.indexOf("#")>=0){let n=document.getElementById(o.substring(o.indexOf("#")+1));n&&(t.addEventListener("click",s=>{s.preventDefault(),n.scrollIntoView({block:"start",behavior:"smooth"})}),n.setAttribute("data-scrollevent","0"))}}}};M();var Fl=class{elements;scrollactions;viewport_height=0;isinit;isscrollup=!1;lastscroll=0;constructor(){this.scrollactions=[],this.elements=[],window.addEventListener("scroll",()=>this.onScroll()),window.addEventListener("resize",()=>this.onResize()),this.isinit=!0,this.onResize(),K(()=>{this.addNodes(w("[data-scrollevent]"))})}addNodes(e){if(e.length)for(let t=0;t<e.length;++t){let o=e[t].getAttribute("data-scrollevent"),n={state:"",node:e[t],treshhold:o?parseInt(o):0,boundingrect:null,actions:[],data:null,measure:""},s=e[t].getAttribute("data-scrollvisibleclass");s&&e[t].addEventListener("wh:visibilitychange",()=>e[t].classList.add(s));let r=e[t].getAttribute("data-scrolleventmeasure");r&&(n.measure=r);let l=e[t].getAttribute("data-scrollparallax");if(typeof l=="string"){let d=e[t].hasAttribute("data-scrollparallaxfree"),c=e[t].firstElementChild;if(c){let h=Number(l);n.data={innernode:c,parallax:h||.2,limitparallax:!d},n.actions.push("parallax"),this.scrollactions.push(n)}}let a=e[t].getAttribute("data-scrollzoom");if(typeof a=="string"){let d=e[t].firstElementChild;d&&(n.data={innernode:d,zoom:a?Math.abs(Number(a)):1},n.actions.push("zoom"),this.scrollactions.push(n))}this.elements=this.elements.filter(d=>d.node!==e[t]),this.elements.push(n)}}onScrollActions(){for(let e=0;e<this.scrollactions.length;e++){let t=this.scrollactions[e];if(t.state==="visible"){if(t.actions.indexOf("parallax")!==-1){let o=t.data.innernode.clientHeight;if(t.data.limitparallax&&!o)continue;let n=t.node.clientHeight,s=o-n,r=2*(t.boundingrect.bottom/(this.viewport_height+n)-.5),l=s*-.5,a=t.data.parallax;t.data.limitparallax&&Math.abs(a)>s&&(a=a<0?-s:s),t.data.innernode.style.transform||(t.data.innernode.style.top="auto",t.data.innernode.style.bottom="auto"),t.data.innernode.style.transform="translate(0,"+(l+r*a)+"px)"}if(t.actions.indexOf("zoom")!==-1)if(t.boundingrect.top<=0){let o=t.node.clientHeight,n=-t.boundingrect.top/o,s=1+n*t.data.zoom;t.data.innernode.style.transform="scale("+s+","+s+")",t.data.innernode.style.opacity=String(1-n)}else t.data.innernode.style.transform="scale(1,1)",t.data.innernode.style.opacity="1"}}}onScroll(){let e=window.scrollY;this.isscrollup=this.lastscroll?this.lastscroll>e:!1,this.lastscroll=e,this.checkElementsVisibility(),this.onScrollActions()}checkElementsVisibility(){for(let e=this.elements.length-1;e>=0;--e){let t=!1,o=this.isinit?0:this.elements[e].treshhold,n;if(this.elements[e].measure==="content"){let s=this.elements[e].node.firstElementChild;for(;s&&(n=s.getBoundingClientRect(),!(n.height>0&&(t=n.top>=o&&this.viewport_height-n.top>=o||n.bottom>o&&this.viewport_height-n.bottom>o,t)));)s=s.nextElementSibling}else{if(n=this.elements[e].node.getBoundingClientRect(),n.height===0)continue;this.elements[e].boundingrect=n,t=n.top>=o&&this.viewport_height-n.top>=o||n.bottom>o&&this.viewport_height-n.bottom>o}t?this.elements[e].state!=="visible"&&(this.elements[e].state="visible",F(this.elements[e].node,"wh:visibilitychange",{bubbles:!0,cancelable:!1,detail:{scrolldirection:this.isinit?"":this.isscrollup?"up":"down",target:this.elements[e],visible:!0,nodebounds:n}})):this.elements[e].state==="visible"&&(this.elements[e].state="hide",F(this.elements[e].node,"wh:visibilitychange",{bubbles:!0,cancelable:!1,detail:{scrolldirection:this.isinit?"":this.isscrollup?"up":"down",target:this.elements[e],visible:!1,nodebounds:n}}))}this.isinit=!1}onResize(){let e=window.innerHeight;this.viewport_height&&this.viewport_height===e||(this.viewport_height=e,this.onScroll())}},Ob=new Fl,Tu=Ob;te();re();var Ub=location.hash;function Al(){let i="",e,t=w(".main__deeplink");for(let n of t){let s=n.getAttribute("href")||"";if(!s.startsWith("#"))continue;let r=document.getElementById(s.substring(1));r&&((r.classList.contains("wh-rtd__anchor")||r.classList.contains("wh-anchor"))&&(r=r.closest("h2")||r),r.getBoundingClientRect().y<=window.innerHeight/3&&(e=n,i=s))}if(e&&e.classList.contains("isvisible"))return;let o=T(".main__deeplink.isvisible");if(!(!e&&!o))if(o&&o.classList.remove("isvisible"),e){e.classList.add("isvisible");let n=!0;for(let s of t)s===e&&(n=!1),n?s.classList.add("isbefore"):s.classList.remove("isbefore");history.replaceState&&setTimeout(function(){history.replaceState(null,"",document.location.href.split("#")[0]+i)},10)}else history.replaceState&&setTimeout(function(){history.replaceState(null,"",document.location.href.split("#")[0])},10)}function Eu(){w(".page-content > h2.heading2").forEach(i=>
10{if(T(i,"a.wh-anchor"))return;let e=Ic(i.textContent||"");e&&i.prepend(p("a",{class:"wh-anchor",id:`${e}`})),Ub===`#${e}`&&i.scrollIntoView({behavior:"auto",block:"start"})}),!(document.documentElement.classList.contains("ws2016--iframed")&&(window.innerWidth>=483&&window.innerWidth<=490||window.innerWidth>=530&&window.innerWidth<=540))&&Wb()}function Wb(){let i=[];for(let n of w("h2:not([data-ut-ignore-deeplink]):not(.wh-form__grouptitle)")){if(n.closest(".wh-details__container"))continue;let s=n.closest(".wh-form__page");if(s&&s.previousElementSibling&&s.previousElementSibling.classList.contains("wh-form__page")||n.closest(".wh-rtd__tablecell"))continue;let r;n.id&&(r=n);let l=T(n,"a[id]");if(l&&(r=l),!r)continue;if(w(`*[id='${r.id}']`).length>1){let d=1,c=r.id+"-"+d;for(;document.getElementById(c);)c=r.id+"-"+ ++d;r.id=c}let a=n.textContent.trim();i.push(p("li",{class:"main__deeplinkitem"},p("a",{class:"main__deeplink",title:a,propTarget:n,href:"#"+r.id},a)))}if(i.length<=1)return;let e=p("nav",{class:"main__deeplinks","aria-label":v("utwente_base:frontend.ws2016.js.landmark-deeplinks-arialabel")},p("ul",{class:"main__deeplinklist"},i));T(".page-content")?.append(p("div",{class:"page-deeplinks"},e));let t=w(e,".main__deeplink");new Mn(t),Tu.addNodes(t),Al(),window.addEventListener("scroll",Al),window.addEventListener("ws:resize",Al);let o=[];t.forEach(n=>{let s=n.getAttribute("href")||"";if(!s.startsWith("#"))return;let r=document.getElementById(s.substring(1));r&&((r.classList.contains("wh-rtd__anchor")||r.classList.contains("wh-anchor"))&&(r=r.closest("h2")||r),o.unshift(r))})}M();te();Go();var Jt=qt("utwente_base:rpc");function vo(i){let e=new DOMParser().parseFromString(i,"text/html");return[...w(e,"body > *")]}async function Vb(i){let e=document.documentElement.lang.startsWith("nl")?"nl":"en";if(!document.querySelector(".page-content")){console.warn("Osiris link found without main contents");return}let o=p("div",{class:"loading"},v("utwente_base:frontend.ws2016.js.osiris.loading")),n=Se({allowcancel:!0});if(!n.contentnode)throw new Error("Dialog content node is not available");n.contentnode.appendChild(o),n.contentnode.classList.add("osiris"),n.runModal();let s=await Jt.GetOsirisCourse(i,e);s&&s.success?(n.utheadernode.append(p("h2",{class:"osiris__title"},s.title)),s.maxpoints&&n.utheadernode.append(p("div",{class:"osiris__maxpoints"},s.maxpoints)),n.contentnode.replaceChildren(p("div",{class:"osiris__description"},vo(s.contents))),s.goal&&n.contentnode.append(p("h3",null,v("utwente_base:frontend.ws2016.js.osiris.goal")),...vo(s.goal)),n.contentnode.append(...vo('<p class="normal">'+v("utwente_base:frontend.ws2016.js.osiris.moredetailslink",s.link)+"</p>"))):o.textContent=v("utwente_base:frontend.ws2016.js.osiris.nocoursefound")}async function Bb(i){let e=document.documentElement.lang.startsWith("nl")?"nl":"en";if(!document.querySelector(".page-content")){console.warn("Osiris link found without main contents");return}let o=p("div",{class:"loading"},v("utwente_base:frontend.ws2016.js.osiris.loading"));new wi(o,"osiris").showModal();let s=await Jt.GetOsirisCourse(i,e);s&&s.success?(o.replaceChildren(p("h2",{class:"osiris__title"},s.title),p("div",{class:"osiris__maxpoints"},s.maxpoints),p("div",null,vo(s.contents))),s.goal&&o.append(p("h3",null,v("utwente_base:frontend.ws2016.js.osiris.goal")),...vo(s.goal)),o.append(...vo('<p class="normal">'+v("utwente_base:frontend.ws2016.js.osiris.moredetailslink",s.link)+"</p>"))):o.textContent=v("utwente_base:frontend.ws2016.js.osiris.nocoursefound")}function $b(i){let e=i.target instanceof HTMLElement?i.target.closest("a[href^='x-ut-courselink:']"):null;if(!e)return!0;i.preventDefault();let t=e.getAttribute("href")?.split(":")[1];return t&&(document.documentElement.classList.contains("utwente--ws2026")?Bb(t):Vb(t)),!1}window.addEventListener("click",$b);M();var Ks,Ml;ResizeObserver?Ks=new ResizeObserver(i=>Yb(i)):window.addEventListener("resize",()=>Ml=Ml||requestAnimationFrame(i=>Xb(i)));var Js=new Map;function Yb(i){for(let e of i){let t=Js.get(e.target);t&&t(e)}}function Xb(){for(let[i,e]of Js.entries()){let t=i.getBoundingClientRect();(t.height!=e.rect.height||t.width!=e.rect.width)&&(e.rect=t,e.callback({target:i,boundingClientRect:t}))}Ml=null}function Su(i,e){Ks&&Ks.observe(i),Ks?Js.set(i,e):Js.set(i,{callback:e,rect:i.getBoundingClientRect()})}N();N();var Pn=class{constructor(e,t){e&&(this.options={threshold_distance:15,threshold_speed:.3,enablemouseswipe:!0,...t},this.swipeinfo=null,this.node=e,this.options.enablemouseswipe&&(e.addEventListener("mousedown",o=>this.onTouchStart(o)),e.addEventListener("mousemove",o=>this.onTouchMove(o)),e.addEventListener("mouseup",o=>this.onTouchEnd(o))),this.touchEnabled()&&(e.addEventListener("touchstart",o=>this.onTouchStart(o)),e.addEventListener("touchmove",o=>this.onTouchMove(o)),e.addEventListener("touchend",o=>this.onTouchEnd(o))))}touchEnabled(){return"createTouch"in document}onTouchStart(e){this.swipeinfo={starttime:new Date().getTime(),endtime:-1,start:{x:e.pageX,y:e.pageY},end:{x:e.pageX,y:e.pageY},target:e.target,direction:""}}onTouchMove(e){this.swipeinfo&&(this.swipeinfo.end={x:e.pageX,y:e.pageY})}onTouchEnd(e){if(!this.swipeinfo)return;let t=this.swipeinfo.end.x-this.swipeinfo.start.x,o=this.swipeinfo.end.y-this.swipeinfo.start.y;this.swipeinfo.endtime=new Date().getTime();let n=Math.abs(t),s=Math.abs(o);n>this.options.threshold_distance&&n/(this.swipeinfo.endtime-this.swipeinfo.starttime)>this.options.threshold_speed&&(this.swipeinfo.direction+=t>0?"e":"w"),s>this.options.threshold_distance&&s/(this.swipeinfo.endtime-this.swipeinfo.starttime)>this.options.threshold_speed&&(this.swipeinfo.direction+=o>0?"s":"n"),this.swipeinfo.direction!==""&&F(this.node,"wh:swipe",{bubbles:!0,cancelable:!1,detail:this.swipeinfo}),this.swipeinfo=null}};var xo=class{constructor(e,t){this.nodes=[],this.players=[],this.dotNodes=[],this.curSlide=-1,this.options={timeout:5e3,dotNodes:null,pauseNode:null,enableswipe:!0,...t};for(let o of e)o.addEventListener("transitionend",this.onSlide.bind(this)),this.nodes.length?(o.classList.add("slideshow--slidein"),o.style.zIndex=0):(this.containerNode=o.parentNode,this.containerNode.style.zIndex=0,o.style.zIndex=2),this.nodes.push(o),o.style.display="block";if(this.nodes.length){if(this.nodes.length===1){let o=this.nodes[0];o.hasAttribute("data-video")&&this.initializeVideoSlide(o,0,!1);return}this.containerNode&&this.options.enableswipe&&(new Pn(this.containerNode),this.containerNode.addEventListener("wh:swipe",(function(o){if
10(o.detail.direction==="w"){let n=this.curSlide+1;this.nextNode(n>=this.nodes.length?0:n,!1)}else if(o.detail.direction==="e"){let n=this.curSlide-1;this.nextNode(n<0?this.nodes.length-1:n,!0)}}).bind(this))),this.options.pauseNode&&(this.options.pauseNode.addEventListener("mouseover",this.pause.bind(this)),this.options.pauseNode.addEventListener("mouseout",this.play.bind(this))),this.options.dotNodes&&Array.from(this.options.dotNodes).forEach((o,n)=>{this.dotNodes.push(o),o.addEventListener("click",s=>{this.nextNode(n),this.resume()})}),this.nextNode()}}nextNode(e,t){clearTimeout(this.nextTimeout),this.paused||(this.nextTimeout=setTimeout(this.nextNode.bind(this),this.options.timeout)),this.slideTimeout&&cancelAnimationFrame(this.slideTimeout),this.slideTimeout=requestAnimationFrame(()=>{if(typeof e<"u"){if(e===this.curSlide)return;this.nextSlide=e,this.prevNode&&this.prevNode.classList.contains("slideshow--slideout")&&(this.prevNode.style.zIndex=0,this.prevNode.classList.remove("slideshow--slideout"),this.prevNode.classList.add("slideshow--slidein"))}this.prevNode=this.curSlide<0?null:this.nodes[this.curSlide],this.containerNode.classList.remove("slideshow--slideleft"),typeof this.nextSlide<"u"&&this.nextSlide!==null?((this.nextSlide<this.curSlide&&typeof t!="boolean"||t)&&this.containerNode.classList.add("slideshow--slideleft"),this.curSlide=this.nextSlide,this.nextSlide=null):++this.curSlide,this.curSlide>=this.nodes.length&&(this.curSlide=0);let o=this.nodes[this.curSlide];o.hasAttribute("data-video")&&o.addEventListener("click",n=>this.initializeVideoSlide(o,this.curSlide,!0)),this.slideTimeout=null,this.prevNode&&(this.prevNode.style.zIndex=1,o.style.zIndex=2,this.prevNode.classList.add("slideshow--slideout"),o.classList.remove("slideshow--slidein")),this.dotNodes.forEach((n,s)=>{s===this.curSlide?n.classList.add("slideshow--activedot"):n.classList.remove("slideshow--activedot")}),F(window,"ws:nextslide",{bubbles:!0,cancelable:!1,detail:{target:this,idx:this.curSlide}})})}initializeVideoSlide(e,t,o){lt.getConsent()&&(vi(e)?this.players[t]&&(e.classList.remove("widget__photoslide--poster"),this.players[t].play()):Ht(e).then(n=>{this.players[t]=n,e.classList.remove("widget__photoslide--poster"),e.addEventListener("video:play",s=>this.stop()),e.addEventListener("video:pause",s=>this.toggleDotNodes(!0)),e.addEventListener("video:finish",s=>this.resume()),o&&e.addEventListener("video:ready",s=>n.play())}))}pause(){this.paused=!0,this.nextTimeout&&(clearTimeout(this.nextTimeout),this.nextTimeout=null,this.dotNodes.forEach((e,t)=>{t===this.curSlide&&e.classList.add("slideshow--paused")}))}play(){this.stopped||(this.paused=!1,this.nextTimeout||(this.nextTimeout=setTimeout(this.nextNode.bind(this),this.options.timeout/2)),this.dotNodes.forEach(e=>e.classList.remove("slideshow--paused")))}stop(){this.pause(),this.stopped=!0,this.toggleDotNodes(!1)}resume(){this.stopped=!1,this.toggleDotNodes(!0);for(let e of this.nodes)e.classList.add("widget__photoslide--poster");this.play()}toggleDotNodes(e){this.dotNodes.forEach(t=>t.style.display=e?"":"none")}onSlide(e){e.target===e.currentTarget&&e.target.classList.contains("slideshow--slideout")&&(e.target.style.zIndex=0,e.target.classList.remove("slideshow--slideout"),e.target.classList.add("slideshow--slidein"))}};var bm=Mt(jl());N();var Bu=Mt(Uu());N();var Rn=class{constructor(e,t){let o=ti(e,"data-masonry-options");this.options={columns:3,columnwidth:0,gutter_x:10,gutter_y:10,debug:!1,items:null,ignoreclass:"hide",righttoleft:!1},o&&this.setOptions(o),t&&this.setOptions(t),typeof e=="string"?this.container=document.getElementById(e):this.container=e,this.__height=0,this.__columnwidth=0,this.__itemdata=[],this.__visiblewidgetscount=0,this.__singlerow=!0,this.__columncontainers=[],this.__items_dirty=!0,this.__leftoffset=0,this.__containerwidth=0,this.__widgetrecs=[],this.ignore_resize_events=!1,this.refresh()}setOptions(e){"gutter"in e&&(e.gutter_x=e.gutter,e.gutter_y=e.gutter,delete e.gutter),"items"in e&&(this.__items_dirty=!0),Object.assign(this.options,e)}refresh(e){this.options.debug&&(console.log("$wh.Masonry.refresh()"),console.trace());let t=this.container.clientWidth;if(t==0){console.warn("Cannot determine size of mansonry container (got 0).",this.container);return}this.ignore_resize_events=!0;let o=window.getComputedStyle(this.container),n=parseInt(o.paddingTop,10),s=parseInt(o.paddingBottom,10),r=parseInt(o.paddingLeft,10),l=parseInt(o.paddingRight,10);this.__padding={top:n,bottom:s,left:r,right:l},this.__leftoffset=r,this.__containerwidth=t-r-l;let a;this.options.items?typeof this.options.items=="string"?a=this.container.querySelectorAll(this.options.items):a=this.options.items:a=this.container.querySelectorAll(".wh-masonry-item"),this.pvt_relayout(a,e),this.ignore_resize_events=!1}refreshHeights(){this.pvt_relayout(null,!0)}getLastRenderInfo(){return{container:this.container,visiblewidgetscount:this.__visiblewidgetscount,width:this.__containerwidth,height:this.__height,items:this.__itemdata,singlerow:this.__singlerow}}onLayoutChange(e){e!=this.container&&this.refreshHeights()}pvt_relayout(e,t){this.options.debug&&console.group("$wh.Masonry.refresh()",t?"FORCE":"");let o=0,n=this.options.columnwidth;n||(n=(this.__containerwidth-(this.options.columns-1)*this.options.gutter_x)/this.options.columns);let s=this.options.columns,r=!0,l=[];for(var a=0;a<s;a++)l.push(0);let d,c=this.__items_dirty||this.__columnwidth!=n;if(c){d=[];for(var h=0;h<e.length;h++){var m=e[h];let f=m.getAttribute("data-cols");f=f?parseInt(f):1,f>this.options.columns&&(f=this.options.columns);let g=n*f+(f-1)*this.options.gutter_x;m.style.position="absolute",m.style.width=g+"px",m.style.height="",d.push({node:m,width:g,height:null,cols:f})}}else d=this.__itemdata;if(c||t){this.options.debug&&console.log("Firing ws:relayoutwidgetcontent event");for(var h=0;h<e.length;h++){var m=e[h];F(m,"ws:relayoutwidgetcontent",{bubbles:!0,cancelable:!1,detail:{force:t}})}this.options.debug&&console.log("Continue dompack-masonry layouting.")}for(var h=0;h<d.length;h++)d[h].height=d[h].node.clientHeight;for(var h=0;h<d.length;h++){let g=d[h];var m=g.node;let y=g.height;if(this.options.debug&&console.log("#"+h,y+"px",m.className),y==0||this.options.ignoreclass!=""&&m.classList.contains(this.options.ignoreclass))continue;o++;let E=-1,S=0;this.options.debug&&console.info(l);for(var a=0;a<=s-g.cols;++a){var u=this.options.righttoleft?s-g.cols-a:a;
10let $=Math.max.apply(null,l.slice(u,u+g.cols));(E==-1||$<S)&&(E=u,S=$)}l[E]>0&&(S>0&&(r=!1),S+=this.options.gutter_y);for(var u=0;u<g.cols;++u){let $=S+y;l[E+u]=$}g.col=E,g.left=this.__leftoffset+(E*n+E*this.options.gutter_x),g.top=S;let P={position:"absolute",left:g.left,top:g.top+this.__padding.top};this.options.debug&&console.log("Will be placed into col",E),m.style.position=P.position,m.style.left=P.left+"px",m.style.top=P.top+"px"}let b=Math.max.apply(null,l)+this.__padding.top+this.__padding.bottom;this.options.columnwidth&&(this.container.style.width=this.options.columnwidth*this.options.columns+(this.options.columns-1)*this.options.gutter_x+"px"),this.container.style.height=b+"px",this.options.debug&&(console.log(this.container,"has",o,"visible widgets"),console.groupEnd()),this.__itemdata=d,this.__columnwidth=n,this.__height=b,this.__visiblewidgetscount=o,this.__singlerow=r}};function ql(i,e){return e={element:document.documentElement,timeout:1e4,...e},new Promise((t,o)=>{let n={timeout:-1,property:i,element:e.element,resolve:t};e.timeout>0&&(n.timeout=setTimeout(()=>{n.timeout=0,o(new Error(`Timeout after ${e.timeouts}ms reading CSS variable '${i}'`))},e.timeout)),Wu(n)})}function Wu(i){if(i.timeout===0)return;let e=getComputedStyle(i.element).getPropertyValue(i.property);if(e){clearTimeout(i.timeout),i.resolve(e);return}requestAnimationFrame(()=>Wu(i))}var qn=[];window.widgetContainers=qn;var Vu,Dl;function ew(i){qn.push(i),i.classList.contains("widgetsblock__contents--equalheight")||i.classList.contains("widgetsblock__contents--singlewidget")?i._whMasonryType="none":i._whMasonryType="dompack-masonry"}function tw(){clearTimeout(Vu),Vu=setTimeout(i=>iw(i),250)}function iw(){$u();for(let i of qn)Xu(i)}function ow(i){$u();for(let e of qn)(!i.detail.container||e==i.detail.container)&&Xu(e,!!i.detail.force)}function $u(){F(window,"ws:widgetholders-beforerelayout",{bubbles:!1,cancelable:!1})}function Il(i){for(let e of qn)e._whMasonryType=="dompack-masonry"?Yu(e):e._whMasonryType=="desandro"&&nw(i,e)}function nw(i,e){i!=Dl&&(Dl=i,Dl=="small"?(e._wsMasonry&&(e._wsMasonry.destroy(),e._wsMasonry=null),e.closest(".widgetsblock").classList.remove("widgetsblock--defaultlayout")):(e.closest(".widgetsblock").classList.add("widgetsblock--defaultlayout"),e._wsMasonry||(e._wsMasonry=new Bu.default(e,{itemSelector:".widget",columnWidth:".widgetsblock__contents-sizer",fitWidth:!0,gutter:15}))))}function Yu(i,e){let t={};i.classList.add("widgetsblock--dompackmasonry");let n=window.getComputedStyle(i,"::before").content;if(n!=""&&n.startsWith('"')&&(n=n.substring(1,n.length-1)),n!="none"){let s=n.split(":");t={columns:parseInt(s[0]),gutter:parseInt(s[1])}}else t={columns:2,gutter:30};i._wsMasonry?(i._wsMasonry.setOptions(t),i._wsMasonry.refresh(e)):i._wsMasonry=new Rn(i,{...t,items:".widget",breakclass:".widget__break__title"})}function Xu(i,e){if(i._whMasonryType=="desandro"){let t=i.querySelectorAll(".widget");for(let o of t)F(o,"ws:relayoutwidgetcontent",{bubbles:!0,cancelable:!1,detail:{force:e}});i._wsMasonry&&i._wsMasonry.layout()}else i._whMasonryType=="dompack-masonry"&&Yu(i,e)}x(".widgetsblock__contents",i=>ew(i));window.addEventListener("ws:relayoutwidgets",ow);window.addEventListener("ws:responsivemode",i=>Il(i.detail.level<=1?"small":"wide"));window.addEventListener("resize",tw);ql("--breakpoint-phone").then(i=>{let e=matchMedia(`(max-width: ${i})`);e.addEventListener("change",t=>Il(t.matches?"small":"wide")),Il(e.matches?"small":"wide")});N();function Ie(i){F(window,"ws:relayoutwidgets",{bubbles:!0,cancelable:!1,detail:{container:i?i.closest(".widgetsblock__contents"):null}})}window.__relayoutWidgets=Ie;function Gu(i){F(window,"ws:relayoutwidgets",{bubbles:!0,cancelable:!1,detail:{container:i?i.closest(".widgetsblock__contents"):null,force:!0}})}te();M();function Ku(){for(let i of w("*[data-needsconsent],.wh-video.wh-requireconsent")){let e=i.querySelector(".consentblocker");if(!e){if(i.dataset.needsconsent==="video"||i.matches(".wh-video")){let t="",o="",n=i.dataset.needsconsent==="video"?T(i,"[data-video]")?.dataset.video:i.dataset.whVideo;if(n){let s=JSON.parse(n);if(o=s.network,o==="youtube")o="YouTube",t="https://youtu.be/"+s.id;else if(o==="vimeo")o="Vimeo",t="https://vimeo.com/"+s.id;else if(o==="yuja")continue}e=p("div",{class:"consentblocker"},p("div",{class:"consentblocker__title"},v("utwente_base:frontend.ws2016.js.consentblock-video-title")),p("div",{class:"consentblocker__description"},v("utwente_base:frontend.ws2016.js.consentblock-video-line1",o)+" ",p("a",{href:"#accept"},v("utwente_base:frontend.ws2016.js.consentblock-accept3thpartycookie
10s"))," "+v("utwente_base:frontend.ws2016.js.consentblock-video-accept3thpartycookies-suffix"),t?p("span",null," "+v("utwente_base:frontend.ws2016.js.consentblock-video-directlink-prefix")+" ",p("a",{target:"_blank",rel:"noopener noreferrer",href:t},v("utwente_base:frontend.ws2016.js.consentblock-video-directlink",o))):null))}else if(i.dataset.needsconsent==="soundcloud"){let t="SoundCloud";i.dataset.provider&&i.dataset.provider==="transistor"&&(t="Transistor"),e=p("div",{class:"consentblocker"},p("div",{class:"consentblocker__title"},v("utwente_base:frontend.ws2016.js.consentblock-soundcloud-title")),p("div",{class:"consentblocker__description"},v("utwente_base:frontend.ws2016.js.consentblock-soundcloud-line1",t)+" ",p("a",{href:"#accept"},v("utwente_base:frontend.ws2016.js.consentblock-accept3thpartycookies"))," "+v("utwente_base:frontend.ws2016.js.consentblock-soundcloud-accept3thpartycookies-suffix"),i.dataset.directlink?p("span",null," "+v("utwente_base:frontend.ws2016.js.consentblock-soundcloud-directlink-prefix")+" ",p("a",{target:"_blank",rel:"noopener noreferrer",href:i.dataset.directlink},v("utwente_base:frontend.ws2016.js.consentblock-soundcloud-directlink"))):null))}else i.dataset.needsconsent==="facebook"?(i.replaceChildren(),e=p("div",{class:"consentblocker"},p("div",{class:"consentblocker__title"},v("utwente_base:frontend.ws2016.js.consentblock-facebook-title")),p("div",{class:"consentblocker__description"},v("utwente_base:frontend.ws2016.js.consentblock-facebook-line1")+" ",p("a",{href:"#accept"},v("utwente_base:frontend.ws2016.js.consentblock-accept3thpartycookies"))," "+v("utwente_base:frontend.ws2016.js.consentblock-facebook-accept3thpartycookies-suffix")))):i.dataset.needsconsent==="twitter-embed"&&(e=rw());e&&(e.addEventListener("click",t=>sw(t)),i.appendChild(e))}}}function sw(i){i.stopPropagation();let e=ot(i.target)&&i.target.closest(".consentblocker a");if(e){e.getAttribute("href")==="#accept"&&(i.preventDefault(),lt.acceptMarketingCookies());return}i.preventDefault()}function rw(){return p("div",{class:"consentblocker"},p("div",{class:"consentblocker__description"},v("utwente_base:frontend.ws2016.js.consentblock-twitterembed-line1")+" ",p("a",{href:"#accept"},v("utwente_base:frontend.ws2016.js.consentblock-accept3thpartycookies"))," "+v("utwente_base:frontend.ws2016.js.consentblock-twitterembed-accept3thpartycookies-suffix")))}function Ju(){for(let i of w("*[data-needsconsent], .wh-video.wh-requireconsent"))i.querySelector(".consentblocker")?.remove()}K(()=>{lt.getConsent()?Ju():Ku(),document.addEventListener("wh:consent-change",i=>{lt.getConsent()?Ju():Ku()})});M();x(".ut-cookiewidget",Mp);N();window.__carrouselcontent_instances=[];window.getCC=function(){for(let i of window.__carrouselcontent_instances)if(i.instance.options.debug)return i.instance};var dr=class{constructor(e,t){t={viewport:"",viewport_inner:"",itemsselector:"",item_activeclass:"",itemmeasureselector:"",bulletscontainer:"",bulletclass:"",bulletselectedclass:"",createbullet:null,previousbutton:null,nextbutton:null,allowwrap:!1,autoplay:!1,autoplay_initialdelay:0,autoplay_freezeslideduration:6e3,transitionDuration:1500,debug:!1,debug_determineactivepage:!1,onchangeslide:null,...t},window.location.href.indexOf("debugcc")>-1&&(t.debug=!0,t.debug_determineactivepage=!0),this.options=t,this.options.debug&&console.log("[CarrouselContent] Options",t),this.prevactivepage=null,this.activepage=0,this.pagesinfo=[],this.scrollLeft=0,this.initAutoplayVars(),this.widgetnode=e,typeof t.viewport=="string"&&(this.viewport=e.querySelector(t.viewport),this.viewport||console.error(t.viewport,"not found in",e)),typeof t.viewport_inner=="string"&&(this.viewport_inner=e.querySelector(t.viewport_inner),this.viewport_inner||console.error(t.viewport_inner,"not found in",e)),this.items=[];for(let o of e.querySelectorAll(t.itemsselector))if(this.options.itemmeasureselector){let n=o.querySelector(this.options.itemmeasureselector);n||console.error("Missing measurenode"),this.items.push({node:o,measurenode:n})}else this.items.push({node:o});if(this.options.debug&&console.log("[CarrouselContent] Items",this.items),!this.viewport){console.error("[CarrouselContent] Missing viewport for",e);return}if(!this.viewport_inner){console.error("[CarrouselContent] Missing viewport_inner for",e);return}if(t.bulletscontainer!=""&&(this.bulletscontainer=e.querySelector(t.bulletscontainer),!this.bulletscontainer)){console.error("[CarrouselContent] Missing bulletscontainer for",e);return}this.bullets=[],this.viewport.addEventListener("scroll",o=>this.onScroll(o)),this.bulletscontainer&&(this.bulletscontainer.addEventListener("mousedown",o=>this.onBulletClick(o)),this.bulletscontainer.addEventListener("touchstart",o=>this.onBulletClick(o),{passive:!0})),this.options.previousbutton&&(this.options.previousbutton.addEventListener("click",o=>
10this.previousPage(o)),this.options.previousbutton.addEventListener("keypress",o=>this.maybePreviousPage(o))),this.options.nextbutton&&(this.options.nextbutton.addEventListener("click",o=>this.nextPage(o)),this.options.nextbutton.addEventListener("keypress",o=>this.maybeNextPage(o))),this.refresh(),this.gotoPage(0),this.updateNavigationBar(),this.options.debug&&console.info("[CarrouselContent]",{widgetnode:this.widgetnode,viewport:this.viewport,viewport_inner:this.viewport_inner,items:this.items,bulletscontainer:this.bulletscontainer,pages:this.pages}),this.playing&&this.__applyCurrentAutoplay(this.options.autoplay_initialdelay),window.resizeObserver&&(Nl.observe(this.viewport),this.viewport!=this.viewport_inner&&Nl.observe(this.viewport_inner)),window.__carrouselcontent_instances.push({node:e,instance:this}),setInterval(this.verifyScrollPosition.bind(this),1e3)}verifyScrollPosition(){let e=this.viewport.scrollLeft;this.debug&&console.log("INTERVAL",document.visibilityState,e,this.scrollLeft),e!=this.scrollLeft&&(console.error("scrollLeft checked in interval doesn't match the value from the last received scroll event."),this.onScroll(null))}maybePreviousPage(e){(e.keyCode==13||e.keyCode==32)&&(this.previousPage(),e.preventDefault())}maybeNextPage(e){(e.keyCode==13||e.keyCode==32)&&(this.nextPage(),e.preventDefault())}previousPage(){this.options.debug&&console.log("previousPage"),this.activepage>0?this.gotoPage(this.activepage-1,!0):this.options.allowwrap&&this.gotoPage(this.pages.length-1)}nextPage(){this.options.debug&&console.log("nextPage",{activepage:this.activepage,pagescount:this.pages.length,nextactivepage:this.activepage+1}),this.activepage<this.pages.length-1?this.gotoPage(this.activepage+1,!0):this.options.allowwrap&&this.gotoPage(0)}gotoPage(e,t){this.options.debug&&console.log("[CarrouselContent] gotoPage",e,this.pages[e],t),this.viewport.scrollTo?this.viewport.scrollTo({left:this.pages[e],behavior:"smooth"}):this.viewport.scrollLeft=this.pages[e]}onBulletClick(e){e.type=="click"&&e.preventDefault();let t=e.target.closest("."+this.options.bulletclass),o=this.bullets.indexOf(t);t&&(this.options.debug&&console.log("[CarrouselContent] onButtonClick",t,o),this.gotoPage(o,!0))}onScroll(e){this.scrollLeft=this.viewport.scrollLeft;let t=this.determineActivePage();this.activepage=t,this.activepage!=this.prevactivepage&&(this.options.debug&&console.log("CarrouselContent::onScroll] active page changed to ",this.activepage),this.updateNavigationBar(),this.prevactivepage=this.activepage,this.options.onchangeslide&&(this.options.debug&&console.info("CarrouselContent::onScroll] using slidechange callback"),this.options.onchangeslide({slideidx:this.activepage,slideidx_prev:this.prevactivepage,slidedata:this.pagesinfo[this.activepage]})))}updateNavigationBar(){if(this.options.previousbutton&&(!this.options.allowwrap&&this.activepage==0?this.options.previousbutton.setAttribute("disabled",""):this.options.previousbutton.removeAttribute("disabled")),this.options.nextbutton&&(!this.options.allowwrap&&this.activepage==this.pages.length-1?this.options.nextbutton.setAttribute("disabled",""):this.options.nextbutton.removeAttribute("disabled")),this.bullets.length>0)for(let e=0;e<this.pages.length;e++)this.bullets[e].classList[e==this.activepage?"add":"remove"](this.options.bulletselectedclass);if(this.options.item_activeclass!=""){this.options.debug&&console.log("Active page",this.activepage,this.pagesinfo[this.activepage]);for(let e of this.items){let t=this.pagesinfo[this.activepage].itemnodes.indexOf(e.node)>-1;this.options.debug&&console.log(e,t),e.node.classList.toggle(this.options.item_activeclass,t)}}}determineActivePage(){let e=this.viewport.scrollLeft,t=this.viewport.scrollWidth,o=this.viewport_inner.getBoundingClientRect();this.options.debug_determineactivepage&&console.group("[CarrouselContent] determineActivePage");let n=-1;if(this.options.debug_determineactivepage&&(console.log("Pages",this.pages),console.info("ScrollLeft",e)),e+this.viewport.offsetWidth==t)return this.options.debug&&(console.log("Reached last scrollLeft position, so last page."),console.groupEnd()),n=this.pages.length-1,n;for(let s=0;s<this.pages.length-1;s++){let r=this.pages[s];if(this.options.debug_determineactivepage&&console.info("Page",s,"at",r,"till",r+o.width),s==this.pages.length||this.pages[s+1]>e){n=s;break}}return n==-1&&(n=this.pages.length-1),this.options.debug_determineactivepage&&console.groupEnd(),n}refresh(){this.recalculatePages(),this.createJumpButtons(),this.updateNavigationBar()}recalculatePages(){if(!this.viewport)return;
10this.options.debug&&(console.group("[CarrouselContent] recalculatePages",this.options.__test),console.log("Items",this.items)),this.pages=[],this.pagesinfo=[];let e=this.viewport_inner.getBoundingClientRect(),t=this.viewport.getBoundingClientRect(),o=this.viewport.scrollLeft,n=0,s=0,r=[],l=[];for(let a of this.items){let d=a.measurenode??a.node,c=d.getBoundingClientRect();if(c.width==0)continue;let h,m;h=c.left-t.left+o,m=c.right-t.left+o;let u=window.getComputedStyle(d),b;u.scrollMarginLeft?b=parseInt(u.scrollMarginLeft):u.scrollSnapMarginLeft?b=parseInt(u.scrollSnapMarginLeft):(b=e.left-t.left,this.options.debug&&console.log("Keeping whitespace at start",b)),h-=b,m-=b,this.options.debug&&console.log({node:a,item_left:c.left,item_width:c.width,xstart:h,xend:m}),r.push(a),l.push(a.node),m>n&&(this.options.debug&&console.log("Page #"+s+" starts at",n,"and end before",n+this.viewport.clientWidth),this.pages.push(Math.floor(h)),this.pagesinfo.push({x:Math.floor(h),items:r,itemnodes:l}),r=[],l=[],s++,n=h+this.viewport.clientWidth)}this.options.debug&&console.log("pages:",this.pagesinfo),console.groupEnd()}createJumpButtons(){if(!this.viewport||!this.bulletscontainer)return;let e=this.determineActivePage();this.bulletscontainer.innerHTML="",this.bullets=[];for(let o=0;o<this.pages.length;o++){let n=null;this.options.createbullet?n=this.options.createbullet():(n=document.createElement("div"),n.className=this.options.bulletclass,n.classList[o==e?"add":"remove"](this.options.bulletselectedclass)),this.bulletscontainer.appendChild(n),this.bullets.push(n)}let t=this.pages.length>1;this.bulletscontainer.style.display=t?"":"none",this.widgetnode.classList[t?"add":"remove"]("carrouselcontent--multiplepages")}onResize(){this.refresh()}initAutoplayVars(){this.autoplaytimer=null,this.lastautoslidetime=null,this.playing=this.options.autoplay}destroy(){clearTimeout(this.autoplaytimer),this.autoplaytimer=null,this.playing=!1}pause(){this.playing=!1,this.__applyCurrentAutoplay()}play(){this.playing=!0,this.__applyCurrentAutoplay()}__applyCurrentAutoplay(e){this.options.debug&&console.log("[CarrouselContent] __applyCurrentAutoplay"),e||(e=0),this.playing?this.autoplaytimer?this.options.debug&&console.log("[CarrouselContent] Timer already running..."):(this.options.debug&&console.log("[CarrouselContent] Setting new timer for auto slide"),this.autoplaytimer=setTimeout(this.__nextSlideByTimer.bind(this),this.options.autoplay_freezeslideduration+e)):(this.options.debug&&console.log("[CarrouselContent] No autoplay"),this.autoplaytimer&&(clearTimeout(this.autoplaytimer),this.autoplaytimer=null))}__nextSlideByTimer(){this.options.autoplay&&(this.lastautoslidetime=new Date().getTime(),this.nextPage(),this.autoplaytimer=setTimeout(this.__nextSlideByTimer.bind(this),this.options.autoplay_freezeslideduration))}};var Nl;window.ResizeObserver?Nl=new ResizeObserver(i=>aw(i)):window.addEventListener("resize",Hl);function aw(i){console.log("onResize",i);for(let e of i)for(let t of window.__carrouselcontent_instances)e.target==t.instance.viewport&&(console.info("Widget has resized"),t.instance.onResize())}function Hl(){for(let i of window.__carrouselcontent_instances)i.instance.onResize()}K(Hl);window.addEventListener("load",Hl);N();function dw(i){let e=new dr(i,{viewport:".imageswithcaption--multiple .imageswithcaption__images",viewport_inner:".imageswithcaption__images",itemsselector:".imageswithcaption__item__image",bulletscontainer:".imageswithcaption__jumpbuttons",bulletclass:"imageswithcaption__jumpbutton",bulletselectedclass:"slideshow--activedot",createbullet:pw,onchangeslide:cw,autoplay:!0,allowwrap:!0,__test:"ImagesWithCaption"});i.addEventListener("mouseenter",()=>{i.classList.add("imageswithcaption--paused"),e.pause()}),i.addEventListener("mouseleave",()=>{i.classList.remove("imageswithcaption--paused"),e.play()})}function cw(i){let e=i.slidedata.itemnodes[0],t=e.getAttribute("aria-describedby"),o=document.getElementById(t),r=e.closest(".embeddedobject--imageswithcaption").querySelector(".imageswithcaption__metaslides").firstElementChild;for(;r;)r.classList.toggle("active",o==r),r=r.nextElementSibling}function pw(){return p("span",{class:"imageswithcaption__jumpbutton UT-icon-UT_icon_77_sliderdot-16px"},p("span",{class:"imageswithcaption__jumpbutton-active UT-icon-UT_icon_76_slider-dot-active-16px"}))}x(".imageswithcaption--multiple",dw);M();var Dn=class{node;node_day;node_daydigits;node_hours;node_hourdigits;node_minutes;node_minutedigits;node_seconds;node_seconddigits;node_digits;animframetimer=null;options;countdownvalue=null;countdownto=null;countdownfrom=null;countdownto_timestamp=0;countdownfrom_timestamp=0;previousroundedtime=0;debug;initialized=!1;constructor(e,t){this.node=e,this.debug=e.hasAttribute("data-debugcountdown"),this.options={countdownto:"",countdownfrom:"",onexpired:null,...t},this.debug&&console.log("[CountDownComponent] initializing",t),this.node_day=e.querySelector(".countdown__section--days"),this.node_daydigits=Array.from(this.node_day.querySelectorAll(".countdown__digit")),this.node_hours=e.querySelector(".countdown__section--hours"),this.node_hourdigits=Array.from(this.node_hours.querySelectorAll(".countdown__digit")),this.node_minutes=e.querySelector(".countdown__section--minutes"),this.node_minutedigits=Array.from(this.node_minutes.querySelectorAll(".countdown__digit")),this.node_seconds=e.querySelector(".countdown__section--seconds"),this.node_seconddigits=Array.from(this.node_seconds.querySelectorAll(".countdown__digit")),this.node_digits=Array.from(e.querySelectorAll(".countdown__digit")),this.debug&&console.info("[CountDownComponent] Counting down to %s",e.dataset.countdownto,this.countdownto_timestamp),this.enhanceDOM(),t.countdownfrom?this.setCountdownFrom(t.countdownfrom):e.dataset.countdownfrom&&this.setCountdownFrom(e.dataset.countdownfrom),t.countdownto?this.setCountdownTo(t.countdownto):e.dataset.countdownto?this.setCountdownTo(e.dataset.countdownto):console.error("[CountDownComponent] initialized without setting options.countdownto or a data-countdownto attribute on .component-countdown"),this.refreshAndScheduleNextFrame(),this.countdownvalue&&this.countdownvalue.days===0&&this.node_day.classList.add("countdown__section--initiallyleadingzero"),e.classList.add("component-countdown--allowanimation"),this.node.addEventListener("transitionend",o=>this.onTransitionEnd(o)),document.addEventListener("visibilitychange",()=>this.onPageVisibilityChange()),this.initialized=!0}setCountdownFrom(e){if(this.countdownfrom=In(e),this.countdownfrom_timestamp=this.countdownfrom.getTime(),this.countdownfrom_timestamp&&new Date().getTime()<this.countdownfrom_timestamp){this.debug&&console.info("[CountDownComponent] The countdown has not started yet!"),this.node.classList.add("component-countdown--before");let t=this.node.closest("[data-markifbefore]");t&&t.classList.add("has-before-countdown")}}setCountdownTo(e){this.countdownto=In(e),this.countdownto_timestamp=this.countdownto.getTime(),this.countdownvalue=null,this.previousroundedtime=0,this.node.classList.remove("component-countdown--expired"),this.initialized&&this.refreshAndScheduleNextFrame()}stopCountdown(){this.animframetimer&&(cancelAnimationFrame(this.animframetimer),this.animframetimer=null)}onPageVisibilityChange(){if(document.visibilityState==="hidden"){this.node.classList.remove("component-countdown--allowanimation");return}if(document.visibilityState==="visible"){for(let e of this.node_digits)if(e.firstElementChild.__countdown_value===0){let t=this.__getWrapDigitIDX(e);this.setTrackPosition(e,t)}requestAnimationFrame(this.reenableTransitions.bind(this))}}reenableTransitions(){requestAnimationFrame(this.reenableTransitions2.bind(this))}reenableTransitions2(){this.node.classList.add("component-countdown--allowanimation")}
10onAnimFrame(){this.animframetimer=null,this.refreshAndScheduleNextFrame()}refreshAndScheduleNextFrame(){this.refresh(),!this.animframetimer&&(!this.countdownvalue||!this.countdownvalue.expired)&&(this.animframetimer=requestAnimationFrame(this.onAnimFrame.bind(this)))}refresh(){let t=new Date().getTime();t%1e3>950?t+=1e3-t%1e3:t=t-t%1e3,t!==this.previousroundedtime&&(this.previousroundedtime=t,this.refreshFor(t))}refreshFor(e){if(this.node.classList.contains("component-countdown--before"))if(this.countdownfrom_timestamp&&e>=this.countdownfrom_timestamp){this.debug&&console.info("[CountDownComponent] The countdown starts now!"),this.node.classList.remove("component-countdown--before");let h=this.node.closest("[data-markifbefore]");h&&h.classList.remove("has-before-countdown")}else return;if(e>this.countdownto_timestamp){this.debug&&console.info("[CountDownComponent] The countdown has expired!"),this.node.classList.add("component-countdown--expired");let h=this.node.closest("[data-markifexpired]");h&&h.classList.add("has-expired-countdown"),this.countdownvalue={days:0,hours:0,minutes:0,seconds:0,expired:!0},this.options.onexpired&&this.options.onexpired();return}let t=this.countdownto_timestamp-e,o=Math.floor(t/(1e3*60*60*24)),n=Math.floor(t%(1e3*60*60*24)/(1e3*60*60)),s=Math.floor(t%(1e3*60*60)/(1e3*60)),r=Math.floor(t%(1e3*60)/1e3);this.node_day.classList.toggle("leadingzeros",o===0),this.node_hours.classList.toggle("leadingzeros",o===0&&n===0),this.node_minutes.classList.toggle("leadingzeros",o===0&&n===0&&s===0),this.node_seconds.classList.toggle("leadingzeros",o===0&&n===0&&s===0&&r===0);let l=[Math.floor(o/100),Math.floor(o/10)%10,o%10,Math.floor(n/10),n%10,Math.floor(s/10),s%10,Math.floor(r/10),r%10],a=0,d=!0,c=0;for(let h of l){let m=l[a];m>0&&(d=!1),d||c++;let u=this.node_digits[a];!this.initialized&&d&&this.node_digits[a].classList.toggle("countdown__digit--initiallyleadingzero",d),u.firstElementChild.__countdown_value!==m&&(this.setDigit(u,m),this.node_digits[a].classList.toggle("countdown__digit--leadingzero",d)),a++}this.node.setAttribute("data-initiallyvisibledigits",c.toString()),this.countdownvalue={days:o,hours:n,minutes:s,seconds:r,expired:!1},this.debug&&console.info("[CountDownComponent]",this.countdownvalue)}setDigit(e,t){e.firstElementChild.__countdown_value=t,e.setAttribute("data-countvalue",String(t)),this.__shiftTrack(e,t)}__shiftTrack(e,t){t===0&&(!this.initialized||document.visibilityState==="hidden")&&(t=this.__getWrapDigitIDX(e)),this.setTrackPosition(e,t)}__getWrapDigitIDX(e){let t=e.getAttribute("data-digit");return t==="minutes-ten"||t==="seconds-ten"?6:t==="hours-ten"?3:10}setTrackPositionToWrapDigit(e){let t=this.__getWrapDigitIDX(e);this.setTrackPosition(e,t)}setTrackPosition(e,t){let o=`translateY(calc(-${100*t}% - ${t}px))`,n=e.firstElementChild;n.style.transform=o,n.__countdown_digitidx=t}onTransitionEnd(e){let t=e.target;if(t.__countdown_value===0){let o=t.parentNode;document.hidden?this.setTrackPositionToWrapDigit(o):(t.style.transition="none",this.setTrackPositionToWrapDigit(o),setTimeout(()=>{t.style.transition=""}))}}enhanceDOM(){let e=this.node.querySelectorAll(".countdown__digit"),t=this.getDigitsFragment([0,1,2,3,4,5,6,7,8,9,0]),o=this.getDigitsFragment([0,1,2,3,4,5,0]),n=this.getDigitsFragment([0,1,2,0]);for(let s of e){let r=s.getAttribute("data-digit"),l;r==="minutes-ten"||r==="seconds-ten"?l=o:r==="hours-ten"?l=n:l=t,s.replaceChild(l.cloneNode(!0),s.firstChild)}}getDigitsFragment(e){let t=document.createDocumentFragment(),o=document.createElement("div");o.className="countdown__digit__track",t.appendChild(o);for(let n of e){let s=document.createElement("div");s.className="countdown__digit__number",s.innerText=n.toString(),o.appendChild(s)}return t}};function In(i){let e=i.split(" "),t=e[0].split("-"),o=e[1].split(":");return new Date(Number(t[0]),Number(t[1])-1,Number(t[2]),Number(o[0]),Number(o[1]))}x(".component-countdown[data-countdownto]",hw);function hw(i){new Dn(i,{})}N();var Ol=class{constructor(e){console.info("[CountDownEventsWidget] Welcome"),this.node=e,this.events=[],this.currentevent=null,this.counter=null,this.countdownnode=e.querySelector(".component-countdown");let t=new Date;this.eventnodes=this.node.querySelectorAll(".component-ctalinks__item");for(let o of this.eventnodes){let n=JSON.parse(o.dataset.event);this.events.push({node:o,...n,countdownto_start_dt:In(n.countdownto_start),countdownto_end_dt:In(n.countdownto_end),expired:t>n.countdownto_end_dt})}this.refresh()}refresh(){let e=new Date,t=null;for(let o of this.events)o.expired||(e>o.countdownto_end_dt?o.node.classList.add("widget-countdown-expireditem"):t||(t=o));if(t){t.node.classList.add("widget-countdown-countingdownto"),this.currentevent=t;let o=this.node.querySelector(".widget-countdown__addtocalendar .addevent-data");o&&(o.innerHTML=t.node.querySelector(".addevent-data").innerHTML),this.counter?(console.info("Setting event (update countdown to new countdown target)",t),this.counter.setCountdownTo(t.countdownto_start)):(console.info("Setting event (initializing countdown)",t),this.counter=new Dn(this.countdownnode,{countdownto:t.countdownto_start,onexpired:this.onCurrentCountdownExpired.bind(this)}))}else this.node.classList.add("has-expired-countdown")}onCurrentCountdownExpired(){this.currentevent.expired=!0,this.currentevent.node.classList.remove("widget-countdown-countingdownto"),this.currentevent.node.classList.add("widget-countdown-expireditem"),this.refresh()}};x(".widget-countdown--withevents",mw);function mw(i){new Ol(i)}N();function gw(i,e){if(e.length===0){Vt(i);return}let t=T(i,".widget__list");e.forEach(o=>{let n=i.dataset.baseurl?i.dataset.baseurl+o.suburl:o.url;t.appendChild(p("a",{href:n,class:"widget__listitem widget__listitem--link"},p("span",{class:"widget__listitem-icon widget__listitem-icon--small UT-icon-UT_icon_52_arrow-right-round-16px"}),p("span",{class:"widget__listitem-text"},o.title),p("span",{class:"widget__listitem-subtext"},o.widgetdate)))}),Ie(i)}async function fw(i){let e=await fetch(i.dataset.publocfile);if(e&&e.status===200){let t=await e.json();t&&t["p"+i.dataset.publoc]?gw(i,t["p"+i.dataset.publoc].items):Vt(i)}}x(".widget-ws2016events",i=>fw(i));var Ul=class extends me{constructor(e){super(e),this.container=this.node.closest(".feedback");for(let t of this.container.querySelectorAll("input[name='useful']"))t.addEventListener("change",o=>{if(this.ispositive=o.target.value==="yes",this.container.classList.add(this.ispositive?"feedback--ispositive":"feedback--isnegative"),this.reset(),!this.faqquestion){let n=this.node.closest(".wh-details");if(!n)return;this.faqquestion=n.querySelector(".wh-details__summary")}
10window.dataLayer&&window.dataLayer.push({event:"faq-"+(this.ispositive?"ja":"nee"),faqcontent:this.faqquestion.textContent})})}getFormExtraSubmitData(){return{token:this.node.dataset.token,faqquestion:this.faqquestion?this.faqquestion.textContent:""}}onSubmitSuccess(e){e.success&&this.container.classList.add("feedback--send")}};oe("utwente_base:faqfeedbackform",i=>new Ul(i));N();N();te();var yo=(Ne(),Ce(Xe)).registerTexts;yo("utwente_base","nl",{"site-common":{texts:{"cookies-accept":"Accepteer","cookies-cookies":"cookies","cookies-touse":"Om deze functionaliteit te gebruiken:",no:"Nee",yes:"Ja"}}});yo("utwente_base","en",{"site-common":{texts:{"cookies-accept":"Accept","cookies-cookies":"cookies","cookies-touse":"To use this functionality you first need to:",no:"No",yes:"Yes"}}});yo("utwente_base","de",{"site-common":{texts:{"cookies-accept":"akzeptieren","cookies-cookies":"Cookies","cookies-touse":"Zur Nutzung dieser Funktion:",no:"Nein",yes:"Ja"}}});yo("utwente_base","es",{"site-common":{texts:{"cookies-accept":"Accept","cookies-cookies":"cookies","cookies-touse":"To use this functionality you first need to:",no:"No",yes:"Yes"}}});yo("utwente_base","it",{"site-common":{texts:{"cookies-accept":"Accept","cookies-cookies":"cookies","cookies-touse":"To use this functionality you first need to:",no:"No",yes:"Yes"}}});yo("utwente_base","xt",{"site-common":{texts:{"cookies-accept":"Accept","cookies-cookies":"cookies","cookies-touse":"To use this functionality you first need to:",no:"No",yes:"Yes"}}});async function Qu(i){let e=p("span",null,i.split(`
11`).map(t=>[t,p("br",null)]));return Ae(e,[{result:"yes",title:v("utwente_base:site-common.texts.yes")},{result:"no",title:v("utwente_base:site-common.texts.no")}],{allowcancel:!0})}function xi(i,e,t){t||(t={});let o=document.querySelector(".dialog__modal");if(o&&zn(),o=document.createElement("div"),o.className="dialog__modal"+(t.theme?" "+t.theme:""),t.theme&&o.classList.contains("withbackground"))if(t.background)o.style.backgroundImage="url("+t.background+")";else{let r=document.querySelector(".header__photo-0--background");if(r){let l=window.getComputedStyle(r,null).getPropertyValue("background-image");l&&(o.style.backgroundImage=l)}}let n=document.createElement("div");if(n.className="dialog__body",o.appendChild(n),i!==""){let r=document.createElement("div");r.className="title",r.innerHTML=i,n.appendChild(r)}if(!t.disable_close){let r=document.createElement("button");r.className="close UT-icon-UT_icon_47_cross-16px",r.setAttribute("type","button"),r.setAttribute("aria-label",v("utwente_base:frontend.ws2016.js.dialog-close-arialabel")),t.position_close&&t.position_close==="outside"?o.appendChild(r):n.appendChild(r)}let s=document.createElement("div");return s.className="dialog__content",n.appendChild(s),typeof e=="object"?s.appendChild(e):typeof e=="string"&&(s.innerHTML=e),t.disable_close||(o.addEventListener("click",zn),document.body.addEventListener("keydown",zn)),document.body.appendChild(o),n.clientHeight,o.classList.add("aftershow"),o}function zn(i){let e=document.querySelector(".dialog__modal");e&&(i&&(i.type==="keydown"&&i.keyCode!==27||i.type==="click"&&i.target!==e&&!i.target.classList.contains("close"))||(document.body.removeEventListener("keydown",zn),e.removeEventListener("click",zn),document.body.removeChild(e)))}x(".embeddedobject-imagevideowithtext__image__fullscreen",i=>{i.addEventListener("click",()=>{xi("",p("img",{src:i.dataset.src,class:"embeddedobject-imagevideowithtext-dialog__image",alt:""}),{theme:"embeddedobject-imagevideowithtext-dialog"})})});N();function _w(i,e){if(e.length===0){Vt(i);return}let t=T(i,".widget-ws2016news__photo"),o=T(i,".widget__list");e.forEach((n,s)=>{let r=i.dataset.baseurl?i.dataset.baseurl+n.suburl:n.url;s===0&&t&&(n.photolink?(t.setAttribute("href",r),t.style.backgroundImage="url("+n.photolink+")",t.setAttribute("role",n.photoalt?"image":"presentation"),n.photoalt&&t.setAttribute("aria-label",n.photoalt)):Vt(t)),o.appendChild(p("a",{href:r,class:"widget__listitem widget__listitem--link"},p("span",{class:"widget__listitem-icon widget__listitem-icon--small UT-icon-UT_icon_52_arrow-right-round-16px"}),p("span",{class:"widget__listitem-text"},n.title)))}),Ie(i)}async function bw(i){let e=await fetch(i.dataset.publocfile);if(e&&e.status===200){let t=await e.json();t&&t["p"+i.dataset.publoc]?_w(i,t["p"+i.dataset.publoc].items):Vt(i)}}x(".widget-ws2016news",i=>{bw(i)});N();M();function Zu(i){if(!i.textContent)return;let t=i.textContent.replace(/[^0-9]+/g,"").split("53487");t.length===2&&t[1].length===4&&i.replaceChildren(p("span",{class:"prettyphonenumber"},"+31 (0)53 487 ",p("b",null,t[1])))}function ww(i,e){return i.style.maxHeight="0",i.classList.add("opendetails"),i.style.maxHeight=i.children[0].clientHeight+"px",setTimeout(()=>{i.style.maxHeight=""},200)}function vw(i){i.style.maxHeight=i.children[0].clientHeight+"px",i.clientHeight,i.style.maxHeight="0",i.classList.remove("opendetails")}var Wl=null;function xw(i){i.addEventListener("click",e=>{V(e);let t=i.closest(".widget-quotes");if(t){e.preventDefault(),t.classList.toggle("showslidedetails");return}clearTimeout(Wl),i.classList.toggle("opendetails");let o=i.closest(".widget-quote"),n=T(o,".widget-quote__persondetails");i.classList.contains("opendetails")?Wl=ww(n,Wl):vw(n)})}var Vl=class{constructor(e){this.items=w(e,".widget-quote"),this.idx=0,e.parentNode.appendChild(p("div",{class:"embeddedobject-quotes__nav"+(T(e,".widget-quote--withphoto")?" embeddedobject-quotes__nav--spaceleft":"")},this.items.map((t,o)=>p("button",{onClick:()=>this.gotoSlide(o),type:"button",class:"embeddedobject-quotes__nav__button"})))),this.btns=w(e.parentNode,".embeddedobject-quotes__nav__button"),this.items[this.idx].classList.add("active"),this.btns[this.idx].classList.add("active"),this.timer=setTimeout(()=>this.nextSlide(),7e3),e.addEventListener("mouseover",()=>clearTimeout(this.timer)),e.addEventListener("mouseout",()=>{clearTimeout(this.timer),this.timer=setTimeout(()=>this.nextSlide(),7e3)})}nextSlide(){this.gotoSlide(this.idx+1),this.timer=setTimeout(()=>this.nextSlide(),7e3)}gotoSlide(e){e<0?e=this.items.length-1:e>=this.items.length&&(e=0),e!==this.idx&&(clearTimeout(this.timer),this.items[this.idx].classList.remove("active"),this.btns[this.idx].classList.remove("active"),this.idx=e,this.items[this.idx].classList.add("active"),this.btns[this.idx].classList.add("active"))}};x(".embeddedobject-quotes__wrapper",i=>new Vl(i));var Bl=class{constructor(e){this.node=e,this.node.addEventListener("click",o=>
11this.onClick(o)),this.items=w(e,".widget-quotes__slide"),window.addEventListener("load",o=>this.setQuotesHeight()),document.fonts.ready.then(()=>this.setQuotesHeight()),this.setQuotesHeight();let t=this.items.length;t<=1||(this.delay=7e3,this.duration=1e3,this.idx=0,this.jmpbtns=[],this.items.forEach((o,n)=>{o.style.transition="opacity "+this.duration+"ms";let s=T(o,".widget-quote__front"),r=p("div",{class:"widget-quotes__jumpbuttons"});for(let l=0;l<t;++l)r.appendChild(p("span",{class:n===l?"active":""}));s.appendChild(r),this.jmpbtns.push(r)}),this.timer=setTimeout(()=>this.nextSlide(),this.delay),e.addEventListener("mouseover",o=>{clearTimeout(this.timer)}),e.addEventListener("mouseout",o=>{clearTimeout(this.timer),this.timer=setTimeout(()=>this.nextSlide(),this.delay)}))}onClick(e){let t=e.target.closest(".widget-quotes__jumpbuttons > span");if(t){for(let o=0;o<this.jmpbtns[this.idx].children.length;++o)if(this.jmpbtns[this.idx].children[o]===t){this.gotoSlide(o);break}}}gotoSlide(e){if(this.node.classList.contains("showslidedetails"))return;let t=this.idx;this.idx=e,e<0&&(this.idx=this.items.length-1),this.idx=this.idx%this.items.length,this.idx!==t&&(clearTimeout(this.timer),this.items.forEach(o=>o.classList.remove("fadeout")),this.items[t].classList.remove("active"),this.items[t].classList.add("fadeout"),this.items[this.idx].classList.add("active"),this.timer=setTimeout(()=>this.nextSlide(),this.delay))}previousSlide(){this.gotoSlide(this.idx-1)}nextSlide(){if(this.node.classList.contains("showslidedetails")){clearTimeout(this.timer),this.timer=setTimeout(()=>this.nextSlide(),this.delay);return}this.gotoSlide(this.idx+1)}setQuotesHeight(){let e=0;this.items.forEach(t=>{w(t,".widget-quote__front, .widget-quote__persondetails__content").forEach(o=>{o.style.minHeight="";let n=o.clientHeight;n>e&&(e=n)})}),this.items.forEach(t=>{w(t,".widget-quote__front, .widget-quote__persondetails__content").forEach(o=>{o.style.minHeight=e+"px"})}),this.node.style.height=e+"px",Ie(this.node)}};x(".widget-quote a[href^='tel:'] > .value",i=>Zu(i));x(".widget-quote__togglemore",i=>xw(i));x(".widget-quotes",i=>new Bl(i));N();function yw(i){let e;try{e=JSON.parse(i.dataset.options)}catch{}e&&e.loadifconsent&&(lt.getConsent()?$l(i,e):document.addEventListener("wh:consent-change",t=>{lt.getConsent()&&$l(i,e)})),i.addEventListener("click",()=>$l(i,e))}function $l(i,e){if(T(i,"iframe")||!e)return;let t=i.dataset.title?i.dataset.title:"";window.dataLayer&&window.dataLayer.push({event:"podcast_play",podcast_title:t}),i.replaceChildren(),e.url&&e.url.indexOf(".transistor.fm/e/")>-1?kw(i,e.url):Tw(i,e),i.parentNode.classList.add("widget-soundcloud--loaded")}function kw(i,e){i.appendChild(p("iframe",{allow:"autoplay",src:e,width:"100%",height:"100%",frameborder:"0",scrolling:"no",seamless:"true",allowtransparency:"true"}))}function Tw(i,e){let t=[],o=Object.keys(e);for(let n of o)t.push(n+"="+escape(e[n]));i.appendChild(p("iframe",{allow:"autoplay",src:"https://w.soundcloud.com/player/?"+t.join("&amp;"),width:"100%",height:"100%",frameborder:"0",scrolling:"no",seamless:"true",allowtransparency:"true"}))}x(".widget-soundcloud__wrapper[data-options]",i=>yw(i));M();M();wg();var pr=class{node;containernode;summarynode;options;_timer;constructor(e,t){this.options={duration:200,gtmevent:"",...t},this.node=e,this.containernode=this.node.querySelector(".wh-details__container"),this.containernode.style.transition="height "+this.options.duration+"ms",this.summarynode=this.node.querySelector(".wh-details__summary"),this.summarynode.addEventListener("click",o=>this.toggleAnimatedDetails(o))}toggleAnimatedDetails(e){e&&V(e);let t=!this.node.classList.contains("wh-details--open");clearTimeout(this._timer),this.containernode.style.height=this.containernode.clientHeight+"px",this.containernode.clientHeight,this.containernode.style.height=(t?this.containernode.children[0].clientHeight:0)+"px",this.node.classList.toggle("wh-details--open",t),this.sendToggleEvent({isopen:t}),this._timer=setTimeout(()=>{this.containernode.style.height=""},this.options.duration)}sendToggleEvent(e){this.options?.gtmevent&&e.isopen&&(this.options.gtmevent==="accordion"?ve({event:"accordion-klik",accordioncontent:this.summarynode.textContent||""}):ve({event:"faq-klik",faqcontent:this.summarynode.textContent||""}))}};function em(){let i=location.hash.substr(1);i&&Ew(i)}function Ew(i){let e=document.getElementById(i);if(e){let t=e.parentNode?.closest?.("details,.wh-details");for(;t;)t.nodeName==="DETAILS"&&t.setAttribute("open",""),t.classList.add("wh-details--open"),t=t.parentNode?.closest("details,.wh-details")}}function Sw(){location.hash.length>1&&em(),(T("details")||T(".wh-details"))&&(window.addEventListener("hashchange",i=>em()),window.addEventListener("keydown",i=>{if(i.keyCode===13){let e=i.target?.closest(".wh-details__summary");e&&e.tagName!=="BUTTON"&&Oc(e,"click")}}))}x("details[data-gtmevent]",Lw);function Lw(i){i.addEventListener("toggle",e=>Cw(e))}function Cw(i){let e=i.target;if(!e.open)return;let o=e.getAttribute("data-gtmevent"),n=e.querySelector("summary");if(!n)return;let s=n.textContent;o==="accordion"?ve({event:"accordion-klik",accordioncontent:s||""}):ve({event:"faq-klik",faqcontent:s||""})}K(Sw);var Yl=class extends pr{sendToggleEvent(e){let t=this.node.closest("[data-widget-title]")?.dataset.widgetTitle??"",o=this.node.closest("[data-main-item]")?.dataset.mainItem??"",n=this.node.dataset.subItem??"";e.isopen&&ve({event:"table_with_timeline_click",table_with_timeline_main_item:o,table_with_timeline_sub_item:n,table_with_timeline_title:t})}};x(".embeddedobject-tablewithtabs .wh-details",i=>{new Yl(i)});N();x(".wh-video .wh-video__playbutton, .carrousel__cell__playbutton",i=>Fw(i));function Fw(i){i.classList.add("UT-icon-UT_icon_82_play-16px")}N();Zs();var Xl,ko=[];window.carrouselwidgets=ko;function om(i){let e=i.previousElementSibling||i.nextElementSibling,t,o,n=!1;e||(o=!0,e=i,n=i.classList.contains(".main__contents--fullwidth"),i.classList.remove(".main__contents--fullwidth")),t=window.getComputedStyle(e);let s=(document.querySelector(".main__contents,.page-content")||document.querySelector(".contentpart__main")).clientWidth,r={spaceLeft:parseInt(t.marginLeft,10)+parseInt(t.paddingLeft,10),spaceRight:parseInt(t.marginRight,10)+parseInt(t.paddingRight,10),contentWidth:e.offsetWidth-parseInt(t.paddingLeft,10)-parseInt(t.paddingRight,10),fullwidth:s};return r.spaceRight=r.fullwidth-r.spaceLeft-r.contentWidth,o&&n&&i.classList.add(".main__contents--fullwidth"),r}function Aw(i){window.pauseHeaderAnimation&&window.pauseHeaderAnimation()}function tm(i){window.unPauseHeaderAnimation&&window.unPauseHeaderAnimation()}function nm(){for(let i of ko){let e=om(i.node);sm(i);let t=i.carrousel;t.setOptions({paddingLeft:e.spaceLeft,paddingRight:e.spaceRight}),t.refresh()}}function im(){for(let i of ko)i.carrousel.relayoutSlides();nm()}function sm(i){let e=i.carrousel,t=i.node.querySelector(".carrousel__next");if(!t||t.clientHeight==0){i.node.style.minHeight="";return}let o=e.nodes.viewport.querySelector(".carrousel__cell-image");if(o){let n=i.node.getBoundingClientRect(),r=o.getBoundingClientRect().bottom-n.top+60+20+20;i.node.style.minHeight=r+"px"}}function Mw(i){let e=i.target.closest(".carrouselwidget");if(!e)return;let t=i.target.closest(".carrousel__cell");if(!t)return;if(i.target.closest(".carrousel__cell-playbutton")){i.preventDefault(),i.stopPropagation();
11let n=t.querySelector("[data-video]");n&&(t.classList.add("active"),vi(n)?t._wsVideoPlayer.play():Ht(n).then(s=>t._wsVideoPlayer=s))}else i.target.closest(".video-close")&&(i.preventDefault(),i.stopPropagation(),t.classList.remove("active"),t._wsVideoPlayer.pause());let o=i.target.closest("a");if(o){let n=getComputedStyle(t),s=n.transform||n.webkitTransform||n.mozTransform,r=s.match(/^matrix3d\((.+)\)$/),l=-1;r?l=parseFloat(r[1].split(", ")[12]):(r=s.match(/^matrix\((.+)\)$/),r&&(l=parseFloat(r[1].split(", ")[4])));let a=parseInt(n.width),d=ko.filter(h=>h.node==e);d=d.length?d[0]:null;let c=d.carrousel.nodes.viewport.getBoundingClientRect();(l>=0&&l+a<c.width||t.classList.contains("carrousel__cell--aligned"))&&(location.href=o.href),i.preventDefault(),i.stopPropagation()}}function Pw(i){i.preventDefault()}x(".carrouselwidget",(i,e)=>{e||(Xl=om(i));let t=new Qt(i,{paddingLeft:Xl.spaceLeft,paddingRight:Xl.spaceRight}),o={node:i,carrousel:t,islarge:i.classList.contains("carrouselwidget--large")};ko.push(o),sm(o),i.addEventListener("tap",Mw),i.addEventListener("click",Pw),t.iscroll&&(t.iscroll.on("scrollStart",()=>Aw("scrollStart")),t.iscroll.on("flick",()=>tm("flick")),t.iscroll.on("scrollEnd",()=>tm("scrollEnd"))),e||(window.addEventListener("resize",nm),window.__carrouselwidgets=ko,document.addEventListener("DOMContentLoaded",im),window.addEventListener("load",im))},{afterdomready:!0});N();var am=Mt(jl());N();Tg();K(()=>{let i=$c()==="ios";document.documentElement.classList.add(i?"nohover":"allowhover")});var lm=[];function rm(){for(let i of lm){let e=dm(i.container);i.setOptions(e),i.refresh()}}function jw(i){let e=i.target.closest(".photoalbumwidget__item");if(!e)return;let t=i.target.closest(".photoalbumwidget"),o=t.getAttribute("data-instanceid"),n=t.querySelectorAll(".photoalbumwidget__item");n=Array.from(n);let s=n.indexOf(e);if(s===-1)return;let r=document.querySelector(".header__universe");r&&(r.style.display="none"),am.doActivateSlideshow(o,s)}function dm(i){let e=window.devicePixelRatio;e||(e=1);let t=i.clientWidth;return{width:Math.round(t*e)/e,row_height:Math.round(t/2.75*e)/e,gutter_x:Math.round(t*e/50)/e,gutter_y:Math.round(t*e/50)/e}}x(".photoalbumwidget",(i,e)=>{let t=i.querySelector(".justifiedmediagrid"),o=dm(t),n=new Bi(t,o);lm.push(n),n.refresh(),t.addEventListener("click",jw),e||(window.addEventListener("resize",rm),window.addEventListener("load",rm))},{afterdomready:!0});N();N();Zs();window.__dompack_cslideshow_idx=0;window.__dompack_cslideshows=[];var Gl;window.IntersectionObserver&&(Gl=new IntersectionObserver(qw));document.addEventListener("visibilitychange",Rw);function Rw(){for(let i of window.__dompack_cslideshows)i.__handleVisibilityChange()}function qw(i,e){let t=[],o=[];for(let n of i)n.isIntersecting?t.push(n.target):o.push(n.target);for(let n of window.__dompack_cslideshows){let s=t.indexOf(n.node)>-1;!s&&o.indexOf(n.node)===-1||(n.inviewport=s,n.__handleVisibilityChange())}}var Ii=class{constructor(e,t){if(!e){console.error("CarrouselSlideshow got null as node.");return}window.__dompack_cslideshow_idx++,window.__dompack_cslideshows.push(this);let o=ti(e,"data-carrousel-options");this.node=e,this.inviewport=this.__determineInViewport(e),this.lastautoslidetime=null,this.scrolling=!1,this.ignore_scroll=!1,this.options={autoplay:!0,autoplay_initialdelay:0,autoplay_freezeslideduration:6e3,transitionDuration:1500,eventPassthrough:!0,updateviewportheight:!1,jumpbuttons:".carrousel__jumpbutton",jumpbutton_selectedclass:"active",buttonprevious:null,buttonnext:null,debug:!1,autoresize:!0,name:"slideshow"+window.__dompack_cslideshow_idx,...o,...t},this.options.debug&&console.log("CarrouselSlideshow options",this.options),this.autoplaytimer=null,this.playing=this.options.autoplay;let n={transitionDuration:this.options.transitionDuration,eventPassthrough:this.options.eventPassthrough,gap:0,updateviewportheight:this.options.updateviewportheight};"items"in this.options&&(n.items=this.options.items),this.options.debug&&console.info("Carrousel options",n),this.carrousel=new Qt(e,n);let s=this.carrousel.nodes.dragarea;s.addEventListener("dragstart",r=>this.doHandleDragStart(r)),s.addEventListener("click",r=>this.doHandleLinkClick(r)),s.addEventListener("tap",r=>this.doHandleLinkTap(r)),this.jumpbuttonnodes=[],typeof this.options.jumpbuttons=="string"?this.jumpbuttonnodes=this.node.querySelectorAll(this.options.jumpbuttons):this.jumpbuttonnodes=this.options.jumpbuttons;for(let r=0;r<this.jumpbuttonnodes.length;r++)this.jumpbuttonnodes[r].addEventListener("click",l=>this.__doJumpToSlide(r,l)),this.jumpbuttonnodes[r].addEventListener("tap",l=>this.__doJumpToSlide(r,l));this.options.buttonprevious&&this.options.buttonprevious.addEventListener("click",this.__handlePrevButton.bind(this)),this.options.buttonnext&&this.options.buttonnext.addEventListener("click",this.__handleNextButton.bind(this)),this.node.addEventListener("wh:activeslidechange",this.onSlideChange.bind(this)),this.carrousel.iscroll&&(this.carrousel.iscroll.on("scrollStart",this.__onScrollStart.bind(this)),this.carrousel.iscroll.on("scrollEnd",this.__onScrollEnd.bind(this))),this.options.autoresize&&(this.options.debug&&console.info("AUTORESIZE enabled"),this.bindedrefresh=this.relayoutSlides.bind(this),window.addEventListener("resize",this.bindedrefresh),document.addEventListener("DOMContentLoaded",this.bindedrefresh),window.addEventListener("load",this.bindedrefresh)),Gl&&Gl.observe(e),this.playing&&this.__applyCurrentAutoplay(this.options.autoplay_initialdelay)}doHandleDragStart(e){e.preventDefault()}
11doHandleLinkClick(e){e.target.closest("a")&&e.preventDefault()}doHandleLinkTap(e){let t=e.target.closest("a");t&&window.open(t.href,"_blank")}destroy(){clearTimeout(this.autoplaytimer),this.autoplaytimer=null,this.playing=!1,this.bindedrefresh&&(window.removeEventListener("resize",this.bindedrefresh),document.removeEventListener("DOMContentLoaded",this.bindedrefresh),window.removeEventListener("load",this.bindedrefresh)),this.carrousel.destroy()}__determineInViewport(e){let o=document.body.getBoundingClientRect().height,n=e.getBoundingClientRect();return n.bottom>=0||n.top<=o}__handlePrevButton(){this.carrousel.previousSlide()}__handleNextButton(){this.carrousel.nextSlide()}relayoutSlides(){this.options.debug&&console.info("relayoutSlides"),this.ignore_scroll=!0,this.carrousel.relayoutSlides(),this.carrousel.refresh(),this.ignore_scroll=!1}pause(){this.playing=!1,this.__applyCurrentAutoplay()}play(){this.playing=!0,this.__applyCurrentAutoplay()}refresh(){this.relayoutSlides()}onSlideChange(e){let t=this.jumpbuttonnodes.length;t>e.detail.previousactiveidx&&this.jumpbuttonnodes[e.detail.previousactiveidx].classList.remove(this.options.jumpbutton_selectedclass),t>e.detail.nextactiveidx&&this.jumpbuttonnodes[e.detail.nextactiveidx].classList.add(this.options.jumpbutton_selectedclass)}__handleVisibilityChange(){this.options.debug&&console.info(this.options.name,"Page visible: ",!document.hidden,"Slideshow in viewport",this.inviewport),this.__applyCurrentAutoplay()}__onScrollStart(e){this.ignore_scroll||(this.scrolling=!0)}__onScrollEnd(e){this.ignore_scroll||(this.scrolling=!1)}__doJumpToSlide(e,t){t.preventDefault(),this.carrousel.jumpToSlide(e)}__applyCurrentAutoplay(e){if(this.options.debug&&console.log("__applyCurrentAutoplay"),e||(e=0),this.scrolling){this.options.debug&&console.log("Not scheduling or cancelling a slide during scrolling.");return}this.playing&&!document.hidden&&this.inviewport?this.autoplaytimer?this.options.debug&&console.log("Timer already running..."):(this.options.debug&&console.log("Setting new timer for auto slide"),this.autoplaytimer=setTimeout(this.__nextSlideByTimer.bind(this),this.options.autoplay_freezeslideduration+e)):(this.options.debug&&console.log("No autoplay",{play:this.playing,dochidden:document.hidden,inviewport:this.inviewport}),this.autoplaytimer&&(clearTimeout(this.autoplaytimer),this.autoplaytimer=null))}__nextSlideByTimer(){this.options.autoplay&&(this.lastautoslidetime=new Date().getTime(),this.carrousel.nextSlide(),this.autoplaytimer=setTimeout(this.__nextSlideByTimer.bind(this),this.options.autoplay_freezeslideduration))}};window.__widget_slideshow=[];var Kl=class{constructor(e){if(this.widgetnode=e,e.classList.contains("slideshowwidget--multipleslides")){this.slideinfonodes=e.querySelectorAll(".slideshowwidget__slideinfo");let t=e.querySelector(".slideshowwidget__previousbutton"),o=e.querySelector(".slideshowwidget__nextbutton");this.slideshow=new Ii(this.widgetnode,{jumpbuttons:".slideshowwidget__slidedot",jumpbutton_selectedclass:"slideshow--activedot",autoplay:!0,eventPassthrough:!0,buttonprevious:t,buttonnext:o,transitionDuration:500}),this.widgetnode.addEventListener("mouseenter",()=>this.pauseSlideshow()),this.widgetnode.addEventListener("mouseleave",()=>this.resumeSlideshow()),t.addEventListener("click",()=>this.stopSlideshow()),o.addEventListener("click",()=>this.stopSlideshow()),window.__widget_slideshow.push({node:e,widget:this,slideshow:this.slideshow}),e.addEventListener("wh:activeslidechange",n=>this.onSlideChange(n)),e.addEventListener("tap",n=>this.doCheckForSlideshowVideoTrigger(n))}else e.addEventListener("click",t=>this.doCheckForSlideshowVideoTrigger(t))}onSlideChange(e){this.slideinfonodes[e.detail.previousactiveidx].classList.remove("active"),this.slideinfonodes[e.detail.nextactiveidx].classList.add("active"),e.detail.previousactivenode&&this.deactivateSlide(e.detail.previousactivenode)}pauseSlideshow(){this.deactivated||(this.slideshow.scrolling=!1,this.slideshow.pause(),this.widgetnode.classList.add("slideshow--paused"))}resumeSlideshow(){this.deactivated||(this.slideshow.play(),this.widgetnode.classList.remove("slideshow--paused"))}stopSlideshow(){this.slideshow.scrolling=!1,this.slideshow.pause(),this.deactivated=!0,this.widgetnode.classList.remove("slideshow--paused")}stopVideoSlide(e){console.log("stopCarrouselVideo",e),this.passBlockPointerEvents(!1);try{e._wsVideoPlayer&&e._wsVideoPlayer.pause()}catch{}this.slideshow&&this.slideshow.play()}deactivateSlide(e){e._wsVideoPlayer&&this.stopVideoSlide(e),this.widgetnode.classList.remove("slideshowwidget--videoplaying"),e.classList.remove("active")}passBlockPointerEvents(e){this.slideshow&&(this.slideshow.carrousel.iscroll.options.preventDefault=!e)}doCheckForSlideshowVideoTrigger(e){if(!e.target.closest(".slideshowwidget"))return;let o=e.target.closest(".carrousel__cell");if(!o)return;
11let n=o.querySelector("[data-video]");n&&(this.widgetnode.classList.add("main__contents--overdeeplinks"),e.target.closest(".video-close")?(e.preventDefault(),e.stopPropagation(),this.deactivateSlide(o)):(e.preventDefault(),e.stopPropagation(),o.classList.add("active"),vi(n)?(this.widgetnode.classList.add("slideshowwidget--videoplaying"),this.slideshow&&(this.slideshow.scrolling=!1,this.slideshow.pause()),this.passBlockPointerEvents(!0),o._wsVideoPlayer.play()):Ht(n).then(s=>{this.passBlockPointerEvents(!0),this.widgetnode.classList.add("slideshowwidget--videoplaying"),this.slideshow&&(this.slideshow.scrolling=!1,this.slideshow.pause()),o._wsVideoPlayer=s})))}};x(".slideshowwidget",i=>new Kl(i));N();var rt;x(".embeddedobject--progress",i=>{"scrollRestoration"in history&&(history.scrollRestoration="manual");let e=new URL(location.href),o=(e.searchParams.get("step")||"").split("/"),n=o[0],s=o.length>1?o[1]:"",r=e.searchParams.get("activesteps"),l=[];r&&(l=r.split(","));let a=Array.from(i.querySelectorAll(".progress__item"));rt=i.querySelector('[data-progresstag="'+n+'"]');let d=a.indexOf(rt);for(let c=0;c<=d;c++){let h=a[c];c<d?h.classList.add("progress__item--passed"):(s==="passed"||s===""?rt.classList.add("progress__item--passed"):s==="conditional"?rt.classList.add("progress__item--conditional"):rt.classList.add("progress__item--failed"),rt.classList.add("progress__item--currentitem"));let m=h.getAttribute("data-progresstag");(l.indexOf(m)>-1||h===rt)&&h.classList.add("progress__item--active")}rt&&(rt.classList.add("foldablecontent--open"),rt.querySelector(".foldablecontent__foldcontainer").style.cssText="height:auto;overflow:inherit;")});function Jl(){rt&&(document.querySelector(".embeddedobject--progress").scrollIntoView(),rt.scrollIntoViewIfNeeded?rt.scrollIntoViewIfNeeded():rt.scrollIntoView())}window.addEventListener("DOMContentLoaded",Jl);window.addEventListener("load",function(){Jl(),"scrollRestoration"in history||setTimeout(Jl,100)});N();M();te();var hm=Mt(ga());re();var cm=new RegExp("\\w+","g"),Dw=new RegExp("(.*[^\\w])?(\\w+)$"),hr=class{index=new Map;items=new Map;_searchFields=[];_autoSearchFields=!0;_suggestFields=[];_autoSuggestFields=!0;_completeSuggestFields=[];get searchFields(){return this._searchFields}set searchFields(e){this._searchFields=e,this._autoSearchFields=!1}get suggestFields(){return this._autoSuggestFields?this._searchFields:this._suggestFields}set suggestFields(e){this._suggestFields=e,this._autoSuggestFields=!1}get completeSuggestFields(){return this._completeSuggestFields}set completeSuggestFields(e){this._completeSuggestFields=e}indexItem(e){let t=new Map;for(let[o,n]of Object.entries(e)){if(typeof n!="string")continue;this._autoSearchFields&&!this._searchFields.includes(o)&&this._searchFields.push(o);let s=n.toLowerCase(),r,l=0;for(;(r=cm.exec(s))!==null;){let a=o+":"+r[0],d=r.index,c=this.index.get(a);c||(c=new Map,this.index.set(a,c));let h=c.get(e);h||(h={positions:[]},c.set(e,h)),h.positions.push(d),++l}t.set(o,l)}this.items.set(e,{fields:t})}suggest(e){let t=new Map,o=Dw.exec(e);if(o){let s=o[1]||"",r=o[2],l;s&&(l=this.#e(s).results);for(let[a,d]of this.index){let c=a.split(":")[0];if(!this.suggestFields.includes(c))continue;let h=a.substr(c.length+1),m=this.#t(r,h,{startsWithScore:.9});if(m){let u=s+h;if(t.has(u)||t.set(u,[m]),this.completeSuggestFields.includes(c))for(let b of d.keys()){if(l&&!l.has(b))continue;let f=[m];l&&f.push(...l.get(b)),u=b[c];let g=t.get(u);g?g.push(...f):t.set(u,f)}}}}if(!t)return[];let n=this.#n(t);return this.#i(n)}search(e){let t=this.#e(e);return{items:this.#i(t.results),terms:t.terms}}#e(e){let t=new Map,o=[];e=e.toLowerCase();for(let s of this.searchFields){let r,l=e.match(cm);if(l)for(let a of l){let d=this.#o(s,a);if(d.results.size){for(let c of d.terms)o.includes(c)||o.push(c);if(r){for(let[c,h]of d.results)r.has(c)&&r.get(c).push(...h.scores);for(let c of r.keys())d.results.has(c)||r.delete(c)}else{r=new Map;for(let[c,h]of d.results)r.set(c,h.scores)}}}if(r)for(let[a,d]of r){let c=t.get(a);c?c.push(...d):t.set(a,d)}}return{results:this.#n(t),terms:o}}#o(e,t){let o,n=[],s=this.index.get(e+":"+t);if(s)o=new Map(Array.from(s).map(r=>[r[0],{scores:[1],term:t,positions:r[1].positions}])),n.push(t);else{o=new Map;for(let[r,l]of this.index){let a=r.split(":")[0];if(a!==e&&e!=="*")continue;let d=r.substr(a.length+1),c=this.#t(t,d);if(c){for(let h of Array.from(l))o.has(h[0])?o.get(h[0]).scores.push(c):o.set(h[0],{scores:[c],term:d,positions:h[1].positions});n.push(d)}}for(let[r,l]of o)o.get(r).scores=[l.scores.reduce((a,d,c)=>(a*c+d)/(c+1))]}return{results:o,terms:n}}#t(e,t,{limitDistance:o=2,startsWithScore:n=.25}={}){if(e===t)return 1;let s=0;if(Math.min(e.length,t.length)>=2*o){let r=es(e,t);r<=o&&(s=Math.max(s,(o-r+1)/o))}return t.startsWith(e)&&(s=Math.max(s,n)),s}#n(e){let t=new Map;for(let[o,n]of e)t.set(o,[n.reduce((s,r,l)=>(s*l+r)/(l+1))]);return t}#i(e){return Array.from(e).sort((t,o)=>o[1][0]-t[1][0]).map(t=>t[0])}};ie();var Iw=["words","query"],Ql={},pm=[];function zw(i,e){return e&&e<i?v("utwente_base:frontend.ws2016.js.filteredoverview.feedbackbar-resultslimited",i,e):i===1?v("utwente_base:frontend.ws2016.js.filteredoverview.feedbackbar-result",i):i>1?v("utwente_base:frontend.ws2016.js.filteredoverview.feedbackbar-results",i):v("utwente_base:frontend.ws2016.js.filteredoverview.feedbackbar-noresults")}function Nw(i){return i===1?v("utwente_base:frontend.ws2016.js.filteredoverview.tease-result",i):i>1?v("utwente_base:frontend.ws2016.js.filteredoverview.tease-results",i):v("utwente_base:frontend.ws2016.js.filteredoverview.tease-noresults")}var Zl=class{debug=A["ut-filters"];form;resultscountnode=null;options;resultscountcontainer=null;constructor(e){this.options={...e},this.form=L(".filteredoverview__form"),this.hideFiltersMaybe();for(let t of document.body.querySelectorAll(".filteredoverview__toggleaction"))t.addEventListener("mousedown",o=>o.preventDefault()),t.addEventListener("mouseup",()=>this.toggleFiltersExpanded()),t.addEventListener("keydown",o=>this.toggleFiltersExpandedIfEnter(o))}setFiltersExpanded(e){document.documentElement.classList.toggle("showfilters",e);let t=this.form.querySelectorAll("input[name], select[name]");for(let o=0;o<t.length;o++)e?t[o].removeAttribute("tabindex"):t[o].setAttribute("tabindex","-1");this.checkNeedToShowTeaserBar()}toggleFiltersExpandedIfEnter(e){e.key==="Enter"&&this.toggleFiltersExpanded()}toggleFiltersExpanded(){this.setFiltersExpanded(!document.documentElement.classList.contains("showfilters"))}isFilterBarExpanded(){return document.documentElement.classList.contains("showfilters")}hideFiltersMaybe(){if(this.debug&&console.log("[ut-filters] hideFiltersMaybe"),!ye.obj.filteredoverview){console.warn("No filteredoverview settings found.");return}let e=ye.obj.filteredoverview.expandwhen;switch(this.debug&&console.log("[ut-filters] expandwhen",e),e){case"openfirstvisit":{if
11(!("whfsid"in ye.obj.filteredoverview))console.warn("Cannot determine expand state for filteredoverview, no filteredoverview.whfsid specified.");else{let t="pageseen"+ye.obj.filteredoverview.whfsid,o=!(t in sessionStorage);this.setFiltersExpanded(o),sessionStorage[t]="true"}break}case"alwaysopen":{this.setFiltersExpanded(!0);break}case"defaultclosed":{this.setFiltersExpanded(!1);break}}}setTeaserResultCount(e,t){this.resultscountnode||this.__createResultsCountNode();let o=this.options.getResultsTeaserText??Nw;this.resultscountnode.textContent=o(e,t)}__createResultsCountNode(){let e=document.createElement("a");e.className="filteredoverview__teaser",e.href="#results";let t=document.createElement("div");t.className="filteredoverview__teaser__content",e.appendChild(t),document.body.appendChild(e),this.resultscountcontainer=e,this.resultscountnode=t,window.addEventListener("resize",()=>this.checkNeedToShowTeaserBar()),document.addEventListener("scroll",()=>this.checkNeedToShowTeaserBar()),this.checkNeedToShowTeaserBar()}setHoveringFeedbackText(e){this.resultscountnode&&(this.resultscountnode.textContent=e)}checkNeedToShowTeaserBar(){if(!this.resultscountcontainer)return;let e=document.body.getBoundingClientRect().height,t=document.querySelector('#results, a[name="results"]');if(!t){this.debug&&console.warn("Missing results anchor");return}let n=t.getBoundingClientRect().top>e;this.resultscountcontainer.classList.toggle("filteredoverview__teaser--aboveresults",n)}},To=class extends Zl{filters={};filters_titles={};gotfiltersfromurl=!1;feedbackcontainer;feedbacknode;resultsnode;resetnode;oldfilterstr="";constructor(e){super(e),this.options.filterpagetype?ve({filterpagetype:this.options.filterpagetype}):console.error("Please set the filterpagetype for this page (for tracking)"),this.feedbackcontainer=T(".filteredoverview__feedbackandviewbar"),this.feedbacknode=T(".filteredoverview__feedback"),this.resultsnode=T(".filteredoverview__results"),this.debug&&(this.form.classList.add("filteredoverview--debugmode"),console.log("[ut-filters]",{fbc:this.feedbackcontainer,fbn:this.feedbacknode,rsn:this.resultsnode}));let t=document.querySelector(".filtertags__items");t&&t.addEventListener("click",o=>this.doCheckForTagRemoval(o)),this.__attachChangeEvents(),this.__initFiltersFromURL(),this.prefillFormWithFilterValues(this.filters),this.resetnode=this.form.querySelector(".filteredoverview__resetfilters"),this.resetnode&&this.resetnode.addEventListener("click",o=>this.resetFilters()),window.addEventListener("pageshow",o=>this.collapseFilterIfReturned(o)),this.debug&&console.log("[ut-filters] FilteredOverview clientside mode",this.form),this.form.addEventListener("submit",o=>{o.preventDefault(),this.doFilter(o)})}filternodes;__attachChangeEvents(){if(this.filternodes=w(this.form,"input[name], select[name]"),this.options.additionalform){let e=w(this.options.additionalform,"input[name], select[name]");this.filternodes=[...this.filternodes,...e]}for(let e of this.filternodes)e.addEventListener("change",t=>this.onFilterChange(t))}__initFiltersFromURL(){if(this.oldfilterstr="",this.filters=this.getFiltersFromURL(),Object.keys(this.filters).length>0&&(this.gotfiltersfromurl=!0),this.debug&&console.log("[ut-filters] Filters from URL",this.filters),!this.filters.language)for(let e of this.form.querySelectorAll("input[name='language']"))this.filters.language||(this.filters.language=[]),this.filters.language.push(e.value);document.documentElement.classList.contains("coursefinderpage")&&(this.oldfilterstr=JSON.stringify(this.filters))}collapseFilterIfReturned(e){e.persisted&&this.setFiltersExpanded(!1)}isFilterActive(){return Object.keys(this.filters).length}getFiltersFromURL(){let e={},t=[];for(let o of this.filternodes){let n=t.indexOf(o.name)===-1?this.getUrlParam(o.name):"";if(n!==""){let s=o.nodeName==="INPUT"?o.getAttribute("type"):"";if(s==="checkbox"){let r=n.split(",");e[o.name]=r}else s==="radio"||o.nodeName,e[o.name]=n;t.push(o.name)}}return this.processFiltersFromURL(),e}prefillFormWithFilterValues(e){this.debug&&console.log("[ut-filters] Apply filters to DOM",e);for(let t of this.filternodes){let o=t.nodeName==="INPUT"?t.getAttribute("type"):"";o==="checkbox"?t.checked=e[t.name]&&e[t.name].indexOf(t.value)>-1:o==="radio"?t.checked=e[t.name]===t.value:e[t.name]&&(t.value=e[t.name])}}applyFiltersToURL(){if(this.debug&&console.log("[ut-filters] Apply filters to URL",this.filters),!history.replaceState)return;let e=new URL(location.href);for(let o of Object.keys(this.filters)){let n=this.filters[o];typeof n=="string"?n!==""&&e.searchParams.set(o,n):typeof n=="boolean"?n&&e.searchParams.set(o,""):Array.isArray(n)&&n.length>0&&e.searchParams.set(o,n.join(","))}typeof this.isdetailsview<"u"&&(this.isdetailsview||(e.hash="#listview")),history.replaceState(null,"",e);let t=document.querySelectorAll("a.filteredoverview__updatelinkquery");for(let o of t){let n=new URL(o.href);n.search=search,o.href=n.href}}onFilterChange(e){this.doFilter(e)}updateFilters(e){let t=!!e;this.filters={},this.filters_titles={};for(let o of this.filternodes)if(o.nodeName==="SELECT")o.value!==""&&(this.filters[o.name]=o.value,this.filters_titles[o.name]=o.options[o.selectedIndex].text);else if(o.nodeName==="INPUT"){let n=o.getAttribute("type");if(n==="checkbox"){if(!o.checked)continue;this.filters[o.name]||(this.filters[o.name]=[],this.filters_titles[o.name]=[]),this.filters[o.name].push(o.value);let s="";if(o.id!==""){let r=document.querySelector('label[for="'+o.id+'"]:not(:empty)');r?s=r.textContent:s="??"}this.filters_titles[o.name].push(s)}else if(n==="radio"){if(!o.checked)continue;o.value!==""&&(this.filters[o.name]=o.value);let s="";if(o.id!==""){let r=document.querySelector('label[for="'+o.id+'"]');r?s=r.textContent:s="??"}this.filters_titles[o.name]=s}else o.value!==""&&(this.filters[o.name]=o.value,this.filters_titles[o.name]=o.value)}this.sendCurrentFiltersToDataLayer(t),this.onFormFiltersUpdate(this.filters,e),document.documentElement.classList.contains("page--studyfinder")&&this.filters.language&&this.form.language.length===this.filters.language.length&&delete this.filters.language}sendCurrentFiltersToDataLayer(e){if(e){let t={};
11Object.keys(this.filters_titles).forEach(o=>{let n=this.filters_titles[o];Array.isArray(n)&&(n=n.join(", ")),t["filter_"+o]=n,(!Ql[o]||Ql[o]!==n)&&(Ql[o]=n,ve({event:"set_filter",filtername:o,filtervalue:n}))}),pm.filter(o=>!(o in this.filters_titles)).forEach(o=>{ve({event:"set_filter",filtername:o,filtervalue:""})}),ve({event:"set_filters",...t})}pm=Object.keys(this.filters_titles)}resetFilters(e){for(let t of this.filternodes){if(e&&t.name==="words")continue;let o=t.nodeName==="INPUT"?t.getAttribute("type"):"";o==="checkbox"||o==="radio"?t.checked=t.name==="language":t.value=""}this.doFilter()}doFilter(e){this.doFilterInternal(e)}doFilterForced(){this.doFilterInternal(null,!0)}refreshFilterFeedbackUI(){this.syncFilterTags();let e=Object.keys(this.filters).length;e===1&&this.filters.language&&this.filters.language.length===this.languagescount&&--e,this.form.classList[e>0?"add":"remove"]("filteredoverview--filteractive"),this.feedbackcontainer&&this.feedbackcontainer.classList[e>0?"add":"remove"]("filteredoverview--filteractive")}async doFilterInternal(e,t=!1){this.debug&&console.log("[ut-filters] FilteredOverview:doFilter",{evt:e}),this.updateFilters(e);let o=JSON.stringify(this.filters);if(!(o===this.oldfilterstr&&!t)){if(this.oldfilterstr=o,this.refreshFilterFeedbackUI(),this.applyFiltersToURL(),typeof this.filters.words<"u"&&this.filters.words!==""){if(this.rpccache&&this.rpccache.words===this.filters.words)this.showResults();else{let n=await this.doSearchWords(this.filters.words);this.rpccache=n,this.debug&&console.log("rpccache",n),this.showResults()}return}this.rpccache=null,this.showResults()}}async doSearchWords(e){return this.rpc||(this.rpc=new hm.default),await this.rpc.async("SearchWords",e)}showNoResults(e){e?document.documentElement.classList.add("filteredoverview--noresults"):document.documentElement.classList.remove("filteredoverview--noresults")}processFiltersFromURL(){this.debug&&console.log("[ut-filters] processFiltersFromURL not used.")}onFormFiltersUpdate(e,t){}doCheckForTagRemoval(e){let t=e.target.closest(".filtertags__item");if(!t)return;e.preventDefault();let o=t.getAttribute("data-name"),n=t.getAttribute("data-value");if(!this.form[o]){console.error("Failed to find field/option belonging to the removed tag",o,n);return}if(this.form[o]instanceof RadioNodeList)for(let s of this.form[o])s.value===n&&(s.checked=!1);else this.form[o].value="";this.doFilter()}getFlatActiveFilterValuesList(){let e=[];for(let t in this.filters)Iw.indexOf(t)>-1||e.push({name:t,value:this.filters[t],title:this.filters_titles[t]});return e}currenttags={};syncFilterTags(){let e=document.querySelector(".filtertags__items");if(!e)return;for(let n of Object.keys(this.currenttags))this.currenttags[n].isnew=!1,this.currenttags[n].isused=!1;let t=this.getFlatActiveFilterValuesList();this.onMapFilterTags&&(t=this.onMapFilterTags(t,this.filters));for(let n of t)if(Array.isArray(n.value))for(let s=0;s<n.value.length;s++){let r="_"+n.name+"="+n.value[s];this.currenttags[r]||(this.currenttags[r]={title:n.title[s],name:n.name,value:n.value[s],isnew:!0,node:null}),this.currenttags[r].isused=!0}else{let s="_"+n.name+"="+n.value;this.currenttags[s]||(this.currenttags[s]={title:n.title,name:n.name,value:n.value,isnew:!0,node:null}),this.currenttags[s].isused=!0}for(let n of Object.keys(this.currenttags)){let s=this.currenttags[n];if(s.isnew){let r=document.createElement("div");r.className="filtertags__item",r.setAttribute("data-name",s.name),r.setAttribute("data-value",s.value);let l=document.createElement("div");l.className="filtertags__item__title",l.textContent=s.title;let a=document.createElement("div");a.className="filtertags__item__remove UT-icon-UT_icon_47_cross-16px",r.appendChild(l),r.appendChild(a),e.appendChild(r),r.__tag=s,this.currenttags[n].node=r}}let o=document.querySelector(".filteredoverview__feedbackandviewbar");o&&o.classList.toggle("filteredoverview__filtertags--active",t.length>0),document.clientWidth;for(let n of Object.keys(this.currenttags)){let s=this.currenttags[n];s.isnew&&(s.node.clientWidth,s.node.classList.add("visible")),s.isused||(s.node.classList.remove("visible"),setTimeout(()=>s.node?.remove(),200),delete this.currenttags[n])}}getUrlParam(e){let t=location.search.replace(/\+/g,"%20");return(e=new RegExp("[?&]"+encodeURIComponent(e)+"=([^&]*)").exec(t))?decodeURIComponent(e[1]):""}setFeedback(e,t,o){if(this.showNoResults(e===0),this.feedbacknode){let n=this.options.getResultsFeedbackText??zw;this.feedbacknode.textContent=n(e,t)}this.setTeaserResultCount(e,t)}},ur=class extends To{items=[];itemscontainer;searchIndex=new hr;constructor(e){super(e);let t=e?.itemsselector||"";this.itemscontainer=L(".filteredoverview__items"),this.debug&&console.log("[ut-filters]",{form:this.form,itemscontainer:this.itemscontainer});let o=this.itemscontainer.querySelectorAll(t);o.length===0?console.error("No items in filteredoverview? selector = "):this.debug&&console.log("[ut-filters] Filteredoverview with "+o.length+" items"),this.setFeedback(o.length,o.length,o.length),this.items=[];
11for(let n of o)this.items.push({node:n,filterdata:n.dataset.filterdata?JSON.parse(n.dataset.filterdata):null,title:n.querySelector("[data-autocompletesource-title]"),description:n.querySelector("[data-autocompletesource-description]")});this._initClientsideAutosuggest(),this.isFilterActive()&&this.doFilter()}_initClientsideAutosuggest(){let e=this.form.querySelector("input[data-autocomplete-clientside]");e&&(this._initClientsideSearchIndex(),Ze({input:e,className:"ut-autocomplete",preventSubmit:1,fetch:async(t,o)=>{let n=this.searchIndex.suggest(t).slice(0,10);o(n.map(s=>({label:s,value:s})))},onSelect:t=>{e.value=t.value,this.doFilter()}}))}_initClientsideSearchIndex(){this.searchIndex.searchFields=["title","description"],this.searchIndex.completeSuggestFields=["title"];for(let e of this.items)this.searchIndex.indexItem({node:e.node,title:e.title?.textContent??"",description:e.description?.textContent??"",titleNode:e.title,descriptionNode:e.description})}isMatch(e){if(this.searchIndexMatch&&!this.searchIndexMatch.items.filter(o=>o.node===e)[0])return!1;for(let t of Object.keys(this.filters))if(e.hasAttribute(`data-filter-${t}`)){let o=this.filters[t];if(e.getAttribute(`data-filter-${t}-matchtype`)==="partialtext"){if(e.getAttribute(`data-filter-${t}`).includes(o))return!0;continue}let s=e.getAttribute(`data-filter-${t}`).split(" ");if(Array.isArray(o)){if(!s.some(r=>o.includes(r)))return!1}else if(!s.includes(o))return!1}return!0}runFilterByDataTags(){this.debug&&console.log("[ut-filters] runFilterByDataTags",this.filters),this.searchIndex&&(this.filters.query?this.searchIndexMatch=this.searchIndex.search(this.filters.query):this.searchIndexMatch=null),this.items.forEach(t=>t.node.hidden=!this.isMatch(t.node));let e=this.items.filter(t=>!t.node.hidden).length;this.setFeedback(e,e,this.items.length)}showResults(){this.debug&&console.log("[ut-filters] showResults",this.filters);let e=0;for(let t=0;t<this.items.length;++t){let o=this.items[t].node,n=this.items[t].filterdata,s=!1;for(let l of Object.keys(this.filters)){if(l==="status"){let c=this.filters[l];if(c.indexOf("ongoing")>-1&&n.graduationyear===0)continue;if(c.indexOf("graduated")>-1){if(this.form.graduationyear.value===0){if(n.graduationyear>0)continue}else if(this.form.graduationyear.value===n.graduationyear)continue}s=!0;continue}else{if(l==="graduationyear")continue;if(l==="words"){this.debug&&console.log("[ut-filters] Is",o.dataset.id,"IN",this.rpccache.ids),this.rpccache&&this.rpccache.ids.indexOf(o.dataset.id)===-1&&(s=!0);continue}else if(l==="query"){if(!("searchtext"in n)){console.error("searchtext field missing in item's filterdata.");continue}this.debug&&console.log("[ut-filters] Got",n.searchtext,`
12`,"Looking for",this.filters.query.toLowerCase());let c=this.filters.query.toLowerCase().split(" "),h=!0;for(let m of c)if(n.searchtext.indexOf(m)===-1){h=!1;break}h||(s=!0);continue}}if(!(l in n)){this.debug&&console.log("Cannot find search key '"+l+"'");continue}let a=n[l],d=this.filters[l];if(this.debug&&console.log("[ut-filters] Looking for",d,"in",a),Array.isArray(d)&&Array.isArray(a))for(let c=0;c<d.length;++c){let h=!1;if(a.indexOf(this.filters[l][c])>-1){h=!0;break}h||(s=!0)}else if(Array.isArray(a))a.indexOf(this.filters[l])===-1&&(s=!0);else{let c=typeof a=="number"?parseInt(this.filters[l]):this.filters[l];a!==c&&(s=!0)}}let r=!s;o.classList[r?"remove":"add"]("hidden"),r&&++e}this.setFeedback(e,e,this.items.length)}};N();var Nn=class{constructor(e,t){let o=ti(e,"data-masonry-options");this.initialized=!1,this.options={columns:3,columnwidth:0,gutter_x:10,gutter_y:10,margin_header_top:23,margin_header_bottom:23,debug:!1,items:null,ignoreclass:"hide",breakclass:"",righttoleft:!1},this.items=[],typeof e=="string"?this.container=document.getElementById(e):this.container=e,o&&this.setOptions(o),t&&this.setOptions(t),this.__height=0,this.__columnwidth=0,this.__visiblewidgetscount=0,this.__singlerow=!0,this.__columncontainers=[],this.__padding=0,this.__items_dirty=!0,this.__leftoffset=0,this.__containerwidth=0,this.ignore_resize_events=!1,this.initialized=!0}setItems(e){this.__items_dirty=!0;let t=[];for(let o of e){let n=o.getAttribute("data-cols");n=n?parseInt(n):1;let s={node:o,width:null,height:null,col:null,colwanted:null,colswanted:n,breakbefore:this.options.breakclass!=""&&o.classList.contains(this.options.breakclass)};t.push(s)}this.items=t}setOptions(e){"gutter"in e&&(e.gutter_x=e.gutter,e.gutter_y=e.gutter,delete e.gutter);let t=!1,o;"items"in e&&(t=!0,typeof e.items=="string"?(this.options.debug&&console.info("Finding widgets by query:",e.items,"in",this.container),o=this.container.querySelectorAll(e.items)):o=e.items,delete e.items),Object.assign(this.options,e),t&&this.setItems(o)}refresh(e){if(!this.initialized){this.options.debug&&console.info("Refresh called before initialization in ready!!");return}this.options.debug&&console.log("$wh.Masonry.refresh()");let t=this.container.clientWidth;if(t==0){console.warn("Cannot determine size of mansonry container (got 0).",this.container);return}this.ignore_resize_events=!0;let o=window.getComputedStyle(this.container),n=parseInt(o.paddingTop,10),s=parseInt(o.paddingBottom,10),r=parseInt(o.paddingLeft,10),l=parseInt(o.paddingRight,10);this.__padding={top:n,bottom:s,left:r,right:l},this.__leftoffset=r,this.__containerwidth=t-r-l,this.pvt_relayout(),this.ignore_resize_events=!1}refreshHeights(e){this.pvt_relayout(null,!0)}getLastRenderInfo(){return{container:this.container,visiblewidgetscount:this.__visiblewidgetscount,width:this.__containerwidth,height:this.__height,items:this.items,singlerow:this.__singlerow}}pvt_relayout(e){this.options.debug&&console.group("$wh.Masonry.pvt_relayout()");let t=0,o=this.options.columnwidth;if(o||(o=(this.__containerwidth-(this.options.columns-1)*this.options.gutter_x)/this.options.columns),this.options.debug&&console.info("Colwidth OLD:",this.__columnwidth,", NEW:",o),o==0){console.error("Cannot render, columnwidth is 0");return}if(isNaN(this.options.columns)){console.error("options.columns MUST be a number!");return}let n=this.options.columns,s=!0,r=[];for(var l=0;l<n;l++)r.push(0);let a=[];for(var l=0;l<n;l++)a.push([]);let d;if(e||(d=this.items),this.options.debug&&console.info("$wh.Masonry relayouting "+d.length+" items"),this.__items_dirty||this.__columnwidth!=o)for(let b of d){let f=b.colswanted>this.options.columns?this.options.columns:b.colswanted,g=o*f+(f-1)*this.options.gutter_x;b.node.style.position="absolute",b.node.style.width=Math.floor(g)+"px",b.node.style.height="",b.width=g,b.cols=f}for(let b of d)b.height=b.node.clientHeight;this.options.debug&&console.log("relayout mainloop");for(let b=0;b<d.length;b++){let f=d[b],g=f.node,_=f.height;if(this.options.debug&&console.log("#"+b,_+"px",g.className),_==0||this.options.ignoreclass!=""&&g.classList.contains(this.options.ignoreclass))continue;if(t++,f.breakbefore){let S=0;for(var c=0;c<n;++c){let P=a[c].length;if(P==0)continue;let z=a[c][P-1];z.top>m&&(S=z.top)}if(S>0){S+=160;for(var c=0;c<n;++c)r[c]<S&&(r[c]=S)}}this.options.debug&&console.info(r);var h=-1,m=0;if(f.colwanted!==null&&f.colwanted<n)h=f.colwanted,m=r[f.colwanted];else for(var l=0;l<=n-f.cols;++l){let P=this.options.righttoleft?n-f.cols-l:l,z=Math.max.apply(null,r.slice(P,P+f.cols));(h==-1||z<m)&&(h=P,m=z)}m>0&&(s=!1,g.classList.contains("timeline__header")?a[h].length>0&&a[h][a[h].length-1].breakbefore?m+=this.options.margin_header_top:m+=this.options.gutter_y:a[h].length>0&&a[h][a[h].length-1].breakbefore?m+=this.options.margin_header_bottom:m+=this.options.gutter_y);let y=m+_;for(var c=0;c<f.cols;++c)r[h+c]=y,a[h+c].push(f);f.col=h,f.left=this.__leftoffset+(h*o+h*this.options.gutter_x),f.top=m;let E={position:"absolute",left:f.left,top:f.top+this.__padding.top};this.options.debug&&console.log("Will be placed into col",h),g.style.position=E.position,g.style.left=E.left+"px",g.style.top=E.top+"px"}let u=Math.max.apply(null,r)+this.__padding.top+this.__padding.bottom;this.options.columnwidth&&(this.container.style.width=this.options.columnwidth*this.options.columns+(this.options.columns-1)*this.options.gutter_x+"px"),this.container.style.height=u+"px",this.options.debug&&(console.log(this.container,"has",t,"visible widgets"),console.groupEnd()),this.__itemdata=d,this.__columnwidth=o,this.__height=u,this.__visiblewidgetscount=t,this.__singlerow=s}};var Eo=class{constructor(e,t){this.options={translateAnchor:null,...t};for(let o of e){let n=o.getAttribute("href");if(n.indexOf("#")>=0&&(this.options.translateAnchor&&(n=this.options.translateAnchor(n)),n)){let s=document.getElementById(n.substr(n.indexOf("#")+1));s&&(o.addEventListener("click",r=>{r.preventDefault(),s.scrollIntoView({block:"start",behavior:"smooth"})}),s.setAttribute("data-scrollevent","0"))}}}};window.__timelines=[];var um=document.documentElement.classList.contains("utwente--ws2026")?-120:-60,ed=class extends To{constructor(e){super({...e,filterpagetype:"timeline"}),this.itemscontainer=document.querySelector(".timeline__items");let t=this.itemscontainer.querySelectorAll(".timeline__item");this.items=[];for(let o of t)this.items.push({node:o,data:JSON.parse(o.dataset.f
12ilterdata)});this.isFilterActive()&&this.doFilter()}showResults(){let e=0,t=[];for(let o of this.items){let n=!1;for(let r in this.filters){if(!(r in o.data)){this.debug_search&&console.log("Cannot find search key '"+r+"'");continue}let l=o.data[r],a=this.filters[r];if(this.debug_search&&console.log("Looking for",a,"in",l),Array.isArray(a)&&Array.isArray(l))for(let d=0;d<a.length;++d){let c=!1;if(l.indexOf(this.filters[r][d])>-1){c=!0;break}c||(n=!0)}else if(Array.isArray(l))l.indexOf(this.filters[r])===-1&&(n=!0);else{let d=typeof l=="number"?parseInt(this.filters[r]):this.filters[r];l!==d&&(n=!0)}}let s=!n;o.node.classList[s?"remove":"add"]("timeline__item--hide"),s&&(t.indexOf(o.data.year)===-1&&t.push(o.data.year),++e),this.debug_search&&console.groupEnd()}this.setFeedback(e);for(let o of window.__timelines)o.widgetnode.classList[e===0?"add":"remove"]("embeddedobject--timeline--noresults"),o.yearsinresults=t,o.refreshYearBookmarks(),o.refresh()}},td=class{constructor(e){window.__timelines.push(this),this.isFilterPage=e.classList.contains("timeline--timelinepage"),this.widgetnode=e,this.masonrynode=e.querySelector(".timeline__items"),this.masonry=null,this.preprocessItems(),window.addEventListener("load",t=>this.refresh(t)),window.addEventListener("resize",t=>this.refresh(t)),window.addEventListener("scroll",t=>this.onScroll()),this.refresh(),T(".timeline--timelinepage")&&(this.createYearBookmarks(),this.refreshYearBookmarks()),e.addEventListener("click",t=>this.doCheckForVideoTrigger(t)),this.scroller=new Eo([],{sethash:!1,offsety:um})}onScroll(){this.refreshYearBookmarks()}preprocessItems(){let e=this.widgetnode.querySelectorAll(".timeline__item,.timeline__header,.timeline__break");this.items=[],this.years=[],this.yearsinresults=[];for(let t of e)if(!t.classList.contains("timeline__break"))if(t.classList.contains("timeline__header")){let o=parseInt(t.dataset.year);this.years.push({bookmarknode:null,headernode:t,year:o}),this.yearsinresults.push(o)}else this.items.push({node:t,data:JSON.parse(t.dataset.filterdata)});for(let t of e){let o=t.nextElementSibling;o&&o.classList.contains("timeline__item__label")&&(t.labelnode=o)}}onYearBookmarkClick(e,t){e.preventDefault(),e.stopPropagation();for(let o of this.items)if(!(o.data.year>t)&&!o.node.classList.contains("timeline__item--hide")){if("scrollBehavior"in document.documentElement.style){let n=document.documentElement.getBoundingClientRect(),r=o.node.getBoundingClientRect().top-n.top+um;window.scrollTo({behavior:"smooth",top:r})}else this.scroller.scrollTo(o.node,e);return}}refresh(e){let t={},n=window.getComputedStyle(this.masonrynode,"::before").content;if(n!==""&&n.substring(0,1)==='"'&&(n=n.substring(1,n.length-1)),n!=="none"){let s=n.split(":");t={columns:parseInt(s[0]),gutter_y:parseInt(s[1]),margin_header_top:parseInt(s[2]),margin_header_bottom:parseInt(s[3])},s.length>3?t.columns>1?(t.columnwidth=this.isFilterPage?this.masonrynode.clientWidth*.5-55:this.masonrynode.clientWidth*.42,t.gutter_x=this.masonrynode.clientWidth-t.columnwidth*t.columns/(t.columns-1)):(t.columnwidth=this.masonrynode.clientWidth,t.gutter_x=0):t.columnwidth=null}else t={columns:2,gutter_y:50,gutter_y_header:35,columnwidth:null};this.masonry?(this.masonry.setOptions(t),this.masonry.refresh()):(this.masonry=new Nn(this.masonrynode,{...t,items:".timeline__item,.timeline__header",ignoreclass:"timeline__item--hide",breakclass:"timeline__header"}),this.masonry.refresh()),this.repositionLabels()}repositionLabels(){let e=this.masonry.getLastRenderInfo();for(let t=0;t<e.items.length;t++){let o=e.items[t];o.node.classList[o.col===0?"add":"remove"]("timeline__content--leftside"),o.node.classList[o.col!==0?"add":"remove"]("timeline__content--rightside"),o.node.labelnode&&(o.node.labelnode.classList[o.col===0?"add":"remove"]("timeline__item__label--leftside"),o.node.labelnode.classList[o.col!==0?"add":"remove"]("timeline__item__label--rightside"),o.node.labelnode.style.top=o.top+"px")}}determineVisibleYears(){let e=document.documentElement.getBoundingClientRect(),t=[];for(let o of this.items){if(t.indexOf(o.data.year)>-1||o.node.classList.contains("timeline__item--hide"))continue;let n=o.node.getBoundingClientRect();n.bottom>0&&n.top<e.height&&t.push(o.data.year)}return t}createYearBookmarks(){let e=document.createElement("div");e.className="timeline__bookmarks",this.bookmarkcontainer=e;let t=document.createElement("div");t.className="timeline__bookmarks__inner",this.bookmarkcontainer2=t,this.bookmarkcontainer.appendChild(t),this.widgetnode.insertBefore(e,this.widgetnode.firstChild);for(let o of this.years){let n=document.createElement("div");n.className="timeline__bookmarks__item",n.appendChild(document.createTextNode(o.year)),n.addEventListener("click",
12s=>this.onYearBookmarkClick(s,o.year)),t.appendChild(n),o.bookmarknode=n}}refreshYearBookmarks(){if(!this.bookmarkcontainer)return;let e=this.determineVisibleYears();for(let t of this.years)if(this.yearsinresults.indexOf(t.year)===-1)t.bookmarknode.classList.add("timeline__bookmarks__item--hide"),t.bookmarknode.classList.remove("timeline__bookmarks__item--inview"),t.headernode.classList.add("timeline__item--hide");else{t.bookmarknode.classList.remove("timeline__bookmarks__item--hide"),t.headernode.classList.remove("timeline__item--hide");let o=e.indexOf(t.year)>-1;t.bookmarknode.classList[o?"add":"remove"]("timeline__bookmarks__item--inview")}}doCheckForVideoTrigger(e){let t=e.target.closest(".timeline__item");if(e.target.closest(".generic_videocontainer__closevideo")){e.preventDefault(),e.stopPropagation(),t._wsVideoPlayer&&(t._wsVideoPlayer.pause(),t.classList.remove("genericvideoplayeractive"));return}if(!e.target.closest(".timeline__item__playbutton"))return;let o=t.querySelector("[data-video]");o&&(e.preventDefault(),e.stopPropagation(),vi(o)?(t.classList.add("genericvideoplayeractive"),t._wsVideoPlayer.play()):Ht(o).then(n=>{t.classList.add("genericvideoplayeractive"),t._wsVideoPlayer=n}))}};x(".embeddedobject--timeline",i=>new td(i));K(()=>{document.documentElement.classList.contains("page--timeline")&&(window.filteredoverview=new ed({itemsselector:".timeline__item"}))});N();window.__slideshows_banner=[];var id=class{constructor(e){this.widgetnode=e,this.slides=e.querySelectorAll(".carrousel__cell"),!(this.slides.length<2)&&(window.__slideshows_banner.push(this),this.slideshow=new Ii(e,{jumpbuttons:".banner__slidedot",jumpbutton_selectedclass:"banner--activedot",autoplay:!0,eventPassthrough:!0,autoplay_freezeslideduration:5e3,transitionDuration:500,updateviewportheight:!0}),this.refresh())}refresh(){for(let t of this.slides)t.style.minHeight="";let e=0;for(let t of this.slides){let o=t.offsetHeight;o>e&&(e=o)}for(let t of this.slides)t.style.minHeight=e+"px";this.widgetnode.querySelector(".banner__viewport").style.height=e+"px"}};function mm(){for(let i of window.__slideshows_banner)i.refresh()}x(".embeddedobject--banner",i=>new id(i));window.addEventListener("resize",mm);window.addEventListener("load",mm);N();function Ow(i){let e=!1;if(document.documentElement.classList.contains("wh-widgetpreview")){e=!0;let t=Math.round(1*i.getAttribute("data-percentage")),o=2*Math.PI*68,n=i.querySelector(".progresscircle__fill"),s=i.querySelector(".percentage");n.style.strokeDashoffset=Math.round(o-o*.01*t+6),s.innerHTML=Math.round(t)}i.addEventListener("wh:visibilitychange",function(t){if(e||!t.detail.visible)return;let o=Math.round(1*i.getAttribute("data-percentage")),n=2*Math.PI*68,s=i.querySelector(".progresscircle__fill"),l=Math.round(1500/(2*o)),a=0,d=i.querySelector(".percentage"),c=setTimeout(h,l);function h(){a+=.5,s.style.strokeDashoffset=Math.round(n-n*.01*a+6),d.innerHTML=Math.round(a),a<o&&setTimeout(h,l)}e=!0})}function Uw(i){let e=!1;if(document.documentElement.classList.contains("wh-widgetpreview")){e=!0;let t=Math.round(1*i.getAttribute("data-percentage"));i.querySelector(".progressbar__progress").style.width=t+"%";let o=i.querySelector(".percentage");o.innerHTML=t}i.addEventListener("wh:visibilitychange",function(t){if(e||!t.detail.visible)return;let o=Math.round(1*i.getAttribute("data-percentage"));i.querySelector(".progressbar__progress").style.width=o+"%";let s=Math.round(2e3/o),r=0,l=i.querySelector(".percentage"),a=setTimeout(d,s);function d(){r++,l.innerHTML=r,r<o&&setTimeout(d,s)}e=!0})}function Ww(i){for(let t of i.querySelectorAll(".path, .label"))t.addEventListener("mouseover",function(){if(t.getAttribute("class").indexOf("hover")!=-1)return;let o=1*t.getAttribute("data-index");for(let n of i.querySelectorAll(".path, .label"))1*n.getAttribute("data-index")==o?n.setAttribute("class",n.nodeName=="path"?"path hover":"label hover"):n.setAttribute("class",n.nodeName=="path"?"path":"label")}),t.addEventListener("mouseout",function(){if(t.getAttribute("class").indexOf("hover")==-1)return;let o=t.getAttribute("data-index");for(let n of i.querySelectorAll(".path[data-index='"+o+"'], .label[data-index='"+o+"']"))n.setAttribute("class",n.nodeName=="path"?"path":"label")});let e=!1;i.addEventListener("wh:visibilitychange",function(t){if(e||!t.detail.visible)return;e=!0;let o=500,n=i.querySelectorAll(".label");for(let s of n){let r=1*s.getAttribute("data-index");setTimeout(function(){r>0&&(i.querySelector(".path[data-index='"+(r-1)+"']").setAttribute("class","path"),i.querySelector(".label[data-index='"+(r-1)+"']").classList.remove("hover")),s.classList.add("hover"),i.querySelector(".path[data-index='"+r+"']").setAttribute("class","path hover"),i.clientWidth,r==n.length-1&&setTimeout(function(){i.querySelector(".path[data-index='"+r+"']").setAttribute("class","path"),i.querySelector(".label[data-index='"+r+"']").classList.remove("hover")},o)}
12,o*(r+1)-o*.5)}})}function Vw(i,e){let t=JSON.parse(i.getAttribute("data-chart"));if(!t)return;let o=document.documentElement.classList.contains("wh-widgetpreview"),n=Bw(t.color),s=t.values[0].col,r=s.length-1,l=t.values.length-1;if(l<=0)return;let a=i.querySelector(".chart__area"),d=i.querySelector(".chart__legend"),c={x:545,y:200},h=c.x/r;for(let S=0;S<s.length;S++){let P=document.createElement("span");P.innerHTML=s[S],S>0?(P.className="vlabel",P.setAttribute("style","left:"+(S-1)*h+"px;width:"+h+"px;")):s[S]!=""&&(P.className="htitle"),a.appendChild(P)}let m=0,u=0;for(let S=1;S<t.values.length;S++)for(let P=1;P<t.values[S].col.length;P++)m<1*t.values[S].col[P]&&(m=1*t.values[S].col[P]),u>1*t.values[S].col[P]&&(u=1*t.values[S].col[P]);u<0&&i.classList.add("chart--negativevalues");let b=5,f=(m-u)/b,g=Math.floor(Math.log(f)/Math.log(10));f=Math.pow(10,g),m=f*Math.ceil(m/f),u=f*Math.floor(u/f);let _=(m-u)/b,y=0,E;for(let S=0;S<=b;S++){let P=m-_*S;E=!E&&P==0;let z=document.createElement("div");z.className="hline"+(P==0?" hline--zero":""),z.setAttribute("style","top:"+100/b*S+"%;"),P=parseFloat(P.toFixed(g+1));let $;P!=0&&($=document.createElement("span"),$.className="label",$.innerHTML=P,z.appendChild($)),a.appendChild(z),$&&S==0&&(y=$.clientWidth+5)}if(!E){let S=document.createElement("div");S.className="hline hline--zero",S.setAttribute("style","top:"+m*100/(m-u)+"%;"),a.appendChild(S)}if(t.vtitle){let S=document.createElement("span");S.className="vtitle",S.innerHTML=t.vtitle,S.setAttribute("style","margin-left:-"+y+"px;"),a.appendChild(S)}if(i.classList.contains("chart--linechart")){let S=document.createElementNS("http://www.w3.org/2000/svg","svg");S.setAttribute("width","100%"),S.setAttribute("height","100%");let P=c.y/(m-u);for(let z=1;z<t.values.length;z++){let $=z*(1/l),ae="",Q=document.createElementNS("http://www.w3.org/2000/svg","path");for(let le=0;le<t.values[z].col.length;le++){let ge=t.values[z].col[le];if(le>0){let de=h*(le-1)+h/2,He=c.y-P*(1*ge-u);ae+=(le==1?"M":" L")+mr(de,2)+" "+mr(He,2),le==t.values[z].col.length-1&&(Q.setAttribute("d",ae),Q.setAttribute("stroke",Hn(n.r,n.g,n.b,$)),Q.setAttribute("stroke-width",2),Q.setAttribute("fill","none"),Q.setAttribute("data-id","chart"+e+"_"+z),S.appendChild(Q),o||(Q.addEventListener("mouseover",function(){let ne=this.getAttribute("data-id");if(ne==i.getAttribute("data-hover"))return;this.setAttribute("stroke-width",3),i.setAttribute("data-hover",ne);let Me=i.querySelector(".chart__legend > div:nth-child("+z+")");Me&&Me.classList.add("label--hover")}),Q.addEventListener("mouseout",function(){this.setAttribute("stroke-width",2);let ne=i.querySelector(".chart__legend > div:nth-child("+z+")");ne&&ne.classList.remove("label--hover"),this.getAttribute("data-id")==i.getAttribute("data-hover")&&i.setAttribute("data-hover","")})));let Le=document.createElement("div");if(Le.className="point",Le.setAttribute("style","left:"+de+"px;top:"+He+"px;border-color:"+Hn(n.r,n.g,n.b,$)+";"),a.appendChild(Le),!o){let ne=document.createElement("span");ne.className="value",ne.innerHTML=mr(1*ge,t.decimals),Le.appendChild(ne),ne.setAttribute("style","margin-left:"+-.5*ne.clientWidth+"px;background-color:"+t.color+";border-color:"+t.color+";"),Le.addEventListener("mouseover",function(){let Me=Q.getAttribute("data-id");if(Me==i.getAttribute("data-hover"))return;Q.setAttribute("stroke-width",3),i.setAttribute("data-hover",Me);let Oe=i.querySelector(".chart__legend > div:nth-child("+z+")");Oe&&Oe.classList.add("label--hover")}),Le.addEventListener("mouseout",function(){Q.setAttribute("stroke-width",2);let Me=i.querySelector(".chart__legend > div:nth-child("+z+")");Me&&Me.classList.remove("label--hover"),Q.getAttribute("data-id")==i.getAttribute("data-hover")&&i.setAttribute("data-hover","")})}}else{let de=document.createElement("div");de.setAttribute("data-id","chart"+e+"_"+z),de.className="label",de.innerHTML=ge;let He=document.createElement("span");He.className="bullet",He.setAttribute("style","background-color:"+Hn(n.r,n.g,n.b,$)+";"),de.appendChild(He),d.appendChild(de),o||(de.addEventListener("mouseover",function(){let Le=this.getAttribute("data-id");if(Le==i.getAttribute("data-hover"))return;this.classList.add("label--hover"),i.setAttribute("data-hover",Le);let ne=i.querySelector("svg > path:nth-child("+z+")");ne&&ne.setAttribute("stroke-width",3)}),de.addEventListener("mouseout",function(){this.classList.remove("label--hover");let Le=i.querySelector("svg > path:nth-child("+z+")");Le&&Le.setAttribute("stroke-width",2),this.getAttribute("data-id")==i.getAttribute("data-hover")&&i.setAttribute("data-hover","")}))}}}a.appendChild(S)}else{let S=-.5*(12*l+5*(l-1)),P=[];for(let $=1;$<t.values.length;$++){let ae=$*(1/l);for(let Q=0;Q<t.values[$].col.length;Q++){let le=t.values[$].col[Q];if(Q>0){let ge=Math.abs(100*le/(m-u)),de=(Q-1)*h+h/2,He=o?ge:0,Le="left:"+de+"px;height:"+He+"%;";Le+="margin-left:"+(S+($-1)*17)+"px;",Le+="background-color:"+Hn(n.r,n.g,n.b,ae)+";";let ne=document.createElement("div");if(ne.setAttribute("data-id","chart"+e+"_"+$),ne.className="bar",ne.setAttribute("style",Le),u<0&&(le<0?(ne.style.bottom="auto",ne.style.top=100*m/(m-u)+"%"):ne.style.bottom=-100*u/(m-u)+"%"),a.appendChild(ne),P.push({node:ne,percentage:ge,value:le}),!o){let Me=document.createElement("span");Me.className="value",Me.innerHTML=mr(1*le,t.decimals),Me.setAttribute("style","background-color:"+t.color+";border-color:"+t.color+";"),ne.appendChild(Me),Me.style.marginLeft=-.5*Me.clientWidth+"px",ne.addEventListener("mouseover",function(){let Oe=this.getAttribute("data-id");if(Oe==i.getAttribute("data-hover"))return;this.setAttribute("stroke-width",3),i.setAttribute("data-hover",Oe);let ki=i.querySelector(".chart__legend > div:nth-child("+$+")");ki&&ki.classList.add("label--hover")}),ne.addEventListener("mouseout",function(){this.setAttribute("stroke-width",2);let Oe=i.querySelector(".chart__legend > div:nth-child("+$+")");Oe&&Oe.classList.remove("label--hover"),this.getAttribute("data-id")==i.getAttribute("data-hover")&&i.setAttribute("data-hover","")})}}else{let ge=document.createElement("div");ge.setAttribute("data-id","chart"+e+"_"+$),ge.className="label",ge.innerHTML=le;
12let de=document.createElement("span");de.className="bullet",de.setAttribute("style","background-color:"+Hn(n.r,n.g,n.b,ae)+";"),ge.appendChild(de),d.appendChild(ge)}}}let z=!1;i.addEventListener("wh:visibilitychange",function($){if(!(z||!$.detail.visible)){for(let ae=0;ae<P.length;ae++)P[ae].node.style.height=P[ae].percentage+"%";z=!0}})}}function mr(i,e){if(e>0){let t=Math.pow(10,e+4),o=Math.pow(10,e);return Math.round(Math.round(i*t)/1e4)/o}if(e<0){let t=Math.pow(10,Math.abs(e)),o=Math.pow(10,Math.abs(e));return Math.round(Math.round(i/t)*o)}return Math.round(i)}function Bw(i){return i=i.toUpperCase().replace(/[^0-9A-F]/g,""),{r:parseInt(i.substr(0,2),16),g:parseInt(i.substr(2,2),16),b:parseInt(i.substr(4,2),16)}}function Hn(i,e,t,o){let n=1-o;return i=Math.round((o*(i/255)+n)*255),e=Math.round((o*(e/255)+n)*255),t=Math.round((o*(t/255)+n)*255),"#"+(i<16?"0":"")+i.toString(16)+(e<16?"0":"")+e.toString(16)+(t<16?"0":"")+t.toString(16)}x(".segmentedcircle",Ww);x(".progressbar",Uw);x(".progresscircle",Ow);window.addEventListener("load",()=>{x(".chart",Vw,{waitEmbedded:!0}),F(window,"scroll",{bubbles:!0,cancelable:!1})});M();window.widgets_lpct=[];var $w=-60,od=class{container;pointer;categorylist;contentpanel;constructor(e){window.widgets_lpct.push(this),this.container=e,this.pointer=L(this.container,".widget-lpct__pointer"),this.categorylist=L(this.container,".widget-lpct__categorylist"),this.contentpanel=L(this.container,".widget-lpct__categoriespanel"),this.container.addEventListener("click",t=>this.doCheckForTabClick(t)),this.refresh(),L(this.pointer,"path").style.display=""}doCheckForTabClick(e){let t=e.target.closest(".widget-lpct__categorylist__item");if(!t)return;let o=w(this.container,".widget-lpct__categorylist__item"),n=w(this.container,".widget-lpct__category");for(let d of o)d.setAttribute("aria-expanded","false"),d.classList.remove("widget-lpct__categorylist__item--active"),d.classList.remove("widget-lpct__categorylist__item--activeinitial");for(let d of n)d.classList.remove("widget-lpct__category--active"),d.classList.remove("widget-lpct__category--activeinitial"),d.hidden=!0;t.setAttribute("aria-expanded","true"),t.classList.add("widget-lpct__categorylist__item--active");let s=Array.from(o).indexOf(t);n[s].classList.add("widget-lpct__category--active"),n[s].hidden=!1;let r=n[s].getBoundingClientRect(),l=this.categorylist.getBoundingClientRect(),a=document.documentElement.getBoundingClientRect();if(l.top<0||r.top>a.height*.75){let d=l.top-a.top+$w;window.scrollTo({top:d,behavior:"smooth"})}gm(this.pointer,t,this.contentpanel)}refresh(){let e=T(this.container,".widget-lpct__categorylist__item--active");e||(e=T(this.container,".widget-lpct__categorylist__item--activeinitial")),e&&gm(this.pointer,e,this.contentpanel)}};function gm(i,e,t){let o=i.getBoundingClientRect(),n=e.getBoundingClientRect(),s=t.getBoundingClientRect(),r=n.top-o.top+n.height/2,l=s.top-o.top+s.height/2,a=o.width,d=l-r,c=d<0?-d:d,h=15,m=15;if(h*2>a&&(h=h/2),m*2>c){L(i,"path").setAttribute("d",`M0,${r} ${a},${r}`);return}let u=0,b=a/2-h,f=a/2,g=a/2+h,_=a,y=r,E=r+(d<0?-m:m),S=l-(d<0?-m:m),P=l,z=`M${u} ${y}
13              L${b} ${y}
14              C${f},${y} ${f},${E} ${f},${E}
15              L${f} ${S}
16              C${f},${P} ${g},${P} ${g},${P}
17              L${_} ${P}
18             `;L(i,"path").setAttribute("d",z)}function nd(){for(let i of window.widgets_lpct)i.refresh()}window.refreshit=nd;x(".widget-lpct",i=>new od(i));window.addEventListener("load",()=>nd());window.addEventListener("ws:resize",()=>nd());M();var sd=class{node;listContainer;options;constructor(e){this.node=e,this.listContainer=L(this.node,".widget-newsevents__list"),this.options=JSON.parse(this.node.dataset.options),this.getItems()}async getItems(){let e;try{e=await fetch(this.options.publocfile,{cache:"reload"})}catch{}if(e&&e.status===200){let t=await e.json(),o=t&&t["p"+this.options.publoc]?t["p"+this.options.publoc].items:[];if(!o.length){this.listContainer.remove(),this.node.classList.add("noresults");return}this.node.dataset.itemcount=String(o.length),this.node.classList.contains("widget-newsevents--event")&&o.length<3&&this.node.classList.add("widget-newsevents--contentwidth"),this.options.type==="event"?this.listContainer.append(...this.renderEvent(o)):this.listContainer.append(...this.renderNewsStories(o))}}renderEvent(e){return e.map(t=>p("li",{class:"widget-newsevents__item"},p("a",{class:"widget-newsevents__item__link",href:t.url,target:"_blank",rel:"noreferrer"},p("div",{class:"widget-newsevents__item__image"},t.embedphotolink?p("img",{src:t.embedphotolink,srcset:t.embedphotolink_2x,alt:t.photoalt,loading:"lazy"}):null,t.eventdate.startdate?p("div",{class:"widget-newsevents__item__eventdate"},p("div",{class:"widget-newsevents__item__eventdate__start","data-day":t.eventdate.startdate.day,"data-month":t.eventdate.startdate.month}),t.eventdate.enddate?p("div",{class:"widget-newsevents__item__eventdate__end","data-day":t.eventdate.enddate.day,"data-month":t.eventdate.enddate.month}):null):null),p("div",{class:"widget-newsevents__item__content"},t.category?p("div",{class:"widget-newsevents__item__category"},t.icon?p("i",{class:t.icon,"aria-hidden":"true"}):null,p("span",null,t.category)):null,p("div",{class:"widget-newsevents__item__title"},t.title),t.location?p("div",{class:"widget-newsevents__item__location"},t.location):null))))}renderNewsStories(e){return e.map(t=>p("li",{class:"widget-newsevents__item"},p("a",{class:"widget-newsevents__item__link",href:t.url,target:"_blank",rel:"noreferrer"},p("div",{class:"widget-newsevents__item__image"},t.embedphotolink?p("img",{src:t.embedphotolink,srcset:t.embedphotolink_2x,alt:t.photoalt,loading:"lazy"}):null),p("div",{class:"widget-newsevents__item__content"},p("div",{class:"widget-newsevents__item__title"},t.title),p("div",{class:"widget-newsevents__item__descriptionwrapper"},p("div",{class:"widget-newsevents__item__description"},t.articleintro)),t.tags.length?p("div",{class:"widget-newsevents__item__tags"},t.tags.map(o=>p("span",{class:o.class,style:{backgroundColor:o.bgcolor},onClick:n=>this.onTagClick(n,o.data.link)},o.tag))):null))))}onTagClick(e,t){e.preventDefault(),window.open(t,"_blank","noopener")}};x(".widget-newsevents",i=>new sd(i));M();M();M();var gr=class{node;options;swipeinfo;initdone;constructor(e,t){this.node=e,this.options=t,this.swipeinfo=null,this.initdone=!1,e&&(this.options.enablemouseswipe===void 0&&(this.options.enablemouseswipe=!0),window.addEventListener("load",o=>this.init()),this.init())}init(){this.initdone||(this.initdone=!0,this.options.enablemouseswipe&&(this.node.addEventListener("mousedown",e=>this.onTouchStart(e)),this.node.addEventListener("mousemove",e=>this.onTouchMove(e)),this.node.addEventListener("mouseup",e=>this.onTouchEnd(e))),this.touchEnabled()&&(this.node.addEventListener("touchstart",e=>this.onTouchStart(e)),this.node.addEventListener("touchmove",e=>this.onTouchMove(e)),this.node.addEventListener("touchend",e=>this.onTouchEnd(e))))}touchEnabled(){return"ontouchstart"in this.node||"createTouch"in this.node||"TouchEvent"in this.node||navigator.maxTouchPoints>0}onTouchStart(e){let t=typeof e.pageX<"u"?e.pageX:e.touches[0].pageX,o=typeof e<"u"?e.pageY:e.touches[0].pageY;this.swipeinfo={starttime:new Date().getTime(),endtime:-1,start:{x:t,y:o},end:{x:t,y:o},speed:{x:0,y:0},distance:{x:0,y:0},target:e.target,direction:"",duration:0}}onTouchMove(e){if(!this.swipeinfo)return;let t=typeof e.pageX<"u"?e.pageX:e.touches[0].pageX,o=typeof e.pageY<"u"?e.pageY:e.touches[0].pageY;this.swipeinfo.end={x:t,y:o}}onTouchEnd(e){if(!this.swipeinfo)return;let t=this.swipeinfo.end.x-this.swipeinfo.start.x,o=this.swipeinfo.end.y-this.swipeinfo.start.y;this.swipeinfo.endtime=new Date().getTime(),this.swipeinfo.duration=this.swipeinfo.endtime-this.swipeinfo.starttime,this.swipeinfo.distance.x=Math.abs(t),this.swipeinfo.distance.y=Math.abs(o),this.swipeinfo.speed.x=this.swipeinfo.distance.x/this.swipeinfo.duration,this.swipeinfo.speed.y=this.swipeinfo.distance.y/this.swipeinfo.duration,this.options.threshold_speed||(this.options.threshold_speed=.3),this.options.threshold_distance||(this.options.threshold_distance=15),this.swipeinfo.distance.x>
18this.options.threshold_distance&&this.swipeinfo.speed.x>this.options.threshold_speed&&(this.swipeinfo.direction+=t>0?"e":"w"),this.swipeinfo.distance.y>this.options.threshold_distance&&this.swipeinfo.speed.y>this.options.threshold_speed&&(this.swipeinfo.direction+=o>0?"s":"n"),this.swipeinfo.direction!==""&&F(this.node,"wh:swipe",{bubbles:!0,cancelable:!1,detail:this.swipeinfo}),this.swipeinfo=null}};te();var fm=500,fr=class{data;overlay=null;constructor(e){this.data=e}onKeyUp(e){e.code==="ArrowLeft"?this.previousImage():e.code==="ArrowRight"&&this.nextImage()}showOverlay(e){!e||e<0?e=0:e>=this.data.items.length&&(e=this.data.items.length-1);let t=this.data.items.length;this.overlay=p("div",{tabindex:"0",class:"photosoverlay"},this.data.title?p("div",{class:"photosoverlay__title"},this.data.title):null,p("ul",{class:"photosoverlay__list"},this.data.items.map((o,n)=>{let s=p("li",{class:"photosoverlay__item"},p("div",{class:"photosoverlay__item__header"},o.title?p("div",{class:"photosoverlay__item__title",id:"photooverlay-caption-"+n},o.title):null,o.filename&&o.link?p("a",{href:o.link,class:"photosoverlay__item__download UT-icon-UT_icon_17_download-24px",download:o.filename,"aria-label":"Download "+o.filename}):null),o.video?this.renderVideo(o,n===e):this.renderPicture(o),p("div",{class:"photosoverlay__item__footer"},p("div",{class:"photosoverlay__item__counter"},n+1+"/"+t)));return o.title&&s.setAttribute("aria-labelledby","photooverlay-caption-"+n),s.setAttribute("role",o.title?"figure":"presentation"),s.classList.toggle("photosoverlay__item--selected",n===e),s})),p("button",{type:"button",tabindex:"0",class:"photosoverlay__previous",onClick:()=>this.previousImage()},p("i",{class:"UT-icon-UT_icon_43_arrow-left-16px","aria-label":v("utwente_base:frontend.ws2026.js.common.previous")})),p("button",{type:"button",tabindex:"0",class:"photosoverlay__next",onClick:()=>this.nextImage()},p("i",{class:"UT-icon-UT_icon_44_arrow-right-16px","aria-label":v("utwente_base:frontend.ws2026.js.common.next")}))),new gr(this.overlay,{}),this.overlay.addEventListener("wh:swipe",o=>{let n=o.detail;n.direction==="w"?this.nextImage():n.direction==="e"&&this.previousImage()}),new wi(this.overlay,"photooverlay",{classname:"utdialog2-dialog--fullsize"}).showModal(),this.overlay.focus(),this.overlay.addEventListener("keyup",o=>this.onKeyUp(o))}renderVideo(e,t){if(!e.video)return null;let o=p("video",{class:"photosoverlay__item__video",controls:!0,preload:t?"auto":"none",defaultMuted:"true"},p("source",{src:e.video.link,type:e.video.mediatype}),"Your browser does not support the video tag.");return o.addEventListener("loadeddata",()=>{let n=o;n.width=n.videoWidth,n.height=n.videoHeight,t&&n.play().catch(()=>{})}),p("div",{class:"photosoverlay__item__image-wrapper"},o)}renderPicture(e){if(!e.scaledImages.length)return null;let t=e.scaledImages.length;return p("picture",{class:"photosoverlay__item__image-wrapper"},e.scaledImages.map((o,n)=>n===t-1?p("img",{src:e.scaledImages[n].link,class:"photosoverlay__item__image",width:e.scaledImages[n].width,style:"background-color:"+e.scaledImages[n].dominantColor,height:e.scaledImages[n].height,loading:"lazy",alt:e.title}):p("source",{key:n,srcset:o.link,media:"(min-width:"+o.mediaMinSize+"px)"})))}previousImage(){let e=T(this.overlay,".photosoverlay__item--selected");if(!e)return;let t=T(e,"video");t&&t.pause();let o=e.previousElementSibling;if(o||(o=T(this.overlay,".photosoverlay__item:last-child")),o){e.classList.add("photosoverlay__item--hiding"),e.classList.remove("photosoverlay__item--selected"),o.classList.add("photosoverlay__item--selected"),setTimeout(()=>{e.classList.remove("photosoverlay__item--hiding")},fm);let n=T(o,"video");n&&n.play().catch(()=>{})}}nextImage(){let e=T(this.overlay,".photosoverlay__item--selected");if(!e)return;let t=T(e,"video");t&&t.pause();let o=e.nextElementSibling;if(o||(o=T(this.overlay,".photosoverlay__item:first-child")),o){e.classList.add("photosoverlay__item--hiding"),e.classList.remove("photosoverlay__item--selected"),o.classList.add("photosoverlay__item--selected"),setTimeout(()=>{e.classList.remove("photosoverlay__item--hiding")},fm);let n=T(o,"video");n&&n.play().catch(()=>{})}}};var rd=class{node;items=[];timer;overlay;constructor(e){this.node=e,this.node.addEventListener("click",t=>this.onClick(t)),this.items=w(e,".widget-photoalbum__item"),window.addEventListener("resize",()=>this.onResize()),window.addEventListener("load",()=>this.onResize()),this.onResize()}onResize(){clearTimeout(this.timer),this.timer=setTimeout(()=>this.doJustify(),150)}onClick(e){let t=e.target.closest(".widget-photoalbum__item");if(t){let o=this.node.getAttribute("data-images");if(o){this.overlay||(this.overlay=new fr(JSON.parse(o)));let n=this.items.findIndex(s=>s===t);this.overlay.showOverlay(n)}}}doJustify(){this.node.classList.remove("widget-photoalbum--justified");let e=[],t=this.node.clientWidth,o=0;
18e.push([]),this.items.forEach(n=>{if(n.style.maxWidth="",o<t){let s=n.clientWidth;s&&(n.dataset.col=o===0?"first":"",e[e.length-1]?.push({item:n,w:s})),o+=s}else{e.push([]);let s=n.clientWidth;s&&(n.dataset.col="first",e[e.length-1]?.push({item:n,w:s})),o=s}}),e.forEach((n,s)=>{let r=n.reduce((l,a)=>l+a.w,0);n.forEach(l=>{l.item.dataset.row=s===0?"first":s===e.length-1?"last":"",l.item.style.maxWidth=`${l.w*100/r}%`})}),this.node.classList.add("widget-photoalbum--justified")}};x(".widget-photoalbum",i=>new rd(i));M();function Yw(){window.addEventListener("resize",ld),ld()}function ld(){if(window.innerWidth<=640)return;let i=document.querySelectorAll(".embeddedobject.imageblock > img[data-wide]"),e=i.length;for(let t of i){let o=t.getAttribute("data-wide");o&&(t.src=o),t.removeAttribute("data-wide"),e--}e<=0&&window.removeEventListener("resize",ld)}var ad=0,Xw=3;function Gw(i,e="foldablecontent"){i.classList.add(e+"--open");let t=i.querySelector("."+e+"__foldcontainer");t.style.height="auto",t.style.overflow="inherit"}function _m(i){let e="foldablecontent";i.classList.add(e+"--active");let t=i.querySelector("."+e+"__title"),o=i.querySelector("."+e+"__foldcontainer"),n=i.querySelector("."+e+"__text");if(!o){console.warn("No expandable content for",i);return}let s=l=>{l.detail.open?Gw(i,e):(i.classList.remove(e+"--open"),o.style.height="")},r=l=>{l.type=="touchend"&&l.preventDefault(),!(ad>=Xw)&&(i.classList.contains(e+"--disabled")||(i.classList.toggle(e+"--open")?(o.style.height=0,window.matchMedia("(prefers-reduced-motion: no-preference)").matches&&o.classList.add(e+"__foldcontainer--active"),o.style.height=n.getBoundingClientRect().height+"px"):(o.style.overflow="",o.style.height=n.getBoundingClientRect().height+"px",o._wsTmpHeight=getComputedStyle(o).height,window.matchMedia("(prefers-reduced-motion: no-preference)").matches&&o.classList.add(e+"__foldcontainer--active"),o.style.height="0"),F(i,"ws:foldable-status",{bubbles:!0,cancelable:!1,detail:{open:i.classList.contains(e+"--open")}})))};t.addEventListener("click",r),i.addEventListener("ws:foldable-toggle",r),i.addEventListener("ws:foldable-set",s),t.addEventListener("touchstart",()=>ad=0,{passive:!0}),t.addEventListener("touchmove",()=>++ad,{passive:!0}),t.addEventListener("touchend",r),o.addEventListener("transitionend",l=>{l.currentTarget==l.target&&(o.classList.remove(e+"__foldcontainer--active"),i.classList.contains(e+"--open")?(o.style.height="auto",o.style.overflow="inherit"):o.style.height="")})}function Kw(i){if(i&&!i.target.closest(".togglespecializations"))return;i&&i.preventDefault();let e=i.target.closest(".studyfinder__programme");if(!e)return;let t=e.querySelector(".programme_specializations");t&&(t.classList.contains("show")?(t.style.height=t.clientHeight+"px",t.clientWidth,t.classList.remove("show"),t.style.height="0px"):(t.style.height=t.children[0].clientHeight+"px",t.clientWidth,t.classList.add("show"),setTimeout(function(){t.classList.contains("show")&&(t.style.height="auto")},300)))}function Jw(i){let e=i.querySelector(".sfwidget__showall");e&&e.addEventListener("click",t=>Qw(t)),i.addEventListener("click",Kw)}function Qw(i){i.target.closest(".embeddedobject, .widget").classList.add("sfwidget--expand")}x(".embeddedobject__studyfinder, .widget-studyfinder",i=>Jw(i));x(".embeddedobject",i=>{let e=i.previousElementSibling;if(e&&(e.nodeName=="P"||e.nodeName=="H2"||e.nodeName=="H3"||e.nodeName=="H4")&&(e.innerHTML==""||e.innerHTML=="<br>")){let t=e.previousElementSibling;t&&t.classList.contains("embeddedobject")&&i.parentElement.removeChild(e)}});K(function(){Yw()});var dd=class{tabIndicator;tabs;pageholder;pulldown;curIdx;resizeTimeout;dir=document.documentElement.dir==="rtl"?1:-1;constructor(e){this.tabIndicator=T(e,".widget__tabs-currenttitle"),this.tabs=[],this.pageholder=L(e,".widget__tabs-contents"),this.pulldown=null,e.classList.contains("widget__tabs--pulldown")&&(this.pulldown=L(e,"select.widget__tabs-pulldown"),this.pulldown.addEventListener("change",()=>this.switchTab(Number(this.pulldown.value))));let t=this.pulldown?[]:w(e,".widget__tabs-titletext");w(e,".widget__tabs-page").forEach((o,n)=>{let s={title:t[n],page:o};this.tabs.push(s),s.title?s.title.addEventListener("click",()=>this.switchTab(n)):s.page.style.marginLeft=n?100*this.dir+"%":"0",s.page.classList.remove("widget__tabs-page--init")}),this.curIdx=0,Su(e,()=>this.resizeTimeout=this.resizeTimeout||requestAnimationFrame(()=>this.updateTabIndicator())),this.resizeTimeout=requestAnimationFrame(()=>this.updateTabIndicator())}switchTab(e){if(this.curIdx=e,!this.pulldown){let t=this.dir*100*this.curIdx;this.pageholder.style.transform=`translateX(${t}%)`}this.updateTabIndicator()}updateTabIndicator(){this.resizeTimeout=null;let e=0;
18this.tabs.forEach((t,o)=>{if(this.pulldown){o===this.curIdx?(t.page.style.zIndex="2",t.page.classList.add("widget__tabs-page--current")):(t.page.style.zIndex="1",t.page.classList.remove("widget__tabs-page--current"));return}let n=t.title.getBoundingClientRect();o||(e=n[this.dir===1?"right":"left"]),o===this.curIdx&&this.tabIndicator?(t.title.classList.add("widget__tabs-titletext--current"),this.tabIndicator.style[this.dir===1?"right":"left"]=-this.dir*(n[this.dir===1?"right":"left"]-e)+"px",this.tabIndicator.style.width=t.title.getBoundingClientRect().width+"px"):t.title.classList.remove("widget__tabs-titletext--current")})}};function Zw(i){let e=T(i,"form");if(e){let t=L(e,"input[name='phone']");t.value="",e.addEventListener("submit",o=>{V(o);let n=t.value;if(Number(n.replace(/[^0-9]/g,""))>999){let s={phone:n,pageid:Number(e.getAttribute("data-pageid")),widgetid:Number(e.getAttribute("data-widgetid"))};ev(i,s)}})}}async function ev(i,e){let t=G({modal:!0});i.classList.add("widget__callbackform--loading");let o;try{o=await Jt.MailContactPerson(e)}finally{t.release(),i.classList.remove("widget__callbackform--loading")}o.success?(i.classList.add("widget__callbackform--success"),Ie(i)):o.errors.length>0&&console.error("Error submitting callback form:",o.errors)}x(".widget__callbackform",i=>Zw(i));function tv(i){let e=w(i,".widget__photoslide");i.classList.contains("widget__photos--infos")&&(i.closest(".widget").addEventListener("ws:relayoutwidgetcontent",iv),cd(i)),i._wsSlideShow=new xo(e,{dotNodes:i.querySelectorAll(".widget__photosliderdot"),pauseNode:i})}function iv(i){let e=T(i.target,".widget__photos");e&&cd(e)}function cd(i){let e=w(i,".widget__photoslide"),t=0;for(let o of e){let s=L(o,".widget__photoinfo").getBoundingClientRect().height;s>t&&(t=s),o.classList.contains("widget__photoslide--infoinit")&&o.classList.remove("widget__photoslide--infoinit")}t>0&&(i.style.marginBottom=`${t}px`)}window.relayoutPhotoslide=cd;x(".widget__photos",i=>tv(i));x(".widget__infos--slideshow",i=>{i._wsSlideShow=new xo(i.querySelectorAll(".widget__infoslide"),{dotNodes:i.querySelectorAll(".widget__infosliderdot"),pauseNode:i})});x(".widget__image",i=>{let e=i.getAttribute("data-instanceid");i.addEventListener("click",()=>{bm.doActivateSlideshow(e,0)})});x(".widget__tabs",i=>new dd(i));x(".widget__flip",i=>{i.addEventListener("click",e=>{let t=e.target.closest(".widget");if(t){let o=T(t,".widget__infos--slideshow");t.classList.contains("widget--rotated")?(t.classList.remove("widget--rotated"),o&&o._wsSlideShow.resume()):(t.classList.add("widget--rotated"),o&&o._wsSlideShow.stop())}})});window.addEventListener("wh:form-validitychange",i=>{let e=i.target.closest(".widget");e&&Ie(e)});x(".foldablecontent:not(.foldablecontent--active)",i=>_m(i));window.addEventListener("load",function(){Gu(null)});N();var So=[],wm=!0,pd=!0;window.addEventListener("resize",i=>hd(i));K(ov);function ov(){document.body.addEventListener("focusout",t=>nv(t));let i=location.hash.substr(1);if(i){So=[];let t=document.getElementById(i)?.closest(".ut-rtd-blocks");for(;t;)So.push(t),t=t.parentElement.closest(".ut-rtd-blocks");hd();return}let e=document.querySelector(".ut-rtd-blocks");e&&e.tagName==="DETAILS"&&(So=[e]),hd(),setTimeout(function(){document.documentElement.classList.add("ut-rtd-blocks-initialized")},1)}function nv(i){let e=i.target.closest("details.ut-rtd-blocks");if(!e||!(i.target.tagName==="SUMMARY")||i.relatedTarget!==null)return;if(!(window.getComputedStyle(document.documentElement).getPropertyValue("--headingsmode")==="autofold")){let n=e.querySelector(".ut-rtd-blocks__body");n.setAttribute("tabindex","-1"),n.focus()}}function hd(i){let e=Array.from(document.querySelectorAll("details.ut-rtd-blocks"));if(e.length===0)return;let t=window.getComputedStyle(document.documentElement).getPropertyValue("--headingsmode")==="autofold";if(!(!wm&&pd===t)){if(pd&&!t){So=[];for(let o of e)o.hasAttribute("open")&&So.push(o)}for(let o of e){o.toggleAttribute("open",!t||So.includes(o));let n=o.querySelector("summary");if(t){n?.removeAttribute("role"),n?.removeAttribute("tabindex");let s=o.querySelector(".ut-rtd-blocks__body");
18document.activeElement===s&&n?.focus()}else n?.setAttribute("role","presentation"),n?.setAttribute("tabindex","-1")}pd=t,wm=!1}}N();var ud=class extends tt{constructor(e){super(e);let t=this.node.querySelector(".ut-medical__cancel");t&&t.addEventListener("click",o=>this.cancelAppointment()),this.timeoptions=w(this.elements.time,"option"),this.elements.date&&(this.elements.date.addEventListener("change",o=>this.updateTimes()),this.updateTimes())}updateTimes(){let e=this.elements.date.value,t=this.elements.time.options[this.elements.time.selectedIndex];this.elements.time.replaceChildren(),this.timeoptions.forEach(o=>{JSON.parse(o.dataset.fordates).includes(e)&&(this.elements.time.appendChild(o),t&&t.textContent===o.textContent&&(this.elements.time.value=o.value))})}async cancelAppointment(){await Ae("Weet u zeker dat u uw afspraak wil annuleren ?",[{result:"no",title:"Nee"},{result:"yes",title:"Ja"}])==="yes"&&(await this.invokeRPC("cancelappointment"),document.querySelector("#medical-form-page1").style.display="none",document.querySelector("#medical-form-cancelled").style.display="block")}onSubmitSuccess(e){document.querySelector("#medical-form-page1").style.display="none",document.querySelector("#medical-form-success").style.display="block"}};oe("utwente_base:medicalsignupform",i=>new ud(i));M();document.documentElement.classList.contains("utwente--loginrouter")&&(x("#oidc_ut",i=>{i.addEventListener("click",e=>{us("UTAZURE")})}),x("form.ut-specialaccount-loginform",i=>{i.action+=location.hash}),document.documentElement.classList.contains("utwente--ws2026")||x(".wh-wrdauth-forgotpassword__form",i=>{(i.parentNode?.parentNode).replaceWith(i)}));sa();N();te();function On(i){return i.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;")}var md=class extends tt{constructor(e){super(e);for(let t of this.node.querySelectorAll(".wh-form__questiongroup__introtext")){let o=t.innerHTML;(o.indexOf("[participantscount]")!==-1||o.indexOf("[bhvcount]")!==-1)&&(o=o.replace("[participantscount]",'<span class="participantscount"></span>'),o=o.replace("[bhvcount]",'<span class="bhvcount"></span>'),t.innerHTML=o)}e.querySelector("#meetingsform-step2").addEventListener("wh:form-pagechange",()=>this.showbhvcount()),e.querySelector("#meetingsform-step3").addEventListener("wh:form-pagechange",()=>this.generateOverview())}showbhvcount(){let e=this.elements.nrparticipants.value,t=0;e>20&&(t=Math.ceil(e/50));for(let o of this.node.querySelectorAll(".wh-form__questiongroup__introtext .participantscount"))o.textContent=String(e);for(let o of this.node.querySelectorAll(".wh-form__questiongroup__introtext .bhvcount"))o.textContent=String(t)}generateOverview(){let e=document.getElementById("meetingsform-step3-content");e.replaceChildren();let t=[],o="";for(let r=0;r<this.elements.length;++r){let l=this.elements[r];if(l.type!=="hidden"){let a="",d="",c=l.closest(".wh-form__fieldgroup");if(c&&(a=c.querySelector("label")?c.querySelector("label").textContent:c.dataset.title,l.nodeName==="SELECT"?d=l.options[l.selectedIndex].textContent:d=String(l.value)),a&&d){if(a===o&&(l.name.indexOf("hour")>-1||l.name.indexOf("minute")>-1)){let h=" ";l.name.indexOf("hour")>-1&&d.length===1&&(d="0"+d),l.name.indexOf("minute")>-1&&(d.length===1&&(d="0"+d),h=":"),t[t.length-1].value+=h+d}else t.push({title:a,value:d,name:l.name});o=a}}}let n=-1,s=!1;for(let r=0;r<t.length;++r)if(t[r].name.indexOf("bhv_")===0){let a=Number(t[r].name.replace(/[^0-9]/g,""));if(n!==a&&(s=t[r].name.indexOf("_name")>0&&t[r].value!=="",s&&e.appendChild(W("div",{class:"line bhv",innerHTML:"<strong>BHV'er "+a+"</strong>"}))),n=a,s){let d="<strong>"+On(t[r].title)+"</strong><span>"+On(t[r].value)+"</span>";e.appendChild(W("div",{class:"line",innerHTML:d}))}}else{s=!1;let a="<strong>"+On(t[r].title)+"</strong><span>"+On(t[r].value)+"</span>";e.appendChild(W("div",{class:"line",innerHTML:a}))}}reset(){super.reset(),document.getElementById("meetingsform-step3-content").replaceChildren(),this.gotoPage(0);for(let t=0;t<this.elements.length;++t){let o=this.elements[t];o.type!=="hidden"&&(o.nodeName==="SELECT"&&(o.selectedIndex=-1),o.value="")}}onSubmitSuccess(e){e.success?(e.isedit||this.reset(),this.showSuccessDialog()):this.showErrorDialog()}showErrorDialog(){let e=v("utwente_base:frontend.ws2016.js.meetings.error-title"),t=v("utwente_base:frontend.ws2016.js.meetings.error-description");this.dialognode=xi(e,t,{theme:"dialog--small"})}showSuccessDialog(){let e=v("utwente_base:frontend.ws2016.js.meetings.thanks-title"),t=v("utwente_base:frontend.ws2016.js.meetings.thanks-description");this.dialognode=xi(e,t,{theme:"dialog--small"})}};oe("utwente_base:meetingsform",i=>new md(i));M();te();var vm=640,xm=1600;async function rv(i){return new Promise((e,t)=>
18{let o=new FileReader;o.addEventListener("load",()=>{let n=document.createElement("img");n.addEventListener("load",()=>{e({width:n.naturalWidth,height:n.naturalHeight})}),n.addEventListener("error",s=>t(new Error(s.message))),n.src=o.result}),o.addEventListener("error",()=>t(new Error("readAsDataURL failed"))),o.readAsDataURL(i)})}var gd=class extends me{#e;#o={news:[],event:[]};#t=!1;constructor(e){super(e),this.node.dataset.publocs&&(this.#o=JSON.parse(this.node.dataset.publocs)),this.#e=new MutationObserver(n=>this.#n(n));for(let n of w(e,".ut-neoform-showblurrybg")){let s=T(n,"input[type='checkbox']");s&&n.previousSibling?.classList.contains("ut-neoform-headerphoto")&&s.addEventListener("change",()=>n.previousSibling.classList.toggle("ut-neoform-headerphoto--blurrybg",s.checked))}for(let n of w(e,".ut-neoform-headerphoto")){let s=T(n,"wh-imgedit");s?(s.addEventListener("change",()=>this.#i(s)),this.node.addEventListener("wh:form-pagechange",()=>this.#i(s)),this.#e.observe(n,{childList:!0})):(s=T(n,"div.wh-form__imgedit"),s&&(s.addEventListener("change",()=>this.#i(s,!0)),this.node.addEventListener("wh:form-pagechange",()=>this.#i(s))))}for(let n of w(e,".ut-neoform-headeralt"))this.#s(n,!1);for(let n of w(e,".ut-neoform-checkboxgroup .wh-form__fields")){let s=T(n,":scope > .wh-form__infotextwrapper");s&&n.after(s),this.#e.observe(n,{childList:!0})}for(let n of w(e,".wh-form__fieldgroup[data-wh-form-group-for=mp_receivers]")){let s=!1;n.addEventListener("change",r=>{if(!(!r.target||s)){if(s=!0,r.target.dataset.isemployeesrole==="true")for(let l of w(n,"input[type=checkbox][data-isemployeesrole=false]"))l.dataset.isemployeesrole!=="true"&&(l.checked=r.target.checked);else{let l=w(n,"input[type=checkbox][data-isemployeesrole=false]").every(d=>d.checked),a=T(n,"input[type=checkbox][data-isemployeesrole=true]");a&&(a.checked=l)}s=!1}})}let t=T(e,".wh-form__fieldgroup[data-wh-form-group-for=mp_authorized]");t&&De(t,()=>this.#a());let o=T(e,".wh-form__fieldgroup[data-wh-form-group-for=mp_persontypes]");o&&t&&o.addEventListener("change",()=>this.#t&&this.validate([t]))}async getPublocLanguages(){let e=await this.getFormValue(),t=new Set,o=e.newstype[0];if(o){let n=o==="news"?[e.orgpubloc_news,...e.publocations_news]:[e.orgpubloc_event,...e.publocations_event],s=this.#o[o].filter(r=>n.includes(r.id));for(let r of s)for(let l of r.languages)t.add(l)}return[...t.values()]}#n(e){for(let t of e){let o=t.target;if(o.classList.contains("ut-neoform-headerphoto")){if([...t.addedNodes].some(n=>n.classList.contains("wh-form__error"))){let n=o.querySelector(".ut-neoform__warning");n&&n.remove()}}else if(o.matches(".ut-neoform-checkboxgroup .wh-form__fields"))for(let n of t.addedNodes)o.after(n)}}async#i(e,t=!1){let o=!1,n="";t?(o=e.classList.contains("wh-form__imgedit--hasimage"),n=e.dataset.whFormName??""):(o=e.isSet(),n=e.name,this.#r(e));let s=await this.getPublocLanguages(),r=T(`[data-wh-form-group-for="${n.replace(/photo/,"alt_en")}"]`);r&&this.#s(r,o&&s.includes("en"));let l=T(`[data-wh-form-group-for="${n.replace(/photo/,"alt_nl")}"]`);l&&this.#s(l,o&&s.includes("nl"))}async#r(e){let t=e.closest(".wh-form__fieldgroup"),o=t.querySelector(".ut-neoform__warning");o&&o.remove();let n=e.value[0]?.file;if(n)try{let s=await rv(n);if(s.height<vm)_e(e,v("utwente_base:frontend.ws2016.js.neoform.minheight",s.height,vm));else if(s.width<xm){let r=p("span",null,v("utwente_base:frontend.ws2016.js.neoform.image-invalid-width",s.width,xm));o=o||p("div",{class:"ut-neoform__warning"}),o.replaceChildren(r),t.querySelector(".wh-form__fields").after(o)}}catch(s){console.error(s),_e(e,v("utwente_base:frontend.ws2016.js.neoform.image-read-error"))}}#s(e,t){e.classList.toggle("wh-form__fieldgroup--disabled",!t),e.classList.toggle("wh-form__fieldgroup--required",t);let o=T(e,"input");o&&(o.disabled=!t,o.required=t),requestAnimationFrame(()=>e.classList.toggle("wh-form__fieldgroup--hidden",!t))}async#a(){this.#t=!0;let e=await this.getFormValue();if(e.mp_authorized_public?.includes("1")&&!e.mp_authorized?.length&&!e.mp_persontypes?.length)return v("utwente_base:frontend.ws2016.js.neoform.authorizednotset")}};oe("utwente_base:neoform",i=>new gd(i));M();var fd=class{container;sortcol=0;sortasc=!0;constructor(e){this.container=e;let t=T(this.container,".filteredoverview__listviewheader");t&&t.addEventListener("click",o=>
18this.onSortClick(t,o)),e.addEventListener("pagefilters:viewmodechange",o=>this.onViewModeChange(o.detail.mode))}onSortClick(e,t){let o=t.target.closest(".filteredoverview__item__listviewcol");if(!o)return;let n=this.sortcol;for(let s=0;s<e.children.length;++s)if(e.children[s]===o){n=s;break}this.sortcol===n&&(this.sortasc=!this.sortasc),this.sortcol=n,this.sortList()}onViewModeChange(e){e==="list"?(this.container.classList.add("filteredoverview__items--listview"),this.container.classList.remove("filteredoverview__items--detailview")):(this.container.classList.add("filteredoverview__items--detailview"),this.container.classList.remove("filteredoverview__items--listview")),this.sortList()}sortList(){let e=w(this.container,".filteredoverview__item");this.container.classList.contains("filteredoverview__items--listview")?(e.sort((t,o)=>{let n=Number(t.dataset.ordering),s=Number(o.dataset.ordering),r=this.sortcol+1,l=r<t.children.length?t.children[r].textContent.toUpperCase().trim():"",a=r<o.children.length?o.children[r].textContent.toUpperCase().trim():"";return this.sortasc?l<a?-1:l>a?1:n<s?-1:1:l>a?-1:l<a?1:n>s?-1:1}),e.forEach(t=>this.container.appendChild(t))):(e.sort((t,o)=>Number(t.dataset.ordering)<Number(o.dataset.ordering)?-1:1),e.forEach(t=>this.container.appendChild(t)))}};x(".filteredfolder__results .filteredoverview__items",i=>new fd(i));M();te();x(".page-titlebar",i=>{let e=ee("utwente_base:neopage",{allowMissing:!0});if(e&&e.suburl){let t=Rt("neoLinks-"+e.objid);if(!t)return;let o=t.findIndex(n=>n.suburl===e.suburl);if(o>=0){let n=o>0?t[o-1].suburl:"",s=o<t.length-1?t[o+1].suburl:"";if(n||s){let r=p("div",{class:"neodetailspage-pagenav"},n?p("a",{href:e.baseurl+n,class:"previous"},p("i",{class:"UT-icon-UT_icon_43_arrow-left-16px","aria-hidden":"true"}),p("span",null,e.type==="news"?v("utwente_base:frontend.ws2016.js.newsevents.previous_article-news"):v("utwente_base:frontend.ws2016.js.newsevents.previous_article"))):p("span",null),s?p("a",{href:e.baseurl+s,class:"next"},p("span",null,e.type==="news"?v("utwente_base:frontend.ws2016.js.newsevents.next_article-news"):v("utwente_base:frontend.ws2016.js.newsevents.next_article")),p("i",{class:"UT-icon-UT_icon_44_arrow-right-16px","aria-hidden":"true"})):null);i.prepend(r)}}}});var _d=class{objid=0;type="";subtype="";photoplaceholder="";photoplaceholder_2x="";summaryplaceholder="";summaryplaceholder_2x="";hasfoldableitems=!1;summarycontainer;morebutton;currentfilters=null;constructor(){this.summarycontainer=L("main .summary");let e=ee("utwente_base:neopage");if(e&&(this.objid=e.objid,this.type=e.type,this.subtype=e.subtype,this.photoplaceholder=e.photoplaceholder,this.photoplaceholder_2x=e.photoplaceholder_2x,this.summaryplaceholder=e.summaryplaceholder,this.summaryplaceholder_2x=e.summaryplaceholder_2x),this.hasfoldableitems=this.subtype==="cultural",this.type==="event"){let t=T(".page-filters__form__buttons");t&&t.prepend(p("div",{class:"neopage-archiveoptions"},p("button",{class:"neopage-archiveoptions__button","data-archive":"no",onClick:()=>this.toggleArchive(!1),hidden:!0},p("span",null,v("utwente_base:frontend.ws2016.js.newsevents.upcoming"))),p("button",{class:"neopage-archiveoptions__button","data-archive":"yes",onClick:()=>this.toggleArchive(!0),hidden:!0}
18,p("span",null,v("utwente_base:frontend.ws2016.js.newsevents.archive")))))}this.morebutton=L(".neopage-moreresults__button"),this.morebutton.addEventListener("click",()=>{let t=new URL(location.href),o=parseInt(t.searchParams.get("skip"))||0;t.searchParams.set("skip",(o+10).toString()),history.pushState(null,"",t.toString()),this.doFilter()}),this.summarycontainer.addEventListener("click",t=>{let o=t.target.closest(".tag[data-filter]");if(o){let n=o.dataset.filter,s=o.dataset.id;if(n&&s)if(t.preventDefault(),n==="categories"){let r=T(".page-filters__form select[name='categories']");if(!r)return;r.slim.setSelected(s,!0)}else n==="tag"&&this.setTag(s)}})}setTag(e){let t=new URL(location.href);e?t.searchParams.set("tag",e):t.searchParams.delete("tag"),history.pushState(null,"",t.toString()),this.resetPagination(),this.doFilter()}toggleArchive(e){let t=new URL(location.href);e?t.searchParams.set("archive","yes"):t.searchParams.delete("archive"),history.pushState(null,"",t.toString()),this.resetPagination(),this.doFilter()}resetPagination(){let e=new URL(location.href);e.searchParams.delete("skip"),history.pushState(null,"",e.toString()),this.morebutton.hidden=!0}async filter(e){return this.currentfilters=e,this.resetPagination(),await this.doFilter()}async doFilter(){this.morebutton.classList.add("neopage-moreresults--loading");let e=G({modal:!0}),t=new URLSearchParams(location.search),o=parseInt(t.get("skip"))||0,n=this.type==="event"&&t.get("archive")==="yes",s=parseInt(t.get("tag"))||0,r;try{r=await Jt.GetNEOItems(this.objid,this.type,this.subtype,this.currentfilters,{skip:o,archive:n,tag:s})}finally{e.release()}this.morebutton.classList.remove("neopage-moreresults--loading"),this.morebutton.hidden=!r.moreitems;let l=r.skip>0,a=(this.currentfilters?this.currentfilters.query.isAnySet:!1)||r.archive||r.tag>0||r.skip>0,d=r&&r.totalresults>0?this.renderItems(r,l,a):[];return w(".neopage-archiveoptions__button").forEach(c=>{c.dataset.archive==="yes"?c.hidden=n:c.hidden=!n}),l||(Mi("neoLinks-"+this.objid,r.links),this.summarycontainer.replaceChildren(...d)),w(".page-filterstoolbar__feedback").forEach(c=>c.textContent=v("utwente_base:frontend.ws2016.js.pagefilters.search-xresults",String(r.totalresults))),w(".page-filters__mobiletoggle__hidelabel").forEach(c=>c.textContent=v("utwente_base:frontend.ws2016.js.pagefilters.show-xresults",String(r.totalresults))),document.documentElement.classList.toggle("page-filters--noresults",!r||!r.totalresults),(!r||!r.totalresults)&&(this.type==="event"&&r&&!r.archive?this.summarycontainer.append(p("div",{class:"pagefilters__noresults"},v("utwente_base:frontend.ws2016.js.newsevents.noupcoming"))):this.summarycontainer.append(p("div",{class:"pagefilters__noresults"},v("utwente_base:frontend.ws2016.js.newsevents.noresults")))),we(this.summarycontainer),null}renderItems(e,t,o){let n=[];if(!o&&!t){let r=[];e.items.forEach((l,a)=>{a>=2||(l.photolink||(l.photolink=this.photoplaceholder,l.photolink_2x=this.photoplaceholder_2x),r.push(p("li",{class:"summary__introblock"},p("a",{class:"summary__link",href:l.link},l.photolink?p("img",{class:"summary__image",src:l.photolink,srcset:`${l.photolink} 1x, ${l.photolink_2x} 2x`,alt:l.photoalt||l.title}):null,p("span",{class:"summary__title"},l.title),l.description?p("span",{class:"summary__description"},p("span",null,l.description)):null,p("div",{class:"summary__date"},l.dateformatted),l.location?p("span",{class:"location"},l.location):null,l.tags.length?p("span",{class:"tags"},l.tags.map(d=>d.filter?p("span",{class:"tag","data-filter":d.filter,"data-id":d.id},d.tag):p("span",{class:"tag"},d.tag))):null,p("span",{class:"summary__readmore"},v("utwente_base:frontend.ws2016.js.readmore"))))))}),r.length>0&&n.push(p("ul",{class:"summary__introblocks"},r))}let s=[];if(e.items.forEach((r,l)=>{r.summaryphotolink||(r.summaryphotolink=this.summaryplaceholder,r.summaryphotolink_2x=this.summaryplaceholder_2x),s.push(p("li",{class:`summary__item ${!o&&!t&&l<2?"summary__item--mobileonly":""}`},this.hasfoldableitems?p("div",{class:"summary__link",onClick:a=>this.toggleItemContent(a)},r.summaryphotolink?p("img",{class:"summary__image",src:r.summaryphotolink,srcset:`${r.summaryphotolink} 1x, ${r.summaryphotolink_2x} 2x`,alt:r.summaryphotoalt||r.title}):null,p("span",{class:"summary__meta"},p("span",{class:"date"},r.dateformatted),r.location?p("span",{class:"location"},r.location):null),p("span",{class:"summary__title"},r.title),p("div",{class:"summary__foldablecontent"}
18,r.subtitle?p("span",{class:"summary__subtitle"},r.subtitle):null,r.description?p("span",{class:"summary__description"},r.description):null),r.tags.length?p("span",{class:"tags"},r.tags.map(a=>a.filter?p("span",{class:"tag","data-filter":a.filter,"data-id":a.id},a.tag):p("span",{class:"tag"},a.tag))):null,p("div",{class:"summary__foldablecontent"},r.addthisdata?p("div",{class:"summary__calendar"},p("span",{class:"icon UT-icon-UT_icon_84_calendar-16px"}),p("span",{class:"addtocalendar addthisevent addeventatc"},v("utwente_base:frontend.ws2016.js.addtocalendar"),p("span",{class:"start",hidden:!0},r.addthisdata.startdate),p("span",{class:"end",hidden:!0},r.addthisdata.enddate),p("span",{class:"timezone",hidden:!0},"Europe/Amsterdam"),p("span",{class:"title",hidden:!0},r.title),p("span",{class:"description",hidden:!0},r.addthisdata.description),r.location?p("span",{class:"location",hidden:!0},r.location):null,p("span",{class:"all_day_event",hidden:!0},r.addthisdata.allday?"true":"false"),p("span",{class:"date_format",hidden:!0},"DD/MM/YYYY"))):null,p("a",{href:r.link,class:"summary__readmore"},v("utwente_base:frontend.ws2016.js.readmore"))),p("span",{class:"summary__arrow"},p("span",{class:"open UT-icon-UT_icon_54_arrow-down-round-16px"}),p("span",{class:"close UT-icon-UT_icon_53_arrow-up-round-16px"}))):p("a",{class:"summary__link",href:r.link},r.summaryphotolink?p("img",{class:"summary__image",src:r.summaryphotolink,srcset:`${r.summaryphotolink} 1x, ${r.summaryphotolink_2x} 2x`,alt:r.summaryphotoalt||r.title}):null,p("span",{class:"summary__meta"},p("span",{class:"date"},r.dateformatted),r.location?p("span",{class:"location"},r.location):null),p("span",{class:"summary__title"},r.title),r.tags.length?p("span",{class:"tags"},r.tags.map(a=>a.filter?p("span",{class:"tag","data-filter":a.filter,"data-id":a.id},a.tag):p("span",{class:"tag"},a.tag))):null,p("span",{class:"summary__arrow UT-icon-UT_icon_52_arrow-right-round-16px"}))))}),s.length>0)if(t){let r=T(this.summarycontainer,".summary__items");r&&r.append(...s)}else n.push(p("ul",{class:"summary__items"},s));return n}toggleItemContent(e){let t=e.target;t.closest("a")||t.closest(".addthisevent")||t.closest(".summary__link")?.classList.toggle("foldablecontent--active")}},bd=class extends tt{wrapper;msgcontainer;requesttype;dialog=null;constructor(e,t){super(e),this.requesttype=t,this.wrapper=document.createElement("div"),this.msgcontainer=document.createElement("div"),this.node.style="",this.wrapper.appendChild(this.node),this.wrapper.appendChild(this.msgcontainer);for(let o of document.querySelectorAll(".cta__button[href='#showeventform']"))o.addEventListener("click",n=>this.show(n))}show(e){this.node.hidden=!1,this.msgcontainer.textContent="",e&&e.preventDefault(),this.reset(),this.dialog=new wi(this.wrapper,"event_registration",{classname:"dialog--small"}),this.dialog.showModal()}reset(){super.reset()}onSubmitSuccess(){this.node.hidden=!0,this.msgcontainer.textContent=this.requesttype==="cultural"?v("utwente_base:frontend.ws2016.js.newsevents.thanks-cultural"):v("utwente_base:frontend.ws2016.js.newsevents.thanks-event")}};ft("neoFilter",()=>new _d);oe("utwente_base:event_registration",i=>new bd(i,"event"));M();var wd=class{node;container;searchIndex=null;filter={category:"",query:""};constructor(e){this.node=e;let t=T(".page-titlebar");t&&t.append(this.node),this.container=L(".peopleoverview__list");let o=L(this.node,".peopleoverview__filterform__search input"),n=ee("utwente_base:peoplepage");n&&o&&(this.searchIndex=new ui,this.searchIndex.searchFields=["title","description"],this.searchIndex.completeSuggestFields=["title"],n.persons.forEach(s=>{let r=s.textcontent.split(`
19`),l=r.shift()||"",a=r.join(`
20`);this.searchIndex.indexItem({personid:s.personid,title:l,description:a})}),Ze({input:o,className:"ut-autocomplete",preventSubmit:1,fetch:(s,r)=>{let l=this.searchIndex.suggest(s).slice(0,10);r(l.map(a=>({label:a,value:a})))},onSelect:s=>{o.value=s.label??"",yt(o,"change")},customize:(s,r,l,a)=>{let d=s.parentElement.offsetWidth,c=r.left+(r.width-d);l.style.width=d+"px",l.style.left=c+"px"}})),this.node.addEventListener("submit",s=>{s.preventDefault(),this.onFilter()}),this.node.addEventListener("change",()=>this.onFilter()),o.addEventListener("search",()=>this.onFilter()),this.onFilter(!0)}onFilter(e=!1){let t=this.node.query.value.trim().toLowerCase(),o=T(this.node,"input[name=category]:checked"),n=o?o.value:"";if(this.filter.query===t&&this.filter.category===n&&!e)return;this.filter.query=t,this.filter.category=n;let s=[];if(t&&this.searchIndex){let r=this.searchIndex.search(t);
20s.push(...r.items.map(l=>l.personid))}w(".peopleoverview__person").forEach(r=>{let l=!t||s.includes(r.dataset.personid||"");l&&(l=n===""||r.dataset.category===n),r.hidden=!l}),w(".peopleoverview__category").forEach(r=>{r.hidden=w(".peopleoverview__person[data-category='"+r.dataset.category+"']").every(l=>l.hidden)}),this.updateFiltersInUrl()}updateFiltersInUrl(){let e=new URL(location.href);for(let t of Object.keys(this.filter))e.searchParams.delete(t);for(let[t,o]of Object.entries(this.filter))o&&e.searchParams.set(t,o);history.replaceState(null,"",e.toString())}};x(".peopleoverview__filterform",i=>new wd(i));M();te();var vd=class{container;constructor(e){this.container=e;let t=T(".page-filters__form__buttons");t&&t.prepend(p("button",{tabindex:"0",type:"button",onClick:()=>{this.downloadXLSX()},class:"ctabutton-with-rightarrow ctabutton-with-rightarrow--download tablewithfilter__downloadbutton"},p("span",{class:"ctabutton-with-rightarrow__title"},v("utwente_base:frontend.ws2016.js.tablewithfilter.downloadxlsx")))),window.addEventListener("resize",()=>this.onResize()),window.addEventListener("load",()=>this.onResize()),this.container.addEventListener("pagefilters:afterfilter",()=>this.onResize()),this.onResize()}onResize(){this.container.classList.toggle("overflow",this.container.clientWidth<this.container.scrollWidth)}async downloadXLSX(){let e=G({modal:!0}),t=[];w(this.container,".pagefilters__item").forEach(l=>t.push(Number(l.dataset.idx)));let o=null;try{o=await Jt.GetXLSXExport(document.location.href,t)}finally{e.release()}if(!o||!o.data)return;let n=this.dataURLtoBlob(o.data),s=window.URL.createObjectURL(n),r=p("a",{download:o.filename});r.href=s,document.body.appendChild(r),r.click(),window.URL.revokeObjectURL(s),r.remove()}dataURLtoBlob(e){let t=e.split(","),o=t[0].match(/:(.*?);/)?.[1]??"application/octet-stream",n=atob(t[1]),s=n.length,r=new Uint8Array(s);for(;s--;)r[s]=n.charCodeAt(s);return new Blob([r],{type:o})}};x(".tablewithfilter__scrollcontainer",i=>setTimeout(()=>new vd(i),200));M();Ne();window.__timelines=window.__timelines||[];var xd=class{node;myFilter;constructor(){this.node=L(".timeline__items"),this.myFilter=new Lt(null);let e=ee("utwente_base:timelinepage");if(e&&e.addstoryLink&&e.addstoryText){let t=T(".page-filters__form__buttons");t&&t.prepend(p("div",{class:"timeline__addstorylink"},p("a",{href:e.addstoryLink,rel:"noopener noreferrer"},p("span",null,e.addstoryText))))}}async filter(e){let o=(this.myFilter.filter(e)||[]).map(s=>Number(s.dataset.idx||"")),n=[];w(this.node,".timeline__item").forEach(s=>{let r=Number(s.dataset.idx||""),l=o.includes(r);if(l){let a=Number(s.dataset.filterYear||"");n.includes(a)||n.push(a)}s.classList.toggle("timeline__item--hide",!l)}),w(this.node,".timeline__header[data-year]").forEach(s=>{let r=Number(s.dataset.year||"");s.classList.toggle("timeline__item--hide",!n.includes(r))}),w(".page-filterstoolbar__feedback").forEach(s=>s.textContent=v("utwente_base:frontend.ws2016.js.pagefilters.search-xresults",String(o.length))),w(".page-filters__mobiletoggle__hidelabel").forEach(s=>s.textContent=v("utwente_base:frontend.ws2016.js.pagefilters.show-xresults",String(o.length)));for(let s of window.__timelines)s.widgetnode.classList.toggle("embeddedobject--timeline--noresults",o.length===0),s.yearsinresults=n,s.refreshYearBookmarks(),s.refresh();return null}};ft("TimelinePageFilter",()=>new xd);te();ie();var yd=class extends tt{constructor(e){super(e),this.amountoptions=this.node.querySelectorAll("input[name='amount']");for(let t of this.amountoptions)t.addEventListener("change",this.setAdditionalAmountFields.bind(this));this.paymentmethodoptions=this.node.querySelectorAll("input[name='payment_method']");for(let t of this.paymentmethodoptions)t.addEventListener("change",this.setAdditionalPaymentMethodFields.bind(this));this.elements.isorganization.addEventListener("change",this.setAdditionalOrganizationFields.bind(this)),this.setAdditionalFields(),this.getUrlParam("payment")=="1"&&ye.obj.payment&&(ye.obj.payment.status=="failed"?this.showErrorDialog():this.showSuccessDialog(ye.obj.payment.destination)),this.elements.amount_other.addEventListener("change",t=>this.sanitizeOtherAmount())}sanitizeOtherAmount(){let e=this.elements.amount_other.value,t=e.lastIndexOf(".")>=e.lastIndexOf(",")?".":",";e=t=="."?e.replace(/[^0-9\.]/g,""):e.replace(/[^0-9,]/g,""),e.indexOf(t)==-1&&(e+=t+"00");let o=e.split(t),n=o.pop().substr(0,2);n.length<2&&(n+=n.length==0?"00":"0");let s=o.join("");
20t=document.documentElement.lang.indexOf("en")==-1?",":".",this.elements.amount_other.value=1*s+1*n>0?s+t+n:""}setAdditionalFields(){this.setAdditionalAmountFields(),this.setAdditionalPaymentMethodFields(),this.setAdditionalOrganizationFields()}setAdditionalAmountFields(){let e=this.getValue("amount");e||(e=""),1*e>0||e==""?(this.elements.amount_other.closest(".wh-form__fieldgroup").style.display="none",this.elements.amount_other.required=!1):(this.elements.amount_other.closest(".wh-form__fieldgroup").style.display="",this.elements.amount_other.required=!0)}setAdditionalPaymentMethodFields(){let e=["iban","bankaccount_name","agree"],t=this.getValue("payment_method");if(t||(t=""),t=="incasso")for(let o of e)this.elements[o].closest(".wh-form__fieldgroup").style.display="",this.elements[o].required=!0;else for(let o of e)this.elements[o].closest(".wh-form__fieldgroup").style.display="none",this.elements[o].required=!1}setAdditionalOrganizationFields(){this.elements.isorganization.checked?(this.elements.organization.closest(".wh-form__fieldgroup").style.display="",this.elements.organization.required=!0):(this.elements.organization.closest(".wh-form__fieldgroup").style.display="none",this.elements.organization.required=!1)}getUrlParam(e){let t=location.search.replace(/\+/g,"%20");return(e=new RegExp("[?&]"+encodeURIComponent(e)+"=([^&]*)").exec(t))?decodeURIComponent(e[1]):""}onSubmitSuccess(e){if(e.success){if(this.reset(),this.setAdditionalFields(),e.redirect){ce(e.redirect);return}this.showSuccessDialog(e.destination)}}showErrorDialog(){let e=v("utwente_base:frontend.ws2016.js.ufondsdonaties.error-title"),t=v("utwente_base:frontend.ws2016.js.ufondsdonaties.error-description");this.dialognode=xi(e,t,{theme:"dialog--small"})}showSuccessDialog(e){let t=v("utwente_base:frontend.ws2016.js.ufondsdonaties.thanks-title"),o=v("utwente_base:frontend.ws2016.js.ufondsdonaties.thanks-description");this.dialognode=xi(t,o,{theme:"dialog--small"})}};oe("utwente_base:ufonds_donatie",i=>new yd(i));ie();M();function ym(){window.addEventListener("click",i=>{let e=i.target.closest("a[href]");if(!e)return;if(e.href.split("?")[0]==="x-serviceportal:login"){let o=Ri();e.href=ji({prompt:!!o})}})}function kd(i){Mi("utwente-triedsilentlogin",i||"explicit user request"),console.log("[ut-login] Attempting silent login because: "+Rt("utwente-triedsilentlogin")),location.href=ji({silent:!0})}function av(){let i=Pe("utwente-lastseenlogin");if(i)return"You were logged in at "+new Date(parseInt(i)).toLocaleString();let e=zt();return e&&e["usertype-employee"]?`You have beacon 'usertype-employee' with value '${e["usertype-employee"]}`:e&&e["usertype-student"]?`You have beacon 'usertype-student' with value '${e["usertype-student"]}`:null}function lv(){if(window.top===window)return!1;try{if(window.parent.__testframework)return!1}catch{}return!0}function dv(){if(document.documentElement.dataset.noutlogin||lv()||location.pathname.startsWith("/.publisher/preview/")||location.origin==="alumniportal.utwente.nl")return!1;if(!di()?.isLoggedIn()&&!Rt("utwente-triedsilentlogin")){let i=av();if(i)return kd(i),!0}return Rt("utwente-triedsilentlogin")&&Rt("utwente-triedsilentlogin")!=="done"&&(console.log("[ut-login] We tried a silent login earlier because: "+Rt("utwente-triedsilentlogin")+". It looks like it "+(di()?.isLoggedIn()?"succeeded":"failed")),Mi("utwente-triedsilentlogin","done")),!1}function km(){return di()?dv()?!0:(di()?.isLoggedIn()&&ze("utwente-lastseenlogin",Date.now().toString()),!1):!1}M();function cv(i){return document.documentElement.classList.contains("page--toplevelhome")?!i||document.documentElement.lang.startsWith(i):!1}K(()=>{Lh(),document.documentElement.dataset.nodeeplinks||Eu()});km()||Pe("utwente-lastselectedlanguage")!=="nl"&&cv("nl")&&ct().then(i=>{i!=="NL"&&i!=="BE"&&(location.href=location.pathname+"en/")}).catch(()=>{});Eh();_h();Ei==="development"&&ra({allowFeedback:!1,orientation:"left"});document.addEventListener("ws2026:togglesearch",i=>{Ta(),i.detail.q&&uh(i.detail.q,void 0)});x(".scroll-indicator",i=>{let e=!0;setTimeout(()=>i.classList.toggle("show",e),5e3);let t=()=>{window.scrollY>0&&(e=!1,i.classList.remove("show"),window.removeEventListener("wheel",t),window.removeEventListener("touchmove",t))};window.addEventListener("wheel",t),window.addEventListener("touchmove",t)});ym();Object.assign(window,{utSilentLogin:kd});Rp();M();var Tm=null;x(".datacloud-header",i=>{Tm||(Tm=gs("datacloud:datacloud"))});M();var Td=class extends me{header;resulttxtnode;loginbtn;constructor(e){super(e),this.addSignupDeeplink(),this.header={prefixnode:L(this.node,".formheader__prefix"),titlenode:L(this.node,".formheader__title"),descriptionnode:L(this.node,".formheader__description")};let t=T(this.node,".wh-form__button--nextlabel, .wh-form__button--submit .wh-form__buttonlabel");t&&(t.textContent=R("utwente_courses:webfeatures.frontend.js.nextstep")),this.resulttxtnode=L(this.node,".resulttext"),this.node.loggedinuser.value&&T(this.node,"input[name=serie]:checked")&&this.gotoPage(1),this.node.classList.contains("wh-form--disabledsubmit")&&this.node.addEventListener("wh:form-beforesubmit",o=>{o.preventDefault()}),this.node.addEventListener("wh:form-pagechange",o=>this.onPageChange(o.target)),this.loginbtn=T("#coursefinder-login"),this.loginbtn&&this.loginbtn.addEventListener("click",o=>
20this.login(o)),setTimeout(()=>this.initFoldableSeries(),200)}addSignupDeeplink(){let e=T(".main__deeplinklist");e&&e.appendChild(p("li",{class:"main__deeplinkitem"},p("a",{class:"main__deeplink",href:"#signup"},R("utwente_courses:webfeatures.frontend.js.signup"))))}login(e){e.preventDefault(),this.loginbtn&&(document.location.href=this.loginbtn.dataset.url+"?serie="+this.node.serie.value+"#signup")}onPageChange(e){if(e.dataset.whFormPagerole!=="thankyou")if(this.header.prefixnode.textContent=R("utwente_courses:webfeatures.frontend.js.signupfor"),this.header.titlenode.textContent=this.node.dataset.coursetitle,e.classList.contains("wh-form__page--series"))this.header.descriptionnode.textContent="",this.node.classList.remove("hidefootnote");else{let t=this.getSelectedOption("serie"),o="";t&&(this.node.classList.toggle("hidefootnote",!t.inputnode.dataset.waitinglist),w(t.fieldline,".session:first-child > .weekday, .session:first-child > .date, .session:first-child > .time, .note, .duration").forEach(n=>{n.textContent!==""&&(n.classList.contains("duration")?o+=" ("+n.textContent+")":(o!==""&&(o+=", "),o+=n.textContent))})),this.header.descriptionnode.textContent=o}}initFoldableSeries(){w(this.node,".fieldgroup-serie .fieldgroup-serie__month").forEach(e=>{e.addEventListener("click",o=>this.toggleSerieMonth(e));let t=e.nextElementSibling;w(t,".wh-form__optiondata").forEach(o=>{let n=T(o,".duration"),s=T(o,".sessions");n&&s&&n.addEventListener("click",r=>{if(s.style.maxHeight="",s.classList.toggle("showall"),s.classList.contains("showall")){let l=0;for(let a=0;a<s.children.length;++a)l+=s.children[a].clientHeight;s.style.maxHeight=l+"px",setTimeout(()=>{s.style.maxHeight="none"},300)}})})})}toggleSerieMonth(e){let t=e.nextElementSibling;if(t.style.overflow="",e.classList.contains("active"))t.style.height=t.clientHeight+"px",e.classList.remove("active"),t.clientHeight,t.style.height="";else{let o=0;for(let n=0;n<t.children.length;++n)o+=t.children[n].clientHeight;t.style.height=o+"px",e.classList.add("active"),t.clientHeight,setTimeout(function(){t.style.height="",t.style.overflow="visible"},300)}}onSubmitSuccess(e){if(this.resulttxtnode.replaceChildren(),e.success)this.header.prefixnode.textContent=R("utwente_courses:webfeatures.frontend.js.submitsuccess-prefix"),this.header.titlenode.textContent=R("utwente_courses:webfeatures.frontend.js.submitsuccess-title"),e.onwaitinglist?this.resulttxtnode.textContent=R("utwente_courses:webfeatures.frontend.js.submitsuccess-waitinglist"):e.parentcourse?this.header.descriptionnode.textContent=R("utwente_courses:webfeatures.frontend.js.submitsuccess-followupdescription",e.parentcoursetitle):this.header.descriptionnode.textContent=R("utwente_courses:webfeatures.frontend.js.submitsuccess-description"),e.paymentlink?document.location.href=e.paymentlink:e.followupcourselink?document.location.href=e.followupcourselink:this.node.scrollIntoView();else{let t="";switch(e.code){case"nosuchcourse":t=R("utwente_courses:webfeatures.frontend.js.registrationerror_nocourse");break;case"nosuchserie":t=R("utwente_courses:webfeatures.frontend.js.registrationerror_nosession");break;case"full":t=R("utwente_courses:webfeatures.frontend.js.registrationerror_full");break;case"already_registered":t=R("utwente_courses:webfeatures.frontend.js.registrationerror_already_registered");break;case"fullwaitinglist":t=R("utwente_courses:webfeatures.frontend.js.registrationerror_waitinglistfull");break;default:t=e.code+(e.name?" : "+e.name:"")}this.header.prefixnode.textContent=R("utwente_courses:webfeatures.frontend.js.submiterror-prefix"),this.header.titlenode.textContent=R("utwente_courses:webfeatures.frontend.js.submiterror-failed"),this.header.descriptionnode.textContent=t,this.resulttxtnode.appendChild(p("div",{class:"errortitle"},R("utwente_courses:webfeatures.frontend.js.registrationerror_title")));let o=p("button",{class:"wh-form__button"},R("utwente_courses:webfeatures.frontend.js.retry"));o.addEventListener("click",n=>{n.preventDefault(),document.location.reload()}),this.resulttxtnode.appendChild(o)}}};oe("utwente_courses:registrationform",i=>new Td(i));M();M();Go();var Zt=qt("utwente_courses:site_service");var Ed=class{data;constructor(e){console.log(e),this.data=e,this.showDialog()}async showDialog(){let e=Se();e.contentnode.appendChild(p("div",{class:"coursefinder__canceldialog"},p("h3",null,R("utwente_courses:webfeatures.frontend.js.cancel")+" '"+this.data.title+"'?"),p("div",{class:"course_date"},"( "+R("utwente_courses:webfeatures.frontend.js.start")+" "+this.data.date+" )"),p("div",{class:"buttons"},p("button",{"data-action":"ok",class:"wh-form__button"},R("utwente_courses:webfeatures.frontend.js.yes")),p("button",{"data-action":"cancel",class:"wh-form__button"},R("utwente_courses:webfeatures.frontend.js.no"))))),we(e.contentnode);let t=Number(this.data.id),o=this.data.hash;e.contentnode.addEventListener("click",n=>{n.target.nodeName==="BUTTON"&&(e.resolve(null),n.target.dataset.action==="ok"&&t>0&&o&&this.doCancel(t,o).catch(s=>console.error(s)))}),e.runModal()}async doCancel(e,t){let o=document.documentElement.lang?document.documentElement.lang.split("-")[0]:"en",n=G({modal:!0});try{await Zt.CancelCourse(o,e,t)}finally{n.release()}document.location.reload()}},Sd=class{data;constructor(e){this.data=e,this.showDialog()}async showDialog(){let e=document.getElementById("coursefinder-paymentform"),t=Se({borrow:e});L(e,"input[name='id']").value=this.data.id,L(e,"input[name='pay']").value=this.data.hash,L(t.contentnode,".course_title").textContent=this.data.title,L(t.contentnode,".course_date").textContent=this.data.date,L(t.contentnode,".course_price").textContent=this.data.price||"",e.style.display="",t.contentnode.addEventListener("click",o=>
20{o.target.nodeName==="BUTTON"&&(t.resolve(null),o.target.dataset.action==="pay"&&Number(this.data.id)>0&&this.data.hash&&e.submit())}),await t.runModal()}};async function Em(i){let e=Se();e.contentnode.appendChild(i),i.style.display="";let t=i.querySelector("button");t&&t.addEventListener("click",()=>e.resolve(null)),e.runModal()}function Sm(i){new Ed(i)}function Lm(i){new Sd(i)}x(".coursefinder__mycourses__tabs",i=>{let e=i.parentNode;if(["#history","#coursealert"].includes(location.hash)){let t=location.hash.substr(1);for(let o=0;o<i.children.length;++o){let n=i.children[o];n.dataset.view===t?(n.classList.add("active"),e.classList.add("coursefinder__mycourses--"+n.dataset.view)):(n.classList.remove("active"),e.classList.remove("coursefinder__mycourses--"+n.dataset.view))}}i.addEventListener("click",t=>{for(let o=0;o<i.children.length;++o){let n=i.children[o];t.target===n?(n.classList.add("active"),e.classList.add("coursefinder__mycourses--"+n.dataset.view)):(n.classList.remove("active"),e.classList.remove("coursefinder__mycourses--"+n.dataset.view))}})});x(".coursefinder__mycourses__showcanceled",i=>{i.addEventListener("click",()=>{let e=T(".coursefinder__mycourses__tabs > li[data-view='history'] > .count"),t=i.parentNode;t.classList.contains("coursefinder__mycourses--showcanceled")?(t.classList.remove("coursefinder__mycourses--showcanceled"),e&&i.dataset.count&&(e.textContent=i.dataset.count)):(t.classList.add("coursefinder__mycourses--showcanceled"),e&&i.dataset.totalcount&&(e.textContent=i.dataset.totalcount))})});x("#coursefinder-paymentresult",i=>{Em(i)});x(".coursefinder__registration",i=>{i.addEventListener("click",e=>{let t=e.target;t.classList.contains("cancel-registration")&&t.dataset.id?Sm(t.dataset):t.classList.contains("pay-registration")&&t.dataset.id&&Lm(t.dataset)})});async function pv(i,e){let t=ee("utwente_courses:mycourses").token,o=document.documentElement.lang?document.documentElement.lang.split("-")[0]:"en",n=G({modal:!0}),s;try{s=await Zt.UpdateCourseAlert(o,{categories:i,unsubscibecourses:e},t)}finally{n.release()}if(!s||!s.success)console.error("Error updating course alert");else if(e.length){let r=w(".coursefinder__mycourses__coursealertform__courseline"),l=r.filter(a=>e.includes(Number(a.dataset.id)));l.length&&r.length===l.length?r[0].closest(".coursefinder__mycourses__coursealertform__col").remove():l.length&&l.forEach(a=>a.remove())}}async function hv(){let i=ee("utwente_courses:mycourses").token,e=document.documentElement.lang?document.documentElement.lang.split("-")[0]:"en",t=G({modal:!0}),o;try{o=await Zt.UnsubscribeCourseAlert(e,i)}finally{t.release()}!o||!o.success?console.error("Error while unsubscribe course alert"):L(".coursefinder__mycourses").classList.add("coursefinder__mycourses--unsubscribedcoursealert")}x(".coursefinder__mycourses__coursealertunsubscribeform",i=>{i.addEventListener("submit",e=>{e.preventDefault(),hv()})});x(".coursefinder__mycourses__coursealertform",i=>{i.addEventListener("submit",e=>{e.preventDefault();let t=w(i,"input[name='categories']:checked").map(n=>parseInt(n.value)),o=w(i,"input[name='course']:not(:checked)").map(n=>parseInt(n.value));pv(t,o)})});M();var _r=class{constructor(e){this.node=e,this.pagenode=e.closest(".coursefinder__page");for(let t of this.node.querySelectorAll(".coursefinder__detaillist__footer")){let o=t.closest("li");t.addEventListener("click",n=>{let s=null;n.target.closest(".toggle-description")?s=o.querySelector(".coursefinder__detaillist__description"):n.target.closest(".toggle-courses")&&(s=o.querySelector(".coursefinder__detaillist__courses")),s&&this.toggleContent(s)})}for(let t of this.node.querySelectorAll(".coursefinder__detaillist__compacttitle"))t.addEventListener("click",o=>{let n=t.parentNode.querySelector(".coursefinder__detaillist__courses");n&&this.toggleContent(n)});for(let t of this.node.querySelectorAll(".close"))t.addEventListener("click",o=>{let n=o.target.closest(".showfullcontent");n&&this.toggleContent(n)});window.addEventListener("resize",t=>this.onRefresh(t)),window.addEventListener("load",t=>this.onRefresh(t)),window.addEventListener("wh:refresh",t=>this.onRefresh(t)),this.onRefresh()}onRefresh(e){this.pagenode.classList.contains("coursefinder__page--detail")&&(this.shortenDescriptions(),this.checkDescriptionHeight())}shortenDescriptions(){for(let e of this.node.querySelectorAll(".fulldescription"))this.shortenDescription(e)}shortenDescription(e){let o=e.clientHeight;if(o<65){e.parentNode.classList.remove("hasshortdescription"),e.parentNode.children.length>1&&e.parentNode.removeChild(e.parentNode.children[1]);return}e.parentNode.classList.add("hasshortdescription");let n=e.parentNode.children.length>1?e.parentNode.children[1]:null;n||(n=p("span",{class:"shortdescription"}),e.parentNode.appendChild(n)),n.textContent="";let s=e.textContent.split(" ");o=n.clientHeight;let r="";for(;o<=65&&s.length;){let l=r+(r!=""?" ":"")+s.shift();if(n.textContent=l,o=n.clientHeight,o>
2065){n.textContent=r.substr(0,r.length-3);return}r=l}}toggleContent(e){let t=e.clientHeight,o=e.children[0].clientHeight;e.classList.contains("showfullcontent")?(e.style.maxHeight=t+"px",e.clientHeight,e.classList.add("onhidefullcontent"),e.style.maxHeight="",e.classList.remove("showfullcontentready"),e.classList.contains("coursefinder__detaillist__courses")&&e.closest("li").classList.remove("showcourses"),setTimeout(function(){e.classList.remove("showfullcontent"),e.classList.remove("onhidefullcontent")},300)):(e.classList.remove("onhidefullcontent"),o>t&&(e.style.maxHeight=t+"px",e.clientHeight,e.style.maxHeight=o+"px",e.classList.contains("coursefinder__detaillist__courses")&&e.closest("li").classList.add("showcourses"),setTimeout(function(){e.style.maxHeight=""},300)),e.classList.add("showfullcontent"),setTimeout(function(){e.classList.add("showfullcontentready")},300))}checkDescriptionHeight(){for(let e of this.node.querySelectorAll(".coursefinder__detaillist__description"))this.toggleMoreVisibility(e)}toggleMoreVisibility(e){let t=e.parentNode.querySelector(".toggle-description");if(!t)return;e.children[0].clientHeight<65?t.style.display="none":t.style.display=""}};M();var br=class{node;pagenode;titlenode;filterids;language;navnode;tablenode;calendardata=[];popupnode=null;mobileview;maxmonths;monthtable;listcalendarnode=null;courseids=[];activemonth={month:0,year:0,monthname:""};closefn=()=>{};pageid;constructor(e,t={pageid:0}){this.node=e,this.pagenode=e.closest(".coursefinder__page"),this.pageid=t.pageid,this.titlenode=p("div",{class:"monthname"}),this.filterids=[],this.language=document.documentElement.lang?document.documentElement.lang.split("-")[0]:"en",this.navnode=p("div",{class:"coursefinder__calendar__nav"},this.titlenode,p("div",{class:"previousmonth UT-icon-UT_icon_43_arrow-left-16px"}),p("div",{class:"nextmonth UT-icon-UT_icon_44_arrow-right-16px"})),this.node.appendChild(this.navnode);let o=this.node.dataset?JSON.parse(this.node.dataset.timetable):[];this.mobileview=this.checkViewMode(!0);let n=null;o.length&&(n=new Date(o[o.length-1].timestamp*1e3)),this.calendardata=[];let s=null,r=-1;for(let a=0;a<o.length;++a){let d=new Date(o[a].timestamp*1e3),c=Cd(d);r!==c&&(s&&s.node.children.length>5&&s.node.insertBefore(p("li",{class:"course course--more"},s.node.children.length-4+" more"),s.node.children[4]),s={node:p("ul",{class:"coursefinder__calendar__courses"}),timestamp:c},this.calendardata.push(s),r=c),s&&s.node.appendChild(p("li",{title:o[a].title,"data-tag":o[a].tag,"data-courseid":o[a].courseid,class:"course course--"+o[a].type,"data-id":o[a].id},p("span",{class:"name"},o[a].title)))}s&&(s.node.children.length>5&&s.node.insertBefore(p("li",{class:"course course--more"},R("utwente_courses:webfeatures.frontend.js.xmore",s.node.children.length-4)),s.node.children[4]),this.calendardata.push(s));let l=n?{month:n.getMonth(),year:n.getFullYear()}:{month:new Date().getMonth(),year:new Date().getFullYear()};if(this.maxmonths=l.year*12+l.month,this.tablenode=p("div",{class:"coursefinder__calendar__tablewrapper"}),this.node.appendChild(this.tablenode),t.date){let a=new Date,d=a.getFullYear()*12+a.getMonth(),c=t.date.getFullYear()*12+t.date.getMonth();c<d?t.date=a:c>this.maxmonths&&(t.date=new Date(l.year,l.month,1,0,0,0))}this.monthtable=new Ld(this.tablenode,{hideweekdays:[0,6],agendaitems:this.calendardata,date:t.date||null}),this.mobileview?this.loadMobileCalendar():this.monthtable.loadTable(),this.setMonthName(),this.reachedNavLimit(0),window.addEventListener("keydown",a=>{this.mobileview||(a.key==="Escape"?this.hideMore(null):a.key==="ArrowLeft"?this.previousMonth():a.key==="ArrowRight"&&this.nextMonth())}),this.tablenode.addEventListener("wh:dateclick",a=>{let d=a,c=d.detail.target.closest(".course");if(c){if(d.detail.target.classList.contains("course--close")){this.hideMore(null);return}c.classList.contains("course--more")?this.showMore(d,c.closest(".day-container")):c.dataset.id&&this.showSerieOptions(Number(c.dataset.id),c.title)}}),this.navnode.addEventListener("click",a=>{a.target.classList.contains("previousmonth")?this.previousMonth():a.target.classList.contains("nextmonth")&&this.nextMonth()}),window.addEventListener("resize",a=>this.checkViewMode(!1))}checkViewMode(e){let o=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<768,n=this.mobileview;return this.mobileview=o,this.pagenode.classList.toggle("coursefinder__page--mobile",this.mobileview),o!==n&&!e&&this.switchView(),this.mobileview}switchView(){this.mobileview?(this.tablenode.replaceChildren(),this.loadMobileCalendar(
20)):(this.listcalendarnode&&this.listcalendarnode.remove(),this.listcalendarnode=null,this.tablenode.appendChild(this.monthtable.generateTable(this.monthtable.year,this.monthtable.month)),this.setMonthName(),this.courseids&&this.filterCourses(this.courseids))}loadMobileCalendar(){this.listcalendarnode=p("div",{class:"coursefinder__listcalendar"}),this.node.appendChild(this.listcalendarnode),this.listcalendarnode.addEventListener("click",r=>{let l=r.target.closest("li.course");if(l){document.location.href="./"+l.dataset.courseid+"/"+l.dataset.tag+"/?serie="+l.dataset.id+"#signup";return}let a=r.target.closest(".month__title");a&&this.toggleListMonth(a.parentNode)});let e=Cm(this.language),t=Cd(new Date),o=this.monthtable.year+12*this.monthtable.month,n=-1,s=null;for(let r=0;r<this.calendardata.length;++r){if(t>this.calendardata[r].timestamp)continue;let l=new Date(this.calendardata[r].timestamp),a=l.getMonth(),d=l.getFullYear(),c=l.getDate(),h=l.getDay(),m=d+a*12;(m!==n||!s)&&(s=p("div",{class:"month"+(o===m?" active":""),"data-year":d,"data-month":a},p("div",{class:"month__title"},e.months[a]+" "+d,p("span",{class:"month__toggle"},p("span",{class:"more UT-icon-UT_icon_46_arrow-down-16px"}),p("span",{class:"less UT-icon-UT_icon_45_arrow-up-16px"})))),this.listcalendarnode.appendChild(s));let u=p("div",{class:"month__day"},p("div",{class:"month__day__title"+(t===this.calendardata[r].timestamp?" today":"")},e.days_short[h]+" "+c+" "+e.months[a]));u.appendChild(this.calendardata[r].node),s.appendChild(u),n=m}this.filterCourses(this.courseids)}toggleListMonth(e){if(e.classList.contains("active"))e.style.maxHeight=e.clientHeight+"px",e.classList.remove("active"),e.clientHeight,e.style.maxHeight="";else{let t=Number(e.dataset.year),o=Number(e.dataset.month);o>-1&&o<12&&t>0&&(this.monthtable.year=t,this.monthtable.month=o);let n=0;for(let s=0;s<e.children.length;++s)n+=e.children[s].clientHeight;e.style.maxHeight=n+"px",e.classList.add("active"),setTimeout(function(){e.style.maxHeight=""},300)}}filterCourses(e){e||(e=[]),this.courseids=e;let t=[],o=null,n=0;for(let s=0;s<this.calendardata.length;++s){let r=0;for(let l=0;l<this.calendardata[s].node.children.length;++l){if(this.listcalendarnode&&!this.calendardata[s].node.parentNode)continue;let a=this.calendardata[s].node.children[l];if(a.dataset.courseid){let d=Number(a.dataset.courseid);e.indexOf(d)>-1?(a.style.display="",++r):a.style.display="none"}else this.calendardata[s].node.removeChild(a)}if(this.listcalendarnode){let l=this.calendardata[s].node.parentNode;if(l){let a=l.parentNode;(!o||o!==a||s>=this.calendardata.length-1)&&(n===0&&o?o.style.display="none":o&&(o.style.display=""),n=0,o=a),n+=r,l.style.display=r?"":"none"}}else r>5&&this.calendardata[s].node.insertBefore(p("li",{class:"course course--more"},R("utwente_courses:webfeatures.frontend.js.xmore",r-4)),this.calendardata[s].node.children[4]),r>0&&t.push(this.calendardata[s])}this.listcalendarnode||this.monthtable.refreshData(t)}createSpinner(){let o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttributeNS(null,"width","50px"),o.setAttributeNS(null,"height","50px"),o.setAttributeNS(null,"viewBox","0 0 50 50");let n=document.createElementNS("http://www.w3.org/2000/svg","circle");return n.setAttributeNS(null,"cx",String(Math.floor(50/2))),n.setAttributeNS(null,"cy",String(Math.floor(50/2))),n.setAttributeNS(null,"r",String(Math.floor(50/2-5))),n.setAttributeNS(null,"fill","none"),n.setAttributeNS(null,"stroke","#ccc"),n.setAttributeNS(null,"stroke-width",String(5)),n.setAttributeNS(null,"stroke-dasharray","110,160"),n.setAttributeNS(null,"stroke-linecap","round"),o.appendChild(n),o}async showSerieOptions(e,t){let o=Se();o.holdernode.classList.add("coursefinder__dialog"),o.contentnode.appendChild(p("div",{class:"coursefinder__dialog__loading"},p("h3",{class:"coursefinder__loadertitle"},t),p("div",{class:"coursefinder__loader"},this.createSpinner()))),o.runModal();let n=G(),s;try{s=await Zt.GetSerieOptions(this.pageid,this.language,e)}finally{n.release()}o.contentnode.replaceChildren();let r;if(s){r=p("div",{class:"coursefinder__dialog__courseoptions"},p("div",{class:"courseoptions__header"},p("div",{class:"courseoptions__image"},s.image?p("img",{src:s.image.normal.link,srcset:s.image.normal.link+" 1x,"+s.image.retina.link+" 2x",alt:""}):null),p("div",{class:"courseoptions__title"},p("h3",null,s.title),p("div",null,s.subtitle),p("a",{href:s.link},R("utwente_courses:webfeatures.frontend.js.moreinfo")))),s.series.length?p("form",{class:"courseoptions__form wh-styledinput",action:s.link+"#signup",method:"get"},p("ul",null,s.series.map(a=>p("li",{class:(a.canregister?a.isfull?"waitinglist":"open":"isfull")+(a.multiplesessions?" multiplesessions":"")},p("input",{id:"serie-"+a.id,disabled:!a.canregister,checked:a.canregister&&a.isselected,name:"serie",type:"radio",value:a.id}),p("label",{class:"radiobtn",for:"serie-"+a.id}),p("label",{class:"wh-form__optionlabel",for:"serie-"+a.id},p("div",{class:"sessions"},a.sessions.map(d=>p("div",{class:"session"},p("span",{class:"weekday"},d.weekday),p("span",{class:"date"},d.date),p("span",{class:"time"},d.time)))),p("span",{class:"note"},a.canregister?a.isfull?R("utwente_courses:webfeatures.frontend.js.waitinglist")+"*":"":R("utwente_courses:webfeatures.frontend.js.isfull")),p("span",{class:"duration"},R("utwente_courses:webfeatures.frontend.js.xdaycourse",a.sessioncount)))))),s.showmore?p("div",{class:"courseoptions__more"},p("a",{href:s.link+"#signup"},"View more")):null,p("button",{class:"wh-form__button",type:"submit"},R("utwente_courses:webfeatures.frontend.js.signup"))):p("div",{class:"courseoptions__nooptions"},R("utwente_courses:webfeatures.frontend.js.nooptionsavailable")),s.waitinglistactive?p("div",{class:"courseoptions__footer"},"*",R("utwente_courses:webfeatures.frontend.js.notewaitinglist")):null);for(let a of r.querySelectorAll("li")){let d=a.querySelector(".duration"),c=a.querySelector(".sessions");d&&c&&d.addEventListener("click",()=>{if(c.style.maxHeight="",c.classList.toggle("showall"),c.classList.contains("showall")){let h=0;for(let m=0;m<c.children.length;++m)h+=c.children[m].clientHeight;c.style.maxHeight=h+"px",setTimeout(function(){c.style.maxHeight="none"},300)}})}}else r=p("div",{class:"coursefinder__dialog__error"},"Error: no course dates found.");let l=p("div",{class:"coursefinder__dialog__close UT-icon-UT_icon_47_cross-16px"});l.addEventListener("click",()=>o.resolve(null)),o.contentnode.appendChild(l),o.contentnode.appendChild(r)}getFormattedTime(e){let t=e.getHours(),o=e.getMinutes();return(t<10?"0":"")+t+":"+(o<10?"0":"")+o}previousMonth(){this.reachedNavLimit(-1)||(this.monthtable.previousMonth(),this.setMonthName())}nextMonth(){this.reachedNavLimit(1)||(this.monthtable.nextMonth(),this.setMonthName())}showMore(e,t){let o=e.detail.date;this.popupnode&&this.hideMore(null),this.popupnode=t.cloneNode(!0),this.popupnode.insertBefore(p("span",{class:"dayofweek"},this.monthtable.translations.days_short[o.getDay()]),this.popupnode.children[0]),this.closefn=this.hideMore.bind(this),document.body.addEventListener("click",this.closefn);let n=p("span",{class:"course--close UT-icon-UT_icon_47_cross-16px"});n.addEventListener("click",()=>this.hideMore(null)),this.popupnode.appendChild(n);let s=this.popupnode.querySelector("course--more");
20s&&s.parentNode.removeChild(s),this.popupnode.className="coursefinder__calendar__daypopup",t.parentNode.appendChild(this.popupnode),this.popupnode.clientWidth,this.popupnode.classList.add("show")}hideMore(e){e&&this.popupnode&&e.target.closest(".wh-monthtable__day")===this.popupnode.closest(".wh-monthtable__day")||(document.body.removeEventListener("click",this.closefn),this.popupnode&&(this.popupnode.parentNode.removeChild(this.popupnode),this.popupnode=null))}reachedNavLimit(e){let t=new Date,o=t.getFullYear()*12+t.getMonth(),n=this.activemonth.year*12+this.activemonth.month;return n+e<=o?this.navnode.classList.add("coursefinder__calendar__nav--minlimit"):this.navnode.classList.remove("coursefinder__calendar__nav--minlimit"),n+e>=this.maxmonths?this.navnode.classList.add("coursefinder__calendar__nav--maxlimit"):this.navnode.classList.remove("coursefinder__calendar__nav--maxlimit"),n+e<o||n+e>this.maxmonths}setMonthName(){this.activemonth=this.monthtable.getActiveMonth(),this.titlenode.textContent=this.activemonth.monthname+" "+this.activemonth.year,document.location.hash.indexOf("#calendarview")===0&&(document.location.hash="#calendarview."+this.activemonth.year+"."+(this.activemonth.month+1))}};function Cm(i){return i.toUpperCase()==="DE"?{months:["Januar","Februar","M\xE4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],months_short:["Jan","Feb","M\xE4r","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],days:["Sontag","Montag","Dienstag","Mitwoch","Donnerstag","Freitag","Samstag"],days_short:["So","Mo","Di","Mi","Do","Fr","Sa"]}:i.toUpperCase()==="NL"?{months:["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December"],months_short:["Jan","Feb","Ma","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],days:["Zondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag"],days_short:["Zo","Ma","Di","Wo","Do","Vr","Za"]}:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],months_short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],days_short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]}}var Ld=class{node;language;year;month;translations=null;mindate=null;maxdate=null;selecteddate=null;tablenode=null;options;activemonth={month:0,monthname:"",year:0};constructor(e,t){this.node=e,this.options={selecteddate:t&&t.selecteddate?t.selecteddate:null,mindate:t&&t.mindate?t.mindate:new Date,maxdate:t&&t.maxdate?t.maxdate:null,date:t&&t.date?t.date:new Date,showweekdays:t&&t.showweekdays?t.showweekdays:!0,startweekday:t&&typeof t.startweekday<"u"?t.startweekday:1,hideweekdays:t&&t.hideweekdays?t.hideweekdays:[],agendaitems:t&&t.agendaitems?t.agendaitems:[]},this.options.agendaitems&&this.options.agendaitems.length&&this.options.agendaitems.sort(function(o,n){return o.timestamp-n.timestamp}),this.setMinDate(this.options.mindate||null),this.setMaxDate(this.options.maxdate||null),this.setSelectedDate(this.options.selecteddate||null),this.language=document.documentElement.lang?document.documentElement.lang.split("-")[0]:"en",this.setTranslations(this.language),this.year=this.options.date?this.options.date.getFullYear():0,this.month=this.options.date?this.options.date.getMonth():0}loadTable(){this.node&&this.node.appendChild(this.generateTable(this.year,this.month))}getTranslations(){return this.translations}setTranslations(e){this.translations=Cm(e)}refreshData(e){this.options.agendaitems=e,this.setMonth(this.year,this.month)}setMinDate(e){e&&typeof e=="object"?(e=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0),this.mindate={year:e.getFullYear(),month:e.getMonth(),day:e.getDate(),timestamp:e.getTime()}):this.mindate=null}setMaxDate(e){e&&typeof e=="object"?(e=new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59),this.maxdate={year:e.getFullYear(),month:e.getMonth(),day:e.getDate(),timestamp:e.getTime()}):this.maxdate=null}setSelectedDate(e){e&&typeof e=="object"?(e=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0),this.selecteddate={year:e.getFullYear(),month:e.getMonth(),day:e.getDate(),timestamp:e.getTime(),date:e},this.mindate&&this.selecteddate.timestamp<this.mindate.timestamp?this.selecteddate=null:this.maxdate&&this.selecteddate.timestamp>this.maxdate.timestamp&&(this.selecteddate=null)):this.selecteddate=null}
20getSelectedDate(){return this.selecteddate}nextMonth(){if(!this.tablenode)return;let e=new Date(this.year,this.month+1,1);this.year=e.getFullYear(),this.month=e.getMonth(),this.generateTable(this.year,this.month)}previousMonth(){if(!this.tablenode)return;let e=new Date(this.year,this.month-1,1);this.year=e.getFullYear(),this.month=e.getMonth(),this.generateTable(this.year,this.month)}setMonth(e,t){if(!this.tablenode)return;let o=new Date(e,t,1);this.year=o.getFullYear(),this.month=o.getMonth(),this.generateTable(this.year,this.month)}getActiveMonth(){return{month:this.month,monthname:this.translations.months[this.month],year:this.year}}generateTable(e,t){let o=new Date(e,t,1).getDay(),n=(this.options.startweekday||0)-o;for(n>0&&(n=n-7);this.options.hideweekdays.indexOf(o)>-1;)++o,o>6&&(o=0);let s=(this.options.startweekday||0)-o;s>0&&(s=s-7);let r=new Date(e,t+1,0).getDate(),l=new Date(e,t,r).getDay();for(;this.options.hideweekdays.indexOf(l)>-1;)--r,--l,l<0&&(l=6);let a=r+(7-(r-n)%7);this.tablenode?this.tablenode.replaceChildren():(this.tablenode=p("table",{class:"wh-monthtable"}),this.tablenode.addEventListener("click",m=>this.onDateClick(m)));let d;if(this.options.showweekdays){d=p("tr",null);for(let m=0;m<7;++m){let u=m+(this.options.startweekday||0);u>=7&&(u-=7),this.options.hideweekdays.indexOf(u)===-1&&d.appendChild(p("th",{class:"wh-monthtable__weekday"},p("div",null,this.translations.days_short[u])))}this.tablenode.appendChild(d)}let c=Cd(new Date),h=0;for(let m=s+(this.options.startweekday||0);m<=a;++m){let u=new Date(e,t,m),b=u.getDate(),f=u.getMonth(),g=u.getFullYear(),_=u.getTime();if((m-(s+(this.options.startweekday||0)))%7===0&&(d=W("tr"),this.tablenode.appendChild(d)),this.options.hideweekdays.indexOf(u.getDay())===-1){let y="wh-monthtable__day";f<t||g<e?y+=" wh-monthtable__day--previousmonth":(f>t||g>e)&&(y+=" wh-monthtable__day--nextmonth"),_===c&&(y+=" wh-monthtable__day--today"),(this.maxdate&&_>this.maxdate.timestamp||this.mindate&&_<this.mindate.timestamp)&&(y+=" wh-monthtable__day--disabled"),this.selecteddate&&f===this.selecteddate.month&&b===this.selecteddate.day&&g===this.selecteddate.year&&(y+=" wh-monthtable__day--selected");let E=null;for(let P=h;P<this.options.agendaitems.length;++P)if(_===this.options.agendaitems[P].timestamp){E=this.options.agendaitems[P].node,h=P+1;break}let S=p("td",{class:y,"data-date":g+"-"+(f+1)+"-"+b},p("div",{class:"day-container"},p("span",{class:"day"},b),E));d.appendChild(S)}}return this.tablenode}onDateClick(e){let t=e.target.closest(".wh-monthtable__day");if(t){e&&e.preventDefault();let o=(t.getAttribute("data-date")||"").split("-"),n=new Date(Number(o[0]),Number(o[1])-1,Number(o[2]));F(this.node?this.node:this.tablenode,"wh:dateclick",{bubbles:!1,cancelable:!0,detail:{date:n,day:n.getDate(),month:n.getMonth(),year:n.getFullYear(),timestamp:n.getTime(),target:e?e.target:null,disabled:t.classList.contains("wh-monthtable__day--disabled")}})}}};function Cd(i){return new Date(i.getFullYear(),i.getMonth(),i.getDate()).getTime()}var Lo=(Ne(),Ce(Xe)).registerTexts;Lo("utwente_courses","nl",{webfeatures:{frontend:{js:{activefilters:"Actieve filters",cancel:"Annuleren",closeregistration:"Registratie afsluiten",coursealert:"Course alert","coursealert-description":"Na inschrijving ontvang je regelmatig onze nieuwe cursussen.","coursealert-description-noresults":"Op dit moment hebben we geen cursussen beschikbaar voor deze selectie. Vul je gegevens in en je krijgt als eerste een bericht als er \xE9\xE9n beschikbaar komt.","coursealert-login":"Login","coursealert-singlecoursedescription":["Kan je niet wachten om deel te nemen aan deze cursus? We sturen je graag een mail als deze opnieuw ingepland wordt of wanneer er een plek in een reeds geplande cursus vrij komt.",`
21`,"We zullen je slechts \xE9\xE9n keer mailen. Als je er dan geen gebruik van maakt, zul je je opnieuw moeten aanmelden voor deze alert."],coursenotyetopen:"Sorry, de registratie voor deze cursus is nog niet geopend.",inxdomains:["in ",1,"  ",{t:"ifparam",p:1,value:"1",subs:["domein"],subselse:["domeinen"]}
21],isfull:"Vol",moreinfo:"Meer info",nextstep:"Volgende stap",no:"Nee",noavailableoptions:"Sorry, er zijn op dit moment  geen opties voor registratie beschikbaar",nooptionsavailable:"Sorry, er zijn geen opties beschikbaar.",notewaitinglist:"Deze cursus is volgeboekt, als je je nu registreert, word je op de wachtlijst geplaatst en automatisch ingeschreven als er een plek vrijkomt.",ok:"Ok",registrationerror_already_registered:"U heeft zich al aangemeld voor deze cursus.",registrationerror_full:"Geselecteerde datum/tijd is vol",registrationerror_nocourse:"Cursus is niet beschikbaar",registrationerror_nosession:"Geselecteerde datum/tijd is niet beschikbaar",registrationerror_title:"Fout bij verwerken registratie",registrationerror_waitinglistfull:"Wachtlijst is vol",results:[1," ",{t:"ifparam",p:1,value:"1",subs:["cursus"],subselse:["cursussen"]}," gevonden"],retry:"Retry",signup:"Inschrijven",signupfor:"Schrijf in voor:",start:"Start","submiterror-failed":"Mislukt","submiterror-prefix":"Je registratie is:","submitsuccess-description":"Je ontvangt een e-mail met verdere informatie.","submitsuccess-followupdescription":["Dit is een begeleidende cursus bij '",1,"'"],"submitsuccess-prefix":"Je registratie is:","submitsuccess-title":"Gelukt","submitsuccess-waitinglist":"U staat nu op de wachtlijst. U ontvangt een e-mail met verdere informatie.",waitinglist:"Wachtlijst",xcourses:[1," ",{t:"ifparam",p:1,value:"1",subs:["Cursus"],subselse:["Cursussen"]}],xdaycourse:[1," daagse cursus"],xmore:[1," meer"],yes:"Ja"}}}});Lo("utwente_courses","en",{webfeatures:{frontend:{js:{activefilters:"Active filters",cancel:"Cancel",closeregistration:"Close registration",coursealert:"Course alert","coursealert-description":"After registration you will regularly receive our new courses.","coursealert-description-noresults":"We currently have no curssen available for this selection. Enter your details and you will be the first to be notified when one becomes available.","coursealert-login":"Login","coursealert-singlecoursedescription":["Can\u2019t wait to join this course? Sign up for the waiting list. You will receive an alert as soon as a new course is organised or a seat in one of the current courses becomes available.",`
22`,"We will only alert you ",{t:"tag",tag:"b",subs:"once"},". If you do not use this opportunity, you will have to sign up again for this alert."],coursenotyetopen:"Sorry, you cannot register for this course yet.",inxdomains:["in ",1,"  ",{t:"ifparam",p:1,value:"1",subs:["domain"],subselse:["domains"]}],isfull:"Full",moreinfo:"More info",nextstep:"Next step",no:"No",noavailableoptions:"Sorry, there are at this time no options for registration available",nooptionsavailable:"Sorry, no options available",notewaitinglist:"This course is fully booked, if you register now, you will be placed on the waiting list and you will be enrolled if a place becomes available.",ok:"Ok",registrationerror_already_registered:"You have already registered for this course.",registrationerror_full:"Selected date/time is full",registrationerror_nocourse:"Course not available",registrationerror_nosession:"Selected date/time not available",registrationerror_title:"Error while saving registration",registrationerror_waitinglistfull:"Waiting list full",results:[1," ",{t:"ifparam",p:1,value:"1",subs:["course"],subselse:["courses"]}," found"],retry:"Retry",signup:"Sign up",signupfor:"Sign up for:",start:"Start","submiterror-failed":"Failed","submiterror-prefix":"Your registration has:","submitsuccess-description":"You will receive an email with further information.","submitsuccess-followupdescription":["This is an accompanying course for '",1,"'"],"submitsuccess-prefix":"Your registration is:","submitsuccess-title":"Successful","submitsuccess-waitinglist":"You're on the waiting list. You will receive an email with further information.",waitinglist:"Waiting list",xcourses:[1," ",{t:"ifparam",p:1,value:"1",subs:["Course"],subselse:["Courses"]}],xdaycourse:[1," day course"],xmore:[1," more"],yes:"Yes"}}}});Lo("utwente_courses","de",{webfeatures:{frontend:{js:{activefilters:"Active filters",cancel:"Cancel",closeregistration:"Close registration",coursealert:"Course alert","coursealert-description":"After registration you will regularly receive our new courses.","coursealert-description-noresults":"We currently have no curssen available for this selection. Enter your details and you will be the first to be notified when one becomes available.","coursealert-login":"Login","coursealert-singlecoursedescription":["Can\u2019t wait to join this course? Sign up for the waiting list. You will receive an alert as soon as a new course is organised or a seat in one of the current courses becomes available.",`
23`,"We will only alert you ",{t:"tag",tag:"b",subs:"once"},". If you do not use this opportunity, you will have to sign up again for this alert."],coursenotyetopen:"Sorry, you cannot register for this course yet.",inxdomains:["in ",1,"  ",{t:"ifparam",p:1,value:"1",subs:["domain"],subselse:["domains"]}],isfull:"Full",moreinfo:"More info",nextstep:"Next step",no:"No",noavailableoptions:"Sorry, there are at this time no options for registration available",nooptionsavailable:"Sorry, no options available",notewaitinglist:"This course is fully booked, if you register now, you will be placed on the waiting list and you will be enrolled if a place becomes available.",ok:"Ok",registrationerror_already_registered:"You have already registered for this course.",registrationerror_full:"Selected date/time is full",registrationerror_nocourse:"Course not available",registrationerror_nosession:"Selected date/time not available",registrationerror_title:"Error while saving registration",registrationerror_waitinglistfull:"Waiting list full",results:[1," ",{t:"ifparam",p:1,value:"1",subs:["course"],subselse:["courses"]}," found"],retry:"Retry",signup:"Sign up",signupfor:"Sign up for:",start:"Start","submiterror-failed":"Failed","submiterror-prefix":"Your registration has:","submitsuccess-description":"You will receive an email with further information.","submitsuccess-followupdescription":["This is an accompanying course for '",1,"'"],"submitsuccess-prefix":"Your registration is:","submitsuccess-title":"Successful","submitsuccess-waitinglist":"You're on the waiting list. You will receive an email with further information.",waitinglist:"Waiting list",xcourses:[1," ",{t:"ifparam",p:1,value:"1",subs:["Course"],subselse:["Courses"]}],xdaycourse:[1," day course"],xmore:[1," more"],yes:"Yes"}}}});Lo("utwente_courses","es",{webfeatures:{frontend:{js:{activefilters:"Active filters",cancel:"Cancel",closeregistration:"Close registration",coursealert:"Course alert","coursealert-description":"After registration you will regularly receive our new courses.","coursealert-description-noresults":"We currently have no curssen available for this selection. Enter your details and you will be the first to be notified when one becomes available.","coursealert-login":"Login","coursealert-singlecoursedescription":["Can\u2019t wait to join this course? Sign up for the waiting list. You will receive an alert as soon as a new course is organised or a seat in one of the current courses becomes available.",`
24`,"We will only alert you ",{t:"tag",tag:"b",subs:"once"},". If you do not use this opportunity, you will have to sign up again for this alert."],coursenotyetopen:"Sorry, you cannot register for this course yet.",inxdomains:["in ",1,"  ",{t:"ifparam",p:1,value:"1",subs:["domain"],subselse:["domains"]}],isfull:"Full",moreinfo:"More info",nextstep:"Next step",no:"No",noavailableoptions:"Sorry, there are at this time no options for registration available",nooptionsavailable:"Sorry, no options available",notewaitinglist:"This course is fully booked, if you register now, you will be placed on the waiting list and you will be enrolled if a place becomes available.",ok:"Ok",registrationerror_already_registered:"You have already registered for this course.",registrationerror_full:"Selected date/time is full",registrationerror_nocourse:"Course not available",registrationerror_nosession:"Selected date/time not available",registrationerror_title:"Error while saving registration",registrationerror_waitinglistfull:"Waiting list full",results:[1," ",{t:"ifparam",p:1,value:"1",subs:["course"],subselse:["courses"]}," found"],retry:"Retry",signup:"Sign up",signupfor:"Sign up for:",start:"Start","submiterror-failed":"Failed","submiterror-prefix":"Your registration has:","submitsuccess-description":"You will receive an email with further information.","submitsuccess-followupdescription":["This is an accompanying course for '",1,"'"],"submitsuccess-prefix":"Your registration is:","submitsuccess-title":"Successful","submitsuccess-waitinglist":"You're on the waiting list. You will receive an email with further information.",waitinglist:"Waiting list",xcourses:[1," ",{t:"ifparam",p:1,value:"1",subs:["Course"],subselse:["Courses"]}],xdaycourse:[1," day course"],xmore:[1," more"],yes:"Yes"}}}});Lo("utwente_courses","it",{webfeatures:{frontend:{js:{activefilters:"Active filters",cancel:"Cancel",closeregistration:"Close registration",coursealert:"Course alert","coursealert-description":"After registration you will regularly receive our new courses.","coursealert-description-noresults":"We currently have no curssen available for this selection. Enter your details and you will be the first to be notified when one becomes available.","coursealert-login":"Login","coursealert-singlecoursedescription":["Can\u2019t wait to join this course? Sign up for the waiting list. You will receive an alert as soon as a new course is organised or a seat in one of the current courses becomes available.",`
25`,"We will only alert you ",{t:"tag",tag:"b",subs:"once"},". If you do not use this opportunity, you will have to sign up again for this alert."],coursenotyetopen:"Sorry, you cannot register for this course yet.",inxdomains:["in ",1,"  ",{t:"ifparam",p:1,value:"1",subs:["domain"],subselse:["domains"]}],isfull:"Full",moreinfo:"More info",nextstep:"Next step",no:"No",noavailableoptions:"Sorry, there are at this time no options for registration available",nooptionsavailable:"Sorry, no options available",notewaitinglist:"This course is fully booked, if you register now, you will be placed on the waiting list and you will be enrolled if a place becomes available.",ok:"Ok",registrationerror_already_registered:"You have already registered for this course.",registrationerror_full:"Selected date/time is full",registrationerror_nocourse:"Course not available",registrationerror_nosession:"Selected date/time not available",registrationerror_title:"Error while saving registration",registrationerror_waitinglistfull:"Waiting list full",results:[1," ",{t:"ifparam",p:1,value:"1",subs:["course"],subselse:["courses"]}," found"],retry:"Retry",signup:"Sign up",signupfor:"Sign up for:",start:"Start","submiterror-failed":"Failed","submiterror-prefix":"Your registration has:","submitsuccess-description":"You will receive an email with further information.","submitsuccess-followupdescription":["This is an accompanying course for '",1,"'"],"submitsuccess-prefix":"Your registration is:","submitsuccess-title":"Successful","submitsuccess-waitinglist":"You're on the waiting list. You will receive an email with further information.",waitinglist:"Waiting list",xcourses:[1," ",{t:"ifparam",p:1,value:"1",subs:["Course"],subselse:["Courses"]}],xdaycourse:[1," day course"],xmore:[1," more"],yes:"Yes"}}}});Lo("utwente_courses","xt",{webfeatures:{frontend:{js:{activefilters:"Active filters",cancel:"Cancel",closeregistration:"Close registration",coursealert:"Course alert","coursealert-description":"After registration you will regularly receive our new courses.","coursealert-description-noresults":"We currently have no curssen available for this selection. Enter your details and you will be the first to be notified when one becomes available.","coursealert-login":"Login","coursealert-singlecoursedescription":["Can\u2019t wait to join this course? Sign up for the waiting list. You will receive an alert as soon as a new course is organised or a seat in one of the current courses becomes available.",`
26`,"We will only alert you ",{t:"tag",tag:"b",subs:"once"},". If you do not use this opportunity, you will have to sign up again for this alert."],coursenotyetopen:"Sorry, you cannot register for this course yet.",inxdomains:["in ",1,"  ",{t:"ifparam",p:1,value:"1",subs:["domain"],subselse:["domains"]}],isfull:"Full",moreinfo:"More info",nextstep:"Next step",no:"No",noavailableoptions:"Sorry, there are at this time no options for registration available",nooptionsavailable:"Sorry, no options available",notewaitinglist:"This course is fully booked, if you register now, you will be placed on the waiting list and you will be enrolled if a place becomes available.",ok:"Ok",registrationerror_already_registered:"You have already registered for this course.",registrationerror_full:"Selected date/time is full",registrationerror_nocourse:"Course not available",registrationerror_nosession:"Selected date/time not available",registrationerror_title:"Error while saving registration",registrationerror_waitinglistfull:"Waiting list full",results:[1," ",{t:"ifparam",p:1,value:"1",subs:["course"],subselse:["courses"]}," found"],retry:"Retry",signup:"Sign up",signupfor:"Sign up for:",start:"Start","submiterror-failed":"Failed","submiterror-prefix":"Your registration has:","submitsuccess-description":"You will receive an email with further information.","submitsuccess-followupdescription":["This is an accompanying course for '",1,"'"],"submitsuccess-prefix":"Your registration is:","submitsuccess-title":"Successful","submitsuccess-waitinglist":"You're on the waiting list. You will receive an email with further information.",waitinglist:"Waiting list",xcourses:[1," ",{t:"ifparam",p:1,value:"1",subs:["Course"],subselse:["Courses"]}],xdaycourse:[1," day course"],xmore:[1," more"],yes:"Yes"}}}});M();var Fd=class{language="en";hashparts=[];node;calendar=null;frontendData;myFilter;constructor(){this.node=L(".coursefinder__page"),this.myFilter=new Lt(null,{customTextSearch:!0}),this.frontendData=ee("utwente_courses:coursefinder"),this.language=document.documentElement.lang.split("-")[0];let e=T(this.node,".coursefinder__detaillist");e&&new _r(e);let t=T(this.node,".coursefinder__calendar");if(t){let o=new Date;if(this.hashparts.length>2){let n=Number(this.hashparts[1]),s=Number(this.hashparts[2]),r=o.getFullYear()*12+o.getMonth();s>0&&s<=12&&n*12+(s-1)>=r&&(o=new Date(n,s-1,1,0,0,0))}this.calendar=new br(t,{date:o,pageid:this.frontendData.pageid})}this.node.addEventListener("pagefilters:viewmodechange",o=>this.onViewModeChange(o.detail.mode)),this.node.classList.add("coursefinder__page--loaded")}onViewModeChange(e){let t="coursefinder__page--"+e;this.node.classList.contains(t)||(this.calendar&&e==="calendar"&&this.calendar.setMonthName(),this.node.classList.remove("coursefinder__page--detail"),this.node.classList.remove("coursefinder__page--list"),this.node.classList.remove("coursefinder__page--calendar"),this.node.classList.add(t))}async filter(e){let t=this.myFilter.filter(e)||[];if(e.query.searchWords){let a=G(),d;try{d=await Zt.SearchWords(this.frontendData.pageid,this.language,e.query.searchWords)}finally{a.release()}t=t.filter(c=>d.ids.includes(Number(c.dataset.id)))}let o=t.map(a=>a.dataset.id),n=t.length;w(".page-filterstoolbar__feedback").forEach(a=>a.textContent=R("utwente_base:frontend.ws2016.js.pagefilters.search-xresults",String(n))),w(".page-filters__mobiletoggle__hidelabel").forEach(a=>a.textContent=R("utwente_base:frontend.ws2016.js.pagefilters.show-xresults",String(n))),document.documentElement.classList.toggle("page-filters--noresults",!n);let s=R("utwente_courses:webfeatures.frontend.js.results",n),r=t.map(a=>
26a.dataset.filterDomain).filter((a,d,c)=>a&&c.indexOf(a)===d);w(".coursefinder__detaillist__domain").forEach(a=>{if(a.hidden=!r.includes(a.dataset.domain||""),!a.hidden){let d=0;w(a,".pagefilters__item").forEach(c=>{let h=c.dataset.id||"";c.hidden=!o.includes(h),c.hidden||d++}),w(a,"span[data-coursecount]").forEach(c=>{if(c.dataset.coursecount==="totalcoursecount")c.textContent=R("utwente_courses:webfeatures.frontend.js.xcourses",d);else if(c.dataset.coursecount==="utcoursecount"){let h=c.closest(".coursefinder__detaillist__utcourses");if(h){let m=w(h,".coursefinder__detaillist__courses__line:not([hidden])").length;c.textContent=R("utwente_courses:webfeatures.frontend.js.xcourses",m)}}else if(c.dataset.coursecount.startsWith("externalcoursecount")){let h=c.closest(".coursefinder__detaillist__source");if(h){let m=w(h,".coursefinder__detaillist__courses__line:not([hidden])").length;c.textContent=String(m),h.hidden=m===0}}})}}),this.calendar&&this.calendar.filterCourses(o.map(a=>Number(a)));let l=R("utwente_courses:webfeatures.frontend.js.inxdomains",r.length);return w(".pagefilters__filteredtags__title").forEach(a=>{a.textContent=`${s} ${l}`}),null}};x(".embeddedobject--inlinecta a[href^='#coursealert'], .showcoursealert",i=>{i.addEventListener("click",e=>{e.preventDefault(),i.blur();let t,o="",n="";if(i.nodeName==="A"){let s=i.getAttribute("href").split(":");if(s.length===2){o=s[1].replace(/[^0-9]+/g,"");let r=i.closest(".embeddedobject--inlinecta");r&&(n=L(r,".formheader__title").textContent)}}else{let s=i.closest(".coursefinder__detaillist__courses__line");s&&(n=s.title,o=s.dataset.id||"")}o&&(t={title:n,id:o,singlecourse:!0}),Fm(t)})});async function Fm(i={}){let e=T(".coursefinder__coursealertdialog__form");if(!e){console.error("Missing Course Alert form");return}e.singlecourse.value="0",i&&i.singlecourse?(e.singlecourse.value=i.id,yt(e.singlecourse,"change")):i&&i.categories&&i.categories.length&&w(e,"input[name='categories']").forEach(o=>{o.checked=i.categories.indexOf(o.value)>-1});let t=Se({borrow:e,allowcancel:!0});t.utheadernode.appendChild(p("h2",null,R("utwente_courses:webfeatures.frontend.js.coursealert"))),i&&i.title&&t.utheadernode.appendChild(p("h3",null,i.title)),i&&i.singlecourse?t.utheadernode.appendChild(p("p",null,R("utwente_courses:webfeatures.frontend.js.coursealert-singlecoursedescription"))):t.utheadernode.appendChild(p("p",null,R("utwente_courses:webfeatures.frontend.js.coursealert-description"))),t.contentnode.classList.add("courses-dialog--coursealert"),t.holdernode.classList.add("courses-dialog__holder--coursealert"),await t.runModal(),F(e,"utwente_courses:closedialog",{bubbles:!1,cancelable:!0})}async function uv(i,e){let t=Se({borrow:i,allowcancel:!0});t.utheadernode.appendChild(p("h2",null,R("utwente_courses:webfeatures.frontend.js.coursealert"))),e&&e.title&&t.utheadernode.appendChild(p("h3",null,e.title)),e&&e.singlecourse?t.utheadernode.appendChild(p("p",null,R("utwente_courses:webfeatures.frontend.js.coursealert-singlecoursedescription"))):t.utheadernode.appendChild(p("p",null,R("utwente_courses:webfeatures.frontend.js.coursealert-description"))),t.contentnode.classList.add("courses-dialog--coursealert"),t.holdernode.classList.add("courses-dialog__holder--coursealert"),await t.runModal(),i.remove()}x(".coursefinder__subscribedcoursealert[data-title]",i=>{uv(i,{title:i.dataset.title,singlecourse:!!(i.dataset.singlecourse&&i.dataset.singlecourse!=="0")})});var Ad=class extends me{userinfo=null;constructor(e){super(e),di()?.isLoggedIn()&&(this.userinfo=li()),this.node.addEventListener("utwente_courses:closedialog",o=>{o.target===this.node&&this.reset()}),this.getUrlParam("showcoursealert")&&setTimeout(()=>{Fm()},500);let t=w(this.node,"[name=subscribeas]");t.length&&(t.forEach(o=>o.addEventListener("change",()=>this.updateSubscribeAs())),this.updateSubscribeAs())}reset(){super.reset(),this.gotoPage(0)}onSubmitSuccess(e){super.onSubmitSuccess(e);let t=this.node.closest(".ut-dialog__holder");t&&w(t,".ut-dialog__header p").forEach(s=>s.remove()),window.dataLayer||(window.dataLayer=[]);let o=[];w(this.node,"input[name='categories']:checked").forEach(s=>{o.push(s.parentNode.textContent||"")});let n="external";this.userinfo&&(this.userinfo.isemployee?n="employee":this.userinfo.isstudent&&(n="student")),window.dataLayer.push({event:"coursealert-submitted","coursealert-categories":o.join(";"),"coursealert-subscribeas":n})}updateSubscribeAs(){let e=this.node.querySelector(".wh-form__fieldgroup--loginbtn");if(!e)return;let t=T(this.node,"input[name='subscribeas']:checked");t&&t.value==="utlogin"?(e.classList.remove("wh-form__fieldgroup--hidden"),this.node.classList.remove("wh-form--allowsubmit")):(e.classList.add("wh-form__fieldgroup--hidden"),this.node.classList.add("wh-form--allowsubmit"))}getUrlParam(e){let t=new URL(location.href).searchParams.get(e);return t?decodeURIComponent(t):""}};ft("utwenteCoursesFilter",()=>new Fd);oe("utwente_courses:coursealert",i=>new Ad(i));M();var Co=(Ne(),Ce(Xe)).registerTexts;Co("utwente_education","nl",{site:{studyfinder:{js:{degree:"Programme",duration:"Duur",language:"Taal",specializations:"Specialisaties",study:"Studie",w
26orkload:"Werkdruk"}}}});Co("utwente_education","en",{site:{studyfinder:{js:{degree:"Programme",duration:"Duration",language:"Language",specializations:"Specialisations",study:"Study",workload:"Workload"}}}});Co("utwente_education","de",{site:{studyfinder:{js:{degree:"Programme",duration:"Dauer",language:"Sprache",specializations:"Spezialisierungen",study:"Studie",workload:"Arbeitsbelastung"}}}});Co("utwente_education","es",{site:{studyfinder:{js:{degree:"Programme",duration:"Duration",language:"Language",specializations:"Specialisations",study:"Study",workload:"Workload"}}}});Co("utwente_education","it",{site:{studyfinder:{js:{degree:"Programme",duration:"Duration",language:"Language",specializations:"Specialisations",study:"Study",workload:"Workload"}}}});Co("utwente_education","xt",{site:{studyfinder:{js:{degree:"Programme",duration:"Duration",language:"Language",specializations:"Specialisations",study:"Study",workload:"Workload"}}}});ie();var Md=class{programmescontainer;scorecolumn=p("div",{style:"display: none;"});tablecellnames_programme=[];tablecellnames_specialization=[];tableheader=W("li",{className:"pagefilters__listview__header studyfinder__listview__header"});sortcolumn=null;myFilter;searchIndex=new ui;constructor(){this.programmescontainer=L(".studyfinderprogrammes.pagefilters__itemcontainer"),this.myFilter=new Lt(null,{customAutocomplete:!0}),this.programmescontainer.parentNode.append(this.scorecolumn),this.programmescontainer.addEventListener("pagefilters:viewmodechange",t=>this.onViewModeChange(t.detail.mode));let e=ee("utwente_education:studyfinder");if(this.tablecellnames_programme=e.columnsListviewProgramme,this.tablecellnames_specialization=e.columnsListviewSpecialization,!T(this.programmescontainer,".studyfinder__programme__specializations")){for(let t=this.tablecellnames_programme.length-1;t>=0;--t)if(this.tablecellnames_programme[t]==="specializations"){this.tablecellnames_programme.splice(t,1);break}}this.initAutoSuggest(),this.programmescontainer.addEventListener("click",t=>this.toggleSpecializations(t))}initAutoSuggest(){this.searchIndex.searchFields=["title","description"],this.searchIndex.completeSuggestFields=["title"],this.myFilter.srcItems.forEach(t=>{let o=T(t,".studyfinder__programme__title__text"),n=T(t,".studyfinder__programme__description");this.searchIndex.indexItem({id:t.dataset.id,specid:"0",title:o?.textContent||"",description:n?.textContent||"",titleNode:o,descriptionNode:n}),w(t,".studyfinder__programme--specialization").forEach(s=>{o=T(s,".studyfinder__programme__title__text"),n=T(s,".studyfinder__programme__description"),this.searchIndex.indexItem({id:t.dataset.id,specid:s.dataset.id,title:o?.textContent||"",description:n?.textContent||"",titleNode:o,descriptionNode:n})})});let e=T(".page-titlebar__form input[name=query]");e&&Ze({input:e,className:"ut-autocomplete",preventSubmit:1,fetch:(t,o)=>{let n=this.searchIndex.suggest(t).slice(0,10);o(n.map(s=>({label:s,value:s})))},onSelect:t=>{e.value=t.label??"",yt(e,"change")},customize:(t,o,n,s)=>{let r=t.parentElement.offsetWidth,l=o.left+(o.width-r);n.style.width=r+"px",n.style.left=l+"px"}})}filter(e){let t=this.myFilter.filter(e);if(t)if(e.query.searchWords){let o=this.searchIndex.search(e.query.searchWords),n=o.items.map(s=>s.id);t=t.filter(s=>n.includes(s.dataset.id)),t.forEach(s=>{let r=T(s,".studyfinder__programme__title__text");r&&this.highlightSearchTerms(o.terms,r.textContent,r);let l=T(s,".studyfinder__programme__description");l&&this.highlightSearchTerms(o.terms,l.textContent,l);let a=T(s,".studyfinder__programme__specializations");if(a){let d=0;w(a,".studyfinder__programme--specialization").forEach(c=>{let h=!1;r=T(c,".studyfinder__programme__title__text"),r&&this.highlightSearchTerms(o.terms,r.textContent,r)&&(h=!0),l=T(c,".studyfinder__programme__description"),l&&this.highlightSearchTerms(o.terms,l.textContent,l)&&(h=!0),h&&++d}),d&&(a.classList.add("show"),a.style.height="auto",a.hidden=!1)}})}else t.forEach(o=>{w(o,".ut-querymatch").forEach(n=>{let s=n.parentNode;s.replaceChild(document.createTextNode(n.textContent||""),n),s.normalize()})});return t?this.programmescontainer.classList.contains("pagefilters__itemcontainer--detailview")?t:this.itemsToListItems(t):null}highlightSearchTerms(e,t,o){let n=new RegExp(`\\b(${e.join("|")})\\b`,"ig"),s=[],r=0,l;for(;(l=n.exec(t))!==null;)s.push(t.substring(r,l.index)),s.push(p("span",{class:"ut-querymatch"}," ",l[0]," ")),r=l.index+l[0].length;if(!r)o.textContent=t;else{r<t.length&&s.push(t.substr(r)),o.replaceChildren();
26for(let a of s)typeof a=="string"?o.append(a):o.appendChild(a)}return r>0}itemsToListItems(e){let t=[];return e?.forEach((o,n)=>{let s=this.buildRow(T(o,".studyfinder__programme__content"),o.dataset);s.setAttribute("data-idx",String(n)),o.dataset.specializations||s.classList.add("nospecializations"),t.push(s),T(o,".studyfinder__programme__specializations.show")&&(s.classList.add("expanded"),t.push(...this.getSpecializationRows(o)))}),t}onViewModeChange(e){if(e==="detail")this.tableheader.remove();else{this.tableheader.replaceChildren();for(let t=0;t<this.tablecellnames_programme.length;++t){let o="";switch(this.tablecellnames_programme[t]){case"degree":o=R("utwente_education:site.studyfinder.js.degree");break;case"title":o=R("utwente_education:site.studyfinder.js.study");break;case"duration":o=R("utwente_education:site.studyfinder.js.duration");break;case"time":o=R("utwente_education:site.studyfinder.js.workload");break;case"languages":o=R("utwente_education:site.studyfinder.js.language");break;case"specializations":o=R("utwente_education:site.studyfinder.js.specializations");break;case"workload_curiousu":o=R("utwente_education:site.studyfinder.js.workload");break}let n=W("div",{className:"col--"+this.tablecellnames_programme[t],textContent:o,dataset:{name:this.tablecellnames_programme[t]}});n.addEventListener("click",s=>this.sortColumn(n)),this.tableheader.appendChild(n)}this.programmescontainer.insertBefore(this.tableheader,this.programmescontainer.firstChild)}}sortColumn(e){let t=e!==this.sortcolumn;t&&this.sortcolumn&&this.sortcolumn.classList.remove("sortactive"),this.sortcolumn=e,this.sortcolumn.classList.add("sortactive");let o=e.classList.contains("sort-asc");t||(o?(e.classList.remove("sort-asc"),o=!1):(e.classList.add("sort-asc"),o=!0));let n=this.sortcolumn===this.scorecolumn,s=[];for(let r of w(this.programmescontainer,n?".studyfinder__programme--mainprogramme[data-sort]":".studyfinder__programme--mainprogramme .cell--"+e.dataset.name)){let l=[],a=n?r.nextSibling:r.parentNode.nextElementSibling;for(;a&&a.classList.contains("studyfinder__programme--specialization");)l.push({text:n?a.dataset.sort?this.getSortText(a):1e3+Number(a.dataset.specid):this.getSortText(T(a,".cell--"+e.dataset.name)),row:a}),a=a.nextElementSibling;s.push({text:this.getSortText(r),row:n?r:r.parentNode,specializations:this.sortList(l,o)})}s=this.sortList(s,o);for(let r=0;r<s.length;++r){this.programmescontainer.appendChild(s[r].row);for(let l=0;l<s[r].specializations.length;++l)this.programmescontainer.appendChild(s[r].specializations[l].row)}}sortDetails(e){this.sortcolumn=e;let t=!0,o=[];for(let n of w(this.programmescontainer,".studyfinder__programme:not(.studyfinder__programme--specialization)")){let s=[],r;for(let l of w(n,".studyfinder__programme--specialization"))r||(r=l.parentNode),s.push({text:l.dataset.sort?this.getSortText(l):1e3+Number(l.dataset.specid),node:l});if(s.length){s=this.sortList(s,t);for(let l of s)r.appendChild(l.node);for(let l=1;l<r.childNodes.length-s.length;++l)r.appendChild(r.childNodes[1])}o.push({text:this.getSortText(n),node:n})}o=this.sortList(o,t);for(let n of o)this.programmescontainer.appendChild(n.node)}toggleSpecializations(e,t){if(e&&!e.target.closest(".togglespecializations"))return;e&&e.preventDefault();let o=t||(e?.target).closest(".studyfinder__programme");if(!o)return;if(!this.programmescontainer.classList.contains("pagefilters__itemcontainer--detailview")){if(o.classList.contains("expanded")){for(;o.nextElementSibling?.classList.contains("studyfinder__programme--specialization");)o.nextElementSibling.remove();o.classList.remove("expanded");return}let s=this.myFilter.srcItems.find(r=>r.dataset.id===o.dataset.id);if(s){let r=this.getSpecializationRows(s),l=o;r.forEach(a=>{l.after(a),l=a})}o.classList.add("expanded");return}Am(o)}getSpecializationRows(e){let t=[];return w(e,".studyfinder__programme--specialization").forEach(o=>{let n=this.buildRow(o,e.dataset);t.push({text:this.sortcolumn?this.getSortText(T(n,".cell--"+this.sortcolumn.dataset.name)):"",node:n})}),this.sortcolumn&&(t=this.sortList(t,this.sortcolumn.classList.contains("sort-asc"))),t.map(o=>o.node)}getSortText(e){return e?e.dataset.sort?Number(e.dataset.sort):e.innerHTML.replace(/<\/?[^>]+(>|$)/g,"").toUpperCase()+" - "+e.parentNode.dataset.idx:""}sortList(e,t){return[...e].sort((o,n)=>typeof o.text=="number"&&typeof n.text=="number"?(o.text-n.text)*(t?1:-1):String(o.text).localeCompare(String(n.text))*(t?1:-1))}buildRow(e,t){let o=e.classList.contains("studyfinder__programme--specialization"),n=o?this.tablecellnames_specialization:this.tablecellnames_programme,s=W("li",{className:"studyfinder__programme studyfinder__programme--list pagefilters__listview__item pagefilters__item",dataset:t});o?s.classList.add("studyfinder__programme--specialization"):s.classList.add("studyfinder__programme--mainprogramme");let r=e.closest(".studyfinder__programme__link");r&&(s.setAttribute("data-link",r.href),s.addEventListener("click",l=>{t.specializations&&l.target.closest(".togglespecializations")||(l.preventDefault(),ce(s.dataset.link))}));for(let l=0;l<n.length;++l){let a=n[l],d=W("div",{className:"cell--"+a}),c=T(e,"."+a);c?(c.dataset.sort&&d.setAttribute("data-sort",c.dataset.sort),d.appendChild(c.cloneNode(!0))):(a==="specializations"||a==="duration")&&d.setAttribute("data-sort","0"),c||d.appendChild(W("span",{textContent:"\xA0"})),a==="specializations"&&c&&d.classList.add("togglespecializations"),s.appendChild(d)}return s}};x(".studyfinderprogrammes:not(.pagefilters__itemcontainer)",i=>{i.addEventListener("click",e=>{if(e&&!e.target.closest(".togglespecializations"))return;e.preventDefault();let t=(e?.target).closest(".studyfinder__programme");t&&Am(t)})});function Am(i){let e=T(i,".studyfinder__programme__specializations");e&&(e.classList.contains("show")?(e.parentNode.classList.remove("studyfinder__programme--specializationsvisible"),e.style.height=e.clientHeight+"px",e.classList.add("beforehide"),e.clientWidth,e.classList.remove("show"),e.style.height="0px",setTimeout(()=>{e.classList.remove("beforehide"),e.hidden=!0},300)):(e.hidden=!1,e.style.height=e.children[0].clientHeight+"px",e.clientWidth,e.classList.add("show"),e.parentNode.classList.add("studyfinder__programme--specializationsvisible"),setTimeout(function(){e.classList.contains("show")&&(e.style.height="auto")},300)))}ft("studyFinderFilter",()=>new Md);x(".embeddedobject__studylist .summary__morebutton",i=>{let e=i.closest(".embeddedobject__studylist"),t=i.parentElement;e.addEventListener("ws:foldable-status",o=>{o.detail.open||setTimeout(()=>{t.hidden=!1,w(e,".summary__item--showing").forEach(s=>{s.classList.remove("summary__item--showing"),s.hidden=!0})},200)}),i.addEventListener("click",()=>{w(e,".summary__item[hidden]").forEach(o=>{o.classList.add("summary__item--showing"),o.hidden=!1}),t.hidden=!0})});M();x(".scholarshipfinder__items",i=>{setTimeout(()=>{i.classList.add("scholarshipfinder--show")},200)});M();var{createService:_v}=(Ao(),Ce(Fo)),Mm=_v("utwente_education:service");M();function bv(){window.addEventListener("resize",Dd),Dd()}function Dd(){if(window.innerWidth<=640)return;let i=document.querySelectorAll(".embeddedobject.imageblock > img[data-wide]"),e=i.length;for(let t of i){let o=t.getAttribute("data-wide");o&&(t.src=o),t.removeAttribute("data-wide"),e--}e<=0&&window.removeEventListener("resize",Dd)}var qd=0,wv=3;function Id(i,e="foldablecontent"){i.classList.add(e+"--open");let t=i.querySelector("."+e+"__foldcontainer");t.style.height="auto",t.style.overflow="inherit"}function Pm(i="foldablecontent"){for(let e of document.querySelectorAll("."+i+":not(."+i+"--active)")){e.classList.add(i+"--active");let t=e.querySelector("."+i+"__title"),o=e.querySelector("."+i+"__foldcontainer"),n=e.querySelector("."+i+"__text");if(!o){console.warn("No expandable content for",e);continue}let s=l=>{l.detail.open?Id(e,i):(e.classList.remove(i+"--open"),o.style.height="")},r=l=>{l.type=="touchend"&&l.preventDefault(),!(qd>=wv)&&(e.classList.contains(i+"--disabled")||(e.classList.toggle(i+"--open")?(o.style.height=0,o.classList.add(i+"__foldcontainer--active"),o.style.height=n.getBoundingClientRect().height+"px"):(o.style.overflow="",o.style.height=n.getBoundingClientRect().height+"px",o._wsTmpHeight=getComputedStyle(o).height,o.classList.add(i+"__foldcontainer--active"),o.style.height="0"),F(e,"ws:foldable-status",{bubbles:!0,cancelable:!1,detail:{open:e.classList.contains(i+"--open")}})))};t.addEventListener("click",r),e.addEventListener("ws:foldable-toggle",r),e.addEventListener("ws:foldable-set",s),t.addEventListener("touchstart",()=>qd=0,{passive:!0}),t.addEventListener("touchmove",()=>++qd,{passive:!0}),t.addEventListener("touchend",r),o.addEventListener("transitionend",l=>{l.currentTarget==l.target&&(o.classList.remove(i+"__foldcontainer--active"),e.classList.contains(i+"--open")?(o.style.height="auto",o.style.overflow="inherit"):o.style.height="")}
26)}}function vv(i){if(i&&!i.target.closest(".togglespecializations"))return;i&&i.preventDefault();let e=i.target.closest(".studyfinder__programme");if(!e)return;let t=e.querySelector(".programme_specializations");t&&(t.classList.contains("show")?(t.style.height=t.clientHeight+"px",t.clientWidth,t.classList.remove("show"),t.style.height="0px"):(t.style.height=t.children[0].clientHeight+"px",t.clientWidth,t.classList.add("show"),setTimeout(function(){t.classList.contains("show")&&(t.style.height="auto")},300)))}function xv(i){console.info("Initializing StudyFinder widget",i);let e=i.querySelector(".sfwidget__showall");e&&e.addEventListener("click",t=>yv(t)),i.addEventListener("click",vv)}function yv(i){console.log(q),i.target.closest(".embeddedobject").classList.add("sfwidget--expand")}x(".embeddedobject__studyfinder",i=>xv(i));x(".embeddedobject",i=>{let e=i.previousElementSibling;if(e&&(e.nodeName=="P"||e.nodeName=="H2"||e.nodeName=="H3"||e.nodeName=="H4")&&(e.innerHTML==""||e.innerHTML=="<br>")){let t=e.previousElementSibling;t&&t.classList.contains("embeddedobject")&&i.parentElement.removeChild(e)}});K(function(){bv()});var Mo=(Ne(),Ce(Xe)).registerTexts;Mo("utwente_education","nl",{site:{transferwidget:{js:{gotomaster:"Ga naar deze masteropleiding",gotopremaster:"Lees meer over het pre-masterprogramma",noresults:["Er zijn bij ons geen mogelijkheden bekend om met jouw vooropleiding door te stromen naar een masteropleiding aan de UT. Denk je dat je met jouw bachelor toch toegelaten kunt worden tot een bepaalde master? ",{t:"a",link:"https://www.utwente.nl/onderwijs/student-services/contact/",linkparam:0,target:"",subs:"Neem dan contact op."}],noresults_this:["Er zijn bij ons geen mogelijkheden bekend om met jouw vooropleiding door te stromen naar de master ",1," aan de UT. Denk je dat je met jouw bachelor toch toegelaten kunt worden? ",{t:"a",link:" https://www.utwente.nl/onderwijs/master/contact/",linkparam:0,target:"",subs:"Neem dan contact op."}],noresults_title:"Geen doorstroommogelijkheden gevonden",noroutes:["Voor deze opleiding is er op dit moment geen doorstroominformatie bekend. Voor vragen kun je altijd ",{t:"a",link:"https://www.utwente.nl/onderwijs/master/contact/",linkparam:0,target:"",subs:"contact"}," met ons opnemen."]}}}});Mo("utwente_education","en",{site:{transferwidget:{js:{gotomaster:"Go to this master",gotopremaster:"Read more about the pre-masters\u2019s programme",noresults:["With your previous education, there are no transfer possibilities to UT master\u2019s that we are aware of. Do you think your bachelor\u2019s might still be sufficiently related to one of our master\u2019s or do you have questions about your eligibility? ",{t:"a",link:"https://www.utwente.nl/en/education/student-services/contact/",linkparam:0,target:"",subs:"Contact us!"}],noresults_this:["We are not aware of any transfer possibilities to the Master\u2019s in ",1," at UT with your current programme. Do you think your bachelor\u2019s might still be sufficiently related? ",{t:"a",link:"https://www.utwente.nl/en/education/master/contact/",linkparam:0,target:"",subs:"Contact us!"}],noresults_title:"No transfer options found",noroutes:["No transfer information is currently available for this study programme. For questions, you can ",{t:"a",link:"https://www.utwente.nl/en/education/master/contact/",linkparam:0,target:"",subs:"contact us"},"."]}}}});Mo("utwente_education","de",{site:{transferwidget:{js:{gotomaster:"Go to this master",gotopremaster:"Read more about the pre-master's programme",noresults_this:["We are not aware of any transfer possibilities to the Master\u2019s in ",1," at UT with your current programme. Do you think your bachelor\u2019s might still be sufficiently related? ",{t:"a",link:"https://www.utwente.nl/en/education/master/contact/",linkparam:0,target:"",subs:"Contact us!"}],noresults_title:"No transfer options found",noroutes:["F\xFCr diesen Studiengang gibt es derzeit keine Informationen zum Transfer. Du kannst uns jederzeit ",{t:"a",link:"https://www.utwente.nl/en/education/master/contact/",linkparam:0,target:"",subs:"kontaktieren"},"."],noresults:["With your previous education, there are no transfer possibilities to UT master\u2019s that we are aware of. Do you think your bachelor\u2019s might still be sufficiently related to one of our master\u2019s or do you have questions about your eligibility? ",{t:"a",link:"https://www.utwente.nl/en/education/student-services/contact/",linkparam:0,target:"",subs:"Contact us!"}]}}}});Mo("utwente_education","es",{site:{transferwidget:{js:{gotomaster:"Go to this master",gotopremaster:"Read more about the pre-masters\u2019s programme",noresults:["With your previous education, there are no transfer possibilities to UT master\u2019s that we are aware of. Do you think your bachelor\u2019s might still be sufficiently related to one of our master\u2019s or do you have questions about your eligibility? ",{t:"a",link:"https://www.utwente.nl/en/education/student-services/contact/",linkparam:0,target:"",subs:"Contact us!"}],noresults_this:["We are not aware of any transfer possibilities to the Master\u2019s in ",1," at UT with your current programme. Do you think your bachelor\u2019s might still be sufficiently related? ",{t:"a",link:"https://www.utwente.nl/en/education/master/contact/",linkparam:0,target:"",subs:"Contact us!"}
26],noresults_title:"No transfer options found",noroutes:["No transfer information is currently available for this study programme. For questions, you can ",{t:"a",link:"https://www.utwente.nl/en/education/master/contact/",linkparam:0,target:"",subs:"contact us"},"."]}}}});Mo("utwente_education","it",{site:{transferwidget:{js:{gotomaster:"Go to this master",gotopremaster:"Read more about the pre-masters\u2019s programme",noresults:["With your previous education, there are no transfer possibilities to UT master\u2019s that we are aware of. Do you think your bachelor\u2019s might still be sufficiently related to one of our master\u2019s or do you have questions about your eligibility? ",{t:"a",link:"https://www.utwente.nl/en/education/student-services/contact/",linkparam:0,target:"",subs:"Contact us!"}],noresults_this:["We are not aware of any transfer possibilities to the Master\u2019s in ",1," at UT with your current programme. Do you think your bachelor\u2019s might still be sufficiently related? ",{t:"a",link:"https://www.utwente.nl/en/education/master/contact/",linkparam:0,target:"",subs:"Contact us!"}],noresults_title:"No transfer options found",noroutes:["No transfer information is currently available for this study programme. For questions, you can ",{t:"a",link:"https://www.utwente.nl/en/education/master/contact/",linkparam:0,target:"",subs:"contact us"},"."]}}}});Mo("utwente_education","xt",{site:{transferwidget:{js:{gotomaster:"Go to this master",gotopremaster:"Read more about the pre-masters\u2019s programme",noresults:["With your previous education, there are no transfer possibilities to UT master\u2019s that we are aware of. Do you think your bachelor\u2019s might still be sufficiently related to one of our master\u2019s or do you have questions about your eligibility? ",{t:"a",link:"https://www.utwente.nl/en/education/student-services/contact/",linkparam:0,target:"",subs:"Contact us!"}],noresults_this:["We are not aware of any transfer possibilities to the Master\u2019s in ",1," at UT with your current programme. Do you think your bachelor\u2019s might still be sufficiently related? ",{t:"a",link:"https://www.utwente.nl/en/education/master/contact/",linkparam:0,target:"",subs:"Contact us!"}],noresults_title:"No transfer options found",noroutes:["No transfer information is currently available for this study programme. For questions, you can ",{t:"a",link:"https://www.utwente.nl/en/education/master/contact/",linkparam:0,target:"",subs:"contact us"},"."]}}}});N();var{createService:Tv}=(Ao(),Ce(Fo)),jm=Tv("utwente_base:pirservice");var Po=class{constructor(){this.images=[],this.matchstr="/people-placeholder.png#replace=",this.parseFromImageElements(),this.parseFromInlineCss();let e=[];for(let t=0;t<this.images.length;++t){let o=this.images[t].url1.split("#replace=")[1];e.indexOf(o)==-1&&e.push(o),this.images[t].url2&&(o=this.images[t].url2.split("#replace=")[1],e.indexOf(o)==-1&&e.push(o))}e.length&&this.getReplacements(e)}getLinkFromResults(e){if(!this.results)return;let t=e.split("#replace=")[1];for(let o=0;o<this.results.images.length;++o)if(t==this.results.images[o].key)return this.results.images[o].url;return""}async getReplacements(e){this.results=await jm.getPIR(e),this.results&&this.results.success&&this.setReplacements()}setReplacements(){for(let e=0;e<this.images.length;++e){let t=this.getLinkFromResults(this.images[e].url1);if(t){if(this.images[e].node){let o;
26this.images[e].node.srcset&&(o=this.getLinkFromResults(this.images[e].url2)),this.images[e].node.src=t,this.images[e].node.srcset&&(this.images[e].node.srcset=t+" 1x,"+o+" 2x")}else if(this.images[e].style&&(this.images[e].style.backgroundImage="url('"+t+"')",this.images[e].selector))for(let o of document.querySelectorAll(".haspeopleplaceholder "+this.images[e].selector))o.closest(".haspeopleplaceholder").classList.remove("haspeopleplaceholder")}}}parseFromImageElements(){for(let e of document.querySelectorAll("img[src*='"+this.matchstr+"']")){let t,o;if(e.srcset){let n=e.srcset.split(",");for(let s=0;s<n.length;++s){let r=n[s].trim();r.indexOf(this.matchstr)>-1&&(r.indexOf(" 2x")>-1?o=r.split(" ")[0]:t=r.split(" ")[0])}}else t=e.src;this.images.push({node:e,url1:t,url2:o,style:null})}}parseFromInlineCss(){for(let e=0;e<window.document.styleSheets.length;++e){if(window.document.styleSheets[e].href)continue;let t=this.getAllCssRules(window.document.styleSheets[e]);if(!t)continue;let o=/(?:\(['"]?)(.*?)(?:['"]?\))/;for(let n=0;n<t.length;++n)if(t[n].style.backgroundImage){let s=o.exec(t[n].style.backgroundImage);s&&s[1].indexOf(this.matchstr)>-1&&this.images.push({node:null,url1:s[1],url2:"",style:t[n].style,selector:t[n].selectorText})}}}getAllCssRules(e){let t=[],o=e.rules||e.cssRules;for(let n=o.length-1;o&&n>=0;--n)if(o[n].media){let s=this.getAllCssRules(o[n]);s&&(t=t.concat(s))}else o[n].style&&t.push(o[n]);return t}};K(()=>{new Po});var zd=class{constructor(e){this.node=e;this.targetprogramme=this.node.dataset.targetprogramme,this.targetprogramme||(this.targetprogramme=""),this.baseurl=window.location.href.split("?")[0],this.instituteselector=T(this.node,"select[name='edutype']"),this.programmeselectors=[...this.node.querySelectorAll("select[name|='programme']")],this.resultscontainer=L(this.node,".embeddedobject__transfer__results"),this.istransferfrom=this.node.classList.contains("embeddedobject__transfer--from");let t=this.getUrlParam("edutype");this.instituteselector?(t&&this.instituteselector.querySelector("option[value='"+t+"']")&&(this.institute=t,this.instituteselector.value=t,this.onOrgChange(this.getUrlParam("programme")||"")),this.instituteselector.addEventListener("change",o=>this.onOrgChange())):(this.institute=this.node.dataset.edutype||"",!this.programmeselectors.length&&this.node.dataset.programme&&this.loadResults(this.institute,this.node.dataset.programme));for(let o of this.programmeselectors)o.addEventListener("change",n=>this.onProgChange(o))}node;targetprogramme;language=document.documentElement.lang.split("-")[0];baseurl;instituteselector;programmeselectors;resultscontainer;istransferfrom;activeprogrammes=null;institute="";pir=new Po;onProgChange(e){this.setUrlParam(),this.institute&&e.value&&this.loadResults(this.institute,e.value)}async loadResults(e,t){let o=G({modal:!1});this.node.classList.add("loading");let n={targetprogramme:this.istransferfrom?this.targetprogramme:"",language:this.language},s=await Mm.GetStudyRoutes(e,t,n);this.node.classList.remove("loading"),o.release(),this.resultscontainer.replaceChildren(),s&&s.routes?(this.node.classList.add("hasresults"),this.showRoutes(s.routes)):s&&!s.routes?(this.node.classList.remove("hasresults"),this.resultscontainer.appendChild(p("div",{class:"noresults"},p("div",{class:"studyroute__route-desc"},p("b",null,this.setHtmlContent(mt("utwente_education:site.transferwidget.js.noroutes"))))))):(this.node.classList.remove("hasresults"),this.resultscontainer.appendChild(p("div",{class:"noresults"},p("div",{class:"studyroute__route-header"},p("div",{class:"studyroute__route-icon","data-icon":"no-results"}),this.setHtmlContent(R("utwente_education:site.transferwidget.js.noresults_title"))),p("div",{class:"studyroute__route-desc"},this.setHtmlContent(s?.destination_title?mt("utwente_education:site.transferwidget.js.noresults_this",s.destination_title):mt("utwente_education:site.transferwidget.js.noresults"))))))}setHtmlContent(e,t){if(!e)return null;let o=p("div",null);return o.innerHTML=e,t&&(o.className=t),o}showRoutes(e){for(let t=0;t<e.length;++t){e[t].programmes.length===1&&e[t].programmes[0].destination_programmeid===this.targetprogramme&&(e[t].programmes=[]);let o=p("div",{class:"studyroute__route"},p("div",{class:"studyroute__route-header"},p("div",{class:"studyroute__route-icon","data-icon":e[t].icon}),this.setHtmlContent(e[t].title+(this.istransferfrom?"":'<span class="studyroute__route-count">('+e[t].programmes.length+")</span>"))),p("div",{class:"studyroute__route-desc"},this.setHtmlContent(e[t].description)),e[t].conditions?p("div",{class:"studyroute__route__conditions"},this.setHtmlContent(e[t].conditions)):null,e[t].studyadvisor?this.setHtmlContent(e[t].studyadvisor):null,e[t].show_ec&&e[t].programmes.length?p("div",{class:"studyroute__route-header-ec"},"EC"):null,e[t].programmes.map(n=>p("div",{class:"studyroute__route-programme foldableprog"},p("div",{class:"foldableprog__title"},p("div",{class:"studyroute__route-icon","data-icon":n.icon,"data-ec":n.deficiencycredits}),p("div",{class:"studyroute__route-title"},n.title),e[t].show_ec?p("div",{class:"studyroute__route-ec"},n.deficiencycredits):null),p("div",{class:"foldableprog__foldcontainer"},p("div",{class:"foldableprog__text"},p("div",{class:"studyroute__route-intro"},n.imagelink?p("div",{class:"studyroute__route-intro__image"},p("img",{src:n.imagelink,alt:""})):null,p("div",{class:"studyroute__route-intro__text"},this.setHtmlContent(n.description),this.setHtmlContent(n.conditions,"studyroute__route__conditions"),this.istransferfrom&&n.link&&!n.ishbo?p("a",{class:"studyroute__route-link",href:n.link},R("utwente_education:site.transferwidget.js.gotomaster")):null)),n.studyadvisor?this.setHtmlContent(n.studyadvisor):null)))));this.resultscontainer.appendChild(o)}Pm("foldableprog")}onOrgChange(e){this.institute=this.instituteselector?this.instituteselector.value:"",this.activeprogrammes=this.node.querySelector("select[name='programme-"+this.institute+"']");for(let t of this.programmeselectors)if(t===this.activeprogrammes||!this.activeprogrammes&&t.name==="programme"){if(t.classList.add("active"),e){let o=t.querySelector("option[value='"+e+"']");o||(o=t.querySelector("option[data-crohocode*='_"+e+"_']")),o&&(t.value=o.value)}}else t.classList.remove("active");this.activeprogrammes&&this.activeprogrammes.value?this.onProgChange(this.activeprogrammes):this.setUrlParam()}setUrlParam(){let e=new URL(this.baseurl);this.institute&&e.searchParams.set("edutype",this.institute),this.activeprogrammes&&this.activeprogrammes.value&&e.searchParams.set("programme",this.activeprogrammes.value),history.replaceState(void 0,"",e.toString())}getUrlParam(e){return new URL(location.href).searchParams.get(e)}};x(".embeddedobject__transfer",i=>new zd(i));x(".widget-studyrouteslist",i=>{let e=L(i,"select[name=program]"),t=L(i,"select[name=filtersource]");i.addEventListener("submit",o=>{o.preventDefault();let n=new URL(e.value||"",location.href);n.searchParams.set("filtersource",t.value||""),location.href=n.toString()}),new ht({select:e,settings:{modal:"off"}}),new ht({select:t,settings:{modal:"off"}})});N();function Ev(i){let t=ei(i,".embeddedobject__programmedetails").querySelectorAll(".line__description-text[data-year]");i.addEventListener("change",o=>{let n=i.value;for(let s of t)s.style.display=!n||s.dataset.year===n?"":"none"})}x(".programmedetails__yearfilter select",i=>Ev(i));M();x(".programmedetailsheader__items-button",i=>{let e,t=window.matchMedia("(max-width: 900px)"),o=window.matchMedia("(max-width: 450px)"),n=L(i.parentNode,".programmedetailsheader__items");window.addEventListener("resize",()=>{let r=!1;o.matches?n.children.length<=2&&(r=!0):n.children.length<=4&&(r=!0),i.hidden=r});let s=!1;o.matches?n.children.length<=2&&(s=!0):n.children.length<=4&&(s=!0),i.hidden=s,i.addEventListener("click",()=>{if(clearTimeout(e),n.classList.contains("programmedetailsheader__items--expanded")){n.style.height=`${n.clientHeight}px`;let r=n.children[0].clientHeight;o.matches?n.children.length>
261&&(r+=n.children[1].clientHeight):t.matches&&n.children.length>2&&(r+=n.children[3].clientHeight),n.style.height=`${r}px`,i.setAttribute("aria-expanded","false"),e=setTimeout(()=>{n.style.height="",n.classList.remove("programmedetailsheader__items--expanded"),F(n,"ws:programmedetailsheader-toggle",{bubbles:!0,cancelable:!1})},300)}else n.style.height=`${n.clientHeight}px`,n.classList.add("programmedetailsheader__items--expanded"),n.style.height=`${n.scrollHeight}px`,i.setAttribute("aria-expanded","true"),e=setTimeout(()=>{n.style.height="",F(n,"ws:programmedetailsheader-toggle",{bubbles:!0,cancelable:!1})},300)})});N();x(".widget-relatedmasterprogrammes",i=>{i.addEventListener("click",e=>{let t=e.target.closest(".widget-relatedmasterprogrammes__more");t&&w(i,".widget-relatedmasterprogrammes__programme--hidden").forEach((o,n)=>{setTimeout(()=>{o.style.opacity="0",o.classList.remove("widget-relatedmasterprogrammes__programme--hidden"),o.clientWidth,o.style.opacity="1"},100*n),Vt(t)})})});N();var Nd=class{constructor(e){e.addEventListener("wh:visibilitychange",t=>{t.detail.visible&&(t.target.classList.contains("animate--started")||(t.target.classList.add("animate--started"),setTimeout(()=>this.animate(t.target),200)))})}animate(e){w(e,".ratingchart__chart__value, .ratingchart__chart__countryvalue, .widget-studyinnumbers__percentagecircle > div, .widget-studyinnumbers__line__countryvalue").forEach(n=>{let s=1*(n.dataset.percentage?n.dataset.percentage:n.parentNode.dataset.percentage),r=Math.round(800/s);setTimeout(()=>this.setValue(n,s,r),r)}),w(e,".ratingchart__chart__bars span[data-percentage]").forEach(n=>{n.style.width=n.dataset.percentage+"%"});let o=214;w(e,".widget-studyinnumbers__percentagecircle[data-percentage]").forEach(n=>{n.dataset.percentage!="0"&&(n.querySelector("svg").style.strokeDashoffset=Math.round(o-.01*n.dataset.percentage*o))})}setValue(e,t,o){let n=1*e.textContent;n+=1,e.textContent=n,n<t&&setTimeout(()=>this.setValue(e,t,o),o)}};x(".widget-studyinnumbers",i=>new Nd(i));N();var Hd=class{constructor(e){this.node=e,this.headnode=e.querySelector("thead"),this.headnode.addEventListener("click",t=>this.onSort(t)),this.bodynode=e.querySelector("tbody")}onSort(e){let t=ei(e.target,"th");if(t){for(let o of this.node.querySelectorAll("thead th"))o===t?o.classList.contains("sort--down")?(o.classList.remove("sort--down"),o.classList.add("sort--up")):(o.classList.remove("sort--up"),o.classList.add("sort--down")):(o.classList.remove("sort--down"),o.classList.remove("sort--up"));this.sortTable(t)}}sortTable(e){let t=e.dataset.sort,o,n=[],s=-1;for(let r of this.node.querySelectorAll("tbody > tr")){let l=parseInt(r.dataset.idx),a=l;t!=="title"&&(a=r.dataset[t],a||(a="NODATE")),l!==s&&(o&&n.push(o),o={idx:l,sortval:a,lines:[]}),o.lines.push(r),s=l}n.push(o),e.classList.contains("sort--up")?n.sort(this.doSortAsc):n.sort(this.doSortDesc);for(let r=0;r<n.length;++r)for(let l=0;l<n[r].lines.length;++l){let a=n[r].lines[l];r%2?a.classList.add("odd"):a.classList.remove("odd"),this.bodynode.appendChild(a)}}doSortAsc(e,t){return e.sortval>t.sortval?-1:e.sortval<t.sortval?1:e.idx<t.idx?-1:e.idx>t.idx?1:0}doSortDesc(e,t){return e.sortval<t.sortval?-1:e.sortval>t.sortval?1:e.idx<t.idx?-1:e.idx>t.idx?1:0}};x(".embeddedobject__cssstudies",i=>new Hd(i));N();var Od=class{constructor(e,t){this.node=e,this.textcontainer=T(this.node,".embeddedobject__specializations__specialization__ellipsis"),this.node.addEventListener("click",o=>{this.node.classList.contains("hasellipsis")&&(o.target.closest(".embeddedobject__specializations__specialization__ellipsistoggle")?(V(o),this.toggle()):this.node.classList.contains("hasellipsis--open")||(V(o),this.open()))}),window.addEventListener("load",()=>this.checkEllipsis()),window.addEventListener("resize",()=>this.checkEllipsis()),document.fonts.ready.then(()=>this.checkEllipsis()),this.checkEllipsis()}checkEllipsis(){clearTimeout(this.timer),this.node.classList.remove("hasellipsis--open"),this.textcontainer.style.maxHeight="",this.ellipsisy=this.textcontainer.clientHeight,this.node.classList.toggle("hasellipsis",this.textcontainer.scrollHeight>this.ellipsisy)}toggle(){this.node.classList.contains("hasellipsis--open")?this.close():this.open()}open(){clearTimeout(this.timer),this.textcontainer.style.maxHeight=this.textcontainer.clientHeight+"px",this.node.classList.add("hasellipsis--open"),this.textcontainer.style.maxHeight=this.textcontainer.scrollHeight+"px",this.timer=setTimeout(()=>this.textcontainer.style.maxHeight="",300)}close(){clearTimeout(this.timer),this.textcontainer.style.maxHeight=this.textcontainer.clientHeight+"px",this.textcontainer.clientHeight,this.textcontainer.style.maxHeight=this.ellipsisy+"px",this.timer=setTimeout(()=>{this.textcontainer.style.maxHeight="",this.node.classList.remove("hasellipsis--open")},300)}};x(".embeddedobject__specializations__specialization",i=>new Od(i));N();var{createService:Sv}=(Ao(),Ce(Fo)),Rm=Sv("utwente_jobs:utvacatures");async function Lv(i){let e=JSON.parse(i.dataset.options),t=await Rm.ZoekVacatures(e.vw);t&&t.vacancies.length?t.vacancies.map(o=>{i.appendChild(p("a",{href:o.link,class:"widget__listitem widget__listitem--link"},p("span",{class:"widget__listitem-text"},o.title),p("span",{class:"widget__listitem-subtext"},o.subtext),p("i",{class:"widget__listitem-icon widget__listitem-icon--small UT-icon-UT_icon_52_arrow-right-round-16px"})))}):i.classList.add("novacancies"),Ie(i)}x(".widget-vacancies__list--afas",i=>Lv(i));N();var Ud=class extends ur{constructor(e){super({...e,filterpagetype:"vacancies",itemsselector:".summary__item"});let t=this.form.querySelector("select[name='offerfamily']");if(t){this.branchenode=this.form.querySelector("select[name='offerprofile']"),this.brancheoptions=[];for(let o of this.branchenode.options)this.brancheoptions.push({value:o.value,title:o.textContent});t.addEventListener("change",o=>this.updateBrancheOptions(o)),this.updateBrancheOptions({target:t})}this.updateFilters(),this.refreshFilterFeedbackUI()}updateBrancheOptions(e){let t=e.target.options[e.target.selectedIndex],o=this.branchenode.value,n=t.dataset.branche?","+t.dataset.branche+",":"";this.branchenode.replaceChildren();let s=-1;for(let r=0;r<this.brancheoptions.length;++r)(!t.dataset.branche||this.brancheoptions[r].value==""||n.indexOf(","+this.brancheoptions[r].value+",")!=-1)&&(o==this.brancheoptions[r].value&&(s=r),this.branchenode.appendChild(W("option",{value:this.brancheoptions[r].value,textContent:this.brancheoptions[r].title,selected:this.brancheoptions[r].value==o})));s>-1&&(this.branchenode.value=o)}
26showResults(){this.runFilterByDataTags()}isMatch(e){if(!super.isMatch(e))return!1;let t=this.form.elements.query.value;return!(t&&!e.textContent.toUpperCase().includes(t.toUpperCase())&&!e.dataset.plaintextsearch.toUpperCase().includes(t.toUpperCase()))}};function Cv(i){let e=i.target.closest(".ut-vacancies__tag");if(!e)return;V(i);let t=w("[name=offerprofile] option").filter(o=>o.textContent==e.textContent)[0];t&&$e(T("[name=offerprofile]"),t.value)}K(()=>{document.documentElement.classList.contains("page--vacanciesoverview")&&(window.addEventListener("click",Cv),window.filteredoverview=new Ud({filterpagetype:"vacancies"}))});M();var Wd=class{listnode;feedbackbar;constructor(e){this.listnode=L(e,".projectslist__items"),this.feedbackbar=e.previousElementSibling;let t=L(this.feedbackbar,".projectslist-viewbar__viewmode__items");pe(t,"click",o=>{let n=o.target.closest("[data-viewmode]");n&&(n.dataset.viewmode==="detailview"&&this.feedbackbar.classList.contains("projectslist-viewbar--detailview")||n.dataset.viewmode!=="detailview"&&!this.feedbackbar.classList.contains("projectslist-viewbar--detailview")||(n.dataset.viewmode==="detailview"?(this.feedbackbar.classList.remove("projectslist-viewbar--listview"),this.feedbackbar.classList.add("projectslist-viewbar--detailview"),this.listnode.classList.remove("projectslist__items--listview")):(this.feedbackbar.classList.add("projectslist-viewbar--listview"),this.feedbackbar.classList.remove("projectslist-viewbar--detailview"),this.listnode.classList.add("projectslist__items--listview"))))})}};x(".projectslist__results",i=>new Wd(i));M();var{createService:Fv}=(Ao(),Ce(Fo)),jo=Fv("utwente_voorlichting:leads");function Ro(i,e){e=e.toUpperCase();let t=i.map(o=>({text:o,pos:o.toUpperCase().indexOf(e)}));return t=t.filter(o=>o.pos>=0),t=t.sort((o,n)=>o.pos<n.pos?-1:o.pos===n.pos?0:1),t.map(o=>o.text)}function qm(i){let e=[];for(let t of i)e.push(t.title,...t.aliases);return e}var Bd=class{prep;aliasunmap=new Map;constructor(e){let t=qm(e);this.prep=new bi(t);for(let o of e)for(let n of o.aliases)this.aliasunmap.set(n,o.title)}getMatches(e){let t=[],o=this.prep.score(e),n=o.length?o[0].score*.66:0;o=o.filter(s=>s.score>n);for(let s of o.map(r=>this.aliasunmap.get(r.str)||r.str))t.includes(s)||t.push(s);return t}},$d=class{citylistpromise=null;cityprep=null;namelistpromises={};namelistprep={}},Vd={},Dm=new Map;function Im(i){let e=i.includes("school")?"school":"";return e||(e="all"),Vd[e]||(Vd[e]=new $d),Vd[e]}async function Av(i,e,t){let o=Im(i);if(e.length<=0||(o.citylistpromise||(o.citylistpromise=jo.getOrgCities(i)),e.length<=1))return;if(i.length===1&&i[0]==="school"){o.cityprep||(o.cityprep=new bi(await o.citylistpromise));let s=o.cityprep.score(e),r=s.length?s[0].score*.66:0;return s=s.filter(l=>l.score>r),s.map(l=>({label:l.str,value:l.str,group:t}))}return Ro(await o.citylistpromise,e).map(s=>({label:s,value:s,group:t}))}async function Mv(i,e,t,o,n){let s=Im(e);if(o.length<1||!t.value)return;let r=t.value;if(s.namelistpromises[r]||(s.namelistpromises[r]=jo.getOrgNames2(e,t.value)),e.length===1&&e[0]==="school"){s.namelistprep[r]||(s.namelistprep[r]=new Bd(await s.namelistpromises[r]));let a=s.namelistprep[r].getMatches(o);return Dm.set(i,a),a.map(d=>({label:d,value:d,group:n}))}return Ro(qm(await s.namelistpromises[r]),o).map(a=>({label:a,value:a,group:n}))}function Pv(i){let e=i.dataset.limittypes?i.dataset.limittypes.split(" "):[],t=i.matches(":lang(nl)")?"Bedoelde je:":"Did you mean:";Ze({input:i,className:"ut-autocomplete",preventSubmit:1,fetch:async function(o,n){let s=await Av(e,o,t);n(s||[])},onSelect:function(o){i.value=o.label??""}})}function jv(i){let e=Dm.get(i);if(i.propWhValidationSuggestion=null,e?.length&&!e.includes(i.value)){let t=i.matches(":lang(nl)")?"Bedoelde je":"Did you mean";i.propWhValidationSuggestion=p("span",{class:"wh-form__emailcorrection"}," ",t," ",p("a",{href:"#",class:"wh-form__emailcorrected",on:{pointerdown:o=>{i.value=e[0],i.propWhValidationSuggestion=null,V(o),et.getForNode(i.closest("form"))._reportFieldValidity(i)}}}," ",e[0])," ? ")}return""}function Rv(i){let e=i.dataset.limittypes?i.dataset.limittypes.split(" "):[],t=w(".utvoorl--orgselectcity input, .utvoorl--orgselectname input"),o=t.indexOf(i);if(o>0){let n=i.matches(":lang(nl)")?"Bedoelde je:":"Did you mean:";Ze({input:i,className:"ut-autocomplete",preventSubmit:1,fetch:async function(s,r){let l=await Mv(i,e,t[o-1],s,n);r(l||[])},onSelect:function(s){i.value=s.label??""}}),De(i,jv)}}x(".utvoorl--orgselectcity input",Pv);x(".utvoorl--orgselectname input",Rv);N();var Yd={},Xd={};async function qv(i,e,t){if(e.length<=0||!i.value)return;let o=i.value;if(Yd[o]||(Yd[o]=jo.listInstitutesForCountry(o)),!(e.length<=1))return Ro(await Yd[o],e).slice(0,5).map(n=>({label:n,value:n,group:t}))}async function Dv(i,e,t,o){if(t.length<1||!i.value||!e.value)return;let n=i.value+"."+e.value;Xd[n]||(Xd[n]=jo.listEducationsForInstitute(i.value,e.value));let s=await Xd[n];return Ro(s,t).slice(0,5).map(r=>({label:r,value:r,group:o}))}function Gd(i){let e=w(".utvoorl--institutecountry select, .utvoorl--institutename input, .utvoorl--instituteeducation input"),t=e.indexOf(i);if(t>0)return e[t-1]}function Iv(i){let e=Gd(i);if(!e)return console.error("Missing countryfield",i);let t=i.matches(":lang(nl)")?"Bedoelde je:":"Did you mean:";Ze({input:i,className:"ut-autocomplete",preventSubmit:1,fetch:async function(o,n){let s=await qv(e,o,t);n(s)},onSelect:function(o){i.value=o.label??""}})}function zv(i){let e=Gd(i);if(!e)return console.error("Missing institutefield",i);let t=Gd(e);if(!t)return console.error("Missing countryfield",e,i);let o=i.matches(":lang(nl)")?"Bedoelde je:":"Did you mean:";Ze({input:i,className:"ut-autocomplete",preventSubmit:1,fetch:async function(n,s){let r=await Dv(t,e,n,o);s(r)},onSelect:function(n){i.value=n.label??""}})}x(".utvoorl--institutename input",Iv);x(".utvoorl--instituteeducation input",zv);N();N();var qo=(Ne(),Ce(Xe)).registerTexts;qo("utwente_voorlichting","nl",{webfeatures:{stayoverevents:{frontend:{additionaloptions:"Extra opties registratie",agreementsummary:["U bent ermee akkoord gegaan om te betalen voor ",1," ",2," plekken voor een totaalbedrag van ",3,"."],alreadysignedup:"Dit e-mailadres is recent al gebruikt voor een registratie, neem contact met ons op via","alreadysignedup-ok":"OK",aredetailscorrect:"Kloppen deze gegevens?",back:"Terug",billingaddress_enable:"Factuuradres toevoegen",billingaddress_group:"Factuuradres",billingaddress_separate:"Apart factuuradres",billingorgname:"Organisatie",cancelregistration:"Ik wil mijn registratie annuleren",choosecourse:"Maak een keuze",choosegroup:"- Kies je groep -",choosehousing:"Kies accomodatie",choosevwoclass:"- Kies je klas -",contactice:"Contact in geval van nood (ICE)",courseaccomodation:"Programma",courselockedbydiscount:"Uw kortingscode is gekoppeld aan uw programmakeuze",dinner:"Ben je aanwezig bij het netwerkdiner in het avondprogramma?","dinner-no":"Nee","dinner-yes":"Ja",diploma:"Diploma",discountcode:"Kortingscode (optioneel)",education:"Gegevens school",housing:"Accomodatie",invoiceorgname:"Uw instituut / organisatie",login:"Login",name:"Naam","optin-preu_junior-label":"Stuur mij de Pre-U Junior nieuwsbrief",optin_photo:"Fotogebruik","optin_photo-label":"Ik geef toestemming om mijn foto te gebruiken",optin_preu_junior:"Pre-U Junior",parentlegalguardian:"Ouder / voogd (contact)",paymentmethod:"Betaalmethode",personaldetails:"Gegevens deelnemer",personaldetails_child:"Gegevens kind",placeorder:"Bestelling doorvoeren",preferredlanguage:"Voorkeurstaal",programme:"Programma",refund:"Teruggave",registerbutton:"Registreer",registrant_organization:"Uw organisatie",registrationstatus:"Registratiestatus",remarks:"Opmerkingen",school_group:"Groep",
26securepayment:"Veilige betaling",signup_login:"M/S nummer",signuptype:"Type aanmelding",signupusertype:"Aanmelden als","signupusertype-employee":"UT Medewerker","signupusertype-genootschap":"Via Genootschap voor Risicomangement","signupusertype-primo":"Via PRIMO","signupusertype-regular_signup":"Reguliere aanmelding","signupusertype-sponsor":"Via sponsor","signupusertype-student":"UT Student",soldout:"uitverkocht",specialagreement:"Speciale overeenkomst",sponsor_name:"Naam sponsor",sponsor_yournumber:"Lidmaatschaps nummer","sponsor_yournumber-ifknown":"(indien bekend)","status-expiredcode":"De kortingscode is verlopen","status-invalidcode":"De kortingscode is ongeldig","status-invalidforcourse":"De kortingscode is niet beschikbaar voor het gekozen programma","status-usedcode":"De kortingscode is al gebruikt",step:"Stap",termsandconditions:"Voorwaarden",topay:"Te betalen",totalprice:"Totaalprijs",workstudy:"Werk/studie","workstudy-choose":"Kies werk/studie","workstudy-other":"Overig","workstudy-study":"Studie","workstudy-work":"Werk"}}}});qo("utwente_voorlichting","en",{webfeatures:{stayoverevents:{frontend:{additionaloptions:"Additional options",agreementsummary:["You've agreed to pay for ",1," ",2," spots with a total amount of ",3,"."],alreadysignedup:"Your email has recently been used for this registration form, please contact us at","alreadysignedup-ok":"OK",aredetailscorrect:"Are these booking details correct?",back:"Back",billingaddress_enable:"Add billing address for invoice",billingaddress_group:"Billing address",billingaddress_separate:"Separate billing address",billingorgname:"Organization",cancelregistration:"I wish to cancel my registration",choosecourse:"Choose a course",choosegroup:"- Choose your group -",choosehousing:"Choose accomodation",choosevwoclass:"- Choose your class -",contactice:"Contact in case of emergency (ICE)",courseaccomodation:"Course and accommodation",courselockedbydiscount:"Your discount code is tied to your course selection",dinner:"Will you join the network dinner ?","dinner-no":"No","dinner-yes":"Yes",diploma:"Diploma",discountcode:"Discount code (optional)",education:"Education",housing:"Accommodation",invoiceorgname:"Your institution / organization",login:"Login",name:"Name","optin-preu_junior-label":"Send me the Pre-U Junior newsletter",optin_photo:"Photo use","optin_photo-label":"I give permission to use my photo",optin_preu_junior:"Pre-U Junior",parentlegalguardian:"Parent / legal guardian",paymentmethod:"Payment method",personaldetails:"Participant details",personaldetails_child:"Child details",placeorder:"Place order",preferredlanguage:"Preferred language",programme:"Programme",refund:"Refund",registerbutton:"Register",registrant_organization:"Your organization",registrationstatus:"Registration status",remarks:"Remarks",school_group:"Group",securepayment:"Secure Payment",signup_login:"M/S number",signuptype:"Signup type",signupusertype:"Signup as","signupusertype-employee":"UT Employee","signupusertype-genootschap":"Through Genootschap voor Risicomangement","signupusertype-primo":"Through PRIMO","signupusertype-regular_signup":"Regular signup","signupusertype-sponsor":"Through sponsor","signupusertype-student":"UT Student",soldout:"sold out",specialagreement:"Special agreement",sponsor_name:"Sponsor name",sponsor_yournumber:"Membership number","sponsor_yournumber-ifknown":"(if known)","status-expiredcode":"This code has expired","status-invalidcode":"This discount code is invalid","status-invalidforcourse":"This discount code is not available for the selected program","status-usedcode":"This code has already been used",step:"Step",termsandconditions:"Terms and conditions",topay:"To pay",totalprice:"Total price",workstudy:"Work/study","workstudy-choose":"Choose work/study","workstudy-other":"Other","workstudy-study":"Study","workstudy-work":"Work"}}}});qo("utwente_voorlichting","de",{webfeatures:{stayoverevents:{frontend:{choosevwoclass:"- W\xE4hle deinen Schuljahrgang -",additionaloptions:"Additional options",agreementsummary:["You've agreed to pay for ",1," ",2," spots with a total amount of ",3,"."],alreadysignedup:"Your email has recently been used for this registration form, please contact us at","alreadysignedup-ok":"OK",aredetailscorrect:"Are these booking details correct?",back:"Back",billingaddress_enable:"Add b
26illing address for invoice",billingaddress_group:"Billing address",billingaddress_separate:"Separate billing address",billingorgname:"Organization",cancelregistration:"I wish to cancel my registration",choosecourse:"Choose a course",choosegroup:"- Choose your group -",choosehousing:"Choose accomodation",contactice:"Contact in case of emergency (ICE)",courseaccomodation:"Course and accommodation",courselockedbydiscount:"Your discount code is tied to your course selection",dinner:"Will you join the network dinner ?","dinner-no":"No","dinner-yes":"Yes",diploma:"Diploma",discountcode:"Discount code (optional)",education:"Education",housing:"Accommodation",invoiceorgname:"Your institution / organization",login:"Login",name:"Name","optin-preu_junior-label":"Send me the Pre-U Junior newsletter",optin_photo:"Photo use","optin_photo-label":"I give permission to use my photo",optin_preu_junior:"Pre-U Junior",parentlegalguardian:"Parent / legal guardian",paymentmethod:"Payment method",personaldetails:"Participant details",personaldetails_child:"Child details",placeorder:"Place order",preferredlanguage:"Preferred language",programme:"Programme",refund:"Refund",registerbutton:"Register",registrant_organization:"Your organization",registrationstatus:"Registration status",remarks:"Remarks",school_group:"Group",securepayment:"Secure Payment",signup_login:"M/S number",signuptype:"Signup type",signupusertype:"Signup as","signupusertype-employee":"UT Employee","signupusertype-genootschap":"Through Genootschap voor Risicomangement","signupusertype-primo":"Through PRIMO","signupusertype-regular_signup":"Regular signup","signupusertype-sponsor":"Through sponsor","signupusertype-student":"UT Student",soldout:"sold out",specialagreement:"Special agreement",sponsor_name:"Sponsor name",sponsor_yournumber:"Membership number","sponsor_yournumber-ifknown":"(if known)","status-expiredcode":"This code has expired","status-invalidcode":"This discount code is invalid","status-invalidforcourse":"This discount code is not available for the selected program","status-usedcode":"This code has already been used",step:"Step",termsandconditions:"Terms and conditions",topay:"To pay",totalprice:"Total price",workstudy:"Work/study","workstudy-choose":"Choose work/study","workstudy-other":"Other","workstudy-study":"Study","workstudy-work":"Work"}}}});qo("utwente_voorlichting","es",{webfeatures:{stayoverevents:{frontend:{additionaloptions:"Additional options",agreementsummary:["You've agreed to pay for ",1," ",2," spots with a total amount of ",3,"."],alreadysignedup:"Your email has recently been used for this registration form, please contact us at","alreadysignedup-ok":"OK",aredetailscorrect:"Are these booking details correct?",back:"Back",billingaddress_enable:"Add billing address for invoice",billingaddress_group:"Billing address",billingaddress_separate:"Separate billing address",billingorgname:"Organization",cancelregistration:"I wish to cancel my registration",choosecourse:"Choose a course",choosegroup:"- Choose your group -",choosehousing:"Choose accomodation",choosevwoclass:"- Choose your class -",contactice:"Contact in case of emergency (ICE)",courseaccomodation:"Course and accommodation",courselockedbydiscount:"Your discount code is tied to your course selection",dinner:"Will you join the network dinner ?","dinner-no":"No","dinner-yes":"Yes",diploma:"Diploma",discountcode:"Discount code (optional)",education:"Education",housing:"Accommodation",invoiceorgname:"Your institution / organization",login:"Login",name:"Name","optin-preu_junior-label":"Send me the Pre-U Junior newsletter",optin_photo:"Photo use","optin_photo-label":"I give permission to use my photo",optin_preu_junior:"Pre-U Junior",parentlegalguardian:"Parent / legal guardian",paymentmethod:"Payment method",personaldetails:"Participant details",personaldetails_child:"Child details",placeorder:"Place order",preferredlanguage:"Preferred language",programme:"Programme",refund:"Refund",registerbutton:"Register",registrant_organization:"Your organization",registrationstatus:"Registration status",remarks:"Remarks",school_group:"Group",securepayment:"Secure Payment",signup_login:"M/S number",signuptype:"Signup type",signupusertype:"Signup as","signupusertype-employee":"UT Employee","signupusertype-genootschap":"Through Genootschap voor Risicomangement","signupusertype-primo":"Through PRIMO","signupusertype-regular_signup":"Regular signup","signupusertype-sponsor":"Through sponsor","signupusertype-student":"UT Student",soldout:"sold out",specialagreement:"Special agreement",sponsor_name:"Sponsor name",sponsor_yournumber:"Membership number","sponsor_yournumber-ifknown":"(if known)","status-expiredcode":"This code has expired","status-invalidcode":"This discount code is invali
26d","status-invalidforcourse":"This discount code is not available for the selected program","status-usedcode":"This code has already been used",step:"Step",termsandconditions:"Terms and conditions",topay:"To pay",totalprice:"Total price",workstudy:"Work/study","workstudy-choose":"Choose work/study","workstudy-other":"Other","workstudy-study":"Study","workstudy-work":"Work"}}}});qo("utwente_voorlichting","it",{webfeatures:{stayoverevents:{frontend:{additionaloptions:"Additional options",agreementsummary:["You've agreed to pay for ",1," ",2," spots with a total amount of ",3,"."],alreadysignedup:"Your email has recently been used for this registration form, please contact us at","alreadysignedup-ok":"OK",aredetailscorrect:"Are these booking details correct?",back:"Back",billingaddress_enable:"Add billing address for invoice",billingaddress_group:"Billing address",billingaddress_separate:"Separate billing address",billingorgname:"Organization",cancelregistration:"I wish to cancel my registration",choosecourse:"Choose a course",choosegroup:"- Choose your group -",choosehousing:"Choose accomodation",choosevwoclass:"- Choose your class -",contactice:"Contact in case of emergency (ICE)",courseaccomodation:"Course and accommodation",courselockedbydiscount:"Your discount code is tied to your course selection",dinner:"Will you join the network dinner ?","dinner-no":"No","dinner-yes":"Yes",diploma:"Diploma",discountcode:"Discount code (optional)",education:"Education",housing:"Accommodation",invoiceorgname:"Your institution / organization",login:"Login",name:"Name","optin-preu_junior-label":"Send me the Pre-U Junior newsletter",optin_photo:"Photo use","optin_photo-label":"I give permission to use my photo",optin_preu_junior:"Pre-U Junior",parentlegalguardian:"Parent / legal guardian",paymentmethod:"Payment method",personaldetails:"Participant details",personaldetails_child:"Child details",placeorder:"Place order",preferredlanguage:"Preferred language",programme:"Programme",refund:"Refund",registerbutton:"Register",registrant_organization:"Your organization",registrationstatus:"Registration status",remarks:"Remarks",school_group:"Group",securepayment:"Secure Payment",signup_login:"M/S number",signuptype:"Signup type",signupusertype:"Signup as","signupusertype-employee":"UT Employee","signupusertype-genootschap":"Through Genootschap voor Risicomangement","signupusertype-primo":"Through PRIMO","signupusertype-regular_signup":"Regular signup","signupusertype-sponsor":"Through sponsor","signupusertype-student":"UT Student",soldout:"sold out",specialagreement:"Special agreement",sponsor_name:"Sponsor name",sponsor_yournumber:"Membership number","sponsor_yournumber-ifknown":"(if known)","status-expiredcode":"This code has expired","status-invalidcode":"This discount code is invalid","status-invalidforcourse":"This discount code is not available for the selected program","status-usedcode":"This code has already been used",step:"Step",termsandconditions:"Terms and conditions",topay:"To pay",totalprice:"Total price",workstudy:"Work/study","workstudy-choose":"Choose work/study","workstudy-other":"Other","workstudy-study":"Study","workstudy-work":"Work"}}}});qo("utwente_voorlichting","xt",{webfeatures:{stayoverevents:{frontend:{additionaloptions:"Additional options",agreementsummary:["You've agreed to pay for ",1," ",2," spots with a total amount of ",3,"."],alreadysignedup:"Your email has recently been used for this registration form, please contact us at","alreadysignedup-ok":"OK",aredetailscorrect:"Are these booking details correct?",back:"Back",billingaddress_enable:"Add billing address for invoice",billingaddress_group:"Billing address",billingaddress_separate:"Separate billing address",billingorgname:"Organization",cancelregistration:"I wish to cancel my registration",choosecourse:"Choose a course",choosegroup:"- Choose your group -",choosehousing:"Choose accomodation",choosevwoclass:"- Choose your class -",contactice:"Contact in case of emergency (ICE)",courseaccomodation:"Course and accommodation",courselockedbydiscount:"Your discount code is tied to your course selection",dinner:"Will you join the network dinner ?","dinner-no":"No","dinner-yes":"Yes",diploma:"Diploma",discountcode:"Discount code (optional)",education:"Education",housing:"Accommodation",invoiceorgname:"Your institution / organization",login:"Login",name:"Name","optin-preu_junior-label":"Send me the Pre-U Junior newsletter",optin_photo:"Photo use","optin_photo-label":"I give permission to use my photo",optin_preu_junior:"Pre-U Junior",parentlegalguardian:"Parent / legal guardian",paymentmethod:"Payment method",personaldetails:"Participant details",personaldetails_child:"Child details",placeorder:"Place order",preferredlanguage:"Preferred language",programme:"Programme",refund:"Refund",registerbutton:"Register",registrant_organization:"Your organization",registrationstatus:"Registration status",remarks:"Remarks",school_group:"Group",securepayment:"Secure Payment",signup_login:"M/S number",signuptype:"Signup type",signupusertype:"Signup as","signupusertype-employee":"UT Employee","signupusertype-genootschap":"Through Genootschap voor Risicomangement","signupusertype-primo":"Through PRIMO","signupusertype-regular_signup":"Regular signup","signupusertype-sponsor":"Through sponsor","signupusertype-student":"UT Student",soldout:"sold out",specialagreement:"Special agreement",sponsor_name:"Sponsor name",sponsor_yournumber:"Membership number","sponsor_yournumber-ifknown":"(if known)","status-expiredcode":"This code has expired","status-invalidcode":"This discount code is invali
26d","status-invalidforcourse":"This discount code is not available for the selected program","status-usedcode":"This code has already been used",step:"Step",termsandconditions:"Terms and conditions",topay:"To pay",totalprice:"Total price",workstudy:"Work/study","workstudy-choose":"Choose work/study","workstudy-other":"Other","workstudy-study":"Study","workstudy-work":"Work"}}}});te();function zm(){return sessionStorage.utFormPrefill?JSON.parse(sessionStorage.utFormPrefill):{}}if(location.href.includes("?save")||location.href.includes("&save")){let i=new URL(location.href),e={};Array.from(i.searchParams.keys()).filter(t=>t.startsWith("save.")).forEach(t=>{e[t.substring(5)]=i.searchParams.get(t),i.searchParams.delete(t)}),history.replaceState(null,"",i.toString());try{sessionStorage.utFormPrefill=JSON.stringify(e)}catch{}}var bt=class extends me{emailfield;diplomafield;firstnamefield;startingyearfield;constructor(e){if(super(e),this.emailfield=e.elements.namedItem("wrd_contact_email"),this.diplomafield=e.elements.namedItem("diploma.select"),this.firstnamefield=e.elements.namedItem("wrd_firstname"),this.startingyearfield=e.elements.namedItem("expectedstartingyear.year")||e.elements.namedItem("expectedstartingyear.select"),this.emailfield&&(!this.emailfield.value||this.emailfield.closest(".ut-prefill-save-vars"))){let t=zm();if(t.diploma&&this.diplomafield){let o=[...this.diplomafield.options].find(n=>n.dataset.diplomatag===t.diploma);o&&this.setFieldValue(this.diplomafield,o.value)}t.firstname&&this.firstnamefield&&(this.firstnamefield.value=t.firstname),t.email&&this.emailfield&&(this.emailfield.value=t.email),t.expectedstartingyear&&this.startingyearfield&&(this.startingyearfield.value=t.expectedstartingyear),t.hasoptin==="true"&&(this.node.setAttribute("data-wh-form-var-skipoptin","true"),this.refreshConditions())}}onSubmitSuccess(e){let t=e;t.guid&&pt(t.guid,t.firstname)}async getFormExtraSubmitData(){let e=st(),t=Object.keys(zt()).filter(o=>o.startsWith("usertype-"))[0];return t&&(e.beaconusertype=t.substr(9)),{filledoptin:this.node.getAttribute("data-wh-form-var-skipoptin")==="false",referralinfo:e,targetinterest:document.documentElement.dataset.targetinterest||"",targetlanguage:document.documentElement.lang.substr(0,2)}}};M();ie();var Kd=class extends bt{constructor(e){super(e),this.elements.namedItem("wrd_dateofbirth")&&De(this.elements.namedItem("wrd_dateofbirth"),t=>this.checkBirthdate(t)),L("#previouspagebutton").addEventListener("click",()=>{this.onBackButton()}),L("#registerbutton").addEventListener("click",()=>{this.onRegisterButton()}),L("#loginbutton").addEventListener("click",()=>{this.onLoginButton()}),T("#cancellink")?.addEventListener("click",()=>{this.doCancel()}),w(this.node,"select[name^=round]").forEach(t=>t.addEventListener("change",()=>this.checkRoundPulldowns())),w(this.node,"input[name=signupusertype]").forEach(t=>t.addEventListener("change",()=>this.checkSignupType())),this.elements.namedItem("discountcode")?.addEventListener("input",()=>this.setFieldError(this.elements.namedItem("discountcode"),""))}checkRoundPulldowns(){let e=[];for(let t of w(this.node,"select[name^=round]")){for(let o of w(t,"option"))!o.value||o.value==="-"||(o.disabled=e.includes(o.value),o.disabled&&t.value===o.value&&(t.value=""));e.push(t.value)}}shouldLogin(){let e=this.node.querySelector("input[name=signupusertype]:checked");return e&&["student","employee"].includes(e.value)}checkSignupType(){let e=this.shouldLogin();L("#registerbutton").style.display=e?"none":"",L("#loginbutton").style.display=e?"":"none"}mapError(e){return e==="__curiousu_maxdate"?p("span",null,"You need to be at least 18 years old to join CuriousU."):e}checkBirthdate(e){if(e.dataset.minimumdate&&new Date(e.value)<new Date(e.dataset.minimumdate))return this.mapError(e.dataset.mindateerror);if(e.dataset.maximumdate&&new Date(e.value)>new Date(e.dataset.maximumdate))return this.mapError(e.dataset.maxdateerror)}async onBackButton(){await this.gotoPage(0)}async onLoginButton(){this.onRPC(Promise.withResolvers().promise);let e=new URL(location.href);e.searchParams.set("login","1"),location.href=e.toString()+"#registerform-personaldetails-anchor"}async onRegisterButton(){let e=this.elements.namedItem("discountcode");if(e&&this.setFieldError(e,""),!(await this.validate(L("#formpage_naw"))).valid)return;let o=await this.invokeRPC("verifyFirstPage");if(o.status==="emailinuse"){await Ae(p("p",null,v("utwente_voorlichting:webfeatures.stayoverevents.frontend.alreadysignedup")," ",p("a",{href:"mailto:"+o.contactaddress},o.contactaddress)),[{result:"ok",title:v("utwente_voorlichting:webfeatures.stayoverevents.frontend.alreadysignedup-ok")}],{allowcancel:!0});return}
26if(o.status!=="ok"){let r={invalidcode:v("utwente_voorlichting:webfeatures.stayoverevents.frontend.status-invalidcode"),usedcode:v("utwente_voorlichting:webfeatures.stayoverevents.frontend.status-usedcode"),expiredcode:v("utwente_voorlichting:webfeatures.stayoverevents.frontend.status-expiredcode"),invalidforcourse:v("utwente_voorlichting:webfeatures.stayoverevents.frontend.status-invalidforcourse")};e&&r[o.status]&&this.setFieldError(e,r[o.status],{reportimmediately:!0});return}L("#verifyname").textContent=L("#registerform-wrd_firstname").value+" "+L("#registerform-wrd_lastname").value,L("#verifyemail").textContent=L("#registerform-wrd_contact_email").value,L("#verifycourses").replaceChildren(...o.courses.map(r=>p("div",{class:"verifycourses__courserow"},p("span",{class:"verifycourses__roundtitle"},r.roundtitle),": ",p("span",{class:"verifycourses__coursetitle"},r.coursetitle)))),T("#verifyhousing")&&(T("#verifyhousing").textContent=o.housing),L("#verifyprice").textContent=o.price;let n=parseFloat(o.diff_amount.replace(",",".")),s=n>0;n<0?(L("#verifyrefundtext").style.display="",L("#verifyadditionalpaymenttext").style.display="none",L("#verifyrefund").textContent=o.diff_amount.substr(1)):(L("#verifyrefundtext").style.display="none",L("#verifyadditionalpaymenttext").style.display="",L("#verifyadditionalpayment").textContent=o.diff_amount),this.node.dataset.whFormVarRequirespayment=s?"true":"",await this.refreshConditions(),await this.gotoPage(1)}onSubmitSuccess(e){this.onRPC(Promise.withResolvers().promise),ce(e.instr)}async doCancel(){if(await Qu(v("utwente_voorlichting:widgets.openday.confirmcancel"))==="yes"){let t=new URL(location.href).searchParams.get("cuguid");ce((await Ki("utwente_voorlichting:cashpoint").cancelRegistration(t)).instr)}}};function Nv(){for(let i of w(".curiousu__paymentzone input[type=submit]"))i.classList.add("wh-form__button")}oe("curiousu-signupform",i=>new Kd(i));x(".curiousu__paymentzone",()=>Nv());M();re();ie();x(".widget-eligibilityprogrammes__formcontent",i=>{let e=i.closest("form.widget-eligibilityprogrammes__formcontent"),t=L(i,"select[name='eligibilitycheck']"),o=-1;document.documentElement.dataset.programme&&i.closest(".echeck2018__form")&&(o=[...t.options].findIndex(s=>s.dataset.hodexcode===document.documentElement.dataset.programme)),t.selectedIndex=o;let n=s=>{if(s.preventDefault(),!t.selectedOptions.length)return;let r=[...t.selectedOptions].map(a=>a.dataset?.guid).join(","),l=new URL(t.selectedOptions[0].dataset.link??ue("Missing link"));l.searchParams.set("programs",r),location.href=l.toString()};e?e.addEventListener("submit",n):L(i,"button[type=submit]")?.addEventListener("click",n),A["ut-nocustomselect"]||new ht({select:t,settings:{maxSelected:3,modal:"off",placeholderText:"Select up to 3 programmes"},events:{afterChange:s=>{i.classList.toggle("widget-eligibilityprogrammes--max-selection-reached",s.length>=3)}}})});M();re();var Nm=1e3,Jd="";function Hm(){return Jd||window.localStorage["ut:echeck-referral"]||null}function Qd(i){Jd=i,window.localStorage["ut:echeck-referral"]=Jd}function Hv(){try{let e=new URL(location.href),t=e.searchParams.get("echeck-referral");t&&(e.searchParams.delete("echeck-referral"),history.replaceState(null,document.title,e.toString()),Qd(t))}catch(e){console.error(e)}let i=Hm();i&&window.dataLayer.push({echeck_referralcode:i})}var Zd=class extends me{history=[];settings;termsnode;pages=[];progressindicator=p("div",{class:"echeck2018__form__progress__indicator"});progressidx=0;progresssteps=[];donepage=null;constructor(e){super(e),this.settings=ee("utwente_voorlichting:echeck"),this.termsnode=T(e,".echeck2018__form__terms"),this.rewriteDiplomaLayout(),w(e,".wh-form__fieldgroup--radiogroup,.wh-form__fieldgroup--checkboxgroup").forEach(o=>{if(!o.classList.contains("echeck2018__form__groupcolumns")){let n=w(o,".wh-form__fieldline");if(n.length>6){o.classList.add("echeck2018__form__groupcolumns");let s=p("div",{class:"echeck2018__form__groupcolumns__column"}),r=p("div",{class:"echeck2018__form__groupcolumns__column"}),l=Math.ceil(n.length/2);n.forEach((a,d)=>{d===0?a.before(s):d===l&&a.before(r),d<l?s.append(a):r.append(a)})}}});let t=[];w(this.node,".echeck2018__page").forEach(o=>{o.dataset.groupid?t.includes(o.dataset.groupid)||(t.push(o.dataset.groupid),this.pages.push(o)):o.dataset.pageid&&this.pages.push(o)}),this.setupProgressIndicator(),this.registerHandlers(),this.settings.firstpage==="diploma"&&this.pages.find(o=>o.dataset.pageid==="selectprogram")&&this.history.push("selectprogram"),this.selectPage(this.settings.firstpage),this.node.dataset.referralcode?Qd(this.node.dataset.referralcode):window.localStorage["ut:echeck-referral"]&&Qd(window.localStorage["ut:echeck-referral"])}rewriteDiplomaLayout(){let e=T(this.node,".echeck2018__form__diploma");if(!e)return;e.classList.add("echeck2018__form__groupcolumns");let t=p("div",{class:"echeck2018__form__groupcolumns__column"}),o=1,n="";w(e,".wh-form__fieldline input").forEach((s,r)=>{let l=s.closest(".wh-form__fieldline");if(!l)throw new Error("Fieldline not found");r===0?l.before(t):s.dataset.edutype!=="secondary"&&o===1&&(t=p("div",{class:"echeck2018__form__groupcolumns__column"}),l.before(t),++o),n!==s.dataset.edutype&&(s.dataset.edutype==="secondary"?t.append(p("h4",null,"Secondary education")):s.dataset.edutype==="bachelor"?t.append(p("h4",null,"Bachelor's")):s.dataset.edutype==="master"&&t.append(p("h4",null,"Master's"))),n=s.dataset.edutype,t.append(l)})}setupProgressIndicator(){let e=p("div",{class:"echeck2018__form__progress__inner"},this.progressindicator);L(this.node,".echeck2018__form__progress").append(e),this.progresssteps=[],this.pages.forEac
26h((t,o)=>{let n=t.dataset.pageid??ue("Page doesn't have pageid");["sentresumptionlink"].includes(n)||this.progresssteps.push(this.renderStepNode(n,t.dataset.groupid,o))}),this.progresssteps.push(this.renderStepNode("finalized","",0)),e.append(...this.progresssteps)}renderStepNode(e,t,o){return p("div",{class:"echeck2018__form__progress__page "+(o?"echeck2018__form__progress__page--withlabel":""),"data-pageid":e,"data-groupid":t},o>0?p("div",{class:"echeck2018__form__progress__label",hidden:!0},p("span",{class:"echeck2018__form__progress__label__nr"},o)):null)}updateProgressIndicator(e,t){if(!this.progressindicator)return;t||(t="");let o=-1;e.dataset.groupid?o=this.progresssteps.findIndex(s=>s.dataset.groupid===e.dataset.groupid):o=this.progresssteps.findIndex(s=>s.dataset.pageid===e.dataset.pageid),o<0&&(o=this.progressidx);let n=this.node.classList.contains("echeck2018__form--success");if(t==="failed"&&!o&&(o=1),this.progresssteps.forEach((s,r)=>{this.progresssteps[r].children.length&&(this.progresssteps[r].children[0].hidden=r>o),n&&r<o?this.progresssteps[r].classList.remove("echeck2018__form__progress__page--checked"):this.progresssteps[r].classList.toggle("echeck2018__form__progress__page--checked",r<o||t==="success"&&r===o),this.progresssteps[r].classList.toggle("echeck2018__form__progress__page--failed",t==="failed"&&r===o)}),t==="failed")this.progressindicator.style.width=o*100/(this.progresssteps.length-1)+"%";else{let s=100/(this.progresssteps.length-1),r=o*s;if(e.dataset.groupid){let l=w(".echeck2018__page[data-groupid='"+e.dataset.groupid+"']"),a=l.length;if(a>1){let d=l.findIndex(c=>c.classList.contains("echeck2018__page--selected"));d>0&&(r+=s*d/a)}}r===0?this.progressindicator.style.width="Calc("+r+"% + 30px)":this.progressindicator.style.width=r+"%"}this.progressidx=o}registerHandlers(){x(".echeck2018__prevbutton",e=>e.addEventListener("click",()=>this.prevPage())),x(".echeck2018__nextbutton",e=>e.addEventListener("click",()=>this.nextPageLocked()))}selectPage(e,t){let o=T(this.node,".echeck2018__page--selected");o&&o.classList.remove("echeck2018__page--selected");let n=this.history.indexOf(e);n===-1?this.history.push(e):this.history=this.history.slice(0,n+1),o=this.getPageById(e),o.classList.add("echeck2018__page--selected");let s=t&&t==="sendresumptionlink"?"success":"";this.updateProgressIndicator(o,s),this.termsnode&&(this.termsnode.hidden=o.dataset.pageid!=="diploma"),L(".echeck2018__prevbutton").style.display=this.history.length<=1||t==="sendresumptionlink"?"none":"",L(".echeck2018__nextbutton").disabled=!!o.dataset.disablenextaction}getPageById(e){return L(this.node,'.echeck2018__page[data-pageid="'+e+'"]')}getPageNextAction(e,t){let o=e.dataset.nextaction,n=T(e,"input[type=radio]:checked,option:checked");if(!t&&n&&n.dataset.nextaction&&(o=n.dataset.nextaction),!o)throw new Error("Page "+e.dataset.pageid+" does not have a nextaction!");return JSON.parse(o)}getCurrentSkipGroups(){let e=[];
26return this.history.forEach(t=>{let o=this.getPageById(t),n=this.getPageNextAction(o);n.skipgroups&&e.push(...n.skipgroups)}),e}prevPage(){this.donepage&&(this.donepage.remove(),this.donepage=null),this.node.classList.remove("echeck2018__form--failed"),!(this.history.length<=1)&&(this.selectPage(this.history[this.history.length-2]),this.node.scrollIntoView())}getNodesFromHTMLContent(e){let o=new DOMParser().parseFromString(e,"text/html");return w(o,"body > *")}async nextPageLocked(){let e=G();try{return await this.nextPage()}finally{e.release()}}async nextPage(){let e=L(this.node,".echeck2018__page--selected");if(!(await this.validate(e)).valid){console.log("Validation failed");return}let t=0,o=this.getPageNextAction(e);this.node.scrollIntoView();let n={guid:this.settings.formentryguid,history:this.history,referralcode:Hm(),referralinfo:st()};for(;;){if(++t===Nm)throw new Error("Infinite loop in form pages path");if(!o)throw new Error("Looped without setting next action!");let s=o;switch(o=null,s.type){case"sendresumptionlink":{await this.invokeRPC("SendEmailWithLink"),this.selectPage(s.pageid,s.type);return}case"done":{let r={...n,finished:!0,resultcode:s.resultcode},l=await this.submit(r);window.dataLayer.push({event:"formulier-submit",form:s.resultcode.toUpperCase()!=="EL"?"eligibilitycheck-failed":l.result.notyetquestions.length?"eligibilitycheck-notyet":"eligibilitycheck-positive",form_programme:document.documentElement.dataset.programme,form_diploma:this.data.diploma,form_intent:this.data.intent,form_resultcode:s.resultcode,echeck_notyetquestions:l.result.notyetquestions});let a=s.resultcode.toUpperCase()==="EL"?"success":"failed";this.donepage=p("div",{class:"echeck2018__page echeck2018__page--selected","data-pageid":"resultpage-"+a}),this.donepage.append(...this.getNodesFromHTMLContent(l.result.contents)),we(this.donepage),this.history.push("resultpage-"+a),e.after(this.donepage),e.classList.remove("echeck2018__page--selected"),this.node.classList.add("echeck2018__form--"+a),this.updateProgressIndicator(e,a),pt(l.result.guid,this.data.firstname);return}case"nextpage-nostore":case"nextpage":case"nextpage-modalrpc":{if(s.informecheckstart&&window.dataLayer.push({event:"formulier-submit",form:"eligibilitycheck-enter",form_programme:document.documentElement.dataset.programme,form_diploma:this.data.diploma,form_intent:this.data.intent}),s.type!=="nextpage-nostore"){let d={...n,finished:!1};if(s.type==="nextpage-modalrpc"){let c=await this.invokeRPC("storeData",d);this.settings.formentryguid=c.guid}else this.invokeBackgroundRPC("storeData",d).then(c=>this.settings.formentryguid=c.guid)}let r=this.getCurrentSkipGroups(),l=this.getPageById(s.pageid),a=l.dataset.groupid;if(!a||!r.includes(a)){this.selectPage(s.pageid);return}o=this.getPageNextAction(l,!0),t>=Nm-20&&console.log("skipping to page "+o.pageid)}break;case"noecheck":{let r=new URL(location.href);r.searchParams.set("nocheck",s.diploma);let l=await this.getNoCheckPage(r.toString());l&&l.length?(this.donepage=p("div",{class:"echeck2018__page echeck2018__page--selected","data-pageid":"noecheck"}),this.donepage.append(...l),e.after(this.donepage),e.classList.remove("echeck2018__page--selected"),this.history.push("noecheck"),L(".echeck2018__prevbutton").style.display="",this.node.classList.add("echeck2018__form--failed"),this.updateProgressIndicator(e,"failed")):location.href=r.toString();return}case"selectprogram":{let r=[this.data.program1,this.data.program2,this.data.program3].filter(Hc).join(",");console.log(this.data.program1,this.data.program2,this.data.program3,this.data);let l=new URL(location.href);if(r!==l.searchParams.get("programs")){l.searchParams.set("programs",r),ce(l.toString());return}o={type:"nextpage-nostore",pageid:"diploma"};break}default:throw new Error("unknown action "+s.type)}}}async getNoCheckPage(e){let t;try{t=await fetch(e,{cache:"reload"})}catch{}if(!t||t.status!==200)return console.error("Error loading page: "+e),null;let o=await t.text(),s=new DOMParser().parseFromString(o,"text/html");return document.documentElement.classList.contains("utwente--ws2026")?w(s,".page-content > *:not(.wh-form__buttongroup):not(.echeck2018__form__progress)"):w(s,"main > *:not(.wh-form__buttongroup)")}};oe("utwente_voorlichting:echeck2018",i=>new Zd(i));Hv();N();M();var Do=(Ne(),Ce(Xe)).registerTexts;Do("utwente_voorlichting","nl",{widgets:{openday:{"alreadysignedup-1":"Je bent met dit e-mailadres al aangemeld voor dit evenement. Als je je opnieuw aanmeldt, overschrijven we de bestaande aanmelding.","alreadysignedup-2":"Wil je je aanmelding overschrijven?","alreadysignedup-no":"Nee, niet overschrijven","alreadysignedup-yes":"Ja, overschrijven",btn_confirm:"Bevestigen",btn_nextpage:"Volgende",btn_previouspage:"Vorige",cancelled:"Je registratie is verwijderd.",cancellink:"Aanmelding verwijderen",chooseaday:"Kies een dag",chooseeducation:"Kies je opleidingsniveau",choosepresentation:"Kies een presentatie",chooseprogrammes:"Kies een opleiding",chooseprograms:"Van welke opleiding(en) wil je een presentatie volgen?",chooseqasession:"Kies een Q&A sessie",choosevwoclass:"- Kies je klas -",class:"Klas",confirmcancel:"Weet je zeker dat je je registratie wil verwijderen?",confirmcancel_no:"Nee",confirmcancel_ok:"Ok",confirmcancel_yes:"Ja",contactme:"Neem contact met mij op voor reisinformatie",dayprogramme:"Jouw programma voor deze dag",differentprogramlink:"Ik wil iets wijzigen",diploma:"Huidige (of recent afgeronde) opleiding",extrainfo_resume:"Upload hier je cijferlijst. We hebben dit nodig om je opleidingsachtergrond te beoordelen. Vermeld hierbij duidelijk in welke klas je nu zit, op welke school je zit. Vakken en bijbehorende cijfers horen er uiteraard ook op te staan. Zonder je cijferlijst kunnen we je aanmeldverzoek helaas niet in behandeling nemen.",extrainfo_why:"Waarom wil je Technology and Liberal Arts & Sciences (ATLAS) studeren aan het University College Twente? Geef ons een korte motivatie.",extras:["Let op: maximaal ",1," ",{t:"ifparam",p:1,value:"1",subs:["persoon"],subselse:["personen"]},"."],extras_title:"Hoeveel personen neem je mee?",extrasessions:"Kies overige activiteiten",extrasessions_group:"Overige activiteiten",full:"vol","group-extra":"Extra sessies en activiteiten","group-presentation":"Opleidingspresentaties",location:"| Enschede",maxtwoprogrames:"Je kunt maximaal twee voorlichtingsrondes bezoeken",myinterests:"Mijn interesses",myprogramme:"Mijn programma",nochoiceyet:"Ik kies later",personaldata:"Mijn gegevens",personaldatatitle:"Mijn persoonlijke gegevens",personalinfo:"Persoonlijke info",profile:"Profiel",program1:"Keuze 1",program2:"Keuze 2",program_notsureyet:"Ik 
26weet het nog niet zeker",programmefull:"Door de drukte is het helaas niet mogelijk beide programma's te bezoeken. Wijzig je selectie.",programmeinclusterwith:["De gekozen opleiding heeft een gecombineerde presentatie met ",1,". Daarom kun je deze opleidingen niet individueel bezoeken."],programmeinclusterwith_campusexperience:["Deze opleiding heeft een gezamenlijke tour met ",1,". Kies een andere opleiding."],programs:"Kies opleidingen",programs_group:"Opleidingen",register:"Aanmelden",registration:"Aanmelden",request_visitcampus:"Ik wil ook de campus bezoeken.","roundpulldown-nooptions":"Niet beschikbaar op basis van je selectie",school:"Wat is de naam van je school?",school_city:"In welke plaats zit je nu op school?",selectcity:"- Kies je stad -",selectpresentation:"- Kies presentatie -",selectprogramme:"- Kies opleiding -",selectqasession:"- Kies een Q&A sessie -",selectroundoption:"Maak een keuze (optioneel)","selectroundoption-required":"Maak een keuze (verplicht)",selectschool:"- Kies je school -",setupday:"Stel je dagprogramma samen",specials:"Specials",thanks1:"Leuk dat je komt",thanks2:"! Je hebt je aangemeld voor",thankyou:["Je bent aangemeld. Leuk dat je naar onze campus in Enschede komt, ",1,"!"],themesessions:"Kies themasessies",themesessions_group:"Themasessies",timerange:[1," uur"]}}});Do("utwente_voorlichting","en",{widgets:{openday:{"alreadysignedup-1":"You're already registered for this event with this email address. If you register again, we will overwrite your existing registration.","alreadysignedup-2":"Would you like to overwrite your registration?","alreadysignedup-no":"No, do not overwrite","alreadysignedup-yes":"Yes, overwrite",btn_confirm:"Confirm",btn_nextpage:"Next",btn_previouspage:"Previous",cancelled:"Your registration has been cancelled.",cancellink:"Cancel registration",chooseaday:"Choose a day",chooseeducation:"Choose your level of education",choosepresentation:"Choose a presentation",chooseprogrammes:"Choose a programme",chooseprograms:"Of which programme(s) would you like to attend a presentation?",chooseqasession:"Choose a Q&A session",choosevwoclass:"- Choose your class -",class:"Class",confirmcancel:"Are you sure you want to cancel your registration?",confirmcancel_no:"No",confirmcancel_ok:"Ok",confirmcancel_yes:"Yes",contactme:"Please contact me about travel information",dayprogramme:"Your schedule for this day",differentprogramlink:"I want to change something",diploma:"Current (or recently completed) education",extrainfo_resume:"Upload your grade list or transcript. We need this document to check your educational background. Your transcript should clearly state what your current year is, high school name, courses being taken and of course grades should also be clearly stated on the transcript. Without sending the grade list you cannot be considered for the In_Sight Day.",extrainfo_why:"Why are you interested in University College Twente and BSc. Technology and Liberal Arts & Sciences (ATLAS)? Please give us a short motivation.",extras:["Please note: max ",1," ",{t:"ifparam",p:1,value:"1",subs:["person"],subselse:["persons"]},"."],extras_title:"How many people will accompany you?",extrasessions:"Choose other activities",extrasessions_group:"Other activities",full:"full","group-extra":"Extra sessions and activities","group-presentation":"Study presentations",location:"| Enschede | The Netherlands",maxtwoprogrames:"You can visit a maximum of two programmes.",myinterests:"My interests",myprogramme:"My programme",nochoiceyet:"I want to choose later",personaldata:"My information",personaldatatitle:"My personal information",personalinfo:"Personal info",profile:"Profile",program1:"First programme",program2:"Second programme",program_notsureyet:"I'm not sure yet",programmefull:"Because of the high number of registrations it's unfortunately not possible to visit both programmes. Please choose another programme.",programmeinclusterwith:["The chosen programme has a combined presentation with ",1,". Therefore, you cannot visit these programmes seperately."],programmeinclusterwith_campusexperience:["This programme has a combined tour with ",1,". Choose another programme."],programs:"Choose programmes",programs_group:"Programmes",register:"Register",registration:"Register",request_visitcampus:"I would like to visit the campus in the future. Send me an email when I can sign up for this.","roundpulldown-nooptions":"Not available based on your selection",school:"What is the name of your current school?",school_city:"In what city or town is your school located?",selectcity:"- Select your city -",selectpresentation:"- Choose presentation -",selectprogramme:"- Choose a programme -",selectqasession:"- Choose a Q&A session -",selectroundoption:"Make a choice (optional)","selectroundoption-required":"Make a choice (required)",selectschool:"- Select your school -",setupday:"Set up your schedule",specials:"Specials",thanks1:"Great to hear you\u2019ll be coming",thanks2:"! You have registered for",thankyou:["You have registered. ",1,", it's great that you're coming to our campus in Enschede, The Netherlands!"],themesessions:"Choose theme sessions",themesessions_group:"Theme sessions",timerange:[1," hours"]}}});Do("utwente_voorlichting","de",{widgets:{openday:{"alreadysignedup-1":"Du bist mit dieser E-Mail Adresse bereits f\xFCr dieses Event angemeldet. Wenn du dich noch einmal anmeldest, dann wird die erste Registrierung \xFCberschrieben.","alreadysignedup-2":"M\xF6chtest du deine Registrierung \xFCberschreiben?","alreadysignedup-no":"Nein, nicht \xFCberschreiben","alreadysignedup-yes":"Ja, \xFCberschreiben",btn_confirm:"Best\xE4tigen",btn_nextpage:"Weiter",btn_previouspage:"Zur\xFCck",cancelled:"Du hast dich erfolgreich abgemeldet.",cancellink:"Abmelden",chooseaday:"W\xE4hle einen Tag",chooseeducation:"W\xE4hle deine momentane Vorbildung",choosepresentation:"W\xE4hle eine Pr\xE4sentation",chooseprogrammes:"W\xE4hle einen Studiengang",chooseprograms:"Von wel
26chem/welchen Programm(en) m\xF6chten Sie eine Pr\xE4sentation besuchen?",chooseqasession:"W\xE4hle ein Q&A session",choosevwoclass:"- W\xE4hle deinen Schuljahrgang -",class:"Schuljahrgang",confirmcancel:"M\xF6chtest du dich wirklich abmelden?",confirmcancel_no:"Nein",confirmcancel_ok:"Ok",confirmcancel_yes:"Ja",contactme:"Ich w\xFCnsche eine Kontaktaufnahme der Uni bez\xFCglich Anreiseinformationen",dayprogramme:"Dein Programm f\xFCr diesen Tag",differentprogramlink:"Ja, ich m\xF6chte etwas anpassen",diploma:"Diploma",extrainfo_resume:["Bitte lade deinen Lebenslauf ",{t:"tag",tag:"b",subs:"mit deinen letzten Noten"}," hoch (alles in einem Dokument). Wir ben\xF6tigen diese Daten um deine Vorbildung zu beurteilen. Wenn du keinen Lebenslauf abgibst, k\xF6nnen wir deine Anmeldung leider nicht beurteilen."],extrainfo_why:"Warum m\xF6chtest du Technology and Liberal Arts & Sciences (ATLAS) am University College Twente studieren? Bitte gebe uns eine kurze Begr\xFCndung.",extras:["Maximum ",1,"."],extras_title:"Wie viele Besucher/Freunde begleiten dich?",extrasessions:"Choose other activities",extrasessions_group:"Other activities",full:"voll","group-extra":"Extra Sessions und Aktivit\xE4ten","group-presentation":"Studiengang Pr\xE4sentationen",location:"| Enschede | The Netherlands",maxtwoprogrames:"Du kannst maximal zwei Informationsrunden besuchen",myinterests:"My interests",myprogramme:"Mein Programm",nochoiceyet:"Ich m\xF6chte mich sp\xE4ter entscheiden",personaldata:"Meine Daten",personaldatatitle:"Meine pers\xF6nlichen Daten",personalinfo:"Pers\xF6nlichen Daten",profile:"Profil",program1:"Option 1",program2:"Option 2",program_notsureyet:"Ich bin mir noch nicht sicher",programmefull:"Aufgrund hoher Anmeldezahlen ist es leider nicht m\xF6glich beide Programmteile zu besuchen. Bitte \xE4ndere deine Auswahl.",programmeinclusterwith:["Der gew\xE4hlte Studiengang pr\xE4sentiert sich zusammen mit ",1,". Deswegen kannst du diesen Studiengang nur in dieser Kombination besuchen."],programmeinclusterwith_campusexperience:["This programme has a combined tour with ",1,". Choose another programme."],programs:"Programme ausw\xE4hlen",programs_group:"Programmes",register:"Anmelden",registration:"Anmelden",request_visitcampus:"Ich m\xF6chte den Campus in Zukunft besuchen. Schicken Sie mir eine E-Mail, wenn ich mich daf\xFCr anmelden kann.","roundpulldown-nooptions":"Aufgrund Ihrer Auswahl nicht verf\xFCgbar.",school:"Wie heisst deine Schule?",school_city:"In welcher Stadt gehst du zur Schule?",selectcity:"- Select your city -",selectpresentation:"- W\xE4hle Pr\xE4sentation -",selectprogramme:"- W\xE4hle einen Studiengang -",selectqasession:"- W\xE4hle ein Q&A session -",selectroundoption:"Auswahl treffen (optional)","selectroundoption-required":"Auswahl treffen (erforderlich)",selectschool:"- Select your school -",setupday:"Stelle dein Tagesprogramm zusammen",specials:"Specials",thanks1:"Wir freuen uns auf deinen Besuch",thanks2:"! Du hast dich angemeldet f\xFCr",thankyou:["Sie haben sich angemeldet. ",1,", es ist toll, dass Sie an unseren Campus in Enschede in den Niederlanden kommen!"],themesessions:"Choose theme sessions",themesessions_group:"Theme sessions",timerange:[1," hours"]}}});Do("utwente_voorlichting","es",{widgets:{openday:{"alreadysignedup-1":"You're already registered for this event with this email address. If you register again, we will overwrite your existing registration.","alreadysignedup-2":"Would you like to overwrite your registration?","alreadysignedup-no":"No, do not overwrite","alreadysignedup-yes":"Yes, overwrite",btn_confirm:"Confirm",btn_nextpage:"Next",btn_previouspage:"Previous",cancelled:"Your registration has been cancelled.",cancellink:"Cancel registration",chooseaday:"Choose a day",chooseeducation:"Choose your level of education",choosepresentation:"Choose a presentation",chooseprogrammes:"Choose a programme",chooseprograms:"Of which programme(s) would you like to attend a presentation?",chooseqasession:"Choose a Q&A session",choosevwoclass:"- Choose your class -",class:"Class",confirmcancel:"Are you sure you want to cancel your registration?",confirmcancel_no:"No",confirmcancel_ok:"Ok",confirmcancel_yes:"Yes",contactme:"Please contact me about travel information",dayprogramme:"Your schedule for this day",differentprogramlink:"I want to change something",diploma:"Current (or recently completed) education",extrainfo_resume:"Upload your grade list or transcript. We need this document to check your educational background. Your transcript should clearly state what your current year is, high school name, courses being taken and of course grades should also be clearly stated on the transcript. Without sending the grade list you cannot be considered for the In_Sight Day.",extrainfo_why:"Why are you interested in University College Twente and BSc. Technology and Liberal Arts & Sciences (ATLAS)? Please give us a short motivation.",extras:["Please note: max ",1," ",{t:"ifparam",p:1,value:"1",subs:["person"],subselse:["persons"]},"."],extras_title:"How many people will accompany you?",extrasessions:"Choose other activities",extrasessions_group:"Other activities",full:"full","group-extra":"Extra sessions and activities","group-presentation":"Study presentations",location:"| Enschede | The Netherlands",maxtwoprogrames:"You can visit a maximum of two programmes.",myinterests:"My interests",myprogramme:"My programme",nochoiceyet:"I want to choose later",personaldata:"My information",personaldatatitle:"My personal information",personalinfo:"Personal info",profile:"Profile",program1:"First programme",program2:"Second programme",program_notsureyet:"I'm not sure yet",programmefull:"Because of the high number of registrations it's unfortunately not possible to visit both programmes. Please choose another programme.",programmeinclusterwith:["The chosen programme has a combined presentation with ",1,". Therefore, you cannot visit these programmes seperately."],programmeinclusterwith_campusexperience:["This programme has a combined tour with ",1,". Choose another programme."],programs:"Choose programmes",programs_group:"Programmes",register:"Register",registration:"Register",request_visitcampus:"I would like to visit the campus in the future. Send me an email when I can sign up for this.","roundpulldown-nooptions":"Not available based on your selection",school:"What is the name of your current school?",school_city:"In what city or town is your school located?",selectcity:"- Select your city -",selectpresentation:"- Choose presentation -",selectprogramme:"- Choose a programme -",selectqasession:"- Choose a Q&A session -",selectroundoption:"Make a choice (optional)","selectroundoption-required":"Make a choice (required)",selectschool:"- Select your school -",setupday:"Set up your schedule",specials:"Specials",thanks1:"Great to hear you\u2019ll be coming",thanks2:"! You have registered for",thankyou:["You have registered. ",1,", it's great that you're coming to our campus in Enschede, The Netherlands!"],themesessions:"Choose theme sessions",themesessions_group:"Theme sessions",timerange:[1," hours"]}}});Do("utwente_voorlichting","it",{widgets:{openday:{"alreadysignedup-1":"You're already registered for this event with this email address. If you register again, we will over
26write your existing registration.","alreadysignedup-2":"Would you like to overwrite your registration?","alreadysignedup-no":"No, do not overwrite","alreadysignedup-yes":"Yes, overwrite",btn_confirm:"Confirm",btn_nextpage:"Next",btn_previouspage:"Previous",cancelled:"Your registration has been cancelled.",cancellink:"Cancel registration",chooseaday:"Choose a day",chooseeducation:"Choose your level of education",choosepresentation:"Choose a presentation",chooseprogrammes:"Choose a programme",chooseprograms:"Of which programme(s) would you like to attend a presentation?",chooseqasession:"Choose a Q&A session",choosevwoclass:"- Choose your class -",class:"Class",confirmcancel:"Are you sure you want to cancel your registration?",confirmcancel_no:"No",confirmcancel_ok:"Ok",confirmcancel_yes:"Yes",contactme:"Please contact me about travel information",dayprogramme:"Your schedule for this day",differentprogramlink:"I want to change something",diploma:"Current (or recently completed) education",extrainfo_resume:"Upload your grade list or transcript. We need this document to check your educational background. Your transcript should clearly state what your current year is, high school name, courses being taken and of course grades should also be clearly stated on the transcript. Without sending the grade list you cannot be considered for the In_Sight Day.",extrainfo_why:"Why are you interested in University College Twente and BSc. Technology and Liberal Arts & Sciences (ATLAS)? Please give us a short motivation.",extras:["Please note: max ",1," ",{t:"ifparam",p:1,value:"1",subs:["person"],subselse:["persons"]},"."],extras_title:"How many people will accompany you?",extrasessions:"Choose other activities",extrasessions_group:"Other activities",full:"full","group-extra":"Extra sessions and activities","group-presentation":"Study presentations",location:"| Enschede | The Netherlands",maxtwoprogrames:"You can visit a maximum of two programmes.",myinterests:"My interests",myprogramme:"My programme",nochoiceyet:"I want to choose later",personaldata:"My information",personaldatatitle:"My personal information",personalinfo:"Personal info",profile:"Profile",program1:"First programme",program2:"Second programme",program_notsureyet:"I'm not sure yet",programmefull:"Because of the high number of registrations it's unfortunately not possible to visit both programmes. Please choose another programme.",programmeinclusterwith:["The chosen programme has a combined presentation with ",1,". Therefore, you cannot visit these programmes seperately."],programmeinclusterwith_campusexperience:["This programme has a combined tour with ",1,". Choose another programme."],programs:"Choose programmes",programs_group:"Programmes",register:"Register",registration:"Register",request_visitcampus:"I would like to visit the campus in the future. Send me an email when I can sign up for this.","roundpulldown-nooptions":"Not available based on your selection",school:"What is the name of your current school?",school_city:"In what city or town is your school located?",selectcity:"- Select your city -",selectpresentation:"- Choose presentation -",selectprogramme:"- Choose a programme -",selectqasession:"- Choose a Q&A session -",selectroundoption:"Make a choice (optional)","selectroundoption-required":"Make a choice (required)",selectschool:"- Select your school -",setupday:"Set up your schedule",specials:"Specials",thanks1:"Great to hear you\u2019ll be coming",thanks2:"! You have registered for",thankyou:["You have registered. ",1,", it's great that you're coming to our campus in Enschede, The Netherlands!"],themesessions:"Choose theme sessions",themesessions_group:"Theme sessions",timerange:[1," hours"]}}});Do("utwente_voorlichting","xt",{widgets:{openday:{"alreadysignedup-1":"You're already registered for this event with this email address. If you register again, we will overwrite your existing registration.","alreadysignedup-2":"Would you like to overwrite your registration?","alreadysignedup-no":"No, do not overwrite","alreadysignedup-yes":"Yes, overwrite",btn_confirm:"Confirm",btn_nextpage:"Next",btn_previouspage:"Previous",cancelled:"Your registration has been cancelled.",cancellink:"Cancel registration",chooseaday:"Choose a day",chooseeducation:"Choose your level of education",choosepresentation:"Choose a presentation",chooseprogrammes:"Choose a programme",chooseprograms:"Of which programme(s) would you like to attend a presentation?",chooseqasession:"Choose a Q&A session",choosevwoclass:"- Choose your class -",class:"Class",confirmcancel:"Are you sure you want to cancel your registration?",confirmcancel_no:"No",confirmcancel_ok:"Ok",confirmcancel_yes:"Yes",contactme:"Please contact me about travel information",dayprogramme:"Your schedule for this day",differentprogramlink:"I want to change something",diploma:"Current (or recently completed) education",extrainfo_resume:"Upload your grade list or transcript. We need this document to check your educational background. Your transcript should clearly state what your current year is, high school name, courses being taken and of course grades should also be clearly stated on the transcript. Without sending the grade list you cannot be considered for the In_Sight Day.",extrainfo_why:"Why are you interested in University College Twente and BSc. Technology and Liberal Arts & Sciences (ATLAS)? Please give us a short motivation.",extras:["Please note: max ",1," ",{t:"ifparam",p:1,value:"1",subs:["person"],subselse:["persons"]},"."],extras_title:"How many people will accompany you?",extrasessions:"Choose other activities",extrasessions_group:"Other activities",full:"full","group-extra":"Extra sessions and activities","group-presentation":"Study presentations",location:"| Enschede | The Netherlands",maxtwoprogrames:"You can visit a maximum of two programmes.",myinterests:"My interests",myprogramme:"My programme",nochoiceyet:"I want to choose later",personaldata:"My information",personaldatatitle:"My personal information",personalinfo:"Personal info",profile:"Profile",program1:"First programme",program2:"Second programme",program_notsureyet:"I'm not sure yet",programmefull:"Because of the high number of registrations it's unfortunately not possible to visit both programmes. Please choose another programme.",programmeinclusterwith:["The chosen programme has a combined presentation with ",1,". Therefore, you cannot visit these programmes seperately."],programmeinclusterwith_campusexperience:["This programme has a combined tour with ",1,". Choose another programme."],programs:"Choose programmes",programs_group:"Programmes",register:"Register",registration:"Register",request_visitcampus:"I would like to visit the campus in the future. Send me an email when I can sign up for this.","roundpulldown-nooptions":"Not available based on your selection",school:"What is the name of your current school?",school_city:"In what city or town is your school located?",selectcity:"- Select your city -",selectpresentation:"- Choose presentation -",selectprogramme:"- Choose a programme -",selectqasession:"- Choose a Q&A session -",selectroundoption:"Make a choice (optional)","selectroundoption-required":"Make a choice (required)",selectschool:"- Select your school -",setupday:"Set up your schedule",specials:"Specials",thanks1:"Great to hear you\u2019ll be coming",thanks2:"! You have registered for",thankyou:["You have registered. ",1,", it's great that you're coming to our campus in Enschede, The Netherlands!"],themesessions:"Choose theme sessions",themesessions_group:"Theme sessions",timerange:[1," hours"]}}});vg();function zi(i,e,t){let o=Uc(i,e,!1);return t?.length&&o.append(...t),o}re();var At="";function Wn(i,e,t){i.classList.contains(e)!==t&&i.classList.toggle(e)}function Ov(i,e){i.disabled!==e&&(i.disabled=e)}async function Uv(){return Ae(p("div",null,p("p",null,R("utwente_voorlichting:widgets.openday.alreadysignedup-1")),p("p",null,p("b",null,R("utwente_voorlichting:widgets.openday.alreadysignedup-2")))),[{result:"yes",title:R("utwente_voorlichting:widgets.openday.alreadysignedup-yes")}
26,{result:"no",title:R("utwente_voorlichting:widgets.openday.alreadysignedup-no")}])}var ec=class extends bt{eventselection={diploma:null,rounds:[]};diplomaselect;isedit;origemail;isclusterconflict=!1;opendaysettings;lastselectedcity="";shortform;constructor(e){super(e),this.shortform=e.hasAttribute("data-shortform"),this.diplomaselect=L(e,'select[name="diploma.select"]'),this.opendaysettings=ye.obj.opendaysettings,w(e,".foldablecontent").forEach(o=>o.addEventListener("click",n=>{o.classList.contains("foldablecontent--open")&&w(e,".foldablecontent--open").forEach(s=>{s!==o&&F(s,"ws:foldable-toggle",{bubbles:!0,cancelable:!1})})})),this.isedit=this.node.classList.contains("openday--isedit"),this.origemail=e.elements.namedItem("wrd_contact_email").value,this.node.dataset.guid&&pt(this.node.dataset.guid,e.elements.namedItem("wrd_firstname").value),this.node.addEventListener("change",o=>this.updateFormOptions(),!0),w(this.node,".openday--js-cancel").forEach(o=>o.addEventListener("click",()=>this.onODCancel())),this.prefill(),this.elements.namedItem("extrainfo_schoolcity_fromlist")?.addEventListener("change",()=>this.updateSchoolList());let t=T('[data-wh-form-action="next"]');t&&t.addEventListener("click",()=>{t.disabled||(pi("opendaysignup-"+At+"-firstpage"),io("opendaysignup-"+At+"-cancelled"))}),this.updateFormOptions(),At=this.node.dataset.apitype,document.documentElement.classList.add("openday--type-"+At),pi("opendaysignup-"+At+"-impression")}updateSchoolList(){let e=this.elements.namedItem("extrainfo_schoolcity_fromlist").value,t=this.elements.namedItem("extrainfo_schoolname_fromlist");e!==this.lastselectedcity&&(this.lastselectedcity=e,t.value="");for(let o of w(t,"option")){let n=!o.dataset.city||o.dataset.city===e;o.classList[n?"remove":"add"]("openday--hide"),o.disabled=!n}}async gotoPage(e){e===1&&this.shortform&&(await this.invokeRPC("prepShortForm",st()),setTimeout(()=>ve({event:"onlineopendays-shortform"}),1));let t=await super.gotoPage(e);return this.node.scrollIntoView(),t}_getDestinationPage(e,t){return e.curpage===0&&e.pages[0].id==="opendagen-signuppage-typefirst"&&t===1&&this.data.programs.length===0&&this.data.themesessions.length===0&&this.data.extrasessions.length===0?2:e.curpage===2&&e.pages[0].id==="opendagen-signuppage-typefirst"&&t===-1&&this.data.programs.length===0&&this.data.themesessions.length===0&&this.data.extrasessions.length===0?0:super._getDestinationPage(e,t)}getDatalayerInfo(){let e=this.eventselection.rounds.map(s=>s.programme).filter(s=>!!s),t=this.eventselection.rounds.map(s=>s.special).filter(s=>!!s),o=this.eventselection.rounds.map(s=>s.tag).filter(s=>!!s),n={origemail:this.node.dataset.origemail||"",ischange:this.node.dataset.origemail?"true":"false",form_programme1_code:e.length>0?e[0]:"",form_programme2_code:e.length>1?e.slice(1).join(","):"",form_special1_code:t.join(","),form_rounds1_code:o.join(","),form_allprogrammes:e.join(","),form_allspecials:t.join(","),form_allrounds:o.join(",")};for(let s of this.getFormElementNames()){let r=this.elements.namedItem(s);if(!r||(r instanceof RadioNodeList&&r.length&&(r[0].type==="radio"||r[0].type==="checkbox")&&(r=Array.from(r).filter(a=>a.checked)[0]),!r||!(r instanceof HTMLElement))||r instanceof HTMLInputElement&&(r.type==="radio"||r.type==="checkbox")&&!r.checked||r.closest(".openday--hide"))continue;r instanceof HTMLSelectElement&&r.options&&r.selectedIndex>=0&&(r=r.options[r.selectedIndex]);let l=r instanceof HTMLInputElement&&r.dataset&&r.dataset.tag?r.dataset.tag:r.value;l&&(n["form_"+s]=l)}return n}formToDatalayer(e){if(!window.dataLayer)return;let t=this.getDatalayerInfo();t.event="formulier-submit",t.form=At+(e||""),window.dataLayer.push(t)}prefill(){let e=new URL(location.href);if(this.diplomaselect.options.length===1)$e(this.diplomaselect,this.diplomaselect.options[0].value);else{if(this.diplomaselect.value||!e.searchParams.get("diploma"))return;let t=Array.from(this.diplomaselect.options).filter(o=>o.dataset.diplomatag===e.searchParams.get("diploma"));if(!t.length)return;$e(this.diplomaselect,t[0].value)}}getRoundPulldowns(){return w(this.node,"select").filter(e=>e.name.match(/^roundpulldown/)&&!e.closest(".openday--hide"))}updateFormOptions(){if(this.eventselection={diploma:null,rounds:[]},w(".openday__clusterwarning").forEach(o=>o.style.display="none"),this.diplomaselect.options.length<=0)return;document.documentElement.classList.add("openday--formopen"),this.eventselection.diploma=this.diplomaselect.selectedOptions[0]?.dataset.diplomatag||null;for(let o of w(this.node,".openday__round"))this.updateRoundOptionsVisibility(o);for(let o of w(this.node,".openday__roundgroup"))Wn(o,"openday--hide",!o.querySelector(".openday__round:not(.openday--hide)"));let e=w(".openday__round:not(.openday--hide)");Wn(L("#opendagen-optionstree"),"openday--hide",e.length===0),this.eventselection.rounds=[],this.getRoundPulldowns().forEac
26h(o=>{let n=o.options[o.selectedIndex];n&&this.eventselection.rounds.push({programme:parseInt(n.dataset.programmeid||"")?n.dataset.tag??"":"",special:parseInt(n.dataset.special||"")?n.dataset.tag??"":"",tag:n.dataset.tag||"",select:o})})}updateRoundOptionsVisibility(e){let t=L(e,"select"),o=!0,n=!1;for(let s of t.querySelectorAll("option")){let r=o&&!s.hidden&&(!s.dataset.diplomafilter||JSON.parse(s.dataset.diplomafilter).includes(this.eventselection.diploma));s.value&&r&&!n&&(n=!0),Wn(s,"openday--hide",!r),Ov(s,!!(!r||s.dataset.isfull))}for(let s of t.querySelectorAll("optgroup")){let r=!!s.querySelector("option:not(.openday--hide)");Wn(s,"openday--hide",!r)}if(t.options[t.selectedIndex]&&t.options[t.selectedIndex].classList.contains("openday--hide")){let s=t.querySelector("option:not(.openday--hide)");s&&(t.value=s.value)}if(this.node.elements.namedItem("programs")){let s=t.closest(".wh-form__fieldline");n?(s.parentElement.querySelector(".openday__nooptionsmessage")?.remove(),s.style.display=""):(s.parentElement.querySelector(".openday__nooptionsmessage")||s.parentElement.prepend(zi("div",{className:"openday__nooptionsmessage ss-main ss-disabled"},[zi("div",{className:"ss-values"},[zi("div",{className:"ss-single",textContent:R("utwente_voorlichting:widgets.openday.roundpulldown-nooptions")})])])),s.style.display="none")}else Wn(e,"openday--hide",!n)}isAnyRoundSelected(){let e=this.getRoundPulldowns();return e.length===0||e.filter(t=>t.value).length>0}checkRoundQuestionsClusters(e){let t=[];e.forEach(o=>{let n=o.select.options[o.select.selectedIndex];n&&n.dataset.programmeid&&t.push(n)}),this.verifyClustering(t)}verifyClustering(e){let t=[];this.isclusterconflict=!1;for(let o of e){if(o.dataset.clusteredwith){let n=JSON.parse(o.dataset.clusteredwith);for(let s of t)if(n.includes(parseInt(s.dataset.programmeid||""))){let r=o.closest(".openday__round")??ue("round node not found"),l=r.querySelector(".openday__clusterwarning");l||(l=zi("div",{className:"openday__clusterwarning"}),r.appendChild(l)),this.opendaysettings.apitype==="campusexperience"?l.textContent=R("utwente_voorlichting:widgets.openday.programmeinclusterwith_campusexperience",s.textContent):l.textContent=R("utwente_voorlichting:widgets.openday.programmeinclusterwith",s.textContent),l.style.display="block",this.isclusterconflict=!0;return}}t.push(o)}}onSubmitFailed(e,t){if(e.length===1&&e[0].name==="wrd_contact_email"&&e[0].metadata.verifyresub){Uv().then(o=>{o==="yes"&&this.validateAndSubmit({verifyresub:e[0].metadata.verifyresub})});return}super.onSubmitFailed(e,t)}onSubmitSuccess(e){let t=e;this.formToDatalayer("-submitregistration"),pi("opendaysignup-"+At+"-signedup"),io("opendaysignup-"+At+"-cancelled"),document.documentElement.classList.add("openday--signupdone"),window.opendaySubmitResult=t,w(".opendag_thankyou").forEach(o=>o.innerHTML=mt("utwente_voorlichting:widgets.openday.thankyou",t.firstname,t.eventname,t.eventdatetext)),w(".opendag__programma").forEach(o=>{o.innerHTML="",t.schedule.forEach(n=>{o.appendChild(W("div",{className:"opendag__programmaitem",childNodes:[W("div",{className:"opendag__timerange",textContent:R("utwente_voorlichting:widgets.openday.timerange",n.timerange)}),W("div",{className:"opendag__schedtitle",textContent:(n.scheduleprefix?n.scheduleprefix+" ":"")+n.title})]}))})}),t.guid&&pt(t.guid,t.firstname),t.editlink&&console.log("edit url",t.editlink),t.pdflink&&console.log("eticket url",t.pdflink)}async onODCancel(){if(await Ae(R("utwente_voorlichting:widgets.openday.confirmcancel"),[{result:"yes",title:R("utwente_base:site-common.texts.yes")},{result:"no",title:R("utwente_base:site-common.texts.no")}])!=="yes")return;let e=G({modal:!0});this.formToDatalayer("-cancelregistration"),await this.invokeRPC("cancelRegistration"),pi("opendaysignup-"+At+"-cancelled"),io("opendaysignup-"+At+"-firstpage"),io("opendaysignup-"+At+"-signedup"),e.release(),Ae(R("utwente_voorlichting:widgets.openday.cancelled"),[],{allowcancel:!1})}};oe("utwente_voorlichting:opendays",i=>new ec(i));M();te();var Io=(Ne(),Ce(Xe)).registerTexts;Io("utwente_voorlichting","nl",{frontend:{opendays_v2:{js:{"alreadysignedup-line1":"Je bent met dit e-mailadres al aangemeld voor dit evenement. Als je je opnieuw aanmeldt, overschrijven we de bestaande aanmelding.","alreadysignedup-line2":"Wil je je aanmelding overschrijven?","confirm-cancel":"Weet je zeker dat je je aanmelding wil annuleren?","no-dont-cancel":"Nee","no-overwrite":"Nee, niet overschrijven","yes-cancel":"Ja, annuleren","yes-dontoverwrite":"Ja, overschrijven"}}}});Io("utwente_voorlichting","en",{frontend:{opendays_v2:{js:{"alreadysignedup-line1":"You're already registered for this event with this email address. If you register again, we will over
26write your existing registration.","alreadysignedup-line2":"Would you like to overwrite your registration?","confirm-cancel":"Are you sure you want to cancel your registration?","no-dont-cancel":"No","no-overwrite":"No, do not overwrite","yes-cancel":"Yes, cancel","yes-dontoverwrite":"Yes, overwrite"}}}});Io("utwente_voorlichting","de",{frontend:{opendays_v2:{js:{"alreadysignedup-line1":"You're already registered for this event with this email address. If you register again, we will overwrite your existing registration.","alreadysignedup-line2":"Would you like to overwrite your registration?","confirm-cancel":"Are you sure you want to cancel your registration?","no-dont-cancel":"No","no-overwrite":"No, do not overwrite","yes-cancel":"Yes, cancel","yes-dontoverwrite":"Yes, overwrite"}}}});Io("utwente_voorlichting","es",{frontend:{opendays_v2:{js:{"alreadysignedup-line1":"You're already registered for this event with this email address. If you register again, we will overwrite your existing registration.","alreadysignedup-line2":"Would you like to overwrite your registration?","confirm-cancel":"Are you sure you want to cancel your registration?","no-dont-cancel":"No","no-overwrite":"No, do not overwrite","yes-cancel":"Yes, cancel","yes-dontoverwrite":"Yes, overwrite"}}}});Io("utwente_voorlichting","it",{frontend:{opendays_v2:{js:{"alreadysignedup-line1":"You're already registered for this event with this email address. If you register again, we will overwrite your existing registration.","alreadysignedup-line2":"Would you like to overwrite your registration?","confirm-cancel":"Are you sure you want to cancel your registration?","no-dont-cancel":"No","no-overwrite":"No, do not overwrite","yes-cancel":"Yes, cancel","yes-dontoverwrite":"Yes, overwrite"}}}});Io("utwente_voorlichting","xt",{frontend:{opendays_v2:{js:{"alreadysignedup-line1":"You're already registered for this event with this email address. If you register again, we will overwrite your existing registration.","alreadysignedup-line2":"Would you like to overwrite your registration?","confirm-cancel":"Are you sure you want to cancel your registration?","no-dont-cancel":"No","no-overwrite":"No, do not overwrite","yes-cancel":"Yes, cancel","yes-dontoverwrite":"Yes, overwrite"}}}});ie();var tc=class extends bt{shortform;constructor(e){super(e),this.shortform=e.hasAttribute("data-shortform"),ve({onlineopenday_eventtype:this.node.dataset.onlineopenday_eventtype||""}),this.diplomafield?.addEventListener("change",()=>this._onDiplomaChange()),T("#cancellink")?.addEventListener("click",t=>this.doCancel(t)),new URL(location.href).searchParams.get("type")==="cancel"&&this.doCancel()}_onDiplomaChange(){let e=this.node.querySelectorAll("input[name=event]:not([disabled]");e.length===1&&!e[0].checked&&e[0].click()}async gotoPage(e){e===1&&this.shortform&&(await this.invokeRPC("prepShortForm",st()),setTimeout(()=>ve({event:"onlineopendays-shortform"}),1));let t=await super.gotoPage(e);return this.node.scrollIntoView(),t}async runConfirmResignup(){return Ae(p("div",null,p("p",null,v("utwente_voorlichting:frontend.opendays_v2.js.alreadysignedup-line1")),p("p",null,p("b",null,v("utwente_voorlichting:frontend.opendays_v2.js.alreadysignedup-line2")))),[{result:"yes",title:v("utwente_voorlichting:frontend.opendays_v2.js.yes-dontoverwrite")},{result:"no",title:v("utwente_voorlichting:frontend.opendays_v2.js.no-overwrite")}])}onSubmitSuccess(e){let t=e;if(t.debughtmlinfo){let o=p("div",{class:"opendaysv2__debuginfo"});o.innerHTML=t.debughtmlinfo,L(".opendaysv2__successtext").after(o)}}onSubmitFailed(e,t){if(e.length===1&&e[0].name==="wrd_contact_email"&&e[0].metadata&&e[0].metadata.verifyresub){this.runConfirmResignup().then(o=>{o==="yes"&&this.validateAndSubmit({verifyresub:e[0].metadata.verifyresub})});return}super.onSubmitFailed(e,t)}doCancel(e){e&&V(e),Ae(p("div",null,p("p",null,v("utwente_voorlichting:frontend.opendays_v2.js.confirm-cancel"))),[{result:"yes",title:v("utwente_voorlichting:frontend.opendays_v2.js.yes-cancel")},{result:"no",title:v("utwente_voorlichting:frontend.opendays_v2.js.no-dont-cancel")}]).then(t=>{if(t==="yes")ce({type:"form",form:{action:location.href,vars:[{name:"type",value:"cancel"}],method:"POST"}});else{let o=new URL(location.href);o.searchParams.get("type")==="cancel"&&(o.searchParams.delete("type"),history.replaceState({},document.title,o.toString()))}})}};oe("utwente_voorlichting:opendays_v2",i=>new tc(i));M();var{createService:Wv}=(Ao(),Ce(Fo)),wr=Wv("utwente_voorlichting:leads");re();var ic=class extends tt{brochurelist;widget;downloadform;txt_afterlanding;deeplinks;constructor(e){super(e);let t=this.node.closest(".foldablecontent");t&&(window.addEventListener("hashchange",()=>this.onHashChange(t,location.hash)),location.hash.length>1&&this.onHashChange(t,location.hash)),e.dataset.brochurelist?this.brochurelist=JSON.parse(e.dataset.brochurelist):this.brochurelist=window.brochurelist,this.widget=e.closest(".brochurerequestform-container")??ue("Widget container not found"),this.downloadform=L(this.widget,".downloadpage form"),this.downloadform.addEventListener("submit",this.doDownloadBrochure.bind(this)),L(this.downloadform,".wh-form__button.email").addEventListener("click",n=>this.doEmailBrochure(n));let o=T(this.widget,"a.brochurerequestform__htmlbrochure__link");o&&(this.downloadform.programme_dl.addEventListener("change",()=>this.updateBrochureHtmlLink(o)),this.updateBrochureHtmlLink(o)),w(this.widget,".imnot").forEach(n=>
26n.addEventListener("click",s=>{V(s),F(window,"ut-brochureform-returntoform",{bubbles:!0,cancelable:!1}),setTimeout(()=>this.node.scrollIntoView({behavior:"smooth"}),300)})),this.txt_afterlanding=L(this.widget,".afterlanding__text").textContent,this.updateBrochureWidget(),window.addEventListener("ut-brochureform-returntoform",()=>this.doReturnToForm())}updateBrochureHtmlLink(e){let t="";if(this.downloadform.programme_dl.value!==""){let o=this.downloadform.programme_dl.selectedOptions[0];o?.dataset?.htmllink&&(t=o.dataset.htmllink)}e.parentElement.hidden=t==="",e.href=t??"#"}isBrochureDeeplink(e,t){if(!this.deeplinks){let o=e.closest(".foldabledeeplink");o&&(this.deeplinks=w(o,".wh-anchor[id]").map(n=>"#"+n.id))}return this.deeplinks?this.deeplinks.indexOf(t):!1}onHashChange(e,t){!t||t==="#"||this.isBrochureDeeplink(e,t)&&(e.classList.contains("foldablecontent--open")||(e.classList.contains("foldablecontent--active")?this.showBrochureRequestForm(e):new MutationObserver((o,n)=>{o.find(s=>s.target.classList.contains("foldablecontent--active"))&&(n.disconnect(),this.showBrochureRequestForm(e))}).observe(e,{subtree:!1,attributes:!0,attributeFilter:["class"]})))}showBrochureRequestForm(e){return F(e,"ws:foldable-set",{bubbles:!0,cancelable:!1,detail:{open:!0}}),!0}doEmailBrochure(e){V(e),this.sendBrochureMail(this.downloadform.programme_dl.value)}async sendBrochureMail(e){if(this.widget.classList.contains("rpc--active"))return;let t=dt().guid;if(!t){F(window,"ut-brochureform-returntoform",{bubbles:!0,cancelable:!1});return}let o={programme:e,targetinterest:(await this.getFormExtraSubmitData()).targetinterest,source:document.location.href,targetlanguage:document.documentElement.lang.substr(0,2)};this.widget.classList.add("rpc--active");let n=await wr.mailBrochure(t,o);if(this.widget.classList.remove("rpc--active"),!n)F(window,"ut-brochureform-returntoform",{bubbles:!0,cancelable:!1});else{let s=this.widget.querySelector(".emailbrochureform-success");s&&Se({allowcancel:!0,borrow:s}).runModal()}}doReturnToForm(){this.reset(),this.setBrochureState("form",!0),Ie(this.widget),Gt({guid:void 0,firstname:void 0,"brochure-lastprogramme":void 0})}doDownloadBrochure(e){V(e);let t=this.downloadform.programme_dl.selectedOptions[0];t?.dataset?.link?window.open(t.dataset.link,"_blank"):window.open(this.lookupBrochure(t.value).brochure,"_blank")}lookupBrochure(e){return this.brochurelist.find(t=>t.rowkey===e)??ue("Brochure not found")}onSubmitSuccess(e){e.guid&&pt(e.guid,this.node.firstname.value),Gt({"brochure-lastprogramme":this.node.programme.value}),this.updateBrochureWidget(!0),this.setBrochureState("download",!0),$e(this.downloadform.programme_dl,this.node.programme.value),w(this.widget,".aftersubmission").forEach(o=>o.style.display="block"),w(this.widget,".afterlanding").forEach(o=>o.style.display="none");let t=L(this.widget,".aftersubmission");this.node.classList.add("requestform--aftersubmission");for(let o of t.querySelectorAll(".text"))o.textContent=o.textContent.replace("[naam]",this.node.firstname.value);t.style.display="block"}setBrochureState(e,t){let o=e==="form";this.node.style.display=o?"block":"none",L(this.widget,".downloadpage").style.display=o?"none":"block",requestAnimationFrame(()=>Ie(this.widget)),t&&(e==="form"?L(this.widget,".requestform").focus():e==="download"&&L(this.widget,".downloadpage").focus())}updateBrochureWidget(e){if(dt()["brochure-lastprogramme"]){w(this.widget,".firstname").forEach(o=>o.textContent=dt().firstname||""),this.setBrochureState("download",e),w(this.widget,".aftersubmission").forEach(o=>o.style.display="none"),w(this.widget,".firstname").forEach(o=>o.textContent=dt().firstname||"");let t=L(this.widget,".afterlanding__text");t.textContent=this.txt_afterlanding.replace("[naam]",dt().firstname||""),t.parentElement.style.display="block",Ie(this.widget)}else this.setBrochureState("form")}};oe("utwente_voorlichting:brochurerequest",i=>new ic(i));N();var oc=class extends bt{constructor(e){super(e),this.haveprogram=!!(this.elements["program.select_master"]?.value||this.elements["program.select_bachelor"]?.value),this.haveprogram&&(this.elements["program.select_master"]&&(this.elements["program.select_master"].closest(".wh-form__fieldgroup").style.display="none"),this.elements["program.select_bachelor"]&&(this.elements["program.select_bachelor"].closest(".wh-form__fieldgroup").style.display="none")),this.elements.update.addEventListener("click",t=>this.onUpdateData(t))}onSubmitSuccess(e){this.updatetoken=e.updatetoken,super.onSubmitSuccess(e)}async onUpdateData(){let e=G({ismodal:!0});try{let t={expectedstartingyear:parseInt(this.elements["expectedstartingyear.select"].value)};this.elements.targetinterest?.value&&(t.targetinterest=this.elements.targetinterest.value);let o=t.targetinterest=="MASTER"||!this.elements["program_bachelor.select"],n=this.elements[o?"program_master.select":"program_bachelor.select"];n?.value&&(t.program=n.value),await wr.updateProfile(this.updatetoken,t),this.getCurrentPageNumber?this.gotoPage(this.getCurrentPageNumber()+1):this.gotoPage(2)}finally{e.release()}}};oe("utwente_voorlichting:stayuptodate",i=>new oc(i));re();var nc=class extends tt{widget;constructor(e){super(e),this.widget=e.closest(".widget-preregistrationwidget")??ue("Widget container not found")}async getFormExtraSubmitData(){return{...await super.getFormExtraSubmitData(),hoofdniveau:document.documentElement.dataset.hoofdniveau||"",subniveau:document.documentElement.dataset.subniveau||"",programme:document.documentElement.dataset.programme||"",interesttype:this.node.dataset.interesttype||"",dontaskpermission:this.node.dataset.dontaskpermission==="true"}}onSubmitSuccess(e){if(e.success){this.reset();let t=this.node.dataset.successRedirect;pt(e.guid,this.node.firstname.value),t?setTimeout(()=>location.href=t,150):(this.widget.classList.add("rpc--success"),Ie(this.widget))}else this.widget.classList.add("rpc--fail"),Ie(this.widget)}};oe("utwente_voorlichting:preregistration",i=>new nc(i));N();var Ni,Vn,sc=class extends me{constructor(e){super(e),Ni=e,Vn=JSON.parse(e.getAttribute("data-extraformdata")),e.programme&&(e.programme.addEventListener("change",Om),Om())}onSubmitSuccess(e){window.dataLayer.push(e.todatalayer),e.guid&&pt(e.guid,e.firstname)}};oe("utwente_voorlichting:mastercontact",i=>new sc(i));
26function Om(){if(!Vn||!Vn.tracks_per_programme)return;let i=Ni.programme.value,e=Vn.tracks_per_programme.find(n=>n.programme==i);Ni.specialization.innerHTML="";let t=ei(Ni.specialization,".wh-form__fieldgroup");if(!(e&&e.programme))t.style.display="none";else{var o=document.createElement("option");o.value=0,o.innerText=Vn.nospec,o.setAttribute("selected","selected"),Ni.specialization.appendChild(o);for(let n of e.tracks){var o=document.createElement("option");o.value=n.trackid,o.innerText=n.title,Ni.specialization.appendChild(o)}t.style.display=""}F(Ni.specialization,"refresh",{bubbles:!0,cancelable:!1})}N();var zo=(Ne(),Ce(Xe)).registerTexts;zo("utwente_voorlichting","nl",{webfeatures:{tasterdays:{js:{"alreadysignedup-line1":"Je bent met dit e-mailadres al aangemeld voor dit evenement. Als je je opnieuw aanmeldt, overschrijven we de bestaande aanmelding.","alreadysignedup-line2":"Wil je je aanmelding overschrijven?",cancelregistration:"Ik wil mijn registratie annuleren","confirm-cancel":"Weet je zeker dat je je registratie wil verwijderen?","no-dont-cancel":"Nee","no-overwrite":"Nee, niet overschrijven","yes-cancel":"Ja, verwijderen","yes-dontoverwrite":"Ja, overschrijven"}}}});zo("utwente_voorlichting","en",{webfeatures:{tasterdays:{js:{"alreadysignedup-line1":"You're already registered for this event with this email address. If you register again, we will overwrite your existing registration.","alreadysignedup-line2":"Would you like to overwrite your registration?",cancelregistration:"I wish to cancel my registration","confirm-cancel":"Are you sure you want to cancel your registration?","no-dont-cancel":"No","no-overwrite":"No, do not overwrite","yes-cancel":"Yes, cancel","yes-dontoverwrite":"Yes, overwrite"}}}});zo("utwente_voorlichting","de",{webfeatures:{tasterdays:{js:{"alreadysignedup-line1":"You're already registered for this event with this email address. If you register again, we will overwrite your existing registration.","alreadysignedup-line2":"Would you like to overwrite your registration?",cancelregistration:"I wish to cancel my registration","confirm-cancel":"Are you sure you want to cancel your registration?","no-dont-cancel":"No","no-overwrite":"No, do not overwrite","yes-cancel":"Yes, cancel","yes-dontoverwrite":"Yes, overwrite"}}}});zo("utwente_voorlichting","es",{webfeatures:{tasterdays:{js:{"alreadysignedup-line1":"You're already registered for this event with this email address. If you register again, we will overwrite your existing registration.","alreadysignedup-line2":"Would you like to overwrite your registration?",cancelregistration:"I wish to cancel my registration","confirm-cancel":"Are you sure you want to cancel your registration?","no-dont-cancel":"No","no-overwrite":"No, do not overwrite","yes-cancel":"Yes, cancel","yes-dontoverwrite":"Yes, overwrite"}}}});zo("utwente_voorlichting","it",{webfeatures:{tasterdays:{js:{"alreadysignedup-line1":"You're already registered for this event with this email address. If you register again, we will overwrite your existing registration.","alreadysignedup-line2":"Would you like to overwrite your registration?",cancelregistration:"I wish to cancel my registration","confirm-cancel":"Are you sure you want to cancel your registration?","no-dont-cancel":"No","no-overwrite":"No, do not overwrite","yes-cancel":"Yes, cancel","yes-dontoverwrite":"Yes, overwrite"}}}});zo("utwente_voorlichting","xt",{webfeatures:{tasterdays:{js:{"alreadysignedup-line1":"You're already registered for this event with this email address. If you register again, we will overwrite your existing registration.","alreadysignedup-line2":"Would you like to overwrite your registration?",cancelregistration:"I wish to cancel my registration","confirm-cancel":"Are you sure you want to cancel your registration?","no-dont-cancel":"No","no-overwrite":"No, do not overwrite","yes-cancel":"Yes, cancel","yes-dontoverwrite":"Yes, overwrite"}}}});var rc=class extends bt{constructor(e){super(e);let t=this.node.querySelector(".wh-form__fieldgroup[data-wh-form-group-for='cancelregistration'] .wh-form__richtext");t&&t.append(p("p",{class:"normal"},p("a",{href:"#",onClick:o=>this.doCancel(o)},R("utwente_voorlichting:webfeatures.tasterdays.js.cancelregistration")),p("br",null),p("br",null))),x(".utwente-tasterdays--hide-infotext-if-nl",o=>this.hideInfoTextIfNL(o))}hideInfoTextIfNL(e){e.querySelector("select").addEventListener("input",()=>this.checkInfoTextNL(e)),this.checkInfoTextNL(e)}checkInfoTextNL(e){e.querySelector(".wh-form__infotextwrapper").hidden=e.querySelector("select").value=="NL"}async doCancel(e){if(V(e),await Ae(p("div",null,p("p",null,R("utwente_voorlichting:webfeatures.tasterdays.js.confirm-cancel"))),[{result:"yes",title:R("utwente_voorlichting:webfeatures.tasterdays.js.yes-cancel")}
26,{result:"no",title:R("utwente_voorlichting:webfeatures.tasterdays.js.no-dont-cancel")}])=="yes"){let t=new URL(location.href);t.searchParams.set("cancel",1),location.href=t.toString()}}async doConfirmResignup(){return Ae(p("div",null,p("p",null,R("utwente_voorlichting:webfeatures.tasterdays.js.alreadysignedup-line1")),p("p",null,p("b",null,R("utwente_voorlichting:webfeatures.tasterdays.js.alreadysignedup-line2")))),[{result:"yes",title:R("utwente_voorlichting:webfeatures.tasterdays.js.yes-dontoverwrite")},{result:"no",title:R("utwente_voorlichting:webfeatures.tasterdays.js.no-overwrite")}])}onSubmitSuccess(e){if(e&&e.debughtmlinfo){let t=p("div",{class:"tasterdays__debuginfo"});t.innerHTML=e.debughtmlinfo,T(this.node,".wh-form__fieldgroup[data-wh-form-group-for='thankyou']").after(t)}}onSubmitFailed(e,t){if(e.length==1&&e[0].name=="wrd_contact_email"&&e[0].metadata&&e[0].metadata.verifyresub){this.doConfirmResignup().then(o=>{o=="yes"&&this.validateAndSubmit({verifyresub:e[0].metadata.verifyresub}).then(()=>this.gotoPage(1))});return}super.onSubmitFailed(e,t)}};oe("utwente_voorlichting:tasterdays",i=>new rc(i));M();var ac=class extends me{language="en";tabs=[];constructor(e){super(e),this.language=document.documentElement.lang||this.language,this.initializeTabs(),this.node.addEventListener("wh:form-pagechange",t=>this.onPageChange(t.target))}initializeTabs(){let e=T("#lll_registrationform__tabs-template");if(e){let t=L(".page-sidebar");t.appendChild(e.content),t.hidden=!1,this.tabs=w(".lll_registrationform__tab"),this.tabs.forEac
26h((o,n)=>{o.addEventListener("click",()=>{!o.disabled&&o.getAttribute("aria-selected")!=="true"&&this.gotoPage(n)})})}}onPageChange(e){let t=e.id+"-tab",o=this.tabs.findIndex(n=>n.id===t);this.tabs.forEach((n,s)=>{n.disabled=s>o,n.setAttribute("aria-selected",s===o?"true":"false")})}};_i("utwente_voorlichting:lllregistrationform",i=>new ac(i));M();re();N();N();var Um;function Wm(i){Um=i}function Bn(){return Um}var cc=(i,e)=>e.some(t=>i instanceof t),Bm,$m;function Vv(){return Bm||(Bm=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Bv(){return $m||($m=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var pc=new WeakMap,lc=new WeakMap,xr=new WeakMap;function $v(i){let e=new Promise((t,o)=>{let n=()=>{i.removeEventListener("success",s),i.removeEventListener("error",r)},s=()=>{t(vr(i.result)),n()},r=()=>{o(i.error),n()};i.addEventListener("success",s),i.addEventListener("error",r)});return xr.set(e,i),e}function Yv(i){if(pc.has(i))return;let e=new Promise((t,o)=>{let n=()=>{i.removeEventListener("complete",s),i.removeEventListener("error",r),i.removeEventListener("abort",r)},s=()=>{t(),n()},r=()=>{o(i.error||new DOMException("AbortError","AbortError")),n()};i.addEventListener("complete",s),i.addEventListener("error",r),i.addEventListener("abort",r)});pc.set(i,e)}var hc={get(i,e,t){if(i instanceof IDBTransaction){if(e==="done")return pc.get(i);if(e==="store")return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return vr(i[e])},set(i,e,t){return i[e]=t,!0},has(i,e){return i instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in i}};function Km(i){hc=i(hc)}function Xv(i){return Bv().includes(i)?function(...e){return i.apply(uc(this),e),vr(this.request)}:function(...e){return vr(i.apply(uc(this),e))}}function Gv(i){return typeof i=="function"?Xv(i):(i instanceof IDBTransaction&&Yv(i),cc(i,Vv())?new Proxy(i,hc):i)}function vr(i){if(i instanceof IDBRequest)return $v(i);if(lc.has(i))return lc.get(i);let e=Gv(i);return e!==i&&(lc.set(i,e),xr.set(e,i)),e}var uc=i=>xr.get(i);var Kv=["get","getKey","getAll","getAllKeys","count"],Jv=["put","add","delete","clear"],dc=new Map;function Ym(i,e){if(!(i instanceof IDBDatabase&&!(e in i)&&typeof e=="string"))return;if(dc.get(e))return dc.get(e);let t=e.replace(/FromIndex$/,""),o=e!==t,n=Jv.includes(t);if(!(t in(o?IDBIndex:IDBObjectStore).prototype)||!(n||Kv.includes(t)))return;let s=async function(r,...l){let a=this.transaction(r,n?"readwrite":"readonly"),d=a.store;return o&&(d=d.index(l.shift())),(await Promise.all([d[t](...l),n&&a.done]))[0]};return dc.set(e,s),s}Km(i=>({...i,get:(e,t,o)=>Ym(e,t)||i.get(e,t,o),has:(e,t)=>!!Ym(e,t)||i.has(e,t)}));var Qv=["continue","continuePrimaryKey","advance"],Xm={},mc=new WeakMap,Jm=new WeakMap,Zv={get(i,e){if(!Qv.includes(e))return i[e];let t=Xm[e];return t||(t=Xm[e]=function(...o){mc.set(this,Jm.get(this)[e](...o))}),t}};async function*ex(...i){let e=this;if(e instanceof IDBCursor||(e=await e.openCursor(...i)),!e)return;e=e;let t=new Proxy(e,Zv);for(Jm.set(t,e),xr.set(t,uc(e));e;)yield t,e=await(mc.get(t)||e.continue()),mc.delete(t)}function Gm(i,e){return e===Symbol.asyncIterator&&cc(i,[IDBIndex,IDBObjectStore,IDBCursor])||e==="iterate"&&cc(i,[IDBIndex,IDBObjectStore])}Km(i=>({...i,get(e,t,o){return Gm(e,t)?ex:i.get(e,t,o)},has(e,t){return Gm(e,t)||i.has(e,t)}}));async function Qm(i){try{let e=await window.caches.open("pwacache-"+i);for(let t of await e.keys())await e.delete(t)}catch(e){throw console.error("Cache cleanup failed",e),e}}async function Zm(){let i=await navigator.serviceWorker.getRegistrations();for(let e of i)await e.unregister()}var yr;async function ox(){await Qm(Bn())}async function nx(){location.reload()}async function sx(){await Zm()}function rx(){yr&&yr.remove(),yr=p("div",{id:"pwadebugmenu"},p("h1",null,"PWA Debugger"),p("div",null,p("button",{type:"button",onClick:ox},"Clear cache"),p("br",null),p("button",{type:"button",onClick:sx},"unregisterServiceWorkers"),p("br",null),p("button",{type:"button",onClick:nx},"Restart application"),p("br",null))),document.body.appendChild(yr)}var Hi=[],kr=1/0,eg=1/0;function tg(i){Hi.push(Date.now()),Hi=Hi.slice(-kr),Hi.at(-1)-Hi[0]&&(Hi.length>1&&V(i),Hi.length===kr&&rx())}x("[data-app-activatedebugmenu]",i=>{let e=i.dataset.appActivatedebugmenu?.split(":");e&&(kr=parseInt(e[0]),eg=parseInt(e[1]),!(!eg||!kr)&&(i.addEventListener("touchstart",tg),i.addEventListener("click",tg)))});ie();var gc=location.href.indexOf("?")>-1?location.href.split("?")[0]:location.href.split("#")[0],Tr=ee("platform:pwasettings",{allowMissing:!0})??ye.obj.pwasettings,ig=!1,Ot=Promise.withResolvers(),No;function ax(){if(Tr.appname)return Tr.appname;let i=ye.designroot.match(/^\/.publisher\/sd\/([^/]*)\/([^/]*)\/$/),e=i[1],t=i[2];return e+":"+t}function og(i,e,t){return new Promise((o,n)=>{let s=new MessageChannel;s.port1.onmessage=r=>{r.data&&r.data.__throw?n(new Error(r.data.__throw)):o(r.data)},i.postMessage({swrequest:e,data:t},[s.port2])})}async function ng(i,e){if(await Ot.promise,!No?.active)throw new Error("ServiceWorker registration failed");return og(No.active,i,e)}async function sg(){return await ng("checkversion",{pwauid:document.documentElement.dataset.whPwaUid,pwafileid:document.documentElement.dataset.whPwaFileid})}async function rg(){return await ng("downloadupdate")}async function ag(){return console.log("Reloading to update application"),ce({type:"reload"}),new Promise((i,e)=>setTimeout(()=>
26e(new Error("The update failed")),2e4))}function lg(i,e){if(ig)throw new Error("pwalib.onReady should be invoked only once");if(ig=!0,!location.href.startsWith(Hr())){alert(`You cannot access a PWA app using a URL outside its site.
27
28The WebHare 'preview' is not supported by a PWA`);return}if(!gc.endsWith("/")){alert("The application base URL must end with a /");return}e?.reportusage&&We("publisher:pwastart",{ds_appname:Bn()}),K(async function(){if(i(),e?.onAvailableOffline&&(Ot.promise=Ot.promise.then(()=>e.onAvailableOffline())),e?.onOfflineFailed&&(Ot.promise=Ot.promise.catch(o=>e.onOfflineFailed(o))),!("serviceWorker"in navigator)){Ot.reject(new Error("This browser does not support serviceWorker"));return}if(window.isSecureContext===!1){Ot.reject(new Error("This webpage is not running in a secure context (https or localhost)"));return}let t=`${ms("platform:pwaserviceworker")}ap.mjs?app=${encodeURIComponent(Bn())}`;try{No=await navigator.serviceWorker.register(t,{scope:gc}),No.installing&&No.installing.addEventListener("statechange",()=>{No?.installing?.state==="redundant"&&Ot.reject(new Error("The serviceWorker failed to install"))}),Ot.resolve(navigator.serviceWorker.ready.then(()=>{}))}catch(o){console.log("PWA Registration failed",o.message),Ot.reject(o)}})}async function lx(){if(!navigator.serviceWorker)return;let i=await navigator.serviceWorker.getRegistrations();for(let e of i)e.active&&e.scope===gc&&await og(e.active,"loading",{pwasettings:Tr,pwauid:document.documentElement.dataset.whPwaUid,pwafileid:document.documentElement.dataset.whPwaFileid})}function dx(i){if(i.data.type==="forceRefresh"){console.log("Reloading because forced by the serice worker"),ce({type:"reload"});return}if(i.data.type==="log"){console[i.data.loglevel]("[From ServiceWorker] "+i.data.message);return}console.error("onServiceWorkerMessage",i.data)}Tr&&(Wm(ax()),navigator.serviceWorker.addEventListener("message",dx),lx());te();var Ho=(Ne(),Ce(Xe)).registerTexts;Ho("utwente_voorlichting","nl",{frontend:{sirform:{askquestion:"Vraag stellen",event:"Evenement",eventtype:"Evenementstype",genericinterest_bsc:"BSc opleidingen in het algemeen",genericinterest_msc:"MSc opleidingen in het algemeen",interestedin:"Ik ben ge\xEFnteresseerd in",question:"Vragen?","question-placeholder":"Laat hier een vraag achter en we reageren via email",resetbutton:"Volgende gebruiker",school:"School",selectinterest:"Selecteer interesse",selectvalue:"Kies waarde",thankyou_message:"Het formulier is verzonden. Dank je voor je interesse in de University of Twente.",thankyou_optin_message:"We houden je op de hoogte! Bedankt voor je interesse in Universiteit Twente.",update_downloaded:"Er is een update gedownload van SIR, ververs de pagina (F5 / cmd+r) om de nieuwe versie te gebruiken."}}});Ho("utwente_voorlichting","en",{frontend:{sirform:{askquestion:"I want to ask a question",event:"Event",eventtype:"Event type",genericinterest_bsc:"BSc programmes in general",genericinterest_msc:"MSc programmes in general",interestedin:"My interests",question:"Questions?","question-placeholder":"Leave your question here and we will reply via email",resetbutton:"Next user",school:"School",selectinterest:"Select interest",selectvalue:"Select value",thankyou_message:"The registration has been submitted successfully. Thank you for your interest in the University of Twente",thankyou_optin_message:"We will keep you informed! Thank you for your interest in the University of Twente.",update_downloaded:"An update has been downloaded for SIR. Please restart (F5 / cmd+r) to use the new version."}}});Ho("utwente_voorlichting","de",{frontend:{sirform:{askquestion:"Frage stellen",event:"Event",eventtype:"Event type",genericinterest_bsc:"BSc-Studieng\xE4nge im Allgemeinen",genericinterest_msc:"MSc-Studieng\xE4nge im Allgemeinen",interestedin:"Ich interessiere mich f\xFCr",question:"Fragen?","question-placeholder":"Stellen Sie hier Ihre Frage, wir antworten Ihnen per E-Mail.",resetbutton:"N\xE4chster Benutzer",school:"Schule",selectinterest:"Interessen ausw\xE4hlen",selectvalue:"Wert ausw\xE4hlen",thankyou_message:"Das Formular wurde erfolgreich versendet",thankyou_optin_message:"Wir halten Sie auf dem Laufenden! Vielen Dank f\xFCr Ihr Interesse an der Universit\xE4t Twente.",update_downloaded:"An update has been downloaded for SIR. Please restart (F5 / cmd+r) to use the new version."}}});Ho("utwente_voorlichting","es",{frontend:{sirform:{askquestion:"I want to ask a question",event:"Event",eventtype:"Event type",genericinterest_bsc:"BSc programmes in general",genericinterest_msc:"MSc programmes in general",interestedin:"My interests",question:"Questions?","question-placeholder":"Leave your question here and we will reply via email",resetbutton:"Next user",school:"School",selectinterest:"Select interest",selectvalue:"Select value",thankyou_message:"The registration has been submitted successfully. Thank y
28ou for your interest in the University of Twente",thankyou_optin_message:"We will keep you informed! Thank you for your interest in the University of Twente.",update_downloaded:"An update has been downloaded for SIR. Please restart (F5 / cmd+r) to use the new version."}}});Ho("utwente_voorlichting","it",{frontend:{sirform:{askquestion:"I want to ask a question",event:"Event",eventtype:"Event type",genericinterest_bsc:"BSc programmes in general",genericinterest_msc:"MSc programmes in general",interestedin:"My interests",question:"Questions?","question-placeholder":"Leave your question here and we will reply via email",resetbutton:"Next user",school:"School",selectinterest:"Select interest",selectvalue:"Select value",thankyou_message:"The registration has been submitted successfully. Thank you for your interest in the University of Twente",thankyou_optin_message:"We will keep you informed! Thank you for your interest in the University of Twente.",update_downloaded:"An update has been downloaded for SIR. Please restart (F5 / cmd+r) to use the new version."}}});Ho("utwente_voorlichting","xt",{frontend:{sirform:{askquestion:"I want to ask a question",event:"Event",eventtype:"Event type",genericinterest_bsc:"BSc programmes in general",genericinterest_msc:"MSc programmes in general",interestedin:"My interests",question:"Questions?","question-placeholder":"Leave your question here and we will reply via email",resetbutton:"Next user",school:"School",selectinterest:"Select interest",selectvalue:"Select value",thankyou_message:"The registration has been submitted successfully. Thank you for your interest in the University of Twente",thankyou_optin_message:"We will keep you informed! Thank you for your interest in the University of Twente.",update_downloaded:"An update has been downloaded for SIR. Please restart (F5 / cmd+r) to use the new version."}}});var $n=null,Sr=null,dg=document.documentElement.classList.contains("utwente--ws2026");function cg(i){dg?L(".page-titlebar").replaceChildren(zi("h1",{className:"heading1"},[i])):L("h1.contentpart__title").textContent=i}function yi(){return Sr||Pe("utwente_voorlichting:sirform.config")||{fairTypes:[],fairs:[],programs:[],schools:[],now:""}}function pg(){return Sr?Sr.fairs[0].wrdGuid:Pe("utwente_voorlichting:sirform.selectedeventguid")}function wt(){let i=pg();return i&&yi().fairs.find(e=>e.wrdGuid===i)||null}function Er(){return Pe("utwente_voorlichting:sirform.uploadqueue")||[]}function px(){let i=pg();return i&&Pe("utwente_voorlichting:sirform.uploadcounts")?.[i]||0}function hx(i){let e=Pe("utwente_voorlichting:sirform.uploadcounts")||{};e[i]=(e[i]||0)+1,ze("utwente_voorlichting:sirform.uploadcounts",e)}function fc(i,e,{initialValue:t=""}={}){let o=i.value||t;i.utSlimSelect?i.utSlimSelect.setData(e):i.replaceChildren(...e),i.value&&(i.value=o,i.selectedIndex===-1&&(i.selectedIndex=0))}function hg(i){if(!i.utSlimSelect)throw new Error("SlimSelect not initialized on select element");let e=Array.from(i.options).map(t=>({value:t.value,text:t.textContent||"",id:t.value,selected:t.selected,parent:t.dataset.parent||"",style:t.getAttribute("style")||"",class:t.className||""}));i.utSlimSelect.events.search=(t,o)=>{let n=o.map(m=>m.id);if(e.forEach(m=>m.selected=n.includes(m.id)),t.length<2)return e;let s=e.filter(m=>!m.selected).map(m=>m.text||"").filter(m=>m.length>0),l=new bi(s).score(t),a=l.length?l[0].score*.66:0,d=l.filter(m=>m.score>a).map(m=>m.str),c=e.filter(m=>d.includes(m.text||"")),h=c.filter(m=>m.parent==="").map(m=>m.value);return c.forEach((m,u)=>{if(m.parent&&!h.includes(m.parent)){h.push(m.parent);let b=e.find(f=>f.value===m.parent);b&&(c.splice(u,0,b),b.class.indexOf("suboptionvisible")===-1&&(b.class+=" suboptionvisible"))}}),c}}var _c=class extends et{isAdminVisible=!1;constructor(e){super(e),$n=this,this.getElementByName("eventtype").addEventListener("change",()=>this.updateEvents()),lg(()=>{this.continuePWASetup()},{reportusage:!0}),this.setupPageForAdminForm(),this.setAdminPageVisible(!wt()),this.checkUploadQueue(),this.updateEventTypes();let t=wt();t?.fairtype&&(this.data.eventtype=t.fairtype),this.updateEvents(),t&&Qn(50).then(()=>this.data.event=t.wrdGuid),setInterval(()=>this.checkUploadQueue(),3e4)}checkUploadQueue(){let e=Er();console.log("SIR form upload queue check, entries:",e.length);for(let t of e)this.uploadEntry(t)}async uploadEntry(e){if((await Us(e)).success){let o=Er().filter(n=>n.extrasubmit.id!==e.extrasubmit.id);ze("utwente_voorlichting:sirform.uploadqueue",o),hx(e.extrasubmit.event),this.refreshStats()}}async continuePWASetup(){this.checkAppUpdate()}setAdminPageVisible(e){L("form[data-wh-form-id=config]").style.display=e?"":"none",L("form[data-wh-form-id=signup]").style.display=e?"none":"",e&&cg("Admin"),this.isAdminVisible=e,L("#sirform-status").hidden=!e,this.refreshStats();let t=yi().fairTypes.length?null:G({modal:!0});this.checkForEventUpdateas().finally(()=>{t?.release()}),this.checkAppUpdate()}refreshStats(){L("#sirform-lastupdate").textContent=yi().now,L("#sirform-registrationsinqueue").textContent=String(Er().length),L("#sirform-registrationsuploaded").textContent=String(px())}setupPageForAdminForm(){if(dg){let e=W("li",{className:"utility-item",textContent:"Admin",on:{click:t=>this.openConfig(t)}});L(".utility-menu").appendChild(e)}else{for(let t of w(".contentpart__topmenuitem--search"))t.remove();let e=W("div",{className:"contentpart__topmenuitem",textContent:"Admin",on:{click:t=>this.openConfig(t)}});L(".contentpart__topmenu").appendChild(e)}}openConfig(e){if(e.preventDefault(),this.isAdminVisible)return;let t=Se({allowcancel:!0}),o=W("form",{className:"wh-styledinput sirform__loginform"});o.addEventListener("submit",n=>this.onAdminLogin(n,o,t)),o.append(W("label",{for:"adminpassword",textContent:"Enter admin password to open configuration",className:"wh-form__label"}),W("input",{type:"password",name:"password",id:"adminpassword"}),W("button",{type:"submit",id:"adminloginbutton",textContent:"Login",className:"wh-form__button"})),t.contentnode.append(o),t.runModal()}onAdminLogin(e,t,o){e.preventDefault(),t.password.value==="aap"&&this.setAdminPageVisible(!0),o.closeDialog()}updateEventTypes(){fc(this.getElementByName("eventtype"),yi().fairTypes.toSorted(Oi(["wrdTitle","wrdGuid"])).map(e=>W("option",{value:e.wrdGuid,textContent:e.wrdTitle})))}checkForEventUpdateas=Ci(async()=>{ze("utwente_voorlichting:sirform.config",await Ki("utwente_voorlichting:fairs").getFairs()),this.updateEventTypes(),this.updateEvents()},{coalesce:!0});checkAppUpdate=Ci(async()=>{let e=await sg();if(console.log("checkAppUpdate result:",e),e.needsupdate){if(await rg(),!this.isAdminVisible)return;await Ae(v("utwente_voorlichting:frontend.sirform.update_downloaded"),[{title:"Restart"}
28]),await ag()}});updateEvents(){let e=yi().fairs.filter(o=>!this.data.eventtype||o.fairtype===this.data.eventtype),t=this.getElementByName("event");fc(t,e.toSorted(Oi([["date","desc"],"wrdTitle","wrdGuid"])).map(o=>W("option",{value:o.wrdGuid,textContent:o.title}))),t.utSlimSelect||=new ht({select:t,settings:{placeholderText:v("utwente_voorlichting:frontend.sirform.selectvalue"),modal:"off",closeOnSelect:!0,keepSearch:!0}}),hg(t)}async submit(){let e=yi().fairs.find(t=>t.wrdGuid===this.data.event)||null;return e&&(ze("utwente_voorlichting:sirform.selectedeventguid",e.wrdGuid),this.setAdminPageVisible(!1),F(window,"utwente:ut-sirform-selectevent",{bubbles:!0,cancelable:!0})),{result:{}}}};function ux(i){return document.documentElement.lang.startsWith("nl")?i.nameNl:(document.documentElement.lang.startsWith("de")?i.nameDe:i.nameEn)||i.nameEn||i.nameNl}function mx(i){let e=document.documentElement.lang.startsWith("nl")?i.nameNl:(document.documentElement.lang.startsWith("de")?i.nameDe:i.nameEn)||i.nameEn||i.nameNl;return i.isBachelor?`${e} (BSc)`:i.isMaster?`${e} (MSc)`:e}var bc=class extends me{constructor(e){super(e);let t=ee("utwente_voorlichting:sirform",{allowMissing:!0})?.fairsinfo;t&&(Sr=Ui(t)),addEventListener("utwente:ut-sirform-selectevent",s=>this.onEventSelected()),wt()&&this.onEventSelected();let o=L(this.node,"[data-wh-form-pagerole=thankyou]"),n=W("div",{className:"sirform__centerbtnwrapper"});o.append(n),n.append(W("button",{type:"button",className:"wh-form__button",textContent:v("utwente_voorlichting:frontend.sirform.resetbutton"),on:{click:()=>{this.reset(),w(this.node,"select").forEach(s=>yt(s,"change"))}}}));for(let s of w(this.node,".webform-utwente--phonefield__input"))s.inputMode="tel",s.addEventListener("input",r=>{let l=s.value.replaceAll(/[^0-9+]/g,"");l!==s.value&&(s.value=l)})}async getFieldValue(e){return e instanceof HTMLSelectElement&&e.multiple?Array.from(e.selectedOptions).map(t=>t.value).join(","):super.getFieldValue(e)}onEventSelected(){cg(wt()?.title||"");let e=yi().schools.filter(r=>wt()?.schools.includes(r.wrdId)).toSorted(Oi(["wrdTitle"]));fc(L(this.node,"select[name=school]"),[W("option",{textContent:"",value:""}),...e.map(r=>W("option",{textContent:r.wrdTitle,value:r.wrdGuid}))]),this.node.dataset.whFormVarSelectschool=e.length>1?"1":"",this.node.dataset.whFormVarSelectprogram=wt()?.allownoprogram?"":"1",this.node.dataset.whFormVarShortform=wt()?.shortform?"1":"",this.node.dataset.whFormVarAskphone=wt()?.askphone?"1":"",this.refreshConditions();let t=yi().programs.filter(r=>wt()?.programmes.includes(r.wrdId)),o=L(this.node,"select[name=interestedin]"),n=[],s=[];t.forEach(r=>{let l=[];r.tracks.length&&(l.push(...r.tracks.flatMap(a=>[{title:ux(a),value:a.wrdGuid,parent:r.wrdGuid,style:"margin-left:15px;font-size:95%;"}])),l.sort(Oi(["title"]))),s.push({title:mx(r),isBachelor:r.isBachelor,isMaster:r.isMaster,value:r.wrdGuid,tracks:l})}),s.sort(Oi(["title"])),s.forEach(r=>{n.push(W("option",{textContent:r.title,className:"mainoption"+(r.tracks.length?" mainoption--hassuboption suboptionvisible":""),value:r.value,dataset:{parent:""}})),r.tracks.length&&n.push(...r.tracks.flatMap(l=>[W("option",{textContent:l.title,value:l.value,className:"suboption",dataset:{parent:l.parent},style:l.style})]))}),t.some(r=>r.isBachelor)&&n.unshift(W("option",{textContent:v("utwente_voorlichting:frontend.sirform.genericinterest_bsc"),value:"BACHELOR"})),t.some(r=>r.isMaster)&&n.unshift(W("option",{textContent:v("utwente_voorlichting:frontend.sirform.genericinterest_msc"),value:"MASTER"})),o.replaceChildren(...n),w(this.node,".wh-form__fieldgroup--slimselect select").forEach(r=>{console.log("init slim",r,r.options),r.utSlimSelect||=new ht({select:r,events:{afterChange:()=>this.onSelectChange(r)},settings:{placeholderText:r.name==="interestedin"?v("utwente_voorlichting:frontend.sirform.selectinterest"):v("utwente_voorlichting:frontend.sirform.selectvalue"),closeOnSelect:!r.multiple,modal:"off",hideSelected:r.multiple,allowDeselect:!0,keepSearch:!0}}),hg(r)}),this.reset()}onSelectChange(e){e.name==="interestedin"&&w(".ss-content[data-id='"+e.dataset.id+"'] .mainoption--hassuboption.ss-selected").forEach(t=>{let o=!1,n=t.nextElementSibling;for(;n&&n.classList.contains("suboption");)n.classList.contains("ss-selected")||(o=!0),n=n.nextElementSibling;t.classList.toggle("suboptionvisible",o)})}async getFormExtraSubmitData(){return{id:jt(),language:Ye(),date:new Date().toISOString(),event:wt()?.wrdGuid||"",referralinfo:$n?Dp("https://www.utwente.nl/sir/adminapp"):st()}}async submitForm(e){if(!$n)return super.submitForm(e);let t=Er();return ze("utwente_voorlichting:sirform.uploadqueue",[...t,e]),$n.refreshStats(),$n.uploadEntry(e),{success:!0,result:{},errors:[],warnings:[],messages:[]}}reset(){super.reset();let e=wt()?.noNationalityPrefill?"":wt()?.address?.country;e&&setTimeout(()=>{this.getElementByName("nationality.select").utSlimSelect?.setSelected(e);let t=T("select.webform-utwente--phonefield__country");t&&(t.value=e,t.dispatchEvent(new Event("change")))},1)}};_i("utwente_voorlichting:sirform.config",i=>new _c(i));_i("utwente_voorlichting:sirform.signup",i=>{let e=i.elements.namedItem("interestedin"),t=W("select",{multiple:!0,...Yo(e,["id","name"])});e.replaceWith(t);let o=i.elements.namedItem("school"),n=W("select",{...Yo(o,["id","name"])});return o.replaceWith(n),new bc(i)});N();var ug,Lr;function gx(i){i.addEventListener("change",()=>fx(i));let e=document.querySelectorAll(".blockswidget__item");ug=Array.from(e),Lr=document.querySelector(".blockswidget__bigline")}function fx(i){let e=i.category.value,t=document.querySelector(".blockswidget__content"),o=0;Lr.parentNode&&t.removeChild(Lr);let n=e===""||e==="all";for(let s of ug){let r=!0;n||(r=s.dataset.relevantto.split(" ").indexOf(e)>-1),r?(t.appendChild(s),o===0&&t.appendChild(Lr),o++):s.parentNode&&t.removeChild(s)}}x(".blockswidget__form",gx);M();M();N();te();var rz=location.hash;function _x(i){i.classList.add("foldabledeeplink--open");let e=i.querySelector(".foldabledeeplink__foldcontainer");e&&(e.style.height="auto",e.style.overflow="inherit")}function mg(i){let e=i,t=[];for(i?.matches(".foldablecontent, .foldabledeeplink")&&t.unshift(i);e=e?.parentElement?.closest(".foldablecontent, .foldabledeeplink")||null,!!e;)t.unshift(e);t.forEach(o=>{o.classList.contains("foldabledeeplink")?_x(o):o.classList.contains("foldablecontent")?Id(o):console.log("don't know how to open ",o)})}M();function wc(i){if(i={togglebutton:null,openbutton:null,closebutton:null,togglecontainer:null,htmlclass:"",panel:null,visibleonfocus:!1,visibleonhover:!1,title:"",debug:!1,...i},i.debug&&console.log(i),i.togglebutton)for(let e of Cr(i.togglebutton))e.addEventListener("click",t=>vx(t,i));if(i.openbutton)for(let e of Cr(i.openbutton))e.addEventListener("click",t=>vc(t,i));if(i.closebutton)for(let e of Cr(i.closebutton))e.addEventListener("click",t=>Fr(t,i));if(i.visibleonfocus&&i.panel.addEventListener("focusout",e=>wx(e,i)),i.visibleonhover){for(let e of Cr(i.togglebutton))e.addEventListener("mouseenter",t=>gg(t,i)),e.addEventListener("mouseleave",t=>fg(t,i));i.panel&&(i.panel.addEventListener("mouseenter",e=>gg(e,i)),i.panel.addEventListener("mouseleave",e=>fg(e,i)))}}function Cr(i){return i instanceof NodeList||i instanceof HTMLCollection?Array.from(i):i instanceof HTMLElement?[i]:(console.error("makeArray cannot handle input
28:",i),[])}function gg(i,e){vc(i,e)}function fg(i,e){Fr(i,e)}function wx(i,e){i.relatedTarget&&e.panel.contains(i.relatedTarget)||Fr(i,e)}function vx(i,e){!document.documentElement.classList.contains(e.htmlclass)?vc(i,e):Fr(i,e)}function vc(i,e){let t=e.togglecontainer??document.documentElement;e.htmlclass!==""&&t.classList.add(e.htmlclass),e.panel&&e.panel.focus()}function Fr(i,e){let t=e.togglecontainer??document.documentElement;e.htmlclass!==""&&t.classList.remove(e.htmlclass)}te();var _g=5,xc=!1,Ar=null;x(".widget--activitieslist",yx);x(".blockswidget__item__preregistration",i=>i.addEventListener("click",e=>xx(i,e)));function xx(i,e){V(e);let t=i.querySelector("template");if(!t)throw new Error("<template> with dialog not found");let o=Se({allowcancel:!0});o.contentnode.appendChild(t.content.cloneNode(!0)),we(o.contentnode),o.runModal()}function yx(i){let e=i.querySelector(".whflattabs"),t=e.classList.tagName==="FORM"?e:e.closest("form"),o=i.querySelector(".whflattabs__filtertoggle"),s=i.querySelector(".whflattabs__filterpanel").querySelector(".whflattabs__filterpanel__closebutton"),r=i.querySelector(".activities__filterpanel__items");r.classList.add("ps-container--customstyling"),Ar=new Xt(r,{wheelPropagation:!1,wheelSpeed:2,minScrollbarLength:20}),window.addEventListener("resize",h=>
28{Ar.update()}),window.addEventListener("load",h=>{Ar.update()});let l=new URLSearchParams(location.search).get("program"),a=new URLSearchParams(location.search).get("category");if(l){let h=i.querySelector(`.activityitem[data-programid="${CSS.escape(l)}"]`);h&&(t.category.value=h.dataset.relevantto);let m=i.querySelectorAll('.activities__filterpanel__items [type="checkbox"]');for(let u of m)u.checked=u.dataset.urlparam===l}else a&&(t.category.value=a);if(wc({togglebutton:o,closebutton:s,htmlclass:"whflattabs__filterpanel--open"}),i.querySelector(".activitieslist__showmore").addEventListener("click",kx),document.querySelector(".whflattabs__filterpanel__showresults").addEventListener("click",Tx),yc({target:s}),t.addEventListener("input",yc),l){let h=i.querySelectorAll(".activityitem:not(.activityitem--hidden)");h.length>0&&mg(h[0])}}function kx(i){document.querySelector(".widget--activitieslist").classList.add("widget--activitieslist-showall"),xc=!0,yc(i)}function Tx(){document.documentElement.classList.remove("whflattabs__filterpanel--open")}function yc(i){let e=i.target.closest(".widget--activitieslist"),t=e.querySelector("form"),o=t.query.value,n=t.category.value,s=t.querySelectorAll(".activities__filterpanel__item"),r=[],l=[],a=[];for(let _ of s){let y=(o===""||_.dataset.title.toLowerCase().indexOf(o)>-1)&&(n===""||_.dataset.relevantto.split(",").indexOf(n)>-1);_.classList.toggle("hidden",!y);let E=_.querySelector("input");if(E.toggleAttribute("disabled",!y),y&&r.push(E.value),y&&E.checked){l.push(E.value);let S=`[for="${E.id}"]`,P=document.querySelectorAll(S);for(let z of P){let $=z.textContent;if($){a.push($);break}}}}let d=0,c=[];for(let _ of i.target.closest(".widget--activitieslist").querySelectorAll(".activityitem")){let y=(l.length>0?l.indexOf(_.dataset.studyfilterid)>-1:!0)&&(n===""||_.dataset.relevantto.split(",").indexOf(n)>-1);_.classList.toggle("activityitem--hidden",!y||!xc&&d>=_g),y&&(d++,c=c.concat(_.dataset.eventids.split(",")))}let h=t.querySelector(".whflattabs__filterpanel");h.classList.toggle("activities__filterpanel--noresults",r.length===0),e.classList.toggle("widget--activitieslist--noresults",d===0);let m=l.length>0,u=new Set(c).size,b="";if(m){let _=[];for(let y of a)_.push(`\u201C${y}\u201D`);d===1?b=Ye()==="nl"?`<b>${u} resultaat</b> voor `+_.join(", "):`<b>${u} result</b> for `+_.join(", "):b=Ye()==="nl"?`<b>${u} resultaten</b> voor `+_.join(", "):`<b>${u} results</b> for `+_.join(", ")}else n===""?d===1?b=Ye()==="nl"?`<b>${u} resultaat</b>`:`<b>${u} result</b>`:b=Ye()==="nl"?`<b>${u} resultaten</b>`:`<b>${u} results</b>`:n!==""&&(d===1?b=Ye()==="nl"?`<b>${u} resultaat</b> voor \u201C${n}\u201D`:`<b>${u} result</b> for \u201C${n}\u201D`:b=Ye()==="nl"?`<b>${u} resultaten</b> voor \u201C${n}\u201D`:`<b>${u} results</b> for \u201C${n}\u201D`);e.querySelector(".activitieslist__resultscount").innerHTML=b;let f=e.querySelector(".activitieslist__showmore");f&&(f.style.display=!xc&&d>_g?"block":"none",L(f,".activitieslist__showmore__category").textContent=n);let g="";d===0?g=Ye()==="nl"?"Geen resultaten":"No results":d===1?g=Ye()==="nl"?"Toon 1 resultaat":"Show 1 result":d>1&&(g=Ye()==="nl"?`Toon ${d} resultaten`:`Show ${d} results`),h.querySelector(".whflattabs__filterpanel__showresults").innerHTML=g,Ar.update(
28)}x(".js-activityitem",i=>i.addEventListener("click",()=>{let e=T("form.js-activityoverview__targetgroup"),t;e?t=e?.elements.namedItem("category")?.value||"":t=T(".page-filterstabs__listitem input:checked")?.value||"";let o=i.dataset.tagmanagerType||"",n=w(".js-activityitem").indexOf(i)+1;window.dataLayer.push({event:"scc-click",type:o,relevantto:t,position:n})}));function Ex(i){let e=L(i,"form");pe(e,"change",t=>Sx(t))}function Sx(i){let e=i.target.closest("form"),t=i.target,o=t.value;if(t.name==="option"){let s=i.target.closest(".activityitem").querySelectorAll("[data-foroption]");for(let l of s)l.classList.toggle("activityitem__ischosenoption",l.dataset.foroption===o);let r=t.closest(".activityitem__panel");for(let l of w(".activityitem__timeslots__label"))l.hidden=!o||l.closest(".activityitem__panel")!==r;for(let l of w(".activityitem__timeslot"))l.hidden=!o||l.dataset.timeslotForEvent!==o,L(l,"input").checked=!1}let n=t.dataset.signuplink;n&&L(e,".activityitem__signupbutton a[href]").setAttribute("href",n)}x(".activityitem--withdayselect",Ex);M();var kc=class{node;myFilter;bigline=null;constructor(){this.node=L(".pagefilters__itemcontainer"),this.bigline=T(".blockswidget__bigline"),this.myFilter=new Lt(null);let e=ee("utwente_voorlichting:activities");if(e?.addlinks&&e?.addlinks.length>0){let t=p("ul",{class:"page-filterstabs__list"},e.addlinks.map(o=>p("li",{class:"page-filterstabs__listitem"},p("a",{class:"page-filterstabs__listitem__link",href:o.link},o.title))));T(".page-filterstabs__inner")?.appendChild(t)}}async filter(e){let t=this.myFilter.filter(e)||[];return this.bigline&&(t.length>0?t.splice(1,0,this.bigline):this.bigline.parentNode&&this.bigline.parentNode.removeChild(this.bigline)),t}};ft("ActivitiesFilter",()=>new kc);N();function Lx(i){let e=i.previousElementSibling;if(!e?.matches('meta[name="ut-insertactivitiesoverviewwidget-experiment"'))return;let t=`ut-ctalinks-${document.documentElement.dataset.id}-experimentgroup`,o=wp(t)?.abgroup??"unset";o==="unset"&&(o=Math.floor(Math.random()*4),ea(t,{abgroup:o})),i.classList.add("widget-ctalinks--variant"+o),document.documentElement.dataset.experimentId=e.getAttribute("content"),document.documentElement.dataset.experimentVariant=o,window.dataLayer.push({experimentId:document.documentElement.dataset.experimentId,experimentVariant:document.documentElement.dataset.experimentVariant}),w(i,".widget--ctalinks__item").forEach(n=>n.addEventListener("click",()=>{window.dataLayer.push({event:"scc_cta_button_click"})}))}x(".widget-ctalinks",Lx);window.__resetCTALinkExperiment=function(){let i=`ut-ctalinks-${document.documentElement.dataset.id}-experimentgroup`;ea(i,null),location.reload()};ct();var Cx=globalThis.whAssetPacks||={};Cx["utwente_base:ws2026"]="2026-10-05T15:48:04.554Z";
29/*!
30 * perfect-scrollbar v1.5.3
31 * Copyright 2021 Hyunje Jun, MDBootstrap and Contributors
32 * Licensed under MIT
33 */
34/*! Bundled license information:
35
36@webhare/dompack-carrousel/src/iscroll.modified.js:
37  (*! iScroll v5.2.0 ~ (c) 2008-2016 Matteo Spinelli ~ http://cubiq.org/license *)
38
39get-size/get-size.js:
40  (*!
41   * getSize v2.0.3
42   * measure size of elements
43   * MIT license
44   *)
45
46outlayer/outlayer.js:
47  (*!
48   * Outlayer v2.1.1
49   * the brains and guts of a layout library
50   * MIT license
51   *)
52
53masonry-layout/masonry.js:
54  (*!
55   * Masonry v4.2.1
56   * Cascading grid layout library
57   * https://masonry.desandro.com
58   * MIT License
59   * by David DeSandro
60   *)
61*/
62//# sourceMappingURL=/.wh/ea/ap/utwente_base.ws2026/ap.mjs.map

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.