shift73k/priv/static/assets/app.js

82 lines
152 KiB
JavaScript

(function(){var e=t();function t(){if(typeof window.CustomEvent=="function")return window.CustomEvent;function r(s,o){o=o||{bubbles:!1,cancelable:!1,detail:void 0};var a=document.createEvent("CustomEvent");return a.initCustomEvent(s,o.bubbles,o.cancelable,o.detail),a}return r.prototype=window.Event.prototype,r}function i(r,s){var o=document.createElement("input");return o.type="hidden",o.name=r,o.value=s,o}function n(r,s){var o=r.getAttribute("data-to"),a=i("_method",r.getAttribute("data-method")),l=i("_csrf_token",r.getAttribute("data-csrf")),h=document.createElement("form"),c=r.getAttribute("target");h.method=r.getAttribute("data-method")==="get"?"get":"post",h.action=o,h.style.display="hidden",c?h.target=c:s&&(h.target="_blank"),h.appendChild(l),h.appendChild(a),document.body.appendChild(h),h.submit()}window.addEventListener("click",function(r){var s=r.target;if(!r.defaultPrevented)for(;s&&s.getAttribute;){var o=new e("phoenix.link.click",{bubbles:!0,cancelable:!0});if(!s.dispatchEvent(o))return r.preventDefault(),r.stopImmediatePropagation(),!1;if(s.getAttribute("data-method"))return n(s,r.metaKey||r.shiftKey),r.preventDefault(),!1;s=s.parentNode}},!1),window.addEventListener("phoenix.link.click",function(r){var s=r.target.getAttribute("data-confirm");s&&!window.confirm(s)&&r.preventDefault()},!1)})();var it=e=>typeof e=="function"?e:function(){return e},lr=typeof self<"u"?self:null,tt=typeof window<"u"?window:null,nt=lr||tt||nt,cr="2.0.0",we={connecting:0,open:1,closing:2,closed:3},hr=1e4,dr=1e3,oe={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Te={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},si={longpoll:"longpoll",websocket:"websocket"},ur={complete:4},gt=class{constructor(e,t,i,n){this.channel=e,this.event=t,this.payload=i||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHooks=[],this.sent=!1}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}matchReceive({status:e,response:t,_ref:i}){this.recHooks.filter(n=>n.status===e).forEach(n=>n.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},Dn=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=null,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},fr=class{constructor(e,t,i){this.state=oe.closed,this.topic=e,this.params=it(t||{}),this.socket=i,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new gt(this,Te.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Dn(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=oe.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",()=>{this.state=oe.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic} ${this.joinRef()}`),this.state=oe.closed,this.socket.remove(this)}),this.onError(n=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.isJoining()&&this.joinPush.reset(),this.state=oe.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic} (${this.joinRef()})`,this.joinPush.timeout),new gt(this,Te.leave,it({}),this.timeout).send(),this.state=oe.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Te.reply,(n,r)=>{this.trigger(this.replyEventName(r),n)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}onClose(e){this.on(Te.close,e)}onError(e){return this.on(Te.error,t=>e(t))}on(e,t){let i=this.bindingRef++;return this.bindings.push({event:e,ref:i,callback:t}),i}off(e,t){this.bindings=this.bindings.filter(i=>!(i.event===e&&(typeof t>"u"||t===i.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,i=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let n=new gt(this,e,function(){return t},i);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=oe.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Te.close,"leave")},i=new gt(this,Te.leave,it({}),e);return i.receive("ok",()=>t()).receive("timeout",()=>t()),i.send(),this.canPush()||i.trigger("ok",{}),i}onMessage(e,t,i){return t}isMember(e,t,i,n){return this.topic!==e?!1:n&&n!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:i,joinRef:n}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=oe.joining,this.joinPush.resend(e))}trigger(e,t,i,n){let r=this.onMessage(e,t,i,n);if(t&&!r)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let s=this.bindings.filter(o=>o.event===e);for(let o=0;o<s.length;o++)s[o].callback(r,i,n||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===oe.closed}isErrored(){return this.state===oe.errored}isJoined(){return this.state===oe.joined}isJoining(){return this.state===oe.joining}isLeaving(){return this.state===oe.leaving}},Ot=class{static request(e,t,i,n,r,s,o){if(nt.XDomainRequest){let a=new nt.XDomainRequest;return this.xdomainRequest(a,e,t,n,r,s,o)}else{let a=new nt.XMLHttpRequest;return this.xhrRequest(a,e,t,i,n,r,s,o)}}static xdomainRequest(e,t,i,n,r,s,o){return e.timeout=r,e.open(t,i),e.onload=()=>{let a=this.parseJSON(e.responseText);o&&o(a)},s&&(e.ontimeout=s),e.onprogress=()=>{},e.send(n),e}static xhrRequest(e,t,i,n,r,s,o,a){return e.open(t,i,!0),e.timeout=s,e.setRequestHeader("Content-Type",n),e.onerror=()=>a&&a(null),e.onreadystatechange=()=>{if(e.readyState===ur.complete&&a){let l=this.parseJSON(e.responseText);a(l)}},o&&(e.ontimeout=o),e.send(r),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let i=[];for(var n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=t?`${t}[${n}]`:n,s=e[n];typeof s=="object"?i.push(this.serialize(s,r)):i.push(encodeURIComponent(r)+"="+encodeURIComponent(s))}return i.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let i=e.match(/\?/)?"&":"?";return`${e}${i}${this.serialize(t)}`}},zt=class{constructor(e){this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=we.connecting,this.poll()}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+si.websocket),"$1/"+si.longpoll)}endpointURL(){return Ot.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,i){this.close(e,t,i),this.readyState=we.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===we.open||this.readyState===we.connecting}poll(){this.ajax("GET",null,()=>this.ontimeout(),e=>{if(e){var{status:t,token:i,messages:n}=e;this.token=i}else t=0;switch(t){case 200:n.forEach(r=>{setTimeout(()=>this.onmessage({data:r}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=we.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${t}`)}})}send(e){this.ajax("POST",e,()=>this.onerror("timeout"),t=>{(!t||t.status!==200)&&(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1))})}close(e,t,i){for(let r of this.reqs)r.abort();this.readyState=we.closed;let n=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:i});typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",n)):this.onclose(n)}ajax(e,t,i,n){let r,s=()=>{this.reqs.delete(r),i()};r=Ot.request(e,this.endpointURL(),"application/json",t,this.timeout,s,o=>{this.reqs.delete(r),this.isActive()&&n(o)}),this.reqs.add(r)}},mt={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let i=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(i))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[i,n,r,s,o]=JSON.parse(e);return t({join_ref:i,ref:n,topic:r,event:s,payload:o})}},binaryEncode(e){let{join_ref:t,ref:i,event:n,topic:r,payload:s}=e,o=this.META_LENGTH+t.length+i.length+r.length+n.length,a=new ArrayBuffer(this.HEADER_LENGTH+o),l=new DataView(a),h=0;l.setUint8(h++,this.KINDS.push),l.setUint8(h++,t.length),l.setUint8(h++,i.length),l.setUint8(h++,r.length),l.setUint8(h++,n.length),Array.from(t,d=>l.setUint8(h++,d.charCodeAt(0))),Array.from(i,d=>l.setUint8(h++,d.charCodeAt(0))),Array.from(r,d=>l.setUint8(h++,d.charCodeAt(0))),Array.from(n,d=>l.setUint8(h++,d.charCodeAt(0)));var c=new Uint8Array(a.byteLength+s.byteLength);return c.set(new Uint8Array(a),0),c.set(new Uint8Array(s),a.byteLength),c.buffer},binaryDecode(e){let t=new DataView(e),i=t.getUint8(0),n=new TextDecoder;switch(i){case this.KINDS.push:return this.decodePush(e,t,n);case this.KINDS.reply:return this.decodeReply(e,t,n);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,n)}},decodePush(e,t,i){let n=t.getUint8(1),r=t.getUint8(2),s=t.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,a=i.decode(e.slice(o,o+n));o=o+n;let l=i.decode(e.slice(o,o+r));o=o+r;let h=i.decode(e.slice(o,o+s));o=o+s;let c=e.slice(o,e.byteLength);return{join_ref:a,ref:null,topic:l,event:h,payload:c}},decodeReply(e,t,i){let n=t.getUint8(1),r=t.getUint8(2),s=t.getUint8(3),o=t.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=i.decode(e.slice(a,a+n));a=a+n;let h=i.decode(e.slice(a,a+r));a=a+r;let c=i.decode(e.slice(a,a+s));a=a+s;let d=i.decode(e.slice(a,a+o));a=a+o;let g=e.slice(a,e.byteLength),u={status:d,response:g};return{join_ref:l,ref:h,topic:c,event:Te.reply,payload:u}},decodeBroadcast(e,t,i){let n=t.getUint8(1),r=t.getUint8(2),s=this.HEADER_LENGTH+2,o=i.decode(e.slice(s,s+n));s=s+n;let a=i.decode(e.slice(s,s+r));s=s+r;let l=e.slice(s,e.byteLength);return{join_ref:null,ref:null,topic:o,event:a,payload:l}}},pr=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=t.timeout||hr,this.transport=t.transport||nt.WebSocket||zt,this.establishedConnections=0,this.defaultEncoder=mt.encode.bind(mt),this.defaultDecoder=mt.decode.bind(mt),this.closeWasClean=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.transport!==zt?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let i=null;tt&&tt.addEventListener&&(tt.addEventListener("pagehide",n=>{this.conn&&(this.disconnect(),i=this.connectClock)}),tt.addEventListener("pageshow",n=>{i===this.connectClock&&(i=null,this.connect())})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.rejoinAfterMs=n=>t.rejoinAfterMs?t.rejoinAfterMs(n):[1e3,2e3,5e3][n-1]||1e4,this.reconnectAfterMs=n=>t.reconnectAfterMs?t.reconnectAfterMs(n):[10,50,100,150,200,250,500,1e3,2e3][n-1]||5e3,this.logger=t.logger||null,this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=it(t.params||{}),this.endPoint=`${e}/${si.websocket}`,this.vsn=t.vsn||cr,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Dn(()=>{this.teardown(()=>this.connect())},this.reconnectAfterMs)}getLongPollTransport(){return zt}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,this.reconnectTimer.reset(),this.sendBuffer=[],this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=Ot.appendParams(Ot.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,i){this.connectClock++,this.closeWasClean=!0,this.reconnectTimer.reset(),this.teardown(e,t,i)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=it(e)),!this.conn&&(this.connectClock++,this.closeWasClean=!1,this.conn=new this.transport(this.endPointURL()),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t))}log(e,t,i){this.logger(e,t,i)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),i=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let n=this.onMessage(r=>{r.ref===t&&(this.off([n]),e(Date.now()-i))});return!0}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.resetHeartbeat(),this.stateChangeCallbacks.open.forEach(([,e])=>e())}heartbeatTimeout(){this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),dr,"heartbeat timeout"))}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,i){if(!this.conn)return e&&e();this.waitForBufferDone(()=>{this.conn&&(t?this.conn.close(t,i||""):this.conn.close()),this.waitForSocketClosed(()=>{this.conn&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t=1){if(t===5||!this.conn||!this.conn.bufferedAmount){e();return}setTimeout(()=>{this.waitForBufferDone(e,t+1)},150*t)}waitForSocketClosed(e,t=1){if(t===5||!this.conn||this.conn.readyState===we.closed){e();return}setTimeout(()=>{this.waitForSocketClosed(e,t+1)},150*t)}onConnClose(e){let t=e&&e.code;this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(),this.clearHeartbeats(),!this.closeWasClean&&t!==1e3&&this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(([,i])=>i(e))}onConnError(e){this.hasLogger()&&this.log("transport",e);let t=this.transport,i=this.establishedConnections;this.stateChangeCallbacks.error.forEach(([,n])=>{n(e,t,i)}),(t===this.transport||i>0)&&this.triggerChanError()}triggerChanError(){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(Te.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case we.connecting:return"connecting";case we.open:return"open";case we.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t.joinRef()!==e.joinRef())}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([i])=>e.indexOf(i)===-1)}channel(e,t={}){let i=new fr(e,t,this);return this.channels.push(i),i}push(e){if(this.hasLogger()){let{topic:t,event:i,payload:n,ref:r,join_ref:s}=e;this.log("push",`${t} ${i} (${s}, ${r})`,n)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){this.pendingHeartbeatRef&&!this.isConnected()||(this.pendingHeartbeatRef=this.makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs))}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:i,event:n,payload:r,ref:s,join_ref:o}=t;s&&s===this.pendingHeartbeatRef&&(this.clearHeartbeats(),this.pendingHeartbeatRef=null,this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)),this.hasLogger()&&this.log("receive",`${r.status||""} ${i} ${n} ${s&&"("+s+")"||""}`,r);for(let a=0;a<this.channels.length;a++){const l=this.channels[a];l.isMember(i,n,r,o)&&l.trigger(n,r,s,o)}for(let a=0;a<this.stateChangeCallbacks.message.length;a++){let[,l]=this.stateChangeCallbacks.message[a];l(t)}})}leaveOpenTopic(e){let t=this.channels.find(i=>i.topic===e&&(i.isJoined()||i.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}},Z=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gr(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var i=function n(){if(this instanceof n){var r=[null];r.push.apply(r,arguments);var s=Function.bind.apply(t,r);return new s}return t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(i,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}),i}var oi={},mr={get exports(){return oi},set exports(e){oi=e}};/**
* @license MIT
* topbar 1.0.0, 2021-01-06
* http://buunguyen.github.io/topbar
* Copyright (c) 2021 Buu Nguyen
*/(function(e){(function(t,i){(function(){for(var d=0,g=["ms","moz","webkit","o"],u=0;u<g.length&&!t.requestAnimationFrame;++u)t.requestAnimationFrame=t[g[u]+"RequestAnimationFrame"],t.cancelAnimationFrame=t[g[u]+"CancelAnimationFrame"]||t[g[u]+"CancelRequestAnimationFrame"];t.requestAnimationFrame||(t.requestAnimationFrame=function(y,v){var _=new Date().getTime(),S=Math.max(0,16-(_-d)),N=t.setTimeout(function(){y(_+S)},S);return d=_+S,N}),t.cancelAnimationFrame||(t.cancelAnimationFrame=function(y){clearTimeout(y)})})();function n(){r.width=t.innerWidth,r.height=5*h.barThickness;var d=r.getContext("2d");d.shadowBlur=h.shadowBlur,d.shadowColor=h.shadowColor;var g,u=d.createLinearGradient(0,0,r.width,0);for(g in h.barColors)u.addColorStop(g,h.barColors[g]);d.lineWidth=h.barThickness,d.beginPath(),d.moveTo(0,h.barThickness/2),d.lineTo(Math.ceil(a*r.width),h.barThickness/2),d.strokeStyle=u,d.stroke()}var r,s,o,a,l,h={autoRun:!0,barThickness:3,barColors:{0:"rgba(26, 188, 156, .9)",".25":"rgba(52, 152, 219, .9)",".50":"rgba(241, 196, 15, .9)",".75":"rgba(230, 126, 34, .9)","1.0":"rgba(211, 84, 0, .9)"},shadowBlur:10,shadowColor:"rgba(0, 0, 0, .6)",className:null},c={config:function(d){for(var g in d)h.hasOwnProperty(g)&&(h[g]=d[g])},show:function(){var d,g,u;l||(l=!0,o!==null&&t.cancelAnimationFrame(o),r||((u=(r=i.createElement("canvas")).style).position="fixed",u.top=u.left=u.right=u.margin=u.padding=0,u.zIndex=100001,u.display="none",h.className&&r.classList.add(h.className),i.body.appendChild(r),d="resize",g=n,(u=t).addEventListener?u.addEventListener(d,g,!1):u.attachEvent?u.attachEvent("on"+d,g):u["on"+d]=g),r.style.opacity=1,r.style.display="block",c.progress(0),h.autoRun&&function y(){s=t.requestAnimationFrame(y),c.progress("+"+.05*Math.pow(1-Math.sqrt(a),2))}())},progress:function(d){return d===void 0||(typeof d=="string"&&(d=(0<=d.indexOf("+")||0<=d.indexOf("-")?a:0)+parseFloat(d)),a=1<d?1:d,n()),a},hide:function(){l&&(l=!1,s!=null&&(t.cancelAnimationFrame(s),s=null),function d(){return 1<=c.progress("+.1")&&(r.style.opacity-=.05,r.style.opacity<=.05)?(r.style.display="none",void(o=null)):void(o=t.requestAnimationFrame(d))}())}};e.exports=c}).call(Z,window,document)})(mr);const bi=oi;var Ln="consecutive-reloads",vr=10,br=5e3,_r=1e4,yr=3e4,On=["phx-click-loading","phx-change-loading","phx-submit-loading","phx-keydown-loading","phx-keyup-loading","phx-blur-loading","phx-focus-loading"],le="data-phx-component",Yt="data-phx-link",Er="track-static",wr="data-phx-link-state",Ee="data-phx-ref",Ne="data-phx-ref-src",xn="track-uploads",Me="data-phx-upload-ref",_i="data-phx-preflighted-refs",Ar="data-phx-done-refs",$i="drop-target",ai="data-phx-active-refs",kt="phx:live-file:updated",li="data-phx-skip",Fi="data-phx-prune",ji="page-loading",Bi="phx-connected",Gt="phx-loading",Ui="phx-no-feedback",Vi="phx-error",je="data-phx-parent-id",yi="data-phx-main",ht="data-phx-root-id",Cr="trigger-action",ci="feedback-for",Pn="phx-has-focused",Tr=["text","textarea","number","email","password","search","tel","url","date","time","datetime-local","color","range"],Rn=["checkbox","radio"],hi="phx-has-submitted",Oe="data-phx-session",Ue=`[${Oe}]`,Wi="data-phx-sticky",rt="data-phx-static",Qt="data-phx-readonly",vt="data-phx-disabled",di="disable-with",bt="data-phx-disable-with-restore",Ye="hook",Sr="debounce",kr="throttle",ui="update",Dr="key",ve="phxPrivate",qi="auto-recover",_t="phx:live-socket:debug",Zt="phx:live-socket:profiling",ei="phx:live-socket:latency-sim",Lr="progress",Ki="mounted",Or=1,xr=200,Pr="phx-",Rr=3e4,Ge="debounce-trigger",yt="throttled",Ji="debounce-prev-key",Nr={debounce:300,throttle:300},Xi="d",be="s",ae="c",zi="e",Yi="r",Gi="t",Ir="p",Mr=class{constructor(e,t,i){this.liveSocket=i,this.entry=e,this.offset=0,this.chunkSize=t,this.chunkTimer=null,this.uploadChannel=i.channel(`lvu:${e.ref}`,{token:e.metadata()})}error(e){clearTimeout(this.chunkTimer),this.uploadChannel.leave(),this.entry.error(e)}upload(){this.uploadChannel.onError(e=>this.error(e)),this.uploadChannel.join().receive("ok",e=>this.readNextChunk()).receive("error",e=>this.error(e))}isDone(){return this.offset>=this.entry.file.size}readNextChunk(){let e=new window.FileReader,t=this.entry.file.slice(this.offset,this.chunkSize+this.offset);e.onload=i=>{if(i.target.error===null)this.offset+=i.target.result.byteLength,this.pushChunk(i.target.result);else return Q("Read error: "+i.target.error)},e.readAsArrayBuffer(t)}pushChunk(e){this.uploadChannel.isJoined()&&this.uploadChannel.push("chunk",e).receive("ok",()=>{this.entry.progress(this.offset/this.entry.file.size*100),this.isDone()||(this.chunkTimer=setTimeout(()=>this.readNextChunk(),this.liveSocket.getLatencySim()||0))})}},Q=(e,t)=>console.error&&console.error(e,t),De=e=>{let t=typeof e;return t==="number"||t==="string"&&/^(0|[1-9]\d*)$/.test(e)};function Hr(){let e=new Set,t=document.querySelectorAll("*[id]");for(let i=0,n=t.length;i<n;i++)e.has(t[i].id)?console.error(`Multiple IDs detected: ${t[i].id}. Ensure unique element ids.`):e.add(t[i].id)}var $r=(e,t,i,n)=>{e.liveSocket.isDebugEnabled()&&console.log(`${e.id} ${t}: ${i} - `,n)},ti=e=>typeof e=="function"?e:function(){return e},Dt=e=>JSON.parse(JSON.stringify(e)),st=(e,t,i)=>{do{if(e.matches(`[${t}]`)&&!e.disabled)return e;e=e.parentElement||e.parentNode}while(e!==null&&e.nodeType===1&&!(i&&i.isSameNode(e)||e.matches(Ue)));return null},Qe=e=>e!==null&&typeof e=="object"&&!(e instanceof Array),Fr=(e,t)=>JSON.stringify(e)===JSON.stringify(t),Qi=e=>{for(let t in e)return!1;return!0},Le=(e,t)=>e&&t(e),jr=function(e,t,i,n){e.forEach(r=>{new Mr(r,i.config.chunk_size,n).upload()})},Nn={canPushState(){return typeof history.pushState<"u"},dropLocal(e,t,i){return e.removeItem(this.localKey(t,i))},updateLocal(e,t,i,n,r){let s=this.getLocal(e,t,i),o=this.localKey(t,i),a=s===null?n:r(s);return e.setItem(o,JSON.stringify(a)),a},getLocal(e,t,i){return JSON.parse(e.getItem(this.localKey(t,i)))},updateCurrentState(e){this.canPushState()&&history.replaceState(e(history.state||{}),"",window.location.href)},pushState(e,t,i){if(this.canPushState()){if(i!==window.location.href){if(t.type=="redirect"&&t.scroll){let r=history.state||{};r.scroll=t.scroll,history.replaceState(r,"",window.location.href)}delete t.scroll,history[e+"State"](t,"",i||null);let n=this.getHashTargetEl(window.location.hash);n?n.scrollIntoView():t.type==="redirect"&&window.scroll(0,0)}}else this.redirect(i)},setCookie(e,t){document.cookie=`${e}=${t}`},getCookie(e){return document.cookie.replace(new RegExp(`(?:(?:^|.*;s*)${e}s*=s*([^;]*).*$)|^.*$`),"$1")},redirect(e,t){t&&Nn.setCookie("__phoenix_flash__",t+"; max-age=60000; path=/"),window.location=e},localKey(e,t){return`${e}-${t}`},getHashTargetEl(e){let t=e.toString().substring(1);if(t!=="")return document.getElementById(t)||document.querySelector(`a[name="${t}"]`)}},_e=Nn,ge={byId(e){return document.getElementById(e)||Q(`no id found for ${e}`)},removeClass(e,t){e.classList.remove(t),e.classList.length===0&&e.removeAttribute("class")},all(e,t,i){if(!e)return[];let n=Array.from(e.querySelectorAll(t));return i?n.forEach(i):n},childNodeLength(e){let t=document.createElement("template");return t.innerHTML=e,t.content.childElementCount},isUploadInput(e){return e.type==="file"&&e.getAttribute(Me)!==null},findUploadInputs(e){return this.all(e,`input[type="file"][${Me}]`)},findComponentNodeList(e,t){return this.filterWithinSameLiveView(this.all(e,`[${le}="${t}"]`),e)},isPhxDestroyed(e){return!!(e.id&&ge.private(e,"destroyed"))},wantsNewTab(e){return e.ctrlKey||e.shiftKey||e.metaKey||e.button&&e.button===1||e.target.getAttribute("target")==="_blank"},isUnloadableFormSubmit(e){return!e.defaultPrevented&&!this.wantsNewTab(e)},isNewPageHref(e,t){let i;try{i=new URL(e)}catch{try{i=new URL(e,t)}catch{return!0}}return i.host===t.host&&i.protocol===t.protocol&&i.pathname===t.pathname&&i.search===t.search?i.hash===""&&!i.href.endsWith("#"):!0},markPhxChildDestroyed(e){this.isPhxChild(e)&&e.setAttribute(Oe,""),this.putPrivate(e,"destroyed",!0)},findPhxChildrenInFragment(e,t){let i=document.createElement("template");return i.innerHTML=e,this.findPhxChildren(i.content,t)},isIgnored(e,t){return(e.getAttribute(t)||e.getAttribute("data-phx-update"))==="ignore"},isPhxUpdate(e,t,i){return e.getAttribute&&i.indexOf(e.getAttribute(t))>=0},findPhxSticky(e){return this.all(e,`[${Wi}]`)},findPhxChildren(e,t){return this.all(e,`${Ue}[${je}="${t}"]`)},findParentCIDs(e,t){let i=new Set(t),n=t.reduce((r,s)=>{let o=`[${le}="${s}"] [${le}]`;return this.filterWithinSameLiveView(this.all(e,o),e).map(a=>parseInt(a.getAttribute(le))).forEach(a=>r.delete(a)),r},i);return n.size===0?new Set(t):n},filterWithinSameLiveView(e,t){return t.querySelector(Ue)?e.filter(i=>this.withinSameLiveView(i,t)):e},withinSameLiveView(e,t){for(;e=e.parentNode;){if(e.isSameNode(t))return!0;if(e.getAttribute(Oe)!==null)return!1}},private(e,t){return e[ve]&&e[ve][t]},deletePrivate(e,t){e[ve]&&delete e[ve][t]},putPrivate(e,t,i){e[ve]||(e[ve]={}),e[ve][t]=i},updatePrivate(e,t,i,n){let r=this.private(e,t);r===void 0?this.putPrivate(e,t,n(i)):this.putPrivate(e,t,n(r))},copyPrivates(e,t){t[ve]&&(e[ve]=t[ve])},putTitle(e){let t=document.querySelector("title");if(t){let{prefix:i,suffix:n}=t.dataset;document.title=`${i||""}${e}${n||""}`}else document.title=e},debounce(e,t,i,n,r,s,o,a){let l=e.getAttribute(i),h=e.getAttribute(r);l===""&&(l=n),h===""&&(h=s);let c=l||h;switch(c){case null:return a();case"blur":this.once(e,"debounce-blur")&&e.addEventListener("blur",()=>a());return;default:let d=parseInt(c),g=()=>h?this.deletePrivate(e,yt):a(),u=this.incCycle(e,Ge,g);if(isNaN(d))return Q(`invalid throttle/debounce value: ${c}`);if(h){let v=!1;if(t.type==="keydown"){let _=this.private(e,Ji);this.putPrivate(e,Ji,t.key),v=_!==t.key}if(!v&&this.private(e,yt))return!1;a(),this.putPrivate(e,yt,!0),setTimeout(()=>{o()&&this.triggerCycle(e,Ge)},d)}else setTimeout(()=>{o()&&this.triggerCycle(e,Ge,u)},d);let y=e.form;y&&this.once(y,"bind-debounce")&&y.addEventListener("submit",()=>{Array.from(new FormData(y).entries(),([v])=>{let _=y.querySelector(`[name="${v}"]`);this.incCycle(_,Ge),this.deletePrivate(_,yt)})}),this.once(e,"bind-debounce")&&e.addEventListener("blur",()=>this.triggerCycle(e,Ge))}},triggerCycle(e,t,i){let[n,r]=this.private(e,t);i||(i=n),i===n&&(this.incCycle(e,t),r())},once(e,t){return this.private(e,t)===!0?!1:(this.putPrivate(e,t,!0),!0)},incCycle(e,t,i=function(){}){let[n]=this.private(e,t)||[0,i];return n++,this.putPrivate(e,t,[n,i]),n},discardError(e,t,i){let n=t.getAttribute&&t.getAttribute(i),r=n&&e.querySelector(`[id="${n}"], [name="${n}"], [name="${n}[]"]`);r&&(this.private(r,Pn)||this.private(r,hi)||t.classList.add(Ui))},showError(e,t){(e.id||e.name)&&this.all(e.form,`[${t}="${e.id}"], [${t}="${e.name}"]`,i=>{this.removeClass(i,Ui)})},isPhxChild(e){return e.getAttribute&&e.getAttribute(je)},isPhxSticky(e){return e.getAttribute&&e.getAttribute(Wi)!==null},firstPhxChild(e){return this.isPhxChild(e)?e:this.all(e,`[${je}]`)[0]},dispatchEvent(e,t,i={}){let r={bubbles:i.bubbles===void 0?!0:!!i.bubbles,cancelable:!0,detail:i.detail||{}},s=t==="click"?new MouseEvent("click",r):new CustomEvent(t,r);e.dispatchEvent(s)},cloneNode(e,t){if(typeof t>"u")return e.cloneNode(!0);{let i=e.cloneNode(!1);return i.innerHTML=t,i}},mergeAttrs(e,t,i={}){let n=i.exclude||[],r=i.isIgnored,s=t.attributes;for(let a=s.length-1;a>=0;a--){let l=s[a].name;n.indexOf(l)<0&&e.setAttribute(l,t.getAttribute(l))}let o=e.attributes;for(let a=o.length-1;a>=0;a--){let l=o[a].name;r?l.startsWith("data-")&&!t.hasAttribute(l)&&e.removeAttribute(l):t.hasAttribute(l)||e.removeAttribute(l)}},mergeFocusedInput(e,t){e instanceof HTMLSelectElement||ge.mergeAttrs(e,t,{exclude:["value"]}),t.readOnly?e.setAttribute("readonly",!0):e.removeAttribute("readonly")},hasSelectionRange(e){return e.setSelectionRange&&(e.type==="text"||e.type==="textarea")},restoreFocus(e,t,i){if(!ge.isTextualInput(e))return;let n=e.matches(":focus");e.readOnly&&e.blur(),n||e.focus(),this.hasSelectionRange(e)&&e.setSelectionRange(t,i)},isFormInput(e){return/^(?:input|select|textarea)$/i.test(e.tagName)&&e.type!=="button"},syncAttrsToProps(e){e instanceof HTMLInputElement&&Rn.indexOf(e.type.toLocaleLowerCase())>=0&&(e.checked=e.getAttribute("checked")!==null)},isTextualInput(e){return Tr.indexOf(e.type)>=0},isNowTriggerFormExternal(e,t){return e.getAttribute&&e.getAttribute(t)!==null},syncPendingRef(e,t,i){let n=e.getAttribute(Ee);if(n===null)return!0;let r=e.getAttribute(Ne);return ge.isFormInput(e)||e.getAttribute(i)!==null?(ge.isUploadInput(e)&&ge.mergeAttrs(e,t,{isIgnored:!0}),ge.putPrivate(e,Ee,t),!1):(On.forEach(s=>{e.classList.contains(s)&&t.classList.add(s)}),t.setAttribute(Ee,n),t.setAttribute(Ne,r),!0)},cleanChildNodes(e,t){if(ge.isPhxUpdate(e,t,["append","prepend"])){let i=[];e.childNodes.forEach(n=>{n.id||(n.nodeType===Node.TEXT_NODE&&n.nodeValue.trim()===""||Q(`only HTML element tags with an id are allowed inside containers with phx-update.
removing illegal node: "${(n.outerHTML||n.nodeValue).trim()}"
`),i.push(n))}),i.forEach(n=>n.remove())}},replaceRootContainer(e,t,i){let n=new Set(["id",Oe,rt,yi,ht]);if(e.tagName.toLowerCase()===t.toLowerCase())return Array.from(e.attributes).filter(r=>!n.has(r.name.toLowerCase())).forEach(r=>e.removeAttribute(r.name)),Object.keys(i).filter(r=>!n.has(r.toLowerCase())).forEach(r=>e.setAttribute(r,i[r])),e;{let r=document.createElement(t);return Object.keys(i).forEach(s=>r.setAttribute(s,i[s])),n.forEach(s=>r.setAttribute(s,e.getAttribute(s))),r.innerHTML=e.innerHTML,e.replaceWith(r),r}},getSticky(e,t,i){let n=(ge.private(e,"sticky")||[]).find(([r])=>t===r);if(n){let[r,s,o]=n;return o}else return typeof i=="function"?i():i},deleteSticky(e,t){this.updatePrivate(e,"sticky",[],i=>i.filter(([n,r])=>n!==t))},putSticky(e,t,i){let n=i(e);this.updatePrivate(e,"sticky",[],r=>{let s=r.findIndex(([o])=>t===o);return s>=0?r[s]=[t,i,n]:r.push([t,i,n]),r})},applyStickyOperations(e){let t=ge.private(e,"sticky");t&&t.forEach(([i,n,r])=>this.putSticky(e,i,n))}},m=ge,ii=class{static isActive(e,t){let i=t._phxRef===void 0,r=e.getAttribute(ai).split(",").indexOf(G.genFileRef(t))>=0;return t.size>0&&(i||r)}static isPreflighted(e,t){return e.getAttribute(_i).split(",").indexOf(G.genFileRef(t))>=0&&this.isActive(e,t)}constructor(e,t,i){this.ref=G.genFileRef(t),this.fileEl=e,this.file=t,this.view=i,this.meta=null,this._isCancelled=!1,this._isDone=!1,this._progress=0,this._lastProgressSent=-1,this._onDone=function(){},this._onElUpdated=this.onElUpdated.bind(this),this.fileEl.addEventListener(kt,this._onElUpdated)}metadata(){return this.meta}progress(e){this._progress=Math.floor(e),this._progress>this._lastProgressSent&&(this._progress>=100?(this._progress=100,this._lastProgressSent=100,this._isDone=!0,this.view.pushFileProgress(this.fileEl,this.ref,100,()=>{G.untrackFile(this.fileEl,this.file),this._onDone()})):(this._lastProgressSent=this._progress,this.view.pushFileProgress(this.fileEl,this.ref,this._progress)))}cancel(){this._isCancelled=!0,this._isDone=!0,this._onDone()}isDone(){return this._isDone}error(e="failed"){this.fileEl.removeEventListener(kt,this._onElUpdated),this.view.pushFileProgress(this.fileEl,this.ref,{error:e}),G.clearFiles(this.fileEl)}onDone(e){this._onDone=()=>{this.fileEl.removeEventListener(kt,this._onElUpdated),e()}}onElUpdated(){this.fileEl.getAttribute(ai).split(",").indexOf(this.ref)===-1&&this.cancel()}toPreflightPayload(){return{last_modified:this.file.lastModified,name:this.file.name,relative_path:this.file.webkitRelativePath,size:this.file.size,type:this.file.type,ref:this.ref}}uploader(e){if(this.meta.uploader){let t=e[this.meta.uploader]||Q(`no uploader configured for ${this.meta.uploader}`);return{name:this.meta.uploader,callback:t}}else return{name:"channel",callback:jr}}zipPostFlight(e){this.meta=e.entries[this.ref],this.meta||Q(`no preflight upload response returned with ref ${this.ref}`,{input:this.fileEl,response:e})}},Br=0,G=class{static genFileRef(e){let t=e._phxRef;return t!==void 0?t:(e._phxRef=(Br++).toString(),e._phxRef)}static getEntryDataURL(e,t,i){let n=this.activeFiles(e).find(r=>this.genFileRef(r)===t);i(URL.createObjectURL(n))}static hasUploadsInProgress(e){let t=0;return m.findUploadInputs(e).forEach(i=>{i.getAttribute(_i)!==i.getAttribute(Ar)&&t++}),t>0}static serializeUploads(e){let t=this.activeFiles(e),i={};return t.forEach(n=>{let r={path:e.name},s=e.getAttribute(Me);i[s]=i[s]||[],r.ref=this.genFileRef(n),r.last_modified=n.lastModified,r.name=n.name||r.ref,r.relative_path=n.webkitRelativePath,r.type=n.type,r.size=n.size,i[s].push(r)}),i}static clearFiles(e){e.value=null,e.removeAttribute(Me),m.putPrivate(e,"files",[])}static untrackFile(e,t){m.putPrivate(e,"files",m.private(e,"files").filter(i=>!Object.is(i,t)))}static trackFiles(e,t){if(e.getAttribute("multiple")!==null){let i=t.filter(n=>!this.activeFiles(e).find(r=>Object.is(r,n)));m.putPrivate(e,"files",this.activeFiles(e).concat(i)),e.value=null}else m.putPrivate(e,"files",t)}static activeFileInputs(e){let t=m.findUploadInputs(e);return Array.from(t).filter(i=>i.files&&this.activeFiles(i).length>0)}static activeFiles(e){return(m.private(e,"files")||[]).filter(t=>ii.isActive(e,t))}static inputsAwaitingPreflight(e){let t=m.findUploadInputs(e);return Array.from(t).filter(i=>this.filesAwaitingPreflight(i).length>0)}static filesAwaitingPreflight(e){return this.activeFiles(e).filter(t=>!ii.isPreflighted(e,t))}constructor(e,t,i){this.view=t,this.onComplete=i,this._entries=Array.from(G.filesAwaitingPreflight(e)||[]).map(n=>new ii(e,n,t)),this.numEntriesInProgress=this._entries.length}entries(){return this._entries}initAdapterUpload(e,t,i){this._entries=this._entries.map(r=>(r.zipPostFlight(e),r.onDone(()=>{this.numEntriesInProgress--,this.numEntriesInProgress===0&&this.onComplete()}),r));let n=this._entries.reduce((r,s)=>{let{name:o,callback:a}=s.uploader(i.uploaders);return r[o]=r[o]||{callback:a,entries:[]},r[o].entries.push(s),r},{});for(let r in n){let{callback:s,entries:o}=n[r];s(o,t,e,i)}}},Ur={focusMain(){let e=document.querySelector("main h1, main, h1");if(e){let t=e.tabIndex;e.tabIndex=-1,e.focus(),e.tabIndex=t}},anyOf(e,t){return t.find(i=>e instanceof i)},isFocusable(e,t){return e instanceof HTMLAnchorElement&&e.rel!=="ignore"||e instanceof HTMLAreaElement&&e.href!==void 0||!e.disabled&&this.anyOf(e,[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement,HTMLButtonElement])||e instanceof HTMLIFrameElement||e.tabIndex>0||!t&&e.tabIndex===0&&e.getAttribute("tabindex")!==null&&e.getAttribute("aria-hidden")!=="true"},attemptFocus(e,t){if(this.isFocusable(e,t))try{e.focus()}catch{}return!!document.activeElement&&document.activeElement.isSameNode(e)},focusFirstInteractive(e){let t=e.firstElementChild;for(;t;){if(this.attemptFocus(t,!0)||this.focusFirstInteractive(t,!0))return!0;t=t.nextElementSibling}},focusFirst(e){let t=e.firstElementChild;for(;t;){if(this.attemptFocus(t)||this.focusFirst(t))return!0;t=t.nextElementSibling}},focusLast(e){let t=e.lastElementChild;for(;t;){if(this.attemptFocus(t)||this.focusLast(t))return!0;t=t.previousElementSibling}}},Be=Ur,Vr={LiveFileUpload:{activeRefs(){return this.el.getAttribute(ai)},preflightedRefs(){return this.el.getAttribute(_i)},mounted(){this.preflightedWas=this.preflightedRefs()},updated(){let e=this.preflightedRefs();this.preflightedWas!==e&&(this.preflightedWas=e,e===""&&this.__view.cancelSubmit(this.el.form)),this.activeRefs()===""&&(this.el.value=null),this.el.dispatchEvent(new CustomEvent(kt))}},LiveImgPreview:{mounted(){this.ref=this.el.getAttribute("data-phx-entry-ref"),this.inputEl=document.getElementById(this.el.getAttribute(Me)),G.getEntryDataURL(this.inputEl,this.ref,e=>{this.url=e,this.el.src=e})},destroyed(){URL.revokeObjectURL(this.url)}},FocusWrap:{mounted(){this.focusStart=this.el.firstElementChild,this.focusEnd=this.el.lastElementChild,this.focusStart.addEventListener("focus",()=>Be.focusLast(this.el)),this.focusEnd.addEventListener("focus",()=>Be.focusFirst(this.el)),this.el.addEventListener("phx:show-end",()=>this.el.focus()),window.getComputedStyle(this.el).display!=="none"&&Be.focusFirst(this.el)}}},Wr=Vr,qr=class{constructor(e,t,i){let n=new Set,r=new Set([...t.children].map(o=>o.id)),s=[];Array.from(e.children).forEach(o=>{if(o.id&&(n.add(o.id),r.has(o.id))){let a=o.previousElementSibling&&o.previousElementSibling.id;s.push({elementId:o.id,previousElementId:a})}}),this.containerId=t.id,this.updateType=i,this.elementsToModify=s,this.elementIdsToAdd=[...r].filter(o=>!n.has(o))}perform(){let e=m.byId(this.containerId);this.elementsToModify.forEach(t=>{t.previousElementId?Le(document.getElementById(t.previousElementId),i=>{Le(document.getElementById(t.elementId),n=>{n.previousElementSibling&&n.previousElementSibling.id==i.id||i.insertAdjacentElement("afterend",n)})}):Le(document.getElementById(t.elementId),i=>{i.previousElementSibling==null||e.insertAdjacentElement("afterbegin",i)})}),this.updateType=="prepend"&&this.elementIdsToAdd.reverse().forEach(t=>{Le(document.getElementById(t),i=>e.insertAdjacentElement("afterbegin",i))})}},Zi=11;function Kr(e,t){var i=t.attributes,n,r,s,o,a;if(!(t.nodeType===Zi||e.nodeType===Zi)){for(var l=i.length-1;l>=0;l--)n=i[l],r=n.name,s=n.namespaceURI,o=n.value,s?(r=n.localName||r,a=e.getAttributeNS(s,r),a!==o&&(n.prefix==="xmlns"&&(r=n.name),e.setAttributeNS(s,r,o))):(a=e.getAttribute(r),a!==o&&e.setAttribute(r,o));for(var h=e.attributes,c=h.length-1;c>=0;c--)n=h[c],r=n.name,s=n.namespaceURI,s?(r=n.localName||r,t.hasAttributeNS(s,r)||e.removeAttributeNS(s,r)):t.hasAttribute(r)||e.removeAttribute(r)}}var Et,Jr="http://www.w3.org/1999/xhtml",se=typeof document>"u"?void 0:document,Xr=!!se&&"content"in se.createElement("template"),zr=!!se&&se.createRange&&"createContextualFragment"in se.createRange();function Yr(e){var t=se.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}function Gr(e){Et||(Et=se.createRange(),Et.selectNode(se.body));var t=Et.createContextualFragment(e);return t.childNodes[0]}function Qr(e){var t=se.createElement("body");return t.innerHTML=e,t.childNodes[0]}function Zr(e){return e=e.trim(),Xr?Yr(e):zr?Gr(e):Qr(e)}function wt(e,t){var i=e.nodeName,n=t.nodeName,r,s;return i===n?!0:(r=i.charCodeAt(0),s=n.charCodeAt(0),r<=90&&s>=97?i===n.toUpperCase():s<=90&&r>=97?n===i.toUpperCase():!1)}function es(e,t){return!t||t===Jr?se.createElement(e):se.createElementNS(t,e)}function ts(e,t){for(var i=e.firstChild;i;){var n=i.nextSibling;t.appendChild(i),i=n}return t}function ni(e,t,i){e[i]!==t[i]&&(e[i]=t[i],e[i]?e.setAttribute(i,""):e.removeAttribute(i))}var en={OPTION:function(e,t){var i=e.parentNode;if(i){var n=i.nodeName.toUpperCase();n==="OPTGROUP"&&(i=i.parentNode,n=i&&i.nodeName.toUpperCase()),n==="SELECT"&&!i.hasAttribute("multiple")&&(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),i.selectedIndex=-1)}ni(e,t,"selected")},INPUT:function(e,t){ni(e,t,"checked"),ni(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var i=t.value;e.value!==i&&(e.value=i);var n=e.firstChild;if(n){var r=n.nodeValue;if(r==i||!i&&r==e.placeholder)return;n.nodeValue=i}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var i=-1,n=0,r=e.firstChild,s,o;r;)if(o=r.nodeName&&r.nodeName.toUpperCase(),o==="OPTGROUP")s=r,r=s.firstChild;else{if(o==="OPTION"){if(r.hasAttribute("selected")){i=n;break}n++}r=r.nextSibling,!r&&s&&(r=s.nextSibling,s=null)}e.selectedIndex=i}}},Ze=1,is=11,tn=3,nn=8;function Re(){}function ns(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}function rs(e){return function(i,n,r){if(r||(r={}),typeof n=="string")if(i.nodeName==="#document"||i.nodeName==="HTML"||i.nodeName==="BODY"){var s=n;n=se.createElement("html"),n.innerHTML=s}else n=Zr(n);var o=r.getNodeKey||ns,a=r.onBeforeNodeAdded||Re,l=r.onNodeAdded||Re,h=r.onBeforeElUpdated||Re,c=r.onElUpdated||Re,d=r.onBeforeNodeDiscarded||Re,g=r.onNodeDiscarded||Re,u=r.onBeforeElChildrenUpdated||Re,y=r.childrenOnly===!0,v=Object.create(null),_=[];function S(T){_.push(T)}function N(T,A){if(T.nodeType===Ze)for(var b=T.firstChild;b;){var L=void 0;A&&(L=o(b))?S(L):(g(b),b.firstChild&&N(b,A)),b=b.nextSibling}}function f(T,A,b){d(T)!==!1&&(A&&A.removeChild(T),g(T),N(T,b))}function w(T){if(T.nodeType===Ze||T.nodeType===is)for(var A=T.firstChild;A;){var b=o(A);b&&(v[b]=A),w(A),A=A.nextSibling}}w(i);function x(T){l(T);for(var A=T.firstChild;A;){var b=A.nextSibling,L=o(A);if(L){var I=v[L];I&&wt(A,I)?(A.parentNode.replaceChild(I,A),C(I,A)):x(A)}else x(A);A=b}}function E(T,A,b){for(;A;){var L=A.nextSibling;(b=o(A))?S(b):f(A,T,!0),A=L}}function C(T,A,b){var L=o(A);L&&delete v[L],!(!b&&(h(T,A)===!1||(e(T,A),c(T),u(T,A)===!1)))&&(T.nodeName!=="TEXTAREA"?P(T,A):en.TEXTAREA(T,A))}function P(T,A){var b=A.firstChild,L=T.firstChild,I,U,j,J,B;e:for(;b;){for(J=b.nextSibling,I=o(b);L;){if(j=L.nextSibling,b.isSameNode&&b.isSameNode(L)){b=J,L=j;continue e}U=o(L);var ee=L.nodeType,W=void 0;if(ee===b.nodeType&&(ee===Ze?(I?I!==U&&((B=v[I])?j===B?W=!1:(T.insertBefore(B,L),U?S(U):f(L,T,!0),L=B):W=!1):U&&(W=!1),W=W!==!1&&wt(L,b),W&&C(L,b)):(ee===tn||ee==nn)&&(W=!0,L.nodeValue!==b.nodeValue&&(L.nodeValue=b.nodeValue))),W){b=J,L=j;continue e}U?S(U):f(L,T,!0),L=j}if(I&&(B=v[I])&&wt(B,b))T.appendChild(B),C(B,b);else{var K=a(b);K!==!1&&(K&&(b=K),b.actualize&&(b=b.actualize(T.ownerDocument||se)),T.appendChild(b),x(b))}b=J,L=j}E(T,L,U);var z=en[T.nodeName];z&&z(T,A)}var k=i,M=k.nodeType,H=n.nodeType;if(!y){if(M===Ze)H===Ze?wt(i,n)||(g(i),k=ts(i,es(n.nodeName,n.namespaceURI))):k=n;else if(M===tn||M===nn){if(H===M)return k.nodeValue!==n.nodeValue&&(k.nodeValue=n.nodeValue),k;k=n}}if(k===n)g(i);else{if(n.isSameNode&&n.isSameNode(k))return;if(C(k,n,y),_)for(var p=0,D=_.length;p<D;p++){var R=v[_[p]];R&&f(R,R.parentNode,!1)}}return!y&&k!==i&&i.parentNode&&(k.actualize&&(k=k.actualize(i.ownerDocument||se)),i.parentNode.replaceChild(k,i)),k}}var ss=rs(Kr),rn=ss,At=class{static patchEl(e,t,i){rn(e,t,{childrenOnly:!1,onBeforeElUpdated:(n,r)=>{if(i&&i.isSameNode(n)&&m.isFormInput(n))return m.mergeFocusedInput(n,r),!1}})}constructor(e,t,i,n,r){this.view=e,this.liveSocket=e.liveSocket,this.container=t,this.id=i,this.rootID=e.root.id,this.html=n,this.targetCID=r,this.cidPatch=De(this.targetCID),this.callbacks={beforeadded:[],beforeupdated:[],beforephxChildAdded:[],afteradded:[],afterupdated:[],afterdiscarded:[],afterphxChildAdded:[],aftertransitionsDiscarded:[]}}before(e,t){this.callbacks[`before${e}`].push(t)}after(e,t){this.callbacks[`after${e}`].push(t)}trackBefore(e,...t){this.callbacks[`before${e}`].forEach(i=>i(...t))}trackAfter(e,...t){this.callbacks[`after${e}`].forEach(i=>i(...t))}markPrunableContentForRemoval(){m.all(this.container,"[phx-update=append] > *, [phx-update=prepend] > *",e=>{e.setAttribute(Fi,"")})}perform(){let{view:e,liveSocket:t,container:i,html:n}=this,r=this.isCIDPatch()?this.targetCIDContainer(n):i;if(this.isCIDPatch()&&!r)return;let s=t.getActiveElement(),{selectionStart:o,selectionEnd:a}=s&&m.hasSelectionRange(s)?s:{},l=t.binding(ui),h=t.binding(ci),c=t.binding(di),d=t.binding(Cr),g=t.binding("remove"),u=[],y=[],v=[],_=[],S=null,N=t.time("premorph container prep",()=>this.buildDiffHTML(i,n,l,r));return this.trackBefore("added",i),this.trackBefore("updated",i,i),t.time("morphdom",()=>{rn(r,N,{childrenOnly:r.getAttribute(le)===null,getNodeKey:f=>m.isPhxDestroyed(f)?null:f.id,onBeforeNodeAdded:f=>(this.trackBefore("added",f),f),onNodeAdded:f=>{f instanceof HTMLImageElement&&f.srcset?f.srcset=f.srcset:f instanceof HTMLVideoElement&&f.autoplay&&f.play(),m.isNowTriggerFormExternal(f,d)&&(S=f),m.discardError(r,f,h),(m.isPhxChild(f)&&e.ownsElement(f)||m.isPhxSticky(f)&&e.ownsElement(f.parentNode))&&this.trackAfter("phxChildAdded",f),u.push(f)},onNodeDiscarded:f=>{(m.isPhxChild(f)||m.isPhxSticky(f))&&t.destroyViewByEl(f),this.trackAfter("discarded",f)},onBeforeNodeDiscarded:f=>f.getAttribute&&f.getAttribute(Fi)!==null?!0:f.parentNode!==null&&m.isPhxUpdate(f.parentNode,l,["append","prepend"])&&f.id?!1:f.getAttribute&&f.getAttribute(g)?(_.push(f),!1):!this.skipCIDSibling(f),onElUpdated:f=>{m.isNowTriggerFormExternal(f,d)&&(S=f),y.push(f)},onBeforeElUpdated:(f,w)=>{if(m.cleanChildNodes(w,l),this.skipCIDSibling(w)||m.isPhxSticky(f))return!1;if(m.isIgnored(f,l)||f.form&&f.form.isSameNode(S))return this.trackBefore("updated",f,w),m.mergeAttrs(f,w,{isIgnored:!0}),y.push(f),m.applyStickyOperations(f),!1;if(f.type==="number"&&f.validity&&f.validity.badInput)return!1;if(!m.syncPendingRef(f,w,c))return m.isUploadInput(f)&&(this.trackBefore("updated",f,w),y.push(f)),m.applyStickyOperations(f),!1;if(m.isPhxChild(w)){let E=f.getAttribute(Oe);return m.mergeAttrs(f,w,{exclude:[rt]}),E!==""&&f.setAttribute(Oe,E),f.setAttribute(ht,this.rootID),m.applyStickyOperations(f),!1}return m.copyPrivates(w,f),m.discardError(r,w,h),s&&f.isSameNode(s)&&m.isFormInput(f)&&f.type!=="hidden"?(this.trackBefore("updated",f,w),m.mergeFocusedInput(f,w),m.syncAttrsToProps(f),y.push(f),m.applyStickyOperations(f),!1):(m.isPhxUpdate(w,l,["append","prepend"])&&v.push(new qr(f,w,w.getAttribute(l))),m.syncAttrsToProps(w),m.applyStickyOperations(w),this.trackBefore("updated",f,w),!0)}})}),t.isDebugEnabled()&&Hr(),v.length>0&&t.time("post-morph append/prepend restoration",()=>{v.forEach(f=>f.perform())}),t.silenceEvents(()=>m.restoreFocus(s,o,a)),m.dispatchEvent(document,"phx:update"),u.forEach(f=>this.trackAfter("added",f)),y.forEach(f=>this.trackAfter("updated",f)),_.length>0&&(t.transitionRemoves(_),t.requestDOMUpdate(()=>{_.forEach(f=>{let w=m.firstPhxChild(f);w&&t.destroyViewByEl(w),f.remove()}),this.trackAfter("transitionsDiscarded",_)})),S&&(t.unload(),S.submit()),!0}isCIDPatch(){return this.cidPatch}skipCIDSibling(e){return e.nodeType===Node.ELEMENT_NODE&&e.getAttribute(li)!==null}targetCIDContainer(e){if(!this.isCIDPatch())return;let[t,...i]=m.findComponentNodeList(this.container,this.targetCID);return i.length===0&&m.childNodeLength(e)===1?t:t&&t.parentNode}buildDiffHTML(e,t,i,n){let r=this.isCIDPatch(),s=r&&n.getAttribute(le)===this.targetCID.toString();if(!r||s)return t;{let o=null,a=document.createElement("template");o=m.cloneNode(n);let[l,...h]=m.findComponentNodeList(o,this.targetCID);return a.innerHTML=t,h.forEach(c=>c.remove()),Array.from(o.childNodes).forEach(c=>{c.id&&c.nodeType===Node.ELEMENT_NODE&&c.getAttribute(le)!==this.targetCID.toString()&&(c.setAttribute(li,""),c.innerHTML="")}),Array.from(a.content.childNodes).forEach(c=>o.insertBefore(c,l)),l.remove(),o.outerHTML}}},sn=class{static extract(e){let{[Yi]:t,[zi]:i,[Gi]:n}=e;return delete e[Yi],delete e[zi],delete e[Gi],{diff:e,title:n,reply:t||null,events:i||[]}}constructor(e,t){this.viewId=e,this.rendered={},this.mergeDiff(t)}parentViewId(){return this.viewId}toString(e){return this.recursiveToString(this.rendered,this.rendered[ae],e)}recursiveToString(e,t=e[ae],i){i=i?new Set(i):null;let n={buffer:"",components:t,onlyCids:i};return this.toOutputBuffer(e,null,n),n.buffer}componentCIDs(e){return Object.keys(e[ae]||{}).map(t=>parseInt(t))}isComponentOnlyDiff(e){return e[ae]?Object.keys(e).length===1:!1}getComponent(e,t){return e[ae][t]}mergeDiff(e){let t=e[ae],i={};if(delete e[ae],this.rendered=this.mutableMerge(this.rendered,e),this.rendered[ae]=this.rendered[ae]||{},t){let n=this.rendered[ae];for(let r in t)t[r]=this.cachedFindComponent(r,t[r],n,t,i);for(let r in t)n[r]=t[r];e[ae]=t}}cachedFindComponent(e,t,i,n,r){if(r[e])return r[e];{let s,o,a=t[be];if(De(a)){let l;a>0?l=this.cachedFindComponent(a,n[a],i,n,r):l=i[-a],o=l[be],s=this.cloneMerge(l,t),s[be]=o}else s=t[be]!==void 0?t:this.cloneMerge(i[e]||{},t);return r[e]=s,s}}mutableMerge(e,t){return t[be]!==void 0?t:(this.doMutableMerge(e,t),e)}doMutableMerge(e,t){for(let i in t){let n=t[i],r=e[i];Qe(n)&&n[be]===void 0&&Qe(r)?this.doMutableMerge(r,n):e[i]=n}}cloneMerge(e,t){let i={...e,...t};for(let n in i){let r=t[n],s=e[n];Qe(r)&&r[be]===void 0&&Qe(s)&&(i[n]=this.cloneMerge(s,r))}return i}componentToString(e){return this.recursiveCIDToString(this.rendered[ae],e)}pruneCIDs(e){e.forEach(t=>delete this.rendered[ae][t])}get(){return this.rendered}isNewFingerprint(e={}){return!!e[be]}templateStatic(e,t){return typeof e=="number"?t[e]:e}toOutputBuffer(e,t,i){if(e[Xi])return this.comprehensionToBuffer(e,t,i);let{[be]:n}=e;n=this.templateStatic(n,t),i.buffer+=n[0];for(let r=1;r<n.length;r++)this.dynamicToBuffer(e[r-1],t,i),i.buffer+=n[r]}comprehensionToBuffer(e,t,i){let{[Xi]:n,[be]:r}=e;r=this.templateStatic(r,t);let s=t||e[Ir];for(let o=0;o<n.length;o++){let a=n[o];i.buffer+=r[0];for(let l=1;l<r.length;l++)this.dynamicToBuffer(a[l-1],s,i),i.buffer+=r[l]}}dynamicToBuffer(e,t,i){typeof e=="number"?i.buffer+=this.recursiveCIDToString(i.components,e,i.onlyCids):Qe(e)?this.toOutputBuffer(e,t,i):i.buffer+=e}recursiveCIDToString(e,t,i){let n=e[t]||Q(`no component for CID ${t}`,e),r=document.createElement("template");r.innerHTML=this.recursiveToString(n,e,i);let s=r.content,o=i&&!i.has(t),[a,l]=Array.from(s.childNodes).reduce(([h,c],d,g)=>d.nodeType===Node.ELEMENT_NODE?d.getAttribute(le)?[h,!0]:(d.setAttribute(le,t),d.id||(d.id=`${this.parentViewId()}-${t}-${g}`),o&&(d.setAttribute(li,""),d.innerHTML=""),[!0,c]):d.nodeValue.trim()!==""?(Q(`only HTML element tags are allowed at the root of components.
got: "${d.nodeValue.trim()}"
within:
`,r.innerHTML.trim()),d.replaceWith(this.createSpan(d.nodeValue,t)),[!0,c]):(d.remove(),[h,c]),[!1,!1]);return!a&&!l?(Q(`expected at least one HTML element tag inside a component, but the component is empty:
`,r.innerHTML.trim()),this.createSpan("",t).outerHTML):(!a&&l&&Q("expected at least one HTML element tag directly inside a component, but only subcomponents were found. A component must render at least one HTML tag directly inside itself.",r.innerHTML.trim()),r.innerHTML)}createSpan(e,t){let i=document.createElement("span");return i.innerText=e,i.setAttribute(le,t),i}},os=1,et=class{static makeID(){return os++}static elementID(e){return e.phxHookId}constructor(e,t,i){this.__view=e,this.liveSocket=e.liveSocket,this.__callbacks=i,this.__listeners=new Set,this.__isDisconnected=!1,this.el=t,this.el.phxHookId=this.constructor.makeID();for(let n in this.__callbacks)this[n]=this.__callbacks[n]}__mounted(){this.mounted&&this.mounted()}__updated(){this.updated&&this.updated()}__beforeUpdate(){this.beforeUpdate&&this.beforeUpdate()}__destroyed(){this.destroyed&&this.destroyed()}__reconnected(){this.__isDisconnected&&(this.__isDisconnected=!1,this.reconnected&&this.reconnected())}__disconnected(){this.__isDisconnected=!0,this.disconnected&&this.disconnected()}pushEvent(e,t={},i=function(){}){return this.__view.pushHookEvent(null,e,t,i)}pushEventTo(e,t,i={},n=function(){}){return this.__view.withinTargets(e,(r,s)=>r.pushHookEvent(s,t,i,n))}handleEvent(e,t){let i=(n,r)=>r?e:t(n.detail);return window.addEventListener(`phx:${e}`,i),this.__listeners.add(i),i}removeHandleEvent(e){let t=e(null,!0);window.removeEventListener(`phx:${t}`,e),this.__listeners.delete(e)}upload(e,t){return this.__view.dispatchUploads(e,t)}uploadTo(e,t,i){return this.__view.withinTargets(e,n=>n.dispatchUploads(t,i))}__cleanup__(){this.__listeners.forEach(e=>this.removeHandleEvent(e))}},Ct=null,as={exec(e,t,i,n,r){let[s,o]=r||[null,{}];(t.charAt(0)==="["?JSON.parse(t):[[s,o]]).forEach(([l,h])=>{l===s&&o.data&&(h.data=Object.assign(h.data||{},o.data)),this.filterToEls(n,h).forEach(c=>{this[`exec_${l}`](e,t,i,n,c,h)})})},isVisible(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length>0)},exec_dispatch(e,t,i,n,r,{to:s,event:o,detail:a,bubbles:l}){a=a||{},a.dispatcher=n,m.dispatchEvent(r,o,{detail:a,bubbles:l})},exec_push(e,t,i,n,r,s){if(!i.isConnected())return;let{event:o,data:a,target:l,page_loading:h,loading:c,value:d,dispatcher:g}=s,u={loading:c,value:d,target:l,page_loading:!!h},y=e==="change"&&g?g:n,v=l||y.getAttribute(i.binding("target"))||y;i.withinTargets(v,(_,S)=>{if(e==="change"){let{newCid:N,_target:f,callback:w}=s;f=f||(m.isFormInput(n)?n.name:void 0),f&&(u._target=f),_.pushInput(n,S,N,o||t,u,w)}else e==="submit"?_.submitForm(n,S,o||t,u):_.pushEvent(e,n,S,o||t,a,u)})},exec_navigate(e,t,i,n,r,{href:s,replace:o}){i.liveSocket.historyRedirect(s,o?"replace":"push")},exec_patch(e,t,i,n,r,{href:s,replace:o}){i.liveSocket.pushHistoryPatch(s,o?"replace":"push",n)},exec_focus(e,t,i,n,r){window.requestAnimationFrame(()=>Be.attemptFocus(r))},exec_focus_first(e,t,i,n,r){window.requestAnimationFrame(()=>Be.focusFirstInteractive(r)||Be.focusFirst(r))},exec_push_focus(e,t,i,n,r){window.requestAnimationFrame(()=>Ct=r||n)},exec_pop_focus(e,t,i,n,r){window.requestAnimationFrame(()=>{Ct&&Ct.focus(),Ct=null})},exec_add_class(e,t,i,n,r,{names:s,transition:o,time:a}){this.addOrRemoveClasses(r,s,[],o,a,i)},exec_remove_class(e,t,i,n,r,{names:s,transition:o,time:a}){this.addOrRemoveClasses(r,[],s,o,a,i)},exec_transition(e,t,i,n,r,{time:s,transition:o}){let[a,l,h]=o,c=()=>this.addOrRemoveClasses(r,a.concat(l),[]),d=()=>this.addOrRemoveClasses(r,h,a.concat(l));i.transition(s,c,d)},exec_toggle(e,t,i,n,r,{display:s,ins:o,outs:a,time:l}){this.toggle(e,i,r,s,o,a,l)},exec_show(e,t,i,n,r,{display:s,transition:o,time:a}){this.show(e,i,r,s,o,a)},exec_hide(e,t,i,n,r,{display:s,transition:o,time:a}){this.hide(e,i,r,s,o,a)},exec_set_attr(e,t,i,n,r,{attr:[s,o]}){this.setOrRemoveAttrs(r,[[s,o]],[])},exec_remove_attr(e,t,i,n,r,{attr:s}){this.setOrRemoveAttrs(r,[],[s])},show(e,t,i,n,r,s){this.isVisible(i)||this.toggle(e,t,i,n,r,null,s)},hide(e,t,i,n,r,s){this.isVisible(i)&&this.toggle(e,t,i,n,null,r,s)},toggle(e,t,i,n,r,s,o){let[a,l,h]=r||[[],[],[]],[c,d,g]=s||[[],[],[]];if(a.length>0||c.length>0)if(this.isVisible(i)){let u=()=>{this.addOrRemoveClasses(i,d,a.concat(l).concat(h)),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(i,c,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(i,g,d))})};i.dispatchEvent(new Event("phx:hide-start")),t.transition(o,u,()=>{this.addOrRemoveClasses(i,[],c.concat(g)),m.putSticky(i,"toggle",y=>y.style.display="none"),i.dispatchEvent(new Event("phx:hide-end"))})}else{if(e==="remove")return;let u=()=>{this.addOrRemoveClasses(i,l,c.concat(d).concat(g)),m.putSticky(i,"toggle",y=>y.style.display=n||"block"),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(i,a,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(i,h,l))})};i.dispatchEvent(new Event("phx:show-start")),t.transition(o,u,()=>{this.addOrRemoveClasses(i,[],a.concat(h)),i.dispatchEvent(new Event("phx:show-end"))})}else this.isVisible(i)?window.requestAnimationFrame(()=>{i.dispatchEvent(new Event("phx:hide-start")),m.putSticky(i,"toggle",u=>u.style.display="none"),i.dispatchEvent(new Event("phx:hide-end"))}):window.requestAnimationFrame(()=>{i.dispatchEvent(new Event("phx:show-start")),m.putSticky(i,"toggle",u=>u.style.display=n||"block"),i.dispatchEvent(new Event("phx:show-end"))})},addOrRemoveClasses(e,t,i,n,r,s){let[o,a,l]=n||[[],[],[]];if(o.length>0){let h=()=>this.addOrRemoveClasses(e,a.concat(o),[]),c=()=>this.addOrRemoveClasses(e,t.concat(l),i.concat(o).concat(a));return s.transition(r,h,c)}window.requestAnimationFrame(()=>{let[h,c]=m.getSticky(e,"classes",[[],[]]),d=t.filter(v=>h.indexOf(v)<0&&!e.classList.contains(v)),g=i.filter(v=>c.indexOf(v)<0&&e.classList.contains(v)),u=h.filter(v=>i.indexOf(v)<0).concat(d),y=c.filter(v=>t.indexOf(v)<0).concat(g);m.putSticky(e,"classes",v=>(v.classList.remove(...y),v.classList.add(...u),[u,y]))})},setOrRemoveAttrs(e,t,i){let[n,r]=m.getSticky(e,"attrs",[[],[]]),s=t.map(([l,h])=>l).concat(i),o=n.filter(([l,h])=>!s.includes(l)).concat(t),a=r.filter(l=>!s.includes(l)).concat(i);m.putSticky(e,"attrs",l=>(a.forEach(h=>l.removeAttribute(h)),o.forEach(([h,c])=>l.setAttribute(h,c)),[o,a]))},hasAllClasses(e,t){return t.every(i=>e.classList.contains(i))},isToggledOut(e,t){return!this.isVisible(e)||this.hasAllClasses(e,t)},filterToEls(e,{to:t}){return t?m.all(document,t):[e]}},ye=as,Tt=(e,t,i=[])=>{let n=new FormData(e),r=[];n.forEach((o,a,l)=>{o instanceof File&&r.push(a)}),r.forEach(o=>n.delete(o));let s=new URLSearchParams;for(let[o,a]of n.entries())(i.length===0||i.indexOf(o)>=0)&&s.append(o,a);for(let o in t)s.append(o,t[o]);return s.toString()},In=class{constructor(e,t,i,n,r){this.isDead=!1,this.liveSocket=t,this.flash=n,this.parent=i,this.root=i?i.root:this,this.el=e,this.id=this.el.id,this.ref=0,this.childJoins=0,this.loaderTimer=null,this.pendingDiffs=[],this.pruningCIDs=[],this.redirect=!1,this.href=null,this.joinCount=this.parent?this.parent.joinCount-1:0,this.joinPending=!0,this.destroyed=!1,this.joinCallback=function(s){s&&s()},this.stopCallback=function(){},this.pendingJoinOps=this.parent?null:[],this.viewHooks={},this.uploaders={},this.formSubmits=[],this.children=this.parent?null:{},this.root.children[this.id]={},this.channel=this.liveSocket.channel(`lv:${this.id}`,()=>({redirect:this.redirect?this.href:void 0,url:this.redirect?void 0:this.href||void 0,params:this.connectParams(r),session:this.getSession(),static:this.getStatic(),flash:this.flash}))}setHref(e){this.href=e}setRedirect(e){this.redirect=!0,this.href=e}isMain(){return this.el.hasAttribute(yi)}connectParams(e){let t=this.liveSocket.params(this.el),i=m.all(document,`[${this.binding(Er)}]`).map(n=>n.src||n.href).filter(n=>typeof n=="string");return i.length>0&&(t._track_static=i),t._mounts=this.joinCount,t._live_referer=e,t}isConnected(){return this.channel.canPush()}getSession(){return this.el.getAttribute(Oe)}getStatic(){let e=this.el.getAttribute(rt);return e===""?null:e}destroy(e=function(){}){this.destroyAllChildren(),this.destroyed=!0,delete this.root.children[this.id],this.parent&&delete this.root.children[this.parent.id][this.id],clearTimeout(this.loaderTimer);let t=()=>{e();for(let i in this.viewHooks)this.destroyHook(this.viewHooks[i])};m.markPhxChildDestroyed(this.el),this.log("destroyed",()=>["the child has been removed from the parent"]),this.channel.leave().receive("ok",t).receive("error",t).receive("timeout",t)}setContainerClasses(...e){this.el.classList.remove(Bi,Gt,Vi),this.el.classList.add(...e)}showLoader(e){if(clearTimeout(this.loaderTimer),e)this.loaderTimer=setTimeout(()=>this.showLoader(),e);else{for(let t in this.viewHooks)this.viewHooks[t].__disconnected();this.setContainerClasses(Gt)}}execAll(e){m.all(this.el,`[${e}]`,t=>this.liveSocket.execJS(t,t.getAttribute(e)))}hideLoader(){clearTimeout(this.loaderTimer),this.setContainerClasses(Bi),this.execAll(this.binding("connected"))}triggerReconnected(){for(let e in this.viewHooks)this.viewHooks[e].__reconnected()}log(e,t){this.liveSocket.log(this,e,t)}transition(e,t,i=function(){}){this.liveSocket.transition(e,t,i)}withinTargets(e,t){if(e instanceof HTMLElement||e instanceof SVGElement)return this.liveSocket.owner(e,i=>t(i,e));if(De(e))m.findComponentNodeList(this.el,e).length===0?Q(`no component found matching phx-target of ${e}`):t(this,parseInt(e));else{let i=Array.from(document.querySelectorAll(e));i.length===0&&Q(`nothing found matching the phx-target selector "${e}"`),i.forEach(n=>this.liveSocket.owner(n,r=>t(r,n)))}}applyDiff(e,t,i){this.log(e,()=>["",Dt(t)]);let{diff:n,reply:r,events:s,title:o}=sn.extract(t);i({diff:n,reply:r,events:s}),o&&window.requestAnimationFrame(()=>m.putTitle(o))}onJoin(e){let{rendered:t,container:i}=e;if(i){let[n,r]=i;this.el=m.replaceRootContainer(this.el,n,r)}this.childJoins=0,this.joinPending=!0,this.flash=null,_e.dropLocal(this.liveSocket.localStorage,window.location.pathname,Ln),this.applyDiff("mount",t,({diff:n,events:r})=>{this.rendered=new sn(this.id,n);let s=this.renderContainer(null,"join");this.dropPendingRefs();let o=this.formsForRecovery(s);this.joinCount++,o.length>0?o.forEach(([a,l,h],c)=>{this.pushFormRecovery(a,h,d=>{c===o.length-1&&this.onJoinComplete(d,s,r)})}):this.onJoinComplete(e,s,r)})}dropPendingRefs(){m.all(document,`[${Ne}="${this.id}"][${Ee}]`,e=>{e.removeAttribute(Ee),e.removeAttribute(Ne)})}onJoinComplete({live_patch:e},t,i){if(this.joinCount>1||this.parent&&!this.parent.isJoinPending())return this.applyJoinPatch(e,t,i);m.findPhxChildrenInFragment(t,this.id).filter(r=>{let s=r.id&&this.el.querySelector(`[id="${r.id}"]`),o=s&&s.getAttribute(rt);return o&&r.setAttribute(rt,o),this.joinChild(r)}).length===0?this.parent?(this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(e,t,i)]),this.parent.ackJoin(this)):(this.onAllChildJoinsComplete(),this.applyJoinPatch(e,t,i)):this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(e,t,i)])}attachTrueDocEl(){this.el=m.byId(this.id),this.el.setAttribute(ht,this.root.id)}execNewMounted(){m.all(this.el,`[${this.binding(Ye)}], [data-phx-${Ye}]`,e=>{this.maybeAddNewHook(e)}),m.all(this.el,`[${this.binding(Ki)}]`,e=>this.maybeMounted(e))}applyJoinPatch(e,t,i){this.attachTrueDocEl();let n=new At(this,this.el,this.id,t,null);if(n.markPrunableContentForRemoval(),this.performPatch(n,!1),this.joinNewChildren(),this.execNewMounted(),this.joinPending=!1,this.liveSocket.dispatchEvents(i),this.applyPendingUpdates(),e){let{kind:r,to:s}=e;this.liveSocket.historyPatch(s,r)}this.hideLoader(),this.joinCount>1&&this.triggerReconnected(),this.stopCallback()}triggerBeforeUpdateHook(e,t){this.liveSocket.triggerDOM("onBeforeElUpdated",[e,t]);let i=this.getHook(e),n=i&&m.isIgnored(e,this.binding(ui));if(i&&!e.isEqualNode(t)&&!(n&&Fr(e.dataset,t.dataset)))return i.__beforeUpdate(),i}maybeMounted(e){let t=e.getAttribute(this.binding(Ki)),i=t&&m.private(e,"mounted");t&&!i&&(this.liveSocket.execJS(e,t),m.putPrivate(e,"mounted",!0))}maybeAddNewHook(e,t){let i=this.addHook(e);i&&i.__mounted()}performPatch(e,t){let i=[],n=!1,r=new Set;return e.after("added",s=>{this.liveSocket.triggerDOM("onNodeAdded",[s]),this.maybeAddNewHook(s),s.getAttribute&&this.maybeMounted(s)}),e.after("phxChildAdded",s=>{m.isPhxSticky(s)?this.liveSocket.joinRootViews():n=!0}),e.before("updated",(s,o)=>{this.triggerBeforeUpdateHook(s,o)&&r.add(s.id)}),e.after("updated",s=>{r.has(s.id)&&this.getHook(s).__updated()}),e.after("discarded",s=>{s.nodeType===Node.ELEMENT_NODE&&i.push(s)}),e.after("transitionsDiscarded",s=>this.afterElementsRemoved(s,t)),e.perform(),this.afterElementsRemoved(i,t),n}afterElementsRemoved(e,t){let i=[];e.forEach(n=>{let r=m.all(n,`[${le}]`),s=m.all(n,`[${this.binding(Ye)}]`);r.concat(n).forEach(o=>{let a=this.componentID(o);De(a)&&i.indexOf(a)===-1&&i.push(a)}),s.concat(n).forEach(o=>{let a=this.getHook(o);a&&this.destroyHook(a)})}),t&&this.maybePushComponentsDestroyed(i)}joinNewChildren(){m.findPhxChildren(this.el,this.id).forEach(e=>this.joinChild(e))}getChildById(e){return this.root.children[this.id][e]}getDescendentByEl(e){return e.id===this.id?this:this.children[e.getAttribute(je)][e.id]}destroyDescendent(e){for(let t in this.root.children)for(let i in this.root.children[t])if(i===e)return this.root.children[t][i].destroy()}joinChild(e){if(!this.getChildById(e.id)){let i=new In(e,this.liveSocket,this);return this.root.children[this.id][i.id]=i,i.join(),this.childJoins++,!0}}isJoinPending(){return this.joinPending}ackJoin(e){this.childJoins--,this.childJoins===0&&(this.parent?this.parent.ackJoin(this):this.onAllChildJoinsComplete())}onAllChildJoinsComplete(){this.joinCallback(()=>{this.pendingJoinOps.forEach(([e,t])=>{e.isDestroyed()||t()}),this.pendingJoinOps=[]})}update(e,t){if(this.isJoinPending()||this.liveSocket.hasPendingLink()&&this.root.isMain())return this.pendingDiffs.push({diff:e,events:t});this.rendered.mergeDiff(e);let i=!1;this.rendered.isComponentOnlyDiff(e)?this.liveSocket.time("component patch complete",()=>{m.findParentCIDs(this.el,this.rendered.componentCIDs(e)).forEach(r=>{this.componentPatch(this.rendered.getComponent(e,r),r)&&(i=!0)})}):Qi(e)||this.liveSocket.time("full patch complete",()=>{let n=this.renderContainer(e,"update"),r=new At(this,this.el,this.id,n,null);i=this.performPatch(r,!0)}),this.liveSocket.dispatchEvents(t),i&&this.joinNewChildren()}renderContainer(e,t){return this.liveSocket.time(`toString diff (${t})`,()=>{let i=this.el.tagName,n=e?this.rendered.componentCIDs(e).concat(this.pruningCIDs):null,r=this.rendered.toString(n);return`<${i}>${r}</${i}>`})}componentPatch(e,t){if(Qi(e))return!1;let i=this.rendered.componentToString(t),n=new At(this,this.el,this.id,i,t);return this.performPatch(n,!0)}getHook(e){return this.viewHooks[et.elementID(e)]}addHook(e){if(et.elementID(e)||!e.getAttribute)return;let t=e.getAttribute(`data-phx-${Ye}`)||e.getAttribute(this.binding(Ye));if(t&&!this.ownsElement(e))return;let i=this.liveSocket.getHookCallbacks(t);if(i){e.id||Q(`no DOM ID for hook "${t}". Hooks require a unique ID on each element.`,e);let n=new et(this,e,i);return this.viewHooks[et.elementID(n.el)]=n,n}else t!==null&&Q(`unknown hook found for "${t}"`,e)}destroyHook(e){e.__destroyed(),e.__cleanup__(),delete this.viewHooks[et.elementID(e.el)]}applyPendingUpdates(){this.pendingDiffs.forEach(({diff:e,events:t})=>this.update(e,t)),this.pendingDiffs=[],this.eachChild(e=>e.applyPendingUpdates())}eachChild(e){let t=this.root.children[this.id]||{};for(let i in t)e(this.getChildById(i))}onChannel(e,t){this.liveSocket.onChannel(this.channel,e,i=>{this.isJoinPending()?this.root.pendingJoinOps.push([this,()=>t(i)]):this.liveSocket.requestDOMUpdate(()=>t(i))})}bindChannel(){this.liveSocket.onChannel(this.channel,"diff",e=>{this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",e,({diff:t,events:i})=>this.update(t,i))})}),this.onChannel("redirect",({to:e,flash:t})=>this.onRedirect({to:e,flash:t})),this.onChannel("live_patch",e=>this.onLivePatch(e)),this.onChannel("live_redirect",e=>this.onLiveRedirect(e)),this.channel.onError(e=>this.onError(e)),this.channel.onClose(e=>this.onClose(e))}destroyAllChildren(){this.eachChild(e=>e.destroy())}onLiveRedirect(e){let{to:t,kind:i,flash:n}=e,r=this.expandURL(t);this.liveSocket.historyRedirect(r,i,n)}onLivePatch(e){let{to:t,kind:i}=e;this.href=this.expandURL(t),this.liveSocket.historyPatch(t,i)}expandURL(e){return e.startsWith("/")?`${window.location.protocol}//${window.location.host}${e}`:e}onRedirect({to:e,flash:t}){this.liveSocket.redirect(e,t)}isDestroyed(){return this.destroyed}joinDead(){this.isDead=!0}join(e){this.showLoader(this.liveSocket.loaderTimeout),this.bindChannel(),this.isMain()&&(this.stopCallback=this.liveSocket.withPageLoading({to:this.href,kind:"initial"})),this.joinCallback=t=>{t=t||function(){},e?e(this.joinCount,t):t()},this.liveSocket.wrapPush(this,{timeout:!1},()=>this.channel.join().receive("ok",t=>{this.isDestroyed()||this.liveSocket.requestDOMUpdate(()=>this.onJoin(t))}).receive("error",t=>!this.isDestroyed()&&this.onJoinError(t)).receive("timeout",()=>!this.isDestroyed()&&this.onJoinError({reason:"timeout"})))}onJoinError(e){if(e.reason==="unauthorized"||e.reason==="stale")return this.log("error",()=>["unauthorized live_redirect. Falling back to page request",e]),this.onRedirect({to:this.href});if((e.redirect||e.live_redirect)&&(this.joinPending=!1,this.channel.leave()),e.redirect)return this.onRedirect(e.redirect);if(e.live_redirect)return this.onLiveRedirect(e.live_redirect);this.log("error",()=>["unable to join",e]),this.liveSocket.isConnected()&&this.liveSocket.reloadWithJitter(this)}onClose(e){if(!this.isDestroyed()){if(this.liveSocket.hasPendingLink()&&e!=="leave")return this.liveSocket.reloadWithJitter(this);this.destroyAllChildren(),this.liveSocket.dropActiveElement(this),document.activeElement&&document.activeElement.blur(),this.liveSocket.isUnloaded()&&this.showLoader(xr)}}onError(e){this.onClose(e),this.liveSocket.isConnected()&&this.log("error",()=>["view crashed",e]),this.liveSocket.isUnloaded()||this.displayError()}displayError(){this.isMain()&&m.dispatchEvent(window,"phx:page-loading-start",{detail:{to:this.href,kind:"error"}}),this.showLoader(),this.setContainerClasses(Gt,Vi),this.execAll(this.binding("disconnected"))}pushWithReply(e,t,i,n=function(){}){if(!this.isConnected())return;let[r,[s],o]=e?e():[null,[],{}],a=function(){};return(o.page_loading||s&&s.getAttribute(this.binding(ji))!==null)&&(a=this.liveSocket.withPageLoading({kind:"element",target:s})),typeof i.cid!="number"&&delete i.cid,this.liveSocket.wrapPush(this,{timeout:!0},()=>this.channel.push(t,i,Rr).receive("ok",l=>{let h=c=>{l.redirect&&this.onRedirect(l.redirect),l.live_patch&&this.onLivePatch(l.live_patch),l.live_redirect&&this.onLiveRedirect(l.live_redirect),r!==null&&this.undoRefs(r),a(),n(l,c)};l.diff?this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",l.diff,({diff:c,reply:d,events:g})=>{this.update(c,g),h(d)})}):h(null)}))}undoRefs(e){this.isConnected()&&m.all(document,`[${Ne}="${this.id}"][${Ee}="${e}"]`,t=>{let i=t.getAttribute(vt);t.removeAttribute(Ee),t.removeAttribute(Ne),t.getAttribute(Qt)!==null&&(t.readOnly=!1,t.removeAttribute(Qt)),i!==null&&(t.disabled=i==="true",t.removeAttribute(vt)),On.forEach(s=>m.removeClass(t,s));let n=t.getAttribute(bt);n!==null&&(t.innerText=n,t.removeAttribute(bt));let r=m.private(t,Ee);if(r){let s=this.triggerBeforeUpdateHook(t,r);At.patchEl(t,r,this.liveSocket.getActiveElement()),s&&s.__updated(),m.deletePrivate(t,Ee)}})}putRef(e,t,i={}){let n=this.ref++,r=this.binding(di);return i.loading&&(e=e.concat(m.all(document,i.loading))),e.forEach(s=>{s.classList.add(`phx-${t}-loading`),s.setAttribute(Ee,n),s.setAttribute(Ne,this.el.id);let o=s.getAttribute(r);o!==null&&(s.getAttribute(bt)||s.setAttribute(bt,s.innerText),o!==""&&(s.innerText=o),s.setAttribute("disabled",""))}),[n,e,i]}componentID(e){let t=e.getAttribute&&e.getAttribute(le);return t?parseInt(t):null}targetComponentID(e,t,i={}){if(De(t))return t;let n=e.getAttribute(this.binding("target"));return De(n)?parseInt(n):t&&(n!==null||i.target)?this.closestComponentID(t):null}closestComponentID(e){return De(e)?e:e?Le(e.closest(`[${le}]`),t=>this.ownsElement(t)&&this.componentID(t)):null}pushHookEvent(e,t,i,n){if(!this.isConnected())return this.log("hook",()=>["unable to push hook event. LiveView not connected",t,i]),!1;let[r,s,o]=this.putRef([],"hook");return this.pushWithReply(()=>[r,s,o],"event",{type:"hook",event:t,value:i,cid:this.closestComponentID(e)},(a,l)=>n(l,r)),r}extractMeta(e,t,i){let n=this.binding("value-");for(let r=0;r<e.attributes.length;r++){t||(t={});let s=e.attributes[r].name;s.startsWith(n)&&(t[s.replace(n,"")]=e.getAttribute(s))}if(e.value!==void 0&&(t||(t={}),t.value=e.value,e.tagName==="INPUT"&&Rn.indexOf(e.type)>=0&&!e.checked&&delete t.value),i){t||(t={});for(let r in i)t[r]=i[r]}return t}pushEvent(e,t,i,n,r,s={}){this.pushWithReply(()=>this.putRef([t],e,s),"event",{type:e,event:n,value:this.extractMeta(t,r,s.value),cid:this.targetComponentID(t,i,s)})}pushFileProgress(e,t,i,n=function(){}){this.liveSocket.withinOwners(e.form,(r,s)=>{r.pushWithReply(null,"progress",{event:e.getAttribute(r.binding(Lr)),ref:e.getAttribute(Me),entry_ref:t,progress:i,cid:r.targetComponentID(e.form,s)},n)})}pushInput(e,t,i,n,r,s){let o,a=De(i)?i:this.targetComponentID(e.form,t),l=()=>this.putRef([e,e.form],"change",r),h;e.getAttribute(this.binding("change"))?h=Tt(e.form,{_target:r._target},[e.name]):h=Tt(e.form,{_target:r._target}),m.isUploadInput(e)&&e.files&&e.files.length>0&&G.trackFiles(e,Array.from(e.files)),o=G.serializeUploads(e);let c={type:"form",event:n,value:h,uploads:o,cid:a};this.pushWithReply(l,"event",c,d=>{if(m.showError(e,this.liveSocket.binding(ci)),m.isUploadInput(e)&&e.getAttribute("data-phx-auto-upload")!==null){if(G.filesAwaitingPreflight(e).length>0){let[g,u]=l();this.uploadFiles(e.form,t,g,a,y=>{s&&s(d),this.triggerAwaitingSubmit(e.form)})}}else s&&s(d)})}triggerAwaitingSubmit(e){let t=this.getScheduledSubmit(e);if(t){let[i,n,r,s]=t;this.cancelSubmit(e),s()}}getScheduledSubmit(e){return this.formSubmits.find(([t,i,n,r])=>t.isSameNode(e))}scheduleSubmit(e,t,i,n){if(this.getScheduledSubmit(e))return!0;this.formSubmits.push([e,t,i,n])}cancelSubmit(e){this.formSubmits=this.formSubmits.filter(([t,i,n])=>t.isSameNode(e)?(this.undoRefs(i),!1):!0)}disableForm(e,t={}){let i=c=>!(st(c,`${this.binding(ui)}=ignore`,c.form)||st(c,"data-phx-update=ignore",c.form)),n=c=>c.hasAttribute(this.binding(di)),r=c=>c.tagName=="BUTTON",s=c=>["INPUT","TEXTAREA","SELECT"].includes(c.tagName),o=Array.from(e.elements),a=o.filter(n),l=o.filter(r).filter(i),h=o.filter(s).filter(i);return l.forEach(c=>{c.setAttribute(vt,c.disabled),c.disabled=!0}),h.forEach(c=>{c.setAttribute(Qt,c.readOnly),c.readOnly=!0,c.files&&(c.setAttribute(vt,c.disabled),c.disabled=!0)}),e.setAttribute(this.binding(ji),""),this.putRef([e].concat(a).concat(l).concat(h),"submit",t)}pushFormSubmit(e,t,i,n,r){let s=()=>this.disableForm(e,n),o=this.targetComponentID(e,t);if(G.hasUploadsInProgress(e)){let[a,l]=s(),h=()=>this.pushFormSubmit(e,t,i,n,r);return this.scheduleSubmit(e,a,n,h)}else if(G.inputsAwaitingPreflight(e).length>0){let[a,l]=s(),h=()=>[a,l,n];this.uploadFiles(e,t,a,o,c=>{let d=Tt(e,{});this.pushWithReply(h,"event",{type:"form",event:i,value:d,cid:o},r)})}else{let a=Tt(e,{});this.pushWithReply(s,"event",{type:"form",event:i,value:a,cid:o},r)}}uploadFiles(e,t,i,n,r){let s=this.joinCount,o=G.activeFileInputs(e),a=o.length;o.forEach(l=>{let h=new G(l,this,()=>{a--,a===0&&r()});this.uploaders[l]=h;let c=h.entries().map(g=>g.toPreflightPayload()),d={ref:l.getAttribute(Me),entries:c,cid:this.targetComponentID(l.form,t)};this.log("upload",()=>["sending preflight request",d]),this.pushWithReply(null,"allow_upload",d,g=>{if(this.log("upload",()=>["got preflight response",g]),g.error){this.undoRefs(i);let[u,y]=g.error;this.log("upload",()=>[`error for entry ${u}`,y])}else{let u=y=>{this.channel.onError(()=>{this.joinCount===s&&y()})};h.initAdapterUpload(g,u,this.liveSocket)}})})}dispatchUploads(e,t){let i=m.findUploadInputs(this.el).filter(n=>n.name===e);i.length===0?Q(`no live file inputs found matching the name "${e}"`):i.length>1?Q(`duplicate live file inputs found matching the name "${e}"`):m.dispatchEvent(i[0],xn,{detail:{files:t}})}pushFormRecovery(e,t,i){this.liveSocket.withinOwners(e,(n,r)=>{let s=e.elements[0],o=e.getAttribute(this.binding(qi))||e.getAttribute(this.binding("change"));ye.exec("change",o,n,s,["push",{_target:s.name,newCid:t,callback:i}])})}pushLinkPatch(e,t,i){let n=this.liveSocket.setPendingLink(e),r=t?()=>this.putRef([t],"click"):null,s=()=>this.liveSocket.redirect(window.location.href),o=this.pushWithReply(r,"live_patch",{url:e},a=>{this.liveSocket.requestDOMUpdate(()=>{a.link_redirect?this.liveSocket.replaceMain(e,null,i,n):(this.liveSocket.commitPendingLink(n)&&(this.href=e),this.applyPendingUpdates(),i&&i(n))})});o?o.receive("timeout",s):s()}formsForRecovery(e){if(this.joinCount===0)return[];let t=this.binding("change"),i=document.createElement("template");return i.innerHTML=e,m.all(this.el,`form[${t}]`).filter(n=>n.id&&this.ownsElement(n)).filter(n=>n.elements.length>0).filter(n=>n.getAttribute(this.binding(qi))!=="ignore").map(n=>{let r=i.content.querySelector(`form[id="${n.id}"][${t}="${n.getAttribute(t)}"]`);return r?[n,r,this.targetComponentID(r)]:[n,null,null]}).filter(([n,r,s])=>r)}maybePushComponentsDestroyed(e){let t=e.filter(i=>m.findComponentNodeList(this.el,i).length===0);t.length>0&&(this.pruningCIDs.push(...t),this.pushWithReply(null,"cids_will_destroy",{cids:t},()=>{this.pruningCIDs=this.pruningCIDs.filter(n=>t.indexOf(n)!==-1);let i=t.filter(n=>m.findComponentNodeList(this.el,n).length===0);i.length>0&&this.pushWithReply(null,"cids_destroyed",{cids:i},n=>{this.rendered.pruneCIDs(n.cids)})}))}ownsElement(e){let t=e.closest(Ue);return e.getAttribute(je)===this.id||t&&t.id===this.id||!t&&this.isDead}submitForm(e,t,i,n={}){m.putPrivate(e,hi,!0);let r=this.liveSocket.binding(ci),s=Array.from(e.elements);s.forEach(o=>m.putPrivate(o,hi,!0)),this.liveSocket.blurActiveElement(this),this.pushFormSubmit(e,t,i,n,()=>{s.forEach(o=>m.showError(o,r)),this.liveSocket.restorePreviouslyActiveFocus()})}binding(e){return this.liveSocket.binding(e)}},ls=class{constructor(e,t,i={}){if(this.unloaded=!1,!t||t.constructor.name==="Object")throw new Error(`
a phoenix Socket must be provided as the second argument to the LiveSocket constructor. For example:
import {Socket} from "phoenix"
import {LiveSocket} from "phoenix_live_view"
let liveSocket = new LiveSocket("/live", Socket, {...})
`);this.socket=new t(e,i),this.bindingPrefix=i.bindingPrefix||Pr,this.opts=i,this.params=ti(i.params||{}),this.viewLogger=i.viewLogger,this.metadataCallbacks=i.metadata||{},this.defaults=Object.assign(Dt(Nr),i.defaults||{}),this.activeElement=null,this.prevActive=null,this.silenced=!1,this.main=null,this.outgoingMainEl=null,this.clickStartedAtTarget=null,this.linkRef=1,this.roots={},this.href=window.location.href,this.pendingLink=null,this.currentLocation=Dt(window.location),this.hooks=i.hooks||{},this.uploaders=i.uploaders||{},this.loaderTimeout=i.loaderTimeout||Or,this.reloadWithJitterTimer=null,this.maxReloads=i.maxReloads||vr,this.reloadJitterMin=i.reloadJitterMin||br,this.reloadJitterMax=i.reloadJitterMax||_r,this.failsafeJitter=i.failsafeJitter||yr,this.localStorage=i.localStorage||window.localStorage,this.sessionStorage=i.sessionStorage||window.sessionStorage,this.boundTopLevelEvents=!1,this.domCallbacks=Object.assign({onNodeAdded:ti(),onBeforeElUpdated:ti()},i.dom||{}),this.transitions=new cs,window.addEventListener("pagehide",n=>{this.unloaded=!0}),this.socket.onOpen(()=>{this.isUnloaded()&&window.location.reload()})}isProfileEnabled(){return this.sessionStorage.getItem(Zt)==="true"}isDebugEnabled(){return this.sessionStorage.getItem(_t)==="true"}isDebugDisabled(){return this.sessionStorage.getItem(_t)==="false"}enableDebug(){this.sessionStorage.setItem(_t,"true")}enableProfiling(){this.sessionStorage.setItem(Zt,"true")}disableDebug(){this.sessionStorage.setItem(_t,"false")}disableProfiling(){this.sessionStorage.removeItem(Zt)}enableLatencySim(e){this.enableDebug(),console.log("latency simulator enabled for the duration of this browser session. Call disableLatencySim() to disable"),this.sessionStorage.setItem(ei,e)}disableLatencySim(){this.sessionStorage.removeItem(ei)}getLatencySim(){let e=this.sessionStorage.getItem(ei);return e?parseInt(e):null}getSocket(){return this.socket}connect(){window.location.hostname==="localhost"&&!this.isDebugDisabled()&&this.enableDebug();let e=()=>{this.joinRootViews()?(this.bindTopLevelEvents(),this.socket.connect()):this.main?this.socket.connect():this.bindTopLevelEvents({dead:!0}),this.joinDeadView()};["complete","loaded","interactive"].indexOf(document.readyState)>=0?e():document.addEventListener("DOMContentLoaded",()=>e())}disconnect(e){clearTimeout(this.reloadWithJitterTimer),this.socket.disconnect(e)}replaceTransport(e){clearTimeout(this.reloadWithJitterTimer),this.socket.replaceTransport(e),this.connect()}execJS(e,t,i=null){this.owner(e,n=>ye.exec(i,t,n,e))}unload(){this.unloaded||(this.main&&this.isConnected()&&this.log(this.main,"socket",()=>["disconnect for page nav"]),this.unloaded=!0,this.destroyAllViews(),this.disconnect())}triggerDOM(e,t){this.domCallbacks[e](...t)}time(e,t){if(!this.isProfileEnabled()||!console.time)return t();console.time(e);let i=t();return console.timeEnd(e),i}log(e,t,i){if(this.viewLogger){let[n,r]=i();this.viewLogger(e,t,n,r)}else if(this.isDebugEnabled()){let[n,r]=i();$r(e,t,n,r)}}requestDOMUpdate(e){this.transitions.after(e)}transition(e,t,i=function(){}){this.transitions.addTransition(e,t,i)}onChannel(e,t,i){e.on(t,n=>{let r=this.getLatencySim();r?setTimeout(()=>i(n),r):i(n)})}wrapPush(e,t,i){let n=this.getLatencySim(),r=e.joinCount;if(!n)return this.isConnected()&&t.timeout?i().receive("timeout",()=>{e.joinCount===r&&!e.isDestroyed()&&this.reloadWithJitter(e,()=>{this.log(e,"timeout",()=>["received timeout while communicating with server. Falling back to hard refresh for recovery"])})}):i();let s={receives:[],receive(o,a){this.receives.push([o,a])}};return setTimeout(()=>{e.isDestroyed()||s.receives.reduce((o,[a,l])=>o.receive(a,l),i())},n),s}reloadWithJitter(e,t){clearTimeout(this.reloadWithJitterTimer),this.disconnect();let i=this.reloadJitterMin,n=this.reloadJitterMax,r=Math.floor(Math.random()*(n-i+1))+i,s=_e.updateLocal(this.localStorage,window.location.pathname,Ln,0,o=>o+1);s>this.maxReloads&&(r=this.failsafeJitter),this.reloadWithJitterTimer=setTimeout(()=>{e.isDestroyed()||e.isConnected()||(e.destroy(),t?t():this.log(e,"join",()=>[`encountered ${s} consecutive reloads`]),s>this.maxReloads&&this.log(e,"join",()=>[`exceeded ${this.maxReloads} consecutive reloads. Entering failsafe mode`]),this.hasPendingLink()?window.location=this.pendingLink:window.location.reload())},r)}getHookCallbacks(e){return e&&e.startsWith("Phoenix.")?Wr[e.split(".")[1]]:this.hooks[e]}isUnloaded(){return this.unloaded}isConnected(){return this.socket.isConnected()}getBindingPrefix(){return this.bindingPrefix}binding(e){return`${this.getBindingPrefix()}${e}`}channel(e,t){return this.socket.channel(e,t)}joinDeadView(){let e=document.body;if(e&&!this.isPhxView(e)&&!this.isPhxView(document.firstElementChild)){let t=this.newRootView(e);t.setHref(this.getHref()),t.joinDead(),this.main||(this.main=t),window.requestAnimationFrame(()=>t.execNewMounted())}}joinRootViews(){let e=!1;return m.all(document,`${Ue}:not([${je}])`,t=>{if(!this.getRootById(t.id)){let i=this.newRootView(t);i.setHref(this.getHref()),i.join(),t.hasAttribute(yi)&&(this.main=i)}e=!0}),e}redirect(e,t){this.disconnect(),_e.redirect(e,t)}replaceMain(e,t,i=null,n=this.setPendingLink(e)){let r=this.currentLocation.href;this.outgoingMainEl=this.outgoingMainEl||this.main.el;let s=m.cloneNode(this.outgoingMainEl,"");this.main.showLoader(this.loaderTimeout),this.main.destroy(),this.main=this.newRootView(s,t,r),this.main.setRedirect(e),this.transitionRemoves(),this.main.join((o,a)=>{o===1&&this.commitPendingLink(n)&&this.requestDOMUpdate(()=>{m.findPhxSticky(document).forEach(l=>s.appendChild(l)),this.outgoingMainEl.replaceWith(s),this.outgoingMainEl=null,i&&requestAnimationFrame(i),a()})})}transitionRemoves(e){let t=this.binding("remove");e=e||m.all(document,`[${t}]`),e.forEach(i=>{document.body.contains(i)&&this.execJS(i,i.getAttribute(t),"remove")})}isPhxView(e){return e.getAttribute&&e.getAttribute(Oe)!==null}newRootView(e,t,i){let n=new In(e,this,null,t,i);return this.roots[n.id]=n,n}owner(e,t){let i=Le(e.closest(Ue),n=>this.getViewByEl(n))||this.main;i&&t(i)}withinOwners(e,t){this.owner(e,i=>t(i,e))}getViewByEl(e){let t=e.getAttribute(ht);return Le(this.getRootById(t),i=>i.getDescendentByEl(e))}getRootById(e){return this.roots[e]}destroyAllViews(){for(let e in this.roots)this.roots[e].destroy(),delete this.roots[e];this.main=null}destroyViewByEl(e){let t=this.getRootById(e.getAttribute(ht));t&&t.id===e.id?(t.destroy(),delete this.roots[t.id]):t&&t.destroyDescendent(e.id)}setActiveElement(e){if(this.activeElement===e)return;this.activeElement=e;let t=()=>{e===this.activeElement&&(this.activeElement=null),e.removeEventListener("mouseup",this),e.removeEventListener("touchend",this)};e.addEventListener("mouseup",t),e.addEventListener("touchend",t)}getActiveElement(){return document.activeElement===document.body?this.activeElement||document.activeElement:document.activeElement||document.body}dropActiveElement(e){this.prevActive&&e.ownsElement(this.prevActive)&&(this.prevActive=null)}restorePreviouslyActiveFocus(){this.prevActive&&this.prevActive!==document.body&&this.prevActive.focus()}blurActiveElement(){this.prevActive=this.getActiveElement(),this.prevActive!==document.body&&this.prevActive.blur()}bindTopLevelEvents({dead:e}={}){this.boundTopLevelEvents||(this.boundTopLevelEvents=!0,this.socket.onClose(t=>{if(t&&t.code===1001)return this.unload();if(t&&t.code===1e3&&this.main)return this.reloadWithJitter(this.main)}),document.body.addEventListener("click",function(){}),window.addEventListener("pageshow",t=>{t.persisted&&(this.getSocket().disconnect(),this.withPageLoading({to:window.location.href,kind:"redirect"}),window.location.reload())},!0),e||this.bindNav(),this.bindClicks(),e||this.bindForms(),this.bind({keyup:"keyup",keydown:"keydown"},(t,i,n,r,s,o)=>{let a=r.getAttribute(this.binding(Dr)),l=t.key&&t.key.toLowerCase();if(a&&a.toLowerCase()!==l)return;let h={key:t.key,...this.eventMeta(i,t,r)};ye.exec(i,s,n,r,["push",{data:h}])}),this.bind({blur:"focusout",focus:"focusin"},(t,i,n,r,s,o)=>{if(!o){let a={key:t.key,...this.eventMeta(i,t,r)};ye.exec(i,s,n,r,["push",{data:a}])}}),this.bind({blur:"blur",focus:"focus"},(t,i,n,r,s,o,a)=>{if(a==="window"){let l=this.eventMeta(i,t,r);ye.exec(i,o,n,r,["push",{data:l}])}}),window.addEventListener("dragover",t=>t.preventDefault()),window.addEventListener("drop",t=>{t.preventDefault();let i=Le(st(t.target,this.binding($i)),s=>s.getAttribute(this.binding($i))),n=i&&document.getElementById(i),r=Array.from(t.dataTransfer.files||[]);!n||n.disabled||r.length===0||!(n.files instanceof FileList)||(G.trackFiles(n,r),n.dispatchEvent(new Event("input",{bubbles:!0})))}),this.on(xn,t=>{let i=t.target;if(!m.isUploadInput(i))return;let n=Array.from(t.detail.files||[]).filter(r=>r instanceof File||r instanceof Blob);G.trackFiles(i,n),i.dispatchEvent(new Event("input",{bubbles:!0}))}))}eventMeta(e,t,i){let n=this.metadataCallbacks[e];return n?n(t,i):{}}setPendingLink(e){return this.linkRef++,this.pendingLink=e,this.linkRef}commitPendingLink(e){return this.linkRef!==e?!1:(this.href=this.pendingLink,this.pendingLink=null,!0)}getHref(){return this.href}hasPendingLink(){return!!this.pendingLink}bind(e,t){for(let i in e){let n=e[i];this.on(n,r=>{let s=this.binding(i),o=this.binding(`window-${i}`),a=r.target.getAttribute&&r.target.getAttribute(s);a?this.debounce(r.target,r,n,()=>{this.withinOwners(r.target,l=>{t(r,i,l,r.target,a,null)})}):m.all(document,`[${o}]`,l=>{let h=l.getAttribute(o);this.debounce(l,r,n,()=>{this.withinOwners(l,c=>{t(r,i,c,l,h,"window")})})})})}}bindClicks(){window.addEventListener("click",e=>this.clickStartedAtTarget=e.target),this.bindClick("click","click",!1),this.bindClick("mousedown","capture-click",!0)}bindClick(e,t,i){let n=this.binding(t);window.addEventListener(e,r=>{let s=null;if(i)s=r.target.matches(`[${n}]`)?r.target:r.target.querySelector(`[${n}]`);else{let a=this.clickStartedAtTarget||r.target;s=st(a,n),this.dispatchClickAway(r,a),this.clickStartedAtTarget=null}let o=s&&s.getAttribute(n);if(!o){let a=r.target instanceof HTMLAnchorElement?r.target.getAttribute("href"):null;!i&&a!==null&&!m.wantsNewTab(r)&&m.isNewPageHref(a,window.location)&&this.unload();return}s.getAttribute("href")==="#"&&r.preventDefault(),this.debounce(s,r,"click",()=>{this.withinOwners(s,a=>{ye.exec("click",o,a,s,["push",{data:this.eventMeta("click",r,s)}])})})},i)}dispatchClickAway(e,t){let i=this.binding("click-away");m.all(document,`[${i}]`,n=>{n.isSameNode(t)||n.contains(t)||this.withinOwners(e.target,r=>{let s=n.getAttribute(i);ye.isVisible(n)&&ye.exec("click",s,r,n,["push",{data:this.eventMeta("click",e,e.target)}])})})}bindNav(){if(!_e.canPushState())return;history.scrollRestoration&&(history.scrollRestoration="manual");let e=null;window.addEventListener("scroll",t=>{clearTimeout(e),e=setTimeout(()=>{_e.updateCurrentState(i=>Object.assign(i,{scroll:window.scrollY}))},100)}),window.addEventListener("popstate",t=>{if(!this.registerNewLocation(window.location))return;let{type:i,id:n,root:r,scroll:s}=t.state||{},o=window.location.href;this.requestDOMUpdate(()=>{this.main.isConnected()&&i==="patch"&&n===this.main.id?this.main.pushLinkPatch(o,null,()=>{this.maybeScroll(s)}):this.replaceMain(o,null,()=>{r&&this.replaceRootHistory(),this.maybeScroll(s)})})},!1),window.addEventListener("click",t=>{let i=st(t.target,Yt),n=i&&i.getAttribute(Yt);if(!n||!this.isConnected()||!this.main||m.wantsNewTab(t))return;let r=i.href,s=i.getAttribute(wr);t.preventDefault(),t.stopImmediatePropagation(),this.pendingLink!==r&&this.requestDOMUpdate(()=>{if(n==="patch")this.pushHistoryPatch(r,s,i);else if(n==="redirect")this.historyRedirect(r,s);else throw new Error(`expected ${Yt} to be "patch" or "redirect", got: ${n}`);let o=i.getAttribute(this.binding("click"));o&&this.requestDOMUpdate(()=>this.execJS(i,o,"click"))})},!1)}maybeScroll(e){typeof e=="number"&&requestAnimationFrame(()=>{window.scrollTo(0,e)})}dispatchEvent(e,t={}){m.dispatchEvent(window,`phx:${e}`,{detail:t})}dispatchEvents(e){e.forEach(([t,i])=>this.dispatchEvent(t,i))}withPageLoading(e,t){m.dispatchEvent(window,"phx:page-loading-start",{detail:e});let i=()=>m.dispatchEvent(window,"phx:page-loading-stop",{detail:e});return t?t(i):i}pushHistoryPatch(e,t,i){if(!this.isConnected())return _e.redirect(e);this.withPageLoading({to:e,kind:"patch"},n=>{this.main.pushLinkPatch(e,i,r=>{this.historyPatch(e,t,r),n()})})}historyPatch(e,t,i=this.setPendingLink(e)){this.commitPendingLink(i)&&(_e.pushState(t,{type:"patch",id:this.main.id},e),this.registerNewLocation(window.location))}historyRedirect(e,t,i){if(!this.isConnected())return _e.redirect(e,i);if(/^\/$|^\/[^\/]+.*$/.test(e)){let{protocol:r,host:s}=window.location;e=`${r}//${s}${e}`}let n=window.scrollY;this.withPageLoading({to:e,kind:"redirect"},r=>{this.replaceMain(e,i,()=>{_e.pushState(t,{type:"redirect",id:this.main.id,scroll:n},e),this.registerNewLocation(window.location),r()})})}replaceRootHistory(){_e.pushState("replace",{root:!0,type:"patch",id:this.main.id})}registerNewLocation(e){let{pathname:t,search:i}=this.currentLocation;return t+i===e.pathname+e.search?!1:(this.currentLocation=Dt(e),!0)}bindForms(){let e=0,t=!1;this.on("submit",i=>{let n=i.target.getAttribute(this.binding("submit")),r=i.target.getAttribute(this.binding("change"));!t&&r&&!n&&(t=!0,i.preventDefault(),this.withinOwners(i.target,s=>{s.disableForm(i.target),window.requestAnimationFrame(()=>{m.isUnloadableFormSubmit(i)&&this.unload(),i.target.submit()})}))},!0),this.on("submit",i=>{let n=i.target.getAttribute(this.binding("submit"));if(!n){m.isUnloadableFormSubmit(i)&&this.unload();return}i.preventDefault(),i.target.disabled=!0,this.withinOwners(i.target,r=>{ye.exec("submit",n,r,i.target,["push",{}])})},!1);for(let i of["change","input"])this.on(i,n=>{let r=this.binding("change"),s=n.target,o=s.getAttribute(r),a=s.form&&s.form.getAttribute(r),l=o||a;if(!l||s.type==="number"&&s.validity&&s.validity.badInput)return;let h=o?s:s.form,c=e;e++;let{at:d,type:g}=m.private(s,"prev-iteration")||{};d===c-1&&i!==g||(m.putPrivate(s,"prev-iteration",{at:c,type:i}),this.debounce(s,n,i,()=>{this.withinOwners(h,u=>{m.putPrivate(s,Pn,!0),m.isTextualInput(s)||this.setActiveElement(s),ye.exec("change",l,u,s,["push",{_target:n.target.name,dispatcher:h}])})}))},!1)}debounce(e,t,i,n){if(i==="blur"||i==="focusout")return n();let r=this.binding(Sr),s=this.binding(kr),o=this.defaults.debounce.toString(),a=this.defaults.throttle.toString();this.withinOwners(e,l=>{let h=()=>!l.isDestroyed()&&document.body.contains(e);m.debounce(e,t,r,o,s,a,h,()=>{n()})})}silenceEvents(e){this.silenced=!0,e(),this.silenced=!1}on(e,t){window.addEventListener(e,i=>{this.silenced||t(i)})}},cs=class{constructor(){this.transitions=new Set,this.pendingOps=[],this.reset()}reset(){this.transitions.forEach(e=>{clearTimeout(e),this.transitions.delete(e)}),this.flushPendingOps()}after(e){this.size()===0?e():this.pushPendingOp(e)}addTransition(e,t,i){t();let n=setTimeout(()=>{this.transitions.delete(n),i(),this.size()===0&&this.flushPendingOps()},e);this.transitions.add(n)}pushPendingOp(e){this.pendingOps.push(e)}size(){return this.transitions.size}flushPendingOps(){this.pendingOps.forEach(e=>e()),this.pendingOps=[]}},on={},hs={get exports(){return on},set exports(e){on=e}},ot={},ds={get exports(){return ot},set exports(e){ot=e}};/*!
* Bootstrap index.js v5.2.3 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/var an;function me(){return an||(an=1,function(e,t){(function(i,n){n(t)})(Z,function(i){const s="transitionend",o=p=>p==null?`${p}`:Object.prototype.toString.call(p).match(/\s([a-z]+)/i)[1].toLowerCase(),a=p=>{do p+=Math.floor(Math.random()*1e6);while(document.getElementById(p));return p},l=p=>{let D=p.getAttribute("data-bs-target");if(!D||D==="#"){let R=p.getAttribute("href");if(!R||!R.includes("#")&&!R.startsWith("."))return null;R.includes("#")&&!R.startsWith("#")&&(R=`#${R.split("#")[1]}`),D=R&&R!=="#"?R.trim():null}return D},h=p=>{const D=l(p);return D&&document.querySelector(D)?D:null},c=p=>{const D=l(p);return D?document.querySelector(D):null},d=p=>{if(!p)return 0;let{transitionDuration:D,transitionDelay:R}=window.getComputedStyle(p);const T=Number.parseFloat(D),A=Number.parseFloat(R);return!T&&!A?0:(D=D.split(",")[0],R=R.split(",")[0],(Number.parseFloat(D)+Number.parseFloat(R))*1e3)},g=p=>{p.dispatchEvent(new Event(s))},u=p=>!p||typeof p!="object"?!1:(typeof p.jquery<"u"&&(p=p[0]),typeof p.nodeType<"u"),y=p=>u(p)?p.jquery?p[0]:p:typeof p=="string"&&p.length>0?document.querySelector(p):null,v=p=>{if(!u(p)||p.getClientRects().length===0)return!1;const D=getComputedStyle(p).getPropertyValue("visibility")==="visible",R=p.closest("details:not([open])");if(!R)return D;if(R!==p){const T=p.closest("summary");if(T&&T.parentNode!==R||T===null)return!1}return D},_=p=>!p||p.nodeType!==Node.ELEMENT_NODE||p.classList.contains("disabled")?!0:typeof p.disabled<"u"?p.disabled:p.hasAttribute("disabled")&&p.getAttribute("disabled")!=="false",S=p=>{if(!document.documentElement.attachShadow)return null;if(typeof p.getRootNode=="function"){const D=p.getRootNode();return D instanceof ShadowRoot?D:null}return p instanceof ShadowRoot?p:p.parentNode?S(p.parentNode):null},N=()=>{},f=p=>{p.offsetHeight},w=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,x=[],E=p=>{document.readyState==="loading"?(x.length||document.addEventListener("DOMContentLoaded",()=>{for(const D of x)D()}),x.push(p)):p()},C=()=>document.documentElement.dir==="rtl",P=p=>{E(()=>{const D=w();if(D){const R=p.NAME,T=D.fn[R];D.fn[R]=p.jQueryInterface,D.fn[R].Constructor=p,D.fn[R].noConflict=()=>(D.fn[R]=T,p.jQueryInterface)}})},k=p=>{typeof p=="function"&&p()},M=(p,D,R=!0)=>{if(!R){k(p);return}const T=5,A=d(D)+T;let b=!1;const L=({target:I})=>{I===D&&(b=!0,D.removeEventListener(s,L),k(p))};D.addEventListener(s,L),setTimeout(()=>{b||g(D)},A)},H=(p,D,R,T)=>{const A=p.length;let b=p.indexOf(D);return b===-1?!R&&T?p[A-1]:p[0]:(b+=R?1:-1,T&&(b=(b+A)%A),p[Math.max(0,Math.min(b,A-1))])};i.defineJQueryPlugin=P,i.execute=k,i.executeAfterTransition=M,i.findShadowRoot=S,i.getElement=y,i.getElementFromSelector=c,i.getNextActiveElement=H,i.getSelectorFromElement=h,i.getTransitionDurationFromElement=d,i.getUID=a,i.getjQuery=w,i.isDisabled=_,i.isElement=u,i.isRTL=C,i.isVisible=v,i.noop=N,i.onDOMContentLoaded=E,i.reflow=f,i.toType=o,i.triggerTransitionEnd=g,Object.defineProperties(i,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})})}(ds,ot)),ot}var xt={},us={get exports(){return xt},set exports(e){xt=e}};/*!
* Bootstrap event-handler.js v5.2.3 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/var ln;function xe(){return ln||(ln=1,function(e,t){(function(i,n){e.exports=n(me())})(Z,function(i){const n=/[^.]*(?=\..*)\.|.*/,r=/\..*/,s=/::\d+$/,o={};let a=1;const l={mouseenter:"mouseover",mouseleave:"mouseout"},h=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function c(E,C){return C&&`${C}::${a++}`||E.uidEvent||a++}function d(E){const C=c(E);return E.uidEvent=C,o[C]=o[C]||{},o[C]}function g(E,C){return function P(k){return x(k,{delegateTarget:E}),P.oneOff&&w.off(E,k.type,C),C.apply(E,[k])}}function u(E,C,P){return function k(M){const H=E.querySelectorAll(C);for(let{target:p}=M;p&&p!==this;p=p.parentNode)for(const D of H)if(D===p)return x(M,{delegateTarget:p}),k.oneOff&&w.off(E,M.type,C,P),P.apply(p,[M])}}function y(E,C,P=null){return Object.values(E).find(k=>k.callable===C&&k.delegationSelector===P)}function v(E,C,P){const k=typeof C=="string",M=k?P:C||P;let H=f(E);return h.has(H)||(H=E),[k,M,H]}function _(E,C,P,k,M){if(typeof C!="string"||!E)return;let[H,p,D]=v(C,P,k);C in l&&(p=(U=>function(j){if(!j.relatedTarget||j.relatedTarget!==j.delegateTarget&&!j.delegateTarget.contains(j.relatedTarget))return U.call(this,j)})(p));const R=d(E),T=R[D]||(R[D]={}),A=y(T,p,H?P:null);if(A){A.oneOff=A.oneOff&&M;return}const b=c(p,C.replace(n,"")),L=H?u(E,P,p):g(E,p);L.delegationSelector=H?P:null,L.callable=p,L.oneOff=M,L.uidEvent=b,T[b]=L,E.addEventListener(D,L,H)}function S(E,C,P,k,M){const H=y(C[P],k,M);H&&(E.removeEventListener(P,H,Boolean(M)),delete C[P][H.uidEvent])}function N(E,C,P,k){const M=C[P]||{};for(const H of Object.keys(M))if(H.includes(k)){const p=M[H];S(E,C,P,p.callable,p.delegationSelector)}}function f(E){return E=E.replace(r,""),l[E]||E}const w={on(E,C,P,k){_(E,C,P,k,!1)},one(E,C,P,k){_(E,C,P,k,!0)},off(E,C,P,k){if(typeof C!="string"||!E)return;const[M,H,p]=v(C,P,k),D=p!==C,R=d(E),T=R[p]||{},A=C.startsWith(".");if(typeof H<"u"){if(!Object.keys(T).length)return;S(E,R,p,H,M?P:null);return}if(A)for(const b of Object.keys(R))N(E,R,b,C.slice(1));for(const b of Object.keys(T)){const L=b.replace(s,"");if(!D||C.includes(L)){const I=T[b];S(E,R,p,I.callable,I.delegationSelector)}}},trigger(E,C,P){if(typeof C!="string"||!E)return null;const k=i.getjQuery(),M=f(C),H=C!==M;let p=null,D=!0,R=!0,T=!1;H&&k&&(p=k.Event(C,P),k(E).trigger(p),D=!p.isPropagationStopped(),R=!p.isImmediatePropagationStopped(),T=p.isDefaultPrevented());let A=new Event(C,{bubbles:D,cancelable:!0});return A=x(A,P),T&&A.preventDefault(),R&&E.dispatchEvent(A),A.defaultPrevented&&p&&p.preventDefault(),A}};function x(E,C){for(const[P,k]of Object.entries(C||{}))try{E[P]=k}catch{Object.defineProperty(E,P,{configurable:!0,get(){return k}})}return E}return w})}(us)),xt}var Pt={},fs={get exports(){return Pt},set exports(e){Pt=e}},Rt={},ps={get exports(){return Rt},set exports(e){Rt=e}};/*!
* Bootstrap data.js v5.2.3 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/var cn;function gs(){return cn||(cn=1,function(e,t){(function(i,n){e.exports=n()})(Z,function(){const i=new Map;return{set(r,s,o){i.has(r)||i.set(r,new Map);const a=i.get(r);if(!a.has(s)&&a.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(a.keys())[0]}.`);return}a.set(s,o)},get(r,s){return i.has(r)&&i.get(r).get(s)||null},remove(r,s){if(!i.has(r))return;const o=i.get(r);o.delete(s),o.size===0&&i.delete(r)}}})}(ps)),Rt}var Nt={},ms={get exports(){return Nt},set exports(e){Nt=e}},It={},vs={get exports(){return It},set exports(e){It=e}};/*!
* Bootstrap manipulator.js v5.2.3 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/var hn;function Ei(){return hn||(hn=1,function(e,t){(function(i,n){e.exports=n()})(Z,function(){function i(s){if(s==="true")return!0;if(s==="false")return!1;if(s===Number(s).toString())return Number(s);if(s===""||s==="null")return null;if(typeof s!="string")return s;try{return JSON.parse(decodeURIComponent(s))}catch{return s}}function n(s){return s.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`)}return{setDataAttribute(s,o,a){s.setAttribute(`data-bs-${n(o)}`,a)},removeDataAttribute(s,o){s.removeAttribute(`data-bs-${n(o)}`)},getDataAttributes(s){if(!s)return{};const o={},a=Object.keys(s.dataset).filter(l=>l.startsWith("bs")&&!l.startsWith("bsConfig"));for(const l of a){let h=l.replace(/^bs/,"");h=h.charAt(0).toLowerCase()+h.slice(1,h.length),o[h]=i(s.dataset[l])}return o},getDataAttribute(s,o){return i(s.getAttribute(`data-bs-${n(o)}`))}}})}(vs)),It}/*!
* Bootstrap config.js v5.2.3 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/var dn;function wi(){return dn||(dn=1,function(e,t){(function(i,n){e.exports=n(me(),Ei())})(Z,function(i,n){const s=(a=>a&&typeof a=="object"&&"default"in a?a:{default:a})(n);class o{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(l){return l=this._mergeConfigObj(l),l=this._configAfterMerge(l),this._typeCheckConfig(l),l}_configAfterMerge(l){return l}_mergeConfigObj(l,h){const c=i.isElement(h)?s.default.getDataAttribute(h,"config"):{};return{...this.constructor.Default,...typeof c=="object"?c:{},...i.isElement(h)?s.default.getDataAttributes(h):{},...typeof l=="object"?l:{}}}_typeCheckConfig(l,h=this.constructor.DefaultType){for(const c of Object.keys(h)){const d=h[c],g=l[c],u=i.isElement(g)?"element":i.toType(g);if(!new RegExp(d).test(u))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${c}" provided type "${u}" but expected type "${d}".`)}}}return o})}(ms)),Nt}/*!
* Bootstrap base-component.js v5.2.3 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/var un;function Bt(){return un||(un=1,function(e,t){(function(i,n){e.exports=n(gs(),me(),xe(),wi())})(Z,function(i,n,r,s){const o=g=>g&&typeof g=="object"&&"default"in g?g:{default:g},a=o(i),l=o(r),h=o(s),c="5.2.3";class d extends h.default{constructor(u,y){super(),u=n.getElement(u),u&&(this._element=u,this._config=this._getConfig(y),a.default.set(this._element,this.constructor.DATA_KEY,this))}dispose(){a.default.remove(this._element,this.constructor.DATA_KEY),l.default.off(this._element,this.constructor.EVENT_KEY);for(const u of Object.getOwnPropertyNames(this))this[u]=null}_queueCallback(u,y,v=!0){n.executeAfterTransition(u,y,v)}_getConfig(u){return u=this._mergeConfigObj(u,this._element),u=this._configAfterMerge(u),this._typeCheckConfig(u),u}static getInstance(u){return a.default.get(n.getElement(u),this.DATA_KEY)}static getOrCreateInstance(u,y={}){return this.getInstance(u)||new this(u,typeof y=="object"?y:null)}static get VERSION(){return c}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(u){return`${u}${this.EVENT_KEY}`}}return d})}(fs)),Pt}var at={},bs={get exports(){return at},set exports(e){at=e}};/*!
* Bootstrap component-functions.js v5.2.3 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/var fn;function Mn(){return fn||(fn=1,function(e,t){(function(i,n){n(t,xe(),me())})(Z,function(i,n,r){const o=(l=>l&&typeof l=="object"&&"default"in l?l:{default:l})(n),a=(l,h="hide")=>{const c=`click.dismiss${l.EVENT_KEY}`,d=l.NAME;o.default.on(document,c,`[data-bs-dismiss="${d}"]`,function(g){if(["A","AREA"].includes(this.tagName)&&g.preventDefault(),r.isDisabled(this))return;const u=r.getElementFromSelector(this)||this.closest(`.${d}`);l.getOrCreateInstance(u)[h]()})};i.enableDismissTrigger=a,Object.defineProperties(i,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})})}(bs,at)),at}/*!
* Bootstrap alert.js v5.2.3 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/(function(e,t){(function(i,n){e.exports=n(me(),xe(),Bt(),Mn())})(Z,function(i,n,r,s){const o=S=>S&&typeof S=="object"&&"default"in S?S:{default:S},a=o(n),l=o(r),h="alert",d=".bs.alert",g=`close${d}`,u=`closed${d}`,y="fade",v="show";class _ extends l.default{static get NAME(){return h}close(){if(a.default.trigger(this._element,g).defaultPrevented)return;this._element.classList.remove(v);const f=this._element.classList.contains(y);this._queueCallback(()=>this._destroyElement(),this._element,f)}_destroyElement(){this._element.remove(),a.default.trigger(this._element,u),this.dispose()}static jQueryInterface(N){return this.each(function(){const f=_.getOrCreateInstance(this);if(typeof N=="string"){if(f[N]===void 0||N.startsWith("_")||N==="constructor")throw new TypeError(`No method named "${N}"`);f[N](this)}})}}return s.enableDismissTrigger(_,"close"),i.defineJQueryPlugin(_),_})})(hs);var fi={},_s={get exports(){return fi},set exports(e){fi=e}},Mt={},ys={get exports(){return Mt},set exports(e){Mt=e}};/*!
* Bootstrap selector-engine.js v5.2.3 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/var pn;function dt(){return pn||(pn=1,function(e,t){(function(i,n){e.exports=n(me())})(Z,function(i){return{find(r,s=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(s,r))},findOne(r,s=document.documentElement){return Element.prototype.querySelector.call(s,r)},children(r,s){return[].concat(...r.children).filter(o=>o.matches(s))},parents(r,s){const o=[];let a=r.parentNode.closest(s);for(;a;)o.push(a),a=a.parentNode.closest(s);return o},prev(r,s){let o=r.previousElementSibling;for(;o;){if(o.matches(s))return[o];o=o.previousElementSibling}return[]},next(r,s){let o=r.nextElementSibling;for(;o;){if(o.matches(s))return[o];o=o.nextElementSibling}return[]},focusableChildren(r){const s=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(o=>`${o}:not([tabindex^="-"])`).join(",");return this.find(s,r).filter(o=>!i.isDisabled(o)&&i.isVisible(o))}}})}(ys)),Mt}/*!
* Bootstrap collapse.js v5.2.3 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/(function(e,t){(function(i,n){e.exports=n(me(),xe(),dt(),Bt())})(Z,function(i,n,r,s){const o=A=>A&&typeof A=="object"&&"default"in A?A:{default:A},a=o(n),l=o(r),h=o(s),c="collapse",g=".bs.collapse",u=".data-api",y=`show${g}`,v=`shown${g}`,_=`hide${g}`,S=`hidden${g}`,N=`click${g}${u}`,f="show",w="collapse",x="collapsing",E="collapsed",C=`:scope .${w} .${w}`,P="collapse-horizontal",k="width",M="height",H=".collapse.show, .collapse.collapsing",p='[data-bs-toggle="collapse"]',D={parent:null,toggle:!0},R={parent:"(null|element)",toggle:"boolean"};class T extends h.default{constructor(b,L){super(b,L),this._isTransitioning=!1,this._triggerArray=[];const I=l.default.find(p);for(const U of I){const j=i.getSelectorFromElement(U),J=l.default.find(j).filter(B=>B===this._element);j!==null&&J.length&&this._triggerArray.push(U)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return D}static get DefaultType(){return R}static get NAME(){return c}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let b=[];if(this._config.parent&&(b=this._getFirstLevelChildren(H).filter(B=>B!==this._element).map(B=>T.getOrCreateInstance(B,{toggle:!1}))),b.length&&b[0]._isTransitioning||a.default.trigger(this._element,y).defaultPrevented)return;for(const B of b)B.hide();const I=this._getDimension();this._element.classList.remove(w),this._element.classList.add(x),this._element.style[I]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const U=()=>{this._isTransitioning=!1,this._element.classList.remove(x),this._element.classList.add(w,f),this._element.style[I]="",a.default.trigger(this._element,v)},J=`scroll${I[0].toUpperCase()+I.slice(1)}`;this._queueCallback(U,this._element,!0),this._element.style[I]=`${this._element[J]}px`}hide(){if(this._isTransitioning||!this._isShown()||a.default.trigger(this._element,_).defaultPrevented)return;const L=this._getDimension();this._element.style[L]=`${this._element.getBoundingClientRect()[L]}px`,i.reflow(this._element),this._element.classList.add(x),this._element.classList.remove(w,f);for(const U of this._triggerArray){const j=i.getElementFromSelector(U);j&&!this._isShown(j)&&this._addAriaAndCollapsedClass([U],!1)}this._isTransitioning=!0;const I=()=>{this._isTransitioning=!1,this._element.classList.remove(x),this._element.classList.add(w),a.default.trigger(this._element,S)};this._element.style[L]="",this._queueCallback(I,this._element,!0)}_isShown(b=this._element){return b.classList.contains(f)}_configAfterMerge(b){return b.toggle=Boolean(b.toggle),b.parent=i.getElement(b.parent),b}_getDimension(){return this._element.classList.contains(P)?k:M}_initializeChildren(){if(!this._config.parent)return;const b=this._getFirstLevelChildren(p);for(const L of b){const I=i.getElementFromSelector(L);I&&this._addAriaAndCollapsedClass([L],this._isShown(I))}}_getFirstLevelChildren(b){const L=l.default.find(C,this._config.parent);return l.default.find(b,this._config.parent).filter(I=>!L.includes(I))}_addAriaAndCollapsedClass(b,L){if(b.length)for(const I of b)I.classList.toggle(E,!L),I.setAttribute("aria-expanded",L)}static jQueryInterface(b){const L={};return typeof b=="string"&&/show|hide/.test(b)&&(L.toggle=!1),this.each(function(){const I=T.getOrCreateInstance(this,L);if(typeof b=="string"){if(typeof I[b]>"u")throw new TypeError(`No method named "${b}"`);I[b]()}})}}return a.default.on(document,N,p,function(A){(A.target.tagName==="A"||A.delegateTarget&&A.delegateTarget.tagName==="A")&&A.preventDefault();const b=i.getSelectorFromElement(this),L=l.default.find(b);for(const I of L)T.getOrCreateInstance(I,{toggle:!1}).toggle()}),i.defineJQueryPlugin(T),T})})(_s);const Es=fi;var gn={},ws={get exports(){return gn},set exports(e){gn=e}},ie="top",ce="bottom",he="right",ne="left",Ut="auto",Xe=[ie,ce,he,ne],He="start",Ve="end",Hn="clippingParents",Ai="viewport",Fe="popper",$n="reference",pi=Xe.reduce(function(e,t){return e.concat([t+"-"+He,t+"-"+Ve])},[]),Ci=[].concat(Xe,[Ut]).reduce(function(e,t){return e.concat([t,t+"-"+He,t+"-"+Ve])},[]),Fn="beforeRead",jn="read",Bn="afterRead",Un="beforeMain",Vn="main",Wn="afterMain",qn="beforeWrite",Kn="write",Jn="afterWrite",Xn=[Fn,jn,Bn,Un,Vn,Wn,qn,Kn,Jn];function Ce(e){return e?(e.nodeName||"").toLowerCase():null}function ue(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function $e(e){var t=ue(e).Element;return e instanceof t||e instanceof Element}function de(e){var t=ue(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Ti(e){if(typeof ShadowRoot>"u")return!1;var t=ue(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function As(e){var t=e.state;Object.keys(t.elements).forEach(function(i){var n=t.styles[i]||{},r=t.attributes[i]||{},s=t.elements[i];!de(s)||!Ce(s)||(Object.assign(s.style,n),Object.keys(r).forEach(function(o){var a=r[o];a===!1?s.removeAttribute(o):s.setAttribute(o,a===!0?"":a)}))})}function Cs(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach(function(n){var r=t.elements[n],s=t.attributes[n]||{},o=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:i[n]),a=o.reduce(function(l,h){return l[h]="",l},{});!de(r)||!Ce(r)||(Object.assign(r.style,a),Object.keys(s).forEach(function(l){r.removeAttribute(l)}))})}}const Si={name:"applyStyles",enabled:!0,phase:"write",fn:As,effect:Cs,requires:["computeStyles"]};function Ae(e){return e.split("-")[0]}var Ie=Math.max,Ht=Math.min,We=Math.round;function gi(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function zn(){return!/^((?!chrome|android).)*safari/i.test(gi())}function qe(e,t,i){t===void 0&&(t=!1),i===void 0&&(i=!1);var n=e.getBoundingClientRect(),r=1,s=1;t&&de(e)&&(r=e.offsetWidth>0&&We(n.width)/e.offsetWidth||1,s=e.offsetHeight>0&&We(n.height)/e.offsetHeight||1);var o=$e(e)?ue(e):window,a=o.visualViewport,l=!zn()&&i,h=(n.left+(l&&a?a.offsetLeft:0))/r,c=(n.top+(l&&a?a.offsetTop:0))/s,d=n.width/r,g=n.height/s;return{width:d,height:g,top:c,right:h+d,bottom:c+g,left:h,x:h,y:c}}function ki(e){var t=qe(e),i=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:n}}function Yn(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&Ti(i)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Se(e){return ue(e).getComputedStyle(e)}function Ts(e){return["table","td","th"].indexOf(Ce(e))>=0}function Pe(e){return(($e(e)?e.ownerDocument:e.document)||window.document).documentElement}function Vt(e){return Ce(e)==="html"?e:e.assignedSlot||e.parentNode||(Ti(e)?e.host:null)||Pe(e)}function mn(e){return!de(e)||Se(e).position==="fixed"?null:e.offsetParent}function Ss(e){var t=/firefox/i.test(gi()),i=/Trident/i.test(gi());if(i&&de(e)){var n=Se(e);if(n.position==="fixed")return null}var r=Vt(e);for(Ti(r)&&(r=r.host);de(r)&&["html","body"].indexOf(Ce(r))<0;){var s=Se(r);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return r;r=r.parentNode}return null}function ut(e){for(var t=ue(e),i=mn(e);i&&Ts(i)&&Se(i).position==="static";)i=mn(i);return i&&(Ce(i)==="html"||Ce(i)==="body"&&Se(i).position==="static")?t:i||Ss(e)||t}function Di(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function lt(e,t,i){return Ie(e,Ht(t,i))}function ks(e,t,i){var n=lt(e,t,i);return n>i?i:n}function Gn(){return{top:0,right:0,bottom:0,left:0}}function Qn(e){return Object.assign({},Gn(),e)}function Zn(e,t){return t.reduce(function(i,n){return i[n]=e,i},{})}var Ds=function(t,i){return t=typeof t=="function"?t(Object.assign({},i.rects,{placement:i.placement})):t,Qn(typeof t!="number"?t:Zn(t,Xe))};function Ls(e){var t,i=e.state,n=e.name,r=e.options,s=i.elements.arrow,o=i.modifiersData.popperOffsets,a=Ae(i.placement),l=Di(a),h=[ne,he].indexOf(a)>=0,c=h?"height":"width";if(!(!s||!o)){var d=Ds(r.padding,i),g=ki(s),u=l==="y"?ie:ne,y=l==="y"?ce:he,v=i.rects.reference[c]+i.rects.reference[l]-o[l]-i.rects.popper[c],_=o[l]-i.rects.reference[l],S=ut(s),N=S?l==="y"?S.clientHeight||0:S.clientWidth||0:0,f=v/2-_/2,w=d[u],x=N-g[c]-d[y],E=N/2-g[c]/2+f,C=lt(w,E,x),P=l;i.modifiersData[n]=(t={},t[P]=C,t.centerOffset=C-E,t)}}function Os(e){var t=e.state,i=e.options,n=i.element,r=n===void 0?"[data-popper-arrow]":n;r!=null&&(typeof r=="string"&&(r=t.elements.popper.querySelector(r),!r)||Yn(t.elements.popper,r)&&(t.elements.arrow=r))}const er={name:"arrow",enabled:!0,phase:"main",fn:Ls,effect:Os,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ke(e){return e.split("-")[1]}var xs={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ps(e){var t=e.x,i=e.y,n=window,r=n.devicePixelRatio||1;return{x:We(t*r)/r||0,y:We(i*r)/r||0}}function vn(e){var t,i=e.popper,n=e.popperRect,r=e.placement,s=e.variation,o=e.offsets,a=e.position,l=e.gpuAcceleration,h=e.adaptive,c=e.roundOffsets,d=e.isFixed,g=o.x,u=g===void 0?0:g,y=o.y,v=y===void 0?0:y,_=typeof c=="function"?c({x:u,y:v}):{x:u,y:v};u=_.x,v=_.y;var S=o.hasOwnProperty("x"),N=o.hasOwnProperty("y"),f=ne,w=ie,x=window;if(h){var E=ut(i),C="clientHeight",P="clientWidth";if(E===ue(i)&&(E=Pe(i),Se(E).position!=="static"&&a==="absolute"&&(C="scrollHeight",P="scrollWidth")),E=E,r===ie||(r===ne||r===he)&&s===Ve){w=ce;var k=d&&E===x&&x.visualViewport?x.visualViewport.height:E[C];v-=k-n.height,v*=l?1:-1}if(r===ne||(r===ie||r===ce)&&s===Ve){f=he;var M=d&&E===x&&x.visualViewport?x.visualViewport.width:E[P];u-=M-n.width,u*=l?1:-1}}var H=Object.assign({position:a},h&&xs),p=c===!0?Ps({x:u,y:v}):{x:u,y:v};if(u=p.x,v=p.y,l){var D;return Object.assign({},H,(D={},D[w]=N?"0":"",D[f]=S?"0":"",D.transform=(x.devicePixelRatio||1)<=1?"translate("+u+"px, "+v+"px)":"translate3d("+u+"px, "+v+"px, 0)",D))}return Object.assign({},H,(t={},t[w]=N?v+"px":"",t[f]=S?u+"px":"",t.transform="",t))}function Rs(e){var t=e.state,i=e.options,n=i.gpuAcceleration,r=n===void 0?!0:n,s=i.adaptive,o=s===void 0?!0:s,a=i.roundOffsets,l=a===void 0?!0:a,h={placement:Ae(t.placement),variation:Ke(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,vn(Object.assign({},h,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,vn(Object.assign({},h,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Li={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Rs,data:{}};var St={passive:!0};function Ns(e){var t=e.state,i=e.instance,n=e.options,r=n.scroll,s=r===void 0?!0:r,o=n.resize,a=o===void 0?!0:o,l=ue(t.elements.popper),h=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&h.forEach(function(c){c.addEventListener("scroll",i.update,St)}),a&&l.addEventListener("resize",i.update,St),function(){s&&h.forEach(function(c){c.removeEventListener("scroll",i.update,St)}),a&&l.removeEventListener("resize",i.update,St)}}const Oi={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ns,data:{}};var Is={left:"right",right:"left",bottom:"top",top:"bottom"};function Lt(e){return e.replace(/left|right|bottom|top/g,function(t){return Is[t]})}var Ms={start:"end",end:"start"};function bn(e){return e.replace(/start|end/g,function(t){return Ms[t]})}function xi(e){var t=ue(e),i=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:i,scrollTop:n}}function Pi(e){return qe(Pe(e)).left+xi(e).scrollLeft}function Hs(e,t){var i=ue(e),n=Pe(e),r=i.visualViewport,s=n.clientWidth,o=n.clientHeight,a=0,l=0;if(r){s=r.width,o=r.height;var h=zn();(h||!h&&t==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}return{width:s,height:o,x:a+Pi(e),y:l}}function $s(e){var t,i=Pe(e),n=xi(e),r=(t=e.ownerDocument)==null?void 0:t.body,s=Ie(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),o=Ie(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-n.scrollLeft+Pi(e),l=-n.scrollTop;return Se(r||i).direction==="rtl"&&(a+=Ie(i.clientWidth,r?r.clientWidth:0)-s),{width:s,height:o,x:a,y:l}}function Ri(e){var t=Se(e),i=t.overflow,n=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function tr(e){return["html","body","#document"].indexOf(Ce(e))>=0?e.ownerDocument.body:de(e)&&Ri(e)?e:tr(Vt(e))}function ct(e,t){var i;t===void 0&&(t=[]);var n=tr(e),r=n===((i=e.ownerDocument)==null?void 0:i.body),s=ue(n),o=r?[s].concat(s.visualViewport||[],Ri(n)?n:[]):n,a=t.concat(o);return r?a:a.concat(ct(Vt(o)))}function mi(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Fs(e,t){var i=qe(e,!1,t==="fixed");return i.top=i.top+e.clientTop,i.left=i.left+e.clientLeft,i.bottom=i.top+e.clientHeight,i.right=i.left+e.clientWidth,i.width=e.clientWidth,i.height=e.clientHeight,i.x=i.left,i.y=i.top,i}function _n(e,t,i){return t===Ai?mi(Hs(e,i)):$e(t)?Fs(t,i):mi($s(Pe(e)))}function js(e){var t=ct(Vt(e)),i=["absolute","fixed"].indexOf(Se(e).position)>=0,n=i&&de(e)?ut(e):e;return $e(n)?t.filter(function(r){return $e(r)&&Yn(r,n)&&Ce(r)!=="body"}):[]}function Bs(e,t,i,n){var r=t==="clippingParents"?js(e):[].concat(t),s=[].concat(r,[i]),o=s[0],a=s.reduce(function(l,h){var c=_n(e,h,n);return l.top=Ie(c.top,l.top),l.right=Ht(c.right,l.right),l.bottom=Ht(c.bottom,l.bottom),l.left=Ie(c.left,l.left),l},_n(e,o,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function ir(e){var t=e.reference,i=e.element,n=e.placement,r=n?Ae(n):null,s=n?Ke(n):null,o=t.x+t.width/2-i.width/2,a=t.y+t.height/2-i.height/2,l;switch(r){case ie:l={x:o,y:t.y-i.height};break;case ce:l={x:o,y:t.y+t.height};break;case he:l={x:t.x+t.width,y:a};break;case ne:l={x:t.x-i.width,y:a};break;default:l={x:t.x,y:t.y}}var h=r?Di(r):null;if(h!=null){var c=h==="y"?"height":"width";switch(s){case He:l[h]=l[h]-(t[c]/2-i[c]/2);break;case Ve:l[h]=l[h]+(t[c]/2-i[c]/2);break}}return l}function Je(e,t){t===void 0&&(t={});var i=t,n=i.placement,r=n===void 0?e.placement:n,s=i.strategy,o=s===void 0?e.strategy:s,a=i.boundary,l=a===void 0?Hn:a,h=i.rootBoundary,c=h===void 0?Ai:h,d=i.elementContext,g=d===void 0?Fe:d,u=i.altBoundary,y=u===void 0?!1:u,v=i.padding,_=v===void 0?0:v,S=Qn(typeof _!="number"?_:Zn(_,Xe)),N=g===Fe?$n:Fe,f=e.rects.popper,w=e.elements[y?N:g],x=Bs($e(w)?w:w.contextElement||Pe(e.elements.popper),l,c,o),E=qe(e.elements.reference),C=ir({reference:E,element:f,strategy:"absolute",placement:r}),P=mi(Object.assign({},f,C)),k=g===Fe?P:E,M={top:x.top-k.top+S.top,bottom:k.bottom-x.bottom+S.bottom,left:x.left-k.left+S.left,right:k.right-x.right+S.right},H=e.modifiersData.offset;if(g===Fe&&H){var p=H[r];Object.keys(M).forEach(function(D){var R=[he,ce].indexOf(D)>=0?1:-1,T=[ie,ce].indexOf(D)>=0?"y":"x";M[D]+=p[T]*R})}return M}function Us(e,t){t===void 0&&(t={});var i=t,n=i.placement,r=i.boundary,s=i.rootBoundary,o=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,h=l===void 0?Ci:l,c=Ke(n),d=c?a?pi:pi.filter(function(y){return Ke(y)===c}):Xe,g=d.filter(function(y){return h.indexOf(y)>=0});g.length===0&&(g=d);var u=g.reduce(function(y,v){return y[v]=Je(e,{placement:v,boundary:r,rootBoundary:s,padding:o})[Ae(v)],y},{});return Object.keys(u).sort(function(y,v){return u[y]-u[v]})}function Vs(e){if(Ae(e)===Ut)return[];var t=Lt(e);return[bn(e),t,bn(t)]}function Ws(e){var t=e.state,i=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var r=i.mainAxis,s=r===void 0?!0:r,o=i.altAxis,a=o===void 0?!0:o,l=i.fallbackPlacements,h=i.padding,c=i.boundary,d=i.rootBoundary,g=i.altBoundary,u=i.flipVariations,y=u===void 0?!0:u,v=i.allowedAutoPlacements,_=t.options.placement,S=Ae(_),N=S===_,f=l||(N||!y?[Lt(_)]:Vs(_)),w=[_].concat(f).reduce(function(ee,W){return ee.concat(Ae(W)===Ut?Us(t,{placement:W,boundary:c,rootBoundary:d,padding:h,flipVariations:y,allowedAutoPlacements:v}):W)},[]),x=t.rects.reference,E=t.rects.popper,C=new Map,P=!0,k=w[0],M=0;M<w.length;M++){var H=w[M],p=Ae(H),D=Ke(H)===He,R=[ie,ce].indexOf(p)>=0,T=R?"width":"height",A=Je(t,{placement:H,boundary:c,rootBoundary:d,altBoundary:g,padding:h}),b=R?D?he:ne:D?ce:ie;x[T]>E[T]&&(b=Lt(b));var L=Lt(b),I=[];if(s&&I.push(A[p]<=0),a&&I.push(A[b]<=0,A[L]<=0),I.every(function(ee){return ee})){k=H,P=!1;break}C.set(H,I)}if(P)for(var U=y?3:1,j=function(W){var K=w.find(function(z){var $=C.get(z);if($)return $.slice(0,W).every(function(V){return V})});if(K)return k=K,"break"},J=U;J>0;J--){var B=j(J);if(B==="break")break}t.placement!==k&&(t.modifiersData[n]._skip=!0,t.placement=k,t.reset=!0)}}const nr={name:"flip",enabled:!0,phase:"main",fn:Ws,requiresIfExists:["offset"],data:{_skip:!1}};function yn(e,t,i){return i===void 0&&(i={x:0,y:0}),{top:e.top-t.height-i.y,right:e.right-t.width+i.x,bottom:e.bottom-t.height+i.y,left:e.left-t.width-i.x}}function En(e){return[ie,he,ce,ne].some(function(t){return e[t]>=0})}function qs(e){var t=e.state,i=e.name,n=t.rects.reference,r=t.rects.popper,s=t.modifiersData.preventOverflow,o=Je(t,{elementContext:"reference"}),a=Je(t,{altBoundary:!0}),l=yn(o,n),h=yn(a,r,s),c=En(l),d=En(h);t.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:h,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}const rr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:qs};function Ks(e,t,i){var n=Ae(e),r=[ne,ie].indexOf(n)>=0?-1:1,s=typeof i=="function"?i(Object.assign({},t,{placement:e})):i,o=s[0],a=s[1];return o=o||0,a=(a||0)*r,[ne,he].indexOf(n)>=0?{x:a,y:o}:{x:o,y:a}}function Js(e){var t=e.state,i=e.options,n=e.name,r=i.offset,s=r===void 0?[0,0]:r,o=Ci.reduce(function(c,d){return c[d]=Ks(d,t.rects,s),c},{}),a=o[t.placement],l=a.x,h=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=h),t.modifiersData[n]=o}const sr={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Js};function Xs(e){var t=e.state,i=e.name;t.modifiersData[i]=ir({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Ni={name:"popperOffsets",enabled:!0,phase:"read",fn:Xs,data:{}};function zs(e){return e==="x"?"y":"x"}function Ys(e){var t=e.state,i=e.options,n=e.name,r=i.mainAxis,s=r===void 0?!0:r,o=i.altAxis,a=o===void 0?!1:o,l=i.boundary,h=i.rootBoundary,c=i.altBoundary,d=i.padding,g=i.tether,u=g===void 0?!0:g,y=i.tetherOffset,v=y===void 0?0:y,_=Je(t,{boundary:l,rootBoundary:h,padding:d,altBoundary:c}),S=Ae(t.placement),N=Ke(t.placement),f=!N,w=Di(S),x=zs(w),E=t.modifiersData.popperOffsets,C=t.rects.reference,P=t.rects.popper,k=typeof v=="function"?v(Object.assign({},t.rects,{placement:t.placement})):v,M=typeof k=="number"?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),H=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,p={x:0,y:0};if(E){if(s){var D,R=w==="y"?ie:ne,T=w==="y"?ce:he,A=w==="y"?"height":"width",b=E[w],L=b+_[R],I=b-_[T],U=u?-P[A]/2:0,j=N===He?C[A]:P[A],J=N===He?-P[A]:-C[A],B=t.elements.arrow,ee=u&&B?ki(B):{width:0,height:0},W=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Gn(),K=W[R],z=W[T],$=lt(0,C[A],ee[A]),V=f?C[A]/2-U-$-K-M.mainAxis:j-$-K-M.mainAxis,te=f?-C[A]/2+U+$+z+M.mainAxis:J+$+z+M.mainAxis,fe=t.elements.arrow&&ut(t.elements.arrow),Kt=fe?w==="y"?fe.clientTop||0:fe.clientLeft||0:0,ft=(D=H?.[w])!=null?D:0,Jt=b+V-ft-Kt,Xt=b+te-ft,pt=lt(u?Ht(L,Jt):L,b,u?Ie(I,Xt):I);E[w]=pt,p[w]=pt-b}if(a){var re,X=w==="x"?ie:ne,O=w==="x"?ce:he,F=E[x],q=x==="y"?"height":"width",Y=F+_[X],ke=F-_[O],pe=[ie,ne].indexOf(S)!==-1,ze=(re=H?.[x])!=null?re:0,Ii=pe?Y:F-C[q]-P[q]-ze+M.altAxis,Mi=pe?F+C[q]+P[q]-ze-M.altAxis:ke,Hi=u&&pe?ks(Ii,F,Mi):lt(u?Ii:Y,F,u?Mi:ke);E[x]=Hi,p[x]=Hi-F}t.modifiersData[n]=p}}const or={name:"preventOverflow",enabled:!0,phase:"main",fn:Ys,requiresIfExists:["offset"]};function Gs(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Qs(e){return e===ue(e)||!de(e)?xi(e):Gs(e)}function Zs(e){var t=e.getBoundingClientRect(),i=We(t.width)/e.offsetWidth||1,n=We(t.height)/e.offsetHeight||1;return i!==1||n!==1}function eo(e,t,i){i===void 0&&(i=!1);var n=de(t),r=de(t)&&Zs(t),s=Pe(t),o=qe(e,r,i),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!i)&&((Ce(t)!=="body"||Ri(s))&&(a=Qs(t)),de(t)?(l=qe(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):s&&(l.x=Pi(s))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function to(e){var t=new Map,i=new Set,n=[];e.forEach(function(s){t.set(s.name,s)});function r(s){i.add(s.name);var o=[].concat(s.requires||[],s.requiresIfExists||[]);o.forEach(function(a){if(!i.has(a)){var l=t.get(a);l&&r(l)}}),n.push(s)}return e.forEach(function(s){i.has(s.name)||r(s)}),n}function io(e){var t=to(e);return Xn.reduce(function(i,n){return i.concat(t.filter(function(r){return r.phase===n}))},[])}function no(e){var t;return function(){return t||(t=new Promise(function(i){Promise.resolve().then(function(){t=void 0,i(e())})})),t}}function ro(e){var t=e.reduce(function(i,n){var r=i[n.name];return i[n.name]=r?Object.assign({},r,n,{options:Object.assign({},r.options,n.options),data:Object.assign({},r.data,n.data)}):n,i},{});return Object.keys(t).map(function(i){return t[i]})}var wn={placement:"bottom",modifiers:[],strategy:"absolute"};function An(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function Wt(e){e===void 0&&(e={});var t=e,i=t.defaultModifiers,n=i===void 0?[]:i,r=t.defaultOptions,s=r===void 0?wn:r;return function(a,l,h){h===void 0&&(h=s);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},wn,s),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},d=[],g=!1,u={state:c,setOptions:function(S){var N=typeof S=="function"?S(c.options):S;v(),c.options=Object.assign({},s,c.options,N),c.scrollParents={reference:$e(a)?ct(a):a.contextElement?ct(a.contextElement):[],popper:ct(l)};var f=io(ro([].concat(n,c.options.modifiers)));return c.orderedModifiers=f.filter(function(w){return w.enabled}),y(),u.update()},forceUpdate:function(){if(!g){var S=c.elements,N=S.reference,f=S.popper;if(An(N,f)){c.rects={reference:eo(N,ut(f),c.options.strategy==="fixed"),popper:ki(f)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(M){return c.modifiersData[M.name]=Object.assign({},M.data)});for(var w=0;w<c.orderedModifiers.length;w++){if(c.reset===!0){c.reset=!1,w=-1;continue}var x=c.orderedModifiers[w],E=x.fn,C=x.options,P=C===void 0?{}:C,k=x.name;typeof E=="function"&&(c=E({state:c,options:P,name:k,instance:u})||c)}}}},update:no(function(){return new Promise(function(_){u.forceUpdate(),_(c)})}),destroy:function(){v(),g=!0}};if(!An(a,l))return u;u.setOptions(h).then(function(_){!g&&h.onFirstUpdate&&h.onFirstUpdate(_)});function y(){c.orderedModifiers.forEach(function(_){var S=_.name,N=_.options,f=N===void 0?{}:N,w=_.effect;if(typeof w=="function"){var x=w({state:c,name:S,instance:u,options:f}),E=function(){};d.push(x||E)}})}function v(){d.forEach(function(_){return _()}),d=[]}return u}}var so=Wt(),oo=[Oi,Ni,Li,Si],ao=Wt({defaultModifiers:oo}),lo=[Oi,Ni,Li,Si,sr,nr,or,er,rr],co=Wt({defaultModifiers:lo});const ho=Object.freeze(Object.defineProperty({__proto__:null,afterMain:Wn,afterRead:Bn,afterWrite:Jn,applyStyles:Si,arrow:er,auto:Ut,basePlacements:Xe,beforeMain:Un,beforeRead:Fn,beforeWrite:qn,bottom:ce,clippingParents:Hn,computeStyles:Li,createPopper:co,createPopperBase:so,createPopperLite:ao,detectOverflow:Je,end:Ve,eventListeners:Oi,flip:nr,hide:rr,left:ne,main:Vn,modifierPhases:Xn,offset:sr,placements:Ci,popper:Fe,popperGenerator:Wt,popperOffsets:Ni,preventOverflow:or,read:jn,reference:$n,right:he,start:He,top:ie,variationPlacements:pi,viewport:Ai,write:Kn},Symbol.toStringTag,{value:"Module"})),uo=gr(ho);/*!
* Bootstrap dropdown.js v5.2.3 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/(function(e,t){(function(i,n){e.exports=n(uo,me(),xe(),Ei(),dt(),Bt())})(Z,function(i,n,r,s,o,a){const l=X=>X&&typeof X=="object"&&"default"in X?X:{default:X};function h(X){if(X&&X.__esModule)return X;const O=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(X){for(const F in X)if(F!=="default"){const q=Object.getOwnPropertyDescriptor(X,F);Object.defineProperty(O,F,q.get?q:{enumerable:!0,get:()=>X[F]})}}return O.default=X,Object.freeze(O)}const c=h(i),d=l(r),g=l(s),u=l(o),y=l(a),v="dropdown",S=".bs.dropdown",N=".data-api",f="Escape",w="Tab",x="ArrowUp",E="ArrowDown",C=2,P=`hide${S}`,k=`hidden${S}`,M=`show${S}`,H=`shown${S}`,p=`click${S}${N}`,D=`keydown${S}${N}`,R=`keyup${S}${N}`,T="show",A="dropup",b="dropend",L="dropstart",I="dropup-center",U="dropdown-center",j='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',J=`${j}.${T}`,B=".dropdown-menu",ee=".navbar",W=".navbar-nav",K=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",z=n.isRTL()?"top-end":"top-start",$=n.isRTL()?"top-start":"top-end",V=n.isRTL()?"bottom-end":"bottom-start",te=n.isRTL()?"bottom-start":"bottom-end",fe=n.isRTL()?"left-start":"right-start",Kt=n.isRTL()?"right-start":"left-start",ft="top",Jt="bottom",Xt={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},pt={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class re extends y.default{constructor(O,F){super(O,F),this._popper=null,this._parent=this._element.parentNode,this._menu=u.default.next(this._element,B)[0]||u.default.prev(this._element,B)[0]||u.default.findOne(B,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Xt}static get DefaultType(){return pt}static get NAME(){return v}toggle(){return this._isShown()?this.hide():this.show()}show(){if(n.isDisabled(this._element)||this._isShown())return;const O={relatedTarget:this._element};if(!d.default.trigger(this._element,M,O).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(W))for(const q of[].concat(...document.body.children))d.default.on(q,"mouseover",n.noop);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(T),this._element.classList.add(T),d.default.trigger(this._element,H,O)}}hide(){if(n.isDisabled(this._element)||!this._isShown())return;const O={relatedTarget:this._element};this._completeHide(O)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(O){if(!d.default.trigger(this._element,P,O).defaultPrevented){if("ontouchstart"in document.documentElement)for(const q of[].concat(...document.body.children))d.default.off(q,"mouseover",n.noop);this._popper&&this._popper.destroy(),this._menu.classList.remove(T),this._element.classList.remove(T),this._element.setAttribute("aria-expanded","false"),g.default.removeDataAttribute(this._menu,"popper"),d.default.trigger(this._element,k,O)}}_getConfig(O){if(O=super._getConfig(O),typeof O.reference=="object"&&!n.isElement(O.reference)&&typeof O.reference.getBoundingClientRect!="function")throw new TypeError(`${v.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return O}_createPopper(){if(typeof c>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let O=this._element;this._config.reference==="parent"?O=this._parent:n.isElement(this._config.reference)?O=n.getElement(this._config.reference):typeof this._config.reference=="object"&&(O=this._config.reference);const F=this._getPopperConfig();this._popper=c.createPopper(O,this._menu,F)}_isShown(){return this._menu.classList.contains(T)}_getPlacement(){const O=this._parent;if(O.classList.contains(b))return fe;if(O.classList.contains(L))return Kt;if(O.classList.contains(I))return ft;if(O.classList.contains(U))return Jt;const F=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return O.classList.contains(A)?F?$:z:F?te:V}_detectNavbar(){return this._element.closest(ee)!==null}_getOffset(){const{offset:O}=this._config;return typeof O=="string"?O.split(",").map(F=>Number.parseInt(F,10)):typeof O=="function"?F=>O(F,this._element):O}_getPopperConfig(){const O={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(g.default.setDataAttribute(this._menu,"popper","static"),O.modifiers=[{name:"applyStyles",enabled:!1}]),{...O,...typeof this._config.popperConfig=="function"?this._config.popperConfig(O):this._config.popperConfig}}_selectMenuItem({key:O,target:F}){const q=u.default.find(K,this._menu).filter(Y=>n.isVisible(Y));q.length&&n.getNextActiveElement(q,F,O===E,!q.includes(F)).focus()}static jQueryInterface(O){return this.each(function(){const F=re.getOrCreateInstance(this,O);if(typeof O=="string"){if(typeof F[O]>"u")throw new TypeError(`No method named "${O}"`);F[O]()}})}static clearMenus(O){if(O.button===C||O.type==="keyup"&&O.key!==w)return;const F=u.default.find(J);for(const q of F){const Y=re.getInstance(q);if(!Y||Y._config.autoClose===!1)continue;const ke=O.composedPath(),pe=ke.includes(Y._menu);if(ke.includes(Y._element)||Y._config.autoClose==="inside"&&!pe||Y._config.autoClose==="outside"&&pe||Y._menu.contains(O.target)&&(O.type==="keyup"&&O.key===w||/input|select|option|textarea|form/i.test(O.target.tagName)))continue;const ze={relatedTarget:Y._element};O.type==="click"&&(ze.clickEvent=O),Y._completeHide(ze)}}static dataApiKeydownHandler(O){const F=/input|textarea/i.test(O.target.tagName),q=O.key===f,Y=[x,E].includes(O.key);if(!Y&&!q||F&&!q)return;O.preventDefault();const ke=this.matches(j)?this:u.default.prev(this,j)[0]||u.default.next(this,j)[0]||u.default.findOne(j,O.delegateTarget.parentNode),pe=re.getOrCreateInstance(ke);if(Y){O.stopPropagation(),pe.show(),pe._selectMenuItem(O);return}pe._isShown()&&(O.stopPropagation(),pe.hide(),ke.focus())}}return d.default.on(document,D,j,re.dataApiKeydownHandler),d.default.on(document,D,B,re.dataApiKeydownHandler),d.default.on(document,p,re.clearMenus),d.default.on(document,R,re.clearMenus),d.default.on(document,p,j,function(X){X.preventDefault(),re.getOrCreateInstance(this).toggle()}),n.defineJQueryPlugin(re),re})})(ws);const Cn=document.getElementById("navbarSupportedContentToggler"),ri=document.getElementById("navbarSupportedContent");ri!=null&&(ri.addEventListener("show.bs.collapse",()=>{console.log("opening navbar content"),Cn.classList.toggle("is-active")}),ri.addEventListener("hide.bs.collapse",()=>{console.log("closing navbar content"),Cn.classList.toggle("is-active")}));let fo=document.querySelectorAll(".needs-validation");Array.prototype.slice.call(fo).forEach(function(e){e.addEventListener("submit",function(t){e.checkValidity()||(t.preventDefault(),t.stopPropagation(),e.classList.add("was-validated"))},!1)});const po={mounted(){this.el.addEventListener("closed.bs.alert",()=>{this.pushEvent("lv:clear-flash",this.el.dataset)})}};var vi={},go={get exports(){return vi},set exports(e){vi=e}},$t={},mo={get exports(){return $t},set exports(e){$t=e}};/*!
* Bootstrap scrollbar.js v5.2.3 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/var Tn;function vo(){return Tn||(Tn=1,function(e,t){(function(i,n){e.exports=n(dt(),Ei(),me())})(Z,function(i,n,r){const s=u=>u&&typeof u=="object"&&"default"in u?u:{default:u},o=s(i),a=s(n),l=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",h=".sticky-top",c="padding-right",d="margin-right";class g{constructor(){this._element=document.body}getWidth(){const y=document.documentElement.clientWidth;return Math.abs(window.innerWidth-y)}hide(){const y=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,c,v=>v+y),this._setElementAttributes(l,c,v=>v+y),this._setElementAttributes(h,d,v=>v-y)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,c),this._resetElementAttributes(l,c),this._resetElementAttributes(h,d)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(y,v,_){const S=this.getWidth(),N=f=>{if(f!==this._element&&window.innerWidth>f.clientWidth+S)return;this._saveInitialAttribute(f,v);const w=window.getComputedStyle(f).getPropertyValue(v);f.style.setProperty(v,`${_(Number.parseFloat(w))}px`)};this._applyManipulationCallback(y,N)}_saveInitialAttribute(y,v){const _=y.style.getPropertyValue(v);_&&a.default.setDataAttribute(y,v,_)}_resetElementAttributes(y,v){const _=S=>{const N=a.default.getDataAttribute(S,v);if(N===null){S.style.removeProperty(v);return}a.default.removeDataAttribute(S,v),S.style.setProperty(v,N)};this._applyManipulationCallback(y,_)}_applyManipulationCallback(y,v){if(r.isElement(y)){v(y);return}for(const _ of o.default.find(y,this._element))v(_)}}return g})}(mo)),$t}var Ft={},bo={get exports(){return Ft},set exports(e){Ft=e}};/*!
* Bootstrap backdrop.js v5.2.3 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/var Sn;function _o(){return Sn||(Sn=1,function(e,t){(function(i,n){e.exports=n(xe(),me(),wi())})(Z,function(i,n,r){const s=v=>v&&typeof v=="object"&&"default"in v?v:{default:v},o=s(i),a=s(r),l="backdrop",h="fade",c="show",d=`mousedown.bs.${l}`,g={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},u={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class y extends a.default{constructor(_){super(),this._config=this._getConfig(_),this._isAppended=!1,this._element=null}static get Default(){return g}static get DefaultType(){return u}static get NAME(){return l}show(_){if(!this._config.isVisible){n.execute(_);return}this._append();const S=this._getElement();this._config.isAnimated&&n.reflow(S),S.classList.add(c),this._emulateAnimation(()=>{n.execute(_)})}hide(_){if(!this._config.isVisible){n.execute(_);return}this._getElement().classList.remove(c),this._emulateAnimation(()=>{this.dispose(),n.execute(_)})}dispose(){this._isAppended&&(o.default.off(this._element,d),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const _=document.createElement("div");_.className=this._config.className,this._config.isAnimated&&_.classList.add(h),this._element=_}return this._element}_configAfterMerge(_){return _.rootElement=n.getElement(_.rootElement),_}_append(){if(this._isAppended)return;const _=this._getElement();this._config.rootElement.append(_),o.default.on(_,d,()=>{n.execute(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(_){n.executeAfterTransition(_,this._getElement(),this._config.isAnimated)}}return y})}(bo)),Ft}var jt={},yo={get exports(){return jt},set exports(e){jt=e}};/*!
* Bootstrap focustrap.js v5.2.3 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/var kn;function Eo(){return kn||(kn=1,function(e,t){(function(i,n){e.exports=n(xe(),dt(),wi())})(Z,function(i,n,r){const s=w=>w&&typeof w=="object"&&"default"in w?w:{default:w},o=s(i),a=s(n),l=s(r),h="focustrap",d=".bs.focustrap",g=`focusin${d}`,u=`keydown.tab${d}`,y="Tab",v="forward",_="backward",S={autofocus:!0,trapElement:null},N={autofocus:"boolean",trapElement:"element"};class f extends l.default{constructor(x){super(),this._config=this._getConfig(x),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return S}static get DefaultType(){return N}static get NAME(){return h}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),o.default.off(document,d),o.default.on(document,g,x=>this._handleFocusin(x)),o.default.on(document,u,x=>this._handleKeydown(x)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,o.default.off(document,d))}_handleFocusin(x){const{trapElement:E}=this._config;if(x.target===document||x.target===E||E.contains(x.target))return;const C=a.default.focusableChildren(E);C.length===0?E.focus():this._lastTabNavDirection===_?C[C.length-1].focus():C[0].focus()}_handleKeydown(x){x.key===y&&(this._lastTabNavDirection=x.shiftKey?_:v)}}return f})}(yo)),jt}/*!
* Bootstrap modal.js v5.2.3 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/(function(e,t){(function(i,n){e.exports=n(me(),xe(),dt(),vo(),Bt(),_o(),Eo(),Mn())})(Z,function(i,n,r,s,o,a,l,h){const c=z=>z&&typeof z=="object"&&"default"in z?z:{default:z},d=c(n),g=c(r),u=c(s),y=c(o),v=c(a),_=c(l),S="modal",f=".bs.modal",w=".data-api",x="Escape",E=`hide${f}`,C=`hidePrevented${f}`,P=`hidden${f}`,k=`show${f}`,M=`shown${f}`,H=`resize${f}`,p=`click.dismiss${f}`,D=`mousedown.dismiss${f}`,R=`keydown.dismiss${f}`,T=`click${f}${w}`,A="modal-open",b="fade",L="show",I="modal-static",U=".modal.show",j=".modal-dialog",J=".modal-body",B='[data-bs-toggle="modal"]',ee={backdrop:!0,focus:!0,keyboard:!0},W={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class K extends y.default{constructor($,V){super($,V),this._dialog=g.default.findOne(j,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new u.default,this._addEventListeners()}static get Default(){return ee}static get DefaultType(){return W}static get NAME(){return S}toggle($){return this._isShown?this.hide():this.show($)}show($){this._isShown||this._isTransitioning||d.default.trigger(this._element,k,{relatedTarget:$}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(A),this._adjustDialog(),this._backdrop.show(()=>this._showElement($)))}hide(){!this._isShown||this._isTransitioning||d.default.trigger(this._element,E).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(L),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){for(const $ of[window,this._dialog])d.default.off($,f);this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new v.default({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new _.default({trapElement:this._element})}_showElement($){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const V=g.default.findOne(J,this._dialog);V&&(V.scrollTop=0),i.reflow(this._element),this._element.classList.add(L);const te=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,d.default.trigger(this._element,M,{relatedTarget:$})};this._queueCallback(te,this._dialog,this._isAnimated())}_addEventListeners(){d.default.on(this._element,R,$=>{if($.key===x){if(this._config.keyboard){$.preventDefault(),this.hide();return}this._triggerBackdropTransition()}}),d.default.on(window,H,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),d.default.on(this._element,D,$=>{d.default.one(this._element,p,V=>{if(!(this._element!==$.target||this._element!==V.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(A),this._resetAdjustments(),this._scrollBar.reset(),d.default.trigger(this._element,P)})}_isAnimated(){return this._element.classList.contains(b)}_triggerBackdropTransition(){if(d.default.trigger(this._element,C).defaultPrevented)return;const V=this._element.scrollHeight>document.documentElement.clientHeight,te=this._element.style.overflowY;te==="hidden"||this._element.classList.contains(I)||(V||(this._element.style.overflowY="hidden"),this._element.classList.add(I),this._queueCallback(()=>{this._element.classList.remove(I),this._queueCallback(()=>{this._element.style.overflowY=te},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const $=this._element.scrollHeight>document.documentElement.clientHeight,V=this._scrollBar.getWidth(),te=V>0;if(te&&!$){const fe=i.isRTL()?"paddingLeft":"paddingRight";this._element.style[fe]=`${V}px`}if(!te&&$){const fe=i.isRTL()?"paddingRight":"paddingLeft";this._element.style[fe]=`${V}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface($,V){return this.each(function(){const te=K.getOrCreateInstance(this,$);if(typeof $=="string"){if(typeof te[$]>"u")throw new TypeError(`No method named "${$}"`);te[$](V)}})}}return d.default.on(document,T,B,function(z){const $=i.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&z.preventDefault(),d.default.one($,k,fe=>{fe.defaultPrevented||d.default.one($,P,()=>{i.isVisible(this)&&this.focus()})});const V=g.default.findOne(U);V&&K.getInstance(V).hide(),K.getOrCreateInstance($).toggle(this)}),h.enableDismissTrigger(K),i.defineJQueryPlugin(K),K})})(go);const wo=vi,Ao={mounted(){const e=new wo(this.el);e.show(),this.el.addEventListener("hidden.bs.modal",t=>{this.pushEventTo(`#${this.el.getAttribute("id")}`,"close",{}),e.dispose()}),this.handleEvent("modal-please-hide",t=>{e.hide()})},destroyed(){const e=document.querySelector(".modal-backdrop");e&&e.parentElement.removeChild(e)}},Co={mounted(){const e=new Es(this.el,{toggle:!1});this.handleEvent("toggle-template-details",({targetId:t})=>{this.el.id==t&&e.toggle()}),this.el.addEventListener("shown.bs.collapse",t=>{this.pushEvent("collapse-shown",{target_id:t.target.id})}),this.el.addEventListener("hidden.bs.collapse",t=>{this.pushEvent("collapse-hidden",{target_id:t.target.id})})}};let qt={};qt.AlertRemover=po;qt.BsModal=Ao;qt.BsCollapse=Co;let To=document.querySelector("meta[name='csrf-token']").getAttribute("content"),ar=new ls("/live",pr,{params:{_csrf_token:To},hooks:qt});bi.config({barColors:{0:"#29d"},shadowColor:"rgba(0, 0, 0, .3)"});window.addEventListener("phx:page-loading-start",e=>bi.show());window.addEventListener("phx:page-loading-stop",e=>bi.hide());ar.connect();window.liveSocket=ar;