@virtualdisplay.io/client 4.0.0-alpha.32 → 4.0.0-alpha.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.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.0.0-alpha.33
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
Fix the loading indicator covering the page with a white block while a model loads. The page's own background now shows through until the model is ready, and the indicator takes the page's text colour, so it stays visible on a dark page.
|
|
8
|
+
|
|
3
9
|
## 4.0.0-alpha.32
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-CYdcPHCu.js";
|
|
2
|
-
// ../../../../../../../../../pnpm-stores/
|
|
2
|
+
// ../../../../../../../../../pnpm-stores/8781733b65c58a9438de42df3d0608bd3f2928281818079a5b066d40375deb9e/v11/links/@/qrcode/1.5.4/38431ab3ce46851b9c5211f56296031bcdd3ab8a89e17d0d2a55d25922dcc7fe/node_modules/qrcode/lib/can-promise.js
|
|
3
3
|
var t = /* @__PURE__ */ e(((e, t) => {
|
|
4
4
|
t.exports = function() {
|
|
5
5
|
return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-5iZMYShA.cjs");var t={HANDSHAKE:`handshake`,SESSION:`session`,MUTATION:`mutation`,STATE:`state`,LOADING_INDICATOR:`loading_indicator`,CAMERA:`camera`,SNAPSHOT:`snapshot`,MAPPING:`mapping`,AR_ACTIVATE:`ar_activate`,FULLSCREEN:`fullscreen`,CONFIG:`config`,ANNOTATION_TOGGLE:`annotation_toggle`,FOCUS:`focus`,PRICING:`pricing`,QR_SHOWN:`qr_shown`,SYNC:`sync`,SELECTABLE:`selectable`,APP_RESOLVED:`app_resolved`},n=`main`,r={FOCUS:`focus`,UNFOCUS:`unfocus`},i={FOCUSED:`focused`,UNFOCUSED:`unfocused`},a={AVAILABLE:`available`,VIEW_ONLY:`view_only`,HIDDEN:`hidden`};function o(e){return typeof e!=`object`||!e?null:e}var s=new Set(Object.values(t));function c(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.target!=`string`&&typeof t.type==`string`&&s.has(t.type)}function l(e){let n=o(e);return n!==null&&n.type===t.HANDSHAKE}function u(e){let n=o(e);return n!==null&&n.type===t.SESSION&&typeof n.sessionId==`string`}function ee(e){let n=o(e);return n!==null&&n.type===t.APP_RESOLVED&&typeof n.appType==`string`&&n.appType!==``&&typeof n.name==`string`}function d(e){let n=o(e);return n!==null&&n.type===t.MUTATION&&typeof n.instance==`string`&&n.instance!==``&&Array.isArray(n.results)}function f(e){let n=o(e);return n!==null&&n.type===t.SNAPSHOT&&(`data`in n||`error`in n)}function p(e){let n=o(e);return n!==null&&n.type===t.CAMERA&&Array.isArray(n.transforms)}function te(e){let n=o(e);return n!==null&&n.type===t.MAPPING&&typeof n.instance==`string`&&n.instance!==``&&Array.isArray(n.attributes)}function ne(e){let n=o(e);return n!==null&&n.type===t.LOADING_INDICATOR&&typeof n.progress==`number`}function m(e){let n=o(e);return n!==null&&n.type===t.SYNC&&typeof n.connected==`boolean`}function re(e){let n=o(e);return n!==null&&n.type===t.SELECTABLE&&typeof n.instance==`string`&&n.instance!==``&&Array.isArray(n.attributes)}function ie(e){let n=o(e);return n!==null&&n.type===t.CONFIG&&typeof n.viewerSettings==`object`}function ae(e){let n=o(e);return n!==null&&n.type===t.FOCUS&&typeof n.instance==`string`&&n.instance!==``&&typeof n.state==`string`}function oe(e){let n=o(e);return n!==null&&n.type===t.PRICING&&typeof n.instance==`string`&&n.instance!==``&&typeof n.pricing==`object`&&n.pricing!==null}var se=class{processor;pending=[];isReady=!1;constructor(e){this.processor=e}enqueue(e){this.isReady?this.processor(e):this.pending.push(e)}markReady(){if(this.isReady||(this.isReady=!0,this.pending.length===0))return;let e=[...this.pending];this.pending.length=0;for(let t of e)this.processor(t)}hasPending(e){return this.pending.some(t=>t.type===e)}clear(){this.pending.length=0}},ce=class{getTarget;handlers=new Map;publisher;consumer;listener=null;sourceId;targetOrigin;isValid;onHandlerError;constructor(e,t){this.getTarget=e,this.sourceId=`vd-${Math.random().toString(36).slice(2,8)}`,this.targetOrigin=`*`,this.isValid=t?.isValid??c,this.onHandlerError=t?.onHandlerError??le,this.publisher=new se(e=>this.post(e)),this.consumer=new se(e=>this.routeToHandler(e)),t?.bufferIncoming!==!0&&this.consumer.markReady()}on(e,t){this.handlers.set(e,t)}setTargetOrigin(e){this.targetOrigin=e}send(e){this.publisher.enqueue(e)}receive(e){this.isValid(e)&&this.consumer.enqueue(e)}markReady(){this.publisher.markReady()}markConsumerReady(){this.consumer.markReady()}consumerHasPending(e){return this.consumer.hasPending(e)}start(){this.listener===null&&(this.listener=e=>{let{data:t}=e;if(!this.isValid(t)||t._source===this.sourceId)return;let n=this.getTarget();if(n!==null&&e.source!==null&&e.source!==n)return;let r=t;this.consumer.enqueue(r)},window.addEventListener(`message`,this.listener))}destroy(){this.listener!==null&&(window.removeEventListener(`message`,this.listener),this.listener=null),this.publisher.clear(),this.consumer.clear(),this.handlers.clear()}post(e){let t=this.getTarget();t!==null&&t.postMessage({...e,_source:this.sourceId},this.targetOrigin)}routeToHandler(e){let t=this.handlers.get(e.type);if(t===void 0)return;let n;try{n=t(e)}catch(t){this.onHandlerError(e,t);return}n instanceof Promise&&n.catch(t=>{this.onHandlerError(e,t)})}};function le(e,t){let n=t instanceof Error?t.message:String(t);console.error(`Virtualdisplay: error handling ${e.type}: ${n}`)}t.CAMERA,t.LOADING_INDICATOR;var ue=class{send;instance;constructor(e,t){this.send=e,this.instance=t}setEnabled(e){this.send({type:t.ANNOTATION_TOGGLE,instance:this.instance,enabled:e})}},de=class{value;attribute;label;isSelectedValue=!1;constructor(e,t,n){this.value=e,this.attribute=t,this.label=n}get isSelected(){return this.isSelectedValue}setSelected(e){this.isSelectedValue=e}},fe={},pe=[`en`,`nl`,`de`],me=`PARAGLIDE_LOCALE`,h=[`globalVariable`,`baseLocale`],he=[],g=typeof window>`u`;globalThis.__paraglide=globalThis.__paraglide??{},globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};var _,ge=!1,v=()=>{let e=h;!g&&typeof window<`u`&&window.location?.href&&(e=Ne(window.location.href));let t=_e(e,typeof window<`u`?window.location?.href:void 0);if(t)return ge||(_=t,ge=!0,ye(t,{reload:!1})),t;throw Error(`No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found`)};function _e(e,t){let n;for(let t of e){if(t===`baseLocale`)n=`en`;else if(t===`globalVariable`&&_!==void 0)n=_;else if(Pe(t)&&x.has(t)){let e=x.get(t);if(e){let t=e.getLocale();if(t instanceof Promise)continue;if(t!==void 0)return xe(t)}}let e=y(n);if(e)return e}}var ve=e=>{e?window.location.href=e:window.location.reload()},ye=(e,t)=>{let n={reload:!0,...t},r;try{r=v()}catch{}let i=[],a=h;!g&&typeof window<`u`&&window.location?.href&&(a=Ne(window.location.href));for(let t of a)if(t===`globalVariable`)_=e;else if(t===`baseLocale`)continue;else if(Pe(t)&&x.has(t)){let n=x.get(t);if(n){let r=n.setLocale(e);r instanceof Promise&&(r=r.catch(e=>{throw Error(`Custom strategy "${t}" setLocale failed.`,{cause:e})}),i.push(r))}}let o=()=>{!g&&n.reload&&window.location&&e!==r&&ve(void 0)};if(i.length)return Promise.all(i).then(()=>{o()});o()},be=()=>typeof window<`u`?window.location.origin:`http://fallback.com`;function y(e){if(typeof e!=`string`)return;let t=e.toLowerCase();for(let e of pe)if(e.toLowerCase()===t)return e}function xe(e){let t=y(e);if(t)return t;throw Error(`Invalid locale: ${e}. Expected one of: ${pe.join(`, `)}`)}function b(e){return e}function Se(e,t){return new fe(e,t.href)}function Ce(){return 0}function we(e){return he}function Te(e,t){return e.exec(t.href)}var Ee=me.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);RegExp(`(?:^|;\\s*)${Ee}=([^;]*)`);function De(e){return Oe(e)}function Oe(e){let t=b(typeof e==`string`?new URL(e,be()):new URL(e.href)),n=t.pathname.replace(/^\/+/,``).split(`/`);return n.length>0&&y(n[0])&&(t.pathname=`/`+n.slice(1).join(`/`)),b(t)}var ke=-1,Ae,je;function Me(e){if(he.length===0)return;let t=typeof e==`string`?e:e.href,n=Ce();if(Ae===t&&ke===n)return je;let r=b(new URL(t,`http://example.com`)),i=De(r),a=i.href===r.href?[r]:[r,i],o;for(let e of a){for(let t of we(e))if(Te(Se(t.match,e),e)){o=t;break}if(o)break}return ke=n,Ae=t,je=o,o}function Ne(e){let t=Me(e);return t&&t.exclude!==!0&&Array.isArray(t.strategy)?t.strategy:h}var x=new Map;function Pe(e){return typeof e==`string`&&/^custom-[A-Za-z0-9_-]+$/.test(e)}function Fe(e,t){return Ie(t!==void 0&&Object.hasOwn(t,e)?t[e]:void 0)??S(e)}function Ie(e){if(e===void 0)return;for(let t of[v(),`nl`,`en`])if(Object.hasOwn(e,t)&&e[t]!==void 0)return e[t];let[t]=Object.values(e);return t}function S(e){let t=e.replace(/([A-Z])/g,` $1`).trim();return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}var C={NO_MAPPING:`NO_MAPPING`,ATTRIBUTE_NOT_FOUND:`ATTRIBUTE_NOT_FOUND`,VALUE_NOT_FOUND:`VALUE_NOT_FOUND`,PARENT_NOT_FOUND:`PARENT_NOT_FOUND`,INVALID_PARAMETER:`INVALID_PARAMETER`,SNAPSHOT_FAILED:`SNAPSHOT_FAILED`},w=class e extends Error{code;constructor(e,t){super(e),this.name=`VirtualdisplayError`,this.code=t}static valueNotFound(t,n){return new e(`Value "${n}" not found for attribute "${t}"`,C.VALUE_NOT_FOUND)}static parentNotFound(t){return new e(`Parent element not found: ${t}`,C.PARENT_NOT_FOUND)}static invalidParameter(t){return new e(t,C.INVALID_PARAMETER)}},Le=class{name;defaultValue;values;onSelect;onChangeCallback;constructor(e){this.name=e.name,this.defaultValue=e.defaultValue,this.onSelect=e.onSelect,this.values=this.createValues(e.values,e.labels)}select(e){if(!this.values.has(e))throw w.valueNotFound(this.name,e);this.onSelect(this.name,e)}getValues(){return Array.from(this.values.values())}getValue(e){return this.values.get(e)}get selected(){for(let e of this.values.values())if(e.isSelected)return e.value}onChange(e){this.onChangeCallback=e}handleResult(e){let t;for(let n of this.values.values()){let r=n.value===e;n.setSelected(r),r&&(t=n)}t!==void 0&&this.onChangeCallback!==void 0&&this.onChangeCallback(t)}createValues(e,t){let n=new Map;for(let r of e){let e=new de(r,this.name,Fe(r,t));r===this.defaultValue&&e.setSelected(!0),n.set(r,e)}return n}},Re=class{attributes=new Map;constructor(e,t,n){for(let n of e){let e=this.buildOptions(n,t);this.attributes.set(n.name,new Le(e))}this.onMutationFailed=n}onMutationFailed;get(e){return this.attributes.get(e)}getSelection(){let e={};for(let[t,n]of this.attributes){let r=n.selected;r!==void 0&&(e[t]=r)}return e}handleResults(e){for(let t of e)t.success?this.get(t.name)?.handleResult(t.value):this.onMutationFailed?.(t.name,t.value)}buildOptions(e,t){let n={name:e.name,values:e.values,...e.labels!==void 0&&{labels:e.labels},onSelect:(e,n)=>{t([{name:e,value:n}],!1)}};return e.defaultValue===void 0?n:{...n,defaultValue:e.defaultValue}}},T=4096,E=16384,ze=[1024,256,64],Be=20,D=[`timestamp`,`level`,`msg`,`service`,`trace_id`,`span_id`];function Ve(e){let t=new Date(e.timestamp).toLocaleTimeString(`en-GB`,{hour12:!1}),n=e.level.toUpperCase().padEnd(5),r=e.trace_id?.slice(0,8)??`--------`,i=e.msg,a=Object.entries(e).filter(([e])=>!D.includes(e)).map(([e,t])=>`${e}=${O(t,T).line}`).join(` `);return`${t} ${n} [${r}] ${i}${a?` `+a:``}`}function He(e){for(let t of[T,...ze]){let{line:n,truncated:r}=O(e,t);if(!r){if(n.length<=E)return n;continue}let{line:i}=O({...e,log_truncated:!0},t);if(i.length<=E)return i}let t=Object.keys(e).filter(e=>!D.includes(e)),n={...We(e,D),log_truncated:!0,log_dropped_count:t.length},r=O({...n,log_dropped_attrs:t.slice(0,Be)},T);return r.line.length<=E?r.line:O(n,T).line}function O(e,t){let n=[],r=!1;return{line:JSON.stringify(e,function(e,i){if(typeof i==`string`)return i.length>t&&(r=!0),Ue(i,t);if(typeof i==`bigint`)return i.toString();if(typeof i!=`object`||!i)return i;for(;n.length>0&&n.at(-1)!==this;)n.pop();return n.includes(i)?`[Circular]`:(n.push(i),i)}),truncated:r}}function Ue(e,t){return e.length<=t?e:`${e.slice(0,t)}...[truncated ${e.length-t} chars]`}function We(e,t){let n={};for(let r of t)e[r]!==void 0&&(n[r]=e[r]);return n}function Ge(e,t){let n=t?Ve(e):He(e);e.level===`error`?console.error(n):e.level===`warn`?console.warn(n):console.log(n)}function Ke(e,t=0){let n={name:e.name,message:e.message};return e.stack!==void 0&&(n.stack=e.stack),Je(e,n),e.cause!==void 0&&e.cause!==null&&(n.cause=e.cause instanceof Error&&t<5?Ke(e.cause,t+1):String(e.cause)),n}var qe=new Set([`name`,`message`,`stack`,`cause`]);function Je(e,t){for(let n of Object.getOwnPropertyNames(e)){if(qe.has(n))continue;let r=e[n];r!==void 0&&(t[n]=r)}}function Ye(e){let t={};for(let[n,r]of Object.entries(e))t[n]=r instanceof Error?Ke(r):r;return t}function Xe(){return new Date}function Ze(){return typeof navigator>`u`?``:navigator.userAgent}function Qe(){return typeof navigator>`u`?!1:navigator.platform===`MacIntel`&&navigator.maxTouchPoints>1}function $e(){return/iPhone|iPad|iPod/i.test(Ze())||Qe()}function et(){return/Android/i.test(Ze())}function tt(){return $e()||et()}var nt=class{config;constructor(e){this.config=e}log(e,t,n={}){let r=this.config.traceProvider?.()??{};Ge({timestamp:Xe().toISOString(),level:e,msg:t,service:this.config.service,...r,...Ye(n)},this.config.isDev)}debug(e,t){this.config.isDev&&this.log(`debug`,e,t)}info(e,t){this.log(`info`,e,t)}warn(e,t){this.log(`warn`,e,t)}error(e,t){this.log(`error`,e,t)}};function rt(e,t){return new nt({service:e,isDev:t?.isDev===void 0?typeof process<`u`?process.env.NODE_ENV!==`production`:!0:t.isDev,traceProvider:t?.traceProvider})}function k(e){if(e!==void 0)return typeof e==`object`&&e&&!Array.isArray(e)&&!(e instanceof Error)?e:e instanceof Error?{error:e.message}:{value:e}}function it(e){return{debug:(t,n)=>e.debug(t,k(n)),info:(t,n)=>e.info(t,k(n)),warn:(t,n)=>e.warn(t,k(n)),error:(t,n)=>e.error(t,k(n))}}var at=!1,A=it(rt(`client`,{isDev:!1}));function ot(){at=!0,A=it(rt(`client`,{isDev:!0}))}function st(){return at}var ct=class{send;instance;onMutationFailed;registry;pendingCallbacks=[];constructor(e,t,n){this.send=e,this.instance=t,this.onMutationFailed=n}handleMappingReceived(e){A.debug(`Initializing from server mapping`,{attributeCount:e.attributes.length}),this.registry=new Re(e.attributes,(e,t)=>this.sendMutation(e,t),this.onMutationFailed),this.replayPendingCallbacks()}handleMutationResult(e){this.registry?.handleResults(e.results)}select(e,t){this.sendMutation([{name:e,value:t}],!1)}selectTransient(e,t){this.sendMutation([{name:e,value:t}],!1,!0)}getValues(e){return this.registry?.get(e)?.getValues()??[]}getValue(e,t){return this.registry?.get(e)?.getValue(t)}onChange(e,t){if(this.registry===void 0){this.pendingCallbacks.push({name:e,callback:t});return}let n=this.registry.get(e);n===void 0?A.warn(`onChange: attribute "${e}" not found — callback will not fire`):n.onChange(t)}getAttribute(e){return this.registry?.get(e)}getSelection(){return this.registry?.getSelection()??{}}sendMutation(e,n,r=!1){let i={type:t.MUTATION,instance:this.instance,mutations:e,isInitial:n,...r&&{transient:!0}};this.send(i)}replayPendingCallbacks(){for(let{name:e,callback:t}of this.pendingCallbacks){let n=this.registry?.get(e);n===void 0&&A.warn(`onChange: attribute "${e}" not found — buffered callback will not fire`),n?.onChange(t)}this.pendingCallbacks.length=0}},lt=class{snapshot;callbacks=[];handleSnapshot(e){this.snapshot=e.attributes;for(let t of this.callbacks)t(e.attributes)}onChange(e){this.callbacks.push(e),this.snapshot!==void 0&&e(this.snapshot)}selectableFor(e){return this.snapshot?.find(t=>t.name===e)?.selectable??null}get current(){return this.snapshot??[]}},ut=class{send;commands=[];constructor(e){this.send=e}rotate(e){return this.validateFiniteNumber(e,`rotate`),this.commands.push({action:`rotate`,value:e}),this}tilt(e){return this.validateFiniteNumber(e,`tilt`),this.commands.push({action:`tilt`,value:e}),this}zoom(e){return this.validateFiniteNumber(e,`zoom`),this.commands.push({action:`zoom`,value:e}),this}set(){if(this.commands.length===0)throw w.invalidParameter(`No camera commands to execute. Call rotate(), tilt(), or zoom() before set().`);let e={type:t.CAMERA,commands:this.commands};this.send(e),this.commands=[]}validateFiniteNumber(e,t){if(!Number.isFinite(e))throw w.invalidParameter(`${t}() requires a finite number, got ${String(e)}`)}reset(){let e={type:t.CAMERA,commands:[{action:`reset`}]};this.send(e)}},dt=class{state;limitsState;changeCallbacks=[];constructor(){this.state={rotation:0,tilt:0,zoom:100}}get rotation(){return this.state.rotation}get tilt(){return this.state.tilt}get zoom(){return this.state.zoom}onChange(e){this.changeCallbacks.push(e)}get limits(){return this.limitsState}applyLimits(e){this.limitsState=e;let t={rotation:this.rotation,tilt:this.tilt,zoom:this.zoom};for(let e of this.changeCallbacks)e(t)}handlePositionUpdate(e){this.update(e.transforms)}update(e){let t=!1;for(let n of e)switch(n.type){case`rotation`:this.state.rotation=n.value,t=!0;break;case`tilt`:this.state.tilt=n.value,t=!0;break;case`zoom`:this.state.zoom=n.value,t=!0}if(t){let e={rotation:this.rotation,tilt:this.tilt,zoom:this.zoom};for(let t of this.changeCallbacks)t(e)}}};function ft(e,t){let n=e.filter(e=>pt(e,t));if(n.length===0)return;let r=Math.max(...n.map(mt)),i=n.filter(e=>mt(e)===r);return i.length===1?i[0]:void 0}function pt(e,t){return Object.entries(e.attributes).every(([e,n])=>t[e]===n)}function mt(e){return Object.keys(e.attributes).length}var ht=class{dispatchChange;dispatchSubmit;pricing;selection={};resolved;changeCallbacks=[];renderCallbacks=[];submitCallback;submitDefaultLabel;constructor(e,t){this.dispatchChange=e,this.dispatchSubmit=t}get current(){return this.resolved}get vatDisplay(){return this.pricing?.vatDisplay}get buttonLabel(){let e=this.pricing?.buttonLabel;if(e!=null&&e!==``)return e;if(this.submitDefaultLabel!==void 0&&this.submitDefaultLabel!==``)return this.submitDefaultLabel}get submittable(){return this.submitCallback===void 0?!1:this.pricing===void 0||this.resolved?.availability===`available`}get submitEnabled(){return this.submittable&&this.buttonLabel!==void 0}onChange(e){this.changeCallbacks.push(e)}onSubmit(e,t){this.submitCallback=e,this.submitDefaultLabel=t?.defaultLabel,this.notifyRender()}onRender(e){return this.renderCallbacks.push(e),()=>{let t=this.renderCallbacks.indexOf(e);t!==-1&&this.renderCallbacks.splice(t,1)}}async submit(){if(!this.submittable)return;let e=this.resolved===void 0?{attributes:{...this.selection},reference:``}:{attributes:this.resolved.attributes,reference:this.resolved.reference};this.dispatchSubmit(e),await this.submitCallback?.(e)}handlePricingReceived(e){this.pricing=e,this.recompute()}handleSelectionChanged(e){this.selection=e,this.recompute()}recompute(){this.resolved=this.resolve();for(let e of this.changeCallbacks)e(this.resolved);this.dispatchChange(this.resolved),this.notifyRender()}notifyRender(){for(let e of this.renderCallbacks)e()}resolve(){if(this.pricing===void 0)return;let e=ft(this.pricing.rules,this.selection);if(e!==void 0&&e.availability!==a.HIDDEN)return{attributes:{...this.selection},reference:e.reference,price:e.priceCents,currency:this.pricing.currency,availability:e.availability}}},gt=class{send;dispatch;instance;focused=null;attributes=[];changeCallbacks=[];constructor(e,t,n){this.send=e,this.dispatch=t,this.instance=n}get current(){return this.focused}set(e){if(typeof e!=`string`||e.length===0)throw w.invalidParameter(`set() requires a non-empty component name, got ${String(e)}`);this.send({type:t.FOCUS,instance:this.instance,action:r.FOCUS,component:e})}clear(){this.send({type:t.FOCUS,instance:this.instance,action:r.UNFOCUS})}onChange(e){this.changeCallbacks.push(e)}handleStateReceived(e){e.state===i.FOCUSED&&e.component!==void 0?(this.focused=e.component,this.attributes=e.attributes??[]):(this.focused=null,this.attributes=[]);let t=this.focused===null?null:{component:this.focused,attributes:this.attributes};for(let e of this.changeCallbacks)e(t);this.dispatch(t)}},_t=class{filename;developedCallbacks=new Set;errorCallbacks=new Set;developed=!1;failed=!1;photoData=null;constructor(e){this.filename=e}onDeveloped(e){return this.developed&&this.photoData!==null?(e(this.photoData),this):(this.developedCallbacks.add(e),this)}onError(e){return this.errorCallbacks.add(e),this}getFilename(){return this.filename}develop(e){this.developed||this.failed||(this.photoData=e,this.developed=!0,this.developedCallbacks.forEach(e=>{e(this.photoData)}),this.developedCallbacks.clear(),this.errorCallbacks.clear())}fail(e){this.developed||this.failed||(this.failed=!0,this.errorCallbacks.forEach(t=>{t(e)}),this.developedCallbacks.clear(),this.errorCallbacks.clear())}},vt=3e4,yt=class{send;validExtensions=[`.png`];pendingPhotos=new Map;constructor(e){this.send=e}take(e){return this.request(e,void 0)}takeOf(e,t){return this.request(e,t)}request(e,n){this.validateFilename(e),A.debug(`Taking snapshot`,{filename:e});let r=new _t(e),i=setTimeout(()=>{this.pendingPhotos.delete(e),A.warn(`Snapshot timed out`,{filename:e}),r.fail(new w(`Snapshot timed out: the viewer did not respond within ${vt}ms`,C.SNAPSHOT_FAILED))},vt);return this.pendingPhotos.set(e,{photo:r,timeout:i}),this.send({type:t.SNAPSHOT,filename:e,...n!==void 0&&{subject:n}}),r}handleSnapshotResult(e){let t=this.pendingPhotos.get(e.filename);if(t===void 0){A.warn(`No pending photo found for filename`,{filename:e.filename,pendingFilenames:Array.from(this.pendingPhotos.keys())});return}clearTimeout(t.timeout),this.pendingPhotos.delete(e.filename);let{photo:n}=t;e.error===void 0?e.data!==void 0&&n.develop({filename:e.filename,data:e.data}):n.fail(new w(e.error,C.SNAPSHOT_FAILED))}clear(){if(this.pendingPhotos.size===0)return;let e=new w(`Client destroyed before snapshot completed`,C.SNAPSHOT_FAILED);for(let{photo:t,timeout:n}of this.pendingPhotos.values())clearTimeout(n),t.fail(e);this.pendingPhotos.clear()}validateFilename(e){if(e===``||typeof e!=`string`)throw new w(`Filename must be a non-empty string`,C.INVALID_PARAMETER);if(!this.validExtensions.some(t=>e.toLowerCase().endsWith(t)))throw new w(`Invalid filename: "${e}". Filename must end with one of: ${this.validExtensions.join(`, `)}`,C.INVALID_PARAMETER);if(e.includes(`..`)||e.includes(`/`)||e.includes(`\\`))throw new w(`Filename cannot contain path separators or ".."`,C.INVALID_PARAMETER)}},bt=class{container=null;attach(e){this.container=e}dispatch(e,t,n=!1){let r=new CustomEvent(e,{detail:t,cancelable:n});return this.container?.dispatchEvent(r),r}on(e,t){let n=e=>{let n=e;t({...n.detail,preventDefault:()=>{n.preventDefault()}})};return this.container?.addEventListener(e,n),()=>{this.container?.removeEventListener(e,n)}}},xt=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Bezig…`:n===`de`?`Läuft…`:`Working…`}),St=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Mislukt`:n===`de`?`Fehlgeschlagen`:`Failed`}),Ct=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Gelukt`:n===`de`?`Fertig`:`Done`}),wt=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Annotaties`:n===`de`?`Anmerkungen`:`Annotations`}),Tt=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`AR activeren`:n===`de`?`AR aktivieren`:`Activate AR`}),Et=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Camera resetten`:n===`de`?`Kamera zurücksetzen`:`Reset camera`}),Dt=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Naar links draaien`:n===`de`?`Nach links drehen`:`Rotate left`}),Ot=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Naar rechts draaien`:n===`de`?`Nach rechts drehen`:`Rotate right`}),kt=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Omlaag kantelen`:n===`de`?`Nach unten kippen`:`Tilt down`}),At=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Omhoog kantelen`:n===`de`?`Nach oben kippen`:`Tilt up`}),jt=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Inzoomen`:n===`de`?`Hineinzoomen`:`Zoom in`}),Mt=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Uitzoomen`:n===`de`?`Herauszoomen`:`Zoom out`}),Nt=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Sluiten`:n===`de`?`Schließen`:`Close`}),Pt=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Configureren`:n===`de`?`Konfigurieren`:`Configure`}),Ft=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Volledig scherm`:n===`de`?`Vollbild`:`Fullscreen`}),It=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Sluiten`:n===`de`?`Schließen`:`Close`}),Lt=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`QR-code`:n===`de`?`QR-Code`:`QR code`}),Rt=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Gebruik de camera van je smartphone om deze QR-code te scannen`:n===`de`?`Verwende die Kamera deines Smartphones, um diesen QR-Code zu scannen`:`Use your smartphone camera to scan this QR code`}),zt=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Je telefoon opent het 3D-model in AR-modus.`:n===`de`?`Dein Telefon öffnet das 3D-Modell im AR-Modus.`:`Your phone will open the 3D model in AR mode.`}),Bt=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Scan om in AR te bekijken`:n===`de`?`Scannen für AR-Ansicht`:`Scan to view in AR`}),Vt=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`We kunnen de QR-code nu niet tonen. Open deze link op je telefoon:`:n===`de`?`Wir können den QR-Code gerade nicht anzeigen. Öffne diesen Link auf deinem Handy:`:`We can't show the QR code right now. Open this link on your phone:`}),Ht=((e={},t={})=>(t.locale??v(),`Screenshot`)),Ut=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Downloaden`:n===`de`?`Herunterladen`:`Downloading`}),Wt=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Laden mislukt. Ververs de pagina om het opnieuw te proberen.`:n===`de`?`Laden fehlgeschlagen. Lade die Seite neu, um es erneut zu versuchen.`:`Load failed. Refresh the page to try again.`}),Gt={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},Kt=([e,t,n])=>{let r=document.createElementNS(`http://www.w3.org/2000/svg`,e);return Object.keys(t).forEach(e=>{r.setAttribute(e,String(t[e]))}),n?.length&&n.forEach(e=>{let t=Kt(e);r.appendChild(t)}),r},qt=(e,t={})=>Kt([`svg`,{...Gt,...t},e]),Jt=[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`}],[`path`,{d:`M12 22V12`}]],Yt=[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`}],[`circle`,{cx:`12`,cy:`13`,r:`3`}]],Xt=[[`path`,{d:`m6 9 6 6 6-6`}]],Zt=[[`path`,{d:`m15 18-6-6 6-6`}]],Qt=[[`path`,{d:`m9 18 6-6-6-6`}]],$t=[[`path`,{d:`m18 15-6-6-6 6`}]],en=[[`path`,{d:`M12.75 7.09a3 3 0 0 1 2.16 2.16`}],[`path`,{d:`M17.072 17.072c-1.634 2.17-3.527 3.912-4.471 4.727a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 1.432-4.568`}],[`path`,{d:`m2 2 20 20`}],[`path`,{d:`M8.475 2.818A8 8 0 0 1 20 10c0 1.183-.31 2.377-.81 3.533`}],[`path`,{d:`M9.13 9.13a3 3 0 0 0 3.74 3.74`}]],tn=[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`}],[`circle`,{cx:`12`,cy:`10`,r:`3`}]],nn=[[`path`,{d:`M15 3h6v6`}],[`path`,{d:`m21 3-7 7`}],[`path`,{d:`m3 21 7-7`}],[`path`,{d:`M9 21H3v-6`}]],rn=[[`path`,{d:`m14 10 7-7`}],[`path`,{d:`M20 10h-6V4`}],[`path`,{d:`m3 21 7-7`}],[`path`,{d:`M4 14h6v6`}]],an=[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`}],[`path`,{d:`M3 3v5h5`}]],on=[[`path`,{d:`M10 5H3`}],[`path`,{d:`M12 19H3`}],[`path`,{d:`M14 3v4`}],[`path`,{d:`M16 17v4`}],[`path`,{d:`M21 12h-9`}],[`path`,{d:`M21 19h-5`}],[`path`,{d:`M21 5h-7`}],[`path`,{d:`M8 10v4`}],[`path`,{d:`M8 12H3`}]],sn=[[`path`,{d:`M18 6 6 18`}],[`path`,{d:`m6 6 12 12`}]],cn=[[`circle`,{cx:`11`,cy:`11`,r:`8`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`}]],ln=[[`circle`,{cx:`11`,cy:`11`,r:`8`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`}]];function j(e,{size:t=20,strokeWidth:n=1.75}={}){return qt(e,{width:t,height:t,"stroke-width":n})}var M={ar:e=>j(Jt,e),annotations:e=>j(tn,e),annotationsOff:e=>j(en,e),fullscreen:e=>j(nn,e),exitFullscreen:e=>j(rn,e),screenshot:e=>j(Yt,e),tiltUp:e=>j($t,e),tiltDown:e=>j(Xt,e),rotateLeft:e=>j(Zt,e),rotateRight:e=>j(Qt,e),zoomIn:e=>j(cn,e),zoomOut:e=>j(ln,e),reset:e=>j(an,e),configurator:e=>j(on,e),close:e=>j(sn,e)},N=class{element;constructor({variant:e=`default`,size:t=`default`,label:n,icon:r,onClick:i,disabled:a=!1}={}){this.element=document.createElement(`button`),this.element.className=`ui-btn ui-btn--${e} ui-btn--size-${t}`,n!==void 0&&(this.element.setAttribute(`aria-label`,n),this.element.title=n),r===void 0?n!==void 0&&(this.element.textContent=n):this.element.appendChild(r),i&&this.element.addEventListener(`click`,i),this.element.disabled=a}setIcon(e){let t=this.element.querySelector(`svg`);t===null?this.element.appendChild(e):t.replaceWith(e)}},un=class{element;selectCallback=null;constructor(e,t,n){this.element=document.createElement(`div`),this.element.className=`ui-toggle-group`;for(let r=0;r<e.length;r++){let i=e[r],a=document.createElement(`button`);a.className=`ui-toggle-group-item`,a.dataset.value=i,a.textContent=n?.[r]??i,a.dataset.state=i===t?`on`:`off`,a.setAttribute(`aria-pressed`,i===t?`true`:`false`),a.addEventListener(`click`,()=>{this.selectCallback?.(i)}),this.element.appendChild(a)}}setSelected(e){for(let t of this.element.querySelectorAll(`.ui-toggle-group-item`)){let n=t.dataset.value===e;t.dataset.state=n?`on`:`off`,t.setAttribute(`aria-pressed`,n?`true`:`false`)}}onSelect(e){this.selectCallback=e}setEnabled(e){for(let t of this.element.querySelectorAll(`.ui-toggle-group-item`)){let n=e===null||e.includes(t.dataset.value??``);t.disabled=!n,t.setAttribute(`aria-disabled`,n?`false`:`true`)}}},dn=class{element;select;constructor(e,t,n,r,i){this.select=document.createElement(`select`),this.select.className=`ui-native-select`,this.select.dataset.name=e,this.select.setAttribute(`aria-label`,n);let a=document.createElement(`option`);a.value=``,a.disabled=!0,a.textContent=n,this.select.appendChild(a);let o=!1;for(let e=0;e<t.length;e++){let n=t[e],a=document.createElement(`option`);a.value=n,a.textContent=i?.[e]??n,n===r&&(a.selected=!0,o=!0),this.select.appendChild(a)}o||(a.selected=!0);let s=qt(Xt,{width:16,height:16,"stroke-width":2});s.classList.add(`ui-native-select-icon`),this.element=document.createElement(`div`),this.element.className=`ui-native-select-wrap`,this.element.appendChild(this.select),this.element.appendChild(s)}setSelected(e){this.select.value=e}onSelect(e){this.select.addEventListener(`change`,()=>{e(this.select.value)})}setEnabled(e){for(let t of this.select.options)t.value!==``&&(t.disabled=e!==null&&!e.includes(t.value))}},fn=class{element;input;valueText;values;options;selectCallback=null;settleCallback=null;constructor(e,t){if(e.length===0)throw Error(`Virtualdisplay: Slider needs at least one value`);this.values=e,this.options=t,this.input=document.createElement(`input`),this.input.type=`range`,this.input.className=`ui-slider-input`,this.input.min=`0`,this.input.max=String(e.length-1),this.input.step=`1`,this.input.setAttribute(`aria-label`,t.label),this.valueText=document.createElement(`span`),this.valueText.className=`ui-slider-value`,this.valueText.setAttribute(`aria-hidden`,`true`);let n=document.createElement(`div`);n.className=`ui-slider-track`,n.appendChild(this.input),n.appendChild(this.buildEnds()),this.element=document.createElement(`div`),this.element.className=`ui-slider`,this.element.appendChild(n),this.element.appendChild(this.valueText);let r=t.initialSelected===void 0?0:e.indexOf(t.initialSelected);this.applyIndex(r===-1?0:r),this.listen()}setSelected(e){let t=this.values.indexOf(e);t!==-1&&this.applyIndex(t)}onSelect(e){this.selectCallback=e}onSettle(e){this.settleCallback=e}listen(){this.input.addEventListener(`input`,()=>{let e=this.values[this.currentIndex];e!==void 0&&(this.applyIndex(this.currentIndex),this.selectCallback?.(e))}),this.input.addEventListener(`change`,()=>{let e=this.values[this.currentIndex];e!==void 0&&this.settleCallback?.(e)})}get currentIndex(){return Number(this.input.value)}applyIndex(e){this.input.value=String(e);let t=this.displayAt(e);this.valueText.textContent=t,this.input.setAttribute(`aria-valuetext`,t);let n=this.values.length===1?100:e/(this.values.length-1)*100;this.element.style.setProperty(`--ui-slider-pct`,`${n}%`)}buildEnds(){let e=document.createElement(`div`);e.className=`ui-slider-ends`,e.setAttribute(`aria-hidden`,`true`);for(let t of[0,this.values.length-1]){let n=document.createElement(`span`);n.textContent=this.labelAt(t),e.appendChild(n)}return e}labelAt(e){return this.options.labels?.[e]??this.values[e]??``}displayAt(e){let t=this.labelAt(e);return this.options.unit===void 0?t:`${t} ${this.options.unit}`}},P={neutral:{50:`oklch(98.5% 0 0)`,100:`oklch(96.5% 0 0)`,200:`oklch(92% 0 0)`,300:`oklch(82% 0 0)`,400:`oklch(70% 0 0)`,500:`oklch(55.5% 0 0)`,600:`oklch(44.5% 0 0)`,700:`oklch(37% 0 0)`,800:`oklch(27% 0 0)`,900:`oklch(21% 0 0)`,950:`oklch(14.5% 0 0)`},white:`oklch(100% 0 0)`,semantic:{error:`oklch(47% 0.17 25)`}},F={px:`1px`,0:`0`,.5:`0.125rem`,1:`0.25rem`,1.5:`0.375rem`,2:`0.5rem`,2.5:`0.625rem`,3:`0.75rem`,3.5:`0.875rem`,4:`1rem`,5:`1.25rem`,6:`1.5rem`,7:`1.75rem`,8:`2rem`,9:`2.25rem`,10:`2.5rem`,12:`3rem`,14:`3.5rem`,16:`4rem`,20:`5rem`,24:`6rem`},I={fontFamily:{sans:[`Mona Sans`,`ui-sans-serif`,`system-ui`,`sans-serif`,`Apple Color Emoji`,`Segoe UI Emoji`,`Segoe UI Symbol`,`Noto Color Emoji`],mono:[`JetBrains Mono`,`ui-monospace`,`monospace`]},fontSize:{xs:`0.75rem`,sm:`0.875rem`,base:`1rem`,lg:`1.125rem`,xl:`1.25rem`,"2xl":`1.5rem`,"3xl":`1.875rem`,"4xl":`2.25rem`},fontWeight:{normal:`400`,medium:`500`,semibold:`600`,bold:`700`},lineHeight:{tight:`1.25`,normal:`1.5`,relaxed:`1.75`}},pn=class{element;constructor(){this.element=document.createElement(`div`),Object.assign(this.element.style,{background:P.white,borderRadius:`var(--radius)`,padding:F[6],boxShadow:`0 ${F[2]} ${F[8]} oklch(0% 0 0 / 20%)`,maxWidth:`20rem`,width:`100%`})}},mn=class{options;card;backdrop;keyHandler=null;constructor(e={}){this.options=e,this.card=new pn,this.backdrop=this.createBackdrop(),this.backdrop.appendChild(this.card.element)}get content(){return this.card.element}open(){document.body.appendChild(this.backdrop),this.keyHandler=e=>{e.key===`Escape`&&this.close()},document.addEventListener(`keydown`,this.keyHandler)}close(){this.backdrop.remove(),this.keyHandler!==null&&(document.removeEventListener(`keydown`,this.keyHandler),this.keyHandler=null),this.options.onClose?.()}createBackdrop(){let e=document.createElement(`div`);return Object.assign(e.style,{position:`fixed`,inset:F[0],background:`oklch(0% 0 0 / 50%)`,zIndex:`9999`,display:`flex`,alignItems:`center`,justifyContent:`center`}),e.addEventListener(`click`,t=>{t.target===e&&this.close()}),e}},L=I.fontFamily.sans.join(`, `),hn=`
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-5iZMYShA.cjs");var t={HANDSHAKE:`handshake`,SESSION:`session`,MUTATION:`mutation`,STATE:`state`,LOADING_INDICATOR:`loading_indicator`,CAMERA:`camera`,SNAPSHOT:`snapshot`,MAPPING:`mapping`,AR_ACTIVATE:`ar_activate`,FULLSCREEN:`fullscreen`,CONFIG:`config`,ANNOTATION_TOGGLE:`annotation_toggle`,FOCUS:`focus`,PRICING:`pricing`,QR_SHOWN:`qr_shown`,SYNC:`sync`,SELECTABLE:`selectable`,APP_RESOLVED:`app_resolved`},n=`main`,r={FOCUS:`focus`,UNFOCUS:`unfocus`},i={FOCUSED:`focused`,UNFOCUSED:`unfocused`},a={AVAILABLE:`available`,VIEW_ONLY:`view_only`,HIDDEN:`hidden`};function o(e){return typeof e!=`object`||!e?null:e}var s=new Set(Object.values(t));function c(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.target!=`string`&&typeof t.type==`string`&&s.has(t.type)}function l(e){let n=o(e);return n!==null&&n.type===t.HANDSHAKE}function u(e){let n=o(e);return n!==null&&n.type===t.SESSION&&typeof n.sessionId==`string`}function ee(e){let n=o(e);return n!==null&&n.type===t.APP_RESOLVED&&typeof n.appType==`string`&&n.appType!==``&&typeof n.name==`string`}function d(e){let n=o(e);return n!==null&&n.type===t.MUTATION&&typeof n.instance==`string`&&n.instance!==``&&Array.isArray(n.results)}function f(e){let n=o(e);return n!==null&&n.type===t.SNAPSHOT&&(`data`in n||`error`in n)}function p(e){let n=o(e);return n!==null&&n.type===t.CAMERA&&Array.isArray(n.transforms)}function te(e){let n=o(e);return n!==null&&n.type===t.MAPPING&&typeof n.instance==`string`&&n.instance!==``&&Array.isArray(n.attributes)}function ne(e){let n=o(e);return n!==null&&n.type===t.LOADING_INDICATOR&&typeof n.progress==`number`}function m(e){let n=o(e);return n!==null&&n.type===t.SYNC&&typeof n.connected==`boolean`}function re(e){let n=o(e);return n!==null&&n.type===t.SELECTABLE&&typeof n.instance==`string`&&n.instance!==``&&Array.isArray(n.attributes)}function ie(e){let n=o(e);return n!==null&&n.type===t.CONFIG&&typeof n.viewerSettings==`object`}function ae(e){let n=o(e);return n!==null&&n.type===t.FOCUS&&typeof n.instance==`string`&&n.instance!==``&&typeof n.state==`string`}function oe(e){let n=o(e);return n!==null&&n.type===t.PRICING&&typeof n.instance==`string`&&n.instance!==``&&typeof n.pricing==`object`&&n.pricing!==null}var se=class{processor;pending=[];isReady=!1;constructor(e){this.processor=e}enqueue(e){this.isReady?this.processor(e):this.pending.push(e)}markReady(){if(this.isReady||(this.isReady=!0,this.pending.length===0))return;let e=[...this.pending];this.pending.length=0;for(let t of e)this.processor(t)}hasPending(e){return this.pending.some(t=>t.type===e)}clear(){this.pending.length=0}},ce=class{getTarget;handlers=new Map;publisher;consumer;listener=null;sourceId;targetOrigin;isValid;onHandlerError;constructor(e,t){this.getTarget=e,this.sourceId=`vd-${Math.random().toString(36).slice(2,8)}`,this.targetOrigin=`*`,this.isValid=t?.isValid??c,this.onHandlerError=t?.onHandlerError??le,this.publisher=new se(e=>this.post(e)),this.consumer=new se(e=>this.routeToHandler(e)),t?.bufferIncoming!==!0&&this.consumer.markReady()}on(e,t){this.handlers.set(e,t)}setTargetOrigin(e){this.targetOrigin=e}send(e){this.publisher.enqueue(e)}receive(e){this.isValid(e)&&this.consumer.enqueue(e)}markReady(){this.publisher.markReady()}markConsumerReady(){this.consumer.markReady()}consumerHasPending(e){return this.consumer.hasPending(e)}start(){this.listener===null&&(this.listener=e=>{let{data:t}=e;if(!this.isValid(t)||t._source===this.sourceId)return;let n=this.getTarget();if(n!==null&&e.source!==null&&e.source!==n)return;let r=t;this.consumer.enqueue(r)},window.addEventListener(`message`,this.listener))}destroy(){this.listener!==null&&(window.removeEventListener(`message`,this.listener),this.listener=null),this.publisher.clear(),this.consumer.clear(),this.handlers.clear()}post(e){let t=this.getTarget();t!==null&&t.postMessage({...e,_source:this.sourceId},this.targetOrigin)}routeToHandler(e){let t=this.handlers.get(e.type);if(t===void 0)return;let n;try{n=t(e)}catch(t){this.onHandlerError(e,t);return}n instanceof Promise&&n.catch(t=>{this.onHandlerError(e,t)})}};function le(e,t){let n=t instanceof Error?t.message:String(t);console.error(`Virtualdisplay: error handling ${e.type}: ${n}`)}t.CAMERA,t.LOADING_INDICATOR;var ue=class{send;instance;constructor(e,t){this.send=e,this.instance=t}setEnabled(e){this.send({type:t.ANNOTATION_TOGGLE,instance:this.instance,enabled:e})}},de=class{value;attribute;label;isSelectedValue=!1;constructor(e,t,n){this.value=e,this.attribute=t,this.label=n}get isSelected(){return this.isSelectedValue}setSelected(e){this.isSelectedValue=e}},fe={},pe=[`en`,`nl`,`de`],me=`PARAGLIDE_LOCALE`,h=[`globalVariable`,`baseLocale`],he=[],g=typeof window>`u`;globalThis.__paraglide=globalThis.__paraglide??{},globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};var _,ge=!1,v=()=>{let e=h;!g&&typeof window<`u`&&window.location?.href&&(e=Ne(window.location.href));let t=_e(e,typeof window<`u`?window.location?.href:void 0);if(t)return ge||(_=t,ge=!0,ye(t,{reload:!1})),t;throw Error(`No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found`)};function _e(e,t){let n;for(let t of e){if(t===`baseLocale`)n=`en`;else if(t===`globalVariable`&&_!==void 0)n=_;else if(Pe(t)&&x.has(t)){let e=x.get(t);if(e){let t=e.getLocale();if(t instanceof Promise)continue;if(t!==void 0)return xe(t)}}let e=y(n);if(e)return e}}var ve=e=>{e?window.location.href=e:window.location.reload()},ye=(e,t)=>{let n={reload:!0,...t},r;try{r=v()}catch{}let i=[],a=h;!g&&typeof window<`u`&&window.location?.href&&(a=Ne(window.location.href));for(let t of a)if(t===`globalVariable`)_=e;else if(t===`baseLocale`)continue;else if(Pe(t)&&x.has(t)){let n=x.get(t);if(n){let r=n.setLocale(e);r instanceof Promise&&(r=r.catch(e=>{throw Error(`Custom strategy "${t}" setLocale failed.`,{cause:e})}),i.push(r))}}let o=()=>{!g&&n.reload&&window.location&&e!==r&&ve(void 0)};if(i.length)return Promise.all(i).then(()=>{o()});o()},be=()=>typeof window<`u`?window.location.origin:`http://fallback.com`;function y(e){if(typeof e!=`string`)return;let t=e.toLowerCase();for(let e of pe)if(e.toLowerCase()===t)return e}function xe(e){let t=y(e);if(t)return t;throw Error(`Invalid locale: ${e}. Expected one of: ${pe.join(`, `)}`)}function b(e){return e}function Se(e,t){return new fe(e,t.href)}function Ce(){return 0}function we(e){return he}function Te(e,t){return e.exec(t.href)}var Ee=me.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);RegExp(`(?:^|;\\s*)${Ee}=([^;]*)`);function De(e){return Oe(e)}function Oe(e){let t=b(typeof e==`string`?new URL(e,be()):new URL(e.href)),n=t.pathname.replace(/^\/+/,``).split(`/`);return n.length>0&&y(n[0])&&(t.pathname=`/`+n.slice(1).join(`/`)),b(t)}var ke=-1,Ae,je;function Me(e){if(he.length===0)return;let t=typeof e==`string`?e:e.href,n=Ce();if(Ae===t&&ke===n)return je;let r=b(new URL(t,`http://example.com`)),i=De(r),a=i.href===r.href?[r]:[r,i],o;for(let e of a){for(let t of we(e))if(Te(Se(t.match,e),e)){o=t;break}if(o)break}return ke=n,Ae=t,je=o,o}function Ne(e){let t=Me(e);return t&&t.exclude!==!0&&Array.isArray(t.strategy)?t.strategy:h}var x=new Map;function Pe(e){return typeof e==`string`&&/^custom-[A-Za-z0-9_-]+$/.test(e)}function Fe(e,t){return Ie(t!==void 0&&Object.hasOwn(t,e)?t[e]:void 0)??S(e)}function Ie(e){if(e===void 0)return;for(let t of[v(),`nl`,`en`])if(Object.hasOwn(e,t)&&e[t]!==void 0)return e[t];let[t]=Object.values(e);return t}function S(e){let t=e.replace(/([A-Z])/g,` $1`).trim();return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}var C={NO_MAPPING:`NO_MAPPING`,ATTRIBUTE_NOT_FOUND:`ATTRIBUTE_NOT_FOUND`,VALUE_NOT_FOUND:`VALUE_NOT_FOUND`,PARENT_NOT_FOUND:`PARENT_NOT_FOUND`,INVALID_PARAMETER:`INVALID_PARAMETER`,SNAPSHOT_FAILED:`SNAPSHOT_FAILED`},w=class e extends Error{code;constructor(e,t){super(e),this.name=`VirtualdisplayError`,this.code=t}static valueNotFound(t,n){return new e(`Value "${n}" not found for attribute "${t}"`,C.VALUE_NOT_FOUND)}static parentNotFound(t){return new e(`Parent element not found: ${t}`,C.PARENT_NOT_FOUND)}static invalidParameter(t){return new e(t,C.INVALID_PARAMETER)}},Le=class{name;defaultValue;values;onSelect;onChangeCallback;constructor(e){this.name=e.name,this.defaultValue=e.defaultValue,this.onSelect=e.onSelect,this.values=this.createValues(e.values,e.labels)}select(e){if(!this.values.has(e))throw w.valueNotFound(this.name,e);this.onSelect(this.name,e)}getValues(){return Array.from(this.values.values())}getValue(e){return this.values.get(e)}get selected(){for(let e of this.values.values())if(e.isSelected)return e.value}onChange(e){this.onChangeCallback=e}handleResult(e){let t;for(let n of this.values.values()){let r=n.value===e;n.setSelected(r),r&&(t=n)}t!==void 0&&this.onChangeCallback!==void 0&&this.onChangeCallback(t)}createValues(e,t){let n=new Map;for(let r of e){let e=new de(r,this.name,Fe(r,t));r===this.defaultValue&&e.setSelected(!0),n.set(r,e)}return n}},Re=class{attributes=new Map;constructor(e,t,n){for(let n of e){let e=this.buildOptions(n,t);this.attributes.set(n.name,new Le(e))}this.onMutationFailed=n}onMutationFailed;get(e){return this.attributes.get(e)}getSelection(){let e={};for(let[t,n]of this.attributes){let r=n.selected;r!==void 0&&(e[t]=r)}return e}handleResults(e){for(let t of e)t.success?this.get(t.name)?.handleResult(t.value):this.onMutationFailed?.(t.name,t.value)}buildOptions(e,t){let n={name:e.name,values:e.values,...e.labels!==void 0&&{labels:e.labels},onSelect:(e,n)=>{t([{name:e,value:n}],!1)}};return e.defaultValue===void 0?n:{...n,defaultValue:e.defaultValue}}},T=4096,E=16384,ze=[1024,256,64],Be=20,D=[`timestamp`,`level`,`msg`,`service`,`trace_id`,`span_id`];function Ve(e){let t=new Date(e.timestamp).toLocaleTimeString(`en-GB`,{hour12:!1}),n=e.level.toUpperCase().padEnd(5),r=e.trace_id?.slice(0,8)??`--------`,i=e.msg,a=Object.entries(e).filter(([e])=>!D.includes(e)).map(([e,t])=>`${e}=${O(t,T).line}`).join(` `);return`${t} ${n} [${r}] ${i}${a?` `+a:``}`}function He(e){for(let t of[T,...ze]){let{line:n,truncated:r}=O(e,t);if(!r){if(n.length<=E)return n;continue}let{line:i}=O({...e,log_truncated:!0},t);if(i.length<=E)return i}let t=Object.keys(e).filter(e=>!D.includes(e)),n={...We(e,D),log_truncated:!0,log_dropped_count:t.length},r=O({...n,log_dropped_attrs:t.slice(0,Be)},T);return r.line.length<=E?r.line:O(n,T).line}function O(e,t){let n=[],r=!1;return{line:JSON.stringify(e,function(e,i){if(typeof i==`string`)return i.length>t&&(r=!0),Ue(i,t);if(typeof i==`bigint`)return i.toString();if(typeof i!=`object`||!i)return i;for(;n.length>0&&n.at(-1)!==this;)n.pop();return n.includes(i)?`[Circular]`:(n.push(i),i)}),truncated:r}}function Ue(e,t){return e.length<=t?e:`${e.slice(0,t)}...[truncated ${e.length-t} chars]`}function We(e,t){let n={};for(let r of t)e[r]!==void 0&&(n[r]=e[r]);return n}function Ge(e,t){let n=t?Ve(e):He(e);e.level===`error`?console.error(n):e.level===`warn`?console.warn(n):console.log(n)}function Ke(e,t=0){let n={name:e.name,message:e.message};return e.stack!==void 0&&(n.stack=e.stack),Je(e,n),e.cause!==void 0&&e.cause!==null&&(n.cause=e.cause instanceof Error&&t<5?Ke(e.cause,t+1):String(e.cause)),n}var qe=new Set([`name`,`message`,`stack`,`cause`]);function Je(e,t){for(let n of Object.getOwnPropertyNames(e)){if(qe.has(n))continue;let r=e[n];r!==void 0&&(t[n]=r)}}function Ye(e){let t={};for(let[n,r]of Object.entries(e))t[n]=r instanceof Error?Ke(r):r;return t}function Xe(){return new Date}function Ze(){return typeof navigator>`u`?``:navigator.userAgent}function Qe(){return typeof navigator>`u`?!1:navigator.platform===`MacIntel`&&navigator.maxTouchPoints>1}function $e(){return/iPhone|iPad|iPod/i.test(Ze())||Qe()}function et(){return/Android/i.test(Ze())}function tt(){return $e()||et()}var nt=class{config;constructor(e){this.config=e}log(e,t,n={}){let r=this.config.traceProvider?.()??{};Ge({timestamp:Xe().toISOString(),level:e,msg:t,service:this.config.service,...r,...Ye(n)},this.config.isDev)}debug(e,t){this.config.isDev&&this.log(`debug`,e,t)}info(e,t){this.log(`info`,e,t)}warn(e,t){this.log(`warn`,e,t)}error(e,t){this.log(`error`,e,t)}};function rt(e,t){return new nt({service:e,isDev:t?.isDev===void 0?typeof process<`u`?process.env.NODE_ENV!==`production`:!0:t.isDev,traceProvider:t?.traceProvider})}function k(e){if(e!==void 0)return typeof e==`object`&&e&&!Array.isArray(e)&&!(e instanceof Error)?e:e instanceof Error?{error:e.message}:{value:e}}function it(e){return{debug:(t,n)=>e.debug(t,k(n)),info:(t,n)=>e.info(t,k(n)),warn:(t,n)=>e.warn(t,k(n)),error:(t,n)=>e.error(t,k(n))}}var at=!1,A=it(rt(`client`,{isDev:!1}));function ot(){at=!0,A=it(rt(`client`,{isDev:!0}))}function st(){return at}var ct=class{send;instance;onMutationFailed;registry;pendingCallbacks=[];constructor(e,t,n){this.send=e,this.instance=t,this.onMutationFailed=n}handleMappingReceived(e){A.debug(`Initializing from server mapping`,{attributeCount:e.attributes.length}),this.registry=new Re(e.attributes,(e,t)=>this.sendMutation(e,t),this.onMutationFailed),this.replayPendingCallbacks()}handleMutationResult(e){this.registry?.handleResults(e.results)}select(e,t){this.sendMutation([{name:e,value:t}],!1)}selectTransient(e,t){this.sendMutation([{name:e,value:t}],!1,!0)}getValues(e){return this.registry?.get(e)?.getValues()??[]}getValue(e,t){return this.registry?.get(e)?.getValue(t)}onChange(e,t){if(this.registry===void 0){this.pendingCallbacks.push({name:e,callback:t});return}let n=this.registry.get(e);n===void 0?A.warn(`onChange: attribute "${e}" not found — callback will not fire`):n.onChange(t)}getAttribute(e){return this.registry?.get(e)}getSelection(){return this.registry?.getSelection()??{}}sendMutation(e,n,r=!1){let i={type:t.MUTATION,instance:this.instance,mutations:e,isInitial:n,...r&&{transient:!0}};this.send(i)}replayPendingCallbacks(){for(let{name:e,callback:t}of this.pendingCallbacks){let n=this.registry?.get(e);n===void 0&&A.warn(`onChange: attribute "${e}" not found — buffered callback will not fire`),n?.onChange(t)}this.pendingCallbacks.length=0}},lt=class{snapshot;callbacks=[];handleSnapshot(e){this.snapshot=e.attributes;for(let t of this.callbacks)t(e.attributes)}onChange(e){this.callbacks.push(e),this.snapshot!==void 0&&e(this.snapshot)}selectableFor(e){return this.snapshot?.find(t=>t.name===e)?.selectable??null}get current(){return this.snapshot??[]}},ut=class{send;commands=[];constructor(e){this.send=e}rotate(e){return this.validateFiniteNumber(e,`rotate`),this.commands.push({action:`rotate`,value:e}),this}tilt(e){return this.validateFiniteNumber(e,`tilt`),this.commands.push({action:`tilt`,value:e}),this}zoom(e){return this.validateFiniteNumber(e,`zoom`),this.commands.push({action:`zoom`,value:e}),this}set(){if(this.commands.length===0)throw w.invalidParameter(`No camera commands to execute. Call rotate(), tilt(), or zoom() before set().`);let e={type:t.CAMERA,commands:this.commands};this.send(e),this.commands=[]}validateFiniteNumber(e,t){if(!Number.isFinite(e))throw w.invalidParameter(`${t}() requires a finite number, got ${String(e)}`)}reset(){let e={type:t.CAMERA,commands:[{action:`reset`}]};this.send(e)}},dt=class{state;limitsState;changeCallbacks=[];constructor(){this.state={rotation:0,tilt:0,zoom:100}}get rotation(){return this.state.rotation}get tilt(){return this.state.tilt}get zoom(){return this.state.zoom}onChange(e){this.changeCallbacks.push(e)}get limits(){return this.limitsState}applyLimits(e){this.limitsState=e;let t={rotation:this.rotation,tilt:this.tilt,zoom:this.zoom};for(let e of this.changeCallbacks)e(t)}handlePositionUpdate(e){this.update(e.transforms)}update(e){let t=!1;for(let n of e)switch(n.type){case`rotation`:this.state.rotation=n.value,t=!0;break;case`tilt`:this.state.tilt=n.value,t=!0;break;case`zoom`:this.state.zoom=n.value,t=!0}if(t){let e={rotation:this.rotation,tilt:this.tilt,zoom:this.zoom};for(let t of this.changeCallbacks)t(e)}}};function ft(e,t){let n=e.filter(e=>pt(e,t));if(n.length===0)return;let r=Math.max(...n.map(mt)),i=n.filter(e=>mt(e)===r);return i.length===1?i[0]:void 0}function pt(e,t){return Object.entries(e.attributes).every(([e,n])=>t[e]===n)}function mt(e){return Object.keys(e.attributes).length}var ht=class{dispatchChange;dispatchSubmit;pricing;selection={};resolved;changeCallbacks=[];renderCallbacks=[];submitCallback;submitDefaultLabel;constructor(e,t){this.dispatchChange=e,this.dispatchSubmit=t}get current(){return this.resolved}get vatDisplay(){return this.pricing?.vatDisplay}get buttonLabel(){let e=this.pricing?.buttonLabel;if(e!=null&&e!==``)return e;if(this.submitDefaultLabel!==void 0&&this.submitDefaultLabel!==``)return this.submitDefaultLabel}get submittable(){return this.submitCallback===void 0?!1:this.pricing===void 0||this.resolved?.availability===`available`}get submitEnabled(){return this.submittable&&this.buttonLabel!==void 0}onChange(e){this.changeCallbacks.push(e)}onSubmit(e,t){this.submitCallback=e,this.submitDefaultLabel=t?.defaultLabel,this.notifyRender()}onRender(e){return this.renderCallbacks.push(e),()=>{let t=this.renderCallbacks.indexOf(e);t!==-1&&this.renderCallbacks.splice(t,1)}}async submit(){if(!this.submittable)return;let e=this.resolved===void 0?{attributes:{...this.selection},reference:``}:{attributes:this.resolved.attributes,reference:this.resolved.reference};this.dispatchSubmit(e),await this.submitCallback?.(e)}handlePricingReceived(e){this.pricing=e,this.recompute()}handleSelectionChanged(e){this.selection=e,this.recompute()}recompute(){this.resolved=this.resolve();for(let e of this.changeCallbacks)e(this.resolved);this.dispatchChange(this.resolved),this.notifyRender()}notifyRender(){for(let e of this.renderCallbacks)e()}resolve(){if(this.pricing===void 0)return;let e=ft(this.pricing.rules,this.selection);if(e!==void 0&&e.availability!==a.HIDDEN)return{attributes:{...this.selection},reference:e.reference,price:e.priceCents,currency:this.pricing.currency,availability:e.availability}}},gt=class{send;dispatch;instance;focused=null;attributes=[];changeCallbacks=[];constructor(e,t,n){this.send=e,this.dispatch=t,this.instance=n}get current(){return this.focused}set(e){if(typeof e!=`string`||e.length===0)throw w.invalidParameter(`set() requires a non-empty component name, got ${String(e)}`);this.send({type:t.FOCUS,instance:this.instance,action:r.FOCUS,component:e})}clear(){this.send({type:t.FOCUS,instance:this.instance,action:r.UNFOCUS})}onChange(e){this.changeCallbacks.push(e)}handleStateReceived(e){e.state===i.FOCUSED&&e.component!==void 0?(this.focused=e.component,this.attributes=e.attributes??[]):(this.focused=null,this.attributes=[]);let t=this.focused===null?null:{component:this.focused,attributes:this.attributes};for(let e of this.changeCallbacks)e(t);this.dispatch(t)}},_t=class{filename;developedCallbacks=new Set;errorCallbacks=new Set;developed=!1;failed=!1;photoData=null;constructor(e){this.filename=e}onDeveloped(e){return this.developed&&this.photoData!==null?(e(this.photoData),this):(this.developedCallbacks.add(e),this)}onError(e){return this.errorCallbacks.add(e),this}getFilename(){return this.filename}develop(e){this.developed||this.failed||(this.photoData=e,this.developed=!0,this.developedCallbacks.forEach(e=>{e(this.photoData)}),this.developedCallbacks.clear(),this.errorCallbacks.clear())}fail(e){this.developed||this.failed||(this.failed=!0,this.errorCallbacks.forEach(t=>{t(e)}),this.developedCallbacks.clear(),this.errorCallbacks.clear())}},vt=3e4,yt=class{send;validExtensions=[`.png`];pendingPhotos=new Map;constructor(e){this.send=e}take(e){return this.request(e,void 0)}takeOf(e,t){return this.request(e,t)}request(e,n){this.validateFilename(e),A.debug(`Taking snapshot`,{filename:e});let r=new _t(e),i=setTimeout(()=>{this.pendingPhotos.delete(e),A.warn(`Snapshot timed out`,{filename:e}),r.fail(new w(`Snapshot timed out: the viewer did not respond within ${vt}ms`,C.SNAPSHOT_FAILED))},vt);return this.pendingPhotos.set(e,{photo:r,timeout:i}),this.send({type:t.SNAPSHOT,filename:e,...n!==void 0&&{subject:n}}),r}handleSnapshotResult(e){let t=this.pendingPhotos.get(e.filename);if(t===void 0){A.warn(`No pending photo found for filename`,{filename:e.filename,pendingFilenames:Array.from(this.pendingPhotos.keys())});return}clearTimeout(t.timeout),this.pendingPhotos.delete(e.filename);let{photo:n}=t;e.error===void 0?e.data!==void 0&&n.develop({filename:e.filename,data:e.data}):n.fail(new w(e.error,C.SNAPSHOT_FAILED))}clear(){if(this.pendingPhotos.size===0)return;let e=new w(`Client destroyed before snapshot completed`,C.SNAPSHOT_FAILED);for(let{photo:t,timeout:n}of this.pendingPhotos.values())clearTimeout(n),t.fail(e);this.pendingPhotos.clear()}validateFilename(e){if(e===``||typeof e!=`string`)throw new w(`Filename must be a non-empty string`,C.INVALID_PARAMETER);if(!this.validExtensions.some(t=>e.toLowerCase().endsWith(t)))throw new w(`Invalid filename: "${e}". Filename must end with one of: ${this.validExtensions.join(`, `)}`,C.INVALID_PARAMETER);if(e.includes(`..`)||e.includes(`/`)||e.includes(`\\`))throw new w(`Filename cannot contain path separators or ".."`,C.INVALID_PARAMETER)}},bt=class{container=null;attach(e){this.container=e}dispatch(e,t,n=!1){let r=new CustomEvent(e,{detail:t,cancelable:n});return this.container?.dispatchEvent(r),r}on(e,t){let n=e=>{let n=e;t({...n.detail,preventDefault:()=>{n.preventDefault()}})};return this.container?.addEventListener(e,n),()=>{this.container?.removeEventListener(e,n)}}},xt=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Bezig…`:n===`de`?`Läuft…`:`Working…`}),St=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Mislukt`:n===`de`?`Fehlgeschlagen`:`Failed`}),Ct=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Gelukt`:n===`de`?`Fertig`:`Done`}),wt=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Annotaties`:n===`de`?`Anmerkungen`:`Annotations`}),Tt=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`AR activeren`:n===`de`?`AR aktivieren`:`Activate AR`}),Et=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Camera resetten`:n===`de`?`Kamera zurücksetzen`:`Reset camera`}),Dt=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Naar links draaien`:n===`de`?`Nach links drehen`:`Rotate left`}),Ot=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Naar rechts draaien`:n===`de`?`Nach rechts drehen`:`Rotate right`}),kt=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Omlaag kantelen`:n===`de`?`Nach unten kippen`:`Tilt down`}),At=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Omhoog kantelen`:n===`de`?`Nach oben kippen`:`Tilt up`}),jt=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Inzoomen`:n===`de`?`Hineinzoomen`:`Zoom in`}),Mt=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Uitzoomen`:n===`de`?`Herauszoomen`:`Zoom out`}),Nt=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Sluiten`:n===`de`?`Schließen`:`Close`}),Pt=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Configureren`:n===`de`?`Konfigurieren`:`Configure`}),Ft=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Volledig scherm`:n===`de`?`Vollbild`:`Fullscreen`}),It=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Sluiten`:n===`de`?`Schließen`:`Close`}),Lt=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`QR-code`:n===`de`?`QR-Code`:`QR code`}),Rt=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Gebruik de camera van je smartphone om deze QR-code te scannen`:n===`de`?`Verwende die Kamera deines Smartphones, um diesen QR-Code zu scannen`:`Use your smartphone camera to scan this QR code`}),zt=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Je telefoon opent het 3D-model in AR-modus.`:n===`de`?`Dein Telefon öffnet das 3D-Modell im AR-Modus.`:`Your phone will open the 3D model in AR mode.`}),Bt=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Scan om in AR te bekijken`:n===`de`?`Scannen für AR-Ansicht`:`Scan to view in AR`}),Vt=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`We kunnen de QR-code nu niet tonen. Open deze link op je telefoon:`:n===`de`?`Wir können den QR-Code gerade nicht anzeigen. Öffne diesen Link auf deinem Handy:`:`We can't show the QR code right now. Open this link on your phone:`}),Ht=((e={},t={})=>(t.locale??v(),`Screenshot`)),Ut=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Downloaden`:n===`de`?`Herunterladen`:`Downloading`}),Wt=((e={},t={})=>{let n=t.locale??v();return n===`nl`?`Laden mislukt. Ververs de pagina om het opnieuw te proberen.`:n===`de`?`Laden fehlgeschlagen. Lade die Seite neu, um es erneut zu versuchen.`:`Load failed. Refresh the page to try again.`}),Gt={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},Kt=([e,t,n])=>{let r=document.createElementNS(`http://www.w3.org/2000/svg`,e);return Object.keys(t).forEach(e=>{r.setAttribute(e,String(t[e]))}),n?.length&&n.forEach(e=>{let t=Kt(e);r.appendChild(t)}),r},qt=(e,t={})=>Kt([`svg`,{...Gt,...t},e]),Jt=[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`}],[`path`,{d:`M12 22V12`}]],Yt=[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`}],[`circle`,{cx:`12`,cy:`13`,r:`3`}]],Xt=[[`path`,{d:`m6 9 6 6 6-6`}]],Zt=[[`path`,{d:`m15 18-6-6 6-6`}]],Qt=[[`path`,{d:`m9 18 6-6-6-6`}]],$t=[[`path`,{d:`m18 15-6-6-6 6`}]],en=[[`path`,{d:`M12.75 7.09a3 3 0 0 1 2.16 2.16`}],[`path`,{d:`M17.072 17.072c-1.634 2.17-3.527 3.912-4.471 4.727a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 1.432-4.568`}],[`path`,{d:`m2 2 20 20`}],[`path`,{d:`M8.475 2.818A8 8 0 0 1 20 10c0 1.183-.31 2.377-.81 3.533`}],[`path`,{d:`M9.13 9.13a3 3 0 0 0 3.74 3.74`}]],tn=[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`}],[`circle`,{cx:`12`,cy:`10`,r:`3`}]],nn=[[`path`,{d:`M15 3h6v6`}],[`path`,{d:`m21 3-7 7`}],[`path`,{d:`m3 21 7-7`}],[`path`,{d:`M9 21H3v-6`}]],rn=[[`path`,{d:`m14 10 7-7`}],[`path`,{d:`M20 10h-6V4`}],[`path`,{d:`m3 21 7-7`}],[`path`,{d:`M4 14h6v6`}]],an=[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`}],[`path`,{d:`M3 3v5h5`}]],on=[[`path`,{d:`M10 5H3`}],[`path`,{d:`M12 19H3`}],[`path`,{d:`M14 3v4`}],[`path`,{d:`M16 17v4`}],[`path`,{d:`M21 12h-9`}],[`path`,{d:`M21 19h-5`}],[`path`,{d:`M21 5h-7`}],[`path`,{d:`M8 10v4`}],[`path`,{d:`M8 12H3`}]],sn=[[`path`,{d:`M18 6 6 18`}],[`path`,{d:`m6 6 12 12`}]],cn=[[`circle`,{cx:`11`,cy:`11`,r:`8`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`}]],ln=[[`circle`,{cx:`11`,cy:`11`,r:`8`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`}]];function j(e,{size:t=20,strokeWidth:n=1.75}={}){return qt(e,{width:t,height:t,"stroke-width":n})}var M={ar:e=>j(Jt,e),annotations:e=>j(tn,e),annotationsOff:e=>j(en,e),fullscreen:e=>j(nn,e),exitFullscreen:e=>j(rn,e),screenshot:e=>j(Yt,e),tiltUp:e=>j($t,e),tiltDown:e=>j(Xt,e),rotateLeft:e=>j(Zt,e),rotateRight:e=>j(Qt,e),zoomIn:e=>j(ln,e),zoomOut:e=>j(cn,e),reset:e=>j(an,e),configurator:e=>j(on,e),close:e=>j(sn,e)},N=class{element;constructor({variant:e=`default`,size:t=`default`,label:n,icon:r,onClick:i,disabled:a=!1}={}){this.element=document.createElement(`button`),this.element.className=`ui-btn ui-btn--${e} ui-btn--size-${t}`,n!==void 0&&(this.element.setAttribute(`aria-label`,n),this.element.title=n),r===void 0?n!==void 0&&(this.element.textContent=n):this.element.appendChild(r),i&&this.element.addEventListener(`click`,i),this.element.disabled=a}setIcon(e){let t=this.element.querySelector(`svg`);t===null?this.element.appendChild(e):t.replaceWith(e)}},un=class{element;selectCallback=null;constructor(e,t,n){this.element=document.createElement(`div`),this.element.className=`ui-toggle-group`;for(let r=0;r<e.length;r++){let i=e[r],a=document.createElement(`button`);a.className=`ui-toggle-group-item`,a.dataset.value=i,a.textContent=n?.[r]??i,a.dataset.state=i===t?`on`:`off`,a.setAttribute(`aria-pressed`,i===t?`true`:`false`),a.addEventListener(`click`,()=>{this.selectCallback?.(i)}),this.element.appendChild(a)}}setSelected(e){for(let t of this.element.querySelectorAll(`.ui-toggle-group-item`)){let n=t.dataset.value===e;t.dataset.state=n?`on`:`off`,t.setAttribute(`aria-pressed`,n?`true`:`false`)}}onSelect(e){this.selectCallback=e}setEnabled(e){for(let t of this.element.querySelectorAll(`.ui-toggle-group-item`)){let n=e===null||e.includes(t.dataset.value??``);t.disabled=!n,t.setAttribute(`aria-disabled`,n?`false`:`true`)}}},dn=class{element;select;constructor(e,t,n,r,i){this.select=document.createElement(`select`),this.select.className=`ui-native-select`,this.select.dataset.name=e,this.select.setAttribute(`aria-label`,n);let a=document.createElement(`option`);a.value=``,a.disabled=!0,a.textContent=n,this.select.appendChild(a);let o=!1;for(let e=0;e<t.length;e++){let n=t[e],a=document.createElement(`option`);a.value=n,a.textContent=i?.[e]??n,n===r&&(a.selected=!0,o=!0),this.select.appendChild(a)}o||(a.selected=!0);let s=qt(Xt,{width:16,height:16,"stroke-width":2});s.classList.add(`ui-native-select-icon`),this.element=document.createElement(`div`),this.element.className=`ui-native-select-wrap`,this.element.appendChild(this.select),this.element.appendChild(s)}setSelected(e){this.select.value=e}onSelect(e){this.select.addEventListener(`change`,()=>{e(this.select.value)})}setEnabled(e){for(let t of this.select.options)t.value!==``&&(t.disabled=e!==null&&!e.includes(t.value))}},fn=class{element;input;valueText;values;options;selectCallback=null;settleCallback=null;constructor(e,t){if(e.length===0)throw Error(`Virtualdisplay: Slider needs at least one value`);this.values=e,this.options=t,this.input=document.createElement(`input`),this.input.type=`range`,this.input.className=`ui-slider-input`,this.input.min=`0`,this.input.max=String(e.length-1),this.input.step=`1`,this.input.setAttribute(`aria-label`,t.label),this.valueText=document.createElement(`span`),this.valueText.className=`ui-slider-value`,this.valueText.setAttribute(`aria-hidden`,`true`);let n=document.createElement(`div`);n.className=`ui-slider-track`,n.appendChild(this.input),n.appendChild(this.buildEnds()),this.element=document.createElement(`div`),this.element.className=`ui-slider`,this.element.appendChild(n),this.element.appendChild(this.valueText);let r=t.initialSelected===void 0?0:e.indexOf(t.initialSelected);this.applyIndex(r===-1?0:r),this.listen()}setSelected(e){let t=this.values.indexOf(e);t!==-1&&this.applyIndex(t)}onSelect(e){this.selectCallback=e}onSettle(e){this.settleCallback=e}listen(){this.input.addEventListener(`input`,()=>{let e=this.values[this.currentIndex];e!==void 0&&(this.applyIndex(this.currentIndex),this.selectCallback?.(e))}),this.input.addEventListener(`change`,()=>{let e=this.values[this.currentIndex];e!==void 0&&this.settleCallback?.(e)})}get currentIndex(){return Number(this.input.value)}applyIndex(e){this.input.value=String(e);let t=this.displayAt(e);this.valueText.textContent=t,this.input.setAttribute(`aria-valuetext`,t);let n=this.values.length===1?100:e/(this.values.length-1)*100;this.element.style.setProperty(`--ui-slider-pct`,`${n}%`)}buildEnds(){let e=document.createElement(`div`);e.className=`ui-slider-ends`,e.setAttribute(`aria-hidden`,`true`);for(let t of[0,this.values.length-1]){let n=document.createElement(`span`);n.textContent=this.labelAt(t),e.appendChild(n)}return e}labelAt(e){return this.options.labels?.[e]??this.values[e]??``}displayAt(e){let t=this.labelAt(e);return this.options.unit===void 0?t:`${t} ${this.options.unit}`}},P={neutral:{50:`oklch(98.5% 0 0)`,100:`oklch(96.5% 0 0)`,200:`oklch(92% 0 0)`,300:`oklch(82% 0 0)`,400:`oklch(70% 0 0)`,500:`oklch(55.5% 0 0)`,600:`oklch(44.5% 0 0)`,700:`oklch(37% 0 0)`,800:`oklch(27% 0 0)`,900:`oklch(21% 0 0)`,950:`oklch(14.5% 0 0)`},white:`oklch(100% 0 0)`,semantic:{error:`oklch(47% 0.17 25)`}},F={px:`1px`,0:`0`,.5:`0.125rem`,1:`0.25rem`,1.5:`0.375rem`,2:`0.5rem`,2.5:`0.625rem`,3:`0.75rem`,3.5:`0.875rem`,4:`1rem`,5:`1.25rem`,6:`1.5rem`,7:`1.75rem`,8:`2rem`,9:`2.25rem`,10:`2.5rem`,12:`3rem`,14:`3.5rem`,16:`4rem`,20:`5rem`,24:`6rem`},I={fontFamily:{sans:[`Mona Sans`,`ui-sans-serif`,`system-ui`,`sans-serif`,`Apple Color Emoji`,`Segoe UI Emoji`,`Segoe UI Symbol`,`Noto Color Emoji`],mono:[`JetBrains Mono`,`ui-monospace`,`monospace`]},fontSize:{xs:`0.75rem`,sm:`0.875rem`,base:`1rem`,lg:`1.125rem`,xl:`1.25rem`,"2xl":`1.5rem`,"3xl":`1.875rem`,"4xl":`2.25rem`},fontWeight:{normal:`400`,medium:`500`,semibold:`600`,bold:`700`},lineHeight:{tight:`1.25`,normal:`1.5`,relaxed:`1.75`}},pn=class{element;constructor(){this.element=document.createElement(`div`),Object.assign(this.element.style,{background:P.white,borderRadius:`var(--radius)`,padding:F[6],boxShadow:`0 ${F[2]} ${F[8]} oklch(0% 0 0 / 20%)`,maxWidth:`20rem`,width:`100%`})}},mn=class{options;card;backdrop;keyHandler=null;constructor(e={}){this.options=e,this.card=new pn,this.backdrop=this.createBackdrop(),this.backdrop.appendChild(this.card.element)}get content(){return this.card.element}open(){document.body.appendChild(this.backdrop),this.keyHandler=e=>{e.key===`Escape`&&this.close()},document.addEventListener(`keydown`,this.keyHandler)}close(){this.backdrop.remove(),this.keyHandler!==null&&(document.removeEventListener(`keydown`,this.keyHandler),this.keyHandler=null),this.options.onClose?.()}createBackdrop(){let e=document.createElement(`div`);return Object.assign(e.style,{position:`fixed`,inset:F[0],background:`oklch(0% 0 0 / 50%)`,zIndex:`9999`,display:`flex`,alignItems:`center`,justifyContent:`center`}),e.addEventListener(`click`,t=>{t.target===e&&this.close()}),e}},L=I.fontFamily.sans.join(`, `),hn=`
|
|
2
2
|
:root {
|
|
3
3
|
--primary: oklch(5% 0 0);
|
|
4
4
|
--primary-foreground: oklch(100% 0 0);
|
|
@@ -481,7 +481,7 @@ button.vd-annotation-popup-title:focus-visible {
|
|
|
481
481
|
0%, 100% { opacity: 1; }
|
|
482
482
|
50% { opacity: 0.55; }
|
|
483
483
|
}
|
|
484
|
-
`,gn=!1;function _n(){if(gn||typeof document>`u`)return;gn=!0;let e=document.createElement(`style`);e.id=`vd-ui-vanilla`,e.textContent=hn,document.head.appendChild(e)}var vn=I.fontFamily.sans.join(`, `),yn=class{qrLib=null;dialog=null;qrSlot=null;show(){this.hide(),_n(),this.dialog=new mn({onClose:()=>{this.dialog=null,this.qrSlot=null}}),Object.assign(this.dialog.content.style,{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:F[3],fontFamily:vn}),this.dialog.content.appendChild(this.createText(Bt(),{fontSize:I.fontSize.base,fontWeight:I.fontWeight.semibold,color:P.neutral[900]})),this.dialog.content.appendChild(this.createText(Rt(),{fontSize:I.fontSize.sm,color:P.neutral[600]})),this.qrSlot=this.createQrSlot(),this.dialog.content.appendChild(this.qrSlot),this.dialog.content.appendChild(this.createText(zt(),{fontSize:I.fontSize.xs,color:P.neutral[500]}));let e=new N({variant:`outline`,label:It(),onClick:()=>{this.hide()}});this.dialog.content.appendChild(e.element),this.dialog.open()}async update(t){let n;try{this.qrLib??=await Promise.resolve().then(()=>e.n(require("./browser-7qZ1KQYo.cjs").default,1)),n=await this.qrLib.toDataURL(t,{width:256,margin:4,errorCorrectionLevel:`M`,color:{dark:`#000000`,light:`#ffffff`}})}catch(e){throw this.showLink(t),e}return this.qrSlot!==null&&(this.qrSlot.classList.remove(`ui-qr-slot--loading`),this.qrSlot.replaceChildren(this.createQrImage(n)),!0)}showLink(e){this.qrSlot!==null&&(this.qrSlot.classList.remove(`ui-qr-slot--loading`),this.qrSlot.replaceChildren(this.createText(Vt(),{fontSize:I.fontSize.sm,color:P.neutral[600]}),this.createText(e,{fontSize:I.fontSize.xs,color:P.neutral[900],overflowWrap:`anywhere`,userSelect:`all`})))}hide(){this.dialog?.close(),this.dialog=null,this.qrSlot=null}createText(e,t){let n=document.createElement(`p`);return n.textContent=e,Object.assign(n.style,{margin:`0`,textAlign:`center`,...t}),n}createQrSlot(){let e=document.createElement(`div`);return e.className=`ui-qr-slot ui-qr-slot--loading`,e}createQrImage(e){let t=document.createElement(`img`);return t.src=e,t.alt=Lt(),t}};function bn(e){let t=Math.max(0,Math.min(1,e));return t*t*(3-2*t)}function xn(e,t,n,r,i,a){let[o,s,c]=e,l=Math.cos(t),u=Math.sin(t),ee=l*o+u*c,d=-u*o+l*c,f=Math.cos(n),p=Math.sin(n),te=f*s-p*d,ne=p*s+f*d,m=.55;return[r+ee*a*m,i-te*a*m,ne]}function Sn(e,t,n){e.beginPath(),e.moveTo(t[0],t[1]),e.lineTo(n[0],n[1]),e.strokeStyle=`#000`,e.lineWidth=2,e.stroke()}function Cn(e,t,n,r,i){let a=t(n),o=t(r);Sn(e,a,[a[0]+(o[0]-a[0])*i,a[1]+(o[1]-a[1])*i,a[2]])}var R=[-1,-1,1],z=[1,-1,1],B=[1,-1,-1],V=[-1,-1,-1],H=[-1,1,1],U=[1,1,1],W=[1,1,-1],G=[-1,1,-1],K=[[R,z],[z,B],[B,V],[V,R],[R,H],[z,U],[B,W],[V,G],[H,U],[U,W],[W,G],[G,H]];function wn(e){let t=e%6/6,n=K.length;return t<.35?bn(t/.35)*n:t<.55?n:t<.9?(1-bn((t-.55)/.35))*n:0}function Tn(e,{width:t,height:n},r){let i=t/2,a=n*.44,o=Math.min(t,n)*.08,s=e=>xn(e,.785,.615,i,a,o),c=wn(r);e.shadowBlur=5,e.shadowColor=`rgba(30,30,30,0.08)`;for(let t=0;t<K.length&&!(t>=c);t++){let n=K[t];if(n===void 0)continue;let r=Math.min(1,c-t);Cn(e,s,n[0],n[1],r)}e.shadowBlur=0}var En=400,Dn=3e4,On=`-apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif`;function kn(){let e=document.createElement(`div`);Object.assign(e.style,{position:`absolute`,inset:`0`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,background:`#fff`,zIndex:`20`,opacity:`0`,transition:`opacity 0.3s ease-in-out`});let t=document.createElement(`canvas`);Object.assign(t.style,{width:`100%`,height:`100%`,position:`absolute`,inset:`0`});let n=document.createElement(`div`);Object.assign(n.style,{position:`absolute`,top:`56%`,left:`0`,right:`0`,textAlign:`center`,pointerEvents:`none`});let r=document.createElement(`span`);Object.assign(r.style,{fontSize:`13px`,fontWeight:`400`,color:`#000`,fontVariantNumeric:`tabular-nums`,fontFamily:On});let i=document.createElement(`span`);return Object.assign(i.style,{fontSize:`13px`,color:`#000`,fontFamily:On}),i.textContent=Ut(),n.appendChild(r),n.appendChild(i),e.appendChild(t),e.appendChild(n),{overlay:e,canvas:t,pctEl:r,phaseEl:i}}var An=class{overlay;canvas;ctx;pctEl;phaseEl;animationId=null;showTimerId=null;noSignalTimerId=null;startTime;hidden=!1;visible=!1;errored=!1;noSignalErrored=!1;constructor(e){this.startTime=performance.now();let t=kn();this.overlay=t.overlay,this.canvas=t.canvas,this.pctEl=t.pctEl,this.phaseEl=t.phaseEl,e.appendChild(this.overlay),this.ctx=this.canvas.getContext(`2d`),this.ctx!==null&&(this.sizeCanvas(),this.tick()),this.showTimerId=setTimeout(()=>{this.reveal()},En),this.noSignalTimerId=setTimeout(()=>{this.hidden||(this.noSignalErrored=!0,this.showError(Wt()))},Dn)}viewerAlive(){this.cancelNoSignalTimer(),this.noSignalErrored&&this.recoverFromNoSignal()}recoverFromNoSignal(){this.noSignalErrored=!1,this.errored=!1,this.pctEl.textContent=``,this.phaseEl.textContent=Ut(),this.phaseEl.style.color=`#000`,this.ctx!==null&&this.animationId===null&&!this.hidden&&this.tick()}updateProgress(e,t){this.cancelNoSignalTimer(),!(this.hidden||this.errored)&&(this.pctEl.textContent=`${Math.round(e)}%`,this.phaseEl.textContent=t===``?``:` \u00B7 ${t}`)}showError(e){if(this.cancelNoSignalTimer(),this.hidden=!1,this.errored=!0,this.animationId!==null&&(cancelAnimationFrame(this.animationId),this.animationId=null),this.ctx!==null){let e=Math.min(devicePixelRatio,2),t=this.canvas.width/e,n=this.canvas.height/e;this.ctx.fillStyle=`#fff`,this.ctx.fillRect(0,0,t*e,n*e)}this.pctEl.textContent=``,this.phaseEl.textContent=e,this.phaseEl.style.color=`#b91c1c`,this.reveal()}hide(){this.hidden||(this.hidden=!0,this.cancelShowTimer(),this.visible?(this.overlay.style.opacity=`0`,this.overlay.addEventListener(`transitionend`,()=>{this.destroy()},{once:!0}),setTimeout(()=>{this.destroy()},500)):this.destroy())}destroy(){this.cancelShowTimer(),this.cancelNoSignalTimer(),this.animationId!==null&&(cancelAnimationFrame(this.animationId),this.animationId=null),this.overlay.remove()}reveal(){this.hidden||this.visible||(this.visible=!0,this.overlay.style.opacity=`1`)}cancelShowTimer(){this.showTimerId!==null&&(clearTimeout(this.showTimerId),this.showTimerId=null)}cancelNoSignalTimer(){this.noSignalTimerId!==null&&(clearTimeout(this.noSignalTimerId),this.noSignalTimerId=null)}sizeCanvas(){if(this.ctx===null)return;let e=Math.min(devicePixelRatio,2),t=this.overlay.clientWidth||440,n=this.overlay.clientHeight||360;this.canvas.width=t*e,this.canvas.height=n*e,this.ctx.scale(e,e),this.ctx.lineCap=`round`,this.ctx.lineJoin=`round`}tick=()=>{this.hidden||(this.drawFrame(),this.animationId=requestAnimationFrame(this.tick))};drawFrame(){if(this.ctx===null)return;let e=this.canvas.width/Math.min(devicePixelRatio,2),t=this.canvas.height/Math.min(devicePixelRatio,2),n=(performance.now()-this.startTime)/1e3;this.ctx.fillStyle=`#fff`,this.ctx.fillRect(0,0,e,t),Tn(this.ctx,{width:e,height:t},n)}},jn=class{options;element;arBtn=null;fullscreenBtn=null;annotationsBtn=null;annotationsShown=!1;onFullscreenChange;constructor(e){this.options=e,this.element=document.createElement(`div`),Object.assign(this.element.style,{display:`flex`,gap:`0.375rem`}),this.onFullscreenChange=()=>{this.setFullscreenIcon(document.fullscreenElement!==null)},document.addEventListener(`fullscreenchange`,this.onFullscreenChange)}setFullscreenIcon(e){this.fullscreenBtn!==null&&this.fullscreenBtn.setIcon(e?M.exitFullscreen():M.fullscreen())}syncButton(e,t,n){if(t&&e===null){let e=n();return this.element.appendChild(e.element),e}return!t&&e!==null?(e.element.remove(),null):e}applySettings(e){this.arBtn=this.syncButton(this.arBtn,e.ar!==!1&&this.options.onAr!==void 0,()=>new N({variant:`outline`,size:`icon`,label:Tt(),icon:M.ar(),onClick:()=>{this.options.onAr?.()}})),this.fullscreenBtn=this.syncButton(this.fullscreenBtn,e.fullscreen!==!1&&this.options.onFullscreen!==void 0,()=>new N({variant:`outline`,size:`icon`,label:Ft(),icon:M.fullscreen(),onClick:()=>{this.options.onFullscreen?.()}}));let t=e.annotations===`toggle-shown`||e.annotations===`toggle-hidden`;this.annotationsBtn=this.syncButton(this.annotationsBtn,t&&this.options.onAnnotationsToggle!==void 0,()=>{this.annotationsShown=e.annotations===`toggle-shown`;let t=new N({variant:`outline`,size:`icon`,label:wt(),icon:this.annotationsShown?M.annotations():M.annotationsOff(),onClick:()=>{this.flipAnnotations()}});return t.element.setAttribute(`aria-pressed`,String(this.annotationsShown)),t})}flipAnnotations(){this.annotationsShown=!this.annotationsShown,this.annotationsBtn?.element.setAttribute(`aria-pressed`,String(this.annotationsShown)),this.annotationsBtn?.setIcon(this.annotationsShown?M.annotations():M.annotationsOff()),this.options.onAnnotationsToggle?.(this.annotationsShown)}destroy(){document.removeEventListener(`fullscreenchange`,this.onFullscreenChange)}},q=.5,Mn=class e{element;constructor(t,n){this.element=Object.assign(document.createElement(`div`),{className:`vd-camera-controls`});let r={targetRotation:n.rotation,targetTilt:n.tilt,targetZoom:n.zoom,thetaOffset:0},i=Ln(t,n,r);n.onChange(e=>{r.targetRotation=e.rotation-r.thetaOffset,r.targetTilt=e.tilt,r.targetZoom=e.zoom,Rn(i,n,e)}),this.element.appendChild(e.buildZoom(i.zoomOut,i.zoomIn)),this.element.appendChild(e.buildDpad(i.tiltUp,i.rotateLeft,i.reset,i.rotateRight,i.tiltDown))}static buildZoom(e,t){let n=document.createElement(`div`);return n.className=`vd-zoom`,n.appendChild(e.element),n.appendChild(t.element),n}static buildDpad(e,t,n,r,i){let a=document.createElement(`div`);a.className=`vd-dpad`;for(let[o,s]of[[e,`up`],[t,`left`],[n,`center`],[r,`right`],[i,`down`]])o.element.classList.add(`vd-dpad-${s}`),a.appendChild(o.element);return a}};function Nn(e,t){let n=e;for(;n<t;)n+=360;for(;n>=t+360;)n-=360;return n}function Pn(e,t,n){let r=Nn(e,t);return r<=n?r:r-n<=t+360-r?n:t}function J(e,t,n){return new N({variant:`outline`,size:`icon`,label:e,icon:t,onClick:n})}function Fn(e,t){return Math.max(e.limits?.minZoom??1,Math.min(e.limits?.maxZoom??1/0,t))}function In(e,t){let n=e.limits?.minRotate,r=e.limits?.maxRotate;return n===void 0||r===void 0||r-n>=360?t:Pn(t,n,r)}function Y(e,t,n,r){let i=t.limits?.minTilt,a=t.limits?.maxTilt;if(i!==void 0||a!==void 0){n.targetTilt=Math.max(i??0,Math.min(a??180,n.targetTilt+r)),e.tilt(n.targetTilt).set();return}let o=n.targetTilt+r;o>180||o<0?(n.targetTilt=o>180?360-o:-o,n.thetaOffset=(n.thetaOffset+180)%360,e.tilt(n.targetTilt).rotate(n.targetRotation+n.thetaOffset).set()):(n.targetTilt=o,e.tilt(n.targetTilt).set())}function Ln(e,t,n){let r=r=>{n.targetZoom=Fn(t,n.targetZoom+r),e.zoom(n.targetZoom).set()},i=r=>{n.targetRotation=In(t,n.targetRotation+r),e.rotate(n.targetRotation+n.thetaOffset).set()};return{zoomOut:J(Mt(),M.zoomOut(),()=>{r(-10)}),zoomIn:J(jt(),M.zoomIn(),()=>{r(10)}),tiltUp:J(At(),M.tiltUp(),()=>{Y(e,t,n,-15)}),rotateLeft:J(Dt(),M.rotateLeft(),()=>{i(-15)}),reset:J(Et(),M.reset(),()=>{n.thetaOffset=0,e.reset()}),rotateRight:J(Ot(),M.rotateRight(),()=>{i(15)}),tiltDown:J(kt(),M.tiltDown(),()=>{Y(e,t,n,15)})}}function Rn(e,t,n){let r=t.limits;if(r===void 0)return;e.zoomOut.element.disabled=r.minZoom!==void 0&&n.zoom<=r.minZoom+q,e.zoomIn.element.disabled=r.maxZoom!==void 0&&n.zoom>=r.maxZoom-q,e.tiltUp.element.disabled=r.minTilt!==void 0&&n.tilt<=r.minTilt+q,e.tiltDown.element.disabled=r.maxTilt!==void 0&&n.tilt>=r.maxTilt-q;let{minRotate:i,maxRotate:a}=r;if(i===void 0||a===void 0||a-i>=360){e.rotateLeft.element.disabled=!1,e.rotateRight.element.disabled=!1;return}let o=Nn(n.rotation,i);e.rotateLeft.element.disabled=o<=i+q,e.rotateRight.element.disabled=o>=a-q}var X={SELECT:`vd:select`,SELECTED:`vd:selected`,FOCUS_CHANGE:`vd:focus-change`,CONFIGURATION_CHANGE:`vd:configuration-change`,CONFIGURATION_SUBMIT:`vd:configuration-submit`},zn={mm:1,cm:10,m:1e3,in:25.4},Bn=3;function Vn(e){let t=e.stepMm/zn[e.displayUnit];for(let e=0;e<=Bn;e++){let n=t*10**e;if(Math.abs(n-Math.round(n))<1e-9)return e}return Bn}function Hn(e,t,n){let r=Vn(t),i=e/zn[t.displayUnit];return new Intl.NumberFormat(n,{minimumFractionDigits:r,maximumFractionDigits:r}).format(i)}function Un(e,t,n,r,i,a,o){let s=v(),c=e.values.map(e=>Hn(Number(e),t,s)),l=e.values.find(t=>n.getValue(e.name,t)?.isSelected===!0)??e.defaultValue,u=new fn(e.values,{label:e.name,labels:c,unit:t.displayUnit,...l!==void 0&&{initialSelected:l}});return u.onSelect(t=>{i(e.name,t)}),u.onSettle(t=>{r.dispatch(X.SELECT,{attribute:e.name,value:t},!0).defaultPrevented||a(e.name,t)}),o(e.name,t=>{u.setSelected(t.value),r.dispatch(X.SELECTED,{attribute:e.name,value:t.value})}),{element:u.element,setSelectable:()=>{}}}var Wn=5,Gn=0;function Kn(e,t,n,r,i,a){let o=document.createElement(`div`);o.className=`vd-attribute`,o.dataset.name=e.name;let s=document.createElement(`span`);s.className=`vd-attribute-label`,s.textContent=S(e.name),s.id=`vd-attribute-label-${Gn++}`,o.appendChild(s),o.setAttribute(`role`,`group`),o.setAttribute(`aria-labelledby`,s.id);let c=e=>{o.style.display=e?`none`:``},l=e.dimension===void 0?qn(e,t,n,r,a):Un(e,e.dimension,t,n,i,r,a);return o.appendChild(l.element),{element:o,setSelectable:l.setSelectable,setHidden:c}}function qn(e,t,n,r,i){let a=e.values.find(n=>t.getValue(e.name,n)?.isSelected===!0),o=e.values.map(t=>Fe(t,e.labels)),s=e.values.length<=Wn?new un(e.values,a,o):new dn(e.name,e.values,S(e.name),a,o);return s.onSelect(t=>{n.dispatch(X.SELECT,{attribute:e.name,value:t},!0).defaultPrevented||r(e.name,t)}),i(e.name,t=>{s.setSelected(t.value),n.dispatch(X.SELECTED,{attribute:e.name,value:t.value})}),{element:s.element,setSelectable:e=>{s.setEnabled(e)}}}var Jn=80,Yn=2500,Xn=class{configuration;element;priceEl;vatEl;button;unsubscribe;state=`idle`;resetTimer;constructor(e){this.configuration=e,this.element=document.createElement(`div`),this.element.className=`vd-commerce vd-hidden`;let t=document.createElement(`div`);t.className=`vd-commerce-price`,this.priceEl=document.createElement(`span`),this.priceEl.className=`vd-price`,this.vatEl=document.createElement(`span`),this.vatEl.className=`vd-vat`,t.append(this.priceEl,this.vatEl),this.button=new N({variant:`default`,onClick:()=>{this.handleSubmit()}}),this.button.element.classList.add(`vd-cta`,`vd-hidden`),this.element.append(t,this.button.element),this.unsubscribe=this.configuration.onRender(()=>{this.update()}),this.update()}update(){this.renderPrice(this.configuration.current),this.renderButton();let e=this.configuration.current!==void 0||this.configuration.submitEnabled;this.element.classList.toggle(`vd-hidden`,!e)}destroy(){this.unsubscribe(),this.resetTimer!==void 0&&clearTimeout(this.resetTimer),this.element.remove()}renderPrice(e){e===void 0?(this.priceEl.textContent=``,this.vatEl.textContent=``):(this.priceEl.textContent=Zn(e.price,e.currency),this.vatEl.textContent=Z(this.configuration.vatDisplay))}renderButton(){let e=this.configuration.submitEnabled;this.button.element.classList.toggle(`vd-hidden`,!e),e&&this.state===`idle`&&this.setButtonText(Z(this.configuration.buttonLabel))}async handleSubmit(){if(this.state!==`busy`){this.setState(`busy`,xt());try{await this.configuration.submit(),this.setState(`success`,Ct())}catch(e){if(e instanceof DOMException&&e.name===`AbortError`){this.setState(`idle`,Z(this.configuration.buttonLabel));return}A.warn(`Commerce submit failed`,{error:e}),this.setState(`failed`,St())}this.scheduleReset()}}scheduleReset(){this.resetTimer!==void 0&&clearTimeout(this.resetTimer),this.resetTimer=setTimeout(()=>{this.state=`idle`,this.update()},Yn)}setState(e,t){this.state=e,this.element.dataset.submit=e,this.button.element.disabled=e===`busy`,this.setButtonText(t)}setButtonText(e){this.button.element.textContent=e,this.button.element.setAttribute(`aria-label`,e)}};function Z(e){return(e??``).slice(0,Jn)}function Zn(e,t){try{let n=new Intl.NumberFormat(v(),{style:`currency`,currency:t}),r=n.resolvedOptions().maximumFractionDigits??2;return n.format(e/10**r)}catch{return`${t} ${(e/100).toFixed(2)}`}}var Qn=class{slot=null;panel=null;attach(e,t){this.panel=t,t.style.display=`none`,this.slot=document.createElement(`div`),this.slot.className=`vd-slot-bottom-left`,this.slot.appendChild(t),e.appendChild(this.slot)}setVisible(e){this.panel!==null&&(this.panel.style.display=e?`flex`:`none`)}destroy(){this.slot?.remove(),this.slot=null,this.panel=null}},$n=572,er=class{actionBarSlot;element=null;body=null;openButton=null;closeButton=null;container=null;observer=null;collapsible=!1;expanded=!0;visible=!1;constructor(e){this.actionBarSlot=e}attach(e,t){this.container=e,t.classList.add(`vd-attributes-sidebar`),this.closeButton=new N({variant:`ghost`,size:`icon-sm`,label:Nt(),icon:M.close({size:18}),onClick:()=>{this.expanded=!1,this.render()}});let n=document.createElement(`div`);n.className=`vd-sidebar-header`,n.appendChild(this.closeButton.element),this.body=document.createElement(`div`),this.body.className=`vd-sidebar-body`,this.body.appendChild(t),this.element=document.createElement(`div`),this.element.className=`vd-sidebar vd-hidden`,this.element.append(n,this.body),e.appendChild(this.element),this.openButton=new N({variant:`outline`,size:`icon`,label:Pt(),icon:M.configurator({size:18}),onClick:()=>{this.expanded=!0,this.render()}}),this.openButton.element.classList.add(`vd-configurator-toggle`,`vd-hidden`),this.actionBarSlot.appendChild(this.openButton.element),this.observe()}setVisible(e){this.visible=e,this.render()}destroy(){this.observer?.disconnect(),this.observer=null,this.openButton?.element.remove(),this.element?.remove(),this.container?.classList.remove(`vd-layout-sidebar-right`,`vd-layout-sidebar-permanent`),this.container=null}observe(){typeof ResizeObserver<`u`&&this.container!==null&&(this.observer=new ResizeObserver(e=>{let t=e[0]?.contentRect.width??0;this.setCollapsible(t>0&&t<$n)}),this.observer.observe(this.container))}setCollapsible(e){e!==this.collapsible&&(this.collapsible=e,this.expanded=!e,this.render())}render(){if(this.element===null||this.openButton===null||this.closeButton===null||this.container===null)return;let e=this.visible&&this.expanded,t=this.visible&&!this.expanded;this.element.classList.toggle(`vd-hidden`,!this.visible),this.element.classList.toggle(`vd-sidebar-collapsed`,t),this.openButton.element.classList.toggle(`vd-hidden`,!t),this.closeButton.element.style.display=this.collapsible?``:`none`,this.container.classList.toggle(`vd-layout-sidebar-right`,e),this.container.classList.toggle(`vd-layout-sidebar-permanent`,e&&!this.collapsible)}},tr=class{attach(e,t){}setVisible(e){}destroy(){}},nr={"inframe-bottom-left":()=>new Qn,"sidebar-right":e=>new er(e),hidden:()=>new tr};function rr(e,t){return(nr[e??``]??(()=>new Qn))(t)}var Q=I.fontFamily.sans.join(`, `),$=`
|
|
484
|
+
`,gn=!1;function _n(){if(gn||typeof document>`u`)return;gn=!0;let e=document.createElement(`style`);e.id=`vd-ui-vanilla`,e.textContent=hn,document.head.appendChild(e)}var vn=I.fontFamily.sans.join(`, `),yn=class{qrLib=null;dialog=null;qrSlot=null;show(){this.hide(),_n(),this.dialog=new mn({onClose:()=>{this.dialog=null,this.qrSlot=null}}),Object.assign(this.dialog.content.style,{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:F[3],fontFamily:vn}),this.dialog.content.appendChild(this.createText(Bt(),{fontSize:I.fontSize.base,fontWeight:I.fontWeight.semibold,color:P.neutral[900]})),this.dialog.content.appendChild(this.createText(Rt(),{fontSize:I.fontSize.sm,color:P.neutral[600]})),this.qrSlot=this.createQrSlot(),this.dialog.content.appendChild(this.qrSlot),this.dialog.content.appendChild(this.createText(zt(),{fontSize:I.fontSize.xs,color:P.neutral[500]}));let e=new N({variant:`outline`,label:It(),onClick:()=>{this.hide()}});this.dialog.content.appendChild(e.element),this.dialog.open()}async update(t){let n;try{this.qrLib??=await Promise.resolve().then(()=>e.n(require("./browser-7qZ1KQYo.cjs").default,1)),n=await this.qrLib.toDataURL(t,{width:256,margin:4,errorCorrectionLevel:`M`,color:{dark:`#000000`,light:`#ffffff`}})}catch(e){throw this.showLink(t),e}return this.qrSlot!==null&&(this.qrSlot.classList.remove(`ui-qr-slot--loading`),this.qrSlot.replaceChildren(this.createQrImage(n)),!0)}showLink(e){this.qrSlot!==null&&(this.qrSlot.classList.remove(`ui-qr-slot--loading`),this.qrSlot.replaceChildren(this.createText(Vt(),{fontSize:I.fontSize.sm,color:P.neutral[600]}),this.createText(e,{fontSize:I.fontSize.xs,color:P.neutral[900],overflowWrap:`anywhere`,userSelect:`all`})))}hide(){this.dialog?.close(),this.dialog=null,this.qrSlot=null}createText(e,t){let n=document.createElement(`p`);return n.textContent=e,Object.assign(n.style,{margin:`0`,textAlign:`center`,...t}),n}createQrSlot(){let e=document.createElement(`div`);return e.className=`ui-qr-slot ui-qr-slot--loading`,e}createQrImage(e){let t=document.createElement(`img`);return t.src=e,t.alt=Lt(),t}};function bn(e){let t=Math.max(0,Math.min(1,e));return t*t*(3-2*t)}function xn(e,t,n,r,i,a){let[o,s,c]=e,l=Math.cos(t),u=Math.sin(t),ee=l*o+u*c,d=-u*o+l*c,f=Math.cos(n),p=Math.sin(n),te=f*s-p*d,ne=p*s+f*d,m=.55;return[r+ee*a*m,i-te*a*m,ne]}function Sn(e,t,n){e.beginPath(),e.moveTo(t[0],t[1]),e.lineTo(n[0],n[1]),e.lineWidth=2,e.stroke()}function Cn(e,t,n,r,i){let a=t(n),o=t(r);Sn(e,a,[a[0]+(o[0]-a[0])*i,a[1]+(o[1]-a[1])*i,a[2]])}var R=[-1,-1,1],z=[1,-1,1],B=[1,-1,-1],V=[-1,-1,-1],H=[-1,1,1],U=[1,1,1],W=[1,1,-1],G=[-1,1,-1],K=[[R,z],[z,B],[B,V],[V,R],[R,H],[z,U],[B,W],[V,G],[H,U],[U,W],[W,G],[G,H]];function wn(e){let t=e%6/6,n=K.length;return t<.35?bn(t/.35)*n:t<.55?n:t<.9?(1-bn((t-.55)/.35))*n:0}function Tn(e,{width:t,height:n},r,i){let a=t/2,o=n*.44,s=Math.min(t,n)*.08,c=e=>xn(e,.785,.615,a,o,s),l=wn(r);e.shadowBlur=5,e.shadowColor=`rgba(30,30,30,0.08)`,e.strokeStyle=i;for(let t=0;t<K.length&&!(t>=l);t++){let n=K[t];if(n===void 0)continue;let r=Math.min(1,l-t);Cn(e,c,n[0],n[1],r)}e.shadowBlur=0}var En=400,Dn=3e4,On=`-apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif`;function kn(e){let t=document.createElement(`div`);Object.assign(t.style,{position:`absolute`,inset:`0`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,background:`transparent`,color:e,zIndex:`20`,opacity:`0`,transition:`opacity 0.3s ease-in-out`});let n=document.createElement(`canvas`);Object.assign(n.style,{width:`100%`,height:`100%`,position:`absolute`,inset:`0`});let r=document.createElement(`div`);Object.assign(r.style,{position:`absolute`,top:`56%`,left:`0`,right:`0`,textAlign:`center`,pointerEvents:`none`});let i=document.createElement(`span`);Object.assign(i.style,{fontSize:`13px`,fontWeight:`400`,fontVariantNumeric:`tabular-nums`,fontFamily:On});let a=document.createElement(`span`);return Object.assign(a.style,{fontSize:`13px`,fontFamily:On}),a.textContent=Ut(),r.appendChild(i),r.appendChild(a),t.appendChild(n),t.appendChild(r),{overlay:t,canvas:n,pctEl:i,phaseEl:a}}var An=class{overlay;canvas;ctx;pctEl;phaseEl;animationId=null;showTimerId=null;noSignalTimerId=null;startTime;textColor;hidden=!1;visible=!1;errored=!1;noSignalErrored=!1;constructor(e){this.startTime=performance.now();let t=getComputedStyle(e).color;this.textColor=t===``?`#000`:t;let n=kn(this.textColor);this.overlay=n.overlay,this.canvas=n.canvas,this.pctEl=n.pctEl,this.phaseEl=n.phaseEl,e.appendChild(this.overlay),this.ctx=this.canvas.getContext(`2d`),this.ctx!==null&&(this.sizeCanvas(),this.tick()),this.showTimerId=setTimeout(()=>{this.reveal()},En),this.noSignalTimerId=setTimeout(()=>{this.hidden||(this.noSignalErrored=!0,this.showError(Wt()))},Dn)}viewerAlive(){this.cancelNoSignalTimer(),this.noSignalErrored&&this.recoverFromNoSignal()}recoverFromNoSignal(){this.noSignalErrored=!1,this.errored=!1,this.pctEl.textContent=``,this.phaseEl.textContent=Ut(),this.ctx!==null&&this.animationId===null&&!this.hidden&&this.tick()}updateProgress(e,t){this.cancelNoSignalTimer(),!(this.hidden||this.errored)&&(this.pctEl.textContent=`${Math.round(e)}%`,this.phaseEl.textContent=t===``?``:` \u00B7 ${t}`)}showError(e){if(this.cancelNoSignalTimer(),this.hidden=!1,this.errored=!0,this.animationId!==null&&(cancelAnimationFrame(this.animationId),this.animationId=null),this.ctx!==null){let e=Math.min(devicePixelRatio,2),t=this.canvas.width/e,n=this.canvas.height/e;this.ctx.clearRect(0,0,t,n)}this.pctEl.textContent=``,this.phaseEl.textContent=e,this.reveal()}hide(){this.hidden||(this.hidden=!0,this.cancelShowTimer(),this.visible?(this.overlay.style.opacity=`0`,this.overlay.addEventListener(`transitionend`,()=>{this.destroy()},{once:!0}),setTimeout(()=>{this.destroy()},500)):this.destroy())}destroy(){this.cancelShowTimer(),this.cancelNoSignalTimer(),this.animationId!==null&&(cancelAnimationFrame(this.animationId),this.animationId=null),this.overlay.remove()}reveal(){this.hidden||this.visible||(this.visible=!0,this.overlay.style.opacity=`1`)}cancelShowTimer(){this.showTimerId!==null&&(clearTimeout(this.showTimerId),this.showTimerId=null)}cancelNoSignalTimer(){this.noSignalTimerId!==null&&(clearTimeout(this.noSignalTimerId),this.noSignalTimerId=null)}sizeCanvas(){if(this.ctx===null)return;let e=Math.min(devicePixelRatio,2),t=this.overlay.clientWidth||440,n=this.overlay.clientHeight||360;this.canvas.width=t*e,this.canvas.height=n*e,this.ctx.scale(e,e),this.ctx.lineCap=`round`,this.ctx.lineJoin=`round`}tick=()=>{this.hidden||(this.drawFrame(),this.animationId=requestAnimationFrame(this.tick))};drawFrame(){if(this.ctx===null)return;let e=this.canvas.width/Math.min(devicePixelRatio,2),t=this.canvas.height/Math.min(devicePixelRatio,2),n=(performance.now()-this.startTime)/1e3;this.ctx.clearRect(0,0,e,t),Tn(this.ctx,{width:e,height:t},n,this.textColor)}},jn=class{options;element;arBtn=null;fullscreenBtn=null;annotationsBtn=null;annotationsShown=!1;onFullscreenChange;constructor(e){this.options=e,this.element=document.createElement(`div`),Object.assign(this.element.style,{display:`flex`,gap:`0.375rem`}),this.onFullscreenChange=()=>{this.setFullscreenIcon(document.fullscreenElement!==null)},document.addEventListener(`fullscreenchange`,this.onFullscreenChange)}setFullscreenIcon(e){this.fullscreenBtn!==null&&this.fullscreenBtn.setIcon(e?M.exitFullscreen():M.fullscreen())}syncButton(e,t,n){if(t&&e===null){let e=n();return this.element.appendChild(e.element),e}return!t&&e!==null?(e.element.remove(),null):e}applySettings(e){this.arBtn=this.syncButton(this.arBtn,e.ar!==!1&&this.options.onAr!==void 0,()=>new N({variant:`outline`,size:`icon`,label:Tt(),icon:M.ar(),onClick:()=>{this.options.onAr?.()}})),this.fullscreenBtn=this.syncButton(this.fullscreenBtn,e.fullscreen!==!1&&this.options.onFullscreen!==void 0,()=>new N({variant:`outline`,size:`icon`,label:Ft(),icon:M.fullscreen(),onClick:()=>{this.options.onFullscreen?.()}}));let t=e.annotations===`toggle-shown`||e.annotations===`toggle-hidden`;this.annotationsBtn=this.syncButton(this.annotationsBtn,t&&this.options.onAnnotationsToggle!==void 0,()=>{this.annotationsShown=e.annotations===`toggle-shown`;let t=new N({variant:`outline`,size:`icon`,label:wt(),icon:this.annotationsShown?M.annotations():M.annotationsOff(),onClick:()=>{this.flipAnnotations()}});return t.element.setAttribute(`aria-pressed`,String(this.annotationsShown)),t})}flipAnnotations(){this.annotationsShown=!this.annotationsShown,this.annotationsBtn?.element.setAttribute(`aria-pressed`,String(this.annotationsShown)),this.annotationsBtn?.setIcon(this.annotationsShown?M.annotations():M.annotationsOff()),this.options.onAnnotationsToggle?.(this.annotationsShown)}destroy(){document.removeEventListener(`fullscreenchange`,this.onFullscreenChange)}},q=.5,Mn=class e{element;constructor(t,n){this.element=Object.assign(document.createElement(`div`),{className:`vd-camera-controls`});let r={targetRotation:n.rotation,targetTilt:n.tilt,targetZoom:n.zoom,thetaOffset:0},i=Ln(t,n,r);n.onChange(e=>{r.targetRotation=e.rotation-r.thetaOffset,r.targetTilt=e.tilt,r.targetZoom=e.zoom,Rn(i,n,e)}),this.element.appendChild(e.buildZoom(i.zoomOut,i.zoomIn)),this.element.appendChild(e.buildDpad(i.tiltUp,i.rotateLeft,i.reset,i.rotateRight,i.tiltDown))}static buildZoom(e,t){let n=document.createElement(`div`);return n.className=`vd-zoom`,n.appendChild(e.element),n.appendChild(t.element),n}static buildDpad(e,t,n,r,i){let a=document.createElement(`div`);a.className=`vd-dpad`;for(let[o,s]of[[e,`up`],[t,`left`],[n,`center`],[r,`right`],[i,`down`]])o.element.classList.add(`vd-dpad-${s}`),a.appendChild(o.element);return a}};function Nn(e,t){let n=e;for(;n<t;)n+=360;for(;n>=t+360;)n-=360;return n}function Pn(e,t,n){let r=Nn(e,t);return r<=n?r:r-n<=t+360-r?n:t}function J(e,t,n){return new N({variant:`outline`,size:`icon`,label:e,icon:t,onClick:n})}function Fn(e,t){return Math.max(e.limits?.minZoom??1,Math.min(e.limits?.maxZoom??1/0,t))}function In(e,t){let n=e.limits?.minRotate,r=e.limits?.maxRotate;return n===void 0||r===void 0||r-n>=360?t:Pn(t,n,r)}function Y(e,t,n,r){let i=t.limits?.minTilt,a=t.limits?.maxTilt;if(i!==void 0||a!==void 0){n.targetTilt=Math.max(i??0,Math.min(a??180,n.targetTilt+r)),e.tilt(n.targetTilt).set();return}let o=n.targetTilt+r;o>180||o<0?(n.targetTilt=o>180?360-o:-o,n.thetaOffset=(n.thetaOffset+180)%360,e.tilt(n.targetTilt).rotate(n.targetRotation+n.thetaOffset).set()):(n.targetTilt=o,e.tilt(n.targetTilt).set())}function Ln(e,t,n){let r=r=>{n.targetZoom=Fn(t,n.targetZoom+r),e.zoom(n.targetZoom).set()},i=r=>{n.targetRotation=In(t,n.targetRotation+r),e.rotate(n.targetRotation+n.thetaOffset).set()};return{zoomOut:J(Mt(),M.zoomOut(),()=>{r(-10)}),zoomIn:J(jt(),M.zoomIn(),()=>{r(10)}),tiltUp:J(At(),M.tiltUp(),()=>{Y(e,t,n,-15)}),rotateLeft:J(Dt(),M.rotateLeft(),()=>{i(-15)}),reset:J(Et(),M.reset(),()=>{n.thetaOffset=0,e.reset()}),rotateRight:J(Ot(),M.rotateRight(),()=>{i(15)}),tiltDown:J(kt(),M.tiltDown(),()=>{Y(e,t,n,15)})}}function Rn(e,t,n){let r=t.limits;if(r===void 0)return;e.zoomOut.element.disabled=r.minZoom!==void 0&&n.zoom<=r.minZoom+q,e.zoomIn.element.disabled=r.maxZoom!==void 0&&n.zoom>=r.maxZoom-q,e.tiltUp.element.disabled=r.minTilt!==void 0&&n.tilt<=r.minTilt+q,e.tiltDown.element.disabled=r.maxTilt!==void 0&&n.tilt>=r.maxTilt-q;let{minRotate:i,maxRotate:a}=r;if(i===void 0||a===void 0||a-i>=360){e.rotateLeft.element.disabled=!1,e.rotateRight.element.disabled=!1;return}let o=Nn(n.rotation,i);e.rotateLeft.element.disabled=o<=i+q,e.rotateRight.element.disabled=o>=a-q}var X={SELECT:`vd:select`,SELECTED:`vd:selected`,FOCUS_CHANGE:`vd:focus-change`,CONFIGURATION_CHANGE:`vd:configuration-change`,CONFIGURATION_SUBMIT:`vd:configuration-submit`},zn={mm:1,cm:10,m:1e3,in:25.4},Bn=3;function Vn(e){let t=e.stepMm/zn[e.displayUnit];for(let e=0;e<=Bn;e++){let n=t*10**e;if(Math.abs(n-Math.round(n))<1e-9)return e}return Bn}function Hn(e,t,n){let r=Vn(t),i=e/zn[t.displayUnit];return new Intl.NumberFormat(n,{minimumFractionDigits:r,maximumFractionDigits:r}).format(i)}function Un(e,t,n,r,i,a,o){let s=v(),c=e.values.map(e=>Hn(Number(e),t,s)),l=e.values.find(t=>n.getValue(e.name,t)?.isSelected===!0)??e.defaultValue,u=new fn(e.values,{label:e.name,labels:c,unit:t.displayUnit,...l!==void 0&&{initialSelected:l}});return u.onSelect(t=>{i(e.name,t)}),u.onSettle(t=>{r.dispatch(X.SELECT,{attribute:e.name,value:t},!0).defaultPrevented||a(e.name,t)}),o(e.name,t=>{u.setSelected(t.value),r.dispatch(X.SELECTED,{attribute:e.name,value:t.value})}),{element:u.element,setSelectable:()=>{}}}var Wn=5,Gn=0;function Kn(e,t,n,r,i,a){let o=document.createElement(`div`);o.className=`vd-attribute`,o.dataset.name=e.name;let s=document.createElement(`span`);s.className=`vd-attribute-label`,s.textContent=S(e.name),s.id=`vd-attribute-label-${Gn++}`,o.appendChild(s),o.setAttribute(`role`,`group`),o.setAttribute(`aria-labelledby`,s.id);let c=e=>{o.style.display=e?`none`:``},l=e.dimension===void 0?qn(e,t,n,r,a):Un(e,e.dimension,t,n,i,r,a);return o.appendChild(l.element),{element:o,setSelectable:l.setSelectable,setHidden:c}}function qn(e,t,n,r,i){let a=e.values.find(n=>t.getValue(e.name,n)?.isSelected===!0),o=e.values.map(t=>Fe(t,e.labels)),s=e.values.length<=Wn?new un(e.values,a,o):new dn(e.name,e.values,S(e.name),a,o);return s.onSelect(t=>{n.dispatch(X.SELECT,{attribute:e.name,value:t},!0).defaultPrevented||r(e.name,t)}),i(e.name,t=>{s.setSelected(t.value),n.dispatch(X.SELECTED,{attribute:e.name,value:t.value})}),{element:s.element,setSelectable:e=>{s.setEnabled(e)}}}var Jn=80,Yn=2500,Xn=class{configuration;element;priceEl;vatEl;button;unsubscribe;state=`idle`;resetTimer;constructor(e){this.configuration=e,this.element=document.createElement(`div`),this.element.className=`vd-commerce vd-hidden`;let t=document.createElement(`div`);t.className=`vd-commerce-price`,this.priceEl=document.createElement(`span`),this.priceEl.className=`vd-price`,this.vatEl=document.createElement(`span`),this.vatEl.className=`vd-vat`,t.append(this.priceEl,this.vatEl),this.button=new N({variant:`default`,onClick:()=>{this.handleSubmit()}}),this.button.element.classList.add(`vd-cta`,`vd-hidden`),this.element.append(t,this.button.element),this.unsubscribe=this.configuration.onRender(()=>{this.update()}),this.update()}update(){this.renderPrice(this.configuration.current),this.renderButton();let e=this.configuration.current!==void 0||this.configuration.submitEnabled;this.element.classList.toggle(`vd-hidden`,!e)}destroy(){this.unsubscribe(),this.resetTimer!==void 0&&clearTimeout(this.resetTimer),this.element.remove()}renderPrice(e){e===void 0?(this.priceEl.textContent=``,this.vatEl.textContent=``):(this.priceEl.textContent=Zn(e.price,e.currency),this.vatEl.textContent=Z(this.configuration.vatDisplay))}renderButton(){let e=this.configuration.submitEnabled;this.button.element.classList.toggle(`vd-hidden`,!e),e&&this.state===`idle`&&this.setButtonText(Z(this.configuration.buttonLabel))}async handleSubmit(){if(this.state!==`busy`){this.setState(`busy`,xt());try{await this.configuration.submit(),this.setState(`success`,Ct())}catch(e){if(e instanceof DOMException&&e.name===`AbortError`){this.setState(`idle`,Z(this.configuration.buttonLabel));return}A.warn(`Commerce submit failed`,{error:e}),this.setState(`failed`,St())}this.scheduleReset()}}scheduleReset(){this.resetTimer!==void 0&&clearTimeout(this.resetTimer),this.resetTimer=setTimeout(()=>{this.state=`idle`,this.update()},Yn)}setState(e,t){this.state=e,this.element.dataset.submit=e,this.button.element.disabled=e===`busy`,this.setButtonText(t)}setButtonText(e){this.button.element.textContent=e,this.button.element.setAttribute(`aria-label`,e)}};function Z(e){return(e??``).slice(0,Jn)}function Zn(e,t){try{let n=new Intl.NumberFormat(v(),{style:`currency`,currency:t}),r=n.resolvedOptions().maximumFractionDigits??2;return n.format(e/10**r)}catch{return`${t} ${(e/100).toFixed(2)}`}}var Qn=class{slot=null;panel=null;attach(e,t){this.panel=t,t.style.display=`none`,this.slot=document.createElement(`div`),this.slot.className=`vd-slot-bottom-left`,this.slot.appendChild(t),e.appendChild(this.slot)}setVisible(e){this.panel!==null&&(this.panel.style.display=e?`flex`:`none`)}destroy(){this.slot?.remove(),this.slot=null,this.panel=null}},$n=572,er=class{actionBarSlot;element=null;body=null;openButton=null;closeButton=null;container=null;observer=null;collapsible=!1;expanded=!0;visible=!1;constructor(e){this.actionBarSlot=e}attach(e,t){this.container=e,t.classList.add(`vd-attributes-sidebar`),this.closeButton=new N({variant:`ghost`,size:`icon-sm`,label:Nt(),icon:M.close({size:18}),onClick:()=>{this.expanded=!1,this.render()}});let n=document.createElement(`div`);n.className=`vd-sidebar-header`,n.appendChild(this.closeButton.element),this.body=document.createElement(`div`),this.body.className=`vd-sidebar-body`,this.body.appendChild(t),this.element=document.createElement(`div`),this.element.className=`vd-sidebar vd-hidden`,this.element.append(n,this.body),e.appendChild(this.element),this.openButton=new N({variant:`outline`,size:`icon`,label:Pt(),icon:M.configurator({size:18}),onClick:()=>{this.expanded=!0,this.render()}}),this.openButton.element.classList.add(`vd-configurator-toggle`,`vd-hidden`),this.actionBarSlot.appendChild(this.openButton.element),this.observe()}setVisible(e){this.visible=e,this.render()}destroy(){this.observer?.disconnect(),this.observer=null,this.openButton?.element.remove(),this.element?.remove(),this.container?.classList.remove(`vd-layout-sidebar-right`,`vd-layout-sidebar-permanent`),this.container=null}observe(){typeof ResizeObserver<`u`&&this.container!==null&&(this.observer=new ResizeObserver(e=>{let t=e[0]?.contentRect.width??0;this.setCollapsible(t>0&&t<$n)}),this.observer.observe(this.container))}setCollapsible(e){e!==this.collapsible&&(this.collapsible=e,this.expanded=!e,this.render())}render(){if(this.element===null||this.openButton===null||this.closeButton===null||this.container===null)return;let e=this.visible&&this.expanded,t=this.visible&&!this.expanded;this.element.classList.toggle(`vd-hidden`,!this.visible),this.element.classList.toggle(`vd-sidebar-collapsed`,t),this.openButton.element.classList.toggle(`vd-hidden`,!t),this.closeButton.element.style.display=this.collapsible?``:`none`,this.container.classList.toggle(`vd-layout-sidebar-right`,e),this.container.classList.toggle(`vd-layout-sidebar-permanent`,e&&!this.collapsible)}},tr=class{attach(e,t){}setVisible(e){}destroy(){}},nr={"inframe-bottom-left":()=>new Qn,"sidebar-right":e=>new er(e),hidden:()=>new tr};function rr(e,t){return(nr[e??``]??(()=>new Qn))(t)}var Q=I.fontFamily.sans.join(`, `),$=`
|
|
485
485
|
position: absolute;
|
|
486
486
|
display: flex;
|
|
487
487
|
z-index: 10;
|
|
@@ -1196,12 +1196,6 @@ var ht = class {
|
|
|
1196
1196
|
y1: "21",
|
|
1197
1197
|
y2: "16.65"
|
|
1198
1198
|
}],
|
|
1199
|
-
["line", {
|
|
1200
|
-
x1: "11",
|
|
1201
|
-
x2: "11",
|
|
1202
|
-
y1: "8",
|
|
1203
|
-
y2: "14"
|
|
1204
|
-
}],
|
|
1205
1199
|
["line", {
|
|
1206
1200
|
x1: "8",
|
|
1207
1201
|
x2: "14",
|
|
@@ -1220,6 +1214,12 @@ var ht = class {
|
|
|
1220
1214
|
y1: "21",
|
|
1221
1215
|
y2: "16.65"
|
|
1222
1216
|
}],
|
|
1217
|
+
["line", {
|
|
1218
|
+
x1: "11",
|
|
1219
|
+
x2: "11",
|
|
1220
|
+
y1: "8",
|
|
1221
|
+
y2: "14"
|
|
1222
|
+
}],
|
|
1223
1223
|
["line", {
|
|
1224
1224
|
x1: "8",
|
|
1225
1225
|
x2: "14",
|
|
@@ -1246,8 +1246,8 @@ var M = {
|
|
|
1246
1246
|
tiltDown: (e) => j(Xt, e),
|
|
1247
1247
|
rotateLeft: (e) => j(Zt, e),
|
|
1248
1248
|
rotateRight: (e) => j(Qt, e),
|
|
1249
|
-
zoomIn: (e) => j(
|
|
1250
|
-
zoomOut: (e) => j(
|
|
1249
|
+
zoomIn: (e) => j(ln, e),
|
|
1250
|
+
zoomOut: (e) => j(cn, e),
|
|
1251
1251
|
reset: (e) => j(an, e),
|
|
1252
1252
|
configurator: (e) => j(on, e),
|
|
1253
1253
|
close: (e) => j(sn, e)
|
|
@@ -2028,7 +2028,7 @@ var vn = I.fontFamily.sans.join(", "), yn = class {
|
|
|
2028
2028
|
async update(t) {
|
|
2029
2029
|
let n;
|
|
2030
2030
|
try {
|
|
2031
|
-
this.qrLib ??= await import("./browser-
|
|
2031
|
+
this.qrLib ??= await import("./browser-BeOPJLWl.js").then((t) => /* @__PURE__ */ e(t.default, 1)), n = await this.qrLib.toDataURL(t, {
|
|
2032
2032
|
width: 256,
|
|
2033
2033
|
margin: 4,
|
|
2034
2034
|
errorCorrectionLevel: "M",
|
|
@@ -2087,7 +2087,7 @@ function xn(e, t, n, r, i, a) {
|
|
|
2087
2087
|
];
|
|
2088
2088
|
}
|
|
2089
2089
|
function Sn(e, t, n) {
|
|
2090
|
-
e.beginPath(), e.moveTo(t[0], t[1]), e.lineTo(n[0], n[1]), e.
|
|
2090
|
+
e.beginPath(), e.moveTo(t[0], t[1]), e.lineTo(n[0], n[1]), e.lineWidth = 2, e.stroke();
|
|
2091
2091
|
}
|
|
2092
2092
|
function Cn(e, t, n, r, i) {
|
|
2093
2093
|
let a = t(n), o = t(r);
|
|
@@ -2147,42 +2147,43 @@ function wn(e) {
|
|
|
2147
2147
|
let t = e % 6 / 6, n = K.length;
|
|
2148
2148
|
return t < .35 ? bn(t / .35) * n : t < .55 ? n : t < .9 ? (1 - bn((t - .55) / .35)) * n : 0;
|
|
2149
2149
|
}
|
|
2150
|
-
function Tn(e, { width: t, height: n }, r) {
|
|
2151
|
-
let
|
|
2152
|
-
e.shadowBlur = 5, e.shadowColor = "rgba(30,30,30,0.08)";
|
|
2153
|
-
for (let t = 0; t < K.length && !(t >=
|
|
2150
|
+
function Tn(e, { width: t, height: n }, r, i) {
|
|
2151
|
+
let a = t / 2, o = n * .44, s = Math.min(t, n) * .08, c = (e) => xn(e, .785, .615, a, o, s), l = wn(r);
|
|
2152
|
+
e.shadowBlur = 5, e.shadowColor = "rgba(30,30,30,0.08)", e.strokeStyle = i;
|
|
2153
|
+
for (let t = 0; t < K.length && !(t >= l); t++) {
|
|
2154
2154
|
let n = K[t];
|
|
2155
2155
|
if (n === void 0) continue;
|
|
2156
|
-
let r = Math.min(1,
|
|
2157
|
-
Cn(e,
|
|
2156
|
+
let r = Math.min(1, l - t);
|
|
2157
|
+
Cn(e, c, n[0], n[1], r);
|
|
2158
2158
|
}
|
|
2159
2159
|
e.shadowBlur = 0;
|
|
2160
2160
|
}
|
|
2161
2161
|
// ../client-core/src/ui/loading.ts
|
|
2162
2162
|
var En = 400, Dn = 3e4, On = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", system-ui, sans-serif";
|
|
2163
|
-
function kn() {
|
|
2164
|
-
let
|
|
2165
|
-
Object.assign(
|
|
2163
|
+
function kn(e) {
|
|
2164
|
+
let t = document.createElement("div");
|
|
2165
|
+
Object.assign(t.style, {
|
|
2166
2166
|
position: "absolute",
|
|
2167
2167
|
inset: "0",
|
|
2168
2168
|
display: "flex",
|
|
2169
2169
|
flexDirection: "column",
|
|
2170
2170
|
alignItems: "center",
|
|
2171
2171
|
justifyContent: "center",
|
|
2172
|
-
background: "
|
|
2172
|
+
background: "transparent",
|
|
2173
|
+
color: e,
|
|
2173
2174
|
zIndex: "20",
|
|
2174
2175
|
opacity: "0",
|
|
2175
2176
|
transition: "opacity 0.3s ease-in-out"
|
|
2176
2177
|
});
|
|
2177
|
-
let
|
|
2178
|
-
Object.assign(
|
|
2178
|
+
let n = document.createElement("canvas");
|
|
2179
|
+
Object.assign(n.style, {
|
|
2179
2180
|
width: "100%",
|
|
2180
2181
|
height: "100%",
|
|
2181
2182
|
position: "absolute",
|
|
2182
2183
|
inset: "0"
|
|
2183
2184
|
});
|
|
2184
|
-
let
|
|
2185
|
-
Object.assign(
|
|
2185
|
+
let r = document.createElement("div");
|
|
2186
|
+
Object.assign(r.style, {
|
|
2186
2187
|
position: "absolute",
|
|
2187
2188
|
top: "56%",
|
|
2188
2189
|
left: "0",
|
|
@@ -2190,24 +2191,22 @@ function kn() {
|
|
|
2190
2191
|
textAlign: "center",
|
|
2191
2192
|
pointerEvents: "none"
|
|
2192
2193
|
});
|
|
2193
|
-
let
|
|
2194
|
-
Object.assign(
|
|
2194
|
+
let i = document.createElement("span");
|
|
2195
|
+
Object.assign(i.style, {
|
|
2195
2196
|
fontSize: "13px",
|
|
2196
2197
|
fontWeight: "400",
|
|
2197
|
-
color: "#000",
|
|
2198
2198
|
fontVariantNumeric: "tabular-nums",
|
|
2199
2199
|
fontFamily: On
|
|
2200
2200
|
});
|
|
2201
|
-
let
|
|
2202
|
-
return Object.assign(
|
|
2201
|
+
let a = document.createElement("span");
|
|
2202
|
+
return Object.assign(a.style, {
|
|
2203
2203
|
fontSize: "13px",
|
|
2204
|
-
color: "#000",
|
|
2205
2204
|
fontFamily: On
|
|
2206
|
-
}),
|
|
2207
|
-
overlay:
|
|
2208
|
-
canvas:
|
|
2209
|
-
pctEl:
|
|
2210
|
-
phaseEl:
|
|
2205
|
+
}), a.textContent = Ut(), r.appendChild(i), r.appendChild(a), t.appendChild(n), t.appendChild(r), {
|
|
2206
|
+
overlay: t,
|
|
2207
|
+
canvas: n,
|
|
2208
|
+
pctEl: i,
|
|
2209
|
+
phaseEl: a
|
|
2211
2210
|
};
|
|
2212
2211
|
}
|
|
2213
2212
|
var An = class {
|
|
@@ -2220,14 +2219,17 @@ var An = class {
|
|
|
2220
2219
|
showTimerId = null;
|
|
2221
2220
|
noSignalTimerId = null;
|
|
2222
2221
|
startTime;
|
|
2222
|
+
textColor;
|
|
2223
2223
|
hidden = !1;
|
|
2224
2224
|
visible = !1;
|
|
2225
2225
|
errored = !1;
|
|
2226
2226
|
noSignalErrored = !1;
|
|
2227
2227
|
constructor(e) {
|
|
2228
2228
|
this.startTime = performance.now();
|
|
2229
|
-
let t =
|
|
2230
|
-
this.
|
|
2229
|
+
let t = getComputedStyle(e).color;
|
|
2230
|
+
this.textColor = t === "" ? "#000" : t;
|
|
2231
|
+
let n = kn(this.textColor);
|
|
2232
|
+
this.overlay = n.overlay, this.canvas = n.canvas, this.pctEl = n.pctEl, this.phaseEl = n.phaseEl, e.appendChild(this.overlay), this.ctx = this.canvas.getContext("2d"), this.ctx !== null && (this.sizeCanvas(), this.tick()), this.showTimerId = setTimeout(() => {
|
|
2231
2233
|
this.reveal();
|
|
2232
2234
|
}, En), this.noSignalTimerId = setTimeout(() => {
|
|
2233
2235
|
this.hidden || (this.noSignalErrored = !0, this.showError(Wt()));
|
|
@@ -2237,7 +2239,7 @@ var An = class {
|
|
|
2237
2239
|
this.cancelNoSignalTimer(), this.noSignalErrored && this.recoverFromNoSignal();
|
|
2238
2240
|
}
|
|
2239
2241
|
recoverFromNoSignal() {
|
|
2240
|
-
this.noSignalErrored = !1, this.errored = !1, this.pctEl.textContent = "", this.phaseEl.textContent = Ut(), this.
|
|
2242
|
+
this.noSignalErrored = !1, this.errored = !1, this.pctEl.textContent = "", this.phaseEl.textContent = Ut(), this.ctx !== null && this.animationId === null && !this.hidden && this.tick();
|
|
2241
2243
|
}
|
|
2242
2244
|
updateProgress(e, t) {
|
|
2243
2245
|
this.cancelNoSignalTimer(), !(this.hidden || this.errored) && (this.pctEl.textContent = `${Math.round(e)}%`, this.phaseEl.textContent = t === "" ? "" : ` \u00B7 ${t}`);
|
|
@@ -2245,9 +2247,9 @@ var An = class {
|
|
|
2245
2247
|
showError(e) {
|
|
2246
2248
|
if (this.cancelNoSignalTimer(), this.hidden = !1, this.errored = !0, this.animationId !== null && (cancelAnimationFrame(this.animationId), this.animationId = null), this.ctx !== null) {
|
|
2247
2249
|
let e = Math.min(devicePixelRatio, 2), t = this.canvas.width / e, n = this.canvas.height / e;
|
|
2248
|
-
this.ctx.
|
|
2250
|
+
this.ctx.clearRect(0, 0, t, n);
|
|
2249
2251
|
}
|
|
2250
|
-
this.pctEl.textContent = "", this.phaseEl.textContent = e, this.
|
|
2252
|
+
this.pctEl.textContent = "", this.phaseEl.textContent = e, this.reveal();
|
|
2251
2253
|
}
|
|
2252
2254
|
hide() {
|
|
2253
2255
|
this.hidden || (this.hidden = !0, this.cancelShowTimer(), this.visible ? (this.overlay.style.opacity = "0", this.overlay.addEventListener("transitionend", () => {
|
|
@@ -2279,10 +2281,10 @@ var An = class {
|
|
|
2279
2281
|
drawFrame() {
|
|
2280
2282
|
if (this.ctx === null) return;
|
|
2281
2283
|
let e = this.canvas.width / Math.min(devicePixelRatio, 2), t = this.canvas.height / Math.min(devicePixelRatio, 2), n = (performance.now() - this.startTime) / 1e3;
|
|
2282
|
-
this.ctx.
|
|
2284
|
+
this.ctx.clearRect(0, 0, e, t), Tn(this.ctx, {
|
|
2283
2285
|
width: e,
|
|
2284
2286
|
height: t
|
|
2285
|
-
}, n);
|
|
2287
|
+
}, n, this.textColor);
|
|
2286
2288
|
}
|
|
2287
2289
|
}, jn = class {
|
|
2288
2290
|
options;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.VirtualdisplayClient={}))})(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),c=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},l=(e,r,i)=>(i=e==null?{}:t(a(e)),c(r||!e||!e.__esModule||!o.call(e,`default`)?n(i,`default`,{value:e,enumerable:!0}):i,e)),u={HANDSHAKE:`handshake`,SESSION:`session`,MUTATION:`mutation`,STATE:`state`,LOADING_INDICATOR:`loading_indicator`,CAMERA:`camera`,SNAPSHOT:`snapshot`,MAPPING:`mapping`,AR_ACTIVATE:`ar_activate`,FULLSCREEN:`fullscreen`,CONFIG:`config`,ANNOTATION_TOGGLE:`annotation_toggle`,FOCUS:`focus`,PRICING:`pricing`,QR_SHOWN:`qr_shown`,SYNC:`sync`,SELECTABLE:`selectable`,APP_RESOLVED:`app_resolved`},d=`main`,f={FOCUS:`focus`,UNFOCUS:`unfocus`},p={FOCUSED:`focused`,UNFOCUSED:`unfocused`},m={AVAILABLE:`available`,VIEW_ONLY:`view_only`,HIDDEN:`hidden`};function h(e){return typeof e!=`object`||!e?null:e}var g=new Set(Object.values(u));function _(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.target!=`string`&&typeof t.type==`string`&&g.has(t.type)}function v(e){let t=h(e);return t!==null&&t.type===u.HANDSHAKE}function y(e){let t=h(e);return t!==null&&t.type===u.SESSION&&typeof t.sessionId==`string`}function b(e){let t=h(e);return t!==null&&t.type===u.APP_RESOLVED&&typeof t.appType==`string`&&t.appType!==``&&typeof t.name==`string`}function x(e){let t=h(e);return t!==null&&t.type===u.MUTATION&&typeof t.instance==`string`&&t.instance!==``&&Array.isArray(t.results)}function S(e){let t=h(e);return t!==null&&t.type===u.SNAPSHOT&&(`data`in t||`error`in t)}function C(e){let t=h(e);return t!==null&&t.type===u.CAMERA&&Array.isArray(t.transforms)}function ee(e){let t=h(e);return t!==null&&t.type===u.MAPPING&&typeof t.instance==`string`&&t.instance!==``&&Array.isArray(t.attributes)}function te(e){let t=h(e);return t!==null&&t.type===u.LOADING_INDICATOR&&typeof t.progress==`number`}function ne(e){let t=h(e);return t!==null&&t.type===u.SYNC&&typeof t.connected==`boolean`}function re(e){let t=h(e);return t!==null&&t.type===u.SELECTABLE&&typeof t.instance==`string`&&t.instance!==``&&Array.isArray(t.attributes)}function ie(e){let t=h(e);return t!==null&&t.type===u.CONFIG&&typeof t.viewerSettings==`object`}function ae(e){let t=h(e);return t!==null&&t.type===u.FOCUS&&typeof t.instance==`string`&&t.instance!==``&&typeof t.state==`string`}function oe(e){let t=h(e);return t!==null&&t.type===u.PRICING&&typeof t.instance==`string`&&t.instance!==``&&typeof t.pricing==`object`&&t.pricing!==null}var se=class{processor;pending=[];isReady=!1;constructor(e){this.processor=e}enqueue(e){this.isReady?this.processor(e):this.pending.push(e)}markReady(){if(this.isReady||(this.isReady=!0,this.pending.length===0))return;let e=[...this.pending];this.pending.length=0;for(let t of e)this.processor(t)}hasPending(e){return this.pending.some(t=>t.type===e)}clear(){this.pending.length=0}},ce=class{getTarget;handlers=new Map;publisher;consumer;listener=null;sourceId;targetOrigin;isValid;onHandlerError;constructor(e,t){this.getTarget=e,this.sourceId=`vd-${Math.random().toString(36).slice(2,8)}`,this.targetOrigin=`*`,this.isValid=t?.isValid??_,this.onHandlerError=t?.onHandlerError??le,this.publisher=new se(e=>this.post(e)),this.consumer=new se(e=>this.routeToHandler(e)),t?.bufferIncoming!==!0&&this.consumer.markReady()}on(e,t){this.handlers.set(e,t)}setTargetOrigin(e){this.targetOrigin=e}send(e){this.publisher.enqueue(e)}receive(e){this.isValid(e)&&this.consumer.enqueue(e)}markReady(){this.publisher.markReady()}markConsumerReady(){this.consumer.markReady()}consumerHasPending(e){return this.consumer.hasPending(e)}start(){this.listener===null&&(this.listener=e=>{let{data:t}=e;if(!this.isValid(t)||t._source===this.sourceId)return;let n=this.getTarget();if(n!==null&&e.source!==null&&e.source!==n)return;let r=t;this.consumer.enqueue(r)},window.addEventListener(`message`,this.listener))}destroy(){this.listener!==null&&(window.removeEventListener(`message`,this.listener),this.listener=null),this.publisher.clear(),this.consumer.clear(),this.handlers.clear()}post(e){let t=this.getTarget();t!==null&&t.postMessage({...e,_source:this.sourceId},this.targetOrigin)}routeToHandler(e){let t=this.handlers.get(e.type);if(t===void 0)return;let n;try{n=t(e)}catch(t){this.onHandlerError(e,t);return}n instanceof Promise&&n.catch(t=>{this.onHandlerError(e,t)})}};function le(e,t){let n=t instanceof Error?t.message:String(t);console.error(`Virtualdisplay: error handling ${e.type}: ${n}`)}u.CAMERA,u.LOADING_INDICATOR;var ue=class{send;instance;constructor(e,t){this.send=e,this.instance=t}setEnabled(e){this.send({type:u.ANNOTATION_TOGGLE,instance:this.instance,enabled:e})}},de=class{value;attribute;label;isSelectedValue=!1;constructor(e,t,n){this.value=e,this.attribute=t,this.label=n}get isSelected(){return this.isSelectedValue}setSelected(e){this.isSelectedValue=e}},fe={},pe=[`en`,`nl`,`de`],me=`PARAGLIDE_LOCALE`,w=[`globalVariable`,`baseLocale`],he=[],T=typeof window>`u`;globalThis.__paraglide=globalThis.__paraglide??{},globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};var E,ge=!1,D=()=>{let e=w;!T&&typeof window<`u`&&window.location?.href&&(e=Ne(window.location.href));let t=_e(e,typeof window<`u`?window.location?.href:void 0);if(t)return ge||(E=t,ge=!0,ye(t,{reload:!1})),t;throw Error(`No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found`)};function _e(e,t){let n;for(let t of e){if(t===`baseLocale`)n=`en`;else if(t===`globalVariable`&&E!==void 0)n=E;else if(Pe(t)&&A.has(t)){let e=A.get(t);if(e){let t=e.getLocale();if(t instanceof Promise)continue;if(t!==void 0)return xe(t)}}let e=O(n);if(e)return e}}var ve=e=>{e?window.location.href=e:window.location.reload()},ye=(e,t)=>{let n={reload:!0,...t},r;try{r=D()}catch{}let i=[],a=w;!T&&typeof window<`u`&&window.location?.href&&(a=Ne(window.location.href));for(let t of a)if(t===`globalVariable`)E=e;else if(t===`baseLocale`)continue;else if(Pe(t)&&A.has(t)){let n=A.get(t);if(n){let r=n.setLocale(e);r instanceof Promise&&(r=r.catch(e=>{throw Error(`Custom strategy "${t}" setLocale failed.`,{cause:e})}),i.push(r))}}let o=()=>{!T&&n.reload&&window.location&&e!==r&&ve(void 0)};if(i.length)return Promise.all(i).then(()=>{o()});o()},be=()=>typeof window<`u`?window.location.origin:`http://fallback.com`;function O(e){if(typeof e!=`string`)return;let t=e.toLowerCase();for(let e of pe)if(e.toLowerCase()===t)return e}function xe(e){let t=O(e);if(t)return t;throw Error(`Invalid locale: ${e}. Expected one of: ${pe.join(`, `)}`)}function k(e){return e}function Se(e,t){return new fe(e,t.href)}function Ce(){return 0}function we(e){return he}function Te(e,t){return e.exec(t.href)}var Ee=me.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);RegExp(`(?:^|;\\s*)${Ee}=([^;]*)`);function De(e){return Oe(e)}function Oe(e){let t=k(typeof e==`string`?new URL(e,be()):new URL(e.href)),n=t.pathname.replace(/^\/+/,``).split(`/`);return n.length>0&&O(n[0])&&(t.pathname=`/`+n.slice(1).join(`/`)),k(t)}var ke=-1,Ae,je;function Me(e){if(he.length===0)return;let t=typeof e==`string`?e:e.href,n=Ce();if(Ae===t&&ke===n)return je;let r=k(new URL(t,`http://example.com`)),i=De(r),a=i.href===r.href?[r]:[r,i],o;for(let e of a){for(let t of we(e))if(Te(Se(t.match,e),e)){o=t;break}if(o)break}return ke=n,Ae=t,je=o,o}function Ne(e){let t=Me(e);return t&&t.exclude!==!0&&Array.isArray(t.strategy)?t.strategy:w}var A=new Map;function Pe(e){return typeof e==`string`&&/^custom-[A-Za-z0-9_-]+$/.test(e)}function Fe(e,t){return Ie(t!==void 0&&Object.hasOwn(t,e)?t[e]:void 0)??Le(e)}function Ie(e){if(e===void 0)return;for(let t of[D(),`nl`,`en`])if(Object.hasOwn(e,t)&&e[t]!==void 0)return e[t];let[t]=Object.values(e);return t}function Le(e){let t=e.replace(/([A-Z])/g,` $1`).trim();return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}var j={NO_MAPPING:`NO_MAPPING`,ATTRIBUTE_NOT_FOUND:`ATTRIBUTE_NOT_FOUND`,VALUE_NOT_FOUND:`VALUE_NOT_FOUND`,PARENT_NOT_FOUND:`PARENT_NOT_FOUND`,INVALID_PARAMETER:`INVALID_PARAMETER`,SNAPSHOT_FAILED:`SNAPSHOT_FAILED`},M=class e extends Error{code;constructor(e,t){super(e),this.name=`VirtualdisplayError`,this.code=t}static valueNotFound(t,n){return new e(`Value "${n}" not found for attribute "${t}"`,j.VALUE_NOT_FOUND)}static parentNotFound(t){return new e(`Parent element not found: ${t}`,j.PARENT_NOT_FOUND)}static invalidParameter(t){return new e(t,j.INVALID_PARAMETER)}},Re=class{name;defaultValue;values;onSelect;onChangeCallback;constructor(e){this.name=e.name,this.defaultValue=e.defaultValue,this.onSelect=e.onSelect,this.values=this.createValues(e.values,e.labels)}select(e){if(!this.values.has(e))throw M.valueNotFound(this.name,e);this.onSelect(this.name,e)}getValues(){return Array.from(this.values.values())}getValue(e){return this.values.get(e)}get selected(){for(let e of this.values.values())if(e.isSelected)return e.value}onChange(e){this.onChangeCallback=e}handleResult(e){let t;for(let n of this.values.values()){let r=n.value===e;n.setSelected(r),r&&(t=n)}t!==void 0&&this.onChangeCallback!==void 0&&this.onChangeCallback(t)}createValues(e,t){let n=new Map;for(let r of e){let e=new de(r,this.name,Fe(r,t));r===this.defaultValue&&e.setSelected(!0),n.set(r,e)}return n}},ze=class{attributes=new Map;constructor(e,t,n){for(let n of e){let e=this.buildOptions(n,t);this.attributes.set(n.name,new Re(e))}this.onMutationFailed=n}onMutationFailed;get(e){return this.attributes.get(e)}getSelection(){let e={};for(let[t,n]of this.attributes){let r=n.selected;r!==void 0&&(e[t]=r)}return e}handleResults(e){for(let t of e)t.success?this.get(t.name)?.handleResult(t.value):this.onMutationFailed?.(t.name,t.value)}buildOptions(e,t){let n={name:e.name,values:e.values,...e.labels!==void 0&&{labels:e.labels},onSelect:(e,n)=>{t([{name:e,value:n}],!1)}};return e.defaultValue===void 0?n:{...n,defaultValue:e.defaultValue}}},N=4096,P=16384,Be=[1024,256,64],Ve=20,F=[`timestamp`,`level`,`msg`,`service`,`trace_id`,`span_id`];function He(e){let t=new Date(e.timestamp).toLocaleTimeString(`en-GB`,{hour12:!1}),n=e.level.toUpperCase().padEnd(5),r=e.trace_id?.slice(0,8)??`--------`,i=e.msg,a=Object.entries(e).filter(([e])=>!F.includes(e)).map(([e,t])=>`${e}=${I(t,N).line}`).join(` `);return`${t} ${n} [${r}] ${i}${a?` `+a:``}`}function Ue(e){for(let t of[N,...Be]){let{line:n,truncated:r}=I(e,t);if(!r){if(n.length<=P)return n;continue}let{line:i}=I({...e,log_truncated:!0},t);if(i.length<=P)return i}let t=Object.keys(e).filter(e=>!F.includes(e)),n={...Ge(e,F),log_truncated:!0,log_dropped_count:t.length},r=I({...n,log_dropped_attrs:t.slice(0,Ve)},N);return r.line.length<=P?r.line:I(n,N).line}function I(e,t){let n=[],r=!1;return{line:JSON.stringify(e,function(e,i){if(typeof i==`string`)return i.length>t&&(r=!0),We(i,t);if(typeof i==`bigint`)return i.toString();if(typeof i!=`object`||!i)return i;for(;n.length>0&&n.at(-1)!==this;)n.pop();return n.includes(i)?`[Circular]`:(n.push(i),i)}),truncated:r}}function We(e,t){return e.length<=t?e:`${e.slice(0,t)}...[truncated ${e.length-t} chars]`}function Ge(e,t){let n={};for(let r of t)e[r]!==void 0&&(n[r]=e[r]);return n}function Ke(e,t){let n=t?He(e):Ue(e);e.level===`error`?console.error(n):e.level===`warn`?console.warn(n):console.log(n)}function qe(e,t=0){let n={name:e.name,message:e.message};return e.stack!==void 0&&(n.stack=e.stack),Ye(e,n),e.cause!==void 0&&e.cause!==null&&(n.cause=e.cause instanceof Error&&t<5?qe(e.cause,t+1):String(e.cause)),n}var Je=new Set([`name`,`message`,`stack`,`cause`]);function Ye(e,t){for(let n of Object.getOwnPropertyNames(e)){if(Je.has(n))continue;let r=e[n];r!==void 0&&(t[n]=r)}}function Xe(e){let t={};for(let[n,r]of Object.entries(e))t[n]=r instanceof Error?qe(r):r;return t}function Ze(){return new Date}function Qe(){return typeof navigator>`u`?``:navigator.userAgent}function $e(){return typeof navigator>`u`?!1:navigator.platform===`MacIntel`&&navigator.maxTouchPoints>1}function et(){return/iPhone|iPad|iPod/i.test(Qe())||$e()}function tt(){return/Android/i.test(Qe())}function nt(){return et()||tt()}var rt=class{config;constructor(e){this.config=e}log(e,t,n={}){let r=this.config.traceProvider?.()??{};Ke({timestamp:Ze().toISOString(),level:e,msg:t,service:this.config.service,...r,...Xe(n)},this.config.isDev)}debug(e,t){this.config.isDev&&this.log(`debug`,e,t)}info(e,t){this.log(`info`,e,t)}warn(e,t){this.log(`warn`,e,t)}error(e,t){this.log(`error`,e,t)}};function it(e,t){return new rt({service:e,isDev:t?.isDev===void 0?typeof process<`u`?process.env.NODE_ENV!==`production`:!0:t.isDev,traceProvider:t?.traceProvider})}function L(e){if(e!==void 0)return typeof e==`object`&&e&&!Array.isArray(e)&&!(e instanceof Error)?e:e instanceof Error?{error:e.message}:{value:e}}function at(e){return{debug:(t,n)=>e.debug(t,L(n)),info:(t,n)=>e.info(t,L(n)),warn:(t,n)=>e.warn(t,L(n)),error:(t,n)=>e.error(t,L(n))}}var ot=!1,R=at(it(`client`,{isDev:!1}));function st(){ot=!0,R=at(it(`client`,{isDev:!0}))}function ct(){return ot}var lt=class{send;instance;onMutationFailed;registry;pendingCallbacks=[];constructor(e,t,n){this.send=e,this.instance=t,this.onMutationFailed=n}handleMappingReceived(e){R.debug(`Initializing from server mapping`,{attributeCount:e.attributes.length}),this.registry=new ze(e.attributes,(e,t)=>this.sendMutation(e,t),this.onMutationFailed),this.replayPendingCallbacks()}handleMutationResult(e){this.registry?.handleResults(e.results)}select(e,t){this.sendMutation([{name:e,value:t}],!1)}selectTransient(e,t){this.sendMutation([{name:e,value:t}],!1,!0)}getValues(e){return this.registry?.get(e)?.getValues()??[]}getValue(e,t){return this.registry?.get(e)?.getValue(t)}onChange(e,t){if(this.registry===void 0){this.pendingCallbacks.push({name:e,callback:t});return}let n=this.registry.get(e);n===void 0?R.warn(`onChange: attribute "${e}" not found — callback will not fire`):n.onChange(t)}getAttribute(e){return this.registry?.get(e)}getSelection(){return this.registry?.getSelection()??{}}sendMutation(e,t,n=!1){let r={type:u.MUTATION,instance:this.instance,mutations:e,isInitial:t,...n&&{transient:!0}};this.send(r)}replayPendingCallbacks(){for(let{name:e,callback:t}of this.pendingCallbacks){let n=this.registry?.get(e);n===void 0&&R.warn(`onChange: attribute "${e}" not found — buffered callback will not fire`),n?.onChange(t)}this.pendingCallbacks.length=0}},ut=class{snapshot;callbacks=[];handleSnapshot(e){this.snapshot=e.attributes;for(let t of this.callbacks)t(e.attributes)}onChange(e){this.callbacks.push(e),this.snapshot!==void 0&&e(this.snapshot)}selectableFor(e){return this.snapshot?.find(t=>t.name===e)?.selectable??null}get current(){return this.snapshot??[]}},dt=class{send;commands=[];constructor(e){this.send=e}rotate(e){return this.validateFiniteNumber(e,`rotate`),this.commands.push({action:`rotate`,value:e}),this}tilt(e){return this.validateFiniteNumber(e,`tilt`),this.commands.push({action:`tilt`,value:e}),this}zoom(e){return this.validateFiniteNumber(e,`zoom`),this.commands.push({action:`zoom`,value:e}),this}set(){if(this.commands.length===0)throw M.invalidParameter(`No camera commands to execute. Call rotate(), tilt(), or zoom() before set().`);let e={type:u.CAMERA,commands:this.commands};this.send(e),this.commands=[]}validateFiniteNumber(e,t){if(!Number.isFinite(e))throw M.invalidParameter(`${t}() requires a finite number, got ${String(e)}`)}reset(){let e={type:u.CAMERA,commands:[{action:`reset`}]};this.send(e)}},ft=class{state;limitsState;changeCallbacks=[];constructor(){this.state={rotation:0,tilt:0,zoom:100}}get rotation(){return this.state.rotation}get tilt(){return this.state.tilt}get zoom(){return this.state.zoom}onChange(e){this.changeCallbacks.push(e)}get limits(){return this.limitsState}applyLimits(e){this.limitsState=e;let t={rotation:this.rotation,tilt:this.tilt,zoom:this.zoom};for(let e of this.changeCallbacks)e(t)}handlePositionUpdate(e){this.update(e.transforms)}update(e){let t=!1;for(let n of e)switch(n.type){case`rotation`:this.state.rotation=n.value,t=!0;break;case`tilt`:this.state.tilt=n.value,t=!0;break;case`zoom`:this.state.zoom=n.value,t=!0}if(t){let e={rotation:this.rotation,tilt:this.tilt,zoom:this.zoom};for(let t of this.changeCallbacks)t(e)}}};function pt(e,t){let n=e.filter(e=>mt(e,t));if(n.length===0)return;let r=Math.max(...n.map(ht)),i=n.filter(e=>ht(e)===r);return i.length===1?i[0]:void 0}function mt(e,t){return Object.entries(e.attributes).every(([e,n])=>t[e]===n)}function ht(e){return Object.keys(e.attributes).length}var gt=class{dispatchChange;dispatchSubmit;pricing;selection={};resolved;changeCallbacks=[];renderCallbacks=[];submitCallback;submitDefaultLabel;constructor(e,t){this.dispatchChange=e,this.dispatchSubmit=t}get current(){return this.resolved}get vatDisplay(){return this.pricing?.vatDisplay}get buttonLabel(){let e=this.pricing?.buttonLabel;if(e!=null&&e!==``)return e;if(this.submitDefaultLabel!==void 0&&this.submitDefaultLabel!==``)return this.submitDefaultLabel}get submittable(){return this.submitCallback===void 0?!1:this.pricing===void 0||this.resolved?.availability===`available`}get submitEnabled(){return this.submittable&&this.buttonLabel!==void 0}onChange(e){this.changeCallbacks.push(e)}onSubmit(e,t){this.submitCallback=e,this.submitDefaultLabel=t?.defaultLabel,this.notifyRender()}onRender(e){return this.renderCallbacks.push(e),()=>{let t=this.renderCallbacks.indexOf(e);t!==-1&&this.renderCallbacks.splice(t,1)}}async submit(){if(!this.submittable)return;let e=this.resolved===void 0?{attributes:{...this.selection},reference:``}:{attributes:this.resolved.attributes,reference:this.resolved.reference};this.dispatchSubmit(e),await this.submitCallback?.(e)}handlePricingReceived(e){this.pricing=e,this.recompute()}handleSelectionChanged(e){this.selection=e,this.recompute()}recompute(){this.resolved=this.resolve();for(let e of this.changeCallbacks)e(this.resolved);this.dispatchChange(this.resolved),this.notifyRender()}notifyRender(){for(let e of this.renderCallbacks)e()}resolve(){if(this.pricing===void 0)return;let e=pt(this.pricing.rules,this.selection);if(e!==void 0&&e.availability!==m.HIDDEN)return{attributes:{...this.selection},reference:e.reference,price:e.priceCents,currency:this.pricing.currency,availability:e.availability}}},_t=class{send;dispatch;instance;focused=null;attributes=[];changeCallbacks=[];constructor(e,t,n){this.send=e,this.dispatch=t,this.instance=n}get current(){return this.focused}set(e){if(typeof e!=`string`||e.length===0)throw M.invalidParameter(`set() requires a non-empty component name, got ${String(e)}`);this.send({type:u.FOCUS,instance:this.instance,action:f.FOCUS,component:e})}clear(){this.send({type:u.FOCUS,instance:this.instance,action:f.UNFOCUS})}onChange(e){this.changeCallbacks.push(e)}handleStateReceived(e){e.state===p.FOCUSED&&e.component!==void 0?(this.focused=e.component,this.attributes=e.attributes??[]):(this.focused=null,this.attributes=[]);let t=this.focused===null?null:{component:this.focused,attributes:this.attributes};for(let e of this.changeCallbacks)e(t);this.dispatch(t)}},vt=class{filename;developedCallbacks=new Set;errorCallbacks=new Set;developed=!1;failed=!1;photoData=null;constructor(e){this.filename=e}onDeveloped(e){return this.developed&&this.photoData!==null?(e(this.photoData),this):(this.developedCallbacks.add(e),this)}onError(e){return this.errorCallbacks.add(e),this}getFilename(){return this.filename}develop(e){this.developed||this.failed||(this.photoData=e,this.developed=!0,this.developedCallbacks.forEach(e=>{e(this.photoData)}),this.developedCallbacks.clear(),this.errorCallbacks.clear())}fail(e){this.developed||this.failed||(this.failed=!0,this.errorCallbacks.forEach(t=>{t(e)}),this.developedCallbacks.clear(),this.errorCallbacks.clear())}},yt=3e4,bt=class{send;validExtensions=[`.png`];pendingPhotos=new Map;constructor(e){this.send=e}take(e){return this.request(e,void 0)}takeOf(e,t){return this.request(e,t)}request(e,t){this.validateFilename(e),R.debug(`Taking snapshot`,{filename:e});let n=new vt(e),r=setTimeout(()=>{this.pendingPhotos.delete(e),R.warn(`Snapshot timed out`,{filename:e}),n.fail(new M(`Snapshot timed out: the viewer did not respond within ${yt}ms`,j.SNAPSHOT_FAILED))},yt);return this.pendingPhotos.set(e,{photo:n,timeout:r}),this.send({type:u.SNAPSHOT,filename:e,...t!==void 0&&{subject:t}}),n}handleSnapshotResult(e){let t=this.pendingPhotos.get(e.filename);if(t===void 0){R.warn(`No pending photo found for filename`,{filename:e.filename,pendingFilenames:Array.from(this.pendingPhotos.keys())});return}clearTimeout(t.timeout),this.pendingPhotos.delete(e.filename);let{photo:n}=t;e.error===void 0?e.data!==void 0&&n.develop({filename:e.filename,data:e.data}):n.fail(new M(e.error,j.SNAPSHOT_FAILED))}clear(){if(this.pendingPhotos.size===0)return;let e=new M(`Client destroyed before snapshot completed`,j.SNAPSHOT_FAILED);for(let{photo:t,timeout:n}of this.pendingPhotos.values())clearTimeout(n),t.fail(e);this.pendingPhotos.clear()}validateFilename(e){if(e===``||typeof e!=`string`)throw new M(`Filename must be a non-empty string`,j.INVALID_PARAMETER);if(!this.validExtensions.some(t=>e.toLowerCase().endsWith(t)))throw new M(`Invalid filename: "${e}". Filename must end with one of: ${this.validExtensions.join(`, `)}`,j.INVALID_PARAMETER);if(e.includes(`..`)||e.includes(`/`)||e.includes(`\\`))throw new M(`Filename cannot contain path separators or ".."`,j.INVALID_PARAMETER)}},xt=class{container=null;attach(e){this.container=e}dispatch(e,t,n=!1){let r=new CustomEvent(e,{detail:t,cancelable:n});return this.container?.dispatchEvent(r),r}on(e,t){let n=e=>{let n=e;t({...n.detail,preventDefault:()=>{n.preventDefault()}})};return this.container?.addEventListener(e,n),()=>{this.container?.removeEventListener(e,n)}}},St=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Bezig…`:n===`de`?`Läuft…`:`Working…`}),Ct=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Mislukt`:n===`de`?`Fehlgeschlagen`:`Failed`}),wt=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Gelukt`:n===`de`?`Fertig`:`Done`}),Tt=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Annotaties`:n===`de`?`Anmerkungen`:`Annotations`}),Et=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`AR activeren`:n===`de`?`AR aktivieren`:`Activate AR`}),Dt=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Camera resetten`:n===`de`?`Kamera zurücksetzen`:`Reset camera`}),Ot=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Naar links draaien`:n===`de`?`Nach links drehen`:`Rotate left`}),kt=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Naar rechts draaien`:n===`de`?`Nach rechts drehen`:`Rotate right`}),At=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Omlaag kantelen`:n===`de`?`Nach unten kippen`:`Tilt down`}),jt=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Omhoog kantelen`:n===`de`?`Nach oben kippen`:`Tilt up`}),Mt=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Inzoomen`:n===`de`?`Hineinzoomen`:`Zoom in`}),Nt=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Uitzoomen`:n===`de`?`Herauszoomen`:`Zoom out`}),Pt=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Sluiten`:n===`de`?`Schließen`:`Close`}),Ft=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Configureren`:n===`de`?`Konfigurieren`:`Configure`}),It=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Volledig scherm`:n===`de`?`Vollbild`:`Fullscreen`}),Lt=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Sluiten`:n===`de`?`Schließen`:`Close`}),Rt=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`QR-code`:n===`de`?`QR-Code`:`QR code`}),zt=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Gebruik de camera van je smartphone om deze QR-code te scannen`:n===`de`?`Verwende die Kamera deines Smartphones, um diesen QR-Code zu scannen`:`Use your smartphone camera to scan this QR code`}),Bt=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Je telefoon opent het 3D-model in AR-modus.`:n===`de`?`Dein Telefon öffnet das 3D-Modell im AR-Modus.`:`Your phone will open the 3D model in AR mode.`}),Vt=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Scan om in AR te bekijken`:n===`de`?`Scannen für AR-Ansicht`:`Scan to view in AR`}),Ht=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`We kunnen de QR-code nu niet tonen. Open deze link op je telefoon:`:n===`de`?`Wir können den QR-Code gerade nicht anzeigen. Öffne diesen Link auf deinem Handy:`:`We can't show the QR code right now. Open this link on your phone:`}),Ut=((e={},t={})=>(t.locale??D(),`Screenshot`)),Wt=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Downloaden`:n===`de`?`Herunterladen`:`Downloading`}),Gt=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Laden mislukt. Ververs de pagina om het opnieuw te proberen.`:n===`de`?`Laden fehlgeschlagen. Lade die Seite neu, um es erneut zu versuchen.`:`Load failed. Refresh the page to try again.`}),Kt={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},qt=([e,t,n])=>{let r=document.createElementNS(`http://www.w3.org/2000/svg`,e);return Object.keys(t).forEach(e=>{r.setAttribute(e,String(t[e]))}),n?.length&&n.forEach(e=>{let t=qt(e);r.appendChild(t)}),r},Jt=(e,t={})=>qt([`svg`,{...Kt,...t},e]),Yt=[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`}],[`path`,{d:`M12 22V12`}]],Xt=[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`}],[`circle`,{cx:`12`,cy:`13`,r:`3`}]],Zt=[[`path`,{d:`m6 9 6 6 6-6`}]],Qt=[[`path`,{d:`m15 18-6-6 6-6`}]],$t=[[`path`,{d:`m9 18 6-6-6-6`}]],en=[[`path`,{d:`m18 15-6-6-6 6`}]],tn=[[`path`,{d:`M12.75 7.09a3 3 0 0 1 2.16 2.16`}],[`path`,{d:`M17.072 17.072c-1.634 2.17-3.527 3.912-4.471 4.727a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 1.432-4.568`}],[`path`,{d:`m2 2 20 20`}],[`path`,{d:`M8.475 2.818A8 8 0 0 1 20 10c0 1.183-.31 2.377-.81 3.533`}],[`path`,{d:`M9.13 9.13a3 3 0 0 0 3.74 3.74`}]],nn=[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`}],[`circle`,{cx:`12`,cy:`10`,r:`3`}]],rn=[[`path`,{d:`M15 3h6v6`}],[`path`,{d:`m21 3-7 7`}],[`path`,{d:`m3 21 7-7`}],[`path`,{d:`M9 21H3v-6`}]],an=[[`path`,{d:`m14 10 7-7`}],[`path`,{d:`M20 10h-6V4`}],[`path`,{d:`m3 21 7-7`}],[`path`,{d:`M4 14h6v6`}]],on=[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`}],[`path`,{d:`M3 3v5h5`}]],sn=[[`path`,{d:`M10 5H3`}],[`path`,{d:`M12 19H3`}],[`path`,{d:`M14 3v4`}],[`path`,{d:`M16 17v4`}],[`path`,{d:`M21 12h-9`}],[`path`,{d:`M21 19h-5`}],[`path`,{d:`M21 5h-7`}],[`path`,{d:`M8 10v4`}],[`path`,{d:`M8 12H3`}]],cn=[[`path`,{d:`M18 6 6 18`}],[`path`,{d:`m6 6 12 12`}]],ln=[[`circle`,{cx:`11`,cy:`11`,r:`8`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`}]],un=[[`circle`,{cx:`11`,cy:`11`,r:`8`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`}]];function z(e,{size:t=20,strokeWidth:n=1.75}={}){return Jt(e,{width:t,height:t,"stroke-width":n})}var B={ar:e=>z(Yt,e),annotations:e=>z(nn,e),annotationsOff:e=>z(tn,e),fullscreen:e=>z(rn,e),exitFullscreen:e=>z(an,e),screenshot:e=>z(Xt,e),tiltUp:e=>z(en,e),tiltDown:e=>z(Zt,e),rotateLeft:e=>z(Qt,e),rotateRight:e=>z($t,e),zoomIn:e=>z(ln,e),zoomOut:e=>z(un,e),reset:e=>z(on,e),configurator:e=>z(sn,e),close:e=>z(cn,e)},V=class{element;constructor({variant:e=`default`,size:t=`default`,label:n,icon:r,onClick:i,disabled:a=!1}={}){this.element=document.createElement(`button`),this.element.className=`ui-btn ui-btn--${e} ui-btn--size-${t}`,n!==void 0&&(this.element.setAttribute(`aria-label`,n),this.element.title=n),r===void 0?n!==void 0&&(this.element.textContent=n):this.element.appendChild(r),i&&this.element.addEventListener(`click`,i),this.element.disabled=a}setIcon(e){let t=this.element.querySelector(`svg`);t===null?this.element.appendChild(e):t.replaceWith(e)}},dn=class{element;selectCallback=null;constructor(e,t,n){this.element=document.createElement(`div`),this.element.className=`ui-toggle-group`;for(let r=0;r<e.length;r++){let i=e[r],a=document.createElement(`button`);a.className=`ui-toggle-group-item`,a.dataset.value=i,a.textContent=n?.[r]??i,a.dataset.state=i===t?`on`:`off`,a.setAttribute(`aria-pressed`,i===t?`true`:`false`),a.addEventListener(`click`,()=>{this.selectCallback?.(i)}),this.element.appendChild(a)}}setSelected(e){for(let t of this.element.querySelectorAll(`.ui-toggle-group-item`)){let n=t.dataset.value===e;t.dataset.state=n?`on`:`off`,t.setAttribute(`aria-pressed`,n?`true`:`false`)}}onSelect(e){this.selectCallback=e}setEnabled(e){for(let t of this.element.querySelectorAll(`.ui-toggle-group-item`)){let n=e===null||e.includes(t.dataset.value??``);t.disabled=!n,t.setAttribute(`aria-disabled`,n?`false`:`true`)}}},fn=class{element;select;constructor(e,t,n,r,i){this.select=document.createElement(`select`),this.select.className=`ui-native-select`,this.select.dataset.name=e,this.select.setAttribute(`aria-label`,n);let a=document.createElement(`option`);a.value=``,a.disabled=!0,a.textContent=n,this.select.appendChild(a);let o=!1;for(let e=0;e<t.length;e++){let n=t[e],a=document.createElement(`option`);a.value=n,a.textContent=i?.[e]??n,n===r&&(a.selected=!0,o=!0),this.select.appendChild(a)}o||(a.selected=!0);let s=Jt(Zt,{width:16,height:16,"stroke-width":2});s.classList.add(`ui-native-select-icon`),this.element=document.createElement(`div`),this.element.className=`ui-native-select-wrap`,this.element.appendChild(this.select),this.element.appendChild(s)}setSelected(e){this.select.value=e}onSelect(e){this.select.addEventListener(`change`,()=>{e(this.select.value)})}setEnabled(e){for(let t of this.select.options)t.value!==``&&(t.disabled=e!==null&&!e.includes(t.value))}},pn=class{element;input;valueText;values;options;selectCallback=null;settleCallback=null;constructor(e,t){if(e.length===0)throw Error(`Virtualdisplay: Slider needs at least one value`);this.values=e,this.options=t,this.input=document.createElement(`input`),this.input.type=`range`,this.input.className=`ui-slider-input`,this.input.min=`0`,this.input.max=String(e.length-1),this.input.step=`1`,this.input.setAttribute(`aria-label`,t.label),this.valueText=document.createElement(`span`),this.valueText.className=`ui-slider-value`,this.valueText.setAttribute(`aria-hidden`,`true`);let n=document.createElement(`div`);n.className=`ui-slider-track`,n.appendChild(this.input),n.appendChild(this.buildEnds()),this.element=document.createElement(`div`),this.element.className=`ui-slider`,this.element.appendChild(n),this.element.appendChild(this.valueText);let r=t.initialSelected===void 0?0:e.indexOf(t.initialSelected);this.applyIndex(r===-1?0:r),this.listen()}setSelected(e){let t=this.values.indexOf(e);t!==-1&&this.applyIndex(t)}onSelect(e){this.selectCallback=e}onSettle(e){this.settleCallback=e}listen(){this.input.addEventListener(`input`,()=>{let e=this.values[this.currentIndex];e!==void 0&&(this.applyIndex(this.currentIndex),this.selectCallback?.(e))}),this.input.addEventListener(`change`,()=>{let e=this.values[this.currentIndex];e!==void 0&&this.settleCallback?.(e)})}get currentIndex(){return Number(this.input.value)}applyIndex(e){this.input.value=String(e);let t=this.displayAt(e);this.valueText.textContent=t,this.input.setAttribute(`aria-valuetext`,t);let n=this.values.length===1?100:e/(this.values.length-1)*100;this.element.style.setProperty(`--ui-slider-pct`,`${n}%`)}buildEnds(){let e=document.createElement(`div`);e.className=`ui-slider-ends`,e.setAttribute(`aria-hidden`,`true`);for(let t of[0,this.values.length-1]){let n=document.createElement(`span`);n.textContent=this.labelAt(t),e.appendChild(n)}return e}labelAt(e){return this.options.labels?.[e]??this.values[e]??``}displayAt(e){let t=this.labelAt(e);return this.options.unit===void 0?t:`${t} ${this.options.unit}`}},H={neutral:{50:`oklch(98.5% 0 0)`,100:`oklch(96.5% 0 0)`,200:`oklch(92% 0 0)`,300:`oklch(82% 0 0)`,400:`oklch(70% 0 0)`,500:`oklch(55.5% 0 0)`,600:`oklch(44.5% 0 0)`,700:`oklch(37% 0 0)`,800:`oklch(27% 0 0)`,900:`oklch(21% 0 0)`,950:`oklch(14.5% 0 0)`},white:`oklch(100% 0 0)`,semantic:{error:`oklch(47% 0.17 25)`}},U={px:`1px`,0:`0`,.5:`0.125rem`,1:`0.25rem`,1.5:`0.375rem`,2:`0.5rem`,2.5:`0.625rem`,3:`0.75rem`,3.5:`0.875rem`,4:`1rem`,5:`1.25rem`,6:`1.5rem`,7:`1.75rem`,8:`2rem`,9:`2.25rem`,10:`2.5rem`,12:`3rem`,14:`3.5rem`,16:`4rem`,20:`5rem`,24:`6rem`},W={fontFamily:{sans:[`Mona Sans`,`ui-sans-serif`,`system-ui`,`sans-serif`,`Apple Color Emoji`,`Segoe UI Emoji`,`Segoe UI Symbol`,`Noto Color Emoji`],mono:[`JetBrains Mono`,`ui-monospace`,`monospace`]},fontSize:{xs:`0.75rem`,sm:`0.875rem`,base:`1rem`,lg:`1.125rem`,xl:`1.25rem`,"2xl":`1.5rem`,"3xl":`1.875rem`,"4xl":`2.25rem`},fontWeight:{normal:`400`,medium:`500`,semibold:`600`,bold:`700`},lineHeight:{tight:`1.25`,normal:`1.5`,relaxed:`1.75`}},mn=class{element;constructor(){this.element=document.createElement(`div`),Object.assign(this.element.style,{background:H.white,borderRadius:`var(--radius)`,padding:U[6],boxShadow:`0 ${U[2]} ${U[8]} oklch(0% 0 0 / 20%)`,maxWidth:`20rem`,width:`100%`})}},hn=class{options;card;backdrop;keyHandler=null;constructor(e={}){this.options=e,this.card=new mn,this.backdrop=this.createBackdrop(),this.backdrop.appendChild(this.card.element)}get content(){return this.card.element}open(){document.body.appendChild(this.backdrop),this.keyHandler=e=>{e.key===`Escape`&&this.close()},document.addEventListener(`keydown`,this.keyHandler)}close(){this.backdrop.remove(),this.keyHandler!==null&&(document.removeEventListener(`keydown`,this.keyHandler),this.keyHandler=null),this.options.onClose?.()}createBackdrop(){let e=document.createElement(`div`);return Object.assign(e.style,{position:`fixed`,inset:U[0],background:`oklch(0% 0 0 / 50%)`,zIndex:`9999`,display:`flex`,alignItems:`center`,justifyContent:`center`}),e.addEventListener(`click`,t=>{t.target===e&&this.close()}),e}},G=W.fontFamily.sans.join(`, `),gn=`
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.VirtualdisplayClient={}))})(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),c=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},l=(e,r,i)=>(i=e==null?{}:t(a(e)),c(r||!e||!e.__esModule||!o.call(e,`default`)?n(i,`default`,{value:e,enumerable:!0}):i,e)),u={HANDSHAKE:`handshake`,SESSION:`session`,MUTATION:`mutation`,STATE:`state`,LOADING_INDICATOR:`loading_indicator`,CAMERA:`camera`,SNAPSHOT:`snapshot`,MAPPING:`mapping`,AR_ACTIVATE:`ar_activate`,FULLSCREEN:`fullscreen`,CONFIG:`config`,ANNOTATION_TOGGLE:`annotation_toggle`,FOCUS:`focus`,PRICING:`pricing`,QR_SHOWN:`qr_shown`,SYNC:`sync`,SELECTABLE:`selectable`,APP_RESOLVED:`app_resolved`},d=`main`,f={FOCUS:`focus`,UNFOCUS:`unfocus`},p={FOCUSED:`focused`,UNFOCUSED:`unfocused`},m={AVAILABLE:`available`,VIEW_ONLY:`view_only`,HIDDEN:`hidden`};function h(e){return typeof e!=`object`||!e?null:e}var g=new Set(Object.values(u));function _(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.target!=`string`&&typeof t.type==`string`&&g.has(t.type)}function v(e){let t=h(e);return t!==null&&t.type===u.HANDSHAKE}function y(e){let t=h(e);return t!==null&&t.type===u.SESSION&&typeof t.sessionId==`string`}function b(e){let t=h(e);return t!==null&&t.type===u.APP_RESOLVED&&typeof t.appType==`string`&&t.appType!==``&&typeof t.name==`string`}function x(e){let t=h(e);return t!==null&&t.type===u.MUTATION&&typeof t.instance==`string`&&t.instance!==``&&Array.isArray(t.results)}function S(e){let t=h(e);return t!==null&&t.type===u.SNAPSHOT&&(`data`in t||`error`in t)}function C(e){let t=h(e);return t!==null&&t.type===u.CAMERA&&Array.isArray(t.transforms)}function ee(e){let t=h(e);return t!==null&&t.type===u.MAPPING&&typeof t.instance==`string`&&t.instance!==``&&Array.isArray(t.attributes)}function te(e){let t=h(e);return t!==null&&t.type===u.LOADING_INDICATOR&&typeof t.progress==`number`}function ne(e){let t=h(e);return t!==null&&t.type===u.SYNC&&typeof t.connected==`boolean`}function re(e){let t=h(e);return t!==null&&t.type===u.SELECTABLE&&typeof t.instance==`string`&&t.instance!==``&&Array.isArray(t.attributes)}function ie(e){let t=h(e);return t!==null&&t.type===u.CONFIG&&typeof t.viewerSettings==`object`}function ae(e){let t=h(e);return t!==null&&t.type===u.FOCUS&&typeof t.instance==`string`&&t.instance!==``&&typeof t.state==`string`}function oe(e){let t=h(e);return t!==null&&t.type===u.PRICING&&typeof t.instance==`string`&&t.instance!==``&&typeof t.pricing==`object`&&t.pricing!==null}var se=class{processor;pending=[];isReady=!1;constructor(e){this.processor=e}enqueue(e){this.isReady?this.processor(e):this.pending.push(e)}markReady(){if(this.isReady||(this.isReady=!0,this.pending.length===0))return;let e=[...this.pending];this.pending.length=0;for(let t of e)this.processor(t)}hasPending(e){return this.pending.some(t=>t.type===e)}clear(){this.pending.length=0}},ce=class{getTarget;handlers=new Map;publisher;consumer;listener=null;sourceId;targetOrigin;isValid;onHandlerError;constructor(e,t){this.getTarget=e,this.sourceId=`vd-${Math.random().toString(36).slice(2,8)}`,this.targetOrigin=`*`,this.isValid=t?.isValid??_,this.onHandlerError=t?.onHandlerError??le,this.publisher=new se(e=>this.post(e)),this.consumer=new se(e=>this.routeToHandler(e)),t?.bufferIncoming!==!0&&this.consumer.markReady()}on(e,t){this.handlers.set(e,t)}setTargetOrigin(e){this.targetOrigin=e}send(e){this.publisher.enqueue(e)}receive(e){this.isValid(e)&&this.consumer.enqueue(e)}markReady(){this.publisher.markReady()}markConsumerReady(){this.consumer.markReady()}consumerHasPending(e){return this.consumer.hasPending(e)}start(){this.listener===null&&(this.listener=e=>{let{data:t}=e;if(!this.isValid(t)||t._source===this.sourceId)return;let n=this.getTarget();if(n!==null&&e.source!==null&&e.source!==n)return;let r=t;this.consumer.enqueue(r)},window.addEventListener(`message`,this.listener))}destroy(){this.listener!==null&&(window.removeEventListener(`message`,this.listener),this.listener=null),this.publisher.clear(),this.consumer.clear(),this.handlers.clear()}post(e){let t=this.getTarget();t!==null&&t.postMessage({...e,_source:this.sourceId},this.targetOrigin)}routeToHandler(e){let t=this.handlers.get(e.type);if(t===void 0)return;let n;try{n=t(e)}catch(t){this.onHandlerError(e,t);return}n instanceof Promise&&n.catch(t=>{this.onHandlerError(e,t)})}};function le(e,t){let n=t instanceof Error?t.message:String(t);console.error(`Virtualdisplay: error handling ${e.type}: ${n}`)}u.CAMERA,u.LOADING_INDICATOR;var ue=class{send;instance;constructor(e,t){this.send=e,this.instance=t}setEnabled(e){this.send({type:u.ANNOTATION_TOGGLE,instance:this.instance,enabled:e})}},de=class{value;attribute;label;isSelectedValue=!1;constructor(e,t,n){this.value=e,this.attribute=t,this.label=n}get isSelected(){return this.isSelectedValue}setSelected(e){this.isSelectedValue=e}},fe={},pe=[`en`,`nl`,`de`],me=`PARAGLIDE_LOCALE`,w=[`globalVariable`,`baseLocale`],he=[],T=typeof window>`u`;globalThis.__paraglide=globalThis.__paraglide??{},globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};var E,ge=!1,D=()=>{let e=w;!T&&typeof window<`u`&&window.location?.href&&(e=Ne(window.location.href));let t=_e(e,typeof window<`u`?window.location?.href:void 0);if(t)return ge||(E=t,ge=!0,ye(t,{reload:!1})),t;throw Error(`No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found`)};function _e(e,t){let n;for(let t of e){if(t===`baseLocale`)n=`en`;else if(t===`globalVariable`&&E!==void 0)n=E;else if(Pe(t)&&A.has(t)){let e=A.get(t);if(e){let t=e.getLocale();if(t instanceof Promise)continue;if(t!==void 0)return xe(t)}}let e=O(n);if(e)return e}}var ve=e=>{e?window.location.href=e:window.location.reload()},ye=(e,t)=>{let n={reload:!0,...t},r;try{r=D()}catch{}let i=[],a=w;!T&&typeof window<`u`&&window.location?.href&&(a=Ne(window.location.href));for(let t of a)if(t===`globalVariable`)E=e;else if(t===`baseLocale`)continue;else if(Pe(t)&&A.has(t)){let n=A.get(t);if(n){let r=n.setLocale(e);r instanceof Promise&&(r=r.catch(e=>{throw Error(`Custom strategy "${t}" setLocale failed.`,{cause:e})}),i.push(r))}}let o=()=>{!T&&n.reload&&window.location&&e!==r&&ve(void 0)};if(i.length)return Promise.all(i).then(()=>{o()});o()},be=()=>typeof window<`u`?window.location.origin:`http://fallback.com`;function O(e){if(typeof e!=`string`)return;let t=e.toLowerCase();for(let e of pe)if(e.toLowerCase()===t)return e}function xe(e){let t=O(e);if(t)return t;throw Error(`Invalid locale: ${e}. Expected one of: ${pe.join(`, `)}`)}function k(e){return e}function Se(e,t){return new fe(e,t.href)}function Ce(){return 0}function we(e){return he}function Te(e,t){return e.exec(t.href)}var Ee=me.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);RegExp(`(?:^|;\\s*)${Ee}=([^;]*)`);function De(e){return Oe(e)}function Oe(e){let t=k(typeof e==`string`?new URL(e,be()):new URL(e.href)),n=t.pathname.replace(/^\/+/,``).split(`/`);return n.length>0&&O(n[0])&&(t.pathname=`/`+n.slice(1).join(`/`)),k(t)}var ke=-1,Ae,je;function Me(e){if(he.length===0)return;let t=typeof e==`string`?e:e.href,n=Ce();if(Ae===t&&ke===n)return je;let r=k(new URL(t,`http://example.com`)),i=De(r),a=i.href===r.href?[r]:[r,i],o;for(let e of a){for(let t of we(e))if(Te(Se(t.match,e),e)){o=t;break}if(o)break}return ke=n,Ae=t,je=o,o}function Ne(e){let t=Me(e);return t&&t.exclude!==!0&&Array.isArray(t.strategy)?t.strategy:w}var A=new Map;function Pe(e){return typeof e==`string`&&/^custom-[A-Za-z0-9_-]+$/.test(e)}function Fe(e,t){return Ie(t!==void 0&&Object.hasOwn(t,e)?t[e]:void 0)??Le(e)}function Ie(e){if(e===void 0)return;for(let t of[D(),`nl`,`en`])if(Object.hasOwn(e,t)&&e[t]!==void 0)return e[t];let[t]=Object.values(e);return t}function Le(e){let t=e.replace(/([A-Z])/g,` $1`).trim();return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}var j={NO_MAPPING:`NO_MAPPING`,ATTRIBUTE_NOT_FOUND:`ATTRIBUTE_NOT_FOUND`,VALUE_NOT_FOUND:`VALUE_NOT_FOUND`,PARENT_NOT_FOUND:`PARENT_NOT_FOUND`,INVALID_PARAMETER:`INVALID_PARAMETER`,SNAPSHOT_FAILED:`SNAPSHOT_FAILED`},M=class e extends Error{code;constructor(e,t){super(e),this.name=`VirtualdisplayError`,this.code=t}static valueNotFound(t,n){return new e(`Value "${n}" not found for attribute "${t}"`,j.VALUE_NOT_FOUND)}static parentNotFound(t){return new e(`Parent element not found: ${t}`,j.PARENT_NOT_FOUND)}static invalidParameter(t){return new e(t,j.INVALID_PARAMETER)}},Re=class{name;defaultValue;values;onSelect;onChangeCallback;constructor(e){this.name=e.name,this.defaultValue=e.defaultValue,this.onSelect=e.onSelect,this.values=this.createValues(e.values,e.labels)}select(e){if(!this.values.has(e))throw M.valueNotFound(this.name,e);this.onSelect(this.name,e)}getValues(){return Array.from(this.values.values())}getValue(e){return this.values.get(e)}get selected(){for(let e of this.values.values())if(e.isSelected)return e.value}onChange(e){this.onChangeCallback=e}handleResult(e){let t;for(let n of this.values.values()){let r=n.value===e;n.setSelected(r),r&&(t=n)}t!==void 0&&this.onChangeCallback!==void 0&&this.onChangeCallback(t)}createValues(e,t){let n=new Map;for(let r of e){let e=new de(r,this.name,Fe(r,t));r===this.defaultValue&&e.setSelected(!0),n.set(r,e)}return n}},ze=class{attributes=new Map;constructor(e,t,n){for(let n of e){let e=this.buildOptions(n,t);this.attributes.set(n.name,new Re(e))}this.onMutationFailed=n}onMutationFailed;get(e){return this.attributes.get(e)}getSelection(){let e={};for(let[t,n]of this.attributes){let r=n.selected;r!==void 0&&(e[t]=r)}return e}handleResults(e){for(let t of e)t.success?this.get(t.name)?.handleResult(t.value):this.onMutationFailed?.(t.name,t.value)}buildOptions(e,t){let n={name:e.name,values:e.values,...e.labels!==void 0&&{labels:e.labels},onSelect:(e,n)=>{t([{name:e,value:n}],!1)}};return e.defaultValue===void 0?n:{...n,defaultValue:e.defaultValue}}},N=4096,P=16384,Be=[1024,256,64],Ve=20,F=[`timestamp`,`level`,`msg`,`service`,`trace_id`,`span_id`];function He(e){let t=new Date(e.timestamp).toLocaleTimeString(`en-GB`,{hour12:!1}),n=e.level.toUpperCase().padEnd(5),r=e.trace_id?.slice(0,8)??`--------`,i=e.msg,a=Object.entries(e).filter(([e])=>!F.includes(e)).map(([e,t])=>`${e}=${I(t,N).line}`).join(` `);return`${t} ${n} [${r}] ${i}${a?` `+a:``}`}function Ue(e){for(let t of[N,...Be]){let{line:n,truncated:r}=I(e,t);if(!r){if(n.length<=P)return n;continue}let{line:i}=I({...e,log_truncated:!0},t);if(i.length<=P)return i}let t=Object.keys(e).filter(e=>!F.includes(e)),n={...Ge(e,F),log_truncated:!0,log_dropped_count:t.length},r=I({...n,log_dropped_attrs:t.slice(0,Ve)},N);return r.line.length<=P?r.line:I(n,N).line}function I(e,t){let n=[],r=!1;return{line:JSON.stringify(e,function(e,i){if(typeof i==`string`)return i.length>t&&(r=!0),We(i,t);if(typeof i==`bigint`)return i.toString();if(typeof i!=`object`||!i)return i;for(;n.length>0&&n.at(-1)!==this;)n.pop();return n.includes(i)?`[Circular]`:(n.push(i),i)}),truncated:r}}function We(e,t){return e.length<=t?e:`${e.slice(0,t)}...[truncated ${e.length-t} chars]`}function Ge(e,t){let n={};for(let r of t)e[r]!==void 0&&(n[r]=e[r]);return n}function Ke(e,t){let n=t?He(e):Ue(e);e.level===`error`?console.error(n):e.level===`warn`?console.warn(n):console.log(n)}function qe(e,t=0){let n={name:e.name,message:e.message};return e.stack!==void 0&&(n.stack=e.stack),Ye(e,n),e.cause!==void 0&&e.cause!==null&&(n.cause=e.cause instanceof Error&&t<5?qe(e.cause,t+1):String(e.cause)),n}var Je=new Set([`name`,`message`,`stack`,`cause`]);function Ye(e,t){for(let n of Object.getOwnPropertyNames(e)){if(Je.has(n))continue;let r=e[n];r!==void 0&&(t[n]=r)}}function Xe(e){let t={};for(let[n,r]of Object.entries(e))t[n]=r instanceof Error?qe(r):r;return t}function Ze(){return new Date}function Qe(){return typeof navigator>`u`?``:navigator.userAgent}function $e(){return typeof navigator>`u`?!1:navigator.platform===`MacIntel`&&navigator.maxTouchPoints>1}function et(){return/iPhone|iPad|iPod/i.test(Qe())||$e()}function tt(){return/Android/i.test(Qe())}function nt(){return et()||tt()}var rt=class{config;constructor(e){this.config=e}log(e,t,n={}){let r=this.config.traceProvider?.()??{};Ke({timestamp:Ze().toISOString(),level:e,msg:t,service:this.config.service,...r,...Xe(n)},this.config.isDev)}debug(e,t){this.config.isDev&&this.log(`debug`,e,t)}info(e,t){this.log(`info`,e,t)}warn(e,t){this.log(`warn`,e,t)}error(e,t){this.log(`error`,e,t)}};function it(e,t){return new rt({service:e,isDev:t?.isDev===void 0?typeof process<`u`?process.env.NODE_ENV!==`production`:!0:t.isDev,traceProvider:t?.traceProvider})}function L(e){if(e!==void 0)return typeof e==`object`&&e&&!Array.isArray(e)&&!(e instanceof Error)?e:e instanceof Error?{error:e.message}:{value:e}}function at(e){return{debug:(t,n)=>e.debug(t,L(n)),info:(t,n)=>e.info(t,L(n)),warn:(t,n)=>e.warn(t,L(n)),error:(t,n)=>e.error(t,L(n))}}var ot=!1,R=at(it(`client`,{isDev:!1}));function st(){ot=!0,R=at(it(`client`,{isDev:!0}))}function ct(){return ot}var lt=class{send;instance;onMutationFailed;registry;pendingCallbacks=[];constructor(e,t,n){this.send=e,this.instance=t,this.onMutationFailed=n}handleMappingReceived(e){R.debug(`Initializing from server mapping`,{attributeCount:e.attributes.length}),this.registry=new ze(e.attributes,(e,t)=>this.sendMutation(e,t),this.onMutationFailed),this.replayPendingCallbacks()}handleMutationResult(e){this.registry?.handleResults(e.results)}select(e,t){this.sendMutation([{name:e,value:t}],!1)}selectTransient(e,t){this.sendMutation([{name:e,value:t}],!1,!0)}getValues(e){return this.registry?.get(e)?.getValues()??[]}getValue(e,t){return this.registry?.get(e)?.getValue(t)}onChange(e,t){if(this.registry===void 0){this.pendingCallbacks.push({name:e,callback:t});return}let n=this.registry.get(e);n===void 0?R.warn(`onChange: attribute "${e}" not found — callback will not fire`):n.onChange(t)}getAttribute(e){return this.registry?.get(e)}getSelection(){return this.registry?.getSelection()??{}}sendMutation(e,t,n=!1){let r={type:u.MUTATION,instance:this.instance,mutations:e,isInitial:t,...n&&{transient:!0}};this.send(r)}replayPendingCallbacks(){for(let{name:e,callback:t}of this.pendingCallbacks){let n=this.registry?.get(e);n===void 0&&R.warn(`onChange: attribute "${e}" not found — buffered callback will not fire`),n?.onChange(t)}this.pendingCallbacks.length=0}},ut=class{snapshot;callbacks=[];handleSnapshot(e){this.snapshot=e.attributes;for(let t of this.callbacks)t(e.attributes)}onChange(e){this.callbacks.push(e),this.snapshot!==void 0&&e(this.snapshot)}selectableFor(e){return this.snapshot?.find(t=>t.name===e)?.selectable??null}get current(){return this.snapshot??[]}},dt=class{send;commands=[];constructor(e){this.send=e}rotate(e){return this.validateFiniteNumber(e,`rotate`),this.commands.push({action:`rotate`,value:e}),this}tilt(e){return this.validateFiniteNumber(e,`tilt`),this.commands.push({action:`tilt`,value:e}),this}zoom(e){return this.validateFiniteNumber(e,`zoom`),this.commands.push({action:`zoom`,value:e}),this}set(){if(this.commands.length===0)throw M.invalidParameter(`No camera commands to execute. Call rotate(), tilt(), or zoom() before set().`);let e={type:u.CAMERA,commands:this.commands};this.send(e),this.commands=[]}validateFiniteNumber(e,t){if(!Number.isFinite(e))throw M.invalidParameter(`${t}() requires a finite number, got ${String(e)}`)}reset(){let e={type:u.CAMERA,commands:[{action:`reset`}]};this.send(e)}},ft=class{state;limitsState;changeCallbacks=[];constructor(){this.state={rotation:0,tilt:0,zoom:100}}get rotation(){return this.state.rotation}get tilt(){return this.state.tilt}get zoom(){return this.state.zoom}onChange(e){this.changeCallbacks.push(e)}get limits(){return this.limitsState}applyLimits(e){this.limitsState=e;let t={rotation:this.rotation,tilt:this.tilt,zoom:this.zoom};for(let e of this.changeCallbacks)e(t)}handlePositionUpdate(e){this.update(e.transforms)}update(e){let t=!1;for(let n of e)switch(n.type){case`rotation`:this.state.rotation=n.value,t=!0;break;case`tilt`:this.state.tilt=n.value,t=!0;break;case`zoom`:this.state.zoom=n.value,t=!0}if(t){let e={rotation:this.rotation,tilt:this.tilt,zoom:this.zoom};for(let t of this.changeCallbacks)t(e)}}};function pt(e,t){let n=e.filter(e=>mt(e,t));if(n.length===0)return;let r=Math.max(...n.map(ht)),i=n.filter(e=>ht(e)===r);return i.length===1?i[0]:void 0}function mt(e,t){return Object.entries(e.attributes).every(([e,n])=>t[e]===n)}function ht(e){return Object.keys(e.attributes).length}var gt=class{dispatchChange;dispatchSubmit;pricing;selection={};resolved;changeCallbacks=[];renderCallbacks=[];submitCallback;submitDefaultLabel;constructor(e,t){this.dispatchChange=e,this.dispatchSubmit=t}get current(){return this.resolved}get vatDisplay(){return this.pricing?.vatDisplay}get buttonLabel(){let e=this.pricing?.buttonLabel;if(e!=null&&e!==``)return e;if(this.submitDefaultLabel!==void 0&&this.submitDefaultLabel!==``)return this.submitDefaultLabel}get submittable(){return this.submitCallback===void 0?!1:this.pricing===void 0||this.resolved?.availability===`available`}get submitEnabled(){return this.submittable&&this.buttonLabel!==void 0}onChange(e){this.changeCallbacks.push(e)}onSubmit(e,t){this.submitCallback=e,this.submitDefaultLabel=t?.defaultLabel,this.notifyRender()}onRender(e){return this.renderCallbacks.push(e),()=>{let t=this.renderCallbacks.indexOf(e);t!==-1&&this.renderCallbacks.splice(t,1)}}async submit(){if(!this.submittable)return;let e=this.resolved===void 0?{attributes:{...this.selection},reference:``}:{attributes:this.resolved.attributes,reference:this.resolved.reference};this.dispatchSubmit(e),await this.submitCallback?.(e)}handlePricingReceived(e){this.pricing=e,this.recompute()}handleSelectionChanged(e){this.selection=e,this.recompute()}recompute(){this.resolved=this.resolve();for(let e of this.changeCallbacks)e(this.resolved);this.dispatchChange(this.resolved),this.notifyRender()}notifyRender(){for(let e of this.renderCallbacks)e()}resolve(){if(this.pricing===void 0)return;let e=pt(this.pricing.rules,this.selection);if(e!==void 0&&e.availability!==m.HIDDEN)return{attributes:{...this.selection},reference:e.reference,price:e.priceCents,currency:this.pricing.currency,availability:e.availability}}},_t=class{send;dispatch;instance;focused=null;attributes=[];changeCallbacks=[];constructor(e,t,n){this.send=e,this.dispatch=t,this.instance=n}get current(){return this.focused}set(e){if(typeof e!=`string`||e.length===0)throw M.invalidParameter(`set() requires a non-empty component name, got ${String(e)}`);this.send({type:u.FOCUS,instance:this.instance,action:f.FOCUS,component:e})}clear(){this.send({type:u.FOCUS,instance:this.instance,action:f.UNFOCUS})}onChange(e){this.changeCallbacks.push(e)}handleStateReceived(e){e.state===p.FOCUSED&&e.component!==void 0?(this.focused=e.component,this.attributes=e.attributes??[]):(this.focused=null,this.attributes=[]);let t=this.focused===null?null:{component:this.focused,attributes:this.attributes};for(let e of this.changeCallbacks)e(t);this.dispatch(t)}},vt=class{filename;developedCallbacks=new Set;errorCallbacks=new Set;developed=!1;failed=!1;photoData=null;constructor(e){this.filename=e}onDeveloped(e){return this.developed&&this.photoData!==null?(e(this.photoData),this):(this.developedCallbacks.add(e),this)}onError(e){return this.errorCallbacks.add(e),this}getFilename(){return this.filename}develop(e){this.developed||this.failed||(this.photoData=e,this.developed=!0,this.developedCallbacks.forEach(e=>{e(this.photoData)}),this.developedCallbacks.clear(),this.errorCallbacks.clear())}fail(e){this.developed||this.failed||(this.failed=!0,this.errorCallbacks.forEach(t=>{t(e)}),this.developedCallbacks.clear(),this.errorCallbacks.clear())}},yt=3e4,bt=class{send;validExtensions=[`.png`];pendingPhotos=new Map;constructor(e){this.send=e}take(e){return this.request(e,void 0)}takeOf(e,t){return this.request(e,t)}request(e,t){this.validateFilename(e),R.debug(`Taking snapshot`,{filename:e});let n=new vt(e),r=setTimeout(()=>{this.pendingPhotos.delete(e),R.warn(`Snapshot timed out`,{filename:e}),n.fail(new M(`Snapshot timed out: the viewer did not respond within ${yt}ms`,j.SNAPSHOT_FAILED))},yt);return this.pendingPhotos.set(e,{photo:n,timeout:r}),this.send({type:u.SNAPSHOT,filename:e,...t!==void 0&&{subject:t}}),n}handleSnapshotResult(e){let t=this.pendingPhotos.get(e.filename);if(t===void 0){R.warn(`No pending photo found for filename`,{filename:e.filename,pendingFilenames:Array.from(this.pendingPhotos.keys())});return}clearTimeout(t.timeout),this.pendingPhotos.delete(e.filename);let{photo:n}=t;e.error===void 0?e.data!==void 0&&n.develop({filename:e.filename,data:e.data}):n.fail(new M(e.error,j.SNAPSHOT_FAILED))}clear(){if(this.pendingPhotos.size===0)return;let e=new M(`Client destroyed before snapshot completed`,j.SNAPSHOT_FAILED);for(let{photo:t,timeout:n}of this.pendingPhotos.values())clearTimeout(n),t.fail(e);this.pendingPhotos.clear()}validateFilename(e){if(e===``||typeof e!=`string`)throw new M(`Filename must be a non-empty string`,j.INVALID_PARAMETER);if(!this.validExtensions.some(t=>e.toLowerCase().endsWith(t)))throw new M(`Invalid filename: "${e}". Filename must end with one of: ${this.validExtensions.join(`, `)}`,j.INVALID_PARAMETER);if(e.includes(`..`)||e.includes(`/`)||e.includes(`\\`))throw new M(`Filename cannot contain path separators or ".."`,j.INVALID_PARAMETER)}},xt=class{container=null;attach(e){this.container=e}dispatch(e,t,n=!1){let r=new CustomEvent(e,{detail:t,cancelable:n});return this.container?.dispatchEvent(r),r}on(e,t){let n=e=>{let n=e;t({...n.detail,preventDefault:()=>{n.preventDefault()}})};return this.container?.addEventListener(e,n),()=>{this.container?.removeEventListener(e,n)}}},St=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Bezig…`:n===`de`?`Läuft…`:`Working…`}),Ct=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Mislukt`:n===`de`?`Fehlgeschlagen`:`Failed`}),wt=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Gelukt`:n===`de`?`Fertig`:`Done`}),Tt=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Annotaties`:n===`de`?`Anmerkungen`:`Annotations`}),Et=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`AR activeren`:n===`de`?`AR aktivieren`:`Activate AR`}),Dt=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Camera resetten`:n===`de`?`Kamera zurücksetzen`:`Reset camera`}),Ot=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Naar links draaien`:n===`de`?`Nach links drehen`:`Rotate left`}),kt=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Naar rechts draaien`:n===`de`?`Nach rechts drehen`:`Rotate right`}),At=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Omlaag kantelen`:n===`de`?`Nach unten kippen`:`Tilt down`}),jt=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Omhoog kantelen`:n===`de`?`Nach oben kippen`:`Tilt up`}),Mt=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Inzoomen`:n===`de`?`Hineinzoomen`:`Zoom in`}),Nt=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Uitzoomen`:n===`de`?`Herauszoomen`:`Zoom out`}),Pt=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Sluiten`:n===`de`?`Schließen`:`Close`}),Ft=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Configureren`:n===`de`?`Konfigurieren`:`Configure`}),It=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Volledig scherm`:n===`de`?`Vollbild`:`Fullscreen`}),Lt=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Sluiten`:n===`de`?`Schließen`:`Close`}),Rt=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`QR-code`:n===`de`?`QR-Code`:`QR code`}),zt=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Gebruik de camera van je smartphone om deze QR-code te scannen`:n===`de`?`Verwende die Kamera deines Smartphones, um diesen QR-Code zu scannen`:`Use your smartphone camera to scan this QR code`}),Bt=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Je telefoon opent het 3D-model in AR-modus.`:n===`de`?`Dein Telefon öffnet das 3D-Modell im AR-Modus.`:`Your phone will open the 3D model in AR mode.`}),Vt=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Scan om in AR te bekijken`:n===`de`?`Scannen für AR-Ansicht`:`Scan to view in AR`}),Ht=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`We kunnen de QR-code nu niet tonen. Open deze link op je telefoon:`:n===`de`?`Wir können den QR-Code gerade nicht anzeigen. Öffne diesen Link auf deinem Handy:`:`We can't show the QR code right now. Open this link on your phone:`}),Ut=((e={},t={})=>(t.locale??D(),`Screenshot`)),Wt=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Downloaden`:n===`de`?`Herunterladen`:`Downloading`}),Gt=((e={},t={})=>{let n=t.locale??D();return n===`nl`?`Laden mislukt. Ververs de pagina om het opnieuw te proberen.`:n===`de`?`Laden fehlgeschlagen. Lade die Seite neu, um es erneut zu versuchen.`:`Load failed. Refresh the page to try again.`}),Kt={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},qt=([e,t,n])=>{let r=document.createElementNS(`http://www.w3.org/2000/svg`,e);return Object.keys(t).forEach(e=>{r.setAttribute(e,String(t[e]))}),n?.length&&n.forEach(e=>{let t=qt(e);r.appendChild(t)}),r},Jt=(e,t={})=>qt([`svg`,{...Kt,...t},e]),Yt=[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`}],[`path`,{d:`M12 22V12`}]],Xt=[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`}],[`circle`,{cx:`12`,cy:`13`,r:`3`}]],Zt=[[`path`,{d:`m6 9 6 6 6-6`}]],Qt=[[`path`,{d:`m15 18-6-6 6-6`}]],$t=[[`path`,{d:`m9 18 6-6-6-6`}]],en=[[`path`,{d:`m18 15-6-6-6 6`}]],tn=[[`path`,{d:`M12.75 7.09a3 3 0 0 1 2.16 2.16`}],[`path`,{d:`M17.072 17.072c-1.634 2.17-3.527 3.912-4.471 4.727a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 1.432-4.568`}],[`path`,{d:`m2 2 20 20`}],[`path`,{d:`M8.475 2.818A8 8 0 0 1 20 10c0 1.183-.31 2.377-.81 3.533`}],[`path`,{d:`M9.13 9.13a3 3 0 0 0 3.74 3.74`}]],nn=[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`}],[`circle`,{cx:`12`,cy:`10`,r:`3`}]],rn=[[`path`,{d:`M15 3h6v6`}],[`path`,{d:`m21 3-7 7`}],[`path`,{d:`m3 21 7-7`}],[`path`,{d:`M9 21H3v-6`}]],an=[[`path`,{d:`m14 10 7-7`}],[`path`,{d:`M20 10h-6V4`}],[`path`,{d:`m3 21 7-7`}],[`path`,{d:`M4 14h6v6`}]],on=[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`}],[`path`,{d:`M3 3v5h5`}]],sn=[[`path`,{d:`M10 5H3`}],[`path`,{d:`M12 19H3`}],[`path`,{d:`M14 3v4`}],[`path`,{d:`M16 17v4`}],[`path`,{d:`M21 12h-9`}],[`path`,{d:`M21 19h-5`}],[`path`,{d:`M21 5h-7`}],[`path`,{d:`M8 10v4`}],[`path`,{d:`M8 12H3`}]],cn=[[`path`,{d:`M18 6 6 18`}],[`path`,{d:`m6 6 12 12`}]],ln=[[`circle`,{cx:`11`,cy:`11`,r:`8`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`}]],un=[[`circle`,{cx:`11`,cy:`11`,r:`8`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`}]];function z(e,{size:t=20,strokeWidth:n=1.75}={}){return Jt(e,{width:t,height:t,"stroke-width":n})}var B={ar:e=>z(Yt,e),annotations:e=>z(nn,e),annotationsOff:e=>z(tn,e),fullscreen:e=>z(rn,e),exitFullscreen:e=>z(an,e),screenshot:e=>z(Xt,e),tiltUp:e=>z(en,e),tiltDown:e=>z(Zt,e),rotateLeft:e=>z(Qt,e),rotateRight:e=>z($t,e),zoomIn:e=>z(un,e),zoomOut:e=>z(ln,e),reset:e=>z(on,e),configurator:e=>z(sn,e),close:e=>z(cn,e)},V=class{element;constructor({variant:e=`default`,size:t=`default`,label:n,icon:r,onClick:i,disabled:a=!1}={}){this.element=document.createElement(`button`),this.element.className=`ui-btn ui-btn--${e} ui-btn--size-${t}`,n!==void 0&&(this.element.setAttribute(`aria-label`,n),this.element.title=n),r===void 0?n!==void 0&&(this.element.textContent=n):this.element.appendChild(r),i&&this.element.addEventListener(`click`,i),this.element.disabled=a}setIcon(e){let t=this.element.querySelector(`svg`);t===null?this.element.appendChild(e):t.replaceWith(e)}},dn=class{element;selectCallback=null;constructor(e,t,n){this.element=document.createElement(`div`),this.element.className=`ui-toggle-group`;for(let r=0;r<e.length;r++){let i=e[r],a=document.createElement(`button`);a.className=`ui-toggle-group-item`,a.dataset.value=i,a.textContent=n?.[r]??i,a.dataset.state=i===t?`on`:`off`,a.setAttribute(`aria-pressed`,i===t?`true`:`false`),a.addEventListener(`click`,()=>{this.selectCallback?.(i)}),this.element.appendChild(a)}}setSelected(e){for(let t of this.element.querySelectorAll(`.ui-toggle-group-item`)){let n=t.dataset.value===e;t.dataset.state=n?`on`:`off`,t.setAttribute(`aria-pressed`,n?`true`:`false`)}}onSelect(e){this.selectCallback=e}setEnabled(e){for(let t of this.element.querySelectorAll(`.ui-toggle-group-item`)){let n=e===null||e.includes(t.dataset.value??``);t.disabled=!n,t.setAttribute(`aria-disabled`,n?`false`:`true`)}}},fn=class{element;select;constructor(e,t,n,r,i){this.select=document.createElement(`select`),this.select.className=`ui-native-select`,this.select.dataset.name=e,this.select.setAttribute(`aria-label`,n);let a=document.createElement(`option`);a.value=``,a.disabled=!0,a.textContent=n,this.select.appendChild(a);let o=!1;for(let e=0;e<t.length;e++){let n=t[e],a=document.createElement(`option`);a.value=n,a.textContent=i?.[e]??n,n===r&&(a.selected=!0,o=!0),this.select.appendChild(a)}o||(a.selected=!0);let s=Jt(Zt,{width:16,height:16,"stroke-width":2});s.classList.add(`ui-native-select-icon`),this.element=document.createElement(`div`),this.element.className=`ui-native-select-wrap`,this.element.appendChild(this.select),this.element.appendChild(s)}setSelected(e){this.select.value=e}onSelect(e){this.select.addEventListener(`change`,()=>{e(this.select.value)})}setEnabled(e){for(let t of this.select.options)t.value!==``&&(t.disabled=e!==null&&!e.includes(t.value))}},pn=class{element;input;valueText;values;options;selectCallback=null;settleCallback=null;constructor(e,t){if(e.length===0)throw Error(`Virtualdisplay: Slider needs at least one value`);this.values=e,this.options=t,this.input=document.createElement(`input`),this.input.type=`range`,this.input.className=`ui-slider-input`,this.input.min=`0`,this.input.max=String(e.length-1),this.input.step=`1`,this.input.setAttribute(`aria-label`,t.label),this.valueText=document.createElement(`span`),this.valueText.className=`ui-slider-value`,this.valueText.setAttribute(`aria-hidden`,`true`);let n=document.createElement(`div`);n.className=`ui-slider-track`,n.appendChild(this.input),n.appendChild(this.buildEnds()),this.element=document.createElement(`div`),this.element.className=`ui-slider`,this.element.appendChild(n),this.element.appendChild(this.valueText);let r=t.initialSelected===void 0?0:e.indexOf(t.initialSelected);this.applyIndex(r===-1?0:r),this.listen()}setSelected(e){let t=this.values.indexOf(e);t!==-1&&this.applyIndex(t)}onSelect(e){this.selectCallback=e}onSettle(e){this.settleCallback=e}listen(){this.input.addEventListener(`input`,()=>{let e=this.values[this.currentIndex];e!==void 0&&(this.applyIndex(this.currentIndex),this.selectCallback?.(e))}),this.input.addEventListener(`change`,()=>{let e=this.values[this.currentIndex];e!==void 0&&this.settleCallback?.(e)})}get currentIndex(){return Number(this.input.value)}applyIndex(e){this.input.value=String(e);let t=this.displayAt(e);this.valueText.textContent=t,this.input.setAttribute(`aria-valuetext`,t);let n=this.values.length===1?100:e/(this.values.length-1)*100;this.element.style.setProperty(`--ui-slider-pct`,`${n}%`)}buildEnds(){let e=document.createElement(`div`);e.className=`ui-slider-ends`,e.setAttribute(`aria-hidden`,`true`);for(let t of[0,this.values.length-1]){let n=document.createElement(`span`);n.textContent=this.labelAt(t),e.appendChild(n)}return e}labelAt(e){return this.options.labels?.[e]??this.values[e]??``}displayAt(e){let t=this.labelAt(e);return this.options.unit===void 0?t:`${t} ${this.options.unit}`}},H={neutral:{50:`oklch(98.5% 0 0)`,100:`oklch(96.5% 0 0)`,200:`oklch(92% 0 0)`,300:`oklch(82% 0 0)`,400:`oklch(70% 0 0)`,500:`oklch(55.5% 0 0)`,600:`oklch(44.5% 0 0)`,700:`oklch(37% 0 0)`,800:`oklch(27% 0 0)`,900:`oklch(21% 0 0)`,950:`oklch(14.5% 0 0)`},white:`oklch(100% 0 0)`,semantic:{error:`oklch(47% 0.17 25)`}},U={px:`1px`,0:`0`,.5:`0.125rem`,1:`0.25rem`,1.5:`0.375rem`,2:`0.5rem`,2.5:`0.625rem`,3:`0.75rem`,3.5:`0.875rem`,4:`1rem`,5:`1.25rem`,6:`1.5rem`,7:`1.75rem`,8:`2rem`,9:`2.25rem`,10:`2.5rem`,12:`3rem`,14:`3.5rem`,16:`4rem`,20:`5rem`,24:`6rem`},W={fontFamily:{sans:[`Mona Sans`,`ui-sans-serif`,`system-ui`,`sans-serif`,`Apple Color Emoji`,`Segoe UI Emoji`,`Segoe UI Symbol`,`Noto Color Emoji`],mono:[`JetBrains Mono`,`ui-monospace`,`monospace`]},fontSize:{xs:`0.75rem`,sm:`0.875rem`,base:`1rem`,lg:`1.125rem`,xl:`1.25rem`,"2xl":`1.5rem`,"3xl":`1.875rem`,"4xl":`2.25rem`},fontWeight:{normal:`400`,medium:`500`,semibold:`600`,bold:`700`},lineHeight:{tight:`1.25`,normal:`1.5`,relaxed:`1.75`}},mn=class{element;constructor(){this.element=document.createElement(`div`),Object.assign(this.element.style,{background:H.white,borderRadius:`var(--radius)`,padding:U[6],boxShadow:`0 ${U[2]} ${U[8]} oklch(0% 0 0 / 20%)`,maxWidth:`20rem`,width:`100%`})}},hn=class{options;card;backdrop;keyHandler=null;constructor(e={}){this.options=e,this.card=new mn,this.backdrop=this.createBackdrop(),this.backdrop.appendChild(this.card.element)}get content(){return this.card.element}open(){document.body.appendChild(this.backdrop),this.keyHandler=e=>{e.key===`Escape`&&this.close()},document.addEventListener(`keydown`,this.keyHandler)}close(){this.backdrop.remove(),this.keyHandler!==null&&(document.removeEventListener(`keydown`,this.keyHandler),this.keyHandler=null),this.options.onClose?.()}createBackdrop(){let e=document.createElement(`div`);return Object.assign(e.style,{position:`fixed`,inset:U[0],background:`oklch(0% 0 0 / 50%)`,zIndex:`9999`,display:`flex`,alignItems:`center`,justifyContent:`center`}),e.addEventListener(`click`,t=>{t.target===e&&this.close()}),e}},G=W.fontFamily.sans.join(`, `),gn=`
|
|
2
2
|
:root {
|
|
3
3
|
--primary: oklch(5% 0 0);
|
|
4
4
|
--primary-foreground: oklch(100% 0 0);
|
|
@@ -488,7 +488,7 @@ Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}},t.expo
|
|
|
488
488
|
The chosen QR Code version cannot contain this amount of data.
|
|
489
489
|
Minimum version required to store current data is: `+c+`.
|
|
490
490
|
`);let l=b(n,r,o),d=new i(t.getSymbolSize(n));return m(d,n),h(d),g(d,n),v(d,r,0),n>=7&&_(d,n),y(d,l),isNaN(a)&&(a=s.getBestMask(d,v.bind(null,d,r))),s.applyMask(a,d),v(d,r,a),{modules:d,version:n,errorCorrectionLevel:r,maskPattern:a,segments:o}}e.create=function(e,r){if(e===void 0||e===``)throw Error(`No input text`);let i=n.M,a,o;return r!==void 0&&(i=n.from(r.errorCorrectionLevel,n.M),a=u.from(r.version),o=s.from(r.maskPattern),r.toSJISFunc&&t.setToSJISFunction(r.toSJISFunc)),S(e,a,i,o)}})),Bn=s((e=>{function t(e){if(typeof e==`number`&&(e=e.toString()),typeof e!=`string`)throw Error(`Color should be defined as hex string`);let t=e.slice().replace(`#`,``).split(``);if(t.length<3||t.length===5||t.length>8)throw Error(`Invalid hex color: `+e);(t.length===3||t.length===4)&&(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),t.length===6&&t.push(`F`,`F`);let n=parseInt(t.join(``),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:`#`+t.slice(0,6).join(``)}}e.getOptions=function(e){e||={},e.color||(e.color={});let n=e.margin===void 0||e.margin===null||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:r,scale:r?4:i,margin:n,color:{dark:t(e.color.dark||`#000000ff`),light:t(e.color.light||`#ffffffff`)},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,t){return t.width&&t.width>=e+t.margin*2?t.width/(e+t.margin*2):t.scale},e.getImageWidth=function(t,n){let r=e.getScale(t,n);return Math.floor((t+n.margin*2)*r)},e.qrToImageData=function(t,n,r){let i=n.modules.size,a=n.modules.data,o=e.getScale(i,r),s=Math.floor((i+r.margin*2)*o),c=r.margin*o,l=[r.color.light,r.color.dark];for(let e=0;e<s;e++)for(let n=0;n<s;n++){let u=(e*s+n)*4,d=r.color.light;if(e>=c&&n>=c&&e<s-c&&n<s-c){let t=Math.floor((e-c)/o),r=Math.floor((n-c)/o);d=l[+!!a[t*i+r]]}t[u++]=d.r,t[u++]=d.g,t[u++]=d.b,t[u]=d.a}}})),Vn=s((e=>{var t=Bn();function n(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||={},t.height=n,t.width=n,t.style.height=n+`px`,t.style.width=n+`px`}function r(){try{return document.createElement(`canvas`)}catch{throw Error(`You need to specify a canvas element`)}}e.render=function(e,i,a){let o=a,s=i;o!==void 0||i&&i.getContext||(o=i,i=void 0),i||(s=r()),o=t.getOptions(o);let c=t.getImageWidth(e.modules.size,o),l=s.getContext(`2d`),u=l.createImageData(c,c);return t.qrToImageData(u.data,e,o),n(l,s,c),l.putImageData(u,0,0),s},e.renderToDataURL=function(t,n,r){let i=r;i!==void 0||n&&n.getContext||(i=n,n=void 0),i||={};let a=e.render(t,n,i),o=i.type||`image/png`,s=i.rendererOpts||{};return a.toDataURL(o,s.quality)}})),Hn=s((e=>{var t=Bn();function n(e,t){let n=e.a/255,r=t+`="`+e.hex+`"`;return n<1?r+` `+t+`-opacity="`+n.toFixed(2).slice(1)+`"`:r}function r(e,t,n){let r=e+t;return n!==void 0&&(r+=` `+n),r}function i(e,t,n){let i=``,a=0,o=!1,s=0;for(let c=0;c<e.length;c++){let l=Math.floor(c%t),u=Math.floor(c/t);!l&&!o&&(o=!0),e[c]?(s++,c>0&&l>0&&e[c-1]||(i+=o?r(`M`,l+n,.5+u+n):r(`m`,a,0),a=0,o=!1),l+1<t&&e[c+1]||(i+=r(`h`,s),s=0)):a++}return i}e.render=function(e,r,a){let o=t.getOptions(r),s=e.modules.size,c=e.modules.data,l=s+o.margin*2,u=o.color.light.a?`<path `+n(o.color.light,`fill`)+` d="M0 0h`+l+`v`+l+`H0z"/>`:``,d=`<path `+n(o.color.dark,`stroke`)+` d="`+i(c,s,o.margin)+`"/>`,f=`viewBox="0 0 `+l+` `+l+`"`,p=`<svg xmlns="http://www.w3.org/2000/svg" `+(o.width?`width="`+o.width+`" height="`+o.width+`" `:``)+f+` shape-rendering="crispEdges">`+u+d+`</svg>
|
|
491
|
-
`;return typeof a==`function`&&a(null,p),p}})),Un=s((e=>{var t=yn(),n=zn(),r=Vn(),i=Hn();function a(e,r,i,a,o){let s=[].slice.call(arguments,1),c=s.length,l=typeof s[c-1]==`function`;if(!l&&!t())throw Error(`Callback required as last argument`);if(l){if(c<2)throw Error(`Too few arguments provided`);c===2?(o=i,i=r,r=a=void 0):c===3&&(r.getContext&&o===void 0?(o=a,a=void 0):(o=a,a=i,i=r,r=void 0))}else{if(c<1)throw Error(`Too few arguments provided`);return c===1?(i=r,r=a=void 0):c===2&&!r.getContext&&(a=i,i=r,r=void 0),new Promise(function(t,o){try{t(e(n.create(i,a),r,a))}catch(e){o(e)}})}try{let t=n.create(i,a);o(null,e(t,r,a))}catch(e){o(e)}}e.create=n.create,e.toCanvas=a.bind(null,r.render),e.toDataURL=a.bind(null,r.renderToDataURL),e.toString=a.bind(null,function(e,t,n){return i.render(e,n)})})),Wn=W.fontFamily.sans.join(`, `),Gn=class{qrLib=null;dialog=null;qrSlot=null;show(){this.hide(),vn(),this.dialog=new hn({onClose:()=>{this.dialog=null,this.qrSlot=null}}),Object.assign(this.dialog.content.style,{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:U[3],fontFamily:Wn}),this.dialog.content.appendChild(this.createText(Vt(),{fontSize:W.fontSize.base,fontWeight:W.fontWeight.semibold,color:H.neutral[900]})),this.dialog.content.appendChild(this.createText(zt(),{fontSize:W.fontSize.sm,color:H.neutral[600]})),this.qrSlot=this.createQrSlot(),this.dialog.content.appendChild(this.qrSlot),this.dialog.content.appendChild(this.createText(Bt(),{fontSize:W.fontSize.xs,color:H.neutral[500]}));let e=new V({variant:`outline`,label:Lt(),onClick:()=>{this.hide()}});this.dialog.content.appendChild(e.element),this.dialog.open()}async update(e){let t;try{this.qrLib??=await Promise.resolve().then(()=>l(Un(),1)),t=await this.qrLib.toDataURL(e,{width:256,margin:4,errorCorrectionLevel:`M`,color:{dark:`#000000`,light:`#ffffff`}})}catch(t){throw this.showLink(e),t}return this.qrSlot!==null&&(this.qrSlot.classList.remove(`ui-qr-slot--loading`),this.qrSlot.replaceChildren(this.createQrImage(t)),!0)}showLink(e){this.qrSlot!==null&&(this.qrSlot.classList.remove(`ui-qr-slot--loading`),this.qrSlot.replaceChildren(this.createText(Ht(),{fontSize:W.fontSize.sm,color:H.neutral[600]}),this.createText(e,{fontSize:W.fontSize.xs,color:H.neutral[900],overflowWrap:`anywhere`,userSelect:`all`})))}hide(){this.dialog?.close(),this.dialog=null,this.qrSlot=null}createText(e,t){let n=document.createElement(`p`);return n.textContent=e,Object.assign(n.style,{margin:`0`,textAlign:`center`,...t}),n}createQrSlot(){let e=document.createElement(`div`);return e.className=`ui-qr-slot ui-qr-slot--loading`,e}createQrImage(e){let t=document.createElement(`img`);return t.src=e,t.alt=Rt(),t}};function Kn(e){let t=Math.max(0,Math.min(1,e));return t*t*(3-2*t)}function qn(e,t,n,r,i,a){let[o,s,c]=e,l=Math.cos(t),u=Math.sin(t),d=l*o+u*c,f=-u*o+l*c,p=Math.cos(n),m=Math.sin(n),h=p*s-m*f,g=m*s+p*f,_=.55;return[r+d*a*_,i-h*a*_,g]}function Jn(e,t,n){e.beginPath(),e.moveTo(t[0],t[1]),e.lineTo(n[0],n[1]),e.strokeStyle=`#000`,e.lineWidth=2,e.stroke()}function Yn(e,t,n,r,i){let a=t(n),o=t(r);Jn(e,a,[a[0]+(o[0]-a[0])*i,a[1]+(o[1]-a[1])*i,a[2]])}var Xn=[-1,-1,1],Zn=[1,-1,1],Qn=[1,-1,-1],$n=[-1,-1,-1],er=[-1,1,1],tr=[1,1,1],nr=[1,1,-1],Y=[-1,1,-1],rr=[[Xn,Zn],[Zn,Qn],[Qn,$n],[$n,Xn],[Xn,er],[Zn,tr],[Qn,nr],[$n,Y],[er,tr],[tr,nr],[nr,Y],[Y,er]];function ir(e){let t=e%6/6,n=rr.length;return t<.35?Kn(t/.35)*n:t<.55?n:t<.9?(1-Kn((t-.55)/.35))*n:0}function ar(e,{width:t,height:n},r){let i=t/2,a=n*.44,o=Math.min(t,n)*.08,s=e=>qn(e,.785,.615,i,a,o),c=ir(r);e.shadowBlur=5,e.shadowColor=`rgba(30,30,30,0.08)`;for(let t=0;t<rr.length&&!(t>=c);t++){let n=rr[t];if(n===void 0)continue;let r=Math.min(1,c-t);Yn(e,s,n[0],n[1],r)}e.shadowBlur=0}var or=400,sr=3e4,cr=`-apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif`;function lr(){let e=document.createElement(`div`);Object.assign(e.style,{position:`absolute`,inset:`0`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,background:`#fff`,zIndex:`20`,opacity:`0`,transition:`opacity 0.3s ease-in-out`});let t=document.createElement(`canvas`);Object.assign(t.style,{width:`100%`,height:`100%`,position:`absolute`,inset:`0`});let n=document.createElement(`div`);Object.assign(n.style,{position:`absolute`,top:`56%`,left:`0`,right:`0`,textAlign:`center`,pointerEvents:`none`});let r=document.createElement(`span`);Object.assign(r.style,{fontSize:`13px`,fontWeight:`400`,color:`#000`,fontVariantNumeric:`tabular-nums`,fontFamily:cr});let i=document.createElement(`span`);return Object.assign(i.style,{fontSize:`13px`,color:`#000`,fontFamily:cr}),i.textContent=Wt(),n.appendChild(r),n.appendChild(i),e.appendChild(t),e.appendChild(n),{overlay:e,canvas:t,pctEl:r,phaseEl:i}}var ur=class{overlay;canvas;ctx;pctEl;phaseEl;animationId=null;showTimerId=null;noSignalTimerId=null;startTime;hidden=!1;visible=!1;errored=!1;noSignalErrored=!1;constructor(e){this.startTime=performance.now();let t=lr();this.overlay=t.overlay,this.canvas=t.canvas,this.pctEl=t.pctEl,this.phaseEl=t.phaseEl,e.appendChild(this.overlay),this.ctx=this.canvas.getContext(`2d`),this.ctx!==null&&(this.sizeCanvas(),this.tick()),this.showTimerId=setTimeout(()=>{this.reveal()},or),this.noSignalTimerId=setTimeout(()=>{this.hidden||(this.noSignalErrored=!0,this.showError(Gt()))},sr)}viewerAlive(){this.cancelNoSignalTimer(),this.noSignalErrored&&this.recoverFromNoSignal()}recoverFromNoSignal(){this.noSignalErrored=!1,this.errored=!1,this.pctEl.textContent=``,this.phaseEl.textContent=Wt(),this.phaseEl.style.color=`#000`,this.ctx!==null&&this.animationId===null&&!this.hidden&&this.tick()}updateProgress(e,t){this.cancelNoSignalTimer(),!(this.hidden||this.errored)&&(this.pctEl.textContent=`${Math.round(e)}%`,this.phaseEl.textContent=t===``?``:` \u00B7 ${t}`)}showError(e){if(this.cancelNoSignalTimer(),this.hidden=!1,this.errored=!0,this.animationId!==null&&(cancelAnimationFrame(this.animationId),this.animationId=null),this.ctx!==null){let e=Math.min(devicePixelRatio,2),t=this.canvas.width/e,n=this.canvas.height/e;this.ctx.fillStyle=`#fff`,this.ctx.fillRect(0,0,t*e,n*e)}this.pctEl.textContent=``,this.phaseEl.textContent=e,this.phaseEl.style.color=`#b91c1c`,this.reveal()}hide(){this.hidden||(this.hidden=!0,this.cancelShowTimer(),this.visible?(this.overlay.style.opacity=`0`,this.overlay.addEventListener(`transitionend`,()=>{this.destroy()},{once:!0}),setTimeout(()=>{this.destroy()},500)):this.destroy())}destroy(){this.cancelShowTimer(),this.cancelNoSignalTimer(),this.animationId!==null&&(cancelAnimationFrame(this.animationId),this.animationId=null),this.overlay.remove()}reveal(){this.hidden||this.visible||(this.visible=!0,this.overlay.style.opacity=`1`)}cancelShowTimer(){this.showTimerId!==null&&(clearTimeout(this.showTimerId),this.showTimerId=null)}cancelNoSignalTimer(){this.noSignalTimerId!==null&&(clearTimeout(this.noSignalTimerId),this.noSignalTimerId=null)}sizeCanvas(){if(this.ctx===null)return;let e=Math.min(devicePixelRatio,2),t=this.overlay.clientWidth||440,n=this.overlay.clientHeight||360;this.canvas.width=t*e,this.canvas.height=n*e,this.ctx.scale(e,e),this.ctx.lineCap=`round`,this.ctx.lineJoin=`round`}tick=()=>{this.hidden||(this.drawFrame(),this.animationId=requestAnimationFrame(this.tick))};drawFrame(){if(this.ctx===null)return;let e=this.canvas.width/Math.min(devicePixelRatio,2),t=this.canvas.height/Math.min(devicePixelRatio,2),n=(performance.now()-this.startTime)/1e3;this.ctx.fillStyle=`#fff`,this.ctx.fillRect(0,0,e,t),ar(this.ctx,{width:e,height:t},n)}},dr=class{options;element;arBtn=null;fullscreenBtn=null;annotationsBtn=null;annotationsShown=!1;onFullscreenChange;constructor(e){this.options=e,this.element=document.createElement(`div`),Object.assign(this.element.style,{display:`flex`,gap:`0.375rem`}),this.onFullscreenChange=()=>{this.setFullscreenIcon(document.fullscreenElement!==null)},document.addEventListener(`fullscreenchange`,this.onFullscreenChange)}setFullscreenIcon(e){this.fullscreenBtn!==null&&this.fullscreenBtn.setIcon(e?B.exitFullscreen():B.fullscreen())}syncButton(e,t,n){if(t&&e===null){let e=n();return this.element.appendChild(e.element),e}return!t&&e!==null?(e.element.remove(),null):e}applySettings(e){this.arBtn=this.syncButton(this.arBtn,e.ar!==!1&&this.options.onAr!==void 0,()=>new V({variant:`outline`,size:`icon`,label:Et(),icon:B.ar(),onClick:()=>{this.options.onAr?.()}})),this.fullscreenBtn=this.syncButton(this.fullscreenBtn,e.fullscreen!==!1&&this.options.onFullscreen!==void 0,()=>new V({variant:`outline`,size:`icon`,label:It(),icon:B.fullscreen(),onClick:()=>{this.options.onFullscreen?.()}}));let t=e.annotations===`toggle-shown`||e.annotations===`toggle-hidden`;this.annotationsBtn=this.syncButton(this.annotationsBtn,t&&this.options.onAnnotationsToggle!==void 0,()=>{this.annotationsShown=e.annotations===`toggle-shown`;let t=new V({variant:`outline`,size:`icon`,label:Tt(),icon:this.annotationsShown?B.annotations():B.annotationsOff(),onClick:()=>{this.flipAnnotations()}});return t.element.setAttribute(`aria-pressed`,String(this.annotationsShown)),t})}flipAnnotations(){this.annotationsShown=!this.annotationsShown,this.annotationsBtn?.element.setAttribute(`aria-pressed`,String(this.annotationsShown)),this.annotationsBtn?.setIcon(this.annotationsShown?B.annotations():B.annotationsOff()),this.options.onAnnotationsToggle?.(this.annotationsShown)}destroy(){document.removeEventListener(`fullscreenchange`,this.onFullscreenChange)}},X=.5,fr=class e{element;constructor(t,n){this.element=Object.assign(document.createElement(`div`),{className:`vd-camera-controls`});let r={targetRotation:n.rotation,targetTilt:n.tilt,targetZoom:n.zoom,thetaOffset:0},i=vr(t,n,r);n.onChange(e=>{r.targetRotation=e.rotation-r.thetaOffset,r.targetTilt=e.tilt,r.targetZoom=e.zoom,yr(i,n,e)}),this.element.appendChild(e.buildZoom(i.zoomOut,i.zoomIn)),this.element.appendChild(e.buildDpad(i.tiltUp,i.rotateLeft,i.reset,i.rotateRight,i.tiltDown))}static buildZoom(e,t){let n=document.createElement(`div`);return n.className=`vd-zoom`,n.appendChild(e.element),n.appendChild(t.element),n}static buildDpad(e,t,n,r,i){let a=document.createElement(`div`);a.className=`vd-dpad`;for(let[o,s]of[[e,`up`],[t,`left`],[n,`center`],[r,`right`],[i,`down`]])o.element.classList.add(`vd-dpad-${s}`),a.appendChild(o.element);return a}};function pr(e,t){let n=e;for(;n<t;)n+=360;for(;n>=t+360;)n-=360;return n}function mr(e,t,n){let r=pr(e,t);return r<=n?r:r-n<=t+360-r?n:t}function Z(e,t,n){return new V({variant:`outline`,size:`icon`,label:e,icon:t,onClick:n})}function hr(e,t){return Math.max(e.limits?.minZoom??1,Math.min(e.limits?.maxZoom??1/0,t))}function gr(e,t){let n=e.limits?.minRotate,r=e.limits?.maxRotate;return n===void 0||r===void 0||r-n>=360?t:mr(t,n,r)}function _r(e,t,n,r){let i=t.limits?.minTilt,a=t.limits?.maxTilt;if(i!==void 0||a!==void 0){n.targetTilt=Math.max(i??0,Math.min(a??180,n.targetTilt+r)),e.tilt(n.targetTilt).set();return}let o=n.targetTilt+r;o>180||o<0?(n.targetTilt=o>180?360-o:-o,n.thetaOffset=(n.thetaOffset+180)%360,e.tilt(n.targetTilt).rotate(n.targetRotation+n.thetaOffset).set()):(n.targetTilt=o,e.tilt(n.targetTilt).set())}function vr(e,t,n){let r=r=>{n.targetZoom=hr(t,n.targetZoom+r),e.zoom(n.targetZoom).set()},i=r=>{n.targetRotation=gr(t,n.targetRotation+r),e.rotate(n.targetRotation+n.thetaOffset).set()};return{zoomOut:Z(Nt(),B.zoomOut(),()=>{r(-10)}),zoomIn:Z(Mt(),B.zoomIn(),()=>{r(10)}),tiltUp:Z(jt(),B.tiltUp(),()=>{_r(e,t,n,-15)}),rotateLeft:Z(Ot(),B.rotateLeft(),()=>{i(-15)}),reset:Z(Dt(),B.reset(),()=>{n.thetaOffset=0,e.reset()}),rotateRight:Z(kt(),B.rotateRight(),()=>{i(15)}),tiltDown:Z(At(),B.tiltDown(),()=>{_r(e,t,n,15)})}}function yr(e,t,n){let r=t.limits;if(r===void 0)return;e.zoomOut.element.disabled=r.minZoom!==void 0&&n.zoom<=r.minZoom+X,e.zoomIn.element.disabled=r.maxZoom!==void 0&&n.zoom>=r.maxZoom-X,e.tiltUp.element.disabled=r.minTilt!==void 0&&n.tilt<=r.minTilt+X,e.tiltDown.element.disabled=r.maxTilt!==void 0&&n.tilt>=r.maxTilt-X;let{minRotate:i,maxRotate:a}=r;if(i===void 0||a===void 0||a-i>=360){e.rotateLeft.element.disabled=!1,e.rotateRight.element.disabled=!1;return}let o=pr(n.rotation,i);e.rotateLeft.element.disabled=o<=i+X,e.rotateRight.element.disabled=o>=a-X}var Q={SELECT:`vd:select`,SELECTED:`vd:selected`,FOCUS_CHANGE:`vd:focus-change`,CONFIGURATION_CHANGE:`vd:configuration-change`,CONFIGURATION_SUBMIT:`vd:configuration-submit`},br={mm:1,cm:10,m:1e3,in:25.4},xr=3;function Sr(e){let t=e.stepMm/br[e.displayUnit];for(let e=0;e<=xr;e++){let n=t*10**e;if(Math.abs(n-Math.round(n))<1e-9)return e}return xr}function Cr(e,t,n){let r=Sr(t),i=e/br[t.displayUnit];return new Intl.NumberFormat(n,{minimumFractionDigits:r,maximumFractionDigits:r}).format(i)}function wr(e,t,n,r,i,a,o){let s=D(),c=e.values.map(e=>Cr(Number(e),t,s)),l=e.values.find(t=>n.getValue(e.name,t)?.isSelected===!0)??e.defaultValue,u=new pn(e.values,{label:e.name,labels:c,unit:t.displayUnit,...l!==void 0&&{initialSelected:l}});return u.onSelect(t=>{i(e.name,t)}),u.onSettle(t=>{r.dispatch(Q.SELECT,{attribute:e.name,value:t},!0).defaultPrevented||a(e.name,t)}),o(e.name,t=>{u.setSelected(t.value),r.dispatch(Q.SELECTED,{attribute:e.name,value:t.value})}),{element:u.element,setSelectable:()=>{}}}var Tr=5,Er=0;function Dr(e,t,n,r,i,a){let o=document.createElement(`div`);o.className=`vd-attribute`,o.dataset.name=e.name;let s=document.createElement(`span`);s.className=`vd-attribute-label`,s.textContent=Le(e.name),s.id=`vd-attribute-label-${Er++}`,o.appendChild(s),o.setAttribute(`role`,`group`),o.setAttribute(`aria-labelledby`,s.id);let c=e=>{o.style.display=e?`none`:``},l=e.dimension===void 0?Or(e,t,n,r,a):wr(e,e.dimension,t,n,i,r,a);return o.appendChild(l.element),{element:o,setSelectable:l.setSelectable,setHidden:c}}function Or(e,t,n,r,i){let a=e.values.find(n=>t.getValue(e.name,n)?.isSelected===!0),o=e.values.map(t=>Fe(t,e.labels)),s=e.values.length<=Tr?new dn(e.values,a,o):new fn(e.name,e.values,Le(e.name),a,o);return s.onSelect(t=>{n.dispatch(Q.SELECT,{attribute:e.name,value:t},!0).defaultPrevented||r(e.name,t)}),i(e.name,t=>{s.setSelected(t.value),n.dispatch(Q.SELECTED,{attribute:e.name,value:t.value})}),{element:s.element,setSelectable:e=>{s.setEnabled(e)}}}var kr=80,Ar=2500,jr=class{configuration;element;priceEl;vatEl;button;unsubscribe;state=`idle`;resetTimer;constructor(e){this.configuration=e,this.element=document.createElement(`div`),this.element.className=`vd-commerce vd-hidden`;let t=document.createElement(`div`);t.className=`vd-commerce-price`,this.priceEl=document.createElement(`span`),this.priceEl.className=`vd-price`,this.vatEl=document.createElement(`span`),this.vatEl.className=`vd-vat`,t.append(this.priceEl,this.vatEl),this.button=new V({variant:`default`,onClick:()=>{this.handleSubmit()}}),this.button.element.classList.add(`vd-cta`,`vd-hidden`),this.element.append(t,this.button.element),this.unsubscribe=this.configuration.onRender(()=>{this.update()}),this.update()}update(){this.renderPrice(this.configuration.current),this.renderButton();let e=this.configuration.current!==void 0||this.configuration.submitEnabled;this.element.classList.toggle(`vd-hidden`,!e)}destroy(){this.unsubscribe(),this.resetTimer!==void 0&&clearTimeout(this.resetTimer),this.element.remove()}renderPrice(e){e===void 0?(this.priceEl.textContent=``,this.vatEl.textContent=``):(this.priceEl.textContent=Nr(e.price,e.currency),this.vatEl.textContent=Mr(this.configuration.vatDisplay))}renderButton(){let e=this.configuration.submitEnabled;this.button.element.classList.toggle(`vd-hidden`,!e),e&&this.state===`idle`&&this.setButtonText(Mr(this.configuration.buttonLabel))}async handleSubmit(){if(this.state!==`busy`){this.setState(`busy`,St());try{await this.configuration.submit(),this.setState(`success`,wt())}catch(e){if(e instanceof DOMException&&e.name===`AbortError`){this.setState(`idle`,Mr(this.configuration.buttonLabel));return}R.warn(`Commerce submit failed`,{error:e}),this.setState(`failed`,Ct())}this.scheduleReset()}}scheduleReset(){this.resetTimer!==void 0&&clearTimeout(this.resetTimer),this.resetTimer=setTimeout(()=>{this.state=`idle`,this.update()},Ar)}setState(e,t){this.state=e,this.element.dataset.submit=e,this.button.element.disabled=e===`busy`,this.setButtonText(t)}setButtonText(e){this.button.element.textContent=e,this.button.element.setAttribute(`aria-label`,e)}};function Mr(e){return(e??``).slice(0,kr)}function Nr(e,t){try{let n=new Intl.NumberFormat(D(),{style:`currency`,currency:t}),r=n.resolvedOptions().maximumFractionDigits??2;return n.format(e/10**r)}catch{return`${t} ${(e/100).toFixed(2)}`}}var Pr=class{slot=null;panel=null;attach(e,t){this.panel=t,t.style.display=`none`,this.slot=document.createElement(`div`),this.slot.className=`vd-slot-bottom-left`,this.slot.appendChild(t),e.appendChild(this.slot)}setVisible(e){this.panel!==null&&(this.panel.style.display=e?`flex`:`none`)}destroy(){this.slot?.remove(),this.slot=null,this.panel=null}},Fr=572,Ir=class{actionBarSlot;element=null;body=null;openButton=null;closeButton=null;container=null;observer=null;collapsible=!1;expanded=!0;visible=!1;constructor(e){this.actionBarSlot=e}attach(e,t){this.container=e,t.classList.add(`vd-attributes-sidebar`),this.closeButton=new V({variant:`ghost`,size:`icon-sm`,label:Pt(),icon:B.close({size:18}),onClick:()=>{this.expanded=!1,this.render()}});let n=document.createElement(`div`);n.className=`vd-sidebar-header`,n.appendChild(this.closeButton.element),this.body=document.createElement(`div`),this.body.className=`vd-sidebar-body`,this.body.appendChild(t),this.element=document.createElement(`div`),this.element.className=`vd-sidebar vd-hidden`,this.element.append(n,this.body),e.appendChild(this.element),this.openButton=new V({variant:`outline`,size:`icon`,label:Ft(),icon:B.configurator({size:18}),onClick:()=>{this.expanded=!0,this.render()}}),this.openButton.element.classList.add(`vd-configurator-toggle`,`vd-hidden`),this.actionBarSlot.appendChild(this.openButton.element),this.observe()}setVisible(e){this.visible=e,this.render()}destroy(){this.observer?.disconnect(),this.observer=null,this.openButton?.element.remove(),this.element?.remove(),this.container?.classList.remove(`vd-layout-sidebar-right`,`vd-layout-sidebar-permanent`),this.container=null}observe(){typeof ResizeObserver<`u`&&this.container!==null&&(this.observer=new ResizeObserver(e=>{let t=e[0]?.contentRect.width??0;this.setCollapsible(t>0&&t<Fr)}),this.observer.observe(this.container))}setCollapsible(e){e!==this.collapsible&&(this.collapsible=e,this.expanded=!e,this.render())}render(){if(this.element===null||this.openButton===null||this.closeButton===null||this.container===null)return;let e=this.visible&&this.expanded,t=this.visible&&!this.expanded;this.element.classList.toggle(`vd-hidden`,!this.visible),this.element.classList.toggle(`vd-sidebar-collapsed`,t),this.openButton.element.classList.toggle(`vd-hidden`,!t),this.closeButton.element.style.display=this.collapsible?``:`none`,this.container.classList.toggle(`vd-layout-sidebar-right`,e),this.container.classList.toggle(`vd-layout-sidebar-permanent`,e&&!this.collapsible)}},Lr=class{attach(e,t){}setVisible(e){}destroy(){}},Rr={"inframe-bottom-left":()=>new Pr,"sidebar-right":e=>new Ir(e),hidden:()=>new Lr};function zr(e,t){return(Rr[e??``]??(()=>new Pr))(t)}var Br=W.fontFamily.sans.join(`, `),$=`
|
|
491
|
+
`;return typeof a==`function`&&a(null,p),p}})),Un=s((e=>{var t=yn(),n=zn(),r=Vn(),i=Hn();function a(e,r,i,a,o){let s=[].slice.call(arguments,1),c=s.length,l=typeof s[c-1]==`function`;if(!l&&!t())throw Error(`Callback required as last argument`);if(l){if(c<2)throw Error(`Too few arguments provided`);c===2?(o=i,i=r,r=a=void 0):c===3&&(r.getContext&&o===void 0?(o=a,a=void 0):(o=a,a=i,i=r,r=void 0))}else{if(c<1)throw Error(`Too few arguments provided`);return c===1?(i=r,r=a=void 0):c===2&&!r.getContext&&(a=i,i=r,r=void 0),new Promise(function(t,o){try{t(e(n.create(i,a),r,a))}catch(e){o(e)}})}try{let t=n.create(i,a);o(null,e(t,r,a))}catch(e){o(e)}}e.create=n.create,e.toCanvas=a.bind(null,r.render),e.toDataURL=a.bind(null,r.renderToDataURL),e.toString=a.bind(null,function(e,t,n){return i.render(e,n)})})),Wn=W.fontFamily.sans.join(`, `),Gn=class{qrLib=null;dialog=null;qrSlot=null;show(){this.hide(),vn(),this.dialog=new hn({onClose:()=>{this.dialog=null,this.qrSlot=null}}),Object.assign(this.dialog.content.style,{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:U[3],fontFamily:Wn}),this.dialog.content.appendChild(this.createText(Vt(),{fontSize:W.fontSize.base,fontWeight:W.fontWeight.semibold,color:H.neutral[900]})),this.dialog.content.appendChild(this.createText(zt(),{fontSize:W.fontSize.sm,color:H.neutral[600]})),this.qrSlot=this.createQrSlot(),this.dialog.content.appendChild(this.qrSlot),this.dialog.content.appendChild(this.createText(Bt(),{fontSize:W.fontSize.xs,color:H.neutral[500]}));let e=new V({variant:`outline`,label:Lt(),onClick:()=>{this.hide()}});this.dialog.content.appendChild(e.element),this.dialog.open()}async update(e){let t;try{this.qrLib??=await Promise.resolve().then(()=>l(Un(),1)),t=await this.qrLib.toDataURL(e,{width:256,margin:4,errorCorrectionLevel:`M`,color:{dark:`#000000`,light:`#ffffff`}})}catch(t){throw this.showLink(e),t}return this.qrSlot!==null&&(this.qrSlot.classList.remove(`ui-qr-slot--loading`),this.qrSlot.replaceChildren(this.createQrImage(t)),!0)}showLink(e){this.qrSlot!==null&&(this.qrSlot.classList.remove(`ui-qr-slot--loading`),this.qrSlot.replaceChildren(this.createText(Ht(),{fontSize:W.fontSize.sm,color:H.neutral[600]}),this.createText(e,{fontSize:W.fontSize.xs,color:H.neutral[900],overflowWrap:`anywhere`,userSelect:`all`})))}hide(){this.dialog?.close(),this.dialog=null,this.qrSlot=null}createText(e,t){let n=document.createElement(`p`);return n.textContent=e,Object.assign(n.style,{margin:`0`,textAlign:`center`,...t}),n}createQrSlot(){let e=document.createElement(`div`);return e.className=`ui-qr-slot ui-qr-slot--loading`,e}createQrImage(e){let t=document.createElement(`img`);return t.src=e,t.alt=Rt(),t}};function Kn(e){let t=Math.max(0,Math.min(1,e));return t*t*(3-2*t)}function qn(e,t,n,r,i,a){let[o,s,c]=e,l=Math.cos(t),u=Math.sin(t),d=l*o+u*c,f=-u*o+l*c,p=Math.cos(n),m=Math.sin(n),h=p*s-m*f,g=m*s+p*f,_=.55;return[r+d*a*_,i-h*a*_,g]}function Jn(e,t,n){e.beginPath(),e.moveTo(t[0],t[1]),e.lineTo(n[0],n[1]),e.lineWidth=2,e.stroke()}function Yn(e,t,n,r,i){let a=t(n),o=t(r);Jn(e,a,[a[0]+(o[0]-a[0])*i,a[1]+(o[1]-a[1])*i,a[2]])}var Xn=[-1,-1,1],Zn=[1,-1,1],Qn=[1,-1,-1],$n=[-1,-1,-1],er=[-1,1,1],tr=[1,1,1],nr=[1,1,-1],Y=[-1,1,-1],rr=[[Xn,Zn],[Zn,Qn],[Qn,$n],[$n,Xn],[Xn,er],[Zn,tr],[Qn,nr],[$n,Y],[er,tr],[tr,nr],[nr,Y],[Y,er]];function ir(e){let t=e%6/6,n=rr.length;return t<.35?Kn(t/.35)*n:t<.55?n:t<.9?(1-Kn((t-.55)/.35))*n:0}function ar(e,{width:t,height:n},r,i){let a=t/2,o=n*.44,s=Math.min(t,n)*.08,c=e=>qn(e,.785,.615,a,o,s),l=ir(r);e.shadowBlur=5,e.shadowColor=`rgba(30,30,30,0.08)`,e.strokeStyle=i;for(let t=0;t<rr.length&&!(t>=l);t++){let n=rr[t];if(n===void 0)continue;let r=Math.min(1,l-t);Yn(e,c,n[0],n[1],r)}e.shadowBlur=0}var or=400,sr=3e4,cr=`-apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif`;function lr(e){let t=document.createElement(`div`);Object.assign(t.style,{position:`absolute`,inset:`0`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,background:`transparent`,color:e,zIndex:`20`,opacity:`0`,transition:`opacity 0.3s ease-in-out`});let n=document.createElement(`canvas`);Object.assign(n.style,{width:`100%`,height:`100%`,position:`absolute`,inset:`0`});let r=document.createElement(`div`);Object.assign(r.style,{position:`absolute`,top:`56%`,left:`0`,right:`0`,textAlign:`center`,pointerEvents:`none`});let i=document.createElement(`span`);Object.assign(i.style,{fontSize:`13px`,fontWeight:`400`,fontVariantNumeric:`tabular-nums`,fontFamily:cr});let a=document.createElement(`span`);return Object.assign(a.style,{fontSize:`13px`,fontFamily:cr}),a.textContent=Wt(),r.appendChild(i),r.appendChild(a),t.appendChild(n),t.appendChild(r),{overlay:t,canvas:n,pctEl:i,phaseEl:a}}var ur=class{overlay;canvas;ctx;pctEl;phaseEl;animationId=null;showTimerId=null;noSignalTimerId=null;startTime;textColor;hidden=!1;visible=!1;errored=!1;noSignalErrored=!1;constructor(e){this.startTime=performance.now();let t=getComputedStyle(e).color;this.textColor=t===``?`#000`:t;let n=lr(this.textColor);this.overlay=n.overlay,this.canvas=n.canvas,this.pctEl=n.pctEl,this.phaseEl=n.phaseEl,e.appendChild(this.overlay),this.ctx=this.canvas.getContext(`2d`),this.ctx!==null&&(this.sizeCanvas(),this.tick()),this.showTimerId=setTimeout(()=>{this.reveal()},or),this.noSignalTimerId=setTimeout(()=>{this.hidden||(this.noSignalErrored=!0,this.showError(Gt()))},sr)}viewerAlive(){this.cancelNoSignalTimer(),this.noSignalErrored&&this.recoverFromNoSignal()}recoverFromNoSignal(){this.noSignalErrored=!1,this.errored=!1,this.pctEl.textContent=``,this.phaseEl.textContent=Wt(),this.ctx!==null&&this.animationId===null&&!this.hidden&&this.tick()}updateProgress(e,t){this.cancelNoSignalTimer(),!(this.hidden||this.errored)&&(this.pctEl.textContent=`${Math.round(e)}%`,this.phaseEl.textContent=t===``?``:` \u00B7 ${t}`)}showError(e){if(this.cancelNoSignalTimer(),this.hidden=!1,this.errored=!0,this.animationId!==null&&(cancelAnimationFrame(this.animationId),this.animationId=null),this.ctx!==null){let e=Math.min(devicePixelRatio,2),t=this.canvas.width/e,n=this.canvas.height/e;this.ctx.clearRect(0,0,t,n)}this.pctEl.textContent=``,this.phaseEl.textContent=e,this.reveal()}hide(){this.hidden||(this.hidden=!0,this.cancelShowTimer(),this.visible?(this.overlay.style.opacity=`0`,this.overlay.addEventListener(`transitionend`,()=>{this.destroy()},{once:!0}),setTimeout(()=>{this.destroy()},500)):this.destroy())}destroy(){this.cancelShowTimer(),this.cancelNoSignalTimer(),this.animationId!==null&&(cancelAnimationFrame(this.animationId),this.animationId=null),this.overlay.remove()}reveal(){this.hidden||this.visible||(this.visible=!0,this.overlay.style.opacity=`1`)}cancelShowTimer(){this.showTimerId!==null&&(clearTimeout(this.showTimerId),this.showTimerId=null)}cancelNoSignalTimer(){this.noSignalTimerId!==null&&(clearTimeout(this.noSignalTimerId),this.noSignalTimerId=null)}sizeCanvas(){if(this.ctx===null)return;let e=Math.min(devicePixelRatio,2),t=this.overlay.clientWidth||440,n=this.overlay.clientHeight||360;this.canvas.width=t*e,this.canvas.height=n*e,this.ctx.scale(e,e),this.ctx.lineCap=`round`,this.ctx.lineJoin=`round`}tick=()=>{this.hidden||(this.drawFrame(),this.animationId=requestAnimationFrame(this.tick))};drawFrame(){if(this.ctx===null)return;let e=this.canvas.width/Math.min(devicePixelRatio,2),t=this.canvas.height/Math.min(devicePixelRatio,2),n=(performance.now()-this.startTime)/1e3;this.ctx.clearRect(0,0,e,t),ar(this.ctx,{width:e,height:t},n,this.textColor)}},dr=class{options;element;arBtn=null;fullscreenBtn=null;annotationsBtn=null;annotationsShown=!1;onFullscreenChange;constructor(e){this.options=e,this.element=document.createElement(`div`),Object.assign(this.element.style,{display:`flex`,gap:`0.375rem`}),this.onFullscreenChange=()=>{this.setFullscreenIcon(document.fullscreenElement!==null)},document.addEventListener(`fullscreenchange`,this.onFullscreenChange)}setFullscreenIcon(e){this.fullscreenBtn!==null&&this.fullscreenBtn.setIcon(e?B.exitFullscreen():B.fullscreen())}syncButton(e,t,n){if(t&&e===null){let e=n();return this.element.appendChild(e.element),e}return!t&&e!==null?(e.element.remove(),null):e}applySettings(e){this.arBtn=this.syncButton(this.arBtn,e.ar!==!1&&this.options.onAr!==void 0,()=>new V({variant:`outline`,size:`icon`,label:Et(),icon:B.ar(),onClick:()=>{this.options.onAr?.()}})),this.fullscreenBtn=this.syncButton(this.fullscreenBtn,e.fullscreen!==!1&&this.options.onFullscreen!==void 0,()=>new V({variant:`outline`,size:`icon`,label:It(),icon:B.fullscreen(),onClick:()=>{this.options.onFullscreen?.()}}));let t=e.annotations===`toggle-shown`||e.annotations===`toggle-hidden`;this.annotationsBtn=this.syncButton(this.annotationsBtn,t&&this.options.onAnnotationsToggle!==void 0,()=>{this.annotationsShown=e.annotations===`toggle-shown`;let t=new V({variant:`outline`,size:`icon`,label:Tt(),icon:this.annotationsShown?B.annotations():B.annotationsOff(),onClick:()=>{this.flipAnnotations()}});return t.element.setAttribute(`aria-pressed`,String(this.annotationsShown)),t})}flipAnnotations(){this.annotationsShown=!this.annotationsShown,this.annotationsBtn?.element.setAttribute(`aria-pressed`,String(this.annotationsShown)),this.annotationsBtn?.setIcon(this.annotationsShown?B.annotations():B.annotationsOff()),this.options.onAnnotationsToggle?.(this.annotationsShown)}destroy(){document.removeEventListener(`fullscreenchange`,this.onFullscreenChange)}},X=.5,fr=class e{element;constructor(t,n){this.element=Object.assign(document.createElement(`div`),{className:`vd-camera-controls`});let r={targetRotation:n.rotation,targetTilt:n.tilt,targetZoom:n.zoom,thetaOffset:0},i=vr(t,n,r);n.onChange(e=>{r.targetRotation=e.rotation-r.thetaOffset,r.targetTilt=e.tilt,r.targetZoom=e.zoom,yr(i,n,e)}),this.element.appendChild(e.buildZoom(i.zoomOut,i.zoomIn)),this.element.appendChild(e.buildDpad(i.tiltUp,i.rotateLeft,i.reset,i.rotateRight,i.tiltDown))}static buildZoom(e,t){let n=document.createElement(`div`);return n.className=`vd-zoom`,n.appendChild(e.element),n.appendChild(t.element),n}static buildDpad(e,t,n,r,i){let a=document.createElement(`div`);a.className=`vd-dpad`;for(let[o,s]of[[e,`up`],[t,`left`],[n,`center`],[r,`right`],[i,`down`]])o.element.classList.add(`vd-dpad-${s}`),a.appendChild(o.element);return a}};function pr(e,t){let n=e;for(;n<t;)n+=360;for(;n>=t+360;)n-=360;return n}function mr(e,t,n){let r=pr(e,t);return r<=n?r:r-n<=t+360-r?n:t}function Z(e,t,n){return new V({variant:`outline`,size:`icon`,label:e,icon:t,onClick:n})}function hr(e,t){return Math.max(e.limits?.minZoom??1,Math.min(e.limits?.maxZoom??1/0,t))}function gr(e,t){let n=e.limits?.minRotate,r=e.limits?.maxRotate;return n===void 0||r===void 0||r-n>=360?t:mr(t,n,r)}function _r(e,t,n,r){let i=t.limits?.minTilt,a=t.limits?.maxTilt;if(i!==void 0||a!==void 0){n.targetTilt=Math.max(i??0,Math.min(a??180,n.targetTilt+r)),e.tilt(n.targetTilt).set();return}let o=n.targetTilt+r;o>180||o<0?(n.targetTilt=o>180?360-o:-o,n.thetaOffset=(n.thetaOffset+180)%360,e.tilt(n.targetTilt).rotate(n.targetRotation+n.thetaOffset).set()):(n.targetTilt=o,e.tilt(n.targetTilt).set())}function vr(e,t,n){let r=r=>{n.targetZoom=hr(t,n.targetZoom+r),e.zoom(n.targetZoom).set()},i=r=>{n.targetRotation=gr(t,n.targetRotation+r),e.rotate(n.targetRotation+n.thetaOffset).set()};return{zoomOut:Z(Nt(),B.zoomOut(),()=>{r(-10)}),zoomIn:Z(Mt(),B.zoomIn(),()=>{r(10)}),tiltUp:Z(jt(),B.tiltUp(),()=>{_r(e,t,n,-15)}),rotateLeft:Z(Ot(),B.rotateLeft(),()=>{i(-15)}),reset:Z(Dt(),B.reset(),()=>{n.thetaOffset=0,e.reset()}),rotateRight:Z(kt(),B.rotateRight(),()=>{i(15)}),tiltDown:Z(At(),B.tiltDown(),()=>{_r(e,t,n,15)})}}function yr(e,t,n){let r=t.limits;if(r===void 0)return;e.zoomOut.element.disabled=r.minZoom!==void 0&&n.zoom<=r.minZoom+X,e.zoomIn.element.disabled=r.maxZoom!==void 0&&n.zoom>=r.maxZoom-X,e.tiltUp.element.disabled=r.minTilt!==void 0&&n.tilt<=r.minTilt+X,e.tiltDown.element.disabled=r.maxTilt!==void 0&&n.tilt>=r.maxTilt-X;let{minRotate:i,maxRotate:a}=r;if(i===void 0||a===void 0||a-i>=360){e.rotateLeft.element.disabled=!1,e.rotateRight.element.disabled=!1;return}let o=pr(n.rotation,i);e.rotateLeft.element.disabled=o<=i+X,e.rotateRight.element.disabled=o>=a-X}var Q={SELECT:`vd:select`,SELECTED:`vd:selected`,FOCUS_CHANGE:`vd:focus-change`,CONFIGURATION_CHANGE:`vd:configuration-change`,CONFIGURATION_SUBMIT:`vd:configuration-submit`},br={mm:1,cm:10,m:1e3,in:25.4},xr=3;function Sr(e){let t=e.stepMm/br[e.displayUnit];for(let e=0;e<=xr;e++){let n=t*10**e;if(Math.abs(n-Math.round(n))<1e-9)return e}return xr}function Cr(e,t,n){let r=Sr(t),i=e/br[t.displayUnit];return new Intl.NumberFormat(n,{minimumFractionDigits:r,maximumFractionDigits:r}).format(i)}function wr(e,t,n,r,i,a,o){let s=D(),c=e.values.map(e=>Cr(Number(e),t,s)),l=e.values.find(t=>n.getValue(e.name,t)?.isSelected===!0)??e.defaultValue,u=new pn(e.values,{label:e.name,labels:c,unit:t.displayUnit,...l!==void 0&&{initialSelected:l}});return u.onSelect(t=>{i(e.name,t)}),u.onSettle(t=>{r.dispatch(Q.SELECT,{attribute:e.name,value:t},!0).defaultPrevented||a(e.name,t)}),o(e.name,t=>{u.setSelected(t.value),r.dispatch(Q.SELECTED,{attribute:e.name,value:t.value})}),{element:u.element,setSelectable:()=>{}}}var Tr=5,Er=0;function Dr(e,t,n,r,i,a){let o=document.createElement(`div`);o.className=`vd-attribute`,o.dataset.name=e.name;let s=document.createElement(`span`);s.className=`vd-attribute-label`,s.textContent=Le(e.name),s.id=`vd-attribute-label-${Er++}`,o.appendChild(s),o.setAttribute(`role`,`group`),o.setAttribute(`aria-labelledby`,s.id);let c=e=>{o.style.display=e?`none`:``},l=e.dimension===void 0?Or(e,t,n,r,a):wr(e,e.dimension,t,n,i,r,a);return o.appendChild(l.element),{element:o,setSelectable:l.setSelectable,setHidden:c}}function Or(e,t,n,r,i){let a=e.values.find(n=>t.getValue(e.name,n)?.isSelected===!0),o=e.values.map(t=>Fe(t,e.labels)),s=e.values.length<=Tr?new dn(e.values,a,o):new fn(e.name,e.values,Le(e.name),a,o);return s.onSelect(t=>{n.dispatch(Q.SELECT,{attribute:e.name,value:t},!0).defaultPrevented||r(e.name,t)}),i(e.name,t=>{s.setSelected(t.value),n.dispatch(Q.SELECTED,{attribute:e.name,value:t.value})}),{element:s.element,setSelectable:e=>{s.setEnabled(e)}}}var kr=80,Ar=2500,jr=class{configuration;element;priceEl;vatEl;button;unsubscribe;state=`idle`;resetTimer;constructor(e){this.configuration=e,this.element=document.createElement(`div`),this.element.className=`vd-commerce vd-hidden`;let t=document.createElement(`div`);t.className=`vd-commerce-price`,this.priceEl=document.createElement(`span`),this.priceEl.className=`vd-price`,this.vatEl=document.createElement(`span`),this.vatEl.className=`vd-vat`,t.append(this.priceEl,this.vatEl),this.button=new V({variant:`default`,onClick:()=>{this.handleSubmit()}}),this.button.element.classList.add(`vd-cta`,`vd-hidden`),this.element.append(t,this.button.element),this.unsubscribe=this.configuration.onRender(()=>{this.update()}),this.update()}update(){this.renderPrice(this.configuration.current),this.renderButton();let e=this.configuration.current!==void 0||this.configuration.submitEnabled;this.element.classList.toggle(`vd-hidden`,!e)}destroy(){this.unsubscribe(),this.resetTimer!==void 0&&clearTimeout(this.resetTimer),this.element.remove()}renderPrice(e){e===void 0?(this.priceEl.textContent=``,this.vatEl.textContent=``):(this.priceEl.textContent=Nr(e.price,e.currency),this.vatEl.textContent=Mr(this.configuration.vatDisplay))}renderButton(){let e=this.configuration.submitEnabled;this.button.element.classList.toggle(`vd-hidden`,!e),e&&this.state===`idle`&&this.setButtonText(Mr(this.configuration.buttonLabel))}async handleSubmit(){if(this.state!==`busy`){this.setState(`busy`,St());try{await this.configuration.submit(),this.setState(`success`,wt())}catch(e){if(e instanceof DOMException&&e.name===`AbortError`){this.setState(`idle`,Mr(this.configuration.buttonLabel));return}R.warn(`Commerce submit failed`,{error:e}),this.setState(`failed`,Ct())}this.scheduleReset()}}scheduleReset(){this.resetTimer!==void 0&&clearTimeout(this.resetTimer),this.resetTimer=setTimeout(()=>{this.state=`idle`,this.update()},Ar)}setState(e,t){this.state=e,this.element.dataset.submit=e,this.button.element.disabled=e===`busy`,this.setButtonText(t)}setButtonText(e){this.button.element.textContent=e,this.button.element.setAttribute(`aria-label`,e)}};function Mr(e){return(e??``).slice(0,kr)}function Nr(e,t){try{let n=new Intl.NumberFormat(D(),{style:`currency`,currency:t}),r=n.resolvedOptions().maximumFractionDigits??2;return n.format(e/10**r)}catch{return`${t} ${(e/100).toFixed(2)}`}}var Pr=class{slot=null;panel=null;attach(e,t){this.panel=t,t.style.display=`none`,this.slot=document.createElement(`div`),this.slot.className=`vd-slot-bottom-left`,this.slot.appendChild(t),e.appendChild(this.slot)}setVisible(e){this.panel!==null&&(this.panel.style.display=e?`flex`:`none`)}destroy(){this.slot?.remove(),this.slot=null,this.panel=null}},Fr=572,Ir=class{actionBarSlot;element=null;body=null;openButton=null;closeButton=null;container=null;observer=null;collapsible=!1;expanded=!0;visible=!1;constructor(e){this.actionBarSlot=e}attach(e,t){this.container=e,t.classList.add(`vd-attributes-sidebar`),this.closeButton=new V({variant:`ghost`,size:`icon-sm`,label:Pt(),icon:B.close({size:18}),onClick:()=>{this.expanded=!1,this.render()}});let n=document.createElement(`div`);n.className=`vd-sidebar-header`,n.appendChild(this.closeButton.element),this.body=document.createElement(`div`),this.body.className=`vd-sidebar-body`,this.body.appendChild(t),this.element=document.createElement(`div`),this.element.className=`vd-sidebar vd-hidden`,this.element.append(n,this.body),e.appendChild(this.element),this.openButton=new V({variant:`outline`,size:`icon`,label:Ft(),icon:B.configurator({size:18}),onClick:()=>{this.expanded=!0,this.render()}}),this.openButton.element.classList.add(`vd-configurator-toggle`,`vd-hidden`),this.actionBarSlot.appendChild(this.openButton.element),this.observe()}setVisible(e){this.visible=e,this.render()}destroy(){this.observer?.disconnect(),this.observer=null,this.openButton?.element.remove(),this.element?.remove(),this.container?.classList.remove(`vd-layout-sidebar-right`,`vd-layout-sidebar-permanent`),this.container=null}observe(){typeof ResizeObserver<`u`&&this.container!==null&&(this.observer=new ResizeObserver(e=>{let t=e[0]?.contentRect.width??0;this.setCollapsible(t>0&&t<Fr)}),this.observer.observe(this.container))}setCollapsible(e){e!==this.collapsible&&(this.collapsible=e,this.expanded=!e,this.render())}render(){if(this.element===null||this.openButton===null||this.closeButton===null||this.container===null)return;let e=this.visible&&this.expanded,t=this.visible&&!this.expanded;this.element.classList.toggle(`vd-hidden`,!this.visible),this.element.classList.toggle(`vd-sidebar-collapsed`,t),this.openButton.element.classList.toggle(`vd-hidden`,!t),this.closeButton.element.style.display=this.collapsible?``:`none`,this.container.classList.toggle(`vd-layout-sidebar-right`,e),this.container.classList.toggle(`vd-layout-sidebar-permanent`,e&&!this.collapsible)}},Lr=class{attach(e,t){}setVisible(e){}destroy(){}},Rr={"inframe-bottom-left":()=>new Pr,"sidebar-right":e=>new Ir(e),hidden:()=>new Lr};function zr(e,t){return(Rr[e??``]??(()=>new Pr))(t)}var Br=W.fontFamily.sans.join(`, `),$=`
|
|
492
492
|
position: absolute;
|
|
493
493
|
display: flex;
|
|
494
494
|
z-index: 10;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@virtualdisplay.io/client",
|
|
3
3
|
"description": "TypeScript-first 3D model integration library with iframe-based architecture",
|
|
4
|
-
"version": "4.0.0-alpha.
|
|
4
|
+
"version": "4.0.0-alpha.33",
|
|
5
5
|
"author": "Virtualdisplay <support@virtualdisplay.io>",
|
|
6
6
|
"homepage": "https://virtualdisplay.io",
|
|
7
7
|
"license": "MIT",
|