architwin 1.0.9
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/README.md +530 -0
- package/bundle/LICENSE.md +17 -0
- package/bundle/css/core.css +21 -0
- package/bundle/css/late.css +22 -0
- package/bundle/css/showcase.css +406 -0
- package/bundle/css/unsupported_browser.css +1 -0
- package/bundle/cursors/grab.png +0 -0
- package/bundle/cursors/grabbing.png +0 -0
- package/bundle/cursors/rbe-default.png +0 -0
- package/bundle/cursors/rbe-finish-room.png +0 -0
- package/bundle/cursors/rbe-moving.png +0 -0
- package/bundle/cursors/rbe-place-door.png +0 -0
- package/bundle/cursors/rbe-place-node.png +0 -0
- package/bundle/cursors/rbe-place-opening.png +0 -0
- package/bundle/cursors/zoom-in.png +0 -0
- package/bundle/cursors/zoom-out.png +0 -0
- package/bundle/fonts/ibm-plex-sans-100.woff +0 -0
- package/bundle/fonts/ibm-plex-sans-100.woff2 +0 -0
- package/bundle/fonts/ibm-plex-sans-100italic.woff +0 -0
- package/bundle/fonts/ibm-plex-sans-100italic.woff2 +0 -0
- package/bundle/fonts/ibm-plex-sans-200.woff +0 -0
- package/bundle/fonts/ibm-plex-sans-200.woff2 +0 -0
- package/bundle/fonts/ibm-plex-sans-200italic.woff +0 -0
- package/bundle/fonts/ibm-plex-sans-200italic.woff2 +0 -0
- package/bundle/fonts/ibm-plex-sans-300.woff +0 -0
- package/bundle/fonts/ibm-plex-sans-300.woff2 +0 -0
- package/bundle/fonts/ibm-plex-sans-300italic.woff +0 -0
- package/bundle/fonts/ibm-plex-sans-300italic.woff2 +0 -0
- package/bundle/fonts/ibm-plex-sans-500.woff +0 -0
- package/bundle/fonts/ibm-plex-sans-500.woff2 +0 -0
- package/bundle/fonts/ibm-plex-sans-500italic.woff +0 -0
- package/bundle/fonts/ibm-plex-sans-500italic.woff2 +0 -0
- package/bundle/fonts/ibm-plex-sans-600.woff +0 -0
- package/bundle/fonts/ibm-plex-sans-600.woff2 +0 -0
- package/bundle/fonts/ibm-plex-sans-600italic.woff +0 -0
- package/bundle/fonts/ibm-plex-sans-600italic.woff2 +0 -0
- package/bundle/fonts/ibm-plex-sans-700.woff +0 -0
- package/bundle/fonts/ibm-plex-sans-700.woff2 +0 -0
- package/bundle/fonts/ibm-plex-sans-700italic.woff +0 -0
- package/bundle/fonts/ibm-plex-sans-700italic.woff2 +0 -0
- package/bundle/fonts/ibm-plex-sans-italic.woff +0 -0
- package/bundle/fonts/ibm-plex-sans-italic.woff2 +0 -0
- package/bundle/fonts/ibm-plex-sans-regular.woff +0 -0
- package/bundle/fonts/ibm-plex-sans-regular.woff2 +0 -0
- package/bundle/fonts/mp-font.svg +2079 -0
- package/bundle/fonts/mp-font.woff +0 -0
- package/bundle/fonts/mp-font.woff2 +0 -0
- package/bundle/fonts/roboto-100.woff +0 -0
- package/bundle/fonts/roboto-100.woff2 +0 -0
- package/bundle/fonts/roboto-100italic.woff +0 -0
- package/bundle/fonts/roboto-100italic.woff2 +0 -0
- package/bundle/fonts/roboto-300.woff +0 -0
- package/bundle/fonts/roboto-300.woff2 +0 -0
- package/bundle/fonts/roboto-300italic.woff +0 -0
- package/bundle/fonts/roboto-300italic.woff2 +0 -0
- package/bundle/fonts/roboto-500.woff +0 -0
- package/bundle/fonts/roboto-500.woff2 +0 -0
- package/bundle/fonts/roboto-500italic.woff +0 -0
- package/bundle/fonts/roboto-500italic.woff2 +0 -0
- package/bundle/fonts/roboto-700.woff +0 -0
- package/bundle/fonts/roboto-700.woff2 +0 -0
- package/bundle/fonts/roboto-700italic.woff +0 -0
- package/bundle/fonts/roboto-700italic.woff2 +0 -0
- package/bundle/fonts/roboto-900.woff +0 -0
- package/bundle/fonts/roboto-900.woff2 +0 -0
- package/bundle/fonts/roboto-900italic.woff +0 -0
- package/bundle/fonts/roboto-900italic.woff2 +0 -0
- package/bundle/fonts/roboto-italic.woff +0 -0
- package/bundle/fonts/roboto-italic.woff2 +0 -0
- package/bundle/fonts/roboto-regular.woff +0 -0
- package/bundle/fonts/roboto-regular.woff2 +0 -0
- package/bundle/images/360_placement_pin_mask.png +0 -0
- package/bundle/images/Desktop-help-play-button.svg +1 -0
- package/bundle/images/Desktop-help-spacebar.png +0 -0
- package/bundle/images/MP-logo_H_lock-RGB_color-black.svg +24 -0
- package/bundle/images/NoteColor.png +0 -0
- package/bundle/images/chrome.png +0 -0
- package/bundle/images/edge.png +0 -0
- package/bundle/images/escape.png +0 -0
- package/bundle/images/exterior.png +0 -0
- package/bundle/images/exterior_hover.png +0 -0
- package/bundle/images/firefox.png +0 -0
- package/bundle/images/headset-quest-2.png +0 -0
- package/bundle/images/interior.png +0 -0
- package/bundle/images/interior_hover.png +0 -0
- package/bundle/images/login-screen-background.jpg +0 -0
- package/bundle/images/matterport-app-icon.svg +9 -0
- package/bundle/images/matterport-logo-light.svg +1 -0
- package/bundle/images/mattertag-disc-128-free.v1.png +0 -0
- package/bundle/images/mobile-help-play-button.svg +1 -0
- package/bundle/images/nav_help_360.png +0 -0
- package/bundle/images/nav_help_click_inside.png +0 -0
- package/bundle/images/nav_help_gesture_drag.png +0 -0
- package/bundle/images/nav_help_gesture_drag_two_finger.png +0 -0
- package/bundle/images/nav_help_gesture_pinch.png +0 -0
- package/bundle/images/nav_help_gesture_position.png +0 -0
- package/bundle/images/nav_help_gesture_position_two_finger.png +0 -0
- package/bundle/images/nav_help_gesture_tap.png +0 -0
- package/bundle/images/nav_help_inside_key.png +0 -0
- package/bundle/images/nav_help_keyboard_all.png +0 -0
- package/bundle/images/nav_help_keyboard_left_right.png +0 -0
- package/bundle/images/nav_help_keyboard_up_down.png +0 -0
- package/bundle/images/nav_help_mouse_click.png +0 -0
- package/bundle/images/nav_help_mouse_drag_left.png +0 -0
- package/bundle/images/nav_help_mouse_drag_right.png +0 -0
- package/bundle/images/nav_help_mouse_position_left.png +0 -0
- package/bundle/images/nav_help_mouse_position_right.png +0 -0
- package/bundle/images/nav_help_mouse_zoom.png +0 -0
- package/bundle/images/nav_help_tap_inside.png +0 -0
- package/bundle/images/nav_help_zoom_keys.png +0 -0
- package/bundle/images/objectColor.png +0 -0
- package/bundle/images/outlineBasic1024.png +0 -0
- package/bundle/images/outlineBasic2048.png +0 -0
- package/bundle/images/outlineBasic4096.png +0 -0
- package/bundle/images/outlineBasic512.png +0 -0
- package/bundle/images/outlineEnhanced1024.png +0 -0
- package/bundle/images/outlineEnhanced2048.png +0 -0
- package/bundle/images/outlineEnhanced4096.png +0 -0
- package/bundle/images/outlineEnhanced512.png +0 -0
- package/bundle/images/pinAnchor.png +0 -0
- package/bundle/images/pinIconDefault.png +0 -0
- package/bundle/images/safari.png +0 -0
- package/bundle/images/scope.svg +3 -0
- package/bundle/images/selected_sweep_glow.png +0 -0
- package/bundle/images/showcase-password-background.jpg +0 -0
- package/bundle/images/surface_grid_planar_256.png +0 -0
- package/bundle/images/tagColor.png +0 -0
- package/bundle/images/unsupported-browser.jpg +0 -0
- package/bundle/images/uv_grid_opengl.jpg +0 -0
- package/bundle/images/vert_arrows.png +0 -0
- package/bundle/js/136.js +18 -0
- package/bundle/js/136.js.LICENSE.txt +20 -0
- package/bundle/js/143.js +2 -0
- package/bundle/js/143.js.LICENSE.txt +20 -0
- package/bundle/js/145.js +2 -0
- package/bundle/js/145.js.LICENSE.txt +20 -0
- package/bundle/js/189.js +2 -0
- package/bundle/js/189.js.LICENSE.txt +20 -0
- package/bundle/js/217.js +2 -0
- package/bundle/js/217.js.LICENSE.txt +20 -0
- package/bundle/js/313.js +2 -0
- package/bundle/js/313.js.LICENSE.txt +20 -0
- package/bundle/js/316.js +2 -0
- package/bundle/js/316.js.LICENSE.txt +27 -0
- package/bundle/js/321.js +2 -0
- package/bundle/js/321.js.LICENSE.txt +20 -0
- package/bundle/js/324.js +2 -0
- package/bundle/js/324.js.LICENSE.txt +20 -0
- package/bundle/js/325.js +2 -0
- package/bundle/js/325.js.LICENSE.txt +20 -0
- package/bundle/js/330.js +2 -0
- package/bundle/js/330.js.LICENSE.txt +20 -0
- package/bundle/js/335.js +2 -0
- package/bundle/js/335.js.LICENSE.txt +20 -0
- package/bundle/js/376.js +2 -0
- package/bundle/js/376.js.LICENSE.txt +20 -0
- package/bundle/js/422.js +2 -0
- package/bundle/js/422.js.LICENSE.txt +22 -0
- package/bundle/js/493.js +2 -0
- package/bundle/js/493.js.LICENSE.txt +27 -0
- package/bundle/js/512.js +2 -0
- package/bundle/js/512.js.LICENSE.txt +20 -0
- package/bundle/js/519.js +2 -0
- package/bundle/js/519.js.LICENSE.txt +20 -0
- package/bundle/js/521.js +2 -0
- package/bundle/js/521.js.LICENSE.txt +20 -0
- package/bundle/js/525.js +2 -0
- package/bundle/js/525.js.LICENSE.txt +20 -0
- package/bundle/js/607.js +2 -0
- package/bundle/js/607.js.LICENSE.txt +27 -0
- package/bundle/js/644.js +2 -0
- package/bundle/js/644.js.LICENSE.txt +63 -0
- package/bundle/js/648.js +2 -0
- package/bundle/js/648.js.LICENSE.txt +20 -0
- package/bundle/js/66.js +2 -0
- package/bundle/js/66.js.LICENSE.txt +20 -0
- package/bundle/js/662.js +2 -0
- package/bundle/js/662.js.LICENSE.txt +20 -0
- package/bundle/js/668.js +2 -0
- package/bundle/js/668.js.LICENSE.txt +20 -0
- package/bundle/js/718.js +2 -0
- package/bundle/js/718.js.LICENSE.txt +20 -0
- package/bundle/js/764.js +2 -0
- package/bundle/js/764.js.LICENSE.txt +29 -0
- package/bundle/js/833.js +20 -0
- package/bundle/js/833.js.LICENSE.txt +20 -0
- package/bundle/js/858.js +2 -0
- package/bundle/js/858.js.LICENSE.txt +20 -0
- package/bundle/js/916.js +2 -0
- package/bundle/js/916.js.LICENSE.txt +20 -0
- package/bundle/js/924.js +2 -0
- package/bundle/js/924.js.LICENSE.txt +20 -0
- package/bundle/js/932.js +2 -0
- package/bundle/js/932.js.LICENSE.txt +20 -0
- package/bundle/js/948.js +2 -0
- package/bundle/js/948.js.LICENSE.txt +20 -0
- package/bundle/js/958.js +2 -0
- package/bundle/js/958.js.LICENSE.txt +20 -0
- package/bundle/js/JPEGDecoder.worker.worker.js.LICENSE.txt +29 -0
- package/bundle/js/JPEGEncoder.worker.worker.js.LICENSE.txt +29 -0
- package/bundle/js/PNGDecoder.worker.worker.js.LICENSE.txt +20 -0
- package/bundle/js/PNGEncoder.worker.worker.js.LICENSE.txt +20 -0
- package/bundle/js/browser-check.js +2 -0
- package/bundle/js/browser-check.js.LICENSE.txt +18 -0
- package/bundle/js/showcase.js +6 -0
- package/bundle/js/showcase.js.LICENSE.txt +144 -0
- package/bundle/locale/messages/strings_de.json +1 -0
- package/bundle/locale/messages/strings_es.json +1 -0
- package/bundle/locale/messages/strings_fr.json +1 -0
- package/bundle/locale/messages/strings_it.json +1 -0
- package/bundle/locale/messages/strings_ja.json +1 -0
- package/bundle/locale/messages/strings_ko.json +1 -0
- package/bundle/locale/messages/strings_nl.json +1 -0
- package/bundle/locale/messages/strings_pt.json +1 -0
- package/bundle/locale/messages/strings_ru.json +1 -0
- package/bundle/locale/messages/strings_zh-CN.json +1 -0
- package/bundle/locale/messages/strings_zh-TW.json +1 -0
- package/bundle/locale/strings.json +1 -0
- package/bundle/sdk/cursors/grab.png +0 -0
- package/bundle/sdk/cursors/grabbing.png +0 -0
- package/bundle/sdk/cursors/rbe-default.png +0 -0
- package/bundle/sdk/cursors/rbe-finish-room.png +0 -0
- package/bundle/sdk/cursors/rbe-moving.png +0 -0
- package/bundle/sdk/cursors/rbe-place-door.png +0 -0
- package/bundle/sdk/cursors/rbe-place-node.png +0 -0
- package/bundle/sdk/cursors/rbe-place-opening.png +0 -0
- package/bundle/sdk/cursors/zoom-in.png +0 -0
- package/bundle/sdk/cursors/zoom-out.png +0 -0
- package/bundle/sdk/sandbox.html +1 -0
- package/bundle/sdk/sdk-client.js +1 -0
- package/bundle/sdk/sdk-interface.js +1 -0
- package/bundle/sdk.d.ts +5312 -0
- package/bundle/showcase.html +114 -0
- package/bundle/terms/terms-de-DE.html +69 -0
- package/bundle/terms/terms-en-GB.html +62 -0
- package/bundle/terms/terms-en-US.html +62 -0
- package/bundle/terms/terms-es-MX.html +66 -0
- package/bundle/terms/terms-fr-FR.html +65 -0
- package/bundle/terms/terms-it-IT.html +65 -0
- package/bundle/terms/terms-ja-JP.html +64 -0
- package/bundle/terms/terms-ko-KR.html +65 -0
- package/bundle/terms/terms-nl-NL.html +65 -0
- package/bundle/terms/terms-pt-BR.html +75 -0
- package/bundle/terms/terms-ru-RU.html +72 -0
- package/bundle/terms/terms-zh-CN.html +65 -0
- package/bundle/terms/terms-zh-TW.html +84 -0
- package/bundle/vendors/three/0.146.0/libs/basis/README.md +32 -0
- package/bundle/vendors/three/0.146.0/libs/basis/basis_transcoder.js +1 -0
- package/bundle/vendors/three/0.146.0/libs/basis/basis_transcoder.wasm +0 -0
- package/bundle/vendors/three/0.146.0/libs/basis/no-dynamic-execution.patch +11 -0
- package/bundle/vendors/three/0.146.0/libs/draco/README.md +32 -0
- package/bundle/vendors/three/0.146.0/libs/draco/draco_decoder.js +1 -0
- package/bundle/vendors/three/0.146.0/libs/draco/draco_decoder.wasm +0 -0
- package/bundle/vendors/three/0.146.0/libs/draco/draco_encoder.js +1 -0
- package/bundle/vendors/three/0.146.0/libs/draco/draco_wasm_wrapper.js +1 -0
- package/bundle/vendors/three/0.146.0/libs/draco/gltf/draco_decoder.js +1 -0
- package/bundle/vendors/three/0.146.0/libs/draco/gltf/draco_decoder.wasm +0 -0
- package/bundle/vendors/three/0.146.0/libs/draco/gltf/draco_encoder.js +1 -0
- package/bundle/vendors/three/0.146.0/libs/draco/gltf/draco_wasm_wrapper.js +1 -0
- package/bundle/vendors/three/0.146.0/three.cjs +2 -0
- package/bundle/vendors/three/0.146.0/three.cjs.LICENSE.txt +5 -0
- package/bundle/vendors/three/0.146.0/three.js +2 -0
- package/bundle/vendors/three/0.146.0/three.js.LICENSE.txt +5 -0
- package/bundle/vendors/three/0.146.0/three.min.js +2 -0
- package/bundle/vendors/three/0.146.0/three.min.js.LICENSE.txt +5 -0
- package/bundle/vendors/three/0.146.0/three.module.js +2 -0
- package/bundle/vendors/three/0.146.0/three.module.js.LICENSE.txt +5 -0
- package/bundle/version.txt +1 -0
- package/lib/architwin.d.ts +24 -0
- package/lib/architwin.min.js +1 -0
- package/lib/types.d.ts +123 -0
- package/lib/types.js +2 -0
- package/package.json +26 -0
- package/tsconfig.json +11 -0
package/bundle/js/662.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 662.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunkmp_webgl=self.webpackChunkmp_webgl||[]).push([[662],{4061:(e,t,o)=>{var s=o(43842);function n(e,t,o){var n,r,d,l;t=t||1;for(var h=0;h<e[0].length;h++){var c=e[0][h];(!h||c[0]<n)&&(n=c[0]),(!h||c[1]<r)&&(r=c[1]),(!h||c[0]>d)&&(d=c[0]),(!h||c[1]>l)&&(l=c[1])}var u=d-n,g=l-r,p=Math.min(u,g),f=p/2;if(0===p){var w=[n,r];return w.distance=0,w}for(var m=new s(void 0,a),_=n;_<d;_+=p)for(var v=r;v<l;v+=p)m.push(new i(_+f,v+f,f,e));var b=function(e){for(var t=0,o=0,s=0,n=e[0],a=0,r=n.length,d=r-1;a<r;d=a++){var l=n[a],h=n[d],c=l[0]*h[1]-h[0]*l[1];o+=(l[0]+h[0])*c,s+=(l[1]+h[1])*c,t+=3*c}return 0===t?new i(n[0][0],n[0][1],0,e):new i(o/t,s/t,0,e)}(e),I=new i(n+u/2,r+g/2,0,e);I.d>b.d&&(b=I);for(var W=m.length;m.length;){var N=m.pop();N.d>b.d&&(b=N,o&&console.log("found best %d after %d probes",Math.round(1e4*N.d)/1e4,W)),N.max-b.d<=t||(f=N.h/2,m.push(new i(N.x-f,N.y-f,f,e)),m.push(new i(N.x+f,N.y-f,f,e)),m.push(new i(N.x-f,N.y+f,f,e)),m.push(new i(N.x+f,N.y+f,f,e)),W+=4)}o&&(console.log("num probes: "+W),console.log("best distance: "+b.d));var x=[b.x,b.y];return x.distance=b.d,x}function a(e,t){return t.max-e.max}function i(e,t,o,s){this.x=e,this.y=t,this.h=o,this.d=function(e,t,o){for(var s=!1,n=1/0,a=0;a<o.length;a++)for(var i=o[a],d=0,l=i.length,h=l-1;d<l;h=d++){var c=i[d],u=i[h];c[1]>t!=u[1]>t&&e<(u[0]-c[0])*(t-c[1])/(u[1]-c[1])+c[0]&&(s=!s),n=Math.min(n,r(e,t,c,u))}return 0===n?0:(s?1:-1)*Math.sqrt(n)}(e,t,s),this.max=this.d+this.h*Math.SQRT2}function r(e,t,o,s){var n=o[0],a=o[1],i=s[0]-n,r=s[1]-a;if(0!==i||0!==r){var d=((e-n)*i+(t-a)*r)/(i*i+r*r);d>1?(n=s[0],a=s[1]):d>0&&(n+=i*d,a+=r*d)}return(i=e-n)*i+(r=t-a)*r}s.default&&(s=s.default),e.exports=n,e.exports.default=n},43842:(e,t,o)=>{o.r(t),o.d(t,{default:()=>s});class s{constructor(e=[],t=n){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(e){this.data.push(e),this.length++,this._up(this.length-1)}pop(){if(0===this.length)return;const e=this.data[0],t=this.data.pop();return this.length--,this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){const{data:t,compare:o}=this,s=t[e];for(;e>0;){const n=e-1>>1,a=t[n];if(o(s,a)>=0)break;t[e]=a,e=n}t[e]=s}_down(e){const{data:t,compare:o}=this,s=this.length>>1,n=t[e];for(;e<s;){let s=1+(e<<1),a=t[s];const i=s+1;if(i<this.length&&o(t[i],a)<0&&(s=i,a=t[i]),o(a,n)>=0)break;t[e]=a,e=s}t[e]=n}}function n(e,t){return e<t?-1:e>t?1:0}},42605:(e,t,o)=>{o.r(t),o.d(t,{default:()=>ee});var s=o(97542),n=o(89570),a=o(35221),i=o(5823),r=o(80742),d=o(63422),l=o(38399),h=o(71166),c=o(56163),u=o(76957);class g extends c.K{constructor(e,t,o,s){super(e,t),this.room=o,this.id=this.room.id,this.title=this.room.getRoomLabel(),this.icon="icon-edit-floorplan",this.typeId=i.SF.MODELROOM,this.layerId=d.gi,this.dateBucket=a.Z.OLDER,this.enabled=!0,this.floorId=s}}var p=o(81396),f=o(46391),w=o(78283),m=o(4061),_=o.n(m);function v(e){const t=e.map((e=>[e.x,e.z]));return t.push(t[0]),function(e,t=!1){let o=0;for(let t=0,s=e.length;t<s;t++){const n=e[t],a=e[t===s-1?0:t+1];o+=n[0]*a[1],o-=a[0]*n[1]}return t?o/2:Math.abs(o/2)}(t)}class b{constructor(e,t,o,s,n="Unknown",a=!0){this.id=e,this.name=t,this.points=o,this.walls=s,this.roomType=n,this.useRoomTypeAsName=a}get floorIndex(){return this.points[0].floorIndex}getSnapshot(){return{height:0,lowerElevation:0,source:"frontend",vertices:this.points.map((e=>e.id))}}getViewCenter(){const e=this.points.map((e=>[e.x,e.z]));e.push([this.points[0].x,this.points[0].z]);const t=_()([e],.1);return new p.Vector3(t[0],0,t[1])}getArea(){return v(this.points)}getAreaText(e){let t=this.getArea();e===f.M.IMPERIAL&&(t=(0,w.Nv)(t));const o=e===f.M.IMPERIAL?" sq ft":" sq m";return Math.round(t)+o}getRoomLabel(){return this.useRoomTypeAsName?this.roomType:this.name}}var I=o(92558);class W{constructor(e,t,o,s,n){this.bias=.5,this.openings=[],this._t1=new p.Vector3,this._t2=new p.Vector3,this.id=e,this.from=t,this.to=o,this.width=s,this.bias=n}static getCompositeKey(e,t){const o=[e,t].sort();return`${o[0]}:${o[1]}`}get floorIndex(){return this.from.floorIndex}getOtherNode(e){if(e===this.from)return this.to;if(e===this.to)return this.from;throw new Error("WallNode does not belong to edge.")}hasNodes(e,t){const{from:o,to:s}=this;return!(e!==o&&e!==s||t!==o&&t!==s)}getBiasAdjustmentVec(e=new p.Vector3){this.getNormal(e);const t=(this.bias-.5)*-this.width;return e.multiplyScalar(t),e}getNormal(e=new p.Vector3){return this.getDirection(e),e.normalize(),e.set(-e.z,0,e.x),e}getDirection(e){const t=e||new p.Vector3;return t.set(this.to.x-this.from.x,0,this.to.z-this.from.z),t}getProjection(e){const t=this._t1.copy(e).sub(this.from.getVec3(this._t2)),o=this.getDirection(this._t2);return t.dot(o)/o.length()}getSnapshot(){const e={thickness:this.width};if(this.openings.length){const t={};for(const e of this.openings)t[e.id]=e.getSnapshot();e.openings=t}return e}getViewCenter(){return(new p.Vector3).addVectors(this.to.getVec3(),this.from.getVec3()).multiplyScalar(.5)}get length(){const e=this.from.x-this.to.x,t=this.from.z-this.to.z;return Math.sqrt(e*e+t*t)}clone(){const e=new W(this.id,this.from,this.to,this.width,this.bias);return e.openings.push(...this.openings),e}}class N{constructor(e,t,o,s){this.id=e,this.floorIndex=t,this.x=o,this.z=s}getPoint(){return{x:this.x,z:this.z}}getVec3(e){const t=e||new p.Vector3;return t.set(this.x,0,this.z),t}getViewCenter(){return this.getVec3()}getSnapshot(){return{x:this.x,y:-this.z}}}var x=o(83021);class y{constructor(e){this.afterAction=e,this.actions=[]}run(){for(const e of this.actions)e.run(),this.afterAction()}invert(){for(let e=this.actions.length-1;e>=0;e--){this.actions[e].invert(),this.afterAction()}}merge(e){if(0===this.actions.length)this.actions.push(e);else{const t=this.actions[this.actions.length-1];t&&t.merge(e)||this.actions.push(e)}return!0}}class O{constructor(e){this.afterAction=e,this.undoBuffer=new x.P(50),this.finalized=!1}push(e){(this.undoBuffer.isEmpty()||this.finalized)&&(this.undoBuffer.push(new y(this.afterAction)),this.finalized=!1);const t=this.undoBuffer.peek();t&&t.merge(e)}pop(){return this.undoBuffer.pop()}finalize(){this.finalized=!0}availableUndos(){return this.undoBuffer.count}}var R,P=o(35895),C=o(97998);function E(e,t){let o,s,n=t[t.length-1],a=0;for(let i=0;i<t.length;++i)o=n,n=t[i],o.y<=e.y&&n.y<=e.y||o.y>e.y&&n.y>e.y||o.x<e.x&&n.x<e.x||(s=(e.y-o.y)*(n.x-o.x)-(e.x-o.x)*(n.y-o.y),n.y<o.y&&(s=-s),a+=s>0?1:0);return a%2==1}function T(e,t){return e.size===t.size&&[...e].every((e=>t.has(e)))}!function(e){e.DOOR="door",e.OPENING="opening"}(R||(R={}));class z{constructor(e,t,o,s,n){this.id=e,this.wallId=t,this.type=o,this.relativePos=s,this.width=n}get floorIndex(){return-1}getViewCenter(){return new p.Vector3(0,0,0)}getSnapshot(){const{type:e,relativePos:t,width:o}=this;return{lowerElevation:0,height:0,type:e,relativePos:t,width:o}}}class A{constructor(){this.data=new Map,this.addedObservers=new Set,this.updatedObservers=new Set,this.deletedObservers=new Set}clear(){this.data.clear()}get(e){return this.data.get(e)}set(e,t){this.data.set(e,t)}delete(e){this.data.delete(e)}has(e){return this.data.has(e)}onChanged(e){return(0,P.k1)((()=>{e.onAdded&&this.addedObservers.add(e.onAdded),e.onUpdated&&this.updatedObservers.add(e.onUpdated),e.onRemoved&&this.deletedObservers.add(e.onRemoved)}),(()=>{e.onAdded&&this.addedObservers.delete(e.onAdded),e.onUpdated&&this.updatedObservers.delete(e.onUpdated),e.onRemoved&&this.deletedObservers.delete(e.onRemoved)}),!0)}}class F{constructor(e,t){this.data=e,this.inputs=t,this._outputCache=null}onRun(e){throw new Error("Method not implemented.")}onInvert(e,t){throw new Error("Method not implemented.")}run(){this._outputCache=this.onRun(this.inputs)}invert(){if(!this._outputCache)throw new Error("Attempted to inverse a data action before running it");this.onInvert(this._outputCache,this.inputs),this._outputCache=null}merge(e){return!1}get output(){if(this._outputCache)return this._outputCache;throw new Error("Tried to read output of an action before it was run")}}class M extends F{onRun(e){const t=this.data.getNode(e.nodeId),o={x:t.x,z:t.z};return this.data._updateNode(e.nodeId,e.newPos),this.data._updateWallForNodes(t),{prevPos:o}}onInvert(e,t){this.data._updateNode(t.nodeId,e.prevPos);const o=this.data.getNode(t.nodeId);this.data._updateWallForNodes(o)}merge(e){return e instanceof M&&e.inputs.nodeId===this.inputs.nodeId&&(this.inputs.newPos=e.inputs.newPos,!0)}}class S extends F{onRun(e){const t=this.data._createNode(e.from,e.floorIndex),o=this.data._createNode(e.to,e.floorIndex),s=this.data._createWall(t,o,e.width,[],.5);return{fromId:t.id,toId:o.id,wall:s.id}}onInvert(e,t){this.data._deleteWall(e.wall),this.data._deleteNode(e.fromId),this.data._deleteNode(e.toId)}merge(e){return!!(e instanceof M&&this._outputCache&&e.inputs.nodeId===this._outputCache.toId)&&(this.inputs.to=e.inputs.newPos,!0)}}class V extends F{onRun(e){const t=this.data.getWall(e.wallId),o=t.from.getPoint(),s=t.to.getPoint();return this.data._updateNode(t.from.id,e.newFromPos),this.data._updateNode(t.to.id,e.newToPos),this.data._updateWallForNodes(t.from,t.to),{prevFromPos:o,prevToPos:s}}onInvert(e,t){const o=this.data.getWall(t.wallId);this.data._updateNode(o.from.id,e.prevFromPos),this.data._updateNode(o.to.id,e.prevToPos),this.data._updateWallForNodes(o.from,o.to)}merge(e){return e instanceof V&&e.inputs.wallId===this.inputs.wallId&&(this.inputs.newFromPos=e.inputs.newFromPos,this.inputs.newToPos=e.inputs.newToPos,!0)}}class B extends F{onRun(e){const t=this.data.getNode(e.fromId),o=this.data._createNode(e.to,t.floorIndex),s=this.data._createWall(t,o,e.width,[],.5);return{toId:o.id,wall:s.id}}onInvert(e,t){this.data._deleteWall(e.wall),this.data._deleteNode(e.toId)}merge(e){return!!(e instanceof M&&this._outputCache&&e.inputs.nodeId===this._outputCache.toId)&&(this.inputs.to=e.inputs.newPos,!0)}}function D(e,t,o){const s=new p.Line3(e.from.getVec3(),e.to.getVec3()),n=t.map((e=>({wall:e,line:new p.Line3(e.from.getVec3(),e.to.getVec3())}))),a=(e,t)=>{const o=e.closestPointToPointParameter(t,!1);if(!(o<0||o>1))return o};for(const t of e.openings){const{type:e,width:i,relativePos:r,id:d}=t,l=s.at(r,new p.Vector3);for(const{wall:t,line:s}of n){const n=a(s,l);if(void 0!==n){o._createWallOpening(t,e,n,i,d);break}}}}class k extends F{onRun(e){const t=this.data.getNode(e.mergeId),o=this.data.getNode(e.keepId),s=o.getPoint();this.data._updateNode(o.id,t.getPoint());const n=this.data.getWallsForNode(t),a=[];for(const e of n){const s=e.clone(),n=e.getOtherNode(t),i=e.width;this.data._deleteWall(e.id);let r=null;this.needsReplacementWall(e,t,o)&&(r=this.data._createWall(n,o,i,[],e.bias),D(e,[r],this.data)),a.push({deleted:s,created:r})}return this.data._deleteNode(t.id),this.data._updateWallForNodes(t,o),{deletedNode:t,wallDiff:a,oldKeepNodePos:s}}onInvert(e,t){const o=e.deletedNode,s=this.data._createNode(o.getPoint(),o.floorIndex,o.id);for(const t of e.wallDiff)t.created&&this.data._deleteWall(t.created.id),this.data._createWall(s,t.deleted.getOtherNode(e.deletedNode),t.deleted.width,t.deleted.openings,t.deleted.bias);this.data._updateNode(t.keepId,e.oldKeepNodePos),this.data._updateWallForNodes(s,this.data.getNode(t.keepId))}needsReplacementWall(e,t,o){const s=e.getOtherNode(t);if(s===o)return!1;const n=W.getCompositeKey(s.id,o.id);return!this.data.walls.has(n)}}class L extends F{onRun(e){const t=this.data.getWall(e.wallId).clone(),o=this.data.getEdgeCountForNode(t.from),s=this.data.getEdgeCountForNode(t.to);this.data._deleteWall(e.wallId);let n="none";return 1===o&&1===s?(n="both",this.data._deleteNode(t.from.id),this.data._deleteNode(t.to.id)):1===o?(n="from",this.data._deleteNode(t.from.id),this.data._updateWallForNodes(t.to)):1===s?(n="to",this.data._deleteNode(t.to.id),this.data._updateWallForNodes(t.from)):(n="none",this.data._updateWallForNodes(t.from,t.to)),{deletedWall:t,deletedNodes:n}}onInvert(e,t){const o=e.deletedWall;let s,n;switch(e.deletedNodes){case"both":s=this.data._createNode({x:o.from.x,z:o.from.z},o.floorIndex,o.from.id),n=this.data._createNode({x:o.to.x,z:o.to.z},o.floorIndex,o.to.id),this.data._createWall(s,n,o.width,o.openings,o.bias);break;case"none":this.data._createWall(o.from,o.to,o.width,o.openings,o.bias),this.data._updateWallForNodes(o.from,o.to);break;case"from":s=this.data._createNode({x:o.from.x,z:o.from.z},o.floorIndex,o.from.id),this.data._createWall(s,o.to,o.width,o.openings,o.bias),this.data._updateWallForNodes(o.to);break;case"to":n=this.data._createNode({x:o.to.x,z:o.to.z},o.floorIndex,o.to.id),this.data._createWall(o.from,n,o.width,o.openings,o.bias),this.data._updateWallForNodes(o.from);break;default:throw new Error(`${e.deletedNodes} is an invalid value`)}}}class $ extends F{onRun(e){const t=this.data.getWall(e.fromWallId).clone(),o=t.getDirection().normalize().multiplyScalar(e.along),s=t.from.getVec3().add(o);this.data._deleteWall(e.fromWallId);const n=this.data._createNode({x:s.x,z:s.z},t.floorIndex),a=this.data._createNode(e.to,t.floorIndex),i=this.data._createWall(n,a,e.width,[],.5),r=this.data._createWall(t.from,n,t.width,[],t.bias),d=this.data._createWall(n,t.to,t.width,[],t.bias);return D(t,[r,d],this.data),{deletedWall:t,newTrailingWall:i,newLeftWall:r,newRightWall:d,newNodeToId:a.id}}onInvert(e,t){const{deletedWall:o,newTrailingWall:s,newLeftWall:n,newRightWall:a}=e;this.data._deleteWall(s.id),this.data._deleteWall(n.id),this.data._deleteWall(a.id),this.data._deleteNode(s.from.id),this.data._deleteNode(s.to.id),this.data._createWall(o.from,o.to,o.width,o.openings,o.bias)}merge(e){return!!(e instanceof M&&this._outputCache&&e.inputs.nodeId===this._outputCache.newTrailingWall.to.id)&&(this.inputs.to=e.inputs.newPos,!0)}}class K extends F{onRun(e){const t=this.data.getWall(e.wallId),o=this.data.getNode(e.nodeId),s={x:o.x,z:o.z},n=t.getDirection().normalize().multiplyScalar(e.along),a=t.from.getVec3().add(n);this.data._deleteWall(t.id),this.data._updateNode(e.nodeId,{x:a.x,z:a.z}),this.data._updateWallForNodes(o);const i=this.data.hasWallBetween(t.from,o)?null:this.data._createWall(t.from,o,t.width,[],t.bias),r=this.data.hasWallBetween(o,t.to)?null:this.data._createWall(o,t.to,t.width,[],t.bias);return D(t,[i,r].filter((e=>!!e)),this.data),{deletedWall:t,newLeftWall:i,newRightWall:r,prevNodePos:s}}onInvert(e,t){const{newLeftWall:o,newRightWall:s,deletedWall:n,prevNodePos:a}=e;o&&this.data._deleteWall(o.id),s&&this.data._deleteWall(s.id),this.data._updateNode(t.nodeId,a),this.data._updateWallForNodes(this.data.getNode(t.nodeId)),this.data._createWall(n.from,n.to,n.width,n.openings,n.bias)}}class U extends F{onRun({wallId:e,props:t}){const o=this.data.getWall(e),s=o.width,n=o.bias;return this.data._setEdgeProps(e,t),{wallId:e,props:{width:s,bias:n}}}onInvert({wallId:e,props:t},o){this.data._setEdgeProps(e,t)}merge(e){return e instanceof U&&e.inputs.wallId===this.inputs.wallId&&(this.inputs.props.width=e.inputs.props.width,this.inputs.props.bias=e.inputs.props.bias,!0)}}class G extends F{onRun(e){const t=this.data.getWall(e.wallId),o=[],s=[],n=[],a={originalFromPos:t.from.getPoint(),originalToPos:t.to.getPoint(),deletedWalls:s,createdWalls:o,originalWallId:e.wallId,createdNodes:n};return e.fromNode&&this.createJoint(t.from,t,s,o,n),e.toNode&&this.createJoint(t.to,t,s,o,n),a}onInvert(e,t){for(const t of e.createdWalls)this.data._deleteWall(t.id);for(const t of e.deletedWalls)this.data._createWall(t.from,t.to,t.width,t.openings,t.bias);for(const t of e.createdNodes)this.data._deleteNode(t.id);const o=this.data.getWall(this.inputs.wallId);this.data._updateNode(o.from.id,e.originalFromPos),this.data._updateNode(o.to.id,e.originalToPos),this.data._updateWallForNodes(o.from,o.to)}merge(e){return e instanceof V&&e.inputs.wallId===this.inputs.wallId&&(this.inputs.fromPos=e.inputs.newFromPos,this.inputs.toPos=e.inputs.newToPos,!0)}createJoint(e,t,o,s,n){const a=this.data._createNode({x:e.x,z:e.z},e.floorIndex),i=this.data.getWallsForNode(e);for(const n of i){const i=n.clone();if(i.id!==t.id){const t=i.getOtherNode(e);o.push(i),this.data._deleteWall(i.id);const n=i.from===t?this.data._createWall(t,a,i.width,[],i.bias):this.data._createWall(a,t,i.width,[],i.bias);D(i,[n],this.data),s.push(n)}}n.push(a);const r=t.from===e?this.data._createWall(a,t.from,t.width,[],t.bias):this.data._createWall(t.to,a,t.width,[],t.bias);s.push(r)}}class H extends F{onRun(e){const t=this.data.getNode(e.nodeId),o=Array.from(this.data.getWallsForNode(t).values());if(2!==o.length)throw new Error("Can only delete nodes with two edges on it");const s=o[0].clone(),n=s.getOtherNode(t),a=o[1].clone(),i=a.getOtherNode(t);this.data._deleteNode(t.id),this.data._deleteWall(s.id),this.data._deleteWall(a.id);const r=this.data.hasWallBetween(n,i)?null:this.data._createWall(n,i,(s.width+a.width)/2,[],(s.bias+a.bias)/2);return r&&(D(s,[r],this.data),D(a,[r],this.data)),{deletedNode:t,deletedWall1:s,deletedWall2:a,createdWall:r}}onInvert(e,t){const{createdWall:o,deletedNode:s,deletedWall1:n,deletedWall2:a}=e;o&&this.data._deleteWall(o.id),this.data._createNode(s.getPoint(),s.floorIndex,s.id),this.data._createWall(n.from,n.to,n.width,n.openings,n.bias),this.data._createWall(a.from,a.to,a.width,a.openings,a.bias)}}class Q extends F{onRun(e){return this.data._recomputeRooms()}onInvert(e,t){if(e.createdRooms)for(const t of e.createdRooms)this.data._deleteRoom(t.id);if(e.deletedRooms)for(const t of e.deletedRooms)this.data._createRoom(t.id,t.points,t.walls)}}class q extends F{onRun(e){const t=this.data.getNode(e.fromId),o=this.data.getNode(e.toId);return{wall:this.data._createWall(t,o,e.width,[],.5).id}}onInvert(e,t){this.data._deleteWall(e.wall)}}class j extends F{onRun(e){const{id:t}=e,o=this.data.getOpening(t),{type:s,relativePos:n,width:a}=o;return this.data._setOpeningDetails(t,e),{id:t,type:s,relativePos:n,width:a}}onInvert(e,t){const{id:o}=e;this.data._setOpeningDetails(o,e)}}class J extends F{onRun(e){const{openingId:t}=e,o=this.data.getOpening(t);return this.data._deleteWallOpening(t),{deletedOpening:o}}onInvert(e,t){const{id:o,wallId:s,type:n,relativePos:a,width:i}=e.deletedOpening,r=this.data.getWall(s);this.data._createWallOpening(r,n,a,i,o)}}class Y extends F{onRun(e){const{wallId:t,type:o,relativePos:s,width:n}=e,a=this.data.getWall(t);return{openingId:this.data._createWallOpening(a,o,s,n).id}}onInvert(e,t){const{openingId:o}=e;this.data._deleteWallOpening(o)}}class Z{constructor(e){this.name="wall-graph",this.version=0,this._nodes=new A,this._walls=new A,this._rooms=new A,this._wallOpenings=new A,this.undoBuffer=new O(this.commit.bind(this)),this._nodeToWallMap=new Map,this._wallToRoomMap=new Map,this._wallsByFloor=new Map,this._observerQueue=[],this._anythingChangeObservers=new Set,this.logger=new C.Z("wall-graph"),this.wallsChanged=!1,this._updateWallForNodes=(()=>{const e=new Set,t=new Set;return(...o)=>{e.clear(),t.clear();const s=o=>{if(!e.has(o)){this._scheduleObserver({observers:this._walls.updatedObservers,param:o});const s=this._wallToRoomMap.get(o);if(s)for(const e of s.values())t.has(e)||(this._scheduleObserver({observers:this._rooms.updatedObservers,param:e}),t.add(e));for(const e of o.openings)this._scheduleObserver({observers:this._wallOpenings.updatedObservers,param:e});e.add(o)}};for(const e of o){const t=this._nodeToWallMap.get(e);if(null!=t)for(const o of t){s(o);const t=o.getOtherNode(e),n=this._nodeToWallMap.get(t);if(null!=n)for(const e of n)s(e)}}}})(),this.getRelativeAngle=(()=>{const e=new p.Vector2,t=new p.Vector2,o=new p.Vector2,s=(t,o)=>{if(0===t.lengthSq()){const s=this.getNodeNeighbors(o);if(0===s.size)return;const n=Array.from(s.values())[0];t.set(n.x,n.z).sub(e)}};return(n,a,i)=>{if(a===i)return 2*Math.PI;e.set(n.x,n.z),t.set(a.x,a.z).sub(e),s(t,a),o.set(i.x,i.z).sub(e),s(o,i);const r=Math.atan2(t.y,t.x);let d=-(Math.atan2(o.y,o.x)-r);return d<0&&(d+=2*Math.PI),d}})(),e&&(this.version=e.version,this.load(e))}load(e){var t;let o=!1;for(const s in e.floors){const n=e.floors[s],a=n.vertices;for(const e in a){const t=a[e];this._createNode({x:t.x,z:-t.y},parseInt(s,10),e)}for(const e in n.edges){const[o,s]=e.split(":"),a=n.edges[e],i=a.thickness,r=this.getNode(o),d=this.getNode(s),l=this._createWall(r,d,i,[],null!==(t=a.bias)&&void 0!==t?t:.5);for(const e in a.openings){const{relativePos:t,type:o,width:s}=a.openings[e];this._createWallOpening(l,o,t,s,e)}}if(n.rooms)for(const e in n.rooms){o=!0;const t=n.rooms[e],s=t.vertices.map((e=>this.getNode(e))),a=new Set;for(let e=0;e<t.vertices.length;e++){const o=t.vertices[e],s=t.vertices[(e+1)%t.vertices.length],n=W.getCompositeKey(o,s);a.add(this.getWall(n))}this._createRoom(e,s,a)}}o||this._recomputeRooms()}get walls(){return this._walls.data}get nodes(){return this._nodes.data}get rooms(){return this._rooms.data}get wallOpenings(){return this._wallOpenings.data}getNode(e){const t=this._nodes.get(e);if(t)return t;throw new Error("WallNode does not exist in WallGraphData")}getWall(e){const t=this._walls.get(e);if(t)return t;throw new Error("Wall does not exist in WallGraphData")}getRoom(e){const t=this._rooms.get(e);if(!t)throw new Error("Room id is invalid!");return t}getOpening(e){const t=this._wallOpenings.get(e);if(!t)throw new Error("Opening id is invalid");return t}getEntity(e){const t=this._walls.get(e)||this._nodes.get(e)||this._rooms.get(e)||this._wallOpenings.get(e);if(!t)throw new Error("No entity for id.");return t}getEdgeCountForNode(e){var t;return(null===(t=this._nodeToWallMap.get(e))||void 0===t?void 0:t.size)||0}getWallsForNode(e){const t=this._nodeToWallMap.get(e);if(t&&t.size>0)return t;throw new Error("WallNode has no associate walls, this should not happen unless inside an action")}getWallsForFloor(e){const t=this._wallsByFloor.get(e);return t&&t.size>0?t:null}getRoomClassifications(){return["Basement","Bathroom","Bedroom","Closet","Corridor","Dining","Driveway","Facade","Garage","Garden","Yard","Kitchen","Laundry","Living","Lobby","Office","Patio","Pool","Staircase","Unfurnished","Other","Mixed","Unknown"]}hasWallBetween(e,t){const o=W.getCompositeKey(e.id,t.id);return this._walls.has(o)}canDeleteEntity(e){if(null!=e){const t=this.getEntity(e);return t instanceof N?2===this.getEdgeCountForNode(t):t instanceof W||t instanceof z}return!1}undo(){const e=this.undoBuffer.pop();e&&(this.wallsChanged=!1,e.invert(),this.wallsChanged&&this._recomputeRooms(),this.commit())}availableUndos(){return this.undoBuffer.availableUndos()}finalizeHistory(){this.undoBuffer.finalize()}triggerAction(e){try{this.wallsChanged=!1,e.run()}catch(e){return this.logger.error(e),void(this._observerQueue.length=0)}this.undoBuffer.push(e),this.wallsChanged&&this.triggerAction(new Q(this,{})),this.commit()}onNodesChanged(e){return this._nodes.onChanged(e)}onWallsChanged(e){return this._walls.onChanged(e)}onRoomsChanged(e){return this._rooms.onChanged(e)}onOpeningsChanged(e){return this._wallOpenings.onChanged(e)}commit(){const e=this._observerQueue.length;if(this._flushObserverQueue(),e>0)for(const e of this._anythingChangeObservers)e(void 0)}onPropertyChanged(e,t){const o=this["_"+e];if(o instanceof A){const s=o,n=()=>{s.addedObservers.add(t),s.updatedObservers.add(t),s.deletedObservers.add(t)},a=()=>this.removeOnPropertyChanged(e,t);return(0,P.k1)(n,a,!0,e)}throw new Error(`Property: ${e} does not exist on wall-data`)}removeOnPropertyChanged(e,t){const o=this["_"+e];if(!(o instanceof A))throw new Error(`Property: ${e} does not exist on wall-data`);{const e=o;e.addedObservers.delete(t),e.updatedObservers.delete(t),e.deletedObservers.delete(t)}}onChanged(e){if(this._anythingChangeObservers.has(e))throw new Error("This observer function is already observing this Observable, and double subscriptions are not supported.");return(0,P.k1)((()=>this._anythingChangeObservers.add(e)),(()=>this.removeOnChanged(e)),!0)}removeOnChanged(e){this._anythingChangeObservers.delete(e)}addFloatingEdge(e,t,o,s){const n=new S(this,{from:e,to:t,width:o,floorIndex:s});return this.triggerAction(n),n.output}addBridgingEdge(e,t,o){const s=new q(this,{fromId:e,toId:t,width:o});return this.triggerAction(s),s.output}addTrailingEdgeToNode(e,t,o){const s=new B(this,{fromId:e,to:t,width:o});return this.triggerAction(s),s.output}addTrailingEdgeToEdge(e,t,o,s){const n=new $(this,{fromWallId:e,along:t,to:o,width:s});return this.triggerAction(n),n.output}splitEdgeWithNode(e,t,o){const s=new K(this,{wallId:e,nodeId:t,along:o});return this.triggerAction(s),s.output}moveNode(e,t){const o={nodeId:e,newPos:t};this.triggerAction(new M(this,o))}moveWall(e,t,o){const s={wallId:e,newFromPos:t,newToPos:o};this.triggerAction(new V(this,s))}mergeNodes(e,t){const o=new k(this,{keepId:e,mergeId:t});return this.triggerAction(o),o.output}deleteEntity(e){if(this.canDeleteEntity(e)){const t=this.getEntity(e);if(t instanceof N){const t={nodeId:e};this.triggerAction(new H(this,t))}else if(t instanceof W){const t={wallId:e};this.triggerAction(new L(this,t))}else if(t instanceof z){const t={openingId:e};this.triggerAction(new J(this,t))}}}setEdgeProperties(e,t){const o={wallId:e,props:t};this.triggerAction(new U(this,o))}addWallOpening(e){const t=new Y(this,e);return this.triggerAction(t),t.output.openingId}editWallOpeningDetails(e,t){this.triggerAction(new j(this,Object.assign(Object.assign({},t),{id:e})))}addWallJoint(e,t,o){const s={wallId:e,fromNode:t,toNode:o};this.triggerAction(new G(this,s))}setRoomDetails(e,t){var o,s,n;const a=this.getRoom(e);a.name=null!==(o=t.name)&&void 0!==o?o:a.name,a.roomType=null!==(s=t.roomType)&&void 0!==s?s:a.roomType,a.useRoomTypeAsName=null!==(n=t.useRoomTypeAsName)&&void 0!==n?n:a.useRoomTypeAsName,this._scheduleObserver({observers:this._rooms.updatedObservers,param:a})}_createNode(e,t,o){const s=new N(o||(0,I.fV)(),t,e.x,e.z);return this._nodes.set(s.id,s),this._scheduleObserver({observers:this._nodes.addedObservers,param:s}),s}_updateNode(e,t){const o=this._nodes.get(e);if(!o)throw new Error("Attempted to update WallNode that does not exist");o.x=t.x,o.z=t.z,this._scheduleObserver({observers:this._nodes.updatedObservers,param:o})}_deleteNode(e){const t=this._nodes.get(e);if(!t)throw new Error("Attempted to delete WallNode that does not exist");this._nodes.delete(e),this._scheduleObserver({observers:this._nodes.deletedObservers,param:t})}_createRoom(e,t,o){const s=new b(e,"",t,o);this.rooms.set(e,s);for(const e of o.values()){const t=this._wallToRoomMap.get(e)||new Set;t.add(s),this._wallToRoomMap.set(e,t)}this._scheduleObserver({observers:this._rooms.addedObservers,param:s})}_updateRoom(e,t){const o=this._rooms.get(e);if(!o)throw new Error("Attempted to update Room that does not exist");for(const e of o.walls.values()){const t=this._wallToRoomMap.get(e);t&&t.delete(o)}t.name=o.name,t.useRoomTypeAsName=o.useRoomTypeAsName,t.roomType=o.roomType,this.rooms.set(e,t);for(const e of t.walls.values()){const o=this._wallToRoomMap.get(e)||new Set;o.add(t),this._wallToRoomMap.set(e,o)}this._scheduleObserver({observers:this._rooms.updatedObservers,param:t})}_deleteRoom(e){const t=this._rooms.get(e);if(!t)throw new Error("Attempted to delete Room that does not exist");this._rooms.delete(t.id);for(const e of t.walls.values()){const o=this._wallToRoomMap.get(e);null==o||o.delete(t)}this._scheduleObserver({observers:this._rooms.deletedObservers,param:t})}_createWall(e,t,o,s,n){if(e.id===t.id)throw new Error("Cannot create wall where the from node is the same as the to node.");if(e.floorIndex!==t.floorIndex)throw new Error("Cannot create a wall between nodes on different floors.");const a=W.getCompositeKey(e.id,t.id);if(this._walls.has(a))throw new Error(`Wall already exists between ${e.id}:${t.id}`);const i=this.getNode(e.id),r=this.getNode(t.id),d=new W(a,i,r,o,n);this._walls.set(d.id,d),this._addToWallDicts(d),this._scheduleObserver({observers:this._walls.addedObservers,param:d});for(const e of s){const{type:t,relativePos:o,width:s,id:n}=e;this._createWallOpening(d,t,o,s,n)}return this.wallsChanged=!0,d}_deleteWall(e){const t=this.getWall(e);for(const e of t.openings.slice())this._deleteWallOpening(e.id);this._walls.delete(e),this._removeFromWallDicts(t),this._scheduleObserver({observers:this._walls.deletedObservers,param:t}),this.wallsChanged=!0}_setEdgeProps(e,t){const{width:o,bias:s}=t,n=this.getWall(e);void 0!==o&&(n.width=o),void 0!==s&&(n.bias=s),this._updateWallForNodes(n.from,n.to)}_createWallOpening(e,t,o,s,n){const a=new z(n||(0,I.fV)(),e.id,t,o,s);return this._wallOpenings.set(a.id,a),e.openings.push(a),this._scheduleObserver({observers:this._wallOpenings.addedObservers,param:a}),a}_setOpeningDetails(e,t){var o,s,n;const a=this.getOpening(e);a.type=null!==(o=t.type)&&void 0!==o?o:a.type,a.relativePos=null!==(s=t.relativePos)&&void 0!==s?s:a.relativePos,a.width=null!==(n=t.width)&&void 0!==n?n:a.width,this._scheduleObserver({observers:this._wallOpenings.updatedObservers,param:a})}_deleteWallOpening(e){const t=this.getOpening(e),o=this.getWall(t.wallId),s=o.openings.findIndex((t=>t.id===e));if(-1===s)throw new Error("Expected opening to exist in wall array!");o.openings.splice(s,1),this._wallOpenings.delete(e),this._scheduleObserver({observers:this._wallOpenings.deletedObservers,param:t})}_setRoomDetails(e,t){const o=this.getRoom(e);o.name=t,this._scheduleObserver({observers:this._rooms.updatedObservers,param:o})}_addToWallDicts(e){const t=(t,o)=>{let s=o.get(t);null!=s?s.add(e):(s=new Set,s.add(e),o.set(t,s))};t(e.from,this._nodeToWallMap),t(e.to,this._nodeToWallMap),t(e.floorIndex,this._wallsByFloor)}_removeFromWallDicts(e){const t=(t,o)=>{const s=o.get(t);null!=s&&(s.delete(e),0===s.size&&o.delete(t))};t(e.from,this._nodeToWallMap),t(e.to,this._nodeToWallMap),t(e.floorIndex,this._wallsByFloor),this._wallToRoomMap.delete(e)}_scheduleObserver(e){this._observerQueue.push(e)}_flushObserverQueue(){for(const e of this._observerQueue)for(const t of e.observers){const o=e.param;t(o,o.id)}this._observerQueue.length=0}getSnapshot(){const e={version:this.version,floors:{}},t=t=>{e.floors[`${t}`]||(e.floors[`${t}`]={edges:{},vertices:{},rooms:{}})};for(const[o,s]of this._nodes.data){t(s.floorIndex);e.floors[`${s.floorIndex}`].vertices[s.id]=s.getSnapshot()}for(const[o,s]of this._walls.data){t(s.floorIndex);e.floors[`${s.floorIndex}`].edges[s.id]=s.getSnapshot()}for(const[o,s]of this._rooms.data){t(s.floorIndex);e.floors[`${s.floorIndex}`].rooms[s.id]=s.getSnapshot()}return e}_recomputeRooms(){const e={createdRooms:[],deletedRooms:[]},t=this.findEnclosedRegions(),o=t.map((e=>new Set(e))),s=new Array;for(const e of this._rooms.data.values())for(let t=0;t<o.length;t++){const n=o[t],a=e.points.reduce(((e,t)=>n.has(t)?e+1:e),0);a>0&&s.push({score:a/e.points.length,oldRoomId:e.id,newRoomIndex:t})}const n=new Set,a=new Array(t.length);s.sort(((e,t)=>{var o,s;return t.score-e.score||((null===(o=this._rooms.get(t.oldRoomId))||void 0===o?void 0:o.getArea())||0)-((null===(s=this._rooms.get(e.oldRoomId))||void 0===s?void 0:s.getArea())||0)}));for(const{oldRoomId:e,newRoomIndex:t}of s)n.has(e)||a[t]||(a[t]=e,n.add(e));for(let e=0;e<t.length;e++)a[e]||(a[e]=(0,I.fV)());for(let o=0;o<t.length;o++){const s=a[o],n=t[o],i=new Set;for(let e=0;e<n.length;e++){const t=n[e],o=n[(e+1)%n.length];this.getWallsForNodes(i,t,o)}const r=new b(s,"",t[o],i),d=this._rooms.get(s);d?T(d.walls,r.walls)||this._updateRoom(s,r):(this._createRoom(s,t[o],i),e.createdRooms.push(r))}const i=new Set(a);for(const t of this._rooms.data.values())i.has(t.id)||(this._deleteRoom(t.id),e.deletedRooms.push(t));return this.wallsChanged=!1,e}findEnclosedRegions(){const e=new Array,t=new Set,o=(o,s)=>{const n=`${o.id}/${s.id}`;if(t.has(n))return;const a=[o,s];for(;;){const e=a[a.length-1],t=a[a.length-2],o=this.getNodeNeighbors(e);let s,n=4*Math.PI;for(const a of o){const o=this.getRelativeAngle(e,t,a);o<n&&(n=o,s=a)}if(!s)throw new Error("Expected a neighbor");if(e===a[0]&&s===a[1]){a.pop();break}a.push(s)}v(a)>.4&&e.push(a);for(let e=0;e<a.length;e++){const o=a[e],s=a[(e+1)%a.length],n=`${o.id}/${s.id}`;t.add(n)}};for(const e of this.walls.values())o(e.from,e.to),o(e.to,e.from);const s=new Map;for(const t of e)s.set(t,v(t));e.sort(((e,t)=>{const o=e[0].floorIndex-t[0].floorIndex;return 0!==o?o:s.get(e)-s.get(t)}));const n=e.map((e=>e.map((e=>new p.Vector2(e.x,e.z))))),a=new p.Vector2,i=new p.Vector2;for(let t=n.length-1;t>=0;t--){const o=n[t],s=e[t][0].floorIndex;let r=!1;for(let d=0;d<t&&!r;d++){const l=n[d];if(l.length<3||e[d][0].floorIndex!==s)continue;let h=!0;for(let e=0;e<l.length&&h;e++){const t=(e+1)%l.length,o=e,s=(e+2)%l.length;a.copy(l[t]),i.addVectors(l[t],l[o]).add(l[s]).multiplyScalar(1/3),i.sub(a),i.normalize().multiplyScalar(.01),a.add(i),h=!E(a,l)}h||E(a,o)&&(e.splice(t,1),r=!0)}}return e}getNodeNeighbors(e){const t=new Set,o=this._nodeToWallMap.get(e);if(!o)throw new Error("Expecting node to wall map to be valid");for(const s of o.values())t.add(s.getOtherNode(e));return t}getWallsForNodes(e,t,o){const s=W.getCompositeKey(t.id,o.id);e.add(this.getWall(s))}}class X extends s.Y{constructor(){super(...arguments),this.name="roombounds"}async init(e,t){this.data=new Z,t.market.register(this,Z,this.data),async function(e,t){const[o,s]=await Promise.all([e.market.waitForData(r.R),e.market.waitForData(u.i)]),a=(n,a,i,r=[])=>{const d=[];for(const a of t.rooms.values())if(n(a.name)||n(a.roomType)){const t=s.getFloorAtIndex(a.floorIndex);if(!t)throw new Error("Unable to find floor for room while generating search results.");d.push(new g(e.commandBinder,o,a,t.id))}return d.sort(((e,t)=>e.title.localeCompare(t.title)))},d=e=>{},c=e=>new n.V(t.onChanged(e)),p={renew:()=>{e.commandBinder.issueCommandWhenBound(new h.c6({id:i.SF.MODELROOM,groupPhraseKey:l.Z.TOOLS.ROOMPLAN,getSimpleMatches:a,registerChangeObserver:c,onSearchActivatedChanged:d,groupOrder:40,groupIcon:"icon-edit-floorplan"}))},cancel:()=>{e.commandBinder.issueCommandWhenBound(new h.Pe(i.SF.MODELROOM))}};return p.renew(),p}(t,this.data).then((e=>this.bindings.push(e)))}dispose(e){super.dispose(e)}}const ee=X},56163:(e,t,o)=>{o.d(t,{K:()=>r});var s=o(52528),n=o(71166),a=o(63319);const i=new s.v({});class r{constructor(e,t,o){this.commandBinder=e,this.layersData=t,this.dataTypeGroup=o,this.textParser=i,this.enabled=!0,this.bindings=[]}getGroupingId(e){switch(e){case a.HH.TYPE:return this.getTypeId();case a.HH.FLOOR:return this.getFloorId();case a.HH.LAYER:return this.getLayerGroupId();case a.HH.DATE:return this.dateBucket}}getFloorId(){return this.floorId}getDateBucket(){return this.dateBucket}getTypeId(){return this.typeId}supportsBatchDelete(){return!1}supportsLayeredCopyMove(){return!1}getLayerGroupId(){var e,t;const o=null===(e=this.layersData)||void 0===e?void 0:e.getBaseLayerId(),s=null===(t=this.layersData)||void 0===t?void 0:t.getViewLayerId();return this.layerId&&s&&this.layerId===o?s:this.layerId}isLayerVisible(){return!this.layersData||!this.layerId||this.layersData.layerVisible(this.layerId)}onSelect(e,t,o){this.commandBinder.issueCommand(new n.IL(this.id,this.typeId))}registerBindings(){}cancelBindings(){this.bindings.forEach((e=>e.cancel()))}}}}]);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Matterport Showcase SDK
|
|
3
|
+
*
|
|
4
|
+
* © 2022 Matterport, Inc. All rights reserved.
|
|
5
|
+
*
|
|
6
|
+
* Matterport Showcase SDK ("Showcase SDK") must be used according to
|
|
7
|
+
* the Matterport Terms of Service located at https://matterport.com/terms-of-use, the Platform Subscription Agreement ("PSA") available at https://matterport.com/legal/platform-subscription-agreement and the SDK License terms included in the PSA ("SDK License"). Any use of the Showcase SDK requires a current active Matterport account and associated developer key.
|
|
8
|
+
*
|
|
9
|
+
* -------------------------------------------------------------------------------
|
|
10
|
+
*
|
|
11
|
+
* Redistribution and use in source and binary forms, without modification, is permitted in accordance with the SDK License provided that the following conditions are met:
|
|
12
|
+
*
|
|
13
|
+
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
14
|
+
* * Neither the name of Matterport nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
15
|
+
*
|
|
16
|
+
* THE SHOWCASE SDK IS PROVIDED BY MATTERPORT AS THE COPYRIGHT HOLDER AND, IF APPLICABLE, ITS CONTRIBUTORS "AS IS" AND WITHOUT WARRANTIES OF ANY KIND. TO THE FULLEST EXTENT PERMISSIBLE PURSUANT TO APPLICABLE LAW, MATTERPORT DISCLAIMS, ON BEHALF OF ITSELF AND ITS AFFILIATES AND LICENSORS, ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. MATTERPORT DOES NOT WARRANT THAT THE AVAILABILITY OF THE SHOWCASE SDK WILL BE UNINTERRUPTED OR ERROR-FREE, THAT DEFECTS WILL BE CORRECTED, OR THAT THE SHOWCASE SDK WILL BE FREE OF VIRUSES OR OTHER HARMFUL COMPONENTS. MATTERPORT DOES NOT MAKE ANY REPRESENTATIONS OR WARRANTIES REGARDING THE USE OR THE RESULTS OF THE USE OF THE SHOWCASE SDK OR FUNCTIONS ON THE SHOWCASE SDK IN TERMS OF THEIR CORRECTNESS, ACCURACY, RELIABILITY, RESULTS TO BE ACHIEVED, OR OTHERWISE. APPLICABLE LAW MAY NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SOME OR ALL OF THE FOREGOING DISCLAIMERS MAY NOT APPLY TO YOU.
|
|
17
|
+
*
|
|
18
|
+
* TO THE EXTENT PERMITTED UNDER APPLICABLE LAW UNDER NO CIRCUMSTANCES, INCLUDING, BUT NOT LIMITED TO, NEGLIGENCE, SHALL MATTERPORT OR ITS AFFILIATES OR LICENSORS BE LIABLE FOR ANY CONSEQUENTIAL, EXEMPLARY, PUNITIVE, SPECIAL, INCIDENTAL OR OTHER INDIRECT DAMAGES, EVEN IF MATTERPORT OR A MATTERPORT AUTHORIZED REPRESENTATIVE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. APPLICABLE LAW MAY NOT ALLOW SOME OR ALL OF THIS LIMITATION OF LIABILITY, SO IT MAY NOT APPLY TO YOU.
|
|
19
|
+
*
|
|
20
|
+
*/
|
package/bundle/js/668.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 668.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunkmp_webgl=self.webpackChunkmp_webgl||[]).push([[668],{60668:(t,i,h)=>{h.d(i,{cC:()=>n});class s{constructor(t=0,i=0,h=0,s=0,e=!1,r){this.oversized=!1,this._rot=!1,this._allowRotation=void 0,this._dirty=0,this._width=t,this._height=i,this._x=h,this._y=s,this._data={},this._rot=e,this._allowRotation=r}static Collide(t,i){return t.collide(i)}static Contain(t,i){return t.contain(i)}area(){return this.width*this.height}collide(t){return t.x<this.x+this.width&&t.x+t.width>this.x&&t.y<this.y+this.height&&t.y+t.height>this.y}contain(t){return t.x>=this.x&&t.y>=this.y&&t.x+t.width<=this.x+this.width&&t.y+t.height<=this.y+this.height}get width(){return this._width}set width(t){t!==this._width&&(this._width=t,this._dirty++)}get height(){return this._height}set height(t){t!==this._height&&(this._height=t,this._dirty++)}get x(){return this._x}set x(t){t!==this._x&&(this._x=t,this._dirty++)}get y(){return this._y}set y(t){t!==this._y&&(this._y=t,this._dirty++)}get rot(){return this._rot}set rot(t){if(!1!==this._allowRotation&&this._rot!==t){const i=this.width;this.width=this.height,this.height=i,this._rot=t,this._dirty++}}get allowRotation(){return this._allowRotation}set allowRotation(t){this._allowRotation!==t&&(this._allowRotation=t,this._dirty++)}get data(){return this._data}set data(t){null!==t&&t!==this._data&&(this._data=t,"object"==typeof t&&t.hasOwnProperty("allowRotation")&&(this._allowRotation=t.allowRotation),this._dirty++)}get dirty(){return this._dirty>0}setDirty(t=!0){this._dirty=t?this._dirty+1:0}}class e{constructor(){this._dirty=0}get dirty(){return this._dirty>0||this.rects.some((t=>t.dirty))}setDirty(t=!0){if(this._dirty=t?this._dirty+1:0,!t)for(let t of this.rects)t.setDirty&&t.setDirty(!1)}}class r extends e{constructor(t=d,i=d,h=0,e={}){super(),this.maxWidth=t,this.maxHeight=i,this.padding=h,this.freeRects=[],this.rects=[],this.verticalExpand=!1,this.options={smart:!0,pot:!0,square:!0,allowRotation:!1,tag:!1,exclusiveTag:!0,border:0,logic:o.MAX_EDGE},this.options=Object.assign(Object.assign({},this.options),e),this.width=this.options.smart?0:t,this.height=this.options.smart?0:i,this.border=this.options.border?this.options.border:0,this.freeRects.push(new s(this.maxWidth+this.padding-2*this.border,this.maxHeight+this.padding-2*this.border,this.border,this.border)),this.stage=new s(this.width,this.height)}add(...t){let i,h;if(1===t.length){if("object"!=typeof t[0])throw new Error("MacrectsBin.add(): Wrong parameters");h=t[0];let i=h.data&&h.data.tag?h.data.tag:h.tag?h.tag:void 0;if(this.options.tag&&this.options.exclusiveTag&&this.tag!==i)return}else{if(i=t.length>2?t[2]:null,this.options.tag&&this.options.exclusiveTag){if(i&&this.tag!==i.tag)return;if(!i&&this.tag)return}h=new s(t[0],t[1]),h.data=i,h.setDirty(!1)}const e=this.place(h);return e&&this.rects.push(e),e}repack(){let t=[];this.reset(),this.rects.sort(((t,i)=>{const h=Math.max(i.width,i.height)-Math.max(t.width,t.height);return 0===h&&t.hash&&i.hash?t.hash>i.hash?-1:1:h}));for(let i of this.rects)this.place(i)||t.push(i);for(let i of t)this.rects.splice(this.rects.indexOf(i),1);return t.length>0?t:void 0}reset(t=!1,i=!1){t&&(this.data&&delete this.data,this.tag&&delete this.tag,this.rects=[],i&&(this.options={smart:!0,pot:!0,square:!0,allowRotation:!1,tag:!1,border:0})),this.width=this.options.smart?0:this.maxWidth,this.height=this.options.smart?0:this.maxHeight,this.border=this.options.border?this.options.border:0,this.freeRects=[new s(this.maxWidth+this.padding-2*this.border,this.maxHeight+this.padding-2*this.border,this.border,this.border)],this.stage=new s(this.width,this.height),this._dirty=0}clone(){let t=new r(this.maxWidth,this.maxHeight,this.padding,this.options);for(let i of this.rects)t.add(i);return t}place(t){let i,h,e=t.data&&t.data.tag?t.data.tag:t.tag?t.tag:void 0;if(!this.options.tag||!this.options.exclusiveTag||this.tag===e){if(h=t.hasOwnProperty("_allowRotation")&&void 0!==t.allowRotation?t.allowRotation:this.options.allowRotation,i=this.findNode(t.width+this.padding,t.height+this.padding,h),i){this.updateBinSize(i);let h=this.freeRects.length,s=0;for(;s<h;)this.splitNode(this.freeRects[s],i)&&(this.freeRects.splice(s,1),h--,s--),s++;return this.pruneFreeList(),this.verticalExpand=this.width>this.height,t.x=i.x,t.y=i.y,void 0===t.rot&&(t.rot=!1),t.rot=i.rot?!t.rot:t.rot,this._dirty++,t}if(this.verticalExpand){if(this.updateBinSize(new s(t.width+this.padding,t.height+this.padding,this.border,this.height+this.padding-this.border))||this.updateBinSize(new s(t.width+this.padding,t.height+this.padding,this.width+this.padding-this.border,this.border)))return this.place(t)}else if(this.updateBinSize(new s(t.width+this.padding,t.height+this.padding,this.width+this.padding-this.border,this.border))||this.updateBinSize(new s(t.width+this.padding,t.height+this.padding,this.border,this.height+this.padding-this.border)))return this.place(t)}}findNode(t,i,h){let e,r,a,d=Number.MAX_VALUE;for(let n in this.freeRects)r=this.freeRects[n],r.width>=t&&r.height>=i&&(e=this.options.logic===o.MAX_AREA?r.width*r.height-t*i:Math.min(r.width-t,r.height-i),e<d&&(a=new s(t,i,r.x,r.y),d=e)),h&&r.width>=i&&r.height>=t&&(e=this.options.logic===o.MAX_AREA?r.width*r.height-i*t:Math.min(r.height-t,r.width-i),e<d&&(a=new s(i,t,r.x,r.y,!0),d=e));return a}splitNode(t,i){if(!t.collide(i))return!1;if(i.x<t.x+t.width&&i.x+i.width>t.x){if(i.y>t.y&&i.y<t.y+t.height){let h=new s(t.width,i.y-t.y,t.x,t.y);this.freeRects.push(h)}if(i.y+i.height<t.y+t.height){let h=new s(t.width,t.y+t.height-(i.y+i.height),t.x,i.y+i.height);this.freeRects.push(h)}}if(i.y<t.y+t.height&&i.y+i.height>t.y){if(i.x>t.x&&i.x<t.x+t.width){let h=new s(i.x-t.x,t.height,t.x,t.y);this.freeRects.push(h)}if(i.x+i.width<t.x+t.width){let h=new s(t.x+t.width-(i.x+i.width),t.height,i.x+i.width,t.y);this.freeRects.push(h)}}return!0}pruneFreeList(){let t=0,i=0,h=this.freeRects.length;for(;t<h;){i=t+1;let s=this.freeRects[t];for(;i<h;){let e=this.freeRects[i];if(e.contain(s)){this.freeRects.splice(t,1),t--,h--;break}s.contain(e)&&(this.freeRects.splice(i,1),i--,h--),i++}t++}}updateBinSize(t){if(!this.options.smart)return!1;if(this.stage.contain(t))return!1;let i=Math.max(this.width,t.x+t.width-this.padding+this.border),h=Math.max(this.height,t.y+t.height-this.padding+this.border);if(this.options.allowRotation){const s=Math.max(this.width,t.x+t.height-this.padding+this.border),e=Math.max(this.height,t.y+t.width-this.padding+this.border);s*e<i*h&&(i=s,h=e)}return this.options.pot&&(i=Math.pow(2,Math.ceil(Math.log(i)*Math.LOG2E)),h=Math.pow(2,Math.ceil(Math.log(h)*Math.LOG2E))),this.options.square&&(i=h=Math.max(i,h)),!(i>this.maxWidth+this.padding||h>this.maxHeight+this.padding)&&(this.expandFreeRects(i+this.padding,h+this.padding),this.width=this.stage.width=i,this.height=this.stage.height=h,!0)}expandFreeRects(t,i){this.freeRects.forEach(((h,s)=>{h.x+h.width>=Math.min(this.width+this.padding-this.border,t)&&(h.width=t-h.x-this.border),h.y+h.height>=Math.min(this.height+this.padding-this.border,i)&&(h.height=i-h.y-this.border)}),this),this.freeRects.push(new s(t-this.width-this.padding,i-2*this.border,this.width+this.padding-this.border,this.border)),this.freeRects.push(new s(t-2*this.border,i-this.height-this.padding,this.border,this.height+this.padding-this.border)),this.freeRects=this.freeRects.filter((t=>!(t.width<=0||t.height<=0||t.x<this.border||t.y<this.border))),this.pruneFreeList()}}class a extends e{constructor(...t){if(super(),this.rects=[],1===t.length){if("object"!=typeof t[0])throw new Error("OversizedElementBin: Wrong parameters");const i=t[0];this.rects=[i],this.width=i.width,this.height=i.height,this.data=i.data,i.oversized=!0}else{this.width=t[0],this.height=t[1],this.data=t.length>2?t[2]:null;const i=new s(this.width,this.height);i.oversized=!0,i.data=this.data,this.rects.push(i)}this.freeRects=[],this.maxWidth=this.width,this.maxHeight=this.height,this.options={smart:!1,pot:!1,square:!1}}add(){}reset(t=!1){}repack(){}clone(){return new a(this.rects[0])}}const d=4096;var o;!function(t){t[t.MAX_AREA=0]="MAX_AREA",t[t.MAX_EDGE=1]="MAX_EDGE"}(o||(o={}));class n{constructor(t=d,i=d,h=0,s={}){this.width=t,this.height=i,this.padding=h,this.options={smart:!0,pot:!0,square:!1,allowRotation:!1,tag:!1,exclusiveTag:!0,border:0,logic:o.MAX_EDGE},this._currentBinIndex=0,this.bins=[],this.options=Object.assign(Object.assign({},this.options),s)}add(...t){if(1===t.length){if("object"!=typeof t[0])throw new Error("MacrectsPacker.add(): Wrong parameters");const i=t[0];if(i.width>this.width||i.height>this.height)this.bins.push(new a(i));else{if(!this.bins.slice(this._currentBinIndex).find((t=>void 0!==t.add(i)))){let t=new r(this.width,this.height,this.padding,this.options),h=i.data&&i.data.tag?i.data.tag:i.tag?i.tag:void 0;this.options.tag&&h&&(t.tag=h),t.add(i),this.bins.push(t)}}return i}{const i=new s(t[0],t[1]);if(t.length>2&&(i.data=t[2]),i.width>this.width||i.height>this.height)this.bins.push(new a(i));else{if(!this.bins.slice(this._currentBinIndex).find((t=>void 0!==t.add(i)))){let t=new r(this.width,this.height,this.padding,this.options);this.options.tag&&i.data.tag&&(t.tag=i.data.tag),t.add(i),this.bins.push(t)}}return i}}addArray(t){if(!this.options.tag||this.options.exclusiveTag)this.sort(t,this.options.logic).forEach((t=>this.add(t)));else{if(0===t.length)return;let i;t.sort(((t,i)=>{const h=t.data&&t.data.tag?t.data.tag:t.tag?t.tag:void 0,s=i.data&&i.data.tag?i.data.tag:i.tag?i.tag:void 0;return void 0===s?-1:void 0===h?1:s>h?-1:1}));let h=0;if(!this.bins.slice(this._currentBinIndex).find((s=>{let e=s.clone();for(let r=h;r<t.length;r++){const a=t[r],d=a.data&&a.data.tag?a.data.tag:a.tag?a.tag:void 0;if(0===r&&(i=d),d!==i)return i=d,this.sort(t.slice(h,r),this.options.logic).forEach((t=>s.add(t))),h=r,this.addArray(t.slice(r)),!0;if(void 0===d)return this.sort(t.slice(r),this.options.logic).forEach((t=>this.add(t))),h=t.length,!0;if(void 0===e.add(a))return!1}return this.sort(t.slice(h),this.options.logic).forEach((t=>s.add(t))),!0}))){const i=t[h],s=new r(this.width,this.height,this.padding,this.options),e=i.data&&i.data.tag?i.data.tag:i.tag?i.tag:void 0;this.options.tag&&this.options.exclusiveTag&&e&&(s.tag=e),this.bins.push(s),this.addArray(t.slice(h))}}}reset(){this.bins=[],this._currentBinIndex=0}repack(t=!0){if(t){let t=[];for(let i of this.bins)if(i.dirty){let h=i.repack();h&&t.push(...h)}return void this.addArray(t)}if(!this.dirty)return;const i=this.rects;this.reset(),this.addArray(i)}next(){return this._currentBinIndex=this.bins.length,this._currentBinIndex}load(t){t.forEach(((t,i)=>{if(t.maxWidth>this.width||t.maxHeight>this.height)this.bins.push(new a(t.width,t.height,{}));else{let h=new r(this.width,this.height,this.padding,t.options);h.freeRects.splice(0),t.freeRects.forEach(((t,i)=>{h.freeRects.push(new s(t.width,t.height,t.x,t.y))})),h.width=t.width,h.height=t.height,t.tag&&(h.tag=t.tag),this.bins[i]=h}}),this)}save(){let t=[];return this.bins.forEach((i=>{let h={width:i.width,height:i.height,maxWidth:i.maxWidth,maxHeight:i.maxHeight,freeRects:[],rects:[],options:i.options};i.tag&&(h=Object.assign(Object.assign({},h),{tag:i.tag})),i.freeRects.forEach((t=>{h.freeRects.push({x:t.x,y:t.y,width:t.width,height:t.height})})),t.push(h)})),t}sort(t,i=o.MAX_EDGE){return t.slice().sort(((t,h)=>{const s=i===o.MAX_EDGE?Math.max(h.width,h.height)-Math.max(t.width,t.height):h.width*h.height-t.width*t.height;return 0===s&&t.hash&&h.hash?t.hash>h.hash?-1:1:s}))}get currentBinIndex(){return this._currentBinIndex}get dirty(){return this.bins.some((t=>t.dirty))}get rects(){let t=[];for(let i of this.bins)t.push(...i.rects);return t}}}}]);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Matterport Showcase SDK
|
|
3
|
+
*
|
|
4
|
+
* © 2022 Matterport, Inc. All rights reserved.
|
|
5
|
+
*
|
|
6
|
+
* Matterport Showcase SDK ("Showcase SDK") must be used according to
|
|
7
|
+
* the Matterport Terms of Service located at https://matterport.com/terms-of-use, the Platform Subscription Agreement ("PSA") available at https://matterport.com/legal/platform-subscription-agreement and the SDK License terms included in the PSA ("SDK License"). Any use of the Showcase SDK requires a current active Matterport account and associated developer key.
|
|
8
|
+
*
|
|
9
|
+
* -------------------------------------------------------------------------------
|
|
10
|
+
*
|
|
11
|
+
* Redistribution and use in source and binary forms, without modification, is permitted in accordance with the SDK License provided that the following conditions are met:
|
|
12
|
+
*
|
|
13
|
+
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
14
|
+
* * Neither the name of Matterport nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
15
|
+
*
|
|
16
|
+
* THE SHOWCASE SDK IS PROVIDED BY MATTERPORT AS THE COPYRIGHT HOLDER AND, IF APPLICABLE, ITS CONTRIBUTORS "AS IS" AND WITHOUT WARRANTIES OF ANY KIND. TO THE FULLEST EXTENT PERMISSIBLE PURSUANT TO APPLICABLE LAW, MATTERPORT DISCLAIMS, ON BEHALF OF ITSELF AND ITS AFFILIATES AND LICENSORS, ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. MATTERPORT DOES NOT WARRANT THAT THE AVAILABILITY OF THE SHOWCASE SDK WILL BE UNINTERRUPTED OR ERROR-FREE, THAT DEFECTS WILL BE CORRECTED, OR THAT THE SHOWCASE SDK WILL BE FREE OF VIRUSES OR OTHER HARMFUL COMPONENTS. MATTERPORT DOES NOT MAKE ANY REPRESENTATIONS OR WARRANTIES REGARDING THE USE OR THE RESULTS OF THE USE OF THE SHOWCASE SDK OR FUNCTIONS ON THE SHOWCASE SDK IN TERMS OF THEIR CORRECTNESS, ACCURACY, RELIABILITY, RESULTS TO BE ACHIEVED, OR OTHERWISE. APPLICABLE LAW MAY NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SOME OR ALL OF THE FOREGOING DISCLAIMERS MAY NOT APPLY TO YOU.
|
|
17
|
+
*
|
|
18
|
+
* TO THE EXTENT PERMITTED UNDER APPLICABLE LAW UNDER NO CIRCUMSTANCES, INCLUDING, BUT NOT LIMITED TO, NEGLIGENCE, SHALL MATTERPORT OR ITS AFFILIATES OR LICENSORS BE LIABLE FOR ANY CONSEQUENTIAL, EXEMPLARY, PUNITIVE, SPECIAL, INCIDENTAL OR OTHER INDIRECT DAMAGES, EVEN IF MATTERPORT OR A MATTERPORT AUTHORIZED REPRESENTATIVE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. APPLICABLE LAW MAY NOT ALLOW SOME OR ALL OF THIS LIMITATION OF LIABILITY, SO IT MAY NOT APPLY TO YOU.
|
|
19
|
+
*
|
|
20
|
+
*/
|
package/bundle/js/718.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 718.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunkmp_webgl=self.webpackChunkmp_webgl||[]).push([[718],{15730:(t,e,a)=>{a.r(e),a.d(e,{ArrayBufferDataStream:()=>i,BlobBuffer:()=>r,WebMWriter:()=>n});a(48764).lW;const i=function(t){this.data=new Uint8Array(t),this.pos=0};i.prototype.seek=function(t){this.pos=t},i.prototype.writeBytes=function(t){for(var e=0;e<t.length;e++)this.data[this.pos++]=t[e]},i.prototype.writeByte=function(t){this.data[this.pos++]=t},i.prototype.writeU8=i.prototype.writeByte,i.prototype.writeU16BE=function(t){this.data[this.pos++]=t>>8,this.data[this.pos++]=t},i.prototype.writeDoubleBE=function(t){for(var e=new Uint8Array(new Float64Array([t]).buffer),a=e.length-1;a>=0;a--)this.writeByte(e[a])},i.prototype.writeFloatBE=function(t){for(var e=new Uint8Array(new Float32Array([t]).buffer),a=e.length-1;a>=0;a--)this.writeByte(e[a])},i.prototype.writeString=function(t){for(var e=0;e<t.length;e++)this.data[this.pos++]=t.charCodeAt(e)},i.prototype.writeEBMLVarIntWidth=function(t,e){switch(e){case 1:this.writeU8(128|t);break;case 2:this.writeU8(64|t>>8),this.writeU8(t);break;case 3:this.writeU8(32|t>>16),this.writeU8(t>>8),this.writeU8(t);break;case 4:this.writeU8(16|t>>24),this.writeU8(t>>16),this.writeU8(t>>8),this.writeU8(t);break;case 5:this.writeU8(8|t/4294967296&7),this.writeU8(t>>24),this.writeU8(t>>16),this.writeU8(t>>8),this.writeU8(t);break;default:throw new RuntimeException("Bad EBML VINT size "+e)}},i.prototype.measureEBMLVarInt=function(t){if(t<127)return 1;if(t<16383)return 2;if(t<2097151)return 3;if(t<268435455)return 4;if(t<34359738367)return 5;throw new RuntimeException("EBML VINT size not supported "+t)},i.prototype.writeEBMLVarInt=function(t){this.writeEBMLVarIntWidth(t,this.measureEBMLVarInt(t))},i.prototype.writeUnsignedIntBE=function(t,e){switch(void 0===e&&(e=this.measureUnsignedInt(t)),e){case 5:this.writeU8(Math.floor(t/4294967296));case 4:this.writeU8(t>>24);case 3:this.writeU8(t>>16);case 2:this.writeU8(t>>8);case 1:this.writeU8(t);break;default:throw new RuntimeException("Bad UINT size "+e)}},i.prototype.measureUnsignedInt=function(t){return t<256?1:t<65536?2:t<1<<24?3:t<4294967296?4:5},i.prototype.getAsDataArray=function(){if(this.pos<this.data.byteLength)return this.data.subarray(0,this.pos);if(this.pos==this.data.byteLength)return this.data;throw"ArrayBufferDataStream's pos lies beyond end of buffer"};const r=function(){var t=[],e=Promise.resolve();function a(t){return new Promise((function(e,a){var i=new FileReader;i.addEventListener("loadend",(function(){e(i.result)})),i.readAsArrayBuffer(t)}))}function i(t){return new Promise((function(e,i){t instanceof Uint8Array?e(t):t instanceof ArrayBuffer||ArrayBuffer.isView(t)?e(new Uint8Array(t)):t instanceof Blob?e(a(t).then((function(t){return new Uint8Array(t)}))):e(a(new Blob([t])).then((function(t){return new Uint8Array(t)})))}))}function r(t){var e=t.byteLength||t.length||t.size;if(!Number.isInteger(e))throw"Failed to determine size of element";return e}this.pos=0,this.length=0,this.seek=function(t){if(t<0)throw"Offset may not be negative";if(isNaN(t))throw"Offset may not be NaN";if(t>this.length)throw"Seeking beyond the end of file is not allowed";this.pos=t},this.write=function(a){var n={offset:this.pos,data:a,length:r(a)},s=n.offset>=this.length;this.pos+=n.length,this.length=Math.max(this.length,this.pos),e=e.then((function(){if(!s)for(var e=0;e<t.length;e++){var a=t[e];if(!(n.offset+n.length<=a.offset||n.offset>=a.offset+a.length)){if(n.offset<a.offset||n.offset+n.length>a.offset+a.length)throw new Error("Overwrite crosses blob boundaries");return n.offset==a.offset&&n.length==a.length?void(a.data=n.data):i(a.data).then((function(t){return a.data=t,i(n.data)})).then((function(t){n.data=t,a.data.set(n.data,n.offset-a.offset)}))}}t.push(n)}))},this.complete=function(a){return e=e.then((function(){for(var e=[],i=0;i<t.length;i++)e.push(t[i].data);return new Blob(e,{type:a})}))}},n=function(t){function e(t,e){var a,i="string"==typeof t&&/^data:image\/webp/.test(t)?t:t.toDataURL("image/webp",e);return!("string"!=typeof(a=i)||!a.match(/^data:image\/webp;base64,/i))&&window.atob(a.substring("data:image/webp;base64,".length))}function a(t){var e=t.indexOf("VP8 ");if(-1==e)throw"Failed to identify beginning of keyframe in WebP image";return e+="VP8 ".length+4,t.substring(e)}function n(t){this.value=t}function s(t){this.value=t}function o(t,e,a){if(Array.isArray(a))for(var i=0;i<a.length;i++)o(t,e,a[i]);else if("string"==typeof a)t.writeString(a);else if(a instanceof Uint8Array)t.writeBytes(a);else{if(!a.id)throw"Bad EBML datatype "+typeof a.data;var r,f,d;if(a.offset=t.pos+e,t.writeUnsignedIntBE(a.id),Array.isArray(a.data))-1===a.size?t.writeByte(255):(r=t.pos,t.writeBytes([0,0,0,0])),f=t.pos,a.dataOffset=f+e,o(t,e,a.data),-1!==a.size&&(d=t.pos,a.size=d-f,t.seek(r),t.writeEBMLVarIntWidth(a.size,4),t.seek(d));else if("string"==typeof a.data)t.writeEBMLVarInt(a.data.length),a.dataOffset=t.pos+e,t.writeString(a.data);else if("number"==typeof a.data)a.size||(a.size=t.measureUnsignedInt(a.data)),t.writeEBMLVarInt(a.size),a.dataOffset=t.pos+e,t.writeUnsignedIntBE(a.data,a.size);else if(a.data instanceof s)t.writeEBMLVarInt(8),a.dataOffset=t.pos+e,t.writeDoubleBE(a.data.value);else if(a.data instanceof n)t.writeEBMLVarInt(4),a.dataOffset=t.pos+e,t.writeFloatBE(a.data.value);else{if(!(a.data instanceof Uint8Array))throw"Bad EBML datatype "+typeof a.data;t.writeEBMLVarInt(a.data.byteLength),a.dataOffset=t.pos+e,t.writeBytes(a.data)}}}var f,d,u,h=!1,w=0,p=0,c=[],l=0,y=0,g={Cues:{id:new Uint8Array([28,83,187,107]),positionEBML:null},SegmentInfo:{id:new Uint8Array([21,73,169,102]),positionEBML:null},Tracks:{id:new Uint8Array([22,84,174,107]),positionEBML:null}},m={id:17545,data:new s(0)},b=[],B=new r(t.fileWriter||t.fd);function U(t){return t-f.dataOffset}function v(){d=function(){var t={id:21420,size:5,data:0},e={id:290298740,data:[]};for(var a in g){var i=g[a];i.positionEBML=Object.create(t),e.data.push({id:19899,data:[{id:21419,data:i.id},i.positionEBML]})}return e}();var t={id:357149030,data:[{id:2807729,data:1e6},{id:19840,data:"webm-writer-js"},{id:22337,data:"webm-writer-js"},m]},e={id:374648427,data:[{id:174,data:[{id:215,data:1},{id:29637,data:1},{id:156,data:0},{id:2274716,data:"und"},{id:134,data:"V_VP8"},{id:2459272,data:"VP8"},{id:131,data:1},{id:224,data:[{id:176,data:w},{id:186,data:p}]}]}]};f={id:408125543,size:-1,data:[d,t,e]};var a=new i(256);o(a,B.pos,[{id:440786851,data:[{id:17030,data:1},{id:17143,data:1},{id:17138,data:4},{id:17139,data:8},{id:17026,data:"webm"},{id:17031,data:2},{id:17029,data:2}]},f]),B.write(a.getAsDataArray()),g.SegmentInfo.positionEBML.data=U(t.offset),g.Tracks.positionEBML.data=U(e.offset),h=!0}function E(t){var e=new i(4);if(!(t.trackNumber>0&&t.trackNumber<127))throw"TrackNumber must be > 0 and < 127";return e.writeEBMLVarInt(t.trackNumber),e.writeU16BE(t.timecode),e.writeByte(128),{id:163,data:[e.getAsDataArray(),t.frame]}}function A(){if(0!=c.length){for(var t=0,e=0;e<c.length;e++)t+=c[e].frame.length;var a,r,n,s=new i(t+32*c.length),f=function(t){return{id:524531317,data:[{id:231,data:Math.round(t.timecode)}]}}({timecode:Math.round(l)});for(e=0;e<c.length;e++)f.data.push(E(c[e]));o(s,B.pos,f),B.write(s.getAsDataArray()),a=1,r=Math.round(l),n=f.offset,b.push({id:187,data:[{id:179,data:r},{id:183,data:[{id:247,data:a},{id:241,data:U(n)}]}]}),c=[],l+=y,y=0}}this.addFrame=function(i,r){h||(w=i.width||0,p=i.height||0,v());var n,s=e(i,t.quality);if(!s)throw"Couldn't decode WebP frame, does the browser support WebP?";(n={frame:a(s),duration:void 0===r?t.frameDuration:r}).trackNumber=1,n.timecode=Math.round(y),c.push(n),(y+=n.duration)>=5e3&&A()},this.complete=function(){var t,e,a,r;return h||v(),A(),t={id:475249515,data:b},o(e=new i(16+32*b.length),B.pos,t),B.write(e.getAsDataArray()),g.Cues.positionEBML.data=U(t.offset),a=new i(d.size),r=B.pos,o(a,d.dataOffset,d.data),B.seek(d.dataOffset),B.write(a.getAsDataArray()),B.seek(r),function(){var t=new i(8),e=B.pos;t.writeDoubleBE(l),B.seek(m.dataOffset),B.write(t.getAsDataArray()),B.seek(e)}(),B.complete("video/webm")},this.getWrittenSize=function(){return B.length},u={},[{quality:.95,fileWriter:null,fd:null,frameDuration:null,frameRate:null},t||{}].forEach((function(t){for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(u[e]=t[e])})),t=u,function(){if(!t.frameDuration){if(!t.frameRate)throw"Missing required frameDuration or frameRate setting";t.frameDuration=1e3/t.frameRate}}()}}}]);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Matterport Showcase SDK
|
|
3
|
+
*
|
|
4
|
+
* © 2022 Matterport, Inc. All rights reserved.
|
|
5
|
+
*
|
|
6
|
+
* Matterport Showcase SDK ("Showcase SDK") must be used according to
|
|
7
|
+
* the Matterport Terms of Service located at https://matterport.com/terms-of-use, the Platform Subscription Agreement ("PSA") available at https://matterport.com/legal/platform-subscription-agreement and the SDK License terms included in the PSA ("SDK License"). Any use of the Showcase SDK requires a current active Matterport account and associated developer key.
|
|
8
|
+
*
|
|
9
|
+
* -------------------------------------------------------------------------------
|
|
10
|
+
*
|
|
11
|
+
* Redistribution and use in source and binary forms, without modification, is permitted in accordance with the SDK License provided that the following conditions are met:
|
|
12
|
+
*
|
|
13
|
+
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
14
|
+
* * Neither the name of Matterport nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
15
|
+
*
|
|
16
|
+
* THE SHOWCASE SDK IS PROVIDED BY MATTERPORT AS THE COPYRIGHT HOLDER AND, IF APPLICABLE, ITS CONTRIBUTORS "AS IS" AND WITHOUT WARRANTIES OF ANY KIND. TO THE FULLEST EXTENT PERMISSIBLE PURSUANT TO APPLICABLE LAW, MATTERPORT DISCLAIMS, ON BEHALF OF ITSELF AND ITS AFFILIATES AND LICENSORS, ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. MATTERPORT DOES NOT WARRANT THAT THE AVAILABILITY OF THE SHOWCASE SDK WILL BE UNINTERRUPTED OR ERROR-FREE, THAT DEFECTS WILL BE CORRECTED, OR THAT THE SHOWCASE SDK WILL BE FREE OF VIRUSES OR OTHER HARMFUL COMPONENTS. MATTERPORT DOES NOT MAKE ANY REPRESENTATIONS OR WARRANTIES REGARDING THE USE OR THE RESULTS OF THE USE OF THE SHOWCASE SDK OR FUNCTIONS ON THE SHOWCASE SDK IN TERMS OF THEIR CORRECTNESS, ACCURACY, RELIABILITY, RESULTS TO BE ACHIEVED, OR OTHERWISE. APPLICABLE LAW MAY NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SOME OR ALL OF THE FOREGOING DISCLAIMERS MAY NOT APPLY TO YOU.
|
|
17
|
+
*
|
|
18
|
+
* TO THE EXTENT PERMITTED UNDER APPLICABLE LAW UNDER NO CIRCUMSTANCES, INCLUDING, BUT NOT LIMITED TO, NEGLIGENCE, SHALL MATTERPORT OR ITS AFFILIATES OR LICENSORS BE LIABLE FOR ANY CONSEQUENTIAL, EXEMPLARY, PUNITIVE, SPECIAL, INCIDENTAL OR OTHER INDIRECT DAMAGES, EVEN IF MATTERPORT OR A MATTERPORT AUTHORIZED REPRESENTATIVE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. APPLICABLE LAW MAY NOT ALLOW SOME OR ALL OF THIS LIMITATION OF LIABILITY, SO IT MAY NOT APPLY TO YOU.
|
|
19
|
+
*
|
|
20
|
+
*/
|
package/bundle/js/764.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 764.js.LICENSE.txt */
|
|
2
|
+
(self.webpackChunkmp_webgl=self.webpackChunkmp_webgl||[]).push([[764],{79742:(t,r)=>{"use strict";r.byteLength=function(t){var r=s(t),e=r[0],n=r[1];return 3*(e+n)/4-n},r.toByteArray=function(t){var r,e,i=s(t),f=i[0],u=i[1],h=new o(function(t,r,e){return 3*(r+e)/4-e}(0,f,u)),a=0,p=u>0?f-4:f;for(e=0;e<p;e+=4)r=n[t.charCodeAt(e)]<<18|n[t.charCodeAt(e+1)]<<12|n[t.charCodeAt(e+2)]<<6|n[t.charCodeAt(e+3)],h[a++]=r>>16&255,h[a++]=r>>8&255,h[a++]=255&r;2===u&&(r=n[t.charCodeAt(e)]<<2|n[t.charCodeAt(e+1)]>>4,h[a++]=255&r);1===u&&(r=n[t.charCodeAt(e)]<<10|n[t.charCodeAt(e+1)]<<4|n[t.charCodeAt(e+2)]>>2,h[a++]=r>>8&255,h[a++]=255&r);return h},r.fromByteArray=function(t){for(var r,n=t.length,o=n%3,i=[],f=16383,u=0,s=n-o;u<s;u+=f)i.push(h(t,u,u+f>s?s:u+f));1===o?(r=t[n-1],i.push(e[r>>2]+e[r<<4&63]+"==")):2===o&&(r=(t[n-2]<<8)+t[n-1],i.push(e[r>>10]+e[r>>4&63]+e[r<<2&63]+"="));return i.join("")};for(var e=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,u=i.length;f<u;++f)e[f]=i[f],n[i.charCodeAt(f)]=f;function s(t){var r=t.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=t.indexOf("=");return-1===e&&(e=r),[e,e===r?0:4-e%4]}function h(t,r,n){for(var o,i,f=[],u=r;u<n;u+=3)o=(t[u]<<16&16711680)+(t[u+1]<<8&65280)+(255&t[u+2]),f.push(e[(i=o)>>18&63]+e[i>>12&63]+e[i>>6&63]+e[63&i]);return f.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},48764:(t,r,e)=>{"use strict";var n=e(79742),o=e(80645),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;r.lW=s,r.h2=50;var f=2147483647;function u(t){if(t>f)throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=new Uint8Array(t);return Object.setPrototypeOf(r,s.prototype),r}function s(t,r,e){if("number"==typeof t){if("string"==typeof r)throw new TypeError('The "string" argument must be of type string. Received type number');return p(t)}return h(t,r,e)}function h(t,r,e){if("string"==typeof t)return function(t,r){"string"==typeof r&&""!==r||(r="utf8");if(!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var e=0|g(t,r),n=u(e),o=n.write(t,r);o!==e&&(n=n.slice(0,o));return n}(t,r);if(ArrayBuffer.isView(t))return function(t){if(F(t,Uint8Array)){var r=new Uint8Array(t);return l(r.buffer,r.byteOffset,r.byteLength)}return c(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(F(t,ArrayBuffer)||t&&F(t.buffer,ArrayBuffer))return l(t,r,e);if("undefined"!=typeof SharedArrayBuffer&&(F(t,SharedArrayBuffer)||t&&F(t.buffer,SharedArrayBuffer)))return l(t,r,e);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return s.from(n,r,e);var o=function(t){if(s.isBuffer(t)){var r=0|y(t.length),e=u(r);return 0===e.length||t.copy(e,0,0,r),e}if(void 0!==t.length)return"number"!=typeof t.length||Y(t.length)?u(0):c(t);if("Buffer"===t.type&&Array.isArray(t.data))return c(t.data)}(t);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return s.from(t[Symbol.toPrimitive]("string"),r,e);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function a(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function p(t){return a(t),u(t<0?0:0|y(t))}function c(t){for(var r=t.length<0?0:0|y(t.length),e=u(r),n=0;n<r;n+=1)e[n]=255&t[n];return e}function l(t,r,e){if(r<0||t.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<r+(e||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===r&&void 0===e?new Uint8Array(t):void 0===e?new Uint8Array(t,r):new Uint8Array(t,r,e),Object.setPrototypeOf(n,s.prototype),n}function y(t){if(t>=f)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f.toString(16)+" bytes");return 0|t}function g(t,r){if(s.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||F(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var e=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===e)return 0;for(var o=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":return _(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return z(t).length;default:if(o)return n?-1:_(t).length;r=(""+r).toLowerCase(),o=!0}}function w(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,r,e);case"utf8":case"utf-8":return I(this,r,e);case"ascii":return C(this,r,e);case"latin1":case"binary":return O(this,r,e);case"base64":return L(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function d(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function v(t,r,e,n,o){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),Y(e=+e)&&(e=o?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(o)return-1;e=t.length-1}else if(e<0){if(!o)return-1;e=0}if("string"==typeof r&&(r=s.from(r,n)),s.isBuffer(r))return 0===r.length?-1:b(t,r,e,n,o);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):b(t,[r],e,n,o);throw new TypeError("val must be string, number or Buffer")}function b(t,r,e,n,o){var i,f=1,u=t.length,s=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;f=2,u/=2,s/=2,e/=2}function h(t,r){return 1===f?t[r]:t.readUInt16BE(r*f)}if(o){var a=-1;for(i=e;i<u;i++)if(h(t,i)===h(r,-1===a?0:i-a)){if(-1===a&&(a=i),i-a+1===s)return a*f}else-1!==a&&(i-=i-a),a=-1}else for(e+s>u&&(e=u-s),i=e;i>=0;i--){for(var p=!0,c=0;c<s;c++)if(h(t,i+c)!==h(r,c)){p=!1;break}if(p)return i}return-1}function m(t,r,e,n){e=Number(e)||0;var o=t.length-e;n?(n=Number(n))>o&&(n=o):n=o;var i=r.length;n>i/2&&(n=i/2);for(var f=0;f<n;++f){var u=parseInt(r.substr(2*f,2),16);if(Y(u))return f;t[e+f]=u}return f}function E(t,r,e,n){return D(_(r,t.length-e),t,e,n)}function A(t,r,e,n){return D(function(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}(r),t,e,n)}function B(t,r,e,n){return D(z(r),t,e,n)}function U(t,r,e,n){return D(function(t,r){for(var e,n,o,i=[],f=0;f<t.length&&!((r-=2)<0);++f)n=(e=t.charCodeAt(f))>>8,o=e%256,i.push(o),i.push(n);return i}(r,t.length-e),t,e,n)}function L(t,r,e){return 0===r&&e===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(r,e))}function I(t,r,e){e=Math.min(t.length,e);for(var n=[],o=r;o<e;){var i,f,u,s,h=t[o],a=null,p=h>239?4:h>223?3:h>191?2:1;if(o+p<=e)switch(p){case 1:h<128&&(a=h);break;case 2:128==(192&(i=t[o+1]))&&(s=(31&h)<<6|63&i)>127&&(a=s);break;case 3:i=t[o+1],f=t[o+2],128==(192&i)&&128==(192&f)&&(s=(15&h)<<12|(63&i)<<6|63&f)>2047&&(s<55296||s>57343)&&(a=s);break;case 4:i=t[o+1],f=t[o+2],u=t[o+3],128==(192&i)&&128==(192&f)&&128==(192&u)&&(s=(15&h)<<18|(63&i)<<12|(63&f)<<6|63&u)>65535&&s<1114112&&(a=s)}null===a?(a=65533,p=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),o+=p}return function(t){var r=t.length;if(r<=T)return String.fromCharCode.apply(String,t);var e="",n=0;for(;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=T));return e}(n)}s.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(t,r),42===t.foo()}catch(t){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(t,r,e){return h(t,r,e)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(t,r,e){return function(t,r,e){return a(t),t<=0?u(t):void 0!==r?"string"==typeof e?u(t).fill(r,e):u(t).fill(r):u(t)}(t,r,e)},s.allocUnsafe=function(t){return p(t)},s.allocUnsafeSlow=function(t){return p(t)},s.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==s.prototype},s.compare=function(t,r){if(F(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),F(r,Uint8Array)&&(r=s.from(r,r.offset,r.byteLength)),!s.isBuffer(t)||!s.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;for(var e=t.length,n=r.length,o=0,i=Math.min(e,n);o<i;++o)if(t[o]!==r[o]){e=t[o],n=r[o];break}return e<n?-1:n<e?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var n=s.allocUnsafe(r),o=0;for(e=0;e<t.length;++e){var i=t[e];if(F(i,Uint8Array))o+i.length>n.length?s.from(i).copy(n,o):Uint8Array.prototype.set.call(n,i,o);else{if(!s.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o)}o+=i.length}return n},s.byteLength=g,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)d(this,r,r+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)d(this,r,r+3),d(this,r+1,r+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)d(this,r,r+7),d(this,r+1,r+6),d(this,r+2,r+5),d(this,r+3,r+4);return this},s.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?I(this,0,t):w.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t="",e=r.h2;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),"<Buffer "+t+">"},i&&(s.prototype[i]=s.prototype.inspect),s.prototype.compare=function(t,r,e,n,o){if(F(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),r<0||e>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&r>=e)return 0;if(n>=o)return-1;if(r>=e)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),f=(e>>>=0)-(r>>>=0),u=Math.min(i,f),h=this.slice(n,o),a=t.slice(r,e),p=0;p<u;++p)if(h[p]!==a[p]){i=h[p],f=a[p];break}return i<f?-1:f<i?1:0},s.prototype.includes=function(t,r,e){return-1!==this.indexOf(t,r,e)},s.prototype.indexOf=function(t,r,e){return v(this,t,r,e,!0)},s.prototype.lastIndexOf=function(t,r,e){return v(this,t,r,e,!1)},s.prototype.write=function(t,r,e,n){if(void 0===r)n="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)n=r,e=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r>>>=0,isFinite(e)?(e>>>=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var o=this.length-r;if((void 0===e||e>o)&&(e=o),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return m(this,t,r,e);case"utf8":case"utf-8":return E(this,t,r,e);case"ascii":case"latin1":case"binary":return A(this,t,r,e);case"base64":return B(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,r,e);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function C(t,r,e){var n="";e=Math.min(t.length,e);for(var o=r;o<e;++o)n+=String.fromCharCode(127&t[o]);return n}function O(t,r,e){var n="";e=Math.min(t.length,e);for(var o=r;o<e;++o)n+=String.fromCharCode(t[o]);return n}function R(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var o="",i=r;i<e;++i)o+=q[t[i]];return o}function S(t,r,e){for(var n=t.slice(r,e),o="",i=0;i<n.length-1;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function M(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function x(t,r,e,n,o,i){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<i)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function k(t,r,e,n,o,i){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function P(t,r,e,n,i){return r=+r,e>>>=0,i||k(t,0,e,4),o.write(t,r,e,n,23,4),e+4}function j(t,r,e,n,i){return r=+r,e>>>=0,i||k(t,0,e,8),o.write(t,r,e,n,52,8),e+8}s.prototype.slice=function(t,r){var e=this.length;(t=~~t)<0?(t+=e)<0&&(t=0):t>e&&(t=e),(r=void 0===r?e:~~r)<0?(r+=e)<0&&(r=0):r>e&&(r=e),r<t&&(r=t);var n=this.subarray(t,r);return Object.setPrototypeOf(n,s.prototype),n},s.prototype.readUintLE=s.prototype.readUIntLE=function(t,r,e){t>>>=0,r>>>=0,e||M(t,r,this.length);for(var n=this[t],o=1,i=0;++i<r&&(o*=256);)n+=this[t+i]*o;return n},s.prototype.readUintBE=s.prototype.readUIntBE=function(t,r,e){t>>>=0,r>>>=0,e||M(t,r,this.length);for(var n=this[t+--r],o=1;r>0&&(o*=256);)n+=this[t+--r]*o;return n},s.prototype.readUint8=s.prototype.readUInt8=function(t,r){return t>>>=0,r||M(t,1,this.length),this[t]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(t,r){return t>>>=0,r||M(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(t,r){return t>>>=0,r||M(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(t,r){return t>>>=0,r||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(t,r){return t>>>=0,r||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,r,e){t>>>=0,r>>>=0,e||M(t,r,this.length);for(var n=this[t],o=1,i=0;++i<r&&(o*=256);)n+=this[t+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*r)),n},s.prototype.readIntBE=function(t,r,e){t>>>=0,r>>>=0,e||M(t,r,this.length);for(var n=r,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*r)),i},s.prototype.readInt8=function(t,r){return t>>>=0,r||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,r){t>>>=0,r||M(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},s.prototype.readInt16BE=function(t,r){t>>>=0,r||M(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},s.prototype.readInt32LE=function(t,r){return t>>>=0,r||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,r){return t>>>=0,r||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,r){return t>>>=0,r||M(t,4,this.length),o.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,r){return t>>>=0,r||M(t,4,this.length),o.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,r){return t>>>=0,r||M(t,8,this.length),o.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,r){return t>>>=0,r||M(t,8,this.length),o.read(this,t,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r>>>=0,e>>>=0,n)||x(this,t,r,e,Math.pow(2,8*e)-1,0);var o=1,i=0;for(this[r]=255&t;++i<e&&(o*=256);)this[r+i]=t/o&255;return r+e},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(t,r,e,n){(t=+t,r>>>=0,e>>>=0,n)||x(this,t,r,e,Math.pow(2,8*e)-1,0);var o=e-1,i=1;for(this[r+o]=255&t;--o>=0&&(i*=256);)this[r+o]=t/i&255;return r+e},s.prototype.writeUint8=s.prototype.writeUInt8=function(t,r,e){return t=+t,r>>>=0,e||x(this,t,r,1,255,0),this[r]=255&t,r+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(t,r,e){return t=+t,r>>>=0,e||x(this,t,r,2,65535,0),this[r]=255&t,this[r+1]=t>>>8,r+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(t,r,e){return t=+t,r>>>=0,e||x(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=255&t,r+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(t,r,e){return t=+t,r>>>=0,e||x(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t,r+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(t,r,e){return t=+t,r>>>=0,e||x(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t,r+4},s.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r>>>=0,!n){var o=Math.pow(2,8*e-1);x(this,t,r,e,o-1,-o)}var i=0,f=1,u=0;for(this[r]=255&t;++i<e&&(f*=256);)t<0&&0===u&&0!==this[r+i-1]&&(u=1),this[r+i]=(t/f>>0)-u&255;return r+e},s.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r>>>=0,!n){var o=Math.pow(2,8*e-1);x(this,t,r,e,o-1,-o)}var i=e-1,f=1,u=0;for(this[r+i]=255&t;--i>=0&&(f*=256);)t<0&&0===u&&0!==this[r+i+1]&&(u=1),this[r+i]=(t/f>>0)-u&255;return r+e},s.prototype.writeInt8=function(t,r,e){return t=+t,r>>>=0,e||x(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=255&t,r+1},s.prototype.writeInt16LE=function(t,r,e){return t=+t,r>>>=0,e||x(this,t,r,2,32767,-32768),this[r]=255&t,this[r+1]=t>>>8,r+2},s.prototype.writeInt16BE=function(t,r,e){return t=+t,r>>>=0,e||x(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=255&t,r+2},s.prototype.writeInt32LE=function(t,r,e){return t=+t,r>>>=0,e||x(this,t,r,4,2147483647,-2147483648),this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4},s.prototype.writeInt32BE=function(t,r,e){return t=+t,r>>>=0,e||x(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t,r+4},s.prototype.writeFloatLE=function(t,r,e){return P(this,t,r,!0,e)},s.prototype.writeFloatBE=function(t,r,e){return P(this,t,r,!1,e)},s.prototype.writeDoubleLE=function(t,r,e){return j(this,t,r,!0,e)},s.prototype.writeDoubleBE=function(t,r,e){return j(this,t,r,!1,e)},s.prototype.copy=function(t,r,e,n){if(!s.isBuffer(t))throw new TypeError("argument should be a Buffer");if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-e&&(n=t.length-r+e);var o=n-e;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(r,e,n):Uint8Array.prototype.set.call(t,this.subarray(e,n),r),o},s.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var o=t.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(t=o)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;var i;if(r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(i=r;i<e;++i)this[i]=t;else{var f=s.isBuffer(t)?t:s.from(t,n),u=f.length;if(0===u)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<e-r;++i)this[i+r]=f[i%u]}return this};var N=/[^+/0-9A-Za-z-_]/g;function _(t,r){var e;r=r||1/0;for(var n=t.length,o=null,i=[],f=0;f<n;++f){if((e=t.charCodeAt(f))>55295&&e<57344){if(!o){if(e>56319){(r-=3)>-1&&i.push(239,191,189);continue}if(f+1===n){(r-=3)>-1&&i.push(239,191,189);continue}o=e;continue}if(e<56320){(r-=3)>-1&&i.push(239,191,189),o=e;continue}e=65536+(o-55296<<10|e-56320)}else o&&(r-=3)>-1&&i.push(239,191,189);if(o=null,e<128){if((r-=1)<0)break;i.push(e)}else if(e<2048){if((r-=2)<0)break;i.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;i.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;i.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return i}function z(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(N,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function D(t,r,e,n){for(var o=0;o<n&&!(o+e>=r.length||o>=t.length);++o)r[o+e]=t[o];return o}function F(t,r){return t instanceof r||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===r.name}function Y(t){return t!=t}var q=function(){for(var t="0123456789abcdef",r=new Array(256),e=0;e<16;++e)for(var n=16*e,o=0;o<16;++o)r[n+o]=t[e]+t[o];return r}()},80645:(t,r)=>{r.read=function(t,r,e,n,o){var i,f,u=8*o-n-1,s=(1<<u)-1,h=s>>1,a=-7,p=e?o-1:0,c=e?-1:1,l=t[r+p];for(p+=c,i=l&(1<<-a)-1,l>>=-a,a+=u;a>0;i=256*i+t[r+p],p+=c,a-=8);for(f=i&(1<<-a)-1,i>>=-a,a+=n;a>0;f=256*f+t[r+p],p+=c,a-=8);if(0===i)i=1-h;else{if(i===s)return f?NaN:1/0*(l?-1:1);f+=Math.pow(2,n),i-=h}return(l?-1:1)*f*Math.pow(2,i-n)},r.write=function(t,r,e,n,o,i){var f,u,s,h=8*i-o-1,a=(1<<h)-1,p=a>>1,c=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?0:i-1,y=n?1:-1,g=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(u=isNaN(r)?1:0,f=a):(f=Math.floor(Math.log(r)/Math.LN2),r*(s=Math.pow(2,-f))<1&&(f--,s*=2),(r+=f+p>=1?c/s:c*Math.pow(2,1-p))*s>=2&&(f++,s/=2),f+p>=a?(u=0,f=a):f+p>=1?(u=(r*s-1)*Math.pow(2,o),f+=p):(u=r*Math.pow(2,p-1)*Math.pow(2,o),f=0));o>=8;t[e+l]=255&u,l+=y,u/=256,o-=8);for(f=f<<o|u,h+=o;h>0;t[e+l]=255&f,l+=y,f/=256,h-=8);t[e+l-y]|=128*g}}}]);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Matterport Showcase SDK
|
|
3
|
+
*
|
|
4
|
+
* © 2022 Matterport, Inc. All rights reserved.
|
|
5
|
+
*
|
|
6
|
+
* Matterport Showcase SDK ("Showcase SDK") must be used according to
|
|
7
|
+
* the Matterport Terms of Service located at https://matterport.com/terms-of-use, the Platform Subscription Agreement ("PSA") available at https://matterport.com/legal/platform-subscription-agreement and the SDK License terms included in the PSA ("SDK License"). Any use of the Showcase SDK requires a current active Matterport account and associated developer key.
|
|
8
|
+
*
|
|
9
|
+
* -------------------------------------------------------------------------------
|
|
10
|
+
*
|
|
11
|
+
* Redistribution and use in source and binary forms, without modification, is permitted in accordance with the SDK License provided that the following conditions are met:
|
|
12
|
+
*
|
|
13
|
+
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
14
|
+
* * Neither the name of Matterport nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
15
|
+
*
|
|
16
|
+
* THE SHOWCASE SDK IS PROVIDED BY MATTERPORT AS THE COPYRIGHT HOLDER AND, IF APPLICABLE, ITS CONTRIBUTORS "AS IS" AND WITHOUT WARRANTIES OF ANY KIND. TO THE FULLEST EXTENT PERMISSIBLE PURSUANT TO APPLICABLE LAW, MATTERPORT DISCLAIMS, ON BEHALF OF ITSELF AND ITS AFFILIATES AND LICENSORS, ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. MATTERPORT DOES NOT WARRANT THAT THE AVAILABILITY OF THE SHOWCASE SDK WILL BE UNINTERRUPTED OR ERROR-FREE, THAT DEFECTS WILL BE CORRECTED, OR THAT THE SHOWCASE SDK WILL BE FREE OF VIRUSES OR OTHER HARMFUL COMPONENTS. MATTERPORT DOES NOT MAKE ANY REPRESENTATIONS OR WARRANTIES REGARDING THE USE OR THE RESULTS OF THE USE OF THE SHOWCASE SDK OR FUNCTIONS ON THE SHOWCASE SDK IN TERMS OF THEIR CORRECTNESS, ACCURACY, RELIABILITY, RESULTS TO BE ACHIEVED, OR OTHERWISE. APPLICABLE LAW MAY NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SOME OR ALL OF THE FOREGOING DISCLAIMERS MAY NOT APPLY TO YOU.
|
|
17
|
+
*
|
|
18
|
+
* TO THE EXTENT PERMITTED UNDER APPLICABLE LAW UNDER NO CIRCUMSTANCES, INCLUDING, BUT NOT LIMITED TO, NEGLIGENCE, SHALL MATTERPORT OR ITS AFFILIATES OR LICENSORS BE LIABLE FOR ANY CONSEQUENTIAL, EXEMPLARY, PUNITIVE, SPECIAL, INCIDENTAL OR OTHER INDIRECT DAMAGES, EVEN IF MATTERPORT OR A MATTERPORT AUTHORIZED REPRESENTATIVE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. APPLICABLE LAW MAY NOT ALLOW SOME OR ALL OF THIS LIMITATION OF LIABILITY, SO IT MAY NOT APPLY TO YOU.
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/*!
|
|
23
|
+
* The buffer module from node.js, for the browser.
|
|
24
|
+
*
|
|
25
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
26
|
+
* @license MIT
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|