@realsee/dnalogel 2.8.4 → 2.8.5
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/PanoTagPlugin/controller/TagComputer.d.ts +5 -5
- package/dist/PanoTagPlugin/typings/tag/TagData.d.ts +4 -0
- package/dist/index.cjs.js +3 -3
- package/dist/index.js +264 -264
- package/dist/index.umd.js +3 -3
- package/docs/assets/search.js +1 -1
- package/docs/classes/CSS3DRender.html +31 -31
- package/docs/classes/CruisePluginController.html +24 -24
- package/docs/classes/Magnifier.html +20 -20
- package/docs/classes/ModelRoomLabelController.html +11 -11
- package/docs/classes/Object3DHelperController.html +24 -24
- package/docs/classes/PaintBrush.html +15 -15
- package/docs/classes/PanoMeasurePluginLine.html +23 -23
- package/docs/classes/PanoMeasurePluginModel.html +22 -22
- package/docs/classes/PanoMeasurePluginPoint.html +14 -14
- package/docs/classes/PanoMeasurePluginPolyline.html +26 -26
- package/docs/classes/PanoTagPluginController.html +72 -72
- package/docs/classes/Util.BetterTween.html +8 -8
- package/docs/classes/Util.FivePointSelector.html +12 -12
- package/docs/classes/Util.Interval.html +12 -12
- package/docs/classes/Util.Magnifier.html +17 -17
- package/docs/classes/Util.PointDomHelper.html +11 -11
- package/docs/classes/Util.PointHelper.html +11 -11
- package/docs/classes/Util.Rectangle.html +13 -13
- package/docs/enums/CameraMovementEffect.html +7 -7
- package/docs/enums/ContentType.html +27 -18
- package/docs/enums/DIRECTION.html +9 -9
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +9 -9
- package/docs/enums/DimensionType.html +7 -7
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +8 -8
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +9 -9
- package/docs/enums/PaintBrushTypeEnum.html +8 -8
- package/docs/enums/PointType.html +7 -7
- package/docs/enums/Rotation.html +8 -8
- package/docs/functions/CSS3DRenderPlugin.html +5 -5
- package/docs/functions/CameraMovementPlugin.html +5 -5
- package/docs/functions/CruisePlugin.html +5 -5
- package/docs/functions/GuideLinePlugin.html +5 -5
- package/docs/functions/ItemLabelPlugin.html +5 -5
- package/docs/functions/MapviewFloorplanPlugin.html +5 -5
- package/docs/functions/ModelChassisCompassPlugin.html +5 -5
- package/docs/functions/ModelEntryDoorGuidePlugin.html +5 -5
- package/docs/functions/ModelFloorplanPlugin.html +5 -5
- package/docs/functions/ModelItemLabelPlugin.html +5 -5
- package/docs/functions/ModelRoomLabelPlugin.html +5 -5
- package/docs/functions/ModelTVVideoPlugin.html +5 -5
- package/docs/functions/ModelViewPlugin.html +5 -5
- package/docs/functions/Object3DHelperPlugin.html +5 -5
- package/docs/functions/PanoCompassPlugin.html +5 -5
- package/docs/functions/PanoCursorRaycasterPlugin.html +5 -5
- package/docs/functions/PanoDoorLabelPlugin.html +5 -5
- package/docs/functions/PanoFloorplanRadarPlugin.html +5 -5
- package/docs/functions/PanoMeasurePlugin.html +5 -5
- package/docs/functions/PanoRulerPlugin.html +5 -5
- package/docs/functions/PanoRulerProPlugin.html +5 -5
- package/docs/functions/PanoSpatialTagPlugin.html +5 -5
- package/docs/functions/PanoTagPlugin.html +10 -10
- package/docs/functions/TopviewFloorplanPlugin.html +5 -5
- package/docs/functions/Util.getCoordsFromClient.html +5 -5
- package/docs/functions/Util.getCoordsFromElement.html +5 -5
- package/docs/functions/Util.getFrameTime.html +5 -5
- package/docs/functions/Util.getIntersectFromRelativePosition.html +5 -5
- package/docs/functions/Util.getRaycasterFromFivePointer.html +5 -5
- package/docs/functions/Util.isNil.html +5 -5
- package/docs/functions/Util.nextFrame.html +5 -5
- package/docs/functions/Util.notNil.html +5 -5
- package/docs/functions/Util.requestAnimationFrameInterval.html +5 -5
- package/docs/functions/Util.tweenProgress.html +5 -5
- package/docs/functions/pluginFlag.html +5 -5
- package/docs/index.html +4 -4
- package/docs/interfaces/AddTagConfig.html +6 -6
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -11
- package/docs/interfaces/CSS3DRenderPluginState.html +8 -8
- package/docs/interfaces/CameraMovementPluginExportType.html +7 -7
- package/docs/interfaces/EventMap.html +19 -19
- package/docs/interfaces/FloorplanBounding.html +8 -8
- package/docs/interfaces/FloorplanData.html +10 -10
- package/docs/interfaces/FloorplanEntrance.html +11 -11
- package/docs/interfaces/FloorplanExtraObject.html +10 -10
- package/docs/interfaces/FloorplanExtraObject3D.html +8 -8
- package/docs/interfaces/FloorplanFloorData.html +9 -9
- package/docs/interfaces/FloorplanImagePosition.html +7 -7
- package/docs/interfaces/FloorplanObserver.html +9 -9
- package/docs/interfaces/FloorplanOutlineItem.html +9 -9
- package/docs/interfaces/FloorplanPosition.html +7 -7
- package/docs/interfaces/FloorplanRoomItem.html +13 -13
- package/docs/interfaces/FloorplanRoomLabelItem.html +7 -7
- package/docs/interfaces/FloorplanServerBounding.html +8 -8
- package/docs/interfaces/FloorplanServerComputedData.html +10 -10
- package/docs/interfaces/FloorplanServerData.html +7 -7
- package/docs/interfaces/FloorplanServerDoorItem.html +10 -10
- package/docs/interfaces/FloorplanServerDoorPosition.html +8 -8
- package/docs/interfaces/FloorplanServerEntrance.html +11 -11
- package/docs/interfaces/FloorplanServerFloorData.html +9 -9
- package/docs/interfaces/FloorplanServerImagePosition.html +7 -7
- package/docs/interfaces/FloorplanServerObserver.html +9 -9
- package/docs/interfaces/FloorplanServerOutlineItem.html +9 -9
- package/docs/interfaces/FloorplanServerPosition.html +7 -7
- package/docs/interfaces/FloorplanServerRoomItem.html +14 -14
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -7
- package/docs/interfaces/HelperOffset.html +8 -8
- package/docs/interfaces/ItemLabelPluginData.html +6 -6
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +11 -11
- package/docs/interfaces/ItemLabelPluginParametersType.html +9 -9
- package/docs/interfaces/MinMax.html +7 -7
- package/docs/interfaces/ModelChassisCompassPluginData.html +7 -7
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +8 -8
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +7 -7
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +8 -8
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +8 -8
- package/docs/interfaces/ModelItemLabelPluginData.html +6 -6
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +11 -11
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +7 -7
- package/docs/interfaces/ModelRoomLabelPluginData.html +6 -6
- package/docs/interfaces/ModelTVVideoPluginData.html +9 -9
- package/docs/interfaces/ModelTVVideoPluginExportType.html +8 -8
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +6 -6
- package/docs/interfaces/ModelViewPluginExportType.html +11 -11
- package/docs/interfaces/Object3DHelperState.html +8 -8
- package/docs/interfaces/ObjectHelperControllers.html +9 -9
- package/docs/interfaces/PaintBrushAction.html +12 -12
- package/docs/interfaces/PaintBrushConfigs.html +12 -12
- package/docs/interfaces/PaintBrushState.html +10 -10
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +10 -10
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +5 -5
- package/docs/interfaces/PanoMeasureParameterType.html +12 -12
- package/docs/interfaces/PanoMeasurePluginLineJson.html +8 -8
- package/docs/interfaces/PanoMeasurePluginOpenParameter.html +7 -7
- package/docs/interfaces/PanoMeasurePluginPointJson.html +7 -7
- package/docs/interfaces/PanoMeasurePluginPolylineJson.html +8 -8
- package/docs/interfaces/PanoRulerPluginExportType.html +10 -10
- package/docs/interfaces/PanoRulerPluginOptions.html +7 -7
- package/docs/interfaces/PanoRulerPluginParameterType.html +8 -8
- package/docs/interfaces/PanoRulerProPluginExportType.html +9 -9
- package/docs/interfaces/PanoRulerProPluginOptions.html +7 -7
- package/docs/interfaces/PanoRulerProPluginParameterType.html +7 -7
- package/docs/interfaces/PanoRulerProPluginState.html +8 -8
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +5 -5
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +5 -5
- package/docs/interfaces/PanoSpatialTagPluginData.html +11 -11
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +13 -13
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +13 -13
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +11 -11
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +10 -10
- package/docs/interfaces/Point.html +8 -8
- package/docs/interfaces/Room.html +9 -9
- package/docs/interfaces/RoomInfo.html +7 -7
- package/docs/interfaces/RoomLabel.html +14 -14
- package/docs/interfaces/RoomRules.html +5 -5
- package/docs/interfaces/Rooms.html +5 -5
- package/docs/interfaces/Scissor.html +9 -9
- package/docs/interfaces/State.html +8 -8
- package/docs/interfaces/TagCache.html +12 -12
- package/docs/interfaces/TagConfig.html +10 -10
- package/docs/interfaces/TagIconUrl.html +9 -9
- package/docs/interfaces/Tags.html +11 -11
- package/docs/interfaces/TemporaryState.html +6 -6
- package/docs/interfaces/Util.MagnifierParameter.html +11 -11
- package/docs/interfaces/Util.MouseGroupParameter.html +8 -8
- package/docs/modules/Util.html +5 -5
- package/docs/modules.html +4 -4
- package/docs/types/ArrayPosition.html +5 -5
- package/docs/types/AudioAppearance.html +5 -5
- package/docs/types/AudioTagTypeConfigKey.html +5 -5
- package/docs/types/CSS3DRenderExportType.html +5 -5
- package/docs/types/CSS3DRenderPluginExportType.html +5 -5
- package/docs/types/CSS3DRenderPluginParameterType.html +5 -5
- package/docs/types/ClassFunctionParameters.html +5 -5
- package/docs/types/Color.html +5 -5
- package/docs/types/ContentTypeConfigKey.html +5 -5
- package/docs/types/ContentTypeConfigKeySplit.html +5 -5
- package/docs/types/ContentTypeMap.html +5 -5
- package/docs/types/Create3DDomContainerReturnType.html +5 -5
- package/docs/types/Create3DElementReturnType.html +5 -5
- package/docs/types/CruisePluginExportType.html +5 -5
- package/docs/types/Direction-1.html +5 -5
- package/docs/types/Direction4.html +5 -5
- package/docs/types/FloorplanRuleLabels.html +5 -5
- package/docs/types/FloorplanServerRuleLabels.html +5 -5
- package/docs/types/GuideLinePluginExportType.html +5 -5
- package/docs/types/HelperEventMap.html +5 -5
- package/docs/types/LoadTagConfig.html +5 -5
- package/docs/types/MapviewFloorplanPluginParameterType.html +5 -5
- package/docs/types/MapviewFloorplanPluginReturnType.html +5 -5
- package/docs/types/MediaData.html +5 -5
- package/docs/types/MediaStore.html +5 -5
- package/docs/types/ModelElement.html +5 -5
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +5 -5
- package/docs/types/ModelFloorplanPluginParameterType.html +5 -5
- package/docs/types/ModelFloorplanPluginReturnType.html +5 -5
- package/docs/types/ModelRoomLabelPluginParameters.html +5 -5
- package/docs/types/ModelRoomLabelPluginReturnType.html +5 -5
- package/docs/types/MoveArgs.html +5 -5
- package/docs/types/MoveOpts.html +5 -5
- package/docs/types/Object3DHelperEventMap.html +5 -5
- package/docs/types/ObjectFit.html +5 -5
- package/docs/types/PaintBrushEventMap.html +5 -5
- package/docs/types/PanoCompassPluginData.html +5 -5
- package/docs/types/PanoCompassPluginExportType.html +5 -5
- package/docs/types/PanoCompassPluginParameterType.html +5 -5
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +5 -5
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +5 -5
- package/docs/types/PanoIndex.html +5 -5
- package/docs/types/PanoMeasurePluginEvent.html +5 -5
- package/docs/types/PanoMeasureReturnType.html +5 -5
- package/docs/types/PanoSpatialTagPluginId.html +5 -5
- package/docs/types/PanoTagPluginExportInterface.html +5 -5
- package/docs/types/PanoTagPluginParamsInterface.html +5 -5
- package/docs/types/PlaneTag.html +5 -5
- package/docs/types/PlaneTagElement.html +5 -5
- package/docs/types/Point2DElement.html +5 -5
- package/docs/types/Point2DTag.html +5 -5
- package/docs/types/Point3DElement.html +5 -5
- package/docs/types/Point3DTag.html +5 -5
- package/docs/types/PointTag.html +5 -5
- package/docs/types/PointTagElement.html +5 -5
- package/docs/types/Position.html +5 -5
- package/docs/types/RotateArgs.html +5 -5
- package/docs/types/RotateOpts.html +5 -5
- package/docs/types/RuleLabelsKey.html +5 -5
- package/docs/types/RuleLabelsValue.html +5 -5
- package/docs/types/StickType.html +5 -5
- package/docs/types/Tag.html +5 -5
- package/docs/types/Tag2D.html +5 -5
- package/docs/types/Tag3D.html +5 -5
- package/docs/types/TagContentType.html +5 -5
- package/docs/types/TagDimensionType.html +5 -5
- package/docs/types/TagElement.html +5 -5
- package/docs/types/TagEvents.html +5 -5
- package/docs/types/TagGLTFObject.html +5 -5
- package/docs/types/TagHooks.html +5 -5
- package/docs/types/TagIconSize.html +5 -5
- package/docs/types/TagId.html +5 -5
- package/docs/types/TagPointType.html +5 -5
- package/docs/types/TopviewFloorplanPluginParameterType.html +5 -5
- package/docs/types/TopviewFloorplanPluginReturnType.html +5 -5
- package/docs/types/WorkCode.html +5 -5
- package/docs/variables/FLOOR_TYPE_MAP.html +5 -5
- package/docs/variables/PLUGIN.html +5 -5
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +5 -5
- package/docs/variables/ROOM_TYPE_MAP.html +5 -5
- package/docs/variables/VERSION.html +5 -5
- package/docs/variables/itemLabelPluginServerParams.html +5 -5
- package/docs/variables/modelItemLabelPluginServerParams.html +5 -5
- package/docs/variables/modelRoomLabelPluginServerParams.html +5 -5
- package/libs/PanoTagPlugin/Components/Tag/LinkTag.js +40 -40
- package/libs/PanoTagPlugin/Components/Tag/index.js +1 -1
- package/libs/PanoTagPlugin/Components/TagItem.js +1 -1
- package/libs/PanoTagPlugin/controller/TagComputer.d.ts +5 -5
- package/libs/PanoTagPlugin/typings/tag/TagData.d.ts +4 -0
- package/libs/PanoTagPlugin/typings/tag/TagData.js +1 -1
- package/libs/floorplan/Components/RoomLabels/RoomLabel.js +44 -44
- package/package.json +1 -1
- package/libs/PanoTagPlugin/mocks/v1/mock-80P6A03eQRQKY3oqLj.d.ts +0 -4
- package/libs/PanoTagPlugin/mocks/v1/mock-80P6A03eQRQKY3oqLj.js +0 -6
- package/libs/PanoTagPlugin/mocks/v1/mock-80QG2vMPboNv5DWrom.d.ts +0 -93
- package/libs/PanoTagPlugin/mocks/v1/mock-80QG2vMPboNv5DWrom.js +0 -5622
- package/libs/PanoTagPlugin/mocks/v1/mock-test3-realsee-cn-4zr0A5.js +0 -1325
- package/libs/PanoTagPlugin/mocks/v1/mock1.d.ts +0 -173
- package/libs/PanoTagPlugin/mocks/v1/mock1.js +0 -122
- package/libs/PanoTagPlugin/mocks/v1/mock2.d.ts +0 -233
- package/libs/PanoTagPlugin/mocks/v1/mock2.js +0 -296
- package/libs/PanoTagPlugin/mocks/v1/mock3.d.ts +0 -22
- package/libs/PanoTagPlugin/mocks/v1/mock3.js +0 -32
- package/libs/PanoTagPlugin/mocks/v1/mock4.d.ts +0 -56
- package/libs/PanoTagPlugin/mocks/v1/mock4.js +0 -60
- package/libs/PanoTagPlugin/mocks/v1/mock5.d.ts +0 -13
- package/libs/PanoTagPlugin/mocks/v1/mock5.js +0 -17
- package/libs/PanoTagPlugin/mocks/v1/mock6.d.ts +0 -16
- package/libs/PanoTagPlugin/mocks/v1/mock6.js +0 -27
- package/libs/PanoTagPlugin/mocks/v1/mock7.d.ts +0 -22
- package/libs/PanoTagPlugin/mocks/v1/mock7.js +0 -228
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 Au extends re{constructor(t){super(),se(this,t,gu,pu,oe,{content:0},mu)}}function vu(i){ue(i,"svelte-ozpg4a",".floorplan-plugin__base-image.svelte-ozpg4a{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}")}function bu(i){let t,e;return t=new hu({props:{url:i[1].url}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.url=n[1].url),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function yu(i){let t,e;return t=new Au({props:{content:i[0]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.content=n[0]),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function wu(i){let t,e,n,o;const s=[yu,bu],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){z(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&&(ae(),D(r[u],1,1,()=>{r[u]=null}),le()),~e?(n=r[e],n?n.p(l,c):(n=r[e]=s[e](l),n.c()),C(n,1),n.m(t,null)):n=null)},i(l){o||(C(n),o=!0)},o(l){D(n),o=!1},d(l){l&&M(t),~e&&r[e].d()}}}function Cu(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 us extends re{constructor(t){super(),se(this,t,Cu,wu,oe,{floorIndex:2,floorplanData:3},vu)}}function Pu(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 Iu(i){let t,e=i[8].outerHTML+"",n;return{c(){t=new Nn(!1),n=pe(),t.a=n},m(o,s){t.m(e,o,s),z(o,n,s)},p(o,s){s&256&&e!==(e=o[8].outerHTML+"")&&t.p(e)},d(o){o&&M(n),o&&t.d()}}}function Eu(i){let t,e,n=i[1]&&ds(i),o=i[0]&&fs(i);return{c(){n&&n.c(),t=ne(),o&&o.c(),e=pe()},m(s,r){n&&n.m(s,r),z(s,t,r),o&&o.m(s,r),z(s,e,r)},p(s,r){s[1]?n?n.p(s,r):(n=ds(s),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null),s[0]?o?o.p(s,r):(o=fs(s),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null)},d(s){n&&n.d(s),s&&M(t),o&&o.d(s),s&&M(e)}}}function ds(i){let t,e=i[2].name+"",n;return{c(){t=T("span"),n=De(e),b(t,"class","floorplan-plugin__room-name")},m(o,s){z(o,t,s),j(t,n)},p(o,s){s&4&&e!==(e=o[2].name+"")&&ze(n,e)},d(o){o&&M(t)}}}function fs(i){let t,e;return{c(){t=T("span"),e=De(i[7]),b(t,"class","floorplan-plugin__room-size svelte-12pzct5")},m(n,o){z(n,t,o),j(t,e)},p(n,o){o&128&&ze(e,n[7])},d(n){n&&M(t)}}}function ku(i){let t,e;function n(r,a){if(r[3]===void 0)return Eu;if(r[8])return Iu}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"),Le(()=>i[19].call(t)),L(t,"left",i[9]),L(t,"top",i[10]),L(t,"font-size",i[11]),L(t,"opacity",i[6]?"1":"0")},m(r,a){z(r,t,a),s&&s.m(t,null),e=ft(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&&L(t,"opacity",r[6]?"1":"0")},i:J,o:J,d(r){r&&M(t),s&&s.d(),e()}}}function xu(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 Du(i,t,e){let n,o,s,r,a,{pxmm:l}=t,{roomAreaEnable:c}=t,{roomNameEnable:u}=t,{room:f}=t,{hoveredRoom:d}=t,{getRoomAreaText:h}=t,{getLabelElement:g}=t,{adaptiveRoomLabelVisibleEnable:A}=t;function p(F,U){if(U.width===0||U.height===0)return()=>!1;const V=F.path.map(({x:me,y:de})=>[me,de]),B=F.roomLabel.position,{x:R,y:_}=B,{width:N,height:te}=U,X=N/2,Z=te/2;return function(de){const ge=R*de,Ee=_*de,Te=V.map(([ce,ve])=>[ce*de,ve*de]);return[[ge+X,Ee-Z],[ge-X,Ee-Z],[ge-X,Ee+Z],[ge+X,Ee+Z]].every(ce=>xu(ce,Te))}}const v=document.body.clientWidth,y=document.body.clientHeight,w=f.roomLabel,P=w.positionInImage.x*100+"%",E=w.positionInImage.y*100+"%",k=(v<500||y<500?10:14)+"px";let S=0,x=0,Q=!1;d.subscribe(function(U){e(16,Q=!!U&&U.id===f.id)});function H(){S=this.clientWidth,x=this.clientHeight,e(4,S),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,f=F.room),"hoveredRoom"in F&&e(13,d=F.hoveredRoom),"getRoomAreaText"in F&&e(14,h=F.getRoomAreaText),"getLabelElement"in F&&e(3,g=F.getLabelElement),"adaptiveRoomLabelVisibleEnable"in F&&e(15,A=F.adaptiveRoomLabelVisibleEnable)},i.$$.update=()=>{i.$$.dirty&48&&console.log("\u{1F436} ==> clientWidth, clientHeight:",S,x),i.$$.dirty&12&&e(8,n=g==null?void 0:g(f)),i.$$.dirty&16388&&e(7,o=f.size?h(f.size):""),i.$$.dirty&48&&e(18,s={width:S,height:x}),i.$$.dirty&262148&&e(17,r=s?p(f,s):void 0),i.$$.dirty&233472&&e(6,a=A?Q?!0:!!(r!=null&&r(l)):!0)},[c,u,f,g,S,x,a,o,n,P,E,k,l,d,h,A,Q,r,s,H]}class Lu extends re{constructor(t){super(),se(this,t,Du,ku,oe,{pxmm:12,roomAreaEnable:0,roomNameEnable:1,room:2,hoveredRoom:13,getRoomAreaText:14,getLabelElement:3,adaptiveRoomLabelVisibleEnable:15},Pu)}}function Su(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 hs(i,t,e){const n=i.slice();return n[12]=t[e],n}function ms(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=hs(i,r,l),u=a(c);n.set(u,e[l]=ps(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"),Le(()=>i[11].call(t))},m(l,c){z(l,t,c);for(let u=0;u<e.length;u+=1)e[u].m(t,null);o=ft(t,i[11].bind(t)),s=!0},p(l,c){c&447&&(r=l[8],ae(),e=Ue(e,c,a,1,l,r,n,t,Ct,ps,null,hs),le())},i(l){if(!s){for(let c=0;c<r.length;c+=1)C(e[c]);s=!0}},o(l){for(let c=0;c<e.length;c+=1)D(e[c]);s=!1},d(l){l&&M(t);for(let c=0;c<e.length;c+=1)e[c].d();o()}}}function ps(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=Be(r,s[a]);return n=new Lu({props:r}),{key:i,first:null,c(){e=pe(),ee(n.$$.fragment),this.first=e},m(a,l){z(a,e,l),K(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||(C(n.$$.fragment,a),o=!0)},o(a){D(n.$$.fragment,a),o=!1},d(a){a&&M(e),$(n,a)}}}function Mu(i){let t,e,n=i[8]&&ms(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[8]?n?(n.p(o,s),s&256&&C(n,1)):(n=ms(o),n.c(),C(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(C(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function zu(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:f}=t,d=0,h=0;function g(){d=this.clientWidth,e(6,d)}return i.$$set=A=>{"floorIndex"in A&&e(9,o=A.floorIndex),"roomAreaEnable"in A&&e(0,s=A.roomAreaEnable),"roomNameEnable"in A&&e(1,r=A.roomNameEnable),"floorplanData"in A&&e(10,a=A.floorplanData),"hoveredRoom"in A&&e(2,l=A.hoveredRoom),"getRoomAreaText"in A&&e(3,c=A.getRoomAreaText),"getLabelElement"in A&&e(4,u=A.getLabelElement),"adaptiveRoomLabelVisibleEnable"in A&&e(5,f=A.adaptiveRoomLabelVisibleEnable)},i.$$.update=()=>{if(i.$$.dirty&1536&&e(8,n=a.floorDatas[o].rooms),i.$$.dirty&1088){const{max:A,min:p}=a.bounding,v=A.x-p.x;e(7,h=d/v)}},[s,r,l,c,u,f,d,h,n,o,a,g]}class Tu extends re{constructor(t){super(),se(this,t,zu,Mu,oe,{floorIndex:9,roomAreaEnable:0,roomNameEnable:1,floorplanData:10,hoveredRoom:2,getRoomAreaText:3,getLabelElement:4,adaptiveRoomLabelVisibleEnable:5},Su)}}function Bu(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 gs(i,t,e){const n=i.slice();return n[11]=t[e],n[13]=e,n}function As(i,t,e){const n=i.slice();return n[14]=t[e],n}function vs(i){let t;return{c(){t=T("div"),b(t,"class","floorplan-plugin__rule-scale svelte-djlmk4"),L(t,"left",i[14].left*100+"%"),L(t,"bottom",i[14].bottom*100+"%")},m(e,n){z(e,t,n)},p:J,d(e){e&&M(t)}}}function bs(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=De(o),r=ne(),b(n,"class","floorplan-plugin__rule-text svelte-djlmk4"),q(n,"is-row",t[2]),b(e,"class","floorplan-plugin__rule-text-item svelte-djlmk4"),L(e,"left",t[11].left*100+"%"),L(e,"bottom",t[11].bottom*100+"%"),this.first=e},m(a,l){z(a,e,l),j(e,n),j(n,s),j(e,r)},p(a,l){t=a,l&2&&o!==(o=t[1](t[11].distance)+"")&&ze(s,o)},d(a){a&&M(e)}}}function ju(i){let t,e,n,o,s,r,a=[],l=new Map,c,u=i[3],f=[];for(let g=0;g<u.length;g+=1)f[g]=vs(As(i,u,g));let d=i[4];const h=g=>g[13];for(let g=0;g<d.length;g+=1){let A=gs(i,d,g),p=h(A);l.set(p,a[g]=bs(p,A))}return{c(){t=T("div"),e=T("div"),n=ne(),o=T("div");for(let g=0;g<f.length;g+=1)f[g].c();s=ne(),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"),q(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"),q(t,"is-row",i[2]),L(t,"width",i[2]?"100%":1/16+"rem"),L(t,"height",i[2]?1/16+"rem":"100%")},m(g,A){z(g,t,A),j(t,e),j(t,n),j(t,o);for(let p=0;p<f.length;p+=1)f[p].m(o,null);j(t,s),j(t,r);for(let p=0;p<a.length;p+=1)a[p].m(r,null)},p(g,[A]){if(A&8){u=g[3];let p;for(p=0;p<u.length;p+=1){const v=As(g,u,p);f[p]?f[p].p(v,A):(f[p]=vs(v),f[p].c(),f[p].m(o,null))}for(;p<f.length;p+=1)f[p].d(1);f.length=u.length}A&22&&(d=g[4],a=Ue(a,A,h,1,g,d,l,r,Fi,bs,null,gs)),A&1&&c!==(c="floorplan-plugin__rule-labels floorplan-plugin__rule-labels--"+g[0]+" svelte-djlmk4")&&b(t,"class",c),A&5&&q(t,"is-row",g[2])},i:J,o:J,d(g){g&&M(t),dt(f,g);for(let A=0;A<a.length;A+=1)a[A].d()}}}const $t=1e3,en=180;function Vu(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,A])=>a?[g.x,A.x]:[g.y,A.y]).flat().sort().filter((g,A,p)=>A===0?!0:g!==p[A-1]),f=u.map(g=>{const A=a?(g-s.min.x-$t+en)/l:0,p=a?0:(g-s.min.y-$t+en)/c;return{left:A,bottom:p}});f.unshift({left:0,bottom:0}),f.push(a?{left:1,bottom:0}:{left:0,bottom:1});const d=u[u.length-1]-u[0],h=u.map((g,A,p)=>{const v=A===0?0:g-p[A-1],y=A===0?0:(g+p[A-1])/2,w=a?(y-s.min.x-$t+en)/l:0,P=a?0:(y-s.min.y-$t+en)/c;return{left:w,bottom:P,distance:v}}).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,f,h,o,s]}class Qu extends re{constructor(t){super(),se(this,t,Vu,ju,oe,{type:0,data:5,bounding:6,getRuleDistanceText:1},Bu)}}function Ou(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 ys(i,t,e){const n=i.slice();return n[13]=t[e][0],n[14]=t[e][1],n}function ws(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=Be(r,s[a]);return n=new Qu({props:r}),{key:i,first:null,c(){e=pe(),ee(n.$$.fragment),this.first=e},m(a,l){z(a,e,l),K(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||(C(n.$$.fragment,a),o=!0)},o(a){D(n.$$.fragment,a),o=!1},d(a){a&&M(e),$(n,a)}}}function Fu(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=ys(i,s,a),c=r(l);n.set(c,e[a]=ws(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"),L(t,"width",i[3]),L(t,"height",i[2])},m(a,l){z(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],ae(),e=Ue(e,l,r,1,a,s,n,t,Ct,ws,null,ys),le()),l&8&&L(t,"width",a[3]),l&4&&L(t,"height",a[2])},i(a){if(!o){for(let l=0;l<s.length;l+=1)C(e[l]);o=!0}},o(a){for(let l=0;l<e.length;l+=1)D(e[l]);o=!1},d(a){a&&M(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}const Cs=1e3,Ps=180;function Ru(i,t,e){let n,o,s,r,a,l,c,u,f,d,{floorIndex:h}=t,{floorplanData:g}=t,{getRuleDistanceText:A}=t;return i.$$set=p=>{"floorIndex"in p&&e(5,h=p.floorIndex),"floorplanData"in p&&e(6,g=p.floorplanData),"getRuleDistanceText"in p&&e(0,A=p.getRuleDistanceText)},i.$$.update=()=>{i.$$.dirty&64&&e(1,n=g.bounding),i.$$.dirty&96&&e(11,o=g.floorDatas[h].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-(Cs-Ps)*2),i.$$.dirty&2&&e(8,u=n.max.y-n.min.y-(Cs-Ps)*2),i.$$.dirty&1536&&e(3,f=c/a*100+"%"),i.$$.dirty&384&&e(2,d=u/l*100+"%")},[A,n,d,f,r,h,g,l,u,a,c,o,s]}class Gu extends re{constructor(t){super(),se(this,t,Ru,Fu,oe,{floorIndex:5,floorplanData:6,getRuleDistanceText:0},Ou)}}function $n(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 Is({x:i,y:t},e){const{max:n,min:o}=e;return{x:i-o.x,y:n.y-t}}function Nu(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 Wu(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 Hu(i,t){return Math.max(...t.work.observers.map(n=>i.z>=n.standingPosition.z?n.floorIndex:0))}function _u(i){let t;return{c(){t=Ce("path"),b(t,"d",i[0]),b(t,"fill","#2F313A")},m(e,n){z(e,t,n)},p(e,[n]){n&1&&b(t,"d",e[0])},i:J,o:J,d(e){e&&M(t)}}}function Xu(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=$n(o,{needZ:!0}))},[n,o]}class Yu extends re{constructor(t){super(),se(this,t,Xu,_u,oe,{path:1})}}function Uu(i){let t,e,n,o,s,r;return{c(){t=Ce("defs"),e=Ce("pattern"),n=Ce("rect"),o=Ce("path"),s=ne(),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){z(a,t,l),j(t,e),j(e,n),j(e,o),z(a,s,l),z(a,r,l)},p(a,[l]){l&1&&b(r,"d",a[0])},i:J,o:J,d(a){a&&M(t),a&&M(s),a&&M(r)}}}const Ni=6;function Ju(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=$n(o,{needZ:!0}))},[n,s,r,o]}class Zu extends re{constructor(t){super(),se(this,t,Ju,Uu,oe,{path:3})}}function qu(i){let t,e,n,o,s,r,a,l,c,u,f;return{c(){t=Ce("defs"),e=Ce("pattern"),n=Ce("rect"),o=Ce("pattern"),s=Ce("rect"),r=ne(),a=Ce("path"),l=ne(),c=Ce("path"),u=ne(),f=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(f,"d",i[0]),b(f,"fill","url(#room-material-pattern-2)")},m(d,h){z(d,t,h),j(t,e),j(e,n),j(t,o),j(o,s),z(d,r,h),z(d,a,h),z(d,l,h),z(d,c,h),z(d,u,h),z(d,f,h)},p(d,[h]){h&1&&b(a,"d",d[0]),h&1&&b(c,"d",d[0]),h&1&&b(f,"d",d[0])},i:J,o:J,d(d){d&&M(t),d&&M(r),d&&M(a),d&&M(l),d&&M(c),d&&M(u),d&&M(f)}}}function Ku(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=$n(o,{needZ:!0}))},[n,o]}class $u extends re{constructor(t){super(),se(this,t,Ku,qu,oe,{path:1})}}function ed(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 Es(i,t,e){const n=i.slice();return n[5]=t[e],n}function td(i){let t,e;return t=new Zu({props:{path:i[5].path}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.path=n[5].path),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function nd(i){let t,e;return t=new $u({props:{path:i[5].path}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.path=n[5].path),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function id(i){let t,e;return t=new Yu({props:{path:i[5].path}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.path=n[5].path),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function ks(i){let t,e,n,o;const s=[id,nd,td],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){z(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):(ae(),D(r[u],1,1,()=>{r[u]=null}),le(),n=r[e],n?n.p(l,c):(n=r[e]=s[e](l),n.c()),C(n,1),n.m(t,null))},i(l){o||(C(n),o=!0)},o(l){D(n),o=!1},d(l){l&&M(t),r[e].d()}}}function od(i){let t,e,n=i[0],o=[];for(let r=0;r<n.length;r+=1)o[r]=ks(Es(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){z(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=Es(r,n,l);o[l]?(o[l].p(c,a),C(o[l],1)):(o[l]=ks(c),o[l].c(),C(o[l],1),o[l].m(t,null))}for(ae(),l=n.length;l<o.length;l+=1)s(l);le()}},i(r){if(!e){for(let a=0;a<n.length;a+=1)C(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&&M(t),dt(o,r)}}}function sd(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=>Ae(G({},l),{path:l.path.map(c=>Is(c,s.bounding))})))},[n,r,a,o,s]}class rd extends re{constructor(t){super(),se(this,t,sd,od,oe,{floorIndex:3,floorplanData:4},ed)}}function ad(i){ue(i,"svelte-19uvvss","path.svelte-19uvvss{opacity:0}path.svelte-19uvvss:hover{opacity:0.1}")}function ld(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){z(o,t,s),e||(n=[Pe(t,"mouseenter",i[0]),Pe(t,"mouseleave",i[1])],e=!0)},p:J,i:J,o:J,d(o){o&&M(t),e=!1,ut(n)}}}function cd(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=$n(n.path,{needZ:!0,format:u=>Is(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 ud extends re{constructor(t){super(),se(this,t,cd,ld,oe,{room:3,floorplanData:4,hoveredRoom:5},ad)}}function dd(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 xs(i,t,e){const n=i.slice();return n[5]=t[e],n}function Ds(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=Be(r,s[a]);return n=new ud({props:r}),{key:i,first:null,c(){e=pe(),ee(n.$$.fragment),this.first=e},m(a,l){z(a,e,l),K(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||(C(n.$$.fragment,a),o=!0)},o(a){D(n.$$.fragment,a),o=!1},d(a){a&&M(e),$(n,a)}}}function fd(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=xs(i,r,l),u=a(c);o.set(u,n[l]=Ds(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){z(l,t,c),j(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,ae(),n=Ue(n,c,a,1,l,r,o,e,Ct,Ds,null,xs),le())},i(l){if(!s){for(let c=0;c<r.length;c+=1)C(n[c]);s=!0}},o(l){for(let c=0;c<n.length;c+=1)D(n[c]);s=!1},d(l){l&&M(t);for(let c=0;c<n.length;c+=1)n[c].d()}}}function hd(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 Ls extends re{constructor(t){super(),se(this,t,hd,fd,oe,{floorIndex:0,floorplanData:1,hoveredRoom:2},dd)}}function md(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 Ss(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=Be(o,n[s]);return t=new Ls({props:o}),{c(){ee(t.$$.fragment)},m(s,r){K(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||(C(t.$$.fragment,s),e=!0)},o(s){D(t.$$.fragment,s),e=!1},d(s){$(t,s)}}}function Ms(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=Be(o,n[s]);return t=new Tu({props:o}),{c(){ee(t.$$.fragment)},m(s,r){K(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||(C(t.$$.fragment,s),e=!0)},o(s){D(t.$$.fragment,s),e=!1},d(s){$(t,s)}}}function zs(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=Be(o,n[s]);return t=new Gu({props:o}),{c(){ee(t.$$.fragment)},m(s,r){K(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||(C(t.$$.fragment,s),e=!0)},o(s){D(t.$$.fragment,s),e=!1},d(s){$(t,s)}}}function pd(i){let t,e,n,o,s,r,a,l,c;const u=[{floorIndex:i[1],floorplanData:i[7]}];let f={};for(let v=0;v<u.length;v+=1)f=Be(f,u[v]);e=new rd({props:f});let d=i[2]&&Ss(i);const h=[{floorplanData:i[7],floorIndex:i[1]}];let g={};for(let v=0;v<h.length;v+=1)g=Be(g,h[v]);s=new us({props:g});let A=i[3]&&Ms(i),p=i[6]&&zs(i);return{c(){t=T("div"),ee(e.$$.fragment),n=ne(),d&&d.c(),o=ne(),ee(s.$$.fragment),r=ne(),A&&A.c(),a=ne(),p&&p.c(),b(t,"class",l=Qe(`floorplan-plugin__floor${i[0]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz")},m(v,y){z(v,t,y),K(e,t,null),j(t,n),d&&d.m(t,null),j(t,o),K(s,t,null),j(t,r),A&&A.m(t,null),j(t,a),p&&p.m(t,null),c=!0},p(v,[y]){const w=y&130?Fe(u,[{floorIndex:v[1],floorplanData:v[7]}]):{};e.$set(w),v[2]?d?(d.p(v,y),y&4&&C(d,1)):(d=Ss(v),d.c(),C(d,1),d.m(t,o)):d&&(ae(),D(d,1,1,()=>{d=null}),le());const P=y&130?Fe(h,[{floorplanData:v[7],floorIndex:v[1]}]):{};s.$set(P),v[3]?A?(A.p(v,y),y&8&&C(A,1)):(A=Ms(v),A.c(),C(A,1),A.m(t,a)):A&&(ae(),D(A,1,1,()=>{A=null}),le()),v[6]?p?(p.p(v,y),y&64&&C(p,1)):(p=zs(v),p.c(),C(p,1),p.m(t,null)):p&&(ae(),D(p,1,1,()=>{p=null}),le()),(!c||y&1&&l!==(l=Qe(`floorplan-plugin__floor${v[0]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz"))&&b(t,"class",l)},i(v){c||(C(e.$$.fragment,v),C(d),C(s.$$.fragment,v),C(A),C(p),c=!0)},o(v){D(e.$$.fragment,v),D(d),D(s.$$.fragment,v),D(A),D(p),c=!1},d(v){v&&M(t),$(e),d&&d.d(),$(s),A&&A.d(),p&&p.d()}}}function gd(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:f}=t,{getLabelElement:d}=t,{getRuleDistanceText:h}=t,{adaptiveRoomLabelVisibleEnable:g}=t;const A=Gi(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,f=p.getRoomAreaText),"getLabelElement"in p&&e(9,d=p.getLabelElement),"getRuleDistanceText"in p&&e(10,h=p.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in p&&e(11,g=p.adaptiveRoomLabelVisibleEnable)},[n,o,s,r,a,l,c,u,f,d,h,g,A]}class Ad extends re{constructor(t){super(),se(this,t,gd,pd,oe,{isCurrent:0,floorIndex:1,hoverEnable:2,roomLabelsEnable:3,roomAreaEnable:4,roomNameEnable:5,ruleLabelsEnable:6,floorplanData:7,getRoomAreaText:8,getLabelElement:9,getRuleDistanceText:10,adaptiveRoomLabelVisibleEnable:11},md)}}function vd(i){ue(i,"svelte-86bqav",".floorplan-main.svelte-86bqav{width:100%;height:100%;pointer-events:none}")}function Ts(i,t,e){const n=i.slice();return n[18]=t[e],n}function Bs(i){let t,e,n,o,s,r,a=i[11].floorDatas,l=[];for(let h=0;h<a.length;h+=1)l[h]=js(Ts(i,a,h));const c=h=>D(l[h],1,1,()=>{l[h]=null}),u=[{panoIndex:i[3],floorplanData:i[11],lastPanoramaLongitude:i[12],cameraImageUrl:i[13]}];let f={};for(let h=0;h<u.length;h+=1)f=Be(f,u[h]);n=new nu({props:f});let d=i[6]&&Vs(i);return{c(){t=T("div");for(let h=0;h<l.length;h+=1)l[h].c();e=ne(),ee(n.$$.fragment),o=ne(),d&&d.c(),b(t,"class","floorplan-main svelte-86bqav")},m(h,g){z(h,t,g);for(let A=0;A<l.length;A+=1)l[A].m(t,null);j(t,e),K(n,t,null),j(t,o),d&&d.m(t,null),r=!0},p(h,g){if(i=h,g&249776){a=i[11].floorDatas;let p;for(p=0;p<a.length;p+=1){const v=Ts(i,a,p);l[p]?(l[p].p(v,g),C(l[p],1)):(l[p]=js(v),l[p].c(),C(l[p],1),l[p].m(t,e))}for(ae(),p=a.length;p<l.length;p+=1)c(p);le()}const A=g&14344?Fe(u,[{panoIndex:i[3],floorplanData:i[11],lastPanoramaLongitude:i[12],cameraImageUrl:i[13]}]):{};n.$set(A),i[6]?d?(d.p(i,g),g&64&&C(d,1)):(d=Vs(i),d.c(),C(d,1),d.m(t,null)):d&&(ae(),D(d,1,1,()=>{d=null}),le())},i(h){if(!r){for(let g=0;g<a.length;g+=1)C(l[g]);C(n.$$.fragment,h),C(d),s||Le(()=>{s=Mt(t,zt,{duration:i[0],easing:vt}),s.start()}),r=!0}},o(h){l=l.filter(Boolean);for(let g=0;g<l.length;g+=1)D(l[g]);D(n.$$.fragment,h),D(d),r=!1},d(h){h&&M(t),dt(l,h),$(n),d&&d.d()}}}function js(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=Be(o,n[s]);return t=new Ad({props:o}),{c(){ee(t.$$.fragment)},m(s,r){K(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||(C(t.$$.fragment,s),e=!0)},o(s){D(t.$$.fragment,s),e=!1},d(s){$(t,s)}}}function Vs(i){let t,e;return t=new cu({props:{floorplanData:i[11],northDesc:i[2]}}),{c(){ee(t.$$.fragment)},m(n,o){K(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||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function bd(i){let t,e,n=i[1]&&Bs(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&C(n,1)):(n=Bs(o),n.c(),C(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(C(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function yd(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:f}=t,{roomNameEnable:d}=t,{ruleLabelsEnable:h}=t,{floorplanData:g}=t,{lastPanoramaLongitude:A}=t,{cameraImageUrl:p}=t,{getRoomAreaText:v}=t,{getLabelElement:y}=t,{getRuleDistanceText:w}=t,{adaptiveRoomLabelVisibleEnable:P}=t;return i.$$set=E=>{"duration"in E&&e(0,n=E.duration),"visible"in E&&e(1,o=E.visible),"northDesc"in E&&e(2,s=E.northDesc),"panoIndex"in E&&e(3,r=E.panoIndex),"floorIndex"in E&&e(4,a=E.floorIndex),"hoverEnable"in E&&e(5,l=E.hoverEnable),"compassEnable"in E&&e(6,c=E.compassEnable),"roomLabelsEnable"in E&&e(7,u=E.roomLabelsEnable),"roomAreaEnable"in E&&e(8,f=E.roomAreaEnable),"roomNameEnable"in E&&e(9,d=E.roomNameEnable),"ruleLabelsEnable"in E&&e(10,h=E.ruleLabelsEnable),"floorplanData"in E&&e(11,g=E.floorplanData),"lastPanoramaLongitude"in E&&e(12,A=E.lastPanoramaLongitude),"cameraImageUrl"in E&&e(13,p=E.cameraImageUrl),"getRoomAreaText"in E&&e(14,v=E.getRoomAreaText),"getLabelElement"in E&&e(15,y=E.getLabelElement),"getRuleDistanceText"in E&&e(16,w=E.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in E&&e(17,P=E.adaptiveRoomLabelVisibleEnable)},[n,o,s,r,a,l,c,u,f,d,h,g,A,p,v,y,w,P]}class Wi extends re{constructor(t){super(),se(this,t,yd,bd,oe,{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},vd)}}const wd="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 Cd(i){return W(this,null,function*(){const t=new Headers({"Content-Type":"text/plain"}),e=function(o){return W(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 Pd(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 Id(i){return{floorName:i.floor_name,floorIndex:i.floor_index,rooms:i.rooms.map(Pd),rules:i.rules}}function Ed(i){return{index:i.index,floorIndex:i.floor_index,position:i.position,positionInImage:i.position_in_image}}function kd(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 Et(i){return W(this,null,function*(){const t=yield Cd(i.outlines),e=i.computed_data.bounding,n=i.computed_data.floor_datas.map(Id),o=i.computed_data.entrance?kd(i.computed_data.entrance):null;return{outlines:t,entrance:o,bounding:e,floorDatas:n,observers:i.computed_data.observers.map(Ed)}})}function xd(i,t,e){return i.map(o=>{const s=o.position,r=o.icon?o.icon:{url:wd,width:45,height:48},a=Hu(s,t),l=Nu(s,e),c=Wu(l,e);return{floorIndex:a,icon:r,id:o.id,position:l,positionInImage:c}})}function Dd(i,t){return t(i),i}function ei(i,t){return Dd({},e=>{for(const n in i)t.indexOf(n)===-1&&(e[n]=i[n])})}function Qs(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 Hi(i,t,e=Pt.BOUNDING_CENTER){const n=Qs(i,t),o=Qs(i,t+1);return e===Pt.BOUNDING_CENTER?(i.model.bounding.max.y+i.model.bounding.min.y)/2:e===Pt.CEILING?o:n}function _i(i,t,e,n){const o=Hi(i,e,n==null?void 0:n.attachedTo),s=new I.Vector3(0,o,0),r=new I.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 ti{constructor(t,e){m(this,"five");m(this,"hooks",new Rt);m(this,"staticPrefix","//vrlab-static.ljcdn.com");this.five=t,e!=null&&e.staticPrefix&&(this.staticPrefix=e.staticPrefix)}getCurrentState(){return this.state}}class Tt extends ti{}var _e=(i=>(i.UnknownError="UnknownError",i.DataNotLoaded="DataNotLoaded",i.BreakOffByHide="BreakOffByHide",i.BreakOffByDisable="BreakOffByDisable",i.ModelNotLoaded="ModelNotLoaded",i.ChangeModeError="ChangeModeError",i.UpdateCameraError="UpdateCameraError",i))(_e||{});const Os=500,Ld=80;function Xi(i,t,e=4){return Math.floor(i*Math.pow(10,e))===Math.floor(t*Math.pow(10,e))}function Fs(i,t){return W(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 f=l[c];return typeof u=="number"&&typeof f=="number"?Xi(u,f,2):u===f}):!0})()||n(new Error("five pose \u4E0E\u9884\u671F\u4E0D\u7B26")),e()})})})}function Yi(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!(!Xi(e,s,2)||!Xi(n,r,2)||o!==a)}function Rs(i,t,e=!0){return W(this,null,function*(){if(Yi(i,t)===!0)return;const o=i.getCurrentState();if(o.mode!==t.mode){const[u]=yield Jn(Fs(i,[t.mode,t,void 0,e]));if(u)throw new Error(_e.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 Jn(i.updateCamera(t,l,e));if(c)throw new Error(_e.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 Sd(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 Md(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 zd extends Tt{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)=>W(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)=>W(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||!Yi(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=_i(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,_e.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=>W(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.five.model)!=null&&r.loaded))throw new Error(_e.ModelNotLoaded);if(!this.data)throw new Error(_e.DataNotLoaded);this.isHiddenByHideFunc=!1;const n={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},o=G(G({},n),e),s=()=>W(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 Jn(Rs(this.five,this.showState,o.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(_e.UnknownError);this.updateSize(),this.floorIndex=o.floorIndex,this.five.model.show(this.floorIndex);const u=o.modelOpacity,f=o.immediately?0:Os;tn(this.five,u,f),this.render(f)});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,_e.BreakOffByHide),this.showPromise=void 0;const o=G(G({},{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||Md(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();Sd(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:Ld/((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:It,attachedTo:Pt.BOUNDING_CENTER,getLabelElement:void 0,getRoomAreaText:l=>(l/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:l=>l.toString()},s=n?ei(n,["selector","scale"]):{},r=G(G({},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 W(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 Et(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 W(this,null,function*(){return yield Et(e.data)})}updateState(e,n){const o=this.state,s=e.config?G(G({},o.config),e.config):o.config;this.state=Ae(G(G({},this.state),e),{config:s}),!et(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=Ae(G({},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 Wi({target:this.container,intro:!0,props:n})}}const Td=(i,t)=>new zd(i,t);function Bd(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 jd(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 Vd extends Tt{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)=>W(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)=>W(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||!Yi(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=_i(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,_e.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=>W(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.five.model)!=null&&r.loaded))throw new Error(_e.ModelNotLoaded);if(!this.data)throw new Error(_e.DataNotLoaded);this.isHiddenByHideFunc=!1;const n={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},o=G(G({},n),e),s=()=>W(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 Jn(Rs(this.five,this.showState,o.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(_e.UnknownError);this.updateSize(),this.updatePosition(),this.floorIndex=o.floorIndex,this.five.model.show(this.floorIndex);const u=o.modelOpacity,f=o.immediately?0:Os;tn(this.five,u,f),this.render(f)});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,_e.BreakOffByHide),this.showPromise=void 0;const o=G(G({},{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(),Bd(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:(jd(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:It,attachedTo:Pt.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:a=>(a/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:a=>a.toString()},s=n?ei(n,["selector","scale"]):{},r=G(G({},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 W(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 Et(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=Hi(this.five,this.floorIndex,this.state.config.attachedTo),n=(a=this.five.model)==null?void 0:a.bounding.getCenter(new I.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 W(this,null,function*(){return yield Et(e.data)})}updateState(e,n){const o=this.state,s=e.config?G(G({},o.config),e.config):o.config;this.state=Ae(G(G({},this.state),e),{config:s}),!et(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=Ae(G({},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 Wi({target:this.container,intro:!0,props:n})}}const Qd=(i,t)=>new Vd(i,t);class Od extends Tt{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=_i(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:It,attachedTo:Pt.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:a=>(a/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:a=>a.toString()},s=n?ei(n,["selector","scale"]):{},r=G(G({},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 W(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 Et(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=Hi(this.five,this.floorIndex,this.state.config.attachedTo),n=(a=this.five.model)==null?void 0:a.bounding.getCenter(new I.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 W(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 W(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 W(this,null,function*(){return yield Et(e.data)})}_show(e){return W(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 Fs(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 W(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?G(G({},o.config),e.config):o.config;this.state=Ae(G(G({},this.state),e),{config:s}),!et(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=Ae(G({},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 Wi({target:this.container,intro:!0,props:n})}}const Fd=(i,t)=>new Od(i,t);function Ui(i,t=200){let e;return function(...n){e||(i(...n),e=setTimeout(function(){e=null},t))}}function Rd(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 Gd(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"),L(n,"background-image","url("+(i[0]||It)+")"),L(n,"transform",i[1]),b(e,"class","plugin-radar__camera-position svelte-1nqrlxd"),L(e,"transform",i[2]),b(t,"class","plugin-radar__camera-wrapper svelte-1nqrlxd")},m(o,s){z(o,t,s),j(t,e),j(e,n)},p(o,[s]){s&1&&L(n,"background-image","url("+(o[0]||It)+")"),s&2&&L(n,"transform",o[1]),s&4&&L(e,"transform",o[2])},i:J,o:J,d(o){o&&M(t)}}}function Nd(i){return`rotate(${Math.floor(i/Math.PI*180)*-1+45}deg)`}function Wd(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 f(g,A){const p=g.bounding,v=g.observers[A];if(!v)return"";const y=(p.max.x-p.min.x)*r,w=(p.max.y-p.min.y)*r,P=Math.floor(v.positionInImage.x*y),E=Math.floor(v.positionInImage.y*w);return`translate(${P}px, ${E}px)`}function d(g){e(6,c=g)}const h=Ui(g=>{e(7,u=g.longitude)},1e3/60);return $e(()=>(s.on("panoWillArrive",d),s.on("cameraDirectionUpdate",h),function(){s.off("panoWillArrive",d),s.off("cameraDirectionUpdate",h)})),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=f(a,c)),i.$$.dirty&128&&e(1,o=Nd(u))},[l,o,n,s,r,a,c,u]}class Hd extends re{constructor(t){super(),se(this,t,Wd,Gd,oe,{five:3,pxmm:4,floorplanData:5,cameraImageUrl:0},Rd)}}function _d(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 Gs(i,t,e){const n=i.slice();return n[1]=t[e],n}function Ns(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=ne(),b(n,"class","plugin-pano-floorplan__extra-object-item svelte-1i87fz7"),L(n,"background-image",`url(${t[1].icon.url})`),L(n,"width",o),L(n,"height",s),b(e,"class","plugin-pano-floorplan__extra-object-item--position svelte-1i87fz7"),L(e,"top",a),L(e,"left",l),this.first=e},m(c,u){z(c,e,u),j(e,n),j(e,r)},p(c,u){t=c,u&1&&L(n,"background-image",`url(${t[1].icon.url})`),u&1&&o!==(o=`${t[1].icon.width/16}rem`)&&L(n,"width",o),u&1&&s!==(s=`${t[1].icon.height/16}rem`)&&L(n,"height",s),u&1&&a!==(a=`${t[1].positionInImage.y*100}%`)&&L(e,"top",a),u&1&&l!==(l=`${t[1].positionInImage.x*100}%`)&&L(e,"left",l)},d(c){c&&M(e)}}}function Xd(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=Gs(i,o,r),l=s(a);n.set(l,e[r]=Ns(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){z(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,Fi,Ns,null,Gs))},i:J,o:J,d(r){r&&M(t);for(let a=0;a<e.length;a+=1)e[a].d()}}}function Yd(i,t,e){let{extraObjects:n=[]}=t;return i.$$set=o=>{"extraObjects"in o&&e(0,n=o.extraObjects)},[n]}class Ud extends re{constructor(t){super(),se(this,t,Yd,Xd,oe,{extraObjects:0},_d)}}function Ws(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=Be(o,n[s]);return t=new Ls({props:o}),{c(){ee(t.$$.fragment)},m(s,r){K(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||(C(t.$$.fragment,s),e=!0)},o(s){D(t.$$.fragment,s),e=!1},d(s){$(t,s)}}}function Jd(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=Be(l,a[u]);t=new us({props:l}),n=new Ud({props:{extraObjects:i[5]}});let c=i[3]&&Ws(i);return{c(){ee(t.$$.fragment),e=ne(),ee(n.$$.fragment),o=ne(),c&&c.c(),s=pe()},m(u,f){K(t,u,f),z(u,e,f),K(n,u,f),z(u,o,f),c&&c.m(u,f),z(u,s,f),r=!0},p(u,[f]){const d=f&20?Fe(a,[{floorIndex:u[2],floorplanData:u[4]}]):{};t.$set(d);const h={};f&32&&(h.extraObjects=u[5]),n.$set(h),u[3]?c?(c.p(u,f),f&8&&C(c,1)):(c=Ws(u),c.c(),C(c,1),c.m(s.parentNode,s)):c&&(ae(),D(c,1,1,()=>{c=null}),le())},i(u){r||(C(t.$$.fragment,u),C(n.$$.fragment,u),C(c),r=!0)},o(u){D(t.$$.fragment,u),D(n.$$.fragment,u),D(c),r=!1},d(u){$(t,u),u&&M(e),$(n,u),u&&M(o),c&&c.d(u),u&&M(s)}}}function Zd(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=f=>{"five"in f&&e(0,o=f.five),"pxmm"in f&&e(1,s=f.pxmm),"floorIndex"in f&&e(2,r=f.floorIndex),"hoverEnable"in f&&e(3,a=f.hoverEnable),"floorplanData"in f&&e(4,l=f.floorplanData),"extraObjects"in f&&e(7,c=f.extraObjects)},i.$$.update=()=>{i.$$.dirty&132&&e(5,n=c==null?void 0:c.filter(f=>f.floorIndex===r))},[o,s,r,a,l,n,u,c]}class qd extends re{constructor(t){super(),se(this,t,Zd,Jd,oe,{five:0,pxmm:1,floorIndex:2,hoverEnable:3,floorplanData:4,extraObjects:7})}}function Kd(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 Hs(i){let t,e,n,o=i[6]!==0&&_s(i);return{c(){t=T("div"),o&&o.c(),b(t,"class","plugin-floorplan-radar svelte-1mvqyqq"),Le(()=>i[12].call(t))},m(s,r){z(s,t,r),o&&o.m(t,null),e=ft(t,i[12].bind(t)),n=!0},p(s,r){s[6]!==0?o?(o.p(s,r),r&64&&C(o,1)):(o=_s(s),o.c(),C(o,1),o.m(t,null)):o&&(ae(),D(o,1,1,()=>{o=null}),le())},i(s){n||(C(o),n=!0)},o(s){D(o),n=!1},d(s){s&&M(t),o&&o.d(),e()}}}function _s(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=Be(c,l[d]);e=new qd({props:c});const u=[{pxmm:i[9],five:i[0],floorplanData:i[3],cameraImageUrl:i[4]}];let f={};for(let d=0;d<u.length;d+=1)f=Be(f,u[d]);return o=new Hd({props:f}),{c(){t=T("div"),ee(e.$$.fragment),n=ne(),ee(o.$$.fragment),b(t,"class","plugin-floorplan-radar-container svelte-1mvqyqq"),L(t,"width",s),L(t,"height",r)},m(d,h){z(d,t,h),K(e,t,null),j(t,n),K(o,t,null),a=!0},p(d,h){const g=h&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 A=h&537?Fe(u,[{pxmm:d[9],five:d[0],floorplanData:d[3],cameraImageUrl:d[4]}]):{};o.$set(A),h&256&&s!==(s=`${d[8]}px`)&&L(t,"width",s),h&2048&&r!==(r=`${d[11]}px`)&&L(t,"height",r)},i(d){a||(C(e.$$.fragment,d),C(o.$$.fragment,d),a=!0)},o(d){D(e.$$.fragment,d),D(o.$$.fragment,d),a=!1},d(d){d&&M(t),$(e),$(o)}}}function $d(i){let t,e,n=i[1]&&Hs(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&C(n,1)):(n=Hs(o),n.c(),C(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(C(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function ef(i,t,e){var v,y;let{five:n}=t,{visible:o}=t,{hoverEnable:s}=t,{floorplanData:r}=t,{cameraImageUrl:a}=t,{extraObjects:l=[]}=t,c=0,u=(y=(v=n.work.observers[n.getCurrentState().panoIndex])==null?void 0:v.floorIndex)!=null?y:0,f=0,d=0,h=0,g=0;function A(w){e(10,u=n.work.observers[w].floorIndex)}$e(()=>(n.on("panoArrived",A),()=>{n.off("panoArrived",A)}));function p(){f=this.clientWidth,d=this.clientHeight,e(6,f),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(f,d),{max:P,min:E}=r.bounding,k=P.x-E.x,S=P.y-E.y,x=function(){return k>S?[w,w/k*S]:[w/S*k,w]}();e(8,h=x[0]),e(11,g=x[1]),e(9,c=h/k)}},[n,o,s,r,a,l,f,d,h,c,u,g,p]}class tf extends re{constructor(t){super(),se(this,t,ef,$d,oe,{five:0,visible:1,hoverEnable:2,floorplanData:3,cameraImageUrl:4,extraObjects:5},Kd)}}class nf extends Tt{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:It},s=n!=null&&n.configs?n.configs:{},r=G(G({},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 W(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 Et(a),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,l),n&&this.updateState(n,o),this.render()})}show(){return W(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 W(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=xd(e,this.five,this.data),this.render())}formatData(e){return W(this,null,function*(){return yield Et(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=G(G({},this.state),e),!et(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=Ae(G({},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 tf({target:this.wrapper,props:e})}}const of=(i,t)=>new nf(i,t),sf=[{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"}],rf=[{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"}],af=[{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"}],Ji=(i,t,e)=>{const n=new I.Matrix4,o=new I.Euler(i,t,e,"YXZ");return n.makeRotationFromEuler(o),n},lf=(i,{scale:t,rotation:e,position:n})=>{if(t&&i.scale.set(t,t,t),e){const[o,s,r]=e;o&&i.applyMatrix4(Ji(o,0,0)),s&&i.applyMatrix4(Ji(0,s,0)),r&&i.applyMatrix4(Ji(0,0,r))}return n&&i.position.set(n.x,n.y,n.z),i};function Xs(i,t){i.traverse(e=>{var n;if(e.type==="Mesh"){const o=e,s=G({map:o.material.map||{}},t);o.material=new O.MeshBasicMaterial(s),o.renderOrder=1,((n=e.parent)==null?void 0:n.type)==="Mesh"&&(e.renderOrder=e.parent.renderOrder+1)}})}const cf=(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=f=>W(this,null,function*(){var U;const d=(f==null?void 0:f.fbx_url)||e,h=(U=f==null?void 0:f.north_rad)!=null?U:n;if(typeof h!="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,A=g.max.x-g.min.x,p=g.max.z-g.min.z,v=Math.max(A,p),w=yield new Mn.FBXLoader().loadAsync(d);Xs(w,{transparent:!0,side:I.DoubleSide,blending:I.AdditiveBlending});const P=[0,h-Math.PI/2,0],{model:{bounding:{max:{x:E,z:k},min:{x:S,y:x,z:Q}}}}=i;o.yBase=x;const H={x:(E+S)/2,y:x-1.6,z:(k+Q)/2},F=.0045*v;return lf(w,{position:H,rotation:P,scale:F}),o.object=w,!0}),r=({latitude:f})=>{if(!o.object)return;const d=a(f);d&&(o.object.position.y=d)},a=f=>{if(o.yBase===void 0)return;const d=.6;if(f>=Math.PI/4)return o.yBase-(d+1.6);const h=f*(4/Math.PI);return o.yBase-(d*h+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 f=a(i.getPose().latitude);f&&(o.object.position.y=f),i.scene.add(o.object),i.needsRender=!0,i.on("cameraDirectionUpdate",r)}}};function uf(i,t){var c,u,f,d,h;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=(f=t==null?void 0:t.backgroundColor)!=null?f:"rgba(0,0,0,0)",s=(d=t==null?void 0:t.fontColor)!=null?d:"#fff",r=(h=t==null?void 0:t.textAlign)!=null?h:"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 O.CanvasTexture(a)}const df=({x:i,y:t,z:e})=>new O.Vector3(i,t,e),ff=(i,t)=>{var A,p,v;const e={},n=(A=t.animationEnabled)!=null?A:!0,o=(p=t.position)!=null?p:void 0,s=(v=t.rad)!=null?v:void 0,r=t.fbx_url||"//vrlab-image4.ljcdn.com/release/web/entryDoorMini/Anim_Door1.fbx",a=[],l=y=>W(this,null,function*(){var H,F,U,V,B,R,_,N;const w=(H=y==null?void 0:y.position)!=null?H:o;if(!w)return Promise.reject(new Error("ModelEntryDoorGuidePlugin.load(): position is undefined"));const P=df(w),E=(F=y==null?void 0:y.rad)!=null?F:s,k=(U=y==null?void 0:y.fbx_url)!=null?U:r;if(e.rad=E,E===void 0)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): rad is ${E}`));const S=yield new Mn.FBXLoader().loadAsync(k);S.position.copy(P),S.rotation.z=E,S.scale.set(.8,.8,.8),Xs(S,{transparent:!0,side:I.DoubleSide});const x=(_=(R=(B=(V=S.children)==null?void 0:V[0])==null?void 0:B.children)==null?void 0:R[3])==null?void 0:_.clone();if(!x)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): textMesh is ${x}`));const Q=(N=t.name)!=null?N:"\u5165\u6237\u95E8";return x.material=new O.MeshBasicMaterial({transparent:!0,map:uf(Q)}),x.renderOrder=3,S.children[0].add(x),e.object=S,!0}),c=()=>{if(e.animation)return;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.initAnimation(): state.object is ",e.object);const y=1,w=new O.AnimationMixer(e.object);a.push(w);const P=w.clipAction(e.object.animations[0]);P.timeScale=y;let E;const k=()=>{let H=0,F=0;const U=1e3/30,V=B=>{H=requestAnimationFrame(V);const R=B-F;R<U||(F=B,a.forEach(_=>_.update(R/1e3)),i.needsRender=!0)};return H=requestAnimationFrame(V),()=>{cancelAnimationFrame(H)}},Q={play:()=>{E||(P.play(),E=k(),requestAnimationFrame(()=>{e.object&&e.object.rotation.z!==e.rad&&(e.object.rotation.z=e.rad)}))},stop:()=>{P.stop(),E==null||E(),E=void 0}};e.animation=Q},u=y=>{var P;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.enable(): object is ",e.object);((P=y==null?void 0:y.animationEnable)!=null?P:n)&&(e.animation||c(),e.animation.play()),i.scene.add(e.object),i.needsRender=!0},f=()=>{!e.object||(e.animation&&e.animation.stop(),i.scene.remove(e.object),i.needsRender=!0)},d=y=>y==="Floorplan"?u():f();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,f(),i.off("modeChange",d)),!0)}};class Zi extends dn.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=ii(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=[],dn.default.remove(this)})}}function Ys(i,t=dn.default.Easing.Linear.None){const e=new Zi({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)),hf=window.cancelAnimationFrame||clearTimeout;function ni(i,t=0){t<=0?Cn(i):Cn(()=>ni(i,t-1))}function ii(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(){hf(e)}}function mf(){const i=Date.now();return new Promise(t=>{Cn(()=>{t(Date.now()-i)})})}const pf=zn.Easing;function gf(i,t,e,n=pf.Linear.None){const o=new zn.Tween(i).to(t,e).easing(n);ni(()=>o.start(0));const s=ii(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 Af(i,t){return gf({progress:0},{progress:1},i,t)}var Us=(i=>(i.Move="Move",i.Rotate="Rotate",i))(Us||{}),tt=(i=>(i.Clockwise="Clockwise",i.Anticlockwise="Anticlockwise",i.Loop="Loop",i))(tt||{});const oi=Math.PI*2;function Js(i){return(i%oi+oi)%oi}function Zs(i){return i%oi}function qi(i,t,e){return i+(t-i)*e}const Ki=(i,t,e)=>{const n=Math.PI,o=n*2;return i=Js(i),t=Js(t),e===tt.Anticlockwise&&i<t&&(i+=o),e===tt.Clockwise&&t<i&&(t+=o),e===tt.Loop&&t-i>n?Ki(i,t,tt.Anticlockwise):e===tt.Loop&&i-t>n?Ki(i,t,tt.Clockwise):{from:i,to:t}},vf=i=>{const t={},e=(l,c,...u)=>W(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((f,d)=>{const h=s.panoIndex!==void 0?s.panoIndex:i.panoIndex;h!==void 0?i.moveToPano(h,Object.assign({duration:r,moveEndCallback:()=>f(!0),moveCancelCallback:()=>d(!1)},s)):d(!1)})}),n=s=>{const r=i.state,a=Zs(r.latitude),l=Zs(s.latitude),{from:c,to:u}=Ki(r.longitude,s.longitude,s.rotation||tt.Loop),f=r.fov,d=s.fov;return{from:{latitude:a,longitude:c,fov:f},to:{latitude:l,longitude:u,fov:d}}};return{move:e,rotate:(l,c,...u)=>W(this,[l,c,...u],function*(s,r,a={}){t.interruptCallback&&t.interruptCallback(!1),a.asyncStartCallback&&(yield a.asyncStartCallback()),i.currentMode!==he.Five.Mode.Panorama&&(yield i.changeMode(he.Five.Mode.Panorama)),s.panoIndex!==void 0&&s.panoIndex!==i.panoIndex&&(a.preload&&(yield i.preloadPano(s.panoIndex)),yield new Promise((h,g)=>{if(!s.panoIndex){h(!0);return}i.moveToPano(s.panoIndex,{moveEndCallback:()=>h(!0),moveCancelCallback:()=>g(!1)})})),a.asyncEndCallback&&(yield a.asyncEndCallback());const{from:f,to:d}=n(s);return yield new Promise(h=>{const g=({progress:w})=>{const P={};P.longitude=qi(f.longitude,d.longitude,w),P.latitude=qi(f.latitude,d.latitude,w),P.fov=qi(f.fov,d.fov,w),i.setState(P,!0)},A=()=>{h(!0)},p=()=>{h(!1)},v=s.rotateSpeed?Math.ceil(Math.abs(d.longitude-f.longitude)/s.rotateSpeed*1e3):r,y=Af(v,zn.Easing.Linear.None).onUpdate(g).onComplete(A).onDestroy(p);s.rotation===tt.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),h(w)},t.timeoutId=setTimeout(()=>{t.interruptCallback&&t.interruptCallback(!0)},r)})})}};function qs(i,t){return i.x===t.x&&i.y===t.y}function Ks(i,t){return Math.abs(i)===1/0&&Math.abs(t)===1/0?!0:Math.abs(i-t)<.001}function si(i,t){return(t.y-i.y)/(t.x-i.x)}function $s(i,t,e){const n=si(i[1],i[0]),o=si(t[1],t[0]);if(isNaN(n)||isNaN(o)||Ks(n,o))return!1;if(ri(i[0],t))return i[0];if(ri(i[1],t))return i[1];if(ri(t[0],i))return t[0];if(ri(t[1],i))return t[1];if(e&&!bf(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 ri(i,t){return qs(i,t[0])||qs(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&&Ks(si(t[0],i),si(i,t[1]))}function ai(i,t,e){return(i.x-e.x)*(t.y-e.y)-(t.x-e.x)*(i.y-e.y)}function bf(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)&&ai(t[0],i[1],i[0])*ai(i[1],t[1],i[0])>0&&ai(i[0],t[1],t[0])*ai(t[1],i[1],t[0])>0?1:0}function er(i,t=0){t<=0?requestAnimationFrame(i):requestAnimationFrame(()=>er(i,t-1))}const yf=`<style type="text/css">
|
|
115
|
+
`;return i.$$set=s=>{"content"in s&&e(0,n=s.content)},[n,o]}class Au extends re{constructor(t){super(),se(this,t,gu,pu,oe,{content:0},mu)}}function vu(i){ue(i,"svelte-ozpg4a",".floorplan-plugin__base-image.svelte-ozpg4a{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}")}function bu(i){let t,e;return t=new hu({props:{url:i[1].url}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.url=n[1].url),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function yu(i){let t,e;return t=new Au({props:{content:i[0]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.content=n[0]),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function wu(i){let t,e,n,o;const s=[yu,bu],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){z(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&&(ae(),D(r[u],1,1,()=>{r[u]=null}),le()),~e?(n=r[e],n?n.p(l,c):(n=r[e]=s[e](l),n.c()),C(n,1),n.m(t,null)):n=null)},i(l){o||(C(n),o=!0)},o(l){D(n),o=!1},d(l){l&&M(t),~e&&r[e].d()}}}function Cu(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 us extends re{constructor(t){super(),se(this,t,Cu,wu,oe,{floorIndex:2,floorplanData:3},vu)}}function Pu(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 Iu(i){let t,e=i[8].outerHTML+"",n;return{c(){t=new Nn(!1),n=pe(),t.a=n},m(o,s){t.m(e,o,s),z(o,n,s)},p(o,s){s&256&&e!==(e=o[8].outerHTML+"")&&t.p(e)},d(o){o&&M(n),o&&t.d()}}}function Eu(i){let t,e,n=i[1]&&ds(i),o=i[0]&&fs(i);return{c(){n&&n.c(),t=ne(),o&&o.c(),e=pe()},m(s,r){n&&n.m(s,r),z(s,t,r),o&&o.m(s,r),z(s,e,r)},p(s,r){s[1]?n?n.p(s,r):(n=ds(s),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null),s[0]?o?o.p(s,r):(o=fs(s),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null)},d(s){n&&n.d(s),s&&M(t),o&&o.d(s),s&&M(e)}}}function ds(i){let t,e=i[2].name+"",n;return{c(){t=T("span"),n=De(e),b(t,"class","floorplan-plugin__room-name")},m(o,s){z(o,t,s),j(t,n)},p(o,s){s&4&&e!==(e=o[2].name+"")&&ze(n,e)},d(o){o&&M(t)}}}function fs(i){let t,e;return{c(){t=T("span"),e=De(i[7]),b(t,"class","floorplan-plugin__room-size svelte-12pzct5")},m(n,o){z(n,t,o),j(t,e)},p(n,o){o&128&&ze(e,n[7])},d(n){n&&M(t)}}}function ku(i){let t,e;function n(r,a){if(r[3]===void 0)return Eu;if(r[8])return Iu}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"),Le(()=>i[19].call(t)),L(t,"left",i[9]),L(t,"top",i[10]),L(t,"font-size",i[11]),L(t,"opacity",i[6]?"1":"0")},m(r,a){z(r,t,a),s&&s.m(t,null),e=ft(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&&L(t,"opacity",r[6]?"1":"0")},i:J,o:J,d(r){r&&M(t),s&&s.d(),e()}}}function xu(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 Du(i,t,e){let n,o,s,r,a,{pxmm:l}=t,{roomAreaEnable:c}=t,{roomNameEnable:u}=t,{room:f}=t,{hoveredRoom:d}=t,{getRoomAreaText:h}=t,{getLabelElement:g}=t,{adaptiveRoomLabelVisibleEnable:A}=t;function p(F,U){if(U.width===0||U.height===0)return()=>!1;const V=F.path.map(({x:me,y:de})=>[me,de]),B=F.roomLabel.position,{x:R,y:_}=B,{width:N,height:te}=U,X=N/2,Z=te/2;return function(de){const ge=R*de,Ee=_*de,Te=V.map(([ce,ve])=>[ce*de,ve*de]);return[[ge+X,Ee-Z],[ge-X,Ee-Z],[ge-X,Ee+Z],[ge+X,Ee+Z]].every(ce=>xu(ce,Te))}}const v=document.body.clientWidth,y=document.body.clientHeight,w=f.roomLabel,P=w.positionInImage.x*100+"%",E=w.positionInImage.y*100+"%",k=(v<500||y<500?10:14)+"px";let S=0,x=0,Q=!1;d.subscribe(function(U){e(16,Q=!!U&&U.id===f.id)});function H(){S=this.clientWidth,x=this.clientHeight,e(4,S),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,f=F.room),"hoveredRoom"in F&&e(13,d=F.hoveredRoom),"getRoomAreaText"in F&&e(14,h=F.getRoomAreaText),"getLabelElement"in F&&e(3,g=F.getLabelElement),"adaptiveRoomLabelVisibleEnable"in F&&e(15,A=F.adaptiveRoomLabelVisibleEnable)},i.$$.update=()=>{i.$$.dirty&12&&e(8,n=g==null?void 0:g(f)),i.$$.dirty&16388&&e(7,o=f.size?h(f.size):""),i.$$.dirty&48&&e(18,s={width:S,height:x}),i.$$.dirty&262148&&e(17,r=s?p(f,s):void 0),i.$$.dirty&233472&&e(6,a=A?Q?!0:!!(r!=null&&r(l)):!0)},[c,u,f,g,S,x,a,o,n,P,E,k,l,d,h,A,Q,r,s,H]}class Lu extends re{constructor(t){super(),se(this,t,Du,ku,oe,{pxmm:12,roomAreaEnable:0,roomNameEnable:1,room:2,hoveredRoom:13,getRoomAreaText:14,getLabelElement:3,adaptiveRoomLabelVisibleEnable:15},Pu)}}function Su(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 hs(i,t,e){const n=i.slice();return n[12]=t[e],n}function ms(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=hs(i,r,l),u=a(c);n.set(u,e[l]=ps(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"),Le(()=>i[11].call(t))},m(l,c){z(l,t,c);for(let u=0;u<e.length;u+=1)e[u].m(t,null);o=ft(t,i[11].bind(t)),s=!0},p(l,c){c&447&&(r=l[8],ae(),e=Ue(e,c,a,1,l,r,n,t,Ct,ps,null,hs),le())},i(l){if(!s){for(let c=0;c<r.length;c+=1)C(e[c]);s=!0}},o(l){for(let c=0;c<e.length;c+=1)D(e[c]);s=!1},d(l){l&&M(t);for(let c=0;c<e.length;c+=1)e[c].d();o()}}}function ps(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=Be(r,s[a]);return n=new Lu({props:r}),{key:i,first:null,c(){e=pe(),ee(n.$$.fragment),this.first=e},m(a,l){z(a,e,l),K(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||(C(n.$$.fragment,a),o=!0)},o(a){D(n.$$.fragment,a),o=!1},d(a){a&&M(e),$(n,a)}}}function Mu(i){let t,e,n=i[8]&&ms(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[8]?n?(n.p(o,s),s&256&&C(n,1)):(n=ms(o),n.c(),C(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(C(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function zu(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:f}=t,d=0,h=0;function g(){d=this.clientWidth,e(6,d)}return i.$$set=A=>{"floorIndex"in A&&e(9,o=A.floorIndex),"roomAreaEnable"in A&&e(0,s=A.roomAreaEnable),"roomNameEnable"in A&&e(1,r=A.roomNameEnable),"floorplanData"in A&&e(10,a=A.floorplanData),"hoveredRoom"in A&&e(2,l=A.hoveredRoom),"getRoomAreaText"in A&&e(3,c=A.getRoomAreaText),"getLabelElement"in A&&e(4,u=A.getLabelElement),"adaptiveRoomLabelVisibleEnable"in A&&e(5,f=A.adaptiveRoomLabelVisibleEnable)},i.$$.update=()=>{if(i.$$.dirty&1536&&e(8,n=a.floorDatas[o].rooms),i.$$.dirty&1088){const{max:A,min:p}=a.bounding,v=A.x-p.x;e(7,h=d/v)}},[s,r,l,c,u,f,d,h,n,o,a,g]}class Tu extends re{constructor(t){super(),se(this,t,zu,Mu,oe,{floorIndex:9,roomAreaEnable:0,roomNameEnable:1,floorplanData:10,hoveredRoom:2,getRoomAreaText:3,getLabelElement:4,adaptiveRoomLabelVisibleEnable:5},Su)}}function Bu(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 gs(i,t,e){const n=i.slice();return n[11]=t[e],n[13]=e,n}function As(i,t,e){const n=i.slice();return n[14]=t[e],n}function vs(i){let t;return{c(){t=T("div"),b(t,"class","floorplan-plugin__rule-scale svelte-djlmk4"),L(t,"left",i[14].left*100+"%"),L(t,"bottom",i[14].bottom*100+"%")},m(e,n){z(e,t,n)},p:J,d(e){e&&M(t)}}}function bs(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=De(o),r=ne(),b(n,"class","floorplan-plugin__rule-text svelte-djlmk4"),q(n,"is-row",t[2]),b(e,"class","floorplan-plugin__rule-text-item svelte-djlmk4"),L(e,"left",t[11].left*100+"%"),L(e,"bottom",t[11].bottom*100+"%"),this.first=e},m(a,l){z(a,e,l),j(e,n),j(n,s),j(e,r)},p(a,l){t=a,l&2&&o!==(o=t[1](t[11].distance)+"")&&ze(s,o)},d(a){a&&M(e)}}}function ju(i){let t,e,n,o,s,r,a=[],l=new Map,c,u=i[3],f=[];for(let g=0;g<u.length;g+=1)f[g]=vs(As(i,u,g));let d=i[4];const h=g=>g[13];for(let g=0;g<d.length;g+=1){let A=gs(i,d,g),p=h(A);l.set(p,a[g]=bs(p,A))}return{c(){t=T("div"),e=T("div"),n=ne(),o=T("div");for(let g=0;g<f.length;g+=1)f[g].c();s=ne(),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"),q(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"),q(t,"is-row",i[2]),L(t,"width",i[2]?"100%":1/16+"rem"),L(t,"height",i[2]?1/16+"rem":"100%")},m(g,A){z(g,t,A),j(t,e),j(t,n),j(t,o);for(let p=0;p<f.length;p+=1)f[p].m(o,null);j(t,s),j(t,r);for(let p=0;p<a.length;p+=1)a[p].m(r,null)},p(g,[A]){if(A&8){u=g[3];let p;for(p=0;p<u.length;p+=1){const v=As(g,u,p);f[p]?f[p].p(v,A):(f[p]=vs(v),f[p].c(),f[p].m(o,null))}for(;p<f.length;p+=1)f[p].d(1);f.length=u.length}A&22&&(d=g[4],a=Ue(a,A,h,1,g,d,l,r,Fi,bs,null,gs)),A&1&&c!==(c="floorplan-plugin__rule-labels floorplan-plugin__rule-labels--"+g[0]+" svelte-djlmk4")&&b(t,"class",c),A&5&&q(t,"is-row",g[2])},i:J,o:J,d(g){g&&M(t),dt(f,g);for(let A=0;A<a.length;A+=1)a[A].d()}}}const $t=1e3,en=180;function Vu(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,A])=>a?[g.x,A.x]:[g.y,A.y]).flat().sort().filter((g,A,p)=>A===0?!0:g!==p[A-1]),f=u.map(g=>{const A=a?(g-s.min.x-$t+en)/l:0,p=a?0:(g-s.min.y-$t+en)/c;return{left:A,bottom:p}});f.unshift({left:0,bottom:0}),f.push(a?{left:1,bottom:0}:{left:0,bottom:1});const d=u[u.length-1]-u[0],h=u.map((g,A,p)=>{const v=A===0?0:g-p[A-1],y=A===0?0:(g+p[A-1])/2,w=a?(y-s.min.x-$t+en)/l:0,P=a?0:(y-s.min.y-$t+en)/c;return{left:w,bottom:P,distance:v}}).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,f,h,o,s]}class Qu extends re{constructor(t){super(),se(this,t,Vu,ju,oe,{type:0,data:5,bounding:6,getRuleDistanceText:1},Bu)}}function Ou(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 ys(i,t,e){const n=i.slice();return n[13]=t[e][0],n[14]=t[e][1],n}function ws(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=Be(r,s[a]);return n=new Qu({props:r}),{key:i,first:null,c(){e=pe(),ee(n.$$.fragment),this.first=e},m(a,l){z(a,e,l),K(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||(C(n.$$.fragment,a),o=!0)},o(a){D(n.$$.fragment,a),o=!1},d(a){a&&M(e),$(n,a)}}}function Fu(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=ys(i,s,a),c=r(l);n.set(c,e[a]=ws(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"),L(t,"width",i[3]),L(t,"height",i[2])},m(a,l){z(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],ae(),e=Ue(e,l,r,1,a,s,n,t,Ct,ws,null,ys),le()),l&8&&L(t,"width",a[3]),l&4&&L(t,"height",a[2])},i(a){if(!o){for(let l=0;l<s.length;l+=1)C(e[l]);o=!0}},o(a){for(let l=0;l<e.length;l+=1)D(e[l]);o=!1},d(a){a&&M(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}const Cs=1e3,Ps=180;function Ru(i,t,e){let n,o,s,r,a,l,c,u,f,d,{floorIndex:h}=t,{floorplanData:g}=t,{getRuleDistanceText:A}=t;return i.$$set=p=>{"floorIndex"in p&&e(5,h=p.floorIndex),"floorplanData"in p&&e(6,g=p.floorplanData),"getRuleDistanceText"in p&&e(0,A=p.getRuleDistanceText)},i.$$.update=()=>{i.$$.dirty&64&&e(1,n=g.bounding),i.$$.dirty&96&&e(11,o=g.floorDatas[h].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-(Cs-Ps)*2),i.$$.dirty&2&&e(8,u=n.max.y-n.min.y-(Cs-Ps)*2),i.$$.dirty&1536&&e(3,f=c/a*100+"%"),i.$$.dirty&384&&e(2,d=u/l*100+"%")},[A,n,d,f,r,h,g,l,u,a,c,o,s]}class Gu extends re{constructor(t){super(),se(this,t,Ru,Fu,oe,{floorIndex:5,floorplanData:6,getRuleDistanceText:0},Ou)}}function $n(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 Is({x:i,y:t},e){const{max:n,min:o}=e;return{x:i-o.x,y:n.y-t}}function Nu(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 Wu(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 Hu(i,t){return Math.max(...t.work.observers.map(n=>i.z>=n.standingPosition.z?n.floorIndex:0))}function _u(i){let t;return{c(){t=Ce("path"),b(t,"d",i[0]),b(t,"fill","#2F313A")},m(e,n){z(e,t,n)},p(e,[n]){n&1&&b(t,"d",e[0])},i:J,o:J,d(e){e&&M(t)}}}function Xu(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=$n(o,{needZ:!0}))},[n,o]}class Yu extends re{constructor(t){super(),se(this,t,Xu,_u,oe,{path:1})}}function Uu(i){let t,e,n,o,s,r;return{c(){t=Ce("defs"),e=Ce("pattern"),n=Ce("rect"),o=Ce("path"),s=ne(),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){z(a,t,l),j(t,e),j(e,n),j(e,o),z(a,s,l),z(a,r,l)},p(a,[l]){l&1&&b(r,"d",a[0])},i:J,o:J,d(a){a&&M(t),a&&M(s),a&&M(r)}}}const Ni=6;function Ju(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=$n(o,{needZ:!0}))},[n,s,r,o]}class Zu extends re{constructor(t){super(),se(this,t,Ju,Uu,oe,{path:3})}}function qu(i){let t,e,n,o,s,r,a,l,c,u,f;return{c(){t=Ce("defs"),e=Ce("pattern"),n=Ce("rect"),o=Ce("pattern"),s=Ce("rect"),r=ne(),a=Ce("path"),l=ne(),c=Ce("path"),u=ne(),f=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(f,"d",i[0]),b(f,"fill","url(#room-material-pattern-2)")},m(d,h){z(d,t,h),j(t,e),j(e,n),j(t,o),j(o,s),z(d,r,h),z(d,a,h),z(d,l,h),z(d,c,h),z(d,u,h),z(d,f,h)},p(d,[h]){h&1&&b(a,"d",d[0]),h&1&&b(c,"d",d[0]),h&1&&b(f,"d",d[0])},i:J,o:J,d(d){d&&M(t),d&&M(r),d&&M(a),d&&M(l),d&&M(c),d&&M(u),d&&M(f)}}}function Ku(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=$n(o,{needZ:!0}))},[n,o]}class $u extends re{constructor(t){super(),se(this,t,Ku,qu,oe,{path:1})}}function ed(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 Es(i,t,e){const n=i.slice();return n[5]=t[e],n}function td(i){let t,e;return t=new Zu({props:{path:i[5].path}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.path=n[5].path),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function nd(i){let t,e;return t=new $u({props:{path:i[5].path}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.path=n[5].path),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function id(i){let t,e;return t=new Yu({props:{path:i[5].path}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.path=n[5].path),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function ks(i){let t,e,n,o;const s=[id,nd,td],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){z(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):(ae(),D(r[u],1,1,()=>{r[u]=null}),le(),n=r[e],n?n.p(l,c):(n=r[e]=s[e](l),n.c()),C(n,1),n.m(t,null))},i(l){o||(C(n),o=!0)},o(l){D(n),o=!1},d(l){l&&M(t),r[e].d()}}}function od(i){let t,e,n=i[0],o=[];for(let r=0;r<n.length;r+=1)o[r]=ks(Es(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){z(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=Es(r,n,l);o[l]?(o[l].p(c,a),C(o[l],1)):(o[l]=ks(c),o[l].c(),C(o[l],1),o[l].m(t,null))}for(ae(),l=n.length;l<o.length;l+=1)s(l);le()}},i(r){if(!e){for(let a=0;a<n.length;a+=1)C(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&&M(t),dt(o,r)}}}function sd(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=>Ae(G({},l),{path:l.path.map(c=>Is(c,s.bounding))})))},[n,r,a,o,s]}class rd extends re{constructor(t){super(),se(this,t,sd,od,oe,{floorIndex:3,floorplanData:4},ed)}}function ad(i){ue(i,"svelte-19uvvss","path.svelte-19uvvss{opacity:0}path.svelte-19uvvss:hover{opacity:0.1}")}function ld(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){z(o,t,s),e||(n=[Pe(t,"mouseenter",i[0]),Pe(t,"mouseleave",i[1])],e=!0)},p:J,i:J,o:J,d(o){o&&M(t),e=!1,ut(n)}}}function cd(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=$n(n.path,{needZ:!0,format:u=>Is(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 ud extends re{constructor(t){super(),se(this,t,cd,ld,oe,{room:3,floorplanData:4,hoveredRoom:5},ad)}}function dd(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 xs(i,t,e){const n=i.slice();return n[5]=t[e],n}function Ds(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=Be(r,s[a]);return n=new ud({props:r}),{key:i,first:null,c(){e=pe(),ee(n.$$.fragment),this.first=e},m(a,l){z(a,e,l),K(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||(C(n.$$.fragment,a),o=!0)},o(a){D(n.$$.fragment,a),o=!1},d(a){a&&M(e),$(n,a)}}}function fd(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=xs(i,r,l),u=a(c);o.set(u,n[l]=Ds(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){z(l,t,c),j(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,ae(),n=Ue(n,c,a,1,l,r,o,e,Ct,Ds,null,xs),le())},i(l){if(!s){for(let c=0;c<r.length;c+=1)C(n[c]);s=!0}},o(l){for(let c=0;c<n.length;c+=1)D(n[c]);s=!1},d(l){l&&M(t);for(let c=0;c<n.length;c+=1)n[c].d()}}}function hd(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 Ls extends re{constructor(t){super(),se(this,t,hd,fd,oe,{floorIndex:0,floorplanData:1,hoveredRoom:2},dd)}}function md(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 Ss(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=Be(o,n[s]);return t=new Ls({props:o}),{c(){ee(t.$$.fragment)},m(s,r){K(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||(C(t.$$.fragment,s),e=!0)},o(s){D(t.$$.fragment,s),e=!1},d(s){$(t,s)}}}function Ms(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=Be(o,n[s]);return t=new Tu({props:o}),{c(){ee(t.$$.fragment)},m(s,r){K(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||(C(t.$$.fragment,s),e=!0)},o(s){D(t.$$.fragment,s),e=!1},d(s){$(t,s)}}}function zs(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=Be(o,n[s]);return t=new Gu({props:o}),{c(){ee(t.$$.fragment)},m(s,r){K(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||(C(t.$$.fragment,s),e=!0)},o(s){D(t.$$.fragment,s),e=!1},d(s){$(t,s)}}}function pd(i){let t,e,n,o,s,r,a,l,c;const u=[{floorIndex:i[1],floorplanData:i[7]}];let f={};for(let v=0;v<u.length;v+=1)f=Be(f,u[v]);e=new rd({props:f});let d=i[2]&&Ss(i);const h=[{floorplanData:i[7],floorIndex:i[1]}];let g={};for(let v=0;v<h.length;v+=1)g=Be(g,h[v]);s=new us({props:g});let A=i[3]&&Ms(i),p=i[6]&&zs(i);return{c(){t=T("div"),ee(e.$$.fragment),n=ne(),d&&d.c(),o=ne(),ee(s.$$.fragment),r=ne(),A&&A.c(),a=ne(),p&&p.c(),b(t,"class",l=Qe(`floorplan-plugin__floor${i[0]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz")},m(v,y){z(v,t,y),K(e,t,null),j(t,n),d&&d.m(t,null),j(t,o),K(s,t,null),j(t,r),A&&A.m(t,null),j(t,a),p&&p.m(t,null),c=!0},p(v,[y]){const w=y&130?Fe(u,[{floorIndex:v[1],floorplanData:v[7]}]):{};e.$set(w),v[2]?d?(d.p(v,y),y&4&&C(d,1)):(d=Ss(v),d.c(),C(d,1),d.m(t,o)):d&&(ae(),D(d,1,1,()=>{d=null}),le());const P=y&130?Fe(h,[{floorplanData:v[7],floorIndex:v[1]}]):{};s.$set(P),v[3]?A?(A.p(v,y),y&8&&C(A,1)):(A=Ms(v),A.c(),C(A,1),A.m(t,a)):A&&(ae(),D(A,1,1,()=>{A=null}),le()),v[6]?p?(p.p(v,y),y&64&&C(p,1)):(p=zs(v),p.c(),C(p,1),p.m(t,null)):p&&(ae(),D(p,1,1,()=>{p=null}),le()),(!c||y&1&&l!==(l=Qe(`floorplan-plugin__floor${v[0]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz"))&&b(t,"class",l)},i(v){c||(C(e.$$.fragment,v),C(d),C(s.$$.fragment,v),C(A),C(p),c=!0)},o(v){D(e.$$.fragment,v),D(d),D(s.$$.fragment,v),D(A),D(p),c=!1},d(v){v&&M(t),$(e),d&&d.d(),$(s),A&&A.d(),p&&p.d()}}}function gd(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:f}=t,{getLabelElement:d}=t,{getRuleDistanceText:h}=t,{adaptiveRoomLabelVisibleEnable:g}=t;const A=Gi(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,f=p.getRoomAreaText),"getLabelElement"in p&&e(9,d=p.getLabelElement),"getRuleDistanceText"in p&&e(10,h=p.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in p&&e(11,g=p.adaptiveRoomLabelVisibleEnable)},[n,o,s,r,a,l,c,u,f,d,h,g,A]}class Ad extends re{constructor(t){super(),se(this,t,gd,pd,oe,{isCurrent:0,floorIndex:1,hoverEnable:2,roomLabelsEnable:3,roomAreaEnable:4,roomNameEnable:5,ruleLabelsEnable:6,floorplanData:7,getRoomAreaText:8,getLabelElement:9,getRuleDistanceText:10,adaptiveRoomLabelVisibleEnable:11},md)}}function vd(i){ue(i,"svelte-86bqav",".floorplan-main.svelte-86bqav{width:100%;height:100%;pointer-events:none}")}function Ts(i,t,e){const n=i.slice();return n[18]=t[e],n}function Bs(i){let t,e,n,o,s,r,a=i[11].floorDatas,l=[];for(let h=0;h<a.length;h+=1)l[h]=js(Ts(i,a,h));const c=h=>D(l[h],1,1,()=>{l[h]=null}),u=[{panoIndex:i[3],floorplanData:i[11],lastPanoramaLongitude:i[12],cameraImageUrl:i[13]}];let f={};for(let h=0;h<u.length;h+=1)f=Be(f,u[h]);n=new nu({props:f});let d=i[6]&&Vs(i);return{c(){t=T("div");for(let h=0;h<l.length;h+=1)l[h].c();e=ne(),ee(n.$$.fragment),o=ne(),d&&d.c(),b(t,"class","floorplan-main svelte-86bqav")},m(h,g){z(h,t,g);for(let A=0;A<l.length;A+=1)l[A].m(t,null);j(t,e),K(n,t,null),j(t,o),d&&d.m(t,null),r=!0},p(h,g){if(i=h,g&249776){a=i[11].floorDatas;let p;for(p=0;p<a.length;p+=1){const v=Ts(i,a,p);l[p]?(l[p].p(v,g),C(l[p],1)):(l[p]=js(v),l[p].c(),C(l[p],1),l[p].m(t,e))}for(ae(),p=a.length;p<l.length;p+=1)c(p);le()}const A=g&14344?Fe(u,[{panoIndex:i[3],floorplanData:i[11],lastPanoramaLongitude:i[12],cameraImageUrl:i[13]}]):{};n.$set(A),i[6]?d?(d.p(i,g),g&64&&C(d,1)):(d=Vs(i),d.c(),C(d,1),d.m(t,null)):d&&(ae(),D(d,1,1,()=>{d=null}),le())},i(h){if(!r){for(let g=0;g<a.length;g+=1)C(l[g]);C(n.$$.fragment,h),C(d),s||Le(()=>{s=Mt(t,zt,{duration:i[0],easing:vt}),s.start()}),r=!0}},o(h){l=l.filter(Boolean);for(let g=0;g<l.length;g+=1)D(l[g]);D(n.$$.fragment,h),D(d),r=!1},d(h){h&&M(t),dt(l,h),$(n),d&&d.d()}}}function js(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=Be(o,n[s]);return t=new Ad({props:o}),{c(){ee(t.$$.fragment)},m(s,r){K(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||(C(t.$$.fragment,s),e=!0)},o(s){D(t.$$.fragment,s),e=!1},d(s){$(t,s)}}}function Vs(i){let t,e;return t=new cu({props:{floorplanData:i[11],northDesc:i[2]}}),{c(){ee(t.$$.fragment)},m(n,o){K(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||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function bd(i){let t,e,n=i[1]&&Bs(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&C(n,1)):(n=Bs(o),n.c(),C(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(C(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function yd(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:f}=t,{roomNameEnable:d}=t,{ruleLabelsEnable:h}=t,{floorplanData:g}=t,{lastPanoramaLongitude:A}=t,{cameraImageUrl:p}=t,{getRoomAreaText:v}=t,{getLabelElement:y}=t,{getRuleDistanceText:w}=t,{adaptiveRoomLabelVisibleEnable:P}=t;return i.$$set=E=>{"duration"in E&&e(0,n=E.duration),"visible"in E&&e(1,o=E.visible),"northDesc"in E&&e(2,s=E.northDesc),"panoIndex"in E&&e(3,r=E.panoIndex),"floorIndex"in E&&e(4,a=E.floorIndex),"hoverEnable"in E&&e(5,l=E.hoverEnable),"compassEnable"in E&&e(6,c=E.compassEnable),"roomLabelsEnable"in E&&e(7,u=E.roomLabelsEnable),"roomAreaEnable"in E&&e(8,f=E.roomAreaEnable),"roomNameEnable"in E&&e(9,d=E.roomNameEnable),"ruleLabelsEnable"in E&&e(10,h=E.ruleLabelsEnable),"floorplanData"in E&&e(11,g=E.floorplanData),"lastPanoramaLongitude"in E&&e(12,A=E.lastPanoramaLongitude),"cameraImageUrl"in E&&e(13,p=E.cameraImageUrl),"getRoomAreaText"in E&&e(14,v=E.getRoomAreaText),"getLabelElement"in E&&e(15,y=E.getLabelElement),"getRuleDistanceText"in E&&e(16,w=E.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in E&&e(17,P=E.adaptiveRoomLabelVisibleEnable)},[n,o,s,r,a,l,c,u,f,d,h,g,A,p,v,y,w,P]}class Wi extends re{constructor(t){super(),se(this,t,yd,bd,oe,{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},vd)}}const wd="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAwCAYAAACFUvPfAAAAAXNSR0IArs4c6QAAAERlWElmTU0AK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m7aZ8bGZy/jxhO87V91G0+dfY/Z7BWIIK9KYUi5qy/Hf8YfBG3sqJTHiQWhmTVkbip+wX3x6volVSx+LPAxF+VLXhZ8VQ+iP2Rta/iWe5v42Fngj0BbdnRTXh12ZIcKhTaGbcYjybRwXBU1lu9KlndXp04NM52poKWO0RZsviNaP9a6grkO972+st05pXhE5c1hTEluJy7XUejGUQNLMbAmTdWY1rKBLW3aTJqBZ7nZkb36DhYCreeYHbMUXHvaYi5XDK70EcgulmRjm77wNtenzuXCbmnTRaAx493rbGf3Jr/njMzj920CnKdUaFCjlDioy7NYNvOdGrQJNgI32/L2tkXfFPlxgToqjWVhD6KdLnQRdARf/HHQz2r2X2Gqy8pAZaAyUBmoDFQGKgP/q4F/AJYg9/s0ZoABAAAAAElFTkSuQmCC";function Cd(i){return W(this,null,function*(){const t=new Headers({"Content-Type":"text/plain"}),e=function(o){return W(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 Pd(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 Id(i){return{floorName:i.floor_name,floorIndex:i.floor_index,rooms:i.rooms.map(Pd),rules:i.rules}}function Ed(i){return{index:i.index,floorIndex:i.floor_index,position:i.position,positionInImage:i.position_in_image}}function kd(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 Et(i){return W(this,null,function*(){const t=yield Cd(i.outlines),e=i.computed_data.bounding,n=i.computed_data.floor_datas.map(Id),o=i.computed_data.entrance?kd(i.computed_data.entrance):null;return{outlines:t,entrance:o,bounding:e,floorDatas:n,observers:i.computed_data.observers.map(Ed)}})}function xd(i,t,e){return i.map(o=>{const s=o.position,r=o.icon?o.icon:{url:wd,width:45,height:48},a=Hu(s,t),l=Nu(s,e),c=Wu(l,e);return{floorIndex:a,icon:r,id:o.id,position:l,positionInImage:c}})}function Dd(i,t){return t(i),i}function ei(i,t){return Dd({},e=>{for(const n in i)t.indexOf(n)===-1&&(e[n]=i[n])})}function Qs(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 Hi(i,t,e=Pt.BOUNDING_CENTER){const n=Qs(i,t),o=Qs(i,t+1);return e===Pt.BOUNDING_CENTER?(i.model.bounding.max.y+i.model.bounding.min.y)/2:e===Pt.CEILING?o:n}function _i(i,t,e,n){const o=Hi(i,e,n==null?void 0:n.attachedTo),s=new I.Vector3(0,o,0),r=new I.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 ti{constructor(t,e){m(this,"five");m(this,"hooks",new Rt);m(this,"staticPrefix","//vrlab-static.ljcdn.com");this.five=t,e!=null&&e.staticPrefix&&(this.staticPrefix=e.staticPrefix)}getCurrentState(){return this.state}}class Tt extends ti{}var _e=(i=>(i.UnknownError="UnknownError",i.DataNotLoaded="DataNotLoaded",i.BreakOffByHide="BreakOffByHide",i.BreakOffByDisable="BreakOffByDisable",i.ModelNotLoaded="ModelNotLoaded",i.ChangeModeError="ChangeModeError",i.UpdateCameraError="UpdateCameraError",i))(_e||{});const Os=500,Ld=80;function Xi(i,t,e=4){return Math.floor(i*Math.pow(10,e))===Math.floor(t*Math.pow(10,e))}function Fs(i,t){return W(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 f=l[c];return typeof u=="number"&&typeof f=="number"?Xi(u,f,2):u===f}):!0})()||n(new Error("five pose \u4E0E\u9884\u671F\u4E0D\u7B26")),e()})})})}function Yi(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!(!Xi(e,s,2)||!Xi(n,r,2)||o!==a)}function Rs(i,t,e=!0){return W(this,null,function*(){if(Yi(i,t)===!0)return;const o=i.getCurrentState();if(o.mode!==t.mode){const[u]=yield Jn(Fs(i,[t.mode,t,void 0,e]));if(u)throw new Error(_e.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 Jn(i.updateCamera(t,l,e));if(c)throw new Error(_e.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 Sd(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 Md(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 zd extends Tt{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)=>W(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)=>W(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||!Yi(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=_i(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,_e.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=>W(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.five.model)!=null&&r.loaded))throw new Error(_e.ModelNotLoaded);if(!this.data)throw new Error(_e.DataNotLoaded);this.isHiddenByHideFunc=!1;const n={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},o=G(G({},n),e),s=()=>W(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 Jn(Rs(this.five,this.showState,o.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(_e.UnknownError);this.updateSize(),this.floorIndex=o.floorIndex,this.five.model.show(this.floorIndex);const u=o.modelOpacity,f=o.immediately?0:Os;tn(this.five,u,f),this.render(f)});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,_e.BreakOffByHide),this.showPromise=void 0;const o=G(G({},{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||Md(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();Sd(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:Ld/((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:It,attachedTo:Pt.BOUNDING_CENTER,getLabelElement:void 0,getRoomAreaText:l=>(l/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:l=>l.toString()},s=n?ei(n,["selector","scale"]):{},r=G(G({},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 W(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 Et(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 W(this,null,function*(){return yield Et(e.data)})}updateState(e,n){const o=this.state,s=e.config?G(G({},o.config),e.config):o.config;this.state=Ae(G(G({},this.state),e),{config:s}),!et(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=Ae(G({},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 Wi({target:this.container,intro:!0,props:n})}}const Td=(i,t)=>new zd(i,t);function Bd(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 jd(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 Vd extends Tt{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)=>W(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)=>W(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||!Yi(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=_i(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,_e.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=>W(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.five.model)!=null&&r.loaded))throw new Error(_e.ModelNotLoaded);if(!this.data)throw new Error(_e.DataNotLoaded);this.isHiddenByHideFunc=!1;const n={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},o=G(G({},n),e),s=()=>W(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 Jn(Rs(this.five,this.showState,o.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(_e.UnknownError);this.updateSize(),this.updatePosition(),this.floorIndex=o.floorIndex,this.five.model.show(this.floorIndex);const u=o.modelOpacity,f=o.immediately?0:Os;tn(this.five,u,f),this.render(f)});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,_e.BreakOffByHide),this.showPromise=void 0;const o=G(G({},{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(),Bd(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:(jd(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:It,attachedTo:Pt.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:a=>(a/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:a=>a.toString()},s=n?ei(n,["selector","scale"]):{},r=G(G({},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 W(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 Et(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=Hi(this.five,this.floorIndex,this.state.config.attachedTo),n=(a=this.five.model)==null?void 0:a.bounding.getCenter(new I.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 W(this,null,function*(){return yield Et(e.data)})}updateState(e,n){const o=this.state,s=e.config?G(G({},o.config),e.config):o.config;this.state=Ae(G(G({},this.state),e),{config:s}),!et(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=Ae(G({},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 Wi({target:this.container,intro:!0,props:n})}}const Qd=(i,t)=>new Vd(i,t);class Od extends Tt{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=_i(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:It,attachedTo:Pt.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:a=>(a/1e6).toFixed(1)+"\u33A1",getRuleDistanceText:a=>a.toString()},s=n?ei(n,["selector","scale"]):{},r=G(G({},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 W(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 Et(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=Hi(this.five,this.floorIndex,this.state.config.attachedTo),n=(a=this.five.model)==null?void 0:a.bounding.getCenter(new I.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 W(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 W(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 W(this,null,function*(){return yield Et(e.data)})}_show(e){return W(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 Fs(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 W(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?G(G({},o.config),e.config):o.config;this.state=Ae(G(G({},this.state),e),{config:s}),!et(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=Ae(G({},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 Wi({target:this.container,intro:!0,props:n})}}const Fd=(i,t)=>new Od(i,t);function Ui(i,t=200){let e;return function(...n){e||(i(...n),e=setTimeout(function(){e=null},t))}}function Rd(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 Gd(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"),L(n,"background-image","url("+(i[0]||It)+")"),L(n,"transform",i[1]),b(e,"class","plugin-radar__camera-position svelte-1nqrlxd"),L(e,"transform",i[2]),b(t,"class","plugin-radar__camera-wrapper svelte-1nqrlxd")},m(o,s){z(o,t,s),j(t,e),j(e,n)},p(o,[s]){s&1&&L(n,"background-image","url("+(o[0]||It)+")"),s&2&&L(n,"transform",o[1]),s&4&&L(e,"transform",o[2])},i:J,o:J,d(o){o&&M(t)}}}function Nd(i){return`rotate(${Math.floor(i/Math.PI*180)*-1+45}deg)`}function Wd(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 f(g,A){const p=g.bounding,v=g.observers[A];if(!v)return"";const y=(p.max.x-p.min.x)*r,w=(p.max.y-p.min.y)*r,P=Math.floor(v.positionInImage.x*y),E=Math.floor(v.positionInImage.y*w);return`translate(${P}px, ${E}px)`}function d(g){e(6,c=g)}const h=Ui(g=>{e(7,u=g.longitude)},1e3/60);return $e(()=>(s.on("panoWillArrive",d),s.on("cameraDirectionUpdate",h),function(){s.off("panoWillArrive",d),s.off("cameraDirectionUpdate",h)})),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=f(a,c)),i.$$.dirty&128&&e(1,o=Nd(u))},[l,o,n,s,r,a,c,u]}class Hd extends re{constructor(t){super(),se(this,t,Wd,Gd,oe,{five:3,pxmm:4,floorplanData:5,cameraImageUrl:0},Rd)}}function _d(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 Gs(i,t,e){const n=i.slice();return n[1]=t[e],n}function Ns(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=ne(),b(n,"class","plugin-pano-floorplan__extra-object-item svelte-1i87fz7"),L(n,"background-image",`url(${t[1].icon.url})`),L(n,"width",o),L(n,"height",s),b(e,"class","plugin-pano-floorplan__extra-object-item--position svelte-1i87fz7"),L(e,"top",a),L(e,"left",l),this.first=e},m(c,u){z(c,e,u),j(e,n),j(e,r)},p(c,u){t=c,u&1&&L(n,"background-image",`url(${t[1].icon.url})`),u&1&&o!==(o=`${t[1].icon.width/16}rem`)&&L(n,"width",o),u&1&&s!==(s=`${t[1].icon.height/16}rem`)&&L(n,"height",s),u&1&&a!==(a=`${t[1].positionInImage.y*100}%`)&&L(e,"top",a),u&1&&l!==(l=`${t[1].positionInImage.x*100}%`)&&L(e,"left",l)},d(c){c&&M(e)}}}function Xd(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=Gs(i,o,r),l=s(a);n.set(l,e[r]=Ns(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){z(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,Fi,Ns,null,Gs))},i:J,o:J,d(r){r&&M(t);for(let a=0;a<e.length;a+=1)e[a].d()}}}function Yd(i,t,e){let{extraObjects:n=[]}=t;return i.$$set=o=>{"extraObjects"in o&&e(0,n=o.extraObjects)},[n]}class Ud extends re{constructor(t){super(),se(this,t,Yd,Xd,oe,{extraObjects:0},_d)}}function Ws(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=Be(o,n[s]);return t=new Ls({props:o}),{c(){ee(t.$$.fragment)},m(s,r){K(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||(C(t.$$.fragment,s),e=!0)},o(s){D(t.$$.fragment,s),e=!1},d(s){$(t,s)}}}function Jd(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=Be(l,a[u]);t=new us({props:l}),n=new Ud({props:{extraObjects:i[5]}});let c=i[3]&&Ws(i);return{c(){ee(t.$$.fragment),e=ne(),ee(n.$$.fragment),o=ne(),c&&c.c(),s=pe()},m(u,f){K(t,u,f),z(u,e,f),K(n,u,f),z(u,o,f),c&&c.m(u,f),z(u,s,f),r=!0},p(u,[f]){const d=f&20?Fe(a,[{floorIndex:u[2],floorplanData:u[4]}]):{};t.$set(d);const h={};f&32&&(h.extraObjects=u[5]),n.$set(h),u[3]?c?(c.p(u,f),f&8&&C(c,1)):(c=Ws(u),c.c(),C(c,1),c.m(s.parentNode,s)):c&&(ae(),D(c,1,1,()=>{c=null}),le())},i(u){r||(C(t.$$.fragment,u),C(n.$$.fragment,u),C(c),r=!0)},o(u){D(t.$$.fragment,u),D(n.$$.fragment,u),D(c),r=!1},d(u){$(t,u),u&&M(e),$(n,u),u&&M(o),c&&c.d(u),u&&M(s)}}}function Zd(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=f=>{"five"in f&&e(0,o=f.five),"pxmm"in f&&e(1,s=f.pxmm),"floorIndex"in f&&e(2,r=f.floorIndex),"hoverEnable"in f&&e(3,a=f.hoverEnable),"floorplanData"in f&&e(4,l=f.floorplanData),"extraObjects"in f&&e(7,c=f.extraObjects)},i.$$.update=()=>{i.$$.dirty&132&&e(5,n=c==null?void 0:c.filter(f=>f.floorIndex===r))},[o,s,r,a,l,n,u,c]}class qd extends re{constructor(t){super(),se(this,t,Zd,Jd,oe,{five:0,pxmm:1,floorIndex:2,hoverEnable:3,floorplanData:4,extraObjects:7})}}function Kd(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 Hs(i){let t,e,n,o=i[6]!==0&&_s(i);return{c(){t=T("div"),o&&o.c(),b(t,"class","plugin-floorplan-radar svelte-1mvqyqq"),Le(()=>i[12].call(t))},m(s,r){z(s,t,r),o&&o.m(t,null),e=ft(t,i[12].bind(t)),n=!0},p(s,r){s[6]!==0?o?(o.p(s,r),r&64&&C(o,1)):(o=_s(s),o.c(),C(o,1),o.m(t,null)):o&&(ae(),D(o,1,1,()=>{o=null}),le())},i(s){n||(C(o),n=!0)},o(s){D(o),n=!1},d(s){s&&M(t),o&&o.d(),e()}}}function _s(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=Be(c,l[d]);e=new qd({props:c});const u=[{pxmm:i[9],five:i[0],floorplanData:i[3],cameraImageUrl:i[4]}];let f={};for(let d=0;d<u.length;d+=1)f=Be(f,u[d]);return o=new Hd({props:f}),{c(){t=T("div"),ee(e.$$.fragment),n=ne(),ee(o.$$.fragment),b(t,"class","plugin-floorplan-radar-container svelte-1mvqyqq"),L(t,"width",s),L(t,"height",r)},m(d,h){z(d,t,h),K(e,t,null),j(t,n),K(o,t,null),a=!0},p(d,h){const g=h&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 A=h&537?Fe(u,[{pxmm:d[9],five:d[0],floorplanData:d[3],cameraImageUrl:d[4]}]):{};o.$set(A),h&256&&s!==(s=`${d[8]}px`)&&L(t,"width",s),h&2048&&r!==(r=`${d[11]}px`)&&L(t,"height",r)},i(d){a||(C(e.$$.fragment,d),C(o.$$.fragment,d),a=!0)},o(d){D(e.$$.fragment,d),D(o.$$.fragment,d),a=!1},d(d){d&&M(t),$(e),$(o)}}}function $d(i){let t,e,n=i[1]&&Hs(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&C(n,1)):(n=Hs(o),n.c(),C(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(C(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function ef(i,t,e){var v,y;let{five:n}=t,{visible:o}=t,{hoverEnable:s}=t,{floorplanData:r}=t,{cameraImageUrl:a}=t,{extraObjects:l=[]}=t,c=0,u=(y=(v=n.work.observers[n.getCurrentState().panoIndex])==null?void 0:v.floorIndex)!=null?y:0,f=0,d=0,h=0,g=0;function A(w){e(10,u=n.work.observers[w].floorIndex)}$e(()=>(n.on("panoArrived",A),()=>{n.off("panoArrived",A)}));function p(){f=this.clientWidth,d=this.clientHeight,e(6,f),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(f,d),{max:P,min:E}=r.bounding,k=P.x-E.x,S=P.y-E.y,x=function(){return k>S?[w,w/k*S]:[w/S*k,w]}();e(8,h=x[0]),e(11,g=x[1]),e(9,c=h/k)}},[n,o,s,r,a,l,f,d,h,c,u,g,p]}class tf extends re{constructor(t){super(),se(this,t,ef,$d,oe,{five:0,visible:1,hoverEnable:2,floorplanData:3,cameraImageUrl:4,extraObjects:5},Kd)}}class nf extends Tt{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:It},s=n!=null&&n.configs?n.configs:{},r=G(G({},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 W(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 Et(a),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,l),n&&this.updateState(n,o),this.render()})}show(){return W(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 W(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=xd(e,this.five,this.data),this.render())}formatData(e){return W(this,null,function*(){return yield Et(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=G(G({},this.state),e),!et(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=Ae(G({},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 tf({target:this.wrapper,props:e})}}const of=(i,t)=>new nf(i,t),sf=[{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"}],rf=[{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"}],af=[{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"}],Ji=(i,t,e)=>{const n=new I.Matrix4,o=new I.Euler(i,t,e,"YXZ");return n.makeRotationFromEuler(o),n},lf=(i,{scale:t,rotation:e,position:n})=>{if(t&&i.scale.set(t,t,t),e){const[o,s,r]=e;o&&i.applyMatrix4(Ji(o,0,0)),s&&i.applyMatrix4(Ji(0,s,0)),r&&i.applyMatrix4(Ji(0,0,r))}return n&&i.position.set(n.x,n.y,n.z),i};function Xs(i,t){i.traverse(e=>{var n;if(e.type==="Mesh"){const o=e,s=G({map:o.material.map||{}},t);o.material=new O.MeshBasicMaterial(s),o.renderOrder=1,((n=e.parent)==null?void 0:n.type)==="Mesh"&&(e.renderOrder=e.parent.renderOrder+1)}})}const cf=(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=f=>W(this,null,function*(){var U;const d=(f==null?void 0:f.fbx_url)||e,h=(U=f==null?void 0:f.north_rad)!=null?U:n;if(typeof h!="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,A=g.max.x-g.min.x,p=g.max.z-g.min.z,v=Math.max(A,p),w=yield new Mn.FBXLoader().loadAsync(d);Xs(w,{transparent:!0,side:I.DoubleSide,blending:I.AdditiveBlending});const P=[0,h-Math.PI/2,0],{model:{bounding:{max:{x:E,z:k},min:{x:S,y:x,z:Q}}}}=i;o.yBase=x;const H={x:(E+S)/2,y:x-1.6,z:(k+Q)/2},F=.0045*v;return lf(w,{position:H,rotation:P,scale:F}),o.object=w,!0}),r=({latitude:f})=>{if(!o.object)return;const d=a(f);d&&(o.object.position.y=d)},a=f=>{if(o.yBase===void 0)return;const d=.6;if(f>=Math.PI/4)return o.yBase-(d+1.6);const h=f*(4/Math.PI);return o.yBase-(d*h+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 f=a(i.getPose().latitude);f&&(o.object.position.y=f),i.scene.add(o.object),i.needsRender=!0,i.on("cameraDirectionUpdate",r)}}};function uf(i,t){var c,u,f,d,h;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=(f=t==null?void 0:t.backgroundColor)!=null?f:"rgba(0,0,0,0)",s=(d=t==null?void 0:t.fontColor)!=null?d:"#fff",r=(h=t==null?void 0:t.textAlign)!=null?h:"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 O.CanvasTexture(a)}const df=({x:i,y:t,z:e})=>new O.Vector3(i,t,e),ff=(i,t)=>{var A,p,v;const e={},n=(A=t.animationEnabled)!=null?A:!0,o=(p=t.position)!=null?p:void 0,s=(v=t.rad)!=null?v:void 0,r=t.fbx_url||"//vrlab-image4.ljcdn.com/release/web/entryDoorMini/Anim_Door1.fbx",a=[],l=y=>W(this,null,function*(){var H,F,U,V,B,R,_,N;const w=(H=y==null?void 0:y.position)!=null?H:o;if(!w)return Promise.reject(new Error("ModelEntryDoorGuidePlugin.load(): position is undefined"));const P=df(w),E=(F=y==null?void 0:y.rad)!=null?F:s,k=(U=y==null?void 0:y.fbx_url)!=null?U:r;if(e.rad=E,E===void 0)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): rad is ${E}`));const S=yield new Mn.FBXLoader().loadAsync(k);S.position.copy(P),S.rotation.z=E,S.scale.set(.8,.8,.8),Xs(S,{transparent:!0,side:I.DoubleSide});const x=(_=(R=(B=(V=S.children)==null?void 0:V[0])==null?void 0:B.children)==null?void 0:R[3])==null?void 0:_.clone();if(!x)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): textMesh is ${x}`));const Q=(N=t.name)!=null?N:"\u5165\u6237\u95E8";return x.material=new O.MeshBasicMaterial({transparent:!0,map:uf(Q)}),x.renderOrder=3,S.children[0].add(x),e.object=S,!0}),c=()=>{if(e.animation)return;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.initAnimation(): state.object is ",e.object);const y=1,w=new O.AnimationMixer(e.object);a.push(w);const P=w.clipAction(e.object.animations[0]);P.timeScale=y;let E;const k=()=>{let H=0,F=0;const U=1e3/30,V=B=>{H=requestAnimationFrame(V);const R=B-F;R<U||(F=B,a.forEach(_=>_.update(R/1e3)),i.needsRender=!0)};return H=requestAnimationFrame(V),()=>{cancelAnimationFrame(H)}},Q={play:()=>{E||(P.play(),E=k(),requestAnimationFrame(()=>{e.object&&e.object.rotation.z!==e.rad&&(e.object.rotation.z=e.rad)}))},stop:()=>{P.stop(),E==null||E(),E=void 0}};e.animation=Q},u=y=>{var P;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.enable(): object is ",e.object);((P=y==null?void 0:y.animationEnable)!=null?P:n)&&(e.animation||c(),e.animation.play()),i.scene.add(e.object),i.needsRender=!0},f=()=>{!e.object||(e.animation&&e.animation.stop(),i.scene.remove(e.object),i.needsRender=!0)},d=y=>y==="Floorplan"?u():f();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,f(),i.off("modeChange",d)),!0)}};class Zi extends dn.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=ii(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=[],dn.default.remove(this)})}}function Ys(i,t=dn.default.Easing.Linear.None){const e=new Zi({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)),hf=window.cancelAnimationFrame||clearTimeout;function ni(i,t=0){t<=0?Cn(i):Cn(()=>ni(i,t-1))}function ii(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(){hf(e)}}function mf(){const i=Date.now();return new Promise(t=>{Cn(()=>{t(Date.now()-i)})})}const pf=zn.Easing;function gf(i,t,e,n=pf.Linear.None){const o=new zn.Tween(i).to(t,e).easing(n);ni(()=>o.start(0));const s=ii(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 Af(i,t){return gf({progress:0},{progress:1},i,t)}var Us=(i=>(i.Move="Move",i.Rotate="Rotate",i))(Us||{}),tt=(i=>(i.Clockwise="Clockwise",i.Anticlockwise="Anticlockwise",i.Loop="Loop",i))(tt||{});const oi=Math.PI*2;function Js(i){return(i%oi+oi)%oi}function Zs(i){return i%oi}function qi(i,t,e){return i+(t-i)*e}const Ki=(i,t,e)=>{const n=Math.PI,o=n*2;return i=Js(i),t=Js(t),e===tt.Anticlockwise&&i<t&&(i+=o),e===tt.Clockwise&&t<i&&(t+=o),e===tt.Loop&&t-i>n?Ki(i,t,tt.Anticlockwise):e===tt.Loop&&i-t>n?Ki(i,t,tt.Clockwise):{from:i,to:t}},vf=i=>{const t={},e=(l,c,...u)=>W(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((f,d)=>{const h=s.panoIndex!==void 0?s.panoIndex:i.panoIndex;h!==void 0?i.moveToPano(h,Object.assign({duration:r,moveEndCallback:()=>f(!0),moveCancelCallback:()=>d(!1)},s)):d(!1)})}),n=s=>{const r=i.state,a=Zs(r.latitude),l=Zs(s.latitude),{from:c,to:u}=Ki(r.longitude,s.longitude,s.rotation||tt.Loop),f=r.fov,d=s.fov;return{from:{latitude:a,longitude:c,fov:f},to:{latitude:l,longitude:u,fov:d}}};return{move:e,rotate:(l,c,...u)=>W(this,[l,c,...u],function*(s,r,a={}){t.interruptCallback&&t.interruptCallback(!1),a.asyncStartCallback&&(yield a.asyncStartCallback()),i.currentMode!==he.Five.Mode.Panorama&&(yield i.changeMode(he.Five.Mode.Panorama)),s.panoIndex!==void 0&&s.panoIndex!==i.panoIndex&&(a.preload&&(yield i.preloadPano(s.panoIndex)),yield new Promise((h,g)=>{if(!s.panoIndex){h(!0);return}i.moveToPano(s.panoIndex,{moveEndCallback:()=>h(!0),moveCancelCallback:()=>g(!1)})})),a.asyncEndCallback&&(yield a.asyncEndCallback());const{from:f,to:d}=n(s);return yield new Promise(h=>{const g=({progress:w})=>{const P={};P.longitude=qi(f.longitude,d.longitude,w),P.latitude=qi(f.latitude,d.latitude,w),P.fov=qi(f.fov,d.fov,w),i.setState(P,!0)},A=()=>{h(!0)},p=()=>{h(!1)},v=s.rotateSpeed?Math.ceil(Math.abs(d.longitude-f.longitude)/s.rotateSpeed*1e3):r,y=Af(v,zn.Easing.Linear.None).onUpdate(g).onComplete(A).onDestroy(p);s.rotation===tt.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),h(w)},t.timeoutId=setTimeout(()=>{t.interruptCallback&&t.interruptCallback(!0)},r)})})}};function qs(i,t){return i.x===t.x&&i.y===t.y}function Ks(i,t){return Math.abs(i)===1/0&&Math.abs(t)===1/0?!0:Math.abs(i-t)<.001}function si(i,t){return(t.y-i.y)/(t.x-i.x)}function $s(i,t,e){const n=si(i[1],i[0]),o=si(t[1],t[0]);if(isNaN(n)||isNaN(o)||Ks(n,o))return!1;if(ri(i[0],t))return i[0];if(ri(i[1],t))return i[1];if(ri(t[0],i))return t[0];if(ri(t[1],i))return t[1];if(e&&!bf(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 ri(i,t){return qs(i,t[0])||qs(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&&Ks(si(t[0],i),si(i,t[1]))}function ai(i,t,e){return(i.x-e.x)*(t.y-e.y)-(t.x-e.x)*(i.y-e.y)}function bf(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)&&ai(t[0],i[1],i[0])*ai(i[1],t[1],i[0])>0&&ai(i[0],t[1],t[0])*ai(t[1],i[1],t[0])>0?1:0}function er(i,t=0){t<=0?requestAnimationFrame(i):requestAnimationFrame(()=>er(i,t-1))}const yf=`<style type="text/css">
|
|
116
116
|
.PanoRulerPlugin-rule-line {
|
|
117
117
|
position: absolute;
|
|
118
118
|
transform-origin: left center;
|
|
@@ -541,7 +541,7 @@ void main() {
|
|
|
541
541
|
${i[8]?"transform: translateX(-50%); left: 50%":""}
|
|
542
542
|
${i[9]?"transform: translateX(-50%); top: 50%":""}
|
|
543
543
|
${i[7]?"transform: translate(-50%, -50%); left: 50%; top: 50%;":""}
|
|
544
|
-
`))&&b(t,"style",e),a&8&&L(t,"width",Ye(i[3])),a&16&&L(t,"height",Ye(i[4])),a&8192&&L(t,"z-index",i[13])},i(r){s||(r&&Le(()=>{o&&o.end(1),n=Mt(t,zt,{duration:i[0]}),n.start()}),s=!0)},o(r){n&&n.invalidate(),r&&(o=Zt(t,zt,{duration:i[1]})),s=!1},d(r){r&&M(t),r&&o&&o.end()}}}function ip(i){let t,e=i[2]&&$r(i);return{c(){e&&e.c(),t=pe()},m(n,o){e&&e.m(n,o),z(n,t,o)},p(n,[o]){n[2]?e?(e.p(n,o),o&4&&C(e,1)):(e=$r(n),e.c(),C(e,1),e.m(t.parentNode,t)):e&&(ae(),D(e,1,1,()=>{e=null}),le())},i(n){C(e)},o(n){D(e)},d(n){e&&e.d(n),n&&M(t)}}}function Ye(i){return typeof i=="number"?i/16+"rem":i}function op(i,t,e){let{inDelay:n=1e3}=t,{outDelay:o=1e3}=t,{visible:s=!0}=t,{width:r=0}=t,{height:a=0}=t,{left:l=0}=t,{bottom:c=0}=t,{center:u=!1}=t,{horizontalCenter:f=!1}=t,{verticalCenter:d=!1}=t,{blurRadius:h}=t,{spreadRadius:g}=t,{opacity:A=.15}=t,{zIndex:p=-1}=t;return i.$$set=v=>{"inDelay"in v&&e(0,n=v.inDelay),"outDelay"in v&&e(1,o=v.outDelay),"visible"in v&&e(2,s=v.visible),"width"in v&&e(3,r=v.width),"height"in v&&e(4,a=v.height),"left"in v&&e(5,l=v.left),"bottom"in v&&e(6,c=v.bottom),"center"in v&&e(7,u=v.center),"horizontalCenter"in v&&e(8,f=v.horizontalCenter),"verticalCenter"in v&&e(9,d=v.verticalCenter),"blurRadius"in v&&e(10,h=v.blurRadius),"spreadRadius"in v&&e(11,g=v.spreadRadius),"opacity"in v&&e(12,A=v.opacity),"zIndex"in v&&e(13,p=v.zIndex)},[n,o,s,r,a,l,c,u,f,d,h,g,A,p]}class nt extends re{constructor(t){super(),se(this,t,op,ip,oe,{inDelay:0,outDelay:1,visible:2,width:3,height:4,left:5,bottom:6,center:7,horizontalCenter:8,verticalCenter:9,blurRadius:10,spreadRadius:11,opacity:12,zIndex:13},np)}}function sp(i,t){t.forEach(e=>{const n=new I.SphereGeometry(.02,16,16),o=[],s=[new I.MeshBasicMaterial({color:16776960}),new I.MeshBasicMaterial({color:16711935}),new I.MeshBasicMaterial({color:16711680}),new I.MeshBasicMaterial({color:65535})];if(e.position.length===4)e.position.forEach((r,a)=>{const l=s[a],c=new I.Mesh(n,l);c.position.copy(lt(r)),o.push(c)});else{const r=s[0],a=new I.Mesh(n,r);a.position.copy(lt(e.position)),o.push(a)}o.forEach(r=>{r.material.depthTest=!1,i.scene.add(r)})})}const Re=i=>i;function ao(i){if(i.length<3)return;const t=i.map(pn),e=t[1].clone().sub(t[0]),n=t[2].clone().sub(t[1]);return e.cross(n)}var ea=(i=>(i.Audio="Audio",i.Text="Text",i.ImageText="ImageText",i.Image="Image",i.Video="Video",i.Link="Link",i.VRLink="VRLink",i.PanoLink="PanoLink",i.Marketing="Marketing",i.MediaPlane="MediaPlane",i.MediaModel="MediaModel",i.Custom="Custom",i.Unknown="Unknown",i))(ea||{}),ta=(i=>(i.Two="2D",i.Three="3D",i))(ta||{}),na=(i=>(i.PointTag="PointTag",i.PlaneTag="PlaneTag",i))(na||{});function rp(i){return i.stickType==="2DPoint"||i.stickType==="3DPoint"}function ap(i){return i.stickType==="3DPoint"||i.stickType==="Plane"}function We(i){return i.stickType==="Model"&&i.contentType==="MediaModel"}function lo(i){if(Array.isArray(i)&&i.length===4){const e=i.map(pn);return Ei(e[0],e[2])}else return pn(i)}function ia(i){if(rp(i))return lt(i==null?void 0:i.position);if(We(i)&&i.matrix){const t=new O.Matrix4().fromArray(i.matrix),e=i.data.mediaPosition.map(n=>new O.Vector3().fromArray(n).applyMatrix4(t));return Ei(e[0],e[2])}else return lo(i.position)}function In(i,t){if(i===void 0)return;const{min:e,max:n}=t!=null?t:{};if(!(e===void 0&&n===void 0))return!(typeof n=="number"&&n<i||typeof e=="number"&&e>i)}function lp(i){return new Promise(t=>{i.model.loaded?t():i.once("modelLoaded",()=>t())})}function cp(i,t,e){const o=new I.Plane().setFromNormalAndCoplanarPoint(e,t),s=t.clone().sub(i).cross(new I.Vector3(0,1,0)).setLength(.01),r=new I.Vector3(0,.01,0);return[t.clone().sub(s).sub(r),t.clone().add(s).sub(r),t.clone().add(s).add(r),t.clone().sub(s).add(r)].map(l=>o.projectPoint(l,new I.Vector3))}const oa=(i,t=1e3/60)=>{let e=null;const n=i;return(...s)=>{e&&clearTimeout(e),e=setTimeout(()=>{n==null||n(...s),e&&clearTimeout(e),e=null},t)}};function up(i,t=200){let e;return function(...n){e||(i.apply(this,n),e=setTimeout(function(){e=null},t))}}function dp(i,t){const[e,n]=t;if(e>=n||n<=1||e<=1)return-1;const o={},s=r=>(o[r]||(o[r]=i(r)),o[r]);for(let r=e;r<n;r++){const a=s(r),l=s(r-1);if(a<l)return r}return-1}function sa(i,t){if(!t||typeof ResizeObserver=="undefined"||!ResizeObserver)return{observe:()=>window.addEventListener("resize",i),unobserve:()=>window.removeEventListener("resize",i)};{const e=new ResizeObserver(i);return{observe:()=>e.observe(t),unobserve:()=>e.unobserve(t)}}}function fp(){return Math.random().toString(36).slice(-6)}const co=fp();function hp(i){ue(i,"svelte-1b2n9wi",".text-char.svelte-1b2n9wi{display:inline-block;text-shadow:0.125rem 0rem 0.5rem rgba(0, 0, 0, 0.15)}")}function ra(i,t,e){const n=i.slice();return n[18]=t[e].id,n[0]=t[e].content,n[19]=t,n[20]=e,n}function mp(i){let t,e=i[0]+"",n,o=i[20];const s=()=>i[9](t,o),r=()=>i[9](null,o);return{c(){t=T("span"),n=De(e),b(t,"class","text-char svelte-1b2n9wi")},m(a,l){z(a,t,l),j(t,n),s()},p(a,l){i=a,l&4&&e!==(e=i[0]+"")&&ze(n,e),o!==i[20]&&(r(),o=i[20],s())},d(a){a&&M(t),r()}}}function pp(i){let t,e=i[20];const n=()=>i[8](t,e),o=()=>i[8](null,e);return{c(){t=T("span"),t.textContent="\xA0",b(t,"class","text-char svelte-1b2n9wi")},m(s,r){z(s,t,r),n()},p(s,r){i=s,e!==i[20]&&(o(),e=i[20],n())},d(s){s&&M(t),o()}}}function aa(i,t){let e,n;function o(a,l){return a[0]===a[3]?pp:mp}let s=o(t),r=s(t);return{key:i,first:null,c(){e=pe(),r.c(),n=pe(),this.first=e},m(a,l){z(a,e,l),r.m(a,l),z(a,n,l)},p(a,l){t=a,s===(s=o(t))&&r?r.p(t,l):(r.d(1),r=s(t),r&&(r.c(),r.m(n.parentNode,n)))},d(a){a&&M(e),r.d(a),a&&M(n)}}}function gp(i){let t=[],e=new Map,n,o=i[2];const s=r=>r[18];for(let r=0;r<o.length;r+=1){let a=ra(i,o,r),l=s(a);e.set(l,t[r]=aa(l,a))}return{c(){for(let r=0;r<t.length;r+=1)t[r].c();n=pe()},m(r,a){for(let l=0;l<t.length;l+=1)t[l].m(r,a);z(r,n,a)},p(r,[a]){a&14&&(o=r[2],t=Ue(t,a,s,1,r,o,e,n.parentNode,Fi,aa,n,ra))},i:J,o:J,d(r){for(let a=0;a<t.length;a+=1)t[a].d(r);r&&M(n)}}}function Ap(i,t,e){let n,{inDelay:o=0}=t,{outDelay:s=0}=t,{content:r}=t,{unfolded:a}=t,{isFistUnfoldedUpdate:l=!0}=t;const c=`__EMOJI_SPLIT_${co}__`,u=`__EMOJI_${co}__`,f=`__SPACE_${co}__`;let d,h,g=[];function A(E){const k=[],S=new RegExp(new RegExp("\\p{Regional_Indicator}\\p{Regional_Indicator}|\\p{Emoji}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)?(\\u200D\\p{Emoji}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)?)+|\\p{Emoji_Presentation}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)?|\\p{Emoji}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)","gu"));return E.slice().replace(S,x=>`${c}${u}${x}${c}`).split(c).forEach(x=>x.startsWith(u)?k.push({id:He(),content:x.slice(u.length)}):k.push(...x.split("").map(Q=>Q===" "?f:Q).map(Q=>({id:He(),content:Q})))),k}function p(){if(!h)return;const E=!a;h.reversed!==E&&h.reverse(),h.play()}function v(E){if(l){e(4,l=!1);return}clearTimeout(d),d=setTimeout(p,E?o:s)}function y(E){const k=function(){const S=dp(x=>E[x].getBoundingClientRect().x,[Math.min(E.length-1,10),Math.min(E.length-1,30)]);if(S>0)return S}();h=Lo.default({targets:E.slice(0,k).filter(Ze),autoplay:!1,duration:400,scale:[.7,1],rotate:[20,0],opacity:[0,1],translateX:[4,0],translateY:[10,0],delay:Lo.default.stagger(50),easing:"easeInOutCubic"}),a&&h.seek(h.duration)}function w(E,k){Oe[E?"unshift":"push"](()=>{g[k]=E,e(1,g)})}function P(E,k){Oe[E?"unshift":"push"](()=>{g[k]=E,e(1,g)})}return i.$$set=E=>{"inDelay"in E&&e(5,o=E.inDelay),"outDelay"in E&&e(6,s=E.outDelay),"content"in E&&e(0,r=E.content),"unfolded"in E&&e(7,a=E.unfolded),"isFistUnfoldedUpdate"in E&&e(4,l=E.isFistUnfoldedUpdate)},i.$$.update=()=>{i.$$.dirty&1&&e(2,n=A(r)),i.$$.dirty&128&&v(a),i.$$.dirty&2&&y(g.filter(E=>!!E))},[r,g,n,f,l,o,s,a,w,P]}class la extends re{constructor(t){super(),se(this,t,Ap,gp,oe,{inDelay:5,outDelay:6,content:0,unfolded:7,isFistUnfoldedUpdate:4},hp)}}const vp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAKqADAAQAAAABAAAAKgAAAADUGqULAAAB0ElEQVRYCe2WSUoEQRBFLVHEiVZU1I03cKW38SSewRt4A5fiTty5cQIFR9pZQWkcUNSe2/Z9yISiSGxRkUAy4BGZSVX168gistraYsQKxArECsQKxApYqkDyU5lmsznMM+ZgAGpQhaUkSRbINgLJCXiCBtSgAkVYtGGIBTKj8AgKSVahDNvQa0IUkUG4Bx91BpLdBTOS/cgUIB3a+gMwI9mFzE3a0I3z5B4r292JzGVA8tSSZILMcUDyzIykthOZvYDk+V9Ktmz4yGzhOhV4/+5YU4N/hzqo0StX3Fg5TcnNlYvgs8bPsM4hkScHoyO46haRnGEYktQVI+4ypUYKyXtxyUu27JCceAMJvjo0HoM5CEZ7cPX7i013q3IWV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JAOZdFKzsq/nNjIssdufjbhQAEAUodOGDWp4m8S0oHEhb+YexGkD4EBUpdVMrfl/E/RhNJnsjF/ls0r980YRQDlAqBylIqylcCzf4lHecB5veigSfmYoBycaxN2SHgT8e7pWKZwCzqzZpigUr9DlRuoIxXn8pIZJgHtkwpa8togHIiw587LeNx9mc2ZwIK5DOlXJaMFqhWwoMp/Ax+1W+ToOXTHGKNrDMLLo38LmKsQKmbdSrWil+N82UJaS40YTuJv/RdtAdpzet+aJDzvMpQV71oo2gYX5RXG2HnYZXtouzNRzXE3R0KE6jWjZU2iaZ9u8pqpU3UfvwrYSgSBVDtGDurBlHn/zj0QMIh7qlDNOfmcBj9ihKo9o+l1euiWGxSE5eun3na6jxQk3joEgdQ7TR+FWutE43lhQpph3sQvISAVRa9ppRzipY4gZqdw8/WigIWDWt1gD8EIsqSLlT/KPUVlKSAujs2XTLYeRHiIlA2DVi1qkRtK8PSULaEDF+Ue7ashwkTlf8DQc/cITdx9+UAAAAASUVORK5CYII=",wp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAMAAAANIilAAAABcVBMVEUAAAAAAAD////////+/v45OTn////////39/fp6enPz8/7+/vw8PD+/v7x8fHc3NzHx8f////////+/v77+/vr6+v////7+/v5+fn////z8/P////////q6uqgoKD+/v79/f3m5ub+/v7////////////////39/f39/f////z8/P////t7e3s7Oz29vb////5+fn////h4eH////g4ODV1dX////////BwcH///////////+Ojo5zc3MlJSX////////////////////////7+/v////////////v7+/u7u7n5+f////39/f////09PT6+vr09PT+/v76+vr////5+fnv7+/09PTk5OT////////////////Jycn///++vr7///////+0tLT///9TU1P///8SEhL////////+/v76+vr////8/Pz39/ft7e3t7e36+vr////////X19fV1dX///+xsbF9fX1iYmL///////+K8mOEAAAAenRSTlMaAIDy8CD41cWRX9uk7Kl1VVEw6dWT/M/NvKyVkY475eWIgx0Z39rHv7axnZyZmIuKhn56emZjX1FEPTU0Kx4PCAX69fTgxcKkopWL7crJuri2sa6r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5GINsYhhmG8d7UXzcBgo2e21cd9WlUll5/7G958ql8uxu7y0zS5SGSkOGBA51TRiGQAi232Y9v4kVQZGavpt6c6l3tLpNsc38gGOC01IeLg4Xi8NaLz1KkqO0VzvcTrFscYo4oLjiRAsKEXeJPRqxW0bsFWLGLVbiocyZSm5vbW0nU9BsIfyp/AGqAvfOkBaFawAAAABJRU5ErkJggg==";function Cp(i){ue(i,"svelte-1ogmlqq",".arrow.svelte-1ogmlqq{width:100%;height:100%;background-size:100%;transition:transform 400ms ease-in-out;cursor:pointer;pointer-events:auto}.arrow-wrapper.svelte-1ogmlqq{position:relative;width:100%;height:100%}.arrow.left.svelte-1ogmlqq{transform:rotate(0deg)}.arrow.right.svelte-1ogmlqq{transform:rotate(-180deg)}.arrow.top.svelte-1ogmlqq{transform:rotate(90deg)}.arrow.bottom.svelte-1ogmlqq{transform:rotate(-90deg)}")}function ca(i){let t,e,n,o,s,r,a,l,c,u;return e=new nt({props:{center:!0,blurRadius:9,spreadRadius:3}}),{c(){t=T("div"),ee(e.$$.fragment),n=ne(),o=T("div"),b(o,"class",s="arrow "+i[0]+" svelte-1ogmlqq"),L(o,"background-image","url("+vp+")"),b(t,"class","arrow-wrapper svelte-1ogmlqq")},m(f,d){z(f,t,d),K(e,t,null),j(t,n),j(t,o),l=!0,c||(u=Pe(o,"click",i[5]),c=!0)},p(f,d){i=f,(!l||d&1&&s!==(s="arrow "+i[0]+" svelte-1ogmlqq"))&&b(o,"class",s)},i(f){l||(C(e.$$.fragment,f),f&&Le(()=>{a&&a.end(1),r=Mt(o,zt,{duration:i[2],delay:i[3],easing:qt}),r.start()}),l=!0)},o(f){D(e.$$.fragment,f),r&&r.invalidate(),f&&(a=Zt(o,zt,{duration:i[2],delay:i[4],easing:qt})),l=!1},d(f){f&&M(t),$(e),f&&a&&a.end(),c=!1,u()}}}function Pp(i){let t,e,n=i[1]&&ca(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&C(n,1)):(n=ca(o),n.c(),C(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(C(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function Ip(i,t,e){let{direction:n="right"}=t,{visible:o=!0}=t,{duration:s=0}=t,{inDelay:r=0}=t,{outDelay:a=0}=t;function l(c){bn.call(this,i,c)}return i.$$set=c=>{"direction"in c&&e(0,n=c.direction),"visible"in c&&e(1,o=c.visible),"duration"in c&&e(2,s=c.duration),"inDelay"in c&&e(3,r=c.inDelay),"outDelay"in c&&e(4,a=c.outDelay)},[n,o,s,r,a,l]}class Ep extends re{constructor(t){super(),se(this,t,Ip,Pp,oe,{direction:0,visible:1,duration:2,inDelay:3,outDelay:4},Cp)}}function kp(i,t,e=20,n=5){return new Promise((o,s)=>{let r=0;const a=setInterval(()=>{const l=i();t(l)?(clearInterval(a),o(l)):r>=n&&(clearInterval(a),s(l)),r++},e)})}function xp(i){ue(i,"svelte-1fuzm7v",".text.svelte-1fuzm7v{pointer-events:auto;box-sizing:border-box;display:inline-block;max-width:7.5rem;transition:transform 400ms ease-in-out;font-size:0.75rem;line-height:1.125rem;white-space:initial;cursor:pointer}.arrow.svelte-1fuzm7v{pointer-events:auto;display:inline-block;vertical-align:top;width:0.875rem;height:0.875rem;margin-left:0.125rem;margin-top:0.125rem}")}function ua(i){let t,e,n;return e=new la({props:{unfolded:i[0],content:i[1],inDelay:500,outDelay:i[5]}}),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","text svelte-1fuzm7v"),L(t,"transform",i[7])},m(o,s){z(o,t,s),K(e,t,null),i[10](t),n=!0},p(o,s){const r={};s&1&&(r.unfolded=o[0]),s&2&&(r.content=o[1]),s&32&&(r.outDelay=o[5]),e.$set(r),s&128&&L(t,"transform",o[7])},i(o){n||(C(e.$$.fragment,o),n=!0)},o(o){D(e.$$.fragment,o),n=!1},d(o){o&&M(t),$(e),i[10](null)}}}function da(i){let t,e,n;return e=new Ep({props:{direction:i[6],visible:i[0],inDelay:600,duration:1e3}}),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","arrow svelte-1fuzm7v")},m(o,s){z(o,t,s),K(e,t,null),n=!0},p(o,s){const r={};s&64&&(r.direction=o[6]),s&1&&(r.visible=o[0]),e.$set(r)},i(o){n||(C(e.$$.fragment,o),n=!0)},o(o){D(e.$$.fragment,o),n=!1},d(o){o&&M(t),$(e)}}}function Dp(i){let t,e,n,o=i[1]&&ua(i),s=i[3]<i[4]&&da(i);return{c(){o&&o.c(),t=ne(),s&&s.c(),e=pe()},m(r,a){o&&o.m(r,a),z(r,t,a),s&&s.m(r,a),z(r,e,a),n=!0},p(r,[a]){r[1]?o?(o.p(r,a),a&2&&C(o,1)):(o=ua(r),o.c(),C(o,1),o.m(t.parentNode,t)):o&&(ae(),D(o,1,1,()=>{o=null}),le()),r[3]<r[4]?s?(s.p(r,a),a&24&&C(s,1)):(s=da(r),s.c(),C(s,1),s.m(e.parentNode,e)):s&&(ae(),D(s,1,1,()=>{s=null}),le())},i(r){n||(C(o),C(s),n=!0)},o(r){D(o),D(s),n=!1},d(r){o&&o.d(r),r&&M(t),s&&s.d(r),r&&M(e)}}}function Lp(i,t,e){let n,o,s,{visible:r=!1}=t,{textUnfolded:a=!1}=t,{content:l}=t,c,u=0,f=0,d=0;function h(g){Oe[g?"unshift":"push"](()=>{c=g,e(2,c)})}return i.$$set=g=>{"visible"in g&&e(0,r=g.visible),"textUnfolded"in g&&e(8,a=g.textUnfolded),"content"in g&&e(1,l=g.content)},i.$$.update=()=>{if(i.$$.dirty&7&&c&&r&&l){const{lineHeight:g}=getComputedStyle(c);e(4,d=c.offsetHeight),kp(()=>c==null?void 0:c.offsetHeight,Boolean).then(()=>{e(4,d=c.offsetHeight)}),e(3,f=Number(g.replace("px","")))}i.$$.dirty&280&&e(9,u=a?f-d:0),i.$$.dirty&512&&e(7,n=`translateY(${u}px)`),i.$$.dirty&256&&e(6,o=a?"left":"right"),i.$$.dirty&256&&e(5,s=a?450:0)},[r,l,c,f,d,s,o,n,a,u,h]}class fa extends re{constructor(t){super(),se(this,t,Lp,Dp,oe,{visible:0,textUnfolded:8,content:1},xp)}}function Sp(i){ue(i,"svelte-nlvd3x",".content.svelte-nlvd3x{width:-moz-max-content;width:max-content;height:3.375rem;padding:2.25rem 0.25rem 0 1rem;position:absolute;left:0;bottom:0;overflow:hidden;box-sizing:border-box;font-size:0;pointer-events:none;white-space:nowrap;font-weight:600}")}function ha(i){var f,d;let t,e,n,o,s,r,a,l,c,u;return t=new nt({props:{visible:i[2],left:i[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}}),n=new ro({props:{unfolded:i[2],length:i[3],outDelay:i[4]+40*Math.min((d=(f=i[6][0])==null?void 0:f.content.length)!=null?d:10,15),useLinearColor:!0}}),r=new fa({props:{visible:i[2],textUnfolded:i[1],content:i[5]}}),{c(){ee(t.$$.fragment),e=ne(),ee(n.$$.fragment),o=ne(),s=T("div"),ee(r.$$.fragment),b(s,"class","content svelte-nlvd3x"),Le(()=>i[8].call(s))},m(h,g){K(t,h,g),z(h,e,g),K(n,h,g),z(h,o,g),z(h,s,g),K(r,s,null),a=ft(s,i[8].bind(s)),l=!0,c||(u=Pe(s,"click",i[7]),c=!0)},p(h,g){var y,w;const A={};g&4&&(A.visible=h[2]),g&8&&(A.left=h[3]/2+"px"),t.$set(A);const p={};g&4&&(p.unfolded=h[2]),g&8&&(p.length=h[3]),g&16&&(p.outDelay=h[4]+40*Math.min((w=(y=h[6][0])==null?void 0:y.content.length)!=null?w:10,15)),n.$set(p);const v={};g&4&&(v.visible=h[2]),g&2&&(v.textUnfolded=h[1]),g&32&&(v.content=h[5]),r.$set(v)},i(h){l||(C(t.$$.fragment,h),C(n.$$.fragment,h),C(r.$$.fragment,h),l=!0)},o(h){D(t.$$.fragment,h),D(n.$$.fragment,h),D(r.$$.fragment,h),l=!1},d(h){$(t,h),h&&M(e),$(n,h),h&&M(o),h&&M(s),$(r),a(),c=!1,u()}}}function Mp(i){let t,e,n=i[0].state&&ha(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&C(n,1)):(n=ha(o),n.c(),C(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(C(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function zp(i,t,e){let n,o,s,{tag:r}=t,a,l=!1,c=[];function u(){e(1,l=!l)}function f(){a=this.clientWidth,e(3,a)}return i.$$set=d=>{"tag"in d&&e(0,r=d.tag)},i.$$.update=()=>{var d,h,g;i.$$.dirty&1&&e(2,n=!!((d=r.state)!=null&&d.unfolded)),i.$$.dirty&1&&e(5,o=(g=(h=r.data.title)!=null?h:r.data.text)!=null?g:""),i.$$.dirty&4&&(n||setTimeout(()=>{e(1,l=!1)},20)),i.$$.dirty&2&&e(4,s=l?450:0)},[r,l,n,a,s,o,c,u,f]}class Tp extends re{constructor(t){super(),se(this,t,zp,Mp,oe,{tag:0},Sp)}}function xe(i){return i/16+"rem"}function Bp(i){ue(i,"svelte-i9wdo4",".text.svelte-i9wdo4{display:-webkit-box;display:-ms-box;display:-moz-box;position:relative;width:-moz-max-content;width:max-content;max-width:100%;-webkit-box-orient:vertical;-ms-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}@keyframes svelte-i9wdo4-blink{0%{opacity:1}50%{opacity:0}100%{opacity:1}}.caret.svelte-i9wdo4{position:absolute;width:0.0625rem;height:100%;background-color:#fff;animation:svelte-i9wdo4-blink 1.2s infinite}.placeholder.svelte-i9wdo4{opacity:0.5}")}function jp(i){let t;const e=i[6].default,n=_t(e,i,i[5],null);return{c(){n&&n.c()},m(o,s){n&&n.m(o,s),t=!0},p(o,s){n&&n.p&&(!t||s&32)&&Yt(n,e,o,o[5],t?Xt(e,o[5],s,null):Ut(o[5]),null)},i(o){t||(C(n,o),t=!0)},o(o){D(n,o),t=!1},d(o){n&&n.d(o)}}}function Vp(i){var s,r;let t,e,n=((s=i[3])==null?void 0:s.inputting)&&ma(),o=((r=i[3])==null?void 0:r.placeholder)&&pa(i);return{c(){n&&n.c(),t=ne(),o&&o.c(),e=pe()},m(a,l){n&&n.m(a,l),z(a,t,l),o&&o.m(a,l),z(a,e,l)},p(a,l){var c,u;(c=a[3])!=null&&c.inputting?n||(n=ma(),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null),(u=a[3])!=null&&u.placeholder?o?o.p(a,l):(o=pa(a),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null)},i:J,o:J,d(a){n&&n.d(a),a&&M(t),o&&o.d(a),a&&M(e)}}}function Qp(i){let t;return{c(){t=De(i[2])},m(e,n){z(e,t,n)},p(e,n){n&4&&ze(t,e[2])},i:J,o:J,d(e){e&&M(t)}}}function ma(i){let t;return{c(){t=T("div"),b(t,"class","caret svelte-i9wdo4")},m(e,n){z(e,t,n)},d(e){e&&M(t)}}}function pa(i){let t,e=i[3].placeholder+"",n;return{c(){t=T("span"),n=De(e),b(t,"class","placeholder svelte-i9wdo4")},m(o,s){z(o,t,s),j(t,n)},p(o,s){s&8&&e!==(e=o[3].placeholder+"")&&ze(n,e)},d(o){o&&M(t)}}}function Op(i){let t,e,n,o;const s=[Qp,Vp,jp],r=[];function a(l,c){return l[2]?0:l[4]?1:2}return e=a(i),n=r[e]=s[e](i),{c(){t=T("div"),n.c(),b(t,"class","text svelte-i9wdo4"),L(t,"max-width",typeof i[1]=="number"?xe(i[1]):i[1]),L(t,"-webkit-line-clamp",i[0])},m(l,c){z(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):(ae(),D(r[u],1,1,()=>{r[u]=null}),le(),n=r[e],n?n.p(l,c):(n=r[e]=s[e](l),n.c()),C(n,1),n.m(t,null)),c&2&&L(t,"max-width",typeof l[1]=="number"?xe(l[1]):l[1]),c&1&&L(t,"-webkit-line-clamp",l[0])},i(l){o||(C(n),o=!0)},o(l){D(n),o=!1},d(l){l&&M(t),r[e].d()}}}function Fp(i,t,e){let n,{$$slots:o={},$$scope:s}=t,{maxLine:r=1}=t,{maxWidth:a=null}=t,{text:l=null}=t,{edit:c=null}=t;return i.$$set=u=>{"maxLine"in u&&e(0,r=u.maxLine),"maxWidth"in u&&e(1,a=u.maxWidth),"text"in u&&e(2,l=u.text),"edit"in u&&e(3,c=u.edit),"$$scope"in u&&e(5,s=u.$$scope)},i.$$.update=()=>{i.$$.dirty&8&&e(4,n=(c==null?void 0:c.placeholder)||(c==null?void 0:c.inputting))},[r,a,l,c,n,s,o]}class uo extends re{constructor(t){super(),se(this,t,Fp,Op,oe,{maxLine:0,maxWidth:1,text:2,edit:3},Bp)}}function Rp(i){ue(i,"svelte-1oxrkr1",".plane__container.svelte-1oxrkr1.svelte-1oxrkr1{position:absolute;left:50%;transform:translate(-50%, -100%);width:-moz-max-content;width:max-content}.plane__wrapper.svelte-1oxrkr1.svelte-1oxrkr1{transition:transform 500ms linear, opacity 200ms linear;padding:0.625rem;background-color:rgba(0, 0, 0, 0.5);border:0.03125rem solid rgba(255, 255, 255, 0.3);border-radius:0.25rem}.unfolded.svelte-1oxrkr1 .plane__wrapper.svelte-1oxrkr1{transition-delay:200ms, 500ms;opacity:1}.folded.svelte-1oxrkr1 .plane__wrapper.svelte-1oxrkr1{opacity:0}.plane.svelte-1oxrkr1.svelte-1oxrkr1{max-width:11.75rem}.title.svelte-1oxrkr1.svelte-1oxrkr1{white-space:pre-wrap;font-weight:bold;font-size:0.75rem;line-height:1.125rem}.description.svelte-1oxrkr1.svelte-1oxrkr1{margin-top:0.25rem;white-space:pre-wrap;font-size:0.6875rem;line-height:1rem}")}function ga(i){var f,d;let t,e,n,o,s,r,a,l,c;t=new ro({props:{unfolded:i[1],direction:"vertical",length:15,duration:500,inDelay:200,useLinearColor:!0}}),a=new uo({props:{text:i[2],edit:(f=i[0].data.edit)==null?void 0:f.title}});let u=(i[0].data.description||((d=i[0].data.edit)==null?void 0:d.description))&&Aa(i);return{c(){ee(t.$$.fragment),e=ne(),n=T("div"),o=T("div"),s=T("div"),r=T("div"),ee(a.$$.fragment),l=ne(),u&&u.c(),b(r,"class","title svelte-1oxrkr1"),b(s,"class","plane svelte-1oxrkr1"),b(o,"class","plane__wrapper svelte-1oxrkr1"),L(o,"transform",i[1]?"translateY(-15px)":"translateY(0)"),b(n,"class","plane__container svelte-1oxrkr1"),q(n,"unfolded",i[1]),q(n,"folded",i[3])},m(h,g){K(t,h,g),z(h,e,g),z(h,n,g),j(n,o),j(o,s),j(s,r),K(a,r,null),j(s,l),u&&u.m(s,null),c=!0},p(h,g){var v,y;const A={};g&2&&(A.unfolded=h[1]),t.$set(A);const p={};g&4&&(p.text=h[2]),g&1&&(p.edit=(v=h[0].data.edit)==null?void 0:v.title),a.$set(p),h[0].data.description||((y=h[0].data.edit)==null?void 0:y.description)?u?(u.p(h,g),g&1&&C(u,1)):(u=Aa(h),u.c(),C(u,1),u.m(s,null)):u&&(ae(),D(u,1,1,()=>{u=null}),le()),g&2&&L(o,"transform",h[1]?"translateY(-15px)":"translateY(0)"),(!c||g&2)&&q(n,"unfolded",h[1]),(!c||g&8)&&q(n,"folded",h[3])},i(h){c||(C(t.$$.fragment,h),C(a.$$.fragment,h),C(u),c=!0)},o(h){D(t.$$.fragment,h),D(a.$$.fragment,h),D(u),c=!1},d(h){$(t,h),h&&M(e),h&&M(n),$(a),u&&u.d()}}}function Aa(i){var o;let t,e,n;return e=new uo({props:{text:i[0].data.description,edit:(o=i[0].data.edit)==null?void 0:o.description,maxLine:3}}),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","description svelte-1oxrkr1")},m(s,r){z(s,t,r),K(e,t,null),n=!0},p(s,r){var l;const a={};r&1&&(a.text=s[0].data.description),r&1&&(a.edit=(l=s[0].data.edit)==null?void 0:l.description),e.$set(a)},i(s){n||(C(e.$$.fragment,s),n=!0)},o(s){D(e.$$.fragment,s),n=!1},d(s){s&&M(t),$(e)}}}function Gp(i){let t,e,n=i[0].state&&ga(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&C(n,1)):(n=ga(o),n.c(),C(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(C(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function Np(i,t,e){let n,o,s,{tag:r}=t;return i.$$set=a=>{"tag"in a&&e(0,r=a.tag)},i.$$.update=()=>{var a,l,c;i.$$.dirty&1&&e(1,n=!!((a=r.state)!=null&&a.unfolded)),i.$$.dirty&2&&e(3,o=!n),i.$$.dirty&1&&e(2,s=(c=(l=r.data.title)!=null?l:r.data.text)!=null?c:"")},[r,n,s,o]}class Wp extends re{constructor(t){super(),se(this,t,Np,Gp,oe,{tag:0},Rp)}}function Hp(i){let t,e;return t=new Wp({props:{tag:i[0]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function _p(i){let t,e;return t=new Tp({props:{tag:i[0]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Xp(i){let t,e,n,o;const s=[_p,Hp],r=[];function a(l,c){return l[1]==="line"?0:l[1]==="plane"?1:-1}return~(t=a(i))&&(e=r[t]=s[t](i)),{c(){e&&e.c(),n=pe()},m(l,c){~t&&r[t].m(l,c),z(l,n,c),o=!0},p(l,[c]){let u=t;t=a(l),t===u?~t&&r[t].p(l,c):(e&&(ae(),D(r[u],1,1,()=>{r[u]=null}),le()),~t?(e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),C(e,1),e.m(n.parentNode,n)):e=null)},i(l){o||(C(e),o=!0)},o(l){D(e),o=!1},d(l){~t&&r[t].d(l),l&&M(n)}}}function Yp(i,t,e){let n,{tag:o}=t;return i.$$set=s=>{"tag"in s&&e(0,o=s.tag)},i.$$.update=()=>{var s;i.$$.dirty&1&&e(1,n=(s=o.data.appearance)!=null?s:"line")},[o,n]}class Up extends re{constructor(t){super(),se(this,t,Yp,Xp,oe,{tag:0})}}function Jp(i){ue(i,"svelte-blgtit",".line.svelte-blgtit{width:100%;height:100%;overflow:visible;pointer-events:none}")}function va(i){let t,e,n,o;return{c(){t=Ce("path"),b(t,"fill","none"),b(t,"stroke","url(#"+i[4]+")"),b(t,"stroke-width","1"),b(t,"d","M0 21 L14 0.5 L105 0.5")},m(s,r){z(s,t,r),o=!0},p(s,r){i=s},i(s){o||(s&&Le(()=>{n&&n.end(1),e=Mt(t,Kn,{duration:i[1],delay:i[0],easing:as}),e.start()}),o=!0)},o(s){e&&e.invalidate(),s&&(n=Zt(t,Kn,{duration:i[1],delay:i[2],easing:qt})),o=!1},d(s){s&&M(t),s&&n&&n.end()}}}function Zp(i){let t,e,n,o,s,r=i[3]&&va(i);return{c(){t=Ce("svg"),e=Ce("defs"),n=Ce("linearGradient"),o=Ce("stop"),s=Ce("stop"),r&&r.c(),b(o,"offset","25%"),b(o,"stop-color","white"),b(o,"stop-opacity","1"),b(s,"offset","100%"),b(s,"stop-color","white"),b(s,"stop-opacity","0.5"),b(n,"id",i[4]),b(n,"gradientUnits","userSpaceOnUse"),b(t,"class","line svelte-blgtit"),b(t,"viewBox","0 0 105 21")},m(a,l){z(a,t,l),j(t,e),j(e,n),j(n,o),j(n,s),r&&r.m(t,null)},p(a,[l]){a[3]?r?(r.p(a,l),l&8&&C(r,1)):(r=va(a),r.c(),C(r,1),r.m(t,null)):r&&(ae(),D(r,1,1,()=>{r=null}),le())},i(a){C(r)},o(a){D(r)},d(a){a&&M(t),r&&r.d()}}}function qp(i,t,e){let{inDelay:n=0}=t,{duration:o=1e3}=t,{outDelay:s=0}=t,{unfolded:r}=t;const a=He();return i.$$set=l=>{"inDelay"in l&&e(0,n=l.inDelay),"duration"in l&&e(1,o=l.duration),"outDelay"in l&&e(2,s=l.outDelay),"unfolded"in l&&e(3,r=l.unfolded)},[n,o,s,r,a]}class Kp extends re{constructor(t){super(),se(this,t,qp,Zp,oe,{inDelay:0,duration:1,outDelay:2,unfolded:3},Jp)}}function $p(i){ue(i,"svelte-1mgyhhn",`:root{--sc-dot-size:6px;--sc-active-dot-size:8px;--sc-dot-size-animation-time:250ms}.sc-carousel-dot__dot.svelte-1mgyhhn{background-color:var(--sc-color-rgb-light);border-radius:50%;display:inline-block;opacity:0.5;transition:opacity 100ms ease,\r
|
|
544
|
+
`))&&b(t,"style",e),a&8&&L(t,"width",Ye(i[3])),a&16&&L(t,"height",Ye(i[4])),a&8192&&L(t,"z-index",i[13])},i(r){s||(r&&Le(()=>{o&&o.end(1),n=Mt(t,zt,{duration:i[0]}),n.start()}),s=!0)},o(r){n&&n.invalidate(),r&&(o=Zt(t,zt,{duration:i[1]})),s=!1},d(r){r&&M(t),r&&o&&o.end()}}}function ip(i){let t,e=i[2]&&$r(i);return{c(){e&&e.c(),t=pe()},m(n,o){e&&e.m(n,o),z(n,t,o)},p(n,[o]){n[2]?e?(e.p(n,o),o&4&&C(e,1)):(e=$r(n),e.c(),C(e,1),e.m(t.parentNode,t)):e&&(ae(),D(e,1,1,()=>{e=null}),le())},i(n){C(e)},o(n){D(e)},d(n){e&&e.d(n),n&&M(t)}}}function Ye(i){return typeof i=="number"?i/16+"rem":i}function op(i,t,e){let{inDelay:n=1e3}=t,{outDelay:o=1e3}=t,{visible:s=!0}=t,{width:r=0}=t,{height:a=0}=t,{left:l=0}=t,{bottom:c=0}=t,{center:u=!1}=t,{horizontalCenter:f=!1}=t,{verticalCenter:d=!1}=t,{blurRadius:h}=t,{spreadRadius:g}=t,{opacity:A=.15}=t,{zIndex:p=-1}=t;return i.$$set=v=>{"inDelay"in v&&e(0,n=v.inDelay),"outDelay"in v&&e(1,o=v.outDelay),"visible"in v&&e(2,s=v.visible),"width"in v&&e(3,r=v.width),"height"in v&&e(4,a=v.height),"left"in v&&e(5,l=v.left),"bottom"in v&&e(6,c=v.bottom),"center"in v&&e(7,u=v.center),"horizontalCenter"in v&&e(8,f=v.horizontalCenter),"verticalCenter"in v&&e(9,d=v.verticalCenter),"blurRadius"in v&&e(10,h=v.blurRadius),"spreadRadius"in v&&e(11,g=v.spreadRadius),"opacity"in v&&e(12,A=v.opacity),"zIndex"in v&&e(13,p=v.zIndex)},[n,o,s,r,a,l,c,u,f,d,h,g,A,p]}class nt extends re{constructor(t){super(),se(this,t,op,ip,oe,{inDelay:0,outDelay:1,visible:2,width:3,height:4,left:5,bottom:6,center:7,horizontalCenter:8,verticalCenter:9,blurRadius:10,spreadRadius:11,opacity:12,zIndex:13},np)}}function sp(i,t){t.forEach(e=>{const n=new I.SphereGeometry(.02,16,16),o=[],s=[new I.MeshBasicMaterial({color:16776960}),new I.MeshBasicMaterial({color:16711935}),new I.MeshBasicMaterial({color:16711680}),new I.MeshBasicMaterial({color:65535})];if(e.position.length===4)e.position.forEach((r,a)=>{const l=s[a],c=new I.Mesh(n,l);c.position.copy(lt(r)),o.push(c)});else{const r=s[0],a=new I.Mesh(n,r);a.position.copy(lt(e.position)),o.push(a)}o.forEach(r=>{r.material.depthTest=!1,i.scene.add(r)})})}const Re=i=>i;function ao(i){if(i.length<3)return;const t=i.map(pn),e=t[1].clone().sub(t[0]),n=t[2].clone().sub(t[1]);return e.cross(n)}var ea=(i=>(i.Audio="Audio",i.Text="Text",i.ImageText="ImageText",i.Image="Image",i.Video="Video",i.Link="Link",i.Sticker="Sticker",i.VRLink="VRLink",i.PanoLink="PanoLink",i.Marketing="Marketing",i.MediaPlane="MediaPlane",i.MediaModel="MediaModel",i.Custom="Custom",i.Unknown="Unknown",i))(ea||{}),ta=(i=>(i.Two="2D",i.Three="3D",i))(ta||{}),na=(i=>(i.PointTag="PointTag",i.PlaneTag="PlaneTag",i))(na||{});function rp(i){return i.stickType==="2DPoint"||i.stickType==="3DPoint"}function ap(i){return i.stickType==="3DPoint"||i.stickType==="Plane"}function We(i){return i.stickType==="Model"&&i.contentType==="MediaModel"}function lo(i){if(Array.isArray(i)&&i.length===4){const e=i.map(pn);return Ei(e[0],e[2])}else return pn(i)}function ia(i){if(rp(i))return lt(i==null?void 0:i.position);if(We(i)&&i.matrix){const t=new O.Matrix4().fromArray(i.matrix),e=i.data.mediaPosition.map(n=>new O.Vector3().fromArray(n).applyMatrix4(t));return Ei(e[0],e[2])}else return lo(i.position)}function In(i,t){if(i===void 0)return;const{min:e,max:n}=t!=null?t:{};if(!(e===void 0&&n===void 0))return!(typeof n=="number"&&n<i||typeof e=="number"&&e>i)}function lp(i){return new Promise(t=>{i.model.loaded?t():i.once("modelLoaded",()=>t())})}function cp(i,t,e){const o=new I.Plane().setFromNormalAndCoplanarPoint(e,t),s=t.clone().sub(i).cross(new I.Vector3(0,1,0)).setLength(.01),r=new I.Vector3(0,.01,0);return[t.clone().sub(s).sub(r),t.clone().add(s).sub(r),t.clone().add(s).add(r),t.clone().sub(s).add(r)].map(l=>o.projectPoint(l,new I.Vector3))}const oa=(i,t=1e3/60)=>{let e=null;const n=i;return(...s)=>{e&&clearTimeout(e),e=setTimeout(()=>{n==null||n(...s),e&&clearTimeout(e),e=null},t)}};function up(i,t=200){let e;return function(...n){e||(i.apply(this,n),e=setTimeout(function(){e=null},t))}}function dp(i,t){const[e,n]=t;if(e>=n||n<=1||e<=1)return-1;const o={},s=r=>(o[r]||(o[r]=i(r)),o[r]);for(let r=e;r<n;r++){const a=s(r),l=s(r-1);if(a<l)return r}return-1}function sa(i,t){if(!t||typeof ResizeObserver=="undefined"||!ResizeObserver)return{observe:()=>window.addEventListener("resize",i),unobserve:()=>window.removeEventListener("resize",i)};{const e=new ResizeObserver(i);return{observe:()=>e.observe(t),unobserve:()=>e.unobserve(t)}}}function fp(){return Math.random().toString(36).slice(-6)}const co=fp();function hp(i){ue(i,"svelte-1b2n9wi",".text-char.svelte-1b2n9wi{display:inline-block;text-shadow:0.125rem 0rem 0.5rem rgba(0, 0, 0, 0.15)}")}function ra(i,t,e){const n=i.slice();return n[18]=t[e].id,n[0]=t[e].content,n[19]=t,n[20]=e,n}function mp(i){let t,e=i[0]+"",n,o=i[20];const s=()=>i[9](t,o),r=()=>i[9](null,o);return{c(){t=T("span"),n=De(e),b(t,"class","text-char svelte-1b2n9wi")},m(a,l){z(a,t,l),j(t,n),s()},p(a,l){i=a,l&4&&e!==(e=i[0]+"")&&ze(n,e),o!==i[20]&&(r(),o=i[20],s())},d(a){a&&M(t),r()}}}function pp(i){let t,e=i[20];const n=()=>i[8](t,e),o=()=>i[8](null,e);return{c(){t=T("span"),t.textContent="\xA0",b(t,"class","text-char svelte-1b2n9wi")},m(s,r){z(s,t,r),n()},p(s,r){i=s,e!==i[20]&&(o(),e=i[20],n())},d(s){s&&M(t),o()}}}function aa(i,t){let e,n;function o(a,l){return a[0]===a[3]?pp:mp}let s=o(t),r=s(t);return{key:i,first:null,c(){e=pe(),r.c(),n=pe(),this.first=e},m(a,l){z(a,e,l),r.m(a,l),z(a,n,l)},p(a,l){t=a,s===(s=o(t))&&r?r.p(t,l):(r.d(1),r=s(t),r&&(r.c(),r.m(n.parentNode,n)))},d(a){a&&M(e),r.d(a),a&&M(n)}}}function gp(i){let t=[],e=new Map,n,o=i[2];const s=r=>r[18];for(let r=0;r<o.length;r+=1){let a=ra(i,o,r),l=s(a);e.set(l,t[r]=aa(l,a))}return{c(){for(let r=0;r<t.length;r+=1)t[r].c();n=pe()},m(r,a){for(let l=0;l<t.length;l+=1)t[l].m(r,a);z(r,n,a)},p(r,[a]){a&14&&(o=r[2],t=Ue(t,a,s,1,r,o,e,n.parentNode,Fi,aa,n,ra))},i:J,o:J,d(r){for(let a=0;a<t.length;a+=1)t[a].d(r);r&&M(n)}}}function Ap(i,t,e){let n,{inDelay:o=0}=t,{outDelay:s=0}=t,{content:r}=t,{unfolded:a}=t,{isFistUnfoldedUpdate:l=!0}=t;const c=`__EMOJI_SPLIT_${co}__`,u=`__EMOJI_${co}__`,f=`__SPACE_${co}__`;let d,h,g=[];function A(E){const k=[],S=new RegExp(new RegExp("\\p{Regional_Indicator}\\p{Regional_Indicator}|\\p{Emoji}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)?(\\u200D\\p{Emoji}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)?)+|\\p{Emoji_Presentation}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)?|\\p{Emoji}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)","gu"));return E.slice().replace(S,x=>`${c}${u}${x}${c}`).split(c).forEach(x=>x.startsWith(u)?k.push({id:He(),content:x.slice(u.length)}):k.push(...x.split("").map(Q=>Q===" "?f:Q).map(Q=>({id:He(),content:Q})))),k}function p(){if(!h)return;const E=!a;h.reversed!==E&&h.reverse(),h.play()}function v(E){if(l){e(4,l=!1);return}clearTimeout(d),d=setTimeout(p,E?o:s)}function y(E){const k=function(){const S=dp(x=>E[x].getBoundingClientRect().x,[Math.min(E.length-1,10),Math.min(E.length-1,30)]);if(S>0)return S}();h=Lo.default({targets:E.slice(0,k).filter(Ze),autoplay:!1,duration:400,scale:[.7,1],rotate:[20,0],opacity:[0,1],translateX:[4,0],translateY:[10,0],delay:Lo.default.stagger(50),easing:"easeInOutCubic"}),a&&h.seek(h.duration)}function w(E,k){Oe[E?"unshift":"push"](()=>{g[k]=E,e(1,g)})}function P(E,k){Oe[E?"unshift":"push"](()=>{g[k]=E,e(1,g)})}return i.$$set=E=>{"inDelay"in E&&e(5,o=E.inDelay),"outDelay"in E&&e(6,s=E.outDelay),"content"in E&&e(0,r=E.content),"unfolded"in E&&e(7,a=E.unfolded),"isFistUnfoldedUpdate"in E&&e(4,l=E.isFistUnfoldedUpdate)},i.$$.update=()=>{i.$$.dirty&1&&e(2,n=A(r)),i.$$.dirty&128&&v(a),i.$$.dirty&2&&y(g.filter(E=>!!E))},[r,g,n,f,l,o,s,a,w,P]}class la extends re{constructor(t){super(),se(this,t,Ap,gp,oe,{inDelay:5,outDelay:6,content:0,unfolded:7,isFistUnfoldedUpdate:4},hp)}}const vp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAKqADAAQAAAABAAAAKgAAAADUGqULAAAB0ElEQVRYCe2WSUoEQRBFLVHEiVZU1I03cKW38SSewRt4A5fiTty5cQIFR9pZQWkcUNSe2/Z9yISiSGxRkUAy4BGZSVX168gistraYsQKxArECsQKxApYqkDyU5lmsznMM+ZgAGpQhaUkSRbINgLJCXiCBtSgAkVYtGGIBTKj8AgKSVahDNvQa0IUkUG4Bx91BpLdBTOS/cgUIB3a+gMwI9mFzE3a0I3z5B4r292JzGVA8tSSZILMcUDyzIykthOZvYDk+V9Ktmz4yGzhOhV4/+5YU4N/hzqo0StX3Fg5TcnNlYvgs8bPsM4hkScHoyO46haRnGEYktQVI+4ypUYKyXtxyUu27JCceAMJvjo0HoM5CEZ7cPX7i013q3IWVV5r2aw/2TK+svWbPGU68KQCa6pYeus1V0X99quSfvtVSc39lmfz2mdbz32tg1dAJ0421AVs9E7/FxBSezrMmjI/gm5/nYmMkBq+TqBs7LNgTlZH6EnWlPmORdk+pHQipUNfTxtg7p3NIXWRMvXfoqusmXsNhpC6crIS1Zf9C6yAOdlxpK5BW18CiT7A/G93gE+P0FY/RoO+RWqS62YhB2r4YhlixArECsQKxArECvzjCnwAOr0wF44ggHAAAAAASUVORK5CYII=",bp="data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et+aJDzvMpQV71oo2gYX5RXG2HnYZXtouzNRzXE3R0KE6jWjZU2iaZ9u8pqpU3UfvwrYSgSBVDtGDurBlHn/zj0QMIh7qlDNOfmcBj9ihKo9o+l1euiWGxSE5eun3na6jxQk3joEgdQ7TR+FWutE43lhQpph3sQvISAVRa9ppRzipY4gZqdw8/WigIWDWt1gD8EIsqSLlT/KPUVlKSAujs2XTLYeRHiIlA2DVi1qkRtK8PSULaEDF+Ue7ashwkTlf8DQc/cITdx9+UAAAAASUVORK5CYII=",wp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAMAAAANIilAAAABcVBMVEUAAAAAAAD////////+/v45OTn////////39/fp6enPz8/7+/vw8PD+/v7x8fHc3NzHx8f////////+/v77+/vr6+v////7+/v5+fn////z8/P////////q6uqgoKD+/v79/f3m5ub+/v7////////////////39/f39/f////z8/P////t7e3s7Oz29vb////5+fn////h4eH////g4ODV1dX////////BwcH///////////+Ojo5zc3MlJSX////////////////////////7+/v////////////v7+/u7u7n5+f////39/f////09PT6+vr09PT+/v76+vr////5+fnv7+/09PTk5OT////////////////Jycn///++vr7///////+0tLT///9TU1P///8SEhL////////+/v76+vr////8/Pz39/ft7e3t7e36+vr////////X19fV1dX///+xsbF9fX1iYmL///////+K8mOEAAAAenRSTlMaAIDy8CD41cWRX9uk7Kl1VVEw6dWT/M/NvKyVkY475eWIgx0Z39rHv7axnZyZmIuKhn56emZjX1FEPTU0Kx4PCAX69fTgxcKkopWL7crJuri2sa6rnIyHhX54bVtZVU9NSUcsJSIcFROno6Hcwp+ekHVxbWhnRC8nDLc9s8oAAAOGSURBVEjHpdd3X9pAGAfwkBBDAoQmBJmWvUWWiIDIHoJb66x7a4d78Op7pBQ1J5DY33987vnyXEIu3CGy/0hvnDthM+l0hj3JScSudDKOdhNPpl1i8Ut624Gi6+trI3zW1tcdqGM7/SIC5/ZRR2SNJEm7JkHt7FAJjR18WIs40P3cAFxIOaIRna6ZOHxGunk+TDR1ukjUk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100%;background-size:100%;transition:transform 400ms ease-in-out;cursor:pointer;pointer-events:auto}.arrow-wrapper.svelte-1ogmlqq{position:relative;width:100%;height:100%}.arrow.left.svelte-1ogmlqq{transform:rotate(0deg)}.arrow.right.svelte-1ogmlqq{transform:rotate(-180deg)}.arrow.top.svelte-1ogmlqq{transform:rotate(90deg)}.arrow.bottom.svelte-1ogmlqq{transform:rotate(-90deg)}")}function ca(i){let t,e,n,o,s,r,a,l,c,u;return e=new nt({props:{center:!0,blurRadius:9,spreadRadius:3}}),{c(){t=T("div"),ee(e.$$.fragment),n=ne(),o=T("div"),b(o,"class",s="arrow "+i[0]+" svelte-1ogmlqq"),L(o,"background-image","url("+vp+")"),b(t,"class","arrow-wrapper svelte-1ogmlqq")},m(f,d){z(f,t,d),K(e,t,null),j(t,n),j(t,o),l=!0,c||(u=Pe(o,"click",i[5]),c=!0)},p(f,d){i=f,(!l||d&1&&s!==(s="arrow "+i[0]+" svelte-1ogmlqq"))&&b(o,"class",s)},i(f){l||(C(e.$$.fragment,f),f&&Le(()=>{a&&a.end(1),r=Mt(o,zt,{duration:i[2],delay:i[3],easing:qt}),r.start()}),l=!0)},o(f){D(e.$$.fragment,f),r&&r.invalidate(),f&&(a=Zt(o,zt,{duration:i[2],delay:i[4],easing:qt})),l=!1},d(f){f&&M(t),$(e),f&&a&&a.end(),c=!1,u()}}}function Pp(i){let t,e,n=i[1]&&ca(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&C(n,1)):(n=ca(o),n.c(),C(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(C(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function Ip(i,t,e){let{direction:n="right"}=t,{visible:o=!0}=t,{duration:s=0}=t,{inDelay:r=0}=t,{outDelay:a=0}=t;function l(c){bn.call(this,i,c)}return i.$$set=c=>{"direction"in c&&e(0,n=c.direction),"visible"in c&&e(1,o=c.visible),"duration"in c&&e(2,s=c.duration),"inDelay"in c&&e(3,r=c.inDelay),"outDelay"in c&&e(4,a=c.outDelay)},[n,o,s,r,a,l]}class Ep extends re{constructor(t){super(),se(this,t,Ip,Pp,oe,{direction:0,visible:1,duration:2,inDelay:3,outDelay:4},Cp)}}function kp(i,t,e=20,n=5){return new Promise((o,s)=>{let r=0;const a=setInterval(()=>{const l=i();t(l)?(clearInterval(a),o(l)):r>=n&&(clearInterval(a),s(l)),r++},e)})}function xp(i){ue(i,"svelte-1fuzm7v",".text.svelte-1fuzm7v{pointer-events:auto;box-sizing:border-box;display:inline-block;max-width:7.5rem;transition:transform 400ms ease-in-out;font-size:0.75rem;line-height:1.125rem;white-space:initial;cursor:pointer}.arrow.svelte-1fuzm7v{pointer-events:auto;display:inline-block;vertical-align:top;width:0.875rem;height:0.875rem;margin-left:0.125rem;margin-top:0.125rem}")}function ua(i){let t,e,n;return e=new la({props:{unfolded:i[0],content:i[1],inDelay:500,outDelay:i[5]}}),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","text svelte-1fuzm7v"),L(t,"transform",i[7])},m(o,s){z(o,t,s),K(e,t,null),i[10](t),n=!0},p(o,s){const r={};s&1&&(r.unfolded=o[0]),s&2&&(r.content=o[1]),s&32&&(r.outDelay=o[5]),e.$set(r),s&128&&L(t,"transform",o[7])},i(o){n||(C(e.$$.fragment,o),n=!0)},o(o){D(e.$$.fragment,o),n=!1},d(o){o&&M(t),$(e),i[10](null)}}}function da(i){let t,e,n;return e=new Ep({props:{direction:i[6],visible:i[0],inDelay:600,duration:1e3}}),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","arrow svelte-1fuzm7v")},m(o,s){z(o,t,s),K(e,t,null),n=!0},p(o,s){const r={};s&64&&(r.direction=o[6]),s&1&&(r.visible=o[0]),e.$set(r)},i(o){n||(C(e.$$.fragment,o),n=!0)},o(o){D(e.$$.fragment,o),n=!1},d(o){o&&M(t),$(e)}}}function Dp(i){let t,e,n,o=i[1]&&ua(i),s=i[3]<i[4]&&da(i);return{c(){o&&o.c(),t=ne(),s&&s.c(),e=pe()},m(r,a){o&&o.m(r,a),z(r,t,a),s&&s.m(r,a),z(r,e,a),n=!0},p(r,[a]){r[1]?o?(o.p(r,a),a&2&&C(o,1)):(o=ua(r),o.c(),C(o,1),o.m(t.parentNode,t)):o&&(ae(),D(o,1,1,()=>{o=null}),le()),r[3]<r[4]?s?(s.p(r,a),a&24&&C(s,1)):(s=da(r),s.c(),C(s,1),s.m(e.parentNode,e)):s&&(ae(),D(s,1,1,()=>{s=null}),le())},i(r){n||(C(o),C(s),n=!0)},o(r){D(o),D(s),n=!1},d(r){o&&o.d(r),r&&M(t),s&&s.d(r),r&&M(e)}}}function Lp(i,t,e){let n,o,s,{visible:r=!1}=t,{textUnfolded:a=!1}=t,{content:l}=t,c,u=0,f=0,d=0;function h(g){Oe[g?"unshift":"push"](()=>{c=g,e(2,c)})}return i.$$set=g=>{"visible"in g&&e(0,r=g.visible),"textUnfolded"in g&&e(8,a=g.textUnfolded),"content"in g&&e(1,l=g.content)},i.$$.update=()=>{if(i.$$.dirty&7&&c&&r&&l){const{lineHeight:g}=getComputedStyle(c);e(4,d=c.offsetHeight),kp(()=>c==null?void 0:c.offsetHeight,Boolean).then(()=>{e(4,d=c.offsetHeight)}),e(3,f=Number(g.replace("px","")))}i.$$.dirty&280&&e(9,u=a?f-d:0),i.$$.dirty&512&&e(7,n=`translateY(${u}px)`),i.$$.dirty&256&&e(6,o=a?"left":"right"),i.$$.dirty&256&&e(5,s=a?450:0)},[r,l,c,f,d,s,o,n,a,u,h]}class fa extends re{constructor(t){super(),se(this,t,Lp,Dp,oe,{visible:0,textUnfolded:8,content:1},xp)}}function Sp(i){ue(i,"svelte-nlvd3x",".content.svelte-nlvd3x{width:-moz-max-content;width:max-content;height:3.375rem;padding:2.25rem 0.25rem 0 1rem;position:absolute;left:0;bottom:0;overflow:hidden;box-sizing:border-box;font-size:0;pointer-events:none;white-space:nowrap;font-weight:600}")}function ha(i){var f,d;let t,e,n,o,s,r,a,l,c,u;return t=new nt({props:{visible:i[2],left:i[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}}),n=new ro({props:{unfolded:i[2],length:i[3],outDelay:i[4]+40*Math.min((d=(f=i[6][0])==null?void 0:f.content.length)!=null?d:10,15),useLinearColor:!0}}),r=new fa({props:{visible:i[2],textUnfolded:i[1],content:i[5]}}),{c(){ee(t.$$.fragment),e=ne(),ee(n.$$.fragment),o=ne(),s=T("div"),ee(r.$$.fragment),b(s,"class","content svelte-nlvd3x"),Le(()=>i[8].call(s))},m(h,g){K(t,h,g),z(h,e,g),K(n,h,g),z(h,o,g),z(h,s,g),K(r,s,null),a=ft(s,i[8].bind(s)),l=!0,c||(u=Pe(s,"click",i[7]),c=!0)},p(h,g){var y,w;const A={};g&4&&(A.visible=h[2]),g&8&&(A.left=h[3]/2+"px"),t.$set(A);const p={};g&4&&(p.unfolded=h[2]),g&8&&(p.length=h[3]),g&16&&(p.outDelay=h[4]+40*Math.min((w=(y=h[6][0])==null?void 0:y.content.length)!=null?w:10,15)),n.$set(p);const v={};g&4&&(v.visible=h[2]),g&2&&(v.textUnfolded=h[1]),g&32&&(v.content=h[5]),r.$set(v)},i(h){l||(C(t.$$.fragment,h),C(n.$$.fragment,h),C(r.$$.fragment,h),l=!0)},o(h){D(t.$$.fragment,h),D(n.$$.fragment,h),D(r.$$.fragment,h),l=!1},d(h){$(t,h),h&&M(e),$(n,h),h&&M(o),h&&M(s),$(r),a(),c=!1,u()}}}function Mp(i){let t,e,n=i[0].state&&ha(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&C(n,1)):(n=ha(o),n.c(),C(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(C(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function zp(i,t,e){let n,o,s,{tag:r}=t,a,l=!1,c=[];function u(){e(1,l=!l)}function f(){a=this.clientWidth,e(3,a)}return i.$$set=d=>{"tag"in d&&e(0,r=d.tag)},i.$$.update=()=>{var d,h,g;i.$$.dirty&1&&e(2,n=!!((d=r.state)!=null&&d.unfolded)),i.$$.dirty&1&&e(5,o=(g=(h=r.data.title)!=null?h:r.data.text)!=null?g:""),i.$$.dirty&4&&(n||setTimeout(()=>{e(1,l=!1)},20)),i.$$.dirty&2&&e(4,s=l?450:0)},[r,l,n,a,s,o,c,u,f]}class Tp extends re{constructor(t){super(),se(this,t,zp,Mp,oe,{tag:0},Sp)}}function xe(i){return i/16+"rem"}function Bp(i){ue(i,"svelte-i9wdo4",".text.svelte-i9wdo4{display:-webkit-box;display:-ms-box;display:-moz-box;position:relative;width:-moz-max-content;width:max-content;max-width:100%;-webkit-box-orient:vertical;-ms-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}@keyframes svelte-i9wdo4-blink{0%{opacity:1}50%{opacity:0}100%{opacity:1}}.caret.svelte-i9wdo4{position:absolute;width:0.0625rem;height:100%;background-color:#fff;animation:svelte-i9wdo4-blink 1.2s infinite}.placeholder.svelte-i9wdo4{opacity:0.5}")}function jp(i){let t;const e=i[6].default,n=_t(e,i,i[5],null);return{c(){n&&n.c()},m(o,s){n&&n.m(o,s),t=!0},p(o,s){n&&n.p&&(!t||s&32)&&Yt(n,e,o,o[5],t?Xt(e,o[5],s,null):Ut(o[5]),null)},i(o){t||(C(n,o),t=!0)},o(o){D(n,o),t=!1},d(o){n&&n.d(o)}}}function Vp(i){var s,r;let t,e,n=((s=i[3])==null?void 0:s.inputting)&&ma(),o=((r=i[3])==null?void 0:r.placeholder)&&pa(i);return{c(){n&&n.c(),t=ne(),o&&o.c(),e=pe()},m(a,l){n&&n.m(a,l),z(a,t,l),o&&o.m(a,l),z(a,e,l)},p(a,l){var c,u;(c=a[3])!=null&&c.inputting?n||(n=ma(),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null),(u=a[3])!=null&&u.placeholder?o?o.p(a,l):(o=pa(a),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null)},i:J,o:J,d(a){n&&n.d(a),a&&M(t),o&&o.d(a),a&&M(e)}}}function Qp(i){let t;return{c(){t=De(i[2])},m(e,n){z(e,t,n)},p(e,n){n&4&&ze(t,e[2])},i:J,o:J,d(e){e&&M(t)}}}function ma(i){let t;return{c(){t=T("div"),b(t,"class","caret svelte-i9wdo4")},m(e,n){z(e,t,n)},d(e){e&&M(t)}}}function pa(i){let t,e=i[3].placeholder+"",n;return{c(){t=T("span"),n=De(e),b(t,"class","placeholder svelte-i9wdo4")},m(o,s){z(o,t,s),j(t,n)},p(o,s){s&8&&e!==(e=o[3].placeholder+"")&&ze(n,e)},d(o){o&&M(t)}}}function Op(i){let t,e,n,o;const s=[Qp,Vp,jp],r=[];function a(l,c){return l[2]?0:l[4]?1:2}return e=a(i),n=r[e]=s[e](i),{c(){t=T("div"),n.c(),b(t,"class","text svelte-i9wdo4"),L(t,"max-width",typeof i[1]=="number"?xe(i[1]):i[1]),L(t,"-webkit-line-clamp",i[0])},m(l,c){z(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):(ae(),D(r[u],1,1,()=>{r[u]=null}),le(),n=r[e],n?n.p(l,c):(n=r[e]=s[e](l),n.c()),C(n,1),n.m(t,null)),c&2&&L(t,"max-width",typeof l[1]=="number"?xe(l[1]):l[1]),c&1&&L(t,"-webkit-line-clamp",l[0])},i(l){o||(C(n),o=!0)},o(l){D(n),o=!1},d(l){l&&M(t),r[e].d()}}}function Fp(i,t,e){let n,{$$slots:o={},$$scope:s}=t,{maxLine:r=1}=t,{maxWidth:a=null}=t,{text:l=null}=t,{edit:c=null}=t;return i.$$set=u=>{"maxLine"in u&&e(0,r=u.maxLine),"maxWidth"in u&&e(1,a=u.maxWidth),"text"in u&&e(2,l=u.text),"edit"in u&&e(3,c=u.edit),"$$scope"in u&&e(5,s=u.$$scope)},i.$$.update=()=>{i.$$.dirty&8&&e(4,n=(c==null?void 0:c.placeholder)||(c==null?void 0:c.inputting))},[r,a,l,c,n,s,o]}class uo extends re{constructor(t){super(),se(this,t,Fp,Op,oe,{maxLine:0,maxWidth:1,text:2,edit:3},Bp)}}function Rp(i){ue(i,"svelte-1oxrkr1",".plane__container.svelte-1oxrkr1.svelte-1oxrkr1{position:absolute;left:50%;transform:translate(-50%, -100%);width:-moz-max-content;width:max-content}.plane__wrapper.svelte-1oxrkr1.svelte-1oxrkr1{transition:transform 500ms linear, opacity 200ms linear;padding:0.625rem;background-color:rgba(0, 0, 0, 0.5);border:0.03125rem solid rgba(255, 255, 255, 0.3);border-radius:0.25rem}.unfolded.svelte-1oxrkr1 .plane__wrapper.svelte-1oxrkr1{transition-delay:200ms, 500ms;opacity:1}.folded.svelte-1oxrkr1 .plane__wrapper.svelte-1oxrkr1{opacity:0}.plane.svelte-1oxrkr1.svelte-1oxrkr1{max-width:11.75rem}.title.svelte-1oxrkr1.svelte-1oxrkr1{white-space:pre-wrap;font-weight:bold;font-size:0.75rem;line-height:1.125rem}.description.svelte-1oxrkr1.svelte-1oxrkr1{margin-top:0.25rem;white-space:pre-wrap;font-size:0.6875rem;line-height:1rem}")}function ga(i){var f,d;let t,e,n,o,s,r,a,l,c;t=new ro({props:{unfolded:i[1],direction:"vertical",length:15,duration:500,inDelay:200,useLinearColor:!0}}),a=new uo({props:{text:i[2],edit:(f=i[0].data.edit)==null?void 0:f.title}});let u=(i[0].data.description||((d=i[0].data.edit)==null?void 0:d.description))&&Aa(i);return{c(){ee(t.$$.fragment),e=ne(),n=T("div"),o=T("div"),s=T("div"),r=T("div"),ee(a.$$.fragment),l=ne(),u&&u.c(),b(r,"class","title svelte-1oxrkr1"),b(s,"class","plane svelte-1oxrkr1"),b(o,"class","plane__wrapper svelte-1oxrkr1"),L(o,"transform",i[1]?"translateY(-15px)":"translateY(0)"),b(n,"class","plane__container svelte-1oxrkr1"),q(n,"unfolded",i[1]),q(n,"folded",i[3])},m(h,g){K(t,h,g),z(h,e,g),z(h,n,g),j(n,o),j(o,s),j(s,r),K(a,r,null),j(s,l),u&&u.m(s,null),c=!0},p(h,g){var v,y;const A={};g&2&&(A.unfolded=h[1]),t.$set(A);const p={};g&4&&(p.text=h[2]),g&1&&(p.edit=(v=h[0].data.edit)==null?void 0:v.title),a.$set(p),h[0].data.description||((y=h[0].data.edit)==null?void 0:y.description)?u?(u.p(h,g),g&1&&C(u,1)):(u=Aa(h),u.c(),C(u,1),u.m(s,null)):u&&(ae(),D(u,1,1,()=>{u=null}),le()),g&2&&L(o,"transform",h[1]?"translateY(-15px)":"translateY(0)"),(!c||g&2)&&q(n,"unfolded",h[1]),(!c||g&8)&&q(n,"folded",h[3])},i(h){c||(C(t.$$.fragment,h),C(a.$$.fragment,h),C(u),c=!0)},o(h){D(t.$$.fragment,h),D(a.$$.fragment,h),D(u),c=!1},d(h){$(t,h),h&&M(e),h&&M(n),$(a),u&&u.d()}}}function Aa(i){var o;let t,e,n;return e=new uo({props:{text:i[0].data.description,edit:(o=i[0].data.edit)==null?void 0:o.description,maxLine:3}}),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","description svelte-1oxrkr1")},m(s,r){z(s,t,r),K(e,t,null),n=!0},p(s,r){var l;const a={};r&1&&(a.text=s[0].data.description),r&1&&(a.edit=(l=s[0].data.edit)==null?void 0:l.description),e.$set(a)},i(s){n||(C(e.$$.fragment,s),n=!0)},o(s){D(e.$$.fragment,s),n=!1},d(s){s&&M(t),$(e)}}}function Gp(i){let t,e,n=i[0].state&&ga(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&C(n,1)):(n=ga(o),n.c(),C(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(C(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function Np(i,t,e){let n,o,s,{tag:r}=t;return i.$$set=a=>{"tag"in a&&e(0,r=a.tag)},i.$$.update=()=>{var a,l,c;i.$$.dirty&1&&e(1,n=!!((a=r.state)!=null&&a.unfolded)),i.$$.dirty&2&&e(3,o=!n),i.$$.dirty&1&&e(2,s=(c=(l=r.data.title)!=null?l:r.data.text)!=null?c:"")},[r,n,s,o]}class Wp extends re{constructor(t){super(),se(this,t,Np,Gp,oe,{tag:0},Rp)}}function Hp(i){let t,e;return t=new Wp({props:{tag:i[0]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function _p(i){let t,e;return t=new Tp({props:{tag:i[0]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function Xp(i){let t,e,n,o;const s=[_p,Hp],r=[];function a(l,c){return l[1]==="line"?0:l[1]==="plane"?1:-1}return~(t=a(i))&&(e=r[t]=s[t](i)),{c(){e&&e.c(),n=pe()},m(l,c){~t&&r[t].m(l,c),z(l,n,c),o=!0},p(l,[c]){let u=t;t=a(l),t===u?~t&&r[t].p(l,c):(e&&(ae(),D(r[u],1,1,()=>{r[u]=null}),le()),~t?(e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),C(e,1),e.m(n.parentNode,n)):e=null)},i(l){o||(C(e),o=!0)},o(l){D(e),o=!1},d(l){~t&&r[t].d(l),l&&M(n)}}}function Yp(i,t,e){let n,{tag:o}=t;return i.$$set=s=>{"tag"in s&&e(0,o=s.tag)},i.$$.update=()=>{var s;i.$$.dirty&1&&e(1,n=(s=o.data.appearance)!=null?s:"line")},[o,n]}class Up extends re{constructor(t){super(),se(this,t,Yp,Xp,oe,{tag:0})}}function Jp(i){ue(i,"svelte-blgtit",".line.svelte-blgtit{width:100%;height:100%;overflow:visible;pointer-events:none}")}function va(i){let t,e,n,o;return{c(){t=Ce("path"),b(t,"fill","none"),b(t,"stroke","url(#"+i[4]+")"),b(t,"stroke-width","1"),b(t,"d","M0 21 L14 0.5 L105 0.5")},m(s,r){z(s,t,r),o=!0},p(s,r){i=s},i(s){o||(s&&Le(()=>{n&&n.end(1),e=Mt(t,Kn,{duration:i[1],delay:i[0],easing:as}),e.start()}),o=!0)},o(s){e&&e.invalidate(),s&&(n=Zt(t,Kn,{duration:i[1],delay:i[2],easing:qt})),o=!1},d(s){s&&M(t),s&&n&&n.end()}}}function Zp(i){let t,e,n,o,s,r=i[3]&&va(i);return{c(){t=Ce("svg"),e=Ce("defs"),n=Ce("linearGradient"),o=Ce("stop"),s=Ce("stop"),r&&r.c(),b(o,"offset","25%"),b(o,"stop-color","white"),b(o,"stop-opacity","1"),b(s,"offset","100%"),b(s,"stop-color","white"),b(s,"stop-opacity","0.5"),b(n,"id",i[4]),b(n,"gradientUnits","userSpaceOnUse"),b(t,"class","line svelte-blgtit"),b(t,"viewBox","0 0 105 21")},m(a,l){z(a,t,l),j(t,e),j(e,n),j(n,o),j(n,s),r&&r.m(t,null)},p(a,[l]){a[3]?r?(r.p(a,l),l&8&&C(r,1)):(r=va(a),r.c(),C(r,1),r.m(t,null)):r&&(ae(),D(r,1,1,()=>{r=null}),le())},i(a){C(r)},o(a){D(r)},d(a){a&&M(t),r&&r.d()}}}function qp(i,t,e){let{inDelay:n=0}=t,{duration:o=1e3}=t,{outDelay:s=0}=t,{unfolded:r}=t;const a=He();return i.$$set=l=>{"inDelay"in l&&e(0,n=l.inDelay),"duration"in l&&e(1,o=l.duration),"outDelay"in l&&e(2,s=l.outDelay),"unfolded"in l&&e(3,r=l.unfolded)},[n,o,s,r,a]}class Kp extends re{constructor(t){super(),se(this,t,qp,Zp,oe,{inDelay:0,duration:1,outDelay:2,unfolded:3},Jp)}}function $p(i){ue(i,"svelte-1mgyhhn",`:root{--sc-dot-size:6px;--sc-active-dot-size:8px;--sc-dot-size-animation-time:250ms}.sc-carousel-dot__dot.svelte-1mgyhhn{background-color:var(--sc-color-rgb-light);border-radius:50%;display:inline-block;opacity:0.5;transition:opacity 100ms ease,\r
|
|
545
545
|
height var(--sc-dot-size-animation-time) ease,\r
|
|
546
546
|
width var(--sc-dot-size-animation-time) ease;cursor:pointer;-webkit-tap-highlight-color:transparent;height:var(--sc-dot-size);width:var(--sc-dot-size)}.sc-carousel-dot__dot.svelte-1mgyhhn:hover{opacity:0.9}.sc-carousel-dot__dot_active.svelte-1mgyhhn{opacity:0.7;height:var(--sc-active-dot-size);width:var(--sc-active-dot-size)}`)}function eg(i){let t,e,n;return{c(){t=T("button"),b(t,"class","sc-carousel-button sc-carousel-dot__dot svelte-1mgyhhn"),q(t,"sc-carousel-dot__dot_active",i[0])},m(o,s){z(o,t,s),e||(n=Pe(t,"click",i[1]),e=!0)},p(o,[s]){s&1&&q(t,"sc-carousel-dot__dot_active",o[0])},i:J,o:J,d(o){o&&M(t),e=!1,n()}}}function tg(i,t,e){let{active:n=!1}=t;function o(s){bn.call(this,i,s)}return i.$$set=s=>{"active"in s&&e(0,n=s.active)},[n,o]}class ng extends re{constructor(t){super(),se(this,t,tg,eg,oe,{active:0},$p)}}function ig(i){ue(i,"svelte-670fde",".sc-carousel-dots__container.svelte-670fde{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;padding:0 30px}.sc-carousel-dots__dot-container.svelte-670fde{height:calc(var(--sc-dot-size) + 14px);width:calc(var(--sc-dot-size) + 10px);display:flex;align-items:center;justify-content:center}")}function ba(i,t,e){const n=i.slice();return n[5]=t[e],n[7]=e,n}function ya(i,t){let e,n,o,s;function r(){return t[3](t[7])}return n=new ng({props:{active:t[1]===t[7]}}),n.$on("click",r),{key:i,first:null,c(){e=T("div"),ee(n.$$.fragment),o=ne(),b(e,"class","sc-carousel-dots__dot-container svelte-670fde"),this.first=e},m(a,l){z(a,e,l),K(n,e,null),j(e,o),s=!0},p(a,l){t=a;const c={};l&3&&(c.active=t[1]===t[7]),n.$set(c)},i(a){s||(C(n.$$.fragment,a),s=!0)},o(a){D(n.$$.fragment,a),s=!1},d(a){a&&M(e),$(n)}}}function og(i){let t,e=[],n=new Map,o,s=Array(i[0]);const r=a=>a[7];for(let a=0;a<s.length;a+=1){let l=ba(i,s,a),c=r(l);n.set(c,e[a]=ya(c,l))}return{c(){t=T("div");for(let a=0;a<e.length;a+=1)e[a].c();b(t,"class","sc-carousel-dots__container svelte-670fde")},m(a,l){z(a,t,l);for(let c=0;c<e.length;c+=1)e[c].m(t,null);o=!0},p(a,[l]){l&7&&(s=Array(a[0]),ae(),e=Ue(e,l,r,1,a,s,n,t,Ct,ya,null,ba),le())},i(a){if(!o){for(let l=0;l<s.length;l+=1)C(e[l]);o=!0}},o(a){for(let l=0;l<e.length;l+=1)D(e[l]);o=!1},d(a){a&&M(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}function sg(i,t,e){const n=vn();let{pagesCount:o=1}=t,{currentPageIndex:s=0}=t;function r(l){n("pageChange",l)}const a=l=>r(l);return i.$$set=l=>{"pagesCount"in l&&e(0,o=l.pagesCount),"currentPageIndex"in l&&e(1,s=l.currentPageIndex)},[o,s,r,a]}class rg extends re{constructor(t){super(),se(this,t,sg,og,oe,{pagesCount:0,currentPageIndex:1},ig)}}const on="prev",xt="next";function ag(i){ue(i,"svelte-1bftafx",":root{--sc-arrow-size:2px}.sc-carousel-arrow__circle.svelte-1bftafx{width:20px;height:20px;border-radius:50%;background-color:var(--sc-color-rgb-light-50p);display:flex;align-items:center;justify-content:center;transition:opacity 100ms ease;cursor:pointer;-webkit-tap-highlight-color:transparent}.sc-carousel-arrow__circle.svelte-1bftafx:hover{opacity:0.9}.sc-carousel-arrow__arrow.svelte-1bftafx{border:solid var(--sc-color-hex-dark);border-width:0 var(--sc-arrow-size) var(--sc-arrow-size) 0;padding:var(--sc-arrow-size);position:relative}.sc-carousel-arrow__arrow-next.svelte-1bftafx{transform:rotate(-45deg);left:calc(var(--sc-arrow-size) / -2)}.sc-carousel-arrow__arrow-prev.svelte-1bftafx{transform:rotate(135deg);right:calc(var(--sc-arrow-size) / -2)}.sc-carousel-arrow__circle_disabled.svelte-1bftafx,.sc-carousel-arrow__circle_disabled.svelte-1bftafx:hover{opacity:0.5}")}function lg(i){let t,e,n,o;return{c(){t=T("button"),e=T("i"),b(e,"class","sc-carousel-arrow__arrow svelte-1bftafx"),q(e,"sc-carousel-arrow__arrow-next",i[0]===xt),q(e,"sc-carousel-arrow__arrow-prev",i[0]===on),b(t,"class","sc-carousel-button sc-carousel-arrow__circle svelte-1bftafx"),q(t,"sc-carousel-arrow__circle_disabled",i[1])},m(s,r){z(s,t,r),j(t,e),n||(o=Pe(t,"click",i[2]),n=!0)},p(s,[r]){r&1&&q(e,"sc-carousel-arrow__arrow-next",s[0]===xt),r&1&&q(e,"sc-carousel-arrow__arrow-prev",s[0]===on),r&2&&q(t,"sc-carousel-arrow__circle_disabled",s[1])},i:J,o:J,d(s){s&&M(t),n=!1,o()}}}function cg(i,t,e){let{direction:n=xt}=t,{disabled:o=!1}=t;function s(r){bn.call(this,i,r)}return i.$$set=r=>{"direction"in r&&e(0,n=r.direction),"disabled"in r&&e(1,o=r.disabled)},[n,o,s]}class wa extends re{constructor(t){super(),se(this,t,cg,lg,oe,{direction:0,disabled:1},ag)}}function ug(i){ue(i,"svelte-i7yfid",".sc-carousel-progress__indicator.svelte-i7yfid{height:100%;background-color:var(--sc-color-hex-dark-50p)}")}function dg(i){let t;return{c(){t=T("div"),b(t,"class","sc-carousel-progress__indicator svelte-i7yfid"),L(t,"width",i[0]+"%")},m(e,n){z(e,t,n)},p(e,[n]){n&1&&L(t,"width",e[0]+"%")},i:J,o:J,d(e){e&&M(t)}}}const Ca=100;function fg(i,t,e){let n,{value:o=0}=t;return i.$$set=s=>{"value"in s&&e(1,o=s.value)},i.$$.update=()=>{i.$$.dirty&2&&e(0,n=Math.min(Math.max(o*Ca,0),Ca))},[n,o]}class hg extends re{constructor(t){super(),se(this,t,fg,dg,oe,{value:1},ug)}}function mg(i,t){i.addEventListener("mousedown",t),i.addEventListener("touchstart",t,{passive:!0})}function pg(i,t){i.removeEventListener("mousedown",t),i.removeEventListener("touchstart",t)}function gg(i,t){i.addEventListener("mouseup",t),i.addEventListener("touchend",t)}function Pa(i,t){i.removeEventListener("mouseup",t),i.removeEventListener("touchend",t)}function Ag(i,t){i.addEventListener("mousemove",t),i.addEventListener("touchmove",t)}function Ia(i,t){i.removeEventListener("mousemove",t),i.removeEventListener("touchmove",t)}function fo(i){return function(t,e){i.dispatchEvent(new CustomEvent(t,{detail:e}))}}const vg=110,bg=9,yg=111,wg=20;function ho(i){if("TouchEvent"in window&&i instanceof TouchEvent){const t=i.touches[0];return{x:t?t.clientX:0,y:t?t.clientY:0}}return{x:i.clientX,y:i.clientY}}function Cg(i,{thresholdProvider:t}){const e=fo(i);let n,o,s=0,r,a=!1;function l(){return Date.now()-r>=yg&&Math.abs(s)>=wg}function c(d){r=Date.now(),s=0,a=!0;const h=ho(d);n=h.x,o=h.y,e("swipeStart",{x:n,y:o}),Ag(window,u),gg(window,f)}function u(d){if(!a)return;const h=ho(d),g=h.x-n,A=h.y-o;n=h.x,o=h.y,e("swipeMove",{x:n,y:o,dx:g,dy:A}),g!==0&&Math.sign(g)!==Math.sign(s)&&(s=0),s+=g,Math.abs(s)>t()&&(e("swipeThresholdReached",{direction:s>0?on:xt}),Pa(window,f),Ia(window,u))}function f(d){if(Pa(window,f),Ia(window,u),a=!1,!l()){e("swipeFailed");return}const h=ho(d);e("swipeEnd",{x:h.x,y:h.y})}return mg(i,c),{destroy(){pg(i,c)}}}function Pg(i,t){i.addEventListener("mouseenter",t)}function Ig(i,t){i.removeEventListener("mouseenter",t)}function Eg(i,t){i.addEventListener("mouseleave",t)}function Ea(i,t){i.removeEventListener("mouseleave",t)}function kg(i){const t=fo(i);function e(){Eg(i,n),t("hovered",{value:!0})}function n(){t("hovered",{value:!1}),Ea(i,n)}return Pg(i,e),{destroy(){Ig(i,e),Ea(i,n)}}}const xg=(i,t)=>{const e=t.x-i.x,n=t.y-i.y;return Math.sqrt(e*e+n*n)};function sn(i,t,e){return Math.max(i,Math.min(t,e))}function Dg(i,t){i.addEventListener("touchstart",t,{passive:!0})}function Lg(i,t){i.removeEventListener("touchstart",t)}function Sg(i,t){i.addEventListener("touchend",t)}function ka(i,t){i.removeEventListener("touchend",t)}function Mg(i){const t=fo(i);let e=0,n={x:0,y:0};function o({tapEndedAt:a,tapEndedPos:l}){const c=a-e,u=xg(n,l);return c<=vg&&u<=bg}function s(a){e=Date.now();const l=a.touches[0];n={x:l.clientX,y:l.clientY},Sg(i,r)}function r(a){ka(i,r);const l=a.changedTouches[0];o({tapEndedAt:Date.now(),tapEndedPos:{x:l.clientX,y:l.clientY}})&&t("tapped")}return Dg(i,s),{destroy(){Lg(i,s),ka(i,r)}}}function zg({currentParticleIndex:i,particlesCount:t,clonesCountHead:e,clonesCountTotal:n,particlesToScroll:o}){return i===t-e?0:i===0?xa({particlesCountWithoutClones:t-n,particlesToScroll:o})-1:Math.floor((i-e)/o)}function Tg({currentParticleIndex:i,particlesToScroll:t}){return Math.ceil(i/t)}function Bg({currentParticleIndex:i,particlesCount:t,clonesCountHead:e,clonesCountTotal:n,infinite:o,particlesToScroll:s}){return o?zg({currentParticleIndex:i,particlesCount:t,clonesCountHead:e,clonesCountTotal:n,particlesToScroll:s}):Tg({currentParticleIndex:i,particlesToScroll:s})}function xa({particlesCountWithoutClones:i,particlesToScroll:t}){return Math.ceil(i/t)}function jg({particlesCountWithoutClones:i,particlesToScroll:t,particlesToShow:e}){const n=Da({particlesCountWithoutClones:i,particlesToScroll:t,particlesToShow:e});return Math.ceil(i/t)-n}function Vg({infinite:i,particlesCountWithoutClones:t,particlesToScroll:e,particlesToShow:n}){return i?xa({particlesCountWithoutClones:t,particlesToScroll:e}):jg({particlesCountWithoutClones:t,particlesToScroll:e,particlesToShow:n})}function Qg({pageIndex:i,clonesCountHead:t,clonesCountTail:e,particlesToScroll:n,particlesCount:o}){return sn(0,Math.min(t+i*n,o-e),o-1)}function Og({pageIndex:i,particlesToScroll:t,particlesCount:e,particlesToShow:n}){return sn(0,Math.min(i*t,e-n),e-1)}function mo({infinite:i,pageIndex:t,clonesCountHead:e,clonesCountTail:n,particlesToScroll:o,particlesCount:s,particlesToShow:r}){return i?Qg({pageIndex:t,clonesCountHead:e,clonesCountTail:n,particlesToScroll:o,particlesCount:s}):Og({pageIndex:t,particlesToScroll:o,particlesCount:s,particlesToShow:r})}function Fg({particlesContainerChildren:i,particleWidth:t}){for(let e=0;e<i.length;e++)i[e].style.minWidth=`${t}px`,i[e].style.maxWidth=`${t}px`}function Da({particlesToScroll:i,particlesToShow:t,particlesCountWithoutClones:e}){const n=i-t;let o=t;for(;;){const s=e-o-n;if(s<t)return Math.max(s,0);o+=t+n}}function Rg(i){return new ResizeObserver(t=>{i({width:t[0].contentRect.width})})}function Gg({clonesCountHead:i,clonesCountTail:t,particlesContainerChildren:e}){const n=[];for(let r=0;r<t;r++)n.push(e[r].cloneNode(!0));const o=[],s=e.length;for(let r=s-1;r>s-1-i;r--)o.push(e[r].cloneNode(!0));return{clonesToAppend:n,clonesToPrepend:o}}function Ng({particlesContainer:i,clonesToAppend:t,clonesToPrepend:e}){for(let n=0;n<t.length;n++)i.append(t[n]);for(let n=0;n<e.length;n++)i.prepend(e[n])}function Wg({infinite:i,particlesToShow:t,partialPageSize:e}){const n=i?{head:Math.ceil(e||t),tail:Math.ceil(t)}:{head:0,tail:0};return Ae(G({},n),{total:n.head+n.tail})}const En=(i,t,e)=>{if(i&&i.hasOwnProperty(t))return i[t];if(e===void 0)throw new Error(`Required arg "${t}" was not provided`);return e},po=i=>t=>{i[t]&&i[t]()},Hg=(i,t)=>Hl.default(i,t),_g=i=>Object.keys(i||{}),Xg=(i,t)=>{const e={};return i.forEach(n=>{e[n]=t[n]}),e},Yg=()=>{const i={},t=(e,n)=>{const{watcherName:o,fn:s}=e,{prop:r,value:a}=n;i[o]||(i[o]={deps:{},fn:s}),i[o].deps[r]=a};return{subscribers:i,subscribe(e,n){e&&t(e,n)},notify(e,n){Object.entries(i).forEach(([o,{deps:s,fn:r}])=>{const a=_g(s);if(a.includes(n)){const l=Xg(a,e);Hg(s,l)||(i[o].deps=l,r())}})}}},Ug=()=>{let i=null;return{targetWatcher(t,e){i={watcherName:t,fn:e},i.fn(),i=null},getTarget(){return i}}};function Jg(i,t){const e=Tn.default(i,"data",{}),n=Tn.default(i,"watch",{}),o=Tn.default(i,"methods",{}),s=Tn.default(t,"onChange",()=>{}),{subscribe:r,notify:a,subscribers:l}=Yg(),{targetWatcher:c,getTarget:u}=Ug();let f;const d={},h=()=>({data:f,methods:d});let g=!1;const A=v=>(...y)=>{g=!0;const w=v(...y);return g=!1,w};Object.entries(o).forEach(([v,y])=>{d[v]=A((...w)=>y(h(),...w)),Object.defineProperty(d[v],"name",{value:v})}),f=new Proxy(Wl.default(e),{get(v,y){return u()&&!g&&r(u(),{prop:y,value:v[y]}),Reflect.get(...arguments)},set(v,y,w){return v[y]===w||(Reflect.set(...arguments),u()||(s&&s(y,w),a(f,y))),!0}}),Object.entries(n).forEach(([v,y])=>{c(v,()=>{y(h())})});const p=[f,d];return p._internal={_getSubscribers(){return l}},p}function Zg({pageIndex:i,particlesToShow:t,particlesToScroll:e,particlesCount:n}){const o=i===0?0:t-e,s=i*t-i*o,r=s+Math.max(t,e)-1,a=[];for(let l=s;l<=Math.min(n-1,r);l++)a.push(l);return a}function qg({infinite:i,pageIndex:t,pagesCount:e,particlesCount:n,particlesToShow:o,particlesToScroll:s}){const r=sn(0,t,e-1);let a=r-1,l=r+1;a=i?a<0?e-1:a:Math.max(0,a),l=i?l>e-1?0:l:Math.min(e-1,l);const c=[...new Set([a,r,l,0,e-1])].sort((f,d)=>f-d),u=c.flatMap(f=>Zg({pageIndex:f,particlesToShow:o,particlesToScroll:s,particlesCount:n}));return{pageIndexes:c,particleIndexes:[...new Set(u)].sort((f,d)=>f-d)}}const Kg=(i,t)=>(i(),setInterval(i,t)),$g=35,La=1;class e0{constructor({onProgressValueChange:t}){this._onProgressValueChange=t,this._autoplayDuration,this._onProgressValueChange,this._interval,this._paused=!1}setAutoplayDuration(t){this._autoplayDuration=t}start(t){return new Promise(e=>{this.reset();const n=Math.min($g,Math.max(this._autoplayDuration,1));let o=-n;this._interval=Kg(()=>W(this,null,function*(){if(this._paused)return;o+=n;const s=o/this._autoplayDuration;this._onProgressValueChange(s),s>La&&(this.reset(),yield t(),e())}),n)})}pause(){this._paused=!0}resume(){this._paused=!1}reset(){clearInterval(this._interval),this._onProgressValueChange(La)}}function t0(i){const t=new e0({onProgressValueChange:r=>{i("progressValue",1-r)}}),e=Jg({data:{particlesCountWithoutClones:0,particlesToShow:1,particlesToShowInit:1,particlesToScroll:1,particlesToScrollInit:1,particlesCount:1,currentParticleIndex:1,infinite:!1,autoplayDuration:1e3,clonesCountHead:0,clonesCountTail:0,clonesCountTotal:0,partialPageSize:1,currentPageIndex:1,pagesCount:1,pauseOnFocus:!1,focused:!1,autoplay:!1,autoplayDirection:"next",disabled:!1,durationMsInit:1e3,durationMs:1e3,offset:0,particleWidth:0,loaded:[]},watch:{setLoaded({data:r}){r.loaded=qg({infinite:r.infinite,pageIndex:r.currentPageIndex,pagesCount:r.pagesCount,particlesCount:r.particlesCountWithoutClones,particlesToShow:r.particlesToShow,particlesToScroll:r.particlesToScroll}).particleIndexes},setCurrentPageIndex({data:r}){r.currentPageIndex=Bg({currentParticleIndex:r.currentParticleIndex,particlesCount:r.particlesCount,clonesCountHead:r.clonesCountHead,clonesCountTotal:r.clonesCountTotal,infinite:r.infinite,particlesToScroll:r.particlesToScroll})},setPartialPageSize({data:r}){r.partialPageSize=Da({particlesToScroll:r.particlesToScroll,particlesToShow:r.particlesToShow,particlesCountWithoutClones:r.particlesCountWithoutClones})},setClonesCount({data:r}){const{head:a,tail:l}=Wg({infinite:r.infinite,particlesToShow:r.particlesToShow,partialPageSize:r.partialPageSize});r.clonesCountHead=a,r.clonesCountTail=l,r.clonesCountTotal=a+l},setProgressManagerAutoplayDuration({data:r}){t.setAutoplayDuration(r.autoplayDuration)},toggleProgressManager({data:{pauseOnFocus:r,focused:a}}){r&&(a?t.pause():t.resume())},initDuration({data:r}){r.durationMs=r.durationMsInit},applyAutoplay({data:r,methods:{_applyAutoplayIfNeeded:a}}){r.autoplay&&a(r.autoplay)},setPagesCount({data:r}){r.pagesCount=Vg({infinite:r.infinite,particlesCountWithoutClones:r.particlesCountWithoutClones,particlesToScroll:r.particlesToScroll,particlesToShow:r.particlesToShow})},setParticlesToShow({data:r}){r.particlesToShow=sn(1,r.particlesToShowInit,r.particlesCountWithoutClones)},setParticlesToScroll({data:r}){r.particlesToScroll=sn(1,r.particlesToScrollInit,r.particlesCountWithoutClones)}},methods:{_prev({data:r}){r.currentParticleIndex=mo({infinite:r.infinite,pageIndex:r.currentPageIndex-1,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},_next({data:r}){r.currentParticleIndex=mo({infinite:r.infinite,pageIndex:r.currentPageIndex+1,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},_moveToParticle({data:r},a){r.currentParticleIndex=sn(0,a,r.particlesCount-1)},toggleFocused({data:r}){r.focused=!r.focused},_applyAutoplayIfNeeded(l){return W(this,arguments,function*({data:r,methods:a}){if(!r.infinite&&(r.autoplayDirection===xt&&r.currentParticleIndex===r.particlesCount-1||r.autoplayDirection===on&&r.currentParticleIndex===0)){t.reset();return}if(r.autoplay){const c=()=>po({[xt]:()=>W(this,null,function*(){return a.showNextPage()}),[on]:()=>W(this,null,function*(){return a.showPrevPage()})})(r.autoplayDirection);yield t.start(c)}})},_jumpIfNeeded(l){return W(this,arguments,function*({data:r,methods:a}){let c=!1;return r.infinite&&(r.currentParticleIndex===0?(yield a.showParticle(r.particlesCount-r.clonesCountTotal,{animated:!1}),c=!0):r.currentParticleIndex===r.particlesCount-r.clonesCountTail&&(yield a.showParticle(r.clonesCountHead,{animated:!1}),c=!0)),c})},changePage(u,f,d){return W(this,arguments,function*({data:r,methods:a},l,c){if(t.reset(),r.disabled)return;r.disabled=!0,l(),yield a.offsetPage({animated:En(c,"animated",!0)}),r.disabled=!1,!(yield a._jumpIfNeeded())&&a._applyAutoplayIfNeeded()})},showNextPage(c,u){return W(this,arguments,function*({data:r,methods:a},l){r.disabled||(yield a.changePage(a._next,l))})},showPrevPage(c,u){return W(this,arguments,function*({data:r,methods:a},l){r.disabled||(yield a.changePage(a._prev,l))})},showParticle(c,u,f){return W(this,arguments,function*({methods:r},a,l){yield r.changePage(()=>r._moveToParticle(a),l)})},_getParticleIndexByPageIndex({data:r},a){return mo({infinite:r.infinite,pageIndex:a,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},showPage(c,u,f){return W(this,arguments,function*({methods:r},a,l){const d=r._getParticleIndexByPageIndex(a);yield r.showParticle(d,l)})},offsetPage({data:r},a){const l=En(a,"animated",!0);return new Promise(c=>{r.durationMs=l?r.durationMsInit:0,r.offset=-r.currentParticleIndex*r.particleWidth,setTimeout(()=>{c()},r.durationMs)})}}},{onChange:i}),[n,o]=e;return[{data:n,progressManager:t},o,e._internal]}function n0(i){ue(i,"svelte-sme1z4",":root{--sc-color-rgb-light-50p:rgba(93, 93, 93, 0.5);--sc-color-rgb-light:#5d5d5d;--sc-color-hex-dark-50p:rgba(30, 30, 30, 0.5);--sc-color-hex-dark:#1e1e1e}.sc-carousel__carousel-container.svelte-sme1z4{display:flex;width:100%;flex-direction:column;align-items:center}.sc-carousel__content-container.svelte-sme1z4{position:relative;display:flex;width:100%}.sc-carousel__pages-window.svelte-sme1z4{flex:1;display:flex;overflow:hidden;box-sizing:border-box;position:relative}.sc-carousel__pages-container.svelte-sme1z4{width:100%;display:flex;transition-property:transform}.sc-carousel__arrow-container.svelte-sme1z4{padding:5px;box-sizing:border-box;display:flex;align-items:center;justify-content:center}.sc-carousel-progress__container.svelte-sme1z4{width:100%;height:5px;background-color:var(--sc-color-rgb-light-50p);position:absolute;bottom:0}.sc-carousel-button{all:unset;cursor:pointer}.sc-carousel-button:focus{outline:5px auto}")}const i0=i=>({currentPageIndex:i[0]&32,pagesCount:i[0]&1024,loaded:i[0]&64}),Sa=i=>({currentPageIndex:i[5],pagesCount:i[10],showPage:i[15],loaded:i[6]}),o0=i=>({loaded:i[0]&64,currentPageIndex:i[0]&32}),Ma=i=>({showNextPage:i[14].showNextPage,loaded:i[6],currentPageIndex:i[5]}),s0=i=>({loaded:i[0]&64,currentPageIndex:i[0]&32}),za=i=>({loaded:i[6],currentPageIndex:i[5]}),r0=i=>({loaded:i[0]&64,currentPageIndex:i[0]&32}),Ta=i=>({showPrevPage:i[14].showPrevPage,loaded:i[6],currentPageIndex:i[5]});function Ba(i){let t;const e=i[37].prev,n=_t(e,i,i[36],Ta),o=n||a0(i);return{c(){o&&o.c()},m(s,r){o&&o.m(s,r),t=!0},p(s,r){n?n.p&&(!t||r[0]&96|r[1]&32)&&Yt(n,e,s,s[36],t?Xt(e,s[36],r,r0):Ut(s[36]),Ta):o&&o.p&&(!t||r[0]&36)&&o.p(s,t?r:[-1,-1])},i(s){t||(C(o,s),t=!0)},o(s){D(o,s),t=!1},d(s){o&&o.d(s)}}}function a0(i){let t,e,n;return e=new wa({props:{direction:"prev",disabled:!i[2]&&i[5]===0}}),e.$on("click",i[23]),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","sc-carousel__arrow-container svelte-sme1z4")},m(o,s){z(o,t,s),K(e,t,null),n=!0},p(o,s){const r={};s[0]&36&&(r.disabled=!o[2]&&o[5]===0),e.$set(r)},i(o){n||(C(e.$$.fragment,o),n=!0)},o(o){D(e.$$.fragment,o),n=!1},d(o){o&&M(t),$(e)}}}function ja(i){let t,e,n;return e=new hg({props:{value:i[7]}}),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","sc-carousel-progress__container svelte-sme1z4")},m(o,s){z(o,t,s),K(e,t,null),n=!0},p(o,s){const r={};s[0]&128&&(r.value=o[7]),e.$set(r)},i(o){n||(C(e.$$.fragment,o),n=!0)},o(o){D(e.$$.fragment,o),n=!1},d(o){o&&M(t),$(e)}}}function Va(i){let t;const e=i[37].next,n=_t(e,i,i[36],Ma),o=n||l0(i);return{c(){o&&o.c()},m(s,r){o&&o.m(s,r),t=!0},p(s,r){n?n.p&&(!t||r[0]&96|r[1]&32)&&Yt(n,e,s,s[36],t?Xt(e,s[36],r,o0):Ut(s[36]),Ma):o&&o.p&&(!t||r[0]&1060)&&o.p(s,t?r:[-1,-1])},i(s){t||(C(o,s),t=!0)},o(s){D(o,s),t=!1},d(s){o&&o.d(s)}}}function l0(i){let t,e,n;return e=new wa({props:{direction:"next",disabled:!i[2]&&i[5]===i[10]-1}}),e.$on("click",i[14].showNextPage),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","sc-carousel__arrow-container svelte-sme1z4")},m(o,s){z(o,t,s),K(e,t,null),n=!0},p(o,s){const r={};s[0]&1060&&(r.disabled=!o[2]&&o[5]===o[10]-1),e.$set(r)},i(o){n||(C(e.$$.fragment,o),n=!0)},o(o){D(e.$$.fragment,o),n=!1},d(o){o&&M(t),$(e)}}}function Qa(i){let t;const e=i[37].dots,n=_t(e,i,i[36],Sa),o=n||c0(i);return{c(){o&&o.c()},m(s,r){o&&o.m(s,r),t=!0},p(s,r){n?n.p&&(!t||r[0]&1120|r[1]&32)&&Yt(n,e,s,s[36],t?Xt(e,s[36],r,i0):Ut(s[36]),Sa):o&&o.p&&(!t||r[0]&1056)&&o.p(s,t?r:[-1,-1])},i(s){t||(C(o,s),t=!0)},o(s){D(o,s),t=!1},d(s){o&&o.d(s)}}}function c0(i){let t,e;return t=new rg({props:{pagesCount:i[10],currentPageIndex:i[5]}}),t.$on("pageChange",i[41]),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o[0]&1024&&(s.pagesCount=n[10]),o[0]&32&&(s.currentPageIndex=n[5]),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function u0(i){let t,e,n,o,s,r,a,l,c,u,f,d,h=i[1]&&Ba(i);const g=i[37].default,A=_t(g,i,i[36],za);let p=i[3]&&ja(i),v=i[1]&&Va(i),y=i[4]&&Qa(i);return{c(){t=T("div"),e=T("div"),h&&h.c(),n=ne(),o=T("div"),s=T("div"),A&&A.c(),a=ne(),p&&p.c(),l=ne(),v&&v.c(),c=ne(),y&&y.c(),b(s,"class","sc-carousel__pages-container svelte-sme1z4"),L(s,"transform","translateX("+i[8]+"px)"),L(s,"transition-duration",i[9]+"ms"),L(s,"transition-timing-function",i[0]),b(o,"class","sc-carousel__pages-window svelte-sme1z4"),b(e,"class","sc-carousel__content-container svelte-sme1z4"),b(t,"class","sc-carousel__carousel-container svelte-sme1z4")},m(w,P){z(w,t,P),j(t,e),h&&h.m(e,null),j(e,n),j(e,o),j(o,s),A&&A.m(s,null),i[39](s),j(o,a),p&&p.m(o,null),i[40](o),j(e,l),v&&v.m(e,null),j(t,c),y&&y.m(t,null),u=!0,f||(d=[Si(r=Cg.call(null,s,{thresholdProvider:i[38]})),Pe(s,"swipeStart",i[16]),Pe(s,"swipeMove",i[18]),Pe(s,"swipeEnd",i[19]),Pe(s,"swipeFailed",i[20]),Pe(s,"swipeThresholdReached",i[17]),Si(kg.call(null,o)),Pe(o,"hovered",i[21]),Si(Mg.call(null,o)),Pe(o,"tapped",i[22])],f=!0)},p(w,P){w[1]?h?(h.p(w,P),P[0]&2&&C(h,1)):(h=Ba(w),h.c(),C(h,1),h.m(e,n)):h&&(ae(),D(h,1,1,()=>{h=null}),le()),A&&A.p&&(!u||P[0]&96|P[1]&32)&&Yt(A,g,w,w[36],u?Xt(g,w[36],P,s0):Ut(w[36]),za),(!u||P[0]&256)&&L(s,"transform","translateX("+w[8]+"px)"),(!u||P[0]&512)&&L(s,"transition-duration",w[9]+"ms"),(!u||P[0]&1)&&L(s,"transition-timing-function",w[0]),r&&Ht(r.update)&&P[0]&2048&&r.update.call(null,{thresholdProvider:w[38]}),w[3]?p?(p.p(w,P),P[0]&8&&C(p,1)):(p=ja(w),p.c(),C(p,1),p.m(o,null)):p&&(ae(),D(p,1,1,()=>{p=null}),le()),w[1]?v?(v.p(w,P),P[0]&2&&C(v,1)):(v=Va(w),v.c(),C(v,1),v.m(e,null)):v&&(ae(),D(v,1,1,()=>{v=null}),le()),w[4]?y?(y.p(w,P),P[0]&16&&C(y,1)):(y=Qa(w),y.c(),C(y,1),y.m(t,null)):y&&(ae(),D(y,1,1,()=>{y=null}),le())},i(w){u||(C(h),C(A,w),C(p),C(v),C(y),u=!0)},o(w){D(h),D(A,w),D(p),D(v),D(y),u=!1},d(w){w&&M(t),h&&h.d(),A&&A.d(w),i[39](null),p&&p.d(),i[40](null),v&&v.d(),y&&y.d(),f=!1,ut(d)}}}function d0(i,t,e){let{$$slots:n={},$$scope:o}=t,s=[],r,a,l=0,c=0,u=1;const[{data:f,progressManager:d},h,g]=t0((ie,be)=>{po({currentPageIndex:()=>e(5,r=be),progressValue:()=>e(7,a=be),offset:()=>e(8,l=be),durationMs:()=>e(9,c=be),pagesCount:()=>e(10,u=be),loaded:()=>e(6,s=be)})(ie)}),A=vn();let{timingFunction:p="ease-in-out"}=t,{arrows:v=!0}=t,{infinite:y=!0}=t,{initialPageIndex:w=0}=t,{duration:P=500}=t,{autoplay:E=!1}=t,{autoplayDuration:k=3e3}=t,{autoplayDirection:S=xt}=t,{pauseOnFocus:x=!1}=t,{autoplayProgressVisible:Q=!1}=t,{dots:H=!0}=t,{swiping:F=!0}=t,{particlesToShow:U=1}=t,{particlesToScroll:V=1}=t;function B(ie,be){return W(this,null,function*(){const Ge=En(be,"animated",!0);if(typeof ie!="number")throw new Error("pageIndex should be a number");yield h.showPage(ie,{animated:Ge})})}function R(ie){return W(this,null,function*(){const be=En(ie,"animated",!0);yield h.showPrevPage({animated:be})})}function _(ie){return W(this,null,function*(){const be=En(ie,"animated",!0);yield h.showNextPage({animated:be})})}let N=0,te,X;const Z=Rg(({width:ie})=>{e(11,N=ie),f.particleWidth=N/f.particlesToShow,Fg({particlesContainerChildren:X.children,particleWidth:f.particleWidth}),h.offsetPage({animated:!1})});function me(){const{clonesToAppend:ie,clonesToPrepend:be}=Gg({clonesCountHead:f.clonesCountHead,clonesCountTail:f.clonesCountTail,particlesContainerChildren:X.children});Ng({particlesContainer:X,clonesToAppend:ie,clonesToPrepend:be})}$e(()=>{W(this,null,function*(){yield es(),X&&te&&(f.particlesCountWithoutClones=X.children.length,yield es(),f.infinite&&me(),f.particlesCount=X.children.length,h.showPage(w,{animated:!1}),Z.observe(te))})}),yt(()=>{Z.disconnect(),d.reset()});function de(ie){return W(this,null,function*(){yield h.showPage(ie,{animated:!0})})}function ge(){!F||(f.durationMs=0)}function Ee(ie){return W(this,null,function*(){!F||(yield po({[xt]:h.showNextPage,[on]:h.showPrevPage})(ie.detail.direction))})}function Te(ie){!F||(f.offset+=ie.detail.dx)}function je(){!F||h.showParticle(f.currentParticleIndex)}function ce(){return W(this,null,function*(){!F||(yield h.offsetPage({animated:!0}))})}function ve(ie){f.focused=ie.detail.value}function ke(){h.toggleFocused()}function fe(){h.showPrevPage()}const qe=()=>N/3;function mt(ie){Oe[ie?"unshift":"push"](()=>{X=ie,e(13,X)})}function we(ie){Oe[ie?"unshift":"push"](()=>{te=ie,e(12,te)})}const it=ie=>de(ie.detail);return i.$$set=ie=>{"timingFunction"in ie&&e(0,p=ie.timingFunction),"arrows"in ie&&e(1,v=ie.arrows),"infinite"in ie&&e(2,y=ie.infinite),"initialPageIndex"in ie&&e(24,w=ie.initialPageIndex),"duration"in ie&&e(25,P=ie.duration),"autoplay"in ie&&e(26,E=ie.autoplay),"autoplayDuration"in ie&&e(27,k=ie.autoplayDuration),"autoplayDirection"in ie&&e(28,S=ie.autoplayDirection),"pauseOnFocus"in ie&&e(29,x=ie.pauseOnFocus),"autoplayProgressVisible"in ie&&e(3,Q=ie.autoplayProgressVisible),"dots"in ie&&e(4,H=ie.dots),"swiping"in ie&&e(30,F=ie.swiping),"particlesToShow"in ie&&e(31,U=ie.particlesToShow),"particlesToScroll"in ie&&e(32,V=ie.particlesToScroll),"$$scope"in ie&&e(36,o=ie.$$scope)},i.$$.update=()=>{i.$$.dirty[0]&32&&A("pageChange",r),i.$$.dirty[0]&4&&(f.infinite=y),i.$$.dirty[0]&33554432&&(f.durationMsInit=P),i.$$.dirty[0]&67108864&&(f.autoplay=E),i.$$.dirty[0]&134217728&&(f.autoplayDuration=k),i.$$.dirty[0]&268435456&&(f.autoplayDirection=S),i.$$.dirty[0]&536870912&&(f.pauseOnFocus=x),i.$$.dirty[1]&1&&(f.particlesToShowInit=U),i.$$.dirty[1]&2&&(f.particlesToScrollInit=V)},[p,v,y,Q,H,r,s,a,l,c,u,N,te,X,h,de,ge,Ee,Te,je,ce,ve,ke,fe,w,P,E,k,S,x,F,U,V,B,R,_,o,n,qe,mt,we,it]}class f0 extends re{constructor(t){super(),se(this,t,d0,u0,oe,{timingFunction:0,arrows:1,infinite:2,initialPageIndex:24,duration:25,autoplay:26,autoplayDuration:27,autoplayDirection:28,pauseOnFocus:29,autoplayProgressVisible:3,dots:4,swiping:30,particlesToShow:31,particlesToScroll:32,goTo:33,goToPrev:34,goToNext:35},n0,[-1,-1])}get goTo(){return this.$$.ctx[33]}get goToPrev(){return this.$$.ctx[34]}get goToNext(){return this.$$.ctx[35]}}function h0(i){ue(i,"svelte-159ski6",".media-item.svelte-159ski6.svelte-159ski6{position:relative;height:100%}.media-content.svelte-159ski6.svelte-159ski6{position:relative;pointer-events:auto;width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;-o-object-fit:inherit;object-fit:inherit}.media-content.showPlayButton.svelte-159ski6.svelte-159ski6{pointer-events:none}.video-icon.svelte-159ski6.svelte-159ski6{width:12.5rem;height:6.25rem;max-width:60%;max-height:60%;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.video-play-button-container.svelte-159ski6.svelte-159ski6{display:none;position:absolute;width:100%;height:100%;top:0;left:0;transform:translate3d(0, 0, 0)}.video-play-button-container.showPlayButton.svelte-159ski6.svelte-159ski6{pointer-events:none;display:block}.video-icon.svelte-159ski6.svelte-159ski6{pointer-events:auto}.video-icon.large.svelte-159ski6.svelte-159ski6{width:12.5rem;height:6.25rem}.video-icon.small.svelte-159ski6.svelte-159ski6{width:1.75rem;height:1.75rem}.video-icon.svelte-159ski6 .video-icon-img.svelte-159ski6{width:100%;height:100%;background-position:center center;background-size:contain;background-repeat:no-repeat}.video-icon.svelte-159ski6 .video-icon-img.canPlay.svelte-159ski6{cursor:pointer}")}function Oa(i){let t;function e(s,r){if(s[2].type==="Image")return p0;if(s[2].type==="Video")return m0}let n=e(i),o=n&&n(i);return{c(){t=T("div"),o&&o.c(),b(t,"class","media-item svelte-159ski6"),b(t,"draggable","false")},m(s,r){z(s,t,r),o&&o.m(t,null)},p(s,r){n===(n=e(s))&&o?o.p(s,r):(o&&o.d(1),o=n&&n(s),o&&(o.c(),o.m(t,null)))},d(s){s&&M(t),o&&o.d()}}}function m0(i){let t,e,n,o,s,r;function a(u,f){return u[7]&&u[2].videoCoverUrl?A0:g0}let l=a(i),c=l(i);return{c(){c.c(),t=ne(),e=T("div"),n=T("div"),o=T("div"),b(o,"class","video-icon-img svelte-159ski6"),L(o,"background-image","url("+i[18]()+")"),q(o,"canPlay",i[5]),b(n,"class","video-icon svelte-159ski6"),q(n,"large",i[4]==="large"),q(n,"small",i[4]==="small"),b(e,"class","video-play-button-container svelte-159ski6"),q(e,"showPlayButton",i[9])},m(u,f){c.m(u,f),z(u,t,f),z(u,e,f),j(e,n),j(n,o),s||(r=Pe(o,"click",i[19]),s=!0)},p(u,f){l===(l=a(u))&&c?c.p(u,f):(c.d(1),c=l(u),c&&(c.c(),c.m(t.parentNode,t))),f&8&&L(o,"background-image","url("+u[18]()+")"),f&32&&q(o,"canPlay",u[5]),f&16&&q(n,"large",u[4]==="large"),f&16&&q(n,"small",u[4]==="small"),f&512&&q(e,"showPlayButton",u[9])},d(u){c.d(u),u&&M(t),u&&M(e),s=!1,r()}}}function p0(i){let t,e,n,o;return{c(){t=T("img"),b(t,"class","media-content svelte-159ski6"),b(t,"style",e=`object-fit: ${i[6]};`),Xe(t.src,n=i[2].url)||b(t,"src",n),b(t,"alt",o=i[2].name),b(t,"draggable",!1)},m(s,r){z(s,t,r)},p(s,r){r&64&&e!==(e=`object-fit: ${s[6]};`)&&b(t,"style",e),r&4&&!Xe(t.src,n=s[2].url)&&b(t,"src",n),r&4&&o!==(o=s[2].name)&&b(t,"alt",o)},d(s){s&&M(t)}}}function g0(i){let t,e,n,o,s,r,a;return{c(){t=T("video"),b(t,"class","media-content svelte-159ski6"),b(t,"style",e=`object-fit: ${i[6]};`),Xe(t.src,n=i[2].videoCoverUrl?i[2].url:i[2].url+"#t=0.1")||b(t,"src",n),b(t,"poster",o=i[2].videoCoverUrl),b(t,"preload",s=i[2].videoCoverUrl?"none":"auto"),b(t,"disablepictureinpicture",""),t.playsInline=!0,b(t,"paused",""),t.muted=!0,b(t,"draggable",!1),t.loop=!1,b(t,"crossorigin",""),t.controls=!1,q(t,"showPlayButton",i[9])},m(l,c){z(l,t,c),i[17](t),r||(a=[Pe(t,"play",i[14]),Pe(t,"pause",i[15]),Pe(t,"click",i[16])],r=!0)},p(l,c){c&64&&e!==(e=`object-fit: ${l[6]};`)&&b(t,"style",e),c&4&&!Xe(t.src,n=l[2].videoCoverUrl?l[2].url:l[2].url+"#t=0.1")&&b(t,"src",n),c&4&&o!==(o=l[2].videoCoverUrl)&&b(t,"poster",o),c&4&&s!==(s=l[2].videoCoverUrl?"none":"auto")&&b(t,"preload",s),c&512&&q(t,"showPlayButton",l[9])},d(l){l&&M(t),i[17](null),r=!1,ut(a)}}}function A0(i){let t,e,n,o;return{c(){t=T("img"),b(t,"class","media-content svelte-159ski6"),b(t,"style",e=`object-fit: ${i[6]};`),Xe(t.src,n=i[2].videoCoverUrl)||b(t,"src",n),b(t,"alt",o=i[2].name),b(t,"draggable",!1)},m(s,r){z(s,t,r)},p(s,r){r&64&&e!==(e=`object-fit: ${s[6]};`)&&b(t,"style",e),r&4&&!Xe(t.src,n=s[2].videoCoverUrl)&&b(t,"src",n),r&4&&o!==(o=s[2].name)&&b(t,"alt",o)},d(s){s&&M(t)}}}function v0(i){let t,e=i[2]&&Oa(i);return{c(){e&&e.c(),t=pe()},m(n,o){e&&e.m(n,o),z(n,t,o)},p(n,[o]){n[2]?e?e.p(n,o):(e=Oa(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},i:J,o:J,d(n){e&&e.d(n),n&&M(t)}}}function b0(i,t,e){let n,{mediaInstance:o={paused:!0}}=t,{tag:s}=t,{media:r}=t,{playButtonIfNeed:a="withoutText"}=t,{playButtonSizeIfNeed:l="small"}=t,{canPlay:c=!0}=t,{objectFit:u="fill"}=t,{disableVideoIfHavePoster:f=!1}=t,d,h=!0,g=!1;function A(){e(12,g=(r==null?void 0:r.type)==="Video"&&Boolean(r.videoCoverUrl))}const p=St("mediaStore"),v=St("hooks"),y=()=>{g||(d==null||d.play(),d==null||d.pause(),e(12,g=!0))};v.on("loadVideoFirstFrame",y),$e(()=>{p.subscribe(({currentMediaElement:Q})=>{Q!==d&&(d==null||d.pause())})});const w=Q=>{e(9,h=!1),e(0,o.paused=!1,o),p.set({currentMediaElement:d}),v.emit("playStateChange",{event:Q,state:"playing",tag:s,mediaInstance:d})},P=Q=>{e(9,h=!0),e(0,o.paused=!0,o),v.emit("playStateChange",{event:Q,state:"paused",tag:s,mediaInstance:d})},E=Q=>{d&&d.pause()};function k(Q){Oe[Q?"unshift":"push"](()=>{d=Q,e(8,d)})}const S=()=>a==="withText"?bp:a==="withoutText"?yp:a,x=Q=>{!c||d&&(e(8,d.muted=!1,d),d.play())};return i.$$set=Q=>{"mediaInstance"in Q&&e(0,o=Q.mediaInstance),"tag"in Q&&e(1,s=Q.tag),"media"in Q&&e(2,r=Q.media),"playButtonIfNeed"in Q&&e(3,a=Q.playButtonIfNeed),"playButtonSizeIfNeed"in Q&&e(4,l=Q.playButtonSizeIfNeed),"canPlay"in Q&&e(5,c=Q.canPlay),"objectFit"in Q&&e(6,u=Q.objectFit),"disableVideoIfHavePoster"in Q&&e(7,f=Q.disableVideoIfHavePoster)},i.$$.update=()=>{if(i.$$.dirty&4&&e(13,n=r==null?void 0:r.url),i.$$.dirty&8192&&Boolean(n)&&A(),i.$$.dirty&256&&d&&e(9,h=d.paused),i.$$.dirty&4356&&(r==null?void 0:r.type)==="Video"&&!g){const Q=navigator.userAgent.toLowerCase().indexOf("micromessenger")!==-1,F=navigator.userAgent.toLowerCase().indexOf("iphone")!==-1&&Q;d&&F&&d.paused&&(document.removeEventListener("WeixinJSBridgeReady",y),document.removeEventListener("touchstart",y),document.removeEventListener("click",y),document.addEventListener("WeixinJSBridgeReady",y),document.addEventListener("touchstart",y),document.addEventListener("click",y))}},[o,s,r,a,l,c,u,f,d,h,p,v,g,n,w,P,E,k,S,x]}class Fa extends re{constructor(t){super(),se(this,t,b0,v0,oe,{mediaInstance:0,tag:1,media:2,playButtonIfNeed:3,playButtonSizeIfNeed:4,canPlay:5,objectFit:6,disableVideoIfHavePoster:7},h0)}}function y0(i){ue(i,"svelte-1mrbqlg",".media-list-wrapper.svelte-1mrbqlg.svelte-1mrbqlg{width:100%;height:100%;position:relative;overflow:hidden;border-radius:0.125rem}.media-list-wrapper.svelte-1mrbqlg .media-list.svelte-1mrbqlg{position:relative;pointer-events:auto;height:100%;left:50%;top:50%;transform:translate(-50%, -50%)}.media-list-wrapper.svelte-1mrbqlg .media-list.svelte-1mrbqlg .sc-carousel__carousel-container,.media-list-wrapper.svelte-1mrbqlg .media-list.svelte-1mrbqlg .sc-carousel__content-container{height:100%}")}function Ra(i,t,e){const n=i.slice();return n[21]=t[e],n[22]=t,n[23]=e,n}function Ga(i){let t,e,n,o,s,r,a;const l=[C0,w0],c=[];function u(f,d){return f[12]?0:1}return n=u(i),o=c[n]=l[n](i),{c(){t=T("div"),e=T("div"),o.c(),b(e,"class","media-list svelte-1mrbqlg"),q(e,"carouselEnabled",i[12]),b(t,"class","media-list-wrapper svelte-1mrbqlg"),q(t,"unfolded",i[5])},m(f,d){z(f,t,d),j(t,e),c[n].m(e,null),a=!0},p(f,d){i=f;let h=n;n=u(i),n===h?c[n].p(i,d):(ae(),D(c[h],1,1,()=>{c[h]=null}),le(),o=c[n],o?o.p(i,d):(o=c[n]=l[n](i),o.c()),C(o,1),o.m(e,null)),(!a||d&4096)&&q(e,"carouselEnabled",i[12]),(!a||d&32)&&q(t,"unfolded",i[5])},i(f){a||(C(o),f&&Le(()=>{r&&r.end(1),s=Mt(t,ls,i[6]?{y:4,duration:i[4],delay:i[2],easing:vt}:void 0),s.start()}),a=!0)},o(f){D(o),s&&s.invalidate(),f&&(r=Zt(t,ls,i[6]?{y:4,duration:i[4],delay:i[3],easing:vt}:void 0)),a=!1},d(f){f&&M(t),c[n].d(),f&&r&&r.end()}}}function w0(i){let t,e;const n=[{media:i[1][0]},i[7],{tag:i[0]}];let o={};for(let s=0;s<n.length;s+=1)o=Be(o,n[s]);return t=new Fa({props:o}),{c(){ee(t.$$.fragment)},m(s,r){K(t,s,r),e=!0},p(s,r){const a=r&131?Fe(n,[r&2&&{media:s[1][0]},r&128&&os(s[7]),r&1&&{tag:s[0]}]):{};t.$set(a)},i(s){e||(C(t.$$.fragment,s),e=!0)},o(s){D(t.$$.fragment,s),e=!1},d(s){$(t,s)}}}function C0(i){let t,e,n={dots:!1,arrows:!1,$$slots:{default:[P0]},$$scope:{ctx:i}};return t=new f0({props:n}),i[17](t),t.$on("pageChange",i[18]),{c(){ee(t.$$.fragment)},m(o,s){K(t,o,s),e=!0},p(o,s){const r={};s&16778625&&(r.$$scope={dirty:s,ctx:o}),t.$set(r)},i(o){e||(C(t.$$.fragment,o),e=!0)},o(o){D(t.$$.fragment,o),e=!1},d(o){i[17](null),$(t,o)}}}function Na(i){let t,e,n;const o=[i[7],{media:i[21]},{tag:i[0]}];function s(a){i[16](a,i[23])}let r={};for(let a=0;a<o.length;a+=1)r=Be(r,o[a]);return i[8][i[23]]!==void 0&&(r.mediaInstance=i[8][i[23]]),t=new Fa({props:r}),Oe.push(()=>zc(t,"mediaInstance",s)),{c(){ee(t.$$.fragment)},m(a,l){K(t,a,l),n=!0},p(a,l){i=a;const c=l&1153?Fe(o,[l&128&&os(i[7]),l&1024&&{media:i[21]},l&1&&{tag:i[0]}]):{};!e&&l&256&&(e=!0,c.mediaInstance=i[8][i[23]],Dc(()=>e=!1)),t.$set(c)},i(a){n||(C(t.$$.fragment,a),n=!0)},o(a){D(t.$$.fragment,a),n=!1},d(a){$(t,a)}}}function P0(i){let t,e,n=i[10],o=[];for(let r=0;r<n.length;r+=1)o[r]=Na(Ra(i,n,r));const s=r=>D(o[r],1,1,()=>{o[r]=null});return{c(){for(let r=0;r<o.length;r+=1)o[r].c();t=pe()},m(r,a){for(let l=0;l<o.length;l+=1)o[l].m(r,a);z(r,t,a),e=!0},p(r,a){if(a&1409){n=r[10];let l;for(l=0;l<n.length;l+=1){const c=Ra(r,n,l);o[l]?(o[l].p(c,a),C(o[l],1)):(o[l]=Na(c),o[l].c(),C(o[l],1),o[l].m(t.parentNode,t))}for(ae(),l=n.length;l<o.length;l+=1)s(l);le()}},i(r){if(!e){for(let a=0;a<n.length;a+=1)C(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){dt(o,r),r&&M(t)}}}function I0(i){let t,e,n=i[5]&&Ga(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[5]?n?(n.p(o,s),s&32&&C(n,1)):(n=Ga(o),n.c(),C(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(C(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function E0(i,t,e){let n,o,s,r,{tag:a}=t,{mediaData:l}=t,{inDelay:c=0}=t,{outDelay:u=0}=t,{duration:f=0}=t,{unfolded:d=!0}=t,{animation:h=!0}=t,{mediaItemConfig:g}=t,{enableCarousel:A=!0}=t,{autoplayConfig:p={autoplay:!0,autoplayVideo:!1}}=t,v=[],y,w=null;const P=St("mediaStore");$e(()=>{w=setInterval(()=>{r&&(y==null||y.goToNext())},3e3)}),yt(()=>{clearInterval(w)});function E(x,Q){i.$$.not_equal(v[Q],x)&&(v[Q]=x,e(8,v))}function k(x){Oe[x?"unshift":"push"](()=>{y=x,e(11,y)})}const S=x=>{n||P.set({currentMediaElement:null})};return i.$$set=x=>{"tag"in x&&e(0,a=x.tag),"mediaData"in x&&e(1,l=x.mediaData),"inDelay"in x&&e(2,c=x.inDelay),"outDelay"in x&&e(3,u=x.outDelay),"duration"in x&&e(4,f=x.duration),"unfolded"in x&&e(5,d=x.unfolded),"animation"in x&&e(6,h=x.animation),"mediaItemConfig"in x&&e(7,g=x.mediaItemConfig),"enableCarousel"in x&&e(14,A=x.enableCarousel),"autoplayConfig"in x&&e(15,p=x.autoplayConfig)},i.$$.update=()=>{i.$$.dirty&256&&e(9,n=v.every(x=>x.paused)),i.$$.dirty&16386&&e(12,o=A&&(l==null?void 0:l.length)>1),i.$$.dirty&2&&e(10,s=l),i.$$.dirty&34304&&(r=s.length>1&&p.autoplay&&n)},[a,l,c,u,f,d,h,g,v,n,s,y,o,P,A,p,E,k,S]}class Wa extends re{constructor(t){super(),se(this,t,E0,I0,oe,{tag:0,mediaData:1,inDelay:2,outDelay:3,duration:4,unfolded:5,animation:6,mediaItemConfig:7,enableCarousel:14,autoplayConfig:15},y0)}}function k0(i){ue(i,"svelte-1f7m1lj",".line.svelte-1f7m1lj{position:absolute;width:6.5625rem;height:1.3125rem;transform:translateY(-100%)}.text.svelte-1f7m1lj{position:absolute;width:6.25rem;left:1rem;bottom:0.0625rem;font-weight:600}.media-wrapper.svelte-1f7m1lj{position:absolute;left:0.875rem;top:-5.3125rem;width:5.625rem;height:3.75rem;font-weight:600}")}function Ha(i){let t,e,n,o,s,r,a,l;t=new nt({props:{visible:i[3],left:61,bottom:57,width:2,blurRadius:150,spreadRadius:75}}),o=new Kp({props:{unfolded:i[3],outDelay:400}});let c=i[2]&&_a(i),u=i[1]&&Xa(i);return{c(){ee(t.$$.fragment),e=ne(),n=T("div"),ee(o.$$.fragment),s=ne(),c&&c.c(),r=ne(),u&&u.c(),a=pe(),b(n,"class","line svelte-1f7m1lj")},m(f,d){K(t,f,d),z(f,e,d),z(f,n,d),K(o,n,null),z(f,s,d),c&&c.m(f,d),z(f,r,d),u&&u.m(f,d),z(f,a,d),l=!0},p(f,d){const h={};d&8&&(h.visible=f[3]),t.$set(h);const g={};d&8&&(g.unfolded=f[3]),o.$set(g),f[2]?c?(c.p(f,d),d&4&&C(c,1)):(c=_a(f),c.c(),C(c,1),c.m(r.parentNode,r)):c&&(ae(),D(c,1,1,()=>{c=null}),le()),f[1]?u?(u.p(f,d),d&2&&C(u,1)):(u=Xa(f),u.c(),C(u,1),u.m(a.parentNode,a)):u&&(ae(),D(u,1,1,()=>{u=null}),le())},i(f){l||(C(t.$$.fragment,f),C(o.$$.fragment,f),C(c),C(u),l=!0)},o(f){D(t.$$.fragment,f),D(o.$$.fragment,f),D(c),D(u),l=!1},d(f){$(t,f),f&&M(e),f&&M(n),$(o),f&&M(s),c&&c.d(f),f&&M(r),u&&u.d(f),f&&M(a)}}}function _a(i){let t,e,n;return e=new la({props:{unfolded:i[3],content:i[2],inDelay:500}}),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","text svelte-1f7m1lj")},m(o,s){z(o,t,s),K(e,t,null),n=!0},p(o,s){const r={};s&8&&(r.unfolded=o[3]),s&4&&(r.content=o[2]),e.$set(r)},i(o){n||(C(e.$$.fragment,o),n=!0)},o(o){D(e.$$.fragment,o),n=!1},d(o){o&&M(t),$(e)}}}function Xa(i){let t,e,n;return e=new Wa({props:{autoplayConfig:{autoplay:!1},unfolded:i[3],mediaData:i[1],tag:i[0],enableCarousel:!1,mediaItemConfig:{canPlay:!1,playButtonSizeIfNeed:"small",disableVideoIfHavePoster:!0},inDelay:500,duration:500}}),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","media-wrapper svelte-1f7m1lj")},m(o,s){z(o,t,s),K(e,t,null),n=!0},p(o,s){const r={};s&8&&(r.unfolded=o[3]),s&2&&(r.mediaData=o[1]),s&1&&(r.tag=o[0]),e.$set(r)},i(o){n||(C(e.$$.fragment,o),n=!0)},o(o){D(e.$$.fragment,o),n=!1},d(o){o&&M(t),$(e)}}}function x0(i){let t,e,n=i[0].state&&Ha(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&C(n,1)):(n=Ha(o),n.c(),C(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(C(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function D0(i,t,e){let n,o,s,r,{tag:a}=t;return i.$$set=l=>{"tag"in l&&e(0,a=l.tag)},i.$$.update=()=>{var l,c,u;i.$$.dirty&1&&e(3,n=a.state?a.state.unfolded:!1),i.$$.dirty&1&&e(4,o=(c=(l=a.data.title)!=null?l:a.data.text)!=null?c:""),i.$$.dirty&16&&e(2,s=((u=o.length)!=null?u:0)>7?o.substring(0,6)+"...":o),i.$$.dirty&1&&e(1,r=a.data.mediaData)},[a,r,s,n,o]}class L0 extends re{constructor(t){super(),se(this,t,D0,x0,oe,{tag:0},k0)}}class go{constructor(t=0,e=0){m(this,"min");m(this,"max");m(this,"isInterval",!0);this.min=t,this.max=e}fromArray(t){return this.min=t[0],this.max=t[1],this}isOverlap(t){return Math.min(this.max,t.max)<Math.max(this.min,t.min)}contains(t){return this.min<t.min&&this.max>t.max}}class S0{constructor(t,e){m(this,"min");m(this,"max");m(this,"xInterval");m(this,"yInterval");m(this,"isRectangle",!0);this.min=t,this.max=e,this.xInterval=new go(this.min.x,this.max.x),this.yInterval=new go(this.min.y,this.max.y)}isOverlapWithRectangle(t){return!this.xInterval.isOverlap(t.xInterval)&&!this.yInterval.isOverlap(t.yInterval)}containsRect(t){return this.xInterval.contains(t.xInterval)&&this.yInterval.contains(t.yInterval)}}function Ai(i,t,e){const n=i[t],o=i[e];!n||!o||(i[t]=o,i[e]=n)}function M0(i,t,e){const n=e/2;for(let o=1;o<=n;o++){const s=e-(o-1);for(let r=1;r<=t;r++){const a=(o-1)*t+r-1,l=(s-1)*t+r-1;Ai(i,a*4+0,l*4+0),Ai(i,a*4+1,l*4+1),Ai(i,a*4+2,l*4+2),Ai(i,a*4+3,l*4+3)}}}class Ya{constructor(t,e){m(this,"width");m(this,"height");m(this,"containerDom");m(this,"hooks",new he.Subscribe);m(this,"canvas",document.createElement("canvas"));m(this,"five");m(this,"scale");m(this,"config");m(this,"offset",{x:0,y:0});m(this,"context");m(this,"renderCenter",new I.Vector3);m(this,"hammer");m(this,"state",{enabled:!1});m(this,"onPan",t=>{if(!this.containerDom||this.hooks.emit("wantsPanGesture",t))return;const n=this.offset.x+t.deltaX,o=this.offset.y+t.deltaY;this.canvas.style.boxShadow="0 2px 30px 0 rgba(0,0,0,0.20)",this.canvas.style.transform=`translate3d(${n}px, ${o}px, 100px)`});m(this,"onPanEnd",t=>{this.offset={x:this.offset.x+t.deltaX,y:this.offset.y+t.deltaY},this.canvas.style.boxShadow="none"});var o,s,r;if(!t.renderer)throw new Error("Five Render \u672A\u521D\u59CB\u5316");this.five=t,this.scale=(o=e==null?void 0:e.scale)!=null?o:2,this.width=(s=e==null?void 0:e.width)!=null?s:190,this.height=(r=e==null?void 0:e.height)!=null?r:190,this.config={dragEnabled:(e==null?void 0:e.dragEnabled)||!1,autoFixPCPosition:(e==null?void 0:e.autoFixPCPosition)||!1,initialPosition:(e==null?void 0:e.initialPosition)||{left:"0",top:"0"}};const n=this.canvas.getContext("2d");if(!n)throw new Error("CANNOT CREATE CONTEXT2D");this.context=n,this.config.dragEnabled&&(this.hammer=new fn.default(this.canvas),this.hammer.on("pan",this.onPan),this.hammer.on("panend",this.onPanEnd)),this.initStyle()}dispose(){var t;this.clear(),this.disable(),(t=this.hammer)==null||t.destroy()}enable(){var t;if(!this.state.enabled)return this.state.enabled=!0,(t=this.containerDom)==null||t.append(this.canvas),this}disable(){if(!!this.state.enabled)return this.state.enabled=!1,this.canvas.remove(),this}appendTo(t){var e;return this.containerDom&&((e=this.containerDom)==null||e.removeChild(this.canvas)),this.containerDom=t,this.state.enabled&&t.append(this.canvas),this}clear(){return this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this}renderWithPoint(t){!this.containerDom||!this.state.enabled||(this.renderCenter=t,this.render(),this.config.autoFixPCPosition&&this.autoFixPCPosition())}autoFixPCPosition(){if(!this.containerDom)return;const{width:t,height:e}=this,n=this.renderCenter.clone().project(this.five.camera),o=(n.x+1)/2*this.containerDom.clientWidth,s=-(n.x-1)/2*this.containerDom.clientWidth,r=-(n.y-1)/2*this.containerDom.clientHeight;o<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left=90+"px"):r<183?(this.canvas.style.top=90+"px",this.canvas.style.left=-t/2+"px"):s<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left=-t-90+"px"):(this.canvas.style.left=-t/2+"px",this.canvas.style.top=-e-90+"px"),this.canvas.style.transform=`translate3d(${o}px, ${r}px, 10px)`,this.offset={x:o,y:r}}render(){if(!this.five.renderer||!this.containerDom)return;const{scale:t,context:e,width:n,height:o}=this,s=this.renderCenter.clone().project(this.five.camera),r=this.five.renderer.getSize(new I.Vector2),a=1,l=n/t,c=o/t,u=a*t,f=(s.x+1)/2*r.x,d=(s.y+1)/2*r.y,h=this.five.getPixels(f-l/2,d-l/2,l,c,u),g=Math.floor(n*a),A=Math.floor(o*a);M0(h,g,A);const p=new ImageData(g,A);p.data.set(h),e.putImageData(p,0,0)}initStyle(){const t=this.canvas;t.classList.add("five-plugin__magnifier"),t.style.position="absolute",t.style.pointerEvents="all",t.style.borderRadius="50%",t.style.zIndex="99";const e=1;t.setAttribute("width",(this.width*e).toString()),t.setAttribute("height",(this.height*e).toString()),t.style.border="2px solid rgba(255,255,255,0.20)",t.style.width=this.width+"px",t.style.height=this.height+"px",t.style.top=this.config.initialPosition.top,t.style.left=this.config.initialPosition.left,t.style.transform="translate(0,0,100px)",this.config.dragEnabled&&(this.canvas.style.cursor="pointer")}}function z0(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return new I.Vector2().set((i.x-s)/e*2-1,-(i.y-o)/n*2+1)}function Ua(i,t){const{offsetWidth:e,offsetHeight:n}=t;return new I.Vector2().set(i.x/e*2-1,-i.y/n*2+1)}function T0(i,t){const e=i.getElement();if(!e)return;const n=Ua(t,e),o=new I.Raycaster;return o.setFromCamera(n,i.camera),o}function B0(i,t){const{x:e,y:n}=t,o=e*2-1,s=n*2-1,r=new I.Vector2().fromArray([o,s]),a=new I.Raycaster;return a.setFromCamera(r,i.camera),i.model.intersectRaycaster(a)[0]}const j0="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbYAAAGwCAYAAADFUEBtAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABtqADAAQA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CUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQn8NQn8fyHnyuSABiy2AAAAAElFTkSuQmCC",V0=`
|
|
547
547
|
varying vec2 vUv;
|
|
@@ -558,5 +558,5 @@ void main() {
|
|
|
558
558
|
float match = 1.0 - uv.x;
|
|
559
559
|
gl_FragColor = vec4(1.0,1.0,1.0,match);
|
|
560
560
|
}
|
|
561
|
-
`;function O0(){const i=new I.PlaneGeometry(.4,.4),t=j0,e=new I.TextureLoader().load(t);e.encoding=I.sRGBEncoding;const n=new I.MeshBasicMaterial({map:e,transparent:!0,depthTest:!1});return new I.Mesh(i,n)}function F0(){const i=new I.CurvePath;i.add(new I.LineCurve3(new I.Vector3(0,0,0),new I.Vector3(0,0,.1)));const t=new I.TubeGeometry(i,8,.003),e=new I.ShaderMaterial({vertexShader:V0,fragmentShader:Q0,depthTest:!1,transparent:!0});return new I.Mesh(t,e)}function R0(){const i=new I.SphereGeometry(.01,20,20),t=new I.MeshBasicMaterial({color:10349931,depthTest:!1,transparent:!0,side:I.DoubleSide}),e=new I.Mesh(i,t);return e.position.set(0,0,.1),e}class Ja extends I.Object3D{constructor(){super();m(this,"planeMesh");m(this,"lineMesh");m(this,"ballMesh");this.planeMesh=O0(),this.lineMesh=F0(),this.ballMesh=R0(),this.add(this.planeMesh,this.lineMesh,this.ballMesh)}updateWithIntersect(e){if(!e.face)return;const n=new I.Vector3().addVectors(e.point,e.face.normal);this.position.copy(e.point),this.lookAt(n)}dispose(){var e;(e=this.planeMesh.material.map)==null||e.dispose()}}class Za{constructor(t){m(this,"five");m(this,"contentElement",document.createElement("div"));m(this,"animeIns");m(this,"container");m(this,"css3DObject");m(this,"disposeCss3DObject");m(this,"state",{enabled:!1});this.five=t;const n=.4/2,s=Wt(t).create3DDomContainer([[-n,n,0],[-n,-n,0],[n,-n,0],[n,n,0]].map(r=>new I.Vector3().fromArray(r)));if(s){const{container:r,dispose:a,css3DObject:l}=s;this.container=r,this.css3DObject=l,this.disposeCss3DObject=a}this.contentElement.style.width="100%",this.contentElement.style.height="100%",this.contentElement.style.backgroundImage=`url(${pr})`,this.contentElement.style.backgroundSize="100%",this.contentElement.style.backgroundRepeat="no-repeat"}enable(){var t;this.state.enabled||(this.state.enabled=!0,(t=this.container)==null||t.appendChild(this.contentElement))}disable(){!this.state.enabled||(this.state.enabled=!1,this.contentElement.remove())}updateWithIntersect(t){if(!t.face||!this.css3DObject)return;const e=new I.Vector3().addVectors(t.point,t.face.normal);this.css3DObject.position.copy(t.point),this.css3DObject.lookAt(e),this.five.needsRender=!0}doAnimation(){var t;(t=this.animeIns)==null||t.dispose(),new Zi({progress:0}).to({progress:[1,0]}).duration(500).easing(zn.Easing.Quadratic.InOut).onUpdate(({progress:e})=>{}).play()}dispose(){var t;(t=this.disposeCss3DObject)==null||t.call(this)}}class G0{constructor(t,e){m(this,"five");m(this,"hooks",new he.Subscribe);m(this,"magnifier",null);m(this,"pointHelper",null);m(this,"pointDomHelper",null);m(this,"contentDom",document.createElement("div"));m(this,"state",{enabled:!1});m(this,"group",new I.Group);this.five=t,this.magnifier=(e==null?void 0:e.magnifier)===void 0?new Ya(t,{dragEnabled:!0}):null,this.pointHelper=(e==null?void 0:e.pointHelper)===void 0?new Ja:null,this.pointDomHelper=(e==null?void 0:e.pointDomHelper)===void 0?new Za(t):null,this.group.name="five-point-selector",this.five.scene.add(this.group),this.contentDom.classList.add("five-point-selector-content"),this.contentDom.style.position="absolute",this.contentDom.style.top="0",this.contentDom.style.left="0",this.contentDom.style.width="100%",this.contentDom.style.height="100%",this.contentDom.style.pointerEvents="none"}enable(){var t,e;this.state.enabled||(this.state.enabled=!0,this.pointHelper&&this.group.add(this.pointHelper),(t=this.magnifier)==null||t.enable(),(e=this.pointDomHelper)==null||e.enable(),this.five.needsRender=!0,this.hooks.emit("enabled"))}disable(){var t,e;!this.state.enabled||(this.state.enabled=!1,this.pointHelper&&this.group.remove(this.pointHelper),(t=this.magnifier)==null||t.disable(),(e=this.pointDomHelper)==null||e.disable(),this.hooks.emit("disabled"))}dispose(){this.hooks.off(),this.disable(),this.magnifier=null,this.pointHelper=null,this.pointDomHelper=null}updateWithIntersect(t){var s;this.hooks.emit("pointChanged",{panoIndex:this.five.getCurrentState().panoIndex,position:t.point.toArray(),normal:(s=t.face)==null?void 0:s.normal.toArray()});const e=this.magnifier;e&&e.renderWithPoint(t.point);const n=this.pointHelper;n&&n.updateWithIntersect(t);const o=this.pointDomHelper;o&&o.updateWithIntersect(t),this.five.needsRender=!0}}const N0=Object.freeze(Object.defineProperty({__proto__:null,Interval:go,Rectangle:S0,Magnifier:Ya,getCoordsFromClient:z0,getCoordsFromElement:Ua,getRaycasterFromFivePointer:T0,getIntersectFromRelativePosition:B0,PointHelper:Ja,PointDomHelper:Za,FivePointSelector:G0,isNil:Wm,notNil:Ze,BetterTween:Zi,tweenProgress:Ys,nextFrame:ni,requestAnimationFrameInterval:ii,getFrameTime:mf},Symbol.toStringTag,{value:"Module"}));function W0(i){ue(i,"svelte-8mby9k",".svelte-8mby9k.svelte-8mby9k{box-sizing:border-box}.marketing.svelte-8mby9k.svelte-8mby9k{transform:translateY(-100%)}.content.svelte-8mby9k .headerImage.svelte-8mby9k{position:absolute;width:100%;top:0.25rem;transform:translateY(-100%);border-top-left-radius:0.25rem;border-top-right-radius:0.25rem}.line.svelte-8mby9k.svelte-8mby9k{position:absolute;height:2.0625rem;width:0.0625rem;left:50%;transform:translateX(-50%);background-color:white;bottom:0;transform-origin:bottom;transition:all 500ms}.content.svelte-8mby9k.svelte-8mby9k{background-color:white;position:relative;display:flex;flex-direction:column;min-width:11.125rem;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;border-radius:0.25rem;top:-1.875rem;left:-1rem;padding:0.5rem 0rem 0.5625rem;transition:all 500ms}.title.svelte-8mby9k.svelte-8mby9k{position:absolute;background-color:white;border-radius:0.25rem;width:100%;top:0.5rem;padding-left:0.75rem;padding-right:0.75rem}.title.svelte-8mby9k .text.svelte-8mby9k{display:block;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:0.75rem;font-weight:bold;line-height:1.125rem;color:#000}.footer.svelte-8mby9k.svelte-8mby9k{position:relative;padding-left:0.75rem;padding-right:0.75rem;width:100%;height:1.375rem;display:flex;align-items:center}.footer.svelte-8mby9k .goto-button.svelte-8mby9k{flex-shrink:0;white-space:nowrap;background-image:linear-gradient(to right, rgba(87, 144, 253, 1) 0, rgba(42, 114, 254, 1) 100%);color:#fff;font-size:0.625rem;border-radius:0.875rem;font-weight:bold;padding-left:0.5rem;padding-right:0.5rem;height:1.25rem;margin-left:auto;display:flex;align-items:center}.footer.svelte-8mby9k .goto-icon.svelte-8mby9k::after{content:'';display:inline-block;width:0.75rem;height:0.75rem;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAMAAADW3miqAAAAeFBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////GqOSsAAAAJ3RSTlMAFNO2pYt4bErz8uP6ysawgVtBPDcR5C4s2L6ZmJBzZGJXUyEeDws/0G2zAAAAkklEQVQ4y+3TRw6DMBAF0OAeJ3QCpCe0uf8NwRILLBYfiS1/aT3JoymnI+sERZ5VCH0iVto3QDfBLmeSSMUTogRV9bBEpJAKaYpGijn13aTSLeraeG9D0NZFZv4/rRL5FDHnITlllqjv6tykWsmX4JHr05y7j6oFKq2P8He48B0tAM0EY0EDxquClw6vLz6EI35GmwwSZpe+WOgAAAAASUVORK5CYII=);background-size:100% auto;background-repeat:no-repeat}.price.svelte-8mby9k.svelte-8mby9k{flex-shrink:0;margin-right:0.75rem;white-space:nowrap;color:#ff6600;display:flex;align-items:baseline}.price.svelte-8mby9k .value.svelte-8mby9k{position:relative;top:0.0625rem;font-size:1.125rem;line-height:1.375rem;font-family:TG-TYPE, PingFangSC, Segoe UI, Rototo, sans-serif;letter-spacing:0rem}.price.svelte-8mby9k .unit.svelte-8mby9k{padding-left:0.125rem;font-size:0.625rem}.tag.svelte-8mby9k.svelte-8mby9k{position:relative;background-color:white;display:flex;width:-moz-max-content;width:max-content;padding-left:0.75rem;padding-right:0.75rem;min-height:1.75rem}.tag.svelte-8mby9k .base-tag.svelte-8mby9k{height:1rem;margin-top:1.375rem;margin-bottom:0.5rem;margin-right:0.25rem;font-size:0.625rem;line-height:0.875rem;padding:0.0625rem 0.25rem;border-radius:0.125rem;overflow:hidden}.tag.svelte-8mby9k .primary-tag.svelte-8mby9k{background:#e5eefe;color:#0055ff}.tag.svelte-8mby9k .secondary-tag.svelte-8mby9k{background:rgba(255, 102, 0, 0.08);color:rgba(255, 102, 0, 1)}.unfolded.svelte-8mby9k .line.svelte-8mby9k{transform:translateX(-50%) scale(1, 1)}.folded.svelte-8mby9k .line.svelte-8mby9k{transform:translateX(-50%) scale(1, 0);transition-timing-function:ease-in}.unfolded.svelte-8mby9k .content.svelte-8mby9k{opacity:1}.folded.svelte-8mby9k .content.svelte-8mby9k{opacity:0;transform:translateY(0.425rem);transition-timing-function:ease-in}")}function qa(i,t,e){const n=i.slice();return n[0]=t[e],n}function Ka(i,t,e){const n=i.slice();return n[0]=t[e],n}function $a(i){let t,e=i[0]+"",n;return{c(){t=T("div"),n=De(e),b(t,"class","base-tag primary-tag svelte-8mby9k")},m(o,s){z(o,t,s),j(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&ze(n,e)},d(o){o&&M(t)}}}function el(i){let t,e=i[0]&&$a(i);return{c(){e&&e.c(),t=pe()},m(n,o){e&&e.m(n,o),z(n,t,o)},p(n,o){n[0]?e?e.p(n,o):(e=$a(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},d(n){e&&e.d(n),n&&M(t)}}}function tl(i){let t,e=i[0]+"",n;return{c(){t=T("div"),n=De(e),b(t,"class","base-tag secondary-tag svelte-8mby9k")},m(o,s){z(o,t,s),j(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&ze(n,e)},d(o){o&&M(t)}}}function nl(i){let t,e=i[0]&&tl(i);return{c(){e&&e.c(),t=pe()},m(n,o){e&&e.m(n,o),z(n,t,o)},p(n,o){n[0]?e?e.p(n,o):(e=tl(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},d(n){e&&e.d(n),n&&M(t)}}}function il(i){let t,e,n=i[2].price.value+"",o,s,r=i[2].price.unit&&ol(i);return{c(){t=T("div"),e=T("span"),o=De(n),s=ne(),r&&r.c(),b(e,"class","value svelte-8mby9k"),b(t,"class","price svelte-8mby9k")},m(a,l){z(a,t,l),j(t,e),j(e,o),j(t,s),r&&r.m(t,null)},p(a,l){l&4&&n!==(n=a[2].price.value+"")&&ze(o,n),a[2].price.unit?r?r.p(a,l):(r=ol(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&M(t),r&&r.d()}}}function ol(i){let t,e=i[2].price.unit+"",n;return{c(){t=T("span"),n=De(e),b(t,"class","unit svelte-8mby9k")},m(o,s){z(o,t,s),j(t,n)},p(o,s){s&4&&e!==(e=o[2].price.unit+"")&&ze(n,e)},d(o){o&&M(t)}}}function sl(i){let t,e=i[2].highlightText+"",n;return{c(){t=T("div"),n=De(e),b(t,"class","goto-button goto-icon svelte-8mby9k")},m(o,s){z(o,t,s),j(t,n)},p(o,s){s&4&&e!==(e=o[2].highlightText+"")&&ze(n,e)},d(o){o&&M(t)}}}function H0(i){var U,V;let t,e,n,o,s,r,a,l,c,u,f,d,h,g,A=i[2].title+"",p,v,y,w=Ze((U=i[2].price)==null?void 0:U.value)&&((V=i[2].price)==null?void 0:V.value)!=="",P,E;e=new nt({props:{visible:i[1],outDelay:500,left:61,bottom:87,blurRadius:150,spreadRadius:75}});let k=i[2].brandTags||[],S=[];for(let B=0;B<k.length;B+=1)S[B]=el(Ka(i,k,B));let x=i[2].tags||[],Q=[];for(let B=0;B<x.length;B+=1)Q[B]=nl(qa(i,x,B));let H=w&&il(i),F=i[2].highlightText&&sl(i);return{c(){var B;t=T("div"),ee(e.$$.fragment),n=ne(),o=T("div"),s=ne(),r=T("div"),a=T("img"),c=ne(),u=T("div");for(let R=0;R<S.length;R+=1)S[R].c();f=ne();for(let R=0;R<Q.length;R+=1)Q[R].c();d=ne(),h=T("div"),g=T("div"),p=De(A),v=ne(),y=T("div"),H&&H.c(),P=ne(),F&&F.c(),b(o,"class","line svelte-8mby9k"),L(o,"transition-delay",i[1]?vi+"ms":bi+al-rl-40+"ms"),b(a,"class","headerImage svelte-8mby9k"),Xe(a.src,l=i[2].headerPictureUrl)||b(a,"src",l),b(a,"alt",""),b(u,"class","tag svelte-8mby9k"),b(g,"class","text svelte-8mby9k"),b(h,"class","title svelte-8mby9k"),b(y,"class","footer svelte-8mby9k"),L(y,"height",Ze((B=i[2].price)==null?void 0:B.value)&&i[2].highlightText?void 0:"1rem"),b(r,"class","content svelte-8mby9k"),L(r,"transition-delay",i[1]?vi+bi+"ms":"0ms"),b(t,"class","marketing svelte-8mby9k"),q(t,"unfolded",i[1]),q(t,"folded",i[3])},m(B,R){z(B,t,R),K(e,t,null),j(t,n),j(t,o),j(t,s),j(t,r),j(r,a),j(r,c),j(r,u);for(let _=0;_<S.length;_+=1)S[_].m(u,null);j(u,f);for(let _=0;_<Q.length;_+=1)Q[_].m(u,null);j(r,d),j(r,h),j(h,g),j(g,p),j(r,v),j(r,y),H&&H.m(y,null),j(y,P),F&&F.m(y,null),E=!0},p(B,[R]){var N,te,X;const _={};if(R&2&&(_.visible=B[1]),e.$set(_),R&2&&L(o,"transition-delay",B[1]?vi+"ms":bi+al-rl-40+"ms"),(!E||R&4&&!Xe(a.src,l=B[2].headerPictureUrl))&&b(a,"src",l),R&4){k=B[2].brandTags||[];let Z;for(Z=0;Z<k.length;Z+=1){const me=Ka(B,k,Z);S[Z]?S[Z].p(me,R):(S[Z]=el(me),S[Z].c(),S[Z].m(u,f))}for(;Z<S.length;Z+=1)S[Z].d(1);S.length=k.length}if(R&4){x=B[2].tags||[];let Z;for(Z=0;Z<x.length;Z+=1){const me=qa(B,x,Z);Q[Z]?Q[Z].p(me,R):(Q[Z]=nl(me),Q[Z].c(),Q[Z].m(u,null))}for(;Z<Q.length;Z+=1)Q[Z].d(1);Q.length=x.length}(!E||R&4)&&A!==(A=B[2].title+"")&&ze(p,A),R&4&&(w=Ze((N=B[2].price)==null?void 0:N.value)&&((te=B[2].price)==null?void 0:te.value)!==""),w?H?H.p(B,R):(H=il(B),H.c(),H.m(y,P)):H&&(H.d(1),H=null),B[2].highlightText?F?F.p(B,R):(F=sl(B),F.c(),F.m(y,null)):F&&(F.d(1),F=null),R&4&&L(y,"height",Ze((X=B[2].price)==null?void 0:X.value)&&B[2].highlightText?void 0:"1rem"),R&2&&L(r,"transition-delay",B[1]?vi+bi+"ms":"0ms"),(!E||R&2)&&q(t,"unfolded",B[1]),(!E||R&8)&&q(t,"folded",B[3])},i(B){E||(C(e.$$.fragment,B),E=!0)},o(B){D(e.$$.fragment,B),E=!1},d(B){B&&M(t),$(e),dt(S,B),dt(Q,B),H&&H.d(),F&&F.d()}}}const vi=400,rl=500,bi=180,al=500;function _0(i,t,e){let n,o,s,{tag:r}=t;return i.$$set=a=>{"tag"in a&&e(0,r=a.tag)},i.$$.update=()=>{var a,l;i.$$.dirty&1&&e(1,n=(l=(a=r.state)==null?void 0:a.unfolded)!=null?l:!1),i.$$.dirty&2&&e(3,o=!n),i.$$.dirty&1&&e(2,s=r.data)},[r,n,s,o]}class X0 extends re{constructor(t){super(),se(this,t,_0,H0,oe,{tag:0},W0)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VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVU=",kn={};var yi=(i=>(i.Default="default",i.GetAudioDuration="getAudioDuration",i.PlayAudio="playAudio",i))(yi||{});function ll(i,t){const e=(t==null?void 0:t.namespace)||"default",n=kn[e]||(kn[e]=[]);let o=n.find(s=>!s.realSrc||s.realSrc===rn);return o||(console.warn("\u672A\u627E\u5230\u7F13\u5B58\u97F3\u9891\uFF0C\u5DF2\u65B0\u5EFA",kn),o=new Ao(rn),n.push(o)),i&&(o.src=i),o}function Y0(i){return W(this,null,function*(){const t=(()=>i instanceof Ao?i:ll(i,{namespace:"getAudioDuration"}))(),e=yield new Promise(n=>{t.duration?t.isBlankAudio?n(0):n(t.duration):(t.addEventListener("loadedmetadata",()=>{t.isBlankAudio?n(0):n(t.duration)}),t.addEventListener("canplaythrough",()=>{t.isBlankAudio?n(0):n(t.duration)}))});return typeof i=="string"&&t.clear(),e})}function cl(i,t){const e=(t==null?void 0:t.namespace)||"default",n=kn[e]||(kn[e]=[]),o=i-n.length;if(!(o<=0))for(let s=0;s<o;s++)n.push(new Ao(rn))}class Ao extends Audio{constructor(e){super(e);m(this,"preload","auto");m(this,"realSrc","");m(this,"inited",!1);m(this,"removeDocumentEventListener");this.realSrc=e!=null?e:"",super.addEventListener("ended",()=>{this.src=""});const n=()=>U0(this);document.addEventListener("click",n),document.addEventListener("touchend",n),this.removeDocumentEventListener=()=>{document.removeEventListener("click",n),document.removeEventListener("touchend",n)}}get isBlankAudio(){return this.realSrc===rn||!this.realSrc}get src(){return super.src}set src(e){super.src=e,this.realSrc=e}clear(){this.src=rn,this.currentTime=0}}function U0(i){!i||i.inited||(i.src&&(i.inited=!0,i.removeDocumentEventListener()),i.src===rn&&i.play())}class J0 extends Audio{constructor(e){super();m(this,"sharedAudioSrc");m(this,"sharedAudioPaused",!0);m(this,"sharedAudioCurrentTime",0);m(this,"tryplaying",!1);m(this,"audioInstance");m(this,"eventListenerDisposer");this.sharedAudioSrc=e}get paused(){var e;return(e=this.sharedAudioPaused)!=null?e:!0}get currentTime(){return this.sharedAudioCurrentTime}play(){return W(this,null,function*(){var e,n,o;this.tryplaying||(this.tryplaying=!0,(!this.audioInstance||((e=this.audioInstance)==null?void 0:e.realSrc)!==this.sharedAudioSrc)&&(this.audioInstance=ll(this.sharedAudioSrc,{namespace:yi.PlayAudio})),this.audioInstance.currentTime=(n=this.currentTime)!=null?n:0,(o=this.eventListenerDisposer)==null||o.call(this),this.eventListenerDisposer=this.addEventListeners(),this.audioInstance.play().then(()=>{this.sharedAudioPaused=!1}).catch(s=>{this.pause(),console.warn(s)}).finally(()=>{this.tryplaying=!1}))})}pause(){!this.audioInstance||this.paused||(this.sharedAudioPaused=!0,this.audioInstance.addEventListener("pause",()=>{var e;(e=this.eventListenerDisposer)==null||e.call(this)},{once:!0}),this.audioInstance.pause())}dispose(){this.clear(),this.audioInstance=void 0}clear(){var e;(e=this.audioInstance)==null||e.clear()}addEventListeners(){const e=this.audioInstance;if(!e)return;const n=d=>{var h;this.sharedAudioCurrentTime=e.currentTime,(h=this.ontimeupdate)==null||h.call(this,d)},o=d=>{var h;return(h=this.onplay)==null?void 0:h.call(this,d)},s=d=>{var h;(h=this.onpause)==null||h.call(this,d),this.clear()},r=d=>{var h;(h=this.onended)==null||h.call(this,d),this.sharedAudioCurrentTime=0},a=d=>{var h;return(h=this.onerror)==null?void 0:h.call(this,d)},l=d=>{var h;return(h=this.oncanplay)==null?void 0:h.call(this,d)},c=d=>{var h;return(h=this.oncanplaythrough)==null?void 0:h.call(this,d)},u=d=>{var h;return(h=this.onloadeddata)==null?void 0:h.call(this,d)},f=d=>{var h;return(h=this.onloadedmetadata)==null?void 0:h.call(this,d)};return e.addEventListener("timeupdate",n),e.addEventListener("play",o),e.addEventListener("pause",s),e.addEventListener("ended",r),e.addEventListener("error",a),e.addEventListener("canplay",l),e.addEventListener("canplaythrough",c),e.addEventListener("loadeddata",u),e.addEventListener("loadedmetadata",f),()=>{e.removeEventListener("timeupdate",n),e.removeEventListener("play",o),e.removeEventListener("pause",s),e.removeEventListener("ended",r),e.removeEventListener("error",a),e.removeEventListener("canplay",l),e.removeEventListener("canplaythrough",c),e.removeEventListener("loadeddata",u),e.removeEventListener("loadedmetadata",f)}}}function Z0(i){ue(i,"svelte-13e7hxv",".audio.svelte-13e7hxv{pointer-events:auto;cursor:pointer;width:100%;height:100%}")}function q0(i){let t,e,n,o;const s=i[8].default,r=_t(s,i,i[7],null);return{c(){t=T("div"),r&&r.c(),b(t,"class","audio svelte-13e7hxv"),b(t,"style",i[0])},m(a,l){z(a,t,l),r&&r.m(t,null),e=!0,n||(o=Pe(t,"click",Uo(i[1])),n=!0)},p(a,[l]){r&&r.p&&(!e||l&128)&&Yt(r,s,a,a[7],e?Xt(s,a[7],l,null):Ut(a[7]),null),(!e||l&1)&&b(t,"style",a[0])},i(a){e||(C(r,a),e=!0)},o(a){D(r,a),e=!1},d(a){a&&M(t),r&&r.d(a),n=!1,o()}}}function K0(i,t,e){let{$$slots:n={},$$scope:o}=t,{url:s}=t,{enable:r=!0}=t,{style:a=""}=t,{hooksInfo:l}=t;const c=vn(),u=St("hooks"),f=St("mediaStore");let d,h=!0;function g(){e(5,d.onplay=p=>{u.emit("playStateChange",G({event:p,state:"playing",mediaInstance:d},l)),c("play"),e(6,h=!1)},d),e(5,d.onpause=p=>{u.emit("playStateChange",G({event:p,state:"paused",mediaInstance:d},l)),c("pause"),e(6,h=!0)},d),e(5,d.onloadedmetadata=p=>{typeof d.duration=="number"&&!Number.isNaN(d.duration)&&c("duration",d.duration)},d),e(5,d.ontimeupdate=p=>{c("timeupdate",d.currentTime)},d)}f.subscribe(({currentMediaElement:p})=>{p!==d&&(h||d==null||d.pause())});function A(p){!d||(u.emit("click",G({event:p,target:"AudioTagPlayIcon",audioInstance:d},l)),f.set({currentMediaElement:d}),u.emit("playStateChange",G({event:p,state:d.paused?"playing":"paused",mediaInstance:d},l)),d.paused?d.play():d.pause())}return i.$$set=p=>{"url"in p&&e(2,s=p.url),"enable"in p&&e(3,r=p.enable),"style"in p&&e(0,a=p.style),"hooksInfo"in p&&e(4,l=p.hooksInfo),"$$scope"in p&&e(7,o=p.$$scope)},i.$$.update=()=>{i.$$.dirty&4&&(s||c("duration",0)),i.$$.dirty&36&&(d==null||d.dispose(),e(5,d=new J0(s)),c("audioRef",d),setTimeout(()=>c("audioRef",d),200),Y0(s).then(p=>c("duration",p)),g()),i.$$.dirty&40&&(r||d==null||d.pause()),i.$$.dirty&72&&c(r&&!h?"play":"pause")},[a,A,s,r,l,d,h,o,n]}class ul extends re{constructor(t){super(),se(this,t,K0,q0,oe,{url:2,enable:3,style:0,hooksInfo:4},Z0)}}function $0(i){ue(i,"svelte-srt2pi",".audio-icon__wrapper.svelte-srt2pi.svelte-srt2pi{display:inline-block}.audio-icon.svelte-srt2pi.svelte-srt2pi{display:flex;justify-content:center;align-items:center;position:relative;width:100%;height:100%;border-radius:50%;background-color:rgba(255, 255, 255, 0.8)}.audio-icon.svelte-srt2pi .sound-wave__container.svelte-srt2pi{position:absolute;pointer-events:none;width:60%;height:60%}.sound-wave.svelte-srt2pi.svelte-srt2pi{animation-duration:2s;animation-iteration-count:infinite;animation-play-state:paused;transition:opacity 0}.playing.svelte-srt2pi .sound-wave.svelte-srt2pi{animation-play-state:running}.playing.svelte-srt2pi .sound-wave-1.svelte-srt2pi{animation-name:svelte-srt2pi-sound_wave_1_animation}.playing.svelte-srt2pi .sound-wave-2.svelte-srt2pi{animation-name:svelte-srt2pi-sound_wave_2_animation}.playing.svelte-srt2pi .sound-wave-3.svelte-srt2pi{animation-name:svelte-srt2pi-sound_wave_3_animation}@keyframes svelte-srt2pi-sound_wave_1_animation{0%,10%{opacity:0}25%,100%{opacity:1}}@keyframes svelte-srt2pi-sound_wave_2_animation{0%,35%{opacity:0}50%,100%{opacity:1}}@keyframes svelte-srt2pi-sound_wave_3_animation{0%,60%{opacity:0}75%,100%{opacity:1}}")}function dl(i){let t,e;return t=new nt({props:{center:!0,blurRadius:12,spreadRadius:5}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function eA(i){let t,e,n,o,s,r=i[1]&&dl();return{c(){t=T("div"),r&&r.c(),e=ne(),n=T("div"),o=T("div"),o.innerHTML='<svg width="100%" height="100%" viewBox="0 0 128 128"><g transform="rotate(-45 12 64) translate(12 64)" fill="black" stroke="black" fill-opacity="0.6" stroke-opacity="0.6"><path stroke="none" class="sound-wave sound-wave-1 svelte-srt2pi" d="M0,23 A23,23 0 0,0 23,0 L0,0"></path><path fill="none" stroke-width="15" class="sound-wave sound-wave-2 svelte-srt2pi" d="M0,46 A46,46 0 0,0 46,0"></path><path fill="none" stroke-width="15" class="sound-wave sound-wave-3 svelte-srt2pi" d="M0,80 A80,80 0 0,0 80,0"></path></g></svg>',b(o,"class","sound-wave__container svelte-srt2pi"),b(n,"class","audio-icon svelte-srt2pi"),q(n,"playing",i[0]),b(t,"class","audio-icon__wrapper svelte-srt2pi"),b(t,"style",i[2]),L(t,"width",i[5]),L(t,"height",i[5])},m(a,l){z(a,t,l),r&&r.m(t,null),j(t,e),j(t,n),j(n,o),i[7](o),i[8](t),s=!0},p(a,[l]){a[1]?r?l&2&&C(r,1):(r=dl(),r.c(),C(r,1),r.m(t,e)):r&&(ae(),D(r,1,1,()=>{r=null}),le()),(!s||l&1)&&q(n,"playing",a[0]),(!s||l&4)&&b(t,"style",a[2]),l&32&&L(t,"width",a[5]),l&32&&L(t,"height",a[5])},i(a){s||(C(r),s=!0)},o(a){D(r),s=!1},d(a){a&&M(t),r&&r.d(),i[7](null),i[8](null)}}}function tA(i,t,e){let n,{playing:o}=t,{shadow:s=!1}=t,{style:r=null}=t,{width:a="100%"}=t,l,c;function u(d){Oe[d?"unshift":"push"](()=>{c=d,e(4,c)})}function f(d){Oe[d?"unshift":"push"](()=>{l=d,e(3,l)})}return i.$$set=d=>{"playing"in d&&e(0,o=d.playing),"shadow"in d&&e(1,s=d.shadow),"style"in d&&e(2,r=d.style),"width"in d&&e(6,a=d.width)},i.$$.update=()=>{i.$$.dirty&64&&e(5,n=typeof a=="number"?xe(a):a)},[o,s,r,l,c,n,a,u,f]}class fl extends re{constructor(t){super(),se(this,t,tA,eA,oe,{playing:0,shadow:1,style:2,width:6},$0)}}function nA(i){ue(i,"svelte-1s6gk4a",".audio-tag.svelte-1s6gk4a{position:absolute;left:0;top:0;width:0;height:0;overflow:visible}.audio-icon__wrapper.svelte-1s6gk4a{position:relative;vertical-align:top;width:100%;height:100%}.content.svelte-1s6gk4a{width:-moz-max-content;width:max-content;height:3.375rem;padding:2.25rem 0.25rem 0 1rem;position:absolute;left:0;bottom:0.125rem;overflow:hidden;box-sizing:border-box;font-size:0;white-space:nowrap;font-weight:600}.wrapper.svelte-1s6gk4a{position:relative;width:100%;height:100%}.audio-icon.svelte-1s6gk4a{pointer-events:none;vertical-align:top;display:inline-block;width:1rem;height:1rem;margin-right:0.25rem;margin-top:0.0625rem}.audio.svelte-1s6gk4a{position:relative;width:100%;height:100%}")}function hl(i){var v,y;let t,e,n,o,s,r,a,l,c,u,f,d,h,g,A;e=new nt({props:{visible:i[6],left:i[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}});let p=i[6]&&ml(i);return c=new fa({props:{visible:i[6],textUnfolded:i[1],content:i[5]}}),d=new ro({props:{unfolded:i[6],length:i[3],outDelay:i[4]+20*Math.min((y=(v=i[5])==null?void 0:v.length)!=null?y:10,15),useLinearColor:!0}}),{c(){t=T("div"),ee(e.$$.fragment),n=ne(),o=T("div"),s=T("div"),r=T("div"),p&&p.c(),a=ne(),l=T("div"),ee(c.$$.fragment),f=ne(),ee(d.$$.fragment),b(r,"class","audio-icon svelte-1s6gk4a"),Le(()=>i[11].call(l)),L(l,"display","inline-block"),b(s,"class","wrapper svelte-1s6gk4a"),b(o,"class","content svelte-1s6gk4a"),b(t,"class","audio-tag svelte-1s6gk4a"),q(t,"unfolded",i[6])},m(w,P){z(w,t,P),K(e,t,null),j(t,n),j(t,o),j(o,s),j(s,r),p&&p.m(r,null),j(s,a),j(s,l),K(c,l,null),u=ft(l,i[11].bind(l)),j(t,f),K(d,t,null),h=!0,g||(A=Pe(l,"click",i[7]),g=!0)},p(w,P){var x,Q;const E={};P&64&&(E.visible=w[6]),P&8&&(E.left=w[3]/2+"px"),e.$set(E),w[6]?p?(p.p(w,P),P&64&&C(p,1)):(p=ml(w),p.c(),C(p,1),p.m(r,null)):p&&(ae(),D(p,1,1,()=>{p=null}),le());const k={};P&64&&(k.visible=w[6]),P&2&&(k.textUnfolded=w[1]),P&32&&(k.content=w[5]),c.$set(k);const S={};P&64&&(S.unfolded=w[6]),P&8&&(S.length=w[3]),P&48&&(S.outDelay=w[4]+20*Math.min((Q=(x=w[5])==null?void 0:x.length)!=null?Q:10,15)),d.$set(S),(!h||P&64)&&q(t,"unfolded",w[6])},i(w){h||(C(e.$$.fragment,w),C(p),C(c.$$.fragment,w),C(d.$$.fragment,w),h=!0)},o(w){D(e.$$.fragment,w),D(p),D(c.$$.fragment,w),D(d.$$.fragment,w),h=!1},d(w){w&&M(t),$(e),p&&p.d(),$(c),u(),$(d),g=!1,A()}}}function ml(i){let t,e,n,o,s,r,a;return e=new nt({props:{center:!0,blurRadius:15,spreadRadius:6}}),o=new ul({props:{enable:i[6],url:i[0].data.audioUrl,hooksInfo:{tag:i[0]},$$slots:{default:[iA]},$$scope:{ctx:i}}}),o.$on("play",i[8]),o.$on("pause",i[9]),o.$on("audioRef",i[10]),{c(){t=T("div"),ee(e.$$.fragment),n=ne(),ee(o.$$.fragment),b(t,"class","audio svelte-1s6gk4a")},m(l,c){z(l,t,c),K(e,t,null),j(t,n),K(o,t,null),a=!0},p(l,c){i=l;const u={};c&64&&(u.enable=i[6]),c&1&&(u.url=i[0].data.audioUrl),c&1&&(u.hooksInfo={tag:i[0]}),c&4100&&(u.$$scope={dirty:c,ctx:i}),o.$set(u)},i(l){a||(C(e.$$.fragment,l),C(o.$$.fragment,l),l&&Le(()=>{r&&r.end(1),s=Mt(t,zt,{duration:1e3,delay:0,easing:qt}),s.start()}),a=!0)},o(l){var c,u;D(e.$$.fragment,l),D(o.$$.fragment,l),s&&s.invalidate(),l&&(r=Zt(t,zt,{duration:1e3,delay:20*Math.min((u=(c=i[5])==null?void 0:c.length)!=null?u:10,15),easing:qt})),a=!1},d(l){l&&M(t),$(e),$(o),l&&r&&r.end()}}}function iA(i){let t,e,n;return e=new fl({props:{playing:i[2]}}),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","audio-icon__wrapper svelte-1s6gk4a")},m(o,s){z(o,t,s),K(e,t,null),n=!0},p(o,s){const r={};s&4&&(r.playing=o[2]),e.$set(r)},i(o){n||(C(e.$$.fragment,o),n=!0)},o(o){D(e.$$.fragment,o),n=!1},d(o){o&&M(t),$(e)}}}function oA(i){let t,e,n=i[0].state&&hl(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&C(n,1)):(n=hl(o),n.c(),C(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(C(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function sA(i,t,e){let n,o,s,{tag:r}=t,a=!1,l=!1,c;function u(){e(1,a=!a)}const f=()=>{e(2,l=!0)},d=()=>{e(2,l=!1)};function h(A){bn.call(this,i,A)}function g(){c=this.clientWidth,e(3,c)}return i.$$set=A=>{"tag"in A&&e(0,r=A.tag)},i.$$.update=()=>{var A,p,v;i.$$.dirty&1&&e(6,n=!!((A=r.state)!=null&&A.unfolded)),i.$$.dirty&1&&e(5,o=(v=(p=r.data.title)!=null?p:r.data.text)!=null?v:""),i.$$.dirty&2&&e(4,s=a?450:0)},[r,a,l,c,s,o,n,u,f,d,h,g]}class rA extends re{constructor(t){super(),se(this,t,sA,oA,oe,{tag:0},nA)}}function aA(i){const t=document.createElement("div");t.style.color=i,document.body.appendChild(t);const e=window.getComputedStyle(t).color;t.remove();const n=(()=>e.search("rgba")===-1?e.replace("rgb","rgba").replace(")",", 1)"):e)(),o=n.replace("rgba","").replace("(","").replace(")","").split(",").map(s=>Number(s.trim()));return{rgba:n,r:o[0],g:o[1],b:o[2],a:o[3]}}function lA(i){ue(i,"svelte-58hfjf",".audio-tag__wrapper.svelte-58hfjf{position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.audio-tag.svelte-58hfjf{position:relative;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;padding:0.1875rem;padding-right:0.625rem;border-radius:624999.9375rem;border:0.03125rem solid rgba(255, 255, 255, 0.2)}.audio__inner.svelte-58hfjf{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.text.svelte-58hfjf{font-weight:bold;font-size:0.75rem;margin-left:0.25rem}.audio-icon__wrapper.svelte-58hfjf{position:relative;vertical-align:top;pointer-events:none;width:1.375rem;height:1.375rem}")}function pl(i){let t,e,n,o;return n=new ul({props:{style:"width: max-content; height: max-content;",enable:i[0].state.visible,url:i[0].data.audioUrl,hooksInfo:{tag:i[0]},$$slots:{default:[uA]},$$scope:{ctx:i}}}),n.$on("play",i[7]),n.$on("pause",i[8]),n.$on("timeupdate",i[9]),n.$on("duration",i[10]),n.$on("audioRef",i[11]),{c(){t=T("div"),e=T("div"),ee(n.$$.fragment),b(e,"class","audio-tag svelte-58hfjf"),L(e,"background-color",i[1]),L(e,"color",i[5]),b(t,"class","audio-tag__wrapper svelte-58hfjf")},m(s,r){z(s,t,r),j(t,e),K(n,e,null),o=!0},p(s,r){const a={};r&1&&(a.enable=s[0].state.visible),r&1&&(a.url=s[0].data.audioUrl),r&1&&(a.hooksInfo={tag:s[0]}),r&8260&&(a.$$scope={dirty:r,ctx:s}),n.$set(a),r&2&&L(e,"background-color",s[1]),r&32&&L(e,"color",s[5])},i(s){o||(C(n.$$.fragment,s),o=!0)},o(s){D(n.$$.fragment,s),o=!1},d(s){s&&M(t),$(n)}}}function cA(i){let t;return{c(){t=De(i[6])},m(e,n){z(e,t,n)},p(e,n){n&64&&ze(t,e[6])},d(e){e&&M(t)}}}function uA(i){let t,e,n,o,s,r,a;return n=new fl({props:{playing:i[2]}}),r=new uo({props:{maxWidth:72,$$slots:{default:[cA]},$$scope:{ctx:i}}}),{c(){t=T("div"),e=T("div"),ee(n.$$.fragment),o=ne(),s=T("div"),ee(r.$$.fragment),b(e,"class","audio-icon__wrapper svelte-58hfjf"),b(s,"class","text svelte-58hfjf"),b(t,"class","audio__inner svelte-58hfjf")},m(l,c){z(l,t,c),j(t,e),K(n,e,null),j(t,o),j(t,s),K(r,s,null),a=!0},p(l,c){const u={};c&4&&(u.playing=l[2]),n.$set(u);const f={};c&8256&&(f.$$scope={dirty:c,ctx:l}),r.$set(f)},i(l){a||(C(n.$$.fragment,l),C(r.$$.fragment,l),a=!0)},o(l){D(n.$$.fragment,l),D(r.$$.fragment,l),a=!1},d(l){l&&M(t),$(n),$(r)}}}function dA(i){let t,e,n=i[0].state&&pl(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&C(n,1)):(n=pl(o),n.c(),C(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(C(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function fA(i,t,e){let n,o,s,{tag:r}=t;vn();let a=!1,l=0,c=0;const u=()=>{e(2,a=!0)},f=()=>{e(2,a=!1)},d=A=>{e(3,l=A.detail)},h=A=>{e(4,c=A.detail)};function g(A){bn.call(this,i,A)}return i.$$set=A=>{"tag"in A&&e(0,r=A.tag)},i.$$.update=()=>{var A,p;i.$$.dirty&1&&e(6,n=(p=(A=r.data.title)!=null?A:r.data.text)!=null?p:""),i.$$.dirty&1&&e(1,o=(()=>{var v;return r.data.backgroundColor==="dark"?"rgba(0, 0, 0, 0.3)":r.data.backgroundColor==="light"?"rgba(255, 255, 255, 0.3)":(v=r.data.backgroundColor)!=null?v:"rgba(0, 0, 0, 0.3)"})()),i.$$.dirty&2&&e(5,s=(()=>{const{r:v,g:y,b:w}=aA(o);return(v*299+y*587+w*114)/1e3>=128?"rgba(0, 0, 0, 0.6)":"white"})())},[r,o,a,l,c,s,n,u,f,d,h,g]}class hA extends re{constructor(t){super(),se(this,t,fA,dA,oe,{tag:0},lA)}}function mA(i){let t,e;return t=new hA({props:{tag:i[0]}}),t.$on("audioRef",i[2]),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function pA(i){let t,e;return t=new rA({props:{tag:i[0]}}),t.$on("audioRef",i[2]),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function gA(i){let t,e,n,o;const s=[pA,mA],r=[];function a(l,c){return l[1]==="line"?0:l[1]==="plane"?1:-1}return~(t=a(i))&&(e=r[t]=s[t](i)),{c(){e&&e.c(),n=pe()},m(l,c){~t&&r[t].m(l,c),z(l,n,c),o=!0},p(l,[c]){let u=t;t=a(l),t===u?~t&&r[t].p(l,c):(e&&(ae(),D(r[u],1,1,()=>{r[u]=null}),le()),~t?(e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),C(e,1),e.m(n.parentNode,n)):e=null)},i(l){o||(C(e),o=!0)},o(l){D(e),o=!1},d(l){~t&&r[t].d(l),l&&M(n)}}}function AA(i,t,e){let n,{tag:o}=t,s;function r(a){s=a.detail}return o.play=()=>s.play(),o.pause=()=>s.pause(),i.$$set=a=>{"tag"in a&&e(0,o=a.tag)},i.$$.update=()=>{var a;i.$$.dirty&1&&e(1,n=(a=o.data.appearance)!=null?a:"line")},[o,n,r]}class vA extends re{constructor(t){super(),se(this,t,AA,gA,oe,{tag:0})}}function bA(i){ue(i,"svelte-10cw0el",".media-wrapper.svelte-10cw0el{position:absolute;width:100%;height:100%}")}function gl(i){var o;let t,e,n;return e=new Wa({props:{mediaItemConfig:{canPlay:!0,playButtonSizeIfNeed:"large",playButtonIfNeed:(o=i[4])!=null?o:"withText",disableVideoIfHavePoster:!1,objectFit:i[2]},unfolded:i[6],mediaData:i[5],enableCarousel:i[1],autoplayConfig:i[3],tag:i[0],inDelay:500,duration:500}}),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","media-wrapper svelte-10cw0el")},m(s,r){z(s,t,r),K(e,t,null),n=!0},p(s,r){var l;const a={};r&20&&(a.mediaItemConfig={canPlay:!0,playButtonSizeIfNeed:"large",playButtonIfNeed:(l=s[4])!=null?l:"withText",disableVideoIfHavePoster:!1,objectFit:s[2]}),r&64&&(a.unfolded=s[6]),r&32&&(a.mediaData=s[5]),r&2&&(a.enableCarousel=s[1]),r&8&&(a.autoplayConfig=s[3]),r&1&&(a.tag=s[0]),e.$set(a)},i(s){n||(C(e.$$.fragment,s),n=!0)},o(s){D(e.$$.fragment,s),n=!1},d(s){s&&M(t),$(e)}}}function yA(i){let t,e,n=i[0].state&&i[5]&&gl(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state&&o[5]?n?(n.p(o,s),s&33&&C(n,1)):(n=gl(o),n.c(),C(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(C(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function wA(i,t,e){let n,o,s,r,a,l,{tag:c}=t;return i.$$set=u=>{"tag"in u&&e(0,c=u.tag)},i.$$.update=()=>{var u,f;i.$$.dirty&1&&e(6,n=c.state?c.state.unfolded:!1),i.$$.dirty&1&&e(5,o=c.data.mediaData),i.$$.dirty&1&&e(1,s=c.data.enableCarousel),i.$$.dirty&1&&e(4,r=c.data.playIcon),i.$$.dirty&3&&e(3,a=(u=c.data.autoplayConfig)!=null?u:{autoplay:s!=null?s:!0,autoplayVideo:!0}),i.$$.dirty&1&&e(2,l=(f=c.data.objectFit)!=null?f:(()=>c.data.adaptationMode==="stretch"?"fill":c.data.adaptationMode==="proportional"?"contain":void 0)())},[c,s,l,a,r,o,n]}class CA extends re{constructor(t){super(),se(this,t,wA,yA,oe,{tag:0},bA)}}function PA(i){return W(this,null,function*(){return new Promise((t,e)=>{if(!i){e(Error("url is empty"));return}const n=new Image;n.src=i,n.onload=()=>t({width:n.width,height:n.height}),n.onerror=e})})}function IA(i){return W(this,null,function*(){const{steps:t,url:e,ratio:n=3,fps:o=24}=i;if(!t)throw new Error("KeyframeIcon requires steps");const{width:s,height:r}=yield PA(e),a=s/n,l=r/n,c=a/t,u=l,f=1/o*t+"s",d=a/t-a;return{url:e,keyframesWidth:a,keyframesHeight:l,wrapperWidth:c,wrapperHeight:u,steps:t,duration:f,offsetX:d,offsetY:0}})}function EA(i){ue(i,"svelte-mhs8j5","@keyframes svelte-mhs8j5-sprites-animation{0%{background-position:0 0}100%{background-position:var(--keyframe_offset_x) 0}}.icon-image.svelte-mhs8j5{display:block;width:100%}.icon-keyframe-container.svelte-mhs8j5{overflow:hidden}.icon-keyframe-wrapper.svelte-mhs8j5{transform-origin:0 0}.icon-keyframe.svelte-mhs8j5{background-repeat:no-repeat;animation-direction:normal;animation-iteration-count:infinite;animation-name:svelte-mhs8j5-sprites-animation}")}function Al(i){i[6]=i[14].url,i[7]=i[14].keyframesWidth,i[8]=i[14].keyframesHeight,i[9]=i[14].wrapperWidth,i[10]=i[14].wrapperHeight,i[11]=i[14].steps,i[12]=i[14].duration,i[13]=i[14].offsetX}function vl(i){let t,e,n,o=i[2]&&bl();function s(l,c){return l[3]?xA:kA}let r=s(i),a=r(i);return{c(){t=T("div"),o&&o.c(),e=ne(),a.c(),b(t,"class","icon"),L(t,"width",typeof i[0]=="number"?xe(i[0]):i[0])},m(l,c){z(l,t,c),o&&o.m(t,null),j(t,e),a.m(t,null),n=!0},p(l,c){l[2]?o?c&4&&C(o,1):(o=bl(),o.c(),C(o,1),o.m(t,e)):o&&(ae(),D(o,1,1,()=>{o=null}),le()),r===(r=s(l))&&a?a.p(l,c):(a.d(1),a=r(l),a&&(a.c(),a.m(t,null))),c&1&&L(t,"width",typeof l[0]=="number"?xe(l[0]):l[0])},i(l){n||(C(o),n=!0)},o(l){D(o),n=!1},d(l){l&&M(t),o&&o.d(),a.d()}}}function bl(i){let t,e;return t=new nt({props:{center:!0,blurRadius:24,spreadRadius:16}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function kA(i){let t,e;return{c(){t=T("img"),b(t,"class","icon-image svelte-mhs8j5"),Xe(t.src,e=i[1].url)||b(t,"src",e),b(t,"alt","icon")},m(n,o){z(n,t,o)},p(n,o){o&2&&!Xe(t.src,e=n[1].url)&&b(t,"src",e)},d(n){n&&M(t)}}}function xA(i){let t,e,n={ctx:i,current:null,token:null,hasCatch:!1,pending:SA,then:LA,catch:DA,value:14};return is(e=i[4](i[1]),n),{c(){t=pe(),n.block.c()},m(o,s){z(o,t,s),n.block.m(o,n.anchor=s),n.mount=()=>t.parentNode,n.anchor=t},p(o,s){i=o,n.ctx=i,s&2&&e!==(e=i[4](i[1]))&&is(e,n)||Sc(n,i,s)},d(o){o&&M(t),n.block.d(o),n.token=null,n=null}}}function DA(i){return{c:J,m:J,p:J,d:J}}function LA(i){Al(i);let t,e,n,o=`url(${i[6]})`,s=`steps(${i[11]-1})`;return{c(){t=T("div"),e=T("div"),n=T("div"),b(n,"class","icon-keyframe svelte-mhs8j5"),L(n,"width",xe(i[7])),L(n,"height",xe(i[8])),L(n,"background-image",o),L(n,"animation-duration",i[12]),L(n,"animation-timing-function",s),L(n,"animation-delay",0),L(n,"background-size","100% 100%"),L(n,"--keyframe_offset_x",xe(i[13])),b(e,"class","icon-keyframe-wrapper svelte-mhs8j5"),L(e,"transform",typeof i[0]=="number"?`scale(${i[0]/i[9]})`:void 0),b(t,"class","icon-keyframe-container svelte-mhs8j5"),L(t,"width",typeof i[0]=="number"?xe(i[0]):xe(i[9])),L(t,"height",typeof i[0]=="number"?xe(i[10]*(i[0]/i[9])):xe(i[10]))},m(r,a){z(r,t,a),j(t,e),j(e,n)},p(r,a){Al(r),a&2&&L(n,"width",xe(r[7])),a&2&&L(n,"height",xe(r[8])),a&2&&o!==(o=`url(${r[6]})`)&&L(n,"background-image",o),a&2&&L(n,"animation-duration",r[12]),a&2&&s!==(s=`steps(${r[11]-1})`)&&L(n,"animation-timing-function",s),a&2&&L(n,"--keyframe_offset_x",xe(r[13])),a&3&&L(e,"transform",typeof r[0]=="number"?`scale(${r[0]/r[9]})`:void 0),a&3&&L(t,"width",typeof r[0]=="number"?xe(r[0]):xe(r[9])),a&3&&L(t,"height",typeof r[0]=="number"?xe(r[10]*(r[0]/r[9])):xe(r[10]))},d(r){r&&M(t)}}}function SA(i){return{c:J,m:J,p:J,d:J}}function MA(i){let t,e,n=i[1]&&vl(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&C(n,1)):(n=vl(o),n.c(),C(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(C(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function zA(i,t,e){let n,{width:o=null}=t,{icon:s=null}=t,{shadow:r=!1}=t;const a=vn();function l(c){return W(this,null,function*(){const u=yield IA(c);return a("iconLoaded"),u})}return i.$$set=c=>{"width"in c&&e(0,o=c.width),"icon"in c&&e(1,s=c.icon),"shadow"in c&&e(2,r=c.shadow)},i.$$.update=()=>{i.$$.dirty&2&&e(3,n=(s==null?void 0:s.steps)>=2),i.$$.dirty&8&&!n&&a("iconLoaded")},[o,s,r,n,l]}class yl extends re{constructor(t){super(),se(this,t,zA,MA,oe,{width:0,icon:1,shadow:2},EA)}}function TA(i){ue(i,"svelte-e58ijk",".wrapper.svelte-e58ijk{font-weight:600;cursor:pointer;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);display:flex;align-items:center;justify-content:center;flex-direction:column;pointer-events:auto}.text-wrapper.svelte-e58ijk{position:relative;display:flex;align-items:center;justify-content:center}.text.svelte-e58ijk{position:absolute;top:0;font-size:0.875rem;color:#ffffff;letter-spacing:0;text-align:center;max-width:8.75rem;width:-moz-max-content;width:max-content;line-height:1.125rem;text-shadow:0.125rem 0rem 0.5rem rgba(0, 0, 0, 0.15)}")}function wl(i){let t,e,n,o,s,r;return e=new nt({props:{outDelay:0,inDelay:0,center:!0,width:"80%",blurRadius:40,spreadRadius:16,opacity:.08}}),{c(){t=T("div"),ee(e.$$.fragment),n=ne(),o=T("div"),s=De(i[1]),b(o,"class","text svelte-e58ijk"),b(t,"class","text-wrapper svelte-e58ijk")},m(a,l){z(a,t,l),K(e,t,null),j(t,n),j(t,o),j(o,s),r=!0},p(a,l){(!r||l&2)&&ze(s,a[1])},i(a){r||(C(e.$$.fragment,a),r=!0)},o(a){D(e.$$.fragment,a),r=!1},d(a){a&&M(t),$(e)}}}function BA(i){let t,e,n,o;e=new yl({props:{icon:i[0],shadow:!0}}),e.$on("iconLoaded",i[9]);let s=i[1]&&i[2]&&wl(i);return{c(){t=T("div"),ee(e.$$.fragment),n=ne(),s&&s.c(),b(t,"class","wrapper svelte-e58ijk")},m(r,a){z(r,t,a),K(e,t,null),j(t,n),s&&s.m(t,null),o=!0},p(r,[a]){const l={};a&1&&(l.icon=r[0]),e.$set(l),r[1]&&r[2]?s?(s.p(r,a),a&6&&C(s,1)):(s=wl(r),s.c(),C(s,1),s.m(t,null)):s&&(ae(),D(s,1,1,()=>{s=null}),le())},i(r){o||(C(e.$$.fragment,r),C(s),o=!0)},o(r){D(e.$$.fragment,r),D(s),o=!1},d(r){r&&M(t),$(e),s&&s.d()}}}function jA(i,t,e){let n,o,s,r,a,l,c,u,{tag:f}=t;const d=()=>{e(2,n=!0)};return i.$$set=h=>{"tag"in h&&e(3,f=h.tag)},i.$$.update=()=>{var h,g;i.$$.dirty&8&&e(1,o=(h=f.data.title)!=null?h:f.data.text),i.$$.dirty&8&&e(8,s=(g=f.data.icon)!=null?g:f.style.point),i.$$.dirty&256&&e(7,r=s.url),i.$$.dirty&256&&e(6,a=s.steps),i.$$.dirty&256&&e(5,l=s.fps),i.$$.dirty&256&&e(4,c=s.ratio),i.$$.dirty&240&&e(0,u={url:r,steps:a,fps:l,ratio:c})},e(2,n=!1),[u,o,n,f,c,l,a,r,s,d]}class VA extends re{constructor(t){super(),se(this,t,jA,BA,oe,{tag:3},TA)}}function QA(i){ue(i,"svelte-kzl2aj",".customElement__container.svelte-kzl2aj{position:relative}")}function Cl(i){let t,e=i[0].element+"",n;return{c(){t=new Nn(!1),n=pe(),t.a=n},m(o,s){t.m(e,o,s),z(o,n,s)},p(o,s){s&1&&e!==(e=o[0].element+"")&&t.p(e)},d(o){o&&M(n),o&&t.d()}}}function OA(i){let t,e=typeof i[0].element=="string"&&Cl(i);return{c(){t=T("div"),e&&e.c(),b(t,"class","customElement__container svelte-kzl2aj")},m(n,o){z(n,t,o),e&&e.m(t,null),i[2](t)},p(n,[o]){typeof n[0].element=="string"?e?e.p(n,o):(e=Cl(n),e.c(),e.m(t,null)):e&&(e.d(1),e=null)},i:J,o:J,d(n){n&&M(t),e&&e.d(),i[2](null)}}}function FA(i,t,e){let{tag:n}=t,o,s;$e(()=>{if(o){if(n.element instanceof Element){const a=n.element;o.appendChild(a),s=()=>a.remove()}else if(typeof n.element=="function"){const a=n.element;s=a(o)}}}),yt(()=>{s==null||s()});function r(a){Oe[a?"unshift":"push"](()=>{o=a,e(1,o)})}return i.$$set=a=>{"tag"in a&&e(0,n=a.tag)},[n,o,r]}class RA extends re{constructor(t){super(),se(this,t,FA,OA,oe,{tag:0},QA)}}function GA(i){ue(i,"svelte-ofx2uu",'@font-face{font-family:"TG-TYPE";font-style:normal;font-weight:400;src:local("TG-TYPE-Bold"), url(data:application/font-woff2;charset=utf-8;base64,T1RUTwAKAIAAAwAgQ0ZGINFD4CEAAAaQAAAHC0dTVUIAAQAAAAANnAAAAApPUy8yaB5pEwAAAjQAAABgY21hcEItjGUAAAT0AAABfGhlYWQS1WWOAAAAtAAAADZoaGVhBfMBxwAAAhAAAAAkaG10eJ9gBO8AAADsAAABJG1heHAASVAAAAAArAAAAAZuYW1lqczkZQAAApQAAAJecG9zdP+4ADIAAAZwAAAAIAAAUAAASQAAAAEAAAABAADkeHeyXw889QADA+gAAAAA2NoRKwAAAADY2hErACn/OAHgAyAAAQADAAIAAAAAAAAB9ABdAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACCAA7AcwAdwIIADMCCAA0AhwAMwISADkCCAAuAfQANAH+ACsB/gApAggANAEeAFABHgBQAR4AUAIIADQCCAAuAR4AUAEeAFABfAAxAAEAAAPo/zgAAAIcACkAKQHgAAEAAAAAAAAAAAA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z93DzA/hp+HkVsIGveKwezmNFtUAbZGeBeGofSmNiRT8aZJVnnmseSrHPYtoboAb7EvukBfcHBvdL+CEFmaySqaQa+9gWxry+yJ6dhoGcHq12oWZmGk5YW1BMXLnKHg4gCiEK+11L91IlCvdiyhWtb6hpJgoeJAoOIQogCqz3pe/3b/UBufX3bfQD+G74dxWyga94rB7NZEW0PhtlaIF4ah9KY2FFPxo7tkTPZh6MjIqKjB+TiJCIjYoIjgaCoKGHoRuanY6QoB+IgfsB+6QF9wcG9y/4IgWYppGnqhr7a/sCFVBbvMjHu7zGyLxbTk5aWk4fDvtd+AojCoz7jBUmCh8kCq1vqGkeDvtdi/cS94wjCvwKBCIKDiD3ru8BvPeuA7z4EhUn967vBw4eoDf/DAmLDAv47BT4exWcEwAHAQFBXW97ipCarPcv8+7yAfdl8gP4aPf6FfIjB+r3gwUiBi77gwWHBjH3gwUkBuP7gwUnJPcxKPsxI/cx+y/y9y/3MPP7MO4GDvtdi/cSJQr3JBZkcqOzsKSksrCkcWdlcnFmHw6up6eurm+naGhvb2hop2+uHwv3EiUK9yP4ChUiCgt3SgWxBrnmBZGVj5eZGgsB2/cSAwtobm5paqBzqoYLAAABAAAAAAAAAAAAAA==) format("woff2")}*{-webkit-tap-highlight-color:transparent}.content__container.svelte-ofx2uu{position:relative;left:50%;top:50%;transform:translate(-50%, -50%);font-family:PingFangSC, Segoe UI, Rototo, sans-serif}.content__container.withAnimation.svelte-ofx2uu{transition:opacity 0.3s linear}.content__container.unClickable.svelte-ofx2uu{pointer-events:none !important}.content__container.unClickable.svelte-ofx2uu *{pointer-events:none !important}.content__wrapper.svelte-ofx2uu{pointer-events:none;width:100%;height:100%}.content__container.hide.svelte-ofx2uu{opacity:0;pointer-events:none}.content__container.hide.svelte-ofx2uu *{pointer-events:none !important}.content__container.disable.svelte-ofx2uu{display:none}.content.svelte-ofx2uu{position:relative;width:100%;height:100%;font-size:0.75rem;line-height:1.125rem;color:#fff}.content.svelte-ofx2uu:not(.unfolded){pointer-events:none}.content.svelte-ofx2uu:not(.unfolded) *{pointer-events:none !important}.content.unfolded.svelte-ofx2uu{pointer-events:auto}')}function NA(i){let t,e;return{c(){t=T("div"),b(t,"data-info","tag content is keep folded"),b(t,"data-id",e=i[1].id)},m(n,o){z(n,t,o)},p(n,o){o&2&&e!==(e=n[1].id)&&b(t,"data-id",e)},i:J,o:J,d(n){n&&M(t)}}}function WA(i){let t,e,n,o,s,r,a,l,c;const u=[ZA,JA,UA,YA,XA,_A,HA],f=[];function d(h,g){return h[1].element?0:h[1].contentType==="Text"?1:h[1].contentType==="ImageText"||h[1].contentType==="Image"||h[1].contentType==="Video"?2:h[1].contentType==="Audio"?3:h[1].contentType==="Marketing"?4:h[1].contentType==="Link"||h[1].contentType==="VRLink"||h[1].contentType==="PanoLink"?5:h[1].contentType==="MediaPlane"||h[1].contentType==="MediaModel"?6:-1}return~(o=d(i))&&(s=f[o]=u[o](i)),{c(){var h;t=T("div"),e=T("div"),n=T("div"),s&&s.c(),b(n,"class","content svelte-ofx2uu"),q(n,"unfolded",(h=i[1].state)==null?void 0:h.unfolded),b(e,"class","content__wrapper svelte-ofx2uu"),b(t,"class","content__container svelte-ofx2uu"),b(t,"data-id",r=i[1].id),q(t,"disable",i[1].enabled===!1),q(t,"hide",i[4]),q(t,"withAnimation",i[0]),q(t,"unClickable",i[1].clickable===!1),L(t,"width",i[1].stickType==="Plane"||i[1].contentType==="MediaModel"?"100%":0),L(t,"height",i[1].stickType==="Plane"||i[1].contentType==="MediaModel"?"100%":0)},m(h,g){z(h,t,g),j(t,e),j(e,n),~o&&f[o].m(n,null),a=!0,l||(c=Pe(t,"click",Uo(i[13])),l=!0)},p(h,g){var p;let A=o;o=d(h),o===A?~o&&f[o].p(h,g):(s&&(ae(),D(f[A],1,1,()=>{f[A]=null}),le()),~o?(s=f[o],s?s.p(h,g):(s=f[o]=u[o](h),s.c()),C(s,1),s.m(n,null)):s=null),(!a||g&2)&&q(n,"unfolded",(p=h[1].state)==null?void 0:p.unfolded),(!a||g&2&&r!==(r=h[1].id))&&b(t,"data-id",r),(!a||g&2)&&q(t,"disable",h[1].enabled===!1),(!a||g&16)&&q(t,"hide",h[4]),(!a||g&1)&&q(t,"withAnimation",h[0]),(!a||g&2)&&q(t,"unClickable",h[1].clickable===!1),g&2&&L(t,"width",h[1].stickType==="Plane"||h[1].contentType==="MediaModel"?"100%":0),g&2&&L(t,"height",h[1].stickType==="Plane"||h[1].contentType==="MediaModel"?"100%":0)},i(h){a||(C(s),a=!0)},o(h){D(s),a=!1},d(h){h&&M(t),~o&&f[o].d(),l=!1,c()}}}function HA(i){let t,e;return t=new CA({props:{tag:Re(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Re(n[1])),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function _A(i){let t,e;return t=new VA({props:{tag:Re(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Re(n[1])),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function XA(i){let t,e;return t=new X0({props:{tag:Re(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Re(n[1])),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function YA(i){let t,e;return t=new vA({props:{tag:Re(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Re(n[1])),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function UA(i){let t,e;return t=new L0({props:{tag:Re(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Re(n[1])),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function JA(i){let t,e;return t=new Up({props:{tag:Re(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Re(n[1])),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function ZA(i){let t,e;return t=new RA({props:{tag:Re(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Re(n[1])),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function qA(i){let t,e,n,o;const s=[WA,NA],r=[];function a(l,c){return l[3]?0:1}return t=a(i),e=r[t]=s[t](i),{c(){e.c(),n=pe()},m(l,c){r[t].m(l,c),z(l,n,c),o=!0},p(l,[c]){let u=t;t=a(l),t===u?r[t].p(l,c):(ae(),D(r[u],1,1,()=>{r[u]=null}),le(),e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),C(e,1),e.m(n.parentNode,n))},i(l){o||(C(e),o=!0)},o(l){D(e),o=!1},d(l){r[t].d(l),l&&M(n)}}}function KA(i,t,e){let n,o,s,r,a,l,{withAnimation:c=!1}=t,{tag:u}=t,{hooks:f}=t,{state:d}=t,{mediaStore:h}=t,{temporaryState:g}=t;Bi("hooks",f),Bi("mediaStore",h);let A,p;function v(P){P?f.emit("exposure",{id:r,type:"start"}):f.emit("exposure",{id:r,type:"end"})}function y(P,E,k){var S,x;return!(!E.visible||!E.enabled||!k.visible||!((S=P.state)!=null&&S.visible)||((x=P.temporaryState)==null?void 0:x.visible)===!1||We(P)&&!P.mediaVisible)}const w=P=>f.emit("click",{event:P,target:"TagContent",tag:u});return i.$$set=P=>{"withAnimation"in P&&e(0,c=P.withAnimation),"tag"in P&&e(1,u=P.tag),"hooks"in P&&e(2,f=P.hooks),"state"in P&&e(5,d=P.state),"mediaStore"in P&&e(6,h=P.mediaStore),"temporaryState"in P&&e(7,g=P.temporaryState)},i.$$.update=()=>{var P,E,k,S,x,Q,H,F,U,V,B;i.$$.dirty&2&&e(11,n=(P=u.state)==null?void 0:P.unfolded),i.$$.dirty&2&&e(10,o=(E=u.state)==null?void 0:E.visible),i.$$.dirty&162&&e(12,s=d.visible&&g.visible&&((k=u.state)==null?void 0:k.visible)),i.$$.dirty&2&&(r=u.id),i.$$.dirty&162&&e(4,a=!y(u,d,g)),i.$$.dirty&4096&&v(s),i.$$.dirty&3842&&u.hooks&&(n!==void 0&&n!==p&&(e(9,p=n),n?(x=(S=u.hooks).emit)==null||x.call(S,"unfolded"):(H=u==null?void 0:(Q=u.hooks).emit)==null||H.call(Q,"folded")),o!==void 0&&o!==A&&(e(8,A=o),o?(U=(F=u.hooks).emit)==null||U.call(F,"show"):(B=(V=u.hooks).emit)==null||B.call(V,"hide"))),i.$$.dirty&2&&e(3,l=(()=>!(typeof u.mergedConfig.unfoldedConfig=="object"&&u.mergedConfig.unfoldedConfig.keep==="folded"))())},[c,u,f,l,a,d,h,g,A,p,o,n,s,w]}class Pl extends re{constructor(t){super(),se(this,t,KA,qA,oe,{withAnimation:0,tag:1,hooks:2,state:5,mediaStore:6,temporaryState:7},GA)}}function $A(i){ue(i,"svelte-yex9rb",'@charset "UTF-8";.tag-point-click-helper.svelte-yex9rb.svelte-yex9rb{position:absolute;pointer-events:auto;cursor:pointer;width:2.5rem;height:2.5rem;left:50%;top:50%;transform:translate(-50%, -50%)}.tag-point-wrapper.svelte-yex9rb.svelte-yex9rb{pointer-events:none;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);z-index:-1}.tag-folded-point.svelte-yex9rb.svelte-yex9rb,.tag-unfolded-point.svelte-yex9rb.svelte-yex9rb{transition:all 0.5s}.tag-point-wrapper.svelte-yex9rb .tag-unfolded-point.svelte-yex9rb{display:flex;justify-content:center;align-items:center;position:absolute;width:100%;height:100%;border-radius:50%}.tag-point-wrapper.svelte-yex9rb .tag-unfolded-point.svelte-yex9rb:after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.3125rem;height:0.3125rem;border-radius:50%;background-color:white}.tag-point-wrapper.svelte-yex9rb .tag-unfolded-point.svelte-yex9rb:before{content:"";position:absolute;width:0.875rem;height:0.875rem;border-radius:50%;background-color:rgba(0, 0, 0, 0.2)}.tag-point-wrapper.folded.svelte-yex9rb .tag-folded-point.svelte-yex9rb{opacity:1;scale:1}.tag-point-wrapper.folded.svelte-yex9rb .tag-unfolded-point.svelte-yex9rb{opacity:0;scale:1}.tag-point-wrapper.unfolded.svelte-yex9rb .tag-folded-point.svelte-yex9rb{opacity:0;scale:0.2}.tag-point-wrapper.unfolded.svelte-yex9rb .tag-unfolded-point.svelte-yex9rb{opacity:1;scale:1}')}function ev(i){let t,e,n,o,s,r,a,l,c,u,f,d;return o=new nt({props:{center:!0,blurRadius:15,spreadRadius:5,opacity:.3}}),c=new yl({props:{icon:i[2],width:i[1]}}),{c(){t=T("div"),e=ne(),n=T("div"),ee(o.$$.fragment),s=ne(),r=T("div"),a=ne(),l=T("div"),ee(c.$$.fragment),b(t,"class","tag-point-click-helper svelte-yex9rb"),b(r,"class","tag-unfolded-point svelte-yex9rb"),L(r,"transition-delay",(i[3]?i[5]:0)+"ms"),b(l,"class","tag-folded-point svelte-yex9rb"),L(l,"transition-delay",(i[3]?i[5]:0)+"ms"),b(n,"class","tag-point-wrapper svelte-yex9rb"),q(n,"unfolded",i[0]),q(n,"folded",i[3]),L(n,"width",xe(i[1])),L(n,"height",xe(i[1]))},m(h,g){z(h,t,g),z(h,e,g),z(h,n,g),K(o,n,null),j(n,s),j(n,r),j(n,a),j(n,l),K(c,l,null),u=!0,f||(d=Pe(t,"click",i[4]),f=!0)},p(h,[g]){g&8&&L(r,"transition-delay",(h[3]?h[5]:0)+"ms");const A={};g&4&&(A.icon=h[2]),g&2&&(A.width=h[1]),c.$set(A),g&8&&L(l,"transition-delay",(h[3]?h[5]:0)+"ms"),(!u||g&1)&&q(n,"unfolded",h[0]),(!u||g&8)&&q(n,"folded",h[3]),g&2&&L(n,"width",xe(h[1])),g&2&&L(n,"height",xe(h[1]))},i(h){u||(C(o.$$.fragment,h),C(c.$$.fragment,h),u=!0)},o(h){D(o.$$.fragment,h),D(c.$$.fragment,h),u=!1},d(h){h&&M(t),h&&M(e),h&&M(n),$(o),$(c),f=!1,d()}}}function tv(i,t,e){let n,o,s,r;const a=St("hooks");let{tag:l}=t,c,u=!1;const f=()=>{c!==void 0&&clearTimeout(c),u=!0,c=setTimeout(()=>{u=!1},800)},d=g=>{u||a.emit("click",{event:g,target:"TagPoint",tag:l})},h=(()=>l.contentType==="Text"&&l.data.appearance==="plane"?500:800)();return i.$$set=g=>{"tag"in g&&e(6,l=g.tag)},i.$$.update=()=>{var g,A,p,v;i.$$.dirty&64&&e(0,n=(g=l.state)==null?void 0:g.unfolded),i.$$.dirty&1&&e(3,o=!n),i.$$.dirty&64&&e(2,s=(p=(A=l.style)==null?void 0:A.point)!=null&&p.url?(v=l.style)==null?void 0:v.point:{url:wp}),i.$$.dirty&64&&e(1,r=(()=>{var w,P,E;const y=(E=(P=(w=l.style)==null?void 0:w.point)==null?void 0:P.size)!=null?E:"S";return typeof y=="number"?y:y==="S"?18:y==="M"?20:y==="L"?24:y==="XL"?28:18})())},f(),[n,r,s,o,d,h,l]}class nv extends re{constructor(t){super(),se(this,t,tv,ev,oe,{tag:6},$A)}}function iv(i){ue(i,"svelte-pzwdws",".tag.withAnimation.svelte-pzwdws{transition:opacity 0.3s linear}.tag.hide.svelte-pzwdws{opacity:0;pointer-events:none}.tag.hide.svelte-pzwdws *{pointer-events:none !important}.tag.unClickable.svelte-pzwdws{pointer-events:none !important}.tag.unClickable.svelte-pzwdws *{pointer-events:none !important}.tag.disable.svelte-pzwdws{display:none}.wrapper.svelte-pzwdws{position:absolute;width:0rem;height:0rem;overflow:visible;pointer-events:auto}")}function ov(i){let t;return{c(){t=T("div"),b(t,"data-info","tag content is disable")},m(e,n){z(e,t,n)},p:J,i:J,o:J,d(e){e&&M(t)}}}function sv(i){let t,e;return t=new Pl({props:{mediaStore:i[2],withAnimation:i[0],tag:Re(i[1]),hooks:i[14],state:i[3],temporaryState:i[4]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&4&&(s.mediaStore=n[2]),o&1&&(s.withAnimation=n[0]),o&2&&(s.tag=Re(n[1])),o&8&&(s.state=n[3]),o&16&&(s.temporaryState=n[4]),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function rv(i){let t;return{c(){t=T("div"),b(t,"data-info","tag point is disable")},m(e,n){z(e,t,n)},p:J,i:J,o:J,d(e){e&&M(t)}}}function av(i){let t,e;return t=new nv({props:{tag:i[1]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=n[1]),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function lv(i){let t,e,n,o,s,r,a,l,c;const u=[sv,ov],f=[];function d(p,v){return p[12]?0:1}n=d(i),o=f[n]=u[n](i);const h=[av,rv],g=[];function A(p,v){return p[13]?0:1}return r=A(i),a=g[r]=h[r](i),{c(){t=T("div"),e=T("div"),o.c(),s=ne(),a.c(),b(e,"class","wrapper svelte-pzwdws"),b(e,"data-tag-unfolded",i[8]),b(e,"data-tag-id",i[11]),b(e,"data-content-type",l=i[1].contentType),L(e,"left",i[7]),L(e,"top",i[6]),L(e,"z-index",i[5]),b(t,"class","tag svelte-pzwdws"),b(t,"data-tag-id",i[11]),q(t,"unClickable",i[1].clickable===!1),q(t,"disable",i[10]),q(t,"hide",i[9]),q(t,"withAnimation",i[0])},m(p,v){z(p,t,v),j(t,e),f[n].m(e,null),j(e,s),g[r].m(e,null),c=!0},p(p,[v]){let y=n;n=d(p),n===y?f[n].p(p,v):(ae(),D(f[y],1,1,()=>{f[y]=null}),le(),o=f[n],o?o.p(p,v):(o=f[n]=u[n](p),o.c()),C(o,1),o.m(e,s));let w=r;r=A(p),r===w?g[r].p(p,v):(ae(),D(g[w],1,1,()=>{g[w]=null}),le(),a=g[r],a?a.p(p,v):(a=g[r]=h[r](p),a.c()),C(a,1),a.m(e,null)),(!c||v&256)&&b(e,"data-tag-unfolded",p[8]),(!c||v&2048)&&b(e,"data-tag-id",p[11]),(!c||v&2&&l!==(l=p[1].contentType))&&b(e,"data-content-type",l),v&128&&L(e,"left",p[7]),v&64&&L(e,"top",p[6]),v&32&&L(e,"z-index",p[5]),(!c||v&2048)&&b(t,"data-tag-id",p[11]),(!c||v&2)&&q(t,"unClickable",p[1].clickable===!1),(!c||v&1024)&&q(t,"disable",p[10]),(!c||v&512)&&q(t,"hide",p[9]),(!c||v&1)&&q(t,"withAnimation",p[0])},i(p){c||(C(o),C(a),c=!0)},o(p){D(o),D(a),c=!1},d(p){p&&M(t),f[n].d(),g[r].d()}}}function cv(i,t,e){let n,o,s,r,a,l,c,u,f,{withAnimation:d=!1}=t,{tag:h}=t,{mediaStore:g}=t,{state:A}=t,{temporaryState:p}=t;const v=St("hooks");return i.$$set=y=>{"withAnimation"in y&&e(0,d=y.withAnimation),"tag"in y&&e(1,h=y.tag),"mediaStore"in y&&e(2,g=y.mediaStore),"state"in y&&e(3,A=y.state),"temporaryState"in y&&e(4,p=y.temporaryState)},i.$$.update=()=>{var y,w,P,E,k,S,x,Q;i.$$.dirty&2&&e(13,n=(()=>!(h.contentType==="Link"||h.contentType==="VRLink"||h.contentType==="PanoLink"||h.contentType==="Audio"&&h.data.appearance==="plane"))()),i.$$.dirty&2&&e(12,o=(()=>h.stickType==="2DPoint")()),i.$$.dirty&2&&e(11,s=h.id),i.$$.dirty&2&&e(10,r=!((y=h.pointTagStyle)!=null&&y.leftPercent)||!((w=h.pointTagStyle)!=null&&w.topPercent)||h.enabled===!1||!h.state),i.$$.dirty&2&&e(9,a=!((P=h.state)!=null&&P.visible)||((E=h.temporaryState)==null?void 0:E.visible)===!1),i.$$.dirty&2&&e(8,l=(k=h.state)==null?void 0:k.unfolded),i.$$.dirty&2&&e(7,c=((S=h.pointTagStyle)==null?void 0:S.leftPercent)+"%"),i.$$.dirty&2&&e(6,u=((x=h.pointTagStyle)==null?void 0:x.topPercent)+"%"),i.$$.dirty&2&&e(5,f=(Q=h.state)!=null&&Q.unfolded?1:0)},[d,h,g,A,p,f,u,c,l,a,r,s,o,n,v]}class uv extends re{constructor(t){super(),se(this,t,cv,lv,oe,{withAnimation:0,tag:1,mediaStore:2,state:3,temporaryState:4},iv)}}function dv(i){ue(i,"svelte-uq11d5",".tag--container.svelte-uq11d5{box-sizing:border-box;position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;opacity:1;-webkit-user-select:none;-moz-user-select:none;user-select:none;transform:translate3d(0, 0, 0)}.withAnimation.svelte-uq11d5{transition:opacity 0.3s linear}.tag--container.hide.svelte-uq11d5{opacity:0;pointer-events:none}.tag--container.hide.svelte-uq11d5 *{pointer-events:none !important}")}function Il(i,t,e){const n=i.slice();return n[6]=t[e],n}function El(i){let t,e=[],n=new Map,o,s=i[1];const r=a=>a[6].id;for(let a=0;a<s.length;a+=1){let l=Il(i,s,a),c=r(l);n.set(c,e[a]=kl(c,l))}return{c(){t=T("div");for(let a=0;a<e.length;a+=1)e[a].c();b(t,"class","tag--container svelte-uq11d5"),q(t,"hide",!i[3].visible||!i[4].visible),q(t,"withAnimation",i[0])},m(a,l){z(a,t,l);for(let c=0;c<e.length;c+=1)e[c].m(t,null);o=!0},p(a,l){l&31&&(s=a[1],ae(),e=Ue(e,l,r,1,a,s,n,t,Ct,kl,null,Il),le()),(!o||l&24)&&q(t,"hide",!a[3].visible||!a[4].visible),(!o||l&1)&&q(t,"withAnimation",a[0])},i(a){if(!o){for(let l=0;l<s.length;l+=1)C(e[l]);o=!0}},o(a){for(let l=0;l<e.length;l+=1)D(e[l]);o=!1},d(a){a&&M(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}function kl(i,t){let e,n,o;return n=new uv({props:{state:t[3],temporaryState:t[4],withAnimation:t[0],tag:t[6],mediaStore:t[2]}}),{key:i,first:null,c(){e=pe(),ee(n.$$.fragment),this.first=e},m(s,r){z(s,e,r),K(n,s,r),o=!0},p(s,r){t=s;const a={};r&8&&(a.state=t[3]),r&16&&(a.temporaryState=t[4]),r&1&&(a.withAnimation=t[0]),r&2&&(a.tag=t[6]),r&4&&(a.mediaStore=t[2]),n.$set(a)},i(s){o||(C(n.$$.fragment,s),o=!0)},o(s){D(n.$$.fragment,s),o=!1},d(s){s&&M(e),$(n,s)}}}function fv(i){let t,e,n=i[3].enabled&&El(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[3].enabled?n?(n.p(o,s),s&8&&C(n,1)):(n=El(o),n.c(),C(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(C(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function hv(i,t,e){let{withAnimation:n=!1}=t,{tags:o=[]}=t,{hooks:s}=t,{mediaStore:r}=t,{state:a}=t,{temporaryState:l}=t;return Bi("hooks",s),i.$$set=c=>{"withAnimation"in c&&e(0,n=c.withAnimation),"tags"in c&&e(1,o=c.tags),"hooks"in c&&e(5,s=c.hooks),"mediaStore"in c&&e(2,r=c.mediaStore),"state"in c&&e(3,a=c.state),"temporaryState"in c&&e(4,l=c.temporaryState)},[n,o,r,a,l,s]}class mv extends re{constructor(t){super(),se(this,t,hv,fv,oe,{withAnimation:0,tags:1,hooks:5,mediaStore:2,state:3,temporaryState:4},dv)}}const pv={globalConfig:{unfoldedConfig:{autoUnfold:{strategy:"MinimumDistance",distance:{max:5}}},tag3DConfig:{ratio:.0035}},contentTypeConfig:{"Any-Audio-plane":{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},Link:{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},VRLink:{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},PanoLink:{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},MediaPlane:{unfoldedConfig:{keep:"unfolded"},visibleConfig:{alwaysShowWhenMovePano:!0}},MediaModel:{unfoldedConfig:{keep:"unfolded"},visibleConfig:{keep:"visible",visibleFiveMode:["Panorama","Floorplan","Model","Mapview"],alwaysShowWhenMovePano:!0}}}};class gv extends ti{constructor(e){super(e);m(this,"tagCacheByPanoIndex",{})}getCache({panoIndex:e,id:n,key:o}){var c,u,f,d;const{five:s}=this,r=(c=s.panoIndex)!=null?c:e;if(r===void 0)throw new Error(`TagCacheController getCache(): fivePanoIndex is ${r}`);const a=`${(f=(u=s.work)==null?void 0:u.workCode)!=null?f:s.model.uuid}-${r}`;let l=this.tagCacheByPanoIndex[a];if(l||(l=new Map,this.tagCacheByPanoIndex[a]=l),n===void 0)return l;if(o===void 0){const h=l.get(n);return h||(l.set(n,{}),l.get(n))}return(d=l.get(n))==null?void 0:d[o]}clearCache(){this.tagCacheByPanoIndex={}}removeCache(){}}class Av extends gv{constructor(e){super(e);m(this,"tags",[]);m(this,"config",pv);m(this,"raycaster",new I.Raycaster)}get isPanorama(){return this.five.currentMode==="Panorama"}getTagById(e){const n=this.tags.find(o=>o.id===e);if(!n){console.warn(`error: can not find tag id ${e} by getTagById()`);return}return n}changeContentTypeConfig(e,n,o=!0){this.config.contentTypeConfig||(this.config.contentTypeConfig={}),o?this.config.contentTypeConfig[e]=pt.default({},this.config.contentTypeConfig[e],n):this.config.contentTypeConfig[e]=n,this.clearCache()}getVisibleByPanoIndex(e,n){var r;const o=this.getCache({panoIndex:n,id:e.id}),s=(r=this.five.panoIndex)!=null?r:n;if(We(e))return!0;if(o.visible!==void 0)return o.visible;{const a=(()=>{var u,f,d;const l=(u=this.getTagConfig(e).visibleConfig)!=null?u:{},c=this.getDistance(e);if(typeof l=="function")return{value:l(this.five,{tag:e,distance:c}),reason:"config function result"};if(l.keep==="hidden")return{value:!1,reason:"config.keep is hidden"};if(l.keep==="visible")return{value:!0,reason:"config.keep is visible"};if(l.visiblePanoIndex!==void 0&&l.visiblePanoIndex!=="all"&&s!==void 0){if(Array.isArray(l.visiblePanoIndex)&&!l.visiblePanoIndex.includes(s))return{value:!1,reason:`current panoIndex is not included in visiblePano. currentPanoIndex: ${s}, visiblePanoIndex: ${l.visiblePanoIndex}`};if(l.visiblePanoIndex==="current"&&s!==((f=e.fiveState)==null?void 0:f.panoIndex))return{value:!1,reason:`current panoIndex is not equal to tag.panoIndex. currentPanoIndex: ${s}, tag.panoIndex: ${(d=e.fiveState)==null?void 0:d.panoIndex}`}}if(l.visibleDistance!==void 0&&l.visibleDistance!=="unLimited"&&In(c,l.visibleDistance)===!1)return{value:!1,reason:`distance is not in visibleDistance. distance: ${c}, visibleDistance: ${l.visibleDistance}`};if(l.intersectRaycaster!==!1&&(typeof l.intersectRaycaster!="object"||l.intersectRaycaster.enabled!==!1)){if(s===void 0)return{value:!1,reason:`intersectRaycaster check failed: fivePanoIndex is ${s}`};const h=this.getRaycasterFromPanoIndex(e,s),g=this.getTagEnableByIntersect(e,h);if(g.value===!1)return g}if(l.angleRange&&ap(e)){const h=this.getAngle(e);if(In(h,l.angleRange)===!1)return{value:!1,reason:`angle is not in angleRange. angle: ${h}, angleRange: ${l.angleRange}`}}return{value:!0,reason:"all check passed"}})();return o.visible=a.value,o.__debug_visible_reason__=a,o.visible}}getVisibleByFiveMode(e,n){var r;const o=(r=this.getTagConfig(e).visibleConfig)!=null?r:{};if(typeof o=="function")return n==="Panorama";const s=o==null?void 0:o.visibleFiveMode;return s?s.includes(n):n==="Panorama"}getVisibleByFloorIndex(e){var a;const n=e.fiveState;if(!n)return!0;const o=n.panoIndex,s=(a=this.five.work.observers[o])==null?void 0:a.floorIndex,r=this.five.model.shownFloor;return r===null||r===s}getVisible(e){const n=this.five.getCurrentState(),o=this.getVisibleByFiveMode(e,n.mode),s=We(e)?this.getVisibleByFloorIndex(e):!0,r=n.mode==="Panorama"?this.getVisibleByPanoIndex(e,n.panoIndex):!0;return o&&r&&s}getModelMedialVisibleByPanoIndex(e){const n=this.five.getCurrentState().panoIndex,o=this.getCache({panoIndex:n,id:e.id});if(o.modelMedialVisible!==void 0)return o.modelMedialVisible;const s=this.getRaycasterFromPanoIndex(e,n),r=this.getTagEnableByIntersect(e,s);return o.modelMedialVisible=r.value,o.__debug_visible_reason__=r,r.value!==!1}getUnfoldedByPanoIndex(e,n){if(!this.getVisibleByPanoIndex(e))return;const s=this.getCache({panoIndex:n,id:e.id});if(s.unfolded!==void 0)return s.unfolded;{const r=this.getTagConfig(e).unfoldedConfig;if(!r)return;const a=(()=>{const c=this.getDistance(e);if(typeof r=="function")return r(this.five,{tag:e,distance:c});if(r.keep==="folded")return!1;if(r.keep==="unfolded")return!0;if(r.unfoldDistance&&In(c,r.unfoldDistance)===!1)return!1})();s.unfolded=a;const l=this.getUnfoldedByCamera(e);return l!==void 0?l:s.unfolded}}getUnfoldedByCamera(e){return this.getVisibleByPanoIndex(e)?(()=>{var a;const s=this.getDistance(e),r=this.getTagConfig(e).unfoldedConfig;if(!!r){if(typeof r=="function")return r(this.five,{tag:e,distance:s});if(r.keep==="folded")return!1;if(r.keep==="unfolded")return!0;if(r.autoUnfold===void 0||r.autoUnfold===!1||r.autoUnfold.enable===!1)return;if(r.autoUnfold.strategy==="ScreenPostion"){const l=this.getTagProject(e);if(l&&In(l.x,r.autoUnfold.autoUnfoldProjectX)===!1)return!1}if(r.autoUnfold.strategy==="MinimumDistance"){const u=this.filterPointTag().filter(d=>this.getVisibleByPanoIndex(d)).filter(d=>{const h=this.getTagProject(d);if(!h)return!1;const{x:g,y:A,z:p}=h;return!(Math.abs(p)>1||Math.abs(g)>1||Math.abs(A)>1)}).map(d=>({tag:d,id:d.id,tagConfig:this.getTagConfig(d).unfoldedConfig})).filter(({tag:d,tagConfig:h})=>{var g,A;return!(typeof h!="object"||h.keep||h.autoUnfold===!1||((g=h.autoUnfold)==null?void 0:g.enable)===!1||((A=h.autoUnfold)==null?void 0:A.strategy)!=="MinimumDistance")}).map(d=>Ae(G({},d),{distance:this.getDistance(d.tag)})).filter(({distance:d,tagConfig:h})=>{var g,A;return!(d===void 0||typeof h!="object"||h.autoUnfold===!1||((g=h.autoUnfold)==null?void 0:g.enable)===!1||((A=h.autoUnfold)==null?void 0:A.strategy)!=="MinimumDistance"||h.autoUnfold.distance&&In(d,h.autoUnfold.distance)===!1)}).sort((d,h)=>d.distance-h.distance).findIndex(d=>d.id===e.id);if(u===-1||u<=((a=r.autoUnfold.maxNumber)!=null?a:1)-1===!1)return!1}return!0}})():void 0}getDistance(e,n){var r,a,l;const o=(r=this.five.panoIndex)!=null?r:n;if(o===void 0)throw new Error(`getDistance(): fivePanoIndex is ${o}`);const s=this.getCache({panoIndex:n,id:e.id});if(s.distance!==void 0)return s.distance;{const c=(l=(a=this.five.work)==null?void 0:a.observers[o])==null?void 0:l.position;if(c===void 0)throw new Error(`getDistance(): observerPosition is ${c}`);const u=ia(e),f=c.distanceTo(u);return s.distance=f,f}}getAngle(e,n){var r,a,l;const o=(r=this.five.panoIndex)!=null?r:n;if(o===void 0)throw new Error(`getDistance(): fivePanoIndex is ${o}`);const s=this.getCache({panoIndex:n,id:e.id});if(s.angle!==void 0)return s.angle;{const c=(l=(a=this.five.work)==null?void 0:a.observers[o])==null?void 0:l.position;if(c===void 0)throw new Error(`getAngleRange(): observerPosition is ${c}`);const u=(()=>e.stickType==="3DPoint"?pn(e.normal):ao(e.position))();if(!u)return;const f=new I.Vector3().copy(c).sub(lo(e.position)),d=u.angleTo(f)*180/Math.PI;return s.angle=d,s.angle}}getTagConfig(e){var s,r;if(!e)return(s=this.config.globalConfig)!=null?s:{};const n={};this.config.contentTypeConfig&&Object.keys(this.config.contentTypeConfig).forEach(a=>{const l=a;if(n[l])return;const c=l.split("-");if(c.length===1){const[u]=c;e.contentType===u&&(n[l]=this.config.contentTypeConfig[l])}if(c.length===2){const[u="Any",f="Any"]=c;(e.stickType===u||u==="Any")&&(e.contentType===f||f==="Any")&&(n[l]=this.config.contentTypeConfig[l])}if(c.length===3){const[u="Any",f,d]=c;if(f==="Audio"&&e.contentType==="Audio"){const h=e;(h.stickType===u||u==="Any")&&h.data.appearance===d&&(n[l]=this.config.contentTypeConfig[l])}}});const o=pt.default({},this.config.globalConfig,...Object.values(n),e.config);return typeof o.unfoldedConfig=="object"&&(o.unfoldedConfig.disableFold&&(o.unfoldedConfig={keep:"unfolded"}),o.unfoldedConfig.disableUnfold&&(o.unfoldedConfig={keep:"folded"}),o.unfoldedConfig.keep&&(o.unfoldedConfig={keep:o.unfoldedConfig.keep})),typeof o.visibleConfig=="object"&&o.visibleConfig.keep&&(o.visibleConfig={keep:o.visibleConfig.keep,visibleFiveMode:(r=o.visibleConfig)==null?void 0:r.visibleFiveMode}),o}can(e,n){const o=this.getTagConfig(n);if(!o||typeof o!="object")return!0;if(e==="show"||e==="hide"){if(!o.visibleConfig||typeof o.visibleConfig!="object")return!0;if(e==="show"&&o.visibleConfig.keep==="hidden"||e==="hide"&&(o.visibleConfig.keep==="visible"||o.visibleConfig.alwaysShowWhenMovePano))return!1}if(e==="fold"||e==="unfold"){if(!o.unfoldedConfig||typeof o.unfoldedConfig!="object")return!0;if(e==="fold"&&o.unfoldedConfig.keep==="unfolded"||e==="unfold"&&o.unfoldedConfig.keep==="folded")return!1}return!0}sort(e){return e.sort((n,o)=>{const s=this.getDistance(n),r=this.getDistance(o);return s===void 0||r===void 0?0:r-s})}setPointTagPosition(){const e=this.filterPointTag();e.length!==0&&e.forEach(n=>{var s;if(!((s=n.state)!=null&&s.visible)){n.pointTagStyle=null;return}const o=this.getTagProject(n);if(!o){n.pointTagStyle=null;return}n.pointTagStyle={leftPercent:(o.x+1)/2*100,topPercent:(-o.y+1)/2*100}})}setVisibleByPanoIndex(){this.tags.forEach(e=>{const n=this.getVisibleByPanoIndex(e);e.state&&(e.state.visible=n)})}setModelMedialVisible(){const e=this.five.getCurrentState().mode;this.tags.forEach(n=>{var s;if(!We(n))return;if(!((s=n.model)!=null&&s.object)){n.mediaVisible=!1;return}const o=e==="Panorama"?this.getModelMedialVisibleByPanoIndex(n):!0;n.mediaVisible=o})}setUnfoldedByPanoIndex(){this.tags.forEach(e=>{const n=this.getUnfoldedByPanoIndex(e);if(!!e.state&&(n!==void 0&&(e.state.unfolded=n),n&&!e.state.visible)){const o=this.getTagConfig(e);typeof o.unfoldedConfig=="object"&&o.unfoldedConfig.autoUnfoldWhenHide!==!1&&(e.state.unfolded=!1)}})}getTagProject(e){if(!this.getVisibleByPanoIndex(e))return;const o=lo(e.position),{x:s,y:r,z:a}=o.project(this.five.camera);if(!(a>1))return{x:s,y:r,z:a}}filterPointTag(){return this.tags.filter(e=>e.stickType==="2DPoint"||e.stickType==="3DPoint")}filter2DPointTag(){return this.tags.filter(e=>e.stickType==="2DPoint")}filter3DPointTag(){return this.tags.filter(e=>e.stickType==="3DPoint")}filterModelTag(){return this.tags.filter(e=>e.stickType==="Model")}filter3DTag(){return this.tags.filter(e=>e.stickType==="3DPoint"||e.stickType==="Plane")}filterPlaneTag(){return this.tags.filter(e=>e.stickType==="Plane")}updateTagConfig(e){e!=null&&e.force&&this.clearCache(),this.tags.forEach(n=>{const o=this.getTagConfig(n);n.mergedConfig=o})}getTagEnableByIntersect(e,n){var u,f,d;const o=(u=this.getTagConfig(e).visibleConfig)!=null?u:{},s=this.getDistance(e),[r]=this.five.model.intersectRaycaster(n),a=(()=>{if(!We(e))return;const h=this.tags.filter(We).map(A=>{var p;return(p=A.model)==null?void 0:p.object}).filter(Ze);return n.intersectObjects(h,!0)[0]})(),l=(()=>{var h;return typeof o=="object"&&typeof o.intersectRaycaster=="object"&&(h=o.intersectRaycaster.distanceAccuracy)!=null?h:.01})();return Math.min((f=r==null?void 0:r.distance)!=null?f:1/0,(d=a==null?void 0:a.distance)!=null?d:1/0)+l<s?{value:!1,reason:`intersectRaycaster check failed: distance is ${s}, intersection.point is ${r==null?void 0:r.point.toArray()},
|
|
561
|
+
`;function O0(){const i=new I.PlaneGeometry(.4,.4),t=j0,e=new I.TextureLoader().load(t);e.encoding=I.sRGBEncoding;const n=new I.MeshBasicMaterial({map:e,transparent:!0,depthTest:!1});return new I.Mesh(i,n)}function F0(){const i=new I.CurvePath;i.add(new I.LineCurve3(new I.Vector3(0,0,0),new I.Vector3(0,0,.1)));const t=new I.TubeGeometry(i,8,.003),e=new I.ShaderMaterial({vertexShader:V0,fragmentShader:Q0,depthTest:!1,transparent:!0});return new I.Mesh(t,e)}function R0(){const i=new I.SphereGeometry(.01,20,20),t=new I.MeshBasicMaterial({color:10349931,depthTest:!1,transparent:!0,side:I.DoubleSide}),e=new I.Mesh(i,t);return e.position.set(0,0,.1),e}class Ja extends I.Object3D{constructor(){super();m(this,"planeMesh");m(this,"lineMesh");m(this,"ballMesh");this.planeMesh=O0(),this.lineMesh=F0(),this.ballMesh=R0(),this.add(this.planeMesh,this.lineMesh,this.ballMesh)}updateWithIntersect(e){if(!e.face)return;const n=new I.Vector3().addVectors(e.point,e.face.normal);this.position.copy(e.point),this.lookAt(n)}dispose(){var e;(e=this.planeMesh.material.map)==null||e.dispose()}}class Za{constructor(t){m(this,"five");m(this,"contentElement",document.createElement("div"));m(this,"animeIns");m(this,"container");m(this,"css3DObject");m(this,"disposeCss3DObject");m(this,"state",{enabled:!1});this.five=t;const n=.4/2,s=Wt(t).create3DDomContainer([[-n,n,0],[-n,-n,0],[n,-n,0],[n,n,0]].map(r=>new I.Vector3().fromArray(r)));if(s){const{container:r,dispose:a,css3DObject:l}=s;this.container=r,this.css3DObject=l,this.disposeCss3DObject=a}this.contentElement.style.width="100%",this.contentElement.style.height="100%",this.contentElement.style.backgroundImage=`url(${pr})`,this.contentElement.style.backgroundSize="100%",this.contentElement.style.backgroundRepeat="no-repeat"}enable(){var t;this.state.enabled||(this.state.enabled=!0,(t=this.container)==null||t.appendChild(this.contentElement))}disable(){!this.state.enabled||(this.state.enabled=!1,this.contentElement.remove())}updateWithIntersect(t){if(!t.face||!this.css3DObject)return;const e=new I.Vector3().addVectors(t.point,t.face.normal);this.css3DObject.position.copy(t.point),this.css3DObject.lookAt(e),this.five.needsRender=!0}doAnimation(){var t;(t=this.animeIns)==null||t.dispose(),new Zi({progress:0}).to({progress:[1,0]}).duration(500).easing(zn.Easing.Quadratic.InOut).onUpdate(({progress:e})=>{}).play()}dispose(){var t;(t=this.disposeCss3DObject)==null||t.call(this)}}class G0{constructor(t,e){m(this,"five");m(this,"hooks",new he.Subscribe);m(this,"magnifier",null);m(this,"pointHelper",null);m(this,"pointDomHelper",null);m(this,"contentDom",document.createElement("div"));m(this,"state",{enabled:!1});m(this,"group",new I.Group);this.five=t,this.magnifier=(e==null?void 0:e.magnifier)===void 0?new Ya(t,{dragEnabled:!0}):null,this.pointHelper=(e==null?void 0:e.pointHelper)===void 0?new Ja:null,this.pointDomHelper=(e==null?void 0:e.pointDomHelper)===void 0?new Za(t):null,this.group.name="five-point-selector",this.five.scene.add(this.group),this.contentDom.classList.add("five-point-selector-content"),this.contentDom.style.position="absolute",this.contentDom.style.top="0",this.contentDom.style.left="0",this.contentDom.style.width="100%",this.contentDom.style.height="100%",this.contentDom.style.pointerEvents="none"}enable(){var t,e;this.state.enabled||(this.state.enabled=!0,this.pointHelper&&this.group.add(this.pointHelper),(t=this.magnifier)==null||t.enable(),(e=this.pointDomHelper)==null||e.enable(),this.five.needsRender=!0,this.hooks.emit("enabled"))}disable(){var t,e;!this.state.enabled||(this.state.enabled=!1,this.pointHelper&&this.group.remove(this.pointHelper),(t=this.magnifier)==null||t.disable(),(e=this.pointDomHelper)==null||e.disable(),this.hooks.emit("disabled"))}dispose(){this.hooks.off(),this.disable(),this.magnifier=null,this.pointHelper=null,this.pointDomHelper=null}updateWithIntersect(t){var s;this.hooks.emit("pointChanged",{panoIndex:this.five.getCurrentState().panoIndex,position:t.point.toArray(),normal:(s=t.face)==null?void 0:s.normal.toArray()});const e=this.magnifier;e&&e.renderWithPoint(t.point);const n=this.pointHelper;n&&n.updateWithIntersect(t);const o=this.pointDomHelper;o&&o.updateWithIntersect(t),this.five.needsRender=!0}}const N0=Object.freeze(Object.defineProperty({__proto__:null,Interval:go,Rectangle:S0,Magnifier:Ya,getCoordsFromClient:z0,getCoordsFromElement:Ua,getRaycasterFromFivePointer:T0,getIntersectFromRelativePosition:B0,PointHelper:Ja,PointDomHelper:Za,FivePointSelector:G0,isNil:Wm,notNil:Ze,BetterTween:Zi,tweenProgress:Ys,nextFrame:ni,requestAnimationFrameInterval:ii,getFrameTime:mf},Symbol.toStringTag,{value:"Module"}));function W0(i){ue(i,"svelte-8mby9k",".svelte-8mby9k.svelte-8mby9k{box-sizing:border-box}.marketing.svelte-8mby9k.svelte-8mby9k{transform:translateY(-100%)}.content.svelte-8mby9k .headerImage.svelte-8mby9k{position:absolute;width:100%;top:0.25rem;transform:translateY(-100%);border-top-left-radius:0.25rem;border-top-right-radius:0.25rem}.line.svelte-8mby9k.svelte-8mby9k{position:absolute;height:2.0625rem;width:0.0625rem;left:50%;transform:translateX(-50%);background-color:white;bottom:0;transform-origin:bottom;transition:all 500ms}.content.svelte-8mby9k.svelte-8mby9k{background-color:white;position:relative;display:flex;flex-direction:column;min-width:11.125rem;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;border-radius:0.25rem;top:-1.875rem;left:-1rem;padding:0.5rem 0rem 0.5625rem;transition:all 500ms}.title.svelte-8mby9k.svelte-8mby9k{position:absolute;background-color:white;border-radius:0.25rem;width:100%;top:0.5rem;padding-left:0.75rem;padding-right:0.75rem}.title.svelte-8mby9k .text.svelte-8mby9k{display:block;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:0.75rem;font-weight:bold;line-height:1.125rem;color:#000}.footer.svelte-8mby9k.svelte-8mby9k{position:relative;padding-left:0.75rem;padding-right:0.75rem;width:100%;height:1.375rem;display:flex;align-items:center}.footer.svelte-8mby9k .goto-button.svelte-8mby9k{flex-shrink:0;white-space:nowrap;background-image:linear-gradient(to right, rgba(87, 144, 253, 1) 0, rgba(42, 114, 254, 1) 100%);color:#fff;font-size:0.625rem;border-radius:0.875rem;font-weight:bold;padding-left:0.5rem;padding-right:0.5rem;height:1.25rem;margin-left:auto;display:flex;align-items:center}.footer.svelte-8mby9k .goto-icon.svelte-8mby9k::after{content:'';display:inline-block;width:0.75rem;height:0.75rem;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAMAAADW3miqAAAAeFBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////GqOSsAAAAJ3RSTlMAFNO2pYt4bErz8uP6ysawgVtBPDcR5C4s2L6ZmJBzZGJXUyEeDws/0G2zAAAAkklEQVQ4y+3TRw6DMBAF0OAeJ3QCpCe0uf8NwRILLBYfiS1/aT3JoymnI+sERZ5VCH0iVto3QDfBLmeSSMUTogRV9bBEpJAKaYpGijn13aTSLeraeG9D0NZFZv4/rRL5FDHnITlllqjv6tykWsmX4JHr05y7j6oFKq2P8He48B0tAM0EY0EDxquClw6vLz6EI35GmwwSZpe+WOgAAAAASUVORK5CYII=);background-size:100% auto;background-repeat:no-repeat}.price.svelte-8mby9k.svelte-8mby9k{flex-shrink:0;margin-right:0.75rem;white-space:nowrap;color:#ff6600;display:flex;align-items:baseline}.price.svelte-8mby9k .value.svelte-8mby9k{position:relative;top:0.0625rem;font-size:1.125rem;line-height:1.375rem;font-family:TG-TYPE, PingFangSC, Segoe UI, Rototo, sans-serif;letter-spacing:0rem}.price.svelte-8mby9k .unit.svelte-8mby9k{padding-left:0.125rem;font-size:0.625rem}.tag.svelte-8mby9k.svelte-8mby9k{position:relative;background-color:white;display:flex;width:-moz-max-content;width:max-content;padding-left:0.75rem;padding-right:0.75rem;min-height:1.75rem}.tag.svelte-8mby9k .base-tag.svelte-8mby9k{height:1rem;margin-top:1.375rem;margin-bottom:0.5rem;margin-right:0.25rem;font-size:0.625rem;line-height:0.875rem;padding:0.0625rem 0.25rem;border-radius:0.125rem;overflow:hidden}.tag.svelte-8mby9k .primary-tag.svelte-8mby9k{background:#e5eefe;color:#0055ff}.tag.svelte-8mby9k .secondary-tag.svelte-8mby9k{background:rgba(255, 102, 0, 0.08);color:rgba(255, 102, 0, 1)}.unfolded.svelte-8mby9k .line.svelte-8mby9k{transform:translateX(-50%) scale(1, 1)}.folded.svelte-8mby9k .line.svelte-8mby9k{transform:translateX(-50%) scale(1, 0);transition-timing-function:ease-in}.unfolded.svelte-8mby9k .content.svelte-8mby9k{opacity:1}.folded.svelte-8mby9k .content.svelte-8mby9k{opacity:0;transform:translateY(0.425rem);transition-timing-function:ease-in}")}function qa(i,t,e){const n=i.slice();return n[0]=t[e],n}function Ka(i,t,e){const n=i.slice();return n[0]=t[e],n}function $a(i){let t,e=i[0]+"",n;return{c(){t=T("div"),n=De(e),b(t,"class","base-tag primary-tag svelte-8mby9k")},m(o,s){z(o,t,s),j(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&ze(n,e)},d(o){o&&M(t)}}}function el(i){let t,e=i[0]&&$a(i);return{c(){e&&e.c(),t=pe()},m(n,o){e&&e.m(n,o),z(n,t,o)},p(n,o){n[0]?e?e.p(n,o):(e=$a(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},d(n){e&&e.d(n),n&&M(t)}}}function tl(i){let t,e=i[0]+"",n;return{c(){t=T("div"),n=De(e),b(t,"class","base-tag secondary-tag svelte-8mby9k")},m(o,s){z(o,t,s),j(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&ze(n,e)},d(o){o&&M(t)}}}function nl(i){let t,e=i[0]&&tl(i);return{c(){e&&e.c(),t=pe()},m(n,o){e&&e.m(n,o),z(n,t,o)},p(n,o){n[0]?e?e.p(n,o):(e=tl(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},d(n){e&&e.d(n),n&&M(t)}}}function il(i){let t,e,n=i[2].price.value+"",o,s,r=i[2].price.unit&&ol(i);return{c(){t=T("div"),e=T("span"),o=De(n),s=ne(),r&&r.c(),b(e,"class","value svelte-8mby9k"),b(t,"class","price svelte-8mby9k")},m(a,l){z(a,t,l),j(t,e),j(e,o),j(t,s),r&&r.m(t,null)},p(a,l){l&4&&n!==(n=a[2].price.value+"")&&ze(o,n),a[2].price.unit?r?r.p(a,l):(r=ol(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&M(t),r&&r.d()}}}function ol(i){let t,e=i[2].price.unit+"",n;return{c(){t=T("span"),n=De(e),b(t,"class","unit svelte-8mby9k")},m(o,s){z(o,t,s),j(t,n)},p(o,s){s&4&&e!==(e=o[2].price.unit+"")&&ze(n,e)},d(o){o&&M(t)}}}function sl(i){let t,e=i[2].highlightText+"",n;return{c(){t=T("div"),n=De(e),b(t,"class","goto-button goto-icon svelte-8mby9k")},m(o,s){z(o,t,s),j(t,n)},p(o,s){s&4&&e!==(e=o[2].highlightText+"")&&ze(n,e)},d(o){o&&M(t)}}}function H0(i){var U,V;let t,e,n,o,s,r,a,l,c,u,f,d,h,g,A=i[2].title+"",p,v,y,w=Ze((U=i[2].price)==null?void 0:U.value)&&((V=i[2].price)==null?void 0:V.value)!=="",P,E;e=new nt({props:{visible:i[1],outDelay:500,left:61,bottom:87,blurRadius:150,spreadRadius:75}});let k=i[2].brandTags||[],S=[];for(let B=0;B<k.length;B+=1)S[B]=el(Ka(i,k,B));let x=i[2].tags||[],Q=[];for(let B=0;B<x.length;B+=1)Q[B]=nl(qa(i,x,B));let H=w&&il(i),F=i[2].highlightText&&sl(i);return{c(){var B;t=T("div"),ee(e.$$.fragment),n=ne(),o=T("div"),s=ne(),r=T("div"),a=T("img"),c=ne(),u=T("div");for(let R=0;R<S.length;R+=1)S[R].c();f=ne();for(let R=0;R<Q.length;R+=1)Q[R].c();d=ne(),h=T("div"),g=T("div"),p=De(A),v=ne(),y=T("div"),H&&H.c(),P=ne(),F&&F.c(),b(o,"class","line svelte-8mby9k"),L(o,"transition-delay",i[1]?vi+"ms":bi+al-rl-40+"ms"),b(a,"class","headerImage svelte-8mby9k"),Xe(a.src,l=i[2].headerPictureUrl)||b(a,"src",l),b(a,"alt",""),b(u,"class","tag svelte-8mby9k"),b(g,"class","text svelte-8mby9k"),b(h,"class","title svelte-8mby9k"),b(y,"class","footer svelte-8mby9k"),L(y,"height",Ze((B=i[2].price)==null?void 0:B.value)&&i[2].highlightText?void 0:"1rem"),b(r,"class","content svelte-8mby9k"),L(r,"transition-delay",i[1]?vi+bi+"ms":"0ms"),b(t,"class","marketing svelte-8mby9k"),q(t,"unfolded",i[1]),q(t,"folded",i[3])},m(B,R){z(B,t,R),K(e,t,null),j(t,n),j(t,o),j(t,s),j(t,r),j(r,a),j(r,c),j(r,u);for(let _=0;_<S.length;_+=1)S[_].m(u,null);j(u,f);for(let _=0;_<Q.length;_+=1)Q[_].m(u,null);j(r,d),j(r,h),j(h,g),j(g,p),j(r,v),j(r,y),H&&H.m(y,null),j(y,P),F&&F.m(y,null),E=!0},p(B,[R]){var N,te,X;const _={};if(R&2&&(_.visible=B[1]),e.$set(_),R&2&&L(o,"transition-delay",B[1]?vi+"ms":bi+al-rl-40+"ms"),(!E||R&4&&!Xe(a.src,l=B[2].headerPictureUrl))&&b(a,"src",l),R&4){k=B[2].brandTags||[];let Z;for(Z=0;Z<k.length;Z+=1){const me=Ka(B,k,Z);S[Z]?S[Z].p(me,R):(S[Z]=el(me),S[Z].c(),S[Z].m(u,f))}for(;Z<S.length;Z+=1)S[Z].d(1);S.length=k.length}if(R&4){x=B[2].tags||[];let Z;for(Z=0;Z<x.length;Z+=1){const me=qa(B,x,Z);Q[Z]?Q[Z].p(me,R):(Q[Z]=nl(me),Q[Z].c(),Q[Z].m(u,null))}for(;Z<Q.length;Z+=1)Q[Z].d(1);Q.length=x.length}(!E||R&4)&&A!==(A=B[2].title+"")&&ze(p,A),R&4&&(w=Ze((N=B[2].price)==null?void 0:N.value)&&((te=B[2].price)==null?void 0:te.value)!==""),w?H?H.p(B,R):(H=il(B),H.c(),H.m(y,P)):H&&(H.d(1),H=null),B[2].highlightText?F?F.p(B,R):(F=sl(B),F.c(),F.m(y,null)):F&&(F.d(1),F=null),R&4&&L(y,"height",Ze((X=B[2].price)==null?void 0:X.value)&&B[2].highlightText?void 0:"1rem"),R&2&&L(r,"transition-delay",B[1]?vi+bi+"ms":"0ms"),(!E||R&2)&&q(t,"unfolded",B[1]),(!E||R&8)&&q(t,"folded",B[3])},i(B){E||(C(e.$$.fragment,B),E=!0)},o(B){D(e.$$.fragment,B),E=!1},d(B){B&&M(t),$(e),dt(S,B),dt(Q,B),H&&H.d(),F&&F.d()}}}const vi=400,rl=500,bi=180,al=500;function _0(i,t,e){let n,o,s,{tag:r}=t;return i.$$set=a=>{"tag"in a&&e(0,r=a.tag)},i.$$.update=()=>{var a,l;i.$$.dirty&1&&e(1,n=(l=(a=r.state)==null?void 0:a.unfolded)!=null?l:!1),i.$$.dirty&2&&e(3,o=!n),i.$$.dirty&1&&e(2,s=r.data)},[r,n,s,o]}class X0 extends re{constructor(t){super(),se(this,t,_0,H0,oe,{tag:0},W0)}}const rn="data:audio/mpeg;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAADAAAGhgBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVWqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr///////////////////////////////////////////8AAAA5TEFNRTMuOThyAc0AAAAAAAAAABSAJAiqQgAAgAAABobxtI73AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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rZziQKKEgQsQLAhQkUJAgMQDghltLO1onp0cpkNInSFMqlYeSEJ5AHsqFdOwy1DA2sRmRJKxdKRfLhfLw5BzUxBTUUzLjk4LjJVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUxBTUUzLjk4LjJVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/7ksRRA8AAAaQAAAAgAAA0gAAABFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVU=",kn={};var yi=(i=>(i.Default="default",i.GetAudioDuration="getAudioDuration",i.PlayAudio="playAudio",i))(yi||{});function ll(i,t){const e=(t==null?void 0:t.namespace)||"default",n=kn[e]||(kn[e]=[]);let o=n.find(s=>!s.realSrc||s.realSrc===rn);return o||(console.warn("\u672A\u627E\u5230\u7F13\u5B58\u97F3\u9891\uFF0C\u5DF2\u65B0\u5EFA",kn),o=new Ao(rn),n.push(o)),i&&(o.src=i),o}function Y0(i){return W(this,null,function*(){const t=(()=>i instanceof Ao?i:ll(i,{namespace:"getAudioDuration"}))(),e=yield new Promise(n=>{t.duration?t.isBlankAudio?n(0):n(t.duration):(t.addEventListener("loadedmetadata",()=>{t.isBlankAudio?n(0):n(t.duration)}),t.addEventListener("canplaythrough",()=>{t.isBlankAudio?n(0):n(t.duration)}))});return typeof i=="string"&&t.clear(),e})}function cl(i,t){const e=(t==null?void 0:t.namespace)||"default",n=kn[e]||(kn[e]=[]),o=i-n.length;if(!(o<=0))for(let s=0;s<o;s++)n.push(new Ao(rn))}class Ao extends Audio{constructor(e){super(e);m(this,"preload","auto");m(this,"realSrc","");m(this,"inited",!1);m(this,"removeDocumentEventListener");this.realSrc=e!=null?e:"",super.addEventListener("ended",()=>{this.src=""});const n=()=>U0(this);document.addEventListener("click",n),document.addEventListener("touchend",n),this.removeDocumentEventListener=()=>{document.removeEventListener("click",n),document.removeEventListener("touchend",n)}}get isBlankAudio(){return this.realSrc===rn||!this.realSrc}get src(){return super.src}set src(e){super.src=e,this.realSrc=e}clear(){this.src=rn,this.currentTime=0}}function U0(i){!i||i.inited||(i.src&&(i.inited=!0,i.removeDocumentEventListener()),i.src===rn&&i.play())}class J0 extends Audio{constructor(e){super();m(this,"sharedAudioSrc");m(this,"sharedAudioPaused",!0);m(this,"sharedAudioCurrentTime",0);m(this,"tryplaying",!1);m(this,"audioInstance");m(this,"eventListenerDisposer");this.sharedAudioSrc=e}get paused(){var e;return(e=this.sharedAudioPaused)!=null?e:!0}get currentTime(){return this.sharedAudioCurrentTime}play(){return W(this,null,function*(){var e,n,o;this.tryplaying||(this.tryplaying=!0,(!this.audioInstance||((e=this.audioInstance)==null?void 0:e.realSrc)!==this.sharedAudioSrc)&&(this.audioInstance=ll(this.sharedAudioSrc,{namespace:yi.PlayAudio})),this.audioInstance.currentTime=(n=this.currentTime)!=null?n:0,(o=this.eventListenerDisposer)==null||o.call(this),this.eventListenerDisposer=this.addEventListeners(),this.audioInstance.play().then(()=>{this.sharedAudioPaused=!1}).catch(s=>{this.pause(),console.warn(s)}).finally(()=>{this.tryplaying=!1}))})}pause(){!this.audioInstance||this.paused||(this.sharedAudioPaused=!0,this.audioInstance.addEventListener("pause",()=>{var e;(e=this.eventListenerDisposer)==null||e.call(this)},{once:!0}),this.audioInstance.pause())}dispose(){this.clear(),this.audioInstance=void 0}clear(){var e;(e=this.audioInstance)==null||e.clear()}addEventListeners(){const e=this.audioInstance;if(!e)return;const n=d=>{var h;this.sharedAudioCurrentTime=e.currentTime,(h=this.ontimeupdate)==null||h.call(this,d)},o=d=>{var h;return(h=this.onplay)==null?void 0:h.call(this,d)},s=d=>{var h;(h=this.onpause)==null||h.call(this,d),this.clear()},r=d=>{var h;(h=this.onended)==null||h.call(this,d),this.sharedAudioCurrentTime=0},a=d=>{var h;return(h=this.onerror)==null?void 0:h.call(this,d)},l=d=>{var h;return(h=this.oncanplay)==null?void 0:h.call(this,d)},c=d=>{var h;return(h=this.oncanplaythrough)==null?void 0:h.call(this,d)},u=d=>{var h;return(h=this.onloadeddata)==null?void 0:h.call(this,d)},f=d=>{var h;return(h=this.onloadedmetadata)==null?void 0:h.call(this,d)};return e.addEventListener("timeupdate",n),e.addEventListener("play",o),e.addEventListener("pause",s),e.addEventListener("ended",r),e.addEventListener("error",a),e.addEventListener("canplay",l),e.addEventListener("canplaythrough",c),e.addEventListener("loadeddata",u),e.addEventListener("loadedmetadata",f),()=>{e.removeEventListener("timeupdate",n),e.removeEventListener("play",o),e.removeEventListener("pause",s),e.removeEventListener("ended",r),e.removeEventListener("error",a),e.removeEventListener("canplay",l),e.removeEventListener("canplaythrough",c),e.removeEventListener("loadeddata",u),e.removeEventListener("loadedmetadata",f)}}}function Z0(i){ue(i,"svelte-13e7hxv",".audio.svelte-13e7hxv{pointer-events:auto;cursor:pointer;width:100%;height:100%}")}function q0(i){let t,e,n,o;const s=i[8].default,r=_t(s,i,i[7],null);return{c(){t=T("div"),r&&r.c(),b(t,"class","audio svelte-13e7hxv"),b(t,"style",i[0])},m(a,l){z(a,t,l),r&&r.m(t,null),e=!0,n||(o=Pe(t,"click",Uo(i[1])),n=!0)},p(a,[l]){r&&r.p&&(!e||l&128)&&Yt(r,s,a,a[7],e?Xt(s,a[7],l,null):Ut(a[7]),null),(!e||l&1)&&b(t,"style",a[0])},i(a){e||(C(r,a),e=!0)},o(a){D(r,a),e=!1},d(a){a&&M(t),r&&r.d(a),n=!1,o()}}}function K0(i,t,e){let{$$slots:n={},$$scope:o}=t,{url:s}=t,{enable:r=!0}=t,{style:a=""}=t,{hooksInfo:l}=t;const c=vn(),u=St("hooks"),f=St("mediaStore");let d,h=!0;function g(){e(5,d.onplay=p=>{u.emit("playStateChange",G({event:p,state:"playing",mediaInstance:d},l)),c("play"),e(6,h=!1)},d),e(5,d.onpause=p=>{u.emit("playStateChange",G({event:p,state:"paused",mediaInstance:d},l)),c("pause"),e(6,h=!0)},d),e(5,d.onloadedmetadata=p=>{typeof d.duration=="number"&&!Number.isNaN(d.duration)&&c("duration",d.duration)},d),e(5,d.ontimeupdate=p=>{c("timeupdate",d.currentTime)},d)}f.subscribe(({currentMediaElement:p})=>{p!==d&&(h||d==null||d.pause())});function A(p){!d||(u.emit("click",G({event:p,target:"AudioTagPlayIcon",audioInstance:d},l)),f.set({currentMediaElement:d}),u.emit("playStateChange",G({event:p,state:d.paused?"playing":"paused",mediaInstance:d},l)),d.paused?d.play():d.pause())}return i.$$set=p=>{"url"in p&&e(2,s=p.url),"enable"in p&&e(3,r=p.enable),"style"in p&&e(0,a=p.style),"hooksInfo"in p&&e(4,l=p.hooksInfo),"$$scope"in p&&e(7,o=p.$$scope)},i.$$.update=()=>{i.$$.dirty&4&&(s||c("duration",0)),i.$$.dirty&36&&(d==null||d.dispose(),e(5,d=new J0(s)),c("audioRef",d),setTimeout(()=>c("audioRef",d),200),Y0(s).then(p=>c("duration",p)),g()),i.$$.dirty&40&&(r||d==null||d.pause()),i.$$.dirty&72&&c(r&&!h?"play":"pause")},[a,A,s,r,l,d,h,o,n]}class ul extends re{constructor(t){super(),se(this,t,K0,q0,oe,{url:2,enable:3,style:0,hooksInfo:4},Z0)}}function $0(i){ue(i,"svelte-srt2pi",".audio-icon__wrapper.svelte-srt2pi.svelte-srt2pi{display:inline-block}.audio-icon.svelte-srt2pi.svelte-srt2pi{display:flex;justify-content:center;align-items:center;position:relative;width:100%;height:100%;border-radius:50%;background-color:rgba(255, 255, 255, 0.8)}.audio-icon.svelte-srt2pi .sound-wave__container.svelte-srt2pi{position:absolute;pointer-events:none;width:60%;height:60%}.sound-wave.svelte-srt2pi.svelte-srt2pi{animation-duration:2s;animation-iteration-count:infinite;animation-play-state:paused;transition:opacity 0}.playing.svelte-srt2pi .sound-wave.svelte-srt2pi{animation-play-state:running}.playing.svelte-srt2pi .sound-wave-1.svelte-srt2pi{animation-name:svelte-srt2pi-sound_wave_1_animation}.playing.svelte-srt2pi .sound-wave-2.svelte-srt2pi{animation-name:svelte-srt2pi-sound_wave_2_animation}.playing.svelte-srt2pi .sound-wave-3.svelte-srt2pi{animation-name:svelte-srt2pi-sound_wave_3_animation}@keyframes svelte-srt2pi-sound_wave_1_animation{0%,10%{opacity:0}25%,100%{opacity:1}}@keyframes svelte-srt2pi-sound_wave_2_animation{0%,35%{opacity:0}50%,100%{opacity:1}}@keyframes svelte-srt2pi-sound_wave_3_animation{0%,60%{opacity:0}75%,100%{opacity:1}}")}function dl(i){let t,e;return t=new nt({props:{center:!0,blurRadius:12,spreadRadius:5}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function eA(i){let t,e,n,o,s,r=i[1]&&dl();return{c(){t=T("div"),r&&r.c(),e=ne(),n=T("div"),o=T("div"),o.innerHTML='<svg width="100%" height="100%" viewBox="0 0 128 128"><g transform="rotate(-45 12 64) translate(12 64)" fill="black" stroke="black" fill-opacity="0.6" stroke-opacity="0.6"><path stroke="none" class="sound-wave sound-wave-1 svelte-srt2pi" d="M0,23 A23,23 0 0,0 23,0 L0,0"></path><path fill="none" stroke-width="15" class="sound-wave sound-wave-2 svelte-srt2pi" d="M0,46 A46,46 0 0,0 46,0"></path><path fill="none" stroke-width="15" class="sound-wave sound-wave-3 svelte-srt2pi" d="M0,80 A80,80 0 0,0 80,0"></path></g></svg>',b(o,"class","sound-wave__container svelte-srt2pi"),b(n,"class","audio-icon svelte-srt2pi"),q(n,"playing",i[0]),b(t,"class","audio-icon__wrapper svelte-srt2pi"),b(t,"style",i[2]),L(t,"width",i[5]),L(t,"height",i[5])},m(a,l){z(a,t,l),r&&r.m(t,null),j(t,e),j(t,n),j(n,o),i[7](o),i[8](t),s=!0},p(a,[l]){a[1]?r?l&2&&C(r,1):(r=dl(),r.c(),C(r,1),r.m(t,e)):r&&(ae(),D(r,1,1,()=>{r=null}),le()),(!s||l&1)&&q(n,"playing",a[0]),(!s||l&4)&&b(t,"style",a[2]),l&32&&L(t,"width",a[5]),l&32&&L(t,"height",a[5])},i(a){s||(C(r),s=!0)},o(a){D(r),s=!1},d(a){a&&M(t),r&&r.d(),i[7](null),i[8](null)}}}function tA(i,t,e){let n,{playing:o}=t,{shadow:s=!1}=t,{style:r=null}=t,{width:a="100%"}=t,l,c;function u(d){Oe[d?"unshift":"push"](()=>{c=d,e(4,c)})}function f(d){Oe[d?"unshift":"push"](()=>{l=d,e(3,l)})}return i.$$set=d=>{"playing"in d&&e(0,o=d.playing),"shadow"in d&&e(1,s=d.shadow),"style"in d&&e(2,r=d.style),"width"in d&&e(6,a=d.width)},i.$$.update=()=>{i.$$.dirty&64&&e(5,n=typeof a=="number"?xe(a):a)},[o,s,r,l,c,n,a,u,f]}class fl extends re{constructor(t){super(),se(this,t,tA,eA,oe,{playing:0,shadow:1,style:2,width:6},$0)}}function nA(i){ue(i,"svelte-1s6gk4a",".audio-tag.svelte-1s6gk4a{position:absolute;left:0;top:0;width:0;height:0;overflow:visible}.audio-icon__wrapper.svelte-1s6gk4a{position:relative;vertical-align:top;width:100%;height:100%}.content.svelte-1s6gk4a{width:-moz-max-content;width:max-content;height:3.375rem;padding:2.25rem 0.25rem 0 1rem;position:absolute;left:0;bottom:0.125rem;overflow:hidden;box-sizing:border-box;font-size:0;white-space:nowrap;font-weight:600}.wrapper.svelte-1s6gk4a{position:relative;width:100%;height:100%}.audio-icon.svelte-1s6gk4a{pointer-events:none;vertical-align:top;display:inline-block;width:1rem;height:1rem;margin-right:0.25rem;margin-top:0.0625rem}.audio.svelte-1s6gk4a{position:relative;width:100%;height:100%}")}function hl(i){var v,y;let t,e,n,o,s,r,a,l,c,u,f,d,h,g,A;e=new nt({props:{visible:i[6],left:i[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}});let p=i[6]&&ml(i);return c=new fa({props:{visible:i[6],textUnfolded:i[1],content:i[5]}}),d=new ro({props:{unfolded:i[6],length:i[3],outDelay:i[4]+20*Math.min((y=(v=i[5])==null?void 0:v.length)!=null?y:10,15),useLinearColor:!0}}),{c(){t=T("div"),ee(e.$$.fragment),n=ne(),o=T("div"),s=T("div"),r=T("div"),p&&p.c(),a=ne(),l=T("div"),ee(c.$$.fragment),f=ne(),ee(d.$$.fragment),b(r,"class","audio-icon svelte-1s6gk4a"),Le(()=>i[11].call(l)),L(l,"display","inline-block"),b(s,"class","wrapper svelte-1s6gk4a"),b(o,"class","content svelte-1s6gk4a"),b(t,"class","audio-tag svelte-1s6gk4a"),q(t,"unfolded",i[6])},m(w,P){z(w,t,P),K(e,t,null),j(t,n),j(t,o),j(o,s),j(s,r),p&&p.m(r,null),j(s,a),j(s,l),K(c,l,null),u=ft(l,i[11].bind(l)),j(t,f),K(d,t,null),h=!0,g||(A=Pe(l,"click",i[7]),g=!0)},p(w,P){var x,Q;const E={};P&64&&(E.visible=w[6]),P&8&&(E.left=w[3]/2+"px"),e.$set(E),w[6]?p?(p.p(w,P),P&64&&C(p,1)):(p=ml(w),p.c(),C(p,1),p.m(r,null)):p&&(ae(),D(p,1,1,()=>{p=null}),le());const k={};P&64&&(k.visible=w[6]),P&2&&(k.textUnfolded=w[1]),P&32&&(k.content=w[5]),c.$set(k);const S={};P&64&&(S.unfolded=w[6]),P&8&&(S.length=w[3]),P&48&&(S.outDelay=w[4]+20*Math.min((Q=(x=w[5])==null?void 0:x.length)!=null?Q:10,15)),d.$set(S),(!h||P&64)&&q(t,"unfolded",w[6])},i(w){h||(C(e.$$.fragment,w),C(p),C(c.$$.fragment,w),C(d.$$.fragment,w),h=!0)},o(w){D(e.$$.fragment,w),D(p),D(c.$$.fragment,w),D(d.$$.fragment,w),h=!1},d(w){w&&M(t),$(e),p&&p.d(),$(c),u(),$(d),g=!1,A()}}}function ml(i){let t,e,n,o,s,r,a;return e=new nt({props:{center:!0,blurRadius:15,spreadRadius:6}}),o=new ul({props:{enable:i[6],url:i[0].data.audioUrl,hooksInfo:{tag:i[0]},$$slots:{default:[iA]},$$scope:{ctx:i}}}),o.$on("play",i[8]),o.$on("pause",i[9]),o.$on("audioRef",i[10]),{c(){t=T("div"),ee(e.$$.fragment),n=ne(),ee(o.$$.fragment),b(t,"class","audio svelte-1s6gk4a")},m(l,c){z(l,t,c),K(e,t,null),j(t,n),K(o,t,null),a=!0},p(l,c){i=l;const u={};c&64&&(u.enable=i[6]),c&1&&(u.url=i[0].data.audioUrl),c&1&&(u.hooksInfo={tag:i[0]}),c&4100&&(u.$$scope={dirty:c,ctx:i}),o.$set(u)},i(l){a||(C(e.$$.fragment,l),C(o.$$.fragment,l),l&&Le(()=>{r&&r.end(1),s=Mt(t,zt,{duration:1e3,delay:0,easing:qt}),s.start()}),a=!0)},o(l){var c,u;D(e.$$.fragment,l),D(o.$$.fragment,l),s&&s.invalidate(),l&&(r=Zt(t,zt,{duration:1e3,delay:20*Math.min((u=(c=i[5])==null?void 0:c.length)!=null?u:10,15),easing:qt})),a=!1},d(l){l&&M(t),$(e),$(o),l&&r&&r.end()}}}function iA(i){let t,e,n;return e=new fl({props:{playing:i[2]}}),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","audio-icon__wrapper svelte-1s6gk4a")},m(o,s){z(o,t,s),K(e,t,null),n=!0},p(o,s){const r={};s&4&&(r.playing=o[2]),e.$set(r)},i(o){n||(C(e.$$.fragment,o),n=!0)},o(o){D(e.$$.fragment,o),n=!1},d(o){o&&M(t),$(e)}}}function oA(i){let t,e,n=i[0].state&&hl(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&C(n,1)):(n=hl(o),n.c(),C(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(C(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function sA(i,t,e){let n,o,s,{tag:r}=t,a=!1,l=!1,c;function u(){e(1,a=!a)}const f=()=>{e(2,l=!0)},d=()=>{e(2,l=!1)};function h(A){bn.call(this,i,A)}function g(){c=this.clientWidth,e(3,c)}return i.$$set=A=>{"tag"in A&&e(0,r=A.tag)},i.$$.update=()=>{var A,p,v;i.$$.dirty&1&&e(6,n=!!((A=r.state)!=null&&A.unfolded)),i.$$.dirty&1&&e(5,o=(v=(p=r.data.title)!=null?p:r.data.text)!=null?v:""),i.$$.dirty&2&&e(4,s=a?450:0)},[r,a,l,c,s,o,n,u,f,d,h,g]}class rA extends re{constructor(t){super(),se(this,t,sA,oA,oe,{tag:0},nA)}}function aA(i){const t=document.createElement("div");t.style.color=i,document.body.appendChild(t);const e=window.getComputedStyle(t).color;t.remove();const n=(()=>e.search("rgba")===-1?e.replace("rgb","rgba").replace(")",", 1)"):e)(),o=n.replace("rgba","").replace("(","").replace(")","").split(",").map(s=>Number(s.trim()));return{rgba:n,r:o[0],g:o[1],b:o[2],a:o[3]}}function lA(i){ue(i,"svelte-58hfjf",".audio-tag__wrapper.svelte-58hfjf{position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.audio-tag.svelte-58hfjf{position:relative;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;padding:0.1875rem;padding-right:0.625rem;border-radius:624999.9375rem;border:0.03125rem solid rgba(255, 255, 255, 0.2)}.audio__inner.svelte-58hfjf{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.text.svelte-58hfjf{font-weight:bold;font-size:0.75rem;margin-left:0.25rem}.audio-icon__wrapper.svelte-58hfjf{position:relative;vertical-align:top;pointer-events:none;width:1.375rem;height:1.375rem}")}function pl(i){let t,e,n,o;return n=new ul({props:{style:"width: max-content; height: max-content;",enable:i[0].state.visible,url:i[0].data.audioUrl,hooksInfo:{tag:i[0]},$$slots:{default:[uA]},$$scope:{ctx:i}}}),n.$on("play",i[7]),n.$on("pause",i[8]),n.$on("timeupdate",i[9]),n.$on("duration",i[10]),n.$on("audioRef",i[11]),{c(){t=T("div"),e=T("div"),ee(n.$$.fragment),b(e,"class","audio-tag svelte-58hfjf"),L(e,"background-color",i[1]),L(e,"color",i[5]),b(t,"class","audio-tag__wrapper svelte-58hfjf")},m(s,r){z(s,t,r),j(t,e),K(n,e,null),o=!0},p(s,r){const a={};r&1&&(a.enable=s[0].state.visible),r&1&&(a.url=s[0].data.audioUrl),r&1&&(a.hooksInfo={tag:s[0]}),r&8260&&(a.$$scope={dirty:r,ctx:s}),n.$set(a),r&2&&L(e,"background-color",s[1]),r&32&&L(e,"color",s[5])},i(s){o||(C(n.$$.fragment,s),o=!0)},o(s){D(n.$$.fragment,s),o=!1},d(s){s&&M(t),$(n)}}}function cA(i){let t;return{c(){t=De(i[6])},m(e,n){z(e,t,n)},p(e,n){n&64&&ze(t,e[6])},d(e){e&&M(t)}}}function uA(i){let t,e,n,o,s,r,a;return n=new fl({props:{playing:i[2]}}),r=new uo({props:{maxWidth:72,$$slots:{default:[cA]},$$scope:{ctx:i}}}),{c(){t=T("div"),e=T("div"),ee(n.$$.fragment),o=ne(),s=T("div"),ee(r.$$.fragment),b(e,"class","audio-icon__wrapper svelte-58hfjf"),b(s,"class","text svelte-58hfjf"),b(t,"class","audio__inner svelte-58hfjf")},m(l,c){z(l,t,c),j(t,e),K(n,e,null),j(t,o),j(t,s),K(r,s,null),a=!0},p(l,c){const u={};c&4&&(u.playing=l[2]),n.$set(u);const f={};c&8256&&(f.$$scope={dirty:c,ctx:l}),r.$set(f)},i(l){a||(C(n.$$.fragment,l),C(r.$$.fragment,l),a=!0)},o(l){D(n.$$.fragment,l),D(r.$$.fragment,l),a=!1},d(l){l&&M(t),$(n),$(r)}}}function dA(i){let t,e,n=i[0].state&&pl(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&C(n,1)):(n=pl(o),n.c(),C(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(C(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function fA(i,t,e){let n,o,s,{tag:r}=t;vn();let a=!1,l=0,c=0;const u=()=>{e(2,a=!0)},f=()=>{e(2,a=!1)},d=A=>{e(3,l=A.detail)},h=A=>{e(4,c=A.detail)};function g(A){bn.call(this,i,A)}return i.$$set=A=>{"tag"in A&&e(0,r=A.tag)},i.$$.update=()=>{var A,p;i.$$.dirty&1&&e(6,n=(p=(A=r.data.title)!=null?A:r.data.text)!=null?p:""),i.$$.dirty&1&&e(1,o=(()=>{var v;return r.data.backgroundColor==="dark"?"rgba(0, 0, 0, 0.3)":r.data.backgroundColor==="light"?"rgba(255, 255, 255, 0.3)":(v=r.data.backgroundColor)!=null?v:"rgba(0, 0, 0, 0.3)"})()),i.$$.dirty&2&&e(5,s=(()=>{const{r:v,g:y,b:w}=aA(o);return(v*299+y*587+w*114)/1e3>=128?"rgba(0, 0, 0, 0.6)":"white"})())},[r,o,a,l,c,s,n,u,f,d,h,g]}class hA extends re{constructor(t){super(),se(this,t,fA,dA,oe,{tag:0},lA)}}function mA(i){let t,e;return t=new hA({props:{tag:i[0]}}),t.$on("audioRef",i[2]),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function pA(i){let t,e;return t=new rA({props:{tag:i[0]}}),t.$on("audioRef",i[2]),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function gA(i){let t,e,n,o;const s=[pA,mA],r=[];function a(l,c){return l[1]==="line"?0:l[1]==="plane"?1:-1}return~(t=a(i))&&(e=r[t]=s[t](i)),{c(){e&&e.c(),n=pe()},m(l,c){~t&&r[t].m(l,c),z(l,n,c),o=!0},p(l,[c]){let u=t;t=a(l),t===u?~t&&r[t].p(l,c):(e&&(ae(),D(r[u],1,1,()=>{r[u]=null}),le()),~t?(e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),C(e,1),e.m(n.parentNode,n)):e=null)},i(l){o||(C(e),o=!0)},o(l){D(e),o=!1},d(l){~t&&r[t].d(l),l&&M(n)}}}function AA(i,t,e){let n,{tag:o}=t,s;function r(a){s=a.detail}return o.play=()=>s.play(),o.pause=()=>s.pause(),i.$$set=a=>{"tag"in a&&e(0,o=a.tag)},i.$$.update=()=>{var a;i.$$.dirty&1&&e(1,n=(a=o.data.appearance)!=null?a:"line")},[o,n,r]}class vA extends re{constructor(t){super(),se(this,t,AA,gA,oe,{tag:0})}}function bA(i){ue(i,"svelte-10cw0el",".media-wrapper.svelte-10cw0el{position:absolute;width:100%;height:100%}")}function gl(i){var o;let t,e,n;return e=new Wa({props:{mediaItemConfig:{canPlay:!0,playButtonSizeIfNeed:"large",playButtonIfNeed:(o=i[4])!=null?o:"withText",disableVideoIfHavePoster:!1,objectFit:i[2]},unfolded:i[6],mediaData:i[5],enableCarousel:i[1],autoplayConfig:i[3],tag:i[0],inDelay:500,duration:500}}),{c(){t=T("div"),ee(e.$$.fragment),b(t,"class","media-wrapper svelte-10cw0el")},m(s,r){z(s,t,r),K(e,t,null),n=!0},p(s,r){var l;const a={};r&20&&(a.mediaItemConfig={canPlay:!0,playButtonSizeIfNeed:"large",playButtonIfNeed:(l=s[4])!=null?l:"withText",disableVideoIfHavePoster:!1,objectFit:s[2]}),r&64&&(a.unfolded=s[6]),r&32&&(a.mediaData=s[5]),r&2&&(a.enableCarousel=s[1]),r&8&&(a.autoplayConfig=s[3]),r&1&&(a.tag=s[0]),e.$set(a)},i(s){n||(C(e.$$.fragment,s),n=!0)},o(s){D(e.$$.fragment,s),n=!1},d(s){s&&M(t),$(e)}}}function yA(i){let t,e,n=i[0].state&&i[5]&&gl(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[0].state&&o[5]?n?(n.p(o,s),s&33&&C(n,1)):(n=gl(o),n.c(),C(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(C(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function wA(i,t,e){let n,o,s,r,a,l,{tag:c}=t;return i.$$set=u=>{"tag"in u&&e(0,c=u.tag)},i.$$.update=()=>{var u,f;i.$$.dirty&1&&e(6,n=c.state?c.state.unfolded:!1),i.$$.dirty&1&&e(5,o=c.data.mediaData),i.$$.dirty&1&&e(1,s=c.data.enableCarousel),i.$$.dirty&1&&e(4,r=c.data.playIcon),i.$$.dirty&3&&e(3,a=(u=c.data.autoplayConfig)!=null?u:{autoplay:s!=null?s:!0,autoplayVideo:!0}),i.$$.dirty&1&&e(2,l=(f=c.data.objectFit)!=null?f:(()=>c.data.adaptationMode==="stretch"?"fill":c.data.adaptationMode==="proportional"?"contain":void 0)())},[c,s,l,a,r,o,n]}class CA extends re{constructor(t){super(),se(this,t,wA,yA,oe,{tag:0},bA)}}function PA(i){return W(this,null,function*(){return new Promise((t,e)=>{if(!i){e(Error("url is empty"));return}const n=new Image;n.src=i,n.onload=()=>t({width:n.width,height:n.height}),n.onerror=e})})}function IA(i){return W(this,null,function*(){const{steps:t,url:e,ratio:n=3,fps:o=24}=i;if(!t)throw new Error("KeyframeIcon requires steps");const{width:s,height:r}=yield PA(e),a=s/n,l=r/n,c=a/t,u=l,f=1/o*t+"s",d=a/t-a;return{url:e,keyframesWidth:a,keyframesHeight:l,wrapperWidth:c,wrapperHeight:u,steps:t,duration:f,offsetX:d,offsetY:0}})}function EA(i){ue(i,"svelte-mhs8j5","@keyframes svelte-mhs8j5-sprites-animation{0%{background-position:0 0}100%{background-position:var(--keyframe_offset_x) 0}}.icon-image.svelte-mhs8j5{display:block;width:100%}.icon-keyframe-container.svelte-mhs8j5{overflow:hidden}.icon-keyframe-wrapper.svelte-mhs8j5{transform-origin:0 0}.icon-keyframe.svelte-mhs8j5{background-repeat:no-repeat;animation-direction:normal;animation-iteration-count:infinite;animation-name:svelte-mhs8j5-sprites-animation}")}function Al(i){i[6]=i[14].url,i[7]=i[14].keyframesWidth,i[8]=i[14].keyframesHeight,i[9]=i[14].wrapperWidth,i[10]=i[14].wrapperHeight,i[11]=i[14].steps,i[12]=i[14].duration,i[13]=i[14].offsetX}function vl(i){let t,e,n,o=i[2]&&bl();function s(l,c){return l[3]?xA:kA}let r=s(i),a=r(i);return{c(){t=T("div"),o&&o.c(),e=ne(),a.c(),b(t,"class","icon"),L(t,"width",typeof i[0]=="number"?xe(i[0]):i[0])},m(l,c){z(l,t,c),o&&o.m(t,null),j(t,e),a.m(t,null),n=!0},p(l,c){l[2]?o?c&4&&C(o,1):(o=bl(),o.c(),C(o,1),o.m(t,e)):o&&(ae(),D(o,1,1,()=>{o=null}),le()),r===(r=s(l))&&a?a.p(l,c):(a.d(1),a=r(l),a&&(a.c(),a.m(t,null))),c&1&&L(t,"width",typeof l[0]=="number"?xe(l[0]):l[0])},i(l){n||(C(o),n=!0)},o(l){D(o),n=!1},d(l){l&&M(t),o&&o.d(),a.d()}}}function bl(i){let t,e;return t=new nt({props:{center:!0,blurRadius:24,spreadRadius:16}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function kA(i){let t,e;return{c(){t=T("img"),b(t,"class","icon-image svelte-mhs8j5"),Xe(t.src,e=i[1].url)||b(t,"src",e),b(t,"alt","icon")},m(n,o){z(n,t,o)},p(n,o){o&2&&!Xe(t.src,e=n[1].url)&&b(t,"src",e)},d(n){n&&M(t)}}}function xA(i){let t,e,n={ctx:i,current:null,token:null,hasCatch:!1,pending:SA,then:LA,catch:DA,value:14};return is(e=i[4](i[1]),n),{c(){t=pe(),n.block.c()},m(o,s){z(o,t,s),n.block.m(o,n.anchor=s),n.mount=()=>t.parentNode,n.anchor=t},p(o,s){i=o,n.ctx=i,s&2&&e!==(e=i[4](i[1]))&&is(e,n)||Sc(n,i,s)},d(o){o&&M(t),n.block.d(o),n.token=null,n=null}}}function DA(i){return{c:J,m:J,p:J,d:J}}function LA(i){Al(i);let t,e,n,o=`url(${i[6]})`,s=`steps(${i[11]-1})`;return{c(){t=T("div"),e=T("div"),n=T("div"),b(n,"class","icon-keyframe svelte-mhs8j5"),L(n,"width",xe(i[7])),L(n,"height",xe(i[8])),L(n,"background-image",o),L(n,"animation-duration",i[12]),L(n,"animation-timing-function",s),L(n,"animation-delay",0),L(n,"background-size","100% 100%"),L(n,"--keyframe_offset_x",xe(i[13])),b(e,"class","icon-keyframe-wrapper svelte-mhs8j5"),L(e,"transform",typeof i[0]=="number"?`scale(${i[0]/i[9]})`:void 0),b(t,"class","icon-keyframe-container svelte-mhs8j5"),L(t,"width",typeof i[0]=="number"?xe(i[0]):xe(i[9])),L(t,"height",typeof i[0]=="number"?xe(i[10]*(i[0]/i[9])):xe(i[10]))},m(r,a){z(r,t,a),j(t,e),j(e,n)},p(r,a){Al(r),a&2&&L(n,"width",xe(r[7])),a&2&&L(n,"height",xe(r[8])),a&2&&o!==(o=`url(${r[6]})`)&&L(n,"background-image",o),a&2&&L(n,"animation-duration",r[12]),a&2&&s!==(s=`steps(${r[11]-1})`)&&L(n,"animation-timing-function",s),a&2&&L(n,"--keyframe_offset_x",xe(r[13])),a&3&&L(e,"transform",typeof r[0]=="number"?`scale(${r[0]/r[9]})`:void 0),a&3&&L(t,"width",typeof r[0]=="number"?xe(r[0]):xe(r[9])),a&3&&L(t,"height",typeof r[0]=="number"?xe(r[10]*(r[0]/r[9])):xe(r[10]))},d(r){r&&M(t)}}}function SA(i){return{c:J,m:J,p:J,d:J}}function MA(i){let t,e,n=i[1]&&vl(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&C(n,1)):(n=vl(o),n.c(),C(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(C(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function zA(i,t,e){let n,{width:o=null}=t,{icon:s=null}=t,{shadow:r=!1}=t;const a=vn();function l(c){return W(this,null,function*(){const u=yield IA(c);return a("iconLoaded"),u})}return i.$$set=c=>{"width"in c&&e(0,o=c.width),"icon"in c&&e(1,s=c.icon),"shadow"in c&&e(2,r=c.shadow)},i.$$.update=()=>{i.$$.dirty&2&&e(3,n=(s==null?void 0:s.steps)>=2),i.$$.dirty&8&&!n&&a("iconLoaded")},[o,s,r,n,l]}class yl extends re{constructor(t){super(),se(this,t,zA,MA,oe,{width:0,icon:1,shadow:2},EA)}}function TA(i){ue(i,"svelte-e58ijk",".wrapper.svelte-e58ijk{font-weight:600;cursor:pointer;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);display:flex;align-items:center;justify-content:center;flex-direction:column;pointer-events:auto}.text-wrapper.svelte-e58ijk{position:relative;display:flex;align-items:center;justify-content:center}.text.svelte-e58ijk{position:absolute;top:0;font-size:0.875rem;color:#ffffff;letter-spacing:0;text-align:center;max-width:8.75rem;width:-moz-max-content;width:max-content;line-height:1.125rem;text-shadow:0.125rem 0rem 0.5rem rgba(0, 0, 0, 0.15)}")}function wl(i){let t,e,n,o,s,r;return e=new nt({props:{outDelay:0,inDelay:0,center:!0,width:"80%",blurRadius:40,spreadRadius:16,opacity:.08}}),{c(){t=T("div"),ee(e.$$.fragment),n=ne(),o=T("div"),s=De(i[2]),b(o,"class","text svelte-e58ijk"),b(t,"class","text-wrapper svelte-e58ijk")},m(a,l){z(a,t,l),K(e,t,null),j(t,n),j(t,o),j(o,s),r=!0},p(a,l){(!r||l&4)&&ze(s,a[2])},i(a){r||(C(e.$$.fragment,a),r=!0)},o(a){D(e.$$.fragment,a),r=!1},d(a){a&&M(t),$(e)}}}function BA(i){let t,e,n,o;e=new yl({props:{icon:i[0],shadow:!0}}),e.$on("iconLoaded",i[9]);let s=i[2]&&i[1]&&wl(i);return{c(){t=T("div"),ee(e.$$.fragment),n=ne(),s&&s.c(),b(t,"class","wrapper svelte-e58ijk")},m(r,a){z(r,t,a),K(e,t,null),j(t,n),s&&s.m(t,null),o=!0},p(r,[a]){const l={};a&1&&(l.icon=r[0]),e.$set(l),r[2]&&r[1]?s?(s.p(r,a),a&6&&C(s,1)):(s=wl(r),s.c(),C(s,1),s.m(t,null)):s&&(ae(),D(s,1,1,()=>{s=null}),le())},i(r){o||(C(e.$$.fragment,r),C(s),o=!0)},o(r){D(e.$$.fragment,r),D(s),o=!1},d(r){r&&M(t),$(e),s&&s.d()}}}function jA(i,t,e){let n,o,s,r,a,l,c,u,{tag:f}=t;const d=()=>{e(1,s=!0)};return i.$$set=h=>{"tag"in h&&e(3,f=h.tag)},i.$$.update=()=>{var h,g;i.$$.dirty&8&&e(2,n=(h=f.data.title)!=null?h:f.data.text),i.$$.dirty&8&&e(8,o=(g=f.data.icon)!=null?g:f.style.point),i.$$.dirty&256&&e(1,s=(o==null?void 0:o.steps)<2),i.$$.dirty&256&&e(7,r=o.url),i.$$.dirty&256&&e(6,a=o.steps),i.$$.dirty&256&&e(5,l=o.fps),i.$$.dirty&256&&e(4,c=o.ratio),i.$$.dirty&240&&e(0,u={url:r,steps:a,fps:l,ratio:c})},[u,s,n,f,c,l,a,r,o,d]}class VA extends re{constructor(t){super(),se(this,t,jA,BA,oe,{tag:3},TA)}}function QA(i){ue(i,"svelte-kzl2aj",".customElement__container.svelte-kzl2aj{position:relative}")}function Cl(i){let t,e=i[0].element+"",n;return{c(){t=new Nn(!1),n=pe(),t.a=n},m(o,s){t.m(e,o,s),z(o,n,s)},p(o,s){s&1&&e!==(e=o[0].element+"")&&t.p(e)},d(o){o&&M(n),o&&t.d()}}}function OA(i){let t,e=typeof i[0].element=="string"&&Cl(i);return{c(){t=T("div"),e&&e.c(),b(t,"class","customElement__container svelte-kzl2aj")},m(n,o){z(n,t,o),e&&e.m(t,null),i[2](t)},p(n,[o]){typeof n[0].element=="string"?e?e.p(n,o):(e=Cl(n),e.c(),e.m(t,null)):e&&(e.d(1),e=null)},i:J,o:J,d(n){n&&M(t),e&&e.d(),i[2](null)}}}function FA(i,t,e){let{tag:n}=t,o,s;$e(()=>{if(o){if(n.element instanceof Element){const a=n.element;o.appendChild(a),s=()=>a.remove()}else if(typeof n.element=="function"){const a=n.element;s=a(o)}}}),yt(()=>{s==null||s()});function r(a){Oe[a?"unshift":"push"](()=>{o=a,e(1,o)})}return i.$$set=a=>{"tag"in a&&e(0,n=a.tag)},[n,o,r]}class RA extends re{constructor(t){super(),se(this,t,FA,OA,oe,{tag:0},QA)}}function GA(i){ue(i,"svelte-ofx2uu",'@font-face{font-family:"TG-TYPE";font-style:normal;font-weight:400;src:local("TG-TYPE-Bold"), url(data:application/font-woff2;charset=utf-8;base64,T1RUTwAKAIAAAwAgQ0ZGINFD4CEAAAaQAAAHC0dTVUIAAQAAAAANnAAAAApPUy8yaB5pEwAAAjQAAABgY21hcEItjGUAAAT0AAABfGhlYWQS1WWOAAAAtAAAADZoaGVhBfMBxwAAAhAAAAAkaG10eJ9gBO8AAADsAAABJG1heHAASVAAAAAArAAAAAZuYW1lqczkZQAAApQAAAJecG9zdP+4ADIAAAZwAAAAIAAAUAAASQAAAAEAAAABAADkeHeyXw889QADA+gAAAAA2NoRKwAAAADY2hErACn/OAHgAyAAAQADAAIAAAAAAAAB9ABdAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACCAA7AcwAdwIIADMCCAA0AhwAMwISADkCCAAuAfQANAH+ACsB/gApAggANAEeAFABHgBQAR4AUAIIADQCCAAuAR4AUAEeAFABfAAxAAEAAAPo/zgAAAIcACkAKQHgAAEAAAAAAAAAAAAAAAAAAABJAAMCLgGQAAUACAKKAlgAAABLAooCWAAAAV4AMgEsAAAAAAgAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFVLV04AIAAg/xsDIP84AMgD6ADIAAAAAQAAAAAB9AK8AAAAIAAAAAAAEADGAAEAAAAAAAEADAAAAAEAAAAAAAIABAAMAAEAAAAAAAMAGwAQAAEAAAAAAAQAEQArAAEAAAAAAAUAPAA8AAEAAAAAAAYAEAB4AAEAAAAAAAgADAA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Y6QoB+IgfsB+6QF9wcG9y/4IgWYppGnqhr7a/sCFVBbvMjHu7zGyLxbTk5aWk4fDvtd+AojCoz7jBUmCh8kCq1vqGkeDvtdi/cS94wjCvwKBCIKDiD3ru8BvPeuA7z4EhUn967vBw4eoDf/DAmLDAv47BT4exWcEwAHAQFBXW97ipCarPcv8+7yAfdl8gP4aPf6FfIjB+r3gwUiBi77gwWHBjH3gwUkBuP7gwUnJPcxKPsxI/cx+y/y9y/3MPP7MO4GDvtdi/cSJQr3JBZkcqOzsKSksrCkcWdlcnFmHw6up6eurm+naGhvb2hop2+uHwv3EiUK9yP4ChUiCgt3SgWxBrnmBZGVj5eZGgsB2/cSAwtobm5paqBzqoYLAAABAAAAAAAAAAAAAA==) format("woff2")}*{-webkit-tap-highlight-color:transparent}.content__container.svelte-ofx2uu{position:relative;left:50%;top:50%;transform:translate(-50%, -50%);font-family:PingFangSC, Segoe UI, Rototo, sans-serif}.content__container.withAnimation.svelte-ofx2uu{transition:opacity 0.3s linear}.content__container.unClickable.svelte-ofx2uu{pointer-events:none !important}.content__container.unClickable.svelte-ofx2uu *{pointer-events:none !important}.content__wrapper.svelte-ofx2uu{pointer-events:none;width:100%;height:100%}.content__container.hide.svelte-ofx2uu{opacity:0;pointer-events:none}.content__container.hide.svelte-ofx2uu *{pointer-events:none !important}.content__container.disable.svelte-ofx2uu{display:none}.content.svelte-ofx2uu{position:relative;width:100%;height:100%;font-size:0.75rem;line-height:1.125rem;color:#fff}.content.svelte-ofx2uu:not(.unfolded){pointer-events:none}.content.svelte-ofx2uu:not(.unfolded) *{pointer-events:none !important}.content.unfolded.svelte-ofx2uu{pointer-events:auto}')}function NA(i){let t,e;return{c(){t=T("div"),b(t,"data-info","tag content is keep folded"),b(t,"data-id",e=i[1].id)},m(n,o){z(n,t,o)},p(n,o){o&2&&e!==(e=n[1].id)&&b(t,"data-id",e)},i:J,o:J,d(n){n&&M(t)}}}function WA(i){let t,e,n,o,s,r,a,l,c;const u=[ZA,JA,UA,YA,XA,_A,HA],f=[];function d(h,g){return h[1].element?0:h[1].contentType==="Text"?1:h[1].contentType==="ImageText"||h[1].contentType==="Image"||h[1].contentType==="Video"?2:h[1].contentType==="Audio"?3:h[1].contentType==="Marketing"?4:h[1].contentType==="Link"||h[1].contentType==="VRLink"||h[1].contentType==="PanoLink"||h[1].contentType==="Sticker"?5:h[1].contentType==="MediaPlane"||h[1].contentType==="MediaModel"?6:-1}return~(o=d(i))&&(s=f[o]=u[o](i)),{c(){var h;t=T("div"),e=T("div"),n=T("div"),s&&s.c(),b(n,"class","content svelte-ofx2uu"),q(n,"unfolded",(h=i[1].state)==null?void 0:h.unfolded),b(e,"class","content__wrapper svelte-ofx2uu"),b(t,"class","content__container svelte-ofx2uu"),b(t,"data-id",r=i[1].id),q(t,"disable",i[1].enabled===!1),q(t,"hide",i[4]),q(t,"withAnimation",i[0]),q(t,"unClickable",i[1].clickable===!1),L(t,"width",i[1].stickType==="Plane"||i[1].contentType==="MediaModel"?"100%":0),L(t,"height",i[1].stickType==="Plane"||i[1].contentType==="MediaModel"?"100%":0)},m(h,g){z(h,t,g),j(t,e),j(e,n),~o&&f[o].m(n,null),a=!0,l||(c=Pe(t,"click",Uo(i[13])),l=!0)},p(h,g){var p;let A=o;o=d(h),o===A?~o&&f[o].p(h,g):(s&&(ae(),D(f[A],1,1,()=>{f[A]=null}),le()),~o?(s=f[o],s?s.p(h,g):(s=f[o]=u[o](h),s.c()),C(s,1),s.m(n,null)):s=null),(!a||g&2)&&q(n,"unfolded",(p=h[1].state)==null?void 0:p.unfolded),(!a||g&2&&r!==(r=h[1].id))&&b(t,"data-id",r),(!a||g&2)&&q(t,"disable",h[1].enabled===!1),(!a||g&16)&&q(t,"hide",h[4]),(!a||g&1)&&q(t,"withAnimation",h[0]),(!a||g&2)&&q(t,"unClickable",h[1].clickable===!1),g&2&&L(t,"width",h[1].stickType==="Plane"||h[1].contentType==="MediaModel"?"100%":0),g&2&&L(t,"height",h[1].stickType==="Plane"||h[1].contentType==="MediaModel"?"100%":0)},i(h){a||(C(s),a=!0)},o(h){D(s),a=!1},d(h){h&&M(t),~o&&f[o].d(),l=!1,c()}}}function HA(i){let t,e;return t=new CA({props:{tag:Re(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Re(n[1])),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function _A(i){let t,e;return t=new VA({props:{tag:Re(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Re(n[1])),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function XA(i){let t,e;return t=new X0({props:{tag:Re(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Re(n[1])),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function YA(i){let t,e;return t=new vA({props:{tag:Re(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Re(n[1])),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function UA(i){let t,e;return t=new L0({props:{tag:Re(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Re(n[1])),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function JA(i){let t,e;return t=new Up({props:{tag:Re(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Re(n[1])),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function ZA(i){let t,e;return t=new RA({props:{tag:Re(i[1])}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Re(n[1])),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function qA(i){let t,e,n,o;const s=[WA,NA],r=[];function a(l,c){return l[3]?0:1}return t=a(i),e=r[t]=s[t](i),{c(){e.c(),n=pe()},m(l,c){r[t].m(l,c),z(l,n,c),o=!0},p(l,[c]){let u=t;t=a(l),t===u?r[t].p(l,c):(ae(),D(r[u],1,1,()=>{r[u]=null}),le(),e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),C(e,1),e.m(n.parentNode,n))},i(l){o||(C(e),o=!0)},o(l){D(e),o=!1},d(l){r[t].d(l),l&&M(n)}}}function KA(i,t,e){let n,o,s,r,a,l,{withAnimation:c=!1}=t,{tag:u}=t,{hooks:f}=t,{state:d}=t,{mediaStore:h}=t,{temporaryState:g}=t;Bi("hooks",f),Bi("mediaStore",h);let A,p;function v(P){P?f.emit("exposure",{id:r,type:"start"}):f.emit("exposure",{id:r,type:"end"})}function y(P,E,k){var S,x;return!(!E.visible||!E.enabled||!k.visible||!((S=P.state)!=null&&S.visible)||((x=P.temporaryState)==null?void 0:x.visible)===!1||We(P)&&!P.mediaVisible)}const w=P=>f.emit("click",{event:P,target:"TagContent",tag:u});return i.$$set=P=>{"withAnimation"in P&&e(0,c=P.withAnimation),"tag"in P&&e(1,u=P.tag),"hooks"in P&&e(2,f=P.hooks),"state"in P&&e(5,d=P.state),"mediaStore"in P&&e(6,h=P.mediaStore),"temporaryState"in P&&e(7,g=P.temporaryState)},i.$$.update=()=>{var P,E,k,S,x,Q,H,F,U,V,B;i.$$.dirty&2&&e(11,n=(P=u.state)==null?void 0:P.unfolded),i.$$.dirty&2&&e(10,o=(E=u.state)==null?void 0:E.visible),i.$$.dirty&162&&e(12,s=d.visible&&g.visible&&((k=u.state)==null?void 0:k.visible)),i.$$.dirty&2&&(r=u.id),i.$$.dirty&162&&e(4,a=!y(u,d,g)),i.$$.dirty&4096&&v(s),i.$$.dirty&3842&&u.hooks&&(n!==void 0&&n!==p&&(e(9,p=n),n?(x=(S=u.hooks).emit)==null||x.call(S,"unfolded"):(H=u==null?void 0:(Q=u.hooks).emit)==null||H.call(Q,"folded")),o!==void 0&&o!==A&&(e(8,A=o),o?(U=(F=u.hooks).emit)==null||U.call(F,"show"):(B=(V=u.hooks).emit)==null||B.call(V,"hide"))),i.$$.dirty&2&&e(3,l=(()=>!(typeof u.mergedConfig.unfoldedConfig=="object"&&u.mergedConfig.unfoldedConfig.keep==="folded"))())},[c,u,f,l,a,d,h,g,A,p,o,n,s,w]}class Pl extends re{constructor(t){super(),se(this,t,KA,qA,oe,{withAnimation:0,tag:1,hooks:2,state:5,mediaStore:6,temporaryState:7},GA)}}function $A(i){ue(i,"svelte-yex9rb",'@charset "UTF-8";.tag-point-click-helper.svelte-yex9rb.svelte-yex9rb{position:absolute;pointer-events:auto;cursor:pointer;width:2.5rem;height:2.5rem;left:50%;top:50%;transform:translate(-50%, -50%)}.tag-point-wrapper.svelte-yex9rb.svelte-yex9rb{pointer-events:none;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);z-index:-1}.tag-folded-point.svelte-yex9rb.svelte-yex9rb,.tag-unfolded-point.svelte-yex9rb.svelte-yex9rb{transition:all 0.5s}.tag-point-wrapper.svelte-yex9rb .tag-unfolded-point.svelte-yex9rb{display:flex;justify-content:center;align-items:center;position:absolute;width:100%;height:100%;border-radius:50%}.tag-point-wrapper.svelte-yex9rb .tag-unfolded-point.svelte-yex9rb:after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.3125rem;height:0.3125rem;border-radius:50%;background-color:white}.tag-point-wrapper.svelte-yex9rb .tag-unfolded-point.svelte-yex9rb:before{content:"";position:absolute;width:0.875rem;height:0.875rem;border-radius:50%;background-color:rgba(0, 0, 0, 0.2)}.tag-point-wrapper.folded.svelte-yex9rb .tag-folded-point.svelte-yex9rb{opacity:1;scale:1}.tag-point-wrapper.folded.svelte-yex9rb .tag-unfolded-point.svelte-yex9rb{opacity:0;scale:1}.tag-point-wrapper.unfolded.svelte-yex9rb .tag-folded-point.svelte-yex9rb{opacity:0;scale:0.2}.tag-point-wrapper.unfolded.svelte-yex9rb .tag-unfolded-point.svelte-yex9rb{opacity:1;scale:1}')}function ev(i){let t,e,n,o,s,r,a,l,c,u,f,d;return o=new nt({props:{center:!0,blurRadius:15,spreadRadius:5,opacity:.3}}),c=new yl({props:{icon:i[2],width:i[1]}}),{c(){t=T("div"),e=ne(),n=T("div"),ee(o.$$.fragment),s=ne(),r=T("div"),a=ne(),l=T("div"),ee(c.$$.fragment),b(t,"class","tag-point-click-helper svelte-yex9rb"),b(r,"class","tag-unfolded-point svelte-yex9rb"),L(r,"transition-delay",(i[3]?i[5]:0)+"ms"),b(l,"class","tag-folded-point svelte-yex9rb"),L(l,"transition-delay",(i[3]?i[5]:0)+"ms"),b(n,"class","tag-point-wrapper svelte-yex9rb"),q(n,"unfolded",i[0]),q(n,"folded",i[3]),L(n,"width",xe(i[1])),L(n,"height",xe(i[1]))},m(h,g){z(h,t,g),z(h,e,g),z(h,n,g),K(o,n,null),j(n,s),j(n,r),j(n,a),j(n,l),K(c,l,null),u=!0,f||(d=Pe(t,"click",i[4]),f=!0)},p(h,[g]){g&8&&L(r,"transition-delay",(h[3]?h[5]:0)+"ms");const A={};g&4&&(A.icon=h[2]),g&2&&(A.width=h[1]),c.$set(A),g&8&&L(l,"transition-delay",(h[3]?h[5]:0)+"ms"),(!u||g&1)&&q(n,"unfolded",h[0]),(!u||g&8)&&q(n,"folded",h[3]),g&2&&L(n,"width",xe(h[1])),g&2&&L(n,"height",xe(h[1]))},i(h){u||(C(o.$$.fragment,h),C(c.$$.fragment,h),u=!0)},o(h){D(o.$$.fragment,h),D(c.$$.fragment,h),u=!1},d(h){h&&M(t),h&&M(e),h&&M(n),$(o),$(c),f=!1,d()}}}function tv(i,t,e){let n,o,s,r;const a=St("hooks");let{tag:l}=t,c,u=!1;const f=()=>{c!==void 0&&clearTimeout(c),u=!0,c=setTimeout(()=>{u=!1},800)},d=g=>{u||a.emit("click",{event:g,target:"TagPoint",tag:l})},h=(()=>l.contentType==="Text"&&l.data.appearance==="plane"?500:800)();return i.$$set=g=>{"tag"in g&&e(6,l=g.tag)},i.$$.update=()=>{var g,A,p,v;i.$$.dirty&64&&e(0,n=(g=l.state)==null?void 0:g.unfolded),i.$$.dirty&1&&e(3,o=!n),i.$$.dirty&64&&e(2,s=(p=(A=l.style)==null?void 0:A.point)!=null&&p.url?(v=l.style)==null?void 0:v.point:{url:wp}),i.$$.dirty&64&&e(1,r=(()=>{var w,P,E;const y=(E=(P=(w=l.style)==null?void 0:w.point)==null?void 0:P.size)!=null?E:"S";return typeof y=="number"?y:y==="S"?18:y==="M"?20:y==="L"?24:y==="XL"?28:18})())},f(),[n,r,s,o,d,h,l]}class nv extends re{constructor(t){super(),se(this,t,tv,ev,oe,{tag:6},$A)}}function iv(i){ue(i,"svelte-pzwdws",".tag.withAnimation.svelte-pzwdws{transition:opacity 0.3s linear}.tag.hide.svelte-pzwdws{opacity:0;pointer-events:none}.tag.hide.svelte-pzwdws *{pointer-events:none !important}.tag.unClickable.svelte-pzwdws{pointer-events:none !important}.tag.unClickable.svelte-pzwdws *{pointer-events:none !important}.tag.disable.svelte-pzwdws{display:none}.wrapper.svelte-pzwdws{position:absolute;width:0rem;height:0rem;overflow:visible;pointer-events:auto}")}function ov(i){let t;return{c(){t=T("div"),b(t,"data-info","tag content is disable")},m(e,n){z(e,t,n)},p:J,i:J,o:J,d(e){e&&M(t)}}}function sv(i){let t,e;return t=new Pl({props:{mediaStore:i[2],withAnimation:i[0],tag:Re(i[1]),hooks:i[14],state:i[3],temporaryState:i[4]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&4&&(s.mediaStore=n[2]),o&1&&(s.withAnimation=n[0]),o&2&&(s.tag=Re(n[1])),o&8&&(s.state=n[3]),o&16&&(s.temporaryState=n[4]),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function rv(i){let t;return{c(){t=T("div"),b(t,"data-info","tag point is disable")},m(e,n){z(e,t,n)},p:J,i:J,o:J,d(e){e&&M(t)}}}function av(i){let t,e;return t=new nv({props:{tag:i[1]}}),{c(){ee(t.$$.fragment)},m(n,o){K(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=n[1]),t.$set(s)},i(n){e||(C(t.$$.fragment,n),e=!0)},o(n){D(t.$$.fragment,n),e=!1},d(n){$(t,n)}}}function lv(i){let t,e,n,o,s,r,a,l,c;const u=[sv,ov],f=[];function d(p,v){return p[12]?0:1}n=d(i),o=f[n]=u[n](i);const h=[av,rv],g=[];function A(p,v){return p[13]?0:1}return r=A(i),a=g[r]=h[r](i),{c(){t=T("div"),e=T("div"),o.c(),s=ne(),a.c(),b(e,"class","wrapper svelte-pzwdws"),b(e,"data-tag-unfolded",i[8]),b(e,"data-tag-id",i[11]),b(e,"data-content-type",l=i[1].contentType),L(e,"left",i[7]),L(e,"top",i[6]),L(e,"z-index",i[5]),b(t,"class","tag svelte-pzwdws"),b(t,"data-tag-id",i[11]),q(t,"unClickable",i[1].clickable===!1),q(t,"disable",i[10]),q(t,"hide",i[9]),q(t,"withAnimation",i[0])},m(p,v){z(p,t,v),j(t,e),f[n].m(e,null),j(e,s),g[r].m(e,null),c=!0},p(p,[v]){let y=n;n=d(p),n===y?f[n].p(p,v):(ae(),D(f[y],1,1,()=>{f[y]=null}),le(),o=f[n],o?o.p(p,v):(o=f[n]=u[n](p),o.c()),C(o,1),o.m(e,s));let w=r;r=A(p),r===w?g[r].p(p,v):(ae(),D(g[w],1,1,()=>{g[w]=null}),le(),a=g[r],a?a.p(p,v):(a=g[r]=h[r](p),a.c()),C(a,1),a.m(e,null)),(!c||v&256)&&b(e,"data-tag-unfolded",p[8]),(!c||v&2048)&&b(e,"data-tag-id",p[11]),(!c||v&2&&l!==(l=p[1].contentType))&&b(e,"data-content-type",l),v&128&&L(e,"left",p[7]),v&64&&L(e,"top",p[6]),v&32&&L(e,"z-index",p[5]),(!c||v&2048)&&b(t,"data-tag-id",p[11]),(!c||v&2)&&q(t,"unClickable",p[1].clickable===!1),(!c||v&1024)&&q(t,"disable",p[10]),(!c||v&512)&&q(t,"hide",p[9]),(!c||v&1)&&q(t,"withAnimation",p[0])},i(p){c||(C(o),C(a),c=!0)},o(p){D(o),D(a),c=!1},d(p){p&&M(t),f[n].d(),g[r].d()}}}function cv(i,t,e){let n,o,s,r,a,l,c,u,f,{withAnimation:d=!1}=t,{tag:h}=t,{mediaStore:g}=t,{state:A}=t,{temporaryState:p}=t;const v=St("hooks");return i.$$set=y=>{"withAnimation"in y&&e(0,d=y.withAnimation),"tag"in y&&e(1,h=y.tag),"mediaStore"in y&&e(2,g=y.mediaStore),"state"in y&&e(3,A=y.state),"temporaryState"in y&&e(4,p=y.temporaryState)},i.$$.update=()=>{var y,w,P,E,k,S,x,Q;i.$$.dirty&2&&e(13,n=(()=>!(h.contentType==="Sticker"||h.contentType==="Link"||h.contentType==="VRLink"||h.contentType==="PanoLink"||h.contentType==="Audio"&&h.data.appearance==="plane"))()),i.$$.dirty&2&&e(12,o=(()=>h.stickType==="2DPoint")()),i.$$.dirty&2&&e(11,s=h.id),i.$$.dirty&2&&e(10,r=!((y=h.pointTagStyle)!=null&&y.leftPercent)||!((w=h.pointTagStyle)!=null&&w.topPercent)||h.enabled===!1||!h.state),i.$$.dirty&2&&e(9,a=!((P=h.state)!=null&&P.visible)||((E=h.temporaryState)==null?void 0:E.visible)===!1),i.$$.dirty&2&&e(8,l=(k=h.state)==null?void 0:k.unfolded),i.$$.dirty&2&&e(7,c=((S=h.pointTagStyle)==null?void 0:S.leftPercent)+"%"),i.$$.dirty&2&&e(6,u=((x=h.pointTagStyle)==null?void 0:x.topPercent)+"%"),i.$$.dirty&2&&e(5,f=(Q=h.state)!=null&&Q.unfolded?1:0)},[d,h,g,A,p,f,u,c,l,a,r,s,o,n,v]}class uv extends re{constructor(t){super(),se(this,t,cv,lv,oe,{withAnimation:0,tag:1,mediaStore:2,state:3,temporaryState:4},iv)}}function dv(i){ue(i,"svelte-uq11d5",".tag--container.svelte-uq11d5{box-sizing:border-box;position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;opacity:1;-webkit-user-select:none;-moz-user-select:none;user-select:none;transform:translate3d(0, 0, 0)}.withAnimation.svelte-uq11d5{transition:opacity 0.3s linear}.tag--container.hide.svelte-uq11d5{opacity:0;pointer-events:none}.tag--container.hide.svelte-uq11d5 *{pointer-events:none !important}")}function Il(i,t,e){const n=i.slice();return n[6]=t[e],n}function El(i){let t,e=[],n=new Map,o,s=i[1];const r=a=>a[6].id;for(let a=0;a<s.length;a+=1){let l=Il(i,s,a),c=r(l);n.set(c,e[a]=kl(c,l))}return{c(){t=T("div");for(let a=0;a<e.length;a+=1)e[a].c();b(t,"class","tag--container svelte-uq11d5"),q(t,"hide",!i[3].visible||!i[4].visible),q(t,"withAnimation",i[0])},m(a,l){z(a,t,l);for(let c=0;c<e.length;c+=1)e[c].m(t,null);o=!0},p(a,l){l&31&&(s=a[1],ae(),e=Ue(e,l,r,1,a,s,n,t,Ct,kl,null,Il),le()),(!o||l&24)&&q(t,"hide",!a[3].visible||!a[4].visible),(!o||l&1)&&q(t,"withAnimation",a[0])},i(a){if(!o){for(let l=0;l<s.length;l+=1)C(e[l]);o=!0}},o(a){for(let l=0;l<e.length;l+=1)D(e[l]);o=!1},d(a){a&&M(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}function kl(i,t){let e,n,o;return n=new uv({props:{state:t[3],temporaryState:t[4],withAnimation:t[0],tag:t[6],mediaStore:t[2]}}),{key:i,first:null,c(){e=pe(),ee(n.$$.fragment),this.first=e},m(s,r){z(s,e,r),K(n,s,r),o=!0},p(s,r){t=s;const a={};r&8&&(a.state=t[3]),r&16&&(a.temporaryState=t[4]),r&1&&(a.withAnimation=t[0]),r&2&&(a.tag=t[6]),r&4&&(a.mediaStore=t[2]),n.$set(a)},i(s){o||(C(n.$$.fragment,s),o=!0)},o(s){D(n.$$.fragment,s),o=!1},d(s){s&&M(e),$(n,s)}}}function fv(i){let t,e,n=i[3].enabled&&El(i);return{c(){n&&n.c(),t=pe()},m(o,s){n&&n.m(o,s),z(o,t,s),e=!0},p(o,[s]){o[3].enabled?n?(n.p(o,s),s&8&&C(n,1)):(n=El(o),n.c(),C(n,1),n.m(t.parentNode,t)):n&&(ae(),D(n,1,1,()=>{n=null}),le())},i(o){e||(C(n),e=!0)},o(o){D(n),e=!1},d(o){n&&n.d(o),o&&M(t)}}}function hv(i,t,e){let{withAnimation:n=!1}=t,{tags:o=[]}=t,{hooks:s}=t,{mediaStore:r}=t,{state:a}=t,{temporaryState:l}=t;return Bi("hooks",s),i.$$set=c=>{"withAnimation"in c&&e(0,n=c.withAnimation),"tags"in c&&e(1,o=c.tags),"hooks"in c&&e(5,s=c.hooks),"mediaStore"in c&&e(2,r=c.mediaStore),"state"in c&&e(3,a=c.state),"temporaryState"in c&&e(4,l=c.temporaryState)},[n,o,r,a,l,s]}class mv extends re{constructor(t){super(),se(this,t,hv,fv,oe,{withAnimation:0,tags:1,hooks:5,mediaStore:2,state:3,temporaryState:4},dv)}}const pv={globalConfig:{unfoldedConfig:{autoUnfold:{strategy:"MinimumDistance",distance:{max:5}}},tag3DConfig:{ratio:.0035}},contentTypeConfig:{"Any-Audio-plane":{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},Link:{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},VRLink:{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},PanoLink:{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},MediaPlane:{unfoldedConfig:{keep:"unfolded"},visibleConfig:{alwaysShowWhenMovePano:!0}},MediaModel:{unfoldedConfig:{keep:"unfolded"},visibleConfig:{keep:"visible",visibleFiveMode:["Panorama","Floorplan","Model","Mapview"],alwaysShowWhenMovePano:!0}}}};class gv extends ti{constructor(e){super(e);m(this,"tagCacheByPanoIndex",{})}getCache({panoIndex:e,id:n,key:o}){var c,u,f,d;const{five:s}=this,r=(c=s.panoIndex)!=null?c:e;if(r===void 0)throw new Error(`TagCacheController getCache(): fivePanoIndex is ${r}`);const a=`${(f=(u=s.work)==null?void 0:u.workCode)!=null?f:s.model.uuid}-${r}`;let l=this.tagCacheByPanoIndex[a];if(l||(l=new Map,this.tagCacheByPanoIndex[a]=l),n===void 0)return l;if(o===void 0){const h=l.get(n);return h||(l.set(n,{}),l.get(n))}return(d=l.get(n))==null?void 0:d[o]}clearCache(){this.tagCacheByPanoIndex={}}removeCache(){}}class Av extends gv{constructor(e){super(e);m(this,"tags",[]);m(this,"config",pv);m(this,"raycaster",new I.Raycaster)}get isPanorama(){return this.five.currentMode==="Panorama"}getTagById(e){const n=this.tags.find(o=>o.id===e);if(!n){console.warn(`error: can not find tag id ${e} by getTagById()`);return}return n}changeContentTypeConfig(e,n,o=!0){this.config.contentTypeConfig||(this.config.contentTypeConfig={}),o?this.config.contentTypeConfig[e]=pt.default({},this.config.contentTypeConfig[e],n):this.config.contentTypeConfig[e]=n,this.clearCache()}getVisibleByPanoIndex(e,n){var r;const o=this.getCache({panoIndex:n,id:e.id}),s=(r=this.five.panoIndex)!=null?r:n;if(We(e))return!0;if(o.visible!==void 0)return o.visible;{const a=(()=>{var u,f,d;const l=(u=this.getTagConfig(e).visibleConfig)!=null?u:{},c=this.getDistance(e);if(typeof l=="function")return{value:l(this.five,{tag:e,distance:c}),reason:"config function result"};if(l.keep==="hidden")return{value:!1,reason:"config.keep is hidden"};if(l.keep==="visible")return{value:!0,reason:"config.keep is visible"};if(l.visiblePanoIndex!==void 0&&l.visiblePanoIndex!=="all"&&s!==void 0){if(Array.isArray(l.visiblePanoIndex)&&!l.visiblePanoIndex.includes(s))return{value:!1,reason:`current panoIndex is not included in visiblePano. currentPanoIndex: ${s}, visiblePanoIndex: ${l.visiblePanoIndex}`};if(l.visiblePanoIndex==="current"&&s!==((f=e.fiveState)==null?void 0:f.panoIndex))return{value:!1,reason:`current panoIndex is not equal to tag.panoIndex. currentPanoIndex: ${s}, tag.panoIndex: ${(d=e.fiveState)==null?void 0:d.panoIndex}`}}if(l.visibleDistance!==void 0&&l.visibleDistance!=="unLimited"&&In(c,l.visibleDistance)===!1)return{value:!1,reason:`distance is not in visibleDistance. distance: ${c}, visibleDistance: ${l.visibleDistance}`};if(l.intersectRaycaster!==!1&&(typeof l.intersectRaycaster!="object"||l.intersectRaycaster.enabled!==!1)){if(s===void 0)return{value:!1,reason:`intersectRaycaster check failed: fivePanoIndex is ${s}`};const h=this.getRaycasterFromPanoIndex(e,s),g=this.getTagEnableByIntersect(e,h);if(g.value===!1)return g}if(l.angleRange&&ap(e)){const h=this.getAngle(e);if(In(h,l.angleRange)===!1)return{value:!1,reason:`angle is not in angleRange. angle: ${h}, angleRange: ${l.angleRange}`}}return{value:!0,reason:"all check passed"}})();return o.visible=a.value,o.__debug_visible_reason__=a,o.visible}}getVisibleByFiveMode(e,n){var r;const o=(r=this.getTagConfig(e).visibleConfig)!=null?r:{};if(typeof o=="function")return n==="Panorama";const s=o==null?void 0:o.visibleFiveMode;return s?s.includes(n):n==="Panorama"}getVisibleByFloorIndex(e){var a;const n=e.fiveState;if(!n)return!0;const o=n.panoIndex,s=(a=this.five.work.observers[o])==null?void 0:a.floorIndex,r=this.five.model.shownFloor;return r===null||r===s}getVisible(e){const n=this.five.getCurrentState(),o=this.getVisibleByFiveMode(e,n.mode),s=We(e)?this.getVisibleByFloorIndex(e):!0,r=n.mode==="Panorama"?this.getVisibleByPanoIndex(e,n.panoIndex):!0;return o&&r&&s}getModelMedialVisibleByPanoIndex(e){const n=this.five.getCurrentState().panoIndex,o=this.getCache({panoIndex:n,id:e.id});if(o.modelMedialVisible!==void 0)return o.modelMedialVisible;const s=this.getRaycasterFromPanoIndex(e,n),r=this.getTagEnableByIntersect(e,s);return o.modelMedialVisible=r.value,o.__debug_visible_reason__=r,r.value!==!1}getUnfoldedByPanoIndex(e,n){if(!this.getVisibleByPanoIndex(e))return;const s=this.getCache({panoIndex:n,id:e.id});if(s.unfolded!==void 0)return s.unfolded;{const r=this.getTagConfig(e).unfoldedConfig;if(!r)return;const a=(()=>{const c=this.getDistance(e);if(typeof r=="function")return r(this.five,{tag:e,distance:c});if(r.keep==="folded")return!1;if(r.keep==="unfolded")return!0;if(r.unfoldDistance&&In(c,r.unfoldDistance)===!1)return!1})();s.unfolded=a;const l=this.getUnfoldedByCamera(e);return l!==void 0?l:s.unfolded}}getUnfoldedByCamera(e){return this.getVisibleByPanoIndex(e)?(()=>{var a;const s=this.getDistance(e),r=this.getTagConfig(e).unfoldedConfig;if(!!r){if(typeof r=="function")return r(this.five,{tag:e,distance:s});if(r.keep==="folded")return!1;if(r.keep==="unfolded")return!0;if(r.autoUnfold===void 0||r.autoUnfold===!1||r.autoUnfold.enable===!1)return;if(r.autoUnfold.strategy==="ScreenPostion"){const l=this.getTagProject(e);if(l&&In(l.x,r.autoUnfold.autoUnfoldProjectX)===!1)return!1}if(r.autoUnfold.strategy==="MinimumDistance"){const u=this.filterPointTag().filter(d=>this.getVisibleByPanoIndex(d)).filter(d=>{const h=this.getTagProject(d);if(!h)return!1;const{x:g,y:A,z:p}=h;return!(Math.abs(p)>1||Math.abs(g)>1||Math.abs(A)>1)}).map(d=>({tag:d,id:d.id,tagConfig:this.getTagConfig(d).unfoldedConfig})).filter(({tag:d,tagConfig:h})=>{var g,A;return!(typeof h!="object"||h.keep||h.autoUnfold===!1||((g=h.autoUnfold)==null?void 0:g.enable)===!1||((A=h.autoUnfold)==null?void 0:A.strategy)!=="MinimumDistance")}).map(d=>Ae(G({},d),{distance:this.getDistance(d.tag)})).filter(({distance:d,tagConfig:h})=>{var g,A;return!(d===void 0||typeof h!="object"||h.autoUnfold===!1||((g=h.autoUnfold)==null?void 0:g.enable)===!1||((A=h.autoUnfold)==null?void 0:A.strategy)!=="MinimumDistance"||h.autoUnfold.distance&&In(d,h.autoUnfold.distance)===!1)}).sort((d,h)=>d.distance-h.distance).findIndex(d=>d.id===e.id);if(u===-1||u<=((a=r.autoUnfold.maxNumber)!=null?a:1)-1===!1)return!1}return!0}})():void 0}getDistance(e,n){var r,a,l;const o=(r=this.five.panoIndex)!=null?r:n;if(o===void 0)throw new Error(`getDistance(): fivePanoIndex is ${o}`);const s=this.getCache({panoIndex:n,id:e.id});if(s.distance!==void 0)return s.distance;{const c=(l=(a=this.five.work)==null?void 0:a.observers[o])==null?void 0:l.position;if(c===void 0)throw new Error(`getDistance(): observerPosition is ${c}`);const u=ia(e),f=c.distanceTo(u);return s.distance=f,f}}getAngle(e,n){var r,a,l;const o=(r=this.five.panoIndex)!=null?r:n;if(o===void 0)throw new Error(`getDistance(): fivePanoIndex is ${o}`);const s=this.getCache({panoIndex:n,id:e.id});if(s.angle!==void 0)return s.angle;{const c=(l=(a=this.five.work)==null?void 0:a.observers[o])==null?void 0:l.position;if(c===void 0)throw new Error(`getAngleRange(): observerPosition is ${c}`);const u=(()=>e.stickType==="3DPoint"?pn(e.normal):ao(e.position))();if(!u)return;const f=new I.Vector3().copy(c).sub(lo(e.position)),d=u.angleTo(f)*180/Math.PI;return s.angle=d,s.angle}}getTagConfig(e){var s,r;if(!e)return(s=this.config.globalConfig)!=null?s:{};const n={};this.config.contentTypeConfig&&Object.keys(this.config.contentTypeConfig).forEach(a=>{const l=a;if(n[l])return;const c=l.split("-");if(c.length===1){const[u]=c;e.contentType===u&&(n[l]=this.config.contentTypeConfig[l])}if(c.length===2){const[u="Any",f="Any"]=c;(e.stickType===u||u==="Any")&&(e.contentType===f||f==="Any")&&(n[l]=this.config.contentTypeConfig[l])}if(c.length===3){const[u="Any",f,d]=c;if(f==="Audio"&&e.contentType==="Audio"){const h=e;(h.stickType===u||u==="Any")&&h.data.appearance===d&&(n[l]=this.config.contentTypeConfig[l])}}});const o=pt.default({},this.config.globalConfig,...Object.values(n),e.config);return typeof o.unfoldedConfig=="object"&&(o.unfoldedConfig.disableFold&&(o.unfoldedConfig={keep:"unfolded"}),o.unfoldedConfig.disableUnfold&&(o.unfoldedConfig={keep:"folded"}),o.unfoldedConfig.keep&&(o.unfoldedConfig={keep:o.unfoldedConfig.keep})),typeof o.visibleConfig=="object"&&o.visibleConfig.keep&&(o.visibleConfig={keep:o.visibleConfig.keep,visibleFiveMode:(r=o.visibleConfig)==null?void 0:r.visibleFiveMode}),o}can(e,n){const o=this.getTagConfig(n);if(!o||typeof o!="object")return!0;if(e==="show"||e==="hide"){if(!o.visibleConfig||typeof o.visibleConfig!="object")return!0;if(e==="show"&&o.visibleConfig.keep==="hidden"||e==="hide"&&(o.visibleConfig.keep==="visible"||o.visibleConfig.alwaysShowWhenMovePano))return!1}if(e==="fold"||e==="unfold"){if(!o.unfoldedConfig||typeof o.unfoldedConfig!="object")return!0;if(e==="fold"&&o.unfoldedConfig.keep==="unfolded"||e==="unfold"&&o.unfoldedConfig.keep==="folded")return!1}return!0}sort(e){return e.sort((n,o)=>{const s=this.getDistance(n),r=this.getDistance(o);return s===void 0||r===void 0?0:r-s})}setPointTagPosition(){const e=this.filterPointTag();e.length!==0&&e.forEach(n=>{var s;if(!((s=n.state)!=null&&s.visible)){n.pointTagStyle=null;return}const o=this.getTagProject(n);if(!o){n.pointTagStyle=null;return}n.pointTagStyle={leftPercent:(o.x+1)/2*100,topPercent:(-o.y+1)/2*100}})}setVisibleByPanoIndex(){this.tags.forEach(e=>{const n=this.getVisibleByPanoIndex(e);e.state&&(e.state.visible=n)})}setModelMedialVisible(){const e=this.five.getCurrentState().mode;this.tags.forEach(n=>{var s;if(!We(n))return;if(!((s=n.model)!=null&&s.object)){n.mediaVisible=!1;return}const o=e==="Panorama"?this.getModelMedialVisibleByPanoIndex(n):!0;n.mediaVisible=o})}setUnfoldedByPanoIndex(){this.tags.forEach(e=>{const n=this.getUnfoldedByPanoIndex(e);if(!!e.state&&(n!==void 0&&(e.state.unfolded=n),n&&!e.state.visible)){const o=this.getTagConfig(e);typeof o.unfoldedConfig=="object"&&o.unfoldedConfig.autoUnfoldWhenHide!==!1&&(e.state.unfolded=!1)}})}getTagProject(e){if(!this.getVisibleByPanoIndex(e))return;const o=lo(e.position),{x:s,y:r,z:a}=o.project(this.five.camera);if(!(a>1))return{x:s,y:r,z:a}}filterPointTag(){return this.tags.filter(e=>e.stickType==="2DPoint"||e.stickType==="3DPoint")}filter2DPointTag(){return this.tags.filter(e=>e.stickType==="2DPoint")}filter3DPointTag(){return this.tags.filter(e=>e.stickType==="3DPoint")}filterModelTag(){return this.tags.filter(e=>e.stickType==="Model")}filter3DTag(){return this.tags.filter(e=>e.stickType==="3DPoint"||e.stickType==="Plane")}filterPlaneTag(){return this.tags.filter(e=>e.stickType==="Plane")}updateTagConfig(e){e!=null&&e.force&&this.clearCache(),this.tags.forEach(n=>{const o=this.getTagConfig(n);n.mergedConfig=o})}getTagEnableByIntersect(e,n){var u,f,d;const o=(u=this.getTagConfig(e).visibleConfig)!=null?u:{},s=this.getDistance(e),[r]=this.five.model.intersectRaycaster(n),a=(()=>{if(!We(e))return;const h=this.tags.filter(We).map(A=>{var p;return(p=A.model)==null?void 0:p.object}).filter(Ze);return n.intersectObjects(h,!0)[0]})(),l=(()=>{var h;return typeof o=="object"&&typeof o.intersectRaycaster=="object"&&(h=o.intersectRaycaster.distanceAccuracy)!=null?h:.01})();return Math.min((f=r==null?void 0:r.distance)!=null?f:1/0,(d=a==null?void 0:a.distance)!=null?d:1/0)+l<s?{value:!1,reason:`intersectRaycaster check failed: distance is ${s}, intersection.point is ${r==null?void 0:r.point.toArray()},
|
|
562
562
|
customModelIntersection.point is ${a==null?void 0:a.point.toArray()} distanceError is ${l}`}:{value:!0,reason:""}}getRaycasterFromPanoIndex(e,n){var r;const o=(r=this.five.work.observers[n])==null?void 0:r.position;if(o===void 0)throw new Error(`getVisible(): observerPosition is ${o}`);const s=ia(e).sub(o).normalize();return this.raycaster.set(o,s),this.raycaster}}function vv(i){var t,e,n,o;if(!i.stickType){const s=(()=>i.pointType==="PointTag"&&i.dimensionType==="3D"?"3DPoint":i.pointType==="PlaneTag"?"Plane":"2DPoint")();i.stickType=s}if(i.contentType==="VRLink"||i.contentType==="PanoLink"||i.contentType==="Link"){const s=i;!((e=(t=s.data)==null?void 0:t.icon)!=null&&e.url)&&!((o=(n=s.style)==null?void 0:n.point)!=null&&o.url)&&(s.data.icon={url:"//vrlab-static.ljcdn.com/release/web/test.09dee741.png",steps:28})}return i}const bv=new Ol.GLTFLoader;function yv(i){return new Promise((t,e)=>{function n(s){t(s)}function o(s){e(s)}bv.load(i,n,void 0,o)})}const xl="2.0.10",vo=`DnalogelPlugin-PanoTagPlugin@${xl}`,wv=!1,Cv=i=>`${vo}--${i}`;class Dl extends Av{constructor(e,n){super(e);m(this,"version",xl);m(this,"state",{enabled:!0,visible:!0});m(this,"params");m(this,"debug");m(this,"css3DRenderPlugin");m(this,"TagContainerSvelte");m(this,"temporaryState",{visible:!0});m(this,"mediaStore",Gi({currentMediaElement:null}));m(this,"group",new O.Group);m(this,"gltfObjectGroup",new O.Group);m(this,"isIOSWX",navigator.userAgent.toLowerCase().indexOf("micromessenger")!==-1&&navigator.userAgent.toLowerCase().indexOf("iphone")!==-1);m(this,"store",{disposers:[],disposed:!1,resizeObserverDisposerAdding:!1,css3DRenderDisposer:new Map});m(this,"enabledModelTagSet",new Set);m(this,"changeTagModel",(e,n)=>W(this,null,function*(){e.data=pt.default({},e.data,n),yield this.loadModel(e),this.updateRenderAllTags()}));m(this,"disposedErrorLog",()=>{console.error(`${vo} is disposed`)});m(this,"handleFiveInitAnimationEnded",()=>{const e=this.five.getCurrentState().mode;this.tags.forEach(n=>{We(n)&&e==="Panorama"&&this.changeTagMode(n,"front"),n.state.visible=this.getVisible(n)}),this.updateRenderAllTags(),this.updateRenderAllTags()});m(this,"handleFiveModelShownFloorChange",()=>{this.tags.forEach(e=>{!We(e)||(e.state.visible=this.getVisible(e))}),this.updateRenderAllTags()});m(this,"loadModel",e=>W(this,null,function*(){var l;const n=e.data.modelUrl;if(!n)return;const o=yv(n).then(c=>Object.assign(c.scene,{customID:e.id,isTagModel:!0}));e.model={promise:o};const s=yield o;if(((l=e.model)==null?void 0:l.promise)!==o||(e.model.object=s,!this.tags.includes(e)))return;s.visible=e.state.visible,new O.Matrix4().fromArray(e.matrix).decompose(s.position,s.quaternion,s.scale),s.updateWorldMatrix(!0,!0),this.getVisibleByFloorIndex(e)||(s.visible=!1);const a=this.gltfObjectGroup.children.find(c=>c.customID===e.id);return a&&this.gltfObjectGroup.remove(a),this.gltfObjectGroup.add(s),this.updateTagCss3DObjectMatrix(e,s),s}));this.group.name="PanoTagPluginModelGroup",this.gltfObjectGroup.name="PanoTagPluginGLTFObjectGroup",this.group.add(this.gltfObjectGroup),this.params=G({debug:!1,config:this.config},n),this.debug=this.params.debug,this.config=this.params.config,cl(1,{namespace:yi.GetAudioDuration}),cl(1,{namespace:yi.PlayAudio}),Object.assign(window,{[`__PANOTAGPLUGIN_DEBUG_${Date.now()}__`]:this}),Object.assign(window,{__PANOTAGPLUGIN_DEBUG__:this}),this.state.enabled&&this.five.scene.add(this.group)}load(e,n){return W(this,null,function*(){var s,r;this.clearTags(),console.info(vo," load:",{data:JSON.parse(JSON.stringify(e))}),this.config=pt.default({},this.config,{globalConfig:(s=e.globalConfig)!=null?s:{},contentTypeConfig:(r=e.contentTypeConfig)!=null?r:{}});const o=yield this.addTag(e.tagList,n);if(this.debug)try{sp(this.five,this.tags)}catch(a){console.error(a)}return o})}addTag(e,n){return W(this,null,function*(){const s=(Array.isArray(e)?e:[e]).map(r=>{const a=this.getTagConfig(r);return Ae(G({},r),{state:G({visible:void 0,unfolded:wv},a.initialState),hooks:new he.Subscribe,clickable:a.clickable,mergedConfig:a})}).filter(r=>r.position);return s.forEach(vv),this.tags.push(...s),lp(this.five).then(()=>{var r,a,l;return this.store.eventListenerDisposer&&((a=(r=this.store).eventListenerDisposer)==null||a.call(r)),this.state.enabled&&(this.store.eventListenerDisposer=this.addEventListener()),this.addResizeListener(),this.checkPanelTag(),this.setVisibleAndUnfolded({withAnimation:(l=n==null?void 0:n.withAnimation)!=null?l:!0}).then(()=>this.updateRenderAllTags()),this.updateRenderAllTags(),this.addMediaModelTag(s)})})}changeConfig(e,n=!0){n?this.config=pt.default({},this.config,e):this.config=e,this.updateTagConfig({force:!0}),this.updateRenderAllTags()}changeGlobalConfig(e,n=!0){n?this.config.globalConfig=pt.default({},this.config.globalConfig,e):this.config.globalConfig=e,this.updateTagConfig({force:!0}),this.updateRenderAllTags()}clearTags(){this.tags=[],this.enabledModelTagSet.clear(),this.clearCache(),this.disposeAllCSS3DContainer(),this.updateRenderAllTags()}show(e){return W(this,null,function*(){const{userAction:n=!0,withAnimation:o=!1}=e!=null?e:{};if(this.store.disposed)return this.disposedErrorLog();this.setState({visible:!0},{userAction:n,visibleWithAnimation:o}),this.hooks.emit("show",{userAction:n,withAnimation:o})})}hide(e){return W(this,null,function*(){const{userAction:n=!0,withAnimation:o=!1}=e!=null?e:{};if(this.store.disposed)return this.disposedErrorLog();this.setState({visible:!1},{userAction:n,visibleWithAnimation:o}),this.hooks.emit("hide",{userAction:n,withAnimation:o})})}enable(e){const{userAction:n=!0}=e!=null?e:{};if(this.store.disposed)return this.disposedErrorLog();this.five.scene.children.includes(this.group)||this.five.scene.add(this.group),this.setState({enabled:!0},{userAction:n}),this.hooks.emit("enable",{userAction:n}),this.five.needsRender=!0}disable(e){const{userAction:n=!0}=e!=null?e:{};if(this.store.disposed)return this.disposedErrorLog();this.setState({enabled:!1},{userAction:n}),this.five.scene.remove(this.group),this.hooks.emit("disable",{userAction:n}),this.five.needsRender=!0}dispose(){var e,n,o,s,r,a;this.pauseCurrentMedia(),this.disposeAllCSS3DContainer(),(e=this.TagContainerSvelte)==null||e.$destroy(),this.filter3DTag().forEach(l=>{var c;return(c=l.tag3DContentSvelte)==null?void 0:c.svelteApp.$destroy()}),this.tags=[],(n=this.store.disposers)==null||n.forEach(l=>l==null?void 0:l()),this.store.disposers=[],this.store.disposed=!0,(s=(o=this.store).eventListenerDisposer)==null||s.call(o),this.store.eventListenerDisposer=void 0,(a=(r=this.store).resizeObserverDisposer)==null||a.call(r),this.store.resizeObserverDisposer=void 0,this.store.resizeObserverDisposerAdding=!1,this.five.scene.remove(this.group),this.group.remove(...this.group.children),this.gltfObjectGroup.remove(...this.gltfObjectGroup.children),this.clearCache(),this.five.needsRender=!0,this.hooks.emit("dispose")}setState(e,n){if(this.store.disposed)return this.disposedErrorLog();const{userAction:o=!0,visibleWithAnimation:s=!1}=n,r=G({},this.state);this.state=Object.assign(this.state,e),this.store.visibleWithAnimation=s,r.visible!==this.state.visible&&(e.visible?this.handleShow():this.handleHide()),r.enabled!==this.state.enabled&&(e.enabled?this.handleEnable():this.handleDisable()),this.hooks.emit("stateChange",{state:this.state,prevState:r,userAction:o})}changeUnfoldedById(e,n){var r;const o=this.getTagById(e);if(!o)return;o.state.unfolded=n;const s=this.filterPointTag();(r=this.TagContainerSvelte)==null||r.$set({tags:s})}changeTagNormalById(e,n){const o=this.getTagById(e);!o||!o.tag3DContentSvelte||(o.tag3DContentSvelte.currentNormal=lt(n),this.updateRenderPlaneTag())}changeDataById(e,n,o=!0){const s=this.getTagById(e);!s||(o?s.data=pt.default({},s.data,n):s.data=G(G({},s.data),n),this.checkPanelTag(),this.updateRenderAllTags())}changeStickTypeById(e,n,o=!0){this.changeTagById(e,n,o)}changeTagById(e,n,o=!0){const s=this.getTagById(e);!n||(o?pt.default(s,n):Object.assign(s,n),(s==null?void 0:s.tag3DContentSvelte)&&(n==null?void 0:n.normal)&&(s.tag3DContentSvelte.currentNormal=lt(n.normal)),this.updateRenderAllTags(),this.checkPanelTag())}destroyTagById(e){(Array.isArray(e)?e:[e]).forEach(o=>{const s=this.tags.findIndex(r=>r.id===o);s!==-1&&this.tags.splice(s,1)}),this.updateRenderAllTags()}pauseCurrentMedia(){this.mediaStore.set({currentMediaElement:null})}updateTagCss3DObjectMatrix(e,n){var A,p,v,y;const o=(v=(p=(A=e.mergedConfig)==null?void 0:A.tag3DConfig)==null?void 0:p.ratio)!=null?v:.00216,s=(y=e.tag3DContentSvelte)==null?void 0:y.domContainer.css3DObject;if(!s)return;const r=We(e)?e.data.mediaPosition:e.position;n.updateWorldMatrix(!1,!1);const a=n.matrixWorld,l=new O.Vector3().fromArray(r[0]),c=new O.Vector3().fromArray(r[2]),u=new O.Vector3().lerpVectors(l,c,.5).add(new O.Vector3(0,0,5e-4)),f=new O.Matrix4().setPosition(u),d=new O.Matrix4().makeScale(o,o,o),h=new O.Matrix4().multiply(a).multiply(f).multiply(d);h.decompose(s.position,s.quaternion,s.scale);const g=s.opacityMesh;!g||h.decompose(g.position,g.quaternion,g.scale)}updateTagCss3DObjectVisible(e){var s,r,a,l,c;const n=(s=e.tag3DContentSvelte)==null?void 0:s.domContainer.css3DObject;if(!n)return;n.visible=(a=(r=e.state)==null?void 0:r.visible)!=null?a:!0;const o=n.opacityMesh;!o||(o.visible=(c=(l=e.state)==null?void 0:l.visible)!=null?c:!0)}setVisibleAndUnfolded(){return W(this,arguments,function*({withAnimation:e}={withAnimation:!1}){if(!!this.isPanorama)return this.setVisibleByPanoIndex(),e?new Promise((n,o)=>{setTimeout(()=>{this.setUnfoldedByPanoIndex(),n()},10)}):(this.setUnfoldedByPanoIndex(),Promise.resolve())})}handleShow(){this.state.visible=!0,this.updateTagContainerVisible()}handleHide(){this.pauseCurrentMedia(),this.state.visible=!1,this.updateTagContainerVisible()}handleEnable(){this.state.enabled=!0,this.store.eventListenerDisposer=this.addEventListener(),this.updateRenderAllTags()}handleDisable(){var e,n,o;this.pauseCurrentMedia(),this.state.enabled=!1,(n=(e=this.store).eventListenerDisposer)==null||n.call(e),(o=this.TagContainerSvelte)==null||o.$set({tags:[]}),this.filter3DTag().forEach(s=>{var r;(r=s.tag3DContentSvelte)==null||r.svelteApp.$destroy(),s.tag3DContentSvelte=void 0})}addEventListener(){const{five:e,hooks:n}=this,o=this.handleFiveWantsMoveToPano.bind(this),s=this.handleFiveModeChange.bind(this),r=this.handleFiveCameraUpdate.bind(this),a=this.handleFiveCameraUpdateDebounce(),l=this.handleFivePanoArrived.bind(this),c=this.loadVideoFirstFrame.bind(this),u=this.clickhandler.bind(this),f=this.five.currentMode;return this.handleFiveModeChange(f),this.handleFivePanoArrived(),e.on("wantsMoveToPano",o),e.on("modeChange",s),e.on("initAnimationEnded",this.handleFiveInitAnimationEnded),e.on("modelShownFloorChange",this.handleFiveModelShownFloorChange),e.on("cameraUpdate",r),e.on("cameraUpdate",a),e.on("panoArrived",l),e.on("panoArrived",c),n.on("click",u),()=>{e.off("wantsMoveToPano",o),e.off("modeChange",s),e.off("initAnimationEnded",this.handleFiveInitAnimationEnded),e.off("modelShownFloorChange",this.handleFiveModelShownFloorChange),e.off("cameraUpdate",r),e.off("cameraUpdate",a),e.off("panoArrived",l),e.off("panoArrived",c),n.off("click",u),this.store.eventListenerDisposer=void 0}}loadVideoFirstFrame(){this.isIOSWX&&this.hooks.emit("loadVideoFirstFrame")}addResizeListener(){if(!this.store.resizeObserverDisposer&&!this.store.resizeObserverDisposerAdding){const e=this.addResizeObserver();this.store.resizeObserverDisposerAdding=!0,setTimeout(()=>{this.store.resizeObserverDisposer=e,this.store.resizeObserverDisposerAdding=!1},200)}}addResizeObserver(){if(!this.store.disposed)return;const e=this.five.getElement(),n=()=>{!this.state.enabled||(this.show(),this.updateRenderAllTags())},o=()=>{!this.state.enabled||this.hide()},{observe:s,unobserve:r}=sa(up(()=>{!this.store.resizeObserverDisposer||o()},500),e),{observe:a,unobserve:l}=sa(oa(()=>n(),400),e);return s(),a(),()=>{r(),l()}}handleFiveModeChange(e){this.setModelMedialVisible(),this.tags.forEach(n=>{We(n)&&e!=="Panorama"&&this.changeTagMode(n,"behind"),n.state.visible=this.getVisible(n)}),this.updateRenderAllTags(),this.updateRenderAllTags()}handleFiveWantsMoveToPano(){this.tags.forEach(e=>{const n=this.getTagConfig(e);typeof n.visibleConfig=="object"&&(n.visibleConfig.keep?e.temporaryState=Ae(G({},e.temporaryState),{visible:n.visibleConfig.keep==="visible"}):e.temporaryState=Ae(G({},e.temporaryState),{visible:Boolean(n.visibleConfig.alwaysShowWhenMovePano)}))}),this.updateTagContainerVisible()}temporaryShow({withAnimation:e}={withAnimation:!1}){this.store.visibleWithAnimation=e,this.temporaryState.visible=!0,this.updateTagContainerVisible()}temporaryHide({withAnimation:e}={withAnimation:!1}){this.store.visibleWithAnimation=e,this.temporaryState.visible=!1,this.updateTagContainerVisible()}clickhandler(e){if(e.target!=="TagPoint")return;if(!e.tag.state)return console.warn("Clickhandler: params.tag.state is undefined");const n=this.can("fold",e.tag),o=this.can("unfold",e.tag);n&&o&&(e.tag.state.unfolded=!e.tag.state.unfolded,e.tag.state.unfolded&&this.tags.forEach(s=>{s.id!==e.tag.id&&s.state&&this.can("fold",s)&&(s.state.unfolded=!1)}),this.updateRenderAllTags())}updateRenderAllTags(){this.enabledModelTagSet.clear(),this.tags.forEach(e=>e.stickType==="Model"&&this.enabledModelTagSet.add(e.id)),this.updateRenderPointTag(),this.updateRenderPlaneTag(),this.updateRenderModelTag()}updateTagContainerVisible(){var e;(e=this.TagContainerSvelte)==null||e.$set({state:this.state,temporaryState:this.temporaryState,withAnimation:this.store.visibleWithAnimation}),this.filter3DTag().forEach(n=>{var o;(o=n.tag3DContentSvelte)==null||o.svelteApp.$set({state:this.state,temporaryState:this.temporaryState,withAnimation:this.store.visibleWithAnimation})})}handleFiveCameraUpdateDebounce(){return oa(()=>{this.setUnfoldedByCamera(),this.updateRenderAllTags()},100)}handleFiveCameraUpdate(){this.updateRenderPointTag()}handleFivePanoArrived(){return W(this,null,function*(){this.setModelMedialVisible(),yield this.setVisibleAndUnfolded(),this.tags.forEach(e=>{e.temporaryState=Ae(G({},e.temporaryState),{visible:!0})}),this.store.visibleWithAnimation=!0,this.updateTagContainerVisible(),this.updateRenderAllTags()})}setUnfoldedByCamera(){let e=!1;this.tags.forEach(n=>{const o=this.getUnfoldedByCamera(n);!n.state||o!==void 0&&(o===!0&&(e=!0),n.state.unfolded=o)}),e&&this.tags.forEach(n=>{const o=this.getTagConfig(n).unfoldedConfig;typeof o=="object"&&(o.autoUnfold||o.keep)||n.state&&(n.state.unfolded=!1)})}updateRenderPointTag(){var n;const e=this.sort(this.filterPointTag());if(this.setPointTagPosition(),this.TagContainerSvelte)this.TagContainerSvelte.$set({tags:e,state:this.state,temporaryState:this.temporaryState});else{const o=(n=this.five.getElement())==null?void 0:n.parentElement;if(!o)return console.error("updateRenderPlaneTag: tag2DContainer not found");this.TagContainerSvelte=new mv({target:o,props:{hooks:this.hooks,tags:e,state:this.state,temporaryState:this.temporaryState,mediaStore:this.mediaStore}})}}updateRenderPlaneTag(){this.sort([...this.filterPlaneTag(),...this.filter3DPointTag(),...this.filterModelTag()]).forEach(n=>{var l,c,u;if(We(n)&&((l=n.model)==null?void 0:l.object)&&this.updateTagCss3DObjectMatrix(n,(c=n.model)==null?void 0:c.object),n.tag3DContentSvelte){const{svelteApp:f,domContainer:d,initialNormal:h,currentNormal:g}=n.tag3DContentSvelte;if(this.updateTagCss3DObjectVisible(n),f.$set({tag:n,hooks:this.hooks,state:this.state,temporaryState:this.temporaryState}),!h.equals(g)){const A=new O.Quaternion().setFromUnitVectors(h,g);d.css3DObject.setRotationFromQuaternion(A)}return}if(((u=n.state)==null?void 0:u.visible)===!1)return;if(this.css3DRenderPlugin||(this.css3DRenderPlugin=Wt(this.five)),n.stickType==="3DPoint"&&!n.normal)return console.error("updateRenderPlaneTag: \u4E09\u7EF4\u70B9\u6807\u7B7E\u7F3A\u5C11\u6CD5\u5411\u91CF\uFF01");const o=(()=>n.stickType==="Plane"?n.position:We(n)?n.data.mediaPosition:cp(this.five.camera.position,lt(n.position),lt(n.normal)))();if(!o)return;const s=function(){if(n.normal)return lt(n.normal);if(n.stickType==="Plane")return ao(n.position);if(n.contentType==="MediaModel")return ao(o)}();if(!s)return;const r=this.getTagConfig(n).tag3DConfig,a=this.css3DRenderPlugin.create3DDomContainer(o,r);!a||(this.updateTagCss3DObjectVisible(n),this.store.css3DRenderDisposer.set(n.id,a.dispose),n.tag3DContentSvelte={svelteApp:new Pl({target:a.container,props:{tag:n,hooks:this.hooks,state:this.state,mediaStore:this.mediaStore,temporaryState:this.temporaryState}}),domContainer:a,initialNormal:s,currentNormal:s})}),this.checkPanelTag()}updateRenderModelTag(){const e=o=>!this.enabledModelTagSet.has(o.customID);this.gltfObjectGroup.remove(...this.gltfObjectGroup.children.filter(e)),this.tags.filter(We).forEach(o=>{var s;(s=o.model)==null||s.promise.then(r=>{r.visible=o.state.visible})})}disposeAllCSS3DContainer(){for(const[e,n]of this.store.css3DRenderDisposer)n==null||n();this.store.css3DRenderDisposer=new Map}checkPanelTag(){this.filter2DPointTag().forEach(e=>{var n;(n=e.tag3DContentSvelte)==null||n.domContainer.dispose(),e.tag3DContentSvelte=void 0});for(const[e,n]of this.store.css3DRenderDisposer){const o=this.getTagById(e);(!o||o.stickType==="2DPoint")&&(n==null||n(),this.store.css3DRenderDisposer.delete(e))}}addMediaModelTag(e){return W(this,null,function*(){const n=e.filter(We).map(this.loadModel);yield Promise.all(n),this.setModelMedialVisible(),this.updateRenderAllTags()})}changeTagMode(e,n){var o,s,r,a,l;((r=(s=(o=e.tag3DContentSvelte)==null?void 0:o.domContainer)==null?void 0:s.css3DObject)==null?void 0:r.mode)!==n&&((a=e.config)!=null&&a.tag3DConfig?e.config.tag3DConfig.mode=n:e.config?e.config.tag3DConfig={mode:n}:e.config={tag3DConfig:{mode:n}},(l=this.store.css3DRenderDisposer.get(e.id))==null||l(),e.tag3DContentSvelte=void 0)}}const Pv=(i,t)=>new Dl(i,t);function ye(i,t){this._camera=i||null,this._domElement=t||document,this._raycaster=new I.Raycaster,this._selected=null,this._boundObjs={};var e=this;this._$onClick=function(){e._onClick.apply(e,arguments)},this._$onDblClick=function(){e._onDblClick.apply(e,arguments)},this._$onMouseMove=function(){e._onMouseMove.apply(e,arguments)},this._$onMouseDown=function(){e._onMouseDown.apply(e,arguments)},this._$onMouseUp=function(){e._onMouseUp.apply(e,arguments)},this._$onTouchMove=function(){e._onTouchMove.apply(e,arguments)},this._$onTouchStart=function(){e._onTouchStart.apply(e,arguments)},this._$onTouchEnd=function(){e._onTouchEnd.apply(e,arguments)},this._$onContextmenu=function(){e._onContextmenu.apply(e,arguments)},this._domElement.addEventListener("click",this._$onClick,!1),this._domElement.addEventListener("dblclick",this._$onDblClick,!1),this._domElement.addEventListener("mousemove",this._$onMouseMove,!1),this._domElement.addEventListener("mousedown",this._$onMouseDown,!1),this._domElement.addEventListener("mouseup",this._$onMouseUp,!1),this._domElement.addEventListener("touchmove",this._$onTouchMove,!1),this._domElement.addEventListener("touchstart",this._$onTouchStart,!1),this._domElement.addEventListener("touchend",this._$onTouchEnd,!1),this._domElement.addEventListener("contextmenu",this._$onContextmenu,!1)}ye.prototype.destroy=function(){this._domElement.removeEventListener("click",this._$onClick,!1),this._domElement.removeEventListener("dblclick",this._$onDblClick,!1),this._domElement.removeEventListener("mousemove",this._$onMouseMove,!1),this._domElement.removeEventListener("mousedown",this._$onMouseDown,!1),this._domElement.removeEventListener("mouseup",this._$onMouseUp,!1),this._domElement.removeEventListener("touchmove",this._$onTouchMove,!1),this._domElement.removeEventListener("touchstart",this._$onTouchStart,!1),this._domElement.removeEventListener("touchend",this._$onTouchEnd,!1),this._domElement.removeEventListener("contextmenu",this._$onContextmenu,!1)},ye.eventNames=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","contextmenu","touchstart","touchend"],ye.prototype._getRelativeMouseXY=function(i){var t=i.target||i.srcElement;t.nodeType===3&&(t=t.parentNode);var e={x:0,y:0},n=t,o=getComputedStyle(n,null);e.y+=parseInt(o.getPropertyValue("padding-top"),10),e.x+=parseInt(o.getPropertyValue("padding-left"),10);do e.x+=n.offsetLeft,e.y+=n.offsetTop,o=getComputedStyle(n,null),e.x+=parseInt(o.getPropertyValue("border-left-width"),10),e.y+=parseInt(o.getPropertyValue("border-top-width"),10);while(n=n.offsetParent);var s={width:t===window?window.innerWidth:t.offsetWidth,height:t===window?window.innerHeight:t.offsetHeight};return{x:Number((i.pageX-e.x)/s.width)*2-1,y:-((i.pageY-e.y)/s.height)*2+1}},ye.prototype._objectCtxInit=function(i){i._3xDomEvent={}},ye.prototype._objectCtxDeinit=function(i){delete i._3xDomEvent},ye.prototype._objectCtxIsInit=function(i){return!!i._3xDomEvent},ye.prototype._objectCtxGet=function(i){return i._3xDomEvent},ye.prototype.camera=function(i){return i&&(this._camera=i),this._camera},ye.prototype.bind=function(i,t,e,n){console.assert(ye.eventNames.indexOf(t)!==-1,"not available events:"+t),this._objectCtxIsInit(i)||this._objectCtxInit(i);var o=this._objectCtxGet(i);o[t+"Handlers"]||(o[t+"Handlers"]=[]),o[t+"Handlers"].push({callback:e,useCapture:n}),this._boundObjs[t]===void 0&&(this._boundObjs[t]=[]),this._boundObjs[t].push(i)},ye.prototype.addEventListener=ye.prototype.bind,ye.prototype.unbind=function(i,t,e,n){console.assert(ye.eventNames.indexOf(t)!==-1,"not available events:"+t),this._objectCtxIsInit(i)||this._objectCtxInit(i);var o=this._objectCtxGet(i);o[t+"Handlers"]||(o[t+"Handlers"]=[]);for(var s=o[t+"Handlers"],r=0;r<s.length;r++){var a=s[r];if(e==a.callback&&n==a.useCapture){s.splice(r,1);break}}var l=this._boundObjs[t].indexOf(i);this._boundObjs[t].splice(l,1)},ye.prototype.removeEventListener=ye.prototype.unbind,ye.prototype._bound=function(i,t){var e=this._objectCtxGet(t);return e?!!e[i+"Handlers"]:!1},ye.prototype._onMove=function(i,t,e,n){var o=this._boundObjs[i];if(!(o===void 0||o.length===0)){var s=new I.Vector2;s.set(t,e),this._raycaster.setFromCamera(s,this._camera);var r=this._raycaster.intersectObjects(o),a=this._selected;if(r.length>0){var l,c,u,f=r[0],d=f.object;this._selected=d,u=this._bound("mousemove",d),a!=d&&(l=this._bound("mouseover",d),c=a&&this._bound("mouseout",a))}else c=a&&this._bound("mouseout",a),this._selected=null;u&&this._notify("mousemove",d,n,f),l&&this._notify("mouseover",d,n,f),c&&this._notify("mouseout",a,n,f)}},ye.prototype._onEvent=function(i,t,e,n){var o=this._boundObjs[i];if(!(o===void 0||o.length===0)){var s=new I.Vector2;s.set(t,e),this._raycaster.setFromCamera(s,this._camera);var r=this._raycaster.intersectObjects(o,!0);if(r.length!==0){for(var a=r[0],l=a.object,c=this._objectCtxGet(l),u=l.parent;typeof c=="undefined"&&u;)c=this._objectCtxGet(u),u=u.parent;!c||this._notify(i,l,n,a)}}},ye.prototype._notify=function(i,t,e,n){var o=this._objectCtxGet(t),s=o?o[i+"Handlers"]:null;if(!o||!s||s.length===0){t.parent&&this._notify(i,t.parent,e,n);return}for(var s=o[i+"Handlers"],r=0;r<s.length;r++){var a=s[r],l=!0;a.callback({type:i,target:t,origDomEvent:e,intersect:n,stopPropagation:function(){l=!1}}),!!l&&a.useCapture===!1&&t.parent&&this._notify(i,t.parent,e,n)}},ye.prototype._onMouseDown=function(i){return this._onMouseEvent("mousedown",i)},ye.prototype._onMouseUp=function(i){return this._onMouseEvent("mouseup",i)},ye.prototype._onMouseEvent=function(i,t){var e=this._getRelativeMouseXY(t);this._onEvent(i,e.x,e.y,t)},ye.prototype._onMouseMove=function(i){var t=this._getRelativeMouseXY(i);this._onMove("mousemove",t.x,t.y,i),this._onMove("mouseover",t.x,t.y,i),this._onMove("mouseout",t.x,t.y,i)},ye.prototype._onClick=function(i){this._onMouseEvent("click",i)},ye.prototype._onDblClick=function(i){this._onMouseEvent("dblclick",i)},ye.prototype._onContextmenu=function(i){this._onMouseEvent("contextmenu",i)},ye.prototype._onTouchStart=function(i){return this._onTouchEvent("touchstart",i)},ye.prototype._onTouchEnd=function(i){return this._onTouchEvent("touchend",i)},ye.prototype._onTouchMove=function(i){if(i.touches.length==1){i.preventDefault();var t=Number(i.touches[0].pageX/window.innerWidth)*2-1,e=-(i.touches[0].pageY/window.innerHeight)*2+1;this._onMove("mousemove",t,e,i),this._onMove("mouseover",t,e,i),this._onMove("mouseout",t,e,i)}},ye.prototype._onTouchEvent=function(i,t){if(t.touches.length==1){t.preventDefault();var e=Number(t.touches[0].pageX/window.innerWidth)*2-1,n=-(t.touches[0].pageY/window.innerHeight)*2+1;this._onEvent(i,e,n,t)}};function Ll(i){const t=new I.Box3,e=new I.Vector3;if(i.traverse(n=>{var s;if(n.name==="shadow")return;const o=n.geometry;if(o!==void 0)if((s=o==null?void 0:o.attributes)!=null&&s.position){const r=o.attributes.position;for(let a=0,l=r.count;a<l;a++)e.fromBufferAttribute(r,a).applyMatrix4(n.matrix),t.expandByPoint(e)}else o.vertices.forEach(r=>{const a=r.clone().applyMatrix4(n.matrix);t.expandByPoint(a)})}),!t.isEmpty())return t}class xn{constructor(t,e){m(this,"originObject3D");m(this,"hooks");m(this,"disposers",[]);m(this,"helperObject3D");m(this,"camera");m(this,"model");m(this,"scene");m(this,"container");m(this,"domEvents");m(this,"isDragging",!1);m(this,"enabled",!1);m(this,"name","BaseController");m(this,"boundingBox");m(this,"offset");m(this,"onRender");m(this,"onWantsTapGesture",t=>{if(this.getIntersectObject(t))return!1});var c,u;this.hooks=(c=t.sharedHooks)!=null?c:new Rt,this.camera=t.camera,this.model=t.model,this.originObject3D=t.originObject3D,this.helperObject3D=t.helperObject3D,this.container=t.container,this.scene=t.scene,this.domEvents=new ye(t.camera,t.container),this.onRender=(u=t.onRender)!=null?u:()=>{},this.offset=e==null?void 0:e.offset,this.initialHelperPosition(),this.initialHelperQuaternion(),this.enable();const n=(...f)=>this.onSetOriginObjectScale(...f),o=(...f)=>this.onSetOriginObjectRotate(...f),s=(...f)=>this.onSetOriginObjectPosition(...f),r=(...f)=>this.onApplyOriginObjectScale(...f),a=(...f)=>this.onApplyOriginObjectRotate(...f),l=(...f)=>this.onApplyOriginObjectPosition(...f);this.hooks.on("setObjectScale",n),this.hooks.on("setObjectRotate",o),this.hooks.on("setObjectPosition",s),this.hooks.on("applyObjectPosition",l),this.hooks.on("applyObjectRotate",a),this.hooks.on("applyObjectScale",r),this.disposers.push(()=>{this.hooks.off("setObjectScale",n),this.hooks.off("setObjectRotate",o),this.hooks.off("setObjectPosition",s),this.hooks.off("applyObjectPosition",l),this.hooks.off("applyObjectRotate",a),this.hooks.off("applyObjectScale",r)})}initialHelperPosition(){this.helperObject3D.position.add(this.calculateOffset(this.offset)),this.helperObject3D.initialPosition()}initialHelperQuaternion(){this.helperObject3D.initQuaternion()}enable(){this.enabled||(this.enabled=!0,this.scene.add(this.helperObject3D),this.helperObject3D.enable(),this.render())}disable(){!this.enabled||(this.enabled=!1,this.helperObject3D.disable(),this.render())}show(){this.helperObject3D.show(),this.render()}hide(){this.helperObject3D.hide(),this.render()}dispose(){var t;(t=this.disposers)==null||t.forEach(e=>e==null?void 0:e()),this.helperObject3D.dispose(),this.render()}applyHelperMatrix4(t){this.helperObject3D.applyMatrix4(t)}applyHelperQuaternion(t,e){this.helperObject3D.applyHelperQuaternion(t,e)}applyHelperScaleMatrix4(t,e){this.helperObject3D.applyHelperScaleMatrix4(t,e)}onWantsGesture(t,e,n){if(this.isDragging)return!1}onIntersectionOnModelUpdate(t){}onApplyOriginObjectScale(t){this.applyHelperScaleMatrix4(t.matrix,t.origin)}onApplyOriginObjectRotate(t){this.applyHelperQuaternion(t.quaternion,t.origin)}onApplyOriginObjectPosition(t){this.applyHelperMatrix4(t.matrix)}onSetOriginObjectScale(t){this.helperObject3D.scale.copy(t),this.updateOffsetByScale(t)}onSetOriginObjectRotate(t,e){this.helperObject3D.setHelperQuaternion(t,e)}onSetOriginObjectPosition(t){this.helperObject3D.position.copy(t.clone().add(this.calculateOffset(this.offset)))}render(){this.onRender()}updateOffsetByScale(t){if(this.boundingBox&&this.offset){const e=this.originObject3D.position,n=new I.Vector3().subVectors(this.boundingBox.max,e).multiply(t).add(e),o=new I.Vector3().subVectors(this.boundingBox.min,e).multiply(t).add(e),s=this.calculateOffset(this.offset,{min:o,max:n});this.helperObject3D.position.copy(s),this.helperObject3D.initialPosition()}}hoverListener(t,e=16777215,n=1){const o=(Array.isArray(t)?t:[t]).filter(Ze),s=[];for(const r of o)if(r instanceof I.Mesh||r instanceof I.Group){const a=r instanceof I.Group?r.children.filter(d=>d instanceof I.Mesh):[r];a.forEach(d=>{d.__originalColor__=d.material.color.clone(),d.__originalOpacity__=d.material.opacity});const l=()=>{a.forEach(d=>{d.material.color.set(e),d.material.opacity=n}),this.render()},c=()=>{a.forEach(d=>{d.material.color.copy(d.__originalColor__),d.material.opacity=d.__originalOpacity__}),this.render()},u=()=>{this.isDragging||l()},f=()=>{this.isDragging||c()};for(const d of a)this.domEvents.addEventListener(d,"mouseover",u),this.domEvents.addEventListener(d,"mouseout",f),this.hooks.on("moveStart",l),this.hooks.on("moveEnd",c),this.hooks.on("rotateEnd",c),s.push(()=>{this.domEvents.removeEventListener(d,"mouseover",u),this.domEvents.removeEventListener(d,"mouseout",f),this.hooks.off("moveStart",l),this.hooks.off("moveEnd",c),this.hooks.off("rotateEnd",c)})}return()=>s.forEach(r=>r==null?void 0:r())}getIntersectObject(t){const e=this.camera.position,n=this.helperObject3D;if(!n)return;const o=this.helperObject3D.raycasterIntersectObject(t)[0];if(!o)return;const s=o;if(s.object=n,this.model.intersectRaycaster){const r=this.model.intersectRaycaster(t)[0];if(r&&r.point.distanceTo(e)<s.point.distanceTo(e))return}return s.object}calculateOffset(t,e){const n=this.originObject3D,o=new I.Vector3(0,0,0);if(!t)return o;const s=()=>e||(this.boundingBox?this.boundingBox:(this.boundingBox=Ll(n),this.boundingBox));if(typeof t.x=="number")o.setX(t.x);else if(typeof t.x=="object"){const r=s();o.setX((r.max.x-r.min.x)*t.x.percents)}if(typeof t.y=="number")o.setY(t.y);else if(typeof t.y=="object"){const r=s();o.setY((r.max.y-r.min.y)*t.y.percents)}if(typeof t.z=="number")o.setZ(t.z);else if(typeof t.z=="object"){const r=s();o.setZ((r.max.z-r.min.z)*t.z.percents)}return o}}class Iv extends xn{constructor(...e){super(...e);m(this,"name","ScaleController")}setScale(e){var l,c,u;let n=1,o=1,s=1;typeof e=="number"?(n=e,o=e,s=e):typeof e=="object"&&(n=(l=e.x)!=null?l:1,o=(c=e.y)!=null?c:1,s=(u=e.z)!=null?u:1);const r=new I.Vector3(n,o,s);this.hooks.emit("wantToScale",r)||(this.originObject3D.scale.copy(r),this.hooks.emit("setObjectScale",r),this.hooks.emit("scale",r),this.render())}}function Sl(i,t,e){if(e){const o=new I.Vector3().subVectors(i.position,e).applyQuaternion(i.quaternion.clone().inverse()).applyQuaternion(t).add(e);i.position.copy(o)}i.quaternion.copy(t)}class Ev extends O.Object3D{constructor(){super()}add(...t){if(t.length===0)return this;const e=t.filter(Boolean);return super.add(...e)}remove(...t){if(t.length===0)return this;const e=t.filter(Boolean);return super.remove(...e)}removeFromParent(){const t=this.parent;return t!==null&&t.remove(this),this}}class wi extends Ev{constructor(e,n){var o;super();m(this,"originObject3D");m(this,"onRender");this.originObject3D=e,this.onRender=(o=n==null?void 0:n.onRender)!=null?o:()=>{}}get helperObject(){return this}render(){this.onRender()}enable(){this.parent.children.includes(this)||this.parent.add(this)}disable(){this.removeFromParent()}show(){this.visible=!0,this.render()}hide(){this.visible=!1,this.render()}raycasterIntersectObject(e,n=[]){return e.intersectObject(this,!0,n)}initialPosition(){this.position.add(this.originObject3D.position)}initQuaternion(){this.quaternion.copy(this.originObject3D.quaternion)}applyHelperScaleMatrix4(e,n){this.scale.applyMatrix4(e)}setHelperQuaternion(e,n){Sl(this,e,n)}applyHelperQuaternion(e,n){if(n){const o=new O.Vector3().subVectors(this.position,n).applyQuaternion(e).add(n);this.position.copy(o)}this.applyQuaternion(e)}dispose(){this.removeFromParent()}}class kv extends wi{}class xv extends wi{}class Dv extends wi{}class Ml extends wi{}class Lv extends Ml{}class Sv extends I.Group{constructor(e){super();m(this,"direction");this.direction=e||"x"}}class zl extends I.Mesh{constructor(e,n,o){super(e,n);m(this,"direction");this.direction=o||"x"}}function Mv(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return Object.assign(new I.Vector2,{x:(i.x-s)/e*2-1,y:-(i.y-o)/n*2+1})}function bo(i,t,e){if(!t||!e||!i)return;const n=Mv(t,e);if(Math.abs(n.x)===1||Math.abs(n.y)===1)return;const o=new I.Raycaster;return o.setFromCamera(n,i),o}function zv(i,t){return!(Math.abs(i.x-t.x)>1e-5||Math.abs(i.y-t.y)>1e-5||Math.abs(i.z-t.z)>1e-5)}class yo extends Sv{constructor(e){var u;super(e.direction);m(this,"line");m(this,"arrow");m(this,"lineHeight",.4);m(this,"arrowHeight",.1);this.name="ArrowGroup";const n=new I.Color((u=e.color)!=null?u:16214315),o=new I.MeshBasicMaterial({color:n,depthTest:!1,opacity:1,transparent:!0,side:I.DoubleSide}),s=new I.ConeGeometry(.04,.1,32),r=new zl(s,o.clone(),e.direction);r.name=`arrow-${e.direction}`,this.arrow=r;const a=.004,l=new I.CylinderGeometry(a,a,.4,32),c=new zl(l,o.clone(),e.direction);c.name=`line-${e.direction}`,this.line=c,this.formatArrow(),this.formatLine(),this.add(this.arrow,this.line)}formatArrow(){this.arrow.geometry.translate(0,this.lineHeight+this.arrowHeight/2,0),this.direction==="x"?(this.arrow.geometry.rotateX(Math.PI/2),this.arrow.geometry.rotateY(Math.PI/2)):this.direction==="z"&&this.arrow.geometry.rotateX(Math.PI/2)}formatLine(){this.line.geometry.translate(0,this.lineHeight/2,0),this.direction==="x"?(this.line.geometry.rotateX(Math.PI/2),this.line.geometry.rotateY(Math.PI/2)):this.direction==="z"&&this.line.geometry.rotateX(Math.PI/2)}}const wo={X:15618642,Y:4765519,Z:4227839};class an{static get X(){return new I.Color(wo.X).convertSRGBToLinear().clone()}static get Y(){return new I.Color(wo.Y).convertSRGBToLinear().clone()}static get Z(){return new I.Color(wo.Z).convertSRGBToLinear().clone()}}class Tv extends kv{constructor(e){super(e);m(this,"xArrow",new yo({direction:"x",color:an.X}));m(this,"yArrow",new yo({direction:"y",color:an.Y}));m(this,"zArrow",new yo({direction:"z",color:an.Z}));this.add(this.xArrow),this.add(this.yArrow),this.add(this.zArrow)}show(){super.show(),this.xArrow.visible=!0,this.yArrow.visible=!0,this.zArrow.visible=!0}showDraggingHelper(e){this.xArrow.visible=e.includes("x"),this.yArrow.visible=e.includes("y"),this.zArrow.visible=e.includes("z")}dispose(){this.remove(this.xArrow,this.yArrow,this.zArrow)}}function Qt(i,t){return Bv(document.createElement(t!=null?t:"div"),i)}function Bv(i,t){if(!t)return i;for(const e in t)e&&t[e]&&(i.style[e]=t[e]);return i}function jv(i){const t=Qt(G({position:"absolute",display:"block",borderRadius:"4px",paddingTop:"1px",paddingBottom:"1px",paddingLeft:"4px",paddingRight:"4px",pointerEvents:"none",userSelect:"none",zIndex:"9999",backgroundColor:"rgba(0,0,0,0.7)",fontSize:"12px",color:"#fff",letterSpacing:"0",lineHeight:"18px"},i)),e=()=>{t.style.display!=="block"&&(!t.style.top||!t.style.left||(t.style.display="block"))};return{element:t,show:e,hide:()=>{t.style.display="none",t.style.top="",t.style.left=""},setLeftTop:(s,r)=>{t.style.left=s,t.style.top=r,e()}}}class Vv extends Dv{constructor(e,n){super(e);m(this,"xCircle");m(this,"yCircle");m(this,"zCircle");m(this,"children",[]);m(this,"angleTips");m(this,"container");(n==null?void 0:n.yzCircleEnable)!==!1&&(this.xCircle=new Co({direction:"x",color:an.X})),(n==null?void 0:n.xzCircleEnable)!==!1&&(this.yCircle=new Co({direction:"y",color:an.Y})),(n==null?void 0:n.xyCircleEnable)!==!1&&(this.zCircle=new Co({direction:"z",color:an.Z})),(n==null?void 0:n.container)&&(n==null?void 0:n.angleTipsEnable)!==!1&&(this.container=n==null?void 0:n.container,this.angleTips=jv({display:"none"}),this.container.appendChild(this.angleTips.element)),this.add(...[this.xCircle,this.yCircle,this.zCircle].filter(Boolean)),this.show()}hide(){this.children.forEach(e=>e.hide())}show(){var e;this.children.forEach(n=>n.showCircle()),(e=this.angleTips)==null||e.hide()}showDraggingHelper(e){var n;this.hide(),this.children.filter(o=>e.includes(o.direction)).forEach(o=>o.showRing()),(n=this.angleTips)==null||n.show()}dispose(){var e,n;this.removeFromParent(),(n=(e=this.angleTips)==null?void 0:e.element)==null||n.remove()}}class Co extends I.Group{constructor(e){super();m(this,"direction");m(this,"circle");m(this,"ring");m(this,"angleSector");this.direction=e.direction,this.circle=new Qv(e),this.ring=new Ov(e),this.angleSector=new Fv(e),this.add(this.circle,this.ring,this.angleSector),this.direction==="y"?this.rotateX(Math.PI/2):this.direction==="x"&&this.rotateY(-Math.PI/2)}showCircle(){this.add(this.circle),this.remove(this.ring,this.angleSector)}showRing(){this.add(this.ring,this.angleSector),this.remove(this.circle)}hide(){this.remove(this.ring,this.angleSector,this.circle)}}class Qv extends I.Mesh{constructor(e){var n;super();m(this,"direction");m(this,"gapAngle",.02);m(this,"geometry",new I.RingGeometry(.25,.3,20,8,this.gapAngle,Math.PI/2-this.gapAngle*2));this.material=new I.MeshBasicMaterial({opacity:.6,color:(n=e.color)!=null?n:16777215,transparent:!0,side:I.DoubleSide,depthTest:!1}),this.direction=e.direction,this.geometry.name=`RotateHelperCircleGeometry-${this.direction}`}}class Ov extends I.Group{constructor(e){super();m(this,"direction");this.direction=e.direction;const n=.015,o=new Array(8).fill(null).map((s,r)=>{const a=new I.RingGeometry(.25,.3,20,8,Math.PI/4*r+n,Math.PI/4-n*2),l=new I.MeshBasicMaterial({opacity:1,color:16777215,depthTest:!1,transparent:!0,side:I.DoubleSide}),c=new I.Mesh(a,l);return c.name=`AxesDashedRing-${this.direction}-${r}`,c});this.add(...o)}}class Fv extends I.Mesh{constructor(e){var o;super();m(this,"direction");m(this,"baseAxes");m(this,"angleDirection");switch(e.direction){case"x":this.baseAxes=new I.Vector3(0,0,1);break;case"y":this.baseAxes=new I.Vector3(1,0,0);break;case"z":this.baseAxes=new I.Vector3(1,0,0);break}const n=.3+5e-4;this.geometry=new I.CircleGeometry(n,48,0,1e-4),this.material=new I.MeshBasicMaterial({opacity:.4,color:(o=e.color)!=null?o:16777215,depthTest:!1,transparent:!0,side:I.DoubleSide}),this.direction=e.direction,this.angleDirection=this.direction==="z"?1:-1}}function Rv(){const i=Qt({width:"100%",height:"100%",left:"0",top:"0",position:"absolute",pointerEvents:"none"}),t=Qt({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"relative",display:"flex",alignItems:"center",justifyContent:"center"}),e=Qt({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"absolute",border:"1px solid rgba(255,255,255,0.4)"});i.appendChild(t),t.appendChild(e);const n="-4px",o={direction:"nesw",element:Dt({cursor:"nesw-resize",left:n,bottom:n})},s={direction:"ns",element:Dt({cursor:"ns-resize",bottom:n})},r={direction:"nwse",element:Dt({cursor:"nwse-resize",right:n,bottom:n})},a={direction:"ew",element:Dt({cursor:"ew-resize",right:n})},l={direction:"nesw",element:Dt({cursor:"nesw-resize",right:n,top:n})},c={direction:"ns",element:Dt({cursor:"ns-resize",top:n})},u={direction:"nwse",element:Dt({cursor:"nwse-resize",left:n,top:n})},f={direction:"ew",element:Dt({cursor:"ew-resize",left:n})};return new Array(s,a,c,f,o,r,l,u).forEach(h=>t.appendChild(h.element)),{container:i,squares:[o,s,r,a,l,c,u,f]}}function Dt(i){const t=Qt(G({background:"#FFFFFF",width:"9px",height:"9px",position:"absolute",pointerEvents:"none"},i)),e=Qt({width:"15px",height:"15px",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"}),n=Qt({width:"15px",height:"15px",cursor:i==null?void 0:i.cursor,pointerEvents:"auto",background:"transparent"});return n.draggable=!0,e.appendChild(n),t.appendChild(e),t}class Gv extends Lv{constructor(e,n,o,s){super(e);m(this,"points",[]);m(this,"cornerPositions",[]);m(this,"css3DInstance");m(this,"plane");m(this,"css3DRenderer",new Nt);m(this,"camera");m(this,"scene");m(this,"container");m(this,"enabled",!1);this.camera=o,this.scene=s,this.container=n,this.initRectangleScaleHelper()}get helperObject(){var e;if(!((e=this.css3DInstance)!=null&&e.css3DObject))throw new Error("css3DInstance is not initialized");return this.css3DInstance.css3DObject}applyMatrix4(e){var n;super.applyMatrix4(e),this.helperObject.applyMatrix4(e),(n=this.plane)==null||n.applyMatrix4(e),this.cornerPositions.forEach(o=>o.applyMatrix4(e))}showDraggingHelper(){}applyHelperScaleMatrix4(e,n){var o;(o=this.plane)==null||o.scale.applyMatrix4(e),this.helperObject.applyScaleMatrix4(e)}updatePoints(){const e=this.calculatePointPosition(this.cornerPositions);this.points.forEach((n,o)=>{n.position.copy(e[o])})}applyHelperQuaternion(e,n){var s;const o=(s=this.css3DInstance)==null?void 0:s.css3DObject;if(o){const r=new I.Vector3().subVectors(o.position,n).applyQuaternion(e).add(n);o.position.copy(r),o.applyQuaternion(e)}if(this.plane){const r=new I.Vector3().subVectors(this.plane.position,n).applyQuaternion(e).add(n);this.plane.position.copy(r),this.plane.applyQuaternion(e)}this.cornerPositions.forEach(r=>{const a=new I.Vector3().subVectors(r,n).applyQuaternion(e).add(n);r.copy(a)})}enable(){var e;this.enabled||(this.enabled=!0,(e=this.css3DInstance)==null||e.enable(),this.plane&&this.scene.add(this.plane))}disable(){var e;!this.enabled||(this.enabled=!1,(e=this.css3DInstance)==null||e.disable(),this.plane&&this.scene.remove(this.plane))}show(){var e;(e=this.css3DInstance)==null||e.show(),this.plane&&(this.plane.visible=!0)}hide(){var e;(e=this.css3DInstance)==null||e.hide(),this.plane&&(this.plane.visible=!1)}dispose(){this.disable(),this.css3DRenderer.dispose()}initRectangleScaleHelper(){var a,l;const e=this.getCornerPositions();if(!e)return;this.cornerPositions=e;const n=this.css3DRenderer.create3DElement(this.camera,e,{ratio:.003});if(!n)return;this.css3DInstance=n,n.appendToElement(this.container);const o=n.css3DObject.container,{container:s,squares:r}=Rv();this.points=r.map((c,u)=>({direction:c.direction,point:c.element,position:this.calculatePointPosition(e)[u]})),o.insertBefore(s,(a=o.children[0])!=null?a:null),this.helperObject.position.copy(this.originObject3D.position),(l=this.plane)==null||l.position.copy(this.originObject3D.position)}getCornerPositions(){const{originObject3D:e}=this;if(e.isCSS3DObjectPlus)return e.cornerPoints;console.error("\u5F53\u524D\u7269\u4F53\u6682\u65F6\u4E0D\u652F\u6301 ScaleHelper")}calculatePointPosition(e){return[e[0].clone(),e[0].clone().add(e[1]).divideScalar(2),e[1].clone(),e[1].clone().add(e[2]).divideScalar(2),e[2].clone(),e[2].clone().add(e[3]).divideScalar(2),e[3].clone(),e[3].clone().add(e[0]).divideScalar(2)]}}class Nv extends xv{constructor(e){super(e);m(this,"box");m(this,"outline");m(this,"originObject");m(this,"positionAttribute");this.originObject=e,this.positionAttribute=new I.BufferAttribute(new Float32Array(8*3),3),this.box=this.createBox(),this.outline=this.createOutline(),this.add(this.box,this.outline),this.update()}raycasterIntersectObject(e,n){return e.intersectObject(this,!1,n)}raycast(e,n){this.box.raycast(e,n)}update(){const e=Ll(this.originObject);if(!e)return;const{min:n,max:o}=e;this.positionAttribute.setXYZ(0,o.x,o.y,o.z),this.positionAttribute.setXYZ(1,n.x,o.y,o.z),this.positionAttribute.setXYZ(2,n.x,n.y,o.z),this.positionAttribute.setXYZ(3,o.x,n.y,o.z),this.positionAttribute.setXYZ(4,o.x,o.y,n.z),this.positionAttribute.setXYZ(5,n.x,o.y,n.z),this.positionAttribute.setXYZ(6,n.x,n.y,n.z),this.positionAttribute.setXYZ(7,o.x,n.y,n.z),this.positionAttribute.needsUpdate=!0}createOutline(){const e=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),n=new I.BufferGeometry;n.setIndex(new I.BufferAttribute(e,1)),n.setAttribute("position",this.positionAttribute);const o=new I.LineBasicMaterial({color:64767,linewidth:1,opacity:1,depthTest:!1,transparent:!0,toneMapped:!1}),s=new I.LineSegments(n,o);return s.matrixAutoUpdate=!1,s}createBox(){const e=new Uint16Array([0,1,2,0,2,3,0,3,7,0,7,4,0,4,5,0,5,1,6,1,5,6,2,1,6,5,4,6,4,7,6,3,2,6,7,3]),n=new I.BufferGeometry;n.setIndex(new I.BufferAttribute(e,1)),n.setAttribute("position",this.positionAttribute);const o=new I.MeshBasicMaterial({color:64767,opacity:.1,depthTest:!1,transparent:!0});return new I.Mesh(n,o)}}class Wv extends xn{constructor(...e){super(...e);m(this,"name","MoveController");m(this,"startInfo");m(this,"_moveByMouseEnable",!1);m(this,"mouseInfo");m(this,"mousedownEventListenerDisposer");const n=this.helperObject3D;this.hoverListener([n.xArrow,n.yArrow,n.zArrow]);const o=this.dragStart.bind(this),s=this.dragging.bind(this),r=this.dragEnd.bind(this),a=this.show.bind(this),l=this.hide.bind(this);this.domEvents.addEventListener(this.helperObject3D,"mousedown",o),document.addEventListener("mousemove",s),document.addEventListener("mouseup",r),this.hooks.on("rotateStart",l),this.hooks.on("rotateEnd",a),this.hooks.on("moveByMouseEnable",l),this.hooks.on("moveByMouseDisable",a),this.disposers.push(()=>{this.domEvents.removeEventListener(this.helperObject3D,"mousedown",o),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",r),this.hooks.off("rotateStart",l),this.hooks.off("rotateEnd",a),this.hooks.off("moveByMouseEnable",l),this.hooks.off("moveByMouseDisable",a)}),this.moveByMouseEnable&&this.moveByMouse()}get moveByMouseEnable(){return this._moveByMouseEnable}dispose(){var e;super.dispose(),(e=this.disposers)==null||e.forEach(n=>n==null?void 0:n())}moveByMouse(){this._moveByMouseEnable=!0;const e=this.handleMouseDown.bind(this),n=this.handleMouseUp.bind(this);this.hooks.emit("moveByMouseEnable"),setTimeout(()=>{this.container.addEventListener("mousedown",e),this.container.addEventListener("mouseup",n)}),this.mousedownEventListenerDisposer=()=>{this.container.removeEventListener("mousedown",e),this.container.removeEventListener("mouseup",n)}}disableMoveByMouse(){var e;this._moveByMouseEnable=!1,this.hooks.emit("moveByMouseDisable"),(e=this.mousedownEventListenerDisposer)==null||e.call(this)}onIntersectionOnModelUpdate(e){!this.moveByMouseEnable||this.hooks.emit("wantToMove",e.point)||(this.originObject3D.position.copy(e.point),this.hooks.emit("setObjectPosition",e.point),this.hooks.emit("move",e.point))}onApplyOriginObjectScale(e){}handleMouseDown(e){const{x:n,y:o}=e;this.mouseInfo={x:n,y:o,mouseDownTimestamp:Date.now()}}handleMouseUp(e){if(!this.mouseInfo)return;const{x:n,y:o}=e;this.mouseInfo.x===n&&this.mouseInfo.y===o&&Date.now()-this.mouseInfo.mouseDownTimestamp<500&&(this.disableMoveByMouse(),this.mouseInfo=void 0)}dragStart(e){if(this._moveByMouseEnable||this.isDragging)return;const n=e==null?void 0:e.intersect;if(!n)return this.dragEnd();const o=(n==null?void 0:n.object).direction;if(!o)return this.dragEnd();const s=new I.Vector3(1,0,0).applyQuaternion(this.helperObject3D.quaternion),r=new I.Vector3(0,1,0).applyQuaternion(this.helperObject3D.quaternion),a=new I.Vector3(0,0,1).applyQuaternion(this.helperObject3D.quaternion),l=(()=>{switch(o){case"x":return s;case"y":return r;case"z":return a}})(),c=(()=>{switch(o){case"x":case"y":return a;case"z":return s}})(),u=n.point.clone(),f=new I.Plane;f.setFromNormalAndCoplanarPoint(c,u),this.startInfo={startVectorProject:u.clone().projectOnVector(l),directionVector:l,plane:f},this.helperObject3D.showDraggingHelper([o]),this.hooks.emit("moveStart"),this.isDragging=!0}dragging(e){if(!this.isDragging||!this.startInfo)return;const n=bo(this.camera,e,this.container);return n?(this.move(n),!1):this.dragEnd()}move(e){if(!this.startInfo)return this.dragEnd();const{plane:n,directionVector:o,startVectorProject:s}=this.startInfo,r=this.originObject3D,a=e.ray.intersectPlane(n,new I.Vector3);if(!a)return;const l=a.clone().projectOnVector(o),c=l.clone().sub(s),u=new I.Matrix4;u.setPosition(c);const f=r.position.clone().applyMatrix4(u);this.hooks.emit("wantToMove",f)||(r.applyMatrix4(u),s.copy(l),this.hooks.emit("applyObjectPosition",{matrix:u}),this.hooks.emit("move",f))}dragEnd(){!this.isDragging||(this.startInfo=void 0,this.isDragging=!1,this.helperObject3D.show(),this.hooks.emit("moveEnd"))}}class Dn{constructor(t,e,n,o,s,r){m(this,"helperController");m(this,"five");m(this,"onFiveWantsTapGesture",t=>{if(!this.helperController)return;const e=this.helperController.onWantsTapGesture(t);return this.five.needsRender=!0,e});m(this,"onFiveWantsGesture",(...t)=>{if(!this.helperController)return;const e=this.helperController.onWantsGesture(...t);return this.five.needsRender=!0,e});m(this,"onFiveIntersectionOnModelUpdate",(...t)=>{!this.helperController||this.helperController.onIntersectionOnModelUpdate(...t)});const{camera:a,model:l,scene:c}=t,u=t.getElement();if(this.five=t,!a||!l||!u||!c)return;const f=()=>{t.needsRender=!0};this.helperController=new e({camera:a,model:l,originObject3D:n,helperObject3D:o,container:u,scene:c,onRender:f,sharedHooks:r},s),t.on("wantsTapGesture",this.onFiveWantsTapGesture),t.on("wantsGesture",this.onFiveWantsGesture),t.on("intersectionOnModelUpdate",this.onFiveIntersectionOnModelUpdate)}dispose(){var t;this.five.off("wantsTapGesture",this.onFiveWantsTapGesture),this.five.off("wantsGesture",this.onFiveWantsGesture),this.five.off("intersectionOnModelUpdate",this.onFiveIntersectionOnModelUpdate),(t=this.helperController)==null||t.dispose()}}const Po="Object3DHelper@v1.0.1",Hv=()=>{console.error(`${Po} is disposed`)},_v=()=>{console.warn(`${Po} is disabled`)},Xv=()=>{console.error(`${Po} is disabled`)};class Yv{constructor(t){m(this,"controllers",{});m(this,"state",{visible:!0,enabled:!0,disposed:!1});m(this,"hooks",new Rt);m(this,"eventListener",{});t&&this.addControllers(t),this.setState(this.state)}show(t){return W(this,null,function*(){this.setState({visible:!0},t)})}hide(t){return W(this,null,function*(){this.setState({visible:!1},t)})}enable(t){this.setState({enabled:!0},t)}disable(t){this.setState({enabled:!1},t)}dispose(){this.setState({disposed:!0})}setState(t,e){if(this.state.disposed)return Hv();if(!this.state.enabled&&t.enabled!==!0&&t.disposed!==!0)return Xv();const n=G({},this.state);this.state=G(G({},this.state),t),t.disposed!==void 0&&t.disposed!==n.disposed&&t.disposed&&this.handleDispose(),t.visible!==void 0&&this.handleVisible(t.visible),t.enabled!==void 0&&this.handleEnable(t.enabled),this.hooks.emit("stateChange",{state:this.state,prevState:n})}addControllers(t){this.controllers=G(G({},this.controllers),t),this.setState(this.state)}getCurrentState(){return this.state}handleEnable(t,e=!0){t?(this.everyControllerDo(n=>{n.enable()}),this.hooks.emit("enable",{userAction:e})):(this.everyControllerDo(n=>{n.disable()}),this.hooks.emit("disable",{userAction:e})),this.state.enabled=t}handleVisible(t,e=!0){t?(this.everyControllerDo(n=>{n.show()}),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:e}))):(this.everyControllerDo(n=>{n.hide()}),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:e}))),this.state.visible=t}everyControllerDo(t){Object.values(this.controllers).forEach(e=>{e&&t(e)})}handleDispose(){var t,e;Object.values(this.controllers).forEach(n=>{n==null||n.dispose()});for(const n in this.controllers){if(!n)continue;const o=n;(e=(t=this.eventListener)[o])==null||e.call(t)}}actionIfStateIsEnabled(t,e){if(this.state.enabled)return t();e!=null&&e.warnLog&&_v()}}function Io(i){return i*Math.PI/180}class Uv extends xn{constructor(...e){var c,u,f;super(...e);m(this,"name","RotateController");m(this,"startInfo");m(this,"removeListener");const n=this.helperObject3D;this.hoverListener([(c=n.xCircle)==null?void 0:c.circle,(u=n.yCircle)==null?void 0:u.circle,(f=n.zCircle)==null?void 0:f.circle].filter(Boolean));const o=this.dragStart.bind(this),s=this.dragging.bind(this),r=this.dragEnd.bind(this),a=this.show.bind(this),l=this.hide.bind(this);this.domEvents.addEventListener(this.helperObject3D,"mousedown",o),document.addEventListener("mousemove",s),document.addEventListener("mouseup",r),this.hooks.on("moveStart",l),this.hooks.on("moveEnd",a),this.hooks.on("moveByMouseEnable",l),this.hooks.on("moveByMouseDisable",a),this.removeListener=()=>{this.domEvents.removeEventListener(this.helperObject3D,"mousedown",o),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",r),this.hooks.off("moveStart",l),this.hooks.off("moveEnd",a),this.hooks.off("moveByMouseEnable",l),this.hooks.off("moveByMouseDisable",a)}}get rotateCenter(){return this.helperObject3D.position.clone()}initialHelperQuaternion(){this.helperObject3D.applyHelperQuaternion(this.originObject3D.quaternion)}setRotateAngle(e){const{x:n=0,y:o=0,z:s=0}=e,r=new I.Euler(Io(n),Io(o),Io(s)),a=new I.Quaternion().setFromEuler(r);if(this.hooks.emit("wantToRotate",a))return;const{originObject3D:c,rotateCenter:u}=this;Sl(c,a,u),this.hooks.emit("setObjectRotate",a,u),this.hooks.emit("rotate",a),this.render()}dispose(){this.removeListener(),super.dispose()}onApplyOriginObjectRotate(e){this.isDragging||super.onApplyOriginObjectRotate(e)}onApplyOriginObjectScale(e){}dragStart(e){if(this.isDragging)return;const n=e==null?void 0:e.intersect;if(!n)return this.dragEnd();const o=(n==null?void 0:n.object).direction;if(!o)return this.dragEnd();const s=n.point,r=this.getAngleHelper(o);this.setTipsAngle(0);const a=s.clone();a.y+=.2,this.setTipsPosition(a);const l=(()=>{if(o==="x")return new I.Vector3(1,0,0).applyQuaternion(this.originObject3D.quaternion);if(o==="y")return new I.Vector3(0,1,0).applyQuaternion(this.originObject3D.quaternion);if(o==="z")return new I.Vector3(0,0,1).applyQuaternion(this.originObject3D.quaternion)})(),c=new I.Plane().setFromNormalAndCoplanarPoint(l,s),f=c.projectPoint(s.clone(),new I.Vector3).clone().sub(this.rotateCenter),d=f.angleTo(r.baseAxes.clone().applyQuaternion(this.originObject3D.quaternion));this.setAngleHelperStart(o,d),this.setAngleHelperLength(o,0),this.startInfo={direction:o,startVector:f,plane:c,angleHelper:r,angle:0,objectQuaternion:this.originObject3D.quaternion.clone()},this.helperObject3D.showDraggingHelper([o]),this.hooks.emit("rotateStart"),this.isDragging=!0}dragging(e){if(!this.isDragging)return;const n=bo(this.camera,e,this.container);return n?(this.rotate(n),!1):this.dragEnd()}rotate(e){if(!this.startInfo)return this.dragEnd();const{startVector:n,plane:o,angleHelper:s,direction:r,objectQuaternion:a}=this.startInfo,{originObject3D:l}=this,c=e.ray.intersectPlane(o,new I.Vector3);if(!c)return;const u=this.rotateCenter.clone(),d=o.projectPoint(c.clone(),new I.Vector3).clone().sub(u);if(n.angleTo(d)===0)return;const h=new I.Quaternion().setFromUnitVectors(n.clone().normalize(),d.clone().normalize()),g=l.quaternion.clone().premultiply(h);if(this.hooks.emit("wantToRotate",g))return;const v=new I.Euler().setFromQuaternion(new I.Quaternion().setFromUnitVectors(n.clone().normalize().applyQuaternion(a.clone().inverse()),d.clone().normalize().applyQuaternion(a.clone().inverse())),`${r.toUpperCase()}${"XZY".replace(r.toUpperCase(),"")}`)[r]*s.angleDirection;if(this.startInfo.angle+=v,this.setAngleHelperLength(r,this.startInfo.angle),this.setTipsAngle(cs(this.startInfo.angle)),u){const y=new I.Vector3().subVectors(l.position,u).applyQuaternion(h).add(u);l.position.copy(y)}l.applyQuaternion(h),this.hooks.emit("applyObjectRotate",{quaternion:h,origin:u}),this.hooks.emit("rotate",l.quaternion),this.startInfo.startVector=d}dragEnd(){!this.isDragging||(this.hooks.emit("setObjectRotate",this.originObject3D.quaternion,this.rotateCenter),this.startInfo=void 0,this.isDragging=!1,this.helperObject3D.show(),this.hooks.emit("rotateEnd"))}getAngleHelper(e){var n,o,s;switch(e){case"x":return(n=this.helperObject3D.xCircle)==null?void 0:n.angleSector;case"y":return(o=this.helperObject3D.yCircle)==null?void 0:o.angleSector;case"z":return(s=this.helperObject3D.zCircle)==null?void 0:s.angleSector}}setAngleHelperStart(e,n){const o=this.getAngleHelper(e);if(!o){console.warn("angleHelper is undefined");return}if(o instanceof I.Mesh&&o.geometry instanceof I.CircleGeometry){const{radius:s,segments:r,thetaLength:a}=o.geometry.parameters;o.geometry=new I.CircleGeometry(s,r,n,a)}else console.warn("only support THREE.CircleGeometry")}setAngleHelperLength(e,n){const s=n>=0?Math.max(n,.001):Math.min(n,-.001),r=this.getAngleHelper(e);if(r instanceof I.Mesh&&r.geometry instanceof I.CircleGeometry){const{radius:a,thetaStart:l}=r.geometry.parameters,c=Math.ceil(Math.abs(s)*(40/(2*Math.PI)));r.geometry=new I.CircleGeometry(a,c,l,s)}else console.warn("only support THREE.CircleGeometry")}setTipsAngle(e){var o;const n=(o=this.helperObject3D.angleTips)==null?void 0:o.element;!n||(n.innerText=`${e.toFixed(0)}\xB0`)}setTipsPosition(e){const n=this.helperObject3D.angleTips;if(!n)return;const o=e.project(this.camera),{x:s,y:r,z:a}=o;if(a>1)return;const l=(s+1)/2*100+"%",c=(-r+1)/2*100+"%";n.setLeftTop(l,c)}}class Jv extends xn{constructor(...e){super(...e);m(this,"startInfo");m(this,"name","RectangleScaleController")}enable(){this.helperObject3D.enable(),super.enable()}disable(){this.helperObject3D.disable(),super.disable()}show(){this.helperObject3D.show(),super.show()}hide(){this.helperObject3D.hide(),super.hide()}onApplyOriginObjectPosition(e){this.isDragging||super.onApplyOriginObjectPosition(e)}onApplyOriginObjectScale(e){this.helperObject3D.applyHelperScaleMatrix4(e.matrix,e.origin)}getDragPlane(){const e=new I.Plane,n=this.helperObject3D.cornerPositions;if(n.length!==0)return n.length<3?e.setFromNormalAndCoplanarPoint(this.originObject3D.getWorldDirection(new O.Vector3),n[0]):e.setFromCoplanarPoints(n[0],n[1],n[2]),e}dragStart(e,n){var s,r;(r=(s=this.helperObject3D).updatePoints)==null||r.call(s);const o=this.getDragPlane();if(!o)return this.dragEnd();this.startInfo={startPoint:{position:n.position.clone(),direction:n.direction},plane:o},this.hooks.emit("scaleStart"),this.render(),this.isDragging=!0}dragging(e){if(!this.isDragging)return;const n=bo(this.camera,e,this.container);if(!n)return this.dragEnd();this.scale(n)}scale(e){var Q,H;if(!this.startInfo)return;const n=this.originObject3D,{startPoint:o,plane:s}=this.startInfo,r=this.helperObject3D.cornerPositions;if(r.length<4)return this.dragEnd();const a=e.ray.intersectPlane(s,new O.Vector3);if(!a||zv(a,this.camera.position))return;const l=new O.Vector3().addVectors(r[0],r[2]).divideScalar(2),{position:c,direction:u}=o,f=new O.Vector3().subVectors(r[1],r[0]),d=new O.Vector3().subVectors(r[3],r[0]),h=F=>{const U=new O.Vector3(0,0,0);if(!this.startInfo)return U;const V=(F==="ew"?f:d).clone(),B=c.clone().projectOnVector(V),R=a.clone().projectOnVector(V),_=l.clone().projectOnVector(V);if(R.equals(B))return U;if(F==="ns"&&typeof this.startInfo.dragPointInCenterBottom!="boolean"){const X=new O.Vector3().subVectors(R,_),Z=X.x<0&&V.x>=0,me=X.y<0&&V.y>=0,de=X.z<0&&V.z>=0;this.startInfo.dragPointInCenterBottom=Z||me||de}if(F==="ew"&&typeof this.startInfo.dragPointInCenterLeft!="boolean"){const X=new O.Vector3().subVectors(R,_),Z=X.x<0&&V.x>=0,me=X.y<0&&V.y>=0,de=X.z<0&&V.z>=0;this.startInfo.dragPointInCenterLeft=Z||me||de}const N=new O.Vector3().subVectors(R,B),te=N.length();return te>.3?(console.warn("offset.length() > 0.3, skipped",te),U):N},g=h("ew"),A=h("ns"),p=()=>{const F=g;this.helperObject3D.cornerPositions.forEach((U,V)=>{var B;(B=this.startInfo)!=null&&B.dragPointInCenterLeft?(V===0||V===3)&&U.add(F):(V===1||V===2)&&U.add(F)})},v=()=>{const F=A;this.helperObject3D.cornerPositions.forEach((U,V)=>{var B;(B=this.startInfo)!=null&&B.dragPointInCenterBottom?(V===0||V===1)&&U.add(F):(V===2||V===3)&&U.add(F)})};switch(u){case"ew":p();break;case"ns":v();break;case"nesw":case"nwse":p(),v()}const y=new O.Vector3().subVectors(r[1],r[0]).length()/f.length(),w=new O.Vector3().subVectors(r[3],r[0]).length()/d.length(),P=new O.Vector3(y,w,1),E=new I.Matrix4().scale(P);n.isCSS3DObjectPlus?n.applyScaleMatrix4(E):n.scale.applyMatrix4(E),o.position.copy(a);const k=new O.Vector3().addVectors(r[0],r[2]).divideScalar(2),S=new O.Vector3().subVectors(k,l),x=new I.Matrix4().setPosition(S);n.applyMatrix4(x),(Q=this.helperObject3D.css3DInstance)==null||Q.css3DObject.applyMatrix4(x),(H=this.helperObject3D.plane)==null||H.applyMatrix4(x),this.hooks.emit("applyObjectScale",{matrix:E}),this.hooks.emit("applyObjectPosition",{matrix:x}),this.render()}dragEnd(){!this.isDragging||(this.startInfo=void 0,this.isDragging=!1,this.hooks.emit("scaleEnd"),this.render())}}class Zv extends Jv{constructor(...e){super(...e);m(this,"name","CSS3DScaleController");this.addHTMLEventListener()}addHTMLEventListener(){this.helperObject3D.points.forEach(e=>{if(!e)return;const n=e.point,o=a=>this.dragStart(a,e),s=this.dragging.bind(this),r=this.dragEnd.bind(this);n.addEventListener("dragstart",o),n.addEventListener("drag",s),n.addEventListener("dragend",r)})}}class qv extends xn{constructor(...e){super(...e);m(this,"name","BoundingBoxController")}}class Kv extends Ml{constructor(t){super(t)}}const Eo="v1.0.0",ko="Object3DHelperPlugin",Ci=`${ko}@${Eo}`,$v=()=>{console.error(`${Ci} is disposed`)},eb=()=>{console.warn(`${Ci} is disabled`)},tb=()=>{console.error(`${Ci} is disabled`)};class Tl extends ti{constructor(e){super(e);m(this,"version",Eo);m(this,"name",ko);m(this,"state",{visible:!0,enabled:!0,disposed:!1});m(this,"objectHelperMap",new Map);m(this,"css3DObjectParentMap",new Map);m(this,"css3DRender");this.five=e,this.css3DRender=new Nt(this.five.scene),console.warn("Object3DHelper: \u4F7F\u7528\u6B64\u63D2\u4EF6\uFF0C\u9700\u8981\u5728\u521D\u59CB\u5316five\u65F6\uFF0C\u8BBE\u7F6Efive\u53C2\u6570: { backgroundAlpha: 0, backgroundColor: 0x000000 }"),Object.assign(window,{[`__${ko.toUpperCase()}_DEBUG__`]:this})}show(e){return W(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return W(this,null,function*(){this.setState({visible:!1},e)})}enable(e){this.setState({enabled:!0},e)}disable(e){this.setState({enabled:!1},e)}dispose(){this.setState({disposed:!0})}setState(e,n){if(this.state.disposed)return $v();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return tb();const o=G({},this.state);this.state=G(G({},this.state),e),e.disposed!==void 0&&e.disposed!==o.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==o.visible&&this.handleVisible(e.visible),e.enabled!==void 0&&e.enabled!==o.enabled&&this.handleEnable(e.enabled),this.hooks.emit("stateChange",{state:this.state,prevState:o})}getObject3DHelper(e){return this.objectHelperMap.get(e)}addObject3DHelper(e,n={}){var h;if(!e)return console.error("Object3D is undefined");if(this.objectHelperMap.has(e)){console.warn(`Object3DHelperPlugin: object3D ${e.name} is already has helper`);return}const o=new Yv,s=[],r=(h=this.five.getElement())==null?void 0:h.parentElement,a=this.five.camera,{moveHelper:l=!0,rotateHelper:c=!0,scaleHelper:u=!0,boundingBoxHelper:f=!1}=n,d=new he.Subscribe;if(l){const g=new Tv(e),A=this.getConfig(n.moveHelper),p=new Dn(this.five,Wv,e,g,A,d);o.addControllers({moveController:p.helperController}),s.push(()=>p.dispose())}if(c){const g=this.getConfig(n.rotateHelper),A=new Vv(e,G({container:r},g)),p=new Dn(this.five,Uv,e,A,g,d);o.addControllers({rotateController:p.helperController}),s.push(()=>p.dispose())}if(f){const g=new Nv(e),A=new Dn(this.five,qv,e,g,void 0,d);o.addControllers({boundingBoxController:A.helperController})}if(u)if(e.isCSS3DObjectPlus&&r){const g=new Gv(e,r,a,this.five.scene),A=new Dn(this.five,Zv,e,g,void 0,d);o.addControllers({scaleController:A.helperController}),s.push(()=>A.dispose()),Oo(this.five).then(()=>{var p,v;if(e.isCSS3DObjectPlus){const y=e;if(!y||y.mode!=="front")return;const w=(p=this.css3DRender.behindModeCSS3DRenderer.wrapper)!=null?p:Fo(this.five);w&&(this.css3DObjectParentMap.set(y,y.parent),y.removeFromParent(),this.css3DRender.behindModeCSS3DRenderer.setWrapper(w),(v=this.css3DRender.getBehindCSS3DObjectGroup())==null||v.add(y),this.css3DRender.render(this.five.camera))}})}else{const g=new Kv(e),A=new Dn(this.five,Iv,e,g,void 0,d);o.addControllers({scaleController:A.helperController}),s.push(()=>A.dispose())}return this.objectHelperMap.set(e,{helper:o,disposers:s}),o.controllers}removeObject3DHelper(e){if(!this.objectHelperMap.has(e))return;const{helper:n,disposers:o}=this.objectHelperMap.get(e);if(!!n){if(e.isCSS3DObjectPlus){const s=e,r=this.css3DObjectParentMap.get(s);r&&r.add(s),this.css3DRender.render(this.five.camera)}this.objectHelperMap.delete(e),n.dispose(),o==null||o.forEach(s=>s==null?void 0:s())}}handleEnable(e,n=!0){e?(this.everyHelperDo(o=>o.enable()),this.hooks.emit("enable",{userAction:n})):(this.everyHelperDo(o=>o.disable()),this.hooks.emit("disable",{userAction:n})),this.state.enabled=e}handleVisible(e,n=!0){e?(this.everyHelperDo(o=>o.show()),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:n}))):(this.everyHelperDo(o=>o.hide()),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:n}))),this.state.visible=e}handleDispose(){this.objectHelperMap.forEach(({helper:e,disposers:n})=>{e.dispose(),n==null||n.forEach(o=>o==null?void 0:o())})}everyHelperDo(e){this.objectHelperMap.forEach(({helper:n,disposers:o})=>{n&&e(n)})}actionIfStateIsEnabled(e,n){if(this.state.enabled)return e();n!=null&&n.warnLog&&eb()}getConfig(e){if(!!e&&typeof e!="boolean"&&e.enable)return e}}const nb=i=>new Tl(i);Y.CSS3DRender=Nt,Y.CSS3DRenderPlugin=Wt,Y.CameraMovementEffect=Us,Y.CameraMovementPlugin=vf,Y.ContentType=ea,Y.CruisePlugin=Km,Y.CruisePluginController=so,Y.DIRECTION=nn,Y.DISPLAY_STRATEGY_TYPE=jt,Y.DimensionType=ta,Y.FLOOR_PLAN_ATTACHED_TO=Pt,Y.FLOOR_TYPE_MAP=rf,Y.GuideLinePlugin=Xr,Y.ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE=Vt,Y.ItemLabelPlugin=Pm,Y.Magnifier=rr,Y.MapviewFloorplanPlugin=Qd,Y.ModelChassisCompassPlugin=cf,Y.ModelEntryDoorGuidePlugin=ff,Y.ModelFloorplanPlugin=Td,Y.ModelItemLabelPlugin=im,Y.ModelRoomLabelPlugin=Xc,Y.ModelTVVideoPlugin=rm,Y.ModelViewPlugin=ec,Y.Object3DHelperController=Tl,Y.Object3DHelperPlugin=nb,Y.PLUGIN=Ci,Y.PaintBrush=$l,Y.PaintBrushTypeEnum=at,Y.PanoCompassPlugin=Ff,Y.PanoCursorRaycasterPlugin=vc,Y.PanoDoorLabelPlugin=Vm,Y.PanoFloorplanRadarPlugin=of,Y.PanoMeasurePlugin=Mh,Y.PanoMeasurePluginLine=Bt,Y.PanoMeasurePluginModel=di,Y.PanoMeasurePluginPoint=Je,Y.PanoMeasurePluginPolyline=ui,Y.PanoRulerPlugin=Pf,Y.PanoRulerProPlugin=Bf,Y.PanoSpatialTagPlugin=Xh,Y.PanoTagPlugin=Pv,Y.PanoTagPluginController=Dl,Y.PointType=na,Y.ROOM_FETILE_TYPE_MAP=sf,Y.ROOM_TYPE_MAP=af,Y.Rotation=tt,Y.TopviewFloorplanPlugin=Fd,Y.Util=N0,Y.VERSION=Eo,Y.itemLabelPluginServerParams=Im,Y.modelItemLabelPluginServerParams=om,Y.modelRoomLabelPluginServerParams=Yc,Y.pluginFlag=Cv,Object.defineProperties(Y,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|