@camstack/addon-admin-ui 0.1.31 → 0.1.33

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.
Files changed (34) hide show
  1. package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-BMrP2H8p.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-DJQnlBBe.js} +1 -1
  2. package/dist/assets/devices-BnLu5dxg.js +1 -0
  3. package/dist/assets/{hostInit-DIOhqSQ8.js → hostInit-DQ5UjxJa.js} +1 -1
  4. package/dist/assets/{index-B7F0mwMZ.js → index-BmzE49kT.js} +1 -1
  5. package/dist/assets/index-CMxz0koW.js +1 -0
  6. package/dist/assets/index-DFRMwfPq.js +1 -0
  7. package/dist/assets/{index-B4mdRb1N.js → index-DIIqKU3D.js} +1 -1
  8. package/dist/assets/index-DRW7rVhn.js +1133 -0
  9. package/dist/assets/index-DYSrVZ4G.js +1 -0
  10. package/dist/assets/index-DeVjiPqm.js +1 -0
  11. package/dist/assets/index-DuHBxCOe.js +1 -0
  12. package/dist/assets/{index-DUfO0e8s.js → index-Dv0-1gwL.js} +25 -25
  13. package/dist/assets/{index-B3ayOsQz.js → index-NNW--T4H.js} +26 -26
  14. package/dist/assets/index-dePEzy7t.js +1 -0
  15. package/dist/assets/{index-CMnchRgf.css → index-n9RexO7D.css} +1 -1
  16. package/dist/assets/method-access-map-OoQznstl.js +1 -0
  17. package/dist/assets/{remoteEntry-6Pin_7dI.js → remoteEntry-D28y34bi.js} +1 -1
  18. package/dist/assets/{schemas-XgIEoUz3.js → schemas-DZqswtjx.js} +4 -4
  19. package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-8g-kqXK4.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-BXwMMqlX.js} +2 -2
  20. package/dist/index.html +7 -7
  21. package/dist/mf-entry-bootstrap-0.js +2 -2
  22. package/dist/server/addon.js +13480 -3
  23. package/dist/server/addon.js.map +1 -1
  24. package/dist/sw.js +1 -1
  25. package/package.json +1 -1
  26. package/dist/assets/devices-CZsVkxKZ.js +0 -1
  27. package/dist/assets/index-4wFotr3p.js +0 -1
  28. package/dist/assets/index-DJIpFuqj.js +0 -1
  29. package/dist/assets/index-DSFtUS7Z.js +0 -1
  30. package/dist/assets/index-Dc2Moq2w.js +0 -1
  31. package/dist/assets/index-FDG6Ru4K.js +0 -1
  32. package/dist/assets/index-Z_9-zlb_.js +0 -1
  33. package/dist/assets/index-lh_RKGLY.js +0 -1118
  34. package/dist/assets/method-access-map-D3ooxuVS.js +0 -1
