From a616f4267c6d3cbe51fb15fcaf66bbadd0385ee1 Mon Sep 17 00:00:00 2001 From: rafaellehmkuhl Date: Tue, 28 Nov 2023 18:47:23 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20bluerobo?= =?UTF-8?q?tics/cockpit@cdd573ae59a23948c6bebd9dff737f5e8034149a=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.d7766601.js => index.d603c0b8.js | 2 +- index.html | 2 +- sw.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename index.d7766601.js => index.d603c0b8.js (99%) diff --git a/index.d7766601.js b/index.d603c0b8.js similarity index 99% rename from index.d7766601.js rename to index.d603c0b8.js index fb20bf340..b547e7d17 100644 --- a/index.d7766601.js +++ b/index.d603c0b8.js @@ -874,7 +874,7 @@ Dialogue: 0,0:0:${h}.00,0:0:${p}.00,Default,,${.7*i},0,${.05*a},,${_}`)}),n=n.co * @author RubaXa * @author owenm * @license MIT - */function xf(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),i.push.apply(i,a)}return i}function Qt(e){for(var t=1;t=0)&&(i[r]=e[r]);return i}function Nw1(e,t){if(e==null)return{};var i=Rw1(e,t),a,r;if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}var Tw1="1.15.0";function N3(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var W3=N3(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),g7=N3(/Edge/i),Ff=N3(/firefox/i),nn=N3(/safari/i)&&!N3(/chrome/i)&&!N3(/android/i),JX=N3(/iP(ad|od|hone)/i),eY=N3(/chrome/i)&&N3(/android/i),tY={capture:!1,passive:!1};function q2(e,t,i){e.addEventListener(t,i,!W3&&tY)}function z2(e,t,i){e.removeEventListener(t,i,!W3&&tY)}function ds(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function bw1(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function It(e,t,i,a){if(e){i=i||document;do{if(t!=null&&(t[0]===">"?e.parentNode===i&&ds(e,t):ds(e,t))||a&&e===i)return e;if(e===i)break}while(e=bw1(e))}return null}var Bf=/\s+/g;function a0(e,t,i){if(e&&t)if(e.classList)e.classList[i?"add":"remove"](t);else{var a=(" "+e.className+" ").replace(Bf," ").replace(" "+t+" "," ");e.className=(a+(i?" "+t:"")).replace(Bf," ")}}function u2(e,t,i){var a=e&&e.style;if(a){if(i===void 0)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(i=e.currentStyle),t===void 0?i:i[t];!(t in a)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),a[t]=i+(typeof i=="string"?"":"px")}}function n6(e,t){var i="";if(typeof e=="string")i=e;else do{var a=u2(e,"transform");a&&a!=="none"&&(i=a+" "+i)}while(!t&&(e=e.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(i)}function iY(e,t,i){if(e){var a=e.getElementsByTagName(t),r=0,n=a.length;if(i)for(;r=n:o=r<=n,!o)return a;if(a===Xt())break;a=Hi(a,!1)}return!1}function S6(e,t,i,a){for(var r=0,n=0,o=e.children;n2&&arguments[2]!==void 0?arguments[2]:{},a=i.evt,r=Nw1(i,Fw1);A7.pluginEvent.bind(h2)(e,t,Qt({dragEl:Z1,parentEl:Te,ghostEl:y2,rootEl:Ae,nextEl:ga,lastDownEl:e8,cloneEl:ve,cloneHidden:Vi,dragStarted:Ir,putSortable:r5,activeSortable:h2.active,originalEvent:a,oldIndex:q4,oldDraggableIndex:sn,newIndex:r0,newDraggableIndex:pi,hideGhostForTarget:cY,unhideGhostForTarget:dY,cloneNowHidden:function(){Vi=!0},cloneNowShown:function(){Vi=!1},dispatchSortableEvent:function(n){N5({sortable:t,name:n,originalEvent:a})}},r))};function N5(e){xw1(Qt({putSortable:r5,cloneEl:ve,targetEl:Z1,rootEl:Ae,oldIndex:q4,oldDraggableIndex:sn,newIndex:r0,newDraggableIndex:pi},e))}var Z1,Te,y2,Ae,ga,e8,ve,Vi,q4,r0,sn,pi,No,r5,Z4=!1,Cs=!1,ms=[],pa,at,Wl,Xl,Zf,Gf,Ir,F4,ln,cn=!1,To=!1,t8,p5,Yl=[],Ld=!1,us=[],P9=typeof document<"u",bo=JX,Wf=g7||W3?"cssFloat":"float",Bw1=P9&&!eY&&!JX&&"draggable"in document.createElement("div"),oY=function(){if(P9){if(W3)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),sY=function(e,t){var i=u2(e),a=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),r=S6(e,0,t),n=S6(e,1,t),o=r&&u2(r),l=n&&u2(n),c=o&&parseInt(o.marginLeft)+parseInt(o.marginRight)+Ye(r).width,m=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Ye(n).width;if(i.display==="flex")return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal";if(i.display==="grid")return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&o.float&&o.float!=="none"){var d=o.float==="left"?"left":"right";return n&&(l.clear==="both"||l.clear===d)?"vertical":"horizontal"}return r&&(o.display==="block"||o.display==="flex"||o.display==="table"||o.display==="grid"||c>=a&&i[Wf]==="none"||n&&i[Wf]==="none"&&c+m>a)?"vertical":"horizontal"},kw1=function(e,t,i){var a=i?e.left:e.top,r=i?e.right:e.bottom,n=i?e.width:e.height,o=i?t.left:t.top,l=i?t.right:t.bottom,c=i?t.width:t.height;return a===o||r===l||a+n/2===o+c/2},zw1=function(e,t){var i;return ms.some(function(a){var r=a[l0].options.emptyInsertThreshold;if(!(!r||Ru(a))){var n=Ye(a),o=e>=n.left-r&&e<=n.right+r,l=t>=n.top-r&&t<=n.bottom+r;if(o&&l)return i=a}}),i},lY=function(e){function t(r,n){return function(o,l,c,m){var d=o.options.group.name&&l.options.group.name&&o.options.group.name===l.options.group.name;if(r==null&&(n||d))return!0;if(r==null||r===!1)return!1;if(n&&r==="clone")return r;if(typeof r=="function")return t(r(o,l,c,m),n)(o,l,c,m);var u=(n?o:l).options.group.name;return r===!0||typeof r=="string"&&r===u||r.join&&r.indexOf(u)>-1}}var i={},a=e.group;(!a||Jo(a)!="object")&&(a={name:a}),i.name=a.name,i.checkPull=t(a.pull,!0),i.checkPut=t(a.put),i.revertClone=a.revertClone,e.group=i},cY=function(){!oY&&y2&&u2(y2,"display","none")},dY=function(){!oY&&y2&&u2(y2,"display","")};P9&&!eY&&document.addEventListener("click",function(e){if(Cs)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Cs=!1,!1},!0);var Va=function(e){if(Z1){e=e.touches?e.touches[0]:e;var t=zw1(e.clientX,e.clientY);if(t){var i={};for(var a in e)e.hasOwnProperty(a)&&(i[a]=e[a]);i.target=i.rootEl=t,i.preventDefault=void 0,i.stopPropagation=void 0,t[l0]._onDragOver(i)}}},Zw1=function(e){Z1&&Z1.parentNode[l0]._isOutsideThisEl(e.target)};function h2(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=O3({},t),e[l0]=this;var i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return sY(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(n,o){n.setData("Text",o.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:h2.supportPointer!==!1&&"PointerEvent"in window&&!nn,emptyInsertThreshold:5};A7.initializePlugins(this,e,i);for(var a in i)!(a in t)&&(t[a]=i[a]);lY(t);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=t.forceFallback?!1:Bw1,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?q2(e,"pointerdown",this._onTapStart):(q2(e,"mousedown",this._onTapStart),q2(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(q2(e,"dragover",this),q2(e,"dragenter",this)),ms.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),O3(this,Iw1())}h2.prototype={constructor:h2,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(F4=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,Z1):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,i=this.el,a=this.options,r=a.preventOnFilter,n=e.type,o=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,l=(o||e).target,c=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,m=a.filter;if(jw1(i),!Z1&&!(/mousedown|pointerdown/.test(n)&&e.button!==0||a.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&nn&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=It(l,a.draggable,i,!1),!(l&&l.animated)&&e8!==l)){if(q4=x0(l),sn=x0(l,a.draggable),typeof m=="function"){if(m.call(this,e,l,this)){N5({sortable:t,rootEl:c,name:"filter",targetEl:l,toEl:i,fromEl:i}),U5("filter",t,{evt:e}),r&&e.cancelable&&e.preventDefault();return}}else if(m&&(m=m.split(",").some(function(d){if(d=It(c,d.trim(),i,!1),d)return N5({sortable:t,rootEl:d,name:"filter",targetEl:l,fromEl:i,toEl:i}),U5("filter",t,{evt:e}),!0}),m)){r&&e.cancelable&&e.preventDefault();return}a.handle&&!It(c,a.handle,i,!1)||this._prepareDragStart(e,o,l)}}},_prepareDragStart:function(e,t,i){var a=this,r=a.el,n=a.options,o=r.ownerDocument,l;if(i&&!Z1&&i.parentNode===r){var c=Ye(i);if(Ae=r,Z1=i,Te=Z1.parentNode,ga=Z1.nextSibling,e8=i,No=n.group,h2.dragged=Z1,pa={target:Z1,clientX:(t||e).clientX,clientY:(t||e).clientY},Zf=pa.clientX-c.left,Gf=pa.clientY-c.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Z1.style["will-change"]="all",l=function(){if(U5("delayEnded",a,{evt:e}),h2.eventCanceled){a._onDrop();return}a._disableDelayedDragEvents(),!Ff&&a.nativeDraggable&&(Z1.draggable=!0),a._triggerDragStart(e,t),N5({sortable:a,name:"choose",originalEvent:e}),a0(Z1,n.chosenClass,!0)},n.ignore.split(",").forEach(function(m){iY(Z1,m.trim(),Kl)}),q2(o,"dragover",Va),q2(o,"mousemove",Va),q2(o,"touchmove",Va),q2(o,"mouseup",a._onDrop),q2(o,"touchend",a._onDrop),q2(o,"touchcancel",a._onDrop),Ff&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Z1.draggable=!0),U5("delayStart",this,{evt:e}),n.delay&&(!n.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(g7||W3))){if(h2.eventCanceled){this._onDrop();return}q2(o,"mouseup",a._disableDelayedDrag),q2(o,"touchend",a._disableDelayedDrag),q2(o,"touchcancel",a._disableDelayedDrag),q2(o,"mousemove",a._delayedDragTouchMoveHandler),q2(o,"touchmove",a._delayedDragTouchMoveHandler),n.supportPointer&&q2(o,"pointermove",a._delayedDragTouchMoveHandler),a._dragStartTimer=setTimeout(l,n.delay)}else l()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Z1&&Kl(Z1),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;z2(e,"mouseup",this._disableDelayedDrag),z2(e,"touchend",this._disableDelayedDrag),z2(e,"touchcancel",this._disableDelayedDrag),z2(e,"mousemove",this._delayedDragTouchMoveHandler),z2(e,"touchmove",this._delayedDragTouchMoveHandler),z2(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?q2(document,"pointermove",this._onTouchMove):t?q2(document,"touchmove",this._onTouchMove):q2(document,"mousemove",this._onTouchMove):(q2(Z1,"dragend",this),q2(Ae,"dragstart",this._onDragStart));try{document.selection?i8(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(Z4=!1,Ae&&Z1){U5("dragStarted",this,{evt:t}),this.nativeDraggable&&q2(document,"dragover",Zw1);var i=this.options;!e&&a0(Z1,i.dragClass,!1),a0(Z1,i.ghostClass,!0),h2.active=this,e&&this._appendGhost(),N5({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(at){this._lastX=at.clientX,this._lastY=at.clientY,cY();for(var e=document.elementFromPoint(at.clientX,at.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(at.clientX,at.clientY),e!==t);)t=e;if(Z1.parentNode[l0]._isOutsideThisEl(e),t)do{if(t[l0]){var i=void 0;if(i=t[l0]._onDragOver({clientX:at.clientX,clientY:at.clientY,target:e,rootEl:t}),i&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);dY()}},_onTouchMove:function(e){if(pa){var t=this.options,i=t.fallbackTolerance,a=t.fallbackOffset,r=e.touches?e.touches[0]:e,n=y2&&n6(y2,!0),o=y2&&n&&n.a,l=y2&&n&&n.d,c=bo&&p5&&zf(p5),m=(r.clientX-pa.clientX+a.x)/(o||1)+(c?c[0]-Yl[0]:0)/(o||1),d=(r.clientY-pa.clientY+a.y)/(l||1)+(c?c[1]-Yl[1]:0)/(l||1);if(!h2.active&&!Z4){if(i&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))=0&&(N5({rootEl:Te,name:"add",toEl:Te,fromEl:Ae,originalEvent:e}),N5({sortable:this,name:"remove",toEl:Te,originalEvent:e}),N5({rootEl:Te,name:"sort",toEl:Te,fromEl:Ae,originalEvent:e}),N5({sortable:this,name:"sort",toEl:Te,originalEvent:e})),r5&&r5.save()):r0!==q4&&r0>=0&&(N5({sortable:this,name:"update",toEl:Te,originalEvent:e}),N5({sortable:this,name:"sort",toEl:Te,originalEvent:e})),h2.active&&((r0==null||r0===-1)&&(r0=q4,pi=sn),N5({sortable:this,name:"end",toEl:Te,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){U5("nulling",this),Ae=Z1=Te=y2=ga=ve=e8=Vi=pa=at=Ir=r0=pi=q4=sn=F4=ln=r5=No=h2.dragged=h2.ghost=h2.clone=h2.active=null,us.forEach(function(e){e.checked=!0}),us.length=Wl=Xl=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Z1&&(this._onDragOver(e),Gw1(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,i=this.el.children,a=0,r=i.length,n=this.options;aa.right+r||e.clientX<=a.right&&e.clientY>a.bottom&&e.clientX>=a.left:e.clientX>a.right&&e.clientY>a.top||e.clientX<=a.right&&e.clientY>a.bottom+r}function Kw1(e,t,i,a,r,n,o,l){var c=a?e.clientY:e.clientX,m=a?i.height:i.width,d=a?i.top:i.left,u=a?i.bottom:i.right,h=!1;if(!o){if(l&&t8d+m*n/2:cu-t8)return-ln}else if(c>d+m*(1-r)/2&&cu-m*n/2)?c>d+m/2?1:-1:0}function qw1(e){return x0(Z1){y=f(y),l&&v.destroy(),l=new h2(y,_())};y1(()=>o,()=>{l&&Dw1(_(),(y,b)=>{l==null||l.option(y,b)})},{deep:!0});const v={option:(y,b)=>l==null?void 0:l.option(y,b),destroy:()=>{l==null||l.destroy(),l=null},save:()=>l==null?void 0:l.save(),toArray:()=>l==null?void 0:l.toArray(),closest:(...y)=>l==null?void 0:l.closest(...y)},A=()=>v==null?void 0:v.option("disabled",!0),R=()=>v==null?void 0:v.option("disabled",!1);return tP1(()=>{c&&S()}),eP1(v.destroy),K4({start:S,pause:A,resume:R},v)}const Ad=["update","start","add","remove","choose","unchoose","end","sort","filter","clone","move","change"],iP1=["onUpdate","onStart","onAdd","onRemove","animation","ghostClass","group","sort","disabled","store","handle","draggable","swapThreshold","invertSwap","invertedSwapThreshold","removeCloneOnHide","direction","chosenClass","dragClass","ignore","filter","preventOnFilter","easing","setData","dropBubble","dragoverBubble","dataIdAttr","delay","delayOnTouchOnly","touchStartThreshold","forceFallback","fallbackClass","fallbackOnBody","fallbackTolerance","fallbackOffset","supportPointer","emptyInsertThreshold","scroll","forceAutoScrollFallback","scrollSensitivity","scrollSpeed","bubbleScroll","modelValue","tag","target",...Ad.map(e=>`on${e.replace(/^\S/,t=>t.toUpperCase())}`)],_d=d2({name:"VueDraggable",model:{prop:"modelValue",event:"update:modelValue"},props:iP1,emits:["update:modelValue",...Ad],setup(e,{slots:t,emit:i,expose:a}){const r=aH1(),n=Ad.reduce((d,u)=>{const h=`on${u.replace(/^\S/,p=>p.toUpperCase())}`;return d[h]=p=>i(u,p),d},{}),o=X(()=>{const d=x2(e),u=jX(d,["modelValue"]),h=Object.entries(u).reduce((p,[H,f])=>{const _=U(f);return _!==void 0&&(p[H]=_),p},{});return K4(K4({},n),fw1(K4(K4({},r),h)))}),l=X({get:()=>e.modelValue,set:d=>i("update:modelValue",d)}),c=Q(),m=U2(mY(e.target||c,l,o));return a(m),()=>{if(t.default)return m5(e.tag||"div",{ref:c},t.default(m))}}}),aP1=async(e,t)=>{try{const i=await fetch(`http://${e}/bag/v1.0/get/${t}`);if(!await i.ok)throw new Error(await i.text());return await i.json()}catch(i){throw new Error(`Could not get bag of holdings for ${t}. ${i}`)}},uY=async e=>{try{return await aP1(e,"cockpit")}catch(t){throw new Error(`Could not get Cockpit's storage data from vehicle. ${t}`)}},rP1=async(e,t)=>(await uY(e))[t],nP1=async(e,t,i)=>{try{await fetch(`http://${e}/bag/v1.0/set/${t}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)})}catch(a){throw new Error(`Could not set bag of holdings for ${t}. ${a}`)}},oP1=async(e,t)=>{try{await nP1(e,"cockpit",t)}catch(i){throw new Error(`Could not set Cockpit's storage data on vehicle. ${i}`)}},sP1=async(e,t,i)=>{let a={};try{a=await uY(e)}catch(n){console.error(n)}const r=a;r[t]=i,await oP1(e,r)},k6=Bi("widget-manager",()=>{const e=Ne(),t=Q(!1),i=Q(!0),a=Q(.01),r=G5("cockpit-mini-widgets-profile-v4",Wy1),n=G5("cockpit-saved-profiles-v8",[]),o=G5("cockpit-current-view-index",0),l=G5("cockpit-current-profile-index",0),c=X(()=>[...El,...n.value]),m=X({get(){return d.value.views[o.value]},set(I){d.value.views[o.value]=I}}),d=X({get(){return c.value[l.value]},set(I){if(!c.value.map(c1=>c1.hash).includes(I.hash)){W2.fire({icon:"error",text:"Could not find profile.",timer:3e3});return}if(P(I)){W2.fire({icon:"error",text:"Cannot edit a default profile. Please pick another one.",timer:3e3});return}o.value=0;const j=n.value.findIndex(c1=>c1.hash===I.hash);n.value[j]=I}}),u=X(()=>{const I=d.value.views.slice();return I.splice(o.value,1),I.push(d.value.views[o.value]),I}),h=X(()=>{const I=m.value.miniWidgetContainers,W=m.value.widgets.filter(j=>j.component===ce.MiniWidgetsBar).filter(j=>j.options&&j.options.miniWidgetsContainer).map(j=>j.options.miniWidgetsContainer);return[...I,...W]});function p(I){for(const W of d.value.views)for(const j of W.widgets)if(j===I)return W;throw new Error(`No view found for widget with hash ${I.hash}`)}function H(I){const W=n.value.map(v1=>v1.name);let j=I.name,c1=0;for(;W.includes(j);)j.length>3&&j.at(-3)==="("&&j.at(-1)===")"&&!isNaN(Number(j.at(-2)))&&(c1=parseInt(j.at(-2)),j=`${j.substring(0,j.length-3)}`),j=`${j} (${c1+1})`;const f1={...I,name:j};return n.value.push(f1),f1}function f(I){const W=c.value.findIndex(j=>j.hash===I.hash);if(W===-1){W2.fire({icon:"error",text:"Could not find profile.",timer:3e3});return}l.value=W,o.value=0}function _(){n.value.splice(0,n.value.length)}const S=I=>{const W=new Blob([JSON.stringify(I)],{type:"text/plain;charset=utf-8"});Ii.exports.saveAs(W,"cockpit-widget-profile.json")},v=I=>{const W=new FileReader;W.onload=j=>{const c1=j.target.result,f1=JSON.parse(c1);if(!df(f1)){W2.fire({icon:"error",text:"Invalid profile file.",timer:3e3});return}const v1=H(f1);f(v1)},W.readAsText(I.target.files[0])},A=async()=>{const I=await rP1(e.globalAddress,"cockpit-saved-profiles-v7");if(!Array.isArray(I)||!I.every(W=>df(W))){W2.fire({icon:"error",text:"Could not import profiles from vehicle. Invalid data.",timer:3e3});return}n.value=I,W2.fire({icon:"success",text:"Cockpit profiles imported from vehicle.",timer:3e3})},R=async()=>{await sP1(e.globalAddress,"cockpit-saved-profiles-v7",n.value),W2.fire({icon:"success",text:"Cockpit profiles exported to vehicle.",timer:3e3})};function y(){d.value.views.unshift({hash:mt(),name:`${es.random()} view`,widgets:[],miniWidgetContainers:[{name:"Bottom-left container",widgets:[]},{name:"Bottom-center container",widgets:[]},{name:"Bottom-right container",widgets:[]}],showBottomBarOnBoot:!0}),o.value=0}function b(){n.value.unshift({hash:mt(),name:`${es.random()} profile`,views:[]});const I=c.value.findIndex(W=>W.hash===n.value[0].hash);l.value=I,y()}const w=I=>n.value.map(W=>W.hash).includes(I.hash),P=I=>El.map(W=>W.hash).includes(I.hash);function E(I){if(!w(I)&&!P(I)){W2.fire({icon:"error",text:"Could not find profile.",timer:3e3});return}if(P(I)){W2.fire({icon:"error",text:"Cannot delete a default profile.",timer:3e3});return}const W=d.value.hash,j=n.value.findIndex(c1=>c1.hash===I.hash);l.value=0,n.value.splice(j,1),W!==I.hash&&(l.value=c.value.findIndex(c1=>c1.hash===W))}function B(I){if(d.value.views.length===1){W2.fire({icon:"error",text:"Cannot remove last view. Please create another before deleting this one.",timer:4e3});return}const W=m.value.hash,j=d.value.views.indexOf(I);d.value.views.splice(j,1);const c1=d.value.views.findIndex(f1=>f1.hash===W);if(c1===-1||j===o.value){o.value=0;return}o.value=c1}function Y(I,W){const j=d.value.views.indexOf(I);if(W.length===0){W2.fire({icon:"error",text:"View name cannot be blank.",timer:2e3});return}d.value.views[j].name=W}const x=I=>{const W=d.value.views.indexOf(I);o.value=W},k=I=>{const W=new Blob([JSON.stringify(I)],{type:"text/plain;charset=utf-8"});Ii.exports.saveAs(W,"cockpit-widget-view.json")},Z=I=>{const W=new FileReader;W.onload=j=>{const c1=j.target.result,f1=JSON.parse(c1);if(!JT(f1)){W2.fire({icon:"error",text:"Invalid view file.",timer:3e3});return}d.value.views.unshift(f1)},W.readAsText(I.target.files[0])};function $(I,W){const j=mt();W.widgets.unshift({hash:j,name:I,component:I,position:{x:.4,y:.32},size:{width:.2,height:.36},options:{},managerVars:{timesMounted:0,configMenuOpen:!1,allowMoving:!0,lastNonMaximizedX:.4,lastNonMaximizedY:.32,lastNonMaximizedWidth:.2,lastNonMaximizedHeight:.36}})}function G(I){const W=p(I),j=W.widgets.indexOf(I);W.widgets.splice(j,1)}function r1(I){let W;if(d.value.views.forEach(f1=>{const v1=f1.miniWidgetContainers.find(w1=>w1.widgets.includes(I));v1!==void 0&&(W=v1)}),W===void 0){W2.fire({icon:"error",text:"Mini-widget container not found.",timer:3e3});return}const j=W,c1=j.widgets.indexOf(I);j.widgets.splice(c1,1)}const J=I=>{I.managerVars.configMenuOpen=!0},g1={x:0,y:0},n1={width:1,height:1},a1={x:.15,y:.15},p1={width:.7,height:.7},S1=I=>{if(!b1(I)){I.managerVars.lastNonMaximizedX=I.position.x,I.managerVars.lastNonMaximizedY=I.position.y,I.managerVars.lastNonMaximizedWidth=I.size.width,I.managerVars.lastNonMaximizedHeight=I.size.height,I.position=g1,I.size=n1;return}I.managerVars.lastNonMaximizedX===0&&(I.managerVars.lastNonMaximizedX=a1.x),I.managerVars.lastNonMaximizedY===g1.y&&(I.managerVars.lastNonMaximizedY=a1.y),I.managerVars.lastNonMaximizedWidth===n1.width&&(I.managerVars.lastNonMaximizedWidth=p1.width),I.managerVars.lastNonMaximizedHeight===n1.height&&(I.managerVars.lastNonMaximizedHeight=p1.height),I.position={x:I.managerVars.lastNonMaximizedX,y:I.managerVars.lastNonMaximizedY},I.size={width:I.managerVars.lastNonMaximizedWidth,height:I.managerVars.lastNonMaximizedHeight}};n.value.isEmpty()&&(A(),El.forEach(I=>{const W=structuredClone(I);W.name=W.name.replace("Default","User"),W.hash=mt(),n.value.push(W)}),f(n.value[0]),location.reload());const _1=I=>{d.value.views.forEach(W=>{W.widgets.forEach(j=>{j.managerVars.allowMoving=I===void 0?t.value:I})})};y1(t,()=>_1()),_1(!1);const b1=I=>Cf(I.position,g1)&&Cf(I.size,n1),m1=()=>{const I=o.value===d.value.views.length-1?0:o.value+1;x(d.value.views[I])},s1=I8(()=>m1(),10),P1=L6(Vt.GO_TO_NEXT_VIEW,s1);Se(()=>H6(P1));const E1=()=>{const I=o.value===0?d.value.views.length-1:o.value-1;x(d.value.views[I])},V1=I8(()=>E1(),10),A1=L6(Vt.GO_TO_PREVIOUS_VIEW,V1);return Se(()=>H6(A1)),d5(()=>{n.value.forEach(I=>I.views.forEach(W=>{W.showBottomBarOnBoot===void 0&&(W.showBottomBarOnBoot=!0)}))}),{editingMode:t,showGrid:i,gridInterval:a,currentProfile:d,currentView:m,viewsToShow:u,miniWidgetContainersInCurrentView:h,currentMiniWidgetsProfile:r,savedProfiles:n,allProfiles:c,isDefaultProfile:P,loadProfile:f,saveProfile:H,resetSavedProfiles:_,exportProfile:S,importProfile:v,addProfile:b,deleteProfile:E,addView:y,deleteView:B,renameView:Y,selectView:x,exportView:k,importView:Z,addWidget:$,deleteWidget:G,deleteMiniWidget:r1,openWidgetConfigMenu:J,toggleFullScreen:S1,isFullScreen:b1,importProfilesFromVehicle:A,exportProfilesToVehicle:R}}),lP1={class:"inline-block font-extrabold align-middle"},cP1=d2({__name:"ArmerButton",setup(e){const t=Ne();return(i,a)=>(d1(),R1("button",{class:"relative flex items-center justify-center w-32 p-1 rounded-md shadow-inner h-9 bg-slate-800/60",onClick:a[0]||(a[0]=r=>U(t).isArmed?U(t).disarm():U(t).arm())},[K("div",{class:r2(["absolute top-auto flex items-center px-1 rounded-[4px] shadow hover:bg-slate-400/60 transition-all w-[70%] h-[80%]",U(t).isArmed?"bg-slate-900/60 text-slate-50 justify-end left-[26%]":"justify-start bg-slate-800/60 text-slate-400 left-[4%]"])},[K("span",lP1,W1(U(t).isArmed===void 0?"...":U(t).isArmed?"Armed":"Disarmed"),1)],2)]))}}),dP1=d2({__name:"BaseCommIndicator",setup(e){const t=Ne();return(i,a)=>{const r=E5("FontAwesomeIcon"),n=C5("tooltip");return L2((d1(),R1("div",{class:r2(["relative",U(t).isVehicleOnline?"text-slate-50":"text-gray-700"])},[N(r,{icon:"fa-solid fa-arrow-right-arrow-left",size:"xl"}),U(t).isVehicleOnline?c2("",!0):(d1(),K1(r,{key:0,icon:"fa-slash",size:"xl",class:"absolute -left-1"}))],2)),[[n,U(t).isVehicleOnline?"Vehicle connected":"Vehicle disconnected"]])}}}),CP1={class:"flex items-center w-[5.5rem] h-12 text-white justify-center"},mP1=K("span",{class:"absolute text-sm text-yellow-400 -bottom-[2px] -right-[7px] mdi mdi-alert-circle"},null,-1),uP1=[mP1],hP1={class:"flex flex-col w-[4rem] select-none text-sm font-semibold leading-4 text-end"},pP1={class:"w-full"},VP1={class:"font-mono"},fP1=K("span",null," V",-1),LP1={class:"w-full"},HP1={class:"font-mono"},MP1=K("span",null," A",-1),gP1=d2({__name:"BatteryIndicator",setup(e){const t=Ne(),i=X(()=>{var n;return((n=t==null?void 0:t.powerSupply)==null?void 0:n.voltage)===void 0?NaN:Math.abs(t.powerSupply.voltage)>=100?t.powerSupply.voltage.toFixed(0):t.powerSupply.voltage.toFixed(1)}),a=X(()=>{var n;return((n=t==null?void 0:t.powerSupply)==null?void 0:n.current)===void 0?NaN:Math.abs(t.powerSupply.current)>=100?t.powerSupply.current.toFixed(0):t.powerSupply.current.toFixed(1)}),r=X(()=>"mdi-battery");return(n,o)=>{const l=C5("tooltip");return L2((d1(),R1("div",CP1,[K("span",{class:r2(["relative w-[1.5rem] mdi battery-icon",[r.value]])},uP1,2),K("div",hP1,[K("div",pP1,[K("span",VP1,W1(i.value),1),fP1]),K("div",LP1,[K("span",HP1,W1(a.value),1),MP1])])])),[[l,"Your vehicle does not provide state-of-charge. Displaying voltage and current instead."]])}}});const AP1=""+new URL("depth-icon.4ee497ce.svg",import.meta.url).href;function Kf(e){return typeof e=="function"?e():U(e)}function _P1(e){return e.flatMap(t=>{const i=Kf(t);return Array.isArray(i)?i.map(a=>Kf(a)):[i]})}function SP1(...e){return X(()=>{const t=_P1(e);return t.reduce((i,a)=>i+=a,0)/t.length})}const vP1={class:"flex items-center w-[8.25rem] h-12 p-1 text-white justify-center"},DP1=K("img",{src:AP1,class:"h-full",draggable:!1},null,-1),yP1={class:"flex flex-col items-start justify-center ml-1 min-w-[4rem] max-w-[6rem] select-none"},RP1={class:"font-mono text-xl font-semibold leading-6 w-fit"},NP1=K("span",{class:"text-xl font-semibold leading-6 w-fit"}," m",-1),TP1=K("span",{class:"w-full text-sm font-semibold leading-4 whitespace-nowrap"},"Depth",-1),bP1=d2({__name:"DepthIndicator",setup(e){const t=Ne();Oe.registerUsage(S5.depth);const i=Q(0);y1(t.altitude,()=>i.value=-t.altitude.msl);const{history:a}=tT(i,{capacity:50}),r=SP1(()=>a.value.map(o=>o.snapshot)),n=X(()=>{const o=r.value;return o<1?2:o>=1&&o<100?3:o>=1e4?5:4});return(o,l)=>(d1(),R1("div",vP1,[DP1,K("div",yP1,[K("div",null,[K("span",RP1,W1(U(r).toPrecision(n.value)),1),NP1]),TP1])]))}}),wP1=d2({__name:"JoystickCommIndicator",setup(e){const t=Q(!1);X2(()=>{$o.onJoystickUpdate(a=>{i(a)})});const i=a=>{t.value=a.size!==0};return(a,r)=>{const n=E5("FontAwesomeIcon"),o=C5("tooltip");return L2((d1(),R1("div",{class:r2(["relative",t.value?"text-slate-50":"text-gray-700"])},[N(n,{icon:"fa-solid fa-gamepad",size:"xl"}),t.value?c2("",!0):(d1(),K1(n,{key:0,icon:"fa-solid fa-slash",size:"xl",class:"absolute left-0"}))],2)),[[o,t.value?"Joystick connected":"Joystick disconnected"]])}}});var hY={exports:{}};(function(e){(function(t,i){e.exports?e.exports=i():window.ysFixWebmDuration=i()})("fix-webm-duration",function(){var t={172351395:{name:"EBML",type:"Container"},646:{name:"EBMLVersion",type:"Uint"},759:{name:"EBMLReadVersion",type:"Uint"},754:{name:"EBMLMaxIDLength",type:"Uint"},755:{name:"EBMLMaxSizeLength",type:"Uint"},642:{name:"DocType",type:"String"},647:{name:"DocTypeVersion",type:"Uint"},645:{name:"DocTypeReadVersion",type:"Uint"},108:{name:"Void",type:"Binary"},63:{name:"CRC-32",type:"Binary"},190023271:{name:"SignatureSlot",type:"Container"},16010:{name:"SignatureAlgo",type:"Uint"},16026:{name:"SignatureHash",type:"Uint"},16037:{name:"SignaturePublicKey",type:"Binary"},16053:{name:"Signature",type:"Binary"},15963:{name:"SignatureElements",type:"Container"},15995:{name:"SignatureElementList",type:"Container"},9522:{name:"SignedElement",type:"Binary"},139690087:{name:"Segment",type:"Container"},21863284:{name:"SeekHead",type:"Container"},3515:{name:"Seek",type:"Container"},5035:{name:"SeekID",type:"Binary"},5036:{name:"SeekPosition",type:"Uint"},88713574:{name:"Info",type:"Container"},13220:{name:"SegmentUID",type:"Binary"},13188:{name:"SegmentFilename",type:"String"},1882403:{name:"PrevUID",type:"Binary"},1868715:{name:"PrevFilename",type:"String"},2013475:{name:"NextUID",type:"Binary"},1999803:{name:"NextFilename",type:"String"},1092:{name:"SegmentFamily",type:"Binary"},10532:{name:"ChapterTranslate",type:"Container"},10748:{name:"ChapterTranslateEditionUID",type:"Uint"},10687:{name:"ChapterTranslateCodec",type:"Uint"},10661:{name:"ChapterTranslateID",type:"Binary"},710577:{name:"TimecodeScale",type:"Uint"},1161:{name:"Duration",type:"Float"},1121:{name:"DateUTC",type:"Date"},15273:{name:"Title",type:"String"},3456:{name:"MuxingApp",type:"String"},5953:{name:"WritingApp",type:"String"},103:{name:"Timecode",type:"Uint"},6228:{name:"SilentTracks",type:"Container"},6359:{name:"SilentTrackNumber",type:"Uint"},39:{name:"Position",type:"Uint"},43:{name:"PrevSize",type:"Uint"},35:{name:"SimpleBlock",type:"Binary"},32:{name:"BlockGroup",type:"Container"},33:{name:"Block",type:"Binary"},34:{name:"BlockVirtual",type:"Binary"},13729:{name:"BlockAdditions",type:"Container"},38:{name:"BlockMore",type:"Container"},110:{name:"BlockAddID",type:"Uint"},37:{name:"BlockAdditional",type:"Binary"},27:{name:"BlockDuration",type:"Uint"},122:{name:"ReferencePriority",type:"Uint"},123:{name:"ReferenceBlock",type:"Int"},125:{name:"ReferenceVirtual",type:"Int"},36:{name:"CodecState",type:"Binary"},13730:{name:"DiscardPadding",type:"Int"},14:{name:"Slices",type:"Container"},104:{name:"TimeSlice",type:"Container"},76:{name:"LaceNumber",type:"Uint"},77:{name:"FrameNumber",type:"Uint"},75:{name:"BlockAdditionID",type:"Uint"},78:{name:"Delay",type:"Uint"},79:{name:"SliceDuration",type:"Uint"},72:{name:"ReferenceFrame",type:"Container"},73:{name:"ReferenceOffset",type:"Uint"},74:{name:"ReferenceTimeCode",type:"Uint"},47:{name:"EncryptedBlock",type:"Binary"},106212971:{name:"Tracks",type:"Container"},46:{name:"TrackEntry",type:"Container"},87:{name:"TrackNumber",type:"Uint"},13253:{name:"TrackUID",type:"Uint"},3:{name:"TrackType",type:"Uint"},57:{name:"FlagEnabled",type:"Uint"},8:{name:"FlagDefault",type:"Uint"},5546:{name:"FlagForced",type:"Uint"},28:{name:"FlagLacing",type:"Uint"},11751:{name:"MinCache",type:"Uint"},11768:{name:"MaxCache",type:"Uint"},254851:{name:"DefaultDuration",type:"Uint"},216698:{name:"DefaultDecodedFieldDuration",type:"Uint"},209231:{name:"TrackTimecodeScale",type:"Float"},4991:{name:"TrackOffset",type:"Int"},5614:{name:"MaxBlockAdditionID",type:"Uint"},4974:{name:"Name",type:"String"},177564:{name:"Language",type:"String"},6:{name:"CodecID",type:"String"},9122:{name:"CodecPrivate",type:"Binary"},362120:{name:"CodecName",type:"String"},13382:{name:"AttachmentLink",type:"Uint"},1742487:{name:"CodecSettings",type:"String"},1785920:{name:"CodecInfoURL",type:"String"},438848:{name:"CodecDownloadURL",type:"String"},42:{name:"CodecDecodeAll",type:"Uint"},12203:{name:"TrackOverlay",type:"Uint"},5802:{name:"CodecDelay",type:"Uint"},5819:{name:"SeekPreRoll",type:"Uint"},9764:{name:"TrackTranslate",type:"Container"},9980:{name:"TrackTranslateEditionUID",type:"Uint"},9919:{name:"TrackTranslateCodec",type:"Uint"},9893:{name:"TrackTranslateTrackID",type:"Binary"},96:{name:"Video",type:"Container"},26:{name:"FlagInterlaced",type:"Uint"},5048:{name:"StereoMode",type:"Uint"},5056:{name:"AlphaMode",type:"Uint"},5049:{name:"OldStereoMode",type:"Uint"},48:{name:"PixelWidth",type:"Uint"},58:{name:"PixelHeight",type:"Uint"},5290:{name:"PixelCropBottom",type:"Uint"},5307:{name:"PixelCropTop",type:"Uint"},5324:{name:"PixelCropLeft",type:"Uint"},5341:{name:"PixelCropRight",type:"Uint"},5296:{name:"DisplayWidth",type:"Uint"},5306:{name:"DisplayHeight",type:"Uint"},5298:{name:"DisplayUnit",type:"Uint"},5299:{name:"AspectRatioType",type:"Uint"},963876:{name:"ColourSpace",type:"Binary"},1029411:{name:"GammaValue",type:"Float"},230371:{name:"FrameRate",type:"Float"},97:{name:"Audio",type:"Container"},53:{name:"SamplingFrequency",type:"Float"},14517:{name:"OutputSamplingFrequency",type:"Float"},31:{name:"Channels",type:"Uint"},15739:{name:"ChannelPositions",type:"Binary"},8804:{name:"BitDepth",type:"Uint"},98:{name:"TrackOperation",type:"Container"},99:{name:"TrackCombinePlanes",type:"Container"},100:{name:"TrackPlane",type:"Container"},101:{name:"TrackPlaneUID",type:"Uint"},102:{name:"TrackPlaneType",type:"Uint"},105:{name:"TrackJoinBlocks",type:"Container"},109:{name:"TrackJoinUID",type:"Uint"},64:{name:"TrickTrackUID",type:"Uint"},65:{name:"TrickTrackSegmentUID",type:"Binary"},70:{name:"TrickTrackFlag",type:"Uint"},71:{name:"TrickMasterTrackUID",type:"Uint"},68:{name:"TrickMasterTrackSegmentUID",type:"Binary"},11648:{name:"ContentEncodings",type:"Container"},8768:{name:"ContentEncoding",type:"Container"},4145:{name:"ContentEncodingOrder",type:"Uint"},4146:{name:"ContentEncodingScope",type:"Uint"},4147:{name:"ContentEncodingType",type:"Uint"},4148:{name:"ContentCompression",type:"Container"},596:{name:"ContentCompAlgo",type:"Uint"},597:{name:"ContentCompSettings",type:"Binary"},4149:{name:"ContentEncryption",type:"Container"},2017:{name:"ContentEncAlgo",type:"Uint"},2018:{name:"ContentEncKeyID",type:"Binary"},2019:{name:"ContentSignature",type:"Binary"},2020:{name:"ContentSigKeyID",type:"Binary"},2021:{name:"ContentSigAlgo",type:"Uint"},2022:{name:"ContentSigHashAlgo",type:"Uint"},206814059:{name:"Cues",type:"Container"},59:{name:"CuePoint",type:"Container"},51:{name:"CueTime",type:"Uint"},55:{name:"CueTrackPositions",type:"Container"},119:{name:"CueTrack",type:"Uint"},113:{name:"CueClusterPosition",type:"Uint"},112:{name:"CueRelativePosition",type:"Uint"},50:{name:"CueDuration",type:"Uint"},4984:{name:"CueBlockNumber",type:"Uint"},106:{name:"CueCodecState",type:"Uint"},91:{name:"CueReference",type:"Container"},22:{name:"CueRefTime",type:"Uint"},23:{name:"CueRefCluster",type:"Uint"},4959:{name:"CueRefNumber",type:"Uint"},107:{name:"CueRefCodecState",type:"Uint"},155296873:{name:"Attachments",type:"Container"},8615:{name:"AttachedFile",type:"Container"},1662:{name:"FileDescription",type:"String"},1646:{name:"FileName",type:"String"},1632:{name:"FileMimeType",type:"String"},1628:{name:"FileData",type:"Binary"},1710:{name:"FileUID",type:"Uint"},1653:{name:"FileReferral",type:"Binary"},1633:{name:"FileUsedStartTime",type:"Uint"},1634:{name:"FileUsedEndTime",type:"Uint"},4433776:{name:"Chapters",type:"Container"},1465:{name:"EditionEntry",type:"Container"},1468:{name:"EditionUID",type:"Uint"},1469:{name:"EditionFlagHidden",type:"Uint"},1499:{name:"EditionFlagDefault",type:"Uint"},1501:{name:"EditionFlagOrdered",type:"Uint"},54:{name:"ChapterAtom",type:"Container"},13252:{name:"ChapterUID",type:"Uint"},5716:{name:"ChapterStringUID",type:"String"},17:{name:"ChapterTimeStart",type:"Uint"},18:{name:"ChapterTimeEnd",type:"Uint"},24:{name:"ChapterFlagHidden",type:"Uint"},1432:{name:"ChapterFlagEnabled",type:"Uint"},11879:{name:"ChapterSegmentUID",type:"Binary"},11964:{name:"ChapterSegmentEditionUID",type:"Uint"},9155:{name:"ChapterPhysicalEquiv",type:"Uint"},15:{name:"ChapterTrack",type:"Container"},9:{name:"ChapterTrackNumber",type:"Uint"},0:{name:"ChapterDisplay",type:"Container"},5:{name:"ChapString",type:"String"},892:{name:"ChapLanguage",type:"String"},894:{name:"ChapCountry",type:"String"},10564:{name:"ChapProcess",type:"Container"},10581:{name:"ChapProcessCodecID",type:"Uint"},1293:{name:"ChapProcessPrivate",type:"Binary"},10513:{name:"ChapProcessCommand",type:"Container"},10530:{name:"ChapProcessTime",type:"Uint"},10547:{name:"ChapProcessData",type:"Binary"},39109479:{name:"Tags",type:"Container"},13171:{name:"Tag",type:"Container"},9152:{name:"Targets",type:"Container"},10442:{name:"TargetTypeValue",type:"Uint"},9162:{name:"TargetType",type:"String"},9157:{name:"TagTrackUID",type:"Uint"},9161:{name:"TagEditionUID",type:"Uint"},9156:{name:"TagChapterUID",type:"Uint"},9158:{name:"TagAttachmentUID",type:"Uint"},10184:{name:"SimpleTag",type:"Container"},1443:{name:"TagName",type:"String"},1146:{name:"TagLanguage",type:"String"},1156:{name:"TagDefault",type:"Uint"},1159:{name:"TagString",type:"String"},1157:{name:"TagBinary",type:"Binary"}};function i(d,u){d.prototype=Object.create(u.prototype),d.prototype.constructor=d}function a(d,u){this.name=d||"Unknown",this.type=u||"Unknown"}a.prototype.updateBySource=function(){},a.prototype.setSource=function(d){this.source=d,this.updateBySource()},a.prototype.updateByData=function(){},a.prototype.setData=function(d){this.data=d,this.updateByData()};function r(d,u){a.call(this,d,u||"Uint")}i(r,a);function n(d){return d.length%2===1?"0"+d:d}r.prototype.updateBySource=function(){this.data="";for(var d=0;d=p&&h<8;h++,p*=128);if(!u)for(var H=p+d,f=h-1;f>=0;f--){var _=H%256;this.source[this.offset+f]=_,H=(H-_)/256}this.offset+=h},l.prototype.writeSections=function(d){this.offset=0;for(var u=0;u=i&&parseInt(a[i],10)}function n4(e,t,i){if(!e.RTCPeerConnection)return;const a=e.RTCPeerConnection.prototype,r=a.addEventListener;a.addEventListener=function(o,l){if(o!==t)return r.apply(this,arguments);const c=m=>{const d=i(m);d&&(l.handleEvent?l.handleEvent(d):l(d))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(l,c),r.apply(this,[o,c])};const n=a.removeEventListener;a.removeEventListener=function(o,l){if(o!==t||!this._eventMap||!this._eventMap[t])return n.apply(this,arguments);if(!this._eventMap[t].has(l))return n.apply(this,arguments);const c=this._eventMap[t].get(l);return this._eventMap[t].delete(l),this._eventMap[t].size===0&&delete this._eventMap[t],Object.keys(this._eventMap).length===0&&delete this._eventMap,n.apply(this,[o,c])},Object.defineProperty(a,"on"+t,{get(){return this["_on"+t]},set(o){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),o&&this.addEventListener(t,this["_on"+t]=o)},enumerable:!0,configurable:!0})}function EP1(e){return typeof e!="boolean"?new Error("Argument type: "+typeof e+". Please use a boolean."):(pY=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function IP1(e){return typeof e!="boolean"?new Error("Argument type: "+typeof e+". Please use a boolean."):(VY=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function fY(){if(typeof window=="object"){if(pY)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function bu(e,t){!VY||console.warn(e+" is deprecated, please use "+t+" instead.")}function OP1(e){const t={browser:null,version:null};if(typeof e>"u"||!e.navigator||!e.navigator.userAgent)return t.browser="Not a browser.",t;const{navigator:i}=e;if(i.mozGetUserMedia)t.browser="firefox",t.version=r8(i.userAgent,/Firefox\/(\d+)\./,1);else if(i.webkitGetUserMedia||e.isSecureContext===!1&&e.webkitRTCPeerConnection)t.browser="chrome",t.version=r8(i.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(e.RTCPeerConnection&&i.userAgent.match(/AppleWebKit\/(\d+)\./))t.browser="safari",t.version=r8(i.userAgent,/AppleWebKit\/(\d+)\./,1),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype;else return t.browser="Not a supported browser.",t;return t}function qf(e){return Object.prototype.toString.call(e)==="[object Object]"}function LY(e){return qf(e)?Object.keys(e).reduce(function(t,i){const a=qf(e[i]),r=a?LY(e[i]):e[i],n=a&&!Object.keys(r).length;return r===void 0||n?t:Object.assign(t,{[i]:r})},{}):e}function Sd(e,t,i){!t||i.has(t.id)||(i.set(t.id,t),Object.keys(t).forEach(a=>{a.endsWith("Id")?Sd(e,e.get(t[a]),i):a.endsWith("Ids")&&t[a].forEach(r=>{Sd(e,e.get(r),i)})}))}function $f(e,t,i){const a=i?"outbound-rtp":"inbound-rtp",r=new Map;if(t===null)return r;const n=[];return e.forEach(o=>{o.type==="track"&&o.trackIdentifier===t.id&&n.push(o)}),n.forEach(o=>{e.forEach(l=>{l.type===a&&l.trackId===o.id&&Sd(e,l,r)})}),r}const jf=fY;function HY(e,t){const i=e&&e.navigator;if(!i.mediaDevices)return;const a=function(l){if(typeof l!="object"||l.mandatory||l.optional)return l;const c={};return Object.keys(l).forEach(m=>{if(m==="require"||m==="advanced"||m==="mediaSource")return;const d=typeof l[m]=="object"?l[m]:{ideal:l[m]};d.exact!==void 0&&typeof d.exact=="number"&&(d.min=d.max=d.exact);const u=function(h,p){return h?h+p.charAt(0).toUpperCase()+p.slice(1):p==="deviceId"?"sourceId":p};if(d.ideal!==void 0){c.optional=c.optional||[];let h={};typeof d.ideal=="number"?(h[u("min",m)]=d.ideal,c.optional.push(h),h={},h[u("max",m)]=d.ideal,c.optional.push(h)):(h[u("",m)]=d.ideal,c.optional.push(h))}d.exact!==void 0&&typeof d.exact!="number"?(c.mandatory=c.mandatory||{},c.mandatory[u("",m)]=d.exact):["min","max"].forEach(h=>{d[h]!==void 0&&(c.mandatory=c.mandatory||{},c.mandatory[u(h,m)]=d[h])})}),l.advanced&&(c.optional=(c.optional||[]).concat(l.advanced)),c},r=function(l,c){if(t.version>=61)return c(l);if(l=JSON.parse(JSON.stringify(l)),l&&typeof l.audio=="object"){const m=function(d,u,h){u in d&&!(h in d)&&(d[h]=d[u],delete d[u])};l=JSON.parse(JSON.stringify(l)),m(l.audio,"autoGainControl","googAutoGainControl"),m(l.audio,"noiseSuppression","googNoiseSuppression"),l.audio=a(l.audio)}if(l&&typeof l.video=="object"){let m=l.video.facingMode;m=m&&(typeof m=="object"?m:{ideal:m});const d=t.version<66;if(m&&(m.exact==="user"||m.exact==="environment"||m.ideal==="user"||m.ideal==="environment")&&!(i.mediaDevices.getSupportedConstraints&&i.mediaDevices.getSupportedConstraints().facingMode&&!d)){delete l.video.facingMode;let u;if(m.exact==="environment"||m.ideal==="environment"?u=["back","rear"]:(m.exact==="user"||m.ideal==="user")&&(u=["front"]),u)return i.mediaDevices.enumerateDevices().then(h=>{h=h.filter(H=>H.kind==="videoinput");let p=h.find(H=>u.some(f=>H.label.toLowerCase().includes(f)));return!p&&h.length&&u.includes("back")&&(p=h[h.length-1]),p&&(l.video.deviceId=m.exact?{exact:p.deviceId}:{ideal:p.deviceId}),l.video=a(l.video),jf("chrome: "+JSON.stringify(l)),c(l)})}l.video=a(l.video)}return jf("chrome: "+JSON.stringify(l)),c(l)},n=function(l){return t.version>=64?l:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[l.name]||l.name,message:l.message,constraint:l.constraint||l.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}},o=function(l,c,m){r(l,d=>{i.webkitGetUserMedia(d,c,u=>{m&&m(n(u))})})};if(i.getUserMedia=o.bind(i),i.mediaDevices.getUserMedia){const l=i.mediaDevices.getUserMedia.bind(i.mediaDevices);i.mediaDevices.getUserMedia=function(c){return r(c,m=>l(m).then(d=>{if(m.audio&&!d.getAudioTracks().length||m.video&&!d.getVideoTracks().length)throw d.getTracks().forEach(u=>{u.stop()}),new DOMException("","NotFoundError");return d},d=>Promise.reject(n(d))))}}}function UP1(e,t){if(!(e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices)&&!!e.navigator.mediaDevices){if(typeof t!="function"){console.error("shimGetDisplayMedia: getSourceId argument is not a function");return}e.navigator.mediaDevices.getDisplayMedia=function(a){return t(a).then(r=>{const n=a.video&&a.video.width,o=a.video&&a.video.height,l=a.video&&a.video.frameRate;return a.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:r,maxFrameRate:l||3}},n&&(a.video.mandatory.maxWidth=n),o&&(a.video.mandatory.maxHeight=o),e.navigator.mediaDevices.getUserMedia(a)})}}}function MY(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function gY(e){if(typeof e=="object"&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(i){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=i)},enumerable:!0,configurable:!0});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=a=>{a.stream.addEventListener("addtrack",r=>{let n;e.RTCPeerConnection.prototype.getReceivers?n=this.getReceivers().find(l=>l.track&&l.track.id===r.track.id):n={track:r.track};const o=new Event("track");o.track=r.track,o.receiver=n,o.transceiver={receiver:n},o.streams=[a.stream],this.dispatchEvent(o)}),a.stream.getTracks().forEach(r=>{let n;e.RTCPeerConnection.prototype.getReceivers?n=this.getReceivers().find(l=>l.track&&l.track.id===r.id):n={track:r};const o=new Event("track");o.track=r,o.receiver=n,o.transceiver={receiver:n},o.streams=[a.stream],this.dispatchEvent(o)})},this.addEventListener("addstream",this._ontrackpoly)),t.apply(this,arguments)}}else n4(e,"track",t=>(t.transceiver||Object.defineProperty(t,"transceiver",{value:{receiver:t.receiver}}),t))}function AY(e){if(typeof e=="object"&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){const t=function(r,n){return{track:n,get dtmf(){return this._dtmf===void 0&&(n.kind==="audio"?this._dtmf=r.createDTMFSender(n):this._dtmf=null),this._dtmf},_pc:r}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};const r=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(l,c){let m=r.apply(this,arguments);return m||(m=t(this,l),this._senders.push(m)),m};const n=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(l){n.apply(this,arguments);const c=this._senders.indexOf(l);c!==-1&&this._senders.splice(c,1)}}const i=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(n){this._senders=this._senders||[],i.apply(this,[n]),n.getTracks().forEach(o=>{this._senders.push(t(this,o))})};const a=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(n){this._senders=this._senders||[],a.apply(this,[n]),n.getTracks().forEach(o=>{const l=this._senders.find(c=>c.track===o);l&&this._senders.splice(this._senders.indexOf(l),1)})}}else if(typeof e=="object"&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){const a=t.apply(this,[]);return a.forEach(r=>r._pc=this),a},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return this._dtmf===void 0&&(this.track.kind==="audio"?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function _Y(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[a,r,n]=arguments;if(arguments.length>0&&typeof a=="function")return t.apply(this,arguments);if(t.length===0&&(arguments.length===0||typeof a!="function"))return t.apply(this,[]);const o=function(c){const m={};return c.result().forEach(u=>{const h={id:u.id,timestamp:u.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[u.type]||u.type};u.names().forEach(p=>{h[p]=u.stat(p)}),m[h.id]=h}),m},l=function(c){return new Map(Object.keys(c).map(m=>[m,c[m]]))};if(arguments.length>=2){const c=function(m){r(l(o(m)))};return t.apply(this,[c,a])}return new Promise((c,m)=>{t.apply(this,[function(d){c(l(o(d)))},m])}).then(r,n)}}function SY(e){if(!(typeof e=="object"&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!("getStats"in e.RTCRtpSender.prototype)){const i=e.RTCPeerConnection.prototype.getSenders;i&&(e.RTCPeerConnection.prototype.getSenders=function(){const n=i.apply(this,[]);return n.forEach(o=>o._pc=this),n});const a=e.RTCPeerConnection.prototype.addTrack;a&&(e.RTCPeerConnection.prototype.addTrack=function(){const n=a.apply(this,arguments);return n._pc=this,n}),e.RTCRtpSender.prototype.getStats=function(){const n=this;return this._pc.getStats().then(o=>$f(o,n.track,!0))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){const i=e.RTCPeerConnection.prototype.getReceivers;i&&(e.RTCPeerConnection.prototype.getReceivers=function(){const r=i.apply(this,[]);return r.forEach(n=>n._pc=this),r}),n4(e,"track",a=>(a.receiver._pc=a.srcElement,a)),e.RTCRtpReceiver.prototype.getStats=function(){const r=this;return this._pc.getStats().then(n=>$f(n,r.track,!1))}}if(!("getStats"in e.RTCRtpSender.prototype&&"getStats"in e.RTCRtpReceiver.prototype))return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){const a=arguments[0];let r,n,o;return this.getSenders().forEach(l=>{l.track===a&&(r?o=!0:r=l)}),this.getReceivers().forEach(l=>(l.track===a&&(n?o=!0:n=l),l.track===a)),o||r&&n?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):r?r.getStats():n?n.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return t.apply(this,arguments)}}function vY(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(o=>this._shimmedLocalStreams[o][0])};const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(o,l){if(!l)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const c=t.apply(this,arguments);return this._shimmedLocalStreams[l.id]?this._shimmedLocalStreams[l.id].indexOf(c)===-1&&this._shimmedLocalStreams[l.id].push(c):this._shimmedLocalStreams[l.id]=[l,c],c};const i=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(o){this._shimmedLocalStreams=this._shimmedLocalStreams||{},o.getTracks().forEach(m=>{if(this.getSenders().find(u=>u.track===m))throw new DOMException("Track already exists.","InvalidAccessError")});const l=this.getSenders();i.apply(this,arguments);const c=this.getSenders().filter(m=>l.indexOf(m)===-1);this._shimmedLocalStreams[o.id]=[o].concat(c)};const a=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(o){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[o.id],a.apply(this,arguments)};const r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(o){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},o&&Object.keys(this._shimmedLocalStreams).forEach(l=>{const c=this._shimmedLocalStreams[l].indexOf(o);c!==-1&&this._shimmedLocalStreams[l].splice(c,1),this._shimmedLocalStreams[l].length===1&&delete this._shimmedLocalStreams[l]}),r.apply(this,arguments)}}function DY(e,t){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return vY(e);const i=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){const d=i.apply(this);return this._reverseStreams=this._reverseStreams||{},d.map(u=>this._reverseStreams[u.id])};const a=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(d){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},d.getTracks().forEach(u=>{if(this.getSenders().find(p=>p.track===u))throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[d.id]){const u=new e.MediaStream(d.getTracks());this._streams[d.id]=u,this._reverseStreams[u.id]=d,d=u}a.apply(this,[d])};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(d){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},r.apply(this,[this._streams[d.id]||d]),delete this._reverseStreams[this._streams[d.id]?this._streams[d.id].id:d.id],delete this._streams[d.id]},e.RTCPeerConnection.prototype.addTrack=function(d,u){if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const h=[].slice.call(arguments,1);if(h.length!==1||!h[0].getTracks().find(f=>f===d))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find(f=>f.track===d))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const H=this._streams[u.id];if(H)H.addTrack(d),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{const f=new e.MediaStream([d]);this._streams[u.id]=f,this._reverseStreams[f.id]=u,this.addStream(f)}return this.getSenders().find(f=>f.track===d)};function n(m,d){let u=d.sdp;return Object.keys(m._reverseStreams||[]).forEach(h=>{const p=m._reverseStreams[h],H=m._streams[p.id];u=u.replace(new RegExp(H.id,"g"),p.id)}),new RTCSessionDescription({type:d.type,sdp:u})}function o(m,d){let u=d.sdp;return Object.keys(m._reverseStreams||[]).forEach(h=>{const p=m._reverseStreams[h],H=m._streams[p.id];u=u.replace(new RegExp(p.id,"g"),H.id)}),new RTCSessionDescription({type:d.type,sdp:u})}["createOffer","createAnswer"].forEach(function(m){const d=e.RTCPeerConnection.prototype[m],u={[m](){const h=arguments;return arguments.length&&typeof arguments[0]=="function"?d.apply(this,[H=>{const f=n(this,H);h[0].apply(null,[f])},H=>{h[1]&&h[1].apply(null,H)},arguments[2]]):d.apply(this,arguments).then(H=>n(this,H))}};e.RTCPeerConnection.prototype[m]=u[m]});const l=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return!arguments.length||!arguments[0].type?l.apply(this,arguments):(arguments[0]=o(this,arguments[0]),l.apply(this,arguments))};const c=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get(){const m=c.get.apply(this);return m.type===""?m:n(this,m)}}),e.RTCPeerConnection.prototype.removeTrack=function(d){if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!d._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(d._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");this._streams=this._streams||{};let h;Object.keys(this._streams).forEach(p=>{this._streams[p].getTracks().find(f=>d.track===f)&&(h=this._streams[p])}),h&&(h.getTracks().length===1?this.removeStream(this._reverseStreams[h.id]):h.removeTrack(d.track),this.dispatchEvent(new Event("negotiationneeded")))}}function vd(e,t){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),!!e.RTCPeerConnection&&t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(i){const a=e.RTCPeerConnection.prototype[i],r={[i](){return arguments[0]=new(i==="addIceCandidate"?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),a.apply(this,arguments)}};e.RTCPeerConnection.prototype[i]=r[i]})}function yY(e,t){n4(e,"negotiationneeded",i=>{const a=i.target;if(!((t.version<72||a.getConfiguration&&a.getConfiguration().sdpSemantics==="plan-b")&&a.signalingState!=="stable"))return i})}const Qf=Object.freeze(Object.defineProperty({__proto__:null,shimMediaStream:MY,shimOnTrack:gY,shimGetSendersWithDtmf:AY,shimGetStats:_Y,shimSenderReceiverGetStats:SY,shimAddTrackRemoveTrackWithNative:vY,shimAddTrackRemoveTrack:DY,shimPeerConnection:vd,fixNegotiationNeeded:yY,shimGetUserMedia:HY,shimGetDisplayMedia:UP1},Symbol.toStringTag,{value:"Module"}));function RY(e,t){const i=e&&e.navigator,a=e&&e.MediaStreamTrack;if(i.getUserMedia=function(r,n,o){bu("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),i.mediaDevices.getUserMedia(r).then(n,o)},!(t.version>55&&"autoGainControl"in i.mediaDevices.getSupportedConstraints())){const r=function(o,l,c){l in o&&!(c in o)&&(o[c]=o[l],delete o[l])},n=i.mediaDevices.getUserMedia.bind(i.mediaDevices);if(i.mediaDevices.getUserMedia=function(o){return typeof o=="object"&&typeof o.audio=="object"&&(o=JSON.parse(JSON.stringify(o)),r(o.audio,"autoGainControl","mozAutoGainControl"),r(o.audio,"noiseSuppression","mozNoiseSuppression")),n(o)},a&&a.prototype.getSettings){const o=a.prototype.getSettings;a.prototype.getSettings=function(){const l=o.apply(this,arguments);return r(l,"mozAutoGainControl","autoGainControl"),r(l,"mozNoiseSuppression","noiseSuppression"),l}}if(a&&a.prototype.applyConstraints){const o=a.prototype.applyConstraints;a.prototype.applyConstraints=function(l){return this.kind==="audio"&&typeof l=="object"&&(l=JSON.parse(JSON.stringify(l)),r(l,"autoGainControl","mozAutoGainControl"),r(l,"noiseSuppression","mozNoiseSuppression")),o.apply(this,[l])}}}}function xP1(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||!e.navigator.mediaDevices||(e.navigator.mediaDevices.getDisplayMedia=function(a){if(!(a&&a.video)){const r=new DOMException("getDisplayMedia without video constraints is undefined");return r.name="NotFoundError",r.code=8,Promise.reject(r)}return a.video===!0?a.video={mediaSource:t}:a.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(a)})}function NY(e){typeof e=="object"&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function Dd(e,t){if(typeof e!="object"||!(e.RTCPeerConnection||e.mozRTCPeerConnection))return;!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(r){const n=e.RTCPeerConnection.prototype[r],o={[r](){return arguments[0]=new(r==="addIceCandidate"?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[r]=o[r]});const i={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},a=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[n,o,l]=arguments;return a.apply(this,[n||null]).then(c=>{if(t.version<53&&!o)try{c.forEach(m=>{m.type=i[m.type]||m.type})}catch(m){if(m.name!=="TypeError")throw m;c.forEach((d,u)=>{c.set(u,Object.assign({},d,{type:i[d.type]||d.type}))})}return c}).then(o,l)}}function TY(e){if(!(typeof e=="object"&&e.RTCPeerConnection&&e.RTCRtpSender)||e.RTCRtpSender&&"getStats"in e.RTCRtpSender.prototype)return;const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const r=t.apply(this,[]);return r.forEach(n=>n._pc=this),r});const i=e.RTCPeerConnection.prototype.addTrack;i&&(e.RTCPeerConnection.prototype.addTrack=function(){const r=i.apply(this,arguments);return r._pc=this,r}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function bY(e){if(!(typeof e=="object"&&e.RTCPeerConnection&&e.RTCRtpSender)||e.RTCRtpSender&&"getStats"in e.RTCRtpReceiver.prototype)return;const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const a=t.apply(this,[]);return a.forEach(r=>r._pc=this),a}),n4(e,"track",i=>(i.receiver._pc=i.srcElement,i)),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function wY(e){!e.RTCPeerConnection||"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(i){bu("removeStream","removeTrack"),this.getSenders().forEach(a=>{a.track&&i.getTracks().includes(a.track)&&this.removeTrack(a)})})}function PY(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function EY(e){if(!(typeof e=="object"&&e.RTCPeerConnection))return;const t=e.RTCPeerConnection.prototype.addTransceiver;t&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let a=arguments[1]&&arguments[1].sendEncodings;a===void 0&&(a=[]),a=[...a];const r=a.length>0;r&&a.forEach(o=>{if("rid"in o&&!/^[a-z0-9]{0,16}$/i.test(o.rid))throw new TypeError("Invalid RID value provided.");if("scaleResolutionDownBy"in o&&!(parseFloat(o.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in o&&!(parseFloat(o.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});const n=t.apply(this,arguments);if(r){const{sender:o}=n,l=o.getParameters();(!("encodings"in l)||l.encodings.length===1&&Object.keys(l.encodings[0]).length===0)&&(l.encodings=a,o.sendEncodings=a,this.setParametersPromises.push(o.setParameters(l).then(()=>{delete o.sendEncodings}).catch(()=>{delete o.sendEncodings})))}return n})}function IY(e){if(!(typeof e=="object"&&e.RTCRtpSender))return;const t=e.RTCRtpSender.prototype.getParameters;t&&(e.RTCRtpSender.prototype.getParameters=function(){const a=t.apply(this,arguments);return"encodings"in a||(a.encodings=[].concat(this.sendEncodings||[{}])),a})}function OY(e){if(!(typeof e=="object"&&e.RTCPeerConnection))return;const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}function UY(e){if(!(typeof e=="object"&&e.RTCPeerConnection))return;const t=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}const Jf=Object.freeze(Object.defineProperty({__proto__:null,shimOnTrack:NY,shimPeerConnection:Dd,shimSenderGetStats:TY,shimReceiverGetStats:bY,shimRemoveStream:wY,shimRTCDataChannel:PY,shimAddTransceiver:EY,shimGetParameters:IY,shimCreateOffer:OY,shimCreateAnswer:UY,shimGetUserMedia:RY,shimGetDisplayMedia:xP1},Symbol.toStringTag,{value:"Module"}));function xY(e){if(!(typeof e!="object"||!e.RTCPeerConnection)){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(a){this._localStreams||(this._localStreams=[]),this._localStreams.includes(a)||this._localStreams.push(a),a.getAudioTracks().forEach(r=>t.call(this,r,a)),a.getVideoTracks().forEach(r=>t.call(this,r,a))},e.RTCPeerConnection.prototype.addTrack=function(a,...r){return r&&r.forEach(n=>{this._localStreams?this._localStreams.includes(n)||this._localStreams.push(n):this._localStreams=[n]}),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(i){this._localStreams||(this._localStreams=[]);const a=this._localStreams.indexOf(i);if(a===-1)return;this._localStreams.splice(a,1);const r=i.getTracks();this.getSenders().forEach(n=>{r.includes(n.track)&&this.removeTrack(n)})})}}function FY(e){if(!(typeof e!="object"||!e.RTCPeerConnection)&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(i){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=i),this.addEventListener("track",this._onaddstreampoly=a=>{a.streams.forEach(r=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(r))return;this._remoteStreams.push(r);const n=new Event("addstream");n.stream=r,this.dispatchEvent(n)})})}});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){const a=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(r){r.streams.forEach(n=>{if(a._remoteStreams||(a._remoteStreams=[]),a._remoteStreams.indexOf(n)>=0)return;a._remoteStreams.push(n);const o=new Event("addstream");o.stream=n,a.dispatchEvent(o)})}),t.apply(a,arguments)}}}function BY(e){if(typeof e!="object"||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype,i=t.createOffer,a=t.createAnswer,r=t.setLocalDescription,n=t.setRemoteDescription,o=t.addIceCandidate;t.createOffer=function(m,d){const u=arguments.length>=2?arguments[2]:arguments[0],h=i.apply(this,[u]);return d?(h.then(m,d),Promise.resolve()):h},t.createAnswer=function(m,d){const u=arguments.length>=2?arguments[2]:arguments[0],h=a.apply(this,[u]);return d?(h.then(m,d),Promise.resolve()):h};let l=function(c,m,d){const u=r.apply(this,[c]);return d?(u.then(m,d),Promise.resolve()):u};t.setLocalDescription=l,l=function(c,m,d){const u=n.apply(this,[c]);return d?(u.then(m,d),Promise.resolve()):u},t.setRemoteDescription=l,l=function(c,m,d){const u=o.apply(this,[c]);return d?(u.then(m,d),Promise.resolve()):u},t.addIceCandidate=l}function kY(e){const t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){const i=t.mediaDevices,a=i.getUserMedia.bind(i);t.mediaDevices.getUserMedia=r=>a(zY(r))}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(a,r,n){t.mediaDevices.getUserMedia(a).then(r,n)}.bind(t))}function zY(e){return e&&e.video!==void 0?Object.assign({},e,{video:LY(e.video)}):e}function ZY(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection;e.RTCPeerConnection=function(a,r){if(a&&a.iceServers){const n=[];for(let o=0;oo.receiver.track.kind==="audio");a.offerToReceiveAudio===!1&&r?r.direction==="sendrecv"?r.setDirection?r.setDirection("sendonly"):r.direction="sendonly":r.direction==="recvonly"&&(r.setDirection?r.setDirection("inactive"):r.direction="inactive"):a.offerToReceiveAudio===!0&&!r&&this.addTransceiver("audio",{direction:"recvonly"}),typeof a.offerToReceiveVideo<"u"&&(a.offerToReceiveVideo=!!a.offerToReceiveVideo);const n=this.getTransceivers().find(o=>o.receiver.track.kind==="video");a.offerToReceiveVideo===!1&&n?n.direction==="sendrecv"?n.setDirection?n.setDirection("sendonly"):n.direction="sendonly":n.direction==="recvonly"&&(n.setDirection?n.setDirection("inactive"):n.direction="inactive"):a.offerToReceiveVideo===!0&&!n&&this.addTransceiver("video",{direction:"recvonly"})}return t.apply(this,arguments)}}function XY(e){typeof e!="object"||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}const eL=Object.freeze(Object.defineProperty({__proto__:null,shimLocalStreamsAPI:xY,shimRemoteStreamsAPI:FY,shimCallbacksAPI:BY,shimGetUserMedia:kY,shimConstraints:zY,shimRTCIceServerUrls:ZY,shimTrackEventTransceiver:GY,shimCreateOfferLegacy:WY,shimAudioContext:XY},Symbol.toStringTag,{value:"Module"}));var wu={exports:{}};(function(e){const t={};t.generateIdentifier=function(){return Math.random().toString(36).substring(2,12)},t.localCName=t.generateIdentifier(),t.splitLines=function(i){return i.trim().split(` + */function xf(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),i.push.apply(i,a)}return i}function Qt(e){for(var t=1;t=0)&&(i[r]=e[r]);return i}function Nw1(e,t){if(e==null)return{};var i=Rw1(e,t),a,r;if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}var Tw1="1.15.0";function N3(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var W3=N3(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),g7=N3(/Edge/i),Ff=N3(/firefox/i),nn=N3(/safari/i)&&!N3(/chrome/i)&&!N3(/android/i),JX=N3(/iP(ad|od|hone)/i),eY=N3(/chrome/i)&&N3(/android/i),tY={capture:!1,passive:!1};function q2(e,t,i){e.addEventListener(t,i,!W3&&tY)}function z2(e,t,i){e.removeEventListener(t,i,!W3&&tY)}function ds(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function bw1(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function It(e,t,i,a){if(e){i=i||document;do{if(t!=null&&(t[0]===">"?e.parentNode===i&&ds(e,t):ds(e,t))||a&&e===i)return e;if(e===i)break}while(e=bw1(e))}return null}var Bf=/\s+/g;function a0(e,t,i){if(e&&t)if(e.classList)e.classList[i?"add":"remove"](t);else{var a=(" "+e.className+" ").replace(Bf," ").replace(" "+t+" "," ");e.className=(a+(i?" "+t:"")).replace(Bf," ")}}function u2(e,t,i){var a=e&&e.style;if(a){if(i===void 0)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(i=e.currentStyle),t===void 0?i:i[t];!(t in a)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),a[t]=i+(typeof i=="string"?"":"px")}}function n6(e,t){var i="";if(typeof e=="string")i=e;else do{var a=u2(e,"transform");a&&a!=="none"&&(i=a+" "+i)}while(!t&&(e=e.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(i)}function iY(e,t,i){if(e){var a=e.getElementsByTagName(t),r=0,n=a.length;if(i)for(;r=n:o=r<=n,!o)return a;if(a===Xt())break;a=Hi(a,!1)}return!1}function S6(e,t,i,a){for(var r=0,n=0,o=e.children;n2&&arguments[2]!==void 0?arguments[2]:{},a=i.evt,r=Nw1(i,Fw1);A7.pluginEvent.bind(h2)(e,t,Qt({dragEl:Z1,parentEl:Te,ghostEl:y2,rootEl:Ae,nextEl:ga,lastDownEl:e8,cloneEl:ve,cloneHidden:Vi,dragStarted:Ir,putSortable:r5,activeSortable:h2.active,originalEvent:a,oldIndex:q4,oldDraggableIndex:sn,newIndex:r0,newDraggableIndex:pi,hideGhostForTarget:cY,unhideGhostForTarget:dY,cloneNowHidden:function(){Vi=!0},cloneNowShown:function(){Vi=!1},dispatchSortableEvent:function(n){N5({sortable:t,name:n,originalEvent:a})}},r))};function N5(e){xw1(Qt({putSortable:r5,cloneEl:ve,targetEl:Z1,rootEl:Ae,oldIndex:q4,oldDraggableIndex:sn,newIndex:r0,newDraggableIndex:pi},e))}var Z1,Te,y2,Ae,ga,e8,ve,Vi,q4,r0,sn,pi,No,r5,Z4=!1,Cs=!1,ms=[],pa,at,Wl,Xl,Zf,Gf,Ir,F4,ln,cn=!1,To=!1,t8,p5,Yl=[],Ld=!1,us=[],P9=typeof document<"u",bo=JX,Wf=g7||W3?"cssFloat":"float",Bw1=P9&&!eY&&!JX&&"draggable"in document.createElement("div"),oY=function(){if(P9){if(W3)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),sY=function(e,t){var i=u2(e),a=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),r=S6(e,0,t),n=S6(e,1,t),o=r&&u2(r),l=n&&u2(n),c=o&&parseInt(o.marginLeft)+parseInt(o.marginRight)+Ye(r).width,m=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Ye(n).width;if(i.display==="flex")return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal";if(i.display==="grid")return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&o.float&&o.float!=="none"){var d=o.float==="left"?"left":"right";return n&&(l.clear==="both"||l.clear===d)?"vertical":"horizontal"}return r&&(o.display==="block"||o.display==="flex"||o.display==="table"||o.display==="grid"||c>=a&&i[Wf]==="none"||n&&i[Wf]==="none"&&c+m>a)?"vertical":"horizontal"},kw1=function(e,t,i){var a=i?e.left:e.top,r=i?e.right:e.bottom,n=i?e.width:e.height,o=i?t.left:t.top,l=i?t.right:t.bottom,c=i?t.width:t.height;return a===o||r===l||a+n/2===o+c/2},zw1=function(e,t){var i;return ms.some(function(a){var r=a[l0].options.emptyInsertThreshold;if(!(!r||Ru(a))){var n=Ye(a),o=e>=n.left-r&&e<=n.right+r,l=t>=n.top-r&&t<=n.bottom+r;if(o&&l)return i=a}}),i},lY=function(e){function t(r,n){return function(o,l,c,m){var d=o.options.group.name&&l.options.group.name&&o.options.group.name===l.options.group.name;if(r==null&&(n||d))return!0;if(r==null||r===!1)return!1;if(n&&r==="clone")return r;if(typeof r=="function")return t(r(o,l,c,m),n)(o,l,c,m);var u=(n?o:l).options.group.name;return r===!0||typeof r=="string"&&r===u||r.join&&r.indexOf(u)>-1}}var i={},a=e.group;(!a||Jo(a)!="object")&&(a={name:a}),i.name=a.name,i.checkPull=t(a.pull,!0),i.checkPut=t(a.put),i.revertClone=a.revertClone,e.group=i},cY=function(){!oY&&y2&&u2(y2,"display","none")},dY=function(){!oY&&y2&&u2(y2,"display","")};P9&&!eY&&document.addEventListener("click",function(e){if(Cs)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Cs=!1,!1},!0);var Va=function(e){if(Z1){e=e.touches?e.touches[0]:e;var t=zw1(e.clientX,e.clientY);if(t){var i={};for(var a in e)e.hasOwnProperty(a)&&(i[a]=e[a]);i.target=i.rootEl=t,i.preventDefault=void 0,i.stopPropagation=void 0,t[l0]._onDragOver(i)}}},Zw1=function(e){Z1&&Z1.parentNode[l0]._isOutsideThisEl(e.target)};function h2(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=O3({},t),e[l0]=this;var i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return sY(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(n,o){n.setData("Text",o.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:h2.supportPointer!==!1&&"PointerEvent"in window&&!nn,emptyInsertThreshold:5};A7.initializePlugins(this,e,i);for(var a in i)!(a in t)&&(t[a]=i[a]);lY(t);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=t.forceFallback?!1:Bw1,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?q2(e,"pointerdown",this._onTapStart):(q2(e,"mousedown",this._onTapStart),q2(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(q2(e,"dragover",this),q2(e,"dragenter",this)),ms.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),O3(this,Iw1())}h2.prototype={constructor:h2,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(F4=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,Z1):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,i=this.el,a=this.options,r=a.preventOnFilter,n=e.type,o=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,l=(o||e).target,c=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,m=a.filter;if(jw1(i),!Z1&&!(/mousedown|pointerdown/.test(n)&&e.button!==0||a.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&nn&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=It(l,a.draggable,i,!1),!(l&&l.animated)&&e8!==l)){if(q4=x0(l),sn=x0(l,a.draggable),typeof m=="function"){if(m.call(this,e,l,this)){N5({sortable:t,rootEl:c,name:"filter",targetEl:l,toEl:i,fromEl:i}),U5("filter",t,{evt:e}),r&&e.cancelable&&e.preventDefault();return}}else if(m&&(m=m.split(",").some(function(d){if(d=It(c,d.trim(),i,!1),d)return N5({sortable:t,rootEl:d,name:"filter",targetEl:l,fromEl:i,toEl:i}),U5("filter",t,{evt:e}),!0}),m)){r&&e.cancelable&&e.preventDefault();return}a.handle&&!It(c,a.handle,i,!1)||this._prepareDragStart(e,o,l)}}},_prepareDragStart:function(e,t,i){var a=this,r=a.el,n=a.options,o=r.ownerDocument,l;if(i&&!Z1&&i.parentNode===r){var c=Ye(i);if(Ae=r,Z1=i,Te=Z1.parentNode,ga=Z1.nextSibling,e8=i,No=n.group,h2.dragged=Z1,pa={target:Z1,clientX:(t||e).clientX,clientY:(t||e).clientY},Zf=pa.clientX-c.left,Gf=pa.clientY-c.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Z1.style["will-change"]="all",l=function(){if(U5("delayEnded",a,{evt:e}),h2.eventCanceled){a._onDrop();return}a._disableDelayedDragEvents(),!Ff&&a.nativeDraggable&&(Z1.draggable=!0),a._triggerDragStart(e,t),N5({sortable:a,name:"choose",originalEvent:e}),a0(Z1,n.chosenClass,!0)},n.ignore.split(",").forEach(function(m){iY(Z1,m.trim(),Kl)}),q2(o,"dragover",Va),q2(o,"mousemove",Va),q2(o,"touchmove",Va),q2(o,"mouseup",a._onDrop),q2(o,"touchend",a._onDrop),q2(o,"touchcancel",a._onDrop),Ff&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Z1.draggable=!0),U5("delayStart",this,{evt:e}),n.delay&&(!n.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(g7||W3))){if(h2.eventCanceled){this._onDrop();return}q2(o,"mouseup",a._disableDelayedDrag),q2(o,"touchend",a._disableDelayedDrag),q2(o,"touchcancel",a._disableDelayedDrag),q2(o,"mousemove",a._delayedDragTouchMoveHandler),q2(o,"touchmove",a._delayedDragTouchMoveHandler),n.supportPointer&&q2(o,"pointermove",a._delayedDragTouchMoveHandler),a._dragStartTimer=setTimeout(l,n.delay)}else l()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Z1&&Kl(Z1),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;z2(e,"mouseup",this._disableDelayedDrag),z2(e,"touchend",this._disableDelayedDrag),z2(e,"touchcancel",this._disableDelayedDrag),z2(e,"mousemove",this._delayedDragTouchMoveHandler),z2(e,"touchmove",this._delayedDragTouchMoveHandler),z2(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?q2(document,"pointermove",this._onTouchMove):t?q2(document,"touchmove",this._onTouchMove):q2(document,"mousemove",this._onTouchMove):(q2(Z1,"dragend",this),q2(Ae,"dragstart",this._onDragStart));try{document.selection?i8(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(Z4=!1,Ae&&Z1){U5("dragStarted",this,{evt:t}),this.nativeDraggable&&q2(document,"dragover",Zw1);var i=this.options;!e&&a0(Z1,i.dragClass,!1),a0(Z1,i.ghostClass,!0),h2.active=this,e&&this._appendGhost(),N5({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(at){this._lastX=at.clientX,this._lastY=at.clientY,cY();for(var e=document.elementFromPoint(at.clientX,at.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(at.clientX,at.clientY),e!==t);)t=e;if(Z1.parentNode[l0]._isOutsideThisEl(e),t)do{if(t[l0]){var i=void 0;if(i=t[l0]._onDragOver({clientX:at.clientX,clientY:at.clientY,target:e,rootEl:t}),i&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);dY()}},_onTouchMove:function(e){if(pa){var t=this.options,i=t.fallbackTolerance,a=t.fallbackOffset,r=e.touches?e.touches[0]:e,n=y2&&n6(y2,!0),o=y2&&n&&n.a,l=y2&&n&&n.d,c=bo&&p5&&zf(p5),m=(r.clientX-pa.clientX+a.x)/(o||1)+(c?c[0]-Yl[0]:0)/(o||1),d=(r.clientY-pa.clientY+a.y)/(l||1)+(c?c[1]-Yl[1]:0)/(l||1);if(!h2.active&&!Z4){if(i&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))=0&&(N5({rootEl:Te,name:"add",toEl:Te,fromEl:Ae,originalEvent:e}),N5({sortable:this,name:"remove",toEl:Te,originalEvent:e}),N5({rootEl:Te,name:"sort",toEl:Te,fromEl:Ae,originalEvent:e}),N5({sortable:this,name:"sort",toEl:Te,originalEvent:e})),r5&&r5.save()):r0!==q4&&r0>=0&&(N5({sortable:this,name:"update",toEl:Te,originalEvent:e}),N5({sortable:this,name:"sort",toEl:Te,originalEvent:e})),h2.active&&((r0==null||r0===-1)&&(r0=q4,pi=sn),N5({sortable:this,name:"end",toEl:Te,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){U5("nulling",this),Ae=Z1=Te=y2=ga=ve=e8=Vi=pa=at=Ir=r0=pi=q4=sn=F4=ln=r5=No=h2.dragged=h2.ghost=h2.clone=h2.active=null,us.forEach(function(e){e.checked=!0}),us.length=Wl=Xl=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Z1&&(this._onDragOver(e),Gw1(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,i=this.el.children,a=0,r=i.length,n=this.options;aa.right+r||e.clientX<=a.right&&e.clientY>a.bottom&&e.clientX>=a.left:e.clientX>a.right&&e.clientY>a.top||e.clientX<=a.right&&e.clientY>a.bottom+r}function Kw1(e,t,i,a,r,n,o,l){var c=a?e.clientY:e.clientX,m=a?i.height:i.width,d=a?i.top:i.left,u=a?i.bottom:i.right,h=!1;if(!o){if(l&&t8d+m*n/2:cu-t8)return-ln}else if(c>d+m*(1-r)/2&&cu-m*n/2)?c>d+m/2?1:-1:0}function qw1(e){return x0(Z1){y=f(y),l&&v.destroy(),l=new h2(y,_())};y1(()=>o,()=>{l&&Dw1(_(),(y,b)=>{l==null||l.option(y,b)})},{deep:!0});const v={option:(y,b)=>l==null?void 0:l.option(y,b),destroy:()=>{l==null||l.destroy(),l=null},save:()=>l==null?void 0:l.save(),toArray:()=>l==null?void 0:l.toArray(),closest:(...y)=>l==null?void 0:l.closest(...y)},A=()=>v==null?void 0:v.option("disabled",!0),R=()=>v==null?void 0:v.option("disabled",!1);return tP1(()=>{c&&S()}),eP1(v.destroy),K4({start:S,pause:A,resume:R},v)}const Ad=["update","start","add","remove","choose","unchoose","end","sort","filter","clone","move","change"],iP1=["onUpdate","onStart","onAdd","onRemove","animation","ghostClass","group","sort","disabled","store","handle","draggable","swapThreshold","invertSwap","invertedSwapThreshold","removeCloneOnHide","direction","chosenClass","dragClass","ignore","filter","preventOnFilter","easing","setData","dropBubble","dragoverBubble","dataIdAttr","delay","delayOnTouchOnly","touchStartThreshold","forceFallback","fallbackClass","fallbackOnBody","fallbackTolerance","fallbackOffset","supportPointer","emptyInsertThreshold","scroll","forceAutoScrollFallback","scrollSensitivity","scrollSpeed","bubbleScroll","modelValue","tag","target",...Ad.map(e=>`on${e.replace(/^\S/,t=>t.toUpperCase())}`)],_d=d2({name:"VueDraggable",model:{prop:"modelValue",event:"update:modelValue"},props:iP1,emits:["update:modelValue",...Ad],setup(e,{slots:t,emit:i,expose:a}){const r=aH1(),n=Ad.reduce((d,u)=>{const h=`on${u.replace(/^\S/,p=>p.toUpperCase())}`;return d[h]=p=>i(u,p),d},{}),o=X(()=>{const d=x2(e),u=jX(d,["modelValue"]),h=Object.entries(u).reduce((p,[H,f])=>{const _=U(f);return _!==void 0&&(p[H]=_),p},{});return K4(K4({},n),fw1(K4(K4({},r),h)))}),l=X({get:()=>e.modelValue,set:d=>i("update:modelValue",d)}),c=Q(),m=U2(mY(e.target||c,l,o));return a(m),()=>{if(t.default)return m5(e.tag||"div",{ref:c},t.default(m))}}}),aP1=async(e,t)=>{try{const i=await fetch(`http://${e}/bag/v1.0/get/${t}`);if(!await i.ok)throw new Error(await i.text());return await i.json()}catch(i){throw new Error(`Could not get bag of holdings for ${t}. ${i}`)}},uY=async e=>{try{return await aP1(e,"cockpit")}catch(t){throw new Error(`Could not get Cockpit's storage data from vehicle. ${t}`)}},rP1=async(e,t)=>(await uY(e))[t],nP1=async(e,t,i)=>{try{await fetch(`http://${e}/bag/v1.0/set/${t}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)})}catch(a){throw new Error(`Could not set bag of holdings for ${t}. ${a}`)}},oP1=async(e,t)=>{try{await nP1(e,"cockpit",t)}catch(i){throw new Error(`Could not set Cockpit's storage data on vehicle. ${i}`)}},sP1=async(e,t,i)=>{let a={};try{a=await uY(e)}catch(n){console.error(n)}const r=a;r[t]=i,await oP1(e,r)},k6=Bi("widget-manager",()=>{const e=Ne(),t=Q(!1),i=Q(!0),a=Q(.01),r=G5("cockpit-mini-widgets-profile-v4",Wy1),n=G5("cockpit-saved-profiles-v8",[]),o=G5("cockpit-current-view-index",0),l=G5("cockpit-current-profile-index",0),c=X(()=>[...El,...n.value]),m=X({get(){return d.value.views[o.value]},set(I){d.value.views[o.value]=I}}),d=X({get(){return c.value[l.value]},set(I){if(!c.value.map(c1=>c1.hash).includes(I.hash)){W2.fire({icon:"error",text:"Could not find profile.",timer:3e3});return}if(P(I)){W2.fire({icon:"error",text:"Cannot edit a default profile. Please pick another one.",timer:3e3});return}o.value=0;const j=n.value.findIndex(c1=>c1.hash===I.hash);n.value[j]=I}}),u=X(()=>{const I=d.value.views.slice();return I.splice(o.value,1),I.push(d.value.views[o.value]),I}),h=X(()=>{const I=m.value.miniWidgetContainers,W=m.value.widgets.filter(j=>j.component===ce.MiniWidgetsBar).filter(j=>j.options&&j.options.miniWidgetsContainer).map(j=>j.options.miniWidgetsContainer);return[...I,...W]});function p(I){for(const W of d.value.views)for(const j of W.widgets)if(j===I)return W;throw new Error(`No view found for widget with hash ${I.hash}`)}function H(I){const W=n.value.map(v1=>v1.name);let j=I.name,c1=0;for(;W.includes(j);)j.length>3&&j.at(-3)==="("&&j.at(-1)===")"&&!isNaN(Number(j.at(-2)))&&(c1=parseInt(j.at(-2)),j=`${j.substring(0,j.length-3)}`),j=`${j} (${c1+1})`;const f1={...I,name:j};return n.value.push(f1),f1}function f(I){const W=c.value.findIndex(j=>j.hash===I.hash);if(W===-1){W2.fire({icon:"error",text:"Could not find profile.",timer:3e3});return}l.value=W,o.value=0}function _(){n.value.splice(0,n.value.length)}const S=I=>{const W=new Blob([JSON.stringify(I)],{type:"text/plain;charset=utf-8"});Ii.exports.saveAs(W,"cockpit-widget-profile.json")},v=I=>{const W=new FileReader;W.onload=j=>{const c1=j.target.result,f1=JSON.parse(c1);if(!df(f1)){W2.fire({icon:"error",text:"Invalid profile file.",timer:3e3});return}const v1=H(f1);f(v1)},W.readAsText(I.target.files[0])},A=async()=>{const I=await rP1(e.globalAddress,"cockpit-saved-profiles-v7");if(!Array.isArray(I)||!I.every(W=>df(W))){W2.fire({icon:"error",text:"Could not import profiles from vehicle. Invalid data.",timer:3e3});return}n.value=I,W2.fire({icon:"success",text:"Cockpit profiles imported from vehicle.",timer:3e3})},R=async()=>{await sP1(e.globalAddress,"cockpit-saved-profiles-v7",n.value),W2.fire({icon:"success",text:"Cockpit profiles exported to vehicle.",timer:3e3})};function y(){d.value.views.unshift({hash:mt(),name:`${es.random()} view`,widgets:[],miniWidgetContainers:[{name:"Bottom-left container",widgets:[]},{name:"Bottom-center container",widgets:[]},{name:"Bottom-right container",widgets:[]}],showBottomBarOnBoot:!0}),o.value=0}function b(){n.value.unshift({hash:mt(),name:`${es.random()} profile`,views:[]});const I=c.value.findIndex(W=>W.hash===n.value[0].hash);l.value=I,y()}const w=I=>n.value.map(W=>W.hash).includes(I.hash),P=I=>El.map(W=>W.hash).includes(I.hash);function E(I){if(!w(I)&&!P(I)){W2.fire({icon:"error",text:"Could not find profile.",timer:3e3});return}if(P(I)){W2.fire({icon:"error",text:"Cannot delete a default profile.",timer:3e3});return}const W=d.value.hash,j=n.value.findIndex(c1=>c1.hash===I.hash);l.value=0,n.value.splice(j,1),W!==I.hash&&(l.value=c.value.findIndex(c1=>c1.hash===W))}function B(I){if(d.value.views.length===1){W2.fire({icon:"error",text:"Cannot remove last view. Please create another before deleting this one.",timer:4e3});return}const W=m.value.hash,j=d.value.views.indexOf(I);d.value.views.splice(j,1);const c1=d.value.views.findIndex(f1=>f1.hash===W);if(c1===-1||j===o.value){o.value=0;return}o.value=c1}function Y(I,W){const j=d.value.views.indexOf(I);if(W.length===0){W2.fire({icon:"error",text:"View name cannot be blank.",timer:2e3});return}d.value.views[j].name=W}const x=I=>{const W=d.value.views.indexOf(I);o.value=W},k=I=>{const W=new Blob([JSON.stringify(I)],{type:"text/plain;charset=utf-8"});Ii.exports.saveAs(W,"cockpit-widget-view.json")},Z=I=>{const W=new FileReader;W.onload=j=>{const c1=j.target.result,f1=JSON.parse(c1);if(!JT(f1)){W2.fire({icon:"error",text:"Invalid view file.",timer:3e3});return}d.value.views.unshift(f1)},W.readAsText(I.target.files[0])};function $(I,W){const j=mt();W.widgets.unshift({hash:j,name:I,component:I,position:{x:.4,y:.32},size:{width:.2,height:.36},options:{},managerVars:{timesMounted:0,configMenuOpen:!1,allowMoving:!0,lastNonMaximizedX:.4,lastNonMaximizedY:.32,lastNonMaximizedWidth:.2,lastNonMaximizedHeight:.36}})}function G(I){const W=p(I),j=W.widgets.indexOf(I);W.widgets.splice(j,1)}function r1(I){let W;if(d.value.views.forEach(f1=>{const v1=f1.miniWidgetContainers.find(w1=>w1.widgets.includes(I));v1!==void 0&&(W=v1)}),W===void 0){W2.fire({icon:"error",text:"Mini-widget container not found.",timer:3e3});return}const j=W,c1=j.widgets.indexOf(I);j.widgets.splice(c1,1)}const J=I=>{I.managerVars.configMenuOpen=!0},g1={x:0,y:0},n1={width:1,height:1},a1={x:.15,y:.15},p1={width:.7,height:.7},S1=I=>{if(!b1(I)){I.managerVars.lastNonMaximizedX=I.position.x,I.managerVars.lastNonMaximizedY=I.position.y,I.managerVars.lastNonMaximizedWidth=I.size.width,I.managerVars.lastNonMaximizedHeight=I.size.height,I.position=g1,I.size=n1;return}I.managerVars.lastNonMaximizedX===0&&(I.managerVars.lastNonMaximizedX=a1.x),I.managerVars.lastNonMaximizedY===g1.y&&(I.managerVars.lastNonMaximizedY=a1.y),I.managerVars.lastNonMaximizedWidth===n1.width&&(I.managerVars.lastNonMaximizedWidth=p1.width),I.managerVars.lastNonMaximizedHeight===n1.height&&(I.managerVars.lastNonMaximizedHeight=p1.height),I.position={x:I.managerVars.lastNonMaximizedX,y:I.managerVars.lastNonMaximizedY},I.size={width:I.managerVars.lastNonMaximizedWidth,height:I.managerVars.lastNonMaximizedHeight}};n.value.isEmpty()&&(A(),El.forEach(I=>{const W=structuredClone(I);W.name=W.name.replace("Default","User"),W.hash=mt(),n.value.push(W)}),f(n.value[0]),location.reload());const _1=I=>{d.value.views.forEach(W=>{W.widgets.forEach(j=>{j.managerVars.allowMoving=I===void 0?t.value:I})})};y1(t,()=>_1()),_1(!1);const b1=I=>Cf(I.position,g1)&&Cf(I.size,n1),m1=()=>{const I=o.value===d.value.views.length-1?0:o.value+1;x(d.value.views[I])},s1=I8(()=>m1(),10),P1=L6(Vt.GO_TO_NEXT_VIEW,s1);Se(()=>H6(P1));const E1=()=>{const I=o.value===0?d.value.views.length-1:o.value-1;x(d.value.views[I])},V1=I8(()=>E1(),10),A1=L6(Vt.GO_TO_PREVIOUS_VIEW,V1);return Se(()=>H6(A1)),d5(()=>{n.value.forEach(I=>I.views.forEach(W=>{W.showBottomBarOnBoot===void 0&&(W.showBottomBarOnBoot=!0)}))}),{editingMode:t,showGrid:i,gridInterval:a,currentProfile:d,currentView:m,viewsToShow:u,miniWidgetContainersInCurrentView:h,currentMiniWidgetsProfile:r,savedProfiles:n,allProfiles:c,isDefaultProfile:P,loadProfile:f,saveProfile:H,resetSavedProfiles:_,exportProfile:S,importProfile:v,addProfile:b,deleteProfile:E,addView:y,deleteView:B,renameView:Y,selectView:x,exportView:k,importView:Z,addWidget:$,deleteWidget:G,deleteMiniWidget:r1,openWidgetConfigMenu:J,toggleFullScreen:S1,isFullScreen:b1,importProfilesFromVehicle:A,exportProfilesToVehicle:R}}),lP1={class:"inline-block font-extrabold align-middle"},cP1=d2({__name:"ArmerButton",setup(e){const t=Ne();return(i,a)=>(d1(),R1("button",{class:"relative flex items-center justify-center w-32 p-1 rounded-md shadow-inner h-9 bg-slate-800/60",onClick:a[0]||(a[0]=r=>U(t).isArmed?U(t).disarm():U(t).arm())},[K("div",{class:r2(["absolute top-auto flex items-center px-1 rounded-[4px] shadow hover:bg-slate-400/60 transition-all w-[70%] h-[80%]",U(t).isArmed?"bg-slate-900/60 text-slate-50 justify-end left-[26%]":"justify-start bg-slate-800/60 text-slate-400 left-[4%]"])},[K("span",lP1,W1(U(t).isArmed===void 0?"...":U(t).isArmed?"Armed":"Disarmed"),1)],2)]))}}),dP1=d2({__name:"BaseCommIndicator",setup(e){const t=Ne();return(i,a)=>{const r=E5("FontAwesomeIcon"),n=C5("tooltip");return L2((d1(),R1("div",{class:r2(["relative",U(t).isVehicleOnline?"text-slate-50":"text-gray-700"])},[N(r,{icon:"fa-solid fa-arrow-right-arrow-left",size:"xl"}),U(t).isVehicleOnline?c2("",!0):(d1(),K1(r,{key:0,icon:"fa-slash",size:"xl",class:"absolute -left-1"}))],2)),[[n,U(t).isVehicleOnline?"Vehicle connected":"Vehicle disconnected"]])}}}),CP1={class:"flex items-center w-[5.5rem] h-12 text-white justify-center"},mP1=K("span",{class:"absolute text-sm text-yellow-400 -bottom-[2px] -right-[7px] mdi mdi-alert-circle"},null,-1),uP1=[mP1],hP1={class:"flex flex-col w-[4rem] select-none text-sm font-semibold leading-4 text-end"},pP1={class:"w-full"},VP1={class:"font-mono"},fP1=K("span",null," V",-1),LP1={class:"w-full"},HP1={class:"font-mono"},MP1=K("span",null," A",-1),gP1=d2({__name:"BatteryIndicator",setup(e){const t=Ne(),i=X(()=>{var n;return((n=t==null?void 0:t.powerSupply)==null?void 0:n.voltage)===void 0?NaN:Math.abs(t.powerSupply.voltage)>=100?t.powerSupply.voltage.toFixed(0):t.powerSupply.voltage.toFixed(1)}),a=X(()=>{var n;return((n=t==null?void 0:t.powerSupply)==null?void 0:n.current)===void 0?NaN:Math.abs(t.powerSupply.current)>=100?t.powerSupply.current.toFixed(0):t.powerSupply.current.toFixed(1)}),r=X(()=>"mdi-battery");return(n,o)=>{const l=C5("tooltip");return L2((d1(),R1("div",CP1,[K("span",{class:r2(["relative w-[1.5rem] mdi battery-icon",[r.value]])},uP1,2),K("div",hP1,[K("div",pP1,[K("span",VP1,W1(i.value),1),fP1]),K("div",LP1,[K("span",HP1,W1(a.value),1),MP1])])])),[[l,"Your vehicle does not provide state-of-charge. Displaying voltage and current instead."]])}}});const AP1=""+new URL("depth-icon.4ee497ce.svg",import.meta.url).href;function Kf(e){return typeof e=="function"?e():U(e)}function _P1(e){return e.flatMap(t=>{const i=Kf(t);return Array.isArray(i)?i.map(a=>Kf(a)):[i]})}function SP1(...e){return X(()=>{const t=_P1(e);return t.reduce((i,a)=>i+=a,0)/t.length})}const vP1={class:"flex items-center w-[8.25rem] h-12 p-1 text-white justify-center"},DP1=K("img",{src:AP1,class:"h-full",draggable:!1},null,-1),yP1={class:"flex flex-col items-start justify-center ml-1 min-w-[4rem] max-w-[6rem] select-none"},RP1={class:"font-mono text-xl font-semibold leading-6 w-fit"},NP1=K("span",{class:"text-xl font-semibold leading-6 w-fit"}," m",-1),TP1=K("span",{class:"w-full text-sm font-semibold leading-4 whitespace-nowrap"},"Depth",-1),bP1=d2({__name:"DepthIndicator",setup(e){const t=Ne();Oe.registerUsage(S5.depth);const i=Q(0);y1(t.altitude,()=>i.value=-t.altitude.msl);const{history:a}=tT(i,{capacity:50}),r=SP1(()=>a.value.map(l=>l.snapshot)),n=X(()=>r.value<.01?0:r.value),o=X(()=>{const l=n.value;return l<.1?1:l<1?2:l>=1&&l<100?3:l>=1e4?5:4});return(l,c)=>(d1(),R1("div",vP1,[DP1,K("div",yP1,[K("div",null,[K("span",RP1,W1(n.value.toPrecision(o.value)),1),NP1]),TP1])]))}}),wP1=d2({__name:"JoystickCommIndicator",setup(e){const t=Q(!1);X2(()=>{$o.onJoystickUpdate(a=>{i(a)})});const i=a=>{t.value=a.size!==0};return(a,r)=>{const n=E5("FontAwesomeIcon"),o=C5("tooltip");return L2((d1(),R1("div",{class:r2(["relative",t.value?"text-slate-50":"text-gray-700"])},[N(n,{icon:"fa-solid fa-gamepad",size:"xl"}),t.value?c2("",!0):(d1(),K1(n,{key:0,icon:"fa-solid fa-slash",size:"xl",class:"absolute left-0"}))],2)),[[o,t.value?"Joystick connected":"Joystick disconnected"]])}}});var hY={exports:{}};(function(e){(function(t,i){e.exports?e.exports=i():window.ysFixWebmDuration=i()})("fix-webm-duration",function(){var t={172351395:{name:"EBML",type:"Container"},646:{name:"EBMLVersion",type:"Uint"},759:{name:"EBMLReadVersion",type:"Uint"},754:{name:"EBMLMaxIDLength",type:"Uint"},755:{name:"EBMLMaxSizeLength",type:"Uint"},642:{name:"DocType",type:"String"},647:{name:"DocTypeVersion",type:"Uint"},645:{name:"DocTypeReadVersion",type:"Uint"},108:{name:"Void",type:"Binary"},63:{name:"CRC-32",type:"Binary"},190023271:{name:"SignatureSlot",type:"Container"},16010:{name:"SignatureAlgo",type:"Uint"},16026:{name:"SignatureHash",type:"Uint"},16037:{name:"SignaturePublicKey",type:"Binary"},16053:{name:"Signature",type:"Binary"},15963:{name:"SignatureElements",type:"Container"},15995:{name:"SignatureElementList",type:"Container"},9522:{name:"SignedElement",type:"Binary"},139690087:{name:"Segment",type:"Container"},21863284:{name:"SeekHead",type:"Container"},3515:{name:"Seek",type:"Container"},5035:{name:"SeekID",type:"Binary"},5036:{name:"SeekPosition",type:"Uint"},88713574:{name:"Info",type:"Container"},13220:{name:"SegmentUID",type:"Binary"},13188:{name:"SegmentFilename",type:"String"},1882403:{name:"PrevUID",type:"Binary"},1868715:{name:"PrevFilename",type:"String"},2013475:{name:"NextUID",type:"Binary"},1999803:{name:"NextFilename",type:"String"},1092:{name:"SegmentFamily",type:"Binary"},10532:{name:"ChapterTranslate",type:"Container"},10748:{name:"ChapterTranslateEditionUID",type:"Uint"},10687:{name:"ChapterTranslateCodec",type:"Uint"},10661:{name:"ChapterTranslateID",type:"Binary"},710577:{name:"TimecodeScale",type:"Uint"},1161:{name:"Duration",type:"Float"},1121:{name:"DateUTC",type:"Date"},15273:{name:"Title",type:"String"},3456:{name:"MuxingApp",type:"String"},5953:{name:"WritingApp",type:"String"},103:{name:"Timecode",type:"Uint"},6228:{name:"SilentTracks",type:"Container"},6359:{name:"SilentTrackNumber",type:"Uint"},39:{name:"Position",type:"Uint"},43:{name:"PrevSize",type:"Uint"},35:{name:"SimpleBlock",type:"Binary"},32:{name:"BlockGroup",type:"Container"},33:{name:"Block",type:"Binary"},34:{name:"BlockVirtual",type:"Binary"},13729:{name:"BlockAdditions",type:"Container"},38:{name:"BlockMore",type:"Container"},110:{name:"BlockAddID",type:"Uint"},37:{name:"BlockAdditional",type:"Binary"},27:{name:"BlockDuration",type:"Uint"},122:{name:"ReferencePriority",type:"Uint"},123:{name:"ReferenceBlock",type:"Int"},125:{name:"ReferenceVirtual",type:"Int"},36:{name:"CodecState",type:"Binary"},13730:{name:"DiscardPadding",type:"Int"},14:{name:"Slices",type:"Container"},104:{name:"TimeSlice",type:"Container"},76:{name:"LaceNumber",type:"Uint"},77:{name:"FrameNumber",type:"Uint"},75:{name:"BlockAdditionID",type:"Uint"},78:{name:"Delay",type:"Uint"},79:{name:"SliceDuration",type:"Uint"},72:{name:"ReferenceFrame",type:"Container"},73:{name:"ReferenceOffset",type:"Uint"},74:{name:"ReferenceTimeCode",type:"Uint"},47:{name:"EncryptedBlock",type:"Binary"},106212971:{name:"Tracks",type:"Container"},46:{name:"TrackEntry",type:"Container"},87:{name:"TrackNumber",type:"Uint"},13253:{name:"TrackUID",type:"Uint"},3:{name:"TrackType",type:"Uint"},57:{name:"FlagEnabled",type:"Uint"},8:{name:"FlagDefault",type:"Uint"},5546:{name:"FlagForced",type:"Uint"},28:{name:"FlagLacing",type:"Uint"},11751:{name:"MinCache",type:"Uint"},11768:{name:"MaxCache",type:"Uint"},254851:{name:"DefaultDuration",type:"Uint"},216698:{name:"DefaultDecodedFieldDuration",type:"Uint"},209231:{name:"TrackTimecodeScale",type:"Float"},4991:{name:"TrackOffset",type:"Int"},5614:{name:"MaxBlockAdditionID",type:"Uint"},4974:{name:"Name",type:"String"},177564:{name:"Language",type:"String"},6:{name:"CodecID",type:"String"},9122:{name:"CodecPrivate",type:"Binary"},362120:{name:"CodecName",type:"String"},13382:{name:"AttachmentLink",type:"Uint"},1742487:{name:"CodecSettings",type:"String"},1785920:{name:"CodecInfoURL",type:"String"},438848:{name:"CodecDownloadURL",type:"String"},42:{name:"CodecDecodeAll",type:"Uint"},12203:{name:"TrackOverlay",type:"Uint"},5802:{name:"CodecDelay",type:"Uint"},5819:{name:"SeekPreRoll",type:"Uint"},9764:{name:"TrackTranslate",type:"Container"},9980:{name:"TrackTranslateEditionUID",type:"Uint"},9919:{name:"TrackTranslateCodec",type:"Uint"},9893:{name:"TrackTranslateTrackID",type:"Binary"},96:{name:"Video",type:"Container"},26:{name:"FlagInterlaced",type:"Uint"},5048:{name:"StereoMode",type:"Uint"},5056:{name:"AlphaMode",type:"Uint"},5049:{name:"OldStereoMode",type:"Uint"},48:{name:"PixelWidth",type:"Uint"},58:{name:"PixelHeight",type:"Uint"},5290:{name:"PixelCropBottom",type:"Uint"},5307:{name:"PixelCropTop",type:"Uint"},5324:{name:"PixelCropLeft",type:"Uint"},5341:{name:"PixelCropRight",type:"Uint"},5296:{name:"DisplayWidth",type:"Uint"},5306:{name:"DisplayHeight",type:"Uint"},5298:{name:"DisplayUnit",type:"Uint"},5299:{name:"AspectRatioType",type:"Uint"},963876:{name:"ColourSpace",type:"Binary"},1029411:{name:"GammaValue",type:"Float"},230371:{name:"FrameRate",type:"Float"},97:{name:"Audio",type:"Container"},53:{name:"SamplingFrequency",type:"Float"},14517:{name:"OutputSamplingFrequency",type:"Float"},31:{name:"Channels",type:"Uint"},15739:{name:"ChannelPositions",type:"Binary"},8804:{name:"BitDepth",type:"Uint"},98:{name:"TrackOperation",type:"Container"},99:{name:"TrackCombinePlanes",type:"Container"},100:{name:"TrackPlane",type:"Container"},101:{name:"TrackPlaneUID",type:"Uint"},102:{name:"TrackPlaneType",type:"Uint"},105:{name:"TrackJoinBlocks",type:"Container"},109:{name:"TrackJoinUID",type:"Uint"},64:{name:"TrickTrackUID",type:"Uint"},65:{name:"TrickTrackSegmentUID",type:"Binary"},70:{name:"TrickTrackFlag",type:"Uint"},71:{name:"TrickMasterTrackUID",type:"Uint"},68:{name:"TrickMasterTrackSegmentUID",type:"Binary"},11648:{name:"ContentEncodings",type:"Container"},8768:{name:"ContentEncoding",type:"Container"},4145:{name:"ContentEncodingOrder",type:"Uint"},4146:{name:"ContentEncodingScope",type:"Uint"},4147:{name:"ContentEncodingType",type:"Uint"},4148:{name:"ContentCompression",type:"Container"},596:{name:"ContentCompAlgo",type:"Uint"},597:{name:"ContentCompSettings",type:"Binary"},4149:{name:"ContentEncryption",type:"Container"},2017:{name:"ContentEncAlgo",type:"Uint"},2018:{name:"ContentEncKeyID",type:"Binary"},2019:{name:"ContentSignature",type:"Binary"},2020:{name:"ContentSigKeyID",type:"Binary"},2021:{name:"ContentSigAlgo",type:"Uint"},2022:{name:"ContentSigHashAlgo",type:"Uint"},206814059:{name:"Cues",type:"Container"},59:{name:"CuePoint",type:"Container"},51:{name:"CueTime",type:"Uint"},55:{name:"CueTrackPositions",type:"Container"},119:{name:"CueTrack",type:"Uint"},113:{name:"CueClusterPosition",type:"Uint"},112:{name:"CueRelativePosition",type:"Uint"},50:{name:"CueDuration",type:"Uint"},4984:{name:"CueBlockNumber",type:"Uint"},106:{name:"CueCodecState",type:"Uint"},91:{name:"CueReference",type:"Container"},22:{name:"CueRefTime",type:"Uint"},23:{name:"CueRefCluster",type:"Uint"},4959:{name:"CueRefNumber",type:"Uint"},107:{name:"CueRefCodecState",type:"Uint"},155296873:{name:"Attachments",type:"Container"},8615:{name:"AttachedFile",type:"Container"},1662:{name:"FileDescription",type:"String"},1646:{name:"FileName",type:"String"},1632:{name:"FileMimeType",type:"String"},1628:{name:"FileData",type:"Binary"},1710:{name:"FileUID",type:"Uint"},1653:{name:"FileReferral",type:"Binary"},1633:{name:"FileUsedStartTime",type:"Uint"},1634:{name:"FileUsedEndTime",type:"Uint"},4433776:{name:"Chapters",type:"Container"},1465:{name:"EditionEntry",type:"Container"},1468:{name:"EditionUID",type:"Uint"},1469:{name:"EditionFlagHidden",type:"Uint"},1499:{name:"EditionFlagDefault",type:"Uint"},1501:{name:"EditionFlagOrdered",type:"Uint"},54:{name:"ChapterAtom",type:"Container"},13252:{name:"ChapterUID",type:"Uint"},5716:{name:"ChapterStringUID",type:"String"},17:{name:"ChapterTimeStart",type:"Uint"},18:{name:"ChapterTimeEnd",type:"Uint"},24:{name:"ChapterFlagHidden",type:"Uint"},1432:{name:"ChapterFlagEnabled",type:"Uint"},11879:{name:"ChapterSegmentUID",type:"Binary"},11964:{name:"ChapterSegmentEditionUID",type:"Uint"},9155:{name:"ChapterPhysicalEquiv",type:"Uint"},15:{name:"ChapterTrack",type:"Container"},9:{name:"ChapterTrackNumber",type:"Uint"},0:{name:"ChapterDisplay",type:"Container"},5:{name:"ChapString",type:"String"},892:{name:"ChapLanguage",type:"String"},894:{name:"ChapCountry",type:"String"},10564:{name:"ChapProcess",type:"Container"},10581:{name:"ChapProcessCodecID",type:"Uint"},1293:{name:"ChapProcessPrivate",type:"Binary"},10513:{name:"ChapProcessCommand",type:"Container"},10530:{name:"ChapProcessTime",type:"Uint"},10547:{name:"ChapProcessData",type:"Binary"},39109479:{name:"Tags",type:"Container"},13171:{name:"Tag",type:"Container"},9152:{name:"Targets",type:"Container"},10442:{name:"TargetTypeValue",type:"Uint"},9162:{name:"TargetType",type:"String"},9157:{name:"TagTrackUID",type:"Uint"},9161:{name:"TagEditionUID",type:"Uint"},9156:{name:"TagChapterUID",type:"Uint"},9158:{name:"TagAttachmentUID",type:"Uint"},10184:{name:"SimpleTag",type:"Container"},1443:{name:"TagName",type:"String"},1146:{name:"TagLanguage",type:"String"},1156:{name:"TagDefault",type:"Uint"},1159:{name:"TagString",type:"String"},1157:{name:"TagBinary",type:"Binary"}};function i(d,u){d.prototype=Object.create(u.prototype),d.prototype.constructor=d}function a(d,u){this.name=d||"Unknown",this.type=u||"Unknown"}a.prototype.updateBySource=function(){},a.prototype.setSource=function(d){this.source=d,this.updateBySource()},a.prototype.updateByData=function(){},a.prototype.setData=function(d){this.data=d,this.updateByData()};function r(d,u){a.call(this,d,u||"Uint")}i(r,a);function n(d){return d.length%2===1?"0"+d:d}r.prototype.updateBySource=function(){this.data="";for(var d=0;d=p&&h<8;h++,p*=128);if(!u)for(var H=p+d,f=h-1;f>=0;f--){var _=H%256;this.source[this.offset+f]=_,H=(H-_)/256}this.offset+=h},l.prototype.writeSections=function(d){this.offset=0;for(var u=0;u=i&&parseInt(a[i],10)}function n4(e,t,i){if(!e.RTCPeerConnection)return;const a=e.RTCPeerConnection.prototype,r=a.addEventListener;a.addEventListener=function(o,l){if(o!==t)return r.apply(this,arguments);const c=m=>{const d=i(m);d&&(l.handleEvent?l.handleEvent(d):l(d))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(l,c),r.apply(this,[o,c])};const n=a.removeEventListener;a.removeEventListener=function(o,l){if(o!==t||!this._eventMap||!this._eventMap[t])return n.apply(this,arguments);if(!this._eventMap[t].has(l))return n.apply(this,arguments);const c=this._eventMap[t].get(l);return this._eventMap[t].delete(l),this._eventMap[t].size===0&&delete this._eventMap[t],Object.keys(this._eventMap).length===0&&delete this._eventMap,n.apply(this,[o,c])},Object.defineProperty(a,"on"+t,{get(){return this["_on"+t]},set(o){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),o&&this.addEventListener(t,this["_on"+t]=o)},enumerable:!0,configurable:!0})}function EP1(e){return typeof e!="boolean"?new Error("Argument type: "+typeof e+". Please use a boolean."):(pY=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function IP1(e){return typeof e!="boolean"?new Error("Argument type: "+typeof e+". Please use a boolean."):(VY=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function fY(){if(typeof window=="object"){if(pY)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function bu(e,t){!VY||console.warn(e+" is deprecated, please use "+t+" instead.")}function OP1(e){const t={browser:null,version:null};if(typeof e>"u"||!e.navigator||!e.navigator.userAgent)return t.browser="Not a browser.",t;const{navigator:i}=e;if(i.mozGetUserMedia)t.browser="firefox",t.version=r8(i.userAgent,/Firefox\/(\d+)\./,1);else if(i.webkitGetUserMedia||e.isSecureContext===!1&&e.webkitRTCPeerConnection)t.browser="chrome",t.version=r8(i.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(e.RTCPeerConnection&&i.userAgent.match(/AppleWebKit\/(\d+)\./))t.browser="safari",t.version=r8(i.userAgent,/AppleWebKit\/(\d+)\./,1),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype;else return t.browser="Not a supported browser.",t;return t}function qf(e){return Object.prototype.toString.call(e)==="[object Object]"}function LY(e){return qf(e)?Object.keys(e).reduce(function(t,i){const a=qf(e[i]),r=a?LY(e[i]):e[i],n=a&&!Object.keys(r).length;return r===void 0||n?t:Object.assign(t,{[i]:r})},{}):e}function Sd(e,t,i){!t||i.has(t.id)||(i.set(t.id,t),Object.keys(t).forEach(a=>{a.endsWith("Id")?Sd(e,e.get(t[a]),i):a.endsWith("Ids")&&t[a].forEach(r=>{Sd(e,e.get(r),i)})}))}function $f(e,t,i){const a=i?"outbound-rtp":"inbound-rtp",r=new Map;if(t===null)return r;const n=[];return e.forEach(o=>{o.type==="track"&&o.trackIdentifier===t.id&&n.push(o)}),n.forEach(o=>{e.forEach(l=>{l.type===a&&l.trackId===o.id&&Sd(e,l,r)})}),r}const jf=fY;function HY(e,t){const i=e&&e.navigator;if(!i.mediaDevices)return;const a=function(l){if(typeof l!="object"||l.mandatory||l.optional)return l;const c={};return Object.keys(l).forEach(m=>{if(m==="require"||m==="advanced"||m==="mediaSource")return;const d=typeof l[m]=="object"?l[m]:{ideal:l[m]};d.exact!==void 0&&typeof d.exact=="number"&&(d.min=d.max=d.exact);const u=function(h,p){return h?h+p.charAt(0).toUpperCase()+p.slice(1):p==="deviceId"?"sourceId":p};if(d.ideal!==void 0){c.optional=c.optional||[];let h={};typeof d.ideal=="number"?(h[u("min",m)]=d.ideal,c.optional.push(h),h={},h[u("max",m)]=d.ideal,c.optional.push(h)):(h[u("",m)]=d.ideal,c.optional.push(h))}d.exact!==void 0&&typeof d.exact!="number"?(c.mandatory=c.mandatory||{},c.mandatory[u("",m)]=d.exact):["min","max"].forEach(h=>{d[h]!==void 0&&(c.mandatory=c.mandatory||{},c.mandatory[u(h,m)]=d[h])})}),l.advanced&&(c.optional=(c.optional||[]).concat(l.advanced)),c},r=function(l,c){if(t.version>=61)return c(l);if(l=JSON.parse(JSON.stringify(l)),l&&typeof l.audio=="object"){const m=function(d,u,h){u in d&&!(h in d)&&(d[h]=d[u],delete d[u])};l=JSON.parse(JSON.stringify(l)),m(l.audio,"autoGainControl","googAutoGainControl"),m(l.audio,"noiseSuppression","googNoiseSuppression"),l.audio=a(l.audio)}if(l&&typeof l.video=="object"){let m=l.video.facingMode;m=m&&(typeof m=="object"?m:{ideal:m});const d=t.version<66;if(m&&(m.exact==="user"||m.exact==="environment"||m.ideal==="user"||m.ideal==="environment")&&!(i.mediaDevices.getSupportedConstraints&&i.mediaDevices.getSupportedConstraints().facingMode&&!d)){delete l.video.facingMode;let u;if(m.exact==="environment"||m.ideal==="environment"?u=["back","rear"]:(m.exact==="user"||m.ideal==="user")&&(u=["front"]),u)return i.mediaDevices.enumerateDevices().then(h=>{h=h.filter(H=>H.kind==="videoinput");let p=h.find(H=>u.some(f=>H.label.toLowerCase().includes(f)));return!p&&h.length&&u.includes("back")&&(p=h[h.length-1]),p&&(l.video.deviceId=m.exact?{exact:p.deviceId}:{ideal:p.deviceId}),l.video=a(l.video),jf("chrome: "+JSON.stringify(l)),c(l)})}l.video=a(l.video)}return jf("chrome: "+JSON.stringify(l)),c(l)},n=function(l){return t.version>=64?l:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[l.name]||l.name,message:l.message,constraint:l.constraint||l.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}},o=function(l,c,m){r(l,d=>{i.webkitGetUserMedia(d,c,u=>{m&&m(n(u))})})};if(i.getUserMedia=o.bind(i),i.mediaDevices.getUserMedia){const l=i.mediaDevices.getUserMedia.bind(i.mediaDevices);i.mediaDevices.getUserMedia=function(c){return r(c,m=>l(m).then(d=>{if(m.audio&&!d.getAudioTracks().length||m.video&&!d.getVideoTracks().length)throw d.getTracks().forEach(u=>{u.stop()}),new DOMException("","NotFoundError");return d},d=>Promise.reject(n(d))))}}}function UP1(e,t){if(!(e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices)&&!!e.navigator.mediaDevices){if(typeof t!="function"){console.error("shimGetDisplayMedia: getSourceId argument is not a function");return}e.navigator.mediaDevices.getDisplayMedia=function(a){return t(a).then(r=>{const n=a.video&&a.video.width,o=a.video&&a.video.height,l=a.video&&a.video.frameRate;return a.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:r,maxFrameRate:l||3}},n&&(a.video.mandatory.maxWidth=n),o&&(a.video.mandatory.maxHeight=o),e.navigator.mediaDevices.getUserMedia(a)})}}}function MY(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function gY(e){if(typeof e=="object"&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(i){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=i)},enumerable:!0,configurable:!0});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=a=>{a.stream.addEventListener("addtrack",r=>{let n;e.RTCPeerConnection.prototype.getReceivers?n=this.getReceivers().find(l=>l.track&&l.track.id===r.track.id):n={track:r.track};const o=new Event("track");o.track=r.track,o.receiver=n,o.transceiver={receiver:n},o.streams=[a.stream],this.dispatchEvent(o)}),a.stream.getTracks().forEach(r=>{let n;e.RTCPeerConnection.prototype.getReceivers?n=this.getReceivers().find(l=>l.track&&l.track.id===r.id):n={track:r};const o=new Event("track");o.track=r,o.receiver=n,o.transceiver={receiver:n},o.streams=[a.stream],this.dispatchEvent(o)})},this.addEventListener("addstream",this._ontrackpoly)),t.apply(this,arguments)}}else n4(e,"track",t=>(t.transceiver||Object.defineProperty(t,"transceiver",{value:{receiver:t.receiver}}),t))}function AY(e){if(typeof e=="object"&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){const t=function(r,n){return{track:n,get dtmf(){return this._dtmf===void 0&&(n.kind==="audio"?this._dtmf=r.createDTMFSender(n):this._dtmf=null),this._dtmf},_pc:r}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};const r=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(l,c){let m=r.apply(this,arguments);return m||(m=t(this,l),this._senders.push(m)),m};const n=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(l){n.apply(this,arguments);const c=this._senders.indexOf(l);c!==-1&&this._senders.splice(c,1)}}const i=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(n){this._senders=this._senders||[],i.apply(this,[n]),n.getTracks().forEach(o=>{this._senders.push(t(this,o))})};const a=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(n){this._senders=this._senders||[],a.apply(this,[n]),n.getTracks().forEach(o=>{const l=this._senders.find(c=>c.track===o);l&&this._senders.splice(this._senders.indexOf(l),1)})}}else if(typeof e=="object"&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){const a=t.apply(this,[]);return a.forEach(r=>r._pc=this),a},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return this._dtmf===void 0&&(this.track.kind==="audio"?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function _Y(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[a,r,n]=arguments;if(arguments.length>0&&typeof a=="function")return t.apply(this,arguments);if(t.length===0&&(arguments.length===0||typeof a!="function"))return t.apply(this,[]);const o=function(c){const m={};return c.result().forEach(u=>{const h={id:u.id,timestamp:u.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[u.type]||u.type};u.names().forEach(p=>{h[p]=u.stat(p)}),m[h.id]=h}),m},l=function(c){return new Map(Object.keys(c).map(m=>[m,c[m]]))};if(arguments.length>=2){const c=function(m){r(l(o(m)))};return t.apply(this,[c,a])}return new Promise((c,m)=>{t.apply(this,[function(d){c(l(o(d)))},m])}).then(r,n)}}function SY(e){if(!(typeof e=="object"&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!("getStats"in e.RTCRtpSender.prototype)){const i=e.RTCPeerConnection.prototype.getSenders;i&&(e.RTCPeerConnection.prototype.getSenders=function(){const n=i.apply(this,[]);return n.forEach(o=>o._pc=this),n});const a=e.RTCPeerConnection.prototype.addTrack;a&&(e.RTCPeerConnection.prototype.addTrack=function(){const n=a.apply(this,arguments);return n._pc=this,n}),e.RTCRtpSender.prototype.getStats=function(){const n=this;return this._pc.getStats().then(o=>$f(o,n.track,!0))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){const i=e.RTCPeerConnection.prototype.getReceivers;i&&(e.RTCPeerConnection.prototype.getReceivers=function(){const r=i.apply(this,[]);return r.forEach(n=>n._pc=this),r}),n4(e,"track",a=>(a.receiver._pc=a.srcElement,a)),e.RTCRtpReceiver.prototype.getStats=function(){const r=this;return this._pc.getStats().then(n=>$f(n,r.track,!1))}}if(!("getStats"in e.RTCRtpSender.prototype&&"getStats"in e.RTCRtpReceiver.prototype))return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){const a=arguments[0];let r,n,o;return this.getSenders().forEach(l=>{l.track===a&&(r?o=!0:r=l)}),this.getReceivers().forEach(l=>(l.track===a&&(n?o=!0:n=l),l.track===a)),o||r&&n?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):r?r.getStats():n?n.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return t.apply(this,arguments)}}function vY(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(o=>this._shimmedLocalStreams[o][0])};const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(o,l){if(!l)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const c=t.apply(this,arguments);return this._shimmedLocalStreams[l.id]?this._shimmedLocalStreams[l.id].indexOf(c)===-1&&this._shimmedLocalStreams[l.id].push(c):this._shimmedLocalStreams[l.id]=[l,c],c};const i=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(o){this._shimmedLocalStreams=this._shimmedLocalStreams||{},o.getTracks().forEach(m=>{if(this.getSenders().find(u=>u.track===m))throw new DOMException("Track already exists.","InvalidAccessError")});const l=this.getSenders();i.apply(this,arguments);const c=this.getSenders().filter(m=>l.indexOf(m)===-1);this._shimmedLocalStreams[o.id]=[o].concat(c)};const a=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(o){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[o.id],a.apply(this,arguments)};const r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(o){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},o&&Object.keys(this._shimmedLocalStreams).forEach(l=>{const c=this._shimmedLocalStreams[l].indexOf(o);c!==-1&&this._shimmedLocalStreams[l].splice(c,1),this._shimmedLocalStreams[l].length===1&&delete this._shimmedLocalStreams[l]}),r.apply(this,arguments)}}function DY(e,t){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return vY(e);const i=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){const d=i.apply(this);return this._reverseStreams=this._reverseStreams||{},d.map(u=>this._reverseStreams[u.id])};const a=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(d){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},d.getTracks().forEach(u=>{if(this.getSenders().find(p=>p.track===u))throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[d.id]){const u=new e.MediaStream(d.getTracks());this._streams[d.id]=u,this._reverseStreams[u.id]=d,d=u}a.apply(this,[d])};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(d){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},r.apply(this,[this._streams[d.id]||d]),delete this._reverseStreams[this._streams[d.id]?this._streams[d.id].id:d.id],delete this._streams[d.id]},e.RTCPeerConnection.prototype.addTrack=function(d,u){if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const h=[].slice.call(arguments,1);if(h.length!==1||!h[0].getTracks().find(f=>f===d))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find(f=>f.track===d))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const H=this._streams[u.id];if(H)H.addTrack(d),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{const f=new e.MediaStream([d]);this._streams[u.id]=f,this._reverseStreams[f.id]=u,this.addStream(f)}return this.getSenders().find(f=>f.track===d)};function n(m,d){let u=d.sdp;return Object.keys(m._reverseStreams||[]).forEach(h=>{const p=m._reverseStreams[h],H=m._streams[p.id];u=u.replace(new RegExp(H.id,"g"),p.id)}),new RTCSessionDescription({type:d.type,sdp:u})}function o(m,d){let u=d.sdp;return Object.keys(m._reverseStreams||[]).forEach(h=>{const p=m._reverseStreams[h],H=m._streams[p.id];u=u.replace(new RegExp(p.id,"g"),H.id)}),new RTCSessionDescription({type:d.type,sdp:u})}["createOffer","createAnswer"].forEach(function(m){const d=e.RTCPeerConnection.prototype[m],u={[m](){const h=arguments;return arguments.length&&typeof arguments[0]=="function"?d.apply(this,[H=>{const f=n(this,H);h[0].apply(null,[f])},H=>{h[1]&&h[1].apply(null,H)},arguments[2]]):d.apply(this,arguments).then(H=>n(this,H))}};e.RTCPeerConnection.prototype[m]=u[m]});const l=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return!arguments.length||!arguments[0].type?l.apply(this,arguments):(arguments[0]=o(this,arguments[0]),l.apply(this,arguments))};const c=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get(){const m=c.get.apply(this);return m.type===""?m:n(this,m)}}),e.RTCPeerConnection.prototype.removeTrack=function(d){if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!d._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(d._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");this._streams=this._streams||{};let h;Object.keys(this._streams).forEach(p=>{this._streams[p].getTracks().find(f=>d.track===f)&&(h=this._streams[p])}),h&&(h.getTracks().length===1?this.removeStream(this._reverseStreams[h.id]):h.removeTrack(d.track),this.dispatchEvent(new Event("negotiationneeded")))}}function vd(e,t){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),!!e.RTCPeerConnection&&t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(i){const a=e.RTCPeerConnection.prototype[i],r={[i](){return arguments[0]=new(i==="addIceCandidate"?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),a.apply(this,arguments)}};e.RTCPeerConnection.prototype[i]=r[i]})}function yY(e,t){n4(e,"negotiationneeded",i=>{const a=i.target;if(!((t.version<72||a.getConfiguration&&a.getConfiguration().sdpSemantics==="plan-b")&&a.signalingState!=="stable"))return i})}const Qf=Object.freeze(Object.defineProperty({__proto__:null,shimMediaStream:MY,shimOnTrack:gY,shimGetSendersWithDtmf:AY,shimGetStats:_Y,shimSenderReceiverGetStats:SY,shimAddTrackRemoveTrackWithNative:vY,shimAddTrackRemoveTrack:DY,shimPeerConnection:vd,fixNegotiationNeeded:yY,shimGetUserMedia:HY,shimGetDisplayMedia:UP1},Symbol.toStringTag,{value:"Module"}));function RY(e,t){const i=e&&e.navigator,a=e&&e.MediaStreamTrack;if(i.getUserMedia=function(r,n,o){bu("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),i.mediaDevices.getUserMedia(r).then(n,o)},!(t.version>55&&"autoGainControl"in i.mediaDevices.getSupportedConstraints())){const r=function(o,l,c){l in o&&!(c in o)&&(o[c]=o[l],delete o[l])},n=i.mediaDevices.getUserMedia.bind(i.mediaDevices);if(i.mediaDevices.getUserMedia=function(o){return typeof o=="object"&&typeof o.audio=="object"&&(o=JSON.parse(JSON.stringify(o)),r(o.audio,"autoGainControl","mozAutoGainControl"),r(o.audio,"noiseSuppression","mozNoiseSuppression")),n(o)},a&&a.prototype.getSettings){const o=a.prototype.getSettings;a.prototype.getSettings=function(){const l=o.apply(this,arguments);return r(l,"mozAutoGainControl","autoGainControl"),r(l,"mozNoiseSuppression","noiseSuppression"),l}}if(a&&a.prototype.applyConstraints){const o=a.prototype.applyConstraints;a.prototype.applyConstraints=function(l){return this.kind==="audio"&&typeof l=="object"&&(l=JSON.parse(JSON.stringify(l)),r(l,"autoGainControl","mozAutoGainControl"),r(l,"noiseSuppression","mozNoiseSuppression")),o.apply(this,[l])}}}}function xP1(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||!e.navigator.mediaDevices||(e.navigator.mediaDevices.getDisplayMedia=function(a){if(!(a&&a.video)){const r=new DOMException("getDisplayMedia without video constraints is undefined");return r.name="NotFoundError",r.code=8,Promise.reject(r)}return a.video===!0?a.video={mediaSource:t}:a.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(a)})}function NY(e){typeof e=="object"&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function Dd(e,t){if(typeof e!="object"||!(e.RTCPeerConnection||e.mozRTCPeerConnection))return;!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(r){const n=e.RTCPeerConnection.prototype[r],o={[r](){return arguments[0]=new(r==="addIceCandidate"?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[r]=o[r]});const i={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},a=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[n,o,l]=arguments;return a.apply(this,[n||null]).then(c=>{if(t.version<53&&!o)try{c.forEach(m=>{m.type=i[m.type]||m.type})}catch(m){if(m.name!=="TypeError")throw m;c.forEach((d,u)=>{c.set(u,Object.assign({},d,{type:i[d.type]||d.type}))})}return c}).then(o,l)}}function TY(e){if(!(typeof e=="object"&&e.RTCPeerConnection&&e.RTCRtpSender)||e.RTCRtpSender&&"getStats"in e.RTCRtpSender.prototype)return;const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const r=t.apply(this,[]);return r.forEach(n=>n._pc=this),r});const i=e.RTCPeerConnection.prototype.addTrack;i&&(e.RTCPeerConnection.prototype.addTrack=function(){const r=i.apply(this,arguments);return r._pc=this,r}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function bY(e){if(!(typeof e=="object"&&e.RTCPeerConnection&&e.RTCRtpSender)||e.RTCRtpSender&&"getStats"in e.RTCRtpReceiver.prototype)return;const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const a=t.apply(this,[]);return a.forEach(r=>r._pc=this),a}),n4(e,"track",i=>(i.receiver._pc=i.srcElement,i)),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function wY(e){!e.RTCPeerConnection||"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(i){bu("removeStream","removeTrack"),this.getSenders().forEach(a=>{a.track&&i.getTracks().includes(a.track)&&this.removeTrack(a)})})}function PY(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function EY(e){if(!(typeof e=="object"&&e.RTCPeerConnection))return;const t=e.RTCPeerConnection.prototype.addTransceiver;t&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let a=arguments[1]&&arguments[1].sendEncodings;a===void 0&&(a=[]),a=[...a];const r=a.length>0;r&&a.forEach(o=>{if("rid"in o&&!/^[a-z0-9]{0,16}$/i.test(o.rid))throw new TypeError("Invalid RID value provided.");if("scaleResolutionDownBy"in o&&!(parseFloat(o.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in o&&!(parseFloat(o.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});const n=t.apply(this,arguments);if(r){const{sender:o}=n,l=o.getParameters();(!("encodings"in l)||l.encodings.length===1&&Object.keys(l.encodings[0]).length===0)&&(l.encodings=a,o.sendEncodings=a,this.setParametersPromises.push(o.setParameters(l).then(()=>{delete o.sendEncodings}).catch(()=>{delete o.sendEncodings})))}return n})}function IY(e){if(!(typeof e=="object"&&e.RTCRtpSender))return;const t=e.RTCRtpSender.prototype.getParameters;t&&(e.RTCRtpSender.prototype.getParameters=function(){const a=t.apply(this,arguments);return"encodings"in a||(a.encodings=[].concat(this.sendEncodings||[{}])),a})}function OY(e){if(!(typeof e=="object"&&e.RTCPeerConnection))return;const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}function UY(e){if(!(typeof e=="object"&&e.RTCPeerConnection))return;const t=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}const Jf=Object.freeze(Object.defineProperty({__proto__:null,shimOnTrack:NY,shimPeerConnection:Dd,shimSenderGetStats:TY,shimReceiverGetStats:bY,shimRemoveStream:wY,shimRTCDataChannel:PY,shimAddTransceiver:EY,shimGetParameters:IY,shimCreateOffer:OY,shimCreateAnswer:UY,shimGetUserMedia:RY,shimGetDisplayMedia:xP1},Symbol.toStringTag,{value:"Module"}));function xY(e){if(!(typeof e!="object"||!e.RTCPeerConnection)){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(a){this._localStreams||(this._localStreams=[]),this._localStreams.includes(a)||this._localStreams.push(a),a.getAudioTracks().forEach(r=>t.call(this,r,a)),a.getVideoTracks().forEach(r=>t.call(this,r,a))},e.RTCPeerConnection.prototype.addTrack=function(a,...r){return r&&r.forEach(n=>{this._localStreams?this._localStreams.includes(n)||this._localStreams.push(n):this._localStreams=[n]}),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(i){this._localStreams||(this._localStreams=[]);const a=this._localStreams.indexOf(i);if(a===-1)return;this._localStreams.splice(a,1);const r=i.getTracks();this.getSenders().forEach(n=>{r.includes(n.track)&&this.removeTrack(n)})})}}function FY(e){if(!(typeof e!="object"||!e.RTCPeerConnection)&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(i){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=i),this.addEventListener("track",this._onaddstreampoly=a=>{a.streams.forEach(r=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(r))return;this._remoteStreams.push(r);const n=new Event("addstream");n.stream=r,this.dispatchEvent(n)})})}});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){const a=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(r){r.streams.forEach(n=>{if(a._remoteStreams||(a._remoteStreams=[]),a._remoteStreams.indexOf(n)>=0)return;a._remoteStreams.push(n);const o=new Event("addstream");o.stream=n,a.dispatchEvent(o)})}),t.apply(a,arguments)}}}function BY(e){if(typeof e!="object"||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype,i=t.createOffer,a=t.createAnswer,r=t.setLocalDescription,n=t.setRemoteDescription,o=t.addIceCandidate;t.createOffer=function(m,d){const u=arguments.length>=2?arguments[2]:arguments[0],h=i.apply(this,[u]);return d?(h.then(m,d),Promise.resolve()):h},t.createAnswer=function(m,d){const u=arguments.length>=2?arguments[2]:arguments[0],h=a.apply(this,[u]);return d?(h.then(m,d),Promise.resolve()):h};let l=function(c,m,d){const u=r.apply(this,[c]);return d?(u.then(m,d),Promise.resolve()):u};t.setLocalDescription=l,l=function(c,m,d){const u=n.apply(this,[c]);return d?(u.then(m,d),Promise.resolve()):u},t.setRemoteDescription=l,l=function(c,m,d){const u=o.apply(this,[c]);return d?(u.then(m,d),Promise.resolve()):u},t.addIceCandidate=l}function kY(e){const t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){const i=t.mediaDevices,a=i.getUserMedia.bind(i);t.mediaDevices.getUserMedia=r=>a(zY(r))}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(a,r,n){t.mediaDevices.getUserMedia(a).then(r,n)}.bind(t))}function zY(e){return e&&e.video!==void 0?Object.assign({},e,{video:LY(e.video)}):e}function ZY(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection;e.RTCPeerConnection=function(a,r){if(a&&a.iceServers){const n=[];for(let o=0;oo.receiver.track.kind==="audio");a.offerToReceiveAudio===!1&&r?r.direction==="sendrecv"?r.setDirection?r.setDirection("sendonly"):r.direction="sendonly":r.direction==="recvonly"&&(r.setDirection?r.setDirection("inactive"):r.direction="inactive"):a.offerToReceiveAudio===!0&&!r&&this.addTransceiver("audio",{direction:"recvonly"}),typeof a.offerToReceiveVideo<"u"&&(a.offerToReceiveVideo=!!a.offerToReceiveVideo);const n=this.getTransceivers().find(o=>o.receiver.track.kind==="video");a.offerToReceiveVideo===!1&&n?n.direction==="sendrecv"?n.setDirection?n.setDirection("sendonly"):n.direction="sendonly":n.direction==="recvonly"&&(n.setDirection?n.setDirection("inactive"):n.direction="inactive"):a.offerToReceiveVideo===!0&&!n&&this.addTransceiver("video",{direction:"recvonly"})}return t.apply(this,arguments)}}function XY(e){typeof e!="object"||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}const eL=Object.freeze(Object.defineProperty({__proto__:null,shimLocalStreamsAPI:xY,shimRemoteStreamsAPI:FY,shimCallbacksAPI:BY,shimGetUserMedia:kY,shimConstraints:zY,shimRTCIceServerUrls:ZY,shimTrackEventTransceiver:GY,shimCreateOfferLegacy:WY,shimAudioContext:XY},Symbol.toStringTag,{value:"Module"}));var wu={exports:{}};(function(e){const t={};t.generateIdentifier=function(){return Math.random().toString(36).substring(2,12)},t.localCName=t.generateIdentifier(),t.splitLines=function(i){return i.trim().split(` `).map(a=>a.trim())},t.splitSections=function(i){return i.split(` m=`).map((r,n)=>(n>0?"m="+r:r).trim()+`\r `)},t.getDescription=function(i){const a=t.splitSections(i);return a&&a[0]},t.getMediaSections=function(i){const a=t.splitSections(i);return a.shift(),a},t.matchPrefix=function(i,a){return t.splitLines(i).filter(r=>r.indexOf(a)===0)},t.parseCandidate=function(i){let a;i.indexOf("a=candidate:")===0?a=i.substring(12).split(" "):a=i.substring(10).split(" ");const r={foundation:a[0],component:{1:"rtp",2:"rtcp"}[a[1]]||a[1],protocol:a[2].toLowerCase(),priority:parseInt(a[3],10),ip:a[4],address:a[4],port:parseInt(a[5],10),type:a[7]};for(let n=8;n Cockpit - + diff --git a/sw.js b/sw.js index 214456ba2..5b1eaa1f5 100644 --- a/sw.js +++ b/sw.js @@ -1 +1 @@ -if(!self.define){let e,r={};const i=(i,n)=>(i=new URL(i+".js",n).href,r[i]||new Promise((r=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=r,document.head.appendChild(e)}else e=i,importScripts(i),r()})).then((()=>{let e=r[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(n,s)=>{const l=e||("document"in self?document.currentScript.src:"")||location.href;if(r[l])return;let o={};const t=e=>i(e,l),c={module:{uri:l},exports:o,require:t};r[l]=Promise.all(n.map((e=>c[e]||t(e)))).then((e=>(s(...e),o)))}}define(["./workbox-9bc8a7af"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"electron/main.js",revision:"79f3bbfb05e945b35c338b1d717f0adf"},{url:"index.html",revision:"bf8c593694b3edb6be076262d84ed499"},{url:"leaflet-src.esm.13473dcf.js",revision:null},{url:"marker-icon-2x.68378269.js",revision:null},{url:"marker-icon.753d5637.js",revision:null},{url:"marker-shadow.40fd21b3.js",revision:null},{url:"registerSW.js",revision:"402b66900e731ca748771b6fc5e7a068"},{url:"style.ef4a8664.css",revision:null},{url:"webfontloader.3696e2c4.js",revision:null},{url:"favicon.ico",revision:"b54531a824aa22f592590e347be8347c"},{url:"apple-touch-icon.png",revision:"4d6428d260d0f769a26ed6ce0387d0c1"},{url:"manifest.webmanifest",revision:"a28c2c0a5d92b960e17dd3757933e534"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))})); +if(!self.define){let e,r={};const i=(i,n)=>(i=new URL(i+".js",n).href,r[i]||new Promise((r=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=r,document.head.appendChild(e)}else e=i,importScripts(i),r()})).then((()=>{let e=r[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(n,s)=>{const l=e||("document"in self?document.currentScript.src:"")||location.href;if(r[l])return;let o={};const c=e=>i(e,l),t={module:{uri:l},exports:o,require:c};r[l]=Promise.all(n.map((e=>t[e]||c(e)))).then((e=>(s(...e),o)))}}define(["./workbox-9bc8a7af"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"electron/main.js",revision:"79f3bbfb05e945b35c338b1d717f0adf"},{url:"index.html",revision:"2bb4b47e63c6ec0994f9c2ecbcf8105d"},{url:"leaflet-src.esm.13473dcf.js",revision:null},{url:"marker-icon-2x.68378269.js",revision:null},{url:"marker-icon.753d5637.js",revision:null},{url:"marker-shadow.40fd21b3.js",revision:null},{url:"registerSW.js",revision:"402b66900e731ca748771b6fc5e7a068"},{url:"style.ef4a8664.css",revision:null},{url:"webfontloader.3696e2c4.js",revision:null},{url:"favicon.ico",revision:"b54531a824aa22f592590e347be8347c"},{url:"apple-touch-icon.png",revision:"4d6428d260d0f769a26ed6ce0387d0c1"},{url:"manifest.webmanifest",revision:"a28c2c0a5d92b960e17dd3757933e534"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}));