1234 |
- (function(e){function t(t){for(var n,o,s=t[0],l=t[1],c=t[2],u=0,d=[];u<s.length;u++)o=s[u],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&d.push(a[o][0]),a[o]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n]);h&&h(t);while(d.length)d.shift()();return r.push.apply(r,c||[]),i()}function i(){for(var e,t=0;t<r.length;t++){for(var i=r[t],n=!0,o=1;o<i.length;o++){var s=i[o];0!==a[s]&&(n=!1)}n&&(r.splice(t--,1),e=l(l.s=i[0]))}return e}var n={},o={embed:0},a={embed:0},r=[];function s(e){return l.p+"static/js/"+({}[e]||e)+"."+{"chunk-2d0bdd57":"837b2994","chunk-2d22c0b8":"edec0c1c","chunk-454cef53":"6ac84dbc","chunk-7b339d63":"bb624f76","chunk-c93e8616":"410f2c9b","chunk-6ca29966":"6055ed14","chunk-1466078e":"a9779079","chunk-147d07a8":"e9bafa79","chunk-2c83f0e0":"a61ce77e","chunk-38afcdac":"c5b87799","chunk-421c2132":"d7a85d40","chunk-4abcab2a":"3ac1fd88","chunk-57c3f967":"509a9cdc","chunk-5e076204":"d619c0ef","chunk-725787b4":"62eeab3e","chunk-ed3be54e":"44a325f7","chunk-a9d6c158":"a5c6eda7","chunk-e7bdf3ce":"14fce899","chunk-71804c82":"89751f0c"}[e]+".js"}function l(t){if(n[t])return n[t].exports;var i=n[t]={i:t,l:!1,exports:{}};return e[t].call(i.exports,i,i.exports,l),i.l=!0,i.exports}l.e=function(e){var t=[],i={"chunk-7b339d63":1,"chunk-c93e8616":1,"chunk-6ca29966":1,"chunk-1466078e":1,"chunk-147d07a8":1,"chunk-2c83f0e0":1,"chunk-38afcdac":1,"chunk-421c2132":1,"chunk-4abcab2a":1,"chunk-57c3f967":1,"chunk-5e076204":1,"chunk-725787b4":1,"chunk-ed3be54e":1,"chunk-a9d6c158":1,"chunk-e7bdf3ce":1,"chunk-71804c82":1};o[e]?t.push(o[e]):0!==o[e]&&i[e]&&t.push(o[e]=new Promise((function(t,i){for(var n="static/css/"+({}[e]||e)+"."+{"chunk-2d0bdd57":"31d6cfe0","chunk-2d22c0b8":"31d6cfe0","chunk-454cef53":"31d6cfe0","chunk-7b339d63":"7b3d73a2","chunk-c93e8616":"f22495b7","chunk-6ca29966":"83bab1d2","chunk-1466078e":"6b4be26d","chunk-147d07a8":"9f49428d","chunk-2c83f0e0":"a6e75c2d","chunk-38afcdac":"c2154bce","chunk-421c2132":"b41e8c49","chunk-4abcab2a":"095d3787","chunk-57c3f967":"d618b54e","chunk-5e076204":"2b10181f","chunk-725787b4":"3609d80b","chunk-ed3be54e":"29cea110","chunk-a9d6c158":"107b7f68","chunk-e7bdf3ce":"cb9c32d3","chunk-71804c82":"64b751b4"}[e]+".css",a=l.p+n,r=document.getElementsByTagName("link"),s=0;s<r.length;s++){var c=r[s],u=c.getAttribute("data-href")||c.getAttribute("href");if("stylesheet"===c.rel&&(u===n||u===a))return t()}var d=document.getElementsByTagName("style");for(s=0;s<d.length;s++){c=d[s],u=c.getAttribute("data-href");if(u===n||u===a)return t()}var h=document.createElement("link");h.rel="stylesheet",h.type="text/css",h.onload=t,h.onerror=function(t){var n=t&&t.target&&t.target.src||a,r=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");r.code="CSS_CHUNK_LOAD_FAILED",r.request=n,delete o[e],h.parentNode.removeChild(h),i(r)},h.href=a;var p=document.getElementsByTagName("head")[0];p.appendChild(h)})).then((function(){o[e]=0})));var n=a[e];if(0!==n)if(n)t.push(n[2]);else{var r=new Promise((function(t,i){n=a[e]=[t,i]}));t.push(n[2]=r);var c,u=document.createElement("script");u.charset="utf-8",u.timeout=120,l.nc&&u.setAttribute("nonce",l.nc),u.src=s(e);var d=new Error;c=function(t){u.onerror=u.onload=null,clearTimeout(h);var i=a[e];if(0!==i){if(i){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;d.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",d.name="ChunkLoadError",d.type=n,d.request=o,i[1](d)}a[e]=void 0}};var h=setTimeout((function(){c({type:"timeout",target:u})}),12e4);u.onerror=u.onload=c,document.head.appendChild(u)}return Promise.all(t)},l.m=e,l.c=n,l.d=function(e,t,i){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},l.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(l.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)l.d(i,n,function(t){return e[t]}.bind(null,n));return i},l.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="",l.oe=function(e){throw console.error(e),e};var c=window["webpackJsonp"]=window["webpackJsonp"]||[],u=c.push.bind(c);c.push=t,c=c.slice();for(var d=0;d<c.length;d++)t(c[d]);var h=u;r.push([0,"chunk-vendors"]),i()})({0:function(e,t,i){e.exports=i("d7a9")},"01d8":function(e,t,i){"use strict";i.d(t,"a",(function(){return m}));i("6b54"),i("2397"),i("7f7f");var n=i("d4ec"),o=i("bee2"),a=i("262e"),r=i("99de"),s=i("7e84"),l=i("4be4"),c=i("8eb6"),u=i("80c5"),d=i("f121"),h=i("6860");function p(e){var t=f();return function(){var i,n=Object(s["a"])(e);if(t){var o=Object(s["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(r["a"])(this,i)}}function f(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var m=function(e){Object(a["a"])(i,e);var t=p(i);function i(e){var o;Object(n["a"])(this,i);var a=new l["a"]({side:THREE.DoubleSide});o=t.call(this,e.geometry,a),o.materialInside=a;var r=THREE.UniformsUtils.clone(c["a"].modelOutside.uniforms);return o.materialOutside=new THREE.RawShaderMaterial({fragmentShader:c["a"].modelOutside.fragmentShader,vertexShader:c["a"].modelOutside.vertexShader,uniforms:r,side:THREE.FrontSide,name:"chunkOut",transparent:!0}),o.name=e.name||"",o.textureName=e.textureName,o.meshUrl=d["a"].urls.mesh,o}return Object(o["a"])(i,[{key:"setTextureMap",value:function(e,t){this.materialInside.uniforms.map.value=e,this.materialOutside.uniforms.map.value=e,this.materialInside.uniforms.map.value.wrapS=THREE.RepeatWrapping,this.materialInside.uniforms.map.value.wrapT=THREE.RepeatWrapping,this.materialOutside.uniforms.map.value.wrapS=THREE.RepeatWrapping,this.materialOutside.uniforms.map.value.wrapT=THREE.RepeatWrapping}},{key:"setMode",value:function(e){var t=this.materialInside;e!==u["a"].DOLLHOUSE&&e!==u["a"].FLOORPLAN||(t=this.materialOutside),e===u["a"].PANORAMA||h["objects"].mainDesign&&h["objects"].mainDesign.editing?t.side=THREE.DoubleSide:t.side=THREE.FrontSide,t.transparent=this.material.transparent,t.uniforms.opacity.value=this.material.uniforms.opacity.value,this.material=t}}]),i}(THREE.Mesh)},"0236":function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"swiper-container app-setting",class:{visible:"guide"==this.page||!e.status.isPlaying}},[i("div",{staticClass:"swiper-wrapper container"},[i("div",{staticClass:"swiper-slide"},[e._t("default")],2)])])},o=[],a=(i("8e6e"),i("ac6a"),i("456d"),i("ade3")),r=i("2f62");function s(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function l(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?s(Object(i),!0).forEach((function(t){Object(a["a"])(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):s(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var c={name:"app-setting",mounted:function(){var e=this;this.$nextTick((function(){window._menu_swiper=new Swiper(e.$el,{direction:"vertical",slidesPerView:"auto",freeMode:!0,mousewheel:!0,on:{resize:function(){window._menu_swiper.update()}}}),e.$el.clientHeight<window.innerHeight/2&&e.disable(),e.$bus.emit("page-in",e.page)}))},computed:l({},Object(r["b"])({page:"page",status:"guide/status"})),created:function(){var e=this,t=this;function i(){window._menu_swiper&&window._menu_swiper.update(),t.$el.clientHeight<window.innerHeight/2-50?t.disable():t.enable()}this.$bus.on("orientation",i),this.$once("hook:beforeDestroy",(function(){e.$bus.off("orientation",i)}))},destroyed:function(){window._menu_swiper&&(window._menu_swiper.destroy(!0,!0),window._menu_swiper=null),this.$bus.emit("page-out")},methods:{back:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];t&&setTimeout((function(){e.$store.commit("SetPageName",{from:e.page,to:""})}),0)},update:function(){window._menu_swiper.update()},disable:function(){window._menu_swiper.allowSlidePrev=!1,window._menu_swiper.allowSlideNext=!1},enable:function(){window._menu_swiper.allowSlidePrev=!0,window._menu_swiper.allowSlideNext=!0}}},u=c,d=(i("5015"),i("82b8"),i("2877")),h=Object(d["a"])(u,n,o,!1,null,"3b001400",null);t["default"]=h.exports},"076a":function(e,t,i){"use strict";var n={visibleFloor:1,ghostFloor:3,boundingSkybox:1,panoMarker:2,floorlogo:3,reticule:4,tagStem:5,tagDisc:6,pullMesh:6,ribbon:100};t["a"]=n},"07fe":function(e,t,i){"use strict";i("28a5"),i("386d"),i("7f7f"),i("673e"),i("ac6a");var n=i("9ef6"),o=i("f121"),a=i("6860"),r=i("430c"),s=THREE.BoxBufferGeometry,l=THREE.BufferGeometry,c=THREE.Color,u=THREE.CylinderBufferGeometry,d=THREE.DoubleSide,h=THREE.Euler,p=THREE.Float32BufferAttribute,f=THREE.Line,m=THREE.LineBasicMaterial,v=THREE.Matrix4,g=THREE.Mesh,y=THREE.MeshBasicMaterial,b=THREE.Object3D,w=THREE.OctahedronBufferGeometry,E=THREE.PlaneBufferGeometry,T=THREE.Quaternion,P=THREE.Raycaster,x=(THREE.SphereBufferGeometry,THREE.TorusBufferGeometry),k=THREE.Vector3,R=function(e,t,i){void 0===t&&(console.warn('THREE.TransformControls: The second parameter "domElement" is now mandatory.'),t=document),b.call(this),this.visible=!1,this.domElement=t;var r=new _(i);this.add(r);var s=new S(i);this.add(s);var l=this;this.player=i.player,this.options=i,X("camera",e),X("object",void 0),X("enabled",!0),X("axis",null),X("mode","translate"),X("translationSnap",null),X("rotationSnap",null),X("scaleSnap",null),X("space","world"),X("size",1),X("dragging",!1),X("showX",!0),X("showY",!0),X("showZ",!0);var c={type:"change"},u={type:"mouseDown"},d={type:"mouseUp",mode:l.mode},h={type:"objectChange"},p=new P,f=new k,m=new k,v=new T,g={X:new k(1,0,0),Y:new k(0,1,0),Z:new k(0,0,1)},y=new k,w=new k,E=new k,x=new k,R=new k,M=new k,A=0,O=new k,C=new T,D=new k,V=new k,I=new T,j=new T,L=new k,F=new k,H=new T,z=new k,N=new k,B=new T,U=new T,W=new k,q=new k,G=new k,Q=new T,Y=new k;function X(e,t){var i=t;Object.defineProperty(l,e,{get:function(){return void 0!==i?i:t},set:function(t){i!==t&&(i=t,s[e]=t,r[e]=t,l.dispatchEvent({type:e+"-changed",value:t}),l.dispatchEvent(c))}}),l[e]=t,s[e]=t,r[e]=t}function Z(e){l.enabled&&l.pointerHover(l.player.mouse)}function J(e){l.enabled&&(l.pointerHover(l.player.mouse),l.pointerDown(l.player.mouse))}function $(e){l.enabled&&l.dragging&&l.pointerMove(l.player.mouse)}function K(e){l.enabled&&l.pointerUp(l.player.mouse)}X("worldPosition",N),X("worldPositionStart",F),X("worldQuaternion",B),X("worldQuaternionStart",H),X("cameraPosition",O),X("cameraQuaternion",C),X("pointStart",y),X("pointEnd",w),X("rotationAxis",x),X("rotationAngle",A),X("eye",q),t.addEventListener("mousedown",J,!1),t.addEventListener("touchstart",J,!1),t.addEventListener("mousemove",Z,!1),t.addEventListener("touchmove",Z,!1),t.addEventListener("touchmove",$,!1),document.addEventListener("mouseup",K,!1),t.addEventListener("touchend",K,!1),t.addEventListener("touchcancel",K,!1),t.addEventListener("touchleave",K,!1),this.dispose=function(){t.removeEventListener("mousedown",J),t.removeEventListener("touchstart",J),t.removeEventListener("mousemove",Z),document.removeEventListener("mousemove",$),t.removeEventListener("touchmove",Z),t.removeEventListener("touchmove",$),document.removeEventListener("mouseup",K),t.removeEventListener("touchend",K),t.removeEventListener("touchcancel",K),t.removeEventListener("touchleave",K),this.traverse((function(e){e.geometry&&e.geometry.dispose(),e.material&&e.material.dispose()}))},this.attach=function(e){return this.object=e,this.visible=!0,o["a"].isTyping=!0,this},this.detach=function(){return this.object=void 0,this.visible=!1,this.axis=null,o["a"].isTyping=!1,this},this.setSize=function(e,t){this.fatLineMats.forEach((function(i){i.resolution.set(e,t)}))},app.sceneRenderer.addComponent(this),this.switchEditState=function(e){"overlay"==e||"panovideo"==e&&(this.mode="scale"),this.editState=e},this.handleDragStart=function(){this.editState&&this.onPointerDown()},this.handleDragging=function(){this.editState&&this.onPointerMove()},this.handleDragEnd=function(){this.editState&&this.onPointerUp()},this.updateMatrixWorld=function(){void 0!==this.object&&(this.object.updateMatrixWorld(),this.object.parent.matrixWorld.decompose(V,I,L),this.object.matrixWorld.decompose(N,B,W),j.copy(I).inverse(),U.copy(B).inverse()),this.camera.updateMatrixWorld(),this.camera.matrixWorld.decompose(O,C,D),q.copy(O).sub(N).normalize(),b.prototype.updateMatrixWorld.call(this)},this.pointerHover=function(e){if(void 0!==this.object&&!0!==this.dragging&&(void 0===e.button||0===e.button)){var t=new THREE.Vector3(e.x,e.y,-1).unproject(this.camera);p.set(t,a["objects"].player.getMouseDirection(e));var i=p.intersectObjects(r.picker[this.mode].children,!0)[0]||!1;i?(this.axis=i.object.name,this.intersect=i.object):(this.intersect=null,this.axis=null)}},this.pointerDown=function(e){if(void 0!==this.object&&!0!==this.dragging&&(void 0===e.button||0===e.button)&&(0===e.button||void 0===e.button)&&null!==this.axis){var t=new THREE.Vector3(e.x,e.y,-1).unproject(this.camera);p.set(t,a["objects"].player.getMouseDirection(e));var i=p.intersectObjects([s],!0)[0]||!1;if(i){var n=this.space;if("scale"===this.mode?n="local":"E"!==this.axis&&"XYZE"!==this.axis&&"XYZ"!==this.axis||(n="world"),"local"===n&&"rotate"===this.mode){var o=this.rotationSnap;"X"===this.axis&&o&&(this.object.rotation.x=Math.round(this.object.rotation.x/o)*o),"Y"===this.axis&&o&&(this.object.rotation.y=Math.round(this.object.rotation.y/o)*o),"Z"===this.axis&&o&&(this.object.rotation.z=Math.round(this.object.rotation.z/o)*o)}this.object.updateMatrixWorld(),this.object.parent.updateMatrixWorld(),G.copy(this.object.position),Q.copy(this.object.quaternion),Y.copy(this.object.scale),this.object.matrixWorld.decompose(F,H,z),y.copy(i.point).sub(F),this.player.cameraControls.activeControl&&(this.player.cameraControls.activeControl.enabled=!1)}this.dragging=!0,u.mode=this.mode,this.dispatchEvent(u)}},this.pointerMove=function(e){var t=this.axis,o=this.mode,r=this.object,l=this.space;if("scale"===o?l="local":"E"!==t&&"XYZE"!==t&&"XYZ"!==t||(l="world"),console.log(t),void 0!==r&&null!==t&&!1!==this.dragging&&(void 0===e.button||0===e.button)){var u=new THREE.Vector3(e.x,e.y,-1).unproject(this.camera);p.set(u,a["objects"].player.getMouseDirection(e));var d=p.intersectObjects([s],!0)[0]||!1;if(!1!==d){if(w.copy(d.point).sub(F),"translate"===o)E.copy(w).sub(y),"local"===l&&"XYZ"!==t&&E.applyQuaternion(U),-1===t.indexOf("X")&&(E.x=0),-1===t.indexOf("Y")&&(E.y=0),-1===t.indexOf("Z")&&(E.z=0),"local"===l&&"XYZ"!==t?E.applyQuaternion(Q).divide(L):E.applyQuaternion(j).divide(L),r.position.copy(E).add(G),this.translationSnap&&("local"===l&&(r.position.applyQuaternion(v.copy(Q).inverse()),-1!==t.search("X")&&(r.position.x=Math.round(r.position.x/this.translationSnap)*this.translationSnap),-1!==t.search("Y")&&(r.position.y=Math.round(r.position.y/this.translationSnap)*this.translationSnap),-1!==t.search("Z")&&(r.position.z=Math.round(r.position.z/this.translationSnap)*this.translationSnap),r.position.applyQuaternion(Q)),"world"===l&&(r.parent&&r.position.add(f.setFromMatrixPosition(r.parent.matrixWorld)),-1!==t.search("X")&&(r.position.x=Math.round(r.position.x/this.translationSnap)*this.translationSnap),-1!==t.search("Y")&&(r.position.y=Math.round(r.position.y/this.translationSnap)*this.translationSnap),-1!==t.search("Z")&&(r.position.z=Math.round(r.position.z/this.translationSnap)*this.translationSnap),r.parent&&r.position.sub(f.setFromMatrixPosition(r.parent.matrixWorld))));else if("scale"===o){if(-1!==t.search("XYZ")){var b=w.length()/y.length();w.dot(y)<0&&(b*=-1),i.NoScaleZ?m.set(b,b,1):m.set(b,b,b)}else f.copy(y),m.copy(w),f.applyQuaternion(U),m.applyQuaternion(U),m.divide(f),-1===t.search("X")&&(m.x=1),-1===t.search("Y")&&(m.y=1),-1===t.search("Z")&&(m.z=1);r.scale.copy(Y).multiply(m),this.scaleSnap&&(-1!==t.search("X")&&(r.scale.x=Math.round(r.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),-1!==t.search("Y")&&(r.scale.y=Math.round(r.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),-1!==t.search("Z")&&(r.scale.z=Math.round(r.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap)),"overlay"==this.editState&&(r.width=n["a"].overlay.width*r.scale.x,r.height=n["a"].overlay.height*r.scale.y,a["objects"].player.EditOverlay.updateOverlayScaleDisplay())}else if("rotate"===o){if(E.copy(w).sub(y),"floorplan"==this.player.mode)var T=this.player.cameraControls.cameras.floorplan,P=(T.right-T.left)/T.aspect,k=5/P;else k=5/N.distanceTo(f.setFromMatrixPosition(this.camera.matrixWorld));"E"===t?(x.copy(q),A=w.angleTo(y),R.copy(y).normalize(),M.copy(w).normalize(),A*=M.cross(R).dot(q)<0?1:-1):"XYZE"===t?(x.copy(E).cross(q).normalize(),A=E.dot(f.copy(x).cross(this.eye))*k):"X"!==t&&"Y"!==t&&"Z"!==t||(x.copy(g[t]),f.copy(g[t]),"local"===l&&f.applyQuaternion(B),A=E.dot(f.cross(q).normalize())*k),this.rotationSnap&&(A=Math.round(A/this.rotationSnap)*this.rotationSnap),this.rotationAngle=A,"local"===l&&"E"!==t&&"XYZE"!==t?(r.quaternion.copy(Q),r.quaternion.multiply(v.setFromAxisAngle(x,A)).normalize()):(x.applyQuaternion(j),r.quaternion.copy(v.setFromAxisAngle(x,A)),r.quaternion.multiply(Q).normalize())}this.dispatchEvent(c),this.dispatchEvent(h)}}},this.pointerUp=function(e){this.dragging&&null!==this.axis&&(d.mode=this.mode,this.dispatchEvent(d)),this.dragging=!1,void 0===e.button&&(this.axis=null),this.player.cameraControls.activeControl&&(this.player.cameraControls.activeControl.pointerDragOn=!1,this.player.cameraControls.activeControl.enabled=!0)},this.onPointerDown=J,this.onPointerMove=$,this.onPointerUp=K,this.getMode=function(){return l.mode},this.setMode=function(e){l.mode=e},this.setTranslationSnap=function(e){l.translationSnap=e},this.setRotationSnap=function(e){l.rotationSnap=e},this.setScaleSnap=function(e){l.scaleSnap=e},this.setSpace=function(e){l.space=e},this.update=function(){console.warn("THREE.TransformControls: update function has no more functionality and therefore has been deprecated.")}};R.prototype=Object.assign(Object.create(b.prototype),{constructor:R,isTransformControls:!0});var _=function(e){b.call(this),this.type="TransformControlsGizmo",this.player=e.player;var t=new y({depthTest:!1,depthWrite:!1,transparent:!0,side:d,fog:!1}),i=new m({depthTest:!1,depthWrite:!1,transparent:!0,linewidth:1,fog:!1}),n=t.clone();n.opacity=.35;var o=t.clone();o.opacity=.1;var a=t.clone();a.color.set(16711680);var E=t.clone();E.color.set(65280);var P=t.clone();P.color.set(255);var R=t.clone();R.opacity=.75,R.color.set(53501);var _=R.clone();_.color.set(16776960);var S=R.clone();S.color.set(65535);var M=R.clone();M.color.set(16711935);var A=t.clone();A.color.set(16776960);var O=i.clone();O.color.set(16711680);var C=r["a"].createFatLineMat({width:3,color:16711680,alwaysShow:!0,opacity:.9});e.fatLineMats.push(C);var D=i.clone();D.color.set(65280);var V=r["a"].createFatLineMat({width:3,color:65280,alwaysShow:!0,opacity:.9});e.fatLineMats.push(V);var I=i.clone();I.color.set(255);var j=r["a"].createFatLineMat({width:3,color:255,alwaysShow:!0,opacity:.9});e.fatLineMats.push(j);var L=i.clone();L.color.set(65535);var F=i.clone();F.color.set(16711935);var H=i.clone();H.color.set(16776960);var z=i.clone();z.color.set(7895160);var N=H.clone();N.opacity=.25;var B=new u(0,.07,.2,12,1,!1),U=new s(.125,.125,.125),W=new l;W.addAttribute("position",new p([0,0,0,1,0,0],3));var q={},G=r["a"].createFatLine([0,0,0,.5,0,0],{});q["x+"]=G.geometry,G=r["a"].createFatLine([0,0,0,-.5,0,0],{}),q["x-"]=G.geometry,G=r["a"].createFatLine([0,0,0,0,.5,0],{}),q["y+"]=G.geometry,G=r["a"].createFatLine([0,0,0,0,-.5,0],{}),q["y-"]=G.geometry,G=r["a"].createFatLine([0,0,0,0,0,.5],{}),q["z+"]=G.geometry,G=r["a"].createFatLine([0,0,0,0,0,-.5],{}),q["z-"]=G.geometry;var Q=function(e,t){var i=new THREE.Fatline(e,t);return i.computeLineDistances(),i.scale.set(1,1,1),i.renderOrder=4,i},Y=function(e,t){for(var i=new l,n=[],o=0;o<=64*t;++o)n.push(0,Math.cos(o/32*Math.PI)*e,Math.sin(o/32*Math.PI)*e);return i.addAttribute("position",new p(n,3)),i},X=function(){var e=new l;return e.addAttribute("position",new p([0,0,0,1,1,1],3)),e},Z={X:[[new g(B,a),[.5,0,0],[0,0,-Math.PI/2],null,"fwd"],[Q(q["x+"],C)]],Y:[[new g(B,E),[0,.5,0],null,null,"fwd"],[Q(q["y+"],V)]],Z:[[new g(B,P),[0,0,.5],[Math.PI/2,0,0],null,"fwd"],[Q(q["z+"],j)]]},J={X:[[new g(new u(.2,0,.5,4,1,!1),n),[.3,0,0],[0,0,-Math.PI/2]]],Y:[[new g(new u(.2,0,.5,4,1,!1),n),[0,.3,0]]],Z:[[new g(new u(.2,0,.5,4,1,!1),n),[0,0,.3],[Math.PI/2,0,0]]]},$={START:[[new g(new w(.01,2),o),null,null,null,"helper"]],END:[[new g(new w(.01,2),o),null,null,null,"helper"]],DELTA:[[new f(X(),o),null,null,null,"helper"]],X:[[new f(W,o.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new f(W,o.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new f(W,o.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]},K={X:[[new f(Y(1,.5),O)],[new g(new w(.04,0),a),[0,0,.99],null,[1,3,1]]],Y:[[new f(Y(1,.5),D),null,[0,0,-Math.PI/2]],[new g(new w(.04,0),E),[0,0,.99],null,[3,1,1]]],Z:[[new f(Y(1,.5),I),null,[0,Math.PI/2,0]],[new g(new w(.04,0),P),[.99,0,0],null,[1,3,1]]],XYZE:[[new f(Y(1,1),z),null,[0,Math.PI/2,0]]]},ee={AXIS:[[new f(W,o.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]]},te={X:[[new g(new x(1,.1,4,24),n),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new g(new x(1,.1,4,24),n),[0,0,0],[Math.PI/2,0,0]]],Z:[[new g(new x(1,.1,4,24),n),[0,0,0],[0,0,-Math.PI/2]]]},ie={X:[[new g(U,a),[.5,0,0],[0,0,-Math.PI/2]],[Q(q["x+"],C),null,null]],Y:[[new g(U,E),[0,.5,0]],[Q(q["y+"],V)]],XYZX:[[new g(new s(.125,.125,.125),R.clone()),[.5,.5,0]]]},ne={X:[[new g(new u(.2,0,.5,4,1,!1),n),[.3,0,0],[0,0,-Math.PI/2]]],Y:[[new g(new u(.2,0,.5,4,1,!1),n),[0,.3,0]]],XYZX:[[new g(new s(.2,.2,.2),n),[.5,.5,0]]]},oe={X:[[new f(W,o.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new f(W,o.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new f(W,o.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]},ae=function(e){var t=new b;for(var i in e)for(var n=e[i].length;n--;){var o=e[i][n][0].clone(),a=e[i][n][1],r=e[i][n][2],s=e[i][n][3],l=e[i][n][4];if(o.name=i,o.tag=l,a&&o.position.set(a[0],a[1],a[2]),r&&o.rotation.set(r[0],r[1],r[2]),s&&o.scale.set(s[0],s[1],s[2]),o.updateMatrix(),o.geometry.clone()){var c=o.geometry.clone();c.applyMatrix(o.matrix),o.geometry=c}else o.geometry.applyMatrix(o.matrix);o.renderOrder=1/0,o.position.set(0,0,0),o.rotation.set(0,0,0),o.scale.set(1,1,1),t.add(o)}return t},re=new k(0,0,0),se=new h,le=new k(0,1,0),ce=new k(0,0,0),ue=new v,de=new T,he=new T,pe=new T,fe=new k(1,0,0),me=new k(0,1,0),ve=new k(0,0,1);this.gizmo={},this.picker={},this.helper={},this.add(this.gizmo["translate"]=ae(Z)),this.add(this.gizmo["rotate"]=ae(K)),this.add(this.gizmo["scale"]=ae(ie)),this.add(this.picker["translate"]=ae(J)),this.add(this.picker["rotate"]=ae(te)),this.add(this.picker["scale"]=ae(ne)),this.add(this.helper["translate"]=ae($)),this.add(this.helper["rotate"]=ae(ee)),this.add(this.helper["scale"]=ae(oe)),this.picker["translate"].visible=!1,this.picker["rotate"].visible=!1,this.picker["scale"].visible=!1,this.updateMatrixWorld=function(){var t=this.space;"scale"===this.mode&&(t="local");var i="local"===t?this.worldQuaternion:pe;this.gizmo["translate"].visible="translate"===this.mode,this.gizmo["rotate"].visible="rotate"===this.mode,this.gizmo["scale"].visible="scale"===this.mode,this.helper["translate"].visible="translate"===this.mode,this.helper["rotate"].visible="rotate"===this.mode,this.helper["scale"].visible="scale"===this.mode;var n=[];n=n.concat(this.picker[this.mode].children),n=n.concat(this.gizmo[this.mode].children),n=n.concat(this.helper[this.mode].children);var o=this.worldPosition.distanceTo(this.cameraPosition);if("transitioning"!=this.player.mode||"floorplan"!=this.player.modeTran.split("-")[0]&&"floorplan"!=this.player.modeTran.split("-")[1]){if("floorplan"==this.player.mode){a=this.player.cameraControls.cameras.floorplan;o=(a.right-a.left)/a.aspect}}else{var a=this.player.cameraControls.cameras.floorplan,r=(a.right-a.left)/a.aspect;o=Math.min(o,r)}for(var s=o*this.size/7,l=0;l<n.length;l++){var u=n[l];if(u.visible=!0,u.rotation.set(0,0,0),u.position.copy(this.worldPosition),u.scale.set(1,1,1).multiplyScalar(s),"helper"!==u.tag){if(u.quaternion.copy(i),"translate"===this.mode||"scale"===this.mode){var d=.99,h=.2,p=0;e.dontHideWhenFaceCamera||("X"!==u.name&&"XYZX"!==u.name||Math.abs(le.copy(fe).applyQuaternion(i).dot(this.eye))>d&&(u.scale.set(1e-10,1e-10,1e-10),u.visible=!1),"Y"!==u.name&&"XYZY"!==u.name||Math.abs(le.copy(me).applyQuaternion(i).dot(this.eye))>d&&(u.scale.set(1e-10,1e-10,1e-10),u.visible=!1),"Z"!==u.name&&"XYZZ"!==u.name||Math.abs(le.copy(ve).applyQuaternion(i).dot(this.eye))>d&&(u.scale.set(1e-10,1e-10,1e-10),u.visible=!1),"XY"===u.name&&Math.abs(le.copy(ve).applyQuaternion(i).dot(this.eye))<h&&(u.scale.set(1e-10,1e-10,1e-10),u.visible=!1),"YZ"===u.name&&Math.abs(le.copy(fe).applyQuaternion(i).dot(this.eye))<h&&(u.scale.set(1e-10,1e-10,1e-10),u.visible=!1),"XZ"===u.name&&Math.abs(le.copy(me).applyQuaternion(i).dot(this.eye))<h&&(u.scale.set(1e-10,1e-10,1e-10),u.visible=!1));var f=!1;le.copy(ve).applyQuaternion(i).dot(this.eye)<p&&(f=!0),-1!==u.name.search("X")&&(le.copy(fe).applyQuaternion(i).dot(this.eye)<p?(u instanceof THREE.Fatline?u.geometry=q["x-"]:u.scale.x*=-1,this.parent.object&&u.position.add(new THREE.Vector3(-this.parent.object.width/2,0,f||"XYZX"==u.name?0:this.parent.object.depth).applyQuaternion(u.quaternion))):(u instanceof THREE.Fatline&&(u.geometry=q["x+"]),this.parent.object&&u.position.add(new THREE.Vector3(this.parent.object.width/2,0,f||"XYZX"==u.name?0:this.parent.object.depth).applyQuaternion(u.quaternion)))),-1!==u.name.search("Y")&&(le.copy(me).applyQuaternion(i).dot(this.eye)<p?(u instanceof THREE.Fatline?u.geometry=q["y-"]:u.scale.y*=-1,this.parent.object&&u.position.add(new THREE.Vector3(0,-this.parent.object.height/2,f||"XYZX"==u.name?0:this.parent.object.depth).applyQuaternion(u.quaternion))):(u instanceof THREE.Fatline&&(u.geometry=q["y+"]),this.parent.object&&u.position.add(new THREE.Vector3(0,this.parent.object.height/2,f||"XYZX"==u.name?0:this.parent.object.depth).applyQuaternion(u.quaternion)))),-1!==u.name.search("Z")&&(f?u instanceof THREE.Fatline?u.geometry=q["z-"]:u.scale.z*=-1:(u instanceof THREE.Fatline&&(u.geometry=q["z+"]),this.parent.object&&u.position.add(new THREE.Vector3(0,0,this.parent.object.depth).applyQuaternion(u.quaternion))))}else"rotate"===this.mode&&(he.copy(i),le.copy(this.eye).applyQuaternion(de.copy(i).inverse()),-1!==u.name.search("E")&&u.quaternion.setFromRotationMatrix(ue.lookAt(this.eye,ce,me)),"X"===u.name&&(de.setFromAxisAngle(fe,Math.atan2(-le.y,le.z)),de.multiplyQuaternions(he,de),u.quaternion.copy(de)),"Y"===u.name&&(de.setFromAxisAngle(me,Math.atan2(le.x,le.z)),de.multiplyQuaternions(he,de),u.quaternion.copy(de)),"Z"===u.name&&(de.setFromAxisAngle(ve,Math.atan2(le.y,le.x)),de.multiplyQuaternions(he,de),u.quaternion.copy(de)));u.visible=u.visible&&(-1===u.name.indexOf("X")||this.showX),u.visible=u.visible&&(-1===u.name.indexOf("Y")||this.showY),u.visible=u.visible&&(-1===u.name.indexOf("Z")||this.showZ),u.visible=u.visible&&(-1===u.name.indexOf("E")||this.showX&&this.showY&&this.showZ),u.material._opacity=u.material._opacity||u.material.opacity,u.material._color=u.material._color||u.material.color.clone(),u.material.color.copy(u.material._color),u.material.opacity=u.material._opacity,this.enabled?this.axis&&(u.name===this.axis||this.axis.split("").some((function(e){return u.name===e}))?(u.material.opacity=1,u.material.color.lerp(new c(1,1,1),.5)):(u.material.opacity*=.25,u.material.color.lerp(new c(1,1,1),.5))):(u.material.opacity*=.5,u.material.color.lerp(new c(1,1,1),.5))}else u.visible=!1,"AXIS"===u.name?(u.position.copy(this.worldPositionStart),u.visible=!!this.axis,"X"===this.axis&&(de.setFromEuler(se.set(0,0,0)),u.quaternion.copy(i).multiply(de),Math.abs(le.copy(fe).applyQuaternion(i).dot(this.eye))>.9&&(u.visible=!1)),"Y"===this.axis&&(de.setFromEuler(se.set(0,0,Math.PI/2)),u.quaternion.copy(i).multiply(de),Math.abs(le.copy(me).applyQuaternion(i).dot(this.eye))>.9&&(u.visible=!1)),"Z"===this.axis&&(de.setFromEuler(se.set(0,Math.PI/2,0)),u.quaternion.copy(i).multiply(de),Math.abs(le.copy(ve).applyQuaternion(i).dot(this.eye))>.9&&(u.visible=!1)),"XYZE"===this.axis&&(de.setFromEuler(se.set(0,Math.PI/2,0)),le.copy(this.rotationAxis),u.quaternion.setFromRotationMatrix(ue.lookAt(ce,le,me)),u.quaternion.multiply(de),u.visible=this.dragging),"E"===this.axis&&(u.visible=!1)):"START"===u.name?(u.position.copy(this.worldPositionStart),u.visible=this.dragging):"END"===u.name?(u.position.copy(this.worldPosition),u.visible=this.dragging):"DELTA"===u.name?(u.position.copy(this.worldPositionStart),u.quaternion.copy(this.worldQuaternionStart),re.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),re.applyQuaternion(this.worldQuaternionStart.clone().inverse()),u.scale.copy(re),u.visible=this.dragging):(u.quaternion.copy(i),this.dragging?u.position.copy(this.worldPositionStart):u.position.copy(this.worldPosition),this.axis&&(u.visible=-1!==this.axis.search(u.name)))}b.prototype.updateMatrixWorld.call(this)}};_.prototype=Object.assign(Object.create(b.prototype),{constructor:_,isTransformControlsGizmo:!0});var S=function(e){g.call(this,new E(1e4,1e4,2,2),new y({color:"#ff0000",visible:!1,wireframe:!0,side:d,transparent:!0,opacity:.6})),this.type="TransformControlsPlane";var t=new k(1,0,0),i=new k(0,1,0),n=new k(0,0,1),o=new k,a=new k,r=new k,s=new v,l=new T;this.updateMatrixWorld=function(){var e=this.space;switch(this.parent.intersect?this.position.copy(this.parent.intersect.position):this.position.copy(this.worldPosition),"scale"===this.mode&&(e="local"),t.set(1,0,0).applyQuaternion("local"===e?this.worldQuaternion:l),i.set(0,1,0).applyQuaternion("local"===e?this.worldQuaternion:l),n.set(0,0,1).applyQuaternion("local"===e?this.worldQuaternion:l),r.copy(i),this.mode){case"translate":case"scale":switch(this.axis){case"X":r.copy(this.eye).cross(t),a.copy(t).cross(r);break;case"Y":r.copy(this.eye).cross(i),a.copy(i).cross(r);break;case"Z":r.copy(this.eye).cross(n),a.copy(n).cross(r);break;case"XY":a.copy(n);break;case"YZ":a.copy(t);break;case"XZ":r.copy(n),a.copy(i);break;case"XYZ":case"E":default:a.set(0,0,0);break}break;case"rotate":default:a.set(0,0,0)}0===a.length()?this.quaternion.copy(this.cameraQuaternion):(s.lookAt(o.set(0,0,0),a,r),this.quaternion.setFromRotationMatrix(s)),b.prototype.updateMatrixWorld.call(this)}};S.prototype=Object.assign(Object.create(g.prototype),{constructor:S,isTransformControlsPlane:!0}),t["a"]=R},"0bc0":function(e,t,i){"use strict";var n={ENTER:"billboard.enter",LEAVE:"billboard.leave",OPENING:"billboard.opening",OPENED:"billboard.open",CLOSING:"billboard.closing",CLOSED:"billboard.closed",ACTIVATING:"billboard.activating",ACTIVATE:"billboard.activate"};t["a"]=n},"0bef":function(e,t,i){"use strict";var n=i("4f5a"),o=i.n(n);o.a},"0c20":function(e,t,i){"use strict";var n={green:new THREE.Color("#00c8ae"),lightGreen:new THREE.Color("#09e1c0"),zhiBlue:new THREE.Color(0,.458,.862),newBlue:new THREE.Color(4967932),altBlue:new THREE.Color(47355),tagDefault:new THREE.Color(223357),classicBlue:new THREE.Color(53759),mpYellow:new THREE.Color(16502016),mpOrange:new THREE.Color(16428055),mpBlue:new THREE.Color(12096),mpLtGrey:new THREE.Color(13751252),mpDkGrey:new THREE.Color(10000019),mpRed:new THREE.Color(12525854),mpOrangeDesat:new THREE.Color(16764529),mpBlueDesat:new THREE.Color(4034734),mpRedDesat:new THREE.Color(14705505),white:new THREE.Color(16777215),black:new THREE.Color(0),_desat:function(e,t){var i=t||.3,n=(new THREE.Color).copy(e).getHSL({h:0,s:0,l:0});return(new THREE.Color).setHSL(n.h,n.s*(1-i),n.l)},_darken:function(e,t){var i=t||.2,n=e.getHSL({h:0,s:0,l:0});return(new THREE.Color).setHSL(n.h,n.s,n.l*(1-i))}};t["a"]=n},"0ddb":function(e,t,i){"use strict";var n=i("541a"),o={getCubemapUrls:function(e,t,i){var n=[0,1,2,3,4,5];return n.map(function(n,o){return e.get("pan/"+i+"/"+t+"_skybox"+r(n)+".jpg")}.bind(this))},mapFaceToCubemapFace:function(e){var t={0:n["a"].GL_TEXTURE_CUBE_MAP_POSITIVE_Y,1:n["a"].GL_TEXTURE_CUBE_MAP_POSITIVE_Z,2:n["a"].GL_TEXTURE_CUBE_MAP_POSITIVE_X,3:n["a"].GL_TEXTURE_CUBE_MAP_NEGATIVE_Z,4:n["a"].GL_TEXTURE_CUBE_MAP_NEGATIVE_X,5:n["a"].GL_TEXTURE_CUBE_MAP_NEGATIVE_Y};return t[e]}};t["a"]=o},1158:function(e,t,i){"use strict";var n={linearTween:function(e,t,i,n){return i*e/n+t},easeInQuad:function(e,t,i,n){return e/=n,i*e*e+t},easeOutQuad:function(e,t,i,n){return e/=n,-i*e*(e-2)+t},easeInOutQuad:function(e,t,i,n){return e/=n/2,e<1?i/2*e*e+t:(e--,-i/2*(e*(e-2)-1)+t)},easeInCubic:function(e,t,i,n){return e/=n,i*e*e*e+t},easeOutCubic:function(e,t,i,n){return e/=n,e--,i*(e*e*e+1)+t},easeInOutCubic:function(e,t,i,n){return e/=n/2,e<1?i/2*e*e*e+t:(e-=2,i/2*(e*e*e+2)+t)},easeInQuart:function(e,t,i,n){return e/=n,i*e*e*e*e+t},easeOutQuart:function(e,t,i,n){return e/=n,e--,-i*(e*e*e*e-1)+t},easeInOutQuart:function(e,t,i,n){return e/=n/2,e<1?i/2*e*e*e*e+t:(e-=2,-i/2*(e*e*e*e-2)+t)},easeInQuint:function(e,t,i,n){return e/=n,i*e*e*e*e*e+t},easeOutQuint:function(e,t,i,n){return e/=n,e--,i*(e*e*e*e*e+1)+t},easeInOutQuint:function(e,t,i,n){return e/=n/2,e<1?i/2*e*e*e*e*e+t:(e-=2,i/2*(e*e*e*e*e+2)+t)},easeInSine:function(e,t,i,n){return-i*Math.cos(e/n*(Math.PI/2))+i+t},easeOutSine:function(e,t,i,n){return i*Math.sin(e/n*(Math.PI/2))+t},easeInOutSine:function(e,t,i,n){return-i/2*(Math.cos(Math.PI*e/n)-1)+t},easeInExpo:function(e,t,i,n){return i*Math.pow(2,10*(e/n-1))+t},easeOutExpo:function(e,t,i,n){return i*(1-Math.pow(2,-10*e/n))+t},easeInOutExpo:function(e,t,i,n){return e/=n/2,e<1?i/2*Math.pow(2,10*(e-1))+t:(e--,i/2*(2-Math.pow(2,-10*e))+t)},easeInCirc:function(e,t,i,n){return e/=n,-i*(Math.sqrt(1-e*e)-1)+t},easeOutCirc:function(e,t,i,n){return e/=n,e--,i*Math.sqrt(1-e*e)+t},easeInOutCirc:function(e,t,i,n){return e/=n/2,e<1?-i/2*(Math.sqrt(1-e*e)-1)+t:(e-=2,i/2*(Math.sqrt(1-e*e)+1)+t)},easeInElastic:function(e,t,i,n){var o=1.70158,a=0,r=i;return 0===e?t:1===(e/=n)?t+i:(a||(a=.3*n),r<Math.abs(i)?(r=i,o=a/4):o=a/(2*Math.PI)*Math.asin(i/r),-r*Math.pow(2,10*(e-=1))*Math.sin((e*n-o)*(2*Math.PI)/a)+t)},easeOutElastic:function(e,t,i,n){var o=1.70158,a=0,r=i;return 0===e?t:1===(e/=n)?t+i:(a||(a=.3*n),r<Math.abs(i)?(r=i,o=a/4):o=a/(2*Math.PI)*Math.asin(i/r),r*Math.pow(2,-10*e)*Math.sin((e*n-o)*(2*Math.PI)/a)+i+t)},easeInOutElastic:function(e,t,i,n){var o=1.70158,a=0,r=i;return 0===e?t:2===(e/=n/2)?t+i:(a||(a=n*(.3*1.5)),r<Math.abs(i)?(r=i,o=a/4):o=a/(2*Math.PI)*Math.asin(i/r),e<1?r*Math.pow(2,10*(e-=1))*Math.sin((e*n-o)*(2*Math.PI)/a)*-.5+t:r*Math.pow(2,-10*(e-=1))*Math.sin((e*n-o)*(2*Math.PI)/a)*.5+i+t)},easeInBack:function(e,t,i,n,o){return void 0===o&&(o=1.70158),i*(e/=n)*e*((o+1)*e-o)+t},easeOutBack:function(e,t,i,n,o){return void 0===o&&(o=1.70158),i*((e=e/n-1)*e*((o+1)*e+o)+1)+t},easeInOutBack:function(e,t,i,n,o){return void 0===o&&(o=1.70158),(e/=n/2)<1?i/2*(e*e*((1+(o*=1.525))*e-o))+t:i/2*((e-=2)*e*((1+(o*=1.525))*e+o)+2)+t},easeOutBounce:function(e,t,i,n){return(e/=n)<1/2.75?i*(7.5625*e*e)+t:e<2/2.75?i*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?i*(7.5625*(e-=2.25/2.75)*e+.9375)+t:i*(7.5625*(e-=2.625/2.75)*e+.984375)+t},easeInBounce:function(e,t,i,o){return i-n.easeOutBounce(o-e,0,i,o)+t},easeInOutBounce:function(e,t,i,o){return e<o/2?.5*n.easeInBounce(2*e,0,i,o)+t:.5*n.easeOutBounce(x,2*e-o,0,i,o)+.5*i+t}};t["a"]=n},"15d7":function(e,t,i){"use strict";var n=i("7f9b"),o=i.n(n);o.a},1787:function(e,t,i){"use strict";i.r(t);var n=i("d9c2"),o=i("b775"),a=i("9ef6"),r={data:{},load:function(e,t,i,s){var l=r.data[e];return s&&s.force||!l?(l=new THREE.Texture,s&&s.antialias&&!n["a"].isMobile()?(l.minFilter=THREE.LinearMipMapLinearFilter,l.magFilter=THREE.LinearMipMapLinearFilter):(l.minFilter=THREE.LinearFilter,l.magFilter=THREE.LinearFilter),a["a"].minimalMemoryMode&&(l.generateMipmaps=!1),l.sourceFile=e,r.data[e]=l,o["a"].loadImage(e).then((function(e){l.image=e,l.needsUpdate=!0,t&&t(l)})).fail((function(e){console.error(e)})),l):(t&&setTimeout((function(){t(l)}),1),l)},loadBase64:function(e,t){t=t||"png";var i=new THREE.Texture;return i.image=document.createElement("img"),i.image.setAttribute("src","data:image/"+t+";base64,"+e),a["a"].minimalMemoryMode&&(i.minFilter=THREE.LinearFilter,i.magFilter=THREE.LinearFilter,i.generateMipmaps=!1),i.needsUpdate=!0,i},isLoaded:function(e){return!!r.data[e]}};r.getTexture=function(){var e=new THREE.TextureLoader;return e.setCrossOrigin("Anonymous"),e.crossOrigin=!0,function(t,i,n,o){return e.load(t,i,n,o)}}(),t["default"]=r},1970:function(e,t,i){"use strict";i.d(t,"a",(function(){return h}));i("6b54"),i("2397"),i("ac6a"),i("5df3"),i("f400");var n=i("d4ec"),o=i("bee2"),a=i("262e"),r=i("99de"),s=i("7e84"),l=i("f121"),c=i("d9c2");function u(e){var t=d();return function(){var i,n=Object(s["a"])(e);if(t){var o=Object(s["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(r["a"])(this,i)}}function d(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var h=function(e){Object(a["a"])(i,e);var t=u(i);function i(){var e;return Object(n["a"])(this,i),e=t.call(this),e.video=null,e.videos=new Map,e}return Object(o["a"])(i,[{key:"addVideo",value:function(e){var t=this._createVideoElement(this._getVideoPath(e));return this.videos.set(e,t),t}},{key:"getVideo",value:function(e){var t=this.videos.get(e);return t||(t=this.addVideo(e)),t}},{key:"_getVideoPath",value:function(e){return l["a"].getPublicResource("images/images#m#/overlay"+e+".mp4?m="+l["a"].version)}},{key:"_createVideoElement",value:function(e){var t=document.createElement("video");return t.setAttribute("crossOrigin","anonymous"),t.setAttribute("playsinline","true"),t.setAttribute("x5-playsinline","true"),t.setAttribute("webkit-playsinline","true"),t.setAttribute("x5-video-player-type","h5"),t.setAttribute("controls","true"),t.autoplay=!0,t.muted=!0,t.loop=!0,t.src=e,t.style.position="fixed",t.style.left="0",t.style.top="0",t.style.zIndex="1000",t.style.width="300px",t.style.height="300px",t.style.display=c["a"].urlHasValue("debug")?"block":"none",t}}]),i}(EventEmitter)},"1ded":function(e,t){e.exports={menu:{__name:"菜单",music:"背景音乐",base:"基础设置",information:"场景信息",screen:"初始画面",hotspot:"添加热点",guide:"自动导览",sign:"地面Logo",walk:"漫游可行",model:"3D模型",cad:"户型图",data:"数据对接",custom:"上传下载",videos:"添加视频",virtual:"场景视频",vrhouse:"看房 4Dkankan",business:"看店 4Dkankan",scene:"场景跳转",video:"添加视频",decor:"一键换装",link:"场景关联"},modules:{__name:"模块",base:{__name:"基础设置",qrcode:"场景二维码",qrcode_download:"下载二维码",qrcode_tips:"自定义logo",scene_link:"场景地址",scene_link_copy:"复制链接",scene_link_copy_tips:"场景链接复制成功",bgm:"背景音乐",pano_text:"漫游视角可视",mode_2d_text:"平面图可视",mode_3d_text:"三维模型可视",map_text:"小地图预览可视",vr_text:"VR模式可视",vr_tips:"请在手机展示页面观看VR效果",guide_text:"自动导览可视",rule_text:"标尺可视",cad_text:"俯视图户型可视",measure_text:"测量工具可视",measure_tips:"编辑模式下无法使用测距功能,请在展示页面操作",turned_vr:"VR功能已{status}",turned_map:"小地图功能已{status}",turned_cad:"俯视图户型功能已{status}",turned_m2d:"平面视角功能已{status}",turned_m3d:"三维视角功能已{status}",turned_pano:"漫游视角功能已{status}",turned_rule:"标尺功能已{status}",turned_guide:"自动导览功能已{status}",turned_measure:"测距功能已{status}",shortcut_copy:"一键复制",share_link:"分享链接给好友",measure_show_tips:"请在展示页面使用测距功能",delete_measure_line:"删除测量线",please_click_tips:"'请点击“允许”'",vr_fail_app_tips:"浏览器未能检测到转动。请在手机或浏览器设置中开启了运动和方向访问等设置,然后刷新此页面。",vr_fail_safari_tips:"浏览器未能检测到转动。为完整体验VR效果,请打开 “设置” > “Safari” > “隐私和安全” 下的 “运动和方向访问” 开关,然后刷新此页面。",loading_bottom_text:"四维时代提供技术支持",vr_fail_reopen_tips:"运动和方向访问失败。您需要完全关闭此应用,然后再次打开,并允许访问运动与方向",add_music_title:"添加背景音乐",add_music_tips:"支持MP3、WAV等音频格式,不超过5MB",re_add_music:"重新添加",re_add_title:"重新添加背景音乐",re_add_tips:"新添加的音乐会替换已添加的音乐,<br>确定继续添加吗?",re_add_mobile_tips:"重新添加将会覆盖已添加音乐",delete_tips:"您确定删除当前音乐吗?",delete_title:"删除背景音乐",bgm_empty_tips:"请选择背景音乐",wechat:"微信",friend_circle:"朋友圈"},information:{__name:"场景信息",title:"标题",title_tips:"请填写标题",title_require:"请添加标题({limit}字以内)",description:"简介",description_tips:"请填写简介",link:"添加链接",link_text_tips:"请填写链接文本",link_href_tips:"请填写链接地址",link_text_require:"请填写链接文本",link_href_require:"请填写链接地址",classify:"分类",upload_time:"上传时间",record:"未记录",shoot_count:"拍摄数量",password:"访问密码",password_tips:"访问密码",password_desc:"设置完密码后,当其他人访问您的场景时,需要输入您设置的密码才能访问。如无需设置点击“公开”即可。",password_require:"请输入{limit}位数的密码",logo_edit:"编辑页面Logo",logo_exit:"退出页面Logo编辑",logo_show_bottom:"显示初始Logo",logo_style1:"顶部Logo-方",logo_style2:"顶部Logo-长",logo_delete:"是否删除已上传Logo?"},screen:{__name:"初始画面",current:"当前初始视角",current_set:"设置为初始画面",tips:"移动屏幕,点击保存您的初始画面。"},hotspot:{__name:"添加热点",add:"添加热点",edit:"编辑热点",count:"已添加热点",location:"热点定位",location_tips:"将热点标记并拖动到合适的位置。",location_modify:"修改热点位置",location_confirm:"确定热点位置",location_desc:"请于左方两个场景区域拖动热点并对准所需标记的位置。",style:"选择热点样式",style_desc:"选择默认样式,或者手动上传图片自定义样式,上传图片格式PNG/JPG",style_name:"样式",style_dele:"是否删除该样式?",style_manage:"管理",style_exit:"退出",media_photo:"可添加图片以丰富热点内容",media_video:"可上传本地视频,进行更多的展示",media_voice:"可上传本地音频内容进行热点讲解",media_link:"可添加视频的超链接,视频将在热点里播放",title:"标题",title_tips:"请填写标题",title_require:"请添加标题({limit}字以内)",description:"简介",description_tips:"请填写简介",text_link:"添加链接",text_link_text_tips:"请填写链接文本",text_link_href_tips:"请填写链接地址",text_link_text_require:"链接文本不能为空",text_link_href_require:"链接地址不能为空",link:"嵌入式链接",link_require:"请添加外链",photo:"图片",voice:"音频",video:"视频",photo_tips:"支持JPG、PNG等图片格式,不超过{size}MB",voice_tips:"支持MP3、WAV等音频格式,不超过{size}MB",video_tips:"支持MP4、MOV等视频格式,不超过{size}MB",photo_require:"请添加图片",voice_require:"请添加音频",video_require:"请添加视频",m_location_tips1:"将上下分屏热点对准同一个所标记目标",m_location_tips2:"确定热点位置,点击下一步编辑内容",m_location_up:"上方",m_location_left:"左侧",m_location_move_tips:"辅助校准位置可能不准确,<br>请检查并拖动到{direction}相同位置",set_visible_btn:"设置热点可视",save_visible_btn:"保存当前设置",save_hotspot_done:"保存热点成功",save_hotspot_fail:"保存热点失败",delete_hotspot_tips:"是否删除当前热点?",delete_hotspot_done:"热点删除成功",delete_hotspot_fail:"热点删除失败",cant_add_hotspot_tips:"无法添加热点",cant_add_hotspot_content:"热点数目已达最大:{limit}",link_text_tips:"链接标题",link_href_tips:"链接",link_text_require:"请填写链接文本",link_href_require:"请填写链接地址",add_media:"添加多媒体"},guide:{__name:"自动导览",route:"导航路线",view:"切换视角",record:"开始录制",record_audio:"录音",pause:"暂停",stop:"停止",end:"结束",delete:"删除",continue:"继续录制",preview:"预览",clear:"清空",sync:"声画同步",sound:"录制音频",file:"上传音频",file_add:"添加音频",tips:"点击开始录制导览",start:"开始",finish:"完成录制",less:"小于",replace_tips:"是否重新录制导览?",replace_content:"重新录制将覆盖之前的数据",sound_open_fail_tips:"麦克风开启失败",sound_tips:"麦克风开启失败,是否继续录制?",sound_content:"您需要在浏览器的设置中允许此网站使用麦克风,并且添加麦克风设备,然后刷新该页面。",upload_sound_done:"上传语音讲解成功",upload_sound_fail:"上传语音讲解失败",delete_sound_done:"删除语音讲解成功",delete_sound_fail:"删除语音讲解失败",room_title:"标题",room_title_tips:"请输入导览标题",room_title_require:"请输入标题",room_panel_title:"导览信息",room_sound_title:"录制音频",delete_video_content:"您当前录制的画面将会被删除",delete_file_content:"您当前上传的语音讲解将会被删除",delete_sound_content:"已录制配音将会被删除",camera_save_success:"镜头保存成功",clear_video_tip:"您当前录制的内容将会被清空",saving_sound:"正在保存录音",save_sound_done:"录音保存成功",save_sound_fail:"录音保存失败",no_sound_tips:"当前不支持录音<br>可在微信或电脑端录音",sound_success_tips:"麦克风开启成功",sound_fail_tips:"当前不支持录音<br>公众号信息配置错误",wechat_sound_fail_tips:"微信麦克风开启失败",open_sound_guide_tips:"可能您若要开启录音,请于微信的设置—隐私—授权管理中开启。且保证录音设备正常",sound_cant_open_tips:"此浏览器不支持录音。<br>建议更换其他主流浏览器,体验更佳",replace_sound_tips:"是否重新录制?",replace_sound_content:"已有语音讲解将会被替换",merge_sound_fail:"合并语音讲解失败",sound_limit:"录制时长为{time}分钟,当前已经达到上限",select_to_record:"请选择对应点位进行本区域的导览录制"},sign:{title:"Logo样式",size:"Logo大小",style0:"样式一",style1:"样式二",style2:"样式三",style3:"手动上传"},walk:{title:"漫游可行",tips1:"通过设置漫游可行,进一步优化在漫游时出现的体验;例如,您在漫游时,出现穿透房间的情况。",tips2:"通过点选各个漫游点的连线即可设置漫游点的可行性。",save:"保存当前设置",hide:"隐藏该点位置",show:"显示该点位置",pano_tips:"提示:您隐藏了初始画面点位,此操作将使进入场景后无法漫游。",legends_title:"图例",legends_show_curr_tips:"配置漫游点",legends_selected_tips:"漫游可行",legends_unselected_tips:"未选中",legends_hide_unselected_tips:"已隐藏",legends_m_title:"多楼层",legends_m_connect_tips:"楼层连接点"},model:{__name:"3D模型",cad:"CAD视角",cad_download:"平面图下载",view:"切换视角",title:"增添结构",title_door:"门窗类",title_component:"构建类",title_other:"其他",attribute:"属性",door:"门",double_door:"门",slideDoor:"移门",casement:"窗",bayCase:"飘窗",groundCase:"落地窗",column:"柱子",furnColumn:"框架柱",furnFlue:"烟道",point:"点",line:"墙",tagging:"标注",tagging_name_tips:"请输入名称",tagging_area_tips:"输入面积,支持小数点后面两位",direction:"指南针",wallLine:"墙属性",widget_delete:"{widget}将被删除",panel_btn_default:"恢复默认",panel_btn_delete:"删除部件",attr_img:"封面(暂未开放显示)",attr_enter_btn:"设置封面",attr_out_btn:"退出",attr_not_select_img:"请先选择名称",attr_un_img:"暂无图片",attr_angle:"旋转角度",attr_within:"翻转",attr_direWithin:"进入方向",attr_ewidth:"宽度",attr_eheight:"高度",attr_tick:"厚度",attr_showTitle:"名称",attr_showContent:"面积",attr_top:"顶部",attr_bottom:"底部",attr_estart:"入户门",success:"成功添加{widget}",error_location:"当前位置无法添加{widget}",error_outdoor:"户外无法添加{widget}",error_something:"当前位置点有建筑,无法添加{widget}",error_widget:"当前位置不可添加{widget}",enter_adjust_floor:"进入地面高度调节模式",exit_adjust_floor:"退出地面高度调节模式",color_title:"量角器颜色:"},cad:{__name:"户型图",name:"户型图",no_tip:"不再提示",reset:"重置",cad_download:"户型图下载",cad_download_ing:"下载中…",label_tip:"点击右键或Esc键可以退出添加标注。",wall_tip:"点击右键或Esc键可以退出画墙。",save_undf_tip:"数据为空,无法保存空户型图。",reload_tip:"即将导入由模型生成的户型图,此操作会清空所有户型,是否继续?",reset_tip:"此操作会清空现有户型,是否继续?",title_door:"门窗",title_component:"构建",title_wall:"画墙",title_other:"标注",border_wall:"外墙",doorleaf:"垭口",wall:"内墙",attribute:"属性",door:"门",slideDoor:"移门",doubleDoor:"双开门",casement:"窗",bayCase:"飘窗",groundCase:"落地窗",column:"柱子",furnColumn:"框架柱",furnFlue:"烟道",point:"点",stair:"楼道",line:"墙",tagging:"单个",un_data_tip:"无法下载空户型图,请先绘制。",taggings:"多个",tagging_name_tips:"请输入名称",tagging_custom_name_tips:"自定义房间名称",tagging_area_tips:"输入面积,支持小数点后面两位",direction:"指南针",wallLine:"墙属性",widget_delete:"{widget}将被删除",panel_btn_default:"恢复默认",panel_btn_delete:"删除部件",attr_angle:"旋转角度",attr_within:"翻转",attr_ewidth:"宽度",attr_eheight:"高度",attr_direWithin:"进入方向",attr_tick:"厚度",attr_showTitle:"名称",attr_showContent:"面积",attr_top:"顶部",attr_bottom:"底部",attr_estart:"入户门",success:"成功添加{widget}",error_location:"当前位置无法添加{widget}",error_outdoor:"户外无法添加{widget}",error_something:"当前位置点有建筑,无法添加{widget}",error_widget:"当前位置不可添加{widget}",enter_adjust_floor:"进入地面高度调节模式",exit_adjust_floor:"退出地面高度调节模式",color_title:"量角器颜色:",hall_tests:"玄关,主卫,过道,客卫,厨房,车库,花园,阳台",room_tests:"主卧,次卧,书房,储物间,衣帽间,老人房,儿童房,宠物房",other_tests:"客厅,餐厅",rotate:"旋转",rotate_ing:"旋转中…",floor_name_tips:"请输入楼层名称",show_image:"显示底图",show_panos:"显示漫游点位"},videos:{__name:"添加视频",tips:"请先点击场景的基准面,确定视频位置",panel_title:"视频属性",panel_preview:"预览",panel_upload:"上传视频",panel_upload_tips:"支持MP4视频格式",panel_move:"位移",panel_zoom:"缩放",panel_thickness:"厚度",recoverRatio:"恢复原始比例",recoverRatioTip:"恢复视频文件原始长宽比",upload_tips:"请上传视频"},custom:{model_title:"模型下载",uploading:"文件上传中...",download:"原始模型下载",download_panos:"下载点位图",upload:"修改模型上传",title1:"模型下载/上传功能教程",repairTitle:"当球幕视频播放有色差时,可以使用 <i class='iconfont iconfloor_rename'></i> 修复功能进行优化。如果需要对有色差的视频下载剪辑,请先修复视频后再下载剪辑,否则无法生效。",tips11:"1.下载场景模型的压缩包后,使用三维软件打开解压后文件“mesh.obj”,即可开展编辑;",tips12:"2.编辑完成后,建议将模型贴图进行烘焙,烘焙贴图需控制在1.5M以内,同时,保存的obj文件需要控制在3M以内;",tips13:"3.完成1、2步骤后,将obj,mtl,贴图打包为zip压缩包上传即可。",title2:"注:",tips21:"1.请尽量控制文件大小,以免浏览的时候卡顿,影响体验。",tips22:"2.请将obj及压缩包的名称保持一致,否则会替换失败。",get_image_fail:"获取贴图失败,可能网络状态不佳,请检查您的网络设置并重新尝试。",download_model_fail:"模型下载失败",reupload_tips:"上传后点击保存并发布生效",panoramic_upload:"全景照片上传",panoramic_upload_tips:"上传后点击“保存并发布”即生效",panoramic_upload_box_tips:"请上传对应点位名称的JPG图片",panoramic_download:"全景照片下载",panoramic_download_tips:"请勿修改照片名称和格式",panoramic:"全景图片",ball_video:"球幕视频",ball_video_upload_tips:"上传后点击“保存并发布”即生效",ball_video_download_tips:"请勿修改视频名称和格式",ball_video_upload_box_tips:"球幕视频支持MP4格式,不超过1024M",upload_title:"上传文件",upload_format_error:"文件格式错误,请重新上传",upload_name_error:"文件名称错误,请重新上传",upload_success:"上传成功,保存并发布后才能生效",upload_code_5017:"上传模型失败,请参照右侧教程",upload_code_5018:"zip文件只能有一层目录或无目录",upload_code_5019:"必须有且仅有一个obj和mtl文件",upload_code_5020:"贴图需控制在1.5M以内,obj文件需要控制在20M以内。",upload_code_5012:"数据不正常",upload_code_5023:"上传文件格式不正确,只能是jpg或mp4格式",download_tips:"下载后名称与格式请勿修改",download_fail:"下载失败",yes:"是",no:"否",repair:"修复",repair_cancel:"取消",repairing:"修复中...",repair_complete_text:"球幕视频【{video_name}】已修复完成,请点击刷新后查看。",refresh_now:"立即刷新",hasPreson_text:"视频中是否有拍摄人物?",click_repair:"请点击【修复】",wait_repair:"等待修复",repair_tip_text:"请拖动虚线框的边缘,调整其大小将人物包含在内,确认整段视频中人物均在虚线框内后点击【修复】",repair_confirm_title:"请确认人物已在虚线框内",repair_confirm_text:"修复后不可撤销,请确认整段视频中,人物均在虚线框内,点击【确认】后将立即开始修复。",check_back:"返回检查",confirm_repair:"确认",check_confirm:"确认修复?",cancel_repair:"取消",repairing_time:"球幕视频【{video_name}】正在后台修复,请耐心等待"},vrhouse:{__name:"VR看房",linkto_management:"前往看房管理后台",refer:"刷新",scene_link:"场景链接"},business:{__name:"商圈模块",list_title:"场景热点列表",list_unf:"当前场景没有热点",add_tip_info:"请在场景中添加热点后,再绑定热点",linkto_management:"前往看店管理后台",refer:"刷新",scene_link:"场景链接",explain:"说明",shopexplain:{1:"当前商品数据来源于场景绑定的4DKanKan店铺商品数据,如需增加请点击",2:"此处跳转"},select_style:"选择热点样式",join_info:"关联商品信息",add_com:"添加商品",join_info_show:"关联商品会在热点中展示",select_com:"选择商品"},link:{__name:"跳转关联",title1:"锁定关联点",title2:"编辑关联点",title3:"全景图关联",list_text:" 已关联场景({l_count}), 全景图({p_count})",btn_new_text:"添加关联点",btn_add_title:"关联点定位",btn_add_text:"确定关联点位置",btn_add_desc:"将关联点标记并拖动到合适的位置。",btn_edit_text:"修改关联点位置",style:"关联点样式",style_name:"样式",style_desc:"支持自定义图标,建议尺寸为128x128 像素,格式为jpg/png。",style_dele:"是否删除该样式?<br />如该样式在其它关联点使用,也将被删除",desc_title:"描述",desc_tips:"请输入描述内容",desc_require:"请输入描述内容",type:"选择关联类型",type_photo:"支持上传宽高比为2:1的单张全景图片,建议像素不小于6000x3000像素,文件不超过120M。",type_photo_require:"请上传全景图",type_link:"请输入目标场景链接",type_link_tips:"http(s)://",type_link_require:"请输入需要跳转的场景链接",enter_title:"进入画面",enter_require:"请设置进入画面",enter_btn_text:"设置进入画面",outer_title:"跳出点位置",outer_style:"跳出点样式",outer_desc:"支持自定义图标,建议尺寸为128x128像素,格式为jpg/png。",outer_require:"请设置跳出点位置",outer_btn_text:"设置跳出点位置",links_title:"选择全景图",links_tips:"选择全景图,拖动到左侧画面相应位置,进行跳转设置。",links_cancel_tips:"取消关联设置"},virtual:{add:"添加场景视频",list_title:"已添加场景视频",panel_title:"视频属性",pano_id:"漫游点ID",pano_hide_tips:"该漫游点已设置隐藏,无法编辑",panel_upload:"上传视频",remark:"注:视频要求背景透明的WEBM格式,大小不超过50MB,且分辨率在2048*2048以内",file_error:"视频文件格式不正确,只支持WEBM格式,请重新上传。",pano_has_video:"该漫游点已存在球幕视频,不允许新增",pano_has_virtual:"该漫游点已存在场景视频,不允许新增"}},login:{__name:"登录",title:"提示",login:"去登录",logon:"登录完毕,继续",login_tips:"您没有登录,请于主页登录后再编辑"},common:{__name:"公用",on:"打开",off:"关闭",add:"添加",set:"确定",ok:"确定",save:"保存",cancel:"取消",complete:"完成",all:"全部",edit:"修改",giveup:"放弃",commit:"提交",photo:"图片",voice:"音频",video:"视频",bgm:"音乐",crop:"裁剪",upload:"上传",download:"下载",change:"更改",unnamed:"未命名",publish:"保存并发布",publish_text:"保存并发布成功!",publish_tips:"是否立刻前往观看您的场景?",publish_btn_ok:"立刻前往",publish_btn_no:"暂时不去",public:"公开",private:"加密",waiting:"请稍等...",audio:"音频",second:"秒",delete:"删除",prev:"上一步",next:"下一步",meter:"约{meter}米",guide:"导览",rule:"测量工具",roaming:"漫游",continue:"继续",ensure_delete:"确定删除",text_limit:"限制{limit}字内",default:"默认",custom:"自定义",back:"返回",will_delete:"将被删除",setup:"设置",exit:"退出",size:"大小",floor:"楼层",rename:"重命名",buyvip:"立即购买",buyvip_expired:"前往续费",buyvip_tips:"会员权益功能,请您确保拍摄该场景的相机已授<br>权有效会员权益。",buyvip_expired_tips:"您的会员权益已过期,您可在续费后继续<br>使用该功能。",vip_transition_tips:"自2021年9月1日起,将正式推出会员权益,未购买会员权益将无法继续体验自定义 LOGO 功能,请点击查看详情了解更多会员特权。",music:{__name:"背景音乐",none:"无",cheerfu:"欢快",ethereal:"空灵",rhythmic:"节奏",nostalgic:"怀旧",missing:"想念",retro:"复古",strings:"琴弦",happy:"愉快"},category:{__name:"分类",museum:"文博",estate:"地产",eshop:"商圈",catering:"餐饮",other:"其它"},uploads:{__name:"文件上传",uploading:"上传中",uploaded:"已上传",wait:"等待上传...",error:"上传出错",add:"添加文件",start:"开始上传",file_require:"请添加文件",file_error:"格式不正确",cant_upload:"您的浏览器不支持上传文件",not_support:"您选择的不是浏览器支持的{fileType}文件,请重新选择",too_large:"文件过大,不能大于{size}MB",too_large_reupload_tips:"上传视频过大,请重新上传"},tips:{__name:"提示",wait:"请等待..."}},tips:{__name:"弹窗、提示",title:"提示",title2:"温馨提示",info:"查看详情",used:"继续使用",noremind:"不再提醒",set_done:"设置成功",set_fail:"设置失败",save_done:"保存成功",save_fail:"保存失败",delete:"是否删除?",delete_done:"删除成功",delete_fail:"删除失败",upload_done:"上传成功",upload_fail:"上传失败",exception:"异常错误",network_error:"网络连接失败,请稍后再试",file_notfound:"文件不存在",scene_notfound:"场景不存在",params_notfound:"缺少必要参数",camera_notfound:"找不到该场景对应的相机",password_error:"密码错误",data_error:"数据不正常",auth_deny:"无权操作该场景",model_deny:"该场景已上传过模型,不允许编辑",clear:"是否清空?",upload_pic_fail:"上传图片失败",wait:"请稍后...",house_type_save_fail:"户型保存失败"},show:{__name:"展示页面",on:"开",off:"关",measure:"测量工具",measure_start:"起点",measure_end:"终点",measure_button:"确定{status}",location_up:"上方",location_left:"左侧",location_start_tips:"请先在{direction}点击",location_end_tips:"起点确定完毕,请定位终点",vr:"VR模式",share:"分享链接",music:"音乐 {status}",password_tips:"密码",password_require:"请输入密码",map_2d:"平面图",map_3d:"三维模型",guide:"导览",guide_play:"播放",guide_pause:"继续",switch_pano:"漫游",switch_2d:"平面",switch_3d:"三维"},components:{user_guid:{__name:"用户引导",title:"操作提示",pano:"行走<br />点击任意方向移动",rotate:"旋转视角<br />左右滑动屏幕,旋转视觉",zoom:"缩放<br />双指滑动放大或缩小视图",set:"我知道了"}},rtcLive:{openGuided:"开启导览",closeGuided:"关闭导览",openHotSpot:"开启热点",closeHotSpot:"关闭热点",createdRoom:"创建房间",browserTip:"建议使用以下最新版本的浏览器用于通话",inputName:" 请输入您的昵称",cancel:"取消",confirm:"确认",oneMode:"1V1",moreMode:"多人模式",end:"结束",endTip:"温馨提示",isEnd:"是否要立即结束带看",copyShare:"复制分享",shareTitle:"邀请好友",copySuccess:"链接复制成功",speakSome:"说点什么",member:"成员管理",leader:"主持人",customer:"我",allMuted:"全部静音",allSpeak:"全部开麦",roomFull:"房间人数已满",userJoin:"主持人进入房间",enterRoom:"进入房间",exitRoom:"退出房间",leaderLeave:"主持人已离开",leaderSetMuted:"主持人设置静音",leaderSetSpeak:"主持人设置开麦",leaderOpenPaint:"主持人开启画笔",leaderClosePaint:"主持人关闭画笔",actionSuccess:"操作成功",isRemove:"你已被移除",removeSuccess:"移除成功",cant_speakSome:"已被禁言",set_cant_speakSome:"主持人设置禁言",set_can_speakSome:"主持人已解除禁言",look:"观看",create_VR:"创建VR直播间",enter_VR:"进入VR直播间"}}},2138:function(e,t,i){"use strict";i.d(t,"a",(function(){return l}));i("ac6a");var n=i("d4ec"),o=i("cd18"),a=i("1787"),r=i("f121"),s=i("9ef6"),l=(i("6860"),function e(){Object(n["a"])(this,e)});l.prototype.load=function(e,t){function i(e,i){e||(t.push(i),d++,u.notify(d,n),d===n&&u.resolve())}if(!e.chunks[0]||!e.chunks[0].meshUrl)return $.when();var n=o["a"].countUnique(e.chunks.map((function(e){return e.textureName}))),l="";e.chunks[0].meshUrl.indexOf("_50k");var c="low";"_50k"===l&&(c="high"),s["a"].minimalMemoryMode&&"high"===c&&(browser.detectSamsungS6()?(logger.warn("Galaxy S6 cannot handle large textures, turning down quality."),c="low"):n>s["a"].maxMobileTextures&&(logger.warn("Model probably too large for mobile, turning down quality."),c="low"));e.data.job.uuid;var u=$.Deferred(),d=0,h="?m="+r["a"].getModelPost();return e.chunks.forEach((function(e){if(!e.material.map&&e.textureName){var t=r["a"].urls.meshTexture+e.textureName+h;e.setTextureMap(a["default"].load(t,i.bind(this,a["default"].isLoaded(t)),null))}})),u.promise()}},2197:function(e,t,i){"use strict";i.d(t,"b",(function(){return n})),i.d(t,"a",(function(){return o}));var n=[{text:"基础设置",icon:"icon_base",link:"/base",name:"base",hidden:!1},{text:"场景信息",icon:"icon_information",link:"/information",name:"information",hidden:!1},{text:"初始画面",icon:"icon_screen",link:"/screen",name:"screen",hidden:!1},{text:"添加热点",icon:"icon_hotpoint",link:"/hotspot",name:"hotspot",hidden:!1},{text:"自动导览",icon:"icon_auto",link:"/guide",name:"guide",hidden:!1},{text:"地面Logo",icon:"icon_sign",link:"/sign",name:"sign",hidden:!1},{text:"漫游可行",icon:"icon_walk",link:"/walk",name:"walk",hidden:!1},{text:"3D模型",icon:"icon_edit",link:"/model",name:"model",hidden:!0},{text:"户型图",icon:"icon_2d",link:"/cad",name:"cad",hidden:!1},{text:"数据对接",icon:"icontool_datadocking",link:"/data",name:"data",hidden:!1},{text:"添加视频",icon:"iconbox_video",link:"/videos",name:"videos",hidden:!1},{text:"场景视频",icon:"iconscenevideo",link:"/virtual",name:"virtual",hidden:!1},{text:"上传下载",icon:"icon_upload",link:"/custom",name:"custom",hidden:!1},{text:"场景跳转",icon:"icon_data",link:"/scene",name:"scene",hidden:!1},{text:"一键换装",icon:"icon_data",link:"/decor",name:"decor",hidden:!1},{text:"场景关联",icon:"iconjump",link:"/link",name:"link",hidden:!1},{text:"看房 4Dkankan",icon:"iconcase_logo",link:"/vrhouse",name:"vrhouse",hidden:!1},{text:"看店 4Dkankan",icon:"iconsp_kf",link:"/business",name:"business",hidden:!1}],o=[{text:"场景信息",icon:"icon_information",link:"/information",name:"information",hidden:!1},{text:"基础设置",icon:"icon_base",link:"/base",name:"base",hidden:!1},{text:"初始画面",icon:"icon_screen",link:"/screen",name:"screen",hidden:!1},{text:"背景音乐",icon:"icon_music",link:"/music",name:"music",hidden:!1},{text:"地面Logo",icon:"icon_sign",link:"/sign",name:"sign",hidden:!1},{text:"添加热点",icon:"icon_hotpoint",link:"/hotspot",name:"hotspot",hidden:!1},{text:"自动导览",icon:"icon_auto",link:"/guide",name:"guide",hidden:!1},{text:"3D模型",icon:"icon_edit",link:"/model",name:"model",hidden:!0}]},2425:function(e,t,i){e.exports=i.p+"static/img/2.c9287ece.png"},"27bc":function(e,t,i){"use strict";var n=i("7d96"),o={clampVFOV:function(e,t,i,n){var a=o.getHFOVFromVFOV(e,i,n);return a>t?o.getVFOVFromHFOV(t,i,n):e},getHFOVForCamera:function(e,t,i){return o.getHFOVFromVFOV(e.fov,t,i)},getHFOVFromVFOV:function(e,t,i){var o=t,a=i,r=2*Math.atan(Math.tan(e*n["a"].RADIANS_PER_DEGREE/2)*(o/a))*n["a"].DEGREES_PER_RADIAN;return r},getVFOVFromHFOV:function(e,t,i){var o=t,a=i,r=2*Math.atan(Math.tan(e*n["a"].RADIANS_PER_DEGREE/2)*(a/o))*n["a"].DEGREES_PER_RADIAN;return r}};t["a"]=o},"2c8b":function(e,t,i){"use strict";i.d(t,"a",(function(){return a}));i("55dd"),i("ac6a");var n=i("d4ec"),o=i("bee2"),a=function(){function e(){Object(n["a"])(this,e),this.list=[],this.index={},Object.defineProperty(this,"length",{get:function(){return this.list.length}})}return Object(o["a"])(e,[{key:"forEach",value:function(e){this.list.forEach(e)}},{key:"add",value:function(e){this.list.push(e),this.index[this.getIndex(e)]=e}},{key:"getIndex",value:function(e){throw new Error("IndexedCollection.getIndex not implemented in subclass.")}},{key:"extend",value:function(e){for(var t=0;t<e.length;t++)this.add(e[t])}},{key:"get",value:function(e){return this.index[e]}},{key:"first",value:function(){return this.list[0]}},{key:"last",value:function(){return this.list[this.list.length-1]}},{key:"reIndex",value:function(){this.index={};var e=this;this.forEach((function(t){e.index[e.getIndex(t)]=t}))}},{key:"filter",value:function(e){var t=this.list.filter(e);return this.reIndex(),t}},{key:"reduce",value:function(e,t){return this.list.reduce(e,t)}},{key:"sort",value:function(e){return this.list.sort(e)}},{key:"indexOf",value:function(e){for(var t=0;t<this.list.length;++t)if(this.list[t]===e)return t;return-1}}]),e}()},"2d47":function(e,t,i){"use strict";i("ac6a");var n={vector:function(e,t,i){var n=e.clone();return t=t.clone(),function(o){e.set(n.x*(1-o)+t.x*o,n.y*(1-o)+t.y*o,n.z*(1-o)+t.z*o),i&&i(e,o)}},quaternion:function(e,t,i){var n=e.clone();return function(o){e.copy(n).slerp(t,o),i&&i(e,o)}},property:function(e,t,i,n){var o=e[t];return function(a){e[t]=o*(1-a)+i*a,n&&n(e[t])}},uniform:function(e,t,i){var n=e.material.uniforms[t].value;return function(o){try{e.material.uniforms[t]&&(e.material.uniforms[t].value=n*(1-o)+i*o)}catch(e){console.log(1)}}},matrix4:function(e,t){var i=e.clone();return function(n){for(var o=e.elements,a=i.elements,r=t.elements,s=0;s<16;s++)o[s]=a[s]*(1-n)+r[s]*n}},allUniforms:function(e,t,i){var n=e.map(function(e){return this.uniform(e,t,i)}.bind(this));return function(e){n.forEach((function(t){t(e)}))}}};t["a"]=n},"2e64":function(e,t,i){},"2fdba":function(e,t,i){},"2fde":function(e,t,i){"use strict";i("ac6a"),i("673e"),i("7514");var n=i("4c16"),o=i("f121"),a=i("cbe8"),r=i("430c"),s=i("bc19"),l=i("6860"),c=i("9923"),u="#f0ff00",d=new THREE.Mesh(new THREE.SphereBufferGeometry(.01,10,10),new THREE.MeshBasicMaterial({color:u,depthTest:!1,transparent:!0})),h=r["a"].createFatLineMat({width:3,color:u,alwaysShow:!0});function p(e){this.setPoints(e.points),this.state=e.state||"active",this.visiblePanos=e.visiblePanos,this.initVisiblePanos(),this.elem=$('<div class="ruler measure" style="display:none" data-name=""><div class="ruler-label"><div class="ruler-label-point"></div><span class="ruler-label-name">约0.5米</span></div></div>'),$(".widgets-rulers").append(this.elem),this.text=e.text||"",this.length=Math.round(100*this.points[0].distanceTo(this.points[1]))/100,this.text=c["a"].t("common.meter",{meter:this.length}),this.elem.find(".ruler-label-name").html(this.text),l["objects"].player.measureRulers.push(this);var t=new THREE.Object3D;t.name="measure",this.balls=[d.clone(),d.clone()],this.balls[0].position.copy(this.points[0]),this.balls[1].position.copy(this.points[1]),this.balls[0].renderOrder=this.balls[1].renderOrder=2,t.add(this.balls[0]),t.add(this.balls[1]);var i=[];i.push(this.points[0].x,this.points[0].y,this.points[0].z),i.push(this.points[1].x,this.points[1].y,this.points[1].z),this.line=r["a"].createFatLine(i,{material:h}),t.add(this.line),this.boldLine=r["a"].createBoldLine(this.points,{mat:new THREE.MeshBasicMaterial({wireframe:!0,opacity:0,transparent:!0,depthTest:!1,color:"#991111"}),type:"init"}),this.boldLine.parentRuler=this,t.add(this.boldLine),l["objects"].player.model.add(t),this.group=t,o["a"].vrFishTemp&&(this.getPosAtSphere(l["objects"].player.currentPano.position),this.updateBoldLine())}p.prototype.setPoints=function(e){this.points=e},p.prototype.initVisiblePanos=function(){var e=this,t=l["objects"].player.model.wallManager.roomInfo;if(t)if(l["objects"].player.model.wallManager.version=2)for(var i=this.points[0].clone().setY(0),o=this.points[1].clone().setY(0),a=new THREE.Raycaster(i.clone(),o.clone().sub(i).normalize(),0,i.distanceTo(o)),r=a.intersectObjects(l["objects"].player.model.chunks),c=0;c<r.length;c++){var u=r[c].point.clone(),d=n["a"].getVisiblePano(u);this.visiblePanos=this.visiblePanos.concat(d.filter((function(t){return-1==e.visiblePanos.indexOf(t)})))}else for(var h=new THREE.Vector2(this.points[0].x,this.points[0].z),p=new THREE.Vector2(this.points[1].x,this.points[1].z),f=[h,p],m=0;m<t.length;m++)for(var v=0,g=t[m].points.length;v<g;v++){var y=[{x:t[m].points[v].x,y:t[m].points[v].y},{x:t[m].points[(v+1)%g].x,y:t[m].points[(v+1)%g].y}];if(s["a"].isLineIntersect(f,y)){t[m].panos.forEach((function(t){-1==e.visiblePanos.indexOf(t.id)&&e.visiblePanos.push(t.id)})),console.log("加入房间 "+m);break}}},p.prototype.remove=function(){var e=l["objects"].player.measureRulers.indexOf(this);l["objects"].player.measureRulers.splice(e,1),this.group.parent.remove(this.group),this.elem.remove()},p.prototype.updateBoldLine=function(){o["a"].vrFishTemp?r["a"].updateBoldLine(this.boldLine,this.fishPoints,"moveAndRotate"):r["a"].updateBoldLine(this.boldLine,this.points,"update")},p.prototype.showOptionLabel=function(e,t){if(e){l["objects"].tagManager.editSpot.chosenMeasureRuler=this;t=s["a"].getFootPoint(t,this.points[0],this.points[1]);this.optionLabelPos=t,$(".widgets-design-option").css("display",""),this.updateOptionPos()}else l["objects"].tagManager.editSpot.chosenMeasureRuler=null,$(".widgets-design-option").css("display","none"),this.optionLabelPos=null},p.prototype.updateOptionPos=function(){var e=n["a"].getPos2d(this.optionLabelPos);e.trueSide?($(".widgets-design-option div").removeClass("hide"),$(".widgets-design-option div").css({left:e.pos.x+"px",top:e.pos.y+"px"}),e.vector.x>0?$(".widgets-design-option").removeClass("right"):$(".widgets-design-option").addClass("right")):$(".widgets-design-option div").addClass("hide")},p.prototype.getCrossPoint=function(e,t){var i,n,o,a=l["objects"].player.domElement.clientWidth,r=l["objects"].player.domElement.clientHeight,s=(t.x-e.x)/(t.y-e.y),c=function(t){return s*(t-e.y)+e.x},u=function(t){return 1/s*(t-e.x)+e.y};return t.x>a||t.x<0?(o=t.x>a?a:0,t.y<0||t.y>r?(n=t.y<0?0:r,i=c(n),(i>a||i<0)&&(i=o,n=u(i))):(i=o,n=u(i))):(n=t.y<0?0:r,i=c(n)),new THREE.Vector2(i,n)},p.prototype.getPosInCrossPoint=function(e,t){var i=l["objects"].player.domElement.clientWidth,n=l["objects"].player.domElement.clientHeight;return s["a"].getCrossPointAtRect(e,t,i,n,0,0)},p.prototype.getPosAtSphere=function(e,t){this.fishPoints=[];var i=[];this.points.forEach(function(t,o){var r=n["a"].getPosAtSphere(t.clone(),e);this.fishPoints.push(r),i.push(r.x,r.y,r.z),this.balls[o].position.copy(r);var s=a["a"].skyRadius/e.distanceTo(t);this.balls[o].scale.set(s,s,s)}.bind(this)),r["a"].moveFatLine(this.line,i)};var f=1;p.prototype.getPosInScreen=function(e,t,i){var o=e.point.clone().add(t.point).multiplyScalar(.5),a=n["a"].getPos2d(o);if(a.trueSide){var r=e.pos2d.trueSide?e.pos2d:t.pos2d;return a.inSight&&(a.pos=this.getPosInCrossPoint(r.pos,a.pos),a.vector=null),{result:"p1p2",p1:r,p2:a}}if(!(i+1>f)){var s=e.pos2d.trueSide?e:t;return this.getPosInScreen(s,{point:o,pos2d:a},++i)}},p.prototype.updateVisible=function(){this.visiblePanos.indexOf(l["objects"].player.currentPano.id)>-1?this.state="active":this.state="unable"},p.prototype.update=function(){if("panorama"!=l["objects"].player.mode||"active"!=this.state)return this.elem.css("display","none"),void(this.group.visible=!1);var e,t,i=n["a"].getPos2d(this.points[0]),o=n["a"].getPos2d(this.points[1]),a=l["objects"].player.domElement.clientWidth,r=l["objects"].player.domElement.clientHeight;if(!i.trueSide||!o.trueSide){if(!i.trueSide&&!o.trueSide)return void this.elem.css("display","none");var s=this.getPosInScreen({point:this.points[0],pos2d:i},{point:this.points[1],pos2d:o},0);if(!s)return void this.elem.css("display","none");i=s.p1,o=s.p2}var c=i.pos,u=o.pos,d=c.distanceTo(u);if(0!=d){if(i.inSight&&o.inSight)e=(c.x+u.x)/2,t=(c.y+u.y)/2;else{var h,p;h=i.inSight?c.clone():this.getCrossPoint(u,c),p=o.inSight?u.clone():this.getCrossPoint(c,u);var f,m=h.clone().add(p).multiplyScalar(.5);if(e=m.x,t=m.y,m.x>a||m.x<0||m.y>r||m.y<0)return this.elem.css("display","none"),void(this.group.visible=!1);if(u.x==c.x){if(u.y==c.y)return void console.warn("pos1和2一样???");f=u.y<c.y?(t-u.y)/(c.y-u.y):(u.y-t)/(u.y-c.y)}else f=u.x<c.x?(e-u.x)/(c.x-u.x):(u.x-e)/(u.x-c.x);if(f<0||f>1)return void this.elem.css("display","none")}this.elem.css("display",""),this.group.visible=!0,"left"!=this.dir&&e<a/2||"right"==this.dir?this.elem.find(".ruler-label").addClass("reverse"):this.elem.find(".ruler-label").removeClass("reverse"),this.elem.find(".ruler-label").css({left:e+"px",top:t+"px"})}else console.warn("ruler间距为0!")},t["a"]=p},"31bc":function(e,t,i){e.exports=i.p+"static/img/2.c9287ece.png"},3330:function(e,t,i){"use strict";(function(e){i.d(t,"a",(function(){return o}));i("6b54");function n(t){Math.round;var i,n,o,a,r,s=Math.floor,l=new Array(64),c=new Array(64),u=new Array(64),d=new Array(64),h=new Array(65535),p=new Array(65535),f=new Array(64),m=new Array(64),v=[],g=0,y=7,b=new Array(64),w=new Array(64),E=new Array(64),T=new Array(256),P=new Array(2048),x=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],k=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],R=[0,1,2,3,4,5,6,7,8,9,10,11],_=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],S=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],M=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],A=[0,1,2,3,4,5,6,7,8,9,10,11],O=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],C=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function D(e){for(var t=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],i=0;i<64;i++){var n=s((t[i]*e+50)/100);n<1?n=1:n>255&&(n=255),l[x[i]]=n}for(var o=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],a=0;a<64;a++){var r=s((o[a]*e+50)/100);r<1?r=1:r>255&&(r=255),c[x[a]]=r}for(var h=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],p=0,f=0;f<8;f++)for(var m=0;m<8;m++)u[p]=1/(l[x[p]]*h[f]*h[m]*8),d[p]=1/(c[x[p]]*h[f]*h[m]*8),p++}function V(e,t){for(var i=0,n=0,o=new Array,a=1;a<=16;a++){for(var r=1;r<=e[a];r++)o[t[n]]=[],o[t[n]][0]=i,o[t[n]][1]=a,n++,i++;i*=2}return o}function I(){i=V(k,R),n=V(M,A),o=V(_,S),a=V(O,C)}function j(){for(var e=1,t=2,i=1;i<=15;i++){for(var n=e;n<t;n++)p[32767+n]=i,h[32767+n]=[],h[32767+n][1]=i,h[32767+n][0]=n;for(var o=-(t-1);o<=-e;o++)p[32767+o]=i,h[32767+o]=[],h[32767+o][1]=i,h[32767+o][0]=t-1+o;e<<=1,t<<=1}}function L(){for(var e=0;e<256;e++)P[e]=19595*e,P[e+256>>0]=38470*e,P[e+512>>0]=7471*e+32768,P[e+768>>0]=-11059*e,P[e+1024>>0]=-21709*e,P[e+1280>>0]=32768*e+8421375,P[e+1536>>0]=-27439*e,P[e+1792>>0]=-5329*e}function F(e){var t=e[0],i=e[1]-1;while(i>=0)t&1<<i&&(g|=1<<y),i--,y--,y<0&&(255==g?(H(255),H(0)):H(g),y=7,g=0)}function H(e){v.push(e),1===v.length&&console.log(e)}function z(e){H(e>>8&255),H(255&e)}function N(e,t){var i,n,o,a,r,s,l,c,u,d,h=0,p=8,m=64;for(u=0;u<p;++u){i=e[h],n=e[h+1],o=e[h+2],a=e[h+3],r=e[h+4],s=e[h+5],l=e[h+6],c=e[h+7];var v=i+c,g=i-c,y=n+l,b=n-l,w=o+s,E=o-s,T=a+r,P=a-r,x=v+T,k=v-T,R=y+w,_=y-w;e[h]=x+R,e[h+4]=x-R;var S=.707106781*(_+k);e[h+2]=k+S,e[h+6]=k-S,x=P+E,R=E+b,_=b+g;var M=.382683433*(x-_),A=.5411961*x+M,O=1.306562965*_+M,C=.707106781*R,D=g+C,V=g-C;e[h+5]=V+A,e[h+3]=V-A,e[h+1]=D+O,e[h+7]=D-O,h+=8}for(h=0,u=0;u<p;++u){i=e[h],n=e[h+8],o=e[h+16],a=e[h+24],r=e[h+32],s=e[h+40],l=e[h+48],c=e[h+56];var I=i+c,j=i-c,L=n+l,F=n-l,H=o+s,z=o-s,N=a+r,B=a-r,U=I+N,W=I-N,q=L+H,G=L-H;e[h]=U+q,e[h+32]=U-q;var Q=.707106781*(G+W);e[h+16]=W+Q,e[h+48]=W-Q,U=B+z,q=z+F,G=F+j;var Y=.382683433*(U-G),X=.5411961*U+Y,Z=1.306562965*G+Y,J=.707106781*q,$=j+J,K=j-J;e[h+40]=K+X,e[h+24]=K-X,e[h+8]=$+Z,e[h+56]=$-Z,h++}for(u=0;u<m;++u)d=e[u]*t[u],f[u]=d>0?d+.5|0:d-.5|0;return f}function B(){z(65504),z(16),H(74),H(70),H(73),H(70),H(0),H(1),H(1),H(0),z(1),z(1),H(0),H(0)}function U(e,t){z(65472),z(17),H(8),z(t),z(e),H(3),H(1),H(17),H(0),H(2),H(17),H(1),H(3),H(17),H(1)}function W(){z(65499),z(132),H(0);for(var e=0;e<64;e++)H(l[e]);H(1);for(var t=0;t<64;t++)H(c[t])}function q(){z(65476),z(418),H(0);for(var e=0;e<16;e++)H(k[e+1]);for(var t=0;t<=11;t++)H(R[t]);H(16);for(var i=0;i<16;i++)H(_[i+1]);for(var n=0;n<=161;n++)H(S[n]);H(1);for(var o=0;o<16;o++)H(M[o+1]);for(var a=0;a<=11;a++)H(A[a]);H(17);for(var r=0;r<16;r++)H(O[r+1]);for(var s=0;s<=161;s++)H(C[s])}function G(){z(65498),z(12),H(3),H(1),H(0),H(2),H(17),H(3),H(17),H(0),H(63),H(0)}function Q(e,t,i,n,o){for(var a,r=o[0],s=o[240],l=16,c=63,u=64,d=N(e,t),f=0;f<u;++f)m[x[f]]=d[f];var v=m[0]-i;i=m[0],0==v?F(n[0]):(a=32767+v,F(n[p[a]]),F(h[a]));for(var g=63;g>0&&0==m[g];g--);if(0==g)return F(r),i;var y,b=1;while(b<=g){for(var w=b;0==m[b]&&b<=g;++b);var E=b-w;if(E>=l){y=E>>4;for(var T=1;T<=y;++T)F(s);E&=15}a=32767+m[b],F(o[(E<<4)+p[a]]),F(h[a]),b++}return g!=c&&F(r),i}function Y(){for(var e=String.fromCharCode,t=0;t<256;t++)T[t]=e(t)}function X(e){if(e<=0&&(e=1),e>100&&(e=100),r!=e){var t=0;t=e<50?Math.floor(5e3/e):Math.floor(200-2*e),D(t),r=e}}function Z(){var e=(new Date).getTime();t||(t=50),Y(),I(),j(),L(),X(t);(new Date).getTime()}this.encode=function(t,r){(new Date).getTime();r&&X(r),v=[],g=0,y=7,z(65496),B(),W(),U(t.width,t.height),q(),G();var s=0,l=0,c=0;g=0,y=7,this.encode.displayName="_encode_";var h,p,f,m,T,x,k,R,_,S=t.data,M=t.width,A=t.height,O=4*M,C=0;while(C<A){h=0;while(h<O){for(T=O*C+h,x=T,k=-1,R=0,_=0;_<64;_++)R=_>>3,k=4*(7&_),x=T+R*O+k,C+R>=A&&(x-=O*(C+1+R-A)),h+k>=O&&(x-=h+k-O+4),p=S[x++],f=S[x++],m=S[x++],b[_]=(P[p]+P[f+256>>0]+P[m+512>>0]>>16)-128,w[_]=(P[p+768>>0]+P[f+1024>>0]+P[m+1280>>0]>>16)-128,E[_]=(P[p+1280>>0]+P[f+1536>>0]+P[m+1792>>0]>>16)-128;s=Q(b,u,s,i,o),l=Q(w,d,l,n,a),c=Q(E,d,c,n,a),h+=32}C+=8}if(y>=0){var D=[];D[1]=y+1,D[0]=(1<<y+1)-1,F(D)}return z(65497),new e(v)},Z()}function o(e,t){"undefined"===typeof t&&(t=50);var i=new n(t),o=i.encode(e,t);return{data:o,width:e.width,height:e.height}}}).call(this,i("b639").Buffer)},3472:function(e,t,i){"use strict";i("673e"),i("7514");var n=i("4c16"),o=i("bc19"),a=i("6860"),r=i("f121");function s(e){this.position=e.pos,this.sid=e.sid,this.elem=$('<div class="room-label" style="display:none"><a><p><span>客厅</span></p></a></div>'),this.text=e.text||"",this.elem.find("span").html(this.text),e.container?e.container.append(this.elem):$(".widgets-doll-labels").append(this.elem),a["objects"].player.dollLabels.push(this),this.toPano=e.toPano,this.clickFun=e.clickFun,this.elem[0].addEventListener("click",this.clickFuc.bind(this)),this.enable=!0,this.type="doll",this.noLine=e.noLine,this.driftDir=e.driftDir,this.pos2d=new THREE.Vector3,this.noLine&&this.elem.addClass("noLine"),this.floorIndex=e.floorIndex}s.prototype.changeText=function(e){this.text=e,this.elem.find("span").html(this.text)},s.prototype.update=function(){if("dollhouse"!==a["objects"].player.mode||!this.enable||!this.text||a["objects"].model.currentFloor.floorIndex!=this.floorIndex&&!a["objects"].model.allFloorsVisible||r["a"].isEdit&&(a["objects"].mainDesign&&a["objects"].mainDesign.editing||a["objects"].player.EditOverlay&&a["objects"].player.EditOverlay.editing||a["objects"].player.linkEditor&&(a["objects"].player.linkEditor.setPanoVisible||a["objects"].player.linkEditor.setTagVisible)))this.elem.css("display","none");else{var e=n["a"].getPos2d(this.position);if(e.trueSide)if(n["a"].ifShelter(this.position,{x:e.vector.x,y:e.vector.y},a["objects"].model.allFloorsVisible?null:this.floorIndex))this.elem.css("display","none");else{if(this.elem.css("display",""),this.driftDir){var t=n["a"].getPos2d(this.position.clone().add(this.driftDir)),i=this.elem[0].children[0].getBoundingClientRect(),s=o["a"].getCrossPointAtRect(t.pos,e.pos,i.width,i.height,e.pos.x-i.width/2,e.pos.y-i.height/2),l=s.sub(e.pos.clone()),c=this.position.distanceTo(a["objects"].player.camera.position),u=100/c,d=e.pos.clone().add(l.multiplyScalar((u+l.length())/l.length()));this.elem.css({left:d.x+"px",top:d.y+"px"})}else this.elem.css({left:e.pos.x+"px",top:e.pos.y+"px"});this.pos2d=e.vector}else this.elem.css("display","none")}},s.prototype.clickFuc=function(){this.toPano?a["objects"].player.flyToPano({pano:this.toPano}):this.clickFun&&this.clickFun()},s.prototype.remove=function(){this.elem.remove();var e=a["objects"].player.dollLabels.indexOf(this);e>-1&&a["objects"].player.dollLabels.splice(e,1)},t["a"]=s},"349f":function(e,t,i){"use strict";var n={TAGTYPE:"spot",ROTATETYPE:"move",NEWLTYPE:"newM",TRANSITIONINGTYPE:"fly",DOLLHOUSEMODE:"doll",FLOORPLANMODE:"fplan",PANORAMAMODE:"pa",TAGOPEN:"open",TAGCLOSE:"close",position:"pos",target:"target",quaternion:"qua",zoom:"zoom",pano:"pano",get:function(e){return"pa"==e?"PANORAMAMODE":"fplan"==e?"FLOORPLANMODE":"doll"==e?"DOLLHOUSEMODE":e}};t["a"]=n},"353e":function(e,t,i){"use strict";i.r(t);i("673e");var n,o=i("f121"),a=(i("bc19"),i("6860")),r=(i("9ef6"),i("d547"),i("07fe"),i("cd18"),i("c75e")),s=(i("9923"),i("4a7a")),l=(i("b235"),i("2d47"),i("1158"),i("4c16")),c=(i("430c"),i("532c")),u=i("1787"),d=a["objects"].player,h={editing:!1,editVideo:null,meshGroup:new THREE.Object3D,scaleBtn:null,hoveredVideo:!1,checkIfCanInit:function(){return d.model&&d.panoVideoManager&&d.currentPano&&app.model.transformControls},waitToInit:function(e){var t=this;console.log("waitToInit");var i=setInterval((function(){t.checkIfCanInit()&&(e&&e(),clearInterval(i))}),50)},init:function(e){var t=this;this.checkIfCanInit()?(n=d.panoVideoManager,this.meshGroup.name="panovideo-group",d.model.add(this.meshGroup),this.meshGroup.visible=!1,this.scaleBtn=new THREE.Mesh(new THREE.PlaneBufferGeometry(.05,.05),new THREE.MeshBasicMaterial({map:u["default"].load(o["a"].getStaticResource("img/zoom.png")),transparent:!0,opacity:.75,depthTest:!1,depthWrite:!1})),this.scaleBtn.renderOrder=100,this.meshGroup.add(this.scaleBtn),this.scaleBtn.visible=!1,r["a"].on("panovideo/addVideo",this.addVideo.bind(this)),r["a"].on("panovideo/deleteVideo",this.deleteVideo.bind(this)),r["a"].on("panovideo/reEdit",this.reEditVideo.bind(this)),r["a"].on("panovideo/exit",this.endEditVideo.bind(this)),r["a"].on("panovideo/onVideoLoadeddata",this.videoUploaded.bind(this)),r["a"].on("panovideo/saved",this.confirmVideo.bind(this)),d.on(s["a"].ModeChanging,(function(e,i,n){"panorama"==e&&t.editing&&(t.meshGroup.visible=!1)})),d.on("ModeChanged",(function(e,i,n){"panorama"==i&&t.editing&&(t.meshGroup.visible=!0)})),e&&e()):this.waitToInit((function(){t.init(e)}))},moveScaleBtn:function(){var e={lon:1,lat:1},t=this.editVideo.getDirAtAngle(this.editVideo.hfov/2+e.lon,this.editVideo.vfov/2+e.lat).normalize();this.scaleBtn.position.copy(d.position.clone().add(t)),this.scaleBtn.lookAt(d.position)},addVideo:function(){if(d.flying)d.waitFlytoItemFuc=this.addVideo.bind(this);else{var e=d.currentPano,t=d.getDirection(),i=30,o=40;this.editVideo=new c["a"]({pano:e,dir:t,hfov:i,vfov:o,isNew:!0},n),this.editVideo.isNew=!0,this.beginEditVideo()}},reEditVideo:function(e){var t=this,i=d.model.panos.index[e];this.editVideo=i.panoVideo,d.flying?d.waitFlytoItemFuc=function(){t.editVideo&&t.reEditVideo(e)}:d.currentPano.id==e&&"panorama"==d.mode?(d.flyToPano({pano:i,lookAtPoint:i.position.clone().add(i.panoVideo.dir)}),this.beginEditVideo()):d.flyToPano({pano:i,lookAtPoint:i.position.clone().add(i.panoVideo.dir)},(function(){t.editVideo&&t.reEditVideo(e)}))},beginEditVideo:function(){d.reticule.visible=!1,this.editVideo.show({isEdit:!0}),this.scaleBtn.visible=!0,this.moveScaleBtn()},endEditVideo:function(e){delete n.material.defines.isEdit,d.panoVideoManager.material.needsUpdate=!0,!e&&this.editVideo&&this.editVideo.setFromInfo(this.editVideo.info),d.currentPano.panoVideo?setTimeout((function(){n.currentPanoVideo&&n.currentPanoVideo&&n.currentPanoVideo.video.play()}),10):n.hide(),this.dealPointerUp(),this.editVideo=null,this.hoveredVideo=null,this.hoveredScale=!1,$("#player").css("cursor",""),this.scaleBtn.visible=!1,d.reticule.visible=!0,console.log("endEditVideo")},confirmVideo:function(e){var t=this.editVideo;t.isNew&&n.addVideo(this.editVideo),t.isNew=!1,t.getInfo(),this.endEditVideo(!0)},deleteVideo:function(e){e==d.currentPano.id&&n.hide();var t=d.model.panos.index[e].panoVideo;t&&n.removeVideo(t),this.endEditVideo()},enter:function(){this.editing||(this.editing=!0,this.meshGroup.visible="panorama"==d.mode,d.cameraControls.controls.panorama.insideLookLimitDown=o["a"].isMobile?-55:-50,d.model.wallManager.updateRulersVisi(!1))},leave:function(){this.editing&&(this.editing=!1,this.endEditVideo(),this.meshGroup.visible=!1,d.cameraControls.controls.panorama.insideLookLimitDown=null,d.model.wallManager.updateRulersVisi())},scaleVideo:function(){if(this.scaling){var e=l["a"].getMouseIntersect(d.camera,[d.model.skybox],d.mouse),t=e.point.clone().sub(d.position),i=this.editVideo.getAngleByDir(t);if(this.scaleOffset){var o=i.lon<0?this.editVideo.hfov>90?179:1:i.lon;if(this.editVideo.hfov=THREE.Math.clamp(2*o-this.scaleOffset.lon,1,359),this.editVideo.vfov=Math.min(Math.abs((2*i.lat-this.scaleOffset.lat)%360),179,2*(89+this.editVideo.lat),2*(89-this.editVideo.lat)),this.editVideo.video){var a=this.editVideo.video.videoWidth/this.editVideo.video.videoHeight;this.editVideo.hfov/this.editVideo.vfov>a?this.editVideo.hfov=this.editVideo.vfov*a:this.editVideo.vfov=this.editVideo.hfov/a}this.editVideo.computeParam();var r=this.editVideo.rect;n.material.uniforms.clipRect.value.set(r.leftBottom.x,r.leftBottom.y,r.rightTop.x,r.rightTop.y),this.moveScaleBtn(),console.log("scaling")}else this.scaleOffset={lon:i.lon-this.editVideo.hfov/2,lat:i.lat-this.editVideo.vfov/2}}},dragVideo:function(){if(this.reposing){var e=l["a"].getMouseIntersect(d.camera,[d.model.skybox],d.mouse),t=e.point.clone().sub(d.position),i=(new THREE.Matrix4).lookAt(new THREE.Vector3,t,d.camera.up);if(this.dragLastDirMat){var o=(new THREE.Matrix4).getInverse(this.dragLastDirMat),a=i.clone().multiply(o),r=this.editVideo.dir.clone().applyMatrix4(a),s=this.editVideo.getAbsoluteAngleByDir(r);s.lat-this.editVideo.vfov/2<-89?r=this.editVideo.getDirAtAbsoluteAngle(s.lon,this.editVideo.vfov/2-89):s.lat+this.editVideo.vfov/2>89&&(r=this.editVideo.getDirAtAbsoluteAngle(s.lon,89-this.editVideo.vfov/2)),this.editVideo.dir=r,this.editVideo.computeParam();var c=this.editVideo.rect;n.material.uniforms.clipRect.value.set(c.leftBottom.x,c.leftBottom.y,c.rightTop.x,c.rightTop.y),this.moveScaleBtn()}this.dragLastDirMat=i}},dealPointerDown:function(){this.hoveredVideo?(this.reposing=!0,d.cameraControls.activeControl.enabled=!1,this.dragVideo()):this.hoveredScale&&(this.scaling=!0,d.cameraControls.activeControl.enabled=!1,this.scaleVideo())},dealPointerMove:function(){this.editVideo&&(this.dragVideo(),this.scaleVideo())},dealPointerUp:function(){this.editVideo&&(this.reposing=this.scaling=!1,d.cameraControls.activeControl.enabled=!0,d.cameraControls.activeControl.pointerDragOn=!1,this.dragLastDirMat=null,this.scaleOffset=null)},videoUploaded:function(e){this.editVideo?(console.log("videoUploaded pano:"+this.editVideo.pano.id),this.editVideo.attachVideo(e,!0),this.moveScaleBtn()):console.log("videoUploaded !this.editVideo")},getSavingInfo:function(){var e=this.editVideo,t={dir:e.dir,hfov:e.hfov,vfov:e.vfov,pano:e.pano.id,rect:e.getClipRect()};return{data:t,type:this.editVideo.isNew?1:0,needSaveMedia:!e.info||e.file!=e.info.file,done:function(){e.isNew=!1,e.getInfo()}}},setSize:function(e,t){},checkIfHover:function(){if("panorama"==d.mode){var e=this.editVideo||d.currentPano.panoVideo;if(e){this.hoveredVideo=null;var t=l["a"].getMouseIntersect(d.camera,[this.scaleBtn],d.mouse);return t?(this.hoveredScale=!0,console.log("hover scale"),$("#player").css("cursor","move")):(this.hoveredScale=!1,t=e.checkIfHover(),t&&this.editVideo&&(this.hoveredVideo=this.editVideo)),this.intersect=t,t?$("#player").css("cursor","move"):$("#player").css("cursor",""),t}}}};d.EditPanoVideo=h,t["default"]=h},"365c":function(e,t,i){"use strict";i.r(t),i.d(t,"checkLogin",(function(){return c})),i.d(t,"getAuthority",(function(){return u})),i.d(t,"uploadLogoBottomStatus",(function(){return d})),i.d(t,"downloadTexData",(function(){return h})),i.d(t,"uploadPic",(function(){return p})),i.d(t,"deleteOss",(function(){return f})),i.d(t,"uploadLogo",(function(){return m})),i.d(t,"uploadHotMedia",(function(){return v})),i.d(t,"checkVideoUrl",(function(){return g})),i.d(t,"saveAll",(function(){return y})),i.d(t,"saveFloorplanPng",(function(){return b})),i.d(t,"saveFloorJson",(function(){return w})),i.d(t,"saveHouseFloorJson",(function(){return E})),i.d(t,"saveHot",(function(){return T})),i.d(t,"saveHotVisible",(function(){return P})),i.d(t,"saveLinkPano",(function(){return x})),i.d(t,"saveInitialPage",(function(){return k})),i.d(t,"uploadGuideMediaFile",(function(){return R})),i.d(t,"deleteGuideMediaFile",(function(){return _})),i.d(t,"deleteGuideMediaPart",(function(){return S})),i.d(t,"uploadBoxMedia",(function(){return M})),i.d(t,"saveBoxMedia",(function(){return A})),i.d(t,"uploadHotJsonToOss",(function(){return O})),i.d(t,"saveJsonData",(function(){return C})),i.d(t,"savePanorama",(function(){return D})),i.d(t,"savePanoramaJson",(function(){return V})),i.d(t,"saveFloorJsonData",(function(){return I})),i.d(t,"deleteRecordAudioPart",(function(){return j})),i.d(t,"checUploadAppSoundUStatus",(function(){return L})),i.d(t,"uploadWechatSound",(function(){return F})),i.d(t,"uploadPicByAPP",(function(){return H})),i.d(t,"saveInformation",(function(){return z})),i.d(t,"saveBase",(function(){return N})),i.d(t,"saveScreen",(function(){return B})),i.d(t,"saveMusic",(function(){return U})),i.d(t,"saveSign",(function(){return W})),i.d(t,"saveGuide",(function(){return q})),i.d(t,"saveHotspot",(function(){return G})),i.d(t,"getWechatRecordSound",(function(){return Q})),i.d(t,"getAppRecordSound",(function(){return Y})),i.d(t,"checkPassword",(function(){return X})),i.d(t,"fetchSceneList",(function(){return Z})),i.d(t,"saveSceneLink",(function(){return J})),i.d(t,"fetchSceneInfo",(function(){return $})),i.d(t,"downloadPanoramaOrVideo",(function(){return K})),i.d(t,"uploadAppBgm",(function(){return ee})),i.d(t,"uploadPCBgm",(function(){return te})),i.d(t,"deleteAppBgm",(function(){return ie})),i.d(t,"deletePCBgm",(function(){return ne})),i.d(t,"rebuildVideoScene",(function(){return oe})),i.d(t,"rebuildVideoSceneProgress",(function(){return ae}));i("8e6e"),i("456d");var n=i("ade3"),o=(i("ac6a"),i("b775")),a=i("f121");function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function s(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?r(Object(i),!0).forEach((function(t){Object(n["a"])(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var l=function(){return a["a"].projectNum};function c(){return o["a"].post("api/scene/isLogin",{num:l()})}function u(){return o["a"].postJson("api/user/scene/cooperation/sceneResourceBySceneNum",{sceneNum:l()})}function d(e,t,i){return o["a"].post("api/scene/edit/uploadLogoBottomStatus",{sceneNum:l(),status:e?1:0},t,i)}function h(e,t){return o["a"].post("api/scene/edit/downloadTexData",{sceneNum:l()},e,t)}function p(e,t,i){return e.sceneNum=l(),o["a"].uploadBlobFile("api/scene/edit/uploadPic",e,t,i)}function f(e,t,i){return o["a"].post("api/scene/edit/deleteOss",{filePath:e},t,i)}function m(e,t,i){return e.sceneNum=l(),o["a"].uploadBlobFile("api/scene/edit/uploadShareLogo",e,t,i)}function v(e,t,i){return e.sceneNum=l(),o["a"].uploadFile("api/scene/edit/uploadHotMedia",e,t,i)}function g(e,t,i){return o["a"].post("api/scene/edit/checkVideoUrl",{sceneNum:l(),path:e},t,i)}function y(e,t,i){return e.sceneNum=l(),o["a"].post("api/scene/edit/saveSceneInfo",e,t,i)}function b(e,t,i){e.sceneNum=l();var n=a["a"].isMobile?"api/scene/edit/forApp/uploadFloorplanPng":"api/scene/edit/uploadFloorplanPng",r=new FormData;return r.append("cadInfo",e.cadInfo),r.append("sceneNum",e.sceneNum),e.filenames.forEach((function(t,i){r.append("file",e.files[i],t)})),o["a"].postForm(n,r,t,i)}function w(e,t,i,n){var r=a["a"].isMobile?"api/scene/edit/forApp/uploadFloorJsonAndRebuild":"api/scene/edit/uploadFloorJson";return o["a"].post(r,{webFloor:JSON.stringify(e),floor:JSON.stringify(t),sceneNum:l()},i,n)}function E(e,t,i){var n=a["a"].isMobile?"api/scene/edit/forApp/uploadFloorJsonAndRebuild":"api/scene/edit/copyAndUpdateFloorJson";return o["a"].post(n,{floorJsonData:JSON.stringify(e),sceneNum:l()},t,i)}function T(e,t,i){return e.sceneNum=l(),o["a"].post("api/scene/edit/saveHot",e,t,i)}function P(e,t,i){return e.sceneNum=l(),o["a"].post("api/scene/edit/saveHotVisible",e,t,i)}function x(e,t,i){return e.sceneNum=l(),o["a"].post("api/scene/edit/saveLinkPano",e,t,i)}function k(e,t,i){return e.sceneNum=l(),o["a"].post("api/scene/edit/saveInitialPage",e,t,i)}function R(e,t,i){return e.sceneNum=l(),o["a"].uploadFile("api/scene/edit/uploadScreencapVoiceNewV3",e,t,i)}function _(e,t,i){return e.sceneNum=l(),o["a"].uploadFile("api/scene/edit/deleteScreencapVoiceNew",e,t,i)}function S(e,t,i){return e.sceneNum=l(),o["a"].uploadFile("api/scene/edit/deleteScreencapVoicePart",e,t,i)}function M(e,t,i){return e.sceneNum=l(),o["a"].uploadFile("api/scene/edit/uploadOverlayMedia",e,t,i)}function A(e,t,i){return e.sceneNum=l(),o["a"].uploadFile("api/scene/edit/saveOverlay",e,t,i)}function O(e,t){return o["a"].post("api/scene/edit/uploadHotJsonToOss",{sceneNum:l()},e,t)}function C(e,t,i){return o["a"].post("api/scene/edit/saveJsonData",s({sceneNum:l()},e),t,i)}function D(e,t,i){return o["a"].uploadFile("api/scene/edit/savePanorama",s({sceneNum:l()},e),t,i)}function V(e,t,i){return o["a"].uploadFile("api/scene/edit/savePanoramaJson",s({sceneNum:l()},e),t,i)}function I(e,t,i){return o["a"].post("api/scene/edit/updateFloorJson",{floorJsonData:JSON.stringify(e),sceneNum:l()},t,i)}function j(e,t,i){return o["a"].post("api/scene/edit/forApp/deleteRecordAudioPart",s({sceneNum:l()},e),t,i)}function L(e,t){return o["a"].get("api/scene/getVoiceSound",{num:l()},e,t)}function F(e,t,i){return e.sceneNum=l(),o["a"].post("api/scene/edit/forApp/getRecordAudioFromWeixin",e,t,i)}function H(e,t,i){return e.sceneNum=l(),o["a"].uploadBlobFile("api/scene/edit/forApp/uploadPic",e,t,i)}function z(e,t,i){return e.sceneNum=l(),o["a"].post("api/scene/edit/forApp/saveSceneInfo",e,t,i)}function N(e,t,i){return e.sceneNum=l(),o["a"].post("api/scene/edit/forApp/saveAllVisi",e,t,i)}function B(e,t,i){return e.sceneNum=l(),o["a"].post("api/scene/edit/forApp/saveInitialPage",e,t,i)}function U(e,t,i){return e.sceneNum=l(),o["a"].post("api/scene/edit/forApp/saveBackgroundMusic",e,t,i)}function W(e,t,i){return e.sceneNum=l(),o["a"].post("api/scene/edit/forApp/saveFloorLogo",e,t,i)}function q(e,t,i){return e.sceneNum=l(),o["a"].post("api/scene/edit/forApp/saveScreencapData",e,t,i)}function G(e,t,i){return e.sceneNum=l(),o["a"].post("api/scene/edit/forApp/saveHot",e,t,i)}function Q(e,t,i){return e.sceneNum=l(),o["a"].post("api/scene/edit/forApp/getRecordAudioFromWeixinV3",e,t,i)}function Y(e,t,i){return e.sceneNum=l(),o["a"].post("api/scene/edit/forApp/getRecordAudioFromAppV3",e,t,i)}function X(e){return o["a"].post("api/scene/openSceneBykey",{num:l(),sceneKey:e})}function Z(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pageNum:1,pageSize:20,searchKey:""};return o["a"].postJson("api/user/scene/list",e)}function J(e){return o["a"].post("api/scene/edit/saveLinkScene",e)}function $(e){return o["a"].getJson("api/scene/getInfo",{num:e,m:(new Date).getTime()})}function K(e,t,i){return o["a"].post("api/scene/edit/downloadPanoramaOrVideo",e,t,i)}function ee(e,t,i){return e.sceneNum=l(),o["a"].uploadFile("/api/scene/edit/forApp/uploadBgMusic",e,t,i)}function te(e,t,i){return e.sceneNum=l(),o["a"].uploadFile("/api/scene/edit/uploadBgMusic",e,t,i)}function ie(e,t,i){return e.sceneNum=l(),o["a"].post("/api/scene/edit/forApp/deleteUploadBgMusic",e,t,i)}function ne(e,t,i){return e.sceneNum=l(),o["a"].post("/api/scene/edit/deleteUploadBgMusic",e,t,i)}function oe(e,t,i){return e.sceneNum=l(),o["a"].postJson("/api/scene/rebuildVideoScene",e,t,i)}function ae(e,t,i){return o["a"].__loading=!1,e.sceneNum=l(),o["a"].postJson("/api/scene/rebuildVideoSceneProgress",e,t,i)}},3713:function(e,t,i){"use strict";i.d(t,"a",(function(){return Ue}));i("6b54"),i("2397"),i("55dd"),i("7f7f"),i("5df3"),i("28a5"),i("673e"),i("ac6a");var n=i("d4ec"),o=i("bee2"),a=i("257e"),s=i("262e"),c=i("99de"),u=i("7e84"),d=i("ade3"),h=i("6860"),p=i("cd18"),f=i("80c5"),m=i("ccc0"),v=(i("4917"),i("2c8b")),g=i("3dac"),y=i("823b");function b(e){var t=w();return function(){var i,n=Object(u["a"])(e);if(t){var o=Object(u["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(c["a"])(this,i)}}function w(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var E=function(e){Object(s["a"])(i,e);var t=b(i);function i(){return Object(n["a"])(this,i),t.call(this)}return Object(o["a"])(i,[{key:"getImage",value:function(e){return e&&this.index.hasOwnProperty(e)?this.index[e]:null}},{key:"filterByModesAndReel",value:function(e,t){for(var i=[],n=0;n<t.length;n+=1){var o=t[n],a=this.index[o.sid];a&&i.push(a)}var r=e[f["a"].DOLLHOUSE],s=e[f["a"].FLOORPLAN];i=i.filter((function(e){if(!e.metadata||void 0===e.metadata.camera_mode)return!0;var t;try{t=f["a"].convertWorkshopModeInt(e.metadata.camera_mode)}catch(i){return y["a"].debug(i.message),!1}return t===f["a"].PANORAMA||t===f["a"].FLOORPLAN&&s||t===f["a"].DOLLHOUSE&&r})),i.length!==this.list.length&&y["a"].info("Disallowed "+(this.list.length-i.length)+" highlight images"),this.list=i,this.reIndex()}},{key:"getHeroLocations",value:function(e){if(0===this.list.length)return[];for(var t=[],n=0;n<this.list.length;++n){var o=this.list[n],a=o.thumbnail_signed_src,r=o.name;if(o.metadata&&void 0!==o.metadata.camera_quaternion){var s=f["a"].convertWorkshopModeInt(o.metadata.camera_mode);if(s===f["a"].MESH)continue;var l={cameraMode:s,position:o.metadata.camera_position,quaternion:o.metadata.camera_quaternion,panoId:o.metadata.scan_id,orthoZoom:o.metadata.ortho_zoom,floorVisibility:void 0!==o.metadata.floor_visibility?o.metadata.floor_visibility.slice(0):[],thumbUrl:a,name:i.filterImageName(r)},c=new g["a"](l);t.push(c)}}return t}},{key:"getIndex",value:function(e){return e.sid}},{key:"filterImageName",value:function(e){return""===e||e.match(/^[0-9.]+_[0-9.]+$/)?null:e}}]),i}(v["a"]),T=i("45eb"),P=(i("63d9"),function(){function e(t){Object(n["a"])(this,e),this.chunksize=t||10,this.chunks={},this.boundingBoxes={},this.children=[],this.offset=new THREE.Vector3(0,.5,0),this.material=new THREE.MeshBasicMaterial({color:16777215*Math.random(),side:THREE.DoubleSide})}return Object(o["a"])(e,[{key:"add",value:function(e){var t,i,n,o,a,r,s,l,c,u,d,h,p,f=e.attributes;f?(t=f.position.array,i=void 0!==e.index?e.index.array:void 0):(t=e.vertices,e.faces);var m=new THREE.Vector3;if(i)for(n=0,o=i.length;n<o;n+=3){var v=3*i[n],g=3*i[n+1],y=3*i[n+2];a=(t[v]+t[g]+t[y])/3,r=(t[v+1]+t[g+1]+t[y+1])/3,s=(t[v+2]+t[g+2]+t[y+2])/3,l=Math.floor(a/this.chunksize),c=Math.floor(r/this.chunksize),u=Math.floor(s/this.chunksize),d=l+"."+c+"."+u,d in this.chunks?(p=this.chunks[d],h=this.boundingBoxes[d]):(p=this.chunks[d]=[],h=this.boundingBoxes[d]=new THREE.Box3),p.push(t[v],t[v+1],t[v+2],t[g],t[g+1],t[g+2],t[y],t[y+1],t[y+2]),h.expandByPoint(m.set(t[v],t[v+1],t[v+2])),h.expandByPoint(m.set(t[g],t[g+1],t[g+2])),h.expandByPoint(m.set(t[y],t[y+1],t[y+2]))}else for(n=0,o=t.length;n<o;n+=9)a=(t[n]+t[n+3]+t[n+6])/3,r=(t[n+1]+t[n+4]+t[n+7])/3,s=(t[n+2]+t[n+5]+t[n+8])/3,l=Math.floor(a/this.chunksize),c=Math.floor(r/this.chunksize),u=Math.floor(s/this.chunksize),d=l+"."+c+"."+u,d in this.chunks?(p=this.chunks[d],h=this.boundingBoxes[d]):(p=this.chunks[d]=[],h=this.boundingBoxes[d]=new THREE.Box3),p.push(t[n],t[n+1],t[n+2],t[n+3],t[n+4],t[n+5],t[n+6],t[n+7],t[n+8]),h.expandByPoint(m.set(t[n],t[n+1],t[n+2])),h.expandByPoint(m.set(t[n+3],t[n+4],t[n+5])),h.expandByPoint(m.set(t[n+6],t[n+7],t[n+8]))}},{key:"build",value:function(){var e=new THREE.Object3D;for(var t in e.material=this.material,this.chunks){var i=this.chunks[t],n=new THREE.BufferGeometry;n.addAttribute("position",new THREE.BufferAttribute(new Float32Array(i),3)),n.boundingBox=this.boundingBoxes[t];var o=new THREE.Mesh(n,this.material);o.material.visible=!1,e.add(o),this.chunks[t]=[]}return e}}]),e}()),x=i("076a"),k=i("9ef6"),R=i("b235"),_=i("2d47"),S=i("1158");function M(e){var t=A();return function(){var i,n=Object(u["a"])(e);if(t){var o=Object(u["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(c["a"])(this,i)}}function A(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var O=function(e){Object(s["a"])(i,e);var t=M(i);function i(e,o,a){var r;return Object(n["a"])(this,i),r=t.call(this),r.model=e,r.floorIndex=o,r.name=a||o+1,r.panos=[],r.views=[],r.chunks=[],r.colliderBuilder=new P(3),r.collider=null,r.center=null,r.boundingBox=new THREE.Box3,r.boundingBoxExpand=new THREE.Box3,r.panoBounding=new THREE.Box3,r.size=null,r.hidden=!1,r.conservativeBoundingBox=new THREE.Box3,r.debugColor=16777215*Math.random(),r.transition=null,r}return Object(o["a"])(i,[{key:"enter",value:function(e){this.model.setFloor(this,e)}},{key:"reGetCollider",value:function(){this.colliderBuilder=new P(3),this.boundingBox=new THREE.Box3}},{key:"show",value:function(e,t,i){var n,o,a=t&&this.plane.visible?k["a"].modelOpaWhenFloorPlaneShow:1;(this.hidden||this.transition||a!=this.chunks[0].material.uniforms.opacity.value)&&(this.hidden=!1,R["a"].cancel(this.transition),t&&app.player.currentPano&&!app.player.currentPano.isAligned()&&"panorama"==app.player.mode?(n=k["a"].show360Views.transitionTime+200,o=k["a"].show360Views.transitionTime/n):(n=e?k["a"].showFloorDuration:k["a"].showFloorDuration+k["a"].showFloorDelay,o=e?0:k["a"].showFloorDelay/n),"floorplan"!=app.player.mode&&"dollhouse"!=app.player.mode||this.views.forEach((function(e){e.balloon.showOrHide(!0,n)})),this.transition=R["a"].start(_["a"].allUniforms(this.chunks,"opacity",a),n,function(){this.hidden||(this.chunks.forEach((function(e){e.material.transparent=!1})),i&&this.panos.forEach((function(e){(e.hasVideo||e.panoVideo)&&e.updateMarkerVisible(!0)})))}.bind(this),o,S["a"].easeInOutQuad)),t&&app.model.cadFloorPlane.changePlaneOpacity(this.floorIndex,1,void 0!=n?this.plane.visible?n:0:1e3,{delay:o,dontChangeModel:!0})}},{key:"hide",value:function(e,t,i){var n,o;this.hidden&&!this.transition||(R["a"].cancel(this.transition),t&&app.player.currentPano&&!app.player.currentPano.isAligned()&&"panorama"==app.player.mode?n=k["a"].show360Views.transitionTime:(n=e?0:k["a"].hideFloorDuration+k["a"].hideFloorDelay,this.chunks.forEach((function(e){e.material.transparent=!0}))),i&&this.panos.forEach((function(e){(e.hasVideo||e.panoVideo)&&e.updateMarkerVisible(!1)})),this.views.forEach((function(e){editLinkView.markView!=e&&e.balloon.showOrHide(!1,n)})),o=e?0:k["a"].hideFloorDelay/n,this.transition=R["a"].start(_["a"].allUniforms(this.chunks,"opacity",.3),n,function(){this.hidden=!0,this.chunks.forEach((function(e){e.material.transparent=!0}))}.bind(this),o,S["a"].easeInOutQuad)),t&&app.model.cadFloorPlane.changePlaneOpacity(this.floorIndex,0,void 0!=n?this.plane.visible?n:0:600,{delay:o,dontChangeModel:!0})}},{key:"toggle",value:function(e,t,i,n){e=void 0===e?this.hidden:e,e?this.show(t,i,n):this.hide(t,i,n)}},{key:"addChunk",value:function(e){null==this.colliderBuilder&&(this.colliderBuilder=new P(3)),e.renderOrder=x["a"].ghostFloor,this.add(e),this.chunks.push(e),this.boundingBox.union(e.geometry.boundingBox),this.boundingBoxExpand.union(e.geometry.boundingBox),this.size=this.boundingBox.getSize(new THREE.Vector3),this.colliderBuilder.add(e.geometry)}},{key:"addPano",value:function(e){if(this.panos.push(e),e.isAligned()){this.add(e.skyboxMesh),e.marker&&this.add(e.marker);var t=k["a"].boundExpandLength,i=new THREE.Vector3(2*t,2*t,2*t),n=(new THREE.Box3).setFromCenterAndSize(e.position,i);this.boundingBoxExpand.union(n),this.panoBounding.expandByPoint(e.position)}}},{key:"removePano",value:function(e){var t=this.panos.indexOf(e);t>-1&&this.panos.splice(t,1)}},{key:"addView",value:function(e){this.views.push(e)}},{key:"removeView",value:function(e){var t=this.views.indexOf(e);t>-1&&this.views.splice(t,1)}},{key:"distanceToPoint",value:function(e){var t=null,i=1/0;return this.collider.children.forEach((function(n){n.geometry.boundingBox||n.geometry.computeBoundingBox();var o=n.geometry.boundingBox.distanceToPoint(e);(!t||i>o)&&(i=o,t=n)})),i}},{key:"build",value:function(){this.collider=this.colliderBuilder.build(!0),this.add(this.collider),this.center=this.boundingBox.center(),this.conservativeBoundingBox.copy(this.boundingBox),this.conservativeBoundingBox.min.y=p["a"].lowerMedian(this.collider.children.map((function(e){return e.geometry.boundingBox.min.y})),5),this.conservativeBoundingBox.max.y=p["a"].lowerMedian(this.collider.children.map((function(e){return e.geometry.boundingBox.max.y})),5),this.colliderBuilder=null}},{key:"toShortString",value:function(){return p["a"].nth(this.floorIndex+1)}},{key:"toString",value:function(){return this.name}}]),i}(THREE.Object3D);function C(e){var t=D();return function(){var i,n=Object(u["a"])(e);if(t){var o=Object(u["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(c["a"])(this,i)}}function D(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var V=function(e){Object(s["a"])(i,e);var t=C(i);function i(e){var o;return Object(n["a"])(this,i),o=t.call(this),o.model=e,o.exploded=!1,o}return Object(o["a"])(i,[{key:"add",value:function(e){Object(T["a"])(Object(u["a"])(i.prototype),"add",this).call(this,e),this.model.add(e)}},{key:"getIndex",value:function(e){return e.floorIndex}},{key:"build",value:function(){this.list.forEach((function(e){e.build()}))}},{key:"nextFloor",value:function(e,t){return this.index[e.floorIndex+t]||null}},{key:"getFloorAtPoint",value:function(e){for(var t=null,i=1/0,n=0;n<this.list.length;n++){var o=this.list[n],a=o.distanceToPoint(e);(!t||i>a)&&(i=a,t=o)}return t}},{key:"getOrMakeFloor",value:function(e){var t=this.index[e];return t||(t=new O(this.model,e),this.add(t)),t}},{key:"hide",value:function(){this.list.forEach((function(e){e.hide()}))}},{key:"show",value:function(){this.list.forEach((function(e){e.show()}))}}]),i}(v["a"]);function I(e){var t=j();return function(){var i,n=Object(u["a"])(e);if(t){var o=Object(u["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(c["a"])(this,i)}}function j(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var L=function(e){Object(s["a"])(i,e);var t=I(i);function i(e,o,r){var s;Object(n["a"])(this,i),e=e.clone().expandByScalar(.01);var l=e.getSize(),c=new THREE.BoxGeometry(l.x,l.y,l.z);return c.computeBoundingBox(),s=t.call(this,c,o),s.position.copy(e.getCenter()),s.frustumCulled=!1,r&&s.add(new THREE.WireframeHelper(Object(a["a"])(s))),s}return i}(THREE.Mesh),F=i("4be4");function H(e){var t=z();return function(){var i,n=Object(u["a"])(e);if(t){var o=Object(u["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(c["a"])(this,i)}}function z(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var N=function(e){Object(s["a"])(i,e);var t=H(i);function i(e){var o;Object(n["a"])(this,i);var a=new F["a"]({side:THREE.BackSide,transparent:!0});return a.uniforms.modelAlpha.value=0,a.uniforms.opacity.value=1-k["a"].modelAlpha,o=t.call(this,e,a),o.renderOrder=x["a"].boundingSkybox,o}return i}(L),B=i("ec11"),U=(i("90b3"),i("f121")),W=(i("3b2b"),i("53ca")),q=(i("a481"),i("d9c2")),G={getAuthorizationHeader:function(){var e=q["a"].valueFromHash("auth");if(e)return e.replace(","," ");var t=q["a"].valueFromCookie("token");return t?"Token "+t:null},getModelIDFromQueryString:function(){return q["a"].valueFromHash("model")||q["a"].valueFromHash("m")},normalizeModeldata:function(e,t){e=JSON.parse(JSON.stringify(e));var i=null;if(e.images.forEach((function(n){if(n.metadata&&"string"==typeof n.metadata)try{n.metadata=JSON.parse(n.metadata)}catch(e){y["a"].warn("Unable to parse image metadata"),n.metadata=null}else"object"==Object(W["a"])(n.metadata)&&y["a"].debug("image.metadata already a JSON object");n.metadata&&(n.metadata.camera_quaternion&&(n.metadata.camera_quaternion=t.convertWorkshopQuaternion(n.metadata.camera_quaternion)),n.metadata.camera_position&&(n.metadata.camera_position=t.convertWorkshopVector(n.metadata.camera_position)),!i&&e.icon&&e.icon===n.sid&&(i=n.metadata))})),i&&i.camera_quaternion&&i.camera_position&&i.scan_position&&i.scan_quaternion){var n={};n.pano={quaternion:t.convertWorkshopPanoramaQuaternion(i.scan_quaternion),position:t.convertWorkshopVector(i.scan_position),uuid:i.scan_id},n.camera={quaternion:i.camera_quaternion,position:i.camera_position},e.startPano=n}return e},visionVersionToInt:function(){var e=new RegExp(["(?:[0-9.]+\\.){1,4}","([0-9]+)","[^\\.]*$"].join(""));return function(t){if(!t)throw new Error("Vision version is required");var i=e.exec(t);if(null===i)throw new Error("String is not a vision version: "+t);return parseInt(i[1])}}(),modelDataPromisesTiles:function(e){if(e.vision_version)try{return l.visionVersionToInt(e.vision_version)>=l.visionVersionToInt(settings.visionTilingStartVersion)}catch(t){y["a"].warn("Invalid vision version: "+e.vision_version)}var t=e.created?new Date(e.created):null;return t&&t>=r.visionTilingStartDate}},Q=G,Y=i("8eb6"),X=i("1787"),Z=i("c75e"),J=function(){function e(){Object(n["a"])(this,e),Object(d["a"])(this,"changefloorLogoOpa",(function(e){if(this.firstLogo){var t=0==e.index?this.firstLogo:this.secondLogo;R["a"].cancelById("flOpa_"+e.index),void 0!=e.from&&(t.material.uniforms.opacity.value=e.from),e.dur?R["a"].start(_["a"].uniform(t,"opacity",e.opa),e.dur||0,null,e.delay||0,S["a"]["easeInQuad"],"changefloorLogoOpa","flOpa_"+e.index):t.material.uniforms.opacity.value=e.opa}})),Object(d["a"])(this,"updateFloorlogo",function(){var e=new THREE.Quaternion,t=function(e,t,i){return Math.abs(e-t)<i};return function(i){var n,o;if(!this.fixDirection&&(i&&this.firstLogo&&this.secondLogo&&((this.firstLogo.visible||0!=this.firstLogo.material.uniforms.opacity.value||this.secondLogo.visible||0!=this.secondLogo.material.uniforms.opacity.value)&&(o=!0),o))){var a=h["objects"].player.camera.quaternion,r=t(a.x,e.x,.005)&&t(a.y,e.y,.005)&&t(a.z,e.z,.005)&&t(a.w,e.w,.005);if(r||(e=a.clone()),!r){if(!n){var s=new THREE.Vector3(0,0,-1);s.applyQuaternion(i),s.setY(0);var l=(new THREE.Matrix4).lookAt(s,new THREE.Vector3,new THREE.Vector3(0,1,0));n=(new THREE.Quaternion).setFromRotationMatrix(l);var c=new THREE.Quaternion(0,.7071067811865476,.7071067811865476,0);n.multiply(c)}this.firstLogo.quaternion.copy(n),this.secondLogo.quaternion.copy(n)}}}}()),Object(d["a"])(this,"setDir",(function(e){this.fixDirection&&(this.firstLogo.rotation.z=THREE.Math.degToRad(-e),this.secondLogo.rotation.z=THREE.Math.degToRad(-e))})),this.fileName="0.png",this.firstLogo=null,this.secondLogo=null,this.fixDirection=!1,this.bindEvents()}return Object(o["a"])(e,[{key:"createFloorLogo",value:function(){var e=X["default"].load(this.getUrl());this.firstLogo=this.getLogoMesh(e),this.secondLogo=this.getLogoMesh(e),this.secondLogo.visible=!1,Z["a"].emit("sign/Ready")}},{key:"changeFloorLogo",value:function(e){if(null!=this.firstLogo||null!=this.secondLogo)if(this.firstLogo.material.uniforms.map.value&&this.firstLogo.material.uniforms.map.value.dispose(),this.secondLogo.material.uniforms.map.value&&this.secondLogo.material.uniforms.map.value.dispose(),e.url){var t=X["default"].load(e.url);this.firstLogo.material.uniforms.map.value=t,this.secondLogo.material.uniforms.map.value=t}else if(e.image){var i=new THREE.Texture(e.image);i.needsUpdate=!0,this.firstLogo.material.uniforms.map.value=i,this.secondLogo.material.uniforms.map.value=i,this.firstLogo.material.needsUpdate=!0,this.secondLogo.material.needsUpdate=!0}}},{key:"getUrl",value:function(){return U["a"].urls.getFloorLogoPath(this.fileName)+"?m="+U["a"].version}},{key:"getLogoMesh",value:function(e){var t=THREE.UniformsUtils.clone(Y["a"].floorLogo.uniforms);t.map.value=e;var i=new THREE.ShaderMaterial({fragmentShader:Y["a"].floorLogo.fragmentShader,vertexShader:Y["a"].floorLogo.vertexShader,uniforms:t,side:THREE.DoubleSide,transparent:!0,depthWrite:!1,depthTest:!1}),n=new THREE.Mesh(new THREE.PlaneGeometry(2.5,2.5,1,1),i);n.name="floorlogo";var o=(k["a"].floorLogo.size||100)/100;return n.scale.set(o,o,o),n.position.set(k["a"].floorLogo.position.x,k["a"].floorLogo.position.y,k["a"].floorLogo.position.z),n.lookAt(n.position.clone().add(new THREE.Vector3(0,1,0))),n.renderOrder=k["a"].floorLogo.renderOrder,n}},{key:"bindEvents",value:function(){var e=this;Z["a"].on("sign/Set/Image",(function(t){e.changeFloorLogo({url:t})})),Z["a"].on("sign/Set/Size",(function(t){var i=t/100;e.firstLogo&&e.firstLogo.scale.set(i,i,i),e.secondLogo&&e.secondLogo.scale.set(i,i,i)})),Z["a"].on("sign/Set/fixDirection",(function(t){t&&(e.fixDirection=t,e.compass&&e.setDir(e.compass.angle))}))}}]),e}(),K=i("dfd6"),ee=i("07fe"),te=i("2909"),ie=(i("6762"),i("2fdb"),i("456d"),i("7514"),i("4c16")),ne=i("bc19"),oe=(i("cbe8"),i("9923")),ae=!0;function re(e){var t=this;this.sid=e.sid,this.setPoints(e.points),this.state=e.state||"active",this.elem=$('<div class="ruler" data-name="" style="display:none"><div class="ruler-line"><em></em><div class="ruler-label"><div class="ruler-label-point"></div><span class="ruler-label-name">约0.5米</span></div></div></div>'),$(".widgets-rulers").append(this.elem),this.text=e.text||"",ae&&(this.length=Math.round(100*this.points[0].distanceTo(this.points[1]))/100,this.text=oe["a"].t("common.meter",{meter:this.length})),window.ifTest&&e.color&&setTimeout((function(){t.elem.find("em").css("background",e.color)}),1e3),this.elem.find(".ruler-label-name").html(this.text),h["objects"].player.cornerRulers.push(this)}re.prototype.setPoints=function(e){this.points=e},re.prototype.remove=function(){this.elem.remove()},re.prototype.getCrossPoint=function(e,t){var i,n,o,a=h["objects"].player.domElement.clientWidth,r=h["objects"].player.domElement.clientHeight,s=(t.x-e.x)/(t.y-e.y),l=function(t){return s*(t-e.y)+e.x},c=function(t){return 1/s*(t-e.x)+e.y};return t.x>a||t.x<0?(o=t.x>a?a:0,t.y<0||t.y>r?(n=t.y<0?0:r,i=l(n),(i>a||i<0)&&(i=o,n=c(i))):(i=o,n=c(i))):(n=t.y<0?0:r,i=l(n)),new THREE.Vector2(i,n)},re.prototype.getPosInCrossPoint=function(e,t){var i=h["objects"].player.domElement.clientWidth,n=h["objects"].player.domElement.clientHeight;return ne["a"].getCrossPointAtRect(e,t,i,n,0,0)},re.prototype.getPosAtSphere=function(e){this.fishPoints=[],this.points.forEach(function(t){var i=ie["a"].getPosAtSphere(t.clone(),e);this.fishPoints.push(i)}.bind(this))};var se=1;re.prototype.getPosInScreen=function(e,t,i){var n=e.point.clone().add(t.point).multiplyScalar(.5),o=ie["a"].getPos2d(n);if(o.trueSide){var a=e.pos2d.trueSide?e.pos2d:t.pos2d;return o.inSight&&(o.pos=this.getPosInCrossPoint(a.pos,o.pos),o.vector=null),{result:"p1p2",p1:a,p2:o}}if(!(i+1>se)){var r=e.pos2d.trueSide?e:t;return this.getPosInScreen(r,{point:n,pos2d:o},++i)}},re.prototype.update=function(){if("panorama"==h["objects"].player.mode&&"active"==this.state){var e=ie["a"].getPos2d(this.points[0]),t=ie["a"].getPos2d(this.points[1]);if(!e.trueSide||!t.trueSide){if(!e.trueSide&&!t.trueSide)return void this.elem.css("display","none");var i=this.getPosInScreen({point:this.points[0],pos2d:e},{point:this.points[1],pos2d:t},0);if(!i)return void this.elem.css("display","none");e=i.p1,t=i.p2}var n=e.pos,o=t.pos,a=n.distanceTo(o);if(0!=a){var r=Math.acos((n.x-o.x)/a);r%=360,r*=180/Math.PI;var s=n.clone().sub(o),l=new THREE.Vector3(s.x,s.y,0),c=new THREE.Vector3(1,0,0),u=l.cross(c).z>0?1:-1;r*=u,this.elem.find(".ruler-line").css({width:a+"px",left:t.pos.x+"px",top:t.pos.y+"px",transform:"rotate("+-r+"deg)"});var d,p,f=.5,m=h["objects"].player.domElement.clientWidth,v=h["objects"].player.domElement.clientHeight;if(e.inSight&&t.inSight)d=(n.x+o.x)/2;else{var g,y;g=e.inSight?n.clone():this.getCrossPoint(o,n),y=t.inSight?o.clone():this.getCrossPoint(n,o);var b=g.clone().add(y).multiplyScalar(.5);if(d=b.x,p=b.y,b.x>m||b.x<0||b.y>v||b.y<0)return void this.elem.css("display","none");if(o.x==n.x){if(o.y==n.y)return void console.warn("pos1和2一样???");f=o.y<n.y?(p-o.y)/(n.y-o.y):(o.y-p)/(o.y-n.y)}else f=o.x<n.x?(d-o.x)/(n.x-o.x):(o.x-d)/(o.x-n.x);if(f<0||f>1)return void this.elem.css("display","none")}this.elem.css("display",""),"left"!=this.dir&&d<m/2||"right"==this.dir?this.elem.find(".ruler-label").addClass("reverse"):this.elem.find(".ruler-label").removeClass("reverse"),this.elem.find(".ruler-label").css({transform:"rotate("+r+"deg)",left:100*f+"%"})}else console.warn("ruler间距为0!")}else this.elem.css("display","none")};var le=re,ce=i("eb02"),ue=(i("af56"),i("0c20"),{getShapeGeo:function(e,t){var i=new THREE.Shape;i.moveTo(e[0].x,e[0].y);for(var n=1,o=e.length;n<o;n++)i.lineTo(e[n].x,e[n].y);t&&t.forEach((function(e){var t=new THREE.Path;t.moveTo(e[0].x,e[0].y);for(var n=1,o=e.length;n<o;n++)t.lineTo(e[n].x,e[n].y);i.holes.push(t)}));var a=new THREE.ShapeBufferGeometry(i);return a},getUnPosPlaneGeo:function(){var e=new Uint16Array([0,1,2,0,2,3]),t=new Float32Array([0,0,1,0,1,1,0,1]),i=new THREE.BufferGeometry;return i.setIndex(new THREE.BufferAttribute(e,1)),i.addAttribute("uv",new THREE.BufferAttribute(t,2)),function(){return i}}(),getPlaneGeo:function(e,t,i,n){var o=this.getUnPosPlaneGeo().clone(),a=new Float32Array([e.x,e.y,e.z,t.x,t.y,t.z,i.x,i.y,i.z,n.x,n.y,n.z]);return o.addAttribute("position",new THREE.BufferAttribute(a,3)),o.computeVertexNormals(),o.computeBoundingSphere(),o},drawPlane:function(e,t,i,n,o){var a=new THREE.Mesh(this.getPlaneGeo(e,t,i,n),o);return a},movePlane:function(e,t,i,n,o){var a=new Float32Array([t.x,t.y,t.z,i.x,i.y,i.z,n.x,n.y,n.z,o.x,o.y,o.z]);e.geometry.addAttribute("position",new THREE.BufferAttribute(a,3)),e.geometry.computeBoundingSphere()}}),de=ue,he={roomInfo:{},rulerVisi:!1,version:2,cad:null,planeNeedAdjust:[],appType:null};$(".widgets-rulers").css("display","none"),$(".widgets-plan-labels").css("display","none"),$(".widgets-doll-labels").css("display","none"),Z["a"].on("rule/Visible",(function(e,t){he.rulerVisi=e,U["a"].isEdit?e?h["objects"].player.mode&&h["objects"].player.currentPano&&h["objects"].player.FlyToMode("panorama",(function(){he.shineRulers(!0)})):he.shineRulers(!1):("vrhouse"==U["a"].name?"vrhouse"==t||he.cad&&he.initRoomInfo(he.cad):e?he.cad&&he.initRoomInfo(he.cad):(he.initType="noRuler",he.cad&&he.initRoomInfo(he.cad,"noRuler")),he.updateRulersVisi())})),Z["a"].on("scene/LoadFloor",(function(){var e=ce["a"].getters["scene/floor"];he.initRoomInfo(e)})),he.initRoomInfo=function(e){var t=this,i=h["objects"].model;if(e&&(e=p["a"].compatiblev2(e,null,"all"),(U["a"].isEdit||he.rulerVisi||"noRuler"==he.initType||"vrhouse"==U["a"].name)&&(!Object.keys(this.roomInfo).length||!this.roomInfo[Object.keys(this.roomInfo)[0]].rooms.length))){var n=ce["a"].getters["scene/metadata"];if(n){var o=new THREE.MeshBasicMaterial({transparent:!0,wireframe:!0,opacity:.3,color:"#ff9999",depthTest:!1,side:THREE.DoubleSide}),a=new THREE.Object3D;if(i.add(a),a.visible=!1,this.cad=e,e&&(!e.room&&e["vertex-xy"]&&(this.version=2),2==this.version)){var r=function(e){if(U["a"].isEdit){var t;if("wall"==e.type){var i=new THREE.Vector3(e.point1.x,e.top,-e.point1.y),n=new THREE.Vector3(e.point2.x,e.top,-e.point2.y),r=new THREE.Vector3(e.point1.x,e.bottom,-e.point1.y),s=new THREE.Vector3(e.point2.x,e.bottom,-e.point2.y);t=de.getPlaneGeo(i,n,s,r)}else if("floor"==e.type){if(e.points.length<3)return;t=de.getShapeGeo(e.points);var l=new THREE.Matrix4;l.set(1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1),t.applyMatrix(l),t.computeVertexNormals()}var c=new THREE.Mesh(t,o);c.name="tagBound_"+e.type+"_"+e.index,"floor"==e.type&&c.position.setY(e.bottom),a.add(c)}},s=function(e){try{var t=new THREE.Vector3(e.point1.x,e.bottom,-e.point1.y)}catch(a){console.log(1)}var i=new THREE.Vector3(e.point2.x,e.bottom,-e.point2.y),n=new THREE.Vector3(e.point1.x,e.top,-e.point1.y);if("noRuler"!=he.initType){e.points.push({x:t.x,y:t.z});var o={pointBtm:t,pointTop:n};o.horizon=new le({sid:"r_horiz_"+e.type+e.parentIndex+"_"+e.index,points:[t,i],state:"unable"}),e.isOutSide||(o.verti=new le({sid:"r_verti_"+e.type+e.parentIndex+"_"+e.index,points:[t,n],state:"unable"})),o.visiblePanos=[],e.pointInfos.push(o)}e.boundingBox.expandByPoint(t),e.boundingBox.expandByPoint(i),e.boundingBox.expandByPoint(n)},l=function(e){var t;if(!("noRuler"==he.initType||e.points.length<2)){var i=ne["a"].getArea(e.points)>0,n={type:e.type,pointInfos:e.pointInfos,isClockWise:i,point2ds:e.points,panos:[]};e.rooms.push(n),e.isClosedRing?e.pointInfos.forEach((function(t,i){t.last=e.pointInfos[(i+e.pointInfos.length-1)%e.pointInfos.length],t.next=e.pointInfos[(i+1)%e.pointInfos.length],t.room=n})):e.pointInfos.forEach((function(t,i){0!=i&&(t.last=e.pointInfos[i-1]),i!=e.pointInfos.length&&(t.next=e.pointInfos[i+1]),t.room=n})),(t=e.allPointsInfos).push.apply(t,Object(te["a"])(e.pointInfos)),console.log(e.type+e.index+" isClockWise "+i)}},c=function(e,t,i){var n=(e+1)*parseInt(256/t);return n=n.toString(16),"block"==i?"#"+n+n+n:"#0000"+n},u=function(e,t){for(var i=0;i<e.block.length;i++)if(e.block[i].ground.includes(t)||e.block[i].wall.includes(t))return e.block[i]},d=function(e,t,i){for(var n=0,o=i.length;n<o;n++)if(i[n].id==t)return i[n]},f=function(e,t,i){for(var n=0,o=e.segment.length;n<o;n++){var a=e.segment[n];if(a.a==t&&a.b==i||a.a==i&&a.b==t)return a.id}},m=function(e,t){e.visibleRulerInfos=[];var i=t[e.floorIndex];if(i){for(var n=0;n<i.rooms.length;n++){var o=i.rooms[n],a=!1;a=ne["a"].isPointInArea(o.point2ds,{x:e.position.x,y:e.position.z}),o.pointInfos.forEach((function(t){var i=t.pointBtm.distanceTo(e.position),n=Math.max(t.last?1.5*t.last.horizon.length:0,t.horizon?1.5*t.horizon.length:0,4);if(i<n){if(t.last&&t.next){i=t.pointBtm.clone().sub(e.position).setY(0);var r=t.next.pointBtm.clone().sub(t.pointBtm).setY(0),s=t.last.pointBtm.clone().sub(t.pointBtm).setY(0);if(a==o.isClockWise?r.clone().cross(i).y>0&&t.horizon.length>.2||s.clone().cross(i).y<0&&t.last.horizon.length>.2:r.clone().cross(i).y<0&&t.horizon.length>.2||s.clone().cross(i).y>0&&t.last.horizon.length>.2)return}t.visiblePanos.push(e),e.visibleRulerInfos.push(t)}}))}e.belongToRoom=null}else console.error("ifPanoSeePoints 没找到楼层")};e.floors.forEach((function(e,i){var n=[],o=[],p=new THREE.Box3;e.block.forEach((function(t,i){var a,u=[],h=t.ground,m=t.wall,v=d(e,t.top,e["vertex-z"]).z,g=d(e,t.bottom,e["vertex-z"]).z,y=[];c(i,e.block.length,"block");if(h.length>0)h.forEach((function(i,n){var o=d(e,i,e["vertex-xy"]),a=d(e,h[(n+1)%h.length],e["vertex-xy"]),l=f(e,i,h[(n+1)%h.length]),c=m.includes(l);s({point1:o,point2:a,points:y,type:"block",top:v,bottom:g,pointInfos:u,parentIndex:t.id,index:n,isOutSide:!c,boundingBox:p}),r({point1:o,point2:a,top:v,bottom:g,type:"wall",index:t.id+"_"+n})})),a=y.length>2;else if(m.length){var b,w=[];if(m.length>1){var E=d(e,m[0],e.segment),T=d(e,m[1],e.segment);if(T.a==E.a||T.b==E.a)b=!0;else{if(T.a!=E.b&&T.b!=E.b)return void console.error("wall不连续??? block: ".concat(t.id));b=!1}}m.forEach((function(i,n){var o=d(e,i,e.segment);if(0==w.length&&!b||w[w.length-1]==o.a){w.push(o.a,o.b);var l=d(e,o.a,e["vertex-xy"]),c=d(e,o.b,e["vertex-xy"])}else{if(!(0==w.length&&b||w[w.length-1]==o.b))return void console.error("wall不连续??wallId:".concat(i," block: ").concat(t.id));l=d(e,o.b,e["vertex-xy"]),c=d(e,o.a,e["vertex-xy"]);w.push(o.b,o.a)}s({point1:l,point2:c,points:y,type:"block",top:v,bottom:g,pointInfos:u,parentIndex:t.id,index:n,boundingBox:p}),r({point1:l,point2:c,top:v,bottom:g,type:"wall",index:t.id+"_"+n}),a=w[0]==w[w.length-1]}))}l({points:y,pointInfos:u,isClosedRing:a,type:"block",index:i,allPointsInfos:n,rooms:o}),r({points:y,bottom:g,top:v,type:"floor",index:i})})),e.hole.forEach((function(t,i){if(!t.plane||0!=t.plane.z){var a=[];if(!(t.point.length<2)){var u=d(e,t.inside,e.block),h=d(e,u.top,e["vertex-z"]).z,f=d(e,u.bottom,e["vertex-z"]).z,m=[];c(i,e.hole.length);t.point.forEach((function(e,n){var o=t.point[(n+1)%t.point.length];s({point1:e,point2:o,points:m,type:"hole",top:h,bottom:f,pointInfos:a,parentIndex:i,index:n,boundingBox:p}),r({point1:e,point2:o,top:h,bottom:f,type:"wall",index:i+"_"+n})})),l({points:m,pointInfos:a,isClosedRing:t.point.length>2,type:"hole",index:t.inside,rooms:o,allPointsInfos:n})}}})),e.furnColumn.concat(e.furnFlue).forEach((function(e,t){for(var i=[],a=e.top,r=e.bottom,c=[],u=0,d=e.pos.length;u<d;u+=2){var h={x:e.pos[u],y:e.pos[u+1]},f={x:e.pos[(u+2)%e.pos.length],y:e.pos[(u+3)%e.pos.length]};s({point1:h,point2:f,points:c,type:"freeColumn",top:a,bottom:r,pointInfos:i,parentIndex:t,index:u/2,boundingBox:p})}l({points:c,pointInfos:i,isClosedRing:!0,type:"column",index:t,allPointsInfos:n,rooms:o})})),function(){var t=[1,3,2,0];e.column.forEach((function(i,a){var r=[],c=u(e,i.line);if(c){for(var h=d(e,c.top,e["vertex-z"]).z,f=d(e,c.bottom,e["vertex-z"]).z,m=[],v=0;v<3;v++){var g={x:i.pos[2*t[v]],y:i.pos[2*t[v]+1]},y={x:i.pos[2*t[v+1]],y:i.pos[2*t[v+1]+1]};s({point1:g,point2:y,points:m,type:"column",top:h,bottom:f,pointInfos:r,parentIndex:a,index:v/2,boundingBox:p,rooms:o,allPointsInfos:n})}l({points:m,pointInfos:r,isClosedRing:!1,type:"column",index:a,allPointsInfos:n,rooms:o})}else console.log("有柱子找不到房间 ",a)}))}();i=app.model.floors.list.length>1?void 0!=e.subgroup?e.subgroup:e.id:app.model.floors.list[0].floorIndex;t.roomInfo[i]={pointInfos:n,boundingBox:p,center:p.getCenter(),rooms:o,oriRoomGroup:a},void 0!=e.name&&(h["objects"].model.floors.index[i].name=e.name)})),this.reSetSkyBox(),"noRuler"!=he.initType&&i.panos.list.forEach((function(e){m(e,t.roomInfo)}))}he.rulerVisi&&he.updateRulersVisi(),he.planeNeedAdjust.length&&(he.planeNeedAdjust.forEach((function(e){var t=he.roomInfo[e.index].boundingBox;t.max.y!=-1/0&&i.cadFloorPlane.adjustPlane(t,e.index,null,null,e.onlyHeight)})),he.planeNeedAdjust=[])}}},he.updateRulersVisi=function(){var e;return function(t){var i=h["objects"].player;if(this.roomInfo)if(window.showAllRulerForTest)i.cornerRulers.forEach((function(e){e.state="active",e.update()}));else{if(!1===t||!this.rulerVisi||U["a"].isEdit&&(h["objects"].mainDesign&&h["objects"].mainDesign.editing||"screen"==ce["a"].getters.page)||"panorama"!=i.mode||k["a"].vrEnabled||!i.currentPano||1==this.version&&void 0==i.currentPano.belongToRoom||h["objects"].tagManager.editSpot.setSpotPos||!i.currentPano.isAligned()||i.enteringView||i.EditOverlay&&i.EditOverlay.editing||i.EditPanoVideo&&i.EditPanoVideo.editing)return e&&[e.horizon,e.verti&&e.verti,e.last&&e.last.horizon].forEach((function(e){e&&(e.state="unable",e.update())})),void(e=null);var n=i.currentPano.visibleRulerInfos;if(n){var o=[],a=[],r=i.getDirection().setY(0).normalize(),s=[function(e){var t=-e.pointBtm.distanceTo(i.position)/3;return t},function(e){var t=e.pointBtm.clone().sub(i.position).setY(0).normalize(),n=r.dot(t),o=10*Math.pow(n,3);return o},function(e){var t=2;return e.horizon.length<.4&&(!e.last||e.last.horizon.length<.4)&&(t-=1),t}],l=p["a"].sortByScore(n,a,s);if(l&&l[0]&&l[0].item!=e||(!l||!l[0])&&e){if(e&&(e.horizon.state="unable",o.push(e.horizon),e.verti&&(e.verti.state="unable",o.push(e.verti)),e.last&&(e.last.horizon.state="unable",o.push(e.last.horizon))),l&&l[0]){e=l[0].item,e.horizon.state="active",e.verti&&(e.verti.state="active"),e.last&&(e.last.horizon.state="active");var c=2,u=e.pointBtm.distanceTo(i.currentPano.origin);u>e.horizon.length*c?e.horizon.dir=this.isClockWise?"left":"right":e.horizon.dir="",e.last&&(u>e.last.horizon.length*c?e.last.horizon.dir=this.isClockWise?"right":"left":e.last.horizon.dir="")}else e=null;i.rulerGroupShowing=e}e&&(o.push(e.horizon),e.last&&o.push(e.last.horizon),e.verti&&o.push(e.verti)),o.forEach((function(e){e.update()}))}}}}(),he.shineRulers=function(e){var t=h["objects"].player;if(e){if(this.noVisibleRuler)return;var i=t.currentPano.visibleRulerInfos;if(!i||0==i.length){var n=h["objects"].player.model.panos.list.filter((function(e){return e.visibleRulerInfos&&e.visibleRulerInfos.length>0})),o=n.sort(function(e,t){return t.position.distanceTo(h["objects"].player.currentPano)-e.position.distanceTo(h["objects"].player.currentPano)}.bind(this));return void(o&&o[0]?(console.log("重新走"),h["objects"].player.flyToPano({pano:o[0]},this.shineRulers.bind(this,e))):console.log("无路可走"))}var a=h["objects"].player.getDirection().setY(0).normalize(),r=[],s=[function(e){var t=e.pointBtm.clone().sub(h["objects"].player.position).setY(0).normalize(),i=a.dot(t),n=10*i;return n}],l=p["a"].sortByScore(i,r,s);h["objects"].player.lookAtPos(l[0].item.pointBtm,null,{speed:.03,time:500})}this.updateRulersVisi()},he.reSetSkyBox=function(){for(var e in this.roomInfo){var t=this.roomInfo[e];h["objects"].model.boundingBox.min.y=Math.min(t.boundingBox.min.y,h["objects"].model.boundingBox.min.y),h["objects"].model.boundingBox.max.y=Math.max(t.boundingBox.max.y,h["objects"].model.boundingBox.max.y)}h["objects"].model.reGetSkybox(h["objects"].model.boundingBox)};var pe=he,fe=i("44a7"),me=i("b775"),ve=i("a1f6"),ge=i("d70d"),ye=function(){function e(t){Object(n["a"])(this,e),this.model=t}return Object(o["a"])(e,[{key:"load",value:function(){var e=this;return console.time("加载Panos:"+U["a"].projectNum),new Promise((function(t,i){me["a"].getArraybuffer(U["a"].urls.visionModeldata).promise().then((function(i){console.timeEnd("加载Panos:"+U["a"].projectNum);var n=ve["a"].visionModeldata(ge["a"].decompressModeldata(i)),o=ce["a"].getters["scene/metadata"].videos.videos,a=e.model.panos;a.extend(n.map((function(t){return new B["a"](e.model,t.uuid,t,o.get(t.uuid))}))),a.forEach((function(e){e.neighbourUUIDs&&(e.neighbourUUIDs.forEach((function(t){var i=a.get(t);i&&a.setNeighbour(e,i,!0)})),e.neighbourPanos=a.getNeighbours(e)||a.setNeighbour(e,e,!0))})),0===a.length&&logger.warn("模型没有Panos数据,将禁用inside视角"),t(a)})).fail((function(e){return new Error("模型Panos数据转换出错:",e)}))}))}}]),e}(),be=ye,we=function(){function e(t){Object(n["a"])(this,e),this.model=t}return Object(o["a"])(e,[{key:"load",value:function(){return new Promise((function(e,t){me["a"].getArraybuffer(U["a"].urls.mesh).promise().then((function(t){e(ve["a"].convertProtobufToSceneObject(ge["a"].decompressMesh(t)))})).fail((function(e){throw new Error("模型Mesh数据转换出错",e)}))}))}}]),e}(),Ee=new we,Te=i("2138"),Pe=i("01d8"),xe=i("c75d"),ke=i("ab89"),Re=i("3472");function _e(e){this.position=e.pos,this.sid=e.sid,this.elem=$('<div class="room-label" style="display:none"><a></a></div>'),this.text=e.text||"",this.elem.find("a").html(this.text),e.container?e.container.append(this.elem):$(".widgets-plan-labels").append(this.elem),h["objects"].player.planLabels.push(this),this.toPano=e.toPano,this.enable=void 0==e.enable||e.enable,this.type="plan",this.floorIndex=e.floorIndex}_e.prototype.changeText=function(e){this.text=e,this.elem.find("a").html(this.text)},_e.prototype.update=function(){if("floorplan"!==h["objects"].player.mode||!this.enable||!this.text||h["objects"].model.currentFloor.floorIndex!=this.floorIndex&&!h["objects"].model.allFloorsVisible||U["a"].isEdit&&(h["objects"].mainDesign&&h["objects"].mainDesign.editing||h["objects"].player.linkEditor&&(h["objects"].player.linkEditor.setPanoVisible||h["objects"].player.linkEditor.setTagVisible)||"cad"==ce["a"].getters.page||"data"==ce["a"].getters.page))this.elem.css("display","none");else{var e=ie["a"].getPos2d(this.position);if(e.trueSide){var t=$("#player").width()*(app.model.cadFloorPlane.ImgRatio||.02)/Math.abs(app.cameraControls.activeControl.camera.left);t=THREE.Math.clamp(t,.4,3),this.elem.css({left:e.pos.x+"px",top:e.pos.y+"px",transform:"scale("+t+")"}),this.elem.css("display","")}else this.elem.css("display","none")}},_e.prototype.remove=function(){this.elem.remove();var e=h["objects"].player.planLabels.indexOf(this);e>-1&&h["objects"].player.planLabels.splice(e,1)};var Se=_e,Me=i("a59a"),Ae=i("533b"),Oe={floors:[]};function Ce(e,t){for(var i=0,n=t.length;i<n;i++)if(t[i].id==e)return t[i]}Oe.Init=function(e){var t=this;this.model=e;var i=ce["a"].getters["showNavigations"],n=ce["a"].getters["scene/metadata"];n.cadInfo&&(U["a"].isEdit||i.cad)&&(i.cad&&(this.show=!0),this.createTextures()),this.buildByCadFloor(),Z["a"].on("scene/LoadHouseFloor",(function(){t.buildByCadFloor()}))},Oe.createPlane=function(e){var t,i=h["objects"].model.floors.index[e],n=!1,o=this.model.wallManager.roomInfo[e];o&&o.boundingBox&&o.boundingBox.max.y!=-1/0?t=o.boundingBox:(t=this.model.floors.index[e].boundingBox,n=!0);var a=this.center=t.getCenter(),r=t.getSize(),s=this.getCadInfo(e);s.bound?(console.log(s.bound),r.x=s.bound.right-s.bound.left,r.z=s.bound.bottom-s.bound.top,a.x=(s.bound.right+s.bound.left)/2,a.z=(s.bound.bottom+s.bound.top)/2,n&&this.model.wallManager.planeNeedAdjust.push({index:e,onlyHeight:!0})):n&&this.model.wallManager.planeNeedAdjust.push({index:e,onlyHeight:!1});var l=new THREE.PlaneBufferGeometry(1,1),c=new THREE.MeshBasicMaterial({map:i.floorTexture,opacity:h["objects"].player.modeTran&&"floorplan"==h["objects"].player.modeTran.split("-")[1]?1:0,transparent:!0,side:THREE.DoubleSide,depthTest:!1});c.needsUpdate=!0;var u=new THREE.Mesh(l,c);this.model.add(u),i.plane=u,u.rotateX(-Math.PI/2),u.renderOrder=10,u.name="floorplanImg",this.adjustPlane(t,e,r,a,!1,s),this.changeModelOpacity(e),this.changeCadVisible(null,{autoJudge:!0})},Oe.getCadInfo=function(e){var t=ce["a"].getters["scene/metadata"].cadInfo;if(t instanceof Array)if(1==h["objects"].model.floors.list.length)t=t[0];else{var i=t.find((function(t){return t.subgroup==e}));i||(i=t[e]),t=i}return"object"!=Object(W["a"])(t)&&(t=JSON.parse(t)),t},Oe.adjustPlane=function(e,t,i,n,o,a){var r=h["objects"].model.floors.index[t];if(o)r.plane.position.y=e.max.y+.1;else{a=a||this.getCadInfo(t),i=i||e.getSize(),n=n||e.getCenter();var s=r.cadImgRatio=i.x/(r.floorTexture.image.width-a.left-a.right),l=s*r.floorTexture.image.width,c=s*r.floorTexture.image.height;this.width=l,this.height=c;var u=(a.left-a.right)/2*s,d=(a.top-a.bottom)/2*s;r.plane.position.set(n.x-u,e.max.y+.1,n.z-d),r.plane.scale.set(l,c,1),this.moveEntryArrow(t),h["objects"].player.planLabels.forEach((function(e){return e.update()}))}},Oe.moveEntryArrow=function(e){var t=h["objects"].model.floors.index[e];if(t.entryArrow&&t.cadImgRatio){var i=24,n=i*h["objects"].model.floors.index[e].cadImgRatio;t.entryArrow.moveCloseToWall(n)}},Oe.rebuildLabels=function(){this.removeRoomLabels(),this.removeEntryArrow(),this.initedCad=!1,this.buildByCadFloor()},Oe.buildByCadFloor=function(){var e=this;if(!this.initedCad){var t=ce["a"].getters["scene/houstFloor"];t=p["a"].compatiblev2(t);for(var i=!0,n=0;n<t.floors.length;n++)for(var o in t.floors[n])if(t.floors[n][o]instanceof Array&&t.floors[n][o].length>0){i=!1;break}if(!i){ce["a"].getters["scene/metadata"];t.floors.forEach((function(t){var i=app.model.floors.list.length>1?void 0!=t.subgroup?t.subgroup:t.id:app.model.floors.list[0].floorIndex,n=(e.model.wallManager.roomInfo[i],app.model.floors.index[i]),o=n.boundingBox.min.y;if(t.door){for(var a,r=0;r<t.door.length;r++)if(t.door[r].start){a=t.door[r];break}a&&(a.bottom=o+.1,a.floorIndex=i,n.entryArrow=new ke["a"](a),e.updateEntryVisi({autoJudge:!0})),e.moveEntryArrow(i)}e.hasPlaneLabels=t.tagging.length>0,U["a"].floorPlanNoRotate=e.hasPlaneLabels&&e.plane&&e.plane.visible;var s=n.panoHeightAve;t.tagging.forEach((function(e,t){var o=e.showTitle&&e.title.trim()?e.title:"",a=e.showContent&&e.content.trim()?"约"+e.content:"";if(o||a){var r=o&&a?o+"<br>"+e.content:o||a,l=new THREE.Vector3(e.pos[0],s,-e.pos[1]),c=h["objects"].player.model.panos.closestPanoTowardPoint({point:l,floor:n});c||console.error("what!!! no closetPano");var u=new Re["a"]({sid:t,pos:l.clone(),text:r,toPano:c,floorIndex:i});h["objects"].player.defaultRoomLabels.push(u);var d=new Se({sid:"pl_"+t,pos:l.clone(),text:r,floorIndex:i});h["objects"].player.defaultRoomLabels.push(d),h["objects"].player.defaultRoomLabels.forEach((function(e){e.update()}))}})),e.initDoorLabels(i,JSON.parse(JSON.stringify(t)))})),this.initedCad=!0,this.setPlanLabelVisi()}}},Oe.initDoorLabels=function(e,t){var i=[];if(t.rooms&&t.rooms[0]&&t.rooms[0].points){var n=app.model.floors.index[e],o=n.boundingBox.min.y;t.tagging=t.tagging.filter((function(e){return e.__panos=[],e.title})),console.log(t.rooms),t.rooms.forEach((function(e,t){e.name="",e.doors=e.doors||[],e.taggings=[],e.panos=[]})),t.door.concat(t.slideDoor).concat(t.doubleDoor).forEach((function(e){e.doorLabels=[],i.push(e),e.center={x:(e.pos[0]+e.pos[2])/2,y:(e.pos[1]+e.pos[3])/2},e.atRooms=[],t.rooms.forEach((function(t){var i=t.doors.find((function(t){return t.id==e.id}));i&&(e.linePoints=i.linePoints,t.doors.push(e),e.atRooms.push(t))}))})),t.rooms.forEach((function(e){e.doors=e.doors.filter((function(e){return e.atRooms}))})),n.panos.forEach((function(e){e._atRoom=null}));var a=function e(i,n,o,a){var r=ne["a"].isPointInArea(i.points,o),s=function(){a(i)};if(r){if(i.closetChilds){var l=i.closetChilds.find((function(i){return e(t.rooms.find((function(e){return e.id==i})),n,o,a)}));l||s()}else s();return!0}};t.rooms.forEach((function(e){void 0==e.closetParent&&(n.panos.forEach((function(t){!t._atRoom&&t.isAligned()&&a(e,t,{x:t.position.x,y:-t.position.z},(function(e){t._atRoom=e,e.panos.push(t)}))})),t.tagging.forEach((function(t){t._atRoom||a(e,t,{x:t.pos[0],y:t.pos[1]},(function(e){t._atRoom=e,e.taggings.push(t),e.name+=t.title+" "}))}))),e.taggings.length&&e.panos.forEach((function(t){var i=p["a"].sortByScore(e.taggings,[function(e){var i=new THREE.Vector2(t.position.x,t.position.z),n=new THREE.Vector2(e.pos[0],-e.pos[1]);return!l(n,i)}],[function(e){var i=new THREE.Vector2(t.position.x,t.position.z),n=new THREE.Vector2(e.pos[0],-e.pos[1]);return-i.distanceTo(n)}]);if(i&&i[0]){var n=i[0].item;n.__panos.push(t)}}))})),t.tagging.forEach((function(e){var t=e.__panos.filter((function(e){return e.neighbourUUIDs.length>0}));t.length&&(e.clickToPano=p["a"].sortByScore(t,[],[function(t){var i=new THREE.Vector2(t.position.x,t.position.z),n=new THREE.Vector2(e.pos[0],-e.pos[1]);return-i.distanceTo(n)}])[0].item)})),n.taggingTables=t.tagging.filter((function(e){return e.clickToPano}));var r="floor".concat(e,"(").concat(t.name||"no name",") 共有").concat(t.rooms.length,"个房间,分别是 ");t.rooms.forEach((function(e){r+="\n房间".concat(e.id," : ").concat(e.name," ")})),t.rooms.forEach((function(t){if(0!=t.taggings.length){var i=ne["a"].getArea(t.points)>0;t.doors.forEach((function(a){if(!(a.atRooms.length<2)){var r=[];if(t.closetChilds){var c=a.atRooms.find((function(e){return Ce(a.linePoints[0],e.points)&&Ce(a.linePoints[1],e.points)}));i=ne["a"].getArea(c.points)>0,c!=t&&(i=!i),r=c.points}else r=t.points;var u=s(a.linePoints[0],a.linePoints[1],r),d=Ce(a.linePoints[0],r),f=Ce(a.linePoints[1],r),m=ne["a"].getNormal({points:[d,f]}),v=new THREE.Vector3(m.x,0,-m.y);u==i&&v.negate();var g=!1,y=t.panos.filter((function(e){return e.neighbourUUIDs.length>0}));0==y.length&&(g=!0,y=n.panos.filter((function(e){if(0!=e.neighbourUUIDs.length){var t=new THREE.Vector2(a.center.x,-a.center.y),i=new THREE.Vector2(e.position.x,e.position.z);if(!(t.distanceTo(i)>5)){var n=e.position.clone().sub(new THREE.Vector3(a.center.x,0,-a.center.y));return v.angleTo(n)<Math.PI/2||void 0}}})));var b=p["a"].sortByScore(y,[],[function(e){var t=0;if(g){var i=e.position.clone().sub(new THREE.Vector3(a.center.x,0,-a.center.y));t=2*-v.angleTo(i)}var n=new THREE.Vector2(a.center.x,-a.center.y),o=new THREE.Vector2(e.position.x,e.position.z);return-n.distanceTo(o)+t}]);b&&(b=b[0].item);var w=p["a"].sortByScore(t.taggings,[],[function(e){var t=b?new THREE.Vector2(b.position.x,b.position.z):new THREE.Vector2(a.center.x,a.center.y),i=new THREE.Vector2(e.pos[0],-e.pos[1]);return-t.distanceTo(i)}])[0].item,E=new THREE.Vector3(a.center.x,o+.3,-a.center.y),T=a.atRooms.find((function(e){return e!=t&&e.name}));T||(T=a.atRooms.find((function(e){return e!=t})));var P=1.5,x=4,k=15,R=Math.PI/6,_=T.panos,S=_.filter((function(e){var t=e.position.clone().setY(0).distanceTo(E.clone().setY(0));if(!(t<P||t>k)){if(t>x)return!l(E,e.position,a.line);var i=_.find((function(t){return B["a"].filters.isInFanAngle(E,e.position.clone().sub(E).setY(0),R)(t)}));return i?!l(E,e.position,a.line):void 0}})),M=new Me["a"]({doorDir:v,text:w.title,pos:E,visiblePanos:S,sameRoomPanos:_,toPano:b,aim:new THREE.Vector3(w.pos[0],0,-w.pos[1]),floorIndex:e});M.door=a,M.forRoom=t,M.forTag=w,a.doorLabels.push(M),h["objects"].player.defaultRoomLabels.push(M)}}))}})),i=i.filter((function(e){return e.atRooms.length>1})),r+="\n中通门共有".concat(i.length,"扇: \n"),i.forEach((function(e,t){r+="门".concat(e.id,"在 "),e.atRooms.forEach((function(e){r+="房间".concat(e.id,"(").concat(e.name,")、 ")})),r+="的边上 \n"})),console.log("%c".concat(r),"color:#13f"),h["objects"].player.doorLabels.forEach((function(e){e.update()})),h["objects"].player.updateLabelZIndex(["doorLabels"]),Me["a"].updateCameraDir()}else console.log("没有room or 数据不标准 得不到doorlabels");function s(e,t,i){var n=i.find((function(t){return t.id==e})),o=i.find((function(e){return e.id==t})),a=i.indexOf(n),r=i.indexOf(o);return(r-a+i.length)%i.length===1}function l(e,i,n){var o=[new THREE.Vector2(e.x,-e.z),new THREE.Vector2(i.x,-i.z)],a=t.wall.find((function(e){if(e.id!=n){var i=Ce(e.p1,t.vertex),a=Ce(e.p2,t.vertex),r=[i,a];return ne["a"].isLineIntersect(o,r)}}));return a}},Oe.removeEntryArrow=function(){h["objects"].model.floors.forEach((function(e){e.entryArrow&&e.entryArrow.dispose(),e.entryArrow=null}))},Oe.removeRoomLabels=function(){h["objects"].player.defaultRoomLabels.forEach((function(e){e.remove()})),h["objects"].player.defaultRoomLabels=[],h["objects"].player.cornerRulers.forEach((function(e){e.remove()})),h["objects"].player.cornerRulers=[]},Oe.updateEntryVisi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(!h["objects"].mainDesign||!h["objects"].mainDesign.editing)&&(!h["objects"].player.EditOverlay||!h["objects"].player.EditOverlay.editing);h["objects"].model.floors.forEach((function(i){if(i.entryArrow){var n=t;if(t)if(0==e.visi)n=!1;else{var o=h["objects"].player.modeTran.split("-")[1];n="floorplan"==o?i.plane&&i.plane.visible:"panorama"!=o,n=n&&("dollhouse"==o||h["objects"].model.currentFloor.floorIndex==i.floorIndex)}n?i.entryArrow.show():i.entryArrow.hide()}}))},Oe.changePlaneOpacity=function(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};console.log("changePlaneOpacity "+e+","+t+","+n.dontChangeModel);var o=h["objects"].model.floors.index[e];if(o.plane){o.plane.visible||(i=0);var a=o.plane.material.opacity;R["a"].cancel(o.plane.transition_),t!=a?o.plane.transition_=R["a"].start(_["a"].property(o.plane.material,"opacity",t,(function(){n.dontChangeModel||Oe.changeModelOpacity(e)})),i,null,n.delay||0,S["a"].easeInOutQuad,"changePlaneOpacity"):n.dontChangeModel||Oe.changeModelOpacity(e)}},Oe.changeModelOpacity=function(e){var t=1,i=k["a"].modelOpaWhenFloorPlaneShow,n=h["objects"].model.floors.index[e].plane;if(n){n.visible&&(t=(i-1)*n.material.opacity+1);var o=h["objects"].model.floors.index[e];o.chunks.forEach((function(e){e.materialInside.uniforms.opacity.value=t,e.materialOutside.uniforms.opacity.value=t}))}},Oe.createTextures=function(){var e=this,t=new THREE.TextureLoader,i=h["objects"].model.floors.list.length>1;h["objects"].model.floors.forEach((function(n){n.floorTexture&&(n.floorTexture.dispose(),n.floorTexture=null);var o=i?"images/images#m#/floorplan_".concat(n.floorIndex,".png"):"images/images#m#/floorplan.png",a=U["a"].getModelPrefixFuc()(o)+"?m="+U["a"].version;t.load(a,function(e){e.needsUpdate=!0,n.floorTexture=e,Oe.createPlane(n.floorIndex)}.bind(e),(function(e){}),(function(e){app.model.floors.list.length>1?console.warn("没有 floorplan_".concat(n.floorIndex,".png")):console.warn("没有 floorplan.png")}))}))},Oe.remove=function(){h["objects"].model.floors.forEach((function(e){null!=e.plane&&(e.plane.parent.remove(e.plane),e.plane.geometry.dispose(),e.plane.material.dispose(),e.plane=null),e.cadImgRatio=null})),this.removeEntryArrow(),this.removeRoomLabels(),this.show=null,this.initedCad=!1},Oe.setPlanLabelVisi=function(e){var t=!0;return function(){var e=app.store.getters["scene/metadata"]||{};if(void 0==e.floorPlanAngle&&this.initedCad){var i=!(this.plane&&this.plane.visible);i!=t&&(h["objects"].player.defaultRoomLabels.forEach((function(e){"plan"==e.type&&(e.enable=i,e.update())})),t=i)}}}(),Oe.changeCadVisible=function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};void 0!=i.show&&(this.show=i.show),i.autoJudge&&(e=this.show&&(!h["objects"].mainDesign||!h["objects"].mainDesign.editing)&&"cad"!=ce["a"].getters.page&&"data"!=ce["a"].getters.page&&(!h["objects"].player.linkEditor||!h["objects"].player.linkEditor.setPanoVisible&&!h["objects"].player.linkEditor.setTagVisible)),h["objects"].model.floors.forEach((function(i){i.plane?i.plane.visible=!!e:console.log("还没有创建plane"),t.setPlanLabelVisi(i.floorIndex),t.updateEntryVisi({autoJudge:!0})})),h["objects"].model._setFloor(h["objects"].model.currentFloor,h["objects"].player.modeTran.split("-")[1],!0)},window.searchRooms=function(e){var t=JSON.parse(e);t.floors.forEach((function(e,t){console.log("--开始搜索floor "+t+" ("+e.name+")---------------------------"),Object(Ae["a"])({points:e.vertex,lines:e.wall})}))};var De=Oe;function Ve(e){var t=Ie();return function(){var i,n=Object(u["a"])(e);if(t){var o=Object(u["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(c["a"])(this,i)}}function Ie(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var je=new THREE.Vector3(0,0,-1),Le=function(e){Object(s["a"])(i,e);var t=Ve(i);function i(e){var o;return Object(n["a"])(this,i),o=t.call(this),o.angle=0,o.floorLogos=e,o.init(),o.show=!1,o}return Object(o["a"])(i,[{key:"init",value:function(){var e=this,t=50,i=50,n=$("<div id='compass'><div class='dirText north'><span>"+("zh"==U["a"].lang?"北":"N")+"</span></div><div class='center'></div> </div>");if($("#player").append(n),n.css({display:"none",position:"absolute",right:U["a"].isMobile?"1%":"2%",top:U["a"].isMobile?"10%":"4%",width:"90px",height:"90px","pointer-events":"none"}),n.find(".dirText").css({textAlign:"center","font-size":"10px",position:"absolute",width:"100%",height:"25px","line-height":"25px"}),U["a"].isMobile){var o=Math.min($("#player").width(),$("#player").height());if(o<450){var a=Math.round(o/450*1e3)/1e3;n.css("transform"," scale(".concat(a,")"))}}n.find(".north").css({color:"#02a0e9",top:"0"}),n.find(".south").css({color:"#ff1414",bottom:"0"}),n.find(".center").css({width:t+"px",height:i+"px","background-size":"contain","background-position":"center",left:"50%",top:"50%",transform:"translate(-50%,-50%)",position:"absolute"}),n.find(".dirText").css({"text-align":"center","font-size":"10px",color:"rgb(255, 255, 255)",position:"absolute",top:"50%",left:"50%",width:"45%",height:"0px","transform-origin":"left center"}),n.find(".dirText span").css({display:"block",position:"absolute",right:"5px",top:"0",width:"20px",height:"20px","line-height":"20px","margin-top":"-10px"}),this.dom=n;try{this.renderer=new THREE.WebGLRenderer({antialias:U["a"].antialias,alpha:!0}),this.renderer.autoClear=!0,this.renderer.setPixelRatio(window.devicePixelRatio?window.devicePixelRatio:1),this.renderer.domElement.setAttribute("name","compass"),this.renderer.setClearAlpha(0),this.renderer.setSize(t,i,!1,window.devicePixelRatio?window.devicePixelRatio:1)}catch(r){throw new RendererCreationException("Unable to create a WebGL rendering context")}n.find(".center")[0].appendChild(this.renderer.domElement),this.camera=new THREE.PerspectiveCamera,this.camera.fov=70,this.scene=new THREE.Scene,this.scene.add(this.camera),this.createCompass(),Z["a"].on("scene/LoadHouseFloor",(function(){e.setNorth()})),this.on("changeDir",(function(){e.setNorth()}))}},{key:"createCompass",value:function(){var e=2,t=new THREE.ConeBufferGeometry(.7,e,4,!0),i=new THREE.ConeBufferGeometry(.7,e,4,!0),n=new THREE.MeshBasicMaterial({vertexColors:!0}),o=function(e,t,i){for(var n=[],o=0,a=e.attributes.position.count;o<a;++o)n.push(1,1,1);var r=function(e,t){n[3*e+0]=t[0],n[3*e+1]=t[1],n[3*e+2]=t[2]},s=[(t[0]+i[0])/2,(t[1]+i[1])/2,(t[2]+i[2])/2];r(1,t),r(5,t),r(6,t),r(2,s),r(3,s),r(7,s),r(4,i),r(8,i),r(9,i),e.addAttribute("color",new THREE.BufferAttribute(new Float32Array(n),3))},a=[1/255,238/255,245/255],r=[20/255,146/255,170/255],s=[40/255,60/255,103/255];o(t,a,r),o(i,r,s);var l=new THREE.Mesh(t,n);l.position.setY(e/2),t.computeVertexNormals(),i.computeVertexNormals();var c=new THREE.Object3D;c.add(l);var u=new THREE.Mesh(i,n);u.rotation.x=Math.PI,u.position.setY(-e/2),c.add(u),c.rotation.z=Math.PI/2,c.rotation.y=Math.PI/2,c.scale.set(.7,.7,.7),this.scene.add(c),this.cones=c}},{key:"setNorth",value:function(){var e=ce["a"].getters["scene/houstFloor"].floors;if(e&&e.length){var t=e[0],i=app.store.getters["scene/metadata"]||{};this.angle=(t&&t.dire||0)+THREE.Math.radToDeg(parseFloat(i.floorPlanAngle||0)),this.cones.rotation.y=Math.PI/2-THREE.Math.degToRad(this.angle),console.log("dir:"+t.dire+", floorPlanAngle:"+i.floorPlanAngle),this.update(),this.floorLogos.setDir(this.angle)}}},{key:"update",value:function(e){this.show&&(e||(e=app.player.camera.quaternion.clone()),this.updateCamera(e),this.updateLabel(e),this.render())}},{key:"updateLabel",value:function(e){var t,i=h["objects"].player.getDirection(),n=je.clone();if("transitioning"==h["objects"].player.mode){var o=new THREE.Camera;o.position.copy(this.camera.position),o.lookAt(o.position.clone().add(i));var a=o.quaternion.inverse();t=a.premultiply(e)}var r=new THREE.Vector3(0,1,0);t&&r.applyQuaternion(t),i.projectOnPlane(r),n.projectOnPlane(r);var s=i.angleTo(n);i.cross(n).y>0&&(s=-s);var l=this.angle-90+THREE.Math.radToDeg(s);this.dom.find(".dirText").css("transform","rotate("+l+"deg)"),this.dom.find(".dirText span").css("transform","rotate("+-l+"deg)")}},{key:"updateCamera",value:function(e){var t=5;this.camera.quaternion.copy(e);var i=h["objects"].player.getDirection();this.camera.position.copy(i.multiplyScalar(t).negate())}},{key:"render",value:function(){this.renderer.render(this.scene,this.camera)}},{key:"setDisplay",value:function(e){this.show=!!e,this.show?(this.update(),this.dom.fadeIn(100)):this.dom.fadeOut(100)}},{key:"autoJudgeDisplay",value:function(){"panorama"!=app.player.modeTran.split("-")[1]&&"cad"!=ce["a"].getters.page&&"data"!=ce["a"].getters.page?this.setDisplay(!0):this.setDisplay(!1)}},{key:"setDomLeft",value:function(){this.dom.css({right:"none",left:U["a"].isMobile?"1%":"2%"})}}]),i}(h["default"]),Fe=Le,He=i("3f2a"),ze=i("541a");function Ne(e){var t=Be();return function(){var i,n=Object(u["a"])(e);if(t){var o=Object(u["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(c["a"])(this,i)}}function Be(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var Ue=function(e){Object(s["a"])(i,e);var t=Ne(i);function i(e,o){var r;return Object(n["a"])(this,i),r=t.call(this),Object(d["a"])(Object(a["a"])(r),"setProjectedPanos",(function(e,t,i){void 0!==i&&null!==i||(i=!0),i=!!i,this.projectedPano0=e,this.projectedPano1=t,this.skybox.material.setProjectedPanos(e,t,i),this.chunks.forEach((function(n){n.materialInside.setProjectedPanos(e,t,i)}))})),Object(d["a"])(Object(a["a"])(r),"changeMat",(function(){function e(e,t){return e.material=new F["a"](t),e.material.uniforms.modelAlpha.value=0,e.material.uniforms.progress.value=1,e.material}this.chunks.forEach((function(t){var i=t.materialInside.uniforms.map.value;t.materialInside=e(t,{side:THREE.DoubleSide}),t.materialInside.uniforms.map.value=i})),e(this.skybox,{side:THREE.BackSide})})),Object(d["a"])(Object(a["a"])(r),"fadePanoMarkers",(function(e,t,i){var n=h["objects"].player.currentPano;if(i=i||{},k["a"].vrEnabled&&"portrait"!=window.VRScreenType)this.updateVrMarker();else if(void 0!=i.vrCustomer&&(this.markerUnable=!!i.vrCustomer),!this.markerUnable||void 0!=i.vrCustomer){var o=function(){var e=[];h["objects"].player.model.panos.forEach((function(t){(t.hasVideo||t.panoVideo)&&t.neighbourUUIDs.length>0?i.hideVideoFlag||t.floor.hidden?t.updateMarkerVisible(!1):t.updateMarkerVisible(!0):e.push(t)})),this.panos.fadeMarkerOpacity(1,t,[{toOp:0,member:e}])}.bind(this);if(0!=e)if(h["objects"].player.mode==f["a"].PANORAMA&&n){var a,r=[],s=[];if(n.hasVideo&&h["objects"].panoVideoRenderer.ifEnable()){if(n.videoInfo.dir)var l=n.videoInfo.dir.clone(),c=THREE.Math.degToRad(n.videoInfo.hfov/2);else{var u=(new THREE.Quaternion).setFromAxisAngle(new THREE.Vector3(0,1,0),THREE.Math.degToRad(this.supportsTiles?90:180)),d=He["a"].FORWARD.clone().applyQuaternion(u.multiply(n.quaternion)).add(n.position);l=d.clone().sub(n.position),c=THREE.Math.degToRad(32.5)}a=B["a"].filters.isInFanAngle(n.position,l,c)}else if(n.panoVideo){l=n.panoVideo.dir.clone(),c=THREE.Math.degToRad(n.panoVideo.hfov/2);a=B["a"].filters.isInFanAngle(n.position,l,c)}for(var p in h["objects"].player.model.panos.index){var m=h["objects"].player.model.panos.index[p];m.marker;a&&a(m)||!(n.seeMarkers.indexOf(p)>-1)?m.hasVideo||m.panoVideo?m.marker.visible=!1:s.push(m):m.hasVideo||m.panoVideo?h["objects"].panoVideoRenderer.ifEnable()&&(m.marker.visible=!0):r.push(m)}this.panos.fadeMarkerOpacity(e,t,[{toOp:k["a"].panorama.markerOpacity,member:r},{toOp:0,member:s}])}else"panorama"!=h["objects"].player.modeTran.split("-")[1]&&o();else o()}})),p["a"].extend(i,EventEmitter),r.data=o,r.options=e,r.isPublic=void 0!==r.data.is_public&&r.data.is_public,r.loadPanosPromise=null,r.panos=new m["a"],r.outdoorPanoLocations=[],r.projectedPano0=null,r.projectedPano1=null,r.supportsTiles=U["a"].supportsTiles,r.chunks=[],r.colliders=[],r.size=null,r.center=new THREE.Vector3,r.boundingBox=new THREE.Box3,r.boundingBoxExpand=new THREE.Box3,r.loadMeshTexturesPromise=null,r.meshTexturesLoaded=!1,r.meshTextures=[],r.mode=f["a"].DOLLHOUSE,r.supportedModes={},r.supportedModes[f["a"].PANORAMA]=!0,r.supportedModes[f["a"].DOLLHOUSE]=!r.data.player_options||r.data.player_options.dollhouse&&q["a"].valueFromHash("dh",1),r.supportedModes[f["a"].FLOORPLAN]=!r.data.player_options||r.data.player_options.floor_plan&&q["a"].valueFromHash("dh",1),r.supportedModes[f["a"].TRANSITIONING]=!0,r.has360Views=!1,r.supportsVR=r.data.is_vr,r.auxDataPromise=null,r.tagsShown=!1,r.showingLabels=k["a"].labels.enabled&&r.data.player_options.labels,r.images=new E(Object(a["a"])(r)),r.images.extend(r.data.images),r.heroImage=r.images.getImage(r.data.icon),r.heroLocations=[],r.floorsEnabled&&r.data.floors&&-1!==r.data.floors.indexOf(",")&&r.data.floors.split(",").forEach(function(e,t){this.addFloor(new Floor(this,t,e.trim()))}.bind(Object(a["a"])(r))),r.currentFloor=null,r.floors=new V(Object(a["a"])(r)),r.floorsEnabled=void 0===r.options.floors||r.options.floors,r.changingFloor=!1,r.allFloorsVisible=!0,r.waitQueue=[],r.on("load",(function(e){0!==r.waitQueue.length&&(r.waitQueue=r.waitQueue.filter((function(e){return!e.isLoadedCallback()})),0===r.waitQueue.length&&r.emit("waiting-done"))})),r.setupCustomProperties(),r.vrMarkers=[],r.floorLogos=new J,r}return Object(o["a"])(i,[{key:"createTranControl",value:function(e){var t={player:e,fatLineMats:[],dontHideWhenFaceCamera:!0,scaleAxis:["x","y"],NoScaleZ:!0};this.transformControls=new ee["a"](e.camera,e.domElement,t),this.transformControls.fatLineMats=t.fatLineMats,this.transformControls.space="local",this.transformControls.setSize(1.2),this.add(this.transformControls),this.transformControls.visible=!1}},{key:"load",value:function(){var e=this,t=Promise.all([this.loadPanos(),this.loadMesh()]);return t=t.then((function(){return e.loadMeshTextures()})),t.then((function(){return e.build()}))}},{key:"loadPanos",value:function(){var e=this;if(!this.loadPanosPromise){var t=new be(this);this.loadPanosPromise=t.load().then((function(t){return e}))}return this.loadPanosPromise}},{key:"loadMesh",value:function(){var e=this,t=(new Date).getTime();return Ee.load().then((function(i){if(0===i.length){y["a"].warn("未找到chunk数据, 将禁用outside模式"),e.supportedModes[f["a"].DOLLHOUSE]=!1,e.supportedModes[f["a"].FLOORPLAN]=!1;var n=new Pe["a"]({geometry:new THREE.PlaneBufferGeometry(5,5,1,1)});n.visible=!1,n.material.visible=!1,n.rotateX(-Math.PI/2),n.geometry.computeBoundingBox(),i=[n]}i.forEach((function(t){var i=0;e.floorsEnabled&&(i=xe["a"].parseFloor(t.name)),t.visible=!1,e.addChunk(i,t)})),e.floors.sort(),console.log("加载model时间"+((new Date).getTime()-t))}))}},{key:"loadMeshTextures",value:function(){var e=this;if(this.loadMeshTexturesPromise)return this.loadMeshTexturesPromise;var t=new Te["a"];return this.loadMeshTexturesPromise=t.load(this,this.meshTextures).then((function(){e.meshTexturesLoaded=!0})),this.loadMeshTexturesPromise}},{key:"setupCustomProperties",value:function(){var e=k["a"].modelAlpha;Object.defineProperty(this,"alpha",{get:function(){return e},set:function(t){e=t,this.chunks.forEach((function(t){t.materialInside&&(t.materialInside.uniforms.modelAlpha.value=e)}))}})}},{key:"configureTiling",value:function(){var e=p["a"].getMAXCUBETEXTURESIZE();if(e<2048)return!1;y["a"].warn("Max cube texture size: "+e);for(var t=0;t<k["a"].tiling.tilingFlagNames.length;t++){var i=k["a"].tiling.tilingFlagNames[t];if("1"===q["a"].valueFromHash(i,null))return!0;if("0"===q["a"].valueFromHash(i,null))return!1}return!!Q.modelDataPromisesTiles(this.data)}},{key:"toggleAlpha",value:function(){this.alpha<1?this.alpha=1:this.alpha=0}},{key:"waitForLoad",value:function(e,t){t()||(this.waitQueue.push({object:e,isLoadedCallback:t}),1===this.waitQueue.length&&this.emit("waiting"))}},{key:"hide",value:function(){this.floors.hide()}},{key:"show",value:function(){this.floors.show()}},{key:"floorNames",value:function(){return this.floors.names()}},{key:"setFloor",value:function(e,t){this.allFloorsVisible&&this.emit("allfloors.toggled",!1,this.currentFloor),this.allFloorsVisible=!1,this._setFloor(e,t)}},{key:"toggleAllFloors",value:function(e){this.allFloorsVisible=void 0!==e?e:!this.allFloorsVisible,this.emit("allfloors.toggled",this.allFloorsVisible,this.currentFloor),this._setFloor(this.currentFloor)}},{key:"_setFloor",value:function(e,t,i){var n=this;t=t||this.mode,console.log("_setFloor "+e.floorIndex+", "+t),this.emit("floor.changed",e,t,this.currentFloor),this.currentFloor=e,ce["a"].commit("scene/SetFloorId",this.allFloorsVisible?"all":e.floorIndex),h["objects"].mainDesign&&h["objects"].mainDesign.editing&&h["objects"].mainDesign.gotoFloor(this.allFloorsVisible?"all":e.floorIndex),t===f["a"].PANORAMA?this.show():t!==f["a"].FLOORPLAN&&t!==f["a"].DOLLHOUSE||(this.floors.list.forEach(function(e){var t=e.plane&&"floorplan"==h["objects"].player.modeTran.split("-")[1],n=e===this.currentFloor||this.allFloorsVisible;e.toggle(n,i||this.allFloorsVisible,t,!0)}.bind(this)),h["objects"].player.defaultRoomLabels.forEach((function(e){return e.update()})),t===f["a"].FLOORPLAN&&(this.cadFloorPlane.updateEntryVisi({visi:!1}),setTimeout((function(){n.cadFloorPlane.updateEntryVisi()}),600)));var o=this,a=e;R["a"].start((function(){}),k["a"].showFloorDelay,function(){h["objects"].overlayManager.group.children.forEach((function(e){e.updateVisibleOnFloor()})),o.floors.forEach((function(e){e.chunks.forEach((function(t){t.renderOrder=e===a?x["a"].visibleFloor:x["a"].ghostFloor}))}))}.bind(this))}},{key:"nextFloor",value:function(e){return this.floors.nextFloor(this.currentFloor,e)}},{key:"addFloor",value:function(e){this.floors.add(e)}},{key:"getFloorAtPoint",value:function(e){return this.floors.getFloorAtPoint(e)}},{key:"addChunk",value:function(e,t){this.floors.getOrMakeFloor(e).addChunk(t),this.chunks.push(t)}},{key:"addHighMapCube",value:function(){if("4k"==U["a"].tileClass&&2048==app.qualityManager.maxRenderTargetSize){for(var e=new THREE.PlaneGeometry(1,1,1,1),t=new THREE.Object3D,i=0;i<6;i++){for(var n=new THREE.Object3D,o=0;o<8;o++)for(var a=0;a<8;a++){var r=new THREE.Mesh(e,new THREE.MeshBasicMaterial({}));r.position.set(o-3.5,a-3.5,-4),r.visible=!1,n.add(r)}switch(i){case ze["a"].GL_TEXTURE_CUBE_MAP_POSITIVE_X:n.rotation.set(0,Math.PI/2,0);break;case ze["a"].GL_TEXTURE_CUBE_MAP_NEGATIVE_X:n.rotation.set(0,-Math.PI/2,0);break;case ze["a"].GL_TEXTURE_CUBE_MAP_POSITIVE_Y:var s=(new THREE.Quaternion).setFromAxisAngle(new THREE.Vector3(0,1,0),Math.PI),l=(new THREE.Quaternion).setFromAxisAngle(new THREE.Vector3(1,0,0),Math.PI/2);n.quaternion.copy(s).multiply(l);break;case ze["a"].GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:s=(new THREE.Quaternion).setFromAxisAngle(new THREE.Vector3(0,1,0),Math.PI),l=(new THREE.Quaternion).setFromAxisAngle(new THREE.Vector3(1,0,0),-Math.PI/2);n.quaternion.copy(s).multiply(l);break;case ze["a"].GL_TEXTURE_CUBE_MAP_POSITIVE_Z:n.rotation.set(0,Math.PI,0);break;case ze["a"].GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:n.rotation.set(0,0,0)}n.scale.set(1,-1,1),t.add(n)}t.name="highMapCube",this.highMapCube=t,this.add(t),t.scale.set(.01,.01,.01),this.highMapCube.visible=!1}}},{key:"isHighMapLoaded",value:function(e,t,i){var n=this.highMapCube.children[e].children[8*t+i];return!!n.material.map}},{key:"updateHighMap",value:function(e,t,i,n){var o=this.highMapCube.children[t].children[8*i+n];o.material.map=e,o.visible=!0,o.material.needsUpdate=!0}},{key:"resetHighMap",value:function(){console.log("resetHighMap"),this.highMapCube&&(this.highMapCube.children.forEach((function(e){return e.children.forEach((function(e){if(e.material.map){e.material.map.dispose(),e.material.map.loaded=!1,e.material.map.version=0;var t=app.sceneRenderer.renderer.properties.get(e.material.map);app.sceneRenderer.renderer.context.deleteTexture(t.__webglTexture),e.material.map=null,e.material.needsUpdate=!0,e.visible=!1}}))})),this.highMapCube.visible=!1)}},{key:"setHighMap",value:function(e){this.highMapCube&&(this.highMapCube.position.copy(e.position),this.highMapCube.quaternion.copy(e.quaternion))}},{key:"showHighMap",value:function(){console.log("showHighMap"),this.highMapCube&&(this.highMapCube.visible=!0)}},{key:"hideHighMap",value:function(){console.log("hideHighMap"),this.highMapCube&&(this.highMapCube.visible=!1)}},{key:"setMode",value:function(e){if(!this.supportedModes[e])throw new BasicException("Mode not supported for this model: "+e);this.mode=e,this.chunks.forEach((function(t){t.setMode(e)}))}},{key:"reGetSkybox",value:function(e){this.boundingBox=e,this.boundingBoxExpand.union(e),this.size=this.boundingBox.size(),this.center=this.boundingBox.center(),this.sizeExpand=this.boundingBoxExpand.size(),this.centerExpand=this.boundingBoxExpand.center();var t=new THREE.BoxGeometry(this.sizeExpand.x,this.sizeExpand.y,this.sizeExpand.z);this.skybox.geometry.dispose(),this.skybox.geometry=t,this.skybox.position.copy(this.centerExpand),t.computeBoundingBox(),app.player.cameraControls.setModelForControls(this)}},{key:"build",value:function(e){var t=this;this.currentFloor=this.floors.last(),this.floors.build(),this.colliders=this.floors.reduce((function(e,t){return e.concat(t.collider.children)}),[]),this.panos.forEach((function(i){i.build1(e),i.on(fe["a"].Enter,(function(){i.floor!==t.currentFloor&&t.setFloor(i.floor)}))})),this.chunks.forEach((function(e){e.visible=!0})),e||this.panos.forEach((function(e){return e.build2()})),e||this.panos.populate_path_graph(),this.floors.forEach((function(e){t.boundingBox.union(e.boundingBox),t.boundingBoxExpand.union(e.boundingBoxExpand),e.sizeExpand=e.boundingBoxExpand.getSize(new THREE.Vector3),e.panoHeightAve=e.panos.reduce((function(e,t){return e+t.position.y}),0)/e.panos.length})),this.size=this.boundingBox.size(),this.center=this.boundingBox.center(),this.sizeExpand=this.boundingBoxExpand.size(),this.centerExpand=this.boundingBoxExpand.center(),this.skybox=new N(this.boundingBoxExpand),this.add(this.skybox);var i=ce["a"].getters["scene/metadata"].videos;if(i){var n=i.parameters;this.updateVideoRenderParameters(n)}return y["a"].debug("Done building model"),B["a"].raycastsDone>0&&(y["a"].warn("raycasts: "+B["a"].raycastsDone),y["a"].warn("raycasts skipped: "+B["a"].raycastsSkipped)),this.wallManager=pe,this.cadFloorPlane=De,e||(this.floorLogos.createFloorLogo(),this.add(this.floorLogos.firstLogo),this.add(this.floorLogos.secondLogo),this.compass=this.floorLogos.compass=new Fe(this.floorLogos)),this.ready=!0,setTimeout((function(){De.Init(t)}),10),this.addHighMapCube(),Promise.resolve(this)}},{key:"reBuild",value:function(e){this.cadFloorPlane.remove(),this.skybox.parent.remove(this.skybox),this.boundingBox=new THREE.Box3,this.boundingBoxExpand=new THREE.Box3,this.build(!0),this.setMode(e),this.alpha="panorama"==e?0:1,this.skybox.material.uniforms.opacity.value="panorama"==e?1:0,this.skybox.material.transparent="panorama"!=e}},{key:"destroyBeforeRebuild",value:function(){this.chunks.forEach(function(e){e.parent.remove(e),e.material&&(e.material.dispose(),e.material=null),e.materialInside&&(e.materialInside.dispose(),e.materialInside=null),e.materialOutside&&(e.materialOutside.dispose(),e.materialOutside=null),e.geometry&&(e.geometry.dispose(),e.geometry=null)}.bind(this)),this.chunks=[],this.meshTextures.forEach((function(e){return e.dispose()})),this.meshTextures=[],this.floors.list.forEach((function(e){e.parent.remove(e);for(var t=0;t<e.collider.children.length;++t)e.collider.children[t].geometry.dispose(),e.collider.children[t].material.dispose()})),this.floors=new V(this)}},{key:"updateProjectedPanos",value:function(){this.projectedPano0&&this.projectedPano1&&this.projectedPano0.isAligned()&&this.projectedPano1.isAligned()&&this.setProjectedPanos(this.projectedPano0,this.projectedPano1,!1)}},{key:"updateVideoTexture",value:function(e){this.skybox&&(this.skybox.material.uniforms.videoTexture.value=e),this.chunks.forEach((function(t){t.materialInside.uniforms.videoTexture.value=e}))}},{key:"suspendVideoRender",value:function(){this.skybox&&(this.skybox.material.uniforms.videoReady.value=0),this.chunks.forEach((function(e){e.materialInside.uniforms.videoReady.value=0}))}},{key:"resumeVideoRender",value:function(){this.skybox&&(this.skybox.material.uniforms.videoReady.value=1,this.skybox.material.uniforms.progress.value=1),this.chunks.forEach((function(e){e.materialInside.uniforms.videoReady.value=1,e.materialInside.uniforms.progress.value=1}))}},{key:"updateVideoRenderParameters",value:function(e){var t=this;this.skybox.material.uniforms.parameters.value.set(e.inputWidth,e.inputHeight,e.outputWidth,e.outputHeight,e.focal,e.pixel,e.centerX,e.centerY,e.translateX,e.translateY,e.translateZ,0,e.lenOffsetX,e.lenOffsetY,e.videoWidth,e.videoHeight),8==e.cameraType?this.skybox.material.defines.HasVideo=8:2==e.cameraType?this.skybox.material.defines.HasVideo=2:3==e.cameraType&&(this.skybox.material.defines.HasVideo=3),this.skybox.material.defines.VideoMapping=e.mapping,this.skybox.material.needsUpdate=!0,this.chunks.forEach((function(i){i.materialInside.uniforms.parameters.value.set(e.inputWidth,e.inputHeight,e.outputWidth,e.outputHeight,e.focal,e.pixel,e.centerX,e.centerY,e.translateX,e.translateY,e.translateZ,0,e.lenOffsetX,e.lenOffsetY,e.videoWidth,e.videoHeight),8==e.cameraType?i.materialInside.defines.HasVideo=8:2==e.cameraType?i.materialInside.defines.HasVideo=2:3==e.cameraType&&(t.skybox.material.defines.HasVideo=3),i.materialInside.defines.VideoMapping=e.mapping,i.materialInside.needsUpdate=!0}))}},{key:"setSide",value:function(e){this.floors.forEach((function(t){t.collider&&(t.collider.material.side=e)}))}},{key:"getHeroDescriptorByIndex",value:function(e){if(e<0)return y["a"].warn("Model.getHeroDescriptorByHeroIndex() -> heroIndex is less than 0."),null;var t=h["objects"].play.heroCount();if(t<1)return y["a"].warn("Model.getHeroDescriptorByIndex() -> No hero locations in this model"),null;var i=K["a"].getPlayDataItem(e);return void 0===i?(y["a"].warn("Model.getHeroDescriptorByIndex() -> Index "+e+" is not a validindex"),null):i}},{key:"listImagePanos",value:function(){var e=[],t=this;return this.images.forEach((function(i){if(i.metadata&&i.metadata.scan_id){var n=t.panos.get(i.metadata.scan_id);n&&(U["a"].supportsTiles||n.isLoaded("high")||e.push(n))}})),e}},{key:"updateVrMarker",value:function(e){if(h["objects"].player.currentPano.isAligned()){if(e=void 0==e?k["a"].vrEnabled:e,e)for(var t in this.panos.index){var i=this.panos.index[t];i.isAligned()&&(i.marker.opacity=0)}else this.fadePanoMarkers(null,null);this.vrMarkers.forEach((function(t){t.visible=e&&h["objects"].player.currentPano.id!=t.pano.id&&!!h["objects"].player.currentPano.neighbourPanos[t.pano.id];//!! 是防止undefined
- }))}}},{key:"outsideAllowed",value:function(){return this.supportedModes[f["a"].DOLLHOUSE]&&this.supportedModes[f["a"].FLOORPLAN]}},{key:"updateMarkersForPanorama",value:function(e){var t=this.panos.get(e);for(var i in this.panos.index){var n=this.panos.index[i],o=n.marker;o.visible=!1,t.neighbourPanos[n.id]&&(o.visible=!0)}}}]),i}(THREE.Object3D)},"3dac":function(e,t,i){"use strict";i.d(t,"a",(function(){return d}));i("6b54"),i("2397"),i("7f7f");var n=i("d4ec"),o=i("bee2"),a=i("262e"),r=i("99de"),s=i("7e84"),l=i("e1c1");function c(e){var t=u();return function(){var i,n=Object(s["a"])(e);if(t){var o=Object(s["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(r["a"])(this,i)}}function u(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var d=function(e){Object(a["a"])(i,e);var t=c(i);function i(e){var o;return Object(n["a"])(this,i),o=t.call(this,e),o.panoId=e.panoId,o.orthoZoom=e.orthoZoom,o.floorVisibility=e.floorVisibility,o.thumbUrl=e.thumbUrl,o.name=e.name,o}return Object(o["a"])(i,[{key:"isPano",value:function(){return this.panoId&&""!==this.panoId}}]),i}(l["a"])},"3ebc":function(e,t,i){"use strict";i.r(t);i("ac6a");var n=i("f121"),o=i("bc19"),a=i("6860"),r=i("9ef6"),s=i("d547"),l=i("cd18"),c=i("eff1"),u=i("c75e"),d=(i("f715"),i("9923")),h=(i("b235"),i("2d47"),i("1158"),i("4c16"),a["objects"].player),p={editing:!1,overlayMaxCount:1,meshGroup:new THREE.Object3D,checkIfCanInit:function(){return h.model&&h.model.chunks.length&&h.currentPano&&app.model.transformControls},waitToInit:function(e){var t=this;console.log("waitToInit");var i=setInterval((function(){t.checkIfCanInit()&&(e&&e(),clearInterval(i))}),50)},init:function(e){var t=this;this.checkIfCanInit()?(this.transformControls=app.model.transformControls,this.meshGroup.name="overlay-group",h.model.add(this.meshGroup),this.meshGroup.visible=!1,a["objects"].overlayManager.group.children.forEach((function(e){p.getOverlayInfo(e)})),window.addEventListener("keydown",(function(e){var i;if(!t.editing){switch(e.which){case 87:i="translate";break;case 82:i="scale";break}i&&u["a"].emit("videos/panel/switchTclMode",i),e.stopPropagation()}})),u["a"].on("videos/panel/useImgRatio",this.useImgRatio.bind(this)),e&&e()):this.waitToInit((function(){t.init(e)}))},enter:function(){if(!this.editing)if(this.editing=!0,this.meshGroup.visible=!0,this.transformControls.switchEditState("overlay"),h.cameraControls.controls.dollhouse.resetRanges(3),h.cameraControls.controls.panorama.insideLookLimitDown=n["a"].isMobile?-55:-50,h.model.wallManager.updateRulersVisi(!1),h.model.cadFloorPlane.changeCadVisible(!1),h.model.cadFloorPlane.updateEntryVisi({visi:!1}),a["objects"].overlayManager.group.children.length>=this.overlayMaxCount){var e=a["objects"].overlayManager.group.children[0];a["objects"].overlayManager.clickOverlay(e)}else this.beginToAddPlane()},leave:function(){this.editing&&(this.editing=!1,this.endAddPlane(),this.meshGroup.visible=!1,this.transformControls.switchEditState(null),h.cameraControls.controls.dollhouse.resetRanges(),h.cameraControls.controls.panorama.insideLookLimitDown=null,h.model.wallManager.updateRulersVisi(),h.model.cadFloorPlane.changeCadVisible(null,{autoJudge:!0}),h.model.cadFloorPlane.updateEntryVisi({autoJudge:!0}),u["a"].emit("videos/panel/exit"))},beginToAddPlane:function(){a["objects"].player.reticule.visible=!1,setTimeout((function(){$("#player").css("cursor","url(".concat(n["a"].getStaticResource("img"),"/box_video.png),auto"))}),10),this.objCursorType="overlay"},endAddPlane:function(){this.objCursorType=null,$("#player").css("cursor",""),a["objects"].player.reticule.visible=!0},addOverlay:function(e){var t=e.intersect.point,i=new c["a"]({sid:l["a"].getRandomSid()});i.position.copy(t),h.getMouseDirection().angleTo(e.intersect.face.normal)<Math.PI/2?(i.lookAt(e.intersect.face.normal.clone().negate().add(t)),i.position.add(e.intersect.face.normal.clone().negate().multiplyScalar(.01))):(i.lookAt(e.intersect.face.normal.clone().add(t)),i.position.add(e.intersect.face.normal.clone().multiplyScalar(.01))),i.isNew=!0,i.updateMatrixWorld(),a["objects"].overlayManager.clickOverlay(i),u["a"].emit("videos/panel/switchTclMode","translate"),this.endAddPlane()},getOverlayInfo:function(e){e.info={width:e.width,height:e.height,depth:r["a"].overlay.depth*e.scale.z,pos:e.position.clone(),qua:e.quaternion.clone(),media:e.plane.material.map.image,file:e.file,type:e.overlayType,hasBox:e.hasBox}},closeOverlayPanel:function(e){if(this.editPlane){var t=this.editPlane;"cancel"==e&&(t.isNew||t.needDelete?this.disposeOverlay(t):t.setFromInfo(t.info)),this.editPlane=null,this.controlSelectOverlay(null),t.raycastToFindFloor(),t.updateVisibleOnFloor()}},updateOverlayScaleDisplay:function(){var e=p.editPlane,t=190,i=t,n=Math.abs(e.width)/t,a=Math.abs(e.height)/i,r=1/Math.max(n,a),s=Math.round(Math.abs(e.width)*r),l=Math.round(Math.abs(e.height)*r);u["a"].emit("videos/panel/changeSize",o["a"].toPrecision(e.width,2),o["a"].toPrecision(e.height,2),s,l)},updateOverlayPanel:function(e){p.editPlane=e;var t=e.plane,i=t.material.map&&t.material.map.image;u["a"].emit("videos/panel/updatePoster",i),this.updateOverlayScaleDisplay(),e.hasBox?u["a"].emit("videos/panel/changeDepth",e.scale.z*r["a"].overlay.depth*100):u["a"].emit("videos/panel/changeDepth",0)},controlSelectOverlay:function(e){e?this.transformControls.attach(e):this.transformControls.detach()},useImgRatio:function(e){var t=p.editPlane.plane;if(t.material.map){var i=t.material.map.image,n=200,o="video"==p.editPlane.overlayType?i.videoWidth:i.width,a="video"==p.editPlane.overlayType?i.videoHeight:i.height;if("suitSize"==e){var s=Math.min(Math.max(o,a)/n,1);if(o>a)var l=s,c=s*a/o;else c=s,l=s*o/a}else{var u=Math.sqrt(Math.abs(p.editPlane.width*p.editPlane.height)/(o*a));l=u*o*(p.editPlane.width<0?-1:1),c=u*a*(p.editPlane.height<0?-1:1)}p.editPlane.scale.setX(l/r["a"].overlay.width),p.editPlane.scale.setY(c/r["a"].overlay.height),p.editPlane.width=l,p.editPlane.height=c,p.updateOverlayScaleDisplay()}},overlayUploaded:function(e,t){var i=p.editPlane.plane;$(t).css("width","100%"),$(t).css("height","100%"),i.material.map=new THREE.VideoTexture(t),i.material.map.image.play(),i.material.map.minFilter=THREE.LinearFilter,p.editPlane.overlayType="video",$("#overlayUpload .preview video").remove(),t.autoplay=!0,t.loop=!0,t.volume=0,t.muted=!0,p.useImgRatio(),p.editPlane.file=e,i.material.opacity=1,i.material.color=new THREE.Color(1,1,1),i.material.needsUpdate=!0,u["a"].emit("videos/panel/updatePoster",t)},getOverlaySavingInfo:function(){var e=this.editPlane;if(e.file||e.plane.material.map&&e.plane.material.map.image){var t={width:o["a"].toPrecision(e.width,4),height:o["a"].toPrecision(e.height,4),depth:o["a"].toPrecision(r["a"].overlay.depth*e.scale.z,4),pos:o["a"].toPrecision(e.position.toArray(),4),qua:o["a"].toPrecision(e.quaternion.toArray(),4),sid:e.sid,hasBox:e.hasBox?1:0,media:[e.overlayType]};return{data:t,type:e.isNew?1:0,needSaveMedia:!e.info||e.file!=e.info.file,done:function(){e.isNew=!1,p.getOverlayInfo(e),p.closeOverlayPanel()}}}Object(s["d"])({content:d["a"].t("modules.videos.upload_tips")})},disposeOverlay:function(e){e&&e.plane;e==a["objects"].overlayManager.hoveringPlane&&a["objects"].overlayManager.hoverOverlay(null,"soon"),e.dispose(),this.beginToAddPlane()},DeleteOverlay:function(e){var t=this.editPlane;t.isNew?u["a"].emit("videos/panel/exit"):e(t.sid,(function(){t.needDelete=!0}))}};h.EditOverlay=p,t["default"]=p},"3f1a":function(e,t,i){"use strict";i.r(t);i("7514"),i("7f7f"),i("ac6a"),i("cbe8");var n,o,a,r,s,l=i("cd18"),c=i("bc19"),u=i("f715"),d=i("9b24"),h=i("951b"),p=i("4be4"),f=i("4c16"),m=i("9ef6"),v=(i("d9c2"),i("aeb9")),g=i("6860"),y=i("7a31"),b=i("b775"),w=i("c75e"),E=i("d547"),T=i("2fde"),P=i("f876"),x=i("9923"),k=i("935f"),R=i("dbf4"),_=i("aa1f"),S=i("ccc0"),M=i("ec11"),A={mainDesign:{}},O={editType:"tag",startEditSpot:!1,reEditHot:!1,enterSplitView:!1,setSpotPos:!1,spotPosInfo:{}},C=!1;O.renderSpotArea=function(){O.enterSplitView&&(g["objects"].tagManager.tagDiscs.forEach((function(e){e.visible&&0!=e.material.uniforms.opacity.value&&(e.canvasA_Qua=e.quaternion.clone(),e.canvasA_Scale=e.scale.clone(),e.tag.update(n.mode,a,n.currentPano,n.flying))})),o.render(g["objects"].sceneRenderer.scene,a),g["objects"].tagManager.tagDiscs.forEach((function(e){e.visible&&0!=e.material.uniforms.opacity.value&&(e.quaternion.copy(e.canvasA_Qua),e.scale.copy(e.canvasA_Scale))})))},O.setPlayerBSize=function(){O.enterSplitView&&(o.setSize(s.width(),s.height(),!1,Math.min(window.devicePixelRatio,2)),a.updateAspect(s.width()/s.height()))},O.initMeasure=function(){O.editType="measure",$(".widgets-design-option").css("display","none"),$(".widgets-design-option div").on("click",(function(){O.chosenMeasureRuler.remove(),O.chosenMeasureRuler.showOptionLabel(!1)}));var e=function(){O.setSpotPos||n.FlyToMode("panorama",function(){n.flying||n.flyingToTag||(O.enterPosView(),O.selectStyle("measurePoint"),n.tagManager.hideAllTags(),n.linkViewManager.hideAllViews(),n.measureRulers.forEach((function(e){e.state="unable"})),O.chosenMeasureRuler&&O.chosenMeasureRuler.showOptionLabel(!1),$("#player").css("cursor","crosshair"))}.bind(this))},t=function(){O.exitHotPosEdit(),O.measureTag1&&g["objects"].tagManager.removeTag(O.measureTag1),O.measureTag2&&g["objects"].tagManager.removeTag(O.measureTag2),g["objects"].tagManager.markTag&&g["objects"].tagManager.removeTag(g["objects"].tagManager.markTag),O.measureTag1=O.measureTag2=g["objects"].tagManager.markTag=null,O.measureStep=0,n.tagManager.showAllTags(),n.linkViewManager.showAllViews(),n.measureRulers.forEach((function(e){e.updateVisible(),"active"==e.state&&e.updateBoldLine()})),$("#player").css("cursor","")}.bind(this),i=function e(i){if(g["objects"].player.flying)return n.flyingToTag&&(window.cancelReExam=!0),n.waitFlytoItemFuc=e.bind(this,i),P["a"].show(),void console.log("waitFlytoItemFuc 飞完重新 ");if(P["a"].hide(),1==i)O.confirmPos(),g["objects"].tagManager.markTag.createMarkGroup({type:"measure",addHeightLabel:!0,color:"#ffffff",size:.15,stemLineColor:"#09e1c0"}),O.measureTag1=g["objects"].tagManager.markTag,setTimeout((function(){O.measureTag1.markGroup.heightLabel.update()}),100),g["objects"].tagManager.markTag=null,O.enterPosView(),$("#player").css("cursor","crosshair"),w["a"].emit("measure/Disable",!0),O.measureStep=1,Object(E["d"])({content:x["a"].t("show.location_end_tips")});else if(2==i){O.confirmPos(),O.measureTag2=g["objects"].tagManager.markTag;var o=O.measureTag1.visiblePanos.concat(O.measureTag2.visiblePanos.filter((function(e){return-1==O.measureTag1.visiblePanos.indexOf(e)}))),a=new T["a"]({points:[O.measureTag1.position,O.measureTag2.position],visiblePanos:o,state:"active"});-1==a.visiblePanos.indexOf(g["objects"].player.currentPano.id)&&a.visiblePanos.push(g["objects"].player.currentPano.id),t()}};w["a"].on("measure/Handle",(function(o,a){if("start"==o)e();else if("cancel"==o){if(g["config"].isMobile&&g["objects"].player.flying)return n.flyingToTag&&(window.cancelReExam=!0),n.waitFlytoItemFuc=t,P["a"].show(),void console.log("waitFlytoItemFuc 飞完重新 ");P["a"].hide(),t()}else i(a)}))},O.checkIfCanInit=function(){return!!g["objects"].sceneRenderer.scene&&g["objects"].player.model},O.init=function(){if(!(O.inited||g["config"].isEdit&&0!==g["store"].getters.page.indexOf("hotspot")))if(O.checkIfCanInit()){n=g["objects"].player,g["config"].isEdit||O.initMeasure(),O.inited=!0;var e,t=O.spotPosInfo;s=$("#player-b"),s.on("pointerup touchend",Z),s.on("pointerdown touchstart",X),o=new THREE.WebGLRenderer({antialias:!g["config"].isMobile}),o.setPixelRatio(window.devicePixelRatio),o.setSize(300,300,!1),s.append(o.domElement);var i=new h["a"];if(i.init(s[0],null,"spotPlayer"),i.activateControls("panorama"),a=i.activeControl.camera,r=i.activeControl,a.fov=50,2!=g["config"].visions&&g["config"].supportsTiles){var T=new _["a"](1),D=new R["a"](1);D.renderer=o;var V=new k["a"](1);V.init(D,T);var I=new S["a"];I.extend(n.model.panos.list.map((function(e){var t=new M["a"](n.model,e.id,e);return t.attachToPanoRenderer(V),t.tileDownloader=T,t.qualityManager=g["objects"].qualityManager,t}))),T.setPanoData(I,n.model.listImagePanos(),g["objects"].modelManager.projectNum),T.start()}var j=new THREE.Mesh(new THREE.BoxGeometry(10,10,10),new p["a"]({side:THREE.BackSide,transparent:!1,name:"spotAddCubeMat",not_Cube:2==g["config"].visions},"fishSky"));j.name,j.layers.set(v["a"].SubScreen),g["objects"].sceneRenderer.scene.add(j),a.layers.toggle(v["a"].DEFAULT),a.layers.enable(v["a"].PANOMARKERS),a.layers.enable(v["a"].TAG),a.layers.enable(v["a"].BothAtMainAndSubScreen),a.layers.enable(v["a"].SubScreen);var L=new u["a"]({domParent:$("#player"),src:g["config"].TagStyleTex["note"],elem:$("#player .markspot"),style:"note"}),F=new u["a"]({domParent:s,camera:a,src:g["config"].TagStyleTex["note"],elem:$("#player-b .markspot"),style:"note"});L.elem.css("display","none"),F.elem.css("display","none"),L.name="markSpotA",F.name="markSpotB",t.renderer=o,t.camera=a,t.control=r,t.cube=j,t.markSpotA=L,t.markSpotB=F;var H=new THREE.Vector2,z=function(e){e=e.originalEvent||e;var t=e.type.indexOf("touch")>-1,i=t?e.changedTouches[0].clientX:e.offsetX,n=t?g["config"].isMobile?e.changedTouches[0].clientY-$("#player").height():e.changedTouches[0].clientY:e.offsetY;return{x:i,y:n}};O.mouseB={},O.enterPosView=function(){O.setSpotPos=!0,O.enterSplitView=!0,n.flyingToTag&&(window.cancelReExam=!0),n.zoomTo(1),O.zoomEnabled=m["a"].zoom.enabled,m["a"].zoom.enabled=!1,n.reticule.visible=!1,"tag"==O.editType?g["store"].commit("SetPlayerOptions",{showSplit:!0}):"measure"==O.editType&&g["store"].commit("SetPlayerOptions",{showWidgets:!1,showSplit:!0,showMeasure:!0});var e=n.cameraControls.cameras.panorama;e.fov=e.staticFov=50,this.setPlayerBSize(),t.clickA||"designWall"==O.editType||(n.reticule.visible=!1),g["objects"].tagManager.markTag||O.addATag(),"designWall"==O.editType&&(g["objects"].tagManager.markTag.rePos(A.mainDesign.selectFloorLine.pullMesh.position),t.pauseCameraBind=!0),ee(),"tag"!=O.editType&&"measure"!=O.editType||(2==g["config"].visions&&Q(),t.pauseCameraBind=!1),"tag"==O.editType&&(n.currentPano.marker.visible=!1,O.hideMarker=n.currentPano.marker),g["objects"].overlayManager.group.visible=!1},O.exitHotPosEdit=function(){if(O.setSpotPos&&O.enterSplitView){m["a"].zoom.enabled=O.zoomEnabled,O.setSpotPos=!1,O.hotRePos=!1,O.enterSplitView=!1,L.enable=!1,F.enable=!1,n.reticule.visible=!0,t.clickA=null;var e=n.cameraControls.cameras.panorama;e.fov=m["a"].insideFOV,e.staticFov=null,e.updateProjectionMatrix(),$("#player").css("cursor",""),g["store"].commit("SetPlayerOptions",{showSplit:!1,showPositionMarks:!1}),"measure"==O.editType&&g["store"].commit("SetPlayerOptions",{showWidgets:!0,showMeasure:!1}),O.hideMarker&&(O.hideMarker.visible=!0,O.hideMarker=null),g["objects"].overlayManager.group.visible=!0,n.waitToExitPano&&n.waitToExitPano!=n.currentPano&&n.waitToExitPano.exit(),n.waitToExitPano=null}},O.addATag=function(){g["objects"].tagManager.markTag=new d["a"](n.model,l["a"].getRandomSid(),{position:new THREE.Vector3,state:"mark",floorIndex:g["objects"].model.currentFloor.floorIndex}),g["objects"].tagManager.markTag.edit=!0,g["config"].isMobile&&g["store"].commit("hotspot/SetSid",g["objects"].tagManager.markTag.sid)};var N={};O.changePano=function(e,i){"A"==e&&(i.assistPano==t.panoB?L.pos3d=t.clickA.clone():L.pos3d=g["objects"].tagManager.markTag.position.clone(),t.pauseCameraBind=!0)},O.cameraBchanged=function(){var e;return function(){var t,i,n=a.position.clone(),o=a.quaternion.clone();return e&&n.equals(e.position)&&o.equals(e.quaternion)||(i=!0),(i||O.mouseB.x!=e.mouse.x||O.mouseB.y!=e.mouse.y)&&(t=!0),e={position:n,quaternion:o,mouse:{x:O.mouseB.x,y:O.mouseB.y}},{changed:t,cameraChanged:i}}}(),O.selectStyle=function(e,t){L.style=e,F.style=e,g["objects"].tagManager.markTag&&g["objects"].tagManager.markTag.setElemType(e,t)};var B={};new y["a"]({elem:L.elem,domParent:$("#player"),useTransform:!0,cameraControls:n.cameraControls,beginMoveFuc:function(){O.enterSplitView&&(L.state="drag",L.elem.addClass("dragging"),n.cameraControls.controls.panorama.locked=!0,r.locked=!0)},moveDoneFuc:function(e){O.enterSplitView&&(L.state="static",L.elem.removeClass("dragging"),n.cameraControls.controls.panorama.locked=!1,r.locked=!1,e&&ne(e),n.mouseCouldBeClickToMove=!1)}}),e=new y["a"]({elem:F.elem,domParent:s,useTransform:!0,beginMoveFuc:function(){F.state="drag",F.elem.addClass("dragging"),r.locked=!0,n.cameraControls.controls.panorama.locked=!0},moveDoneFuc:function(e){F.state="static",F.elem.removeClass("dragging"),r.locked=!1,n.cameraControls.controls.panorama.locked=!1,e&&J(e)}});var U=function(){return n.is360View(n.mode,n.currentPano)&&(n.currentPano.view.backToPanorama(),P["a"].show()),n.currentPano&&(2!=g["config"].visions||n.currentPano.assistPano)};O.addSpot=function(){if(U()){if(n.flying||n.flyingToTag)return n.flyingToTag&&(window.cancelReExam=!0),n.waitFlytoItemFuc=O.addSpot,P["a"].show(),void console.log("$waiting.show()");n.FlyToMode("panorama",(function(){var e=function e(){n.currentPano?(P["a"].hide(),O.startEditSpot=!0,O.setSpotPos||n.flying||(O.editType="tag",O.enterPosView(),g["objects"].tagManager.activeTag&&g["objects"].tagManager.dismissActiveTag())):setTimeout(e,50)};e()}))}else var e=setInterval((function(){U()&&(O.addSpot(),clearInterval(e))}),50)},O.confirmPos=function(){if(O.setSpotPos){L.computeHotPos2({dontRestric:"measure"==O.editType});var e=L.becomeReal("measure"==O.editType?"static":null);return"tag"==O.editType&&(g["objects"].tagManager.activateTag(e),g["objects"].tagManager.billboard.open(e)),"measure"==O.editType&&(e.isMeasurePoint=!0),O.exitHotPosEdit(),!0}},O.reSetPos=function(){var e=function(){P["a"].hide(),O.hotRePos=!0,L.pos3d=t.clickA=g["objects"].tagManager.markTag.position.clone(),L.enable=!0,F.pos3d=t.clickB=g["objects"].tagManager.markTag.position.clone(),g["store"].commit("SetPlayerOptions",{showPositionMarks:!0}),F.enable=!0,setTimeout((function(){L.updateHotspot2dPos(),F.updateHotspot2dPos()}),300),O.enterPosView(),g["objects"].tagManager.markTag.edit=!1,g["objects"].tagManager.billboard.close(),g["objects"].tagManager.markTag.edit=!0,n.lookAtPos(g["objects"].tagManager.markTag.position,null,{speed:.1,time:500}),g["objects"].tagManager.markTag.state="mark",g["objects"].tagManager.markTag.obj3d.visible=!1};if(!n.flying)return e(),!0;n.waitFlytoItemFuc=e},O.getA=ie;var W=function(){var e=Q(n.currentPano.id);if(t.UVa||console.log("!!!"),!e||!e["view pair"]||!e["view pair"]["uv"])return null;var i,o=t.UVa.x,a=t.UVa.y,r={},s={},l={},c={},u={leftTop:r,rightTop:s,leftBot:l,rightBot:c};$("#IMGparent .cursor2").remove();var d=[];function h(e,t){var i=t[0],n=t[1],r=(i-o)*(i-o)+(n-a)*(n-a);(void 0==e.dis||e.dis>r)&&(e.dis=r,e.pair=t)}e["view pair"]["uv"].forEach((function(e){e[0]<o&&e[1]<=a?h(r,e):e[0]>=o&&e[1]<=a?h(s,e):e[0]<o&&e[1]>=a?h(l,e):h(c,e)}));var p=0;for(var f in u)u[f].pair&&p++;var m={};function v(){}function g(e){if(!(d.indexOf(e)>-1)){var t=$('<div class="cursor cursor2"></div>');t.css({left:100*e.pair[0]+"%",top:100*e.pair[1]+"%"}),$("#IMGparent>div").eq(0).append(t);t=$('<div class="cursor cursor2"></div>');t.css({left:100*e.pair[2]+"%",top:100*e.pair[3]+"%"}),$("#IMGparent>div").eq(1).append(t),d.push(e)}}function y(e,t){return e.pair?t.pair?e.dis<t.dis?e:t:e:t}function b(){var e=y(r,l),t=y(s,c),i=y(r,s),n=y(l,c);g(e),g(t),g(i),g(n),m.x=(o-e.pair[0])/(t.pair[0]-e.pair[0]),m.y=(a-i.pair[1])/(n.pair[1]-i.pair[1]);var u=e.pair[2]+(t.pair[2]-e.pair[2])*m.x,d=i.pair[3]+(n.pair[3]-i.pair[3])*m.y;return{x:u,y:d}}return p>=3||2==p&&(r.pair&&c.pair||l.pair&&s.pair)?i=b():v(),i},q=function(e){e=e.clone();var i=t.panoB.skyboxMesh.matrixWorld.clone();return i.getInverse(i),e=c["a"].crossRight(e,i),console.log("B的dir(无matrix转化):"),console.log(e.clone().normalize()),t.panoB.position.clone().add(e)},G={},Q=function(){var e=t.panoA.id+"_"+t.panoB.id;if(B[e])return B[e];b["a"].getJson(g["config"].urls.getHotMapping(e),null,(function(t){B[e]=t}))};O.cancelHotEdit=function(){if(O.startEditSpot){if(O.exitHotPosEdit(),n.flyingToTag=!1,g["objects"].tagManager.markTag&&(O.reEditHot&&(O.selectStyle(O.tempTagData.style,O.tempTagData.styleImageURL),g["objects"].tagManager.markTag.setDiscColor(O.tempTagData.color)),g["objects"].tagManager.markTag.edit=!1,g["objects"].tagManager.removeTag(g["objects"].tagManager.markTag),g["objects"].tagManager.markTag=null),O.reEditHot){var e=O.tempTagData,t=new d["a"](n.model,e.sid,e);t.recoverFromTemp(e),t.hide(0),setTimeout((function(){g["objects"].tagManager.updateVisible(n.mode,null,t),t.show(200)}),50)}else l["a"].destroyNoUseBlob();oe()}},O.saveSpot=function(){O.confirmPos()},O.savedSpot=function(){var e=g["objects"].tagManager.markTag;g["config"].isMobile||O.reEditHot,e.edit=!1,g["objects"].tagManager.updateVisible(n.mode,null,e),g["objects"].tagManager.markTag=null,A.hotJsonChanged=!0,oe()},O.reEditSpot=function(e){return g["store"].getters["page"],O.editType="tag",O.startEditSpot=!0,O.reEditHot=!0,g["objects"].tagManager.markTag=e,e.edit=!0,e.disc.visible=!0,n.flyToTag(e,"force"),O.tempTagData=e.getTempData(),!0},O.resetAll=function(){var e=g["store"].getters["hotspot/tags"],t=g["objects"].tagManager.tags;g["objects"].tagManager.closeOpenedTag();for(var i=0;i<e.length;i++){var n=e[i],o=t[n.sid];o&&("custom"==n.style?o.setElemType(n.style,n.styleImageURL):(o.setElemType(n.style),o.setDiscColor(n.color)))}},O.removeTag=function(e){e.content.mediaData={},g["objects"].tagManager.removeTag(e),e===A.chosenSpot&&(A.chosenSpot=null)},w["a"].on("hotspot/Tag/Add",O.saveSpot),w["a"].on("hotspot/Tag/Save",O.savedSpot),w["a"].on("hotspot/Tag/Cancel",O.cancelHotEdit),w["a"].on("hotspot/Tag/Edit",(function(e){-1!=e?O.reEditSpot(g["objects"].tagManager.tags[e]):O.addSpot()})),w["a"].on("hotspot/Tag/Delete",(function(e){g["objects"].player.linkEditor.finishSetTagVisible(),console.log("hotspot/Tag/Delete: "+e),O.removeTag(g["objects"].tagManager.tags[e])})),w["a"].on("hotspot/Tag/Position",(function(e,t){console.log(e,t),"set"==e?"tag"==O.editType&&O.confirmPos()&&(g["store"].commit("hotspot/Clone",{isAdd:!t,tag:g["objects"].tagManager.markTag.getTempData()}),g["objects"].tagManager.markTag.examine(n)):"update"==e&&(P["a"].show(),n.FlyToMode("panorama",(function(){O.reSetPos()})))})),w["a"].on("hotspot/Tag/Style",(function(e,t){O.selectStyle(e,t)})),w["a"].on("hotspot/Tag/Color",(function(e){g["objects"].tagManager.markTag.setDiscColor(e)})),w["a"].on("hotspot/Tag/Reload",(function(){O.resetAll()}))}else var Y=setInterval((function(){O.checkIfCanInit()&&(O.init(),clearInterval(Y))}),50);function X(e){O.playerBmousedown=!0,H=z(e),g["config"].isEdit&&2==A.mainDesign.floorExamingStep&&A.mainDesign.hoverPull&&A.mainDesign.dragLineBegin(O)}function Z(i){if(O.playerBmousedown=!1,!e||!e.moving){var n=z(i);if(!(Math.abs(H.x-n.x)>3||Math.abs(H.y-n.y)>3))if(t.clickA||O.hotRePos){var o=new THREE.Vector2;c["a"].convertScreenPositionToNDC(n.x,n.y,o,s[0]),K(o)}else Object(E["d"])({content:x["a"].t("show.location_start_tips",{direction:x["a"].t("show.location_".concat(g["config"].isMobile?"up":"left"))})})}}function J(e){var t=new THREE.Vector2;c["a"].convertScreenPositionToNDC(e.x,e.y,t,s[0]),K(t)}function K(e){var i=f["a"].getMouseIntersect(a,[j],e),o=(new THREE.Matrix4).getInverse(n.model.matrixWorld.clone());t.clickB=i.point.clone().applyMatrix4(o),F.pos3d=t.clickB,F.updateHotspot2dPos();try{g["objects"].tagManager.markTag.rePos(L.computeHotPos2({onlyGetPos:!0,dontRestric:"measure"==O.editType}))}catch(r){console.log(r)}console.log("远近:"+g["objects"].tagManager.markTag.position.distanceTo(n.position))}function ee(){t.panoA=n.currentPano;var e=t.panoB;2!=g["config"].visions?(t.panoB=t.panoA,j.position.copy(t.panoB.position),a.position.copy(t.panoB.position)):t.panoB!=t.panoA.assistPano&&(t.panoB=t.panoA.assistPano,j.position.copy(t.panoB.position),a.position.copy(t.panoB.position),g["config"].isMobile&&"measure"==O.editType||(O.hideMarker&&(O.hideMarker.visible=!0),O.hideMarker=t.panoA.marker,O.hideMarker.visible=!1)),te(),e&&e!=t.panoB&&e.exit()}function te(e){e=e||t.panoB;2!=g["config"].visions&&g["config"].supportsTiles&&(e=I.index[e.id]);var i=n.checkAndWaitForPanoLoad(e,"high","high",1024,(function(){te(e)}));if(i)N[t.panoB.id]||(N[t.panoB.id]=setTimeout((function(){P["a"].hide(),clearTimeout(N[t.panoB.id]),delete N[t.panoB.id],Object(E["d"])({content:x["a"].t("modules.custom.get_image_fail"),duration:3e3}),console.log("无法获取贴图,可能网络状态不佳")}),2e4)),console.log(" $waiting.show()"),P["a"].show(),C=!1;else{if(N[t.panoB.id]&&(clearTimeout(N[t.panoB.id]),delete N[t.panoB.id]),e&&t.panoB.id!=e.id)return void console.log("getTextureForCube退出");P["a"].hide(),C=!0,console.log("texGetted $waiting.hide()"),e.ensureSkyboxReadyForRender();var o=e.getSkyboxTexture();j.material.uniforms.pano1Map.value=o,j.material.uniforms.pano1Matrix.value.copy(t.panoB.skyboxMesh.matrixWorld)}}function ie(e){if(!n.flying&&O.setSpotPos){if(t.panoA=n.currentPano,2!=g["config"].visions&&t.panoA==t.panoB){var i=(new THREE.Matrix4).getInverse(n.model.matrixWorld.clone()),o=e.point.clone().applyMatrix4(i),a=g["store"].getters["scene/metadata"];if(12!=a.sceneSource&&!t.clickA){t.clickA=t.clickB=o;var r=n.model.panos.find([function(e){return n.currentPano.neighbourPanos[e.id]&&n.currentPano!=e}],[M["a"].sortFunctions.distanceToPoint(n.currentPano.position)]);r?n.flyToPano({pano:r,lookAtPoint:o.clone()}):console.log("当前场景只有一个pano,所以不走到下一个点")}t.clickA=t.clickB=o}else{if(n.currentPano.assistPano!=t.panoB){if(O.spotPosInfo.clickA){t.panoA=n.currentPano;i=(new THREE.Matrix4).getInverse(n.model.matrixWorld.clone());return t.clickA=e.point.clone().applyMatrix4(i),L.pos3d=t.clickA,L.updateHotspot2dPos(),g["objects"].tagManager.markTag.rePos(L.computeHotPos2({onlyGetPos:!0,dontRestric:"measure"==O.editType})),void console.log("远近:"+g["objects"].tagManager.markTag.position.distanceTo(n.position))}ee(),t.pauseCameraBind=!1}var s=Q();if(!s){P["a"].show();var l=t.panoA.id+"_"+t.panoB.id;if(G[l]=(G[l]||0)+1,!(G[l]>5))return void setTimeout((function(){ie(e)}),200);console.error("获取不到matchdata 放弃使用: "+l)}C&&P["a"].hide();i=(new THREE.Matrix4).getInverse(n.model.matrixWorld.clone());if(t.clickA=e.point.clone().applyMatrix4(i),t.dirA=c["a"].getNormalDir(t.clickA,n.model.supportsTiles,n.currentPano),t.UVa=c["a"].getUVfromDir(t.dirA),t.UVb=W(),t.UVb)t.UVb.x=t.UVb.x.toFixed(3)-0,t.UVb.y=t.UVb.y.toFixed(3)-0;else{console.log("找不到UVb,假设一个"),Object(E["d"])({content:x["a"].t("modules.hotspot.m_location_move_tips",{direction:x["a"].t("modules.hotspot.m_location_".concat(g["config"].isMobile?"up":"left"))})});var u=-.02;t.UVb={x:t.UVa.x,y:t.UVa.y+u}}t.dirB=c["a"].getDirFromUV(t.UVb),t.clickB=q(t.dirB)}L.pos3d=t.clickA,F.pos3d=t.clickB,g["store"].commit("SetPlayerOptions",{showPositionMarks:!0}),L.enable=!0,F.enable=!0,L.updateHotspot2dPos(),F.updateHotspot2dPos(),2!=g["config"].visions&&t.panoA==t.panoB?g["objects"].tagManager.markTag.rePos(L.pos3d):g["objects"].tagManager.markTag.rePos(L.computeHotPos2({onlyGetPos:!0,dontRestric:"measure"==O.editType})),"tag"==O.editType?g["store"].commit("hotspot/SetCanAddTag",!0):"measure"==O.editType&&w["a"].emit("measure/Disable",!1),$("#player").css("cursor","")}}function ne(e){n.handleInputStart(e.x,e.y,!0,!0),n.updateIntersect({notTag:!0}),n.intersect?ie(n.intersect):L.updateHotspot2dPos(),n.mouseDown=!1}function oe(){O.reEditHot=!1,O.startEditSpot=!1}},t["default"]=O},"3f2a":function(e,t,i){"use strict";var n={UP:new THREE.Vector3(0,1,0),DOWN:new THREE.Vector3(0,-1,0),LEFT:new THREE.Vector3(-1,0,0),RIGHT:new THREE.Vector3(1,0,0),FORWARD:new THREE.Vector3(0,0,-1),BACK:new THREE.Vector3(0,0,1)};t["a"]=n},"430c":function(e,t,i){"use strict";i("673e"),i("63d9");var n=i("0c20"),o=i("f121"),a=i("bc19"),r=i("6860"),s="zhiHouse"==o["a"].applicationName?n["a"].zhiBlue:n["a"].lightGreen,l={createLine:function(e,t){var i=new THREE.BufferGeometry,n=new Float32Array(6);i.addAttribute("position",new THREE.BufferAttribute(n,3));n=i.attributes.position.array;for(var o=0;o<2;o++)n[3*o]=e[o].x,n[3*o+1]=e[o].y,n[3*o+2]=e[o].z;var a=t.mat||new THREE[t.deshed?"LineDashedMaterial":"LineBasicMaterial"]({linewidth:t.width||1,color:t.color||s,transparent:!t.dontAlwaysSeen,depthTest:!!t.dontAlwaysSeen,dashSize:t.dashSize||.1,gapSize:t.dashSize||.1}),r=new THREE.Line(i,a);return r.renderOrder=t.renderOrder||4,t.deshed&&r.computeLineDistances(),r},moveLine:function(e,t){for(var i=e.geometry.attributes.position.array,n=0;n<2;n++)void 0!=t[n]&&(i[3*n]=t[n].x,i[3*n+1]=t[n].y,i[3*n+2]=t[n].z);e.geometry.attributes.position.needsUpdate=!0,e.geometry.computeBoundingSphere()},createBoldLine:function(e,t){t=t||{};var i=t&&t.cylinder,n=e[1].clone().sub(e[0]),s=function(){i.lastVector=n;var e=new THREE.Vector3(0,-1,0),t=e.clone().cross(n).normalize(),o=e.angleTo(n);i.quaternion.setFromAxisAngle(t,o)};if(t&&"init"==t.type){if(i=new THREE.Mesh,i.material=t.mat,0==n.length())return i;s()}if(0==n.length())return i;if("update"!=t.type){var l=e[0].clone().add(e[1]).multiplyScalar(.5);if(i.position.copy(l),i.lastVector&&"moveAndRotate"!=t.type?i.lastVector&&n.angleTo(i.lastVector)>0&&s():s(),o["a"].isEdit&&!r["objects"].mainDesign.editing)return i}var c=e[0].distanceTo(e[1]),u=t&&t.standPos||r["objects"].player.position,d=o["a"].isMobile?20:40,h=e[0].distanceTo(u),p=e[1].distanceTo(u),f=a["a"].getFootPoint(u,e[0],e[1]);if(t.constantBold||"panorama"!=r["objects"].player.mode)var m=.1,v=[new THREE.Vector2(m,c/2),new THREE.Vector2(m,-c/2)];else if(f.clone().sub(e[0]).dot(f.clone().sub(e[1]))>0)v=[new THREE.Vector2(h/d,c/2),new THREE.Vector2(p/d,-c/2)];else{var g=f.distanceTo(u),y=f.distanceTo(e[0]);v=[new THREE.Vector2(h/d,c/2),new THREE.Vector2(g/d,c/2-y),new THREE.Vector2(p/d,-c/2)]}return i.geometry&&i.geometry.dispose(),i.geometry=new THREE.LatheBufferGeometry(v,4),i.renderOrder=2,i},updateBoldLine:function(e,t,i,n,o){this.createBoldLine(t,{type:i,cylinder:e,standPos:n,constantBold:o})},createFatLineMat:function(e){var t=new THREE.LineMaterial({color:e.color||16777215,linewidth:e.width||5,resolution:new THREE.Vector2($("#player").width(),$("#player").height()),transparent:!0,depthTest:!e.alwaysShow,polygonOffset:!0,polygonOffsetFactor:2.5*-e.width||-5,polygonOffsetUnits:-4});e.dashed&&(t.defines.USE_DASH="");var i=0;return Object.defineProperty(t,"opacity",{get:function(){return i},set:function(e){t.uniforms.opacity.value=i=e}}),t.opacity=void 0!=e.opacity?e.opacity:1,t},createFatLine:function(e,t){var i=new THREE.LineGeometry;i.setPositions(e),i.setColors(t.color||[1,1,1]);var n=t.material||this.createFatLineMat(t),o=new THREE.Fatline(i,n);return o.computeLineDistances(),o.scale.set(1,1,1),o.renderOrder=2,o},moveFatLine:function(e,t){var i=e.geometry;i.setPositions(t)}};t["a"]=l},"44a7":function(e,t,i){"use strict";var n={Enter:"panorama.enter",Exit:"panorama.exit",LoadComplete:"panorama.load.complete",LoadFailed:"panorama.load.failed",TileLoaded:"panorama.tile.loaded",VideoRendered:"panorama.video.rendered"};t["a"]=n},"4a7a":function(e,t,i){"use strict";var n={Move:"move",MoveComplete:"move.complete",ModeChanged:"mode.changed",ModeChanging:"mode.changing",PanoChosen:"pano.chosen",ClosestPanoChanging:"closest.pano.changing",WarpStarted:"warp.started",WarpInterrupted:"warp.interrupted",WarpEnded:"warp.ended",FlyinFinished:"flyin.finished",FlyingStarted:"flying.started",FlyingInterrupted:"flying.interrupted",FlyingEnded:"flying.ended",Ready:"ready",StartInside:"start.inside",StartOutside:"start.outside",ViewChanged:"view.changed",WarpInterruptedWithFlyTo:"warp.interrupted.flyto",InputStart:"input.start"};t["a"]=n},"4be4":function(e,t,i){"use strict";i.d(t,"a",(function(){return p}));i("6b54"),i("2397");var n=i("d4ec"),o=i("bee2"),a=i("262e"),r=i("99de"),s=i("7e84"),l=i("cd18"),c=i("8eb6"),u=i("f121");i("90b3");function d(e){var t=h();return function(){var i,n=Object(s["a"])(e);if(t){var o=Object(s["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(r["a"])(this,i)}}function h(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var p=function(e){Object(a["a"])(i,e);var t=d(i);function i(e,o){Object(n["a"])(this,i),e=e||{};var a=e.defines||{};u["a"].supportsTiles&&!e.not_Cube||(a.Not_Cube=""),e.defines=a;o=o||"model";return t.call(this,l["a"].extendObject({fragmentShader:c["a"][o].fragmentShader,vertexShader:c["a"][o].vertexShader,uniforms:THREE.UniformsUtils.clone(c["a"][o].uniforms),name:"ModelTextureMaterial"},e))}return Object(o["a"])(i,[{key:"setProjectedPanos",value:function(e,t,i){i&&(this.uniforms.progress.value=0),e.ensureSkyboxReadyForRender(),this.uniforms.pano0Map.value=e.getSkyboxTexture(),this.uniforms.pano0Position.value.copy(e.position),this.uniforms.pano0Matrix.value.copy(e.skyboxMesh.matrixWorld),t.ensureSkyboxReadyForRender(),delete this.defines["HasVideo"],t.hasVideo&&(this.uniforms.exposure.value=t.videoInfo.exposure||1,this.uniforms.blendFov.value=t.videoInfo.blendFov||5,t.videoInfo.clipRect&&this.uniforms.clipRect.value.set(t.videoInfo.clipRect.leftBottom.x,t.videoInfo.clipRect.leftBottom.y,t.videoInfo.clipRect.rightTop.x,t.videoInfo.clipRect.rightTop.y),this.defines["VideoMapping"]=t.videoInfo.mapping||1,this.defines["HasVideo"]=t.videoInfo.cameraType||8),this.needsUpdate=!0,this.uniforms.pano1Map.value=t.getSkyboxTexture(),this.uniforms.pano1Position.value.copy(t.position),this.uniforms.pano1Matrix.value.copy(t.skyboxMesh.matrixWorld)}},{key:"addHighTexture",value:function(e,t){this.uniforms["highMap"+t].value=e,this.needsUpdate=!0}}]),i}(THREE.RawShaderMaterial)},"4c16":function(e,t,i){"use strict";i("55dd"),i("7514");var n=i("2909"),o=(i("ac6a"),i("673e"),i("bc19")),a=i("6860"),r=i("cbe8"),s=new THREE.Raycaster,l={getPos2d:function(e,t,i){t=t||a["objects"].player.camera,i=i||a["objects"].player.domElement;var n,o,r=e.clone().project(t);n=(r.x+1)/2*i.clientWidth,o=(1-(r.y+1)/2)*i.clientHeight;var s=n<=i.clientWidth&&n>=0&&o<=i.clientHeight&&o>=0;return{pos:new THREE.Vector2(n,o),vector:r,trueSide:r.z<1,inSight:s}},ifShelter:function(e,t,i){var n=a["objects"].player,o=n.position,r=e.clone().sub(o).normalize();s.set(o,r);var l=void 0==i?n.model.colliders:n.model.floors.index[i].collider.children,c=s.intersectObjects(l),u=e.distanceTo(o);if(c&&c.length)for(var d=0;d<c.length;d++)if(c[d].distance<u)return!0},getPosAtPlane:function(e,t){var i=e,n=a["objects"].player,o=n.mouse,r=new THREE.Vector3(o.x,o.y,-1).unproject(n.camera);if(void 0!=t.y){var s=t.y;if("floorplan"==a["objects"].player.mode)var l=e.x,c=e.z;else{if(s<n.camera.position.y&&r.y<=i.y)return null;if(r.y==i.y)return void console.log("一样??");if(i.y==s)return void console.log("一样2??");var u=(r.y-s)/(i.y-s);l=(u*i.x-r.x)/(u-1),c=(u*i.z-r.z)/(u-1)}}else{var d=t.normalVec,h=t.pullPos;if(0!=d.y)return void console.log("N.y != 0");if(r.z==i.z)return void console.log("O.z==A.z?");if(0!=d.z&&0!=d.x){var p=d.x*(i.x-r.x)+d.y*(i.y-r.y)+d.z*(i.z-r.z);if(0==p)return void console.log("分母为0?? return;");var f=-(d.x*r.x+d.y*r.y+d.z*r.z-(h.x*d.x+h.y*d.y+h.z*d.z))/p;l=f*(i.x-r.x)+r.x,s=f*(i.y-r.y)+r.y,c=f*(i.z-r.z)+r.z}else if(0==d.x){c=h.z;if(r.y==i.y)return void console.log("一样??");if(i.y==s)return void console.log("一样2??");if(i.z==c)return void console.log("一样3??");u=(r.z-c)/(i.z-c),l=(u*i.x-r.x)/(u-1),s=(u*i.y-r.y)/(u-1)}else if(0==d.z){l=h.x;if(r.y==i.y)return void console.log("一样??");if(i.y==s)return void console.log("一样2??");if(i.x==l)return void console.log("一样3??");u=(r.x-l)/(i.x-l),s=(u*i.y-r.y)/(u-1),c=(u*i.z-r.z)/(u-1)}}return new THREE.Vector3(l,s,c)},getMouseIntersect:function(e,t,i){var n=new THREE.Raycaster;e.updateMatrixWorld();var o=new THREE.Vector3(i.x,i.y,-1).unproject(e),a=new THREE.Vector3(i.x,i.y,1).unproject(e),r=a.sub(o).normalize();n.set(o,r);var s=n.intersectObjects(t);return 0===s.length?null:s[0]},ifIntersectChunks:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=t.clone().sub(e).normalize(),r=i.InfinityLen?1/0:e.distanceTo(t)+(i.extLen||0),s=new THREE.Raycaster(e.clone(),n,0,r),l=s.intersectObjects(i.model||a["objects"].player.model.colliders);if(l&&l.length)return l;if(i.throughWidth){var c=o["a"].getNormal({points:[{x:e.x,y:e.z},{x:t.x,y:t.z}]});c.multiplyScalar(i.throughWidth);var u=new THREE.Vector3(c.x,0,c.y),d=e.clone().add(u);s.set(d,n);var h=s.intersectObjects(i.model||a["objects"].player.model.colliders);if(s.set(e.clone().add(u.negate()),n),h&&h.length)return h;var p=s.intersectObjects(i.model||a["objects"].player.model.colliders);if(p&&p.length)return p}return null},getPosAtSphere:function(e,t){var i=e.clone().sub(t);return i.normalize(),i.multiplyScalar(r["a"].skyRadius),i.add(t),i},getVisiblePano:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=[],n=e.clone(),o=t.panos||a["objects"].player.model.panos.list;return o.forEach((function(e){if(e.isAligned()){var o=e.position.clone(),r=new THREE.Raycaster(o.clone(),n.clone().sub(o).normalize(),0,o.distanceTo(n)-(t.tolerance||0)),s=r.intersectObjects(t.model||a["objects"].player.model.colliders,!0);s&&s.length||i.push(e.id)}})),i},raycastToFindFloor:function(){var e=[new THREE.Vector3(0,-1,0),new THREE.Vector3(1,-1,0),new THREE.Vector3(0,-1,1),new THREE.Vector3(-1,-1,0),new THREE.Vector3(0,-1,-1),new THREE.Vector3(1,0,0),new THREE.Vector3(0,0,1),new THREE.Vector3(-1,0,0),new THREE.Vector3(0,0,-1)];return function(t){var i=[],o=[],a=[];for(var r in app.model.floors.list){var s=app.model.floors.list[r];t.y>=s.boundingBox.min.y&&t.y<=s.boundingBox.max.y&&(i.push(s),o.push.apply(o,Object(n["a"])(s.collider.children)))}if(1==i.length)return i[0];if(i.length>1){for(var l=0;l<e.length;l++){var c=new THREE.Raycaster(t.clone(),e[l].clone()),u=c.intersectObjects(o);u.length&&function(){var e=u[0].object.parent.parent,t=a.find((function(t){return t.floor==e}));t?t.len++:a.push({floor:e,len:1})}()}return a.sort((function(e,t){t.len,e.len})),a[0]||(a=[],i.forEach((function(e){var i=e.boundingBox,n=[new THREE.Vector3(i.min.x,i.min.y,i.min.z),new THREE.Vector3(i.max.x,i.max.y,i.max.z),new THREE.Vector3(i.min.x,i.min.y,i.max.z),new THREE.Vector3(i.min.x,i.max.y,i.min.z),new THREE.Vector3(i.max.x,i.min.y,i.min.z),new THREE.Vector3(i.max.x,i.max.y,i.min.z),new THREE.Vector3(i.min.x,i.max.y,i.max.z),new THREE.Vector3(i.max.x,i.min.y,i.max.z)],o=0;n.forEach((function(e){return o+=e.distanceTo(t)})),a.push({floor:e,dis:o})})),a.sort((function(e,t){e.dis,t.dis}))),a[0].floor}if(t.y<app.model.floors.list[0].center.y){i=app.model.floors.list.sort((function(e,t){return e.boundingBox.min.y-t.boundingBox.min.y}));return i[0]}i=app.model.floors.list.sort((function(e,t){return t.boundingBox.max.y-e.boundingBox.max.y}));return i[0]}}()};t["a"]=l},"4eb1":function(e,t,i){"use strict";i.d(t,"a",(function(){return d}));i("6b54"),i("2397"),i("ac6a"),i("5df3"),i("f400");var n=i("d4ec"),o=i("bee2"),a=i("262e"),r=i("99de"),s=i("7e84"),l=i("f121");function c(e){var t=u();return function(){var i,n=Object(s["a"])(e);if(t){var o=Object(s["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(r["a"])(this,i)}}function u(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var d=function(e){Object(a["a"])(i,e);var t=c(i);function i(){var e;return Object(n["a"])(this,i),e=t.call(this),e.instances=new Map,e.video=null,e}return Object(o["a"])(i,[{key:"addVideo",value:function(e){var t=this._createVideo(this._getVideoPath(e));return this.instances.set(e,t),t}},{key:"getVideo",value:function(e){var t=this.instances.get(e);return t||(t=this.addVideo(e)),t.videoElement}},{key:"_getVideoPath",value:function(e){return l["a"].getPublicResource("images/images#m#/overlay"+e+".flv?m="+l["a"].version)}},{key:"_createVideo",value:function(e){var t=document.createElement("video");t.setAttribute("crossOrigin","anonymous"),t.setAttribute("playsinline","true"),t.setAttribute("webkit-playsinline","true"),t.setAttribute("controls","true"),t.autoplay=!1,t.muted=!0,t.loop=!0,t.style.position="fixed",t.style.left="0",t.style.top="0",t.style.zIndex="1000",t.style.width="200px",t.style.display="none",t.player=this;var i=flvjs.createPlayer({type:"flv",url:e});return i.videoElement=t,i.attachMediaElement(t),i.on(flvjs.Events.ERROR,this._onPlayerError.bind(this)),i.load(),i}},{key:"_onPlayerError",value:function(){console.warn("视频加载失败")}}]),i}(EventEmitter)},"4f5a":function(e,t,i){},5015:function(e,t,i){"use strict";var n=i("63ac"),o=i.n(n);o.a},"532c":function(e,t,i){"use strict";i("673e");var n=i("d4ec"),o=i("bee2"),a=i("f121"),r=i("bc19"),s=i("4c16"),l=function(){function e(t,i){Object(n["a"])(this,e),this.panoVideoManager=i,this.setFromInfo(t),a["a"].isEdit&&this.getInfo()}return Object(o["a"])(e,[{key:"setFromInfo",value:function(e){if(e.pano?this.pano=e.pano:this.pano=app.player.model.panos.index[e.panoId],this.dir=e.dir.normalize(),a["a"].isEdit){if(this.hfov=parseFloat(e.hfov),this.vfov=parseFloat(e.vfov),e.video)this.video&&e.video.src!=this.video.src&&this.attachVideo(e.video);else if(!e.isNew){var t=document.createElement("video");t.src=a["a"].getServerResource("video/video".concat(a["a"].projectNum,"/").concat(this.pano.id,"-user.webm")),t.loadByUrlAndHaventPlay=!0,this.attachVideo(t)}this.computeParam(),e.needUpdate&&this.show()}}},{key:"getClipRect",value:function(){var e=(new THREE.Matrix4).getInverse(app.player.model.matrixWorld.clone()),t=this.pano.position.clone().add(this.dir);t.applyMatrix4(e);var i=r["a"].getNormalDir(t,!0,this.pano),n=r["a"].getUVfromDir(i),o=this.hfov/360,a=this.vfov/180,s=function(e){return e-Math.floor(e)};return{leftBottom:new THREE.Vector2(s(n.x-o/2),s(n.y-a/2)),rightTop:new THREE.Vector2(s(n.x+o/2),s(n.y+a/2))}}},{key:"computeParam",value:function(){var e=this.hfov/360,t=this.vfov/180,i=this.getAbsoluteAngleByDir(this.dir),n=r["a"].getUVfromDir(i.dir2),o=function(e){return e-Math.floor(e)};this.rect={leftBottom:new THREE.Vector2(o(n.x-e/2),o(n.y-t/2)),rightTop:new THREE.Vector2(o(n.x+e/2),o(n.y+t/2))},this.lon=i.lon,this.lat=i.lat}},{key:"getAbsoluteAngleByDir",value:function(e){var t=(new THREE.Matrix4).getInverse(app.player.model.matrixWorld.clone()),i=this.pano.position.clone().add(e);i.applyMatrix4(t);var n=r["a"].getNormalDir(i,!1,this.pano),o={dir2:n};return app.player.cameraControls.controls.panorama.lookAt.call(o,null,n.clone().negate()),o.lon%=360,o}},{key:"attachVideo",value:function(e,t){if(t){var i=Math.sqrt(this.hfov*this.vfov/(e.videoWidth*e.videoHeight)),n=i*e.videoWidth,o=i*e.videoHeight;this.hfov=n,this.vfov=o,this.computeParam()}e.setAttribute("crossOrigin","anonymous"),e.setAttribute("playsinline","true"),e.setAttribute("x5-playsinline","true"),e.setAttribute("webkit-playsinline","true"),e.setAttribute("x5-video-app.player-type","h5"),e.loop=!0,this.video=e,this.panoVideoManager.currentPanoVideo==this&&this.panoVideoManager.attachVideo(e,t)}},{key:"show",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.panoVideoManager.showVideo(this,e)}},{key:"getDirAtAbsoluteAngle",value:function(e,t){var i=r["a"].getDirByLonLat(e,t),n=(new THREE.Matrix4).getInverse(this.pano.skyboxMesh.matrixWorld);return r["a"].crossRight(i,n)}},{key:"getDirAtAngle",value:function(e,t){return this.getDirAtAbsoluteAngle(this.lon+e,this.lat+t)}},{key:"getAngleByDir",value:function(e){var t=this.getAbsoluteAngleByDir(e),i=(t.lon-this.lon)%360;return Math.abs(i)>180&&(i+=i>0?-360:360),{lon:i,lat:t.lat-this.lat}}},{key:"checkIfHover",value:function(){if(!app.player.flying){var e=s["a"].getMouseIntersect(app.player.camera,[app.player.model.skybox],app.player.mouse);if(e){var t=e.point.clone().sub(this.pano.position.clone()),i=this.getAngleByDir(t.clone()),n=i.lon,o=i.lat,a=Math.abs(n);if(a<=this.hfov/2||a>=360-this.hfov/2){var r=Math.abs(o);if(r<=this.vfov/2)return e}}}}},{key:"getInfo",value:function(){this.info={dir:this.dir,hfov:this.hfov,vfov:this.vfov,pano:this.pano,video:this.video,needUpdate:!0}}}]),e}();t["a"]=l},"533b":function(e,t,i){"use strict";i("673e"),i("55dd"),i("6b54"),i("2397"),i("ac6a");var n=i("d4ec"),o=i("bee2"),a=i("257e"),r=i("262e"),s=i("99de"),l=i("7e84"),c=(i("6762"),i("2fdb"),i("7514"),i("bc19"));function u(e){var t=d();return function(){var i,n=Object(l["a"])(e);if(t){var o=Object(l["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(s["a"])(this,i)}}function d(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var h=[],p=[],f=[],m=.1,v=function(e,t){var i;return"string"==typeof e||"number"==typeof e?i=h.find((function(t){return t.ids.includes(e)})):(i=h.find((function(t){return c["a"].closeTo(t.x,e.x,m)&&c["a"].closeTo(t.y,e.y,m)})),i?i.addPoint(e.id):i=new y(e.x,e.y,{record:!0,id:e.id},t)),i||console.log("no point!"),i},g=function(e){return p.find((function(t){return t.ids.includes(e)}))},y=function(e){Object(r["a"])(i,e);var t=u(i);function i(e,o){var r,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(n["a"])(this,i),r=t.call(this,e,o),s.record&&(r.id=s.id,void 0==r.id&&(r.id="add_"+h.length),r.ids=[r.id],h.push(Object(a["a"])(r))),r.type=s.type||"",r.lines=[],r}return Object(o["a"])(i,[{key:"addPoint",value:function(e){this.ids.push(e)}},{key:"searchLineByFactor",value:function(e,t,i){var n,o=this,a=this.lines.filter((function(e){return e.searchTime<2}));if(0!=a.length)return 1==a.length?a[0]:(a=a.filter((function(e){return e!=i})),1==a.length?a[0]:(a.forEach((function(i){var a=i.getVector();i.points[1]==o&&a.negate();var r=c["a"].getVec2Angle(e,a);new THREE.Vector3(e.x,e.y,0).cross(new THREE.Vector3(a.x,a.y,0)).z<0&&(r*=-1),n?("min"==t&&r<n.factor||"max"==t&&r>n.factor)&&(n={line:i,factor:r}):n={line:i,factor:r}})),n.line))}}]),i}(THREE.Vector2),b=0,w=function(){function e(t){var i=this;if(Object(n["a"])(this,e),t.points[0]!=t.points[1]){if(this.points=t.points,this.type=t.type||"line","line"==this.type){var o=p.find((function(e){return e.points.includes(t.points[0])&&e.points.includes(t.points[1])}));if(o)return void 0!=t.id&&o.ids.push(t.id),o;this.id=void 0==t.id?"line"+b++:t.id,this.ids=[this.id],t.dontWriteToPoint||this.points.forEach((function(e){e.lines.push(i)})),t.isChild||p.push(this),this.searchTime=0}this.children=[],this.parents=[],this.match=[]}}return Object(o["a"])(e,[{key:"getIntersectWithLine",value:function(e,t){var i=this,n=e.points.find((function(e){return i.points.includes(e)}));if(n)return{point:n,type:"joint"};var o=c["a"].isLineIntersect(e.points,this.points,!1,t);return o?{point:o,type:"intersect"}:void 0}},{key:"writeToPoint",value:function(){var e=this;this.points.forEach((function(t){t.lines.includes(e)||t.lines.push(e)}))}},{key:"checkIfParent",value:function(e){return this==e||this.parents.find((function(t){return t.checkIfParent(e)}))}},{key:"splitByPoint",value:function(t){var i=this,n=new e({points:[t,this.points[0]],dontWriteToPoint:!0,hasntsure:!0}),o=new e({points:[t,this.points[1]],dontWriteToPoint:!0,hasntsure:!0});if(n.points&&o.points){if(!(this.checkIfParent(n)||this.checkIfParent(o)||n.checkIfParent(this)||o.checkIfParent(this))){var a=function(e){i.children.push(e),e.parents.push(i),p.includes(e)||p.push(e),e.writeToPoint()};a(n),a(o);var r=this.points[0].lines.indexOf(this);r>-1&&this.points[0].lines.splice(r,1);r=this.points[1].lines.indexOf(this);return r>-1&&this.points[1].lines.splice(r,1),[n,o]}console.error("splitByPoint 发现parent和children一样")}else console.warn("splitByPoint 线有点相同")}},{key:"splitByPoints",value:function(t){var i=this;t=t.map((function(e){return{dis:e.distanceTo(i.points[0]),point:e}})),t.sort((function(e,t){return e.dis-t.dis}));var n=[];t.forEach((function(o,a){var r=new e({points:[o.point,0==a?i.points[0]:t[a-1].point],group:i.group,dontWriteToPoint:!0,hasntsure:!0});n.push(r)}));var o=new e({points:[t[t.length-1].point,this.points[1]],group:this.group,dontWriteToPoint:!0,hasntsure:!0});n.push(o);var a=n.find((function(e){return!e.points||i.checkIfParent(e)||e.checkIfParent(i)}));if(a)console.error("splitByPoints return");else{n.forEach((function(e){i.children.push(e),e.parents.push(i),p.includes(e)||p.push(e),e.writeToPoint(),e.writeToPoint()}));var r=this.points[0].lines.indexOf(this);r>-1&&this.points[0].lines.splice(r,1);r=this.points[1].lines.indexOf(this);r>-1&&this.points[1].lines.splice(r,1)}}},{key:"getAllSlices",value:function(){var e=[],t=function t(i){0==i.children.length?e.push(i):i.children.forEach(t)};return t(this),e}},{key:"getVector",value:function(){return this.points[1].clone().sub(this.points[0])}},{key:"getLength",value:function(){return this.points[0].distanceTo(this.points[1])}},{key:"getCenter",value:function(){return this.points[1].clone().add(this.points[0]).multiplyScalar(.5)}}]),e}(),E=function(e,t){return e.filter((function(e){return t.includes(e)}))},T=function(e,t){var i=e.filter((function(e){return!t.includes(e)})),n=t.filter((function(t){return!e.includes(t)}));return i.concat(n)},P=function(e){var t=[];return e.forEach((function(e){e.forEach((function(e){var i=t.indexOf(e);i>-1?t.splice(i,1):t.push(e)}))})),t};function x(e,t){var i=e[0].clone().add(e[1]).multiplyScalar(.5);if(t=t.filter((function(e){return c["a"].ifPointAtLineBound(i,e.points,m)})),0!=t.length){var n={line:null,dis:1/0};return t.forEach((function(e){var t=c["a"].getFootPoint(i,e.points[0],e.points[1]),o=t.distanceTo(i);o<n.dis&&(n.line=e,n.dis=o)})),n}}var k=0,R=function e(t){Object(n["a"])(this,e),this.id=k++,this.type=t.type||"normal",this.points=t.points,this.lines=t.lines,f.push(this),this.child=[],this.parent=[],this.smallNeibours=[];var i=c["a"].getArea(this.points);this.area=Math.abs(i),this.isClockwise=i<0},_=function(e,t){return p.find((function(i){return i.points.includes(e)&&i.points.includes(t)}))},S=function(e,t){for(var i,n,o=[],a=0,r=e.length;a<r;a++)t.indexOf(e[a])>-1&&o.push(e[a]);for(var s=0,l=t.length;s<l;s++){var c=o.indexOf(t[s]);if(-1==c)return!1;if(0==s)n=c;else if(1==s){if(i=c-n,i==l-1?i=-1:i==1-l&&(i=1),-1!=i&&1!=i)return!1}else if(c!=(n+i*s+l)%l)return!1}return{sameAxis:i>0}},M=function(e,t){if(e instanceof R&&(e=e.points),t instanceof R&&(t=t.points),e.length!=t.length)return!1;if(e.lines&&t.lines){if(0==T(e.lines,t.lines).length)return!0}else if(S(e,t))return!0},A=function e(t,i,n){if(0==i.children.length){if(c["a"].ifPointAtLineBound(t,i.points,n))return i}else for(var o=0;o<i.children.length;o++){var a=e(t,i.children[o],n);if(a)return a}};function O(){for(var e=p.length,t=function e(t,i){if(t!=i){var n,o=t.getIntersectWithLine(i,m);if(o){if("intersect"==o.type){n=v(o.point,"whenGetSliceLines");var a=A(n,t),r=A(n,i);if(a||(a=A(n,t,m)),a||(a=A(n,t,2*m)),r||(r=A(n,i,m)),r||(r=A(n,i,2*m)),!a||!r)return console.warn("atWhichChildLine仍旧找不到 :"+t.id+","+i.id+", pointId: "+n.id),a||console.warn("找不到line1"),void(r||console.warn("找不到line2"));a.points.find((function(e){return e==n}))&&r.points.find((function(e){return e==n}))||(a.points.find((function(e){return e==n}))?r.splitByPoint(n):r.points.find((function(e){return e==n}))?a.splitByPoint(n):(a.splitByPoint(n),r.splitByPoint(n)))}else if(n=o.point,c["a"].closeTo(t.angle,i.angle)){var s=t.getAllSlices(),l=i.getAllSlices();if(s.length>1||l.length>1)return void s.forEach((function(t){l.forEach((function(i){e(t,i)}))}));var u=t.points.find((function(e){return e!=n})),d=i.points.find((function(e){return e!=n}));c["a"].ifPointAtLineBound(u,i.points)?i.splitByPoint(u):c["a"].ifPointAtLineBound(d,t.points)&&t.splitByPoint(d)}}else if(c["a"].closeTo(t.angle,i.angle)){var h=t.getVector(),p=t.points[0].clone().sub(i.points[0]),f=c["a"].getVec2Cos(h,p);if(c["a"].closeTo(f,-1,1e-4)||c["a"].closeTo(f,1,1e-4)){s=t.getAllSlices(),l=i.getAllSlices();if(s.length>1||l.length>1)return void s.forEach((function(t){l.forEach((function(i){e(t,i)}))}));var g=t.points[0],y=t.reverse==i.reverse?i.points[0]:i.points[1],b=t.points[1],w=t.reverse==i.reverse?i.points[1]:i.points[0],E=y.clone().sub(b),T=w.clone().sub(g);if(E.length()<T.length()){var P=g.clone().sub(b);if(c["a"].getVec2Angle(E,P)>=1.57)return}else{var x=b.clone().sub(g);if(c["a"].getVec2Angle(T,x)>=1.57)return}var k=function(e,t){var i=c["a"].ifPointAtLineBound(e.points[0],t.points),n=c["a"].ifPointAtLineBound(e.points[1],t.points);if(i&&n)return t.splitByPoints(e.points),!0;if(i||n){var o=i?e.points[0]:e.points[1],a=i?e.points[1]:e.points[0],r=t.points[0].distanceTo(a),s=t.points[1].distanceTo(a),l=r<s?t.points[0]:t.points[1];return e.splitByPoint(l),t.splitByPoint(o),!0}};k(t,i)||k(i,t)}}}},i=0;i<e;i++)for(var n=p[i],o=i+1;o<e;o++){var a=p[o];t(n,a)}}var C=new THREE.Box2,D=function(e){e.points.forEach((function(e){C.expandByPoint(new THREE.Vector2(e.x,e.y))}));var t=C.getSize();m=THREE.Math.clamp(Math.max(t.x,t.y)/70,.2,2),e.points.forEach((function(e){return v(e)})),e.lines.forEach((function(e){new w({points:[v(e.p1),v(e.p2)],id:e.id})}))},V=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};h=[],p=[],f=[],b=k=0,e.points=e.points||[],e.lines=e.lines||[],e.doors=e.doors||[],D(e),O();var t=0,i=0,n=function(e,t,n,o){if(i++,console.log("addRingJudge points("+o+"):"+e.map((function(e){return e.id}))),"small"==o){var a=[];while(e.length){for(var r=[],s=!1,l=0;l<e.length;l++){if(r.includes(e[l])){var c=r.indexOf(e[l]),u=e.slice(c,l),d=t.slice(c,l);e.splice(c,l-c),t.splice(c,l-c),u.length>2&&(f.find((function(e){return M(u,e)}))||a.push(new R({points:u,lines:d}))),s=!0;break}r.push(e[l]),s=!1}if(!s){e.length>2&&(f.find((function(t){return M(e,t)}))||a.push(new R({points:e,lines:t})));break}}}},o=function e(i,o,a,r){var s,l;if(t++,a.includes("big"))if(o){var c=o.points[o.points.length-1];l=i.clone().sub(c),s=i.searchLineByFactor(l,"min",_(i,c))}else l=a.includes("Left")?new THREE.Vector2(1,0):new THREE.Vector2(-1,0),s=i.searchLineByFactor(l,"min");else if(o){c=o.points[o.points.length-1];l=i.clone().sub(c),s=i.searchLineByFactor(l,"max",_(i,c))}else l=new THREE.Vector2(1,0),s=i.searchLineByFactor(l,"min");if(s){s.searchTime++,r.includes(s)||r.push(s);var u=s.points.find((function(e){return i!=e})),d=o?o.points.concat([i]):[i],h=o?o.lines.concat([s]):[s];return u==d[0]?n(d,h,r,a):e(u,{lines:h,points:d},a,r)}};while(1){var a=[],r=null;if(h.forEach((function(e){e.lines.find((function(e){return e.searchTime<2}))&&(r?e.x<r.x&&(r=e):r=e)})),!r)break;o(r,null,"bigLeft",a),a=a.filter((function(e){return e.searchTime<2}));var s=function(){var e=[];if(a.forEach((function(t){return t.points.forEach((function(t){e.includes(t)||e.push(t)}))})),r=null,e.forEach((function(e){e.lines.find((function(e){return e.searchTime<2}))&&(r?e.x<r.x&&(r=e):r=e)})),!r)return"break";o(r,null,"small",a),a=a.filter((function(e){return e.searchTime<2}))};while(a.length>0){var l=s();if("break"===l)break}}console.log("searchTime "+t+", addRingJudgeCount "+i);for(var u=f.length,d=0;d<u;d++)for(var v=f[d],y=d+1;y<u;y++){var w=f[y],S=E(v.lines,w.lines);S.length&&(v.smallNeibours.push(w),w.smallNeibours.push(v))}f.forEach((function(e){for(var t=0;t<u;t++){var i=f[t];e==i||e.smallNeibours.includes(i)||c["a"].isPointInArea(i.points,e.points[0])&&(i.child.push(e),e.parent.push(i))}}));var C=f.filter((function(e){return!e.isClockwise}));C.length>0&&(console.log("%c存在非最小的ring! 进行处理:","color:#00f"),C.forEach((function(e){if(e.smallNeibours.length>0){var t=!1,i=T(e.lines,P(e.smallNeibours.concat(e.child).map((function(e){return e.lines}))));t=i.every((function(t){return e.child.find((function(e){return e.lines.includes(t)}))})),t&&(console.log("%c删除非最小环 ring"+e.id,"color:#00f"),console.log(e),f.splice(f.indexOf(e),1),e.child.forEach((function(t){var i=t.parent.indexOf(e);i>-1&&t.parent.splice(i,1)})),e.parent.forEach((function(t){var i=t.child.indexOf(e);i>-1&&t.child.splice(i,1)})),e.smallNeibours.forEach((function(t){var i=t.smallNeibours.indexOf(e);i>-1&&t.smallNeibours.splice(i,1)})))}}))),f.forEach((function(e){e.parent.length&&(e.closetParent=e.parent.find((function(t){return t.parent.length==e.parent.length-1})),e.closetParent.closetChilds||(e.closetParent.closetChilds=[]),e.closetParent.closetChilds.push(e))})),console.log(f),e.doors.forEach((function(e){if(e.atLine=g(e.line),!e.atLine){console.warn("没找到门所在的原始线 door"+e.id+", 应该是线条过短,被去除");var t=x([new THREE.Vector2(e.pos[0],e.pos[1]),new THREE.Vector2(e.pos[2],e.pos[3])],p);if(!t)return;e.atLine=t.line,console.warn(e.id+" 自动寻找到线 "+e.atLine.id)}if(e.atLine.children.length){var i={x:(e.pos[0]+e.pos[2])/2,y:(e.pos[1]+e.pos[3])/2},n=A(i,e.atLine);n||(n=A(i,e.atLine,m)),e.atLine=n}e.atLine&&e.atLine.points?e.linePoints=e.atLine.points.map((function(e){return e.id})):console.warn("没找到门所在的线 door"+e.id)}));var V=f.map((function(t){var i={id:t.id,points:t.points.map((function(e){return{id:e.ids[0],x:e.x,y:e.y}})),doors:e.doors.filter((function(e){if(t.closetChilds){var i=P(t.closetChilds.map((function(e){return e.lines})));return t.lines.concat(i).includes(e.atLine)}return t.lines.includes(e.atLine)})),closetParent:t.closetParent&&t.closetParent.id,closetChilds:t.closetChilds&&t.closetChilds.map((function(e){return e.id}))};return i}));return e.doors.forEach((function(e){for(var t in e)"id"!=t&&"linePoints"!=t&&"atRooms"!=t&&delete e[t]})),console.log(JSON.stringify(V)),V};t["a"]=V},"541a":function(e,t,i){"use strict";var n={GL_TEXTURE_CUBE_MAP_POSITIVE_X:0,GL_TEXTURE_CUBE_MAP_NEGATIVE_X:1,GL_TEXTURE_CUBE_MAP_POSITIVE_Y:2,GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:3,GL_TEXTURE_CUBE_MAP_POSITIVE_Z:4,GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:5};t["a"]=n},"583b":function(e,t,i){"use strict";i("6b54"),i("2397"),i("673e");var n=i("d4ec"),o=i("bee2"),a=i("257e"),r=i("262e"),s=i("99de"),l=i("7e84"),c=i("ade3"),u=i("6860"),d=i("dfd6"),h=i("823b"),p=i("80c5"),f=i("2d47"),m=i("1158"),v=i("b235"),g=i("7d96"),y=i("9ef6"),b=(i("f121"),i("349f")),w=i("ff11"),E=i("22c0"),T=i.n(E);function P(e){var t=x();return function(){var i,n=Object(l["a"])(e);if(t){var o=Object(l["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(s["a"])(this,i)}}function x(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var k={onUpdate:!0,isPlaying:!1,isPause:!1,flyToSingleCap:!1,currentIndex:0,transWeight:.98,rotationWeight:.92,wait:!0},R=function(e){Object(r["a"])(i,e);var t=P(i);function i(){var e;return Object(n["a"])(this,i),e=t.call(this),Object(c["a"])(Object(a["a"])(e),"heroCount",(function(){var e=u["store"].getters["guide/plays"];return e.length})),e.play=Object(a["a"])(e),e.sItemTime=null,e.sWorldTime=null,e}return Object(o["a"])(i,[{key:"ifPlay",value:function(){return!this.control.wait&&!this.control.isPause&&this.control.isPlaying}},{key:"start",value:function(e){var t=u["store"].getters["guide/plays"];this.control.currentIndex>t.length-1&&(this.control.currentIndex=0,h["a"].warn("当前播放片段怎么会超出播放片段的最大范围?")),this.control.isPause=!1,this.emit("guide/play/flyToStart",this.control.currentIndex);var i=function(){this.control.isPause||(h["a"].info("开始播放录屏了!"),this.control.isPause=!1,this.control.wait=!1,this.control.flyToSingleCap=!1,this.emit("guide/play/start",this.control.currentIndex),w["a"].pause(!0),w["c"].time(t[this.control.currentIndex].time.sTime),this.sWorldTime=this.sceneRenderer.updateClock.elapsedTime,this.sItemTime=t[this.control.currentIndex].time.sTime,w["c"].mute(!1),w["c"].play(),e&&e())},n=self.setInterval(function(){if(!this.player.flying){this.control.flyToSingleCap=!0;u["store"].getters["guide/plays"];var e=d["a"].getPlayDataItem(this.control.currentIndex);this.player.flyToItem(e,i.bind(this)),window.clearInterval(n)}}.bind(this),100)}},{key:"pause",value:function(e){this.setControlForPause(),this.emit("guide/play/pause",this.control.currentIndex),w["c"].pause(),e||this.player.currentPano.hasVideo||w["a"].resume()}},{key:"stop",value:function(){this.setControlForPause(),this.control.currentIndex=0,this.emit("guide/play/stop"),w["c"].stop(),this.player.currentPano.hasVideo||w["a"].resume()}},{key:"setControlForPause",value:function(){this.control.isPlaying=!1,this.control.isPause=!0,this.control.onUpdate=!0,this.control.wait=!0,v["a"].cancelById(y["a"].freeze.LookRotationForPlay),v["a"].cancelById(y["a"].freeze.LookTransition),this.player.mode==p["a"].PANORAMA&&this.player.adjustControlAngel(),this.tagManager.closeOpenedTag()}},{key:"playFragment",value:function(){h["a"].info("执行playFragment"),this.control.wait=!0,this.control.isPlaying=!0;var e=u["store"].getters["guide/plays"];if(this.control.currentIndex!=e.length){var t=d["a"].getPlayDataItem(this.control.currentIndex);t.transType;this.emit("guide/play/playing",this.control.currentIndex),this.control.onUpdate=!1,t.tags&&t.tags.length>0?this.playTag(0):this.playNoTag()}else this.stop()}},{key:"playTag",value:function(e){h["a"].info("执行playTag");var t=d["a"].getPlayDataItem(this.control.currentIndex),i=d["a"].getPlayDataItem2(this.control.currentIndex),n=function(e){var i=this.tagManager.tags[t.tags[e].sid];if("open"==t.tags[e].state?(this.tagManager.billboard.open(i),this.tagManager.openedTag=i):"close"==t.tags[e].state&&this.tagManager.closeOpenedTag(),t.tags[e]&&"trans"==t.tags[e].type)return this.emit("guide/play/progress",this.control.currentIndex,1),void this.transitionForTag();++e,e<t.tags.length?this.playTag(e):this.playNoTag()};if(!(e<t.tags.length))return this.emit("guide/play/progress",this.control.currentIndex,1),void this.stop();var o,a,r=0,s=i.time.sTime,l=1;o=(t.tags[e].sTime-t.sTime)/t.speed+s,a=new THREE.Quaternion(t.tags[e].quaternion._x,t.tags[e].quaternion._y,t.tags[e].quaternion._z,t.tags[e].quaternion._w),t.tags[e].zoom&&t.tags[e].zoom,e>0&&(s=(t.tags[e-1].sTime-t.sTime)/t.speed+s),r=.95*(o-s);var c=s-this.sItemTime-d["a"].getTime(this.sWorldTime);console.log("currentIndex:"+this.control.currentIndex),console.log("difTime:"+c),r<0&&(h["a"].error("热点关闭的时间居然大于节点最后的时间1!"),r=.1);var u=1/(t.tags.length+1),p=this.player.cameraControls.activeControl.camera.quaternion.clone();v["a"].start(f["a"].quaternion(p,a,function(t,i){var n=new THREE.Vector3(0,0,-1).applyQuaternion(t).add(this.player.position);this.player.cameraControls.activeControl.camera.lookAt(n),this.emit("guide/play/progress",this.control.currentIndex,e*u+u*i)}.bind(this)),r/l*1e3,n.bind(this,e),0,m["a"][y["a"].flydown.rotationEasing],null,y["a"].freeze.LookRotationForPlay)}},{key:"playNoTag",value:function(){var e=this;h["a"].info("执行playNoTag");var t=1,i=d["a"].getPlayDataItem2(this.control.currentIndex),n=d["a"].getPlayDataItem(this.control.currentIndex),o=i.time.sTime;n.tags&&n.tags.length>0&&(o=(n.tags[n.tags.length-1].sTime-n.sTime)/n.speed+o,t=1/(n.tags.length+1));var a=i.time.eTime,r=n.eZoom,s=new THREE.Quaternion(n.eQua._x,n.eQua._y,n.eQua._z,n.eQua._w),l=null;n.ePos&&(l=new THREE.Vector3(n.ePos.x,n.ePos.y,n.ePos.z));var c=1,u=o-this.sItemTime-d["a"].getTime(this.sWorldTime);console.log("currentIndex:"+this.control.currentIndex),console.log("difTime:"+u),u>0&&(u*=.95);var g=.95*(a-o)+u;console.log("playNoTag---原先的时间:"+(a-o)+",现在的时间:"+g),g<0&&(h["a"].warn("热点关闭的时间居然大于节点最后的时间2!"),g=.1);var b=0;if(n.wTime&&(b=1e-4),n.mode==p["a"].DOLLHOUSE||n.mode==p["a"].FLOORPLAN){var w=function(e,i){this.emit("guide/play/progress",this.control.currentIndex,1-t+t*i-b)}.bind(this);this.transForFloorPlanAndDollhouse(l,n.eTarget,r,n.mode,w,this.playTransition.bind(this),g/c*1e3)}else{var E=this.player.cameraControls.activeControl.camera.quaternion.clone();v["a"].start(f["a"].quaternion(E,s,function(e,i){if(this.player.cameraControls.activeControl){var n=new THREE.Vector3(0,0,-1).applyQuaternion(e).add(this.player.position);this.player.cameraControls.activeControl.camera.lookAt(n)}this.emit("guide/play/progress",this.control.currentIndex,1-t+t*i-b)}.bind(this)),g/c*1e3,(function(){g<0?e.playTransition(500):e.playTransition()}),0,m["a"][y["a"].flydown.rotationEasing],null,y["a"].freeze.LookRotationForPlay)}}},{key:"playTransition",value:function(e){e||(e=1e3),h["a"].info("哈哈,开始过渡了!");var t=u["store"].getters["guide/plays"];if(this.control.wait=!0,this.player.adjustControlAngel(),this.control.onUpdate=!0,this.control.currentIndex<t.length-1){var i=d["a"].getPlayDataItem(this.control.currentIndex+1),n=new THREE.Vector3(0,0,-1).applyQuaternion(i.qua).add(i.pos),o=b["a"].get(i.mode);if(o==p["a"].PANORAMA){var a=this.player.model.panos.get(t[this.control.currentIndex+1].value.pano);if(t[this.control.currentIndex].value.type==b["a"].NEWLTYPE)++this.control.currentIndex,this.player.flyToNewMode({pano:a,quaternion:i.qua,mode:p["a"].PANORAMA,duration:e});else{++this.control.currentIndex;var r=t[this.control.currentIndex-1].transType;"opacity"==r?(this.panoVideoRenderer.deactivePanorama(this.player.model.panos.get(t[this.control.currentIndex-1].value.pano)),this.director.goToHighlight(this.control.currentIndex),this.player.model.floorLogos.firstLogo.position.copy(a.floorPosition.clone().sub(this.player.model.position)),this.player.model.floorLogos.secondLogo.position.copy(a.floorPosition.clone().sub(this.player.model.position))):this.player.currentPano.id!=a.id?this.player.flyToPano({pano:a,lookAtPoint:n,duration:e}):this.control.wait=!1}}else if(++this.control.currentIndex,this.player.mode==o){var s=function(){this.record.updateFragmentUI(this.control.currentIndex),this.control.wait=!1}.bind(this);this.transForFloorPlanAndDollhouse(i.pos,i.target,i.zoom,o,null,s,1e3,null)}else this.player.flyToNewMode({position:i.pos,target:i.target,quaternion:i.qua,mode:o,zoom:i.zoom,duration:e})}else this.stop()}},{key:"transitionForTag",value:function(){var e=d["a"].getPlayDataItem(this.control.currentIndex),t=d["a"].getPlayDataItem(this.control.currentIndex+1);if(t){var i=e.tags[e.tags.length-1];if(i&&"trans"==i.type){var n=this.player.model.panos.get(t.pano);if(e.mode==p["a"].PANORAMA&&t.mode==p["a"].PANORAMA){var o=new THREE.Vector3(0,0,-1).applyQuaternion(t.qua).add(t.pos);++this.control.currentIndex,this.player.flyToPano({pano:n,lookAtPoint:o},function(){this.control.wait&&this.control.isPlaying&&(this.record.updateFragmentUI(this.control.currentIndex),this.control.wait=!1)}.bind(this))}else e.mode!=p["a"].PANORAMA&&t.mode==p["a"].PANORAMA&&(++this.control.currentIndex,this.player.flyToNewMode({pano:n,quaternion:t.qua,mode:p["a"].PANORAMA}))}}else this.stop()}},{key:"transForFloorPlanAndDollhouse",value:function(e,t,i,n,o,a,r){v["a"].start(f["a"].vector(this.player.cameraControls.activeControl.target,new THREE.Vector3(t.x,t.y,t.z),o),r,null,0,m["a"][y["a"].flydown.rotationEasing],null,y["a"].freeze.LookRotationForPlay),v["a"].start(f["a"].vector(this.player.cameraControls.activeControl.camera.position,e),r,a,0,m["a"][y["a"].flydown.rotationEasing],null,y["a"].freeze.LookRotationForPlay),n==p["a"].FLOORPLAN&&this.player.cameraControls.activeControl.absoluteScale!=i&&(i=g["a"].convertWorkshopOrthoZoom(i),v["a"].start(f["a"].property(this.player.cameraControls.activeControl,"absoluteScale",i,function(e){this.player.cameraControls.activeControl&&(this.player.cameraControls.activeControl.currentScale=e,"PerspectiveCamera"!=this.player.cameraControls.activeControl.camera.type&&this.player.cameraControls.activeControl.updateZoom())}.bind(this)),r,null,0,m["a"][y["a"].flydown.rotationEasing],null,y["a"].freeze.LookRotationForPlay))}},{key:"chooseFragment",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0;this.control.currentIndex=e;var n=d["a"].getPlayDataItem(e),o=null,a=null,r=null,s=null,l=n.mode;if(1==t||0==t?(r=n.qua,s=n.pos,a=n.target,o=n.zoom):(o=n.eZoom,a=n.eTarget,r=n.eQua,s=n.pos,n.ePos&&(s=n.ePos)),this.control.flyToSingleCap=!0,this.player.mode==p["a"].PANORAMA&&l==p["a"].PANORAMA){var c=this.player.model.panos.get(n.pano),u=new THREE.Vector3(0,0,-1).applyQuaternion(r).add(s);this.player.flyToPano({pano:c,lookAtPoint:u},i)}else if(l==p["a"].PANORAMA){var h=this.player.model.panos.get(n.pano);this.player.flyToNewMode({pano:h,mode:l,quaternion:(new THREE.Quaternion).copy(r),callback:i})}else this.player.mode!=l?this.player.flyToNewMode({position:s,mode:l,zoom:o,target:a,quaternion:(new THREE.Quaternion).copy(r),callback:i}):this.transForFloorPlanAndDollhouse(s,a,o,l,null,i,1e3)}},{key:"updateProgress",value:function(){}},{key:"getNextItem",value:function(){}},{key:"setPlayIndex",value:function(e){this.control.currentIndex=e}},{key:"control",get:function(){return k}}]),i}(u["default"]),_=new R,S=!1;T.a.on("statusChanged",(function(e){"hidden"==e.status?(S=_.control.isPlaying,S?_.pause(!0):w["a"].pause(!0)):"active"==e.status&&(S?(S=!1,_.start()):_.player.currentPano&&!_.player.currentPano.hasVideo&&w["a"].resume())})),t["a"]=_},"5b3e":function(e,t,i){"use strict";var n=i("2fdba"),o=i.n(n);o.a},"5fda":function(e,t){e.exports=THREE},"617a":function(e,t,i){"use strict";var n=i("d9c2");t["a"]=n["a"]},"63ac":function(e,t,i){},"65ae":function(e,t,i){"use strict";var n={Move:"move",InteractionDirect:"interaction.direct",InteractionKey:"interaction.key",InteractionGui:"interaction.gui",FlyInDirection:"fly.direction",InputStart:"input.start",Pinch:"input.pinch",Scroll:"input.scroll",AutoPanInterrupt:"autopan.interrupt",AutoPanComplete:"autopan.complete",AutoPanClamped:"autopan.clamped",LongTap:"longtap"};t["a"]=n},6860:function(e,t,i){"use strict";i.r(t),i.d(t,"bus",(function(){return v["a"]})),i.d(t,"store",(function(){return m["a"]})),i.d(t,"metadata",(function(){return b})),i.d(t,"objects",(function(){return w})),i.d(t,"logger",(function(){return f["a"]})),i.d(t,"config",(function(){return p["a"]})),i.d(t,"getPlayerSize",(function(){return T}));i("ac6a"),i("6b54"),i("2397"),i("7f7f");var n=i("d4ec"),o=i("bee2"),a=i("262e"),r=i("99de"),s=i("7e84"),l=(i("4917"),i("257e"));i("e70e"),i("f023"),i("ae62"),i("7fbc");function c(e){var t=u();return function(){var i,n=Object(s["a"])(e);if(t){var o=Object(s["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(r["a"])(this,i)}}function u(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function d(e){__init__[e]?__init__[e]++:__init__[e]=1}function h(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),o=1;o<t;o++)i[o-1]=arguments[o];var r=function(e){Object(a["a"])(o,e);var t=c(o);function o(){var e;Object(n["a"])(this,o);for(var a=arguments.length,r=new Array(a),c=0;c<a;c++)r[c]=arguments[c];return e=t.call.apply(t,[this].concat(r)),i.forEach((function(t){s(Object(l["a"])(e),new t)})),e}return o}(e),s=function e(t,i,n){Object.getOwnPropertyNames(i).concat(Object.getOwnPropertySymbols(i)).forEach((function(e){e.match(/^(?:constructor|prototype|arguments|caller|name|bind|call|apply|toString|length)$/)||Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})),n&&i.prototype&&e(t,i.prototype,!0)};return i.forEach((function(e){s(r.prototype,e.prototype,!0),s(r,e)})),r}window.__init__={},window.requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame,Math.sign=function(e){return e<0?-1:1};var p=i("f121"),f=i("823b"),m=i("eb02"),v=i("c75e");function g(e){var t=y();return function(){var i,n=Object(s["a"])(e);if(t){var o=Object(s["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(r["a"])(this,i)}}function y(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var b=m["a"].state.scene.metadata,w={store:m["a"],projectNum:p["a"].projectNum,metadata:b,model:null,player:null,modelProcess:null,cameraControls:null,displayController:null,sceneRenderer:null,modelManager:null,tagManager:null,qualityManager:null,quickstartManager:null,tileDownloader:null,panoRenderer:null,panoVideoRenderer:null,preloaders:null,director:null,play:null,record:null};var E=function(e){Object(a["a"])(i,e);var t=g(i);function i(){var e;return Object(n["a"])(this,i),e=t.call(this),d(e.constructor.name),e}return Object(o["a"])(i,[{key:"store",get:function(){return m["a"]}},{key:"metadata",get:function(){return b}},{key:"logger",get:function(){return f["a"]}},{key:"config",get:function(){return p["a"]}},{key:"modelProcess",get:function(){return w.modelProcess},set:function(e){w.modelProcess=e}},{key:"model",get:function(){return w.model},set:function(e){w.model=e}},{key:"player",get:function(){return w.player},set:function(e){w.player=e}},{key:"cameraControls",get:function(){return w.cameraControls},set:function(e){w.cameraControls=e}},{key:"displayController",get:function(){return w.displayController},set:function(e){w.displayController=e}},{key:"projectNum",get:function(){return w.projectNum},set:function(e){w.projectNum=e}},{key:"sceneRenderer",get:function(){return w.sceneRenderer},set:function(e){w.sceneRenderer=e}},{key:"modelManager",get:function(){return w.modelManager},set:function(e){w.modelManager=e}},{key:"tagManager",get:function(){return w.tagManager},set:function(e){w.tagManager=e}},{key:"qualityManager",get:function(){return w.qualityManager},set:function(e){w.qualityManager=e}},{key:"quickstartManager",get:function(){return w.quickstartManager},set:function(e){w.quickstartManager=e}},{key:"tileDownloader",get:function(){return w.tileDownloader},set:function(e){w.tileDownloader=e}},{key:"panoRenderer",get:function(){return w.panoRenderer},set:function(e){w.panoRenderer=e}},{key:"panoVideoRenderer",get:function(){return w.panoVideoRenderer},set:function(e){w.panoVideoRenderer=e}},{key:"director",get:function(){return w.director},set:function(e){w.director=e}},{key:"play",get:function(){return w.play},set:function(e){w.play=e}},{key:"record",get:function(){return w.record},set:function(e){w.record=e}}]),i}(EventEmitter);function T(){var e=$("#player");return{width:e.length?e.width():0,height:e.length?e.height():0}}E.Mixin=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.forEach((function(e){return d(e.name)})),h.apply(void 0,[E].concat(t))};t["default"]=E},7338:function(e,t,i){"use strict";var n={BASE:1,STANDARD:2,HIGH:3,ULTRAHIGH:4};t["a"]=n},"79f8":function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"pc-setting",attrs:{"app-border":"","dir-left":""}},[e._t("default")],2)},o=[],a={name:"pc-setting",props:{scrollbar:{type:Boolean,default:!0}},mounted:function(){var e=this;this.scrollbar&&this.$nextTick((function(){return $(e.$el).mCustomScrollbar({axis:"y",scrollInertia:200,autoHideScrollbar:!1})}))},activated:function(){var e=this;this.scrollbar&&this.$nextTick((function(){$(e.$el).mCustomScrollbar("update"),$(e.$el).mCustomScrollbar("scrollTo","top",0)}))}},r=a,s=(i("5b3e"),i("2877")),l=Object(s["a"])(r,n,o,!1,null,"04f5e790",null);t["default"]=l.exports},"7a31":function(e,t,i){"use strict";i("28a5");var n=function(e){this.elem=e.elem,this.domParent=e.domParent,this.elem.on("pointerdown mousedown touchstart",this.beginMove.bind(this)),$(document).on("pointermove mousemove touchmove",this.move.bind(this)),e.cameraControls?e.cameraControls.pointerUpBinds.push(this.moveDone.bind(this)):$(document).on("pointerup mouseup touchend touchcancel",this.moveDone.bind(this)),this.beginMoveFuc=e.beginMoveFuc,this.moveDoneFuc=e.moveDoneFuc,this.hasBound=e.hasBound,this.useTransform=e.useTransform,e.hasBound&&(this.needGetBound=1,window.addEventListener("resize",function(){this.needGetBound=1}.bind(this))),this.recover()};n.prototype.beginMove=function(e){if(e.preventDefault(),e.stopPropagation(),this.hasBound&&this.getMoveBound(),!this.moving){e=e.originalEvent||e;var t=e.type.indexOf("touch")>-1;if(this.moving=!0,this.useTransform){var i=this.elem.css("transform").split(",");"none"!=i&&(this.dragInfo={startElem:{x:parseFloat(i[4]),y:parseFloat(i[5])},endElem:{x:parseFloat(i[4]),y:parseFloat(i[5])}})}else this.dragInfo={startElem:{x:parseFloat(this.elem[0].style.left),y:parseFloat(this.elem[0].style.top)}};this.dragInfo.startMouse={x:t?e.changedTouches[0].clientX:e.clientX,y:t?e.changedTouches[0].clientY:e.clientY},this.beginMoveFuc&&this.beginMoveFuc(),console.log("beginMove")}},n.prototype.move=function(e){if(this.moving){e=e.originalEvent||e;var t=e.type.indexOf("touch")>-1,i=t?e.changedTouches[0].clientX:e.clientX,n=t?e.changedTouches[0].clientY:e.clientY;this.dragInfo.vector={x:i-this.dragInfo.startMouse.x,y:n-this.dragInfo.startMouse.y},this.dragInfo.endElem={x:this.dragInfo.startElem.x+this.dragInfo.vector.x,y:this.dragInfo.startElem.y+this.dragInfo.vector.y},this.hasBound&&(this.dragInfo.endElem.x=Math.max(this.bound.left,this.dragInfo.endElem.x),this.dragInfo.endElem.x=Math.min(this.bound.right,this.dragInfo.endElem.x),this.dragInfo.endElem.y=Math.max(this.bound.top,this.dragInfo.endElem.y),this.dragInfo.endElem.y=Math.min(this.bound.bottom,this.dragInfo.endElem.y)),this.useTransform?this.elem.css("transform","translate("+this.dragInfo.endElem.x+"px,"+this.dragInfo.endElem.y+"px)"):this.elem.css({left:this.dragInfo.endElem.x+"px",top:this.dragInfo.endElem.y+"px"})}},n.prototype.moveDone=function(e){this.moving&&(this.getMoveBound(),this.moving=!1,this.move(e),this.moveDoneFuc&&this.moveDoneFuc(this.reportPos()),this.dragInfo.startElem=this.dragInfo.endElem,this.dragInfo.vector={x:0,y:0},console.log("moveDone"))},n.prototype.getMoveBound=function(){if(this.needGetBound){var e=isMobile?68:100,t=isMobile?32:60,i=($("#player").width()-e)/2;isMobile?this.bound={left:-i,right:i,top:-($("#player").height()/2-$("header")[0].offsetTop-$("header").height()-t/2),bottom:$("#player").height()/2-$("footer").height()-t/2}:this.bound={left:-i,right:i,top:-($("#player").height()/2-50-t/2),bottom:$("#player").height()/2-t/2},console.log(this.bound),this.needGetBound=0}},n.prototype.reportPos=function(){return{x:this.dragInfo.endElem.x+this.domParent.width()/2,y:this.dragInfo.endElem.y+this.domParent.height()/2}},n.prototype.recover=function(){this.dragInfo={startElem:{x:0,y:0},endElem:{x:0,y:0}},this.useTransform?this.elem.css("transform",""):this.elem.css({left:0,top:0})},t["a"]=n},"7d96":function(e,t,i){"use strict";i("63d9");var n={};n.RADIANS_PER_DEGREE=Math.PI/180,n.DEGREES_PER_RADIAN=180/Math.PI,n.Vector3=function(e,t,i){this.x=e||0,this.y=t||0,this.z=i||0},n.Matrix4=function(){this.elements=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),arguments.length>0&&console.error("MathLight.Matrix4: the constructor no longer reads arguments. use .set() instead.")},n.Matrix4.prototype={identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},copy:function(e){return this.elements.set(e.elements),this},applyToVector3:function(e){var t=e.x,i=e.y,n=e.z,o=this.elements;return e.x=o[0]*t+o[4]*i+o[8]*n+o[12],e.y=o[1]*t+o[5]*i+o[9]*n+o[13],e.z=o[2]*t+o[6]*i+o[10]*n+o[14],this},getInverse:function(e,t){var i=this.elements,n=e.elements,o=n[0],a=n[1],r=n[2],s=n[3],l=n[4],c=n[5],u=n[6],d=n[7],h=n[8],p=n[9],f=n[10],m=n[11],v=n[12],g=n[13],y=n[14],b=n[15],w=p*y*d-g*f*d+g*u*m-c*y*m-p*u*b+c*f*b,E=v*f*d-h*y*d-v*u*m+l*y*m+h*u*b-l*f*b,T=h*g*d-v*p*d+v*c*m-l*g*m-h*c*b+l*p*b,P=v*p*u-h*g*u-v*c*f+l*g*f+h*c*y-l*p*y,x=o*w+a*E+r*T+s*P;if(0===x){var k="MathLight.Matrix4.getInverse(): can't invert matrix, determinant is 0";if(t)throw new Error(k);return console.warn(k),this.identity()}var R=1/x;return i[0]=w*R,i[1]=(g*f*s-p*y*s-g*r*m+a*y*m+p*r*b-a*f*b)*R,i[2]=(c*y*s-g*u*s+g*r*d-a*y*d-c*r*b+a*u*b)*R,i[3]=(p*u*s-c*f*s-p*r*d+a*f*d+c*r*m-a*u*m)*R,i[4]=E*R,i[5]=(h*y*s-v*f*s+v*r*m-o*y*m-h*r*b+o*f*b)*R,i[6]=(v*u*s-l*y*s-v*r*d+o*y*d+l*r*b-o*u*b)*R,i[7]=(l*f*s-h*u*s+h*r*d-o*f*d-l*r*m+o*u*m)*R,i[8]=T*R,i[9]=(v*p*s-h*g*s-v*a*m+o*g*m+h*a*b-o*p*b)*R,i[10]=(l*g*s-v*c*s+v*a*d-o*g*d-l*a*b+o*c*b)*R,i[11]=(h*c*s-l*p*s-h*a*d+o*p*d+l*a*m-o*c*m)*R,i[12]=P*R,i[13]=(h*g*r-v*p*r+v*a*f-o*g*f-h*a*y+o*p*y)*R,i[14]=(v*c*r-l*g*r-v*a*u+o*g*u+l*a*y-o*c*y)*R,i[15]=(l*p*r-h*c*r+h*a*u-o*p*u-l*a*f+o*c*f)*R,this},makeRotationFromQuaternion:function(e){var t=this.elements,i=e.x,n=e.y,o=e.z,a=e.w,r=i+i,s=n+n,l=o+o,c=i*r,u=i*s,d=i*l,h=n*s,p=n*l,f=o*l,m=a*r,v=a*s,g=a*l;return t[0]=1-(h+f),t[4]=u-g,t[8]=d+v,t[1]=u+g,t[5]=1-(c+f),t[9]=p-m,t[2]=d-v,t[6]=p+m,t[10]=1-(c+h),t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}},n.Quaternion=function(e,t,i,n){this._x=e||0,this._y=t||0,this._z=i||0,this._w=void 0!==n?n:1},n.Quaternion.prototype={get x(){return this._x},set x(e){this._x=e},get y(){return this._y},set y(e){this._y=e},get z(){return this._z},set z(e){this._z=e},get w(){return this._w},set w(e){this._w=e},copy:function(e){this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w},inverse:function(){return this.conjugate().normalize()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this},setFromAxisAngle:function(e,t){var i=t/2,n=Math.sin(i);return this._x=e.x*n,this._y=e.y*n,this._z=e.z*n,this._w=Math.cos(i),this},setFromUnitVectors:function(){var e,t,i=1e-6;return function(o,a){return void 0===e&&(e=new n.Vector3),t=n.dot(o,a)+1,t<i?(t=0,Math.abs(o.x)>Math.abs(o.z)?n.setVector(e,-o.y,o.x,0):n.setVector(e,0,-o.z,o.y)):n.cross(o,a,e),this._x=e.x,this._y=e.y,this._z=e.z,this._w=t,this.normalize()}}(),multiply:function(e){return this.multiplyQuaternions(this,e)},premultiply:function(e){return this.multiplyQuaternions(e,this)},multiplyQuaternions:function(e,t){var i=e._x,n=e._y,o=e._z,a=e._w,r=t._x,s=t._y,l=t._z,c=t._w;return this._x=i*c+a*r+n*l-o*s,this._y=n*c+a*s+o*r-i*l,this._z=o*c+a*l+i*s-n*r,this._w=a*c-i*r-n*s-o*l,this}},n.convertWorkshopVector=function(e){return new n.Vector3(-e.x,e.y,e.z)},n.convertWorkshopQuaternion=function(e){return new n.Quaternion(-e.x,e.y,e.z,-e.w).multiply(new n.Quaternion(Math.sqrt(2)/2,Math.sqrt(2)/2,0,0))},n.convertWorkshopOrthoZoom=function(e){return-1===e?-1:e*($("#player").width()/$("#player").height())},n.convertWorkshopPanoramaQuaternion=function(e){return new n.Quaternion(e.x,-e.y,-e.z,e.w).normalize().multiply((new n.Quaternion).setFromAxisAngle(new n.Vector3(0,1,0),270*n.RADIANS_PER_DEGREE))},n.normalize=function(e){var t=e.x*e.x+e.y*e.y+e.z*e.z,i=Math.sqrt(t);e.x/=i,e.y/=i,e.z/=i},n.dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z},n.cross=function(e,t,i){var n=e.x,o=e.y,a=e.z;i.x=o*t.z-a*t.y,i.y=a*t.x-n*t.z,i.z=n*t.y-o*t.x},n.setVector=function(e,t,i,n){e.x=t,e.y=i,e.z=n},n.copyVector=function(e,t){t.x=e.x,t.y=e.y,t.z=e.z},n.addVector=function(e,t){e.x+=t.x,e.y+=t.y,e.z+=t.z},n.subVector=function(e,t){e.x-=t.x,e.y-=t.y,e.z-=t.z},n.applyQuaternionToVector=function(e,t){var i=t.x,n=t.y,o=t.z,a=e.x,r=e.y,s=e.z,l=e.w,c=l*i+r*o-s*n,u=l*n+s*i-a*o,d=l*o+a*n-r*i,h=-a*i-r*n-s*o;t.x=c*l+h*-a+u*-s-d*-r,t.y=u*l+h*-r+d*-a-c*-s,t.z=d*l+h*-s+c*-r-u*-a},n.angleBetweenVectors=function(e,t){return Math.acos(n.dot(e,t))},n.closeTo=function(e,t,i){var n=Math.pow(10,-(i||4)),o=Math.abs(e.x-t.x)<n&&Math.abs(e.y-t.y)<n&&Math.abs(e.z-t.z)<n;return e.w?o&&Math.abs(e.w-t.w)<n:o},t["a"]=n},"7f46":function(e,t,i){"use strict";i.d(t,"b",(function(){return n})),i.d(t,"f",(function(){return o})),i.d(t,"d",(function(){return a})),i.d(t,"c",(function(){return r})),i.d(t,"a",(function(){return s})),i.d(t,"e",(function(){return c}));i("a481"),i("4917"),i("d4ec"),i("bee2");function n(e,t,i){var n;return n=null===e||void 0===e?t:e,i&&(n=i(n)),n}function o(e){var t="",i=parseInt(e/60);return i<10&&(t+="0"),t+=i,e=parseInt(e%60)+"",1==e.length&&(e="0"+e),t=t+":"+e,t}function a(e){if(-1!=e.indexOf("T"))return e.substring(5,10)}var r=function(){var e=document.createElement("div");return function(t){return t?(e.innerHTML=t,e.innerText):""}}();function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return"";var i=e.indexOf("?")>-1,n=[];for(var o in t)e.match("&"+o+"|\\?"+o)||n.push("".concat(o,"=").concat(t[o]));return n.length?"".concat(e).concat(i?"&":"?").concat(n.join("&")):e}function l(e,t,i){var n="",o=t,a=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];e&&(o=Math.round(Math.random()*(i-t))+t);for(var r=0;r<o;r++){var s=Math.round(Math.random()*(a.length-1));n+=a[s]}return n}function c(e){var t=2,i=l(!1,8),n=l(!1,8),o=l(!1,8),a=Base64.encode(e),r=a.substring(0,t),s=a.substring(t);return i+s+n+r+o}},"7f9b":function(e,t,i){},"7fbc":function(e,t){THREE.ShaderPass=function(e,t){this.textureID=void 0!==t?t:"tDiffuse",e instanceof THREE.ShaderMaterial?(this.uniforms=e.uniforms,this.material=e):e&&(this.uniforms=THREE.UniformsUtils.clone(e.uniforms),this.material=new THREE.ShaderMaterial({defines:e.defines||{},uniforms:this.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader})),this.renderToScreen=!1,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.camera=new THREE.OrthographicCamera(-1,1,1,-1,0,1),this.scene=new THREE.Scene,this.quad=new THREE.Mesh(new THREE.PlaneBufferGeometry(2,2),null),this.scene.add(this.quad)},THREE.ShaderPass.prototype={render:function(e,t,i,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=i),this.quad.material=this.material,this.renderToScreen?e.render(this.scene,this.camera):e.render(this.scene,this.camera,t,this.clear)}}},"80c5":function(e,t,i){"use strict";var n={PANORAMA:"panorama",DOLLHOUSE:"dollhouse",FLOORPLAN:"floorplan",TRANSITIONING:"transitioning",toInt:function(e){switch(e){case this.PANORAMA:return 1;case this.DOLLHOUSE:return 2;case this.FLOORPLAN:return 3;case this.TRANSITIONING:return-1}throw new Error("未知模式: "+e)},fromInt:function(e){switch(e){case"1":case 1:return this.PANORAMA;case"2":case 2:return this.DOLLHOUSE;case"3":case 3:return this.FLOORPLAN}throw new Error("未知模式: "+e)},convertWorkshopModeInt:function(e){switch(e){case"0":case 0:return this.PANORAMA;case"1":case 1:return this.FLOORPLAN;case"2":case 2:return this.DOLLHOUSE;case"3":case 3:return this.MESH}throw new ViewmodeConvertException("No known conversion for Workshop int to viewmode for int: "+e)}};t["a"]=n},"823b":function(e,t,i){"use strict";t["a"]={info:function(){var e;(e=console).log.apply(e,arguments)},debug:function(){var e;(e=console).debug.apply(e,arguments)},error:function(){var e;(e=console).error.apply(e,arguments)},warn:function(){var e;(e=console).warn.apply(e,arguments)},time:function(e){console.time(e)},timeEnd:function(e){console.timeEnd(e)},message:function(e){alert(e)}}},"82b8":function(e,t,i){"use strict";var n=i("e2cf"),o=i.n(n);o.a},8970:function(e,t,i){"use strict";i("6b54"),i("2397");var n=i("d4ec"),o=i("bee2"),a=i("257e"),r=i("262e"),s=i("99de"),l=i("7e84"),c=i("6860"),u=i("dfd6"),d=i("823b"),h=i("80c5"),p=i("349f");i("fc0a"),i("f121");function f(e){var t=m();return function(){var i,n=Object(l["a"])(e);if(t){var o=Object(l["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(s["a"])(this,i)}}function m(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var v={onUpdate:!1,isRecording:!1,isPause:!1,startTime:0,preIndex:-1};t["a"]=new(function(e){Object(r["a"])(i,e);var t=f(i);function i(){var e;return Object(n["a"])(this,i),e=t.call(this),e.startCapTime=0,e.record=Object(a["a"])(e),e}return Object(o["a"])(i,[{key:"beforeStart",value:function(){}},{key:"start",value:function(){this.emit("guide/record/start"),this.player.tagManager&&null!=this.player.tagManager.activeTag&&this.player.tagManager.dismissActiveTag(),this.control.flyToSingleCap=!1,this.control.isRecording=!0;var e={};e.pos=JSON.parse(JSON.stringify(this.player.position)),e.qua=JSON.parse(JSON.stringify(this.player.quaternion)),e.pano=this.player.currentPano.id,e.type=p["a"].ROTATETYPE,e.mode=this.player.mode;var t=c["store"].getters["guide/plays"];if(0==t.length)this.control.isPause=!1,this.recordItems(e),e.sTime=u["a"].getTime(this.startCapTime);else{var i=u["a"].getPlayDataItem(t.length-1);if(this.control.isPause){var n=u["a"].getTime(this.startCapTime),o=n-i.eTime;this.startCapTime+=o,this.control.isPause=!1}else this.startCapTime=this.sceneRenderer.updateClock.elapsedTime-i.eTime;var a=1;i.mode==h["a"].PANORAMA&&this.player.mode==h["a"].PANORAMA&&i.pano==this.player.currentPano.id||i.mode==h["a"].DOLLHOUSE&&this.player.mode==h["a"].DOLLHOUSE||i.mode==h["a"].FLOORPLAN&&this.player.mode==h["a"].FLOORPLAN?a=0:i.mode==h["a"].FLOORPLAN&&this.player.mode==h["a"].PANORAMA&&(a=1.5),this.startCapTime-=a,e.mode!=i.mode?i.type=p["a"].NEWLTYPE:i.type=p["a"].ROTATETYPE,c["store"].commit("guide/SetPlayValue",{index:t.length-1,value:i}),this.player.mode==h["a"].PANORAMA&&i.mode==h["a"].PANORAMA?this.setFirstFragmentForPano():this.setFirstFragmentForFly()}}},{key:"pause",value:function(){this.tagManager.closeOpenedTag(),$("#tag-billboards").removeClass("noTouch"),this.control.isRecording=!1,this.control.isPause=!0,d["a"].info("暂停录屏");var e=c["store"].getters["guide/plays"];if(this.player.mode!=h["a"].TRANSITIONING&&e.length>0){var t={},i=this.player.cameraControls.activeControl;t.eQua=JSON.parse(JSON.stringify(i.camera.quaternion)),t.ePos=JSON.parse(JSON.stringify(i.camera.position)),t.eTarget=JSON.parse(JSON.stringify(this.player.cameraControls.activeControl.target)),u["a"].createThumb("second"),this.player.model.mode==h["a"].FLOORPLAN&&(t.eZoom=i.currentScale/($("#player").width()/$("#player").height())),t.eTime=u["a"].getTime(this.startCapTime),c["store"].commit("guide/SetPlay",{index:e.length-1,value:t}),t=e[e.length-1],this.setFragment(t)}this.emit("guide/record/pause")}},{key:"stop",value:function(){d["a"].info("停止录屏"),this.pause(),this.control.isPause=!1,this.startCapTime=0}},{key:"reset",value:function(){this.control.onUpdate=!0,this.control.isRecording=!1,this.startCapTime=0}},{key:"setFragmentAngle",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=u["a"].getPlayDataItem(e);0==t||1==t?u["a"].createThumb("first",e):u["a"].createThumb("second",e),i.mode==h["a"].PANORAMA?0==t||1==t?i.qua=this.player.quaternion:i.eQua=this.player.quaternion:i.mode==h["a"].DOLLHOUSE?0==t||1==t?(i.qua=this.player.quaternion,i.pos=this.player.position.clone(),i.target=new THREE.Vector3(this.player.cameraControls.activeControl.target.x,this.player.cameraControls.activeControl.target.y,this.player.cameraControls.activeControl.target.z)):(i.eQua=this.player.quaternion,i.eTarget=new THREE.Vector3(this.player.cameraControls.activeControl.target.x,this.player.cameraControls.activeControl.target.y,this.player.cameraControls.activeControl.target.z),i.ePos=this.player.cameraControls.activeControl.camera.position.clone()):i.mode==h["a"].FLOORPLAN&&(0==t||1==t?(i.qua=this.player.quaternion,i.pos=this.player.position.clone(),i.target=new THREE.Vector3(this.player.cameraControls.activeControl.target.x,this.player.cameraControls.activeControl.target.y,this.player.cameraControls.activeControl.target.z),i.zoom=this.player.cameraControls.activeControl.currentScale/($("#player").width()/$("#player").height())):(i.eQua=this.player.quaternion,i.eTarget=new THREE.Vector3(this.player.cameraControls.activeControl.target.x,this.player.cameraControls.activeControl.target.y,this.player.cameraControls.activeControl.target.z),i.ePos=this.player.cameraControls.activeControl.camera.position.clone(),i.eZoom=this.player.cameraControls.activeControl.currentScale/($("#player").width()/$("#player").height()))),c["store"].commit("guide/SetPlay",{index:e,value:i})}},{key:"setSpeed",value:function(){}},{key:"deleteFragment",value:function(e){var t=c["store"].getters["guide/plays"];t=JSON.parse(JSON.stringify(t));var i=u["a"].getPlayDataItem(e),n=i.eTime-i.sTime,o=null;if(0==t.length)t=[];else if(e==t.length-1)o=t.splice(e,1),this.store.commit("guide/DelThumb",{deleteCount:1,isMerge:!1});else{var a=u["a"].getPlayDataItem(e+1);if(n=a.sTime-i.sTime,0!=e){var r=u["a"].getPlayDataItem(e-1),s=this.getTransitionTime(e);if(r.mode!=a.mode){r.type=p["a"].NEWLTYPE,r.transType=i.transType,o=t.splice(e,1);var l=this.getTransitionTime(e);n+=l-s,this.store.commit("guide/DelThumb",{deleteCount:1,isMerge:!1})}else{r.type=p["a"].ROTATETYPE,o=t.splice(e,1);var d=this.getTransitionTime(e);n+=d-s,this.store.commit("guide/DelThumb",{deleteCount:1,isMerge:!1})}"opacity"==r.transType&&a.mode!=h["a"].PANORAMA&&r.transType,t[e-1].value=r}else o=t.splice(e,1),this.store.commit("guide/DelThumb",{deleteCount:1,isMerge:!1});for(var f=e;f<t.length;++f)if(t[f].value.sTime-=n,t[f].value.eTime-=n,t[f].value.tags)for(var m=0;m<t[f].value.tags.length;++m)t[f].value.tags[m].sTime-=n}c["store"].commit("guide/LoadPlays",t),this.emit("guide/delete/item",e,o[0])}},{key:"preview",value:function(){}},{key:"recordItems",value:function(e){var t=c["store"].getters["guide/plays"];if(0==t.length){if(this.startCapTime=this.sceneRenderer.updateClock.elapsedTime,e.sTime=0,e.mode==h["a"].DOLLHOUSE||e.mode==h["a"].FLOORPLAN){var i=this.player.cameraControls.activeControl;e.target=JSON.parse(JSON.stringify(i.target))}e.mode=this.player.model.mode,this.player.mode==h["a"].FLOORPLAN&&(e.zoom=this.player.cameraControls.activeControl.currentScale/($("#player").width()/$("#player").height())),c["store"].commit("guide/AddPlay",e),u["a"].createThumb("first")}}},{key:"updatePreForPause",value:function(){}},{key:"setSecondFragmentForPano",value:function(e){var t=c["store"].getters["guide/plays"],i=c["store"].getters["guide/thumbs"];u["a"].createThumb("second"),this.updateFragment(t.length-1,1,i.thumbs2[t.length-1]);var n={};if(n.type=e?p["a"].NEWLTYPE:p["a"].ROTATETYPE,n.eQua=JSON.parse(JSON.stringify(this.player.cameraControls.activeControl.camera.quaternion)),n.eTime=u["a"].getTime(this.startCapTime),this.player.flyingToTag&&n.tags&&n.tags[n.tags.length-1].state==p["a"].TAGOPEN){n.transForHot={sid:n.tags[n.tags.length-1].sid,eTime:n.tags[n.tags.length-1].eTime};var o=n.tags.length-1;n.tags.splice(o,1),0==n.tags.length&&delete n.tags}c["store"].commit("guide/SetPlay",{index:t.length-1,value:n})}},{key:"setSecondFragmentForFly",value:function(){var e=c["store"].getters["guide/plays"],t={};t.type=p["a"].NEWLTYPE,this.player.mode==h["a"].PANORAMA?(this.tagManager.hideAllTags(),t.pano=this.player.currentPano.id):this.player.mode==h["a"].FLOORPLAN&&(t.eZoom=this.player.cameraControls.activeControl.currentScale/($("#player").width()/$("#player").height())),t.eTime=u["a"].getTime(this.startCapTime),t.ePos=JSON.parse(JSON.stringify(this.player.cameraControls.activeControl.camera.position)),t.eQua=JSON.parse(JSON.stringify(this.player.cameraControls.cameras[this.player.model.mode].quaternion)),u["a"].createThumb("second"),this.player.cameraControls.activeControl.target&&(t.eTarget=JSON.parse(JSON.stringify(this.player.cameraControls.activeControl.target))),c["store"].commit("guide/SetPlay",{index:e.length-1,value:t})}},{key:"setFirstFragmentForPano",value:function(){var e={};e.pos=JSON.parse(JSON.stringify(this.player.position)),e.qua=JSON.parse(JSON.stringify(this.player.quaternion)),e.pano=this.player.currentPano.id,e.mode=h["a"].PANORAMA,e.sTime=u["a"].getTime(this.startCapTime);var t=c["store"].getters["guide/plays"];t.length>0&&t[t.length-1].transForHot&&(e.catchTransForHotSid=t[t.length-1].transForHot.sid),c["store"].commit("guide/AddPlay",e),u["a"].createThumb("first")}},{key:"setFirstFragmentForFly",value:function(){var e={};e.pos=JSON.parse(JSON.stringify(this.player.position)),e.qua=JSON.parse(JSON.stringify(this.player.quaternion)),e.mode=this.player.mode;var t=this.player.cameraControls.activeControl;t.target&&(e.target=JSON.parse(JSON.stringify(t.target))),this.player.mode==h["a"].PANORAMA?e.pano=this.player.currentPano.id:this.player.mode==h["a"].FLOORPLAN&&(e.zoom=t.currentScale/($("#player").width()/$("#player").height())),e.sTime=u["a"].getTime(this.startCapTime),c["store"].commit("guide/AddPlay",e),u["a"].createThumb("first")}},{key:"getTransitionTime",value:function(e){if(e<1)return 0;var t=u["a"].getPlayDataItem(e-1,2),i=u["a"].getPlayDataItem(e,0);return t.mode==h["a"].PANORAMA&&i.mode==h["a"].PANORAMA&&t.pano==i.pano||t.mode==h["a"].DOLLHOUSE&&i.mode==h["a"].DOLLHOUSE||t.mode==h["a"].FLOORPLAN&&i.mode==h["a"].FLOORPLAN?0:t.mode==h["a"].FLOORPLAN&&i.mode==h["a"].PANORAMA?1.5:1}},{key:"deleteHotInfo",value:function(e){var t=!1;if(e)for(var i=c["store"].getters["guide/plays"],n=0;n<i.length;++n){if(i[n].tags){for(var o=0;o<i[n].tags.length;++o)i[n].tags[o].sid==e&&(t=!0,i[n].tags.splice(o,1),--o);0==i[n].tags.length&&(t=!0,delete i[n].tags)}i[n].transForHot&&i[n].transForHot.sid==e?(c["store"].commit("guide/DelPlayProperty",{index:n,property:transForHot}),t=!0):i[n].catchTransForHotSid==e&&(c["store"].commit("guide/DelPlayProperty",{index:n,property:catchTransForHotSid}),t=!0)}return t}},{key:"deleteTagForTransf",value:function(e){if(c["store"].playData[e].transForHot){c["store"].playData[e].transForHot.sid;delete c["store"].playData[e].transForHot,c["store"].playData[e+1]&&c["store"].playData[e+1].catchTransForHotSid&&(delete c["store"].playData[e+1].catchTransForHotSid,c["store"].playData[e+1].tags&&c["store"].playData[e+1].tags.splice(0,1))}else if(c["store"].playData[e].catchTransForHotSid){c["store"].playData[e].catchTransForHotSid;delete c["store"].playData[e].catchTransForHotSid,c["store"].playData[e].tags&&c["store"].playData[e].tags.splice(0,1),c["store"].playData[e-1]&&c["store"].playData[e-1].transForHot&&delete c["store"].playData[e-1].transForHot}}},{key:"resizeFragment",value:function(e){var t=c["store"].getters["guide/plays"],i=t.length,n=e-t[i-1].time.eTime;n>0&&c["store"].commit("guide/SetPlay",{index:i-1,value:{wTime:n}})}},{key:"addTagData",value:function(e,t){var i=c["store"].getters["guide/plays"],n=u["a"].getPlayDataItem(i.length-1),o={};"open"==e&&null!=this.tagManager.activeTag&&this.player.flyingToTag?(o.sTime=u["a"].getTime(this.startCapTime),o.sid=this.tagManager.activeTag.sid,o.state=e,o.position=JSON.parse(JSON.stringify(this.player.position)),o.quaternion=JSON.parse(JSON.stringify(this.player.quaternion)),o.type=1==t?"trans":"rotate",n.tags||(n.tags=[])):"close"==e&&(o.sTime=u["a"].getTime(this.startCapTime),o.sid=this.tagManager.activeTag.sid,o.state=e,o.position=JSON.parse(JSON.stringify(this.player.position)),o.quaternion=JSON.parse(JSON.stringify(this.player.quaternion)),n.tags||(n.tags=[])),n.tags.push(o),c["store"].commit("guide/SetPlay",{index:i.length-1,value:n})}},{key:"updateFragmentUI",value:function(){}},{key:"updateFragment",value:function(){}},{key:"setFragment",value:function(){}},{key:"startPreview",value:function(){}},{key:"stopPreview",value:function(){}},{key:"setPreviewStatus",value:function(){}},{key:"control",get:function(){return v}}]),i}(c["default"]))},"89a2":function(e,t,i){},"8eb6":function(e,t,i){"use strict";var n=i("9ef6"),o="precision highp float;\nprecision highp int;\n\nuniform mat4 modelMatrix;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewMatrix;\nuniform mat3 normalMatrix;\nuniform vec3 cameraPosition;\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec2 uv;\n",a="precision highp float;\nprecision highp int;\n\nuniform mat4 viewMatrix;\nuniform vec3 cameraPosition;\n",r={model:{uniforms:{minOpa:{type:"f",value:.14},minDistance:{type:"f",value:2.5},maxDistance:{type:"f",value:4},map:{type:"t",value:null},repeatInfoMap:{type:"t",value:null},modelAlpha:{type:"f",value:n["a"].modelAlpha},opacity:{type:"f",value:1},progress:{type:"f",value:0},blackout:{type:"i",value:0},pano0Map:{type:"t",value:null},pano0Position:{type:"v3",value:new THREE.Vector3},pano0Matrix:{type:"m4",value:new THREE.Matrix4},pano1Map:{type:"t",value:null},pano1Position:{type:"v3",value:new THREE.Vector3},pano1Matrix:{type:"m4",value:new THREE.Matrix4},videoReady:{type:"",value:0},videoTexture:{type:"t",value:null},exposure:{type:"f",value:1},parameters:{type:"m4",value:(new THREE.Matrix4).set(4608,3456,8192,4096,1.95985,1.34,1739,2285,-.00173905,274835e-10,-.0340487,0,1235,954,2112,1584)},clipRect:{type:"v4",value:new THREE.Vector4(.1,.1,.5,.5)},blendFov:{type:"f",value:5}},vertexShader:o+"\n\n uniform vec3 pano0Position;\n uniform mat4 pano0Matrix;\n \n uniform vec3 pano1Position;\n uniform mat4 pano1Matrix;\n\n #if defined(checkDistance)\n varying vec3 world_Position; \n #endif\n\n varying vec2 vUv;\n varying vec3 vWorldPosition0;\n varying vec3 vWorldPosition1;\n \n void main() {\n \n vUv = uv;\n vec4 worldPosition = modelMatrix * vec4(position, 1.0);\n \n #if defined(checkDistance)\n world_Position = worldPosition.xyz; \n #endif\n \n vec3 positionLocalToPanoCenter0 = worldPosition.xyz - pano0Position;\n vWorldPosition0 = (vec4(positionLocalToPanoCenter0, 1.0) * pano0Matrix).xyz;\n vWorldPosition0.x *= -1.0;\n \n vec3 positionLocalToPanoCenter1 = worldPosition.xyz - pano1Position;\n vWorldPosition1 = (vec4(positionLocalToPanoCenter1, 1.0) * pano1Matrix).xyz;\n vWorldPosition1.x *= -1.0;\n \n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n \n }\n\n ",fragmentShader:a+"\n\n #define PI 3.141592653 \n \n const vec4 BLACK=vec4(0.0,0.0,0.0,1.0);\n const vec4 GREY2=vec4(0.5,0.5,0.5,1.0); \n const vec4 GREY=vec4(0.23,0.23,0.23,1.0); //cadImg greyArea to cover model\n \n uniform sampler2D map;\n uniform float modelAlpha;\n uniform float opacity;\n uniform float progress;\n uniform int blackout;\n uniform vec3 pano0Position;\n uniform vec3 pano1Position;\n uniform float maxDistance;\n uniform float minDistance;\n uniform float minOpa;\n \n \n #if defined(HasVideo)\n uniform int videoReady;\n uniform sampler2D videoTexture;\n uniform float exposure;\n uniform mat4 parameters;\n uniform float blendFov;\n #endif\n \n \n \n \n #if defined(Not_Cube)\n uniform sampler2D pano0Map;\n uniform sampler2D pano1Map; \n #else\n uniform samplerCube pano0Map;\n uniform samplerCube pano1Map;\n #endif\n \n #if defined(RepeatUV) \n uniform sampler2D repeatInfoMap;\n #endif\n \n \n varying vec2 vUv;\n varying vec3 vWorldPosition0;\n varying vec3 vWorldPosition1;\n\n #if defined(checkDistance)\n varying vec3 world_Position; \n #endif\n\n \n uniform vec4 clipRect;\n \n\n float linearStep( float start, float end, float value ) {\n\n return clamp( (value - start) / (end - start), 0.0, 1.0 );\n }\n\n vec2 getSamplerCoord( vec3 direction ) \n {\n direction = normalize(direction);\n float tx=atan(direction.x,direction.z)/(PI*2.0)+0.5;\n float ty=acos(direction.y)/PI;\n\n return vec2(tx,ty);\n }\n\n \n #if defined(HasVideo)\n\n #if (HasVideo == 8)\n \n float f42( float phi_undistorted )\n {\n return - 0.0497*phi_undistorted*phi_undistorted*phi_undistorted*phi_undistorted*phi_undistorted\n + 0.2548*phi_undistorted*phi_undistorted*phi_undistorted*phi_undistorted\n - 0.4303*phi_undistorted*phi_undistorted*phi_undistorted\n - 0.016 *phi_undistorted*phi_undistorted \n + 1.0068*phi_undistorted - 0.0004;\t\t \n }\n\n vec2 uv2CameraCoord( vec2 uv) \n {\n vec2 coor;\n coor.x = (uv.x* parameters[0][0] - parameters[0][3]) / parameters[2][3];\n coor.y = (uv.y* parameters[1][0] - parameters[1][3]) / parameters[3][3];\n return coor;\n }\n \n vec4 f44(sampler2D texture, vec2 dc)\n {\n \n float vm = parameters[0][0];\n float vb = parameters[1][0];\n float vy = parameters[2][0];\n float oh = parameters[3][0];\n\n float wa = parameters[0][1];\n float qa = parameters[1][1];\n float cx = parameters[2][1];\n float cy = parameters[3][1];\n \n float tx = parameters[0][2];\n float ty = parameters[1][2];\n float tz = parameters[2][2];\n \n //////////////////////////////////////////\n \n float focal_final = wa * 1000.0 / qa;\n \n \n \n float ptIn_x = dc.x * vy;\n float ptIn_y = (1.0 - dc.y) * oh;\n \n float ptOut_x, ptOut_y;\n \n float size = vy > oh ? vy : oh;\n \n float camx, camy;\n \n camx = (ptIn_x - vy / 2.0) / size;\n camy = (ptIn_y - oh / 2.0) / size;\n \n float lon, lat;\n \n lon = camx * 2.0 * 3.1415926;\n lat = camy * 2.0 * 3.1415926;\n \n float zq, zw, zr;\n \n zq = 0.33 * tx + cos(lat) * sin(lon);\n zw = 0.33 * ty - sin(lat);\n zr = 0.33 * tz + cos(lat) * cos(lon); \n \n \n float theta = atan(-zw, zq);\n \n float al = atan( sqrt(zq * zq + zw * zw), zr);\n \n float x12, x13;\n \n float wea = f42(al);\n float r = focal_final * tan(wea);\n \n x12 = cx + r * cos(theta);\n x13 = cy - r * sin(theta);\n \n ptOut_x = x13 / vm;\n ptOut_y = x12 / vb;\n \n \n vec2 samplerCoord = vec2(ptOut_x, ptOut_y);\n\n #if VideoMapping == 1\n samplerCoord = uv2CameraCoord(samplerCoord);\n #endif\n \n return texture2D(texture, samplerCoord);\n \n }\n\n float smoothRect( vec4 clipRect, vec2 mixWidth, vec2 uv )\n {\n float x = clipRect.x < clipRect.z ? \n \n step( clipRect.x, uv.x ) * linearStep( clipRect.x, clipRect.x + mixWidth.x, uv.x ) *\n step( uv.x, clipRect.z ) * linearStep( clipRect.z, clipRect.z - mixWidth.x, uv.x ):\n \n step( clipRect.x, uv.x ) * step( uv.x, 1.0 ) * linearStep( clipRect.x, clipRect.x + mixWidth.x, uv.x ) + \n step( 0.0, uv.x ) * step( uv.x, clipRect.z ) * linearStep( clipRect.z, clipRect.z - mixWidth.x, uv.x );\n \n \n float y = step( clipRect.y, uv.y ) * linearStep( clipRect.y, clipRect.y + mixWidth.y, uv.y ) // from\n * step( uv.y, clipRect.w ) * linearStep( clipRect.w, clipRect.w - mixWidth.y, uv.y ); // to \n \n \n return x * y;\n }\n \n vec3 satEnhance( vec3 inputColor, float sat )\n {\n float R = inputColor.r * 255.0;\n float G = inputColor.g * 255.0;\n float B = inputColor.b * 255.0;\n \n float Y = 0.257 * R + 0.564 * G + 0.098 * B + 16.0;\n float Cb = -0.148 * R - 0.291 * G + 0.439 * B + 128.0;\n float Cr = 0.439 * R - 0.368 * G - 0.071 * B + 128.0;\n\n Cr = sat * (Cr - 128.0) + 128.0;\n Cb = sat * (Cb - 128.0) + 128.0; \n \n float newB = 1.164*(Y-16.0)+2.017*(Cb-128.0);\n float newR = 1.164*(Y-16.0)+1.596*(Cr-128.0);\n float newG = 1.164*(Y-16.0)-0.392*(Cb-128.0)-0.813*(Cr-128.0);\n \n newB /= 255.0;\n newR /= 255.0;\n newG /= 255.0;\n \n return vec3(newR, newG, newB); \n }\n\n\n #elif (HasVideo == 2)\n\n float f42( float phi )\n {\n return (-2.08836240e-05) * pow(phi, 9.0)\n + (-2.20461427e-04) * pow(phi, 8.0) \n + (-8.04183603e-03) * pow(phi, 7.0) \n + (3.95783387e-02) * pow(phi, 6.0)\n + (-6.51361598e-02) * pow(phi, 5.0)\n + (3.16523167e-02) * pow(phi, 4.0)\n + (-1.35220728e-02) * pow(phi, 3.0) \n + (3.86472740e-03) * pow(phi, 2.0)\n + (9.99717594e-01) * pow(phi, 1.0) \n + (3.98472625e-06) * pow(phi, 0.0);\t\t \n }\n\n vec2 uv2CameraCoord( vec2 uv) \n {\n vec2 coor;\n coor.x = (uv.x* parameters[0][0] - parameters[0][3]) / parameters[2][3];\n coor.y = (uv.y* parameters[1][0] - parameters[1][3]) / parameters[3][3];\n return coor;\n }\n \n vec4 f44(sampler2D texture, vec2 dc)\n {\n \n float iw = parameters[0][0]; //inputWidth\n float ih = parameters[1][0]; //inputHeight\n float ow = parameters[2][0]; //outputWidth\n float oh = parameters[3][0]; //outputHeight\n\n float wa = parameters[0][1]; //focal\n float qa = parameters[1][1]; //pixel\n float cx = parameters[2][1]; //cx\n float cy = parameters[3][1]; //cy\n \n float tx = parameters[0][2];\n float ty = parameters[1][2];\n float tz = parameters[2][2];\n \n //////////////////////////////////////////\n \n float focal_final = wa * 1000.0 / qa;\n \n float ptIn_x = dc.x * ow;\n float ptIn_y = dc.y * oh;\n\n float ptOut_x, ptOut_y;\n \n float size = ow > oh ? ow : oh;\n\n float camx, camy;\n\n camx = (ptIn_x - ow / 2.0) / size;\n camy = (ptIn_y - oh / 2.0) / size;\n\n float lon, lat;\n\n lon = camx * 2.0 * 3.1415926;\n lat = -1.0 * camy * 2.0 * 3.1415926;\n\n float sphx, sphy, sphz;\n\n sphx = cos(lat) * sin(lon);\n sphy = -sin(lat);\n sphz = cos(lat) * cos(lon);\n\n float theta = atan(-sphy, sphx);\n\n float phi_undistorted = atan( sqrt(sphx * sphx + sphy * sphy), sphz);\n\n float phi_distorted = f42(phi_undistorted);\n float r = focal_final * phi_distorted;\n\n float du = cx + r * cos(theta);\n float dv = cy - r * sin(theta);\n \n ptOut_x = (du - 508.0) / 1984.0;\n ptOut_y = 1.0 - (dv - 508.0) / 1984.0;\n \n vec2 samplerCoord = vec2(ptOut_x, ptOut_y);\n \n \n return texture2D(texture, samplerCoord);\n \n }\n\n #elif (HasVideo == 3)\n \n float f42( float phi )\n {\n return (-1.47485770e-02) * pow(phi, 9.0)\n + (9.72111981e-02) * pow(phi, 8.0) \n + (-2.48315153e-01) * pow(phi, 7.0) \n + (3.20998529e-01) * pow(phi, 6.0)\n + (-2.46321067e-01) * pow(phi, 5.0)\n + (9.53838280e-02) * pow(phi, 4.0)\n + (-4.29416319e-02) * pow(phi, 3.0) \n + (1.84551397e-03) * pow(phi, 2.0)\n + (9.99948738e-01) * pow(phi, 1.0) \n + (5.00118946e-07) * pow(phi, 0.0);;\t\t \n }\n\n vec2 uv2CameraCoord( vec2 uv) \n {\n vec2 coor;\n coor.x = (uv.x* parameters[0][0] - parameters[0][3]) / parameters[2][3];\n coor.y = (uv.y* parameters[1][0] - parameters[1][3]) / parameters[3][3];\n return coor;\n }\n \n vec4 f44(sampler2D texture, vec2 dc)\n {\n \n float vm = parameters[0][0];\n float vb = parameters[1][0];\n float vy = parameters[2][0];\n float oh = parameters[3][0];\n\n float wa = parameters[0][1];\n float qa = parameters[1][1];\n float cx = parameters[2][1];\n float cy = parameters[3][1];\n \n float tx = parameters[0][2];\n float ty = parameters[1][2];\n float tz = parameters[2][2];\n \n //////////////////////////////////////////\n \n float focal_final = wa;\n \n float ptIn_x = dc.x * vy;\n float ptIn_y = (1.0 - dc.y) * oh;\n \n float ptOut_x, ptOut_y;\n \n float size = vy > oh ? vy : oh;\n \n float camx, camy;\n \n camx = (ptIn_x - vy / 2.0) / size;\n camy = (ptIn_y - oh / 2.0) / size;\n \n float lon, lat;\n \n lon = camx * 2.0 * 3.1415926;\n lat = camy * 2.0 * 3.1415926;\n \n float zq, zw, zr;\n \n zq = cos(lat) * sin(lon);\n zw = - sin(lat);\n zr = cos(lat) * cos(lon); \n \n float theta = atan(-zw, zq);\n \n float al = atan( sqrt(zq * zq + zw * zw), zr);\n \n float x12, x13;\n \n float wea = f42(al);\n float r = focal_final * (wea);\n \n x12 = cx + r * cos(theta);\n x13 = cy - r * sin(theta);\n \n ptOut_x = x13 / vm;\n ptOut_y = x12 / vb;\n \n \n vec2 samplerCoord = vec2(ptOut_x, ptOut_y);\n\n #if VideoMapping == 1\n samplerCoord = uv2CameraCoord(samplerCoord);\n #endif\n \n samplerCoord.x = 1.0 - samplerCoord.x;\n samplerCoord.y = 1.0 - samplerCoord.y;\n\n return texture2D(texture, samplerCoord);\n }\n\n float smoothRect( vec4 clipRect, vec2 mixWidth, vec2 uv )\n {\n float x = clipRect.x < clipRect.z ? \n \n step( clipRect.x, uv.x ) * linearStep( clipRect.x, clipRect.x + mixWidth.x, uv.x ) *\n step( uv.x, clipRect.z ) * linearStep( clipRect.z, clipRect.z - mixWidth.x, uv.x ):\n \n step( clipRect.x, uv.x ) * step( uv.x, 1.0 ) * linearStep( clipRect.x, clipRect.x + mixWidth.x, uv.x ) + \n step( 0.0, uv.x ) * step( uv.x, clipRect.z ) * linearStep( clipRect.z, clipRect.z - mixWidth.x, uv.x );\n \n \n float y = step( clipRect.y, uv.y ) * linearStep( clipRect.y, clipRect.y + mixWidth.y, uv.y ) // from\n * step( uv.y, clipRect.w ) * linearStep( clipRect.w, clipRect.w - mixWidth.y, uv.y ); // to \n \n \n return x * y;\n }\n\n vec3 satEnhance( vec3 inputColor, float sat )\n {\n float R = inputColor.r * 255.0;\n float G = inputColor.g * 255.0;\n float B = inputColor.b * 255.0;\n \n float Y = 0.257 * R + 0.564 * G + 0.098 * B + 16.0;\n float Cb = -0.148 * R - 0.291 * G + 0.439 * B + 128.0;\n float Cr = 0.439 * R - 0.368 * G - 0.071 * B + 128.0;\n\n Cr = sat * (Cr - 128.0) + 128.0;\n Cb = sat * (Cb - 128.0) + 128.0; \n \n float newB = 1.164*(Y-16.0)+2.017*(Cb-128.0);\n float newR = 1.164*(Y-16.0)+1.596*(Cr-128.0);\n float newG = 1.164*(Y-16.0)-0.392*(Cb-128.0)-0.813*(Cr-128.0);\n \n newB /= 255.0;\n newR /= 255.0;\n newG /= 255.0;\n \n return vec3(newR, newG, newB); \n }\n\n vec3 conAdjust( vec3 inputColor, float alpha )\n {\n float R = inputColor.r * 255.0;\n float G = inputColor.g * 255.0;\n float B = inputColor.b * 255.0;\n\n float newB = alpha * (B - 0.5) + 0.5;\n float newG = alpha * (G - 0.5) + 0.5;\n float newR = alpha * (R - 0.5) + 0.5;\n\n newB /= 255.0;\n newR /= 255.0;\n newG /= 255.0;\n\n return vec3(newR, newG, newB); \n }\n\n\n #endif\n\n \n\n #endif\n\n\n #if defined(RepeatUV) \n float getUV(float num, float cellSize, float mul){ \n float index = floor(num / cellSize); //第index隔间\n float start = index * cellSize; //区间起始\n float delta = num - start; //相比起始的增量\n float delta_mul = delta * mul; //放大后的增量 \n delta_mul = delta_mul - cellSize * floor(delta_mul / cellSize); //求余。 最终需要的增加量,但是不能超过该区间,所以多出来的要缩减,repeat\n \n return start + delta_mul;\n }\n float round(float num){\n float intPart = floor(num);\n if(num - intPart < 0.5)return intPart;\n else return intPart+1.0;\n } \n #endif\n \n \n void main()\n {\n \n vec2 samplerCoord0 = getSamplerCoord(vWorldPosition0.xyz);\n vec2 samplerCoord1 = getSamplerCoord(vWorldPosition1.xyz);\n\n vec4 color;\n \n #if defined(Not_Cube)\n vec4 colorFromPano0=texture2D(pano0Map,samplerCoord0);\n vec4 colorFromPano1=texture2D(pano1Map,samplerCoord1);\n #else\n vec4 colorFromPano0=textureCube(pano0Map,vWorldPosition0.xyz);\n vec4 colorFromPano1=textureCube(pano1Map,vWorldPosition1.xyz);\n \n samplerCoord0.x -= 0.25; //全景图和Cube的水平采样起始坐标相差90度,这里矫正 0.25 个采样偏移\n samplerCoord1.x -= 0.25; //全景图和Cube的水平采样起始坐标相差90度,这里矫正 0.25 个采样偏移\n #endif\n\n // #ifdef HasVideo\n // colorFromPano0 /= exposure;\n // colorFromPano1 /= exposure;\n // #endif\n \n\n if(blackout==0)\n {\n color=mix(colorFromPano0,colorFromPano1,progress);\n }\n else if(blackout==1)\n {\n color=mix(colorFromPano0,BLACK,min(1.0,progress*2.0));\n color=mix(color,colorFromPano1,max(0.0,progress*2.0-1.0));\n }\n else if(blackout==2)\n {\n color=mix(colorFromPano0,BLACK,progress);\n }\n else if(blackout==3)\n {\n color=mix(BLACK,colorFromPano1,max(0.0,progress*2.0-1.0));\n }\n \n \n \n \n \n \n vec2 uv = vUv;\n \n #if defined(RepeatUV) \n \n vec4 infoColor = texture2D(repeatInfoMap, vUv); \n float mul = round(infoColor.r * 255.0 / 5.0) + round(infoColor.g * 255.0 / 5.0) / 10.0; \n \n if(mul>0.0 && mul != 1.0){\n float cellCount = 8.0; \n \n float cellSize = 1.0 / cellCount;\n float dir = round(infoColor.b * 255.0 / 5.0);\n if (dir == 0.0) {\n uv.x = getUV(uv.x, cellSize, mul) ;\n }else if (dir == 1.0) {\n uv.y = getUV(uv.y, cellSize, mul) ; \n }else{\n uv.x = getUV(uv.x, cellSize, mul) ;\n uv.y = getUV(uv.y, cellSize, mul) ;\n } \n }\n \n #endif\n \n vec4 colorFromTexture = texture2D(map,uv);\n color = mix(color, colorFromTexture, modelAlpha); \n\n\n #if defined(HasVideo)\n\n vec4 colorFromVideo = vec4(0.0,0.0,0.0,0.0);\n \n \n \n #if HasVideo == 8\n\n colorFromVideo = f44(videoTexture, samplerCoord1);\n //colorFromVideo.rgb = satEnhance( colorFromVideo.rgb, 1.15 );\n colorFromVideo.rgb *= exposure;\n\n vec2 transitionSize = 80.0 / vec2( 4096.0, 2048.0 );\n\n \n #if VideoMapping == 0\n float alpha = linearStep(0.3, 0.33, samplerCoord1.x) * 1.0 - linearStep(0.66, 0.7, samplerCoord1.x);\n color = mix(color, colorFromVideo, alpha * float(videoReady));\n #elif VideoMapping == 1\n\n \n float rect = smoothRect( vec4(\n 0.4166, 0.2833,\n 0.5833, 0.7133\n ), vec2( blendFov / 360.0, blendFov / 180.0 ), samplerCoord1 );\n\n color = mix(color, colorFromVideo, rect * float(videoReady) * max(0.0,progress*2.0-1.0));\n \n #elif VideoMapping == 2\n\n samplerCoord1 = fract(samplerCoord1);\n\n vec2 clipUV = vec2(\n clipRect.x < clipRect.z ? linearStep( clipRect.x, clipRect.z, samplerCoord1.x ) : linearStep( clipRect.x, clipRect.z + 1.0, samplerCoord1.x < clipRect.z ? samplerCoord1.x + 1.0 : samplerCoord1.x ),\n linearStep( clipRect.y, clipRect.w, samplerCoord1.y )\n );\n clipUV.y = 1.0- clipUV.y;\n\n colorFromVideo = texture2D( videoTexture, clipUV );\n float rect = smoothRect( clipRect, vec2(0.02,0.02), samplerCoord1 );\n\n \n color = mix( color, colorFromVideo, rect * float(videoReady) * max(0.0,progress*2.0-1.0) );\n\n #endif\n\n #elif HasVideo == 2\n\n colorFromVideo = f44(videoTexture, samplerCoord1);\n float alphaX = linearStep( 0.31, 0.33, samplerCoord1.x) * 1.0 - linearStep(0.65, 0.67, samplerCoord1.x);\n float alphaY = linearStep( 0.15, 0.17, 1.0 - samplerCoord1.y) * 1.0 - linearStep(0.82, 0.84, 1.0 - samplerCoord1.y);\n color = mix(color, colorFromVideo, alphaX * alphaY * float(videoReady) * max(0.0,progress*2.0-1.0));\t\n\n #elif HasVideo == 3\n\n colorFromVideo = f44(videoTexture, samplerCoord1);\n //colorFromVideo.rgb = conAdjust( colorFromVideo.rgb, 1.1 );\n //colorFromVideo.rgb = satEnhance( colorFromVideo.rgb, 1.15 );\n colorFromVideo.rgb *= exposure;\n \n\n vec2 transitionSize = 80.0 / vec2( 4096.0, 2048.0 );\n\n \n #if VideoMapping == 0\n float alpha = linearStep(0.3, 0.33, samplerCoord1.x) * 1.0 - linearStep(0.66, 0.7, samplerCoord1.x);\n color = mix(color, colorFromVideo, alpha * float(videoReady));\n #elif VideoMapping == 1\n \n float rect = smoothRect( vec4(\n 0.4278,0.282,\n 0.586, 0.729\n ), vec2( blendFov / 360.0, blendFov / 180.0 ), samplerCoord1 );\n\n color = mix(color, colorFromVideo, rect * float(videoReady) * max(0.0,progress*2.0-1.0));\n \n #elif VideoMapping == 2\n\n samplerCoord1 = fract(samplerCoord1);\n\n vec2 clipUV = vec2(\n clipRect.x < clipRect.z ? linearStep( clipRect.x, clipRect.z, samplerCoord1.x ) : linearStep( clipRect.x, clipRect.z + 1.0, samplerCoord1.x < clipRect.z ? samplerCoord1.x + 1.0 : samplerCoord1.x ),\n linearStep( clipRect.y, clipRect.w, samplerCoord1.y )\n );\n clipUV.y = 1.0- clipUV.y;\n\n colorFromVideo = texture2D( videoTexture, clipUV );\n\n \n float rect = smoothRect( clipRect, vec2(0.02,0.02), samplerCoord1 );\n\n \n color = mix( color, colorFromVideo, rect * float(videoReady) * max(0.0,progress*2.0-1.0) );\n\n #endif\n\n #endif\n\n\n #endif\n\n float whiteness = 1.0-smoothstep(0.1, 1.0, opacity); \n color = mix(color, GREY, whiteness ); \n \n float opa = opacity;\n #if defined(checkDistance)\n vec3 cameraPos = mix(pano0Position, pano1Position, progress);\n float dis = distance(cameraPos, world_Position);\n float disOpa=minOpa;\n if(dis < minDistance)\n {\n disOpa=1.0;\n }\n else if(dis<maxDistance)\n {\n float k=(minOpa-1.0)/(maxDistance-minDistance);\n disOpa=k*dis+1.0-k*minDistance;\n } \n float whiteness2 = 1.0-smoothstep(0.1,0.2,disOpa); \n color = mix(color, GREY2, whiteness2); \n opa *= disOpa;\n \n #endif\n \n \n //color.rgb = vec3( samplerCoord1, 0.0 );\n \n gl_FragColor = vec4(color.rgb,opa);\n\n\n \n }\n "},fishSky:{uniforms:{opacity:{type:"f",value:1},pano1Map:{type:"t",value:null},pano1Matrix:{type:"m4",value:new THREE.Matrix4}},vertexShader:o+"uniform mat4 pano1Matrix;varying vec3 vWorldPosition;void main(){vWorldPosition=(vec4(position,1.0)*pano1Matrix).xyz;gl_Position=projectionMatrix*modelViewMatrix*vec4(position,1.0);}",fragmentShader:a+"uniform float opacity;varying vec3 vWorldPosition;\n#define PI 3.141592653 \n\n#if defined(Not_Cube)\nuniform sampler2D pano1Map;vec4 texCubemapWith2D(sampler2D t,vec3 dir){dir=normalize(dir);float tx=atan(dir.x,dir.z)/(PI*2.0)+0.5;float ty=acos(dir.y)/PI;vec4 color=texture2D(t,vec2(tx,ty));return color;}\n#else\nuniform samplerCube pano1Map;\n#endif\nvoid main(){\n#if defined(Not_Cube)\nvec4 colorFromPanos=texCubemapWith2D(pano1Map,vec3(-1.0*vWorldPosition.x,vWorldPosition.yz));\n#else\nvec4 colorFromPanos=textureCube(pano1Map,vec3(-1.0*vWorldPosition.x,vWorldPosition.yz));\n#endif\ngl_FragColor=vec4(colorFromPanos.rgb,opacity);}"},SkyVideo:{uniforms:{videoMap:{type:"t",value:null},pano1Matrix:{type:"m4",value:new THREE.Matrix4},u1:{type:"f",value:0},u2:{type:"f",value:1}},vertexShader:o+"uniform mat4 pano1Matrix;varying vec3 vWorldPosition;void main(){vWorldPosition=(vec4(position,1.0)*pano1Matrix).xyz;gl_Position=projectionMatrix*modelViewMatrix*vec4(position,1.0);}",fragmentShader:a+"varying vec3 vWorldPosition;\n#define PI 3.141592653\n uniform float u1;uniform float u2;uniform sampler2D videoMap;vec4 texCubemapWith2D(vec3 dir){dir=normalize(dir);float tx=atan(dir.x,dir.z)/(PI*2.0)+0.5;if(tx>u1&&tx<u2){tx=(tx-u1)/(u2-u1);float ty=acos(dir.y)/PI;\nreturn texture2D(videoMap,vec2(tx,ty));}else{\nreturn vec4(0.0,0.0,0.0,0.0);}\n}void main(){gl_FragColor=texCubemapWith2D(vec3(-1.0*vWorldPosition.x,vWorldPosition.yz));}"},floorLogo:{uniforms:{map:{type:"t",value:null},opacity:{type:"f",value:0},opaRadius:{type:"f",value:.2}},vertexShader:"varying vec2 vUv;void main() { vUv = uv; gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );}",fragmentShader:"uniform sampler2D map; uniform float opacity;uniform float opaRadius;varying vec2 vUv; void main() { vec2 vUv2 = vec2(vUv.x*2.0 - 1.0, vUv.y*2.0 - 1.0); vec4 colorFromTexture = texture2D( map, vUv ); float opa = 1.0; float r = vUv2.x*vUv2.x + vUv2.y*vUv2.y; if(r > 1.0) opa = 0.0; else if(r < opaRadius)opa = 1.0; else{\tfloat a = -1.0 / ((opaRadius - 1.0)*(opaRadius - 1.0));\tfloat b = -2.0 * a * opaRadius;\tfloat c = 1.0 + a * opaRadius * opaRadius; opa = a * r*r + b * r + c; } gl_FragColor = vec4(colorFromTexture.rgb, opacity * min(colorFromTexture.a, opa) );}"},basicTextured:{uniforms:{tDiffuse:{type:"t",value:null},alpha:{type:"f",value:1}},vertexShader:"varying vec2 vUv;\nvoid main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}",fragmentShader:"varying vec2 vUv;\nuniform float alpha;\nuniform sampler2D tDiffuse;\nvoid main() {\n vec4 texColor = texture2D(tDiffuse, vUv);\n gl_FragColor = vec4(texColor.rgb, texColor.a * alpha);\n}"},cube:{uniforms:{map:{type:"t",value:null},opacity:{type:"f",value:1}},vertexShader:o+"varying vec3 vWorldPosition;\n\nvoid main() {\n vWorldPosition = position;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}\n",fragmentShader:a+"uniform samplerCube map;\nuniform float opacity;\n\nvarying vec3 vWorldPosition;\n\nvoid main() {\n vec4 color = textureCube( map, vec3( -vWorldPosition.x, vWorldPosition.yz ) );\n gl_FragColor = vec4(color.rgb, opacity);\n}\n"},copyCubeMap:{uniforms:{tDiffuse:{type:"t",value:null},alpha:{type:"f",value:1}},vertexShader:"varying vec3 vWorldPos;\nvoid main() {\n vWorldPos = vec3(-position.x, -position.y, position.z);\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}",fragmentShader:"varying vec3 vWorldPos;\nuniform float alpha;\nuniform samplerCube tDiffuse;\nvoid main() {\n vec4 texColor = textureCube(tDiffuse, vWorldPos);\n gl_FragColor = vec4(texColor.rgb, texColor.a * alpha);\n}"},modelOutside:{uniforms:{map:{type:"t",value:null},opacity:{type:"f",value:1},repeatInfoMap:{type:"t",value:null}},vertexShader:o+"varying vec2 vUv;\n\nvoid main() {\n\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n}\n",fragmentShader:a+"\n uniform sampler2D map; uniform float opacity; varying vec2 vUv;\n #if defined(RepeatUV) \n uniform sampler2D repeatInfoMap;\n #endif\n \n \n vec4 grey = vec4(0.23, 0.23, 0.23, 1.0); //cadImg greyArea to cover model, base color\n \n #if defined(RepeatUV) \n float getUV(float num, float cellSize, float mul){ \n float index = floor(num / cellSize); //第index隔间\n float start = index * cellSize; //区间起始\n float delta = num - start; //相比起始的增量\n float delta_mul = delta * mul; //放大后的增量 \n delta_mul = delta_mul - cellSize * floor(delta_mul / cellSize); //求余。 最终需要的增加量,但是不能超过该区间,所以多出来的要缩减,repeat\n \n return start + delta_mul;\n }\n float round(float num){\n float intPart = floor(num);\n if(num - intPart < 0.5)return intPart;\n else return intPart+1.0;\n } \n #endif\n \n void main() {\n vec2 uv = vUv;\n \n #if defined(RepeatUV) \n vec4 infoColor = texture2D(repeatInfoMap, vUv);\n float mul = round(infoColor.r * 255.0 / 5.0) + round(infoColor.g * 255.0 / 5.0) / 10.0; //放大倍率\n \n if(mul>0.0 && mul != 1.0){\n float cellCount = 8.0; //横向或纵向格数 \n float cellSize = 1.0 / cellCount; //每格所占uv\n \n float dir = round(infoColor.b * 255.0 / 5.0); //是u方向repeat还是v\n if (dir == 0.0) { \n uv.x = getUV(uv.x, cellSize, mul) ;\n }else if (dir == 1.0) {\n uv.y = getUV(uv.y, cellSize, mul) ; \n }else{\n uv.x = getUV(uv.x, cellSize, mul) ;\n uv.y = getUV(uv.y, cellSize, mul) ;\n } \n }\n /* RGB:\n R-》代表倍率,5为1倍,10代表2倍,最高255代表51倍\n G-》代表小数点后1位的数,5代表1,10代表2,最高45代表9\n B-》代表u还是v受倍率影响,0代表u受倍率影响,5代表v受倍率影响,10代表两者都受倍率影响\n 没有A,没有负数,小数我都会帮你去掉小数点后第二位\n */\n #endif\n \n vec4 colorFromTexture = texture2D( map, uv );\n float whiteness = 1.0 - smoothstep(0.1, 1.0, opacity); \n colorFromTexture = mix(colorFromTexture, grey, whiteness ); \n gl_FragColor = vec4(colorFromTexture.rgb, opacity); \n }\n "},ribbon:{uniforms:{map:{type:"t",value:null},opacity:{type:"f",value:1},color:{type:"c",value:new THREE.Color(n["a"].path.color)}},vertexShader:o+"varying vec2 vUv;\nvarying vec3 vN;\nvarying vec4 vP;\n\nvoid main() {\n\n vUv = uv;\n vN= normalMatrix * normal;\n vP = modelViewMatrix * vec4( position, 1.0 );\n gl_Position = projectionMatrix * vP;\n}\n",fragmentShader:a+"uniform sampler2D map;\nuniform float opacity;\nvarying vec2 vUv;\nuniform vec3 color;\nvarying vec3 vN; // show-1182\nvarying vec4 vP; // show-1182\n\nvoid main() {\n\t// TODO add scroll-in and pulsing behaviors\n\tvec3 vNn = normalize(vN);\n\tvec3 vPn = normalize(vP.xyz);\n\tfloat f = pow(1.0-abs(dot(vNn,vPn)),0.2);\n vec4 colorFromTexture = texture2D( map, vUv );\n colorFromTexture.a *= f;\n gl_FragColor = vec4((color.rgb*colorFromTexture.rgb),\n \t\t\t\t\t\t(opacity*colorFromTexture.a));\n}\n"},waypoint:{uniforms:{map:{type:"t",value:null},opacity:{type:"f",value:1},pulse:{type:"f",value:1},nearFade:{type:"v2",value:new THREE.Vector2(2*n["a"].insideNear,2*n["a"].path.waypointIndoorRadius)},color:{type:"c",value:new THREE.Color(n["a"].reticuleColor)}},vertexShader:o+"varying vec2 vUv;\nvarying vec4 vPointView;\n\nvoid main() {\n\n vUv = uv;\n vPointView = modelViewMatrix * vec4( position, 1.0 );\n gl_Position = projectionMatrix * vPointView;\n\n}\n",fragmentShader:a+"uniform sampler2D map;\nuniform float opacity;\nuniform float pulse; // another opacity, with a different clock\nuniform vec2 nearFade;\nvarying vec2 vUv;\nvarying vec4 vPointView;\nuniform vec3 color;\n\nvoid main() {\n\t// TODO add scroll-in and pulsing behaviors\n\tfloat depthFade = min(1.0, (abs(vPointView.z)-nearFade.x)/(nearFade.y-nearFade.x));\n vec4 colorFromTexture = texture2D( map, vUv );\t\t// we only use the alpha!\n gl_FragColor = vec4(color.rgb,\n \t\t\t\t\t\t(pulse*opacity*colorFromTexture.a * depthFade));\n}\n"},modelDebug:{uniforms:{map:{type:"t",value:null},modelAlpha:{type:"f",value:n["a"].modelAlpha},depthmapRatio:{type:"f",value:0},opacity:{type:"f",value:1},progress:{type:"f",value:0},considerOcclusion:{type:"i",value:n["a"].fancierTransition},highlightPanoSelection:{type:"i",value:0},useThirdPano:{type:"i",value:n["a"].useThirdPano},pano0Map:{type:"t",value:null},pano0Depth:{type:"t",value:null},pano0Position:{type:"v3",value:new THREE.Vector3},pano0Matrix:{type:"m4",value:new THREE.Matrix4},pano0Weight:{type:"f",value:n["a"].transition.pano0Weight},pano1Map:{type:"t",value:null},pano1Depth:{type:"t",value:null},pano1Position:{type:"v3",value:new THREE.Vector3},pano1Matrix:{type:"m4",value:new THREE.Matrix4},pano1Weight:{type:"f",value:n["a"].transition.pano1Weight},pano2Map:{type:"t",value:null},pano2Depth:{type:"t",value:null},pano2Position:{type:"v3",value:new THREE.Vector3},pano2Matrix:{type:"m4",value:new THREE.Matrix4},pano2Weight:{type:"f",value:n["a"].transition.pano2Weight}},vertexShader:o+"uniform vec3 pano0Position;\nuniform mat4 pano0Matrix;\n\nuniform vec3 pano1Position;\nuniform mat4 pano1Matrix;\n\nuniform vec3 pano2Position;\nuniform mat4 pano2Matrix;\n\nvarying vec2 vUv;\nvarying vec3 vWorldPosition0;\nvarying vec3 vWorldPosition1;\nvarying vec3 vWorldPosition2;\n\nvarying vec4 worldPosition;\n\nvoid main() {\n\n vUv = uv;\n worldPosition = modelMatrix * vec4(position, 1.0);\n\n vec3 positionLocalToPanoCenter0 = worldPosition.xyz - pano0Position;\n vWorldPosition0 = (vec4(positionLocalToPanoCenter0, 1.0) * pano0Matrix).xyz;\n vWorldPosition0.x *= -1.0;\n\n vec3 positionLocalToPanoCenter1 = worldPosition.xyz - pano1Position;\n vWorldPosition1 = (vec4(positionLocalToPanoCenter1, 1.0) * pano1Matrix).xyz;\n vWorldPosition1.x *= -1.0;\n\n vec3 positionLocalToPanoCenter2 = worldPosition.xyz - pano2Position;\n vWorldPosition2 = (vec4(positionLocalToPanoCenter2, 2.0) * pano2Matrix).xyz;\n vWorldPosition2.x *= -1.0;\n\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n}\n",fragmentShader:a+"uniform sampler2D map;\nuniform float depthmapRatio;\nuniform float modelAlpha;\nuniform float opacity;\nuniform float progress;\nuniform int considerOcclusion;\nuniform int highlightPanoSelection;\nuniform int useThirdPano;\n\nuniform vec3 pano0Position;\nuniform samplerCube pano0Map;\nuniform samplerCube pano0Depth;\nuniform float pano0Weight;\n\nuniform vec3 pano1Position;\nuniform samplerCube pano1Map;\nuniform samplerCube pano1Depth;\nuniform float pano1Weight;\n\nuniform vec3 pano2Position;\nuniform samplerCube pano2Map;\nuniform samplerCube pano2Depth;\nuniform float pano2Weight;\n\nvarying vec2 vUv;\nvarying vec3 vWorldPosition0;\nvarying vec3 vWorldPosition1;\nvarying vec3 vWorldPosition2;\n\nvarying vec4 worldPosition;\n\nvoid main() {\n\n vec4 depthFromPano0 = textureCube( pano0Depth, vWorldPosition0.xyz );\n vec4 depthFromPano1 = textureCube( pano1Depth, vWorldPosition1.xyz );\n vec4 depthFromPano2 = textureCube( pano2Depth, vWorldPosition2.xyz );\n\n vec4 colorFromPano0 = textureCube( pano0Map, vWorldPosition0.xyz );\n vec4 colorFromPano1 = textureCube( pano1Map, vWorldPosition1.xyz );\n vec4 colorFromPano2 = textureCube( pano2Map, vWorldPosition2.xyz );\n\n float distanceToPano0 = distance(worldPosition.xyz, pano0Position);\n float distanceToPano1 = distance(worldPosition.xyz, pano1Position);\n float distanceToPano2 = distance(worldPosition.xyz, pano2Position);\n\n float cameraToPano0 = distance(cameraPosition.xyz, pano0Position);\n float cameraToPano1 = distance(cameraPosition.xyz, pano1Position);\n float cameraToPano2 = distance(cameraPosition.xyz, pano2Position);\n\n float contributionFromPano0 = cameraToPano0 == 0.0 ? 1000.0 : pano0Weight / cameraToPano0;\n float contributionFromPano1 = cameraToPano1 == 0.0 ? 1000.0 : pano1Weight / cameraToPano1;\n float contributionFromPano2 = cameraToPano2 == 0.0 ? 1000.0 : pano2Weight / cameraToPano2;\n\n contributionFromPano0 *= 1.0 / distanceToPano0;\n contributionFromPano1 *= 1.0 / distanceToPano1;\n contributionFromPano2 *= 1.0 / distanceToPano2;\n\n if(considerOcclusion == 1) {\n bool occludedFromPano0 = distanceToPano0 / 10.0 > 1.01 - depthFromPano0.x;\n bool occludedFromPano1 = distanceToPano1 / 10.0 > 1.01 - depthFromPano1.x;\n bool occludedFromPano2 = distanceToPano2 / 10.0 > 1.01 - depthFromPano2.x;\n\n if(occludedFromPano0){contributionFromPano0 *= 0.1;}\n if(occludedFromPano1){contributionFromPano1 *= 0.1;}\n if(occludedFromPano2){contributionFromPano2 *= 0.1;}\n //if(occludedFromPano0 && occludedFromPano1 && !occludedFromPano2) { contributionFromPano2 += 0.5; }\n }\n\n float contributionSum = contributionFromPano0 + contributionFromPano1 + contributionFromPano2;\n contributionFromPano0 /= contributionSum;\n contributionFromPano1 /= contributionSum;\n contributionFromPano2 /= contributionSum;\n\n vec4 colorFromPanos = colorFromPano0 * contributionFromPano0;\n colorFromPanos += colorFromPano1 * contributionFromPano1;\n colorFromPanos += colorFromPano2 * contributionFromPano2;\n\n vec4 depthFromPanos = depthFromPano0 * contributionFromPano0;\n depthFromPanos += depthFromPano1 * contributionFromPano1;\n depthFromPanos += depthFromPano2 * contributionFromPano2;\n\n vec4 colorFromTexture = texture2D( map, vUv );\n colorFromPanos = mix(colorFromPanos, colorFromTexture, modelAlpha);\n\n if(highlightPanoSelection == 1) {\n colorFromPanos.r = contributionFromPano0;\n colorFromPanos.g = contributionFromPano1;\n colorFromPanos.b = contributionFromPano2;\n }\n\n gl_FragColor = vec4(mix(colorFromPanos, depthFromPanos, depthmapRatio).rgb, opacity);\n\n}\n"},customDepth:{uniforms:{panoPosition:{type:"v3",value:new THREE.Vector3}},vertexShader:o+"varying vec4 worldPosition;\n\nvoid main() {\n\n worldPosition = modelMatrix * vec4(position, 1.0);\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n}\n",fragmentShader:a+"uniform vec3 panoPosition;\nvarying vec4 worldPosition;\n\nvoid main() {\n\n float depth = distance(worldPosition.xyz, panoPosition);\n float color = 1.0 - depth / 10.0;\n gl_FragColor = vec4(color, color, color, 1.0);\n\n}\n"},skysphere:{uniforms:{radius:{type:"f",value:2500}},vertexShader:o+"varying vec4 worldPosition;\n\nvoid main() {\n\n worldPosition = modelMatrix * vec4(position, 1.0);\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n}\n",fragmentShader:a+"varying vec4 worldPosition;\nuniform float radius;\n\nvoid main() {\n\n vec4 topColor = vec4(0.19921, 0.19921, 0.19921, 1.0);\n vec4 bottomColor = vec4(0.13281, 0.13281, 0.13281, 1.0);\n float normalizedHeight = (worldPosition.y + radius) / (radius * 2.0);\n float ratio = smoothstep(0.0, 0.5, normalizedHeight);\n gl_FragColor = mix(bottomColor, topColor, ratio);\n\n}\n"},tagDiscDefault:{uniforms:{uTime:{value:0},opacity:{value:1},dark:{type:"i",value:0},openning:{type:"f",value:0},uColor:{value:(new THREE.Color).setRGB(0,.7843137254901961,.6862745098039216)}},vertexShader:o+"\n\n\n uniform float uTime;\n uniform float openning;\n\n varying vec2 vUv;\n \n\n vec3 scalePos( vec3 pos ) {\n\n float s = 1.0 + 0.3 * abs( sin(uTime) ) ;\n\n pos.x *= s;\n pos.y *= s;\n pos.z *= s;\n\n return pos;\n }\n\n void main() \n {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( scalePos( position ), 1.0);\n }\n\n ",fragmentShader:a+"\n \n uniform float uTime;\n uniform vec3 uColor;\n uniform float opacity;\n uniform int dark;\n \n varying vec2 vUv;\n \n vec4 circle( vec2 position, vec2 center, float radius )\n {\n vec4 backgroundColor = vec4( 0.0, 0.0, 0.0, 0.0 );\n\n vec4 color = mix( backgroundColor, vec4(uColor, 1.0 ), smoothstep( radius + 0.05, radius, length( position - center )) );\n \n return color;\n }\n\n\n vec4 ring( vec2 position, vec2 center, vec2 radius )\n {\n \n float len = length( position - center );\n\n float alpha = smoothstep( radius.x - 0.03, radius.x + 0.01, len) - smoothstep(radius.y - 0.03, radius.y + 0.03, len);\n\n return mix( vec4( 0.0 ), vec4( 1.0 ), alpha);\n }\n\n\n\n void main() {\n\n\n vec2 uv = vUv * 2.0 - 1.0;\n\n //uv *= (0.85 + abs( sin(uTime) * 0.5 ));\n\n \n vec4 mainColor = vec4( 0.0 );\n mainColor += circle( uv, vec2(0.0), 0.4 );\n mainColor += ring( uv, vec2(0.0), vec2(0.3, 0.35));\n\n \n float r = (uv.x * uv.x + uv.y * uv.y) * 4.0;\n \n float intensity = sin( r - uTime * 2.5 );\n float alpha = 1.0 - 0.25* r;\n\n intensity = intensity * step(r, 3.5 ) * step(1.0, r);\t\n intensity = smoothstep( 0.9, 1.0, intensity );\n\n mainColor += vec4( vec3(intensity), intensity * alpha);\n \n \n \n gl_FragColor = vec4(mainColor.rgb, mainColor.a * opacity);\n \n }\n "},tagDiscDefault2:{uniforms:{uTime:{value:0},opacity:{value:1},dark:{type:"i",value:0},openning:{type:"f",value:0}},vertexShader:o+"\n\n uniform float uTime;\n uniform float openning;\n\n varying vec2 vUv;\n \n\n vec3 scalePos( vec3 pos ) {\n\n float s = cos(openning * 3.1415926*0.28);\n\n pos.x *= s;\n pos.y *= s;\n pos.z *= s;\n\n return pos;\n }\n\n void main() \n {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( scalePos( position ), 1.0);\n }\n\n ",fragmentShader:a+"\n \n uniform float uTime;\n uniform float opacity;\n uniform int dark;\n uniform float openning;\n \n varying vec2 vUv;\n \n vec4 circle( vec2 position, vec2 center, float radius, vec4 color )\n {\n vec4 backgroundColor = vec4( 0.0 );\n \n float alpha = smoothstep( radius + 0.03, radius - 0.03, length( position - center ));\n\n return mix( backgroundColor, color, alpha );\n }\n\n vec4 ring( vec2 position, vec2 center, vec2 radius, vec4 color )\n {\n vec4 backgroundColor = vec4( 0.0, 0.0, 0.0, 0.0);\n \n float len = length( position - center );\n \n float alpha = smoothstep( radius.x - 0.03, radius.x + 0.03, len) - smoothstep(radius.y - 0.03, radius.y + 0.03, len);\n \n return mix( backgroundColor, color, alpha);\n }\n\n\n\n void main() {\n\n float time = uTime;\n vec2 uv = vUv * 2.0 - 1.0;\n\n float period1 = fract( time / 4.0 );\n float period2 = fract( (time - 0.6) / 4.0 );\n\n vec2 radius1 = vec2(0.60, 0.6001 );\n radius1.y += 0.3 * smoothstep( 0.5, 0.8, period1 );\n float alpha1 = 0.8 - smoothstep( 0.6, 0.9, period1 );\n\n\n \n vec2 radius2 = vec2(0.60, 0.6001);\n radius2.y += 0.3 * smoothstep( 0.5, 0.8, period2 );\n float alpha2 = 0.8 - smoothstep( 0.6, 0.9, period2 );\n\n \n \n vec4 mainColor = vec4( 0.0 );\n \n mainColor += circle( uv, vec2( 0.0, 0.0 ), 0.4, vec4(0.0, 0.7843137254901961, 0.6862745098039216, 0.8 ) );\n mainColor += ring( uv, vec2( 0.0, 0.0 ), vec2(0.4, 0.60), vec4(1.0,1.0,1.0, 0.8) );\n mainColor += circle( uv, vec2( 0.20, 0.20 ), 0.15, vec4(1.0,1.0,1.0, 0.8) ); \n mainColor += ring( uv, vec2( 0.0, 0.0 ), radius1, vec4(1.0, 1.0, 1.0, alpha1) ) * alpha1;\n mainColor += ring( uv, vec2( 0.0, 0.0 ), radius2, vec4(1.0, 1.0, 1.0, alpha2) ) * alpha2;\n\n vec4 opennedColor = vec4(0.0);\n\n opennedColor += circle( uv, vec2(0.0), 0.25, vec4(1.0, 1.0, 1.0, 0.5) );\n opennedColor += circle( uv, vec2(0.0), 0.5, vec4(1.0, 1.0, 1.0, 0.3) );\n\n mainColor = mix( mainColor, opennedColor, openning );\n \n gl_FragColor = vec4(mainColor.rgb, mainColor.a * opacity);\n //gl_FragColor = mainColor;\n }\n "},tagDiscCustom:{uniforms:{opacity:{type:"f",value:1},dark:{type:"i",value:0},map:{type:"t",value:null},uTime:{value:0},openning:{type:"f",value:0}},vertexShader:o+"\n\n uniform float openning;\n uniform float uTime;\n\n varying vec2 vUv;\n\n vec3 scalePos( vec3 pos ) {\n\n float s = cos(openning * 3.1415926*0.28) * (1.0 + 0.3 * abs( sin(uTime)) * step( openning, 0.5 ) );\n\n pos.x *= s;\n pos.y *= s;\n pos.z *= s;\n\n return pos;\n }\n\n \n \n void main() \n {\n vUv = uv;\n\n gl_Position = projectionMatrix * viewMatrix * modelMatrix * vec4( scalePos(position), 1.0);\n }\n \n ",fragmentShader:a+"\n\n uniform float opacity;\n uniform int dark;\n uniform float uTime;\n uniform sampler2D map;\n uniform float openning;\n \n varying vec2 vUv;\n \n\n vec4 circle( vec2 position, vec2 center, float radius, vec4 color )\n {\n vec4 backgroundColor = vec4( 0.0 );\n \n float alpha = smoothstep( radius + 0.03, radius - 0.03, length( position - center ));\n\n return mix( backgroundColor, color, alpha );\n }\n\n vec4 ring( vec2 position, vec2 center, vec2 radius, vec4 color )\n {\n vec4 backgroundColor = vec4( 0.0, 0.0, 0.0, 0.0);\n \n float len = length( position - center );\n \n float alpha = smoothstep( radius.x - 0.03, radius.x + 0.03, len) - smoothstep(radius.y - 0.03, radius.y + 0.03, len);\n \n return mix( backgroundColor, color, alpha);\n }\n\n void main() {\n\n vec2 uv = vUv;\n\n vec4 color = texture2D(map, uv);\n \n if(dark == 1 && (color.r + color.g + color.b < 240.0*3.0/255.0))\n {\n color.rgb *= 0.9;\n }\n\n\n vec2 coord = uv * 2.0 - 1.0;\n vec4 opennedColor = vec4(0.0);\n\n opennedColor += circle( coord, vec2(0.0), 0.25, vec4(1.0, 1.0, 1.0, 0.5) );\n opennedColor += circle( coord, vec2(0.0), 0.5, vec4(1.0, 1.0, 1.0, 0.3) );\n\n color = mix( color, opennedColor, openning );\n \n gl_FragColor = vec4(color.rgb, color.a * opacity);\n }\n\n "},tagVideoMarker:{uniforms:{opacity:{type:"f",value:1},dark:{type:"i",value:0},map:{type:"t",value:null},uTime:{value:0},openning:{type:"f",value:0}},vertexShader:o+"\n\n uniform float openning;\n uniform float uTime;\n\n varying vec2 vUv;\n\n \n \n void main() \n {\n vUv = uv;\n\n gl_Position = projectionMatrix * viewMatrix * modelMatrix * vec4(position, 1.0);\n }\n \n ",fragmentShader:a+"\n\n uniform float opacity;\n uniform int dark;\n uniform float uTime;\n uniform sampler2D map;\n uniform float openning;\n \n varying vec2 vUv;\n \n\n vec4 circle( vec2 position, vec2 center, float radius, vec4 color )\n {\n vec4 backgroundColor = vec4( 0.0 );\n \n float alpha = smoothstep( radius + 0.03, radius - 0.03, length( position - center ));\n\n return mix( backgroundColor, color, alpha );\n }\n\n vec4 ring( vec2 position, vec2 center, vec2 radius, vec4 color )\n {\n vec4 backgroundColor = vec4( 0.0, 0.0, 0.0, 0.0);\n \n float len = length( position - center );\n \n float alpha = smoothstep( radius.x - 0.03, radius.x + 0.03, len) - smoothstep(radius.y - 0.03, radius.y + 0.03, len);\n \n return mix( backgroundColor, color, alpha);\n }\n\n void main() {\n\n vec2 uv = vUv;\n\n vec4 color = texture2D(map, uv);\n \n if(dark == 1 && (color.r + color.g + color.b < 240.0*3.0/255.0))\n {\n color.rgb *= 0.9;\n }\n\n\n vec2 coord = uv * 2.0 - 1.0;\n vec4 opennedColor = vec4(0.0);\n\n opennedColor += circle( coord, vec2(0.0), 0.25, vec4(1.0, 1.0, 1.0, 0.5) );\n opennedColor += circle( coord, vec2(0.0), 0.5, vec4(1.0, 1.0, 1.0, 0.3) );\n\n color = mix( color, opennedColor, openning );\n \n gl_FragColor = vec4(color.rgb, color.a * opacity);\n }\n\n "},videoPanoMarker:{uniforms:{progress:{type:"f",value:0},map0:{type:"t",value:null},map1:{type:"t",value:null},map2:{type:"t",value:null},opacity:{type:"f",value:0}},vertexShader:o+"\n\t\t\tuniform float progress;\n\t\t\tvarying vec2 vUv0; varying vec2 vUv1; varying vec2 vUv2;\n\t\t\t vec2 Scale(vec2 vuv, float scale){\n\t\t\t\tscale = 1.0/scale; \n\t\t\t \tvuv.x=(uv.x-0.5) * scale + 0.5; \n\t\t \t \tvuv.y=(uv.y-0.5) * scale + 0.5 ; \n\t \t\t \treturn vuv ; \t\t\t\t\t \t\t\n\t\t\t }\t\n\n\t\t\t void main(){\n\t\t\t \tfloat baseScale = 0.78;\n\t\t\t \tfloat s1 = 1.0; float s2 = 1.28;\n\t\t\t\tfloat scale1 = progress * (s2 - s1) + s1;\n\t\t\t\tvUv1 = Scale(uv, scale1 * baseScale);\n\t\t\t\tfloat scale2;\n\t\t\t\tif(progress < 0.5){\n\t\t\t\t\tfloat s1 = 1.0; float s2 = 1.16; \n\t\t\t\t\tscale2 = 2.0 * progress * (s2 - s1) + s1;\n\t\t\t\t}else{\n\t\t\t\t\tfloat s1 = 1.16; float s2 = 1.27;\n\t\t\t\t\tscale2 = 2.0 *(progress - 0.5) * (s2 - s1) + s1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvUv2 = Scale(uv, scale2 * baseScale);\n \t\t\t\tvUv0 = Scale(uv, baseScale);\n\n \t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\n\n\t\t\t}\n\n\t\t",fragmentShader:a+"\n\t\t\tuniform sampler2D map0;uniform sampler2D map1; uniform sampler2D map2;\n\t\t\tuniform float opacity;\n\t\t\tuniform float progress;\n\t\t\tvec4 noRepeat(sampler2D sampler, vec2 uv){\t\t\t\t\t \n\t\t \t vec4 color;\n\t\t \t\t if(uv.x<0.0) \t color = vec4(0.0, 0.0, 0.0, 0.0) ;\n\t\t \t\t else if(uv.x>1.0) color = vec4(0.0, 0.0, 0.0, 0.0) ;\n\t\t \t\t else if(uv.y<0.0) color = vec4(0.0, 0.0, 0.0, 0.0) ;\n\t\t\t\t else if(uv.y>1.0) color = vec4(0.0, 0.0, 0.0, 0.0) ;\t\n\t\t\t\t else color = texture2D(sampler, uv);\n\t\t \t\t return color ;\t\t\n\t\t\t }\n\t\t\t vec4 mixColor(vec4 downColor,vec4 upColor){\n\t\t\t \treturn vec4(upColor.rgb * upColor.a + (1.0 - upColor.a) * downColor.rgb, upColor.a+downColor.a);//下层的分量通过上层的a来决定,暂时这么设置\n\t\t\t\t//vec4 sum = downColor + upColor; \n\t\t\t\t//if(sum.a == 0.0){\n\t\t\t\t//\treturn sum;\n\t\t\t\t//}\n\t\t\t\t//float upPct = upColor.a / sum.a;\n\t\t\t\t//float downPct = downColor.a / sum.a; \n\t\t\t\t//return vec4(upColor.rgb * upPct + downColor.rgb * downPct , sum.a );\n\t\t\t }\n\t\t\t varying vec2 vUv0; varying vec2 vUv1; varying vec2 vUv2; \n\t\t\t void main(){\n\t\t\t \tfloat op1, op2;\n\t\t\t \tif(progress<0.5){\n\t\t\t \t\top1 = 0.49; \n\t\t\t \t\top2 = 2.0 * progress * (0.48 - 1.0) + 1.0;\n\t\t\t \t}else{\n\t\t\t\t\top1 = 2.0 * (progress - 0.5) * (0.0 - 0.49) + 0.49;\n\t\t\t\t\top2 = 2.0 * (progress - 0.5) * (0.0 - 0.48) + 0.48;\n\t\t\t \t}\n\n\t\t\t \tvec4 color0 = noRepeat(map0, vUv0);\n\t\t\t \tvec4 color1 = noRepeat(map1, vUv1);\n\t\t\t \tvec4 color2 = noRepeat(map2, vUv2);\n\t\t\t \tcolor1.a *= op1;\n\t\t\t \tcolor2.a *= op2;\n\t\t\t\t \n\t\t\t\t\n\t\t\t\t#if defined(useColor2) \n\t\t\t\t\tgl_FragColor = mixColor(mixColor(color0 , color1), color2); //为什么苹果渲染的发黑//这样稍微柔和一些\n\t\t\t\t#else\t\n\t\t\t\t\tgl_FragColor = mixColor(mixColor(color2 , color0), color1 ); //这个叠放顺序也是试出来比较好的一种。color0基底由于外框部分都是0,0,0,0作为下层会被取一部分黑色,所以只能放上层,而内层的color1也要放上层,所以color2就是最下层。\n \t\t\t\t#endif \n\t\t\t\tgl_FragColor.a *= opacity;\n\t\t\t }\n\n\t\t"},videoMakerWidget:{uniforms:{opacity:{type:"f",value:1},dark:{type:"i",value:0},map:{type:"t",value:null},position:{value:new THREE.Vector3(0,0,0)}},vertexShader:o+"\n\n varying vec2 vUv;\n\n\n void main() \n {\n vUv = uv;\n\n vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0);\n\n vec2 scale;\n scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n scale *= mvPosition.z * 0.5;\n\n vec2 alignedPosition = position.xy * scale;\n\n mvPosition.xy += alignedPosition;\n\n gl_Position = projectionMatrix * mvPosition;\n\n }\n ",fragmentShader:a+"\n \n uniform float opacity;\n uniform int dark;\n uniform sampler2D map;\n \n \n varying vec2 vUv;\n \n void main()\n {\n\n vec4 color = texture2D(map, vUv); \n\n if( dark == 1 && (color.r + color.g + color.b < 240.0*3.0/255.0))\n {\n color.rgb *= 0.9;\n } \n\n gl_FragColor = vec4(color.rgb, color.a * opacity);\n }\n \n "},videoLoading:{uniforms:{uColor:{type:"vec4",value:null},uTime:{type:"f",value:0}},vertexShader:o+"\n \n varying vec2 vUv;\n \n void main() \n {\n vUv = uv;\n \n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n }\n\n\t\t",fragmentShader:a+"\n \n #define PI2 6.2831852 \n\n uniform vec4 uColor;\n uniform float uTime;\n\n varying vec2 vUv;\n\n float lerp( float a, float b, float alpha ) \n {\n return a + (b -a ) * alpha;\n }\n\n vec4 ring( vec2 uv, vec2 radius )\n {\n float len = length( uv );\n float angle = atan( uv.y, uv.x );\n float opacity = 0.7;\n \n float progress = fract( uTime / 4000.0 );\n\n float step1 = step( 0.0, progress );\n float step2 = step( 0.25, progress );\n float step3 = step( 0.75, progress );\n\n float progressStep1 = smoothstep( 0.0, 0.25, progress );\n float progressStep2 = smoothstep( 0.25, 1.0, progress );\n \n radius *= progressStep1 * step1;\n opacity *= (1.0 - smoothstep( 0.7, 1.0, progress ));\n\n float alpha = smoothstep( radius.x - 0.01, radius.x, len ) - smoothstep( radius.y, radius.y + 0.01, len );\n \n float speed = step2 * ( progressStep2 * 20.0 );\n\n float period = floor(30.0 - 29.0 * progressStep2);\n \n float interval = lerp( 0.0, 0.012, 1.0- progressStep2 );\n \n float dashed = smoothstep( interval * period, interval * period, fract( period * angle / PI2 + speed ) )\n - smoothstep( 1.0 - interval * period, 1.0 - interval * period , fract( period * angle / PI2 + speed ) );\n \n alpha *= dashed;\n \n return mix( vec4(0.0), vec4(1.0, 1.0, 1.0, opacity), alpha );\n }\n\n\n void main()\n {\n\n vec2 uv = vUv * 2.0 - 1.0;\n\n vec4 mainColor = vec4(0);\n \n mainColor += ring(uv, vec2(0.2, 0.22));\t\t\n \n gl_FragColor = mainColor;\n }\n\t\t"},ballRing:{uniforms:{color:{type:"c",value:new THREE.Color(1,1,1)},depth:{type:"f",value:.9}},vertexShader:o+" \n varying vec2 vUv; \n void main() \n { \n vUv = vec2(uv.x*2.0-1.0,uv.y*2.0-1.0);\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n }\n\t\t",fragmentShader:a+"\n varying vec2 vUv; \n uniform float depth;\n uniform vec3 color;\n void main(){ \n float d = vUv.x*vUv.x+vUv.y*vUv.y;\n \n if(d<depth || d>1.0){\n discard;//gl_FragColor = vec4(0.0,0.0,0.0,0.0) ;\n }else{\n gl_FragColor = vec4(color.rgb, 1.0);\n } \n \n }\n "},linkSpot:{uniforms:{isActive:{type:"i",value:0},mapIn:{type:"t",value:null},mapOut:{type:"t",value:null},mapOut2:{type:"t",value:null},opacity:{type:"f",value:0},changeMap:{type:"i",value:0}},vertexShader:o+" \n varying vec2 vUv; \n void main() \n { \n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n }\n\t\t",fragmentShader:a+"\n varying vec2 vUv; \n uniform sampler2D mapOut; \n uniform sampler2D mapOut2;\n uniform sampler2D mapIn; \n uniform float opacity;\n uniform int isActive; \n uniform int changeMap; //是否有mapIn贴图,有的话就是中间要换成mapIn\n void main(){ \n \n vec4 mapColor = texture2D(mapOut,vUv);\n vec4 mapColor2 = texture2D(mapOut2,vUv);//用于分区的贴图 \n vec4 sumColor = vec4(1.24,1.24,1.24,2.0);//用于中心部分反转黑白的颜色\n float x1=0.2333, x2=0.76669, y1=0.388, y2=0.9333; \n vec2 vUvInside = vec2((vUv.x-x1)/(x2-x1), (vUv.y-y1)/(y2-y1)); \n \n \n \n //绿色的 r=0 白色r=1\n //where: 0是外层, 1是环, 2是中间层 \n int where = mapColor2.a <= 0.0 ? 0 : (mapColor2.r <= 0.0 || mapColor2.a<1.0) ? 1 : 2; //2中包含1-2的过渡,待平滑\n \n \n vec4 green = vec4(0.0, 0.7843137, 0.6823529, mapColor.a);\n vec4 white = vec4(1.0, 1.0, 1.0, mapColor.a);\n \n if(isActive!=1){ //普通\n if(where == 1){\n gl_FragColor = vec4(1.0,1.0,1.0,mapColor.a);\n }else{\n if(changeMap == 1){ \n if(where == 2){\n vec4 color = texture2D(mapIn,vUvInside);\n if(mapColor2.r==1.0){gl_FragColor = color;}\n else gl_FragColor = mix(white, color, mapColor2.r);//平滑内边缘 \n } \n else gl_FragColor = mapColor;\n }else{ \n if(where == 2){ \n vec4 color = sumColor-mapColor; \n if(mapColor2.r==1.0){gl_FragColor = color;}\n else gl_FragColor = mix(white, color, mapColor2.r);//平滑内边缘 \n } \n else gl_FragColor = mapColor; \n }\n } \n \n }else{//hover时\n if(changeMap == 1){\n if(where == 2){\n vec4 color = texture2D(mapIn,vUvInside);\n if(mapColor2.r==1.0){gl_FragColor = color;}\n else gl_FragColor = mix(green, color, mapColor2.r);//平滑内边缘 \n }\n else if(mapColor.a>0.0 && mapColor.a<1.0) gl_FragColor = green; //因为开启了抗锯齿,导致外边缘有点问题,所以自己绘制\n else gl_FragColor = mapColor;\n }else{ \n if(mapColor.a>0.0 && mapColor.a<1.0) gl_FragColor = green; \n else gl_FragColor = mapColor; \n }\n } \n \n gl_FragColor.a *= opacity; \n \n \n }\n "},linkSpotInside:{uniforms:{circleRadius:{type:"f",value:.815},progress:{type:"f",value:0},mapOut:{type:"t",value:null},mapIn:{type:"t",value:null},changeMap:{type:"i",value:0}},vertexShader:o+" \n varying vec2 vUv; \n \n void main() \n { \n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n }\n\t\t",fragmentShader:a+"\n varying vec2 vUv; \n uniform float circleRadius;\n uniform float progress;\n uniform sampler2D mapOut; \n uniform sampler2D mapIn; \n uniform int changeMap;\n void main(){ \n vec4 mapColor = texture2D(mapOut,vUv);\n vec2 vUv2 = vec2(vUv.x*2.0-1.0,vUv.y*2.0-1.0);\n float d = vUv2.x*vUv2.x+vUv2.y*vUv2.y; \n if(progress > 0.0){ \n vec4 ringColorNew = vec4(0.0, 0.7943137, 0.6823529, 0.68);\n \n if(d>circleRadius && d<=1.0){\n gl_FragColor = mix(mapColor, ringColorNew, progress);\n }else{\n if(changeMap == 1 && d<=circleRadius){ \n vec4 colorFromTexture2 = texture2D(mapIn,vUv); \n gl_FragColor = mix(mapColor, colorFromTexture2, progress);\n }\n else{\n if(d<=circleRadius)gl_FragColor = mapColor;\n //else gl_FragColor = vec4(mapColor.xyz, min(1.0-progress,mapColor.a)); //如果不把自定义图显示成圆的话用这句\n else gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n }\n }\n }else{\n if(d>1.0)gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n else gl_FragColor = mapColor;\n } \n \n \n }\n "},sphereRenderToCube:{uniforms:{tDiffuse:{type:"t",value:null}},vertexShader:o+" \n //uniform mat4 panoMatrix; \n varying vec4 vWorldPosition;\n void main() \n { \n \n vWorldPosition = modelMatrix * vec4(position, 1.0);\n //vWorldPosition = (vec4(vWorldPosition, 1.0) * panoMatrix).xyz;\n vWorldPosition.x *= -1.0;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n }\n\t\t",fragmentShader:a+"\n varying vec4 vWorldPosition;\n uniform sampler2D tDiffuse; \n \n #define PI 3.141592653 \n \n vec2 getSamplerCoord( vec3 direction ) \n {\n direction = normalize(direction);\n float tx=atan(direction.x,direction.z)/(PI*2.0)+0.5;\n float ty=acos(direction.y)/PI;\n\n return vec2(tx,ty);\n }\n \n void main() \n {\n vec2 samplerCoord = getSamplerCoord(vWorldPosition.xyz);\n gl_FragColor = texture2D(tDiffuse, samplerCoord);\n } \n \n "}};t["a"]=r},"90b3":function(e,t,i){"use strict"},"935f":function(e,t,i){"use strict";i.d(t,"a",(function(){return B}));i("6b54"),i("2397"),i("ac6a");var n=i("d4ec"),o=i("bee2"),a=i("257e"),r=i("262e"),s=i("99de"),l=i("7e84"),c=i("ade3"),u=i("6860"),d=i("eb5a"),h=i("7338"),p=i("ef32"),f=i("a46c"),m=i("ca21"),v=i("3f2a");i("0d6d");function g(e,t){this.tree=e,this.parent=t,this.children=[],this.id=++x}function y(e,t,i,n,o,a,r,s){if(e){r=r||k.TraversalType.PreOrder;var l=n*T+i;if(r===k.TraversalType.PreOrder&&(o&&o(e,t,l,i,n),a&&a.push(e)),e.children&&0!==e.children.length){for(var c=n*T,u=i*T,d=0;d<T;d++)for(var h=0;h<T;h++)y(e.children[h*T+d],t+1,u+d,c+h,o,a,r,s);r===k.TraversalType.PostOrder&&(o&&o(e,t,l,i,n),a&&a.push(e))}}}function b(e){e.root=w(e,null,0)}function w(e,t,i){if(i>e.levels)return null;var n=new g(e,t);e.allNodes.push(n);for(var o=0;o<P;o++)n.children[o]=w(e,n,i+1);return n}function E(e,t,i,n,o){if(!e)return null;if(0===i)return e;if(!e.children||0===e.children.length)return null;var a=Math.pow(T,i),r=a/T,s=n%r,l=o%r,c=Math.floor(o/r),u=Math.floor(n/r),d=c*T+u,h=e.children[d];return E(h,t+1,i-1,s,l)}var T=2,P=T*T,x=0,k=function(){function e(t,i){Object(n["a"])(this,e),this.levels=i,this.tileSize=t,this.root=null,this.allNodes=[],b(this)}return Object(o["a"])(e,[{key:"getSubNode",value:function(t,i,n){(!i||t<this.tileSize)&&(i=0),(!n||t<this.tileSize)&&(n=0),t<this.tileSize&&(t=this.tileSize);var o=e.getLevelCountForSize(this.tileSize,t),a=E(this.root,0,o,i,n);return a}},{key:"breadthFirst",value:function(e){e=e||{};var t=!!e.nullLevelEnd,i=e.maxLevel,n=e.minLevel,o=e.callback,a=e.saveVisited,r=[],s={},l=0;for(r.push(this.root),r.push(s);r.length>0&&!(i&&l>i);){var c=r.shift();if(c===s)(!n||l>=n)&&(o&&t&&o(null),a&&t&&a.push(null)),r.length>0&&r.push(s),l++,0;else{if(c.children)for(var u=0;u<c.children.length;u++){var d=c.children[u];d&&r.push(c.children[u])}var h=this.getFaceIndexFromNode(c);(!n||l>=n)&&(o&&o(c,l,h),a&&a.push(c))}}}},{key:"getFaceIndexFromNode",value:function(e){if(!e)return-1;for(var t=1,i=e,n=0,o=0;;){var a=i.parent;if(!a)break;for(var r=-1,s=0;s<a.children.length;s++)a.children[s]===i&&(r=s);var l=r%T,c=Math.floor(r/T);n=l*t+n,o=c*t+o,t*=T,i=a}return o*t+n}},{key:"depthFirst",value:function(e,t,i){y(this.root,0,0,0,e,t,i,this.tileSize)}}]),e}();k.TraversalType=Object.freeze({PreOrder:0,PostOrder:1}),k.getLevelCountForSize=function(e,t){var i=0;for(t<e&&(t=e);;){if(t/=T,t<e)break;i++}return i},k.getSizeForLevel=function(e,t){return Math.pow(T,t)*e};var R=i("d58c"),_=i("b8d5"),S=i("0ddb"),A=i("9ef6"),O=i("f121");function C(e){var t=D();return function(){var i,n=Object(l["a"])(e);if(t){var o=Object(l["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(s["a"])(this,i)}}function D(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function V(){var e={renderTarget:null,inUse:!1,size:-1,pano:null};return e}function I(){this.uploadIntervalCancelled||(this.overlayTilesLoaded||!this.usingTileOverlay?(j=!0,this.updateUploadQueue(this.maxNonBaseUploadsPerFrame,this.maxBaseUploadsPerFrame),this.peekNextFromUploadQueue()?this.refreshUploadInterval(L):this.uploadInterval=null):this.refreshUploadInterval(this.uploadIntervalDelay))}var j=!1,L=A["a"].tiling.uploadIntervalDelay,F=A["a"].tiling.initialIntervalDelay,H=A["a"].tiling.maxNonBaseUploadsPerFrame,z=A["a"].tiling.maxBaseUploadsPerFrame,N={Base:0,Remaining:1},B=function(e){Object(r["a"])(i,e);var t=C(i);function i(e){var o;return Object(n["a"])(this,i),o=t.call(this),Object(c["a"])(Object(a["a"])(o),"setupZoomRenderTarget",function(){var e={};return function(){if("2k"!=this.qualityManager.maxRenderTargetSize||"2k"!=this.qualityManager.getMaxNavPanoSize())if(this.qualityManager.getMaxZoomPanoSize()>=this.qualityManager.getMaxNavPanoSize()){if(this.zoomRenderTarget&&this.zoomRenderTarget.width===this.qualityManager.getMaxZoomPanoSize())return;var t=this.zoomRenderTarget,i=this.qualityManager.getMaxZoomPanoSize();if(i>this.qualityManager.maxRenderTargetSize)return;if(e[i]?this.zoomRenderTarget=e[i]:(this.zoomRenderTarget=this.initTiledPano(i,!1),e[i]=this.zoomRenderTarget),t){var n=t.width,o=this.zoomRenderTarget.width;this.sceneRenderer.copyCubeMap(t.texture,this.zoomRenderTarget,n,n,o,o),t.texture.dispose(),t.texture.loaded=!1,t.texture.version=0,this.sceneRenderer.deallocateCubeTexture(t.texture),t.texture=null}this.zoomPanoRenderingDisabled=!1}else this.zoomPanoRenderingDisabled=!0}}()),Object(c["a"])(Object(a["a"])(o),"updateActivePanos",function(){var e=[];return function(t,i){e.length=0;for(var n=0;n<this.activePanos.length;n++){t&&e.length===i&&e.push(t);var o=this.activePanos[n],a=this.getActiveRenderTargetDescriptor(o.id);t&&o.id===t.id||!this.isRenderTargetDescriptorValid(a)||e.push(o)}t&&i>=e.length&&e.push(t),this.activePanos.length=0,this.activePanos.push.apply(this.activePanos,e)}}()),Object(c["a"])(Object(a["a"])(o),"renderPanoTiles",function(){var e=[];return function(t,i,n,o){this.zoomRenderTarget&&this.zoomRenderTarget.width===this.qualityManager.getMaxZoomPanoSize()||this.zoomPanoRenderingDisabled||this.setupZoomRenderTarget(),i=i||this.direction||v["a"].FORWARD;var a=this.getActiveRenderTargetDescriptor(t);if(!this.isRenderTargetDescriptorValid(a))throw new d["a"]("PanoRenderer.renderPanoTiles() -> Cannot render to a pano that is not activated.");for(var r=0;r<_["a"].FACES_PER_PANO;r++){var s=this.getTileTree(t,r);e.length=0,s.breadthFirst({saveVisited:e});for(var l=0;l<e.length;l++){var c=e[l];this.queueTileUpload(c.tile,!1,o||0===l&&n)}}this.updateDirection(i)}}()),Object(c["a"])(Object(a["a"])(o),"getNextFromUploadQueue",function(){var e=function(e){var t=e.shift();return t.uploadQueued=!1,t};return function(){if(this.forceQueue.length>0)return e(this.forceQueue);var t=this.getTopUploadQueue();return t&&t.length>0?e(t):null}}()),Object(c["a"])(Object(a["a"])(o),"refreshUploadInterval",function(){var e=null;return function(t){this.uploadIntervalCancelled||(e||(e=I.bind(this)),null!==t&&void 0!==t||(t=L),j||(t=F),this.uploadInterval=window.setTimeout(e,t),this.uploadIntervalDelay=t)}}()),Object(c["a"])(Object(a["a"])(o),"update",function(){var e=performance.now(),t=0;return function(){this.uploadIntervalCancelled=!0,window.clearTimeout(this.uploadInterval),this.uploadInterval=null;var i=performance.now()-e;//!(i > w || 0 === t) || !this.overlayTilesLoaded && this.usingTileOverlay || (this.updateUploadQueue(this.maxNonBaseUploadsPerFrame, this.maxBaseUploadsPerFrame),
- !(i>L||0===t)||!this.overlayTilesLoaded&&this.usingTileOverlay||(this.updateUploadQueue(this.maxNonBaseUploadsPerFrame,this.maxBaseUploadsPerFrame),e=performance.now()),t++}}()),Object(c["a"])(Object(a["a"])(o),"uploadTile",function(){var e={},t=A["a"].tiling.overlayStyle;return function(i,n){var o=1==this.index?this.sceneRenderer2:this.sceneRenderer,a=i.panoId,r=i.image,s=i.tileSize,l=i.panoSize,c=i.tileIndex,u=i.totalTiles,d=i.tileX,h=i.tileY,f=!0,m=!1,v=(this.getPanoDescriptor(a),this.getPanoLODDescriptor(a,l)),g=this.getActiveRenderTargetDescriptor(a),y=g.renderTarget,b=g.size;if(this.isPanoZoomed(a)&&this.zoomRenderTarget&&(y=this.zoomRenderTarget,b=this.zoomRenderTarget.width),this.isRenderTargetDescriptorValid(g)||(f=!1,m=!1),n||(this.anyUploaded(i.node)&&(f=!1,m=!0),this.isTileUploaded(i)&&(f=!1,m=!1)),f){var w=d*s,E=h*s,T=s/l*b,P=w/l*b,x=E/l*b;if(e[s]||(e[s]=o.initSizedTexture2D(s,THREE.ClampToEdgeWrapping)),l>this.qualityManager.maxRenderTargetSize)var k=o.initSizedTexture2D(s,THREE.ClampToEdgeWrapping),R=this.player.model.isHighMapLoaded(i.cubeFace,d,h);else k=e[s];if(o.uploadTexture2D(r,k,0,0,s,s),l>this.qualityManager.maxRenderTargetSize)R||this.player.model.updateHighMap(k,i.cubeFace,d,h);else if(1===t||2===t){var _=1===t?this.overlayTilesBasic:this.overlayTilesEnhanced;o.renderToCubeMap(k,y,s,s,0,0,s,s,P,x,T,T,i.cubeFace),o.renderToCubeMap(_[l],y,s,s,0,0,s,s,P,x,T,T,i.cubeFace,THREE.NormalBlending,!0,.5)}else o.renderToCubeMap(k,y,s,s,0,0,s,s,P,x,T,T,i.cubeFace);v.uploadCount++,this.emit(p["a"].TileRenderSuccess,a,l,c,u),v.uploadCount===u&&this.emit(p["a"].PanoRenderComplete,a,l,u),this.setUploaded(i,!0),this.addCoverageForNode(i.node)}else this.setUploaded(i,!1);return i.uploadAttempted||(v.uploadAttempts++,this.emit(p["a"].TileUploadAttempted,a,l,c,u)),i.uploadAttempted=!0,v.uploadAttempts===u&&this.emit(p["a"].UploadAttemptedForAllTiles,a,l,u),m}}()),o.tileDirectory={},o.activeRenderTargetDescriptors={},o.activePanos=[],o.panoLODDescriptors={},o.panoDescriptors={},o.tileTrees={},o.forceQueue=[],o.uploadQueues={},o.uploadInterval=null,o.uploadIntervalCancelled=!1,o.usingTileOverlay=!1,o.overlayTilesLoaded=!1,o.overlayTileBase=null,o.overlayTilesBasic={},o.overlayTilesEnhanced={},o.zoomRenderTarget=null,o.zoomPano=null,o.zoomingActive=!1,o.zoomPanoId=null,o.zoomPanoRenderingDisabled=!1,o.direction=new THREE.Vector3,o.initTime=-1,o.maxBaseUploadsPerFrame=z,o.maxNonBaseUploadsPerFrame=H,o.M=[],o.index=e||0,o}return Object(o["a"])(i,[{key:"init",value:function(e,t,i){1==this.index?(this.sceneRenderer2=e,this.sceneRenderer2.on(f["a"].ContextCreated,this.loadOverlayTiles.bind(this)),this.tileDownloader2=t):(this.sceneRenderer=e,this.sceneRenderer.on(f["a"].ContextCreated,this.loadOverlayTiles.bind(this)),this.tileDownloader=t,this.qualityManager=i),this.initTime=performance.now(),this.bindEvents()}},{key:"getActivePanoTextures",value:function(e){e=e||[];for(var t=0;t<M.length;t++){var i=M[t];i.renderTarget&&i.renderTarget.texture&&e.push(i.renderTarget.texture)}}},{key:"hasQueuedTiles",value:function(){var e=this.peekNextFromUploadQueue();return null!==e&&void 0!==e}},{key:"getActiveRenderTargetDescriptor",value:function(e){return this.activeRenderTargetDescriptors[e]}},{key:"setActiveRenderTargetDescriptor",value:function(e,t){this.activeRenderTargetDescriptors[e]=t}},{key:"loadOverlayTiles",value:function(){var e=1==this.index?this.sceneRenderer2:this.sceneRenderer;if(0!==A["a"].tiling.overlayStyle){var t=0,i=function(i,o,a){i=o?i[o]=e.initSizedTexture2D(_["a"].TILE_SIZE,THREE.ClampToEdgeWrapping):this.overlayTileBase=e.initSizedTexture2D(_["a"].TILE_SIZE,THREE.ClampToEdgeWrapping),e.uploadTexture2D(a,i,0,0,_["a"].TILE_SIZE,_["a"].TILE_SIZE),t++,t===n.length&&(this.overlayTilesLoaded=!0)}.bind(this),n=[["images/outlineBase.png",i.bind(this,this.overlayTileBase,null)],["images/outlineBasic512.png",i.bind(this,this.overlayTilesBasic,256)],["images/outlineBasic512.png",i.bind(this,this.overlayTilesBasic,512)],["images/outlineBasic1024.png",i.bind(this,this.overlayTilesBasic,1024)],["images/outlineBasic2048.png",i.bind(this,this.overlayTilesBasic,2048)],["images/outlineBasic4096.png",i.bind(this,this.overlayTilesBasic,4096)],["images/outlineEnhanced512.png",i.bind(this,this.overlayTilesEnhanced,256)],["images/outlineEnhanced512.png",i.bind(this,this.overlayTilesEnhanced,512)],["images/outlineEnhanced1024.png",i.bind(this,this.overlayTilesEnhanced,1024)],["images/outlineEnhanced2048.png",i.bind(this,this.overlayTilesEnhanced,2048)],["images/outlineEnhanced4096.png",i.bind(this,this.overlayTilesEnhanced,4096)]];n.forEach(function(e){this.tileDownloader.loadImage(e[0],0,e[1])}.bind(this)),this.usingTileOverlay=!0}else this.usingTileOverlay=!1}},{key:"bindEvents",value:function(){1==this.index?this.tileDownloader2.on(m["a"].TileDownloadSuccess,this.onTileDownloaded.bind(this)):this.tileDownloader.on(m["a"].TileDownloadSuccess,this.onTileDownloaded.bind(this))}},{key:"enableHighQuality",value:function(e){this.qualityManager.highQualityModeStarted||(this.setupZoomRenderTarget(),e(),this.qualityManager.highQualityModeStarted=!0)}},{key:"enableUltraHighQualityMode",value:function(e){if("2k"==O["a"].tileClass||"1k"==O["a"].tileClass)return this.enableHighQuality(e);if(!this.qualityManager.ultraHighQualityModeEnabled()){var t=this.qualityManager.getPanoSize(h["a"].ULTRAHIGH);this.tileDownloader.testDownload(t,_["a"].TILE_SIZE,function(t){t&&(this.qualityManager.enableUltraHighQualityMode(),this.setupZoomRenderTarget(),e())}.bind(this))}}},{key:"activateTiledPano",value:function(e,t,i){i&&this.clearAllQueuedUploads();for(var n=0;n<_["a"].FACES_PER_PANO;n++)this.initTileTree(e.id,n,this.qualityManager.getMaxPossiblePanoSize());this.linkAllTilesAndNodes(e);var o=this.getActiveRenderTargetDescriptor(e.id),a=t;if(a>this.qualityManager.getMaxNavPanoSize()&&(a=this.qualityManager.getMaxNavPanoSize()),!o||a!==o.size){if(o&&this.deactiveDescripor(o.renderTarget),o=this.activeDescripor(a),!o){var r=this.initTiledPano(a,!1);o=this.initDescriptor(r.width),o.renderTarget=r}o.pano=e,this.resetPanoDescriptor(e.id),this.resetPanoLODDescriptors(e.id),this.resetRenderStatus(e.id,!0,!0)}this.setActiveRenderTargetDescriptor(e.id,o);var s=i?0:1;return this.updateActivePanos(e,s),o.renderTarget}},{key:"deactivateTiledPano",value:function(e){var t=this.getActiveRenderTargetDescriptor(e.id);this.isRenderTargetDescriptorValid(t)&&(this.deactiveDescripor(t.renderTarget),this.setActiveRenderTargetDescriptor(e.id,null));var i=this.getUploadQueueForPano(e.id);this.clearUploadQueue(i),this.updateActivePanos()}},{key:"getActivePanoCount",value:function(){return this.activePanos.length}},{key:"resetRenderStatus",value:function(e,t,i,n){var o=null;n&&(o=k.getLevelCountForSize(_["a"].TILE_SIZE,n)+1);for(var a=function(e,n,o,a){i&&(n.tile.zoomUploaded=!1),t&&(n.tile.uploaded=!1)},r=0;r<_["a"].FACES_PER_PANO;r++){var s=this.getTileTree(e,r);s.breadthFirst({callback:a.bind(this,r),minLevel:o})}}},{key:"copyBaseRenderStatusToZoomed",value:function(e){for(var t=k.getLevelCountForSize(_["a"].TILE_SIZE,this.qualityManager.getMaxNavPanoSize()),i=function(e,t,i,n){t.tile.zoomUploaded=t.tile.uploaded,t.zoomCovered=t.covered},n=0;n<_["a"].FACES_PER_PANO;n++){var o=this.getTileTree(e,n);o.breadthFirst({callback:i.bind(this,n),maxLevel:t})}}},{key:"isRenderTargetDescriptorValid",value:function(e){return e&&e.renderTarget}},{key:"isPanoActive",value:function(e){var t=this.getActiveRenderTargetDescriptor(e);return this.isRenderTargetDescriptorValid(t)}},{key:"isPanoZoomed",value:function(e){return this.zoomingActive&&this.zoomPanoId===e}},{key:"initTileTree",value:function(e,t,i){var n=this.tileTrees[e];n||(n=[],this.tileTrees[e]=n);var o=n[t];if(!o){var a=k.getLevelCountForSize(_["a"].TILE_SIZE,i);o=new k(_["a"].TILE_SIZE,a),n[t]=o}}},{key:"getTileTree",value:function(e,t){var i=this.tileTrees[e];if(!i)throw new d["a"]("PanoRenderer.getTileTree() -> Tree array not yet initialized!");var n=i[t];if(!n)throw new d["a"]("PanoRenderer.getTileTree() -> Tree not yet initialized!");return n}},{key:"initTiledPano",value:function(e,t){var i,n,o=1==this.index?this.sceneRenderer2.renderer:this.sceneRenderer.renderer;i=new THREE.WebGLRenderTargetCube(e,e,{stencilBuffer:!1}),n=new THREE.CubeTexture([]),n.image=[null,null,null,null,null,null],n.flipY=!0,n.format=THREE.RGBAFormat,t?(n.generateMipmaps=!0,n.magFilter=THREE.LinearFilter,n.minFilter=THREE.LinearMipMapLinearFilter):(n.generateMipmaps=!1,n.magFilter=THREE.LinearFilter,n.minFilter=THREE.LinearFilter),o.setRenderTarget(i),o.setRenderTarget(null);var a=o.properties.get(n);return a.__image__webglTextureCube=a.__webglTexture,i}},{key:"getUploadQueueForPano",value:function(e){var t=this.uploadQueues[e];return t||(t=[],this.uploadQueues[e]=t),t}},{key:"isTileUploaded",value:function(e){return this.isPanoZoomed(e.panoId)?e.zoomUploaded:e.uploaded}},{key:"setUploaded",value:function(e,t){this.isPanoZoomed(e.panoId)?e.zoomUploaded=t:e.uploaded=t}},{key:"queueTileUpload",value:function(e,t,i){var n=this.getActiveRenderTargetDescriptor(e.panoId);if(this.isRenderTargetDescriptorValid(n)&&e.downloaded&&!this.isTileUploaded(e)&&(!e.uploadQueued||i)&&(!(e.panoSize>this.qualityManager.getMaxNavPanoSize())||this.zoomingActive)){var o=this.getUploadQueueForPano(e.panoId);i?this.uploadTile(e,!1):(this.shoulPushToFrontOfQueue(e)?this.forceQueue.push(e):t&&this.direction?R["a"].insertSortedPanoTile(o,e,n.pano,this.direction):o.push(e),e.uploadQueued=!0,this.uploadInterval||this.uploadIntervalCancelled||this.refreshUploadInterval(0))}}},{key:"shoulPushToFrontOfQueue",value:function(e){return 0===k.getLevelCountForSize(_["a"].TILE_SIZE,e.panoSize)}},{key:"getTopUploadQueue",value:function(){for(var e=null,t=null,i=N.Base;i<=N.Remaining;i++)for(var n=0;n<this.activePanos.length;n++)if(e=this.activePanos[n],t=this.getUploadQueueForPano(e.id),t.length>0)switch(i){case N.Base:if(0===t[0].level)return t;break;case N.Remaining:return t}return null}},{key:"peekNextFromUploadQueue",value:function(){if(this.forceQueue.length>0)return this.forceQueue[0];var e=this.getTopUploadQueue();return e&&e.length>0?e[0]:null}},{key:"clearAllQueuedUploads",value:function(){this.clearAllUploadQueues(null,0)}},{key:"clearAllQueuedUploadsForPano",value:function(e){this.clearAllUploadQueues(e,0)}},{key:"clearAllUploadQueues",value:function(e,t){if(e)this.clearUploadQueue(this.getUploadQueueForPano(e),t),this.clearUploadQueue(this.forceQueue,t,e);else{for(var i=0;i<this.activePanos.length;i++){var n=this.activePanos[i];this.clearUploadQueue(this.getUploadQueueForPano(n.id),t)}this.clearUploadQueue(this.forceQueue,t)}}},{key:"clearUploadQueue",value:function(e,t,i){void 0!==t&&null!==t||(t=0);for(var n=0;n<e.length;){var o=e[n];(!i||i&&i===o.tile.panoId)&&o.level>=t?(o.uploadQueued=!1,e.splice(n,1)):n++}}},{key:"updateUploadQueue",value:function(e,t){e||(e=1);for(var i=0,n=0;;){if(n>=t||i>=e)break;var o=this.getNextFromUploadQueue();if(!o)break;if(0!==o.level?i++:n++,!(o.panoSize>this.qualityManager.getMaxNavPanoSize())||this.zoomingActive){var a=this.getActiveRenderTargetDescriptor(o.panoId);this.isRenderTargetDescriptorValid(a)&&this.uploadTile(o,o.forceUpload)}}}},{key:"updateDirection",value:function(e){if(e=e||this.direction){this.direction=e;for(var t=0;t<this.activePanos.length;t++){var i=this.activePanos[t],n=this.getUploadQueueForPano(i.id);R["a"].sortPanoTiles(n,i,this.direction)}}}},{key:"linkTileAndNode",value:function(e,t){t.tile=e,e.node=t}},{key:"linkAllTilesAndNodes",value:function(e){for(var t=function(t,i,n,o,a){var r=this.getTileDirectoryEntry(e.id,i,o,a);this.linkTileAndNode(r,n)},i=0;i<_["a"].FACES_PER_PANO;i++){var n=this.getTileTree(e.id,i);n.breadthFirst({callback:t.bind(this,n,i)})}}},{key:"anyUploaded",value:function(e){if(!e)return!1;if(e.tile&&this.isTileUploaded(e.tile))return!0;if(e.children)for(var t=0;t<e.children.length;t++){var i=e.children[t];if(this.anyUploaded(i))return!0}return!1}},{key:"setNodeCovered",value:function(e,t){this.isPanoZoomed(e.tile.panoId)?e.zoomCovered=t:e.covered=t}},{key:"isNodeCovered",value:function(e){return!!e&&(this.isPanoZoomed(e.tile.panoId)?e.zoomCovered:e.covered)}},{key:"addCoverageForNode",value:function(e){if(this.setNodeCovered(e,!0),e.parent&&e.covered){var t=e.parent;this.nodeSubcovered(t)&&this.addCoverageForNode(t,!0)}}},{key:"calcFullCoverage",value:function(e){var t=!1;if(e.children)for(var i=0;i<e.children.length;i++){var n=e.children[i];t=t||this.calcFullCoverage(n)}e.covered=e.tile.uploaded||t}},{key:"nodeSubcovered",value:function(e){if(!e.children)return!1;for(var t=0;t<e.children.length;t++)if(!e.children[t]||!this.isNodeCovered(e.children[t]))return!1;return!0}},{key:"resetPanoDescriptor",value:function(e){this.getPanoDescriptor(e)}},{key:"getPanoDescriptor",value:function(e){var t=this.panoDescriptors[e];return t||(t={},this.panoDescriptors[e]=t),t}},{key:"resetPanoLODDescriptors",value:function(e){var t=this.getPanoLODDescriptors(e);for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];n.uploadCount=0,n.uploadAttempts=0}}},{key:"getPanoLODDescriptor",value:function(e,t){var i=this.getPanoLODDescriptors(e),n=i[t];return n||(n={uploadCount:0,uploadAttempts:0},i[t]=n),n}},{key:"getPanoLODDescriptors",value:function(e){var t=this.panoLODDescriptors[e];return t||(t={},this.panoLODDescriptors[e]=t),t}},{key:"onTileDownloaded",value:function(e){var t=k.getLevelCountForSize(_["a"].TILE_SIZE,e.panoSize),i=this.getTileDirectoryEntry(e.panoId,e.face,t,e.faceTileIndex);if(i.downloaded=!0,i.image=e.image,i.panoSize=e.panoSize,i.tileX=e.tileX,i.tileY=e.tileY,i.totalTiles=e.totalTiles,i.tileIndex=e.tileIndex,i.faceTileIndex=e.faceTileIndex,i.face=e.face,i.cubeFace=S["a"].mapFaceToCubemapFace(e.face),i.panoId=e.panoId,i.tileSize=e.tileSize,i.direction=(new THREE.Vector3).copy(e.direction),i.node=null,i.level=k.getLevelCountForSize(_["a"].TILE_SIZE,i.panoSize),this.isPanoActive(i.panoId)){var n=this.getTileTree(i.panoId,i.face),o=n.getSubNode(i.panoSize,i.tileX,i.tileY);this.linkTileAndNode(i,o),this.queueTileUpload(i,!0)}}},{key:"getTileDirectoryEntry",value:function(e,t,i,n){var o=this.tileDirectory[e];o||(o={},this.tileDirectory[e]=o);var a=16384*t+1024*i+n,r=o[a];return r||(r={downloaded:!1,uploaded:!1,zoomUploaded:!1},o[a]=r),r._key=e+":"+t+":"+i+":"+n,r._tileKey=a,r}},{key:"setZoomingActive",value:function(e,t,i){this.zoomPanoRenderingDisabled||e===this.zoomingActive&&this.zoomPanoId===t.id||(this.zoomingActive=e,this.zoomPanoId=t.id,this.zoomingActive&&(this.zoomPanoId!==t.id||i)&&this.updateZoomedPanoFromBase(t))}},{key:"updateZoomedPanoFromBase",value:function(e){if(!this.zoomPanoRenderingDisabled&&this.zoomRenderTarget){var t=this.getActiveRenderTargetDescriptor(e.id);if(t&&t.renderTarget){var i=Math.min(this.qualityManager.maxRenderTargetSize,this.qualityManager.getMaxZoomPanoSize()),n=t.renderTarget,o=t.size;this.sceneRenderer.copyCubeMap(n.texture,this.zoomRenderTarget,o,o,i,i),this.copyBaseRenderStatusToZoomed(e.id)}}}},{key:"add",value:function(e){this.M.push(e)}},{key:"initDescriptor",value:function(e){var t=V();return t.inUse=!0,t.size=e,this.add(t),t}},{key:"activeDescripor",value:function(e){for(var t=0;t<this.M.length;t++){var i=this.M[t];if(!i.inUse&&i.size===e)return i.inUse=!0,i}return null}},{key:"deactiveDescripor",value:function(e){for(var t=0;t<this.M.length;t++){var i=this.M[t];if(i.renderTarget===e)return i.inUse=!1,!0}return!1}}]),i}(u["default"])},9478:function(e,t,i){},"951b":function(e,t,i){"use strict";i.d(t,"a",(function(){return ee}));i("6b54"),i("2397"),i("ac6a");var n=i("d4ec"),o=i("bee2"),a=i("257e"),r=i("262e"),s=i("99de"),l=i("7e84"),c=i("80c5"),u=i("5fda"),d=i("27bc"),h=i("9ef6");function p(e){var t=f();return function(){var i,n=Object(l["a"])(e);if(t){var o=Object(l["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(s["a"])(this,i)}}function f(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var m=function(e){Object(r["a"])(i,e);var t=p(i);function i(e){var o;return Object(n["a"])(this,i),o=t.call(this,d["a"].clampVFOV(h["a"].insideFOV),window.innerWidth/window.innerHeight,h["a"].insideNear,h["a"].insideFar),o.controls=null,o.updateAspect(e),o}return Object(o["a"])(i,[{key:"updateAspect",value:function(e){this.aspect=e,this.updateProjectionMatrix()}}]),i}(u["PerspectiveCamera"]);function v(e){var t=g();return function(){var i,n=Object(l["a"])(e);if(t){var o=Object(l["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(s["a"])(this,i)}}function g(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var y=function(e){Object(r["a"])(i,e);var t=v(i);function i(){var e;return Object(n["a"])(this,i),e=t.call(this,d["a"].clampVFOV(h["a"].dollhouseFOV),window.innerWidth/window.innerHeight,h["a"].dollhouseNear,h["a"].dollhouseFar),e.aspect=1,e.controls=null,e}return Object(o["a"])(i,[{key:"updateAspect",value:function(e){isNaN(e)&&(e=1),this.aspect=e,this.controls.updateDistance(e),this.updateProjectionMatrix()}}]),i}(u["PerspectiveCamera"]);function b(e){var t=w();return function(){var i,n=Object(l["a"])(e);if(t){var o=Object(l["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(s["a"])(this,i)}}function w(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var E=function(e){Object(r["a"])(i,e);var t=b(i);function i(e){var o;return Object(n["a"])(this,i),o=t.call(this,-h["a"].orthoBase,h["a"].orthoBase,h["a"].orthoBase/e,-h["a"].orthoBase/e,h["a"].orthoNear,h["a"].orthoFar),o.aspect=1,o.controls=null,o.updateAspect(e),o}return Object(o["a"])(i,[{key:"updateAspect",value:function(e){isNaN(e)&&(e=1),this.aspect=e}}]),i}(u["OrthographicCamera"]),T=(i("673e"),i("bc19")),P={LEFT:0,MIDDLE:1,RIGHT:2},x=P,k=i("65ae"),R=i("cd18"),_=i("aed5"),S=i("f121"),M=i("b235"),A=i("2d47"),O=i("1158"),C=(i("823b"),i("6860"));function D(e){var t=V();return function(){var i,n=Object(l["a"])(e);if(t){var o=Object(l["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(s["a"])(this,i)}}function V(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var I=function(e){Object(r["a"])(i,e);var t=D(i);function i(e,o,r){var s;return Object(n["a"])(this,i),s=t.call(this),s.camera=e,s.camera.controls=Object(a["a"])(s),s.player=r,s.target=new THREE.Vector3(0,0,0),s.lookVector=new THREE.Vector3,s.lookSpeed=.05,s.rotationAcc=new THREE.Vector2,s.rotationSpeed=new THREE.Vector2,s.lat=0,s.lon=0,s.phi=0,s.theta=0,s.enabled=!1,s.locked=!1,s.pointer=new THREE.Vector2(0,0),s.pointersLimit=2,s.pointers=[],s.rotationHistory=[],s.rotationDifference=new THREE.Vector2,s.pointerDragOn=!1,s.pointerDragStart=new THREE.Vector2(0,0),s.pinchDistance=0,s.moveStart=new THREE.Vector2,s.moveTolerance=.01,s.dom=o,s.limitDownAngel=null,s.insideLookLimitDown=null,s}return Object(o["a"])(i,[{key:"usable",value:function(){return this.enabled&&!this.locked}},{key:"lookAt",value:function(e,t){var i=t||this.camera.position.clone().sub(e),n=Math.atan(i.z/i.x);n+=i.x<0?Math.PI:0,n+=i.x>0&&i.z<0?2*Math.PI:0,this.lon=THREE.Math.radToDeg(n)+180;var o=Math.sqrt(i.x*i.x+i.z*i.z),a=Math.atan(i.y/o);this.lat=-THREE.Math.radToDeg(a)}},{key:"startLookAt",value:function(e,t,i){var n=i&&(void 0!=i.lon||void 0!=i.lat);if(!n){var o=t?t.clone().sub(e):this.camera.position.clone().sub(e),a=Math.atan(o.z/o.x);a+=o.x<0?Math.PI:0,a+=o.x>0&&o.z<0?2*Math.PI:0;var r=THREE.Math.radToDeg(a)+180,s=Math.sqrt(o.x*o.x+o.z*o.z),l=Math.atan(o.y/s),c=-THREE.Math.radToDeg(l),u=(r-this.lon)%360;Math.abs(u)>180&&(u>0?u-=360:u+=360),r=this.lon+u;u=(c-this.lat)%360;Math.abs(u)>180&&(u>0?u-=360:u+=360),c=this.lat+u}var d=1200,h=O["a"]["easeInOutQuad"];if(void 0!=i){if(i.soon)return this.lon=r,void(this.lat=c);if(i.speed){if(n)var p=i.lon?Math.abs(i.lon-this.lon):0,f=i.lat?Math.abs(i.lat-this.lat):0,m=p+f;else m=Math.abs(r-this.lon)+Math.abs(c-this.lat);d=m/i.speed,i.time&&(d=Math.min(i.time,d))}else i.time&&(d=i.time);i.fuc&&setTimeout(i.fuc,d),i.constantSpeed&&(h=null)}n?(i.lon&&M["a"].start(A["a"].property(this,"lon",i.lon),d,null,0,h),i.lat&&M["a"].start(A["a"].property(this,"lat",i.lat),d,null,0,h)):(M["a"].start(A["a"].property(this,"lon",r),d,null,0,h),M["a"].start(A["a"].property(this,"lat",c),d,null,0,h))}},{key:"startRotationFrom",value:function(e,t){var i=T["a"].handelPadding(e,t,this.dom);T["a"].convertScreenPositionToNDC(i.x,i.y,this.pointer,this.dom),this.pointerDragOn=!0,this.pointerDragStart.copy(this.pointer),this.moveStart.copy(this.pointer),this.rotationHistory=[],this.rotationSpeed.set(0,0)}},{key:"onMouseOver",value:function(e){!this.pointerDragOn||0!==e.which&&0!==e.buttons||this.onMouseUp(e)}},{key:"onTouchStart",value:function(e){if(this.usable()){switch(e.preventDefault(),e.stopPropagation(),e.touches.length){case 1:this.startRotationFrom(e.touches[0].clientX,e.touches[0].clientY);break;case 2:var t=(e.touches[0].clientX-e.touches[1].clientX)/app.player.domElement.clientWidth,i=(e.touches[0].clientY-e.touches[1].clientY)/app.player.domElement.clientHeight;this.pinchDistance=Math.sqrt(t*t+i*i)}this.emit(k["a"].InputStart,"touch")}}},{key:"onPointerDown",value:function(e){this.usable()&&"touch"===e.pointerType&&(this.pointers.length<this.pointersLimit&&this.pointers.push({id:e.pointerId,clientX:e.clientX,clientY:e.clientY}),e.touches=this.pointers,this.onTouchStart(e),this.emit(k["a"].InputStart,"pointer"))}},{key:"onMouseDown",value:function(e){if(this.usable()){switch(e.preventDefault(),e.stopPropagation(),e.button){case x.LEFT:this.startRotationFrom(e.clientX,e.clientY)}this.emit(k["a"].InputStart,"mouse")}}},{key:"updateRotation",value:function(){if(this.usable()&&this.pointerDragOn){this.camera.matrixWorld=new THREE.Matrix4;var e=new THREE.Vector3(this.pointerDragStart.x,this.pointerDragStart.y,-1).unproject(this.camera),t=new THREE.Vector3(this.pointer.x,this.pointer.y,-1).unproject(this.camera),i=Math.sqrt(e.x*e.x+e.z*e.z),n=Math.sqrt(t.x*t.x+t.z*t.z),o=Math.atan2(e.y,i),a=Math.atan2(t.y,n);this.camera.updateMatrix(),this.camera.updateMatrixWorld(),this.rotationDifference.y=THREE.Math.radToDeg(o-a),e.y=0,t.y=0;var r=Math.acos(e.dot(t)/e.length()/t.length());isNaN(r)||(this.rotationDifference.x=THREE.Math.radToDeg(r),this.pointerDragStart.x<this.pointer.x&&(this.rotationDifference.x*=-1)),this.pointerDragStart.copy(this.pointer)}}},{key:"onMouseMove",value:function(e){if(this.usable()){var t=T["a"].handelPadding(e.clientX,e.clientY,this.dom);T["a"].convertScreenPositionToNDC(t.x,t.y,this.pointer,this.dom),this.pointerDragOn&&(Math.abs(this.pointer.x-this.moveStart.x)>this.moveTolerance||Math.abs(this.pointer.y-this.moveStart.y)>this.moveTolerance)&&this.emit(k["a"].Move,"mouse")}}},{key:"onTouchMove",value:function(e){if(this.usable())switch(this.emit(k["a"].Move,"touch"),e.touches.length){case 1:var t=T["a"].handelPadding(e.touches[0].clientX,e.touches[0].clientY,this.dom);T["a"].convertScreenPositionToNDC(t.x,t.y,this.pointer,this.dom);break;case 2:var i=(e.touches[0].clientX-e.touches[1].clientX)/app.player.domElement.clientWidth,n=(e.touches[0].clientY-e.touches[1].clientY)/app.player.domElement.clientHeight,o=this.pinchDistance-Math.sqrt(i*i+n*n);Math.abs(o)>.01&&(this.emit(k["a"].InteractionDirect),this.emit(k["a"].Pinch,o),this.pinchDistance-=o)}}},{key:"onPointerMove",value:function(e){this.usable()&&"touch"===e.pointerType&&(this.pointers.forEach((function(t){e.pointerId===t.id&&(t.clientX=e.clientX,t.clientY=e.clientY)})),e.touches=this.pointers,this.onTouchMove(e))}},{key:"endRotation",value:function(){this.pointerDragOn=!1;var e=R["a"].averageVectors(this.rotationHistory);this.rotationSpeed.set(e.x*h["a"].rotationAfterMoveMultiplierX,e.y*h["a"].rotationAfterMoveMultiplierY)}},{key:"onTouchEnd",value:function(e){this.usable()&&(e.preventDefault(),e.stopPropagation(),this.endRotation())}},{key:"onMouseUp",value:function(e){this.usable()&&(e.preventDefault(),e.stopPropagation(),this.endRotation())}},{key:"onPointerUp",value:function(e){this.usable()&&"touch"===e.pointerType&&(this.pointers.forEach(function(t,i){e.pointerId===t.id&&this.pointers.splice(i,1)}.bind(this)),e.touches=this.pointers,this.onTouchEnd(e))}},{key:"update",value:function(e){if((!h["a"].vrEnabled||window.ifTest)&&(this.player.flying||this.player.flyRotate||"panorama"!=this.player.mode||C["objects"].play.control.onUpdate)){for(this.updateRotation(),this.rotationHistory.push(this.rotationDifference.clone());this.rotationHistory.length>h["a"].rotationAfterMoveHistoryCount;)this.rotationHistory.shift();this.lon+=this.rotationDifference.x,this.lat+=this.rotationDifference.y,this.rotationDifference.set(0,0);var t,i,n=Math.min(1,h["a"].rotationFriction*e*60);if(this.rotationSpeed.x=this.rotationSpeed.x*(1-n)+this.rotationAcc.x*h["a"].rotationAccelerationInside,this.rotationSpeed.y=this.rotationSpeed.y*(1-n)+this.rotationAcc.y*h["a"].rotationAccelerationInside,this.lon+=this.rotationSpeed.x*e,this.lat+=this.rotationSpeed.y*e,null==this.limitDownAngel)h["a"].limitAngleIsBound?(t=h["a"].insideLookLimitDown+this.camera.fov/2,i=h["a"].insideLookLimitUp-this.camera.fov/2):(t=null!=this.insideLookLimitDown?this.insideLookLimitDown:h["a"].insideLookLimitDown,i=h["a"].insideLookLimitUp),this.lat=Math.max(t,Math.min(i,this.lat));else this.lat=this.limitDownAngel;this.phi=THREE.Math.degToRad(90-this.lat),this.theta=THREE.Math.degToRad(this.lon),this.lookVector.x=Math.sin(this.phi)*Math.cos(this.theta),this.lookVector.y=Math.cos(this.phi),this.lookVector.z=Math.sin(this.phi)*Math.sin(this.theta),this.target.copy(this.lookVector).add(this.camera.position),this.camera.lookAt(this.target)}}},{key:"updateByLookVectorFish",value:function(e){var t;if(!this.player.flying||this.player.flyingToTag||this.player.flyRotate||this.player.flyingWithRot||this.player.isWarping()||e){this.lat=Math.max(h["a"].insideLookLimitDown,Math.min(h["a"].insideLookLimitUp,this.lat)),this.phi=THREE.Math.degToRad(90-this.lat),this.theta=THREE.Math.degToRad(this.lon),t=new THREE.Vector3;var i=h["a"].FishCam_BackDist;t.x=h["a"].skyRadius*i*Math.sin(this.phi)*Math.cos(this.theta),t.y=h["a"].skyRadius*i*Math.cos(this.phi),t.z=h["a"].skyRadius*i*Math.sin(this.phi)*Math.sin(this.theta),this.fishState&&this.camera.position.copy(t).negate().add(this.target)}if(e||this.fishState)return t;t&&this.lookVector.copy(t),this.target=this.player.currentTarget.clone(),this.camera.position.copy(this.lookVector).negate().add(this.target),this.camera.lookAt(this.target)}},{key:"onMouseWheel",value:function(e){if(this.usable()){var t=e.wheelDelta||-e.detail;this.emit(k["a"].InteractionDirect),this.emit(k["a"].Scroll,t)}}},{key:"onKeyDown",value:function(e){if(this.usable())if(e.metaKey||e.ctrlKey);else{if(S["a"].isTyping||S["a"].isDisableControl)return;e.preventDefault(),this.handleKeyDown(e.which)}}},{key:"handleKeyDown",value:function(e){var t=function(e,t){this.rotationAcc[e]=t}.bind(this);this.emit(k["a"].InteractionKey);var i=!0;switch(e){case _["a"].LEFTARROW:case _["a"].J:t("x",-1);break;case _["a"].RIGHTARROW:case _["a"].L:t("x",1);break;case _["a"].I:t("y",1);break;case _["a"].K:t("y",-1);break;default:i=!1}i&&this.emit(k["a"].Move,"key")}},{key:"onKeyUp",value:function(e){this.usable()&&(e.preventDefault(),e.stopPropagation(),this.handleKeyUp(e.which))}},{key:"handleKeyUp",value:function(e){switch(e){case _["a"].LEFTARROW:case _["a"].J:case _["a"].RIGHTARROW:case _["a"].L:this.rotationAcc.x=0;break;case _["a"].I:case _["a"].K:this.rotationAcc.y=0}}},{key:"startRotating",value:function(e,t){e&&(this.rotationAcc.x=e),t&&(this.rotationAcc.y=t)}},{key:"stopRotating",value:function(e){e&&(this.rotationSpeed.x=this.rotationSpeed.y=0),this.rotationAcc.set(0,0)}},{key:"reset",value:function(){this.pointerDragOn=!1,this.rotationAcc.set(0,0),this.rotationSpeed.set(0,0),this.pointers=[]}},{key:"toJSON",value:function(){var e={camera_position:{x:T["a"].toPrecision(this.camera.position.x,4),y:T["a"].toPrecision(this.camera.position.y,4),z:T["a"].toPrecision(this.camera.position.z,4)},camera_quaternion:{x:T["a"].toPrecision(this.camera.quaternion.x,4),y:T["a"].toPrecision(this.camera.quaternion.y,4),z:T["a"].toPrecision(this.camera.quaternion.z,4),w:T["a"].toPrecision(this.camera.quaternion.w,4)}};return e}},{key:"setStateFromJSON",value:function(e){this.camera.position.copy(e.camera_position),this.camera.quaternion.copy(e.camera_quaternion)}}]),i}(EventEmitter),j=(i("7514"),i("ade3")),L={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,ROTATE_DOLLY:3,PAN_DOLLY:4},F=L,H=i("4c16");function z(e){var t=N();return function(){var i,n=Object(l["a"])(e);if(t){var o=Object(l["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(s["a"])(this,i)}}function N(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var B=function(e){Object(r["a"])(i,e);var t=z(i);function i(e,o,r){var s;return Object(n["a"])(this,i),s=t.call(this),Object(j["a"])(Object(a["a"])(s),"setAutoPanPosition",function(e,t){var i=new THREE.Vector3,n=new THREE.Vector3;return function(e,t){i.copy(this.camera.position),void 0===e&&null===e||i.setX(e),void 0===t&&null===t||i.setZ(t);var o=this.camera.position.distanceTo(this.target),a=Vector3.FORWARD.clone().applyQuaternion(this.camera.quaternion);this.targetClamped=!1,n.copy(i).addScaledVector(a,o),this.targetBounds.containsPoint(n)||(this.targetBounds.clampPoint(n,n),i.copy(n).addScaledVector(a,-o),this.targetClamped=!0),this.autoPanPosition.x=i.x,this.autoPanPosition.z=i.z,this.autoPan&&this.stopAutoPanning()}}()),s.camera=e,s.camera.controls=Object(a["a"])(s),s.player=r,s.enabled=!1,s.target=new THREE.Vector3,s.targetBounds=new THREE.Box3,s.zoomSpeed=S["a"].isEdit?2.3:1,s.minDistance=0,s.maxDistance=1/0,s.scale=1,s.dollyStart=new THREE.Vector2,s.dollyEnd=new THREE.Vector2,s.dollyDelta=new THREE.Vector2,s.noRotateUpDown=!1,s.rotateSpeed=1,s.keyboardZoomSpeed=0,s.keyPanSpeed=7,s.autoRotate=!1,s.autoRotateSpeed=2,s.minPolarAngle=THREE.Math.degToRad(25),s.maxPolarAngle=THREE.Math.degToRad(65),s.rotationAcceleration=new THREE.Vector2,s.rotationSpeed=new THREE.Vector2,s.rotateStart=new THREE.Vector2,s.rotateEnd=new THREE.Vector2,s.rotateDelta=new THREE.Vector2,s.phiDelta=0,s.thetaDelta=0,s.rotateCenter=new THREE.Vector2,s.rotateStartVec=new THREE.Vector2,s.rotateEndVec=new THREE.Vector2,s.autoPan=!1,s.autoPanPosition=new THREE.Vector3,s.panAcceleration=new THREE.Vector2,s.panSpeed=new THREE.Vector2,s.panStart=new THREE.Vector2,s.panEnd=new THREE.Vector2,s.panDelta=new THREE.Vector2,s.panOffset=new THREE.Vector3,s.panVector=new THREE.Vector3,s.offset=new THREE.Vector3,s.lastPosition=new THREE.Vector3,s.state=F.NONE,s.mouseActions={},s.mouseActions[x.LEFT]=F.ROTATE,s.mouseActions[x.MIDDLE]=F.DOLLY,s.mouseActions[x.RIGHT]=F.PAN,s.touchActions={},s.touchActions[1]=F.ROTATE,s.touchActions[2]=F.PAN_DOLLY,s.lastMoveTime=0,s.pointersLimit=2,s.pointers=[],s.angle=1e-6,s}return Object(o["a"])(i,[{key:"setBounds",value:function(e){this.targetBounds=e}},{key:"isEngaged",value:function(){return this.state!==F.NONE}},{key:"rotateLeft",value:function(e){void 0===e&&(e=this.getAutoRotationAngle()),this.thetaDelta-=e}},{key:"rotateUp",value:function(e){this.noRotateUpDown||(void 0===e&&(e=this.getAutoRotationAngle()),this.phiDelta-=e)}},{key:"panLeft",value:function(e){isNaN(e)&&(e=0);var t=this.camera.matrix.elements;this.panOffset.set(t[0],0,t[2]).normalize(),this.panOffset.multiplyScalar(-e),this.panVector.add(this.panOffset)}},{key:"panUp",value:function(e){isNaN(e)&&(e=0);var t=this.camera.matrix.elements;this.panOffset.set(t[4],0,t[6]).normalize(),this.panOffset.multiplyScalar(-e),this.panVector.add(this.panOffset)}},{key:"stopAutoPanning",value:function(){var e=this.autoPan;this.autoPan=!1,this.emit(this.targetClamped?k["a"].AutoPanClamped:e?k["a"].AutoPanInterrupt:k["a"].AutoPanComplete)}},{key:"dollyIn",value:function(e){void 0===e&&(e=this.getZoomScale()),this.scale/=e}},{key:"dollyOut",value:function(e){void 0===e&&(e=this.getZoomScale()),this.scale*=e}},{key:"updatePan",value:function(e){if(this.panSpeed.multiplyScalar(1-h["a"].panFriction).addScaledVector(this.panAcceleration,h["a"].panAccelerationOutside*e),this.pan(-this.panSpeed.x,this.panSpeed.y),this.autoPan){var t=(new THREE.Vector3).copy(this.autoPanPosition).sub(this.camera.position);t.setY(0).clampLength(0,50*e),this.target.add(t),this.camera.position.add(t),this.autoPanPosition.x===this.camera.position.x&&this.autoPanPosition.z===this.camera.position.z&&(this.autoPan=!1,this.stopAutoPanning())}}},{key:"update",value:function(e,t){if(!this.dontUpdate){e||(e=1/60),this.rotationSpeed.multiplyScalar(1-h["a"].rotationFriction).addScaledVector(this.rotationAcceleration,h["a"].rotationAccelerationOutside*e),this.rotateLeft(-this.rotationSpeed.x),this.noRotateUpDown||this.rotateUp(this.rotationSpeed.y),this.updatePan(e);var i=this.camera.position;this.offset.copy(i).sub(this.target);var n=Math.atan2(this.offset.x,this.offset.z),o=Math.atan2(Math.sqrt(this.offset.x*this.offset.x+this.offset.z*this.offset.z),this.offset.y);this.autoRotate&&this.rotateLeft(this.getAutoRotationAngle()),n+=this.thetaDelta,o+=this.phiDelta,o=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,o)),o=Math.max(this.angle,Math.min(Math.PI-this.angle,o)),this.lon=n,this.lat=o;var a=this.updateZoom();a=Math.max(this.minDistance,Math.min(this.maxDistance,a)),this.target.add(this.panVector),this.targetBounds.clampPoint(this.target,this.target),this.offset.x=a*Math.sin(o)*Math.sin(n),this.offset.y=a*Math.cos(o),this.offset.z=a*Math.sin(o)*Math.cos(n),i.copy(this.target).add(this.offset),this.camera.lookAt(this.target),this.thetaDelta=0,this.phiDelta=0,this.scale=1,this.panVector.set(0,0,0),this.lastPosition.distanceTo(this.camera.position)>0&&this.lastPosition.copy(this.camera.position)}}},{key:"getAutoRotationAngle",value:function(){return 2*Math.PI/60/60*this.autoRotateSpeed}},{key:"getZoomScale",value:function(){return Math.pow(.95,this.zoomSpeed)}},{key:"onMouseDown",value:function(e){if(this.enabled){switch(e.preventDefault(),this.stopAutoPanning(),this.mouseDown=!0,this.state=this.mouseActions[e.button],this.state){case F.ROTATE:this.rotateStart.set(e.clientX,e.clientY),this.rotationSpeed.set(0,0),this.noRotateUpDown&&(this.rotateCenter=H["a"].getPos2d(this.target).pos,this.rotateStartVec.subVectors(this.rotateStart,this.rotateCenter));break;case F.DOLLY:this.dollyStart.set(e.clientX,e.clientY);break;case F.PAN:this.panStart.set(e.clientX,e.clientY)}this.emit(k["a"].InputStart,"mouse")}}},{key:"onMouseMove",value:function(e){if(this.enabled&&this.mouseDown&&0!==e.buttons){switch(e.preventDefault(),this.state){case F.ROTATE:if(this.rotateEnd.set(e.clientX,e.clientY),this.noRotateUpDown){this.rotateEndVec.subVectors(this.rotateEnd,this.rotateCenter);var t=T["a"].getVec2Angle(this.rotateStartVec,this.rotateEndVec),i=new THREE.Vector3(this.rotateEndVec.x,this.rotateEndVec.y,0),n=new THREE.Vector3(this.rotateStartVec.x,this.rotateStartVec.y,0);i.clone().cross(n).z<0&&(t*=-1),this.rotateLeft(t),this.rotateStartVec.copy(this.rotateEndVec)}else this.rotateDelta.subVectors(this.rotateEnd,this.rotateStart),this.rotateLeft(2*Math.PI*this.rotateDelta.x/app.player.domElement.clientWidth*this.rotateSpeed),this.rotateUp(2*Math.PI*this.rotateDelta.y/app.player.domElement.clientHeight*this.rotateSpeed),this.rotateStart.copy(this.rotateEnd);break;case F.DOLLY:this.dollyEnd.set(e.clientX,e.clientY),this.dollyDelta.subVectors(this.dollyEnd,this.dollyStart);var o=this.dollyDelta.y>0?this.dollyIn:this.dollyOut;o.call(this),this.dollyStart.copy(this.dollyEnd);break;case F.PAN:this.panEnd.set(e.clientX,e.clientY),this.panDelta.subVectors(this.panEnd,this.panStart),this.pan(this.panDelta.x,this.panDelta.y),this.panStart.copy(this.panEnd)}this.emit(k["a"].Move,"mouse"),this.lastMoveTime=e.timeStamp,this.update()}}},{key:"onMouseUp",value:function(e){this.enabled&&(this.mouseDown=!1,this.state=F.NONE,"mouseover"!==e.type&&(e.timeStamp>this.lastMoveTime+100?(this.rotationSpeed.set(0,0),this.rotationAcceleration.set(0,0)):this.rotationAcceleration.set(-this.rotateDelta.x,this.rotateDelta.y),this.update(),this.rotationAcceleration.set(0,0),this.rotateDelta.set(0,0)))}},{key:"onMouseOver",value:function(e){0!==e.which&&0!==e.buttons||this.onMouseUp(e)}},{key:"onMouseWheel",value:function(e){if(this.enabled&&h["a"].useWheel){this.emit(k["a"].Move,"wheel");var t=e.wheelDelta||-e.detail,i=this.dollyIn;t>0&&(i=this.dollyOut),i.call(this),this.update()}}},{key:"onKeyDown",value:function(e){this.enabled&&(e.metaKey||e.ctrlKey||(e.preventDefault(),this.handleKeyDown(e.which)))}},{key:"navRotationAcc",value:function(e,t){"y"===e?this.noRotateUpDown?this.keyboardZoomSpeed=t:this.rotationAcceleration.y=t:this.rotationAcceleration.x=t}},{key:"navPanAcc",value:function(e,t){this.stopAutoPanning(),this.panAcceleration[e]=t}},{key:"handleKeyDown",value:function(e){var t=!0;switch(e){case _["a"].UPARROW:case _["a"].I:this.navRotationAcc("y",1);break;case _["a"].DOWNARROW:case _["a"].K:this.navRotationAcc("y",-1);break;case _["a"].LEFTARROW:case _["a"].J:this.navRotationAcc("x",-1);break;case _["a"].RIGHTARROW:case _["a"].L:this.navRotationAcc("x",1);break;case _["a"].W:this.navPanAcc("y",1);break;case _["a"].S:this.navPanAcc("y",-1);break;case _["a"].A:this.navPanAcc("x",-1);break;case _["a"].D:this.navPanAcc("x",1);break;default:t=!1}t&&this.emit(k["a"].Move,"key")}},{key:"onKeyUp",value:function(e){this.enabled&&(e.preventDefault(),e.stopPropagation(),this.handleKeyUp(e.which))}},{key:"handleKeyUp",value:function(e){switch(e){case _["a"].I:case _["a"].K:case _["a"].UPARROW:case _["a"].DOWNARROW:this.keyboardZoomSpeed=0,this.rotationAcceleration.y=0;break;case _["a"].J:case _["a"].L:case _["a"].LEFTARROW:case _["a"].RIGHTARROW:this.rotationAcceleration.x=0;break;case _["a"].S:case _["a"].W:this.panAcceleration.y=0;break;case _["a"].A:case _["a"].D:this.panAcceleration.x=0}}},{key:"onTouchStart",value:function(e){if(this.enabled||this.state===F.NONE){e.preventDefault(),e.stopPropagation(),this.stopAutoPanning();var t=function(){if(2===e.touches.length){var t=e.touches[0].pageX-e.touches[1].pageX,i=e.touches[0].pageY-e.touches[1].pageY;this.dollyStart.set(t,i)}}.bind(this),i=function(){this.panStart.set(R["a"].average(e.touches,"pageX"),R["a"].average(e.touches,"pageY"))}.bind(this),n=function(){if(this.noRotateUpDown){var t=new THREE.Vector2(e.touches[0].pageX,e.touches[0].pageY),i=new THREE.Vector2(e.touches[1].pageX,e.touches[1].pageY);this.rotateStartVec.subVectors(t,i),this.rotateStart=t,this.rotateCenter=H["a"].getPos2d(this.target).pos}else this.rotateStart.set(R["a"].average(e.touches,"pageX"),R["a"].average(e.touches,"pageY"))}.bind(this);switch(this.state=this.touchActions[e.touches.length],this.state){case F.PAN_DOLLY:t();case F.PAN:i();break;case F.ROTATE_DOLLY:t();case F.ROTATE:n()}this.rotationSpeed.set(0,0),this.emit(k["a"].InputStart,"touch")}}},{key:"onTouchMove",value:function(e){if(this.enabled&&this.state!==F.NONE){e.preventDefault(),e.stopPropagation();var t=function(){var t=e.touches[0].pageX-e.touches[1].pageX,i=e.touches[0].pageY-e.touches[1].pageY;this.dollyEnd.set(t,i);var n=this.dollyEnd.length()/this.dollyStart.length();return n>1?this.dollyIn(n):this.dollyOut(1/n),this.dollyStart.copy(this.dollyEnd),n}.bind(this),i=function(){this.panEnd.set(R["a"].average(e.touches,"pageX"),R["a"].average(e.touches,"pageY")),this.panDelta.subVectors(this.panEnd,this.panStart),this.pan(this.panDelta.x,this.panDelta.y),this.panStart.copy(this.panEnd),this.rotateDelta.set(0,0)}.bind(this),n=function(t,i){var n=new THREE.Vector2(e.touches[0].pageX,e.touches[0].pageY),o=n.clone().rotateAround(this.rotateCenter,i),a=o.clone().sub(this.rotateCenter).multiplyScalar(1/t),r=this.rotateCenter.clone().sub(this.rotateStart);this.panDelta.addVectors(a,r),this.pan(this.panDelta.x,this.panDelta.y),this.rotateStart=n}.bind(this),o=function(){if(this.noRotateUpDown){var t=new THREE.Vector2(e.touches[0].pageX,e.touches[0].pageY),i=new THREE.Vector2(e.touches[1].pageX,e.touches[1].pageY);this.rotateEndVec.subVectors(t,i);var n=T["a"].getVec2Angle(this.rotateStartVec,this.rotateEndVec),o=new THREE.Vector3(this.rotateEndVec.x,this.rotateEndVec.y,0),a=new THREE.Vector3(this.rotateStartVec.x,this.rotateStartVec.y,0);return o.clone().cross(a).z<0&&(n*=-1),this.rotateLeft(n),this.rotateStartVec.copy(this.rotateEndVec),n}this.rotateEnd.set(R["a"].average(e.touches,"pageX"),R["a"].average(e.touches,"pageY")),this.rotateDelta.subVectors(this.rotateEnd,this.rotateStart),this.rotateLeft(2*Math.PI*this.rotateDelta.x/app.player.domElement.clientWidth*this.rotateSpeed),this.rotateUp(2*Math.PI*this.rotateDelta.y/app.player.domElement.clientHeight*this.rotateSpeed),this.rotateStart.copy(this.rotateEnd)}.bind(this);switch(this.state){case F.PAN_DOLLY:t();case F.PAN:i();break;case F.ROTATE_DOLLY:var a=t(),r=o();n(a,r);break;case F.DOLLY:t();break;case F.ROTATE:o();break;default:this.state=F.NONE}this.lastMoveTime=e.timeStamp,this.emit(k["a"].Move,"touch")}}},{key:"onTouchEnd",value:function(e){this.enabled&&(this.state===F.ROTATE&&(e.timeStamp>this.lastMoveTime+100?(this.rotationSpeed.set(0,0),this.rotationAcceleration.set(0,0)):this.rotationAcceleration.set(-this.rotateDelta.x,this.rotateDelta.y)),this.state=F.NONE,this.update(),this.rotationAcceleration.set(0,0),this.rotateDelta.set(0,0))}},{key:"onPointerDown",value:function(e){this.enabled&&("touch"===e.pointerType&&(this.pointers.length<this.pointersLimit&&!this.pointers.find((function(t){return t.id==e.pointerId}))&&this.pointers.push({id:e.pointerId,pageX:e.pageX,pageY:e.pageY}),e.touches=this.pointers,this.onTouchStart(e)),this.emit(k["a"].InputStart,"pointer"))}},{key:"onPointerMove",value:function(e){this.enabled&&"touch"===e.pointerType&&(this.pointers.forEach((function(t){e.pointerId===t.id&&(t.pageX=e.pageX,t.pageY=e.pageY,t.pressed=e.pressed)})),e.touches=this.pointers,this.onTouchMove(e))}},{key:"onPointerUp",value:function(e){this.enabled&&"touch"===e.pointerType&&(console.log("onPointerUp "+e.pointerId),this.pointers=this.pointers.filter((function(t){return t.id!=e.pointerId})),e.touches=this.pointers,this.onTouchEnd(e))}},{key:"reset",value:function(){this.state=F.NONE,this.stopAutoPanning(),this.rotationSpeed.set(0,0),this.rotationAcceleration.set(0,0),this.panSpeed.set(0,0),this.panAcceleration.set(0,0)}},{key:"toJSON",value:function(){var e={camera_position:{x:T["a"].toPrecision(this.camera.position.x,4),y:T["a"].toPrecision(this.camera.position.y,4),z:T["a"].toPrecision(this.camera.position.z,4)},camera_quaternion:{x:T["a"].toPrecision(this.camera.quaternion.x,4),y:T["a"].toPrecision(this.camera.quaternion.y,4),z:T["a"].toPrecision(this.camera.quaternion.z,4),w:T["a"].toPrecision(this.camera.quaternion.w,4)}};return e}}]),i}(EventEmitter);function U(e){var t=W();return function(){var i,n=Object(l["a"])(e);if(t){var o=Object(l["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(s["a"])(this,i)}}function W(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var q=function(e){Object(r["a"])(i,e);var t=U(i);function i(e,o,a){var r;return Object(n["a"])(this,i),r=t.call(this,e,o,a),r.minPolarAngle=h["a"].dollhouseDefault.minPolarAngle,r.maxPolarAngle=h["a"].dollhouseDefault.maxPolarAngle,r.minDistance=h["a"].dollhouseDefault.minDistance,r.maxDistance=h["a"].dollhouseDefault.maxDistance,r.adjustedMinDistance=r.minDistance,r.adjustedMaxDistance=r.maxDistance,r.dom=o,r}return Object(o["a"])(i,[{key:"pan",value:function(e,t){this.camera.updateMatrix();var i=this.camera.position.clone().sub(this.target).length();i*=Math.tan(this.camera.fov/2*Math.PI/180),this.panLeft(2*e*i/app.player.domElement.clientWidth),this.panUp(-2*t*i/app.player.domElement.clientHeight)}},{key:"updateZoom",value:function(){var e=this.offset.length();return e*this.scale}},{key:"setZoomBounds",value:function(e){e.min.distanceTo(e.max);var t=e.min.distanceTo(e.max.clone().setY(e.min.y)),i=.5*(e.max.y-e.min.y)+.5*t;this.camera.suitModelAspect=t/i,this.distanceHorizon=t,this.distanceVerti=i,this.updateDistance(this.camera.aspect)}},{key:"updateDistance",value:function(e){var t=this.suitableDistance;if(app.model&&!isNaN(this.camera.suitModelAspect)){var i=app.model.boundingBox;if(e<=this.camera.suitModelAspect){var n=d["a"].getHFOVFromVFOV(this.camera.fov,e,1);this.suitableDistance=this.distanceHorizon/2/Math.tan(THREE.Math.degToRad(n/2)),this.suitableDistance+=.5*Math.min(i.max.x-i.min.x,i.max.z-i.min.z),console.log("w "+this.suitableDistance)}else this.suitableDistance=this.distanceVerti/2/Math.tan(THREE.Math.degToRad(this.camera.fov/2)),this.suitableDistance+=.5*Math.min(i.max.x-i.min.x,i.max.z-i.min.z),console.log("h "+this.suitableDistance);this.adjustedMaxDistance=1.2*this.suitableDistance,this.adjustedMinDistance=.5*this.suitableDistance,this.resetRanges(),this.enabled&&(this.scale=this.suitableDistance/t)}}},{key:"resetRanges",value:function(e,t){e?(this.minDistance=Math.min(e,this.minDistance),this.maxDistance=Math.max(e,this.maxDistance)):(this.minDistance=this.adjustedMinDistance,this.maxDistance=this.adjustedMaxDistance),t?(this.minPolarAngle=THREE.Math.degToRad(-15),this.maxPolarAngle=THREE.Math.degToRad(89.9)):(this.minPolarAngle=h["a"].dollhouseDefault.minPolarAngle,this.maxPolarAngle=h["a"].dollhouseDefault.maxPolarAngle)}},{key:"toJSON",value:function(){return B.prototype.toJSON.call(this)}}]),i}(B),G=i("d9c2");function Q(e){var t=Y();return function(){var i,n=Object(l["a"])(e);if(t){var o=Object(l["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(s["a"])(this,i)}}function Y(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var X=function(e){Object(r["a"])(i,e);var t=Q(i);function i(e,o,a){var r;return Object(n["a"])(this,i),r=t.call(this,e,o,a),r.minDistance=15,r.maxDistance=100,r.noRotateUpDown=!0,r.minPolarAngle=0,r.maxPolarAngle=0,r.mouseActions[x.LEFT]=F.PAN,r.mouseActions[x.MIDDLE]=F.DOLLY,r.mouseActions[x.RIGHT]=F.ROTATE,r.touchActions[1]=F.PAN,r.touchActions[2]=F.ROTATE_DOLLY,r.absoluteScale=1,r.currentScale=1,r.dom=o,r.plane=null,r.cadSize=null,r.floorTexture=null,r}return Object(o["a"])(i,[{key:"zoomToContain",value:function(e,t){var i=this.getDefaultAbsoluteScale(e,t);this.absoluteScale=i,this.currentScale=this.absoluteScale}},{key:"getDefaultAbsoluteScale",value:function(e,t){var i,n=app.store.getters["scene/metadata"]||{};if(n.floorPlanAngle||S["a"].floorPlanNoRotate){var o=0;n.floorPlanAngle?o=parseFloat(n.floorPlanAngle):S["a"].floorPlanNoRotate&&(o=0),e=e.clone().applyEuler(new THREE.Euler(0,o,0));var a=Math.max(Math.abs(e.x),Math.abs(e.z)*this.camera.aspect),r=Math.min($("#player").width(),$("#player").height()),s=800;t=void 0!=t?t:Math.max(1.2*r/s,1.2),i=a/2/h["a"].orthoBase*t}else{var l=Math.max(e.x,e.z),c=Math.min(e.x,e.z),u=(a=Math.max(l,c*this.camera.aspect),Math.max(c,l*this.camera.aspect));i=(G["a"].aspectRatio()<1?u:a)/2/h["a"].orthoBase*(void 0!=t?t:1.2)}return i}},{key:"rotateToView",value:function(e,t){var i=0,n=G["a"].aspectRatio()<1,o=e.x<e.z,a=app.store.getters["scene/metadata"]||{};i=a.floorPlanAngle?parseFloat(a.floorPlanAngle):n===o||S["a"].floorPlanNoRotate?0:Math.PI/2,this.rotateLeft(i),this.update(0)}},{key:"pan",value:function(e,t){this.camera.updateMatrix(),this.panLeft(e*(this.camera.right-this.camera.left)/app.player.domElement.clientWidth),this.panUp(-t*(this.camera.top-this.camera.bottom)/app.player.domElement.clientHeight)}},{key:"updateZoom",value:function(){this.absoluteScale*=this.scale-.03*this.keyboardZoomSpeed,this.absoluteScale=Math.max(h["a"].zoomNearLimit,Math.min(this.absoluteScale,h["a"].zoomFarLimit)),this.currentScale=.8*this.currentScale+.2*this.absoluteScale;var e=this.snapshotTopAspect?this.camera.aspect/this.snapshotTopAspect:1;return this.camera.left=-h["a"].orthoBase*this.currentScale*e,this.camera.right=h["a"].orthoBase*this.currentScale*e,this.camera.top=h["a"].orthoBase*this.currentScale*e/this.camera.aspect,this.camera.bottom=-h["a"].orthoBase*this.currentScale*e/this.camera.aspect,this.camera.updateProjectionMatrix(),this.offset.length()}},{key:"updateDirect",value:function(e){var t=e.width/this.camera.aspect;this.camera.left=-e.width/2,this.camera.right=e.width/2,this.camera.top=t/2,this.camera.bottom=-t/2,this.camera.updateProjectionMatrix();var i=app.store.getters["scene/metadata"]||{},n=parseFloat(i.floorPlanAngle||0);this.camera.rotation.set(-Math.PI/2,0,-n);var o=new THREE.Vector2(0,0),a=(new THREE.Vector2).copy(e.center).rotateAround(o,n);this.camera.position.setX(a.x),this.camera.position.setZ(a.y),this.dontUpdate=!0}},{key:"recoverToUpdate",value:function(){this.dontUpdate=!1;var e=new THREE.Vector3(0,0,-1).applyQuaternion(this.camera.quaternion);this.target=this.camera.position.clone().add(e);var t=app.store.getters["scene/metadata"]||{},i=parseFloat(t.floorPlanAngle||0);this.thetaDelta=-i,this.absoluteScale=this.currentScale=this.camera.right/h["a"].orthoBase,this.update(1)}},{key:"toJSON",value:function(){var e=new THREE.Quaternion,t=(new THREE.Quaternion).setFromAxisAngle(new THREE.Vector3(0,1,0),THREE.Math.degToRad(90)),i=new THREE.Quaternion,n=function(){var n=B.prototype.toJSON.call(this);return e.copy(n.camera_quaternion),i.copy(t),i.multiply(e),n.camera_quaternion.x=math.toPrecision(i.x,4),n.camera_quaternion.y=math.toPrecision(i.y,4),n.camera_quaternion.z=math.toPrecision(i.z,4),n.camera_quaternion.w=math.toPrecision(i.w,4),n.ortho_zoom=math.toPrecision(this.currentScale*this.camera.aspect,4),n};return n}}]),i}(B),Z=i("e9e5");function J(e){var t=K();return function(){var i,n=Object(l["a"])(e);if(t){var o=Object(l["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(s["a"])(this,i)}}function K(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var ee=function(e){Object(r["a"])(i,e);var t=J(i);function i(){var e,o=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Object(n["a"])(this,i),e=t.call(this),e.activeControl=null,e.controls={},e.cameras={},o&&(e.cameraControls=Object(a["a"])(e)),e.pointerUpBinds=[],e}return Object(o["a"])(i,[{key:"init",value:function(e){this.setUpControls(e),this.bindEvents(e)}},{key:"activateControls",value:function(e){this.activeControl&&(this.activeControl.reset(),this.activeControl.enabled=!1),this.controls[e]&&(this.controls[e].enabled=!0),this.activeControl=this.controls[e]}},{key:"setUpControls",value:function(e,t){var i={},n={},o="miniView"==t||"spotPlayer"==t?[c["a"].PANORAMA]:[c["a"].PANORAMA,c["a"].DOLLHOUSE,c["a"].FLOORPLAN],a=[m,y,E],r=[I,q,X];o.forEach(function(t,o){i[t]=new a[o],n[t]=new r[o](i[t],e,this.player),n[t].on(k["a"].Move,this.emit.bind(this,k["a"].Move)),n[t].on(k["a"].InputStart,this.emit.bind(this,k["a"].InputStart)),n[t].on(k["a"].InteractionDirect,this.emit.bind(this,k["a"].InteractionDirect)),n[t].on(k["a"].InteractionKey,this.emit.bind(this,k["a"].InteractionKey)),n[t].on(k["a"].Pinch,this.emit.bind(this,k["a"].Pinch)),n[t].on(k["a"].Scroll,this.emit.bind(this,k["a"].Scroll))}.bind(this)),this.controls=n,this.cameras=i}},{key:"bindEvents",value:function(e){var t=this;e.addEventListener("mousemove",this.onMouseMove.bind(this)),e.addEventListener("mousedown",this.onMouseDown.bind(this)),e.addEventListener("mouseup",this.onMouseUp.bind(this)),e.addEventListener("mouseover",this.onMouseOver.bind(this)),h["a"].useWheel&&(e.addEventListener("mousewheel",this.onMouseWheel.bind(this)),e.addEventListener("DOMMouseScroll",this.onMouseWheel.bind(this))),e.addEventListener("touchstart",this.onTouchStart.bind(this)),e.addEventListener("touchmove",this.onTouchMove.bind(this)),e.addEventListener("touchend",this.onTouchEnd.bind(this)),e.addEventListener("contextmenu",(function(e){e.preventDefault()})),e.addEventListener("pointerdown",this.onPointerDown.bind(this)),e.addEventListener("pointermove",this.onPointerMove.bind(this)),e.addEventListener("pointerup",this.onPointerUp.bind(this)),e.addEventListener("pointerout",this.onPointerCancel.bind(this)),e.addEventListener("pointercancel",this.onPointerCancel.bind(this)),document.addEventListener("keydown",this.onKeyDown.bind(this)),document.addEventListener("keyup",this.onKeyUp.bind(this)),this.modelManager&&this.modelManager.on(Z["a"].ActiveModelChanged,function(e){this.setModelForControls(e.model)}.bind(this)),this.on("floorplanControl",(function(e){t.controls.floorplan.updateDirect(e)}))}},{key:"setModelForControls",value:function(e){this.controls[c["a"].DOLLHOUSE].setZoomBounds(e.boundingBox);var t=e.boundingBox.clone().expandByScalar(h["a"].modelBoundsPadding);[c["a"].DOLLHOUSE,c["a"].FLOORPLAN].forEach(function(e){this.controls[e].setBounds(t)}.bind(this))}},{key:"onMouseDown",value:function(e){__api.screen.switchFollow(),e.preventDefault(),this.activeControl&&this.activeControl.onMouseDown(e),this.emit("vr_freedom",this)}},{key:"onMouseMove",value:function(e){e.preventDefault(),this.activeControl&&this.activeControl.onMouseMove(e)}},{key:"onMouseUp",value:function(e){e.preventDefault(),this.activeControl&&this.activeControl.onMouseUp(e)}},{key:"onMouseOver",value:function(e){e.preventDefault(),this.activeControl&&this.activeControl.onMouseOver(e)}},{key:"onMouseWheel",value:function(e){__api.screen.switchFollow(),e.preventDefault(),this.activeControl&&this.activeControl.onMouseWheel(e),this.emit("vr_freedom",this)}},{key:"onTouchStart",value:function(e){__api.screen.switchFollow(),e.preventDefault(),this.activeControl&&this.activeControl.onTouchStart(e),this.emit("vr_freedom",this)}},{key:"onTouchMove",value:function(e){e.preventDefault(),this.activeControl&&this.activeControl.onTouchMove(e)}},{key:"onTouchEnd",value:function(e){e.preventDefault(),this.activeControl&&this.activeControl.onTouchEnd(e)}},{key:"onPointerDown",value:function(e){if(__api.screen.switchFollow(),e.preventDefault(),this.activeControl)switch(e.pointerType){case"mouse":this.activeControl.onMouseDown(e);break;default:this.activeControl.onPointerDown(e)}this.emit("vr_freedom",this)}},{key:"onPointerMove",value:function(e){if(e.preventDefault(),this.activeControl)switch(e.pointerType){case"mouse":this.activeControl.onMouseMove(e);break;default:this.activeControl.onPointerMove(e)}}},{key:"onPointerUp",value:function(e){if(e.preventDefault(),this.activeControl){switch(e.pointerType){case"mouse":this.activeControl.onMouseUp(e);break;default:this.activeControl.onPointerUp(e)}this.pointerUpBinds.forEach((function(e){e()}))}}},{key:"onPointerCancel",value:function(e){e.preventDefault(),this.activeControl&&"mouse"!==e.pointerType&&this.activeControl.onPointerUp(e)}},{key:"onKeyDown",value:function(e){if(e.metaKey||e.ctrlKey);else{if(S["a"].isTyping||S["a"].isDisableControl)return;e.preventDefault(),this.activeControl&&this.activeControl.onKeyDown(e)}}},{key:"onKeyUp",value:function(e){e.preventDefault(),this.activeControl&&this.activeControl.onKeyUp(e)}}]),i}(C["default"]);new ee(!0)},9923:function(e,t,i){"use strict";i.d(t,"a",(function(){return f}));var n=i("2b0e"),o=i("a925"),a=i("1ded"),r=i.n(a),s=i("e13f"),l=i.n(s),c=i("fda0"),u=i.n(c),d=i("f121"),h=i("617a");n["default"].use(o["a"]);var p=h["a"].urlQueryValue("lang");p||(p=window.navigator.language||window.navigator.userLanguage||null,p&&!/^zh/.test(p)?(console.log("自动获取浏览器语言:"+p),p="en"):p="zh");var f=new o["a"]({locale:p,messages:{zh:r.a,en:l.a,fr:u.a},fallbackLocale:"zh"});d["a"].lang=p},"9af0":function(e,t,i){"use strict";var n=i("4a7a"),o=i("80c5"),a=i("b235"),r=i("9ef6"),s={currentBlur:0,aspect:r["a"].aspect,blurStrength:1,hblurPass:r["a"].HorizontalBlurShader,vblurPass:r["a"].VerticalBlurShader,bindEvents:function(e){e.on(n["a"].ModeChanged,(function(e,t){e===o["a"].PANORAMA&&(a["a"].cancel(s.blur),a["a"].cancel(s.addBlur),a["a"].start(s.removeBlur,500,null,0,null,"deblur"))}))},blur:function(e){s.currentBlur=e;var t=e*s.blurStrength;r["a"].VerticalBlurShader.uniforms.v.value=t/512*s.aspect,r["a"].HorizontalBlurShader.uniforms.h.value=t/512},addBlur:function(e){e=Math.max(e,s.currentBlur),s.blur(e)},removeBlur:function(e){e=Math.min(1-e,s.currentBlur),s.blur(e)}};s.blur(0),s.vblurPass.renderToScreen=!0,t["a"]=s},"9b24":function(e,t,i){"use strict";i.d(t,"a",(function(){return N}));i("6b54"),i("2397"),i("7514"),i("6762"),i("2fdb"),i("ac6a"),i("b54a"),i("7f7f"),i("673e");var n=i("d4ec"),o=i("bee2"),a=i("257e"),r=i("262e"),s=i("99de"),l=i("7e84"),c=i("ade3"),u=(i("823b"),i("2d47")),d=i("1158"),h=i("b235"),p=i("80c5"),f=i("0c20"),m=i("aeb9"),v=i("076a"),g=i("ec11"),y=i("8eb6"),b=i("f121"),w=i("6860"),E=i("9ef6"),T=i("3f1a"),P=i("430c"),x=i("1787"),k=i("cd18"),R=i("cbe8"),_=i("4c16"),S=i("9923");function M(e){this.updatePoints(e.points),this.state=e.state||"active",this.elem=$('<div class="ruler wallLine" data-name=""><div class="ruler-label"><div class="ruler-label-point"></div><span class="ruler-label-name">约0.5米</span></div></div>'),$("#hotspot .rulers").append(this.elem),this.text=S["a"].t("common.meter",{meter:this.length}),this.elem.find(".ruler-label-name").html(this.text)}M.prototype.remove=function(){this.elem.remove()},M.prototype.updatePoints=function(e){this.point=e[0].clone().add(e[1]).multiplyScalar(.5),this.length=Math.round(100*e[0].distanceTo(e[1]))/100,this.text="约"+this.length+"米"},M.prototype.update=function(){if("panorama"==w["objects"].player.mode&&"active"==this.state){var e=_["a"].getPos2d(this.point);e.trueSide&&e.inSight?(this.elem.css("display",""),this.elem.find(".ruler-label").css({left:e.pos.x+"px",top:e.pos.y+"px"})):this.elem.css("display","none")}else this.elem.css("display","none")};var A=M,O=k["a"].getBlobSrc(R["a"].Circle,!0),C=function(e){this.tag=e.tag,this.model=e.model,this.type=e.type,"addTag"==this.type&&(e.tag.snapInfo.nodeStart||(e.tag.snapInfo.nodeStart=e.model.panos.index[e.tag.snapInfo.panoId].position),this.fartherEnd=this.findfartherEnd(e.tag.snapInfo.nodeStart,e.tag.snapInfo.nodeEnd),this.rayLine=P["a"].createLine([e.tag.snapInfo.nodeStart,this.fartherEnd],{width:3,deshed:!0}),this.rayLine.layers.set(m["a"].TAG),this.getCameraNearPos(),this.tag.obj3d.parent.add(this.rayLine)),this.groundPoint=e.groundPoint||this.findGroundPoint(e.tag.position.clone(),e.type,e.markerPos),this.stemLine=P["a"].createLine([e.stemLineLen?this.groundPoint.clone().add(new THREE.Vector3(0,e.stemLineLen,0)):e.tag.position,this.groundPoint],{width:2,color:e.stemLineColor||"#eee"}),this.stemLine.name="markGroup-stemLine";var t=THREE.UniformsUtils.clone(y["a"].waypoint.uniforms);t.map.value=x["default"].load(O),t.opacity.value=.6,t.color.value.set(e.color||f["a"].lightGreen);var i=new THREE.RawShaderMaterial({side:THREE.DoubleSide,vertexShader:y["a"].waypoint.vertexShader,fragmentShader:y["a"].waypoint.fragmentShader,uniforms:t,name:"shadow",transparent:!0,depthTest:!1});e.addHeightLabel&&(this.heightLabel=new A({points:[e.tag.position,this.groundPoint]}));var n=e.size||1;"flagSpot"!=this.type&&(this.shadow=new THREE.Mesh(new THREE.PlaneGeometry(n,n,1,1),i),this.shadow.position.copy(this.groundPoint),this.shadow.lookAt(this.groundPoint.clone().add(new THREE.Vector3(0,1,0))),this.shadow.renderOrder=8,this.shadow.name="markTagShdow",this.shadow.layers.set(m["a"].TAG),this.tag.obj3d.parent.add(this.shadow)),this.stemLine.layers.set(m["a"].TAG),this.stemLine2&&this.stemLine2.layers.set(m["a"].TAG),this.tag.obj3d.parent.add(this.stemLine),this.stemLine2&&this.tag.obj3d.parent.add(this.stemLine2)};C.prototype.findfartherEnd=function(e,t){var i=800,n=e.distanceTo(t),o=e.clone().sub(t);return e.clone().sub(o.multiplyScalar(i/n))},C.prototype.findGroundPoint=function(e,t,i){if("flagSpot"==t){var n=this.tag.floor;if(e.y>=n.boundingBox.min.y&&e.y<=n.boundingBox.max.y){var o=new THREE.Raycaster;o.set(e,new THREE.Vector3(0,-1,0));var a=o.intersectObjects(n.collider.children);return a.length>0?a[0].point:i}return i}return this.groundPoint?e.clone().setY(this.groundPoint.y):e.clone().setY(this.tag.floor.boundingBox.min.y)},C.prototype.getCameraNearPos=function(e){this.cameraNear=.12;var t=this.tag.snapInfo.nodeStart,i=this.tag.position;this.nearPos=i.clone().sub(t).normalize().multiplyScalar(this.cameraNear).add(t);var n=i.distanceTo(t);n<this.cameraNear&&this.tag.rePos(this.nearPos)},C.prototype.moveTagPos=function(e,t){if(0!=e){var i=this.tag.position,n=new THREE.Vector3,o=this.tag.snapInfo.nodeStart,a=this.tag.snapInfo.nodeEnd,r=a.distanceTo(o);i.distanceTo(o)<=this.cameraNear&&e<0||(["x","y","z"].forEach(function(t){e<0?(n[t]=-(a[t]-o[t])*Math.abs(e)/r+i[t],r<this.cameraNear?(o[t]-this.nearPos[t])*(this.nearPos[t]-n[t])<0&&(n[t]=this.nearPos[t]):(this.nearPos[t]-a[t])*(this.nearPos[t]-n[t])<0&&(n[t]=this.nearPos[t])):n[t]=(a[t]-o[t])*Math.abs(e)/r+i[t]}.bind(this)),this.tag.rePos(n),this.groundPoint=this.findGroundPoint(n),P["a"].moveLine(this.stemLine,[n,this.groundPoint]),this.shadow.position.copy(this.groundPoint),t&&t(n))}},C.prototype.changeHeight=function(e,t){console.log(this.tag.snapInfo.normal),0!=e&&(this.height+=e,this.height=Math.max(0,this.height),this.moveTag(this.tag.snapInfo),console.log(this.tag.snapInfo.normal))},C.prototype.dragShadow=function(e,t){this.tag.snapInfo.nodeEnd.copy(e),this.tag.snapInfo.normal.copy(t),this.moveTag(this.tag.snapInfo),this.shadow.position.copy(this.tag.snapInfo.nodeEnd),this.shadow.lookAt(this.tag.position)},C.prototype.moveTag=function(e){this.tag.rePos(e.nodeEnd.clone().add(e.normal.clone().multiplyScalar(this.height))),P["a"].moveLine(this.stemLine,[e.nodeEnd,this.tag.position])},C.prototype.remove=function(){this.shadow&&(this.shadow.geometry.dispose(),this.shadow.material.dispose(),this.shadow.parent.remove(this.shadow)),this.stemLine.geometry.dispose(),this.stemLine.material.dispose(),this.stemLine.parent.remove(this.stemLine),this.rayLine&&(this.rayLine.geometry.dispose(),this.rayLine.material.dispose(),this.rayLine.parent.remove(this.rayLine)),this.heightLabel&&this.heightLabel.remove()},C.prototype.hide=function(){this.shadow&&(this.shadow.visible=!1),this.stemLine.visible=!1,this.rayLine&&(this.rayLine.visible=!1)},C.prototype.show=function(){this.shadow&&(this.shadow.visible=!0),this.stemLine.visible=!0,this.rayLine&&(this.rayLine.visible=!0)},C.prototype.rePosAtSphere=function(e,t){if("changeBack"==t)P["a"].moveLine(this.stemLine,[this.tag.origin,this.groundPoint]);else{var i=convertTool.getPosAtSphere(this.groundPoint,e);P["a"].moveLine(this.stemLine,[this.tag.position,i])}};var D=C,V=i("bc19"),I=i("dbd3"),j=i("0bc0");function L(e){var t=F();return function(){var i,n=Object(l["a"])(e);if(t){var o=Object(l["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(s["a"])(this,i)}}function F(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var H=i("1787").default,z=b["a"].isMobile?new THREE.PlaneBufferGeometry(1.4,1.4):new THREE.PlaneBufferGeometry(1,1),N=function(e){Object(r["a"])(i,e);var t=L(i);function i(e,o,r){var s;return Object(n["a"])(this,i),s=t.call(this),Object(c["a"])(Object(a["a"])(s),"bindEvents",(function(){this.billboard.on(j["a"].ENTER,w["objects"].tagManager.setHoverState.bind(w["objects"].tagManager)),this.billboard.on(j["a"].LEAVE,w["objects"].tagManager.setFreeState.bind(w["objects"].tagManager))})),Object(c["a"])(Object(a["a"])(s),"closestPanoTowardTag",(function(e,t,i,n){var o=[],a=[],r=this,s=this.disc.getWorldPosition();if(e===p["a"].PANORAMA){var l=t.position.clone().sub(s).normalize();a.push(g["a"].scoreFunctions.direction(s,l))}o.push((function(e){return r.visiblePanos.indexOf(e.id)>-1}));var c=new THREE.Vector3,u=function(e){c.copy(s).sub(e.position);var t=THREE.Math.radToDeg(Math.atan(c.y/Math.sqrt(c.x*c.x+c.z*c.z)));if(w["objects"].record.control.isRecording)return-46<t&&t<50;var i=E["a"].tags.navigate.tiltTolerance,n=w["objects"].player.cameraControls.cameras.panorama.fov,o=(70-n)/5,a=w["objects"].player.cameraControls.controls.panorama.insideLookLimitDown||E["a"].insideLookLimitDown;return a-i+o+(b["a"].isMobile?b["a"].isEdit?5:2:0)<t&&t<E["a"].insideLookLimitUp+i-o},d=function(e){return Math.abs(e.position.x-s.x)>E["a"].tags.visibility.cameraClearance||Math.abs(e.position.z-s.z)>E["a"].tags.visibility.cameraClearance};o.push(d,u);var h={point:s,currPano:t,require:o,rank:a,force:"force"==i,getAll:n};return w["objects"].player.model.panos.closestPanoTowardPoint(h)})),Object(c["a"])(Object(a["a"])(s),"update",function(e,t){new THREE.Vector3;return function(e,t){!this.disc||"mark"==this.state&&T["default"].enterSplitView&&!this.isMeasurePoint||(this.discWorldPosition=this.disc.getWorldPosition(new THREE.Vector3),this.updateDisc(e,t),"reserve"==b["a"].name&&this.billboard&&this.billboard.needsUpdate()&&this.billboard.update(t))}}()),Object(c["a"])(Object(a["a"])(s),"updateDisc",function(){return function(e,t){var n=E["a"].tags.visibility,o=E["a"].tags.disc.scale,a=e===p["a"].DOLLHOUSE||e===p["a"].FLOORPLAN?E["a"].tags.visibility.visibleDistance:t.position.distanceTo(this.discWorldPosition);if(this.obj3d.visible=0!==this.disc.material.opacity&&(n.anyDistance||a<=n.visibleDistance||e===p["a"].TRANSITIONING)&&(!n.hideViaFloor||this.tagVisibleOnCurrentFloor(e))&&(!n.hideOffScreenDisc||!this.offScreen(this.disc,t))&&(!n.hideOffScreenObject||!this.offScreen(this.obj3d,t)),this.obj3d.visible&&this.disc.visible){this.disc.quaternion.copy(t.quaternion);var r=V["a"].getScaleForConstantSize({maxSize:o.maxSize,minSize:"videoPanoFlag"==this.state&&e!=p["a"].PANORAMA?30:o.minSize,nearBound:o.nearBound,farBound:o.farBound,camera:t,position:this.discWorldPosition}),s=1+E["a"].tags.disc.scale.responsiveness/100*(i.viewportScale()-1);this.discScale=r*s;try{w["objects"].player.linkEditor.setTagVisible?this.discScale*=b["a"].isMobile?2:1.5:this.isMeasurePoint&&(this.discScale*=.9)}catch(e){}this.disc.scale.set(this.discScale,this.discScale,this.discScale),this.animated&&(this.animTime+=.016,this.disc.material.uniforms["uTime"].value=this.animTime)}}}()),Object(c["a"])(Object(a["a"])(s),"getDiscRadius",function(){var e=new THREE.Vector3;return function(t,i){return e.set(-this.discScale/2,0,0).applyQuaternion(i.quaternion).add(this.discWorldPosition).project(i),Math.abs(t.x-e.x)*$("#player").width()}}()),Object(c["a"])(Object(a["a"])(s),"updateVideoFlagVisible",(function(){this.obj3d.visible&&"dollhouse"==w["objects"].player.mode&&(_["a"].ifShelter(this.position,null,w["objects"].model.allFloorsVisible?null:w["objects"].model.currentFloor.floorIndex)?this.videoPano.marker.visible=!1:this.videoPano.marker.visible=!!this.videoPano.marker.visibleOri)})),s.model=e,s.sid=o,s.floor=null,s.floors=[],s.position=(new THREE.Vector3).copy(r.position),s.content={},s.initContent(r),s.snapInfo=r.snapInfo,s.style=r.style||"default",s.color=(new THREE.Color).setRGB(0,.7843137254901961,.6862745098039216),r.color&&s.color.setStyle(r.color),s.styleImageURL=r.styleImageURL,s.hoverColor=f["a"]._darken(s.content.color,.2),s.animTime=0,s.animated=!1,s.openning=0,s.openTransition=null,s.mode=p["a"].PANORAMA,s.obj3d=null,s.disc=null,s.discWorldPosition=null,s.discScale=.06,s.floorIndex=r.floorIndex,s.visibleTransition=null,s.hoveringDisc=!1,s.state=r.state,"mark"!=s.state&&"videoPanoFlag"!=s.state?(s.setVisiblePanos(r.visiblePanos),"reserve"==b["a"].name&&(s.billboard=new I["a"](null,null,null,null,Object(a["a"])(s)),s.bindEvents(),s.billboard.bindEvents())):"videoPanoFlag"==s.state&&(s.videoPano=r.pano),s.build(),s}return Object(o["a"])(i,[{key:"initContent",value:function(e){this.content.description=e.description,this.content.label=e.label,this.content.link=e.link,this.content.outLink=e.outLink,this.content.color=(new THREE.Color).set(e.color||f["a"].tagDefault),this.content.fileName=e.fileName||{},this.content.fileSrc=e.fileSrc||{},this.content.media=e.media||[]}},{key:"dealMedia",value:function(e,t){}},{key:"getFloors",value:function(){var e=this;this.floors=[],this.visiblePanos&&this.visiblePanos.forEach((function(t){e.model.panos.index[t]&&(e.floors.includes(e.model.panos.index[t].floor)||e.floors.push(e.model.panos.index[t].floor))})),this.floor&&!this.floors.includes(this.floor)&&this.floors.push(this.floor)}},{key:"raycastToFindFloor",value:function(){var e=this.floor;return this.floor=_["a"].raycastToFindFloor(this.position),this.floor||(this.floor=this.model.floors.first()),this.obj3d&&this.floor!=e&&(this.obj3d.parent&&this.obj3d.parent.remove(this.obj3d),this.floor.add(this.obj3d)),this.floor}},{key:"rePos",value:function(e){this.position.copy(e),this.obj3d.position.copy(e)}},{key:"remove",value:function(){this.obj3d&&this.obj3d.remove(this.disc),this.floor&&this.floor.remove(this.obj3d),this.markGroup&&this.markGroup.remove()}},{key:"cloneMediaData",value:function(e){var t={};for(var i in e)t[i]="outLink"==i?e[i]:{file:e[i].file,media:e[i].media,src:e[i].src,needSave:e[i].needSave};return t}},{key:"getTempData",value:function(){var e=this,t=w["store"].getters["hotspot/tags"].find((function(t){return t.sid==e.sid})),i={sid:this.sid,position:this.position.clone(),label:this.content.label,description:this.content.description,outLink:this.content.outLink,style:t?t.style:this.style,styleImageURL:t?t.styleImageURL:this.styleImageURL,color:t?t.color:"#05c8ae",media:this.content.media,fileSrc:k["a"].CloneObject(this.content.fileSrc),fileName:k["a"].CloneObject(this.content.fileName),visiblePanos:this.getVisiPanoData()};return this.content.snapInfo||(i.posGets=this.posGets),i}},{key:"recoverFromTemp",value:function(e,t){"builded"!=t&&w["objects"].tagManager.addTag(this),this.visiblePanos=e.visiblePanos}},{key:"shineSpot",value:function(e){if("end"==e)return h["a"].cancelById(E["a"].freeze.spotShine+this.sid),void(this.disc.material.uniforms.opacity.value=1);w["objects"].tagManager.tags[this.sid]&&h["a"].start(u["a"].uniform(this.disc,"opacity",1==this.disc.material.uniforms.opacity.value?.4:1,(function(e){})),700,this.shineSpot.bind(this),0,d["a"][E["a"].transition.blendEasing],"wallLineShine",E["a"].freeze.spotShine+this.sid)}},{key:"getVisiblePanos",value:function(){var e=w["objects"].player.model.chunks[0].visible;w["objects"].player.model.chunks.forEach((function(e){e.visible=!0}));var t=_["a"].getVisiblePano(this.position,{tolerance:.0375});return e||w["objects"].player.model.chunks.forEach((function(e){e.visible=!1})),t}},{key:"setVisiblePanos",value:function(e){if(this.visiblePanos=[],e)if("string"==typeof e[0])this.visiblePanos=e;else for(var t=0;t<e.length;t++){var i=this.model.panos.list[e[t]];i?this.visiblePanos.push(i.id):console.log("visiblePanos 无此id")}else this.visiblePanos=this.getVisiblePanos(),0==this.visiblePanos.length&&this.visiblePanos.push(w["objects"].player.currentPano.id);this.getFloors()}},{key:"getVisiPanoData",value:function(){return this.visiblePanos}},{key:"setElemType",value:function(e,t){"videoMarker"!=this.style&&(this.style=e,this.styleImageURL=t,this.animated=!0,this.animScale=!(("shop"==b["a"].name||"grave"==b["a"].name)&&"default"==this.style),"default"==e||null==e?this.disc.material=this.defaultStyleMaterial:"custom"==e?(this.customStyleMaterial.uniforms["map"].value=H.load(t),this.disc.material=this.customStyleMaterial):console.error("TagStyleTex已被删除"))}},{key:"setDiscColor",value:function(e){"default"==this.style&&this.disc.material.uniforms.uColor&&this.disc.material.uniforms.uColor.value.setStyle(e)}},{key:"createMarkGroup",value:function(e){var t=$.extend({tag:this,model:this.model},e);return this.markGroup=new D(t),this.markGroup}},{key:"build",value:function(){return"videoPanoFlag"==this.state?this.floor=this.videoPano.floor:this.floor=this.model.floors.get(this.floorIndex)||this.raycastToFindFloor(),this.floorIndex=this.floor.floorIndex,this.floor&&(this.obj3d=this.buildObject3D(),this.floor.add(this.obj3d)),this.getFloors(),this}},{key:"buildObject3D",value:function(){var e=new THREE.Object3D;return e.position.copy(this.position),"shop"==b["a"].name||"grave"==b["a"].name?(this.defaultStyleMaterial=new THREE.RawShaderMaterial({transparent:!0,vertexShader:y["a"].tagDiscDefault2.vertexShader,fragmentShader:y["a"].tagDiscDefault2.fragmentShader,uniforms:THREE.UniformsUtils.clone(y["a"].tagDiscDefault2.uniforms),depthTest:!1}),this.customStyleMaterial=new THREE.RawShaderMaterial({transparent:!0,vertexShader:y["a"].tagDiscCustom.vertexShader,fragmentShader:y["a"].tagDiscCustom.fragmentShader,uniforms:THREE.UniformsUtils.clone(y["a"].tagDiscCustom.uniforms),depthTest:!1})):(this.defaultStyleMaterial=new THREE.RawShaderMaterial({transparent:!0,vertexShader:y["a"].tagDiscDefault.vertexShader,fragmentShader:y["a"].tagDiscDefault.fragmentShader,uniforms:THREE.UniformsUtils.clone(y["a"].tagDiscDefault.uniforms),depthTest:!1}),this.defaultStyleMaterial.uniforms.uColor.value.copy(this.color),this.customStyleMaterial=new THREE.RawShaderMaterial({transparent:!0,vertexShader:y["a"].tagDiscCustom.vertexShader,fragmentShader:y["a"].tagDiscCustom.fragmentShader,uniforms:THREE.UniformsUtils.clone(y["a"].tagDiscCustom.uniforms),depthTest:!1})),this.animated=!0,"default"==this.style?"reserve"==b["a"].name?(this.animated=!1,this.disc=new THREE.Mesh(z,this.customStyleMaterial)):this.disc=new THREE.Mesh(z,this.defaultStyleMaterial):"custom"==this.style?(this.customStyleMaterial.uniforms["map"].value=H.load(this.styleImageURL),this.disc=new THREE.Mesh(z,this.customStyleMaterial)):"videoMarker"==this.style?(this.customStyleMaterial.uniforms["map"].value=null,this.disc=new THREE.Mesh(z,new THREE.RawShaderMaterial({transparent:!0,vertexShader:y["a"].tagVideoMarker.vertexShader,fragmentShader:y["a"].tagVideoMarker.fragmentShader,uniforms:THREE.UniformsUtils.clone(y["a"].tagDiscCustom.uniforms),depthTest:!1}))):(this.customStyleMaterial.uniforms["map"].value=b["a"].TagStyleTex[this.style],this.disc=new THREE.Mesh(z,this.customStyleMaterial)),this.disc.layers.set(m["a"].TAG),this.disc.renderOrder=v["a"].tagDisc,this.disc.tag=this,this.disc.name="disc",e.add(this.disc),e.name="tagGroup","mark"==this.state&&T["default"].enterSplitView&&(e.visible=!1),e}},{key:"hide",value:function(e,t){var i=$.Deferred();if(0===this.disc.material.uniforms.opacity.value&&!h["a"].isRunning(this.visibleTransition))return i.resolve().promise();e=e||0,t=t||0,h["a"].cancel(this.visibleTransition),this.markGroup&&this.markGroup.hide();var n=this.disc.material.uniforms.opacity.value/E["a"].tags.disc.opacity,o=t+e,a=t/o;return this.visibleTransition=h["a"].start(function(e){var t=u["a"].property(e.disc.material.uniforms.opacity,"value",0);return function(e){t(e)}}(this),o*n,(function(){i.resolve()}),a,d["a"][E["a"].warp.blendEasing]),i.promise()}},{key:"show",value:function(e,t){var i=$.Deferred();if(this.disc.material.uniforms.opacity.value===E["a"].tags.disc.opacity&&!h["a"].isRunning(this.visibleTransition))return i.resolve().promise();e=e||0,t=t||0,h["a"].cancel(this.visibleTransition),this.markGroup&&this.markGroup.show();var n=(E["a"].tags.disc.opacity-this.disc.material.uniforms.opacity.value)/E["a"].tags.disc.opacity,o=t+e,a=t/o;return this.visibleTransition=h["a"].start(function(e){var t=u["a"].property(e.disc.material.uniforms.opacity,"value",E["a"].tags.disc.opacity);return function(e){t(e)}}(this),o*n,(function(){i.resolve()}),a,d["a"][E["a"].warp.blendEasing]),i.promise()}},{key:"openDisc",value:function(e,t){var i=$.Deferred();return 1!==this.disc.material.uniforms.openning.value||h["a"].isRunning(this.openTransition)||i.resolve().promise(),"default"!=this.style&&"custom"!=this.style?i.resolve().promise():(e=e||0,t=t||200,h["a"].cancel(this.openTransition),this.openTransition=h["a"].start(u["a"].uniform(this.disc,"openning",1),t,(function(){i.resolve()})),i.promise())}},{key:"closeDisc",value:function(e,t){var i=$.Deferred();return 1!==this.disc.material.uniforms.openning.value||h["a"].isRunning(this.openTransition)||i.resolve().promise(),"default"!=this.style&&"custom"!=this.style?i.resolve().promise():(e=e||0,t=t||200,h["a"].cancel(this.openTransition),this.openTransition=h["a"].start(u["a"].uniform(this.disc,"openning",0),t,(function(){i.resolve()})),i.promise())}},{key:"getAngle",value:function(e,t){var i=e.camera.quaternion.clone(),n=(new THREE.Matrix4).lookAt(e.currentPano.position,t,new THREE.Vector3(0,1,0)),o=(new THREE.Quaternion).setFromRotationMatrix(n),a=new THREE.Vector3(0,0,-1).clone().applyQuaternion(i),r=new THREE.Vector3(0,0,-1).clone().applyQuaternion(o),s=a.angleTo(r);return s/Math.PI*180}},{key:"examine",value:function(e,t,i){var n="reserve"==b["a"].name?this.billboard:w["objects"].tagManager.billboard;if(!e.flying||e.waitFlytoItemFuc){var o=e.mode,a=E["a"].tags.navigate.nearestPano&&this.closestPanoTowardTag(o,e.currentPano,t)||e.currentPano,r=this.disc.getWorldPosition();n.setActiveState(),this.examing=!0,e.flyingToTag=!0;var s=function(){if(e.flyingToTag=!1,e.waitFlytoItemFuc){var t=e.waitFlytoItemFuc;e.waitFlytoItemFuc=null,t()}w["objects"].tagManager.navigatingViaTag=!1}.bind(this),l=function(){this.examing=!1,n.examTimes=0,!i||window.cancelReExam?s():i((function(){s()})),window.cancelReExam=!1}.bind(this),c=function(t){if(window.cancelReExam||e.mode!=p["a"].PANORAMA)l();else{if(!this.disc.visible)return w["objects"].tagManager.dismissActiveTag(),void l();var i=function(){var i=n.getCenterPos();e.flyToPano({pano:a,lookAtPoint:i,examTag:this,constantMoveSpeed:"constant"==t,cancelLookFun:l},function(){if(b["a"].isMobile||w["objects"].record.control.isRecording||w["objects"].play.control.isPlaying)l();else if(window.cancelReExam||w["objects"].tagManager.activeTag!=this)l();else{var t=n.getDimensions();if(0==t.height&&0==t.width)l();else if(n.ifOutOfScreen())if(w["objects"].record.control.isRecording)l();else{if(n.examTimes>0)return console.log("exam>1次仍未校准,已放弃"),void l();console.log("准备重新校准"),c("constant"),n.examTimes++}else l();n.loadingMedia&&(n.needExam=!0),n.checkIfInVideoArea(e.currentPano,this)}}.bind(this))}.bind(this);n.ifOutOfScreen()?b["a"].isMobile||w["objects"].record.control.isRecording||w["objects"].play.control.isPlaying||(e.cameraControls.activeControl.lat<=E["a"].insideLookLimitDown+5?(n.state="active",n.applyOrientation(this,"top"),setTimeout(i,60)):e.cameraControls.activeControl.lat>=E["a"].insideLookLimitUp-5?(n.state="active",n.applyOrientation(this,"bottom"),setTimeout(i,60)):i()):i(),n.loadingMedia&&(n.needExam=!0)}}.bind(this);if(o===p["a"].PANORAMA)if("currPano"!=t&&(a!==e.currentPano||"force"===t&&this.getAngle(e,r)>60)||b["a"].isMobile||w["objects"].record.control.isRecording||w["objects"].play.control.isPlaying){var u={pano:a,lookAtPoint:r,duration:null,maxDistanceOverride:null,skipWarpingCheck:!1,examTag:this,force:"force"==t,cancelLookFun:l};w["objects"].record.control.isRecording&&a==e.currentPano?w["objects"].record.addTagData("open",2):w["objects"].record.control.isRecording&&a!=e.currentPano&&w["objects"].record.addTagData("open",1),b["a"].isMobile||w["objects"].record.control.isRecording||w["objects"].play.control.isPlaying?e.flyToPano(u,l):e.flyToPano(u,c)}else{var d=!1,h=n.open(this,!0);n.examOpenPromise=h,h.done(function(){d=!0,null==w["objects"].tagManager.openedTag&&(w["objects"].tagManager.openedTag=this),c()}.bind(this)).fail((function(){d=!0,l()})),setTimeout(function(){d||(console.log("setTimeout 1100"),"open"==n.state||"active"==n.state?c():(console.log("state "+n.state),l()))}.bind(this),900)}else{var f={pano:a,examTag:this};if(r){var m=(new THREE.Matrix4).lookAt(a.position,r,new THREE.Vector3(0,1,0));f.quaternion=(new THREE.Quaternion).setFromRotationMatrix(m)}b["a"].isMobile||(f.callback=c),f.duration=1500,f.mode=p["a"].PANORAMA,e.flyToNewMode(f)}}else e.waitFlytoItemFuc=this.examine.bind(this,e,t,i)}},{key:"tagVisibleOnCurrentFloor",value:function(e){return!(e===p["a"].DOLLHOUSE||e===p["a"].FLOORPLAN)||this.model.allFloorsVisible||!!this.floors.find((function(e){return!e.hidden}))}},{key:"offScreen",value:function(e,t){var i=e.getWorldPosition().project(t);return!(-1<i.x&&i.x<1&&-1<i.y&&i.y<1)}},{key:"offScreen2",value:function(e,t){var i=e.getWorldPosition().project(t);return!(-.95<i.x&&i.x<.95)}},{key:"raycaster",get:function(){return new THREE.Raycaster}}],[{key:"viewportScale",value:function(){return i.viewportWidth===$("#player").width()&&i.viewportHeight===$("#player").height()||(i.viewportWidth=$("#player").width(),i.viewportHeight=$("#player").height(),i.currentViewportScale=Math.sqrt(Math.min(i.viewportWidth,i.viewportHeight)/E["a"].tags.disc.scale.baseViewportSize)),i.currentViewportScale}}]),i}(EventEmitter)},"9c7d":function(e,t,i){"use strict";i("34ef");var n=i("3330"),o=i("d55d"),a={encode:n["a"],decode:o["a"]},r=i("aeb9"),s=i("cd18"),l=i("823b");function u(e,t,i){e&&(e=e.toLowerCase().trim());var n=new I.UP.clone,o=Math.PI/3,a=Math.PI/2;switch(e){case"left":i.copy(t),i.applyAxisAngle(n,a);break;case"right":i.copy(t),i.applyAxisAngle(n,-a);break;case"forwardleft":i.copy(t),i.applyAxisAngle(n,o);break;case"forwardright":i.copy(t),i.applyAxisAngle(n,-o);break;case"forward":default:i.copy(t)}return i}function d(e,t){if(e){var i={pano:e,lookAtPoint:null,duration:null,maxDistanceOverride:null,skipWarpingCheck:!1};this.player.flyToPano(i,(function(){t&&t({success:!0,message:"Transition complete."})}))}else R.warn("Showcase -> clickPanoObject: Unable to find pano."),t&&t({success:!1,error:"Unable to find pano."})}function h(e,t){var i=this.findRankedPano(e,t);return i>=0?this.handleToObject[i]:(R.warn("Showcase -> findRankedPanoObject: Unable to find nearby pano."),null)}function p(e,t){var i=this.findRankedtag(e,t);return i>=0?this.handleToObject[i]:(R.warn("Showcase -> findRankedtagObject: Unable to find nearby tag."),null)}function f(e,t){t.copy(I.FORWARD),e.getDirection(t)}var m={director:null,player:null,controls:null,sceneRenderer:null,model:null,init:function(e,t,i,n){this.director=e,this.player=i,this.controls=t,this.sceneRenderer=n},handleToObject:{},objectToHandle:{},handleCount:0,onMessageReceive:function(e){if(e){var t=e.targetFunction,i=e.params,n=e.onDone;t&&this[t]&&this[t](i,n)}},waitForInit:function(e,t){F.then(t.bind({success:!0,message:"Init complete."}))},moveToPano:function(e,t){var i=new THREE.Euler(0,0,0,"YXZ"),n=new THREE.Quaternion;return function(e,t){var o=e.pano,a=e.rotation,r=e.transition;if(!this.model)return t({success:!1,error:"The model has not been loaded yet"});var s=this.model.panos.get(o);if(!s)return t({success:!1,error:o+" does not exist in this model"});if(!a)return t({sucess:!1,erorr:a+" is not a valid rotation"});i.set(c.Math.degToRad(a.x||0),c.Math.degToRad(a.y||0),c.Math.degToRad(a.z||0),"YXZ"),l["a"].info(a.z);var u={success:!0,message:o};if(r===A.FADEOUT)n.setFromEuler(i),this.player.warpToPano(s,n,null,null,b.BLACK,null,null,t.bind(this,u));else{var d,h;r===A.INSTANT&&(d=0,h=0);var p=I.FORWARD.clone().applyEuler(i).add(s.position);this.player.flyToPano({pano:s,lookAtPoint:p,duration:d,aimDuration:h},t.bind(this,u))}}}(),moveInDirection:function(e,t){var i=e.direction;return"undefined"==typeof v[i]?(R.warn("Showcase -> moveInDirection: Cannot move in invalid direction."),void(t&&t({success:!1,error:"Invalid direction."}))):void this.player.flyLocalDirection(I[i].clone()).then((function(e){t(e?{success:!0,message:"moved "+i}:{success:!1,error:"Cannot move in direction: "+i})}))},getPose:function(e,t){return this.player.camera.position,(new THREE.Euler).setFromQuaternion(this.player.camera.quaternion,"YXZ"),t({success:!0,message:B(this.player)})},takeScreenShot:function(){var e=new THREE.PerspectiveCamera,t=new THREE.WebGLRenderTarget;return function(i,n){if(!i.resolution)return n({success:!1,error:"An invalid resolution was specified"});if(-1===i.resolution.width||-1===i.resolution.height){var o=this.sceneRenderer.renderer.getSize();i.resolution.width=o.width,i.resolution.height=o.height}e.layers.set(r["a"].DEFAULT),i.visibleObjects&&(i.visibleObjects.showtags&&e.layers.enable(r["a"].TAG),i.visibleObjects.showPucks&&e.layers.enable(r["a"].PANOMARKERS),i.visibleObjects.showReticule&&e.layers.enable(r["a"].RETICULE));var l=i.resolution.width,c=i.resolution.height,u=l/c;e.position.copy(this.sceneRenderer.camera.position),e.quaternion.copy(this.sceneRenderer.camera.quaternion),e.projectionMatrix.copy(this.player.camera.projectionMatrix),e.projectionMatrix.elements[0]=this.player.camera.projectionMatrix.elements[5]/u,e.projectionMatrix.elements[5]=-e.projectionMatrix.elements[5],t.setSize(l,c),this.sceneRenderer.renderer.render(this.sceneRenderer.scene,e,t);var d=new Uint8Array(l*c*4);this.sceneRenderer.renderer.readRenderTargetPixels(t,0,0,l,c,d);var h=a.encode({data:d,width:l,height:c,heading:180,pitch:0},i.quality),p="data:image/jpg;base64,"+s["a"].uint8ToBase64(h.data);n({success:!0,message:p,camera:e})}}(),findRankedPano:function(e,t){var i=new THREE.Vector3,n=new THREE.Vector3;return function(e,t){f(this.player,n),u(t,n,i);var o=this.player.rankedPanoInDirection(e,i);if(o){var a=this.objectToHandle[o.id];return a||(this.objectToHandle[o.id]=a=this.handleCount++,this.handleToObject[a]=o),a}return R.warn("Showcase -> findRankedPano: Unable to find nearby pano."),-1}}(),findRankedtag:function(e,t){var i=new THREE.Vector3,n=new THREE.Vector3;return function(e,t){f(this.player,n),u(t,n,i);var o=this.player.rankedtagInDirection(e,i);if(o){var a=this.objectToHandle[o.sid];return a||(this.objectToHandle[o.sid]=a=this.handleCount++,this.handleToObject[a]=o),a}return R.warn("Showcase -> findRankedtag: Unable to find nearby tag."),-1}}(),clickNearesttag:function(e){this.clickRankedtag(0,e)},clickRankedtag:function(e,t){var i=p.call(this,e,t);i&&O.call(this,i)},clickNearestPano:function(e,t){this.clickRankedPano(0,e,t)},clickRankedPano:function(e,t,i){var n=h.call(this,e,t);n?d.call(this,n,i):i(null)},clickPano:function(e,t){var i=this.handleTable[e];i?d.call(this,i,t):t(null)},rotateDirection:function(){return function(e,t){var i=e.direction,n=e.angle;if(!P.active){var o=0,a=0,r=0,s=0;if(!n||isNaN(n))return R.warn("Showcase -> rotateDirection: Invalid rotation angle."),void(t&&t({success:!1,error:"Invalid rotation angle."}));if(this.player.mode===E.TRANSITIONING)return R.warn("Automation -> rotateDirection: Cannot rotate while transitioning"),void(t&&t({success:!1,error:"Cannot rotate while transitioning"}));if(i===v.RIGHT||i===v.LEFT)i===v.RIGHT&&(n=-n),o=n>0?-1:1,r=n;else{if(i!==v.UP&&i!==v.DOWN)return R.warn("Showcase -> rotateDirection: Invalid direction for rotation: "+i),void(t&&t({success:!1,error:"Invalid direction for rotation."}));if(this.player.mode===E.FLOORPLAN)return R.warn("Showcase -> rotateDirection: Cannot rotate "+i+" in floorplan mode"),void(t&&t({success:!1,error:"Cannot rotate "+i+" in floorplan mode"}));if(i===v.DOWN&&(n=-n),n=N.call(this,n),0===n)return R.warn("Showcase -> rotateDirection: Already at maximum rotation in direction: "+i),void(t&&t({success:!1,error:"Already at maximum rotation in direction: "+i}));a=n>0?1:-1,s=n}var l=n;n=c.Math.degToRad(n),r=c.Math.degToRad(r),s=c.Math.degToRad(s);var u=this.controls.activeControl,d=function(){u.stopRotating(!0),t&&t({success:!0,message:"Rotated "+l.toFixed(2)+"° in direction: "+e.direction})};u.startRotating(o,a),P.start(r,s,this.player,d)}}}(),rotate:function(){var e=new THREE.Vector3,t=new THREE.Vector3;return function(i,n){var o=i.xAngle,a=i.yAngle;if(!P.active){if(o=o||0,a=a||0,isNaN(o)||isNaN(a))return R.warn("Showcase -> rotate: Invalid rotation angle."),void(n&&n({success:!1,error:"Invalid rotation angle."}));if(this.player.mode===E.TRANSITIONING)return R.warn("Automation -> rotate: Cannot rotate while transitioning"),void(n&&n({success:!1,error:"Cannot rotate while transitioning"}));Math.abs(o)<.01&&(o=0),Math.abs(a)<.01&&(a=0);var r=a;a=N.call(this,a),o=-o;var s=r>0?"UP":"DOWN";if(!o&&r&&!a)return R.warn("Showcase -> rotate: Already at maximum rotation in direction: "+s),void(n&&n({success:!1,error:"Already at maximum rotation in direction: "+s}));r>a&&R.warn("Showcase -> rotate: Reached maximum rotation in direction: "+s);var l=a;a=c.Math.degToRad(a),o=c.Math.degToRad(o),e.copy(this.player.mode===E.FLOORPLAN?I.UP:I.FORWARD),this.player.getDirection(e),t.copy(e).applyAxisAngle(I.UP,o),t.applyAxisAngle(I.RIGHT,a);var u=(e.angleTo(t),o>0?-1:o<0?1:0),d=a>0?1:a<0?-1:0;Math.abs(o)>Math.abs(a)?d*=Math.abs(a/o):Math.abs(a)>Math.abs(o)&&(u*=Math.abs(o/a));var h=this.controls.activeControl,p=function(){h.stopRotating(!0),n&&n({success:!0,message:"Rotated "+i.xAngle.toFixed(2)+"° horizontally, "+l.toFixed(2)+"° vertically"})};h.startRotating(u,d),P.start(o,a,this.player,p)}}}(),panCamera:function(e,t){function i(e){switch(o.removeAllListeners(T.AutoPanComplete),o.removeAllListeners(T.AutoPanInterrupt),o.removeAllListeners(T.AutoPanClamped),e){case T.AutoPanInterrupt:t({success:!0,message:"Camera panning interrupted."});break;case T.AutoPanClamped:if(o.autoPanPosition.x!==n.x||o.autoPanPosition.z!==n.z){if(Math.abs(this.player.position.x-o.autoPanPosition.x)<.01&&Math.abs(this.player.position.z-o.autoPanPosition.z)<.01)return void t({success:!1,error:"Already at edge of current model bounds."});var i="The view point is outside the bounds for the current model. ";i+="The view point was clamped to "+a(o.target.x,o.target.z),console.warn(i)}case T.AutoPanComplete:t({success:!0,message:"Panned camera to position "+a(o.autoPanPosition.x,o.autoPanPosition.z)})}}if(this.player.mode!==E.DOLLHOUSE&&this.player.mode!==E.FLOORPLAN)return t({success:!1,error:"Camera panning is not available in the current mode: "+this.player.mode});var n=e.position,o=this.player.control;o.setAutoPanPosition(n.x,n.z),o.autoPan=!0;var a=function(e,t){return"("+e.toFixed(2)+", "+t.toFixed(2)+")"};o.on(T.AutoPanComplete,i.bind(this,T.AutoPanComplete)),o.on(T.AutoPanInterrupt,i.bind(this,T.AutoPanInterrupt)),o.on(T.AutoPanClamped,i.bind(this,T.AutoPanClamped))},click:function(e,t){var i=e.x,n=e.y,o=e.percentage;!0===o&&(i=i/100*$("#player").width(),n=n/100*$("#player").height()),this.player.handleInputStart(i,n),this.player.updateIntersect(),this.player.handleInputEnd(i,n)},mouseOver:function(e,t){var i=e.x,n=e.y,o=e.percentage;!0===o&&(i=i/100*$("#player").width(),n=n/100*$("#player").height()),this.player.handleInputMove(i,n),this.player.updateIntersect()},moveToMode:function(e,t){function i(e){t(e?{success:!1,error:"Failed to load new mode: "+e}:{success:!0,message:"Moved to new mode: "+n})}var n=e.mode;n===E.PANORAMA||n===E.DOLLHOUSE||n===E.FLOORPLAN?this.director.changeMode(n).then((function(){i()}),(function(e){i(e)})):t({success:!1,error:"Invalid mode selection"})}},g={init:function(e,t,i,n,o){m.init(e,t,i,o)},takeScreenShot:function(e,t){m.takeScreenShot(e,t)}};t["a"]=g},"9ef6":function(e,t,i){"use strict";i("0d6d");var n=i("ade3"),o=(i("af56"),i("63d9"),i("5fda"));function a(e,t,i){o["BufferAttribute"].call(this,new Float32Array(e),t,i)}o["HorizontalBlurShader"]={uniforms:{tDiffuse:{type:"t",value:null},h:{type:"f",value:1/512}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform float h;","varying vec2 vUv;","void main() {","vec4 sum = vec4( 0.0 );","sum += texture2D( tDiffuse, vec2( vUv.x - 4.0 * h, vUv.y ) ) * 0.051;","sum += texture2D( tDiffuse, vec2( vUv.x - 3.0 * h, vUv.y ) ) * 0.0918;","sum += texture2D( tDiffuse, vec2( vUv.x - 2.0 * h, vUv.y ) ) * 0.12245;","sum += texture2D( tDiffuse, vec2( vUv.x - 1.0 * h, vUv.y ) ) * 0.1531;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;","sum += texture2D( tDiffuse, vec2( vUv.x + 1.0 * h, vUv.y ) ) * 0.1531;","sum += texture2D( tDiffuse, vec2( vUv.x + 2.0 * h, vUv.y ) ) * 0.12245;","sum += texture2D( tDiffuse, vec2( vUv.x + 3.0 * h, vUv.y ) ) * 0.0918;","sum += texture2D( tDiffuse, vec2( vUv.x + 4.0 * h, vUv.y ) ) * 0.051;","gl_FragColor = sum;","}"].join("\n")},o["VerticalBlurShader"]={uniforms:{tDiffuse:{type:"t",value:null},v:{type:"f",value:1/512}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform float v;","varying vec2 vUv;","void main() {","vec4 sum = vec4( 0.0 );","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 4.0 * v ) ) * 0.051;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 3.0 * v ) ) * 0.0918;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 2.0 * v ) ) * 0.12245;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 1.0 * v ) ) * 0.1531;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 1.0 * v ) ) * 0.1531;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 2.0 * v ) ) * 0.12245;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 3.0 * v ) ) * 0.0918;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 4.0 * v ) ) * 0.051;","gl_FragColor = sum;","}"].join("\n")},o["ShaderPass"]=function(e,t){this.textureID=void 0!==t?t:"tDiffuse",e instanceof o["ShaderMaterial"]?(this.uniforms=e.uniforms,this.material=e):e&&(this.uniforms=o["UniformsUtils"].clone(e.uniforms),this.material=new o["ShaderMaterial"]({defines:e.defines||{},uniforms:this.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader})),this.renderToScreen=!1,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.camera=new o["OrthographicCamera"](-1,1,1,-1,0,1),this.scene=new o["Scene"],this.quad=new o["Mesh"](new o["PlaneBufferGeometry"](2,2),null),this.scene.add(this.quad)},o["ShaderPass"].prototype={render:function(e,t,i,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=i),this.quad.material=this.material,this.renderToScreen?e.render(this.scene,this.camera):e.render(this.scene,this.camera,t,this.clear),this.renderToScreen?e.render(this.scene,this.camera):e.render(this.scene,this.camera,t,this.clear)}},o["CopyShader"]={uniforms:{tDiffuse:{type:"t",value:null},opacity:{type:"f",value:1}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform float opacity;","uniform sampler2D tDiffuse;","varying vec2 vUv;","void main() {","vec4 texel = texture2D( tDiffuse, vUv );","gl_FragColor = opacity * texel;","}"].join("\n")},o["EffectComposer"]=function(e,t){if(this.renderer=e,void 0===t){var i={minFilter:o["LinearFilter"],magFilter:o["LinearFilter"],format:o["RGBAFormat"],stencilBuffer:!1},n=e.getSize();t=new o["WebGLRenderTarget"](n.width,n.height,i)}this.renderTarget1=t,this.renderTarget2=t.clone(),this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.passes=[],void 0===o["CopyShader"]&&console.error("THREE.EffectComposer relies on THREE.CopyShader"),this.copyPass=new o["ShaderPass"](o["CopyShader"])},o["EffectComposer"].prototype={swapBuffers:function(){var e=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=e},addPass:function(e){this.passes.push(e)},insertPass:function(e,t){this.passes.splice(t,0,e)},render:function(e){this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2;var t,i,n=!1,a=this.passes.length;for(i=0;i<a;i++)if(t=this.passes[i],t.enabled){if(t.render(this.renderer,this.writeBuffer,this.readBuffer,e,n),t.needsSwap){if(n){var r=this.renderer.context;r.stencilFunc(r.NOTEQUAL,1,4294967295),this.copyPass.render(this.renderer,this.writeBuffer,this.readBuffer,e),r.stencilFunc(r.EQUAL,1,4294967295)}this.swapBuffers()}t instanceof o["MaskPass"]?n=!0:t instanceof o["ClearMaskPass"]&&(n=!1)}},reset:function(e){if(void 0===e){var t=this.renderer.getSize();e=this.renderTarget1.clone(),e.setSize(t.width,t.height)}this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.renderTarget1=e,this.renderTarget2=e.clone(),this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2},setSize:function(e,t){this.renderTarget1.setSize(e,t),this.renderTarget2.setSize(e,t)}},o["ImageUtils"].crossOrigin="anonymous",a.prototype=Object.create(o["BufferAttribute"].prototype),a.prototype.constructor=a,o["Float32BufferAttribute"]=a,o["UniformsLib"].line={linewidth:{value:1,type:"f"},resolution:{value:new o["Vector2"](1,1),type:"v2"},dashScale:{value:1,type:"f"},dashSize:{value:1,type:"f"},gapSize:{value:1,type:"f"}},o["ShaderLib"]["line"]={uniforms:o["UniformsUtils"].merge([o["UniformsLib"].common,o["UniformsLib"].fog,o["UniformsLib"].line]),vertexShader:"#include <common>\n#include <color_pars_vertex>\n \n#include <logdepthbuf_pars_vertex>\n \nuniform float linewidth;\nuniform vec2 resolution;\nattribute vec3 instanceStart;\nattribute vec3 instanceEnd;\nattribute vec3 instanceColorStart;\nattribute vec3 instanceColorEnd;\nvarying vec2 vUv;\n#ifdef USE_DASH\n\tuniform float dashScale;\n\tattribute float instanceDistanceStart;\n\tattribute float instanceDistanceEnd;\n\tvarying float vLineDistance;\n#endif\nvoid trimSegment( const in vec4 start, inout vec4 end ) {\n\tfloat a = projectionMatrix[ 2 ][ 2 ]; \n\tfloat b = projectionMatrix[ 3 ][ 2 ]; \n\tfloat nearEstimate = - 0.5 * b / a;\n\tfloat alpha = ( nearEstimate - start.z ) / ( end.z - start.z );\n\tend.xyz = mix( start.xyz, end.xyz, alpha );\n}\nvoid main() {\n\t#ifdef USE_COLOR\n\t\tvColor.xyz = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd;\n\t#endif\n\t#ifdef USE_DASH\n\t\tvLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd;\n\t#endif\n\tfloat aspect = resolution.x / resolution.y;\n\tvUv = uv;\n\tvec4 start = modelViewMatrix * vec4( instanceStart, 1.0 );\n\tvec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 );\n\tbool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); \n\tif ( perspective ) {\n\t\tif ( start.z < 0.0 && end.z >= 0.0 ) {\n\t\t\ttrimSegment( start, end );\n\t\t} else if ( end.z < 0.0 && start.z >= 0.0 ) {\n\t\t\ttrimSegment( end, start );\n\t\t}\n\t}\n\tvec4 clipStart = projectionMatrix * start;\n\tvec4 clipEnd = projectionMatrix * end;\n\tvec2 ndcStart = clipStart.xy / clipStart.w;\n\tvec2 ndcEnd = clipEnd.xy / clipEnd.w;\n\tvec2 dir = ndcEnd - ndcStart;\n\tdir.x *= aspect;\n\tdir = normalize( dir );\n\tvec2 offset = vec2( dir.y, - dir.x );\n\tdir.x /= aspect;\n\toffset.x /= aspect;\n\tif ( position.x < 0.0 ) offset *= - 1.0;\n\tif ( position.y < 0.0 ) {\n\t\toffset += - dir;\n\t} else if ( position.y > 1.0 ) {\n\t\toffset += dir;\n\t}\n\toffset *= linewidth;\n\toffset /= resolution.y;\n\tvec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd;\n\toffset *= clip.w;\n\tclip.xy += offset;\n\tgl_Position = clip;\n\tvec4 mvPosition = ( position.y < 0.5 ) ? start : end; \n\t#include <logdepthbuf_vertex>\n\t \n \n}\t",fragmentShader:"uniform vec3 diffuse;\n\tuniform float opacity;\n\t#ifdef USE_DASH\n\t\tuniform float dashSize;\n\t\tuniform float gapSize;\n\t#endif\n\tvarying float vLineDistance;\n\t#include <common>\n\t#include <color_pars_fragment>\n\t#include <fog_pars_fragment>\n\t#include <logdepthbuf_pars_fragment>\n\t \n\tvarying vec2 vUv;\n\tvoid main() {\n\t\t \n\t\t#ifdef USE_DASH\n\nif ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; \n\nif ( mod( vLineDistance, dashSize + gapSize ) > dashSize ) discard; \n\t\t#endif\n\t\tif ( abs( vUv.y ) > 1.0 ) {\n\nfloat a = vUv.x;\n\nfloat b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;\n\nfloat len2 = a * a + b * b;\n\nif ( len2 > 1.0 ) discard;\n\t\t}\n\t\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t\t#include <logdepthbuf_fragment>\n\t\t#include <color_fragment>\n\t\tgl_FragColor = vec4( diffuseColor.rgb, diffuseColor.a );\n\t\t#include <premultiplied_alpha_fragment>\n\t\t#include <tonemapping_fragment>\n\t\t#include <encodings_fragment>\n\t\t#include <fog_fragment>\n\t}"},o["LineMaterial"]=function(e){o["ShaderMaterial"].call(this,{type:"LineMaterial",uniforms:o["UniformsUtils"].clone(o["ShaderLib"]["line"].uniforms),vertexShader:o["ShaderLib"]["line"].vertexShader,fragmentShader:o["ShaderLib"]["line"].fragmentShader}),this.dashed=!1,Object.defineProperties(this,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(e){this.uniforms.diffuse.value=e}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(e){this.uniforms.linewidth.value=e}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(e){this.uniforms.dashScale.value=e}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(e){this.uniforms.dashSize.value=e}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(e){this.uniforms.gapSize.value=e}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(e){this.uniforms.resolution.value.copy(e)}}}),this.setValues(e)},o["LineMaterial"].prototype=Object.create(o["ShaderMaterial"].prototype),o["LineMaterial"].prototype.constructor=o["LineMaterial"],o["LineMaterial"].prototype.isLineMaterial=!0,o["LineMaterial"].prototype.copy=function(e){return o["ShaderMaterial"].prototype.copy.call(this,e),this.color.copy(e.color),this.linewidth=e.linewidth,this.resolution=e.resolution,this},o["LineSegmentsGeometry"]=function(){o["InstancedBufferGeometry"].call(this),this.type="LineSegmentsGeometry";new o["BufferGeometry"];var e=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],t=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],i=new o["BufferAttribute"](new Uint16Array([0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5]),1);this.setIndex(i),this.addAttribute("position",new o["Float32BufferAttribute"](e,3)),this.addAttribute("uv",new o["Float32BufferAttribute"](t,2))},o["LineSegmentsGeometry"].prototype=Object.assign(Object.create(o["InstancedBufferGeometry"].prototype),{constructor:o["LineSegmentsGeometry"],isLineSegmentsGeometry:!0,applyMatrix:function(e){var t=this.attributes.instanceStart,i=this.attributes.instanceEnd;return void 0!==t&&(e.applyToBufferAttribute(t),e.applyToBufferAttribute(i),t.data.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},setPositions:function(e){var t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));var i=new o["InstancedInterleavedBuffer"](t,6,1);return this.addAttribute("instanceStart",new o["InterleavedBufferAttribute"](i,3,0)),this.addAttribute("instanceEnd",new o["InterleavedBufferAttribute"](i,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this},setColors:function(e){var t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));var i=new o["InstancedInterleavedBuffer"](t,6,1);return this.addAttribute("instanceColorStart",new o["InterleavedBufferAttribute"](i,3,0)),this.addAttribute("instanceColorEnd",new o["InterleavedBufferAttribute"](i,3,3)),this},fromWireframeGeometry:function(e){return this.setPositions(e.attributes.position.array),this},fromEdgesGeometry:function(e){return this.setPositions(e.attributes.position.array),this},fromMesh:function(e){return this.fromWireframeGeometry(new o["WireframeGeometry"](e.geometry)),this},fromLineSegements:function(e){var t=e.geometry;return t.isGeometry?this.setPositions(t.vertices):t.isBufferGeometry&&this.setPositions(t.position.array),this},computeBoundingBox:function(){var e=new o["Box3"];return function(){null===this.boundingBox&&(this.boundingBox=new o["Box3"]);var t=this.attributes.instanceStart,i=this.attributes.instanceEnd;void 0!==t&&void 0!==i&&(this.boundingBox.setFromBufferAttribute(t),e.setFromBufferAttribute(i),this.boundingBox.union(e))}}(),computeBoundingSphere:function(){var e=new o["Vector3"];return function(){null===this.boundingSphere&&(this.boundingSphere=new o["Sphere"]),null===this.boundingBox&&this.computeBoundingBox();var t=this.attributes.instanceStart,i=this.attributes.instanceEnd;if(void 0!==t&&void 0!==i){var n=this.boundingSphere.center;this.boundingBox.getCenter(n);for(var a=0,r=0,s=t.count;r<s;r++)e.fromBufferAttribute(t,r),a=Math.max(a,n.distanceToSquared(e)),e.fromBufferAttribute(i,r),a=Math.max(a,n.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(a),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}}(),toJSON:function(){},clone:function(){},copy:function(e){return this}}),o["LineGeometry"]=function(){o["LineSegmentsGeometry"].call(this),this.type="LineGeometry"},o["LineGeometry"].prototype=Object.assign(Object.create(o["LineSegmentsGeometry"].prototype),{constructor:o["LineGeometry"],isLineGeometry:!0,setPositions:function(e){for(var t=e.length-3,i=new Float32Array(2*t),n=0;n<t;n+=3)i[2*n]=e[n],i[2*n+1]=e[n+1],i[2*n+2]=e[n+2],i[2*n+3]=e[n+3],i[2*n+4]=e[n+4],i[2*n+5]=e[n+5];return o["LineSegmentsGeometry"].prototype.setPositions.call(this,i),this},setColors:function(e){for(var t=e.length-3,i=new Float32Array(2*t),n=0;n<t;n+=3)i[2*n]=e[n],i[2*n+1]=e[n+1],i[2*n+2]=e[n+2],i[2*n+3]=e[n+3],i[2*n+4]=e[n+4],i[2*n+5]=e[n+5];return o["LineSegmentsGeometry"].prototype.setColors.call(this,i),this},fromLine:function(e){var t=e.geometry;return t.isGeometry?this.setPositions(t.vertices):t.isBufferGeometry&&this.setPositions(t.position.array),this},copy:function(e){return this}}),o["LineSegments2"]=function(e,t){o["Mesh"].call(this),this.type="LineSegments2",this.geometry=void 0!==e?e:new o["LineSegmentsGeometry"],this.material=void 0!==t?t:new o["LineMaterial"]({color:16777215*Math.random()})},o["LineSegments2"].prototype=Object.assign(Object.create(o["Mesh"].prototype),{constructor:o["LineSegments2"],isLineSegments2:!0,computeLineDistances:function(){var e=new o["Vector3"],t=new o["Vector3"];return function(){for(var i=this.geometry,n=i.attributes.instanceStart,a=i.attributes.instanceEnd,r=new Float32Array(2*n.data.count),s=0,l=0,c=n.data.count;s<c;s++,l+=2)e.fromBufferAttribute(n,s),t.fromBufferAttribute(a,s),r[l]=0===l?0:r[l-1],r[l+1]=r[l]+e.distanceTo(t);var u=new o["InstancedInterleavedBuffer"](r,2,1);return i.addAttribute("instanceDistanceStart",new o["InterleavedBufferAttribute"](u,1,0)),i.addAttribute("instanceDistanceEnd",new o["InterleavedBufferAttribute"](u,1,1)),this}}(),copy:function(e){return this}}),o["Fatline"]=function(e,t){o["LineSegments2"].call(this),this.type="Fatline",this.geometry=void 0!==e?e:new o["LineGeometry"],this.material=void 0!==t?t:new o["LineMaterial"]({color:16777215*Math.random()})},o["Fatline"].prototype=Object.assign(Object.create(o["LineSegments2"].prototype),{constructor:o["Fatline"],isFatline:!0,copy:function(e){return this}});i("34ef");!function(){if("performance"in window==0&&(window.performance={}),"now"in window.performance==0){var e=Date.now();performance.timing&&performance.timing.navigationStart&&(e=performance.timing.navigationStart),window.performance.now=function(){return Date.now()-e}}}(),o["WebGLRenderer"].prototype.paramThreeToGL=function(e){var t,i=this.extensions,n=this.context;if(e===o["RepeatWrapping"])return n.REPEAT;if(e===o["ClampToEdgeWrapping"])return n.CLAMP_TO_EDGE;if(e===o["MirroredRepeatWrapping"])return n.MIRRORED_REPEAT;if(e===o["NearestFilter"])return n.NEAREST;if(e===o["NearestMipMapNearestFilter"])return n.NEAREST_MIPMAP_NEAREST;if(e===o["NearestMipMapLinearFilter"])return n.NEAREST_MIPMAP_LINEAR;if(e===o["LinearFilter"])return n.LINEAR;if(e===o["LinearMipMapNearestFilter"])return n.LINEAR_MIPMAP_NEAREST;if(e===o["LinearMipMapLinearFilter"])return n.LINEAR_MIPMAP_LINEAR;if(e===o["UnsignedByteType"])return n.UNSIGNED_BYTE;if(e===o["UnsignedShort4444Type"])return n.UNSIGNED_SHORT_4_4_4_4;if(e===o["UnsignedShort5551Type"])return n.UNSIGNED_SHORT_5_5_5_1;if(e===o["UnsignedShort565Type"])return n.UNSIGNED_SHORT_5_6_5;if(e===o["ByteType"])return n.BYTE;if(e===o["ShortType"])return n.SHORT;if(e===o["UnsignedShortType"])return n.UNSIGNED_SHORT;if(e===o["IntType"])return n.INT;if(e===o["UnsignedIntType"])return n.UNSIGNED_INT;if(e===o["FloatType"])return n.FLOAT;if(t=i.get("OES_texture_half_float"),null!==t&&e===o["HalfFloatType"])return t.HALF_FLOAT_OES;if(e===o["AlphaFormat"])return n.ALPHA;if(e===o["RGBFormat"])return n.RGB;if(e===o["RGBAFormat"])return n.RGBA;if(e===o["LuminanceFormat"])return n.LUMINANCE;if(e===o["LuminanceAlphaFormat"])return n.LUMINANCE_ALPHA;if(e===o["AddEquation"])return n.FUNC_ADD;if(e===o["SubtractEquation"])return n.FUNC_SUBTRACT;if(e===o["ReverseSubtractEquation"])return n.FUNC_REVERSE_SUBTRACT;if(e===o["ZeroFactor"])return n.ZERO;if(e===o["OneFactor"])return n.ONE;if(e===o["SrcColorFactor"])return n.SRC_COLOR;if(e===o["OneMinusSrcColorFactor"])return n.ONE_MINUS_SRC_COLOR;if(e===o["SrcAlphaFactor"])return n.SRC_ALPHA;if(e===o["OneMinusSrcAlphaFactor"])return n.ONE_MINUS_SRC_ALPHA;if(e===o["DstAlphaFactor"])return n.DST_ALPHA;if(e===o["OneMinusDstAlphaFactor"])return n.ONE_MINUS_DST_ALPHA;if(e===o["DstColorFactor"])return n.DST_COLOR;if(e===o["OneMinusDstColorFactor"])return n.ONE_MINUS_DST_COLOR;if(e===o["SrcAlphaSaturateFactor"])return n.SRC_ALPHA_SATURATE;if(t=i.get("WEBGL_compressed_texture_s3tc"),null!==t){if(e===o["RGB_S3TC_DXT1_Format"])return t.COMPRESSED_RGB_S3TC_DXT1_EXT;if(e===o["RGBA_S3TC_DXT1_Format"])return t.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(e===o["RGBA_S3TC_DXT3_Format"])return t.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(e===o["RGBA_S3TC_DXT5_Format"])return t.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(t=i.get("WEBGL_compressed_texture_pvrtc"),null!==t){if(e===o["RGB_PVRTC_4BPPV1_Format"])return t.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(e===o["RGB_PVRTC_2BPPV1_Format"])return t.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(e===o["RGBA_PVRTC_4BPPV1_Format"])return t.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(e===o["RGBA_PVRTC_2BPPV1_Format"])return t.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(t=i.get("WEBGL_compressed_texture_etc1"),null!==t&&e===o["RGB_ETC1_Format"])return t.COMPRESSED_RGB_ETC1_WEBGL;if(t=i.get("EXT_blend_minmax"),null!==t){if(e===o["MinEquation"])return t.MIN_EXT;if(e===o["MaxEquation"])return t.MAX_EXT}return 0},o["WebGLState"]=function(e,t,i){var n=this,a=new o["Vector4"],r=e.getParameter(e.MAX_VERTEX_ATTRIBS),s=new Uint8Array(r),l=new Uint8Array(r),c=new Uint8Array(r),u={},d=null,h=null,p=null,f=null,m=null,v=null,g=null,y=null,b=!1,w=null,E=null,T=null,P=null,x=null,k=null,R=null,_=null,S=null,M=null,A=null,O=null,C=null,D=null,V=null,I=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),j=void 0,L={},F=new o["Vector4"],H=null,z=null,N=new o["Vector4"],B=new o["Vector4"];this.init=function(){this.clearColor(0,0,0,1),this.clearDepth(1),this.clearStencil(0),this.enable(e.DEPTH_TEST),e.depthFunc(e.LEQUAL),e.frontFace(e.CCW),e.cullFace(e.BACK),this.enable(e.CULL_FACE),this.enable(e.BLEND),e.blendEquation(e.FUNC_ADD),e.blendFunc(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA)},this.initAttributes=function(){for(var e=0,t=s.length;e<t;e++)s[e]=0},this.enableAttribute=function(i){if(s[i]=1,0===l[i]&&(e.enableVertexAttribArray(i),l[i]=1),0!==c[i]){var n=t.get("ANGLE_instanced_arrays");n.vertexAttribDivisorANGLE(i,0),c[i]=0}},this.enableAttributeAndDivisor=function(t,i,n){s[t]=1,0===l[t]&&(e.enableVertexAttribArray(t),l[t]=1),c[t]!==i&&(n.vertexAttribDivisorANGLE(t,i),c[t]=i)},this.disableUnusedAttributes=function(){for(var t=0,i=l.length;t<i;t++)l[t]!==s[t]&&(e.disableVertexAttribArray(t),l[t]=0)},this.enable=function(t){!0!==u[t]&&(e.enable(t),u[t]=!0)},this.disable=function(t){!1!==u[t]&&(e.disable(t),u[t]=!1)},this.getCompressedTextureFormats=function(){if(null===d&&(d=[],t.get("WEBGL_compressed_texture_pvrtc")||t.get("WEBGL_compressed_texture_s3tc")||t.get("WEBGL_compressed_texture_etc1")))for(var i=e.getParameter(e.COMPRESSED_TEXTURE_FORMATS),n=0;n<i.length;n++)d.push(i[n]);return d},this.setBlending=function(t,n,a,r,s,l,c,u){t===o["NoBlending"]?this.disable(e.BLEND):this.enable(e.BLEND),t===h&&u===b||(t===o["AdditiveBlending"]?u?(e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.ONE,e.ONE,e.ONE,e.ONE)):(e.blendEquation(e.FUNC_ADD),e.blendFunc(e.SRC_ALPHA,e.ONE)):t===o["SubtractiveBlending"]?u?(e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.ZERO,e.ZERO,e.ONE_MINUS_SRC_COLOR,e.ONE_MINUS_SRC_ALPHA)):(e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ZERO,e.ONE_MINUS_SRC_COLOR)):t===o["MultiplyBlending"]?u?(e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.ZERO,e.ZERO,e.SRC_COLOR,e.SRC_ALPHA)):(e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ZERO,e.SRC_COLOR)):u?(e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.ONE,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA)):(e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA)),h=t,b=u),t===o["CustomBlending"]?(s=s||n,l=l||a,c=c||r,n===p&&s===v||(e.blendEquationSeparate(i(n),i(s)),p=n,v=s),a===f&&r===m&&l===g&&c===y||(e.blendFuncSeparate(i(a),i(r),i(l),i(c)),f=a,m=r,g=l,y=c)):(p=null,f=null,m=null,v=null,g=null,y=null)},this.setDepthFunc=function(t){if(w!==t){if(t)switch(t){case o["NeverDepth"]:e.depthFunc(e.NEVER);break;case o["AlwaysDepth"]:e.depthFunc(e.ALWAYS);break;case o["LessDepth"]:e.depthFunc(e.LESS);break;case o["LessEqualDepth"]:e.depthFunc(e.LEQUAL);break;case o["EqualDepth"]:e.depthFunc(e.EQUAL);break;case o["GreaterEqualDepth"]:e.depthFunc(e.GEQUAL);break;case o["GreaterDepth"]:e.depthFunc(e.GREATER);break;case o["NotEqualDepth"]:e.depthFunc(e.NOTEQUAL);break;default:e.depthFunc(e.LEQUAL)}else e.depthFunc(e.LEQUAL);w=t}},this.setDepthTest=function(t){t?this.enable(e.DEPTH_TEST):this.disable(e.DEPTH_TEST)},this.setDepthWrite=function(t){E!==t&&(e.depthMask(t),E=t)},this.setColorWrite=function(t){T!==t&&(e.colorMask(t,t,t,t),T=t)},this.setStencilFunc=function(t,i,n){x===t&&k===i&&R===n||(e.stencilFunc(t,i,n),x=t,k=i,R=n)},this.setStencilOp=function(t,i,n){_===t&&S===i&&M===n||(e.stencilOp(t,i,n),_=t,S=i,M=n)},this.setStencilTest=function(t){t?this.enable(e.STENCIL_TEST):this.disable(e.STENCIL_TEST)},this.setStencilWrite=function(t){P!==t&&(e.stencilMask(t),P=t)},this.setFlipSided=function(t){A!==t&&(t?e.frontFace(e.CW):e.frontFace(e.CCW),A=t)},this.setLineWidth=function(t){t!==O&&(e.lineWidth(t),O=t)},this.setPolygonOffset=function(t,i,n){t?this.enable(e.POLYGON_OFFSET_FILL):this.disable(e.POLYGON_OFFSET_FILL),!t||C===i&&D===n||(e.polygonOffset(i,n),C=i,D=n)},this.getScissorTest=function(){return V},this.setScissorTest=function(t){V=t,t?this.enable(e.SCISSOR_TEST):this.disable(e.SCISSOR_TEST)},this.activeTexture=function(t){void 0===t&&(t=e.TEXTURE0+I-1),j!==t&&(e.activeTexture(t),j=t)},this.bindTexture=function(t,i){void 0===j&&n.activeTexture();var o=L[j];void 0===o&&(o={type:void 0,texture:void 0},L[j]=o),o.type===t&&o.texture===i||(e.bindTexture(t,i),o.type=t,o.texture=i)},this.compressedTexImage2D=function(){try{e.compressedTexImage2D.apply(e,arguments)}catch(e){console.error(e)}},this.texImage2D=function(){try{e.texImage2D.apply(e,arguments)}catch(e){console.error(e)}},this.clearColor=function(t,i,n,o){a.set(t,i,n,o),!1===F.equals(a)&&(e.clearColor(t,i,n,o),F.copy(a))},this.clearDepth=function(t){H!==t&&(e.clearDepth(t),H=t)},this.clearStencil=function(t){z!==t&&(e.clearStencil(t),z=t)},this.scissor=function(t){!1===N.equals(t)&&(e.scissor(t.x,t.y,t.z,t.w),N.copy(t))},this.viewport=function(t){!1===B.equals(t)&&(e.viewport(t.x,t.y,t.z,t.w),B.copy(t))},this.reset=function(){for(var t=0;t<l.length;t++)1===l[t]&&(e.disableVertexAttribArray(t),l[t]=0);u={},d=null,j=void 0,L={},h=null,T=null,E=null,P=null,A=null}};var r,s=i("d9c2"),l=(i("cd18"),i("1158")),c=i("b235"),u=i("0c20"),d=i("b511"),h=i("80c5"),p=i("f121"),f=2,m=(r={debug:!1,version:"2.23.8-0-g24ec69e",skyboxRadius:2500,languageTag:s["a"].valueFromHash("lang",null),pageTitle:"4dkankan",autoplay:s["a"].valueFromHash("play",!1)||!s["a"].inIframe(),logLevel:s["a"].valueFromHash("log",2)},Object(n["a"])(r,"skyboxRadius",2500),Object(n["a"])(r,"modelBoundsPadding",5),Object(n["a"])(r,"showNeighbors",!1),Object(n["a"])(r,"brand",s["a"].valueFromHash("brand",!0)),Object(n["a"])(r,"showHighlights",s["a"].valueFromHash("hhl",!0)&&s["a"].valueFromHash("hr",1)),Object(n["a"])(r,"startHighlights",s["a"].valueFromHash("hl",-1)),Object(n["a"])(r,"specialEdition",s["a"].valueFromHash("bn",0)),Object(n["a"])(r,"useWheel",s["a"].valueFromHash("wh",!0)),Object(n["a"])(r,"crossOrigin","anonymous"),Object(n["a"])(r,"fancierTransition",!1),Object(n["a"])(r,"wireframe",!1),Object(n["a"])(r,"skyboxWireframe",!1),Object(n["a"])(r,"modelAlpha",1),Object(n["a"])(r,"highlightPanoSelection",!1),Object(n["a"])(r,"showSweeps",!0),Object(n["a"])(r,"showSkyboxes",!1),Object(n["a"])(r,"showMesh",!0),Object(n["a"])(r,"showFloors",!1),Object(n["a"])(r,"showFloorDuration",300),Object(n["a"])(r,"showFloorDelay",300),Object(n["a"])(r,"hideFloorDuration",300),Object(n["a"])(r,"hideFloorDelay",0),Object(n["a"])(r,"modelOpaWhenFloorPlaneShow",.3),Object(n["a"])(r,"reticuleOpacityTransitionTime",250),Object(n["a"])(r,"reticuleColor",u["a"].green),Object(n["a"])(r,"markerOpacityTransitionTime",500),Object(n["a"])(r,"guiAnimationSpeed",250),Object(n["a"])(r,"highlightAnimationDuration",500),Object(n["a"])(r,"modelComponentLoadSpinnerDelay",150),Object(n["a"])(r,"captureErrors",!1),Object(n["a"])(r,"maxMobileTextures",6),Object(n["a"])(r,"minimalMemoryMode",s["a"].valueFromHash("m3",s["a"].isMobile())),Object(n["a"])(r,"startupFlyinDelay",500),Object(n["a"])(r,"signedUrlDefaultExpireTime",24e4),Object(n["a"])(r,"signedUrlCheckInterval",1e4),Object(n["a"])(r,"signedUrlRefreshBuffer",15e3),Object(n["a"])(r,"dollhouseFOV",70),Object(n["a"])(r,"dollhouseNear",.1),Object(n["a"])(r,"dollhouseFar",5e3),Object(n["a"])(r,"insideFOV",70),Object(n["a"])(r,"insideFOVMax",120),Object(n["a"])(r,"fish",{insideFOV:80,insideLookLimitUp:20,insideLookLimitDown:-20}),Object(n["a"])(r,"overlay",{width:1,height:.5,depth:.02}),Object(n["a"])(r,"boundExpandLength",1.5),Object(n["a"])(r,"insideNear",.01),Object(n["a"])(r,"insideFar",5e3),Object(n["a"])(r,"insideLookSpeed",.12),Object(n["a"])(r,"insideLookLimitUp",40),Object(n["a"])(r,"insideLookLimitDown",-40),Object(n["a"])(r,"orthoNear",1),Object(n["a"])(r,"orthoFar",5e3),Object(n["a"])(r,"orthoBase",10),Object(n["a"])(r,"narrowLandscapeHeight",290),Object(n["a"])(r,"reallyNarrowLandscapeHeight",250),Object(n["a"])(r,"visionTilingStartDate",new Date("8/26/2016")),Object(n["a"])(r,"visionTilingStartVersion","1.1.407.13667"),Object(n["a"])(r,"windowHeightHighQualityThreshold",900),Object(n["a"])(r,"tourStepDelayDefault",3500),Object(n["a"])(r,"tourStepDelaySlideShow",5e3),Object(n["a"])(r,"workshopApsect",9/16),Object(n["a"])(r,"highQualityMaxZoom",2),Object(n["a"])(r,"ultraHighQualityMaxZoom",3),Object(n["a"])(r,"FishCam_BackDist",.2),Object(n["a"])(r,"skyRadius",.6),Object(n["a"])(r,"isSafari",s["a"].detectSafari()),Object(n["a"])(r,"floorLogo",{name:"floorLogoImg.png",geometry:new o["Vector4"](2.5,2.5,1,1),size:100,position:new o["Vector3"](0,-1.49,0),renderOrder:99}),Object(n["a"])(r,"fishOption",{insideFOV:80,insideLookLimitUp:20,insideLookLimitDown:-20}),Object(n["a"])(r,"dollhouseDefault",{minDistance:15,maxDistance:150,minPolarAngle:o["Math"].degToRad(10),maxPolarAngle:o["Math"].degToRad(90)}),Object(n["a"])(r,"hideReticuleTimeout",1e3),Object(n["a"])(r,"analytics",{inactivityThreshold:30,sessionTrackingRate:.15,maxTrackedErrors:20,sessionDurationPingFrequency:10,sessionDurationTimeout:15}),Object(n["a"])(r,"flydown",{movementEasing:"easeInOutQuad",movementDelay:.001,rotationEasing:"easeInOutQuad",rotationDelay:.5,modelTextureDelay:.75,skyboxDelay:.75}),Object(n["a"])(r,"transition",{flySpeed:.01,flyTime:750,flytimeMaxDistanceThreshold:5,flytimeDistanceMultiplier:150,aimTime:1500,aimSlowFactor:1,blur:.8,movementEasing:"easeInOutQuad",blendEasing:"easeInOutQuad",fastForwardFactor:s["a"].valueFromHash("mfis",3)}),Object(n["a"])(r,"show360Views",{enabled:!0,transitionTime:1e3}),Object(n["a"])(r,"quickstart",{enabled:1===s["a"].valueFromHash("qust",0)||1===s["a"].valueFromHash("qs",0),animation:1400,showTextDelay:500,fadeOutDelay:3e3,fovChange:10}),Object(n["a"])(r,"appConfig",{webvr_version:null,segment_key:null,embedly_key:null,branch_key:null,keen_write_key:null,keen_project_id:null}),Object(n["a"])(r,"view360",{circleDisToCenter:2.4,visibleDisAtView:15}),Object(n["a"])(r,"share",{enabled:!s["a"].valueFromHash("mls",0)&&s["a"].valueFromHash("brand",!0)}),Object(n["a"])(r,"input",{longTapThreshold:200,moveToleranceNDC:.02,touchMoveThreshold:25}),Object(n["a"])(r,"help",{modalStayDuration:600}),Object(n["a"])(r,"immersive",{timeToShowAgain:1250,uiStayDuration:600}),Object(n["a"])(r,"tourInteraction",{disabled:"0"===s["a"].valueFromHash("tourcta",null),showPauseButton:1e3,showModal:1500,allowNextClick:200,largeModal:"1"===s["a"].valueFromHash("tourcta",null),smallModal:"2"===s["a"].valueFromHash("tourcta",null)}),Object(n["a"])(r,"labels",{enabled:!1,hideUntilStart:!0,fadeInDuration:250,fadeInDelay:250,fadeOutDuration:250,fadeOutDelay:0,zoomHideThreshhold:{mobile:s["a"].isSmallScreen()?.45:.6,desktop:2},zoomTruncateThreshhold:{mobile:s["a"].isSmallScreen()?.35:.45,desktop:.85},minLengthForTruncate:16,truncateLength:12,truncateSuffix:"..."}),Object(n["a"])(r,"tags",{enabled:s["a"].valueFromHash("mt",1),startup:{hideUntilStart:!0,fadeInDuration:500,fadeInDelay:100},visibility:{anyDistance:!0,visibleDistance:8,cameraClearance:.1,alphaTestLevel:.05,hideViaFloor:!0,hideOffScreenDisc:!1,hideOffScreenObject:!1},disc:{opacity:1,disabledOpacity:.5,scale:{nearBound:1.5,farBound:4.8,linkFarBound:!1,linkPercent:40,maxSize:80,minSize:40,baseViewportSize:800,responsiveness:100}},pole:{enabled:!0,height:.5,width:2,opacity:.5,color:"white"},navigate:{nearestPano:!0,lineOfSight:!0,reactivate:!0,aimAt:"disc",tiltTolerance:s["a"].isMobile()?7:25,rotateSpeedFactor:.9}}),Object(n["a"])(r,"path",{color:u["a"].lightGreen,colorUp:u["a"]._desat(u["a"].newBlue,.5),colorDown:u["a"]._darken(u["a"].newBlue,.35),opacity:.5,style:"ribbon",height:.01,ribbonWidth:.24,outsideHeight:.5,waypointRadius:.5,waypointIndoorRadius:.24,waypointPulse:1e3,typ:d["a"].BLACK,meshFree:s["a"].valueFromHash("mf",1),mapGuides:s["a"].valueFromHash("guides",!0),fadeInTime:400,fadeOutTime:300}),Object(n["a"])(r,"warp",{nearPanoDist:.1,matchCam:!1,blur:.33,fastTime:1500,teleportTime:1e3,outsideTime:2e3,lookAheadMax:.3,lookAheadDist:2.5,softPushDist:.37,softPushEnd:.3,softBendAngle:8,softBendTilt:4,softBendEnd:.3,doBurns:s["a"].valueFromHash("kb",!0),burnsAngle:35,minBurnsAngle:35,minDownAngle:-35,maxTurnPerSec:280,maxAimPerSec:35,minRotation:12,maxAimRotation:33.2,turnFriction:.2,flySpeed:.01,minWarpTime:1200,warpInterruptionRedirectTime:500,tourStepDelay:s["a"].valueFromHash("st",0),walkDelay:0,walkMaxDist:50,walkMinDist:.8,walkSlideShowThreshhold:3e3,walkExtraPanosDistance:.4,timePerMeter:800,motionLeadTime:500,movementEasing:"easeInOutQuad",blendEasing:"easeInOutQuad",showBunny:!1,loop:s["a"].valueFromHash("lp",!1),auto:s["a"].valueFromHash("ts",-1),eOrder:"YXZ",stepFactor:.25,brakeStrength:2,minBrakeAngle:.1,maxBrakeAngle:1.8,climbEffort:4}),Object(n["a"])(r,"rotationFriction",s["a"].isMobile()?.11:.05),Object(n["a"])(r,"rotationAccelerationInside",4.5),Object(n["a"])(r,"rotationAccelerationOutside",.15),Object(n["a"])(r,"rotationAfterMoveMultiplierX",s["a"].isMobile()?120:40),Object(n["a"])(r,"rotationAfterMoveMultiplierY",40),Object(n["a"])(r,"rotationAfterMoveHistoryCount",5),Object(n["a"])(r,"panFriction",.09),Object(n["a"])(r,"panAccelerationOutside",60),Object(n["a"])(r,"onload",s["a"].valueFromHash("onload",h["a"].PANORAMA)),Object(n["a"])(r,"zoomNearLimit",.3),Object(n["a"])(r,"zoomFarLimit",10),Object(n["a"])(r,"navigation",{panoScores:!1,mouseDirection:!0,filterStrictness:.75,angleFactor:-30,directionFactor:10,distanceFactor:-1,optionalityFactor:3}),Object(n["a"])(r,"sdkInit",!1),Object(n["a"])(r,"secretPanelWord",[38,38,40,40,37,39,37,39,66,65]),Object(n["a"])(r,"console",s["a"].valueFromHash("console",!1)),Object(n["a"])(r,"noMeshFloorPositionOffset",new o["Vector3"](0,-1.2,0)),Object(n["a"])(r,"panoramaNeighbourMaxDistance",5),Object(n["a"])(r,"panoFloorClickRadius",.35),Object(n["a"])(r,"showScreenshotLocations",!1),Object(n["a"])(r,"showAxis",!1),Object(n["a"])(r,"showNeighbourRaycasts",!1),Object(n["a"])(r,"colorMarkerOnLoad",!1),Object(n["a"])(r,"colorMarkerByFloor",!1),Object(n["a"])(r,"tiling",{panoPreRenderRepeatDelay:2500,panoPreRenderDelay:500,preRenderTourPanos:s["a"].valueFromHash("tileprerender",0),tilingFlagNames:["usetiles","tiles"],maxNavPanoQuality:s["a"].valueFromHash("maxtileq",null),maxZoomPanoQuality:s["a"].valueFromHash("maxztileq",null),overlayStyle:s["a"].valueFromHash("tileoverlay",0),uploadIntervalDelay:s["a"].valueFromHash("tileupdelay",10),initialIntervalDelay:s["a"].valueFromHash("itiledelay",0),maxNonBaseUploadsPerFrame:s["a"].valueFromHash("maxnbtpf",2),maxBaseUploadsPerFrame:s["a"].valueFromHash("maxbtpf",6),customCompression:s["a"].valueFromHash("tilecustcomp",0),mobileHighQualityOverride:!1,allowUltraHighResolution:!0}),Object(n["a"])(r,"zoom",{enabled:!p["a"].isEdit,forceOff:s["a"].valueFromHash("nozoom",0),overridemax:s["a"].valueFromHash("maxzoom",null),overridemin:s["a"].valueFromHash("minzoom",null),max:f,min:1,transitionStyle:s["a"].valueFromHash("zoomtrans",1),activationThreshold:1.1,restoreTime:500}),Object(n["a"])(r,"profiling",{enabled:s["a"].valueFromHash("mem",!1)}),Object(n["a"])(r,"transitioning",{reticuleOpacity:0,markerOpacity:.3,markerOpacityOnHover:1}),Object(n["a"])(r,"floorplan-dollhouse",{rotationDelay:0,rotationDuration:1}),Object(n["a"])(r,"floorplan-panorama",{rotationDelay:.5,rotationDuration:1}),Object(n["a"])(r,"dollhouse-panorama",{rotationDelay:.5,rotationDuration:1}),Object(n["a"])(r,"dollhouse-floorplan",{rotationDelay:0,rotationDuration:1,cameraMatrixDuration:1.05,cameraMatrixDelay:.5}),Object(n["a"])(r,"panorama-dollhouse",{rotationDelay:0,rotationDuration:.5}),Object(n["a"])(r,"panorama-floorplan",{transitionTime:1500,rotationDelay:0,rotationDuration:.5}),r);m.insideFOV=s["a"].valueFromHash("fov",m.insideFOV),m.insideFOVMax=s["a"].valueFromHash("fovmax",m.insideFOVMax),m.panorama={transitionTime:1e3,modelAlpha:0,modelAlphaDelay:m.flydown.modelTextureDelay,modelAlphaLength:1,skyboxOpacity:1,skyboxOpacityDelay:m.flydown.skyboxDelay,skyboxOpacityLength:.9,fovLength:1,fovDelay:0,cameraMatrixDuration:.8,cameraMatrixDelay:0,cameraMatrixEase:l["a"].easeInCubic,reticuleOpacity:1,markerOpacity:.3,markerOpacityOnHover:1},m.dollhouse={transitionTime:1e3,modelAlpha:1,modelAlphaDelay:0,modelAlphaLength:1-m.flydown.modelTextureDelay,skyboxOpacity:0,skyboxOpacityDelay:0,skyboxOpacityLength:1-m.flydown.skyboxDelay,fovLength:1,fovDelay:0,cameraMatrixDuration:.8,cameraMatrixDelay:.3,cameraMatrixEase:l["a"].easeInOutQuad,reticuleOpacity:1,markerOpacity:0,markerOpacityOnHover:0},m.floorplan={transitionTime:1e3,modelAlpha:1,modelAlphaDelay:0,modelAlphaLength:1-m.flydown.modelTextureDelay,skyboxOpacity:0,skyboxOpacityDelay:0,skyboxOpacityLength:1-m.flydown.skyboxDelay,fovLength:1,fovDelay:0,cameraMatrixDuration:.5,cameraMatrixDelay:0,cameraMatrixEase:l["a"].easeOutCubic,reticuleOpacity:1,markerOpacity:0,markerOpacityOnHover:0,cameraHeight:50},m.path.meshFree&&(m.path.typ=d["a"].WALK),m.zoom.max=m.zoom.overridemax||m.zoom.max,m.zoom.min=m.zoom.overridemin||m.zoom.min,m.option={autoload:!1,floors:!0,local:!1,useVisionModelData:!0},m.modelMeta={name:"四维时代",status:"viewable",floors:"",metainfo:{allowed_methods:["GET","OPTIONS","HEAD"]},image:"http://7xo6he.com2.z0.glb.qiniucdn.com/images/images1/07.13.2015_16.22.30.jpg",images:[],job:{uuid:"dacf7dfa24ae47fab8fcebfe4dc41ab9"},layers:[]},m.HorizontalBlurShader=new o["ShaderPass"](o["HorizontalBlurShader"]),m.VerticalBlurShader=new o["ShaderPass"](o["VerticalBlurShader"]),m.VerticalBlurShader.renderToScreen,m.aspect=window.innerWidth/window.innerHeight,isNaN(m.aspect)&&(m.aspect=1),m.sphereBufferGeometry=new o["SphereBufferGeometry"](.04,p["a"].isMobile?4:8,p["a"].isMobile?3:6),m.freeze=Object.freeze({FlyToPano:c["a"].getUniqueId(),FlyToNewMode:c["a"].getUniqueId(),FlyToSameMode:c["a"].getUniqueId(),FlyToViewFloor:c["a"].getUniqueId(),LookTransition:c["a"].getUniqueId(),ZoomTransition:c["a"].getUniqueId(),LookRotationForPlay:c["a"].getUniqueId(),wallLineShine:c["a"].getUniqueId(),spotShine:c["a"].getUniqueId(),rulerShine:c["a"].getUniqueId(),outsideFocus:c["a"].getUniqueId(),shopCircle:c["a"].getUniqueId()}),m.billboardSettings=Object.freeze({animation:Object.freeze({hoverOnClosing:!1,openDelay:100,closeDelay:50,openDuration:500,closeDuration:300}),boardToDiscRatio:1.15});t["a"]=m},a1f6:function(e,t,i){"use strict";i("8e6e"),i("456d"),i("6b54"),i("2397"),i("5df3"),i("f400"),i("a481");var n=i("ade3"),o=(i("ac6a"),i("9c29"),i("63d9"),i("d4ec")),a=i("bee2"),r=i("257e"),s=i("262e"),l=i("99de"),c=i("7e84"),u=i("6860"),d=i("ec11"),h=i("01d8"),p=i("823b"),f=i("eb02");function m(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function v(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?m(Object(i),!0).forEach((function(t){Object(n["a"])(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):m(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function g(e){var t=y();return function(){var i,n=Object(c["a"])(e);if(t){var o=Object(c["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(l["a"])(this,i)}}function y(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}t["a"]=new(function(e){Object(s["a"])(i,e);var t=g(i);function i(){var e;return Object(o["a"])(this,i),e=t.call(this),e.modelProcess=Object(r["a"])(e),e}return Object(a["a"])(i,[{key:"convertProtobufToSceneObject",value:function(e){function t(e){var t=new THREE.BufferGeometry;return t.addAttribute("position",new THREE.BufferAttribute(new Float32Array(e.vertices.xyz,0,3),3)),e.vertices.uv.length>0&&t.addAttribute("uv",new THREE.BufferAttribute(new Float32Array(e.vertices.uv,0,2),2)),t.setIndex(new THREE.BufferAttribute(new Uint32Array(e.faces.faces,0,1),1)),t.applyMatrix(i),t.computeBoundingBox(),new h["a"]({geometry:t,textureName:e.material_name,name:e.chunk_name})}if(0==e.chunk.length)return p["a"].error("No chunks in damfile...请检查模型文件"),[];var i=new THREE.Matrix4;return i.set(1,0,0,0,0,0,1,0,0,-1,0,0,0,0,0,1),e.chunk.map(t)}},{key:"visionModeldata",value:function(e){var t;e.sweepLocations.forEach((function(e){e.visibles3=e.visibles3||[],e.visibles.forEach((function(t){-1==e.visibles3.indexOf(t)&&e.visibles3.push(t)}))}));for(var i=e.sweepLocations.length,n=0;n<i;n++){var o=e.sweepLocations[n].visibles2&&e.sweepLocations[n].visibles2.length||0;if(o>0){t=!0;break}}t||(e.sweepLocations.forEach((function(e){e.visibles2=null})),p["a"].info("检测到疑似没有noblock数据,应该是手动上传,block置空"));var a=e.sweepLocations.map((function(e){return v(v({},e),{},{uuid:e.uuid.toUTF8().replace(/-/g,"")})}));f["a"].commit("scene/setVisitionAjk",a.map((function(e){var t=v({},e);return delete t.visibles2,delete t.visibles3,t})));var r=a.map(function(e){return{uuid:e.uuid,position:{x:e.pose.translation.x,y:e.pose.translation.y,z:e.pose.translation.z},quaternion:{x:e.pose.rotation.x,y:e.pose.rotation.y,z:e.pose.rotation.z,w:e.pose.rotation.w},puck:{x:e.puck.x,y:e.puck.y,z:e.puck.z},alignmentType:e.alignment_type,neighbours:e.visibles3||e.visibles,noBlocks:e.visibles2,seeMarkers:e.visibles,group:e.group,subgroup:e.subgroup}}.bind(this)).map(function(e){return e.position=this.convertVisionVector(e.position),e.quaternion=this.convertVisionQuaternion(e.quaternion),e.puck=this.convertVisionVector(e.puck),e}.bind(this));return r.forEach((function(e){e.neighbours=e.neighbours.map((function(e){return r[e].uuid}))})),r.forEach((function(e){e.noBlocks&&(e.noBlocks=e.noBlocks.map((function(e){return r[e].uuid})))})),r.forEach((function(e){e.seeMarkers&&(e.seeMarkers=e.seeMarkers.map((function(e){return r[e].uuid})))})),r}},{key:"panos",value:function(e,t,i){var n=new Map;return i&&i.data&&i.data.forEach((function(e){n.set(e.id,{tsSize:e.tsSize})})),e.extend(t.map(function(e){return new d["a"](this.player.model,e.uuid,e,n.get(e.uuid))}.bind(this))),e.forEach((function(t){t.neighbourUUIDs&&(t.neighbourUUIDs.forEach((function(i){var n=e.get(i);n&&e.setNeighbour(t,n,!0)})),t.neighbourPanos=e.getNeighbours(t)||e.setNeighbour(t,t,!0))})),0===e.length&&p["a"].warn("Model has no panos, turning off inside mode"),e}},{key:"panosAssist",value:function(e,t){return e.map(function(e){return new d["a"](t,e.uuid,e)}.bind(this))}},{key:"convertVisionVector",value:function(e){var t=new THREE.Vector3(e.x,e.z,-e.y);return t}},{key:"convertVisionQuaternion",value:function(e){var t=new THREE.Quaternion(e.x,e.z,-e.y,e.w).multiply((new THREE.Quaternion).setFromAxisAngle(new THREE.Vector3(0,1,0),THREE.Math.degToRad(90)));return t}},{key:"convertWorkshopVector",value:function(e){return new THREE.Vector3(-e.x,e.y,e.z)}},{key:"convertWorkshopQuaternion",value:function(e){return new THREE.Quaternion(-e.x,e.y,e.z,-e.w).multiply(new THREE.Quaternion(Math.sqrt(2)/2,Math.sqrt(2)/2,0,0))}}]),i}(u["default"]))},a46c:function(e,t,i){"use strict";var n={ContextCreated:"scene-renderer-context-created",AfterRender:"after-render",MemoryUsageUpdated:"scene-renderer-memory-usage-updated"};t["a"]=n},a59a:function(e,t,i){"use strict";i("6762"),i("2fdb"),i("7514");var n=i("4c16"),o=i("6860"),a=i("f121"),r=i("eb02"),s=(i("bc19"),i("9ef6"));function l(e){this.position=e.pos,this.elem=$('<div class="door show-arrow" style="display:none"><a>阳台</a></div>'),this.text=e.text||"",this.elem.find("a").html(this.text),e.container?e.container.append(this.elem):$(".widgets-doors").append(this.elem),o["objects"].player.doorLabels.push(this),this.toPano=e.toPano,this.enable=void 0==e.enable||e.enable,this.elem.on("click",this.clickFuc.bind(this)),this.type="door",this.aim=e.aim,this.door=e.door,this.visiblePanos=e.visiblePanos,this.sameRoomPanos=e.sameRoomPanos,this.pos2d=new THREE.Vector3,this.doorDir=e.doorDir,this.getDirection(),this.updateVisible(),this.floorIndex=e.floorIndex}l.prototype.updateVisible=function(e){e?this.sameRoomPanos.includes(e)||(this.enable=!1):this.visiblePanos.includes(o["objects"].player.currentPano)?this.enable=!0:this.enable=!1},l.prototype.update=function(){if("panorama"!==o["objects"].player.mode||!this.enable||!this.text||s["a"].vrEnabled&&s["a"].vrSplitScreen||a["a"].isEdit&&(o["objects"].mainDesign&&o["objects"].mainDesign.editing||o["objects"].player.linkEditor&&(o["objects"].player.linkEditor.setPanoVisible||o["objects"].player.linkEditor.setTagVisible)||"cad"==r["a"].getters.page||"data"==r["a"].getters.page))this.elem.css("display","none");else{var e=n["a"].getPos2d(this.position);e.trueSide?(this.elem.css({left:e.pos.x+"px",top:e.pos.y+"px"}),s["a"].vrEnabled?this.elem.css({transform:"rotate("+window.screenFaceOrient+"deg)"}):this.elem.css({transform:""}),this.elem.css("display",""),this.pos2d=e.vector):this.elem.css("display","none")}},l.prototype.getDirection=function(){var e=u(this.doorDir);this.elem.addClass(e)},l.prototype.clickFuc=function(){this.toPano?o["objects"].player.flyToPano({pano:this.toPano,lookAtPoint:this.aim.clone().setY(this.toPano.position.y),duration:1800}):console.error("doorlabel没有toPano")},l.prototype.remove=function(){this.elem.remove();var e=o["objects"].player.doorLabels.indexOf(this);e>-1&&o["objects"].player.doorLabels.splice(e,1)};var c={forward:new THREE.Vector3(0,0,-1),back:new THREE.Vector3(0,0,1),left:new THREE.Vector3(-1,0,0),right:new THREE.Vector3(1,0,0)},u=function(e){for(var t in c){var i=c[t].clone().dot(e.setY(0).normalize()),n=Math.acos(i);if(n<Math.PI/4)return t}console.warn("没有找到朝向..")};l.updateCameraDir=function(){if("panorama"==o["objects"].player.mode&&0!=o["objects"].player.doorLabels.length){var e=o["objects"].player.getDirection(),t=u(e);$(".widgets-doors").attr("data-camera-toward",t)}},t["a"]=l},a830:function(e,t,i){var n={"./decor/App.vue":["aec5","chunk-c93e8616","chunk-6ca29966","chunk-725787b4"],"./discover/App.vue":["12e8","chunk-7b339d63"],"./embed/App.vue":["a7b3","chunk-c93e8616","chunk-6ca29966","chunk-421c2132"],"./fire-control/App.vue":["a891","chunk-c93e8616","chunk-6ca29966","chunk-2c83f0e0"],"./fire/App.vue":["ae91","chunk-c93e8616","chunk-6ca29966","chunk-38afcdac"],"./grave/App.vue":["a0a5","chunk-c93e8616","chunk-6ca29966","chunk-1466078e"],"./kanzhan/App.vue":["28ad","chunk-c93e8616","chunk-6ca29966","chunk-147d07a8"],"./reserve/App.vue":["ba44","chunk-c93e8616","chunk-6ca29966","chunk-5e076204"],"./rtc-live/App.vue":["ccb8","chunk-c93e8616","chunk-6ca29966","chunk-4abcab2a"],"./shipin/App.vue":["3fd4","chunk-454cef53"],"./shop/App.vue":["d8e3","chunk-c93e8616","chunk-6ca29966","chunk-57c3f967"],"./vrhouse/App.vue":["bfd8","chunk-c93e8616","chunk-6ca29966","chunk-ed3be54e"]};function o(e){if(!i.o(n,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=n[e],o=t[0];return Promise.all(t.slice(1).map(i.e)).then((function(){return i(o)}))}o.keys=function(){return Object.keys(n)},o.id="a830",e.exports=o},aa1f:function(e,t,i){"use strict";i("6b54"),i("2397"),i("0d6d"),i("a481"),i("20d6");var n=i("d4ec"),o=i("bee2"),a=i("257e"),r=i("262e"),s=i("99de"),l=i("7e84"),c=i("ade3"),u=i("6860"),d=i("ca21"),h=i("d58c"),p=i("b8d5"),f=i("d108"),m=i("0ddb"),v=i("9ef6"),g=i("b775"),y=i("f121");function b(e){var t=w();return function(){var i,n=Object(l["a"])(e);if(t){var o=Object(l["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(s["a"])(this,i)}}function w(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var E=function(e){Object(r["a"])(i,e);var t=b(i);function i(e){var o;return Object(n["a"])(this,i),o=t.call(this),Object(c["a"])(Object(a["a"])(o),"forceQueueTilesForPano",function(){var e=[],t=[];return function(i,n,o,a,r,s){e.length=0;for(var l=this.getTileDownloadDescriptors(i,n),c=0;c<l.length;c++){var u=l[c];u.status!==f["a"].None&&u.status!==f["a"].Queued||e.push(u)}if(o&&e.length>0){h["a"].sortPanoTiles(e,i,o),t.length=0,p["a"].matchingTilesInDirection(i,n,o,a,r,t);for(var d=0,m=function(e){return e.face===v.face&&e.faceTileIndex===v.faceTileIndex};d<e.length;){var v=e[d],g=t.findIndex(m);g<0?e.splice(d,1):d++}}for(var y=0;y<e.length;y++)this.forceQueue.push(e[y]);this.setStatusForAllDescriptors(this.forceQueue,f["a"].ForceQueued),this.clearFromQueue(this.priorityQueue,f["a"].ForceQueued,!1),s&&this.processQueueForDownloading(this.forceQueue,!0)}}()),Object(c["a"])(Object(a["a"])(o),"cleanupActiveDownloads",function(){var e=[];return function(){e.length=0;for(var t=0;t<this.activeDownloads.length;t++){var i=this.activeDownloads[t];i.status!==f["a"].Downloaded&&i.status!==f["a"].Failed&&e.push(i)}this.activeDownloads.length=0,this.activeDownloads.push.apply(this.activeDownloads,e)}}()),Object(c["a"])(Object(a["a"])(o),"getTileUrl",function(){var e={256:"256",512:"512",1024:"1k",2048:"2k",4096:"4k"},t={face:-1,faceTileIndex:-1,tileX:-1,tileY:-1};return function(i,n,o,a,r){var s=this.store.getters["scene/metadata"];p["a"].getTileLocation(n,a,t);var l=Math.floor(n/o),c=l*l,d=Math.floor(a/c),h="",f="";if(1===v["a"].tiling.customCompression&&"_"+v["a"].tiling["q"+e[n]],10==s.sceneScheme?(h="tiles/4k/"+i+"_skybox"+d+".jpg?x-oss-process=","512"==e[n]?h+="image/resize,h_512":("1k"==e[n]||"2k"==e[n]?h+="image/resize,m_lfit,w_"+n+"/crop,w_512,h_512,":h="tiles/4k/"+i+"_skybox"+d+".jpg?x-oss-process=image/crop,w_512,h_512,",0==t.tileX?h+="x_0,":h+="x_"+(512*t.tileX-1)+",",0==t.tileY?h+="y_0":h+="y_"+(512*t.tileY-1)),h=this.getTiles(h),f="&"):11==s.sceneScheme?(h="tiles/2k/"+i+"_skybox"+d+".jpg?x-oss-process=","512"==e[n]?h+="image/resize,h_512":("1k"==e[n]||"2k"==e[n]?h+="image/resize,m_lfit,w_"+n+"/crop,w_512,h_512,":h="tiles/2k/"+i+"_skybox"+d+".jpg?x-oss-process=image/crop,w_512,h_512,",0==t.tileX?h+="x_0,":h+="x_"+(512*t.tileX-1)+",",0==t.tileY?h+="y_0":h+="y_"+(512*t.tileY-1)),h=this.getTiles(h),f="&"):12==s.sceneScheme?(h="tiles/1k/"+i+"_skybox"+d+".jpg?x-oss-process=","512"==e[n]?h+="image/resize,h_512":(h="tiles/1k/"+i+"_skybox"+d+".jpg?x-oss-process=image/crop,w_512,h_512,",0==t.tileX?h+="x_0,":h+="x_"+(512*t.tileX-1)+",",0==t.tileY?h+="y_0":h+="y_"+(512*t.tileY-1)),h=this.getTiles(h),f="&"):(h=this.getTiles("tiles/"+i+"/"+e[n]+"_face"+d+"_"+t.tileX+"_"+t.tileY+".jpg"),f="?"),"undefined"!=typeof this.store.getters["scene/metadata"].imagesVersion&&(h+=f+"imagesVersion="+this.store.getters["scene/metadata"].imagesVersion),"360view"==r){if(h=h.replace("tiles/",(y["a"].isEdit?"panorama_edit/"+i:"panorama/"+i)+"/tiles/"),!u["objects"].player.linkViewManager.views[i])return;var m=u["objects"].player.linkViewManager.views[i].panoImgVersion;h+="&"+m}return h}}()),o.panos=null,o.retryMinimumTime=1e4,o.panoLoadCallbacks={},o.downloadDescriptors={},o.priorityQueue=[],o.forceQueue=[],o.activeDownloads=[],o.tilePrioritizer=null,o.refreshInterval=null,o.processPriorityQueue=!1,o.concurrentDownloads=6,o.downloadTestResults={},o.freeze=Object.freeze({Testing:1,Success:2,Fail:3}),o.index=e||0,o}return Object(o["a"])(i,[{key:"setPanoData",value:function(e,t,i){this.panos=e,this.imagePanos=t,this.panoGroupId=i}},{key:"start",value:function(){this.refreshUpdateInterval(0)}},{key:"stop",value:function(){window.cancel(this.refreshInterval)}},{key:"refreshUpdateInterval",value:function(e){e||(e=0),this.refreshInterval=window.setTimeout(function(){var e=this.update();e?this.refreshUpdateInterval(i.ACTIVE_REFRESH_DELAY):this.refreshUpdateInterval(i.IDLE_REFRESH_DELAY)}.bind(this),e)}},{key:"update",value:function(){var e=this.forceQueue.length>0;return this.processQueueForDownloading(this.forceQueue),this.processPriorityQueue&&(this.queuePrioritizedTilesForPanos(this.panos),this.priorityQueue.length>0&&(e=!0),this.processQueueForDownloading(this.priorityQueue)),e}},{key:"queuePrioritizedTilesForPanos",value:function(e){this.tilePrioritizer&&(this.clearQueue(this.priorityQueue),this.tilePrioritizer.filterAndPrioritize(this.priorityQueue,e,this),this.clearFromQueue(this.priorityQueue,f["a"].None,!0),this.setStatusOrRemoveForAllDescriptors(this.priorityQueue,f["a"].Queued))}},{key:"clearQueue",value:function(e){this.setStatusForAllDescriptors(e,f["a"].None),e.length=0}},{key:"clearForceQueue",value:function(){this.clearQueue(this.forceQueue)}},{key:"clearFromQueue",value:function(e,t,i){for(var n=0;n<e.length;n++){var o=e[n];o&&(t===o.status&&!i||t!==o.status&&i)&&(e[n]=null)}}},{key:"setStatusForAllDescriptors",value:function(e,t){for(var i=0;i<e.length;i++){var n=e[i];n&&(n.status=t)}}},{key:"setStatusOrRemoveForAllDescriptors",value:function(e,t){for(var i=0;i<e.length;i++){var n=e[i];n&&(n.status!==t?n.status=t:e[i]=null)}}},{key:"getTileDownloadDescriptors",value:function(e,t){var i=this.getAllTileDownloadDescriptorsForPano(e),n=i[t];return n||(n=this.buildDownloadDescriptorArray(t),i[t]=n,this.initTileDownloadDescriptors(n,e,t)),n}},{key:"getAllTileDownloadDescriptorsForPano",value:function(e){var t=this.downloadDescriptors[e.id];return t||(t={},this.downloadDescriptors[e.id]=t),t}},{key:"processQueueForDownloading",value:function(e,t){if(this.cleanupActiveDownloads(),this.activeDownloads.length<this.concurrentDownloads||t)for(var i=t?e.length:this.concurrentDownloads-this.activeDownloads.length,n=0,o=0;n<i&&e.length>0;o++){var a=e.shift();a&&(this.startDownload(a),n++)}}},{key:"testDownload",value:function(e,t,i){var n=this.downloadTestResults[e];if(n)n===this.freeze.Success?i(!0):n===this.freeze.Fail&&i(!1);else{this.downloadTestResults[e]=this.freeze.Testing;var o=this.panos.list[0],a=this.getTileUrl(o.id,e,t,0),r=function(t){this.downloadTestResults[e]=this.freeze.Success,i(!0)}.bind(this),s=function(){this.downloadTestResults[e]=this.freeze.Fail,i(!1)}.bind(this);this.loadImage(a,0,r,s)}}},{key:"startDownload",value:function(e){e.status=f["a"].Downloading;var t=this.getTileUrl(e.pano.id,e.panoSize,e.tileSize,e.tileIndex,e.pano.alignmentType);t&&(this.activeDownloads.push(e),this.loadImage(t,i.DOWNLOAD_RETRIES,this.downloadComplete.bind(this,e),this.downloadFailed.bind(this,e)))}},{key:"downloadFailed",value:function(e,t){}},{key:"downloadComplete",value:function(e,t){if(e.panoGroupId===this.panoGroupId){var i=this.getPanoLoadCallbacks(e.pano,e.panoSize);e.status=f["a"].Downloaded,i&&i.onProgress&&i.onProgress(e.pano,e.panoSize);var n={panoId:e.pano.id,image:t,tileSize:e.tileSize,panoSize:e.panoSize,tileIndex:e.tileIndex,faceTileIndex:e.faceTileIndex,totalTiles:e.totalTiles,face:e.face,tileX:e.tileX,tileY:e.tileY,direction:e.direction};e.image=t,this.emit(d["a"].TileDownloadSuccess,n),this.isPanoDownloaded(e.pano,e.panoSize)&&(n={panoId:e.pano.id,tileSize:e.tileSize,panoSize:e.panoSize},this.emit(d["a"].PanoDownloadComplete,n),i&&i.onLoad&&i.onLoad(e.pano,e.panoSize))}}},{key:"isPanoDownloaded",value:function(e,t){var i=this.getTileDownloadDescriptors(e,t);if(i.length<=0)return!1;for(var n=0;n<i.length;n++){var o=i[n];if(o.status!==f["a"].Downloaded)return!1}return!0}},{key:"setPanoLoadCallbacks",value:function(e,t,i,n,o){var a=e.id+":"+this.qualityManager.getPanoSize(t);this.panoLoadCallbacks[a]={onLoad:i,onFail:n,onProgress:o}}},{key:"getPanoLoadCallbacks",value:function(e,t){var i=e.id+":"+t;return this.panoLoadCallbacks[i]}},{key:"buildDownloadDescriptorArray",value:function(e){for(var t=p["a"].getTileCountForSize(e),i=[],n=0;n<t;n++){var o=this.buildDownloadDescriptor();i.push(o)}return i}},{key:"buildDownloadDescriptor",value:function(){var e={panoGroupId:null,pano:null,panoSize:-1,tileSize:-1,tileIndex:-1,totalTiles:-1,faceTileIndex:-1,status:f["a"].None,url:null,image:null,direction:new THREE.Vector3,face:-1,cubeFace:-1,tileX:-1,tileY:-1};return e}},{key:"initTileDownloadDescriptors",value:function(e,t,i){for(var n=0;n<e.length;n++){var o=e[n];this.initTileDownloadDescriptor(o,t,i,n)}}},{key:"initTileDownloadDescriptor",value:function(e,t,i,n){var o=i>=p["a"].TILE_SIZE?p["a"].TILE_SIZE:i;e.face=p["a"].getFaceForTile(i,n),e.cubeFace=m["a"].mapFaceToCubemapFace(e.face),e.panoGroupId=this.panoGroupId,e.pano=t,e.panoSize=i,e.tileSize=o,e.tileIndex=n,e.totalTiles=p["a"].getTileCountForSize(i),e.status=f["a"].None,e.image=null,p["a"].getTileLocation(e.panoSize,e.tileIndex,e),p["a"].getTileVector(e.panoSize,e.tileSize,e.cubeFace,e.tileX,e.tileY,p["a"].LocationOnTile.Center,0,e.direction)}},{key:"getTiles",value:function(e){return y["a"].urls.tileImgPath+e}},{key:"loadImage",value:function(e,t,i,n){g["a"].loadImage(e,t).then((function(e){i(e)})).fail(n)}}]),i}(u["default"]);E.tilegen=!0,E.IDLE_REFRESH_DELAY=500,E.ACTIVE_REFRESH_DELAY=16,E.DOWNLOAD_RETRIES=4,t["a"]=E},ab89:function(e,t,i){"use strict";i("6b54"),i("2397"),i("ac6a"),i("673e");var n=i("d4ec"),o=i("bee2"),a=i("257e"),r=i("262e"),s=i("99de"),l=i("7e84"),c=i("6860"),u=i("bc19"),d=i("3472"),h=(i("f121"),i("9923"));function p(e){var t=f();return function(){var i,n=Object(l["a"])(e);if(t){var o=Object(l["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(s["a"])(this,i)}}function f(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var m,v=.4,g=1.6,y=1.8,b=.2,w=new THREE.Vector3(0,0,-1),E=new THREE.MeshStandardMaterial({transparent:!0,color:new THREE.Color(1,1,1),opacity:.45});E.metalness=1,E.emissive.set(new THREE.Color(.85,.85,.85));var T=E.clone();T.opacity=.9;var P=function(e){Object(r["a"])(i,e);var t=p(i);function i(e,o){var r;Object(n["a"])(this,i),r=t.call(this);var s=4,l=r.createArrow();r.add(l),l.oriPosition=l.position.clone();for(var u=1;u<s;u++){var d=l.clone();d.position.setZ(u*y),d.oriPosition=d.position.clone(),r.add(d)}return r.name="entryArrow",c["objects"].model.add(Object(a["a"])(r)),r.scale.set(b,b,b),r.setPosition(e),r.currentHighLight=0,console.log("create entryArrow"),r}return Object(o["a"])(i,[{key:"createArrow",value:function(){var e=[{x:0,y:0},{x:1,y:g/2},{x:1,y:g},{x:0,y:g/2},{x:-1,y:g},{x:-1,y:g/2}],t=new THREE.Shape;t.moveTo(e[0].x,e[0].y);for(var i=1,n=e.length;i<n;i++)t.lineTo(e[i].x,e[i].y);t.lineTo(e[0].x,e[0].y),m||(m=new THREE.ExtrudeBufferGeometry(t,{depth:v,bevelEnabled:!1}));var o=new THREE.Mesh(m,E);return o.rotation.x=Math.PI/2,o}},{key:"setPosition",value:function(e){var t=app.store.getters["scene/metadata"]||{},i=new THREE.Vector3(e.pos[0],e.bottom+v*b,-e.pos[1]),n=new THREE.Vector3(e.pos[2],e.bottom+v*b,-e.pos[3]),o=i.clone().add(n).multiplyScalar(.5),a=new THREE.Vector3(e.ctl[0],e.bottom+v*b,e.ctl[1]);t.floorPlanAngle&&a.applyEuler(new THREE.Euler(0,parseFloat(t.floorPlanAngle),0)),a.z*=-1;var r=u["a"].getFootPoint(a,i,n),s=this.enterDir=a.clone().sub(r).normalize();e.direWithin&&(o.add(s.clone().multiplyScalar(i.distanceTo(n))),s.multiplyScalar(-1)),this.position.copy(o);var l=u["a"].getQuaBetween2Vector(w,s,new THREE.Vector3(0,1,0));this.quaternion.copy(l),this.addLabel(o,s,e.floorIndex),this.entryPos=o}},{key:"addLabel",value:function(e,t,i){var n=c["objects"].model.panos.closestPanoTowardPoint({point:e});n||console.error("what!!! no closetPano");var o=(3*y+g)*b;this.dollLabelOriPos=e.clone().sub(t.clone().multiplyScalar(o));var a=new d["a"]({sid:"entry",pos:this.dollLabelOriPos,driftDir:t,noLine:!0,text:h["a"].t("modules.model.attr_estart"),toPano:n,floorIndex:i});c["objects"].player.defaultRoomLabels.push(a),this.dollLabel=a}},{key:"moveCloseToWall",value:function(e){this.children.forEach((function(t){t.position.z=t.oriPosition.z+e})),this.dollLabel.position=this.dollLabelOriPos.clone().sub(this.enterDir.clone().multiplyScalar(e*b))}},{key:"reSetHeight",value:function(e){this.position.setY(e),this.dollLabel.position.y=e,this.dollLabelOriPos.y=e}},{key:"animate",value:function(){var e=this;this.children.forEach((function(t,i){i==e.currentHighLight?t.material=T:t.material=E})),this.currentHighLight=(this.currentHighLight-1+this.children.length)%this.children.length,this.stopAnimation(),this.animation=setTimeout(this.animate.bind(this),200)}},{key:"stopAnimation",value:function(){clearTimeout(this.animation),this.animation=null}},{key:"dispose",value:function(){this.parent.remove(this),this.stopAnimation()}},{key:"show",value:function(){this.visible=!0,this.animate()}},{key:"hide",value:function(){this.visible=!1,this.stopAnimation()}}]),i}(THREE.Object3D);P.switchDepthTest=function(e){E.depthTest=e,T.depthTest=e},t["a"]=P},ae62:function(e,t){THREE.RenderPass=function(e,t,i,n,o){this.scene=e,this.camera=t,this.overrideMaterial=i,this.clearColor=n,this.clearAlpha=void 0!==o?o:1,this.oldClearColor=new THREE.Color,this.oldClearAlpha=1,this.enabled=!0,this.clear=!0,this.needsSwap=!1},THREE.RenderPass.prototype={render:function(e,t,i,n){this.scene.overrideMaterial=this.overrideMaterial,this.clearColor&&(this.oldClearColor.copy(e.getClearColor()),this.oldClearAlpha=e.getClearAlpha(),e.setClearColor(this.clearColor,this.clearAlpha)),e.render(this.scene,this.camera,i,this.clear),this.clearColor&&e.setClearColor(this.oldClearColor,this.oldClearAlpha),this.scene.overrideMaterial=null}}},aeb9:function(e,t,i){"use strict";var n={DEFAULT:0,PANOMARKERS:1,RETICULE:2,TAG:3,BothAtMainAndSubScreen:4,SubScreen:5};t["a"]=n},aed5:function(e,t,i){"use strict";var n=i("d9c2"),o={ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,LEFTARROW:37,UPARROW:38,RIGHTARROW:39,DOWNARROW:40,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,SPACE:32,RETURN:13,SEMICOLON:186,PLUSEQUALS:187,DASHUNDERSCORE:189,OPENBRACKET:219};n["a"].detectFirefox()&&(o.SEMICOLON=59,o.PLUSEQUALS=61,o.DASHUNDERSCORE=173),t["a"]=o},b235:function(e,t,i){"use strict";i("ac6a"),i("7f7f");var n=i("1158"),o={globalDone:null,funcs:[],counter:0,uniqueID:0,start:function(e,t,i,o,a,r,s,l){return o=o||0,this.funcs.push({func:e,current:-o*Math.abs(t),duration:(1-Math.max(o,0))*Math.abs(t),done:i,easing:a||n["a"].linearTween,cycling:t<0,running:!0,debug:o<0,name:r||"T"+this.counter,id:void 0===s?this.counter:s,paused:!1,cancelFun:l}),e(0,16),this.counter+=1,e},trigger:function(e){var t=void 0===e.delayRatio?0:e.delayRatio,i=e.func||function(){},o=void 0===e.duration?0:e.duration;void 0!==e.cycling&&e.cycling&&(o=-Math.abs(o));var a=e.done||null,r=e.easing||n["a"].linearTween,s=e.name||"R"+this.counter,l=void 0===e.id?this.counter:e.id;return this.start(i,o,a,t,r,s,l)},setTimeout:function(e,t,i){var n=void 0===i?this.counter:i;return this.trigger({done:e,duration:void 0===t?0:t,name:"O"+this.counter,id:n})},pause:function(){this.paused=!0},resume:function(){this.paused=!1},update:function(e){this.funcs.forEach((function(t){if(!(t.paused||(t.current+=1e3*e,t.current<0)))if(t.current>=t.duration&&!t.cycling){var i=t.easing(1,0,1,1);t.func(i,1e3*e),t.done&&t.done(),t.running=!1}else{var n=t.easing(t.current%t.duration/t.duration,0,1,1),o=t.func(n,1e3*e)||!1;o&&(t.done&&t.done(),t.running=!1)}}));var t=this.funcs.length;this.funcs=this.funcs.filter((function(e){return e.running}));var i=this.funcs.length;if(t>0&&0===i&&this.globalDone){var n=this.globalDone;this.globalDone=null,n()}},adjustSpeed:function(e,t){for(var i=this.getById(e),n=0;n<i.length;n++){var o=i[n];o.duration/=t,o.current/=t}},getById:function(e){return this.funcs.filter((function(t){return e===t.id}))},get:function(e){for(var t=0;t<this.funcs.length;t+=1)if(this.funcs[t].func===e)return this.funcs[t];return null},isRunning:function(e){var t=this.get(e);return null!==t&&t.running},countActive:function(){for(var e=0,t=0;t<this.funcs.length;t+=1)e+=this.funcs[t].running;return e},listActive:function(){for(var e=[],t=0;t<this.funcs.length;t+=1)this.funcs[t].running&&e.push(this.funcs[t].name);return e},done:function(e){this.globalDone=e},cancelById:function(e,t){var i=void 0===e?0:e;this.funcs=this.funcs.filter((function(e){var n=e.id==i;return n&&t&&e.cancelFun&&e.cancelFun(),!n}))},cancel:function(e){this.funcs=this.funcs.filter((function(t){return t.func!==e}))},getUniqueId:function(){return this.uniqueID-=1,this.uniqueID}};t["a"]=o},b23e:function(e,t,i){"use strict";i("7514"),i("ac6a"),i("28a5"),i("a481"),i("96cf");var n=i("1da1"),o=i("2909"),a=(i("9c86"),i("7f7f"),i("2b0e")),r=i("365c"),s=i("bc19"),l=i("f121"),c=(i("2197"),i("c75e")),u=i("ff11"),d=i("7f46"),h=i("d547"),p=i("9923"),f=i("f876"),m=i("617a"),v={vr:"vrVisi",map:"mapVisi",cad:"cadImgVisi",m2d:"m2dVisi",m3d:"m3dVisi",pano:"panoVisi",rule:"rulerVisi",guide:"tourVisi",measure:"measureVisi"},g=function(e){if("undefined"!=typeof e.metadata.sceneType&&null!=e.metadata.sceneType){for(var t=0;t<e.category.data.length;t++)if(e.metadata.sceneType==e.category.data[t].index){e.category.index=t;break}}else e.category.index=0},y=function(e){var t="mingyuan"==m["a"].urlQueryValue("from")?60:100,i=null;e.metadata.floorLogo&&(t=e.metadata.floorLogoSize,i=e.metadata.floorLogo),c["a"].on("sign/Ready",(function(){if(c["a"].emit("sign/Set/Size",t),"vrhouse"==l["a"].name||"mingyuan"==m["a"].urlQueryValue("from")){var n=new Image;n.crossOrigin=!0,n.src="".concat(l["a"].getStaticResource("img/apps/vrhouse/compass.png")),n.onload=function(e){c["a"].emit("sign/Set/Image",e.target.src)},n.onerror=function(){c["a"].emit("sign/Set/Image",e.floorLogos[0].src)},c["a"].emit("sign/Set/fixDirection",!0)}else if("user"==e.metadata.floorLogo){var o=new Image;o.src="".concat(l["a"].getPublishResource("images/images".concat(l["a"].projectNum,"/floorLogoImg.png?_=").concat(l["a"].version))),o.crossOrigin="anonymous",o.onload=function(t){e.floorLogos[e.floorLogos.length-1].src=t.target.src,c["a"].emit("sign/Set/Image",t.target.src)},o.onerror=function(){c["a"].emit("sign/Set/Image",e.floorLogos[0].src)}}else i?c["a"].emit("sign/Set/Image",e.floorLogos[i.length>1?i.substr(1):i].src):c["a"].emit("sign/Set/Image",e.floorLogos[0].src)}))},b=function(e){var t={};for(var i in v)"measure"==i&&"undefined"==typeof e[v[i]]?t[i]=e[v[i]]=!1:t[i]=0!==e[v[i]];this.commit("SetNavigations",t)},w={visition:{},logos:{main:null,bottom:null},music:{data:[{text:p["a"].t("common.music.none"),value:""},{text:p["a"].t("common.music.cheerfu"),value:"01.mp3"},{text:p["a"].t("common.music.ethereal"),value:"02.mp3"},{text:p["a"].t("common.music.rhythmic"),value:"03.mp3"},{text:p["a"].t("common.music.nostalgic"),value:"04.mp3"},{text:p["a"].t("common.music.missing"),value:"05.mp3"},{text:p["a"].t("common.music.retro"),value:"06.mp3"},{text:p["a"].t("common.music.strings"),value:"07.mp3"},{text:p["a"].t("common.music.happy"),value:"08.mp3"}],index:0},category:{data:[{text:p["a"].t("common.category.museum"),icon:"icon_wenbo",index:1},{text:p["a"].t("common.category.estate"),icon:"icon_zhuye",index:2},{text:p["a"].t("common.category.eshop"),icon:"icon_dianshang",index:3},{text:p["a"].t("common.category.catering"),icon:"icon_canyin",index:4},{text:p["a"].t("common.category.other"),icon:"icon_logo",index:0}],index:0},floorLogos:[{type:"image",text:"样式一",src:"zh"==l["a"].lang?i("bb17"):i("fc59")},{type:"image",text:"样式二",src:"zh"==l["a"].lang?i("c291"):i("fac6")},{type:"image",text:"样式三",src:"zh"==l["a"].lang?i("2425"):i("31bc")},{type:"upload",text:"手动上传",src:""}],metadata:{__uninit:!0},initFloor:{__uninit:!0,block:[],column:[],door:[],hole:[],segment:[],"vertex-xy":[],"vertex-z":[]},floor:{__uninit:!0,block:[],column:[],door:[],hole:[],segment:[],"vertex-xy":[],"vertex-z":[]},floorId:0,floorUId:0,reUploadFloor:!1,houstFloor:{__uninit:!0,block:[],column:[],door:[],hole:[],segment:[],"vertex-xy":[],"vertex-z":[]},floorTemp:null,algorithmFloor:null,thumbs:{big:""},tempdata:{title:null,description:null,scenekey:null,sceneIsPrivacy:null,floorLogo:null,isUpdateHots:!1,showLogoBottom:null},isLogoEdit:!1,isMultiFloor:!1},E={visitionAjk:function(e){return e.visitionAjk},logos:function(e){return e.logos},floor:function(e){return e.floor},floors:function(e){return e.floor&&e.floor.floors?e.floor.floors.map((function(e,t){return{id:e.subgroup,name:e.name}})):[]},floorId:function(e){return e.floorId},floorUId:function(e){return e.floorUId},initFloor:function(e){return e.initFloor},houstFloor:function(e){return e.houstFloor},thumbs:function(e){return e.metadata.__uninit?"":(!e.thumbs.big&&e.metadata.entry?1===e.metadata.thumbImg?l["a"].isEdit?e.thumbs.big=l["a"].getServerResource("images/images#m#/thumbBigImg.jpg")+"?_"+l["a"].version:e.thumbs.big=l["a"].getPublicResource("images/images#m#/thumbBigImg.jpg")+"?_"+l["a"].version:2===e.metadata.thumbImg?e.thumbs.big=e.metadata.homePic:e.thumbs.big=l["a"].getStaticResource("img/loading/pc.jpg"):e.metadata.entry||(e.thumbs.big=l["a"].getStaticResource("img/loading/pc.jpg")),e.thumbs)},music:function(e){return e.music},musicIndex:function(e){return e.music.index},category:function(e){return e.category},categoryIndex:function(e){return e.category.index},floorLogos:function(e){return e.floorLogos},metadata:function(e){return e.metadata},tempdata:function(e){return{title:Object(d["b"])(e.tempdata.title,e.metadata.sceneName),description:Object(d["b"])(e.tempdata.description,e.metadata.sceneDec),scenekey:Object(d["b"])(e.tempdata.scenekey,e.metadata.sceneKey),sceneIsPrivacy:null===e.tempdata.sceneIsPrivacy?!!e.metadata.sceneKey:e.tempdata.sceneIsPrivacy,floorLogo:Object(d["b"])(e.tempdata.floorLogo,{type:e.metadata.floorLogo,size:e.metadata.floorLogoSize}),showLogoBottom:Object(d["b"])(e.tempdata.showLogoBottom,e.metadata.showLogoBottom,(function(t){return!e.metadata.__uninit&&("number"!=typeof t&&"boolean"!=typeof t||!!t)}))}},isLogoEdit:function(e){return e.isLogoEdit},isMultiFloor:function(e){return e.isMultiFloor}};t["a"]={namespaced:!0,state:w,getters:E,mutations:{setVisitionAjk:function(e,t){var i=[];e.visitionAjk&&(i=e.visitionAjk.filter((function(e){return!t.some((function(t){return t.uuid===e.uuid}))}))),e.visitionAjk=[].concat(Object(o["a"])(t),Object(o["a"])(i))},SetFloor:function(e,t){var i=t.floor,n=t.webFloor,o=t.reUpload;e.floor=n,e.reUploadFloor=o,e.algorithmFloor=i},SetInitFloor:function(e,t){e.initFloor=t},SetHouseFloor:function(e,t){e.houstFloor=t,console.log("update house floor",t)},LoadFloor:function(e,t){e.floor=t||{},e.floor.room&&e.floor.room.length&&e.floor.room[0].points&&(e.floor.room=e.floor.room.map((function(e){return{hole:[],ground:e.points}}))),e.isMultiFloor=!!(e.floor.floors&&$.isArray(e.floor.floors)&&e.floor.floors.length>1),c["a"].emit("scene/floor/load",t)},LoadHouseFloor:function(e,t){e.houstFloor=t||{}},LoadInitFloor:function(e,t){e.initFloor=t||{}},ReloadFloor:function(e){null!=e.floorTemp&&(this.commit("scene/LoadFloor",JSON.parse(JSON.stringify(e.floorTemp))),e.floorTemp=null)},LoadMetadata:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(t,i){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(i.entry&&"string"==typeof i.entry&&"undefined"!=i.entry&&(i.entry=JSON.parse(i.entry)),i.gps&&"string"==typeof i.gps&&"undefined"!=i.gps&&(i.gps=JSON.parse(i.gps)),i.sceneSource&&i.sceneSource,"undefined"==i.entry&&(i.entry=null),i.entry&&(i.entry.camera||(n={camera:{zoom:-1,quaternion:i.entry.quaternion},pano:i.entry.panoId},delete i.entry.quaternion,delete i.entry.panoId,i.entry=n),i.thumbImg=1),"undefined"==typeof i.floorPlanAngle&&(i.floorPlanAngle=null),i.cadInfo&&"string"==typeof i.cadInfo)try{i.cadInfo=JSON.parse(i.cadInfo)}catch(o){}if(i.videosUser&&"string"==typeof i.videosUser)try{i.videosUser=JSON.parse(i.videosUser)}catch(a){}this.commit("UpdateMenu",i),t.metadata=i,l["a"].version=i.version,y.call(this,t),g.call(this,t),b.call(this,i);case 14:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}(),SetMetadataValue:function(e,t){e.metadata[t.key]=t.value},SetMusicSelected:function(e,t){e.music.index=t;var i="",n=e.music.data[t];n.value?i=l["a"].getStaticResource("audio/".concat(n.value,"?_=").concat(l["a"].version)):n.url&&(i=n.url),u["a"].setSRC(i),u["a"].play()},SetCategorySelected:function(e,t){e.category.index=t},SetThumbs:function(e,t){e.thumbs[t.key]=t.value},SetTempData:function(e,t){for(var i in t)$.isPlainObject(t[i])?e.tempdata[i]=$.extend(e.tempdata[i]||{},t[i]):e.tempdata[i]=t[i]},SetLogos:function(e,t){for(var i in t)e.logos[i]=t[i]},InitBackgroundMusic:function(e){var t="user"===e.metadata.bgMusic;if(e.metadata.bgMusicName){var i=l["a"].getPublishResource("images/images".concat(e.metadata.num,"/").concat(e.metadata.bgMusicName)),n=1;e.music.data.splice(n,0,{text:e.metadata.bgMusicName,url:i,can_delete:!0}),!t||l["a"].isEdit&&0!==e.metadata.uploadBgMusic||(e.music.index=n,u["a"].setSRC(i))}if(e.metadata.bgMusic&&!t)for(var o=0;o<e.music.data.length;o++){var a=e.music.data[o];if(a.text==e.metadata.bgMusic){e.music.index=o,u["a"].setSRC(l["a"].getStaticResource("audio/".concat(a.value,"?_=").concat(l["a"].version)));break}}this.commit("guide/SetMedia",null)},SetLogoEdit:function(e,t){e.isLogoEdit=t},SetMusicData:function(e,t){e.music=t},SetFloorId:function(e,t){e.floorUId=t,"all"!=t&&(e.floorId!=t&&c["a"].emit("floor/change",t),e.floorId=t)}},actions:{Save:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(t){var i,o,a,s=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i=t.commit,o=t.state,a=t.dispatch,e.abrupt("return",new Promise(function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(t,n){var l,c,u;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:for(u in l={entry:o.tempdata.entry||o.metadata.entry},f["a"].show(),l.bgMusic=0==o.music.index?"noMusic":o.music.data[o.music.index].can_delete?"user":o.music.data[o.music.index].text,c=s.getters["showNavigations"],c)l[v[u]]=c[u]?1:0;return o.metadata.entry&&(l.entry=JSON.stringify(o.metadata.entry)),null!==o.tempdata.title&&(l.sceneName=o.tempdata.title),null!==o.tempdata.description&&(l.sceneDec=o.tempdata.description),l.sceneType=o.category.data[o.category.index].index,null!==s.getters["scene/tempdata"].sceneIsPrivacy&&(s.getters["scene/tempdata"].sceneIsPrivacy?l.sceneKey=s.getters["scene/tempdata"].scenekey:l.sceneKey=""),s.getters["guide/isUpdate"]&&(l.screencapVoiceType=s.getters["guide/status"].audio,l.playData=JSON.stringify(s.getters["guide/plays"]),l.screencapThumb=JSON.stringify(s.getters["guide/thumbs"])),null!=o.tempdata.floorLogo&&(l.floorLogoSize=o.tempdata.floorLogo.size,l.floorLogoType=o.tempdata.floorLogo.type),l.hotFlag=1,e.prev=13,e.next=16,a("SaveModel");case 16:return e.next=18,a("SaveHouseImg");case 18:e.next=24;break;case 20:return e.prev=20,e.t0=e["catch"](13),f["a"].hide(),e.abrupt("return",n());case 24:return e.prev=24,e.next=27,s.dispatch("walk/Save");case 27:e.next=33;break;case 29:return e.prev=29,e.t1=e["catch"](24),f["a"].hide(),e.abrupt("return",n());case 33:return e.prev=33,e.next=36,s.dispatch("hotspot/SaveSetting");case 36:e.next=42;break;case 38:return e.prev=38,e.t2=e["catch"](33),f["a"].hide(),e.abrupt("return",n());case 42:null!=o.metadata.floorPlanAngle&&(l.floorPlanAngle=o.metadata.floorPlanAngle),$.isEmptyObject(l)?(Object(h["a"])({content:"没有需要保存的数据"}),f["a"].hide(),t()):r["saveAll"](l,(function(){i("SetTempData",{isUpdateHots:!1}),f["a"].hide(),"soundsync"==l.screencapVoiceType&&"[]"==l.playData&&s.dispatch("guide/DeleteMedia",l.screencapVoiceType),Object(h["b"])({icon:"ok",title:"",tips:p["a"].t("common.publish_text"),content:p["a"].t("common.publish_tips"),okText:p["a"].t("common.publish_btn_ok"),noText:p["a"].t("common.publish_btn_no"),okLink:location.href.split("#")[0].replace("epc.html","spc.html")}),t()}),n);case 44:case"end":return e.stop()}}),e,null,[[13,20],[24,29],[33,38]])})));return function(t,i){return e.apply(this,arguments)}}()));case 2:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}(),SaveThumbs:function(e,t){var o=e.commit,a=e.state;return new Promise(function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(n,l){var c,u,d,h,p,f;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:c=i("c7b2"),u=c.app,d=function(e){return{camera:{quaternion:s["a"].toPrecision(e.metadata.camera_quaternion.toArray(),4),zoom:e.metadata.ortho_zoom||-1},mode:e.metadata.camera_mode||0,pano:e.metadata.scan_id||"",lon:e.metadata.lon,lat:e.metadata.lat}};case 2:if(!(h=t.shift())||!h){e.next=14;break}return e.prev=3,p||(p=h.file),e.next=7,r["uploadPic"](h);case 7:e.next=12;break;case 9:return e.prev=9,e.t0=e["catch"](3),e.abrupt("return");case 12:e.next=2;break;case 14:f=d(u.player.getSnapAngleInfo()),r["saveInitialPage"]({initialPoint:JSON.stringify(f)},(function(e,t){t?(a.thumbs.big=p,o("SetMetadataValue",{key:"entry",value:f}),n(e),u.firstView.pano=u.model.panos.index[f.pano]):l()}));case 16:case"end":return e.stop()}}),e,null,[[3,9]])})));return function(t,i){return e.apply(this,arguments)}}())},SaveInformation:function(e){var t=e.state;return new Promise(function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(i,n){var o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:o={sceneName:Object(d["b"])(t.tempdata.title,t.metadata.sceneName),sceneDec:Object(d["b"])(t.tempdata.description,t.metadata.sceneDec),sceneKey:!1===t.tempdata.sceneIsPrivacy?"":Object(d["b"])(t.tempdata.scenekey,t.metadata.sceneKey),sceneType:t.category.data[t.category.index].index},r["saveInformation"](o,i,n);case 2:case"end":return e.stop()}}),e)})));return function(t,i){return e.apply(this,arguments)}}())},SaveBase:function(e){var t=this;e.state;return new Promise(function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(i,n){var o,a,s;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:for(s in o={},a=t.getters["showNavigations"],a)o[v[s]]=a[s]?1:0;r["saveBase"](o,i,n);case 4:case"end":return e.stop()}}),e)})));return function(t,i){return e.apply(this,arguments)}}())},SaveScreen:function(e,t){var o=e.state;return new Promise(function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(n,a){var l,c,u,d,h,p;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:l=i("c7b2"),c=l.app,u=function(e){return{camera:{quaternion:s["a"].toPrecision(e.metadata.camera_quaternion.toArray(),4),zoom:e.metadata.ortho_zoom||-1},mode:e.metadata.camera_mode||0,pano:e.metadata.scan_id||"",lon:e.metadata.lon,lat:e.metadata.lat}};case 2:if(!(d=t.shift())||!d){e.next=14;break}return e.prev=3,h||(h=d.file),e.next=7,r["uploadPicByAPP"](d,null,(function(){return a("ERROR_UPLOAD_File")}));case 7:e.next=12;break;case 9:return e.prev=9,e.t0=e["catch"](3),e.abrupt("return");case 12:e.next=2;break;case 14:p=u(c.player.getSnapAngleInfo()),r["saveScreen"]({initialPoint:JSON.stringify(p)},(function(){n(),o.thumbs.big=h}),a);case 16:case"end":return e.stop()}}),e,null,[[3,9]])})));return function(t,i){return e.apply(this,arguments)}}())},SaveMusic:function(e){var t=e.state;return new Promise(function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(i,n){var o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:o={musicName:0==t.music.index?"noMusic":t.music.data[t.music.index].can_delete?"user":t.music.data[t.music.index].text},r["saveMusic"](o,i,n);case 2:case"end":return e.stop()}}),e)})));return function(t,i){return e.apply(this,arguments)}}())},SaveSign:function(e,t){var i=e.state;return new Promise(function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(n,o){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!t){e.next=9;break}return e.prev=1,e.next=4,r["uploadPicByAPP"]({file:t,filename:"floorLogoImg.png"},null,(function(){return o("ERROR_UPLOAD_File")}));case 4:e.next=9;break;case 6:return e.prev=6,e.t0=e["catch"](1),e.abrupt("return");case 9:null!=i.tempdata.floorLogo?r["saveSign"]({picName:"floorLogoImg.png",size:i.tempdata.floorLogo.size,logoType:i.tempdata.floorLogo.type},n,o):n();case 10:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(t,i){return e.apply(this,arguments)}}())},SaveGuide:function(e){var t=this;e.state;return new Promise(function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(i,n){var o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:o=t.getters["guide/plays"],r["saveGuide"]({screencapVoiceType:"soundsync",playData:JSON.stringify(o),screencapThumb:JSON.stringify(t.getters["guide/thumbs"])},i,n);case 2:case"end":return e.stop()}}),e)})));return function(t,i){return e.apply(this,arguments)}}())},SaveFloorplanPng:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(t){var i,n,o,a,s,l,c;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(i=t.state,n=i.houstFloor.img,n.filter((function(e){var t=e.file;return t instanceof Blob})),n.length){e.next=5;break}return e.abrupt("return");case 5:if(i.isMultiFloor?(o=JSON.stringify(n.map((function(e){return{left:e.left,right:e.right,top:e.top,bottom:e.bottom,id:e.id,subgroup:e.subgroup,bound:e.bound}}))),s=n.map((function(e){return"floorplan_".concat(e.subgroup,".png")})),a=n.map((function(e){return e.file}))):(a=[n[0].file],o=JSON.stringify({left:n[0].left,right:n[0].right,top:n[0].top,bottom:n[0].bottom,bound:n[0].bound}),s=["floorplan.png"]),!a.some((function(e){return!(e instanceof Blob)}))){e.next=8;break}return e.abrupt("return");case 8:return e.prev=8,e.next=11,new Promise((function(e,t){return r["saveFloorplanPng"]({files:a,filenames:s,cadInfo:o},e,t)}));case 11:l=e.sent,c=l.msg,c.forEach((function(e){return n.file=e})),n.upload=!0,e.next=19;break;case 17:e.prev=17,e.t0=e["catch"](8);case 19:case"end":return e.stop()}}),e,null,[[8,17]])})));function t(t){return e.apply(this,arguments)}return t}(),SaveHouseImg:function(e){var t=e.state,i=e.dispatch;return new Promise(function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(n,o){var a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(null==t.metadata.floorPlanAngle&&(t.metadata.floorPlanAngle=0),a=t.houstFloor.img,!a||a.upload||!a.length){e.next=18;break}return e.prev=3,e.next=6,i("SaveFloorplanPng");case 6:return e.next=8,new Promise((function(e,i){return r["saveHouseFloorJson"](t.houstFloor,e,i)}));case 8:n(),e.next=16;break;case 11:e.prev=11,e.t0=e["catch"](3),a.upload=!1,Object(h["a"])({content:p["a"].t("tips.house_type_save_fail")}),o();case 16:e.next=19;break;case 18:n();case 19:case"end":return e.stop()}}),e,null,[[3,11]])})));return function(t,i){return e.apply(this,arguments)}}())},SaveModel:function(e){var t=e.state;e.dispatch;return new Promise(function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(i,n){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!t.reUploadFloor){e.next=15;break}return e.prev=1,e.next=4,new Promise((function(e,i){return r["saveFloorJson"](t.floor,t.algorithmFloor,e,i)}));case 4:t.reUploadFloor=!1,console.log(t),i(),e.next=13;break;case 9:e.prev=9,e.t0=e["catch"](1),Object(h["a"])({content:p["a"].t("tips.house_type_save_fail")}),n();case 13:e.next=16;break;case 15:i();case 16:case"end":return e.stop()}}),e,null,[[1,9]])})));return function(t,i){return e.apply(this,arguments)}}())},changeUserMusicData:function(e,t){var i=e.commit,n=e.state,o=t.data,a=t.index,r=void 0===a?1:a,s=n.music;o&&r<s.index?s.index++:!o&&r<=s.index&&s.index--,s.data[r].can_delete&&s.data.splice(r,1),o&&s.data.splice(r,0,o),i("SetMusicData",s)},saveFloorJsonData:function(e,t){var i=e.state,n=t.id,o=t.name;return new Promise((function(e,t){var s=JSON.parse(JSON.stringify(i.floor)),l=s.floors.find((function(e){return e.id==n}));l.name=o,r["saveFloorJsonData"](s,(function(){for(var t=i.floor.floors,r=0;r<t.length;r++)if(t[r].id==n){t[r].name=o,a["default"].set(i.floor.floors,r,i.floor.floors[r]);break}e()}),t)}))}}}},b511:function(e,t,i){"use strict";var n={BLACK:"black",STD:"std",WALK:"walk"};t["a"]=n},b775:function(e,t,i){"use strict";i.d(t,"a",(function(){return w}));i("7f7f"),i("a481"),i("28a5"),i("ac6a");var n=i("f121"),o=i("823b"),a=i("617a"),r=(i("34ef"),i("4917"),i("9923")),s=(r["a"].t("common.photo"),r["a"].t("common.video"),r["a"].t("common.voice"),function(e){var t=e.split(","),i=t[0].match(/:(.*?);/)[1],n=atob(t[1]),o=n.length,a=new Uint8Array(o);while(o--)a[o]=n.charCodeAt(o);return new Blob([a],{type:i})}),l=i("d547"),c=i("f876"),u=i("365c"),d=i("fafa"),h=i("7f46"),p=i("eb02"),f=function(){},m=[],v={NEXT:-999,SUCCESS:0,EXCEPTION:-1,FAILURE_CODE_3001:3001,FAILURE_CODE_3002:3002,FAILURE_CODE_3003:3003,FAILURE_CODE_3004:3004,FAILURE_CODE_3005:3005,FAILURE_CODE_3006:3006,FAILURE_CODE_3007:3007,FAILURE_CODE_3008:3008,FAILURE_CODE_3009:3009,FAILURE_CODE_3010:3010,FAILURE_CODE_3011:3011,FAILURE_CODE_3012:3012,FAILURE_CODE_3013:3013,FAILURE_CODE_3014:3014,FAILURE_CODE_3015:3015,FAILURE_CODE_3016:3016,FAILURE_CODE_3017:3017,FAILURE_CODE_3018:3018,FAILURE_CODE_5010:5010,FAILURE_CODE_5012:5012,FAILURE_CODE_5014:5014,FAILURE_CODE_5005:5005},g=function e(){if(!e.__is_show)return e.__is_show=!0,n["a"].showLogin?Object(l["b"])({okText:"登录",content:"开发模式下,自动读取.env文件里的账号密码登陆,<br>登陆成功后点击已登陆",ok:function(){var t=this,i=a["a"].urlQueryValue("uname")||"13112311178",n=a["a"].urlQueryValue("upass")||"11111111Aa";return w.postJson("api/sso/user/login",{password:Object(h["e"])(n),phoneNum:i,randomcode:1234,rememberMe:!0,rnd:Math.random()}).then((function(e){if(e.code==v.SUCCESS){var i=(e.data.include||[]).map((function(e){return e.keyWord.toLowerCase()})),n=(e.data.exclude||[]).map((function(e){return e.keyWord.toLowerCase()}));p["a"].commit("InitMenu",{includes:i,excludes:n,isVIP:e.data.isIncrement,isVIPExpired:e.data.isExpired,isVIPTransition:e.data.isTransition}),localStorage.setItem("token",e.data.token),m.length&&m.forEach((function(e){return e()})),m=[],d["a"].valid(),t.onClose()}else Object(l["a"])({content:e.msg})})),e.__is_show=!1,!1},no:function(){localStorage.removeItem("token"),e.__is_show=!1}}):Object(l["c"])({title:r["a"].t("login.title"),okText:r["a"].t("login.login"),noText:r["a"].t("login.logon"),content:r["a"].t("login.login_tips"),okLink:n["a"].pages.Login,ok:function(){return e.__is_show=!1,!1},no:function(){Object(u["checkLogin"])().then((function(t){if(t.code===v.SUCCESS){var i=(t.data.include||[]).map((function(e){return e.keyWord.toLowerCase()})),n=(t.data.exclude||[]).map((function(e){return e.keyWord.toLowerCase()}));p["a"].commit("InitMenu",{includes:i,excludes:n,isVIP:t.data.isIncrement,isVIPExpired:t.data.isExpired,isVIPTransition:t.data.isTransition}),m.length&&m.forEach((function(e){return e()})),m=[],d["a"].valid()}else t.code===v.FAILURE_CODE_3004&&e()})),e.__is_show=!1}})};function y(){var e=a["a"].urlHasValue("token",!0);return e&&localStorage.setItem("token",e),e||localStorage.getItem("token")||""}function b(e,t){return e==v.EXCEPTION?Object(l["a"])({content:r["a"].t("tips.exception")}):e==v.FAILURE_CODE_3002||e==v.FAILURE_CODE_3003||e==v.FAILURE_CODE_3004?(t(e),g()):e==v.FAILURE_CODE_3001?(t(e),Object(l["a"])({content:r["a"].t("tips.params_notfound")})):e==v.FAILURE_CODE_3017?(t(e),Object(l["a"])({content:r["a"].t("tips.file_notfound")})):e==v.FAILURE_CODE_5005?n["a"].isEdit?(t(e),Object(l["a"])({content:r["a"].t("tips.scene_notfound")})):location.href=n["a"].pages.NotFound:e==v.FAILURE_CODE_5010?(t(e),Object(l["a"])({content:r["a"].t("tips.camera_notfound")})):e==v.FAILURE_CODE_5012?(t(e),Object(l["a"])({content:r["a"].t("tips.data_error")})):e==v.FAILURE_CODE_5014?(t(e),Object(l["a"])({content:r["a"].t("tips.auth_deny")})):v.NEXT}$.ajaxSetup({headers:{},beforeSend:function(e){var t=y();t?e.setRequestHeader("token",t):t||-1==this.url.indexOf("isLogin")||g(),"localshow"==n["a"].oem&&-1==this.url.indexOf("http")&&0==this.url.indexOf("/")&&(this.url=this.url.substr(1))},error:function(e,t,i){return-1!=this.url.indexOf("/scene.json")&&404==e.status?Object(l["a"])({content:r["a"].t("tips.scene_notfound")}):"POST"===this.type?Object(l["a"])({content:r["a"].t("tips.network_error")}):void 0},success:function(e){},complete:function(){"POST"===this.type&&w.__loading&&c["a"].hide(),w.__loading=!0}});var w={statusCode:v,__loading:!0,__request:function(e,t,i,n,o,a){return"function"!=typeof o&&(o=f),"function"!=typeof a&&(a=f),e.done((function(e){if("undefined"!==typeof e.code){var r=b(e.code,(function(e){e!=v.FAILURE_CODE_3001&&e!=v.FAILURE_CODE_3002&&e!=v.FAILURE_CODE_3003&&e!=v.FAILURE_CODE_3004||-1==i.indexOf("isLogin")&&-1==i.indexOf("openSceneBykey")&&m.push((function(){w[t](i,n,o,a)})),a()}));r===v.NEXT&&o(e,0==e.code)}else o(e)})),e.fail(a),e.always((function(){return e=null})),e},get:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;return/\.json/.test(e)?this.getJson(e,t,i,n):this.__request($.get(e,t),"get",e,t,i,n)},getText:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;return this.__request($.ajax({url:e,dataType:"text"}),"getText",e,t,i,n)},getJson:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;return this.__request($.getJSON(e,t),"get",e,t,i,n)},getBlob:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;return this.__request($.ajax({url:e,dataType:"blob"}),"getBlob",e,t,i,n)},getArraybuffer:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;return this.__request($.ajax({url:e,dataType:"arraybuffer"}),"getArraybuffer",e,t,i,n)},post:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;return-1==e.indexOf("isLogin")&&w.__loading&&c["a"].show(),this.__request($.post(e,t),"post",e,t,i,n)},postJson:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;return w.__loading&&c["a"].show(),this.__request($.ajax({type:"POST",url:e,contentType:"application/json",data:JSON.stringify(t)}),"postJson",e,t,i,n)},postForm:function(e,t,i,n,o){return"function"===typeof o?this.__request($.ajax({type:"POST",url:e,processData:!1,contentType:!1,data:t,xhr:function(){var e=new XMLHttpRequest;return e.upload.addEventListener("progress",(function(e){o(e.loaded/e.total*100+"%")})),e}}),"postForm",e,t,i,n):(w.__loading&&c["a"].show(),this.__request($.ajax({type:"POST",url:e,processData:!1,contentType:!1,data:t}),"postForm",e,t,i,n))},loadImage:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=$.Deferred(),a=new Image;if("AWS"==Object({NODE_ENV:"production",VUE_APP_CDN_URL:"",VUE_APP_HIDE_MENU:"scene,decor,virtual,vrhouse,business",VUE_APP_INCLUDEAPPS:"embed,shop,decor,discover,reserve,grave,fire-control,rtc-live",VUE_APP_LANGS:"zh#中文,en#英文,de#德文,fr#法文,jp#日文,kr#韩文,es#西班牙文",VUE_APP_LOCAL_PAGE:"embed",VUE_APP_OEM:"localshow",VUE_APP_OEM_NAEM:"本地版展示页面",VUE_APP_OPENAPI:"",VUE_APP_RTC_SOCKETURL:"",VUE_APP_SERVER_URL:"",VUE_APP_SHOP_ADMIN_URL:"",VUE_APP_SHOP_SOCKETURL:"",VUE_APP_SHOP_URL:"",VUE_APP_STATIC_DIR:"static",VUE_APP_STATIC_URL:"static/",VUE_APP_TESTKEY:"test",VUE_APP_TESTPWD:"11111111Aa",VUE_APP_TESTUSR:"13112311178",VUE_APP_VRHOUSE_OPENAPI:"",VUE_APP_VRHOUSE_URL:"",BASE_URL:""}).VUE_APP_REGION&&-1!=e.indexOf("x-oss-process=image")){var r=e.split("?");e=r[0]+encodeURIComponent("?"+r[1].replace(/\//g,"@"))}var s=function(){o["a"].warn("Retrying load image: "+e),t.loadImage(e,i-1).done(n.resolve.bind(n)).progress(n.notify.bind(n)).fail(n.reject.bind(n))};return a.onerror=function(){i>0?setTimeout((function(){return s()}),1e3):n.reject("[".concat(e,"]加载失败"))},a.onload=function(){n.resolve(a)},a.crossOrigin="anonymous",a.src=e,n},uploadFile:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,a=new FormData;for(var r in t)"file"==r?a.append("file",t[r],t.filename||t[r].name):"filename"!=r&&a.append(r,t[r]);return this.postForm(e,a,i,n,o)},uploadBlobFile:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,o=new FormData;for(var a in t)"file"===a?o.append("file",s(t.file),t.filename):"filename"!=a&&o.append(a,t[a]);return this.postForm(e,o,i,n)}}},b841:function(e,t){},b8d5:function(e,t,i){"use strict";var n=i("541a"),o=i("7d96"),a={TILE_SIZE:512,FACES_PER_PANO:6,LocationOnTile:{Center:0,UpperLeft:1,UpperRight:2,LowerRight:3,LowerLeft:4}};a.getTileVector=function(){return function(e,t,i,r,s,l,c,u){l=l||a.LocationOnTile.Center;var d=e/t,h=r/d;s=d-1-s;var p=s/d,f=t/e,m=2*f,v=m/2,g=2*h-1+v,y=2*p-1+v;switch(l){case a.LocationOnTile.UpperLeft:g-=v,y+=v,g+=c*m;break;case a.LocationOnTile.UpperRight:g+=v,y+=v,y-=c*m;break;case a.LocationOnTile.LowerRight:g+=v,y-=v,g-=c*m;break;case a.LocationOnTile.LowerLeft:g-=v,y-=v,y+=c*m;break;case a.LocationOnTile.Center:}switch(i){case n["a"].GL_TEXTURE_CUBE_MAP_POSITIVE_X:o["a"].setVector(u,-1,y,-g);break;case n["a"].GL_TEXTURE_CUBE_MAP_NEGATIVE_X:o["a"].setVector(u,1,y,g);break;case n["a"].GL_TEXTURE_CUBE_MAP_POSITIVE_Y:o["a"].setVector(u,-g,1,-y);break;case n["a"].GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:o["a"].setVector(u,-g,-1,y);break;case n["a"].GL_TEXTURE_CUBE_MAP_POSITIVE_Z:o["a"].setVector(u,-g,y,1);break;case n["a"].GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:o["a"].setVector(u,g,y,-1)}o["a"].normalize(u)}}(),a.getFaceForTile=function(e,t){var i=a.TILE_SIZE;e<a.TILE_SIZE&&(i=e);var n=Math.floor(e/i),o=n*n;return Math.floor(t/o)},a.getTileLocation=function(e,t,i){var n=a.TILE_SIZE;e<a.TILE_SIZE&&(n=e);var o=a.getFaceForTile(e,t),r=Math.floor(e/n),s=r*r,l=t-o*s;i.tileX=l%r,i.tileY=Math.floor(l/r),i.face=o,i.faceTileIndex=l},a.getTileCountForSize=function(e){if(e<=a.TILE_SIZE)return a.FACES_PER_PANO;var t=Math.floor(e/a.TILE_SIZE),i=t*t,n=i*a.FACES_PER_PANO;return n},a.getRelativeDirection=function(){var e=new o["a"].Matrix4,t=new o["a"].Quaternion;return function(i,n){t.copy(i),t.inverse(),e.makeRotationFromQuaternion(t),e.applyToVector3(n),o["a"].normalize(n)}}(),a.matchingTilesInDirection=function(){var e=new o["a"].Vector3,t=new o["a"].Vector3(0,0,-1),i=new o["a"].Quaternion,n=function(e,t){e.push({face:t.face,faceTileIndex:t.faceTileIndex,tileX:t.tileX,tileY:t.tileY})},r=function(){var e={face:-1,faceTileIndex:-1,tileX:-1,tileY:-1};return function(t,i,o){for(var r=a.getTileCountForSize(t),s=0,l=0;l<r;l++)a.getTileLocation(t,l,e),i&&!i(e)||(s++,o&&n(o,e));return s}}();return function(n,s,l,c,u,d){var h=s<a.TILE_SIZE?s:a.TILE_SIZE;if(!c&&!u)return r(s,null,d);var p=!!u;if(u=u||c,u=Math.max(0,Math.min(u,360)),c=Math.max(0,Math.min(c,360)),o["a"].copyVector(l,e),a.getRelativeDirection(n.quaternion,e),p){i.setFromUnitVectors(e,t);var f=function(e){return a.isTileWithinFrustum(s,h,e.face,e.tileX,e.tileY,i,c,u)};return r(s,f,d)}var m=function(t){return a.isTileWithinFOV(s,h,t.face,t.tileX,t.tileY,e,c)};return r(s,m,d)}}(),a.isTileWithinFrustum=function(){var e=new o["a"].Vector3,t=1e-5;return function(i,n,r,s,l,c,u,d){for(var h=Math.tan(.5*d*o["a"].RADIANS_PER_DEGREE),p=-h,f=Math.tan(.5*u*o["a"].RADIANS_PER_DEGREE),m=-f,v=a.mapFaceToCubemapFace(r),g=0,y=0,b=0,w=0,E=0,T=a.LocationOnTile.Center;T<=a.LocationOnTile.LowerLeft;T++)if(a.getTileVector(i,n,v,s,l,T,0,e),o["a"].applyQuaternionToVector(c,e),e.z>=-t)0;else{var P=-1/e.z,x=e.x*P,k=e.y*P;k>h?g++:k<p&&y++,x>f?b++:x<m&&w++,E++}return y!==E&&g!==E&&b!==E&&w!==E}}(),a.isTileWithinFOV=function(){var e=new o["a"].Vector3,t=new o["a"].Vector3(0,1,0),i=new o["a"].Vector3(1,0,0);return function(n,r,s,l,c,u,d){var h=a.mapFaceToCubemapFace(s);if(o["a"].cross(u,t,i),a.getTileVector(n,r,h,l,c,a.LocationOnTile.Center,0,e),a.isWithinFOV(e,u,d,null))return!0;for(var p=d/360,f=Math.floor(1/p),m=0,v=0;v<f;v++){for(var g=a.LocationOnTile.UpperLeft;g<=a.LocationOnTile.LowerLeft;g++)if(a.getTileVector(n,r,h,l,c,g,m,e),a.isWithinFOV(e,u,d,null))return!0;m+=p}return!1}}(),a.isWithinFOV=function(){var e=new o["a"].Vector3,t=new o["a"].Vector3;return function(i,n,a,r){if(o["a"].copyVector(i,t),r){o["a"].copyVector(r,e),o["a"].normalize(e);var s=o["a"].dot(e,i);e.x*=s,e.y*=s,e.z*=s,o["a"].subVector(t,e)}var l=a/2*o["a"].RADIANS_PER_DEGREE,c=Math.cos(l),u=o["a"].dot(t,n);return u>=c}}(),a.mapFaceToCubemapFace=function(){var e={0:n["a"].GL_TEXTURE_CUBE_MAP_POSITIVE_Y,1:n["a"].GL_TEXTURE_CUBE_MAP_POSITIVE_Z,2:n["a"].GL_TEXTURE_CUBE_MAP_POSITIVE_X,3:n["a"].GL_TEXTURE_CUBE_MAP_NEGATIVE_Z,4:n["a"].GL_TEXTURE_CUBE_MAP_NEGATIVE_X,5:n["a"].GL_TEXTURE_CUBE_MAP_NEGATIVE_Y};return function(t){return e[t]}}(),t["a"]=a},bb17:function(e,t,i){e.exports=i.p+"static/img/0.a1bd0fb0.png"},bc19:function(e,t,i){"use strict";i("673e");var o=i("f121"),a=window.__math={convertVisionVector:function(e){return new THREE.Vector3(e.x,e.z,-e.y)},invertVisionVector:function(e){return new THREE.Vector3(e.x,-e.z,e.y)},convertVisionQuaternion:function(e){return new THREE.Quaternion(e.x,e.z,-e.y,e.w).multiply((new THREE.Quaternion).setFromAxisAngle(new THREE.Vector3(0,1,0),THREE.Math.degToRad(90)))},invertVisionQuaternion:function(e){var t=e.clone().multiply((new THREE.Quaternion).setFromAxisAngle(new THREE.Vector3(0,1,0),THREE.Math.degToRad(-90)));return new THREE.Quaternion(t.x,-t.z,t.y,t.w)},convertWorkshopVector:function(e){return new THREE.Vector3(-e.x,e.y,e.z)},convertWorkshopQuaternion:function(e){return new THREE.Quaternion(-e.x,e.y,e.z,-e.w).multiply(new THREE.Quaternion(Math.sqrt(2)/2,Math.sqrt(2)/2,0,0))},convertWorkshopPanoramaQuaternion:function(e){return new THREE.Quaternion(e.x,-e.y,-e.z,e.w).normalize().multiply((new THREE.Quaternion).setFromAxisAngle(new THREE.Vector3(0,1,0),THREE.Math.degToRad(270)))},convertWorkshopOrthoZoom:function(e){return-1===e?-1:e*($("#player").width()/$("#player").height())},getVec2Angle:function(e,t){return Math.acos(THREE.Math.clamp(this.getVec2Cos(e,t),-1,1))},getVec2Cos:function(e,t){return e.dot(t)/e.length()/t.length()},closeTo:function(e,t,i){return void 0!=i?Math.abs(e-t)<i:Math.abs(e-t)<1e-6},toPrecision:function(e,t){var i=function(e,t){var i=Math.pow(10,t);return Math.round(e*i)/i};if(e instanceof Array){for(var n=0;n<e.length;n++)e[n]=i(e[n],t);return e}if(e instanceof Object){for(var n in e)e[n]=i(e[n],t);return e}return i(e,t)},isEmptyQuaternion:function(e){return 0===Math.abs(e.x)&&0===Math.abs(e.y)&&0===Math.abs(e.z)&&0===Math.abs(e.w)},projectPositionToCanvas:function(e,t,i){i=i||new THREE.Vector3,i.copy(e);var n=.5*$("#player").width(),o=.5*$("#player").height();return i.project(t),i.x=i.x*n+n,i.y=-i.y*o+o,i},convertScreenPositionToNDC:function(e,t,i,o){return o=o||$("#player")[0],i=i||new n.Vector2,i.x=e/o.clientWidth*2-1,i.y=-t/o.clientHeight*2+1,i},handelPadResize:!1,handelPadding:function(){var e=[],t=[],i=function(){e=[],t=[],a.handelPadResize=!1};return o["a"].isEdit&&!o["a"].isMobile&&window.addEventListener("resize",i),function(n,a,r){if(!o["a"].isEdit||o["a"].isMobile)return{x:n,y:a};var s;this.handelPadResize&&i(),r=r||$("#player")[0];var l=t.indexOf(r);return-1==l?(t.push(r),s={x:this.getOffset("left",r),y:this.getOffset("top",r)},e.push(s)):s=e[l],{x:n-s.x,y:a-s.y}}}(),getOffset:function(e,t,i){var n="left"==e?t.offsetLeft:t.offsetTop;i||(i=$("body")[0]);while(t=t.offsetParent){if(t==i)break;n+="left"==e?t.offsetLeft:t.offsetTop}return n},constrainedTurn:function(e){var t=e%(2*Math.PI);return t>Math.PI?t-=2*Math.PI:t<-Math.PI?t+=2*Math.PI:t},getFOVDotThreshold:function(e){return Math.cos(THREE.Math.degToRad(e/2))},transform2DForwardVectorByCubeFace:function(e,t,i,n){switch(e){case GLCubeFaces.GL_TEXTURE_CUBE_MAP_POSITIVE_X:i.set(1,t.y,t.x);break;case GLCubeFaces.GL_TEXTURE_CUBE_MAP_NEGATIVE_X:i.set(-1,t.y,-t.x);break;case GLCubeFaces.GL_TEXTURE_CUBE_MAP_POSITIVE_Y:i.set(-t.x,1,-t.y);break;case GLCubeFaces.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:i.set(-t.x,-1,t.y);break;case GLCubeFaces.GL_TEXTURE_CUBE_MAP_POSITIVE_Z:i.set(-t.x,t.y,1);break;case GLCubeFaces.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:i.set(t.x,t.y,-1)}n&&i.normalize()},getFootPoint:function(e,t,i,n){var o=e.clone().sub(t),a=t.clone().sub(i),r=a.length(),s=o.dot(a)/r,l=t.clone().add(a.multiplyScalar(s/r));return n&&l.clone().sub(t).dot(l.clone().sub(i))>0&&(l=l.distanceTo(t)<l.distanceTo(i)?t.clone():i.clone()),l},getCenterOfGravityPoint:function(e){for(var t=0,i=0,n=0,o=1;o<=e.length;o++){var a=e[o%e.length].x,r=e[o%e.length].y,s=e[o-1].x,l=e[o-1].y,c=(a*l-r*s)/2;t+=c,i+=c*(a+s)/3,n+=c*(r+l)/3}return i/=t,n/=t,{x:i,y:n}},getBound:function(e){for(var t=new THREE.Box2,i=0,n=e.length;i<n;i++)t.expandByPoint(e[i]);return t},isPointInArea:function(e,t,i){var n=this.getBound(e);if(t.x<n.min.x||t.x>n.max.x||t.y<n.min.y||t.y>n.max.y)return!1;for(var o=!1,a=t.x,r=t.y,s=0,l=e.length-1;s<e.length;l=s++){var c=e[s].x,u=e[s].y,d=e[l].x,h=e[l].y;if((c-a)*(h-r)==(c-a)*(u-r)&&a>=Math.min(c,d)&&a<=Math.max(c,d)&&r>=Math.min(u,h)&&r<=Math.max(u,h))return!!i;u>r!=h>r&&a<(d-c)*(r-u)/(h-u)+c&&(o=!o)}return o},getArea:function(e){for(var t=e.length,i=0,n=t-1,o=0;o<t;n=o++)i+=e[n].x*e[o].y-e[o].x*e[n].y;return-.5*i},isInBetween:function(e,t,i,n){return e<=t&&t<=i||i<=t&&t<=e||this.closeTo(e,t,n)||this.closeTo(t,i,n)},ifPointAtLineBound:function(e,t,i){return a.isInBetween(t[0].x,e.x,t[1].x,i)&&a.isInBetween(t[0].y,e.y,t[1].y,i)},isLineIntersect:function(e,t,i,n){var o=e[1].y-e[0].y,r=e[0].x-e[1].x,s=o*e[0].x+r*e[0].y,l=t[1].y-t[0].y,c=t[0].x-t[1].x,u=l*t[0].x+c*t[0].y,d=o*c-l*r;if(0==d)return!1;var h=(c*s-r*u)/d,p=(o*u-l*s)/d;return i||a.ifPointAtLineBound({x:h,y:p},e,n)&&a.ifPointAtLineBound({x:h,y:p},t,n)?{x:h,y:p}:void 0},getNormal:function(e){var t,i,n=e.points[1].x-e.points[0].x,o=e.points[1].y-e.points[0].y;if(0!=o)t=1,i=-n*t/o;else{if(0==n)return console.log("两个点一样"),null;i=1,t=-o*i/n}var a=new THREE.Vector3(t,0,i),r=new THREE.Vector3(n,0,o),s=a.cross(r);return s.y>0&&(t*=-1,i*=-1),new THREE.Vector2(t,i).normalize()},getQuaBetween2Vector:function(e,t,i){var n=e.angleTo(t),o=e.clone().cross(t).normalize();return 0==o.length()?(new THREE.Quaternion).setFromAxisAngle(i,n):(new THREE.Quaternion).setFromAxisAngle(o,n)},getScaleForConstantSize:function(){var e,t=new THREE.Vector3,i=new THREE.Vector3,n=new THREE.Vector3,o=new THREE.Vector3,a=new THREE.Vector3;return function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(r.width2d)e=r.width2d;else{var s=r.position.distanceTo(r.camera.position);e=r.maxSize-(r.maxSize-r.minSize)*THREE.Math.smoothstep(s,r.nearBound,r.farBound)}t.copy(r.position).project(r.camera),i.set($("#player").width()/2,$("#player").height()/2,1).multiply(t),n.set(e/2,0,0).add(i),o.set(2/$("#player").width(),2/$("#player").height(),1).multiply(n),a.copy(o).unproject(r.camera);var l=a.distanceTo(r.position);return l}}(),getCrossPointAtRect:function(e,t,i,n,o,a){var r,s,l,c=(t.x-e.x)/(t.y-e.y),u=function(t){return c*(t-e.y)+e.x},d=function(t){return 1/c*(t-e.x)+e.y};return l=t.x>=e.x?i+o:o,r=l,s=d(r),(s<a||s>a+n)&&(s=s<a?a:a+n,r=u(s)),new THREE.Vector2(r,s)},getDirFromUV:function(e){var t,i,n=Math.cos(e.y*Math.PI),o=2*Math.PI*e.x-Math.PI;Math.PI,i=-Math.PI/2<=o&&o<Math.PI/2?1:-1;var a=Math.tan(o),r=Math.sqrt((1-n*n)/(1+a*a)),s=a*r;return r*i<0&&(r*=-1,s*=-1),s*=-1,t=new THREE.Vector3(s,n,r),t},getUVfromDir:function(e){e=e.clone();e.x*=-1;var t=Math.atan2(e.x,e.z)/(2*Math.PI)+.5,i=Math.acos(e.y)/Math.PI;return{x:t,y:i}},crossRight:function(e,t){var i=t.elements,n=new THREE.Vector3;return n.x=i[0]*e.x+i[1]*e.y+i[2]*e.z+i[3],n.y=i[4]*e.x+i[5]*e.y+i[6]*e.z+i[7],n.z=i[8]*e.x+i[9]*e.y+i[10]*e.z+i[11],n},getNormalDir:function(e,t,i){var n=e.clone().sub(i.position);if(t)var o=i.rot90Matrix.clone();else o=i.skyboxMesh.matrixWorld.clone();return n=this.crossRight(n,o),n.normalize(),n},getDirByLonLat:function(e,t){var i=new THREE.Vector3,n=THREE.Math.degToRad(90-t),o=THREE.Math.degToRad(e);return i.x=Math.sin(n)*Math.cos(o),i.y=Math.cos(n),i.z=Math.sin(n)*Math.sin(o),i}};t["a"]=a},bda7:function(e,t,i){"use strict";i.r(t),i.d(t,"Orientation",(function(){return d}));i("386d");var n,o,a=i("2b0e"),r=i("c75e"),s=i("617a"),l=i("3a34"),c=i.n(l);function u(){o&&clearTimeout(o),"undefined"!=typeof window.orientation&&(o=0==window.orientation||180==window.orientation?setTimeout((function(){"portrait"!=n&&(n="portrait",window.navigator.userAgent.indexOf("HUAWEIDUK-AL20"),$("body").css({height:"100%",top:""}),a["default"].nextTick((function(){r["a"].emit("orientation")})))}),s["a"].detectIOS()?500:800):setTimeout((function(){if("landscape"!=n){n="landscape";var e=window.pageYOffset,t=$("body").height(),i=window.innerHeight;window.navigator.userAgent.indexOf("HUAWEIDUK-AL20")>-1?$("body").css({height:"100%",top:""}):i!=t||0!=e?$("body").css({height:i+"px",top:e+"px"}):$("body").css({height:"",top:e+"px"}),a["default"].nextTick((function(){r["a"].emit("orientation")}))}}),500))}window.location.search.indexOf("vlog")>-1&&new c.a,setTimeout((function(){window.addEventListener("resize",u),u()}),700),window.addEventListener("orientationchange",u);var d=n},c291:function(e,t,i){e.exports=i.p+"static/img/1.93501122.png"},c75d:function(e,t,i){"use strict";i("4917");var n=i("823b"),o={parseIdsFromChunkName:function(e,t){t.floorId=o.parseFloor(e),t.roomId=o.parseRoom(e)},parseFloor:function(e){var t=e.match(/_group([0-9]+)/);if(!t)return 0;try{return parseInt(t[1],10)}catch(i){return n["a"].warn('Non-int value "'+t[1]+'" for mesh group, defaulting to floor 0'),0}},parseRoom:function(e){var t=e.match(/_sub([0-9]+)/);if(!t)return-1;try{return parseInt(t[1],10)}catch(i){return n["a"].warn('Non-int value "'+t[1]+'" for mesh subgroup, defaulting to subgroup 0'),0}}};t["a"]=o},c75e:function(e,t,i){"use strict";var n=i("faa1");t["a"]=new n["EventEmitter"]},c7b2:function(e,t,i){"use strict";i.r(t),i.d(t,"app",(function(){return M["a"]})),i.d(t,"play",(function(){return C["a"]})),i.d(t,"record",(function(){return O["a"]})),i.d(t,"util",(function(){return n})),i.d(t,"flyToNewMode",(function(){return D}));var n={};i.r(n),i.d(n,"Screenshot",(function(){return A["a"]}));i("6b54"),i("2397");var o=i("d4ec"),a=i("bee2"),r=i("262e"),s=i("99de"),l=i("7e84"),c=(i("c75e"),i("f121")),u=i("6860"),d=i("9b24"),h=(i("7f7f"),i("28a5"),i("80c5")),p=null,f=null,m=null;function v(){return p||(null===f&&(f=document.getElementById("kankan-embedded-frame")||!1),p=!1===f?window.parent:f.contentWindow,p)}function g(e){if(null==m)return y(e),!1;if(m.mode!=e.mode)return y(e),!1;if(m.mode==h["a"].PANORAMA)return!!m.qua.equals(e.qua)||(y(e),!1);if(m.mode==h["a"].DOLLHOUSE){var t=!0;return e.qua&&m.qua&&(m.qua.equals(e.qua)||(t=!1)),e.pos&&m.pos&&(m.pos.equals(e.pos)||(t=!1)),e.target&&m.target&&(m.target.equals(e.target)||(t=!1)),m.zoom&&(m.zoom.equals(e.zoom)||(t=!1)),t||y(e),t}var i=!0;return m.qua.equals(e.qua)?(m.pos&&(m.pos.equals(e.pos)||(i=!1)),m.zoom&&m.zoom!=e.zoom&&(i=!1)):i=!1,i||y(e),i}function y(e){m={},m.mode=e.mode,e.pos&&(m.pos=new THREE.Vector3,m.pos.set(e.pos.x,e.pos.y,e.pos.z)),e.qua&&(m.qua=new THREE.Quaternion,m.qua.set(e.qua._x,e.qua._y,e.qua._z,e.qua._w)),e.target&&(m.target=new THREE.Vector3,m.target.set(e.target.x,e.target.y,e.target.z)),e.zoom&&(m.zoom=e.zoom)}function b(){}if(b.prototype={get target(){return v()},rotate:function(e){var t=this,i=u["objects"].player,n=this.target.__app.player;if(null==i.currentPano||null==n.currentPano||i.flying||n.flying)e&&n.flying&&"transitioning"==n.mode&&n.FlyToMode(n.modeTran.split("-")[1],(function(){t.rotate(!0)}));else{var o={};o.qua=i.quaternion,o.mode=i.mode,o.pos=i.position,i.cameraControls.activeControl.currentScale&&(o.zoom=i.cameraControls.activeControl.currentScale/($("#player").width()/$("#player").height())),o.type="Rotate",!e&&g(o)||(i.play.control.onUpdate=!0,n.play.control.onUpdate=!1,i.mode==h["a"].PANORAMA?o.pano=i.currentPano.id:i.mode==h["a"].FLOORPLAN&&(o.pos=(new THREE.Vector3).set(i.position.x,i.position.y,i.position.z),o.zoom=i.cameraControls.activeControl.currentScale/($("#player").width()/$("#player").height())),i.cameraControls.activeControl.target&&(o.pos=i.position,o.target=i.cameraControls.activeControl.target),n.following=!0,n.copyCameraProp(n.cameraControls.activeControl,o),n.adjustControlAngel())}},flyToPano:function(e){u["objects"].player;var t,i=this.target.__app.player,n={};n.qua=u["objects"].player.quaternion,t=n.qua instanceof Array?(new THREE.Quaternion).fromArray(n.qua):(new THREE.Quaternion).set(n.qua._x,n.qua._y,n.qua._z,n.qua._w);var o={mode:h["a"].PANORAMA,pano:e.pano.id};i.mode==h["a"].PANORAMA&&(o.qua=t,isNaN(o.qua.x)&&console.log("NaN??????"),console.log("slave开始过渡")),i.flyToItem(o,(function(){!0}))},flyToNewMode:function(e){var t=this.target.__app.player;e.panoId&&(e.pano=t.model.panos.get(e.panoId)),t.flyToNewMode(e)},zoomTo:function(e,t){var i=this.target.__app.player;i.zoomTo(e,t)},switchFollow:function(){var e=u["objects"].player,t=this.target.__app.player;e.following=!1,t.following=!0,e.play.control.onUpdate=!0,t.play.control.onUpdate=!1}},"decor"!=c["a"].name){var w=b.prototype,E=function(){};for(var T in w)"function"==typeof w[T]&&(w[T]=E)}var P=b,x=i("d9c2");function k(e){var t=R();return function(){var i,n=Object(l["a"])(e);if(t){var o=Object(l["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(s["a"])(this,i)}}function R(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var _=function(e){Object(r["a"])(i,e);var t=k(i);function i(){return Object(o["a"])(this,i),t.apply(this,arguments)}return Object(a["a"])(i,[{key:"add",value:function(e){var t=new d["a"](u["objects"].tagManager.model,e.sid,e);u["objects"].tagManager.addTag(t)}},{key:"openById",value:function(e){var t=u["objects"].tagManager.tags[e];t&&(u["objects"].tagManager.closeOpenedTag(),setTimeout((function(){u["objects"].player.flyToTag(t)}),100))}},{key:"removeById",value:function(e){var t=u["objects"].tagManager.tags[e];t&&u["objects"].tagManager.removeTag(t)}}]),i}(EventEmitter),S=function(e){Object(r["a"])(n,e);var t=k(n);function n(){var e;Object(o["a"])(this,n),e=t.call(this),e.tag=new _,e.screen=new P,e.partners=["mingyuan","kankan"];var a=(x["a"].urlQueryValue("from")||"").toLowerCase();return a&&-1!=e.partners.indexOf(a)&&i("f76f")("./Partner".concat(a)).then((function(t){return e.partner=new t.default})),e}return n}(EventEmitter);window.__api=new S;var M=i("fa04"),A=i("fc0a"),O=i("8970"),C=i("583b");function D(e){if(M["a"].player.started){__api.screen.switchFollow(),M["a"].player.emit("vr_freedom",this);var t=$.Deferred();t.then((function(){u["bus"].emit("app/changeMode",e)})),"pano"===e?M["a"].player.insideMode():"3d"===e?M["a"].player.flyToNewMode({mode:h["a"].DOLLHOUSE},t):"2d"===e&&M["a"].player.flyToNewMode({mode:h["a"].FLOORPLAN},t)}}window.__app=M["a"]},c840:function(e,t,i){"use strict";var n=i("2e64"),o=i.n(n);o.a},c923:function(e,t,i){},ca21:function(e,t,i){"use strict";var n={TileDownloadSuccess:"tiledownloader.download.success",TileDownloadFailure:"tiledownloader.download.failure",PanoDownloadComplete:"tiledownloader.pano.download.complete"};t["a"]=n},cbe8:function(e,t,i){"use strict";var n=i("f121"),o={MAX_SPOT_COUNT:30,LOADPIC:"thumbBigImg.jpg",LOADPIC_FISH:"thumbFishBigImg.jpg",THUMBPIC:"thumbSmallImg.jpg",Mobile_Login:"mobile.html#/login",SCENETYPE:["文博","地产","电商","餐饮","家居","其他"],SCENETYPE2:["其他","文博","地产","电商","餐饮","家居"],SCENETYPE_index:[["其他","icon_logo"],["文博","icon_wenbo"],["地产","icon_zhuye"],["电商","icon_dianshang"],["餐饮","icon_canyin"],["家居","icon_jiaju"]],FishCam_BackDist:4/11,FishCam_BackDist2:.2,skyRadius:.6,fish:{insideFOV:80,insideLookLimitUp:20,insideLookLimitDown:-20},insideFOV:n["a"].isMobile&&!n["a"].isEdit?91:70,insideLookLimitUp:40,insideLookLimitDown:-40,BGM_LIST:[{name:"欢快",file:"01.mp3"},{name:"空灵",file:"02.mp3"},{name:"节奏",file:"03.mp3"},{name:"怀旧",file:"04.mp3"},{name:"想念",file:"05.mp3"},{name:"复古",file:"06.mp3"},{name:"琴弦",file:"07.mp3"},{name:"愉快",file:"08.mp3"}],imgRoot:n["a"].getStaticResource("img/"),FloorLogoUser:"floorLogoImg.png",HotChinese:{note:"注释",photo:"照片",video:"视频",voice:"声音",link:"链接"},styleRemarks:{note:"文本热点。您可根据场景内容填写热点的标题、内容以及链接内容。",photo:"图片热点。您可添加图片丰富的热点内容,图片过大将被系统压缩。",video:"视频热点。您可上传本地视频内容进行更多的展示。",voice:"音频热点。您可上传本地音频内容进行热点讲解。",link:"超链接热点。您可添加超链接视频,视频将在热点里播放。"},Circle:"iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAARs0lEQVR4nO3de4xc5XnH8e/M2mvjxV6bq8H4gh1DIOBCqEAOtSGJSdIoFeXSAnFVSPpHKKIoTdLS5J8qapNKTdMLTdJIUdLECiJOkZwqVW5QrjUXpwbXYAgYfANfwCR4Mcb2enenfzyz3vF4bmfmnPc5l99HOlrvMnPmsTnvb99zznvet8QTa5BM6wdOr24zgenADGCw+ufx7ycDJwB91ff01+1nuLqNAgeBI8D+6vYWMFT9uh/YB7xW3YYT+5tJ4iZ5FyAd6QfOAuYC84DZwGnV7aQYP2M8FAYjvO83wOvVbQ+wA3gFeBWFQ+opANJnKvAuYHH169nAHKDsWVQLJ1W3d9f9fAzYCWwFXgI2V78eClqdtKQA8DcTeE/NNh/rpmddGeuxzAWWV382CmwHNtVs+1yqEwBKugYQ3BTgQuCi6jbftxx3O4CngQ3AM8Bh33KKRQEQxsnApdVtCcdfgBMzDGwE1lW3X/uWk38KgOTMApYCy7Cufcm3nMypYKcIjwKPA2/6lpNPCoB4TQcuxxr9BaT3wl3WjAHPYmGwFrsVKTFQAPSuhP2G/zDwPtS9T9ow8Bjwc6yHUPEtJ9t0F6B7g8AK4CrsNp2E0Q9cWd12AvcB92MDlSQi9QCiWwhcjd3aUoCmwwh2evAjYItzLZmiA7gzJeBi4Brs1p2kyyTg/dVtA7AGu7Wo04M2FACt9QFXYA1/gW8p0qHx8RXbsCB4GBuAJA3oFKCxPuwc8wbgDN9SpEe7gdXAQygIjqMAOFYJu4W3EjjTuRaJ1y7gbuxagU4NqhQAEy4B/hi7yCf5tQVYBaz3LiQNFAD2sMqfYAEgxbEe+Db26HJhFfki4ADW1f8o+Xj6TqK5BLtY+FPg+8AB33J8FDEASsAHgE9iM+VIcfUBH8PGdHwHeICCXR8o2inAbOB24Le8C5FU2gh8DbtzUAhFeVilD7uX/3XU+KW5JVgAXEtBTguLcAqwELgDWORdiGRCP/AJ7LTgLnI+tDjPPYAScD3wVdT4JbpF2LFzPTmeyyGvPYBTgc9gz+SLdGsScDN2x+Afgb2+5cQvjz2A38G6bmr8EpcLgH/Fjq1cyVMPYApwK/aMvkjcBoA7sd7AN8nJ5KV56QHMwc7X1PglaSuwYy0Xk8DkIQCWYudnRZ9eW8KZjx1zS70L6VWWA6CEDeX9PDDNuRYpnmnYsbeSDN8lyOo1gKnYVf7MJ7BkWgm4kYkeQeaWPctiD2AW8CXU+CU9lmLH5CzvQqLKWgDMBb4CnONdiEidc7Bjc653IVFkKQCWAH8PnO5diEgTp2PH6BLvQjqVlQBYDnwRONG7EJE2TsSO1eXtXpgGWbgI+LvYAJ+shJXIJOBz2OChnzrX0lLaA+B6bCy2SNaUgNuwELjXuZam0vxb9UbU+CX7bsaO5VRKawCsrG4ieZDa4zmNAXAjKU5MkS6l8rhOWwBcS0qTUiQGK4HrvIuolaYA+Cg2FZNInt2CHeupkJYAuAL4lHcRIoF8Cjvm3aUhAJYAnyYdtYiEUMaOefcRg96NbgHwBdI/HkEkbpOwY3+BZxGeAXAK8NfYQAmRIhrA2sApXgV4BcAUnP/iIikx/otwiseHewRACfgLnLs+IimyAGsTwWcW8giAG4DLHD5XJM0uw2GgUOgAuAS4KfBnimTFTVgbCSZkAMzGHpH0vvMgklYlrI3MDvWBoRrjFGwGVU3oIdLaiVhbCXJRMFQA3Iqt0isi7S0E/jTEB4UIgCvRij0iUX0QazuJSjoAzsBmRRGR6G4DzkzyA5IMgDLwWeCEBD9DJM9OwBbA6UvqA5IMgD8Ezk1w/yJFcC7wB0ntPKkAWIgN+BGR3t0ALEpix0kEQB9wB3rCTyQuk7A2FfupQBIBcDUJpZVIgS0Erol7p3EHwBloTj+RpNyEtbHYxBkAJeB2oD/GfYrIhH6sjcX21GCcAfBBUjDFkUjOLSHGgXVxBcAANtupiCTvZmBaHDuKKwBWAoMx7UtEWhskprkD4giAeaRonnORgvgYMQwTjiMAPkmCQxVFpKHJWNvrSa8B8F4Cz2AiIkddBlzcyw56CYASWr5bxNst9HBbsJcAWIom+RDxthBri13pNgBKwMe7/VARidVKuuwFdBsAy4D5Xb5XROI1D2uTkXUTAH3ot79I2nycLu7GdRMAy4E5XbxPRJIzB2ubkUQNgBIJzk4iIj25jojXAqIGwKXA3IjvEZEw5hNxXEDUALg24utFJKzfj/LiKAGwEDg/Wi0iEtjFRBifEyUAro5ei4g46LitdhoAg3RxhVFEXCwHZnbywk4DYAWa5VckKybR4axBnQRACbiqp3JEJLQVdHBLsJMAeA8a+COSNXOwtttSJwHw4d5rEREHH2n3gnYBMB14Xzy1iEhgS7E23FS7AFiG5vkXyap+2jwl2C4AroivFhFx0LINtwqA04Dz4q1FRAI7D2vLDbUKgMuJcQkiEXFRwtpyQ60CQBf/RPIhcgCcDJybTC0iEtg5wCmN/kOzALgUdf9F8qKEtenjNAuA9yZXi4g4aDhRSKMAmARclGwtIhLYRTR4oK9RAJwPTE28HBEJaSoNJvRpFABa608kn367/geNAkDn/yL5dNx1gPoAGAQWBClFREJbQN1MQfUBcGGwUkTEwwW139QHgGb9Fcm3lgGgh39E8u2YX/K1ATAFODtsLSIS2HxqbvPXBsBiulhdVEQypQy8q/abcYvD1yIiDo629doAWORQiIiE17AH0PF6YiKSaUfb+ngA9KO5/0WK4kyqk/2OB8A8oi0UKiLZVQbOGv8DwFy/WkTEwTxQAIgU1TEBMNuxEBEJbzZMBMCZjoWISHhzQD0AkaI62gMYqG4iUhzTgIEycKp3JSLi4tQyTRYMEJHcO6VM3RRBIlIYs8rAdO8qRMTFiWVsIlARKZ7BMjDDuwoRcTFDpwAixTVdPQCR4po+PhBIRIpnoIyNCBKR4hkoU50ZREQKZ3KZBmuGi0ghTC6jtQBEiqqvTM0qISJSKFM1EahIgSkARApMASBSYGXgsHcRIuLiUBkY8a5CRFyMKgBEiutIGRj2rkJEXBwpA+94VyEiLg6UgYPeVYiIi0Nl4IB3FSLi4oACQKS43i4D+7yrEBEXQ2VgyLsKEXExVAbe9K5CRFy8qQAQKa59ZeAN7ypExMXeMrDXuwoRcbF3/DagbgWKFMs7VMcBAOzxrEREgtsDExOC7HIsRETC2wUTAaAegEix7IaJAHjFsRARCW8HKABEiuqYANgBjPnVIiIBjQGvwkQADAM73coRkZB2UZ0JrHZa8C0+tYhIYEfbem0AvOxQiIiE99L4H2oDYLNDISIS3tG2Xh8Ao+FrEZGAxmjSAzgMbA1ejoiEtB04NP5N/dqAvwpbi4gE9lztN/UBsClgISIS3rO139QHwDMBCxGR8FoGwBCwLVgpIhLSNupmAa8PAICngpQiIqE9Xf+DRgGwPkAhIhLe/9b/oFEAPEfNbQIRyYVDwPP1P2wUACPAhsTLEZGQNgBH6n/YKABA1wFE8ua4839oHgC/BCrJ1SIiAVWAdY3+Q7MAeAN4MbFyRCSkF2myAFCzAABYm0wtIhJY07bcLgB0GiCSbRW6DIDXaXDbQEQy5XmsLTfUKgAAHo63FhEJrGUbbhcAj1KdPFBEMmcYa8NNtQuA/cDjsZUjIiE9jrXhptoFAMDP4qlFRAL7ebsXdBIAm9CaASJZs5O6Z/8b6SQAKsB9PZcjIiHdTwe38TsJgPGdjfRUjoiEMoK12bY6DYAh4JGuyxGRkB6hbuafZjoNAID/6q4WEQnsPzt9YZQA2IymDRdJuw1EWOczSgAA3Bvx9SIS1pooL44aAOuAVyK+R0TC2EGTiT+aiRoAFdQLEEmre4n4BG/UAAB7uGB3F+8TkeTsoYs7dd0EwCiwuov3iUhyVtPF6t7dBADAQ6gXIJIWu4EHu3ljtwEwCtzd5XtFJF5308Vvf+g+AMDON7b28H4R6d1Wehil20sAVIDv9vB+Eendv9PD3J29BADYAiJaS1DExzoi3vev12sAgCVQV+cfItK1EeDbve4kjgDYDvwkhv2ISOd+DOzqdSdxBADYVcihmPYlIq0NAT+IY0dxBcAB4Hsx7UtEWvse8E4cO4orAMBmINkU4/5E5Hgb6XC2n07EGQAV4Oto6jCRpAwDXyPGJfviDACwR4X1tKBIMu4h5iH4cQcA2EMJ2xLYr0iRbSHiZB+dSCIARoB/QacCInEZBe4igfE2SQQAwEvokWGRuKwGXk5ix0kFAMB/AC8kuH+RIngR+GFSO08yAEaBrwIHE/wMkTw7iLWhxIbaJxkAYFcsv5HwZ4jk1b8Rw3DfVpIOALDZg/47wOeI5MkDdDnLTxQhAgAsyTperECk4LYSqOccKgAOA38HvB3o80Sy6m3gy1ibSVyoAACbtvgfiHEYo0jOVLA2sifUB4YMALDZg+4J/JkiWXEPgWfYCh0AYM8xP+nwuSJp9iQxPeMfhUcAVICvoEFCIuNewNpE8NNjjwAAu8DxN8AbTp8vkhZvAH9LoIt+9bwCAGxaoy9iswmJFNEBrA3s8yrAMwDAHhv+MnpyUIpnBDv2t3kW4R0AYFMc/RMw5l2ISCBj2DG/0buQNAQA2NJGsU51JJJSFexY73o5rzilJQAA7gO+5V2ESMK+hR3rqZCmAABb7GCVdxEiCVmFHeOpkbYAAJtIJPiACJGE/QA7tlMljQEAttLQ3d5FiMQktcdzWgMALDG12pBk3SpS3KOd5F1AG/diSyDdCpScaxGJogJ8k5QvnJv2AAD7BzwAfJps1CsyAvwz8LB3Ie1kpUE9jA2X/Dww4FyLSCsHsRF+G7wL6USarwHU+z/gL4HXvQsRaeJN4K/ISOOHbAUAwA7gc8Bm70JE6mwBPkPG5r7MWgCApewXgCe8CxGpehK4kww+3p7FAAA4hJ1nrUbPD4ifCnYMfgk7JjMnKxcBG6kA38e6XH8OTPUtRwrmEPZE32PehfQiqz2AWo9hAbDduxApjO3YMZfpxg/5CACAV4HPohWIJHkPYsfaq96FxCHLpwD1DmODL54CbkPjBSReB7EVrhJfriukvPQAaj0C/BnwrHchkhsvYCNRc9X4IZ8BALAXu1W4Cs03KN0bxZ7iu5OEV+n1kqdTgHoV7Pnrp4A7gIW+5UjGbAHuAl72LiRJJZ5Y411DCH3ANcBNQL9zLZJuw9gSXWuwHkCu5bkHUGsUe7R4LXA7sMS3HEmpjdiEnbu9CwmlKD2AWiVgBXALMMO3FEmJt4DvAvdTsJGlRekB1Kpgs7I+BtwA/B7F/HcQu0D8Y2w4byFXqCpiD6DeGcAngKXehUhQTwDfoUDd/UYUABMuAW4GzvYuRBK1FZtrcr13IWmgru+E9dgtw2XAH2E9A8mP3dg9/Uco2Hl+KwqAY1WwA2Qt8H7sGsFs14qkV68BP8SeE8n9bb2oFACNjWJXhB8ErgSuA+Z6FiSRbQN+BDyEGn5TCoDWRrHfHA8Al2JBcJ5rRdLOBmwQz9Ooq9+WAqAzFWzapyeBxcDVwOXo3y8tRoBHsd/4mZqTz5vuAnRvJjag6EPogqGX3cAvsNO1fc61ZJICoHcl4ELgKqxXMNm3nNw7gg3i+gXwDOrm90QBEK/p2G3Ey4ELyO/j1qGNAZuA/8G6+vt9y8kPBUByZmFBsAy7cKi1DaOpAM9jDX4tNh28xEwBEMbJwGXYnYQL0SPJzQxj3fp12AXXX/uWk38KgPCmYI8jXwRcjMYXvILdstuAPY572LecYtFtrPAOA7+sbgCDwPnYacK7sduMef3/MoIt6/YrrHv/HDDkWlHB5fVAy5Ih4PHqBnZ6sBg4F1iEPZw0h+xdUBwDdmIP37yMTay5GevmS0ooANJnGLvivanmZ/3AWcD86tfZwGnV7aTQBdb5DbZi8+vAHmy+/B1Y116NPeUUANkwjI1wazTKrR84vbrNxGY5GsRuSc6ofp2OjU8YwO5GTOPYHsVh7P462MQYler3+6vbW9WvQ9U/78MesnkNNfJM+3+04rJhF1d+wAAAAABJRU5ErkJggg==",PngdataPre:"data:image/png;base64,",TOURFile_prefix:"data/data**/tour/screenCap{index}.json",TOURimg_prefix:"images/images**/tour/guide",guideSoundFile:"201810-sound",guideMediaFile:"201810-media"};t["a"]=o},ccc0:function(e,t,i){"use strict";i.d(t,"a",(function(){return J}));i("6b54"),i("2397"),i("20d6"),i("7514"),i("ac6a"),i("55dd"),i("673e");var n=i("d4ec"),o=i("bee2"),a=i("257e"),r=i("262e"),s=i("99de"),l=i("7e84"),c=i("ade3"),u=i("cd18"),d=i("2c8b"),h=i("ec11"),p=i("b235"),f=(i("456d"),i("53ca"));function m(e){if(this.set={},this.infContains=function(){return!0},"object"==Object(f["a"])(e))if(e instanceof Array)for(var t=0;t<e.length;t++)this.set[e[t]]=!0;else this.set=e;else if("function"==typeof e)this.infContains=e;else if("undefined"!=typeof e)throw new Error("set must be either an array or an object.")}m.prototype.contains=function(e){return!!this.set[e]},m.prototype.has=m.prototype.contains,m.prototype.add=function(e){if(1==arguments.length)this.set[e]=!0;else for(var t=0;t<arguments.length;t++)this.set[arguments[t]]=!0},m.prototype.addAll=function(e){if("object"!=Object(f["a"])(e)&&!(e instanceof Array))throw new Error("arr must be an array.");for(var t=0;t<e.length;t++)this.add(e[t])},m.prototype.remove=function(e){if(1==arguments.length)delete this.set[e];else for(var t=0;t<arguments.length;t++)delete this.set[arguments[t]]},m.prototype.delete=m.prototype.remove,m.prototype.clear=function(){this.set={}},m.prototype.size=function(){return Object.keys(this.set).length},m.prototype.toString=function(){return"{"+Object.keys(this.set).toString()+"}"},m.prototype.toArray=function(){return"undefined"==typeof this.set?[]:Object.keys(this.set)},m.prototype["*values"]=m.prototype.toArray;var v=m;function g(e){return L+e}function y(e){return e.substring(L.length)}function b(e,t){for(var i in t)Object.defineProperty(e,i,{value:t[i],configurable:!0,writable:!0})}function w(e){if("string"!=typeof e)throw new TypeError("key must be a string.")}var E,T,P,x,k,R,_,S,M,A,O,C,D,V,I,j=Object.prototype.hasOwnProperty,L="~",F=function(e){var t=Object.create(null),i=0,n={};return b(n,{get:function(e,i){w(e);var n=g(e);return n in t?t[n]:i},set:function(e,n){w(e);var o=g(e);return o in t||++i,t[o]=n},has:function(e){return w(e),g(e)in t},delete:function(e){w(e);var n=g(e);return n in t&&(--i,delete t[n],!0)},clear:function(){t=Object.create(null),i=0},forEach:function(e,i){if("function"!=typeof e)throw new TypeError("`callback` must be a function");for(var o in t)if(j.call(t,o)){var a=y(o),r=t[o];e.call(i,r,a,n)}}}),Object.defineProperty(n,"size",{get:function(){return i},configurable:!0}),"object"==Object(f["a"])(e)&&null!==e&&Object.keys(e).forEach((function(t){n.set(t,e[t])})),n},H=F;P=Math.floor,A=Math.min,T=function(e,t){return e<t?-1:e>t?1:0},M=function(e,t,i,n,o){var a;if(null==i&&(i=0),null==o&&(o=T),i<0)throw new Error("lo must be non-negative");null==n&&(n=e.length);while(i<n)a=P((i+n)/2),o(t,e[a])<0?n=a:i=a+1;return[].splice.apply(e,[i,i-i].concat(t)),t},R=function(e,t,i){return null==i&&(i=T),e.push(t),V(e,0,e.length-1,i)},k=function(e,t){var i,n;return null==t&&(t=T),i=e.pop(),e.length?(n=e[0],e[0]=i,I(e,0,t)):n=i,n},S=function(e,t,i){var n;return null==i&&(i=T),n=e[0],e[0]=t,I(e,0,i),n},_=function(e,t,i){var n;return null==i&&(i=T),e.length&&i(e[0],t)<0&&(n=[e[0],t],t=n[0],e[0]=n[1],I(e,0,i)),t},x=function(e,t){var i,n,o,a,r,s;for(null==t&&(t=T),a=function(){s=[];for(var t=0,i=P(e.length/2);0<=i?t<i:t>i;0<=i?t++:t--)s.push(t);return s}.apply(this).reverse(),r=[],n=0,o=a.length;n<o;n++)i=a[n],r.push(I(e,i,t));return r},D=function(e,t,i){var n;if(null==i&&(i=T),n=e.indexOf(t),-1!==n)return V(e,0,n,i),I(e,n,i)},O=function(e,t,i){var n,o,a,r,s;if(null==i&&(i=T),o=e.slice(0,t),!o.length)return o;for(x(o,i),s=e.slice(t),a=0,r=s.length;a<r;a++)n=s[a],_(o,n,i);return o.sort(i).reverse()},C=function(e,t,i){var n,o,a,r,s,l,c,u,d;if(null==i&&(i=T),10*t<=e.length){if(a=e.slice(0,t).sort(i),!a.length)return a;for(o=a[a.length-1],c=e.slice(t),r=0,l=c.length;r<l;r++)n=c[r],i(n,o)<0&&(M(a,n,0,null,i),a.pop(),o=a[a.length-1]);return a}for(x(e,i),d=[],s=0,u=A(t,e.length);0<=u?s<u:s>u;0<=u?++s:--s)d.push(k(e,i));return d},V=function(e,t,i,n){var o,a,r;null==n&&(n=T),o=e[i];while(i>t){if(r=i-1>>1,a=e[r],!(n(o,a)<0))break;e[i]=a,i=r}return e[i]=o},I=function(e,t,i){var n,o,a,r,s;null==i&&(i=T),o=e.length,s=t,a=e[t],n=2*t+1;while(n<o)r=n+1,r<o&&!(i(e[n],e[r])<0)&&(n=r),e[t]=e[n],t=n,n=2*t+1;return e[t]=a,V(e,s,t,i)},E=function(e){this.cmp=null!=e?e:T,this.nodes=[]},E.push=R,E.pop=k,E.replace=S,E.pushpop=_,E.heapify=x,E.updateItem=D,E.nlargest=O,E.nsmallest=C,E.prototype.push=function(e){return R(this.nodes,e,this.cmp)},E.prototype.pop=function(){return k(this.nodes,this.cmp)},E.prototype.peek=function(){return this.nodes[0]},E.prototype.contains=function(e){return-1!==this.nodes.indexOf(e)},E.prototype.replace=function(e){return S(this.nodes,e,this.cmp)},E.prototype.pushpop=function(e){return _(this.nodes,e,this.cmp)},E.prototype.heapify=function(){return x(this.nodes,this.cmp)},E.prototype.updateItem=function(e){return D(this.nodes,e,this.cmp)},E.prototype.clear=function(){return this.nodes=[]},E.prototype.empty=function(){return 0===this.nodes.length},E.prototype.size=function(){return this.nodes.length},E.prototype.clone=function(){var e;return e=new E,e.nodes=this.nodes.slice(0),e},E.prototype.toArray=function(){return this.nodes.slice(0)},E.prototype.insert=E.prototype.push,E.prototype.top=E.prototype.peek,E.prototype.front=E.prototype.peek,E.prototype.has=E.prototype.contains,E.prototype.copy=E.prototype.clone;var z=E;function N(e){if(void 0!==e.parent){var t=N(e.parent);return t.push(e.data),t}return[e.data]}function B(e){return e.toString()}function U(e,t){return e.f-t.f}function W(e){void 0===e.timeout&&(e.timeout=1/0);var t=e.hash||B,i={data:e.start,g:0,h:e.heuristic(e.start)},n=i;i.f=i.h;var o=new v,a=new z(U),r=H();a.push(i),r.set(t(i.data),i);for(var s=new Date;a.size();){if(new Date-s>e.timeout)return{status:"timeout",cost:n.g,path:N(n)};var l=a.pop();if(r.delete(t(l.data)),e.isEnd(l.data)){var c=N(l);return{status:"success",cost:l.g,path:c}}o.add(t(l.data));for(var u=e.neighbor(l.data),d=0;d<u.length;d++){var h=u[d];if(!o.contains(t(h))){var p=l.g+e.distance(l.data,h),f=r.get(t(h)),m=!1;if(void 0===f)f={data:h},r.set(t(h),f);else{if(f.g<p)continue;m=!0}f.parent=l,f.g=p,f.h=e.heuristic(h),f.f=p+f.h,f.h<n.h&&(n=f),m?a.heapify():a.push(f)}}}return{status:"noPath",cost:n.g,path:N(n)}}var q=W,G=i("823b"),Q=i("9ef6"),Y=i("6860");i("80c5");function X(e){var t=Z();return function(){var i,n=Object(l["a"])(e);if(t){var o=Object(l["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(s["a"])(this,i)}}function Z(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var J=function(e){Object(r["a"])(i,e);var t=X(i);function i(){var e;return Object(n["a"])(this,i),e=t.call(this),Object(c["a"])(Object(a["a"])(e),"includeNodesNearPath",function(){var e=new THREE.Vector3,t=new THREE.Vector3,i=new THREE.Vector3,n=new THREE.Vector3,o=new THREE.Vector3,a=new THREE.Vector3,r=new THREE.Vector3,s=new THREE.Vector3,l=[],c=new THREE.Vector3,u=new THREE.Vector3;return function(d,h){if(d)for(var p=function(e,t,i){return o.copy(t).sub(e),o.dot(i)},f=function(e,t){return p(c,e.position,i)-p(c,t.position,i)},m=0;m<d.length-1;){var v=d[m],g=d[m+1],y=this.index[v],b=this.index[g];c.copy(y.position),u.copy(b.position),l.length=0,e.copy(u).sub(c),i.copy(e).normalize();for(var w=0;w<this.list.length;w++){var E=this.list[w];o.copy(E.position).sub(c);var T=o.dot(i);if(T>0){r.copy(i),r.multiplyScalar(T),a.copy(o),a.sub(r);var P=a.length();if(P<h){t.copy(e).negate(),n.copy(t).normalize(),s.copy(E.position).sub(u);var x=s.dot(n);x>0&&l.push(E)}}}if(l.length>0){l.sort(f);for(var k=d.length+l.length-1;k>=m+l.length;k--)d[k]=d[k-l.length];for(var R=0;R<l.length;R++)d[R+m+1]=l[R].id}m+=l.length+1}}}()),Object(c["a"])(Object(a["a"])(e),"closestPanoTowardPoint",(function(e){var t=e.point,i=e.require||[],n=e.rank||[],o=(e.force,e.getAll);Y["objects"].player.linkEditor.noPanoHasNeighbor||i.push((function(e){return Y["objects"].player.linkEditor.checkHasNeighbor(e)})),i.push(h["a"].filters.isPanoAligned()),e.floor&&i.push(h["a"].filters.atFloor(e.floor));var a={position:t};n.push(h["a"].scoreFunctions.distanceSquared(a,-2));var r=this.sortByScore(i,n);return o?r:r&&r.length>0&&r[0].pano})),e.neighbourMap={},e.map=null,e}return Object(o["a"])(i,[{key:"getIndex",value:function(e){return e.id}},{key:"find",value:function(e,t){var i=u["a"].filterAll(this.list,e);return 0===i.length?null:(t&&t.forEach((function(e){i=u["a"].stableSort(i,e)})),i[0])}},{key:"sortByScore",value:function(e,t){var i=u["a"].filterAll(this.list,e);return 0===i.length?null:i=i.map((function(e){return{pano:e,score:t.reduce((function(t,i){return t+i(e)}),0)}})).sort((function(e,t){return t.score-e.score}))}},{key:"lowestByScore",value:function(e,t,i){return this.findRankedByScore(0,e,t,i)}},{key:"findRankedByScore",value:function(e,t,i,n){n&&(n.candidates=null,n.pano=null),e||(e=0);var o=this.sortByScore(t,i);return!o||0===o.length||e>=o.length?null:(n&&(n.candidates=o,n.pano=o[e].pano),o[e].pano)}},{key:"isNeighbour",value:function(e,t){return this.neighbourMap[e.id][t.id]}},{key:"getNeighbours",value:function(e){return this.neighbourMap[e.id]}},{key:"setNeighbour",value:function(e,t,i){return this.neighbourMap[e.id]||(this.neighbourMap[e.id]={}),this.neighbourMap[t.id]||(this.neighbourMap[t.id]={}),this.neighbourMap[e.id][e.id]=!0,this.neighbourMap[t.id][t.id]=!0,this.neighbourMap[e.id][t.id]=i,this.neighbourMap[t.id][e.id]=i,this.neighbourMap[e.id]}},{key:"findClosest",value:function(e,t){var i=[h["a"].filters.isPanoAligned()];return t&&i.push(h["a"].filters.inDirection(e,t,.75)),this.find(i,[h["a"].sortFunctions.distanceToPoint(e)])}},{key:"populate_path_graph",value:function(){var e,t,i,n,o,a,r,s,l=Date.now(),c={},u=0,d=new THREE.Vector3(0,0,0);for(e=0;e<this.list.length;e+=1){for(t in o=this.list[e],r={},s=!1,i=o.neighbourPanos||o.findNeighourPanos(),i)if(i[t]){a=this.index[t],d.copy(o.floorPosition),d.sub(a.floorPosition);var h=Math.sqrt(d.x*d.x+d.z*d.z),p=(Math.abs(d.y),Math.max(h,.01),Math.max(0,Math.abs(d.y)-.2));p>0?(1,p=Math.pow(4*p,2),h=Math.pow(h,2),n=Math.sqrt(p*p+h*h)):(1,n=d.length()),r[a.id]=n,s=!0}s?c[o.id]=r:u+=1}this.map=c,G["a"].info("graph ready in "+(Date.now()-l)+"ms, "+u+" had no neighbors")}},{key:"aStarSearch",value:function(e,t){var i=Date.now(),n=new q({start:e,isEnd:function(e){return e===t},neighbor:function(e){var t=e.neighbourPanos||e.findNeighourPanos(),i=[];for(var n in t)t[n]&&i.push(this.index[n]);return i}.bind(this),distance:function(e,t){var i=this.map[e.id],n=i[t.id];return n}.bind(this),heuristic:function(e,t){return 1}.bind(this),hash:function(e){return e.id},timeout:5e3});if(G["a"].debug("A* search in "+(Date.now()-i)+"ms"),"success"!==n.status)return G["a"].debug("Did not find A* path from "+e+" to "+t),null;G["a"].debug("Total cost "+n.cost.toPrecision(3)+", "+n.path.length+" steps");var o=[];return n.path.forEach((function(e){o.push(e.id)})),o}},{key:"fadeMarkerOpacity",value:function(e,t,i){p["a"].cancelById("fadeMarkerOpacity");var n=this.list.findIndex((function(e){return e.marker}));if(n<0)G["a"].info("marker findIndex<0");else{var o,a=function(e,i){e.member=e.member.filter((function(t){return t.marker&&t.marker.material.opacity!=e.toOp})),p["a"].trigger({func:function(t,i){e.member.forEach((function(i){var n=i.marker.oldOpacity,o=n+t*(e.toOp-n);i.marker&&(i.marker.material.opacity=o)}))}.bind(this),duration:void 0==t?Q["a"].markerOpacityTransitionTime:t,name:"_fpm_"+i,id:"fadeMarkerOpacity"})};this.forEach((function(e){e.marker&&(e.marker.oldOpacity=e.marker.material.opacity)})),e=void 0==e?Q["a"].panorama.markerOpacity:e,o=e>0&&i?i:[{member:this.list,toOp:e}];for(var r=0;r<o.length;r++)a(o[r],r)}}}]),i}(d["a"])},cd18:function(e,t,i){"use strict";i("7f7f"),i("34ef"),i("4917"),i("28a5");var n,o=i("ade3"),a=(i("3b2b"),i("53ca")),r=(i("6b54"),i("55dd"),i("ac6a"),i("456d"),i("a481"),{PrefixPng:"data:image/png;base64,",vrCire:"iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAARs0lEQVR4nO3de4xc5XnH8e/M2mvjxV6bq8H4gh1DIOBCqEAOtSGJSdIoFeXSAnFVSPpHKKIoTdLS5J8qapNKTdMLTdJIUdLECiJOkZwqVW5QrjUXpwbXYAgYfANfwCR4Mcb2enenfzyz3vF4bmfmnPc5l99HOlrvMnPmsTnvb99zznvet8QTa5BM6wdOr24zgenADGCw+ufx7ycDJwB91ff01+1nuLqNAgeBI8D+6vYWMFT9uh/YB7xW3YYT+5tJ4iZ5FyAd6QfOAuYC84DZwGnV7aQYP2M8FAYjvO83wOvVbQ+wA3gFeBWFQ+opANJnKvAuYHH169nAHKDsWVQLJ1W3d9f9fAzYCWwFXgI2V78eClqdtKQA8DcTeE/NNh/rpmddGeuxzAWWV382CmwHNtVs+1yqEwBKugYQ3BTgQuCi6jbftxx3O4CngQ3AM8Bh33KKRQEQxsnApdVtCcdfgBMzDGwE1lW3X/uWk38KgOTMApYCy7Cufcm3nMypYKcIjwKPA2/6lpNPCoB4TQcuxxr9BaT3wl3WjAHPYmGwFrsVKTFQAPSuhP2G/zDwPtS9T9ow8Bjwc6yHUPEtJ9t0F6B7g8AK4CrsNp2E0Q9cWd12AvcB92MDlSQi9QCiWwhcjd3aUoCmwwh2evAjYItzLZmiA7gzJeBi4Brs1p2kyyTg/dVtA7AGu7Wo04M2FACt9QFXYA1/gW8p0qHx8RXbsCB4GBuAJA3oFKCxPuwc8wbgDN9SpEe7gdXAQygIjqMAOFYJu4W3EjjTuRaJ1y7gbuxagU4NqhQAEy4B/hi7yCf5tQVYBaz3LiQNFAD2sMqfYAEgxbEe+Db26HJhFfki4ADW1f8o+Xj6TqK5BLtY+FPg+8AB33J8FDEASsAHgE9iM+VIcfUBH8PGdHwHeICCXR8o2inAbOB24Le8C5FU2gh8DbtzUAhFeVilD7uX/3XU+KW5JVgAXEtBTguLcAqwELgDWORdiGRCP/AJ7LTgLnI+tDjPPYAScD3wVdT4JbpF2LFzPTmeyyGvPYBTgc9gz+SLdGsScDN2x+Afgb2+5cQvjz2A38G6bmr8EpcLgH/Fjq1cyVMPYApwK/aMvkjcBoA7sd7AN8nJ5KV56QHMwc7X1PglaSuwYy0Xk8DkIQCWYudnRZ9eW8KZjx1zS70L6VWWA6CEDeX9PDDNuRYpnmnYsbeSDN8lyOo1gKnYVf7MJ7BkWgm4kYkeQeaWPctiD2AW8CXU+CU9lmLH5CzvQqLKWgDMBb4CnONdiEidc7Bjc653IVFkKQCWAH8PnO5diEgTp2PH6BLvQjqVlQBYDnwRONG7EJE2TsSO1eXtXpgGWbgI+LvYAJ+shJXIJOBz2OChnzrX0lLaA+B6bCy2SNaUgNuwELjXuZam0vxb9UbU+CX7bsaO5VRKawCsrG4ieZDa4zmNAXAjKU5MkS6l8rhOWwBcS0qTUiQGK4HrvIuolaYA+Cg2FZNInt2CHeupkJYAuAL4lHcRIoF8Cjvm3aUhAJYAnyYdtYiEUMaOefcRg96NbgHwBdI/HkEkbpOwY3+BZxGeAXAK8NfYQAmRIhrA2sApXgV4BcAUnP/iIikx/otwiseHewRACfgLnLs+IimyAGsTwWcW8giAG4DLHD5XJM0uw2GgUOgAuAS4KfBnimTFTVgbCSZkAMzGHpH0vvMgklYlrI3MDvWBoRrjFGwGVU3oIdLaiVhbCXJRMFQA3Iqt0isi7S0E/jTEB4UIgCvRij0iUX0QazuJSjoAzsBmRRGR6G4DzkzyA5IMgDLwWeCEBD9DJM9OwBbA6UvqA5IMgD8Ezk1w/yJFcC7wB0ntPKkAWIgN+BGR3t0ALEpix0kEQB9wB3rCTyQuk7A2FfupQBIBcDUJpZVIgS0Erol7p3EHwBloTj+RpNyEtbHYxBkAJeB2oD/GfYrIhH6sjcX21GCcAfBBUjDFkUjOLSHGgXVxBcAANtupiCTvZmBaHDuKKwBWAoMx7UtEWhskprkD4giAeaRonnORgvgYMQwTjiMAPkmCQxVFpKHJWNvrSa8B8F4Cz2AiIkddBlzcyw56CYASWr5bxNst9HBbsJcAWIom+RDxthBri13pNgBKwMe7/VARidVKuuwFdBsAy4D5Xb5XROI1D2uTkXUTAH3ot79I2nycLu7GdRMAy4E5XbxPRJIzB2ubkUQNgBIJzk4iIj25jojXAqIGwKXA3IjvEZEw5hNxXEDUALg24utFJKzfj/LiKAGwEDg/Wi0iEtjFRBifEyUAro5ei4g46LitdhoAg3RxhVFEXCwHZnbywk4DYAWa5VckKybR4axBnQRACbiqp3JEJLQVdHBLsJMAeA8a+COSNXOwtttSJwHw4d5rEREHH2n3gnYBMB14Xzy1iEhgS7E23FS7AFiG5vkXyap+2jwl2C4AroivFhFx0LINtwqA04Dz4q1FRAI7D2vLDbUKgMuJcQkiEXFRwtpyQ60CQBf/RPIhcgCcDJybTC0iEtg5wCmN/kOzALgUdf9F8qKEtenjNAuA9yZXi4g4aDhRSKMAmARclGwtIhLYRTR4oK9RAJwPTE28HBEJaSoNJvRpFABa608kn367/geNAkDn/yL5dNx1gPoAGAQWBClFREJbQN1MQfUBcGGwUkTEwwW139QHgGb9Fcm3lgGgh39E8u2YX/K1ATAFODtsLSIS2HxqbvPXBsBiulhdVEQypQy8q/abcYvD1yIiDo629doAWORQiIiE17AH0PF6YiKSaUfb+ngA9KO5/0WK4kyqk/2OB8A8oi0UKiLZVQbOGv8DwFy/WkTEwTxQAIgU1TEBMNuxEBEJbzZMBMCZjoWISHhzQD0AkaI62gMYqG4iUhzTgIEycKp3JSLi4tQyTRYMEJHcO6VM3RRBIlIYs8rAdO8qRMTFiWVsIlARKZ7BMjDDuwoRcTFDpwAixTVdPQCR4po+PhBIRIpnoIyNCBKR4hkoU50ZREQKZ3KZBmuGi0ghTC6jtQBEiqqvTM0qISJSKFM1EahIgSkARApMASBSYGXgsHcRIuLiUBkY8a5CRFyMKgBEiutIGRj2rkJEXBwpA+94VyEiLg6UgYPeVYiIi0Nl4IB3FSLi4oACQKS43i4D+7yrEBEXQ2VgyLsKEXExVAbe9K5CRFy8qQAQKa59ZeAN7ypExMXeMrDXuwoRcbF3/DagbgWKFMs7VMcBAOzxrEREgtsDExOC7HIsRETC2wUTAaAegEix7IaJAHjFsRARCW8HKABEiuqYANgBjPnVIiIBjQGvwkQADAM73coRkZB2UZ0JrHZa8C0+tYhIYEfbem0AvOxQiIiE99L4H2oDYLNDISIS3tG2Xh8Ao+FrEZGAxmjSAzgMbA1ejoiEtB04NP5N/dqAvwpbi4gE9lztN/UBsClgISIS3rO139QHwDMBCxGR8FoGwBCwLVgpIhLSNupmAa8PAICngpQiIqE9Xf+DRgGwPkAhIhLe/9b/oFEAPEfNbQIRyYVDwPP1P2wUACPAhsTLEZGQNgBH6n/YKABA1wFE8ua4839oHgC/BCrJ1SIiAVWAdY3+Q7MAeAN4MbFyRCSkF2myAFCzAABYm0wtIhJY07bcLgB0GiCSbRW6DIDXaXDbQEQy5XmsLTfUKgAAHo63FhEJrGUbbhcAj1KdPFBEMmcYa8NNtQuA/cDjsZUjIiE9jrXhptoFAMDP4qlFRAL7ebsXdBIAm9CaASJZs5O6Z/8b6SQAKsB9PZcjIiHdTwe38TsJgPGdjfRUjoiEMoK12bY6DYAh4JGuyxGRkB6hbuafZjoNAID/6q4WEQnsPzt9YZQA2IymDRdJuw1EWOczSgAA3Bvx9SIS1pooL44aAOuAVyK+R0TC2EGTiT+aiRoAFdQLEEmre4n4BG/UAAB7uGB3F+8TkeTsoYs7dd0EwCiwuov3iUhyVtPF6t7dBADAQ6gXIJIWu4EHu3ljtwEwCtzd5XtFJF5308Vvf+g+AMDON7b28H4R6d1Wehil20sAVIDv9vB+Eendv9PD3J29BADYAiJaS1DExzoi3vev12sAgCVQV+cfItK1EeDbve4kjgDYDvwkhv2ISOd+DOzqdSdxBADYVcihmPYlIq0NAT+IY0dxBcAB4Hsx7UtEWvse8E4cO4orAMBmINkU4/5E5Hgb6XC2n07EGQAV4Oto6jCRpAwDXyPGJfviDACwR4X1tKBIMu4h5iH4cQcA2EMJ2xLYr0iRbSHiZB+dSCIARoB/QacCInEZBe4igfE2SQQAwEvokWGRuKwGXk5ix0kFAMB/AC8kuH+RIngR+GFSO08yAEaBrwIHE/wMkTw7iLWhxIbaJxkAYFcsv5HwZ4jk1b8Rw3DfVpIOALDZg/47wOeI5MkDdDnLTxQhAgAsyTperECk4LYSqOccKgAOA38HvB3o80Sy6m3gy1ibSVyoAACbtvgfiHEYo0jOVLA2sifUB4YMALDZg+4J/JkiWXEPgWfYCh0AYM8xP+nwuSJp9iQxPeMfhUcAVICvoEFCIuNewNpE8NNjjwAAu8DxN8AbTp8vkhZvAH9LoIt+9bwCAGxaoy9iswmJFNEBrA3s8yrAMwDAHhv+MnpyUIpnBDv2t3kW4R0AYFMc/RMw5l2ISCBj2DG/0buQNAQA2NJGsU51JJJSFexY73o5rzilJQAA7gO+5V2ESMK+hR3rqZCmAABb7GCVdxEiCVmFHeOpkbYAAJtIJPiACJGE/QA7tlMljQEAttLQ3d5FiMQktcdzWgMALDG12pBk3SpS3KOd5F1AG/diSyDdCpScaxGJogJ8k5QvnJv2AAD7BzwAfJps1CsyAvwz8LB3Ie1kpUE9jA2X/Dww4FyLSCsHsRF+G7wL6USarwHU+z/gL4HXvQsRaeJN4K/ISOOHbAUAwA7gc8Bm70JE6mwBPkPG5r7MWgCApewXgCe8CxGpehK4kww+3p7FAAA4hJ1nrUbPD4ifCnYMfgk7JjMnKxcBG6kA38e6XH8OTPUtRwrmEPZE32PehfQiqz2AWo9hAbDduxApjO3YMZfpxg/5CACAV4HPohWIJHkPYsfaq96FxCHLpwD1DmODL54CbkPjBSReB7EVrhJfriukvPQAaj0C/BnwrHchkhsvYCNRc9X4IZ8BALAXu1W4Cs03KN0bxZ7iu5OEV+n1kqdTgHoV7Pnrp4A7gIW+5UjGbAHuAl72LiRJJZ5Y411DCH3ANcBNQL9zLZJuw9gSXWuwHkCu5bkHUGsUe7R4LXA7sMS3HEmpjdiEnbu9CwmlKD2AWiVgBXALMMO3FEmJt4DvAvdTsJGlRekB1Kpgs7I+BtwA/B7F/HcQu0D8Y2w4byFXqCpiD6DeGcAngKXehUhQTwDfoUDd/UYUABMuAW4GzvYuRBK1FZtrcr13IWmgru+E9dgtw2XAH2E9A8mP3dg9/Uco2Hl+KwqAY1WwA2Qt8H7sGsFs14qkV68BP8SeE8n9bb2oFACNjWJXhB8ErgSuA+Z6FiSRbQN+BDyEGn5TCoDWRrHfHA8Al2JBcJ5rRdLOBmwQz9Ooq9+WAqAzFWzapyeBxcDVwOXo3y8tRoBHsd/4mZqTz5vuAnRvJjag6EPogqGX3cAvsNO1fc61ZJICoHcl4ELgKqxXMNm3nNw7gg3i+gXwDOrm90QBEK/p2G3Ey4ELyO/j1qGNAZuA/8G6+vt9y8kPBUByZmFBsAy7cKi1DaOpAM9jDX4tNh28xEwBEMbJwGXYnYQL0SPJzQxj3fp12AXXX/uWk38KgPCmYI8jXwRcjMYXvILdstuAPY572LecYtFtrPAOA7+sbgCDwPnYacK7sduMef3/MoIt6/YrrHv/HDDkWlHB5fVAy5Ih4PHqBnZ6sBg4F1iEPZw0h+xdUBwDdmIP37yMTay5GevmS0ooANJnGLvivanmZ/3AWcD86tfZwGnV7aTQBdb5DbZi8+vAHmy+/B1Y116NPeUUANkwjI1wazTKrR84vbrNxGY5GsRuSc6ofp2OjU8YwO5GTOPYHsVh7P462MQYler3+6vbW9WvQ9U/78MesnkNNfJM+3+04rJhF1d+wAAAAABJRU5ErkJggg=="}),s=r,l=(n={waitDestroyBlob:[],_textureCache:{},delayOneFrame:function(e){window.setTimeout(e,1)},normalizeUrl:function(e){return e.replace("https://","http://")},domainFromUrl:function(e){var t=/^([^:]*:\/\/)?(www\.)?([^\/]+)/.exec(e);return t?t[3]:e},average:function(e,t){if(0===e.length)return null;for(var i=0,n=0,o=0;o<e.length;o++){var a=t?e[o][t]:e[o];i+=a,n++}return i/n},countUnique:function(e){for(var t={},i=0;i<e.length;i++)t[e[i]]=1+(t[e[i]]||0);return Object.keys(t).length},averageVectors:function(e,t){var i=new THREE.Vector3;if(0===e.length)return i;for(var n=0,o=0;o<e.length;o++){var a=t?e[o][t]:e[o];i.add(a),n++}return i.divideScalar(n)},equalLists:function(e,t){if(e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},lowerMedian:function(e,t){if(0===e.length)return null;t=t||2,e.sort((function(e,t){return e-t}));var i=Math.floor(e.length/t);return e[i]},stableSort:function(e,t){return e.map((function(e,t){return{value:e,index:t}})).sort((function(e,i){var n=t(e.value,i.value);return 0!==n?n:e.index-i.index})).map((function(e){return e.value}))},filterAll:function(e,t){return e.filter((function(e){return t.every((function(t){return t(e)}))}))},formatDate:function(e){return[e.getFullYear(),e.getMonth()+1,e.getDate()].join("-")},formatDatetime:function(e){return[e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes()].join("-")},randomString:function(e){for(var t="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=0;n<e;n++)t+=i.charAt(Math.floor(Math.random()*i.length));return t},uint8ToBase64:function(e,t){t&&"number"==typeof t||(t=8192);for(var i=[],n=0;n<e.length;n+=t)i.push(String.fromCharCode.apply(null,e.subarray(n,n+t)));return btoa(i.join(""))},uuid4:function e(t){return t?(t^16*Math.random()>>t/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e)},nth:function(e){return e%=10,1===e?e+"st":2===e?e+"nd":3===e?e+"rd":e+"th"},extendObject:function(e,t){return Object.keys(t).forEach((function(i){e[i]=t[i]})),e},deepExtend:function e(t){t=t||{};for(var i=1;i<arguments.length;i++){var n=arguments[i];if(n)for(var o in n)n.hasOwnProperty(o)&&("object"==Object(a["a"])(n[o])?t[o]=e(t[o],n[o]):t[o]=n[o])}return t},inherit:function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e},extend:function(e,t){for(var i in t.prototype)e.prototype[i]=t.prototype[i]}},Object(o["a"])(n,"extendObject",(function(e,t){if(t instanceof Object)return Object.keys(t).forEach((function(i){e[i]=t[i]})),e})),Object(o["a"])(n,"loadTextureFromCache",(function(e){return this._textureCache[e]||(this._textureCache[e]=l.getTexture(e)),this._textureCache[e]})),Object(o["a"])(n,"extend",(function(e,t){for(var i in t.prototype)e.prototype[i]=t.prototype[i]})),Object(o["a"])(n,"valueFromHash",(function(e,t){var i=new RegExp("[#&?]"+e+"=([^#&?]*)"),n=i.exec(window.location.href);if(!n)return t;var o=n[1];return"boolean"==typeof t?"true"===o||"1"===o:"number"==typeof t?parseFloat(o):window.decodeURIComponent(o)})),n);l.getMAXCUBETEXTURESIZE=function(){try{var e=document.createElement("canvas"),t=e.getContext("webgl");t||(t=e.getContext("experimental-webgl"));var i=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE);return i}catch(e){return 0}},l.getTexture=function(){var e=new THREE.TextureLoader;return e.setCrossOrigin("Anonymous"),e.crossOrigin=!0,function(t,i,n,o){return e.load(t,i,n,o)}}(),l.getBlobSrc=function(e,t){var i=l.dataURLtoBlob((t?s.PrefixPng:"")+e);return window.URL.createObjectURL(i)},l.destroyBlob=function(e){window.URL.revokeObjectURL(e)},l.destroyNoUseBlob=function(e){if(e){var t=[];for(var i in e.billboard.mediaData)e.billboard.mediaData[i].media&&t.push(e.billboard.mediaData[i].media.src);l.waitDestroyBlob.forEach((function(e){-1==t.indexOf(e)&&(l.destroyBlob(e),console.log("destroyBlob"))}))}else l.waitDestroyBlob.forEach((function(e){l.destroyBlob(e)}));l.waitDestroyBlob=[]},l.dataURLtoBlob=function(e){var t=e.split(","),i=t[0].match(/:(.*?);/)[1],n=atob(t[1]),o=n.length,a=new Uint8Array(o);while(o--)a[o]=n.charCodeAt(o);return new Blob([a],{type:i})},l.dataURLtoFile=function(e,t){var i=e.split(","),n=i[0].match(/:(.*?);/)[1],o=atob(i[1]),a=o.length,r=new Uint8Array(a);while(a--)r[a]=o.charCodeAt(a);return new File([r],t,{type:n})},l.saveFile=function(e,t,i){var n=document.createElementNS("http://www.w3.org/1999/xhtml","a");n.href=e,n.download=t;var o=document.createEvent("MouseEvents");o.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(o),i&&i()},l.replaceAll=function(e,t,i){var n=new RegExp(t,"g");return e.replace(n,i)},l.randomWord=function(e,t,i){var n="",o=t,a=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];e&&(o=Math.round(Math.random()*(i-t))+t);for(var r=0;r<o;r++){var s=Math.round(Math.random()*(a.length-1));n+=a[s]}return n},l.getRandomSid=function(){var e=l.randomWord(!0,5,7),t=(new Date).getTime()+"",i=t.length;return t=t.substring(i-8,i-5)+t.substring(i-3,i),e+t},l.getTime=function(e){var t="",i=parseInt(e/60);return i<10&&(t+="0"),t+=i,e=parseInt(e%60)+"",1==e.length&&(e="0"+e),t=t+":"+e,t},l.getSceneType=function(e,t){for(var i=Constants.SCENETYPE_index,n=0;n<i.length;n++)if(i[n][0]==e)return"class"==t?i[n][1]:n;return 0},l.CloneObject=function(e,t){if(t=t||{},e instanceof Array){if(!(e[0]instanceof Object))return e.slice(0);t=[]}for(var i in e)e[i]instanceof Object?t[i]=CloneObject(e[i]):t[i]=e[i];return t},l.findBgMusic=function(e){if(!e||"noMusic"==e)return null;for(var t in Constants.BGM_LIST)if(e==Constants.BGM_LIST[t].name)return Constants.imgRoot+"audio/"+Constants.BGM_LIST[t].file},l.getMinKey=function(e){return Math.min.apply(null,Object.keys(e))},l.getMaxKey=function(e){return Math.max.apply(null,Object.keys(e))},l.getFragmentItem=function(e){if(!e||!e.value)return e;if(1==e.type){var t=e.value[e.value.length-1];return{pos:t.pos,mode:t.mode,type:t.type,eTime:t.eTime,startTime:e.value[0].eTime,transType:e.transType}}return 2==e.type?{pos:e.value.pos,mode:e.value.mode,type:e.value.type,eTime:e.value.eTime,startTime:e.value.startTime,speed:e.value.speed,transType:e.value.transType}:void 0},l.compatiblev2=function(e,t,i){return e?e.floors?(e.floors.forEach((function(e){return l.compatiblev2(e,!0,i)})),e):t?("all"==i&&(e.block=e.block||[],e.vertex=e.vertex||[],e.hole=e.hole||[]),e.column=e.column||[],e.window=e.window||[],e.door=e.door||[],e.groundCase=e.groundCase||[],e.bayCase=e.bayCase||[],e.slideDoor=e.slideDoor||[],e.doubleDoor=e.doubleDoor||[],e.tagging=e.tagging||[],e.furnColumn=e.furnColumn||[],e.furnFlue=e.furnFlue||[],e):(e.id=app.model.floors.list[0].floorIndex,e={floors:[e],dire:e.dire||0},l.compatiblev2(e,null,i)):e},l.sortByScore=function(e,t,i){var n=l.filterAll(e,t);return 0===n.length?null:n=n.map((function(e){return{item:e,score:i.reduce((function(t,i){return t+i(e)}),0)}})).sort((function(e,t){return t.score-e.score}))};t["a"]=l},d108:function(e,t,i){"use strict";i("0d6d");var n=Object.freeze({None:0,Queued:1,ForceQueued:2,Downloading:3,Downloaded:4,DownloadFailed:5});t["a"]=n},d547:function(e,t,i){"use strict";i.d(t,"h",(function(){return U})),i.d(t,"e",(function(){return W})),i.d(t,"g",(function(){return q})),i.d(t,"f",(function(){return Q})),i.d(t,"i",(function(){return Y})),i.d(t,"d",(function(){return X})),i.d(t,"a",(function(){return Z})),i.d(t,"b",(function(){return J})),i.d(t,"c",(function(){return $}));var n=i("2b0e"),o=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("transition",{attrs:{appear:"",name:"custom-classes-transition","enter-active-class":"animated fadeIn faster","leave-active-class":"animated fadeOut faster"}},[e.show?i("popup",{attrs:{"is-pass":!0}},[i("div",{staticClass:"ui-message-tips",style:{fontSize:e.fontSize},domProps:{innerHTML:e._s(e.content)}})]):e._e()],1)},a=[],r=i("fa5b"),s={name:"ui-tips",components:{Popup:r["a"]},data:function(){return{show:!1,duration:4e3,content:"",fontSize:""}},mounted:function(){var e=this;setTimeout((function(){e.show=!1,e.$nextTick((function(){document.body.removeChild(this.$el),this.$destroy(!0)}))}),this.duration)}},l=s,c=(i("d71a"),i("2877")),u=Object(c["a"])(l,o,a,!1,null,"0e7a802f",null),d=u.exports,h=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("popup",{ref:"Message",attrs:{show:e.show}},[i("div",{staticClass:"ui-message ui-message-alert"},[i("div",{staticClass:"ui-message-header"},[i("span",[e._v(e._s(e.title))]),i("span",{on:{click:e.onClose}},[i("i",{staticClass:"iconfont icon_close"})])]),i("div",{staticClass:"ui-message-main"},[i("div",{staticClass:"ui-message-icon",class:[e.icon?e.icon:null]}),i("div",{staticClass:"ui-message-title"},[e._v(e._s(e.tips))]),i("div",{staticClass:"ui-message-content",domProps:{innerHTML:e._s(e.content)}})]),i("div",{staticClass:"ui-message-footer"},[i("button",{staticClass:"ui-button submit",on:{click:e.onOk}},[e._v(e._s(e.okText))])])])])},p=[],f=i("9923"),m={name:"ui-alert",components:{Popup:r["a"]},data:function(){return{show:!1,duration:0,title:f["a"].t("tips.title"),icon:null,tips:"",content:"",okText:f["a"].t("common.set"),ok:null}},methods:{onOk:function(){this.ok&&!1===this.ok(this)||this.onClose()},onClose:function(){var e=this;setTimeout((function(){e.show=!1,document.body.removeChild(e.$el),e.$destroy()}),this.duration)}}},v=m,g=Object(c["a"])(v,h,p,!1,null,null,null),y=g.exports,b=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("popup",{ref:"Message",attrs:{show:e.show}},[i("div",{staticClass:"ui-message ui-message-confirm"},[i("div",{staticClass:"ui-message-header"},[i("span",[e._v(e._s(e.title))]),e.showCloseIcon?i("span",{on:{click:e.onNo}},[i("i",{staticClass:"iconfont icon_close"})]):e._e()]),i("div",{staticClass:"ui-message-main"},[i("div",{staticClass:"ui-message-icon",class:[e.icon?e.icon:null]}),i("div",{staticClass:"ui-message-title"},[e._v(e._s(e.tips))]),i("div",{staticClass:"ui-message-content",domProps:{innerHTML:e._s(e.content)}})]),e.okLink?i("div",{staticClass:"ui-message-footer"},[i("a",{staticClass:"ui-button link submit",attrs:{href:e.okLink,target:"_blank"},on:{click:e.onOk}},[e._v(e._s(e.okText))]),i("a",{staticClass:"ui-button link cancel",attrs:{href:e.noLink,target:"_blank"},on:{click:e.onNo}},[e._v(e._s(e.noText))])]):i("div",{staticClass:"ui-message-footer"},[i("button",{staticClass:"ui-button submit",on:{click:e.onOk}},[e._v(e._s(e.okText))]),i("button",{staticClass:"ui-button cancel",on:{click:e.onNo}},[e._v(e._s(e.noText))])])])])},w=[],E={name:"ui-confirm",components:{Popup:r["a"]},data:function(){return{show:!1,showCloseIcon:!0,duration:0,title:f["a"].t("tips.title"),tips:"",icon:null,content:"",okText:f["a"].t("common.set"),noText:f["a"].t("common.giveup"),okLink:null,noLink:null,ok:null,no:null}},methods:{onOk:function(){this.ok&&!1===this.ok(this)||this.onClose()},onNo:function(){this.no&&this.no(),this.onClose()},onClose:function(){var e=this;setTimeout((function(){e.show=!1,document.body.removeChild(e.$el),e.$destroy()}),this.duration)}}},T=E,P=Object(c["a"])(T,b,w,!1,null,null,null),x=P.exports,k=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("popup",{ref:"Message",attrs:{show:e.show}},[i("div",{staticClass:"ui-message ui-message-confirm"},[i("div",{staticClass:"ui-message-header"},[i("span",[e._v(e._s(e.title))])]),i("div",{staticClass:"ui-message-main"},[i("div",{staticClass:"ui-message-icon"}),i("div",{staticClass:"ui-message-title"},[e._v(e._s(e.tips))]),i("div",{staticClass:"ui-message-content",domProps:{innerHTML:e._s(e.content)}})]),e.okLink?i("div",{staticClass:"ui-message-footer"},[i("a",{staticClass:"ui-button link submit",attrs:{href:e.okLink,target:"_blank"},on:{click:e.onOk}},[e._v(e._s(e.okText))]),i("a",{staticClass:"ui-button link cancel",attrs:{href:e.noLink,target:"_blank"},on:{click:e.onNo}},[e._v(e._s(e.noText))])]):i("div",{staticClass:"ui-message-footer"},[i("button",{staticClass:"ui-button submit",on:{click:e.onOk}},[e._v(e._s(e.okText))]),i("button",{staticClass:"ui-button cancel",on:{click:e.onNo}},[e._v(e._s(e.noText))])])])])},R=[],_={name:"ui-confirm",components:{Popup:r["a"]},data:function(){return{show:!1,showCloseIcon:!0,duration:0,title:"提示",tips:"",content:"",okText:"确定",noText:"放弃",okLink:null,noLink:null,ok:null,no:null}},methods:{onOk:function(){this.ok&&!1===this.ok(this)||this.onClose()},onNo:function(){this.no&&this.no(),this.onClose()},onClose:function(){var e=this;setTimeout((function(){e.show=!1,document.body.removeChild(e.$el),e.$destroy()}),this.duration)}}},S=_,M=(i("0bef"),Object(c["a"])(S,k,R,!1,null,"3c39e905",null)),A=M.exports,O=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("popup",{ref:"Message",attrs:{show:e.show}},[i("div",{staticClass:"ui-message ui-message-confirm dark"},[i("div",{staticClass:"ui-message-header"},[i("span",[e._v(e._s(e.title))]),e.showCloseIcon?i("span",{on:{click:e.onNo}},[i("i",{staticClass:"iconfont icon_close"})]):e._e()]),i("div",{staticClass:"ui-message-main"},[i("div",{staticClass:"ui-message-content",domProps:{innerHTML:e._s(e.tips)}})]),i("div",{staticClass:"ui-message-footer"},[i("a",{staticClass:"ui-button link cancel",attrs:{href:e.noLink,target:"_blank"},on:{click:e.onNo}},[e._v(e._s(e.noText))]),i("a",{staticClass:"ui-button link submit",attrs:{href:e.okLink,target:"_blank"},on:{click:e.onOk}},[e._v(e._s(e.okText))])])])])},C=[],D={name:"ui-confirm",components:{Popup:r["a"]},data:function(){return{show:!1,showCloseIcon:!0,duration:0,title:f["a"].t("tips.title"),tips:"",icon:null,content:"",okText:"",noText:f["a"].t("common.cancel"),okLink:"",noLink:null,ok:null,no:null,isVIPExpired:null}},watch:{show:function(){this.show&&(this.tips=this.isVIPExpired?f["a"].t("common.buyvip_expired_tips"):f["a"].t("common.buyvip_tips"),this.okText=this.isVIPExpired?f["a"].t("common.buyvip_expired"):f["a"].t("common.buyvip"),this.$config.isMobile?this.okLink=this.isVIPExpired?"/mobile.html#/information":"/mobile.html#/increment":this.okLink=this.isVIPExpired?"/#/information":"/#/mall/member")}},methods:{onOk:function(){this.ok&&!1===this.ok(this)||this.onClose()},onNo:function(){this.no&&this.no(),this.onClose()},onClose:function(){var e=this;setTimeout((function(){e.show=!1,document.body.removeChild(e.$el),e.$destroy()}),this.duration)}}},V=D,I=(i("ed1e"),Object(c["a"])(V,O,C,!1,null,"7c0a6ae6",null)),j=I.exports,L=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("popup",{ref:"Message",attrs:{show:e.show}},[i("div",{staticClass:"ui-message ui-message-confirm dark"},[i("div",{staticClass:"ui-message-header"},[i("span",[e._v(e._s(e.title))]),e.showCloseIcon?i("span",{on:{click:e.onNo}},[i("i",{staticClass:"iconfont icon_close"})]):e._e()]),i("div",{staticClass:"ui-message-main"},[i("div",{staticClass:"ui-message-content",domProps:{innerHTML:e._s(e.tips)}}),i("div",{staticClass:"checkbox",class:{checked:e.checked},on:{click:function(t){e.checked=!e.checked}}},[i("i",{staticClass:"iconfont icon_checkbox"}),e._v(" "+e._s(e.checkTips)+"\n ")])]),i("div",{staticClass:"ui-message-footer"},[i("a",{staticClass:"ui-button link cancel",attrs:{href:e.noLink,target:"_blank"}},[e._v(e._s(e.noText))]),i("button",{staticClass:"ui-button link submit",attrs:{target:"_self"},on:{click:function(t){return t.stopPropagation(),e.onOk(t)}}},[e._v("\n "+e._s(e.okText)+"\n ")])])])])},F=[],H=(i("9ef6"),{name:"ui-confirm",components:{Popup:r["a"]},data:function(){return{show:!1,showCloseIcon:!0,duration:0,checkTips:f["a"].t("tips.noremind"),checked:!1,title:f["a"].t("tips.title2"),tips:f["a"].t("common.vip_transition_tips"),icon:null,content:"",okText:f["a"].t("tips.used"),noText:f["a"].t("tips.info"),okLink:null,noLink:null,ok:null,no:null}},watch:{show:function(){this.show&&(this.noLink=this.$config.isMobile?"/mobile.html#/increment":"/#/mall/member")},checked:function(){localStorage.setItem("vip_noremind",this.checked?1:0)}},methods:{onOk:function(){this.ok&&this.ok(),this.onClose(),this.$emit("ok")},onNo:function(){this.no&&this.no(),this.onClose()},onClose:function(){var e=this;setTimeout((function(){e.show=!1,document.body.removeChild(e.$el),e.$destroy()}),this.duration)}}}),z=H,N=(i("e278"),Object(c["a"])(z,L,F,!1,null,"ccf17fd6",null)),B=N.exports,U=n["default"].extend(d),W=n["default"].extend(y),q=n["default"].extend(x),G=n["default"].extend(A),Q=n["default"].extend(j),Y=n["default"].extend(B);function X(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new U({data:e}).$mount();document.body.appendChild(t.$el),n["default"].nextTick((function(){t.show=!0}))}function Z(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new W({data:e}).$mount();document.body.appendChild(t.$el),n["default"].nextTick((function(){t.show=!0}))}function J(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new q({data:e}).$mount();document.body.appendChild(t.$el),n["default"].nextTick((function(){t.show=!0}))}function $(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new G({data:e}).$mount();document.body.appendChild(t.$el),n["default"].nextTick((function(){t.show=!0}))}},d55d:function(e,t,i){"use strict";(function(e){i.d(t,"a",(function(){return a}));i("34ef");var n=i("53ca"),o=(i("6b54"),i("b6e4"),function(){var e=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),t=4017,i=799,o=3406,a=2276,r=1567,s=3784,l=5793,c=2896;function u(){}function d(e,t){var i,n,o=0,a=[],r=16;while(r>0&&!e[r-1])r--;a.push({children:[],index:0});var s,l=a[0];for(i=0;i<r;i++){for(n=0;n<e[i];n++){l=a.pop(),l.children[l.index]=t[o];while(l.index>0){if(0===a.length)throw new Error("Could not recreate Huffman Table");l=a.pop()}l.index++,a.push(l);while(a.length<=i)a.push(s={children:[],index:0}),l.children[l.index]=s.children,l=s;o++}i+1<r&&(a.push(s={children:[],index:0}),l.children[l.index]=s.children,l=s)}return a[0].children}function h(t,i,o,a,r,s,l,c,u){o.precision,o.samplesPerLine,o.scanLines;var d=o.mcusPerLine,h=o.progressive,p=(o.maxH,o.maxV,i),f=0,m=0;function v(){if(m>0)return m--,f>>m&1;if(f=t[i++],255==f){var e=t[i++];if(e)throw new Error("unexpected marker: "+(f<<8|e).toString(16))}return m=7,f>>>7}function g(e){var t,i=e;while(null!==(t=v())){if(i=i[t],"number"===typeof i)return i;if("object"!==Object(n["a"])(i))throw new Error("invalid huffman sequence")}return null}function y(e){var t=0;while(e>0){var i=v();if(null===i)return;t=t<<1|i,e--}return t}function b(e){var t=y(e);return t>=1<<e-1?t:t+(-1<<e)+1}function w(t,i){var n=g(t.huffmanTableDC),o=0===n?0:b(n);i[0]=t.pred+=o;var a=1;while(a<64){var r=g(t.huffmanTableAC),s=15&r,l=r>>4;if(0!==s){a+=l;var c=e[a];i[c]=b(s),a++}else{if(l<15)break;a+=16}}}function E(e,t){var i=g(e.huffmanTableDC),n=0===i?0:b(i)<<u;t[0]=e.pred+=n}function T(e,t){t[0]|=v()<<u}var P=0;function x(t,i){if(P>0)P--;else{var n=s,o=l;while(n<=o){var a=g(t.huffmanTableAC),r=15&a,c=a>>4;if(0!==r){n+=c;var d=e[n];i[d]=b(r)*(1<<u),n++}else{if(c<15){P=y(c)+(1<<c)-1;break}n+=16}}}}var k,R=0;function _(t,i){var n=s,o=l,a=0;while(n<=o){var r=e[n],c=i[r]<0?-1:1;switch(R){case 0:var d=g(t.huffmanTableAC),h=15&d;a=d>>4;if(0===h)a<15?(P=y(a)+(1<<a),R=4):(a=16,R=1);else{if(1!==h)throw new Error("invalid ACn encoding");k=b(h),R=a?2:3}continue;case 1:case 2:i[r]?i[r]+=(v()<<u)*c:(a--,0===a&&(R=2==R?3:0));break;case 3:i[r]?i[r]+=(v()<<u)*c:(i[r]=k<<u,R=0);break;case 4:i[r]&&(i[r]+=(v()<<u)*c);break}n++}4===R&&(P--,0===P&&(R=0))}function S(e,t,i,n,o){var a=i/d|0,r=i%d,s=a*e.v+n,l=r*e.h+o;t(e,e.blocks[s][l])}function M(e,t,i){var n=i/e.blocksPerLine|0,o=i%e.blocksPerLine;t(e,e.blocks[n][o])}var A,O,C,D,V,I,j=a.length;I=h?0===s?0===c?E:T:0===c?x:_:w;var L,F,H,z,N=0;F=1==j?a[0].blocksPerLine*a[0].blocksPerColumn:d*o.mcusPerColumn,r||(r=F);while(N<F){for(O=0;O<j;O++)a[O].pred=0;if(P=0,1==j)for(A=a[0],V=0;V<r;V++)M(A,I,N),N++;else for(V=0;V<r;V++){for(O=0;O<j;O++)for(A=a[O],H=A.h,z=A.v,C=0;C<z;C++)for(D=0;D<H;D++)S(A,I,N,C,D);if(N++,N===F)break}if(m=0,L=t[i]<<8|t[i+1],L<65280)throw new Error("marker was not found");if(!(L>=65488&&L<=65495))break;i+=2}return i-p}function p(e,n){var u,d,h=[],p=n.blocksPerLine,f=n.blocksPerColumn,m=p<<3,v=new Int32Array(64),g=new Uint8Array(64);function y(e,u,d){var h,p,f,m,v,g,y,b,w,E,T=n.quantizationTable,P=d;for(E=0;E<64;E++)P[E]=e[E]*T[E];for(E=0;E<8;++E){var x=8*E;0!=P[1+x]||0!=P[2+x]||0!=P[3+x]||0!=P[4+x]||0!=P[5+x]||0!=P[6+x]||0!=P[7+x]?(h=l*P[0+x]+128>>8,p=l*P[4+x]+128>>8,f=P[2+x],m=P[6+x],v=c*(P[1+x]-P[7+x])+128>>8,b=c*(P[1+x]+P[7+x])+128>>8,g=P[3+x]<<4,y=P[5+x]<<4,w=h-p+1>>1,h=h+p+1>>1,p=w,w=f*s+m*r+128>>8,f=f*r-m*s+128>>8,m=w,w=v-y+1>>1,v=v+y+1>>1,y=w,w=b+g+1>>1,g=b-g+1>>1,b=w,w=h-m+1>>1,h=h+m+1>>1,m=w,w=p-f+1>>1,p=p+f+1>>1,f=w,w=v*a+b*o+2048>>12,v=v*o-b*a+2048>>12,b=w,w=g*i+y*t+2048>>12,g=g*t-y*i+2048>>12,y=w,P[0+x]=h+b,P[7+x]=h-b,P[1+x]=p+y,P[6+x]=p-y,P[2+x]=f+g,P[5+x]=f-g,P[3+x]=m+v,P[4+x]=m-v):(w=l*P[0+x]+512>>10,P[0+x]=w,P[1+x]=w,P[2+x]=w,P[3+x]=w,P[4+x]=w,P[5+x]=w,P[6+x]=w,P[7+x]=w)}for(E=0;E<8;++E){var k=E;0!=P[8+k]||0!=P[16+k]||0!=P[24+k]||0!=P[32+k]||0!=P[40+k]||0!=P[48+k]||0!=P[56+k]?(h=l*P[0+k]+2048>>12,p=l*P[32+k]+2048>>12,f=P[16+k],m=P[48+k],v=c*(P[8+k]-P[56+k])+2048>>12,b=c*(P[8+k]+P[56+k])+2048>>12,g=P[24+k],y=P[40+k],w=h-p+1>>1,h=h+p+1>>1,p=w,w=f*s+m*r+2048>>12,f=f*r-m*s+2048>>12,m=w,w=v-y+1>>1,v=v+y+1>>1,y=w,w=b+g+1>>1,g=b-g+1>>1,b=w,w=h-m+1>>1,h=h+m+1>>1,m=w,w=p-f+1>>1,p=p+f+1>>1,f=w,w=v*a+b*o+2048>>12,v=v*o-b*a+2048>>12,b=w,w=g*i+y*t+2048>>12,g=g*t-y*i+2048>>12,y=w,P[0+k]=h+b,P[56+k]=h-b,P[8+k]=p+y,P[48+k]=p-y,P[16+k]=f+g,P[40+k]=f-g,P[24+k]=m+v,P[32+k]=m-v):(w=l*d[E+0]+8192>>14,P[0+k]=w,P[8+k]=w,P[16+k]=w,P[24+k]=w,P[32+k]=w,P[40+k]=w,P[48+k]=w,P[56+k]=w)}for(E=0;E<64;++E){var R=128+(P[E]+8>>4);u[E]=R<0?0:R>255?255:R}}for(var b=0;b<f;b++){var w=b<<3;for(u=0;u<8;u++)h.push(new Uint8Array(m));for(var E=0;E<p;E++){y(n.blocks[b][E],g,v);var T=0,P=E<<3;for(d=0;d<8;d++){var x=h[w+d];for(u=0;u<8;u++)x[P+u]=g[T++]}}}return h}function f(e){return e<0?0:e>255?255:e}return u.prototype={load:function(e){var t=new XMLHttpRequest;t.open("GET",e,!0),t.responseType="arraybuffer",t.onload=function(){var e=new Uint8Array(t.response||t.mozResponseArrayBuffer);this.parse(e),this.onload&&this.onload()}.bind(this),t.send(null)},parse:function(t){var i=0;t.length;function n(){var e=t[i]<<8|t[i+1];return i+=2,e}function o(){var e=n(),o=t.subarray(i,i+e-2);return i+=o.length,o}function a(e){var t,i,n=0,o=0;for(i in e.components)e.components.hasOwnProperty(i)&&(t=e.components[i],n<t.h&&(n=t.h),o<t.v&&(o=t.v));var a=Math.ceil(e.samplesPerLine/8/n),r=Math.ceil(e.scanLines/8/o);for(i in e.components)if(e.components.hasOwnProperty(i)){t=e.components[i];for(var s=Math.ceil(Math.ceil(e.samplesPerLine/8)*t.h/n),l=Math.ceil(Math.ceil(e.scanLines/8)*t.v/o),c=a*t.h,u=r*t.v,d=[],h=0;h<u;h++){for(var p=[],f=0;f<c;f++)p.push(new Int32Array(64));d.push(p)}t.blocksPerLine=s,t.blocksPerColumn=l,t.blocks=d}e.maxH=n,e.maxV=o,e.mcusPerLine=a,e.mcusPerColumn=r}var r,s,l=null,c=null,u=[],f=[],m=[],v=[],g=n();if(65496!=g)throw new Error("SOI not found");g=n();while(65497!=g){switch(g){case 65280:break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var y=o();65504===g&&74===y[0]&&70===y[1]&&73===y[2]&&70===y[3]&&0===y[4]&&(l={version:{major:y[5],minor:y[6]},densityUnits:y[7],xDensity:y[8]<<8|y[9],yDensity:y[10]<<8|y[11],thumbWidth:y[12],thumbHeight:y[13],thumbData:y.subarray(14,14+3*y[12]*y[13])}),65518===g&&65===y[0]&&100===y[1]&&111===y[2]&&98===y[3]&&101===y[4]&&0===y[5]&&(c={version:y[6],flags0:y[7]<<8|y[8],flags1:y[9]<<8|y[10],transformCode:y[11]});break;case 65499:var b=n(),w=b+i-2;while(i<w){var E=t[i++],T=new Int32Array(64);if(E>>4===0)for(U=0;U<64;U++){var P=e[U];T[P]=t[i++]}else{if(E>>4!==1)throw new Error("DQT: invalid table spec");for(U=0;U<64;U++){P=e[U];T[P]=n()}}u[15&E]=T}break;case 65472:case 65473:case 65474:n(),r={},r.extended=65473===g,r.progressive=65474===g,r.precision=t[i++],r.scanLines=n(),r.samplesPerLine=n(),r.components={},r.componentsOrder=[];var x,k=t[i++];for(N=0;N<k;N++){x=t[i];var R=t[i+1]>>4,_=15&t[i+1],S=t[i+2];r.componentsOrder.push(x),r.components[x]={h:R,v:_,quantizationIdx:S},i+=3}a(r),f.push(r);break;case 65476:var M=n();for(N=2;N<M;){var A=t[i++],O=new Uint8Array(16),C=0;for(U=0;U<16;U++,i++)C+=O[U]=t[i];var D=new Uint8Array(C);for(U=0;U<C;U++,i++)D[U]=t[i];N+=17+C,(A>>4===0?v:m)[15&A]=d(O,D)}break;case 65501:n(),s=n();break;case 65498:n();var V=t[i++],I=[];for(N=0;N<V;N++){W=r.components[t[i++]];var j=t[i++];W.huffmanTableDC=v[j>>4],W.huffmanTableAC=m[15&j],I.push(W)}var L=t[i++],F=t[i++],H=t[i++],z=h(t,i,r,I,s,L,F,H>>4,15&H);i+=z;break;case 65535:255!==t[i]&&i--;break;default:if(255==t[i-3]&&t[i-2]>=192&&t[i-2]<=254){i-=3;break}throw new Error("unknown JPEG marker "+g.toString(16))}g=n()}if(1!=f.length)throw new Error("only single frame JPEGs supported");for(var N=0;N<f.length;N++){var B=f[N].components;for(var U in B)B[U].quantizationTable=u[B[U].quantizationIdx],delete B[U].quantizationIdx}this.width=r.samplesPerLine,this.height=r.scanLines,this.jfif=l,this.adobe=c,this.components=[];for(N=0;N<r.componentsOrder.length;N++){var W=r.components[r.componentsOrder[N]];this.components.push({lines:p(r,W),scaleX:W.h/r.maxH,scaleY:W.v/r.maxV})}},getData:function(e,t){var i,n,o,a,r,s,l,c,u,d,h,p,m,v,g,y,b,w,E,T,P,x=this.width/e,k=this.height/t,R=0,_=e*t*this.components.length,S=new Uint8Array(_);switch(this.components.length){case 1:for(i=this.components[0],d=0;d<t;d++)for(r=i.lines[0|d*i.scaleY*k],u=0;u<e;u++)h=r[0|u*i.scaleX*x],S[R++]=h;break;case 2:for(i=this.components[0],n=this.components[1],d=0;d<t;d++)for(r=i.lines[0|d*i.scaleY*k],s=n.lines[0|d*n.scaleY*k],u=0;u<e;u++)h=r[0|u*i.scaleX*x],S[R++]=h,h=s[0|u*n.scaleX*x],S[R++]=h;break;case 3:for(P=!0,this.adobe&&this.adobe.transformCode?P=!0:"undefined"!==typeof this.colorTransform&&(P=!!this.colorTransform),i=this.components[0],n=this.components[1],o=this.components[2],d=0;d<t;d++)for(r=i.lines[0|d*i.scaleY*k],s=n.lines[0|d*n.scaleY*k],l=o.lines[0|d*o.scaleY*k],u=0;u<e;u++)P?(h=r[0|u*i.scaleX*x],p=s[0|u*n.scaleX*x],m=l[0|u*o.scaleX*x],w=f(h+1.402*(m-128)),E=f(h-.3441363*(p-128)-.71413636*(m-128)),T=f(h+1.772*(p-128))):(w=r[0|u*i.scaleX*x],E=s[0|u*n.scaleX*x],T=l[0|u*o.scaleX*x]),S[R++]=w,S[R++]=E,S[R++]=T;break;case 4:if(!this.adobe)throw new Error("Unsupported color mode (4 components)");for(P=!1,this.adobe&&this.adobe.transformCode?P=!0:"undefined"!==typeof this.colorTransform&&(P=!!this.colorTransform),i=this.components[0],n=this.components[1],o=this.components[2],a=this.components[3],d=0;d<t;d++)for(r=i.lines[0|d*i.scaleY*k],s=n.lines[0|d*n.scaleY*k],l=o.lines[0|d*o.scaleY*k],c=a.lines[0|d*a.scaleY*k],u=0;u<e;u++)P?(h=r[0|u*i.scaleX*x],p=s[0|u*n.scaleX*x],m=l[0|u*o.scaleX*x],v=c[0|u*a.scaleX*x],g=255-f(h+1.402*(m-128)),y=255-f(h-.3441363*(p-128)-.71413636*(m-128)),b=255-f(h+1.772*(p-128))):(g=r[0|u*i.scaleX*x],y=s[0|u*n.scaleX*x],b=l[0|u*o.scaleX*x],v=c[0|u*a.scaleX*x]),S[R++]=255-g,S[R++]=255-y,S[R++]=255-b,S[R++]=255-v;break;default:throw new Error("Unsupported color mode")}return S},copyToImageData:function(e,t){var i,n,o,a,r,s,l,c,u,d=e.width,h=e.height,p=e.data,m=this.getData(d,h),v=0,g=0;switch(this.components.length){case 1:for(n=0;n<h;n++)for(i=0;i<d;i++)o=m[v++],p[g++]=o,p[g++]=o,p[g++]=o,t&&(p[g++]=255);break;case 3:for(n=0;n<h;n++)for(i=0;i<d;i++)l=m[v++],c=m[v++],u=m[v++],p[g++]=l,p[g++]=c,p[g++]=u,t&&(p[g++]=255);break;case 4:for(n=0;n<h;n++)for(i=0;i<d;i++)r=m[v++],s=m[v++],o=m[v++],a=m[v++],l=255-f(r*(1-a/255)+a),c=255-f(s*(1-a/255)+a),u=255-f(o*(1-a/255)+a),p[g++]=l,p[g++]=c,p[g++]=u,t&&(p[g++]=255);break;default:throw new Error("Unsupported color mode")}}},u}());function a(t,i){var a={useTArray:!1,colorTransform:void 0,formatAsRGBA:!0};i?"object"===Object(n["a"])(i)?i={useTArray:"undefined"===typeof i.useTArray?a.useTArray:i.useTArray,colorTransform:"undefined"===typeof i.colorTransform?a.colorTransform:i.colorTransform,formatAsRGBA:"undefined"===typeof i.formatAsRGBA?a.formatAsRGBA:i.formatAsRGBA}:(i=a,i.useTArray=!0):i=a;var r=new Uint8Array(t),s=new o;s.parse(r),s.colorTransform=i.colorTransform;var l=i.formatAsRGBA?4:3,c=s.width*s.height*l;try{var u={width:s.width,height:s.height,data:i.useTArray?new Uint8Array(c):new e(c)}}catch(d){throw d instanceof RangeError?new Error("Could not allocate enough memory for the image. Required: "+c):d}return s.copyToImageData(u,i.formatAsRGBA),u}}).call(this,i("b639").Buffer)},d58c:function(e,t,i){"use strict";i.d(t,"a",(function(){return p}));i("55dd"),i("673e");var n=i("d4ec"),o=i("bee2"),a=i("ade3"),r=(i("0d6d"),i("ec11")),s=i("d108"),l=i("b8d5"),u=(i("27bc"),i("bc19")),d=Object.freeze({None:0,DirectionalFOV:1}),h=function(){var e=function e(t,i){var n=e._panoSpaceDir,o=e._fovThreshold,a=e._fovThresholdNarrow,r=Math.max(Math.min(n.dot(t.direction),1),-1),s=Math.max(Math.min(n.dot(i.direction),1),-1);return t._dot=r,i._dot=s,r>=o&&s<o?-1:r<o&&s>=o?1:r>=a&&s<a?-1:r<a&&s>=a||t.panoSize>i.panoSize?1:i.panoSize>t.panoSize?-1:-(r-s)};return e._panoSpaceDir=new THREE.Vector3,e._fovThreshold=-1,e._fovThresholdNarrow=-1,e}(),p=function(){function e(t,i,o,r,s){Object(n["a"])(this,e),Object(a["a"])(this,"filterAndPrioritize",function(){var t=[],i=[],n=[];return function(o,a,r){this.populateNeighborPanos(this.priorityCriteria.pano,a,t),this.populateScoredPanos(this.priorityCriteria.pano,a,i,this.priorityCriteria.cameraDir,e.MAX_SCORED_PANOS_TOCONSIDER);var s=this.baseSize,l=this.standardSize,c=this.highSize,u=this.ultraHighSize;this.queueTilesForPano(o,r,this.priorityCriteria.pano,s),this.priorityCriteria.upcomingPanos&&this.queueTilesForPanos(o,this.priorityCriteria.upcomingPanos,r,s,e.MAX_UPCOMING_PANOS_TOADD),n.length=0,this.canDownloadSize(l)&&this.queueTilesInDirectionForPano(n,r,this.priorityCriteria.pano,l,this.priorityCriteria.cameraPosition,this.priorityCriteria.cameraDir,e.DIRECTIONAL_FOV_NARROW),e.sortPanoTiles(n,this.priorityCriteria.pano,this.priorityCriteria.cameraDir),e.appendQueue(o,n),this.queueTilesForPanos(o,i,r,s,e.MAX_SCORED_PANOS_TOADD),n.length=0,this.canDownloadSize(c)&&this.queueTilesInDirectionForPano(n,r,this.priorityCriteria.pano,c,this.priorityCriteria.cameraPosition,this.priorityCriteria.cameraDir,e.DIRECTIONAL_FOV_NARROW),this.canDownloadSize(u)&&this.queueTilesInDirectionForPano(n,r,this.priorityCriteria.pano,u,this.priorityCriteria.cameraPosition,this.priorityCriteria.cameraDir,e.DIRECTIONAL_FOV_NARROW),e.sortPanoTiles(n,this.priorityCriteria.pano,this.priorityCriteria.cameraDir),e.appendQueue(o,n),n.length=0,this.canDownloadSize(l)&&this.queueTilesInDirectionForPano(n,r,this.priorityCriteria.pano,l,this.priorityCriteria.cameraPosition,this.priorityCriteria.cameraDir,e.DIRECTIONAL_FOV),this.canDownloadSize(c)&&this.queueTilesInDirectionForPano(n,r,this.priorityCriteria.pano,c,this.priorityCriteria.cameraPosition,this.priorityCriteria.cameraDir,e.DIRECTIONAL_FOV),this.canDownloadSize(u)&&this.queueTilesInDirectionForPano(n,r,this.priorityCriteria.pano,u,this.priorityCriteria.cameraPosition,this.priorityCriteria.cameraDir,e.DIRECTIONAL_FOV),e.sortPanoTiles(n,this.priorityCriteria.pano,this.priorityCriteria.cameraDir),e.appendQueue(o,n),this.queueTilesForPanos(o,t,r,s)}}()),Object(a["a"])(this,"queueTilesForPano",function(){var e={filter:d.None};return function(t,i,n,o){return this.filterAndQueueTileDownloadDescriptors(t,i,n,o,e)}}()),Object(a["a"])(this,"queueTilesForPanosInDirection",function(){var e=new THREE.Vector3;return function(t,i,n,o,a,r,s,l){for(var u=0,d=0;d<n.length;d++){var h=n[d];e.copy(h.position),e.sub(a),e.normalize();var p=Math.max(Math.min(r.dot(e),1),-1),f=c.getFOVDotThreshold(s);if(p>=f){var m=this.queueTilesInDirectionForPano(t,i,h,o,a,r,s);if(u+=m>0?1:0,l&&u>=l)break}}return u}}()),Object(a["a"])(this,"queueTilesInDirectionForPano",function(){var e={filter:d.DirectionalFOV,direction:new THREE.Vector3,fov:60},t=new THREE.Vector3;return function(i,n,o,a,r,s,c){return t.copy(s),l["a"].getRelativeDirection(o.quaternion,t),e.direction.copy(t),e.fov=c,this.filterAndQueueTileDownloadDescriptors(i,n,o,a,e)}}()),Object(a["a"])(this,"filterAndQueueTileDownloadDescriptors",function(){var e=[];return function(t,i,n,o,a){var r=i.getTileDownloadDescriptors(n,o);e.length=0,this.filterTileDownloadDescriptors(n,r,e,a);for(var s=0,l=0;l<e.length;l++){var c=e[l];c&&(t.push(c),s++)}return s}}()),Object(a["a"])(this,"filterTileDownloadDescriptors",function(){return new THREE.Vector3,function(e,t,i,n){var o,a;switch(n.filter){case d.DirectionalFOV:for(o=0;o<t.length;o++)a=t[o],l["a"].isTileWithinFOV(a.panoSize,a.tileSize,a.face,a.tileX,a.tileY,n.direction,n.fov)&&i.push(a);break;default:for(o=0;o<t.length;o++)a=t[o],i.push(a)}for(o=0;o<i.length;o++)a=i[o],this.canIncludeDescriptor(a)||(i[o]=null)}}()),this.qualityManager=t,this.maxNavQuality=this.qualityManager.getMaxNavPanoSize(),this.maxZoomQuality=this.qualityManager.getMaxZoomPanoSize(),this.baseSize=i,this.standardSize=o,this.highSize=r,this.ultraHighSize=s,this.priorityCriteria=new e.PriorityCriteria(null,new THREE.Vector3(0,0,0),new THREE.Vector3(0,0,-1),new THREE.Vector3(0,0,-1))}return Object(o["a"])(e,[{key:"updateCriteria",value:function(e,t,i,n){this.priorityCriteria.pano=e,this.priorityCriteria.cameraPosition.copy(t),this.priorityCriteria.cameraDir.copy(i),this.priorityCriteria.upcomingPanos=n,this.maxNavQuality=this.qualityManager.getMaxNavPanoSize(),this.maxZoomQuality=this.qualityManager.getMaxZoomPanoSize()}},{key:"canDownloadSize",value:function(e){return this.maxNavQuality>=e||this.maxZoomQuality>=e&&this.zoomingActive}},{key:"populateNeighborPanos",value:function(e,t,i){i=i||[],i.length=0;var n=t.getNeighbours(e);for(var o in n)if(n.hasOwnProperty(o)){var a=t.get(o);a||console.log(1),i.push(a)}return i}},{key:"populateScoredPanos",value:function(t,i,n,o,a){n=n||[],n.length=0;var s=[r["a"].filters.inPanoDirection(t.position,o,e.DIRECTION_SCORE_STRICTNESS),r["a"].filters.not(t)],l=[r["a"].scoreFunctions.distanceSquared(t),r["a"].scoreFunctions.direction(t.position,o)],c=i.sortByScore(s,l);if(c)for(var u=0;u<c.length&&u<a;u++){var d=c[u].pano;n.push(d)}return n}},{key:"queueTilesForPanos",value:function(e,t,i,n,o){for(var a=0,r=0;r<t.length;r++){var s=t[r],l=this.queueTilesForPano(e,i,s,n);if(a+=l>0?1:0,o&&a>=o)break}return a}},{key:"queueTilesInDirectionForPanos",value:function(e,t,i,n,o,a,r,s){for(var l=0,c=0;c<i.length;c++){var u=i[c],d=this.queueTilesInDirectionForPano(e,t,u,n,a,r);if(l+=d>0?1:0,s&&l>=s)break}return l}},{key:"canIncludeDescriptor",value:function(e){return e.status!==s["a"].Downloading&&e.status!==s["a"].Downloaded}},{key:"canIncludePano",value:function(e,t){return!e.isLoaded(t)}},{key:"getFOVDotThreshold",value:function(e){return Math.cos(THREE.Math.degToRad(e/2))}},{key:"setZoomingActive",value:function(e){e!==this.zoomingActive&&(this.zoomingActive=e)}}]),e}();p.PriorityCriteria=function(e,t,i,n,o){this.pano=e,this.cameraPosition=(new THREE.Vector3).copy(t),this.cameraDir=(new THREE.Vector3).copy(i),this.panoSpaceDir=(new THREE.Vector3).copy(n),this.upcomingPanos=o,this.copy=function(e){this.pano=e.pano,this.cameraPosition.copy(e.cameraPosition),this.cameraDir.copy(e.cameraDir),this.panoSpaceDir.copy(e.panoSpaceDir),this.upcomingPanos=o},this.zoomingActive=!1},p.DIRECTIONAL_FOV=180,p.DIRECTIONAL_FOV_NARROW=120,p.MAX_SCORED_PANOS_TOCONSIDER=6,p.MAX_SCORED_PANOS_TOADD=2,p.MAX_UPCOMING_PANOS_TOADD=3,p.DIRECTION_SCORE_STRICTNESS=.75,p.appendQueue=function(e,t){if(e&&t)for(var i=0;i<t.length;i++)e.push(t[i])},p.sortPanoTiles=function(e,t,i){h._panoSpaceDir.copy(i),l["a"].getRelativeDirection(t.quaternion,h._panoSpaceDir),h._fovThresholdNarrow=u["a"].getFOVDotThreshold(p.DIRECTIONAL_FOV_NARROW),h._fovThreshold=u["a"].getFOVDotThreshold(p.DIRECTIONAL_FOV),e.sort(h)},p.insertSortedPanoTile=function(e,t,i,n){h._panoSpaceDir.copy(n),l["a"].getRelativeDirection(i.quaternion,h._panoSpaceDir),h._fovThresholdNarrow=u["a"].getFOVDotThreshold(p.DIRECTIONAL_FOV_NARROW),h._fovThreshold=u["a"].getFOVDotThreshold(p.DIRECTIONAL_FOV);for(var o=-1,a=0;a<e.length;a++){var r=h(t,e[a]);if(r<=0){o=a;break}}if(-1===o)e[e.length]=t;else{for(var s=e.length;s>o;s--)e[s]=e[s-1];e[o]=t}}},d70d:function(e,t,i){"use strict";var n=i("823b"),o={damPro:Base64.decode("bWVzc2FnZSBiaW5hcnlfbWVzaCB7CglyZXBlYXRlZCBjaHVua19zaW1wbGUgY2h1bmsgPSAxOwoJcmVwZWF0ZWQgY2h1bmtfcXVhbnRpemVkIHF1YW50aXplZF9jaHVuayA9IDI7Cn0KCi8vIERlZmluaXRpb24gb2YgdmVydGljZXM6IDNEIGNvb3JkaW5hdGVzLCBhbmQgMkQgdGV4dHVyZSBjb29yZGluYXRlcy4KbWVzc2FnZSB2ZXJ0aWNlc19zaW1wbGUgewoJcmVwZWF0ZWQgZmxvYXQgeHl6ID0gMSBbcGFja2VkPXRydWVdOyAgLy8geF8wLHlfMCx6XzAsIHhfMSx5XzEsel8xLCAuLi4KCXJlcGVhdGVkIGZsb2F0IHV2ID0gMiBbcGFja2VkPXRydWVdOyAgLy8gdV8wLHZfMCwgdV8xLHZfMSwgLi4uCn0KCi8vIEluZGV4ZXMgb2YgdmVydGljZXMgb2YgZmFjZXMKbWVzc2FnZSBmYWNlc19zaW1wbGUgewoJcmVwZWF0ZWQgdWludDMyIGZhY2VzID0gMSBbcGFja2VkPXRydWVdOyAvLyBpMDAsaTAxLGkwMiwgaTEwLGkxMSxpMTIsIC4uLgp9CgovLyBBIHNpbXBseSBlbmNvZGVkIGNodW5rLgovLyBUT0RPOiBhZGQgY2h1bmsgcHJvcGVyaXRlcyAoc3VjaCBhcyAicmVmbGVjdGl2ZSIpCm1lc3NhZ2UgY2h1bmtfc2ltcGxlIHsKCW9wdGlvbmFsIHZlcnRpY2VzX3NpbXBsZSB2ZXJ0aWNlcyA9IDE7CglvcHRpb25hbCBmYWNlc19zaW1wbGUgZmFjZXMgPSAyOwoJb3B0aW9uYWwgc3RyaW5nIGNodW5rX25hbWUgPSAzOwoJb3B0aW9uYWwgc3RyaW5nIG1hdGVyaWFsX25hbWUgPSA0Owp9CgovLyBRdWFudGl6ZWQgdmVyc2lvbnMgZm9sbG93OgptZXNzYWdlIHZlcnRpY2VzX3F1YW50aXplZCB7CglvcHRpb25hbCBmbG9hdCBxdWFudGl6YXRpb24gPSAxOwoJcmVwZWF0ZWQgZmxvYXQgdHJhbnNsYXRpb24gPSAyOwoJcmVwZWF0ZWQgc2ludDMyIHggPSAzIFtwYWNrZWQ9dHJ1ZV07CglyZXBlYXRlZCBzaW50MzIgeSA9IDQgW3BhY2tlZD10cnVlXTsKCXJlcGVhdGVkIHNpbnQzMiB6ID0gNSBbcGFja2VkPXRydWVdOwp9CgptZXNzYWdlIHV2X3F1YW50aXplZCB7CglvcHRpb25hbCBzdHJpbmcgbmFtZSA9IDE7CglvcHRpb25hbCBmbG9hdCBxdWFudGl6YXRpb24gPSAyOwoJcmVwZWF0ZWQgc2ludDMyIHUgPSAzIFtwYWNrZWQ9dHJ1ZV07CglyZXBlYXRlZCBzaW50MzIgdiA9IDQgW3BhY2tlZD10cnVlXTsKfQoKLy8gSW5kZXhlcyBvZiB2ZXJ0aWNlcyBvZiBmYWNlcwptZXNzYWdlIGZhY2VzX2NvbXByZXNzZWQgewoJcmVwZWF0ZWQgc2ludDMyIGZhY2VzID0gMSBbcGFja2VkPXRydWVdOyAvLyBpMDAsaTAxLGkwMiwgaTEwLGkxMSxpMTIsIC4uLgp9CgptZXNzYWdlIGNodW5rX3F1YW50aXplZCB7CglvcHRpb25hbCBzdHJpbmcgY2h1bmtfbmFtZSA9IDE7CglvcHRpb25hbCBzdHJpbmcgbWF0ZXJpYWxfbmFtZSA9IDI7CglvcHRpb25hbCB2ZXJ0aWNlc19xdWFudGl6ZWQgdmVydGljZXMgPSAzOwoJcmVwZWF0ZWQgdXZfcXVhbnRpemVkIHV2cyA9IDQ7CglvcHRpb25hbCBmYWNlc19zaW1wbGUgZmFjZXMgPSA1Owp9Cg=="),visionmodeldataPro:Base64.decode("Ly8KLy8gUHJvdG9jb2wgQnVmZmVyIGZvciBwdWNrIHZpc2liaWxpdHkgYW5kIHJlbGF0ZWQgZGF0YQovLwovL3BhY2thZ2UgZW9zLnN0b3JhZ2U7CgovLyBpbXBvcnQgImVvcy9pbmZyYS9jb21tb24ucHJvdG8iOwovLyBUaGUgZm9sbG93aW5nIHdlcmUgbWFudWFsbHkgZXh0cmFjdGVkIGhlcmUsIEpTIGRvZXMgbm90IGxpa2UgcHJvdG9idWYgaW1wb3J0cwoKbWVzc2FnZSBBZmZpbmUzZiB7CglvcHRpb25hbCBRdWF0ZXJuaW9uZiByb3RhdGlvbiA9IDE7CglvcHRpb25hbCBWZWN0b3IzZiB0cmFuc2xhdGlvbiA9IDI7Cn0KCm1lc3NhZ2UgUXVhdGVybmlvbmYgewoJb3B0aW9uYWwgZmxvYXQgdyA9IDE7CglvcHRpb25hbCBmbG9hdCB4ID0gMjsKCW9wdGlvbmFsIGZsb2F0IHkgPSAzOwoJb3B0aW9uYWwgZmxvYXQgeiA9IDQ7Cn0KCm1lc3NhZ2UgVmVjdG9yM2YgewoJb3B0aW9uYWwgZmxvYXQgeCA9IDE7CglvcHRpb25hbCBmbG9hdCB5ID0gMjsKCW9wdGlvbmFsIGZsb2F0IHogPSAzOwp9CgovLwovLyBPbmUgc3dlZXAgLyBwYW5vCi8vCm1lc3NhZ2UgU3dlZXBMb2NhdGlvbiB7CglvcHRpb25hbCBieXRlcyB1dWlkID0gMTsgIC8qIHV1aWQgKi8KCW9wdGlvbmFsIEFmZmluZTNmIHBvc2UgPSAyOyAgLyogY2FtZXJhIHBvc2UgKHgsIHkseikgaW4gbWV0ZXIgYW5kIGEgcXVhdGVybmlvbiovCglvcHRpb25hbCBWZWN0b3IzZiBwdWNrID0gMzsgIC8qIHB1Y2sgbG9jYXRpb24gLSB4IGFueSBpcyBnZW5lcmFsbHkgdGhlIHNhbWUgYXMgcG9zZSwgeiBpcyB0aGUgaGVpZ2h0IG9mIHRoZSBjbG9zZXN0IGZsb29yIHVuZGVyIHRoZSBjYW1lcmEgKi8KCW9wdGlvbmFsIGludDMyIGdyb3VwID0gNDsgIC8qIGZsb29yIGluZGV4ICovCglvcHRpb25hbCBpbnQzMiBzdWJncm91cCA9IDU7ICAvKiByb29tIGluZGV4ICovCglyZXBlYXRlZCBpbnQzMiB2aXNpYmxlcyA9IDY7ICAvKiBsaXN0IG9mIGluZGljZXMgdG8gYWxsIHB1Y2tzIHZpc2libGUgZnJvbSB0aGlzIHB1Y2sgKi8KCXJlcGVhdGVkIGludDMyIHZpc2libGVzMiA9IDc7IAoJcmVwZWF0ZWQgaW50MzIgdmlzaWJsZXMzID0gODsKfQoKLy8KLy8gQWxsIHB1Y2tzIGluIGEgbW9kZWwuIFB1Y2tzIGFyZSBzdG9yZWQgaW4gc2Nhbm5pbmcgb3JkZXIuCi8vCm1lc3NhZ2UgTmF2aWdhdGlvbkluZm8gewoJcmVwZWF0ZWQgU3dlZXBMb2NhdGlvbiBzd2VlcExvY2F0aW9ucyA9IDE7Cn0="),decoderMesh:function(){var e=dcodeIO.ProtoBuf.loadProto(this.damPro);return e.build("binary_mesh")},decoderModeldata:function(){var e=dcodeIO.ProtoBuf.loadProto(this.visionmodeldataPro);return e.build("NavigationInfo")},decompressMesh:function(e){var t=null;try{t=this.decoderMesh().decode(e)}catch(i){return n["a"].error("failed parsing proto for .dam"),null}return t},decompressModeldata:function(e){var t=null;try{t=this.decoderModeldata().decode(e)}catch(i){return n["a"].error("failed parsing proto for .modeldata"),null}return t}};t["a"]=o},d71a:function(e,t,i){"use strict";var n=i("f57a"),o=i.n(n);o.a},d7a9:function(e,t,i){"use strict";i.r(t);i("7f7f"),i("cadf"),i("551c"),i("f751"),i("097d"),i("ac6a"),i("c5f6"),i("b841"),i("24df");var n=i("2b0e"),o=i("4971"),a=i.n(o),r=i("2b88"),s=i.n(r),l=i("d547"),c=(i("6762"),i("2fdb"),i("4917"),i("53ca"),i("28a5"),i("a481"),n["default"].prototype.$isServer),u=(c||Number(document.documentMode),function(){return!c&&document.addEventListener?function(e,t,i){e&&t&&i&&e.addEventListener(t,i,!1)}:function(e,t,i){e&&t&&i&&e.attachEvent("on"+t,i)}}());(function(){!c&&document.removeEventListener})();var d,h=[],p="@@clickoutsideContext",f=0;function m(e,t,i){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!(i&&i.context&&n.target&&o.target)||e.contains(n.target)||e.contains(o.target)||e===n.target||i.context.popperElm&&(i.context.popperElm.contains(n.target)||i.context.popperElm.contains(o.target))||(t.expression&&e[p].methodName&&i.context[e[p].methodName]?i.context[e[p].methodName]():e[p].bindingFn&&e[p].bindingFn())}}!n["default"].prototype.$isServer&&u(document,"mousedown",(function(e){return d=e})),!n["default"].prototype.$isServer&&u(document,"mouseup",(function(e){h.forEach((function(t){return t[p].documentHandler(e,d)}))}));var v,g={bind:function(e,t,i){h.push(e);var n=f++;e[p]={id:n,documentHandler:m(e,t,i),methodName:t.expression,bindingFn:t.value}},update:function(e,t,i){e[p].documentHandler=m(e,t,i),e[p].methodName=t.expression,e[p].bindingFn=t.value},unbind:function(e){for(var t=h.length,i=0;i<t;i++)if(h[i][p].id===e[p].id){h.splice(i,1);break}delete e[p]}},y={bind:function(e,t,i){e.func=t.value,window.addEventListener("click",e.func,!1)},unbind:function(e){window.removeEventListener("click",e.func),delete e.func}},b=i("f121"),w=i("617a"),E=i("b775"),T=i("7f46"),P=i("c75e"),x=i("eb02"),k=i("365c");n["default"].prototype.$bus=P["a"],n["default"].prototype.$api=k,n["default"].prototype.$http=E["a"],n["default"].prototype.$config=b["a"],n["default"].prototype.$staticURL=b["a"].getStaticResource.bind(b["a"]),n["default"].prototype.$scrollbars=[],n["default"].use(s.a),v=w["a"].isMobile()?i("0236").default:i("79f8").default,n["default"].mixin({components:{VueSlider:a.a,SettingPanel:v},directives:{clickoutside:g,clickwindow:y},filters:{float:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Number(e).toFixed(t)},timeFormat:function(e){return Object(T["f"])(e||0)},monthDayFormat:function(e){return Object(T["d"])(e||"")}},data:function(){return{}},methods:{$buy:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.isVIPExpired=this.$store.getters["isVIPExpired"],e.isVIPTransition=this.$store.getters["isVIPTransition"];var t=null;if(e.isVIPTransition){var i=localStorage.getItem("vip_noremind")||0;if(1==i)return void(e.ok&&e.ok());t=new l["i"]({data:e}).$mount()}else t=new l["f"]({data:{isVIPExpired:e.isVIPExpired}}).$mount();return document.body.appendChild(t.$el),n["default"].nextTick((function(){t.show=!0})),t},$alert:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new l["e"]({data:e}).$mount();document.body.appendChild(t.$el),n["default"].nextTick((function(){t.show=!0}))},$confirm:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new l["g"]({data:e}).$mount();document.body.appendChild(t.$el),n["default"].nextTick((function(){t.show=!0}))},$tips:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new l["h"]({data:e}).$mount();document.body.appendChild(t.$el),n["default"].nextTick((function(){t.show=!0}))},$getStaticResource:function(e){return b["a"].getStaticResource(e)}}});var R=new Image;R.src=b["a"].getPublicResource("images/images#m#/logo-main".concat("zh"==b["a"].lang?"":"-en",".png?").concat(b["a"].timestamp)),R.onload=function(){x["a"].commit("scene/SetLogos",{main:R.src})},R.onerror=function(){x["a"].commit("scene/SetLogos",{main:!1})},window.__scrollbars=[],$(window).on("resize",(function(){window.__ps_timer&&clearInterval(window.__ps_timer),window.__ps_timer=setTimeout((function(){$("div.ps").each((function(){var e=$(this).data("scrollbar");e&&e.update()}))}),20),window.__scrollbars.forEach((function(e){return e.reload()}))}));var _,S=i("9923"),M=i("9ef6");b["a"].isEdit=!1,b["a"].isMobile=/iPhone|iPad|Android/i.test(window.navigator.userAgent),M["a"].zoom.enabled=!0,document.body.setAttribute("show-mode",b["a"].isMobile?"mobile":"pc"),b["a"].isMobile&&(i("bda7"),M["a"].insideFOV=91);try{var A=window.__src_path||b["a"].name;_=function(){return i("a830")("./".concat(A,"/App.vue"))}}catch(O){console.error("项目不存在",O)}_&&(window.$app=new n["default"]({i18n:S["a"],store:x["a"],render:function(e){return e(_)}}).$mount("#app"))},d9c2:function(e,t,i){"use strict";i("6762"),i("2fdb"),i("a481"),i("386d"),i("3b2b"),i("7f7f"),i("28a5"),i("4917");function n(e,t){var i=window.navigator.userAgent,n=i.match(e);return n=n?n[1].split(t):[],{major:parseInt(n[0])||0,minor:parseInt(n[1])||0,patch:parseInt(n[2])||0}}var o={isFullscreen:function(){return document.fullscreenElement||document.mozFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement},supportsFullscreen:function(){return document.fullscreenEnabled||document.mozFullscreenEnabled||document.mozFullScreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled},isPointerLocked:function(){return document.pointerLockElement||document.mozPointerLockElement||document.webkitPointerLockElement},requestFullscreen:function(e,t){e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):e.msRequestFullscreen&&e.msRequestFullscreen(),t&&$(document).on("fullscreenchange webkitfullscreenchange mozfullscreenchange MSFullscreenChange",o.requestPointerLock)},requestPointerLock:function(){var e;if(document.fullscreenElement)e=document.fullscreenElement();else if(document.mozFullscreenElement)e=document.mozFullscreenElement();else if(document.mozFullScreenElement)e=document.mozFullScreenElement();else{if(!document.webkitFullscreenElement)return;e=document.webkitFullscreenElement()}e.requestPointerLock=e.requestPointerLock||e.mozRequestPointerLock||e.webkitRequestPointerLock,e.requestPointerLock(),$(document).off("fullscreenchange webkitfullscreenchange mozfullscreenchange MSFullscreenChange",this)},exitPointerLock:function(){document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock()},exitFullscreen:function(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()},details:function(){var e=navigator.userAgent.match("(Firefox|Chrome|Safari)/([\\d]+)");return e?{name:e[1],version:parseInt(e[2]),platform:navigator.platform}:{}},is:function(e){return this.details()&&this.details().name===e},inIframe:function(){return window.parent!==window},aspectRatio:function(e){e=e||$("#player");var t=e.width()/e.height();return isFinite(t)?t:0},userAgent:function(){return window.navigator.userAgent},isMobile:function(){var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|android|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4))},isLandscape:function(){return this.isMobile&&this.aspectRatio()>1},isSmallScreen:function(){var e=screen.width/window.devicePixelRatio;return e<240},detectIE:function(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");return-1!==t||!!navigator.userAgent.match(/Trident.*rv\:11\./)},detectSafari:function(){var e=window.navigator.userAgent,t=e.indexOf("Safari");return-1!==t&&!this.detectOpera()&&!this.detectChrome()},detectFirefox:function(){var e=window.navigator.userAgent;return-1!==e.indexOf("Firefox")},detectChrome:function(){var e=window.navigator.userAgent;return-1!==e.indexOf("Chrome")&&!this.detectOpera()},detectOpera:function(){var e=window.navigator.userAgent;return-1!==e.indexOf("OPR")},detectIOS:function(){return this.detectIPhone()||this.detectIPad()||this.detectIPod()},detectIPad:function(){var e=window.navigator.userAgent,t=/iPad/;return t.test(e)},detectIPod:function(){var e=window.navigator.userAgent,t=/iPod/;return t.test(e)},detectIPhone:function(){var e=window.navigator.userAgent,t=/iPhone/;return t.test(e)},detectAndroid:function(){var e=window.navigator.userAgent;return-1!==e.indexOf("Android")},detectAndroidMobile:function(){var e=window.navigator.userAgent;return this.detectAndroid()&&-1!==e.indexOf("Mobile")},detectSamsungNative:function(){var e=window.navigator.userAgent;return-1!==e.indexOf("SM-G900H")||-1!==e.indexOf("GT-I9500")||-1!==e.indexOf("SM-N900")},detectSamsungS6:function(){var e=window.navigator.userAgent;return-1!==e.indexOf("SM-G92")},detectHUAWEI5X:function(){return-1!==window.navigator.userAgent.indexOf("KIW-TL00H")},detectWebVR:function(){return!(!window.navigator.getVRDisplays||!window.VRDisplay)},getVRDisplay:function(){var e=$.Deferred();return this.detectWebVR()?(navigator.getVRDisplays().then((function(t){t.length>=1&&e.resolve(t[0]),e.reject(null)})),e):e.reject(null)},iosVersion:function(){if(!this.detectIOS())throw new DeviceMismatchException("Did not detect an iDevice");var e=/((?:\d+\_?){1,3}) like Mac OS/,t="_";return n(e,t)},androidVersion:function(){if(!this.detectAndroid())throw new DeviceMismatchException("Did not detect an Android based device");var e=/Android ((?:\d+\.?){1,3})/,t=".";return n(e,t)},valueFromCookie:function(e,t){var i=new RegExp(e+"=([0-9a-f]+)(; ?|$)").exec(document.cookie);if(!i)return t;var n=i[1];return"boolean"==typeof t?"true"===n||"1"===n:"number"==typeof t?parseFloat(n):n},valueFromHash:function(e,t){var i=new RegExp("[#&?]"+e+"=([^#&?]*)"),n=i.exec(window.location.href);if(!n)return t;var o=n[1];return"boolean"==typeof t?"true"===o||"1"===o:"number"==typeof t?parseFloat(o):window.decodeURIComponent(o)},getProjectNum:function(){if(window.__ProjectNum&&"__ProjectNum__"!=window.__ProjectNum)return window.__ProjectNum;var e=window.location.href.substring(window.location.href.indexOf("=")+1);return-1!=e.indexOf("&")&&(e=e.substring(0,e.indexOf("&"))),-1!=e.indexOf("#")&&(e=e.substring(0,e.indexOf("#"))),e},urlHasValue:function(e,t){if("m"===e&&window.__ProjectNum&&"__ProjectNum__"!=window.__ProjectNum)return window.__ProjectNum;var i=window.location.search.substr(1).split("&");if(t){for(var n=0;n<i.length;n++){var o=i[n].split("=");if(2===o.length&&o[0]===e)return o[1]}return""}for(var a=0;a<i.length;a++){var r=i[a].split("=");if(r[0]==e)return!0}return!1},urlQueryValue:function(e){return this.urlHasValue(e,!0)||""},urlHashValue:function(e){for(var t=window.location.hash.substr(1).replace("/?","").split("&"),i=0;i<t.length;i++){var n=t[i].split("=");if(2===n.length&&n[0]===e)return n[1]}return""},urlIsHasHash:function(e){var t=window.location.hash.substr(1).replace("/?","").split("&");return t.includes(e)},islongPhone:function(){var e=screen.height/screen.width;return this.isMobile()&&(e>1.99||e<.502512)},detectWeixin:function(){return"micromessenger"==window.navigator.userAgent.toLowerCase().match(/MicroMessenger/i)},detectWeixinMiniProgram:function(){return window.navigator.userAgent.match("miniProgram")},detectEdge:function(){return window.navigator.userAgent.indexOf("Edge")>-1},detectApp:function(){return this.urlHasValue("app")},isTabHidden:function(){var e=["webkit","moz","ms","o"];if("hidden"in document)return document.hidden;for(var t=0;t<e.length;t++)if(e[t]+"Hidden"in document)return document[e[t]+"Hidden"];return!1}};t["a"]=o},dbd3:function(e,t,i){"use strict";i.d(t,"a",(function(){return P}));i("6b54"),i("2397"),i("28a5"),i("673e"),i("7f7f");var n=i("d4ec"),o=i("bee2"),a=i("262e"),r=i("99de"),s=i("7e84"),l=i("d9c2"),c=i("823b"),u=i("2d47"),d=(i("1158"),i("b235")),h=(i("cd18"),i("bc19")),p=(i("80c5"),i("0bc0")),f=i("f121"),m=i("6860"),v=i("c75e"),g=i("9ef6"),y=i("3f2a"),b=i("ec11");function w(e){var t=E();return function(){var i,n=Object(s["a"])(e);if(t){var o=Object(s["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(r["a"])(this,i)}}function E(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var T={CLOSED:"closed",OPENING:"opening",OPEN:"open",CLOSING:"closing",ACTIVE:"active"},P=function(e){Object(a["a"])(i,e);var t=w(i);function i(e,o,a,r,s){var l;if(Object(n["a"])(this,i),l=t.call(this),l.body=null,l.label=void 0!=e?e:"",l.description=void 0!=o?o:"",l.parsedDescription=[],l.loadingSpinner=null,l.state=T.CLOSED,l.orientation="",l.hovering=!1,l.openTransition=null,l.closeTransition=null,l.openPromise=null,l.closePromise=null,l.animationTransition=null,l.animationScale=0,l.tag=s,l.examTimes=0,v["a"].on("hotspot/Tag/Panel",(function(){l.applyOrientation(l.openForTag,l.orientation)})),v["a"].on("hotspot/Tag/Close",(function(e){e?m["store"].commit("hotspot/Closed"):l.__is_closeTagFromEvent=!0,m["objects"].tagManager.activeTag&&m["objects"].tagManager.dismissActiveTag(!0)})),"reserve"==f["a"].name){setTimeout((function(){l.container=document.createElement("div"),l.container.id="container"+l.tag.sid,document.querySelector("#tag-billboards").appendChild(l.container)}));var c=function e(){l.$tag?l.open(l.tag):setTimeout(e,100)};setTimeout(c,100)}return l}return Object(o["a"])(i,[{key:"build",value:function(e){}},{key:"bindEvents",value:function(){var e=this;if("reserve"!=f["a"].name){var t=this.$tag,i=this.$tag.childNodes[0],n=function(e){return function(t){if(!this.$tag.classList.contains("overlay")&&!t.target.classList.contains("closeTag")){var i,n=document.getElementById("player");try{i=new MouseEvent(e,t)}catch(n){i=document.createEvent("MouseEvents"),i.initMouseEvent(e,t.bubbles,t.cancelable,t.view,t.detail,t.screenX,t.screenY,t.clientX,t.clientY,t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget)}n.dispatchEvent(i)}}};i.addEventListener("mousedown",(function(e){e.stopPropagation()})),i.addEventListener("mouseup",function(e){e.stopPropagation()}.bind(this)),t.addEventListener("mousedown",n("mousedown").bind(this)),t.addEventListener("mouseup",n("mouseup").bind(this)),t.addEventListener("touchstart",(function(t){e.$container&&(e.$container.style.pointerEvents="auto")}))}}},{key:"checkIfInVideoArea",value:function(e,t){var i;e=e||m["objects"].player.currentPano;if(e.hasVideo&&m["objects"].panoVideoRenderer.ifEnable()){if(e.videoInfo.dir)var n=e.videoInfo.dir.clone(),o=THREE.Math.degToRad(e.videoInfo.hfov/2);else{var a=(new THREE.Quaternion).setFromAxisAngle(new THREE.Vector3(0,1,0),THREE.Math.degToRad(m["objects"].player.model.supportsTiles?90:180)),r=y["a"].FORWARD.clone().applyQuaternion(a.multiply(e.quaternion)).add(e.position);n=r.clone().sub(e.position),o=THREE.Math.degToRad(32.5)}var s=b["a"].filters.isInFanAngle(e.position,n,o);i=s(t)}else if(e.panoVideo){n=e.panoVideo.dir.clone(),o=THREE.Math.degToRad(e.panoVideo.hfov/2);s=b["a"].filters.isInFanAngle(e.position,n,o)}return v["a"].emit("tag/status",{isCoverVideo:i}),i}},{key:"setContent",value:function(e,t){var i=this;m["store"].commit("hotspot/OpenBySid",{sid:e.sid,click:t}),setTimeout((function(){i.checkIfInVideoArea(null,e)}),500)}},{key:"open",value:function(e,t){return"reserve"!=f["a"].name&&e!=this.openForTag&&(0!=this.animationScale&&m["store"].commit("hotspot/Closed"),this.animationScale=0,this.state=T.CLOSED,e.content.screenTransform="scale(0)",this.$tag.style.webkitTransform=e.content.screenTransform,this.$tag.style.transform=e.content.screenTransform,this.openTransition&&(d["a"].cancel(this.openTransition),this.openTransition=null)),this.setContent(e,t),this.openForTag=e,this.forceToOirent=!0,c["a"].info("open"),e||c["a"].error("没有tag:"+e),this.$billboards.classList.add("active"),this.openPromise=$.Deferred(),this.state===T.ACTIVE?(1==this.animationScale?this.openPromise.resolve().promise():this.openPromise,m["store"].commit("hotspot/Opened",e.sid)):this.openTransition?t&&this.setActiveState():this.openTransition=d["a"].setTimeout(function(){this.state!==T.OPEN&&(this.emit(p["a"].OPENING),t&&this.emit(p["a"].ACTIVATING),this.state=T.OPENING,this.animateOpen(e,function(){t&&this.setActiveState(),this.openPromise.resolve(),this.examOpenPromise&&"resolved"!=this.examOpenPromise.state()&&this.examOpenPromise.resolve(),m["store"].commit("hotspot/Opened",e.sid)}.bind(this)))}.bind(this),0),d["a"].cancel(this.closeTransition),this.closePromise&&this.closePromise.reject(),this.closeTransition=void 0,this.openPromise}},{key:"close",value:function(e){return"reserve"==f["a"].name?$.Deferred().resolve():(this.$billboards.classList.remove("active"),this.outOfScreen=!1,this.closePromise=$.Deferred(),m["objects"].record.control.isRecording&&m["objects"].record.addTagData("close"),!e&&this.hovering?this.closePromise.reject().promise():(this.closeTransition||(this.closeTransition=d["a"].setTimeout(function(){var e=this;this.state!==T.CLOSED&&(this.emit(p["a"].CLOSING),this.state=T.CLOSING,this.animateClose((function(){e.__is_closeTagFromEvent||m["store"].commit("hotspot/Closed"),v["a"].emit("hotspot/closed",e.__is_closeTagFromEvent),e.__is_closeTagFromEvent=!1})))}.bind(this),0)),d["a"].cancel(this.openTransition),this.openPromise&&this.openPromise.reject(),this.openTransition=void 0,this.closePromise.resolve(),this.closePromise.promise()))}},{key:"setActiveState",value:function(){this.state!==T.CLOSED&&(this.state=T.ACTIVE,this.emit(p["a"].ACTIVATE),this.$tag.classList.remove("has-hotzone"))}},{key:"animateOpen",value:function(e,t){if(this.state===T.OPENING){if(d["a"].cancel(this.animationTransition),l["a"].detectSamsungNative())return this.boardOrientation=null,this.$tag.style.visibility="visible",this.emit(p["a"].OPENED),this.state!=T.ACTIVE&&(this.state=T.OPEN),void(t&&t());if(this.$tag.style.webkitTransform="scale(0)",this.$tag.style.transform="scale(0)",this.$tag.style.visibility="visible",e.content.screenTransform){var i=e.content.screenTransform.indexOf("scale");if(i>-1){var n=e.content.screenTransform.slice(0,i);e.content.screenTransform=n+"scale(0)",this.$tag.style.webkitTransform=e.content.screenTransform,this.$tag.style.transform=e.content.screenTransform}}this.animationTransition=d["a"].start(u["a"].property(this,"animationScale",1),g["a"].billboardSettings.animation.openDuration,function(){console.log(this.animationScale),this.emit(p["a"].OPENED),this.state!=T.ACTIVE&&(this.state=T.OPEN),t&&t()}.bind(this))}}},{key:"animateClose",value:function(e){this.state===T.CLOSING&&(d["a"].cancel(this.animationTransition),this.animationTransition=d["a"].start(u["a"].property(this,"animationScale",0),g["a"].billboardSettings.animation.closeDuration,function(){this.emit(p["a"].CLOSED),this.state=T.CLOSED,this.$tag.style.visibility="hidden",this.$billboards.classList.contains("has-hotzone")||this.$billboards.classList.add("has-hotzone"),e&&e()}.bind(this)))}},{key:"needsUpdate",value:function(){return this.state!==T.CLOSED}},{key:"update",value:function(e){if(this.openForTag&&this.state!=T.CLOSED){var t=this.openForTag,i=t.discWorldPosition.clone().project(e);if(!(i.z>=1)){i.y*=-1;var n=t.getDiscRadius(i,e),o=this.calcScale(n),a={x:(i.x+1)*$("#player").width()/2,y:(i.y+1)*$("#player").height()/2};if("shop"!=f["a"].name&&"reserve"!=f["a"].name&&"center"==this.orientation&&(t.examing||this.outOfScreen||"opening"==this.state)){var r=this.getDimensions(),s=$("#player").height(),l=f["a"].isMobile?120:55;if((a.y-r.height/2<0||a.y+r.height/2+l*o*this.animationScale>s)&&(this.outOfScreen=!0,a.y-r.height/2<0?a.y=r.height/2:a.y=s-r.height/2-l*o*this.animationScale,($(this.$tag).height()+l)*o*this.animationScale>s))return this.updateOrientation(t,i),t.content.screenTransform=t.content.initialTransform+" translate("+a.x+"px, "+a.y+"px) scale("+s/($(this.$tag).height()+l)+")",this.$tag.style.webkitTransform=t.content.screenTransform,void(this.$tag.style.transform=t.content.screenTransform)}this.updateOrientation(t,i),t.content.screenTransform=t.content.initialTransform+" translate("+a.x+"px, "+a.y+"px) scale("+o*this.animationScale+")",this.$tag.style.webkitTransform=t.content.screenTransform,this.$tag.style.transform=t.content.screenTransform}}}},{key:"getDimensions",value:function(){return this.$tag.getBoundingClientRect()}},{key:"ifOutOfScreen",value:function(){var e=this.getDimensions(),t=$("#player")[0].getBoundingClientRect(),i=3,n=f["a"].isMobile?50:0;return e.left<t.left-i||e.right>t.right+i||e.top<t.top-i||e.bottom>t.bottom-n+i}},{key:"calcScale",value:function(e){if($("#player").width()<=320&&$("#player").height()<=520)var t=.86;else t=1;return Math.sqrt(e/40)*g["a"].billboardSettings.boardToDiscRatio*t}},{key:"updateOrientation",value:function(e,t){if(f["a"].isMobile||m["objects"].record.control.isRecording||m["objects"].play.control.isPlaying)(this.forceToOirent||"center"!=this.orientation)&&this.applyOrientation(e,"center");else if(this.forceToOirent||!e.examing&&this.state!==T.ACTIVE&&!e.edit||!this.orientation||"center"==this.orientation){var i=1/3,n=t.y<-i?0:t.y<i?1:2,o=t.x<-i?0:t.x<i?1:2,a="";a+=0===o?"right":2===o?"left":"",a+=0===n?"-down":2===n?"-up":"",1===o&&(a=0===n?"bottom":2===n?"top":"",1===n&&(a=$("#player").width()>$("#player").height()?t.x<0?"right":"left":t.y<0?"bottom":"top")),(this.forceToOirent||a!=this.orientation||a!=e.content.orientation)&&this.applyOrientation(e,a)}}},{key:"applyOrientation",value:function(e,t){if(t){this.forceToOirent=!1,this.$tag.style.transform=this.$tag.style.webkitTransform="",this.$tag.classList.remove("tag-container-"+this.orientation),this.$tag.classList.add("tag-container-"+t),this.orientation=e.content.orientation=t;var i=window.getComputedStyle(this.$tag);if(e.content.initialTransform=i.transform||i.webkitTransform,"none"==e.content.initialTransform)e.content.initialTransform="";else{var n=i.transform.slice(7,-1).split(","),o=-n[4],a=-n[5];this.$tag.style.webkitTransformOrigin=o+"px "+a+"px",this.$tag.style.transformOrigin=o+"px "+a+"px",e.content.transformOrigin=o+"px "+a+"px"}if(e.content.screenTransform){var r=e.content.screenTransform.indexOf("translate");if(r>-1){var s=" "+e.content.screenTransform.slice(r);e.content.screenTransform=e.content.initialTransform+s,this.$tag.style.webkitTransform=e.content.screenTransform,this.$tag.style.transform=e.content.screenTransform}}}}},{key:"getCenterPos",value:function(){var e=this.getDimensions(),t=new THREE.Vector3,i=h["a"].handelPadding(e.left,e.top);return h["a"].convertScreenPositionToNDC(i.x+e.width/2,i.y+e.height/2,t),m["objects"].player.flying&&m["objects"].player.camera.updateProjectionMatrix(),t.unproject(m["objects"].player.camera),t}},{key:"$billboards",get:function(){return this.__$billboards||(this.__$billboards=document.querySelector("#tag-billboards")),this.__$billboards}},{key:"$tag",get:function(){return"reserve"==f["a"].name?this.container.children[0]:(this.__$billboards_tag||(this.__$billboards_tag=this.$billboards.querySelector(".tag-container"),this.__$billboards_tag.querySelector(".tag-close").addEventListener("click",(function(e){m["objects"].tagManager.activeTag&&m["objects"].tagManager.dismissActiveTag(),e.stopPropagation()}),!1)),this.__$billboards_tag)}}]),i}(EventEmitter)},dbf4:function(e,t,i){"use strict";i.d(t,"a",(function(){return L}));i("6b54"),i("2397"),i("ac6a");var n,o=i("d4ec"),a=i("bee2"),r=i("257e"),s=i("262e"),l=i("99de"),c=i("7e84"),u=i("ade3"),d=i("6860"),h=i("9af0"),p=i("aeb9"),f=i("a46c"),m=i("d9c2"),v=i("8eb6"),g=i("541a"),y=i("eb5a"),b=i("f121"),w=(i("456d"),i("cbe8"),i("9ef6")),E=i("076a"),T=i("c75e"),P=i("d547"),x=i("9923"),k={};k.Init=function(e){if(n=e,n.renderer&&!n.newRenderer){n.newRenderer=new A(n.renderer,n,n.camera),n.isHuawei5X=m["a"].detectHUAWEI5X(),n.oldRenderer=n.renderer;var t=!1,i=!1;Object.defineProperty(w["a"],"vrEnabled",{get:function(){return t},set:function(e){if(e=!!e,e&&w["a"].vrSplitScreen?(n.renderer=n.newRenderer,d["objects"].player.cameraControls.cameras.panorama.staticFov=70):(n.renderer=n.oldRenderer,d["objects"].player.cameraControls.cameras.panorama.staticFov=null),t=e,"portrait"!=window.VRScreenType&&(k.cursor.visible=e,n.setSize(window.innerWidth,window.innerHeight),d["objects"].player.model.updateVrMarker(e)),e)d["objects"].player.linkViewManager.hideAllViews(),setTimeout((function(){if(console.log("orientEnable"+window.orientEnable),w["a"].vrEnabled&&!window.orientEnable&&m["a"].detectIOS()){var e=m["a"].iosVersion();if(12==e.major&&e.minor>=2)window.VRScreenNotFull||(m["a"].detectSafari()?Object(P["a"])({content:x["a"].t("modules.base.vr_fail_safari_tips")}):Object(P["a"])({content:x["a"].t("modules.base.vr_fail_app_tips")}));else if(e.major>=13){var t=window.vrPermission&&("granted"!=window.vrPermission.deviceMotion||"granted"!=window.vrPermission.deviceOrientation);setTimeout((function(){w["a"].vrEnabled&&!window.orientEnable&&(_("reset"),window.DeviceMotionEvent&&window.DeviceMotionEvent.requestPermission&&"function"===typeof window.DeviceMotionEvent.requestPermission?(console.log("开始获取权限1"),window.DeviceMotionEvent.requestPermission().then((function(e){console.log("permissionState1: "+e),_("deviceMotion",e)})).catch((function(e){_("deviceMotion",!1),console.log(e)}))):(console.log("window.DeviceMotionEvent undefined"),_("deviceMotion",!1)),window.DeviceOrientationEvent&&window.DeviceOrientationEvent.requestPermission&&"function"===typeof window.DeviceOrientationEvent.requestPermission?(console.log("开始获取权限2"),window.DeviceOrientationEvent.requestPermission().then((function(e){console.log("permissionState2: "+e),_("deviceOrientation",e)})).catch((function(e){_("deviceOrientation",!1),console.log(e)}))):(console.log("window.DeviceOrientationEvent undefined"),_("deviceOrientation",!1)))}),t?0:150)}else console.log("陀螺仪未能启用 ios "+e.major+"."+e.minor)}}),200);else{var i=d["objects"].player.position,o=(new THREE.Quaternion).copy(d["objects"].player.camera.quaternion),a=new THREE.Vector3(0,0,-1).applyQuaternion(o).add(i);a.x==i.x&&a.z==i.z?console.log("看向正地面时无法lookAt,无法更新camera转向,直接退出vr"):d["objects"].player.cameraControls.activeControl.lookAt(a),d["objects"].player.linkViewManager.showAllViews()}}}),Object.defineProperty(w["a"],"vrSplitScreen",{get:function(){return i},set:function(e){e=!!e,i!=e&&(i=e,w["a"].vrEnabled&&"portrait"!=window.VRScreenType&&(e?(n.renderer=n.newRenderer,d["objects"].player.cameraControls.cameras.panorama.staticFov=70):(n.renderer=n.oldRenderer,d["objects"].player.cameraControls.cameras.panorama.staticFov=null),console.log("vrSplitScreen"),n.setSize(window.innerWidth,window.innerHeight)))}}),90!=window.orientation&&270!=window.orientation||(w["a"].vrSplitScreen=!0),S(.5,!0,1,16777215,0);var o={setSize:function(e,t){n.camera.aspect=e/t}};n.resizeListeners.push(o)}};var R={},_=function(e,t){"reset"==e?R={}:(R[e]=t,2!=Object.keys(R).length||"granted"==R.deviceMotion&&"granted"==R.deviceOrientation||window.VRScreenNotFull||Object(P["a"])({content:x["a"].t("modules.base.vr_fail_reopen_tips")}))},S=function(e,t,i,o,a){var r,s=new THREE.SpriteMaterial({opacity:i,color:o,transparent:t,map:C(b["a"].getStaticResource("img/vrCursor.png")),needsUpdate:!0,side:THREE.DoubleSide});s.map.offset=new THREE.Vector2(1/17*a,0),s.map.repeat=new THREE.Vector2(1/17,1),s.depthTest=!1,s.blending=THREE.AdditiveBlending,r=new THREE.Sprite(s),r.scale.set(e,e,e),r.position.z=-5,r.visible=!1,r.name="cursor",r.renderOrder=E["a"].panoMarker,n.camera.add(r),n.scene.add(n.camera),k.cursor=r;var l=new M(n.scene,r,n.camera);k.cursor.triggerTargetEvent=l.triggerTargetEvent,n.updateListeners.push(l)};window.orientEnable=0;var M=function(e,t,i){function n(){a.orient=THREE.Math.degToRad(window.orientation||0)}function o(e){if(w["a"].vrEnabled||!window.orientEnable){window.orientEnable||(window.orientEnable=1);var t=THREE.Math.degToRad(e.alpha),i=THREE.Math.degToRad(e.beta),n=THREE.Math.degToRad(e.gamma);this.isHuawei5X?(-1e3===a.alpha&&(a.alpha=t),-1e3===a.beta&&(a.beta=i),-1e3===a.gamma&&(a.gamma=n),Math.abs(t-a.alpha)>.06&&(a.alpha=t),Math.abs(i-a.beta)>.006&&(a.beta=i),Math.abs(n-a.gamma)>.006&&(a.gamma=n)):(a.alpha=t,a.beta=i,a.gamma=n)}}this.cursor=t,this.raycaster=new THREE.Raycaster,this.targetEventObj={},this.type=1,this.canStartAnimation=!0;var a=this;this.target=i,this.euler=new THREE.Euler,this.q0=new THREE.Quaternion,this.q1=new THREE.Quaternion(-Math.sqrt(.5),0,0,Math.sqrt(.5)),this.zee=new THREE.Vector3(0,0,1),this.alpha=-1e3,this.beta=-1e3,this.gamma=-1e3,this.orient=THREE.Math.degToRad(window.orientation||0),window.addEventListener("orientationchange",n),window.addEventListener("deviceorientation",o),this.setObjectQuaternion=function(e,t,i,n,o){if(a.euler.set(i,t,-n,"YXZ"),e.setFromEuler(a.euler),e.multiply(a.q1),e.multiply(a.q0.setFromAxisAngle(a.zee,-o)),!w["a"].vrSplitScreen){var r=new THREE.Vector3(0,0,-1).applyQuaternion(e);d["objects"].player.camera.lookAt(d["objects"].player.camera.position.clone().add(r));var s=new THREE.Vector3(1,0,0).applyQuaternion(e),l=new THREE.Vector3(1,0,0).applyQuaternion(d["objects"].player.camera.quaternion);window.screenFaceOrient=THREE.Math.radToDeg(s.angleTo(l));var c=s.clone().cross(l);c.dot(r)<0&&(window.screenFaceOrient*=-1)}},parent!==window&&window.addEventListener("message",(function(e){if(e.data&&!(e.data&&e.data.type&&e.data.type.indexOf("webpack")>-1)){var t="string"==typeof e.data?JSON.parse(e.data):e.data,i=-1!==window.navigator.userAgent.indexOf("KIW-TL00H");t&&t.alpha&&t.beta&&t.gamma&&function(e){var i=THREE.Math.degToRad(t.alpha),n=THREE.Math.degToRad(t.beta),o=THREE.Math.degToRad(t.gamma);e?(-1e3===a.alpha&&(a.alpha=i),-1e3===a.beta&&(a.beta=n),-1e3===a.gamma&&(a.gamma=o),Math.abs(i-a.alpha)>.06&&(a.alpha=i),Math.abs(n-a.beta)>.006&&(a.beta=n),Math.abs(o-a.gamma)>.006&&(a.gamma=o)):(a.alpha=i,a.beta=n,a.gamma=o)}(i)}})),this.update=function(e){TWEEN.update(),window.ifTest&&w["a"].vrEnabled?this.triggerTargetEvent():w["a"].vrEnabled&&(this.setObjectQuaternion(d["objects"].player.cameraControls.activeControl.camera.quaternion,this.alpha,this.beta,this.gamma,this.orient),this.triggerTargetEvent())},this.triggerTargetEvent=function(){var e=this.choseObj(),t=e?e.object:void 0;this.targetEventObj.currentObj=t,t!==this.targetEventObj.lastObj&&(t&&this.autoCursorPosition(e),1===this.type?(this.cursorAnimate&&this.cursorAnimate.stop(),t&&t.enabled&&this.startAnimate(function(){this.clickCallback(t)}.bind(this))):this.type,this.targetEventObj.lastObj=t)},this.choseObj=function(){this.raycaster.setFromCamera({x:0,y:0},i);var e=this.raycaster.intersectObjects(d["objects"].player.model.vrMarkers);if(e.length>0)return e[0]},this.clickCallback=function(e){this.runTHREEAction(e,"onclick")},this.runTHREEAction=function(e,t){switch(t){case"onclick":e._listeners&&e._listeners.click&&e._listeners.click.forEach((function(e){e()}));break;case"onhover":e._listeners&&e._listeners.hover&&e._listeners.hover.forEach((function(e){e()}));break;case"onout":e._listeners&&e._listeners.out&&e._listeners.out.forEach((function(e){e()}))}},this.startAnimate=function(e){this.canStartAnimation&&this.initAnimation(e)},this.initAnimation=function(e){var t=this,i=this.cursor.material.map.offset,n=function(e){return Math.floor(17*e)/17};t.canStartAnimation=!1,this.cursorAnimate=new TWEEN.Tween(i).to({x:1},1e3).onStart((function(){t.canStartAnimation=!1})).onStop((function(){t.canStartAnimation=!0,this.x=0,i.x=0})).onUpdate((function(){})).onComplete((function(){e(),i.x=0,setTimeout((function(){t.canStartAnimation=!0}),1500)})),this.cursorAnimate.easing(n),this.cursorAnimate.start()},this.autoCursorPosition=function(e){var t=Math.abs(e.distance-10);this.cursor.position.z=-t,t/=10,this.cursor.scale.set(t,t,t)}},A=function(e,t,i){var n=new O(i);window.VRCamera=n,n.bananaAspect=.8,this.width,this.height,this.name="vrRenderer";var o=this;this.setSize=function(t,i){e.setSize.call(this,t,i,!1),o.width=t,o.height=i},this.render=function(t,i,o,a){var r,s;if(i.__RESS__SKIP__STEREO__)return e.render(t,i,o,a);if("PerspectiveCamera"===i.type)r=n.cameraL,s=n.cameraR,t.updateMatrixWorld(),null===i.parent&&i.updateMatrixWorld(),n.vrCameraUpdate(i);else{if("OrthographicCamera"!==i.type)return DEBUG&&console.error("Unsupported renderer: ",i.type);r=s=i}e.setScissorTest(!0),e.setScissor(0,0,this.width/2,this.height),e.setViewport(0,0,this.width/2,this.height),e.render.call(this,t,r,o,a),e.setScissor(this.width/2,0,this.width/2,this.height),e.setViewport(this.width/2,0,this.width/2,this.height),e.render.call(this,t,s,o,a),e.setScissorTest(!1)},this.__proto__={__proto__:e}},O=function(e){this.type="StereoCamera",this._aspect=1,this._overlap=.064,this.cameraL=new THREE.PerspectiveCamera,this.cameraL.layers.enable(0),this.cameraL.near=.01,this.cameraL.matrixAutoUpdate=!1,this.cameraR=new THREE.PerspectiveCamera,this.cameraR.layers.enable(0),this.cameraR.near=.01,this.cameraR.matrixAutoUpdate=!1,this.eyeRight=new THREE.Matrix4,this.eyeLeft=new THREE.Matrix4,this.vrCameraNeedsUpdate=!0,Object.defineProperty(this,"bananaAspect",{get:function(){return this._aspect},set:function(e){this._aspect!==e&&(this.vrCameraNeedsUpdate=!0),this._aspect=e}}),Object.defineProperty(this,"overlap",{get:function(){return this._overlap},set:function(e){this._overlap!==e&&(this.vrCameraNeedsUpdate=!0),this._overlap=e}}),this.vrCameraUpdate=function(e){if(this.vrCameraNeedsUpdate=this.vrCameraNeedsUpdate||this.bananaFov!==e.fov||this.bananaReal_aspect!==e.aspect*this.bananaAspect||this.bananaNear!==e.near||this.bananaFar!==e.far,this.vrCameraNeedsUpdate){this.vrCameraNeedsUpdate=!1,console.debug("vrCameraUpdate"),this.bananaFocus=e.focus,this.bananaFov=50,this.bananaReal_aspect=e.aspect*this.bananaAspect,this.bananaNear=e.near,this.bananaFar=e.far,console.debug(e.aspect),this.bananaFocus=10;var t,i,n=e.projectionMatrix.clone(),o=this.overlap/2,a=o*this.bananaNear/this.bananaFocus,r=this.bananaNear*Math.tan(Math.PI/180*this.bananaFov*.5);this.eyeLeft.elements[12]=-o,this.eyeRight.elements[12]=o,t=-r*this.bananaReal_aspect+a,i=r*this.bananaReal_aspect+a,n.elements[0]=2*this.bananaNear/(i-t),n.elements[8]=(i+t)/(i-t),this.cameraL.projectionMatrix.copy(n),t=-r*this.bananaReal_aspect-a,i=r*this.bananaReal_aspect-a,n.elements[0]=2*this.bananaNear/(i-t),n.elements[8]=(i+t)/(i-t),this.cameraR.projectionMatrix.copy(n)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(this.eyeLeft),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(this.eyeRight)}},C=function(e){var t=new THREE.TextureLoader;return t.crossOrigin="anonymous",t.load(e)};T["a"].on("orientation",(function(){console.log("vr orientation ".concat(window.orientation)),0==window.orientation||180==window.orientation?w["a"].vrSplitScreen=!1:w["a"].vrSplitScreen=!0}));var D=k;function V(e){var t=I();return function(){var i,n=Object(c["a"])(e);if(t){var o=Object(c["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(l["a"])(this,i)}}function I(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var j=new THREE.RawShaderMaterial({fragmentShader:v["a"].skysphere.fragmentShader,vertexShader:v["a"].skysphere.vertexShader,uniforms:THREE.UniformsUtils.clone(v["a"].skysphere.uniforms),side:THREE.BackSide,name:"skysphereBG"}),L=function(e){Object(s["a"])(i,e);var t=V(i);function i(e){var n;return Object(o["a"])(this,i),n=t.call(this),Object(u["a"])(Object(r["a"])(n),"updateScreenSize",function(){var e,t,i;return function(n){var o,a,r,s=!1;n&&!n.resize&&void 0!=n.width&&void 0!=n.height?(a=n.width,r=n.height,s=!0,o=1):(a=$("#player").width(),r=$("#player").height(),n&&n.resize&&(e=this.renderWidth,t=this.renderHeight),(a!==e||r!==t||this.forceUpdateSize||i!=window.devicePixelRatio)&&(e=a,t=r,s=!0,i=window.devicePixelRatio,o=b["a"].isMobile?Math.min(window.devicePixelRatio,2):window.devicePixelRatio)),s&&(this.setSize(a,r,o),this.forceUpdateSize=!1)}}()),Object(u["a"])(Object(r["a"])(n),"getImageData",function(){var e=document.createElement("canvas"),t=e.getContext("2d");return function(i,n,o){return e.width===n&&e.height===o||(e.width=n,e.height=o),t.drawImage(i,0,0,n,o),t.getImageData(0,0,n,o)}}()),Object(u["a"])(Object(r["a"])(n),"renderToCubeMap",function(){var e=!1,t=null,i=null,n=null,o=null,a=null,r=1;return function(s,l,c,u,d,h,p,f,m,g,y,b,w,E,T,P){var x=this.oldRenderer||this.renderer;e||(i=new THREE.OrthographicCamera(r/-2,r/2,r/2,r/-2,-200,200),i.position.z=150,t=new THREE.Scene,t.add(i),n=new THREE.ShaderMaterial({uniforms:{tDiffuse:{type:"scene",value:null},alpha:{type:"startYinTile",value:1}},vertexShader:v["a"].basicTextured.vertexShader,fragmentShader:v["a"].basicTextured.fragmentShader,depthWrite:!1,depthTest:!1,side:THREE.DoubleSide}),o=new THREE.PlaneBufferGeometry(r,r),a=new THREE.Mesh(o,n),a.position.z=0,t.add(a),e=!0);var k=o.getAttribute("uv");k.setDynamic(!0),k.needsUpdate=!0;var R=k.array,_=d/c,S=h/u,M=p/c,A=f/u;R[0]=_,R[1]=S+A,R[2]=_+M,R[3]=S+A,R[4]=_,R[5]=S,R[6]=_+M,R[7]=S;var O=o.getAttribute("position");O.setDynamic(!0),O.needsUpdate=!0;var C=O.array,D=m/l.width-r/2,V=g/l.height-r/2,I=y/l.width,j=b/l.height;C[0]=D,C[1]=V+j,C[3]=D+I,C[4]=V+j,C[6]=D,C[7]=V,C[9]=D+I,C[10]=V,x.properties.get(t),n.uniforms.tDiffuse.value=s,n.blending=E||THREE.NoBlending,n.transparent=!!T,void 0!==P&&null!==P||(P=1),n.uniforms.alpha.value=P,n.needUpdate=!0,l.activeCubeFace=w,l.viewport.set(0,0,l.width,l.height);var L=x.autoClear;x.autoClear=!1,x.render(t,i,l,!1),x.autoClear=L}}()),Object(u["a"])(Object(r["a"])(n),"copyCubeMap",function(){var e=!1,t=null,i=null,n=null,o=null,a=null,r=new THREE.Euler;return function(s,l,c,u,d,h,p,f,m){if(!(d>this.qualityManager.maxRenderTargetSize)){if(!e){var g=2;i=new THREE.OrthographicCamera(g/-2,g/2,g/2,g/-2,0,200),i.position.set(0,0,0),t=new THREE.Scene,t.add(i),n=new THREE.ShaderMaterial({uniforms:{tDiffuse:{type:"t",value:null},alpha:{type:"f",value:1}},vertexShader:v["a"].copyCubeMap.vertexShader,fragmentShader:v["a"].copyCubeMap.fragmentShader,depthWrite:!1,depthTest:!1,side:THREE.DoubleSide}),o=new THREE.BoxGeometry(g,g,g),a=new THREE.Mesh(o,n),t.add(a),e=!0}for(var y=0;y<6;y++)this.getCubeOrientationForCubeFace(y,r),a.rotation.copy(r),a.matrixWorldNeedsUpdate=!0,a.updateMatrixWorld(),n.uniforms.tDiffuse.value=s,n.blending=p||THREE.NoBlending,n.transparent=!!f,void 0!==m&&null!==m||(m=1),n.uniforms.alpha.value=m,n.needUpdate=!0,l.activeCubeFace=y,l.viewport.set(0,0,d,h),this.renderer.render(t,i,l,!1)}}}()),n.dom=null,n.scene=null,n.camera=null,n.light=null,n.renderer=null,n.effects=h["a"],n.animateCallback=null,n.composer=null,n.updateClock=new THREE.Clock,n.components=[],n.updateListeners=[],n.resizeListeners=[],n.forceUpdateSize=!1,n.started=!1,n.textures={},n.suspendedObjects=[],n.vrMode=!1,n.debug=m["a"].urlHasValue("debug")||m["a"].urlHasValue("vlog"),n.debug&&"undefined"!=typeof Stats&&(n.stats=new Stats),n.targetList={},n.index=e||0,n}return Object(a["a"])(i,[{key:"createScene",value:function(){this.camera=new THREE.PerspectiveCamera,this.camera.layers.enable(p["a"].PANOMARKERS),this.camera.layers.enable(p["a"].RETICULE),this.camera.layers.enable(p["a"].TAG),this.camera.position.set(0,5,20),this.camera.lookAt(0,0,0),this.scene=new THREE.Scene,this.light=new THREE.AmbientLight(16777215),this.scene.add(this.light);var e=new THREE.DirectionalLight(16777215,1);e.position.set(1,10,1).normalize(),this.scene.add(e),this.scene.skyboxBG=new THREE.Mesh(new THREE.SphereBufferGeometry(2500,20,5),j),this.scene.add(this.scene.skyboxBG)}},{key:"addComponent",value:function(e){this.components.push(e),e.update&&this.updateListeners.push(e),e.setSize&&(this.resizeListeners.push(e),this.forceUpdateSize=!0)}},{key:"removeComponent",value:function(e){var t=function(t){return t!==e};this.components=this.components.filter(t),this.updateListeners=this.updateListeners.filter(t),this.resizeListeners=this.resizeListeners.filter(t)}},{key:"start",value:function(e){if(this.started)throw new y["a"]("Can't start SceneRenderer, already started");this.createContext(e),D.Init(this),this.initComposer(),this.started=!0,(this.animate=this.animate.bind(this))()}},{key:"reStart",value:function(){this.started||(this.started=!0,(this.animate=this.animate.bind(this))())}},{key:"createContext",value:function(e){try{this.dom=e,this.renderer=new THREE.WebGLRenderer({antialias:b["a"].antialias}),this.renderer.autoClear=!0,this.renderer.setPixelRatio(window.devicePixelRatio?window.devicePixelRatio:1),this.renderer.domElement.setAttribute("name","player"),this.emit(f["a"].ContextCreated)}catch(t){throw new RendererCreationException("Unable to create a WebGL rendering context")}console.log(this.renderer.capabilities),e.appendChild(this.renderer.domElement),this.debug&&e.appendChild(this.stats.dom)}},{key:"initComposer",value:function(){this.composer=new THREE.EffectComposer(this.renderer),this.composer.addPass(new THREE.RenderPass(this.scene,this.camera)),this.composer.addPass(this.effects.hblurPass),this.composer.addPass(this.effects.vblurPass)}},{key:"setSize",value:function(e,t,i){this.renderWidth=e,this.renderHeight=t,this.effects.aspect=e/t,this.renderer.setSize(e,t,!1,i),this.composer.setSize(e,t);for(var n=0;n<this.resizeListeners.length;n++)this.resizeListeners[n].setSize(e,t)}},{key:"render",value:function(){this.effects.currentBlur>0?this.composer.render():this.renderer.render(this.scene,this.camera)}},{key:"updateComponents",value:function(){for(var e=Math.min(1,this.updateClock.getDelta()),t=0;t<this.updateListeners.length;t++)this.updateListeners[t].update(e)}},{key:"suspend",value:function(){this.started=!1,this.suspendedObjects=this.scene.children.map(function(e){return this.scene.remove(e),e}.bind(this)),this.render()}},{key:"resume",value:function(){this.suspendedObjects.forEach(function(e){this.scene.add(e)}.bind(this)),this.suspendedObjects=[],this.started=!0,this.animate()}},{key:"animate",value:function(){this.started&&(window.requestAnimationFrame(this.animate),this.updateScreenSize(),this.updateComponents(),this.render(),this.emit(f["a"].AfterRender),this.debug&&this.stats.update())}},{key:"initSizedTexture2D",value:function(e,t,i){var n=this.renderer,o=n.context,a=n.state,r=new THREE.Texture(null);r.flipY=!1,!0!==i&&(i=!1),r.generateMipmaps=i;var s=n.paramThreeToGL(r.format),l=n.paramThreeToGL(r.type),c=n.properties.get(r),u=o.createTexture();a.bindTexture(o.TEXTURE_2D,u),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,r.flipY),o.texImage2D(o.TEXTURE_2D,0,s,e,e,0,s,l,null),r.wrapS=t,r.wrapT=t;var d=n.paramThreeToGL(t);return o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,d),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,d),i?(r.magFilter=THREE.LinearFilter,r.minFilter=THREE.LinearMipMapLinearFilter,o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR_MIPMAP_NEAREST),o.generateMipmap(o.TEXTURE_2D)):(r.magFilter=THREE.LinearFilter,r.minFilter=THREE.LinearFilter,o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR)),a.bindTexture(o.TEXTURE_2D,null),c.__webglTexture=u,r}},{key:"deallocateCubeTexture",value:function(e){var t=this.renderer,i=t.context,n=t.properties.get(e);i.deleteTexture(n.__image__webglTextureCube)}},{key:"uploadTexture2D",value:function(e,t,i,n,o,a){var r=this.renderer,s=r.context,l=r.state,c=r.properties.get(t);l.bindTexture(s.TEXTURE_2D,c.__webglTexture),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,t.flipY),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.premultiplyAlpha),s.pixelStorei(s.UNPACK_ALIGNMENT,t.unpackAlignment),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,r.paramThreeToGL(t.wrapS)),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,r.paramThreeToGL(t.wrapT)),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MAG_FILTER,r.paramThreeToGL(t.magFilter)),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,r.paramThreeToGL(t.minFilter)),s.texSubImage2D(s.TEXTURE_2D,0,i,n,s.RGBA,s.UNSIGNED_BYTE,e),t.generateMipmaps&&s.generateMipmap(s.TEXTURE_2D),l.bindTexture(s.TEXTURE_2D,null)}},{key:"getCubeOrientationForCubeFace",value:function(e,t){switch(e){case g["a"].GL_TEXTURE_CUBE_MAP_POSITIVE_X:t.set(0,-Math.PI/2,0);break;case g["a"].GL_TEXTURE_CUBE_MAP_NEGATIVE_X:t.set(0,Math.PI/2,0);break;case g["a"].GL_TEXTURE_CUBE_MAP_POSITIVE_Y:t.set(Math.PI/2,Math.PI,0);break;case g["a"].GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:t.set(-Math.PI/2,Math.PI,0);break;case g["a"].GL_TEXTURE_CUBE_MAP_POSITIVE_Z:t.set(0,-Math.PI,0);break;case g["a"].GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:t.set(0,0,0)}}}]),i}(d["default"])},dfd6:function(e,t,i){"use strict";var n=i("6860"),o=(i("349f"),i("bc19")),a=i("fc0a"),r={getPlayDataItem:function(e){var t=n["store"].getters["guide/plays"];if(!t[e])return null;var i=JSON.parse(JSON.stringify(t[e].value));return i.speed=t[e].speed,i.transType=t[e].transType,i.pos=new THREE.Vector3(i.pos.x,i.pos.y,i.pos.z),i.target&&(i.target=new THREE.Vector3(i.target.x,i.target.y,i.target.z)),i.ePos&&(i.ePos=new THREE.Vector3(i.ePos.x,i.ePos.y,i.ePos.z)),i.qua=new THREE.Quaternion(i.qua._x,i.qua._y,i.qua._z,i.qua._w),i.eQua&&(i.eQua=new THREE.Quaternion(i.eQua._x,i.eQua._y,i.eQua._z,i.eQua._w)),i},getPlayDataItem2:function(e){var t=n["store"].getters["guide/plays"];if(!t[e])return null;var i=t[e];return i},getTime:function(e){var t=n["objects"].sceneRenderer.updateClock.elapsedTime-e;return o["a"].toPrecision(t,4)},convertHighlight:function(e){var t={};return t.cameraMode=e.mode,t.floorVisibility=[],t.orthoZoom=-1,t.panoId=e.pano,t.position=new THREE.Vector3(e.pos.x,e.pos.y,e.pos.z),t.quaternion=(new THREE.Quaternion).copy(e.qua),t},createThumb:function(e,t){var i={tasks:{unFish:[{width:130,height:130}]},dontflash:!0,snapshotTopview:!0,f:function(i){var o=n["store"].getters["guide/thumbs"],a=n["store"].getters["guide/plays"];"undefined"===typeof t&&(t=a.length-1);var r={index:t};r[e+"_url"]=i,o["first"==e?"thumbs1":"thumbs2"][t]?n["store"].commit("guide/SetThumb",r):n["store"].commit("guide/AddThumb",r)}};Object(a["a"])(i)}};t["a"]=r},e13f:function(e,t){e.exports={menu:{__name:"菜单",music:"BGM",base:"Basic Setting",information:"Scene Info",screen:"Scene Cover",hotspot:"Add Hotspot",guide:"Tour Guide",sign:"Spot Logo",walk:"Roaming Possibility",model:"Model Edit",cad:"FloorPlan",data:"3rd Party",custom:"Upload Download",videos:"Add Videos","":"Scene Video",vrhouse:"VR house",business:"Business part",scene:"Scene transition",video:"Add video",decor:"Decor",link:"Scene associate"},modules:{__name:"模块",base:{__name:"基础设置",qrcode:"QR Code",qrcode_download:"Download the QR code",qrcode_tips:"Custom logo",scene_link:"Scene Link",scene_link_copy:"Copy the link",scene_link_copy_tips:"Copied",bgm:"BGM",pano_text:"Roaming",mode_2d_text:"Layout Plan",mode_3d_text:"3D Model",map_text:"Mini-map",vr_text:"VR Mode",vr_tips:"Please view the VR effect on the mobile display page",guide_text:"Tour Guide",rule_text:"Measurements",cad_text:"Floor Layout",measure_text:"Ruler",measure_tips:"The measuring function cannot be used in edit mode, please use it on display page",turned_vr:"VR turned {status}",turned_map:"Mini-map feature {status}",turned_cad:"Layout plan {status}",turned_m2d:"Plane view {status}",turned_m3d:"3D view {status}",turned_pano:"Roaming view {status}",turned_rule:"Measuring function {status}",turned_guide:"Tour guide {status}",turned_measure:"Ruler {status}",shortcut_copy:"One-click copy",share_link:"Share links to friends",measure_show_tips:"Please use the measuring function on the display page",delete_measure_line:"Delete measurement line",please_click_tips:"'Please click“allow”'",vr_fail_app_tips:"The browser failed to detect the rotation. Please enable the settings such as motion and direction access in the phone or browser settings, and then refresh this page.",vr_fail_safari_tips:'The browser failed to detect the rotation. To fully experience the VR effect, please open the "Motion and Direction Access" switch under "Settings"> "Safari"> "Privacy and Security", and then refresh this page.',loading_bottom_text:"4Dage provides technical support",vr_fail_reopen_tips:"Can't access motion and orientation, please restart App and try again.",add_music_title:"Add BGM",add_music_tips:"Support MP3, WAV and other audio formats, no more than 5MB",re_add_music:"Re-add",re_add_title:"Re-add BGM",re_add_tips:"The latest music will replace the added music, <br>Are you sure to continue adding?",re_add_mobile_tips:"Re-adding will replace the added music",delete_tips:"Are you sure to delete the current BGM?",delete_title:"Delete BGM",bgm_empty_tips:"Please select BGM",wechat:"Wechat",friend_circle:"Moments"},information:{__name:"场景信息",title:"Title",title_tips:"Please enter a title",title_require:"Please add a title (max {limit} characters).",description:"Description",description_tips:"Please enter a description.",link:"Add a link",link_text_tips:"Link title",link_href_tips:"Link",link_text_require:"Please fill in the text.",link_href_require:"Please fill in the link.",classify:"Choose a category",upload_time:"Upload date",record:"Not recorded",shoot_count:"Number of shots",password:"Set a password",password_tips:"4 characters",password_desc:"Set a password if you don't want it to be accessible for the public.",password_require:"Please enter a password with {limit} digits",logo_edit:"Edit the logo",logo_exit:"Finish editting logo",logo_show_bottom:"Show original logo",logo_style1:"Logo style 1",logo_style2:"Logo style 2",logo_delete:"Delete the uploaded logo?"},screen:{__name:"初始画面",current:"Current cover",current_set:"Set as scene cover",tips:"Drag the screen, click and save your scene cover."},hotspot:{__name:"添加热点",add:"Add hotspot",edit:"Edit hotspot",count:"Added hotspots",location:"Hotspot Location",location_tips:"Drag the hotspot to another position.",location_modify:"Modify hotspot location",location_confirm:"Confirm hotspot location",location_desc:"Please drag the hot spot in the two scene areas on the left and align it to the desired point.",style:"Choose hotspot style",style_desc:"Choose the default style, or manually upload the picture to customize the style, upload the picture in PNG/JPG format",style_name:"Style",style_dele:"Sure to delete this style?",style_manage:"Manage",style_exit:"Quit",media_photo:"Add pictures to enrich hot content",media_video:"Upload local videos for more display",media_voice:"Upload local audio content for hotspot explanation",media_link:"You can add a hyperlink to the video, and the video will be played in the hotspot",title:"Title",title_tips:"Please enter a title",title_require:"Please add a title (max {limit} characters).",description:"Description",description_tips:"Please enter a description.",text_link:"Add a link",text_link_text_tips:"Please fill in the link text",text_link_href_tips:"Please fill in the link address",text_link_text_require:"Link text cannot be empty",text_link_href_require:"Link address cannot be empty",link:"Add a link",link_require:"Please add an external link",photo:"Photo",voice:"Audio",video:"Video",photo_tips:"Support JPG, PNG and other image formats",voice_tips:"Support MP3, WAV and other audio formats",video_tips:"Support MP4 format. <20M",photo_require:"Please add photos",voice_require:"Please add audio",video_require:"Please add videos",m_location_tips1:"Point split-screen hotspots above and below to the marked target",m_location_tips2:"Determine the hotspot location, click next to edit content",m_location_up:"Above",m_location_left:"Left side",m_location_move_tips:"The auxiliary calibration position may be inaccurate,<br>please check and drag to {direction} the same location",set_visible_btn:"Hotspot Visiblity",save_visible_btn:"Save",save_hotspot_done:"Successfully saved hotspot",save_hotspot_fail:"Failed to save hotspot",delete_hotspot_tips:"Do you want to delete the current hotspot?",delete_hotspot_done:"Successfully deleted hotspot",delete_hotspot_fail:"Failed to delete hotspot",cant_add_hotspot_tips:"Unable to add hotspot",cant_add_hotspot_content:"The number of hotspots has reached the maximum: {limit}",link_text_tips:"Link title",link_href_tips:"Link",link_text_require:"Please fill in the text",link_href_require:"Please fill in the link",add_media:"Add Content"},guide:{__name:"自动导览",route:"Tour Route",view:"Switch View",record:"Start recording",record_audio:"Record",pause:"Pause",stop:"Stop",end:"End",delete:"Delete",continue:"Continue recording",preview:"Preview",clear:"Clear",sync:"Audiovisual synchronization",sound:"Record audio",file:"Upload audio",file_add:"Add audio",tips:'Click "Start" to record the tour.',start:"Start",finish:"Finish",less:"Less",replace_tips:"Do you want to start over the tour recording?",replace_content:"Redo the recording will overwrite previous data.",sound_open_fail_tips:"Failed to turn on the microphone",sound_tips:"Failed to turn on the microphone, continue recording?",sound_content:"Please allow this site to use the microphone in your browser settings and refresh the page.",upload_sound_done:"Upload sound explanation successfully",upload_sound_fail:"Failed to upload sound explanation",delete_sound_done:"Delete sound explanation successfully",delete_sound_fail:"Failed to delete sound explanation",room_title:"Title",room_title_tips:"Please enter the room title",room_title_require:"Please enter a title",room_panel_title:"Guide information",room_sound_title:"Record audio",delete_video_content:"Your current recording will be deleted",delete_file_content:"Your currently uploaded sound explanation will be deleted",delete_sound_content:"Your recorded audio will be deleted",camera_save_success:"Successfully saved camera",clear_video_tip:"Your current recording will be cleared",saving_sound:"Saving recording",save_sound_done:"Successfully saved recording",save_sound_fail:"Failed to save recording",no_sound_tips:"Currently does not support recordig.<br>Please record on WeChat or computer",sound_success_tips:"Successfully opened the microphone",sound_fail_tips:"Currently does not support recording.<br>Official account information configuration error",wechat_sound_fail_tips:"Failed to open WeChat microphone",open_sound_guide_tips:"If you want to record, please enable it in the WeChat settings-privacy-authorization management. And ensure that the recording equipment is normal",sound_cant_open_tips:"This browser does not support recording. <br>It is recommended to replace other mainstream browsers for a better experience",replace_sound_tips:"Re-record?",replace_sound_content:"Current sound explanation will be replaced",merge_sound_fail:"Fail to merge sound explanation",sound_limit:"The recording duration cannot exceed {time} minutes",select_to_record:"Please select the corresponding point to record the guide in this area"},sign:{title:"Logo style",size:"Size",style0:"Style one",style1:"Style two",style2:"Style three",style3:"Upload"},walk:{title:"Roaming Possibility",tips1:"Further optimize the experience during roaming by setting roaming possibility, such as cases in which one may penetrate through the walls. ",tips2:"Set the roaming possibility by clicking and setting the connection of each roaming point.",save:"Save current settings",hide:"Hide the spot",show:"Show the spot",pano_tips:"Tip: You hide the initial point, so you can't roam in this scene.",legends_title:"Icon title",legends_show_curr_tips:"Current point",legends_selected_tips:"Connected",legends_unselected_tips:"Unconnected",legends_hide_unselected_tips:"Hidden",legends_m_title:"Multi-floor",legends_m_connect_tips:"Stairs point"},model:{__name:"3D模型",cad:"CAD View",cad_download:"FloorPlan Download",view:"Switch View",title:"Add structure",title_door:"Doors and windows",title_component:"Components",title_other:"Others",attribute:"Attributes",door:"Door",double_door:"double_door",slideDoor:"Slidedoor",casement:"Window",bayCase:"Bay Window",groundCase:"French Sash",column:"Column",furnColumn:"Frame Column",furnFlue:"Flue",point:"Point",line:"Interior Wall",tagging:"Tag",tagging_name_tips:"Tag name",tagging_area_tips:"Enter area",direction:"Compass",wallLine:"Interior wall",widget_delete:"{widget} will be deleted",panel_btn_default:"Reset",panel_btn_delete:"Delete",attr_img:"Thumbnail (Display Unavailable)",attr_enter_btn:"Settings",attr_out_btn:"Exit",attr_not_select_img:"Select the areas name",attr_un_img:"No Image Available",attr_angle:"Rotation angle",attr_within:"Flip direction",attr_direWithin:"Entrance face",attr_ewidth:"Width",attr_eheight:"Height",attr_tick:"Tickness",attr_showTitle:"Tag name",attr_showContent:"Tag area",attr_top:"Top",attr_bottom:"Bottom",attr_estart:"Entry door",success:"Add successfully {widget}",error_location:"Current location cannot be added {widget}",error_outdoor:"Outdoor cannot be added {widget}",error_something:"Building at the current location cannot be added {widget}",error_widget:"Current location cannot be added {widget}",enter_adjust_floor:"Ground adjustment",exit_adjust_floor:"Exit adjustment mode",color_title:"Protractor Color:"},cad:{__name:"户型图",name:"FloorPlan",no_tip:"Don't remind again",reset:"Reset",cad_download:"Download FloorPlan",cad_download_ing:"Downloading...",label_tip:"Right click or Esc to exit.",wall_tip:"Right click or Esc to exit.",save_undf_tip:" data is empty. Unable to save the empty floor plan.",reload_tip:"This operation will clear all the floor plan. Do you want to continue?",reset_tip:"This operation will clear the current floor plan. Do you want to continue?",title_door:"Doors and windows",title_component:"Construct",title_wall:"Painting The Wall",title_other:"Label",border_wall:"Facade",doorleaf:"Doorway",wall:"Inner Wall",attribute:"Attributes",door:"Door",slideDoor:"Slidedoor",doubleDoor:"Double Door",casement:"Window",bayCase:"Bay Window",groundCase:"French Sash",column:"Column",furnColumn:"Frame Column",furnFlue:"Flue",point:"Point",stair:"Stairs",line:"Interior Wall",tagging:"Tag",un_data_tip:"Unable to download the empty floor plan.please draw it first.",taggings:"Tags",tagging_name_tips:"Tag name",tagging_custom_name_tips:"Custom Name",tagging_area_tips:"Enter area",direction:"Compass",wallLine:"Interior wall",widget_delete:"{widget} will be deleted",panel_btn_default:"Reset",panel_btn_delete:"Delete",attr_angle:"Rotation angle",attr_within:"Flip direction",attr_ewidth:"Width",attr_eheight:"Height",attr_direWithin:"Entrance face",attr_tick:"Tickness",attr_showTitle:"Tag name",attr_showContent:"Tag area",attr_top:"Top",attr_bottom:"Bottom",attr_estart:"Entry door",success:"Add successfully {widget}",error_location:"Current location cannot be added {widget}",error_outdoor:"Outdoor cannot be added {widget}",error_something:"Building at the current location cannot be added {widget}",error_widget:"Current location cannot be added {widget}",enter_adjust_floor:"Ground adjustment",exit_adjust_floor:"Exit adjustment mode",color_title:"Protractor Color:",hall_tests:"Entrance,Bathroom,Aisle,Kitchen,Garage,Garden,Balcony",room_tests:"Master Bedroom,Guest Bedroom,Study Room,Storeroom,Cloakroom,Elderly Room,Children Room,Pet Room",other_tests:"Living Room,Dining Room,Kitchen Balcony",rotate:"Rotate",rotate_ing:"Rotating…",floor_name_tips:"Please input floor name.",show_image:"Show image",show_panos:"Show roaming point"},videos:{__name:"添加视频",tips:"Please click on the reference plane to set the video position.",panel_title:"Video attributes",panel_preview:"Preview",panel_upload:"Upload",panel_upload_tips:"Support MP4 format",panel_move:"Move",panel_zoom:"Zoom",panel_thickness:"Tickness",recoverRatio:"Restore original aspect ratio",recoverRatioTip:"Restore original aspect ratio of the video",upload_tips:"Please upload the video"},custom:{model_title:"Download model",uploading:"Uploading…",download:"Original model download",download_panos:"Download panos",upload:"Modified model upload",title1:"Model download/upload tutorial",repairTitle:"When the panoramic video has chromatic aberration, you can use <i class='iconfont iconfloor_rename'></i> to optimize it. If you need to download a video with chromatic aberration, please repair the video before downloading, otherwise it will not take effect.",tips11:"1.After downloading the ZIP package of the scene model, open the decompressed file”mesh.obj” to edit it.",tips12:"2.After the edit is completed, it is recommended to render the model texture. The render texture should be controlled within 1.5M while the saved obj files should be controlled within 3M.",tips13:"3.After completing steps 1 and 2, package the obj, mtl, and texture into a zip package and upload it.",title2:"Notes:",tips21:"1.Please control the file size, in order not to freeze when you are browsing which will affect your experience.",tips22:"2.Please use the same name in both obj and ZIP package, otherwise the replacement will fail.",get_image_fail:"Failed to get image. Please check your network settings and try again.",download_model_fail:"Fail to download model",reupload_tips:"Upload {type}",panoramic_upload:"Pano Upload",panoramic_upload_tips:"Panorama upload",panoramic_upload_box_tips:"Please upload JPG image<br>with corresponding point name.",panoramic_download:"Pano Download",panoramic_download_tips:"Panorama download",panoramic:"Panorama",ball_video:"Video",ball_video_upload_tips:"Video Upload",ball_video_download_tips:"Video Download",ball_video_upload_box_tips:"The panoramic video supports MP4 format<br>which should not exceed 1024M.",upload_title:"Upload files",upload_format_error:"File format error, please upload again",upload_name_error:"File name error, please upload again",upload_success:"The upload is successful and will take effect<br>after saving and publishing",upload_code_5017:"Failed to upload the model, <br>please refer tothe tutorial on the right",upload_code_5018:"The zip file can only have<br>one level of directory or no directory",upload_code_5019:"There must be only one obj and mtl file",upload_code_5020:"The texture needs to be controlled within 1.5M, and the obj file needs to be controlled within 20M",upload_code_5012:"The data is abnormal",upload_code_5023:"The upload file format is incorrect, <br>only jpg or mp4 format.",download_tips:"Download {type}",download_fail:"Failed to download",yes:"Yes",no:"No",repair:"Repair",repair_cancel:"Cancel",repairing:"Repairing...",repair_complete_text:"The panoramic video [{video_name}] has been repaired. Please click Refresh to view it.",refresh_now:"Refresh now",hasPreson_text:"Are the individual being captured in the video?",click_repair:"Please click [Repair].",wait_repair:"Waiting for Repair",repair_tip_text:"Please drag the edge of the dotted line frame, adjust its size to capture the frame. Verify that the individual in the entire video is within the dotted line frame, then click [Repair].",repair_confirm_title:"Please confirm that the individual is within the dotted line frame.",repair_confirm_text:"Please make sure that the individual in the entire video is within the dotted line frame due to the Repair cannot be undone. Click [Confirm] to start repairing immediately. ",check_back:"Back",check_confirm:"Comfirm the repair?",confirm_repair:"Confirm",cancel_repair:"Cancel",repairing_time:"The panoramic video [{video_name}] is being repaired in the background,please be patient."},vrhouse:{__name:"VR看房",linkto_management:"Go to the VR house management background",refer:"Refresh",scene_link:"Scene Link"},business:{__name:"商圈模块",list_title:"The hot-spots list",list_unf:"No hot-spots in this current scene",add_tip_info:"Please add hot-spots first then bind them.",linkto_management:"Management background",refer:"Refresh",scene_link:"Copy link",explain:"How to use",shopexplain:{1:"The current product data comes from the 4DKanKan-E-commerce which bound to the scene, if you need to add, ",2:"please click here."},select_style:"Select hot-spot type",join_info:"Add product information",add_com:"Add product",join_info_show:"The product will display in the hot-spot",select_com:"Select goods"},link:{__name:"跳转关联",title1:"Save the link",title2:"Edit the link",title3:"Panorama association",list_text:"Added links",btn_new_text:"Add a link",btn_add_title:"Positioning the connection point",btn_add_text:"Determine the connection point position",btn_add_desc:"Mark and drag the connection point to the suitable position",btn_edit_text:"Adjust the link position",style:"Link icon",style_name:"icon",style_desc:"upport customized icon with recommended size of 128*128 pixels. Support JPG/PNG format.",style_dele:"Delete this icon? <br /> The same icon used for other links will also be deleted.",desc_title:"Description",desc_tips:"Please enter a description.",desc_require:"Please enter a description.",type:"Choose the type of link",type_photo:"upport uploading panoramic pictures with an aspect ratio of 2:1, recommended pixel size should not be less than 6000 × 3000 pixels, and the file should not exceed 120M",type_photo_require:"Upload panoramic pictures.",type_link:"Please input the scene link.",type_link_tips:"Please enter the link of the scene to jump",type_link_require:"Please input the scene link.",enter_title:"Link cover",enter_require:"Please set a link cover",enter_btn_text:"Set a link cover",outer_title:"Exit spot position",outer_style:"Exit spot icon",outer_desc:"Support customized icon with recommended size of 128*128 pixels. Support JPG/PNG format.",outer_require:"Please set the position of exit spot.",outer_btn_text:"Set the position of exit spot.",links_title:"Select the panorama",links_tips:"Select the panorama and drag it to the corresponding position on the left to set the jump.",links_cancel_tips:"Cancel association settings"},"":{add:"Add scene video",list_title:"Scene video already added",panel_title:"Video Attributes",pano_id:"Point ID",pano_hide_tips:"该漫游点已设置隐藏,无法编辑",panel_upload:"Upload video",remark:"Note: the video requires a WEBM format with transparent background, the size does not exceed 50M, and the pixel requirements are within 2048*2048",file_error:"视频文件格式不正确,只支持WEBM格式,请重新上传。",pano_has_video:"The panoramic video already exists at this<br />this specific point, and it is not allowed to add",pano_has_:"The scene video already exists at this<br />specific point, and it is not allowed to add"}},login:{__name:"登录",title:"Message",login:"Log In",logon:"Log in and continue",login_tips:"You are not logged in. Please log in to edit."},common:{__name:"公用",on:"on",off:"off",add:"Add",set:"OK",ok:"OK",save:"Save",cancel:"Cancel",complete:"Complete",all:"All",edit:"Modify",giveup:"Give up",commit:"Commit",photo:"Photo",voice:"Audio",video:"Video",bgm:"BGM",crop:"Crop",upload:"Upload",download:"Download",change:"Change",unnamed:"Unnamed",publish:"Save and publish",publish_text:"Save and publish successfully!",publish_tips:"Check your scene immediately?",publish_btn_ok:"Now",publish_btn_no:"Later",public:"Public",private:"Private",waiting:"Waiting...",audio:"Audio",second:"s",delete:"Delete",prev:"Go back",next:"Next",meter:"≈{meter}m",guide:"Tour Guide",rule:"Ruler",roaming:"Roaming",continue:"Continue",ensure_delete:"Delete",text_limit:"Limit within {limit} characters",default:"Default",custom:"Customize",back:"Back",will_delete:"Will be deleted",setup:"Set",exit:"Done",size:"Size",floor:"Floor",rename:"Rename",buyvip:"Buy now",buyvip_expired:"Renew",buyvip_tips:"Please make sure that the camera that has this shooting scene has already authorized with the Membership Subscription.",buyvip_expired_tips:"Your Membership Subscription has expired, you are able to use this function after renewal.",vip_transition_tips:"We will launch the Membership Subscription officially starting on September 1st, 2021. Users will no longer enjoy the 'Custom Logo' if they haven't completed the Membership Subscription payments. Click viewing detail to learn more about the Membership Subscription.",music:{__name:"背景音乐",none:"No music",cheerfu:"Cheerful",ethereal:"Ethereal",rhythmic:"Rhythmic",nostalgic:"Nostalgic",missing:"Missing",retro:"Retro",strings:"Strings",happy:"Happy"},category:{__name:"分类",museum:"Museum",estate:"Real estate",eshop:"E-Commerce",catering:"Catering",other:"Other",home:"Home"},uploads:{__name:"文件上传",uploading:"Uploading",uploaded:"Uploaded",wait:"Wait...",error:"Error",add:"Add",start:"Start",file_require:"Please add file",file_error:"格式不正确",cant_upload:"Your browser does not support uploading files",not_support:"The file you selected is not {fileType} supported by the browser, please select again",too_large:"The file is too large and cannot be larger than {size} trillion",too_large_reupload_tips:"The uploaded video is too large, please upload again"},tips:{__name:"提示",wait:"Please wait..."}},tips:{__name:"提示",title:"Tip",title2:"Tips",info:"Details",used:"Continue",noremind:"No notify",set_done:"Set up successfully",set_fail:"Set up failed",save_done:"Save successfully",save_fail:"Save failed",delete:"Delete or not?",delete_done:"Delete successfully",delete_fail:"Fail to delete",upload_done:"Upload successfully",upload_fail:"Failed to upload",exception:"Error",network_error:"The internet is disconnected, please try it again",file_notfound:"The file is not found",scene_notfound:"The scene is not found",params_notfound:"The parameter is not found",camera_notfound:"The matched camera is not found",password_error:"Incorrect password",data_error:"The data is not found",auth_deny:"Unathorized to operate the scene",model_deny:"Model already upload, no editing allowed. ",clear:"Sure to clear?",upload_pic_fail:"Failed to upload pictures",wait:"Please waiting...",house_type_save_fail:"Failed to save house type"},show:{__name:"展示页面",on:"On",off:"Off",measure:"Measuring tool",measure_start:"Start",measure_end:"End",measure_button:"Confirm {status}",location_up:"Above",location_left:"Left",location_start_tips:"Please click on {direction}",location_end_tips:"The starting point is determined, please locate the end point",vr:"VR mode",share:"Share it",music:"Music {status}",password_tips:"Password",password_require:"Please enter the password",map_2d:"Floorplans",map_3d:"3D Model",guide:"Dollhouse View",guide_play:"Play",guide_pause:"Continue ",switch_pano:"Roaming",switch_2d:"FloorPlan ",switch_3d:"3D Model"},components:{user_guid:{__name:"用户引导",title:"Operation Tips",pano:"Walk<br />Click to move",rotate:"Roam<br />Swipe the screen to roam the screen to roam",zoom:"Zoom<br />Zoom in or out",set:"Got it"}},rtcLive:{openGuided:"Create a Tour",closeGuided:"Close a Tour",openHotSpot:"Turn on hotspot",closeHotSpot:"Turn off hotspot",createdRoom:"Create a breakout room",browserTip:"It is recommended to use the latest version of the following browsers for calling",inputName:"Please enter your username",cancel:"Cancel",confirm:"Confirm",oneMode:"1V1",moreMode:"Multi-user mode",end:"End",endTip:"Tips",isEnd:"Do you want to turn off the VR Guide immediately?",copyShare:"Copy and Share",shareTitle:"Invite friends",copySuccess:"Link copied successfully",speakSome:"Comment",member:"Participants",leader:"Host",customer:"Me",allMuted:"Mute all participants",allSpeak:"Unmute all participants",roomFull:"The breakout room is full",userJoin:"The host enters the breakout room",enterRoom:"Enter the breakout room",exitRoom:"Exit the breakout room",leaderLeave:"The host has left",leaderSetMuted:"The host is muted you",leaderSetSpeak:"The host is unmuted you",leaderOpenPaint:"The host enables a brush",leaderClosePaint:"The host disable the brush",actionSuccess:"Operation successful",isRemove:" You have been removed",removeSuccess:"Removed successfully",cant_speakSome:"Disable Comments",set_cant_speakSome:"Disable Comments",set_can_speakSome:"Allow comments ",look:"Views",create_VR:"Create VR live streaming",enter_VR:"Enter VR live streaming"}}},e1c1:function(e,t,i){"use strict";i.d(t,"a",(function(){return u}));i("6b54"),i("2397");var n=i("d4ec"),o=i("bee2"),a=i("262e"),r=i("99de"),s=i("7e84");function l(e){var t=c();return function(){var i,n=Object(s["a"])(e);if(t){var o=Object(s["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(r["a"])(this,i)}}function c(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var u=function(e){Object(a["a"])(i,e);var t=l(i);function i(e){var o;return Object(n["a"])(this,i),o=t.call(this),e=e||{},o.position=new THREE.Vector3,o.quaternion=new THREE.Quaternion,o.update(e),o}return Object(o["a"])(i,[{key:"isValid",value:function(){return!!this.cameraMode}},{key:"update",value:function(e){return this.cameraMode=e.cameraMode||this.cameraMode,this.pano=e.pano||this.pano,e.position&&this.position.copy(e.position),e.quaternion&&this.quaternion.copy(e.quaternion),this}}]),i}(EventEmitter)},e278:function(e,t,i){"use strict";var n=i("c923"),o=i.n(n);o.a},e2cf:function(e,t,i){},e53f:function(e,t,i){"use strict";var n=i("9478"),o=i.n(n);o.a},e70e:function(e,t){THREE.EffectComposer=function(e,t){if(this.renderer=e,void 0===t){var i={minFilter:THREE.LinearFilter,magFilter:THREE.LinearFilter,format:THREE.RGBAFormat,stencilBuffer:!1},n=e.getSize();t=new THREE.WebGLRenderTarget(n.width,n.height,i)}this.renderTarget1=t,this.renderTarget2=t.clone(),this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.passes=[],void 0===THREE.CopyShader&&console.error("THREE.EffectComposer relies on THREE.CopyShader"),this.copyPass=new THREE.ShaderPass(THREE.CopyShader)},THREE.EffectComposer.prototype={swapBuffers:function(){var e=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=e},addPass:function(e){this.passes.push(e)},insertPass:function(e,t){this.passes.splice(t,0,e)},render:function(e){this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2;var t,i,n=!1,o=this.passes.length;for(i=0;i<o;i++)if(t=this.passes[i],t.enabled){if(t.render(this.renderer,this.writeBuffer,this.readBuffer,e,n),t.needsSwap){if(n){var a=this.renderer.context;a.stencilFunc(a.NOTEQUAL,1,4294967295),this.copyPass.render(this.renderer,this.writeBuffer,this.readBuffer,e),a.stencilFunc(a.EQUAL,1,4294967295)}this.swapBuffers()}t instanceof THREE.MaskPass?n=!0:t instanceof THREE.ClearMaskPass&&(n=!1)}},reset:function(e){if(void 0===e){var t=this.renderer.getSize();e=this.renderTarget1.clone(),e.setSize(t.width,t.height)}this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.renderTarget1=e,this.renderTarget2=e.clone(),this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2},setSize:function(e,t){this.renderTarget1.setSize(e,t),this.renderTarget2.setSize(e,t)}}},e9e5:function(e,t,i){"use strict";var n={ModelAdded:"model-added",ActiveModelChanged:"active-model-changed"};t["a"]=n},eb02:function(e,t,i){"use strict";i("28a5"),i("ac6a"),i("7f7f"),i("6762"),i("2fdb");var n=i("2b0e"),o=i("2f62"),a=i("b23e"),r=(i("a481"),i("c5f6"),i("365c"));i("386d");var s=i("9923");function l(e){var t=!1,i=0,n=0,o=0;if(!e||!e.length)return[];e.forEach((function(a,r){if(a.time={},!a.value)return a.time.sTime=0,a.time.eTime=0,void(a.time.diff=0);"undefined"===typeof a.speed&&(a.speed=1),"undefined"===typeof a.transType&&(a.transType="default"),"undefined"!=typeof a.value.sTime?a.time.sTime=a.value.sTime:"undefined"!=typeof a.value.startTime?a.time.sTime=a.value.startTime:a.time.sTime=0,a.time.eTime=a.value.eTime,t&&(o=e[r-1].value.eTime,i=e[r-1].time.eTime+(a.value.sTime-o),n=i+(a.value.eTime-a.value.sTime),a.time.sTime=i,a.time.eTime=n),a.time.diff=a.time.eTime-a.time.sTime,a.speed&&1!=a.speed&&(a.time.diff=a.time.diff/a.speed,a.time.eTime=a.time.sTime+a.time.diff,t=!0)}));var a=0;return e.forEach((function(t,i){t.value.wTime?(t.time.sTime+=a,t.time.eTime=a+t.time.eTime+t.value.wTime,t.time.diff=t.time.eTime-t.time.sTime,a+=t.value.wTime):(t.time.sTime+=a,t.time.eTime+=a),i>0&&(e[i-1].time.trans=parseFloat(Number(t.time.sTime-e[i-1].time.eTime).toFixed(4)))})),e}var c=function(e){e.index=0,e.indexView=0,e.plays=[],e.roomLabels=[],e.thumbs.thumbs1=[],e.thumbs.thumbs2=[],e.isUpdate=!0,e.status.isPlaying=!1,e.status.isRecording=!1,e.status.isPlayPausing=!1,e.status.isRecordSounding=!1,e.showTime=0,e.playTime=0,e.recordTime=0,e.soundTime=-1},u={index:0,indexView:0,plays:[],thumbs:{thumbs1:[],thumbs2:[]},roomLabels:[],roomIndex:-1,isUpdate:!1,status:{audio:"soundsync",isPlaying:!1,isRecording:!1,isPlayPausing:!1,isRecordSounding:!1},showTime:0,playTime:0,recordTime:0,soundTime:-1,recordMaxTime:180,medias:{type:"",links:{sync:"",file:"",sound:""},names:{sync:"",file:"",sound:""}},isReplaceSound:!1},d={index:function(e){return e.index},indexView:function(e){return e.indexView},isUpdate:function(e){return e.isUpdate},thumbs:function(e){return{thumbs1:e.thumbs.thumbs1,thumbs2:e.thumbs.thumbs2}},plays:function(e){return e.plays},roomIndex:function(e){return e.roomIndex},roomLabels:function(e){return e.roomLabels},medias:function(e){return e.medias},status:function(e){var t="record";return e.plays.length&&(t="continue"),e.status.isRecording&&(t="pause"),{text:t,audio:e.status.audio,isPlaying:e.status.isPlaying,isPlayPausing:e.status.isPlayPausing,isRecording:e.status.isRecording,isRecordSounding:e.status.isRecordSounding}},hasGuide:function(e){return e.plays.length>0},playTime:function(e){return e.plays.length?e.playTime:0},showTime:function(e){return e.plays.length?(!e.status.isRecording&&e.plays[e.index]&&(e.showTime=Math.ceil(e.plays[e.index].time.sTime)),e.showTime):0},recordTime:function(e){return e.plays.length?(e.plays[e.plays.length-1].time.eTime&&(e.recordTime=Math.ceil(e.plays[e.plays.length-1].time.eTime)),e.recordTime):0},soundTime:function(e){return e.soundTime}},h={namespaced:!0,state:u,getters:d,mutations:{LoadPlays:function(e,t){e.plays=t,l(e.plays);var i=null,n=null,o=0,a=e.plays,r=function(){e.roomLabels.push({id:i.roomId,key:i.roomKey,index:o,label:i.roomLabel,cTime:n.time.eTime-i.time.sTime+(n.time.trans||0),sTime:i.time.sTime,eTime:n.time.eTime,sound:i.roomSound})};e.roomLabels=[];for(var c=0;c<a.length;c++){if(!a[c].roomLabel)break;null==i&&(o=c,i=a[c]),n=a[c+1],a[c].roomId=e.roomLabels.length,n?i.roomKey!=n.roomKey&&(n=a[c],r(),i=null):(n=a[c],r())}if(a.length&&0==e.roomLabels.length){var u=Date.now();a.forEach((function(e){e.roomId=0,e.roomKey=u,e.roomLabel=s["a"].t("common.unnamed")})),i=a[0],n=a[a.length-1],o=0,r()}0==a.length&&(e.roomIndex=-1)},AddPlay:function(e,t){e.plays.push({roomId:e.roomLabels.length,floorId:this.getters["scene/floorId"]}),e.isUpdate=!0,e.index=e.plays.length-1,e.plays[e.plays.length-1].value=t,l(e.plays)},SetPlay:function(e,t){e.isUpdate=!0,e.plays[t.index].value=$.extend(!0,e.plays[t.index].value,JSON.parse(JSON.stringify(t.value))),n["default"].set(e.plays,t.index,e.plays[t.index]),l(e.plays)},SetPlaySpeed:function(e,t){e.isUpdate=!0,e.plays[e.index].speed=t,n["default"].set(e.plays,e.index,e.plays[e.index]),l(e.plays)},SetPlayTrans:function(e,t){e.isUpdate=!0,e.plays[t.index].transType=t.type,n["default"].set(e.plays,t.index,e.plays[t.index]),l(e.plays)},SetPlayValue:function(e,t){e.plays[t.index].value=t.value,l(e.plays)},DelPlayProperty:function(e,t){var i=e.plays[t.index];delete i[t.property]},LoadThumbs:function(e,t){"undefined"===typeof t.length?e.thumbs=t:t.forEach((function(t){e.thumbs.thumbs1.push(t.first_url),e.thumbs.thumbs2.push(t.second_url)}))},AddThumb:function(e,t){t.first_url?e.thumbs.thumbs1.push(t.first_url):t.second_url&&e.thumbs.thumbs2.push(t.second_url)},SetThumb:function(e,t){t.first_url?e.thumbs.thumbs1[t.index]=t.first_url:t.second_url&&(e.thumbs.thumbs2[t.index]=t.second_url)},DelThumb:function(e,t){var n=i("c7b2"),o=n.play;e.thumbs.thumbs1.splice(e.index,t.deleteCount);var a=e.thumbs.thumbs2.splice(e.index,t.deleteCount);t.isMerge&&e.index<e.plays.length-1&&(e.thumbs.thumbs2[e.index-1]=a[a.length-1]),0==e.plays.length?e.index=0:e.index-1>=0&&e.index--,e.isUpdate=!0,e.indexView=0,o.chooseFragment(e.index)},SetIndex:function(e,t){e.index!=t&&(e.index=t,e.indexView=0)},SetStatus:function(e,t){for(var i in t)e.status[i]=t[i],"audio"===i&&(e.isUpdate=!0)},SetPlayTime:function(e,t){e.playTime=t},SetSoundTime:function(e,t){e.soundTime=t},SetUpload:function(e,t){e.upload=t},SetView:function(e,t){e.indexView=t},SetMedia:function(e,t){if(null===t){var i=this.getters["scene/metadata"];e.status.audio=i.screencapVoiceType||"soundsync",e.medias={type:e.status.audio,links:{file:i.screencapVoiceSrc,sync:i.screencapVoiceSoundsync,sound:i.screencapVoiceSound},names:{file:i.screencapVoiceFileName,sync:"sound201810.mp3",sound:"media-sound.mp3"}}}else for(var n in t)$.extend(e.medias[n],t[n])},SetRoomLabel:function(e,t){var i,o,a=0,r=e.plays;if("undefined"!==typeof t.id){for(var s=r.length-1;s>=0;s--)if(r[s].roomId==t.id)o||(o=r[s]),i=r[s],r[s].roomLabel=t.label,a=s;else if(o)break;for(var l=e.roomLabels,c=0;c<l.length;c++)if(l[c].id==t.id){e.roomLabels[c]={id:t.id,index:a,label:t.label,cTime:o.time.eTime-i.time.sTime+(o.time.trans||0),sTime:i.time.sTime,eTime:o.time.eTime},n["default"].set(e.roomLabels,c,e.roomLabels[c]);break}e.isUpdate=!0}else{var u=Date.now();if(e.roomLabels.length&&!e.roomLabels[e.roomLabels.length-1].label){var d=e.roomLabels[e.roomLabels.length-1];d.label=t.label;for(var h=r.length-1;h>=0;h--){if(r[h].roomId!=d.id)break;r[h].roomKey=u,r[h].roomLabel=t.label}return}o=r[r.length-1];for(var p=r.length-1;p>=0;p--)if(r[p].roomKey=u,r[p].roomLabel=t.label,i=r[p-1],i){if(i.roomId!=o.roomId){i=r[p],a=p;break}}else i=r[p];e.roomLabels.push({id:i.roomId,key:u,index:a,label:t.label,cTime:o.time.eTime-i.time.sTime+(o.time.trans||0),sTime:i.time.sTime,eTime:o.time.eTime})}},SetRoomIndex:function(e,t){e.roomIndex=t},ClearData:function(e){c(e)}},actions:{UploadMedia:function(e,t){var i=e.commit,n=e.state;return new Promise((function(e,o){var a={file:t.file},s="soundsync"===n.status.audio?"sync":n.status.audio;t.type&&(s=t.type);var l=-1==n.roomIndex?n.roomLabels.length-1:n.roomIndex;"file"===s?(a.filename=t.file.name.replace(/\.\w+$/,".mp3"),a.type="file"):(a.index=l,a.times=n.roomLabels.map((function(e){return e.cTime})).join(","),a.filename="".concat(l,".mp3"),a.fileName="".concat(l,".mp3"),n.plays.length?a.length=n.plays[n.plays.length-1].time.eTime:a.length=0,a.replace=n.roomLabels.length>1?0:1,a.type="soundsync"),r["uploadGuideMediaFile"](a,(function(t){var o={links:{},names:{}};if(o.links[s]=t.msg,"file"==s)o.names[s]=a.filename;else{var r=n.roomLabels[l],c=n.plays;r.sound=!0;for(var u=c.length-1;u>=0;u--)c[u].roomId==r.id&&(c[u].roomSound=!0);n.isUpdate=!0}i("SetMedia",o),e(t.msg)}),o)}))},DeleteMedia:function(e,t){var i=e.commit,n=e.state;return new Promise((function(e,o){var a="soundsync"==t?"sync":t;r["deleteGuideMediaFile"]({type:t,fileName:"file"==t?"201810.mp3":n.medias.names[a]},(function(){var t={links:{},names:{}};t.links[a]="","file"==a&&(t.names[a]=""),i("SetSoundTime",-1),i("SetMedia",t),e()}),o)}))},DeletePartMedia:function(e,t){e.commit;var i=e.state;return new Promise((function(e,t){var n={},o=-1==i.roomIndex?i.roomLabels.length-1:i.roomIndex;n.index=o,n.times=i.roomLabels.map((function(e){return e.cTime})).join(","),n.filename="".concat(o,".mp3"),n.fileName="".concat(o,".mp3"),r["deleteGuideMediaPart"](n,(function(t){var n=i.roomLabels[o],a=i.plays;n.sound=!1;for(var r=a.length-1;r>=0;r--)a[r].roomId==n.id&&(a[r].roomSound=!1);i.isUpdate=!0,e(t.msg)}),t)}))},DeletePartMediaByItem:function(e,t){e.commit;var i=e.state;return new Promise((function(e,n){var o={};o.index=t,o.times=i.roomLabels.map((function(e){return e.cTime})).join(","),o.fileName=o.filename="".concat(t,".mp3"),r["deleteGuideMediaPart"](o,(function(t){e(t)}),n)}))}}},p=i("c75e"),f=i("f876"),m=i("ff11"),v=i("f121"),g={sid:null,tag:null,tags:[],styleId:null,canAddTag:!1,canVisible:!1,editIndex:-1,color:"#05c8ae",colors:["#05c8ae","#d34543","#f24439","#e72063","#f98da7","#954f8e","#673bb7","#02687e","#03a9f5","#61c1cd","#417506","#37d67a","#cddc39","#fbcc02","#ffab16","#ff6900","#adb7c1","#607d8b"]},y={tags:function(e){return e.tags.map((function(t){return{sid:t.sid,description:t.description,label:t.label,color:t.color||e.color,style:t.style,styleId:t.styleId,styleImageURL:t.styleImageURL,fileSrc:t.fileSrc,fileName:t.fileName,position:t.position,media:t.media||[],mediaType:t.mediaType||null,visiblePanos:t.visiblePanos,floorIndex:t.floorIndex||0,goods:t.goods||[]}}))},id:function(e){return e.id},sid:function(e){return e.sid},tag:function(e){return e.tag},styleId:function(e){return e.styleId},color:function(e){return e.color},colors:function(e){return e.colors},editIndex:function(e){return e.editIndex}},b={namespaced:!0,state:g,getters:y,mutations:{Clone:function(e,t){var i=this.getters["scene/floorId"];if(t.isAdd)e.tag=$.extend(!0,{label:"",color:null,style:"default",styleId:null,styleImageURL:null,mediaType:"photo",description:"",floorIndex:i,_is_add:t.isAdd},t.tag);else{for(var n=t.tag.sid,o=0;o<e.tags.length;o++)if(e.tags[o].sid==n){e.tag=$.extend(!0,{},e.tags[o]);break}e.tag.floorIndex=i,e.tag.position=t.tag.position,e.tag.visiblePanos=t.tag.visiblePanos}e.styleId=e.tag.styleId},Save:function(e,t){if(t.isAdd)e.tags.unshift(e.tag);else for(var i=0;i<e.tags.length;i++)if(e.tags[i].sid==e.tag.sid){e.tags[i]=$.extend(!0,{},e.tag),n["default"].set(e.tags,i,e.tags[i]);break}if(t.deleteStyles){for(var o=0;o<e.tags.length;o++)-1!=t.deleteStyles.indexOf(e.tags[o].styleId)&&(e.tags[o].style="default",e.tags[o].styleId=null,e.tags[o].styleImageURL=null);p["a"].emit("hotspot/Tag/Reload")}p["a"].emit("hotspot/Tag/Save"),this.commit("scene/SetTempData",{isUpdateHots:!0}),this.commit("UpdateVersion")},Delete:function(e,t){p["a"].emit("hotspot/Tag/Delete",e.tags[t].sid),e.tags.splice(t,1),this.commit("scene/SetTempData",{isUpdateHots:!0})},Update:function(e,t){if(e.tag){for(var i in t)$.isPlainObject(t[i])?e.tag[i]=$.extend(!0,e.tag[i],t[i]):e.tag[i]=t[i];this.commit("scene/SetTempData",{isUpdateHots:!0}),n["default"].nextTick((function(){return p["a"].emit("hotspot/Tag/Panel","update")}))}},Load:function(e,t){var i=t||[];i.forEach((function(e){(!e.style||"custom"!=e.style&&0!==e.style.indexOf("default"))&&(e.style="default"),e.styleId?e.styleId&&!e.styleImageURL&&(e.styleImageURL=v["a"].getPublicResource("images/images#m#/".concat(e.styleId))):(e.styleId=null,e.styleImageURL=null),!e.mediaType&&e.outLink&&(e.fileName["link"]=e.outLink,e.media=["link"],delete e.outLink),e.mediaType||(e.media&&e.media.length?e.mediaType=e.media[0]:e.mediaType="photo"),e.description=e.description||""})),e.tags=i.reverse(),e.tag=null,e.sid=null},SetStyle:function(e,t){t?(e.styleId=t.id,p["a"].emit("hotspot/Tag/Style","custom",t.url)):(e.styleId=null,p["a"].emit("hotspot/Tag/Style","default",null))},SetMedia:function(e,t){if(e.tag){var i=$.extend(!0,{},e.tag);"string"==typeof t?i.mediaType=t:(i.media=[t.type],i.mediaType=t.type,i.fileName[t.type]=t.name,i.fileSrc[t.type]=t.dataURL,t.file&&(i.fileSrc[t.type+"_file"]=t.file),t.base64&&(i.fileSrc[t.type+"_base64"]=t.base64),t.poster&&(i.fileSrc[t.type+"_poster"]=t.poster)),e.tag=i}},DelMedia:function(e,t){if(e.tag){var i=$.extend(!0,{},e.tag);i.media=[],delete i.fileName[t],delete i.fileSrc[t],delete i.fileSrc[t+"_base64"],delete i.fileSrc[t+"_file"],delete i.fileSrc[t+"_poster"],e.tag=i}},SetCanAddTag:function(e,t){e.canAddTag=t,t||(e.sid=null)},SetCanVisible:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.canVisible=t,p["a"].emit("hotspot/Visible",e.canVisible)},OpenBySid:function(e,t){if(v["a"].isMobile){if("hotspot"===this.getters["page"])return;!v["a"].isEdit||this.getters["guide/status"].isRecording||this.getters["guide/status"].isPlaying||this.commit("SetPageName",{form:"",to:"hotspotModify"})}setTimeout((function(){if(t.sid){var i;if(e.tag)i=e.tag;else for(var n=e.tags,o=0;o<n.length;o++)if(n[o].sid==t.sid){i=n[o];break}i&&("video"!=i.mediaType&&"voice"!=i.mediaType||m["a"].pause(!0),i=JSON.parse(JSON.stringify(i)),i._is_click=t.click,e.tag=i,e.tag.color||(e.tag.color=e.color),e.styleId=e.tag.styleId,!v["a"].isEdit&&t.click&&window._hmt&&_hmt.push(["_trackPageview","".concat(location.pathname,"?m=").concat(v["a"].projectNum,"&type=event&name=show_tag")]))}}),100)},Opened:function(e,t){e.sid=t;try{parent.__api&&parent.__api.tag.emit("opened",t)}catch(i){}},Closed:function(e){this.getters.player.showSplit||(e.sid=null,e.tag=null);var t=this.getters["guide/status"];t.isPlaying||t.isRecording||m["a"].resume()},SetSid:function(e,t){e.sid=t},SetEditIndex:function(e,t){e.editIndex=t},SetColor:function(e,t){e.tag&&(e.tag.color=t,p["a"].emit("hotspot/Tag/Color",t))}},actions:{Save:function(e,t){var i=e.commit,n=e.state;return new Promise((function(e,o){var a={type:n.tag._is_add?1:0};t&&(a.styleName=t);var s={},l=null;n.tag.media.length&&("photo"==n.tag.mediaType?s.filename="hot".concat(n.tag.sid,".jpg"):"voice"==n.tag.mediaType&&(s.filename="hot".concat(n.tag.sid,".mp3")),n.tag.fileSrc[n.tag.mediaType+"_file"]?(s.sid=n.tag.sid,s.file=n.tag.fileSrc[n.tag.mediaType+"_file"],l=n.tag.fileName[n.tag.mediaType]):n.tag.fileSrc[n.tag.mediaType+"_base64"]&&(s.file=n.tag.fileSrc[n.tag.mediaType+"_base64"],l=n.tag.fileName[n.tag.mediaType]));var c=function(){delete n.tag._is_add,delete n.tag._is_click,n.tag.media.length?(l=l||n.tag.fileName[n.tag.mediaType],n.tag.fileSrc={},n.tag.fileName={},l&&(n.tag.fileName[n.tag.mediaType]=l)):(n.tag.fileSrc={},n.tag.fileName={}),n.tag.styleId=n.styleId,n.tag.styleId?(n.tag.style="custom",n.tag.styleImageURL=v["a"].getPublicResource("images/images#m#/".concat(n.tag.styleId))):(n.tag.style="default",n.tag.styleImageURL=null),a.hotData=JSON.stringify(n.tag),r["saveHot"](a,(function(){i("Save",{isAdd:a.type,deleteStyles:a.styleName}),e()}),(function(){a.type&&(n.tag._is_add=!0),o()}))};s.file?"photo"==n.tag.mediaType||"voice"==n.tag.mediaType?r["uploadPic"](s,(function(e){return c(e)}),(function(){return o("ERROR_UPLOAD_File")})):r["uploadHotMedia"](s,(function(e){return c(e)}),(function(){return o("ERROR_UPLOAD_File")})):c()}))},SaveSetting:function(e){var t=this,n=(e.commit,e.state),o=i("c7b2"),a=o.app;return new Promise((function(e,i){var o=a.player.linkEditor.saveTagVisibles();if(!o)return e();var s={data:JSON.stringify(o)};r["saveHotVisible"](s,(function(){e(),p["a"].emit("hotspot/Setting",n.canVisible),t.commit("scene/SetTempData",{isUpdateHots:!0})}),i)}))},SaveSettingWhenEditModel:function(e){e.commit,e.state;var t=i("c7b2"),n=t.app;return new Promise((function(e,t){var i=n.player.linkEditor.resetTagVisiByModel();if(!i||0==i.length)return e();var o={data:JSON.stringify(i)};r["saveHotVisible"](o,(function(){p["a"].emit("hotspot/resetVisible",i),v["a"].rebuild&&r["uploadHotJsonToOss"]((function(){console.log("成功")}))}),t)}))},Delete:function(e,t){var i=e.commit,n=e.state,o={sid:n.tags[t].sid,type:-1};return new Promise((function(e,n){f["a"].show(),r["saveHot"](o,(function(){i("Delete",t),e()}),(function(){return n()}))}))},CheckVideo:function(e,t){e.commit,e.state;return new Promise((function(e,i){return r["checkVideoUrl"](t,e,i)}))},SaveHotspot:function(e,t){var i=e.commit,n=e.state;return new Promise((function(e,o){var a={type:n.tag._is_add?1:0},s={},l=null;t&&(a.styleName=t),n.tag.media.length&&("photo"==n.tag.mediaType?s.filename="hot".concat(n.tag.sid,".jpg"):"voice"==n.tag.mediaType&&(s.filename="hot".concat(n.tag.sid,".mp3")),n.tag.fileSrc[n.tag.mediaType+"_file"]?(s.sid=n.tag.sid,s.file=n.tag.fileSrc[n.tag.mediaType+"_file"],l=n.tag.fileName[n.tag.mediaType]):n.tag.fileSrc[n.tag.mediaType+"_base64"]&&(s.file=n.tag.fileSrc[n.tag.mediaType+"_base64"],l=n.tag.fileName[n.tag.mediaType]));var c=function(){delete n.tag._is_add,delete n.tag._is_click,n.tag.media.length?(l=l||n.tag.fileName[n.tag.mediaType],n.tag.fileSrc={},n.tag.fileName={},l&&(n.tag.fileName[n.tag.mediaType]=l)):(n.tag.fileSrc={},n.tag.fileName={}),n.tag.styleId=n.styleId,n.tag.styleId?(n.tag.style="custom",n.tag.styleImageURL=v["a"].getPublicResource("images/images#m#/".concat(n.tag.styleId))):(n.tag.style="default",n.tag.styleImageURL=null),a.hotData=JSON.stringify(n.tag),r["saveHotspot"](a,(function(){i("Save",{isAdd:a.type,deleteStyles:a.styleName}),e()}),(function(){a.type&&(n.tag._is_add=!0),o()}))};s.file?"photo"==n.tag.mediaType||"voice"==n.tag.mediaType?r["uploadPic"](s,(function(e){return c(e)}),(function(){return o("ERROR_UPLOAD_File")})):r["uploadHotMedia"](s,(function(e){return c(e)}),(function(){return o("ERROR_UPLOAD_File")})):c()}))},SaveHotspotDelete:function(e){var t=this;e.commit,e.state;return new Promise((function(e,i){var n=t.getters["hotspot/sid"];r["saveHotspot"]({sid:n,type:-1},(function(){p["a"].emit("hotspot/Tag/Delete",n),e()}),(function(){i()}))}))}}},w=i("53ca"),E=(i("96cf"),i("1da1")),T=(i("20d6"),i("7514"),i("b54a"),{link:{tags:[],styles:{}},tag:null,styles:[],stylesRemove:{enter:[],exit:[]},showEditPanel:!1,showEnterSetting:!1,showExitSetting:!1}),P={tags:function(e){return e.link.tags},sid:function(e){return e.sid},tag:function(e){return e.tag},styles:function(e){return{enter:e.styles.filter((function(e){return!e._is_remove&&0==e.id.indexOf("enter")})),exit:e.styles.filter((function(e){return!e._is_remove&&0==e.id.indexOf("exit")}))}},showEditPanel:function(e){return e.showEditPanel},showEnterSetting:function(e){return e.showEnterSetting},showExitSetting:function(e){return e.showExitSetting}},x={namespaced:!0,state:T,getters:P,mutations:{Edit:function(e,t){var i;if(t.tag._is_add)i=$.extend(!0,{type:"pano",style:{enter:{id:null,name:"default",url:null},exit:{id:null,name:"default",url:null}},url:"",path:"",thumb:"",label:"",resolution:"",enterQuaternion:null,exitDirection:null,visibleViews:null},t.tag);else if(e.tag)i=$.extend(!0,{},e.tag),i=$.extend(!0,i,t.tag);else{var n=e.link.tags.find((function(e){return e.sid==t.tag.sid}));n&&(i=$.extend(!0,{},n),i=$.extend(!0,i,t.tag))}i&&(e.tag=i,e.showEditPanel=!0)},Update:function(e,t){if(e.tag)for(var i in t)$.isPlainObject(t[i])?t.__replace?(delete t.__replace,e.tag[i]=$.extend(!0,{},t[i])):e.tag[i]=$.extend(!0,e.tag[i],t[i]):e.tag[i]=t[i]},Load:function(e,t){null==t&&(t={}),t.styles||(t.styles=[]),t.tags||(t.tags=[]),t.styles.some((function(e){return"enter-style-up.png"==e.id}))||(t.styles.unshift({type:"default",id:"enter-style-down.png",url:v["a"].getStaticResource("img/link/enter-style-down.png")}),t.styles.unshift({type:"default",id:"enter-style-up.png",url:v["a"].getStaticResource("img/link/enter-style-up.png")})),t.tags.forEach((function(e){"pano"!=e.type||e.visibleViews||(e.visibleViews=null)}));var i=t.tags.filter((function(e){return"url"==e.type})),n=t.tags.filter((function(e){return"pano"==e.type}));t.tags=[].concat(i,n),e.styles=t.styles,e.link=t,e.tag=null,e.sid=null,p["a"].emit("link/data/load")},Close:function(e){e.tag=null,e.styles.forEach((function(t,i){t._is_remove&&(t._is_remove=!1,n["default"].set(e.styles,i,e.styles[i]))}));for(var t=e.styles.length-1;t>=0;t--)e.styles[t]._data&&e.styles.splice(t,1)},SetStyle:function(e,t){e.tag&&(e.tag.style[t.type].id=t.id,e.tag.style[t.type].name=t.id?"custom":"default",e.tag.style[t.type].url=t.url||null)},DelStyle:function(e,t){if(e.tag){var i=e.styles.findIndex((function(e){return e.id==t.id}));-1!=i&&(e.styles[i]._is_remove=!0,n["default"].set(e.styles,i,e.styles[i]))}},AddStyle:function(e,t){e.tag&&e.styles.push({id:t.id,url:v["a"].getPublicResource("images/images#m#/".concat(t.id)),_data:t.url,_blob:t.blob})},SetType:function(e,t){e.tag&&(e.tag.type=t)},SetShowEditPanel:function(e,t){e.showEditPanel=t},SetShowEnter:function(e,t){e.showEnterSetting=t},SetShowExit:function(e,t){e.showExitSetting=t}},actions:{Save:function(e){e.commit;var t=e.state;return new Promise(function(){var e=Object(E["a"])(regeneratorRuntime.mark((function e(i,n){var o,a,s,l,c,u,d,h,p,f,m;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:for(o=$.extend(!0,{},t.link),a=t.tag._is_add,s=t.styles,l=[],c=s.length-1;c>=0;c--)if(s[c]._is_remove){for(u=0;u<o.tags.length;u++)o.tags[u].style.enter.id==s[c].id?(o.tags[u].style.enter={id:null,name:"default",url:null},l.push({type:"enter",sid:o.tags[u].sid})):o.tags[u].style.exit.id==s[c].id&&(o.tags[u].style.exit={id:null,name:"default",url:null},l.push({type:"exit",sid:o.tags[u].sid}));s.splice(c,1)}d=regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!s[t]._data){e.next=12;break}return e.prev=1,e.next=4,r["uploadPic"]({file:s[t]._data,filename:s[t].id,toOss:1},(function(e){delete s[t]._data,delete s[t]._blob}));case 4:e.next=12;break;case 6:return e.prev=6,e.t0=e["catch"](1),delete s[t]._data,delete s[t]._blob,console.error(e.t0),e.abrupt("return",{v:n()});case 12:case"end":return e.stop()}}),e,null,[[1,6]])})),h=0;case 7:if(!(h<s.length)){e.next=15;break}return e.delegateYield(d(h),"t0",9);case 9:if(p=e.t0,"object"!==Object(w["a"])(p)){e.next=12;break}return e.abrupt("return",p.v);case 12:h++,e.next=7;break;case 15:if(o.styles=s,"pano"==t.tag.type?t.tag.url="":(t.tag.path=null,t.tag.thumb=null,t.tag.resolution=null,t.tag.enterQuaternion=null,t.tag.exitDirection=null,t.tag.style.exit={id:null,name:"default",url:null}),!a){e.next=37;break}if(delete t.tag._is_add,"url"!=t.tag.type){e.next=23;break}o.tags.unshift(t.tag),e.next=35;break;case 23:if(0!=o.tags.length&&o.tags.some((function(e){return"pano"==e.type}))){e.next=27;break}o.tags.push(t.tag),e.next=35;break;case 27:f=0;case 28:if(!(f<o.tags.length)){e.next=35;break}if("pano"!=o.tags[f].type){e.next=32;break}return o.tags.splice(f,0,t.tag),e.abrupt("break",35);case 32:f++,e.next=28;break;case 35:e.next=45;break;case 37:m=0;case 38:if(!(m<o.tags.length)){e.next=45;break}if(o.tags[m].sid!=t.tag.sid){e.next=42;break}return o.tags[m]=t.tag,e.abrupt("break",45);case 42:m++,e.next=38;break;case 45:return e.prev=45,e.next=48,r["savePanoramaJson"]({fileData:JSON.stringify(o),fileName:"link-scene.json"},(function(e){0==e.code?(i(l),t.link=o,t.tag=null):n()}));case 48:e.next=53;break;case 50:e.prev=50,e.t1=e["catch"](45),console.error(e.t1);case 53:case"end":return e.stop()}}),e,null,[[45,50]])})));return function(t,i){return e.apply(this,arguments)}}())},Delete:function(e,t){e.commit;var i=e.state;return new Promise(function(){var e=Object(E["a"])(regeneratorRuntime.mark((function e(n,o){var a,s;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=$.extend(!0,{},i.link),s=a.tags[t].sid,a.tags.splice(t,1),e.prev=3,e.next=6,r["savePanoramaJson"]({sid:s,fileData:a.tags.length?JSON.stringify(a):"",fileName:"link-scene.json"},(function(e){0==e.code?(i.link.tags.splice(t,1),n(s)):o()}));case 6:e.next=11;break;case 8:e.prev=8,e.t0=e["catch"](3),console.error(e.t0);case 11:case"end":return e.stop()}}),e,null,[[3,8]])})));return function(t,i){return e.apply(this,arguments)}}())}}},k={show:!1,showButton:!0,disable:!1},R={namespaced:!0,state:k,mutations:{Save:function(e){p["a"].emit("walk/Save")},SetButton:function(e,t){e.showButton=t},SetPoint:function(e,t,i,n,o){null===t?(e.show=!e.show,p["a"].emit("walk/Set",e.show)):e.show=t},Disable:function(e,t){e.disable=t}},actions:{Save:function(e){e.commit,e.state;var t=i("c7b2"),n=t.app;return new Promise((function(e,t){var i=n.player.linkEditor.savePanoVisibles();if(!i)return e();var o={data:JSON.stringify(i)};r["saveLinkPano"](o,(function(){e(),p["a"].emit("walk/Save")}),t)}))}}},_=i("2197"),S=i("617a"),M=i("b235"),A=i("9ef6");n["default"].use(o["a"]);var O=new o["a"].Store({state:{page:"",menu:{list:[],includes:[],excludes:[]},isVIP:!1,isVIPExpired:!1,isVIPTransition:!1,pageFrom:"",pageParams:{},version:Date.now(),player:{progres:"shipin"==v["a"].appenv?-1:0,mode:"pano",modeCanSwitch:!0,showUI:!0,showAppUI:!0,showUIMap:!1,showMore:!1,showDescription:!1,showToolbar:!0,showUserGuide:!0,showVR:!1,showVRType:null,showMap:!0,showInfo:!1,showFlash:!1,showMeasure:!1,showWidgets:!0,showSnapshot:!1,showSplit:!1,showPositionMarks:!1,showNavigations:{vr:!0,map:!0,cad:!0,m2d:!0,m3d:!0,pano:!0,rule:!0,guide:!0,measure:!0},playbIsIframe:!1,playerbIframeUrl:""}},getters:{menu:function(e){return e.menu},page:function(e){return e.page},isVIP:function(e){return e.isVIP},isVIPExpired:function(e){return e.isVIPExpired},isVIPTransition:function(e){return e.isVIPTransition},pageFrom:function(e){return e.pageFrom},pageParams:function(e){return e.pageParams},mode:function(e){return e.player.mode},player:function(e){return e.player},modeCanSwitch:function(e){return e.player.modeCanSwitch},showNavigations:function(e){return e.player.showNavigations},version:function(e){return e.version}},mutations:{InitMenu:function(e,t){e.isVIP=t.isVIP,e.isVIPExpired=t.isVIPExpired,e.isVIPTransition=t.isVIPTransition,e.menu.includes=t.includes,e.menu.excludes=t.excludes;for(var i=v["a"].isMobile?_["a"]:_["b"],n=i.length-1;n>=0;n--){var o=i[n];e.menu.includes.length&&-1==e.menu.includes.indexOf(o.name)&&e.menu.excludes.push(o.name),e.menu.excludes.length&&-1!=e.menu.excludes.indexOf(o.name)&&i.splice(n,1)}var a="scene,decor,virtual,vrhouse,business",r=Object({NODE_ENV:"production",VUE_APP_CDN_URL:"",VUE_APP_HIDE_MENU:"scene,decor,virtual,vrhouse,business",VUE_APP_INCLUDEAPPS:"embed,shop,decor,discover,reserve,grave,fire-control,rtc-live",VUE_APP_LANGS:"zh#中文,en#英文,de#德文,fr#法文,jp#日文,kr#韩文,es#西班牙文",VUE_APP_LOCAL_PAGE:"embed",VUE_APP_OEM:"localshow",VUE_APP_OEM_NAEM:"本地版展示页面",VUE_APP_OPENAPI:"",VUE_APP_RTC_SOCKETURL:"",VUE_APP_SERVER_URL:"",VUE_APP_SHOP_ADMIN_URL:"",VUE_APP_SHOP_SOCKETURL:"",VUE_APP_SHOP_URL:"",VUE_APP_STATIC_DIR:"static",VUE_APP_STATIC_URL:"static/",VUE_APP_TESTKEY:"test",VUE_APP_TESTPWD:"11111111Aa",VUE_APP_TESTUSR:"13112311178",VUE_APP_VRHOUSE_OPENAPI:"",VUE_APP_VRHOUSE_URL:"",BASE_URL:""}).VUE_APP_SHOW_MENU||"";S["a"].urlQueryValue("menu")&&(r=r+","+decodeURIComponent(S["a"].urlQueryValue("menu"))),i.forEach((function(e){a&&-1!=a.indexOf(e.name)&&(e.hidden=!0),r&&-1!=r.indexOf(e.name)&&(e.hidden=!1)})),e.menu.list=i},UpdateMenu:function(e,t){e.menu.list.forEach((function(e){"sxz"==v["a"].name&&("model"==e.name?e.hidden=!1:e.hidden=!0)}))},SetPlayerOptions:function(e,t){for(var i in t)e.player[i]=t[i],"showSplit"==i&&(e.player["showWidgets"]=!t[i])},SetNavigations:function(e,t){for(var i in t)e.player.showNavigations[i]=t[i],"rule"===i&&p["a"].emit("rule/Visible",t[i])},SetVR:function(e,t){t?"portrait"==window.VRScreenType&&(e.player.showVRType="portrait"):e.player.showVRType=null,e.player.showVR=t,e.player.showWidgets=!e.player.showVR,p["a"].emit("enterVR")},SetPageName:function(e,t){var o=this,a=i("6860").objects;if(e.page=t.to||"",e.pageFrom=t.from||"",e.pageParams=t.params||{},this.getters["scene/isLogoEdit"]&&this.commit("scene/SetLogoEdit",!1),"guide"!=e.pageFrom&&"model"!==e.pageFrom&&"cad"!==e.pageFrom&&"data"!==e.pageFrom||m["a"].enable(),"guide"!==e.page&&"model"!==e.page&&"cad"!==e.pageFrom&&"data"!==e.pageFrom||(m["a"].pause(),m["a"].disabel()),"walk"==e.pageFrom?(a.player.linkEditor&&a.player.linkEditor.finishSetPanoVisible(),this.commit("SetPlayerOptions",{showWidgets:!0})):0===e.pageFrom.indexOf("hotspot")?(a.tagManager.editSpot.cancelHotEdit(),a.player.linkEditor&&a.player.linkEditor.finishSetTagVisible()):"screen"==e.pageFrom?(a.player.tagManager.showAllTags(),this.commit("SetPlayerOptions",{showWidgets:!0})):"model"==e.pageFrom?a.mainDesign.leave():"videos"==e.pageFrom?a.player.EditOverlay.leave():"virtual"==e.pageFrom?a.player.EditPanoVideo.leave():"cad"!=e.pageFrom&&"data"!=e.pageFrom||(app.model.cadFloorPlane.changeCadVisible(null,{autoJudge:!0}),v["a"].isDisableControl=!1,"panorama"!=app.player.mode&&app.model.compass&&app.model.compass.autoJudgeDisplay(),app.cameraControls.controls.floorplan.recoverToUpdate(),this.commit("SetPlayerOptions",{showWidgets:!0}),app.player.focusPoint({modelSize:app.model.size,aim:app.model.center}),a.overlayManager.group.visible=!0),"guide"==e.pageFrom)a.tagManager.showAllTags();else if("guide"===e.page)if("panorama"==a.player.mode)for(var r in a.tagManager.tags){var s=a.tagManager.tags[r];"link"==s.mediaType&&s.hide()}else a.tagManager.hideAllTags();if(0===e.page.indexOf("hotspot"))i("3f1a").default.init();else if("walk"==e.page)a.player.linkEditor&&a.player.linkEditor.enterSet("panoVisible"),n["default"].nextTick((function(){o.commit("SetPlayerOptions",{showWidgets:!1})}));else if("sign"==e.page)a.player.FlyToMode("panorama",(function(){a.player.lookAtPos(null,null,{speed:.1,time:500,lat:-50})}));else if("screen"==e.page)a.player.tagManager.hideAllTags(),a.player.FlyToMode("panorama",(function(){})),n["default"].nextTick((function(){o.commit("SetPlayerOptions",{showWidgets:!1})}));else if("model"==e.page)a.mainDesign&&a.mainDesign.enter&&(a.player.modeTran||console.error("no modeTran??"),a.player.FlyToMode(a.player.modeTran.split("-")[1],(function(){a.mainDesign.enter("videos"==e.page?"addOverlay":"wallDesign")})));else if("videos"==e.page)if(a.player.EditOverlay)a.player.EditOverlay.enter();else{var l=i("3ebc").default;l.init((function(){l.enter()}))}else if("virtual"==e.page)if(a.player.EditPanoVideo)a.player.EditPanoVideo.enter();else{var c=i("353e").default;c.init((function(){c.enter()}))}"base"==e.page||"information"==e.page||"sign"==e.page||"base"==e.page||"decor"==e.page||"link"==e.page||""==e.page?a.player.linkViewManager.showAllViews():a.player.linkViewManager.hideAllViews(),"cad"!=e.page&&"data"!=e.page||(v["a"].floorPlanNoRotate=!0,v["a"].isDisableControl=!0,app.player.FlyToMode("floorplan",(function(){M["a"].cancelById(A["a"].freeze.outsideFocus,!0)}),0),app.model&&(app.model.cadFloorPlane.changeCadVisible(!1),app.model.compass&&app.model.compass.setDisplay(!1)),n["default"].nextTick((function(){o.commit("SetPlayerOptions",{showWidgets:!1})})),a.overlayManager.group.visible=!1)},UpdateVersion:function(e){e.version=Date.now()}},actions:{},modules:{link:x,walk:R,scene:a["a"],guide:h,hotspot:b}});t["a"]=O},eb5a:function(e,t,i){"use strict";function n(e){this.message=e}t["a"]=n},ec11:function(e,t,i){"use strict";i.d(t,"a",(function(){return ee}));i("7f7f"),i("6b54"),i("2397"),i("34ef"),i("673e"),i("ac6a");var n=i("d4ec"),o=i("bee2"),a=i("257e"),r=i("262e"),s=i("99de"),l=i("7e84"),c=i("ade3"),u=i("ef32"),d=i("44a7"),h=i("076a"),p=i("aeb9"),f=i("cbe8"),m=i("b235"),v=i("2d47"),g=i("cd18"),y=i("f121"),b=(i("3713"),i("823b")),w=i("b775"),E=i("7338"),T=i("eb5a"),P=i("b8d5"),x=i("9ef6"),k=i("6860"),R=i("9b24"),_=i("617a"),S=i("8eb6");function M(e){var t=A();return function(){var i,n=Object(l["a"])(e);if(t){var o=Object(l["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(s["a"])(this,i)}}function A(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var O=new THREE.PlaneBufferGeometry(.4,.4,1,1),C=g["a"].getTexture("static/img/panomarker/play-64.png"),D=g["a"].getTexture("static/img/panomarker/256-1.png"),V=g["a"].getTexture("static/img/panomarker/256-3.png"),I=g["a"].getTexture("static/img/panomarker/256-2.png"),j=null,L=function(e){Object(r["a"])(i,e);var t=M(i);function i(e){var o;return Object(n["a"])(this,i),o=t.call(this),o.pano=e,o.geometry=O,o.widget=null,o.material=new THREE.MeshBasicMaterial({map:g["a"].loadTextureFromCache(y["a"].urls.marker),side:THREE.DoubleSide,opacity:0,transparent:!0,depthWrite:!1,depthTest:!1}),o.renderOrder=h["a"].panoMarker,o.name="marker",o.layers.set(p["a"].PANOMARKERS),o.updateMatrixWorld(),x["a"].colorMarkerOnLoad&&o.on("load",(function(){this.marker.material.color.set(65280)})),o}return Object(o["a"])(i,[{key:"updateStyle",value:function(e,t,i){"normal"==e?this.material==j&&(this.material=this.normalMaterial,i.removeTag(t.flagSpot),t.flagSpot=null):this.material!=j&&(j||(j=new B,N()),this.normalMaterial=this.material,this.material=j,this.setWidget(e,t,i)),"vrhouse"==y["a"].name&&"customer"==_["a"].urlHashValue("role")&&2==_["a"].urlHashValue("mode")&&(t.marker.visible=!1,Object.defineProperty(t.marker,"visible",{get:function(){return!1},set:function(e){t.flagSpot&&t.flagSpot.hide()}}),t.marker.hasOwnProperty("visibleOri")||Object.defineProperty(t.marker,"visibleOri",{get:function(){return!1},set:function(e){t.marker.visible=!1}}),t.marker.visibleOri=!1)}},{key:"setWidget",value:function(e,t,i){var n=new R["a"](e,"flagSpot___"+t.id,{position:t.position.clone(),state:"videoPanoFlag",sid:"flagSpot___"+t.id,style:"videoMarker",pano:t});n.style="videoMarker",n.disc.material.uniforms.map.value=C;var o=.5,a=n.createMarkGroup({type:"flagSpot",stemLineLen:o,markerPos:this.position});if(n.rePos(n.markGroup.groundPoint.clone().add(new THREE.Vector3(0,o,0))),a.marker=this,i.addTag(n),t.flagSpot=n,this.material.depthTest=!1,this.position.copy(n.markGroup.groundPoint),"vrhouse"!=y["a"].name||"customer"!=_["a"].urlHasValue("role",!0)||2!=_["a"].urlHasValue("mode",!0)){var r=t.marker.visible;Object.defineProperty(t.marker,"visible",{get:function(){return r},set:function(e){t.flagSpot&&(e?t.flagSpot.show():t.flagSpot.hide()),r=e}});var s=t.marker.visible;t.marker.hasOwnProperty("visibleOri")||Object.defineProperty(t.marker,"visibleOri",{get:function(){return s},set:function(e){t.marker.visible=e,s=e}}),t.marker.visibleOri=!1}}},{key:"hoverOn",value:function(e){"panorama"==e&&0!=this.material.opacity&&m["a"].start(v["a"].property(this.material,"opacity",x["a"][e].markerOpacityOnHover),250)}},{key:"hoverOff",value:function(e){"panorama"==e&&0!=this.material.opacity&&m["a"].start(v["a"].property(this.material,"opacity",x["a"][e].markerOpacity),250)}}]),i}(THREE.Mesh),F=L,H=[],z=0;function N(){for(var e=0;e<H.length;e++)H[e].uniforms["progress"].value=z;z>1&&(z=0),z+=.01,window.requestAnimationFrame(N)}var B=function(e){Object(r["a"])(i,e);var t=M(i);function i(){var e;Object(n["a"])(this,i),e=t.call(this);var o=THREE.UniformsUtils.clone(S["a"].videoPanoMarker.uniforms);return o.map0.value=D,o.map1.value=V,o.map2.value=I,o.opacity.value=1,e.vertexShader=S["a"].videoPanoMarker.vertexShader,e.fragmentShader=S["a"].videoPanoMarker.fragmentShader,e.uniforms=o,e.transparent=!0,_["a"].detectIOS()&&(e.defines["useColor2"]=""),H.push(Object(a["a"])(e)),e}return i}(THREE.RawShaderMaterial),U=i("1787");function W(e){var t=q();return function(){var i,n=Object(l["a"])(e);if(t){var o=Object(l["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(s["a"])(this,i)}}function q(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var G,Q,Y,X,Z=g["a"].getBlobSrc(f["a"].Circle,!0),J=g["a"].loadTextureFromCache(Z),K=(new THREE.Quaternion).setFromAxisAngle(new THREE.Vector3(0,1,0),-Math.PI/2),ee=function(e){Object(r["a"])(i,e);var t=W(i);function i(e,o,r,s){var l;if(Object(n["a"])(this,i),l=t.call(this),Object(c["a"])(Object(a["a"])(l),"enter",function(){var e=null;return function(){this.setZoomed(!1),this.emit(d["a"].Enter,e,this),e=this,this.model.setHighMap(this)}}()),Object(c["a"])(Object(a["a"])(l),"raycastToFindFloor",function(){var e=[new THREE.Vector3(0,-1,0),new THREE.Vector3(1,-1,0),new THREE.Vector3(0,-1,1),new THREE.Vector3(-1,-1,0),new THREE.Vector3(0,-1,-1),new THREE.Vector3(1,0,0),new THREE.Vector3(0,0,1),new THREE.Vector3(-1,0,0),new THREE.Vector3(0,0,-1)];return function(){b["a"].warn("Performance warning: Raycasting to find floor index");for(var t=0;t<e.length;t++){var i=new THREE.Raycaster(this.position.clone(),e[t].clone()),n=i.intersectObjects(this.model.colliders);if(n.length)return n[0].object.parent.parent}return null}}()),Object(c["a"])(Object(a["a"])(l),"loadTiledPano",function(){var e=[],t=[];return function(i,n,o,a,r,s){null!==a&&void 0!==a||(a=!0),null!==r&&void 0!==r||(r=!0);var l=this.getWaitDeferred(i),c=l.deferred,u=null,h=null;if(o&&("number"==typeof o?u=o:(u=o.hFov,h=o.vFov)),!this.isLoaded(i)){if(!l.active){if(l.active=!0,o){var p=P["a"].matchingTilesInDirection(this,i,n,u,h);e[this.id+":"+i]={tileCount:0,targetTileCount:p},b["a"].info("Loading partial pano: "+this.id+" with "+p+" tiles")}t[this.id]||(t[this.id]=!0,this.on(d["a"].LoadComplete,function(e,t){var i=this.getWaitDeferred(e).deferred;i&&"pending"===i.state()&&this.highestPartialTileRenderOpCompleted>=e&&(i.resolve(e,t),this.resetWaitDeferred(e))}.bind(this)),this.on(d["a"].LoadFailed,function(e){var t=this.getWaitDeferred(e).deferred;t&&"pending"===t.state()&&this.highestPartialTileRenderOpCompleted>=e&&(t.reject(e),this.resetWaitDeferred(e))}.bind(this)),this.on(d["a"].TileLoaded,function(t,i,n){var o=this.getWaitDeferred(t).deferred;if(o&&"pending"===o.state()){o.notify(t,i,n);var a=e[this.id+":"+t];a&&(a.tileCount++,a.tileCount===a.targetTileCount&&(this.onPanoRendered(this.id,t,n,!0),o.resolve(t,n),this.resetWaitDeferred(t)))}}.bind(this)))}this.tileDownloader.clearForceQueue(),this.tileDownloader.forceQueueTilesForPano(this,i,n,u,h,s),this.tiledPanoRenderTarget=this.panoRenderer.activateTiledPano(this,this.qualityManager.getMaxNavPanoSize(),a),this.panoRenderer.renderPanoTiles(this.id,n,r)}return c.promise()}}()),l.model=e,l.id=o,l.neighbourUUIDs=r.neighbours||[],l.neighbourPanos=null,l.floor=null,l.floorIndex=r.subgroup||0,l.failedLoadingAt=0,l.maxLoadRetries=4,l.origin=r.position.clone(),l.position=r.position.clone(),l.quaternion=r.quaternion.clone(),l.alignmentType=r.alignmentType,s?(l.hasVideo=!0,l.videoInfo=s):(l.hasVideo=!1,l.videoInfo={}),l.marker=null,l.isAligned()&&!r.isAssist&&(l.marker=new F(Object(a["a"])(l))),l.debugColor=(new THREE.Color).setHSL(.06+.53*Math.random(),.8+.2*Math.random(),.5+.2*Math.random()),l.floorPosition=r.puck?r.puck.clone():null,l.skyboxMesh=new THREE.Mesh(x["a"].sphereBufferGeometry),l.skyboxMesh.position.copy(l.position),l.tiled=void 0!=r.tiled?r.tiled:y["a"].supportsTiles&&!r.isAssist,l.tiled){l.solidSkybox=null;var u=(new THREE.Quaternion).multiplyQuaternions(l.quaternion,K);l.skyboxMesh.quaternion.copy(u),l.skyboxMesh.updateMatrix(),l.skyboxMesh.updateMatrixWorld(),l.rot90Matrix=l.skyboxMesh.matrixWorld.clone()}else{l.solidSkybox=new THREE.Texture([null,null,null,null,null,null]),l.solidSkybox.flipY=!1,x["a"].minimalMemoryMode&&(l.solidSkybox.minFilter=THREE.LinearFilter,l.solidSkybox.magFilter=THREE.LinearFilter,l.solidSkybox.generateMipmaps=!1);u=r.quaternion.clone();l.quaternion=(new THREE.Quaternion).multiplyQuaternions(u,K)}return l.skyboxMesh.material.color=new THREE.Color(1,1,1),l.skyboxMesh.quaternion.copy(l.quaternion),l.skyboxMesh.name="skybox",l.skyboxMesh.visible=!1,l.skyboxMesh.updateMatrix(),l.skyboxMesh.updateMatrixWorld(),l.zoomed=!1,l.panoRenderer=null,l.panoVideoRenderer=null,l.qualityManager=null,l.tileDownloader=null,l.tiledPanoRenderTarget=null,l.resolutionPromise={},l.minimumTiledPanoLoaded=!1,l.highestPartialTileRenderOpCompleted=0,l.highestFullTileRenderOpCompleted=0,l.shouldRedrawOnBaseLoaded=!1,l.lockUntilRenderingComplete=!1,x["a"].colorMarkerOnLoad&&l.on("load",(function(){this.marker.material.color.set(65280)})),l.noBlocks=[],l.blocks=[],l.seeMarkers=r.seeMarkers,!r.isAssist&&y["a"].isMobile&&l.isAligned()&&(l.vrMarker=new THREE.Sprite(new THREE.SpriteMaterial({transparent:!0,opacity:.75,map:J,depthTest:!1})),l.vrMarker.name="vrMarker",l.vrMarker.scale.set(.16,.16,1),l.vrMarker.boluoType="vr",l.vrMarker.position.copy(l.position),l.vrMarker.position.y-=.2,l.vrMarker.enabled=!0,l.vrMarker.visible=!1,l.vrMarker.renderOrder=h["a"].panoMarker,l.vrMarker.pano=Object(a["a"])(l),l.model.vrMarkers.push(l.vrMarker),l.model.add(l.vrMarker)),l}return Object(o["a"])(i,[{key:"exit",value:function(){this.tiled?(this.clearWaitDeferreds(),this.minimumTiledPanoLoaded=!1,this.tiledPanoRenderTarget=null,this.setZoomed(!1),this.panoRenderer.deactivateTiledPano(this),this.highestPartialTileRenderOpCompleted=0,this.highestFullTileRenderOpCompleted=0):(this.solidSkybox.dispose(),this.solidSkybox.loaded=!1,this.solidSkybox.version=0),this.emit(d["a"].Exit,this)}},{key:"hoverOn",value:function(e){this.hasVideo&&k["objects"].panoVideoRenderer.ifEnable()||this.marker&&(this.marker.hoverOn(e),x["a"].navigation.panoScores&x["a"].navigation.mouseDirection&&this.addTextSprite("HIT",12525854))}},{key:"hoverOff",value:function(e){this.hasVideo&&k["objects"].panoVideoRenderer.ifEnable()||this.marker&&this.marker.hoverOff(e)}},{key:"build1",value:function(e){if(this.floor=this.floor||this.model.floors.get(this.floorIndex)||this.raycastToFindFloor()||this.model.getFloorAtPoint(this.position),this.floorIndex=this.floor.floorIndex,this.floor.addPano(this),!e){this.floorPosition=this.floorPosition||this.raycastFloorPosition(),this.neighbourPanos=this.neighbourPanos||this.findNeighourPanos(),x["a"].colorMarkerByFloor&&this.marker&&this.marker.material.color.set(this.floor.debugColor);var t=k["store"].getters["scene/metadata"];y["a"].isEdit||12!=t.sceneSource||this.createLightCylinder()}}},{key:"build2",value:function(){this.floorPosition=this.floorPosition||this.interpolateFloorPosition(),this.height=this.position.distanceTo(this.floorPosition),this.placeMarker()}},{key:"dispose",value:function(){this.skyboxMesh.parent.remove(this.skyboxMesh),this.marker.parent.remove(this.marker)}},{key:"placeMarker",value:function(){this.marker&&(this.marker.position.copy(this.floorPosition),this.marker.position.y+=.01,this.marker.lookAt(new THREE.Vector3(0,1,0).add(this.marker.position)))}},{key:"updateMakerStyle",value:function(){this.hasVideo&&this.panoVideoRenderer.ifEnable()||this.panoVideo?this.marker.updateStyle(this.model,this,k["objects"].tagManager):this.marker.updateStyle("normal",this,k["objects"].tagManager)}},{key:"updateMarkerVisible",value:function(e){!this.isAligned()||k["objects"].player.linkEditor&&k["objects"].player.linkEditor.setPanoVisible||(app.player.linkEditor.checkHasNeighbor(this)?this.marker.visibleOri=e:this.marker.visibleOri=!1,this.flagSpot&&this.flagSpot.updateVideoFlagVisible())}},{key:"attachToPanoRenderer",value:function(e){this.panoRenderer=e,this.panoRenderer.on(u["a"].TileRenderSuccess,this.onTileRendered.bind(this)),this.panoRenderer.on(u["a"].PanoRenderComplete,this.onPanoRendered.bind(this)),this.panoRenderer.on(u["a"].TileRenderFailure,this.onTileRenderFail.bind(this)),this.panoRenderer.on(u["a"].UploadAttemptedForAllTiles,this.onUploadAttemptedForAllTiles.bind(this))}},{key:"attachToPanoVideoRenderer",value:function(e){this.hasVideo&&(this.panoVideoRenderer=e,this.on(d["a"].Enter,e.onVideoPanoramasEnter.bind(e)),this.on(d["a"].Exit,e.onVideoPanoramasExit.bind(e)))}},{key:"getWaitDeferred",value:function(e){var t=this.resolutionPromise[this.id];t||(t={},this.resolutionPromise[this.id]=t);var i=t[e];return i||(i={deferred:$.Deferred(),active:!1},t[e]=i),i}},{key:"resetWaitDeferred",value:function(e){var t=this.getWaitDeferred(e);t.active=!1,t.deferred=$.Deferred()}},{key:"clearWaitDeferreds",value:function(){var e=this.resolutionPromise[this.id];for(var t in e||(e={},this.resolutionPromise[this.id]=e),e)if(e.hasOwnProperty(t)){var i=e[t];i.active=!1,i.deferred=$.Deferred()}}},{key:"onUploadAttemptedForAllTiles",value:function(e,t,i){if(e===this.id){var n=this.qualityManager.getPanoSize(E["a"].BASE);t===n&&this.shouldRedrawOnBaseLoaded&&(this.shouldRedrawOnBaseLoaded=!1,this.panoRenderer.resetRenderStatus(this.id,!0,!1),this.panoRenderer.renderPanoTiles(this.id,null,!0,!0))}}},{key:"onTileRendered",value:function(e,t,i,n){e===this.id&&this.emit(d["a"].TileLoaded,t,i,n)}},{key:"onPanoRendered",value:function(e,t,i,n){e===this.id&&(this.minimumTiledPanoLoaded=!0,this.updateSkyboxForZoomLevel(),t>this.highestPartialTileRenderOpCompleted&&(this.highestPartialTileRenderOpCompleted=t),!n&&t>this.highestFullTileRenderOpCompleted&&(this.highestFullTileRenderOpCompleted=t),this.emit("load",t),this.model.emit("load",this),this.emit(d["a"].LoadComplete,t,i))}},{key:"onVideoRendered",value:function(e,t){e.id==this.id&&this.emit(d["a"].VideoRendered,this,t)}},{key:"setZoomed",value:function(e){this.zoomed=e,this.updateSkyboxForZoomLevel(),e?this.model.showHighMap():this.model.hideHighMap()}},{key:"ensureSkyboxReadyForRender",value:function(){this.tiled||(this.solidSkybox.loaded||(this.solidSkybox.needsUpdate=!0),this.solidSkybox.loaded=!0)}},{key:"updateSkyboxForZoomLevel",value:function(){this.minimumTiledPanoLoaded&&this.model.updateProjectedPanos()}},{key:"getSkyboxTexture",value:function(){return this.tiled?this.minimumTiledPanoLoaded?this.zoomed&&this.qualityManager.maxRenderTargetSize>this.qualityManager.maxNavPanoSize?this.panoRenderer.zoomRenderTarget.texture:this.tiledPanoRenderTarget.texture:null:this.solidSkybox}},{key:"onTileRenderFail",value:function(e,t,i){e===this.id&&this.emit(d["a"].LoadFailed,t)}},{key:"isLoaded",value:function(e){if(this.tiled){if(e&&"string"==typeof e)throw new T["a"]("Wrong panoSize given to Panorama.isLoaded(); a tiled pano uses PanoSizeClass");return!!this.minimumTiledPanoLoaded&&(!e||this.highestPartialTileRenderOpCompleted>=e)}if(e&&"number"==typeof e)throw new T["a"]("Wrong panoSize given to Panorama.isLoaded(); a non-tiled pano uses high/low.");return!!this.solidSkybox.high||e in this.solidSkybox}},{key:"loadCube",value:function(e){if(this.isLoaded(e))return b["a"].info("Skipping load of pano, already loaded"),$.when();this.emit("loading",e),this.model.emit("loading",this);var t=this.getCubemapUrls(this.id,e);return"undefined"!=typeof k["store"].getters["scene/metadata"].imagesVersion&&(t+="?imagesVersion="+k["store"].getters["scene/metadata"].imagesVersion),$.when(w["a"].loadImage(t)).then(function(t){return this.solidSkybox[e]=t,this.solidSkybox.minFilter=THREE.LinearFilter,"high"!==e&&this.solidSkybox.high||(this.solidSkybox.image=this.solidSkybox[e],this.solidSkybox.low=null),this.solidSkybox.needsUpdate=!0,this.emit("load",e),this.model.emit("load",this),this}.bind(this),function(){b["a"].error("Downloading cubemap for pano",this.id,"failed"),this.failedLoadingAt=Date.now()}.bind(this),(function(){console.log("load cubeTex 出现问题?")}))}},{key:"getCubemapUrls",value:function(e,t){return y["a"].urls.panoImgPath+t+"/"+e+".jpg"}},{key:"findNeighourPanos",value:function(){if(this.isAligned())return this.model.panos.setNeighbour(this.id,this.id,!1),this.model.panos.forEach(function(e){if(e.isAligned()&&e!==this&&(!this.model.panos.neighbourMap[this.id]||void 0===this.model.panos.neighbourMap[this.id][e.id])){var t=this.position.distanceTo(e.position);if(t>x["a"].panoramaNeighbourMaxDistance)return this.model.panos.setNeighbour(this,e,!1),void i.raycastsSkipped++;var n=e.position.clone().sub(this.position).normalize(),o=new THREE.Raycaster(this.position,n.clone(),0,t),a=o.intersectObjects(this.model.colliders);i.raycastsDone++,this.model.panos.setNeighbour(this,e,0===a.length),x["a"].showNeighbourRaycasts&&(a.length?this.floor.model.add(new THREE.ArrowHelper(n,this.position,a[0].distance,16711680)):this.floor.model.add(new THREE.ArrowHelper(n,this.position,t,16777215,0,0)))}}.bind(this)),this.model.panos.neighbourMap[this.id]}},{key:"worldPosition",value:function(){return this.position}},{key:"isAligned",value:function(){return"360view"!=this.alignmentType}},{key:"addTextSprite",value:function(e,t){this.removeTextSprite();var i=document.createElement("canvas"),n=i.getContext("2d");i.width=256,i.height=256;var o="Arial",a=60;n.font="bold "+a+"px "+o,n.fillStyle="white";var r=n.measureText(e).width;n.fillText(e,(i.width-r)/2,(i.height+a)/2);var s=new THREE.Texture(i);s.needsUpdate=!0;var l=new THREE.SpriteMaterial({map:s,color:t||16428055});this.text3d=new THREE.Sprite(l),this.text3d.position.copy(this.skyboxMesh.position),this.floor.add(this.text3d)}},{key:"removeTextSprite",value:function(){this.text3d&&(this.floor.remove(this.text3d),this.text3d.material.dispose(),this.text3d=null)}},{key:"createLightCylinder",value:function(){var e=.22,t=1.8;if(!Q){for(var i=[[255,255,255,200],[255,255,255,0]],n=new Uint8Array(4*i.length),o=0;o<i.length;o++)n[4*o]=i[o][0],n[4*o+1]=i[o][1],n[4*o+2]=i[o][2],n[4*o+3]=i[o][3];var a=new THREE.DataTexture(n,1,i.length,THREE.RGBAFormat);a.minFilter=THREE.LinearFilter,a.magFilter=THREE.LinearFilter,a.needsUpdate=!0,Q=new THREE.MeshBasicMaterial({transparent:!0,side:THREE.DoubleSide,map:a,depthWrite:!1}),G=new THREE.CylinderBufferGeometry(e,e,t,30,1,!0),Y=new THREE.PlaneBufferGeometry(.5,.5,1,1);var r=U["default"].load(y["a"].getStaticResource("img/End_128.png")),s=THREE.UniformsUtils.clone(S["a"].waypoint.uniforms);s.map.value=r,s.color.value.set("#ffffff"),X=new THREE.RawShaderMaterial({vertexShader:S["a"].waypoint.vertexShader,fragmentShader:S["a"].waypoint.fragmentShader,uniforms:s,transparent:!0,depthWrite:!1,name:"footIcon1"})}var l=new THREE.Mesh(G,Q);l.position.copy(this.position),l.position.y=this.floorPosition.y+t/2+.1,this.floor.add(l);var c=new THREE.Mesh(Y,X);c.lookAt(new THREE.Vector3(0,1,0)),c.position.setY(-t/2),l.add(c),l.visible=!1,this.lightCylinder=l}}]),i}(EventEmitter);ee.raycastsSkipped=0,ee.raycastsDone=0,ee.filters={inDirection:function(e,t,i){return function(n){var o=n.position.clone().sub(e).normalize();return o.dot(t)>i}},inFloorDirection:function(e,t,i){return function(n){if(n.floorPositionFish)var o=n.floorPositionFish.clone().sub(e).setY(0).normalize();else o=n.floorPosition.clone().sub(e).setY(0).normalize();return o.dot(t)>i}},inPanoDirection:function(e,t,i){return i=x["a"].navigation.panoScores?x["a"].navigation.filterStrictness:i,function(n){var o=n.floorPosition.clone().sub(e).setY(0).normalize(),a=n.position.clone().sub(e).normalize();return o.dot(t.clone().setY(0).normalize())>i||a.dot(t)>i}},atFloor:function(e){return function(t){return!e||t.floor===e}},not:function(e){return function(t){return t!==e}},notIn:function(e){return function(t){return-1===e.indexOf(t)}},isLoaded:function(){return function(e){return e.isLoaded()}},isNotLoaded:function(){return function(e){return!e.isLoaded()}},isCloseEnoughTo:function(e,t){return function(i){return e.distanceTo(i.floorPositionFish||i.floorPosition)<t}},hasMinimumHeightDifferenceTo:function(e,t){return function(i){return Math.abs(i.position.y-e.y)>t}},isNotBehindNormal:function(e,t){var i=new THREE.Vector3;return t=t.clone(),function(n){var o=i.copy(n.position).sub(e).normalize();return o.dot(t)>0}},isNeighbourPanoTo:function(e){return function(t){return!e||!e.neighbourPanos||!!e.neighbourPanos[t.id]}},isNeighbourOfNeighbourTo:function(e){return function(t){return!!e.neighbourPanos[t.id]||e.neighbourUUIDs.some((function(i){var n=e.model.panos.get(i);return!!n&&n.neighbourPanos[t.id]}))}},isNotRecentlyFailed:function(e){return function(t){return Date.now()-t.failedLoadingAt>e}},isOnVisibleFloor:function(){return function(e){return!e.floor.hidden}},isPanoAligned:function(){return function(e){return e.isAligned()}},isInFanAngle:function(e,t,i){return function(n){var o=t.setY(0),a=n.position.clone().sub(e).setY(0);return o.angleTo(a)<=i}}},ee.sortFunctions={distanceToPoint:function(e){return function(t,i){return t.position.distanceTo(e)-i.position.distanceTo(e)}},floorDistanceToPoint:function(e){return function(t,i){return t.floorPosition.distanceTo(e)-i.floorPosition.distanceTo(e)}},choose:function(e){return function(t,i){return e.id===t.id?-1:e.id===i.id?1:0}},chooseWidget:function(e){return function(t,i){return e&&"videoMaker"==e.object.name?e.object.pano.id===t.id?(console.log("chose Current"),-1):e.object.pano.id===i.id?1:0:0}}},ee.scoreFunctions={distance:function(e,t){return t=t||x["a"].navigation.distanceFactor,function(i){return e?e.position.distanceTo(i.position)*t:0}},distanceSquared:function(e,t){return t=t||x["a"].navigation.distanceFactor,function(i){return e?e.position.distanceToSquared(i.position)*t:0}},direction:function(e,t){return function(i){var n=i.position.clone().sub(e).normalize();return n.dot(t)*x["a"].navigation.directionFactor}},angle:function(e,t){return function(i){var n=i.position.clone().sub(e).normalize();return n.angleTo(t)*x["a"].navigation.angleFactor}},inFieldOfView:function(e,t){return function(i){var n=i.position.clone().sub(e).normalize();return n.dot(t)>.75?10:-1}},optionality:function(e){return function(t){var i=t.neighbourUUIDs.filter((function(t){return!(t in e.neighbourUUIDs)&&t!==e.id}));return i.length*x["a"].navigation.optionalityFactor}},penalizeHeightDifferenceUnder:function(e,t){return function(i){return e.y-i.position.y<t?-20:0}}}},ed1e:function(e,t,i){"use strict";var n=i("89a2"),o=i.n(n);o.a},ef32:function(e,t,i){"use strict";var n={PanoRenderComplete:"panorama.render.complete",TileRenderFailure:"panorama.tile.render.failed",TileRenderSuccess:"panorama.tile.render.success",TileUploadAttempted:"panorama.tile.upload.attempted",UploadAttemptedForAllTiles:"panorama.upload.attempted.all.tiles",ZoomLevelRenderStarted:"panorama.zoom.render.started"};t["a"]=n},eff1:function(e,t,i){"use strict";i("6762"),i("2fdb"),i("28a5"),i("af56");var n=i("2909"),o=i("9ef6"),a=i("1787"),r=i("f121"),s=i("6860"),l=i("4eb1"),c=i("1970"),u=i("d9c2"),d=i("4c16"),h=new THREE.PlaneGeometry(o["a"].overlay.width,o["a"].overlay.height,1,1),p=new THREE.BoxBufferGeometry(o["a"].overlay.width,o["a"].overlay.height,o["a"].overlay.depth),f=Object(n["a"])(p.index.array);f.splice(24,6),p.setIndex(new THREE.BufferAttribute(new Uint16Array(f),1));var m=new THREE.MeshBasicMaterial({color:"#eeeeee",transparent:!0,opacity:.8}),v=(s["objects"].player,u["a"].detectAndroidMobile()&&u["a"].detectWeixin()&&!u["a"].detectWeixinMiniProgram()),g=v?new l["a"]:new c["a"];console.log("nonsupportH5Video? "+v);var y=function(e){THREE.Object3D.call(this),this.sid=e.sid,this.build(e),this.name="overlay_"+this.sid,this.floor=s["objects"].model.floors.get(e.floorIndex)||this.raycastToFindFloor(),this.updateVisibleOnFloor()};y.prototype=Object.create(THREE.Object3D.prototype),y.prototype.raycastToFindFloor=function(){this.floor;return this.floor=d["a"].raycastToFindFloor(this.plane.getWorldPosition()),this.floor||(console.error("Overlay raycastToFindFloor cannot find floor?"),this.floor=this.model.floors.first()),this.floor},y.prototype.updateVisibleOnFloor=function(e){s["objects"].model.currentFloor==this.floor||s["objects"].model.allFloorsVisible||"panorama"==s["objects"].player.modeTran.split("-")[1]||s["objects"].player.EditOverlay&&s["objects"].player.EditOverlay.editPlane==this?this.visible=!0:this.visible=!1},y.prototype.build=function(e){var t=new THREE.Mesh(h,new THREE.MeshBasicMaterial({color:"#00c8af",opacity:.4,transparent:!0,polygonOffset:!0,polygonOffsetFactor:-.9,polygonOffsetUnits:-4}));if(t.renderOrder=3,this.add(t),this.plane=t,s["objects"].overlayManager.add(this),e.media){if(e.media.includes("video"))e.media=g.getVideo(e.sid),e.type="video",e.media.addEventListener("ended",(function(){e.media.play(),e.media.paused?console.log("overlay没重复播放成功 需要点击"):console.log("重播放成功")}));else if(e.media.includes("photo")){var i=new Image;i.src=r["a"].getPublicResource("images/images"+r["a"].projectNum+"/overlay"+this.sid+".jpg?m="+(new Date).getTime()),e.media=i,e.type="photo"}t.material.opacity=1,t.material.color=new THREE.Color(1,1,1)}void 0==e.width&&(e.width=o["a"].overlay.width),void 0==e.height&&(e.height=o["a"].overlay.height),this.setFromInfo(e),e.hasBox&&this.addBox(!0)},y.prototype.setFromInfo=function(e){var t=this.plane;e.width&&(this.scale.setX(e.width/o["a"].overlay.width),this.width=e.width),e.height&&(this.scale.setY(e.height/o["a"].overlay.height),this.height=e.height),e.depth&&this.scale.setZ(e.depth/o["a"].overlay.depth,this.depth=e.depth),e.pos&&this.position.copy(e.pos),e.qua&&this.quaternion.copy(e.qua),e.type&&(t.material.map?t.material.map.image=e.media:("video"==e.type?t.material.map=new THREE.VideoTexture(e.media):t.material.map=a["default"].load(e.media),t.material.map.wrapS=t.material.map.wrapT=THREE.ClampToEdgeWrapping,t.material.map.minFilter=THREE.LinearFilter,t.material.map.magFilter=THREE.LinearFilter,t.material.map.generateMipmaps=!0),this.file=e.file),this.overlayType=e.type,!!this.hasBox!=!!e.hasBox&&this.addBox(!this.hasBox)},y.prototype.addBox=function(e){if(e!=!!this.hasBox){if(e){var t=new THREE.Mesh(p,m);t.position.set(0,0,o["a"].overlay.depth/2),t.renderOrder=3,this.plane.position.set(0,0,o["a"].overlay.depth),this.add(t),this.box=t}else this.plane.position.set(0,0,0),this.remove(this.box),this.box=null;this.hasBox=e,this.updateMatrixWorld()}},y.prototype.dispose=function(){this.plane.material.map,this.plane.material.dispose(),this.parent.remove(this)},t["a"]=y},f023:function(e,t){THREE.MaskPass=function(e,t){this.scene=e,this.camera=t,this.enabled=!0,this.clear=!0,this.needsSwap=!1,this.inverse=!1},THREE.MaskPass.prototype={render:function(e,t,i,n){var o,a,r=e.context;r.colorMask(!1,!1,!1,!1),r.depthMask(!1),this.inverse?(o=0,a=1):(o=1,a=0),r.enable(r.STENCIL_TEST),r.stencilOp(r.REPLACE,r.REPLACE,r.REPLACE),r.stencilFunc(r.ALWAYS,o,4294967295),r.clearStencil(a),e.render(this.scene,this.camera,i,this.clear),e.render(this.scene,this.camera,t,this.clear),r.colorMask(!0,!0,!0,!0),r.depthMask(!0),r.stencilFunc(r.EQUAL,1,4294967295),r.stencilOp(r.KEEP,r.KEEP,r.KEEP)}},THREE.ClearMaskPass=function(){this.enabled=!0},THREE.ClearMaskPass.prototype={render:function(e,t,i,n){var o=e.context;o.disable(o.STENCIL_TEST)}}},f121:function(e,t,i){"use strict";i("7f7f"),i("a481");var n=i("7f46"),o=i("617a"),a={oem:"localshow",name:Object({NODE_ENV:"production",VUE_APP_CDN_URL:"",VUE_APP_HIDE_MENU:"scene,decor,virtual,vrhouse,business",VUE_APP_INCLUDEAPPS:"embed,shop,decor,discover,reserve,grave,fire-control,rtc-live",VUE_APP_LANGS:"zh#中文,en#英文,de#德文,fr#法文,jp#日文,kr#韩文,es#西班牙文",VUE_APP_LOCAL_PAGE:"embed",VUE_APP_OEM:"localshow",VUE_APP_OEM_NAEM:"本地版展示页面",VUE_APP_OPENAPI:"",VUE_APP_RTC_SOCKETURL:"",VUE_APP_SERVER_URL:"",VUE_APP_SHOP_ADMIN_URL:"",VUE_APP_SHOP_SOCKETURL:"",VUE_APP_SHOP_URL:"",VUE_APP_STATIC_DIR:"static",VUE_APP_STATIC_URL:"static/",VUE_APP_TESTKEY:"test",VUE_APP_TESTPWD:"11111111Aa",VUE_APP_TESTUSR:"13112311178",VUE_APP_VRHOUSE_OPENAPI:"",VUE_APP_VRHOUSE_URL:"",BASE_URL:""}).VUE_APP_NAME||o["a"].urlQueryValue("appname")||window.__app_name||null,appenv:o["a"].urlQueryValue("env"),lang:"zh",isTyping:!1,isDisableControl:!1,isLogin:!1,isEdit:!0,isMobile:!1,supportsTiles:!1,cameraType:"pro",panoType:"panorama",fishState:!1,timestamp:Date.now(),baseURL:"",baseCDN:"",cdnURL:"",staticURL:"static/",showLogin:Object({NODE_ENV:"production",VUE_APP_CDN_URL:"",VUE_APP_HIDE_MENU:"scene,decor,virtual,vrhouse,business",VUE_APP_INCLUDEAPPS:"embed,shop,decor,discover,reserve,grave,fire-control,rtc-live",VUE_APP_LANGS:"zh#中文,en#英文,de#德文,fr#法文,jp#日文,kr#韩文,es#西班牙文",VUE_APP_LOCAL_PAGE:"embed",VUE_APP_OEM:"localshow",VUE_APP_OEM_NAEM:"本地版展示页面",VUE_APP_OPENAPI:"",VUE_APP_RTC_SOCKETURL:"",VUE_APP_SERVER_URL:"",VUE_APP_SHOP_ADMIN_URL:"",VUE_APP_SHOP_SOCKETURL:"",VUE_APP_SHOP_URL:"",VUE_APP_STATIC_DIR:"static",VUE_APP_STATIC_URL:"static/",VUE_APP_TESTKEY:"test",VUE_APP_TESTPWD:"11111111Aa",VUE_APP_TESTUSR:"13112311178",VUE_APP_VRHOUSE_OPENAPI:"",VUE_APP_VRHOUSE_URL:"",BASE_URL:""}).VUE_APP_SHOW_LOGIN,projectNum:o["a"].urlQueryValue("m"),jobId:"dacf7dfa24ae47fab8fcebfe4dc41ab9",version:Date.now(),TagStyleTex:{},rebuild:!1,floorLogo:{name:"floorLogoImg.png"},openToLinkScene:o["a"].urlHasValue("openToLinkScene"),pages:{get Login(){return Object({NODE_ENV:"production",VUE_APP_CDN_URL:"",VUE_APP_HIDE_MENU:"scene,decor,virtual,vrhouse,business",VUE_APP_INCLUDEAPPS:"embed,shop,decor,discover,reserve,grave,fire-control,rtc-live",VUE_APP_LANGS:"zh#中文,en#英文,de#德文,fr#法文,jp#日文,kr#韩文,es#西班牙文",VUE_APP_LOCAL_PAGE:"embed",VUE_APP_OEM:"localshow",VUE_APP_OEM_NAEM:"本地版展示页面",VUE_APP_OPENAPI:"",VUE_APP_RTC_SOCKETURL:"",VUE_APP_SERVER_URL:"",VUE_APP_SHOP_ADMIN_URL:"",VUE_APP_SHOP_SOCKETURL:"",VUE_APP_SHOP_URL:"",VUE_APP_STATIC_DIR:"static",VUE_APP_STATIC_URL:"static/",VUE_APP_TESTKEY:"test",VUE_APP_TESTPWD:"11111111Aa",VUE_APP_TESTUSR:"13112311178",VUE_APP_VRHOUSE_OPENAPI:"",VUE_APP_VRHOUSE_URL:"",BASE_URL:""}).VUE_APP_LOGIN_URL?Object({NODE_ENV:"production",VUE_APP_CDN_URL:"",VUE_APP_HIDE_MENU:"scene,decor,virtual,vrhouse,business",VUE_APP_INCLUDEAPPS:"embed,shop,decor,discover,reserve,grave,fire-control,rtc-live",VUE_APP_LANGS:"zh#中文,en#英文,de#德文,fr#法文,jp#日文,kr#韩文,es#西班牙文",VUE_APP_LOCAL_PAGE:"embed",VUE_APP_OEM:"localshow",VUE_APP_OEM_NAEM:"本地版展示页面",VUE_APP_OPENAPI:"",VUE_APP_RTC_SOCKETURL:"",VUE_APP_SERVER_URL:"",VUE_APP_SHOP_ADMIN_URL:"",VUE_APP_SHOP_SOCKETURL:"",VUE_APP_SHOP_URL:"",VUE_APP_STATIC_DIR:"static",VUE_APP_STATIC_URL:"static/",VUE_APP_TESTKEY:"test",VUE_APP_TESTPWD:"11111111Aa",VUE_APP_TESTUSR:"13112311178",VUE_APP_VRHOUSE_OPENAPI:"",VUE_APP_VRHOUSE_URL:"",BASE_URL:""}).VUE_APP_LOGIN_URL:a.isMobile?"mobile.html#/login":"/"},get NotFound(){return a.isMobile?"mobile.html#/404":"main.html#/404"},EditPC:"epc.html",ShowPC:"spc.html",EditMobile:"emobile.html",ShowMobile:"smobile.html"},getStaticResource:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return[this.staticURL].concat(t).join("")},getServerResource:function(e){return 0===e.indexOf("http")||(e="".concat(location.protocol,"//").concat(location.hostname).concat(location.port?":"+location.port:"","/scene/").concat(e).replace("#m#",this.projectNum)),e},getPublicResource:function(e,t){return e?(t&&(e=Object(n["a"])(e,{_:this.version})),0===e.indexOf("http")||0===e.indexOf("//")?e:this.cdnURL+e.replace("#m#",this.projectNum)):""},getPublishResource:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e?(e=e.replace("#m#",this.projectNum),e=Object(n["a"])(e,{_:t||this.version}),0===e.indexOf("http")?e:this.isEdit?this.getServerResource(e,!1):this.cdnURL+e):""},getModelPrefixFuc:function(){var e=i("6860").store,t=e.getters["scene/metadata"];return a.isEdit&&void 0!=t.floorEditVer&&t.floorEditVer!=t.floorPublishVer?this.getServerResource.bind(this):this.getPublicResource.bind(this)},getModelPost:function(){var e=i("6860").store,t=e.getters["scene/metadata"],n=a.isEdit?t.floorEditVer||0:t.floorPublishVer||0;return n},get urls(){return{mesh:this.getModelPrefixFuc()("images/images".concat(this.projectNum,"/").concat(this.jobId,"_50k.dam"))+"?m="+this.getModelPost(),meshTexture:this.getModelPrefixFuc()("images/images".concat(this.projectNum,"/").concat(this.jobId,"_50k_texture_jpg_high1/")),floorJson:this.getPublishResource("data/data".concat(a.projectNum,"/floor.json")),hostfloorJson:this.getPublicResource("data/data".concat(a.projectNum,"/houst_floor.json"))+"?_="+this.version,initfloorJson:this.getPublicResource("data/data".concat(a.projectNum,"/floorplan_cad.json"))+"?_="+this.version,visionModeldata:this.getPublicResource("images/images".concat(this.projectNum,"/vision.modeldata?_=").concat(this.version)),visionModeldataAssist:this.getPublicResource("images/images".concat(this.projectNum,"/vision2.modeldata?_=").concat(this.version)),panoImgPath:this.getPublicResource("images/images".concat(this.projectNum,"/pan/")),tileImgPath:this.getPublicResource("images/images".concat(this.projectNum,"/")),get marker(){var e=i("6860").store,t=e.getters["scene/metadata"];return t.markerLogo&&"user"==t.markerLogo?a.getPublishResource("images/images".concat(a.projectNum,"/marker.png")):a.getStaticResource("img/marker.png")},markerHasVideo:this.getStaticResource("img/marker-hasvideo.png"),texture:this.getStaticResource("img/texture.jpg"),reticule:this.getStaticResource("img/reticule.png"),getFloorLogoPath:function(e){return e==a.floorLogo.name?a.isEdit?"scene/images/images".concat(a.projectNum,"/").concat(e,"?_=").concat(a.version):a.getPublicResource("images/images".concat(this.projectNum,"/").concat(e,"?_=").concat(a.version)):a.getStaticResource("img/floorlogo/".concat(e))},get sceneInfo(){return"localshow"==a.oem?"data/data".concat(a.projectNum,"/getInfo.json?_=").concat(a.timestamp):a.isEdit?"scene/data/data".concat(a.projectNum,"/scene.json?_=").concat(a.timestamp):"api/scene/getInfo?num=".concat(a.projectNum,"&_=").concat(a.version)},getData:function(e,t){var i=void 0!=t?t:a.version;return a.isEdit?"scene/data/data".concat(a.projectNum,"/").concat(e,"?_=").concat(i):a.getPublicResource("data/data".concat(a.projectNum,"/").concat(e,"?_=").concat(i))},getImage:function(e){return a.isEdit?"images/images".concat(a.projectNum,"/").concat(e,"?_=").concat(a.version):a.getPublicResource("images".concat(a.projectNum,"/").concat(e,"?_=").concat(a.version))},getHotMapping:function(e){return"scene/data/data".concat(a.projectNum,"/mapping/").concat(e,".json")},getGuide:function(e){return a.isEdit?a.getServerResource("".concat(e,"?_=").concat(a.version)):a.getPublicResource("".concat(e,"?_=").concat(a.version))}}}};a.antialias=!a.isMobile,t["a"]=a},f57a:function(e,t,i){},f708:function(e,t,i){"use strict";i.d(t,"a",(function(){return d})),i.d(t,"b",(function(){return h})),i.d(t,"d",(function(){return p})),i.d(t,"c",(function(){return f}));var n=i("c75e"),o=i("617a"),a=i("ff11"),r=navigator.userAgent||navigator.vendor||window.opera;function s(){return!(!/iPad|iPhone|iPod/.test(r)||window.MSStream)}function l(){return/android/i.test(r)}var c=o["a"].urlHasValue("android");function u(e){try{if(s())window.webkit.messageHandlers.inappbrowserbridge.postMessage(e);else if(l())if(c)switch(e){case"Back":AndroidNative.Back();break;case"Share":AndroidNative.Share();break}else UnityInAppBrowser.sendMessageFromJS(e)}catch(t){console.warn(t)}}window.appSendMsgBack=function(e,t){console.log("appSendMsgBack: "+e,t),n["a"].emit("app-"+e,t)},n["a"].on("app-onResume",(function(){console.log("appMusicPlay"),a["a"].resume()})),n["a"].on("app-onStop",(function(){console.log("appMusicPause"),a["a"].isPlaying&&a["a"].pause(!0)}));var d=o["a"].urlHasValue("app")&&!o["a"].urlHasValue("appname"),h=/MicroMessenger/gi.test(window.navigator.userAgent),p=o["a"].urlHasValue("notch",!0);function f(e){console.log("SendToApp"),console.log(e),u(e)}},f715:function(e,t,i){"use strict";i("673e"),i("7514"),i("9b24");var n,o=i("cd18"),a=i("4c16"),r=(i("f121"),i("3f1a")),s=i("6860");function l(e){e=e||{},n||(n=s["objects"].player),this.domParent=e.domParent,this.pos3d=e.pos3d,this.state="static",this.clickFuc=!1,e.elem?this.elem=e.elem:(this.elem=$('<div class="staticSpot hide "><div class="inside"></div><div class="point"></div><div class="around"><div class="iconfont icon_top"></div><div class="iconfont icon_top"></div><div class="iconfont icon_top"></div><div class="iconfont icon_top"></div></div></div>'),this.domParent&&this.domParent.append(this.elem)),this.elem.belongSpot=this,this.title=e.title||"",this.content=e.content||"",this.type=e.type||"hotspot",this.style=e.style,this.camera=e.camera,this.enable=!1,e.src&&this.elem.find(".inside").css("background-image","url("+e.src+")"),"label"==this.type?(this.text=e.text,this.elem.innerText=this.text,dom.addClass(this.elem,"label")):this.elem.addClass("markspot"),e.imgSrc&&(this.img=new Image,this.img.src=e.imgSrc),e.index&&(this.index=e.index)}l.prototype.becomeReal=function(e){o["a"].getRandomSid();var t=s["objects"].tagManager.markTag;return e&&"static"==e||(t.state=""),t.rePos(this.pos3d),r["default"].hotRePos||n.tagManager.addTag(t),t.snapInfo={standPos:n.position.clone()},t.raycastToFindFloor(),t.setVisiblePanos(),t},l.prototype.hotspotDragBegin=function(e){this.belongSpot.player.flying||(this.belongSpot.player.hotspotDrag.mouseinitX=e.clientX,this.belongSpot.player.hotspotDrag.mouseinitY=e.clientY,this.belongSpot.player.hotspotDrag.transformX=this.belongSpot.transformX,this.belongSpot.player.hotspotDrag.transformY=this.belongSpot.transformY,this.belongSpot.state="drag",this.belongSpot.player.dragSpot=this.belongSpot,dom.addClass(this,"drag"))},l.prototype.enlarge=function(){var e=new Image;e.src=this.img?this.img.src:"images/default.jpg";var t=dom.id("spotLarge"),i=dom.cla("inner",t)[0];i.appendChild(e);var o=dom.cla("replaceImg",this.elem)[0],a=n.imgRect=o.getBoundingClientRect();dom.removeClass(t,"hide"),i.style.left=a.left+"px",i.style.top=a.top-(window.innerHeight-n.domElement.clientHeight)+"px",i.style.width=a.width+"px",i.style.height=a.height+"px",setTimeout(function(){var o=i.clientWidth/i.clientHeight,a=n.domElement.clientWidth/n.domElement.clientHeight,r=.95,s=1.5;if(o>=a){var l=Math.min(n.domElement.clientWidth*r,e.naturalWidth*s);i.style.width=l+"px",i.style.height=l/o+"px"}else{var c=Math.min(n.domElement.clientHeight*r,e.naturalHeight*s);i.style.height=c+"px",i.style.width=c*o+"px"}i.style.left="50%",i.style.top="50%",dom.addClass(t,"center")}.bind(this),50)},l.prototype.setPosGets=function(e){for(var t in this.posGets={list:[],length:2},e)this.posGets[t]=(new THREE.Vector3).fromArray(e[t]),this.posGets.list.push(t)};var c=function(e,t){return Math.abs(e-t)<1e-7},u=function(e){return 180*Math.acos(e)/Math.PI};l.prototype.computeHotPos2=function(e){if(e=e||{},void 0!=e.A)var t=e.A,i=e.B,n=e.p1,o=e.p2;else t=r["default"].spotPosInfo.panoA.position.clone(),i=r["default"].spotPosInfo.panoB.position.clone(),n=r["default"].spotPosInfo.clickA,o=r["default"].spotPosInfo.clickB;if(t.equals(i))return n.clone();var a=n.clone().sub(t).normalize(),s=o.clone().sub(i).normalize(),l=Math.abs(a.dot(s));console.log("真实两线夹角: "+u(l)+"("+l+")");var d=function(){var e,a=n.x-t.x,r=n.y-t.y,s=n.z-t.z,l=o.x-i.x,u=o.y-i.y,d=o.z-i.z,h=t.x-i.x,p=t.y-i.y,f=t.z-i.z,m=a*a+r*r+s*s,v=a*l+r*u+s*d,g=l*l+u*u+d*d,y=a*h+r*p+s*f,b=l*h+u*p+d*f,w=m*g-v*v,E=w,T=w,P=0,x=0,k=function(t){e=(1==t?n:o).clone(),console.log(e+" 在后方交点,使用点"+t)}.bind(this);if(c(w,0))P=0,E=1,x=b,T=g;else if(P=v*b-g*y,x=m*b-v*y,P<0)return k(1),e;if(x<0)return k(2),e;var R=0,_=0;R=c(P,0)?0:P/E,_=c(x,0)?0:x/T;var S=new THREE.Vector3(t.x+R*a,t.y+R*r,t.z+R*s),M=new THREE.Vector3(i.x+_*l,i.y+_*u,i.z+_*d);return S.clone().add(M).multiplyScalar(.5)},h=d();return e&&e.dontRestric||(h=this.restricPosAtRoom(h)),e&&e.onlyGetPos||(this.pos3d=h),h},l.prototype.restricPosAtRoom=function(e){var t=s["objects"].player.currentPano.position,i=s["objects"].player.model.wallManager.roomInfo&&s["objects"].player.model.wallManager.roomInfo.oriRoomGroup;if(i){i.visible=!0;var n=a["a"].ifIntersectChunks(t,e,{model:i.children});if(n&&n.length){console.log("热点飘出房间");var o=n[0].point.clone().setY(n[0].point.y+.001);e.copy(o)}i.visible=!1}else{var r=e,l=new THREE.Raycaster(t,r.clone().sub(t).normalize(),0,t.distanceTo(r)),c=l.intersectObjects(s["objects"].player.model.chunks.concat([s["objects"].player.model.skybox]));c&&c.length&&(console.log("热点飘出skybox外,矫正:"+e.toArray()+" --\x3e "+c[0].point.toArray()),e.copy(c[0].point))}return e},l.prototype.updateHotspot2dPos=function(){if(this.pos3d&&"drag"!=this.state&&"none"!=this.elem[0].display&&this.enable){var e=this.pos3d.clone().applyMatrix4(n.model.matrixWorld),t=n.position.distanceTo(e),i=a["a"].getPos2d(e,this.camera,this.domParent[0]);if(i.trueSide){if(this.elem.removeClass("hide"),this.transformX=i.pos.x-this.domParent.width()/2,this.transformY=i.pos.y-this.domParent.height()/2,"real"===this.state)var o=this.scale1*n.k/t;else if("hover"===this.state||"pin"===this.state)o=this.scale1*this.scale2*n.k/t;this.elem.css({transform:"translate("+this.transformX+"px,"+this.transformY+"px)"+("real"===this.state||("hover"===this.state||"pin"===this.state)&&o>this.scale1?" scale("+o+","+o+")":"")})}else this.elem.addClass("hide")}},t["a"]=l},f76f:function(e,t,i){var n={"./Partnerkankan":["f20f","chunk-2d22c0b8"],"./Partnerkankan.js":["f20f","chunk-2d22c0b8"],"./Partnermingyuan":["2e4b","chunk-2d0bdd57"],"./Partnermingyuan.js":["2e4b","chunk-2d0bdd57"]};function o(e){if(!i.o(n,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=n[e],o=t[0];return i.e(t[1]).then((function(){return i(o)}))}o.keys=function(){return Object.keys(n)},o.id="f76f",e.exports=o},f876:function(e,t,i){"use strict";i.d(t,"a",(function(){return w}));var n=i("2b0e"),o=function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.display?i("popup",{ref:"Message"},[i("div",{staticClass:"ui-view-loading"})]):e._e()},a=[],r=i("fa5b"),s={name:"ui-view-loading",components:{Popup:r["a"]},data:function(){return{display:!1,duration:0}},methods:{show:function(){this.display=!0},hide:function(){var e=this;setTimeout((function(){e.display=!1}),this.duration)}}},l=s,c=(i("c840"),i("2877")),u=Object(c["a"])(l,o,a,!1,null,"b4537446",null),d=u.exports,h=function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.display?i("popup",{ref:"Message"},[i("div",{staticClass:"ui-waiting"},[i("div",{staticClass:"spinner"},[i("div",{staticClass:"bounce1"}),i("div",{staticClass:"bounce2"}),i("div",{staticClass:"bounce3"})])])]):e._e()},p=[],f={name:"ui-waiting",components:{Popup:r["a"]},data:function(){return{display:!1,duration:0}},methods:{show:function(){var e=this;this.$nextTick((function(){return e.display=!0}))},hide:function(){var e=this;this.$nextTick((function(){return e.display=!1}))}}},m=f,v=(i("15d7"),Object(c["a"])(m,h,p,!1,null,"46d0cb4b",null)),g=v.exports,y=(n["default"].extend(d),n["default"].extend(g)),b=function(){var e=(new y).$mount();return document.body.appendChild(e.$el),e};var w=b()},fa04:function(e,t,i){"use strict";i("6b54"),i("2397"),i("7f7f"),i("28a5"),i("96cf");var n=i("1da1"),o=i("d4ec"),r=i("bee2"),s=i("257e"),c=i("262e"),u=i("99de"),h=i("7e84"),p=i("ade3"),f=i("9ef6"),m=(i("6762"),i("2fdb"),i("7514"),i("673e"),i("20d6"),i("55dd"),i("ac6a"),i("6860")),v=i("aed5"),y=i("8eb6"),b=i("aeb9"),w=i("076a"),E=i("b235"),T=i("2d47"),P=i("1787"),x=i("f121");function k(e){var t=R();return function(){var i,n=Object(h["a"])(e);if(t){var o=Object(h["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(u["a"])(this,i)}}function R(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var _=function(e){Object(c["a"])(i,e);var t=k(i);function i(e){var n;Object(o["a"])(this,i);var a=THREE.UniformsUtils.clone(y["a"].waypoint.uniforms);return a.map.value=P["default"].getTexture(x["a"].urls.reticule),a.opacity.value=0,a.color.value.set(f["a"].reticuleColor),n=t.call(this,new THREE.PlaneBufferGeometry(.4,.4,1,1),new THREE.RawShaderMaterial({side:THREE.DoubleSide,depthWrite:!1,depthTest:!1,transparent:!0,vertexShader:y["a"].waypoint.vertexShader,fragmentShader:y["a"].waypoint.fragmentShader,uniforms:a,name:"waypoint",opacity:0})),n.layers.set(b["a"].RETICULE),n.renderOrder=w["a"].reticule,n.player=e,n.direction=new THREE.Vector3,n.hidden=!0,n.mouseLastMoveTime=Date.now(),n}return Object(r["a"])(i,[{key:"move",value:function(e,t,i){this.hidden=i,this.mouseLastMoveTime=Date.now()}},{key:"hide",value:function(){this.hidden||(this.hidden=!0,E["a"].start(T["a"].property(this.material.uniforms.opacity,"value",0),f["a"].reticuleOpacityTransitionTime))}},{key:"show",value:function(){this.hidden=!1,this.material.opacity<=0&&E["a"].start(T["a"].property(this.material.uniforms.opacity,"value",f["a"][this.player.mode].reticuleOpacity),f["a"].reticuleOpacityTransitionTime)}},{key:"update",value:function(){Date.now()-this.mouseLastMoveTime>f["a"].hideReticuleTimeout&&!this.hidden&&this.hide()}},{key:"updatePosition",value:function(e,t){if(!this.hidden){if(!t)return this.hide();var i=t.point,n=e.distanceTo(i),o=1+.01*n;n<1&&(o-=1-n),this.show(),this.scale.set(o,o,o),this.direction=this.direction.multiplyScalar(.8),this.direction.add(t.face.normal.clone().multiplyScalar(.2)),this.position.copy(i).add(t.face.normal.clone().multiplyScalar(.01)),this.lookAt(this.position.clone().add(this.direction))}}}]),i}(THREE.Mesh),S=i("e1c1"),M=(i("0b21"),i("3f2a")),A=i("e9e5"),O=i("823b"),C=i("cd18"),D=i("80c5"),V=i("b511"),j=i("1158"),L=i("4a7a"),F=i("bc19"),H={NONE:0,MIDDLE:1,END:2,BEGINNING:3,FADEIN:4},z=H,N=i("3dac"),B=i("dfd6"),U=function(){function e(t,i,n){Object(o["a"])(this,e),Object(p["a"])(this,"flightStepWalk",function(e,t,i){var n=.001,o=1,a=1.2,r=new THREE.Vector3,s=new THREE.Vector3,c=function(e,t){var i=Math.min(this.player.position.distanceTo(e.position),f["a"].transition.flytimeMaxDistanceThreshold),l=i*f["a"].transition.flytimeDistanceMultiplier+f["a"].transition.flyTime;s.copy(M["a"].FORWARD),this.player.getDirection(s),r.copy(t).sub(e.position).normalize();var c=r.dot(s),u=Math.acos(c),d=u/l;return d>n&&(l*=d/n,u<o&&(l*=a)),l};return function(e,t,i){if(this.warpInterrupted)i&&i();else if(this.activeTransType!==l.WALK)this._clearWarpShading(),this._warpStopFlying(),this.player.spider.draw(),this.placeCpm(),i&&i();else if(this.player.currentPano!==e){var n={pano:e,lookAtPoint:t,duration:null,maxDistanceOverride:f["a"].warp.walkMaxDist,skipWarpingCheck:!1,constantMoveSpeed:!0};n.duration=c.call(this,e,t),this.player.nonInterruptingFlyToPano(n,i)}else i&&i()}}()),Object(p["a"])(this,"warpTravel_WALK",function(){var e=[];return function(t){var i=this.player.model.panos;e.length=0;for(var n=null,o=!1,a=0;a<this.nodes.length;a++){var r=this.nodes[a],s=i.get(r);this.nodes.length,o=n&&s.position.distanceTo(n.position)<f["a"].warp.walkMinDist,n&&o||(e.push(r),n=s)}o&&this.nodes.length>1&&(e[e.length-1]=this.nodes[this.nodes.length-1]);var l=e.length,c=i.get(e[l-1]),u=new Array(l+1);u[u.length-1]=function(){t&&t()}.bind(this);for(var d=l-1,h=u.length-1;h>0;h-=1){var p=e[d];c=i.get(p);var m=new THREE.Vector3;this.getLookAtForWalkingTourNode(e,d,m),u[h-1]=this.makeWalkFlightFunc(c,m,u[h]),d--}u[0]()}}()),Object(p["a"])(this,"getLookAtForWalkingTourNode",function(){var e=new THREE.Vector3,t=new THREE.Vector3,i=new THREE.Vector3,n=new THREE.Vector3,o=new THREE.Vector3,a=.65,r=.75,s=.2,l=.4,c=.2,u=3;return function(d,h,p){var f=d.length;if(h>=f)return!1;var m=1,v=1;t.set(0,0,0),o.set(0,0,0);for(var g=null,y=h;y<h+u&&!(y>=f);y++){if(g=this.player.model.panos.get(d[y]),this.getOrientationForWalkingTourNode(d,y,i),y===h&&e.copy(i),n.copy(i),y>h){var b=n.dot(e)<a;m*=b?s:r,v*=b?c:l}i.multiplyScalar(m),t.add(i),o.lerp(g.position,v)}return t.normalize(),p.copy(o),p.add(t),!0}}()),this.obj3d=null,this.nodes=[],this.colorHull=[],this.shortPaths={},this.floorHull=null,this.cameraHull=null,this.floorPathDistance=0,this.floorCurvePoints=null,this.floorCurveColors=null,this.camCurvePoints=null,this.warpDestHeroLoc=null,this.warpDestPano=null,this.warpPathPoints=null,this.warpPathLengths=[0],this.warpLength=0,this.closeWarpDistance=4,this.UP=M["a"].UP.clone(),this.longestStep=0,this.upcomingTransType=null,this.burnsDir=1,this.prevNextDist=0,this.nextI=0,this.activeTransType=null,this.lastTransType=null,this.bunnyObj=null,this.director=t,this.player=i,this.playerControls=n,this.modelManager=i.modelManager,this.updateModel(),this.bindEvents(),this.warping=!1,this.waitingToWarp=!1,this.warpInterrupted=!1,this.warpInterruptionBlackoutStyle=null,this.warpInterruptionTravelTime=null,this.pathImg={},this.brushPrefs={linewidth:7,strokeWidth:15,cvSegments:48,paveStep:.1,paveWidth:.2,lookBlendDist:3,maxTurn:THREE.Math.degToRad(2)},this.hintPrefs={rad:.18,width:.0125,depth:.0625,setBack:-.04,markRad:.25,markInnerRad:.16},this.init()}return Object(r["a"])(e,[{key:"init",value:function(){this.pathImg.pathEnd=C["a"].loadTextureFromCache(x["a"].getStaticResource("img/pathEnd.png"))}},{key:"setScene",value:function(e){this.createCpm(e)}},{key:"updateModel",value:function(){this.model=this.modelManager.getActiveModel()}},{key:"bindEvents",value:function(){this.modelManager.on(A["a"].ActiveModelChanged,this.updateModel.bind(this))}},{key:"pointPathDistance",value:function(e){for(var t=0,i=1;i<e.length;i+=1)t+=e[i-1].distanceTo(e[i]);return t}},{key:"pointPathLengths",value:function(e){for(var t=[0],i=1;i<e.length;i+=1)t.push(t[i-1]+e[i-1].distanceTo(e[i]));return t}},{key:"interpAlongPath",value:function(e,t,i){var n,o=new THREE.Vector3,a=t[t.length-1];if(i<1){n=i*a;for(var r=1;r<t.length;r+=1)if(t[r]>n){var s=(n-t[r-1])/(t[r]-t[r-1]);return o.copy(e[r]),o.sub(e[r-1]),o.multiplyScalar(s),o.add(e[r-1]),o}}else o.copy(e[e.length-1]);return o}},{key:"pathHeight",value:function(){return f["a"].path.height}},{key:"createBunnyObj",value:function(e){this.bunnyObj||(this.bunnyObj=new THREE.AxesHelper(.1),this.bunnyObj.visible=f["a"].warp.showBunny),this.bunnyObj.parent&&this.bunnyObj.parent.remove(this.bunnyObj),e.add(this.bunnyObj)}},{key:"createCpm",value:function(e){if(!this.currentPanoMarker){var t=this.makeWaypointObj(this.pathImg.pathEnd,"Current");t.material.uniforms.opacity.value=0,this.currentPanoMarker={mesh:t,placed:!1}}this.currentPanoMarker.mesh.parent&&this.currentPanoMarker.mesh.parent.remove(this.currentPanoMarker.mesh),this.placeCpm(),this.currentPanoMarker.mesh.parent||e.add(this.currentPanoMarker.mesh)}},{key:"placeCpm",value:function(){if(f["a"].path.mapGuides&&this.player.currentPano&&this.player.currentPano.isAligned()){var e=this.player.currentPano.floor;this.currentPanoMarker.mesh.parent!==this.player.currentPano.floor&&(this.currentPanoMarker.mesh.parent&&this.currentPanoMarker.mesh.parent.remove(this.currentPanoMarker.mesh),e.add(this.currentPanoMarker.mesh)),this.currentPanoMarker.mesh.position.copy(this.player.currentPano.floorPosition).sub(e.position),this.currentPanoMarker.mesh.position.y+=this.pathHeight(),this.currentPanoMarker.placed=!0}else this.popOutCpm()}},{key:"fadeInCpm",value:function(e){this.player.mode===D["a"].PANORAMA&&this.player.currentPano&&!this.player.currentPano.isAligned()||f["a"].path.mapGuides&&this.currentPanoMarker.placed&&E["a"].start(T["a"].property(this.currentPanoMarker.mesh.material.uniforms.opacity,"value",1),e)}},{key:"fadeOutCpm",value:function(e){E["a"].start(T["a"].property(this.currentPanoMarker.mesh.material.uniforms.opacity,"value",0),e)}},{key:"popInCpm",value:function(){f["a"].path.mapGuides&&this.currentPanoMarker.placed&&this.fadeInCpm(2)}},{key:"popOutCpm",value:function(){this.fadeOutCpm(2)}},{key:"buildWarpDestinationDescriptor",value:function(e,t,i,n,o,a){var r={cameraMode:n,position:e,quaternion:t,panoId:i,orthoZoom:a,floorVisibility:o,thumbUrl:null,name:null};return new N["a"](r)}},{key:"buildWarpDestinationDescriptorFromHero",value:function(e){return this.buildWarpDestinationDescriptor(e.position,e.quaternion,this.getHeroId(e),e.cameraMode,e.floorVisibility,e.orthoZoom)}},{key:"setWarpDestination",value:function(e){this.warpDestHeroLoc=e}},{key:"setWarpDestinationByHeroIndex",value:function(e){var t=this.getHeroDescriptorByHeroIndex(e);return null!==t&&(this.setWarpDestination(t),!0)}},{key:"setWarpDestinationByPano",value:function(e,t){var i=this.model.panos.get(e.id);return!!i&&this.setWarpDestinationByPanoId(e.id,t)}},{key:"setWarpDestinationByPanoId",value:function(e,t){var i=this.model.panos.get(e);if(i){t=t||new THREE.Quaternion;var n=this.buildWarpDestinationDescriptor(i.position,t,i.id,"panorama",[],-1);return this.setWarpDestination(n),!0}return!1}},{key:"getHeroDescriptorByHeroIndex",value:function(e){var t=m["objects"].play.heroCount();if(null!==this.warpDestHeroLoc&&t<2)return O["a"].info("ShowPath.getHeroDescriptorByHeroIndex() -> Only one hero location is available."),this.model.getHeroDescriptorByIndex(0);var i=this.model.getHeroDescriptorByIndex(e);i=B["a"].getPlayDataItem(e);var n=m["objects"].store.getters["guide/plays"];1==n[e].type&&(i=B["a"].getPlayDataItem(e,0));var o=B["a"].convertHighlight(i),a=new N["a"](o);if(a){var r=a.isPano()?a.panoId:a.cameraMode;O["a"].debug('ShowPath.getHeroDescriptorByHeroIndex() -> New brush/warp destination: "'+r+'" out of '+t+" choices.")}return a}},{key:"getHeroDescriptorByPano",value:function(e){var t=this.model.panos.get(e.id);return t?this.getHeroDescriptorByPanoId(e.id):null}},{key:"getHeroDescriptorByPanoId",value:function(e){var t=this.getHeroIndexFromPanoId(e);return this.getHeroDescriptorByHeroIndex(t)}},{key:"getHeroIndexFromPanoId",value:function(e){for(var t=0;t<this.model.heroLocations.length;t++){var i=this.model.heroLocations[t],n=this.getHeroId(i);if(n&&n===e)return t}return-1}},{key:"getHeroPano",value:function(e){if(null===e)return O["a"].warn("getHeroPano(): no destination"),null;var t=this.getHeroId(e),i=this.model.panos.get(t);return void 0===i&&(i=null,""!==t&&O["a"].debug('unable to find pano "'+t+'"')),i}},{key:"getHeroId",value:function(e){return e.panoId}},{key:"setWarpDestPano",value:function(){return this.warpDestPano=this.getHeroPano(this.warpDestHeroLoc),this.warpDestPano}},{key:"findShortestPath",value:function(e,t){if(!e||!t)return null;var i=f["a"].warp.walkExtraPanosDistance,n=e.id+":"+t.id+":"+i;if(this.shortPaths.hasOwnProperty(n))return this.shortPaths[n]?this.shortPaths[n].slice():null;var o=t.id+":"+e.id+":"+i;if(this.shortPaths.hasOwnProperty(o))return this.shortPaths[o]?this.shortPaths[o].slice().reverse():null;var a=this.model.panos.aStarSearch(e,t);return this.model.panos.includeNodesNearPath(a,i),this.shortPaths[n]=a?a.slice():null,a}},{key:"makePathHulls",value:function(e){var t,i,n,o,a,r=0,s=[],l=[],c=[],u=this.model.panos;t=u.get(e[0]),o=t.floor.floorIndex;for(var d=0;d<e.length;d+=1)t=u.get(e[d]),i=t.floorPosition.clone().sub(this.model.position),i.y+=this.pathHeight(),s.push(i),l.push(t.position.clone()),n=t.floor.floorIndex,c.push(n>o?f["a"].path.colorUp:n<o?f["a"].path.colorDown:f["a"].path.color),d>0&&(a=l[d].distanceTo(l[d-1]),a>r&&(r=a));return r>this.longestStep&&(this.longestStep=r,O["a"].debug("path contains "+r+" meter segment")),{floor:s,camera:l,color:c}}},{key:"makeFloorCurves",value:function(e,t,i){var n=this.player.mode===D["a"].PANORAMA?f["a"].path.waypointIndoorRadius:f["a"].path.waypointRadius,o=this.pointPathDistance(e)-2*n,a=e.slice(0),r=a[1].clone().sub(a[0]);r.y=0,r.normalize().multiplyScalar(n),a[0]=(new THREE.Vector3).copy(a[0]).add(r),r=a[a.length-2].clone().sub(a[a.length-1]),r.y=0,r.normalize().multiplyScalar(n),a[a.length-1]=(new THREE.Vector3).copy(a[a.length-1]).add(r);var s=new THREE.CatmullRomCurve3(a),l=Math.floor(o/i);l=4*Math.floor(l/4),l=Math.max(4,l);for(var c,u,d,h=s.getSpacedPoints(l),p=[],m=new THREE.Vector3,v=0;v<h.length;v+=1){d=0,c=h[v].distanceTo(e[0]);for(var g=1;g<e.length;g+=1)m.copy(h[v]).sub(e[g]),m.y*=4,u=m.length(),u<c&&(d=g);p.push(t[d])}return{distance:o,points:h,colors:p}}},{key:"makeCameraCurvePoints",value:function(e,t){var i=this.pointPathDistance(e),n=new THREE.CatmullRomCurve3(e);return n.getSpacedPoints(Math.max(2,Math.floor(i/t)))}},{key:"setPathHulls",value:function(e){var t=this.makePathHulls(e);this.floorHull=t.floor,this.cameraHull=t.camera,this.colorHull=t.color}},{key:"setFloorCurves",value:function(){var e=this.makeFloorCurves(this.floorHull,this.colorHull,this.brushPrefs.paveStep);this.floorPathDistance=e.distance,this.floorCurvePoints=e.points,this.floorCurveColors=e.colors}},{key:"setCameraCurvePoints",value:function(){this.camCurvePoints=this.makeCameraCurvePoints(this.cameraHull,f["a"].warp.stepFactor*this.brushPrefs.paveStep)}},{key:"chooseWarpPath",value:function(e){var t,i,n,o=this.playerControls.cameras[D["a"].PANORAMA];if(this.player.currentPano===this.warpDestPano||!e)return this.warpPathPoints=null,this.warpLength=0,!1;this.nodes=this.findShortestPath(this.player.currentPano,this.warpDestPano),this.setPathHulls(this.nodes),void 0===this.nodes||null===this.nodes||this.nodes.length<1?(O["a"].debug("warp path to unreachable node"),t=this.warpDestPano.position.clone().sub(o.position),i=t.clone().negate(),t.multiplyScalar(.15).add(o.position),i.multiplyScalar(.15).add(this.warpDestPano.position),t.y=o.position.y,i.y=this.warpDestPano.position.y,n=new THREE.CubicBezierCurve3(o.position.clone(),t,i,this.warpDestPano.position.clone()),this.warpPathPoints=n.getSpacedPoints(this.brushPrefs.cvSegments)):(O["a"].debug("follow warp path (path distance was "+this.nodes.length+" nodes, "+this.floorPathDistance+")"),this.setCameraCurvePoints(),this.warpPathPoints=this.camCurvePoints.slice(0)),this.warpLength=0,this.warpPathLengths=[0];for(var a=new THREE.Vector3,r=new THREE.Vector3,s=Math.cos(THREE.Math.degToRad(f["a"].warp.minBrakeAngle)),l=Math.cos(THREE.Math.degToRad(f["a"].warp.maxBrakeAngle)),c=1;c<this.warpPathPoints.length;c+=1){a.copy(this.warpPathPoints[c-1]).sub(this.warpPathPoints[c]);var u=a.length();a.y*=f["a"].warp.climbEffort;var d=a.length()/u;if(c>1){a.setY(0).normalize(),r.copy(this.warpPathPoints[c-2]).sub(this.warpPathPoints[c-1]).setY(0).normalize();var h=Math.min(1,a.dot(r)),p=1+(f["a"].warp.brakeStrength-1)*(1-THREE.Math.smoothstep(h,l,s));d=Math.max(p,d)}this.warpLength+=u*d,this.warpPathLengths[c]=this.warpLength}return!0}},{key:"drawPathRibbon",value:function(e,t){this.bunnyObj.visible=f["a"].warp.showBunny;for(var i=.6*f["a"].path.ribbonWidth*.5,n=new THREE.Vector3,o=new THREE.Vector3(0,this.pathHeight(),0),a=new THREE.Geometry,r=new THREE.Vector3,s=0;s<e.length;s+=1){r.copy(e[s]),0===s?r.sub(e[s+1]):r.sub(e[s-1]).negate(),r.normalize(),n.crossVectors(r,M["a"].UP),n.multiplyScalar(i);var l=(new THREE.Vector3).copy(e[s]).add(o);l.sub(n),a.vertices.push(l),l=(new THREE.Vector3).copy(e[s]).add(o),l.add(n),a.vertices.push(l)}var c,u,d,h=0;for(s=0;s<e.length-1;s+=1){var p=2*s,m=h;h+=e[s+1].distanceTo(e[s]);var v=h,g=t[s],b=t[s+1];c=new THREE.Face3(p,p+1,p+2),c.vertexColors=[new THREE.Color(g),new THREE.Color(g),new THREE.Color(b)],a.faces.push(c),a.faceVertexUvs[0].push([new THREE.Vector2(0,m),new THREE.Vector2(1,m),new THREE.Vector2(0,v)]),c=new THREE.Face3(p+2,p+1,p+3),c.vertexColors=[new THREE.Color(b),new THREE.Color(g),new THREE.Color(b)],a.faces.push(c),a.faceVertexUvs[0].push([new THREE.Vector2(0,v),new THREE.Vector2(1,m),new THREE.Vector2(1,v)])}a.computeFaceNormals(),a.computeVertexNormals(),this.player.mode===D["a"].PANORAMA?(d=THREE.UniformsUtils.clone(y["a"].ribbon.uniforms),d.map.value=this.pathImg.path,d.opacity.value=0,d.color.value.set(f["a"].path.color),u=new THREE.RawShaderMaterial({side:THREE.DoubleSide,depthWrite:!1,transparent:!0,vertexShader:y["a"].ribbon.vertexShader,fragmentShader:y["a"].ribbon.fragmentShader,uniforms:d,name:"ribbonT",opacity:0})):u=new THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,name:"ribbonOut",vertexColors:THREE.VertexColors});var E=new THREE.Mesh(a,u);return E.name="ribbon",this.player.mode===D["a"].PANORAMA&&(E.renderOrder=w["a"].ribbon),E}},{key:"drawPathPavement",value:function(e){for(var t,i=.25,n=new THREE.Vector3,o=new THREE.Geometry,a=new THREE.Vector3,r=0;r<e.length;r+=1)a.copy(e[r]),0===r?a.sub(e[r+1]).negate():a.sub(e[r-1]),a.normalize(),n.crossVectors(a,M["a"].UP),n.multiplyScalar(this.brushPrefs.paveWidth),t=(new THREE.Vector3).copy(e[r]),t.sub(n),o.vertices.push(t),o.vertices.push((new THREE.Vector3).copy(e[r])),t=(new THREE.Vector3).copy(e[r]),t.add(n),o.vertices.push(t);var s,l,c;for(r=0;r<e.length-1;r+=1)s=3*r+1,l=r*i,c=l+i,o.faces.push(new THREE.Face3(s-1,s,s+3)),o.faceVertexUvs[0].push([new THREE.Vector2(0,l),new THREE.Vector2(.5,l),new THREE.Vector2(.5,c)]),o.faces.push(new THREE.Face3(s+3,s+2,s-1)),o.faceVertexUvs[0].push([new THREE.Vector2(.5,c),new THREE.Vector2(0,c),new THREE.Vector2(0,l)]),o.faces.push(new THREE.Face3(s+3,s,s+1)),o.faceVertexUvs[0].push([new THREE.Vector2(.5,c),new THREE.Vector2(.5,l),new THREE.Vector2(1,l)]),o.faces.push(new THREE.Face3(s+3,s+1,s+4)),o.faceVertexUvs[0].push([new THREE.Vector2(.5,c),new THREE.Vector2(1,l),new THREE.Vector2(1,c)]);var u=this.player.mode===D["a"].PANORAMA?new THREE.MeshBasicMaterial({color:f["a"].path.color,side:THREE.DoubleSide,transparent:!0,depthWrite:!1,opacity:0,name:"paveT",map:this.pathImg.path}):new THREE.MeshBasicMaterial({color:f["a"].path.color,side:THREE.DoubleSide,transparent:!0,depthWrite:!1,opacity:1,name:"paveO",map:this.pathImg.path});return new THREE.Mesh(o,u)}},{key:"makeWaypointObj",value:function(e,t){var i=new THREE.Geometry,n=this.player.mode===D["a"].PANORAMA?f["a"].path.waypointIndoorRadius:f["a"].path.waypointRadius,o=this.pathHeight();i.vertices.push(new THREE.Vector3(-n,o,n),new THREE.Vector3(-n,o,-n),new THREE.Vector3(n,o,-n),new THREE.Vector3(n,o,n)),i.faces.push(new THREE.Face3(0,1,2),new THREE.Face3(2,3,0)),i.faceVertexUvs[0].push([new THREE.Vector2(0,0),new THREE.Vector2(1,0),new THREE.Vector2(1,1)]),i.faceVertexUvs[0].push([new THREE.Vector2(1,1),new THREE.Vector2(0,1),new THREE.Vector2(0,0)]);var a=THREE.UniformsUtils.clone(y["a"].waypoint.uniforms);a.map.value=e,a.opacity.value=0,a.color.value.set(f["a"].path.color);var r={side:THREE.DoubleSide,depthWrite:!1,depthTest:!1,transparent:!0,vertexShader:y["a"].waypoint.vertexShader,fragmentShader:y["a"].waypoint.fragmentShader,uniforms:a,name:"waypoint",opacity:0};this.player.mode!==D["a"].PANORAMA&&(r.depthTest=!1,r.name="wayPtOut");var s=new THREE.RawShaderMaterial(r),l=new THREE.Mesh(i,s);return l.renderOrder=w["a"].panoMarker,l.name=t,l}},{key:"makeStartMarker",value:function(e,t){var i=(new THREE.Vector3).copy(t[1]).sub(t[0]);i.y=0,i.normalize();var n=Math.acos(i.x),o=this.makeWaypointObj(this.pathImg.pathStart,"Start");return o.rotateOnAxis(new THREE.Vector3(0,1,0),n),o.position.copy(e),o}},{key:"makeEndMarker",value:function(e){var t=this.makeWaypointObj(this.pathImg.pathEnd,"End"),i=this.model.panos.get(this.nodes[0]).floor.floorIndex,n=this.model.panos.get(this.nodes[this.nodes.length-1]).floor.floorIndex;return i<n?t.material.uniforms.color.value.set(f["a"].path.colorUp):i>n&&t.material.uniforms.color.value.set(f["a"].path.colorDown),t.position.copy(e),t}},{key:"pathClean",value:function(e){if(e){for(var t in e.children)this.pathClean(e.children[t]);e.geometry&&e.geometry.dispose(),e.material&&e.material.dispose()}}},{key:"discardPathObject",value:function(){if(this.obj3d){var e=this.obj3d.parent;e&&e.remove(this.obj3d),this.pathClean(this.obj3d)}this.obj3d=null,this.popInCpm()}},{key:"discardSlow",value:function(){if(this.obj3d){if(this.player.mode!==D["a"].PANORAMA)return void this.discardPathObject();for(var e,t=this,i=0,n=function(){this.discardPathObject()}.bind(this),o=0;o<t.obj3d.children.length;o+=1)e=t.obj3d.children[o],void 0!==e.material&&!0===e.material.transparent&&(void 0!==e.material.uniforms?E["a"].start(T["a"].property(e.material.uniforms.opacity,"value",0),f["a"].path.fadeOutTime,n,0,j["a"][f["a"].warp.blendEasing]):E["a"].start(T["a"].property(e.material,"opacity",0),f["a"].path.fadeOutTime,n,0,j["a"][f["a"].warp.blendEasing]),i+=1,n=null);0===i&&this.discardPathObject(),this.player.mode!==D["a"].PANORAMA&&this.fadeInCpm(f["a"].path.fadeInTime-3)}}},{key:"appearSlow",value:function(){var e,t=this;this.fadeOutCpm(f["a"].path.fadeInTime);for(var i=this.player.mode===D["a"].PANORAMA?f["a"].path.opacity:1,n=0;n<t.obj3d.children.length;n+=1)e=t.obj3d.children[n],void 0!==e.material&&!0===e.material.transparent&&(void 0!==e.material.uniforms?E["a"].start(T["a"].property(e.material.uniforms.opacity,"value",i),f["a"].path.fadeInTime,null,0,j["a"][f["a"].warp.blendEasing]):E["a"].start(T["a"].property(e.material,"opacity",i),f["a"].path.fadeInTime,null,0,j["a"][f["a"].warp.blendEasing]))}},{key:"update",value:function(){this.obj3d&&this.obj3d.updateMatrixWorld()}},{key:"calcBurnsAmount",value:function(e){var t=THREE.Math.degToRad(f["a"].warp.burnsAngle);if(this.player.mode===D["a"].PANORAMA){var i=this.burnsDir*t;if(this.upcomingTransType===V["a"].BLACK)return i;var n=e;if(null===n)return O["a"].warn("Transition request for non-highlight"),i;var o=this.getHeroDescriptorByHeroIndex(n);if(null===o)return i;if(!o.isPano())return i;var a=this.getHeroPano(o),r=this.playerControls.cameras[D["a"].PANORAMA],s=M["a"].FORWARD.clone().applyQuaternion(r.quaternion).setY(0).normalize(),l=Math.min(THREE.Math.degToRad(f["a"].warp.minBurnsAngle),t),c=function(e){var i=Math.acos(Math.min(1,e.dot(s))),n=(new THREE.Vector3).crossVectors(s,e);return Math.max(l,Math.min(Math.abs(i),t))*Math.sign(n.y)};if(a===this.player.currentPano)return c(M["a"].FORWARD.clone().applyQuaternion(o.quaternion).setY(0).normalize());var u=this.findShortestPath(this.player.currentPano,a);if(void 0===u||null===u||u.length<1)return O["a"].debug("Empty path ahead..."),i;var d=this.makePathHulls(u),h=new THREE.CatmullRomCurve3(d.camera),p=Math.min(.1,f["a"].warp.lookAheadDist/h.getLength());return c(h.getPointAt(p).clone().sub(r.position).setY(0).normalize())}return this.player.mode===D["a"].DOLLHOUSE?.02*this.burnsDir:this.burnsDir}},{key:"waitNextStep",value:function(e,t){var i=f["a"].warp.tourStepDelay;i||(i=this.lastTransType===V["a"].BLACK?constants.tourStepDelaySlideShow:constants.tourStepDelayDefault);var n=new THREE.Euler,o=new THREE.Vector3;O["a"].debug("Starting wait: "+(void 0!==t));var a=this.calcBurnsAmount(e),r=function(){this.endWarpState(),this.player.mode===D["a"].DOLLHOUSE&&(this.playerControls.cameras[D["a"].DOLLHOUSE].controls.rotationAcceleration.x=0),t&&t()}.bind(this),s=function(e,t){if(this.warpInterrupted)return r(),!0;var s=t||1e3/60;if(f["a"].warp.doBurns)if(this.player.mode===D["a"].PANORAMA){var l=this.playerControls.cameras[D["a"].PANORAMA];n.setFromQuaternion(WarpcameraStyle.quaternion,f["a"].warp.eOrder);var c=s*a/i;n.y+=c,o.set(0,0,-1),o.applyEuler(n),o.add(l.position),l.controls.lookAt(o),l.controls.lookVector.copy(o),l.lookAt(o)}else this.player.mode===D["a"].DOLLHOUSE?this.playerControls.controls[D["a"].DOLLHOUSE].rotationAcceleration.x=a:this.playerControls.controls[D["a"].FLOORPLAN].absoluteScale*=.9996}.bind(this);this.startWarpState(),E["a"].start(s,i,r,0,j["a"].easeInOutQuad,"wait")}},{key:"warpToNonPano",value:function(e){if(this.discardPathObject(),this.warpDestHeroLoc.cameraMode===D["a"].DOLLHOUSE||this.warpDestHeroLoc.cameraMode===D["a"].FLOORPLAN){var t=function(){e&&e()}.bind(this);this.player.flyToNewMode({mode:this.warpDestHeroLoc.cameraMode,duration:f["a"].warp.outsideTime,warpDest:this.warpDestHeroLoc,callback:t,force:!0})}else O["a"].warn("no warp destination!!!"),e&&e()}},{key:"_resetWarpShaderParams",value:function(e){this.player.mode===D["a"].PANORAMA&&(void 0!==e.material.uniforms.blackout&&(e.material.uniforms.blackout.value=0),void 0!==e.material.uniforms.modelAlpha&&(e.material.uniforms.modelAlpha.value=0))}},{key:"_clearWarpShading",value:function(){for(var e=this.model.chunks,t=0;t<e.length;t+=1)this._resetWarpShaderParams(e[t]),e[t].visible=!0;this._resetWarpShaderParams(this.model.skybox)}},{key:"_warpStopFlying",value:function(){this.activeTransType=null,this.placeCpm()}},{key:"_wrapupTravelOnlyBits",value:function(){this._warpStopFlying(),this.warpPathPoints&&(this.player.currentPano.exit(),this.warpDestPano.enter(),this.player.currentPano=this.warpDestPano),this.placeCpm()}},{key:"_wrapupTravel",value:function(e){this._wrapupTravelOnlyBits(),this.warpCameraAim(e)}},{key:"_wrapupWarpShading",value:function(e){this._clearWarpShading(),this._wrapupTravel(e)}},{key:"wrapupWarpShadingOnly",value:function(e,t){t!==z.END&&this._clearWarpShading(),this._wrapupTravelOnlyBits(),this.upcomingTransType=null,e&&e()}},{key:"_warpCameraAim",value:function(e,t){var i=this.warpDestHeroLoc.quaternion,n=this.playerControls.cameras[D["a"].PANORAMA],o=new THREE.Vector3(0,0,1).applyQuaternion(i).normalize(),a=new THREE.Vector3(0,0,1).applyQuaternion(n.quaternion).normalize(),r=a.dot(o),s=THREE.Math.radToDeg(Math.acos(r)),l=new THREE.Euler(0,0,0,f["a"].warp.eOrder).setFromQuaternion(i,f["a"].warp.eOrder),c=(new THREE.Euler).setFromQuaternion(n.quaternion,f["a"].warp.eOrder),u=new THREE.Euler(l.x-c.x,l.y-c.y,l.z-c.z,f["a"].warp.eOrder);u.y=F["a"].constrainedTurn(u.y),this.burnsDir=Math.sign(u.y);var d=new THREE.Euler(0,0,0,f["a"].warp.eOrder),h=new THREE.Vector3,p=function(e,t){return!!this.warpInterrupted||(d.x=c.x+e*u.x,d.y=c.y+e*u.y,d.z=c.z+e*u.z,h.set(0,0,-1),h.applyEuler(d),h.add(n.position),n.controls.lookAt(h),n.controls.lookVector.copy(h),void n.lookAt(h))}.bind(this);return s>f["a"].warp.minRotation?E["a"].start(p,e,t,0,j["a"][f["a"].warp.movementEasing]):(O["a"].debug("Aim angle only is "+s.toPrecision(3)+" degrees, skipping explicit re-aim"),void(t&&t()))}},{key:"_warpBendAim",value:function(e,t,i,n){var o=n||0,a=this.playerControls.cameras[D["a"].PANORAMA],r=new THREE.Euler(0,0,0,f["a"].warp.eOrder).setFromQuaternion(this.warpDestHeroLoc.quaternion,f["a"].warp.eOrder),s=(new THREE.Euler).setFromQuaternion(a.quaternion,f["a"].warp.eOrder),l=new THREE.Euler(r.x-s.x,r.y-s.y,r.z-s.z,f["a"].warp.eOrder);l.y=F["a"].constrainedTurn(l.y);var c=Math.min(THREE.Math.degToRad(f["a"].warp.softBendTilt),Math.abs(l.x));l.x=c*Math.sign(l.x),c=Math.min(THREE.Math.degToRad(Math.max(0,f["a"].warp.softBendAngle)),c),this.burnsDir=Math.sign(l.y),c*=Math.sign(l.y),l.y=c;var u=new THREE.Euler(0,0,0,f["a"].warp.eOrder),d=new THREE.Vector3,h=function(e,t){if(e<.5)u.x=s.x+e*l.x,u.y=s.y+e*l.y,u.z=s.z+e*l.z;else{var i=(1-e)*f["a"].warp.softBendEnd;u.x=r.x-i*l.x,u.y=r.y-i*l.y,u.z=r.z-i*l.z}d.set(0,0,-1),d.applyEuler(u),d.add(a.position),a.controls.lookAt(d),a.controls.lookVector.copy(d),a.lookAt(d)}.bind(this);return E["a"].start(h,t,i,o,j["a"][f["a"].warp.movementEasing])}},{key:"_warpStepCameraAim",value:function(e,t,i){var n=this.playerControls.cameras[D["a"].PANORAMA],o=new THREE.Euler(0,0,0,f["a"].warp.eOrder).setFromQuaternion(this.warpDestHeroLoc.quaternion,f["a"].warp.eOrder),a=(new THREE.Euler).setFromQuaternion(n.quaternion,f["a"].warp.eOrder),r=new THREE.Euler(o.x-a.x,o.y-a.y,o.z-a.z,f["a"].warp.eOrder);r.y=F["a"].constrainedTurn(r.y),this.burnsDir=Math.sign(r.y);var s=new THREE.Euler(0,0,0,f["a"].warp.eOrder),l=new THREE.Vector3,c=function(e,t){e<.5?s.copy(a):s.copy(o),l.set(0,0,-1),l.applyEuler(s),l.add(n.position),n.controls.lookAt(l),n.controls.lookVector.copy(l),n.lookAt(l)}.bind(this);return E["a"].start(c,t,i,0,j["a"][f["a"].warp.movementEasing])}},{key:"setBurnsDir",value:function(){var e=this.playerControls.cameras[D["a"].PANORAMA],t=new THREE.Euler(0,0,0,f["a"].warp.eOrder).setFromQuaternion(this.warpDestHeroLoc.quaternion,f["a"].warp.eOrder),i=(new THREE.Euler).setFromQuaternion(e.quaternion,f["a"].warp.eOrder),n=new THREE.Euler(t.x-i.x,t.y-i.y,t.z-i.z,f["a"].warp.eOrder);n.y=F["a"].constrainedTurn(n.y),this.burnsDir=Math.sign(n.y)}},{key:"stepWarpPath",value:function(e,t){var i=this.playerControls.cameras[D["a"].PANORAMA];if(!this.warpPathPoints)return i.position.copy(this.warpDestPano.position),!0;var n=this.warpPathPoints[0],o=this.warpDestPano.position;if(null!==this.nodes&&this.cameraHull.length>1){var a=new THREE.Vector3;e<.5?a.copy(this.cameraHull[1]).sub(n).normalize().multiplyScalar(f["a"].warp.softPushDist*e).add(n):a.copy(this.cameraHull[this.cameraHull.length-2]).sub(o).normalize().multiplyScalar(f["a"].warp.softPushDist*f["a"].warp.softPushEnd*(1-e)).add(o),i.position.copy(a)}else e<.5?i.position.copy(n):i.position.copy(o)}},{key:"interruptAndFastForward",value:function(e,t){this.warping&&(this.warpInterrupted=!0,this.warpInterruptionBlackoutStyle=e,this.warpInterruptionTravelTime=t,null!==this.warpInterruptionBlackoutStyle&&void 0!==this.warpInterruptionBlackoutStyle||(this.warpInterruptionBlackoutStyle=z.MIDDLE),null!==this.warpInterruptionTravelTime&&void 0!==this.warpInterruptionTravelTime||(this.warpInterruptionTravelTime=f["a"].minWarpTime))}},{key:"warpCameraAim",value:function(e){var t=f["a"].warp.minWarpTime;if(this.upcomingTransType===V["a"].BLACK)t=f["a"].warp.teleportTime;else{var i=this.playerControls.cameras[D["a"].PANORAMA],n=new THREE.Euler(0,0,0,f["a"].warp.eOrder).setFromQuaternion(this.warpDestHeroLoc.quaternion,f["a"].warp.eOrder),o=(new THREE.Euler).setFromQuaternion(i.quaternion,f["a"].warp.eOrder),a=new THREE.Euler(n.x-o.x,n.y-o.y,n.z-o.z,f["a"].warp.eOrder);a.y=F["a"].constrainedTurn(a.y);var r=1e3*Math.abs(a.y)/THREE.Math.degToRad(f["a"].warp.maxAimPerSec);t=Math.max(t,r)}var s=function(){this._warpStopFlying(),this.discardSlow(),e&&e()}.bind(this);this._warpCameraAim(t,s)}},{key:"warpCommonParameters",value:function(e,t,i,n){this.model.skybox.material.uniforms.blackout.value=n;var o=T["a"].uniform(this.model.skybox,"progress",1),a=T["a"].allUniforms(this.model.chunks,"progress",1),r=!1,s=function(){if(this.warpInterrupted)return r=!0,!0}.bind(this),l=function(e,t){return i&&r?(this.model.skybox.material.uniforms.progress.value=0,!0):void o(e,t)}.bind(this),c=function(e,t){return i&&r?(a(0),!0):void a(e,t)}.bind(this);E["a"].start(s,e,null,t,null,"safeHaltWatch"),E["a"].start(l,e,null,t,j["a"][f["a"].warp.blendEasing],"skyboxProgress"),E["a"].start(c,e,null,t,j["a"][f["a"].warp.blendEasing],"chunkProgress")}},{key:"warpTravel_STD",value:function(e){var t,i=Math.min(f["a"].warp.lookAheadMax,f["a"].warp.lookAheadDist/this.warpLength),n=this.playerControls.cameras[a.PANORAMA],o=(Math.min(.25,3/this.warpLength),Math.min(.35,7/this.warpLength)),r=new THREE.Euler(0,0,0,f["a"].warp.eOrder),s=new THREE.Vector3,c=(new THREE.Euler).setFromQuaternion(n.quaternion,f["a"].warp.eOrder),u=(new THREE.Euler).copy(c),h=n.position.clone(),p=new THREE.Matrix4,m=new THREE.Euler,v=f["a"].warp.minWarpTime;v+=this.warpLength*f["a"].warp.timePerMeter,f["a"].warp.flySpeed>.01&&(v=1e3*this.warpLength/f["a"].warp.flySpeed);var y=!1,b=this.warpDestHeroLoc.quaternion,w=new THREE.Vector3(0,0,-1).applyQuaternion(b).normalize(),P=this.warpPathPoints[this.warpPathPoints.length-1].clone().sub(this.warpPathPoints[this.warpPathPoints.length-2]).normalize(),x=P.dot(w),k=THREE.Math.radToDeg(Math.acos(x)),R=function(e){var t=o,i=THREE.Math.smoothstep(e,0,t)*(1-THREE.Math.smoothstep(e,1-t,1));return i},_=function(){return p.lookAt(h,t,M["a"].UP),r.setFromRotationMatrix(p,f["a"].warp.eOrder),c.setFromQuaternion(n.quaternion,f["a"].warp.eOrder),m.set(r.x-c.x,r.y-c.y,r.z-c.z,f["a"].warp.eOrder),F["a"].constrainedTurn(m.y)}.bind(this),S=function(e,t){if(this.warpInterrupted)return y=!0,!0}.bind(this),A=function(e,t){return y||!this.warpPathPoints?(effects.blur(0),!0):void effects.blur(e)}.bind(this),C=T["a"].allUniforms(this.model.chunks,"modelAlpha",1),D=function(e,t){return y||!this.warpPathPoints?(C(0),!0):void C(e,t)}.bind(this),V=function(e,t){if(!this.warpPathPoints)return n.position.copy(this.warpDestPano.position),!0;if(y)return!0;var i=this.interpAlongPath(this.warpPathPoints,this.warpPathLengths,e);n.position.copy(i),h=this.interpAlongPath(this.warpPathPoints,this.warpPathLengths,.99*e)}.bind(this),I=function(e,n){return this.warpPathPoints?!!y||void(t=this.interpAlongPath(this.warpPathPoints,this.warpPathLengths,Math.min(e+i,1))):(O["a"].debug("Lost bunny."),!0)}.bind(this),j=function(e,o){if(y)return O["a"].debug(">>>> Walkthrough interupted at t="+e),!0;if(!this.warpPathPoints)return!0;var a=this.warpLength*e,l=THREE.Math.smoothstep(a,0,this.brushPrefs.lookBlendDist),d=THREE.Math.smoothstep(a,this.warpLength-this.brushPrefs.lookBlendDist,this.warpLength);f["a"].warp.matchCam&&(l*=1-d),p.lookAt(h,t,M["a"].UP),r.setFromRotationMatrix(p,f["a"].warp.eOrder),c.setFromQuaternion(n.quaternion,f["a"].warp.eOrder),m.set(r.x-c.x,r.y-c.y,r.z-c.z,f["a"].warp.eOrder),m.y=F["a"].constrainedTurn(m.y),r.x=c.x+l*m.x,r.y=c.y+l*m.y,r.z=c.z+l*m.z,m.set(r.x-u.x,r.y-u.y,r.z-u.z,f["a"].warp.eOrder),m.y=F["a"].constrainedTurn(m.y);var v=THREE.Math.degToRad(f["a"].warp.maxTurnPerSec)*o/1e3;m.y=Math.sign(m.y)*Math.min(v,Math.abs(m.y)),u.x=u.x+m.x*f["a"].warp.turnFriction,u.y=u.y+m.y*f["a"].warp.turnFriction,u.z=u.z+m.z*f["a"].warp.turnFriction,u.x=Math.max(THREE.Math.degToRad(f["a"].warp.minDownAngle),u.x);var g=t.clone().sub(h).normalize();if(k<f["a"].warp.maxAimRotation&&d>0){var b=1-d;g.x=g.x*b+d*P.x,g.y=g.y*b+d*P.y,g.z=g.z*b+d*P.z,g.normalize()}this.bunnyObj.position.copy(n.position).add(g),s.set(0,0,-1).applyEuler(u).normalize(),s.multiplyScalar(8),s.add(n.position),e>1-i&&f["a"].warp.matchCam||(n.controls.lookAt(s),n.controls.lookVector.copy(s),n.lookAt(s))}.bind(this),L=function(){y?(this.discardSlow(),this.upcomingTransType=l.BLACK,this.warpTravel_BLACK(-.5,this.warpInterruptionTravelTime,z.BEGINNING,e)):this._wrapupWarpShading(e)}.bind(this);I(0);var H=f["a"].warp.motionLeadTime+1e3*Math.abs(_())/THREE.Math.degToRad(f["a"].warp.maxTurnPerSec);v+=H;var N=H/v;this.warpCommonParameters(v,N,!0,z.NONE),E["a"].start(S,v,null,0,null,"_haltWatcher"),f["a"].warp.blur>0&&(g.blurStrength=f["a"].warp.blur,E["a"].start(A,v,null,N,R,"blurring")),E["a"].start(D,v,null,N,R,"modelAlpha"),E["a"].start(V,v,null,N,d[f["a"].warp.blendEasing],"followPath"),E["a"].start(I,v,null,N,d[f["a"].warp.blendEasing],"goBunny"),E["a"].start(j,v,L,0,d[f["a"].warp.blendEasing],"lookAtBunny")}},{key:"warpTravel_BLACK",value:function(e,t,i,n){this.player.model.floorLogos.firstLogo.visible=!1,this.player.model.floorLogos.secondLogo.visible=!1;var o=e||0;void 0!==t&&null!==t||(t=f["a"].warp.teleportTime),this.warpCommonParameters(t,o,!1,i),this.model.chunks.forEach((function(e){e.material.uniforms.blackout.value=i})),this._warpBendAim(null,t,null,o);var a=function(){this.wrapupWarpShadingOnly(n,i)}.bind(this);E["a"].start(this.stepWarpPath.bind(this),t,a,o,j["a"][f["a"].warp.blendEasing],"stepMotion")}},{key:"makeWalkFlightFunc",value:function(e,t,i){return this.flightStepWalk.bind(this,e,t,i)}},{key:"getOrientationForWalkingTourNode",value:function(e,t,i){var n=e.length;if(t>=n)return!1;if(t===n-1)i.copy(M["a"].FORWARD).applyQuaternion(this.warpDestHeroLoc.quaternion);else{var o=this.player.model.panos.get(e[t]),a=this.player.model.panos.get(e[t+1]);i.copy(a.position).sub(o.position)}return i.normalize(),!0}},{key:"warpCameraTravel",value:function(e,t,i,n){if(this.activeTransType=this.upcomingTransType,this.lastTransType=this.activeTransType,this.upcomingTransType=null,e)this.activeTransType===V["a"].BLACK?this.warpTravel_BLACK(null,i,t,n):this.activeTransType===V["a"].WALK?this.warpTravel_WALK(function(){this._clearWarpShading(),this._warpStopFlying(),this.player.spider.draw(),this.placeCpm(),n&&n()}.bind(this)):this.warpTravel_STD(n);else{var o=function(){this._wrapupTravel(n)}.bind(this),a={pano:this.warpDestPano,lookAtPoint:null,duration:null,maxDistanceOverride:null,skipWarpingCheck:!1};this.player.flyToPano(a,o)}}},{key:"startWarpState",value:function(){this.warping=!0,this.warpInterrupted=!1,this.warpInterruptionBlackoutStyle=null,this.warpInterruptionTravelTime=null}},{key:"endWarpState",value:function(){this.warping=!1}},{key:"warpToPano",value:function(e,t,i,n){if(this.warping)O["a"].warn("Cannot warp when already warping");else{if(this.upcomingTransType=e,this.activeTransType=null,!this.setWarpDestPano())return this.upcomingTransType=null,void this.warpToNonPano(n);if(this.player.mode!==D["a"].PANORAMA)return this.upcomingTransType=null,this.discardSlow(),void this.player.flyToNewMode({mode:D["a"].PANORAMA,pano:this.warpDestPano,duration:f["a"].warp.outsideTime,warpDest:this.warpDestHeroLoc,callback:n,force:!0});if(!this.warpDestPano)return O["a"].warn("no warp destination, callback dropped"),void(this.upcomingTransType=null);var o=!(this.model.panos.isNeighbour(this.player.currentPano,this.warpDestPano)&&this.warpDestPano!==this.player.currentPano&&this.warpDestPano.position.distanceTo(this.player.currentPano.position)<f["a"].warp.nearPanoDist),a=this.chooseWarpPath(o);if(a&&this.upcomingTransType!==V["a"].WALK){var r=function(){this.waitingToWarp=!1,this.warpToPano(e,t,i,n)}.bind(this);if(this.player.checkAndWaitForPanoLoad(this.warpDestPano,"high","low",this.player.basePanoSize,r))return void(this.waitingToWarp=!0)}this.player.currentPano||(O["a"].warn("Arrived at a very strange spot!"),this.player.currentPano=this.warpDestPano,this.placeCpm(),this.fadeOutCpm(f["a"].path.fadeOutTime),this.player.spider.draw()),O["a"].debug("Warping to pano ",this.warpDestPano.position),this.upcomingTransType!==V["a"].WALK&&this.player.emit(L["a"].PanoChosen,this.player.currentPano,this.warpDestPano),this.startWarpState();var s=function(){this.endWarpState(),n&&n()}.bind(this);a?this.warpCameraTravel(o,t,i,s):this.warpCameraAim(s),this.player.smoothZoomToDefault(f["a"].zoom.restoreTime)}}}]),e}(),W=i("ec11"),q=function(){function e(){Object(o["a"])(this,e),this.actionSequence=[],this.actionSequenceInProgress=!1}return Object(r["a"])(e,[{key:"reset",value:function(e){this.actionSequenceInProgress=!1,this.actionSequence.length=0}}]),e}(),Q=i("27bc"),Y=i("7d96"),X=i("7338"),Z=i("d58c"),J=i("65ae"),K={UP:1,DOWN:-1,LEFT:"L",RIGHT:"R",FORWARD:"F",BACK:"B",reverse:{},opposite:function(e){return this.reverse[e.toString()]}};!function(){K.reverse[K.UP]=K.DOWN,K.reverse[K.DOWN]=K.UP,K.reverse[K.LEFT]=K.RIGHT,K.reverse[K.RIGHT]=K.LEFT,K.reverse[K.FORWARD]=K.BACK,K.reverse[K.BACK]=K.FORWARD}();var ee,te,ie,ne,oe=K,ae=function(){function e(){Object(o["a"])(this,e),this.events=[],this.valid=!1}return Object(r["a"])(e,[{key:"push",value:function(e,t){this.events.push({direction:e,pano:t}),this.valid=!0}},{key:"pop",value:function(e){var t=this.events.pop();return this.events.length<1&&(this.valid=!1),t}},{key:"peek",value:function(){return this.events.length?this.events[this.events.length-1]:{direction:null,pano:null}}},{key:"invalidate",value:function(){this.events=[],this.valid=!1}},{key:"reversePano",value:function(e){if(!this.valid)return null;var t=this.peek();return oe.opposite(e)===t.direction?(this.pop(),t.pano):null}}]),e}(),re=i("3f1a"),se=i("d547"),le=i("c75e"),ce=i("430c"),ue=i("4c16"),de=i("0c20"),he=i("9923"),pe=function(){function e(){var t=this;if(Object(o["a"])(this,e),Object(p["a"])(this,"beginSetPanoVisible",(function(){this.setPanoVisible||"walk"!=m["store"].getters.page||(this.setPanoVisible=!0,this.panoVTemp={},m["objects"].player.currentPano.floor!=m["objects"].model.currentFloor?m["objects"].player.gotoFloor(m["objects"].player.currentPano.floor.floorIndex):this.SetOnePanoVisible(m["objects"].player.currentPano),this.setDisplay(!0),m["objects"].tagManager.hideAllTags(),this.updateFootIconSize())})),Object(p["a"])(this,"SetOnePanoVisible",(function(e){this.panoVsetting!=e&&(this.panoVsetting=e,this.delVisibleLines(),this.showFootIcons(e,!0),this.createPanoVisiLines(e),m["config"].isMobile||m["objects"].player.model.panos.list.length>1&&m["store"].commit("walk/SetButton",!0),app.firstView.pano==this.panoVsetting&&this.checkHasNeighbor(app.firstView.pano,"beforeCreateLine")?m["store"].commit("walk/Disable",!0):m["store"].commit("walk/Disable",!1))})),Object(p["a"])(this,"saveLastPanoVi",(function(){var e=[];for(var t in this.panoVLines){var i=this.panoVLines[t];i.name.indexOf("new")>-1&&i.visible?e.push({type:"add",id:t}):-1!=i.name.indexOf("new")||i.visible||e.push({type:"sub",id:t})}if(e.length){for(var n=this.searchNeib(this.panoVsetting.id),o=n.seeMarkers,a=n.neighbourUUIDs,r=n.neighbourPanos,s=0;s<e.length;s++){var l=this.searchNeib(e[s].id),c=l.seeMarkers,u=l.neighbourUUIDs,d=l.neighbourPanos;if("add"==e[s].type)c.push(this.panoVsetting.id),u.push(this.panoVsetting.id),d[this.panoVsetting.id]=!0,o.push(e[s].id),a.push(e[s].id),r[e[s].id]=!0;else{var h=c.indexOf(this.panoVsetting.id);h>-1&&c.splice(h,1);h=u.indexOf(this.panoVsetting.id);h>-1&&u.splice(h,1),d[this.panoVsetting.id]=!1;h=o.indexOf(e[s].id);h>-1&&o.splice(h,1);h=a.indexOf(e[s].id);h>-1&&a.splice(h,1),r[e[s].id]=!1}this.panoVTemp[e[s].id]={neighbourPanos:d,seeMarkers:c,neighbourUUIDs:u}}this.panoVTemp[this.panoVsetting.id]={neighbourPanos:r,seeMarkers:o,neighbourUUIDs:a}}})),Object(p["a"])(this,"pauseSetPanoVisible",(function(e,t){if(this.setPanoVisible){"unsaved"==e?this.saveLastPanoVi():this.panoVTemp={},this.delVisibleLines(),this.showFootIcons(null,!0,t);var i=this.panoVsetting;this.panoVsetting=null,i&&this.changeFIconState2(i.footIcon,this.checkHasNeighbor(i)),m["config"].isMobile||m["store"].commit("walk/SetButton",!1)}})),Object(p["a"])(this,"finishSetPanoVisible",(function(){this.setPanoVisible&&(this.setPanoVisible=!1,this.hideFootIcons(),this.delVisibleLines(),m["objects"].tagManager.showAllTags(),this.recoverAllState2(),this.panoVsetting=null,this.panoVTemp={},m["objects"].player.flyoutType=null,this.setDisplay(!1))})),Object(p["a"])(this,"changeVisiBtnState",(function(e){this.panoVisiBtnState=e,m["store"].commit("walk/SetPoint",e)})),Object(p["a"])(this,"savePanoVisibles",(function(e){this.panoVsetting&&this.saveLastPanoVi(this.panoVsetting);var t=[];for(var i in this.panoVTemp)t.push({panoID:i,visibles:this.turnToPanoIndex(this.panoVTemp[i].seeMarkers),visibles3:this.turnToPanoIndex(this.panoVTemp[i].neighbourUUIDs)});if(0!=t.length)return t})),Object(p["a"])(this,"afterSavePanoVisibles",(function(){var e=this;for(var t in this.panoVTemp){var i=ee.index[t];i.seeMarkers=this.panoVTemp[t].seeMarkers,i.neighbourUUIDs=this.panoVTemp[t].neighbourUUIDs,i.neighbourPanos=this.panoVTemp[t].neighbourPanos}if(this.checkHasNeighbor(m["objects"].player.currentPano))this.noPanoHasNeighbor=!1;else{var n=ee.sortByScore([function(t){return e.checkHasNeighbor(t)}],[function(e){return-e.position.distanceTo(m["objects"].player.currentPano.position)}]);n&&n.length?(m["objects"].player.currentPano=n[0].pano,this.noPanoHasNeighbor=!1):this.noPanoHasNeighbor=!0}this.pauseSetPanoVisible(),this.updateFootIconSize(),app.model.cadFloorPlane.rebuildLabels()})),Object(p["a"])(this,"searchNeib",(function(e){var t={};return this.panoVTemp[e]?(t.seeMarkers=this.panoVTemp[e].seeMarkers,t.neighbourUUIDs=this.panoVTemp[e].neighbourUUIDs,t.neighbourPanos=this.panoVTemp[e].neighbourPanos):(t.seeMarkers=ee.index[e].seeMarkers.slice(0),t.neighbourUUIDs=ee.index[e].neighbourUUIDs.slice(0),t.neighbourPanos=C["a"].CloneObject(ee.index[e].neighbourPanos)),t})),Object(p["a"])(this,"turnToPanoIndex",(function(e){for(var t=[],i=0;i<e.length;i++){var n=ee.index[e[i]],o=ee.list.indexOf(n);t.push(o)}return t})),Object(p["a"])(this,"beginSetTagVisible",(function(){if(!this.setTagVisible){for(var e in this.setTagVisible=!0,m["objects"].tagManager.tags)"videoPanoFlag"!=m["objects"].tagManager.tags[e].state&&(m["objects"].tagManager.tags[e].disc.visible=!0,m["objects"].tagManager.tags[e].disc.material.depthTest=!1);this.tagVTemp={},m["config"].isMobile?$("footer .tmpl-hotVisible .tips").text("点击选择要设置的热点"):($("#gui-parent .confirmSnap").removeClass("hide"),$("#setTagVisible label").off("click",this.beginSetTagVisible.bind(this)),$("#setTagVisible label").on("click",this.finishSetTagVisible.bind(this)),$(".hotpoint.buttons.tail button").addClass("unable")),this.setDisplay(!0)}})),Object(p["a"])(this,"SetOneTagVisible",(function(e){if(this.tagVsetting!=e){this.tagVsetting&&(this.saveLastTagVi(this.tagVsetting),this.tagVsetting.setElemType(this.tagVsetting.style,this.tagVsetting.styleImageURL)),this.tagVsetting=e,this.delVisibleLines(),this.showFootIcons(m["objects"].player.currentPano),this.createTagVisiLines(e);var t=m["store"].getters["hotspot/tags"].find((function(t){return t.sid==e.sid}));e.style=t.style,e.styleImageURL=t.styleImageURL,e.setElemType(t.style,t.styleImageURL),this.updateFootIconSize()}})),Object(p["a"])(this,"saveLastTagVi",(function(){var e=!1,t=this.tagVTemp[this.tagVsetting.sid]||this.tagVsetting.visiblePanos.slice(0);for(var i in this.tagsVLines){var n=this.tagsVLines[i];if(n.name.indexOf("new")>-1&&n.visible)t.push(i),e=!0;else if(-1==n.name.indexOf("new")&&!n.visible){var o=t.indexOf(i);if(-1==o){console.log("visiblePanos删除error");continue}t.splice(o,1),e=!0}}e&&(this.tagVTemp[this.tagVsetting.sid]=t)})),Object(p["a"])(this,"pauseSetTagVisible",(function(e){this.setTagVisible&&this.tagVsetting&&("unsaved"==e?this.saveLastTagVi(this.tagVsetting):this.tagVTemp={},this.tagVsetting.setElemType(this.tagVsetting.style,this.tagVsetting.styleImageURL),this.delVisibleLines(),this.hideFootIcons(),this.tagVsetting=null)})),Object(p["a"])(this,"finishSetTagVisible",(function(){if(this.setTagVisible)for(var e in this.pauseSetTagVisible(),this.setTagVisible=!1,this.setDisplay(!1),m["config"].isMobile||m["store"].commit("hotspot/SetCanVisible",!1),m["objects"].tagManager.tags)"videoPanoFlag"!=m["objects"].tagManager.tags[e].state&&(m["objects"].tagManager.tags[e].disc.visible=!1,m["objects"].tagManager.tags[e].disc.material.depthTest=!0)})),Object(p["a"])(this,"saveTagVisibles",(function(){this.tagVsetting&&this.saveLastTagVi(this.tagVsetting);var e=[];for(var t in this.tagVTemp)e.push({sid:t,value:this.tagVTemp[t]});if(0!=e.length)return e;this.finishSetTagVisible()})),Object(p["a"])(this,"afterSaveTagVisibles",(function(){for(var e in this.tagVTemp)m["objects"].tagManager.tags[e].visiblePanos=this.tagVTemp[e],m["objects"].tagManager.tags[e].getFloors();this.finishSetTagVisible()})),Object(p["a"])(this,"createTagVisiLines",(function(e){for(var t=this.tagVTemp[e.sid]||e.visiblePanos,i=0;i<t.length;i++){var n=ee.index[t[i]];n.floor==m["objects"].model.currentFloor&&this.createTagSingleLine(n,"old",e)}})),Object(p["a"])(this,"createTagSingleLine",(function(e,t,i){var n=ce["a"].createLine([e.floorPosition.clone(),i.position.clone()],{color:de["a"].green});this.meshGroup.add(n),n.name="tagVL-"+t+"-"+e.id,this.tagsVLines[e.id]=n,this.changeFIconState(ee.index[e.id].footIcon,"linked")})),Object(p["a"])(this,"dealTagVisible",(function(e,t){this.tagsVLines[t]?(this.tagsVLines[t].visible=!this.tagsVLines[t].visible,this.changeFIconState(ee.index[t].footIcon,!!this.tagsVLines[t].visible&&"linked")):this.createTagSingleLine(ee.index[t],"new",e)})),Object(p["a"])(this,"delVisibleLines",(function(){for(var e in this.tagsVLines)this.tagsVLines[e].geometry.dispose(),this.tagsVLines[e].material.dispose(),this.meshGroup.remove(this.tagsVLines[e]),delete this.tagsVLines[e];for(var e in this.panoVLines)this.panoVLines[e].geometry.dispose(),this.panoVLines[e].material.dispose(),this.meshGroup.remove(this.panoVLines[e]),delete this.panoVLines[e]})),Object(p["a"])(this,"createPanoVisiLines",(function(e){var t=this.panoVTemp[e.id]&&this.panoVTemp[e.id].neighbourPanos||e.neighbourPanos;for(var i in t)t[i]&&i!=e.id&&this.createPanoSingleLine(e,"old",i)})),Object(p["a"])(this,"createPanoSingleLine",(function(e,t,i){var n=ee.index[i],o=n.floorPosition.clone(),a=ce["a"].createLine([e.floorPosition.clone(),o],{color:de["a"].green,deshed:n.floorIndex!=e.floorIndex});this.meshGroup.add(a),a.name="PanoVL-"+t+"-"+i,n.floorIndex!=e.floorIndex&&(a.material.opacity=.5),this.panoVLines[i]=a,this.changeFIconState(ee.index[i].footIcon,"linked")})),Object(p["a"])(this,"dealPanoVisible",(function(e){var t;this.panoVsetting?e==this.panoVsetting.id?this.pauseSetPanoVisible("unsaved"):(this.panoVLines[e]?(this.panoVLines[e].visible=!this.panoVLines[e].visible,t=this.panoVLines[e].visible,this.changeFIconState(ee.index[e].footIcon,!!this.panoVLines[e].visible&&"linked"),this.checkHasNeighbor(app.firstView.pano)||Object(se["a"])({content:he["a"].t("modules.walk.pano_tips")})):(this.createPanoSingleLine(this.panoVsetting,"new",e),t=!0),app.firstView.pano==this.panoVsetting&&this.checkHasNeighbor(app.firstView.pano)?m["store"].commit("walk/Disable",!0):m["store"].commit("walk/Disable",!1),t?(this.changeFIconState2(ee.index[e].footIcon,!0),this.changeFIconState2(ee.index[this.panoVsetting.id].footIcon,!0)):(this.changeFIconState2(ee.index[e].footIcon,this.checkHasNeighbor(ee.index[e])),this.changeFIconState2(ee.index[this.panoVsetting.id].footIcon,this.checkHasNeighbor(this.panoVsetting)))):this.SetOnePanoVisible(ee.index[e]);this.updateFootIconSize()})),Object(p["a"])(this,"showFootIcons",(function(e,t,i){var n=this;if(!this.footIcons){te=P["default"].load(m["config"].getStaticResource("img/End_128.png")),ie=P["default"].load(m["config"].getStaticResource("img/End_unable_128.png")),ne=P["default"].load(m["config"].getStaticResource("img/walk/mutil_connect_normal128.png")),this.footIcons=[];var o=.4;o*=40/Math.sqrt(Math.min($("#objects.player").width(),$("#objects.player").height())),o=THREE.Math.clamp(o,.3,.7);var a=new THREE.PlaneGeometry(o,o,1,1);for(var r in ee.index)if(ee.index[r].isAligned()){var s=THREE.UniformsUtils.clone(y["a"].waypoint.uniforms);s.map.value=te,s.color.value.set("#ffffff");var l=new THREE.RawShaderMaterial({vertexShader:y["a"].waypoint.vertexShader,fragmentShader:y["a"].waypoint.fragmentShader,uniforms:s,side:THREE.DoubleSide,transparent:!0,depthWrite:!1,depthTest:!1,name:"footIcon"}),c=new THREE.Mesh(a,l);c.position.copy(ee.index[r].floorPosition.clone()),c.lookAt(c.position.clone().add(new THREE.Vector3(0,1,0))),c.name=ee.index[r].id,c.visible=!1,c.renderOrder=6,ee.index[r].footIcon=c,this.meshGroup.add(c),this.footIcons.push(c)}}i=i||m["objects"].model.currentFloor,ee.list.forEach((function(o){o.isAligned()&&(o.floor==i?(o.footIcon.visible=!0,n.changeFIconState(o.footIcon,!1),t&&n.changeFIconState2(o.footIcon,n.checkHasNeighbor(ee.index[o.id],"beforeCreateLine")),e&&o==e?(o.footIcon.oriScale=new THREE.Vector3(1.5,1.5,1.5),t&&n.changeFIconState(o.footIcon,"center")):o.footIcon.oriScale=new THREE.Vector3(1,1,1)):o.footIcon.visible=!1)}))})),Object(p["a"])(this,"checkHasNeighbor",(function(e,t){var i=this.panoVTemp&&this.panoVTemp[e.id]?this.panoVTemp[e.id].neighbourPanos:e.neighbourPanos;if("beforeCreateLine"==t||e!=this.panoVsetting){for(var n in i)if(n!=e.id&&i[n]){if(this.panoVsetting&&this.panoVsetting.id==n&&this.panoVLines[e.id]&&!this.panoVLines[e.id].visible)continue;return!0}return!1}for(var n in this.panoVLines)if(this.panoVLines[n].visible)return!0})),Object(p["a"])(this,"ifAllPanoNoNeighbor",(function(){for(var e in ee.index)if(ee.index[e].isAligned()&&this.checkHasNeighbor(ee.index[e]))return!1;return this.noPanoHasNeighbor=!0,!0})),Object(p["a"])(this,"changeFIconState",(function(e,t){var i="linked"==t?de["a"].green:"center"==t?"#d5f12e":"#ffffff";try{e.material.uniforms.color.value.set(i)}catch(n){console.log(n)}})),Object(p["a"])(this,"changeFIconState2",(function(e,t){t?(e.material.uniforms.map.value=te,this.panoVsetting&&(this.panoVsetting.id!=e.name?e.material.uniforms.opacity.value=1:this.changeVisiBtnState(!0)),this.changeFIconState3(e)):(e.material.uniforms.map.value=ie,this.panoVsetting&&this.panoVsetting.id==e.name?(e.material.uniforms.opacity.value=1,this.changeVisiBtnState(!1)):e.material.uniforms.opacity.value=.5)})),Object(p["a"])(this,"changeFIconState3",(function(e){var t=app.model.panos.index[e.name],i=t.neighbourUUIDs.find((function(e){return app.model.panos.index[e].floor!=t.floor}));i&&(e.material.uniforms.map.value=ne)})),Object(p["a"])(this,"recoverAllState2",(function(){for(var e=0;e<this.footIcons.length;e++)this.footIcons[e].material.uniforms.opacity.value=1,this.footIcons[e].material.uniforms.map.value=te})),Object(p["a"])(this,"hideFootIcons",(function(){if(this.footIcons)for(var e=0;e<this.footIcons.length;e++)this.footIcons[e].visible=!1})),Object(p["a"])(this,"updateFootIconSize",(function(){if(this.footIcons){var e=F["a"].getScaleForConstantSize({width2d:150,position:new THREE.Vector3,camera:m["objects"].player.camera});e=THREE.Math.clamp(e,.45,1.7),this.footIcons.forEach((function(t){t.visible&&t.scale.copy(t.oriScale).multiplyScalar(e)}))}})),Object(p["a"])(this,"resetTagVisiByModel",(function(){var e=[];for(var t in m["objects"].tagManager.tags){var i=m["objects"].tagManager.tags[t];if("videoPanoFlag"!=i.state){var n=i.getVisiblePanos();e.push({sid:i.sid,value:n})}}return e})),Object(p["a"])(this,"afterResetTagVisibles",(function(e){e.forEach((function(e){m["objects"].tagManager.tags[e.sid].setVisiblePanos(e.value)})),"panorama"==m["objects"].player.mode&&m["objects"].tagManager.updateVisible("panorama")})),Object(p["a"])(this,"resetVisiblesByModel",(function(){this.resetTagVisiByModel()})),Object(p["a"])(this,"gotoFloor",(function(e){var t=this;if(app.model.currentFloor.floorIndex!=e){var i=app.model.floors.index[e];this.setTagVisible?this.pauseSetTagVisible("unsaved",i):this.setPanoVisible&&(this.pauseSetPanoVisible("unsaved",i),setTimeout((function(){app.player.currentPano.floor==i&&t.SetOnePanoVisible(app.player.currentPano)}),1));var n=this.getFitBoundSize(i),o=i.boundingBoxExpand.getCenter(new THREE.Vector3);app.player.focusPoint({modelSize:n,aim:o})}})),this.setPanoVisible=!1,this.setTagVisible=!1,this.footIcons,this.panoVsetting,this.panoVLines={},this.panoVTemp,this.tagVsetting,this.tagsVLines={},this.tagVTemp,ee=m["objects"].player.model.panos,this.ifAllPanoNoNeighbor(),m["config"].isEdit){this.meshGroup=new THREE.Object3D,this.meshGroup.name="setVisible-group",m["objects"].player.model.add(this.meshGroup);var i=this;le["a"].on("walk/Set",(function(e){if(console.log("walk/Set "+e),e){var t=ee.sortByScore([function(e){return e.isAligned()}],[function(e){return-e.position.distanceTo(i.panoVsetting.position)}]);if(1==t.length)return void console.log("仅有一个漫游点");for(var n,o=Math.max(1.5*-t[1].score,4),a=function(e,t){var i=e.position.clone(),n=t.position.clone();return ue["a"].ifIntersectChunks(i,n,{})},r=(o=Math.max(2*-t[1].score,4),1);r<t.length;r++)if(-t[r].score<o)a(i.panoVsetting,t[r].pano)&&(t[r].block=!0),t[r].good=!0;else{if(n||(n=t.filter((function(e){return e.good&&!e.block}))),!(n.length<2))break;if(!a(i.panoVsetting,t[r].pano))if(0==n.length)n.push(t[r]);else{var s=n[0].pano.position.clone().sub(i.panoVsetting.position).setY(0),l=t[r].pano.position.clone().sub(i.panoVsetting.position).setY(0);if(s.angleTo(l)>Math.PI/2){console.log("再加一个 角度"+THREE.Math.radToDeg(s.angleTo(l)));break}}}0==n.length&&n.push(t[0].pano),n.forEach((function(e){return i.dealPanoVisible(e.pano.id)})),console.log(n)}else{for(var c in i.panoVLines)i.panoVLines[c].visible&&i.dealPanoVisible(c);i.dealPanoVisible(i.panoVsetting.id)}})),le["a"].on("walk/Save",this.afterSavePanoVisibles.bind(this)),"walk"==m["store"].getters.page&&this.enterSet("panoVisible"),le["a"].on("hotspot/Setting",this.afterSaveTagVisibles.bind(this)),le["a"].on("hotspot/resetVisible",this.afterResetTagVisibles.bind(this)),le["a"].on("hotspot/Visible",(function(e){e&&i.enterSet("tagVisible")})),window.enterSet=this.enterSet.bind(this),app.model.on("floor.changed",(function(e,i){(t.setTagVisible||t.setPanoVisible)&&t.gotoFloor(e.floorIndex)}))}}return Object(r["a"])(e,[{key:"enterSet",value:function(e){var t=this;if("panoVisible"==e){if(!m["objects"].player.modeTran)return void(m["objects"].player.afterCModeFuc=function(){t.enterSet(e)});"floorplan"!=m["objects"].player.modeTran.split("-")[1]&&(m["objects"].player.flyoutType="beginSetPanoVisible",setTimeout(this.beginSetPanoVisible.bind(this),300)),setTimeout((function(){if(m["objects"].player.FlyToMode("floorplan",t.beginSetPanoVisible.bind(t)),"floorplan"==m["objects"].player.mode){var e=app.model.currentFloor,i=t.getFitBoundSize(e),n=e.boundingBoxExpand.getCenter(new THREE.Vector3);app.player.focusPoint({modelSize:i,aim:n})}}),10)}else m["objects"].player.FlyToMode("floorplan",this.beginSetTagVisible.bind(this))}},{key:"setDisplay",value:function(e){e?(m["objects"].player.model.panos.forEach((function(e){(e.hasVideo||e.panoVideo)&&(e.marker.visibleOri=!0)})),m["objects"].player.model.cadFloorPlane.changeCadVisible(!1)):(m["objects"].player.model.panos.forEach((function(e){(e.hasVideo||e.panoVideo)&&(e.marker.visibleOri=e.neighbourUUIDs.length>0)})),m["objects"].player.model.cadFloorPlane.changeCadVisible(null,{autoJudge:!0})),m["objects"].player.defaultRoomLabels.forEach((function(e){e.update()})),m["objects"].player.path.currentPanoMarker.mesh.visible=!e,m["objects"].overlayManager.group.visible=!e,m["objects"].player.reticule.visible=!e}},{key:"getFitBoundSize",value:function(e,t){t||(t=e.sizeExpand);var i=($("#player").width()+$("#player").height())/160,n=t.x,o=t.y,a=new THREE.Vector3(n<i?(i+e.sizeExpand.x)/2:Math.min(n+.3*e.sizeExpand.x,e.sizeExpand.x),1,o<i?(i+e.sizeExpand.z)/2:Math.min(o+.3*e.sizeExpand.z,e.sizeExpand.z));return a}}]),e}(),fe=i("cbe8"),me=i("d9c2"),ve=i("eb5a"),ge={ZoomIn:"zoom.in",ZoomOut:"zoom.out",ZoomMax:"zoom.max",ZoomMin:"zoom.min"},ye=ge,be=i("eff1"),we=(i("4eb1"),i("1970"),new THREE.Object3D);we.name="OverlayGroup";var Ee=ce["a"].createFatLineMat({alwaysShow:!0,width:x["a"].isMobile?2:3,color:"#4fffff",opacity:.3}),Te=!0,Pe={init:function(e){m["objects"].player.overlayManager=this,e.add(we),m["objects"].sceneRenderer.addComponent(this);var t=m["store"].getters["scene/metadata"];t.overlay&&JSON.parse(t.overlay).forEach((function(e){e.pos=(new THREE.Vector3).fromArray(e.pos),e.qua=(new THREE.Quaternion).fromArray(e.qua),Pe.add(new be["a"](e))}))},add:function(e){we.add(e)}};m["objects"].overlayManager=m["objects"].overlayManager=Pe,Pe.group=we,Pe.setSize=function(e,t){Ee.resolution.set(e,t),this.openOverlay&&this.resizeOverlay()},Pe.hoverOverlay=function(e,t){if(this.group.visible){var i=200;if(Te&&e){var n=e.parent;e=n.plane}else n=e;if(e)if(n!=this.hoveringPlane){this.hoveringPlane&&this.hoverOverlay(null);for(var o=e.geometry.vertices,a=new THREE.Object3D,r=[0,1,3,2],s=0;s<4;s++){var l=[o[r[s]].x,o[r[s]].y,o[r[s]].z,o[r[(s+1)%4]%4].x,o[r[(s+1)%4]%4].y,o[r[(s+1)%4]%4].z];a.add(ce["a"].createFatLine(l,{material:Ee}))}e.add(a),this.hoveringPlane=n,Ee.uniforms.opacity.value=0,E["a"].cancelById(f["a"].freeze.wallLineShine,!0),E["a"].start(function(e){Ee.uniforms.opacity.value=e}.bind(this),i,null,0,j["a"][f["a"].transition.blendEasing],"wallLineShine",f["a"].freeze.wallLineShine),$("#player").css("cursor","pointer")}else $("#player").css("cursor","pointer");else if(this.hoveringPlane){var c=function(){u.children[0].children.forEach((function(e){e.geometry.dispose()})),u.remove(u.children[0])},u=Te?this.hoveringPlane.plane:this.hoveringPlane;E["a"].cancelById(f["a"].freeze.wallLineShine),"soon"==t?(Ee.uniforms.opacity.value=0,c()):E["a"].start(function(e){Ee.uniforms.opacity.value=1-e}.bind(this),i,c,0,j["a"][f["a"].transition.blendEasing],"wallLineShine",f["a"].freeze.wallLineShine,c),this.hoveringPlane=null,$("#player").css("cursor","")}}},Pe.getOverlayOpenPos=function(e){var t=.9,i=e.width/($("#player").width()*t),n=e.height/($("#player").height()*t),o=1/Math.max(i,n),a=-e.width*o/$("#player").width(),r=player.cameraControls.activeControl?player.cameraControls.activeControl.camera:player.camera,s=new THREE.Vector3(a,0,-1).unproject(r),l=s.clone().sub(player.camera.position),c=player.getDirection(),u=c.angleTo(l),d=e.width/2/Math.tan(u);if(Te){var h=e.plane.position.length();d+=h}var p=player.camera.position.clone().add(c.clone().multiplyScalar(d));return this.useCssRender||this.updatePlaneElemStyle(o),p},Pe.updatePlaneElemStyle=function(e){this.openOverlay.elem.css({width:this.openOverlay.width*e+"px",height:this.openOverlay.height*e+"px"})};Pe.clickOverlay=function(e){if(!this.openOverlay||e){var t=Te&&e?e.plane:e;"video"==e.overlayType&&t.material.map.image.play();var i=m["objects"].player.domElement.clientWidth/m["objects"].player.domElement.clientHeight*Math.tan(THREE.Math.degToRad(m["objects"].player.zoomFov/2)),n=e.width/2/i;console.log("goodDistance "+n),n*=n;var o=ue["a"].getVisiblePano(e.plane.getWorldPosition(),{model:m["objects"].mainDesign&&m["objects"].mainDesign.editing?m["objects"].mainDesign.getMeshes(["wallMeshes","objWallMeshes","groundMeshes"]):null});0==o.length&&console.warn("clickOverlay 找不到visiblePanos");var a={};return m["objects"].player.flyToPoint(e.position.clone(),{rank:[function(t){var i=new THREE.Vector3(0,0,1).applyQuaternion(e.quaternion),n=i,o=t.position.clone().sub(e.position),r=n.angleTo(o);return a[t.id]=r,r=100*-r,r},function(t){var i=t.position.clone().distanceToSquared(e.position),o=n*Math.abs(Math.cos(a[t.id])),r=-300*Math.abs(i-o)/o;return r}],require:[function(e){return o.includes(e.id)}]}),m["objects"].player.EditOverlay&&m["objects"].player.EditOverlay.editing?(console.log("videos/panel/display面板出现"),void setTimeout((function(){le["a"].emit("videos/panel/display",!0),m["objects"].player.EditOverlay.updateOverlayPanel(e),m["objects"].player.EditOverlay.controlSelectOverlay(e),e.updateVisibleOnFloor()}),10)):void 0}},$("#hotspot .overlay").on("mouseup",(function(){var e=Pe.openOverlay,t=Te?e.plane:e;e.opened&&(e.opened=!1,$("#hotspot .overlay").html("").addClass("hide"),"video"==e.overlayType&&setTimeout((function(){t.material.map.image.play()}),100),Pe.openOverlay.visible=!0,E["a"].start((function(t){var i=e.openPos,n=e.oriPos;e.position.set(i.x*(1-t)+n.x*t,i.y*(1-t)+n.y*t,i.z*(1-t)+n.z*t)}),200,(function(){Pe.openOverlay=null,t.material.depthTest=!0}),0,j["a"][f["a"].transition.blendEasing],"closeOverlay",f["a"].freeze.clickOverlay),E["a"].start(T["a"].quaternion(e.quaternion,e.oriQua,(function(e){})),200,(function(){}),0,j["a"][f["a"].transition.blendEasing],"closeOverlayQua",f["a"].freeze.clickOverlay))}));var xe=Pe,ke=(i("b54a"),void 0),Re=window.linkScene={leftSceneLinkInfo:null,rightSceneLinkInfo:null},_e=Re.rightSceneLinkInfoAll={},Se={left:null,right:null},Me=!1;Re.getMetadata=function(){var e=app.store.getters["scene/metadata"].linkScene;return e=e?JSON.parse(e):[],e},Re.checkState=function(e,t,i){if("parent"==e){if(!Re.leftSceneLinkInfo)return;Se.left&&Re.setActiveItem(0,Se.left,"none"),Se.left=null;for(var n=0;n<Re.leftSceneLinkInfo.length;n++)if(Re.leftSceneLinkInfo[n].pano==t.id){Se.left=Re.leftSceneLinkInfo[n],Re.setActiveItem(0,Se.left);break}if("panorama"!=m["objects"].player.mode||!window.linkSceneFrame||!linkSceneFrame.player||"panorama"!=linkSceneFrame.player.mode)return void le["a"].emit("link/setBtnState","hide")}else{if(!Re.rightSceneLinkInfo)return;Se.right&&Re.setActiveItem(1,Se.right,"none"),Se.right=null;for(n=0;n<Re.rightSceneLinkInfo.length;n++)if(Re.rightSceneLinkInfo[n].pano==t.id){Se.right=Re.rightSceneLinkInfo[n],Re.setActiveItem(1,Se.right);break}if("panorama"!=m["objects"].player.mode||!window.linkSceneFrame||"panorama"!=linkSceneFrame.player.mode)return void le["a"].emit("link/setBtnState","hide")}Se.left||Se.right?Se.left?Se.right?Se.left.link.projectNum==Re.linkNum&&Se.left.link.pano==Se.right.pano?le["a"].emit("link/setBtnState","prepareToDismiss"):le["a"].emit("link/setBtnState","bothLinked"):le["a"].emit("link/setBtnState","leftHasLinked"):le["a"].emit("link/setBtnState","rightHasLinked"):le["a"].emit("link/setBtnState","prepareToLink"),Re.leftSceneLinkInfo&&Re.rightSceneLinkInfo&&(le["a"].emit("link/setBtnState","show"),Re.loading=!1)};var Ae=function(e,t){return{pano:e,lookAtPoint:t&&new THREE.Vector3(0,0,-1).applyQuaternion((new THREE.Quaternion).fromArray(t)).add(e.position)}};Re.addToList=function(e,t){0==e?le["a"].emit("link/setList",e,Re.leftSceneLinkInfo):le["a"].emit("link/setList",e,Re.rightSceneLinkInfo)},Re.delFromList=function(e,t){if(0==e){var i=Re.leftSceneLinkInfo.indexOf(t);Re.leftSceneLinkInfo.splice(i,1),le["a"].emit("link/setList",e,Re.leftSceneLinkInfo)}else{i=Re.rightSceneLinkInfo.indexOf(t);Re.rightSceneLinkInfo.splice(i,1),le["a"].emit("link/setList",e,Re.rightSceneLinkInfo)}console.log("delFromList "+i)},Re.setActiveItem=function(e,t,i){if(console.log("setActiveItem "+e+","+i),0==e)var n=Re.leftSceneLinkInfo.indexOf(t);else n=Re.rightSceneLinkInfo.indexOf(t);"none"==i&&(n="none"),le["a"].emit("link/setActiveItem",e,n)},Re.ifNeedSave=function(){if(Re.noNeedToSaveOneTime)return Re.noNeedToSaveOneTime=!1,!1;if(Me)return!0;for(var e in _e)if(_e[e].needSave)return!0},Re.save=function(){var e,t={};for(var i in Me&&(e=!0,t[m["config"].projectNum]=JSON.stringify(Re.leftSceneLinkInfo)),Re.rightSceneLinkInfoAll)Re.rightSceneLinkInfoAll[i].needSave&&(e=!0,t[i]=JSON.stringify(Re.rightSceneLinkInfoAll[i].data));e?le["a"].emit("scene/getSavingInfo",t,{done:function(){for(var e in Me=!1,Re.rightSceneLinkInfoAll)Re.rightSceneLinkInfoAll[e].needSave=!1;Object(se["d"])({content:"保存成功!"})},fail:function(){Object(se["d"])({content:"保存失败!"})}}):Object(se["d"])({content:"没有需要保存的数据"})},le["a"].on("scene/SaveLinkScene",Re.save),Re.linkSceneCheck=function(e){if(m["config"].isEdit&&"scene"==m["store"].getters.page||m["config"].openToLinkScene)if(m["config"].isEdit)Re.checkState("parent",m["objects"].player.currentPano);else try{window.player=m["objects"].player,parent.linkScene.checkState("child",m["objects"].player.currentPano)}catch(o){console.log(o)}else if("dontSwitchScene"!=e&&!m["config"].isEdit&&!m["objects"].player.flying&&"panorama"==m["objects"].player.mode){var t,i=Re.getMetadata();if(!i)return;for(var n=0;n<i.length;n++)if(i[n].pano==m["objects"].player.currentPano.id){t=i[n];break}t&&(setTimeout((function(){m["objects"].player.currentPano.id!=t.pano||m["objects"].player.flying||(window.location.href="spc.html?m="+t.link.projectNum+"&firstView=pano:"+t.link.pano+",qua:"+t.link.qua)}),2e3),Object(se["d"])({content:"即将跳转..."}))}},le["a"].on("link/changeScene",(function(e){if(Re.linkNum=e,void 0==e)return Re.rightSceneLinkInfo=null,void(Se.right=null);_e[e]?(Re.rightSceneLinkInfo=_e[e].data,le["a"].emit("link/setList",1,_e[e].data)):le["a"].emit("link/setList",1,null)})),le["a"].on("scene/getMetadata",(function(e,t){e==m["config"].projectNum?Re.leftSceneLinkInfo=t:(_e[e]={data:t},Re.rightSceneLinkInfo=t)})),le["a"].on("scene/dismissLink",(function(){Re.delFromList(0,Se.left),Re.delFromList(1,Se.right),Se={left:null,right:null},Me=!0,_e[Re.linkNum].needSave=!0})),le["a"].on("scene/link",(function(){var e=m["objects"].player.getSnapAngleInfo(),t=linkSceneFrame.window.player.getSnapAngleInfo(),i=t.metadata.camera_quaternion.toArray();i=[i[0],i[1],i[2],i[3]],t.metadata.camera_quaternion=F["a"].toPrecision(i,4),e.metadata.camera_quaternion=F["a"].toPrecision(e.metadata.camera_quaternion.toArray(),4);var n={pano:e.metadata.scan_id,qua:e.metadata.camera_quaternion,link:{projectNum:Re.linkNum,qua:t.metadata.camera_quaternion,pano:t.metadata.scan_id}},o={pano:t.metadata.scan_id,qua:t.metadata.camera_quaternion,link:{projectNum:m["config"].projectNum,qua:e.metadata.camera_quaternion,pano:e.metadata.scan_id}};Re.leftSceneLinkInfo.push(n),Re.rightSceneLinkInfo.push(o),Se={left:n,right:o},console.log(n),console.log(o),Re.addToList(0,n),Re.addToList(1,o),setTimeout(Re.setActiveItem.bind(ke,0,Se.left),60),setTimeout(Re.setActiveItem.bind(ke,1,Se.right),60),Me=!0,_e[Re.linkNum].needSave=!0})),le["a"].on("scene/clickItem",(function(e,t){try{if(0==e){var i=Re.leftSceneLinkInfo[t];m["objects"].player.flyToPano(Ae(m["objects"].player.model.panos.index[i.pano],i.qua)),i.link.projectNum==Re.linkNum&&linkSceneFrame.player.flyToPano(Ae(linkSceneFrame.player.model.panos.index[i.link.pano],i.link.qua))}else{i=Re.rightSceneLinkInfo[t];i.link.projectNum==m["config"].projectNum&&m["objects"].player.flyToPano(Ae(m["objects"].player.model.panos.index[i.link.pano],i.link.qua)),linkSceneFrame.player.flyToPano(Ae(linkSceneFrame.player.model.panos.index[i.pano],i.qua,i.pano))}}catch(n){}})),le["a"].on("scene/delSingleLink",(function(e,t){0==e?(Re.delFromList(0,Se.left),Re.checkState("parent",m["objects"].player.currentPano),Me=!0):(Re.delFromList(1,Se.right),Re.checkState("child",linkSceneFrame.player.currentPano),_e[Re.linkNum].needSave=!0)})),m["objects"].linkScene=Re;var Oe=Re,Ce=i("53ca"),De=(i("f715"),i("9b24")),Ve=(i("951b"),i("4be4")),Ie=(i("7a31"),i("b775")),je=(i("2fde"),i("f876")),Le=i("935f"),Fe=i("dbf4"),He=i("aa1f");i("ccc0"),i("a481");function ze(e){var t=Ne();return function(){var i,n=Object(h["a"])(e);if(t){var o=Object(h["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(u["a"])(this,i)}}function Ne(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var Be,Ue,We,qe,Ge,Qe,Ye,Xe,Ze,Je=!1,$e=10,Ke=function(e,t,i){Ze.material.uniforms.tDiffuse.value=t;var n=(new THREE.Quaternion).setFromAxisAngle(new THREE.Vector3(0,1,0),Math.PI/2);Ye.quaternion.copy((new THREE.Quaternion).multiplyQuaternions(n,i));var o=new THREE.Vector3(0,0,.8*-$e).applyQuaternion(Ye.quaternion);Ye.position.copy(o.clone().negate());var a=m["objects"].sceneRenderer.renderer.autoClear;m["objects"].sceneRenderer.renderer.autoClear=!1,m["objects"].sceneRenderer.renderer.render(Xe,Ye,e,!1),m["objects"].sceneRenderer.renderer.autoClear=a},et=function(e){Object(c["a"])(i,e);var t=ze(i);function i(e,n){var a;return Object(o["a"])(this,i),a=t.call(this),a.view=n,a.sid=e.sid,a.state="sprite",a}return Object(r["a"])(i,[{key:"update",value:function(e,t){if("sprite"==this.state&&this.mesh.visible&&(t||!this.mesh.material.uniforms.opacity||this.mesh.material.uniforms.opacity.value>0)&&this.mesh.quaternion.copy(e.quaternion),this.strictScale){var i=F["a"].getScaleForConstantSize({maxSize:100,minSize:40,nearBound:2,farBound:80,camera:e,position:this.mesh.position});this.mesh.scale.set(i,i,i)}}},{key:"setStrictScale",value:function(e){this.strictScale=e,e?this.update(m["objects"].player.camera):this.mesh.scale.set(1,1,1)}},{key:"setMapIn",value:function(e){this.mesh.material.uniforms.mapIn.value=e}},{key:"dispose",value:function(){}}]),i}(EventEmitter),tt=function(e){Object(c["a"])(i,e);var t=ze(i);function i(e,n){var a;return Object(o["a"])(this,i),a=t.call(this,e,n),a.circleType=e.circleType,a.position=new THREE.Vector3,a.quaternion=new THREE.Quaternion,a.build(e),a}return Object(r["a"])(i,[{key:"build",value:function(e){var t=THREE.UniformsUtils.clone(y["a"].linkSpotInside.uniforms),i=new THREE.Mesh(Be,new THREE.RawShaderMaterial({uniforms:t,vertexShader:y["a"].linkSpotInside.vertexShader,fragmentShader:y["a"].linkSpotInside.fragmentShader,transparent:!0,side:THREE.DoubleSide}));if(i.renderOrder=w["a"].reticule,i.name="circle_"+(this.circleType?this.circleType:"")+this.sid,this.mesh=i,this.setMapOut(e),"exitDoor"==this.circleType)this.mesh.visible=!1,this.mesh.material.depthTest=!1,e.exitDirection&&this.mesh.position.copy(e.exitDirection);else{if(e.circle){e.circle.pos&&this.position.fromArray(e.circle.pos),e.circle.qua&&this.quaternion.fromArray(e.circle.qua);var n=e.circle.scale/100;e.circle.scale&&this.mesh.scale.set(n,n,n),this.state="3D",this.updatePos()}m["objects"].player.isOutsideMode()&&(this.mesh.visible=!1)}}},{key:"updatePos",value:function(e,t){if("at360View"==e){new THREE.Vector3;var i=t.viewDir.clone().normalize();this.mesh.position.copy(i.multiplyScalar(f["a"].view360.circleDisToCenter)),this.at360View=!0,this.state="sprite",this.judgeDepthTest()}else t&&(t.position&&this.position.copy(t.position),t.quaternion&&this.quaternion.copy(t.quaternion)),this.mesh.position.copy(this.position),this.mesh.quaternion.copy(this.quaternion),this.at360View=!1,this.state="3D",this.judgeDepthTest()}},{key:"judgeDepthTest",value:function(){this.mesh.material.depthTest="sprite"!=this.state&&!this.selected}},{key:"setSelect",value:function(e){if(e!=this.selected){this.selected=e;var t=500;this.judgeDepthTest(),E["a"].start(T["a"].uniform(this.mesh,"progress",e?1:0),t,(function(){}),0,j["a"][f["a"].transition.blendEasing],"circlePro")}}},{key:"setMapOut",value:function(e){var t;t="exitDoor"==this.circleType?e?e instanceof THREE.Texture?e:"string"==typeof e?P["default"].load(e):e.style&&e.style.exit.url?P["default"].load(e.style.exit.url):Qe:Qe:e?e instanceof THREE.Texture?e:"string"==typeof e?P["default"].load(e):e.style&&e.style.enter.url?P["default"].load(e.style.enter.url):Ge:Ge,this.mesh.material.uniforms.mapOut.value=t}}]),i}(et),it=function(e){Object(c["a"])(i,e);var t=ze(i);function i(e,n){var a;return Object(o["a"])(this,i),a=t.call(this,e,n),a.build(e),a}return Object(r["a"])(i,[{key:"build",value:function(e){var t=THREE.UniformsUtils.clone(y["a"].linkSpot.uniforms);t.mapOut.value=We,t.mapOut2.value=qe,"panorama"==m["objects"].player.modeTran.split("-")[1]&&(t.opacity.value=0);var i=new THREE.Mesh(Ue,new THREE.RawShaderMaterial({uniforms:t,vertexShader:y["a"].linkSpot.vertexShader,fragmentShader:y["a"].linkSpot.fragmentShader,transparent:!0,side:THREE.DoubleSide}));i.renderOrder=w["a"].reticule,i.name="balloon_"+this.sid,this.mesh=i,e.balloon&&e.balloon.pos&&this.mesh.position.fromArray(e.balloon.pos),this.mesh.visible=!1}},{key:"showOrHide",value:function(e,t,i){var n=this;"auto"==i&&(e="panorama"!=m["objects"].player.modeTran.split("-")[1]&&(m["objects"].model.allFloorsVisible||this.view.floor==m["objects"].model.currentFloor));t=void 0!=t?t:500;var o=e?1:0;this.mesh.material.uniforms.opacity.value!=o&&(e&&(this.mesh.visible=!0),this.update(m["objects"].player.camera,!0),E["a"].start(T["a"].uniform(this.mesh,"opacity",o),t,(function(t){n.mesh.visible=!!e}),0,j["a"][f["a"].transition.blendEasing],"balloonOpa"))}},{key:"setSelect",value:function(e){this.mesh.material.uniforms.isActive.value=e?1:0}}]),i}(et),nt=function(e){Object(c["a"])(i,e);var t=ze(i);function i(e){var n;return Object(o["a"])(this,i),n=t.call(this),n.sid=e.sid,n.pano=null,n.balloon=new it(e,Object(s["a"])(n)),n.circle=new tt(e,Object(s["a"])(n)),n.linkType=e.type,n.enterQuaternion=e.enterQuaternion?(new THREE.Quaternion).fromArray(e.enterQuaternion):new THREE.Quaternion,n.exitDirection=e.exitDirection?(new THREE.Vector3).fromArray(e.exitDirection):new THREE.Vector3(0,0,f["a"].view360.circleDisToCenter),n.url=e.url,(x["a"].isEdit||"pano"==n.linkType)&&(n.exitDoor=new tt($.extend({},e,{circleType:"exitDoor",exitDirection:n.exitDirection}))),e.version&&(e.version=m["store"].getters["scene/metadata"].version+(x["a"].isEdit?"edit":"")),e.thumb&&(e.thumb+=m["store"].getters["scene/metadata"].version+(x["a"].isEdit?"edit":"")),n.nearestPano=e.nearestPano&&m["objects"].model.panos.index[e.nearestPano],n.nearestPano&&(n.floor=n.nearestPano.floor,n.floor.addView(Object(s["a"])(n))),n.setPano(e),n.visibleViews=e.visibleViews||{},n._data=e,n}return Object(r["a"])(i,[{key:"update",value:function(e,t){this.balloon.update(e,t),this.circle.update(e,t),this.exitDoor&&this.exitDoor.update(e,t)}},{key:"dispose",value:function(){var e=this;this.balloon.dispose(),this.circle.dispose(),this.exitDoor.dispose(),this.deleteOldPano(),m["objects"].player.currentPano==this.pano?this.backToPanorama():this.entering&&(m["objects"].player.waitFlytoItemFuc=function(){e.backToPanorama()}),this.floor&&this.floor.removeView(this)}},{key:"deleteOldPano",value:function(){var e=this;if(this.pano){this.pano.floor.removePano(this.pano),this.pano.exit(),delete this.pano.panoRenderer.activeRenderTargetDescriptors[this.sid],delete this.pano.panoRenderer.panoDescriptors[this.sid],delete this.pano.panoRenderer.tileTrees[this.sid],delete this.pano.panoRenderer.tileDirectory[this.sid],delete this.pano.tileDownloader.downloadDescriptors[this.sid],this.pano.tileDownloader.priorityQueue=this.pano.tileDownloader.priorityQueue.filter((function(t){return t.pano!=e.pano})),this.pano.tileDownloader.activeDownloads=this.pano.tileDownloader.activeDownloads.filter((function(t){return t.pano!=e.pano}));for(var t=this.pano.panoRenderer.M,i=0;i<t.length;i++)if(t[i].pano==this.pano){t.splice(i,1);break}var n=m["objects"].model.panos.list.indexOf(this.pano);m["objects"].model.panos.list.splice(n,1)}}},{key:"setPano",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("pano"==this.linkType){if(e.thumb||e.thumbPanoTex){var t=!!this.pano;this.pano&&this.deleteOldPano();var i=new W["a"](m["objects"].model,this.sid,{alignmentType:"360view",position:new THREE.Vector3,quaternion:new THREE.Quaternion,puck:new THREE.Vector3(0,-1.6,0),seeMarkers:[],subgroup:this.nearestPano.floor.floorIndex});if(i.attachToPanoRenderer(app.panoRenderer),i.tileDownloader=app.tileDownloader,i.qualityManager=app.qualityManager,i.build1(),i.view=this,m["objects"].model.panos.add(i),this.panoImgVersion=e.version,t&&m["objects"].player.currentPano==this.pano){var n=function e(){m["objects"].player.checkAndWaitForPanoLoad(i,"high","low",m["objects"].player.basePanoSize,e)||(m["objects"].player.model.setProjectedPanos(i,i),i.enter())};m["objects"].player.currentPano=i,n()}this.pano=i,e.thumbPanoTex?this.thumbPanoTex=e.thumbPanoTex:this.thumbPanoTex=this.renderToGetMap(e.thumb),this.circle.setMapIn(this.thumbPanoTex),this.balloon.setMapIn(this.thumbPanoTex)}this.thumbPanoTex&&(this.circle.mesh.material.uniforms.changeMap.value=1,this.balloon.mesh.material.uniforms.changeMap.value=1)}else this.circle.mesh.material.uniforms.changeMap.value=0,this.balloon.mesh.material.uniforms.changeMap.value=0}},{key:"renderToGetMap",value:function(e){var t=this,i=new THREE.WebGLRenderTarget(256,256,{stencilBuffer:!1});x["a"].isEdit||(e=x["a"].getPublicResource(e),e=e.replace("results","pan"),e=e.replace("scene/",""));var n=P["default"].load(e,(function(){x["a"].isEdit&&(t.unDealTex=n),Ke(i,n,t.enterQuaternion)}));return n.flipY=!1,n.minFilter=THREE.LinearFilter,this.renderTarget=i,i.texture}},{key:"mapChangeRot",value:function(){Ke(this.renderTarget,this.unDealTex,this.enterQuaternion)}},{key:"enter360Pano",value:function(e){m["objects"].player.isOutsideMode()?m["objects"].player.flyToNewMode({mode:"panorama",pano:this.pano,callback:e}):m["objects"].player.flyToPano({pano:this.pano},e)}},{key:"backToPanorama",value:function(){m["objects"].player.flyToPano({pano:m["objects"].player.lastPano||this.nearestPano,lookAtPoint:this.circle.mesh.position})}}]),i}(EventEmitter);nt.init=function(){Je||(Be=new THREE.PlaneBufferGeometry(.4,.4),Ue=new THREE.PlaneBufferGeometry(1.5,1.5),We=P["default"].load("static/img/img_pamove.png",null,null,{antialias:!0}),qe=P["default"].load("static/img/img_pamove_normal.png"),Ge=P["default"].load("static/img/img_panorama_dot.png"),Qe=P["default"].load("static/img/img_exit_dot.png"),Ye=new THREE.PerspectiveCamera,Ye.fov=80,Ye.aspect=1,Ye.updateProjectionMatrix(),Xe=new THREE.Scene,Xe.add(Ye),Ze=new THREE.Mesh(new THREE.SphereBufferGeometry($e,25,25),new THREE.RawShaderMaterial({uniforms:THREE.UniformsUtils.clone(y["a"].sphereRenderToCube.uniforms),vertexShader:y["a"].sphereRenderToCube.vertexShader,fragmentShader:y["a"].sphereRenderToCube.fragmentShader,depthWrite:!1,depthTest:!1,side:THREE.DoubleSide})),Xe.add(Ze),Je=!0)};var ot,at,rt={},st={};rt.checkIfCanInit=function(){return!!m["objects"].sceneRenderer.scene&&m["objects"].player.model},rt.init=function(){var e=this;ot=m["objects"].player,at=Math.max(2*Math.sqrt(m["objects"].model.size.x*m["objects"].model.size.x+m["objects"].model.size.y*m["objects"].model.size.y),30),ot.model.floors.list.forEach((function(e){var t=0;e.panos.forEach((function(e){t+=e.position.y})),t/=e.panos.length,st[e.floorIndex]=t})),this.ground=new THREE.Mesh(new THREE.PlaneGeometry(8e4,8e4,1,1),new THREE.MeshBasicMaterial({transparent:!0,wireframe:!0,opacity:0,side:THREE.DoubleSide,depthTest:!1})),this.ground.lookAt(new THREE.Vector3(0,1,0)),this.ground.name="editLinkView-ground",m["objects"].model.add(this.ground),this.ground.position.setY(m["objects"].model.center.y);var t=[0,0,0,10,0,0];this.linkLine=ce["a"].createFatLine(t,{material:ce["a"].createFatLineMat({width:3,color:"#00C8AF",dashed:!0})}),m["objects"].model.add(this.linkLine),this.linkLine2=ce["a"].createFatLine(t,{material:ce["a"].createFatLineMat({width:3,opacity:.2,color:"#30FFDF"})}),m["objects"].model.add(this.linkLine2),this.linkLine.visible=this.linkLine2.visible=!1,app.model.on("floor.changed",(function(t,i){rt.settingPos&&e.fadeMarkerByFloor(!0)})),app.sceneRenderer.addComponent(this),this.inited=!0},rt.setSize=function(e,t){this.inited&&(this.linkLine.material.resolution.set(e,t),this.linkLine2.material.resolution.set(e,t))},rt.checkCanAddView=function(){return this.inited&&!ot.flying&&ot.linkViewManager.inited},rt.addView=function(){var e=this;if(this.checkCanAddView()){var t=function(){je["a"].hide(),rt.markView=new nt({sid:"view360_"+C["a"].getRandomSid()}),rt.markView.balloon.showOrHide(!0,0),ot.updateFromControls(),ot.linkViewManager.addView(rt.markView),rt.beginSetPos(),rt.markView.balloon.setSelect(!0),rt.markView.balloon.setStrictScale(!0),$("#player").css("cursor","pointer")};ot.isOutsideMode()?t():ot.FlyToMode("floorplan",t)}else{je["a"].show();var i=setInterval((function(){e.checkCanAddView()&&(e.addView(),clearInterval(i))}),50)}},rt.reEditView=function(e){this.markView=ot.linkViewManager.views[e],this.oldData=this.getData(),this.reEdit=!0,this.markView.balloon.setSelect(!0),this.markView.circle.setSelect(!0),this.markView.balloon.setStrictScale(!0),this.markView.circle.mesh.visible=!0,ot.linkViewManager.focusOn(this.markView),"dollhouse"!=ot.mode&&"floorplan"!=ot.mode||this.markView.balloon.showOrHide(!0,0)},rt.getData=function(e){return{sid:this.markView.sid,balloon:{pos:this.markView.balloon.mesh.position.clone()},circle:{pos:this.markView.circle.position.clone(),qua:this.markView.circle.quaternion.clone(),mapOut:this.markView.circle.mesh.material.uniforms.mapOut.value,scale:this.markView.circle.mesh.scale.x},exit:{mapOut:this.markView.exitDoor.mesh.material.uniforms.mapOut.value},exitDirection:this.markView.exitDirection.clone(),enterQuaternion:this.markView.enterQuaternion.clone(),panoImgVersion:this.markView.panoImgVersion,url:this.markView.url,thumbPanoTex:this.markView.thumbPanoTex,linkType:this.markView.linkType,nearestPano:this.markView.nearestPano}},rt.cancelEdit=function(){this.markView&&(this.reEdit?(this.markView.balloon.mesh.position.copy(this.oldData.balloon.pos),this.markView.circle.updatePos("normal",{position:this.oldData.circle.pos,quaternion:this.oldData.circle.qua}),this.markView.nearestPano=this.oldData.nearestPano,this.markView.linkType=this.oldData.linkType,this.markView.url=this.oldData.url,this.changeType(this.markView.linkType),this.markView.circle.setMapOut(this.oldData.circle.mapOut),this.markView.exitDoor.setMapOut(this.oldData.exit.mapOut),this.markView.circle.mesh.scale.set(this.oldData.circle.scale,this.oldData.circle.scale,this.oldData.circle.scale),this.markView.enterQuaternion.equals(this.oldData.enterQuaternion)||(this.markView.enterQuaternion=this.oldData.enterQuaternion.clone(),"pano"==this.markView.linkType&&this.markView.mapChangeRot()),this.markView.exitDirection=this.oldData.exitDirection.clone(),rt.cancelSetExit(),this.markView.balloon.setStrictScale(!1)):(ot.linkViewManager.removeView(this.markView),this.markView.dispose()),this.exit())},rt.confirmEdit=function(){this.markView.floor!=this.markView.nearestPano.floor&&(this.markView.pano&&(this.markView.pano.floorIndex=this.markView.nearestPano.floorIndex,this.markView.pano.floor.removePano(this.markView.pano),this.markView.pano.floor=this.markView.nearestPano.floor,this.markView.pano.floor.addPano(this.markView.pano)),this.markView.floor&&this.markView.floor.removeView(this.markView),this.markView.floor=this.markView.nearestPano.floor,this.markView.floor.addView(this.markView)),this.exit()},rt.exit=function(){this.markView&&(this.stopSetPos(),this.cancelSetExit(),this.cancelSetEntry(),this.reEdit=!1,this.markView.balloon.setSelect(!1),this.markView.circle.setSelect(!1),"panorama"!=ot.modeTran.split("-")[1]&&(this.markView.circle.mesh.visible=!1),this.markView.balloon.showOrHide(null,50,"auto"),this.markView=null)},rt.fadeMarkerByFloor=function(e){if(e){var t=m["objects"].model.allFloorsVisible?m["objects"].model.panos.list:m["objects"].model.currentFloor.panos;0==t.length&&(Object(se["a"])({content:"该楼层无漫游点,无法设置! 请联系客服"}),console.warn("无漫游点!!"),this.stopSetPos()),m["objects"].model.panos.fadeMarkerOpacity(1,null,[{toOp:.8,member:t}])}else m["objects"].model.panos.fadeMarkerOpacity(0)},rt.beginSetPos=function(e){rt.settingPos=!0,this.markView.circle.state="sprite",this.fadeMarkerByFloor(!0),this.markView.circle.mesh.material.depthTest=!1,rt.markView.circle.mesh.visible=!0,rt.markView.update(ot.camera,!0),rt.markView.circle.mesh.visible=!1,this.placeGround(),"reset"!=e&&this.handelPos("init")},rt.changeScale=function(e){this.markView.circle.mesh.scale.set(e,e,e),rt.confirmPos()},rt.confirmPos=function(){this.stopSetPos(),le["a"].emit("link/tag/confirm",{sid:this.markView.sid,balloon:{pos:this.markView.balloon.mesh.position.toArray()},circle:{pos:this.markView.circle.position.toArray(),qua:this.markView.circle.quaternion.toArray(),scale:100*this.markView.circle.mesh.scale.x},nearestPano:this.markView.nearestPano.id})},rt.cancelPos=function(){le["a"].emit("link/tag/confirm",null)},rt.reSetPos=function(){this.markView.balloon.setSelect(!0),ot.linkViewManager.focusOn(this.markView)},rt.stopSetPos=function(){this.settingPos&&(this.settingPos=!1,this.linkLine.visible=!1,this.linkLine2.visible=!1,this.markView.circle.state="3D",this.markView.circle.quaternion&&this.markView.circle.mesh.quaternion.copy(this.markView.circle.quaternion),this.markView.circle.mesh.material.depthTest=!0,this.fadeMarkerByFloor(!1),le["a"].emit("link/tag/confirm",null))},rt.handelPos=function(e){if(this.settingPos){var t=m["objects"].model.center.clone(),i=ot.getMouseIntersect(null,[this.ground]);if(!i)return void console.error("no intersect");if(m["objects"].model.allFloorsVisible)"init"!=e&&t.setY(this.markView.balloon.mesh.position.y);else{if(0==m["objects"].model.currentFloor.panos.length)return console.warn("该层无漫游点!"),void this.stopSetPos();t.setY(st[m["objects"].model.currentFloor.floorIndex])}var n=ue["a"].getPosAtPlane(i.point,{y:t.y});n||(n=ue["a"].getPosAtPlane(i.point,{y:100}),n.y=t.y),n&&n.distanceTo(t)>at&&(n=t.clone().add(n.clone().sub(t).normalize().multiplyScalar(at)));var o=this.markView.circle.mesh.quaternion.clone(),a=m["objects"].model.panos.sortByScore([W["a"].filters.isPanoAligned(),function(e){return m["objects"].model.allFloorsVisible||e.floor==m["objects"].model.currentFloor}],[function(e){return-n.distanceTo(e.position)}])[0].pano,r=a.position.clone();this.markView.nearestPano=a,n.setY(r.y),this.markView.balloon.mesh.position.copy(n);i=ue["a"].ifIntersectChunks(r,n,{InfinityLen:!0});if(i){var s=i[0].face.normal.applyQuaternion(i[0].object.quaternion);p=i[0].point.add(s.multiplyScalar(.01*(1+Math.random()))),this.markView.circle.mesh.lookAt(this.markView.circle.mesh.position.clone().add(s))}else{var l=n.clone().sub(a.position).setY(0).normalize().multiplyScalar(f["a"].boundExpandLength);p=r.clone().add(l),this.markView.circle.mesh.lookAt(this.markView.circle.mesh.position.clone().sub(l))}this.markView.circle.mesh.visible=!0,this.markView.circle.updatePos("normal",{position:p,quaternion:this.markView.circle.mesh.quaternion.clone()}),this.markView.circle.mesh.quaternion.copy(o);var c=n.clone().sub(p),u=c.length(),d=p.clone().add(c.multiplyScalar(Math.max(0,(u-.4)/u)));d.y-=.01;var h=d.toArray().concat(p.toArray());if(ce["a"].moveFatLine(this.linkLine,h),r.distanceTo(p)<r.distanceTo(d))h=r.toArray().concat(p.toArray());else h=r.toArray().concat(d.toArray());ce["a"].moveFatLine(this.linkLine2,h),this.linkLine.visible=!0,this.linkLine2.visible=!0}else if(this.draggingExit){i=ot.getMouseIntersect(null,[ot.model.skybox]);this.markView.exitDoor.mesh.position.copy(i.point.clone().normalize().multiplyScalar(f["a"].view360.circleDisToCenter))}else if(this.draggingCircleAtView)if(this.settingVisibles){i=ot.getMouseIntersect(null,[ot.model.skybox]);this.draggingMesh.position.copy(i.point.clone().normalize().multiplyScalar(f["a"].view360.circleDisToCenter)),this.saveVisibleViews()}else{var p;r=ot.position.clone(),i=ue["a"].getMouseIntersect(ot.camera,ot.model.colliders.concat(ot.model.skybox),ot.mouse);if(i.object==ot.model.skybox){l=i.point.clone().sub(r).normalize().multiplyScalar(f["a"].boundExpandLength);p=r.clone().add(l),this.markView.circle.mesh.lookAt(this.markView.circle.mesh.position.clone().sub(l))}else{s=i.face.normal.applyQuaternion(i.object.quaternion);ot.getMouseDirection().angleTo(i.face.normal)<Math.PI/2&&(s=s.negate()),p=i.point.add(s.multiplyScalar(.01*(1+Math.random()))),this.markView.circle.mesh.lookAt(this.markView.circle.mesh.position.clone().add(s))}this.markView.circle.mesh.visible=!0,this.markView.circle.updatePos("normal",{position:p,quaternion:this.markView.circle.mesh.quaternion.clone()}),this.markView.nearestPano=ot.currentPano}},rt.placeGround=function(){this.ground.position.copy(this.markView.balloon.mesh.position),this.ground.lookAt(this.ground.position.clone().add(ot.getDirection(null,ot.camera)))},rt.changeType=function(e){this.markView.linkType=e,this.markView.setPano()},rt.uploadedPanoMap=function(e){this.changeType("pano");this.markView.pano;this.markView.setPano({reloadTex:!0,thumb:e.thumb,version:e.version})},rt.setLinkUrl=function(e){this.markView.url=e},rt.setCircleMap=function(e,t){ot.linkViewManager.views[e].circle.setMapOut(t)},rt.setExitMap=function(e,t){ot.linkViewManager.views[e].exitDoor.setMapOut(t)},rt.deleteView=function(e){try{ot.linkViewManager.views[e].dispose(),ot.linkViewManager.removeView(ot.linkViewManager.views[e])}catch(t){console.log(t)}},rt.enterView=function(e){var t=function(){je["a"].hide(),e&&e()};je["a"].show(),ot.flying?ot.waitFlytoItemFuc=rt.enterView.bind(this,e):ot.currentPano==this.markView.pano&&"panorama"==ot.mode?t():this.markView.enter360Pano(t)},rt.beginSetEntry=function(){var e=this;this.settingEntry=!0,this.enterView((function(){var t=new THREE.Vector3(0,0,-1).applyQuaternion(e.markView.enterQuaternion).add(ot.cameraControls.activeControl.camera.position);ot.lookAtPos(t,null,{speed:.2})}))},rt.confirmEntry=function(){ot.currentPano==this.markView.pano&&(this.markView.pano.quaternion.copy(ot.quaternion),this.markView.enterQuaternion.copy(ot.quaternion),this.markView.mapChangeRot(),le["a"].emit("link/tag/confirm",{sid:this.markView.sid,enterQuaternion:ot.quaternion.toArray()}))},rt.cancelSetEntry=function(){this.settingEntry&&(this.settingEntry=!1)},rt.beginSetExit=function(){var e=this;this.settingExit=!0,rt.enterView((function(){ot.lookAtPos(e.markView.exitDoor.mesh.position,null,{speed:.2})}))},rt.confirmExit=function(){this.markView.exitDirection=this.markView.exitDoor.mesh.position.clone(),le["a"].emit("link/tag/confirm",{sid:this.markView.sid,exitDirection:this.markView.exitDirection.toArray()}),"pano"!=this.markView.linkType&&(this.markView.thumbPanoTex&&this.markView.thumbPanoTex.dispose(),this.markView.thumbPanoTex=null)},rt.cancelSetExit=function(){this.settingExit&&(this.settingExit=!1,this.markView.exitDoor.mesh.position.copy(this.markView.exitDirection))},rt.beginSetVisibleViews=function(e){this.markView=ot.linkViewManager.views[e],rt.enterView((function(){})),this.settingVisibles=!0,this.oldVisibleData=JSON.parse(JSON.stringify(this.markView.visibleViews))},rt.addVisibleView=function(e,t){console.log("addVisibleView "+e);var i=ot.linkViewManager.views[e];i.circle.mesh.visible=!0,ot.handleInputStart(t.offsetX,t.offsetY,!0,!0);var n=ot.getMouseIntersect(null,[ot.model.skybox]);i.circle.updatePos("at360View",{viewDir:n.point.clone()}),i.circle.update(ot.camera),this.saveVisibleViews()},rt.delVisibleView=function(e){delete this.markView.visibleViews[e];var t=ot.linkViewManager.views[e];t.circle.mesh.visible=!1,this.saveVisibleViews()},rt.saveVisibleViews=function(){var e={};for(var t in ot.linkViewManager.views)ot.linkViewManager.views[t].circle.mesh.visible&&(e[t]=ot.linkViewManager.views[t].circle.mesh.position.toArray());this.markView.visibleViews=e,le["a"].emit("link/tag/links",{sid:this.markView.sid,visibleViews:e})},rt.cancelVisibleViews=function(e){this.markView.visibleViews=this.oldVisibleData,this.markView.backToPanorama(),le["a"].emit("link/tag/links",{sid:this.markView.sid,visibleViews:this.markView.visibleViews}),this.finishVisibleViews()},rt.finishVisibleViews=function(){this.settingVisibles=!1,this.markView=null},rt.handelClickView=function(){if(this.settingPos)return this.confirmPos(),!0},rt.dragBalloonStart=function(){this.settingPos||(this.beginSetPos("reset"),this.draggingBall=!0,ot.cameraControls.activeControl.enabled=!1)},rt.dragExitStart=function(){this.settingExit&&(this.draggingExit=!0,ot.cameraControls.activeControl.enabled=!1)},rt.dragViewStart=function(e){(this.settingVisibles||this.markView&&e==this.markView.circle.mesh)&&(this.draggingCircleAtView=!0,this.draggingMesh=e,ot.cameraControls.activeControl.enabled=!1)},rt.handelDragEnd=function(){ot.flying||(this.draggingBall?(this.draggingBall=!1,this.settingPos&&this.confirmPos()):this.draggingExit?(this.draggingExit=!1,ot.cameraControls.activeControl.pointerDragOn=!1):this.draggingCircleAtView&&(this.draggingCircleAtView=!1,ot.cameraControls.activeControl.pointerDragOn=!1,this.confirmPos()),this.draggingMesh=null,ot.cameraControls.activeControl.enabled=!0)},window.editLinkView=rt;var lt=rt;function ct(e){var t=ut();return function(){var i,n=Object(h["a"])(e);if(t){var o=Object(h["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(u["a"])(this,i)}}function ut(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var dt,ht=function(e){Object(c["a"])(i,e);var t=ct(i);function i(){var e;return Object(o["a"])(this,i),e=t.call(this),e.enabled=!0,e.views={},e.linkViewCircles=new THREE.Object3D,e.linkViewCircles.name="linkViewCircles",e.linkViewBalloons=new THREE.Object3D,e.linkViewBalloons.name="linkViewBalloons",e.linkViewExits=new THREE.Object3D,e.linkViewExits.name="linkViewExits",x["a"].isEdit&&nt.init(),le["a"].on("link/data/load",(function(){e.init()})),e}return Object(r["a"])(i,[{key:"init",value:function(){var e=this;m["objects"].model.add(this.linkViewCircles),m["objects"].model.add(this.linkViewBalloons),m["objects"].model.add(this.linkViewExits),this.createViews(),this.inited=!0,m["objects"].player.currentPano.hasVideo&&(this.linkViewCircles.visible=!1,this.linkViewBalloons.visible=!1,this.linkViewExits.visible=!1,setTimeout((function(){e.enabled&&(e.linkViewCircles.visible=!0,e.linkViewBalloons.visible=!0,e.linkViewExits.visible=!0)}),1e3))}},{key:"createViews",value:function(){var e=JSON.parse(JSON.stringify(m["store"].getters["link/tags"]));if("object"==Object(Ce["a"])(e)&&e.length>0){if(x["a"].name&&(e=e.filter((function(e){return"pano"==e.type})),0==e.length))return;if(nt.init(),e.forEach(function(e){if(this.views[e.sid])console.log("有重复的view sid"+e.sid);else{var t=new nt(e);this.addView(t)}}.bind(this)),"panorama"==m["objects"].player.modeTran.split("-")[0])for(var t in this.views)this.views[t].balloon.showOrHide(!0,0)}}},{key:"addView",value:function(e){this.views[e.sid]=e,this.linkViewCircles.add(e.circle.mesh),this.linkViewBalloons.add(e.balloon.mesh),e.exitDoor&&this.linkViewExits.add(e.exitDoor.mesh)}},{key:"removeView",value:function(e){this.linkViewCircles.remove(e.circle.mesh),this.linkViewBalloons.remove(e.balloon.mesh),this.linkViewExits.remove(e.exitDoor.mesh),delete this.views[e.sid]}},{key:"update",value:function(e){for(var t in this.views)this.views[t].update(e)}},{key:"showAllViews",value:function(){this.enabled||(this.linkViewCircles.visible=!0,this.linkViewBalloons.visible=!0,this.linkViewExits.visible=!0,this.enabled=!0)}},{key:"hideAllViews",value:function(){this.enabled&&(m["objects"].player.is360View(m["objects"].player.mode,m["objects"].player.currentPano)?m["objects"].player.currentPano.view.backToPanorama():m["objects"].player.enteringView&&(m["objects"].player.waitFlytoItemFuc=function(){m["objects"].player.currentPano.view.backToPanorama()}),this.linkViewCircles.visible=!1,this.linkViewBalloons.visible=!1,this.linkViewExits.visible=!1,this.dealwithIntersect(null),this.enabled=!1)}},{key:"getIntersectView",value:function(){var e;if(this.inited&&this.enabled&&(!x["a"].isEdit||"videos"!=m["store"].getters.page)){var t,i=!0;m["objects"].player.isOutsideMode()?e=this.linkViewBalloons.children:m["objects"].player.is360View(m["objects"].player.mode,m["objects"].player.currentPano)?(e=lt.settingEntry?[]:lt.settingVisibles?this.linkViewCircles.children:this.linkViewExits.children.concat(this.linkViewCircles.children),i=!1):lt.markView?(e=[lt.markView.circle.mesh],i=!1):e=this.linkViewCircles.children,t=i?this.model.floors.reduce((function(e,t){return t.hidden?e:e.concat(t.collider.children)}),e):e;var n=new THREE.Vector3(m["objects"].player.mouse.x,m["objects"].player.mouse.y,-1).unproject(m["objects"].player.camera);m["objects"].player.raycaster.set(n,m["objects"].player.getMouseDirection(m["objects"].player.mouse));var o=m["objects"].player.raycaster.intersectObjects(t);return o&&o.length&&e.includes(o[0].object)?o[0]:void 0}}},{key:"dealwithIntersect",value:function(e){if(this.enabled){var t,i=e&&e.object;if(!this.hoverCircle||this.hoverCircle.mesh==i||lt.markView&<.markView.circle==this.hoverCircle||(le["a"].emit("link/tag/active",null),this.hoverCircle.setSelect(!1)),!this.hoverBalloon||this.hoverBalloon.mesh==i||lt.markView&<.markView.balloon==this.hoverBalloon||(le["a"].emit("link/tag/active",null),this.hoverBalloon.setSelect(!1)),this.hoverExit&&this.hoverExit.mesh!=i&&this.hoverExit.setSelect(!1),this.hoverBalloon=null,this.hoverCircle=null,this.hoverExit=null,!e)return $("#player").css("cursor",""),!0;i.name.includes("balloon")?(t=this.views[i.name.split("balloon_")[1]],t.balloon.setSelect(!0),this.hoverBalloon=t.balloon,le["a"].emit("link/tag/active",t.sid)):i.name.includes("exit")?(t=this.views[i.name.split("circle_exitDoor")[1]],t.exitDoor.setSelect(!0),this.hoverExit=t.exitDoor):(t=this.views[i.name.split("circle_")[1]],this.hoverCircle=t.circle,t.circle.setSelect(!0),le["a"].emit("link/tag/active",t.sid)),lt.markView?(lt.markView==t||lt.settingVisibles)&&$("#player").css("cursor","grab"):$("#player").css("cursor","pointer")}}},{key:"dealWithClick",value:function(){if(!(lt.markView||lt.settingPos||lt.settingExit||lt.settingVisibles)&&(this.hoverCircle||this.hoverBalloon||this.hoverExit)){var e=this.hoverCircle||this.hoverBalloon||this.hoverExit,t=this.views[e.sid];return e==this.hoverExit?(t.backToPanorama(),!0):("url"==t.linkType?t.url&&(window.location.href=t.url):"pano"==t.linkType&&t.pano&&t.enter360Pano(),!0)}}},{key:"focusOn",value:function(e){!m["objects"].player.flying||m["objects"].player.waitFlytoItemFuc?"panorama"==m["objects"].player.mode?m["objects"].player.flyToPano({pano:e.nearestPano,lookAtPoint:e.circle.mesh.position}):m["objects"].player.focusPoint({aim:e.balloon.mesh.position}):m["objects"].player.waitFlytoItemFuc=this.focusOn.bind(this,e)}}]),i}(m["default"]),pt=ht,ft=i("a59a"),mt=i("532c"),vt=i("ff11");function gt(e){var t=yt();return function(){var i,n=Object(h["a"])(e);if(t){var o=Object(h["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(u["a"])(this,i)}}function yt(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var bt,wt=new THREE.SphereBufferGeometry(1,30,30),Et=function(e){Object(c["a"])(i,e);var t=gt(i);function i(e){var n;Object(o["a"])(this,i),dt=e;var a=new THREE.ShaderMaterial({side:THREE.DoubleSide,depthTest:!1,transparent:!0,defines:{NoVideo:"",PrepareVideo:""},uniforms:{map:{value:null},clipRect:{value:new THREE.Vector4(.1,.4,.2,.7)},panoPosition:{value:new THREE.Vector3(0,0,0)},panoMatrix:{value:new THREE.Matrix4}},vertexShader:"\n uniform mat4 panoMatrix;\n //uniform mat4 videoDirMatrix;\n uniform vec3 panoPosition; \n varying vec3 vSamplerDirection;\n\n void main()\n {\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); \n vec4 worldPosition = modelMatrix * vec4(position, 1.0);\n \n vec3 positionLocalToPanoCenter = worldPosition.xyz - panoPosition;\n \n vSamplerDirection = (vec4(positionLocalToPanoCenter, 1.0) * panoMatrix).xyz;\n //vSamplerDirection = (vec4(positionLocalToPanoCenter, 1.0) * videoDirMatrix).xyz;\n \n //vSamplerDirection = positionLocalToPanoCenter;\n \n\n vSamplerDirection.x *= -1.0;\n\n }\n\n ",fragmentShader:"\n\n #define PI 3.141592653\n\n uniform vec4 clipRect; \n \n uniform vec3 panoPosition; \n uniform sampler2D map;\n\n varying vec3 vSamplerDirection;\n\n vec2 getSamplerCoord( vec3 direction ) \n {\n direction = normalize(direction);\n float tx=atan(direction.x,direction.z)/(PI*2.0)+0.5;\n float ty=acos(direction.y)/PI;\n\n return vec2(tx,ty);\n }\n\n float linearStep( float start, float end, float value ) {\n if(start<=end){\n return clamp( (value - start) / (end - start), 0.0, 1.0 );\n }else{\n float width = 1.0 - (start - end) ;\n if(value >= start ){\n return clamp( (value - start) / width, 0.0, 1.0 );\n }else{\n return clamp( (value + 1.0 - start ) / width, 0.0, 1.0 );\n }\n }\n }\n\n void main() \n {\n\n vec2 uv = getSamplerCoord( vSamplerDirection );\n\n \n vec4 videoColor = vec4(0, 1.0,0.8,0.3);;\n #ifdef NoVideo \n videoColor = vec4(0, 1.0,0.8,0.3); //(0, 0.78125,0.68359375,0.4); //greenblue \n #elif defined(PrepareVideo) \n videoColor = vec4(1.0, 1.0, 1.0, 0.05); \n \n #else \n vec2 videoUV = vec2( 0.0, 0.0 ); \n videoUV.x = linearStep( clipRect.x, clipRect.z, uv.x );\n videoUV.y = linearStep( clipRect.y, clipRect.w, uv.y ); \n vec4 mapColor = texture2D( map, videoUV );\n #ifdef isEdit \n videoColor = mix(videoColor, mapColor, mapColor.a );\n #else \n videoColor = mapColor;\n #endif \n #endif\n \n /* float rect = (step( clipRect.x, uv.x ) - step( clipRect.z, uv.x )) //x\n *(step( clipRect.y, uv.y ) - step( clipRect.w, uv.y )); //y \n */ \n float rect;\n if(clipRect.x <= clipRect.z){//识别是否在区域内\n rect = uv.x >= clipRect.x && uv.x <= clipRect.z ? 1.0 : 0.0;\n }else{\n rect = (uv.x >= clipRect.x || uv.x <= clipRect.z) ? 1.0 : 0.0;\n }\n if(rect>0.0){\n if(clipRect.y <= clipRect.w){\n rect = uv.y >= clipRect.y && uv.y <= clipRect.w ? 1.0 : 0.0;\n }else{\n rect = (uv.y >= clipRect.y || uv.y <= clipRect.w) ? 1.0 : 0.0;\n }\n } \n\n rect *= videoColor.a;\n \n vec3 color = videoColor.rgb * rect;\n \n gl_FragColor = vec4( color, rect ); \n } \n "});n=t.call(this,wt,a),n.list=[],n.visible=!1;var r=m["store"].getters["scene/metadata"];if(r.videosUser&&r.videosUser.forEach((function(e){e.dir&&(e.dir=(new THREE.Vector3).copy(e.dir),n.addVideo(new mt["a"](e,Object(s["a"])(n))))})),x["a"].isEdit){dt.model.add(Object(s["a"])(n)),dt.on(L["a"].FlyingStarted,(function(){n.hide()}));var l=function(){dt.currentPano.panoVideo?n.showVideo(dt.currentPano.panoVideo):dt.EditPanoVideo&&dt.EditPanoVideo.editVideo&&n.showVideo(dt.EditPanoVideo.editVideo)};dt.on(L["a"].FlyingEnded,l),dt.on(L["a"].StartInside,l)}return n}return Object(r["a"])(i,[{key:"attachVideo",value:function(e,t){var i,n=this;vt["a"].pause(!0),this.material.uniforms.map.value&&(this.material.uniforms.map.value.dispose(),i=this.material.uniforms.map.value.image,i&&i.pause(),console.log("delete oldVideo"));var o=new THREE.VideoTexture(e);if(o.minFilter=THREE.LinearFilter,o.magFilter=THREE.LinearFilter,o.format=THREE.RGBAFormat,o.flipY=!1,e.muted=!1,e.play(),this.material.uniforms.map.value=o,e.loadByUrlAndHaventPlay?(console.log("url加载出的第一次播放会黑色,延迟"),e.loadByUrlAndHaventPlay=!1,this.material.defines.PrepareVideo="",delete this.material.defines.NoVideo,e.onplaying=function(){setTimeout((function(){delete n.material.defines.PrepareVideo,o.needsUpdate=!0,n.material.needsUpdate=!0}),800)}):i&&i.src==e.src||(console.log("delete this.material.defines.PrepareVideo"),delete this.material.defines.NoVideo,delete this.material.defines.PrepareVideo),t){var a=this.currentPanoVideo.rect;this.material.uniforms.clipRect.value.set(a.leftBottom.x,a.leftBottom.y,a.rightTop.x,a.rightTop.y)}this.material.needsUpdate=!0}},{key:"showVideo",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("panorama"==dt.mode){this.currentPanoVideo=e,e.video&&this.attachVideo(e.video),t.isEdit&&(this.material.defines.isEdit="");var i=e.rect;this.material.uniforms.clipRect.value.set(i.leftBottom.x,i.leftBottom.y,i.rightTop.x,i.rightTop.y),this.material.uniforms.panoPosition.value.copy(e.pano.position),this.material.uniforms.panoMatrix.value.copy(e.pano.skyboxMesh.matrixWorld),this.position.copy(e.pano.position),this.visible=!0}}},{key:"hide",value:function(){this.currentPanoVideo&&(this.currentPanoVideo.video&&this.currentPanoVideo.video.pause(),vt["a"].resume(),this.material.uniforms.map.value&&(this.material.uniforms.map.value.dispose(),this.material.uniforms.map.value=null),this.currentPanoVideo=null,this.material.defines.NoVideo="",this.material.needsUpdate=!0),this.visible=!1}},{key:"addVideo",value:function(e){this.list.push(e),e.pano.panoVideo=e,e.pano.updateMakerStyle()}},{key:"removeVideo",value:function(e){var t=this.list.indexOf(e);t>-1&&this.list.splice(t,1),e.pano.panoVideo=null,e.pano.updateMakerStyle()}}]),i}(THREE.Mesh),Tt=Et,Pt=i("ab89");function xt(e){var t=kt();return function(){var i,n=Object(h["a"])(e);if(t){var o=Object(h["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(u["a"])(this,i)}}function kt(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}new(bt=function(e){Object(c["a"])(i,e);var t=xt(i);function i(){var e;return Object(o["a"])(this,i),e=t.call(this),Object(p["a"])(Object(s["a"])(e),"init",(function(e){var t=this;this.domElement=e,this.camera=this.sceneRenderer.camera,this.path=new U(this.director,this,this.cameraControls),this.basePanoSize=this.qualityManager.getPanoSize(X["a"].BASE),this.standardPanoSize=this.qualityManager.getPanoSize(X["a"].STANDARD),this.highPanoSize=this.qualityManager.getPanoSize(X["a"].HIGH),this.ultraHighPanoSize=this.qualityManager.getPanoSize(X["a"].ULTRAHIGH),this.tileDownloader.processPriorityQueue=!1,this.tileDownloader.tilePrioritizer=new Z["a"](this.qualityManager,this.basePanoSize,this.standardPanoSize,this.highPanoSize,this.ultraHighPanoSize),this.updateModel(),x["a"].isEdit&&(this.panoVideoManager=new Tt(this)),m["objects"].overlayManager=xe,xe.init(this.model),x["a"].isEdit&&this.model.createTranControl(this),this.linkEditor=new pe,x["a"].isEdit&<.init(),le["a"].on("enterVR",(function(){t.FlyToMode("panorama",(function(){t.vrModeChange()}))}))})),Object(p["a"])(Object(s["a"])(e),"setupCustomProperties",(function(e){var t=e;Object.defineProperty(this,"mode",{get:function(){return t},set:function(e){var i=t;t=e,this.onModeUpdated(i,t)}})})),Object(p["a"])(Object(s["a"])(e),"isOutsideMode",(function(e){return e=e||this.mode,e===D["a"].DOLLHOUSE||e===D["a"].FLOORPLAN})),Object(p["a"])(Object(s["a"])(e),"is360View",(function(e,t){return e===D["a"].PANORAMA&&t&&!t.isAligned()})),Object(p["a"])(Object(s["a"])(e),"setScene",(function(e){this.sceneIntersectionPlane=e.plane,this.path.setScene(e),this.moveReticuleToScene(e)})),Object(p["a"])(Object(s["a"])(e),"moveReticuleToScene",(function(e){this.reticule.parent&&this.reticule.parent.remove(this.reticule),e.add(this.reticule)})),Object(p["a"])(Object(s["a"])(e),"updateModel",(function(){this.model=this.modelManager.getActiveModel(),this.on(L["a"].PanoChosen,this.model.setProjectedPanos.bind(this.model)),x["a"].isMobile&&this.model.panos.list.forEach(function(e){var t=this;e.vrMarker.addEventListener("click",(function(){"portrait"!=window.VRScreenType&&t.flyToPano({pano:e})}))}.bind(this)),this.on(L["a"].FlyingStarted,this.model.resetHighMap.bind(this.model))})),Object(p["a"])(Object(s["a"])(e),"updateModelDependentData",(function(){this.cameraControls.setModelForControls(this.model),this.getPanoMarkersFromModel(this.model)})),Object(p["a"])(Object(s["a"])(e),"getPanoMarkersFromModel",(function(e){this.panoMarkers=e.panos.list.reduce((function(e,t){return t.marker?e.concat(t.marker):e}),[])})),Object(p["a"])(Object(s["a"])(e),"handleControlMove",(function(e){this.emit(L["a"].Move,e)})),Object(p["a"])(Object(s["a"])(e),"handleControlInputStart",(function(e){this.emit(L["a"].InputStart,e)})),Object(p["a"])(Object(s["a"])(e),"onModeUpdated",(function(e,t){this.cameraControls.activateControls(t),this.emit(L["a"].ModeChanged,e,t)})),Object(p["a"])(Object(s["a"])(e),"isWarping",(function(){return!1})),Object(p["a"])(Object(s["a"])(e),"isWaitingToWarp",(function(){return!1})),Object(p["a"])(Object(s["a"])(e),"bindEvents",(function(e){e!==document&&e.setAttribute("tabindex",-1),e.addEventListener("mousedown",this.onMouseDown.bind(this)),e.addEventListener("mousemove",this.onMouseMove.bind(this)),e.addEventListener("mouseover",this.onMouseOver.bind(this)),e.addEventListener("mouseout",this.onMouseOut.bind(this)),e.addEventListener("mouseup",this.onMouseUp.bind(this)),e.addEventListener("touchstart",this.onTouchStart.bind(this)),e.addEventListener("touchmove",this.onTouchMove.bind(this)),e.addEventListener("touchend",this.onTouchEnd.bind(this)),e.addEventListener("pointerdown",this.onPointerDown.bind(this)),e.addEventListener("pointermove",this.onPointerMove.bind(this)),e.addEventListener("pointerup",this.onPointerUp.bind(this)),x["a"].isMobile||document.addEventListener("pointerup",this.onPointerUp2.bind(this)),e.addEventListener("pointerout",this.onPointerOut.bind(this)),e.addEventListener("pointercancel",this.onPointerCancel.bind(this)),document.addEventListener("keydown",this.onKeyDown.bind(this)),this.cameraControls.on(J["a"].Move,this.handleControlMove.bind(this)),this.cameraControls.on(J["a"].InputStart,this.handleControlInputStart.bind(this)),this.cameraControls.on(J["a"].Pinch,this.handleControlPinch.bind(this)),this.cameraControls.on(J["a"].Scroll,this.handleControlScroll.bind(this))})),Object(p["a"])(Object(s["a"])(e),"onMouseDown",(function(e){e.currentTarget!==document&&e.currentTarget.focus(),0===e.button&&(this.handleInputStart.call(this,e.clientX,e.clientY,!1),this.updateIntersect())})),Object(p["a"])(Object(s["a"])(e),"onMouseMove",(function(e){this.isTouchEvent=!1,this.handleInputMove.call(this,e.clientX,e.clientY,!1,e)})),Object(p["a"])(Object(s["a"])(e),"onMouseOver",(function(e){this.containsMouse=!0,!this.mouseDown||0!==e.which&&0!==e.buttons||(this.mouseDown=!1)})),Object(p["a"])(Object(s["a"])(e),"onMouseOut",(function(e){this.containsMouse=!1})),Object(p["a"])(Object(s["a"])(e),"onMouseUp",(function(e){this.handleInputEnd.call(this,e.clientX,e.clientY,!1)})),Object(p["a"])(Object(s["a"])(e),"onTouchStart",(function(e){if(e.currentTarget!==document&&e.currentTarget.focus(),!this.mouseDown){this.couldBeLongTap=!0;var t=C["a"].average(e.changedTouches,"clientX"),i=C["a"].average(e.changedTouches,"clientY");this.handleInputStart.call(this,t,i,!0),this.mouseDownTimer=setTimeout(function(){this.updateIntersect(),this.handleInputEnd.call(this,t,i,!0)}.bind(this),f["a"].input.longTapThreshold)}})),Object(p["a"])(Object(s["a"])(e),"onTouchMove",(function(e){var t=C["a"].average(e.changedTouches,"clientX"),i=C["a"].average(e.changedTouches,"clientY");this.handleInputMove.call(this,t,i,!0,e)})),Object(p["a"])(Object(s["a"])(e),"onTouchEnd",(function(e){if(clearTimeout(this.mouseDownTimer),this.mouseDown){this.couldBeLongTap=!1,this.updateIntersect();var t=C["a"].average(e.changedTouches,"clientX"),i=C["a"].average(e.changedTouches,"clientY");this.handleInputEnd.call(this,t,i,!0)}})),Object(p["a"])(Object(s["a"])(e),"onPointerDown",(function(e){return e.currentTarget!==document&&e.currentTarget.focus(),this.mouseDown||"mouse"===e.pointerType?this.onMouseDown(e):(this.couldBeLongTap=!0,this.handleInputStart.call(this,e.clientX,e.clientY,!0),void(this.mouseDownTimer=setTimeout(function(){this.updateIntersect(),this.handleInputEnd.call(this,e.clientX,e.clientY,!0)}.bind(this),f["a"].input.longTapThreshold)))})),Object(p["a"])(Object(s["a"])(e),"onPointerMove",(function(e){"mouse"!==e.pointerType?this.handleInputMove.call(this,e.clientX,e.clientY,!0,e):this.onMouseMove(e)})),Object(p["a"])(Object(s["a"])(e),"onPointerUp",(function(e){return this.mouseDown&&"mouse"!==e.pointerType?(clearTimeout(this.mouseDownTimer),this.couldBeLongTap=!1,this.updateIntersect(),void this.handleInputEnd.call(this,e.clientX,e.clientY,!0)):this.onMouseUp(e)})),Object(p["a"])(Object(s["a"])(e),"onPointerOut",(function(e){this.mouseDown=!1})),Object(p["a"])(Object(s["a"])(e),"onPointerCancel",(function(e){this.mouseDown=!1})),Object(p["a"])(Object(s["a"])(e),"onKeyDown",(function(e){if(!x["a"].isTyping&&!x["a"].isDisableControl){var t=function(){this.cameraControls.activeControl&&this.cameraControls.activeControl.emit(J["a"].Move,"key")}.bind(this),i=e.which;switch(i){case v["a"].F:t(),this.changeFloor(-1);break;case v["a"].R:t(),this.changeFloor(1)}if(this.mode===D["a"].PANORAMA)switch(i){case v["a"].UPARROW:case v["a"].W:this.flyLocalDirection(M["a"].FORWARD.clone());break;case v["a"].DOWNARROW:case v["a"].S:this.flyLocalDirection(M["a"].BACK.clone());break;case v["a"].A:this.flyLocalDirection(M["a"].LEFT.clone());break;case v["a"].D:this.flyLocalDirection(M["a"].RIGHT.clone())}if(this.started&&(!x["a"].isEdit||!lt.markView&&!re["default"].setSpotPos&&(!this.linkEditor||!this.linkEditor.setPanoVisible&&!this.linkEditor.setTagVisible)))switch(i){case v["a"].ONE:this.insideMode();break;case v["a"].TWO:this.flyToNewMode({mode:D["a"].DOLLHOUSE});break;case v["a"].THREE:this.flyToNewMode({mode:D["a"].FLOORPLAN});break}}})),Object(p["a"])(Object(s["a"])(e),"handleScrollPinchZoom",(function(e){var t=e;this.zoomLevel;this.zoomBy(t)})),Object(p["a"])(Object(s["a"])(e),"handleControlPinch",(function(e){f["a"].zoom.enabled?this.handleScrollPinchZoom(1-e):this.flyLocalDirection(new THREE.Vector3(0,0,e).normalize())})),Object(p["a"])(Object(s["a"])(e),"handleControlScroll",(function(e){f["a"].zoom.enabled?(e>0?e=1+this.scrollZoomSpeed:e<0&&(e=1-this.scrollZoomSpeed),0!==e&&this.handleScrollPinchZoom(e)):this.currentPano&&this.is360View(this.mode,this.currentPano)||this.flyLocalDirection(new THREE.Vector3(0,0,-e).normalize())})),Object(p["a"])(Object(s["a"])(e),"handleInputStart",(function(e,t,i,n){this.__is_click=!0,this.isTouchEvent=i;var o={x:e,y:t};x["a"].isMobile||n||(o=F["a"].handelPadding(e,t)),F["a"].convertScreenPositionToNDC(o.x,o.y,this.mouse),F["a"].convertScreenPositionToNDC(o.x,o.y,this.mouseAtMouseDown),this.mouseCouldBeClickToMove=!0,this.mouseDown=!0,this.intersect=this.getMouseIntersect(null,m["objects"].overlayManager.group.children),this.intersect?m["objects"].overlayManager.hoverOverlay(this.intersect.object):m["objects"].overlayManager.hoverOverlay(null),x["a"].isEdit&&(m["objects"].mainDesign&&m["objects"].mainDesign.editing?("wallDesign"==m["objects"].mainDesign.editType&&(this.intersect=m["objects"].mainDesign.checkIntersect()),m["objects"].mainDesign.handleDragStart(this)):lt.markView?(this.linkViewManager.hoverBalloon&<.markView.balloon==this.linkViewManager.hoverBalloon&<.dragBalloonStart(),this.linkViewManager.hoverExit?lt.dragExitStart():this.linkViewManager.hoverCircle&<.dragViewStart(this.linkViewManager.hoverCircle.mesh)):this.EditPanoVideo&&this.EditPanoVideo.editing?this.EditPanoVideo.dealPointerDown():this.model.transformControls&&this.model.transformControls.handleDragStart()),m["objects"].overlayManager.group.children.forEach((function(e){"video"==e.overlayType&&e.plane.material.map.image.play()})),this.setQuaternionTransition(null)})),Object(p["a"])(Object(s["a"])(e),"handleInputMove",(function(e,t,i,n){this.isTouchEvent=i;var o=F["a"].handelPadding(e,t);F["a"].convertScreenPositionToNDC(o.x,o.y,this.mouse);var a=m["objects"].mainDesign&&(m["objects"].mainDesign.dragInfo.state||this.model.transformControls&&this.model.transformControls.visible)?1e-7:f["a"].input.moveToleranceNDC;this.mouseAtMouseDown.distanceTo(this.mouse)>a&&(this.mouseCouldBeClickToMove=!1,this.couldBeLongTap=!1,clearTimeout(this.mouseDownTimer),this.model.transformControls&&this.model.transformControls.handleDragging()),this.mouseLastMoveTime=Date.now(),this.reticule.move(e,t,!!x["a"].isMobile||i),x["a"].isEdit&&(m["objects"].mainDesign&&m["objects"].mainDesign.editing?m["objects"].mainDesign.handleDragging(n):lt.markView?lt.handelPos():this.EditPanoVideo&&this.EditPanoVideo.editing&&this.EditPanoVideo.dealPointerMove()),this.sync=!0,this.timeOut&&clearTimeout(this.timeOut),this.timeOut=setTimeout(function(){this.sync=!1}.bind(this),3e3)})),Object(p["a"])(Object(s["a"])(e),"handleInputEnd",(function(e,t,i){if(this.__is_click=!1,this.isTouchEvent=i,this.mouseDown=!1,this.cameraControls.controls[D["a"].PANORAMA].emit("interaction.direct"),!i&&this.couldBeLongTap)return!0;if(x["a"].isEdit){if(m["objects"].mainDesign&&m["objects"].mainDesign.editing&&m["objects"].mainDesign.handleDragEnd())return!0;this.model.transformControls&&this.model.transformControls.handleDragEnd(),lt.handelDragEnd(),this.EditPanoVideo&&this.EditPanoVideo.dealPointerUp()}if(this.handleLongTap())return!0;if(this.mouseCouldBeClickToMove){if(this.flying)return!0;if(this.linkViewManager.dealWithClick())return;if(this.currentPano&&this.is360View(this.mode,this.currentPano))return;if(re["default"].chosenMeasureRuler&&re["default"].chosenMeasureRuler.showOptionLabel(!1),m["objects"].overlayManager.hoveringPlane)return void m["objects"].overlayManager.clickOverlay(m["objects"].overlayManager.hoveringPlane);if(x["a"].isEdit){if(lt.handelClickView())return;if(m["objects"].mainDesign&&m["objects"].mainDesign.editing&&m["objects"].mainDesign.handleClickEnd(this)){if("wallDesign"==m["objects"].mainDesign.editType)return!0;if("addOverlay"==m["objects"].mainDesign.editType)return!0}}if(re["default"].setSpotPos&&("tag"==re["default"].editType||"measure"==re["default"].editType)&&!re["default"].spotPosInfo.clickA)return void(this.intersect&&re["default"].getA(this.intersect));if(this.ifClickTag())return!0;if(this.linkEditor&&this.linkEditor.setPanoVisible)return void(this.intersect&&this.intersect.object.visible&&this.linkEditor.dealPanoVisible(this.intersect.object.name));if(this.linkEditor&&this.linkEditor.setTagVisible)return void(this.linkEditor.tagVsetting&&this.intersect&&this.intersect.object.visible&&this.linkEditor.dealTagVisible(this.linkEditor.tagVsetting,this.intersect.object.name));if(!x["a"].isEdit&&this.intersect&&this.intersect.object.parentRuler)return void this.intersect.object.parentRuler.showOptionLabel(!0,this.intersect.point);if(this.intersect&&this.EditOverlay&&"overlay"==this.EditOverlay.objCursorType)return this.EditOverlay.addOverlay({intersect:this.intersect});if(this.cameraControls.activeControl&&this.cameraControls.activeControl.emit(J["a"].Move,this.isTouchEvent?"touch":"mouse"),this.history.invalidate(),this.intersect)return"guideFlagPlane"==this.intersect.object.name?this.intersect.object.parent.onClick():this.flyToPanoClosestToMouse();if(this.mode===D["a"].PANORAMA){var n=this.closestPanoInDirection(this.getMouseDirection());return n?this.flyToPano({pano:n}):this.bump(this.getMouseDirection())}}this.intersect&&this.closestPano&&this.closestPano.hoverOff(this.mode)})),Object(p["a"])(Object(s["a"])(e),"onPointerUp2",(function(e){this.mouseCouldBeClickToMove||this.onMouseUp(e)})),Object(p["a"])(Object(s["a"])(e),"handleLongTap",(function(){if(this.couldBeLongTap&&(!this.isPanoHover||this.mode!==D["a"].PANORAMA))return this.cameraControls.activeControl&&this.cameraControls.activeControl.emit(J["a"].LongTap,"touch"),!0})),Object(p["a"])(Object(s["a"])(e),"start",(function(e){var t=e.mode,i=e.pano,n=e.position,o=e.quaternion,a=e.tag,r=e.quickstart,s=$.Deferred();this.updateModelDependentData(),this.updateFromControls();var l=this.is360View(t,i);return!this.model.outsideAllowed()||l||r?this.startInside(i,n,o,a,s):this.startOutside(e,s),s.done(function(e){this.emit(L["a"].Ready,l,e,a),this.bindEvents(this.domElement),this.started=!0}.bind(this)),s.promise()})),Object(p["a"])(Object(s["a"])(e),"startOutside",(function(e,t){var i=e.mode,n=e.pano,o=e.position,a=e.quaternion,r=e.zoom,s=(e.floorVisibility,e.tag);this.emit(L["a"].StartOutside,f["a"][i].transitionTime),this.isOutsideMode(i)?(E["a"].cancelById(f["a"].freeze.FlyToViewFloor),i===D["a"].FLOORPLAN?this.floorplanMode(o,a,r):this.dollhouseMode(o,a),this.beforeChangeMode(null,i),this.afterChangeMode(null,i),t.resolve(!1)):this.startInsideWithFlyin(n,o,a,s,t)})),Object(p["a"])(Object(s["a"])(e),"startInside",(function(e,t,i,n,o){o=o||$.Deferred(),this.currentPano=e;var a=e&&!e.isAligned();if(t=a?e.position:t||e.position,i=i||e.quaternion,e){var r=this.startInside.bind(this,e,t,i,n,o);if(this.checkAndWaitForPanoLoad(e,"high","low",this.basePanoSize,r))return}return this.mode=D["a"].PANORAMA,e.floor&&e.floor.enter(this.mode),this.emit(L["a"].PanoChosen,this.currentPano,this.currentPano),this.switchCameraMode(this.mode,i),this.modeTran="panorama-panorama",this.beforeChangeMode(null,D["a"].PANORAMA,this.currentPano,0),this.afterChangeMode(null,D["a"].PANORAMA),e.enter(),this.emit(L["a"].StartInside,a),o.resolve(!0),o})),Object(p["a"])(Object(s["a"])(e),"startInsideWithFlyin",(function(e,t,i,n,o){if(o=o||$.Deferred(),this.dollhouseMode(),!e)return O["a"].warn("Player.startInsideWithFlyin() -> targetPano is invalid."),o.resolve(!1),o;t=t||e.position;var a=i||this.cameraControls.activeControl.camera.quaternion,r=e.position;return this.fitDollhouse(r,t,a),setTimeout(function(t){this.cameraControls.activeControl&&(this.cameraControls.activeControl.maxDistance=t);var n={mode:D["a"].PANORAMA,pano:e,quaternion:i,callback:function(){this.emit(L["a"].FlyinFinished),o.resolve(!0)}.bind(this)};this.flyToNewMode(n)}.bind(this,this.cameraControls.activeControl.maxDistance),f["a"].startupFlyinDelay),o})),Object(p["a"])(Object(s["a"])(e),"checkAndWaitForPanoLoad",function(){var e={},t={},i=5e3,n=function(){for(var n in e)if(e.hasOwnProperty(n)&&e[n]){var o=performance.now()-t[n];if(o<i)return!0}return!1};return function(o,a,r,s,l,c,u,d,h,p,f){if(n())return!0;var m=function(t,i,n){C["a"].delayOneFrame(function(){e[t]=!1,l&&l(i,n)}.bind(this))}.bind(this,o.id),v=function(t,i){C["a"].delayOneFrame(function(){e[t]=!1,c&&c(i)}.bind(this))}.bind(this,o.id);try{return null!==d&&void 0!==d||(d=!0),o.tiled?e[o.id]=this.checkAndWaitForTiledPanoLoad(o,s,m,v,u,d,h,p,f):e[o.id]=this.checkAndWaitForWholePanoLoad(o,a,r,m,d),e[o.id]&&(t[o.id]=performance.now()),e[o.id]}catch(g){throw e[o.id]=!1,t[o.id]=performance.now()-i,g}}}()),Object(p["a"])(Object(s["a"])(e),"checkAndWaitForWholePanoLoad",(function(e,t,i,n,o){if(!e)throw new ve["a"]("Player.checkAndWaitForWholePanoLoad() -> Cannot load texture for null pano.");return o&&this.model.waitForLoad(e,(function(){return e.isLoaded(t)})),e.isLoaded(t)||e.loadCube(t),e.isLoaded(i)||e.loadCube(i).done(n),!e.isLoaded(i)})),Object(p["a"])(Object(s["a"])(e),"checkAndWaitForTiledPanoLoad",function(){var e=new THREE.Vector3;return function(t,i,n,o,a,r,s,l){if(!t)throw new ve["a"]("Player.checkAndWaitForTiledPanoLoad() -> Cannot load texture for null pano.");if(e.copy(M["a"].FORWARD),this.getDirection(e),!t.isLoaded(i))return r&&this.model.waitForLoad(t,(function(){return t.isLoaded(i)})),t.loadTiledPano(i,e,null,s,l,null).done(function(e,t){n&&n(e,t)}.bind(this)).fail(function(e){o&&o(e)}.bind(this)).progress(function(e,t,i){a&&a(e,t,i)}.bind(this)),!0}}()),Object(p["a"])(Object(s["a"])(e),"switchCameraMode",(function(e,t,i,n,o){var a=this.cameraControls.controls[e],r=a.camera;if(this.play.control.isPlaying&&void 0==t){var s=B["a"].getPlayDataItem(this.play.control.currentIndex);if(s)return void this.copyCameraProp(a,s)}else if((i||this.play.control.flyToSingleCap||this.play.control.isPlaying)&&e!=D["a"].PANORAMA){s={};return n&&(s.pos=n),t&&(s.qua=t),i&&(s.target=i),o&&(s.zoom=o),void this.copyCameraProp(a,s)}switch(e){case D["a"].PANORAMA:var l;r.position.copy(this.currentPano.position),l=t?M["a"].FORWARD.clone().applyQuaternion(t):this.getDirection().setY(0).normalize(),a.lookAt(l.add(r.position));break;case D["a"].DOLLHOUSE:if(this.mode===D["a"].PANORAMA&&m["objects"].mainDesign&&m["objects"].mainDesign.editing)n=this.position.clone(),n.add(new THREE.Vector3(0,6,0)).add(this.getDirection().multiplyScalar(-10)),a.target.copy(this.target.clone().setY(this.model.center.y));else{if(this.mode===D["a"].PANORAMA){a.target.copy(this.model.center);var c=this.getDirection().negate().setY(1).normalize()}else{a.target.copy(this.target.clone().setY(this.model.center.y));c=M["a"].DOWN.clone().applyQuaternion(this.quaternion).setY(1).normalize()}var u=a.suitableDistance;c.multiplyScalar(u),n=a.target.clone().add(c)}r.position.copy(n);break;case D["a"].FLOORPLAN:if(x["a"].isEdit&&this.flyoutType){if("focusView"==this.flyoutType)var d=new THREE.Vector3(10,10,10),h=new THREE.Vector2(lt.markView.balloon.mesh.position.x,lt.markView.balloon.mesh.position.z);else if("beginSetPanoVisible"==this.flyoutType){new THREE.Box2;var p=this.currentPano.floor;h=p.boundingBoxExpand.getCenter(new THREE.Vector3),d=this.linkEditor.getFitBoundSize(p)}r.position.set(h.x,f["a"].floorplan.cameraHeight,h.z),a.target.copy(r.position).setY(0),a.zoomToContain(d),console.log(d),this.flyoutTarget=null,this.flyoutType=null,a.rotateToView(d,this.getDirection())}else{h=this.model.center,d=this.model.size;r.position.copy(h).setY(f["a"].floorplan.cameraHeight),a.target.copy(h).setY(0),a.zoomToContain(d),t&&r.quaternion.copy(t),a.rotateToView(d,this.getDirection())}}a.update(0)})),Object(p["a"])(Object(s["a"])(e),"update",function(){var e=(new THREE.Vector3,{}),t=[];return function(i){if(this.camera){if(this.updatePersistentZooming(i),this.updateFromControls(i),this.hasChanged(e)&&(this.lastChangeTime=Date.now(),!this.mouseDown&&this.containsMouse&&this.updateIntersect({wallIntersect:!e.cameraChanged2&&e.mouseMoved}),this.emit(L["a"].ViewChanged)),this.model.ready&&e.cameraChanged&&(this.model.compass&&this.model.compass.update(this.quaternion),re["default"].setSpotPos&&(re["default"].spotPosInfo.markSpotA.updateHotspot2dPos(),re["default"].spotPosInfo.pauseCameraBind||re["default"].spotPosInfo.markSpotB.updateHotspot2dPos()),this.linkEditor&&(this.linkEditor.setTagVisible||this.linkEditor.setPanoVisible)&&this.linkEditor.updateFootIconSize(),this.model.wallManager.updateRulersVisi(),this.dollLabels.concat(this.planLabels).concat(this.doorLabels).forEach((function(e){e.update()})),this.updateLabelZIndex(["dollLabels","doorLabels"]),ft["a"].updateCameraDir(),m["objects"].tagManager.tagDiscs.forEach((function(e){return"videoPanoFlag"==e.tag.state&&e.tag.updateVideoFlagVisible()})),"panorama"==this.mode&&this.measureRulers.forEach((function(e){e.update()})),re["default"].measureTag1&&re["default"].measureTag1.markGroup.heightLabel.update(),"panorama"==this.mode&&le["a"].emit("player/position/change",{x:this.position.x,y:this.position.z,lon:this.cameraControls.controls.panorama.lon}),x["a"].isEdit||x["a"].isMobile||!re["default"].chosenMeasureRuler||re["default"].chosenMeasureRuler.updateOptionPos(),lt.settingPos&<.placeGround(),this.linkViewManager.update(this.camera),(e.cameraChanged2||e.cameraProjectionChanged)&&(this.flying||this.VR_Rotate())),e.cameraChanged2?(("shop"==x["a"].name||"grave"==x["a"].name)&&this.tagManager.waitToAimAtTag(!1),this.model.floorLogos.updateFloorlogo(this.camera&&this.camera.quaternion,this)):("shop"==x["a"].name||"grave"==x["a"].name)&&"panorama"==this.mode&&this.tagManager.waitToAimAtTag(!0),re["default"].enterSplitView){var n=re["default"].cameraBchanged();"designWall"!=re["default"].editType&&re["default"].spotPosInfo.pauseCameraBind?n.cameraChanged&&re["default"].spotPosInfo.markSpotB.updateHotspot2dPos():"designWall"==re["default"].editType&&re["default"].BcontainsMouse&&!re["default"].playerBmousedown&&n.changed&&mainDesign.checkIntersect(re["default"])}x["a"].supportsTiles&&(this.updateTileDownloader(t),this.updatePanoRenderer(t)),this.reticule.update(),this.path.update(),this.cachedPanoCandidates&&f["a"].navigation.panoScores&&this.model.panos.showPanoScores(this.cachedPanoCandidates),this.updateControlLocks(),x["a"].supportsTiles&&this.updateZoomPano(),re["default"].setSpotPos&&re["default"].renderSpotArea()}}}()),Object(p["a"])(Object(s["a"])(e),"updateLabelZIndex",(function(e){var t=this;e.forEach((function(e){if(!("dollLabels"==e&&"dollhouse"!=t.mode||"doorLabels"==e&&"panorama"!=t.mode)){var i=t[e].sort((function(e,t){return t.pos2d.z-e.pos2d.z}));i.forEach((function(e,t){$(e.elem).css("z-index",t)}))}}))})),Object(p["a"])(Object(s["a"])(e),"updateControlLocks",(function(){this.currentPano&&x["a"].supportsTiles&&(this.cameraControls.controls[D["a"].PANORAMA].locked=!this.currentPano.highestFullTileRenderOpCompleted&&this.currentPano.lockUntilRenderingComplete)})),Object(p["a"])(Object(s["a"])(e),"VR_Rotate",(function(e){this.emit("vr_Rotate",this),this.following||__api.screen.rotate(e)})),Object(p["a"])(Object(s["a"])(e),"updateTileDownloader",function(){var e=new THREE.Vector3;return function(t){var i=this.nextPano||this.currentPano;i&&(e.copy(M["a"].FORWARD),this.getDirection(e),this.tileDownloader.tilePrioritizer.updateCriteria(i,this.position,e,t.length>0?t:null),this.tileDownloader.processPriorityQueue=!0)}}()),Object(p["a"])(Object(s["a"])(e),"updatePanoRenderer",function(){var e=new THREE.Vector3;return function(t){var i=this.nextPano||this.currentPano;this.panoRenderer.hasQueuedTiles()&&i&&(e.copy(M["a"].FORWARD),this.getDirection(e),this.panoRenderer.updateDirection(e))}}()),Object(p["a"])(Object(s["a"])(e),"updatePreRendering",function(){var e={};return function(t){if(1===f["a"].tiling.preRenderTourPanos&&this.preRenderingEnabled){var i=this.nextPano||this.currentPano;if(i&&t&&t.length>1){var n=t.findIndex((function(e){if(e.id===i.id)return!0}));if(n>=0&&n+1<t.length){var o=t[n+1];o.isLoaded(this.basePanoSize)||e[o.id]||(window.setTimeout(function(t){this.checkAndWaitForPanoLoad(t,"high","low",this.basePanoSize,null,null,null,!1,!1,!1),window.setTimeout(function(t){e[t.id]=!1}.bind(this,t),f["a"].tiling.panoPreRenderRepeatDelay)}.bind(this,o),f["a"].tiling.panoPreRenderDelay),e[o.id]=!0)}}}}}()),Object(p["a"])(Object(s["a"])(e),"enablePreRendering",(function(){this.preRenderingEnabled=!0})),Object(p["a"])(Object(s["a"])(e),"updateMarkerFishPos",(function(e,t,i){void 0==i&&(i=1),i=Math.pow(i,1/3);for(var n=e.position.clone(),o=t.position.clone(),a=-(o.x*i+n.x*(1-i)),r=-(o.z*i+n.z*(1-i)),s=-(o.y*i+n.y*(1-i)),l=this.model.panos.list,c=0;c<l.length;c++){var u=l[c].position.x+a,d=l[c].position.y+s,h=l[c].position.z+r;if(1==i){l[c].floorPositionFish.x=u,l[c].floorPositionFish.y=d-l[c].height,l[c].floorPositionFish.z=h,l[c].floorPositionFish.normalize(),l[c].floorPositionFish.multiplyScalar(f["a"].skyRadius),l[c].floorPositionFish.add(o),l[c].marker.position.copy(l[c].floorPositionFish);var p=l[c].position.clone();p.y-=l[c].height;var m=.45/p.distanceTo(o);l[c].marker.scale.set(m,m,m),l[c].marker.lookAt(o.clone().add(new THREE.Vector3(0,5*f["a"].skyRadius,0)))}}t.marker.visible=!1})),Object(p["a"])(Object(s["a"])(e),"updateFromControls",(function(e){if(this.camera){if(null!==e&&void 0!==e||(e=0),this.cameraControls.activeControl){this.play.control.wait||this.play.playFragment(),this.cameraControls.activeControl.update(e),this.quaternion.copy(this.cameraControls.activeControl.camera.quaternion),this.position.copy(this.cameraControls.activeControl.camera.position),this.target.copy(this.cameraControls.activeControl.target),this.cameraControls.activeControl.camera.updateProjectionMatrix(),this.camera.projectionMatrix.copy(this.cameraControls.activeControl.camera.projectionMatrix),this.updateQuaternionTransition(this.cameraControls.activeControl.camera,e);x["a"].idEdit&&m["objects"].editor.mainDesign;if(re["default"].enterSplitView){var t=re["default"].spotPosInfo.control;re["default"].spotPosInfo.pauseCameraBind?t.update(e):(t.lon=this.cameraControls.controls.panorama.lon,t.lat=this.cameraControls.controls.panorama.lat,t.update(e),this.cameraControls.controls.panorama.lon=t.lon,this.cameraControls.controls.panorama.lat=t.lat)}}this.camera.position.copy(this.position),this.camera.quaternion.copy(this.quaternion),this.camera.updateMatrix(),this.camera.updateMatrixWorld()}})),Object(p["a"])(Object(s["a"])(e),"hasChanged",(function(e){if(!this.previousState)return this.previousState={allFloorsVisible:this.model.allFloorsVisible,position:this.position.clone(),quaternion:this.quaternion.clone(),mouse:this.mouse.clone(),currentFloor:this.model.currentFloor,projectionMatrix:this.camera.projectionMatrix.clone(),worldMatrix:this.camera.matrixWorld.clone(),mode:this.mode,modelPosition:this.model.position.clone(),modelCenter:this.model.center.clone(),zoomLevel:this.zoomLevel},e.cameraChanged=!0,e.cameraChanged2=!0,!0;var t=this.position.equals(this.previousState.position)&&this.quaternion.equals(this.previousState.quaternion)&&this.camera.matrixWorld.equals(this.previousState.worldMatrix)&&this.camera.projectionMatrix.equals(this.previousState.projectionMatrix)&&this.mode===this.previousState.mode&&this.zoomLevel===this.previousState.zoomLevel&&this.model.center.equals(this.previousState.modelCenter)&&this.model.position.equals(this.previousState.modelPosition),i=t&&this.mouse.equals(this.previousState.mouse)&&this.model.allFloorsVisible===this.previousState.allFloorsVisible&&this.model.currentFloor===this.previousState.currentFloor&&null===this.nextPano;return e.cameraChanged=!t,e.cameraChanged2=!i&&(!Y["a"].closeTo(this.quaternion,this.previousState.quaternion,3)||!Y["a"].closeTo(this.position,this.previousState.position,4)),e.allFloorsVisible=this.model.allFloorsVisible!==this.previousState.allFloorsVisible,e.moved=!this.position.equals(this.previousState.position),e.rotated=!this.quaternion.equals(this.previousState.quaternion),e.mouseMoved=!this.mouse.equals(this.previousState.mouse),e.floorChanged=this.model.currentFloor!==this.previousState.currentFloor,e.cameraProjectionChanged=!this.camera.projectionMatrix.equals(this.previousState.projectionMatrix),e.cameraWorldMatrixChanged=!this.camera.matrixWorld.equals(this.previousState.worldMatrix),e.modeChanged=this.mode!==this.previousState.mode,e.modelPositionChanged=!this.model.position.equals(this.previousState.modelPosition),e.modelCenterChanged=!this.model.center.equals(this.previousState.modelCenter),e.nextPanoActive=null!==this.nextPano,e.zoomLevel=this.zoomLevel!==this.previousState.zoomLevel,this.previousState.allFloorsVisible=this.model.allFloorsVisible,this.previousState.position.copy(this.position),this.previousState.quaternion.copy(this.quaternion),this.previousState.mouse.copy(this.mouse),this.previousState.currentFloor=this.model.currentFloor,this.previousState.projectionMatrix.copy(this.camera.projectionMatrix),this.previousState.worldMatrix.copy(this.camera.matrixWorld),this.previousState.mode=this.mode,this.previousState.modelPosition.copy(this.model.position),this.previousState.modelCenter.copy(this.model.center),this.previousState.zoomLevel=this.zoomLevel,!i})),Object(p["a"])(Object(s["a"])(e),"updateIntersect",(function(e){var t=this.flying,i=this.isOutsideMode()&&this.cameraControls.controls[this.mode].isEngaged(),n=E["a"].getById(f["a"].freeze.LookTransition),o=!this.record.control.isRecording&&!(t||i||this.isTouchEvent||n.length&&n[0].running);if(!this.tagManager.getIntersectTag(this.mouse,o,this.camera)){if(this.intersect=this.linkViewManager.getIntersectView(),this.linkViewManager.dealwithIntersect(this.intersect),this.intersect)return;if(this.EditPanoVideo&&this.EditPanoVideo.editVideo){var a=this.EditPanoVideo.checkIfHover();if(a)return}if(this.currentPano&&this.is360View(this.mode,this.currentPano))return;if(e&&e.wallIntersect){if(this.intersect=this.getMouseIntersect(null,m["objects"].overlayManager.group.children),this.intersect)return void m["objects"].overlayManager.hoverOverlay(this.intersect.object);if(m["objects"].overlayManager.hoverOverlay(null),x["a"].isEdit&&m["objects"].mainDesign&&m["objects"].mainDesign.editing&&"wallDesign"==m["objects"].mainDesign.editType&&(this.intersect=m["objects"].mainDesign.checkIntersect(),this.intersect))return}if(!x["a"].isEdit){var r=[];if(this.measureRulers.forEach((function(e){"unable"!=e.state&&r.push(e.boldLine)})),this.intersect=this.getMouseIntersect(null,r),this.intersect&&this.intersect.object.parentRuler)return void $("#player").css("cursor","pointer");re["default"].enterSplitView||$("#player").css("cursor","")}if(this.linkEditor&&(this.linkEditor.setPanoVisible||this.linkEditor.setTagVisible))return this.intersect=this.getMouseIntersect(null,this.linkEditor.footIcons),void(this.intersect&&this.intersect.object.visible?$("#player").css("cursor","pointer"):$("#player").css("cursor",""));if(e&&e.tagShadow)return void(this.intersect=this.getMouseIntersect(null,[this.markTag.markGroup.shadow]));if(this.model.flag&&(this.intersect=this.getMouseIntersect(null,[this.model.flag]),this.intersect))return;if(x["a"].isEdit&&m["objects"].mainDesign&&m["objects"].mainDesign.editing){var s=m["objects"].mainDesign.getMeshes(["wallMeshes","groundMeshes","objWallMeshes"]);this.mode==D["a"].PANORAMA&&s.push(this.model.skybox),this.intersect=this.getMouseIntersect(null,s)}else this.intersect=this.getMouseIntersect(null,null,"normal");this.intersect&&this.updateClosestPano(this.intersect),this.closestPano||this.closestPanoInDirection(this.getMouseDirection())?(this.reticule.updatePosition(this.position,this.intersect),f["a"].navigation.panoScores&&!f["a"].navigation.mouseDirection&&this.closestPanoInDirection(this.getDirection())):this.reticule.hide()}})),Object(p["a"])(Object(s["a"])(e),"getMouseDirection",(function(e){e=e||this.mouse;var t=new THREE.Vector3(e.x,e.y,-1).unproject(this.camera),i=new THREE.Vector3(e.x,e.y,1).unproject(this.camera);return i.sub(t).normalize()})),Object(p["a"])(Object(s["a"])(e),"getMouseIntersect",(function(e,t,i){e=e||this.mouse.clone(),t||(t=this.model.colliders.concat(this.mode===D["a"].PANORAMA?this.panoMarkers:[])),this.mode===D["a"].PANORAMA&&"normal"==i&&(t=t.concat([this.model.skybox]));var n=new THREE.Vector3(e.x,e.y,-1).unproject(this.camera);this.raycaster.set(n,this.getMouseDirection(e));var o=this.raycaster.intersectObjects(t,!0);if(0===o.length)return null;if("getAll"==i)return o;var a=o[0];if(a.face){a.normal=a.face.normal.applyQuaternion(a.object.quaternion);var r=this.position.clone().sub(a.point);r.dot(a.normal)<0&&a.normal.negate(),this.currentPano?a.onFloor=a.point.y<this.position.y-.5*this.currentPano.height:a.onFloor=a.point.y<this.position.y-.5,a.horizontal=a.normal.y>.8}return a})),Object(p["a"])(Object(s["a"])(e),"updateClosestPano",(function(e){var t=this,i=[];if(this.mode===D["a"].PANORAMA){if(!this.currentPano)return;i.push(W["a"].filters.not(this.currentPano)),i.push(W["a"].filters.inFloorDirection(this.currentPano.floorPositionFish||this.currentPano.floorPosition,this.getDirection(),.25)),i.push(W["a"].filters.isNeighbourPanoTo(this.currentPano)),i.push(W["a"].filters.isCloseEnoughTo(e.point,f["a"].panoFloorClickRadius)),i.push(W["a"].filters.isNotBehindNormal(e.point,e.normal))}else this.linkEditor.noPanoHasNeighbor||i.push((function(e){return t.linkEditor.checkHasNeighbor(e)})),m["objects"].record.control.isRecording||i.push(W["a"].filters.isOnVisibleFloor()),this.mode!==D["a"].FLOORPLAN&&i.push(W["a"].filters.inDirection(this.position,this.getDirection(),.25));i.push(W["a"].filters.isPanoAligned());var n=this.model.panos.find(i,[W["a"].sortFunctions.floorDistanceToPoint(e.point)]);n!==this.closestPano?(n&&(this.isPanoHover=!0),this.emit(L["a"].ClosestPanoChanging,this.closestPano,n,this.mode),this.closestPano=n):this.isPanoHover=!1})),Object(p["a"])(Object(s["a"])(e),"dollhouseMode",(function(e,t){this.emit(L["a"].ModeChanging,this.mode,D["a"].DOLLHOUSE),this.mode=D["a"].DOLLHOUSE,this.cameraControls.controls[D["a"].DOLLHOUSE].reset();var i=new THREE.Vector3(this.model.center.x,0,this.model.center.z),n=new THREE.Vector3(15,10,15);if(e&&t){var o=M["a"].FORWARD.clone().applyQuaternion(t),a=this.model.center.clone().sub(e),r=a.dot(o);r>0?(i=o.clone().multiplyScalar(r).add(e),n.copy(e)):O["a"].warn("Tried to initiate dollhouse mode that wasn'quaternion looking at the model",e,t)}this.cameraControls.controls[D["a"].DOLLHOUSE].resetRanges(0,!0),this.cameraControls.controls[D["a"].DOLLHOUSE].target.copy(i),this.cameraControls.cameras[D["a"].DOLLHOUSE].position.copy(n),this.updateFromControls(),this.model.alpha=1,this.model.skybox.material.uniforms.opacity.value=0})),Object(p["a"])(Object(s["a"])(e),"insideMode",(function(e,t){var i=$.Deferred(),n=t||null;if(this.mode!==D["a"].PANORAMA&&this.mode!==D["a"].TRANSITIONING){var o=[];this.model.currentFloor&&o.push(W["a"].filters.atFloor(this.model.currentFloor)),e=e||this.currentPano||this.model.panos.find(o,[W["a"].sortFunctions.distanceToPoint(this.cameraControls.activeControl.target)]),this.flyToNewMode({mode:D["a"].PANORAMA,pano:e,callback:n}).done(i.resolve.bind(i)).fail(i.reject.bind(i))}else{var a="Cannot change mode during mode transition";this.mode===D["a"].PANORAMA&&(a="Already in panorama mode"),i.reject(a)}return i.promise()})),Object(p["a"])(Object(s["a"])(e),"fitDollhouse",(function(e,t,i){var n=M["a"].FORWARD.clone().applyQuaternion(i);this.cameraControls.activeControl.target.copy(n).add(e);var o=M["a"].RIGHT.clone().applyQuaternion(i),a=M["a"].UP.clone(),r=o.clone().applyAxisAngle(a,Math.PI/2),s=this.model.boundingBox.max.clone(),l=this.model.boundingBox.min.clone(),c=[new THREE.Vector3(s.x,0,s.z).sub(e),new THREE.Vector3(s.x,0,l.z).sub(e),new THREE.Vector3(l.x,0,s.z).sub(e),new THREE.Vector3(l.x,0,l.z).sub(e)],u=0,d=0,h=0;c.forEach((function(e,t,i){var n=Math.abs(e.dot(o)),a=e.dot(r);n>u&&(u=n,d=a),a>h&&(h=a)}));var p=Math.max(Math.abs(new THREE.Vector3(0,s.y,0).sub(e).dot(a)),Math.abs(new THREE.Vector3(0,l.y,0).sub(e).dot(a))),m=r.clone().multiplyScalar(d).add(t),v=r.clone().multiplyScalar(h).add(t);d=u/Math.tan(this.cameraControls.activeControl.camera.fov/2*this.cameraControls.activeControl.camera.aspect*(Math.PI/180)),h=p/Math.tan(this.cameraControls.activeControl.camera.fov/2*(Math.PI/180)),d=Math.max(d,10),h=Math.max(h,10);var g=n.clone().multiplyScalar(-d).add(m).sub(t).length(),y=n.clone().multiplyScalar(-h).add(m).sub(t).length();this.cameraControls.activeControl.maxDistance=f["a"].skyboxRadius-1,g>=y?this.cameraControls.activeControl.camera.position.set(0,6,0).add(m).add(n.multiplyScalar(1.1*-d)):this.cameraControls.activeControl.camera.position.set(0,6,0).add(v).add(n.multiplyScalar(1.1*-h))})),Object(p["a"])(Object(s["a"])(e),"floorplanMode",(function(e,t,i,n){this.mode=D["a"].FLOORPLAN;var o=this.cameraControls.controls[D["a"].FLOORPLAN];o.reset();var a=e||this.model.center;if(o.target.copy(a).setY(0),o.camera.position.copy(a).setY(f["a"].floorplan.cameraHeight),i?(o.currentScale=i/(this.domElement.clientWidth/this.domElement.clientHeight),o.absoluteScale=o.currentScale):o.zoomToContain(this.model.size,n),t){var r=M["a"].LEFT.clone().applyQuaternion(t);o.rotateLeft(-Math.atan2(r.x,r.z))}else o.rotateToView(this.model.size,this.getDirection());o.update(0)})),Object(p["a"])(Object(s["a"])(e),"fade360View",(function(e,t,i){var n=this,o=t.transitionTime||600;if(t.pano&&t.pano.view){if(!this.linkViewManager.views[t.pano.view.sid])return void(i&&i());if(this.enteringView)return console.log("重复进入360"),void(i&&i());if(t.pano==this.currentPano&&!t.flyIn)return console.log("已经在此360漫游点"),void(i&&i());t.pano.view.entering=!0,this.enteringView=t.pano.view,le["a"].emit("link/click/enter")}this.model.wallManager.updateRulersVisi(!1),$(this.domElement).fadeOut(o,(function(){n.model.skybox.material.uniforms.opacity.value=void 0!=t.skyboxOpacity?t.skyboxOpacity:1,n.model.alpha=void 0!=t.modelAlpha?t.modelAlpha:0,t.pano&&(e.position.copy(t.pano.position),e.quaternion.copy(t.pano.quaternion));var a=!(!t.pano||!t.pano.view),r=!!(n.is360View(n.mode,n.currentPano)&&!t.flyIn||t.flyOut);if(a){for(var s in t.pano.view.exitDoor.mesh.visible=!0,n.tagManager.hideShowTagsForBlackoutStyle(z.END,o),n.linkViewManager.views)if(s in t.pano.view.visibleViews){var l={};l.viewDir=(new THREE.Vector3).fromArray(t.pano.view.visibleViews[s]),n.linkViewManager.views[s].circle.updatePos("at360View",l),n.linkViewManager.views[s].circle.mesh.visible=!0}else n.linkViewManager.views[s].circle.mesh.visible=!1;t.pano.view.balloon.showOrHide(!1),t.pano.view.entering=!1;var c=t.aim||new THREE.Vector3(0,0,-1).applyQuaternion(t.pano.view.enterQuaternion||t.pano.quaternion).add(e.position);n.cameraControls.controls.panorama.lookAt(c),n.cameraControls.controls.panorama.update(0),m["objects"].overlayManager.group.visible=!1}if(r){if(n.currentPano.view.exitDoor.mesh.visible=!1,t.flyOut&&(n.currentPano.view.balloon.visible=!1,setTimeout((function(){n.currentPano.view.balloon.visible=!0}),500)),!a){for(var u in n.linkViewManager.views)n.linkViewManager.views[u].circle.at360View&&n.linkViewManager.views[u].circle.updatePos("normal"),t.flyOut||(n.linkViewManager.views[u].circle.mesh.visible=!0);t.flyOut&<.markView&&(lt.markView.circle.mesh.visible=!0),n.tagManager.hideShowTagsForBlackoutStyle(z.FADEIN,o)}!t.aim||t.flyIn||t.flyOut||(n.cameraControls.controls.panorama.lookAt(t.aim),n.cameraControls.controls.panorama.update(0)),m["objects"].overlayManager.group.visible=!0,le["a"].emit("link/click/exit")}t.pano&&(n.emit(L["a"].PanoChosen,n.currentPano,t.pano),n.model.chunks.concat([n.model.skybox]).forEach((function(e){e.material.uniforms.progress.value=1})),n.model.floorLogos.changefloorLogoOpa({index:0,opa:0,dur:0,delay:0}),n.model.floorLogos.secondLogo.position.copy(t.pano.floorPosition.clone().sub(n.model.position)),n.model.floorLogos.secondLogo.visible=!0,n.model.floorLogos.changefloorLogoOpa({index:1,opa:1,dur:250})),$(n.domElement).fadeIn(o,(function(){n.enteringView=null,i&&i(),n.model.wallManager.updateRulersVisi(),n.reticule.hide()}))}))})),Object(p["a"])(Object(s["a"])(e),"flyToPano",(function(e,t){var i=this,n=e.pano,o=e.lookAtPoint,a=e.quaternion,r=e.duration,s=e.aimDuration,l=e.rotSpeed,c=e.maxDistanceOverride,u=(e.skipWarpingCheck,e.constantMoveSpeed),d=e.force,h=e.examTag,p=null,v=e.cancelLookFun,g=null;if(n&&(!this.play.control.noFly||e.follow)&&(!this.EditPanoVideo||!this.EditPanoVideo.editVideo||this.EditPanoVideo.editVideo.pano==n))if(O["a"].debug("Flying to pano--lookAtPoint:",e.lookAtPoint),e.sid){var y=m["objects"].tagManager.tags[e.sid];y&&(m["objects"].tagManager.closeOpenedTag(),this.emit("vr_FlyToTag",e),this.flyToTag(y))}else{var b=!o&&n.panoVideo;if(b)e.lookAtPoint=o=n.position.clone().add(n.panoVideo.dir);else if(b=!o&&n.hasVideo&&this.panoVideoRenderer&&this.panoVideoRenderer.ifEnable(),b&&(!m["objects"].mainDesign||!m["objects"].mainDesign.editing))if(n.videoInfo.dir)e.lookAtPoint=o=n.position.clone().add(n.videoInfo.dir);else{var w=(new THREE.Quaternion).setFromAxisAngle(new THREE.Vector3(0,1,0),THREE.Math.degToRad(this.model.supportsTiles?90:180));e.lookAtPoint=o=M["a"].FORWARD.clone().applyQuaternion(w.multiply(n.quaternion)).add(n.position)}var P=this.is360View(this.mode,n)||this.is360View(this.mode,this.currentPano);if(!m["objects"].tagManager.markTag||o||1==re["default"].measureStep&&!re["default"].spotPosInfo.clickA){if(x["a"].isEdit&<.markView){if(this.flying)return void console.log("flyingReturn");o=lt.markView.circle.mesh.position.clone()}}else{if(this.flying)return void console.log("flyingReturn");o=m["objects"].tagManager.markTag.position.clone(),this.flyingToTag=!1}if(this.mode!==D["a"].PANORAMA){var k;o&&(k=(new THREE.Quaternion).setFromUnitVectors(M["a"].FORWARD,o.sub(n.position).normalize()));var R={mode:D["a"].PANORAMA,pano:n,duration:r,quaternion:k,callback:t};return e.socketed&&(R.socketed=e.socketed),void this.flyToNewMode(R)}if(n&&(p=C["a"].deepExtend(e),g=function(){C["a"].delayOneFrame(function(){this.flyToPano(p,t)}.bind(this))}.bind(this)),!n||!this.checkAndWaitForPanoLoad(n,"high","low",this.basePanoSize,g)){if(re["default"].enterSplitView){if("designWall"!=re["default"].editType&&!re["default"].spotPosInfo.clickA&&1!=re["default"].measureStep)return;if("designWall"!=re["default"].editType&&(n.assistPano==re["default"].spotPosInfo.panoB||n==re["default"].spotPosInfo.panoB))return void console.log("不会走到这个点");if("designWall"==re["default"].editType&&n==re["default"].spotPosInfo.panoB)return void console.log("不会走到这个点");re["default"].changePano("A",n)}this.emit("vr_FlyToPano",{panoId:e.pano.id,lookAtPoint:o,sid:e.examTag?e.examTag.sid:null,duration:e.duration}),this.following||__api.screen.flyToPano(e),this.setQuaternionTransition(null);var _=function(e){if(this.flyRotate=!1,this.flyingWithRot=!1,t&&t(e),this.waitFlytoItemFuc){var i=this.waitFlytoItemFuc;this.waitFlytoItemFuc=null,i()}"panorama"==this.mode&&this.store.commit("SetPlayerOptions",{modeCanSwitch:!0})}.bind(this);this.currentPano||(this.currentPano=n,this.path.placeCpm(),this.path.fadeOutCpm(f["a"].path.fadeOutTime));var S=r;if("number"!=typeof r){var A=c||f["a"].transition.flytimeMaxDistanceThreshold;S=Math.min(this.currentPano.position.distanceTo(n.position),A)*f["a"].transition.flytimeDistanceMultiplier+f["a"].transition.flyTime}if(f["a"].transition.flySpeed>.01&&(S=1e3*this.currentPano.position.distanceTo(n.position)/f["a"].transition.flySpeed),b);else if(1!==this.zoomLevel&&!P)switch(f["a"].zoom.transitionStyle){case 1:this.smoothZoomToDefault(S/2);break;case 2:return p=C["a"].deepExtend(e),g=this.flyToPano.bind(this,p,t),void this.smoothZoomToDefault(f["a"].zoom.restoreTime*(this.zoomLevel-1),g)}if((o||a)&&!P){var V=this.cameraControls.activeControl.camera.quaternion.clone(),I=V.clone(),F=new THREE.Vector3;if(a&&!o)var H=a;else{var z=(new THREE.Matrix4).lookAt(n.position,o,M["a"].UP);H=(new THREE.Quaternion).setFromRotationMatrix(z)}if(E["a"].cancelById(f["a"].freeze.LookTransition),S*=f["a"].transition.aimSlowFactor,n===this.currentPano){var N=M["a"].FORWARD.clone().applyQuaternion(V),B=M["a"].FORWARD.clone().applyQuaternion(H),U=N.angleTo(B);this.flyRotate=!0;var W=h&&!x["a"].isMobile&&!m["objects"].record.control.isRecording&&!m["objects"].play.control.isPlaying&&!d,q=0,G={progress:null,value:null};return void 0!==s&&null!==s||(s=1*Math.sqrt(U)/(l||f["a"].tags.navigate.rotateSpeedFactor)*1e3),void E["a"].start(function(e){if(this.mode!=D["a"].PANORAMA||window.cancelReExam||this.tagManager.activeTag!=h)return E["a"].cancelById(f["a"].freeze.LookTransition),void _();var t,i;W?(e-q>.01?(o="reserve"==x["a"].name?h.billboard.getCenterPos():this.tagManager.billboard.getCenterPos(),z=(new THREE.Matrix4).lookAt(n.position,o,M["a"].UP),H=(new THREE.Quaternion).setFromRotationMatrix(z),t=G.progress,G.progress=e,i=!0,q=e):(t=G.progress,i=!1),G.value&&1!=t?(I.copy(G.value),e=(e-t)/(1-t)):I.copy(V),T["a"].quaternion(I,H)(e),i&&(G.value=I.clone())):(I.copy(V),T["a"].quaternion(I,H)(e));F.copy(M["a"].FORWARD).applyQuaternion(I).add(this.cameraControls.activeControl.camera.position),this.cameraControls.activeControl.lookAt(F)}.bind(this),s,_,0,j["a"][W?"easeOutSine":f["a"].transition.movementEasing],null,f["a"].freeze.LookTransition,v)}}if(n===this.currentPano||this.flying)return void _();n!=this.currentPano&&this.emit("player/flyToNext","panorama",n),this.flying=!0;var Q,Y=this.position.clone(),X=this.currentPano;if(O["a"].debug("Flying to pano ",n.position),this.nextPano=n,this.emit(L["a"].FlyingStarted,n.position,Y,n,X),this.emit(L["a"].PanoChosen,this.currentPano,n),this.record.control.isRecording&&(this.record.setSecondFragmentForPano(),S=1e3),this.tagManager.updateVisible("panorama",n),this.doorLabels.forEach((function(e){return e.updateVisible(n)})),this.measureRulers.forEach((function(e){e.boldLine.visible=!1,e.balls.forEach((function(e){e.visible=!1}))})),m["objects"].mainDesign&&m["objects"].mainDesign.editing&&m["objects"].mainDesign.updateBallsVisi({toPano:n,type:"beforeFlytoPano"}),this.store.commit("SetPlayerOptions",{modeCanSwitch:!1}),le["a"].emit("model/toItem",this.model.panos.list.indexOf(n)),P)return void this.fade360View(this.cameraControls.activeControl.camera,{pano:n,aim:o,aimQua:a},(function(){i.doAfterFlyToPano(n.position,n,_)}));this.model.floorLogos.changefloorLogoOpa({index:0,opa:0,dur:S,delay:.7}),this.model.floorLogos.secondLogo.position.copy(n.floorPosition.clone().sub(this.model.position)),this.model.floorLogos.secondLogo.visible=!0,this.model.floorLogos.changefloorLogoOpa({index:1,opa:1,dur:250}),(o||a)&&!P&&(this.flyingWithRot=!0)&&E["a"].start(function(e){if(this.mode!=D["a"].PANORAMA||h&&this.tagManager.activeTag!=h)return E["a"].cancelById(f["a"].freeze.LookTransition),void _();I.copy(V),T["a"].quaternion(I,H)(e),F.copy(M["a"].FORWARD).applyQuaternion(I).add(this.cameraControls.activeControl.camera.position),this.cameraControls.activeControl.lookAt(F)}.bind(this),S,null,0,j["a"][f["a"].transition.movementEasing],null,f["a"].freeze.LookTransition,v);var Z=!0;m["objects"].mainDesign&&m["objects"].mainDesign.editing&&(Z=!1,Q=!0);var J=this.store.getters["scene/metadata"];if(12!=J.sceneSource)if(!Q&&this.currentPano.noBlocks.includes(n.id));else if(!Q&&this.currentPano.blocks[n.id])this.hideWalls=this.currentPano.blocks[n.id],this.hideWalls.forEach((function(e){e.visible=!1}));else{var $,K=.1,ee=this.currentPano.origin.clone(),te=n.origin.clone(),ie=te.clone().sub(ee).normalize().multiplyScalar(K),ne=ee.clone().sub(ie),oe=te.clone().add(ie);($=ue["a"].ifIntersectChunks(ne,oe,{throughWidth:.08,model:Q?m["objects"].mainDesign.getMeshes(["wallMeshes","objWallMeshes"]):m["objects"].model.chunks}))?(this.hideWalls=$.map((function(e){return e.object.visible=!1,e.object})),Q||(this.currentPano.blocks[n.id]=this.hideWalls.slice(0))):Q||this.currentPano.noBlocks.push(n.id)}var ae=u?null:j["a"][f["a"].transition.movementEasing];Z?E["a"].start(T["a"].allUniforms(this.model.chunks,"progress",1),S,null,0,j["a"][f["a"].transition.blendEasing],"chunkFly",f["a"].freeze.FlyToPano):x["a"].isEdit&&m["objects"].mainDesign&&m["objects"].mainDesign.editing&&E["a"].start(T["a"].uniform(this.model.chunks[0],"progress",1),S,null,0,j["a"][f["a"].transition.blendEasing],"chunkFly",f["a"].freeze.FlyToPano),E["a"].start(T["a"].uniform(this.model.skybox,"progress",1),S,null,0,j["a"][f["a"].transition.blendEasing],"skyFly",f["a"].freeze.FlyToPano),E["a"].start(T["a"].vector(this.cameraControls.cameras[D["a"].PANORAMA].position,n.position,function(e){x["a"].isEdit&&m["objects"].mainDesign&&m["objects"].mainDesign.editing&&m["objects"].mainDesign.updateSizeWhenFly()}.bind(this)),S,this.doAfterFlyToPano.bind(this,Y,n,_),0,ae,"camFly",f["a"].freeze.FlyToPano)}}})),Object(p["a"])(Object(s["a"])(e),"doAfterFlyToPano",(function(e,t,i){this.currentPano.isAligned()&&(this.lastPano=this.currentPano),this.currentPano!==t&&(re["default"].setSpotPos&&re["default"].spotPosInfo.panoB==this.currentPano?this.waitToExitPano=this.currentPano:this.currentPano.exit(),t.enter(),this.currentPano=t,this.nextPano=null,this.path.placeCpm(),this.mode==D["a"].PANORAMA&&this.path.fadeOutCpm(f["a"].path.fadeOutTime)),this.emit(L["a"].FlyingEnded,t.position,e,t,this.currentPano),!this.play.control.isPlaying&&this.play.control.isPause&&this.record.setPreviewStatus("start"),this.play.control.canPlay||(this.play.control.canPlay=!0),this.play.control.wait&&this.play.control.isPlaying&&(this.record.updateFragmentUI(this.play.control.currentIndex),this.play.control.wait=!1),this.play.control.flyToSingleCap&&(this.play.control.flyToSingleCap=!1),this.mode==D["a"].PANORAMA&&(this.flying=!1,this.model.floorLogos.firstLogo.position.copy(this.model.floorLogos.secondLogo.position),this.model.floorLogos.changefloorLogoOpa({index:0,opa:1,dur:0}),this.model.floorLogos.secondLogo.visible=!1,this.record.control.isRecording&&this.record.setFirstFragmentForPano()),this.model.chunks.forEach((function(e){e.material.uniforms.progress&&(e.material.uniforms.progress.value=1),x["a"].isEdit&&m["objects"].mainDesign&&m["objects"].mainDesign.editing||f["a"].vrEnabled||(e.visible=!0)})),this.model.fadePanoMarkers(),this.doorLabels.forEach((function(e){return e.updateVisible()})),x["a"].isEdit?(this.hideWalls&&(this.hideWalls.forEach((function(e){e.visible=!0})),this.hideWalls=null),m["objects"].mainDesign&&m["objects"].mainDesign.editing&&(m["objects"].mainDesign.updatePano(this.currentPano),m["objects"].mainDesign.updateBallsVisi(),m["objects"].mainDesign.adjustFloorHeight())):this.measureRulers.forEach((function(e){re["default"].setSpotPos||e.updateVisible(),e.boldLine.visible=!0,e.balls.forEach((function(e){e.visible=!0})),"active"==e.state&&e.updateBoldLine()})),Oe.linkSceneCheck(),i()})),Object(p["a"])(Object(s["a"])(e),"flyToPanoClosestToMouse",(function(){if(Date.now()-this.mouseLastMoveTime>50&&(this.intersect=this.getMouseIntersect(),this.intersect&&this.updateClosestPano(this.intersect)),this.closestPano)return this.flyToPano({pano:this.closestPano});var e=this.getMouseDirection();this.flyDirection(e)||this.flyToPano({pano:this.currentPano})})),Object(p["a"])(Object(s["a"])(e),"flyLocalDirection",(function(e){var t=this.getDirection(e),i=1===e.z?.4:.75,n=1===Math.abs(e.x);return this.flyDirection(t,i,n)})),Object(p["a"])(Object(s["a"])(e),"flyDirection",(function(e,t,i){var n=$.Deferred();this.history.invalidate();var o=this.closestPanoInDirection(e,t,i);return o?this.flyToPano({pano:o},n.resolve.bind(n,!0)):(this.bump(e),n.resolve(!1)),n.promise()})),Object(p["a"])(Object(s["a"])(e),"closestPanoInDirection",(function(e,t,i){return this.rankedPanoInDirection(0,e,t,i)})),Object(p["a"])(Object(s["a"])(e),"rankedPanoInDirection",function(){var e={pano:null,candidates:[]};return function(t,i,n,o){t||(t=0),n=void 0!==n?n:.75;var a=o?"angle":"direction",r=[W["a"].filters.isPanoAligned(),W["a"].filters.inPanoDirection(this.position,i,n),W["a"].filters.isNeighbourPanoTo(this.currentPano),W["a"].filters.not(this.currentPano)],s=[W["a"].scoreFunctions.distanceSquared(this.currentPano),W["a"].scoreFunctions[a](this.position,i)];return re["default"].setSpotPos&&("tag"==re["default"].editType||"measure"==re["default"].editType?r.push((function(e){return e.assistPano!=re["default"].spotPosInfo.panoB&&e!=re["default"].spotPosInfo.panoB})):"designWall"==re["default"].editType&&r.push((function(e){return e!=re["default"].spotPosInfo.panoB}))),this.model.panos.findRankedByScore(t,r,s,e),this.cachedPanoCandidates=e.candidates,e.pano}}()),Object(p["a"])(Object(s["a"])(e),"bump",(function(e){if(this.mode===D["a"].PANORAMA&&!this.flying&&!this.isWarping()){var t,i,n,o=f["a"].transition,a=(o.flytimeMaxDistanceThreshold*o.flytimeDistanceMultiplier+o.flyTime)/10,r=this.camera.getWorldDirection().dot(e),s=Math.abs(r)>.5;if(s)t=function(){E["a"].start(T["a"].property(this.cameraControls.cameras[D["a"].PANORAMA],"zoom",r>0?1.04:.96),a,i,0,j["a"].easeInOutSine,"bumpZStart")}.bind(this),i=function(){E["a"].start(T["a"].property(this.cameraControls.cameras[D["a"].PANORAMA],"zoom",1),3*a,n,0,j["a"].easeInOutSine,"bumpZRelax")}.bind(this);else{var l=this.camera.position.clone(),c=e.clone();this.raycaster.set(l,c);var u=this.model.floors.reduce((function(e,t){return e.concat(t.collider.children)}),[]),d=this.raycaster.intersectObjects(u),h=d.length>0?d[0].distance/25:.04,p=l.clone().add(c.multiplyScalar(h));t=function(){E["a"].start(T["a"].vector(this.cameraControls.cameras[D["a"].PANORAMA].position,p),a,i,0,j["a"].easeInOutSine,"bumpTStart")}.bind(this),i=function(){E["a"].start(T["a"].vector(this.cameraControls.cameras[D["a"].PANORAMA].position,l),5*a,n,0,j["a"].easeInOutSine,"bumpTRelax")}.bind(this)}n=function(){if("panorama"==this.mode&&(this.flying=!1),this.waitFlytoItemFuc){var e=this.waitFlytoItemFuc;this.waitFlytoItemFuc=null,e()}}.bind(this),this.flying=!0,t()}})),Object(p["a"])(Object(s["a"])(e),"changeFloor",(function(e){if(!this.is360View(this.mode,this.currentPano))if(this.mode===D["a"].PANORAMA){var t=this.history.reversePano(e);t?this.flyToPano({pano:t}):this.changeFloorByScore(e),t&&t.isAligned()?this.flyToPano({pano:t}):this.changeFloorByScore(e)}else{var i=this.modeTran.split("-")[1];this.model.setFloor(this.model.nextFloor(e)||this.model.currentFloor,i)}})),Object(p["a"])(Object(s["a"])(e),"changeFloorByScore",function(){var e={pano:null,candidates:[]};return function(t){var i=this.model.nextFloor(t);i?(this.model.panos.lowestByScore([W["a"].filters.atFloor(i),W["a"].filters.isPanoAligned()],[W["a"].scoreFunctions.distance(this.currentPano),W["a"].scoreFunctions.direction(this.position,new THREE.Vector3(0,t,0)),W["a"].scoreFunctions.penalizeHeightDifferenceUnder(this.position,.5)],e),e.pano?(this.cachedPanoCandidates=e.candidates,this.history.push(t,this.currentPano),this.flyToPano({pano:e.pano})):O["a"].warn("No pano found on selected floor, not moving there.")):O["a"].debug("player.changeFloor("+t+"): no such floor")}}()),Object(p["a"])(Object(s["a"])(e),"gotoFloor",(function(e){var t=e-this.model.currentFloor.floorIndex;this.changeFloor(t)})),Object(p["a"])(Object(s["a"])(e),"getDirection",(function(e){return e=e||(new THREE.Vector3).copy(M["a"].FORWARD),e.applyQuaternion(this.camera.quaternion)})),Object(p["a"])(Object(s["a"])(e),"beforeChangeMode",(function(e,t,i,n){var o=this;if(this.modeTran=e+"-"+t,this.store.commit("SetPlayerOptions",{mode:"panorama"==t?"pano":"dollhouse"==t?"3d":"2d",modeCanSwitch:!1}),x["a"].isEdit&&(m["objects"].mainDesign&&m["objects"].mainDesign.editing&&(m["objects"].mainDesign.unselectAll(),m["objects"].mainDesign.updateWallMat()),"guide"==this.store.getters.page&&e==D["a"].PANORAMA&&m["objects"].tagManager.hideAllTags(),!x["a"].isMobile&&this.linkEditor&&(this.linkEditor.setTagVisible?this.linkEditor.finishSetTagVisible():this.linkEditor.setPanoVisible)),e==D["a"].PANORAMA)this.flyingToTag=this.flyRotate=this.flyingWithRot=!1,this.tagManager.updateVisible(),this.model.floorLogos.firstLogo.visible=!1,this.model.floorLogos.secondLogo.visible=!1,setTimeout((function(){for(var e in o.linkViewManager.views)o.linkViewManager.views[e].balloon.showOrHide(!0,n/2,"auto"),o.linkViewManager.views[e].circle.mesh.visible=!1;lt.markView&&(lt.markView.circle.mesh.visible=!0)}),n||500),this.model.skybox.material.depthTest=!1,x["a"].isEdit?m["objects"].mainDesign&&m["objects"].mainDesign.editing&&(m["objects"].mainDesign.updateWallMat(),m["objects"].mainDesign.updateOutMat(),m["objects"].mainDesign.updateCeilsDisplay(),m["objects"].mainDesign.updateBallsVisi({type:"outside"}),m["objects"].mainDesign.updateAllSize({type:"outside"})):(this.model.chunks.forEach((function(e){e.visible=!0})),re["default"].chosenMeasureRuler&&re["default"].chosenMeasureRuler.showOptionLabel(!1)),this.model.skybox.material.transparent=!0,$(".widgets-rulers").css("display","none"),this.measureRulers.forEach((function(e){e.group.visible=!1}));else if(e==D["a"].FLOORPLAN){for(var a in $(".widgets-plan-labels").css("display","none"),m["objects"].mainDesign&&m["objects"].mainDesign.MATs&&(m["objects"].mainDesign.MATs.lineMats.default.opacity=.3),this.model.cadFloorPlane.changePlaneOpacity(this.model.currentFloor.floorIndex,0,600),this.model.cadFloorPlane.updateEntryVisi({autoJudge:!0}),this.linkViewManager.views)this.linkViewManager.views[a].balloon.mesh.material.depthTest=!0;Pt["a"].switchDepthTest(!0)}else e==D["a"].DOLLHOUSE&&$(".widgets-doll-labels").css("display","none");if(t==D["a"].PANORAMA){for(var r in this.model.floorLogos.firstLogo.position.copy(i.floorPosition.clone().sub(this.model.position)),this.model.floorLogos.secondLogo.position.copy(this.model.floorLogos.firstLogo.position),this.linkViewManager.views)this.linkViewManager.views[r].balloon.showOrHide(!1),this.linkViewManager.views[r].circle.mesh.visible=!0;if(x["a"].isEdit&&(m["objects"].mainDesign&&m["objects"].mainDesign.editing&&(m["objects"].mainDesign.updateOutMat(),m["objects"].mainDesign.waitChangeMode=!0),lt.cancelPos()),e==D["a"].FLOORPLAN&&(this.tagManager.tagDiscs.forEach((function(e){e.material.depthTest=!1})),!x["a"].isEdit&&this.model.cadFloorPlane.show)){var s=this.cameraControls.controls.floorplan;s.farestScale=null}this.model.compass&&this.model.compass.setDisplay(!1),this.model.cadFloorPlane.updateEntryVisi({visi:!1})}else t==D["a"].FLOORPLAN&&(setTimeout(Pt["a"].switchDepthTest.bind(this,!1),.5*n),this.model.cadFloorPlane.updateEntryVisi({autoJudge:!0}))})),Object(p["a"])(Object(s["a"])(e),"afterChangeMode",(function(e,t){if(this.store.commit("SetPlayerOptions",{modeCanSwitch:!0}),["floorplan","dollhouse"].includes(e)&&["floorplan","dollhouse"].includes(t)||this.model.fadePanoMarkers(),e==D["a"].PANORAMA&&(m["objects"].mainDesign&&m["objects"].mainDesign.editing&&(m["objects"].mainDesign.updateBallsVisi({type:"afterFlyout"}),m["objects"].mainDesign.cad.processing.points.forEach((function(e){e.ele.in3D&&e.ele.in3D.updateLodGeo({type:"outside"})}))),this.model.panos.list.forEach((function(e){e.lightCylinder&&(e.lightCylinder.visible=!0)})),this.model.compass&&this.model.compass.autoJudgeDisplay()),t==D["a"].PANORAMA){if(this.model.floorLogos.firstLogo.visible=!0,this.model.floorLogos.changefloorLogoOpa({index:0,from:0,opa:1,dur:150}),this.tagManager.updateVisible("panorama"),this.doorLabels.forEach((function(e){return e.updateVisible()})),this.model.skybox.material.depthTest=!0,x["a"].isEdit){if(m["objects"].mainDesign&&m["objects"].mainDesign.editing&&(m["objects"].mainDesign.updatePano(this.currentPano),m["objects"].mainDesign.updateBallsVisi(),m["objects"].mainDesign.updateCeilsDisplay(),m["objects"].mainDesign.cad.processing.points.forEach((function(e){e.ele.in3D&&e.ele.in3D.updateLodGeo()}))),"guide"==this.store.getters.page&&t==D["a"].PANORAMA)for(var i in m["objects"].tagManager.tags){var n=m["objects"].tagManager.tags[i];"link"!=n.mediaType&&"videoPanoFlag"!=n.state&&n.show()}}else this.measureRulers.forEach((function(e){e.updateBoldLine()}));this.model.skybox.material.transparent=!1,$(".widgets-rulers").css("display",""),this.measureRulers.forEach((function(e){e.group.visible=!0})),this.model.panos.list.forEach((function(e){e.lightCylinder&&(e.lightCylinder.visible=!1)}))}else if(t==D["a"].DOLLHOUSE)$(".widgets-doll-labels").css("display",""),this.model.floors.forEach((function(e){e.entryArrow&&e.entryArrow.dollLabel.update()})),this.model.cadFloorPlane.updateEntryVisi({visi:!0});else if(t==D["a"].FLOORPLAN){for(var o in $(".widgets-plan-labels").css("display",""),m["objects"].mainDesign&&m["objects"].mainDesign.MATs&&(m["objects"].mainDesign.MATs.lineMats.default.opacity=1),this.linkViewManager.views)this.linkViewManager.views[o].balloon.mesh.material.depthTest=!1;this.model.currentFloor.panos.forEach((function(e){e.hasVideo&&e.updateMarkerVisible(!0)}))}if(this.afterCModeFuc){var a=this.afterCModeFuc;this.afterCModeFuc=null,a()}if(this.waitFlytoItemFuc){a=this.waitFlytoItemFuc;this.waitFlytoItemFuc=null,a()}Oe.linkSceneCheck("dontSwitchScene")})),Object(p["a"])(Object(s["a"])(e),"flyToNewMode",(function(e,t){e=e||{};var i=e.mode,n=e.pano,o=e.duration,a=(e.warpDest,e.callback),r=(e.force,e.target),s=e.position,l=e.quaternion,c=e.zoom,u=e.socketed;if(t=t||$.Deferred(),this.play.control.noFly&&!e.follow)return t.promise();if(u&&("panorama"!=i||n.isAligned())||this.play.control.onUpdate||this.emit("vr_freedom",this),this.setQuaternionTransition(null),this.isWarping())return O["a"].warn("Player.flyToNewMode() -> Cannot fly when warping"),a&&a(!1),t.reject("Cannot change mode during tour transition").promise();if(this.mode===D["a"].TRANSITIONING)return a&&a(!1),t.reject("Cannot change mode during mode transition").promise();if(i===this.mode)return a&&a(!1),t.reject("Already in "+i+" mode").promise();O["a"].debug("Switching mode to "+i);var d=function(){C["a"].delayOneFrame(function(){this.flyToNewMode(e,t)}.bind(this))}.bind(this);if(n&&this.checkAndWaitForPanoLoad(n,"low","low",this.basePanoSize,d))return t.promise();this.history.invalidate(),this.record.control.isRecording&&(this.mode==D["a"].PANORAMA?(this.tagManager.hideAllTags(),this.record.setSecondFragmentForPano(!0)):this.record.setSecondFragmentForFly());var h=this.mode,p=this.cameraControls.cameras[i],v=C["a"].deepExtend({},f["a"][i],f["a"][h+"-"+i]),g=v.transitionTime;void 0!==o&&(g=o),this.modeTran=h+"-"+i,this.emit(L["a"].ModeChanging,h,i,n),n&&(this.currentPano=n,le["a"].emit("model/toItem",this.model.panos.list.indexOf(n))),this.lastPano=null,le["a"].emit("Player-ModeChanging"),this.switchCameraMode(i,l,r,s,c),E["a"].cancelById(f["a"].freeze.LookTransition);var y=(new THREE.Vector3).copy(this.position);if(!this.following){var b={mode:e.mode,duration:e.duration,target:e.target,position:e.position,quaternion:e.quaternion?(new THREE.Quaternion).set(e.quaternion._x,e.quaternion._y,e.quaternion._z,e.quaternion._w):null,zoom:e.zoom,panoId:e.pano?e.pano.id:null};i!==D["a"].PANORAMA||l||(b.quaternion=this.cameraControls.cameras.panorama.quaternion.clone()),this.emit("vr_FlyToNewMode",b),__api.screen.flyToNewMode(b)}window.transitionTime&&(g=window.transitionTime),i===D["a"].PANORAMA?(this.emit(L["a"].PanoChosen,n,n),setTimeout(function(){n.floor.enter(i)}.bind(this),g/2),this.path.fadeOutCpm(f["a"].path.fadeOutTime)):(this.path.placeCpm(),this.path.fadeInCpm(f["a"].path.fadeInTime),this.model.currentFloor.enter(i)),this.emit("player/flyToNext",i,this.currentPano);var w=this.currentPano,P=this.position.clone();return this.emit(L["a"].FlyingStarted,y,P,n,this.currentPano),this.flying=!0,this.isOutsideMode(i)&&this.is360View(h,w)?(v.blackoutStyle=z.FADEIN,g=f["a"].show360Views.transitionTime,v.transitionTime=g,v.skyboxOpacity=0,v.modelAlpha=1,v.flyOut=!0,this.fade360View(p,v)):this.isOutsideMode(h)&&this.is360View(i,n)?(this.mode=i,v.pano=n,v.blackoutStyle=z.END,g=f["a"].show360Views.transitionTime,v.transitionTime=g,v.flyIn=!0,this.fade360View(p,v,this.afterchangeMode)):((!x["a"].isEdit||!m["objects"].mainDesign||!m["objects"].mainDesign.editing)&&E["a"].start(T["a"].property(this.model,"alpha",v.modelAlpha,null),g*v.modelAlphaLength,null,v.modelAlphaDelay,null,f["a"].freeze.FlyToNewMode),E["a"].start(T["a"].vector(this.position,p.position),g,null,f["a"].flydown.movementDelay,j["a"][f["a"].flydown.movementEasing],null,f["a"].freeze.FlyToNewMode),E["a"].start(T["a"].quaternion(this.quaternion,p.quaternion),g*v.rotationDuration,null,v.rotationDelay,j["a"][f["a"].flydown.rotationEasing],null,f["a"].freeze.FlyToNewMode),E["a"].start(T["a"].matrix4(this.camera.projectionMatrix,p.projectionMatrix),g*v.cameraMatrixDuration,null,v.cameraMatrixDelay,v.cameraMatrixEase,null,f["a"].freeze.FlyToNewMode),E["a"].start(T["a"].uniform(this.model.skybox,"opacity",v.skyboxOpacity),g*v.skyboxOpacityLength,null,v.skyboxOpacityDelay,null,f["a"].freeze.FlyToNewMode),E["a"].start(T["a"].property(this.reticule.material.uniforms.opacity,"value",0),g,null,f["a"].freeze.FlyToNewMode)),E["a"].setTimeout(function(){this.flying=!1,h===D["a"].PANORAMA&&i!==D["a"].PANORAMA?x["a"].isEdit?this.waitToExitPano=this.currentPano:this.currentPano.exit():h!==D["a"].PANORAMA&&i===D["a"].PANORAMA&&(this.currentPano!==w&&w.exit(),this.currentPano.enter(),this.path.placeCpm(),this.path.fadeOutCpm(f["a"].path.fadeOutTime),this.waitToExitPano&&this.waitToExitPano!=w&&this.waitToExitPano!=this.currentPano&&this.waitToExitPano.exit(),this.waitToExitPano=null),h===D["a"].DOLLHOUSE&&(!x["a"].isEdit||!m["objects"].mainDesign||!m["objects"].mainDesign.editing)&&this.cameraControls.controls[D["a"].DOLLHOUSE].resetRanges(),this.mode=i,this.afterChangeMode(h,i),this.emit(L["a"].FlyingEnded,y,P,this.currentPano,w),this.emit("ModeChanged",h,i),a&&a(),t.resolve(),i==D["a"].DOLLHOUSE&&r?this.cameraControls.controls.dollhouse.target.copy(r):i==D["a"].FLOORPLAN&&(x["a"].isEdit||this.play.control.isPlaying||null==this.cad||(isNaN(this.cameraControls.controls.panorama.lon)||this.cad.setPosition(this.cameraControls.controls.panorama.camera.position,2*Math.PI*this.cameraControls.controls.panorama.lon/360),this.cad.setStreamlining(!1),$("#player-cad").css("display",""))),this.record.control.isRecording&&this.record.setFirstFragmentForFly(),!this.play.control.isPlaying&&this.play.control.isPause&&this.record.setPreviewStatus("start"),this.play.control.canPlay||(this.play.control.canPlay=!0),this.play.control.wait&&this.play.control.isPlaying&&(this.record.updateFragmentUI(this.play.control.currentIndex),this.play.control.wait=!1),this.play.control.flyToSingleCap&&(this.play.control.flyToSingleCap=!1),this.emitEvent("player.flyToNewMode")}.bind(this),g,f["a"].freeze.FlyToNewMode),this.beforeChangeMode(h,i,n,g),this.mode=D["a"].TRANSITIONING,t.promise()})),Object(p["a"])(Object(s["a"])(e),"setSize",(function(e,t){var i=e/t;this.baseFov=Q["a"].clampVFOV(f["a"].insideFOV,f["a"].insideFOVMax,e,t);var n=Q["a"].getHFOVFromVFOV(f["a"].insideFOV,e,t);for(var o in n>f["a"].insideFOVMax?this.baseFov=Q["a"].getVFOVFromHFOV(f["a"].insideFOVMax,e,t):this.baseFov=f["a"].insideFOV,this.cameraControls.cameras){var a=this.cameraControls.cameras[o];a.fov=a.staticFov?a.staticFov:this.baseFov*(1/this.zoomLevel),a.updateAspect(i)}if(!x["a"].isEdit&&"floorplan"==this.mode){var r=this.cameraControls.controls.floorplan;r.farestScale=r.getDefaultAbsoluteScale(new THREE.Vector3(this.model.cadFloorPlane.width,1,this.model.cadFloorPlane.height))}this.measureRulers.forEach((function(i){i.line.material.resolution.set(e,t)})),re["default"].setSpotPos&&re["default"].setPlayerBSize(),x["a"].isEdit})),Object(p["a"])(Object(s["a"])(e),"toJSON",(function(){var e={};return this.cameraControls.activeControl?(e=this.cameraControls.activeControl.toJSON(),e.camera_mode=D["a"].toInt(this.mode),this.isOutsideMode()?this.model.allFloorsVisible?e.floor_visibility=[]:e.floor_visibility=this.model.floors.list.map((function(e){return e.hidden?0:1})):D["a"].PANORAMA&&(e.scan_id=this.currentPano.id),e):e})),Object(p["a"])(Object(s["a"])(e),"zoomBy",(function(e){this.zoomTo(this.zoomLevel*e)})),Object(p["a"])(Object(s["a"])(e),"zoomIn",(function(){this.zoomBy(1+this.zoomSpeed)})),Object(p["a"])(Object(s["a"])(e),"zoomOut",(function(){this.zoomBy(1-this.zoomSpeed)})),Object(p["a"])(Object(s["a"])(e),"zoomTo",(function(e,t,i){if(this.following||__api.screen.zoomTo(e,t),i||this.emit("vr_ToZoom",e,t),(t||f["a"].zoom.enabled&&this.mode===D["a"].PANORAMA&&this.zoomEnabled)&&(e<f["a"].zoom.min&&(e=f["a"].zoom.min),e>f["a"].zoom.max&&(e=f["a"].zoom.max),e>this.zoomLevel?(this.emit(ye.ZoomIn),e===f["a"].zoom.max&&this.emit(ye.ZoomMax)):e<this.zoomLevel&&(this.emit(ye.ZoomOut),e===f["a"].zoom.min&&this.emit(ye.ZoomMin)),this.cameraControls.activeControl)){var n=this.cameraControls.activeControl.camera;this.zoomLevel=e,n.fov=this.baseFov*(1/this.zoomLevel),n.updateProjectionMatrix(),this.zoomFov=n.fov}})),Object(p["a"])(Object(s["a"])(e),"updatePersistentZooming",(function(e){1===this.zooming?this.zoomBy(1+this.zoomSpeed*e):-1===this.zooming&&this.zoomBy(1-this.zoomSpeed*e)})),Object(p["a"])(Object(s["a"])(e),"zoomDefault",(function(){this.zoomTo(1,!0)})),Object(p["a"])(Object(s["a"])(e),"zoomFovTo",(function(e){var t=this.baseFov/e;this.zoomTo(t)})),Object(p["a"])(Object(s["a"])(e),"smoothZoomToDefault",(function(e,t){var i,n=this.zoomLevel,o=function(e){e>1&&(e=1),i=n*(1-e)+e,this.zoomTo(i,!0)}.bind(this),a=function(){this.zoomDefault(),t&&window.setTimeout(t,50)}.bind(this);E["a"].start(o,e,a,null,0,j["a"][f["a"].transition.blendEasing])})),Object(p["a"])(Object(s["a"])(e),"smoothZoomFovTo",(function(e,t){var i,n=this.zoomLevel,o=this.baseFov/e;if(n!=o){var a=function(e){e>1&&(e=1),i=n*(1-e)+e*o,this.zoomTo(i,!0)}.bind(this);E["a"].start(a,t,null,null,0,j["a"][f["a"].transition.blendEasing])}})),Object(p["a"])(Object(s["a"])(e),"updateZoomPano",(function(){var e=this;if(!this.panoRenderer.zoomPanoRenderingDisabled&&this.mode===D["a"].PANORAMA){var t=this.currentPano;if(t){var i="2k"==x["a"].navTileClass&&"4k"==x["a"].tileClass?1.7:f["a"].zoom.activationThreshold,n=this.zoomLevel>i,o=this.flying&&this.nextPano&&this.nextPano!==this.currentPano,a=!o&&!this.isWarping(),r=n&&a;this.tileDownloader.tilePrioritizer.setZoomingActive(r),this.panoRenderer.setZoomingActive(r,t,!0);var s=function(e,t){this.panoRenderer.resetRenderStatus(e.id,!1,!0,this.qualityManager.getMaxNavPanoSize()),this.panoRenderer.clearAllQueuedUploadsForPano(e.id),this.panoRenderer.renderPanoTiles(e.id,null,!1,!1),e.setZoomed(t)}.bind(this);if(r&&(!t.zoomed||this.qualityManager.zoomLevelResolution&&"4k"!=this.qualityManager.zoomLevelResolution)?(t.zoomed||s(t,!0),"1k"==x["a"].navTileClass&&"1k"!=x["a"].tileClass&&this.zoomLevel<2?this.panoRenderer.enableHighQuality(function(){"4k"!=x["a"].tileClass&&s(t,!0)}.bind(this)):this.panoRenderer.enableUltraHighQualityMode(function(){this.qualityManager.useUltraHighResolutionPanos&&!f["a"].zoom.overridemax&&(f["a"].zoom.max=f["a"].ultraHighQualityMaxZoom),s(t,!0)}.bind(this))):!n&&t.zoomed&&s(t,!1),r&&"1k"==x["a"].navTileClass&&"4k"==x["a"].tileClass){var l=function(t){e.qualityManager.updateMaximums(),e.panoRenderer.setupZoomRenderTarget()};this.qualityManager.zoomLevelResolution=this.zoomLevel>=2?"4k":this.zoomLevel>1.1?"2k":"1k",this.oldZoomLevel<2&&this.zoomLevel>=2?(l(),s(t,n)):this.oldZoomLevel<=f["a"].zoom.activationThreshold&&this.zoomLevel>f["a"].zoom.activationThreshold?l():this.oldZoomLevel>2&&this.zoomLevel<=2?(l(),s(t,n)):this.oldZoomLevel>f["a"].zoom.activationThreshold&&this.zoomLevel<=f["a"].zoom.activationThreshold&&l(),this.oldZoomLevel=this.zoomLevel}}}})),Object(p["a"])(Object(s["a"])(e),"listImagePanos",(function(){var e=[],t=this;return this.model.images.forEach((function(i){if(i.metadata&&i.metadata.scan_id){var n=t.model.panos.get(i.metadata.scan_id);n&&!n.isLoaded("high")&&e.push(n)}})),e})),Object(p["a"])(Object(s["a"])(e),"nextNotLoadedImage",(function(){for(;this.imagePanos.length>0;){var e=this.imagePanos[0];if(!e.isLoaded("high"))return e;this.imagePanos.shift()}return null})),Object(p["a"])(Object(s["a"])(e),"vrModeChange",(function(){f["a"].vrEnabled?(f["a"].vrEnabled=!1,$("#app").removeClass("hide"),!window.app&&$("#back").addClass("hide"),window.VRScreenNotFull||me["a"].exitFullscreen(),this.tagManager.showAllTags(),this.measureRulers.forEach((function(e){e.updateVisible(),"active"==e.state&&e.updateBoldLine()}))):(f["a"].vrEnabled=!0,$("#app").addClass("hide"),window.VRScreenNotFull||me["a"].requestFullscreen($("body")[0]),!window.app&&$("#back").removeClass("hide"),this.tagManager.hideAllTags(),this.measureRulers.forEach((function(e){e.state="unable"})))})),Object(p["a"])(Object(s["a"])(e),"startWarp",(function(e,t,i,n,o,a){return this.cameraControls.activeControl&&(this.cameraControls.activeControl.enabled=!1),n=n||z.MIDDLE,this.path.warpToPano(i,n,o,function(){this.cameraControls.activeControl&&(this.cameraControls.activeControl.enabled=!0),a&&a()}.bind(this)),!0})),Object(p["a"])(Object(s["a"])(e),"warpToNonPanoByHeroIndex",(function(e,t){return this.path.setWarpDestinationByHeroIndex(e)?(this.path.warpToNonPano(t),!0):(O["a"].warn("Player.warpToNonPanoByHeroIndex() -> Could not setWarpDestinationByHeroIndex()"),t&&t(),!1)})),Object(p["a"])(Object(s["a"])(e),"aimTourCamera",(function(e,t,i,n){return O["a"].debug("Player.aimTourCamera("+e+") calling warpToPanoByHeroIndex("+e+")"),this.warpToPanoByHeroIndex(e,t,i,null,null,null,n)})),Object(p["a"])(Object(s["a"])(e),"tourInterlude",(function(e,t){this.history.invalidate(),this.path.discardSlow(),this.path.waitNextStep(e,function(){t&&t()}.bind(this))})),Object(p["a"])(Object(s["a"])(e),"stopInterlude",(function(){this.interruptAndFastForward(null,0)})),Object(p["a"])(Object(s["a"])(e),"interruptAndFastForward",(function(e,t){this.isWarping()&&this.emit(L["a"].WarpInterrupted,this.path.activeTransType,e,t),this.flying&&this.emit(L["a"].FlyingInterrupted),this.path.interruptAndFastForward(e,t)})),Object(p["a"])(Object(s["a"])(e),"FlyToMode",(function(e,t,i){var n;if(this.mode==e)t&&t();else if(n=t,"transitioning"==this.mode&&this.modeTran.split("-")[1]!=e)this.afterCModeFuc=function(){this.afterCModeFuc=n,this.flyToNewMode({mode:e,pano:"panorama"==e&&this.currentPano})}.bind(this);else{this.afterCModeFuc&&console.log("已经有afterCModeFuc了!!!!!!!!!!!!!!!"),this.afterCModeFuc=n;try{this.flyToNewMode({mode:e,pano:"panorama"==e&&this.currentPano,duration:i})}catch(o){console.log("FlyToMode遇到问题?")}}})),Object(p["a"])(Object(s["a"])(e),"flyToTag",(function(e,t){m["objects"].tagManager.activeTag&&m["objects"].tagManager.activeTag!=e&&this.tagManager.dismissActiveTag(),m["objects"].tagManager.navigatingViaTag=!0,m["objects"].tagManager.activateTag(e,"examine"),e.updateBoardOrient=!0,e.examine(this,t,function(){this.following&&(this.play.control.noFly=!0)}.bind(this))})),Object(p["a"])(Object(s["a"])(e),"flyToPoint",(function(e,t){var i=this.model.panos.closestPanoTowardPoint({point:e,require:t&&t.require,rank:t&&t.rank})||this.currentPano;this.flyToPano({pano:i,lookAtPoint:e,duration:t&&t.dur,callbackFunc:t&&t.done})})),Object(p["a"])(Object(s["a"])(e),"lookAtPos",(function(e,t,i){var n=e?e.clone().applyMatrix4(this.model.matrixWorld):null;this.cameraControls.activeControl&&this.cameraControls.activeControl.startLookAt(n,t,i)})),Object(p["a"])(Object(s["a"])(e),"setQuaternionTransition",(function(e){this.aimQuaternion=e})),Object(p["a"])(Object(s["a"])(e),"updateQuaternionTransition",(function(e,t){if(this.aimQuaternion){var i=1/60,n=e.quaternion.angleTo(this.aimQuaternion),o=function(e,t,i,n,o){var a=(e-t)/(i-t);return o*a+(1-a)*n},a=.05,r=.1,s=Math.PI/2,l=Math.PI/6,c=n>s?a:n>l?o(n,s,l,a,r):r;c*=t/i,T["a"].quaternion(e.quaternion,this.aimQuaternion)(c),this.adjustControlAngel(null,e.quaternion),n<Math.PI/180/4&&this.setQuaternionTransition(null)}})),Object(p["a"])(Object(s["a"])(e),"copyCameraProp",(function(e,t,i){i=i||{};var n=e.camera;if(t.pos?n.position.copy(t.pos):n.position.copy(this.currentPano.position),t.qua)if(i.transitionQua){var o=(new THREE.Quaternion).set(t.qua._x,t.qua._y,t.qua._z,t.qua._w);this.setQuaternionTransition(o)}else n.quaternion.set(t.qua._x,t.qua._y,t.qua._z,t.qua._w),this.setQuaternionTransition(null);t.zoomLevel&&this.zoomTo(t.zoomLevel),t.target&&e.target.copy(t.target),t.zoom&&(e.currentScale=Y["a"].convertWorkshopOrthoZoom(t.zoom),e.absoluteScale=e.currentScale,e.offset.copy(n.position).sub(e.target),e.updateZoom())})),Object(p["a"])(Object(s["a"])(e),"adjustControlAngel",(function(e,t){if("panorama"==this.mode){var i=new THREE.Vector3(0,0,-1).applyQuaternion(t||this.quaternion).add(this.position);this.cameraControls.activeControl.lookAt(i)}else{if(!e)return;this.cameraControls.activeControl&&e.target&&this.cameraControls.activeControl.target.copy(e.target)}})),Object(p["a"])(Object(s["a"])(e),"getSnapAngleInfo",(function(){var e={metadata:{}},t=this.camera.quaternion.clone();switch(this.mode){case"panorama":e.metadata.scan_id=this.currentPano.id;break;case"floorplan":t=(new THREE.Quaternion).setFromAxisAngle(new THREE.Vector3(0,1,0),THREE.Math.degToRad(90)),t.multiply(this.camera.quaternion),e.metadata.camera_mode=1,e.metadata.ortho_zoom=F["a"].toPrecision(this.cameraControls.activeControl.currentScale/($("#player").width()/$("#player").height()),4);break;case"dollhouse":e.metadata.camera_mode=2;break}return e.metadata.camera_position=this.camera.position.clone(),e.metadata.camera_quaternion=t,e.metadata.lon=this.cameraControls.activeControl.lon,e.metadata.lat=this.cameraControls.activeControl.lat,e.sid="4dkk"+(new Date).getTime(),e.name="",e.mode=this.mode,e})),e.model=null,e.currentPano=null,e.nextPano=null,e.camera=null,e.paused=!1,e.flying=!1,e.following=!1,e.sceneIntersectionPlane=null,e.target=new THREE.Vector3,e.mouse=new THREE.Vector3(1.1,1.1,.5),e.mouseAtMouseDown=new THREE.Vector2,e.mouseCouldBeClickToMove=!1,e.mouseLastMoveTime=Date.now(),e.mouseDown=!1,e.mouseDownTimer=null,e.couldBeLongTap=!1,e.containsMouse=!1,//!0; 触屏不要为true,否则会一直updateIntersect,卡
- e.isTouchEvent=!1,e.isPanoHover=!1,e.reticule=new _(Object(s["a"])(e)),e.panoMarkers=[],e.quaternion=new THREE.Quaternion,e.position=new THREE.Vector3(15,10,15),e.previousState=null,e.lastInsideView=new S["a"],e.last360View=new S["a"],e.raycaster=new THREE.Raycaster,e.intersect=null,e.lastChangeTime=Date.now(),e.history=new ae,e.path=null,e.domElement=null,e.cachedPanoCandidates=null,e.basePanoSize=0,e.standardPanoSize=0,e.highPanoSize=0,e.ultraHighPanoSize=0,e.zoomLevel=e.oldZoomLevel=1,e.zooming=0,e.zoomSpeed=.5,e.scrollZoomSpeed=.06,e.zoomSpeedAdjust=.05,e.defaultZoomIncrement=.2,e.baseFov=f["a"].insideFOV,e.zoomFov=e.baseFov,e.zoomEnabled=!0,e.preRenderingEnabled=!1,e.setupCustomProperties(D["a"].PANORAMA),e.zoomStats=new q,e.imagePanos=null,e.currentTarget=new THREE.Vector3,e.afterCModeFuc=null,e.flyingToTag=!1,e.cad=null,e.player=Object(s["a"])(e),e.measureRulers=[],e.cornerRulers=[],e.planLabels=[],e.dollLabels=[],e.doorLabels=[],e.defaultRoomLabels=[],e.modeTran="",e.sync=!1,e.timeOut=null,e.linkViewManager=new pt,e}return Object(r["a"])(i,[{key:"ifClickTag",value:function(){if(this.tagManager.intersectTag){var e=this.isTouchEvent,t=this.tagManager.clickedOnTag(e,this);return e||t||E["a"].cancelById(f["a"].freeze.LookTransition),!0}if("shop"!=x["a"].name&&"reserve"!=x["a"].name&&this.tagManager.activeTag&&!this.record.control.isRecording)return this.tagManager.dismissActiveTag(),!1}},{key:"warpToPanoById",value:function(e,t,i,n,o,a,r,s){return this.path.setWarpDestinationByPanoId(e,t)?this.startWarp(i,n,o,a,r,s):(O["a"].warn("Player.warpToPanoById() -> Could not setWarpDestinationByPanoId()"),s&&s(),!1)}},{key:"warpToPanoByHeroIndex",value:function(e,t,i,n,o,a,r){return this.path.setWarpDestinationByHeroIndex(e)?this.startWarp(t,i,n,o,a,r):(O["a"].warn("Player.warpToPanoByHeroIndex() -> Could not setWarpDestinationByHeroIndex()"),r&&r(),!1)}},{key:"warpToPano",value:function(e,t,i,n,o,a,r,s){return this.warpToPanoById(e.id,t,i,n,o,a,r,s)}},{key:"flyToItem",value:function(e,t){if(e)if(e.mode==D["a"].PANORAMA&&this.mode==D["a"].PANORAMA){var i=this.model.panos.get(e.pano);"undefined"==typeof i&&(console.log("flyToItem没找到pano"),i=this.model.panos.get(this.model.panos.list[0].id));var n=new THREE.Vector3(0,0,-1).applyQuaternion(e.qua).add(i.position);this.flyToPano({pano:i,lookAtPoint:n},t)}else if(this.mode!=e.mode){var o=e.target,a=e.zoom,r={mode:e.mode,position:e.pos,target:o,zoom:a,quaternion:e.qua?(new THREE.Quaternion).copy(e.qua):null,callback:t};e.mode==D["a"].PANORAMA&&(r.pano=this.model.panos.get(e.pano)),this.flyToNewMode(r)}else this.copyCameraProp(this.cameraControls.activeControl,e),t&&t();else O["a"].info("没有可以飞向的下一个的item - -")}},{key:"focusPoint",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(console.log("focusPoint"),"floorplan"==this.mode){var t=e.modelSize||new THREE.Vector3(10,10,10),i=m["objects"].player.cameraControls.controls.floorplan,n=i.getDefaultAbsoluteScale(t),o=i.absoluteScale,a=i.target.clone();E["a"].cancelById(f["a"].freeze.outsideFocus,!0),E["a"].start(function(t){i.absoluteScale=n*t+o*(1-t),i.target=e.aim.clone().multiplyScalar(t).add(a.clone().multiplyScalar(1-t)),i.camera.position.copy(i.target.clone().add(i.offset))}.bind(this),e.dur||600,null,0,j["a"][f["a"].transition.blendEasing],"outsideFocus",f["a"].freeze.outsideFocus,null)}else if("dollhouse"==m["objects"].player.mode){i=m["objects"].player.cameraControls.controls.dollhouse;var r=e.radius||10,s=(a=i.target.clone(),i.offset.clone().normalize()),l=i.offset.length();E["a"].cancelById(f["a"].freeze.outsideFocus,!0),E["a"].start(function(t){i.target=e.aim.clone().multiplyScalar(t).add(a.clone().multiplyScalar(1-t));var n=r*t+l*(1-t);i.camera.position.copy(i.target.clone().add(s.clone().multiplyScalar(n)))}.bind(this),e.dur||600,null,0,j["a"][f["a"].transition.blendEasing],"outsideFocus",f["a"].freeze.outsideFocus,null)}}}]),i}(m["default"]),bt),i("a1f6");var Rt=i("d70d"),_t=i("c75d"),St=i("2138"),Mt=i("fafa"),At=i("617a");i("456d");function Ot(){return new Promise((function(e,t){$.ajax({url:"//www.4dage.com/wechat/jssdk/share",type:"get",data:{uri:location.href.split("#")[0],name:"厦门四维时代微信公众号"},dataType:"jsonp",success:function(t,i){wx.config({debug:!1,appId:t.appId,timestamp:t.timestamp,nonceStr:t.nonceStr,signature:t.signature,jsApiList:["checkJsApi","onMenuShareTimeline","onMenuShareAppMessage","onMenuShareQQ","onMenuShareWeibo","hideMenuItems","showMenuItems","hideAllNonBaseMenuItem","showAllNonBaseMenuItem","translateVoice","startRecord","stopRecord","onRecordEnd","playVoice","pauseVoice","stopVoice","uploadVoice","downloadVoice","chooseImage","previewImage","uploadImage","downloadImage","getNetworkType","openLocation","getLocation","hideOptionMenu","showOptionMenu","closeWindow","scanQRCode","chooseWXPay","openProductSpecificView","addCard","chooseCard","openCard"]}),e()},error:function(e,i,n){t("jsonp.error:"+i)}})}))}function Ct(e){var t=e.substr(1).split("&"),i={};return t.forEach((function(e){var t=e.indexOf("=");~t?i[e.substr(0,t)]=e.substr(t+1):i[e]=null})),i}function Dt(e){var t=[];return Object.keys(e).forEach((function(i){null!==e[i]&&t.push("".concat(i,"=").concat(e[i]))})),"?"+t.join("&")}function Vt(e){var t=e.title,i=e.link,n=e.imgUrl,o=e.desc,a=function(){},r="",s=i.substr(i.indexOf("?")),l=i.substr(0,i.indexOf("?")),c=Ct(s);wx.ready((function(){c.open="wx_friends",wx.onMenuShareTimeline({title:t,link:l+Dt(c),imgUrl:n,desc:o}),c.open="wx_friend",wx.onMenuShareAppMessage({title:t,desc:o,link:l+Dt(c),imgUrl:n,type:r,dataUrl:r}),c.open="weibo",wx.onMenuShareWeibo({title:t,desc:o,link:l+Dt(c),imgUrl:n,success:a,cancel:a}),c.open="qq_zone",wx.onMenuShareQZone({title:t,desc:o,link:l+Dt(c),imgUrl:n,success:a,cancel:a}),c.open="qq",wx.onMenuShareQQ({title:t,desc:o,link:l+Dt(c),imgUrl:n,success:a,cancel:a}),wx.error((function(e){}))}))}var It=function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("undefined"==typeof wx){e.next=4;break}return e.next=3,Ot();case 3:Vt(t);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),jt="";function Lt(e,t,i){return Ie["a"].get(jt+"4dage/shop/getGoodsByHotIds",e,t,i)}function Ft(e){var t=Ht();return function(){var i,n=Object(h["a"])(e);if(t){var o=Object(h["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(u["a"])(this,i)}}function Ht(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function zt(e){At["a"].detectWeixin();var t,i=document.createElement("div");i.innerHTML=e.sceneDec,t=e.shareLogo?x["a"].getServerResource("".concat(e.shareLogo,"?_=").concat(Date.now())):2==e.thumbImg?e.homePic.replace("icon","icon_smallPic"):1==e.thumbImg?x["a"].getPublishResource("images/images#m#/smallPic.jpg",Date.now()):x["a"].getStaticResource("img/share.jpg"),It({title:e.sceneName,link:window.location.href.split("#")[0],imgUrl:t,desc:i.innerText})}var Nt=function(e){Object(c["a"])(i,e);var t=Ft(i);function i(){var e;return Object(o["a"])(this,i),e=t.call(this),Object(p["a"])(Object(s["a"])(e),"load",Object(n["a"])(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.store.commit("SetPlayerOptions",{progres:15}),e.prev=1,e.next=4,this.loadModelMeta();case 4:if(t=e.sent,!t.sceneKey){e.next=8;break}return e.next=8,Mt["b"].listener();case 8:e.next=13;break;case 10:e.prev=10,e.t0=e["catch"](1),console.log(e.t0);case 13:return this.store.commit("SetPlayerOptions",{progres:30}),e.next=16,this.loadModel();case 16:return this.store.commit("SetPlayerOptions",{progres:60}),e.next=19,this.loadModelAddition();case 19:return this.store.commit("SetPlayerOptions",{progres:98}),e.next=22,this.loadGuide();case 22:return e.next=24,new Promise((function(e){return setTimeout((function(){return e()}),300)}));case 24:return this.store.commit("SetPlayerOptions",{progres:100}),e.next=27,new Promise((function(e){return setTimeout((function(){return e()}),300)}));case 27:case"end":return e.stop()}}),e,this,[[1,10]])})))),Object(p["a"])(Object(s["a"])(e),"loadModelMeta",Object(n["a"])(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Ie["a"].getJson(x["a"].urls.sceneInfo);case 3:return t=e.sent,0===t.code&&(t=t.data),m["store"].commit("scene/LoadMetadata",t),O["a"].info("加载模型元数据成功"),zt(t),e.abrupt("return",t);case 11:e.prev=11,e.t0=e["catch"](0),O["a"].error("加载模型元数据失败",e.t0);case 14:case"end":return e.stop()}}),e,null,[[0,11]])})))),Object(p["a"])(Object(s["a"])(e),"loadFirstPano",(function(){O["a"].info("第一张全景图")})),Object(p["a"])(Object(s["a"])(e),"loadModel",function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,x["a"].cameraType,e.next=4,this.loadMesh();case 4:return e.next=6,this.loadMeshTextures();case 6:O["a"].info("加载loadMeshTextures成功"),e.next=12;break;case 9:e.prev=9,e.t0=e["catch"](0),O["a"].error("加载loadMeshTextures失败",e.t0);case 12:case"end":return e.stop()}}),e,this,[[0,9]])})));return function(t){return e.apply(this,arguments)}}()),Object(p["a"])(Object(s["a"])(e),"loadModelAddition",Object(n["a"])(regeneratorRuntime.mark((function e(){var t,i,n,o,a,r,s,l;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.loadFloor();case 3:if(!x["a"].isEdit){e.next=8;break}if(m["store"].getters["scene/metadata"].hots){e.next=6;break}return e.abrupt("return");case 6:e.next=10;break;case 8:if(m["store"].getters["scene/metadata"].hotsIds){e.next=10;break}return e.abrupt("return");case 10:return e.next=12,Ie["a"].getJson(x["a"].urls.getData("hot.json"));case 12:if(t=e.sent,t=t.filter((function(e){return void 0!=e.sid})),"shop"!=x["a"].name&&("grave"!=x["a"].name||x["a"].isEdit)){e.next=37;break}return e.prev=15,e.next=18,Ie["a"].getJson(x["a"].getServerResource("data/data#m#/shopHot.json?_=".concat(Date.now())));case 18:if(i=e.sent,n=i.filter((function(e){return!(!e.brandId||!e.goodsIds.length)})).map((function(e){return e.sid})).join(","),o=[],!n){e.next=28;break}return e.next=24,Lt({hotIds:n,sceneNum:x["a"].projectNum});case 24:for(a=e.sent,r=a.data,s=function(e){var n=i[e].sid,a=r[n];if(a&&a.length){i[e].goods=a;var s=t.findIndex((function(e){return e.sid==n}));-1!=s&&o.push($.extend(!0,t[s],i[e]))}},l=0;l<i.length;l++)s(l);case 28:m["store"].commit("hotspot/Load",o),e.next=35;break;case 31:e.prev=31,e.t0=e["catch"](15),m["store"].commit("hotspot/Load",t),O["a"].error("加载商品",e.t0);case 35:e.next=38;break;case 37:m["store"].commit("hotspot/Load",t);case 38:e.next=43;break;case 40:e.prev=40,e.t1=e["catch"](0),O["a"].error("加载热点数据",e.t1);case 43:case"end":return e.stop()}}),e,this,[[0,40],[15,31]])})))),Object(p["a"])(Object(s["a"])(e),"loadFloor",Object(n["a"])(regeneratorRuntime.mark((function e(){var t,i,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Ie["a"].getJson(x["a"].urls.floorJson);case 3:return t=e.sent,e.prev=4,e.next=7,Ie["a"].getJson(x["a"].urls.initfloorJson);case 7:i=e.sent,e.next=14;break;case 10:e.prev=10,e.t0=e["catch"](4),O["a"].error("当前场景没有initFloor 将使用floor.json",e.t0),i=JSON.parse(JSON.stringify(t));case 14:return e.prev=14,e.next=17,Ie["a"].getJson(x["a"].urls.hostfloorJson);case 17:n=e.sent,e.next=24;break;case 20:e.prev=20,e.t1=e["catch"](14),O["a"].error("当前场景没有houstFloor 将使用initFloor.json",e.t1),n=JSON.parse(JSON.stringify(i));case 24:m["store"].commit("scene/LoadHouseFloor",n),m["store"].commit("scene/LoadInitFloor",i),m["store"].commit("scene/LoadFloor",t),le["a"].emit("scene/LoadFloor",t),le["a"].emit("scene/LoadHouseFloor",n),e.next=34;break;case 31:e.prev=31,e.t2=e["catch"](0),O["a"].error("加载小地图",e.t2);case 34:case"end":return e.stop()}}),e,null,[[0,31],[4,10],[14,20]])})))),Object(p["a"])(Object(s["a"])(e),"loadMesh",Object(n["a"])(regeneratorRuntime.mark((function e(){var t,i,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i=function(e){O["a"].info("加载loadMesh成功");var i=Rt["a"].decompressMesh(e),n=this.modelProcess.convertProtobufToSceneObject(i,x["a"].urls.meshTexture);t(n,this.player.model)},t=function(e,t){if(0===e.length){O["a"].warn("No geometry found for model, loading faux geometry, disabling outside mode"),t.supportedModes[D["a"].DOLLHOUSE]=!1,t.supportedModes[D["a"].FLOORPLAN]=!1;var i=new Chunk({geometry:new THREE.PlaneBufferGeometry(5,5,1,1)});i.visible=!1,i.material.visible=!1,i.rotateX(-Math.PI/2),i.geometry.computeBoundingBox(),e=[i]}e.forEach((function(e){var i=0;t.floorsEnabled&&(i=_t["a"].parseFloor(e.name)),e.visible=!1,t.addChunk(i,e)})),t.floors.sort()},O["a"].info("开始执行loadMesh"),e.prev=3,e.next=6,Ie["a"].getArraybuffer(x["a"].urls.mesh);case 6:n=e.sent,i.call(this,n),e.next=13;break;case 10:e.prev=10,e.t0=e["catch"](3),O["a"].error("加载loadMesh失败",e.t0);case 13:case"end":return e.stop()}}),e,this,[[3,10]])})))),Object(p["a"])(Object(s["a"])(e),"loadFirstPano",(function(){})),Object(p["a"])(Object(s["a"])(e),"loadPanos",function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(t){var i,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return O["a"].info("开始执行loadPanos"),e.prev=1,e.next=4,Ie["a"].getArraybuffer(x["a"].urls.visionModeldata);case 4:i=e.sent,n=this.modelProcess.visionModeldata(Rt["a"].decompressModeldata(i)),this.player.model.panos=this.modelProcess.panos(this.player.model.panos,n,t),O["a"].info("loadPanos加载完了"),e.next=13;break;case 10:e.prev=10,e.t0=e["catch"](1),O["a"].error("loadPanos加载失败",e.t0);case 13:case"end":return e.stop()}}),e,this,[[1,10]])})));return function(t){return e.apply(this,arguments)}}()),Object(p["a"])(Object(s["a"])(e),"loadAssistPanos",Object(n["a"])(regeneratorRuntime.mark((function e(){var t,i,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return O["a"].info("开始执行loadAssistPanos"),e.prev=1,e.next=4,Ie["a"].getArraybuffer(x["a"].urls.visionModeldataAssist);case 4:t=e.sent,i=this.modelProcess.visionModeldata(Rt["a"].decompressModeldata(t)),i.forEach((function(e){e.isAssist=!0})),n=this.modelProcess.panosAssist(i,this.player.model),n.forEach(function(e,t){this.player.model.panos.index[e.id-1]&&(this.player.model.panos.index[e.id-1].assistPano=e),e.isAssist=!0}.bind(this)),O["a"].info("loadAssistPanos加载完了"),e.next=15;break;case 12:e.prev=12,e.t0=e["catch"](1),O["a"].error("loadAssistPanos加载失败",e.t0);case 15:case"end":return e.stop()}}),e,this,[[1,12]])})))),Object(p["a"])(Object(s["a"])(e),"loadMeshTextures",(function(){var e=this.player.model.modelTexturesLoader||new St["a"],t=e.load(this.player.model,this.player.model.meshTextures).then(function(){this.player.model.meshTexturesLoaded=!0}.bind(this));return t})),Object(p["a"])(Object(s["a"])(e),"loadGuide",Object(n["a"])(regeneratorRuntime.mark((function e(){var t,i,n,o,a,r,s,l,c,u,d;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(e.prev=0,t=m["store"].getters["scene/metadata"],!t.playData){e.next=8;break}return e.next=5,Ie["a"].getJson(x["a"].urls.getGuide(t.playData));case 5:for(i=e.sent,n=0;n<i.length;++n)"pa"==i[n].value.mode?i[n].value.mode="panorama":"doll"==i[n].value.mode?i[n].value.mode="dollhouse":"fplan"==i[n].value.mode&&(i[n].value.mode="floorplan"),"undefined"!=typeof i[n].value.endquaternion&&(i[n].value.eQua={},i[n].value.eQua._x=i[n].value.endquaternion[0],i[n].value.eQua._y=i[n].value.endquaternion[1],i[n].value.eQua._z=i[n].value.endquaternion[2],i[n].value.eQua._w=i[n].value.endquaternion[3],delete i[n].value.endquaternion),"undefined"!=typeof i[n].value.endposition&&(i[n].value.ePos={},Array.isArray(i[n].value.endposition)?(i[n].value.ePos.x=i[n].value.endposition[0],i[n].value.ePos.y=i[n].value.endposition[1],i[n].value.ePos.z=i[n].value.endposition[2]):i[n].value.ePos=new THREE.Vector3(i[n].value.endposition.x,i[n].value.endposition.y,i[n].value.endposition.z),delete i[n].value.endposition),i[n].value.qua&&Array.isArray(i[n].value.qua)&&(o=i[n].value.qua[0],a=i[n].value.qua[1],r=i[n].value.qua[2],s=i[n].value.qua[3],i[n].value.qua={},i[n].value.qua._x=o,i[n].value.qua._y=a,i[n].value.qua._z=r,i[n].value.qua._w=s),i[n].value.pos&&Array.isArray(i[n].value.pos)&&(l=i[n].value.pos[0],c=i[n].value.pos[1],u=i[n].value.pos[2],i[n].value.pos={},i[n].value.pos.x=l,i[n].value.pos.y=c,i[n].value.pos.z=u),"undefined"!=typeof i[n].value.startTime&&"undefined"===typeof i[n].value.sTime&&(i[n].value.sTime=i[n].value.startTime,delete i[n].value.startTime),i[n].value.endtarget&&"undefined"===typeof i[n].value.eTarget&&(i[n].value.eTarget=new THREE.Vector3(i[n].value.endtarget.x,i[n].value.endtarget.y,i[n].value.endtarget.z),delete i[n].value.endtarget),i[n].value.starttarget&&"undefined"===typeof i[n].value.target&&(i[n].value.target=new THREE.Vector3(i[n].value.starttarget.x,i[n].value.starttarget.y,i[n].value.starttarget.z),delete i[n].value.starttarget),"undefined"!=typeof i[n].value.startZoom&&"undefined"===typeof i[n].value.zoom&&(i[n].value.zoom=i[n].value.startZoom,delete i[n].value.startZoom),"undefined"!=typeof i[n].value.endZoom&&"undefined"===typeof i[n].value.eZoom&&(i[n].value.eZoom=i[n].value.endZoom,delete i[n].value.endZoom);m["store"].commit("guide/LoadPlays",i);case 8:if(!t.screencapThumb||!x["a"].isEdit){e.next=13;break}return e.next=11,Ie["a"].getJson(x["a"].urls.getGuide(t.screencapThumb));case 11:d=e.sent,m["store"].commit("guide/LoadThumbs",d);case 13:e.next=19;break;case 15:e.prev=15,e.t0=e["catch"](0),O["a"].info("加载导览失败,视作无导览"),O["a"].error(e.t0);case 19:case"end":return e.stop()}}),e,null,[[0,15]])})))),Object(p["a"])(Object(s["a"])(e),"loadLink",Object(n["a"])(regeneratorRuntime.mark((function e(){var t,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(e.prev=0,t=m["store"].getters["scene/metadata"],!t.jumpScene){e.next=9;break}return e.next=5,Ie["a"].getJson(x["a"].urls.getData("link-scene.json"));case 5:i=e.sent,m["store"].commit("link/Load",i),e.next=10;break;case 9:m["store"].commit("link/Load",null);case 10:e.next=16;break;case 12:e.prev=12,e.t0=e["catch"](0),O["a"].info("加载导览失败,视作无导览"),O["a"].error(e.t0);case 16:case"end":return e.stop()}}),e,null,[[0,12]])})))),e.quickstart=!1,e}return i}(m["default"]),Bt=i("9af0"),Ut=(i("4917"),i("5fda")),Wt=(i("ac4d"),i("8a81"),i("1c4c"),i("5df3"),i("f400"),{CanPlay:"panovideo.canplay",StartPlay:"panovideo.start",Resume:"panovideo.resume",Pause:"panovideo.pause",Stop:"panovideo.stop",Switch:"panovideo.switch"}),qt=Wt;function Gt(e,t){var i;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(i=Qt(e))||t&&e&&"number"===typeof e.length){i&&(e=i);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,s=!1;return{s:function(){i=e[Symbol.iterator]()},n:function(){var e=i.next();return r=e.done,e},e:function(e){s=!0,a=e},f:function(){try{r||null==i.return||i.return()}finally{if(s)throw a}}}}function Qt(e,t){if(e){if("string"===typeof e)return Yt(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Yt(e,t):void 0}}function Yt(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function Xt(e){var t=Zt();return function(){var i,n=Object(h["a"])(e);if(t){var o=Object(h["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(u["a"])(this,i)}}function Zt(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var Jt=function(e){Object(c["a"])(i,e);var t=Xt(i);function i(e,n){var a;return Object(o["a"])(this,i),a=t.call(this),a.domElement=e,a.os="",a.environment="",a._resource=new Map,n.forEach((function(e,t){var i=a._createVideoElement(e.mp4.url,"shipin"==x["a"].appenv&&0==a._resource.size);a._resource.set(t,{url:e.mp4.url,video:i,texture:a._createTexture(i),loaded:!0})})),a.video=null,a.texture=new Ut["VideoTexture"],a.texture.minFilter=Ut["LinearFilter"],a.isFirstPlay=!0,a.isMuted=!0,a}return Object(r["a"])(i,[{key:"_createTexture",value:function(e){var t=new Ut["VideoTexture"](e);return t.minFilter=Ut["LinearFilter"],t.uploaded=!1,t}},{key:"_createVideoElement",value:function(e){var t,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"shipin"==x["a"].appenv&&i?(t=parent.document.querySelector("#video-"+x["a"].projectNum),t._isPrepload=!0):(t=document.createElement("video"),t.setAttribute("crossOrigin","anonymous"),t.setAttribute("playsinline","true"),t.setAttribute("x5-playsinline","true"),t.setAttribute("webkit-playsinline","true"),t.setAttribute("x5-video-player-type","h5"),t.setAttribute("controls","true"),t.autoplay=!1,t.muted=this.isMuted,t.loop=!0,t.src=e,t.style.position="fixed",t.style.left="0",t.style.top="0",t.style.zIndex="1000",t.style.width="300px",t.style.height="300px",t.style.display=me["a"].urlHasValue("debug")?"block":"none",this.domElement.appendChild(t)),t}},{key:"_onCanPlay",value:function(){this.emit(qt.CanPlay)}},{key:"_onPlaying",value:function(){var e=this;this.emit(qt.Switch,this.texture),this.video.ontimeupdate=function(t){e.video.currentTime>.5&&(e.emit(qt.Resume),e.video.ontimeupdate=null,e.isFirstPlay=!1)},this.isFirstPlay&&this.emit(qt.StartPlay)}},{key:"_onPause",value:function(e){this.video&&(this.video._isPaused=!0),this.emit(qt.Pause)}},{key:"preload",value:function(e){var t=this;if(e!=this.video&&!e._isPrepload){e.muted=!0;try{top.WeixinJSBridge&&top.WeixinJSBridge.invoke("getNetworkType",{},(function(t){e.play()}),!1)}catch(i){e.play()}e.onplaying=function(){e.pause(),e._isPrepload=!0,t.video&&!t.video._isPaused&&t.video.play()}}}},{key:"preloadAll",value:function(){this.video&&(this.video._isPaused=this.video.paused);var e,t=Gt(this._resource.values());try{for(t.s();!(e=t.n()).done;){var i=e.value;this.preload(i.video)}}catch(n){t.e(n)}finally{t.f()}}},{key:"preloadPano",value:function(e){var t=this._resource.get(e.id);t&&this.preload(t.video)}},{key:"startVideo",value:function(e){var t=this._resource.get(e);t&&(t.video.autoplay=!0,t.video.onplaying=this._onPlaying.bind(this),t.video.onpause=this._onPause.bind(this),t.video.oncanplay=this._onCanPlay.bind(this),this.video=t.video,this.texture=t.texture,this.video.paused?this.play(this.video):this._onPlaying())}},{key:"pauseVideo",value:function(e){var t=this._resource.get(e);t&&(t.video.pause(),t.video.muted=!0,t.video.onplaying=null)}},{key:"play",value:function(e){if(this.isFirstPlay||!e._isCanplay)if(me["a"].detectWeixin())try{top.WeixinJSBridge&&top.WeixinJSBridge.invoke("getNetworkType",{},(function(t){e.play(),e._isCanplay=!0}),!1)}catch(t){e.play(),e._isCanplay=!0}else e.play(),e._isCanplay=!0,me["a"].detectAndroidMobile()?this.domElement.addEventListener("touchend",this.onDomElementTouchEnd.bind(this)):me["a"].detectIOS()?this.domElement.addEventListener("touchstart",this.onDomElementTouchStart.bind(this)):this.domElement.addEventListener("mousedown",this.onDomElementMouseDown.bind(this));else e.play()}},{key:"pause",value:function(){this.video&&(this.video._isPaused=!0,this.video.pause())}},{key:"resume",value:function(){this.video?(this.play(this.video),this.video.onplaying=this._onPlaying.bind(this)):console.warn("PanoVideoRenderer: 没有可播放的视频")}},{key:"setMuted",value:function(e){var t,i=Gt(this._resource.values());try{for(i.s();!(t=i.n()).done;){var n=t.value;n.video.muted=e}}catch(o){i.e(o)}finally{i.f()}this.isMuted=e}},{key:"onDomElementTouchStart",value:function(){this.isMuted||(this.video.muted=!1,this.domElement.removeEventListener("touchstart",this.onDomElementTouchStart))}},{key:"onDomElementTouchEnd",value:function(){this.isMuted||(this.video.muted=!1,this.domElement.removeEventListener("touchend",this.onDomElementTouchEnd))}},{key:"onDomElementMouseDown",value:function(){this.isMuted||(this.video.muted=!1,this.domElement.removeEventListener("mousedown",this.onDomElementMouseDown))}}]),i}(EventEmitter);function $t(e,t){var i;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(i=Kt(e))||t&&e&&"number"===typeof e.length){i&&(e=i);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,s=!1;return{s:function(){i=e[Symbol.iterator]()},n:function(){var e=i.next();return r=e.done,e},e:function(e){s=!0,a=e},f:function(){try{r||null==i.return||i.return()}finally{if(s)throw a}}}}function Kt(e,t){if(e){if("string"===typeof e)return ei(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?ei(e,t):void 0}}function ei(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function ti(e){var t=ii();return function(){var i,n=Object(h["a"])(e);if(t){var o=Object(h["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(u["a"])(this,i)}}function ii(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var ni=function(e){Object(c["a"])(i,e);var t=ti(i);function i(e,n){var a;return Object(o["a"])(this,i),a=t.call(this),a.domElement=e,a.instances=new Map,n.forEach((function(e,t){"shipin"==x["a"].appenv&&a.instances.size>0||a.instances.set(t,a._createVideo(e.flv.url))})),a.video=null,a.texture=new Ut["VideoTexture"],a.texture.minFilter=Ut["LinearFilter"],a.isFirstPlay=!0,a.isMuted=!0,a}return Object(r["a"])(i,[{key:"_createVideo",value:function(e){var t=document.createElement("video");t.setAttribute("crossOrigin","anonymous"),t.setAttribute("playsinline","true"),t.setAttribute("webkit-playsinline","true"),t.setAttribute("controls","true"),t.autoplay=!1,t.muted=!0,t.loop=!0,t.style.position="fixed",t.style.left="0",t.style.top="0",t.style.zIndex="1000",t.style.width="200px",t.style.display=me["a"].urlHasValue("debug")?"block":"none",this.domElement.appendChild(t);var i=flvjs.createPlayer({type:"flv",url:e},{lazyLoad:!0,lazyLoadMaxDuration:5});return i.videoElement=t,i.attachMediaElement(t),i.on(flvjs.Events.ERROR,this._onPlayerError.bind(this)),i}},{key:"_onPlayerError",value:function(e){console.warn("球幕视频资源加载错误:",e)}},{key:"_onPlaying",value:function(){var e=this;this.emit(qt.Switch,this.texture),this.video.ontimeupdate=function(t){e.video.currentTime>.2&&(e.emit(qt.Resume),e.isFirstPlay&&e.emit(qt.StartPlay),e.isFirstPlay=!1,e.video.ontimeupdate=null)}}},{key:"_onPause",value:function(){this.emit(qt.Pause),this.state=0}},{key:"preloadPano",value:function(e){var t=this.instances.get(e.id);t&&0==t.buffered.length&&t.load()}},{key:"startVideo",value:function(e){var t=this.instances.get(e);t&&(0==t.buffered.length&&t.load(),this.video=t.videoElement,this.video.onplaying=this._onPlaying.bind(this),this.video.onpause=this._onPause.bind(this),this.texture.image=this.video,this.video.paused?this.play(this.video):this._onPlaying())}},{key:"pauseVideo",value:function(e){var t=this.instances.get(e);t&&(t.videoElement.pause(),t.videoElement.onplaying=null)}},{key:"play",value:function(e){this.isFirstPlay?(e.play(),me["a"].detectAndroidMobile()?this.domElement.addEventListener("touchend",this.onDomElementTouchEnd.bind(this)):me["a"].detectIOS()?this.domElement.addEventListener("touchstart",this.onDomElementTouchStart.bind(this)):this.domElement.addEventListener("mousedown",this.onDomElementMouseDown.bind(this))):e.play()}},{key:"pause",value:function(){this.video&&this.video.pause()}},{key:"resume",value:function(){this.video?this.play(this.video):console.warn("FlvVideoPlayer: 没有可播放的视频")}},{key:"setMuted",value:function(e){var t,i=$t(this.instances.values());try{for(i.s();!(t=i.n()).done;){var n=t.value;n.videoElement.muted=e}}catch(o){i.e(o)}finally{i.f()}this.isMuted=e}},{key:"onDomElementTouchStart",value:function(){this.setMuted(!1),this.domElement.removeEventListener("touchstart",this.onDomElementTouchStart)}},{key:"onDomElementTouchEnd",value:function(){this.setMuted(!1),this.domElement.removeEventListener("touchstart",this.onDomElementTouchEnd)}},{key:"onDomElementMouseDown",value:function(){this.setMuted(!1),this.domElement.removeEventListener("mousedown",this.onDomElementMouseDown)}}]),i}(EventEmitter),oi=(i("c5f6"),i("b23e"),i("c7b2")),ai={version:1,upPath:"",videoPath:x["a"].getPublicResource("video/video#m#/"),videoInfos:new Map,parameters:{inputWidth:0,inputHeight:0,outputWidth:0,outputHeight:0,focal:0,pixel:0,centerX:0,centerY:0,translateX:0,translateY:0,translateZ:0,lenOffsetX:0,lenOffsetY:0,videoWidth:0,videoHeight:0,mapping:0,cameraType:0,blend_fov:5}};function ri(e){var t="";if("undefined"!=typeof e.imagesVersion&&(t="?imagesVersion="+e.imagesVersion),!e.videos)return e.videos={version:ai.version,videos:ai.videoInfos,parameters:ai.parameters},void di(ai,e["videosUser"],t);try{var i=JSON.parse(e.videos);if(!i.data||!i.data.length)return e.videos={version:ai.version,videos:ai.videoInfos,parameters:ai.parameters},void di(ai,e["videosUser"],t)}catch(h){console.error(h)}var n=e.sceneSource||1;if(1==n){var o=JSON.parse(e.videos),a=o.version||0;return ai.version=a,ai.parameters.cameraType=8,1==a?o.data.forEach((function(e){ai.videoInfos.set(e.id,{mp4:{url:ai.videoPath+e.id+".mp4"+t},mpeg:{url:ai.videoPath+e.id+".ts",size:e.tsSize+t},flv:{url:ai.videoPath+e.id+".flv"+t},exposure:Number(e.value)||1,mapping:1,cameraType:8,blend_fov:e.blend_fov||5})})):a>1&&o.data.forEach((function(e){ai.videoInfos.set(e.id,{mp4:{url:ai.videoPath+e.id+".mp4"+t},mpeg:{url:ai.videoPath+e.id+".ts"+t,size:e.tsSize},flv:{url:ai.videoPath+e.id+".flv"+t},exposure:Number(e.value)||1,mapping:1,cameraType:8,blend_fov:e.blend_fov||5})})),li(o.upPath).then((function(i){return a<=2?(i.parameters.inputWidth=2304,i.parameters.inputHeight=1728,i.parameters.outputWidth=2048,i.parameters.outputHeight=1024):a>2&&(i.parameters.inputWidth=4608,i.parameters.inputHeight=3456,i.parameters.outputWidth=8192,i.parameters.outputHeight=4096,i.parameters.lenOffsetX=1235,i.parameters.lenOffsetY=954,i.parameters.videoWidth=2112,i.parameters.videoHeight=1584,i.parameters.mapping=1),e.videos={version:i.version,videos:i.videoInfos,parameters:i.parameters},di(i,e["videosUser"],t),i})).catch((function(e){throw e}))}if(2==n){var r=JSON.parse(e.videos),s=r.version||0;ai.version=s,ai.parameters.cameraType=2;var l="";return"undefined"!=typeof e.imagesVersion&&(l="?imagesVersion="+e.imagesVersion),1==s&&r.data.forEach((function(e){ai.videoInfos.set(e.id,{mp4:{url:ai.videoPath+e.id+".mp4"+l},mpeg:{url:ai.videoPath+e.id+".ts",size:e.tsSize+l},flv:{url:ai.videoPath+e.id+".flv"+l},exposure:Number(e.value)||1,mapping:1,cameraType:2,blend_fov:e.blend_fov||5})})),ci(r.upPath).then((function(t){return 1==s&&(t.parameters.inputWidth=3e3,t.parameters.inputHeight=3e3,t.parameters.outputWidth=4096,t.parameters.outputHeight=2048,t.parameters.pixel=1.12),e.videos={version:t.version,videos:t.videoInfos,parameters:t.parameters},t})).catch((function(e){throw e}))}if(3==n){var c=JSON.parse(e.videos),u=c.version||0;ai.version=u,ai.parameters.cameraType=3;var d="";return"undefined"!=typeof e.imagesVersion&&(d="?imagesVersion="+e.imagesVersion),c.data.forEach((function(e){ai.videoInfos.set(e.id,{mp4:{url:ai.videoPath+e.id+".mp4"+d},mpeg:{url:ai.videoPath+e.id+".ts",size:e.tsSize+d},flv:{url:ai.videoPath+e.id+".flv"+d},exposure:Number(e.value)||1,mapping:1,cameraType:3,blend_fov:e.blend_fov||5})})),ui(c.upPath).then((function(t){return t.parameters.inputWidth=5472,t.parameters.inputHeight=3648,t.parameters.outputWidth=4096,t.parameters.outputHeight=2048,t.parameters.lenOffsetX=920,t.parameters.lenOffsetY=500,t.parameters.videoWidth=3630,t.parameters.videoHeight=2670,t.parameters.pixel=1.12,e.videos={version:t.version,videos:t.videoInfos,parameters:t.parameters},t})).catch((function(e){throw e}))}}var si=null;function li(e){return si||(si=new Promise((function(t,i){e||i("找不到参数请求地址"),Ie["a"].getText(e,null,(function(e){t(e)}),(function(e){i(e)}))})).then((function(e){var t=e.split(/\n/).filter((function(e){return""!=e.trim()})).map((function(e){return e.split(":")})),i=Number(t[0][1]),n=Number(t[1][1]),o=t[2][1].trim().split(/\s+/).map((function(e){return Number(e)})),a=t[7][0].trim().split(/\s+/).map((function(e){return Number(e)}))[3],r=t[8][0].trim().split(/\s+/).map((function(e){return Number(e)}))[3],s=t[9][0].trim().split(/\s+/).map((function(e){return Number(e)}))[3];return ai.parameters.focal=i,ai.parameters.pixel=n,ai.parameters.centerX=o[0],ai.parameters.centerY=o[1],ai.parameters.translateX=a,ai.parameters.translateY=r,ai.parameters.translateZ=s,ai})).catch((function(e){return console.warn("球幕视频【八目】:参数文件加载失败"),ai})).finally((function(){return ai})),si)}function ci(e){return si||(si=new Promise((function(t,i){e||i("找不到参数请求地址"),Ie["a"].getText(e,null,(function(e){t(e)}),(function(e){i(e)}))})).then((function(e){var t={};return e.split("\n").map((function(e){if(e.length>0){var i=e.split(":"),n=i[0],o=i[1].trim().split(" ");t[n]=Number(o[0])}})),ai.parameters.focal=t["focal"],ai.parameters.centerX=t["cx"],ai.parameters.centerY=t["cy"],ai.parameters.translateX=t["tx"],ai.parameters.translateY=t["ty"],ai.parameters.translateZ=t["tz"],ai})).catch((function(e){return console.warn("球幕视频【双目】:参数文件加载失败"),ai})).finally((function(){return ai})),si)}function ui(e){return e=e.replace("Uptxt","Up.txt"),si||(si=new Promise((function(t,i){e||i("找不到参数请求地址"),Ie["a"].getText(e,null,(function(e){t(e)}),(function(e){i(e)}))})).then((function(e){var t={};return e.split("\n").map((function(e){if(e.length>0){var i=e.split(":"),n=i[0],o=i[1].trim().split(" ");t[n]=Number(o[0])}})),ai.parameters.focal=t["focal"],ai.parameters.centerX=t["cx"],ai.parameters.centerY=t["cy"],ai.parameters.translateX=t["tx"],ai.parameters.translateY=t["ty"],ai.parameters.translateZ=t["tz"],ai})).catch((function(e){return console.warn("球幕视频【转台】:参数文件加载失败"),ai})).finally((function(){return ai})),si)}function di(e,t,i){if(!x["a"].isEdit&&t){var n=t;n.forEach((function(t){e.videoInfos.set(t.panoId,{dir:(new THREE.Vector3).copy(t.dir),hfov:parseFloat(t.hfov),vfov:parseFloat(t.vfov),mp4:{url:e.videoPath+t.panoId+"-user.mp4"+i},mpeg:{url:e.videoPath+t.panoId+"-user.ts",size:t.tsSize+i},flv:{url:e.videoPath+t.panoId+"-user.flv"+i},exposure:1,clipRect:t.rect,mapping:2})})),e.parameters.mapping=2,e.parameters.cameraType=8}}function hi(){var e="PC",t="H5";return At["a"].detectAndroidMobile()?e="Android":At["a"].detectIOS()&&(e="Ios"),At["a"].detectWeixin()&&(t="WeChat",navigator.userAgent.match("miniProgram")&&(t="WeChatMiniprogram")),{os:e,environment:t}}var pi={handle:ri,getEnvironment:hi},fi={ParamsUpdated:"panorama.videorenderer.paramsupdated",SuspendRender:"panorama.videorenderer.suspendrender",ResumeRender:"panorama.videorenderer.resumerender",TextureUpdate:"panorama.videorenderer.textured",CanPlayVideo:"panorama.videorenderer.canplayvideo",StartPlayVideo:"panorama.videorenderer.startvideo"},mi=fi,vi={Pause:0,Playing:1},gi=vi,yi=function(){},bi=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(o["a"])(this,e),this.onRecording=t.onRecording||yi,this.onRecordend=t.onRecordend||yi,this.onPause=t.onPause||yi,this.onFailed=t.onFailed||yi,this.isPause=!1,this.isRecording=!1,this.isSupport=e.support(),this.volume=0,this.chunks=[],this._options={audio:!0}}return Object(r["a"])(e,[{key:"test",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.isSupport){e.next=2;break}return e.abrupt("return",Promise.reject("WEB_UNSUPPORT"));case 2:return e.prev=2,e.next=5,navigator.mediaDevices.getUserMedia(this._options).then((function(e){e.getTracks().forEach((function(e){return e.stop()}))}));case 5:e.next=10;break;case 7:return e.prev=7,e.t0=e["catch"](2),e.abrupt("return",Promise.reject(this._errMsg(e.t0)));case 10:case"end":return e.stop()}}),e,this,[[2,7]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"start",value:function(){var e=this;this.isSupport?navigator.mediaDevices.getUserMedia(this._options).then(this._record.bind(this)).catch((function(t){return e.failed(e._errMsg(t))})):this.failed&&this.failed({type:"WEB_UNSUPPORT"})}},{key:"stop",value:function(){this.recorder&&(this.isPause=!1,this.isRecording=!1,this.recorder.stop(),this.recorder.stream.getTracks()[0].stop())}},{key:"pause",value:function(){this.stop()}},{key:"cancel",value:function(){this.stop()}},{key:"_record",value:function(e){var t=this;this.chunks=[],this.recorder=new MediaRecorder(e),this.recorder.ondataavailable=function(e){e.data.size>0&&t.chunks.push(e.data)},this.recorder.onstop=function(){t.onRecordend({blob:new Blob(t.chunks)})},this.recorder.onstart=function(){t.isRecording=!0,t.isPause=!1,t.onRecording()},this.recorder.start()}},{key:"_errMsg",value:function(e){var t="WEB_UNKOWN_ERROR";return"Requested device not found"===e?t="WEB_REQUESTED_DEVICE_NOT_FOUND":"Permission denied"===e&&(t="WEB_PERMISSION_DENIED"),t}}]),e}();bi.support=function(){if(/Edge|UBrowser/.test(window.navigator.userAgent))return!1;var e=window.AudioContext;if(e||(e=window.webkitAudioContext),!e)return!1;var t=navigator.mediaDevices||{};return t.getUserMedia||(t=navigator,t.getUserMedia||(t.getUserMedia=t.webkitGetUserMedia||t.mozGetUserMedia||t.msGetUserMedia)),!!t.getUserMedia};var wi=bi,Ei=i("f708"),Ti=function(){},Pi=function(){function e(){var t=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(o["a"])(this,e),this.onRecording=i.onRecording||Ti,this.onRecordend=i.onRecordend||Ti,this.onUploaded=i.onUploaded||Ti,this.onFailed=i.onFailed||Ti,le["a"].on("app-appSoundSaved",(function(e){t.onUploaded({msg:e,type:"APP_RECORD_UPLOADED"})})),le["a"].on("app-appSoundFailed",(function(e){t.onFailed({msg:e,type:"APP_RECORD_UPLOADED_ERROR"})}))}return Object(r["a"])(e,[{key:"test",value:function(){return Promise.resolve()}},{key:"start",value:function(){Object(Ei["c"])("RecordStart"),this.onRecording({type:"APP_RECORDING"})}},{key:"stop",value:function(){Object(Ei["c"])("RecordEnd"),this.onRecordend({type:"APP_RECORDEND"})}},{key:"cancel",value:function(){Object(Ei["c"])("RecordCancel")}},{key:"upload",value:function(){Object(Ei["c"])("RecordUpload")}}]),e}(),xi=Pi,ki={localId:"",serverId:"",reset:function(){this.localId="",this.serverId=""}},Ri=function(){},_i=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(o["a"])(this,e),this.onRecording=t.onRecording||Ri,this.onRecordend=t.onRecordend||Ri,this.onUploaded=t.onUploaded||Ri,this.onFailed=t.onFailed||Ri,this.isRecording=!1,$.ajax({url:"https://www.4dage.com/wechat/jssdk/share/",type:"post",data:{uri:location.href.split("#")[0],name:"厦门四维时代微信公众号"},dataType:"jsonp",success:function(t,i){var n=this;wx.config({debug:!1,appId:t.appId,timestamp:t.timestamp,nonceStr:t.nonceStr,signature:t.signature,jsApiList:["checkJsApi","onMenuShareTimeline","onMenuShareAppMessage","onMenuShareQQ","onMenuShareWeibo","hideMenuItems","showMenuItems","hideAllNonBaseMenuItem","showAllNonBaseMenuItem","translateVoice","startRecord","stopRecord","onRecordEnd","playVoice","pauseVoice","stopVoice","uploadVoice","downloadVoice","chooseImage","previewImage","uploadImage","downloadImage","getNetworkType","openLocation","getLocation","hideOptionMenu","showOptionMenu","closeWindow","scanQRCode","chooseWXPay","openProductSpecificView","addCard","chooseCard","openCard"]}),wx.error((function(t){t.errMsg&&t.errMsg.indexOf("config:fail"),e.isSupport=!1})),wx.ready((function(){wx.onVoiceRecordEnd({complete:function(e){ki.localId=e.localId,n.onRecordend({type:"WX_RECORDED",data:e})}})}))},error:function(e,t,i){console.log("jsonp.error:"+t)}})}return Object(r["a"])(e,[{key:"test",value:function(){var t=Object(n["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",e.support());case 1:case"end":return t.stop()}}),t)})));function i(){return t.apply(this,arguments)}return i}()},{key:"start",value:function(){var e=this;ki.reset(),wx.startRecord({success:function(t){e.isRecording=!0,e.onRecording({type:"WX_RECORDING",data:t})},fail:function(t){return e.onFailed({type:"WX_RECORD_START_ERROR",data:t})}})}},{key:"stop",value:function(){var e=this;wx.stopRecord({success:function(t){ki.localId=t.localId,e.isRecording=!1,e.onRecordend({type:"WX_RECORDEND",data:t})},fail:function(t){return e.onFailed({type:"WX_RECORD_STOP_ERROR",data:t})}})}},{key:"cancel",value:function(){this.isRecording&&(this.isRecording=!1,wx.stopRecord())}},{key:"upload",value:function(){var e=this;if(""===ki.localId)return console.log("上传失败,localId为空"),this.onFailed({type:"WX_RECORD_UPLOADED_ERROR",data:ki});wx.uploadVoice({localId:ki.localId,success:function(t){ki.serverId=ki.serverId,e.onUploaded({type:"WX_RECORD_UPLOADED",data:t})},fail:function(t){return e.onFailed({type:"WX_RECORD_UPLOADED_ERROR",data:t})}})}}]),e}();_i.isSupport=!0,_i.support=function(){return ki.reset(),new Promise((function(e,t){_i.isSupport?wx.startRecord({success:function(){setTimeout((function(){wx.stopRecord({success:function(){setTimeout((function(){e()}),300)},fail:function(e){t({type:"WX_RECORD_STOP_ERROR",data:e})}})}),800)},fail:function(e){t({type:"WX_RECORD_START_ERROR",data:e})}}):t({type:"WX_CONFIG_ERROR"})}))};var Si=_i;function Mi(e){var t=Ai();return function(){var i,n=Object(h["a"])(e);if(t){var o=Object(h["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(u["a"])(this,i)}}function Ai(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var Oi=new(function(e){Object(c["a"])(i,e);var t=Mi(i);function i(){var e;Object(o["a"])(this,i),e=t.call(this);var n={onRecording:function(){return e.emit("start")},onRecordend:function(t){return e.emit("stop",t)},onUploaded:function(t){return e.emit("uploaded",t)},onPause:function(){return e.emit("pause")},onFailed:function(t){return e.emit("error",t)}};return Ei["a"]?(e._recorder=new xi(n),e.type="App"):Ei["b"]?(e._recorder=new Si(n),e.type="Wechat"):(n.bitRate=128,n.sampleRate=44100,n.format="wav",e._recorder=new wi(n),e.type="H5"),e}return Object(r["a"])(i,[{key:"test",value:function(){return this._recorder.test()}},{key:"start",value:function(){this._recorder.start()}},{key:"pause",value:function(){this._recorder.pause()}},{key:"stop",value:function(){this._recorder.stop()}},{key:"cancel",value:function(){this._recorder.cancel&&this._recorder.cancel()}},{key:"upload",value:function(){this._recorder.upload&&this._recorder.upload()}},{key:"removeListeners",value:function(){this._events={}}}]),i}(EventEmitter));function Ci(e){var t=Di();return function(){var i,n=Object(h["a"])(e);if(t){var o=Object(h["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(u["a"])(this,i)}}function Di(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var Vi=function(e){Object(c["a"])(i,e);var t=Ci(i);function i(){var e;Object(o["a"])(this,i),e=t.call(this),window.panoVideoRenderer=Object(s["a"])(e),e.version=1,e.videoPlayer=null,e.activePanorama=null,e.nearestPano=null,e.ready=!1,e._state=gi.Pause,e.texture=null,e.isGuiding=!1,e.isRecording=!1,e.isSoundRecording=!1,e.loadingAnimEnable=!0,e.loadingTimeStamp=0,e.loadingUITimer=0,e.loadingUIAnimHandler=0;var n=Ut["UniformsUtils"].clone(y["a"].videoLoading.uniforms);return n["uColor"].value=new Ut["Vector4"](0,.7843137254901961,.6862745098039216,.7),e.loadingUI=new Ut["Mesh"](new Ut["PlaneBufferGeometry"](.4,.4),new Ut["RawShaderMaterial"]({uniforms:n,vertexShader:y["a"].videoLoading.vertexShader,fragmentShader:y["a"].videoLoading.fragmentShader,transparent:!0})),e.loadingUI.visible=!1,e}return Object(r["a"])(i,[{key:"init",value:function(e,t,i){var n=this;if("decor"!=x["a"].name){var o=i.videos;o?(this.version=o.version,this.initVideoPlayer(e,this.version,o.videos),oi["play"].on("guide/play/start",(function(e){n.isGuiding=!0,n.setMuted(!0)})),oi["play"].on("guide/play/pause",(function(e){n.isGuiding=!1,n.setMuted(!1)})),oi["play"].on("guide/play/stop",(function(e){n.isGuiding=!1,n.setMuted(!1)})),oi["record"].on("guide/record/pause",(function(){n.isRecording=!1,n.setMuted(!1)})),oi["record"].on("guide/record/start",(function(){n.isRecording=!0,n.setMuted(!0)})),Oi.on("start",(function(){n.isSoundRecording=!0,n.setMuted(!0)})),Oi.on("stop",(function(){n.isSoundRecording=!1,n.setMuted(!1)})),Oi.on("pause",(function(){n.isSoundRecording=!1,n.setMuted(!1)})),this.ready=!0,(me["a"].detectIE()||navigator.userAgent.match("JSN-AL00"))&&(this.ready=!1,console.warn("浏览器不支持球幕视频")),t.scene.add(this.loadingUI)):this.logger.warn("PanoVideoRenderer初始化失败,数据为空")}}},{key:"initVideoPlayer",value:function(e,t,i){var n=pi.getEnvironment(),o=n.os,a=n.environment;this.videoPlayer="Android"==o&&"WeChat"==a?new ni(e,i):new Jt(e,i),this.videoPlayer.on(qt.CanPlay,this.onVideoCanPlay.bind(this)),this.videoPlayer.on(qt.StartPlay,this.onVideoStartPlay.bind(this)),this.videoPlayer.on(qt.Switch,this.onVideoSwitch.bind(this)),this.videoPlayer.on(qt.Resume,this.onVideoResume.bind(this)),this.videoPlayer.on(qt.Pause,this.onVideoPause.bind(this)),this.videoPlayer.on(qt.Stop,this.onVideoStop.bind(this))}},{key:"activatePanorama",value:function(e){var t=this;"decor"!=x["a"].name&&e.hasVideo&&this.ready&&(this.activePanorama=e,this.started=!0,this.videoPlayer.startVideo(e.id),this.loadingUITimer=setTimeout((function(){t.showLoading(e),window.clearTimeout(t.loadingUITimer)}),500),x["a"].isEdit||window._hmt&&_hmt.push(["_trackPageview","".concat(location.pathname,"?m=").concat(x["a"].projectNum,"&type=event&name=show_video")]))}},{key:"deactivePanorama",value:function(e){"decor"!=x["a"].name&&(null!=e&&null!=e.id&&this.videoPlayer.pauseVideo(e.id),this.activePanorama=null)}},{key:"getActivePanorama",value:function(){return this.activePanorama}},{key:"showLoading",value:function(e){if(this.loadingAnimEnable){var t=(new Ut["Vector3"]).copy(e.position),i=(new Ut["Quaternion"]).setFromAxisAngle(new Ut["Vector3"](0,1,0),Ut["Math"].degToRad(x["a"].supportsTiles?90:180)),n=new Ut["Vector3"](0,0,-1).applyQuaternion(i.multiply(e.quaternion));this.loadingUI.position.copy(t).add(n),this.loadingUI.lookAt(t),this.loadingUI.visible=!0,this.loadingTimeStamp=performance.now(),this.loadingAnimte(0)}}},{key:"hideLoading",value:function(){this.loadingUI.visible=!1,window.cancelAnimationFrame(this.loadingUIAnimHandler),window.clearTimeout(this.loadingUITimer)}},{key:"loadingAnimte",value:function(e){this.loadingUI.material.uniforms["uTime"].value=performance.now()-this.loadingTimeStamp,this.loadingUIAnimHandler=window.requestAnimationFrame(this.loadingAnimte.bind(this))}},{key:"suspend",value:function(){if(!this.ready)return!1;this.videoPlayer.pause(),this.emit(mi.SuspendRender)}},{key:"resume",value:function(){if(!this.ready)return!1;this.videoPlayer.resume()}},{key:"canPhonate",value:function(){return 0==this.isGuiding&&0==this.isRecording&&0==this.isSoundRecording}},{key:"setMuted",value:function(e){this.videoPlayer&&(this.canPhonate()||(e=!0),this.videoPlayer.setMuted(e))}},{key:"getState",value:function(){return this._state}},{key:"onVideoPanoramasEnter",value:function(e,t){}},{key:"onVideoPanoramasExit",value:function(e){}},{key:"onVideoCanPlay",value:function(){this.emit(mi.CanPlayVideo)}},{key:"onVideoStartPlay",value:function(){this.emit(mi.StartPlayVideo)}},{key:"onVideoSwitch",value:function(e){this.texture=e,this.emit(mi.TextureUpdate,e)}},{key:"onVideoResume",value:function(){this._state=gi.Playing,this.emit(mi.ResumeRender),this.hideLoading()}},{key:"onVideoPause",value:function(){this._state=gi.Pause,this.emit(mi.SuspendRender)}},{key:"onVideoStop",value:function(){this._state=gi.Pause,this.emit(mi.SuspendRender)}},{key:"ifEnable",value:function(){return this.ready}}]),i}(m["default"]),Ii=new Vi;i("44a7");function ji(e){var t=Li();return function(){var i,n=Object(h["a"])(e);if(t){var o=Object(h["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(u["a"])(this,i)}}function Li(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}new(function(e){Object(c["a"])(i,e);var t=ji(i);function i(e){var n;return Object(o["a"])(this,i),n=t.call(this),n.container=null,n.fadeInSpeed=e,null!==n.fadeInSpeed&&void 0!==n.fadeInSpeed||(n.fadeInSpeed=0),n.displayController=Object(s["a"])(n),n.panoVideoRenderer=null,n.mode=null,n}return Object(r["a"])(i,[{key:"init",value:function(e){this.container=e,this.panoVideoRenderer=Ii,this.updateModel(),this.bindEvents()}},{key:"setFadeInSpeed",value:function(e){this.fadeInSpeed=e}},{key:"bindEvents",value:function(){this.player.on(L["a"].FlyingStarted,this.handlePlayerFlyingStarted.bind(this)),this.player.on(L["a"].FlyingEnded,this.handlePlayerFlyingEnded.bind(this)),this.player.on(L["a"].ModeChanging,this.handlePlayerModeChanging.bind(this)),this.player.on(L["a"].ModeChanged,this.handlePlayerModeChanged.bind(this)),this.player.on(L["a"].ClosestPanoChanging,this.handleClosestPanoChanging.bind(this)),this.player.on(L["a"].StartInside,this.handleStartInside.bind(this)),this.player.on(L["a"].StartOutside,this.handleStartOutside.bind(this))}},{key:"updateModel",value:function(){this.model=this.modelManager.getActiveModel()}},{key:"handlePlayerFlyingStarted",value:function(e,t,i,n){this.panoVideoRenderer.deactivePanorama(n),this.panoVideoRenderer.setMuted(!0)}},{key:"handlePlayerFlyingEnded",value:function(e,t,i,n){this.panoVideoRenderer.setMuted(!1),i&&this.mode==D["a"].PANORAMA&&this.panoVideoRenderer.activatePanorama(i)}},{key:"handlePlayerModeChanging",value:function(e,t,i){var n,o=this.modelManager.getActiveModel();n=this.player.is360View(t,i)?0:f["a"][t].markerOpacity,["floorplan","dollhouse"].includes(e)&&["floorplan","dollhouse"].includes(t)||o.fadePanoMarkers(n),o.setMode(t)}},{key:"handlePlayerModeChanged",value:function(e,t){var i=this.modelManager.getActiveModel(),n=t===D["a"].PANORAMA?THREE.DoubleSide:THREE.FrontSide;i.setSide(n),i.setMode(t),this.mode=t}},{key:"handleClosestPanoChanging",value:function(e,t,i,n){i!==D["a"].TRANSITIONING&&(e&&(!n||n.seeMarkers.indexOf(e.id)>-1)&&e.hoverOff(i),t&&(!n||n.seeMarkers.indexOf(t.id)>-1)&&t.hoverOn(i))}},{key:"handleStartInside",value:function(e){var t=f["a"][this.player.mode],i=e?0:t.transitionTime*t.skyboxOpacityLength;this.fadeIn(this.fadeInSpeed),this.model.alpha=0,(this.model.skybox.originMat||this.model.skybox.material).uniforms.opacity.value=1,this.model.fadePanoMarkers(null,null,{player:this.player});var n=this.player.reticule;E["a"].start(T["a"].property(n.material,"opacity",0),i,null,0,null,"retReOpac")}},{key:"handleStartOutside",value:function(e){this.fadeIn(e)}},{key:"fadeIn",value:function(e){null!==e&&void 0!==e||(e=2e3,logger.warn("DisplayController.fadeIn -> no transition time specified, defaulting to 2000 ms.")),this.model&&(this.model.chunks.forEach((function(e){return e.visible=!0})),this.model.panos.forEach((function(e){return e.updateMakerStyle()})))}}]),i}(m["default"]));function Fi(e){var t=Hi();return function(){var i,n=Object(h["a"])(e);if(t){var o=Object(h["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(u["a"])(this,i)}}function Hi(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}new(function(e){Object(c["a"])(i,e);var t=Fi(i);function i(e,n,a){var r;return Object(o["a"])(this,i),r=t.call(this),r.maxNavPanoSize=-1,r.maxZoomPanoSize=-1,r.devicePixelDensity=e,r.deviceScreenSize=n,r.clientBandwidth=a,r.panoSizeClassMap={},r.useHighResolutionPanos=!0,r.useUltraHighResolutionPanos=!1,r.modelHasUltraHighPanos=!1,r.qualityManager=Object(s["a"])(r),r.maxRenderTargetSize=m["config"].isMobile?2048:4096,r}return Object(r["a"])(i,[{key:"init",value:function(e,t){"1k"==m["config"].tileClass&&(this.useHighResolutionPanos=!1),this.buildPanoSizeClassMap(this.devicePixelDensity,this.deviceScreenSize,this.clientBandwidth),this.ultraHighSize=this.getPanoSize(X["a"].ULTRAHIGH),this.highSize=this.getPanoSize(X["a"].HIGH),this.standardSize=this.getPanoSize(X["a"].STANDARD),this.baseSize=this.getPanoSize(X["a"].BASE),f["a"].tiling.maxZoomPanoQuality&&this.ultraHighSize<=f["a"].tiling.maxZoomPanoQuality&&(f["a"].tiling.allowUltraHighResolution=!0),this.highQualityThreshold=me["a"].valueFromHash("threshold2k",fe["a"].windowHeightHighQualityThreshold),this.updateMaximums(),e.on(A["a"].ActiveModelChanged,this.onModelChanged.bind(this))}},{key:"updateFromModel",value:function(e){this.updateUltraHighResolutionSettings(e)}},{key:"updateUltraHighResolutionSettings",value:function(e){f["a"].tiling.allowUltraHighResolution&&this.modelHasUltraHighPanos?this.useUltraHighResolutionPanos=!0:this.useUltraHighResolutionPanos=!1,this.updateMaximums()}},{key:"enableUltraHighQualityMode",value:function(){this.modelHasUltraHighPanos=!0,this.updateUltraHighResolutionSettings(null)}},{key:"ultraHighQualityModeEnabled",value:function(){return this.modelHasUltraHighPanos}},{key:"onModelChanged",value:function(e){this.updateFromModel(e.model),this.updateMaximums()}},{key:"updateMaximums",value:function(){this.maxNavPanoSize=f["a"].tiling.maxNavPanoQuality||this.detectMaxNavPanoSize(),this.maxZoomPanoSize=f["a"].tiling.maxZoomPanoQuality||this.detectMaxZoomPanoSize(),this.maxZoomPanoSize<this.maxNavPanoSize&&(this.maxNavPanoSize=this.maxZoomPanoSize)}},{key:"buildPanoSizeClassMap",value:function(){this.panoSizeClassMap[X["a"].BASE]=512,this.panoSizeClassMap[X["a"].STANDARD]=1024,this.panoSizeClassMap[X["a"].HIGH]=2048,this.panoSizeClassMap[X["a"].ULTRAHIGH]=4096}},{key:"getPanoSize",value:function(e){return this.panoSizeClassMap[e]}},{key:"getMaxPossiblePanoSize",value:function(){return this.getPanoSize(X["a"].ULTRAHIGH)}},{key:"getMaxPanoSize",value:function(){return this.maxZoomPanoSize}},{key:"getMaxNavPanoSize",value:function(){return this.maxNavPanoSize}},{key:"getMaxZoomPanoSize",value:function(){return this.maxZoomPanoSize}},{key:"detectMaxNavPanoSizeClass",value:function(){switch(m["config"].navTileClass){case"1k":return X["a"].STANDARD;case"2k":default:return X["a"].HIGH}}},{key:"detectMaxNavPanoSize",value:function(){var e=this.detectMaxNavPanoSizeClass();return this.getPanoSize(e)}},{key:"detectMaxZoomPanoSize",value:function(){return this.zoomLevelResolution?"4k"==this.zoomLevelResolution&&this.useUltraHighResolutionPanos?this.getPanoSize(X["a"].ULTRAHIGH):"1k"!=this.zoomLevelResolution&&this.useHighResolutionPanos?this.getPanoSize(X["a"].HIGH):this.getPanoSize(X["a"].STANDARD):this.useHighResolutionPanos?this.useUltraHighResolutionPanos?this.getPanoSize(X["a"].ULTRAHIGH):this.getPanoSize(X["a"].HIGH):this.getPanoSize(X["a"].STANDARD)}}]),i}(m["default"]));var zi=function(){function e(t,i,n,a,r,s,l){Object(o["a"])(this,e),this.app=l,this.locked=!1,this.qualityManager=t,this.scene=i,this.camera=n,this.controls=a,this.quickStartcamera=a.camera,this.dom=r,this.view=null,this.panoVideoRenderer=s,this.unlockDom=null,this.unlockHanlde=null,this.loadPromise=null,this.ready=!1,this.touchStartPosition=new THREE.Vector2(0,0),this.touchMoveDelta=new THREE.Vector2(0,0),this.touchPrevPosition=new THREE.Vector2(0,0),this.touchMoveOffset=new THREE.Vector2(0,0),this.enter=!1,this.canEnter=!1,this.animFov=null,this.animRotation=null,this.initTarget=new THREE.Vector3(0,0,0),this.enterView={pano:null,quaternion:new THREE.Quaternion,position:new THREE.Vector3,fov:f["a"].insideFOV}}return Object(r["a"])(e,[{key:"init",value:function(e,t){var i=this;if(console.log("quickstartManager init"),this.pano=e.pano,this.setSize(window.innerWidth,window.innerHeight),this.initView(e),this.skybox=new THREE.Mesh(new THREE.BoxBufferGeometry(1,1,1),new Ve["a"]({side:THREE.DoubleSide})),this.skybox.material.depthTest=!1,this.skybox.material.depthWrite=!1,this.skybox.renderOrder=1e3,this.skybox.name="quickStartSkyBox",this.skybox.material.uniforms.modelAlpha.value=0,this.skybox.position.copy(this.pano.position),this.skybox.visible=!0,this.scene.add(this.skybox),this.pano.attachToPanoVideoRenderer(this.panoVideoRenderer),this.panoVideoRenderer.on(mi.StartPlayVideo,this.onVideoStartPlay.bind(this)),this.panoVideoRenderer.on(mi.TextureUpdate,this.onVideoTextureUpdate.bind(this)),this.panoVideoRenderer.on(mi.ResumeRender,this.onVideoRenderResume.bind(this)),this.panoVideoRenderer.on(mi.SuspendRender,this.onVideoRenderSuspend.bind(this)),t.videos){var n=t.videos.parameters;this.skybox.material.uniforms.parameters.value.set(n.inputWidth,n.inputHeight,n.outputWidth,n.outputHeight,n.focal,n.pixel,n.centerX,n.centerY,n.translateX,n.translateY,n.translateZ,0,n.lenOffsetX,n.lenOffsetY,n.videoWidth,n.videoHeight),8==n.cameraType?this.skybox.material.defines.HasVideo=8:2==n.cameraType&&(this.skybox.material.defines.HasVideo=2),this.skybox.material.defines["VideoMapping"]=n.mapping,this.skybox.material.uniforms.videoReady.value=0,this.skybox.material.uniforms.progress.value=1}this.dom.addEventListener("touchstart",(function(){i.cancelRotate(),me["a"].detectIOS()&&i.panoVideoRenderer.setMuted(!1)})),this.dom.addEventListener("touchend",(function(){me["a"].detectAndroidMobile()&&i.panoVideoRenderer.setMuted(!1)}))}},{key:"initView",value:function(e){this.view=e;var t=e.pano;e.mode,e.zoom,e.position,e.quaternion;if(this.controls.locked=!1,this.controls.camera.position.copy(t.position),t.hasVideo&&!e.setByUrl){if(t.videoInfo.dir)this.initTarget.copy(t.videoInfo.dir).add(t.position);else{var i=(new THREE.Quaternion).setFromAxisAngle(new THREE.Vector3(0,1,0),THREE.Math.degToRad(m["config"].supportsTiles?90:180));this.initTarget.copy(M["a"].FORWARD.clone().applyQuaternion(i.multiply(t.quaternion))).add(t.position)}this.controls.lookAt(this.initTarget)}else this.initTarget.copy(new THREE.Vector3(0,0,-1).applyQuaternion(e.quaternion)).add(e.position),this.controls.lookAt(this.initTarget);this.quickStartcamera.fov=this.view.fov,this.quickStartcamera.aspect=window.innerWidth/window.innerHeight,this.quickStartcamera.updateProjectionMatrix(),this.camera.fov=this.view.fov,this.camera.aspect=window.innerWidth/window.innerHeight,this.camera.position.copy(this.quickStartcamera.position),this.camera.quaternion.copy(this.quickStartcamera.quaternion),this.enterView.pano=t,this.enterView.position.copy(this.view.position),this.enterView.quaternion.copy(this.view.quaternion),this.enterView.fov=this.view.fov,this.controls.update(.016),this.controls.locked=!0,this.controls.limitDownAngel=this.controls.lat,this.view.position.copy(this.quickStartcamera.position),this.view.quaternion.copy(this.quickStartcamera.quaternion)}},{key:"load",value:function(){var e=this;if(this.loadPromise)return this.loadPromise;if(this.view.pano.shouldRedrawOnBaseLoaded=!0,this.view.pano.tiled){var t=this.qualityManager.getPanoSize(X["a"].BASE),i=this.qualityManager.getPanoSize(X["a"].STANDARD),n=Q["a"].getHFOVForCamera(this.quickStartcamera,$("#player").width(),$("#player").height()),o=this.quickStartcamera.fov,a=M["a"].FORWARD.clone().applyQuaternion(this.view.quaternion),r=this.view.pano.loadTiledPano(i,a,{hFov:n,vFov:o},!1,!1,!0),s=this.view.pano.loadTiledPano(t,a.clone().negate(),null,!1,!1,!0);this.loadPromise=this.pano.hasVideo?s:r}else this.loadPromise=new Promise((function(t){e.pano.hasVideo?e.pano.loadCube("low").then((function(){return t()})):e.pano.loadCube("high").then((function(){return t()}))}));return this.loadPromise.then((function(){e.ready=!0,e.skybox.material.setProjectedPanos(e.pano,e.pano)})),this.loadPromise}},{key:"onVideoStartPlay",value:function(){}},{key:"onVideoTextureUpdate",value:function(e){this.skybox.material.uniforms.videoTexture.value=e}},{key:"onVideoRenderResume",value:function(){this.skybox.material.uniforms.videoReady.value=1,vt["a"].pause(!0)}},{key:"onVideoRenderSuspend",value:function(){this.skybox.material.uniforms.videoReady.value=0,m["store"].getters["guide/status"].isPlaying||vt["a"].resume()}},{key:"watingUnlock",value:function(){var e=this;return this.locked=!0,this.controls.locked=!0,new Promise((function(t){e.unlockHanlde=t}))}},{key:"autoUnlock",value:function(){return this.locked=!1,this.app.active=!0,this.controls.locked=!1,this.controls.limitDownAngel=null,this.pano.hasVideo&&me["a"].detectIOS()?this.panoVideoRenderer.setMuted(!1):this.panoVideoRenderer.setMuted(!0),this.panoVideoRenderer.activatePanorama(this.pano),Promise.resolve(!0)}},{key:"activate",value:function(){this.panoVideoRenderer.setMuted("0"==me["a"].urlQueryValue("sound")),this.panoVideoRenderer.activatePanorama(this.pano)}},{key:"unlock",value:function(e){var t=this;if(this.enter)this.controls.rotationAcc.set(0,0);else{this.enter=!0,this.app.emit("unlock"),this.controls.locked=!1,this.controls.rotationAcc.set(e.x>0?.3:-.3,0),this.controls.limitDownAngel=null,this.animFov&&E["a"].cancel(this.animFov);try{parent.postMessage({num:m["config"].projectNum,cmd:"unlocking",isParent:top==self},"*")}catch(i){console.error("跨域",i)}this.animFov=E["a"].start(T["a"].property(this.quickStartcamera,"fov",70),3e3,(function(){t.unlockHanlde&&t.unlockHanlde(),t.locked=!1,t.enter=!0,t.controls.locked=!1,t.controls.rotationAcc.set(0,0),t.controls.limitDownAngel=null;try{parent.postMessage({num:m["config"].projectNum,cmd:"unlocked",isParent:top==self},"*")}catch(i){console.error("跨域",i)}}),0,j["a"].easeOutCubic)}}},{key:"exit",value:function(){this.enter=!1;var e=this.pano;e.enter(),this.controls.rotationAcc.set(0,0),this.controls.limitDownAngel=null,this.animFov&&E["a"].cancel(this.animFov),this.app.player.model?this.app.player.flyToPano({pano:this.pano}):this.smoothLookAt(this.initTarget,1e3)}},{key:"smoothLookAt",value:function(e,t){var i=this;t=t||1e3;var n=e.clone().sub(this.controls.camera.position).normalize(),o=this.controls.lookVector.clone(),a=new THREE.Vector3,r=(new THREE.Vector3,function(e){a.lerpVectors(o,n,e),i.controls.lookAt(a.add(i.controls.camera.position))});this.animFov=E["a"].start(r,t)}},{key:"cancelRotate",value:function(){this.enter&&this.app.startOption.needUnlock&&this.controls.rotationAcc.set(0,0)}},{key:"update",value:function(e){this.locked,this.controls.update(e),this.camera.position.copy(this.quickStartcamera.position),this.camera.quaternion.copy(this.quickStartcamera.quaternion),this.camera.fov=this.quickStartcamera.fov,this.camera.updateProjectionMatrix(),this.view.position.copy(this.quickStartcamera.position),this.view.quaternion.copy(this.quickStartcamera.quaternion),this.view.fov=this.quickStartcamera.fov}},{key:"setSize",value:function(e,t){this.camera.aspect=e/t,this.camera.updateProjectionMatrix()}},{key:"destroy",value:function(){this.scene.remove(this.skybox),this.controls.rotationAcc.set(0,0),this.dom.removeEventListener("touchstart",this.cancelRotate)}},{key:"attachDom",value:function(e){e.addEventListener("touchstart",this.onTouchStart.bind(this)),e.addEventListener("touchmove",this.onTouchMove.bind(this)),e.addEventListener("touchend",this.onTouchEnd.bind(this))}},{key:"onTouchEvent",value:function(e,t){"touchstart"==t.type?this.onTouchStart(t):"touchmove"==t.type?this.onTouchMove(t):"touchend"==t.type&&this.onTouchEnd(t)}},{key:"onTouchStart",value:function(e){this.touchStartPosition.set(e.touches[0].clientX,e.touches[0].clientY),this.touchPrevPosition.set(e.touches[0].clientX,e.touches[0].clientY),this.touchMoveDelta.set(0,0),this.touchMoveOffset.set(0,0),this.enter||0==this.app.needUnlock?(this.controls.rotationAcc.set(0,0),this.controls.onTouchStart(e)):this.canEnter=!1,this._start={x:e.touches[0].clientX,y:e.touches[0].clientY}}},{key:"onTouchMove",value:function(e){if(this._move={x:e.touches[0].clientX,y:e.touches[0].clientY},this.touchMoveDelta.set(e.touches[0].clientX-this.touchPrevPosition.x,e.touches[0].clientY-this.touchPrevPosition.y),this.touchPrevPosition.set(e.touches[0].clientX,e.touches[0].clientY),this.touchMoveOffset.set(e.touches[0].clientX-this.touchStartPosition.x,e.touches[0].clientY-this.touchStartPosition.y),this.enter||0==this.app.needUnlock)this.controls.onTouchMove(e);else{var t=-this.touchMoveDelta.x,i=Math.abs(this.getAngle(this._start,this._move))<15,n=i&&0==this.enter;n&&this.unlock(new THREE.Vector2(t,0))}}},{key:"onTouchEnd",value:function(e){(this.enter||0==this.app.needUnlock)&&this.controls.onTouchEnd(e)}},{key:"getAngle",value:function(e,t){var i=t.x-e.x,n=t.y-e.y;return 360*Math.atan(n/i)/(2*Math.PI)}}]),e}(),Ni=i("ef32");function Bi(e){var t=Ui();return function(){var i,n=Object(h["a"])(e);if(t){var o=Object(h["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(u["a"])(this,i)}}function Ui(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}new(function(e){Object(c["a"])(i,e);var t=Bi(i);function i(){var e;return Object(o["a"])(this,i),e=t.call(this),e.modelMap={},e.activeModel=null,e.modelCount=0,e.tileDownloader=null,e.panoRenderer=null,e.panoVideoRenderer=null,e.modelManager=Object(s["a"])(e),e}return Object(r["a"])(i,[{key:"init",value:function(e,t,i){this.tileDownloader=e,this.panoRenderer=t,this.qualityManager=i,this.bindEvents()}},{key:"bindEvents",value:function(){this.panoRenderer.on(Ni["a"].TileRenderSuccess,this.onTileRendered.bind(this)),this.panoVideoRenderer.on(mi.TextureUpdate,this.onVideoTextureUpdate.bind(this)),this.panoVideoRenderer.on(mi.SuspendRender,this.onSuspendVideoRender.bind(this)),this.panoVideoRenderer.on(mi.ResumeRender,this.onResumeVideoRender.bind(this))}},{key:"onTileRendered",value:function(e,t,i,n){}},{key:"addModel",value:function(e){this.modelMap[this.projectNum]=e,0===this.modelCount&&this.activateModel(this.projectNum),this.modelCount++,this.emit(A["a"].ModelAdded)}},{key:"activateModel",value:function(){var e=this,t=this.modelMap[this.projectNum];if(!t)throw new ve["a"]("Tried to activate invalid model!");var i=this.activeModel;this.activeModel=t,this.tileDownloader.setPanoData(t.panos,t.listImagePanos(),this.projectNum),t.panos.forEach((function(t){t.attachToPanoRenderer(e.panoRenderer),t.attachToPanoVideoRenderer(e.panoVideoRenderer),t.tileDownloader=e.tileDownloader,t.qualityManager=e.qualityManager})),this.emit(A["a"].ActiveModelChanged,{oldModel:i,model:t})}},{key:"onVideoTextureUpdate",value:function(e){this.activeModel&&this.activeModel.updateVideoTexture(e)}},{key:"onSuspendVideoRender",value:function(){this.activeModel&&this.activeModel.suspendVideoRender()}},{key:"onResumeVideoRender",value:function(){this.activeModel&&this.activeModel.resumeVideoRender()}},{key:"getActiveModel",value:function(){return this.activeModel}}]),i}(m["default"]));function Wi(e){var t=qi();return function(){var i,n=Object(h["a"])(e);if(t){var o=Object(h["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(u["a"])(this,i)}}function qi(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}THREE.Object3D;var Gi=function(e){Object(c["a"])(i,e);var t=Wi(i);function i(){Object(o["a"])(this,i);var e=new THREE.SphereBufferGeometry(.01,30,30),n=new THREE.MeshBasicMaterial({color:65280});return t.call(this,e,n)}return i}(THREE.Mesh),Qi=function(e){Object(c["a"])(i,e);var t=Wi(i);function i(){var e;Object(o["a"])(this,i);var n=document.createElement("video");n.src="static/video/p2.webm",n.muted=!0,n.autoplay=!0,n.loop=!0,n.play();var a=new THREE.VideoTexture(n);a.minFilter=THREE.LinearFilter,a.magFilter=THREE.LinearFilter,a.format=THREE.RGBAFormat,a.flipY=!1,a.needsUpdate=!0;var r=new THREE.SphereBufferGeometry(1,30,30),s=new THREE.ShaderMaterial({side:THREE.DoubleSide,transparent:!0,uniforms:{map:{value:a},clipRect:{value:new THREE.Vector4(.1,.4,.2,.7)},panoPosition:{value:new THREE.Vector3(0,0,0)},panoMatrix:{value:new THREE.Matrix4},pointer:{value:new THREE.Vector3}},vertexShader:"\n\n uniform mat4 panoMatrix;\n uniform vec3 panoPosition;\n \n \n varying vec3 vSamplerDirection;\n\n void main()\n {\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\n vec4 worldPosition = modelMatrix * vec4(position, 1.0);\n\n \n vec3 positionLocalToPanoCenter = worldPosition.xyz - panoPosition;\n\n vSamplerDirection = (vec4(positionLocalToPanoCenter, 1.0) * panoMatrix).xyz;\n\n vSamplerDirection.x *= -1.0;\n\n }\n\n ",fragmentShader:"\n\n #define PI 3.141592653\n\n uniform vec4 clipRect;\n uniform vec3 pointer;\n uniform mat4 panoMatrix;\n uniform vec3 panoPosition; \n uniform sampler2D map;\n\n varying vec3 vSamplerDirection;\n\n vec2 getSamplerCoord( vec3 direction ) \n {\n direction = normalize(direction);\n float tx=atan(direction.x,direction.z)/(PI*2.0)+0.5;\n float ty=acos(direction.y)/PI;\n\n return vec2(tx,ty);\n }\n\n float linearStep( float start, float end, float value ) {\n\n return clamp( (value - start) / (end - start), 0.0, 1.0 );\n }\n\n void main() \n {\n\n vec2 uv = getSamplerCoord( vSamplerDirection );\n\n vec2 videoUV = vec2( 0.0, 0.0 ); \n videoUV.x = linearStep( clipRect.x, clipRect.z, uv.x );\n videoUV.y = linearStep( clipRect.y, clipRect.w, uv.y );\n \n vec4 videoColor = texture2D( map, videoUV );\n\n \n float rect = (step( clipRect.x, uv.x ) - step( clipRect.z, uv.x )) //x\n *(step( clipRect.y, uv.y ) - step( clipRect.w, uv.y )); //y\n\n //rect *= videoColor.a;\n \n vec3 color = videoColor.rgb * rect;\n //vec3 color = vec3( uv, 0.0 );\n\n\n gl_FragColor = vec4( color, rect );\n\n }\n \n "});return e=t.call(this,r,s),e.panoPosition=new THREE.Vector3,e.panoMatrix=new THREE.Matrix4,e.panoQuaternion=new THREE.Quaternion(0,0,0,1),e._panoMatrixInverse=new THREE.Matrix4,e._samplerDirection=new THREE.Vector3(0,0,-1),e._samplerUv=new THREE.Vector2(0,0),e._clipRectLeftBottom=new THREE.Vector2(0,0),e._clipRectRightTop=new THREE.Vector2(.1,.1),e}return Object(r["a"])(i,[{key:"setRect",value:function(e){this.projectWorldToUV(e.leftBottom,this._clipRectLeftBottom),this.projectWorldToUV(e.rightTop,this._clipRectRightTop),this.material.uniforms.clipRect.value.set(this._clipRectLeftBottom.x,this._clipRectLeftBottom.y,this._clipRectRightTop.x,this._clipRectRightTop.y)}},{key:"injectPanoInfo",value:function(e){this.position.copy(e.position),this.panoPosition.copy(e.position),this.panoMatrix.copy(e.skyboxMesh.matrixWorld),this.panoQuaternion.copy(e.quaternion),this.material.uniforms.panoPosition.value.copy(this.panoPosition),this.material.uniforms.panoMatrix.value.copy(this.panoMatrix)}},{key:"projectWorldToUV",value:function(e,t){return this._panoMatrixInverse.getInverse(this.panoMatrix),this._samplerDirection.subVectors(e,this.panoPosition),this._samplerDirection.transformDirection(this._panoMatrixInverse),this._samplerDirection.x*=-1,Xi(this._samplerDirection,this._samplerUv),t.copy(this._samplerUv),t}},{key:"projectUVToWorld",value:function(e,t){Zi(e,t),t.transformDirection(this.panoMatrix),t.normalize(),t.add(this.panoPosition)}},{key:"debug",value:function(e){this.projectWorldToUV(e,Yi),this._clipRect.set(Yi.x-.01,Yi.y-.01,Yi.x+.01,Yi.y+.01),console.log(Yi),this.material.uniforms.clipRect.value.copy(this._clipRect),this.material.uniforms.pointer.value.copy(e)}}]),i}(THREE.Mesh),Yi=new THREE.Vector2;function Xi(e,t){e.normalize();var i=Math.atan2(e.x,e.z)/(2*Math.PI)+.5,n=Math.acos(e.y)/Math.PI;return t.set(i,n)}function Zi(e,t){var i=e.x*Math.PI*2-.5*Math.PI,n=e.y*Math.PI;t.x=Math.sin(n)*Math.cos(i),t.z=Math.sin(n)*Math.sin(i),t.y=Math.cos(n),t.normalize()}var Ji,$i={LINK_CLICK:"mtmedia.link",IMAGE_LOADED:"mtmedia.image.loaded",IMAGE_OPENING:"mtmedia.image.opening",IMAGE_OPENED:"mtmedia.image.opened",IMAGE_CLOSING:"mtmedia.image.closing",IMAGE_CLOSED:"mtmedia.image.closed",VIDEO_START:"mtmedia.video.start",VIDEO_PAUSE:"mtmedia.video.pause",VIDEO_ENDED:"mtmedia.video.end"},Ki=$i,en={TagActivated:"tag.activated",TagDismissed:"tag.dismissed",TagNavigation:"tag.navigation"},tn=en,nn=i("0bc0"),on={IDLE:"idle",BROWSE:"browse",EXAMINE:"examine"},an=on,rn={NAVIGATION:"navigation",MODEL:"model",EXT_LINK:"ext-link"},sn=rn,ln=i("dbd3");function cn(e){var t=un();return function(){var i,n=Object(h["a"])(e);if(t){var o=Object(h["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(u["a"])(this,i)}}function un(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}new(Ji=function(e){Object(c["a"])(i,e);var t=cn(i);function i(){var e;return Object(o["a"])(this,i),e=t.call(this),Object(p["a"])(Object(s["a"])(e),"updatePosAtSphere",(function(e,t,i,n){var o=this.player;if(e==D["a"].PANORAMA)for(var a in this.tags){var r=this.tags[a];if(r.disc.visible){var s=ue["a"].getPosAtSphere(r.origin.clone(),t);i?E["a"].start(T["a"].vector(r.position,s,function(e){this.rePos(e,o.mode,o.camera)}.bind(r)),i,null,n):r.rePos(s,o.mode,o.camera)}}else for(var a in this.tags){r=this.tags[a];i?E["a"].start(T["a"].vector(r.position,r.origin,function(e){this.rePos(e,o.mode,o.camera)}.bind(r)),i,null,n):this.tags[a].rePos(r.origin,o.mode,o.camera)}})),Object(p["a"])(Object(s["a"])(e),"getIntersectTag",function(){var e=new THREE.Vector3,t=new THREE.Vector3,i=new THREE.Vector3;return function(n,o,a){if(!m["objects"].player.linkEditor||!m["objects"].player.linkEditor.setPanoVisible){var r=null,s=this.tagDiscs.filter((function(e){return e.visible&&e.parent.visible&&"mark"!=e.tag.state&&1==e.material.uniforms.opacity.value}));if(s.length>0){var l;l=this.player.mode==D["a"].PANORAMA||this.player.linkEditor.setTagVisible?s:this.model.floors.reduce((function(e,t){return t.hidden?e:e.concat(t.collider.children)}),s),e.set(n.x,n.y,-1).unproject(a),t.set(n.x,n.y,1).unproject(a),i.copy(t).sub(e).normalize(),this.raycaster.set(e,i);var c=this.raycaster.intersectObjects(l);c.length>0&&-1!==s.indexOf(c[0].object)&&(r=c[0].object.tag)}return this.intersectTag=r,this.player.linkEditor&&this.player.linkEditor.setTagVisible?(null!=r?$("#player").css("cursor","pointer"):$("#player").css("cursor",""),r):(o&&"shop"!=x["a"].name&&"grave"!=x["a"].name&&"reserve"!=x["a"].name&&(this.activeTag&&r!==this.activeTag&&(this.tagState===an.BROWSE||this.tagState===an.EXAMINE&&r)&&this.dismissActiveTag(),r&&r!==this.activeTag&&(r.getListeners(nn["a"].ENTER).length<1&&("reserve"==x["a"].name?(r.billboard.on(nn["a"].ENTER,function(){this.hoveredTag=r}.bind(this)),r.billboard.on(nn["a"].LEAVE,function(){this.hoveredTag=null}.bind(this))):(this.billboard.on(nn["a"].ENTER,function(){this.hoveredTag=r}.bind(this)),this.billboard.on(nn["a"].LEAVE,function(){this.hoveredTag=null}.bind(this)))),this.activateTag(r,an.BROWSE))),"shop"!=x["a"].name&&"reserve"!=x["a"].name||(this.intersectTag?$("#player").css("cursor","pointer"):$("#player").css("cursor","")),r)}this.intersectTag=null}}()),Object(p["a"])(Object(s["a"])(e),"rankedTagInDirection",function(){var e=[],t=[],i=new THREE.Vector3,n=new THREE.Vector3,o=new THREE.Vector3;return function(a,r,s,l){var c=0;t.length=0;for(var u=0;u<this.closestTags.length;u++){var d=this.closestTags[u];n.copy(d.position),n.add(d.discPosition),i.copy(r),i.sub(n).negate(),i.normalize();var h=i.dot(l);if(h>=0){o.copy(n),o.project(s);var p=this.intersectTag(o,!1,s);if(p){if(c>=e.length)for(var f=0;f<64;f++)e.push({tag:d,dot:h});var m=e[c];m.tag=d,m.dot=h,m.position=math.projectPositionToCanvas(n,s),t.push(m),c++}}}return t.sort((function(e,t){return e.dot>t.dot?-1:e.dot<t.dot?1:0})),a<t.length?t[a].tag:null}}()),Object(p["a"])(Object(s["a"])(e),"updateClosestTags",function(){var e=new THREE.Vector3,t=30;return function(i){this.closestTags||(this.closestTags=[]),this.closestTags.length=0;var n=this.tags;if(n)for(var o in n)if(n.hasOwnProperty(o)){var a=n[o],r=a.position;e.copy(i),e.sub(r).negate();var s=e.lengthSq();s<t&&this.closestTags.push(a)}}}()),Object(p["a"])(Object(s["a"])(e),"getClosestTag",(function(){if(app.player&&app.player.domElement){var e=app.tagManager.tagDiscs.map((function(e){return e.tag})),t=THREE.Math.degToRad(Q["a"].getHFOVFromVFOV(f["a"].insideFOV,app.player.domElement.clientWidth,app.player.domElement.clientHeight)/2),i=app.player.getDirection(),n=[function(e){if("videoPanoFlag"!=e.state){var n=e.position.distanceTo(app.player.position);if(!(n>10)){var o=i.setY(0),a=e.position.clone().sub(app.player.position).setY(0);return o.angleTo(a)<=t}}}],o=[function(e){var t=e.position.distanceTo(app.player.position);return-t},function(e){var t=e.position.clone().sub(app.player.position),n=t.angleTo(i);return 10*-n}],a=C["a"].sortByScore(e,n,o);return a&&a[0].item}})),e.tagState=an.IDLE,e.intersectTag=null,e.hoveredTag=null,e.activeTag=null,e.tags={},e.tagDiscs=[],e.raycaster=new THREE.Raycaster,e.totalTags=0,e.navigatingViaTag=!1,e.enabled=!1,e.tagManager=Object(s["a"])(e),e.openedTag=null,e.unTag=null,"reserve"==x["a"].name||(e.billboard=new ln["a"]),e.editSpot=re["default"],e.aimAtTagTimer=null,e}return Object(r["a"])(i,[{key:"init",value:function(){this.updateModel(),this.bindEvents(),this.createTags(),this.billboard&&this.billboard.bindEvents(),re["default"].init()}},{key:"createTags",value:function(){var e=m["store"].getters["hotspot/tags"];"object"==Object(Ce["a"])(e)&&e.length>0&&e.forEach(function(e){if(this.tags[e.sid])console.log("有重复的热点sid"+e.sid);else{var t=new De["a"](this.model,e.sid,e);this.addTag(t),t.disc.material.uniforms.opacity.value=0}}.bind(this)),this.updateVisible(m["objects"].player.mode)}},{key:"boardsResize",value:function(){null==this.billboard||this.billboard.imgNeedResize||(this.billboard.imgNeedResize=!0,this.billboard.once(nn["a"].OPENED,function(){return function(){this.billboard.resizeImg()}}.bind(this)))}},{key:"updateVisible",value:function(e,t){if(this.player||this.player.model){var i=this.tags;for(var n in t=t||this.player.nextPano||this.player.currentPano,i){var o;"videoPanoFlag"!=i[n].state&&(e!=D["a"].PANORAMA?o=!1:(i[n].disc.material.depthTest=!1,o=i[n].edit||i[n].visiblePanos.indexOf(t.id)>-1),i[n].disc.visible=o)}}}},{key:"addTag",value:function(e){this.tagDiscs.push(e.disc),++this.totalTags,this.tags[e.sid]=e}},{key:"removeTag",value:function(e){var t=this.tagDiscs.indexOf(e.disc);t>-1&&(this.tagDiscs.splice(t,1),this.totalTags--,delete this.tags[e.sid],e.remove(),e==this.activeTag&&(this.dismissActiveTag(),this.billboard.animationScale=0,this.billboard.closeTransition=1))}},{key:"update",value:function(e){this.updateTags(this.player.mode,this.player.camera,this.player.currentPano,this.player.flying),this.billboard&&this.billboard.update(this.player.camera)}},{key:"updateTags",value:function(e,t,i,n){for(var o in this.tags)this.tags[o].update(e,t,i,n)}},{key:"updateModel",value:function(){this.model=this.modelManager.getActiveModel(),this.totalTags=Object.keys(this.tags).length}},{key:"bindEvents",value:function(){function e(){Object.keys(this.tags).forEach(function(e){var t=this.tags[e];t.billboard&&(t.billboard.on(Ki.LINK_CLICK,function(e){e.type===sn.NAVIGATION&&this.navigateViaLink(e.url)}.bind(this)),t.billboard.on(Ki.IMAGE_OPENED,function(){this.tagState=an.EXAMINE,this.emit(Ki.IMAGE_OPENED)}.bind(this)))}.bind(this))}this.player.on(L["a"].ModeChanging,this.onPlayerModeChanging.bind(this)),this.player.on(L["a"].PanoChosen,this.onPanoChange.bind(this)),this.player.on(L["a"].Ready,this.onPlayerReady.bind(this)),this.player.on(L["a"].FlyingEnded,this.onPlayerFlyingEnded.bind(this)),this.player.on(L["a"].WarpStarted,this.handleWarpStart.bind(this)),this.player.on(L["a"].WarpInterrupted,this.handleWarpInterruption.bind(this)),this.billboard&&(this.billboard.on(nn["a"].ENTER,this.setHoverState.bind(this)),this.billboard.on(nn["a"].LEAVE,this.setFreeState.bind(this))),e.call(this)}},{key:"setFreeState",value:function(e){var t="reserve"==x["a"].name?this.openedTag.billboard:this.billboard;this.openedTag&&this.openedTag.closeDisc(),!this.openedTag&&this.hoveringDisc||t&&t.close(this.openedTag).then(function(){null!=this.openedTag&&(this.openedTag.disc.material.uniforms.dark.value=0,this.openedTag=null)}.bind(this))}},{key:"setHoverState",value:function(e){if(null!=this.openedTag){var t="reserve"==x["a"].name?this.openedTag.billboard:this.billboard;"videoPanoFlag"!=this.openedTag.state&&t.open(this.openedTag,e),this.openedTag.disc.material.uniforms.dark.value=1,this.openedTag.openDisc()}}},{key:"handleWarpStart",value:function(e,t,i,n){this.dismissExaminedTag(),t===V["a"].BLACK&&(null!==n&&void 0!==n||(n=f["a"].warp.teleportTime),e&&(i=z.END),this.hideShowTagsForBlackoutStyle(i,n))}},{key:"handleWarpInterruption",value:function(e,t,i){null!==i&&void 0!==i||(i=f["a"].warp.teleportTime),this.hideShowTagsForBlackoutStyle(t,i)}},{key:"hideShowTagsForBlackoutStyle",value:function(e,t){var i=0,n=0,o=t/2;switch(null!==e&&void 0!==e||(e=z.MIDDLE),e){case z.END:this.hideAllTags(o);break;case z.BEGINNING:this.hideAllTags().done(this.showAllTags.bind(this,o));break;case z.NONE:break;case z.MIDDLE:i=o,n=o,this.hideAllTags(n),setTimeout(function(){this.showAllTags(i)}.bind(this),n);break;case z.FADEIN:setTimeout(function(){this.showAllTags(o)}.bind(this),o)}}},{key:"onPlayerModeChanging",value:function(e,t){t!==D["a"].PANORAMA&&this.dismissExaminedTag()}},{key:"onPanoChange",value:function(e,t){var i=this.navigatingViaTag;this.navigatingViaTag=!1,i||"shop"!=x["a"].name&&"reserve"!=x["a"].name&&this.dismissExaminedTag()}},{key:"onPlayerReady",value:function(e,t,i){if(this.update(),x["a"].isEdit&&m["objects"].mainDesign&&m["objects"].mainDesign.editing||"screen"==m["store"].getters.page);else if(x["a"].isEdit&&"guide"==m["store"].getters.page)for(var i in this.tags){var n=this.tags[i];"link"!=n.mediaType&&"videoPanoFlag"!=n.state&&n.show(200,300)}else this.showAllTags(200,300)}},{key:"onPlayerFlyingEnded",value:function(e,t){this.updateClosestTags(e)}},{key:"dismissExaminedTag",value:function(){this.activeTag&&this.tagState===an.EXAMINE&&this.dismissActiveTag(),this.hoveredTag&&(this.setFreeState(),this.openedTag=null,this.hoveredTag=null)}},{key:"showAllTags",value:function(e,t,i){function n(){a++,a===this.totalTags&&(this.model.tagsShown=!0,o.resolve())}var o=$.Deferred(),a=0;for(var r in this.tags){var s=this.tags[r];"videoPanoFlag"!=s.state&&s.show(e,t).done(n.bind(this))}return o.promise()}},{key:"hideAllTags",value:function(e,t){function i(){o++,o===this.totalTags&&(this.model.tagsShown=!1,n.resolve())}var n=$.Deferred(),o=0;for(var a in this.tags){var r=this.tags[a];"videoPanoFlag"!=r.state&&(r.hide(e,t).done(i.bind(this)),r===this.activeTag&&this.dismissActiveTag())}return n.promise()}},{key:"enableHovering",value:function(){this.enabled=!0}},{key:"disableHovering",value:function(){this.enabled=!1}},{key:"activateTag",value:function(e,t){this.activeTag&&this.activeTag.edit||(t=t||an.EXAMINE,this.activeTag=e,this.activeTag.hoveringDisc=!0,this.openedTag=this.activeTag,this.setHoverState(t===an.EXAMINE),this.tagState=t,this.emit(tn.TagActivated,e))}},{key:"dismissActiveTag",value:function(){if(!this.activeTag.edit){this.activeTag.hoveringDisc=!1,this.setFreeState();var e=this.activeTag;this.activeTag=null,this.tagState=an.IDLE,this.emit(tn.TagDismissed,e)}}},{key:"clickedOnTag",value:function(e){if(m["objects"].player.linkEditor&&m["objects"].player.linkEditor.setTagVisible&&"videoPanoFlag"!=this.intersectTag.state)m["objects"].player.linkEditor.SetOneTagVisible(this.intersectTag);else if(!x["a"].isEdit||!this.markTag){var t=function(){this.navigatingViaTag=!0,"videoPanoFlag"==this.activeTag.state?this.player.flyToPano({pano:this.player.model.panos.index[this.activeTag.sid.split("flagSpot___")[1]]}):(this.activeTag.examine(this.player),this.emit(tn.TagNavigation,this.activeTag))}.bind(this);return this.tagState==an.EXAMINE?this.activeTag==this.intersectTag?(this.dismissActiveTag(),!1):(this.dismissActiveTag(),this.activateTag(this.intersectTag,an.EXAMINE),this.activeTag=this.intersectTag,t(),!0):(this.activateTag(this.intersectTag,an.EXAMINE),this.activeTag=this.intersectTag,t(),!0)}}},{key:"closeOpenedTag",value:function(){null!=this.openedTag&&("reserve"==x["a"].name?this.openedTag.billboard.close():this.billboard.close(),this.openedTag=null)}},{key:"aimAtTag",value:function(){var e=m["objects"].player.getDirection(),t=1/0,i=null;for(var n in this.tags){var o=this.tags[n];if("videoPanoFlag"!=o.state&&o.disc.visible&&1==o.disc.material.uniforms.opacity.value){var a=o.position.clone().sub(m["objects"].player.position),r=a.angleTo(e);r<t&&(t=r,i=o)}}if(i){if(this.activeTag){if(this.activeTag==i)return;this.dismissActiveTag()}console.log("open----- "+i.sid),this.activateTag(i),"reserve"==x["a"].name?i.billboard.open(i):this.billboard.open(i)}}},{key:"waitToAimAtTag",value:function(e){var t=this;e?this.aimAtTagTimer||(this.aimAtTagTimer=setTimeout((function(){t.aimAtTag()}),200)):this.aimAtTagTimer&&(clearTimeout(this.aimAtTagTimer),this.aimAtTagTimer=null)}}]),i}(m["default"]),Ji);var dn=function(){function e(t,i){Object(o["a"])(this,e),this.player=t,this.panos=this.player.model.panos,this.panoVideoRenderer=i,this.retryMinimumTime=1e4}return Object(r["a"])(e,[{key:"start",value:function(){this.loadNextPano(function(e){e?this.start():(O["a"].debug("No suitable pano loaded, waiting a little while before looking again"),setTimeout(function(){this.start()}.bind(this),1e3))}.bind(this))}},{key:"validLoadTarget",value:function(e){return e&&!e.isLoaded("high")&&Date.now()-e.failedLoadingAt>this.retryMinimumTime}},{key:"nextNotLoadedImage",value:function(){return null}},{key:"loadNextPano",value:function(e){var t,i,n=this.player.model.waitQueue.filter((function(e){return e.object instanceof W["a"]}));n.length>0?(t=n[0].object,O["a"].debug("Overrode pano selection: Flying to an unloaded pano "+t.id)):this.validLoadTarget(this.player.currentPano)?(t=this.player.currentPano,O["a"].debug("Overrode pano selection: Currently at an unloaded pano "+t.id)):this.validLoadTarget(this.player.closestPano)?(t=this.player.closestPano,O["a"].debug("Overrode pano selection: Hovering over an unloaded pano "+t.id)):this.validLoadTarget(this.nextNotLoadedImage())?(i="high",t=this.imagePanos[0],O["a"].debug("Overrode pano selection: Highlight image "+t.id)):this.player.mode===D["a"].PANORAMA&&(t=this.panos.lowestByScore([this.validLoadTarget.bind(this),W["a"].filters.isNeighbourPanoTo(this.player.currentPano)],[W["a"].scoreFunctions.distance(this.player.currentPano),W["a"].scoreFunctions.direction(this.player.position,this.player.getDirection()),W["a"].scoreFunctions.inFieldOfView(this.player.position,this.player.getDirection())]),t&&O["a"].debug("Normal pano selection: neighbor "+t.id)),t?(i=i||t.isAssist||t.isLoaded("low")?"high":"low",O["a"].debug("Preloading "+i+"-res pano "+t.id),t.loadCube(i).done(e).fail((function(){O["a"].warn("Failed preloading pano",t.id,", marking it as failed and forgetting it for a while"),e()})),t.hasVideo&&panoVideoRenderer.videoPlayer.preloadPano(t)):e&&e(null)}}]),e}(),hn=(i("0d6d"),Object.freeze({Show:0,Hide:1,Retain:2})),pn=hn,fn=Object.freeze({Standard:0,Slow:1,Retain:2}),mn=fn;function vn(e){var t=gn();return function(){var i,n=Object(h["a"])(e);if(t){var o=Object(h["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(u["a"])(this,i)}}function gn(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}new(function(e){Object(c["a"])(i,e);var t=vn(i);function i(){var e;return Object(o["a"])(this,i),e=t.call(this),e.endlessLoop=f["a"].warp.loop,e.clock=new THREE.Clock(!0),e.currentItem=null,e.destinationItem=null,e.tourIsPlaying=!1,e.nextFunc=null,e.onTheBus=!1,e.reachSource=null,e.interrupted=!1,e.nItems=0,e.currentScript=0,e.walkingSectionPaused=!1,e.C=Object.freeze({None:0,Moving:1,Aiming:2,Interlude:3}),e.I=Object.freeze({Forward:1,NoChange:0,Backwards:-1}),e.transitionStage=e.C.None,e.director=Object(s["a"])(e),e}return Object(r["a"])(i,[{key:"init",value:function(){this.updateModel(),this.resetAll(),this.bindEvents()}},{key:"resetAll",value:function(){if(this.currentItem=null,this.destinationItem=null,this.tourIsPlaying=!1,this.transitionStage=this.C.None,this.nextFunc=null,this.onTheBus=!1,this.reachSource=null,this.interrupted=!1,this.player.model)switch(this.player.model.switch_scene_type){case 1:this.defaultWarpStyle=V["a"].BLACK;break;case 2:this.defaultWarpStyle=V["a"].WALK;break;case 3:this.defaultWarpStyle=V["a"].STD;break;default:this.defaultWarpStyle=V["a"].BLACK;break}else this.defaultWarpStyle=V["a"].BLACK,O["a"].warn('No model yet, choosing "'+this.defaultWarpStyle+'" transitions');this.resetSpecialTransition()}},{key:"updateModel",value:function(){this.player.model=this.modelManager.getActiveModel(),this.nItems=0}},{key:"bindEvents",value:function(){this.modelManager.on(A["a"].ActiveModelChanged,this.updateModel.bind(this)),this.player.on(L["a"].WarpInterruptedWithFlyTo,this.handleFlyToWarpInterruption.bind(this)),this.player.on(L["a"].Move,this.handlePlayerMove.bind(this)),this.player.on(L["a"].PanoChosen,this.handlePlayerPanoChosen.bind(this)),this.player.on(L["a"].ModeChanged,this.handlePlayerModeChanged.bind(this)),this.player.on(L["a"].InputStart,this.handlePlayerInputStart.bind(this)),this.player.on(L["a"].FlyingStarted,this.handlePlayerFlyingStarted.bind(this))}},{key:"handleFlyToWarpInterruption",value:function(e,t){e===V["a"].WALK?(this.interrupt(BlackoutStyle.NONE),this.pauseWalkingSection(),this.player.fastForwardActivePanoFlight()):this.transitionStage===this.C.Interlude&&(this.interrupt(BlackoutStyle.NONE),t&&t())}},{key:"handlePlayerMove",value:function(e){this.transitionStage===this.C.Interlude&&this.interrupt(BlackoutStyle.NONE)}},{key:"handlePlayerPanoChosen",value:function(e,t){this.intermediateState()||e.id===t.id||(this.onTheBus=!1,this.emit("update.controls"))}},{key:"handlePlayerModeChanged",value:function(e,t){this.intermediateState()||e===t||(this.onTheBus=!1,this.emit("update.controls"))}},{key:"handlePlayerInputStart",value:function(e){this.transitionStage===this.C.Interlude&&this.interrupt(BlackoutStyle.NONE)}},{key:"handlePlayerFlyingStarted",value:function(){this.clearWalkingSectionPaused()}},{key:"describe",value:function(){return{nItems:this.nItems,currentItem:this.currentItem,destinationItem:this.destinationItem,tourIsPlaying:this.tourIsPlaying,onTheBus:this.onTheBus,endlessLoop:this.endlessLoop,viewMode:this.player.mode,inTransition:this._inTransition(),transitionStage:this.transitionStage,tourInProgress:this.tourInProgress}}},{key:"_inTransition",value:function(){return this.player.flying||this.player.isWarping()||this.player.isWaitingToWarp()||this.player.mode===Viewmode.TRANSITIONING||this.tourIsPlaying}},{key:"bounceable",value:function(){var e=this.clock.getDelta();return this.isInterrupted()||e<.9&&e>.01||this.player.flying&&!this.player.isWarping()}},{key:"currentMoveDirection",value:function(){return null===this.currentItem||void 0===this.currentItem?this.I.Forward:this.destinationItem===this.currentItem?this.I.NoChange:this.destinationItem>this.currentItem?this.I.Forward:I.Backwards}},{key:"clearPath",value:function(){this._inTransition()||this.player.path.discardPathObject()}},{key:"allFloors",value:function(){this.player.model.toggleAllFloors()}},{key:"actionComplete",value:function(e){var t=this.transitionStage;if(this.interrupted=!1,this.transitionStage=this.C.None,this.resetSpecialTransition(),null!==this.destinationItem&&this.setCurrentItem(this.destinationItem),this.tourIsPlaying||this.player.mode===D["a"].PANORAMA&&this.player.currentPano.isAligned()&&this.player.model.fadePanoMarkers(),this.emit("update.controls"),this.currentScript&&(this.player.model.enableTagMovie&&t===this.C.Interlude||this.player.model.enableTagMovie&&t===this.C.Aiming&&null===this.nextFunc))this.openTag();else if(this.nextFunc){var i=this.nextFunc;this.nextFunc=null,i()}}},{key:"awaitCompletion",value:function(e,t){this.nextFunc=t,e()}},{key:"updateSuccessFunction",value:function(e){this.nextFunc=e}},{key:"interrupt",value:function(e,t){return!!this.wouldInterrupt()&&(this.tourIsPlaying&&(this.player.zoomEnabled=this.wasZoomEnabled),this.tourIsPlaying=!1,this.interrupted=!0,this.nextFunc=null,this.emit(DirectorEvents.ActionInterrupted),null!==e&&void 0!==e||(e=BlackoutStyle.BEGINNING),this.player.interruptAndFastForward(e,t),!0)}},{key:"wouldInterrupt",value:function(){return this.transitionStage!==this.C.None}},{key:"intermediateState",value:function(){return this.transitionStage!==this.C.None}},{key:"isInterrupted",value:function(){return this.interrupted}},{key:"pauseWalkingSection",value:function(){this.walkingSectionPaused=!0}},{key:"clearWalkingSectionPaused",value:function(){this.walkingSectionPaused=!1}},{key:"autoTour",value:function(){f["a"].nestscenes&&f["a"].nestscenes.scenes&&f["a"].nestscenes.scenes.length&&!f["a"].nestscenes.scenes[0].script&&(f["a"].basic.menu.scene_autoplay&&(f["a"].warp.auto=0,$("#play").removeClass("play").addClass("pause"),G.playing=!0,$(".gui-floor").hide(),$(".rightbar").hide(),$("#userlogo").hide(),$("#page-view").hide(),$("#back-url").hide(),$(".indoordir, .indoorscale").hide(),$("#virgule, #barrageShow, #barrageCon").hide()),f["a"].warp.auto>=0&&transitions.trigger({duration:1e3*Math.min(300,f["a"].warp.auto),done:function(){this.playTour()}.bind(this),name:"_atr"}))}},{key:"atDestinationPano",value:function(){if(!this.player.currentPano||null===this.destinationItem)return!1;var e=this.player.currentPano.id;if(void 0===e)return!1;var t=this.player.model.heroLocations;return null!==this.destinationItem&&void 0!==t[this.destinationItem]&&e==t[this.destinationItem].panoId}},{key:"redirectToItem",value:function(e,t){if(null!==e&&void 0!==e)if(this.wouldInterrupt())if(this.player.mode!==D["a"].TRANSITIONING){O["a"].debug("Director.redirectToItem() -> Redirecting to "+e+" via "+t);var i=function(){transitions.setTimeout(function(){this.setDestinationItem(e),O["a"].info("from redirectToItem"),this.goToDestination(!0,BlackoutStyle.BEGINNING,f["a"].warp.warpInterruptionRedirectTime,!1)}.bind(this),0)}.bind(this);this.interrupt(BlackoutStyle.END,0),this.updateSuccessFunction(i)}else O["a"].debug("Director.redirectToItem() -> Cannot redirect while transitioning.");else O["a"].warn("Director.redirectToItem() -> Director cannot redirect if there is nothing to interrupt.");else O["a"].warn("Director.redirectToItem() -> Redirecting to null item.")}},{key:"useSpecialTransition",value:function(e){void 0!==e&&this.defaultWarpStyle!==V["a"].BLACK&&O["a"].debug("useSpecialTransition(): "+e),this.nextWarpStyle=this.defaultWarpStyle}},{key:"resetSpecialTransition",value:function(){this.nextWarpStyle=this.defaultWarpStyle}},{key:"arrivedAtDestination",value:function(e){if(this.player.flying||this.player.isWarping())O["a"].warn("Cannot advance to interlude or aiming while player is flying or warping.");else{this.transitionStage=this.C.Aiming;var t=this.tourIsPlaying?this.tourInterlude.bind(this,this.nextItem(this.currentItem)):null;this.player.model.fadePanoMarkers(0),this.awaitCompletion(function(){this.resetSpecialTransition(),e?this.player.aimTourCamera(this.destinationItem,pn.Retain,pn.Slow,this.actionComplete.bind(this)):this.actionComplete()}.bind(this),t)}this.play.control.canPlay||(this.play.control.canPlay=!0),this.play.control.wait&&this.play.control.isPlaying&&(this.record.updateFragmentUI(this.play.control.currentIndex),this.play.control.wait=!1)}},{key:"toast",value:function(e){setTimeout((function(){document.getElementsByClassName("toast-wrap")[0].getElementsByClassName("toast-msg")[0].innerHTML=e;var t=document.getElementsByClassName("toast-wrap")[0];t.className=t.className.replace("toastAnimate",""),setTimeout((function(){t.className=t.className+" toastAnimate"}),10)}),10)}},{key:"tour360view",value:function(){if(this.player.currentPano&&2===this.player.currentPano.alignmentType){var e=this.player.model.language;this.toast(e.watchPr)}else $("#play").hasClass("play")}},{key:"goToDestination",value:function(e,t,i,n){if(this.destinationItem=m["objects"].play.control.currentIndex,this.onTheBus=!0,this.emit("update.controls"),n||!this.atDestinationPano())if(this.player.flying||this.player.isWarping())O["a"].warn("Cannot go to new destination while player is flying or warping.");else{var o=this.player.model.getHeroDescriptorByIndex(this.destinationItem),a=null,r=null;if(null!=o.pano&&"undefined"!=typeof o.pano){var s=0===this.destinationItem||e?V["a"].BLACK:this.nextWarpStyle;r=this.player.warpToPanoByHeroIndex.bind(this.player,this.destinationItem,pn.Show,mn.Slow,s,t,i,this.actionComplete.bind(this)),a=this.arrivedAtDestination.bind(this,!0)}else r=this.player.warpToNonPanoByHeroIndex.bind(this.player,this.destinationItem,this.actionComplete.bind(this)),a=this.arrivedAtDestination.bind(this,!1);this.transitionStage=this.C.Moving,this.player.model.fadePanoMarkers(0,null,{hideVideoFlag:!0}),this.awaitCompletion(function(){r()}.bind(this),a),this.emit("update.controls")}else this.arrivedAtDestination(!0)}},{key:"tourInterlude",value:function(){if(this.player.model.fadePanoMarkers(0),this.emit("update.controls"),this.tourIsPlaying)return this.atEndOfTour()&&!this.endlessLoop?(this.tourInProgress=!1,this.stopTour(),this.emit(DirectorEvents.TourEnd),void(this.player.mode===Viewmode.PANORAMA&&this.player.model.fadePanoMarkers(f["a"].panorama.markerOpacity))):void this.awaitCompletion(function(){this.transitionStage=this.C.Interlude,this.player.tourInterlude(this.nextItem(this.currentItem),this.actionComplete.bind(this))}.bind(this),this.goNext.bind(this))}},{key:"playTour",value:function(){if(!this.bounceable())return this.tourIsPlaying?void O["a"].info("tour is already playing"):void(this.wouldInterrupt()||(this.player.emit("tour_auto",this.defaultWarpStyle),this.tourInProgress=!0,this.reachSource="play",this.tourIsPlaying=!0,this.wasZoomEnabled=this.player.zoomEnabled,this.player.zoomEnabled=!1,this.resetSpecialTransition(),this.emit("update.controls"),this.emit(DirectorEvents.TourStart),this.player.enablePreRendering(),this.walkingSectionPaused?(this.clearWalkingSectionPaused(),this.goToDestination()):this.goNext()))}},{key:"hideTourBar",value:function(){browser.isMobile()?$(".btn-cat-play").removeClass("cat-mob-pause").addClass("cat-mob-play"):$(".btn-cat-play").removeClass("cat-pc-pause").addClass("cat-pc-play"),$("#gui").show()}},{key:"stopTour",value:function(){this.isInterrupted()||this.transitionStage===this.C.Moving&&this.checkAndHandleWalkingtourInterruption(this.nextWarpStyle)||(this.tourIsPlaying&&(this.player.zoomEnabled=this.wasZoomEnabled),this.tourIsPlaying=!1,this.interrupt(),this.clearWalkingSectionPaused(),this.resetSpecialTransition(),this.emit("update.controls"))}},{key:"endTourProgress",value:function(){this.tourInProgress=!1,this.emit("update.controls"),this.emit(DirectorEvents.TourEnd)}},{key:"goToHighlight",value:function(e){this.clearWalkingSectionPaused(),this.destinationItem=e,this.useSpecialTransition("Hilight"),this.goToDestination()}},{key:"goToHighlightByLocation",value:function(e){function t(t){return!(!t.panoId||t.panoId!=e)}var i=this.player.model.heroLocations.findIndex(t);if(!this.wouldInterrupt()){if(O["a"].debug("<tour.goto "+i+">"),this.wouldInterrupt()&&(i===this.destinationItem?this.interrupt():this.redirectToItem(i,"goToHighlight")),this.isInterrupted())return;this.clearWalkingSectionPaused(),this.setDestinationItem(i),this.useSpecialTransition("Hilight"),this.goToDestination()}}},{key:"prevHighlight",value:function(){this.bounceable()||(this.player.emit("tour_manual","prev"),this.interrupt(BlackoutStyle.BEGINNING)||this.isInterrupted()||(this.clearWalkingSectionPaused(),this.reachSource="prev",this.goPrev()))}},{key:"nextHighlight",value:function(){this.bounceable()||(this.player.emit("tour_manual","next"),this.interrupt(BlackoutStyle.BEGINNING)||this.isInterrupted()||(this.clearWalkingSectionPaused(),this.reachSource="next",this.goNext()))}},{key:"changeMode",value:function(e,t){var i=t||"gui";switch(this.wouldInterrupt()&&this.interrupt(),this.player.controls[e].emit("interaction."+i),this.clearWalkingSectionPaused(),e){case D["a"].PANORAMA:this.player.insideMode();break;case D["a"].DOLLHOUSE:case D["a"].FLOORPLAN:this.player.flyToNewMode({mode:e})}}},{key:"atEndOfTour",value:function(){var e=this.currentItem>=this.nItems-1;return e}},{key:"firstDestination",value:function(){if(this.nItems<=0)return null;for(var e=0;e<this.nItems;e++)if(this.player.model.images["list"][e].script===this.currentScript)return e;return 0}},{key:"finalDestination",value:function(){if(this.nItems<=0)return null;for(var e=this.nItems-1;e>=0;e--)if(this.player.model.images["list"][e].script===this.currentScript)return e;return 0}},{key:"goPrev",value:function(){this.tourAdvance(-1)}},{key:"goNext",value:function(){this.tourAdvance(1)}},{key:"setDestinationItem",value:function(e){e>this.nItems&&(e=this.firstDestination()),this.destinationItem=e,this.emit("update.controls")}},{key:"setCurrentItem",value:function(e){this.currentItem=e,this.emit("update.controls")}},{key:"nextItem",value:function(e){return null===e?this.firstDestination():e>=this.nItems-1?this.endlessLoop?this.firstDestination():null:e+1}},{key:"prevItem",value:function(e){return null===e?this.firstDestination():e<0?this.endlessLoop?this.lastDestination():null:e-1}},{key:"tourAdvance",value:function(e){O["a"].debug("tourAdvance("+e+")"),null===this.currentItem||void 0===this.currentItem?this.setDestinationItem(this.firstDestination()):this.setDestinationItem(this.currentItem+e),this.destinationItem<0?(this.setDestinationItem(this.finalDestination()),this.useSpecialTransition("reverse-looping to end")):this.destinationItem>=this.nItems&&(this.setDestinationItem(this.firstDestination()),this.useSpecialTransition("looping back to start")),this.goToDestination()}}]),i}(m["default"])),i("583b"),i("8970");var yn=i("9c7d");function bn(e,t){this.quickstart=!0,this.mode=D["a"].PANORAMA,this.zoom=-1,this.fov=At["a"].urlHasValue("fov")?Number(At["a"].urlQueryValue("fov")):f["a"].insideFOV,this.pano=null,this.position=new THREE.Vector3,this.quaternion=new THREE.Quaternion;var i=At["a"].urlHasValue("firstView",!0);if(i)try{i=C["a"].replaceAll(i,"pano:",'"pano":"'),i=C["a"].replaceAll(i,",qua:",'","qua":['),i="{"+i+"]}";var n=JSON.parse(i);this.pano=t.get(n.pano),this.pano?(this.quaternion=(new THREE.Quaternion).fromArray(n.qua),this.zoom=-1,this.setByUrl=!0):(i=!1,console.error("检测到firstView但是 找不到该pano"))}catch(s){i=!1,console.error("检测到firstView但是解析出错"+s)}if(!i)if(e.entry){var o=e.entry;o.pano&&(this.pano=t.get(o.pano)),null!=this.pano&&"undefined"!=typeof this.pano||(this.pano=t.list[0]),this.quaternion.copy(this.pano.quaternion),o.camera&&(this.quaternion=(new THREE.Quaternion).fromArray(o.camera.quaternion),this.zoom=o.camera.zoom)}else this.pano=t.list[0],this.quaternion.copy(this.pano.quaternion);if(this.position.copy(this.pano.position),"shipin"==x["a"].appenv&&!this.pano.hasVideo){var a=null;if(oi["app"].store.getters["scene/metadata"].videos.videos){var r=oi["app"].store.getters["scene/metadata"].videos.videos.keys().next().value;a=t.get(r)}a?(this.pano=a,this.quaternion.copy(this.pano.quaternion),this.position.copy(this.pano.position)):console.warn("场景未找到球幕视频")}this.quaternion.equals(new THREE.Quaternion(-.5,.5,.5,.5))&&(this.quaternion.set(0,0,0,1),console.log("检测到初始画面quaternion为-0.5,0.5,0.5,0.5,强制更改为0,0,0,1"))}window.__getFirstView=function(){var e=function(e){console.log("&firstView=pano:".concat(e.metadata.scan_id,",qua:").concat(__math.toPrecision(e.metadata.camera_quaternion.toArray(),4)))};e(oi["app"].player.getSnapAngleInfo())},bn.prototype.fromGuideView=function(e,t){this.mode=e.value.mode,this.zoom=e.value.zoom,this.position.copy(e.value.pos),this.quaternion.set(e.value.qua._x,e.value.qua._y,e.value.qua._z,e.value.qua._w),this.pano=t.get(e.value.pano)};var wn=i("3713");i("63d9");function En(e){var t=Tn();return function(){var i,n=Object(h["a"])(e);if(t){var o=Object(h["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(u["a"])(this,i)}}function Tn(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var Pn,xn=function(e){Object(c["a"])(i,e);var t=En(i);function i(e,n){var a;return Object(o["a"])(this,i),a=t.call(this),a.sceneRenderer=e,a.model=n,a.head=null,a.pole=null,a.plane=null,a.model.flag=Object(s["a"])(a),a.updateHandler=0,a.animHandler=null,le["a"].on("flag/close",a.close.bind(Object(s["a"])(a))),le["a"].on("flag/hidden",a.hidden.bind(Object(s["a"])(a))),le["a"].on("flag/title",(function(e){return a.setContent(e)})),a}return Object(r["a"])(i,[{key:"initPose",value:function(e){var t=e.pano,i=e.quaternion,n=t.marker.position.clone(),o=new Ut["Vector3"](0,0,-1).applyQuaternion(i);this.position.copy(o.multiplyScalar(1.2).add(n)),this.lookAt(n)}},{key:"setContent",value:function(e){this.buildObject3D();var t=document.createElement("canvas");t.width=512,t.height=256;var i=t.getContext("2d"),n=new Image;n.src="static/img/guide/flag-bg.png",n.onload=function(){i.drawImage(n,0,0),i.font="normal bold 40px Arial",i.fillStyle="white",i.fillText("欢迎光临",50,80);var t=new Image;t.src="static/img/guide/welcome.png",t.onload=function(){i.drawImage(t,250,45)},e.length>10&&(e=e.substr(0,10)+"..."),i.font="30px Arial",i.fillStyle="#fefefe",i.fillText(e,50,135),i.font="normal bold 40px Arial",i.fillStyle="#23F9FE",i.fillText("开始讲房之旅",50,200);var a=new Image;a.src="static/img/guide/play.png",a.onload=function(){i.drawImage(a,0,0,150,163,320,165,50,50),o.needsUpdate=!0}};var o=new Ut["CanvasTexture"](t);o.flipY=!1,this.plane.material.map=o}},{key:"buildObject3D",value:function(){var e=new Ut["TextureLoader"],t=new Ut["BufferGeometry"];t.addAttribute("position",new Ut["Float32Attribute"](new Float32Array([-.002,0,0,.002,0,0,-.002,1.5,0,.002,1.5,0]),3)),t.setIndex([0,1,2,2,1,3]);var i=new Ut["MeshBasicMaterial"]({color:16777215,depthTest:!1,transparent:!0}),n=window.pole=new Ut["Mesh"](t,i);n.name="guidFlagPole",this.add(n),this.pole=n;var o=new Ut["PlaneBufferGeometry"];o.addAttribute("position",new Ut["Float32Attribute"](new Float32Array([0,0,0,1,0,0,0,.5,0,1,.5,0]),3)),o.setIndex([0,1,2,2,1,3]);var a=new Ut["MeshBasicMaterial"]({map:e.load("static/img/guide/flag-bg.png"),transparent:!0,side:Ut["DoubleSide"],depthTest:!1}),r=new Ut["Mesh"](o,a);r.name="guideFlagPlane",r.position.set(.01,1,0),this.add(r),this.plane=r;var s=new Ut["BoxBufferGeometry"](.05,.05,.05);s.rotateX(Math.PI/4),s.rotateZ(Math.PI/4);var l=new Ut["MeshBasicMaterial"]({map:e.load("static/img/guide/flag-head-bg.png"),transparent:!0,side:Ut["DoubleSide"],depthTest:!1}),c=new Ut["Mesh"](s,l);c.name="guideFlagHead",c.position.set(0,1.55,0),this.add(c),this.head=c,this.name="guideFlag",this.sceneRenderer.scene.add(this),this.model.floors.list[0].collider.add(this),this.update()}},{key:"update",value:function(){this.head.rotateY(.064),this.updateHandler=window.requestAnimationFrame(this.update.bind(this))}},{key:"open",value:function(){var e=this;this.animHandler&&E["a"].cancel(this.animHandler);var t=function(t){var i=Ut["Math"].smoothstep(t,0,.3);e.pole.scale.set(1,i,1);var n=Ut["Math"].smoothstep(t,.3,.6);e.plane.scale.set(n,1,1);var o=Ut["Math"].smoothstep(t,.6,1);e.head.material.opacity=o};this.animHandler=E["a"].start(t,3e3)}},{key:"close",value:function(){var e=this;if(this._close)le["a"].emit("flag/closed");else{this.animHandler&&E["a"].cancel(this.animHandler);var t=function(t){var i=Ut["Math"].smoothstep(t,0,.3);e.head.material.opacity=1-i;var n=Ut["Math"].smoothstep(t,.3,.6);e.plane.scale.set(1-n,1,1);var o=Ut["Math"].smoothstep(t,.6,1);e.pole.scale.set(1,1-o,1)};this.animHandler=E["a"].start(t,1200,(function(){le["a"].emit("flag/closed"),e._close=!0}))}}},{key:"onClick",value:function(){le["a"].emit("flag/click"),this.close()}},{key:"hidden",value:function(){var e=this;if(!this._close){this.animHandler&&E["a"].cancel(this.animHandler);var t=function(t){var i=Ut["Math"].smoothstep(t,0,.3);e.head.material.opacity=1-i;var n=Ut["Math"].smoothstep(t,.3,.6);e.plane.scale.set(1-n,1,1);var o=Ut["Math"].smoothstep(t,.6,1);e.pole.scale.set(1,1-o,1)};this.animHandler=E["a"].start(t,1200,(function(){e._close=!0}))}}},{key:"destroy",value:function(){this._close=!0,window.cancelAnimationFrame(this.updateHandler),this.sceneRenderer.scene.remove(this),this.head&&(this.remove(this.head),this.head.material.dispose(),this.head.geometry.dispose(),this.head=null),this.plane&&(this.remove(this.plane),this.plane.material.map.dispose(),this.plane.material.dispose(),this.plane.geometry.dispose(),this.plane=null),this.pole&&(this.remove(this.pole),this.pole.material.dispose(),this.pole.geometry.dispose(),this.pole=null)}}]),i}(Ut["Object3D"]),kn=xn;function Rn(e){var t=_n();return function(){var i,n=Object(h["a"])(e);if(t){var o=Object(h["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(u["a"])(this,i)}}function _n(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}t["a"]=new(Pn=function(e){Object(c["a"])(i,e);var t=Rn(i);function i(){var e;return Object(o["a"])(this,i),e=t.call(this),Object(p["a"])(Object(s["a"])(e),"reloadCADImg",function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(t){var i,o,a,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:i=0,o=0,x["a"].version&&(a=(x["a"].version+"").split("_"),o=a[0],void 0!=a[1]&&(i=parseInt(a[1])+1)),r=o+"_"+i,x["a"].version=r,t&&t.cadInfo&&(this.store.commit("scene/SetMetadataValue",{key:"cadInfo",value:t.cadInfo}),le["a"].emit("recheckCadImg")),setTimeout(Object(n["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:this.model.cadFloorPlane.remove(),this.model.cadFloorPlane.Init(this.model),this.model.compass.setNorth(),this.model.compass.render();case 3:case"end":return e.stop()}}),e,this)}))).bind(this),1e3);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),Object(p["a"])(Object(s["a"])(e),"reloadModelAfterSaveWall",function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(t){var i,o,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(i=x["a"].isMobile||t&&t.isPublish,o=this.store.getters["scene/metadata"],!x["a"].rebuild){e.next=5;break}return console.log(" 调用了多次reloadModelAfterSaveWall, 上一次还没加载完 返回"),e.abrupt("return");case 5:x["a"].rebuild=!0,je["a"].show(),x["a"].isTyping=!0,console.log("reloadModelAfterSaveWall"),i?(a=(o.floorEditVer||0)+1,this.store.commit("scene/SetMetadataValue",{key:"floorEditVer",value:a}),this.store.commit("scene/SetMetadataValue",{key:"floorPublishVer",value:a})):this.store.commit("scene/SetMetadataValue",{key:"floorEditVer",value:(o.floorEditVer||0)+1}),this.player.model.destroyBeforeRebuild(),E["a"].cancelById(f["a"].freeze.LookTransition),setTimeout(Object(n["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.loaders.loadModel(null);case 2:return console.log("重建三维模型!"),this.player.model.reBuild(this.player.mode),this.player.emit("pano.chosen",this.player.currentPano,this.player.currentPano),m["objects"].mainDesign.afterReloadModel(),e.next=8,this.loaders.loadFloor();case 8:this.store.dispatch("hotspot/SaveSettingWhenEditModel").then((function(){x["a"].rebuild=!1,je["a"].hide()})).catch((function(){console.log("saveFail"),x["a"].rebuild=!1,je["a"].hide()})),x["a"].isTyping=!1;case 10:case"end":return e.stop()}}),e,this)}))).bind(this),i?1e3:0);case 13:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()),e.object3d=null,e.quickstart=!1,e.objectSet=null,e.position=new THREE.Vector3(15,10,15),e.loaders=new Nt,e.panoVideoRenderer=Ii,e.firstView=null,e.active=!1,e.unlockDom=null,window.app=Object(s["a"])(e),e.panoRenderer=new Le["a"],e.sceneRenderer=new Fe["a"],e.tileDownloader=new He["a"],m["objects"].sceneRenderer=e.sceneRenderer,m["objects"].tileDownloader=e.tileDownloader,e}return Object(r["a"])(i,[{key:"use",value:function(e){return this.projectNum=e,this}},{key:"start",value:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(){var t,i,o,a,r,s=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.dom=document.getElementById("player"),t=this.startOption={needUnlock:me["a"].urlHasValue("needUnlock")},e.prev=2,e.next=5,this.loaders.loadModelMeta();case 5:if(i=e.sent,"sxz"!=x["a"].name||!i.isUploadObj){e.next=9;break}return Object(se["a"])({content:he["a"].t("tips.model_deny")}),e.abrupt("return");case 9:if(1!=i.needKey){e.next=12;break}return e.next=12,Mt["b"].listener();case 12:e.next=17;break;case 14:e.prev=14,e.t0=e["catch"](2),console.error(e.t0);case 17:return x["a"].isMobile&&("decor"==x["a"].name?f["a"].insideFOV=88.5:f["a"].insideFOV=90,f["a"].insideFOVMax=130),e.next=20,pi.handle(i);case 20:this.onLoadingProgress(10),o=parseInt(i.sceneScheme),a=parseInt(i.sceneSource),o&&(me["a"].urlHasValue("use_tiles")?x["a"].supportsTiles=14==a||0!=me["a"].urlQueryValue("use_tiles"):x["a"].supportsTiles=o>=10||3==o,12==o||"decor"==x["a"].name?(x["a"].tileClass="1k",f["a"].zoom.enabled=!1):3==a||10==o&&!x["a"].isMobile?(x["a"].tileClass="4k",3==a&&x["a"].isMobile&&me["a"].urlHasValue("1k")?x["a"].navTileClass="1k":x["a"].navTileClass="2k",3==a&&(f["a"].limitAngleIsBound=!0,f["a"].insideLookLimitDown=-60,f["a"].insideLookLimitUp=60)):(x["a"].tileClass="2k",x["a"].navTileClass="2k")),x["a"].supportsTiles&&this.tileDownloader.start(),x["a"].visions=2==a||12==a||11==a||3==o?1:2,this.beforeLoad(i),r=new wn["a"](f["a"].option,f["a"].modelMeta),console.log("测试类似抖音:开始加载Panos————"+this.projectNum),r.loadPanos().then((function(e){return s.startSceneRenderer(s.sceneRenderer,s.dom),s.modelManager.init(s.tileDownloader,s.panoRenderer,s.qualityManager),s.modelManager.addModel(e),console.log("测试类似抖音:加载完Panos了,开始准备播放视频了————"+s.projectNum),s.firstView=new bn(i,e.panos),s.firstView.quickstart?s.quickEnter(s.firstView,i,t):s.onLoadingProgress(30)})).then((function(){return console.log("测试类似抖音:播放完视频了————"+s.projectNum),s.firstView.quickstart||s.onLoadingProgress(50),r.load()})).then((function(){if(s.afterLoad(r),!x["a"].supportsTiles){var e=new dn(s.player,s.panoVideoRenderer);e.start()}return t.needUnlock?(s.player.start(s.firstView).then((function(){s.firstView.quickstart&&(s.sceneRenderer.removeComponent(s.quickstartManager),s.quickstartManager.destroy()),s.onLoadingProgress(-1),s.onLoadNotify("loaded"),s.ready=!0})),s):s.loaders.loadGuide().then((function(){s.firstView.quickstart||s.onLoadingProgress(100);var e=s.store.getters["guide/plays"];if(e.length>0&&(x["a"].isEdit||s.firstView.quickstart||s.firstView.fromGuideView(e[0],r.panos),"vrhouse"==x["a"].name)){var t=window.flag=new kn(s.sceneRenderer,r);t.initPose(s.firstView)}s.player.start(s.firstView).then((function(){s.firstView.quickstart&&(s.sceneRenderer.removeComponent(s.quickstartManager),s.quickstartManager.destroy()),s.onLoadingProgress(-1),s.onLoadNotify("loaded"),yn["a"].init(s.director,s.cameraControls,s.player,s.modelManager,s.sceneRenderer),s.ready=!0}))}))})).then((function(){s.loaders.loadModelAddition().then(Object(n["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:s.tagManager.init(),s.tagManager.onPlayerReady(!1,!0),(x["a"].isEdit||s.store.getters.showNavigations.measure)&&s.loaders.loadAssistPanos(),setTimeout((function(){s.panoVideoRenderer.videoPlayer&&s.panoVideoRenderer.videoPlayer.preloadAll&&s.panoVideoRenderer.videoPlayer.preloadAll()}),5e3),s.loaders.loadLink(),s.onLoadNotify("ready");case 6:case"end":return e.stop()}}),e)})))),s.store.commit("scene/InitBackgroundMusic"),s.onLoadNotify("complete")}));case 30:case"end":return e.stop()}}),e,this,[[2,14]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"beforeLoad",value:function(e){this.sceneRenderer.createScene(),this.cameraControls.init(this.dom,this.modelManager),this.qualityManager.init(this.modelManager,e),this.panoRenderer.init(this.sceneRenderer,this.tileDownloader,this.qualityManager),this.panoVideoRenderer.init(this.dom,this.sceneRenderer,e),this.sceneRenderer.addComponent(E["a"])}},{key:"afterLoad",value:function(e){this.sceneRenderer.scene.add(e);var t=this.panoVideoRenderer.getActivePanorama();t&&this.panoVideoRenderer.activatePanorama(t),this.player.init(this.dom),this.player.setScene(this.sceneRenderer.scene),this.displayController.init(this.dom),Bt["a"].bindEvents(this.player),this.sceneRenderer.addComponent(this.tagManager),this.sceneRenderer.addComponent(this.player),this.director.init()}},{key:"startSceneRenderer",value:function(e,t){if(!this.sceneRenderer.started)try{e.start(t)}catch(i){O["a"].warn(i.message)}}},{key:"quickEnter",value:function(e,t,i){var n=this;this.cameraControls.activateControls(e.mode);var o=this.cameraControls.activeControl;return this.quickstartManager=new zi(this.qualityManager,this.sceneRenderer.scene,this.sceneRenderer.camera,o,this.dom,this.panoVideoRenderer,this),this.quickstartManager.init(e,t),this.onLoadNotify("quickstart"),me["a"].urlHasValue("app")?i.needUnlock?this.quickstartManager.watingUnlock():this.quickstartManager.autoUnlock():this.quickstartManager.load().then((function(){return n.startSceneRenderer(n.sceneRenderer,n.dom),n.sceneRenderer.addComponent(n.quickstartManager),n.onLoadingProgress(-1),i.needUnlock?n.quickstartManager.watingUnlock():n.quickstartManager.autoUnlock()}))}},{key:"onLoadingProgress",value:function(e){this.store.commit("SetPlayerOptions",{progres:e})}},{key:"activate",value:function(){this.active=!0,this.quickstartManager&&this.quickstartManager.activate(),this.store.commit("SetPlayerOptions",{showAppUI:!0})}},{key:"exit",value:function(){this.quickstartManager&&this.quickstartManager.exit(),this.store.commit("SetPlayerOptions",{showAppUI:!1})}},{key:"touchEvent",value:function(e,t){this.quickstartManager&&this.quickstartManager.onTouchEvent(e,t)}},{key:"onLoadNotify",value:function(e){le["a"].emit(e);try{-1!=window.location.href.indexOf("decor.html")?window.postMessage({cmd:e,isParent:!0,href:window.location.href},"*"):parent.postMessage({cmd:e,isParent:parent==self,href:window.location.href},"*")}catch(t){console.error("跨域",t)}}}]),i}(m["default"]),Pn)},fa5b:function(e,t,i){"use strict";var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"v-popup-layer",style:{"z-index":e.zIndex,"pointer-events":e.isPass?"none":"all","background-color":e.bgColor},on:{touchmove:function(e){e.preventDefault()},click:e.onClick}},[e._t("default")],2)},o=[],a=99999;function r(){return++a}var s={name:"v-popup-layer",props:{isPass:Boolean,canClose:Boolean,bgColor:String},data:function(){return{zIndex:r()}},methods:{onClick:function(){this.canClose&&this.$emit("close")}}},l=s,c=(i("e53f"),i("2877")),u=Object(c["a"])(l,n,o,!1,null,"1a930975",null);t["a"]=u.exports},fac6:function(e,t,i){e.exports=i.p+"static/img/1.d3e65825.png"},fafa:function(e,t,i){"use strict";i.d(t,"b",(function(){return r})),i.d(t,"a",(function(){return s}));var n=i("d4ec"),o=i("bee2"),a=function(){function e(){Object(n["a"])(this,e),this._resolve=null}return Object(o["a"])(e,[{key:"register",value:function(e){this._promise=e(this)}},{key:"listener",value:function(){return this._promise?this._promise:Promise.resolve()}},{key:"valid",value:function(){this._resolve&&this._resolve()}},{key:"resolve",value:function(e){this._resolve=e}}]),e}(),r=new a,s=new a},fc0a:function(e,t,i){"use strict";i("7f7f"),i("ac6a");var n=i("6860"),o=i("80c5"),a=i("9c7d"),r=i("cbe8"),s=i("9ef6"),l=function(e){n["objects"].player.reticule.visible=!0,n["objects"].player.model.floorLogos.firstLogo.visible=e.fL0,n["objects"].player.model.floorLogos.secondLogo.visible=e.fL1,n["objects"].player.path.currentPanoMarker.mesh.visible=!0,n["objects"].player.model.panos.list.forEach((function(e){e.isAligned()&&(e.marker.visible=e.marker.forceHide)})),n["objects"].player.cameraControls.controls.floorplan.snapshotTopAspect=null,n["objects"].player.mode!=o["a"].PANORAMA&&(n["objects"].player.model.chunks.forEach((function(e){e.material.side=THREE.FrontSide})),n["objects"].sceneRenderer.scene.skyboxBG.material.side=THREE.BackSide),n["objects"].player.model.skybox.material.side=THREE.BackSide,n["objects"].overlayManager.group.visible=!0},c=function(e){n["objects"].player.model.fishSkybox||(n["objects"].player.model.fishSkybox=new THREE.Mesh(new THREE.SphereGeometry(r["a"].skyRadius,80,50),n["objects"].player.model.skybox.material),n["objects"].sceneRenderer.scene.add(n["objects"].player.model.fishSkybox)),n["objects"].player.model.fishSkybox.position.copy(n["objects"].player.position),n["objects"].player.model.fishSkybox.visible=!0,n["objects"].player.model.skybox.visible=!1;for(var t=0;t<n["objects"].player.model.chunks.length;t++)n["objects"].player.model.chunks[t].visible=!1;e.cameraPosOld=n["objects"].player.camera.position.clone(),n["objects"].player.cameraControls.activeControl.fishState=!0,n["objects"].player.cameraControls.activeControl.camera.fov=s["a"].fish.insideFOV,n["objects"].player.cameraControls.activeControl.target.copy(n["objects"].player.position),n["objects"].player.updateFromControls()},u=function(e){if(n["objects"].player.mode==o["a"].PANORAMA){n["objects"].player.cameraControls.activeControl.camera.position.copy(e.cameraPosOld),n["objects"].player.cameraControls.activeControl.fishState=!1,n["objects"].player.model.fishSkybox.visible=!1,n["objects"].player.model.skybox.visible=!0;for(var t=0;t<n["objects"].player.model.chunks.length;t++)n["objects"].player.model.chunks[t].visible=!0;n["objects"].player.cameraControls.activeControl.camera.fov=s["a"].insideFOV}n["objects"].player.updateFromControls()},d=function e(t,i){var o,r;t.tasks.unFish&&t.tasks.unFish.length?(o=t.tasks.unFish.splice(0,1)[0],r="unFish"):t.tasks.fish&&t.tasks.fish.length?(o=t.tasks.fish.splice(0,1)[0],r="fish"):r="finish","unFish"==i&&"fish"==r?c(t.changeBefore):"fish"==i&&"finish"==r?(u(t.changeBefore),l(t.changeBefore)):"finish"==r?l(t.changeBefore):n["logger"].info("other state:"+i+"|"+r),"finish"!=r&&a["a"].takeScreenShot({resolution:{width:o.width,height:o.height},quality:s["a"].isSafari?45:60},(function(i){t.f&&t.f(i.message,o.name,i),e(t,r)}))},h=function(e){(n["objects"].player.flying||n["objects"].player.isWarping()||n["objects"].player.mode==o["a"].TRANSITIONING)&&n["logger"].warn("you take a screenshot 当 flying or transitioning mode!!请检查截图");var t=function(){var t=Object(n["getPlayerSize"])(),i=t.width,a=t.height,r=n["objects"].player.model.floorLogos.firstLogo.visible,s=n["objects"].player.model.floorLogos.secondLogo.visible;n["objects"].player.model.panos.list.forEach((function(e){e.isAligned()&&(e.marker.forceHide=e.marker.visible,e.marker.visible=!1)})),n["objects"].player.reticule.visible=!1,n["objects"].player.model.floorLogos.firstLogo.visible=!1,n["objects"].player.model.floorLogos.secondLogo.visible=!1,n["objects"].player.path.currentPanoMarker.mesh.visible=!1,n["objects"].player.mode!=o["a"].PANORAMA&&(n["objects"].player.model.chunks.forEach((function(e){e.material.side=THREE.BackSide})),n["objects"].sceneRenderer.scene.skyboxBG.material.side=THREE.FrontSide),n["objects"].player.model.skybox.material.side=THREE.DoubleSide,n["objects"].overlayManager.group.visible=!1,e.snapshotTopview&&n["objects"].player.mode==o["a"].FLOORPLAN&&(n["objects"].player.cameraControls.controls.floorplan.snapshotTopAspect=i/a),e.changeBefore={fL0:r,fL1:s,notHideTags:e.notHideTags},d(e)};return t(),!0};t["a"]=h},fc59:function(e,t,i){e.exports=i.p+"static/img/0.ef3ccb8f.png"},fda0:function(e,t){e.exports={menu:{__name:"Menu",music:"musique",base:"Paramètres",information:"Scène Info",screen:"Couverture de la Scène",hotspot:"Ajouter Hotspot",guide:"Visite Guidée",sign:"Spot Logo",walk:"Possibilité de roaming",model:"Modification du modèle",cad:"FloorPlan",custom:"Upload Download",videos:"Ajouter Vidéos",vrhouse:"VR maison",business:"Section Business",scene:"Transition Scène",video:"Ajouter vidéo",decor:"Décore",link:"Scene associate"},modules:{__name:"Module",base:{__name:"Paramètres",qrcode:"QR Code",qrcode_download:"Télécharger le code QR",qrcode_tips:"Personnaliser votre logo",scene_link:"Link de la Scène",scene_link_copy:"Copier le link",scene_link_copy_tips:"Copié",bgm:"Musique",pano_text:"Roaming",mode_2d_text:"Plan",mode_3d_text:"Modèle 3D",map_text:"Mini-carte",vr_text:"Mode VR",vr_tips:"Regardez l'effet VR sur la page d'affichage mobile",guide_text:"Visite Guidée",rule_text:"Mesures",cad_text:"Plan",measure_text:"Règle",measure_tips:"La fonction de mesure ne peut pas être utilisée en mode d'éditing, veuillez l'utiliser sur la page d'affichage",turned_vr:"VR allumé {status}",turned_map:"Fonction Mini-carte {status}",turned_cad:"Plan {status}",turned_m2d:"Vue en plan {status}",turned_m3d:"Vue 3D {status}",turned_pano:"Vue Roaming {status}",turned_rule:"Fonction de measure {status}",turned_guide:"Visite guidé {status}",turned_measure:"Règle {status}",shortcut_copy:"Copier en un click",share_link:"Partager le link avec vos amis",measure_show_tips:"Veuillez utiliser la fonction de mesure sur la page d'affichage",delete_measure_line:"Effacer les liges de mesure",please_click_tips:"'Veuillez clicker sure “autoriser”'",vr_fail_app_tips:"Le navigateur n'a pas réussi à détecter la rotation. Veuillez activer les paramètres tels que l'accès au mouvement et à la direction dans les paramètres du téléphone ou du navigateur, puis actualisez cette page.",vr_fail_safari_tips:'Le navigateur n\'a pas réussi à détecter la rotation. Pour profiter pleinement de l\'effet VR, veuillez ouvrir le commutateur "Accès aux mouvements et à la direction " sous "Paramètres "> "Safari "> "Confidentialité et sécurité ", puis actualisez cette page.',loading_bottom_text:"4Dage offre le support technique",vr_fail_reopen_tips:"Impossible d'accéder au mouvement et à l'orientation, veuillez redémarrer l'application et réessayer.",add_music_title:"Ajouter Musique",add_music_tips:"Nous acceptons les formats MP3, WAV et d'autres formats audio, avec un max de 5MB",re_add_music:"Re-ajouter",re_add_title:"Re-ajouter Musique",re_add_tips:"La dernière musique remplacera la musique déjà ajoutée, <br> Êtes-vous sûr de continuer à ajouter?",re_add_mobile_tips:"Re-ajouter remplacera la musique déjà ajoutée",delete_tips:"Êtes-vous sûr d'effacer la musique actuelle?",delete_title:"Effacer Musique",bgm_empty_tips:"Veuillez sélectionner la Musique",wechat:"Wechat",friend_circle:"Moments"},information:{__name:"Informations sur la scène",title:"Titre",title_tips:"Veuillez entrer un titre",title_require:"Veuillez ajouter un titre (max {limit} caractères).",description:"Description",description_tips:"Veuillez entrer une description.",link:"Ajouter un link",link_text_tips:"Titre du link",link_href_tips:"Link",link_text_require:"Veuillez compléter le texte.",link_href_require:"Veuillez compléter le link.",classify:"Choisir une catégorie",upload_time:"Date du chargement",record:"Non enregistré",shoot_count:"Nombre de positions",password:"Définissez un mot de passe",password_tips:"4 caractères",password_desc:"Définissez un mot de passe si vous ne voulez pas que le modèle soit accessible au publique.",password_require:"Veuillez entrer un mot de passe ave {limit} chiffres",logo_edit:"Editer le logo",logo_exit:"Finir d'éditer le logo",logo_show_bottom:"Montrer le logo original",logo_style1:"Logo style 1",logo_style2:"Logo style 2",logo_delete:"Effacer le logo chargé?"},screen:{__name:"Écran initial",current:"Couverture actuelle",current_set:"Sélectionner couverture",tips:"Bouger l'écran, clicker et sauver votre couverture de scène."},hotspot:{__name:"Ajouter un hotspot",add:"Ajouter un hotspot",edit:"Editer hotspot",count:"Hotspots ajoutés",location:"Emplacement du Hotspot",location_tips:"Tirer le hotspot dans une autre position.",location_modify:"Modifier la position du hotspot",location_confirm:"Confirmer la position du hotspot",location_desc:"Faites glisser le hotspot dans les deux zones de scène sur la gauche et alignez-le sur le point souhaité.",style:"Choisir style du hotspot",style_desc:"Choisissez le style de base, ou charger manuellement une image pour personnaliser le style, charger une image au format PNG/JPG",style_name:"Style",style_dele:"Êtes-vous sûr d'effacer ce style?",style_manage:"Gérer",style_exit:"Fermer",media_photo:"Ajoutez images pour enrichir le contenu du hotspot",media_video:"Charger des videos locales pour plus d'affichage",media_voice:"Charger du contenu audio local pour expliquer le hotspot",media_link:"Vous pouvez ajouter un lien hypertexte vers la vidéo et la vidéo sera lue dans le hotspot",title:"Titre",title_tips:"Veuillez entrer un titre",title_require:"Veuillez entrer un titre (max {limit} caractères).",description:"Description",description_tips:"Veuillez entrer une description.",text_link:"Ajouter un link",text_link_text_tips:"Veuillez compléter le texte du link",text_link_href_tips:"Veuillez compléter l'addresse du link",text_link_text_require:"Le texte du link ne peut pas être vide",text_link_href_require:"L'addresse du link ne peut pas être vide",link:"Ajouter un link",link_require:"Veuillez ajouter un link externe",photo:"Photo",voice:"Audio",video:"Vidéo",photo_tips:"Supporte les formats JPG, PNG et autres formats image",voice_tips:"Supporte MP3, WAV et autres formats audio",video_tips:"Supporte format MP4. <20M",photo_require:"Veuillez ajouter des photos",voice_require:"Veuillez ajouter un audio",video_require:"Veuillez ajouter des vidéos",m_location_tips1:"Pointez les hotspots de l'écran partagé au-dessus et en dessous de la cible marquée",m_location_tips2:"Déterminez la position du hotspot, clicker sur next pour éditer contenu",m_location_up:"Au-dessus",m_location_left:"Côté gauche",m_location_move_tips:"La position d'étalonnage auxiliaire peut être inexacte , <br> veuillez vérifier et faire glisser vers {direction} le même emplacement",set_visible_btn:"Visibilité des hotspots",save_visible_btn:"Sauver",save_hotspot_done:"Hotspot enregistré avec succès",save_hotspot_fail:"Échec de l'enregistrement du hotspot",delete_hotspot_tips:"Voulez-vous effacer ce hotspot?",delete_hotspot_done:"Hotspot effacé avec succès",delete_hotspot_fail:"Échec de la suppression du hotspot",cant_add_hotspot_tips:"Impossible d'ajouter le hotspot",cant_add_hotspot_content:"Le nombre de hotspots a atteint le maximum: {limit}",link_text_tips:"Titre du link",link_href_tips:"Link",link_text_require:"Veuillez compléter le texte",link_href_require:"Veuillez compléter le link",add_media:"Ajouter du contenu"},guide:{__name:"Visite Guidée",route:"Trajet du tour",view:"Changer la Vue",record:"Commencer l'enregistrement",record_audio:"Enregistrer",pause:"Pause",stop:"Stop",end:"Fin",delete:"Effacer",continue:"Continuer l'enregistrement",preview:"Aperçu",clear:"Nettoyer",sync:"Synchronisation Audiovisuel",sound:"Enregistrer audio",file:"Charger audio",file_add:"Ajouter audio",tips:'Clickez "Commencer" pour enregistrer la visite.',start:"Commencer",finish:"Finir",less:"<",replace_tips:"Voulez-vous recommencer l'enregistrement de la visite guidée?",replace_content:"Refaire l'enregistrement effacera les données précédentes.",sound_open_fail_tips:"Échec de l'activation du microphone",sound_tips:"Échec de l'activation du microphone, continuer l'enregistrement?",sound_content:"Veuillez autoriser ce site à utiliser le microphone dans les paramètres de votre navigateur et actualiser la page.",upload_sound_done:"Charger l'explication sonore avec succès",upload_sound_fail:"Échec du chargement de l'explication sonore",delete_sound_done:"Suppression de l'explication sonore avec succès",delete_sound_fail:"Échec de la suppression de l'explication sonore",room_title:"Titre",room_title_tips:"Veuillez entrer le titre de la chambre",room_title_require:"Veuillez entrer un titre",room_panel_title:"Information du guide",room_sound_title:"Enregistrer audio",delete_video_content:"Votre enregistrement actuel sera supprimé",delete_file_content:"Votre explication sonore actuellement chargée sera supprimée",delete_sound_content:"Votre audio enregistré sera supprimé",camera_save_success:"Caméra enregistrée avec succès",clear_video_tip:"Votre enregistrement actuel sera effacé",saving_sound:"Sauver l'enrgistrement sonore",save_sound_done:"Bande sonore enregistré avec succès",save_sound_fail:"Échec de l'enregistrement de la bande sonore",no_sound_tips:"Actuellement, nous ne supportons pas l'enregistrement. <br> Veuillez enregistrer sur WeChat ou sur un ordinateur",sound_success_tips:"Ouverture réussie du microphone",sound_fail_tips:"Actuellement, ne prend pas en charge l'enregistrement. <br> Erreur de configuration des informations de compte officiel",wechat_sound_fail_tips:"Échec de l'ouverture du microphone WeChat",open_sound_guide_tips:"Si vous souhaitez enregistrer, veuillez l'activer dans la gestion des paramètres WeChat-confidentialité-autorisation. Et assurez-vous que l'équipement d'enregistrement est normal",sound_cant_open_tips:"Ce navigateur ne prend pas en charge l'enregistrement. <br> Il est recommandé de d'utiliser d'autres navigateurs grand public pour une meilleure expérience",replace_sound_tips:"Re-enregistrer?",replace_sound_content:"L'explication sonore actuelle sera remplacée",merge_sound_fail:"Échec de la fusion des explication sonores",sound_limit:"La durée d'enregistrement ne peut pas dépasser {time} minutes",select_to_record:"Veuillez selectionner le point correspondand pour enregistrer la visite guidée dans cette zone"},sign:{title:"Style du Logo",size:"Taille",style0:"Style un",style1:"Style deux",style2:"Style trois",style3:"Charger"},walk:{title:"Possibilité de Roaming",tips1:"Optimisez davantage l'expérience de la visite en définissant la possibilité de roaming, par example dans les cas dans lesquels on peut pénétrer à travers les murs.",tips2:"Définissez la possibilité de roaming en cliquant et en définissant la connexion de chaque point.",save:"Sauver les paramètres actuels",hide:"Cacher le point",show:"Montrer le point",pano_tips:"Tip: You hide the initial point, so you can't roam in this scene."},model:{__name:"Modifier le modèle",cad:"Vue CAD",cad_download:"Télecharger le Plan",view:"Changer de Vue",title:"Ajouter une structure",title_door:"Portes et fenêtres",title_component:"Composants",title_other:"Autres",attribute:"Attributs",door:"Porte",slideDoor:"Porte coulissante",casement:"Fenêtre",bayCase:"Fenêtre en saillie",groundCase:"Fenêtre à la française",column:"Colonne",furnColumn:"Colonne de cadre",furnFlue:"Cheminée",point:"Point",line:"Mur intérieur",tagging:"Tag",tagging_name_tips:"Nom du Tag",tagging_area_tips:"Entrer zone",direction:"Boussole",wallLine:"Mur intérieur",widget_delete:"{widget} va être effacé",panel_btn_default:"Réinitialiser",panel_btn_delete:"Effacer",attr_img:"标注封面",attr_enter_btn:"标注封面",attr_out_btn:"退出",attr_un_img:"暂无图片",attr_not_select_img:"请先选择标注名称",attr_angle:"Angle de rotation",attr_within:"Inverser la direction",attr_ewidth:"Largeur",attr_eheight:"Hauteur",attr_tick:"Épaisseur",attr_showTitle:"Nom du tag",attr_showContent:"Surface de la zone",attr_top:"Haut",attr_bottom:"Bas",attr_estart:"Entry door",success:"{widget} ajouter avec succès",error_location:"La position actuelle ne peut pas être ajoutée {widget}",error_outdoor:"Outdoor cannot be added {widget}",error_something:"Structure à la position actuelle ne peut pas être ajoutée {widget}",error_widget:"La position actuelle ne peut pas être ajoutée {widget}",enter_adjust_floor:"Réglage du sol",exit_adjust_floor:"Sortir du mode Réglage",color_title:"Couleur du rapporteur:"},cad:{__name:"户型图",name:"户型图",no_tip:"不再提示",reset:"重置",rotate:"Rotate",cad_download:"户型图下载",cad_download_ing:"下载中…",label_tip:"点击右键或Esc键可以退出添加标注。",wall_tip:"点击右键或Esc键可以退出画墙。",save_undf_tip:"无法保存空户型图。",reload_tip:"即将导入由模型生成的户型图,此操作会清空所有户型,是否继续?",reset_tip:"此操作会清空现有户型,是否继续?",title_door:"门窗",title_component:"构建",title_wall:"画墙",title_other:"标注",border_wall:"外墙",wall:"内墙",attribute:"Attributs",door:"Porte",slideDoor:"Porte coulissante",doubleDoor:"双开门",casement:"Fenêtre",bayCase:"Fenêtre en saillie",groundCase:"Fenêtre à la française",column:"Colonne",furnColumn:"Colonne de cadre",furnFlue:"Cheminée",point:"Point",line:"Mur intérieur",tagging:"Tag",taggings:"Tags",tagging_custom_name_tips:"自定义房间名称",un_data_tip:"无法下载空户型图,请先绘制。",tagging_name_tips:"Nom du Tag",tagging_area_tips:"Entrer zone",direction:"Boussole",wallLine:"Mur intérieur",widget_delete:"{widget} va être effacé",panel_btn_default:"Réinitialiser",panel_btn_delete:"Effacer",attr_angle:"Angle de rotation",attr_within:"Inverser la direction",attr_ewidth:"Largeur",attr_eheight:"Hauteur",attr_tick:"Épaisseur",attr_showTitle:"Nom du tag",attr_showContent:"Surface de la zone",attr_top:"Haut",attr_bottom:"Bas",attr_estart:"Entry door",success:"{widget} ajouter avec succès",error_location:"La position actuelle ne peut pas être ajoutée {widget}",error_outdoor:"Outdoor cannot be added {widget}",error_something:"Structure à la position actuelle ne peut pas être ajoutée {widget}",error_widget:"La position actuelle ne peut pas être ajoutée {widget}",enter_adjust_floor:"Réglage du sol",exit_adjust_floor:"Sortir du mode Réglage",color_title:"Couleur du rapporteur:",hall_tests:"整套,客厅,走廊,餐厅,起居室,客餐厅,玄关,门厅",room_tests:"主卧,儿童房,次卧,客卧,老人房,卧室",other_tests:"书房,厨房,卫生间,多功能室,阳台,储物间,步入式衣柜,外景,露台(无顶),影视间,入房花园"},videos:{__name:"Ajouter une vidéo",tips:"Veuillez cliquer sur le plan de référence pour définir la position de la vidéo.",panel_title:"Attributs de la vidéo",panel_preview:"Aperçu",panel_upload:"Upload",panel_upload_tips:"Supporte le format MP4",panel_move:"Bouger",panel_zoom:"Zoomer",panel_thickness:"Épaisseur",recoverRatio:"Restaurer le ratio d'origine",recoverRatioTip:"Restaurer le ratio d'origine de la vidéo"},custom:{model_title:"Télécharger le modèle",uploading:"Chargement…",download:"Télecharger Origina",download_panos:"Télécharger panos",upload:"Charger le modèle modifié",title1:"Tutoriel pour le téléchargement/chargement du modèle",tips11:"1.Après avoir téléchargé le package ZIP du modèle de scène, ouvrez le fichier décompressé «mesh.obj» pour le modifier.",tips12:"2.Une fois la modification terminée, il est recommandé de rendre la texture du modèle. La texture de rendu doit être contrôlée à moins de 1,5 M tandis que les fichiers obj enregistrés doivent être contrôlés dans 3M.",tips13:"3.Après avoir terminé les étapes 1 et 2, empaquetez l'objet, le mtl et la texture dans un paquet zip et chargez-le.",title2:"Notes:",tips21:"1.Veuillez contrôler la taille du fichier, afin de ne pas geler lorsque vous naviguez, ce qui affectera votre expérience.",tips22:"2.Veuillez utiliser le même nom dans les packages obj et ZIP, sinon le remplacement échouera.",get_image_fail:"Impossible d'obtenir l'image. Veuillez vérifier vos paramètres réseau et réessayer.",download_model_fail:"Échec du téléchargement du modèle",reupload_tips:"Charger {type}",panoramic_upload:"Charger Pano",panoramic_upload_tips:"Charger Panorama",panoramic_upload_box_tips:"Veuillez charger l'image JPG <br> avec le nom de point correspondant.",panoramic_download:"Télécharger Pano",panoramic_download_tips:"Télécharger Panorama",panoramic:"Panorama",ball_video:"Vidéo",ball_video_upload_tips:"Charger Vidéo",ball_video_download_tips:"Télécharger Vidéo",ball_video_upload_box_tips:"La vidéo panoramique prend en charge le format MP4 <br> qui ne doit pas dépasser 1024M.",upload_title:"Charger les fichiers",upload_format_error:"Erreur de format de fichier, veuillez réimporter",upload_name_error:"Erreur du nom de fichier, veuillez réimporter",upload_success:"L'importation est réussie et prendra effet <br> après l'enregistrement et la publication",upload_code_5017:"Échec du chargement du modèle, <br> veuillez vous reporter au didacticiel à droite",upload_code_5018:"Le fichier zip ne peut avoir qu'un seul niveau de répertoire ou pas de répertoire",upload_code_5019:"Il ne doit y avoir qu'un seul fichier obj et mtl",upload_code_5020:"La texture doit être contrôlée dans un délai de 1,5 Mo et le fichier obj doit être contrôlé dans 20M",upload_code_5012:"Les données sont anormales",upload_code_5023:"Le format du fichier de chargement est incorrect, <br> uniquement format jpg ou mp4.",download_tips:"Téléchargement {type}",download_fail:"Échec du téléchargement"},vrhouse:{__name:"MaisonVR",linkto_management:"Aller à la gestion de MaisonVR",refer:"Refresh",scene_link:"场景链接"},business:{__name:"Module Commerce",list_title:"Liste des hotspots de la Scène",list_unf:"No hot-spots in this current scene",add_tip_info:"Please add hot-spots first then bind them.",linkto_management:"Management background",refer:"Refresh",scene_link:"Copy link",explain:"How to use",shopexplain:{1:"The current product data comes from the 4DKanKan-E-commerce which bound to the scene, if you need to add, ",2:"please click here."},select_style:"Select hot-spot type",join_info:"Add product information",add_com:"Add product",join_info_show:"The product will display in the hot-spot",select_com:"选择商品"},link:{__name:"跳转关联",title1:"Save the link",title2:"Edit the link",title3:"Panorama association",list_text:"Added links",btn_new_text:"Add a link",btn_add_title:"Positioning the connection point",btn_add_text:"Determine the connection point position",btn_add_desc:"Mark and drag the connection point to the suitable position",btn_edit_text:"Adjust the link position",style:"Link icon",style_name:"icon",style_desc:"upport customized icon with recommended size of 128*128 pixels. Support JPG/PNG format.",style_dele:"Delete this icon? <br /> The same icon used for other links will also be deleted.",desc_title:"Description",desc_tips:"Please enter a description.",desc_require:"Please enter a description.",type:"Choose the type of link",type_photo:"upport uploading panoramic pictures with an aspect ratio of 2:1, recommended pixel size should not be less than 6000 × 3000 pixels, and the file should not exceed 120M",type_photo_require:"Upload panoramic pictures.",type_link:"Please input the scene link.",type_link_tips:"http(s)://",type_link_require:"Please input the scene link.",enter_title:"Link cover",enter_require:"Please set a link cover",enter_btn_text:"Set a link cover",outer_title:"Exit spot position",outer_style:"Exit spot icon",outer_desc:"Support customized icon with recommended size of 128*128 pixels. Support JPG/PNG format.",outer_require:"Please set the position of exit spot.",outer_btn_text:"Set the position of exit spot.",links_title:"Select the panorama",links_tips:"Select the panorama and drag it to the corresponding position on the left to set the jump.",links_cancel_tips:"Cancel association settings"}},login:{__name:"Identification",title:"Message",login:"Log in",logon:"Log in et continuer",login_tips:"Vous n'êtes pas connecté. Veuillez vous connecter pour modifier."},common:{__name:"Publique",on:"on",off:"off",add:"Ajouter",set:"OK",ok:"OK",save:"Sauver",cancel:"Annuler",complete:"Compléter",edit:"Modifier",giveup:"Abandonner",commit:"Engager",photo:"Photo",voice:"Audio",video:"Vidéo",bgm:"Musique",crop:"Couper",upload:"Charger",download:"Télécharger",change:"Change",unnamed:"Sans nom",publish:"Sauver et publier",publish_text:"Sauvegarde et publication avec succès!",publish_tips:"Regarder votre scène immédiatement?",publish_btn_ok:"Maintenenant",publish_btn_no:"Plus tard",public:"Publique",private:"Privé",waiting:"Attente...",audio:"Audio",second:"s",delete:"Effacé",prev:"Retourner en arrière",next:"Next",meter:"≈{mètres}m",guide:"Visite Guidée",rule:"Règle",roaming:"Roaming",continue:"Continuer",ensure_delete:"Effacer",text_limit:"Limité á {limit} charactères",default:"Défaut",custom:"Personnaliser",back:"Retour",will_delete:"Sera supprimé",setup:"Set",exit:"Done",music:{__name:"Musique de fond",none:"Pas de musique",cheerfu:"Joyeux",ethereal:"Éthéré",rhythmic:"Rhythmique",nostalgic:"Nostalgique",missing:"Manquant",retro:"Rétro",strings:"Cordes",happy:"Heureux"},category:{__name:"Catégorie",museum:"Musée",estate:"Immobilier",eshop:"E-Commerce",catering:"Restauration",home:"Maison",other:"Autre"},uploads:{__name:"Téléchargement de fichiers",uploading:"Chargement",uploaded:"Téléchargé",wait:"Attendez...",error:"Erreur",add:"Ajouter",start:"Commencer",file_require:"Veuillez ajouter un fichier",cant_upload:"Votre navigateur ne prend pas en charge le chargement de fichiers",not_support:"Le fichier que vous avez sélectionné n'est pas {fileType} pris en charge par le navigateur, veuillez le sélectionner à nouveau",too_large:"Le fichier est trop grand et ne peut pas dépasser {size} trilliard",too_large_reupload_tips:"La vidéo chargée est trop large, veuillez charger à nouveau"},tips:{__name:"Rapide",wait:"Veuillez attendre..."}},tips:{__name:"Rapide",title:"Conseil",set_done:"Configuration réussie",set_fail:"Échec de configuration",save_done:"Enregistrement réusssi",save_fail:"Échec d'enregistrement",delete:"Effacer ou pas?",delete_done:"Suppréssion réussie",delete_fail:"Échec de la suppréssion",upload_done:"Chargement réussi",upload_fail:"Échec du chargement",exception:"Erreur",network_error:"Internet est déconnecté, veuillez réessayer",file_notfound:"Le fichier est introuvable",scene_notfound:"La scène est introuvable",params_notfound:"Le paramètre est introuvable",camera_notfound:"La caméra correspondante est introuvable",password_error:"Mot de passe incorrect",data_error:"Les données sont introuvables",auth_deny:"Non autorisé à modifier la scène",clear:"Sûr d'effacer?",upload_pic_fail:"Échec du chargement des images",wait:"Veuillez attendre...",house_type_save_fail:"Échec de l'enregistrement du type de maison"},show:{__name:"Afficher la page",on:"On",off:"Off",measure:"Outil de Mesure",measure_start:"Commencer",measure_end:"Terminer",measure_button:"Confirmer {status}",location_up:"Above",location_left:"Gauche",location_start_tips:"Veuillez clicker sur {direction}",location_end_tips:"Le point de départ est déterminé, veuillez localiser le point final",vr:"Mode VR",share:"Partager",music:"Musique {status}",password_tips:"Mot de passe",password_require:"Veuillez entrer le mot de passe"},components:{user_guid:{__name:"用户引导",title:"Operation Tips",pano:"Walk<br />Click to move.",rotate:"Roam<br />Swipe the screen to roam.",zoom:"Zoom<br />Zoom in or out.",set:"Got it"}}}},ff11:function(e,t,i){"use strict";i.d(t,"b",(function(){return f})),i.d(t,"a",(function(){return v})),i.d(t,"c",(function(){return g})),i.d(t,"d",(function(){return y}));i("6b54"),i("2397");var n=i("d4ec"),o=i("bee2"),a=i("262e"),r=i("99de"),s=i("7e84"),l=i("f121"),c=i("617a"),u=i("f708");function d(e){var t=h();return function(){var i,n=Object(s["a"])(e);if(t){var o=Object(s["a"])(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Object(r["a"])(this,i)}}function h(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}Howler._unlockAudio();var p=!1,f=function(e,t){if(!0===p)return e();try{var i=function i(){"undefined"!==typeof parent.WeixinJSBridge?(console.log("wx play"),parent.WeixinJSBridge.invoke("getNetworkType",{},(function(t){e(p=!0)}),!1)):t&&(e(p=!0),document.querySelector("body").removeEventListener("touchend",i),document.querySelector("#player").removeEventListener("touchend",i))};l["a"].isMobile&&"true"!=c["a"].urlQueryValue("mobile")?u["b"]?"undefined"!==typeof parent.WeixinJSBridge?i():parent.document.addEventListener("WeixinJSBridgeReady",i):t&&(document.querySelector("body").addEventListener("touchend",i),document.querySelector("#player").addEventListener("touchend",i),i()):e(p=!0)}catch(n){e(p=!0)}},m=function(e){Object(a["a"])(i,e);var t=d(i);function i(){var e,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(n["a"])(this,i),e=t.call(this),e._pause_byother=!1,e._disable=!1,e._canplay=!1,e._options=o,e}return Object(o["a"])(i,[{key:"init",value:function(e){var t=this;this.remove(),this._canplay=!0,this._sound=new Howl({src:[e],loop:!!this._options.loop,html5:!!this._options.html5,format:["mp3","webm"]}),this._sound.on("play",(function(){return t.emit("play")})),this._sound.on("end",(function(){return t.emit("end")&&t.emit("off")})),this._sound.on("pause",(function(){return t.emit("pause")&&t.emit("off")})),this._sound.on("stop",(function(){return t.emit("stop")&&t.emit("off")})),this._sound.on("loaderror",(function(e){return t.emit("error",e)})),this._sound.once("load",(function(){t.emit("loaded",t._sound.duration())}))}},{key:"setSRC",value:function(e){e?this.init(e):this.remove()}},{key:"setLoop",value:function(e){this._canplay&&this._sound.loop(e)}},{key:"play",value:function(){var e=this;setTimeout((function(){e._disable||!e._canplay||e._sound.playing()||(e._sound.play(),e._pause_byother=!1)}),10)}},{key:"stop",value:function(){this._canplay&&this._sound.playing()&&this._sound.stop()}},{key:"pause",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._canplay&&this._sound.playing()&&(this._sound.pause(),this._pause_byother=e)}},{key:"pauseByOther",value:function(){this._canplay&&(this._pause_byother=!0)}},{key:"time",value:function(e){this._canplay&&this._sound.seek(e)}},{key:"mute",value:function(e){this._canplay&&this._sound.mute(e)}},{key:"resume",value:function(){this._canplay&&this._pause_byother&&this.play()}},{key:"remove",value:function(){this._canplay=!1,this._pause_byother=!1,this._sound&&(this._sound.stop(),this._sound.unload())}},{key:"disabel",value:function(){this._disable=!0}},{key:"enable",value:function(){this._disable=!1}},{key:"isPlaying",get:function(){return!!this._canplay&&this._sound.playing()}}]),i}(EventEmitter),v=new m({html5:!1,loop:!0}),g=new m({html5:!1}),y=new m({html5:!0,loop:!0})}});
|