@htmlbricks/hb-player-live-camera-ptz 0.19.21 → 0.19.24
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/package.json +6 -6
- package/release/manifest.json +1 -1
- package/release/release.js +1 -1
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@htmlbricks/hb-player-live-camera-ptz",
|
|
3
3
|
"displayName": "Svelte Boostrap Pagination WebComponent",
|
|
4
4
|
"description": "Svelte Boostrap Pagination WebComponent",
|
|
5
|
-
"version": "0.19.
|
|
5
|
+
"version": "0.19.24",
|
|
6
6
|
"main": "release/release.js",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
@@ -76,12 +76,12 @@
|
|
|
76
76
|
"html5-webcomponents"
|
|
77
77
|
],
|
|
78
78
|
"contributors": [],
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "f18a32cd011dd7bc16b067602dba9a24eccc04b9",
|
|
80
80
|
"dependencies": {
|
|
81
|
-
"@htmlbricks/hb-dialog": "^0.19.
|
|
82
|
-
"@htmlbricks/hb-pad-joystick": "^0.19.
|
|
83
|
-
"@htmlbricks/hb-player-live": "^0.19.
|
|
84
|
-
"@htmlbricks/hb-table": "^0.19.
|
|
81
|
+
"@htmlbricks/hb-dialog": "^0.19.24",
|
|
82
|
+
"@htmlbricks/hb-pad-joystick": "^0.19.24",
|
|
83
|
+
"@htmlbricks/hb-player-live": "^0.19.24",
|
|
84
|
+
"@htmlbricks/hb-table": "^0.19.24",
|
|
85
85
|
"style-to-object": "^0.3.0"
|
|
86
86
|
}
|
|
87
87
|
}
|
package/release/manifest.json
CHANGED
package/release/release.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var release=function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function o(t){t.forEach(e)}function i(t){return"function"==typeof t}function r(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function s(t,e){t.appendChild(e)}function a(t,e,n){t.insertBefore(e,n||null)}function l(t){t.parentNode&&t.parentNode.removeChild(t)}function d(t){return document.createElement(t)}function c(t){return document.createTextNode(t)}function p(){return c(" ")}function u(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function b(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function f(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:b(t,e,n)}function m(t){return""===t?null:+t}function h(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function g(t,e){t.value=null==e?"":e}function v(t,e,n,o){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,o?"important":"")}function y(t){const e={};for(const n of t)e[n.name]=n.value;return e}let w;function k(t){w=t}function x(){if(!w)throw new Error("Function called outside component initialization");return w}function _(){const t=x();return(e,n,{cancelable:o=!1}={})=>{const i=t.$$.callbacks[e];if(i){const r=function(t,e,{bubbles:n=!1,cancelable:o=!1}={}){const i=document.createEvent("CustomEvent");return i.initCustomEvent(t,n,o,e),i}(e,n,{cancelable:o});return i.slice().forEach((e=>{e.call(t,r)})),!r.defaultPrevented}return!0}}const $=[],C=[],T=[],z=[],j=Promise.resolve();let P=!1;function E(t){T.push(t)}const S=new Set;let D=0;function N(){if(0!==D)return;const t=w;do{try{for(;D<$.length;){const t=$[D];D++,k(t),O(t.$$)}}catch(t){throw $.length=0,D=0,t}for(k(null),$.length=0,D=0;C.length;)C.pop()();for(let t=0;t<T.length;t+=1){const e=T[t];S.has(e)||(S.add(e),e())}T.length=0}while($.length);for(;z.length;)z.pop()();P=!1,S.clear(),k(t)}function O(t){if(null!==t.fragment){t.update(),o(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(E)}}const V=new Set;function A(t,e){-1===t.$$.dirty[0]&&($.push(t),P||(P=!0,j.then(N)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function L(r,s,a,d,c,p,u,b=[-1]){const f=w;k(r);const m=r.$$={fragment:null,ctx:[],props:p,update:t,not_equal:c,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s.context||(f?f.$$.context:[])),callbacks:n(),dirty:b,skip_bound:!1,root:s.target||f.$$.root};u&&u(m.root);let h=!1;if(m.ctx=a?a(r,s.props||{},((t,e,...n)=>{const o=n.length?n[0]:e;return m.ctx&&c(m.ctx[t],m.ctx[t]=o)&&(!m.skip_bound&&m.bound[t]&&m.bound[t](o),h&&A(r,t)),e})):[],m.update(),h=!0,o(m.before_update),m.fragment=!!d&&d(m.ctx),s.target){if(s.hydrate){const t=function(t){return Array.from(t.childNodes)}(s.target);m.fragment&&m.fragment.l(t),t.forEach(l)}else m.fragment&&m.fragment.c();s.intro&&((g=r.$$.fragment)&&g.i&&(V.delete(g),g.i(v))),function(t,n,r,s){const{fragment:a,after_update:l}=t.$$;a&&a.m(n,r),s||E((()=>{const n=t.$$.on_mount.map(e).filter(i);t.$$.on_destroy?t.$$.on_destroy.push(...n):o(n),t.$$.on_mount=[]})),l.forEach(E)}(r,s.target,s.anchor,s.customElement),N()}var g,v;k(f)}let M;"function"==typeof HTMLElement&&(M=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(e).filter(i);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){o(this.$$.on_disconnect)}$destroy(){!function(t,e){const n=t.$$;null!==n.fragment&&(o(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=t}$on(e,n){if(!i(n))return t;const o=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return o.push(n),()=>{const t=o.indexOf(n);-1!==t&&o.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var I={name:"@htmlbricks/hb-player-live-camera-ptz",displayName:"Svelte Boostrap Pagination WebComponent",description:"Svelte Boostrap Pagination WebComponent",version:"0.19.21",main:"release/release.js",publishConfig:{access:"public"},author:"Dario Caruso <dev@dariocaruso.info> (https://dariocaruso.info)",authorUrl:"https://dariocaruso.info",license:"MIT","license-docs":"CC BY 4.0","license-translations":"CC BY 4.0","license-images":"CC BY-NC 4.0",engines:{node:">=16.0.0"},scripts:{start:"sirv dist",dev:"rm -rf ./dist && rollup -c -w",build:"rm -rf ./dist && rollup -c","generate-manifest":"npm run generate-schemes && monorepo-wc-packages-manifester --dir $PWD","generate-component-schema":"ts-json-schema-generator --type 'Component' --path 'app/types/webcomponent.type.d.ts' > dist/webcomponent.type.d.json","generate-events-schema":"ts-json-schema-generator --type 'Events' --path 'app/types/webcomponent.type.d.ts' > dist/webcomponent_events.type.d.json","generate-schemes":"npm run generate-events-schema && npm run generate-component-schema",copydest:"rm -rf release && mkdir -p release && mkdir -p release && cp dist/* ./release/","build-extra":"tsc --moduleResolution node --module es2020 --esModuleInterop true --outDir dist --sourceMap --skipLibCheck extra/*","build:release":"PRODUCTION=true npm run build && npm run build-extra && npm run generate-manifest && npm run copydest",prepublish:"npm run build:release"},devDependencies:{"@rollup/plugin-alias":"^3.1.2","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^4.0.0","@rollup/plugin-typescript":"^8.2.1","@tsconfig/svelte":"^1.0.10","@types/node":"^16.7.1","@typescript-eslint/eslint-plugin":"^4.22.0","@typescript-eslint/parser":"^4.22.0",eslint:"^7.25.0","eslint-plugin-jsdoc":"^33.0.0","eslint-plugin-svelte3":"^3.2.0","monorepo-wc-packages-manifester":"^0.0.3","node-sass":"^6.0.1",postcss:"^8.2.13","postcss-load-config":"^3.0.1",prettier:"^2.8.4",rollup:"^2.46.0","rollup-plugin-copy":"^3.4.0","rollup-plugin-css-only":"^3.1.0","rollup-plugin-livereload":"^2.0.0","rollup-plugin-svelte":"^7.1.0","rollup-plugin-terser":"^7.0.2","rollup-plugin-ts-paths":"^1.0.5","rollup-plugin-typescript2":"^0.31.1",sass:"^1.32.12","sirv-cli":"^1.0.11",svelte:"^3.46.2","svelte-check":"^1.5.2","svelte-preprocess":"^4.7.2","ts-json-schema-generator":"^0.98.0","ts-node":"^9.1.1",tslib:"^2.2.0",ttypescript:"^1.5.12",typescript:"^4.2.4","typescript-transform-paths":"^2.2.3","wc-js-utils":"^0.0.1"},keywords:["svelte","svelte-webcomponents","webcomponents","html5-webcomponents"],contributors:[],gitHead:"ee381e4718f7a14dae7f8a731e68a985adb17216",dependencies:{"@htmlbricks/hb-dialog":"^0.19.21","@htmlbricks/hb-pad-joystick":"^0.19.21","@htmlbricks/hb-player-live":"^0.19.21","@htmlbricks/hb-table":"^0.19.21","style-to-object":"^0.3.0"}},B=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,H=/\n/g,Y=/^\s*/,G=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,J=/^:\s*/,R=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,W=/^[;\s]*/,F=/^\s+|\s+$/g,q="\n",X="/",U="*",Z="",K="comment",Q="declaration",tt=function(t,e){if("string"!=typeof t)throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var n=1,o=1;function i(t){var e=t.match(H);e&&(n+=e.length);var i=t.lastIndexOf(q);o=~i?t.length-i:o+t.length}function r(){var t={line:n,column:o};return function(e){return e.position=new s(t),d(),e}}function s(t){this.start=t,this.end={line:n,column:o},this.source=e.source}function a(i){var r=new Error(e.source+":"+n+":"+o+": "+i);if(r.reason=i,r.filename=e.source,r.line=n,r.column=o,r.source=t,!e.silent)throw r}function l(e){var n=e.exec(t);if(n){var o=n[0];return i(o),t=t.slice(o.length),n}}function d(){l(Y)}function c(t){var e;for(t=t||[];e=p();)!1!==e&&t.push(e);return t}function p(){var e=r();if(X==t.charAt(0)&&U==t.charAt(1)){for(var n=2;Z!=t.charAt(n)&&(U!=t.charAt(n)||X!=t.charAt(n+1));)++n;if(n+=2,Z===t.charAt(n-1))return a("End of comment missing");var s=t.slice(2,n-2);return o+=2,i(s),t=t.slice(n),o+=2,e({type:K,comment:s})}}function u(){var t=r(),e=l(G);if(e){if(p(),!l(J))return a("property missing ':'");var n=l(R),o=t({type:Q,property:et(e[0].replace(B,Z)),value:n?et(n[0].replace(B,Z)):Z});return l(W),o}}return s.prototype.content=t,d(),function(){var t,e=[];for(c(e);t=u();)!1!==t&&(e.push(t),c(e));return e}()};function et(t){return t?t.replace(F,Z):Z}var nt=function(t,e){var n,o=null;if(!t||"string"!=typeof t)return o;for(var i,r,s=tt(t),a="function"==typeof e,l=0,d=s.length;l<d;l++)i=(n=s[l]).property,r=n.value,a?e(i,r,n):r&&(o||(o={}),o[i]=r);return o};var ot,it=(function(t,e){e.__esModule=!0,e.LanguageTranslator=e.addComponent=e.getChildStyleToPass=void 0,e.getChildStyleToPass=function(t,e){var n,o,i="";if(t&&(null==e?void 0:e.length)&&(null===(n=Object.keys(t))||void 0===n?void 0:n.length)&&(null===(o=null==e?void 0:e.filter((function(e){return Object.keys(t).includes(e.name)})))||void 0===o?void 0:o.length))for(var r=function(n){(null==e?void 0:e.filter((function(e){return e.name===n&&e.defaultValue!==t[n]})))&&(i+="".concat(n,":").concat(t[n],";"))},s=0,a=Object.keys(t);s<a.length;s++)r(a[s]);return i},e.addComponent=function(t){var e,n=(null===(e=null==t?void 0:t.repoName.split("/"))||void 0===e?void 0:e[1])||(null==t?void 0:t.repoName);if(!n)throw new Error("wrong componentPath "+(null==t?void 0:t.repoName));if(!(null==t?void 0:t.version))throw new Error("wrong version "+(null==t?void 0:t.version));var o=(null==t?void 0:t.iifePath)||"release/release.js";if(!document.getElementById(n+"-script"))try{var i=document.createElement("script");i.id=n+"-script",i.src="https://cdn.jsdelivr.net/npm/".concat(t.repoName,"@").concat(t.version,"/").concat(o),(null==t?void 0:t.local)&&location.href.includes("localhost")&&(i.src="".concat(t.local)),document.head.appendChild(i)}catch(t){console.warn(t)}};var n=function(){function t(t){if(!(null==t?void 0:t.dictionary))throw new Error("no dictionary provided");this.dictionary=t.dictionary,this.setLang(null==t?void 0:t.lang)}return t.prototype.setLang=function(e){e||(e=t.getDefaultLang()),this.lang=e},t.prototype.translateWord=function(e,n){return t.getDictionaryWord(e,this.dictionary,n||this.lang)},t.prototype.translateDate=function(e,n,o){return t.formatDate(e,n,o||this.lang)},t.getDefaultLang=function(){var t,e,n,o,i,r="en";return(null===navigator||void 0===navigator?void 0:navigator.languages)&&(null===(n=null===(e=null===(t=navigator.languages[0])||void 0===t?void 0:t.split("-")[0])||void 0===e?void 0:e.toLowerCase())||void 0===n?void 0:n.length)&&(r=null===(i=null===(o=navigator.languages[0])||void 0===o?void 0:o.split("-")[0])||void 0===i?void 0:i.toLowerCase()),r},t.getDictionaryWord=function(e,n,o){var i;if(!e)throw new Error("no wordKey provided");if(!n)throw new Error("no dictionary provided");if(o&&(null===(i=n[o])||void 0===i?void 0:i[e]))return n[o][e];var r="",s=t.getDefaultLang();if(!o||s!==o){var a=null==n?void 0:n[s];(null==a?void 0:a[e])&&(r=a[e])}return r},t.formatDate=function(e,n,o){if(!e)throw new Error("no date provided");if("function"!=typeof e.getMonth)throw new Error("wrong date format");return new Intl.DateTimeFormat(o||t.getDefaultLang(),n).format(e)},t}();e.LanguageTranslator=n}(ot={exports:{}},ot.exports),ot.exports),rt={vars:[],parts:[{name:"container",description:""},{name:"replacewithtext",description:""},{name:"video",description:""}]},st={vars:[{name:"--hb-pad-joystick-size",description:"pad/joystick size",defaultValue:"200px",valueType:"htmlsize"}],parts:[]},at={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"}],parts:[]},lt={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"}],parts:[{name:"modal-dialog",description:"The modal dialog"}]};function dt(t){let e,n,o,i,r;return{c(){e=d("hb-table"),f(e,"style",t[12]),f(e,"rows",n=JSON.stringify(t[8])),f(e,"headers",JSON.stringify(t[30])),f(e,"actions",JSON.stringify(t[31])),f(e,"size","12"),f(e,"disablepagination",o=t[8].length<12?"yes":"no")},m(n,o){a(n,e,o),i||(r=u(e,"tableaction",t[51]),i=!0)},p(t,i){4096&i[0]&&f(e,"style",t[12]),256&i[0]&&n!==(n=JSON.stringify(t[8]))&&f(e,"rows",n),256&i[0]&&o!==(o=t[8].length<12?"yes":"no")&&f(e,"disablepagination",o)},d(t){t&&l(e),i=!1,r()}}}function ct(t){let e,n,o,i,r,c,f=t[7]&&pt(t);return{c(){f&&f.c(),e=p(),n=d("div"),o=d("i"),b(o,"class",i="bi-"+(t[7]?"caret-left-fill":"caret-right-fill")),b(n,"id","opener"),v(n,"left",(t[7]?"500":"0")+"px")},m(i,l){f&&f.m(i,l),a(i,e,l),a(i,n,l),s(n,o),r||(c=u(n,"click",t[84]),r=!0)},p(t,r){t[7]?f?f.p(t,r):(f=pt(t),f.c(),f.m(e.parentNode,e)):f&&(f.d(1),f=null),128&r[0]&&i!==(i="bi-"+(t[7]?"caret-left-fill":"caret-right-fill"))&&b(o,"class",i),128&r[0]&&v(n,"left",(t[7]?"500":"0")+"px")},d(t){f&&f.d(t),t&&l(e),t&&l(n),r=!1,c()}}}function pt(t){let e,n,i,r,f,m,y,w,k,x,_,$,C,T,z,j,P,E,S,D,N,O,V,A,L,M,I,B,H,Y,G,J,R,W,F,q,X,U,Z,K,Q,tt,et,nt,ot,it,rt,st,at,lt,dt,ct,pt,ft,mt,ht,gt,vt,yt,wt,kt,xt,_t,$t,Ct,Tt,zt,jt,Pt,Et,St,Dt,Nt,Ot,Vt,At,Lt,Mt,It,Bt,Ht=(t[4]&&t[2].find(t[78])?t[2].find(t[79])?.name:"")+"";function Yt(t,e){return"dpad"===t[25]?bt:ut}let Gt=Yt(t),Jt=Gt(t);return{c(){e=d("div"),n=d("div"),i=d("div"),Jt.c(),r=p(),f=d("div"),m=d("div"),y=d("button"),w=d("i"),x=p(),_=d("button"),$=d("i"),T=p(),z=d("button"),j=d("i"),S=p(),D=d("button"),N=d("i"),A=p(),L=d("div"),M=d("span"),M.textContent="speed:",I=p(),B=d("input"),H=p(),Y=d("div"),G=d("span"),G.textContent="precision:",J=p(),R=d("input"),W=p(),F=d("div"),q=d("button"),X=d("i"),Z=p(),K=d("button"),Q=d("i"),nt=p(),ot=d("button"),ot.innerHTML='<i class="bi bi-arrows-fullscreen"></i>',it=p(),rt=d("div"),st=d("button"),at=d("i"),dt=p(),ct=d("button"),pt=c(Ht),ft=p(),mt=d("i"),vt=p(),yt=d("div"),wt=d("button"),kt=d("i"),Ct=p(),Tt=d("button"),zt=d("i"),St=p(),Dt=d("button"),Nt=d("i"),Ot=p(),Vt=d("span"),At=d("span"),Lt=c(t[15]),b(i,"id","joystick"),b(i,"class","area"),b(w,"class","bi bi-zoom-in"),y.disabled=k=!t[3]?.zoom?.in,b(y,"class","btn btn-sm btn-light"),b($,"class","bi bi-zoom-out"),_.disabled=C=!t[3]?.zoom?.out,b(_,"class","btn btn-sm btn-light"),b(m,"class","btn-group"),v(m,"margin-right","10px"),b(j,"class","bi bi-house-door-fill"),z.disabled=P=!t[3]?.home,b(z,"class",E="btn btn-sm btn-"+(t[5]?"primary":"light")),b(N,"class","bi bi-square"),D.disabled=O=!t[3]?.clickToCenter,b(D,"class",V="btn btn-sm btn-"+(t[26]?"primary":"light")),b(f,"id","buttons"),b(f,"class","area"),b(M,"class","slider_label"),b(B,"class","range"),b(B,"type","range"),b(L,"id","speed"),b(L,"class","area"),b(G,"class","slider_label"),b(R,"class","range"),b(R,"type","range"),b(Y,"id","precision"),b(Y,"class","area"),b(X,"class","bi bi-grid-3x3"),b(q,"class",U="btn btn-sm btn-"+(t[24]?"primary":"light")),b(Q,"class","bi bi-joystick"),K.disabled=tt=!t[3]?.joystick,b(K,"class",et="btn btn-sm btn-"+(t[25]&&"dpad"===t[25]?"light":"primary")),v(ot,"float","right"),v(ot,"margin-right","5px"),b(ot,"class","btn btn-sm btn-light"),b(F,"id","presets_view"),b(F,"class","area"),b(at,"class","bi bi-plus-circle-fill"),st.disabled=lt=!t[3]?.addPreset,b(st,"class","btn btn-sm btn-light"),v(mt,"float","right"),b(mt,"class","bi bi-arrow-down-up"),ct.disabled=ht=!t[3]?.presets,v(ct,"width","130px",1),v(ct,"display","inline-block",1),b(ct,"class",gt="btn btn-sm btn-"+(t[4]?"primary":"light")),b(rt,"id","presets_select"),b(rt,"class","area"),b(kt,"class",xt="bi bi-"+(t[9]?.muted||!t[9]?"volume-mute-fill":"volume-up-fill")),wt.disabled=_t=!t[18],b(wt,"class",$t="btn btn-sm btn-"+(t[18]?t[9]?.muted?"warning":"primary":"light")),b(zt,"class",jt="bi bi-"+(t[16]||!t[9]?"pause-fill":"play")),Tt.disabled=Pt=!t[18],b(Tt,"class",Et="btn btn-sm btn-"+(t[18]?t[17]?"primary":"warning":"light")),b(Nt,"class","bi bi-sliders"),b(Vt,"class","timecell"),Dt.disabled=Mt=!t[3]?.settings,b(Dt,"class","btn btn-sm btn-light"),b(yt,"id","presets_buttons"),b(yt,"class","area"),b(n,"id","panel"),b(e,"id","controller")},m(o,l){a(o,e,l),s(e,n),s(n,i),Jt.m(i,null),s(n,r),s(n,f),s(f,m),s(m,y),s(y,w),s(m,x),s(m,_),s(_,$),s(f,T),s(f,z),s(z,j),s(f,S),s(f,D),s(D,N),s(n,A),s(n,L),s(L,M),s(L,I),s(L,B),g(B,t[14].speed),s(n,H),s(n,Y),s(Y,G),s(Y,J),s(Y,R),g(R,t[14].precision),s(n,W),s(n,F),s(F,q),s(q,X),s(F,Z),s(F,K),s(K,Q),s(F,nt),s(F,ot),s(n,it),s(n,rt),s(rt,st),s(st,at),s(rt,dt),s(rt,ct),s(ct,pt),s(ct,ft),s(ct,mt),s(n,vt),s(n,yt),s(yt,wt),s(wt,kt),s(yt,Ct),s(yt,Tt),s(Tt,zt),s(yt,St),s(yt,Dt),s(Dt,Nt),s(Dt,Ot),s(Dt,Vt),s(Vt,At),s(At,Lt),It||(Bt=[u(y,"click",t[68]),u(_,"click",t[69]),u(z,"click",t[70]),u(D,"click",t[71]),u(B,"change",t[72]),u(B,"input",t[72]),u(R,"change",t[73]),u(R,"input",t[73]),u(q,"click",t[74]),u(K,"click",t[75]),u(ot,"click",t[76]),u(st,"click",t[77]),u(ct,"click",t[80]),u(wt,"click",t[81]),u(Tt,"click",t[82]),u(Dt,"click",t[83])],It=!0)},p(t,e){Gt===(Gt=Yt(t))&&Jt?Jt.p(t,e):(Jt.d(1),Jt=Gt(t),Jt&&(Jt.c(),Jt.m(i,null))),8&e[0]&&k!==(k=!t[3]?.zoom?.in)&&(y.disabled=k),8&e[0]&&C!==(C=!t[3]?.zoom?.out)&&(_.disabled=C),8&e[0]&&P!==(P=!t[3]?.home)&&(z.disabled=P),32&e[0]&&E!==(E="btn btn-sm btn-"+(t[5]?"primary":"light"))&&b(z,"class",E),8&e[0]&&O!==(O=!t[3]?.clickToCenter)&&(D.disabled=O),67108864&e[0]&&V!==(V="btn btn-sm btn-"+(t[26]?"primary":"light"))&&b(D,"class",V),16384&e[0]&&g(B,t[14].speed),16384&e[0]&&g(R,t[14].precision),16777216&e[0]&&U!==(U="btn btn-sm btn-"+(t[24]?"primary":"light"))&&b(q,"class",U),8&e[0]&&tt!==(tt=!t[3]?.joystick)&&(K.disabled=tt),33554432&e[0]&&et!==(et="btn btn-sm btn-"+(t[25]&&"dpad"===t[25]?"light":"primary"))&&b(K,"class",et),8&e[0]&<!==(lt=!t[3]?.addPreset)&&(st.disabled=lt),20&e[0]&&Ht!==(Ht=(t[4]&&t[2].find(t[78])?t[2].find(t[79])?.name:"")+"")&&h(pt,Ht),8&e[0]&&ht!==(ht=!t[3]?.presets)&&(ct.disabled=ht),16&e[0]&>!==(gt="btn btn-sm btn-"+(t[4]?"primary":"light"))&&b(ct,"class",gt),512&e[0]&&xt!==(xt="bi bi-"+(t[9]?.muted||!t[9]?"volume-mute-fill":"volume-up-fill"))&&b(kt,"class",xt),262144&e[0]&&_t!==(_t=!t[18])&&(wt.disabled=_t),262656&e[0]&&$t!==($t="btn btn-sm btn-"+(t[18]?t[9]?.muted?"warning":"primary":"light"))&&b(wt,"class",$t),66048&e[0]&&jt!==(jt="bi bi-"+(t[16]||!t[9]?"pause-fill":"play"))&&b(zt,"class",jt),262144&e[0]&&Pt!==(Pt=!t[18])&&(Tt.disabled=Pt),393216&e[0]&&Et!==(Et="btn btn-sm btn-"+(t[18]?t[17]?"primary":"warning":"light"))&&b(Tt,"class",Et),32768&e[0]&&h(Lt,t[15]),8&e[0]&&Mt!==(Mt=!t[3]?.settings)&&(Dt.disabled=Mt)},d(t){t&&l(e),Jt.d(),It=!1,o(Bt)}}}function ut(t){let e,n,o,i;return{c(){e=d("hb-pad-joystick"),f(e,"id",n="pad_"+t[25]),f(e,"pad_or_joystick","joystick"),f(e,"size","60px"),f(e,"style",t[11])},m(n,r){a(n,e,r),o||(i=u(e,"sendJoystickPosition",t[67]),o=!0)},p(t,o){33554432&o[0]&&n!==(n="pad_"+t[25])&&f(e,"id",n),2048&o[0]&&f(e,"style",t[11])},d(t){t&&l(e),o=!1,i()}}}function bt(t){let e,n,o,i;return{c(){e=d("hb-pad-joystick"),f(e,"id",n="pad_"+t[25]),f(e,"pad_or_joystick","dpad"),f(e,"size","60px"),f(e,"style",t[11])},m(n,r){a(n,e,r),o||(i=u(e,"sendDirection",t[66]),o=!0)},p(t,o){33554432&o[0]&&n!==(n="pad_"+t[25])&&f(e,"id",n),2048&o[0]&&f(e,"style",t[11])},d(t){t&&l(e),o=!1,i()}}}function ft(e){let n,i,r,m,g,y,w,k,x,_,$,C,T,z,j,P,E,S,D,N,O,V,A,L,M,I,B,H,Y,G,J,R,W,F,q,X,U,Z,K,Q,tt,et,nt=(e[13]?e[2].find(e[57])?.token:"")+"",ot=(e[13]?e[2].find(e[61])?.token:"")+"",it=e[8]?.length&&dt(e),rt=e[6]&&ct(e);return{c(){n=d("link"),i=p(),r=d("hb-dialog"),m=d("div"),it&&it.c(),y=p(),w=d("hb-dialog"),k=d("div"),k.textContent="Are You sure to add this scene to the preset?",_=p(),$=d("hb-dialog"),C=d("div"),C.textContent="Are You sure to go To Home?",z=p(),j=d("hb-dialog"),P=d("div"),E=c("Are You sure to DELETE preset "),S=c(nt),D=c("?"),A=p(),L=d("hb-dialog"),M=d("div"),I=c('Are You sure to GO to preset "'),B=c(ot),H=c('"?'),R=p(),W=d("div"),F=d("hb-player-live"),q=p(),X=d("div"),U=p(),Z=d("div"),K=d("table"),K.innerHTML="<tr><td></td> \n\t\t\t\t<td></td> \n\t\t\t\t<td></td> \n\t\t\t\t<td></td></tr> \n\t\t\t<tr><td></td> \n\t\t\t\t<td></td> \n\t\t\t\t<td></td> \n\t\t\t\t<td></td></tr> \n\t\t\t<tr><td></td> \n\t\t\t\t<td></td> \n\t\t\t\t<td></td> \n\t\t\t\t<td></td></tr> \n\t\t\t<tr><td></td> \n\t\t\t\t<td></td> \n\t\t\t\t<td></td> \n\t\t\t\t<td></td></tr>",Q=p(),rt&&rt.c(),this.c=t,b(n,"rel","stylesheet"),b(n,"href","https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css"),b(m,"slot","body-content"),f(r,"title","Presets"),f(r,"show",g=e[19]?"yes":"no"),f(r,"hide_confirm","yes"),b(k,"slot","body-content"),f(w,"title","Add Scene to Preset"),f(w,"show",x=e[20]?"yes":"no"),b(C,"slot","body-content"),f($,"title","Go to Home"),f($,"show",T=e[23]?"yes":"no"),f($,"confirmlabel","GO"),b(P,"slot","body-content"),f(j,"id",N="del_"+e[13]),f(j,"title",O="Go to Preset "+(e[13]?e[2].find(e[58])?.token:"")),f(j,"show",V=e[21]?"yes":"no"),f(j,"confirmlabel","delete"),f(j,"confirm_btn_class","danger"),b(M,"slot","body-content"),f(L,"id",Y="goto_"+e[13]),f(L,"title",G="Go to Preset "+(e[13]?e[2].find(e[62])?.token:"")),f(L,"show",J=e[22]?"yes":"no"),f(L,"confirmlabel","go"),f(L,"confirm_btn_class","light"),f(F,"no_controls","yes"),f(F,"id","player"),f(F,"mediauri",e[1]),f(F,"style",e[10]),b(X,"id","area_selector"),v(X,"display",e[26]?"inherit":"none"),v(X,"width",e[27].width+"px"),v(X,"height",e[27].height+"px"),v(X,"top",e[27].top+"px"),v(X,"left",e[27].left+"px"),b(K,"id","grid_table"),b(Z,"id","grid"),v(Z,"display",e[24]?"inherit":"none"),b(W,"id","container"),v(W,"cursor",e[26]?"crosshair":"")},m(t,o){s(document.head,n),a(t,i,o),a(t,r,o),s(r,m),it&&it.m(m,null),a(t,y,o),a(t,w,o),s(w,k),a(t,_,o),a(t,$,o),s($,C),a(t,z,o),a(t,j,o),s(j,P),s(P,E),s(P,S),s(P,D),a(t,A,o),a(t,L,o),s(L,M),s(M,I),s(M,B),s(M,H),a(t,R,o),a(t,W,o),s(W,F),s(W,q),s(W,X),s(W,U),s(W,Z),s(Z,K),s(W,Q),rt&&rt.m(W,null),tt||(et=[u(r,"modalShow",e[52]),u(w,"modalShow",e[53]),u(w,"modalConfirm",e[54]),u($,"modalShow",e[55]),u($,"modalConfirm",e[56]),u(j,"modalShow",e[59]),u(j,"modalConfirm",e[60]),u(L,"modalShow",e[63]),u(L,"modalConfirm",e[64]),u(F,"htmlVideoInit",e[65]),u(W,"mousemove",e[85])],tt=!0)},p(t,e){t[8]?.length?it?it.p(t,e):(it=dt(t),it.c(),it.m(m,null)):it&&(it.d(1),it=null),524288&e[0]&&g!==(g=t[19]?"yes":"no")&&f(r,"show",g),1048576&e[0]&&x!==(x=t[20]?"yes":"no")&&f(w,"show",x),8388608&e[0]&&T!==(T=t[23]?"yes":"no")&&f($,"show",T),8196&e[0]&&nt!==(nt=(t[13]?t[2].find(t[57])?.token:"")+"")&&h(S,nt),8192&e[0]&&N!==(N="del_"+t[13])&&f(j,"id",N),8196&e[0]&&O!==(O="Go to Preset "+(t[13]?t[2].find(t[58])?.token:""))&&f(j,"title",O),2097152&e[0]&&V!==(V=t[21]?"yes":"no")&&f(j,"show",V),8196&e[0]&&ot!==(ot=(t[13]?t[2].find(t[61])?.token:"")+"")&&h(B,ot),8192&e[0]&&Y!==(Y="goto_"+t[13])&&f(L,"id",Y),8196&e[0]&&G!==(G="Go to Preset "+(t[13]?t[2].find(t[62])?.token:""))&&f(L,"title",G),4194304&e[0]&&J!==(J=t[22]?"yes":"no")&&f(L,"show",J),2&e[0]&&f(F,"mediauri",t[1]),1024&e[0]&&f(F,"style",t[10]),67108864&e[0]&&v(X,"display",t[26]?"inherit":"none"),134217728&e[0]&&v(X,"width",t[27].width+"px"),134217728&e[0]&&v(X,"height",t[27].height+"px"),134217728&e[0]&&v(X,"top",t[27].top+"px"),134217728&e[0]&&v(X,"left",t[27].left+"px"),16777216&e[0]&&v(Z,"display",t[24]?"inherit":"none"),t[6]?rt?rt.p(t,e):(rt=ct(t),rt.c(),rt.m(W,null)):rt&&(rt.d(1),rt=null),67108864&e[0]&&v(W,"cursor",t[26]?"crosshair":"")},i:t,o:t,d(t){l(n),t&&l(i),t&&l(r),it&&it.d(),t&&l(y),t&&l(w),t&&l(_),t&&l($),t&&l(z),t&&l(j),t&&l(A),t&&l(L),t&&l(R),t&&l(W),rt&&rt.d(),tt=!1,o(et)}}}function mt(t,e,n){const o=x(),i=_();function r(t,e){i(t,e),o.dispatchEvent&&o.dispatchEvent(new CustomEvent(t,{detail:e}))}let s,a,{id:l}=e,{style:d}=e,{live_uri:c}=e,{presets:p}=e,{position:u}=e,{configuration:b}=e,{current_preset:f}=e,{is_home:h}=e,{is_ptz_connected:g}=e,{is_ptz_panel_opened:v}=e,y="",w="",k="",$="";const C={precision:50,speed:50},T={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 z,j=(new Date).toLocaleTimeString();let P,E,S=!1,D=!1,N=!1,O=!1,V=!1,A=!1,L=!1,M="dpad",B=!1,H={top:0,left:0,width:0,height:0},Y={};function G(t){if(!b.zoom)return console.error("Zoom is not enabled in the configuration");if(!b.zoom[t])return console.error(`Zoom ${t} is not enabled in the configuration`);r("zoomAction",{time:new Date,id:l,movementSettings:C,direction:t})}function J(){if(!b.home)return console.error("Go to home is not enabled in the configuration");r("goToHome",{id:l,movementSettings:C})}function R(){if(!b.addPreset)return console.error("Add scene to preset is not enabled in the configuration");r("setPreset",{time:new Date,id:l})}function W(){if(!b.presets)return console.error("Presets is not enabled in the configuration");n(19,D=!D)}function F(){if(!b.addPreset)return console.error("Add scene to preset is not enabled in the configuration");n(20,N=!N)}function q(){if(!b.home)return console.error("Go to home is not enabled in the configuration");n(23,A=!A)}function X(t){if(!b.switchPreset)return console.error("Switch preset is not enabled in the configuration");const e=p.find((e=>e.token===t));if(e){r("goToPreset",Object.assign({time:new Date,playerId:l,movementSettings:C},e))}else console.error("Preset not found")}function U(){r("initVideo",{time:new Date,id:l,htmlVideoElement:s}),n(9,s.onloadedmetadata=()=>{n(18,S=!0)},s),n(9,s.onpause=()=>{n(16,P=!0),n(17,E=!1)},s),n(9,s.onplay=()=>{n(16,P=!1),n(17,E=!0)},s),n(9,s.onclick=t=>{if(B){const e=s.getBoundingClientRect(),o={x:t.clientX-e.left,y:t.clientY-e.top,width:0,height:0};Y.start?(n(28,Y={start:Y.start,end:o}),function(){if(!(null==b?void 0:b.clickToCenter))return console.error("Click to center is not enabled in the configuration");const t=s.getBoundingClientRect();r("goToSelectedArea",Object.assign({time:new Date,id:l,movementSettings:C,htmlVideoElementWidth:t.width,htmlVideoElementHeight:t.height},H)),n(26,B=!1),n(27,H={top:0,left:0,width:0,height:0}),n(28,Y={})}()):n(28,Y={start:o})}},s),n(9,s.onmousemove=t=>{var e,o,i,r;if(B){const s={x:t.clientX,y:t.clientY};Y.start&&(n(28,Y={start:Y.start,end:s}),n(27,H={top:Y.start.y>Y.end.y?Y.end.y:Y.start.y,left:Y.start.x>Y.end.x?Y.end.x:Y.start.x,width:Math.abs(((null===(e=null==Y?void 0:Y.start)||void 0===e?void 0:e.x)||0)-((null===(o=null==Y?void 0:Y.end)||void 0===o?void 0:o.x)||0)),height:Math.abs(((null===(i=null==Y?void 0:Y.start)||void 0===i?void 0:i.y)||0)-((null===(r=null==Y?void 0:Y.end)||void 0===r?void 0:r.y)||0))}))}},s)}function Z(t){if(!b.deletePreset)return console.error("Delete preset is not enabled in the configuration");const e=p.find((e=>e.token===t));if(e){r("deletePreset",Object.assign({time:new Date,playerId:l},e))}else console.error("Preset not found")}function K(t){if(!(null==b?void 0:b.joystick)||(null==b?void 0:b.pan)||(null==b?void 0:b.tilt))return console.error("Pan and Tilt on joystick are not enabled in the configuration");r("sendJoystickPosition",{id:l,x:t.x,y:t.y,cardinalDirection:t.cardinalDirection,joyId:t.id,movementSettings:C})}function Q(t){b.pan&&b.tilt?r("sendDirection",{id:l,movementSettings:C,direction:t.direction,joyId:t.id}):console.error("Pan and Tilt are not enabled in the configuration")}function tt(){n(24,L=!L)}function et(){if(!(null==b?void 0:b.clickToCenter))return console.error("Click to center is not enabled in the configuration");n(26,B=!B)}function ot(){if("dpad"===M){if(!(null==b?void 0:b.joystick))return console.error("Joystick is not enabled in the configuration");n(25,M="joystick")}else n(25,M="dpad")}function dt(t){var e;console.log(t,"presetclick"),n(19,D=!1);const o=null===(e=p.find((e=>t.itemId.includes(e.token+"_"))))||void 0===e?void 0:e.token;switch(n(13,$=o),t.action){case"goto":n(22,V=!0);break;case"delete":n(21,O=!0);break;default:return console.error("Action not found")}}function ct(){if(!s)return console.error("Video element not found");s.paused?s.play():s.pause()}setInterval((()=>{n(15,j=(new Date).toLocaleTimeString())}),1e3),it.addComponent({repoName:"@htmlbricks/hb-player-live",version:I.version}),it.addComponent({repoName:"@htmlbricks/hb-pad-joystick",version:I.version}),it.addComponent({repoName:"@htmlbricks/hb-table",version:I.version}),it.addComponent({repoName:"@htmlbricks/hb-dialog",version:I.version});return t.$$set=t=>{"id"in t&&n(0,l=t.id),"style"in t&&n(49,d=t.style),"live_uri"in t&&n(1,c=t.live_uri),"presets"in t&&n(2,p=t.presets),"position"in t&&n(48,u=t.position),"configuration"in t&&n(3,b=t.configuration),"current_preset"in t&&n(4,f=t.current_preset),"is_home"in t&&n(5,h=t.is_home),"is_ptz_connected"in t&&n(6,g=t.is_ptz_connected),"is_ptz_panel_opened"in t&&n(7,v=t.is_ptz_panel_opened)},t.$$.update=()=>{511&t.$$.dirty[0]|917504&t.$$.dirty[1]&&(c||n(1,c=""),l||n(0,l=""),d&&(n(50,a=nt(d)),n(10,y=it.getChildStyleToPass(a,null==rt?void 0:rt.vars)),n(11,w=it.getChildStyleToPass(a,null==st?void 0:st.vars)),n(12,k=it.getChildStyleToPass(a,null==at?void 0:at.vars)),it.getChildStyleToPass(a,null==lt?void 0:lt.vars)),""===g&&n(6,g=!0),g||n(6,g=!1),"string"==typeof g&&n(6,g="true"===g||"yes"===g),""===v&&n(7,v=!0),v||n(7,v=!1),"string"==typeof v&&n(7,v="true"===v||"yes"===v),""===h&&n(5,h=!0),h||n(5,h=!1),"string"==typeof h&&n(5,h="true"===h||"yes"===h),b?"string"==typeof b&&n(3,b=JSON.parse(b)):n(3,b=T),f||n(4,f=""),p?"string"==typeof p&&n(2,p=JSON.parse(p)):n(2,p=[]),!(null==z?void 0:z.length)&&p.length&&n(8,z=p.map((t=>({_id:t.token+"_"+t.name,name:t.name,token:t.token})))),u||n(48,u="right-bottom"))},[l,c,p,b,f,h,g,v,z,s,y,w,k,$,C,j,P,E,S,D,N,O,V,A,L,M,B,H,Y,r,[{label:"Name",key:"name",copyTxt:!0},{label:"Token",key:"token",copyTxt:!0}],[{name:"goto",type:"icon",iconOrText:"arrow-right-circle"},{name:"delete",type:"icon",iconOrText:"x-circle-fill",btnClass:"danger"}],G,J,R,W,F,q,X,U,Z,K,Q,tt,et,ot,dt,ct,u,d,a,t=>{dt(t.detail)},t=>{n(19,D=t.detail.show)},t=>{n(20,N=t.detail.show)},t=>{t?.detail?.confirm&&R()},t=>{n(23,A=t.detail.show)},t=>{t?.detail?.confirm&&J()},t=>t.token===$,t=>t.token===$,t=>{n(21,O=t.detail.show)},t=>{console.log(t.detail,"detail"),t?.detail?.confirm&&Z(t.detail.id.split("del_")[1])},t=>t.token===$,t=>t.token===$,t=>{n(22,V=t.detail.show)},t=>{console.log(t.detail.id.split("goto")[1],"detail"),t?.detail?.confirm&&X(t.detail.id.split("goto_")[1])},t=>{console.log(t.detail,"detailvid"),n(9,s=t.detail.htmlVideoElement),U()},t=>{Q(t.detail)},t=>{K(t.detail)},()=>G("in"),()=>G("out"),()=>q(),()=>et(),function(){C.speed=m(this.value),n(14,C)},function(){C.precision=m(this.value),n(14,C)},()=>tt(),()=>ot(),()=>s.requestFullscreen(),()=>F(),t=>t.token===f,t=>t.token===f,()=>{W()},()=>n(9,s.muted=!s.muted,s),()=>ct(),()=>{},()=>{n(7,v=!v),r("panelMove",{id:l,opened:v})},t=>{if(B){const e=s.getBoundingClientRect(),o={x:t.clientX-e.left,y:t.clientY-e.top};Y.start&&(n(28,Y={start:Y.start,end:o}),n(27,H={top:Y.start.y>Y.end.y?Y.end.y:Y.start.y,left:Y.start.x>Y.end.x?Y.end.x:Y.start.x,width:Math.abs((Y?.start?.x||0)-(Y?.end?.x||0)),height:Math.abs((Y?.start?.y||0)-(Y?.end?.y||0))}))}}]}class ht extends M{constructor(t){super(),this.shadowRoot.innerHTML='<style>@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");@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css");:host{font-family:"Roboto", sans-serif}#grid_table{width:100%;height:100%}#area_selector{position:absolute;z-index:2;border:solid 2px red}#grid{position:absolute;top:0px;z-index:2;width:100%;height:100%}#grid td{border:2px solid black}.area{padding:5px}#container{position:relative;width:100%;height:100%;display:block;min-height:160px}hb-pad-joystick{--hb-pad-joystick-size:100px}#joystick{grid-area:pad;margin-top:7px;display:block;width:100%;text-align:center}#buttons{grid-area:buttons}#presets_buttons{grid-area:presets_buttons}#speed{grid-area:speed;text-align:center;vertical-align:middle;line-height:28px}#precision{grid-area:precision;text-align:center;vertical-align:middle;line-height:28px}#presets_select{grid-area:presets_select}#presets_view{grid-area:presets_view}#controller{position:absolute;top:calc(100% - 160px);width:100%;z-index:3}#opener{background-color:silver;line-height:126px;vertical-align:middle;position:absolute;position:absolute;top:calc(100% - 160px);z-index:4;cursor:pointer}#panel{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{font-size:0.6em;width:50px;display:inline-block;font-weight:bold}#player{z-index:1}.timecell{font-size:0.8em;line-height:20px;width:56px;display:inline-block;vertical-align:middle}.range{vertical-align:middle;line-height:28px}*,*::before,*::after{box-sizing:border-box}@media(prefers-reduced-motion: no-preference){:host{scroll-behavior:smooth}}@media(min-width: 1200px){}@media(min-width: 1200px){}@media(min-width: 1200px){}@media(min-width: 1200px){}table{caption-side:bottom;border-collapse:collapse}tr,td{border-color:inherit;border-style:solid;border-width:0}button{border-radius:0}button:focus:not(:focus-visible){outline:0}input,button{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button{text-transform:none}button{-webkit-appearance:button}button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}@media(min-width: 1200px){}::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-text,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}.btn{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}@media(prefers-reduced-motion: reduce){.btn{transition:none}}.btn:hover{color:#212529}.btn:focus{outline:0;box-shadow:0 0 0 0.25rem rgba(13, 110, 253, 0.25)}.btn:disabled{pointer-events:none;opacity:0.65}.btn-primary{color:#fff;background-color:var(--bs-primary,#07689f);border-color:var(--bs-primary,#07689f)}.btn-primary:hover{color:#fff;background-color:#0b5ed7;border-color:#0a58ca}.btn-primary:focus{color:#fff;background-color:#0b5ed7;border-color:#0a58ca;box-shadow:0 0 0 0.25rem rgba(49, 132, 253, 0.5)}.btn-primary:active{color:#fff;background-color:#0a58ca;border-color:#0a53be}.btn-primary:active:focus{box-shadow:0 0 0 0.25rem rgba(49, 132, 253, 0.5)}.btn-primary:disabled{color:#fff;background-color:var(--bs-primary,#07689f);border-color:var(--bs-primary,#07689f)}.btn-warning{color:#000;background-color:#ffc107;border-color:#ffc107}.btn-warning:hover{color:#000;background-color:#ffca2c;border-color:#ffc720}.btn-warning:focus{color:#000;background-color:#ffca2c;border-color:#ffc720;box-shadow:0 0 0 0.25rem rgba(217, 164, 6, 0.5)}.btn-warning:active{color:#000;background-color:#ffcd39;border-color:#ffc720}.btn-warning:active:focus{box-shadow:0 0 0 0.25rem rgba(217, 164, 6, 0.5)}.btn-warning:disabled{color:#000;background-color:#ffc107;border-color:#ffc107}.btn-light{color:#000;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:hover{color:#000;background-color:#f9fafb;border-color:#f9fafb}.btn-light:focus{color:#000;background-color:#f9fafb;border-color:#f9fafb;box-shadow:0 0 0 0.25rem rgba(211, 212, 213, 0.5)}.btn-light:active{color:#000;background-color:#f9fafb;border-color:#f9fafb}.btn-light:active:focus{box-shadow:0 0 0 0.25rem rgba(211, 212, 213, 0.5)}.btn-light:disabled{color:#000;background-color:#f8f9fa;border-color:#f8f9fa}.btn-sm{padding:0.25rem 0.5rem;font-size:0.875rem;border-radius:0.2rem}.btn-group{position:relative;display:inline-flex;vertical-align:middle}.btn-group>.btn{position:relative;flex:1 1 auto}.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active{z-index:1}.btn-group>.btn:not(:first-child){margin-left:-1px}.btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:nth-child(n+3),.btn-group>:not(.btn-check)+.btn{border-top-left-radius:0;border-bottom-left-radius:0}@media(min-width: 576px){}@media(min-width: 768px){}@media(min-width: 992px){}@media(min-width: 1200px){}@media(min-width: 1400px){}@media(min-width: 576px){}@media(min-width: 768px){}@media(min-width: 992px){}@media(min-width: 1200px){}@media(min-width: 1400px){}@media(min-width: 1200px){}@media print{}</style>',L(this,{target:this.shadowRoot,props:y(this.attributes),customElement:!0},mt,ft,r,{id:0,style:49,live_uri:1,presets:2,position:48,configuration:3,current_preset:4,is_home:5,is_ptz_connected:6,is_ptz_panel_opened:7},null,[-1,-1,-1]),t&&(t.target&&a(t.target,this,t.anchor),t.props&&(this.$set(t.props),N()))}static get observedAttributes(){return["id","style","live_uri","presets","position","configuration","current_preset","is_home","is_ptz_connected","is_ptz_panel_opened"]}get id(){return this.$$.ctx[0]}set id(t){this.$$set({id:t}),N()}get style(){return this.$$.ctx[49]}set style(t){this.$$set({style:t}),N()}get live_uri(){return this.$$.ctx[1]}set live_uri(t){this.$$set({live_uri:t}),N()}get presets(){return this.$$.ctx[2]}set presets(t){this.$$set({presets:t}),N()}get position(){return this.$$.ctx[48]}set position(t){this.$$set({position:t}),N()}get configuration(){return this.$$.ctx[3]}set configuration(t){this.$$set({configuration:t}),N()}get current_preset(){return this.$$.ctx[4]}set current_preset(t){this.$$set({current_preset:t}),N()}get is_home(){return this.$$.ctx[5]}set is_home(t){this.$$set({is_home:t}),N()}get is_ptz_connected(){return this.$$.ctx[6]}set is_ptz_connected(t){this.$$set({is_ptz_connected:t}),N()}get is_ptz_panel_opened(){return this.$$.ctx[7]}set is_ptz_panel_opened(t){this.$$set({is_ptz_panel_opened:t}),N()}}return customElements.define("hb-player-live-camera-ptz",ht),ht}();
|
|
1
|
+
var release=function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function o(t){t.forEach(e)}function i(t){return"function"==typeof t}function r(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function s(t,e){t.appendChild(e)}function a(t,e,n){t.insertBefore(e,n||null)}function l(t){t.parentNode&&t.parentNode.removeChild(t)}function d(t){return document.createElement(t)}function c(t){return document.createTextNode(t)}function p(){return c(" ")}function u(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function b(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function f(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:b(t,e,n)}function m(t){return""===t?null:+t}function h(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function g(t,e){t.value=null==e?"":e}function v(t,e,n,o){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,o?"important":"")}function y(t){const e={};for(const n of t)e[n.name]=n.value;return e}let w;function k(t){w=t}function x(){if(!w)throw new Error("Function called outside component initialization");return w}function _(){const t=x();return(e,n,{cancelable:o=!1}={})=>{const i=t.$$.callbacks[e];if(i){const r=function(t,e,{bubbles:n=!1,cancelable:o=!1}={}){const i=document.createEvent("CustomEvent");return i.initCustomEvent(t,n,o,e),i}(e,n,{cancelable:o});return i.slice().forEach((e=>{e.call(t,r)})),!r.defaultPrevented}return!0}}const $=[],C=[],T=[],z=[],j=Promise.resolve();let P=!1;function E(t){T.push(t)}const S=new Set;let D=0;function N(){if(0!==D)return;const t=w;do{try{for(;D<$.length;){const t=$[D];D++,k(t),O(t.$$)}}catch(t){throw $.length=0,D=0,t}for(k(null),$.length=0,D=0;C.length;)C.pop()();for(let t=0;t<T.length;t+=1){const e=T[t];S.has(e)||(S.add(e),e())}T.length=0}while($.length);for(;z.length;)z.pop()();P=!1,S.clear(),k(t)}function O(t){if(null!==t.fragment){t.update(),o(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(E)}}const V=new Set;function A(t,e){-1===t.$$.dirty[0]&&($.push(t),P||(P=!0,j.then(N)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function L(r,s,a,d,c,p,u,b=[-1]){const f=w;k(r);const m=r.$$={fragment:null,ctx:[],props:p,update:t,not_equal:c,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s.context||(f?f.$$.context:[])),callbacks:n(),dirty:b,skip_bound:!1,root:s.target||f.$$.root};u&&u(m.root);let h=!1;if(m.ctx=a?a(r,s.props||{},((t,e,...n)=>{const o=n.length?n[0]:e;return m.ctx&&c(m.ctx[t],m.ctx[t]=o)&&(!m.skip_bound&&m.bound[t]&&m.bound[t](o),h&&A(r,t)),e})):[],m.update(),h=!0,o(m.before_update),m.fragment=!!d&&d(m.ctx),s.target){if(s.hydrate){const t=function(t){return Array.from(t.childNodes)}(s.target);m.fragment&&m.fragment.l(t),t.forEach(l)}else m.fragment&&m.fragment.c();s.intro&&((g=r.$$.fragment)&&g.i&&(V.delete(g),g.i(v))),function(t,n,r,s){const{fragment:a,after_update:l}=t.$$;a&&a.m(n,r),s||E((()=>{const n=t.$$.on_mount.map(e).filter(i);t.$$.on_destroy?t.$$.on_destroy.push(...n):o(n),t.$$.on_mount=[]})),l.forEach(E)}(r,s.target,s.anchor,s.customElement),N()}var g,v;k(f)}let M;"function"==typeof HTMLElement&&(M=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(e).filter(i);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){o(this.$$.on_disconnect)}$destroy(){!function(t,e){const n=t.$$;null!==n.fragment&&(o(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=t}$on(e,n){if(!i(n))return t;const o=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return o.push(n),()=>{const t=o.indexOf(n);-1!==t&&o.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var I={name:"@htmlbricks/hb-player-live-camera-ptz",displayName:"Svelte Boostrap Pagination WebComponent",description:"Svelte Boostrap Pagination WebComponent",version:"0.19.24",main:"release/release.js",publishConfig:{access:"public"},author:"Dario Caruso <dev@dariocaruso.info> (https://dariocaruso.info)",authorUrl:"https://dariocaruso.info",license:"MIT","license-docs":"CC BY 4.0","license-translations":"CC BY 4.0","license-images":"CC BY-NC 4.0",engines:{node:">=16.0.0"},scripts:{start:"sirv dist",dev:"rm -rf ./dist && rollup -c -w",build:"rm -rf ./dist && rollup -c","generate-manifest":"npm run generate-schemes && monorepo-wc-packages-manifester --dir $PWD","generate-component-schema":"ts-json-schema-generator --type 'Component' --path 'app/types/webcomponent.type.d.ts' > dist/webcomponent.type.d.json","generate-events-schema":"ts-json-schema-generator --type 'Events' --path 'app/types/webcomponent.type.d.ts' > dist/webcomponent_events.type.d.json","generate-schemes":"npm run generate-events-schema && npm run generate-component-schema",copydest:"rm -rf release && mkdir -p release && mkdir -p release && cp dist/* ./release/","build-extra":"tsc --moduleResolution node --module es2020 --esModuleInterop true --outDir dist --sourceMap --skipLibCheck extra/*","build:release":"PRODUCTION=true npm run build && npm run build-extra && npm run generate-manifest && npm run copydest",prepublish:"npm run build:release"},devDependencies:{"@rollup/plugin-alias":"^3.1.2","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^4.0.0","@rollup/plugin-typescript":"^8.2.1","@tsconfig/svelte":"^1.0.10","@types/node":"^16.7.1","@typescript-eslint/eslint-plugin":"^4.22.0","@typescript-eslint/parser":"^4.22.0",eslint:"^7.25.0","eslint-plugin-jsdoc":"^33.0.0","eslint-plugin-svelte3":"^3.2.0","monorepo-wc-packages-manifester":"^0.0.3","node-sass":"^6.0.1",postcss:"^8.2.13","postcss-load-config":"^3.0.1",prettier:"^2.8.4",rollup:"^2.46.0","rollup-plugin-copy":"^3.4.0","rollup-plugin-css-only":"^3.1.0","rollup-plugin-livereload":"^2.0.0","rollup-plugin-svelte":"^7.1.0","rollup-plugin-terser":"^7.0.2","rollup-plugin-ts-paths":"^1.0.5","rollup-plugin-typescript2":"^0.31.1",sass:"^1.32.12","sirv-cli":"^1.0.11",svelte:"^3.46.2","svelte-check":"^1.5.2","svelte-preprocess":"^4.7.2","ts-json-schema-generator":"^0.98.0","ts-node":"^9.1.1",tslib:"^2.2.0",ttypescript:"^1.5.12",typescript:"^4.2.4","typescript-transform-paths":"^2.2.3","wc-js-utils":"^0.0.1"},keywords:["svelte","svelte-webcomponents","webcomponents","html5-webcomponents"],contributors:[],gitHead:"f18a32cd011dd7bc16b067602dba9a24eccc04b9",dependencies:{"@htmlbricks/hb-dialog":"^0.19.24","@htmlbricks/hb-pad-joystick":"^0.19.24","@htmlbricks/hb-player-live":"^0.19.24","@htmlbricks/hb-table":"^0.19.24","style-to-object":"^0.3.0"}},B=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,H=/\n/g,Y=/^\s*/,G=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,J=/^:\s*/,R=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,W=/^[;\s]*/,F=/^\s+|\s+$/g,q="\n",X="/",U="*",Z="",K="comment",Q="declaration",tt=function(t,e){if("string"!=typeof t)throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var n=1,o=1;function i(t){var e=t.match(H);e&&(n+=e.length);var i=t.lastIndexOf(q);o=~i?t.length-i:o+t.length}function r(){var t={line:n,column:o};return function(e){return e.position=new s(t),d(),e}}function s(t){this.start=t,this.end={line:n,column:o},this.source=e.source}function a(i){var r=new Error(e.source+":"+n+":"+o+": "+i);if(r.reason=i,r.filename=e.source,r.line=n,r.column=o,r.source=t,!e.silent)throw r}function l(e){var n=e.exec(t);if(n){var o=n[0];return i(o),t=t.slice(o.length),n}}function d(){l(Y)}function c(t){var e;for(t=t||[];e=p();)!1!==e&&t.push(e);return t}function p(){var e=r();if(X==t.charAt(0)&&U==t.charAt(1)){for(var n=2;Z!=t.charAt(n)&&(U!=t.charAt(n)||X!=t.charAt(n+1));)++n;if(n+=2,Z===t.charAt(n-1))return a("End of comment missing");var s=t.slice(2,n-2);return o+=2,i(s),t=t.slice(n),o+=2,e({type:K,comment:s})}}function u(){var t=r(),e=l(G);if(e){if(p(),!l(J))return a("property missing ':'");var n=l(R),o=t({type:Q,property:et(e[0].replace(B,Z)),value:n?et(n[0].replace(B,Z)):Z});return l(W),o}}return s.prototype.content=t,d(),function(){var t,e=[];for(c(e);t=u();)!1!==t&&(e.push(t),c(e));return e}()};function et(t){return t?t.replace(F,Z):Z}var nt=function(t,e){var n,o=null;if(!t||"string"!=typeof t)return o;for(var i,r,s=tt(t),a="function"==typeof e,l=0,d=s.length;l<d;l++)i=(n=s[l]).property,r=n.value,a?e(i,r,n):r&&(o||(o={}),o[i]=r);return o};var ot,it=(function(t,e){e.__esModule=!0,e.LanguageTranslator=e.addComponent=e.getChildStyleToPass=void 0,e.getChildStyleToPass=function(t,e){var n,o,i="";if(t&&(null==e?void 0:e.length)&&(null===(n=Object.keys(t))||void 0===n?void 0:n.length)&&(null===(o=null==e?void 0:e.filter((function(e){return Object.keys(t).includes(e.name)})))||void 0===o?void 0:o.length))for(var r=function(n){(null==e?void 0:e.filter((function(e){return e.name===n&&e.defaultValue!==t[n]})))&&(i+="".concat(n,":").concat(t[n],";"))},s=0,a=Object.keys(t);s<a.length;s++)r(a[s]);return i},e.addComponent=function(t){var e,n=(null===(e=null==t?void 0:t.repoName.split("/"))||void 0===e?void 0:e[1])||(null==t?void 0:t.repoName);if(!n)throw new Error("wrong componentPath "+(null==t?void 0:t.repoName));if(!(null==t?void 0:t.version))throw new Error("wrong version "+(null==t?void 0:t.version));var o=(null==t?void 0:t.iifePath)||"release/release.js";if(!document.getElementById(n+"-script"))try{var i=document.createElement("script");i.id=n+"-script",i.src="https://cdn.jsdelivr.net/npm/".concat(t.repoName,"@").concat(t.version,"/").concat(o),(null==t?void 0:t.local)&&location.href.includes("localhost")&&(i.src="".concat(t.local)),document.head.appendChild(i)}catch(t){console.warn(t)}};var n=function(){function t(t){if(!(null==t?void 0:t.dictionary))throw new Error("no dictionary provided");this.dictionary=t.dictionary,this.setLang(null==t?void 0:t.lang)}return t.prototype.setLang=function(e){e||(e=t.getDefaultLang()),this.lang=e},t.prototype.translateWord=function(e,n){return t.getDictionaryWord(e,this.dictionary,n||this.lang)},t.prototype.translateDate=function(e,n,o){return t.formatDate(e,n,o||this.lang)},t.getDefaultLang=function(){var t,e,n,o,i,r="en";return(null===navigator||void 0===navigator?void 0:navigator.languages)&&(null===(n=null===(e=null===(t=navigator.languages[0])||void 0===t?void 0:t.split("-")[0])||void 0===e?void 0:e.toLowerCase())||void 0===n?void 0:n.length)&&(r=null===(i=null===(o=navigator.languages[0])||void 0===o?void 0:o.split("-")[0])||void 0===i?void 0:i.toLowerCase()),r},t.getDictionaryWord=function(e,n,o){var i;if(!e)throw new Error("no wordKey provided");if(!n)throw new Error("no dictionary provided");if(o&&(null===(i=n[o])||void 0===i?void 0:i[e]))return n[o][e];var r="",s=t.getDefaultLang();if(!o||s!==o){var a=null==n?void 0:n[s];(null==a?void 0:a[e])&&(r=a[e])}return r},t.formatDate=function(e,n,o){if(!e)throw new Error("no date provided");if("function"!=typeof e.getMonth)throw new Error("wrong date format");return new Intl.DateTimeFormat(o||t.getDefaultLang(),n).format(e)},t}();e.LanguageTranslator=n}(ot={exports:{}},ot.exports),ot.exports),rt={vars:[],parts:[{name:"container",description:""},{name:"replacewithtext",description:""},{name:"video",description:""}]},st={vars:[{name:"--hb-pad-joystick-size",description:"pad/joystick size",defaultValue:"200px",valueType:"htmlsize"}],parts:[]},at={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"}],parts:[]},lt={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"}],parts:[{name:"modal-dialog",description:"The modal dialog"}]};function dt(t){let e,n,o,i,r;return{c(){e=d("hb-table"),f(e,"style",t[12]),f(e,"rows",n=JSON.stringify(t[8])),f(e,"headers",JSON.stringify(t[30])),f(e,"actions",JSON.stringify(t[31])),f(e,"size","12"),f(e,"disablepagination",o=t[8].length<12?"yes":"no")},m(n,o){a(n,e,o),i||(r=u(e,"tableaction",t[51]),i=!0)},p(t,i){4096&i[0]&&f(e,"style",t[12]),256&i[0]&&n!==(n=JSON.stringify(t[8]))&&f(e,"rows",n),256&i[0]&&o!==(o=t[8].length<12?"yes":"no")&&f(e,"disablepagination",o)},d(t){t&&l(e),i=!1,r()}}}function ct(t){let e,n,o,i,r,c,f=t[7]&&pt(t);return{c(){f&&f.c(),e=p(),n=d("div"),o=d("i"),b(o,"class",i="bi-"+(t[7]?"caret-left-fill":"caret-right-fill")),b(n,"id","opener"),v(n,"left",(t[7]?"500":"0")+"px")},m(i,l){f&&f.m(i,l),a(i,e,l),a(i,n,l),s(n,o),r||(c=u(n,"click",t[84]),r=!0)},p(t,r){t[7]?f?f.p(t,r):(f=pt(t),f.c(),f.m(e.parentNode,e)):f&&(f.d(1),f=null),128&r[0]&&i!==(i="bi-"+(t[7]?"caret-left-fill":"caret-right-fill"))&&b(o,"class",i),128&r[0]&&v(n,"left",(t[7]?"500":"0")+"px")},d(t){f&&f.d(t),t&&l(e),t&&l(n),r=!1,c()}}}function pt(t){let e,n,i,r,f,m,y,w,k,x,_,$,C,T,z,j,P,E,S,D,N,O,V,A,L,M,I,B,H,Y,G,J,R,W,F,q,X,U,Z,K,Q,tt,et,nt,ot,it,rt,st,at,lt,dt,ct,pt,ft,mt,ht,gt,vt,yt,wt,kt,xt,_t,$t,Ct,Tt,zt,jt,Pt,Et,St,Dt,Nt,Ot,Vt,At,Lt,Mt,It,Bt,Ht=(t[4]&&t[2].find(t[78])?t[2].find(t[79])?.name:"")+"";function Yt(t,e){return"dpad"===t[25]?bt:ut}let Gt=Yt(t),Jt=Gt(t);return{c(){e=d("div"),n=d("div"),i=d("div"),Jt.c(),r=p(),f=d("div"),m=d("div"),y=d("button"),w=d("i"),x=p(),_=d("button"),$=d("i"),T=p(),z=d("button"),j=d("i"),S=p(),D=d("button"),N=d("i"),A=p(),L=d("div"),M=d("span"),M.textContent="speed:",I=p(),B=d("input"),H=p(),Y=d("div"),G=d("span"),G.textContent="precision:",J=p(),R=d("input"),W=p(),F=d("div"),q=d("button"),X=d("i"),Z=p(),K=d("button"),Q=d("i"),nt=p(),ot=d("button"),ot.innerHTML='<i class="bi bi-arrows-fullscreen"></i>',it=p(),rt=d("div"),st=d("button"),at=d("i"),dt=p(),ct=d("button"),pt=c(Ht),ft=p(),mt=d("i"),vt=p(),yt=d("div"),wt=d("button"),kt=d("i"),Ct=p(),Tt=d("button"),zt=d("i"),St=p(),Dt=d("button"),Nt=d("i"),Ot=p(),Vt=d("span"),At=d("span"),Lt=c(t[15]),b(i,"id","joystick"),b(i,"class","area"),b(w,"class","bi bi-zoom-in"),y.disabled=k=!t[3]?.zoom?.in,b(y,"class","btn btn-sm btn-light"),b($,"class","bi bi-zoom-out"),_.disabled=C=!t[3]?.zoom?.out,b(_,"class","btn btn-sm btn-light"),b(m,"class","btn-group"),v(m,"margin-right","10px"),b(j,"class","bi bi-house-door-fill"),z.disabled=P=!t[3]?.home,b(z,"class",E="btn btn-sm btn-"+(t[5]?"primary":"light")),b(N,"class","bi bi-square"),D.disabled=O=!t[3]?.clickToCenter,b(D,"class",V="btn btn-sm btn-"+(t[26]?"primary":"light")),b(f,"id","buttons"),b(f,"class","area"),b(M,"class","slider_label"),b(B,"class","range"),b(B,"type","range"),b(L,"id","speed"),b(L,"class","area"),b(G,"class","slider_label"),b(R,"class","range"),b(R,"type","range"),b(Y,"id","precision"),b(Y,"class","area"),b(X,"class","bi bi-grid-3x3"),b(q,"class",U="btn btn-sm btn-"+(t[24]?"primary":"light")),b(Q,"class","bi bi-joystick"),K.disabled=tt=!t[3]?.joystick,b(K,"class",et="btn btn-sm btn-"+(t[25]&&"dpad"===t[25]?"light":"primary")),v(ot,"float","right"),v(ot,"margin-right","5px"),b(ot,"class","btn btn-sm btn-light"),b(F,"id","presets_view"),b(F,"class","area"),b(at,"class","bi bi-plus-circle-fill"),st.disabled=lt=!t[3]?.addPreset,b(st,"class","btn btn-sm btn-light"),v(mt,"float","right"),b(mt,"class","bi bi-arrow-down-up"),ct.disabled=ht=!t[3]?.presets,v(ct,"width","130px",1),v(ct,"display","inline-block",1),b(ct,"class",gt="btn btn-sm btn-"+(t[4]?"primary":"light")),b(rt,"id","presets_select"),b(rt,"class","area"),b(kt,"class",xt="bi bi-"+(t[9]?.muted||!t[9]?"volume-mute-fill":"volume-up-fill")),wt.disabled=_t=!t[18],b(wt,"class",$t="btn btn-sm btn-"+(t[18]?t[9]?.muted?"warning":"primary":"light")),b(zt,"class",jt="bi bi-"+(t[16]||!t[9]?"pause-fill":"play")),Tt.disabled=Pt=!t[18],b(Tt,"class",Et="btn btn-sm btn-"+(t[18]?t[17]?"primary":"warning":"light")),b(Nt,"class","bi bi-sliders"),b(Vt,"class","timecell"),Dt.disabled=Mt=!t[3]?.settings,b(Dt,"class","btn btn-sm btn-light"),b(yt,"id","presets_buttons"),b(yt,"class","area"),b(n,"id","panel"),b(e,"id","controller")},m(o,l){a(o,e,l),s(e,n),s(n,i),Jt.m(i,null),s(n,r),s(n,f),s(f,m),s(m,y),s(y,w),s(m,x),s(m,_),s(_,$),s(f,T),s(f,z),s(z,j),s(f,S),s(f,D),s(D,N),s(n,A),s(n,L),s(L,M),s(L,I),s(L,B),g(B,t[14].speed),s(n,H),s(n,Y),s(Y,G),s(Y,J),s(Y,R),g(R,t[14].precision),s(n,W),s(n,F),s(F,q),s(q,X),s(F,Z),s(F,K),s(K,Q),s(F,nt),s(F,ot),s(n,it),s(n,rt),s(rt,st),s(st,at),s(rt,dt),s(rt,ct),s(ct,pt),s(ct,ft),s(ct,mt),s(n,vt),s(n,yt),s(yt,wt),s(wt,kt),s(yt,Ct),s(yt,Tt),s(Tt,zt),s(yt,St),s(yt,Dt),s(Dt,Nt),s(Dt,Ot),s(Dt,Vt),s(Vt,At),s(At,Lt),It||(Bt=[u(y,"click",t[68]),u(_,"click",t[69]),u(z,"click",t[70]),u(D,"click",t[71]),u(B,"change",t[72]),u(B,"input",t[72]),u(R,"change",t[73]),u(R,"input",t[73]),u(q,"click",t[74]),u(K,"click",t[75]),u(ot,"click",t[76]),u(st,"click",t[77]),u(ct,"click",t[80]),u(wt,"click",t[81]),u(Tt,"click",t[82]),u(Dt,"click",t[83])],It=!0)},p(t,e){Gt===(Gt=Yt(t))&&Jt?Jt.p(t,e):(Jt.d(1),Jt=Gt(t),Jt&&(Jt.c(),Jt.m(i,null))),8&e[0]&&k!==(k=!t[3]?.zoom?.in)&&(y.disabled=k),8&e[0]&&C!==(C=!t[3]?.zoom?.out)&&(_.disabled=C),8&e[0]&&P!==(P=!t[3]?.home)&&(z.disabled=P),32&e[0]&&E!==(E="btn btn-sm btn-"+(t[5]?"primary":"light"))&&b(z,"class",E),8&e[0]&&O!==(O=!t[3]?.clickToCenter)&&(D.disabled=O),67108864&e[0]&&V!==(V="btn btn-sm btn-"+(t[26]?"primary":"light"))&&b(D,"class",V),16384&e[0]&&g(B,t[14].speed),16384&e[0]&&g(R,t[14].precision),16777216&e[0]&&U!==(U="btn btn-sm btn-"+(t[24]?"primary":"light"))&&b(q,"class",U),8&e[0]&&tt!==(tt=!t[3]?.joystick)&&(K.disabled=tt),33554432&e[0]&&et!==(et="btn btn-sm btn-"+(t[25]&&"dpad"===t[25]?"light":"primary"))&&b(K,"class",et),8&e[0]&<!==(lt=!t[3]?.addPreset)&&(st.disabled=lt),20&e[0]&&Ht!==(Ht=(t[4]&&t[2].find(t[78])?t[2].find(t[79])?.name:"")+"")&&h(pt,Ht),8&e[0]&&ht!==(ht=!t[3]?.presets)&&(ct.disabled=ht),16&e[0]&>!==(gt="btn btn-sm btn-"+(t[4]?"primary":"light"))&&b(ct,"class",gt),512&e[0]&&xt!==(xt="bi bi-"+(t[9]?.muted||!t[9]?"volume-mute-fill":"volume-up-fill"))&&b(kt,"class",xt),262144&e[0]&&_t!==(_t=!t[18])&&(wt.disabled=_t),262656&e[0]&&$t!==($t="btn btn-sm btn-"+(t[18]?t[9]?.muted?"warning":"primary":"light"))&&b(wt,"class",$t),66048&e[0]&&jt!==(jt="bi bi-"+(t[16]||!t[9]?"pause-fill":"play"))&&b(zt,"class",jt),262144&e[0]&&Pt!==(Pt=!t[18])&&(Tt.disabled=Pt),393216&e[0]&&Et!==(Et="btn btn-sm btn-"+(t[18]?t[17]?"primary":"warning":"light"))&&b(Tt,"class",Et),32768&e[0]&&h(Lt,t[15]),8&e[0]&&Mt!==(Mt=!t[3]?.settings)&&(Dt.disabled=Mt)},d(t){t&&l(e),Jt.d(),It=!1,o(Bt)}}}function ut(t){let e,n,o,i;return{c(){e=d("hb-pad-joystick"),f(e,"id",n="pad_"+t[25]),f(e,"pad_or_joystick","joystick"),f(e,"size","60px"),f(e,"style",t[11])},m(n,r){a(n,e,r),o||(i=u(e,"sendJoystickPosition",t[67]),o=!0)},p(t,o){33554432&o[0]&&n!==(n="pad_"+t[25])&&f(e,"id",n),2048&o[0]&&f(e,"style",t[11])},d(t){t&&l(e),o=!1,i()}}}function bt(t){let e,n,o,i;return{c(){e=d("hb-pad-joystick"),f(e,"id",n="pad_"+t[25]),f(e,"pad_or_joystick","dpad"),f(e,"size","60px"),f(e,"style",t[11])},m(n,r){a(n,e,r),o||(i=u(e,"sendDirection",t[66]),o=!0)},p(t,o){33554432&o[0]&&n!==(n="pad_"+t[25])&&f(e,"id",n),2048&o[0]&&f(e,"style",t[11])},d(t){t&&l(e),o=!1,i()}}}function ft(e){let n,i,r,m,g,y,w,k,x,_,$,C,T,z,j,P,E,S,D,N,O,V,A,L,M,I,B,H,Y,G,J,R,W,F,q,X,U,Z,K,Q,tt,et,nt=(e[13]?e[2].find(e[57])?.token:"")+"",ot=(e[13]?e[2].find(e[61])?.token:"")+"",it=e[8]?.length&&dt(e),rt=e[6]&&ct(e);return{c(){n=d("link"),i=p(),r=d("hb-dialog"),m=d("div"),it&&it.c(),y=p(),w=d("hb-dialog"),k=d("div"),k.textContent="Are You sure to add this scene to the preset?",_=p(),$=d("hb-dialog"),C=d("div"),C.textContent="Are You sure to go To Home?",z=p(),j=d("hb-dialog"),P=d("div"),E=c("Are You sure to DELETE preset "),S=c(nt),D=c("?"),A=p(),L=d("hb-dialog"),M=d("div"),I=c('Are You sure to GO to preset "'),B=c(ot),H=c('"?'),R=p(),W=d("div"),F=d("hb-player-live"),q=p(),X=d("div"),U=p(),Z=d("div"),K=d("table"),K.innerHTML="<tr><td></td> \n\t\t\t\t<td></td> \n\t\t\t\t<td></td> \n\t\t\t\t<td></td></tr> \n\t\t\t<tr><td></td> \n\t\t\t\t<td></td> \n\t\t\t\t<td></td> \n\t\t\t\t<td></td></tr> \n\t\t\t<tr><td></td> \n\t\t\t\t<td></td> \n\t\t\t\t<td></td> \n\t\t\t\t<td></td></tr> \n\t\t\t<tr><td></td> \n\t\t\t\t<td></td> \n\t\t\t\t<td></td> \n\t\t\t\t<td></td></tr>",Q=p(),rt&&rt.c(),this.c=t,b(n,"rel","stylesheet"),b(n,"href","https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css"),b(m,"slot","body-content"),f(r,"title","Presets"),f(r,"show",g=e[19]?"yes":"no"),f(r,"hide_confirm","yes"),b(k,"slot","body-content"),f(w,"title","Add Scene to Preset"),f(w,"show",x=e[20]?"yes":"no"),b(C,"slot","body-content"),f($,"title","Go to Home"),f($,"show",T=e[23]?"yes":"no"),f($,"confirmlabel","GO"),b(P,"slot","body-content"),f(j,"id",N="del_"+e[13]),f(j,"title",O="Go to Preset "+(e[13]?e[2].find(e[58])?.token:"")),f(j,"show",V=e[21]?"yes":"no"),f(j,"confirmlabel","delete"),f(j,"confirm_btn_class","danger"),b(M,"slot","body-content"),f(L,"id",Y="goto_"+e[13]),f(L,"title",G="Go to Preset "+(e[13]?e[2].find(e[62])?.token:"")),f(L,"show",J=e[22]?"yes":"no"),f(L,"confirmlabel","go"),f(L,"confirm_btn_class","light"),f(F,"no_controls","yes"),f(F,"id","player"),f(F,"mediauri",e[1]),f(F,"style",e[10]),b(X,"id","area_selector"),v(X,"display",e[26]?"inherit":"none"),v(X,"width",e[27].width+"px"),v(X,"height",e[27].height+"px"),v(X,"top",e[27].top+"px"),v(X,"left",e[27].left+"px"),b(K,"id","grid_table"),b(Z,"id","grid"),v(Z,"display",e[24]?"inherit":"none"),b(W,"id","container"),v(W,"cursor",e[26]?"crosshair":"")},m(t,o){s(document.head,n),a(t,i,o),a(t,r,o),s(r,m),it&&it.m(m,null),a(t,y,o),a(t,w,o),s(w,k),a(t,_,o),a(t,$,o),s($,C),a(t,z,o),a(t,j,o),s(j,P),s(P,E),s(P,S),s(P,D),a(t,A,o),a(t,L,o),s(L,M),s(M,I),s(M,B),s(M,H),a(t,R,o),a(t,W,o),s(W,F),s(W,q),s(W,X),s(W,U),s(W,Z),s(Z,K),s(W,Q),rt&&rt.m(W,null),tt||(et=[u(r,"modalShow",e[52]),u(w,"modalShow",e[53]),u(w,"modalConfirm",e[54]),u($,"modalShow",e[55]),u($,"modalConfirm",e[56]),u(j,"modalShow",e[59]),u(j,"modalConfirm",e[60]),u(L,"modalShow",e[63]),u(L,"modalConfirm",e[64]),u(F,"htmlVideoInit",e[65]),u(W,"mousemove",e[85])],tt=!0)},p(t,e){t[8]?.length?it?it.p(t,e):(it=dt(t),it.c(),it.m(m,null)):it&&(it.d(1),it=null),524288&e[0]&&g!==(g=t[19]?"yes":"no")&&f(r,"show",g),1048576&e[0]&&x!==(x=t[20]?"yes":"no")&&f(w,"show",x),8388608&e[0]&&T!==(T=t[23]?"yes":"no")&&f($,"show",T),8196&e[0]&&nt!==(nt=(t[13]?t[2].find(t[57])?.token:"")+"")&&h(S,nt),8192&e[0]&&N!==(N="del_"+t[13])&&f(j,"id",N),8196&e[0]&&O!==(O="Go to Preset "+(t[13]?t[2].find(t[58])?.token:""))&&f(j,"title",O),2097152&e[0]&&V!==(V=t[21]?"yes":"no")&&f(j,"show",V),8196&e[0]&&ot!==(ot=(t[13]?t[2].find(t[61])?.token:"")+"")&&h(B,ot),8192&e[0]&&Y!==(Y="goto_"+t[13])&&f(L,"id",Y),8196&e[0]&&G!==(G="Go to Preset "+(t[13]?t[2].find(t[62])?.token:""))&&f(L,"title",G),4194304&e[0]&&J!==(J=t[22]?"yes":"no")&&f(L,"show",J),2&e[0]&&f(F,"mediauri",t[1]),1024&e[0]&&f(F,"style",t[10]),67108864&e[0]&&v(X,"display",t[26]?"inherit":"none"),134217728&e[0]&&v(X,"width",t[27].width+"px"),134217728&e[0]&&v(X,"height",t[27].height+"px"),134217728&e[0]&&v(X,"top",t[27].top+"px"),134217728&e[0]&&v(X,"left",t[27].left+"px"),16777216&e[0]&&v(Z,"display",t[24]?"inherit":"none"),t[6]?rt?rt.p(t,e):(rt=ct(t),rt.c(),rt.m(W,null)):rt&&(rt.d(1),rt=null),67108864&e[0]&&v(W,"cursor",t[26]?"crosshair":"")},i:t,o:t,d(t){l(n),t&&l(i),t&&l(r),it&&it.d(),t&&l(y),t&&l(w),t&&l(_),t&&l($),t&&l(z),t&&l(j),t&&l(A),t&&l(L),t&&l(R),t&&l(W),rt&&rt.d(),tt=!1,o(et)}}}function mt(t,e,n){const o=x(),i=_();function r(t,e){i(t,e),o.dispatchEvent&&o.dispatchEvent(new CustomEvent(t,{detail:e}))}let s,a,{id:l}=e,{style:d}=e,{live_uri:c}=e,{presets:p}=e,{position:u}=e,{configuration:b}=e,{current_preset:f}=e,{is_home:h}=e,{is_ptz_connected:g}=e,{is_ptz_panel_opened:v}=e,y="",w="",k="",$="";const C={precision:50,speed:50},T={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 z,j=(new Date).toLocaleTimeString();let P,E,S=!1,D=!1,N=!1,O=!1,V=!1,A=!1,L=!1,M="dpad",B=!1,H={top:0,left:0,width:0,height:0},Y={};function G(t){if(!b.zoom)return console.error("Zoom is not enabled in the configuration");if(!b.zoom[t])return console.error(`Zoom ${t} is not enabled in the configuration`);r("zoomAction",{time:new Date,id:l,movementSettings:C,direction:t})}function J(){if(!b.home)return console.error("Go to home is not enabled in the configuration");r("goToHome",{id:l,movementSettings:C})}function R(){if(!b.addPreset)return console.error("Add scene to preset is not enabled in the configuration");r("setPreset",{time:new Date,id:l})}function W(){if(!b.presets)return console.error("Presets is not enabled in the configuration");n(19,D=!D)}function F(){if(!b.addPreset)return console.error("Add scene to preset is not enabled in the configuration");n(20,N=!N)}function q(){if(!b.home)return console.error("Go to home is not enabled in the configuration");n(23,A=!A)}function X(t){if(!b.switchPreset)return console.error("Switch preset is not enabled in the configuration");const e=p.find((e=>e.token===t));if(e){r("goToPreset",Object.assign({time:new Date,playerId:l,movementSettings:C},e))}else console.error("Preset not found")}function U(){r("initVideo",{time:new Date,id:l,htmlVideoElement:s}),n(9,s.onloadedmetadata=()=>{n(18,S=!0)},s),n(9,s.onpause=()=>{n(16,P=!0),n(17,E=!1)},s),n(9,s.onplay=()=>{n(16,P=!1),n(17,E=!0)},s),n(9,s.onclick=t=>{if(B){const e=s.getBoundingClientRect(),o={x:t.clientX-e.left,y:t.clientY-e.top,width:0,height:0};Y.start?(n(28,Y={start:Y.start,end:o}),function(){if(!(null==b?void 0:b.clickToCenter))return console.error("Click to center is not enabled in the configuration");const t=s.getBoundingClientRect();r("goToSelectedArea",Object.assign({time:new Date,id:l,movementSettings:C,htmlVideoElementWidth:t.width,htmlVideoElementHeight:t.height},H)),n(26,B=!1),n(27,H={top:0,left:0,width:0,height:0}),n(28,Y={})}()):n(28,Y={start:o})}},s),n(9,s.onmousemove=t=>{var e,o,i,r;if(B){const s={x:t.clientX,y:t.clientY};Y.start&&(n(28,Y={start:Y.start,end:s}),n(27,H={top:Y.start.y>Y.end.y?Y.end.y:Y.start.y,left:Y.start.x>Y.end.x?Y.end.x:Y.start.x,width:Math.abs(((null===(e=null==Y?void 0:Y.start)||void 0===e?void 0:e.x)||0)-((null===(o=null==Y?void 0:Y.end)||void 0===o?void 0:o.x)||0)),height:Math.abs(((null===(i=null==Y?void 0:Y.start)||void 0===i?void 0:i.y)||0)-((null===(r=null==Y?void 0:Y.end)||void 0===r?void 0:r.y)||0))}))}},s)}function Z(t){if(!b.deletePreset)return console.error("Delete preset is not enabled in the configuration");const e=p.find((e=>e.token===t));if(e){r("deletePreset",Object.assign({time:new Date,playerId:l},e))}else console.error("Preset not found")}function K(t){if(!(null==b?void 0:b.joystick)||(null==b?void 0:b.pan)||(null==b?void 0:b.tilt))return console.error("Pan and Tilt on joystick are not enabled in the configuration");r("sendJoystickPosition",{id:l,x:t.x,y:t.y,cardinalDirection:t.cardinalDirection,joyId:t.id,movementSettings:C})}function Q(t){b.pan&&b.tilt?r("sendDirection",{id:l,movementSettings:C,direction:t.direction,joyId:t.id}):console.error("Pan and Tilt are not enabled in the configuration")}function tt(){n(24,L=!L)}function et(){if(!(null==b?void 0:b.clickToCenter))return console.error("Click to center is not enabled in the configuration");n(26,B=!B)}function ot(){if("dpad"===M){if(!(null==b?void 0:b.joystick))return console.error("Joystick is not enabled in the configuration");n(25,M="joystick")}else n(25,M="dpad")}function dt(t){var e;console.log(t,"presetclick"),n(19,D=!1);const o=null===(e=p.find((e=>t.itemId.includes(e.token+"_"))))||void 0===e?void 0:e.token;switch(n(13,$=o),t.action){case"goto":n(22,V=!0);break;case"delete":n(21,O=!0);break;default:return console.error("Action not found")}}function ct(){if(!s)return console.error("Video element not found");s.paused?s.play():s.pause()}setInterval((()=>{n(15,j=(new Date).toLocaleTimeString())}),1e3),it.addComponent({repoName:"@htmlbricks/hb-player-live",version:I.version}),it.addComponent({repoName:"@htmlbricks/hb-pad-joystick",version:I.version}),it.addComponent({repoName:"@htmlbricks/hb-table",version:I.version}),it.addComponent({repoName:"@htmlbricks/hb-dialog",version:I.version});return t.$$set=t=>{"id"in t&&n(0,l=t.id),"style"in t&&n(49,d=t.style),"live_uri"in t&&n(1,c=t.live_uri),"presets"in t&&n(2,p=t.presets),"position"in t&&n(48,u=t.position),"configuration"in t&&n(3,b=t.configuration),"current_preset"in t&&n(4,f=t.current_preset),"is_home"in t&&n(5,h=t.is_home),"is_ptz_connected"in t&&n(6,g=t.is_ptz_connected),"is_ptz_panel_opened"in t&&n(7,v=t.is_ptz_panel_opened)},t.$$.update=()=>{511&t.$$.dirty[0]|917504&t.$$.dirty[1]&&(c||n(1,c=""),l||n(0,l=""),d&&(n(50,a=nt(d)),n(10,y=it.getChildStyleToPass(a,null==rt?void 0:rt.vars)),n(11,w=it.getChildStyleToPass(a,null==st?void 0:st.vars)),n(12,k=it.getChildStyleToPass(a,null==at?void 0:at.vars)),it.getChildStyleToPass(a,null==lt?void 0:lt.vars)),""===g&&n(6,g=!0),g||n(6,g=!1),"string"==typeof g&&n(6,g="true"===g||"yes"===g),""===v&&n(7,v=!0),v||n(7,v=!1),"string"==typeof v&&n(7,v="true"===v||"yes"===v),""===h&&n(5,h=!0),h||n(5,h=!1),"string"==typeof h&&n(5,h="true"===h||"yes"===h),b?"string"==typeof b&&n(3,b=JSON.parse(b)):n(3,b=T),f||n(4,f=""),p?"string"==typeof p&&n(2,p=JSON.parse(p)):n(2,p=[]),!(null==z?void 0:z.length)&&p.length&&n(8,z=p.map((t=>({_id:t.token+"_"+t.name,name:t.name,token:t.token})))),u||n(48,u="right-bottom"))},[l,c,p,b,f,h,g,v,z,s,y,w,k,$,C,j,P,E,S,D,N,O,V,A,L,M,B,H,Y,r,[{label:"Name",key:"name",copyTxt:!0},{label:"Token",key:"token",copyTxt:!0}],[{name:"goto",type:"icon",iconOrText:"arrow-right-circle"},{name:"delete",type:"icon",iconOrText:"x-circle-fill",btnClass:"danger"}],G,J,R,W,F,q,X,U,Z,K,Q,tt,et,ot,dt,ct,u,d,a,t=>{dt(t.detail)},t=>{n(19,D=t.detail.show)},t=>{n(20,N=t.detail.show)},t=>{t?.detail?.confirm&&R()},t=>{n(23,A=t.detail.show)},t=>{t?.detail?.confirm&&J()},t=>t.token===$,t=>t.token===$,t=>{n(21,O=t.detail.show)},t=>{console.log(t.detail,"detail"),t?.detail?.confirm&&Z(t.detail.id.split("del_")[1])},t=>t.token===$,t=>t.token===$,t=>{n(22,V=t.detail.show)},t=>{console.log(t.detail.id.split("goto")[1],"detail"),t?.detail?.confirm&&X(t.detail.id.split("goto_")[1])},t=>{console.log(t.detail,"detailvid"),n(9,s=t.detail.htmlVideoElement),U()},t=>{Q(t.detail)},t=>{K(t.detail)},()=>G("in"),()=>G("out"),()=>q(),()=>et(),function(){C.speed=m(this.value),n(14,C)},function(){C.precision=m(this.value),n(14,C)},()=>tt(),()=>ot(),()=>s.requestFullscreen(),()=>F(),t=>t.token===f,t=>t.token===f,()=>{W()},()=>n(9,s.muted=!s.muted,s),()=>ct(),()=>{},()=>{n(7,v=!v),r("panelMove",{id:l,opened:v})},t=>{if(B){const e=s.getBoundingClientRect(),o={x:t.clientX-e.left,y:t.clientY-e.top};Y.start&&(n(28,Y={start:Y.start,end:o}),n(27,H={top:Y.start.y>Y.end.y?Y.end.y:Y.start.y,left:Y.start.x>Y.end.x?Y.end.x:Y.start.x,width:Math.abs((Y?.start?.x||0)-(Y?.end?.x||0)),height:Math.abs((Y?.start?.y||0)-(Y?.end?.y||0))}))}}]}class ht extends M{constructor(t){super(),this.shadowRoot.innerHTML='<style>@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");@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css");:host{font-family:"Roboto", sans-serif}#grid_table{width:100%;height:100%}#area_selector{position:absolute;z-index:2;border:solid 2px red}#grid{position:absolute;top:0px;z-index:2;width:100%;height:100%}#grid td{border:2px solid black}.area{padding:5px}#container{position:relative;width:100%;height:100%;display:block;min-height:160px}hb-pad-joystick{--hb-pad-joystick-size:100px}#joystick{grid-area:pad;margin-top:7px;display:block;width:100%;text-align:center}#buttons{grid-area:buttons}#presets_buttons{grid-area:presets_buttons}#speed{grid-area:speed;text-align:center;vertical-align:middle;line-height:28px}#precision{grid-area:precision;text-align:center;vertical-align:middle;line-height:28px}#presets_select{grid-area:presets_select}#presets_view{grid-area:presets_view}#controller{position:absolute;top:calc(100% - 160px);width:100%;z-index:3}#opener{background-color:silver;line-height:126px;vertical-align:middle;position:absolute;position:absolute;top:calc(100% - 160px);z-index:4;cursor:pointer}#panel{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{font-size:0.6em;width:50px;display:inline-block;font-weight:bold}#player{z-index:1}.timecell{font-size:0.8em;line-height:20px;width:56px;display:inline-block;vertical-align:middle}.range{vertical-align:middle;line-height:28px}*,*::before,*::after{box-sizing:border-box}@media(prefers-reduced-motion: no-preference){:host{scroll-behavior:smooth}}@media(min-width: 1200px){}@media(min-width: 1200px){}@media(min-width: 1200px){}@media(min-width: 1200px){}table{caption-side:bottom;border-collapse:collapse}tr,td{border-color:inherit;border-style:solid;border-width:0}button{border-radius:0}button:focus:not(:focus-visible){outline:0}input,button{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button{text-transform:none}button{-webkit-appearance:button}button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}@media(min-width: 1200px){}::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-text,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}.btn{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}@media(prefers-reduced-motion: reduce){.btn{transition:none}}.btn:hover{color:#212529}.btn:focus{outline:0;box-shadow:0 0 0 0.25rem rgba(13, 110, 253, 0.25)}.btn:disabled{pointer-events:none;opacity:0.65}.btn-primary{color:#fff;background-color:var(--bs-primary,#07689f);border-color:var(--bs-primary,#07689f)}.btn-primary:hover{color:#fff;background-color:#0b5ed7;border-color:#0a58ca}.btn-primary:focus{color:#fff;background-color:#0b5ed7;border-color:#0a58ca;box-shadow:0 0 0 0.25rem rgba(49, 132, 253, 0.5)}.btn-primary:active{color:#fff;background-color:#0a58ca;border-color:#0a53be}.btn-primary:active:focus{box-shadow:0 0 0 0.25rem rgba(49, 132, 253, 0.5)}.btn-primary:disabled{color:#fff;background-color:var(--bs-primary,#07689f);border-color:var(--bs-primary,#07689f)}.btn-warning{color:#000;background-color:#ffc107;border-color:#ffc107}.btn-warning:hover{color:#000;background-color:#ffca2c;border-color:#ffc720}.btn-warning:focus{color:#000;background-color:#ffca2c;border-color:#ffc720;box-shadow:0 0 0 0.25rem rgba(217, 164, 6, 0.5)}.btn-warning:active{color:#000;background-color:#ffcd39;border-color:#ffc720}.btn-warning:active:focus{box-shadow:0 0 0 0.25rem rgba(217, 164, 6, 0.5)}.btn-warning:disabled{color:#000;background-color:#ffc107;border-color:#ffc107}.btn-light{color:#000;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:hover{color:#000;background-color:#f9fafb;border-color:#f9fafb}.btn-light:focus{color:#000;background-color:#f9fafb;border-color:#f9fafb;box-shadow:0 0 0 0.25rem rgba(211, 212, 213, 0.5)}.btn-light:active{color:#000;background-color:#f9fafb;border-color:#f9fafb}.btn-light:active:focus{box-shadow:0 0 0 0.25rem rgba(211, 212, 213, 0.5)}.btn-light:disabled{color:#000;background-color:#f8f9fa;border-color:#f8f9fa}.btn-sm{padding:0.25rem 0.5rem;font-size:0.875rem;border-radius:0.2rem}.btn-group{position:relative;display:inline-flex;vertical-align:middle}.btn-group>.btn{position:relative;flex:1 1 auto}.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active{z-index:1}.btn-group>.btn:not(:first-child){margin-left:-1px}.btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:nth-child(n+3),.btn-group>:not(.btn-check)+.btn{border-top-left-radius:0;border-bottom-left-radius:0}@media(min-width: 576px){}@media(min-width: 768px){}@media(min-width: 992px){}@media(min-width: 1200px){}@media(min-width: 1400px){}@media(min-width: 576px){}@media(min-width: 768px){}@media(min-width: 992px){}@media(min-width: 1200px){}@media(min-width: 1400px){}@media(min-width: 1200px){}@media print{}</style>',L(this,{target:this.shadowRoot,props:y(this.attributes),customElement:!0},mt,ft,r,{id:0,style:49,live_uri:1,presets:2,position:48,configuration:3,current_preset:4,is_home:5,is_ptz_connected:6,is_ptz_panel_opened:7},null,[-1,-1,-1]),t&&(t.target&&a(t.target,this,t.anchor),t.props&&(this.$set(t.props),N()))}static get observedAttributes(){return["id","style","live_uri","presets","position","configuration","current_preset","is_home","is_ptz_connected","is_ptz_panel_opened"]}get id(){return this.$$.ctx[0]}set id(t){this.$$set({id:t}),N()}get style(){return this.$$.ctx[49]}set style(t){this.$$set({style:t}),N()}get live_uri(){return this.$$.ctx[1]}set live_uri(t){this.$$set({live_uri:t}),N()}get presets(){return this.$$.ctx[2]}set presets(t){this.$$set({presets:t}),N()}get position(){return this.$$.ctx[48]}set position(t){this.$$set({position:t}),N()}get configuration(){return this.$$.ctx[3]}set configuration(t){this.$$set({configuration:t}),N()}get current_preset(){return this.$$.ctx[4]}set current_preset(t){this.$$set({current_preset:t}),N()}get is_home(){return this.$$.ctx[5]}set is_home(t){this.$$set({is_home:t}),N()}get is_ptz_connected(){return this.$$.ctx[6]}set is_ptz_connected(t){this.$$set({is_ptz_connected:t}),N()}get is_ptz_panel_opened(){return this.$$.ctx[7]}set is_ptz_panel_opened(t){this.$$set({is_ptz_panel_opened:t}),N()}}return customElements.define("hb-player-live-camera-ptz",ht),ht}();
|
|
2
2
|
//# sourceMappingURL=release.js.map
|