package/dist/sw.js CHANGED
@@ -1 +1 @@
1
- if(!self.define){let _,s={};const e=(e,r)=>(e=new URL(e+".js",r).href,s[e]||new Promise(s=>{if("document"in self){const _=document.createElement("script");_.src=e,_.onload=s,document.head.appendChild(_)}else _=e,importScripts(e),s()}).then(()=>{let _=s[e];if(!_)throw new Error(`Module ${e} didn’t register its module`);return _}));self.define=(r,i)=>{const n=_||("document"in self?document.currentScript.src:"")||location.href;if(s[n])return;let l={};const a=_=>e(_,n),o={module:{uri:n},exports:l,require:a};s[n]=Promise.all(r.map(_=>o[_]||a(_))).then(_=>(i(..._),l))}}define(["./workbox-9c191d2f"],function(_){"use strict";self.skipWaiting(),_.clientsClaim(),_.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"mf-entry-bootstrap-0.js",revision:"ba5131d4c166d807db85f9bf6ffd396b"},{url:"index.html",revision:"34a8cb306cd5c3e5b102cbcef0a2578e"},{url:"favicon.svg",revision:"e28b845cc4cd4ebbe254e7d9d424f0c8"},{url:"icons/icon-512.png",revision:"f714f744e5e29a9a7c5481122ed1840d"},{url:"icons/icon-192.png",revision:"d61bc87dfde2cd635f8920b7445da4f0"},{url:"icons/apple-touch-icon.png",revision:"f8b42413aad2df56c29ec7375db56778"},{url:"brand/logo-wide-light.svg",revision:"77a5c7896c8ddf23f3ab5831462e8a9c"},{url:"brand/logo-wide-dark.svg",revision:"7600383a290ae26ae0b4683152205e57"},{url:"brand/logo-light.svg",revision:"0886d0a8fadd10a2ba36de70dd2c8c91"},{url:"brand/logo-horizontal-light.svg",revision:"cf6e7160b02e96a03e1e23b7e895a58d"},{url:"brand/logo-horizontal-dark.svg",revision:"5d90e24eb8a0ebacc692045ef2cca447"},{url:"brand/logo-dark.svg",revision:"fce2740bf6d9bbe8f1762d3aa36ef416"},{url:"assets/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-8g-kqXK4.js",revision:null},{url:"assets/virtualExposes-_ivNhQLP.js",revision:null},{url:"assets/schemas-XgIEoUz3.js",revision:null},{url:"assets/remoteEntry-6Pin_7dI.js",revision:null},{url:"assets/preload-helper-BlTxHScW.js",revision:null},{url:"assets/method-access-map-D3ooxuVS.js",revision:null},{url:"assets/index-lh_RKGLY.js",revision:null},{url:"assets/index-Z_9-zlb_.js",revision:null},{url:"assets/index-FDG6Ru4K.js",revision:null},{url:"assets/index-Dc2Moq2w.js",revision:null},{url:"assets/index-DUfO0e8s.js",revision:null},{url:"assets/index-DSFtUS7Z.js",revision:null},{url:"assets/index-DJIpFuqj.js",revision:null},{url:"assets/index-CMnchRgf.css",revision:null},{url:"assets/index-B7F0mwMZ.js",revision:null},{url:"assets/index-B4mdRb1N.js",revision:null},{url:"assets/index-B3ayOsQz.js",revision:null},{url:"assets/index-4wFotr3p.js",revision:null},{url:"assets/hostInit-DIOhqSQ8.js",revision:null},{url:"assets/devices-CZsVkxKZ.js",revision:null},{url:"assets/browser-BXdiCFWD.js",revision:null},{url:"assets/_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-BMrP2H8p.js",revision:null},{url:"assets/__mfe_internal__admin_ui_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs_commonjs-proxy-BEKtiDI3.js",revision:null},{url:"assets/__mfe_internal__admin_ui_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs-DNpf5SLz.js",revision:null},{url:"assets/__mfe_internal__admin_ui_host__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-xw6c6JeS.js",revision:null},{url:"assets/__mfe_internal__admin_ui_host__loadShare__react_mf_2_dom__loadShare__.mjs-CzO_Esxm.js",revision:null},{url:"assets/__mfe_internal__admin_ui_host__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.mjs_commonjs-proxy-DrLZNXOX.js",revision:null},{url:"assets/__mfe_internal__admin_ui_host__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.mjs-C_6K4VBY.js",revision:null},{url:"assets/__mfe_internal__admin_ui_host__loadShare__react__loadShare__.mjs_commonjs-proxy-CSyOECfO.js",revision:null},{url:"assets/__mfe_internal__admin_ui_host__loadShare__react__loadShare__.mjs-Dl4u0xYE.js",revision:null},{url:"assets/__mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.mjs_commonjs-proxy-GvBGLFI2.js",revision:null},{url:"assets/__mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.mjs-OcRSBqRe.js",revision:null},{url:"assets/__mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_client__loadShare__.mjs_commonjs-proxy-WD2WouMQ.js",revision:null},{url:"assets/__mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_client__loadShare__.mjs-DIkg6-MH.js",revision:null},{url:"assets/__mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.mjs_commonjs-proxy-DXPQtD9p.js",revision:null},{url:"assets/__mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.mjs-CeLhKMin.js",revision:null}],{}),_.cleanupOutdatedCaches(),_.registerRoute(new _.NavigationRoute(_.createHandlerBoundToURL("/index.html"),{denylist:[/^\/trpc/,/^\/api/,/^\/addon/]}))});
1
+ if(!self.define){let _,s={};const e=(e,r)=>(e=new URL(e+".js",r).href,s[e]||new Promise(s=>{if("document"in self){const _=document.createElement("script");_.src=e,_.onload=s,document.head.appendChild(_)}else _=e,importScripts(e),s()}).then(()=>{let _=s[e];if(!_)throw new Error(`Module ${e} didn’t register its module`);return _}));self.define=(r,i)=>{const n=_||("document"in self?document.currentScript.src:"")||location.href;if(s[n])return;let l={};const a=_=>e(_,n),o={module:{uri:n},exports:l,require:a};s[n]=Promise.all(r.map(_=>o[_]||a(_))).then(_=>(i(..._),l))}}define(["./workbox-9c191d2f"],function(_){"use strict";self.skipWaiting(),_.clientsClaim(),_.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"mf-entry-bootstrap-0.js",revision:"a1945cb4b7c35c3e4bac322584bb87c0"},{url:"index.html",revision:"ce9e1a1838c54c95ce260db9059d9e0a"},{url:"favicon.svg",revision:"e28b845cc4cd4ebbe254e7d9d424f0c8"},{url:"icons/icon-512.png",revision:"f714f744e5e29a9a7c5481122ed1840d"},{url:"icons/icon-192.png",revision:"d61bc87dfde2cd635f8920b7445da4f0"},{url:"icons/apple-touch-icon.png",revision:"f8b42413aad2df56c29ec7375db56778"},{url:"brand/logo-wide-light.svg",revision:"77a5c7896c8ddf23f3ab5831462e8a9c"},{url:"brand/logo-wide-dark.svg",revision:"7600383a290ae26ae0b4683152205e57"},{url:"brand/logo-light.svg",revision:"0886d0a8fadd10a2ba36de70dd2c8c91"},{url:"brand/logo-horizontal-light.svg",revision:"cf6e7160b02e96a03e1e23b7e895a58d"},{url:"brand/logo-horizontal-dark.svg",revision:"5d90e24eb8a0ebacc692045ef2cca447"},{url:"brand/logo-dark.svg",revision:"fce2740bf6d9bbe8f1762d3aa36ef416"},{url:"assets/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-BXwMMqlX.js",revision:null},{url:"assets/virtualExposes-_ivNhQLP.js",revision:null},{url:"assets/schemas-DZqswtjx.js",revision:null},{url:"assets/remoteEntry-D28y34bi.js",revision:null},{url:"assets/preload-helper-BlTxHScW.js",revision:null},{url:"assets/method-access-map-OoQznstl.js",revision:null},{url:"assets/index-n9RexO7D.css",revision:null},{url:"assets/index-dePEzy7t.js",revision:null},{url:"assets/index-NNW--T4H.js",revision:null},{url:"assets/index-Dv0-1gwL.js",revision:null},{url:"assets/index-DuHBxCOe.js",revision:null},{url:"assets/index-DeVjiPqm.js",revision:null},{url:"assets/index-DYSrVZ4G.js",revision:null},{url:"assets/index-DRW7rVhn.js",revision:null},{url:"assets/index-DIIqKU3D.js",revision:null},{url:"assets/index-DFRMwfPq.js",revision:null},{url:"assets/index-CMxz0koW.js",revision:null},{url:"assets/index-BmzE49kT.js",revision:null},{url:"assets/hostInit-DQ5UjxJa.js",revision:null},{url:"assets/devices-BnLu5dxg.js",revision:null},{url:"assets/browser-BXdiCFWD.js",revision:null},{url:"assets/_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-DJQnlBBe.js",revision:null},{url:"assets/__mfe_internal__admin_ui_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs_commonjs-proxy-BEKtiDI3.js",revision:null},{url:"assets/__mfe_internal__admin_ui_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs-DNpf5SLz.js",revision:null},{url:"assets/__mfe_internal__admin_ui_host__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-xw6c6JeS.js",revision:null},{url:"assets/__mfe_internal__admin_ui_host__loadShare__react_mf_2_dom__loadShare__.mjs-CzO_Esxm.js",revision:null},{url:"assets/__mfe_internal__admin_ui_host__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.mjs_commonjs-proxy-DrLZNXOX.js",revision:null},{url:"assets/__mfe_internal__admin_ui_host__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.mjs-C_6K4VBY.js",revision:null},{url:"assets/__mfe_internal__admin_ui_host__loadShare__react__loadShare__.mjs_commonjs-proxy-CSyOECfO.js",revision:null},{url:"assets/__mfe_internal__admin_ui_host__loadShare__react__loadShare__.mjs-Dl4u0xYE.js",revision:null},{url:"assets/__mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.mjs_commonjs-proxy-GvBGLFI2.js",revision:null},{url:"assets/__mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.mjs-OcRSBqRe.js",revision:null},{url:"assets/__mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_client__loadShare__.mjs_commonjs-proxy-WD2WouMQ.js",revision:null},{url:"assets/__mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_client__loadShare__.mjs-DIkg6-MH.js",revision:null},{url:"assets/__mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.mjs_commonjs-proxy-DXPQtD9p.js",revision:null},{url:"assets/__mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.mjs-CeLhKMin.js",revision:null}],{}),_.cleanupOutdatedCaches(),_.registerRoute(new _.NavigationRoute(_.createHandlerBoundToURL("/index.html"),{denylist:[/^\/trpc/,/^\/api/,/^\/addon/]}))});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-admin-ui",
3
- "version": "0.1.31",
3
+ "version": "0.1.33",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "CamStack Admin UI — Vite frontend build and server-side addon",
@@ -1 +0,0 @@
1
- import{n as _e,c as L,F as we,s as be}from"./__mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_client__loadShare__.mjs-DIkg6-MH.js";import{b as x,d as Ee}from"./index-DJIpFuqj.js";class ve{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(t,r){this.keyToValue.set(t,r),this.valueToKey.set(r,t)}getByKey(t){return this.keyToValue.get(t)}getByValue(t){return this.valueToKey.get(t)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}}class K{constructor(t){this.generateIdentifier=t,this.kv=new ve}register(t,r){this.kv.getByValue(t)||(r||(r=this.generateIdentifier(t)),this.kv.set(r,t))}clear(){this.kv.clear()}getIdentifier(t){return this.kv.getByValue(t)}getValue(t){return this.kv.getByKey(t)}}class Pe extends K{constructor(){super(t=>t.name),this.classToAllowedProps=new Map}register(t,r){typeof r=="object"?(r.allowProps&&this.classToAllowedProps.set(t,r.allowProps),super.register(t,r.identifier)):super.register(t,r)}getAllowedProps(t){return this.classToAllowedProps.get(t)}}function Ce(e){if("values"in Object)return Object.values(e);const t=[];for(const r in e)e.hasOwnProperty(r)&&t.push(e[r]);return t}function ke(e,t){const r=Ce(e);if("find"in r)return r.find(t);const n=r;for(let s=0;s<n.length;s++){const i=n[s];if(t(i))return i}}function g(e,t){Object.entries(e).forEach(([r,n])=>t(n,r))}function C(e,t){return e.indexOf(t)!==-1}function D(e,t){for(let r=0;r<e.length;r++){const n=e[r];if(t(n))return n}}class Se{constructor(){this.transfomers={}}register(t){this.transfomers[t.name]=t}findApplicable(t){return ke(this.transfomers,r=>r.isApplicable(t))}findByName(t){return this.transfomers[t]}}const Ie=e=>Object.prototype.toString.call(e).slice(8,-1),W=e=>typeof e>"u",Re=e=>e===null,E=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,I=e=>E(e)&&Object.keys(e).length===0,y=e=>Array.isArray(e),Te=e=>typeof e=="string",Ae=e=>typeof e=="number"&&!isNaN(e),Oe=e=>typeof e=="boolean",Me=e=>e instanceof RegExp,v=e=>e instanceof Map,P=e=>e instanceof Set,q=e=>Ie(e)==="Symbol",Ne=e=>e instanceof Date&&!isNaN(e.valueOf()),F=e=>e instanceof Error,B=e=>typeof e=="number"&&isNaN(e),Le=e=>Oe(e)||Re(e)||W(e)||Ae(e)||Te(e)||q(e),xe=e=>typeof e=="bigint",De=e=>e===1/0||e===-1/0,Be=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),Ve=e=>e instanceof URL,R=e=>e.replace(/\\/g,"\\\\").replace(/\./g,"\\."),S=e=>e.map(String).map(R).join("."),b=(e,t)=>{const r=[];let n="";for(let i=0;i<e.length;i++){let o=e.charAt(i);if(!t&&o==="\\"){const u=e.charAt(i+1);if(u==="\\"){n+="\\",i++;continue}else if(u!==".")throw Error("invalid path")}if(o==="\\"&&e.charAt(i+1)==="."){n+=".",i++;continue}if(o==="."){r.push(n),n="";continue}n+=o}const s=n;return r.push(s),r};function m(e,t,r,n){return{isApplicable:e,annotation:t,transform:r,untransform:n}}const $=[m(W,"undefined",()=>null,()=>{}),m(xe,"bigint",e=>e.toString(),e=>typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),m(Ne,"Date",e=>e.toISOString(),e=>new Date(e)),m(F,"Error",(e,t)=>{const r={name:e.name,message:e.message};return"cause"in e&&(r.cause=e.cause),t.allowedErrorProps.forEach(n=>{r[n]=e[n]}),r},(e,t)=>{const r=new Error(e.message,{cause:e.cause});return r.name=e.name,r.stack=e.stack,t.allowedErrorProps.forEach(n=>{r[n]=e[n]}),r}),m(Me,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),r=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,r)}),m(P,"set",e=>[...e.values()],e=>new Set(e)),m(v,"map",e=>[...e.entries()],e=>new Map(e)),m(e=>B(e)||De(e),"number",e=>B(e)?"NaN":e>0?"Infinity":"-Infinity",Number),m(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),m(Ve,"URL",e=>e.toString(),e=>new URL(e))];function k(e,t,r,n){return{isApplicable:e,annotation:t,transform:r,untransform:n}}const Y=k((e,t)=>q(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,r)=>{const n=r.symbolRegistry.getValue(t[1]);if(!n)throw new Error("Trying to deserialize unknown symbol");return n}),Ue=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),G=k(Be,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const r=Ue[t[1]];if(!r)throw new Error("Trying to deserialize unknown typed array");return new r(e)});function H(e,t){return e?.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}const X=k(H,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const r=t.classRegistry.getAllowedProps(e.constructor);if(!r)return{...e};const n={};return r.forEach(s=>{n[s]=e[s]}),n},(e,t,r)=>{const n=r.classRegistry.getValue(t[1]);if(!n)throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(n.prototype),e)}),Q=k((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,r)=>{const n=r.customTransformerRegistry.findByName(t[1]);if(!n)throw new Error("Trying to deserialize unknown custom value");return n.deserialize(e)}),ze=[X,Y,Q,G],V=(e,t)=>{const r=D(ze,s=>s.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation(e,t)};const n=D($,s=>s.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation}},Z={};$.forEach(e=>{Z[e.annotation]=e});const Ke=(e,t,r)=>{if(y(t))switch(t[0]){case"symbol":return Y.untransform(e,t,r);case"class":return X.untransform(e,t,r);case"custom":return Q.untransform(e,t,r);case"typed-array":return G.untransform(e,t,r);default:throw new Error("Unknown transformation: "+t)}else{const n=Z[t];if(!n)throw new Error("Unknown transformation: "+t);return n.untransform(e,r)}},p=(e,t)=>{if(t>e.size)throw new Error("index out of bounds");const r=e.keys();for(;t>0;)r.next(),t--;return r.next().value};function j(e){if(C(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(C(e,"prototype"))throw new Error("prototype is not allowed as a property");if(C(e,"constructor"))throw new Error("constructor is not allowed as a property")}const We=(e,t)=>{j(t);for(let r=0;r<t.length;r++){const n=t[r];if(P(e))e=p(e,+n);else if(v(e)){const s=+n,i=+t[++r]==0?"key":"value",o=p(e,s);switch(i){case"key":e=o;break;case"value":e=e.get(o);break}}else e=e[n]}return e},T=(e,t,r)=>{if(j(t),t.length===0)return r(e);let n=e;for(let i=0;i<t.length-1;i++){const o=t[i];if(y(n)){const c=+o;n=n[c]}else if(E(n))n=n[o];else if(P(n)){const c=+o;n=p(n,c)}else if(v(n)){if(i===t.length-2)break;const l=+o,u=+t[++i]==0?"key":"value",f=p(n,l);switch(u){case"key":n=f;break;case"value":n=n.get(f);break}}}const s=t[t.length-1];if(y(n)?n[+s]=r(n[+s]):E(n)&&(n[s]=r(n[s])),P(n)){const i=p(n,+s),o=r(i);i!==o&&(n.delete(i),n.add(o))}if(v(n)){const i=+t[t.length-2],o=p(n,i);switch(+s==0?"key":"value"){case"key":{const l=r(o);n.set(l,n.get(o)),l!==o&&n.delete(o);break}case"value":{n.set(o,r(n.get(o)));break}}}return e},J=e=>e<1;function A(e,t,r,n=[]){if(!e)return;const s=J(r);if(!y(e)){g(e,(c,l)=>A(c,t,r,[...n,...b(l,s)]));return}const[i,o]=e;o&&g(o,(c,l)=>{A(c,t,r,[...n,...b(l,s)])}),t(i,n)}function qe(e,t,r,n){return A(t,(s,i)=>{e=T(e,i,o=>Ke(o,s,n))},r),e}function Fe(e,t,r){const n=J(r);function s(i,o){const c=We(e,b(o,n));i.map(l=>b(l,n)).forEach(l=>{e=T(e,l,()=>c)})}if(y(t)){const[i,o]=t;i.forEach(c=>{e=T(e,b(c,n),()=>e)}),o&&g(o,s)}else g(t,s);return e}const $e=(e,t)=>E(e)||y(e)||v(e)||P(e)||F(e)||H(e,t);function Ye(e,t,r){const n=r.get(e);n?n.push(t):r.set(e,[t])}function Ge(e,t){const r={};let n;return e.forEach(s=>{if(s.length<=1)return;t||(s=s.map(c=>c.map(String)).sort((c,l)=>c.length-l.length));const[i,...o]=s;i.length===0?n=o.map(S):r[S(i)]=o.map(S)}),n?I(r)?[n]:[n,r]:I(r)?void 0:r}const ee=(e,t,r,n,s=[],i=[],o=new Map)=>{const c=Le(e);if(!c){Ye(e,s,t);const d=o.get(e);if(d)return n?{transformedValue:null}:d}if(!$e(e,r)){const d=V(e,r),h=d?{transformedValue:d.value,annotations:[d.type]}:{transformedValue:e};return c||o.set(e,h),h}if(C(i,e))return{transformedValue:null};const l=V(e,r),u=l?.value??e,f=y(u)?[]:{},_={};g(u,(d,h)=>{if(h==="__proto__"||h==="constructor"||h==="prototype")throw new Error(`Detected property ${h}. This is a prototype pollution risk, please remove it from your object.`);const w=ee(d,t,r,n,[...s,h],[...i,e],o);f[h]=w.transformedValue,y(w.annotations)?_[R(h)]=w.annotations:E(w.annotations)&&g(w.annotations,(pe,ge)=>{_[R(h)+"."+ge]=pe})});const N=I(_)?{transformedValue:f,annotations:l?[l.type]:void 0}:{transformedValue:f,annotations:l?[l.type,_]:_};return c||o.set(e,N),N};function te(e){return Object.prototype.toString.call(e).slice(8,-1)}function U(e){return te(e)==="Array"}function He(e){if(te(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function Xe(e,t,r,n,s){const i={}.propertyIsEnumerable.call(n,t)?"enumerable":"nonenumerable";i==="enumerable"&&(e[t]=r),s&&i==="nonenumerable"&&Object.defineProperty(e,t,{value:r,enumerable:!1,writable:!0,configurable:!0})}function O(e,t={}){if(U(e))return e.map(s=>O(s,t));if(!He(e))return e;const r=Object.getOwnPropertyNames(e),n=Object.getOwnPropertySymbols(e);return[...r,...n].reduce((s,i)=>{if(i==="__proto__"||U(t.props)&&!t.props.includes(i))return s;const o=e[i],c=O(o,t);return Xe(s,i,c,e,t.nonenumerable),s},{})}class a{constructor({dedupe:t=!1}={}){this.classRegistry=new Pe,this.symbolRegistry=new K(r=>r.description??""),this.customTransformerRegistry=new Se,this.allowedErrorProps=[],this.dedupe=t}serialize(t){const r=new Map,n=ee(t,r,this,this.dedupe),s={json:n.transformedValue};n.annotations&&(s.meta={...s.meta,values:n.annotations});const i=Ge(r,this.dedupe);return i&&(s.meta={...s.meta,referentialEqualities:i}),s.meta&&(s.meta.v=1),s}deserialize(t,r){const{json:n,meta:s}=t;let i=r?.inPlace?n:O(n);return s?.values&&(i=qe(i,s.values,s.v??0,this)),s?.referentialEqualities&&(i=Fe(i,s.referentialEqualities,s.v??0)),i}stringify(t){return JSON.stringify(this.serialize(t))}parse(t){return this.deserialize(JSON.parse(t),{inPlace:!0})}registerClass(t,r){this.classRegistry.register(t,r)}registerSymbol(t,r){this.symbolRegistry.register(t,r)}registerCustom(t,r){this.customTransformerRegistry.register({name:r,...t})}allowErrorProps(...t){this.allowedErrorProps.push(...t)}}a.defaultInstance=new a;a.serialize=a.defaultInstance.serialize.bind(a.defaultInstance);a.deserialize=a.defaultInstance.deserialize.bind(a.defaultInstance);a.stringify=a.defaultInstance.stringify.bind(a.defaultInstance);a.parse=a.defaultInstance.parse.bind(a.defaultInstance);a.registerClass=a.defaultInstance.registerClass.bind(a.defaultInstance);a.registerSymbol=a.defaultInstance.registerSymbol.bind(a.defaultInstance);a.registerCustom=a.defaultInstance.registerCustom.bind(a.defaultInstance);a.allowErrorProps=a.defaultInstance.allowErrorProps.bind(a.defaultInstance);a.serialize;a.deserialize;a.stringify;a.parse;a.registerClass;a.registerCustom;a.registerSymbol;a.allowErrorProps;const Qe=1e4,Ze=3e3,je=2e3,Je=3e4;class et{_serverUrl;useWs;baseRetryMs;maxRetryMs;onConnectionChange;token;_trpcClient;_wsClient=null;mirror=null;mirrorInit=null;connected=!1;connectedPromise=null;_systemProxy;_connectionVersion=0;connectionListeners=new Set;constructor(t){this._serverUrl=t.serverUrl.replace(/\/+$/,""),this.token=t.token;const r=typeof window<"u";this.useWs=t.useWebSocket??r,this.onConnectionChange=t.onConnectionChange,this.baseRetryMs=t.retryDelayMs??je,this.maxRetryMs=t.maxRetryDelayMs??Je,this._trpcClient=this.buildTrpcClient(),this._systemProxy=x(this._trpcClient)}get serverUrl(){return this._serverUrl}get connectionVersion(){return this._connectionVersion}subscribeConnectionEvents(t){return this.connectionListeners.add(t),()=>{this.connectionListeners.delete(t)}}emitConnectionEvent(t){try{this.onConnectionChange?.(t)}catch{}for(const r of this.connectionListeners)try{r(t,this._connectionVersion)}catch{}}async awaitConnected(t){if(this.connected)return;if(this.connectedPromise)return this.connectedPromise;const r=t??15e3;this.connectedPromise=(async()=>{const n=this._trpcClient.auth.me.query();Number.isFinite(r)?await new Promise((s,i)=>{const o=setTimeout(()=>i(new Error(`System.awaitConnected: probe timed out after ${r}ms`)),r);n.then(()=>{clearTimeout(o),s()},c=>{clearTimeout(o),i(c instanceof Error?c:new Error(String(c)))})}):await n,this.connected=!0})();try{await this.connectedPromise}finally{this.connectedPromise=null}}async init(t){if(this.mirror?.isReady())return;if(this.mirrorInit)return this.mirrorInit;const r=new Ee(this._trpcClient);return this.mirror=r,this.mirrorInit=(async()=>{await this.awaitConnected(t),await r.init(t)})().finally(()=>{this.mirrorInit=null}),this.mirrorInit}async awaitReady(){if(!this.mirror?.isReady())return this.mirrorInit?this.mirrorInit:this.init()}isReady(){return this.mirror?.isReady()??!1}isConnected(){return this.connected}reconnect(){this.useWs&&(this.emitConnectionEvent("connecting"),this._wsClient?.close(),this.disposeMirror(),this.connected=!1,this.connectedPromise=null,this._trpcClient=this.buildTrpcClient(),this._systemProxy=x(this._trpcClient))}switchServerUrl(t){const r=t.replace(/\/+$/,"");r!==this._serverUrl&&(this._serverUrl=r,this.reconnect())}async raceConnectionEndpoints(t){const r=t?.perCandidateTimeoutMs??1500,n=(()=>{try{return new URL(this._serverUrl)}catch{return null}})(),s=n?.port?Number(n.port):n?.protocol==="https:"?443:80,i=n?.protocol==="https:"?"https":"http",c=this._trpcClient.localNetwork?.getConnectionEndpoints;if(!c)return{winner:this._serverUrl,switched:!1};let l;try{l=(await c.query({port:s,ipv4Only:t?.ipv4Only,scheme:i})).endpoints}catch{return{winner:this._serverUrl,switched:!1}}if(l.length===0)return{winner:this._serverUrl,switched:!1};const u=await tt(l.map(f=>f.baseUrl),r);return!u||u===this._serverUrl?{winner:u??this._serverUrl,switched:!1}:(this.switchServerUrl(u),{winner:u,switched:!0})}close(){this.disposeMirror(),this.connected=!1,this.connectedPromise=null,this._wsClient?.close()}disposeMirror(){this.mirror?.dispose(),this.mirror=null,this.mirrorInit=null}async login(t,r){const n=await this._trpcClient.auth.login.mutate({username:t,password:r});if(typeof n=="object"&&n!==null&&"token"in n){const s=n,i=s.token;typeof i=="string"&&s.requiresTotp!==!0&&this.setToken(i)}return n}async loginVerifyTotp(t,r){const n=await this._trpcClient.auth.loginVerifyTotp.mutate({challengeToken:t,code:r});if(typeof n=="object"&&n!==null&&"token"in n){const s=n.token;typeof s=="string"&&this.setToken(s)}return n}async logout(){await this._trpcClient.auth.logout.mutate()}async getMe(){return await this._trpcClient.auth.me.query()}setToken(t){this.token=t}listDevices(t){return this.mirror?(t?this.mirror.query(t):this.mirror.getAllDevices()).map(n=>this.attachBinding(n)):[]}getDevice(t){const r=this.mirror?.getDeviceById(t)??null;return r?this.attachBinding(r):null}getDeviceByName(t){const r=this.mirror?.getDeviceByName(t)??null;return r?this.attachBinding(r):null}getDeviceByStableId(t){const r=this.mirror?.getDeviceByStableId(t)??null;return r?this.attachBinding(r):null}async waitForDevice(t,r){this.mirror||await this.init();const n=await this.mirror.waitForDevice(t,r??3e4);return this.attachBinding(n)}onDeviceAdded(t){if(!this.mirror)throw new Error("System.onDeviceAdded: call init() before subscribing");return this.mirror.onDeviceAdded(t)}onDeviceRemoved(t){if(!this.mirror)throw new Error("System.onDeviceRemoved: call init() before subscribing");return this.mirror.onDeviceRemoved(t)}attachBinding(t){const r=this.lookupBinding(t.deviceId);if(r===t.binding)return t;const n=t;return n.binding=r,t}lookupBinding(t){return this.mirror?this.mirror.getDeviceById(t)?.binding??null:null}get addonPages(){return this._systemProxy.addonPages}get addonSettings(){return this._systemProxy.addonSettings}get alerts(){return this._systemProxy.alerts}get audioAnalyzer(){return this._systemProxy.audioAnalyzer}get audioCodec(){return this._systemProxy.audioCodec}get backup(){return this._systemProxy.backup}get decoder(){return this._systemProxy.decoder}get deviceManager(){return this._systemProxy.deviceManager}get deviceProvider(){return this._systemProxy.deviceProvider}get deviceState(){return this._systemProxy.deviceState}get metricsProvider(){return this._systemProxy.metricsProvider}get notificationOutput(){return this._systemProxy.notificationOutput}get pipelineExecutor(){return this._systemProxy.pipelineExecutor}get pipelineOrchestrator(){return this._systemProxy.pipelineOrchestrator}get pipelineRunner(){return this._systemProxy.pipelineRunner}get platformProbe(){return this._systemProxy.platformProbe}get recordingEngine(){return this._systemProxy.recordingEngine}get settingsStore(){return this._systemProxy.settingsStore}get storage(){return this._systemProxy.storage}get streamBroker(){return this._systemProxy.streamBroker}get turnProvider(){return this._systemProxy.turnProvider}get userManagement(){return this._systemProxy.userManagement}subscribeEvent(t,r){const n=this._trpcClient.live.onEvent.subscribe({category:t},{onData:s=>{try{r(s)}catch{}}});return()=>{try{n.unsubscribe()}catch{}}}get trpcClient(){return this._trpcClient}get wsClient(){return this._wsClient}buildTrpcClient(){const t=()=>{const r={};return this.token&&(r.Authorization=`Bearer ${this.token}`),r};if(this.useWs){const r=this._serverUrl.replace(/^http/,"ws")+"/trpc",n=this.baseRetryMs,s=this.maxRetryMs;return this._wsClient=_e({url:r,connectionParams:()=>({token:this.token}),retryDelayMs:i=>Math.min(n*Math.pow(2,i),s),keepAlive:{enabled:!0,intervalMs:Qe,pongTimeoutMs:Ze},onOpen:()=>{this._connectionVersion+=1,this.emitConnectionEvent("connected")},onClose:()=>{this.emitConnectionEvent("disconnected")}}),L({links:[we({client:this._wsClient,transformer:a})]})}return this._wsClient=null,L({links:[be({url:`${this._serverUrl}/trpc`,headers:t,transformer:a})]})}}function ft(e){return new et(e)}async function tt(e,t){if(e.length===0)return null;if(typeof fetch!="function")return e[0]??null;const n=typeof window<"u"&&typeof window.location<"u"&&window.location.protocol==="https:"?e.filter(o=>o.toLowerCase().startsWith("https://")):e;if(n.length===0)return null;const s=n.map(()=>new AbortController),i=n.map(async(o,c)=>{const l=s[c],u=setTimeout(()=>l.abort(),t);try{const f=await fetch(`${o.replace(/\/+$/,"")}/trpc/health`,{method:"GET",signal:l.signal,credentials:"omit"});if(!f.ok)throw new Error(`${f.status}`);return o}finally{clearTimeout(u)}});try{const o=await Promise.any(i);for(const c of s)try{c.abort()}catch{}return o}catch{return null}}var re=(e=>(e.Motion="motion",e.Person="person",e.Vehicle="vehicle",e.Animal="animal",e.Audio="audio",e.Face="face",e.Plate="plate",e.Package="package",e.Doorbell="doorbell",e.Sensor="sensor",e))(re||{});const ne=["animal","dog_cat","dog","cat","horse","sheep","cow","elephant","bear","zebra","giraffe","mouse","rabbit","deer","lion","tiger","bird","eagle","owl","pigeon","fish","whale","dolphin","snake","turtle","lizard"],se=["person","people","pedestrian","rider","driver","cyclist","skier","skateboarder","face","hand","head","body"],ie=["vehicle","car","truck","bus","motorcycle","bicycle","van","ambulance","police_car","fire_truck","train","subway","tram","airplane","boat","ship","helicopter"],oe=["face","eyes","nose","mouth","ears","eyebrows","left_eye","right_eye","pupil","iris","eyelid","eye_corner","upper_lip","lower_lip","teeth","chin","cheek","forehead","jaw","glasses","sunglasses","facial_hair","beard","mustache","facial_landmark","facial_keypoint"],ae=["plate","license_plate","front_plate","rear_plate","motorcycle_plate","temporary_plate","dealer_plate","licensePlate","plate_number","plate_character","plate_digit","plate_letter","plate_symbol","plate_region","plate_country_identifier","plate_frame","plate_bolt","plate_sticker","plate_validation_tag","damaged_plate","obscured_plate","dirty_plate"],ce=["motion","movement","other"],le=["package","packet"],ue=["audio"],fe=["speech","scream","babbling","yell","bellow","whoop","whispering","laughter","snicker","crying","cry","sigh","singing","choir","chant","mantra","child_singing","rapping","humming","groan","grunt","whistling","breathing","wheeze","snoring","gasp","pant","snort","cough","throat_clearing","sneeze","sniff","cheering","applause","chatter","crowd","children_playing","bark","yip","howl","bow-wow","growling","whimper_dog","purr","meow","hiss","caterwaul","pets","livestock","doorbell","ding-dong","door","slam","knock","alarm","telephone","music","dog","dogs"],he=["doorbell","ring"],me=["lock","binary","flood","entry","door","leak","door_open","flooded","entry_open"],de={...ne.reduce((e,t)=>({...e,[t]:"animal"}),{}),...se.reduce((e,t)=>({...e,[t]:"person"}),{}),...ie.reduce((e,t)=>({...e,[t]:"vehicle"}),{}),...ce.reduce((e,t)=>({...e,[t]:"motion"}),{}),...le.reduce((e,t)=>({...e,[t]:"package"}),{}),...oe.reduce((e,t)=>({...e,[t]:"face"}),{}),...ae.reduce((e,t)=>({...e,[t]:"plate"}),{}),...ue.reduce((e,t)=>({...e,[t]:"audio"}),{}),...fe.reduce((e,t)=>({...e,[t]:"audio"}),{}),...he.reduce((e,t)=>({...e,[t]:"doorbell"}),{}),...me.reduce((e,t)=>({...e,[t]:"sensor"}),{})},rt=e=>oe.includes(e),nt=e=>ae.includes(e),ht=e=>ne.includes(e),mt=e=>se.includes(e),dt=e=>ie.includes(e),yt=e=>ce.includes(e),pt=e=>he.includes(e),gt=e=>le.includes(e),_t=e=>ue.includes(e)||fe.includes(e),wt=e=>me.includes(e),bt=e=>rt(e)||nt(e),Et=e=>de[e],vt=e=>{const{className:t}=e,r={face:"person",plate:"vehicle"},n=de[t];return n&&n!==t?n:r[t]},st=Object.values(re),M=st.filter(e=>e!=="motion"),ye=["person","doorbell","package"],it=[...ye,"vehicle","animal","audio","face","plate"],ot=[...M];function Pt(e,t){switch(e){case"critical":return ye;case"important":return it;case"all":return ot;case"custom":return t?.length?t:M;default:return M}}const z={Light:"light",Switch:"switch",WindowCovering:"cover",Lock:"lock",SecuritySystem:"alarm",Buttons:"button",Select:"select",Siren:"siren",Sensor:"sensor",Entry:"entry",Program:"script",MediaPlayer:"media_player",Outlet:"switch",light:"light",switch:"switch",input_boolean:"switch",cover:"cover",lock:"lock",alarm_control_panel:"alarm",input_button:"button",button:"button",input_select:"select",select:"select",siren:"siren",sensor:"sensor",media_player:"media_player",script:"script"},Ct={light:"light",switch:"switch",input_boolean:"switch",cover:"cover",lock:"lock",alarm_control_panel:"alarm",input_button:"button",button:"button",input_select:"select",select:"select",siren:"siren",sensor:"sensor",binary_sensor:"sensor",media_player:"media_player",script:"script",climate:"climate",camera:"camera",fan:"fan",vacuum:"vacuum",automation:"automation",scene:"scene",input_number:"sensor",person:"person",device_tracker:"tracker",weather:"weather",water_heater:"climate"},kt={Light:"light",Switch:"switch",WindowCovering:"cover",Lock:"lock",SecuritySystem:"alarm",Buttons:"button",Select:"select",Siren:"siren",Sensor:"sensor",Entry:"entry",Program:"script",MediaPlayer:"media_player",Camera:"camera",Doorbell:"doorbell",Fan:"fan",Outlet:"switch"};function St(e){const t=z[e];if(t)return t;const r=e.toLowerCase();return z[r]??null}const at=["Entry","Light","Switch","Lock","SecuritySystem","Buttons","WindowCovering","Siren","Sensor","Select","Program"],It=new Set(at),ct=["light","switch","input_boolean","cover","lock","alarm_control_panel","input_button","button","input_select","select","siren","media_player","script"],Rt=new Set(ct);export{gt as A,mt as B,nt as C,M as D,ct as E,wt as F,dt as G,Ct as H,ae as I,ce as J,le as K,se as L,tt as M,me as N,ie as O,z as R,a as S,ot as T,re as a,Rt as b,ft as c,at as d,It as e,kt as f,et as g,ye as h,it as i,ne as j,ue as k,fe as l,st as m,de as n,he as o,oe as p,St as q,Pt as r,Et as s,vt as t,ht as u,_t as v,pt as w,rt as x,bt as y,yt as z};