@htmlbricks/hb-player-live-camera-ptz 0.20.18 → 0.50.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/main.iife.js +73 -0
- package/{release/manifest.json → manifest.json} +3 -4
- package/package.json +15 -86
- package/types/webcomponent.type.d.json +139 -0
- package/types/webcomponent_events.type.d.json +353 -0
- package/LICENSE.md +0 -68
- package/README.md +0 -2
- package/extra/docs.ts +0 -168
- package/release/docs.js +0 -155
- package/release/docs.js.map +0 -1
- package/release/docs.ts +0 -168
- package/release/release.js +0 -2
- package/release/release.js.map +0 -1
- /package/{release → types}/webcomponent.type.d.ts +0 -0
package/main.iife.js
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
var So=Object.defineProperty;var ai=R=>{throw TypeError(R)};var Ao=(R,L,H)=>L in R?So(R,L,{enumerable:!0,configurable:!0,writable:!0,value:H}):R[L]=H;var _e=(R,L,H)=>Ao(R,typeof L!="symbol"?L+"":L,H),ui=(R,L,H)=>L.has(R)||ai("Cannot "+H);var Q=(R,L,H)=>(ui(R,L,"read from private field"),H?H.call(R):L.get(R)),Or=(R,L,H)=>L.has(R)?ai("Cannot add the same private member more than once"):L instanceof WeakSet?L.add(R):L.set(R,H),Nr=(R,L,H,mt)=>(ui(R,L,"write to private field"),mt?mt.call(R,H):L.set(R,H),H);(function(R){"use strict";var Ae,oe;const L="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(L);const H=1,mt=4,ci=8,fi=16,di=1,vi=2,Bt="[",Cr="[!",Rr="]",st={},K=Symbol(),Jt=!1,ue=2,jr=4,bt=8,Ut=16,Ee=32,Ue=64,pt=128,ie=256,gt=512,X=1024,Te=2048,Xe=4096,We=8192,yt=16384,_i=32768,Xt=65536,Ir=1<<19,Dr=1<<20,xt=Symbol("$state"),Lr=Symbol("legacy props"),hi=Symbol("");var zr=Array.isArray,mi=Array.prototype.indexOf,bi=Array.from,wt=Object.keys,$t=Object.defineProperty,Me=Object.getOwnPropertyDescriptor,pi=Object.getOwnPropertyDescriptors,gi=Object.prototype,yi=Array.prototype,Vr=Object.getPrototypeOf;function Mr(e){for(var t=0;t<e.length;t++)e[t]()}const xi=typeof requestIdleCallback>"u"?e=>setTimeout(e,1):requestIdleCallback;let kt=!1,Et=!1,Wt=[],Zt=[];function qr(){kt=!1;const e=Wt.slice();Wt=[],Mr(e)}function Fr(){Et=!1;const e=Zt.slice();Zt=[],Mr(e)}function Gr(e){kt||(kt=!0,queueMicrotask(qr)),Wt.push(e)}function wi(e){Et||(Et=!0,xi(Fr)),Zt.push(e)}function $i(){kt&&qr(),Et&&Fr()}function Yr(e){return e===this.v}function ki(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Hr(e){return!ki(e,this.v)}function Ei(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Ti(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Pi(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Si(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ai(){throw new Error("https://svelte.dev/e/hydration_failed")}function Oi(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Ni(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Ci(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Ri(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function ji(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let Ii=!1;function he(e,t){var r={f:0,v:e,reactions:null,equals:Yr,rv:0,wv:0};return r}function G(e){return Di(he(e))}function Br(e,t=!1){const r=he(e);return t||(r.equals=Hr),r}function Di(e){return P!==null&&!ge&&P.f&ue&&(we===null?Yi([e]):we.push(e)),e}function g(e,t){return P!==null&&!ge&&$n()&&P.f&(ue|Ut)&&(we===null||!we.includes(e))&&ji(),Li(e,t)}function Li(e,t){return e.equals(t)||(e.v,e.v=t,e.wv=ln(),Jr(e,Te),S!==null&&S.f&X&&!(S.f&(Ee|Ue))&&(Pe===null?Hi([e]):Pe.push(e))),t}function Jr(e,t){var r=e.reactions;if(r!==null)for(var i=r.length,n=0;n<i;n++){var s=r[n],l=s.f;l&Te||($e(s,t),l&(X|ie)&&(l&ue?Jr(s,Xe):Nt(s)))}}function Kt(e){var t=ue|Te,r=P!==null&&P.f&ue?P:null;return S===null||r!==null&&r.f&ie?t|=ie:S.f|=Dr,{ctx:re,deps:null,effects:null,equals:Yr,f:t,fn:e,reactions:null,rv:0,v:null,wv:0,parent:r??S}}function Ur(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)Re(t[r])}}function zi(e){for(var t=e.parent;t!==null;){if(!(t.f&ue))return t;t=t.parent}return null}function Vi(e){var t,r=S;xe(zi(e));try{Ur(e),t=un(e)}finally{xe(r)}return t}function Xr(e){var t=Vi(e),r=(Ce||e.f&ie)&&e.deps!==null?Xe:X;$e(e,r),e.equals(t)||(e.v=t,e.wv=ln())}function Qt(e){console.warn("https://svelte.dev/e/hydration_mismatch")}let O=!1;function me(e){O=e}let z;function be(e){if(e===null)throw Qt(),st;return z=e}function er(){return be(pe(z))}function j(e){if(O){if(pe(z)!==null)throw Qt(),st;z=e}}function Mi(e=1){if(O){for(var t=e,r=z;t--;)r=pe(r);z=r}}function qi(){for(var e=0,t=z;;){if(t.nodeType===8){var r=t.data;if(r===Rr){if(e===0)return t;e-=1}else(r===Bt||r===Cr)&&(e+=1)}var i=pe(t);t.remove(),t=i}}function N(e,t=null,r){if(typeof e!="object"||e===null||xt in e)return e;const i=Vr(e);if(i!==gi&&i!==yi)return e;var n=new Map,s=zr(e),l=he(0);s&&n.set("length",he(e.length));var v;return new Proxy(e,{defineProperty(c,f,a){(!("value"in a)||a.configurable===!1||a.enumerable===!1||a.writable===!1)&&Ni();var _=n.get(f);return _===void 0?(_=he(a.value),n.set(f,_)):g(_,N(a.value,v)),!0},deleteProperty(c,f){var a=n.get(f);if(a===void 0)f in c&&n.set(f,he(K));else{if(s&&typeof f=="string"){var _=n.get("length"),d=Number(f);Number.isInteger(d)&&d<_.v&&g(_,d)}g(a,K),Wr(l)}return!0},get(c,f,a){var y;if(f===xt)return e;var _=n.get(f),d=f in c;if(_===void 0&&(!d||(y=Me(c,f))!=null&&y.writable)&&(_=he(N(d?c[f]:K,v)),n.set(f,_)),_!==void 0){var m=u(_);return m===K?void 0:m}return Reflect.get(c,f,a)},getOwnPropertyDescriptor(c,f){var a=Reflect.getOwnPropertyDescriptor(c,f);if(a&&"value"in a){var _=n.get(f);_&&(a.value=u(_))}else if(a===void 0){var d=n.get(f),m=d==null?void 0:d.v;if(d!==void 0&&m!==K)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return a},has(c,f){var m;if(f===xt)return!0;var a=n.get(f),_=a!==void 0&&a.v!==K||Reflect.has(c,f);if(a!==void 0||S!==null&&(!_||(m=Me(c,f))!=null&&m.writable)){a===void 0&&(a=he(_?N(c[f],v):K),n.set(f,a));var d=u(a);if(d===K)return!1}return _},set(c,f,a,_){var B;var d=n.get(f),m=f in c;if(s&&f==="length")for(var y=a;y<d.v;y+=1){var $=n.get(y+"");$!==void 0?g($,K):y in c&&($=he(K),n.set(y+"",$))}d===void 0?(!m||(B=Me(c,f))!=null&&B.writable)&&(d=he(void 0),g(d,N(a,v)),n.set(f,d)):(m=d.v!==K,g(d,N(a,v)));var q=Reflect.getOwnPropertyDescriptor(c,f);if(q!=null&&q.set&&q.set.call(_,a),!m){if(s&&typeof f=="string"){var k=n.get("length"),C=Number(f);Number.isInteger(C)&&C>=k.v&&g(k,C+1)}Wr(l)}return!0},ownKeys(c){u(l);var f=Reflect.ownKeys(c).filter(d=>{var m=n.get(d);return m===void 0||m.v!==K});for(var[a,_]of n)_.v!==K&&!(a in c)&&f.push(a);return f},setPrototypeOf(){Ci()}})}function Wr(e,t=1){g(e,e.v+t)}var Zr,Kr,Qr,en;function tr(){if(Zr===void 0){Zr=window,Kr=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype;Qr=Me(t,"firstChild").get,en=Me(t,"nextSibling").get,e.__click=void 0,e.__className="",e.__attributes=null,e.__styles=null,e.__e=void 0,Text.prototype.__t=void 0}}function ot(e=""){return document.createTextNode(e)}function qe(e){return Qr.call(e)}function pe(e){return en.call(e)}function I(e,t){if(!O)return qe(e);var r=qe(z);if(r===null)r=z.appendChild(ot());else if(t&&r.nodeType!==3){var i=ot();return r==null||r.before(i),be(i),i}return be(r),r}function tn(e,t){if(!O){var r=qe(e);return r instanceof Comment&&r.data===""?pe(r):r}return z}function A(e,t=1,r=!1){let i=O?z:e;for(var n;t--;)n=i,i=pe(i);if(!O)return i;var s=i==null?void 0:i.nodeType;if(r&&s!==3){var l=ot();return i===null?n==null||n.after(l):i.before(l),be(l),l}return be(i),i}function Fi(e){e.textContent=""}const rn=0,Gi=1;let Tt=!1,Pt=rn,lt=!1,at=null,Ze=!1,rr=!1;function nn(e){Ze=e}function sn(e){rr=e}let Fe=[],Ke=0,Oo=[],P=null,ge=!1;function ye(e){P=e}let S=null;function xe(e){S=e}let we=null;function Yi(e){we=e}let W=null,ee=0,Pe=null;function Hi(e){Pe=e}let on=1,St=0,Ce=!1;function ln(){return++on}function ut(e){var _;var t=e.f;if(t&Te)return!0;if(t&Xe){var r=e.deps,i=(t&ie)!==0;if(r!==null){var n,s,l=(t>)!==0,v=i&&S!==null&&!Ce,c=r.length;if(l||v){var f=e,a=f.parent;for(n=0;n<c;n++)s=r[n],(l||!((_=s==null?void 0:s.reactions)!=null&&_.includes(f)))&&(s.reactions??(s.reactions=[])).push(f);l&&(f.f^=gt),v&&a!==null&&!(a.f&ie)&&(f.f^=ie)}for(n=0;n<c;n++)if(s=r[n],ut(s)&&Xr(s),s.wv>e.wv)return!0}(!i||S!==null&&!Ce)&&$e(e,X)}return!1}function Bi(e,t){for(var r=t;r!==null;){if(r.f&pt)try{r.fn(e);return}catch{r.f^=pt}r=r.parent}throw Tt=!1,e}function Ji(e){return(e.f&yt)===0&&(e.parent===null||(e.parent.f&pt)===0)}function At(e,t,r,i){if(Tt){if(r===null&&(Tt=!1),Ji(t))throw e;return}r!==null&&(Tt=!0);{Bi(e,t);return}}function an(e,t,r=!0){var i=e.reactions;if(i!==null)for(var n=0;n<i.length;n++){var s=i[n];s.f&ue?an(s,t,!1):t===s&&(r?$e(s,Te):s.f&X&&$e(s,Xe),Nt(s))}}function un(e){var m;var t=W,r=ee,i=Pe,n=P,s=Ce,l=we,v=re,c=ge,f=e.f;W=null,ee=0,Pe=null,P=f&(Ee|Ue)?null:e,Ce=(f&ie)!==0&&(!Ze||n===null||c),we=null,yn(e.ctx),ge=!1,St++;try{var a=(0,e.fn)(),_=e.deps;if(W!==null){var d;if(Ot(e,ee),_!==null&&ee>0)for(_.length=ee+W.length,d=0;d<W.length;d++)_[ee+d]=W[d];else e.deps=_=W;if(!Ce)for(d=ee;d<_.length;d++)((m=_[d]).reactions??(m.reactions=[])).push(e)}else _!==null&&ee<_.length&&(Ot(e,ee),_.length=ee);if($n()&&Pe!==null&&!ge&&_!==null&&!(e.f&(ue|Xe|Te)))for(d=0;d<Pe.length;d++)an(Pe[d],e);return n!==null&&St++,a}finally{W=t,ee=r,Pe=i,P=n,Ce=s,we=l,yn(v),ge=c}}function Ui(e,t){let r=t.reactions;if(r!==null){var i=mi.call(r,e);if(i!==-1){var n=r.length-1;n===0?r=t.reactions=null:(r[i]=r[n],r.pop())}}r===null&&t.f&ue&&(W===null||!W.includes(t))&&($e(t,Xe),t.f&(ie|gt)||(t.f^=gt),Ur(t),Ot(t,0))}function Ot(e,t){var r=e.deps;if(r!==null)for(var i=t;i<r.length;i++)Ui(e,r[i])}function nr(e){var t=e.f;if(!(t&yt)){$e(e,X);var r=S,i=re;S=e;try{t&Ut?ss(e):hn(e),_n(e);var n=un(e);e.teardown=typeof n=="function"?n:null,e.wv=on;var s=e.deps,l;Jt&&Ii&&e.f&Te}catch(v){At(v,e,r,i||e.ctx)}finally{S=r}}}function cn(){if(Ke>1e3){Ke=0;try{Si()}catch(e){if(at!==null)At(e,at,null);else throw e}}Ke++}function fn(e){var t=e.length;if(t!==0){cn();var r=Ze;Ze=!0;try{for(var i=0;i<t;i++){var n=e[i];n.f&X||(n.f^=X);var s=Zi(n);Xi(s)}}finally{Ze=r}}}function Xi(e){var t=e.length;if(t!==0)for(var r=0;r<t;r++){var i=e[r];if(!(i.f&(yt|We)))try{ut(i)&&(nr(i),i.deps===null&&i.first===null&&i.nodes_start===null&&(i.teardown===null?mn(i):i.fn=null))}catch(n){At(n,i,null,i.ctx)}}}function Wi(){if(lt=!1,Ke>1001)return;const e=Fe;Fe=[],fn(e),lt||(Ke=0,at=null)}function Nt(e){Pt===rn&&(lt||(lt=!0,queueMicrotask(Wi))),at=e;for(var t=e;t.parent!==null;){t=t.parent;var r=t.f;if(r&(Ue|Ee)){if(!(r&X))return;t.f^=X}}Fe.push(t)}function Zi(e){var t=[],r=e.first;e:for(;r!==null;){var i=r.f,n=(i&Ee)!==0,s=n&&(i&X)!==0,l=r.next;if(!s&&!(i&We)){if(i&jr)t.push(r);else if(n)r.f^=X;else{var v=P;try{P=r,ut(r)&&nr(r)}catch(a){At(a,r,null,r.ctx)}finally{P=v}}var c=r.first;if(c!==null){r=c;continue}}if(l===null){let a=r.parent;for(;a!==null;){if(e===a)break e;var f=a.next;if(f!==null){r=f;continue e}a=a.parent}}r=l}return t}function te(e){var t=Pt,r=Fe;try{cn();const n=[];Pt=Gi,Fe=n,lt=!1,fn(r);var i=e==null?void 0:e();return $i(),(Fe.length>0||n.length>0)&&te(),Ke=0,at=null,i}finally{Pt=t,Fe=r}}function u(e){var t=e.f,r=(t&ue)!==0;if(P!==null&&!ge){we!==null&&we.includes(e)&&Ri();var i=P.deps;e.rv<St&&(e.rv=St,W===null&&i!==null&&i[ee]===e?ee++:W===null?W=[e]:(!Ce||!W.includes(e))&&W.push(e))}else if(r&&e.deps===null&&e.effects===null){var n=e,s=n.parent;s!==null&&!(s.f&ie)&&(n.f^=ie)}return r&&(n=e,ut(n)&&Xr(n)),e.v}function ir(e){var t=ge;try{return ge=!0,e()}finally{ge=t}}const Ki=-7169;function $e(e,t){e.f=e.f&Ki|t}function Qi(e){S===null&&P===null&&Pi(),P!==null&&P.f&ie&&S===null&&Ti(),rr&&Ei()}function es(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function Ge(e,t,r,i=!0){var n=(e&Ue)!==0,s=S,l={ctx:re,deps:null,nodes_start:null,nodes_end:null,f:e|Te,first:null,fn:t,last:null,next:null,parent:n?null:s,prev:null,teardown:null,transitions:null,wv:0};if(r){var v=Ze;try{nn(!0),nr(l),l.f|=_i}catch(a){throw Re(l),a}finally{nn(v)}}else t!==null&&Nt(l);var c=r&&l.deps===null&&l.first===null&&l.nodes_start===null&&l.teardown===null&&(l.f&(Dr|pt))===0;if(!c&&!n&&i&&(s!==null&&es(l,s),P!==null&&P.f&ue)){var f=P;(f.effects??(f.effects=[])).push(l)}return l}function ts(e){const t=Ge(bt,null,!1);return $e(t,X),t.teardown=e,t}function rs(e){Qi();var t=S!==null&&(S.f&Ee)!==0&&re!==null&&!re.m;if(t){var r=re;(r.e??(r.e=[])).push({fn:e,effect:S,reaction:P})}else{var i=dn(e);return i}}function ns(e){const t=Ge(Ue,e,!0);return()=>{Re(t)}}function is(e){const t=Ge(Ue,e,!0);return(r={})=>new Promise(i=>{r.outro?lr(t,()=>{Re(t),i(void 0)}):(Re(t),i(void 0))})}function dn(e){return Ge(jr,e,!1)}function vn(e){return Ge(bt,e,!0)}function D(e,t=[],r=Kt){const i=t.map(r);return sr(()=>e(...i.map(u)))}function sr(e,t=0){return Ge(bt|Ut|t,e,!0)}function or(e,t=!0){return Ge(bt|Ee,e,!0,t)}function _n(e){var t=e.teardown;if(t!==null){const r=rr,i=P;sn(!0),ye(null);try{t.call(null)}finally{sn(r),ye(i)}}}function hn(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){var i=r.next;Re(r,t),r=i}}function ss(e){for(var t=e.first;t!==null;){var r=t.next;t.f&Ee||Re(t),t=r}}function Re(e,t=!0){var r=!1;if((t||e.f&Ir)&&e.nodes_start!==null){for(var i=e.nodes_start,n=e.nodes_end;i!==null;){var s=i===n?null:pe(i);i.remove(),i=s}r=!0}hn(e,t&&!r),Ot(e,0),$e(e,yt);var l=e.transitions;if(l!==null)for(const c of l)c.stop();_n(e);var v=e.parent;v!==null&&v.first!==null&&mn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=null}function mn(e){var t=e.parent,r=e.prev,i=e.next;r!==null&&(r.next=i),i!==null&&(i.prev=r),t!==null&&(t.first===e&&(t.first=i),t.last===e&&(t.last=r))}function lr(e,t){var r=[];bn(e,r,!0),os(r,()=>{Re(e),t&&t()})}function os(e,t){var r=e.length;if(r>0){var i=()=>--r||t();for(var n of e)n.out(i)}else t()}function bn(e,t,r){if(!(e.f&We)){if(e.f^=We,e.transitions!==null)for(const l of e.transitions)(l.is_global||r)&&t.push(l);for(var i=e.first;i!==null;){var n=i.next,s=(i.f&Xt)!==0||(i.f&Ee)!==0;bn(i,t,s?r:!1),i=n}}}function pn(e){gn(e,!0)}function gn(e,t){if(e.f&We){e.f^=We,e.f&X||(e.f^=X),ut(e)&&($e(e,Te),Nt(e));for(var r=e.first;r!==null;){var i=r.next,n=(r.f&Xt)!==0||(r.f&Ee)!==0;gn(r,n?t:!1),r=i}if(e.transitions!==null)for(const s of e.transitions)(s.is_global||t)&&s.in()}}let re=null;function yn(e){re=e}function xn(e,t=!1,r){re={p:re,c:null,e:null,m:!1,s:e,x:null,l:null}}function wn(e){const t=re;if(t!==null){e!==void 0&&(t.x=e);const l=t.e;if(l!==null){var r=S,i=P;t.e=null;try{for(var n=0;n<l.length;n++){var s=l[n];xe(s.effect),ye(s.reaction),dn(s.fn)}}finally{xe(r),ye(i)}}re=t.p,t.m=!0}return e||{}}function $n(){return!0}const ls=["touchstart","touchmove"];function as(e){return ls.includes(e)}let kn=!1;function En(){kn||(kn=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const r of e.target.elements)(t=r.__on_r)==null||t.call(r)})},{capture:!0}))}function Tn(e){var t=P,r=S;ye(null),xe(null);try{return e()}finally{ye(t),xe(r)}}function us(e,t,r,i=r){e.addEventListener(t,()=>Tn(r));const n=e.__on_r;n?e.__on_r=()=>{n(),i(!0)}:e.__on_r=()=>i(!0),En()}const Pn=new Set,ar=new Set;function cs(e,t,r,i={}){function n(s){if(i.capture||ct.call(t,s),!s.cancelBubble)return Tn(()=>r==null?void 0:r.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Gr(()=>{t.addEventListener(e,n,i)}):t.addEventListener(e,n,i),n}function ne(e,t,r,i,n){var s={capture:i,passive:n},l=cs(e,t,r,s);(t===document.body||t===window||t===document)&&ts(()=>{t.removeEventListener(e,l,s)})}function fs(e){for(var t=0;t<e.length;t++)Pn.add(e[t]);for(var r of ar)r(e)}function ct(e){var C;var t=this,r=t.ownerDocument,i=e.type,n=((C=e.composedPath)==null?void 0:C.call(e))||[],s=n[0]||e.target,l=0,v=e.__root;if(v){var c=n.indexOf(v);if(c!==-1&&(t===document||t===window)){e.__root=t;return}var f=n.indexOf(t);if(f===-1)return;c<=f&&(l=c)}if(s=n[l]||e.target,s!==t){$t(e,"currentTarget",{configurable:!0,get(){return s||r}});var a=P,_=S;ye(null),xe(null);try{for(var d,m=[];s!==null;){var y=s.assignedSlot||s.parentNode||s.host||null;try{var $=s["__"+i];if($!==void 0&&!s.disabled)if(zr($)){var[q,...k]=$;q.apply(s,[e,...k])}else $.call(s,e)}catch(B){d?m.push(B):d=B}if(e.cancelBubble||y===t||y===null)break;s=y}if(d){for(let B of m)queueMicrotask(()=>{throw B});throw d}}finally{e.__root=t,delete e.currentTarget,ye(a),xe(_)}}}let se;function ds(){se=void 0}function vs(e){let t=null,r=O;var i;if(O){for(t=z,se===void 0&&(se=qe(document.head));se!==null&&(se.nodeType!==8||se.data!==Bt);)se=pe(se);se===null?me(!1):se=be(pe(se))}O||(i=document.head.appendChild(ot()));try{sr(()=>e(i),Ir)}finally{r&&(me(!0),se=z,be(t))}}function _s(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function Ct(e,t){var r=S;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function Ye(e,t){var r=(t&di)!==0,i=(t&vi)!==0,n,s=!e.startsWith("<!>");return()=>{if(O)return Ct(z,null),z;n===void 0&&(n=_s(s?e:"<!>"+e),r||(n=qe(n)));var l=i||Kr?document.importNode(n,!0):n.cloneNode(!0);if(r){var v=qe(l),c=l.lastChild;Ct(v,c)}else Ct(l,l);return l}}function je(e,t){if(O){S.nodes_end=z,er();return}e!==null&&e.before(t)}function Rt(e,t){var r=t==null?"":typeof t=="object"?t+"":t;r!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=r,e.nodeValue=r+"")}function Sn(e,t){return An(e,t)}function hs(e,t){tr(),t.intro=t.intro??!1;const r=t.target,i=O,n=z;try{for(var s=qe(r);s&&(s.nodeType!==8||s.data!==Bt);)s=pe(s);if(!s)throw st;me(!0),be(s),er();const l=An(e,{...t,anchor:s});if(z===null||z.nodeType!==8||z.data!==Rr)throw Qt(),st;return me(!1),l}catch(l){if(l===st)return t.recover===!1&&Ai(),tr(),Fi(r),me(!1),Sn(e,t);throw l}finally{me(i),be(n),ds()}}const Qe=new Map;function An(e,{target:t,anchor:r,props:i={},events:n,context:s,intro:l=!0}){tr();var v=new Set,c=_=>{for(var d=0;d<_.length;d++){var m=_[d];if(!v.has(m)){v.add(m);var y=as(m);t.addEventListener(m,ct,{passive:y});var $=Qe.get(m);$===void 0?(document.addEventListener(m,ct,{passive:y}),Qe.set(m,1)):Qe.set(m,$+1)}}};c(bi(Pn)),ar.add(c);var f=void 0,a=is(()=>{var _=r??t.appendChild(ot());return or(()=>{if(s){xn({});var d=re;d.c=s}n&&(i.$$events=n),O&&Ct(_,null),f=e(_,i)||{},O&&(S.nodes_end=z),s&&wn()}),()=>{var y;for(var d of v){t.removeEventListener(d,ct);var m=Qe.get(d);--m===0?(document.removeEventListener(d,ct),Qe.delete(d)):Qe.set(d,m)}ar.delete(c),_!==r&&((y=_.parentNode)==null||y.removeChild(_))}});return ur.set(f,a),f}let ur=new WeakMap;function ms(e,t){const r=ur.get(e);return r?(ur.delete(e),r(t)):Promise.resolve()}function jt(e,t,r=!1){O&&er();var i=e,n=null,s=null,l=K,v=r?Xt:0,c=!1;const f=(_,d=!0)=>{c=!0,a(d,_)},a=(_,d)=>{if(l===(l=_))return;let m=!1;if(O){const y=i.data===Cr;!!l===y&&(i=qi(),be(i),me(!1),m=!0)}l?(n?pn(n):d&&(n=or(()=>d(i))),s&&lr(s,()=>{s=null})):(s?pn(s):d&&(s=or(()=>d(i))),n&&lr(n,()=>{n=null})),m&&me(!0)};sr(()=>{c=!1,t(f),c||a(null,null)},v),O&&(i=z)}function bs(e,t){Gr(()=>{var r=e.getRootNode(),i=r.host?r:r.head??r.ownerDocument.head;if(!i.querySelector("#"+t.hash)){const n=document.createElement("style");n.id=t.hash,n.textContent=t.code,i.appendChild(n)}})}function On(e){if(O){var t=!1,r=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var i=e.value;Se(e,"value",null),e.value=i}if(e.hasAttribute("checked")){var n=e.checked;Se(e,"checked",null),e.checked=n}}};e.__on_r=r,wi(r),En()}}function Se(e,t,r,i){var n=e.__attributes??(e.__attributes={});O&&(n[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||n[t]!==(n[t]=r)&&(t==="style"&&"__styles"in e&&(e.__styles={}),t==="loading"&&(e[hi]=r),r==null?e.removeAttribute(t):typeof r!="string"&&Nn(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function p(e,t,r){var i=P,n=S;let s=O;O&&me(!1),ye(null),xe(null);try{(cr.has(e.nodeName)||!customElements||customElements.get(e.tagName.toLowerCase())?Nn(e).includes(t):r&&typeof r=="object")?e[t]=r:Se(e,t,r==null?r:String(r))}finally{ye(i),xe(n),s&&me(!0)}}var cr=new Map;function Nn(e){var t=cr.get(e.nodeName);if(t)return t;cr.set(e.nodeName,t=[]);for(var r,i=e,n=Element.prototype;n!==i;){r=pi(i);for(var s in r)r[s].set&&t.push(s);i=Vr(i)}return t}function ke(e,t,r){var i=e.__className,n=ps(t);O&&e.className===n?e.__className=n:(i!==n||O&&e.className!==n)&&(t==null?e.removeAttribute("class"):e.className=n,e.__className=n)}function ps(e,t){return(e??"")+""}function Cn(e,t,r=t){us(e,"input",i=>{var n=i?e.defaultValue:e.value;if(n=fr(e)?dr(n):n,r(n),n!==(n=t())){var s=e.selectionStart,l=e.selectionEnd;e.value=n??"",l!==null&&(e.selectionStart=s,e.selectionEnd=Math.min(l,e.value.length))}}),(O&&e.defaultValue!==e.value||ir(t)==null&&e.value)&&r(fr(e)?dr(e.value):e.value),vn(()=>{var i=t();fr(e)&&i===dr(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function fr(e){var t=e.type;return t==="number"||t==="range"}function dr(e){return e===""?null:+e}let It=!1;function gs(e){var t=It;try{return It=!1,[e(),It]}finally{It=t}}function ce(e,t,r,i){var Ie;var n=(r&H)!==0,s=!0,l=(r&ci)!==0,v=(r&fi)!==0,c=!1,f;l?[f,c]=gs(()=>e[t]):f=e[t];var a=xt in e||Lr in e,_=l&&(((Ie=Me(e,t))==null?void 0:Ie.set)??(a&&t in e&&(Y=>e[t]=Y)))||void 0,d=i,m=!0,y=!1,$=()=>(y=!0,m&&(m=!1,v?d=ir(i):d=i),d);f===void 0&&i!==void 0&&(_&&s&&Oi(),f=$(),_&&_(f));var q;if(q=()=>{var Y=e[t];return Y===void 0?$():(m=!0,y=!1,Y)},!(r&mt))return q;if(_){var k=e.$$legacy;return function(Y,V){return arguments.length>0?((!V||k||c)&&_(V?q():Y),Y):q()}}var C=!1,B=Br(f),le=Kt(()=>{var Y=q(),V=u(B);return C?(C=!1,V):B.v=Y});return n||(le.equals=Hr),function(Y,V){if(arguments.length>0){const J=V?u(le):l?N(Y):Y;return le.equals(J)||(C=!0,g(B,J),y&&d!==void 0&&(d=J),ir(()=>u(le))),Y}return u(le)}}function ys(e){return new xs(e)}class xs{constructor(t){Or(this,Ae);Or(this,oe);var s;var r=new Map,i=(l,v)=>{var c=Br(v);return r.set(l,c),c};const n=new Proxy({...t.props||{},$$events:{}},{get(l,v){return u(r.get(v)??i(v,Reflect.get(l,v)))},has(l,v){return v===Lr?!0:(u(r.get(v)??i(v,Reflect.get(l,v))),Reflect.has(l,v))},set(l,v,c){return g(r.get(v)??i(v,c),c),Reflect.set(l,v,c)}});Nr(this,oe,(t.hydrate?hs:Sn)(t.component,{target:t.target,anchor:t.anchor,props:n,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((s=t==null?void 0:t.props)!=null&&s.$$host)||t.sync===!1)&&te(),Nr(this,Ae,n.$$events);for(const l of Object.keys(Q(this,oe)))l==="$set"||l==="$destroy"||l==="$on"||$t(this,l,{get(){return Q(this,oe)[l]},set(v){Q(this,oe)[l]=v},enumerable:!0});Q(this,oe).$set=l=>{Object.assign(n,l)},Q(this,oe).$destroy=()=>{ms(Q(this,oe))}}$set(t){Q(this,oe).$set(t)}$on(t,r){Q(this,Ae)[t]=Q(this,Ae)[t]||[];const i=(...n)=>r.call(this,...n);return Q(this,Ae)[t].push(i),()=>{Q(this,Ae)[t]=Q(this,Ae)[t].filter(n=>n!==i)}}$destroy(){Q(this,oe).$destroy()}}Ae=new WeakMap,oe=new WeakMap;let Rn;typeof HTMLElement=="function"&&(Rn=class extends HTMLElement{constructor(t,r,i){super();_e(this,"$$ctor");_e(this,"$$s");_e(this,"$$c");_e(this,"$$cn",!1);_e(this,"$$d",{});_e(this,"$$r",!1);_e(this,"$$p_d",{});_e(this,"$$l",{});_e(this,"$$l_u",new Map);_e(this,"$$me");this.$$ctor=t,this.$$s=r,i&&this.attachShadow({mode:"open"})}addEventListener(t,r,i){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(r),this.$$c){const n=this.$$c.$on(t,r);this.$$l_u.set(r,n)}super.addEventListener(t,r,i)}removeEventListener(t,r,i){if(super.removeEventListener(t,r,i),this.$$c){const n=this.$$l_u.get(r);n&&(n(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(n){return s=>{const l=document.createElement("slot");n!=="default"&&(l.name=n),je(s,l)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},i=ws(this);for(const n of this.$$s)n in i&&(n==="default"&&!this.$$d.children?(this.$$d.children=t(n),r.default=!0):r[n]=t(n));for(const n of this.attributes){const s=this.$$g_p(n.name);s in this.$$d||(this.$$d[s]=Dt(s,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=ys({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=ns(()=>{vn(()=>{var n;this.$$r=!0;for(const s of wt(this.$$c)){if(!((n=this.$$p_d[s])!=null&&n.reflect))continue;this.$$d[s]=this.$$c[s];const l=Dt(s,this.$$d[s],this.$$p_d,"toAttribute");l==null?this.removeAttribute(this.$$p_d[s].attribute||s):this.setAttribute(this.$$p_d[s].attribute||s,l)}this.$$r=!1})});for(const n in this.$$l)for(const s of this.$$l[n]){const l=this.$$c.$on(n,s);this.$$l_u.set(s,l)}this.$$l={}}}attributeChangedCallback(t,r,i){var n;this.$$r||(t=this.$$g_p(t),this.$$d[t]=Dt(t,i,this.$$p_d,"toProp"),(n=this.$$c)==null||n.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return wt(this.$$p_d).find(r=>this.$$p_d[r].attribute===t||!this.$$p_d[r].attribute&&r.toLowerCase()===t)||t}});function Dt(e,t,r,i){var s;const n=(s=r[e])==null?void 0:s.type;if(t=n==="Boolean"&&typeof t!="boolean"?t!=null:t,!i||!r[e])return t;if(i==="toAttribute")switch(n){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(n){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function ws(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function $s(e,t,r,i,n,s){let l=class extends Rn{constructor(){super(e,r,n),this.$$p_d=t}static get observedAttributes(){return wt(t).map(v=>(t[v].attribute||v).toLowerCase())}};return wt(t).forEach(v=>{$t(l.prototype,v,{get(){return this.$$c&&v in this.$$c?this.$$c[v]:this.$$d[v]},set(c){var _;c=Dt(v,c,t),this.$$d[v]=c;var f=this.$$c;if(f){var a=(_=Me(f,v))==null?void 0:_.get;a?f[v]=c:f.$set({[v]:c})}}})}),i.forEach(v=>{$t(l.prototype,v,{get(){var c;return(c=this.$$c)==null?void 0:c[v]}})}),e.element=l,l}const Lt={version:"0.50.0-alpha.10"};function ks(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var et={},vr,jn;function Es(){if(jn)return vr;jn=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,n=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,v=/^\s+|\s+$/g,c=`
|
|
2
|
+
`,f="/",a="*",_="",d="comment",m="declaration";vr=function($,q){if(typeof $!="string")throw new TypeError("First argument must be a string");if(!$)return[];q=q||{};var k=1,C=1;function B(E){var x=E.match(t);x&&(k+=x.length);var U=E.lastIndexOf(c);C=~U?E.length-U:C+E.length}function le(){var E={line:k,column:C};return function(x){return x.position=new Ie(E),J(),x}}function Ie(E){this.start=E,this.end={line:k,column:C},this.source=q.source}Ie.prototype.content=$;function Y(E){var x=new Error(q.source+":"+k+":"+C+": "+E);if(x.reason=E,x.filename=q.source,x.line=k,x.column=C,x.source=$,!q.silent)throw x}function V(E){var x=E.exec($);if(x){var U=x[0];return B(U),$=$.slice(U.length),x}}function J(){V(r)}function ft(E){var x;for(E=E||[];x=tt();)x!==!1&&E.push(x);return E}function tt(){var E=le();if(!(f!=$.charAt(0)||a!=$.charAt(1))){for(var x=2;_!=$.charAt(x)&&(a!=$.charAt(x)||f!=$.charAt(x+1));)++x;if(x+=2,_===$.charAt(x-1))return Y("End of comment missing");var U=$.slice(2,x-2);return C+=2,B(U),$=$.slice(x),C+=2,E({type:d,comment:U})}}function dt(){var E=le(),x=V(i);if(x){if(tt(),!V(n))return Y("property missing ':'");var U=V(s),vt=E({type:m,property:y(x[0].replace(e,_)),value:U?y(U[0].replace(e,_)):_});return V(l),vt}}function rt(){var E=[];ft(E);for(var x;x=dt();)x!==!1&&(E.push(x),ft(E));return E}return J(),rt()};function y($){return $?$.replace(v,_):_}return vr}var In;function Ts(){if(In)return et;In=1;var e=et&&et.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(et,"__esModule",{value:!0}),et.default=r;var t=e(Es());function r(i,n){var s=null;if(!i||typeof i!="string")return s;var l=(0,t.default)(i),v=typeof n=="function";return l.forEach(function(c){if(c.type==="declaration"){var f=c.property,a=c.value;v?n(f,a,c):a&&(s=s||{},s[f]=a)}}),s}return et}var Ps=Ts();const Dn=ks(Ps),Ss=Dn.default||Dn;function zt(e,t){var i,n;let r="";if(e&&(t!=null&&t.length)&&((i=Object.keys(e))!=null&&i.length)&&((n=t==null?void 0:t.filter(s=>Object.keys(e).includes(s.name)))!=null&&n.length))for(const s of Object.keys(e))(t==null?void 0:t.filter(v=>v.name===s&&v.defaultValue!==e[s]))&&(r+=`${s}:${e[s]};`);return r}function Vt(e){var i;const t=((i=e==null?void 0:e.repoName.split("/"))==null?void 0:i[1])||(e==null?void 0:e.repoName);if(!t)throw new Error("wrong componentPath "+(e==null?void 0:e.repoName));if(!(e!=null&&e.version))throw new Error("wrong version "+(e==null?void 0:e.version));const r=(e==null?void 0:e.iifePath)||"main.iife.js";if(!document.getElementById(t+"-script"))try{const n=document.createElement("script");n.id=t+"-script",n.src=`https://cdn.jsdelivr.net/npm/${e.repoName}@${e.version}/${r}`,e!=null&&e.local&&location.href.includes("localhost")&&(n.src=`${e.local}`),document.head.appendChild(n)}catch(n){console.warn(n)}}const _r={vars:[]},hr={vars:[{name:"--hb-pad-joystick-size",description:"pad/joystick size",defaultValue:"200px",valueType:"htmlsize"}]},mr={vars:[{name:"--bs-primary",valueType:"color",theme:"bootstrap",defaultValue:"#07689f"},{name:"--bs-secondary",valueType:"color",theme:"bootstrap",defaultValue:"#c9d6df"},{name:"--bs-success",valueType:"color",theme:"bootstrap",defaultValue:"#11d3bc"},{name:"--bs-info",valueType:"color",theme:"bootstrap",defaultValue:"#a2d5f2"},{name:"--bs-warning",valueType:"color",theme:"bootstrap",defaultValue:"#ffc107"},{name:"--bs-danger",valueType:"color",theme:"bootstrap",defaultValue:"#f67280"}]},br={vars:[{name:"--bs-primary",valueType:"color",theme:"bootstrap",defaultValue:"#07689f"},{name:"--bs-secondary",valueType:"color",theme:"bootstrap",defaultValue:"#c9d6df"},{name:"--bs-success",valueType:"color",theme:"bootstrap",defaultValue:"#11d3bc"},{name:"--bs-info",valueType:"color",theme:"bootstrap",defaultValue:"#a2d5f2"},{name:"--bs-warning",valueType:"color",theme:"bootstrap",defaultValue:"#ffc107"},{name:"--bs-danger",valueType:"color",theme:"bootstrap",defaultValue:"#f67280"},{name:"--hb-modal-max-width",valueType:"htmlsize",defaultValue:"500px"}]};var As=Ye('<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css" class="svelte-1i60x2m">'),Os=Ye("<hb-table></hb-table>",2),Ns=Ye("<hb-pad-joystick></hb-pad-joystick>",2),Cs=Ye("<hb-pad-joystick></hb-pad-joystick>",2),Rs=(e,t)=>t("in"),js=(e,t)=>t("out"),Is=(e,t)=>t(),Ds=(e,t)=>t(),Ls=(e,t)=>t(),zs=(e,t)=>t(),Vs=(e,t)=>{var r;return(r=u(t))==null?void 0:r.requestFullscreen()},Ms=(e,t)=>t(),qs=(e,t)=>{t()},Fs=(e,t)=>{u(t)&&(u(t).muted=!u(t).muted)},Gs=(e,t)=>t(),Ys=(e,t)=>t(),Hs=Ye('<div id="controller" class="svelte-1i60x2m"><div id="panel" class="svelte-1i60x2m"><div id="joystick" class="area svelte-1i60x2m"><!></div> <div id="buttons" class="area svelte-1i60x2m"><div class="btn-group svelte-1i60x2m" style="margin-right:10px"><button class="btn btn-sm btn-light svelte-1i60x2m" aria-label="Zoom In"><i class="bi bi-zoom-in svelte-1i60x2m"></i></button> <button class="btn btn-sm btn-light svelte-1i60x2m" aria-label="Zoom Out"><i class="bi bi-zoom-out svelte-1i60x2m"></i></button></div> <button aria-label="Go to home"><i class="bi bi-house-door-fill svelte-1i60x2m"></i></button> <button aria-label="select zone"><i class="bi bi-square svelte-1i60x2m"></i></button></div> <div id="speed" class="area svelte-1i60x2m"><span class="slider_label svelte-1i60x2m">speed:</span> <input class="range svelte-1i60x2m" type="range"></div> <div id="precision" class="area svelte-1i60x2m"><span class="slider_label svelte-1i60x2m">precision:</span> <input class="range svelte-1i60x2m" type="range"></div> <div id="presets_view" class="area svelte-1i60x2m"><button aria-label="showGrid"><i class="bi bi-grid-3x3 svelte-1i60x2m"></i></button> <button aria-label="Toggle joystick mode"><i class="bi bi-joystick svelte-1i60x2m"></i></button> <button style="float:right;margin-right:5px;" class="btn btn-sm btn-light svelte-1i60x2m" aria-label="Enter fullscreen mode"><i class="bi bi-arrows-fullscreen svelte-1i60x2m"></i></button></div> <div id="presets_select" class="area svelte-1i60x2m"><button class="btn btn-sm btn-light svelte-1i60x2m" aria-label="Add Scene to Preset"><i class="bi bi-plus-circle-fill svelte-1i60x2m"></i></button> <button style="width:130px!important;display:inline-block!important" aria-label="Open Presets Modal"> <i style="float:right" class="bi bi-arrow-down-up svelte-1i60x2m"></i></button></div> <div id="presets_buttons" class="area svelte-1i60x2m"><button><i></i></button> <button><i></i></button> <button class="btn btn-sm btn-light svelte-1i60x2m" aria-label="Open settings"><i class="bi bi-sliders svelte-1i60x2m"></i> <span class="timecell svelte-1i60x2m"><span class="svelte-1i60x2m"> </span></span></button></div></div></div>'),Bs=(e,t,r,i)=>{t(!t()),r("panelMove",{id:i(),opened:t()})},Js=Ye('<!> <div id="opener" class="svelte-1i60x2m"><i></i></div>',1),Us=Ye('<hb-dialog><div slot="body-content" class="svelte-1i60x2m"><!></div></hb-dialog> <hb-dialog><div slot="body-content" class="svelte-1i60x2m">Are You sure to add this scene to the preset?</div></hb-dialog> <hb-dialog><div slot="body-content" class="svelte-1i60x2m">Are You sure to go To Home?</div></hb-dialog> <hb-dialog><div slot="body-content" class="svelte-1i60x2m"> </div></hb-dialog> <hb-dialog><div slot="body-content" class="svelte-1i60x2m"> </div></hb-dialog> <div id="container" class="svelte-1i60x2m"><hb-player-live></hb-player-live> <div id="area_selector" class="svelte-1i60x2m"></div> <div id="grid" class="svelte-1i60x2m"><table id="grid_table" class="svelte-1i60x2m"><tbody class="svelte-1i60x2m"><tr class="svelte-1i60x2m"><td class="svelte-1i60x2m"></td><td class="svelte-1i60x2m"></td><td class="svelte-1i60x2m"></td><td class="svelte-1i60x2m"></td></tr><tr class="svelte-1i60x2m"><td class="svelte-1i60x2m"></td><td class="svelte-1i60x2m"></td><td class="svelte-1i60x2m"></td><td class="svelte-1i60x2m"></td></tr><tr class="svelte-1i60x2m"><td class="svelte-1i60x2m"></td><td class="svelte-1i60x2m"></td><td class="svelte-1i60x2m"></td><td class="svelte-1i60x2m"></td></tr><tr class="svelte-1i60x2m"><td class="svelte-1i60x2m"></td><td class="svelte-1i60x2m"></td><td class="svelte-1i60x2m"></td><td class="svelte-1i60x2m"></td></tr></tbody></table></div> <!></div>',3);const Xs={hash:"svelte-1i60x2m",code:`@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");
|
|
3
|
+
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css");:host {font-family:"Roboto", sans-serif;}#grid_table.svelte-1i60x2m {width:100%;height:100%;}#area_selector.svelte-1i60x2m {position:absolute;z-index:2;border:solid 2px red;}#grid.svelte-1i60x2m {position:absolute;top:0px;z-index:2;width:100%;height:100%;}#grid.svelte-1i60x2m td:where(.svelte-1i60x2m) {border:2px solid black;}.area.svelte-1i60x2m {padding:5px;}#container.svelte-1i60x2m {position:relative;width:100%;height:100%;display:block;min-height:160px;}hb-pad-joystick.svelte-1i60x2m {--hb-pad-joystick-size: 100px;}#joystick.svelte-1i60x2m {grid-area:pad;margin-top:7px;display:block;width:100%;text-align:center;}#buttons.svelte-1i60x2m {grid-area:buttons;}#presets_buttons.svelte-1i60x2m {grid-area:presets_buttons;}#speed.svelte-1i60x2m {grid-area:speed;text-align:center;vertical-align:middle;line-height:28px;}#precision.svelte-1i60x2m {grid-area:precision;text-align:center;vertical-align:middle;line-height:28px;}#presets_select.svelte-1i60x2m {grid-area:presets_select;}#presets_view.svelte-1i60x2m {grid-area:presets_view;}#controller.svelte-1i60x2m {position:absolute;top:calc(100% - 160px);width:100%;z-index:3;}#opener.svelte-1i60x2m {background-color:silver;line-height:126px;vertical-align:middle;position:absolute;position:absolute;top:calc(100% - 160px);z-index:4;cursor:pointer;}#panel.svelte-1i60x2m {display:grid;width:500px;height:126px;background-color:rgba(127, 127, 127, 0.8);grid-template-areas:"pad buttons presets_view opener" "pad speed presets_select opener" "pad precision presets_buttons opener";grid-template-columns:120px 200px 180px;grid-template-rows:42px 42px 42px;}.slider_label.svelte-1i60x2m {font-size:0.6em;width:50px;display:inline-block;font-weight:bold;}#player.svelte-1i60x2m {z-index:1;}.timecell.svelte-1i60x2m {font-size:0.8em;line-height:20px;width:56px;display:inline-block;vertical-align:middle;}.range.svelte-1i60x2m {vertical-align:middle;line-height:28px;}
|
|
4
|
+
/*!
|
|
5
|
+
* Bootstrap v5.1.0 (https://getbootstrap.com/)
|
|
6
|
+
* Copyright 2011-2021 The Bootstrap Authors
|
|
7
|
+
* Copyright 2011-2021 Twitter, Inc.
|
|
8
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
9
|
+
*/.svelte-1i60x2m,
|
|
10
|
+
.svelte-1i60x2m::before,
|
|
11
|
+
.svelte-1i60x2m::after {box-sizing:border-box;}
|
|
12
|
+
@media (prefers-reduced-motion: no-preference) {:host {scroll-behavior:smooth;}
|
|
13
|
+
}
|
|
14
|
+
@media (min-width: 1200px) {
|
|
15
|
+
}
|
|
16
|
+
@media (min-width: 1200px) {
|
|
17
|
+
}
|
|
18
|
+
@media (min-width: 1200px) {
|
|
19
|
+
}
|
|
20
|
+
@media (min-width: 1200px) {
|
|
21
|
+
}table.svelte-1i60x2m {caption-side:bottom;border-collapse:collapse;}
|
|
22
|
+
tbody.svelte-1i60x2m,
|
|
23
|
+
tr.svelte-1i60x2m,
|
|
24
|
+
td.svelte-1i60x2m {border-color:inherit;border-style:solid;border-width:0;}button.svelte-1i60x2m {border-radius:0;}button.svelte-1i60x2m:focus:not(:focus-visible) {outline:0;}input.svelte-1i60x2m,
|
|
25
|
+
button.svelte-1i60x2m {margin:0;font-family:inherit;font-size:inherit;line-height:inherit;}button.svelte-1i60x2m {text-transform:none;}button.svelte-1i60x2m {-webkit-appearance:button;}button.svelte-1i60x2m:not(:disabled) {cursor:pointer;}.svelte-1i60x2m::-moz-focus-inner {padding:0;border-style:none;}
|
|
26
|
+
@media (min-width: 1200px) {
|
|
27
|
+
}.svelte-1i60x2m::-webkit-datetime-edit-fields-wrapper,
|
|
28
|
+
.svelte-1i60x2m::-webkit-datetime-edit-text,
|
|
29
|
+
.svelte-1i60x2m::-webkit-datetime-edit-minute,
|
|
30
|
+
.svelte-1i60x2m::-webkit-datetime-edit-hour-field,
|
|
31
|
+
.svelte-1i60x2m::-webkit-datetime-edit-day-field,
|
|
32
|
+
.svelte-1i60x2m::-webkit-datetime-edit-month-field,
|
|
33
|
+
.svelte-1i60x2m::-webkit-datetime-edit-year-field {padding:0;}.svelte-1i60x2m::-webkit-inner-spin-button {height:auto;}
|
|
34
|
+
/* rtl:raw:
|
|
35
|
+
[type="tel"],
|
|
36
|
+
[type="url"],
|
|
37
|
+
[type="email"],
|
|
38
|
+
[type="number"] {
|
|
39
|
+
direction: ltr;
|
|
40
|
+
}
|
|
41
|
+
*/.svelte-1i60x2m::-webkit-search-decoration {-webkit-appearance:none;}.svelte-1i60x2m::-webkit-color-swatch-wrapper {padding:0;}.svelte-1i60x2m::file-selector-button {font:inherit;}.svelte-1i60x2m::-webkit-file-upload-button {font:inherit;-webkit-appearance:button;}.btn.svelte-1i60x2m {display:inline-block;font-weight:400;line-height:1.5;color:#212529;text-align:center;text-decoration:none;vertical-align:middle;cursor:pointer;user-select:none;background-color:transparent;border:1px solid transparent;padding:0.375rem 0.75rem;font-size:1rem;border-radius:0.25rem;transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;}
|
|
42
|
+
@media (prefers-reduced-motion: reduce) {.btn.svelte-1i60x2m {transition:none;}
|
|
43
|
+
}.btn.svelte-1i60x2m:hover {color:#212529;} .btn.svelte-1i60x2m:focus {outline:0;box-shadow:0 0 0 0.25rem rgba(13, 110, 253, 0.25);}.btn.svelte-1i60x2m:disabled {pointer-events:none;opacity:0.65;}.btn-primary.svelte-1i60x2m {color:#fff;background-color:#0d6efd;border-color:#0d6efd;}.btn-primary.svelte-1i60x2m:hover {color:#fff;background-color:rgb(11.05, 93.5, 215.05);border-color:rgb(10.4, 88, 202.4);} .btn-primary.svelte-1i60x2m:focus {color:#fff;background-color:rgb(11.05, 93.5, 215.05);border-color:rgb(10.4, 88, 202.4);box-shadow:0 0 0 0.25rem rgba(49.3, 131.75, 253.3, 0.5);} .btn-primary.svelte-1i60x2m:active {color:#fff;background-color:rgb(10.4, 88, 202.4);border-color:rgb(9.75, 82.5, 189.75);} .btn-primary.svelte-1i60x2m:active:focus {box-shadow:0 0 0 0.25rem rgba(49.3, 131.75, 253.3, 0.5);}.btn-primary.svelte-1i60x2m:disabled {color:#fff;background-color:#0d6efd;border-color:#0d6efd;}.btn-warning.svelte-1i60x2m {color:#000;background-color:#ffc107;border-color:#ffc107;}.btn-warning.svelte-1i60x2m:hover {color:#000;background-color:rgb(255, 202.3, 44.2);border-color:rgb(255, 199.2, 31.8);} .btn-warning.svelte-1i60x2m:focus {color:#000;background-color:rgb(255, 202.3, 44.2);border-color:rgb(255, 199.2, 31.8);box-shadow:0 0 0 0.25rem rgba(216.75, 164.05, 5.95, 0.5);} .btn-warning.svelte-1i60x2m:active {color:#000;background-color:rgb(255, 205.4, 56.6);border-color:rgb(255, 199.2, 31.8);} .btn-warning.svelte-1i60x2m:active:focus {box-shadow:0 0 0 0.25rem rgba(216.75, 164.05, 5.95, 0.5);}.btn-warning.svelte-1i60x2m:disabled {color:#000;background-color:#ffc107;border-color:#ffc107;}.btn-light.svelte-1i60x2m {color:#000;background-color:#f8f9fa;border-color:#f8f9fa;}.btn-light.svelte-1i60x2m:hover {color:#000;background-color:rgb(249.05, 249.9, 250.75);border-color:rgb(248.7, 249.6, 250.5);} .btn-light.svelte-1i60x2m:focus {color:#000;background-color:rgb(249.05, 249.9, 250.75);border-color:rgb(248.7, 249.6, 250.5);box-shadow:0 0 0 0.25rem rgba(210.8, 211.65, 212.5, 0.5);} .btn-light.svelte-1i60x2m:active {color:#000;background-color:rgb(249.4, 250.2, 251);border-color:rgb(248.7, 249.6, 250.5);} .btn-light.svelte-1i60x2m:active:focus {box-shadow:0 0 0 0.25rem rgba(210.8, 211.65, 212.5, 0.5);}.btn-light.svelte-1i60x2m:disabled {color:#000;background-color:#f8f9fa;border-color:#f8f9fa;}.btn-sm.svelte-1i60x2m {padding:0.25rem 0.5rem;font-size:0.875rem;border-radius:0.2rem;}.btn-group.svelte-1i60x2m {position:relative;display:inline-flex;vertical-align:middle;}.btn-group.svelte-1i60x2m > .btn:where(.svelte-1i60x2m) {position:relative;flex:1 1 auto;}
|
|
44
|
+
.btn-group.svelte-1i60x2m > .btn:where(.svelte-1i60x2m):hover,
|
|
45
|
+
.btn-group.svelte-1i60x2m > .btn:where(.svelte-1i60x2m):focus,
|
|
46
|
+
.btn-group.svelte-1i60x2m > .btn:where(.svelte-1i60x2m):active {z-index:1;}.btn-group.svelte-1i60x2m > .btn:where(.svelte-1i60x2m):not(:first-child) {margin-left:-1px;}.btn-group.svelte-1i60x2m > .btn:where(.svelte-1i60x2m):not(:last-child):not(.dropdown-toggle) {border-top-right-radius:0;border-bottom-right-radius:0;}.btn-group.svelte-1i60x2m > .btn:where(.svelte-1i60x2m):nth-child(n+3),
|
|
47
|
+
.btn-group.svelte-1i60x2m > :where(.svelte-1i60x2m):not(.btn-check) + .btn:where(.svelte-1i60x2m) {border-top-left-radius:0;border-bottom-left-radius:0;}
|
|
48
|
+
@media (min-width: 576px) {
|
|
49
|
+
}
|
|
50
|
+
@media (min-width: 768px) {
|
|
51
|
+
}
|
|
52
|
+
@media (min-width: 992px) {
|
|
53
|
+
}
|
|
54
|
+
@media (min-width: 1200px) {
|
|
55
|
+
}
|
|
56
|
+
@media (min-width: 1400px) {
|
|
57
|
+
}
|
|
58
|
+
/* rtl:begin:remove */
|
|
59
|
+
/* rtl:end:remove */
|
|
60
|
+
@media (min-width: 576px) {
|
|
61
|
+
}
|
|
62
|
+
@media (min-width: 768px) {
|
|
63
|
+
}
|
|
64
|
+
@media (min-width: 992px) {
|
|
65
|
+
}
|
|
66
|
+
@media (min-width: 1200px) {
|
|
67
|
+
}
|
|
68
|
+
@media (min-width: 1400px) {
|
|
69
|
+
}
|
|
70
|
+
@media (min-width: 1200px) {
|
|
71
|
+
}
|
|
72
|
+
@media print {
|
|
73
|
+
}`};function Ln(e,t){xn(t,!0),bs(e,Xs);function r(o,h){t.$$host.dispatchEvent(new CustomEvent(o,{detail:h}))}const i={joystick:!0,presets:!0,deletePreset:!0,addPreset:!0,switchPreset:!0,home:!0,zoom:{in:!0,out:!0},pan:!0,tilt:!0,clickToCenter:!0,settings:!0};let n=ce(t,"id",7,""),s=ce(t,"style",7,""),l=ce(t,"live_uri",7,""),v=ce(t,"media_type",7,"auto"),c=ce(t,"presets",23,()=>[]),f=ce(t,"position",7,"right-bottom"),a=ce(t,"configuration",7,i),_=ce(t,"current_preset",7,""),d=ce(t,"is_home",7,void 0),m=ce(t,"is_ptz_connected",7,void 0),y=ce(t,"is_ptz_panel_opened",7,void 0);const $=[{label:"Name",key:"name",copyTxt:!0},{label:"Token",key:"token",copyTxt:!0}],q=[{name:"goto",type:"icon",iconOrText:"arrow-right-circle"},{name:"delete",type:"icon",iconOrText:"x-circle-fill",btnClass:"danger"}];let k=G(void 0),C=G(N({})),B=G(""),le=G(""),Ie=G(""),Y=G(""),V=G("");const J={precision:50,speed:50};let ft=G(N(new Date().toLocaleTimeString())),tt=Kt(()=>{var o;return(o=c())==null?void 0:o.map(h=>({_id:h.token+"_"+h.name,name:h.name,token:h.token}))}),dt=G(!0),rt=G(!1),E=G(!1),x=G(!1),U=G(!1),vt=G(!1),pr=G(!1),Mt=G(!1),qt=G(!1),De=G("dpad"),Oe=G(!1),Le=G(N({top:0,left:0,width:0,height:0})),b={};rs(()=>{s()&&(g(C,N(Ss(s()))),g(B,N(zt(u(C),_r==null?void 0:_r.vars))),g(le,N(zt(u(C),hr==null?void 0:hr.vars))),g(Ie,N(zt(u(C),mr==null?void 0:mr.vars))),g(Y,N(zt(u(C),br==null?void 0:br.vars)))),m()===""&&m(!0),m()||m(!1),typeof m()=="string"&&m(m()==="true"||m()==="yes"),y()===""&&y(!0),y()||y(!1),typeof y()=="string"&&y(y()==="true"||y()==="yes"),d()===""&&d(!0),d()||d(!1),typeof d()=="string"&&d(d()==="true"||d()==="yes"),typeof a()=="string"&&a(JSON.parse(a())),typeof c()=="string"&&c(JSON.parse(c()))}),setInterval(()=>{g(ft,N(new Date().toLocaleTimeString()))},1e3);function zn(o){var w;if(!((w=a())!=null&&w.zoom))return console.error("Zoom is not enabled in the configuration");if(!a().zoom[o])return console.error(`Zoom ${o} is not enabled in the configuration`);const h={time:new Date,id:n(),movementSettings:J,direction:o};r("zoomAction",h)}function Ws(){var o;if(!((o=a())!=null&&o.home))return console.error("Go to home is not enabled in the configuration");n(),r("goToHome",{id:n(),movementSettings:J})}function Zs(){var h;if(!((h=a())!=null&&h.addPreset))return console.error("Add scene to preset is not enabled in the configuration");const o={time:new Date,id:n()};r("setPreset",o)}function Ks(){var w,T;if(!((w=a())!=null&&w.clickToCenter))return console.error("Click to center is not enabled in the configuration");const o=(T=u(k))==null?void 0:T.getBoundingClientRect(),h=Object.assign({time:new Date,id:n(),movementSettings:J,htmlVideoElementWidth:o==null?void 0:o.width,htmlVideoElementHeight:o==null?void 0:o.height},u(Le));r("goToSelectedArea",h),g(Oe,!1),g(Le,N({top:0,left:0,width:0,height:0})),b={}}function Qs(){var o;if(!((o=a())!=null&&o.presets))return console.error("Presets is not enabled in the configuration");g(x,!u(x))}function eo(){var o;if(!((o=a())!=null&&o.addPreset))return console.error("Add scene to preset is not enabled in the configuration");g(U,!u(U))}function to(){var o;if(!((o=a())!=null&&o.home))return console.error("Go to home is not enabled in the configuration");g(Mt,!u(Mt))}function ro(o){var w,T,M;if(!((w=a())!=null&&w.switchPreset))return console.error("Switch preset is not enabled in the configuration");const h=(M=(T=c())==null?void 0:T.find)==null?void 0:M.call(T,ve=>ve.token===o);if(h){const ve=Object.assign({time:new Date,playerId:n(),movementSettings:J},h);r("goToPreset",ve)}else console.error("Preset not found")}function no(){const o={time:new Date,id:n(),htmlVideoElement:u(k)};r("initVideo",o),u(k)&&(u(k).onloadedmetadata=()=>{g(E,!0)},u(k).onpause=()=>{g(dt,!0),g(rt,!1)},u(k).onplay=()=>{g(dt,!1),g(rt,!0)},u(k).onclick=h=>{var w;if(u(Oe)){const T=(w=u(k))==null?void 0:w.getBoundingClientRect(),M={x:h.clientX-(T==null?void 0:T.left),y:h.clientY-(T==null?void 0:T.top),width:0,height:0};b.start?(b={start:b.start,end:M},Ks()):b={start:M}}},u(k).onmousemove=h=>{var w,T,M,ve;if(u(Oe)){const ae={x:h.clientX,y:h.clientY};b.start&&(b={start:b.start,end:ae},g(Le,N({top:b.start.y>b.end.y?b.end.y:b.start.y,left:b.start.x>b.end.x?b.end.x:b.start.x,width:Math.abs((((w=b==null?void 0:b.start)==null?void 0:w.x)||0)-(((T=b==null?void 0:b.end)==null?void 0:T.x)||0)),height:Math.abs((((M=b==null?void 0:b.start)==null?void 0:M.y)||0)-(((ve=b==null?void 0:b.end)==null?void 0:ve.y)||0))})))}})}function io(o){var w,T;if(!((w=a())!=null&&w.deletePreset))return console.error("Delete preset is not enabled in the configuration");const h=(T=c())==null?void 0:T.find(M=>M.token===o);if(h){const M=Object.assign({time:new Date,playerId:n()},h);r("deletePreset",M)}else console.error("Preset not found")}function so(o){var h,w,T;if(!((h=a())!=null&&h.joystick)||(w=a())!=null&&w.pan||(T=a())!=null&&T.tilt)return console.error("Pan and Tilt on joystick are not enabled in the configuration");r("sendJoystickPosition",{id:n(),x:o.x,y:o.y,cardinalDirection:o.cardinalDirection,joyId:o.id,movementSettings:J})}function oo(o){var h,w;(h=a())!=null&&h.pan&&((w=a())!=null&&w.tilt)?r("sendDirection",{id:n(),movementSettings:J,direction:o.direction,joyId:o.id}):console.error("Pan and Tilt are not enabled in the configuration")}function lo(){g(qt,!u(qt))}function ao(){var o;if(!((o=a())!=null&&o.clickToCenter))return console.error("Click to center is not enabled in the configuration");g(Oe,!u(Oe))}function uo(){var o;if(u(De)==="dpad"){if(!((o=a())!=null&&o.joystick))return console.error("Joystick is not enabled in the configuration");g(De,"joystick")}else g(De,"dpad")}function co(){}function fo(o){var w,T;console.log(o,"presetclick"),g(x,!1);const h=(T=(w=c())==null?void 0:w.find(M=>o.itemId.includes(M.token+"_")))==null?void 0:T.token;switch(h&&g(V,N(h)),o.action){case"goto":g(pr,!0);break;case"delete":g(vt,!0);break;default:return console.error("Action not found")}}function vo(){if(!u(k))return console.error("Video element not found");u(k).paused?u(k).play():u(k).pause()}Vt({repoName:"@htmlbricks/hb-player-live",version:Lt.version}),Vt({repoName:"@htmlbricks/hb-pad-joystick",version:Lt.version}),Vt({repoName:"@htmlbricks/hb-table",version:Lt.version}),Vt({repoName:"@htmlbricks/hb-dialog",version:Lt.version});var Vn=Us();vs(o=>{var h=As();je(o,h)});var ze=tn(Vn);p(ze,"title","Presets"),D(()=>p(ze,"show",u(x)?"yes":"no")),p(ze,"hide_confirm","yes"),p(ze,"class","svelte-1i60x2m");var Mn=I(ze),_o=I(Mn);{var ho=o=>{var h=Os();D(()=>p(h,"style",u(Ie))),D(()=>p(h,"rows",JSON.stringify(u(tt)))),D(()=>p(h,"headers",JSON.stringify($))),D(()=>p(h,"actions",JSON.stringify(q))),p(h,"size","12"),D(()=>p(h,"disablepagination",u(tt).length<12?"yes":"no")),p(h,"class","svelte-1i60x2m"),ne("tableaction",h,w=>{fo(w.detail)}),je(o,h)};jt(_o,o=>{var h;(h=u(tt))!=null&&h.length&&o(ho)})}j(Mn),j(ze);var nt=A(ze,2);p(nt,"title","Add Scene to Preset"),D(()=>p(nt,"show",u(U)?"yes":"no")),p(nt,"class","svelte-1i60x2m");var He=A(nt,2);p(He,"title","Go to Home"),D(()=>p(He,"show",u(Mt)?"yes":"no")),p(He,"confirmlabel","GO"),p(He,"class","svelte-1i60x2m");var fe=A(He,2);D(()=>p(fe,"id","del_"+u(V))),D(()=>{var o,h;return p(fe,"title",`Go to Preset ${(u(V)?(h=(o=c())==null?void 0:o.find(w=>w.token===u(V)))==null?void 0:h.token:"")??""}`)}),D(()=>p(fe,"show",u(vt)?"yes":"no")),p(fe,"confirmlabel","delete"),p(fe,"confirm_btn_class","danger"),p(fe,"class","svelte-1i60x2m");var qn=I(fe),mo=I(qn);j(qn),j(fe);var de=A(fe,2);D(()=>p(de,"id","goto_"+u(V))),D(()=>{var o,h;return p(de,"title",`Go to Preset ${(u(V)?(h=(o=c())==null?void 0:o.find(w=>w.token===u(V)))==null?void 0:h.token:"")??""}`)}),D(()=>p(de,"show",u(pr)?"yes":"no")),p(de,"confirmlabel","go"),p(de,"confirm_btn_class","light"),p(de,"class","svelte-1i60x2m");var Fn=I(de),bo=I(Fn);j(Fn),j(de);var Ft=A(de,2);Ft.__mousemove=o=>{var h,w,T,M,ve;if(u(Oe)){const ae=(h=u(k))==null?void 0:h.getBoundingClientRect(),_t={x:o.clientX-(ae==null?void 0:ae.left),y:o.clientY-(ae==null?void 0:ae.top)};b.start&&(b={start:b.start,end:_t},g(Le,N({top:b.start.y>b.end.y?b.end.y:b.start.y,left:b.start.x>b.end.x?b.end.x:b.start.x,width:Math.abs((((w=b==null?void 0:b.start)==null?void 0:w.x)||0)-(((T=b==null?void 0:b.end)==null?void 0:T.x)||0)),height:Math.abs((((M=b==null?void 0:b.start)==null?void 0:M.y)||0)-(((ve=b==null?void 0:b.end)==null?void 0:ve.y)||0))})))}};var Ve=I(Ft);p(Ve,"no_controls","yes"),p(Ve,"id","player"),D(()=>p(Ve,"mediauri",l())),D(()=>p(Ve,"media_type",v())),D(()=>p(Ve,"style",u(B))),p(Ve,"class","svelte-1i60x2m");var Gn=A(Ve,2),Yn=A(Gn,2),po=A(Yn,2);{var go=o=>{var h=Js(),w=tn(h);{var T=ae=>{var _t=Hs(),Hn=I(_t),gr=I(Hn),yo=I(gr);{var xo=Z=>{var F=Ns();D(()=>p(F,"id","pad_"+u(De))),p(F,"pad_or_joystick","dpad"),p(F,"size","60px"),D(()=>p(F,"style",u(le))),p(F,"class","svelte-1i60x2m"),ne("sendDirection",F,Ne=>{oo(Ne.detail)}),je(Z,F)},wo=Z=>{var F=Cs();D(()=>p(F,"id","pad_"+u(De))),p(F,"pad_or_joystick","joystick"),p(F,"size","60px"),D(()=>p(F,"style",u(le))),p(F,"class","svelte-1i60x2m"),ne("sendJoystickPosition",F,Ne=>{so(Ne.detail)}),je(Z,F)};jt(yo,Z=>{u(De)==="dpad"?Z(xo):Z(wo,!1)})}j(gr);var yr=A(gr,2),xr=I(yr),wr=I(xr);wr.__click=[Rs,zn];var Bn=A(wr,2);Bn.__click=[js,zn],j(xr);var Gt=A(xr,2);Gt.__click=[Is,to];var $r=A(Gt,2);$r.__click=[Ds,ao],j(yr);var kr=A(yr,2),Jn=A(I(kr),2);On(Jn),j(kr);var Er=A(kr,2),Un=A(I(Er),2);On(Un),j(Er);var Tr=A(Er,2),Pr=I(Tr);Pr.__click=[Ls,lo];var Yt=A(Pr,2);Yt.__click=[zs,uo];var $o=A(Yt,2);$o.__click=[Vs,k],j(Tr);var Sr=A(Tr,2),Ar=I(Sr);Ar.__click=[Ms,eo];var ht=A(Ar,2);ht.__click=[qs,Qs];var ko=I(ht);Mi(),j(ht),j(Sr);var Xn=A(Sr,2),Be=I(Xn);Be.__click=[Fs,k];var Eo=I(Be);j(Be);var Je=A(Be,2);Je.__click=[Gs,vo];var To=I(Je);j(Je);var Ht=A(Je,2);Ht.__click=[Ys,co];var Wn=A(I(Ht),2),Zn=I(Wn),Po=I(Zn,!0);j(Zn),j(Wn),j(Ht),j(Xn),j(Hn),j(_t),D(Z=>{var F,Ne,it,Kn,Qn,ei,ti,ri,ni,ii,si,oi,li;wr.disabled=!((Ne=(F=a())==null?void 0:F.zoom)!=null&&Ne.in),Bn.disabled=!((Kn=(it=a())==null?void 0:it.zoom)!=null&&Kn.out),Gt.disabled=!((Qn=a())!=null&&Qn.home),ke(Gt,`btn btn-sm btn-${(d()?"primary":"light")??""} svelte-1i60x2m`),$r.disabled=!((ei=a())!=null&&ei.clickToCenter),ke($r,`btn btn-sm btn-${(u(Oe)?"primary":"light")??""} svelte-1i60x2m`),ke(Pr,`btn btn-sm btn-${(u(qt)?"primary":"light")??""} svelte-1i60x2m`),Yt.disabled=!((ti=a())!=null&&ti.joystick),ke(Yt,`btn btn-sm btn-${(u(De)&&u(De)==="dpad"?"light":"primary")??""} svelte-1i60x2m`),Ar.disabled=!((ri=a())!=null&&ri.addPreset),ht.disabled=!((ni=a())!=null&&ni.presets),ke(ht,`btn btn-sm btn-${(_()?"primary":"light")??""} svelte-1i60x2m`),Rt(ko,`${Z??""} `),Be.disabled=!u(E),ke(Be,`btn btn-sm btn-${(u(E)?(ii=u(k))!=null&&ii.muted?"warning":"primary":"light")??""} svelte-1i60x2m`),Se(Be,"aria-label",(si=u(k))!=null&&si.muted?"Unmute video":"Mute video"),ke(Eo,`bi bi-${((oi=u(k))!=null&&oi.muted||!u(k)?"volume-mute-fill":"volume-up-fill")??""} svelte-1i60x2m`),Je.disabled=!u(E),ke(Je,`btn btn-sm btn-${(u(E)?u(rt)?"primary":"warning":"light")??""} svelte-1i60x2m`),Se(Je,"aria-label",u(rt)?"Pause video":"Play video"),ke(To,`bi bi-${(u(dt)||!u(k)?"pause-fill":"play")??""} svelte-1i60x2m`),Ht.disabled=!((li=a())!=null&&li.settings),Rt(Po,u(ft))},[()=>{var Z,F,Ne;return _()&&((Z=c())!=null&&Z.find(it=>it.token===_()))?(Ne=(F=c())==null?void 0:F.find(it=>it.token===_()))==null?void 0:Ne.name:""}]),Cn(Jn,()=>J.speed,Z=>J.speed=Z),Cn(Un,()=>J.precision,Z=>J.precision=Z),je(ae,_t)};jt(w,ae=>{y()&&ae(T)})}var M=A(w,2);M.__click=[Bs,y,r,n];var ve=I(M);j(M),D(()=>{Se(M,"style",`left:${(y()?"500":"0")??""}px;`),ke(ve,`bi-${(y()?"caret-left-fill":"caret-right-fill")??""} svelte-1i60x2m`)}),je(o,h)};jt(po,o=>{m()&&o(go)})}return j(Ft),D(o=>{Rt(mo,`Are You sure to DELETE preset ${o??""}?`),Rt(bo,`Are You sure to GO to preset "${o??""}"?`),Se(Ft,"style",`cursor: ${(u(Oe)?"crosshair":"")??""};`),Se(Gn,"style",`display:${(u(Oe)?"inherit":"none")??""}; width:${u(Le).width??""}px; height:${u(Le).height??""}px;top:${u(Le).top??""}px;left:${u(Le).left??""}px;`),Se(Yn,"style",`display:${(u(qt)?"inherit":"none")??""}`)},[()=>{var o,h;return u(V)?(h=(o=c())==null?void 0:o.find(w=>w.token===u(V)))==null?void 0:h.token:""}]),ne("modalShow",ze,o=>{g(x,N(o.detail.show))}),ne("modalShow",nt,o=>{g(U,N(o.detail.show))}),ne("modalConfirm",nt,o=>{var h;(h=o==null?void 0:o.detail)!=null&&h.confirm&&Zs()}),ne("modalShow",He,o=>{g(Mt,N(o.detail.show))}),ne("modalConfirm",He,o=>{var h;(h=o==null?void 0:o.detail)!=null&&h.confirm&&Ws()}),ne("modalShow",fe,o=>{g(vt,N(o.detail.show))}),ne("modalConfirm",fe,o=>{var h;console.log(o.detail,"detail"),(h=o==null?void 0:o.detail)!=null&&h.confirm&&io(o.detail.id.split("del_")[1])}),ne("modalShow",de,o=>{g(pr,N(o.detail.show))}),ne("modalConfirm",de,o=>{var h;console.log(o.detail.id.split("goto")[1],"detail"),(h=o==null?void 0:o.detail)!=null&&h.confirm&&ro(o.detail.id.split("goto_")[1])}),ne("htmlVideoInit",Ve,o=>{console.log(o.detail,"detailvid"),g(k,N(o.detail.video)),no()}),je(e,Vn),wn({get id(){return n()},set id(o=""){n(o),te()},get style(){return s()},set style(o=""){s(o),te()},get live_uri(){return l()},set live_uri(o=""){l(o),te()},get media_type(){return v()},set media_type(o="auto"){v(o),te()},get presets(){return c()},set presets(o=[]){c(o),te()},get position(){return f()},set position(o="right-bottom"){f(o),te()},get configuration(){return a()},set configuration(o=i){a(o),te()},get current_preset(){return _()},set current_preset(o=""){_(o),te()},get is_home(){return d()},set is_home(o=void 0){d(o),te()},get is_ptz_connected(){return m()},set is_ptz_connected(o=void 0){m(o),te()},get is_ptz_panel_opened(){return y()},set is_ptz_panel_opened(o=void 0){y(o),te()}})}fs(["mousemove","click"]),customElements.define("hb-player-live-camera-ptz",$s(Ln,{id:{},style:{},live_uri:{},media_type:{},presets:{},position:{},configuration:{},current_preset:{},is_home:{},is_ptz_connected:{},is_ptz_panel_opened:{}},[],[],!0)),R.Component=Ln,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})})(this["player-live-camera-ptz"]=this["player-live-camera-ptz"]||{});
|
|
@@ -493,6 +493,7 @@
|
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
495
|
},
|
|
496
|
+
"description": "",
|
|
496
497
|
"storybookArgs": {
|
|
497
498
|
"presets": {
|
|
498
499
|
"control": {
|
|
@@ -608,9 +609,7 @@
|
|
|
608
609
|
],
|
|
609
610
|
"parts": []
|
|
610
611
|
},
|
|
611
|
-
"author": "Dario Caruso <dev@dariocaruso.info> (https://dariocaruso.info)",
|
|
612
612
|
"contributors": [],
|
|
613
|
-
"owner": "Dario Caruso <dev@dariocaruso.info> (https://dariocaruso.info)",
|
|
614
613
|
"htmlSlots": [],
|
|
615
614
|
"i18n": [],
|
|
616
615
|
"examples": [
|
|
@@ -725,7 +724,7 @@
|
|
|
725
724
|
"basic"
|
|
726
725
|
],
|
|
727
726
|
"size": {},
|
|
728
|
-
"iifePath": "
|
|
727
|
+
"iifePath": "main.iife.js",
|
|
729
728
|
"repoName": "@htmlbricks/hb-player-live-camera-ptz",
|
|
730
|
-
"version": "0.
|
|
729
|
+
"version": "0.50.0-alpha.10"
|
|
731
730
|
}
|
package/package.json
CHANGED
|
@@ -1,87 +1,16 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"node": ">=16.0.0"
|
|
18
|
-
},
|
|
19
|
-
"scripts": {
|
|
20
|
-
"start": "sirv dist",
|
|
21
|
-
"dev": "rm -rf ./dist && rollup -c -w",
|
|
22
|
-
"build": "rm -rf ./dist && rollup -c",
|
|
23
|
-
"generate-manifest": "npm run generate-schemes && monorepo-wc-packages-manifester --dir $PWD",
|
|
24
|
-
"generate-component-schema": "ts-json-schema-generator --type 'Component' --path 'app/types/webcomponent.type.d.ts' > dist/webcomponent.type.d.json",
|
|
25
|
-
"generate-events-schema": "ts-json-schema-generator --type 'Events' --path 'app/types/webcomponent.type.d.ts' > dist/webcomponent_events.type.d.json",
|
|
26
|
-
"generate-schemes": "npm run generate-events-schema && npm run generate-component-schema",
|
|
27
|
-
"copydest": "rsync -avh dist/* ./release/ --delete",
|
|
28
|
-
"build-extra": "tsc --moduleResolution node --module es2020 --esModuleInterop true --outDir dist --sourceMap --skipLibCheck extra/*",
|
|
29
|
-
"build:release": "PRODUCTION=true npm run build && npm run build-extra && npm run generate-manifest && npm run copydest",
|
|
30
|
-
"prepublish": "npm run build:release"
|
|
31
|
-
},
|
|
32
|
-
"devDependencies": {
|
|
33
|
-
"@rollup/plugin-alias": "^3.1.2",
|
|
34
|
-
"@rollup/plugin-commonjs": "^18.0.0",
|
|
35
|
-
"@rollup/plugin-json": "^4.1.0",
|
|
36
|
-
"@rollup/plugin-node-resolve": "^11.2.1",
|
|
37
|
-
"@rollup/plugin-replace": "^4.0.0",
|
|
38
|
-
"@rollup/plugin-typescript": "^8.2.1",
|
|
39
|
-
"@tsconfig/svelte": "^1.0.10",
|
|
40
|
-
"@types/node": "^16.7.1",
|
|
41
|
-
"@typescript-eslint/eslint-plugin": "^4.22.0",
|
|
42
|
-
"@typescript-eslint/parser": "^4.22.0",
|
|
43
|
-
"eslint": "^7.25.0",
|
|
44
|
-
"eslint-plugin-jsdoc": "^33.0.0",
|
|
45
|
-
"eslint-plugin-svelte3": "^3.2.0",
|
|
46
|
-
"monorepo-wc-packages-manifester": "^0.0.3",
|
|
47
|
-
"node-sass": "^9.0.0",
|
|
48
|
-
"postcss": "^8.2.13",
|
|
49
|
-
"postcss-load-config": "^3.0.1",
|
|
50
|
-
"prettier": "^2.8.4",
|
|
51
|
-
"rollup": "^2.46.0",
|
|
52
|
-
"rollup-plugin-copy": "^3.4.0",
|
|
53
|
-
"rollup-plugin-css-only": "^3.1.0",
|
|
54
|
-
"rollup-plugin-livereload": "^2.0.0",
|
|
55
|
-
"rollup-plugin-svelte": "^7.1.0",
|
|
56
|
-
"rollup-plugin-terser": "^7.0.2",
|
|
57
|
-
"rollup-plugin-ts-paths": "^1.0.5",
|
|
58
|
-
"rollup-plugin-typescript2": "^0.31.1",
|
|
59
|
-
"sass": "^1.32.12",
|
|
60
|
-
"sirv-cli": "^1.0.11",
|
|
61
|
-
"svelte": "^3.46.2",
|
|
62
|
-
"svelte-check": "^1.5.2",
|
|
63
|
-
"svelte-preprocess": "^4.7.2",
|
|
64
|
-
"ts-json-schema-generator": "^0.98.0",
|
|
65
|
-
"ts-node": "^9.1.1",
|
|
66
|
-
"tslib": "^2.2.0",
|
|
67
|
-
"ttypescript": "^1.5.12",
|
|
68
|
-
"typescript": "^4.3.5",
|
|
69
|
-
"typescript-transform-paths": "^2.2.3",
|
|
70
|
-
"wc-js-utils": "^0.0.1"
|
|
71
|
-
},
|
|
72
|
-
"keywords": [
|
|
73
|
-
"svelte",
|
|
74
|
-
"svelte-webcomponents",
|
|
75
|
-
"webcomponents",
|
|
76
|
-
"html5-webcomponents"
|
|
77
|
-
],
|
|
78
|
-
"contributors": [],
|
|
79
|
-
"gitHead": "89b0885aff646abbcaebdf63ab8602aa87d3e218",
|
|
80
|
-
"dependencies": {
|
|
81
|
-
"@htmlbricks/hb-dialog": "^0.20.18",
|
|
82
|
-
"@htmlbricks/hb-pad-joystick": "^0.20.18",
|
|
83
|
-
"@htmlbricks/hb-player-live": "^0.20.18",
|
|
84
|
-
"@htmlbricks/hb-table": "^0.20.18",
|
|
85
|
-
"style-to-object": "^0.3.0"
|
|
86
|
-
}
|
|
87
|
-
}
|
|
2
|
+
"name": "@htmlbricks/hb-player-live-camera-ptz",
|
|
3
|
+
"version": "0.50.0-alpha.10",
|
|
4
|
+
"contributors": [],
|
|
5
|
+
"description": "",
|
|
6
|
+
"licenses": [
|
|
7
|
+
{
|
|
8
|
+
"type": "Apache-2.0",
|
|
9
|
+
"path": "LICENSE.md",
|
|
10
|
+
"cost": 0,
|
|
11
|
+
"currency": "EUR"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"main": "main.iife.js",
|
|
15
|
+
"dependencies": []
|
|
16
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/Component",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
+
"definitions": {
|
|
5
|
+
"Component": {
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"properties": {
|
|
8
|
+
"configuration": {
|
|
9
|
+
"additionalProperties": false,
|
|
10
|
+
"properties": {
|
|
11
|
+
"addPreset": {
|
|
12
|
+
"type": "boolean"
|
|
13
|
+
},
|
|
14
|
+
"clickToCenter": {
|
|
15
|
+
"type": "boolean"
|
|
16
|
+
},
|
|
17
|
+
"deletePreset": {
|
|
18
|
+
"type": "boolean"
|
|
19
|
+
},
|
|
20
|
+
"home": {
|
|
21
|
+
"type": "boolean"
|
|
22
|
+
},
|
|
23
|
+
"joystick": {
|
|
24
|
+
"type": "boolean"
|
|
25
|
+
},
|
|
26
|
+
"pan": {
|
|
27
|
+
"type": "boolean"
|
|
28
|
+
},
|
|
29
|
+
"presets": {
|
|
30
|
+
"type": "boolean"
|
|
31
|
+
},
|
|
32
|
+
"settings": {
|
|
33
|
+
"type": "boolean"
|
|
34
|
+
},
|
|
35
|
+
"switchPreset": {
|
|
36
|
+
"type": "boolean"
|
|
37
|
+
},
|
|
38
|
+
"tilt": {
|
|
39
|
+
"type": "boolean"
|
|
40
|
+
},
|
|
41
|
+
"zoom": {
|
|
42
|
+
"additionalProperties": false,
|
|
43
|
+
"properties": {
|
|
44
|
+
"in": {
|
|
45
|
+
"type": "boolean"
|
|
46
|
+
},
|
|
47
|
+
"out": {
|
|
48
|
+
"type": "boolean"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"type": "object"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"type": "object"
|
|
55
|
+
},
|
|
56
|
+
"current_preset": {
|
|
57
|
+
"type": "string"
|
|
58
|
+
},
|
|
59
|
+
"id": {
|
|
60
|
+
"type": "string"
|
|
61
|
+
},
|
|
62
|
+
"is_home": {
|
|
63
|
+
"type": "boolean"
|
|
64
|
+
},
|
|
65
|
+
"is_ptz_connected": {
|
|
66
|
+
"type": "boolean"
|
|
67
|
+
},
|
|
68
|
+
"is_ptz_panel_opened": {
|
|
69
|
+
"type": "boolean"
|
|
70
|
+
},
|
|
71
|
+
"live_uri": {
|
|
72
|
+
"type": "string"
|
|
73
|
+
},
|
|
74
|
+
"media_type": {
|
|
75
|
+
"enum": [
|
|
76
|
+
"hls",
|
|
77
|
+
"webrtc",
|
|
78
|
+
"auto",
|
|
79
|
+
"whep",
|
|
80
|
+
""
|
|
81
|
+
],
|
|
82
|
+
"type": "string"
|
|
83
|
+
},
|
|
84
|
+
"position": {
|
|
85
|
+
"enum": [
|
|
86
|
+
"top",
|
|
87
|
+
"right-bottom",
|
|
88
|
+
"left-bottom",
|
|
89
|
+
"bottom",
|
|
90
|
+
"right-top",
|
|
91
|
+
"left-top"
|
|
92
|
+
],
|
|
93
|
+
"type": "string"
|
|
94
|
+
},
|
|
95
|
+
"presets": {
|
|
96
|
+
"items": {
|
|
97
|
+
"$ref": "#/definitions/TPreset"
|
|
98
|
+
},
|
|
99
|
+
"type": "array"
|
|
100
|
+
},
|
|
101
|
+
"style": {
|
|
102
|
+
"type": "string"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"required": [
|
|
106
|
+
"live_uri"
|
|
107
|
+
],
|
|
108
|
+
"type": "object"
|
|
109
|
+
},
|
|
110
|
+
"TPreset": {
|
|
111
|
+
"additionalProperties": false,
|
|
112
|
+
"properties": {
|
|
113
|
+
"name": {
|
|
114
|
+
"type": "string"
|
|
115
|
+
},
|
|
116
|
+
"token": {
|
|
117
|
+
"type": "string"
|
|
118
|
+
},
|
|
119
|
+
"x": {
|
|
120
|
+
"type": "number"
|
|
121
|
+
},
|
|
122
|
+
"y": {
|
|
123
|
+
"type": "number"
|
|
124
|
+
},
|
|
125
|
+
"z": {
|
|
126
|
+
"type": "number"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"required": [
|
|
130
|
+
"token",
|
|
131
|
+
"name",
|
|
132
|
+
"x",
|
|
133
|
+
"y",
|
|
134
|
+
"z"
|
|
135
|
+
],
|
|
136
|
+
"type": "object"
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|