@realsee/dnalogel 2.11.0-alpha.0 → 2.11.0-aplha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.umd.js +1 -1
- package/docs/classes/CSS3DRender.html +4 -4
- package/docs/classes/CruisePluginController.html +4 -4
- package/docs/classes/Magnifier.html +4 -4
- package/docs/classes/ModelRoomLabelController.html +4 -4
- package/docs/classes/Object3DHelperController.html +4 -4
- package/docs/classes/PaintBrush.html +4 -4
- package/docs/classes/PanoMeasurePluginLine.html +4 -4
- package/docs/classes/PanoMeasurePluginModel.html +4 -4
- package/docs/classes/PanoMeasurePluginPoint.html +4 -4
- package/docs/classes/PanoMeasurePluginPolyline.html +4 -4
- package/docs/classes/PanoTagPluginController.html +4 -4
- package/docs/classes/Util.BetterTween.html +4 -4
- package/docs/classes/Util.FivePointSelector.html +4 -4
- package/docs/classes/Util.Interval.html +4 -4
- package/docs/classes/Util.Magnifier.html +4 -4
- package/docs/classes/Util.PointDomHelper.html +4 -4
- package/docs/classes/Util.PointHelper.html +4 -4
- package/docs/classes/Util.Rectangle.html +4 -4
- package/docs/enums/CameraMovementEffect.html +4 -4
- package/docs/enums/ContentType.html +4 -4
- package/docs/enums/DIRECTION.html +4 -4
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +4 -4
- package/docs/enums/DimensionType.html +4 -4
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +4 -4
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +4 -4
- package/docs/enums/PaintBrushTypeEnum.html +4 -4
- package/docs/enums/PointType.html +4 -4
- package/docs/enums/Rotation.html +4 -4
- package/docs/functions/CSS3DRenderPlugin.html +4 -4
- package/docs/functions/CameraMovementPlugin.html +4 -4
- package/docs/functions/CruisePlugin.html +4 -4
- package/docs/functions/GuideLinePlugin.html +4 -4
- package/docs/functions/ItemLabelPlugin.html +4 -4
- package/docs/functions/MapviewFloorplanPlugin.html +4 -4
- package/docs/functions/ModelChassisCompassPlugin.html +4 -4
- package/docs/functions/ModelEntryDoorGuidePlugin.html +4 -4
- package/docs/functions/ModelFloorplanPlugin.html +4 -4
- package/docs/functions/ModelItemLabelPlugin.html +4 -4
- package/docs/functions/ModelRoomLabelPlugin.html +4 -4
- package/docs/functions/ModelTVVideoPlugin.html +4 -4
- package/docs/functions/ModelViewPlugin.html +4 -4
- package/docs/functions/Object3DHelperPlugin.html +4 -4
- package/docs/functions/PanoCompassPlugin.html +4 -4
- package/docs/functions/PanoCursorRaycasterPlugin.html +4 -4
- package/docs/functions/PanoDoorLabelPlugin.html +4 -4
- package/docs/functions/PanoFloorplanRadarPlugin.html +4 -4
- package/docs/functions/PanoMeasurePlugin.html +4 -4
- package/docs/functions/PanoRulerPlugin.html +4 -4
- package/docs/functions/PanoRulerProPlugin.html +4 -4
- package/docs/functions/PanoSpatialTagPlugin.html +4 -4
- package/docs/functions/PanoTagPlugin.html +4 -4
- package/docs/functions/PanoVideoPlugin.html +4 -4
- package/docs/functions/TopviewFloorplanPlugin.html +4 -4
- package/docs/functions/Util.getCoordsFromClient.html +4 -4
- package/docs/functions/Util.getCoordsFromElement.html +4 -4
- package/docs/functions/Util.getFrameTime.html +4 -4
- package/docs/functions/Util.getIntersectFromRelativePosition.html +4 -4
- package/docs/functions/Util.getRaycasterFromFivePointer.html +4 -4
- package/docs/functions/Util.isNil.html +4 -4
- package/docs/functions/Util.nextFrame.html +4 -4
- package/docs/functions/Util.notNil.html +4 -4
- package/docs/functions/Util.requestAnimationFrameInterval.html +4 -4
- package/docs/functions/Util.tweenProgress.html +4 -4
- package/docs/functions/pluginFlag.html +4 -4
- package/docs/index.html +4 -4
- package/docs/interfaces/AddTagConfig.html +4 -4
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +4 -4
- package/docs/interfaces/CSS3DRenderPluginState.html +4 -4
- package/docs/interfaces/CameraMovementPluginExportType.html +4 -4
- package/docs/interfaces/EventMap.html +4 -4
- package/docs/interfaces/FloorplanBounding.html +4 -4
- package/docs/interfaces/FloorplanData.html +4 -4
- package/docs/interfaces/FloorplanEntrance.html +4 -4
- package/docs/interfaces/FloorplanExtraObject.html +4 -4
- package/docs/interfaces/FloorplanExtraObject3D.html +4 -4
- package/docs/interfaces/FloorplanFloorData.html +4 -4
- package/docs/interfaces/FloorplanImagePosition.html +4 -4
- package/docs/interfaces/FloorplanObserver.html +4 -4
- package/docs/interfaces/FloorplanOutlineItem.html +4 -4
- package/docs/interfaces/FloorplanPosition.html +4 -4
- package/docs/interfaces/FloorplanRoomItem.html +4 -4
- package/docs/interfaces/FloorplanRoomLabelItem.html +4 -4
- package/docs/interfaces/FloorplanServerBounding.html +4 -4
- package/docs/interfaces/FloorplanServerComputedData.html +4 -4
- package/docs/interfaces/FloorplanServerData.html +4 -4
- package/docs/interfaces/FloorplanServerDoorItem.html +4 -4
- package/docs/interfaces/FloorplanServerDoorPosition.html +4 -4
- package/docs/interfaces/FloorplanServerEntrance.html +4 -4
- package/docs/interfaces/FloorplanServerFloorData.html +4 -4
- package/docs/interfaces/FloorplanServerImagePosition.html +4 -4
- package/docs/interfaces/FloorplanServerObserver.html +4 -4
- package/docs/interfaces/FloorplanServerOutlineItem.html +4 -4
- package/docs/interfaces/FloorplanServerPosition.html +4 -4
- package/docs/interfaces/FloorplanServerRoomItem.html +4 -4
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +4 -4
- package/docs/interfaces/HelperOffset.html +4 -4
- package/docs/interfaces/ItemLabelPluginData.html +4 -4
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +4 -4
- package/docs/interfaces/ItemLabelPluginParametersType.html +4 -4
- package/docs/interfaces/MinMax.html +4 -4
- package/docs/interfaces/ModelChassisCompassPluginData.html +4 -4
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +4 -4
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +4 -4
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +4 -4
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +4 -4
- package/docs/interfaces/ModelItemLabelPluginData.html +4 -4
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +4 -4
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +4 -4
- package/docs/interfaces/ModelRoomLabelPluginData.html +4 -4
- package/docs/interfaces/ModelTVVideoPluginData.html +4 -4
- package/docs/interfaces/ModelTVVideoPluginExportType.html +4 -4
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +4 -4
- package/docs/interfaces/ModelViewPluginExportType.html +4 -4
- package/docs/interfaces/Object3DHelperState.html +4 -4
- package/docs/interfaces/ObjectHelperControllers.html +4 -4
- package/docs/interfaces/PaintBrushAction.html +4 -4
- package/docs/interfaces/PaintBrushConfigs.html +4 -4
- package/docs/interfaces/PaintBrushState.html +4 -4
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +4 -4
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +4 -4
- package/docs/interfaces/PanoMeasureParameterType.html +4 -4
- package/docs/interfaces/PanoMeasurePluginLineJson.html +4 -4
- package/docs/interfaces/PanoMeasurePluginOpenParameter.html +4 -4
- package/docs/interfaces/PanoMeasurePluginPointJson.html +4 -4
- package/docs/interfaces/PanoMeasurePluginPolylineJson.html +4 -4
- package/docs/interfaces/PanoRulerPluginExportType.html +4 -4
- package/docs/interfaces/PanoRulerPluginOptions.html +4 -4
- package/docs/interfaces/PanoRulerPluginParameterType.html +4 -4
- package/docs/interfaces/PanoRulerProPluginExportType.html +4 -4
- package/docs/interfaces/PanoRulerProPluginOptions.html +4 -4
- package/docs/interfaces/PanoRulerProPluginParameterType.html +4 -4
- package/docs/interfaces/PanoRulerProPluginState.html +4 -4
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +4 -4
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +4 -4
- package/docs/interfaces/PanoSpatialTagPluginData.html +4 -4
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +4 -4
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +4 -4
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +4 -4
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +4 -4
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +4 -4
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +4 -4
- package/docs/interfaces/PanoVideoPluginType.LoadParams.html +4 -4
- package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +4 -4
- package/docs/interfaces/PanoVideoPluginType.PluginData.html +4 -4
- package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +4 -4
- package/docs/interfaces/PanoVideoPluginType.PluginState.html +4 -4
- package/docs/interfaces/PanoVideoPluginType.VideoItem.html +4 -4
- package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +4 -4
- package/docs/interfaces/Point.html +4 -4
- package/docs/interfaces/Room.html +4 -4
- package/docs/interfaces/RoomInfo.html +4 -4
- package/docs/interfaces/RoomLabel.html +4 -4
- package/docs/interfaces/RoomRules.html +4 -4
- package/docs/interfaces/Rooms.html +4 -4
- package/docs/interfaces/Scissor.html +4 -4
- package/docs/interfaces/State.html +4 -4
- package/docs/interfaces/TagCache.html +4 -4
- package/docs/interfaces/TagConfig.html +4 -4
- package/docs/interfaces/TagIconUrl.html +4 -4
- package/docs/interfaces/TagStyle.html +4 -4
- package/docs/interfaces/Tags.html +4 -4
- package/docs/interfaces/TemporaryState.html +4 -4
- package/docs/interfaces/Util.MagnifierParameter.html +4 -4
- package/docs/interfaces/Util.MouseGroupParameter.html +4 -4
- package/docs/modules/PanoVideoPluginType.html +4 -4
- package/docs/modules/Util.html +4 -4
- package/docs/modules.html +4 -4
- package/docs/types/ArrayPosition.html +4 -4
- package/docs/types/AudioAppearance.html +4 -4
- package/docs/types/AudioTagTypeConfigKey.html +4 -4
- package/docs/types/CSS3DRenderExportType.html +4 -4
- package/docs/types/CSS3DRenderPluginExportType.html +4 -4
- package/docs/types/CSS3DRenderPluginParameterType.html +4 -4
- package/docs/types/ClassFunctionParameters.html +4 -4
- package/docs/types/Color.html +4 -4
- package/docs/types/ContentTypeConfigKey.html +4 -4
- package/docs/types/ContentTypeConfigKeySplit.html +4 -4
- package/docs/types/ContentTypeMap.html +4 -4
- package/docs/types/Create3DDomContainerReturnType.html +4 -4
- package/docs/types/Create3DElementReturnType.html +4 -4
- package/docs/types/CruisePluginExportType.html +4 -4
- package/docs/types/Direction-1.html +4 -4
- package/docs/types/Direction4.html +4 -4
- package/docs/types/FloorplanRuleLabels.html +4 -4
- package/docs/types/FloorplanServerRuleLabels.html +4 -4
- package/docs/types/GuideLinePluginExportType.html +4 -4
- package/docs/types/HelperEventMap.html +4 -4
- package/docs/types/LoadTagConfig.html +4 -4
- package/docs/types/MapviewFloorplanPluginParameterType.html +4 -4
- package/docs/types/MapviewFloorplanPluginReturnType.html +4 -4
- package/docs/types/MediaData.html +4 -4
- package/docs/types/MediaStore.html +4 -4
- package/docs/types/ModelElement.html +4 -4
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +4 -4
- package/docs/types/ModelFloorplanPluginParameterType.html +4 -4
- package/docs/types/ModelFloorplanPluginReturnType.html +4 -4
- package/docs/types/ModelRoomLabelPluginParameters.html +4 -4
- package/docs/types/ModelRoomLabelPluginReturnType.html +4 -4
- package/docs/types/MoveArgs.html +4 -4
- package/docs/types/MoveOpts.html +4 -4
- package/docs/types/Object3DHelperEventMap.html +4 -4
- package/docs/types/ObjectFit.html +4 -4
- package/docs/types/PaintBrushEventMap.html +4 -4
- package/docs/types/PanoCompassPluginData.html +4 -4
- package/docs/types/PanoCompassPluginExportType.html +4 -4
- package/docs/types/PanoCompassPluginParameterType.html +4 -4
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +4 -4
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +4 -4
- package/docs/types/PanoIndex.html +4 -4
- package/docs/types/PanoMeasurePluginEvent.html +4 -4
- package/docs/types/PanoMeasureReturnType.html +4 -4
- package/docs/types/PanoSpatialTagPluginId.html +4 -4
- package/docs/types/PanoTagPluginExportInterface.html +4 -4
- package/docs/types/PanoTagPluginParamsInterface.html +4 -4
- package/docs/types/PanoVideoPluginParameterType.html +4 -4
- package/docs/types/PanoVideoPluginReturnType.html +4 -4
- package/docs/types/PlaneTag.html +4 -4
- package/docs/types/PlaneTagElement.html +4 -4
- package/docs/types/Point2DElement.html +4 -4
- package/docs/types/Point2DTag.html +4 -4
- package/docs/types/Point3DElement.html +4 -4
- package/docs/types/Point3DTag.html +4 -4
- package/docs/types/PointTag.html +4 -4
- package/docs/types/PointTagElement.html +4 -4
- package/docs/types/Position.html +4 -4
- package/docs/types/RotateArgs.html +4 -4
- package/docs/types/RotateOpts.html +4 -4
- package/docs/types/RuleLabelsKey.html +4 -4
- package/docs/types/RuleLabelsValue.html +4 -4
- package/docs/types/StickType.html +4 -4
- package/docs/types/Tag.html +4 -4
- package/docs/types/Tag2D.html +4 -4
- package/docs/types/Tag3D.html +4 -4
- package/docs/types/TagContentType.html +4 -4
- package/docs/types/TagDimensionType.html +4 -4
- package/docs/types/TagElement.html +4 -4
- package/docs/types/TagEvents.html +4 -4
- package/docs/types/TagGLTFObject.html +4 -4
- package/docs/types/TagHooks.html +4 -4
- package/docs/types/TagIconSize.html +4 -4
- package/docs/types/TagId.html +4 -4
- package/docs/types/TagPointType.html +4 -4
- package/docs/types/TopviewFloorplanPluginParameterType.html +4 -4
- package/docs/types/TopviewFloorplanPluginReturnType.html +4 -4
- package/docs/types/WorkCode.html +4 -4
- package/docs/variables/FLOOR_TYPE_MAP.html +4 -4
- package/docs/variables/PLUGIN.html +4 -4
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +4 -4
- package/docs/variables/ROOM_TYPE_MAP.html +4 -4
- package/docs/variables/VERSION.html +4 -4
- package/docs/variables/itemLabelPluginServerParams.html +4 -4
- package/docs/variables/modelItemLabelPluginServerParams.html +4 -4
- package/docs/variables/modelRoomLabelPluginServerParams.html +4 -4
- package/libs/base/BasePlugin.js +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -112,7 +112,7 @@ transition: all 500ms;
|
|
|
112
112
|
svg [type='lineItemGroup'] g g g g {
|
|
113
113
|
stroke: #ffffff;
|
|
114
114
|
}</style>
|
|
115
|
-
`;return i.$$set=s=>{"content"in s&&e(0,n=s.content)},[n,o]}class Iu extends se{constructor(t){super(),oe(this,t,Pu,Cu,ie,{content:0},wu)}}function Eu(i){ue(i,"svelte-ozpg4a",".floorplan-plugin__base-image.svelte-ozpg4a{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}")}function ku(i){let t,e;return t=new yu({props:{url:i[1].url}}),{c(){$(t.$$.fragment)},m(n,o){Z(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.url=n[1].url),t.$set(s)},i(n){e||(I(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function xu(i){let t,e;return t=new Iu({props:{content:i[0]}}),{c(){$(t.$$.fragment)},m(n,o){Z(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.content=n[0]),t.$set(s)},i(n){e||(I(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Du(i){let t,e,n,o;const s=[xu,ku],r=[];function a(l,c){return l[0]?0:l[1]?1:-1}return~(e=a(i))&&(n=r[e]=s[e](i)),{c(){t=T("div"),n&&n.c(),b(t,"class","floorplan-plugin__base-image svelte-ozpg4a")},m(l,c){M(l,t,c),~e&&r[e].m(t,null),o=!0},p(l,[c]){let u=e;e=a(l),e===u?~e&&r[e].p(l,c):(n&&(re(),D(r[u],1,1,()=>{r[u]=null}),ae()),~e?(n=r[e],n?n.p(l,c):(n=r[e]=s[e](l),n.c()),I(n,1),n.m(t,null)):n=null)},i(l){o||(I(n),o=!0)},o(l){D(n),o=!1},d(l){l&&S(t),~e&&r[e].d()}}}function Lu(i,t,e){let n,o,{floorIndex:s}=t,{floorplanData:r}=t;return i.$$set=a=>{"floorIndex"in a&&e(2,s=a.floorIndex),"floorplanData"in a&&e(3,r=a.floorplanData)},i.$$.update=()=>{var a,l;i.$$.dirty&12&&e(1,n=r.outlines[s]),i.$$.dirty&12&&e(0,o=(l=(a=r.outlines)==null?void 0:a[s])==null?void 0:l.svgContent)},[o,n,s,r]}class ps extends se{constructor(t){super(),oe(this,t,Lu,Du,ie,{floorIndex:2,floorplanData:3},Eu)}}function Su(i){ue(i,"svelte-12pzct5",".floorplan-plugin__room-label-item.svelte-12pzct5{position:absolute;display:flex;flex-flow:column;align-items:center;line-height:1;color:#fff;transform:translate(-50%, -50%);white-space:nowrap;will-change:opacity;transition:opacity 300ms}.floorplan-plugin__room-size.svelte-12pzct5{opacity:0.45}")}function Mu(i){let t,e=i[8].outerHTML+"",n;return{c(){t=new Nn(!1),n=me(),t.a=n},m(o,s){t.m(e,o,s),M(o,n,s)},p(o,s){s&256&&e!==(e=o[8].outerHTML+"")&&t.p(e)},d(o){o&&S(n),o&&t.d()}}}function zu(i){let t,e,n=i[1]&&gs(i),o=i[0]&&As(i);return{c(){n&&n.c(),t=te(),o&&o.c(),e=me()},m(s,r){n&&n.m(s,r),M(s,t,r),o&&o.m(s,r),M(s,e,r)},p(s,r){s[1]?n?n.p(s,r):(n=gs(s),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null),s[0]?o?o.p(s,r):(o=As(s),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null)},d(s){n&&n.d(s),s&&S(t),o&&o.d(s),s&&S(e)}}}function gs(i){let t,e=i[2].name+"",n;return{c(){t=T("span"),n=xe(e),b(t,"class","floorplan-plugin__room-name")},m(o,s){M(o,t,s),B(t,n)},p(o,s){s&4&&e!==(e=o[2].name+"")&&ze(n,e)},d(o){o&&S(t)}}}function As(i){let t,e;return{c(){t=T("span"),e=xe(i[7]),b(t,"class","floorplan-plugin__room-size svelte-12pzct5")},m(n,o){M(n,t,o),B(t,e)},p(n,o){o&128&&ze(e,n[7])},d(n){n&&S(t)}}}function Tu(i){let t,e;function n(r,a){if(r[3]===void 0)return zu;if(r[8])return Mu}let o=n(i),s=o&&o(i);return{c(){t=T("div"),s&&s.c(),b(t,"class","floorplan-plugin__room-label-item svelte-12pzct5"),De(()=>i[19].call(t)),z(t,"left",i[9]),z(t,"top",i[10]),z(t,"font-size",i[11]),z(t,"opacity",i[6]?"1":"0")},m(r,a){M(r,t,a),s&&s.m(t,null),e=Ke(t,i[19].bind(t))},p(r,[a]){o===(o=n(r))&&s?s.p(r,a):(s&&s.d(1),s=o&&o(r),s&&(s.c(),s.m(t,null))),a&64&&z(t,"opacity",r[6]?"1":"0")},i:Y,o:Y,d(r){r&&S(t),s&&s.d(),e()}}}function Bu(i,t){const e=i[0],n=i[1];let o=!1;for(let s=0,r=t.length-1;s<t.length;r=s++){const a=t[s][0],l=t[s][1],c=t[r][0],u=t[r][1];l>n!=u>n&&e<(c-a)*(n-l)/(u-l)+a&&(o=!o)}return o}function ju(i,t,e){let n,o,s,r,a,{pxmm:l}=t,{roomAreaEnable:c}=t,{roomNameEnable:u}=t,{room:h}=t,{hoveredRoom:d}=t,{getRoomAreaText:f}=t,{getLabelElement:g}=t,{adaptiveRoomLabelVisibleEnable:v}=t;function p(F,q){if(q.width===0||q.height===0)return()=>!1;const j=F.path.map(({x:pe,y:de})=>[pe,de]),G=F.roomLabel.position,{x:O,y:H}=G,{width:W,height:ee}=q,X=W/2,le=ee/2;return function(de){const Ae=O*de,Ee=H*de,Te=j.map(([ce,ve])=>[ce*de,ve*de]);return[[Ae+X,Ee-le],[Ae-X,Ee-le],[Ae-X,Ee+le],[Ae+X,Ee+le]].every(ce=>Bu(ce,Te))}}const A=document.body.clientWidth,y=document.body.clientHeight,w=h.roomLabel,k=w.positionInImage.x*100+"%",P=w.positionInImage.y*100+"%",C=(A<500||y<500?10:14)+"px";let L=0,x=0,Q=!1;d.subscribe(function(q){e(16,Q=!!q&&q.id===h.id)});function _(){L=this.clientWidth,x=this.clientHeight,e(4,L),e(5,x)}return i.$$set=F=>{"pxmm"in F&&e(12,l=F.pxmm),"roomAreaEnable"in F&&e(0,c=F.roomAreaEnable),"roomNameEnable"in F&&e(1,u=F.roomNameEnable),"room"in F&&e(2,h=F.room),"hoveredRoom"in F&&e(13,d=F.hoveredRoom),"getRoomAreaText"in F&&e(14,f=F.getRoomAreaText),"getLabelElement"in F&&e(3,g=F.getLabelElement),"adaptiveRoomLabelVisibleEnable"in F&&e(15,v=F.adaptiveRoomLabelVisibleEnable)},i.$$.update=()=>{i.$$.dirty&12&&e(8,n=g==null?void 0:g(h)),i.$$.dirty&16388&&e(7,o=h.size?f(h.size):""),i.$$.dirty&48&&e(18,s={width:L,height:x}),i.$$.dirty&262148&&e(17,r=s?p(h,s):void 0),i.$$.dirty&233472&&e(6,a=v?Q?!0:!!(r!=null&&r(l)):!0)},[c,u,h,g,L,x,a,o,n,k,P,C,l,d,f,v,Q,r,s,_]}class Vu extends se{constructor(t){super(),oe(this,t,ju,Tu,ie,{pxmm:12,roomAreaEnable:0,roomNameEnable:1,room:2,hoveredRoom:13,getRoomAreaText:14,getLabelElement:3,adaptiveRoomLabelVisibleEnable:15},Su)}}function Qu(i){ue(i,"svelte-13xux0b",".floorplan-plugin__room-labels.svelte-13xux0b{width:100%;height:100%;position:absolute;left:0;top:0;z-index:20;pointer-events:none}")}function vs(i,t,e){const n=i.slice();return n[12]=t[e],n}function bs(i){let t,e=[],n=new Map,o,s,r=i[8];const a=l=>l[12].id;for(let l=0;l<r.length;l+=1){let c=vs(i,r,l),u=a(c);n.set(u,e[l]=ys(u,c))}return{c(){t=T("div");for(let l=0;l<e.length;l+=1)e[l].c();b(t,"class","floorplan-plugin__room-labels svelte-13xux0b"),De(()=>i[11].call(t))},m(l,c){M(l,t,c);for(let u=0;u<e.length;u+=1)e[u].m(t,null);o=Ke(t,i[11].bind(t)),s=!0},p(l,c){c&447&&(r=l[8],re(),e=Ue(e,c,a,1,l,r,n,t,wt,ys,null,vs),ae())},i(l){if(!s){for(let c=0;c<r.length;c+=1)I(e[c]);s=!0}},o(l){for(let c=0;c<e.length;c+=1)D(e[c]);s=!1},d(l){l&&S(t);for(let c=0;c<e.length;c+=1)e[c].d();o()}}}function ys(i,t){let e,n,o;const s=[{pxmm:t[7],room:t[12],hoveredRoom:t[2],roomAreaEnable:t[0],roomNameEnable:t[1],getLabelElement:t[4],getRoomAreaText:t[3],adaptiveRoomLabelVisibleEnable:t[5]}];let r={};for(let a=0;a<s.length;a+=1)r=je(r,s[a]);return n=new Vu({props:r}),{key:i,first:null,c(){e=me(),$(n.$$.fragment),this.first=e},m(a,l){M(a,e,l),Z(n,a,l),o=!0},p(a,l){t=a;const c=l&447?Fe(s,[{pxmm:t[7],room:t[12],hoveredRoom:t[2],roomAreaEnable:t[0],roomNameEnable:t[1],getLabelElement:t[4],getRoomAreaText:t[3],adaptiveRoomLabelVisibleEnable:t[5]}]):{};n.$set(c)},i(a){o||(I(n.$$.fragment,a),o=!0)},o(a){D(n.$$.fragment,a),o=!1},d(a){a&&S(e),K(n,a)}}}function Ou(i){let t,e,n=i[8]&&bs(i);return{c(){n&&n.c(),t=me()},m(o,s){n&&n.m(o,s),M(o,t,s),e=!0},p(o,[s]){o[8]?n?(n.p(o,s),s&256&&I(n,1)):(n=bs(o),n.c(),I(n,1),n.m(t.parentNode,t)):n&&(re(),D(n,1,1,()=>{n=null}),ae())},i(o){e||(I(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&S(t)}}}function Fu(i,t,e){let n,{floorIndex:o}=t,{roomAreaEnable:s}=t,{roomNameEnable:r}=t,{floorplanData:a}=t,{hoveredRoom:l}=t,{getRoomAreaText:c}=t,{getLabelElement:u}=t,{adaptiveRoomLabelVisibleEnable:h}=t,d=0,f=0;function g(){d=this.clientWidth,e(6,d)}return i.$$set=v=>{"floorIndex"in v&&e(9,o=v.floorIndex),"roomAreaEnable"in v&&e(0,s=v.roomAreaEnable),"roomNameEnable"in v&&e(1,r=v.roomNameEnable),"floorplanData"in v&&e(10,a=v.floorplanData),"hoveredRoom"in v&&e(2,l=v.hoveredRoom),"getRoomAreaText"in v&&e(3,c=v.getRoomAreaText),"getLabelElement"in v&&e(4,u=v.getLabelElement),"adaptiveRoomLabelVisibleEnable"in v&&e(5,h=v.adaptiveRoomLabelVisibleEnable)},i.$$.update=()=>{if(i.$$.dirty&1536&&e(8,n=a.floorDatas[o].rooms),i.$$.dirty&1088){const{max:v,min:p}=a.bounding,A=v.x-p.x;e(7,f=d/A)}},[s,r,l,c,u,h,d,f,n,o,a,g]}class Ru extends se{constructor(t){super(),oe(this,t,Fu,Ou,ie,{floorIndex:9,roomAreaEnable:0,roomNameEnable:1,floorplanData:10,hoveredRoom:2,getRoomAreaText:3,getLabelElement:4,adaptiveRoomLabelVisibleEnable:5},Qu)}}function Gu(i){ue(i,"svelte-djlmk4",".floorplan-plugin__rule-labels.svelte-djlmk4.svelte-djlmk4{position:absolute;display:flex}.floorplan-plugin__rule-labels--top.svelte-djlmk4.svelte-djlmk4{left:0;top:-1.25rem}.floorplan-plugin__rule-labels--bottom.svelte-djlmk4.svelte-djlmk4{left:0;bottom:-1.25rem}.floorplan-plugin__rule-labels--left.svelte-djlmk4.svelte-djlmk4{top:0;left:-1.25rem}.floorplan-plugin__rule-labels--right.svelte-djlmk4.svelte-djlmk4{top:0;right:-1.25rem}.floorplan-plugin__rule-line.svelte-djlmk4.svelte-djlmk4{background:#fff;opacity:0.05;width:100%;height:100%}.floorplan-plugin__rule-scale-wrapper.svelte-djlmk4.svelte-djlmk4{position:absolute;width:0.3125rem;height:100%;left:50%;top:0;transform:translateX(-50%)}.floorplan-plugin__rule-labels.is-row.svelte-djlmk4 .floorplan-plugin__rule-scale-wrapper.svelte-djlmk4{width:100%;height:0.3125rem;top:50%;left:0;transform:translateY(-50%)}.floorplan-plugin__rule-scale.svelte-djlmk4.svelte-djlmk4{position:absolute;background:#fff;opacity:0.05;width:100%;height:0.0625rem}.floorplan-plugin__rule-labels.is-row.svelte-djlmk4 .floorplan-plugin__rule-scale.svelte-djlmk4{width:0.0625rem;height:100%}.floorplan-plugin__rule-text-wrapper.svelte-djlmk4.svelte-djlmk4{position:absolute}.floorplan-plugin__rule-labels--top.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:100%;height:0;top:0.625rem}.floorplan-plugin__rule-labels--bottom.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:100%;height:0;bottom:0.625rem}.floorplan-plugin__rule-labels--left.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:0;height:100%;left:0.625rem}.floorplan-plugin__rule-labels--right.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:0;height:100%;right:0.625rem}.floorplan-plugin__rule-text-item.svelte-djlmk4.svelte-djlmk4{width:0;height:0;position:absolute;transform:rotate(90deg)}.floorplan-plugin__rule-labels.is-row.svelte-djlmk4 .floorplan-plugin__rule-text-item.svelte-djlmk4{transform:rotate(0)}.floorplan-plugin__rule-text.svelte-djlmk4.svelte-djlmk4{width:-moz-max-content;width:max-content;transform:translate(-50%, -50%);font-size:0.625rem;color:#fff;opacity:0.2}")}function ws(i,t,e){const n=i.slice();return n[11]=t[e],n[13]=e,n}function Cs(i,t,e){const n=i.slice();return n[14]=t[e],n}function Ps(i){let t;return{c(){t=T("div"),b(t,"class","floorplan-plugin__rule-scale svelte-djlmk4"),z(t,"left",i[14].left*100+"%"),z(t,"bottom",i[14].bottom*100+"%")},m(e,n){M(e,t,n)},p:Y,d(e){e&&S(t)}}}function Is(i,t){let e,n,o=t[1](t[11].distance)+"",s,r;return{key:i,first:null,c(){e=T("div"),n=T("div"),s=xe(o),r=te(),b(n,"class","floorplan-plugin__rule-text svelte-djlmk4"),J(n,"is-row",t[2]),b(e,"class","floorplan-plugin__rule-text-item svelte-djlmk4"),z(e,"left",t[11].left*100+"%"),z(e,"bottom",t[11].bottom*100+"%"),this.first=e},m(a,l){M(a,e,l),B(e,n),B(n,s),B(e,r)},p(a,l){t=a,l&2&&o!==(o=t[1](t[11].distance)+"")&&ze(s,o)},d(a){a&&S(e)}}}function Wu(i){let t,e,n,o,s,r,a=[],l=new Map,c,u=i[3],h=[];for(let g=0;g<u.length;g+=1)h[g]=Ps(Cs(i,u,g));let d=i[4];const f=g=>g[13];for(let g=0;g<d.length;g+=1){let v=ws(i,d,g),p=f(v);l.set(p,a[g]=Is(p,v))}return{c(){t=T("div"),e=T("div"),n=te(),o=T("div");for(let g=0;g<h.length;g+=1)h[g].c();s=te(),r=T("div");for(let g=0;g<a.length;g+=1)a[g].c();b(e,"class","floorplan-plugin__rule-line svelte-djlmk4"),b(o,"class","floorplan-plugin__rule-scale-wrapper svelte-djlmk4"),J(o,"is-row",i[2]),b(r,"class","floorplan-plugin__rule-text-wrapper svelte-djlmk4"),b(t,"class",c="floorplan-plugin__rule-labels floorplan-plugin__rule-labels--"+i[0]+" svelte-djlmk4"),J(t,"is-row",i[2]),z(t,"width",i[2]?"100%":1/16+"rem"),z(t,"height",i[2]?1/16+"rem":"100%")},m(g,v){M(g,t,v),B(t,e),B(t,n),B(t,o);for(let p=0;p<h.length;p+=1)h[p].m(o,null);B(t,s),B(t,r);for(let p=0;p<a.length;p+=1)a[p].m(r,null)},p(g,[v]){if(v&8){u=g[3];let p;for(p=0;p<u.length;p+=1){const A=Cs(g,u,p);h[p]?h[p].p(A,v):(h[p]=Ps(A),h[p].c(),h[p].m(o,null))}for(;p<h.length;p+=1)h[p].d(1);h.length=u.length}v&22&&(d=g[4],a=Ue(a,v,f,1,g,d,l,r,Gi,Is,null,ws)),v&1&&c!==(c="floorplan-plugin__rule-labels floorplan-plugin__rule-labels--"+g[0]+" svelte-djlmk4")&&b(t,"class",c),v&5&&J(t,"is-row",g[2])},i:Y,o:Y,d(g){g&&S(t),ut(h,g);for(let v=0;v<a.length;v+=1)a[v].d()}}}const $t=1e3,en=180;function _u(i,t,e){let{type:n}=t,{data:o}=t,{bounding:s}=t,{getRuleDistanceText:r}=t;const a=n==="top"||n==="bottom",l=s.max.x-s.min.x-($t-en)*2,c=s.max.y-s.min.y-($t-en)*2,u=o.map(([g,v])=>a?[g.x,v.x]:[g.y,v.y]).flat().sort().filter((g,v,p)=>v===0?!0:g!==p[v-1]),h=u.map(g=>{const v=a?(g-s.min.x-$t+en)/l:0,p=a?0:(g-s.min.y-$t+en)/c;return{left:v,bottom:p}});h.unshift({left:0,bottom:0}),h.push(a?{left:1,bottom:0}:{left:0,bottom:1});const d=u[u.length-1]-u[0],f=u.map((g,v,p)=>{const A=v===0?0:g-p[v-1],y=v===0?0:(g+p[v-1])/2,w=a?(y-s.min.x-$t+en)/l:0,k=a?0:(y-s.min.y-$t+en)/c;return{left:w,bottom:k,distance:A}}).filter(({distance:g})=>g/d>.1);return i.$$set=g=>{"type"in g&&e(0,n=g.type),"data"in g&&e(5,o=g.data),"bounding"in g&&e(6,s=g.bounding),"getRuleDistanceText"in g&&e(1,r=g.getRuleDistanceText)},[n,r,a,h,f,o,s]}class Nu extends se{constructor(t){super(),oe(this,t,_u,Wu,ie,{type:0,data:5,bounding:6,getRuleDistanceText:1},Gu)}}function Hu(i){ue(i,"svelte-1mzj9p3",".floorplan-plugin__rule-labels-wrapper.svelte-1mzj9p3{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}")}function Es(i,t,e){const n=i.slice();return n[13]=t[e][0],n[14]=t[e][1],n}function ks(i,t){let e,n,o;const s=[{type:t[13],data:t[14],bounding:t[1],getRuleDistanceText:t[0]}];let r={};for(let a=0;a<s.length;a+=1)r=je(r,s[a]);return n=new Nu({props:r}),{key:i,first:null,c(){e=me(),$(n.$$.fragment),this.first=e},m(a,l){M(a,e,l),Z(n,a,l),o=!0},p(a,l){t=a;const c=l&19?Fe(s,[{type:t[13],data:t[14],bounding:t[1],getRuleDistanceText:t[0]}]):{};n.$set(c)},i(a){o||(I(n.$$.fragment,a),o=!0)},o(a){D(n.$$.fragment,a),o=!1},d(a){a&&S(e),K(n,a)}}}function Xu(i){let t,e=[],n=new Map,o,s=i[4];const r=a=>a[13];for(let a=0;a<s.length;a+=1){let l=Es(i,s,a),c=r(l);n.set(c,e[a]=ks(c,l))}return{c(){t=T("div");for(let a=0;a<e.length;a+=1)e[a].c();b(t,"class","floorplan-plugin__rule-labels-wrapper svelte-1mzj9p3"),z(t,"width",i[3]),z(t,"height",i[2])},m(a,l){M(a,t,l);for(let c=0;c<e.length;c+=1)e[c].m(t,null);o=!0},p(a,[l]){l&19&&(s=a[4],re(),e=Ue(e,l,r,1,a,s,n,t,wt,ks,null,Es),ae()),l&8&&z(t,"width",a[3]),l&4&&z(t,"height",a[2])},i(a){if(!o){for(let l=0;l<s.length;l+=1)I(e[l]);o=!0}},o(a){for(let l=0;l<e.length;l+=1)D(e[l]);o=!1},d(a){a&&S(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}const xs=1e3,Ds=180;function Yu(i,t,e){let n,o,s,r,a,l,c,u,h,d,{floorIndex:f}=t,{floorplanData:g}=t,{getRuleDistanceText:v}=t;return i.$$set=p=>{"floorIndex"in p&&e(5,f=p.floorIndex),"floorplanData"in p&&e(6,g=p.floorplanData),"getRuleDistanceText"in p&&e(0,v=p.getRuleDistanceText)},i.$$.update=()=>{i.$$.dirty&64&&e(1,n=g.bounding),i.$$.dirty&96&&e(11,o=g.floorDatas[f].rules),i.$$.dirty&2048&&e(12,s=Object.keys(o)),i.$$.dirty&6144&&e(4,r=s.map(p=>[p,o[p]])),i.$$.dirty&2&&e(9,a=n.max.x-n.min.x),i.$$.dirty&2&&e(7,l=n.max.y-n.min.y),i.$$.dirty&2&&e(10,c=n.max.x-n.min.x-(xs-Ds)*2),i.$$.dirty&2&&e(8,u=n.max.y-n.min.y-(xs-Ds)*2),i.$$.dirty&1536&&e(3,h=c/a*100+"%"),i.$$.dirty&384&&e(2,d=u/l*100+"%")},[v,n,d,h,r,f,g,l,u,a,c,o,s]}class Uu extends se{constructor(t){super(),oe(this,t,Yu,Xu,ie,{floorIndex:5,floorplanData:6,getRuleDistanceText:0},Hu)}}function ii(i,t={}){let e="";const{needZ:n,needA:o}=t;return(n?i.slice().concat(i[0]):i.slice()).forEach((r,a)=>{const{x:l,y:c}=t.format?t.format(r):r,u=l+","+c;return a===0?(e+="M"+u,e):o!=null&&o[a]?(e+="A"+o[a]+","+u,e):(e+="L"+u,e)}),e+(n?"Z":"")}function Ls({x:i,y:t},e){const{max:n,min:o}=e;return{x:i-o.x,y:n.y-t}}function qu(i,t){const e=i.x*1e3+t.bounding.origin.x,n=-i.z*1e3+t.bounding.origin.y;return{x:e,y:n}}function Ju(i,t){const e=t.bounding,n=e.max.x-e.min.x,o=e.max.y-e.min.y;return{x:(i.x-e.min.x)/n,y:(e.max.y-i.y)/o}}function Zu(i,t){return Math.max(...t.work.observers.map(n=>i.z>=n.standingPosition.z?n.floorIndex:0))}function Ku(i){let t;return{c(){t=Ce("path"),b(t,"d",i[0]),b(t,"fill","#2F313A")},m(e,n){M(e,t,n)},p(e,[n]){n&1&&b(t,"d",e[0])},i:Y,o:Y,d(e){e&&S(t)}}}function $u(i,t,e){let n,{path:o}=t;return i.$$set=s=>{"path"in s&&e(1,o=s.path)},i.$$.update=()=>{i.$$.dirty&2&&e(0,n=ii(o,{needZ:!0}))},[n,o]}class ed extends se{constructor(t){super(),oe(this,t,$u,Ku,ie,{path:1})}}function td(i){let t,e,n,o,s,r;return{c(){t=Ce("defs"),e=Ce("pattern"),n=Ce("rect"),o=Ce("path"),s=te(),r=Ce("path"),b(n,"x","0"),b(n,"y","0"),b(n,"width",i[1]),b(n,"height",i[1]),b(n,"fill","#323747"),b(o,"d",i[2]),b(o,"stroke","#ffffff"),b(o,"stroke-opacity","0.06"),b(o,"stroke-width","0.5"),b(o,"fill","none"),b(e,"id","fpm-room-pattern-0"),b(e,"x","0"),b(e,"y","0"),b(e,"width",i[1]),b(e,"height",i[1]),b(e,"patternUnits","userSpaceOnUse"),b(e,"patternTransform","scale(50 50)"),b(r,"d",i[0]),b(r,"fill","url(#fpm-room-pattern-0)")},m(a,l){M(a,t,l),B(t,e),B(e,n),B(e,o),M(a,s,l),M(a,r,l)},p(a,[l]){l&1&&b(r,"d",a[0])},i:Y,o:Y,d(a){a&&S(t),a&&S(s),a&&S(r)}}}const Ni=6;function nd(i,t,e){let n,{path:o}=t;const s=Ni*2,r=`M0 ${Ni} h ${s} M${Ni} 0 v ${s}`;return i.$$set=a=>{"path"in a&&e(3,o=a.path)},i.$$.update=()=>{i.$$.dirty&8&&e(0,n=ii(o,{needZ:!0}))},[n,s,r,o]}class id extends se{constructor(t){super(),oe(this,t,nd,td,ie,{path:3})}}function od(i){let t,e,n,o,s,r,a,l,c,u,h;return{c(){t=Ce("defs"),e=Ce("pattern"),n=Ce("rect"),o=Ce("pattern"),s=Ce("rect"),r=te(),a=Ce("path"),l=te(),c=Ce("path"),u=te(),h=Ce("path"),b(n,"x","0"),b(n,"y","0"),b(n,"width","6"),b(n,"height","50"),b(n,"fill","none"),b(n,"stroke","#4B4B57"),b(n,"stroke-width","0.5"),b(e,"id","room-material-pattern-1"),b(e,"x","0"),b(e,"y","0"),b(e,"width","12"),b(e,"height","50"),b(e,"patternUnits","userSpaceOnUse"),b(e,"patternTransform","scale(50 50)"),b(s,"x","0"),b(s,"y","0"),b(s,"width","6"),b(s,"height","50"),b(s,"fill","none"),b(s,"stroke","#4B4B57"),b(s,"stroke-width","0.5"),b(o,"id","room-material-pattern-2"),b(o,"x","6"),b(o,"y","25"),b(o,"width","12"),b(o,"height","50"),b(o,"patternUnits","userSpaceOnUse"),b(o,"patternTransform","scale(50 50)"),b(a,"d",i[0]),b(a,"fill","#43434D"),b(c,"d",i[0]),b(c,"fill","url(#room-material-pattern-1)"),b(h,"d",i[0]),b(h,"fill","url(#room-material-pattern-2)")},m(d,f){M(d,t,f),B(t,e),B(e,n),B(t,o),B(o,s),M(d,r,f),M(d,a,f),M(d,l,f),M(d,c,f),M(d,u,f),M(d,h,f)},p(d,[f]){f&1&&b(a,"d",d[0]),f&1&&b(c,"d",d[0]),f&1&&b(h,"d",d[0])},i:Y,o:Y,d(d){d&&S(t),d&&S(r),d&&S(a),d&&S(l),d&&S(c),d&&S(u),d&&S(h)}}}function sd(i,t,e){let n,{path:o}=t;return i.$$set=s=>{"path"in s&&e(1,o=s.path)},i.$$.update=()=>{i.$$.dirty&2&&e(0,n=ii(o,{needZ:!0}))},[n,o]}class rd extends se{constructor(t){super(),oe(this,t,sd,od,ie,{path:1})}}function ad(i){ue(i,"svelte-1dykexu",".floorplan-plugin__room-material.svelte-1dykexu{position:absolute;left:0;top:0;width:100%;height:100%}svg.svelte-1dykexu{position:absolute;left:0;top:0;width:100%;height:100%;overflow:visible}")}function Ss(i,t,e){const n=i.slice();return n[5]=t[e],n}function ld(i){let t,e;return t=new id({props:{path:i[5].path}}),{c(){$(t.$$.fragment)},m(n,o){Z(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.path=n[5].path),t.$set(s)},i(n){e||(I(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function cd(i){let t,e;return t=new rd({props:{path:i[5].path}}),{c(){$(t.$$.fragment)},m(n,o){Z(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.path=n[5].path),t.$set(s)},i(n){e||(I(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function ud(i){let t,e;return t=new ed({props:{path:i[5].path}}),{c(){$(t.$$.fragment)},m(n,o){Z(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.path=n[5].path),t.$set(s)},i(n){e||(I(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Ms(i){let t,e,n,o;const s=[ud,cd,ld],r=[];function a(l,c){return l[5].floorType===1?0:l[5].floorType===0?1:2}return e=a(i),n=r[e]=s[e](i),{c(){t=Ce("svg"),n.c(),b(t,"width","100%"),b(t,"height","100%"),b(t,"viewBox",`0 0 ${i[1]} ${i[2]}`),b(t,"class","svelte-1dykexu")},m(l,c){M(l,t,c),r[e].m(t,null),o=!0},p(l,c){let u=e;e=a(l),e===u?r[e].p(l,c):(re(),D(r[u],1,1,()=>{r[u]=null}),ae(),n=r[e],n?n.p(l,c):(n=r[e]=s[e](l),n.c()),I(n,1),n.m(t,null))},i(l){o||(I(n),o=!0)},o(l){D(n),o=!1},d(l){l&&S(t),r[e].d()}}}function dd(i){let t,e,n=i[0],o=[];for(let r=0;r<n.length;r+=1)o[r]=Ms(Ss(i,n,r));const s=r=>D(o[r],1,1,()=>{o[r]=null});return{c(){t=T("div");for(let r=0;r<o.length;r+=1)o[r].c();b(t,"class","floorplan-plugin__room-material svelte-1dykexu")},m(r,a){M(r,t,a);for(let l=0;l<o.length;l+=1)o[l].m(t,null);e=!0},p(r,[a]){if(a&7){n=r[0];let l;for(l=0;l<n.length;l+=1){const c=Ss(r,n,l);o[l]?(o[l].p(c,a),I(o[l],1)):(o[l]=Ms(c),o[l].c(),I(o[l],1),o[l].m(t,null))}for(re(),l=n.length;l<o.length;l+=1)s(l);ae()}},i(r){if(!e){for(let a=0;a<n.length;a+=1)I(o[a]);e=!0}},o(r){o=o.filter(Boolean);for(let a=0;a<o.length;a+=1)D(o[a]);e=!1},d(r){r&&S(t),ut(o,r)}}}function hd(i,t,e){let n,{floorIndex:o}=t,{floorplanData:s}=t;const r=s.bounding.max.x-s.bounding.min.x,a=s.bounding.max.y-s.bounding.min.y;return i.$$set=l=>{"floorIndex"in l&&e(3,o=l.floorIndex),"floorplanData"in l&&e(4,s=l.floorplanData)},i.$$.update=()=>{i.$$.dirty&24&&e(0,n=s.floorDatas[o].rooms.map(l=>ge(R({},l),{path:l.path.map(c=>Ls(c,s.bounding))})))},[n,r,a,o,s]}class fd extends se{constructor(t){super(),oe(this,t,hd,dd,ie,{floorIndex:3,floorplanData:4},ad)}}function md(i){ue(i,"svelte-19uvvss","path.svelte-19uvvss{opacity:0}path.svelte-19uvvss:hover{opacity:0.1}")}function pd(i){let t,e,n;return{c(){t=Ce("path"),b(t,"d",i[2]),b(t,"fill","#fff"),b(t,"class","svelte-19uvvss")},m(o,s){M(o,t,s),e||(n=[Pe(t,"mouseenter",i[0]),Pe(t,"mouseleave",i[1])],e=!0)},p:Y,i:Y,o:Y,d(o){o&&S(t),e=!1,ct(n)}}}function gd(i,t,e){let{room:n}=t,{floorplanData:o}=t,{hoveredRoom:s}=t;function r(){s.set(n)}function a(){s.set(void 0)}const{bounding:l}=o,c=ii(n.path,{needZ:!0,format:u=>Ls(u,l)});return i.$$set=u=>{"room"in u&&e(3,n=u.room),"floorplanData"in u&&e(4,o=u.floorplanData),"hoveredRoom"in u&&e(5,s=u.hoveredRoom)},[r,a,c,n,o,s]}class Ad extends se{constructor(t){super(),oe(this,t,gd,pd,ie,{room:3,floorplanData:4,hoveredRoom:5},md)}}function vd(i){ue(i,"svelte-1kqo6e4",".floorplan-plugin__room-highlight.svelte-1kqo6e4{position:absolute;width:100%;height:100%}svg.svelte-1kqo6e4{width:100%;height:100%;overflow:visible}")}function zs(i,t,e){const n=i.slice();return n[5]=t[e],n}function Ts(i,t){let e,n,o;const s=[{room:t[5],floorplanData:t[1],hoveredRoom:t[2]}];let r={};for(let a=0;a<s.length;a+=1)r=je(r,s[a]);return n=new Ad({props:r}),{key:i,first:null,c(){e=me(),$(n.$$.fragment),this.first=e},m(a,l){M(a,e,l),Z(n,a,l),o=!0},p(a,l){t=a;const c=l&7?Fe(s,[{room:t[5],floorplanData:t[1],hoveredRoom:t[2]}]):{};n.$set(c)},i(a){o||(I(n.$$.fragment,a),o=!0)},o(a){D(n.$$.fragment,a),o=!1},d(a){a&&S(e),K(n,a)}}}function bd(i){let t,e,n=[],o=new Map,s,r=i[1].floorDatas[i[0]].rooms;const a=l=>l[5].id;for(let l=0;l<r.length;l+=1){let c=zs(i,r,l),u=a(c);o.set(u,n[l]=Ts(u,c))}return{c(){t=T("div"),e=Ce("svg");for(let l=0;l<n.length;l+=1)n[l].c();b(e,"width","100%"),b(e,"height","100%"),b(e,"viewBox",`0 0 ${i[3]} ${i[4]}`),b(e,"class","svelte-1kqo6e4"),b(t,"class","floorplan-plugin__room-highlight svelte-1kqo6e4")},m(l,c){M(l,t,c),B(t,e);for(let u=0;u<n.length;u+=1)n[u].m(e,null);s=!0},p(l,[c]){c&7&&(r=l[1].floorDatas[l[0]].rooms,re(),n=Ue(n,c,a,1,l,r,o,e,wt,Ts,null,zs),ae())},i(l){if(!s){for(let c=0;c<r.length;c+=1)I(n[c]);s=!0}},o(l){for(let c=0;c<n.length;c+=1)D(n[c]);s=!1},d(l){l&&S(t);for(let c=0;c<n.length;c+=1)n[c].d()}}}function yd(i,t,e){let{floorIndex:n}=t,{floorplanData:o}=t,{hoveredRoom:s}=t;const r=o.bounding.max.x-o.bounding.min.x,a=o.bounding.max.y-o.bounding.min.y;return i.$$set=l=>{"floorIndex"in l&&e(0,n=l.floorIndex),"floorplanData"in l&&e(1,o=l.floorplanData),"hoveredRoom"in l&&e(2,s=l.hoveredRoom)},[n,o,s,r,a]}class Bs extends se{constructor(t){super(),oe(this,t,yd,bd,ie,{floorIndex:0,floorplanData:1,hoveredRoom:2},vd)}}function wd(i){ue(i,"svelte-bl8zrz",".floorplan-plugin__floor.svelte-bl8zrz{position:absolute;left:0;top:0;width:100%;height:100%;opacity:0;pointer-events:none}.floorplan-plugin__floor--is-current.svelte-bl8zrz{opacity:1;pointer-events:auto}")}function js(i){let t,e;const n=[{floorIndex:i[1],floorplanData:i[7],hoveredRoom:i[12]}];let o={};for(let s=0;s<n.length;s+=1)o=je(o,n[s]);return t=new Bs({props:o}),{c(){$(t.$$.fragment)},m(s,r){Z(t,s,r),e=!0},p(s,r){const a=r&4226?Fe(n,[{floorIndex:s[1],floorplanData:s[7],hoveredRoom:s[12]}]):{};t.$set(a)},i(s){e||(I(t.$$.fragment,s),e=!0)},o(s){D(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function Vs(i){let t,e;const n=[{floorplanData:i[7],roomAreaEnable:i[4],roomNameEnable:i[5],floorIndex:i[1],getRoomAreaText:i[8],getLabelElement:i[9],hoveredRoom:i[12],adaptiveRoomLabelVisibleEnable:i[11]}];let o={};for(let s=0;s<n.length;s+=1)o=je(o,n[s]);return t=new Ru({props:o}),{c(){$(t.$$.fragment)},m(s,r){Z(t,s,r),e=!0},p(s,r){const a=r&7090?Fe(n,[{floorplanData:s[7],roomAreaEnable:s[4],roomNameEnable:s[5],floorIndex:s[1],getRoomAreaText:s[8],getLabelElement:s[9],hoveredRoom:s[12],adaptiveRoomLabelVisibleEnable:s[11]}]):{};t.$set(a)},i(s){e||(I(t.$$.fragment,s),e=!0)},o(s){D(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function Qs(i){let t,e;const n=[{floorplanData:i[7],floorIndex:i[1],getRuleDistanceText:i[10]}];let o={};for(let s=0;s<n.length;s+=1)o=je(o,n[s]);return t=new Uu({props:o}),{c(){$(t.$$.fragment)},m(s,r){Z(t,s,r),e=!0},p(s,r){const a=r&1154?Fe(n,[{floorplanData:s[7],floorIndex:s[1],getRuleDistanceText:s[10]}]):{};t.$set(a)},i(s){e||(I(t.$$.fragment,s),e=!0)},o(s){D(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function Cd(i){let t,e,n,o,s,r,a,l,c;const u=[{floorIndex:i[1],floorplanData:i[7]}];let h={};for(let A=0;A<u.length;A+=1)h=je(h,u[A]);e=new fd({props:h});let d=i[2]&&js(i);const f=[{floorplanData:i[7],floorIndex:i[1]}];let g={};for(let A=0;A<f.length;A+=1)g=je(g,f[A]);s=new ps({props:g});let v=i[3]&&Vs(i),p=i[6]&&Qs(i);return{c(){t=T("div"),$(e.$$.fragment),n=te(),d&&d.c(),o=te(),$(s.$$.fragment),r=te(),v&&v.c(),a=te(),p&&p.c(),b(t,"class",l=Be(`floorplan-plugin__floor${i[0]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz")},m(A,y){M(A,t,y),Z(e,t,null),B(t,n),d&&d.m(t,null),B(t,o),Z(s,t,null),B(t,r),v&&v.m(t,null),B(t,a),p&&p.m(t,null),c=!0},p(A,[y]){const w=y&130?Fe(u,[{floorIndex:A[1],floorplanData:A[7]}]):{};e.$set(w),A[2]?d?(d.p(A,y),y&4&&I(d,1)):(d=js(A),d.c(),I(d,1),d.m(t,o)):d&&(re(),D(d,1,1,()=>{d=null}),ae());const k=y&130?Fe(f,[{floorplanData:A[7],floorIndex:A[1]}]):{};s.$set(k),A[3]?v?(v.p(A,y),y&8&&I(v,1)):(v=Vs(A),v.c(),I(v,1),v.m(t,a)):v&&(re(),D(v,1,1,()=>{v=null}),ae()),A[6]?p?(p.p(A,y),y&64&&I(p,1)):(p=Qs(A),p.c(),I(p,1),p.m(t,null)):p&&(re(),D(p,1,1,()=>{p=null}),ae()),(!c||y&1&&l!==(l=Be(`floorplan-plugin__floor${A[0]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz"))&&b(t,"class",l)},i(A){c||(I(e.$$.fragment,A),I(d),I(s.$$.fragment,A),I(v),I(p),c=!0)},o(A){D(e.$$.fragment,A),D(d),D(s.$$.fragment,A),D(v),D(p),c=!1},d(A){A&&S(t),K(e),d&&d.d(),K(s),v&&v.d(),p&&p.d()}}}function Pd(i,t,e){let{isCurrent:n}=t,{floorIndex:o}=t,{hoverEnable:s}=t,{roomLabelsEnable:r}=t,{roomAreaEnable:a}=t,{roomNameEnable:l}=t,{ruleLabelsEnable:c}=t,{floorplanData:u}=t,{getRoomAreaText:h}=t,{getLabelElement:d}=t,{getRuleDistanceText:f}=t,{adaptiveRoomLabelVisibleEnable:g}=t;const v=_i(void 0);return i.$$set=p=>{"isCurrent"in p&&e(0,n=p.isCurrent),"floorIndex"in p&&e(1,o=p.floorIndex),"hoverEnable"in p&&e(2,s=p.hoverEnable),"roomLabelsEnable"in p&&e(3,r=p.roomLabelsEnable),"roomAreaEnable"in p&&e(4,a=p.roomAreaEnable),"roomNameEnable"in p&&e(5,l=p.roomNameEnable),"ruleLabelsEnable"in p&&e(6,c=p.ruleLabelsEnable),"floorplanData"in p&&e(7,u=p.floorplanData),"getRoomAreaText"in p&&e(8,h=p.getRoomAreaText),"getLabelElement"in p&&e(9,d=p.getLabelElement),"getRuleDistanceText"in p&&e(10,f=p.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in p&&e(11,g=p.adaptiveRoomLabelVisibleEnable)},[n,o,s,r,a,l,c,u,h,d,f,g,v]}class Id extends se{constructor(t){super(),oe(this,t,Pd,Cd,ie,{isCurrent:0,floorIndex:1,hoverEnable:2,roomLabelsEnable:3,roomAreaEnable:4,roomNameEnable:5,ruleLabelsEnable:6,floorplanData:7,getRoomAreaText:8,getLabelElement:9,getRuleDistanceText:10,adaptiveRoomLabelVisibleEnable:11},wd)}}function Ed(i){ue(i,"svelte-86bqav",".floorplan-main.svelte-86bqav{width:100%;height:100%;pointer-events:none}")}function Os(i,t,e){const n=i.slice();return n[18]=t[e],n}function Fs(i){let t,e,n,o,s,r,a=i[11].floorDatas,l=[];for(let f=0;f<a.length;f+=1)l[f]=Rs(Os(i,a,f));const c=f=>D(l[f],1,1,()=>{l[f]=null}),u=[{panoIndex:i[3],floorplanData:i[11],lastPanoramaLongitude:i[12],cameraImageUrl:i[13]}];let h={};for(let f=0;f<u.length;f+=1)h=je(h,u[f]);n=new cu({props:h});let d=i[6]&&Gs(i);return{c(){t=T("div");for(let f=0;f<l.length;f+=1)l[f].c();e=te(),$(n.$$.fragment),o=te(),d&&d.c(),b(t,"class","floorplan-main svelte-86bqav")},m(f,g){M(f,t,g);for(let v=0;v<l.length;v+=1)l[v].m(t,null);B(t,e),Z(n,t,null),B(t,o),d&&d.m(t,null),r=!0},p(f,g){if(i=f,g&249776){a=i[11].floorDatas;let p;for(p=0;p<a.length;p+=1){const A=Os(i,a,p);l[p]?(l[p].p(A,g),I(l[p],1)):(l[p]=Rs(A),l[p].c(),I(l[p],1),l[p].m(t,e))}for(re(),p=a.length;p<l.length;p+=1)c(p);ae()}const v=g&14344?Fe(u,[{panoIndex:i[3],floorplanData:i[11],lastPanoramaLongitude:i[12],cameraImageUrl:i[13]}]):{};n.$set(v),i[6]?d?(d.p(i,g),g&64&&I(d,1)):(d=Gs(i),d.c(),I(d,1),d.m(t,null)):d&&(re(),D(d,1,1,()=>{d=null}),ae())},i(f){if(!r){for(let g=0;g<a.length;g+=1)I(l[g]);I(n.$$.fragment,f),I(d),s||De(()=>{s=St(t,Mt,{duration:i[0],easing:At}),s.start()}),r=!0}},o(f){l=l.filter(Boolean);for(let g=0;g<l.length;g+=1)D(l[g]);D(n.$$.fragment,f),D(d),r=!1},d(f){f&&S(t),ut(l,f),K(n),d&&d.d()}}}function Rs(i){let t,e;const n=[{hoverEnable:i[5],floorplanData:i[11],getRoomAreaText:i[14],getLabelElement:i[15],getRuleDistanceText:i[16],roomLabelsEnable:i[7],roomAreaEnable:i[8],roomNameEnable:i[9],ruleLabelsEnable:i[10],adaptiveRoomLabelVisibleEnable:i[17]},{floorIndex:i[18].floorIndex},{isCurrent:i[18].floorIndex===i[4]}];let o={};for(let s=0;s<n.length;s+=1)o=je(o,n[s]);return t=new Id({props:o}),{c(){$(t.$$.fragment)},m(s,r){Z(t,s,r),e=!0},p(s,r){const a=r&249776?Fe(n,[r&249760&&{hoverEnable:s[5],floorplanData:s[11],getRoomAreaText:s[14],getLabelElement:s[15],getRuleDistanceText:s[16],roomLabelsEnable:s[7],roomAreaEnable:s[8],roomNameEnable:s[9],ruleLabelsEnable:s[10],adaptiveRoomLabelVisibleEnable:s[17]},r&2048&&{floorIndex:s[18].floorIndex},r&2064&&{isCurrent:s[18].floorIndex===s[4]}]):{};t.$set(a)},i(s){e||(I(t.$$.fragment,s),e=!0)},o(s){D(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function Gs(i){let t,e;return t=new gu({props:{floorplanData:i[11],northDesc:i[2]}}),{c(){$(t.$$.fragment)},m(n,o){Z(t,n,o),e=!0},p(n,o){const s={};o&2048&&(s.floorplanData=n[11]),o&4&&(s.northDesc=n[2]),t.$set(s)},i(n){e||(I(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function kd(i){let t,e,n=i[1]&&Fs(i);return{c(){n&&n.c(),t=me()},m(o,s){n&&n.m(o,s),M(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&I(n,1)):(n=Fs(o),n.c(),I(n,1),n.m(t.parentNode,t)):n&&(re(),D(n,1,1,()=>{n=null}),ae())},i(o){e||(I(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&S(t)}}}function xd(i,t,e){let{duration:n=0}=t,{visible:o}=t,{northDesc:s}=t,{panoIndex:r}=t,{floorIndex:a}=t,{hoverEnable:l}=t,{compassEnable:c}=t,{roomLabelsEnable:u}=t,{roomAreaEnable:h}=t,{roomNameEnable:d}=t,{ruleLabelsEnable:f}=t,{floorplanData:g}=t,{lastPanoramaLongitude:v}=t,{cameraImageUrl:p}=t,{getRoomAreaText:A}=t,{getLabelElement:y}=t,{getRuleDistanceText:w}=t,{adaptiveRoomLabelVisibleEnable:k}=t;return i.$$set=P=>{"duration"in P&&e(0,n=P.duration),"visible"in P&&e(1,o=P.visible),"northDesc"in P&&e(2,s=P.northDesc),"panoIndex"in P&&e(3,r=P.panoIndex),"floorIndex"in P&&e(4,a=P.floorIndex),"hoverEnable"in P&&e(5,l=P.hoverEnable),"compassEnable"in P&&e(6,c=P.compassEnable),"roomLabelsEnable"in P&&e(7,u=P.roomLabelsEnable),"roomAreaEnable"in P&&e(8,h=P.roomAreaEnable),"roomNameEnable"in P&&e(9,d=P.roomNameEnable),"ruleLabelsEnable"in P&&e(10,f=P.ruleLabelsEnable),"floorplanData"in P&&e(11,g=P.floorplanData),"lastPanoramaLongitude"in P&&e(12,v=P.lastPanoramaLongitude),"cameraImageUrl"in P&&e(13,p=P.cameraImageUrl),"getRoomAreaText"in P&&e(14,A=P.getRoomAreaText),"getLabelElement"in P&&e(15,y=P.getLabelElement),"getRuleDistanceText"in P&&e(16,w=P.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in P&&e(17,k=P.adaptiveRoomLabelVisibleEnable)},[n,o,s,r,a,l,c,u,h,d,f,g,v,p,A,y,w,k]}class Hi extends se{constructor(t){super(),oe(this,t,xd,kd,ie,{duration:0,visible:1,northDesc:2,panoIndex:3,floorIndex:4,hoverEnable:5,compassEnable:6,roomLabelsEnable:7,roomAreaEnable:8,roomNameEnable:9,ruleLabelsEnable:10,floorplanData:11,lastPanoramaLongitude:12,cameraImageUrl:13,getRoomAreaText:14,getLabelElement:15,getRuleDistanceText:16,adaptiveRoomLabelVisibleEnable:17},Ed)}}const Dd="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAwCAYAAACFUvPfAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAALaADAAQAAAABAAAAMAAAAADe2FZjAAAEF0lEQVRoBe2WzWskRRiHf13V092TxI2oEzYeVDwITtyDuCiihwiCePGgxIM3vYgHL4J4UIhBRA8i/gPqyUvWg7AiIuIeloDiYUHJLOK6BPwIk9nNODM9Xf1RVe1b3elJRjCZmQ6euqGmuqer33rq4e23GqiOykBloDJQGagMVAYqA5WBykBlYFYD1qwP/tdzaZqOx9zYOLxeX0+L5yzLGp0X/03a25MOnGRcBtx+6Rlo9SL08G4EooFnxa8Yiivox5/h5Ys/4cl7NVorNDRnngX+0MIkVMeMSf23zyKML8J7/Dy8hwF2Buh9CnS+AEQIdLspBuGb+M7/qLW4qJrNpsLapjYhpwVnx3BMfCtNNx3Etc9xywvnMf80wG8HmQainw0RxSGrnmeBp+8k5/j9S0HbvXb5io0Lz880/0wPHV1NlhLd316He+4xOCv5ragF7L9PrH1qBJyB0626x/lC+qrSvH5r/W+n1WpxUM5nMY4GPeH8lHJaPgfeAFQHCL+ntkXT+vnUc3W6pvTIwC0wy3rA4dwLmK2avZ7Eo9uKBuYJfgJscbs8dLCxDMt+EOEPBEZNEWyBYHqTz6bPXrzUnNrSShxHIsYiOL69zrCGLLcLqJP68tB+9w5wj+YhWDafQ2s61wNqxjZhmrQ2pvMFCEvXuCUZ7wqH794ZWs28LJqlTXSUyuksF2M/yOwqgkx2c1ADa4wLAQRk2sAGQQakhN6yFC2hltfz5kSY44NKQeeh+vtI/SSzWhg2CzCgmWISmKUGmaYFBDfCSymnfxJ6/+ospVcWOLLp5DGP/y0P/Rp66O99DQNq7Po3Ds0a0wY+My2QSv2N2mO/OyxR2o6UQk+Lv7yJ06JYSnnolZVU9cUn2O9SmaMWGFBqYXRwbqAJWIi94TX5biotpcGl1DXZ6LnqIbNDTnmUgi52Mv5l5ysMxIcZcGjy2DTK4ZHlcBC14zeSge4qphICjj3bS0A7o9nSp2TOkm7aZ8bGZy/jxhO87V91G0+dfY/Z7BWIIK9KYUi5qy/Hf8YfBG3sqJTHiQWhmTVkbip+wX3x6volVSx+LPAxF+VLXhZ8VQ+iP2Rta/iWe5v42Fngj0BbdnRTXh12ZIcKhTaGbcYjybRwXBU1lu9KlndXp04NM52poKWO0RZsviNaP9a6grkO972+st05pXhE5c1hTEluJy7XUejGUQNLMbAmTdWY1rKBLW3aTJqBZ7nZkb36DhYCreeYHbMUXHvaYi5XDK70EcgulmRjm77wNtenzuXCbmnTRaAx493rbGf3Jr/njMzj920CnKdUaFCjlDioy7NYNvOdGrQJNgI32/L2tkXfFPlxgToqjWVhD6KdLnQRdARf/HHQz2r2X2Gqy8pAZaAyUBmoDFQGKgP/q4F/AJYg9/s0ZoABAAAAAElFTkSuQmCC";function Ld(i){return N(this,null,function*(){const t=new Headers({"Content-Type":"text/plain"}),e=function(o){return N(this,null,function*(){const s={index:o.index,url:o.url,svgUrl:o.svg_url};if(o.svg_url){const r=yield fetch(o.svg_url,{headers:t}).then(a=>a.text());s.svgContent=r}return s})};return yield Promise.all(i.map(e))})}function Sd(i){return{id:i.id,size:i.size,name:i.name,path:i.path,roomType:i.room_type,floorType:i.floor_type,roomLabel:{position:i.room_label.position,positionInImage:i.room_label.position_in_image},observerIndexs:i.observer_indexs}}function Md(i){return{floorName:i.floor_name,floorIndex:i.floor_index,rooms:i.rooms.map(Sd),rules:i.rules}}function zd(i){return{index:i.index,floorIndex:i.floor_index,position:i.position,positionInImage:i.position_in_image}}function Td(i){return{rad:i.rad,position:i.position,positionInImage:i.position_in_image,northRad:i.north_rad,roomId:i.room_id,floorIndex:i.floor_index}}function It(i){return N(this,null,function*(){const t=yield Ld(i.outlines),e=i.computed_data.bounding,n=i.computed_data.floor_datas.map(Md),o=i.computed_data.entrance?Td(i.computed_data.entrance):null;return{outlines:t,entrance:o,bounding:e,floorDatas:n,observers:i.computed_data.observers.map(zd)}})}function Bd(i,t,e){return i.map(o=>{const s=o.position,r=o.icon?o.icon:{url:Dd,width:45,height:48},a=Zu(s,t),l=qu(s,e),c=Ju(l,e);return{floorIndex:a,icon:r,id:o.id,position:l,positionInImage:c}})}function jd(i,t){return t(i),i}function oi(i,t){return jd({},e=>{for(const n in i)t.indexOf(n)===-1&&(e[n]=i[n])})}function Ws(i,t){const e=Math.max(...i.work.observers.map(n=>n.floorIndex));return t>e?i.model.bounding.max.y:Math.max(...i.work.observers.filter(n=>n.floorIndex===t).map(n=>n.standingPosition.y))}function Xi(i,t,e=Ct.BOUNDING_CENTER){const n=Ws(i,t),o=Ws(i,t+1);return e===Ct.BOUNDING_CENTER?(i.model.bounding.max.y+i.model.bounding.min.y)/2:e===Ct.CEILING?o:n}function Yi(i,t,e,n){const o=Xi(i,e,n==null?void 0:n.attachedTo),s=new E.Vector3(0,o,0),r=new E.Vector3(1,o,0),a=s.clone().project(i.camera),l=r.clone().project(i.camera);return Math.abs((l.x-a.x)/1e3)*(t.getBoundingClientRect().width/2)}class wn{constructor(t,e){m(this,"VERSION","2.11.0-alpha.0");m(this,"five");m(this,"hooks",new Ft);m(this,"staticPrefix","//vrlab-static.ljcdn.com");this.five=t,e!=null&&e.staticPrefix&&(this.staticPrefix=e.staticPrefix)}getCurrentState(){return this.state}}class zt extends wn{}var Ne=(i=>(i.UnknownError="UnknownError",i.DataNotLoaded="DataNotLoaded",i.BreakOffByHide="BreakOffByHide",i.BreakOffByDisable="BreakOffByDisable",i.ModelNotLoaded="ModelNotLoaded",i.ChangeModeError="ChangeModeError",i.UpdateCameraError="UpdateCameraError",i))(Ne||{});const _s=500,Vd=80;function Ui(i,t,e=4){return Math.floor(i*Math.pow(10,e))===Math.floor(t*Math.pow(10,e))}function Ns(i,t){return N(this,null,function*(){yield new Promise((e,n)=>{i.changeMode(...t).catch(o=>n(o)),i.once("initAnimationEnded",()=>{const o=i.getCurrentState(),s=t[0];o.mode!==s&&n(new Error("mode \u4E0E\u9884\u671F\u4E0D\u7B26")),(()=>{const l=t[1];return l?Object.keys(l).every(c=>{const u=o[c];if(u===void 0)return!0;const h=l[c];return typeof u=="number"&&typeof h=="number"?Ui(u,h,2):u===h}):!0})()||n(new Error("five pose \u4E0E\u9884\u671F\u4E0D\u7B26")),e()})})})}function qi(i,t){if(i.currentMode!==t.mode)return!1;const{latitude:e,longitude:n,fov:o}=t,{latitude:s,longitude:r}=i.getCurrentState(),a=i.camera.fov;return!(!Ui(e,s,2)||!Ui(n,r,2)||o!==a)}function Hs(i,t,e=!0){return N(this,null,function*(){if(qi(i,t)===!0)return;const o=i.getCurrentState();if(o.mode!==t.mode){const[u]=yield $n(Ns(i,[t.mode,t,void 0,e]));if(u)throw new Error(Ne.ChangeModeError);return}const{latitude:s,longitude:r,fov:a}=o,l=Math.min(1e3,Math.max(200,Math.abs(s-Math.PI/2)*1e3,(r>Math.PI?2*Math.PI-r:r)*500,Math.abs(a-t.fov)*10)),[c]=yield $n(i.updateCamera(t,l,e));if(c)throw new Error(Ne.UpdateCameraError)})}function tn(i,t,e=300){const n=i.getElement();!n||(n.style.opacity=t+"",n.style.transition=e===0?"none":`opacity ${e}ms linear`,e!==0&&Promise.race([new Promise(o=>n.addEventListener("transitionend",o,{once:!0})),new Promise(o=>setTimeout(o,e))]).then(()=>{n.style.transition="none"}))}function Qd(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)>5*Math.PI/180,o=e>5*(Math.PI/180)&&e<355*(Math.PI/180);return n||o}function Od(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)<10*Math.PI/180,o=e<30*(Math.PI/180)||e>330*(Math.PI/180);return n&&o}class Fd extends zt{constructor(e,n){var a;super(e);m(this,"name","modelFloorplanPlugin");m(this,"state");m(this,"data");m(this,"showState");m(this,"showPromise");m(this,"app");m(this,"panoIndex",0);m(this,"floorIndex",0);m(this,"selector");m(this,"showRejection");m(this,"wrapper");m(this,"container",document.createElement("div"));m(this,"lastPanoramaLongitude",0);m(this,"size",{width:0,height:0});m(this,"hasAddedEventListener",!1);m(this,"isHiddenByHideFunc",!1);m(this,"dispose",()=>{var e,n;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(n=this.container)==null||n.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});m(this,"show",(...n)=>N(this,[...n],function*(e={}){if(!this.state.enabled||!this.showPromise&&this.state.visible)return;const o=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},o),this._show(e)}));m(this,"hide",(...n)=>N(this,[...n],function*(e={}){!this.state.enabled||(this.isHiddenByHideFunc=!0,this.state.visible!==!1&&(this.updateState({visible:!1},e.userAction||!0),this._hide(e)))}));m(this,"updateSize",()=>{if(!this.data||!qi(this.five,this.showState)||!this.container||!this.wrapper)return;const{min:e,max:n}=this.data.bounding,o=n.x-e.x,s=n.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=Yi(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(o*a),c=Math.ceil(s*a);this.size.width===l&&this.size.height===c||(this.container.style.width=l+"px",this.container.style.height=c+"px",this.size={width:l,height:c})});m(this,"_disable",e=>{var o,s,r;const{userAction:n}=e;this.hooks.emit("disable",{userAction:n}),(o=this.showRejection)==null||o.call(this,Ne.BreakOffByDisable),this.showPromise=void 0,(s=this.app)==null||s.$destroy(),this.app=void 0,(r=this.container)==null||r.remove(),this.removeEventListener()});m(this,"_enable",e=>{const{userAction:n}=e;this.addEventListener(),this.wrapper&&(this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n}))});m(this,"_show",e=>N(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.five.model)!=null&&r.loaded))throw new Error(Ne.ModelNotLoaded);if(!this.data)throw new Error(Ne.DataNotLoaded);this.isHiddenByHideFunc=!1;const n={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},o=R(R({},n),e),s=()=>N(this,null,function*(){this.hooks.emit("show",{userAction:o.userAction,auto:o.isAutoShow});let a=!1,l;this.showRejection=d=>{a=!0,l=d};const[c]=yield $n(Hs(this.five,this.showState,o.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(Ne.UnknownError);this.updateSize(),this.floorIndex=o.floorIndex,this.five.model.show(this.floorIndex);const u=o.modelOpacity,h=o.immediately?0:_s;tn(this.five,u,h),this.render(h)});return this.showPromise=s().then(()=>{this.hooks.emit("showAnimationEnded",{auto:o.isAutoShow,userAction:o.userAction})}).catch(a=>{if(this.updateState({visible:!1},o.userAction),!o.isAutoShow&&a instanceof Error)throw a}).finally(()=>{this.showPromise=void 0,this.showRejection=void 0}),this.showPromise}));m(this,"_hide",e=>{var s;(s=this.showRejection)==null||s.call(this,Ne.BreakOffByHide),this.showPromise=void 0;const o=R(R({},{userAction:!0,isAutoHide:!1}),e);tn(this.five,1,0),this.hooks.emit("hide",{auto:o.isAutoHide,userAction:o.userAction}),this.render()});m(this,"handleClick",()=>{if(!this.state.visible)return;if(this.hooks.emit("click"))return!1});m(this,"onFiveModelLoaded",()=>{if(this.state.enabled===!1||this.wrapper||!this.selector)return;const e=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!e)throw new Error("\u4E0D\u6B63\u786E\u7684\u7236\u5BB9\u5668\u9009\u62E9\u5668");this.wrapper=e,e.append(this.container)});m(this,"onFiveModeChange",e=>{e!==this.showState.mode&&(this.updateState({visible:!1},!1),this._hide({userAction:!1}))});m(this,"onFiveInteriaPan",(e,n)=>{if(!n||this.state.config.autoShowEnable===!1||this.isHiddenByHideFunc)return;const o=this.five.getCurrentState();o.mode==="Floorplan"&&(this.state.visible||Od(o)&&(this.updateState({visible:!0},!0),this._show({isAutoShow:!0})))});m(this,"onFivePanoArrived",e=>{var n;!((n=this.five)!=null&&n.work)||(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});m(this,"onFiveCameraUpdate",(e,n)=>{if(!this.state.visible||this.showPromise)return;const o=this.five.getCurrentState();Qd(o)&&(this.updateState({visible:!1},n),this._hide({userAction:n,isAutoHide:!0}))});m(this,"onFiveWantsGesture",(e,n)=>{if(!!this.state.visible&&(n.length>1||e==="mouseWheel"))return!1});m(this,"onFiveWantsPanGesture",(e,n)=>{if(this.five.getCurrentState().mode==="Floorplan"&&this.state.config.autoShowEnable!==!1&&n&&this.state.visible)return this.five.updateCamera(this.showState,0),!1});m(this,"onFiveWantsTapGesture",()=>this.handleClick());m(this,"onFiveWantsChangeMode",(e,n)=>{n==="Panorama"&&e==="Floorplan"&&(this.lastPanoramaLongitude=this.five.getCurrentState().longitude)});m(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const n=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[n].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});n!=null&&n.selector&&(this.selector=n.selector,console.warn("\u4E0D\u63A8\u8350\u7EE7\u7EED\u4F7F\u7528 params.selector \u914D\u7F6E\u7236\u5BB9\u5668\uFF0C\u8BF7\u4F7F\u7528 appendTo \u65B9\u6CD5")),this.showState={mode:"Floorplan",longitude:0,latitude:Math.PI/2,fov:Vd/((a=n==null?void 0:n.scale)!=null?a:1)};const o={northDesc:"\u5317",modelOpacity:1,hoverEnable:!0,compassEnable:!0,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,roomAreaEnable:!0,roomNameEnable:!0,adaptiveRoomLabelVisibleEnable:!0,cameraImageUrl:Pt,attachedTo:Ct.BOUNDING_CENTER,getLabelElement:void 0,getRoomAreaText:l=>(l/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:l=>l.toString()},s=n?oi(n,["selector","scale"]):{},r=R(R({},o),s);this.state={enabled:!0,visible:!1,config:r},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,n,o=!0){return N(this,null,function*(){function s(u){return Object.prototype.hasOwnProperty.apply(u,["version"])}const r=e;r&&!r.version&&console.warn("\u4F20\u5165 serverData.data \u7684\u65B9\u5F0F\u540E\u7EED\u53EF\u80FD\u4E0D\u518D\u652F\u6301\uFF0C\u8BF7\u628A serverData \u6574\u4F53\u4F20\u5165 load \u51FD\u6570");const a=JSON.parse(JSON.stringify(e)),l=s(a)?a.data:a,c=this.data;this.data=yield It(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),n&&this.updateState(n,o),this.render()})}appendTo(e){if(this.wrapper=e,!!this.state.enabled)return e.appendChild(this.container),this.render(),this}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled&&(e.enabled?this._enable({userAction:s}):this._disable({userAction:s})),e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}this.render()}changeConfigs(e,n=!0){this.updateState({config:e},n),this.render()}formatData(e){return N(this,null,function*(){return yield It(e.data)})}updateState(e,n){const o=this.state,s=e.config?R(R({},o.config),e.config):o.config;this.state=ge(R(R({},this.state),e),{config:s}),!$e(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",zIndex:10,pointerEvents:"none"}),this.five.addExtraElement(this.container)}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.on("modeChange",this.onFiveModeChange),e.on("interiaPan",this.onFiveInteriaPan),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsGesture",this.onFiveWantsGesture),e.on("wantsPanGesture",this.onFiveWantsPanGesture),e.on("wantsTapGesture",this.onFiveWantsTapGesture),e.on("wantsChangeMode",this.onFiveWantsChangeMode),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modelLoaded",this.onFiveModelLoaded),e.off("modeChange",this.onFiveModeChange),e.off("interiaPan",this.onFiveInteriaPan),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsGesture",this.onFiveWantsGesture),e.off("wantsPanGesture",this.onFiveWantsPanGesture),e.off("wantsTapGesture",this.onFiveWantsTapGesture),e.off("wantsChangeMode",this.onFiveWantsChangeMode),e.off("modelShownFloorChange",this.onModelShownFloorChange)}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0)return;const n=ge(R({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude});if(this.app)return this.app.$set(n);this.app=new Hi({target:this.container,intro:!0,props:n})}}const Rd=(i,t)=>new Fd(i,t);function Gd(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)>5*Math.PI/180,o=e>5*(Math.PI/180)&&e<355*(Math.PI/180);return n||o}function Wd(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)<10*Math.PI/180,o=e<30*(Math.PI/180)||e>330*(Math.PI/180);return n&&o}class _d extends zt{constructor(e,n){super(e);m(this,"name","modelFloorplanPlugin");m(this,"state");m(this,"data");m(this,"showState");m(this,"showPromise");m(this,"app");m(this,"panoIndex",0);m(this,"floorIndex",0);m(this,"selector");m(this,"showRejection");m(this,"wrapper");m(this,"container",document.createElement("div"));m(this,"lastPanoramaLongitude",0);m(this,"size",{width:0,height:0});m(this,"hasAddedEventListener",!1);m(this,"isHiddenByHideFunc",!1);m(this,"dispose",()=>{var e,n;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(n=this.container)==null||n.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});m(this,"show",(...n)=>N(this,[...n],function*(e={}){if(!this.state.enabled||!this.showPromise&&this.state.visible)return;const o=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},o),this._show(e)}));m(this,"hide",(...n)=>N(this,[...n],function*(e={}){!this.state.enabled||(this.isHiddenByHideFunc=!0,this.state.visible!==!1&&(this.updateState({visible:!1},e.userAction||!0),this._hide(e)))}));m(this,"updateSize",()=>{if(!this.data||!qi(this.five,this.showState)||!this.container||!this.wrapper)return;const{min:e,max:n}=this.data.bounding,o=n.x-e.x,s=n.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=Yi(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(o*a),c=Math.ceil(s*a);this.size.width===l&&this.size.height===c||(this.container.style.width=l+"px",this.container.style.height=c+"px",this.size={width:l,height:c})});m(this,"_disable",e=>{var o,s,r;const{userAction:n}=e;this.hooks.emit("disable",{userAction:n}),(o=this.showRejection)==null||o.call(this,Ne.BreakOffByDisable),this.showPromise=void 0,(s=this.app)==null||s.$destroy(),this.app=void 0,(r=this.container)==null||r.remove(),this.removeEventListener()});m(this,"_enable",e=>{const{userAction:n}=e;this.addEventListener(),this.wrapper&&(this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n}))});m(this,"_show",e=>N(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.five.model)!=null&&r.loaded))throw new Error(Ne.ModelNotLoaded);if(!this.data)throw new Error(Ne.DataNotLoaded);this.isHiddenByHideFunc=!1;const n={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},o=R(R({},n),e),s=()=>N(this,null,function*(){this.hooks.emit("show",{userAction:o.userAction,auto:o.isAutoShow});let a=!1,l;this.showRejection=d=>{a=!0,l=d};const[c]=yield $n(Hs(this.five,this.showState,o.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(Ne.UnknownError);this.updateSize(),this.updatePosition(),this.floorIndex=o.floorIndex,this.five.model.show(this.floorIndex);const u=o.modelOpacity,h=o.immediately?0:_s;tn(this.five,u,h),this.render(h)});return this.showPromise=s().then(()=>{this.hooks.emit("showAnimationEnded",{auto:o.isAutoShow,userAction:o.userAction})}).catch(a=>{if(this.updateState({visible:!1},o.userAction),!o.isAutoShow&&a instanceof Error)throw a}).finally(()=>{this.showPromise=void 0,this.showRejection=void 0}),this.showPromise}));m(this,"_hide",e=>{var s;(s=this.showRejection)==null||s.call(this,Ne.BreakOffByHide),this.showPromise=void 0;const o=R(R({},{userAction:!0,isAutoHide:!1}),e);tn(this.five,1,0),this.hooks.emit("hide",{auto:o.isAutoHide,userAction:o.userAction}),this.render()});m(this,"handleClick",()=>{if(!this.state.visible)return;if(this.hooks.emit("click"))return!1});m(this,"onFiveModelLoaded",()=>{if(this.state.enabled===!1||this.wrapper||!this.selector)return;const e=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!e)throw new Error("\u4E0D\u6B63\u786E\u7684\u7236\u5BB9\u5668\u9009\u62E9\u5668");this.wrapper=e,e.append(this.container)});m(this,"onFiveModeChange",e=>{e!==this.showState.mode&&(this.updateState({visible:!1},!1),this._hide({userAction:!1}))});m(this,"onFivePanoArrived",e=>{var n;!((n=this.five)!=null&&n.work)||(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});m(this,"onFiveCameraUpdate",(e,n)=>{if(!this.state.visible||this.showPromise)return;const o=this.five.getCurrentState();this.updatePosition(),this.updateSize(),Gd(o)&&(this.updateState({visible:!1},n),this._hide({userAction:n}))});m(this,"onFiveWantsPanGesture",(e,n)=>{if(this.five.getCurrentState().mode===this.showState.mode&&this.state.config.autoShowEnable!==!1){if(n&&this.state.visible)return this.five.updateCamera(this.showState,0),!1;if(n&&!this.state.visible){if(this.isHiddenByHideFunc)return;const o=this.five.getCurrentState();return o.mode!==this.showState.mode||this.state.visible?void 0:(Wd(o)&&(this.updateState({visible:!0},!0),this._show({isAutoShow:!0})),!1)}}});m(this,"onFiveWantsTapGesture",()=>this.handleClick());m(this,"onFiveWantsChangeMode",(e,n)=>{n==="Panorama"&&e===this.showState.mode&&(this.lastPanoramaLongitude=this.five.getCurrentState().longitude)});m(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const n=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[n].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});n!=null&&n.selector&&(this.selector=n.selector,console.warn("\u4E0D\u63A8\u8350\u7EE7\u7EED\u4F7F\u7528 params.selector \u914D\u7F6E\u7236\u5BB9\u5668\uFF0C\u8BF7\u4F7F\u7528 appendTo \u65B9\u6CD5")),this.showState={mode:"Mapview",longitude:0,latitude:Math.PI/2,fov:90};const o={northDesc:"\u5317",modelOpacity:1,hoverEnable:!0,compassEnable:!0,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,roomAreaEnable:!0,roomNameEnable:!0,cameraImageUrl:Pt,attachedTo:Ct.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:a=>(a/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:a=>a.toString()},s=n?oi(n,["selector","scale"]):{},r=R(R({},o),s);this.state={enabled:!0,visible:!1,config:r},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,n,o=!0){return N(this,null,function*(){function s(u){return Object.prototype.hasOwnProperty.apply(u,["version"])}const r=e;r&&!r.version&&console.warn("\u4F20\u5165 serverData.data \u7684\u65B9\u5F0F\u540E\u7EED\u53EF\u80FD\u4E0D\u518D\u652F\u6301\uFF0C\u8BF7\u628A serverData \u6574\u4F53\u4F20\u5165 load \u51FD\u6570");const a=JSON.parse(JSON.stringify(e)),l=s(a)?a.data:a,c=this.data;this.data=yield It(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),n&&this.updateState(n,o),this.render()})}appendTo(e){if(this.wrapper=e,!!this.state.enabled)return e.appendChild(this.container),this.render(),this}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled&&(e.enabled?this._enable({userAction:s}):this._disable({userAction:s})),e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}}changeConfigs(e,n=!0){this.updateState({config:e},n),this.render()}updatePosition(){var a;const e=Xi(this.five,this.floorIndex,this.state.config.attachedTo),n=(a=this.five.model)==null?void 0:a.bounding.getCenter(new E.Vector3).setY(e);if(!n)return;const o=n.clone().project(this.five.camera),s=(o.x+1)/2,r=-(o.y-1)/2;this.container.style.left=s*100+"%",this.container.style.top=r*100+"%"}formatData(e){return N(this,null,function*(){return yield It(e.data)})}updateState(e,n){const o=this.state,s=e.config?R(R({},o.config),e.config):o.config;this.state=ge(R(R({},this.state),e),{config:s}),!$e(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",zIndex:10,pointerEvents:"none"}),this.five.addExtraElement(this.container)}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.on("modeChange",this.onFiveModeChange),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsPanGesture",this.onFiveWantsPanGesture),e.on("wantsTapGesture",this.onFiveWantsTapGesture),e.on("wantsChangeMode",this.onFiveWantsChangeMode),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modelLoaded",this.onFiveModelLoaded),e.off("modeChange",this.onFiveModeChange),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsPanGesture",this.onFiveWantsPanGesture),e.off("wantsTapGesture",this.onFiveWantsTapGesture),e.off("wantsChangeMode",this.onFiveWantsChangeMode),e.off("modelShownFloorChange",this.onModelShownFloorChange)}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0)return;const n=ge(R({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude});if(this.app)return this.app.$set(n);this.app=new Hi({target:this.container,intro:!0,props:n})}}const Nd=(i,t)=>new _d(i,t);class Hd extends zt{constructor(e,n){super(e);m(this,"name","topviewFloorplanPlugin");m(this,"state");m(this,"data");m(this,"app");m(this,"selector");m(this,"panoIndex",0);m(this,"floorIndex",0);m(this,"wrapper");m(this,"container",document.createElement("div"));m(this,"lastPanoramaLongitude",0);m(this,"size",{width:0,height:0});m(this,"hasAddedEventListener",!1);m(this,"isHiddenByHideFunc",!1);m(this,"updateSize",()=>{if(!this.data||!this.container||!this.wrapper||this.five.getCurrentState().mode!=="Topview")return;const{min:e,max:n}=this.data.bounding,o=n.x-e.x,s=n.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=Yi(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(o*a),c=Math.ceil(s*a);this.size.width===l&&this.size.height===c||(this.container.style.width=l+"px",this.container.style.height=c+"px",this.size={width:l,height:c})});m(this,"dispose",()=>{var e,n;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(n=this.container)==null||n.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});m(this,"_disable",e=>{var o,s;const{userAction:n}=e;(o=this.app)==null||o.$destroy(),this.app=void 0,(s=this.container)==null||s.remove(),this.removeEventListener(),this.hooks.emit("disable",{userAction:n})});m(this,"onFiveModelLoaded",()=>{if(this.state.enabled===!1||this.wrapper||!this.selector)return;const e=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!e)throw new Error("\u4E0D\u6B63\u786E\u7684\u7236\u5BB9\u5668\u9009\u62E9\u5668");this.wrapper=e,e.append(this.container)});m(this,"onFiveModeChange",(...[e,,,,n])=>{e!=="Topview"&&this.state.visible&&(this.updateState({visible:!1},n),this._hide({userAction:n}))});m(this,"onFivePanoArrived",e=>{var n;!((n=this.five)!=null&&n.work)||(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});m(this,"onFiveCameraUpdate",(e,n)=>{!this.state.visible||(this.updatePosition(),this.updateSize())});m(this,"onFiveWantsGesture",e=>{if(!(e!=="pan"&&e!=="pinch"&&e!=="mouseWheel")&&this.state.visible&&!this.state.config.gestureEnable)return!1});m(this,"onFiveWantsMoveToPano",()=>{if(this.state.visible&&this.state.config.preventRoomClick)return!1});m(this,"onFiveInitAnimationEnded",(...[,,e])=>{const{mode:n}=this.five.getCurrentState();n==="Topview"&&!this.isHiddenByHideFunc&&!this.state.visible&&this.state.config.autoShowEnable&&(this.updateState({visible:!0},e),this._show({userAction:e}))});m(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const n=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[n].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});n!=null&&n.selector&&(this.selector=n.selector,console.warn("\u4E0D\u63A8\u8350\u7EE7\u7EED\u4F7F\u7528 params.selector \u914D\u7F6E\u7236\u5BB9\u5668\uFF0C\u8BF7\u4F7F\u7528 appendTo \u65B9\u6CD5"));const o={northDesc:"\u5317",modelOpacity:1,hoverEnable:!0,compassEnable:!0,gestureEnable:!1,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,roomAreaEnable:!0,roomNameEnable:!0,cameraImageUrl:Pt,attachedTo:Ct.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:a=>(a/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:a=>a.toString()},s=n?oi(n,["selector","scale"]):{},r=R(R({},o),s);this.state={enabled:!0,visible:!1,config:r},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,n,o=!0){return N(this,null,function*(){function s(u){return Object.prototype.hasOwnProperty.apply(u,["version"])}const r=e;r&&!r.version&&console.warn("\u4F20\u5165 serverData.data \u7684\u65B9\u5F0F\u540E\u7EED\u53EF\u80FD\u4E0D\u518D\u652F\u6301\uFF0C\u8BF7\u628A serverData \u6574\u4F53\u4F20\u5165 load \u51FD\u6570");const a=JSON.parse(JSON.stringify(e)),l=s(a)?a.data:a,c=this.data;this.data=yield It(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),n&&this.updateState(n,o),this.render()})}updatePosition(){var a;const e=Xi(this.five,this.floorIndex,this.state.config.attachedTo),n=(a=this.five.model)==null?void 0:a.bounding.getCenter(new E.Vector3).setY(e);if(!n)return;const o=n.clone().project(this.five.camera),s=(o.x+1)/2,r=-(o.y-1)/2;this.container.style.left=s*100+"%",this.container.style.top=r*100+"%"}appendTo(e){if(this.wrapper=e,!!this.state.enabled)return e.appendChild(this.container),this.render(),this}show(){return N(this,arguments,function*(e={}){if(this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},n),this._show({userAction:n})})}hide(){return N(this,arguments,function*(e={}){if(this.isHiddenByHideFunc=!0,!this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!1},n),this._hide({userAction:n})})}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled){const r={userAction:s};e.enabled?this._enable(r):this._disable(r)}if(e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}}changeConfigs(e,n=!0){this.updateState({config:e},n),this.render()}formatData(e){return N(this,null,function*(){return yield It(e.data)})}_show(e){return N(this,null,function*(){if(!this.state.enabled)return;this.isHiddenByHideFunc=!1;const{userAction:n}=e;this.hooks.emit("show",{userAction:n,auto:!1}),this.five.getCurrentState().mode!=="Topview"&&(yield Ns(this.five,["Topview",void 0,void 0,n])),this.five.model.show(this.floorIndex),this.updatePosition(),this.updateSize();const o=500,s=this.state.config.modelOpacity;tn(this.five,s,o),this.hooks.emit("showAnimationEnded",{userAction:n,auto:!1}),this.render()})}_hide(e){return N(this,null,function*(){if(!this.state.enabled)return;const{userAction:n}=e;this.hooks.emit("hide",{userAction:n,auto:!1});const o=1,s=0;tn(this.five,o,s),this.render()})}_enable(e){const{userAction:n}=e;this.addEventListener(),this.wrapper&&this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n})}updateState(e,n){const o=this.state,s=e.config?R(R({},o.config),e.config):o.config;this.state=ge(R(R({},this.state),e),{config:s}),!$e(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.on("modeChange",this.onFiveModeChange),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsGesture",this.onFiveWantsGesture),e.on("wantsMoveToPano",this.onFiveWantsMoveToPano),e.on("initAnimationEnded",this.onFiveInitAnimationEnded),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modeChange",this.onFiveModeChange),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsGesture",this.onFiveWantsGesture),e.off("wantsMoveToPano",this.onFiveWantsMoveToPano),e.off("initAnimationEnded",this.onFiveInitAnimationEnded),e.off("modelShownFloorChange",this.onModelShownFloorChange)}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate3d(-50%, -50%, 10px)",zIndex:10,pointerEvents:"none","will-change":"width, height"}),this.five.addExtraElement(this.container)}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0)return;const n=ge(R({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude});if(this.app)return this.app.$set(n);this.app=new Hi({target:this.container,intro:!0,props:n})}}const Xd=(i,t)=>new Hd(i,t);function Ji(i,t=200){let e;return function(...n){e||(i(...n),e=setTimeout(function(){e=null},t))}}function Yd(i){ue(i,"svelte-1nqrlxd",".plugin-radar__camera-wrapper.svelte-1nqrlxd{width:100%;height:100%;position:absolute;pointer-events:none}.plugin-radar__camera-position.svelte-1nqrlxd{position:absolute;left:0;top:0;width:0;height:0;transform:none;pointer-events:none;transition:transform 1s linear}.plugin-radar__camera-rotate.svelte-1nqrlxd{position:absolute;left:-0.9375rem;top:-0.9375rem;width:1.0625rem;height:1.0625rem;transform-origin:0.9375rem 0.9375rem;transform:rotate(45deg);background-repeat:no-repeat;background-size:100%}")}function Ud(i){let t,e,n;return{c(){t=T("div"),e=T("div"),n=T("div"),b(n,"class","plugin-radar__camera-rotate svelte-1nqrlxd"),z(n,"background-image","url("+(i[0]||Pt)+")"),z(n,"transform",i[1]),b(e,"class","plugin-radar__camera-position svelte-1nqrlxd"),z(e,"transform",i[2]),b(t,"class","plugin-radar__camera-wrapper svelte-1nqrlxd")},m(o,s){M(o,t,s),B(t,e),B(e,n)},p(o,[s]){s&1&&z(n,"background-image","url("+(o[0]||Pt)+")"),s&2&&z(n,"transform",o[1]),s&4&&z(e,"transform",o[2])},i:Y,o:Y,d(o){o&&S(t)}}}function qd(i){return`rotate(${Math.floor(i/Math.PI*180)*-1+45}deg)`}function Jd(i,t,e){let n,o,{five:s}=t,{pxmm:r}=t,{floorplanData:a}=t,{cameraImageUrl:l}=t,c=s.getCurrentState().panoIndex,u=s.getCurrentState().longitude;function h(g,v){const p=g.bounding,A=g.observers[v];if(!A)return"";const y=(p.max.x-p.min.x)*r,w=(p.max.y-p.min.y)*r,k=Math.floor(A.positionInImage.x*y),P=Math.floor(A.positionInImage.y*w);return`translate(${k}px, ${P}px)`}function d(g){e(6,c=g)}const f=Ji(g=>{e(7,u=g.longitude)},1e3/60);return Ye(()=>(s.on("panoWillArrive",d),s.on("cameraDirectionUpdate",f),function(){s.off("panoWillArrive",d),s.off("cameraDirectionUpdate",f)})),i.$$set=g=>{"five"in g&&e(3,s=g.five),"pxmm"in g&&e(4,r=g.pxmm),"floorplanData"in g&&e(5,a=g.floorplanData),"cameraImageUrl"in g&&e(0,l=g.cameraImageUrl)},i.$$.update=()=>{i.$$.dirty&96&&e(2,n=h(a,c)),i.$$.dirty&128&&e(1,o=qd(u))},[l,o,n,s,r,a,c,u]}class Zd extends se{constructor(t){super(),oe(this,t,Jd,Ud,ie,{five:3,pxmm:4,floorplanData:5,cameraImageUrl:0},Yd)}}function Kd(i){ue(i,"svelte-1i87fz7",".plugin-pano-floorplan__extra-objects.svelte-1i87fz7{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.plugin-pano-floorplan__extra-object-item--position.svelte-1i87fz7{position:absolute;width:0;height:0}.plugin-pano-floorplan__extra-object-item.svelte-1i87fz7{transform:translate(-50%, -50%)}")}function Xs(i,t,e){const n=i.slice();return n[1]=t[e],n}function Ys(i,t){let e,n,o=`${t[1].icon.width/16}rem`,s=`${t[1].icon.height/16}rem`,r,a=`${t[1].positionInImage.y*100}%`,l=`${t[1].positionInImage.x*100}%`;return{key:i,first:null,c(){e=T("div"),n=T("div"),r=te(),b(n,"class","plugin-pano-floorplan__extra-object-item svelte-1i87fz7"),z(n,"background-image",`url(${t[1].icon.url})`),z(n,"width",o),z(n,"height",s),b(e,"class","plugin-pano-floorplan__extra-object-item--position svelte-1i87fz7"),z(e,"top",a),z(e,"left",l),this.first=e},m(c,u){M(c,e,u),B(e,n),B(e,r)},p(c,u){t=c,u&1&&z(n,"background-image",`url(${t[1].icon.url})`),u&1&&o!==(o=`${t[1].icon.width/16}rem`)&&z(n,"width",o),u&1&&s!==(s=`${t[1].icon.height/16}rem`)&&z(n,"height",s),u&1&&a!==(a=`${t[1].positionInImage.y*100}%`)&&z(e,"top",a),u&1&&l!==(l=`${t[1].positionInImage.x*100}%`)&&z(e,"left",l)},d(c){c&&S(e)}}}function $d(i){let t,e=[],n=new Map,o=i[0];const s=r=>r[1].id;for(let r=0;r<o.length;r+=1){let a=Xs(i,o,r),l=s(a);n.set(l,e[r]=Ys(l,a))}return{c(){t=T("div");for(let r=0;r<e.length;r+=1)e[r].c();b(t,"class","plugin-pano-floorplan__extra-objects svelte-1i87fz7")},m(r,a){M(r,t,a);for(let l=0;l<e.length;l+=1)e[l].m(t,null)},p(r,[a]){a&1&&(o=r[0],e=Ue(e,a,s,1,r,o,n,t,Gi,Ys,null,Xs))},i:Y,o:Y,d(r){r&&S(t);for(let a=0;a<e.length;a+=1)e[a].d()}}}function eh(i,t,e){let{extraObjects:n=[]}=t;return i.$$set=o=>{"extraObjects"in o&&e(0,n=o.extraObjects)},[n]}class th extends se{constructor(t){super(),oe(this,t,eh,$d,ie,{extraObjects:0},Kd)}}function Us(i){let t,e;const n=[{five:i[0],pxmm:i[1],floorIndex:i[2],floorplanData:i[4],onRoomHeightClick:i[6]}];let o={};for(let s=0;s<n.length;s+=1)o=je(o,n[s]);return t=new Bs({props:o}),{c(){$(t.$$.fragment)},m(s,r){Z(t,s,r),e=!0},p(s,r){const a=r&87?Fe(n,[{five:s[0],pxmm:s[1],floorIndex:s[2],floorplanData:s[4],onRoomHeightClick:s[6]}]):{};t.$set(a)},i(s){e||(I(t.$$.fragment,s),e=!0)},o(s){D(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function nh(i){let t,e,n,o,s,r;const a=[{floorIndex:i[2],floorplanData:i[4]}];let l={};for(let u=0;u<a.length;u+=1)l=je(l,a[u]);t=new ps({props:l}),n=new th({props:{extraObjects:i[5]}});let c=i[3]&&Us(i);return{c(){$(t.$$.fragment),e=te(),$(n.$$.fragment),o=te(),c&&c.c(),s=me()},m(u,h){Z(t,u,h),M(u,e,h),Z(n,u,h),M(u,o,h),c&&c.m(u,h),M(u,s,h),r=!0},p(u,[h]){const d=h&20?Fe(a,[{floorIndex:u[2],floorplanData:u[4]}]):{};t.$set(d);const f={};h&32&&(f.extraObjects=u[5]),n.$set(f),u[3]?c?(c.p(u,h),h&8&&I(c,1)):(c=Us(u),c.c(),I(c,1),c.m(s.parentNode,s)):c&&(re(),D(c,1,1,()=>{c=null}),ae())},i(u){r||(I(t.$$.fragment,u),I(n.$$.fragment,u),I(c),r=!0)},o(u){D(t.$$.fragment,u),D(n.$$.fragment,u),D(c),r=!1},d(u){K(t,u),u&&S(e),K(n,u),u&&S(o),c&&c.d(u),u&&S(s)}}}function ih(i,t,e){let n,{five:o}=t,{pxmm:s}=t,{floorIndex:r}=t,{hoverEnable:a}=t,{floorplanData:l}=t,{extraObjects:c=[]}=t;const u=void 0;return i.$$set=h=>{"five"in h&&e(0,o=h.five),"pxmm"in h&&e(1,s=h.pxmm),"floorIndex"in h&&e(2,r=h.floorIndex),"hoverEnable"in h&&e(3,a=h.hoverEnable),"floorplanData"in h&&e(4,l=h.floorplanData),"extraObjects"in h&&e(7,c=h.extraObjects)},i.$$.update=()=>{i.$$.dirty&132&&e(5,n=c==null?void 0:c.filter(h=>h.floorIndex===r))},[o,s,r,a,l,n,u,c]}class oh extends se{constructor(t){super(),oe(this,t,ih,nh,ie,{five:0,pxmm:1,floorIndex:2,hoverEnable:3,floorplanData:4,extraObjects:7})}}function sh(i){ue(i,"svelte-1mvqyqq",".plugin-floorplan-radar.svelte-1mvqyqq{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.plugin-floorplan-radar-container.svelte-1mvqyqq{position:relative}")}function qs(i){let t,e,n,o=i[6]!==0&&Js(i);return{c(){t=T("div"),o&&o.c(),b(t,"class","plugin-floorplan-radar svelte-1mvqyqq"),De(()=>i[12].call(t))},m(s,r){M(s,t,r),o&&o.m(t,null),e=Ke(t,i[12].bind(t)),n=!0},p(s,r){s[6]!==0?o?(o.p(s,r),r&64&&I(o,1)):(o=Js(s),o.c(),I(o,1),o.m(t,null)):o&&(re(),D(o,1,1,()=>{o=null}),ae())},i(s){n||(I(o),n=!0)},o(s){D(o),n=!1},d(s){s&&S(t),o&&o.d(),e()}}}function Js(i){let t,e,n,o,s=`${i[8]}px`,r=`${i[11]}px`,a;const l=[{five:i[0],pxmm:i[9],floorIndex:i[10],floorplanData:i[3],hoverEnable:i[2],extraObjects:i[5]}];let c={};for(let d=0;d<l.length;d+=1)c=je(c,l[d]);e=new oh({props:c});const u=[{pxmm:i[9],five:i[0],floorplanData:i[3],cameraImageUrl:i[4]}];let h={};for(let d=0;d<u.length;d+=1)h=je(h,u[d]);return o=new Zd({props:h}),{c(){t=T("div"),$(e.$$.fragment),n=te(),$(o.$$.fragment),b(t,"class","plugin-floorplan-radar-container svelte-1mvqyqq"),z(t,"width",s),z(t,"height",r)},m(d,f){M(d,t,f),Z(e,t,null),B(t,n),Z(o,t,null),a=!0},p(d,f){const g=f&1581?Fe(l,[{five:d[0],pxmm:d[9],floorIndex:d[10],floorplanData:d[3],hoverEnable:d[2],extraObjects:d[5]}]):{};e.$set(g);const v=f&537?Fe(u,[{pxmm:d[9],five:d[0],floorplanData:d[3],cameraImageUrl:d[4]}]):{};o.$set(v),f&256&&s!==(s=`${d[8]}px`)&&z(t,"width",s),f&2048&&r!==(r=`${d[11]}px`)&&z(t,"height",r)},i(d){a||(I(e.$$.fragment,d),I(o.$$.fragment,d),a=!0)},o(d){D(e.$$.fragment,d),D(o.$$.fragment,d),a=!1},d(d){d&&S(t),K(e),K(o)}}}function rh(i){let t,e,n=i[1]&&qs(i);return{c(){n&&n.c(),t=me()},m(o,s){n&&n.m(o,s),M(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&I(n,1)):(n=qs(o),n.c(),I(n,1),n.m(t.parentNode,t)):n&&(re(),D(n,1,1,()=>{n=null}),ae())},i(o){e||(I(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&S(t)}}}function ah(i,t,e){var A,y;let{five:n}=t,{visible:o}=t,{hoverEnable:s}=t,{floorplanData:r}=t,{cameraImageUrl:a}=t,{extraObjects:l=[]}=t,c=0,u=(y=(A=n.work.observers[n.getCurrentState().panoIndex])==null?void 0:A.floorIndex)!=null?y:0,h=0,d=0,f=0,g=0;function v(w){e(10,u=n.work.observers[w].floorIndex)}Ye(()=>(n.on("panoArrived",v),()=>{n.off("panoArrived",v)}));function p(){h=this.clientWidth,d=this.clientHeight,e(6,h),e(7,d)}return i.$$set=w=>{"five"in w&&e(0,n=w.five),"visible"in w&&e(1,o=w.visible),"hoverEnable"in w&&e(2,s=w.hoverEnable),"floorplanData"in w&&e(3,r=w.floorplanData),"cameraImageUrl"in w&&e(4,a=w.cameraImageUrl),"extraObjects"in w&&e(5,l=w.extraObjects)},i.$$.update=()=>{if(i.$$.dirty&456){const w=Math.min(h,d),{max:k,min:P}=r.bounding,C=k.x-P.x,L=k.y-P.y,x=function(){return C>L?[w,w/C*L]:[w/L*C,w]}();e(8,f=x[0]),e(11,g=x[1]),e(9,c=f/C)}},[n,o,s,r,a,l,h,d,f,c,u,g,p]}class lh extends se{constructor(t){super(),oe(this,t,ah,rh,ie,{five:0,visible:1,hoverEnable:2,floorplanData:3,cameraImageUrl:4,extraObjects:5},sh)}}class ch extends zt{constructor(e,n){super(e);m(this,"name","panoFloorplanRadarPlugin");m(this,"state");m(this,"data");m(this,"app");m(this,"wrapperSelector","");m(this,"wrapper",null);m(this,"disposed",!1);m(this,"extraObjects",[]);m(this,"dispose",()=>{var e;this.disposed=!0,(e=this.app)==null||e.$destroy(),this.wrapper=null,this.wrapperSelector="",this.hooks.emit("dispose")});m(this,"_disable",e=>{var o;const{userAction:n}=e;(o=this.app)==null||o.$destroy(),this.app=void 0,this.hooks.emit("disable",{userAction:n})});this.five=e;const o={hoverEnable:!1,cameraImageUrl:Pt},s=n!=null&&n.configs?n.configs:{},r=R(R({},o),s);this.state={enabled:!0,visible:!0,config:r},n!=null&&n.wrapper&&console.warn("\u4E0D\u63A8\u8350\u7EE7\u7EED\u4F7F\u7528 params.selector \u914D\u7F6E\u7236\u5BB9\u5668\uFF0C\u8BF7\u4F7F\u7528 appendTo \u65B9\u6CD5"),typeof(n==null?void 0:n.wrapper)=="string"?this.wrapperSelector=n.wrapper:(n==null?void 0:n.wrapper)instanceof Element&&(this.wrapper=n.wrapper),e.once("dispose",this.dispose)}load(e,n,o=!0){return N(this,null,function*(){function s(c){return Object.prototype.hasOwnProperty.apply(c,["version"])}const r=JSON.parse(JSON.stringify(e)),a=s(r)?r.data:r,l=this.data;this.data=yield It(a),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,l),n&&this.updateState(n,o),this.render()})}show(){return N(this,arguments,function*(e={}){if(this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},n),this._show({userAction:n})})}hide(){return N(this,arguments,function*(e={}){if(!this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!1},n),this._hide({userAction:n})})}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled){const r={userAction:s};e.enabled?this._enable(r):this._disable(r)}if(e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}}appendTo(e){this.wrapper=e,this.render()}changeConfigs(e,n=!0){this.setState({config:e},{userAction:n}),this.render()}setExtraObjectsWith3DPositions(e){!this.data||(this.extraObjects=Bd(e,this.five,this.data),this.render())}formatData(e){return N(this,null,function*(){return yield It(e.data)})}_enable(e){const{userAction:n}=e;this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n})}_show(e){if(this.disposed||!this.state.enabled)return;const{userAction:n}=e;this.hooks.emit("show",{userAction:n}),this.render()}_hide(e){if(this.disposed||!this.state.enabled)return;const{userAction:n}=e;this.hooks.emit("hide",{userAction:n}),this.render()}updateState(e,n){const o=this.state;this.state=R(R({},this.state),e),!$e(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}render(){if(this.disposed||!this.state.enabled)return;if(!this.wrapper&&this.wrapperSelector){const n=document.querySelector(this.wrapperSelector);this.wrapper=n}if(!this.data||!this.wrapper)return;const e=ge(R({},this.state.config),{five:this.five,floorplanData:this.data,visible:this.state.visible,extraObjects:this.extraObjects});this.app?this.app.$set(e):this.app=new lh({target:this.wrapper,props:e})}}const uh=(i,t)=>new ch(i,t),dh=[{type:0,floorType:1,roomType:"100900000012",name:"\u5176\u4ED6"},{type:1,floorType:1,roomType:"100900000002",name:"\u5BA2\u5385"},{type:2,floorType:1,roomType:"100900000002",name:"\u9910\u5385"},{type:3,floorType:0,roomType:"100900000001",name:"\u5367\u5BA4"},{type:4,floorType:0,roomType:"100900000001",name:"\u4E66\u623F"},{type:5,floorType:3,roomType:"100900000004",name:"\u536B\u751F\u95F4"},{type:6,floorType:3,roomType:"100900000004",name:"\u6DCB\u6D74\u95F4"},{type:7,floorType:3,roomType:"100900000004",name:"\u6D17\u624B\u95F4"},{type:8,floorType:3,roomType:"100900000003",name:"\u53A8\u623F"},{type:9,floorType:1,roomType:"100900000003",name:"\u5F00\u653E\u53A8\u623F",onlySubArea:!0},{type:10,floorType:0,roomType:"100900000001",name:"\u591A\u529F\u80FD\u95F4"},{type:11,floorType:0,roomType:"100900000009",name:"\u4FDD\u59C6\u95F4"},{type:12,floorType:4,roomType:"100900000005",name:"\u9633\u53F0"},{type:13,floorType:4,roomType:"100900000006",name:"\u9732\u53F0"},{type:14,floorType:0,roomType:"100900000008",name:"\u50A8\u7269\u95F4"},{type:15,floorType:0,roomType:"100900000013",name:"\u8863\u5E3D\u95F4"},{type:16,floorType:0,roomType:"100900000011",name:"\u9601\u697C"},{type:17,floorType:2,roomType:"100900000007",name:"\u82B1\u56ED"},{type:18,floorType:5,roomType:"100900000010",name:"\u8F66\u5E93"},{type:19,floorType:1,roomType:"100900000012",name:"\u7535\u68AF"},{type:20,floorType:1,roomType:"100900000012",name:"\u5730\u4E0B\u5BA4"},{type:21,floorType:1,roomType:"100900000012",name:"\u5929\u4E95"},{type:22,floorType:1,roomType:"100900000012",name:"\u9633\u5149\u623F"},{type:23,floorType:1,roomType:"100900000012",name:"\u8FC7\u9053"},{type:24,floorType:1,roomType:"100900000012",name:"\u697C\u68AF\u95F4"},{type:25,floorType:1,roomType:"100900000012",name:"\u95E8\u5385"},{type:26,floorType:2,roomType:"100900000012",name:"\u5165\u6237\u82B1\u56ED"},{type:27,floorType:1,roomType:"100900000012",name:"\u7384\u5173"},{type:28,floorType:1,roomType:"100900000012",name:"\u6311\u7A7A"},{type:29,floorType:4,roomType:"100900000012",name:"\u667E\u6652\u533A"},{type:30,floorType:4,roomType:"100900000012",name:"\u6D17\u8863\u623F"},{type:31,floorType:0,roomType:"100900000012",name:"\u5A31\u4E50\u533A"},{type:32,floorType:0,roomType:"100900000012",name:"\u5065\u8EAB\u533A"},{type:33,floorType:0,roomType:"100900000012",name:"\u63A5\u5F85\u533A"},{type:34,floorType:0,roomType:"100900000012",name:"\u5F71\u97F3\u533A"},{type:35,floorType:1,roomType:"100900000012",name:"\u9910\u996E\u533A"},{type:36,floorType:1,roomType:"100900000012",name:"\u5176\u4ED6",onlySubArea:!0},{type:37,floorType:1,roomType:"100900000002",name:"\u8D77\u5C45\u5BA4"},{type:38,floorType:0,roomType:"100900000001",name:"\u4E3B\u5367"},{type:39,floorType:0,roomType:"100900000001",name:"\u6B21\u5367"},{type:40,floorType:0,roomType:"100900000001",name:"\u4F18\u5316\u95F4"},{type:41,floorType:0,roomType:"100900000001",name:"\u529E\u516C\u5BA4"},{type:42,floorType:0,roomType:"100900000001",name:"\u4F1A\u8BAE\u5BA4"},{type:43,floorType:0,roomType:"100900000001",name:"\u6D3D\u8C08\u95F4"},{type:44,floorType:1,roomType:"100900000002",name:"\u5171\u4EAB\u5927\u5385"},{type:45,floorType:1,roomType:"100900000012",name:"\u6C34\u5427"},{type:46,floorType:0,roomType:"100900000015",name:"\u51FA\u5165\u53E3"},{type:47,floorType:0,roomType:"100900000015",name:"\u5927\u5385"},{type:48,floorType:0,roomType:"100900000015",name:"\u5305\u53A2"},{type:49,floorType:0,roomType:"100900000015",name:"\u5176\u4ED6"},{type:50,floorType:0,roomType:"100900000016",name:"\u51FA\u5165\u53E3"},{type:51,floorType:0,roomType:"100900000016",name:"\u529E\u516C\u533A"},{type:52,floorType:0,roomType:"100900000016",name:"\u8001\u677F\u95F4"},{type:53,floorType:0,roomType:"100900000016",name:"\u4F1A\u8BAE\u5BA4"},{type:54,floorType:0,roomType:"100900000016",name:"\u4F11\u606F\u533A/\u6C34\u5427"},{type:55,floorType:0,roomType:"100900000016",name:"\u5176\u4ED6"},{type:56,floorType:2,roomType:"100900000012",name:"\u7A7A\u4E2D\u82B1\u56ED"},{type:57,floorType:0,roomType:"100900000001",name:"\u6D0B\u5BA4"},{type:58,floorType:0,roomType:"100900000001",name:"\u548C\u5BA4"}],hh=[{type:0,description:"\u6728\u8D28\u5730\u677F"},{type:1,description:"\u74F7\u7816\u5730\u9762"},{type:2,description:"\u6237\u5916\u5730\u9762"},{type:3,description:"\u536B\u751F\u95F4\u5730\u9762"},{type:4,description:"\u9633\u53F0\u5730\u9762"},{type:5,description:"\u8F66\u5E93\u5730\u9762"}],fh=[{roomType:"100900000001",description:"\u5BA4"},{roomType:"100900000002",description:"\u5385"},{roomType:"100900000003",description:"\u53A8"},{roomType:"100900000004",description:"\u536B"},{roomType:"100900000005",description:"\u9633\u53F0"},{roomType:"100900000006",description:"\u9732\u53F0"},{roomType:"100900000007",description:"\u82B1\u56ED"},{roomType:"100900000008",description:"\u50A8"},{roomType:"100900000009",description:"\u4FDD\u59C6\u95F4"},{roomType:"100900000010",description:"\u8F66\u5E93"},{roomType:"100900000011",description:"\u9601\u697C"},{roomType:"100900000012",description:"\u5176\u4ED6"},{roomType:"100900000013",description:"\u8863"},{roomType:"100900000015",description:"\u5546\u94FA"},{roomType:"100900000016",description:"\u5199\u5B57\u697C"}],Zi=(i,t,e)=>{const n=new E.Matrix4,o=new E.Euler(i,t,e,"YXZ");return n.makeRotationFromEuler(o),n},mh=(i,{scale:t,rotation:e,position:n})=>{if(t&&i.scale.set(t,t,t),e){const[o,s,r]=e;o&&i.applyMatrix4(Zi(o,0,0)),s&&i.applyMatrix4(Zi(0,s,0)),r&&i.applyMatrix4(Zi(0,0,r))}return n&&i.position.set(n.x,n.y,n.z),i};function Zs(i,t){i.traverse(e=>{var n;if(e.type==="Mesh"){const o=e,s=R({map:o.material.map||{}},t);o.material=new V.MeshBasicMaterial(s),o.renderOrder=1,((n=e.parent)==null?void 0:n.type)==="Mesh"&&(e.renderOrder=e.parent.renderOrder+1)}})}const ph=(i,t)=>{var u;const e=t.fbx_url||"//vrlab-static.ljcdn.com/release/web/v3/dipan3/dipan.FBX",n=(u=t.north_rad)!=null?u:void 0,o={},s=h=>N(this,null,function*(){var q;const d=(h==null?void 0:h.fbx_url)||e,f=(q=h==null?void 0:h.north_rad)!=null?q:n;if(typeof f!="number")throw new Error('"northRad"\u914D\u7F6E\u53C2\u6570\u7F3A\u5931\uFF1A\u672A\u914D\u7F6E\u6307\u5357\u9488\u6307\u5411\uFF01');const g=i.model.bounding,v=g.max.x-g.min.x,p=g.max.z-g.min.z,A=Math.max(v,p),w=yield new Tn.FBXLoader().loadAsync(d);Zs(w,{transparent:!0,side:E.DoubleSide,blending:E.AdditiveBlending});const k=[0,f-Math.PI/2,0],{model:{bounding:{max:{x:P,z:C},min:{x:L,y:x,z:Q}}}}=i;o.yBase=x;const _={x:(P+L)/2,y:x-1.6,z:(C+Q)/2},F=.0045*A;return mh(w,{position:_,rotation:k,scale:F}),o.object=w,!0}),r=({latitude:h})=>{if(!o.object)return;const d=a(h);d&&(o.object.position.y=d)},a=h=>{if(o.yBase===void 0)return;const d=.6;if(h>=Math.PI/4)return o.yBase-(d+1.6);const f=h*(4/Math.PI);return o.yBase-(d*f+1.6)};return{load:s,disable:()=>{!o.object||(i.scene.remove(o.object),i.needsRender=!0,i.off("cameraDirectionUpdate",r))},enable:()=>{if(!o.object)return;const h=a(i.getPose().latitude);h&&(o.object.position.y=h),i.scene.add(o.object),i.needsRender=!0,i.on("cameraDirectionUpdate",r)}}};function gh(i,t){var c,u,h,d,f;const e=(c=t==null?void 0:t.size)!=null?c:512,n=(u=t==null?void 0:t.fontSize)!=null?u:e*(35/256)*1.2,o=(h=t==null?void 0:t.backgroundColor)!=null?h:"rgba(0,0,0,0)",s=(d=t==null?void 0:t.fontColor)!=null?d:"#fff",r=(f=t==null?void 0:t.textAlign)!=null?f:"center",a=document.createElement("canvas");a.setAttribute("width",e+""),a.setAttribute("height",e+"");const l=a.getContext("2d");return l.fillStyle=o,l.fillRect(0,0,e,e),l.font=`${n}px "\u5FAE\u8F6F\u96C5\u9ED1"`,l.textAlign=r,l.fillStyle=s,l.fillText(i,e/2,e*.7),new V.CanvasTexture(a)}const Ah=({x:i,y:t,z:e})=>new V.Vector3(i,t,e),vh=(i,t)=>{var v,p,A;const e={},n=(v=t.animationEnabled)!=null?v:!0,o=(p=t.position)!=null?p:void 0,s=(A=t.rad)!=null?A:void 0,r=t.fbx_url||"//vrlab-image4.ljcdn.com/release/web/entryDoorMini/Anim_Door1.fbx",a=[],l=y=>N(this,null,function*(){var _,F,q,j,G,O,H,W;const w=(_=y==null?void 0:y.position)!=null?_:o;if(!w)return Promise.reject(new Error("ModelEntryDoorGuidePlugin.load(): position is undefined"));const k=Ah(w),P=(F=y==null?void 0:y.rad)!=null?F:s,C=(q=y==null?void 0:y.fbx_url)!=null?q:r;if(e.rad=P,P===void 0)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): rad is ${P}`));const L=yield new Tn.FBXLoader().loadAsync(C);L.position.copy(k),L.rotation.z=P,L.scale.set(.8,.8,.8),Zs(L,{transparent:!0,side:E.DoubleSide});const x=(H=(O=(G=(j=L.children)==null?void 0:j[0])==null?void 0:G.children)==null?void 0:O[3])==null?void 0:H.clone();if(!x)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): textMesh is ${x}`));const Q=(W=t.name)!=null?W:"\u5165\u6237\u95E8";return x.material=new V.MeshBasicMaterial({transparent:!0,map:gh(Q)}),x.renderOrder=3,L.children[0].add(x),e.object=L,!0}),c=()=>{if(e.animation)return;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.initAnimation(): state.object is ",e.object);const y=1,w=new V.AnimationMixer(e.object);a.push(w);const k=w.clipAction(e.object.animations[0]);k.timeScale=y;let P;const C=()=>{let _=0,F=0;const q=1e3/30,j=G=>{_=requestAnimationFrame(j);const O=G-F;O<q||(F=G,a.forEach(H=>H.update(O/1e3)),i.needsRender=!0)};return _=requestAnimationFrame(j),()=>{cancelAnimationFrame(_)}},Q={play:()=>{P||(k.play(),P=C(),requestAnimationFrame(()=>{e.object&&e.object.rotation.z!==e.rad&&(e.object.rotation.z=e.rad)}))},stop:()=>{k.stop(),P==null||P(),P=void 0}};e.animation=Q},u=y=>{var k;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.enable(): object is ",e.object);((k=y==null?void 0:y.animationEnable)!=null?k:n)&&(e.animation||c(),e.animation.play()),i.scene.add(e.object),i.needsRender=!0},h=()=>{!e.object||(e.animation&&e.animation.stop(),i.scene.remove(e.object),i.needsRender=!0)},d=y=>y==="Floorplan"?u():h();return{load:l,enable:y=>(e.enabled||(e.enabled=!0,d(i.currentMode),i.on("modeChange",d),u(y)),!0),disable:()=>(e.enabled&&(e.enabled=!1,h(),i.off("modeChange",d)),!0)}};class Ki extends hn.default.Tween{constructor(){super(...arguments);m(this,"disposeMethods",[]);m(this,"animationFrameDisposer");m(this,"onDispose",e=>(this.disposeMethods.push(e),this));m(this,"play",()=>(this.start(0),this.animationFrameDisposer=Pn(e=>this.update(e)),this));m(this,"dispose",()=>{var e;this.stop(),(e=this.animationFrameDisposer)==null||e.call(this),this.disposeMethods.forEach(n=>n()),this.disposeMethods=[],hn.default.remove(this)})}}function Ks(i,t=hn.default.Easing.Linear.None){const e=new Ki({progress:0}).to({progress:1});return i!==void 0&&e.duration(i),t!==void 0&&e.easing(t),e}const Cn=window.requestAnimationFrame||(i=>setTimeout(i,16)),bh=window.cancelAnimationFrame||clearTimeout;function si(i,t=0){t<=0?Cn(i):Cn(()=>si(i,t-1))}function Pn(i,t=60){let e=-1,n=0,o=-1;const s=1e3/t;function r(a){o===-1&&(o=a),e=Cn(r),!(a-n<s)&&(n=a,i&&i(a-o))}return e=Cn(r),function(){bh(e)}}function yh(){const i=Date.now();return new Promise(t=>{Cn(()=>{t(Date.now()-i)})})}const wh=Bn.Easing;function Ch(i,t,e,n=wh.Linear.None){const o=new Bn.Tween(i).to(t,e).easing(n);si(()=>o.start(0));const s=Pn(a=>{o.update(a)===!1&&s()}),r=[];return o.onDestroy=a=>(r.push(a),o),o.destroy=function(){this.stop(),Object.assign(o,{_onStartCallback:null,_onUpdateCallback:null,_onCompleteCallback:null,_onStopCallbackL:null});let a;for(;a=r.shift();)a();s()},o}function Ph(i,t){return Ch({progress:0},{progress:1},i,t)}var $s=(i=>(i.Move="Move",i.Rotate="Rotate",i))($s||{}),et=(i=>(i.Clockwise="Clockwise",i.Anticlockwise="Anticlockwise",i.Loop="Loop",i))(et||{});const ri=Math.PI*2;function er(i){return(i%ri+ri)%ri}function tr(i){return i%ri}function $i(i,t,e){return i+(t-i)*e}const eo=(i,t,e)=>{const n=Math.PI,o=n*2;return i=er(i),t=er(t),e===et.Anticlockwise&&i<t&&(i+=o),e===et.Clockwise&&t<i&&(t+=o),e===et.Loop&&t-i>n?eo(i,t,et.Anticlockwise):e===et.Loop&&i-t>n?eo(i,t,et.Clockwise):{from:i,to:t}},Ih=i=>{const t={},e=(l,c,...u)=>N(this,[l,c,...u],function*(s,r,a={preload:!0}){return t.interruptCallback&&t.interruptCallback(!1),a.asyncStartCallback&&(yield a.asyncStartCallback()),s.mode&&s.mode!==i.currentMode&&(yield i.changeMode(s.mode)),a.preload&&s.panoIndex!==void 0&&s.panoIndex!==i.panoIndex&&(yield i.preloadPano(s.panoIndex)),a.asyncEndCallback&&(yield a.asyncEndCallback()),s.panoIndex===void 0&&s.fov===void 0&&s.latitude===void 0&&s.longitude===void 0?!0:yield new Promise((h,d)=>{const f=s.panoIndex!==void 0?s.panoIndex:i.panoIndex;f!==void 0?i.moveToPano(f,Object.assign({duration:r,moveEndCallback:()=>h(!0),moveCancelCallback:()=>d(!1)},s)):d(!1)})}),n=s=>{const r=i.state,a=tr(r.latitude),l=tr(s.latitude),{from:c,to:u}=eo(r.longitude,s.longitude,s.rotation||et.Loop),h=r.fov,d=s.fov;return{from:{latitude:a,longitude:c,fov:h},to:{latitude:l,longitude:u,fov:d}}};return{move:e,rotate:(l,c,...u)=>N(this,[l,c,...u],function*(s,r,a={}){t.interruptCallback&&t.interruptCallback(!1),a.asyncStartCallback&&(yield a.asyncStartCallback()),i.currentMode!==fe.Five.Mode.Panorama&&(yield i.changeMode(fe.Five.Mode.Panorama)),s.panoIndex!==void 0&&s.panoIndex!==i.panoIndex&&(a.preload&&(yield i.preloadPano(s.panoIndex)),yield new Promise((f,g)=>{if(!s.panoIndex){f(!0);return}i.moveToPano(s.panoIndex,{moveEndCallback:()=>f(!0),moveCancelCallback:()=>g(!1)})})),a.asyncEndCallback&&(yield a.asyncEndCallback());const{from:h,to:d}=n(s);return yield new Promise(f=>{const g=({progress:w})=>{const k={};k.longitude=$i(h.longitude,d.longitude,w),k.latitude=$i(h.latitude,d.latitude,w),k.fov=$i(h.fov,d.fov,w),i.setState(k,!0)},v=()=>{f(!0)},p=()=>{f(!1)},A=s.rotateSpeed?Math.ceil(Math.abs(d.longitude-h.longitude)/s.rotateSpeed*1e3):r,y=Ph(A,Bn.Easing.Linear.None).onUpdate(g).onComplete(v).onDestroy(p);s.rotation===et.Loop&&y.repeat(1/0).yoyo(!0),t.interruptCallback=(w=!0)=>{y.destroy(),t.interruptCallback=void 0,t.timeoutId&&(clearTimeout(t.timeoutId),t.timeoutId=void 0),f(w)},t.timeoutId=setTimeout(()=>{t.interruptCallback&&t.interruptCallback(!0)},r)})})}};function nr(i,t){return i.x===t.x&&i.y===t.y}function ir(i,t){return Math.abs(i)===1/0&&Math.abs(t)===1/0?!0:Math.abs(i-t)<.001}function ai(i,t){return(t.y-i.y)/(t.x-i.x)}function or(i,t,e){const n=ai(i[1],i[0]),o=ai(t[1],t[0]);if(isNaN(n)||isNaN(o)||ir(n,o))return!1;if(li(i[0],t))return i[0];if(li(i[1],t))return i[1];if(li(t[0],i))return t[0];if(li(t[1],i))return t[1];if(e&&!Eh(i,t))return!1;const s=i[0],r=t[0];if(Math.abs(n)===1/0)return{x:s.x,y:t[1].y-(t[1].x-s.x)*o};if(Math.abs(o)===1/0)return{x:r.x,y:i[1].y-(i[1].x-r.x)*n};const a=(r.y-s.y+n*s.x-o*r.x)/(n-o),l=n*a-n*s.x+s.y;return{x:a,y:l}}function li(i,t){return nr(i,t[0])||nr(i,t[1])?!0:(t[0].x-i.x)*(i.x-t[1].x)>=0&&(t[0].y-i.y)*(i.y-t[1].y)>=0&&ir(ai(t[0],i),ai(i,t[1]))}function ci(i,t,e){return(i.x-e.x)*(t.y-e.y)-(t.x-e.x)*(i.y-e.y)}function Eh(i,t){return Math.max(i[0].x,i[1].x)>=Math.min(t[0].x,t[1].x)&&Math.max(t[0].x,t[1].x)>=Math.min(i[0].x,i[1].x)&&Math.max(i[0].y,i[1].y)>=Math.min(t[0].y,t[1].y)&&ci(t[0],i[1],i[0])*ci(i[1],t[1],i[0])>0&&ci(i[0],t[1],t[0])*ci(t[1],i[1],t[0])>0?1:0}function sr(i,t=0){t<=0?requestAnimationFrame(i):requestAnimationFrame(()=>sr(i,t-1))}const kh=`<style type="text/css">
|
|
115
|
+
`;return i.$$set=s=>{"content"in s&&e(0,n=s.content)},[n,o]}class Iu extends se{constructor(t){super(),oe(this,t,Pu,Cu,ie,{content:0},wu)}}function Eu(i){ue(i,"svelte-ozpg4a",".floorplan-plugin__base-image.svelte-ozpg4a{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}")}function ku(i){let t,e;return t=new yu({props:{url:i[1].url}}),{c(){$(t.$$.fragment)},m(n,o){Z(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.url=n[1].url),t.$set(s)},i(n){e||(I(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function xu(i){let t,e;return t=new Iu({props:{content:i[0]}}),{c(){$(t.$$.fragment)},m(n,o){Z(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.content=n[0]),t.$set(s)},i(n){e||(I(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Du(i){let t,e,n,o;const s=[xu,ku],r=[];function a(l,c){return l[0]?0:l[1]?1:-1}return~(e=a(i))&&(n=r[e]=s[e](i)),{c(){t=T("div"),n&&n.c(),b(t,"class","floorplan-plugin__base-image svelte-ozpg4a")},m(l,c){M(l,t,c),~e&&r[e].m(t,null),o=!0},p(l,[c]){let u=e;e=a(l),e===u?~e&&r[e].p(l,c):(n&&(re(),D(r[u],1,1,()=>{r[u]=null}),ae()),~e?(n=r[e],n?n.p(l,c):(n=r[e]=s[e](l),n.c()),I(n,1),n.m(t,null)):n=null)},i(l){o||(I(n),o=!0)},o(l){D(n),o=!1},d(l){l&&S(t),~e&&r[e].d()}}}function Lu(i,t,e){let n,o,{floorIndex:s}=t,{floorplanData:r}=t;return i.$$set=a=>{"floorIndex"in a&&e(2,s=a.floorIndex),"floorplanData"in a&&e(3,r=a.floorplanData)},i.$$.update=()=>{var a,l;i.$$.dirty&12&&e(1,n=r.outlines[s]),i.$$.dirty&12&&e(0,o=(l=(a=r.outlines)==null?void 0:a[s])==null?void 0:l.svgContent)},[o,n,s,r]}class ps extends se{constructor(t){super(),oe(this,t,Lu,Du,ie,{floorIndex:2,floorplanData:3},Eu)}}function Su(i){ue(i,"svelte-12pzct5",".floorplan-plugin__room-label-item.svelte-12pzct5{position:absolute;display:flex;flex-flow:column;align-items:center;line-height:1;color:#fff;transform:translate(-50%, -50%);white-space:nowrap;will-change:opacity;transition:opacity 300ms}.floorplan-plugin__room-size.svelte-12pzct5{opacity:0.45}")}function Mu(i){let t,e=i[8].outerHTML+"",n;return{c(){t=new Nn(!1),n=me(),t.a=n},m(o,s){t.m(e,o,s),M(o,n,s)},p(o,s){s&256&&e!==(e=o[8].outerHTML+"")&&t.p(e)},d(o){o&&S(n),o&&t.d()}}}function zu(i){let t,e,n=i[1]&&gs(i),o=i[0]&&As(i);return{c(){n&&n.c(),t=te(),o&&o.c(),e=me()},m(s,r){n&&n.m(s,r),M(s,t,r),o&&o.m(s,r),M(s,e,r)},p(s,r){s[1]?n?n.p(s,r):(n=gs(s),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null),s[0]?o?o.p(s,r):(o=As(s),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null)},d(s){n&&n.d(s),s&&S(t),o&&o.d(s),s&&S(e)}}}function gs(i){let t,e=i[2].name+"",n;return{c(){t=T("span"),n=xe(e),b(t,"class","floorplan-plugin__room-name")},m(o,s){M(o,t,s),B(t,n)},p(o,s){s&4&&e!==(e=o[2].name+"")&&ze(n,e)},d(o){o&&S(t)}}}function As(i){let t,e;return{c(){t=T("span"),e=xe(i[7]),b(t,"class","floorplan-plugin__room-size svelte-12pzct5")},m(n,o){M(n,t,o),B(t,e)},p(n,o){o&128&&ze(e,n[7])},d(n){n&&S(t)}}}function Tu(i){let t,e;function n(r,a){if(r[3]===void 0)return zu;if(r[8])return Mu}let o=n(i),s=o&&o(i);return{c(){t=T("div"),s&&s.c(),b(t,"class","floorplan-plugin__room-label-item svelte-12pzct5"),De(()=>i[19].call(t)),z(t,"left",i[9]),z(t,"top",i[10]),z(t,"font-size",i[11]),z(t,"opacity",i[6]?"1":"0")},m(r,a){M(r,t,a),s&&s.m(t,null),e=Ke(t,i[19].bind(t))},p(r,[a]){o===(o=n(r))&&s?s.p(r,a):(s&&s.d(1),s=o&&o(r),s&&(s.c(),s.m(t,null))),a&64&&z(t,"opacity",r[6]?"1":"0")},i:Y,o:Y,d(r){r&&S(t),s&&s.d(),e()}}}function Bu(i,t){const e=i[0],n=i[1];let o=!1;for(let s=0,r=t.length-1;s<t.length;r=s++){const a=t[s][0],l=t[s][1],c=t[r][0],u=t[r][1];l>n!=u>n&&e<(c-a)*(n-l)/(u-l)+a&&(o=!o)}return o}function ju(i,t,e){let n,o,s,r,a,{pxmm:l}=t,{roomAreaEnable:c}=t,{roomNameEnable:u}=t,{room:h}=t,{hoveredRoom:d}=t,{getRoomAreaText:f}=t,{getLabelElement:g}=t,{adaptiveRoomLabelVisibleEnable:v}=t;function p(F,q){if(q.width===0||q.height===0)return()=>!1;const j=F.path.map(({x:pe,y:de})=>[pe,de]),G=F.roomLabel.position,{x:O,y:H}=G,{width:W,height:ee}=q,X=W/2,le=ee/2;return function(de){const Ae=O*de,Ee=H*de,Te=j.map(([ce,ve])=>[ce*de,ve*de]);return[[Ae+X,Ee-le],[Ae-X,Ee-le],[Ae-X,Ee+le],[Ae+X,Ee+le]].every(ce=>Bu(ce,Te))}}const A=document.body.clientWidth,y=document.body.clientHeight,w=h.roomLabel,k=w.positionInImage.x*100+"%",P=w.positionInImage.y*100+"%",C=(A<500||y<500?10:14)+"px";let L=0,x=0,Q=!1;d.subscribe(function(q){e(16,Q=!!q&&q.id===h.id)});function _(){L=this.clientWidth,x=this.clientHeight,e(4,L),e(5,x)}return i.$$set=F=>{"pxmm"in F&&e(12,l=F.pxmm),"roomAreaEnable"in F&&e(0,c=F.roomAreaEnable),"roomNameEnable"in F&&e(1,u=F.roomNameEnable),"room"in F&&e(2,h=F.room),"hoveredRoom"in F&&e(13,d=F.hoveredRoom),"getRoomAreaText"in F&&e(14,f=F.getRoomAreaText),"getLabelElement"in F&&e(3,g=F.getLabelElement),"adaptiveRoomLabelVisibleEnable"in F&&e(15,v=F.adaptiveRoomLabelVisibleEnable)},i.$$.update=()=>{i.$$.dirty&12&&e(8,n=g==null?void 0:g(h)),i.$$.dirty&16388&&e(7,o=h.size?f(h.size):""),i.$$.dirty&48&&e(18,s={width:L,height:x}),i.$$.dirty&262148&&e(17,r=s?p(h,s):void 0),i.$$.dirty&233472&&e(6,a=v?Q?!0:!!(r!=null&&r(l)):!0)},[c,u,h,g,L,x,a,o,n,k,P,C,l,d,f,v,Q,r,s,_]}class Vu extends se{constructor(t){super(),oe(this,t,ju,Tu,ie,{pxmm:12,roomAreaEnable:0,roomNameEnable:1,room:2,hoveredRoom:13,getRoomAreaText:14,getLabelElement:3,adaptiveRoomLabelVisibleEnable:15},Su)}}function Qu(i){ue(i,"svelte-13xux0b",".floorplan-plugin__room-labels.svelte-13xux0b{width:100%;height:100%;position:absolute;left:0;top:0;z-index:20;pointer-events:none}")}function vs(i,t,e){const n=i.slice();return n[12]=t[e],n}function bs(i){let t,e=[],n=new Map,o,s,r=i[8];const a=l=>l[12].id;for(let l=0;l<r.length;l+=1){let c=vs(i,r,l),u=a(c);n.set(u,e[l]=ys(u,c))}return{c(){t=T("div");for(let l=0;l<e.length;l+=1)e[l].c();b(t,"class","floorplan-plugin__room-labels svelte-13xux0b"),De(()=>i[11].call(t))},m(l,c){M(l,t,c);for(let u=0;u<e.length;u+=1)e[u].m(t,null);o=Ke(t,i[11].bind(t)),s=!0},p(l,c){c&447&&(r=l[8],re(),e=Ue(e,c,a,1,l,r,n,t,wt,ys,null,vs),ae())},i(l){if(!s){for(let c=0;c<r.length;c+=1)I(e[c]);s=!0}},o(l){for(let c=0;c<e.length;c+=1)D(e[c]);s=!1},d(l){l&&S(t);for(let c=0;c<e.length;c+=1)e[c].d();o()}}}function ys(i,t){let e,n,o;const s=[{pxmm:t[7],room:t[12],hoveredRoom:t[2],roomAreaEnable:t[0],roomNameEnable:t[1],getLabelElement:t[4],getRoomAreaText:t[3],adaptiveRoomLabelVisibleEnable:t[5]}];let r={};for(let a=0;a<s.length;a+=1)r=je(r,s[a]);return n=new Vu({props:r}),{key:i,first:null,c(){e=me(),$(n.$$.fragment),this.first=e},m(a,l){M(a,e,l),Z(n,a,l),o=!0},p(a,l){t=a;const c=l&447?Fe(s,[{pxmm:t[7],room:t[12],hoveredRoom:t[2],roomAreaEnable:t[0],roomNameEnable:t[1],getLabelElement:t[4],getRoomAreaText:t[3],adaptiveRoomLabelVisibleEnable:t[5]}]):{};n.$set(c)},i(a){o||(I(n.$$.fragment,a),o=!0)},o(a){D(n.$$.fragment,a),o=!1},d(a){a&&S(e),K(n,a)}}}function Ou(i){let t,e,n=i[8]&&bs(i);return{c(){n&&n.c(),t=me()},m(o,s){n&&n.m(o,s),M(o,t,s),e=!0},p(o,[s]){o[8]?n?(n.p(o,s),s&256&&I(n,1)):(n=bs(o),n.c(),I(n,1),n.m(t.parentNode,t)):n&&(re(),D(n,1,1,()=>{n=null}),ae())},i(o){e||(I(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&S(t)}}}function Fu(i,t,e){let n,{floorIndex:o}=t,{roomAreaEnable:s}=t,{roomNameEnable:r}=t,{floorplanData:a}=t,{hoveredRoom:l}=t,{getRoomAreaText:c}=t,{getLabelElement:u}=t,{adaptiveRoomLabelVisibleEnable:h}=t,d=0,f=0;function g(){d=this.clientWidth,e(6,d)}return i.$$set=v=>{"floorIndex"in v&&e(9,o=v.floorIndex),"roomAreaEnable"in v&&e(0,s=v.roomAreaEnable),"roomNameEnable"in v&&e(1,r=v.roomNameEnable),"floorplanData"in v&&e(10,a=v.floorplanData),"hoveredRoom"in v&&e(2,l=v.hoveredRoom),"getRoomAreaText"in v&&e(3,c=v.getRoomAreaText),"getLabelElement"in v&&e(4,u=v.getLabelElement),"adaptiveRoomLabelVisibleEnable"in v&&e(5,h=v.adaptiveRoomLabelVisibleEnable)},i.$$.update=()=>{if(i.$$.dirty&1536&&e(8,n=a.floorDatas[o].rooms),i.$$.dirty&1088){const{max:v,min:p}=a.bounding,A=v.x-p.x;e(7,f=d/A)}},[s,r,l,c,u,h,d,f,n,o,a,g]}class Ru extends se{constructor(t){super(),oe(this,t,Fu,Ou,ie,{floorIndex:9,roomAreaEnable:0,roomNameEnable:1,floorplanData:10,hoveredRoom:2,getRoomAreaText:3,getLabelElement:4,adaptiveRoomLabelVisibleEnable:5},Qu)}}function Gu(i){ue(i,"svelte-djlmk4",".floorplan-plugin__rule-labels.svelte-djlmk4.svelte-djlmk4{position:absolute;display:flex}.floorplan-plugin__rule-labels--top.svelte-djlmk4.svelte-djlmk4{left:0;top:-1.25rem}.floorplan-plugin__rule-labels--bottom.svelte-djlmk4.svelte-djlmk4{left:0;bottom:-1.25rem}.floorplan-plugin__rule-labels--left.svelte-djlmk4.svelte-djlmk4{top:0;left:-1.25rem}.floorplan-plugin__rule-labels--right.svelte-djlmk4.svelte-djlmk4{top:0;right:-1.25rem}.floorplan-plugin__rule-line.svelte-djlmk4.svelte-djlmk4{background:#fff;opacity:0.05;width:100%;height:100%}.floorplan-plugin__rule-scale-wrapper.svelte-djlmk4.svelte-djlmk4{position:absolute;width:0.3125rem;height:100%;left:50%;top:0;transform:translateX(-50%)}.floorplan-plugin__rule-labels.is-row.svelte-djlmk4 .floorplan-plugin__rule-scale-wrapper.svelte-djlmk4{width:100%;height:0.3125rem;top:50%;left:0;transform:translateY(-50%)}.floorplan-plugin__rule-scale.svelte-djlmk4.svelte-djlmk4{position:absolute;background:#fff;opacity:0.05;width:100%;height:0.0625rem}.floorplan-plugin__rule-labels.is-row.svelte-djlmk4 .floorplan-plugin__rule-scale.svelte-djlmk4{width:0.0625rem;height:100%}.floorplan-plugin__rule-text-wrapper.svelte-djlmk4.svelte-djlmk4{position:absolute}.floorplan-plugin__rule-labels--top.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:100%;height:0;top:0.625rem}.floorplan-plugin__rule-labels--bottom.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:100%;height:0;bottom:0.625rem}.floorplan-plugin__rule-labels--left.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:0;height:100%;left:0.625rem}.floorplan-plugin__rule-labels--right.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:0;height:100%;right:0.625rem}.floorplan-plugin__rule-text-item.svelte-djlmk4.svelte-djlmk4{width:0;height:0;position:absolute;transform:rotate(90deg)}.floorplan-plugin__rule-labels.is-row.svelte-djlmk4 .floorplan-plugin__rule-text-item.svelte-djlmk4{transform:rotate(0)}.floorplan-plugin__rule-text.svelte-djlmk4.svelte-djlmk4{width:-moz-max-content;width:max-content;transform:translate(-50%, -50%);font-size:0.625rem;color:#fff;opacity:0.2}")}function ws(i,t,e){const n=i.slice();return n[11]=t[e],n[13]=e,n}function Cs(i,t,e){const n=i.slice();return n[14]=t[e],n}function Ps(i){let t;return{c(){t=T("div"),b(t,"class","floorplan-plugin__rule-scale svelte-djlmk4"),z(t,"left",i[14].left*100+"%"),z(t,"bottom",i[14].bottom*100+"%")},m(e,n){M(e,t,n)},p:Y,d(e){e&&S(t)}}}function Is(i,t){let e,n,o=t[1](t[11].distance)+"",s,r;return{key:i,first:null,c(){e=T("div"),n=T("div"),s=xe(o),r=te(),b(n,"class","floorplan-plugin__rule-text svelte-djlmk4"),J(n,"is-row",t[2]),b(e,"class","floorplan-plugin__rule-text-item svelte-djlmk4"),z(e,"left",t[11].left*100+"%"),z(e,"bottom",t[11].bottom*100+"%"),this.first=e},m(a,l){M(a,e,l),B(e,n),B(n,s),B(e,r)},p(a,l){t=a,l&2&&o!==(o=t[1](t[11].distance)+"")&&ze(s,o)},d(a){a&&S(e)}}}function Wu(i){let t,e,n,o,s,r,a=[],l=new Map,c,u=i[3],h=[];for(let g=0;g<u.length;g+=1)h[g]=Ps(Cs(i,u,g));let d=i[4];const f=g=>g[13];for(let g=0;g<d.length;g+=1){let v=ws(i,d,g),p=f(v);l.set(p,a[g]=Is(p,v))}return{c(){t=T("div"),e=T("div"),n=te(),o=T("div");for(let g=0;g<h.length;g+=1)h[g].c();s=te(),r=T("div");for(let g=0;g<a.length;g+=1)a[g].c();b(e,"class","floorplan-plugin__rule-line svelte-djlmk4"),b(o,"class","floorplan-plugin__rule-scale-wrapper svelte-djlmk4"),J(o,"is-row",i[2]),b(r,"class","floorplan-plugin__rule-text-wrapper svelte-djlmk4"),b(t,"class",c="floorplan-plugin__rule-labels floorplan-plugin__rule-labels--"+i[0]+" svelte-djlmk4"),J(t,"is-row",i[2]),z(t,"width",i[2]?"100%":1/16+"rem"),z(t,"height",i[2]?1/16+"rem":"100%")},m(g,v){M(g,t,v),B(t,e),B(t,n),B(t,o);for(let p=0;p<h.length;p+=1)h[p].m(o,null);B(t,s),B(t,r);for(let p=0;p<a.length;p+=1)a[p].m(r,null)},p(g,[v]){if(v&8){u=g[3];let p;for(p=0;p<u.length;p+=1){const A=Cs(g,u,p);h[p]?h[p].p(A,v):(h[p]=Ps(A),h[p].c(),h[p].m(o,null))}for(;p<h.length;p+=1)h[p].d(1);h.length=u.length}v&22&&(d=g[4],a=Ue(a,v,f,1,g,d,l,r,Gi,Is,null,ws)),v&1&&c!==(c="floorplan-plugin__rule-labels floorplan-plugin__rule-labels--"+g[0]+" svelte-djlmk4")&&b(t,"class",c),v&5&&J(t,"is-row",g[2])},i:Y,o:Y,d(g){g&&S(t),ut(h,g);for(let v=0;v<a.length;v+=1)a[v].d()}}}const $t=1e3,en=180;function _u(i,t,e){let{type:n}=t,{data:o}=t,{bounding:s}=t,{getRuleDistanceText:r}=t;const a=n==="top"||n==="bottom",l=s.max.x-s.min.x-($t-en)*2,c=s.max.y-s.min.y-($t-en)*2,u=o.map(([g,v])=>a?[g.x,v.x]:[g.y,v.y]).flat().sort().filter((g,v,p)=>v===0?!0:g!==p[v-1]),h=u.map(g=>{const v=a?(g-s.min.x-$t+en)/l:0,p=a?0:(g-s.min.y-$t+en)/c;return{left:v,bottom:p}});h.unshift({left:0,bottom:0}),h.push(a?{left:1,bottom:0}:{left:0,bottom:1});const d=u[u.length-1]-u[0],f=u.map((g,v,p)=>{const A=v===0?0:g-p[v-1],y=v===0?0:(g+p[v-1])/2,w=a?(y-s.min.x-$t+en)/l:0,k=a?0:(y-s.min.y-$t+en)/c;return{left:w,bottom:k,distance:A}}).filter(({distance:g})=>g/d>.1);return i.$$set=g=>{"type"in g&&e(0,n=g.type),"data"in g&&e(5,o=g.data),"bounding"in g&&e(6,s=g.bounding),"getRuleDistanceText"in g&&e(1,r=g.getRuleDistanceText)},[n,r,a,h,f,o,s]}class Nu extends se{constructor(t){super(),oe(this,t,_u,Wu,ie,{type:0,data:5,bounding:6,getRuleDistanceText:1},Gu)}}function Hu(i){ue(i,"svelte-1mzj9p3",".floorplan-plugin__rule-labels-wrapper.svelte-1mzj9p3{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}")}function Es(i,t,e){const n=i.slice();return n[13]=t[e][0],n[14]=t[e][1],n}function ks(i,t){let e,n,o;const s=[{type:t[13],data:t[14],bounding:t[1],getRuleDistanceText:t[0]}];let r={};for(let a=0;a<s.length;a+=1)r=je(r,s[a]);return n=new Nu({props:r}),{key:i,first:null,c(){e=me(),$(n.$$.fragment),this.first=e},m(a,l){M(a,e,l),Z(n,a,l),o=!0},p(a,l){t=a;const c=l&19?Fe(s,[{type:t[13],data:t[14],bounding:t[1],getRuleDistanceText:t[0]}]):{};n.$set(c)},i(a){o||(I(n.$$.fragment,a),o=!0)},o(a){D(n.$$.fragment,a),o=!1},d(a){a&&S(e),K(n,a)}}}function Xu(i){let t,e=[],n=new Map,o,s=i[4];const r=a=>a[13];for(let a=0;a<s.length;a+=1){let l=Es(i,s,a),c=r(l);n.set(c,e[a]=ks(c,l))}return{c(){t=T("div");for(let a=0;a<e.length;a+=1)e[a].c();b(t,"class","floorplan-plugin__rule-labels-wrapper svelte-1mzj9p3"),z(t,"width",i[3]),z(t,"height",i[2])},m(a,l){M(a,t,l);for(let c=0;c<e.length;c+=1)e[c].m(t,null);o=!0},p(a,[l]){l&19&&(s=a[4],re(),e=Ue(e,l,r,1,a,s,n,t,wt,ks,null,Es),ae()),l&8&&z(t,"width",a[3]),l&4&&z(t,"height",a[2])},i(a){if(!o){for(let l=0;l<s.length;l+=1)I(e[l]);o=!0}},o(a){for(let l=0;l<e.length;l+=1)D(e[l]);o=!1},d(a){a&&S(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}const xs=1e3,Ds=180;function Yu(i,t,e){let n,o,s,r,a,l,c,u,h,d,{floorIndex:f}=t,{floorplanData:g}=t,{getRuleDistanceText:v}=t;return i.$$set=p=>{"floorIndex"in p&&e(5,f=p.floorIndex),"floorplanData"in p&&e(6,g=p.floorplanData),"getRuleDistanceText"in p&&e(0,v=p.getRuleDistanceText)},i.$$.update=()=>{i.$$.dirty&64&&e(1,n=g.bounding),i.$$.dirty&96&&e(11,o=g.floorDatas[f].rules),i.$$.dirty&2048&&e(12,s=Object.keys(o)),i.$$.dirty&6144&&e(4,r=s.map(p=>[p,o[p]])),i.$$.dirty&2&&e(9,a=n.max.x-n.min.x),i.$$.dirty&2&&e(7,l=n.max.y-n.min.y),i.$$.dirty&2&&e(10,c=n.max.x-n.min.x-(xs-Ds)*2),i.$$.dirty&2&&e(8,u=n.max.y-n.min.y-(xs-Ds)*2),i.$$.dirty&1536&&e(3,h=c/a*100+"%"),i.$$.dirty&384&&e(2,d=u/l*100+"%")},[v,n,d,h,r,f,g,l,u,a,c,o,s]}class Uu extends se{constructor(t){super(),oe(this,t,Yu,Xu,ie,{floorIndex:5,floorplanData:6,getRuleDistanceText:0},Hu)}}function ii(i,t={}){let e="";const{needZ:n,needA:o}=t;return(n?i.slice().concat(i[0]):i.slice()).forEach((r,a)=>{const{x:l,y:c}=t.format?t.format(r):r,u=l+","+c;return a===0?(e+="M"+u,e):o!=null&&o[a]?(e+="A"+o[a]+","+u,e):(e+="L"+u,e)}),e+(n?"Z":"")}function Ls({x:i,y:t},e){const{max:n,min:o}=e;return{x:i-o.x,y:n.y-t}}function qu(i,t){const e=i.x*1e3+t.bounding.origin.x,n=-i.z*1e3+t.bounding.origin.y;return{x:e,y:n}}function Ju(i,t){const e=t.bounding,n=e.max.x-e.min.x,o=e.max.y-e.min.y;return{x:(i.x-e.min.x)/n,y:(e.max.y-i.y)/o}}function Zu(i,t){return Math.max(...t.work.observers.map(n=>i.z>=n.standingPosition.z?n.floorIndex:0))}function Ku(i){let t;return{c(){t=Ce("path"),b(t,"d",i[0]),b(t,"fill","#2F313A")},m(e,n){M(e,t,n)},p(e,[n]){n&1&&b(t,"d",e[0])},i:Y,o:Y,d(e){e&&S(t)}}}function $u(i,t,e){let n,{path:o}=t;return i.$$set=s=>{"path"in s&&e(1,o=s.path)},i.$$.update=()=>{i.$$.dirty&2&&e(0,n=ii(o,{needZ:!0}))},[n,o]}class ed extends se{constructor(t){super(),oe(this,t,$u,Ku,ie,{path:1})}}function td(i){let t,e,n,o,s,r;return{c(){t=Ce("defs"),e=Ce("pattern"),n=Ce("rect"),o=Ce("path"),s=te(),r=Ce("path"),b(n,"x","0"),b(n,"y","0"),b(n,"width",i[1]),b(n,"height",i[1]),b(n,"fill","#323747"),b(o,"d",i[2]),b(o,"stroke","#ffffff"),b(o,"stroke-opacity","0.06"),b(o,"stroke-width","0.5"),b(o,"fill","none"),b(e,"id","fpm-room-pattern-0"),b(e,"x","0"),b(e,"y","0"),b(e,"width",i[1]),b(e,"height",i[1]),b(e,"patternUnits","userSpaceOnUse"),b(e,"patternTransform","scale(50 50)"),b(r,"d",i[0]),b(r,"fill","url(#fpm-room-pattern-0)")},m(a,l){M(a,t,l),B(t,e),B(e,n),B(e,o),M(a,s,l),M(a,r,l)},p(a,[l]){l&1&&b(r,"d",a[0])},i:Y,o:Y,d(a){a&&S(t),a&&S(s),a&&S(r)}}}const Ni=6;function nd(i,t,e){let n,{path:o}=t;const s=Ni*2,r=`M0 ${Ni} h ${s} M${Ni} 0 v ${s}`;return i.$$set=a=>{"path"in a&&e(3,o=a.path)},i.$$.update=()=>{i.$$.dirty&8&&e(0,n=ii(o,{needZ:!0}))},[n,s,r,o]}class id extends se{constructor(t){super(),oe(this,t,nd,td,ie,{path:3})}}function od(i){let t,e,n,o,s,r,a,l,c,u,h;return{c(){t=Ce("defs"),e=Ce("pattern"),n=Ce("rect"),o=Ce("pattern"),s=Ce("rect"),r=te(),a=Ce("path"),l=te(),c=Ce("path"),u=te(),h=Ce("path"),b(n,"x","0"),b(n,"y","0"),b(n,"width","6"),b(n,"height","50"),b(n,"fill","none"),b(n,"stroke","#4B4B57"),b(n,"stroke-width","0.5"),b(e,"id","room-material-pattern-1"),b(e,"x","0"),b(e,"y","0"),b(e,"width","12"),b(e,"height","50"),b(e,"patternUnits","userSpaceOnUse"),b(e,"patternTransform","scale(50 50)"),b(s,"x","0"),b(s,"y","0"),b(s,"width","6"),b(s,"height","50"),b(s,"fill","none"),b(s,"stroke","#4B4B57"),b(s,"stroke-width","0.5"),b(o,"id","room-material-pattern-2"),b(o,"x","6"),b(o,"y","25"),b(o,"width","12"),b(o,"height","50"),b(o,"patternUnits","userSpaceOnUse"),b(o,"patternTransform","scale(50 50)"),b(a,"d",i[0]),b(a,"fill","#43434D"),b(c,"d",i[0]),b(c,"fill","url(#room-material-pattern-1)"),b(h,"d",i[0]),b(h,"fill","url(#room-material-pattern-2)")},m(d,f){M(d,t,f),B(t,e),B(e,n),B(t,o),B(o,s),M(d,r,f),M(d,a,f),M(d,l,f),M(d,c,f),M(d,u,f),M(d,h,f)},p(d,[f]){f&1&&b(a,"d",d[0]),f&1&&b(c,"d",d[0]),f&1&&b(h,"d",d[0])},i:Y,o:Y,d(d){d&&S(t),d&&S(r),d&&S(a),d&&S(l),d&&S(c),d&&S(u),d&&S(h)}}}function sd(i,t,e){let n,{path:o}=t;return i.$$set=s=>{"path"in s&&e(1,o=s.path)},i.$$.update=()=>{i.$$.dirty&2&&e(0,n=ii(o,{needZ:!0}))},[n,o]}class rd extends se{constructor(t){super(),oe(this,t,sd,od,ie,{path:1})}}function ad(i){ue(i,"svelte-1dykexu",".floorplan-plugin__room-material.svelte-1dykexu{position:absolute;left:0;top:0;width:100%;height:100%}svg.svelte-1dykexu{position:absolute;left:0;top:0;width:100%;height:100%;overflow:visible}")}function Ss(i,t,e){const n=i.slice();return n[5]=t[e],n}function ld(i){let t,e;return t=new id({props:{path:i[5].path}}),{c(){$(t.$$.fragment)},m(n,o){Z(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.path=n[5].path),t.$set(s)},i(n){e||(I(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function cd(i){let t,e;return t=new rd({props:{path:i[5].path}}),{c(){$(t.$$.fragment)},m(n,o){Z(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.path=n[5].path),t.$set(s)},i(n){e||(I(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function ud(i){let t,e;return t=new ed({props:{path:i[5].path}}),{c(){$(t.$$.fragment)},m(n,o){Z(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.path=n[5].path),t.$set(s)},i(n){e||(I(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function Ms(i){let t,e,n,o;const s=[ud,cd,ld],r=[];function a(l,c){return l[5].floorType===1?0:l[5].floorType===0?1:2}return e=a(i),n=r[e]=s[e](i),{c(){t=Ce("svg"),n.c(),b(t,"width","100%"),b(t,"height","100%"),b(t,"viewBox",`0 0 ${i[1]} ${i[2]}`),b(t,"class","svelte-1dykexu")},m(l,c){M(l,t,c),r[e].m(t,null),o=!0},p(l,c){let u=e;e=a(l),e===u?r[e].p(l,c):(re(),D(r[u],1,1,()=>{r[u]=null}),ae(),n=r[e],n?n.p(l,c):(n=r[e]=s[e](l),n.c()),I(n,1),n.m(t,null))},i(l){o||(I(n),o=!0)},o(l){D(n),o=!1},d(l){l&&S(t),r[e].d()}}}function dd(i){let t,e,n=i[0],o=[];for(let r=0;r<n.length;r+=1)o[r]=Ms(Ss(i,n,r));const s=r=>D(o[r],1,1,()=>{o[r]=null});return{c(){t=T("div");for(let r=0;r<o.length;r+=1)o[r].c();b(t,"class","floorplan-plugin__room-material svelte-1dykexu")},m(r,a){M(r,t,a);for(let l=0;l<o.length;l+=1)o[l].m(t,null);e=!0},p(r,[a]){if(a&7){n=r[0];let l;for(l=0;l<n.length;l+=1){const c=Ss(r,n,l);o[l]?(o[l].p(c,a),I(o[l],1)):(o[l]=Ms(c),o[l].c(),I(o[l],1),o[l].m(t,null))}for(re(),l=n.length;l<o.length;l+=1)s(l);ae()}},i(r){if(!e){for(let a=0;a<n.length;a+=1)I(o[a]);e=!0}},o(r){o=o.filter(Boolean);for(let a=0;a<o.length;a+=1)D(o[a]);e=!1},d(r){r&&S(t),ut(o,r)}}}function hd(i,t,e){let n,{floorIndex:o}=t,{floorplanData:s}=t;const r=s.bounding.max.x-s.bounding.min.x,a=s.bounding.max.y-s.bounding.min.y;return i.$$set=l=>{"floorIndex"in l&&e(3,o=l.floorIndex),"floorplanData"in l&&e(4,s=l.floorplanData)},i.$$.update=()=>{i.$$.dirty&24&&e(0,n=s.floorDatas[o].rooms.map(l=>ge(R({},l),{path:l.path.map(c=>Ls(c,s.bounding))})))},[n,r,a,o,s]}class fd extends se{constructor(t){super(),oe(this,t,hd,dd,ie,{floorIndex:3,floorplanData:4},ad)}}function md(i){ue(i,"svelte-19uvvss","path.svelte-19uvvss{opacity:0}path.svelte-19uvvss:hover{opacity:0.1}")}function pd(i){let t,e,n;return{c(){t=Ce("path"),b(t,"d",i[2]),b(t,"fill","#fff"),b(t,"class","svelte-19uvvss")},m(o,s){M(o,t,s),e||(n=[Pe(t,"mouseenter",i[0]),Pe(t,"mouseleave",i[1])],e=!0)},p:Y,i:Y,o:Y,d(o){o&&S(t),e=!1,ct(n)}}}function gd(i,t,e){let{room:n}=t,{floorplanData:o}=t,{hoveredRoom:s}=t;function r(){s.set(n)}function a(){s.set(void 0)}const{bounding:l}=o,c=ii(n.path,{needZ:!0,format:u=>Ls(u,l)});return i.$$set=u=>{"room"in u&&e(3,n=u.room),"floorplanData"in u&&e(4,o=u.floorplanData),"hoveredRoom"in u&&e(5,s=u.hoveredRoom)},[r,a,c,n,o,s]}class Ad extends se{constructor(t){super(),oe(this,t,gd,pd,ie,{room:3,floorplanData:4,hoveredRoom:5},md)}}function vd(i){ue(i,"svelte-1kqo6e4",".floorplan-plugin__room-highlight.svelte-1kqo6e4{position:absolute;width:100%;height:100%}svg.svelte-1kqo6e4{width:100%;height:100%;overflow:visible}")}function zs(i,t,e){const n=i.slice();return n[5]=t[e],n}function Ts(i,t){let e,n,o;const s=[{room:t[5],floorplanData:t[1],hoveredRoom:t[2]}];let r={};for(let a=0;a<s.length;a+=1)r=je(r,s[a]);return n=new Ad({props:r}),{key:i,first:null,c(){e=me(),$(n.$$.fragment),this.first=e},m(a,l){M(a,e,l),Z(n,a,l),o=!0},p(a,l){t=a;const c=l&7?Fe(s,[{room:t[5],floorplanData:t[1],hoveredRoom:t[2]}]):{};n.$set(c)},i(a){o||(I(n.$$.fragment,a),o=!0)},o(a){D(n.$$.fragment,a),o=!1},d(a){a&&S(e),K(n,a)}}}function bd(i){let t,e,n=[],o=new Map,s,r=i[1].floorDatas[i[0]].rooms;const a=l=>l[5].id;for(let l=0;l<r.length;l+=1){let c=zs(i,r,l),u=a(c);o.set(u,n[l]=Ts(u,c))}return{c(){t=T("div"),e=Ce("svg");for(let l=0;l<n.length;l+=1)n[l].c();b(e,"width","100%"),b(e,"height","100%"),b(e,"viewBox",`0 0 ${i[3]} ${i[4]}`),b(e,"class","svelte-1kqo6e4"),b(t,"class","floorplan-plugin__room-highlight svelte-1kqo6e4")},m(l,c){M(l,t,c),B(t,e);for(let u=0;u<n.length;u+=1)n[u].m(e,null);s=!0},p(l,[c]){c&7&&(r=l[1].floorDatas[l[0]].rooms,re(),n=Ue(n,c,a,1,l,r,o,e,wt,Ts,null,zs),ae())},i(l){if(!s){for(let c=0;c<r.length;c+=1)I(n[c]);s=!0}},o(l){for(let c=0;c<n.length;c+=1)D(n[c]);s=!1},d(l){l&&S(t);for(let c=0;c<n.length;c+=1)n[c].d()}}}function yd(i,t,e){let{floorIndex:n}=t,{floorplanData:o}=t,{hoveredRoom:s}=t;const r=o.bounding.max.x-o.bounding.min.x,a=o.bounding.max.y-o.bounding.min.y;return i.$$set=l=>{"floorIndex"in l&&e(0,n=l.floorIndex),"floorplanData"in l&&e(1,o=l.floorplanData),"hoveredRoom"in l&&e(2,s=l.hoveredRoom)},[n,o,s,r,a]}class Bs extends se{constructor(t){super(),oe(this,t,yd,bd,ie,{floorIndex:0,floorplanData:1,hoveredRoom:2},vd)}}function wd(i){ue(i,"svelte-bl8zrz",".floorplan-plugin__floor.svelte-bl8zrz{position:absolute;left:0;top:0;width:100%;height:100%;opacity:0;pointer-events:none}.floorplan-plugin__floor--is-current.svelte-bl8zrz{opacity:1;pointer-events:auto}")}function js(i){let t,e;const n=[{floorIndex:i[1],floorplanData:i[7],hoveredRoom:i[12]}];let o={};for(let s=0;s<n.length;s+=1)o=je(o,n[s]);return t=new Bs({props:o}),{c(){$(t.$$.fragment)},m(s,r){Z(t,s,r),e=!0},p(s,r){const a=r&4226?Fe(n,[{floorIndex:s[1],floorplanData:s[7],hoveredRoom:s[12]}]):{};t.$set(a)},i(s){e||(I(t.$$.fragment,s),e=!0)},o(s){D(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function Vs(i){let t,e;const n=[{floorplanData:i[7],roomAreaEnable:i[4],roomNameEnable:i[5],floorIndex:i[1],getRoomAreaText:i[8],getLabelElement:i[9],hoveredRoom:i[12],adaptiveRoomLabelVisibleEnable:i[11]}];let o={};for(let s=0;s<n.length;s+=1)o=je(o,n[s]);return t=new Ru({props:o}),{c(){$(t.$$.fragment)},m(s,r){Z(t,s,r),e=!0},p(s,r){const a=r&7090?Fe(n,[{floorplanData:s[7],roomAreaEnable:s[4],roomNameEnable:s[5],floorIndex:s[1],getRoomAreaText:s[8],getLabelElement:s[9],hoveredRoom:s[12],adaptiveRoomLabelVisibleEnable:s[11]}]):{};t.$set(a)},i(s){e||(I(t.$$.fragment,s),e=!0)},o(s){D(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function Qs(i){let t,e;const n=[{floorplanData:i[7],floorIndex:i[1],getRuleDistanceText:i[10]}];let o={};for(let s=0;s<n.length;s+=1)o=je(o,n[s]);return t=new Uu({props:o}),{c(){$(t.$$.fragment)},m(s,r){Z(t,s,r),e=!0},p(s,r){const a=r&1154?Fe(n,[{floorplanData:s[7],floorIndex:s[1],getRuleDistanceText:s[10]}]):{};t.$set(a)},i(s){e||(I(t.$$.fragment,s),e=!0)},o(s){D(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function Cd(i){let t,e,n,o,s,r,a,l,c;const u=[{floorIndex:i[1],floorplanData:i[7]}];let h={};for(let A=0;A<u.length;A+=1)h=je(h,u[A]);e=new fd({props:h});let d=i[2]&&js(i);const f=[{floorplanData:i[7],floorIndex:i[1]}];let g={};for(let A=0;A<f.length;A+=1)g=je(g,f[A]);s=new ps({props:g});let v=i[3]&&Vs(i),p=i[6]&&Qs(i);return{c(){t=T("div"),$(e.$$.fragment),n=te(),d&&d.c(),o=te(),$(s.$$.fragment),r=te(),v&&v.c(),a=te(),p&&p.c(),b(t,"class",l=Be(`floorplan-plugin__floor${i[0]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz")},m(A,y){M(A,t,y),Z(e,t,null),B(t,n),d&&d.m(t,null),B(t,o),Z(s,t,null),B(t,r),v&&v.m(t,null),B(t,a),p&&p.m(t,null),c=!0},p(A,[y]){const w=y&130?Fe(u,[{floorIndex:A[1],floorplanData:A[7]}]):{};e.$set(w),A[2]?d?(d.p(A,y),y&4&&I(d,1)):(d=js(A),d.c(),I(d,1),d.m(t,o)):d&&(re(),D(d,1,1,()=>{d=null}),ae());const k=y&130?Fe(f,[{floorplanData:A[7],floorIndex:A[1]}]):{};s.$set(k),A[3]?v?(v.p(A,y),y&8&&I(v,1)):(v=Vs(A),v.c(),I(v,1),v.m(t,a)):v&&(re(),D(v,1,1,()=>{v=null}),ae()),A[6]?p?(p.p(A,y),y&64&&I(p,1)):(p=Qs(A),p.c(),I(p,1),p.m(t,null)):p&&(re(),D(p,1,1,()=>{p=null}),ae()),(!c||y&1&&l!==(l=Be(`floorplan-plugin__floor${A[0]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz"))&&b(t,"class",l)},i(A){c||(I(e.$$.fragment,A),I(d),I(s.$$.fragment,A),I(v),I(p),c=!0)},o(A){D(e.$$.fragment,A),D(d),D(s.$$.fragment,A),D(v),D(p),c=!1},d(A){A&&S(t),K(e),d&&d.d(),K(s),v&&v.d(),p&&p.d()}}}function Pd(i,t,e){let{isCurrent:n}=t,{floorIndex:o}=t,{hoverEnable:s}=t,{roomLabelsEnable:r}=t,{roomAreaEnable:a}=t,{roomNameEnable:l}=t,{ruleLabelsEnable:c}=t,{floorplanData:u}=t,{getRoomAreaText:h}=t,{getLabelElement:d}=t,{getRuleDistanceText:f}=t,{adaptiveRoomLabelVisibleEnable:g}=t;const v=_i(void 0);return i.$$set=p=>{"isCurrent"in p&&e(0,n=p.isCurrent),"floorIndex"in p&&e(1,o=p.floorIndex),"hoverEnable"in p&&e(2,s=p.hoverEnable),"roomLabelsEnable"in p&&e(3,r=p.roomLabelsEnable),"roomAreaEnable"in p&&e(4,a=p.roomAreaEnable),"roomNameEnable"in p&&e(5,l=p.roomNameEnable),"ruleLabelsEnable"in p&&e(6,c=p.ruleLabelsEnable),"floorplanData"in p&&e(7,u=p.floorplanData),"getRoomAreaText"in p&&e(8,h=p.getRoomAreaText),"getLabelElement"in p&&e(9,d=p.getLabelElement),"getRuleDistanceText"in p&&e(10,f=p.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in p&&e(11,g=p.adaptiveRoomLabelVisibleEnable)},[n,o,s,r,a,l,c,u,h,d,f,g,v]}class Id extends se{constructor(t){super(),oe(this,t,Pd,Cd,ie,{isCurrent:0,floorIndex:1,hoverEnable:2,roomLabelsEnable:3,roomAreaEnable:4,roomNameEnable:5,ruleLabelsEnable:6,floorplanData:7,getRoomAreaText:8,getLabelElement:9,getRuleDistanceText:10,adaptiveRoomLabelVisibleEnable:11},wd)}}function Ed(i){ue(i,"svelte-86bqav",".floorplan-main.svelte-86bqav{width:100%;height:100%;pointer-events:none}")}function Os(i,t,e){const n=i.slice();return n[18]=t[e],n}function Fs(i){let t,e,n,o,s,r,a=i[11].floorDatas,l=[];for(let f=0;f<a.length;f+=1)l[f]=Rs(Os(i,a,f));const c=f=>D(l[f],1,1,()=>{l[f]=null}),u=[{panoIndex:i[3],floorplanData:i[11],lastPanoramaLongitude:i[12],cameraImageUrl:i[13]}];let h={};for(let f=0;f<u.length;f+=1)h=je(h,u[f]);n=new cu({props:h});let d=i[6]&&Gs(i);return{c(){t=T("div");for(let f=0;f<l.length;f+=1)l[f].c();e=te(),$(n.$$.fragment),o=te(),d&&d.c(),b(t,"class","floorplan-main svelte-86bqav")},m(f,g){M(f,t,g);for(let v=0;v<l.length;v+=1)l[v].m(t,null);B(t,e),Z(n,t,null),B(t,o),d&&d.m(t,null),r=!0},p(f,g){if(i=f,g&249776){a=i[11].floorDatas;let p;for(p=0;p<a.length;p+=1){const A=Os(i,a,p);l[p]?(l[p].p(A,g),I(l[p],1)):(l[p]=Rs(A),l[p].c(),I(l[p],1),l[p].m(t,e))}for(re(),p=a.length;p<l.length;p+=1)c(p);ae()}const v=g&14344?Fe(u,[{panoIndex:i[3],floorplanData:i[11],lastPanoramaLongitude:i[12],cameraImageUrl:i[13]}]):{};n.$set(v),i[6]?d?(d.p(i,g),g&64&&I(d,1)):(d=Gs(i),d.c(),I(d,1),d.m(t,null)):d&&(re(),D(d,1,1,()=>{d=null}),ae())},i(f){if(!r){for(let g=0;g<a.length;g+=1)I(l[g]);I(n.$$.fragment,f),I(d),s||De(()=>{s=St(t,Mt,{duration:i[0],easing:At}),s.start()}),r=!0}},o(f){l=l.filter(Boolean);for(let g=0;g<l.length;g+=1)D(l[g]);D(n.$$.fragment,f),D(d),r=!1},d(f){f&&S(t),ut(l,f),K(n),d&&d.d()}}}function Rs(i){let t,e;const n=[{hoverEnable:i[5],floorplanData:i[11],getRoomAreaText:i[14],getLabelElement:i[15],getRuleDistanceText:i[16],roomLabelsEnable:i[7],roomAreaEnable:i[8],roomNameEnable:i[9],ruleLabelsEnable:i[10],adaptiveRoomLabelVisibleEnable:i[17]},{floorIndex:i[18].floorIndex},{isCurrent:i[18].floorIndex===i[4]}];let o={};for(let s=0;s<n.length;s+=1)o=je(o,n[s]);return t=new Id({props:o}),{c(){$(t.$$.fragment)},m(s,r){Z(t,s,r),e=!0},p(s,r){const a=r&249776?Fe(n,[r&249760&&{hoverEnable:s[5],floorplanData:s[11],getRoomAreaText:s[14],getLabelElement:s[15],getRuleDistanceText:s[16],roomLabelsEnable:s[7],roomAreaEnable:s[8],roomNameEnable:s[9],ruleLabelsEnable:s[10],adaptiveRoomLabelVisibleEnable:s[17]},r&2048&&{floorIndex:s[18].floorIndex},r&2064&&{isCurrent:s[18].floorIndex===s[4]}]):{};t.$set(a)},i(s){e||(I(t.$$.fragment,s),e=!0)},o(s){D(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function Gs(i){let t,e;return t=new gu({props:{floorplanData:i[11],northDesc:i[2]}}),{c(){$(t.$$.fragment)},m(n,o){Z(t,n,o),e=!0},p(n,o){const s={};o&2048&&(s.floorplanData=n[11]),o&4&&(s.northDesc=n[2]),t.$set(s)},i(n){e||(I(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){K(t,n)}}}function kd(i){let t,e,n=i[1]&&Fs(i);return{c(){n&&n.c(),t=me()},m(o,s){n&&n.m(o,s),M(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&I(n,1)):(n=Fs(o),n.c(),I(n,1),n.m(t.parentNode,t)):n&&(re(),D(n,1,1,()=>{n=null}),ae())},i(o){e||(I(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&S(t)}}}function xd(i,t,e){let{duration:n=0}=t,{visible:o}=t,{northDesc:s}=t,{panoIndex:r}=t,{floorIndex:a}=t,{hoverEnable:l}=t,{compassEnable:c}=t,{roomLabelsEnable:u}=t,{roomAreaEnable:h}=t,{roomNameEnable:d}=t,{ruleLabelsEnable:f}=t,{floorplanData:g}=t,{lastPanoramaLongitude:v}=t,{cameraImageUrl:p}=t,{getRoomAreaText:A}=t,{getLabelElement:y}=t,{getRuleDistanceText:w}=t,{adaptiveRoomLabelVisibleEnable:k}=t;return i.$$set=P=>{"duration"in P&&e(0,n=P.duration),"visible"in P&&e(1,o=P.visible),"northDesc"in P&&e(2,s=P.northDesc),"panoIndex"in P&&e(3,r=P.panoIndex),"floorIndex"in P&&e(4,a=P.floorIndex),"hoverEnable"in P&&e(5,l=P.hoverEnable),"compassEnable"in P&&e(6,c=P.compassEnable),"roomLabelsEnable"in P&&e(7,u=P.roomLabelsEnable),"roomAreaEnable"in P&&e(8,h=P.roomAreaEnable),"roomNameEnable"in P&&e(9,d=P.roomNameEnable),"ruleLabelsEnable"in P&&e(10,f=P.ruleLabelsEnable),"floorplanData"in P&&e(11,g=P.floorplanData),"lastPanoramaLongitude"in P&&e(12,v=P.lastPanoramaLongitude),"cameraImageUrl"in P&&e(13,p=P.cameraImageUrl),"getRoomAreaText"in P&&e(14,A=P.getRoomAreaText),"getLabelElement"in P&&e(15,y=P.getLabelElement),"getRuleDistanceText"in P&&e(16,w=P.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in P&&e(17,k=P.adaptiveRoomLabelVisibleEnable)},[n,o,s,r,a,l,c,u,h,d,f,g,v,p,A,y,w,k]}class Hi extends se{constructor(t){super(),oe(this,t,xd,kd,ie,{duration:0,visible:1,northDesc:2,panoIndex:3,floorIndex:4,hoverEnable:5,compassEnable:6,roomLabelsEnable:7,roomAreaEnable:8,roomNameEnable:9,ruleLabelsEnable:10,floorplanData:11,lastPanoramaLongitude:12,cameraImageUrl:13,getRoomAreaText:14,getLabelElement:15,getRuleDistanceText:16,adaptiveRoomLabelVisibleEnable:17},Ed)}}const Dd="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAwCAYAAACFUvPfAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAALaADAAQAAAABAAAAMAAAAADe2FZjAAAEF0lEQVRoBe2WzWskRRiHf13V092TxI2oEzYeVDwITtyDuCiihwiCePGgxIM3vYgHL4J4UIhBRA8i/gPqyUvWg7AiIuIeloDiYUHJLOK6BPwIk9nNODM9Xf1RVe1b3elJRjCZmQ6euqGmuqer33rq4e23GqiOykBloDJQGagMVAYqA5WBykBlYFYD1qwP/tdzaZqOx9zYOLxeX0+L5yzLGp0X/03a25MOnGRcBtx+6Rlo9SL08G4EooFnxa8Yiivox5/h5Ys/4cl7NVorNDRnngX+0MIkVMeMSf23zyKML8J7/Dy8hwF2Buh9CnS+AEQIdLspBuGb+M7/qLW4qJrNpsLapjYhpwVnx3BMfCtNNx3Etc9xywvnMf80wG8HmQainw0RxSGrnmeBp+8k5/j9S0HbvXb5io0Lz880/0wPHV1NlhLd316He+4xOCv5ragF7L9PrH1qBJyB0626x/lC+qrSvH5r/W+n1WpxUM5nMY4GPeH8lHJaPgfeAFQHCL+ntkXT+vnUc3W6pvTIwC0wy3rA4dwLmK2avZ7Eo9uKBuYJfgJscbs8dLCxDMt+EOEPBEZNEWyBYHqTz6bPXrzUnNrSShxHIsYiOL69zrCGLLcLqJP68tB+9w5wj+YhWDafQ2s61wNqxjZhmrQ2pvMFCEvXuCUZ7wqH794ZWs28LJqlTXSUyuksF2M/yOwqgkx2c1ADa4wLAQRk2sAGQQakhN6yFC2hltfz5kSY44NKQeeh+vtI/SSzWhg2CzCgmWISmKUGmaYFBDfCSymnfxJ6/+ospVcWOLLp5DGP/y0P/Rp66O99DQNq7Po3Ds0a0wY+My2QSv2N2mO/OyxR2o6UQk+Lv7yJ06JYSnnolZVU9cUn2O9SmaMWGFBqYXRwbqAJWIi94TX5biotpcGl1DXZ6LnqIbNDTnmUgi52Mv5l5ysMxIcZcGjy2DTK4ZHlcBC14zeSge4qphICjj3bS0A7o9nSp2TOkm7aZ8bGZy/jxhO87V91G0+dfY/Z7BWIIK9KYUi5qy/Hf8YfBG3sqJTHiQWhmTVkbip+wX3x6volVSx+LPAxF+VLXhZ8VQ+iP2Rta/iWe5v42Fngj0BbdnRTXh12ZIcKhTaGbcYjybRwXBU1lu9KlndXp04NM52poKWO0RZsviNaP9a6grkO972+st05pXhE5c1hTEluJy7XUejGUQNLMbAmTdWY1rKBLW3aTJqBZ7nZkb36DhYCreeYHbMUXHvaYi5XDK70EcgulmRjm77wNtenzuXCbmnTRaAx493rbGf3Jr/njMzj920CnKdUaFCjlDioy7NYNvOdGrQJNgI32/L2tkXfFPlxgToqjWVhD6KdLnQRdARf/HHQz2r2X2Gqy8pAZaAyUBmoDFQGKgP/q4F/AJYg9/s0ZoABAAAAAElFTkSuQmCC";function Ld(i){return N(this,null,function*(){const t=new Headers({"Content-Type":"text/plain"}),e=function(o){return N(this,null,function*(){const s={index:o.index,url:o.url,svgUrl:o.svg_url};if(o.svg_url){const r=yield fetch(o.svg_url,{headers:t}).then(a=>a.text());s.svgContent=r}return s})};return yield Promise.all(i.map(e))})}function Sd(i){return{id:i.id,size:i.size,name:i.name,path:i.path,roomType:i.room_type,floorType:i.floor_type,roomLabel:{position:i.room_label.position,positionInImage:i.room_label.position_in_image},observerIndexs:i.observer_indexs}}function Md(i){return{floorName:i.floor_name,floorIndex:i.floor_index,rooms:i.rooms.map(Sd),rules:i.rules}}function zd(i){return{index:i.index,floorIndex:i.floor_index,position:i.position,positionInImage:i.position_in_image}}function Td(i){return{rad:i.rad,position:i.position,positionInImage:i.position_in_image,northRad:i.north_rad,roomId:i.room_id,floorIndex:i.floor_index}}function It(i){return N(this,null,function*(){const t=yield Ld(i.outlines),e=i.computed_data.bounding,n=i.computed_data.floor_datas.map(Md),o=i.computed_data.entrance?Td(i.computed_data.entrance):null;return{outlines:t,entrance:o,bounding:e,floorDatas:n,observers:i.computed_data.observers.map(zd)}})}function Bd(i,t,e){return i.map(o=>{const s=o.position,r=o.icon?o.icon:{url:Dd,width:45,height:48},a=Zu(s,t),l=qu(s,e),c=Ju(l,e);return{floorIndex:a,icon:r,id:o.id,position:l,positionInImage:c}})}function jd(i,t){return t(i),i}function oi(i,t){return jd({},e=>{for(const n in i)t.indexOf(n)===-1&&(e[n]=i[n])})}function Ws(i,t){const e=Math.max(...i.work.observers.map(n=>n.floorIndex));return t>e?i.model.bounding.max.y:Math.max(...i.work.observers.filter(n=>n.floorIndex===t).map(n=>n.standingPosition.y))}function Xi(i,t,e=Ct.BOUNDING_CENTER){const n=Ws(i,t),o=Ws(i,t+1);return e===Ct.BOUNDING_CENTER?(i.model.bounding.max.y+i.model.bounding.min.y)/2:e===Ct.CEILING?o:n}function Yi(i,t,e,n){const o=Xi(i,e,n==null?void 0:n.attachedTo),s=new E.Vector3(0,o,0),r=new E.Vector3(1,o,0),a=s.clone().project(i.camera),l=r.clone().project(i.camera);return Math.abs((l.x-a.x)/1e3)*(t.getBoundingClientRect().width/2)}class wn{constructor(t,e){m(this,"VERSION","2.11.0-aplha.0");m(this,"five");m(this,"hooks",new Ft);m(this,"staticPrefix","//vrlab-static.ljcdn.com");this.five=t,e!=null&&e.staticPrefix&&(this.staticPrefix=e.staticPrefix)}getCurrentState(){return this.state}}class zt extends wn{}var Ne=(i=>(i.UnknownError="UnknownError",i.DataNotLoaded="DataNotLoaded",i.BreakOffByHide="BreakOffByHide",i.BreakOffByDisable="BreakOffByDisable",i.ModelNotLoaded="ModelNotLoaded",i.ChangeModeError="ChangeModeError",i.UpdateCameraError="UpdateCameraError",i))(Ne||{});const _s=500,Vd=80;function Ui(i,t,e=4){return Math.floor(i*Math.pow(10,e))===Math.floor(t*Math.pow(10,e))}function Ns(i,t){return N(this,null,function*(){yield new Promise((e,n)=>{i.changeMode(...t).catch(o=>n(o)),i.once("initAnimationEnded",()=>{const o=i.getCurrentState(),s=t[0];o.mode!==s&&n(new Error("mode \u4E0E\u9884\u671F\u4E0D\u7B26")),(()=>{const l=t[1];return l?Object.keys(l).every(c=>{const u=o[c];if(u===void 0)return!0;const h=l[c];return typeof u=="number"&&typeof h=="number"?Ui(u,h,2):u===h}):!0})()||n(new Error("five pose \u4E0E\u9884\u671F\u4E0D\u7B26")),e()})})})}function qi(i,t){if(i.currentMode!==t.mode)return!1;const{latitude:e,longitude:n,fov:o}=t,{latitude:s,longitude:r}=i.getCurrentState(),a=i.camera.fov;return!(!Ui(e,s,2)||!Ui(n,r,2)||o!==a)}function Hs(i,t,e=!0){return N(this,null,function*(){if(qi(i,t)===!0)return;const o=i.getCurrentState();if(o.mode!==t.mode){const[u]=yield $n(Ns(i,[t.mode,t,void 0,e]));if(u)throw new Error(Ne.ChangeModeError);return}const{latitude:s,longitude:r,fov:a}=o,l=Math.min(1e3,Math.max(200,Math.abs(s-Math.PI/2)*1e3,(r>Math.PI?2*Math.PI-r:r)*500,Math.abs(a-t.fov)*10)),[c]=yield $n(i.updateCamera(t,l,e));if(c)throw new Error(Ne.UpdateCameraError)})}function tn(i,t,e=300){const n=i.getElement();!n||(n.style.opacity=t+"",n.style.transition=e===0?"none":`opacity ${e}ms linear`,e!==0&&Promise.race([new Promise(o=>n.addEventListener("transitionend",o,{once:!0})),new Promise(o=>setTimeout(o,e))]).then(()=>{n.style.transition="none"}))}function Qd(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)>5*Math.PI/180,o=e>5*(Math.PI/180)&&e<355*(Math.PI/180);return n||o}function Od(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)<10*Math.PI/180,o=e<30*(Math.PI/180)||e>330*(Math.PI/180);return n&&o}class Fd extends zt{constructor(e,n){var a;super(e);m(this,"name","modelFloorplanPlugin");m(this,"state");m(this,"data");m(this,"showState");m(this,"showPromise");m(this,"app");m(this,"panoIndex",0);m(this,"floorIndex",0);m(this,"selector");m(this,"showRejection");m(this,"wrapper");m(this,"container",document.createElement("div"));m(this,"lastPanoramaLongitude",0);m(this,"size",{width:0,height:0});m(this,"hasAddedEventListener",!1);m(this,"isHiddenByHideFunc",!1);m(this,"dispose",()=>{var e,n;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(n=this.container)==null||n.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});m(this,"show",(...n)=>N(this,[...n],function*(e={}){if(!this.state.enabled||!this.showPromise&&this.state.visible)return;const o=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},o),this._show(e)}));m(this,"hide",(...n)=>N(this,[...n],function*(e={}){!this.state.enabled||(this.isHiddenByHideFunc=!0,this.state.visible!==!1&&(this.updateState({visible:!1},e.userAction||!0),this._hide(e)))}));m(this,"updateSize",()=>{if(!this.data||!qi(this.five,this.showState)||!this.container||!this.wrapper)return;const{min:e,max:n}=this.data.bounding,o=n.x-e.x,s=n.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=Yi(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(o*a),c=Math.ceil(s*a);this.size.width===l&&this.size.height===c||(this.container.style.width=l+"px",this.container.style.height=c+"px",this.size={width:l,height:c})});m(this,"_disable",e=>{var o,s,r;const{userAction:n}=e;this.hooks.emit("disable",{userAction:n}),(o=this.showRejection)==null||o.call(this,Ne.BreakOffByDisable),this.showPromise=void 0,(s=this.app)==null||s.$destroy(),this.app=void 0,(r=this.container)==null||r.remove(),this.removeEventListener()});m(this,"_enable",e=>{const{userAction:n}=e;this.addEventListener(),this.wrapper&&(this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n}))});m(this,"_show",e=>N(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.five.model)!=null&&r.loaded))throw new Error(Ne.ModelNotLoaded);if(!this.data)throw new Error(Ne.DataNotLoaded);this.isHiddenByHideFunc=!1;const n={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},o=R(R({},n),e),s=()=>N(this,null,function*(){this.hooks.emit("show",{userAction:o.userAction,auto:o.isAutoShow});let a=!1,l;this.showRejection=d=>{a=!0,l=d};const[c]=yield $n(Hs(this.five,this.showState,o.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(Ne.UnknownError);this.updateSize(),this.floorIndex=o.floorIndex,this.five.model.show(this.floorIndex);const u=o.modelOpacity,h=o.immediately?0:_s;tn(this.five,u,h),this.render(h)});return this.showPromise=s().then(()=>{this.hooks.emit("showAnimationEnded",{auto:o.isAutoShow,userAction:o.userAction})}).catch(a=>{if(this.updateState({visible:!1},o.userAction),!o.isAutoShow&&a instanceof Error)throw a}).finally(()=>{this.showPromise=void 0,this.showRejection=void 0}),this.showPromise}));m(this,"_hide",e=>{var s;(s=this.showRejection)==null||s.call(this,Ne.BreakOffByHide),this.showPromise=void 0;const o=R(R({},{userAction:!0,isAutoHide:!1}),e);tn(this.five,1,0),this.hooks.emit("hide",{auto:o.isAutoHide,userAction:o.userAction}),this.render()});m(this,"handleClick",()=>{if(!this.state.visible)return;if(this.hooks.emit("click"))return!1});m(this,"onFiveModelLoaded",()=>{if(this.state.enabled===!1||this.wrapper||!this.selector)return;const e=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!e)throw new Error("\u4E0D\u6B63\u786E\u7684\u7236\u5BB9\u5668\u9009\u62E9\u5668");this.wrapper=e,e.append(this.container)});m(this,"onFiveModeChange",e=>{e!==this.showState.mode&&(this.updateState({visible:!1},!1),this._hide({userAction:!1}))});m(this,"onFiveInteriaPan",(e,n)=>{if(!n||this.state.config.autoShowEnable===!1||this.isHiddenByHideFunc)return;const o=this.five.getCurrentState();o.mode==="Floorplan"&&(this.state.visible||Od(o)&&(this.updateState({visible:!0},!0),this._show({isAutoShow:!0})))});m(this,"onFivePanoArrived",e=>{var n;!((n=this.five)!=null&&n.work)||(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});m(this,"onFiveCameraUpdate",(e,n)=>{if(!this.state.visible||this.showPromise)return;const o=this.five.getCurrentState();Qd(o)&&(this.updateState({visible:!1},n),this._hide({userAction:n,isAutoHide:!0}))});m(this,"onFiveWantsGesture",(e,n)=>{if(!!this.state.visible&&(n.length>1||e==="mouseWheel"))return!1});m(this,"onFiveWantsPanGesture",(e,n)=>{if(this.five.getCurrentState().mode==="Floorplan"&&this.state.config.autoShowEnable!==!1&&n&&this.state.visible)return this.five.updateCamera(this.showState,0),!1});m(this,"onFiveWantsTapGesture",()=>this.handleClick());m(this,"onFiveWantsChangeMode",(e,n)=>{n==="Panorama"&&e==="Floorplan"&&(this.lastPanoramaLongitude=this.five.getCurrentState().longitude)});m(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const n=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[n].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});n!=null&&n.selector&&(this.selector=n.selector,console.warn("\u4E0D\u63A8\u8350\u7EE7\u7EED\u4F7F\u7528 params.selector \u914D\u7F6E\u7236\u5BB9\u5668\uFF0C\u8BF7\u4F7F\u7528 appendTo \u65B9\u6CD5")),this.showState={mode:"Floorplan",longitude:0,latitude:Math.PI/2,fov:Vd/((a=n==null?void 0:n.scale)!=null?a:1)};const o={northDesc:"\u5317",modelOpacity:1,hoverEnable:!0,compassEnable:!0,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,roomAreaEnable:!0,roomNameEnable:!0,adaptiveRoomLabelVisibleEnable:!0,cameraImageUrl:Pt,attachedTo:Ct.BOUNDING_CENTER,getLabelElement:void 0,getRoomAreaText:l=>(l/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:l=>l.toString()},s=n?oi(n,["selector","scale"]):{},r=R(R({},o),s);this.state={enabled:!0,visible:!1,config:r},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,n,o=!0){return N(this,null,function*(){function s(u){return Object.prototype.hasOwnProperty.apply(u,["version"])}const r=e;r&&!r.version&&console.warn("\u4F20\u5165 serverData.data \u7684\u65B9\u5F0F\u540E\u7EED\u53EF\u80FD\u4E0D\u518D\u652F\u6301\uFF0C\u8BF7\u628A serverData \u6574\u4F53\u4F20\u5165 load \u51FD\u6570");const a=JSON.parse(JSON.stringify(e)),l=s(a)?a.data:a,c=this.data;this.data=yield It(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),n&&this.updateState(n,o),this.render()})}appendTo(e){if(this.wrapper=e,!!this.state.enabled)return e.appendChild(this.container),this.render(),this}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled&&(e.enabled?this._enable({userAction:s}):this._disable({userAction:s})),e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}this.render()}changeConfigs(e,n=!0){this.updateState({config:e},n),this.render()}formatData(e){return N(this,null,function*(){return yield It(e.data)})}updateState(e,n){const o=this.state,s=e.config?R(R({},o.config),e.config):o.config;this.state=ge(R(R({},this.state),e),{config:s}),!$e(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",zIndex:10,pointerEvents:"none"}),this.five.addExtraElement(this.container)}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.on("modeChange",this.onFiveModeChange),e.on("interiaPan",this.onFiveInteriaPan),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsGesture",this.onFiveWantsGesture),e.on("wantsPanGesture",this.onFiveWantsPanGesture),e.on("wantsTapGesture",this.onFiveWantsTapGesture),e.on("wantsChangeMode",this.onFiveWantsChangeMode),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modelLoaded",this.onFiveModelLoaded),e.off("modeChange",this.onFiveModeChange),e.off("interiaPan",this.onFiveInteriaPan),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsGesture",this.onFiveWantsGesture),e.off("wantsPanGesture",this.onFiveWantsPanGesture),e.off("wantsTapGesture",this.onFiveWantsTapGesture),e.off("wantsChangeMode",this.onFiveWantsChangeMode),e.off("modelShownFloorChange",this.onModelShownFloorChange)}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0)return;const n=ge(R({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude});if(this.app)return this.app.$set(n);this.app=new Hi({target:this.container,intro:!0,props:n})}}const Rd=(i,t)=>new Fd(i,t);function Gd(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)>5*Math.PI/180,o=e>5*(Math.PI/180)&&e<355*(Math.PI/180);return n||o}function Wd(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)<10*Math.PI/180,o=e<30*(Math.PI/180)||e>330*(Math.PI/180);return n&&o}class _d extends zt{constructor(e,n){super(e);m(this,"name","modelFloorplanPlugin");m(this,"state");m(this,"data");m(this,"showState");m(this,"showPromise");m(this,"app");m(this,"panoIndex",0);m(this,"floorIndex",0);m(this,"selector");m(this,"showRejection");m(this,"wrapper");m(this,"container",document.createElement("div"));m(this,"lastPanoramaLongitude",0);m(this,"size",{width:0,height:0});m(this,"hasAddedEventListener",!1);m(this,"isHiddenByHideFunc",!1);m(this,"dispose",()=>{var e,n;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(n=this.container)==null||n.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});m(this,"show",(...n)=>N(this,[...n],function*(e={}){if(!this.state.enabled||!this.showPromise&&this.state.visible)return;const o=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},o),this._show(e)}));m(this,"hide",(...n)=>N(this,[...n],function*(e={}){!this.state.enabled||(this.isHiddenByHideFunc=!0,this.state.visible!==!1&&(this.updateState({visible:!1},e.userAction||!0),this._hide(e)))}));m(this,"updateSize",()=>{if(!this.data||!qi(this.five,this.showState)||!this.container||!this.wrapper)return;const{min:e,max:n}=this.data.bounding,o=n.x-e.x,s=n.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=Yi(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(o*a),c=Math.ceil(s*a);this.size.width===l&&this.size.height===c||(this.container.style.width=l+"px",this.container.style.height=c+"px",this.size={width:l,height:c})});m(this,"_disable",e=>{var o,s,r;const{userAction:n}=e;this.hooks.emit("disable",{userAction:n}),(o=this.showRejection)==null||o.call(this,Ne.BreakOffByDisable),this.showPromise=void 0,(s=this.app)==null||s.$destroy(),this.app=void 0,(r=this.container)==null||r.remove(),this.removeEventListener()});m(this,"_enable",e=>{const{userAction:n}=e;this.addEventListener(),this.wrapper&&(this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n}))});m(this,"_show",e=>N(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.five.model)!=null&&r.loaded))throw new Error(Ne.ModelNotLoaded);if(!this.data)throw new Error(Ne.DataNotLoaded);this.isHiddenByHideFunc=!1;const n={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},o=R(R({},n),e),s=()=>N(this,null,function*(){this.hooks.emit("show",{userAction:o.userAction,auto:o.isAutoShow});let a=!1,l;this.showRejection=d=>{a=!0,l=d};const[c]=yield $n(Hs(this.five,this.showState,o.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(Ne.UnknownError);this.updateSize(),this.updatePosition(),this.floorIndex=o.floorIndex,this.five.model.show(this.floorIndex);const u=o.modelOpacity,h=o.immediately?0:_s;tn(this.five,u,h),this.render(h)});return this.showPromise=s().then(()=>{this.hooks.emit("showAnimationEnded",{auto:o.isAutoShow,userAction:o.userAction})}).catch(a=>{if(this.updateState({visible:!1},o.userAction),!o.isAutoShow&&a instanceof Error)throw a}).finally(()=>{this.showPromise=void 0,this.showRejection=void 0}),this.showPromise}));m(this,"_hide",e=>{var s;(s=this.showRejection)==null||s.call(this,Ne.BreakOffByHide),this.showPromise=void 0;const o=R(R({},{userAction:!0,isAutoHide:!1}),e);tn(this.five,1,0),this.hooks.emit("hide",{auto:o.isAutoHide,userAction:o.userAction}),this.render()});m(this,"handleClick",()=>{if(!this.state.visible)return;if(this.hooks.emit("click"))return!1});m(this,"onFiveModelLoaded",()=>{if(this.state.enabled===!1||this.wrapper||!this.selector)return;const e=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!e)throw new Error("\u4E0D\u6B63\u786E\u7684\u7236\u5BB9\u5668\u9009\u62E9\u5668");this.wrapper=e,e.append(this.container)});m(this,"onFiveModeChange",e=>{e!==this.showState.mode&&(this.updateState({visible:!1},!1),this._hide({userAction:!1}))});m(this,"onFivePanoArrived",e=>{var n;!((n=this.five)!=null&&n.work)||(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});m(this,"onFiveCameraUpdate",(e,n)=>{if(!this.state.visible||this.showPromise)return;const o=this.five.getCurrentState();this.updatePosition(),this.updateSize(),Gd(o)&&(this.updateState({visible:!1},n),this._hide({userAction:n}))});m(this,"onFiveWantsPanGesture",(e,n)=>{if(this.five.getCurrentState().mode===this.showState.mode&&this.state.config.autoShowEnable!==!1){if(n&&this.state.visible)return this.five.updateCamera(this.showState,0),!1;if(n&&!this.state.visible){if(this.isHiddenByHideFunc)return;const o=this.five.getCurrentState();return o.mode!==this.showState.mode||this.state.visible?void 0:(Wd(o)&&(this.updateState({visible:!0},!0),this._show({isAutoShow:!0})),!1)}}});m(this,"onFiveWantsTapGesture",()=>this.handleClick());m(this,"onFiveWantsChangeMode",(e,n)=>{n==="Panorama"&&e===this.showState.mode&&(this.lastPanoramaLongitude=this.five.getCurrentState().longitude)});m(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const n=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[n].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});n!=null&&n.selector&&(this.selector=n.selector,console.warn("\u4E0D\u63A8\u8350\u7EE7\u7EED\u4F7F\u7528 params.selector \u914D\u7F6E\u7236\u5BB9\u5668\uFF0C\u8BF7\u4F7F\u7528 appendTo \u65B9\u6CD5")),this.showState={mode:"Mapview",longitude:0,latitude:Math.PI/2,fov:90};const o={northDesc:"\u5317",modelOpacity:1,hoverEnable:!0,compassEnable:!0,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,roomAreaEnable:!0,roomNameEnable:!0,cameraImageUrl:Pt,attachedTo:Ct.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:a=>(a/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:a=>a.toString()},s=n?oi(n,["selector","scale"]):{},r=R(R({},o),s);this.state={enabled:!0,visible:!1,config:r},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,n,o=!0){return N(this,null,function*(){function s(u){return Object.prototype.hasOwnProperty.apply(u,["version"])}const r=e;r&&!r.version&&console.warn("\u4F20\u5165 serverData.data \u7684\u65B9\u5F0F\u540E\u7EED\u53EF\u80FD\u4E0D\u518D\u652F\u6301\uFF0C\u8BF7\u628A serverData \u6574\u4F53\u4F20\u5165 load \u51FD\u6570");const a=JSON.parse(JSON.stringify(e)),l=s(a)?a.data:a,c=this.data;this.data=yield It(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),n&&this.updateState(n,o),this.render()})}appendTo(e){if(this.wrapper=e,!!this.state.enabled)return e.appendChild(this.container),this.render(),this}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled&&(e.enabled?this._enable({userAction:s}):this._disable({userAction:s})),e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}}changeConfigs(e,n=!0){this.updateState({config:e},n),this.render()}updatePosition(){var a;const e=Xi(this.five,this.floorIndex,this.state.config.attachedTo),n=(a=this.five.model)==null?void 0:a.bounding.getCenter(new E.Vector3).setY(e);if(!n)return;const o=n.clone().project(this.five.camera),s=(o.x+1)/2,r=-(o.y-1)/2;this.container.style.left=s*100+"%",this.container.style.top=r*100+"%"}formatData(e){return N(this,null,function*(){return yield It(e.data)})}updateState(e,n){const o=this.state,s=e.config?R(R({},o.config),e.config):o.config;this.state=ge(R(R({},this.state),e),{config:s}),!$e(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",zIndex:10,pointerEvents:"none"}),this.five.addExtraElement(this.container)}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.on("modeChange",this.onFiveModeChange),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsPanGesture",this.onFiveWantsPanGesture),e.on("wantsTapGesture",this.onFiveWantsTapGesture),e.on("wantsChangeMode",this.onFiveWantsChangeMode),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modelLoaded",this.onFiveModelLoaded),e.off("modeChange",this.onFiveModeChange),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsPanGesture",this.onFiveWantsPanGesture),e.off("wantsTapGesture",this.onFiveWantsTapGesture),e.off("wantsChangeMode",this.onFiveWantsChangeMode),e.off("modelShownFloorChange",this.onModelShownFloorChange)}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0)return;const n=ge(R({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude});if(this.app)return this.app.$set(n);this.app=new Hi({target:this.container,intro:!0,props:n})}}const Nd=(i,t)=>new _d(i,t);class Hd extends zt{constructor(e,n){super(e);m(this,"name","topviewFloorplanPlugin");m(this,"state");m(this,"data");m(this,"app");m(this,"selector");m(this,"panoIndex",0);m(this,"floorIndex",0);m(this,"wrapper");m(this,"container",document.createElement("div"));m(this,"lastPanoramaLongitude",0);m(this,"size",{width:0,height:0});m(this,"hasAddedEventListener",!1);m(this,"isHiddenByHideFunc",!1);m(this,"updateSize",()=>{if(!this.data||!this.container||!this.wrapper||this.five.getCurrentState().mode!=="Topview")return;const{min:e,max:n}=this.data.bounding,o=n.x-e.x,s=n.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=Yi(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(o*a),c=Math.ceil(s*a);this.size.width===l&&this.size.height===c||(this.container.style.width=l+"px",this.container.style.height=c+"px",this.size={width:l,height:c})});m(this,"dispose",()=>{var e,n;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(n=this.container)==null||n.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});m(this,"_disable",e=>{var o,s;const{userAction:n}=e;(o=this.app)==null||o.$destroy(),this.app=void 0,(s=this.container)==null||s.remove(),this.removeEventListener(),this.hooks.emit("disable",{userAction:n})});m(this,"onFiveModelLoaded",()=>{if(this.state.enabled===!1||this.wrapper||!this.selector)return;const e=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!e)throw new Error("\u4E0D\u6B63\u786E\u7684\u7236\u5BB9\u5668\u9009\u62E9\u5668");this.wrapper=e,e.append(this.container)});m(this,"onFiveModeChange",(...[e,,,,n])=>{e!=="Topview"&&this.state.visible&&(this.updateState({visible:!1},n),this._hide({userAction:n}))});m(this,"onFivePanoArrived",e=>{var n;!((n=this.five)!=null&&n.work)||(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});m(this,"onFiveCameraUpdate",(e,n)=>{!this.state.visible||(this.updatePosition(),this.updateSize())});m(this,"onFiveWantsGesture",e=>{if(!(e!=="pan"&&e!=="pinch"&&e!=="mouseWheel")&&this.state.visible&&!this.state.config.gestureEnable)return!1});m(this,"onFiveWantsMoveToPano",()=>{if(this.state.visible&&this.state.config.preventRoomClick)return!1});m(this,"onFiveInitAnimationEnded",(...[,,e])=>{const{mode:n}=this.five.getCurrentState();n==="Topview"&&!this.isHiddenByHideFunc&&!this.state.visible&&this.state.config.autoShowEnable&&(this.updateState({visible:!0},e),this._show({userAction:e}))});m(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const n=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[n].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});n!=null&&n.selector&&(this.selector=n.selector,console.warn("\u4E0D\u63A8\u8350\u7EE7\u7EED\u4F7F\u7528 params.selector \u914D\u7F6E\u7236\u5BB9\u5668\uFF0C\u8BF7\u4F7F\u7528 appendTo \u65B9\u6CD5"));const o={northDesc:"\u5317",modelOpacity:1,hoverEnable:!0,compassEnable:!0,gestureEnable:!1,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,roomAreaEnable:!0,roomNameEnable:!0,cameraImageUrl:Pt,attachedTo:Ct.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:a=>(a/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:a=>a.toString()},s=n?oi(n,["selector","scale"]):{},r=R(R({},o),s);this.state={enabled:!0,visible:!1,config:r},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,n,o=!0){return N(this,null,function*(){function s(u){return Object.prototype.hasOwnProperty.apply(u,["version"])}const r=e;r&&!r.version&&console.warn("\u4F20\u5165 serverData.data \u7684\u65B9\u5F0F\u540E\u7EED\u53EF\u80FD\u4E0D\u518D\u652F\u6301\uFF0C\u8BF7\u628A serverData \u6574\u4F53\u4F20\u5165 load \u51FD\u6570");const a=JSON.parse(JSON.stringify(e)),l=s(a)?a.data:a,c=this.data;this.data=yield It(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),n&&this.updateState(n,o),this.render()})}updatePosition(){var a;const e=Xi(this.five,this.floorIndex,this.state.config.attachedTo),n=(a=this.five.model)==null?void 0:a.bounding.getCenter(new E.Vector3).setY(e);if(!n)return;const o=n.clone().project(this.five.camera),s=(o.x+1)/2,r=-(o.y-1)/2;this.container.style.left=s*100+"%",this.container.style.top=r*100+"%"}appendTo(e){if(this.wrapper=e,!!this.state.enabled)return e.appendChild(this.container),this.render(),this}show(){return N(this,arguments,function*(e={}){if(this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},n),this._show({userAction:n})})}hide(){return N(this,arguments,function*(e={}){if(this.isHiddenByHideFunc=!0,!this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!1},n),this._hide({userAction:n})})}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled){const r={userAction:s};e.enabled?this._enable(r):this._disable(r)}if(e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}}changeConfigs(e,n=!0){this.updateState({config:e},n),this.render()}formatData(e){return N(this,null,function*(){return yield It(e.data)})}_show(e){return N(this,null,function*(){if(!this.state.enabled)return;this.isHiddenByHideFunc=!1;const{userAction:n}=e;this.hooks.emit("show",{userAction:n,auto:!1}),this.five.getCurrentState().mode!=="Topview"&&(yield Ns(this.five,["Topview",void 0,void 0,n])),this.five.model.show(this.floorIndex),this.updatePosition(),this.updateSize();const o=500,s=this.state.config.modelOpacity;tn(this.five,s,o),this.hooks.emit("showAnimationEnded",{userAction:n,auto:!1}),this.render()})}_hide(e){return N(this,null,function*(){if(!this.state.enabled)return;const{userAction:n}=e;this.hooks.emit("hide",{userAction:n,auto:!1});const o=1,s=0;tn(this.five,o,s),this.render()})}_enable(e){const{userAction:n}=e;this.addEventListener(),this.wrapper&&this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n})}updateState(e,n){const o=this.state,s=e.config?R(R({},o.config),e.config):o.config;this.state=ge(R(R({},this.state),e),{config:s}),!$e(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.on("modeChange",this.onFiveModeChange),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsGesture",this.onFiveWantsGesture),e.on("wantsMoveToPano",this.onFiveWantsMoveToPano),e.on("initAnimationEnded",this.onFiveInitAnimationEnded),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modeChange",this.onFiveModeChange),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsGesture",this.onFiveWantsGesture),e.off("wantsMoveToPano",this.onFiveWantsMoveToPano),e.off("initAnimationEnded",this.onFiveInitAnimationEnded),e.off("modelShownFloorChange",this.onModelShownFloorChange)}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate3d(-50%, -50%, 10px)",zIndex:10,pointerEvents:"none","will-change":"width, height"}),this.five.addExtraElement(this.container)}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0)return;const n=ge(R({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude});if(this.app)return this.app.$set(n);this.app=new Hi({target:this.container,intro:!0,props:n})}}const Xd=(i,t)=>new Hd(i,t);function Ji(i,t=200){let e;return function(...n){e||(i(...n),e=setTimeout(function(){e=null},t))}}function Yd(i){ue(i,"svelte-1nqrlxd",".plugin-radar__camera-wrapper.svelte-1nqrlxd{width:100%;height:100%;position:absolute;pointer-events:none}.plugin-radar__camera-position.svelte-1nqrlxd{position:absolute;left:0;top:0;width:0;height:0;transform:none;pointer-events:none;transition:transform 1s linear}.plugin-radar__camera-rotate.svelte-1nqrlxd{position:absolute;left:-0.9375rem;top:-0.9375rem;width:1.0625rem;height:1.0625rem;transform-origin:0.9375rem 0.9375rem;transform:rotate(45deg);background-repeat:no-repeat;background-size:100%}")}function Ud(i){let t,e,n;return{c(){t=T("div"),e=T("div"),n=T("div"),b(n,"class","plugin-radar__camera-rotate svelte-1nqrlxd"),z(n,"background-image","url("+(i[0]||Pt)+")"),z(n,"transform",i[1]),b(e,"class","plugin-radar__camera-position svelte-1nqrlxd"),z(e,"transform",i[2]),b(t,"class","plugin-radar__camera-wrapper svelte-1nqrlxd")},m(o,s){M(o,t,s),B(t,e),B(e,n)},p(o,[s]){s&1&&z(n,"background-image","url("+(o[0]||Pt)+")"),s&2&&z(n,"transform",o[1]),s&4&&z(e,"transform",o[2])},i:Y,o:Y,d(o){o&&S(t)}}}function qd(i){return`rotate(${Math.floor(i/Math.PI*180)*-1+45}deg)`}function Jd(i,t,e){let n,o,{five:s}=t,{pxmm:r}=t,{floorplanData:a}=t,{cameraImageUrl:l}=t,c=s.getCurrentState().panoIndex,u=s.getCurrentState().longitude;function h(g,v){const p=g.bounding,A=g.observers[v];if(!A)return"";const y=(p.max.x-p.min.x)*r,w=(p.max.y-p.min.y)*r,k=Math.floor(A.positionInImage.x*y),P=Math.floor(A.positionInImage.y*w);return`translate(${k}px, ${P}px)`}function d(g){e(6,c=g)}const f=Ji(g=>{e(7,u=g.longitude)},1e3/60);return Ye(()=>(s.on("panoWillArrive",d),s.on("cameraDirectionUpdate",f),function(){s.off("panoWillArrive",d),s.off("cameraDirectionUpdate",f)})),i.$$set=g=>{"five"in g&&e(3,s=g.five),"pxmm"in g&&e(4,r=g.pxmm),"floorplanData"in g&&e(5,a=g.floorplanData),"cameraImageUrl"in g&&e(0,l=g.cameraImageUrl)},i.$$.update=()=>{i.$$.dirty&96&&e(2,n=h(a,c)),i.$$.dirty&128&&e(1,o=qd(u))},[l,o,n,s,r,a,c,u]}class Zd extends se{constructor(t){super(),oe(this,t,Jd,Ud,ie,{five:3,pxmm:4,floorplanData:5,cameraImageUrl:0},Yd)}}function Kd(i){ue(i,"svelte-1i87fz7",".plugin-pano-floorplan__extra-objects.svelte-1i87fz7{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.plugin-pano-floorplan__extra-object-item--position.svelte-1i87fz7{position:absolute;width:0;height:0}.plugin-pano-floorplan__extra-object-item.svelte-1i87fz7{transform:translate(-50%, -50%)}")}function Xs(i,t,e){const n=i.slice();return n[1]=t[e],n}function Ys(i,t){let e,n,o=`${t[1].icon.width/16}rem`,s=`${t[1].icon.height/16}rem`,r,a=`${t[1].positionInImage.y*100}%`,l=`${t[1].positionInImage.x*100}%`;return{key:i,first:null,c(){e=T("div"),n=T("div"),r=te(),b(n,"class","plugin-pano-floorplan__extra-object-item svelte-1i87fz7"),z(n,"background-image",`url(${t[1].icon.url})`),z(n,"width",o),z(n,"height",s),b(e,"class","plugin-pano-floorplan__extra-object-item--position svelte-1i87fz7"),z(e,"top",a),z(e,"left",l),this.first=e},m(c,u){M(c,e,u),B(e,n),B(e,r)},p(c,u){t=c,u&1&&z(n,"background-image",`url(${t[1].icon.url})`),u&1&&o!==(o=`${t[1].icon.width/16}rem`)&&z(n,"width",o),u&1&&s!==(s=`${t[1].icon.height/16}rem`)&&z(n,"height",s),u&1&&a!==(a=`${t[1].positionInImage.y*100}%`)&&z(e,"top",a),u&1&&l!==(l=`${t[1].positionInImage.x*100}%`)&&z(e,"left",l)},d(c){c&&S(e)}}}function $d(i){let t,e=[],n=new Map,o=i[0];const s=r=>r[1].id;for(let r=0;r<o.length;r+=1){let a=Xs(i,o,r),l=s(a);n.set(l,e[r]=Ys(l,a))}return{c(){t=T("div");for(let r=0;r<e.length;r+=1)e[r].c();b(t,"class","plugin-pano-floorplan__extra-objects svelte-1i87fz7")},m(r,a){M(r,t,a);for(let l=0;l<e.length;l+=1)e[l].m(t,null)},p(r,[a]){a&1&&(o=r[0],e=Ue(e,a,s,1,r,o,n,t,Gi,Ys,null,Xs))},i:Y,o:Y,d(r){r&&S(t);for(let a=0;a<e.length;a+=1)e[a].d()}}}function eh(i,t,e){let{extraObjects:n=[]}=t;return i.$$set=o=>{"extraObjects"in o&&e(0,n=o.extraObjects)},[n]}class th extends se{constructor(t){super(),oe(this,t,eh,$d,ie,{extraObjects:0},Kd)}}function Us(i){let t,e;const n=[{five:i[0],pxmm:i[1],floorIndex:i[2],floorplanData:i[4],onRoomHeightClick:i[6]}];let o={};for(let s=0;s<n.length;s+=1)o=je(o,n[s]);return t=new Bs({props:o}),{c(){$(t.$$.fragment)},m(s,r){Z(t,s,r),e=!0},p(s,r){const a=r&87?Fe(n,[{five:s[0],pxmm:s[1],floorIndex:s[2],floorplanData:s[4],onRoomHeightClick:s[6]}]):{};t.$set(a)},i(s){e||(I(t.$$.fragment,s),e=!0)},o(s){D(t.$$.fragment,s),e=!1},d(s){K(t,s)}}}function nh(i){let t,e,n,o,s,r;const a=[{floorIndex:i[2],floorplanData:i[4]}];let l={};for(let u=0;u<a.length;u+=1)l=je(l,a[u]);t=new ps({props:l}),n=new th({props:{extraObjects:i[5]}});let c=i[3]&&Us(i);return{c(){$(t.$$.fragment),e=te(),$(n.$$.fragment),o=te(),c&&c.c(),s=me()},m(u,h){Z(t,u,h),M(u,e,h),Z(n,u,h),M(u,o,h),c&&c.m(u,h),M(u,s,h),r=!0},p(u,[h]){const d=h&20?Fe(a,[{floorIndex:u[2],floorplanData:u[4]}]):{};t.$set(d);const f={};h&32&&(f.extraObjects=u[5]),n.$set(f),u[3]?c?(c.p(u,h),h&8&&I(c,1)):(c=Us(u),c.c(),I(c,1),c.m(s.parentNode,s)):c&&(re(),D(c,1,1,()=>{c=null}),ae())},i(u){r||(I(t.$$.fragment,u),I(n.$$.fragment,u),I(c),r=!0)},o(u){D(t.$$.fragment,u),D(n.$$.fragment,u),D(c),r=!1},d(u){K(t,u),u&&S(e),K(n,u),u&&S(o),c&&c.d(u),u&&S(s)}}}function ih(i,t,e){let n,{five:o}=t,{pxmm:s}=t,{floorIndex:r}=t,{hoverEnable:a}=t,{floorplanData:l}=t,{extraObjects:c=[]}=t;const u=void 0;return i.$$set=h=>{"five"in h&&e(0,o=h.five),"pxmm"in h&&e(1,s=h.pxmm),"floorIndex"in h&&e(2,r=h.floorIndex),"hoverEnable"in h&&e(3,a=h.hoverEnable),"floorplanData"in h&&e(4,l=h.floorplanData),"extraObjects"in h&&e(7,c=h.extraObjects)},i.$$.update=()=>{i.$$.dirty&132&&e(5,n=c==null?void 0:c.filter(h=>h.floorIndex===r))},[o,s,r,a,l,n,u,c]}class oh extends se{constructor(t){super(),oe(this,t,ih,nh,ie,{five:0,pxmm:1,floorIndex:2,hoverEnable:3,floorplanData:4,extraObjects:7})}}function sh(i){ue(i,"svelte-1mvqyqq",".plugin-floorplan-radar.svelte-1mvqyqq{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.plugin-floorplan-radar-container.svelte-1mvqyqq{position:relative}")}function qs(i){let t,e,n,o=i[6]!==0&&Js(i);return{c(){t=T("div"),o&&o.c(),b(t,"class","plugin-floorplan-radar svelte-1mvqyqq"),De(()=>i[12].call(t))},m(s,r){M(s,t,r),o&&o.m(t,null),e=Ke(t,i[12].bind(t)),n=!0},p(s,r){s[6]!==0?o?(o.p(s,r),r&64&&I(o,1)):(o=Js(s),o.c(),I(o,1),o.m(t,null)):o&&(re(),D(o,1,1,()=>{o=null}),ae())},i(s){n||(I(o),n=!0)},o(s){D(o),n=!1},d(s){s&&S(t),o&&o.d(),e()}}}function Js(i){let t,e,n,o,s=`${i[8]}px`,r=`${i[11]}px`,a;const l=[{five:i[0],pxmm:i[9],floorIndex:i[10],floorplanData:i[3],hoverEnable:i[2],extraObjects:i[5]}];let c={};for(let d=0;d<l.length;d+=1)c=je(c,l[d]);e=new oh({props:c});const u=[{pxmm:i[9],five:i[0],floorplanData:i[3],cameraImageUrl:i[4]}];let h={};for(let d=0;d<u.length;d+=1)h=je(h,u[d]);return o=new Zd({props:h}),{c(){t=T("div"),$(e.$$.fragment),n=te(),$(o.$$.fragment),b(t,"class","plugin-floorplan-radar-container svelte-1mvqyqq"),z(t,"width",s),z(t,"height",r)},m(d,f){M(d,t,f),Z(e,t,null),B(t,n),Z(o,t,null),a=!0},p(d,f){const g=f&1581?Fe(l,[{five:d[0],pxmm:d[9],floorIndex:d[10],floorplanData:d[3],hoverEnable:d[2],extraObjects:d[5]}]):{};e.$set(g);const v=f&537?Fe(u,[{pxmm:d[9],five:d[0],floorplanData:d[3],cameraImageUrl:d[4]}]):{};o.$set(v),f&256&&s!==(s=`${d[8]}px`)&&z(t,"width",s),f&2048&&r!==(r=`${d[11]}px`)&&z(t,"height",r)},i(d){a||(I(e.$$.fragment,d),I(o.$$.fragment,d),a=!0)},o(d){D(e.$$.fragment,d),D(o.$$.fragment,d),a=!1},d(d){d&&S(t),K(e),K(o)}}}function rh(i){let t,e,n=i[1]&&qs(i);return{c(){n&&n.c(),t=me()},m(o,s){n&&n.m(o,s),M(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&I(n,1)):(n=qs(o),n.c(),I(n,1),n.m(t.parentNode,t)):n&&(re(),D(n,1,1,()=>{n=null}),ae())},i(o){e||(I(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&S(t)}}}function ah(i,t,e){var A,y;let{five:n}=t,{visible:o}=t,{hoverEnable:s}=t,{floorplanData:r}=t,{cameraImageUrl:a}=t,{extraObjects:l=[]}=t,c=0,u=(y=(A=n.work.observers[n.getCurrentState().panoIndex])==null?void 0:A.floorIndex)!=null?y:0,h=0,d=0,f=0,g=0;function v(w){e(10,u=n.work.observers[w].floorIndex)}Ye(()=>(n.on("panoArrived",v),()=>{n.off("panoArrived",v)}));function p(){h=this.clientWidth,d=this.clientHeight,e(6,h),e(7,d)}return i.$$set=w=>{"five"in w&&e(0,n=w.five),"visible"in w&&e(1,o=w.visible),"hoverEnable"in w&&e(2,s=w.hoverEnable),"floorplanData"in w&&e(3,r=w.floorplanData),"cameraImageUrl"in w&&e(4,a=w.cameraImageUrl),"extraObjects"in w&&e(5,l=w.extraObjects)},i.$$.update=()=>{if(i.$$.dirty&456){const w=Math.min(h,d),{max:k,min:P}=r.bounding,C=k.x-P.x,L=k.y-P.y,x=function(){return C>L?[w,w/C*L]:[w/L*C,w]}();e(8,f=x[0]),e(11,g=x[1]),e(9,c=f/C)}},[n,o,s,r,a,l,h,d,f,c,u,g,p]}class lh extends se{constructor(t){super(),oe(this,t,ah,rh,ie,{five:0,visible:1,hoverEnable:2,floorplanData:3,cameraImageUrl:4,extraObjects:5},sh)}}class ch extends zt{constructor(e,n){super(e);m(this,"name","panoFloorplanRadarPlugin");m(this,"state");m(this,"data");m(this,"app");m(this,"wrapperSelector","");m(this,"wrapper",null);m(this,"disposed",!1);m(this,"extraObjects",[]);m(this,"dispose",()=>{var e;this.disposed=!0,(e=this.app)==null||e.$destroy(),this.wrapper=null,this.wrapperSelector="",this.hooks.emit("dispose")});m(this,"_disable",e=>{var o;const{userAction:n}=e;(o=this.app)==null||o.$destroy(),this.app=void 0,this.hooks.emit("disable",{userAction:n})});this.five=e;const o={hoverEnable:!1,cameraImageUrl:Pt},s=n!=null&&n.configs?n.configs:{},r=R(R({},o),s);this.state={enabled:!0,visible:!0,config:r},n!=null&&n.wrapper&&console.warn("\u4E0D\u63A8\u8350\u7EE7\u7EED\u4F7F\u7528 params.selector \u914D\u7F6E\u7236\u5BB9\u5668\uFF0C\u8BF7\u4F7F\u7528 appendTo \u65B9\u6CD5"),typeof(n==null?void 0:n.wrapper)=="string"?this.wrapperSelector=n.wrapper:(n==null?void 0:n.wrapper)instanceof Element&&(this.wrapper=n.wrapper),e.once("dispose",this.dispose)}load(e,n,o=!0){return N(this,null,function*(){function s(c){return Object.prototype.hasOwnProperty.apply(c,["version"])}const r=JSON.parse(JSON.stringify(e)),a=s(r)?r.data:r,l=this.data;this.data=yield It(a),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,l),n&&this.updateState(n,o),this.render()})}show(){return N(this,arguments,function*(e={}){if(this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},n),this._show({userAction:n})})}hide(){return N(this,arguments,function*(e={}){if(!this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!1},n),this._hide({userAction:n})})}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled){const r={userAction:s};e.enabled?this._enable(r):this._disable(r)}if(e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}}appendTo(e){this.wrapper=e,this.render()}changeConfigs(e,n=!0){this.setState({config:e},{userAction:n}),this.render()}setExtraObjectsWith3DPositions(e){!this.data||(this.extraObjects=Bd(e,this.five,this.data),this.render())}formatData(e){return N(this,null,function*(){return yield It(e.data)})}_enable(e){const{userAction:n}=e;this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n})}_show(e){if(this.disposed||!this.state.enabled)return;const{userAction:n}=e;this.hooks.emit("show",{userAction:n}),this.render()}_hide(e){if(this.disposed||!this.state.enabled)return;const{userAction:n}=e;this.hooks.emit("hide",{userAction:n}),this.render()}updateState(e,n){const o=this.state;this.state=R(R({},this.state),e),!$e(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}render(){if(this.disposed||!this.state.enabled)return;if(!this.wrapper&&this.wrapperSelector){const n=document.querySelector(this.wrapperSelector);this.wrapper=n}if(!this.data||!this.wrapper)return;const e=ge(R({},this.state.config),{five:this.five,floorplanData:this.data,visible:this.state.visible,extraObjects:this.extraObjects});this.app?this.app.$set(e):this.app=new lh({target:this.wrapper,props:e})}}const uh=(i,t)=>new ch(i,t),dh=[{type:0,floorType:1,roomType:"100900000012",name:"\u5176\u4ED6"},{type:1,floorType:1,roomType:"100900000002",name:"\u5BA2\u5385"},{type:2,floorType:1,roomType:"100900000002",name:"\u9910\u5385"},{type:3,floorType:0,roomType:"100900000001",name:"\u5367\u5BA4"},{type:4,floorType:0,roomType:"100900000001",name:"\u4E66\u623F"},{type:5,floorType:3,roomType:"100900000004",name:"\u536B\u751F\u95F4"},{type:6,floorType:3,roomType:"100900000004",name:"\u6DCB\u6D74\u95F4"},{type:7,floorType:3,roomType:"100900000004",name:"\u6D17\u624B\u95F4"},{type:8,floorType:3,roomType:"100900000003",name:"\u53A8\u623F"},{type:9,floorType:1,roomType:"100900000003",name:"\u5F00\u653E\u53A8\u623F",onlySubArea:!0},{type:10,floorType:0,roomType:"100900000001",name:"\u591A\u529F\u80FD\u95F4"},{type:11,floorType:0,roomType:"100900000009",name:"\u4FDD\u59C6\u95F4"},{type:12,floorType:4,roomType:"100900000005",name:"\u9633\u53F0"},{type:13,floorType:4,roomType:"100900000006",name:"\u9732\u53F0"},{type:14,floorType:0,roomType:"100900000008",name:"\u50A8\u7269\u95F4"},{type:15,floorType:0,roomType:"100900000013",name:"\u8863\u5E3D\u95F4"},{type:16,floorType:0,roomType:"100900000011",name:"\u9601\u697C"},{type:17,floorType:2,roomType:"100900000007",name:"\u82B1\u56ED"},{type:18,floorType:5,roomType:"100900000010",name:"\u8F66\u5E93"},{type:19,floorType:1,roomType:"100900000012",name:"\u7535\u68AF"},{type:20,floorType:1,roomType:"100900000012",name:"\u5730\u4E0B\u5BA4"},{type:21,floorType:1,roomType:"100900000012",name:"\u5929\u4E95"},{type:22,floorType:1,roomType:"100900000012",name:"\u9633\u5149\u623F"},{type:23,floorType:1,roomType:"100900000012",name:"\u8FC7\u9053"},{type:24,floorType:1,roomType:"100900000012",name:"\u697C\u68AF\u95F4"},{type:25,floorType:1,roomType:"100900000012",name:"\u95E8\u5385"},{type:26,floorType:2,roomType:"100900000012",name:"\u5165\u6237\u82B1\u56ED"},{type:27,floorType:1,roomType:"100900000012",name:"\u7384\u5173"},{type:28,floorType:1,roomType:"100900000012",name:"\u6311\u7A7A"},{type:29,floorType:4,roomType:"100900000012",name:"\u667E\u6652\u533A"},{type:30,floorType:4,roomType:"100900000012",name:"\u6D17\u8863\u623F"},{type:31,floorType:0,roomType:"100900000012",name:"\u5A31\u4E50\u533A"},{type:32,floorType:0,roomType:"100900000012",name:"\u5065\u8EAB\u533A"},{type:33,floorType:0,roomType:"100900000012",name:"\u63A5\u5F85\u533A"},{type:34,floorType:0,roomType:"100900000012",name:"\u5F71\u97F3\u533A"},{type:35,floorType:1,roomType:"100900000012",name:"\u9910\u996E\u533A"},{type:36,floorType:1,roomType:"100900000012",name:"\u5176\u4ED6",onlySubArea:!0},{type:37,floorType:1,roomType:"100900000002",name:"\u8D77\u5C45\u5BA4"},{type:38,floorType:0,roomType:"100900000001",name:"\u4E3B\u5367"},{type:39,floorType:0,roomType:"100900000001",name:"\u6B21\u5367"},{type:40,floorType:0,roomType:"100900000001",name:"\u4F18\u5316\u95F4"},{type:41,floorType:0,roomType:"100900000001",name:"\u529E\u516C\u5BA4"},{type:42,floorType:0,roomType:"100900000001",name:"\u4F1A\u8BAE\u5BA4"},{type:43,floorType:0,roomType:"100900000001",name:"\u6D3D\u8C08\u95F4"},{type:44,floorType:1,roomType:"100900000002",name:"\u5171\u4EAB\u5927\u5385"},{type:45,floorType:1,roomType:"100900000012",name:"\u6C34\u5427"},{type:46,floorType:0,roomType:"100900000015",name:"\u51FA\u5165\u53E3"},{type:47,floorType:0,roomType:"100900000015",name:"\u5927\u5385"},{type:48,floorType:0,roomType:"100900000015",name:"\u5305\u53A2"},{type:49,floorType:0,roomType:"100900000015",name:"\u5176\u4ED6"},{type:50,floorType:0,roomType:"100900000016",name:"\u51FA\u5165\u53E3"},{type:51,floorType:0,roomType:"100900000016",name:"\u529E\u516C\u533A"},{type:52,floorType:0,roomType:"100900000016",name:"\u8001\u677F\u95F4"},{type:53,floorType:0,roomType:"100900000016",name:"\u4F1A\u8BAE\u5BA4"},{type:54,floorType:0,roomType:"100900000016",name:"\u4F11\u606F\u533A/\u6C34\u5427"},{type:55,floorType:0,roomType:"100900000016",name:"\u5176\u4ED6"},{type:56,floorType:2,roomType:"100900000012",name:"\u7A7A\u4E2D\u82B1\u56ED"},{type:57,floorType:0,roomType:"100900000001",name:"\u6D0B\u5BA4"},{type:58,floorType:0,roomType:"100900000001",name:"\u548C\u5BA4"}],hh=[{type:0,description:"\u6728\u8D28\u5730\u677F"},{type:1,description:"\u74F7\u7816\u5730\u9762"},{type:2,description:"\u6237\u5916\u5730\u9762"},{type:3,description:"\u536B\u751F\u95F4\u5730\u9762"},{type:4,description:"\u9633\u53F0\u5730\u9762"},{type:5,description:"\u8F66\u5E93\u5730\u9762"}],fh=[{roomType:"100900000001",description:"\u5BA4"},{roomType:"100900000002",description:"\u5385"},{roomType:"100900000003",description:"\u53A8"},{roomType:"100900000004",description:"\u536B"},{roomType:"100900000005",description:"\u9633\u53F0"},{roomType:"100900000006",description:"\u9732\u53F0"},{roomType:"100900000007",description:"\u82B1\u56ED"},{roomType:"100900000008",description:"\u50A8"},{roomType:"100900000009",description:"\u4FDD\u59C6\u95F4"},{roomType:"100900000010",description:"\u8F66\u5E93"},{roomType:"100900000011",description:"\u9601\u697C"},{roomType:"100900000012",description:"\u5176\u4ED6"},{roomType:"100900000013",description:"\u8863"},{roomType:"100900000015",description:"\u5546\u94FA"},{roomType:"100900000016",description:"\u5199\u5B57\u697C"}],Zi=(i,t,e)=>{const n=new E.Matrix4,o=new E.Euler(i,t,e,"YXZ");return n.makeRotationFromEuler(o),n},mh=(i,{scale:t,rotation:e,position:n})=>{if(t&&i.scale.set(t,t,t),e){const[o,s,r]=e;o&&i.applyMatrix4(Zi(o,0,0)),s&&i.applyMatrix4(Zi(0,s,0)),r&&i.applyMatrix4(Zi(0,0,r))}return n&&i.position.set(n.x,n.y,n.z),i};function Zs(i,t){i.traverse(e=>{var n;if(e.type==="Mesh"){const o=e,s=R({map:o.material.map||{}},t);o.material=new V.MeshBasicMaterial(s),o.renderOrder=1,((n=e.parent)==null?void 0:n.type)==="Mesh"&&(e.renderOrder=e.parent.renderOrder+1)}})}const ph=(i,t)=>{var u;const e=t.fbx_url||"//vrlab-static.ljcdn.com/release/web/v3/dipan3/dipan.FBX",n=(u=t.north_rad)!=null?u:void 0,o={},s=h=>N(this,null,function*(){var q;const d=(h==null?void 0:h.fbx_url)||e,f=(q=h==null?void 0:h.north_rad)!=null?q:n;if(typeof f!="number")throw new Error('"northRad"\u914D\u7F6E\u53C2\u6570\u7F3A\u5931\uFF1A\u672A\u914D\u7F6E\u6307\u5357\u9488\u6307\u5411\uFF01');const g=i.model.bounding,v=g.max.x-g.min.x,p=g.max.z-g.min.z,A=Math.max(v,p),w=yield new Tn.FBXLoader().loadAsync(d);Zs(w,{transparent:!0,side:E.DoubleSide,blending:E.AdditiveBlending});const k=[0,f-Math.PI/2,0],{model:{bounding:{max:{x:P,z:C},min:{x:L,y:x,z:Q}}}}=i;o.yBase=x;const _={x:(P+L)/2,y:x-1.6,z:(C+Q)/2},F=.0045*A;return mh(w,{position:_,rotation:k,scale:F}),o.object=w,!0}),r=({latitude:h})=>{if(!o.object)return;const d=a(h);d&&(o.object.position.y=d)},a=h=>{if(o.yBase===void 0)return;const d=.6;if(h>=Math.PI/4)return o.yBase-(d+1.6);const f=h*(4/Math.PI);return o.yBase-(d*f+1.6)};return{load:s,disable:()=>{!o.object||(i.scene.remove(o.object),i.needsRender=!0,i.off("cameraDirectionUpdate",r))},enable:()=>{if(!o.object)return;const h=a(i.getPose().latitude);h&&(o.object.position.y=h),i.scene.add(o.object),i.needsRender=!0,i.on("cameraDirectionUpdate",r)}}};function gh(i,t){var c,u,h,d,f;const e=(c=t==null?void 0:t.size)!=null?c:512,n=(u=t==null?void 0:t.fontSize)!=null?u:e*(35/256)*1.2,o=(h=t==null?void 0:t.backgroundColor)!=null?h:"rgba(0,0,0,0)",s=(d=t==null?void 0:t.fontColor)!=null?d:"#fff",r=(f=t==null?void 0:t.textAlign)!=null?f:"center",a=document.createElement("canvas");a.setAttribute("width",e+""),a.setAttribute("height",e+"");const l=a.getContext("2d");return l.fillStyle=o,l.fillRect(0,0,e,e),l.font=`${n}px "\u5FAE\u8F6F\u96C5\u9ED1"`,l.textAlign=r,l.fillStyle=s,l.fillText(i,e/2,e*.7),new V.CanvasTexture(a)}const Ah=({x:i,y:t,z:e})=>new V.Vector3(i,t,e),vh=(i,t)=>{var v,p,A;const e={},n=(v=t.animationEnabled)!=null?v:!0,o=(p=t.position)!=null?p:void 0,s=(A=t.rad)!=null?A:void 0,r=t.fbx_url||"//vrlab-image4.ljcdn.com/release/web/entryDoorMini/Anim_Door1.fbx",a=[],l=y=>N(this,null,function*(){var _,F,q,j,G,O,H,W;const w=(_=y==null?void 0:y.position)!=null?_:o;if(!w)return Promise.reject(new Error("ModelEntryDoorGuidePlugin.load(): position is undefined"));const k=Ah(w),P=(F=y==null?void 0:y.rad)!=null?F:s,C=(q=y==null?void 0:y.fbx_url)!=null?q:r;if(e.rad=P,P===void 0)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): rad is ${P}`));const L=yield new Tn.FBXLoader().loadAsync(C);L.position.copy(k),L.rotation.z=P,L.scale.set(.8,.8,.8),Zs(L,{transparent:!0,side:E.DoubleSide});const x=(H=(O=(G=(j=L.children)==null?void 0:j[0])==null?void 0:G.children)==null?void 0:O[3])==null?void 0:H.clone();if(!x)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): textMesh is ${x}`));const Q=(W=t.name)!=null?W:"\u5165\u6237\u95E8";return x.material=new V.MeshBasicMaterial({transparent:!0,map:gh(Q)}),x.renderOrder=3,L.children[0].add(x),e.object=L,!0}),c=()=>{if(e.animation)return;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.initAnimation(): state.object is ",e.object);const y=1,w=new V.AnimationMixer(e.object);a.push(w);const k=w.clipAction(e.object.animations[0]);k.timeScale=y;let P;const C=()=>{let _=0,F=0;const q=1e3/30,j=G=>{_=requestAnimationFrame(j);const O=G-F;O<q||(F=G,a.forEach(H=>H.update(O/1e3)),i.needsRender=!0)};return _=requestAnimationFrame(j),()=>{cancelAnimationFrame(_)}},Q={play:()=>{P||(k.play(),P=C(),requestAnimationFrame(()=>{e.object&&e.object.rotation.z!==e.rad&&(e.object.rotation.z=e.rad)}))},stop:()=>{k.stop(),P==null||P(),P=void 0}};e.animation=Q},u=y=>{var k;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.enable(): object is ",e.object);((k=y==null?void 0:y.animationEnable)!=null?k:n)&&(e.animation||c(),e.animation.play()),i.scene.add(e.object),i.needsRender=!0},h=()=>{!e.object||(e.animation&&e.animation.stop(),i.scene.remove(e.object),i.needsRender=!0)},d=y=>y==="Floorplan"?u():h();return{load:l,enable:y=>(e.enabled||(e.enabled=!0,d(i.currentMode),i.on("modeChange",d),u(y)),!0),disable:()=>(e.enabled&&(e.enabled=!1,h(),i.off("modeChange",d)),!0)}};class Ki extends hn.default.Tween{constructor(){super(...arguments);m(this,"disposeMethods",[]);m(this,"animationFrameDisposer");m(this,"onDispose",e=>(this.disposeMethods.push(e),this));m(this,"play",()=>(this.start(0),this.animationFrameDisposer=Pn(e=>this.update(e)),this));m(this,"dispose",()=>{var e;this.stop(),(e=this.animationFrameDisposer)==null||e.call(this),this.disposeMethods.forEach(n=>n()),this.disposeMethods=[],hn.default.remove(this)})}}function Ks(i,t=hn.default.Easing.Linear.None){const e=new Ki({progress:0}).to({progress:1});return i!==void 0&&e.duration(i),t!==void 0&&e.easing(t),e}const Cn=window.requestAnimationFrame||(i=>setTimeout(i,16)),bh=window.cancelAnimationFrame||clearTimeout;function si(i,t=0){t<=0?Cn(i):Cn(()=>si(i,t-1))}function Pn(i,t=60){let e=-1,n=0,o=-1;const s=1e3/t;function r(a){o===-1&&(o=a),e=Cn(r),!(a-n<s)&&(n=a,i&&i(a-o))}return e=Cn(r),function(){bh(e)}}function yh(){const i=Date.now();return new Promise(t=>{Cn(()=>{t(Date.now()-i)})})}const wh=Bn.Easing;function Ch(i,t,e,n=wh.Linear.None){const o=new Bn.Tween(i).to(t,e).easing(n);si(()=>o.start(0));const s=Pn(a=>{o.update(a)===!1&&s()}),r=[];return o.onDestroy=a=>(r.push(a),o),o.destroy=function(){this.stop(),Object.assign(o,{_onStartCallback:null,_onUpdateCallback:null,_onCompleteCallback:null,_onStopCallbackL:null});let a;for(;a=r.shift();)a();s()},o}function Ph(i,t){return Ch({progress:0},{progress:1},i,t)}var $s=(i=>(i.Move="Move",i.Rotate="Rotate",i))($s||{}),et=(i=>(i.Clockwise="Clockwise",i.Anticlockwise="Anticlockwise",i.Loop="Loop",i))(et||{});const ri=Math.PI*2;function er(i){return(i%ri+ri)%ri}function tr(i){return i%ri}function $i(i,t,e){return i+(t-i)*e}const eo=(i,t,e)=>{const n=Math.PI,o=n*2;return i=er(i),t=er(t),e===et.Anticlockwise&&i<t&&(i+=o),e===et.Clockwise&&t<i&&(t+=o),e===et.Loop&&t-i>n?eo(i,t,et.Anticlockwise):e===et.Loop&&i-t>n?eo(i,t,et.Clockwise):{from:i,to:t}},Ih=i=>{const t={},e=(l,c,...u)=>N(this,[l,c,...u],function*(s,r,a={preload:!0}){return t.interruptCallback&&t.interruptCallback(!1),a.asyncStartCallback&&(yield a.asyncStartCallback()),s.mode&&s.mode!==i.currentMode&&(yield i.changeMode(s.mode)),a.preload&&s.panoIndex!==void 0&&s.panoIndex!==i.panoIndex&&(yield i.preloadPano(s.panoIndex)),a.asyncEndCallback&&(yield a.asyncEndCallback()),s.panoIndex===void 0&&s.fov===void 0&&s.latitude===void 0&&s.longitude===void 0?!0:yield new Promise((h,d)=>{const f=s.panoIndex!==void 0?s.panoIndex:i.panoIndex;f!==void 0?i.moveToPano(f,Object.assign({duration:r,moveEndCallback:()=>h(!0),moveCancelCallback:()=>d(!1)},s)):d(!1)})}),n=s=>{const r=i.state,a=tr(r.latitude),l=tr(s.latitude),{from:c,to:u}=eo(r.longitude,s.longitude,s.rotation||et.Loop),h=r.fov,d=s.fov;return{from:{latitude:a,longitude:c,fov:h},to:{latitude:l,longitude:u,fov:d}}};return{move:e,rotate:(l,c,...u)=>N(this,[l,c,...u],function*(s,r,a={}){t.interruptCallback&&t.interruptCallback(!1),a.asyncStartCallback&&(yield a.asyncStartCallback()),i.currentMode!==fe.Five.Mode.Panorama&&(yield i.changeMode(fe.Five.Mode.Panorama)),s.panoIndex!==void 0&&s.panoIndex!==i.panoIndex&&(a.preload&&(yield i.preloadPano(s.panoIndex)),yield new Promise((f,g)=>{if(!s.panoIndex){f(!0);return}i.moveToPano(s.panoIndex,{moveEndCallback:()=>f(!0),moveCancelCallback:()=>g(!1)})})),a.asyncEndCallback&&(yield a.asyncEndCallback());const{from:h,to:d}=n(s);return yield new Promise(f=>{const g=({progress:w})=>{const k={};k.longitude=$i(h.longitude,d.longitude,w),k.latitude=$i(h.latitude,d.latitude,w),k.fov=$i(h.fov,d.fov,w),i.setState(k,!0)},v=()=>{f(!0)},p=()=>{f(!1)},A=s.rotateSpeed?Math.ceil(Math.abs(d.longitude-h.longitude)/s.rotateSpeed*1e3):r,y=Ph(A,Bn.Easing.Linear.None).onUpdate(g).onComplete(v).onDestroy(p);s.rotation===et.Loop&&y.repeat(1/0).yoyo(!0),t.interruptCallback=(w=!0)=>{y.destroy(),t.interruptCallback=void 0,t.timeoutId&&(clearTimeout(t.timeoutId),t.timeoutId=void 0),f(w)},t.timeoutId=setTimeout(()=>{t.interruptCallback&&t.interruptCallback(!0)},r)})})}};function nr(i,t){return i.x===t.x&&i.y===t.y}function ir(i,t){return Math.abs(i)===1/0&&Math.abs(t)===1/0?!0:Math.abs(i-t)<.001}function ai(i,t){return(t.y-i.y)/(t.x-i.x)}function or(i,t,e){const n=ai(i[1],i[0]),o=ai(t[1],t[0]);if(isNaN(n)||isNaN(o)||ir(n,o))return!1;if(li(i[0],t))return i[0];if(li(i[1],t))return i[1];if(li(t[0],i))return t[0];if(li(t[1],i))return t[1];if(e&&!Eh(i,t))return!1;const s=i[0],r=t[0];if(Math.abs(n)===1/0)return{x:s.x,y:t[1].y-(t[1].x-s.x)*o};if(Math.abs(o)===1/0)return{x:r.x,y:i[1].y-(i[1].x-r.x)*n};const a=(r.y-s.y+n*s.x-o*r.x)/(n-o),l=n*a-n*s.x+s.y;return{x:a,y:l}}function li(i,t){return nr(i,t[0])||nr(i,t[1])?!0:(t[0].x-i.x)*(i.x-t[1].x)>=0&&(t[0].y-i.y)*(i.y-t[1].y)>=0&&ir(ai(t[0],i),ai(i,t[1]))}function ci(i,t,e){return(i.x-e.x)*(t.y-e.y)-(t.x-e.x)*(i.y-e.y)}function Eh(i,t){return Math.max(i[0].x,i[1].x)>=Math.min(t[0].x,t[1].x)&&Math.max(t[0].x,t[1].x)>=Math.min(i[0].x,i[1].x)&&Math.max(i[0].y,i[1].y)>=Math.min(t[0].y,t[1].y)&&ci(t[0],i[1],i[0])*ci(i[1],t[1],i[0])>0&&ci(i[0],t[1],t[0])*ci(t[1],i[1],t[0])>0?1:0}function sr(i,t=0){t<=0?requestAnimationFrame(i):requestAnimationFrame(()=>sr(i,t-1))}const kh=`<style type="text/css">
|
|
116
116
|
.PanoRulerPlugin-rule-line {
|
|
117
117
|
position: absolute;
|
|
118
118
|
transform-origin: left center;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>CSS3DRender | 如视看房插件合集 - v2.11.0-
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>CSS3DRender | 如视看房插件合集 - v2.11.0-aplha.0</title><meta name="description" content="Documentation for 如视看房插件合集 - v2.11.0-aplha.0"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
|
2
2
|
<div class="tsd-toolbar-contents container">
|
|
3
3
|
<div class="table-cell" id="tsd-search" data-base="..">
|
|
4
4
|
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
<div id="tsd-toolbar-links"></div></div>
|
|
7
7
|
<ul class="results">
|
|
8
8
|
<li class="state loading">Preparing search index...</li>
|
|
9
|
-
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">如视看房插件合集 - v2.11.0-
|
|
9
|
+
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">如视看房插件合集 - v2.11.0-aplha.0</a></div>
|
|
10
10
|
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
|
11
11
|
<div class="container container-main">
|
|
12
12
|
<div class="col-8 col-content">
|
|
13
13
|
<div class="tsd-page-title">
|
|
14
14
|
<ul class="tsd-breadcrumb">
|
|
15
|
-
<li><a href="../modules.html">如视看房插件合集 - v2.11.0-
|
|
15
|
+
<li><a href="../modules.html">如视看房插件合集 - v2.11.0-aplha.0</a></li>
|
|
16
16
|
<li><a href="CSS3DRender.html">CSS3DRender</a></li></ul>
|
|
17
17
|
<h1>Class CSS3DRender</h1></div>
|
|
18
18
|
<section class="tsd-panel tsd-hierarchy">
|
|
@@ -497,7 +497,7 @@
|
|
|
497
497
|
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
|
|
498
498
|
<div class="tsd-accordion-details">
|
|
499
499
|
<ul>
|
|
500
|
-
<li><a href="../modules.html">如视看房插件合集 -<wbr/> v2.11.0-<wbr/>
|
|
500
|
+
<li><a href="../modules.html">如视看房插件合集 -<wbr/> v2.11.0-<wbr/>aplha.0</a>
|
|
501
501
|
<ul>
|
|
502
502
|
<li class="tsd-kind-namespace"><a href="../modules/PanoVideoPluginType.html">Pano<wbr/>Video<wbr/>Plugin<wbr/>Type</a></li>
|
|
503
503
|
<li class="tsd-kind-namespace"><a href="../modules/Util.html">Util</a></li></ul></li></ul></div></details></nav>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>CruisePluginController | 如视看房插件合集 - v2.11.0-
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>CruisePluginController | 如视看房插件合集 - v2.11.0-aplha.0</title><meta name="description" content="Documentation for 如视看房插件合集 - v2.11.0-aplha.0"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
|
2
2
|
<div class="tsd-toolbar-contents container">
|
|
3
3
|
<div class="table-cell" id="tsd-search" data-base="..">
|
|
4
4
|
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
<div id="tsd-toolbar-links"></div></div>
|
|
7
7
|
<ul class="results">
|
|
8
8
|
<li class="state loading">Preparing search index...</li>
|
|
9
|
-
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">如视看房插件合集 - v2.11.0-
|
|
9
|
+
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">如视看房插件合集 - v2.11.0-aplha.0</a></div>
|
|
10
10
|
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
|
11
11
|
<div class="container container-main">
|
|
12
12
|
<div class="col-8 col-content">
|
|
13
13
|
<div class="tsd-page-title">
|
|
14
14
|
<ul class="tsd-breadcrumb">
|
|
15
|
-
<li><a href="../modules.html">如视看房插件合集 - v2.11.0-
|
|
15
|
+
<li><a href="../modules.html">如视看房插件合集 - v2.11.0-aplha.0</a></li>
|
|
16
16
|
<li><a href="CruisePluginController.html">CruisePluginController</a></li></ul>
|
|
17
17
|
<h1>Class CruisePluginController</h1></div>
|
|
18
18
|
<section class="tsd-panel tsd-hierarchy">
|
|
@@ -377,7 +377,7 @@
|
|
|
377
377
|
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
|
|
378
378
|
<div class="tsd-accordion-details">
|
|
379
379
|
<ul>
|
|
380
|
-
<li><a href="../modules.html">如视看房插件合集 -<wbr/> v2.11.0-<wbr/>
|
|
380
|
+
<li><a href="../modules.html">如视看房插件合集 -<wbr/> v2.11.0-<wbr/>aplha.0</a>
|
|
381
381
|
<ul>
|
|
382
382
|
<li class="tsd-kind-namespace"><a href="../modules/PanoVideoPluginType.html">Pano<wbr/>Video<wbr/>Plugin<wbr/>Type</a></li>
|
|
383
383
|
<li class="tsd-kind-namespace"><a href="../modules/Util.html">Util</a></li></ul></li></ul></div></details></nav>
|